@vibe-agent-toolkit/cli 0.1.39-rc.12 → 0.1.39-rc.14

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 (39) hide show
  1. package/dist/commands/audit.d.ts.map +1 -1
  2. package/dist/commands/audit.js +9 -106
  3. package/dist/commands/audit.js.map +1 -1
  4. package/dist/commands/claude/plugin/build.d.ts +39 -0
  5. package/dist/commands/claude/plugin/build.d.ts.map +1 -1
  6. package/dist/commands/claude/plugin/build.js +75 -65
  7. package/dist/commands/claude/plugin/build.js.map +1 -1
  8. package/dist/commands/corpus/seed.d.ts +12 -12
  9. package/dist/commands/skill/review.d.ts.map +1 -1
  10. package/dist/commands/skill/review.js +6 -39
  11. package/dist/commands/skill/review.js.map +1 -1
  12. package/dist/commands/skill/test/run.d.ts +44 -2
  13. package/dist/commands/skill/test/run.d.ts.map +1 -1
  14. package/dist/commands/skill/test/run.js +163 -39
  15. package/dist/commands/skill/test/run.js.map +1 -1
  16. package/dist/commands/skills/build.d.ts.map +1 -1
  17. package/dist/commands/skills/build.js +4 -23
  18. package/dist/commands/skills/build.js.map +1 -1
  19. package/dist/skill-resolution/classify.d.ts +28 -0
  20. package/dist/skill-resolution/classify.d.ts.map +1 -0
  21. package/dist/skill-resolution/classify.js +58 -0
  22. package/dist/skill-resolution/classify.js.map +1 -0
  23. package/dist/skill-resolution/index.d.ts +5 -0
  24. package/dist/skill-resolution/index.d.ts.map +1 -0
  25. package/dist/skill-resolution/index.js +4 -0
  26. package/dist/skill-resolution/index.js.map +1 -0
  27. package/dist/skill-resolution/packaging-config.d.ts +31 -0
  28. package/dist/skill-resolution/packaging-config.d.ts.map +1 -0
  29. package/dist/skill-resolution/packaging-config.js +72 -0
  30. package/dist/skill-resolution/packaging-config.js.map +1 -0
  31. package/dist/skill-resolution/resolve-skill-reference.d.ts +3 -0
  32. package/dist/skill-resolution/resolve-skill-reference.d.ts.map +1 -0
  33. package/dist/skill-resolution/resolve-skill-reference.js +106 -0
  34. package/dist/skill-resolution/resolve-skill-reference.js.map +1 -0
  35. package/dist/skill-resolution/types.d.ts +59 -0
  36. package/dist/skill-resolution/types.d.ts.map +1 -0
  37. package/dist/skill-resolution/types.js +7 -0
  38. package/dist/skill-resolution/types.js.map +1 -0
  39. package/package.json +11 -11
