@vibe-agent-toolkit/agent-skills 0.1.39-rc.8 → 0.1.39-rc.9

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 (34) hide show
  1. package/dist/skill-test/build-hook.d.ts +58 -0
  2. package/dist/skill-test/build-hook.d.ts.map +1 -0
  3. package/dist/skill-test/build-hook.js +63 -0
  4. package/dist/skill-test/build-hook.js.map +1 -0
  5. package/dist/skill-test/exit-codes.d.ts +3 -2
  6. package/dist/skill-test/exit-codes.d.ts.map +1 -1
  7. package/dist/skill-test/exit-codes.js +5 -2
  8. package/dist/skill-test/exit-codes.js.map +1 -1
  9. package/dist/skill-test/experimenter-prompt.d.ts.map +1 -1
  10. package/dist/skill-test/experimenter-prompt.js +1 -0
  11. package/dist/skill-test/experimenter-prompt.js.map +1 -1
  12. package/dist/skill-test/harness-location.d.ts +13 -0
  13. package/dist/skill-test/harness-location.d.ts.map +1 -1
  14. package/dist/skill-test/harness-location.js +31 -1
  15. package/dist/skill-test/harness-location.js.map +1 -1
  16. package/dist/skill-test/lock.js +1 -1
  17. package/dist/skill-test/lock.js.map +1 -1
  18. package/dist/skill-test/plugin-env.d.ts +20 -0
  19. package/dist/skill-test/plugin-env.d.ts.map +1 -0
  20. package/dist/skill-test/plugin-env.js +24 -0
  21. package/dist/skill-test/plugin-env.js.map +1 -0
  22. package/dist/skill-test/plugin-layout.d.ts +41 -0
  23. package/dist/skill-test/plugin-layout.d.ts.map +1 -0
  24. package/dist/skill-test/plugin-layout.js +49 -0
  25. package/dist/skill-test/plugin-layout.js.map +1 -0
  26. package/dist/skill-test/run-harness.d.ts +12 -0
  27. package/dist/skill-test/run-harness.d.ts.map +1 -1
  28. package/dist/skill-test/run-harness.js +59 -13
  29. package/dist/skill-test/run-harness.js.map +1 -1
  30. package/dist/skill-test/staging.d.ts +20 -1
  31. package/dist/skill-test/staging.d.ts.map +1 -1
  32. package/dist/skill-test/staging.js +55 -17
  33. package/dist/skill-test/staging.js.map +1 -1
  34. package/package.json +5 -5
@@ -0,0 +1,58 @@
1
+ /**
2
+ * build-hook.ts — optional pre-stage build step for `vat skill test run`.
3
+ *
4
+ * When the test config includes a `build:` field, this module runs that shell
5
+ * command ONCE before staging so that generated artifacts (e.g. bundled scripts
6
+ * not committed to source) are present in the source tree for staging to copy.
7
+ *
8
+ * The command runs with cwd = the CONFIG ROOT (the directory containing
9
+ * vibe-agent-toolkit.config.yaml), because real build commands are root-level
10
+ * package scripts (e.g. `pnpm bundle:report`).
11
+ *
12
+ * Security note: the `build:` field is a developer-authored value from the
13
+ * project's own vibe-agent-toolkit.config.yaml — a trusted source under the
14
+ * adopter's source control. The command is passed directly to the OS shell
15
+ * (shell: true) intentionally, because build commands frequently include shell
16
+ * syntax (npm script chaining, env vars, etc.). This is equivalent to running
17
+ * `npm run build` or `pnpm bundle:report` from the terminal; it is NOT arbitrary
18
+ * user input. The adopter is already executing skill code via this command
19
+ * (`vat skill test run` requires --i-understand-this-runs-skill-code).
20
+ */
21
+ /**
22
+ * Options for the pre-stage build hook.
23
+ *
24
+ * `spawnFn` is injectable for unit testing — production code uses the default
25
+ * (node:child_process spawnSync). Tests inject a vi.fn() mock.
26
+ */
27
+ export interface BuildHookOptions {
28
+ /** Shell command to run (from `test.build` in vibe-agent-toolkit.config.yaml). */
29
+ buildCommand: string | undefined;
30
+ /** Absolute path to the config root (cwd for the build command). */
31
+ configRoot: string;
32
+ /**
33
+ * Injectable spawn function for unit testing.
34
+ * Defaults to node:child_process spawnSync when not provided.
35
+ */
36
+ spawnFn?: (cmd: string, opts: {
37
+ shell: boolean;
38
+ cwd: string;
39
+ stdio: 'inherit';
40
+ }) => {
41
+ status: number | null;
42
+ };
43
+ }
44
+ /** Thrown when the pre-stage build command exits with a non-zero code. Maps to preflight (exit 2). */
45
+ export declare class BuildHookError extends Error {
46
+ readonly buildExitCode: number;
47
+ readonly exitCode: 2;
48
+ constructor(message: string, buildExitCode: number);
49
+ }
50
+ /**
51
+ * Run the pre-stage build hook if configured.
52
+ *
53
+ * Runs `buildCommand` in a shell with `cwd = configRoot`. On non-zero exit,
54
+ * throws `BuildHookError` with a clear message naming the command and exit code.
55
+ * When `buildCommand` is undefined, this is a no-op (behavior unchanged).
56
+ */
57
+ export declare function runPreStageBuild(opts: BuildHookOptions): void;
58
+ //# sourceMappingURL=build-hook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-hook.d.ts","sourceRoot":"","sources":["../../src/skill-test/build-hook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kFAAkF;IAClF,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,oEAAoE;IACpE,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,CAAA;KAAE,KAAK;QAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;CAC/G;AAED,sGAAsG;AACtG,qBAAa,cAAe,SAAQ,KAAK;aAEM,aAAa,EAAE,MAAM;IADlE,QAAQ,CAAC,QAAQ,EAAG,CAAC,CAAU;gBACnB,OAAO,EAAE,MAAM,EAAkB,aAAa,EAAE,MAAM;CAInE;AAeD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAe7D"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * build-hook.ts — optional pre-stage build step for `vat skill test run`.
3
+ *
4
+ * When the test config includes a `build:` field, this module runs that shell
5
+ * command ONCE before staging so that generated artifacts (e.g. bundled scripts
6
+ * not committed to source) are present in the source tree for staging to copy.
7
+ *
8
+ * The command runs with cwd = the CONFIG ROOT (the directory containing
9
+ * vibe-agent-toolkit.config.yaml), because real build commands are root-level
10
+ * package scripts (e.g. `pnpm bundle:report`).
11
+ *
12
+ * Security note: the `build:` field is a developer-authored value from the
13
+ * project's own vibe-agent-toolkit.config.yaml — a trusted source under the
14
+ * adopter's source control. The command is passed directly to the OS shell
15
+ * (shell: true) intentionally, because build commands frequently include shell
16
+ * syntax (npm script chaining, env vars, etc.). This is equivalent to running
17
+ * `npm run build` or `pnpm bundle:report` from the terminal; it is NOT arbitrary
18
+ * user input. The adopter is already executing skill code via this command
19
+ * (`vat skill test run` requires --i-understand-this-runs-skill-code).
20
+ */
21
+ import { spawnSync } from 'node:child_process';
22
+ /** Thrown when the pre-stage build command exits with a non-zero code. Maps to preflight (exit 2). */
23
+ export class BuildHookError extends Error {
24
+ buildExitCode;
25
+ exitCode = 2;
26
+ constructor(message, buildExitCode) {
27
+ super(message);
28
+ this.buildExitCode = buildExitCode;
29
+ this.name = 'BuildHookError';
30
+ }
31
+ }
32
+ /**
33
+ * Default spawn implementation: runs the command in a shell with stdio inherited.
34
+ *
35
+ * `build:` is a developer-authored shell command from the adopter's own config
36
+ * (vibe-agent-toolkit.config.yaml), equivalent to running `pnpm bundle:report` at the
37
+ * terminal. It is NOT arbitrary user input. The adopter already acknowledges running
38
+ * skill code via --i-understand-this-runs-skill-code.
39
+ */
40
+ function defaultSpawn(cmd, opts) {
41
+ // eslint-disable-next-line sonarjs/os-command -- developer-authored build command from trusted project config; equivalent to running pnpm/npm build manually
42
+ return spawnSync(cmd, { ...opts, shell: true });
43
+ }
44
+ /**
45
+ * Run the pre-stage build hook if configured.
46
+ *
47
+ * Runs `buildCommand` in a shell with `cwd = configRoot`. On non-zero exit,
48
+ * throws `BuildHookError` with a clear message naming the command and exit code.
49
+ * When `buildCommand` is undefined, this is a no-op (behavior unchanged).
50
+ */
51
+ export function runPreStageBuild(opts) {
52
+ const { buildCommand, configRoot } = opts;
53
+ if (buildCommand === undefined)
54
+ return;
55
+ const spawn = opts.spawnFn ?? defaultSpawn;
56
+ const result = spawn(buildCommand, { shell: true, cwd: configRoot, stdio: 'inherit' });
57
+ const status = result.status ?? -1;
58
+ if (status !== 0) {
59
+ throw new BuildHookError(`Pre-stage build hook failed: command "${buildCommand}" exited with code ${status}. ` +
60
+ `Resolve the build error before running vat skill test run.`, status);
61
+ }
62
+ }
63
+ //# sourceMappingURL=build-hook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-hook.js","sourceRoot":"","sources":["../../src/skill-test/build-hook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAoB/C,sGAAsG;AACtG,MAAM,OAAO,cAAe,SAAQ,KAAK;IAEM;IADpC,QAAQ,GAAG,CAAU,CAAC;IAC/B,YAAY,OAAe,EAAkB,aAAqB;QAChE,KAAK,CAAC,OAAO,CAAC,CAAC;QAD4B,kBAAa,GAAb,aAAa,CAAQ;QAEhE,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF;AAED;;;;;;;GAOG;AACH,SAAS,YAAY,CAAC,GAAW,EAAE,IAAuD;IACxF,6JAA6J;IAC7J,OAAO,SAAS,CAAC,GAAG,EAAE,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAClD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAsB;IACrD,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAC1C,IAAI,YAAY,KAAK,SAAS;QAAE,OAAO;IAEvC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,IAAI,YAAY,CAAC;IAC3C,MAAM,MAAM,GAAG,KAAK,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IACvF,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;IAEnC,IAAI,MAAM,KAAK,CAAC,EAAE,CAAC;QACjB,MAAM,IAAI,cAAc,CACtB,yCAAyC,YAAY,sBAAsB,MAAM,IAAI;YACnF,4DAA4D,EAC9D,MAAM,CACP,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -25,8 +25,9 @@ export declare class InternalHarnessError extends Error {
25
25
  * Map any thrown error to the process exit code. Errors that carry their own
