@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.
@@ -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
- When a plugin is installed (copied/cloned), only its **declared payload** ships;
86
- the authoring repo's dev files (`src/`, `test/`, `docs/`, CI config, …) are left
87
- behind. This is default-deny — safer (no accidental secret/dev-file leakage) and
88
- consistent with the content hash.
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
- - the runtime projections `.claude-plugin/`, `.codex-plugin/` when present (copy
97
- only) — at install they are regenerated into the destination regardless.
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 **same** allowlist drives both the copy (`copyPluginDir`) and the content
100
- hash (`folderHash`), so an in-place plugin (copy skipped) and a copied install
101
- hash identically. Projections are excluded from the hash so re-adapting does not
102
- churn it.
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 `folderHash` values reflect the new layout.
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
- "folderHash": "sha256-...",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbbtsn0w/adg",
3
- "version": "0.5.0-beta.5",
3
+ "version": "0.5.0-beta.6",
4
4
  "description": "Agent Directory Group (ADG) toolkit — two domains: plugins and skills.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -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": 2 },
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", "folderHash", "installedAt", "updatedAt"],
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
- "folderHash": {
28
+ "sourceHash": {
29
29
  "type": "string",
30
- "description": "Self-describing content digest, e.g. sha256-<hex>.",
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 the generated manifests expose. Absent = expose everything.",
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": {