@@ -0,0 +1,72 @@
1
+ import { findProjectRoot, safePath } from '@vibe-agent-toolkit/utils';
2
+ import { discoverSkillsFromConfig } from '../commands/skills/skill-discovery.js';
3
+ import { loadConfigCached } from '../utils/config-loader.js';
4
+ import { mergeSkillPackagingConfig } from '../utils/skill-packaging-config.js';
5
+ /** configRoot → (abs SKILL.md path → declared skill name). One expansion per root. */
6
+ const skillDiscoveryCache = new Map();
7
+ /** Clear the per-root discovery cache (call when fixtures mutate between in-process runs). */
8
+ export function resetSkillDiscoveryCache() {
9
+ skillDiscoveryCache.clear();
10
+ }
11
+ export async function getDiscoveredSkillsByPath(skillsSection, configRoot) {
12
+ const cached = skillDiscoveryCache.get(configRoot);
13
+ if (cached !== undefined)
14
+ return cached;
15
+ const map = new Map();
16
+ if (skillsSection !== undefined) {
17
+ const discovered = await discoverSkillsFromConfig(skillsSection, configRoot);
18
+ for (const entry of discovered) {
19
+ map.set(safePath.resolve(entry.sourcePath), entry.name);
20
+ }
21
+ }
22
+ skillDiscoveryCache.set(configRoot, map);
23
+ return map;
24
+ }
25
+ /**
26
+ * Resolve the merged packaging config for one SKILL.md by walking UP to its
27
+ * nearest-ancestor config and matching the skill by absolute path. Returns the
28
+ * FULL merge (`skills.defaults` + `skills.config[name]`, keeping
29
+ * `validation.allow`). `null` when there is no governing config, no `skills`
30
+ * section, or the skill is not declared (wild mode).
31
+ */
32
+ export async function resolveSkillPackagingConfig(skillPath) {
33
+ const absSkillPath = safePath.resolve(skillPath);
34
+ const skillDir = safePath.resolve(safePath.join(absSkillPath, '..'));
35
+ const projectRoot = findProjectRoot(skillDir);
36
+ if (projectRoot === null)
37
+ return null;
38
+ const config = loadConfigCached(projectRoot);
39
+ if (config?.skills === undefined)
40
+ return null;
41
+ let matchedName;
42
+ try {
43
+ const byPath = await getDiscoveredSkillsByPath(config.skills, projectRoot);
44
+ matchedName = byPath.get(absSkillPath);
45
+ }
46
+ catch {
47
+ return null;
48
+ }
49
+ if (matchedName === undefined)
50
+ return null;
51
+ const { defaults, config: perSkillConfig } = config.skills;
52
+ return mergeSkillPackagingConfig(defaults, perSkillConfig?.[matchedName]);
53
+ }
54
+ /**
55
+ * Audit's display variant: keep `validation.severity`, drop `validation.allow`
56
+ * (audit shows every finding, including ones an `allow` entry would suppress).
57
+ * Drops `validation` entirely when no severity is present.
58
+ */
59
+ export function stripValidationAllowForDisplay(config) {
60
+ const out = {};
61
+ for (const [key, value] of Object.entries(config)) {
62
+ if (value !== undefined && key !== 'validation') {
63
+ out[key] = value;
64
+ }
65
+ }
66
+ const validation = config.validation;
67
+ if (validation?.severity !== undefined) {
68
+ out['validation'] = { severity: validation.severity };
69
+ }
70
+ return out;
71
+ }
72
+ //# sourceMappingURL=packaging-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"packaging-config.js","sourceRoot":"","sources":["../../src/skill-resolution/packaging-config.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAmB,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAE/E,sFAAsF;AACtF,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAA+B,CAAC;AAEnE,8FAA8F;AAC9F,MAAM,UAAU,wBAAwB;IACtC,mBAAmB,CAAC,KAAK,EAAE,CAAC;AAC9B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,aAAmE,EACnE,UAAkB;IAElB,MAAM,MAAM,G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ACzC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,WAAW,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IAE3C,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3D,OAAO,yBAAyB,CAC9B,QAA+C,EAC/C,cAAc,EAAE,CAAC,WAAW,CAAwC,CACrE,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,8BAA8B,CAAC,MAA4B;IACzE,MAAM,GAAG,GAAyB,EAAE,CAAC;IACrC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,IAAI,KAAK,KAAK,SAAS,IAAI,GAAG,KAAK,YAAY,EAAE,CAAC;YAC/C,GAA+B,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAChD,CAAC;IACH,CAAC;IACD,MAAM,UAAU,GAAI,MAAmE,CAAC,UAAU,CAAC;IACnG,IAAI,UAAU,EAAE,QAAQ,KAAK,SAAS,EAAE,CAAC;QACtC,GAA+B,CAAC,YAAY,CAAC,GAAG,EAAE,QAAQ,EAAE,UAAU,CAAC,QAAQ,EAAE,CAAC;IACrF,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { SkillReference } from './types.js';
2
+ export declare function resolveSkillReference(ref: string, cwd: string): Promise<SkillReference>;
3
+ //# sourceMappingURL=resolve-skill-reference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-skill-reference.d.ts","sourceRoot":"","sources":["../../src/skill-resolution/resolve-skill-reference.ts"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAyC,cAAc,EAAE,MAAM,YAAY,CAAC;AAOxF,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CA+C7F"}
@@ -0,0 +1,106 @@
1
+ /**
2
+ * resolveSkillReference — the project-aware front door for resolving a skill
3
+ * reference (the `vat skill test run` subject; also the shared classifier `audit`
4
+ * and `skill review` build on for per-skill config).
5
+ *
6
+ * THIS IS THE CANONICAL ENTRY POINT for "take a skill by name or path." Route
7
+ * every command that accepts a skill reference through it (mirrors the
8
+ * `resolveAssetReference` rule for config file references). Do NOT write a
9
+ * parallel path-only resolver — that is the bug this module exists to prevent.
10
+ *
11
+ * Accepted grammar (subject and `--with` share it):
12
+ * <bare-name> | <path> | workspace:<pkg> | npm:<spec> | url:<u> | path:<dir> | vendored
13
+ *
14
+ * Two-consumer contract:
15
+ * - `vat skill test` calls this directly and BUILDS `buildable` results, then
16
+ * stages + tests the dist.
17
+ * - `audit` / `skill review` use {@link resolveSkillPackagingConfig} (re-exported
18
+ * here) to classify + validate SOURCE; they never materialize a build.
19
+ * Callers should support the FULL surface, not narrow to paths.
20
+ *
21
+ * Disambiguation ladder:
22
+ * 1. kind-prefixed / `vendored` → { kind: 'source', source }
23
+ * 2. absolute / has `/` / starts `.` → { kind: 'source', source: { path } } (as-is; the `./<name>` escape lands here)
24
+ * 3. bare name, no governing config → existing dir ? source : not-found
25
+ * 4. bare name matching a declared skill → buildable (preferred even on a dir collision; note the `./` escape)
26
+ * 5. bare name, undeclared, existing dir → { kind: 'source', source: { path } }
27
+ * 6. bare name, undeclared, not a dir → name-miss
28
+ *
29
+ * PURE LOOKUP/CLASSIFICATION — no side effects, no build. Build is the caller's job.
30
+ */
31
+ import { existsSync } from 'node:fs';
32
+ import { findDistributedSkillLocationBySource, skillNameToFsPath, } from '@vibe-agent-toolkit/agent-skills';
33
+ import { findProjectRoot, safePath } from '@vibe-agent-toolkit/utils';
34
+ import { loadConfigCached } from '../utils/config-loader.js';
35
+ import { classifyToken } from './classify.js';
36
+ import { getDiscoveredSkillsByPath, resolveSkillPackagingConfig } from './packaging-config.js';
37
+ function existingDir(p) {
38
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- user-supplied reference
39
+ return existsSync(p);
40
+ }
41
+ export async function resolveSkillReference(ref, cwd) {
42
+ const shape = classifyToken(ref);
43
+ if (shape.shape === 'source-spec')
44
+ return { kind: 'source', source: shape.source };
45
+ if (shape.shape === 'definite-path')
46
+ return { kind: 'source', source: { path: ref } };
47
+ // bare-name: needs config + fs.
48
+ const configRoot = findProjectRoot(cwd);
49
+ const dirCandidate = safePath.resolve(cwd, ref);
50
+ if (configRoot === null) {
51
+ return existingDir(dirCandidate)
52
+ ? { kind: 'source', source: { path: ref } }
53
+ : { kind: 'not-found', ref };
54
+ }
55
+ const config = loadConfigCached(configRoot);
56
+ if (config?.skills === undefined) {
57
+ // findProjectRoot can anchor on a bare `.git` dir with no governing VAT config
58
+ // (or a config that declares no skills). That is the spec's "wild" rung — there
59
+ // is nothing to name-resolve against, so it is an existing dir or `not-found`,
60
+ // never a name-miss.
61
+ return existingDir(dirCandidate)
62
+ ? { kind: 'source', source: { path: ref } }
63
+ : { kind: 'not-found', ref };
64
+ }
65
+ const byName = new Map(); // name → abs SKILL.md path
66
+ const byPath = await getDiscoveredSkillsByPath(config.skills, configRoot);
67
+ for (const [skillMdPath, name] of byPath.entries())
68
+ byName.set(name, skillMdPath);
69
+ const sourcePath = byName.get(ref);
70
+ if (sourcePath !== undefined) {
71
+ if (existingDir(dirCandidate)) {
72
+ process.stderr.write(`note: '${ref}' matched a declared skill; testing its built dist. Use './${ref}' to test the local directory as-is.\n`);
73
+ }
74
+ return buildBuildable(ref, sourcePath, configRoot, config);
75
+ }
76
+ if (existingDir(dirCandidate))
77
+ return { kind: 'source', source: { path: ref } };
78
+ return {
79
+ kind: 'name-miss',
80
+ name: ref,
81
+ configRoot,
82
+ knownSkills: [...byName.keys()].sort((a, b) => a.localeCompare(b)),
83
+ };
84
+ }
85
+ async function buildBuildable(name, sourcePath, configRoot, config) {
86
+ const packagingConfig = (await resolveSkillPackagingConfig(sourcePath)) ?? {};
87
+ const skillDir = safePath.resolve(safePath.join(safePath.resolve(sourcePath), '..'));
88
+ const location = findDistributedSkillLocationBySource(config, configRoot, skillDir);
89
+ let distribution;
90
+ let expectedDistDir;
91
+ if (location === undefined) {
92
+ distribution = { kind: 'pool' };
93
+ expectedDistDir = safePath.join(configRoot, 'dist', 'skills', skillNameToFsPath(name));
94
+ }
95
+ else {
96
+ distribution = {
97
+ kind: 'plugin-local',
98
+ marketplaceName: location.marketplaceName,
99
+ pluginName: location.pluginName,
100
+ skillDirName: location.skillDirName,
101
+ };
102
+ expectedDistDir = location.skillOutputDir;
103
+ }
104
+ return { kind: 'buildable', name, sourcePath, configRoot, packagingConfig, distribution, expectedDistDir };
105
+ }
106
+ //# sourceMappingURL=resolve-skill-reference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-skill-reference.js","sourceRoot":"","sources":["../../src/skill-resolution/resolve-skill-reference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EACL,oCAAoC,EACpC,iBAAiB,GAClB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAG/F,SAAS,WAAW,CAAC,CAAS;IAC5B,8FAA8F;IAC9F,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC;AACvB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,GAAW,EAAE,GAAW;IAClE,MAAM,KAAK,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;IACjC,I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AC;IAEpF,IAAI,YAA+B,CAAC;IACpC,IAAI,eAAuB,CAAC;IAC5B,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,YAAY,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAChC,eAAe,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;IACzF,CAAC;SAAM,CAAC;QACN,YAAY,GAAG;YACb,IAAI,EAAE,cAAc;YACpB,eAAe,EAAE,QAAQ,CAAC,eAAe;YACzC,UAAU,EAAE,QAAQ,CAAC,UAAU;YAC/B,YAAY,EAAE,QAAQ,CAAC,YAAY;SACpC,CAAC;QACF,eAAe,GAAG,QAAQ,CAAC,cAAc,CAAC;IAC5C,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;AAC7G,CAAC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Result of resolving a skill reference (a CLI subject like `my-skill`,
3
+ * `./dist/skills/x`, or `npm:@scope/s@1.2.3`). See {@link resolveSkillReference}
4
+ * for the full grammar and the disambiguation ladder.
5
+ */
6
+ import type { SkillPackagingConfig, SkillSource } from '@vibe-agent-toolkit/agent-skills';
7
+ /** Where `vat build` places a declared skill's output. */
8
+ export type SkillDistribution =
9
+ /** Pool skill: built by `packageSkill` to `dist/skills/<fsSafeName>`. */
10
+ {
11
+ kind: 'pool';
12
+ }
13
+ /** Plugin-local tree-copy skill: shipped via `vat claude plugin build`. */
14
+ | {
15
+ kind: 'plugin-local';
16
+ marketplaceName: string;
17
+ pluginName: string;
18
+ skillDirName: string;
19
+ };
20
+ /**
21
+ * A project-local reference (a bare NAME matching a declared skill) that must be
22
+ * BUILT and then tested from its dist. The new path this plan adds.
23
+ */
24
+ export interface BuildableReference {
25
+ kind: 'buildable';
26
+ /** The declared skill name. */
27
+ name: string;
28
+ /** Absolute path to the skill's authored SKILL.md (the build input). */
29
+ sourcePath: string;
30
+ /** Absolute path to the governing config root (holds vibe-agent-toolkit.config.yaml). */
31
+ configRoot: string;
32
+ /** Merged packaging config (defaults + per-skill), used to drive the build. */
33
+ packagingConfig: SkillPackagingConfig;
34
+ /** How/where this skill ships. */
35
+ distribution: SkillDistribution;
36
+ /** Absolute dir where the build places the skill (what gets staged + tested). */
37
+ expectedDistDir: string;
38
+ }
39
+ /**
40
+ * The full result union of {@link resolveSkillReference}.
41
+ *
42
+ * - `buildable` → build (real entry points), then test the dist.
43
+ * - `source` → test the tree as-is (already-built dist, external, or undeclared).
44
+ * - `name-miss` → a bare name in a project that declares no such skill (error).
45
+ * - `not-found` → not a path and no governing config to resolve a name (error).
46
+ */
47
+ export type SkillReference = BuildableReference | {
48
+ kind: 'source';
49
+ source: SkillSource;
50
+ } | {
51
+ kind: 'name-miss';
52
+ name: string;
53
+ configRoot: string;
54
+ knownSkills: string[];
55
+ } | {
56
+ kind: 'not-found';
57
+ ref: string;
58
+ };
59
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/skill-resolution/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE1F,0DAA0D;AAC1D,MAAM,MAAM,iBAAiB;AAC3B,yEAAyE;AACvE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE;AAClB,2EAA2E;GACzE;IACE,IAAI,EAAE,cAAc,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEN;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,WAAW,CAAC;IAClB,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,UAAU,EAAE,MAAM,CAAC;IACnB,yFAAyF;IACzF,UAAU,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,eAAe,EAAE,oBAAoB,CAAC;IACtC,kCAAkC;IAClC,YAAY,EAAE,iBAAiB,CAAC;IAChC,iFAAiF;IACjF,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GACtB,kBAAkB,GAClB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAE,GACvC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAA;CAAE,GAC9E;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Result of resolving a skill reference (a CLI subject like `my-skill`,
3
+ * `./dist/skills/x`, or `npm:@scope/s@1.2.3`). See {@link resolveSkillReference}
4
+ * for the full grammar and the disambiguation ladder.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/skill-resolution/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibe-agent-toolkit/cli",
3
- "version": "0.1.39-rc.12",
3
+ "version": "0.1.39-rc.14",
4
4
  "description": "Command-line interface for vibe-agent-toolkit",
