@rbbtsn0w/adg 0.5.0-beta.5 → 0.5.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 +2 -2
- package/dist/src/agents/antigravity.js +4 -1
- package/dist/src/cli/handlers.js +45 -3
- package/dist/src/cli/index.js +17 -1
- package/dist/src/commands/cache.js +54 -0
- package/dist/src/commands/install.js +74 -52
- package/dist/src/commands/link.js +13 -9
- package/dist/src/commands/list.js +4 -1
- package/dist/src/commands/marketplace.js +8 -1
- package/dist/src/commands/migrate.js +73 -6
- package/dist/src/commands/projection.js +6 -0
- package/dist/src/commands/remove.js +11 -2
- package/dist/src/commands/select-components.js +2 -1
- package/dist/src/commands/state.js +18 -12
- package/dist/src/commands/sync.js +13 -9
- package/dist/src/commands/update.js +34 -36
- package/dist/src/fsutil.js +15 -2
- package/dist/src/lock.js +10 -6
- package/dist/src/manifest.js +52 -3
- package/dist/src/materialize.js +176 -0
- package/dist/src/paths.js +27 -1
- package/dist/src/render/json.js +2 -1
- package/dist/src/render/plugins.js +1 -1
- package/dist/src/telemetry.js +9 -0
- package/dist/src/types.js +51 -1
- package/docs/agents-spec.md +23 -12
- package/docs/cli-json.md +2 -1
- package/package.json +1 -1
- package/schemas/adg-plugin.schema.json +23 -0
- package/schemas/plugin-lock.schema.json +10 -5
package/docs/agents-spec.md
CHANGED
|
@@ -82,10 +82,12 @@ are ADG-internal conventions, not declared in the manifest.
|
|
|
82
82
|
|
|
83
83
|
## 3. Packaging — manifest-driven allowlist
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
ADG first stores the complete declared payload in an internal source cache, then
|
|
86
|
+
materializes an **effective installation** into the runtime-facing plugins
|
|
87
|
+
directory. The effective installation contains only the selected components and
|
|
88
|
+
skills; unselected conventional directories such as `hooks/` do not exist for an
|
|
89
|
+
agent to auto-load. Authoring files (`src/`, `test/`, docs, CI config, …) never
|
|
90
|
+
enter either packaged view.
|
|
89
91
|
|
|
90
92
|
The packaged file set (`src/package.ts:packagedRoots` / `packageFilter`) is:
|
|
91
93
|
|
|
@@ -93,13 +95,23 @@ The packaged file set (`src/package.ts:packagedRoots` / `packageFilter`) is:
|
|
|
93
95
|
- the top-level path segment of every declared component pointer
|
|
94
96
|
(`skills`/`commands`/`agents`/`mcpServers`/`hooks`/`apps`);
|
|
95
97
|
- canonical metadata at the root: `README*`, `LICENSE*`, `CHANGELOG*`, `NOTICE*`;
|
|
96
|
-
-
|
|
97
|
-
|
|
98
|
+
- runtime projections are never copied from the source cache; ADG regenerates
|
|
99
|
+
`.claude-plugin/`, `.codex-plugin/`, and Antigravity files in staging.
|
|
98
100
|
|
|
99
|
-
The
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
The lock records two hashes: `sourceHash` covers the complete cached payload and
|
|
102
|
+
`installedHash` covers the effective selection. Runtime projections are excluded
|
|
103
|
+
from both hashes so re-adapting does not churn content identity.
|
|
104
|
+
|
|
105
|
+
The cache is scoped by a stable store id under the store's sibling
|
|
106
|
+
`cache/plugins/` tree. `adg plugins cache status` reports its contents,
|
|
107
|
+
`cache prune` removes orphan snapshots, and `cache clean --force` removes all
|
|
108
|
+
snapshots. A missing remote snapshot must be restored with `plugins update` or
|
|
109
|
+
`plugins add`; a still-available local source is used directly as fallback.
|
|
110
|
+
|
|
111
|
+
When one selected component requires another component or a bootstrap skill, the
|
|
112
|
+
source manifest declares that closure with `selectionDependencies`. ADG expands
|
|
113
|
+
the selection before copying or hashing, so the lock, effective manifest, and
|
|
114
|
+
physical payload all describe the same installation.
|
|
103
115
|
|
|
104
116
|
A plugin needing finer exclusion *within* a component directory SHOULD use git's
|
|
105
117
|
native `.gitattributes export-ignore` rather than a bespoke ignore format.
|
|
@@ -125,7 +137,7 @@ a human or generated by an agent. Beyond JSON-schema validity it SHOULD enforce:
|
|
|
125
137
|
## 5. Migration from `.adg-plugin/`
|
|
126
138
|
|
|
127
139
|
1. Move `.adg-plugin/plugin.json` → `.agents/.plugin.json` (content unchanged).
|
|
128
|
-
2. Run `adg plugins update` so lock `
|
|
140
|
+
2. Run `adg plugins update` so lock `sourceHash` and `installedHash` values reflect the new layout.
|
|
129
141
|
3. `adg plugins validate` to confirm. (Re-run `adg plugins adapt` only if you
|
|
130
142
|
commit projections for a native registry.)
|
|
131
143
|
|
|
@@ -301,4 +313,3 @@ When support for a new agent runtime is needed:
|
|
|
301
313
|
4. **Update cross-agent matrices** (§8–§11) to include the new agent column.
|
|
302
314
|
5. **Add hook event support** in [`src/hooks.ts`](../src/hooks.ts) `SUPPORTED_EVENTS`.
|
|
303
315
|
6. **Test** via `adg plugins adapt --target <agent>` and `adg plugins validate`.
|
|
304
|
-
|
package/docs/cli-json.md
CHANGED
|
@@ -34,7 +34,8 @@ Shape:
|
|
|
34
34
|
"name": "apple-skills",
|
|
35
35
|
"version": "1.13.2",
|
|
36
36
|
"source": { "type": "github", "repo": "RbBtSn0w/apple-skills" },
|
|
37
|
-
"
|
|
37
|
+
"sourceHash": "sha256-...",
|
|
38
|
+
"installedHash": "sha256-...",
|
|
38
39
|
"installedAt": "2026-06-26T00:00:00.000Z",
|
|
39
40
|
"updatedAt": "2026-06-26T00:00:00.000Z",
|
|
40
41
|
"path": "/absolute/path/to/.agents/plugins/RbBtSn0w__apple-skills/apple-skills",
|
package/package.json
CHANGED
|
@@ -66,6 +66,29 @@
|
|
|
66
66
|
"additionalProperties": false
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
|
+
"selectionDependencies": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"description": "Mandatory payload closure for each selected component.",
|
|
72
|
+
"additionalProperties": false,
|
|
73
|
+
"patternProperties": {
|
|
74
|
+
"^(skills|agents|commands|mcp|hooks|apps)$": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"properties": {
|
|
78
|
+
"components": {
|
|
79
|
+
"type": "array",
|
|
80
|
+
"items": { "enum": ["skills", "agents", "commands", "mcp", "hooks", "apps"] },
|
|
81
|
+
"uniqueItems": true
|
|
82
|
+
},
|
|
83
|
+
"skills": {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": { "type": "string" },
|
|
86
|
+
"uniqueItems": true
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
69
92
|
"strict": {
|
|
70
93
|
"type": "boolean",
|
|
71
94
|
"description": "When true, only skills listed in the manifest are exposed; when false, the skills directory is auto-scanned.",
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"required": ["version", "plugins"],
|
|
8
8
|
"additionalProperties": false,
|
|
9
9
|
"properties": {
|
|
10
|
-
"version": { "type": "integer", "description": "Lock file format version.", "const":
|
|
10
|
+
"version": { "type": "integer", "description": "Lock file format version.", "const": 3 },
|
|
11
11
|
"plugins": {
|
|
12
12
|
"type": "object",
|
|
13
13
|
"additionalProperties": { "$ref": "#/$defs/lockEntry" }
|
|
@@ -20,14 +20,19 @@
|
|
|
20
20
|
"$defs": {
|
|
21
21
|
"lockEntry": {
|
|
22
22
|
"type": "object",
|
|
23
|
-
"required": ["origin", "version", "
|
|
23
|
+
"required": ["origin", "version", "sourceHash", "installedHash", "installedAt", "updatedAt"],
|
|
24
24
|
"additionalProperties": false,
|
|
25
25
|
"properties": {
|
|
26
26
|
"origin": { "$ref": "#/$defs/source" },
|
|
27
27
|
"version": { "type": "string" },
|
|
28
|
-
"
|
|
28
|
+
"sourceHash": {
|
|
29
29
|
"type": "string",
|
|
30
|
-
"description": "
|
|
30
|
+
"description": "Digest of the complete cached source payload.",
|
|
31
|
+
"pattern": "^[a-z0-9]+-[0-9a-f]+$"
|
|
32
|
+
},
|
|
33
|
+
"installedHash": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "Digest of the effective runtime installation.",
|
|
31
36
|
"pattern": "^[a-z0-9]+-[0-9a-f]+$"
|
|
32
37
|
},
|
|
33
38
|
"installedAt": { "type": "string", "format": "date-time" },
|
|
@@ -42,7 +47,7 @@
|
|
|
42
47
|
},
|
|
43
48
|
"selection": {
|
|
44
49
|
"type": "object",
|
|
45
|
-
"description": "Partial-install selection: which components/skills
|
|
50
|
+
"description": "Partial-install selection: which components/skills are physically materialized and exposed. Absent = install everything.",
|
|
46
51
|
"required": ["components"],
|
|
47
52
|
"additionalProperties": false,
|
|
48
53
|
"properties": {
|