@vibe-agent-toolkit/agent-skills 0.1.39-rc.8 → 0.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/files-config.d.ts +61 -0
- package/dist/files-config.d.ts.map +1 -1
- package/dist/files-config.js +262 -6
- package/dist/files-config.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/plugin-distribution-layout.d.ts +70 -0
- package/dist/plugin-distribution-layout.d.ts.map +1 -0
- package/dist/plugin-distribution-layout.js +97 -0
- package/dist/plugin-distribution-layout.js.map +1 -0
- package/dist/skill-packager.d.ts +43 -1
- package/dist/skill-packager.d.ts.map +1 -1
- package/dist/skill-packager.js +131 -53
- package/dist/skill-packager.js.map +1 -1
- package/dist/skill-source/git-clone.d.ts +2 -2
- package/dist/skill-source/git-clone.d.ts.map +1 -1
- package/dist/skill-source/git-clone.js +33 -10
- package/dist/skill-source/git-clone.js.map +1 -1
- package/dist/skill-source/sources/url-source.d.ts.map +1 -1
- package/dist/skill-source/sources/url-source.js +23 -8
- package/dist/skill-source/sources/url-source.js.map +1 -1
- package/dist/skill-source/sources/workspace-source.d.ts.map +1 -1
- package/dist/skill-source/sources/workspace-source.js +16 -8
- package/dist/skill-source/sources/workspace-source.js.map +1 -1
- package/dist/skill-source/stage.js +6 -2
- package/dist/skill-source/stage.js.map +1 -1
- package/dist/skill-test/build-hook.d.ts +58 -0
- package/dist/skill-test/build-hook.d.ts.map +1 -0
- package/dist/skill-test/build-hook.js +63 -0
- package/dist/skill-test/build-hook.js.map +1 -0
- package/dist/skill-test/configure-writer.d.ts +19 -11
- package/dist/skill-test/configure-writer.d.ts.map +1 -1
- package/dist/skill-test/configure-writer.js +23 -15
- package/dist/skill-test/configure-writer.js.map +1 -1
- package/dist/skill-test/declared-env.d.ts +72 -0
- package/dist/skill-test/declared-env.d.ts.map +1 -0
- package/dist/skill-test/declared-env.js +85 -0
- package/dist/skill-test/declared-env.js.map +1 -0
- package/dist/skill-test/eval-inputs.d.ts +159 -0
- package/dist/skill-test/eval-inputs.d.ts.map +1 -0
- package/dist/skill-test/eval-inputs.js +158 -0
- package/dist/skill-test/eval-inputs.js.map +1 -0
- package/dist/skill-test/evals-template.d.ts.map +1 -1
- package/dist/skill-test/evals-template.js +27 -10
- package/dist/skill-test/evals-template.js.map +1 -1
- package/dist/skill-test/exit-codes.d.ts +44 -5
- package/dist/skill-test/exit-codes.d.ts.map +1 -1
- package/dist/skill-test/exit-codes.js +63 -9
- package/dist/skill-test/exit-codes.js.map +1 -1
- package/dist/skill-test/experimenter-prompt.d.ts +22 -0
- package/dist/skill-test/experimenter-prompt.d.ts.map +1 -1
- package/dist/skill-test/experimenter-prompt.js +39 -2
- package/dist/skill-test/experimenter-prompt.js.map +1 -1
- package/dist/skill-test/grading-adapter.d.ts +42 -0
- package/dist/skill-test/grading-adapter.d.ts.map +1 -1
- package/dist/skill-test/grading-adapter.js +63 -1
- package/dist/skill-test/grading-adapter.js.map +1 -1
- package/dist/skill-test/grading-schema.d.ts +73 -5
- package/dist/skill-test/grading-schema.d.ts.map +1 -1
- package/dist/skill-test/grading-schema.js +20 -5
- package/dist/skill-test/grading-schema.js.map +1 -1
- package/dist/skill-test/harness-location.d.ts +35 -4
- package/dist/skill-test/harness-location.d.ts.map +1 -1
- package/dist/skill-test/harness-location.js +111 -16
- package/dist/skill-test/harness-location.js.map +1 -1
- package/dist/skill-test/index.d.ts +7 -4
- package/dist/skill-test/index.d.ts.map +1 -1
- package/dist/skill-test/index.js +7 -4
- package/dist/skill-test/index.js.map +1 -1
- package/dist/skill-test/lock.d.ts +23 -0
- package/dist/skill-test/lock.d.ts.map +1 -1
- package/dist/skill-test/lock.js +35 -1
- package/dist/skill-test/lock.js.map +1 -1
- package/dist/skill-test/plugin-env.d.ts +20 -0
- package/dist/skill-test/plugin-env.d.ts.map +1 -0
- package/dist/skill-test/plugin-env.js +24 -0
- package/dist/skill-test/plugin-env.js.map +1 -0
- package/dist/skill-test/plugin-layout.d.ts +41 -0
- package/dist/skill-test/plugin-layout.d.ts.map +1 -0
- package/dist/skill-test/plugin-layout.js +49 -0
- package/dist/skill-test/plugin-layout.js.map +1 -0
- package/dist/skill-test/preflight.d.ts.map +1 -1
- package/dist/skill-test/preflight.js +1 -2
- package/dist/skill-test/preflight.js.map +1 -1
- package/dist/skill-test/run-harness.d.ts +197 -11
- package/dist/skill-test/run-harness.d.ts.map +1 -1
- package/dist/skill-test/run-harness.js +401 -65
- package/dist/skill-test/run-harness.js.map +1 -1
- package/dist/skill-test/staging.d.ts +20 -1
- package/dist/skill-test/staging.d.ts.map +1 -1
- package/dist/skill-test/staging.js +71 -17
- package/dist/skill-test/staging.js.map +1 -1
- package/dist/skill-test/vendor-manifest.d.ts +3 -3
- package/dist/skill-test/vendor-manifest.d.ts.map +1 -1
- package/dist/skill-test/vendor-manifest.js +13 -3
- package/dist/skill-test/vendor-manifest.js.map +1 -1
- package/dist/validators/packaging-validator.d.ts.map +1 -1
- package/dist/validators/packaging-validator.js +134 -1
- package/dist/validators/packaging-validator.js.map +1 -1
- package/dist/validators/skill-validator.d.ts.map +1 -1
- package/dist/validators/skill-validator.js +18 -14
- package/dist/validators/skill-validator.js.map +1 -1
- package/dist/walk-link-graph.d.ts.map +1 -1
- package/dist/walk-link-graph.js +26 -1
- package/dist/walk-link-graph.js.map +1 -1
- package/package.json +6 -5
|
@@ -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
|
|
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;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAgBpE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAkBpD;AAkDD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,EAClB,WAAW,GAAE,MAA2B,GACvC,IAAI,CAkBN"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
|
-
import { existsSync, lstatSync, statSync } from 'node:fs';
|
|
3
|
-
import { normalizedTmpdir, safePath } from '@vibe-agent-toolkit/utils';
|
|
2
|
+
import { chmodSync, existsSync, lstatSync, statSync } from 'node:fs';
|
|
3
|
+
import { isAbsolutePath, normalizedTmpdir, safePath } from '@vibe-agent-toolkit/utils';
|
|
4
4
|
/** Harness-location failure — maps to exit code 2. */
|
|
5
5
|
export class HarnessLocationError extends Error {
|
|
6
6
|
exitCode = 2;
|
|
@@ -36,11 +36,20 @@ export function resolveHarnessRoot(skillNames, tmpRoot) {
|
|
|
36
36
|
* Refuse a --workdir whose ancestry contains CLAUDE.md or .claude/ — cwd
|
|
37
37
|
* discovery would re-pollute the run (spec §7). Defense in depth with
|
|
38
38
|
* --setting-sources "".
|
|
39
|
+
*
|
|
40
|
+
* `stopAt` (optional) bounds the ancestry walk: when the walk reaches that
|
|
41
|
+
* directory it stops *before* inspecting it (exclusive boundary), mirroring
|
|
42
|
+
* `assertSafeHarnessRoot`'s `trustedRoot`. Default (undefined) walks to the
|
|
43
|
+
* filesystem root, preserving the strictest production behavior. Tests use it
|
|
44
|
+
* to scope the walk to a sandbox — necessary on Windows, where the OS tmp dir
|
|
45
|
+
* lives inside the user's home and would otherwise surface an ambient
|
|
46
|
+
* ~/.claude during the walk.
|
|
39
47
|
*/
|
|
40
|
-
export function assertSafeWorkdir(dir) {
|
|
48
|
+
export function assertSafeWorkdir(dir, stopAt) {
|
|
49
|
+
const boundary = stopAt === undefined ? undefined : safePath.resolve(stopAt);
|
|
41
50
|
let current = safePath.resolve(dir);
|
|
42
51
|
let previous = '';
|
|
43
|
-
while (current !== previous) {
|
|
52
|
+
while (current !== previous && current !== boundary) {
|
|
44
53
|
// eslint-disable-next-line security/detect-non-literal-fs-filename -- ancestry walk over a user-supplied workdir
|
|
45
54
|
if (existsSync(safePath.join(current, 'CLAUDE.md'))) {
|
|
46
55
|
throw new HarnessLocationError(`--workdir is inside a project: CLAUDE.md found at ${current}. Use an OS-tmp location.`);
|
|
@@ -54,28 +63,114 @@ export function assertSafeWorkdir(dir) {
|
|
|
54
63
|
}
|
|
55
64
|
}
|
|
56
65
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
66
|
+
* Prepare the harness root directory so that `assertSafeHarnessRoot` will
|
|
67
|
+
* pass on the next call. If the path does not exist, this is a no-op (the
|
|
68
|
+
* caller creates it at 0700 via mkdirSyncReal). If it exists:
|
|
69
|
+
*
|
|
70
|
+
* - Symlink → throw HarnessLocationError (security gate; never relax).
|
|
71
|
+
* - Real directory whose mode != 0700 → chmod to 0700. Removing group/other
|
|
72
|
+
* access is strictly safer, never a relaxation.
|
|
73
|
+
*
|
|
74
|
+
* Mode checks/changes are only performed on non-win32 (matching
|
|
75
|
+
* assertSafeHarnessRoot's platform guard).
|
|
61
76
|
*/
|
|
62
|
-
export function
|
|
77
|
+
export function prepareHarnessRoot(dir) {
|
|
63
78
|
// eslint-disable-next-line security/detect-non-literal-fs-filename -- our own derived harness root
|
|
64
79
|
if (!existsSync(dir))
|
|
65
|
-
return;
|
|
80
|
+
return;
|
|
66
81
|
// eslint-disable-next-line security/detect-non-literal-fs-filename -- our own derived harness root
|
|
67
82
|
const ls = lstatSync(dir);
|
|
68
83
|
if (ls.isSymbolicLink()) {
|
|
69
84
|
throw new HarnessLocationError(`Refusing to use a symlinked harness root: ${dir}.`);
|
|
70
85
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
86
|
+
if (process.platform !== 'win32') {
|
|
87
|
+
// eslint-disable-next-line security/detect-non-literal-fs-filename -- our own derived harness root
|
|
88
|
+
const mode = statSync(dir).mode & 0o777;
|
|
89
|
+
if (mode !== 0o700) {
|
|
90
|
+
// eslint-disable-next-line security/detect-non-literal-fs-filename -- our own derived harness root
|
|
91
|
+
chmodSync(dir, 0o700);
|
|
92
|
+
}
|
|
75
93
|
}
|
|
76
|
-
|
|
94
|
+
}
|
|
95
|
+
/** True when `child` is a strict descendant of `root` (neither equal nor escaping). */
|
|
96
|
+
function isStrictlyUnder(root, child) {
|
|
97
|
+
if (child === root)
|
|
98
|
+
return false;
|
|
99
|
+
const rel = safePath.relative(root, child);
|
|
100
|
+
return rel !== '' && rel !== '..' && !rel.startsWith('../') && !isAbsolutePath(rel);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* The harness path components to validate, leaf-first: the leaf and every
|
|
104
|
+
* ancestor strictly between it and `trustedRoot` (exclusive). When the leaf is
|
|
105
|
+
* not a descendant of `trustedRoot` (e.g. an explicit --out elsewhere), only the
|
|
106
|
+
* leaf is returned — we cannot bound the walk without a trusted boundary, so we
|
|
107
|
+
* fall back to leaf-only validation.
|
|
108
|
+
*/
|
|
109
|
+
function harnessAncestry(leaf, trustedRoot) {
|
|
110
|
+
if (!isStrictlyUnder(trustedRoot, leaf))
|
|
111
|
+
return [leaf];
|
|
112
|
+
const components = [];
|
|
113
|
+
let current = leaf;
|
|
114
|
+
while (current !== trustedRoot) {
|
|
115
|
+
const parent = safePath.join(current, '..');
|
|
116
|
+
if (parent === current)
|
|
117
|
+
break; // reached the filesystem root defensively
|
|
118
|
+
components.push(current);
|
|
119
|
+
current = parent;
|
|
120
|
+
}
|
|
121
|
+
return components;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Reject a single harness path component that is a symlink or not owned by the
|
|
125
|
+
* current user. A non-existent component is skipped (an absent ancestor cannot
|
|
126
|
+
* be a live attacker-controlled symlink). On Windows the ownership check is
|
|
127
|
+
* skipped (no real uids); the symlink refusal still applies.
|
|
128
|
+
*/
|
|
129
|
+
function assertComponentSafe(component, currentUid) {
|
|
130
|
+
// eslint-disable-next-line security/detect-non-literal-fs-filename -- our own derived harness path component
|
|
131
|
+
if (!existsSync(component))
|
|
132
|
+
return;
|
|
133
|
+
// eslint-disable-next-line security/detect-non-literal-fs-filename -- our own derived harness path component
|
|
134
|
+
const ls = lstatSync(component);
|
|
135
|
+
if (ls.isSymbolicLink()) {
|
|
136
|
+
throw new HarnessLocationError(`Refusing to use a symlinked harness path component: ${component}.`);
|
|
137
|
+
}
|
|
138
|
+
if (process.platform !== 'win32' && typeof ls.uid === 'number' && ls.uid !== currentUid) {
|
|
139
|
+
throw new HarnessLocationError(`Harness path component ${component} is not owned by the current user (uid ${ls.uid} != ${currentUid}).`);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* FS-bound hardening for the shared-tmp harness root (spec §7). Validates EVERY
|
|
144
|
+
* path component from the leaf up to (but excluding) `trustedRoot`: no component
|
|
145
|
+
* may be a symlink, and on POSIX each must be owned by the current uid. This
|
|
146
|
+
* closes the shared-/tmp TOCTOU where the recursively-created intermediate parent
|
|
147
|
+
* (`<tmp>/vat-skill-test`) — not just the leaf — could be pre-created as a symlink
|
|
148
|
+
* or under another user's ownership. The leaf must additionally be 0700.
|
|
149
|
+
*
|
|
150
|
+
* `trustedRoot` (default: the OS tmp dir) is the boundary: it is system-owned
|
|
151
|
+
* (sticky-bit /tmp) so ownership/mode checks are not applied to it. When the leaf
|
|
152
|
+
* is not a descendant of `trustedRoot` (an explicit --out elsewhere), validation
|
|
153
|
+
* degrades to the leaf alone.
|
|
154
|
+
*
|
|
155
|
+
* Integration-tested (requires real lstat/stat). On Windows, uid checks are
|
|
156
|
+
* skipped (process.getuid is undefined) but the symlink refusal still applies.
|
|
157
|
+
*/
|
|
158
|
+
export function assertSafeHarnessRoot(dir, currentUid, trustedRoot = normalizedTmpdir()) {
|
|
159
|
+
const resolved = safePath.resolve(dir);
|
|
160
|
+
// eslint-disable-next-line local/no-unsafe-root-join -- single-arg normalization of the trusted boundary itself (no caller-controlled segment is joined here); it is only used as an equality boundary for the ancestry walk.
|
|
161
|
+
const root = safePath.resolve(trustedRoot);
|
|
162
|
+
for (const component of harnessAncestry(resolved, root)) {
|
|
163
|
+
assertComponentSafe(component, currentUid);
|
|
164
|
+
}
|
|
165
|
+
// Leaf-only 0700 check (intermediates are created 0700 by recursive mkdir and
|
|
166
|
+
// need only the symlink/ownership guarantees above). Skipped on win32.
|
|
167
|
+
// eslint-disable-next-line security/detect-non-literal-fs-filename -- our own derived harness root
|
|
168
|
+
if (!existsSync(resolved))
|
|
169
|
+
return; // not yet created — caller creates it 0700
|
|
170
|
+
// eslint-disable-next-line security/detect-non-literal-fs-filename -- our own derived harness root
|
|
171
|
+
const mode = statSync(resolved).mode & 0o777;
|
|
77
172
|
if (mode !== 0o700 && process.platform !== 'win32') {
|
|
78
|
-
throw new HarnessLocationError(`Harness root ${
|
|
173
|
+
throw new HarnessLocationError(`Harness root ${resolved} must be 0700 (found ${mode.toString(8)}).`);
|
|
79
174
|
}
|
|
80
175
|
}
|
|
81
176
|
//# sourceMappingURL=harness-location.js.map
|
|
@@ -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;
|
|
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,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAErE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEvF,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,s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AC;IACJ,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,qBAAqB,CACnC,GAAW,EACX,UAAkB,EAClB,cAAsB,gBAAgB,EAAE;IAExC,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACvC,8NAA8N;IAC9N,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAE3C,KAAK,MAAM,SAAS,IAAI,eAAe,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC;QACxD,mBAAmB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC7C,CAAC;IAED,8EAA8E;IAC9E,uEAAuE;IACvE,mGAAmG;IACnG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,CAAC,2CAA2C;IAC9E,mGAAmG;IACnG,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC;IAC7C,IAAI,IAAI,KAAK,KAAK,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACnD,MAAM,IAAI,oBAAoB,CAAC,gBAAgB,QAAQ,wBAAwB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACvG,CAAC;AACH,CAAC"}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
export { EvalEntrySchema, EvalInputError, EvalSuiteSchema, parseEvalSuite, stageEvalWorkspaces, type EvalEntry, type EvalSuite, type StageEvalWorkspacesInput, } from './eval-inputs.js';
|
|
1
2
|
export { FrictionCategorySchema, FrictionItemSchema, FrictionReportJsonSchema, FrictionReportSchema, FrictionSeveritySchema, type FrictionItem, type FrictionReport, } from './friction-schema.js';
|
|
2
|
-
export { GradingSkewError, parseGradingJson, type NormalizedGrading } from './grading-adapter.js';
|
|
3
|
+
export { assertGradingNonce, GradingNonceError, GradingSkewError, parseGradingJson, reconcileGrading, type GradingVerdict, type NormalizedGrading, } from './grading-adapter.js';
|
|
3
4
|
export { GradedExpectationSchema, GradingReportJsonSchema, GradingReportSchema, GradingSummarySchema, type GradedExpectation, type GradingReport, type GradingSummary, } from './grading-schema.js';
|
|
4
5
|
export { assertSafeHarnessRoot, assertSafeWorkdir, deriveHarnessKey, HarnessLocationError, resolveHarnessRoot, } from './harness-location.js';
|
|
5
6
|
export { computeReconcilePlan, StagedEntrySchema, StagedManifestSchema, type ReconcilePlan, type StagedEntry, type StagedManifest, } from './manifest.js';
|
|
6
|
-
export {
|
|
7
|
+
export { assembleChildEnv, computeEnvTokens, interpolateEnvValue, resolveInjectEnv, UnknownEnvTokenError, type AssembleChildEnvInput, type AssembledChildEnv, type EnvInterpolationTokens, type EnvTokenInputs, } from './declared-env.js';
|
|
8
|
+
export { BootstrapNeededError, InternalHarnessError, mapErrorToExitCode, SecurityAckError, SkillBuildError, SkillTestExitCode, type SkillTestExitCodeValue, } from './exit-codes.js';
|
|
9
|
+
export { BuildHookError, runPreStageBuild } from './build-hook.js';
|
|
7
10
|
export { runPreflight, type PreflightCheck, type PreflightInput, type PreflightResult, } from './preflight.js';
|
|
8
|
-
export { assertPromptInvariants, buildExperimenterPrompt, DEFAULT_EXPERIMENTER_PROMPT, PromptInvariantError, type BuildPromptOptions, } from './experimenter-prompt.js';
|
|
11
|
+
export { appendIntegrityNonceDirective, assertPromptInvariants, buildExperimenterPrompt, DEFAULT_EXPERIMENTER_PROMPT, PromptInvariantError, redactNonce, REDACTED_NONCE_PLACEHOLDER, type BuildPromptOptions, } from './experimenter-prompt.js';
|
|
9
12
|
export { acquireHarnessLock, HarnessLockBusyError, type HarnessLock } from './lock.js';
|
|
10
13
|
export { computeDirContentHash, descriptorToSource, stagedDirName, stageHarness, type StageHarnessOptions, type StageHarnessResult, type StageItem, } from './staging.js';
|
|
11
14
|
export { regenerateVendoredManifest, verifyVendoredManifest, VendoredManifestSchema } from './vendor-manifest.js';
|
|
12
15
|
export { upsertTestConfig } from './configure-writer.js';
|
|
13
16
|
export { buildEvalsTemplate, writeEvalsTemplate } from './evals-template.js';
|
|
14
|
-
export { runSkillTestHarness, type RunHarnessOptions, type RunHarnessResult, } from './run-harness.js';
|
|
17
|
+
export { buildDryRunSummary, isAcknowledged, runSkillTestHarness, SKILL_TEST_BUILTIN_CAPS, verdictExitCode, type DryRunSummaryInput, type RunHarnessOptions, type RunHarnessResult, } from './run-harness.js';
|
|
15
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/skill-test/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,KAAK,YAAY,EACjB,KAAK,cAAc,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/skill-test/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,cAAc,EACd,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,wBAAwB,GAC9B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,KAAK,YAAY,EACjB,KAAK,cAAc,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,cAAc,EACnB,KAAK,iBAAiB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,cA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BAAsB,CAAC;AAClH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,EACf,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,GACtB,MAAM,kBAAkB,CAAC"}
|
package/dist/skill-test/index.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
export { EvalEntrySchema, EvalInputError, EvalSuiteSchema, parseEvalSuite, stageEvalWorkspaces, } from './eval-inputs.js';
|
|
1
2
|
export { FrictionCategorySchema, FrictionItemSchema, FrictionReportJsonSchema, FrictionReportSchema, FrictionSeveritySchema, } from './friction-schema.js';
|
|
2
|
-
export { GradingSkewError, parseGradingJson } from './grading-adapter.js';
|
|
3
|
+
export { assertGradingNonce, GradingNonceError, GradingSkewError, parseGradingJson, reconcileGrading, } from './grading-adapter.js';
|
|
3
4
|
export { GradedExpectationSchema, GradingReportJsonSchema, GradingReportSchema, GradingSummarySchema, } from './grading-schema.js';
|
|
4
5
|
export { assertSafeHarnessRoot, assertSafeWorkdir, deriveHarnessKey, HarnessLocationError, resolveHarnessRoot, } from './harness-location.js';
|
|
5
6
|
export { computeReconcilePlan, StagedEntrySchema, StagedManifestSchema, } from './manifest.js';
|
|
6
|
-
export {
|
|
7
|
+
export { assembleChildEnv, computeEnvTokens, interpolateEnvValue, resolveInjectEnv, UnknownEnvTokenError, } from './declared-env.js';
|
|
8
|
+
export { BootstrapNeededError, InternalHarnessError, mapErrorToExitCode, SecurityAckError, SkillBuildError, SkillTestExitCode, } from './exit-codes.js';
|
|
9
|
+
export { BuildHookError, runPreStageBuild } from './build-hook.js';
|
|
7
10
|
export { runPreflight, } from './preflight.js';
|
|
8
|
-
export { assertPromptInvariants, buildExperimenterPrompt, DEFAULT_EXPERIMENTER_PROMPT, PromptInvariantError, } from './experimenter-prompt.js';
|
|
11
|
+
export { appendIntegrityNonceDirective, assertPromptInvariants, buildExperimenterPrompt, DEFAULT_EXPERIMENTER_PROMPT, PromptInvariantError, redactNonce, REDACTED_NONCE_PLACEHOLDER, } from './experimenter-prompt.js';
|
|
9
12
|
export { acquireHarnessLock, HarnessLockBusyError } from './lock.js';
|
|
10
13
|
export { computeDirContentHash, descriptorToSource, stagedDirName, stageHarness, } from './staging.js';
|
|
11
14
|
export { regenerateVendoredManifest, verifyVendoredManifest, VendoredManifestSchema } from './vendor-manifest.js';
|
|
12
15
|
export { upsertTestConfig } from './configure-writer.js';
|
|
13
16
|
export { buildEvalsTemplate, writeEvalsTemplate } from './evals-template.js';
|
|
14
|
-
export { runSkillTestHarness, } from './run-harness.js';
|
|
17
|
+
export { buildDryRunSummary, isAcknowledged, runSkillTestHarness, SKILL_TEST_BUILTIN_CAPS, verdictExitCode, } from './run-harness.js';
|
|
15
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/skill-test/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,GAGvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/skill-test/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,cAAc,EACd,eAAe,EACf,cAAc,EACd,mBAAmB,GAIpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,GAGvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GAGjB,MA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MAAM,kBAAkB,CAAC"}
|
|
@@ -13,4 +13,27 @@ export interface HarnessLock {
|
|
|
13
13
|
export declare function acquireHarnessLock(harnessRoot: string, opts?: {
|
|
14
14
|
wait?: boolean;
|
|
15
15
|
}): HarnessLock;
|
|
16
|
+
export interface InstallSignalCleanupOptions {
|
|
17
|
+
/**
|
|
18
|
+
* Invoked once on the first trapped signal, BEFORE exiting — the place to
|
|
19
|
+
* release the harness lock and remove the harness dir so a Ctrl-C mid-run does
|
|
20
|
+
* not leave `.vat-skill-test.lock` (or staged untrusted bytes) behind.
|
|
21
|
+
*/
|
|
22
|
+
onSignal: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* Exit hook, injectable for tests. Defaults to `process.exit`. Called with the
|
|
25
|
+
* conventional 128+signal code so the signal is honored, not swallowed.
|
|
26
|
+
*/
|
|
27
|
+
exit?: (code: number) => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Trap SIGINT/SIGTERM while the harness lock is held. On the first such signal
|
|
31
|
+
* the handler removes ITSELF (no listener leak, no re-entry), runs `onSignal`
|
|
32
|
+
* (release lock + clean up), then exits with the conventional 128+signal code.
|
|
33
|
+
*
|
|
34
|
+
* Returns a disposer that removes the handlers — the caller MUST call it on
|
|
35
|
+
* normal completion so listeners do not accumulate across runs in a long-lived
|
|
36
|
+
* process (and so tests stay isolated).
|
|
37
|
+
*/
|
|
38
|
+
export declare function installSignalCleanup(opts: InstallSignalCleanupOptions): () => void;
|
|
16
39
|
//# sourceMappingURL=lock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../src/skill-test/lock.ts"],"names":[],"mappings":"AAIA,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,QAAQ,EAAE,MAAM;CAI7B;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,GAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,WAAW,CAwBlG"}
|
|
1
|
+
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../src/skill-test/lock.ts"],"names":[],"mappings":"AAIA,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,QAAQ,EAAE,MAAM;CAI7B;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,GAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,WAAW,CAwBlG;AAWD,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,2BAA2B,GAAG,MAAM,IAAI,CAgBlF"}
|
package/dist/skill-test/lock.js
CHANGED
|
@@ -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.
|
|
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;
|
|
@@ -39,4 +39,38 @@ export function acquireHarnessLock(harnessRoot, opts = {}) {
|
|
|
39
39
|
},
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
+
/** Conventional shell exit-code base for a process terminated by a signal. */
|
|
43
|
+
const SIGNAL_EXIT_BASE = 128;
|
|
44
|
+
/** Signals we trap so an interrupted run cleans up instead of leaking the lock. */
|
|
45
|
+
const SIGNAL_NUMBERS = [
|
|
46
|
+
['SIGINT', 2],
|
|
47
|
+
['SIGTERM', 15],
|
|
48
|
+
];
|
|
49
|
+
/**
|
|
50
|
+
* Trap SIGINT/SIGTERM while the harness lock is held. On the first such signal
|
|
51
|
+
* the handler removes ITSELF (no listener leak, no re-entry), runs `onSignal`
|
|
52
|
+
* (release lock + clean up), then exits with the conventional 128+signal code.
|
|
53
|
+
*
|
|
54
|
+
* Returns a disposer that removes the handlers — the caller MUST call it on
|
|
55
|
+
* normal completion so listeners do not accumulate across runs in a long-lived
|
|
56
|
+
* process (and so tests stay isolated).
|
|
57
|
+
*/
|
|
58
|
+
export function installSignalCleanup(opts) {
|
|
59
|
+
const exit = opts.exit ?? ((code) => { process.exit(code); });
|
|
60
|
+
const registered = [];
|
|
61
|
+
const remove = () => {
|
|
62
|
+
for (const [sig, handler] of registered)
|
|
63
|
+
process.off(sig, handler);
|
|
64
|
+
};
|
|
65
|
+
for (const [sig, num] of SIGNAL_NUMBERS) {
|
|
66
|
+
const handler = () => {
|
|
67
|
+
remove();
|
|
68
|
+
opts.onSignal();
|
|
69
|
+
exit(SIGNAL_EXIT_BASE + num);
|
|
70
|
+
};
|
|
71
|
+
process.on(sig, handler);
|
|
72
|
+
registered.push([sig, handler]);
|
|
73
|
+
}
|
|
74
|
+
return remove;
|
|
75
|
+
}
|
|
42
76
|
//# sourceMappingURL=lock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.js","sourceRoot":"","sources":["../../src/skill-test/lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEtD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IA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-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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../src/skill-test/preflight.ts"],"names":[],"mappings":"AAEA,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IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,kBAAkB,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IACxC,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC1C,SAAS,EAAE,eAAe,CAAC;IAC3B,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,YAAY,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACzG,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC,UAAU,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;CACnC;AAeD,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,GAAG,eAAe,CA4DnE"}
|
|
@@ -30,8 +30,7 @@ export function runPreflight(input) {
|
|
|
30
30
|
}
|
|
31
31
|
checks.push(input.integrityOk()
|
|
32
32
|
? { name: 'vendored skill-creator integrity', passed: true, message: 'manifest verified' }
|
|
33
|
-
: { name: 'vendored skill-creator integrity', passed: false, message: 'hash manifest mismatch', suggestion: 'Re-sync the vendored copy.' });
|
|
34
|
-
checks.push(checkExists('eval input files', input.evalInputPaths), checkExists('declared dependencies', input.declaredDepDirs));
|
|
33
|
+
: { name: 'vendored skill-creator integrity', passed: false, message: 'hash manifest mismatch', suggestion: 'Re-sync the vendored copy.' }, checkExists('eval input files', input.evalInputPaths), checkExists('declared dependencies', input.declaredDepDirs));
|
|
35
34
|
let resolvedAuth = null;
|
|
36
35
|
try {
|
|
37
36
|
resolvedAuth = resolveAuth({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preflight.js","sourceRoot":"","sources":["../../src/skill-test/preflight.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EACL,kBAAkB,EAClB,WAAW,GAKZ,MAAM,2BAA2B,CAAC;AA4BnC,MAAM,cAAc,GAAG;IACrB,cAAc,EAAE,mBAAmB,EAAE,iBAAiB;IACtD,mBAAmB,EAAE,aAAa,EAAE,kBAAkB;CAC9C,CAAC;AAEX,SAAS,WAAW,CAAC,KAAa,EAAE,KAAe;IACjD,sGAAsG;IACtG,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IAClD,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC;QACzB,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,KAAK,CAAC,MAAM,UAAU,EAAE;QACvE,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,UAAU,EAAE,yCAAyC,EAAE,CAAC;AACvI,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAqB;IAChD,MAAM,MAAM,GAAqB,EAAE,CAAC;IAEpC,MAAM,OAAO,GAAG,KAAK,CAAC,kBAAkB,EAAE,CAAC;IAC3C,MAAM,CAAC,IAAI,CAAC,OAAO;QACjB,CAAC,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,M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