返回 CodeWhale
PLUGIN_BUNDLES.md
根目录 / docs / PLUGIN_BUNDLES.md
1 # Plugin bundles
2
3 > 阅读简体中文版:[zh_hans/PLUGIN_BUNDLES.md](zh_hans/PLUGIN_BUNDLES.md)。
4
5 Codewhale supports a deliberately small plugin-bundle boundary: a bundle may
6 contribute declarative Skills, MCP configuration, Commands, Agent profiles,
7 and Hooks through Codewhale's existing engines. Unsupported declarations stay
8 inventoried instead of disabling a mixed bundle. Discovery alone never
9 executes, enables, trusts, downloads, updates, or installs anything.
10
11 This document owns the bundle formats, discovery,
12 validation, and the trust/enable/runtime contract. [PLUGINS.md](PLUGINS.md)
13 owns how bits get onto and off disk — the `/plugin install`, `update`,
14 `uninstall`, and `suggest` on-ramp. Compatible Claude Code bundles use the same native adapters; their supported subset is
15 [CLAUDE_PLUGIN_COMPAT.md](CLAUDE_PLUGIN_COMPAT.md).
16 For a runnable native example and explicit OpenCode/DSH data conversion, see
17 [Write your first plugin](PLUGIN_AUTHORING.md).
18
19 ## Discovery and precedence
20
21 Codewhale scans only its own roots, looking in each `<name>/` directory for a
22 manifest named `plugin.json` (the native Agent Plugins v1.0.0 format),
23 `kimi.plugin.json` (the compatible Kimi Skills/MCP subset), `plugin.toml`
24 (the legacy Codewhale format, still fully readable), or
25 `.claude-plugin/plugin.json` (the compatible Claude subset):
26
27 - User: `~/.codewhale/plugins/<name>/`
28 - Workspace: `<workspace>/.codewhale/plugins/<name>/`
29
30 A bundle that publishes multiple formats is read through `plugin.json` first,
31 then `kimi.plugin.json`, then the legacy `plugin.toml`, then
32 `.claude-plugin/plugin.json`.
33 Computer Use installs from the first-party catalog as a normal user plugin.
34 It updates independently of the Engine and requires review and enablement.
35 The native Mac helper is installed separately for permission setup and the
36 computer-control indicator. See the [Computer Use guide](https://github.com/codewhale-hq/codewhale-cu-plugin).
37
38 User plugins take precedence over workspace plugins. Symbolic-link roots,
39 manifests, component paths, and nested component files fail closed.
40 Historical built-in snapshots and receipts remain untouched for older binaries;
41 the current Engine neither creates nor discovers a built-in Computer Use copy.
42 Install and review the catalog plugin once when upgrading from that layout.
43
44 New user and workspace bundles are always untrusted and disabled. Discovery is
45 read-only and does not inspect any other application's extension or credential
46 directories: ambient roots such as `.claude/plugins` or `.cursor/plugins` are
47 never scanned.
48
49 Pre-v0.9.1 `overrides.json` enablement was intentionally not imported as
50 trust; every bundle activates only through the content-hash and
51 `codewhale-plugin-capabilities-v3` activation-policy review below.
52
53 ## Manifest
54
55 All supported encodings parse into the same internal manifest, so validation, hashing,
56 review, and runtime behavior are identical downstream. On-disk auto-migration
57 between them is deliberately not performed; `/plugin export <name>
58 <target-dir>` publishes a loaded bundle as a spec-valid Agent Plugins v1.0.0
59 directory without modifying the installed one.
60
61 ### `plugin.json` (Agent Plugins v1.0.0)
62
63 The standard's manifest root is closed: `$schema`, `name`, and the optional
64 well-known fields (`version`, `description`, `author`, `homepage`,
65 `repository`, `license`, `keywords`, `extensions`). An unknown root key is a
66 parse error. Client-specific data lives under `extensions`, keyed by
67 reverse-domain namespace: unknown vendor namespaces are ignored, never
68 rejected — that is what lets a bundle authored for another client load here —
69 while unknown keys inside Codewhale's own `extensions["net.codewhale"]`
70 namespace are rejected rather than silently dropped.
71
72 Names follow the standard's rule: 1–64 lowercase ASCII letters, digits, or
73 internal single `-`/`.`, starting and ending alphanumeric, never `--` or `..`.
74 A `skills/` directory in the bundle root is picked up automatically; other
75 component locations, `capabilities`, `when`, and `display_name` ride in
76 `extensions["net.codewhale"]`.
77
78 MCP servers cannot live in `plugin.json` (the root is closed); they live in a
79 sibling `mcp.json` under `mcpServers`, with `stdio`, `streamable-http`, or
80 `sse` transports (`type` may be omitted and is inferred from `command` vs
81 `url`). Codewhale-only server options — timeouts, tool filters, env-backed
82 credentials, enablement — ride per-server under `extensions["net.codewhale"]`.
83 The `env` names `PLUGIN_ROOT` and `PLUGIN_DATA` are reserved by the standard
84 for the host runtime and are rejected in plugin definitions.
85
86 ### `plugin.toml` (legacy Codewhale format)
87
88 ```toml
89 schema_version = 1
90
91 [plugin]
92 name = "example"
93 version = "0.1.0"
94 description = "Example instruction and MCP bundle"
95 author = "Example Author"
96
97 [skills]
98 path = "skills"
99
100 [commands]
101 path = "commands"
102
103 [agents]
104 path = "agents"
105
106 [hooks]
107 path = "hooks"
108
109 [mcp_servers.local]
110 command = "node"
111 args = ["server.js"]
112 cwd = "mcp"
113
114 [mcp_servers.remote]
115 url = "https://example.invalid/mcp"
116
117 [capabilities]
118 network_hosts = ["example.invalid"]
119
120 [when]
121 os = ["macos", "linux", "windows"]
122 binaries = ["node"]
123 ```
124
125 Legacy TOML names are 1–64 lowercase ASCII letters, digits, or internal
126 hyphens. A pre-versioned manifest without `schema_version` still parses, with
127 a migration warning from `/plugin validate` (and `0.0.0` displayed when
128 `[plugin].version` is missing). An unknown top-level table or field is a
129 parse error (`deny_unknown_fields`), reported by byte offset without echoing
130 manifest values.
131
132 ### Validation (both formats)
133
134 Component paths must be relative, contained, present, and free of symbolic
135 links or Windows reparse points (including junctions and mount points). The v1
136 schema rejects unknown MCP fields, ambiguous local/remote
137 transport combinations, unbounded lists/timeouts, and overlapping tool
138 filters.
139
140 Remote MCP URLs must use HTTPS, except for explicit loopback HTTP endpoints.
141 They cannot contain user information, a query, or a fragment. Literal headers
142 are rejected: authentication must name a source environment variable through
143 `env_headers` or `bearer_token_env_var`. A remote bundle must declare exactly
144 the normalized host set used by its endpoints in
145 `capabilities.network_hosts`; endpoint scheme, normalized host, port, and path
146 remain bound to the review. Redirects are limited and must retain that exact
147 normalized origin. Reviewed remote transports use an explicit no-proxy HTTP
148 client: plugin bundles never read or use ambient `HTTP_PROXY`, `HTTPS_PROXY`,
149 or `NO_PROXY` values, because proxy credentials and proxy observation are
150 outside the reviewed authority. User-authored MCP configuration keeps its
151 existing explicit proxy support.
152
153 Local stdio environment entries must use exact `${SOURCE_ENV}` references.
154 The review shows destination and source names, but never reads or prints their
155 values. Plugin children inherit only Codewhale's base secret-scrubbed child
156 environment plus those reviewed mappings; credential-capable proxy variables
157 and the broader compatibility environment used by user-authored MCP
158 configuration are not inherited ambiently. Absolute arguments and parent
159 traversal are rejected; contained bundle entrypoints are frozen to their
160 staged paths before spawn.
161
162 Every stdio argument is shown losslessly as a JSON string during review.
163 Common credential-bearing flags and known literal token shapes are rejected
164 from argv; credentials must instead use a reviewed environment mapping.
165 Plugin-contributed MCP OAuth is disabled, including discovery, login, refresh, and token storage;
166 a manifest declaring OAuth fields on a plugin MCP server fails validation.
167
168 ### Active and inactive component surfaces
169
170 Codewhale activates declarative `[skills]`, `[mcp_servers.*]`,
171 `[commands]`, `[agents]`, and `[hooks]` components from its content-addressed
172 runtime snapshot. Commands use markdown command files, Agents use Fleet TOML
173 profiles, and Hooks use `HooksConfig` TOML files. A component may name one file
174 or a directory of the corresponding files. Ordinary user/workspace commands
175 and Agent profiles keep precedence over plugin contributions; trusted project
176 hooks run after plugin hooks.
177
178 The manifest can additionally inventory the following inactive surfaces.
179 Those declarations stay hashed, reviewed, and displayed, but do not activate
180 and no longer disable the whole bundle:
181
182 ```toml
183 [lsp] # TOML alias: [lsp_servers]
184 path = "lsp"
185
186 [native] # TOML alias: [native_extension]
187 path = "native/index.mjs"
188
189 [capabilities]
190 filesystem_roots = ["workspace"]
191 network_hosts = ["api.example.invalid"]
192 lifecycle_mutation = true
193 ```
194
195 (In a `plugin.json` bundle the same tables ride under
196 `extensions["net.codewhale"]`.)
197
198 The accept/reject behavior is deliberately loud, never silent:
199
200 - Compatibility is per-component: `full` when every declared surface has an
201 adapter (or the bundle is empty), `partial` when supported components can
202 activate beside named inactive surfaces, and `unsupported` when the bundle
203 only declares surfaces Codewhale cannot activate yet. The same versioned
204 activation policy (v3) drives those labels, the runtime adapters, and the
205 capability hash. Executing LSP or native code must change that policy,
206 which changes the capability hash and forces re-review. v1 and v2 trust
207 receipts fail closed as `capabilities-changed`.
208 - **`native` under the experimental plugin host.** With
209 `[features] extension_host` on, the policy becomes v4 and `native` is an
210 active adapter: each entry is one `.mjs`, `.js` or `.mts` ES module file that the
211 TypeScript plugin host imports. A directory or any other file reports
212 an error in `/plugin validate` and review and prevents activation. Its tools
213 always use `Required` approval;
214 Full Access, Bypass, or an exact session grant for the reviewed build can
215 satisfy that gate without a prompt. Toggling the flag
216 re-reviews every plugin. See
217 [the design](design/TS_EXTENSION_HOST.md#as-built-phase-1-2026-09-25).
218 The [plugin author guide](EXTENSIONS.md) includes a tested typed example,
219 diagnostic workflow and Node's erasable-TypeScript restrictions.
220 - A **recognized-but-inactive** declaration (`lsp`, `native`, a non-empty
221 `capabilities.filesystem_roots`, or
222 `capabilities.lifecycle_mutation = true`) parses and is validated like any
223 component (contained, present, link-free). It is counted in the inventory,
224 hashed into the capability receipt, shown in review and `/plugin show` as
225 inactive, and never executed (for `native`, only while the plugin host
226 flag is off). A reviewed, trusted, applicable mixed bundle
227 can still be enabled: supported declarative components become active, and
228 the inactive surfaces stay named as inactive.
229 - An **all-unsupported** bundle can be reviewed and trusted, but `/plugin
230 enable` fails closed and names the inactive surfaces. There is nothing
231 Codewhale can honestly activate.
232 - An **unrecognized** section or field is a validation failure, not an
233 inventory entry: unknown top-level TOML tables, unknown MCP server fields,
234 unknown `plugin.json` root keys, and unknown keys inside
235 `extensions["net.codewhale"]` are all rejected outright. The single
236 ignore-without-error case is another vendor's `extensions` namespace in the
237 Agent Plugins format, which the standard requires clients to skip.
238 - `capabilities.network_hosts` is not a future surface: it is enforced today,
239 and must exactly match the normalized host set of the bundle's remote MCP
240 endpoints (so it cannot be declared without them, or omitted with them).
241 - `capabilities.host_services` names the host services a bundle's native code
242 asks to use (`workspace`, `llm`, `network`, `settings`, `catalog`,
243 `terminal`, `remote`). It is hashed into the capability receipt only when it
244 is not empty, so bundles that ask for nothing keep their review. Asking
245 grants nothing: only a review that showed the services does, and this
246 version offers none yet. See
247 [Host services](EXTENSIONS.md#host-services).
248
249 A successful environment or health check is never treated as trust.
250
251 ### A DeepSeek Harness package with Codewhale's own kinds
252
253 When a local folder has a DeepSeek Harness `package.json` (`dsh.bundle`), new local installs and previews take the DSH importer even when a sibling `plugin.json` is present. That sibling `plugin.json` may declare only Codewhale's own declarative kinds (`commands`, `agents`, and `hooks` under `extensions["net.codewhale"]`) plus standard root metadata, whose descriptive fields are ignored in favor of `package.json` and recorded in `CONVERSION.md` / diagnostics.
254
255 - **Identity and version:** `plugin.json`'s `name` must match the plugin name derived from `package.json`; `version`, if given in both files, must be equal.
256 - **No overlapping or forbidden declarations:** `skills`, `native`, `lsp`, `providers`, `capabilities`, `when`, `display_name`, and `icon` in `plugin.json`, a sibling `mcp.json`, a root `skills/` folder not declared by a DSH patch row, and any other manifest spelling (`kimi.plugin.json`, `plugin.toml`, `.claude-plugin/plugin.json`, `.plugin/plugin.json`, `.github/plugin/plugin.json`) are refused. Declaring `hooks` in `plugin.json` alongside a DSH hook-bridge row is also refused.
257 - **Project plugins unchanged:** project-scoped bundles under `.codewhale/plugins/<name>/` are still discovered by `plugin.json` alone; updating an already-installed `path:` Codewhale bundle keeps reading it by its Codewhale manifest even if `package.json` is added later.
258
259 ## Review, trust, and enablement
260
261 Use the in-session command surface:
262
263 ```text
264 /plugin list
265 /plugin validate example
266 /plugin show example
267 /plugin enable example
268 ```
269
270 The first `enable` opens a review showing source, component inventory,
271 requested permissions, sanitized MCP endpoints, full content and capability
272 hashes, and inactive declarations. It also prints an exact confirmation:
273
274 ```text
275 /plugin trust example <full-content-sha256>.<full-capability-sha256>
276 ```
277
278 Run that exact command only after reviewing the bundle. The confirmation token
279 uses both complete SHA-256 receipts rather than display prefixes. The
280 capability receipt is the v3 digest: it still hashes the complete inventory
281 and also binds this build's activation policy (which adapters are executable
282 versus inventoried-only). Trust first
283 copies the complete reviewed tree into a Codewhale-owned, content-addressed
284 runtime snapshot and records the matching receipt; it does not activate
285 anything.
286 Then run `/plugin enable example` again. Trust and enablement are separate:
287
288 - `/plugin disable example` stops contribution while preserving trust.
289 - `/plugin revoke example` removes trust while preserving the enablement bit;
290 the bundle remains inactive until reviewed again.
291 - `/plugin reload` rebuilds the current workspace registry when files have
292 changed on disk.
293 - `/plugin status [name]` shows the existing inventory or one bundle's state
294 and diagnostics. `/plugin restage <name>` restores a missing runtime snapshot
295 only when its source still matches the enabled review and current policy.
296 It preserves the receipt and generation; an existing changed snapshot is
297 refused and needs review.
298
299 Normal runtime loading also attempts that verified recovery for missing
300 snapshots. A failed automatic attempt keeps its reason and requires an explicit
301 retry for the same review. Recovery does not authorize changed source bytes.
302
303 From a shell, `codew plugins status [name] [--json]` inspects the same captured
304 plugin roots without carry-forward, cleanup or recovery writes. A built-in
305 whose review needs upgrade carry-forward can therefore appear unreviewed
306 until normal runtime loading. `codew plugins restage <name> [--json]` performs
307 an explicit verified repair. Use `/plugin reload` in an already running
308 terminal session to refresh its registry after a repair from another process.
309
310 The same review and state changes are available from a shell:
311
312 - `codew plugins trust <name> [--json]` prints the review that `/plugin trust`
313 shows, with its bundle review token, and changes nothing. In a terminal it
314 then asks once whether to trust.
315 - `codew plugins trust <name> --review-token <token> --yes` trusts without a
316 prompt, and only if the bundle review token still matches the installed
317 content and capability set. The token is `<content-hash>.<capability-hash>`
318 and ties trust to that exact content. It is not a record that anyone read
319 the review, and `plugins status --json` prints both of its halves. It is
320 also not the host-service review token described in
321 [EXTENSIONS.md](EXTENSIONS.md): the command never asks for that one.
322 - `codew plugins enable|disable|revoke <name> [--json]` make the same state
323 changes as the slash commands. Trust never enables a bundle.
324
325 Every trust records who approved it, and `plugins status` shows it. Every
326 command the agent runs carries the agent's mark, the variable
327 `CODEWHALE_AGENT_PROJECT` set to the session's project, whatever the sandbox
328 or permission mode: shell commands, persistent terminal sessions, verifier and
329 test runs, code run in the Python kernel (`repl` blocks and RLM), and MCP
330 servers the agent starts with `start_mcp_server`. Under Auto-Review, shell and
331 verifier commands also set `CODEWHALE_AGENT_POSTURE=auto_review` alongside
332 `CODEWHALE_AGENT_THREAD_ID`, `CODEWHALE_AGENT_TURN_ID`, and
333 `CODEWHALE_AGENT_TOOL_CALL_ID`, recording the approver as the agent in
334 Auto-Review with that provenance instead of the plain command line. Processes
335 Codewhale starts that are not the agent's commands carry no mark: hooks, MCP
336 servers from your configuration, and `/plugin trust` typed in the terminal
337 app. With the mark, a trust or an `enable` is recorded as the
338 agent's, for that project only, including a prompt answered through a
339 terminal; it is never recorded as yours. The agent may trust only a plugin it
340 installed with `codewhale install` from a folder inside that project, read
341 from the bundle's `.installed-from` record; anything else is refused and left
342 to you. That record shows where the files came from, not who wrote them.
343 Without the mark, a `--yes` trust is recorded as the command line and grants
344 no host service, and a prompt answered in your own terminal is recorded as
345 yours.
346
347 The agent's shell commands that run `plugins trust` or `plugins enable` go
348 through the session's approval like any other shell command: Ask asks you,
349 Auto-Review's reviewer judges, and Full Access runs them, so a Full Access
350 agent can trust and enable a plugin it wrote, for its own project. The mark is
351 a label, not a lock: in Full Access the agent could remove it, which shows in
352 the command it runs. Where an OS sandbox applies, it keeps plugin state
353 read-only, so a trust from inside it fails when it writes. `disable` and
354 `revoke` are never held for you.
355
356 (`/plugin install`, `update`, and `uninstall` place, replace, and remove the
357 bits themselves and always drop into this same review — see
358 [PLUGINS.md](PLUGINS.md). `/plugin suggest` ranks installed bundles and
359 any locally added marketplace catalogs; sending a matching task can toast the
360 same next step without installing anything. Nothing is written into the
361 model's request to advertise plugins; the full offering policy is in
362 [PLUGINS.md](PLUGINS.md#how-codewhale-offers-plugins).)
363
364 Trust, enable, restage, disable, revoke, and reload rebuild the current workspace's
365 Skills, MCP, Commands, Agent profiles, and Hooks immediately. Each persisted
366 transition advances a per-bundle generation under a stable cross-process lock.
367 A generation change cancels in-flight MCP work, removes cached catalog
368 entries, terminates an idle plugin stdio child, and denies persisted queued
369 Skills carrying the older authority receipt.
370
371 The review distinguishes remote MCP endpoints from local stdio MCP servers.
372 A local stdio server is a child process running with the Codewhale user's host
373 filesystem and network authority; plugin trust is not an OS sandbox. The
374 review therefore shows the command, argument count, working directory,
375 environment-variable names, and this host-authority warning without printing
376 environment or header values. MCP tool approval still applies after the
377 server starts.
378
379 Trust receipts live in `~/.codewhale/plugins/state.json`. Atomic owner-only
380 writes record the full content hash, capability hash, reviewed capability
381 inventory, generation, and review time, with the latest 32 reviews retained as
382 a bounded audit trail. Malformed or unsupported state is not overwritten: all
383 bundles fail closed until the state file is repaired or moved.
384
385 The content hash covers the manifest, complete bundle tree, and executable
386 shape in deterministic path order, including local MCP entrypoints and
387 companion assets. Staging is bounded, rejects symbolic links and unsupported
388 file kinds (plus every Windows reparse point and hard-linked files), uses an
389 atomic destination swap, and applies owner-only runtime permissions or ACLs
390 through validated object handles on Windows. The capability hash covers the
391 normalized component and permission inventory. A source or staged-content
392 edit, capability change, or unsafe runtime-root replacement invalidates the
393 receipt deterministically; an already-enabled bundle becomes inactive until
394 it is reviewed again. This is the same invalidation `/plugin update` relies
395 on: replaced bytes stop matching the receipt, forcing re-review.
396
397 ## Runtime behavior
398
399 An active bundle must be enabled, trusted for its current hashes, applicable to
400 the host, and free of validation errors. A reviewed mixed bundle may be
401 active, but only supported components in the reviewed v3 activation mask are
402 consumable. Unsupported components remain listed, hashed, reviewed, and
403 inactive.
404
405 - Skills are exposed only as `<plugin>:<skill>`. The model-facing catalogue and
406 `load_skill` use an in-memory snapshot bound to the reviewed staged tree,
407 rather than reading a mutable source path at execution time. `load_skill`
408 revalidates source, stage, receipt, workspace, and generation immediately
409 before releasing content and fails closed on drift. Queued messages persist
410 the same provenance and repeat that check at dispatch. `/skills inspect`
411 identifies the reviewed bundle without exposing its mutable source path.
412 - MCP server names are exposed as
413 `plugin-<plugin-name-byte-length>-<plugin>-<server>` so hyphens in either
414 component cannot create an authority collision. Disabled or untrusted
415 bundles are denied again at the headless MCP adapter. Authority is checked
416 before connection, immediately before every lazy stdio spawn, after
417 transport construction, and before each tool/resource/prompt operation.
418 Persisted generation/enablement/trust state is also watched while an
419 operation is in flight, so disable, revoke, or another cross-process state
420 transition cancels the operation and terminates a plugin stdio child. Full
421 source and staged-tree hashes are revalidated at dispatch/catalogue
422 boundaries; the runtime does not continuously re-hash those trees during an
423 already-running MCP call. Source or stage drift therefore fails the next
424 boundary and drops the stale connection/catalogue entry, but is not claimed
425 to interrupt a call already executing. Every failure includes instructions
426 to reload, review, trust, and enable the bundle again.
427 - Commands load after ordinary user/workspace commands and saved workflows, so
428 existing definitions keep precedence and collisions are visible. The
429 palette hides a revoked command immediately; dispatch rechecks the full
430 receipt before expanding its body and reports a visible denial on stale
431 input.
432 - Agent profiles join the Fleet roster below explicit config, personal, and
433 workspace profiles but above built-ins. Roster collisions retain the
434 existing visible shadow record. Every Agent spawn rebuilds from the current
435 registry and rechecks the selected plugin profile's authority before its
436 prompt or route can be used.
437 - Hooks merge after global hooks and before trusted project hooks. Foreground
438 Hooks recheck authority immediately before process spawn; background Hooks
439 check before enqueue and again at dequeue so a queued, revoked Hook cannot
440 start later.
441 - Plain launch, resume, fork, exec, and serve each construct an immutable
442 workspace-scoped registry before constructing their plugin-backed catalogues.
443 - Constitution, repository instructions, permission rules, sandbox policy,
444 and MCP tool approval continue to outrank plugin instructions.
445
446 `/plugin list`, `show`, `suggest`, and `validate` perform no network requests,
447 process launches, credential reads, or configuration writes. Reviews render
448 structural argv as lossless JSON strings and environment provenance without
449 values. Credential-bearing argv is rejected at manifest validation;
450 plugin-originated errors suppress URL query, authentication, argv, and
451 environment material. Legacy executable tools under `[tools].plugin_dir`
452 remain a distinct system and are listed under `/plugin tools`; they cannot
453 approve themselves or replace built-in tools (see
454 [CONFIGURATION.md](CONFIGURATION.md#script-tools-and-overrides)).
455
456 ## Explicit non-goals
457
458 Federated marketplace catalogs (`/plugin marketplace add|list|show|remove|install`)
459 parse local Kimi-, Claude-, Codex-, and Codewhale-format catalog documents; see
460 the marketplace section below (`/plugin install` fetches
461 one reviewed source, and `/plugin suggest` ranks only what is already
462 installed), no ambient compatibility discovery, no automatic trust, no
463 plugin-contributed MCP OAuth, no LSP adapter or MCP subscription adapter, no
464 native plugin runtime outside the experimental `extension_host` flag, no
465 foreign executable plugin runtime import, and no on-disk auto-migration of a
466 legacy `plugin.toml` to `plugin.json`. The explicit offline
467 [OpenCode/DSH converter](PLUGIN_AUTHORING.md#convert-an-existing-plugin) supports
468 selected portable Skills, static Streamable HTTP MCP declarations, and
469 explicitly packaged Node `.mjs`, `.js`, or `.cjs` MCP servers selected with `--stdio-root`.
470 Local source and dependencies are copied for the same native installation,
471 capability review, hash-bound trust and enable flow; conversion executes no
472 code or package manager. It does not migrate arbitrary bundles or reproduce
473 another client's runtime or policy.
474 The other capabilities above remain later work rather than implied support.
475
476 ## Marketplace catalogs (#5311)
477
478 `/plugin marketplace` reads LOCAL catalog documents in the real published
479 schemas (Kimi, Claude, Codex, Codewhale native; Codex via its policy markers)
480 and renders every candidate with an honest install plan:
481
482 ```text
483 /plugin marketplace add <name> <path> # parse a local catalog file (no network)
484 /plugin marketplace list # catalogs + candidates + diagnostics
485 /plugin marketplace show <name> # one catalog in detail
486 /plugin marketplace remove <name> # forget a catalog (plugins unaffected)
487 /plugin marketplace install <catalog> <candidate>
488 ```
489
490 - `add` never fetches anything: it reads one local JSON file (≤4 MiB, regular
491 files only, symlinks refused) and stores the parsed catalog next to the
492 plugin state file.
493 - Catalog tiers and provenance (`official`, `curated`, …) are **display
494 only** — they never grant trust, enablement, or installation.
495 - Foreign policies are visibly ignored: a Codex `INSTALLED_BY_DEFAULT` entry
496 is listed with a `NO_AUTO_INSTALL` warning and nothing is installed until
497 an operator runs the install verb.
498 - Catalog npm package declarations, `command:` sources and non-tarball URLs
499 are listed as `not installable` with the reason. Explicit
500 `/plugin install npm:package@1.2.3` and `codewhale install npm:package@1.2.3`
501 instead fetch an exact-version npm registry tarball containing a native plugin
502 manifest. They do not run npm lifecycle scripts or install dependencies; see
503 [install sources](PLUGINS.md#sources).
504 - `install` routes through the same reviewed installer as `/plugin install`:
505 the bundle lands disabled and untrusted, and enters the hash-bound trust
506 review before anything activates.
507
507 lines MARKDOWN