ADG exposes stable JSON output for read-only plugin commands so external tools can integrate over the CLI boundary without scraping human-formatted text.
- Supported commands in this contract:
adg plugins list --jsonadg plugins status --jsonadg plugins prune --json
- On success, stdout contains exactly one valid JSON document and no human formatting, ANSI color, notes, or tips.
- On failure, diagnostics are written to stderr and the process exits non-zero. JSON error envelopes are not part of this contract.
- Existing fields documented here are stable. Future releases may add fields; callers should ignore unknown fields.
| Code | Meaning |
|---|---|
0 |
Command succeeded; stdout is complete and parseable. |
1 |
Invalid arguments, missing required input, validation/runtime error, unknown option, or command failure. |
Shape:
{
"pluginsDir": "/absolute/path/to/.agents/plugins",
"plugins": [
{
"name": "apple-skills",
"version": "1.13.2",
"source": { "type": "github", "repo": "RbBtSn0w/apple-skills" },
"sourceHash": "sha256-...",
"installedHash": "sha256-...",
"installedAt": "2026-06-26T00:00:00.000Z",
"updatedAt": "2026-06-26T00:00:00.000Z",
"path": "/absolute/path/to/.agents/plugins/RbBtSn0w__apple-skills/apple-skills",
"agents": ["claude", "codex", "antigravity"],
"contents": {
"skills": ["xcode-build-fixer"],
"agents": [],
"commands": [],
"mcp": ["xcode"],
"hooks": [],
"apps": []
},
"counts": {
"skills": 1,
"agents": 0,
"commands": 0,
"mcp": 1,
"hooks": 0,
"apps": 0
},
"partial": false,
"state": "enabled"
}
]
}Field notes:
pluginsDirand eachpathare absolute filesystem paths.sourceis ADG's lock-file provenance object.agentscontains stable agent ids, not display names. Indicates which agents can adapt this plugin's component types (for active per-agent runtime projection status, seeadg plugins status --json).contentsalways includes every component category, using empty arrays when a plugin has none of that category.countsmirrorscontentslengths.partialis true when the installed plugin has a stored partial-install selection.stateis always normalized toenabledordisabled; legacy lock entries without an explicit state are reported asenabled.
Shape:
{
"pluginsDir": "/absolute/path/to/.agents/plugins",
"scope": "user",
"targets": ["claude"],
"statuses": [
{
"id": "claude",
"displayName": "Claude Code",
"queryable": true,
"inSync": ["apple-skills"],
"missing": [],
"agentOnly": [],
"disabled": [],
"unexpectedlyEnabled": []
}
]
}Field notes:
scopeis the agent install scope:userfor--global, otherwiseproject.targetscontains the resolved target ids requested by--target; omitted--targetresolves to all registered targets.queryable: falsemeans the agent CLI could not be queried; the arrays are then empty because live state is unknown. When the CLI ran but rejected the query,queryErrorcontains its diagnostic andrecoveryCommandcontains a safe repair command when ADG recognizes the failure. Both fields are omitted when unavailable.inSyncandmissingapply only to store-enabled plugins.disabledcontains store-disabled plugins absent from the runtime as intended;unexpectedlyEnabledcontains disabled plugins still active in that runtime.agentOnlyremains reserved for runtime plugins absent from the store. Codex detailed queries additionally exposeruntimeMissingandruntimeDisabled, splitting the existingmissingarray without changing it. Other agents may omit these optional fields. Detailed queries also exposeruntimePlugins: scoped native records withid,name,installed,enabled, and optionalversion. A version on an installed record describes the native registration; a version on an available, uninstalled record describes the catalog. Missing or null native versions are omitted rather than guessed. These records do not prove which version an existing session has loaded. An older installed-only response is supported; an omittedavailablelist does not imply additional installed plugins. JSON is parsed from stdout; successful CLI warnings on stderr do not make a valid snapshot unknown. Malformed or contradictory state remains a query error. Content drift is not represented; useadg plugins syncwhen a full runtime refresh is required.
Shape:
{
"targets": ["claude", "codex", "antigravity"],
"results": [
{
"agent": "claude",
"skipped": false,
"removed": [
{ "name": "adg-deadbeef", "path": "/var/folders/.../T/adg-cache-sandbox-xyz/state/plugins" }
],
"errors": []
},
{ "agent": "codex", "skipped": false, "removed": [], "errors": [] },
{ "agent": "antigravity", "skipped": true, "removed": [], "errors": [] }
]
}Field notes:
targetscontains the resolved target ids requested by--target; omitted--targetresolves to all registered targets.skipped: truemeans either the agent's CLI wasn't available, or the agent has no persistent external registry to prune (e.g. Antigravity's file-projection model — it has nothing analogous).removedlists every ADG-owned registration (adg/adg-<hash>) actually deleted because itspathno longer exists on disk. A registration ADG didn't create, or whose directory is still there, is never listed or touched.errorscarries diagnostics for entries recognized as stale that could not be removed (the agent's CLI rejected the removal, etc) — these are not fatal; other agents/entries are still processed.