@rbbtsn0w/adg 0.6.0-beta.1 → 0.6.0-beta.11

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.
Files changed (83) hide show
  1. package/README.md +41 -9
  2. package/dist/bin/adg.js +4 -4
  3. package/dist/src/adapters/codex.js +12 -0
  4. package/dist/src/adapters/reverse.js +22 -1
  5. package/dist/src/agents/base.js +2 -1
  6. package/dist/src/agents/claude.js +52 -6
  7. package/dist/src/agents/codex.js +94 -14
  8. package/dist/src/cli/core-plugin-handlers.js +97 -0
  9. package/dist/src/cli/handlers.js +155 -210
  10. package/dist/src/cli/index.js +14 -4
  11. package/dist/src/codex-marketplace-migration.js +139 -0
  12. package/dist/src/commands/cache.js +92 -15
  13. package/dist/src/commands/inspect.js +41 -0
  14. package/dist/src/commands/install.js +140 -73
  15. package/dist/src/commands/link.js +4 -16
  16. package/dist/src/commands/marketplace.js +74 -20
  17. package/dist/src/commands/migrate.js +15 -3
  18. package/dist/src/commands/projection.js +15 -0
  19. package/dist/src/commands/select-components.js +12 -0
  20. package/dist/src/commands/state.js +4 -2
  21. package/dist/src/commands/sync.js +9 -15
  22. package/dist/src/commands/update.js +51 -10
  23. package/dist/src/commands/validate.js +9 -2
  24. package/dist/src/components.js +3 -0
  25. package/dist/src/default-dsl.js +142 -0
  26. package/dist/src/lock.js +25 -7
  27. package/dist/src/manifest.js +85 -4
  28. package/dist/src/materialize.js +5 -1
  29. package/dist/src/mcp.js +59 -0
  30. package/dist/src/paths.js +31 -4
  31. package/dist/src/render/plugins.js +7 -1
  32. package/dist/src/source-cache.js +140 -0
  33. package/dist/src/sources.js +76 -5
  34. package/dist/src/subprocess.js +53 -0
  35. package/dist/src/telemetry.js +28 -21
  36. package/dist/src/types.js +5 -1
  37. package/dist/vendor/skills/src/add.js +0 -15
  38. package/dist/vendor/skills/src/cli.js +6 -1
  39. package/dist/vendor/skills/src/git-tree.js +4 -4
  40. package/dist/vendor/skills/src/skill-lock.js +4 -3
  41. package/dist/vendor/skills/src/update.js +38 -77
  42. package/dist/vendor/skills/src/use.js +28 -4
  43. package/docs/agents-spec.md +27 -4
  44. package/docs/authoring.md +19 -2
  45. package/docs/branching-and-release.md +52 -0
  46. package/package.json +14 -3
  47. package/schemas/adg-plugin.schema.json +2 -0
  48. package/schemas/plugin-lock.schema.json +23 -1
  49. package/vendor/skills/PROVENANCE.md +2 -0
  50. package/vendor/skills/package.json +0 -144
  51. package/vendor/skills/src/add.ts +0 -2213
  52. package/vendor/skills/src/agents.ts +0 -811
  53. package/vendor/skills/src/blob.ts +0 -588
  54. package/vendor/skills/src/cli.ts +0 -391
  55. package/vendor/skills/src/constants.ts +0 -3
  56. package/vendor/skills/src/detect-agent.ts +0 -62
  57. package/vendor/skills/src/find.ts +0 -419
  58. package/vendor/skills/src/frontmatter.ts +0 -16
  59. package/vendor/skills/src/git-tree.ts +0 -36
  60. package/vendor/skills/src/git.ts +0 -277
  61. package/vendor/skills/src/install.ts +0 -91
  62. package/vendor/skills/src/installer.ts +0 -1307
  63. package/vendor/skills/src/list.ts +0 -231
  64. package/vendor/skills/src/local-lock.ts +0 -189
  65. package/vendor/skills/src/plugin-manifest.ts +0 -183
  66. package/vendor/skills/src/prompts/search-multiselect.ts +0 -387
  67. package/vendor/skills/src/providers/index.ts +0 -14
  68. package/vendor/skills/src/providers/registry.ts +0 -51
  69. package/vendor/skills/src/providers/types.ts +0 -97
  70. package/vendor/skills/src/providers/wellknown.ts +0 -812
  71. package/vendor/skills/src/remove.ts +0 -335
  72. package/vendor/skills/src/sanitize.ts +0 -65
  73. package/vendor/skills/src/self-cli.ts +0 -20
  74. package/vendor/skills/src/skill-lock.ts +0 -329
  75. package/vendor/skills/src/skills.ts +0 -316
  76. package/vendor/skills/src/source-parser.ts +0 -449
  77. package/vendor/skills/src/sync.ts +0 -478
  78. package/vendor/skills/src/telemetry.ts +0 -226
  79. package/vendor/skills/src/test-utils.ts +0 -73
  80. package/vendor/skills/src/types.ts +0 -129
  81. package/vendor/skills/src/update-source.ts +0 -90
  82. package/vendor/skills/src/update.ts +0 -821
  83. package/vendor/skills/src/use.ts +0 -682
