From 90a21bf2d6815588290fd3e9b20d2ab9b7a401f6 Mon Sep 17 00:00:00 2001 From: showxu <10173746+showxu@users.noreply.github.com> Date: Tue, 1 Dec 2026 13:06:31 +0800 Subject: [PATCH] docs: refresh CLI sources for 0.3.2 --- sources.json | 36 +++---- sources/cli/Documentation/Reference/CLI.md | 103 ++++++++++++++++++--- sources/cli/README.md | 10 +- 3 files changed, 115 insertions(+), 34 deletions(-) diff --git a/sources.json b/sources.json index baf3c7e..04a83e7 100644 --- a/sources.json +++ b/sources.json @@ -3,28 +3,28 @@ "files": [ { "repository": "agents-tools/.github", - "revision": "da6e2ff53ad1bb2bf3807fece3282fcf94c603a3", + "revision": "b315b0869169645be1d62ac74e1bf3d111d0b500", "path": "profile/catalog.json", "file": "sources/standard/profile/catalog.json", "sha256": "7835a660ee898c12d4109a93e5397b88a996273a3cd2f5618a9d6dbcb424bc64" }, { "repository": "agents-tools/.github", - "revision": "da6e2ff53ad1bb2bf3807fece3282fcf94c603a3", + "revision": "b315b0869169645be1d62ac74e1bf3d111d0b500", "path": "profile/assets/icon.png", "file": "sources/standard/profile/assets/icon.png", "sha256": "58981839dd6ad3f2c1f5ed4273a64563d95f29925b210c338e76216238a73825" }, { "repository": "agents-tools/.github", - "revision": "da6e2ff53ad1bb2bf3807fece3282fcf94c603a3", + "revision": "b315b0869169645be1d62ac74e1bf3d111d0b500", "path": ".github/design/fonts/GoogleSansCode[MONO,wght].ttf", "file": "sources/standard/.github/design/fonts/GoogleSansCode[MONO,wght].ttf", "sha256": "74642762fae66d5883077794a763e1086394b8cb72f2623e456e06359dc5c64b" }, { "repository": "agents-tools/.github", - "revision": "da6e2ff53ad1bb2bf3807fece3282fcf94c603a3", + "revision": "b315b0869169645be1d62ac74e1bf3d111d0b500", "path": ".github/design/fonts/GoogleSansCode[MONO,wght].ttf", "file": "sources/standard/.github/design/fonts/GoogleSansCode[MONO,wght].woff2", "sha256": "ed98cac89efbca1e09b896baf1a48dd95f9feacfa7118d59efa1ad2ab692b924", @@ -32,7 +32,7 @@ }, { "repository": "agents-tools/.github", - "revision": "da6e2ff53ad1bb2bf3807fece3282fcf94c603a3", + "revision": "b315b0869169645be1d62ac74e1bf3d111d0b500", "path": ".github/design/fonts/OFL.txt", "file": "sources/standard/.github/design/fonts/OFL.txt", "sha256": "58d145732eea7ee61940a7eccecad160772b8621171b69b62183a5c7eb967740", @@ -41,77 +41,77 @@ }, { "repository": "agents-tools/.github", - "revision": "da6e2ff53ad1bb2bf3807fece3282fcf94c603a3", + "revision": "b315b0869169645be1d62ac74e1bf3d111d0b500", "path": "LICENSE", "file": "sources/standard/LICENSE", "sha256": "e5161d00bc83bb836971bd3db25271351663b8aa8928eb1b15b58f3c47ccdbeb" }, { "repository": "agents-tools/cli", - "revision": "1b387b1c978336066684ad4d1ada59df1201eed4", + "revision": "fa3a0a86164dd2441dd143acb3da235abb1947af", "path": "README.md", "file": "sources/cli/README.md", - "sha256": "4818fc8b3f7d3e6de1bb6a90e9c01aade5455d15e735773a5f14fb0840ade237" + "sha256": "649177093aa939b5481e0330eef06467b03b969b96526de3f3d95eb834b84f08" }, { "repository": "agents-tools/cli", - "revision": "1b387b1c978336066684ad4d1ada59df1201eed4", + "revision": "fa3a0a86164dd2441dd143acb3da235abb1947af", "path": "Documentation/Reference/CLI.md", "file": "sources/cli/Documentation/Reference/CLI.md", - "sha256": "b3c7526e55736b7963a0b2ca2e7a2df83e53d2db08f2f702371b79def2da5d0e" + "sha256": "fc93f2d6140845610ecbc96823d348119318f6cb541028b5eb6c5718d3c4311c" }, { "repository": "agents-tools/cli", - "revision": "1b387b1c978336066684ad4d1ada59df1201eed4", + "revision": "fa3a0a86164dd2441dd143acb3da235abb1947af", "path": ".github/assets/terminal/terminal-light.svg", "file": "sources/cli/.github/assets/terminal/terminal-light.svg", "sha256": "206dc1f2f9e59f0de9f4f064977c3532956798ca81ce92707d1d5d42a1a738d1" }, { "repository": "agents-tools/cli", - "revision": "1b387b1c978336066684ad4d1ada59df1201eed4", + "revision": "fa3a0a86164dd2441dd143acb3da235abb1947af", "path": ".github/assets/terminal/terminal-dark.svg", "file": "sources/cli/.github/assets/terminal/terminal-dark.svg", "sha256": "94a73d605952fa9fa74499baa9a670feb0daec8b2f36512e2e1374ddbc75a232" }, { "repository": "agents-tools/cli", - "revision": "1b387b1c978336066684ad4d1ada59df1201eed4", + "revision": "fa3a0a86164dd2441dd143acb3da235abb1947af", "path": ".github/assets/logo/logo.png", "file": "sources/cli/.github/assets/logo/logo.png", "sha256": "58981839dd6ad3f2c1f5ed4273a64563d95f29925b210c338e76216238a73825" }, { "repository": "agents-tools/cli", - "revision": "1b387b1c978336066684ad4d1ada59df1201eed4", + "revision": "fa3a0a86164dd2441dd143acb3da235abb1947af", "path": ".github/assets/social-preview/social-preview.png", "file": "sources/cli/.github/assets/social-preview/social-preview.png", "sha256": "0070922e172068512e7c517a61fd0592110a9c786529fa66233502641ae260af" }, { "repository": "agents-tools/cli", - "revision": "1b387b1c978336066684ad4d1ada59df1201eed4", + "revision": "fa3a0a86164dd2441dd143acb3da235abb1947af", "path": "LICENSE", "file": "sources/cli/LICENSE", "sha256": "e5161d00bc83bb836971bd3db25271351663b8aa8928eb1b15b58f3c47ccdbeb" }, { "repository": "agents-tools/app", - "revision": "08d88f89c9c6f36a357ad436729b19101ed04ee0", + "revision": "2fd8a614ef5437947f5c8257061b9ff6e10af477", "path": "README.md", "file": "sources/app/README.md", "sha256": "520f0290b416596c0c63d70afcacb787df146fda686e88b84ff66108b815409a" }, { "repository": "agents-tools/core", - "revision": "ce6640adeb53ce0152134547938a6e13472e28b5", + "revision": "a5150eb2f728e7babfc9427d7fa47b8bbf941873", "path": ".github/assets/logo/logo.svg", "file": "sources/core/.github/assets/logo/logo.svg", "sha256": "9a1d4bed3e5e0a27b047ad7f4a61dd54436581c23014ff76e79acdd6dd93749e" }, { "repository": "agents-tools/core", - "revision": "ce6640adeb53ce0152134547938a6e13472e28b5", + "revision": "a5150eb2f728e7babfc9427d7fa47b8bbf941873", "path": "LICENSE", "file": "sources/core/LICENSE", "sha256": "9ae2a33a73825aa7432d20210f675857c47987e6af792f9fc628797b8401f737" diff --git a/sources/cli/Documentation/Reference/CLI.md b/sources/cli/Documentation/Reference/CLI.md index 1db688a..0622cb6 100644 --- a/sources/cli/Documentation/Reference/CLI.md +++ b/sources/cli/Documentation/Reference/CLI.md @@ -3,7 +3,8 @@ `agents` manages declared agent components. Resolution, installation, state, and recovery operations use `AgentsCore`, `AgentsSkills`, and `AgentsInstructions`. Combined lifecycle, content audit, component inspection, -import and MCP tests use `AgentsUpdates`. `AgentsManifest` owns declaration +import, host plugin synchronization, skill governance, and MCP tests use +`AgentsUpdates`. `AgentsManifest` owns declaration parsing and editing, and the manifest dump contract. ## Commands @@ -31,6 +32,8 @@ agents components inventory [--scope project|user] agents components list [ --group --alias ] [--json] [--scope project|user] agents components add --group [--alias ] [--binding NAME=ENV_VAR] [--scope project|user] agents components remove [--kind ] [--identity ] [--occurrence ] [--agent ] [--binding NAME=ENV_VAR] [--scope project|user] +agents plugins list [--scope project|user] [--agent …] [--declared-only] [--json] +agents plugins sync [--scope project|user] [--agent …] [--apply] [--json] agents import --format [--root ] [--select ] [--apply | --json] [--binding NAME=ENV_VAR] [--scope project|user] agents bundle init --name --package-version agents bundle pack [--output | --publish-to ] [--reviewed-digest ] @@ -75,14 +78,14 @@ agents lifecycle trusted [--json] agents lifecycle untrust [ | --root-id ] [--json] agents install [--json] [--binding NAME=ENV_VAR] agents update [--apply | --json] [--binding NAME=ENV_VAR] [--replace] [--changing-access] -agents doctor [--root …] [--ci] [--require-organization-policy] [--json] +agents doctor [--scope project|user] [--agent …] [--root …] [--ci] [--require-organization-policy] [--json] agents export-patch [--scope project|user] [--dry-run] [-o ] [--json] agents audit [--scope project|user] [--file | --agent …] [--ci] [--format markdown|json|sarif] agents audit --file --strip [--scope project|user] [--apply] ``` `agents --help`, `agents skills --help`, `agents instructions --help`, -`agents watch --help`, `agents manifest --help`, `agents auth --help`, and each +`agents watch --help`, `agents plugins --help`, `agents manifest --help`, `agents auth --help`, and each command's `--help` describe their options. Running a group without a subcommand prints help, except `agents watch`, which runs `watch status` and accepts its options. `agents --version` @@ -109,14 +112,16 @@ Examples: | --- | --- | --- | | `--scope project\|user` | Where state lives: project (./.agent) or user (~/.agents). Default: project. | Commands with a scope option. Lifecycle trust commands use the current project or the user trust store. | | `--agent ` | Agent to install for: codex, claude-code, cursor, gemini-cli, opencode, or antigravity. Repeat for several. Default: the agents already recorded for this skill or source, else the declaration's agents, else codex and claude-code. | `skills add` | -| `--agent ` | Limit to this agent: codex, claude-code, cursor, gemini-cli, opencode, or antigravity. Repeat for several. Default: all recipients. | `skills list`, `skills remove`, `doctor` | +| `--agent ` | Limit to this agent: codex, claude-code, cursor, gemini-cli, opencode, or antigravity. Repeat for several. Default: all recipients. | `skills list`, `skills remove`, `plugins list`, `plugins sync`, `doctor` | | `--agent ` | Select instruction recipients. `add` can select Antigravity rules for specific sections. `remove` and `update` set the scope's instruction recipient list. Repeat for several. | `instructions add`, `instructions remove`, `instructions update` | | `--path ` | Search this subdirectory of the source. | Both kinds' `add` and `list `, `watch add` | | `--full-depth` | Discover recursively beyond conventional skill directories | `skills add`, `skills list ` | | `--mode link\|copy\|edit` | How to install: link (default), copy, or edit (a live link to a local source). | `skills add` | | `--root …` | Audit or map these project directories read-only. Repeat for several. | `doctor`, `instructions export` | | `--replace` | Take over target files that agents did not generate. | `instructions add`, `instructions update --apply` | -| `--json` | Emit a versioned JSON report on stdout | Both kinds' `list`, `install`, `doctor`, all update previews, `instructions export`, `watch status`, `watch diff`, `auth check`. `manifest dump` requires it. | +| `--declared-only` | Show only host plugins declared in the selected scope. | `plugins list` | +| `--apply` | Synchronize declared host plugins and verify the resulting state. | `plugins sync` | +| `--json` | Emit a versioned JSON report on stdout | Both kinds' `list`, `install`, `doctor`, all update previews, `plugins list`, `plugins sync`, `instructions export`, `watch status`, `watch diff`, `auth check`. `manifest dump` requires it. | Skill and instruction recipients are `codex`, `claude-code`, `cursor`, `gemini-cli`, `opencode`, and `antigravity`. Cursor instructions use @@ -126,7 +131,7 @@ recipients use the agents already recorded for the skill or source, then declaration defaults (initially Codex and Claude Code). On skill list, skill remove, and doctor, omission covers all recipients. Source listing shows available content regardless of recipients. -Doctor's agent filter limits skill installation checks; skill source checks and +Doctor's agent filter limits skill installation and governance checks. Skill source checks and instruction diagnostics cover the scope. Instruction targets can be shared by several agents, and are audited as physical files. @@ -208,6 +213,9 @@ is a usage error. Both require a Git repository for local sources and read committed content. `edit` links live local directories and accepts no requirement. +New Codex skill installations use `.agents/skills` in project scope and +`~/.codex/skills` in user scope by default. User scope honors `CODEX_HOME`. + Requirement options on add populate a source's `requirement` mapping in `agents.yaml`: @@ -415,6 +423,59 @@ Native component update previews print changed or unchanged component rows, symbolic before/after content, required binding names and permission changes. Completion lines identify the component and target after a successful apply. +## Host Plugins + +Add a `kind: hostPlugin` component to the selected scope's `agents.yaml` with a +name and either a `pluginId` (with exactly one explicit recipient in `agents`) +or one bundle selected by `source` and `path` (with one or more explicit +recipients in `agents`). Set `enabled: false` to request disabled state. The default +is enabled. Core supports Codex, Claude Code, and Antigravity. Claude Code +defaults to the selected agents scope, with an optional `claudeScope` of +`user`, `project`, or `local`. + +`plugins list` reads local host records for the selected scope and reports +declared desired state, observed installation and enablement, locations and +drift. It includes unmanaged host entries by default. Use `--declared-only` +to show only declared entries. + +`plugins sync` previews commands and settings changes for the declarations in +the selected scope. Listing and previewing run zero subprocesses. Use +`--apply` to execute the planned vendor commands or settings edits and read +back the resulting host state. Antigravity project registration can use a +local bundle through workspace discovery settings. The ordinary `agents +install` and `agents update` lifecycle continues to manage `kind: plugin` +components separately. + +Completed previews exit 0. Applied sync exits 0 when every result is +`installed`, `enabled`, `disabled`, or `unchanged`. It reports all results +and exits 1 if any outcome is `unsupported`, `cliUnavailable`, +`authRequired`, `timeout`, or `failed`. + +### Host Plugin JSON + +`plugins list --json` emits `schemaVersion: 1`, `kind: "hostPlugins"`, +`scope`, and `plugins`. Each plugin has `agent`, `scope`, `name`, +`locations` (absolute filesystem paths), and `drift` (`current`, `missing`, +`enablement`, `unsupported`, or `unverified`). It includes `claudeScope`, +`pluginId`, `desiredEnabled`, `installed`, `explicitEnabled`, +`effectiveEnabled`, and `diagnostic` where available. Unmanaged entries omit +`desiredEnabled`. + +`plugins sync --json` emits `schemaVersion: 1`, `kind: "hostPluginSync"`, +`scope`, `applied`, `ok`, and `results`. Each result has `preview`, current +`status` in the same shape as a list entry, `commandsRun`, and optional +`outcome` and `diagnostic`. The preview contains the initial `status`, +`commands`, and `configurationChanges`. Commands are arrays of arguments with +the executable first. `commandsRun` contains attempts, including commands +that failed. Each configuration change contains an absolute `file` path, +a `key` array of settings path segments, optional `before`, and `after`. +Configuration values use a boolean for enablement, a string array for +replacement lists, and a string for a path to append. + +A dry run sets `applied: false` and `ok: true`, leaves `commandsRun` empty, +and omits `outcome`. An applied report sets `applied: true` and uses `ok` +to report whether every result succeeded. + ## Import `import --format [--root ]` previews one explicit @@ -907,13 +968,21 @@ Each root is an explicit project directory; `--root` cannot combine with user scope. A nonexistent root is an error. Without roots, project scope uses the current directory and user scope uses HOME. +Doctor also inspects declared host plugin drift, legacy Codex shared skill +links, and collisions between standalone and effectively enabled plugin +skills. It estimates each selected agent's listing size from deduplicated +skill names and descriptions in UTF-8 bytes. The advisory threshold is +8,000 bytes by default. Claude Code accepts a nonnegative integer override +through `SLASH_COMMAND_TOOL_CHAR_BUDGET`. Governance warnings remain advisory +under `--ci`. Doctor skips governance when transaction recovery is pending. + | Scope | Declaration | Lock | Cache | | --- | --- | --- | --- | | Project | `.agent/agents.yaml` | `.agent/agents.resolved` | `.agent/cache/` | | User | `~/.agents/agents.yaml` | `~/.agents/agents.resolved` | `~/.agents/cache/` | A project commits its declaration and lock; the cache stays local. `agents.yaml` -uses the [manifest format](https://github.com/agents-tools/core/blob/25d965fa18465f60341ba81bff4a511766d7659b/Documentation/Reference/Manifest.md), +uses the [manifest format](https://github.com/agents-tools/core/blob/0.3.2/Documentation/Reference/Manifest.md), a versioned YAML mapping with required `version: 1`. Sources are named mappings; components are ordered sequences. Unknown structural fields produce located diagnostics. The declaration schema and parser are owned by core. Lifecycle @@ -1045,8 +1114,8 @@ final newline behavior; only diagnostics go to stderr. | Code | Meaning | | --- | --- | -| `0` | Success, including help/version, unchanged previews, and doctor warnings | -| `1` | Operation failure or a completed doctor report containing an error check | +| `0` | Success, including help/version, completed plugin previews, unchanged update previews, and doctor warnings | +| `1` | Operation failure, an applied plugin sync with a failed result, or a completed doctor report containing an error check | | `64` | Invalid usage, including unknown commands, options, or invalid option combinations | Unknown commands and subcommands report `Unknown command ''` and exit @@ -1061,8 +1130,9 @@ the skill `unresolved-transaction` check and both pending-recovery findings are errors. Other instruction diagnostics, including drift and missing targets, are warnings. Other skill severities are supplied by core. -A failed operation emits no successful JSON report. JSON stdout contains only -one object and a trailing newline; recovery notices remain on stderr. +A completed doctor or host plugin sync can emit a JSON report with `ok: false` +and exit 1. JSON stdout contains only one object and a trailing newline. +Recovery notices remain on stderr. ## JSON Schemas @@ -1103,6 +1173,8 @@ schema version. Diagnostic IDs are core-defined strings, not a closed enum. | `lifecycle … --json` | [Lifecycle reports](Schemas/lifecycle.schema.json) | `schemaVersion`, `kind` and fields for each command | | `install --json` | [Install](Schemas/install.schema.json) | `schemaVersion`, `scope`, `skills`, `instructions`, `components` | | `doctor --json` | [Doctor](Schemas/doctor.schema.json) | `schemaVersion`, `ok`, `roots` | +| `plugins list --json` | [Host plugin JSON contract](#host-plugin-json) | `schemaVersion`, `kind: "hostPlugins"`, `scope`, `plugins` | +| `plugins sync --json` | [Host plugin JSON contract](#host-plugin-json) | `schemaVersion`, `kind: "hostPluginSync"`, `scope`, `applied`, `ok`, `results` | | `components list --json` | [Components](Schemas/components-list.schema.json) | `schemaVersion`, `kind`, `scope`, `components` | | `import --json` | [Import](Schemas/import.schema.json) | `schemaVersion`, `kind`, `format`, `sources`, `components`, `diagnostics`, `bindings`, `resources` | | `mcp search --json` | [MCP registry search](Schemas/mcp-registry-page.schema.json) | `schemaVersion`, `servers` | @@ -1145,9 +1217,12 @@ Rows include unchanged membership and are sorted by agent ID. A missing lock means before membership is unrecorded. Regular skill file snapshots add boolean `executable`; existing `kind` and `base64` retain their meanings. These fields are optional in the schema. -Doctor checks add `kind: "skills" | "instructions" | "components"`; existing fields and IDs -remain, and instruction IDs use core's diagnostic names. Consumers distinguish -checks by `(kind, id)` because kinds may use the same ID. +Doctor checks use `kind` to identify skills, instructions, components, source +policy, organization policy, marketplace, or governance diagnostics. Consumers +distinguish checks by `(kind, id)` because kinds may use the same ID. A root +includes `skillBudgets` when estimates are available. Each budget contains +`agent`, `skills`, `utf8Bytes`, `advisoryThreshold`, and a description in +`estimate`. Roots with no estimates or pending recovery omit the property. The shared [instruction definitions](Schemas/instructions.schema.json) describe: diff --git a/sources/cli/README.md b/sources/cli/README.md index e904a36..fae2e95 100644 --- a/sources/cli/README.md +++ b/sources/cli/README.md @@ -115,10 +115,13 @@ agents components remove review --kind command agents import review.md --root /path/to/source --format claudeCommandV1 agents import review.md --root /path/to/source --format claudeCommandV1 --apply agents mcp test local-tools --binding token=TOOLS_TOKEN --json +agents plugins list --scope user --json +agents plugins sync --scope user +agents plugins sync --scope user --apply ``` Declarations live in `.agent/agents.yaml` for project scope or -`~/.agents/agents.yaml` for user scope. The [manifest format](https://github.com/agents-tools/core/blob/0.3.1/Documentation/Reference/Manifest.md) +`~/.agents/agents.yaml` for user scope. The [manifest format](https://github.com/agents-tools/core/blob/0.3.2/Documentation/Reference/Manifest.md) uses a versioned YAML mapping. `agents manifest dump --json` prints the local declaration as a JSON object with source locations without resolving sources. @@ -156,7 +159,10 @@ producer document and applies its canonical intent only with `--apply`. `mcp test` explicitly starts or contacts one selected managed MCP server and discovers its tools. Runtime bindings use repeated `--binding NAME=ENV_VAR` mappings on apply or test commands. Values are read only when Core requests that -symbolic binding and are not included in reports. See the [CLI reference](Documentation/Reference/CLI.md) +symbolic binding and are not included in reports. `plugins list` compares +declared `kind: hostPlugin` entries against observed Codex, Claude Code, and +Antigravity plugin state without running host commands; `plugins sync` previews +reconciliation and applies changes only with `--apply`. See the [CLI reference](Documentation/Reference/CLI.md) for supported profiles, selection options and report schemas. ## Requirements