@vibe-agent-toolkit/agent-skills 0.1.40 → 0.1.41-rc.2
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/skill-test/eval-executor.d.ts +50 -0
- package/dist/skill-test/eval-executor.d.ts.map +1 -0
- package/dist/skill-test/eval-executor.js +85 -0
- package/dist/skill-test/eval-executor.js.map +1 -0
- package/dist/skill-test/eval-fragment.d.ts +278 -0
- package/dist/skill-test/eval-fragment.d.ts.map +1 -0
- package/dist/skill-test/eval-fragment.js +128 -0
- package/dist/skill-test/eval-fragment.js.map +1 -0
- package/dist/skill-test/eval-grader.d.ts +54 -0
- package/dist/skill-test/eval-grader.d.ts.map +1 -0
- package/dist/skill-test/eval-grader.js +184 -0
- package/dist/skill-test/eval-grader.js.map +1 -0
- package/dist/skill-test/eval-inputs.d.ts +355 -0
- package/dist/skill-test/eval-inputs.d.ts.map +1 -1
- package/dist/skill-test/eval-inputs.js +36 -8
- package/dist/skill-test/eval-inputs.js.map +1 -1
- package/dist/skill-test/eval-lint.d.ts +51 -0
- package/dist/skill-test/eval-lint.d.ts.map +1 -0
- package/dist/skill-test/eval-lint.js +157 -0
- package/dist/skill-test/eval-lint.js.map +1 -0
- package/dist/skill-test/evals-template.d.ts.map +1 -1
- package/dist/skill-test/evals-template.js +7 -0
- package/dist/skill-test/evals-template.js.map +1 -1
- package/dist/skill-test/executor-prompt.d.ts +41 -0
- package/dist/skill-test/executor-prompt.d.ts.map +1 -0
- package/dist/skill-test/executor-prompt.js +63 -0
- package/dist/skill-test/executor-prompt.js.map +1 -0
- package/dist/skill-test/exit-codes.d.ts +8 -5
- package/dist/skill-test/exit-codes.d.ts.map +1 -1
- package/dist/skill-test/exit-codes.js +12 -7
- package/dist/skill-test/exit-codes.js.map +1 -1
- package/dist/skill-test/fragment-merge.d.ts +46 -0
- package/dist/skill-test/fragment-merge.d.ts.map +1 -0
- package/dist/skill-test/fragment-merge.js +77 -0
- package/dist/skill-test/fragment-merge.js.map +1 -0
- package/dist/skill-test/friction-schema.d.ts +10 -10
- package/dist/skill-test/friction-schema.d.ts.map +1 -1
- package/dist/skill-test/friction-schema.js +6 -1
- package/dist/skill-test/friction-schema.js.map +1 -1
- package/dist/skill-test/grader-model.d.ts +6 -0
- package/dist/skill-test/grader-model.d.ts.map +1 -0
- package/dist/skill-test/grader-model.js +6 -0
- package/dist/skill-test/grader-model.js.map +1 -0
- package/dist/skill-test/grader-prompt.d.ts +74 -0
- package/dist/skill-test/grader-prompt.d.ts.map +1 -0
- package/dist/skill-test/grader-prompt.js +173 -0
- package/dist/skill-test/grader-prompt.js.map +1 -0
- package/dist/skill-test/grading-adapter.d.ts +5 -11
- package/dist/skill-test/grading-adapter.d.ts.map +1 -1
- package/dist/skill-test/grading-adapter.js +9 -22
- package/dist/skill-test/grading-adapter.js.map +1 -1
- package/dist/skill-test/grading-schema.d.ts +18 -15
- package/dist/skill-test/grading-schema.d.ts.map +1 -1
- package/dist/skill-test/grading-schema.js +6 -5
- package/dist/skill-test/grading-schema.js.map +1 -1
- package/dist/skill-test/index.d.ts +13 -3
- package/dist/skill-test/index.d.ts.map +1 -1
- package/dist/skill-test/index.js +13 -3
- package/dist/skill-test/index.js.map +1 -1
- package/dist/skill-test/pipeline.d.ts +29 -0
- package/dist/skill-test/pipeline.d.ts.map +1 -0
- package/dist/skill-test/pipeline.js +77 -0
- package/dist/skill-test/pipeline.js.map +1 -0
- package/dist/skill-test/prompt-invariants.d.ts +27 -0
- package/dist/skill-test/prompt-invariants.d.ts.map +1 -0
- package/dist/skill-test/prompt-invariants.js +38 -0
- package/dist/skill-test/prompt-invariants.js.map +1 -0
- package/dist/skill-test/run-harness.d.ts +187 -55
- package/dist/skill-test/run-harness.d.ts.map +1 -1
- package/dist/skill-test/run-harness.js +539 -189
- package/dist/skill-test/run-harness.js.map +1 -1
- package/dist/skill-test/tier-plan.d.ts +89 -0
- package/dist/skill-test/tier-plan.d.ts.map +1 -0
- package/dist/skill-test/tier-plan.js +96 -0
- package/dist/skill-test/tier-plan.js.map +1 -0
- package/dist/skill-test/tool-eval-schema.d.ts +412 -0
- package/dist/skill-test/tool-eval-schema.d.ts.map +1 -0
- package/dist/skill-test/tool-eval-schema.js +83 -0
- package/dist/skill-test/tool-eval-schema.js.map +1 -0
- package/dist/validators/packaging-validator.d.ts +8 -1
- package/dist/validators/packaging-validator.d.ts.map +1 -1
- package/dist/validators/packaging-validator.js.map +1 -1
- package/package.json +5 -5
- package/schemas/friction-report.json +2 -1
- package/dist/skill-test/experimenter-prompt.d.ts +0 -42
- package/dist/skill-test/experimenter-prompt.d.ts.map +0 -1
- package/dist/skill-test/experimenter-prompt.js +0 -104
- package/dist/skill-test/experimenter-prompt.js.map +0 -1
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export declare class PromptInvariantError extends Error {
|
|
2
|
-
constructor(message: string);
|
|
3
|
-
}
|
|
4
|
-
export interface BuildPromptOptions {
|
|
5
|
-
subjectPath: string;
|
|
6
|
-
evalsPath: string;
|
|
7
|
-
gradingOut: string;
|
|
8
|
-
frictionOut: string;
|
|
9
|
-
workspacesRoot: string;
|
|
10
|
-
baseline: boolean;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* vat's canned, non-interactive experimenter prompt (spec §6c). Reuses
|
|
14
|
-
* skill-creator's grader RUBRIC and JSON shapes, NOT its interactive driver.
|
|
15
|
-
* Invariants: non-interactive procedure then STOP; write exact artifacts;
|
|
16
|
-
* forbid browser/aggregation/feedback/iteration; emit incrementally.
|
|
17
|
-
*/
|
|
18
|
-
export declare const DEFAULT_EXPERIMENTER_PROMPT: string;
|
|
19
|
-
export declare function buildExperimenterPrompt(opts: BuildPromptOptions): string;
|
|
20
|
-
/**
|
|
21
|
-
* Sentinel the persisted (audit) copy of the prompt shows in place of the real
|
|
22
|
-
* nonce, so the on-disk artifact never leaks the secret to skill code.
|
|
23
|
-
*/
|
|
24
|
-
export declare const REDACTED_NONCE_PLACEHOLDER = "<run-nonce redacted>";
|
|
25
|
-
/**
|
|
26
|
-
* Append the per-run integrity-nonce directive to the effective prompt. The
|
|
27
|
-
* experimenter must copy `nonce` verbatim into grading.json's top-level
|
|
28
|
-
* `runNonce` field; the harness then rejects any grading.json whose nonce is
|
|
29
|
-
* absent or wrong (see run-harness.ts). This is defense-in-depth against
|
|
30
|
-
* untrusted skill code forging a passing grading.json in the shared sandbox —
|
|
31
|
-
* without the secret nonce (delivered only via stdin, never written to disk) a
|
|
32
|
-
* forged grading cannot be authenticated.
|
|
33
|
-
*
|
|
34
|
-
* Appended AFTER assertPromptInvariants and AFTER any user `experimenterPrompt`
|
|
35
|
-
* override, so the nonce requirement is ALWAYS enforced and a committed config
|
|
36
|
-
* cannot opt out of it.
|
|
37
|
-
*/
|
|
38
|
-
export declare function appendIntegrityNonceDirective(prompt: string, nonce: string): string;
|
|
39
|
-
/** Redact the per-run nonce from a prompt for the on-disk audit copy. */
|
|
40
|
-
export declare function redactNonce(prompt: string, nonce: string): string;
|
|
41
|
-
export declare function assertPromptInvariants(prompt: string): void;
|
|
42
|
-
//# sourceMappingURL=experimenter-prompt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,QA2B5B,CAAC;AAKb,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAQxE;AAED;;;GAGG;AACH,eAAO,MAAM,0BAA0B,yBAAyB,CAAC;AAEjE;;;;;;;;;;;;GAYG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAQnF;AAED,yEAAyE;AACzE,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjE;AAmBD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAI3D"}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
export class PromptInvariantError extends Error {
|
|
2
|
-
constructor(message) {
|
|
3
|
-
super(`Experimenter prompt invariant violated: ${message}`);
|
|
4
|
-
this.name = 'PromptInvariantError';
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* vat's canned, non-interactive experimenter prompt (spec §6c). Reuses
|
|
9
|
-
* skill-creator's grader RUBRIC and JSON shapes, NOT its interactive driver.
|
|
10
|
-
* Invariants: non-interactive procedure then STOP; write exact artifacts;
|
|
11
|
-
* forbid browser/aggregation/feedback/iteration; emit incrementally.
|
|
12
|
-
*/
|
|
13
|
-
export const DEFAULT_EXPERIMENTER_PROMPT = [
|
|
14
|
-
'You are running a precise, NON-INTERACTIVE evaluation procedure. Do exactly the steps below, then STOP.',
|
|
15
|
-
'',
|
|
16
|
-
'For each eval in {{EVALS_PATH}}:',
|
|
17
|
-
' 1. Dispatch ONE executor subagent. Tell it ONLY the task prompt and the staged subject path {{SUBJECT_PATH}}.',
|
|
18
|
-
' When the eval declares input `files`, ALSO tell the executor its working directory is {{WORKSPACES_ROOT}}/<id>',
|
|
19
|
-
' (substitute the eval\'s own id) — the project it should operate on. Never tell the executor it is being tested.',
|
|
20
|
-
' 2. Grade the executor output against the eval\'s `expectations` using skill-creator\'s grader.md rubric.',
|
|
21
|
-
' If the eval includes an `expected_output`, treat it as the author\'s prose description of a',
|
|
22
|
-
' correct result and use it as CONTEXT when judging — but the pass/fail verdict is still decided',
|
|
23
|
-
' per `expectations` entry; `expected_output` informs your judgment, it is not itself a checklist item.',
|
|
24
|
-
' 3. Append each graded expectation to the SINGLE top-level `expectations` array in {{GRADING_OUT}} IMMEDIATELY',
|
|
25
|
-
' (incremental flush — a mid-run kill must leave partial results).',
|
|
26
|
-
' 4. Record any packaging-fidelity friction to {{FRICTION_OUT}} using the vat friction.json schema.',
|
|
27
|
-
' If a file referenced by the skill is absent from the staged tree, record a `missing-bundled-file` friction entry.',
|
|
28
|
-
'',
|
|
29
|
-
'{{GRADING_OUT}} MUST be ONE flat JSON object in skill-creator\'s grading.json shape (references/schemas.md):',
|
|
30
|
-
'a top-level `expectations` array — one entry {"text","passed","evidence"} per expectation across ALL evals —',
|
|
31
|
-
'and a top-level `summary` {"passed","total"}. Do NOT wrap results in an `evals` array or any per-eval nesting;',
|
|
32
|
-
'vat reads the flat top-level shape and rejects anything else. Example:',
|
|
33
|
-
' {"expectations":[{"text":"...","passed":true,"evidence":"..."}],"summary":{"passed":1,"total":1}}',
|
|
34
|
-
'',
|
|
35
|
-
'When all evals are graded, write the final `summary` to {{GRADING_OUT}} and STOP.',
|
|
36
|
-
'',
|
|
37
|
-
'You are FORBIDDEN to: open a browser or viewer; run aggregation/optimizer scripts; wait for human feedback;',
|
|
38
|
-
'or iterate/improve the skill. This is a downstream packaging check, not an authoring loop.',
|
|
39
|
-
'{{BASELINE_BLOCK}}',
|
|
40
|
-
].join('\n');
|
|
41
|
-
const BASELINE_BLOCK = '\nAlso run the WITH/WITHOUT baseline: repeat each eval once WITHOUT the skill present, recording the A/B in skill-creator\'s shapes.';
|
|
42
|
-
export function buildExperimenterPrompt(opts) {
|
|
43
|
-
return DEFAULT_EXPERIMENTER_PROMPT
|
|
44
|
-
.replace('{{EVALS_PATH}}', opts.evalsPath)
|
|
45
|
-
.replace('{{SUBJECT_PATH}}', opts.subjectPath)
|
|
46
|
-
.replaceAll('{{WORKSPACES_ROOT}}', opts.workspacesRoot)
|
|
47
|
-
.replaceAll('{{GRADING_OUT}}', opts.gradingOut)
|
|
48
|
-
.replace('{{FRICTION_OUT}}', opts.frictionOut)
|
|
49
|
-
.replace('{{BASELINE_BLOCK}}', opts.baseline ? BASELINE_BLOCK : '');
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Sentinel the persisted (audit) copy of the prompt shows in place of the real
|
|
53
|
-
* nonce, so the on-disk artifact never leaks the secret to skill code.
|
|
54
|
-
*/
|
|
55
|
-
export const REDACTED_NONCE_PLACEHOLDER = '<run-nonce redacted>';
|
|
56
|
-
/**
|
|
57
|
-
* Append the per-run integrity-nonce directive to the effective prompt. The
|
|
58
|
-
* experimenter must copy `nonce` verbatim into grading.json's top-level
|
|
59
|
-
* `runNonce` field; the harness then rejects any grading.json whose nonce is
|
|
60
|
-
* absent or wrong (see run-harness.ts). This is defense-in-depth against
|
|
61
|
-
* untrusted skill code forging a passing grading.json in the shared sandbox —
|
|
62
|
-
* without the secret nonce (delivered only via stdin, never written to disk) a
|
|
63
|
-
* forged grading cannot be authenticated.
|
|
64
|
-
*
|
|
65
|
-
* Appended AFTER assertPromptInvariants and AFTER any user `experimenterPrompt`
|
|
66
|
-
* override, so the nonce requirement is ALWAYS enforced and a committed config
|
|
67
|
-
* cannot opt out of it.
|
|
68
|
-
*/
|
|
69
|
-
export function appendIntegrityNonceDirective(prompt, nonce) {
|
|
70
|
-
return [
|
|
71
|
-
prompt,
|
|
72
|
-
'',
|
|
73
|
-
'INTEGRITY (required, do this LAST): the grading.json you write MUST include a',
|
|
74
|
-
`top-level string field "runNonce" whose value is EXACTLY: ${nonce}`,
|
|
75
|
-
'Copy it verbatim. vat rejects a grading.json whose runNonce is missing or wrong.',
|
|
76
|
-
].join('\n');
|
|
77
|
-
}
|
|
78
|
-
/** Redact the per-run nonce from a prompt for the on-disk audit copy. */
|
|
79
|
-
export function redactNonce(prompt, nonce) {
|
|
80
|
-
return prompt.replaceAll(nonce, REDACTED_NONCE_PLACEHOLDER);
|
|
81
|
-
}
|
|
82
|
-
const REQUIRED_PATTERNS = [
|
|
83
|
-
{ test: /\bSTOP\b/, label: 'must instruct the experimenter to STOP' },
|
|
84
|
-
{ test: /grading\.json|\{\{GRADING_OUT\}\}/i, label: 'must write grading.json' },
|
|
85
|
-
{ test: /friction\.json|\{\{FRICTION_OUT\}\}/i, label: 'must write friction.json' },
|
|
86
|
-
{ test: /forbidden|do not|never/i, label: 'must forbid browser/aggregation/feedback/iteration' },
|
|
87
|
-
{ test: /browser|viewer/i, label: 'must explicitly forbid opening a browser/viewer' },
|
|
88
|
-
{ test: /increment/i, label: 'must emit incrementally' },
|
|
89
|
-
{
|
|
90
|
-
test: /top-level\s+`?expectations`?/i,
|
|
91
|
-
label: 'must pin grading.json to the flat top-level `expectations`/`summary` shape',
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
test: /`?evals`?\s+array|per-eval nesting/i,
|
|
95
|
-
label: 'must forbid wrapping grading results in an `evals` array',
|
|
96
|
-
},
|
|
97
|
-
];
|
|
98
|
-
export function assertPromptInvariants(prompt) {
|
|
99
|
-
for (const { test, label } of REQUIRED_PATTERNS) {
|
|
100
|
-
if (!test.test(prompt))
|
|
101
|
-
throw new PromptInvariantError(label);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
//# sourceMappingURL=experimenter-prompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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;AAWD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,yGAAy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