@@ -1,4 +1,3 @@
1
- import { spawnSync } from 'child_process';
2
1
  import { existsSync, readdirSync } from 'fs';
3
2
  import { join, dirname, relative, sep } from 'path';
4
3
  import { fileURLToPath } from 'url';
@@ -16,6 +15,7 @@ import { track, getTracer } from "./telemetry.js";
16
15
  import { agents, isUniversalAgent } from "./agents.js";
17
16
  import { selfCliArgv } from "./self-cli.js";
18
17
  import { SpanKind, SpanStatusCode } from '@opentelemetry/api';
18
+ import { runSubprocessSync } from "../../../src/subprocess.js";
19
19
  const __dirname = dirname(fileURLToPath(import.meta.url));
20
20
  /**
21
21
  * ADG patch: upstream re-invokes its *built* `bin/cli.mjs` to perform an update,
@@ -24,9 +24,31 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
24
24
  * our actual TS entry, run via Node's type-stripping (Node >= 22.6), exactly how
25
25
  * `adg skills` launches the CLI. See vendor/skills/PROVENANCE.md.
26
26
  */
27
- const SELF_CLI_ENTRY = existsSync(join(__dirname, '../../../bin/adg.ts'))
28
- ? join(__dirname, '../../../bin/adg.ts')
29
- : join(__dirname, '../../../dist/bin/adg.js');
27
+ export function resolveSelfCliEntry(moduleDir = __dirname, exists = existsSync) {
28
+ const sourceEntry = join(moduleDir, '../../../bin/adg.ts');
29
+ if (exists(sourceEntry))
30
+ return sourceEntry;
31
+ return join(moduleDir, '../../../bin/adg.js');
32
+ }
33
+ const SELF_CLI_ENTRY = resolveSelfCliEntry();
34
+ function recordSelfCliEntrypointMissing() {
35
+ const tracer = getTracer();
36
+ const span = tracer.startSpan("adg", { kind: SpanKind.CLIENT });
37
+ try {
38
+ span.setAttribute("process.executable.name", "adg");
39
+ span.setAttribute("process.command_args", ["adg", "skills", "add"]);
40
+ span.setAttribute("process.exit.code", -1);
41
+ span.setAttribute("error.type", "CLI_ENTRYPOINT_NOT_FOUND");
42
+ span.recordException(new Error("CLI entrypoint not found"));
43
+ span.setStatus({
44
+ code: SpanStatusCode.ERROR,
45
+ message: "CLI entrypoint not found",
46
+ });
47
+ }
48
+ finally {
49
+ span.end();
50
+ }
51
+ }
30
52
  const RESET = '\x1b[0m';
31
53
  const BOLD = '\x1b[1m';
32
54
  const DIM = '\x1b[38;5;102m';
