@rbbtsn0w/adg 0.4.0-beta.5 → 0.4.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/src/adapters/anthropic.js +4 -2
- package/dist/src/adapters/antigravity.js +12 -10
- package/dist/src/adapters/codex.js +7 -1
- package/dist/src/adapters/index.js +3 -3
- package/dist/src/adapters/reverse.js +1 -1
- package/dist/src/agents/antigravity.js +37 -16
- package/dist/src/commands/install.js +11 -8
- package/dist/src/commands/validate.js +1 -1
- package/dist/src/components.js +3 -1
- package/dist/src/manifest.js +4 -1
- package/dist/src/mcp.js +4 -0
- package/dist/src/package.js +2 -1
- package/docs/agents-spec.md +5 -5
- package/docs/authoring.md +7 -6
- package/docs/hooks-strategy.md +1 -1
- package/package.json +1 -1
- package/schemas/adg-plugin.schema.json +1 -1
package/README.md
CHANGED
|
@@ -152,7 +152,7 @@ asc/
|
|
|
152
152
|
├── .claude-plugin/plugin.json generated by `adg plugins adapt`
|
|
153
153
|
├── .codex-plugin/plugin.json generated by `adg plugins adapt`
|
|
154
154
|
├── skills/<kebab-name>/SKILL.md
|
|
155
|
-
├── agents/ commands/ hooks/
|
|
155
|
+
├── agents/ commands/ hooks/ apps/ .mcp.json
|
|
156
156
|
└── README.md
|
|
157
157
|
```
|
|
158
158
|
|
|
@@ -2,6 +2,7 @@ import { existsSync, readdirSync, statSync } from "node:fs";
|
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { resolveProjectedSkills } from "../skills.js";
|
|
4
4
|
import { isExposed } from "../components.js";
|
|
5
|
+
import { mcpConfigPath } from "../mcp.js";
|
|
5
6
|
/**
|
|
6
7
|
* Claude auto-loads this plugin-relative path; declaring it in `manifest.hooks`
|
|
7
8
|
* duplicates the load and fails ("Duplicate hooks file detected").
|
|
@@ -78,8 +79,9 @@ export function toAnthropicManifest(pluginDir, manifest, selection) {
|
|
|
78
79
|
if (hooksFile)
|
|
79
80
|
out.hooks = hooksFile;
|
|
80
81
|
}
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
const mcp = mcpConfigPath(manifest);
|
|
83
|
+
if (mcp && isExposed(selection, "mcp"))
|
|
84
|
+
out.mcpServers = mcp;
|
|
83
85
|
if (manifest.apps && isExposed(selection, "apps"))
|
|
84
86
|
out.apps = manifest.apps;
|
|
85
87
|
// Claude's array form is already `./skills/<id>` paths, so a strict array is
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
|
+
import { isExposed } from "../components.js";
|
|
3
|
+
import { mcpConfigPath } from "../mcp.js";
|
|
2
4
|
/** Projection subdirectory that holds the self-contained agy plugin root. */
|
|
3
5
|
export const ANTIGRAVITY_PROJECTION_DIR = ".antigravity-plugin";
|
|
4
6
|
/**
|
|
5
7
|
* Generate an Antigravity (`agy`) plugin.json from an ADG manifest.
|
|
6
8
|
*
|
|
7
|
-
* Antigravity
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* path indirection. We therefore project a self-contained agy plugin root under
|
|
12
|
-
* `.antigravity-plugin/`: this pure transform emits its `plugin.json`, while the
|
|
13
|
-
* agent materializes the rest (mcp_config.json + symlinked component dirs), so a
|
|
14
|
-
* partial-install `selection` is not expressible for this target.
|
|
9
|
+
* Antigravity reads the same plugin.json MCP pointer shape as the other plugin
|
|
10
|
+
* runtimes (`mcpServers`). The agent-side projection still materializes a
|
|
11
|
+
* self-contained root for partial installs by copying the referenced file next
|
|
12
|
+
* to plugin.json and linking selected component dirs.
|
|
15
13
|
*/
|
|
16
|
-
export function toAntigravityManifest(_pluginDir, manifest,
|
|
17
|
-
|
|
14
|
+
export function toAntigravityManifest(_pluginDir, manifest, selection) {
|
|
15
|
+
const out = { name: manifest.name };
|
|
16
|
+
const mcp = mcpConfigPath(manifest);
|
|
17
|
+
if (mcp && isExposed(selection, "mcp"))
|
|
18
|
+
out.mcpServers = mcp;
|
|
19
|
+
return { defaultPath: join(ANTIGRAVITY_PROJECTION_DIR, "plugin.json"), manifest: out };
|
|
18
20
|
}
|
|
@@ -2,6 +2,7 @@ import { existsSync, readdirSync, statSync } from "node:fs";
|
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { resolveProjectedSkills } from "../skills.js";
|
|
4
4
|
import { isExposed } from "../components.js";
|
|
5
|
+
import { mcpConfigPath } from "../mcp.js";
|
|
5
6
|
/**
|
|
6
7
|
* Resolve the hooks config *file* Codex should reference. ADG declares `hooks` as
|
|
7
8
|
* a directory, but Codex (unlike Claude) has no auto-load — it needs an explicit
|
|
@@ -37,7 +38,9 @@ export function resolveCodexHooksFile(pluginDir, hooks) {
|
|
|
37
38
|
* declared as *paths* (`./skills/foo`), so they are resolved to identifiers
|
|
38
39
|
* rather than passed through. Beyond skills, Codex also consumes `hooks` — but as
|
|
39
40
|
* an explicit config *file* (no auto-load), so a declared hooks directory is
|
|
40
|
-
* resolved to its Codex-variant file via `resolveCodexHooksFile`.
|
|
41
|
+
* resolved to its Codex-variant file via `resolveCodexHooksFile`. ADG uses
|
|
42
|
+
* Codex's `mcpServers` key as the canonical MCP config pointer, so that field
|
|
43
|
+
* passes through under the same runtime key.
|
|
41
44
|
*/
|
|
42
45
|
export function toCodexManifest(pluginDir, manifest, selection) {
|
|
43
46
|
// Codex's array form is bare ids, so a strict skills *array* is resolved to
|
|
@@ -60,5 +63,8 @@ export function toCodexManifest(pluginDir, manifest, selection) {
|
|
|
60
63
|
if (hooksFile)
|
|
61
64
|
out.hooks = hooksFile;
|
|
62
65
|
}
|
|
66
|
+
const mcp = mcpConfigPath(manifest);
|
|
67
|
+
if (mcp && isExposed(selection, "mcp"))
|
|
68
|
+
out.mcpServers = mcp;
|
|
63
69
|
return { defaultPath: join(".codex-plugin", "plugin.json"), manifest: out };
|
|
64
70
|
}
|
|
@@ -16,15 +16,15 @@ export const ADAPTER_TARGETS = ["claude", "codex", "antigravity"];
|
|
|
16
16
|
/**
|
|
17
17
|
* Component categories each adapter target can actually express, mirroring what
|
|
18
18
|
* the adapters emit: the Claude manifest carries skills/agents/commands/hooks/mcp
|
|
19
|
-
* plus apps (`toAnthropicManifest`), while Codex consumes skills
|
|
19
|
+
* plus apps (`toAnthropicManifest`), while Codex consumes skills/hooks/mcp
|
|
20
20
|
* (`toCodexManifest`). Antigravity (`agy`) discovers components by convention
|
|
21
|
-
* (skills/agents/commands/hooks dirs +
|
|
21
|
+
* (skills/agents/commands/hooks dirs + plugin.json pointers) and does not surface
|
|
22
22
|
* apps, so apps maps only to the Claude target. Used to derive which agents a
|
|
23
23
|
* plugin is adaptable to from its exposed component types.
|
|
24
24
|
*/
|
|
25
25
|
export const ADAPTER_COMPONENTS = {
|
|
26
26
|
claude: ["skills", "agents", "commands", "hooks", "mcp", "apps"],
|
|
27
|
-
codex: ["skills", "hooks"],
|
|
27
|
+
codex: ["skills", "hooks", "mcp"],
|
|
28
28
|
antigravity: ["skills", "agents", "commands", "hooks", "mcp"],
|
|
29
29
|
};
|
|
30
30
|
export { toAnthropicManifest, toCodexManifest, toAntigravityManifest };
|
|
@@ -35,7 +35,7 @@ export function fromNativeManifest(raw, kind) {
|
|
|
35
35
|
copyIfString(n, out, "commands");
|
|
36
36
|
copyIfString(n, out, "agents");
|
|
37
37
|
copyIfString(n, out, "hooks");
|
|
38
|
-
copyIfString(n, out, "
|
|
38
|
+
copyIfString(n, out, "mcpServers");
|
|
39
39
|
copyIfString(n, out, "apps");
|
|
40
40
|
if (typeof n.author === "object" && n.author !== null) {
|
|
41
41
|
manifest.author = n.author;
|
|
@@ -8,16 +8,16 @@ import { isExposed } from "../components.js";
|
|
|
8
8
|
import { installedPluginDir, lockPath } from "../paths.js";
|
|
9
9
|
import { readLock } from "../lock.js";
|
|
10
10
|
import { ANTIGRAVITY_PROJECTION_DIR } from "../adapters/antigravity.js";
|
|
11
|
+
import { mcpConfigPath } from "../mcp.js";
|
|
11
12
|
import { makeCli, skippedResult } from "./base.js";
|
|
12
13
|
/**
|
|
13
14
|
* Antigravity (`agy`) agent.
|
|
14
15
|
*
|
|
15
16
|
* Antigravity discovers a plugin by convention relative to the directory handed
|
|
16
17
|
* to `agy plugin install` — `plugin.json` plus sibling `skills/`, `agents/`,
|
|
17
|
-
* `commands/`, `hooks/` dirs
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* (the ADG `mcp/.mcp.json` shape is exactly agy's, so it passes through) and
|
|
18
|
+
* `commands/`, `hooks/` dirs plus plugin.json path pointers. We therefore
|
|
19
|
+
* project a self-contained agy plugin root under `<store>/.antigravity-plugin/`:
|
|
20
|
+
* generated `plugin.json` + copied MCP config (when selected) and
|
|
21
21
|
* *symlinks* to the real component dirs one level up, so nothing is duplicated
|
|
22
22
|
* on disk. agy follows these symlinks; where the platform forbids them (e.g.
|
|
23
23
|
* Windows without privilege) we fall back to a copy. We then drive
|
|
@@ -76,11 +76,23 @@ function linkOrCopy(linkPath, absTarget) {
|
|
|
76
76
|
cpSync(absTarget, linkPath, { recursive: true });
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
+
/** Link a file with a relative symlink, copying instead when symlinks fail. */
|
|
80
|
+
function linkFileOrCopy(linkPath, absTarget) {
|
|
81
|
+
rmSync(linkPath, { force: true });
|
|
82
|
+
ensureDir(dirname(linkPath));
|
|
83
|
+
try {
|
|
84
|
+
symlinkSync(relative(dirname(linkPath), absTarget), linkPath, "file");
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
cpSync(absTarget, linkPath);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
79
90
|
/**
|
|
80
91
|
* Build the agy-native projection under `<dir>/.antigravity-plugin/`: a
|
|
81
|
-
* `plugin.json
|
|
82
|
-
*
|
|
83
|
-
*
|
|
92
|
+
* `plugin.json`, an MCP config file copied verbatim from the manifest's
|
|
93
|
+
* `mcpServers` pointer when present, an agy-conventional `mcp_config.json` link
|
|
94
|
+
* to that file, and relative symlinks (copy fallback) to the declared component
|
|
95
|
+
* dirs named for agy's convention.
|
|
84
96
|
*
|
|
85
97
|
* An optional `selection` (the plugin's partial install) narrows what is
|
|
86
98
|
* projected: component categories outside it are dropped, and `skills` is pinned
|
|
@@ -92,16 +104,25 @@ export function writeAntigravityProjection(dir, selection) {
|
|
|
92
104
|
const manifest = readManifest(dir);
|
|
93
105
|
const stage = join(dir, ANTIGRAVITY_PROJECTION_DIR);
|
|
94
106
|
ensureDir(stage);
|
|
95
|
-
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
if (
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
107
|
+
rmSync(join(stage, "mcp_config.json"), { force: true });
|
|
108
|
+
const mcp = mcpConfigPath(manifest);
|
|
109
|
+
const pluginJson = { name: manifest.name };
|
|
110
|
+
if (mcp && isExposed(selection, "mcp")) {
|
|
111
|
+
pluginJson.mcpServers = mcp;
|
|
112
|
+
const mcpFile = join(dir, mcp);
|
|
113
|
+
const projectedMcp = join(stage, mcp);
|
|
114
|
+
rmSync(projectedMcp, { force: true });
|
|
115
|
+
ensureDir(dirname(projectedMcp));
|
|
116
|
+
// Copy verbatim — preserving formatting and avoiding a parse/re-serialize round-trip.
|
|
117
|
+
if (existsSync(mcpFile)) {
|
|
118
|
+
cpSync(mcpFile, projectedMcp);
|
|
119
|
+
linkFileOrCopy(join(stage, "mcp_config.json"), projectedMcp);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
rmSync(join(stage, mcp || ".mcp.json"), { force: true });
|
|
104
124
|
}
|
|
125
|
+
writeJson(join(stage, "plugin.json"), pluginJson);
|
|
105
126
|
const skillsDir = join(stage, "skills");
|
|
106
127
|
rmSync(skillsDir, { recursive: true, force: true });
|
|
107
128
|
if (manifest.skills !== undefined && isExposed(selection, "skills")) {
|
|
@@ -284,15 +284,18 @@ export async function addPlugins(opts) {
|
|
|
284
284
|
const resolved = opts.agents ?? resolveAgents(targets);
|
|
285
285
|
const scope = opts.scope ?? "project";
|
|
286
286
|
const ctxFor = (names) => ({ pluginsDir: opts.pluginsDir, plugins: names, scope });
|
|
287
|
-
// A "changed" plugin is either brand new (no prior lock entry) or an update
|
|
288
|
-
// to an already-installed one. Only updates go through refresh — agents that
|
|
289
|
-
// cache a copy (Claude) must drop the stale one and re-pull. Brand-new
|
|
290
|
-
// plugins must use activate: refresh would issue an uninstall for something
|
|
291
|
-
// never installed, which warns/errors in those agents. On the add path
|
|
292
|
-
// (skipUnchanged off) everything is a fresh activate.
|
|
293
|
-
const activateNames = (opts.skipUnchanged ? toActivate.filter((r) => !existingPlugins.has(r.name)) : toActivate).map((r) => r.name);
|
|
294
|
-
const refreshNames = opts.skipUnchanged ? toActivate.filter((r) => existingPlugins.has(r.name)).map((r) => r.name) : [];
|
|
295
287
|
agents = resolved.map((a) => {
|
|
288
|
+
const agentInstalled = a.listInstalled?.(ctxFor([]));
|
|
289
|
+
const alreadyInstalled = (name) => agentInstalled !== undefined
|
|
290
|
+
? agentInstalled.includes(name)
|
|
291
|
+
: existingPlugins.has(name);
|
|
292
|
+
// Existing plugins must go through refresh even on an explicit `add`:
|
|
293
|
+
// agents like Claude cache an installed copy, and their plain install
|
|
294
|
+
// command is a no-op when the plugin already exists. If the agent can
|
|
295
|
+
// enumerate live installs, trust that state; otherwise fall back to the
|
|
296
|
+
// ADG lock to preserve clean-update behavior.
|
|
297
|
+
const activateNames = toActivate.filter((r) => !alreadyInstalled(r.name)).map((r) => r.name);
|
|
298
|
+
const refreshNames = toActivate.filter((r) => alreadyInstalled(r.name)).map((r) => r.name);
|
|
296
299
|
// An agent may run both lifecycles (new installs + updates) in one pass;
|
|
297
300
|
// merge into the existing affected/skipped contract so downstream report
|
|
298
301
|
// and consolidation (renderAgentReport, mergeAgentResults) stay unchanged.
|
|
@@ -27,7 +27,7 @@ export function validatePlugin(pluginDir) {
|
|
|
27
27
|
["commands", m.commands],
|
|
28
28
|
["apps", m.apps],
|
|
29
29
|
["hooks", m.hooks],
|
|
30
|
-
["
|
|
30
|
+
["mcpServers", m.mcpServers],
|
|
31
31
|
];
|
|
32
32
|
for (const [field, value] of pathFields) {
|
|
33
33
|
if (typeof value === "string" && !existsSync(join(pluginDir, value))) {
|
package/dist/src/components.js
CHANGED
|
@@ -2,6 +2,7 @@ import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
|
2
2
|
import { basename, join } from "node:path";
|
|
3
3
|
import { resolveSkills } from "./skills.js";
|
|
4
4
|
import { COMPONENT_TYPES } from "./types.js";
|
|
5
|
+
import { mcpConfigPath } from "./mcp.js";
|
|
5
6
|
export { COMPONENT_TYPES };
|
|
6
7
|
/** Recursively collect regular (non-dotfile) file basenames, without extension. */
|
|
7
8
|
function collectFiles(dir) {
|
|
@@ -53,13 +54,14 @@ function mcpServers(file) {
|
|
|
53
54
|
}
|
|
54
55
|
/** Enumerate what a plugin contains, by reading its manifest's component paths. */
|
|
55
56
|
export function pluginContents(dir, manifest) {
|
|
57
|
+
const mcp = mcpConfigPath(manifest);
|
|
56
58
|
return {
|
|
57
59
|
skills: resolveSkills(dir, manifest),
|
|
58
60
|
agents: membersOf(dir, manifest.agents),
|
|
59
61
|
commands: membersOf(dir, manifest.commands),
|
|
60
62
|
apps: membersOf(dir, manifest.apps),
|
|
61
63
|
hooks: membersOf(dir, manifest.hooks),
|
|
62
|
-
mcp:
|
|
64
|
+
mcp: mcp ? mcpServers(join(dir, mcp)) : [],
|
|
63
65
|
};
|
|
64
66
|
}
|
|
65
67
|
/** Component types this plugin actually has (non-empty). */
|
package/dist/src/manifest.js
CHANGED
|
@@ -75,7 +75,10 @@ export function collectIssues(raw) {
|
|
|
75
75
|
if (m.skills !== undefined && typeof m.skills !== "string" && !isStringArray(m.skills)) {
|
|
76
76
|
issues.push("skills must be a string or an array of strings");
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
if (m.mcp !== undefined) {
|
|
79
|
+
issues.push("mcp is not supported; use mcpServers");
|
|
80
|
+
}
|
|
81
|
+
for (const key of ["agents", "commands", "apps", "hooks", "mcpServers", "homepage", "changelog", "license", "category"]) {
|
|
79
82
|
if (m[key] !== undefined && typeof m[key] !== "string") {
|
|
80
83
|
issues.push(`${key} must be a string`);
|
|
81
84
|
}
|
package/dist/src/mcp.js
ADDED
package/dist/src/package.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { mcpConfigPath } from "./mcp.js";
|
|
1
2
|
/**
|
|
2
3
|
* Manifest-driven packaging allowlist.
|
|
3
4
|
*
|
|
@@ -29,7 +30,7 @@ export function packagedRoots(manifest) {
|
|
|
29
30
|
manifest.skills,
|
|
30
31
|
manifest.agents,
|
|
31
32
|
manifest.commands,
|
|
32
|
-
manifest
|
|
33
|
+
mcpConfigPath(manifest),
|
|
33
34
|
manifest.hooks,
|
|
34
35
|
manifest.apps,
|
|
35
36
|
];
|
package/docs/agents-spec.md
CHANGED
|
@@ -19,7 +19,7 @@ asc/ # a plugin (authoring source)
|
|
|
19
19
|
├── .agents/
|
|
20
20
|
│ └── .plugin.json # canonical source manifest (source of truth)
|
|
21
21
|
├── skills/<name>/SKILL.md # declared payload
|
|
22
|
-
├── commands/ agents/ mcp
|
|
22
|
+
├── commands/ agents/ .mcp.json # declared payload
|
|
23
23
|
└── README.md LICENSE CHANGELOG # canonical metadata
|
|
24
24
|
# .claude-plugin/ , .codex-plugin/ are NOT authored here — they are runtime
|
|
25
25
|
# projections, generated at install time (or committed only when publishing to a
|
|
@@ -69,7 +69,7 @@ every projection. See the schema for the full field set; the load-bearing fields
|
|
|
69
69
|
"skills": "./skills/", // string (dir) | array (explicit)
|
|
70
70
|
"commands": "./commands/",
|
|
71
71
|
"agents": "./agents/",
|
|
72
|
-
"
|
|
72
|
+
"mcpServers": "./.mcp.json",
|
|
73
73
|
"dependencies": [{ "name": "github-cr", "version": "^0.2.0" }],
|
|
74
74
|
"strict": true
|
|
75
75
|
}
|
|
@@ -90,8 +90,8 @@ consistent with the content hash.
|
|
|
90
90
|
The packaged file set (`src/package.ts:packagedRoots` / `packageFilter`) is:
|
|
91
91
|
|
|
92
92
|
- the `.agents/` manifest home (and legacy `.adg-plugin/` during deprecation);
|
|
93
|
-
- the top-level
|
|
94
|
-
(`skills`/`commands`/`agents`/`
|
|
93
|
+
- the top-level path segment of every declared component pointer
|
|
94
|
+
(`skills`/`commands`/`agents`/`mcpServers`/`hooks`/`apps`);
|
|
95
95
|
- canonical metadata at the root: `README*`, `LICENSE*`, `CHANGELOG*`, `NOTICE*`;
|
|
96
96
|
- the runtime projections `.claude-plugin/`, `.codex-plugin/` when present (copy
|
|
97
97
|
only) — at install they are regenerated into the destination regardless.
|
|
@@ -112,7 +112,7 @@ native `.gitattributes export-ignore` rather than a bespoke ignore format.
|
|
|
112
112
|
a human or generated by an agent. Beyond JSON-schema validity it SHOULD enforce:
|
|
113
113
|
|
|
114
114
|
- **Pointer integrity** — every path pointer (`skills`/`commands`/`agents`/
|
|
115
|
-
`
|
|
115
|
+
`mcpServers`/`hooks`/`apps`) resolves; every referenced `SKILL.md` has a non-empty
|
|
116
116
|
`name` and `description`.
|
|
117
117
|
- **Projection sync** — *if* a source repo commits projections (to publish to a
|
|
118
118
|
native registry), they must match a fresh projection of the current
|
package/docs/authoring.md
CHANGED
|
@@ -35,7 +35,7 @@ A finished plugin on disk — **`.agents/` only**:
|
|
|
35
35
|
my-plugin/
|
|
36
36
|
├── .agents/.plugin.json # ← source of truth (you edit this)
|
|
37
37
|
├── skills/<name>/SKILL.md # payload
|
|
38
|
-
├── commands/ agents/ mcp
|
|
38
|
+
├── commands/ agents/ .mcp.json # payload (only if declared!)
|
|
39
39
|
└── README.md LICENSE CHANGELOG
|
|
40
40
|
```
|
|
41
41
|
|
|
@@ -82,7 +82,7 @@ authoring artifact:
|
|
|
82
82
|
"agents": "./agents/", // string (dir)
|
|
83
83
|
"hooks": "./hooks/", // string (dir)
|
|
84
84
|
"apps": "./apps/", // string (dir)
|
|
85
|
-
"
|
|
85
|
+
"mcpServers": "./.mcp.json", // string (file)
|
|
86
86
|
|
|
87
87
|
"dependencies": [{ "name": "github-cr", "version": "^0.2.0" }],
|
|
88
88
|
"strict": true, // default true (see Skills)
|
|
@@ -114,7 +114,7 @@ authoring artifact:
|
|
|
114
114
|
| `agents` | string | | Directory of sub-agent `.md` files. |
|
|
115
115
|
| `hooks` | string | | Directory of lifecycle hooks. |
|
|
116
116
|
| `apps` | string | | Directory of third-party app integration config. |
|
|
117
|
-
| `
|
|
117
|
+
| `mcpServers` | string | | Path to an MCP config file (e.g. `./.mcp.json`). |
|
|
118
118
|
| `dependencies` | `[{ name, version }]` | | Other plugins required; `version` is a semver range. |
|
|
119
119
|
| `strict` | boolean | | Default `true`. See **Skills**. |
|
|
120
120
|
| `homepage`, `changelog` | string | | |
|
|
@@ -152,7 +152,7 @@ Two ways to declare them:
|
|
|
152
152
|
|
|
153
153
|
- **commands** — `"./commands/"`, a dir of slash-command markdown files.
|
|
154
154
|
- **agents** — `"./agents/"`, a dir of sub-agent definition `.md` files.
|
|
155
|
-
- **
|
|
155
|
+
- **mcpServers** — `"./.mcp.json"`, an MCP server config file (points at a *file*,
|
|
156
156
|
not a dir).
|
|
157
157
|
- **hooks**, **apps** — directories, same pattern. For hooks, see **Hooks**
|
|
158
158
|
below — agents differ on the hook config format, so ADG can compile a single
|
|
@@ -345,8 +345,9 @@ files.
|
|
|
345
345
|
|
|
346
346
|
1. `.agents/.plugin.json` exists and is valid JSON;
|
|
347
347
|
2. structural validity (required fields, kebab `name`, semver `version`, types);
|
|
348
|
-
3. **every declared path exists** (`agents`/`commands`/`apps`/`hooks
|
|
349
|
-
or files; the `skills` root, or each explicit skill
|
|
348
|
+
3. **every declared path exists** (`agents`/`commands`/`apps`/`hooks` dirs
|
|
349
|
+
or files; the `mcpServers` file; the `skills` root, or each explicit skill
|
|
350
|
+
path).
|
|
350
351
|
|
|
351
352
|
Typical failures:
|
|
352
353
|
|
package/docs/hooks-strategy.md
CHANGED
|
@@ -71,7 +71,7 @@ hook handling (a small `HookTranslation` per target, near the adapter resolvers
|
|
|
71
71
|
2. the manifest is also **ADG's own control plane** — `dependencies`, `strict`, partial-install selection,
|
|
72
72
|
and `.plugin-lock.json` integrity all key off it. Hooks carried no such ADG-internal role.
|
|
73
73
|
|
|
74
|
-
Its **projection mapping** (skills/commands/agents/hooks/
|
|
74
|
+
Its **projection mapping** (skills/commands/agents/hooks/mcpServers → per-agent) shares the hooks risk and would
|
|
75
75
|
lose value if vendors converge; its **control-plane core** does not.
|
|
76
76
|
|
|
77
77
|
## Revisit triggers
|
package/package.json
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"commands": { "type": "string", "description": "Slash command directory." },
|
|
54
54
|
"apps": { "type": "string", "description": "Third-party app integration config." },
|
|
55
55
|
"hooks": { "type": "string", "description": "Lifecycle hooks directory." },
|
|
56
|
-
"
|
|
56
|
+
"mcpServers": { "type": "string", "description": "MCP config file path." },
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"type": "array",
|
|
59
59
|
"items": {
|