26
26
  * `exitCode` (Bootstrap/Auth/HarnessLocation/Internal) are authoritative;
27
27
  * a PromptInvariantError is a user-correctable preflight problem (a supplied
28
- * prompt override is missing a required safety instruction) → 2; GradingSkewError
29
- * is a parse failure → 1; everything unknown → 1.
28
+ * prompt override is missing a required safety instruction) → 2; a BuildHookError
29
+ * is a pre-stage build failure → 2; GradingSkewError is a parse failure → 1;
30
+ * everything unknown → 1.
30
31
  */
31
32
  export declare function mapErrorToExitCode(err: unknown): number;
32
33
  //# sourceMappingURL=exit-codes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exit-codes.d.ts","sourceRoot":"","sources":["../../src/skill-test/exit-codes.ts"],"names":[],"mappings":"AAMA,kDAAkD;AAClD,eAAO,MAAM,iBAAiB;;;;;CAKpB,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAEhG;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;aAEjB,YAAY,EAAE,MAAM;IADhD,QAAQ,CAAC,QAAQ,EAAG,CAAC,CAAU;gBACH,YAAY,EAAE,MAAM;CAIjD;AAED,gGAAgG;AAChG,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,QAAQ,EAAG,CAAC,CAAU;gBACnB,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAWvD"}
1
+ {"version":3,"file":"exit-codes.d.ts","sourceRoot":"","sources":["../../src/skill-test/exit-codes.ts"],"names":[],"mappings":"AAOA,kDAAkD;AAClD,eAAO,MAAM,iBAAiB;;;;;CAKpB,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAEhG;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;aAEjB,YAAY,EAAE,MAAM;IADhD,QAAQ,CAAC,QAAQ,EAAG,CAAC,CAAU;gBACH,YAAY,EAAE,MAAM;CAIjD;AAED,gGAAgG;AAChG,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,QAAQ,EAAG,CAAC,CAAU;gBACnB,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAYvD"}
@@ -1,4 +1,5 @@
1
1
  import { AuthPreflightError } from '@vibe-agent-toolkit/utils';
2
+ import { BuildHookError } from './build-hook.js';
2
3
  import { PromptInvariantError } from './experimenter-prompt.js';
3
4
  import { GradingSkewError } from './grading-adapter.js';
4
5
  import { HarnessLocationError } from './harness-location.js';
@@ -35,13 +36,15 @@ export class InternalHarnessError extends Error {
35
36
  * Map any thrown error to the process exit code. Errors that carry their own
36
37
  * `exitCode` (Bootstrap/Auth/HarnessLocation/Internal) are authoritative;
37
38
  * a PromptInvariantError is a user-correctable preflight problem (a supplied
38
- * prompt override is missing a required safety instruction) → 2; GradingSkewError
39
- * is a parse failure → 1; everything unknown → 1.
39
+ * prompt override is missing a required safety instruction) → 2; a BuildHookError
40
+ * is a pre-stage build failure → 2; GradingSkewError is a parse failure → 1;
41
+ * everything unknown → 1.
40
42
  */
