# Types
`deft/stdext/types` defines the canonical `deftype` schemas shared by
package manifests, the native package layer, plugin discovery, and
registry UIs. It is the vocabulary that `package.dft` files, AI-provider
packages, and editor extensions are written against.
import "deft/stdext/types" as package-types
The module is not auto-loaded; import it to bring the types into scope.
`deftype` definitions register runtime-wide, so the type names
themselves are used unqualified.
## Package Manifests
| Type | Fields |
|---|---|
| `%Package` | `owner` (registry id; `"deft"` reserved), `name`, `version`, `deft-version`, `description`, `tags`, `author`, `license` (SPDX), `deps`, `capabilities`; optional `homepage repository docs main exports status fund-goal` |
| `%Dep` | `owner?`, `name`, `version` (semver constraint) |
| `%PackageCapabilities` | `platform` (`"gl" / "ansi" / "any"`), `pixels svg textures ffmpeg` (`:required / :optional / :unsupported`) |
| `%FundGoal` | `target-usd` / `raised-usd` (cents), `deadline`, `scope`, `est-deliver` |
%Package{
owner "acme" name "widget" version "1.0.0" deft-version "0.1.1"
description "A widget package" tags @{ "widget" } author "acme"
license "MIT" deps @{}
capabilities %PackageCapabilities{ platform "any" } }
`capabilities` is how the host knows whether a package can run in a
given environment — an `:ffi true` or `:svg :required` package is
reported unusable in hosts built without it.
## Plugin Contracts
| Type | Runtime contract |
|---|---|
| `%AiProviderExtension` | `key label version base-url env-var default-model extensions Provider` |
| `%EditorExtension` | `name version modes file-assocs keymaps menus menu-items commands hooks init` |
An AI provider package is tagged `"ai-provider"`; its entry module
declares `implements AiProviderExtension` and the VM conformance-checks
the exports against the schema at load time. See AI and
AI Providers.
An editor extension declares `implements EditorExtension`; the
editor imports the module at load and validates it. Function references
in `modes` / `hooks` / `init` are name strings resolved with `apply` at
the call site.
# editor extension entry module implements EditorExtension def name "templates" def version "0.1.0" def commands @{ "template-insert" } def init "templates-init"
## See Also
- Packages — the manifest and install contract
- AI / AI Providers — provider package shape
- Plugin — the generic discovery host these contracts plug into