@@ -400,48 +422,17 @@ export async function updateGlobalSkills(options = {}) {
400
422
  console.log(`${TEXT}Updating ${safeName}...${RESET}`);
401
423
  const installUrl = buildUpdateInstallSource(update.entry);
402
424
  const cliEntry = SELF_CLI_ENTRY;
425
+ const args = ['skills', 'add', installUrl, '-g', '-y'];
403
426
  if (!existsSync(cliEntry)) {
404
427
  failCount++;
428
+ recordSelfCliEntrypointMissing();
405
429
  console.log(` ${DIM}✗ Failed to update ${safeName}: CLI entrypoint not found at ${cliEntry}${RESET}`);
406
430
  continue;
407
431
  }
408
- const tracer = getTracer();
409
- const args = ['skills', 'add', installUrl, '-g', '-y'];
410
- const result = tracer.startActiveSpan("adg", { kind: SpanKind.CLIENT }, (span) => {
411
- try {
412
- span.setAttribute("process.executable.name", "adg");
413
- span.setAttribute("process.command_args", ["adg", ...args]);
414
- const r = spawnSync(process.execPath, selfCliArgv(cliEntry, args), {
415
- stdio: ['inherit', 'pipe', 'pipe'],
416
- encoding: 'utf-8',
417
- shell: process.platform === 'win32',
418
- });
419
- if (r.pid !== undefined)
420
- span.setAttribute("process.pid", r.pid);
421
- if (r.status !== null) {
422
- span.setAttribute("process.exit.code", r.status);
423
- if (r.status !== 0) {
424
- span.setAttribute("error.type", `EXIT_CODE_${r.status}`);
425
- span.setStatus({
426
- code: SpanStatusCode.ERROR,
427
- message: `Subprocess exited with status ${r.status}`,
428
- });
429
- }
430
- }
431
- else if (r.error) {
432
- span.setAttribute("process.exit.code", -1);
433
- span.setAttribute("error.type", r.error.code || r.error.name || "SpawnError");
434
- span.recordException(r.error);
435
- span.setStatus({
436
- code: SpanStatusCode.ERROR,
437
- message: r.error.message,
438
- });
439
- }
440
- return r;
441
- }
442
- finally {
443
- span.end();
444
- }
432
+ const result = runSubprocessSync(process.execPath, selfCliArgv(cliEntry, args), {
433
+ stdio: ['inherit', 'pipe', 'pipe'],
434
+ encoding: 'utf-8',
435
+ shell: process.platform === 'win32',
445
436
  });
446
437
  if (result.status === 0) {
447
438
  successCount++;
@@ -508,6 +499,7 @@ export async function updateProjectSkills(options = {}) {
508
499
  const localLock = await readLocalLock();
509
500
  const cliEntry = SELF_CLI_ENTRY;
510
501
  if (!existsSync(cliEntry)) {
502
+ recordSelfCliEntrypointMissing();
511
503
  console.log(`${DIM}✗ CLI entrypoint not found at ${cliEntry}${RESET}`);
512
504
  return { successCount, failCount: updatable.length, foundCount: projectSkills.length };
513
505
  }
@@ -542,48 +534,16 @@ export async function updateProjectSkills(options = {}) {
542
534
  const safeName = sanitizeMetadata(skill.name);
543
535
  console.log(`${TEXT}Updating ${safeName}...${RESET}`);
544
536
  const installUrl = formatSourceInput(skill.entry.source, skill.entry.ref);
545
- const tracer = getTracer();
546
537
  // Preserve Eve subagent placement recorded at install time. The lock stores
547
538
  // '' for the root agent, which maps to the `root` keyword for `add --subagent`.
548
539
  const subagentArgs = skill.entry.subagents?.length
549
540
  ? ['--subagent', ...skill.entry.subagents.map((s) => (s === '' ? 'root' : s))]
550
541
  : [];
551
542
  const args = ['skills', 'add', installUrl, '--skill', skill.name, ...subagentArgs, '-y'];
552
- const result = tracer.startActiveSpan("adg", { kind: SpanKind.CLIENT }, (span) => {
553
- try {
554
- span.setAttribute("process.executable.name", "adg");
555
- span.setAttribute("process.command_args", ["adg", ...args]);
556
- const r = spawnSync(process.execPath, selfCliArgv(cliEntry, args), {
557
- stdio: ['inherit', 'pipe', 'pipe'],
558
- encoding: 'utf-8',
559
- shell: process.platform === 'win32',
560
- });
561
- if (r.pid !== undefined)
562
- span.setAttribute("process.pid", r.pid);
563
- if (r.status !== null) {
564
- span.setAttribute("process.exit.code", r.status);
565
- if (r.status !== 0) {
566
- span.setAttribute("error.type", `EXIT_CODE_${r.status}`);
567
- span.setStatus({
568
- code: SpanStatusCode.ERROR,
569
- message: `Subprocess exited with status ${r.status}`,
570
- });
571
- }
572
- }
573
- else if (r.error) {
574
- span.setAttribute("process.exit.code", -1);
575
- span.setAttribute("error.type", r.error.code || r.error.name || "SpawnError");
576
- span.recordException(r.error);
577
- span.setStatus({
578
- code: SpanStatusCode.ERROR,
579
- message: r.error.message,
580
- });
581
- }
582
- return r;
583
- }
584
- finally {
585
- span.end();
586
- }
543
+ const result = runSubprocessSync(process.execPath, selfCliArgv(cliEntry, args), {
544
+ stdio: ['inherit', 'pipe', 'pipe'],
545
+ encoding: 'utf-8',
546
+ shell: process.platform === 'win32',
587
547
  });
588
548
  if (result.status === 0) {
589
549
  successCount++;
@@ -652,6 +612,7 @@ export async function runUpdate(args = []) {
652
612
  }
653
613
  if (totalFail > 0) {
654
614
  console.log(`${DIM}Failed to update ${totalFail} skill(s)${RESET}`);
615
+ process.exitCode = 1;
655
616
  }
656
617
  track({
657
618
  event: 'update',
@@ -3,6 +3,9 @@ import { existsSync } from 'fs';
3
3
  import { cp, mkdir, mkdtemp, readdir, readFile, realpath, stat, writeFile } from 'fs/promises';
4
4
  import { dirname, join, normalize, relative, resolve, sep } from 'path';
5
5
  import { tmpdir } from 'os';
6
+ import { SpanKind } from '@opentelemetry/api';
7
+ import { annotateSubprocess } from "../../../src/subprocess.js";
8
+ import { getTracer } from "../../../src/telemetry.js";
6
9
  import { agents } from "./agents.js";
7
10
  import { tryBlobInstall } from "./blob.js";
8
11
  import { cloneRepo, cleanupTempDir, GitCloneError } from "./git.js";
@@ -11,6 +14,13 @@ import { getGitHubToken } from "./skill-lock.js";
11
14
  import { discoverSkills, filterSkills, getSkillDisplayName } from "./skills.js";
12
15
  import { getOwnerRepo, parseSource } from "./source-parser.js";
13
16
  import { wellKnownProvider, } from "./providers/wellknown.js";
17
+ export function agentCloseResult(code, signal) {
18
+ return {
19
+ status: code ?? (signal ? null : 1),
20
+ signal,
21
+ exitCode: code ?? 1,
22
+ };
23
+ }
14
24
  const BLOB_ALLOWED_OWNERS = ['vercel', 'vercel-labs', 'heygen-com'];
15
25
  const EXCLUDE_FILES = new Set(['metadata.json']);
16
26
  const EXCLUDE_DIRS = new Set(['.git', '__pycache__', '__pypackages__']);
@@ -259,7 +269,7 @@ export async function launchAgentInteractively(agent, prompt, spawnImpl = spawnA
259
269
  if (!config) {
260
270
  throw new UseCommandError(formatUnsupportedAgentError(agent));
261
271
  }
262
- return new Promise((resolve, reject) => {
272
+ return getTracer().startActiveSpan(config.command, { kind: SpanKind.CLIENT }, (span) => new Promise((resolve, reject) => {
263
273
  const child = spawnImpl(config.command, [...config.args, prompt], {
264
274
  stdio: 'inherit',
265
275
  });
@@ -268,19 +278,33 @@ export async function launchAgentInteractively(agent, prompt, spawnImpl = spawnA
268
278
  if (settled)
269
279
  return;
270
280
  settled = true;
281
+ annotateSubprocess(span, config.command, [...config.args, prompt], {
282
+ pid: child.pid,
283
+ status: null,
284
+ signal: null,
285
+ error,
286
+ });
287
+ span.end();
271
288
  if (error.code === 'ENOENT') {
272
289
  reject(new UseCommandError(`Could not launch ${agents[agent].displayName}: command not found: ${config.command}`));
273
290
  return;
274
291
  }
275
292
  reject(error);
276
293
  });
277
- child.on('close', (code) => {
294
+ child.on('close', (code, signal) => {
278
295
  if (settled)
279
296
  return;
280
297
  settled = true;
281
- resolve(code ?? 1);
298
+ const result = agentCloseResult(code, signal);
299
+ annotateSubprocess(span, config.command, [...config.args, prompt], {
300
+ pid: child.pid,
301
+ status: result.status,
302
+ signal: result.signal,
303
+ });
304
+ span.end();
305
+ resolve(result.exitCode);
282
306
  });
283
- });
307
+ }));
284
308
  }
285
309
  function spawnAgent(command, args) {
286
310
  return spawn(command, args, { stdio: 'inherit' });
@@ -80,7 +80,28 @@ are ADG-internal conventions, not declared in the manifest.
80
80
 
81
81
  ---
82
82
 
83
- ## 3. Packaging — manifest-driven allowlist
83
+ ## 3. Default directory DSL
84
+
85
+ When `.agents/.plugin.json` is absent, ADG recognizes only these fixed source
86
+ slots: `skills/<name>/SKILL.md`, `hooks/hooks.json`, and `.mcp.json`. At least
87
+ one valid slot is required. A skill needs non-empty frontmatter `description`;
88
+ hooks and MCP files must be valid JSON (MCP must contain an object of servers).
89
+
90
+ An explicit source manifest remains the only customization mechanism. Its
91
+ `skills`, `hooks`, and `mcpServers` fields replace the corresponding default
92
+ slot; omitted fields inherit valid defaults. A malformed inherited default slot
93
+ is an error, while an explicitly overridden slot is not interpreted. `--as` is
94
+ available only for structural sources. `--only` controls both copied payload and
95
+ runtime projection; non-interactive hooks/MCP discovery requires explicit
96
+ `--only`. Default DSL is source-root only.
97
+
98
+ Default DSL is deliberately **not** a monorepo discovery convention. A source
99
+ repository containing multiple plugins must declare every member with its own
100
+ `.agents/.plugin.json` (and may use `.agents/.marketplace.json` as its catalog).
101
+ Consumers select declared members with `--plugin` or `--all`; a source
102
+ subdirectory is never an install/inspect selector.
103
+
104
+ ## 4. Packaging — manifest-driven allowlist
84
105
 
85
106
  ADG first stores the complete declared payload in an internal source cache, then
86
107
  materializes an **effective installation** into the runtime-facing plugins
@@ -102,9 +123,11 @@ The lock records two hashes: `sourceHash` covers the complete cached payload and
102
123
  `installedHash` covers the effective selection. Runtime projections are excluded
103
124
  from both hashes so re-adapting does not churn content identity.
104
125
 
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
126
+ The cache is scoped by a stable store id under the OS-managed
127
+ system cache tree (`~/Library/Caches/adg/plugins/` on macOS,
128
+ `$XDG_CACHE_HOME/adg/plugins/` on Linux). `adg plugins cache status` reports
129
+ its contents, `cache restore` recreates missing snapshots from the exact lock
130
+ revision, `cache prune` removes orphan snapshots, and `cache clean --force` removes all
108
131
  snapshots. A missing remote snapshot must be restored with `plugins update` or
109
132
  `plugins add`; a still-available local source is used directly as fallback.
110
133
 
package/docs/authoring.md CHANGED
@@ -62,6 +62,23 @@ authoring artifact:
62
62
 
63
63
  ---
64
64
 
65
+ ## Conventional skills repositories
66
+
67
+ A repository may omit `.agents/.plugin.json` when it follows the fixed Default
68
+ DSL: `skills/<name>/SKILL.md`, `hooks/hooks.json`, and/or `.mcp.json`. ADG
69
+ derives one plugin only from the source root; it does not recursively guess
70
+ other directories.
71
+
72
+ Default DSL is not available to a member directory of a multi-plugin repository.
73
+ For a marketplace, give every member its own `.agents/.plugin.json`; consumers
74
+ select that explicit member with `--plugin` rather than by source subdirectory.
75
+
76
+ Add `.agents/.plugin.json` for non-standard paths or metadata. Its `skills`,
77
+ `hooks`, and `mcpServers` fields replace their respective defaults; omitted
78
+ fields inherit valid conventional locations. In automation, explicitly use
79
+ `--only` before enabling discovered hooks or MCP. Consumers may use `--as` only
80
+ when installing a manifest-free structural source.
81
+
65
82
  ## The `.agents/.plugin.json` DSL
66
83
 
67
84
  ```jsonc
@@ -74,7 +91,7 @@ authoring artifact:
74
91
  "author": { "name": "You", "url": "…", "email": "…" },
75
92
  "license": "MIT",
76
93
  "category": "Developer Tools",
77
- "interface": { "displayName": "ASC", "icon": "asc.png" },
94
+ "interface": { "displayName": "ASC", "shortDescription": "Ship App Store releases with asc.", "icon": "asc.png" },
78
95
 
79
96
  // ── Components: path pointers, never inlined content ──
80
97
  "skills": "./skills/", // string (root dir) | string[] (explicit paths)
@@ -108,7 +125,7 @@ authoring artifact:
108
125
  | `author` | `{ name, url?, email? }` | | |
109
126
  | `license` | string | | SPDX id, e.g. `MIT`. |
110
127
  | `category` | string | | Free-form, e.g. `Developer Tools`. |
111
- | `interface` | `{ displayName?, icon? }` | | Presentation only. |
128
+ | `interface` | `{ displayName?, shortDescription?, icon? }` | | Presentation metadata. Codex uses `shortDescription` in its plugin picker; when omitted, ADG uses the manifest `description`. |
112
129
  | `skills` | string \| string[] | | Root dir (auto-scan) or explicit skill paths. |
113
130
  | `commands` | string | | Directory of slash-command `.md` files. |
114
131
  | `agents` | string | | Directory of sub-agent `.md` files. |
@@ -0,0 +1,52 @@
1
+ # Branching and release
2
+
3
+ ADG uses `beta` as the integration branch and `main` as the stable release
4
+ branch. Feature and fix pull requests always target `beta`; the only pull
5
+ request allowed to target `main` is the maintainer promotion from `beta`.
6
+
7
+ ## Contribution flow
8
+
9
+ 1. Branch from the latest `beta`.
10
+ 2. Open a pull request back to `beta`.
11
+ 3. Pass the repository checks and review.
12
+ 4. Merge through branch protection; never push directly to `beta` or `main`.
13
+
14
+ Merges to `beta` are published by semantic-release under the `beta` npm
15
+ dist-tag. Maintainers promote a tested release set with a `beta -> main` pull
16
+ request; merging that pull request publishes the stable `latest` dist-tag.
17
+
18
+ ## Back-merge after a stable release
19
+
20
+ The release commit created on `main` must be merged back into `beta` so both
21
+ branches share the same release ancestry. The `Sync main to beta` workflow opens
22
+ a `main -> beta` pull request after successful main CI:
23
+
24
+ - A conflict-free pull request is merged automatically with a merge commit.
25
+ - A conflicting pull request receives `manual-sync-needed` and must be resolved
26
+ by a maintainer before further promotion work.
27
+ - Resolve version and changelog conflicts in favor of the stable `main` release
28
+ commit while preserving subsequent integration changes from `beta`.
29
+
30
+ The workflow never pushes directly to a protected branch. An open
31
+ `manual-sync-needed` pull request is an operational action item, not a successful
32
+ sync.
33
+
34
+ ## Local release checks
35
+
36
+ Run the same checks used by CI before opening a pull request:
37
+
38
+ ```bash
39
+ npm ci
40
+ npm run check:vendor-deps
41
+ npm run check:vendor-upstream
42
+ npm run audit:prod
43
+ npm run check:docs
44
+ npm run typecheck
45
+ npm run build
46
+ npm test
47
+ npm run check:package-smoke
48
+ ```
49
+
50
+ Release automation is defined in `.github/workflows/ci.yml` and
51
+ `.releaserc.json`. Optional Homebrew publication only runs for stable releases
52
+ when the release-bot GitHub App is configured.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbbtsn0w/adg",
3
- "version": "0.6.0-beta.1",
3
+ "version": "0.6.0-beta.11",
4
4
  "description": "Agent Directory Group (ADG) toolkit — two domains: plugins and skills.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -24,8 +24,13 @@
24
24
  "scripts": {
25
25
  "adg": "node ./bin/adg.ts",
26
26
  "build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json --noCheck && node -e \"require('fs').chmodSync('dist/bin/adg.js',0o755)\"",
27
- "test": "node --test 'test/**/*.test.ts'",
27
+ "test": "node scripts/run-tests.mjs \"test/**/*.test.ts\" test/cache-sandbox.test.mjs",
28
+ "test:codex-sandbox": "node --test test/codex-sandbox.test.mjs",
29
+ "test:cache-sandbox": "node --test test/cache-sandbox.test.mjs",
30
+ "check:docs": "node scripts/check-doc-links.mjs",
31
+ "check:package-smoke": "node scripts/check-package-smoke.mjs",
28
32
  "check:vendor-deps": "node scripts/check-vendor-deps.mjs",
33
+ "check:vendor-upstream": "node scripts/check-vendor-upstream.mjs",
29
34
  "audit:prod": "npm audit --omit=dev",
30
35
  "typecheck": "tsc --noEmit",
31
36
  "prepare": "npm run typecheck",
@@ -34,7 +39,9 @@
34
39
  "files": [
35
40
  "dist",
36
41
  "schemas",
37
- "vendor",
42
+ "vendor/skills/LICENSE",
43
+ "vendor/skills/PROVENANCE.md",
44
+ "vendor/skills/ThirdPartyNoticeText.txt",
38
45
  "docs"
39
46
  ],
40
47
  "comment:dependencies": "Runtime deps below are required only by the vendored skills CLI (vendor/skills); ADG's own plugins code has zero runtime deps. Root is the single source of truth: each range MUST be >= the floor declared in vendor/skills/package.json, since that is the version the vendored source was authored against. `npm run check:vendor-deps` enforces this and fails on drift.",
@@ -63,5 +70,9 @@
63
70
  "conventional-changelog-conventionalcommits": "^8.0.0",
64
71
  "semantic-release": "^25.0.5",
65
72
  "typescript": "^5.6.0"
73
+ },
74
+ "comment:overrides": "Security floor: npm 11 before 11.18.0 bundles vulnerable undici 6.26.0; keep npm on patched 11.x until @semantic-release/npm supports a newer major.",
75
+ "overrides": {
76
+ "npm": "^11.18.0"
66
77
  }
67
78
  }
@@ -25,6 +25,7 @@
25
25
  "description": { "type": "string", "minLength": 1 },
26
26
  "author": {
27
27
  "type": "object",
28
+ "required": ["name"],
28
29
  "properties": {
29
30
  "name": { "type": "string" },
30
31
  "url": { "type": "string" },
@@ -38,6 +39,7 @@
38
39
  "type": "object",
39
40
  "properties": {
40
41
  "displayName": { "type": "string" },
42
+ "shortDescription": { "type": "string" },
41
43
  "icon": { "type": "string" }
42
44
  },
43
45
  "additionalProperties": true
@@ -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": 3 },
10
+ "version": { "type": "integer", "description": "Lock file format version.", "enum": [3, 4, 5] },
11
11
  "plugins": {
12
12
  "type": "object",
13
13
  "additionalProperties": { "$ref": "#/$defs/lockEntry" }
@@ -30,6 +30,10 @@
30
30
  "description": "Digest of the complete cached source payload.",
31
31
  "pattern": "^[a-z0-9]+-[0-9a-f]+$"
32
32
  },
33
+ "resolvedRevision": {
34
+ "type": "string",
35
+ "description": "Immutable remote commit that produced the cached source payload."
36
+ },
33
37
  "installedHash": {
34
38
  "type": "string",
35
39
  "description": "Digest of the effective runtime installation.",
@@ -41,6 +45,24 @@
41
45
  "enum": ["enabled", "disabled"],
42
46
  "description": "Desired cross-agent projection state. Absent means enabled."
43
47
  },
48
+ "definition": {
49
+ "type": "object",
50
+ "required": ["kind", "root", "description", "fingerprint"],
51
+ "additionalProperties": false,
52
+ "properties": {
53
+ "kind": { "const": "default-dsl/v1" },
54
+ "root": { "const": "." },
55
+ "as": { "type": "string" },
56
+ "description": { "type": "string" },
57
+ "fingerprint": { "type": "string" },
58
+ "authorizedComponents": {
59
+ "type": "array",
60
+ "items": { "enum": ["skills", "agents", "commands", "mcp", "hooks", "apps"] },
61
+ "uniqueItems": true,
62
+ "description": "Structural components explicitly authorized at install time."
63
+ }
64
+ }
65
+ },
44
66
  "dependencies": {
45
67
  "type": "object",
46
68
  "additionalProperties": { "type": "string" }
@@ -80,4 +80,6 @@ re-vendoring. Each is marked inline with an `ADG patch:` comment.
80
80
  | `src/update.ts` → both `spawnSync` self-CLI re-invokes (+ new `src/self-cli.ts`) | Forward `process.execArgv`, call `skills add` instead of `add`, and wrap in OpenTelemetry CLIENT spans | The child process runs `adg skills add` inside the spawned Node context, ensuring type-stripping flags inherit properly, and OTel spans capture subprocess execution metadata. |
81
81
  | `package.json` → `@vercel/detect-agent` dependency (not a vendored-source change) | `^0.1.0` → `^1.2.3` | `src/detect-agent.ts` (upstream, unpatched) imports `AgentResult` and expects `determineAgent(): Promise<AgentResult>` (object API). The stale `0.1.0` pin only exported `determineAgent(): Promise<string \| false>` and no `AgentResult`, which broke typecheck and left `cachedResult.isAgent` always `undefined` at runtime — agent auto-detection (non-interactive mode in `add`/`sync`/`remove`/`find`/`cli`) silently never fired. The `1.x` line restores the API the fork targets, so `detect-agent.ts` needs **no** local patch. Keep this dependency on `1.x` across re-vendoring. |
82
82
  | `src/git-tree.ts` (**new ADG file**) + `src/add.ts` clone-fallback branch | github source that falls back to a `git clone` now records the git **tree SHA** (`git rev-parse HEAD:<folder>`), not a sha256 content hash | Install and update must use ONE hash scheme per source. Update-check always uses the git tree SHA; the old clone fallback stored a sha256 content hash, so those skills were re-flagged on **every** update (a collection repo appeared to "fully update" each run). `git-tree.ts` is standalone (uses `child_process`, no simple-git) so it typechecks under ADG's strict tsconfig when a test imports it. |
83
+ | `src/git-tree.ts` → `gitTreeShaForFolder` | Route the ADG-added `git rev-parse` subprocess through the root OTel CLIENT-span runner | Keeps the local fallback compliant with ADG's CLI semantic-convention policy without duplicating instrumentation inside the vendored fork. |
84
+ | `src/skill-lock.ts`, `src/update.ts`, `src/use.ts` | Route GitHub auth, self-update, and interactive agent subprocesses through the root OTel CLIENT-span runner | Enforces required exit/error attributes and privacy-safe command arguments consistently across the vendored CLI. |
83
85
  | `src/update.ts` → `updateGlobalSkills` self-heal | A github entry whose stored hash isn't a 40-hex tree SHA (legacy clone-fallback) is normalized to the current tree SHA and NOT flagged; lock rewritten once | Heals locks written before the fix above without a version bump / lock wipe, and stops the perpetual false "update". |
@@ -1,144 +0,0 @@
1
- {
2
- "name": "skills",
3
- "version": "1.5.14",
4
- "description": "The open agent skills ecosystem",
5
- "type": "module",
6
- "bin": {
7
- "skills": "./bin/cli.mjs",
8
- "add-skill": "./bin/cli.mjs"
9
- },
10
- "files": [
11
- "dist",
12
- "bin",
13
- "README.md",
14
- "ThirdPartyNoticeText.txt"
15
- ],
16
- "scripts": {
17
- "build": "node scripts/generate-licenses.ts && obuild",
18
- "generate-licenses": "node scripts/generate-licenses.ts",
19
- "dev": "node src/cli.ts",
20
- "exec:test": "node scripts/execute-tests.ts",
21
- "prepublishOnly": "npm run build",
22
- "format": "prettier --write \"src/**/*.ts\" \"scripts/**/*.ts\"",
23
- "format:check": "prettier --check \"src/**/*.ts\" \"scripts/**/*.ts\"",
24
- "prepare": "husky",
25
- "test": "vitest",
26
- "type-check": "tsc --noEmit",
27
- "publish:snapshot": "npm version prerelease --preid=snapshot --no-git-tag-version && npm publish --tag snapshot"
28
- },
29
- "lint-staged": {
30
- "src/**/*.ts": "prettier --write",
31
- "scripts/**/*.ts": "prettier --write",
32
- "tests/**/*.ts": "prettier --write"
33
- },
34
- "keywords": [
35
- "cli",
36
- "agent-skills",
37
- "skills",
38
- "ai-agents",
39
- "aider-desk",
40
- "amp",
41
- "antigravity",
42
- "antigravity-cli",
43
- "astrbot",
44
- "autohand-code",
45
- "augment",
46
- "bob",
47
- "claude-code",
48
- "openclaw",
49
- "cline",
50
- "codearts-agent",
51
- "codebuddy",
52
- "codemaker",
53
- "codestudio",
54
- "codex",
55
- "command-code",
56
- "continue",
57
- "cortex",
58
- "crush",
59
- "cursor",
60
- "deepagents",
61
- "devin",
62
- "dexto",
63
- "droid",
64
- "eve",
65
- "firebender",
66
- "forgecode",
67
- "gemini-cli",
68
- "github-copilot",
69
- "goose",
70
- "hermes-agent",
71
- "inference-sh",
72
- "jazz",
73
- "junie",
74
- "iflow-cli",
75
- "kilo",
76
- "kimi-code-cli",
77
- "kiro-cli",
78
- "kode",
79
- "lingma",
80
- "loaf",
81
- "mcpjam",
82
- "mistral-vibe",
83
- "moxby",
84
- "mux",
85
- "opencode",
86
- "openhands",
87
- "ona",
88
- "pi",
89
- "qoder",
90
- "qoder-cn",
91
- "qwen-code",
92
- "replit",
93
- "reasonix",
94
- "rovodev",
95
- "roo",
96
- "tabnine-cli",
97
- "terramind",
98
- "tinycloud",
99
- "trae",
100
- "trae-cn",
101
- "warp",
102
- "windsurf",
103
- "zed",
104
- "zencoder",
105
- "zenflow",
106
- "neovate",
107
- "pochi",
108
- "promptscript",
109
- "adal",
110
- "universal"
111
- ],
112
- "repository": {
113
- "type": "git",
114
- "url": "git+https://github.com/vercel-labs/skills.git"
115
- },
116
- "homepage": "https://github.com/vercel-labs/skills#readme",
117
- "bugs": {
118
- "url": "https://github.com/vercel-labs/skills/issues"
119
- },
120
- "author": "",
121
- "license": "MIT",
122
- "devDependencies": {
123
- "@clack/prompts": "^0.11.0",
124
- "@types/bun": "latest",
125
- "@types/node": "^22.10.0",
126
- "@vercel/detect-agent": "^1.2.1",
127
- "husky": "^9.1.7",
128
- "lint-staged": "^16.2.7",
129
- "obuild": "^0.4.22",
130
- "picocolors": "^1.1.1",
131
- "prettier": "^3.8.1",
132
- "simple-git": "^3.27.0",
133
- "typescript": "^5.9.3",
134
- "vitest": "^4.0.17",
135
- "xdg-basedir": "^5.1.0"
136
- },
137
- "engines": {
138
- "node": ">=18"
139
- },
140
- "packageManager": "pnpm@10.17.1",
141
- "dependencies": {
142
- "yaml": "^2.8.3"
143
- }
144
- }