41
43
  export function mapErrorToExitCode(err) {
42
44
  if (err instanceof BootstrapNeededError)
43
45
  return SkillTestExitCode.Bootstrap;
44
46
  if (err instanceof AuthPreflightError ||
47
+ err instanceof BuildHookError ||
45
48
  err instanceof HarnessLocationError ||
46
49
  err instanceof PromptInvariantError) {
47
50
  return SkillTestExitCode.Preflight;
@@ -1 +1 @@
1
- {"version":3,"file":"exit-codes.js","sourceRoot":"","sources":["../../src/skill-test/exit-codes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,kDAAkD;AAClD,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,EAAE,EAAE,CAAC;IACL,QAAQ,EAAE,CAAC;IACX,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,CAAC;CACJ,CAAC;AAIX;;;;GAIG;AACH,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAEjB;IADnB,QAAQ,GAAG,CAAU,CAAC;IAC/B,YAA4B,YAAoB;QAC9C,KAAK,CAAC,mCAAmC,YAAY,2BAA2B,CAAC,CAAC;QADxD,iBAAY,GAAZ,YAAY,CAAQ;QAE9C,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED,gGAAgG;AAChG,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IACpC,QAAQ,GAAG,CAAU,CAAC;IAC/B,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAY;IAC7C,IAAI,GAAG,YAAY,oBAAoB;QAAE,OAAO,iBAAiB,CAAC,SAAS,CAAC;IAC5E,IACE,GAAG,YAAY,kBAAkB;QACjC,GA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;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAY;IAC7C,IAAI,GAAG,YAAY,oBAAoB;QAAE,OAAO,iBAAiB,CAAC,SAAS,CAAC;IAC5E,IACE,GAAG,YAAY,kBAAkB;QACjC,GAAG,YAAY,cAAc;QAC7B,GAAG,YAAY,oBAAoB;QACnC,GAAG,YAAY,oBAAoB,EACnC,CAAC;QACD,OAAO,iBAAiB,CAAC,SAAS,CAAC;IACrC,CAAC;IACD,IAAI,GAAG,YAAY,gBAAgB,IAAI,GAAG,YAAY,oBAAoB;QAAE,OAAO,iBAAiB,CAAC,QAAQ,CAAC;IAC9G,OAAO,iBAAiB,CAAC,QAAQ,CAAC;AACpC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"experimenter-prompt.d.ts","sourceRoot":"","sources":["../../src/skill-test/experimenter-prompt.ts"],"names":[],"mappings":"AAAA,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,OAAO,EAAE,MAAM;CAI5B;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,QAsB5B,CAAC;AAKb,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAOxE;AAmBD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAI3D"}
1
+ {"version":3,"file":"experimenter-prompt.d.ts","sourceRoot":"","sources":["../../src/skill-test/experimenter-prompt.ts"],"names":[],"mappings":"AAAA,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,OAAO,EAAE,MAAM;CAI5B;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,QAuB5B,CAAC;AAKb,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAOxE;AAmBD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAI3D"}
@@ -20,6 +20,7 @@ export const DEFAULT_EXPERIMENTER_PROMPT = [
20
20
  ' 3. Append each graded expectation to the SINGLE top-level `expectations` array in {{GRADING_OUT}} IMMEDIATELY',
21
21
  ' (incremental flush — a mid-run kill must leave partial results).',
22
22
  ' 4. Record any packaging-fidelity friction to {{FRICTION_OUT}} using the vat friction schema.',
23
+ ' If a file referenced by the skill is absent from the staged tree, record a `missing-bundled-file` friction entry.',
23
24
  '',
24
25
  '{{GRADING_OUT}} MUST be ONE flat JSON object in skill-creator\'s grading.json shape (references/schemas.md):',
25
26
  'a top-level `expectations` array — one entry {"text","passed","evidence"} per expectation across ALL evals —',
@@ -1 +1 @@
1
- {"version":3,"file":"experimenter-prompt.js","sourceRoot":"","sources":["../../src/skill-test/experimenter-prompt.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC7C,YAAY,OAAe;QACzB,KAAK,CAAC,2CAA2C,OAAO,EAAE,CAAC,CAAC;QAC5D,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAUD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,yGAAyG;IACzG,EAAE;IACF,kCAAkC;IAClC,iHAAiH;IACjH,kDAAkD;IAClD,4GAA4G;IAC5G,iHAAiH;IACjH,uEAAuE;IACvE,gGAAgG;IAChG,EAAE;IACF,8GAA8G;IAC9G,8GAA8G;IAC9G,gHAAgH;IAChH,wEAAwE;IACxE,qGAAq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,EAAE,CAAC,CAAC;AACxE,CAAC;AAED,MAAM,iBAAiB,GAAsC;IAC3D,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,wCAAwC,EAAE;IACrE,EAAE,IAAI,EAAE,oCAAoC,EAAE,KAAK,EAAE,yBAAyB,EAAE;IAChF,EAAE,IAAI,EAAE,sCAAsC,EAAE,KAAK,EAAE,0BAA0B,EAAE;IACnF,EAAE,IAAI,EAAE,yBAAyB,EAAE,KAAK,EAAE,oDAAoD,EAAE;IAChG,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,iDAAiD,EAAE;IACrF,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,yBAAyB,EAAE;IACxD;QACE,IAAI,EAAE,+BAA+B;QACrC,KAAK,EAAE,4EAA4E;KACpF;IACD;QACE,IAAI,EAAE,qCAAqC;QAC3C,KAAK,EAAE,0DAA0D;KAClE;CACF,CAAC;AAEF,MAAM,UAAU,sBAAsB,CAAC,MAAc;IACnD,KAAK,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,iBAAiB,EAAE,CAAC;QAChD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;YAAE,MAAM,IAAI,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAChE,CAAC;AACH,CAAC"}
@@ -17,6 +17,19 @@ export declare function resolveHarnessRoot(skillNames: string[], tmpRoot?: strin
17
17
  * --setting-sources "".
18
18
  */
19
19
  export declare function assertSafeWorkdir(dir: string): void;
20
+ /**
21
+ * Prepare the harness root directory so that `assertSafeHarnessRoot` will
22
+ * pass on the next call. If the path does not exist, this is a no-op (the
23
+ * caller creates it at 0700 via mkdirSyncReal). If it exists:
24
+ *
25
+ * - Symlink → throw HarnessLocationError (security gate; never relax).
26
+ * - Real directory whose mode != 0700 → chmod to 0700. Removing group/other
27
+ * access is strictly safer, never a relaxation.
28
+ *
29
+ * Mode checks/changes are only performed on non-win32 (matching
30
+ * assertSafeHarnessRoot's platform guard).
31
+ */
32
+ export declare function prepareHarnessRoot(dir: string): void;
20
33
  /**
21
34
  * FS-bound hardening for the shared-tmp harness root (spec §7): the root must
22
35
  * be 0700 and owned by the current uid, and no path component may be a symlink.
@@ -1 +1 @@
1
- {"version":3,"file":"harness-location.d.ts","sourceRoot":"","sources":["../../src/skill-test/harness-location.ts"],"names":[],"mappings":"AAKA,sDAAsD;AACtD,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,QAAQ,EAAG,CAAC,CAAU;gBACnB,OAAO,EAAE,MAAM;CAI5B;AAOD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,CAQ7D;AAED,mEAAmE;AACnE,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAGjF;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAenD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAiB3E"}
1
+ {"version":3,"file":"harness-location.d.ts","sourceRoot":"","sources":["../../src/skill-test/harness-location.ts"],"names":[],"mappings":"AAKA,sDAAsD;AACtD,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,QAAQ,EAAG,CAAC,CAAU;gBACnB,OAAO,EAAE,MAAM;CAI5B;AAOD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,CAQ7D;AAED,mEAAmE;AACnE,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAGjF;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAenD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAkBpD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAiB3E"}
@@ -1,5 +1,5 @@
1
1
  import { createHash } from 'node:crypto';
2
- import { existsSync, lstatSync, statSync } from 'node:fs';
2
+ import { chmodSync, existsSync, lstatSync, statSync } from 'node:fs';
3
3
  import { normalizedTmpdir, safePath } from '@vibe-agent-toolkit/utils';
4
4
  /** Harness-location failure — maps to exit code 2. */
5
5
  export class HarnessLocationError extends Error {
@@ -53,6 +53,36 @@ export function assertSafeWorkdir(dir) {
53
53
  current = safePath.join(current, '..');
54
54
  }
55
55
  }
56
+ /**
57
+ * Prepare the harness root directory so that `assertSafeHarnessRoot` will
58
+ * pass on the next call. If the path does not exist, this is a no-op (the
59
+ * caller creates it at 0700 via mkdirSyncReal). If it exists:
60
+ *
61
+ * - Symlink → throw HarnessLocationError (security gate; never relax).
62
+ * - Real directory whose mode != 0700 → chmod to 0700. Removing group/other
63
+ * access is strictly safer, never a relaxation.
64
+ *
65
+ * Mode checks/changes are only performed on non-win32 (matching
66
+ * assertSafeHarnessRoot's platform guard).
67
+ */
68
+ export function prepareHarnessRoot(dir) {
69
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- our own derived harness root
70
+ if (!existsSync(dir))
71
+ return;
72
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- our own derived harness root
73
+ const ls = lstatSync(dir);
74
+ if (ls.isSymbolicLink()) {
75
+ throw new HarnessLocationError(`Refusing to use a symlinked harness root: ${dir}.`);
76
+ }
77
+ if (process.platform !== 'win32') {
78
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- our own derived harness root
79
+ const mode = statSync(dir).mode & 0o777;
80
+ if (mode !== 0o700) {
81
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- our own derived harness root
82
+ chmodSync(dir, 0o700);
83
+ }
84
+ }
85
+ }
56
86
  /**
57
87
  * FS-bound hardening for the shared-tmp harness root (spec §7): the root must
58
88
  * be 0700 and owned by the current uid, and no path component may be a symlink.
@@ -1 +1 @@
1
- {"version":3,"file":"harness-location.js","sourceRoot":"","sources":["../../src/skill-test/harness-location.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEvE,sDAAsD;AACtD,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IACpC,QAAQ,GAAG,CAAU,CAAC;IAC/B,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED,gFAAgF;AAChF,SAAS,QAAQ,CAAC,IAAY;IAC5B,OAAO,IAAI,CAAC,UAAU,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;AACjD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAoB;IACnD,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,oBAAoB,CAAC,sDAAsD,CAAC,CAAC;IACzF,CAAC;IACD,MAAM,MAAM,GAAG,CAAC,GAAG,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;IAClE,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9C,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,CAA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AAE,UAAkB;IACnE,mGAAmG;IACnG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,CAAC,2CAA2C;IACzE,mGAAmG;IACnG,MAAM,EAAE,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;IAC1B,IAAI,EAAE,CAAC,cAAc,EAAE,EAAE,CAAC;QACxB,MAAM,IAAI,oBAAoB,CAAC,6CAA6C,GAAG,GAAG,CAAC,CAAC;IACtF,CAAC;IACD,mGAAmG;IACnG,MAAM,EAAE,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IACzB,IAAI,OAAO,EAAE,CAAC,GAAG,KAAK,QAAQ,IAAI,EAAE,CAAC,GAAG,KAAK,UAAU,EAAE,CAAC;QACxD,MAAM,IAAI,oBAAoB,CAAC,gBAAgB,GAAG,0CAA0C,EAAE,CAAC,GAAG,OAAO,UAAU,IAAI,CAAC,CAAC;IAC3H,CAAC;IACD,MAAM,IAAI,GAAG,EAAE,CAAC,IAAI,GAAG,KAAK,CAAC;IAC7B,IAAI,IAAI,KAAK,KAAK,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACnD,MAAM,IAAI,oBAAoB,CAAC,gBAAgB,GAAG,wBAAwB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAClG,CAAC;AACH,CAAC"}
@@ -13,7 +13,7 @@ export class HarnessLockBusyError extends Error {
13
13
  * keeps the simple fail-fast — the CLI surfaces the busy message).
14
14
  */
15
15
  export function acquireHarnessLock(harnessRoot, opts = {}) {
16
- const lockPath = safePath.join(harnessRoot, '.vat-skill-test.lock');
16
+ const lockPath = safePath.joinUnderRoot(harnessRoot, '.vat-skill-test.lock');
17
17
  // eslint-disable-next-line no-void, sonarjs/void-use -- v1: fail-fast only; reserved for future polling
18
18
  void opts.wait;
19
19
  let fd;
@@ -1 +1 @@
1
- {"version":3,"file":"lock.js","sourceRoot":"","sources":["../../src/skill-test/lock.ts"],"names":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MAAM,EAAE,MAAM,SAAS,CAAC;AAEtD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC7C,YAAY,QAAgB;QAC1B,KAAK,CAAC,sDAAsD,QAAQ,yDAAyD,CAAC,CAAC;QAC/H,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAMD;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,WAAmB,EAAE,OAA2B,EAAE;IACnF,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,WAAW,EAAE,sBAAsB,CAAC,CAAC;IAC7E,wGAAwG;IACxG,KAAK,IAAI,CAAC,IAAI,CAAC;IACf,IAAI,EAAU,CAAC;IACf,IAAI,CAAC;QACH,8EAA8E;QAC9E,mGAAmG;QACnG,EAAE,GAAG,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAChC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAK,GAA6B,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACrD,MAAM,IAAI,oBAAoB,CAAC,QAAQ,CAAC,CAAC;QAC3C,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;IACD,SAAS,CAAC,EAAE,CAAC,CAAC;IACd,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,OAAO;QACL,OAAO;YACL,IAAI,QAAQ;gBAAE,OAAO;YACrB,QAAQ,GAAG,IAAI,CAAC;YAChB,MAAM,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACpC,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * plugin-env.ts — pure env assembly for the experimenter spawn.
3
+ *
4
+ * When the subject skill is plugin-distributed, its staged plugin root is exported
5
+ * as `CLAUDE_PLUGIN_ROOT` so the harness mirrors a real plugin install: the skill's
6
+ * own code reads `${CLAUDE_PLUGIN_ROOT}/skills/<name>/scripts/...` and finds the
7
+ * file at the staged nesting (see staging.ts). Without it the first such call is
8
+ * MODULE_NOT_FOUND (a wasted experimenter turn, logged as path-assumption friction).
9
+ *
10
+ * NOTE: it is unclear whether Claude Code itself sets `CLAUDE_PLUGIN_ROOT` when it
11
+ * loads a plugin via `--plugin-dir`. We set it explicitly as a guarantee; if claude
12
+ * also sets it, our value points at the same staged dir, so they agree.
13
+ */
14
+ /**
15
+ * Return a copy of `env` with `CLAUDE_PLUGIN_ROOT` set to `subjectPluginRoot` when
16
+ * the subject is plugin-distributed. When `subjectPluginRoot` is null (standalone),
17
+ * the env is returned unchanged. The input object is never mutated.
18
+ */
19
+ export declare function withPluginRootEnv(env: NodeJS.ProcessEnv, subjectPluginRoot: string | null): NodeJS.ProcessEnv;
20
+ //# sourceMappingURL=plugin-env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-env.d.ts","sourceRoot":"","sources":["../../src/skill-test/plugin-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAC/B,MAAM,CAAC,UAAU,CAGnB"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * plugin-env.ts — pure env assembly for the experimenter spawn.
3
+ *
4
+ * When the subject skill is plugin-distributed, its staged plugin root is exported
5
+ * as `CLAUDE_PLUGIN_ROOT` so the harness mirrors a real plugin install: the skill's
6
+ * own code reads `${CLAUDE_PLUGIN_ROOT}/skills/<name>/scripts/...` and finds the
7
+ * file at the staged nesting (see staging.ts). Without it the first such call is
8
+ * MODULE_NOT_FOUND (a wasted experimenter turn, logged as path-assumption friction).
9
+ *
10
+ * NOTE: it is unclear whether Claude Code itself sets `CLAUDE_PLUGIN_ROOT` when it
11
+ * loads a plugin via `--plugin-dir`. We set it explicitly as a guarantee; if claude
12
+ * also sets it, our value points at the same staged dir, so they agree.
13
+ */
14
+ /**
15
+ * Return a copy of `env` with `CLAUDE_PLUGIN_ROOT` set to `subjectPluginRoot` when
16
+ * the subject is plugin-distributed. When `subjectPluginRoot` is null (standalone),
17
+ * the env is returned unchanged. The input object is never mutated.
18
+ */
19
+ export function withPluginRootEnv(env, subjectPluginRoot) {
20
+ if (subjectPluginRoot === null)
21
+ return env;
22
+ return { ...env, CLAUDE_PLUGIN_ROOT: subjectPluginRoot };
23
+ }
24
+ //# sourceMappingURL=plugin-env.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-env.js","sourceRoot":"","sources":["../../src/skill-test/plugin-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAC/B,GAAsB,EACtB,iBAAgC;IAEhC,IAAI,iBAAiB,KAAK,IAAI;QAAE,OAAO,GAAG,CAAC;IAC3C,OAAO,EAAE,GAAG,GAAG,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;AAC3D,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * plugin-layout.ts — pure detection of whether a skill's true on-disk source dir
3
+ * is part of a Claude plugin install.
4
+ *
5
+ * ADOPTER BUG this supports: VAT stages a plugin-distributed skill FLAT
6
+ * (`<harness>/staged/<name>/scripts/report.mjs`), but the skill's own code invokes
7
+ * `${CLAUDE_PLUGIN_ROOT}/skills/<name>/scripts/report.mjs`. In the flat harness that
8
+ * file isn't at the expected relative location and CLAUDE_PLUGIN_ROOT is unset, so
9
+ * the first call is MODULE_NOT_FOUND (one wasted experimenter turn, logged as a
10
+ * path-assumption friction). The fix stages plugin skills under their REAL
11
+ * plugin-root layout — and that begins by detecting the plugin root here.
12
+ *
13
+ * A directory is a Claude plugin root iff it contains `.claude-plugin/plugin.json`.
14
+ * Given a skill's source dir we walk up its ancestors and stop at the NEAREST such
15
+ * root. The existence probe is injected so this stays a pure, unit-testable function.
16
+ */
17
+ /** Result of a positive plugin-layout detection. */
18
+ export interface PluginLayout {
19
+ /** Forward-slash absolute path to the ancestor plugin root (holds `.claude-plugin/`). */
20
+ pluginRoot: string;
21
+ /**
22
+ * Forward-slash path of the skill source dir RELATIVE to {@link pluginRoot}
23
+ * (e.g. `skills/report-tools`). Used to recreate the plugin's nesting
24
+ * in the harness so `${pluginRoot}/skills/<name>/...` resolves as it would in a
25
+ * real install.
26
+ */
27
+ relPathUnderPlugin: string;
28
+ }
29
+ /**
30
+ * Walk up from `skillSourceDir`; if any ancestor directory contains
31
+ * `.claude-plugin/plugin.json`, the skill is plugin-distributed.
32
+ *
33
+ * @param skillSourceDir Absolute path to the skill's TRUE on-disk source directory
34
+ * (NOT a staged temp copy — the staged copy has lost its plugin ancestry).
35
+ * @param fileExists Injected probe: returns true iff the given absolute path exists
36
+ * (production passes `existsSync`; tests pass a fake).
37
+ * @returns `{ pluginRoot, relPathUnderPlugin }` for the nearest plugin ancestor, or
38
+ * `null` when no ancestor is a plugin root (standalone skill).
39
+ */
40
+ export declare function detectPluginLayout(skillSourceDir: string, fileExists: (p: string) => boolean): PluginLayout | null;
41
+ //# sourceMappingURL=plugin-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-layout.d.ts","sourceRoot":"","sources":["../../src/skill-test/plugin-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AASH,oDAAoD;AACpD,MAAM,WAAW,YAAY;IAC3B,yFAAyF;IACzF,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,GACjC,YAAY,GAAG,IAAI,CAerB"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * plugin-layout.ts — pure detection of whether a skill's true on-disk source dir
3
+ * is part of a Claude plugin install.
4
+ *
5
+ * ADOPTER BUG this supports: VAT stages a plugin-distributed skill FLAT
6
+ * (`<harness>/staged/<name>/scripts/report.mjs`), but the skill's own code invokes
7
+ * `${CLAUDE_PLUGIN_ROOT}/skills/<name>/scripts/report.mjs`. In the flat harness that
8
+ * file isn't at the expected relative location and CLAUDE_PLUGIN_ROOT is unset, so
9
+ * the first call is MODULE_NOT_FOUND (one wasted experimenter turn, logged as a
10
+ * path-assumption friction). The fix stages plugin skills under their REAL
11
+ * plugin-root layout — and that begins by detecting the plugin root here.
12
+ *
13
+ * A directory is a Claude plugin root iff it contains `.claude-plugin/plugin.json`.
14
+ * Given a skill's source dir we walk up its ancestors and stop at the NEAREST such
15
+ * root. The existence probe is injected so this stays a pure, unit-testable function.
16
+ */
17
+ import { dirname } from 'node:path';
18
+ import { safePath, toForwardSlash } from '@vibe-agent-toolkit/utils';
19
+ /** The plugin-manifest subpath that marks a directory as a Claude plugin root. */
20
+ const PLUGIN_MANIFEST_SUBPATH = '.claude-plugin/plugin.json';
21
+ /**
22
+ * Walk up from `skillSourceDir`; if any ancestor directory contains
23
+ * `.claude-plugin/plugin.json`, the skill is plugin-distributed.
24
+ *
25
+ * @param skillSourceDir Absolute path to the skill's TRUE on-disk source directory
26
+ * (NOT a staged temp copy — the staged copy has lost its plugin ancestry).
27
+ * @param fileExists Injected probe: returns true iff the given absolute path exists
28
+ * (production passes `existsSync`; tests pass a fake).
29
+ * @returns `{ pluginRoot, relPathUnderPlugin }` for the nearest plugin ancestor, or
30
+ * `null` when no ancestor is a plugin root (standalone skill).
31
+ */
32
+ export function detectPluginLayout(skillSourceDir, fileExists) {
33
+ let current = toForwardSlash(skillSourceDir);
34
+ // Walk up until the filesystem root (dirname is idempotent at the root).
35
+ for (;;) {
36
+ const marker = safePath.join(current, PLUGIN_MANIFEST_SUBPATH);
37
+ if (fileExists(marker)) {
38
+ return {
39
+ pluginRoot: current,
40
+ relPathUnderPlugin: safePath.relative(current, toForwardSlash(skillSourceDir)),
41
+ };
42
+ }
43
+ const parent = toForwardSlash(dirname(current));
44
+ if (parent === current)
45
+ return null; // reached filesystem root, no plugin found
46
+ current = parent;
47
+ }
48
+ }
49
+ //# sourceMappingURL=plugin-layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-layout.js","sourceRoot":"","sources":["../../src/skill-test/plugin-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAErE,kFAAkF;AAClF,MAAM,uBAAuB,GAAG,4BAA4B,CAAC;AAe7D;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB,CAChC,cAAsB,EACtB,UAAkC;IAElC,IAAI,OAAO,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;IAC7C,yEAAyE;IACzE,SAAS,CAAC;QACR,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,uBAAuB,CAAC,CAAC;QAC/D,IAAI,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YACvB,OAAO;gBACL,UAAU,EAAE,OAAO;gBACnB,kBAAkB,EAAE,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;aAC/E,CAAC;QACJ,CAAC;QACD,MAAM,MAAM,GAAG,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;QAChD,IAAI,MAAM,KAAK,OAAO;YAAE,OAAO,IAAI,CAAC,CAAC,2CAA2C;QAChF,OAAO,GAAG,MAAM,CAAC;IACnB,CAAC;AACH,CAAC"}
@@ -72,6 +72,18 @@ export interface RunHarnessOptions {
72
72
  timeout?: number;
73
73
  /** Stall watchdog in seconds. */
74
74
  stall?: number;
75
+ /**
76
+ * Shell command to run once, before staging, to generate build artifacts
77
+ * (from `test.build` in vibe-agent-toolkit.config.yaml). Cwd = configRoot.
78
+ * Absent → no-op (behavior unchanged).
79
+ */
80
+ build?: string;
81
+ /**
82
+ * Absolute path to the project config root (directory containing
83
+ * vibe-agent-toolkit.config.yaml). Used as cwd for the pre-stage build hook.
84
+ * Falls back to repoRoot when omitted.
85
+ */
86
+ configRoot?: string;
75
87
  }
76
88
  export interface RunHarnessResult {
77
89
  harnessPath: string;
@@ -1 +1 @@
1
- {"version":3,"file":"run-harness.d.ts","sourceRoot":"","sources":["../../src/skill-test/run-harness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAoDH,2CAA2C;AAC3C,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,cAAc,GAAG,SAAS,GAAG,MAAM,CAAC;AAE9E,mCAAmC;AACnC,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG,SAAS,CAAC;AAE9D,6DAA6D;AAC7D,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,mDAAmD;IACnD,MAAM,EAAE,MAAM,EAAE,CAAC;IAEjB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAE9C,4DAA4D;IAC5D,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAE/C,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MA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C;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0BAA0B;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAmPD;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAwM5F"}
@@ -11,14 +11,17 @@
11
11
  import { existsSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
12
12
  import { basename, dirname } from 'node:path';
13
13
  import { fileURLToPath } from 'node:url';
14
- import { getToolVersion, mkdirSyncReal, normalizedTmpdir, probeAuthStatus, safeExecResult, safePath, spawnHeadlessClaude, toForwardSlash, } from '@vibe-agent-toolkit/utils';
14
+ import { getToolVersion, mkdirSyncReal, normalizedTmpdir, probeAuthStatus, resolveAssetReference, safeExecResult, safePath, spawnHeadlessClaude, toForwardSlash, } from '@vibe-agent-toolkit/utils';
15
15
  import { resolveSkillSource } from '../skill-source/resolve-skill-source.js';
16
+ import { runPreStageBuild } from './build-hook.js';
16
17
  import { writeEvalsTemplate } from './evals-template.js';
17
18
  import { BootstrapNeededError, InternalHarnessError, SkillTestExitCode } from './exit-codes.js';
18
19
  import { assertPromptInvariants, buildExperimenterPrompt, } from './experimenter-prompt.js';
19
20
  import { parseGradingJson } from './grading-adapter.js';
20
- import { assertSafeHarnessRoot, assertSafeWorkdir, resolveHarnessRoot } from './harness-location.js';
21
+ import { assertSafeHarnessRoot, assertSafeWorkdir, prepareHarnessRoot, resolveHarnessRoot } from './harness-location.js';
21
22
  import { acquireHarnessLock } from './lock.js';
23
+ import { withPluginRootEnv } from './plugin-env.js';
24
+ import { detectPluginLayout } from './plugin-layout.js';
22
25
  import { runPreflight } from './preflight.js';
23
26
  import { descriptorToSource, stageHarness } from './staging.js';
24
27
  import { verifyVendoredManifest } from './vendor-manifest.js';
@@ -56,7 +59,30 @@ function resolveKnobs(opts) {
56
59
  result.stallMs = stallMs;
57
60
  return result;
58
61
  }
59
- function buildStageItems(opts) {
62
+ /**
63
+ * Detect the plugin-root layout for a `{ path }` source. The resolver later COPIES
64
+ * the source into a temp dir (losing its plugin ancestry), so we must detect here
65
+ * — while the true on-disk source dir is still known — by resolving the path spec
66
+ * against repoRoot and walking up for `.claude-plugin/plugin.json`. Non-`{path}`
67
+ * sources (npm/url/vendored/workspace) have no local source tree to walk, so they
68
+ * are always staged flat (returns undefined). undefined → flat staging.
69
+ */
70
+ function detectItemPluginLayout(source, repoRoot) {
71
+ if (!('path' in source))
72
+ return undefined;
73
+ const sourceDir = resolveAssetReference(source.path, repoRoot);
74
+ return detectPluginLayout(sourceDir, existsSync) ?? undefined;
75
+ }
76
+ function makeStageItem(name, source, repoRoot, role) {
77
+ const pluginLayout = detectItemPluginLayout(source, repoRoot);
78
+ return {
79
+ name,
80
+ source,
81
+ ...(role === undefined ? {} : { role }),
82
+ ...(pluginLayout === undefined ? {} : { pluginLayout }),
83
+ };
84
+ }
85
+ function buildStageItems(opts, repoRoot) {
60
86
  const items = [];
61
87
  // The FIRST positional skill is the subject under test; the rest of the
62
88
  // primary set and any `--with`/`--with-optional` deps are supporting context.
@@ -66,14 +92,12 @@ function buildStageItems(opts) {
66
92
  const source = override
67
93
  ? descriptorToSource(override)
68
94
  : { path: name };
69
- items.push(name === subjectName ? { name, source, role: 'subject' } : { name, source });
95
+ items.push(makeStageItem(name, source, repoRoot, name === subjectName ? 'subject' : undefined));
70
96
  }
71
97
  if (opts.withOptional !== undefined) {
72
98
  for (const [name, spec] of Object.entries(opts.withOptional)) {
73
- items.push({
74
- name,
75
- source: descriptorToSource(spec),
76
- });
99
+ const source = descriptorToSource(spec);
100
+ items.push(makeStageItem(name, source, repoRoot, undefined));
77
101
  }
78
102
  }
79
103
  return items;
@@ -81,7 +105,7 @@ function buildStageItems(opts) {
81
105
  function buildResolveCtx(harnessRoot, repoRoot) {
82
106
  return {
83
107
  repoRoot,
84
- stagingRoot: safePath.join(harnessRoot, 'staged'),
108
+ stagingRoot: safePath.joinUnderRoot(harnessRoot, 'staged'),
85
109
  fetchCacheDir: safePath.join(normalizedTmpdir(), 'vat-fetch-cache'),
86
110
  };
87
111
  }
@@ -203,6 +227,7 @@ function resolveScaffoldEvalsPath(opts, repoRoot, evalsSubpath) {
203
227
  const overridePath = override && typeof override.path === 'string' ? override.path : undefined;
204
228
  // Default (no override) resolution treats the positional name as a path.
205
229
  const sourcePath = overridePath ?? subjectName;
230
+ // eslint-disable-next-line local/no-unsafe-root-join -- the positional skill source may be an absolute path; resolving it against repoRoot (which returns an absolute sourcePath unchanged) is intentional, documented behavior, not a containment bug.
206
231
  const sourceDir = safePath.resolve(repoRoot, sourcePath);
207
232
  return safePath.join(sourceDir, evalsSubpath);
208
233
  }
@@ -223,6 +248,10 @@ export async function runSkillTestHarness(opts) {
223
248
  const repoRoot = opts.repoRoot ?? harnessRoot;
224
249
  const evalsSubpath = opts.evalsSubpath ?? DEFAULT_EVALS_SUBPATH;
225
250
  const currentUid = typeof process.getuid === 'function' ? process.getuid() : 0;
251
+ // Tighten an existing directory to 0700 (if present) BEFORE mkdir — adopter
252
+ // may have created the --out dir with default umask (0755). This is strictly
253
+ // safer: we only remove access, never grant it. Symlink still throws.
254
+ prepareHarnessRoot(harnessRoot);
226
255
  // Ensure the harness root directory exists before validating it.
227
256
  mkdirSyncReal(harnessRoot, { recursive: true, mode: 0o700 });
228
257
  // Step 1: Assert safe harness root (symlink/ownership/mode checks) BEFORE
@@ -232,11 +261,25 @@ export async function runSkillTestHarness(opts) {
232
261
  // Step 2: Acquire exclusive harness lock.
233
262
  const lock = acquireHarnessLock(harnessRoot);
234
263
  try {
264
+ // Step 2.5: Run pre-stage build hook (if configured).
265
+ // Runs ONCE before staging so generated artifacts are present for the copy step.
266
+ // cwd = configRoot (directory containing vibe-agent-toolkit.config.yaml).
267
+ // A non-zero exit throws BuildHookError → mapErrorToExitCode → exit 2 (preflight).
268
+ // Ordering note: build necessarily precedes the bootstrap check (Step 4), because
269
+ // that check reads the *staged* subject's evals (Step 3), and staging must copy the
270
+ // build's output. So a run on a not-yet-scaffolded skill pays the build before
271
+ // exiting 3 — acceptable: build emits code artifacts, not the authored evals.json,
272
+ // so it can't change the bootstrap outcome. (Token spend is the Step-10 spawn, far
273
+ // downstream; the build never reaches it.)
274
+ const configRoot = opts.configRoot ?? repoRoot;
275
+ if (opts.build !== undefined) {
276
+ runPreStageBuild({ buildCommand: opts.build, configRoot });
277
+ }
235
278
  // Step 3: Stage the harness FIRST — the subject's own evals/evals.json lands
236
279
  // inside its staged dir, so we must stage before we can locate it.
237
280
  const resolveCtx = buildResolveCtx(harnessRoot, repoRoot);
238
- const items = buildStageItems(opts);
239
- const { pluginDirs, subjectStagedDir } = await stageHarness({
281
+ const items = buildStageItems(opts, repoRoot);
282
+ const { pluginDirs, subjectStagedDir, subjectPluginRoot } = await stageHarness({
240
283
  harnessRoot,
241
284
  items,
242
285
  resolve: (source, ctx) => resolveSkillSource(source, ctx),
@@ -278,7 +321,7 @@ export async function runSkillTestHarness(opts) {
278
321
  };
279
322
  }
280
323
  // Step 7: Build effective experimenter prompt and validate invariants.
281
- const resultsDir = safePath.join(harnessRoot, 'results');
324
+ const resultsDir = safePath.joinUnderRoot(harnessRoot, 'results');
282
325
  mkdirSyncReal(resultsDir, { recursive: true });
283
326
  const gradingOut = safePath.join(resultsDir, 'grading.json');
284
327
  const frictionOut = safePath.join(resultsDir, 'friction.json');
@@ -320,7 +363,10 @@ export async function runSkillTestHarness(opts) {
320
363
  pluginDirs,
321
364
  sandboxDir: harnessRoot,
322
365
  cwd: harnessRoot,
323
- env: preflightResult.resolvedAuth.forwardedEnv,
366
+ // When the SUBJECT is plugin-distributed, export CLAUDE_PLUGIN_ROOT pointing
367
+ // at its staged plugin root so the harness mirrors a real plugin install
368
+ // (the rest of the scrubbed env is preserved verbatim). Standalone → unchanged.
369
+ env: withPluginRootEnv(preflightResult.resolvedAuth.forwardedEnv, subjectPluginRoot),
324
370
  timeoutMs,
325
371
  onStdout: (chunk) => { process.stderr.write(chunk); },
326
372
  onStderr: (chunk) => { process.stderr.write(chunk); },
@@ -1 +1 @@
1
- {"version":3,"file":"run-harness.js","sourceRoot":"","sources":["../../src/skill-test/run-harness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EACL,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,QAAQ,EACR,mBAAmB,EACnB,cAAc,GACf,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAG7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAChG,OAAO,EACL,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACrG,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CA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1,7 @@
1
1
  import type { ResolveSkillSourceContext, ResolvedSkillSource, SkillSource } from '@vibe-agent-toolkit/agent-skills';
2
2
  import type { SkillSourceDescriptor } from '@vibe-agent-toolkit/resources';
3
3
  import { type StagedManifest } from './manifest.js';
4
+ import type { PluginLayout } from './plugin-layout.js';
4
5
  export interface StageItem {
5
6
  name: string;
6
7
  source: SkillSource;
@@ -11,6 +12,15 @@ export interface StageItem {
11
12
  * subject's own `evals/evals.json`.
12
13
  */
13
14
  role?: 'subject';
15
+ /**
16
+ * Present when this skill's TRUE source dir lives inside a Claude plugin
17
+ * (detected via {@link detectPluginLayout}). When set, the item is staged under
18
+ * its real plugin-root layout — the plugin's `.claude-plugin/` is copied and the
19
+ * skill is nested at `<pluginStageRoot>/<relPathUnderPlugin>/` — so that the
20
+ * harness mirrors a real plugin install and `${CLAUDE_PLUGIN_ROOT}/skills/<name>`
21
+ * paths in the skill's own code resolve. Absent → flat staging (standalone skill).
22
+ */
23
+ pluginLayout?: PluginLayout;
14
24
  }
15
25
  export interface StageHarnessOptions {
16
26
  harnessRoot: string;
@@ -25,9 +35,18 @@ export interface StageHarnessResult {
25
35
  /**
26
36
  * Absolute staged directory of the item tagged `role: 'subject'` (the primary
27
37
  * skill under test). `null` when no item carried that role. The harness reads
28
- * the subject's `evals/evals.json` from inside this directory.
38
+ * the subject's `evals/evals.json` from inside this directory. For a
39
+ * plugin-distributed subject this points at the NESTED skill dir
40
+ * (`<pluginStageRoot>/<relPathUnderPlugin>`), not the plugin root.
29
41
  */
30
42
  subjectStagedDir: string | null;
43
+ /**
44
+ * Absolute staged PLUGIN ROOT of the subject when the subject is
45
+ * plugin-distributed (the dir holding `.claude-plugin/`). The caller exports it
46
+ * as `CLAUDE_PLUGIN_ROOT` so the harness mirrors a real plugin install. `null`
47
+ * when the subject is standalone (no plugin layout) or absent.
48
+ */
49
+ subjectPluginRoot: string | null;
31
50
  }
32
51
  /**
33
52
  * Map a config descriptor onto Plan 1's runtime SkillSource union.
@@ -1 +1 @@
1
- {"version":3,"file":"staging.d.ts","sourceRoot":"","sources":["../../src/skill-test/staging.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAI3E,OAAO,EAA0C,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAE5F,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,CAAC;IACpB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,OAAO,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,yBAAyB,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC/F,GAAG,EAAE,yBAAyB,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,cAAc,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,qBAAqB,GAAG,WAAW,CAExE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMlD;AAED,sFAAsF;AACtF,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAoBzD;AAcD,wBAAsB,YAAY,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAwCzF"}
1
+ {"version":3,"file":"staging.d.ts","sourceRoot":"","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zD;AAcD,wBAAsB,YAAY,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAsCzF"}
@@ -4,6 +4,47 @@ import { basename } from 'node:path';
4
4
  import { mkdirSyncReal, safePath, toForwardSlash } from '@vibe-agent-toolkit/utils';
5
5
  import { assertSafeHarnessRoot } from './harness-location.js';
6
6
  import { StagedManifestSchema } from './manifest.js';
7
+ /**
8
+ * Stage a single item's resolved contents into the harness, choosing flat vs
9
+ * plugin-root layout. Returns the staged dirs that callers care about:
10
+ * - `pluginDir` → pushed to `--plugin-dir` (the plugin root for plugin skills,
11
+ * else the flat skill dir).
12
+ * - `skillDir` → where the skill's own files (incl. evals/) actually live.
13
+ * - `pluginRoot` → the staged plugin root, or null for a standalone skill.
14
+ */
15
+ function stageOneItem(harnessRoot, item, resolvedStagedDir) {
16
+ if (item.pluginLayout === undefined) {
17
+ // Standalone: flat dest, exactly as before. item.name may be an absolute path
18
+ // (the positional CLI arg) — never join it raw. See stagedDirName.
19
+ const dest = safePath.joinUnderRoot(harnessRoot, stagedDirName(item.name));
20
+ // v1 re-stages fully every run; wipe dest first so each re-stage is a clean
21
+ // mirror of source (a stale staged evals/evals.json must not survive).
22
+ rmSync(dest, { recursive: true, force: true });
23
+ cpSync(resolvedStagedDir, dest, { recursive: true });
24
+ return { pluginDir: dest, skillDir: dest, pluginRoot: null };
25
+ }
26
+ // Plugin-distributed: recreate the real plugin-root layout so the harness
27
+ // mirrors a real install. The plugin name (basename of the real plugin dir)
28
+ // becomes the single sanitized staged segment. `realPluginDir` is a READ source
29
+ // (the true on-disk plugin), not a write-containment root — hence safePath.join,
30
+ // not joinUnderRoot; only the staging DESTS below use joinUnderRoot.
31
+ const { pluginRoot: realPluginDir, relPathUnderPlugin } = item.pluginLayout;
32
+ const pluginName = basename(toForwardSlash(realPluginDir));
33
+ const pluginStageRoot = safePath.joinUnderRoot(harnessRoot, stagedDirName(pluginName));
34
+ rmSync(pluginStageRoot, { recursive: true, force: true });
35
+ // Copy the plugin's manifest dir (`.claude-plugin/`) from the REAL source so the
36
+ // staged tree is recognized as a plugin.
37
+ const realManifestDir = safePath.join(realPluginDir, '.claude-plugin');
38
+ const stagedManifestDir = safePath.joinUnderRoot(pluginStageRoot, '.claude-plugin');
39
+ mkdirSyncReal(stagedManifestDir, { recursive: true });
40
+ cpSync(realManifestDir, stagedManifestDir, { recursive: true });
41
+ // Copy the skill contents (the resolved flat copy) INTO the nested skill slot so
42
+ // `${pluginStageRoot}/skills/<name>/...` resolves like a real install.
43
+ const stagedSkillDir = safePath.joinUnderRoot(pluginStageRoot, relPathUnderPlugin);
44
+ mkdirSyncReal(stagedSkillDir, { recursive: true });
45
+ cpSync(resolvedStagedDir, stagedSkillDir, { recursive: true });
46
+ return { pluginDir: pluginStageRoot, skillDir: stagedSkillDir, pluginRoot: pluginStageRoot };
47
+ }
7
48
  /**
8
49
  * Map a config descriptor onto Plan 1's runtime SkillSource union.
9
50
  *
@@ -58,7 +99,7 @@ export function computeDirContentHash(dir) {
58
99
  return hash.digest('hex');
59
100
  }
60
101
  function readExistingManifest(harnessRoot) {
61
- const manifestPath = safePath.join(harnessRoot, 'staged.manifest.json');
102
+ const manifestPath = safePath.joinUnderRoot(harnessRoot, 'staged.manifest.json');
62
103
  // eslint-disable-next-line security/detect-non-literal-fs-filename -- our own harness root
63
104
  if (!existsSync(manifestPath))
64
105
  return null;
@@ -78,30 +119,27 @@ export async function stageHarness(opts) {
78
119
  const entries = [];
79
120
  const pluginDirs = [];
80
121
  let subjectStagedDir = null;
122
+ let subjectPluginRoot = null;
81
123
  for (const item of opts.items) {
82
124
  const resolved = await opts.resolve(item.source, opts.ctx);
83
- // item.name may be an absolute/relative path (the subject is the positional
84
- // CLI arg) never join it raw (drive-letter-mid-path on Windows). Always
85
- // stage under one sanitized segment. See stagedDirName.
86
- const dest = safePath.join(opts.harnessRoot, stagedDirName(item.name));
87
- // v1 re-stages fully every run. The harness root is reused on a deterministic
88
- // key, so wipe dest first — cpSync overlays and would leave files dropped from
89
- // source behind (a stale staged evals/evals.json wrongly satisfies the
90
- // bootstrap check). Pruning makes each re-stage a clean mirror of source.
91
- rmSync(dest, { recursive: true, force: true });
92
- cpSync(resolved.stagedDir, dest, { recursive: true });
93
- const contentHash = computeDirContentHash(dest);
125
+ // Stage flat (standalone) or under the real plugin-root layout (plugin skill).
126
+ const { pluginDir, skillDir, pluginRoot } = stageOneItem(opts.harnessRoot, item, resolved.stagedDir);
127
+ // Content-hash the staged plugin dir (the whole thing pushed to --plugin-dir),
128
+ // so a change to the plugin manifest OR the skill body invalidates the entry.
129
+ const contentHash = computeDirContentHash(pluginDir);
94
130
  entries.push({ name: item.name, identity: resolved.identity, contentHash });
95
- pluginDirs.push(dest);
96
- if (item.role === 'subject')
97
- subjectStagedDir = dest;
131
+ pluginDirs.push(pluginDir);
132
+ if (item.role === 'subject') {
133
+ subjectStagedDir = skillDir;
134
+ subjectPluginRoot = pluginRoot;
135
+ }
98
136
  }
99
137
  const fingerprint = createHash('sha256')
100
138
  .update(entries.map(e => `${e.name}:${e.identity}:${e.contentHash}`).join('|'))
101
139
  .digest('hex');
102
140
  const manifest = { fingerprint, entries };
103
141
  // eslint-disable-next-line security/detect-non-literal-fs-filename -- our own harness root
104
- writeFileSync(safePath.join(opts.harnessRoot, 'staged.manifest.json'), JSON.stringify(manifest, null, 2) + '\n', 'utf8');
105
- return { manifest, pluginDirs, subjectStagedDir };
142
+ writeFileSync(safePath.joinUnderRoot(opts.harnessRoot, 'staged.manifest.json'), JSON.stringify(manifest, null, 2) + '\n', 'utf8');
143
+ return { manifest, pluginDirs, subjectStagedDir, subjectPluginRoot };
106
144
  }
107
145
  //# sourceMappingURL=staging.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"staging.js","sourceRoot":"","sources":["../../src/skill-test/staging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,UAA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AU,CAAC,QAAQ,CAAC;SACrC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC9E,MAAM,CAAC,KAAK,CAAC,CAAC;IACjB,MAAM,QAAQ,GAAmB,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;IAC1D,2FAA2F;IAC3F,aAAa,CACX,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,sBAAsB,CAAC,EAChE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EACxC,MAAM,CACP,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAC;AACvE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibe-agent-toolkit/agent-skills",
3
- "version": "0.1.39-rc.8",
3
+ "version": "0.1.39-rc.9",
4
4
  "description": "Build, validate, and package agent skills in the Agent Skills format",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -29,10 +29,10 @@
29
29
  "typecheck": "tsc --noEmit"
30
30
  },
31
31
  "dependencies": {
32
- "@vibe-agent-toolkit/agent-config": "0.1.39-rc.8",
33
- "@vibe-agent-toolkit/agent-schema": "0.1.39-rc.8",
34
- "@vibe-agent-toolkit/resources": "0.1.39-rc.8",
35
- "@vibe-agent-toolkit/utils": "0.1.39-rc.8",
32
+ "@vibe-agent-toolkit/agent-config": "0.1.39-rc.9",
33
+ "@vibe-agent-toolkit/agent-schema": "0.1.39-rc.9",
34
+ "@vibe-agent-toolkit/resources": "0.1.39-rc.9",
35
+ "@vibe-agent-toolkit/utils": "0.1.39-rc.9",
36
36
  "adm-zip": "^0.5.16",
37
37
  "picomatch": "^4.0.3",
38
38
  "yaml": "^2.6.1",