5
5
  "type": "module",
6
6
  "bin": {
@@ -41,16 +41,16 @@
41
41
  "//dependencies-note": "DO NOT add example agent packages or adopter packages here. Adopter packages (like vat-development-agents) depend on the CLI binary at build time — declaring them as deps creates a circular build dependency. They are built in a second turbo pass via package#task overrides in turbo.json.",
42
42
  "dependencies": {
43
43
  "@anthropic-ai/sdk": "^0.71.2",
44
- "@vibe-agent-toolkit/agent-config": "0.1.39-rc.12",
45
- "@vibe-agent-toolkit/agent-schema": "0.1.39-rc.12",
46
- "@vibe-agent-toolkit/agent-skills": "0.1.39-rc.12",
47
- "@vibe-agent-toolkit/claude-marketplace": "0.1.39-rc.12",
48
- "@vibe-agent-toolkit/discovery": "0.1.39-rc.12",
49
- "@vibe-agent-toolkit/gateway-mcp": "0.1.39-rc.12",
50
- "@vibe-agent-toolkit/rag": "0.1.39-rc.12",
51
- "@vibe-agent-toolkit/rag-lancedb": "0.1.39-rc.12",
52
- "@vibe-agent-toolkit/resources": "0.1.39-rc.12",
53
- "@vibe-agent-toolkit/utils": "0.1.39-rc.12",
44
+ "@vibe-agent-toolkit/agent-config": "0.1.39-rc.14",
45
+ "@vibe-agent-toolkit/agent-schema": "0.1.39-rc.14",
46
+ "@vibe-agent-toolkit/agent-skills": "0.1.39-rc.14",
47
+ "@vibe-agent-toolkit/claude-marketplace": "0.1.39-rc.14",
48
+ "@vibe-agent-toolkit/discovery": "0.1.39-rc.14",
49
+ "@vibe-agent-toolkit/gateway-mcp": "0.1.39-rc.14",
50
+ "@vibe-agent-toolkit/rag": "0.1.39-rc.14",
51
+ "@vibe-agent-toolkit/rag-lancedb": "0.1.39-rc.14",
52
+ "@vibe-agent-toolkit/resources": "0.1.39-rc.14",
53
+ "@vibe-agent-toolkit/utils": "0.1.39-rc.14",
54
54
  "adm-zip": "^0.5.16",
55
55
  "commander": "^12.1.0",
56
56
  "picomatch": "^4.0.3",