@vibe-agent-toolkit/agent-skills 0.1.42 → 0.2.0-rc.10
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/README.md +5 -5
- package/dist/builder.d.ts.map +1 -1
- package/dist/builder.js +7 -17
- package/dist/builder.js.map +1 -1
- package/dist/content-type-routing.d.ts +32 -0
- package/dist/content-type-routing.d.ts.map +1 -1
- package/dist/content-type-routing.js +23 -0
- package/dist/content-type-routing.js.map +1 -1
- package/dist/files-config.d.ts +34 -1
- package/dist/files-config.d.ts.map +1 -1
- package/dist/files-config.js +277 -39
- package/dist/files-config.js.map +1 -1
- package/dist/fs-attribution.d.ts +45 -0
- package/dist/fs-attribution.d.ts.map +1 -0
- package/dist/fs-attribution.js +57 -0
- package/dist/fs-attribution.js.map +1 -0
- package/dist/import.d.ts.map +1 -1
- package/dist/import.js +0 -4
- package/dist/import.js.map +1 -1
- package/dist/index.d.ts +13 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -7
- package/dist/index.js.map +1 -1
- package/dist/inventory/detectors/declared-but-missing.d.ts +1 -1
- package/dist/inventory/detectors/declared-but-missing.d.ts.map +1 -1
- package/dist/inventory/detectors/marketplace-source-missing.d.ts +1 -1
- package/dist/inventory/detectors/marketplace-source-missing.d.ts.map +1 -1
- package/dist/inventory/detectors/present-but-undeclared.d.ts +1 -1
- package/dist/inventory/detectors/present-but-undeclared.d.ts.map +1 -1
- package/dist/inventory/detectors/reference-target-missing.d.ts +1 -1
- package/dist/inventory/detectors/reference-target-missing.d.ts.map +1 -1
- package/dist/inventory/index.d.ts +1 -1
- package/dist/inventory/index.d.ts.map +1 -1
- package/dist/inventory/index.js +1 -1
- package/dist/inventory/index.js.map +1 -1
- package/dist/inventory/serialize.d.ts +4 -4
- package/dist/inventory/serialize.d.ts.map +1 -1
- package/dist/inventory/serialize.js +6 -6
- package/dist/inventory/serialize.js.map +1 -1
- package/dist/inventory/types.d.ts +8 -0
- package/dist/inventory/types.d.ts.map +1 -1
- package/dist/inventory/types.js.map +1 -1
- package/dist/link-graph-members.d.ts +18 -0
- package/dist/link-graph-members.d.ts.map +1 -0
- package/dist/link-graph-members.js +18 -0
- package/dist/link-graph-members.js.map +1 -0
- package/dist/parsers/frontmatter-parser.d.ts.map +1 -1
- package/dist/parsers/frontmatter-parser.js +30 -6
- package/dist/parsers/frontmatter-parser.js.map +1 -1
- package/dist/plugin-distribution-layout.d.ts +70 -6
- package/dist/plugin-distribution-layout.d.ts.map +1 -1
- package/dist/plugin-distribution-layout.js +84 -11
- package/dist/plugin-distribution-layout.js.map +1 -1
- package/dist/post-build-checks.d.ts +38 -1
- package/dist/post-build-checks.d.ts.map +1 -1
- package/dist/post-build-checks.js +68 -17
- package/dist/post-build-checks.js.map +1 -1
- package/dist/projection/skill-extent.d.ts +247 -0
- package/dist/projection/skill-extent.d.ts.map +1 -0
- package/dist/projection/skill-extent.js +560 -0
- package/dist/projection/skill-extent.js.map +1 -0
- package/dist/schemas/agent-skill-frontmatter.js +1 -1
- package/dist/schemas/agent-skill-frontmatter.js.map +1 -1
- package/dist/schemas/allowed-tools.d.ts +31 -0
- package/dist/schemas/allowed-tools.d.ts.map +1 -0
- package/dist/schemas/allowed-tools.js +88 -0
- package/dist/schemas/allowed-tools.js.map +1 -0
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/installed-plugins-registry.d.ts.map +1 -1
- package/dist/schemas/installed-plugins-registry.js +7 -1
- package/dist/schemas/installed-plugins-registry.js.map +1 -1
- package/dist/schemas/marketplace-manifest.d.ts.map +1 -1
- package/dist/schemas/marketplace-manifest.js +17 -6
- package/dist/schemas/marketplace-manifest.js.map +1 -1
- package/dist/skill-identity.d.ts +18 -3
- package/dist/skill-identity.d.ts.map +1 -1
- package/dist/skill-identity.js +25 -6
- package/dist/skill-identity.js.map +1 -1
- package/dist/skill-packager.d.ts +144 -20
- package/dist/skill-packager.d.ts.map +1 -1
- package/dist/skill-packager.js +447 -105
- package/dist/skill-packager.js.map +1 -1
- package/dist/skill-source/content-hash.d.ts.map +1 -1
- package/dist/skill-source/content-hash.js +21 -10
- package/dist/skill-source/content-hash.js.map +1 -1
- package/dist/skill-source/fetch-cache.d.ts.map +1 -1
- package/dist/skill-source/fetch-cache.js +0 -5
- package/dist/skill-source/fetch-cache.js.map +1 -1
- package/dist/skill-source/git-clone.d.ts +1 -1
- package/dist/skill-source/git-clone.d.ts.map +1 -1
- package/dist/skill-source/git-clone.js +10 -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 +2 -2
- package/dist/skill-source/sources/url-source.js.map +1 -1
- package/dist/skill-source/stage.d.ts.map +1 -1
- package/dist/skill-source/stage.js +0 -6
- package/dist/skill-source/stage.js.map +1 -1
- package/dist/skill-test/baseline-delta.d.ts +1575 -0
- package/dist/skill-test/baseline-delta.d.ts.map +1 -0
- package/dist/skill-test/baseline-delta.js +272 -0
- package/dist/skill-test/baseline-delta.js.map +1 -0
- package/dist/skill-test/baseline-integrity.d.ts +944 -0
- package/dist/skill-test/baseline-integrity.d.ts.map +1 -0
- package/dist/skill-test/baseline-integrity.js +3090 -0
- package/dist/skill-test/baseline-integrity.js.map +1 -0
- package/dist/skill-test/build-hook.d.ts +3 -2
- package/dist/skill-test/build-hook.d.ts.map +1 -1
- package/dist/skill-test/build-hook.js +4 -5
- package/dist/skill-test/build-hook.js.map +1 -1
- package/dist/skill-test/configure-writer.js +1 -1
- package/dist/skill-test/configure-writer.js.map +1 -1
- package/dist/skill-test/declared-env.d.ts +5 -4
- package/dist/skill-test/declared-env.d.ts.map +1 -1
- package/dist/skill-test/declared-env.js +8 -9
- package/dist/skill-test/declared-env.js.map +1 -1
- package/dist/skill-test/eval-executor.d.ts +21 -5
- package/dist/skill-test/eval-executor.d.ts.map +1 -1
- package/dist/skill-test/eval-executor.js +6 -6
- package/dist/skill-test/eval-executor.js.map +1 -1
- package/dist/skill-test/eval-fragment.d.ts +106 -28
- package/dist/skill-test/eval-fragment.d.ts.map +1 -1
- package/dist/skill-test/eval-fragment.js +78 -16
- package/dist/skill-test/eval-fragment.js.map +1 -1
- package/dist/skill-test/eval-grader.d.ts +65 -7
- package/dist/skill-test/eval-grader.d.ts.map +1 -1
- package/dist/skill-test/eval-grader.js +263 -64
- package/dist/skill-test/eval-grader.js.map +1 -1
- package/dist/skill-test/eval-inputs.d.ts +110 -8
- package/dist/skill-test/eval-inputs.d.ts.map +1 -1
- package/dist/skill-test/eval-inputs.js +177 -22
- package/dist/skill-test/eval-inputs.js.map +1 -1
- package/dist/skill-test/eval-lint.d.ts +17 -4
- package/dist/skill-test/eval-lint.d.ts.map +1 -1
- package/dist/skill-test/eval-lint.js +22 -9
- package/dist/skill-test/eval-lint.js.map +1 -1
- package/dist/skill-test/eval-suite-isolation.d.ts.map +1 -1
- package/dist/skill-test/eval-suite-isolation.js +8 -5
- package/dist/skill-test/eval-suite-isolation.js.map +1 -1
- package/dist/skill-test/evals-template.d.ts +1 -1
- package/dist/skill-test/evals-template.d.ts.map +1 -1
- package/dist/skill-test/evals-template.js +1 -3
- package/dist/skill-test/evals-template.js.map +1 -1
- package/dist/skill-test/executor-prompt.d.ts +15 -7
- package/dist/skill-test/executor-prompt.d.ts.map +1 -1
- package/dist/skill-test/executor-prompt.js +10 -7
- package/dist/skill-test/executor-prompt.js.map +1 -1
- package/dist/skill-test/failure-reason.d.ts +113 -0
- package/dist/skill-test/failure-reason.d.ts.map +1 -0
- package/dist/skill-test/failure-reason.js +124 -0
- package/dist/skill-test/failure-reason.js.map +1 -0
- package/dist/skill-test/fragment-merge.d.ts +3 -20
- package/dist/skill-test/fragment-merge.d.ts.map +1 -1
- package/dist/skill-test/fragment-merge.js +67 -8
- package/dist/skill-test/fragment-merge.js.map +1 -1
- package/dist/skill-test/grader-prompt.d.ts +29 -9
- package/dist/skill-test/grader-prompt.d.ts.map +1 -1
- package/dist/skill-test/grader-prompt.js +264 -68
- package/dist/skill-test/grader-prompt.js.map +1 -1
- package/dist/skill-test/grader-text.d.ts +145 -0
- package/dist/skill-test/grader-text.d.ts.map +1 -0
- package/dist/skill-test/grader-text.js +410 -0
- package/dist/skill-test/grader-text.js.map +1 -0
- package/dist/skill-test/grading-adapter.d.ts +38 -2
- package/dist/skill-test/grading-adapter.d.ts.map +1 -1
- package/dist/skill-test/grading-adapter.js +57 -9
- package/dist/skill-test/grading-adapter.js.map +1 -1
- package/dist/skill-test/grading-schema.d.ts +160 -5
- package/dist/skill-test/grading-schema.d.ts.map +1 -1
- package/dist/skill-test/grading-schema.js +66 -7
- package/dist/skill-test/grading-schema.js.map +1 -1
- package/dist/skill-test/harness-location.d.ts +3 -2
- package/dist/skill-test/harness-location.d.ts.map +1 -1
- package/dist/skill-test/harness-location.js +5 -16
- package/dist/skill-test/harness-location.js.map +1 -1
- package/dist/skill-test/index.d.ts +2 -2
- package/dist/skill-test/index.d.ts.map +1 -1
- package/dist/skill-test/index.js +2 -2
- package/dist/skill-test/index.js.map +1 -1
- package/dist/skill-test/lock.d.ts +58 -1
- package/dist/skill-test/lock.d.ts.map +1 -1
- package/dist/skill-test/lock.js +78 -6
- package/dist/skill-test/lock.js.map +1 -1
- package/dist/skill-test/pipeline.d.ts +19 -1
- package/dist/skill-test/pipeline.d.ts.map +1 -1
- package/dist/skill-test/pipeline.js +21 -10
- package/dist/skill-test/pipeline.js.map +1 -1
- package/dist/skill-test/preflight.d.ts +1 -1
- package/dist/skill-test/preflight.d.ts.map +1 -1
- package/dist/skill-test/preflight.js +59 -16
- package/dist/skill-test/preflight.js.map +1 -1
- package/dist/skill-test/prompt-invariants.d.ts +4 -2
- package/dist/skill-test/prompt-invariants.d.ts.map +1 -1
- package/dist/skill-test/prompt-invariants.js +5 -4
- package/dist/skill-test/prompt-invariants.js.map +1 -1
- package/dist/skill-test/run-harness.d.ts +665 -85
- package/dist/skill-test/run-harness.d.ts.map +1 -1
- package/dist/skill-test/run-harness.js +1522 -237
- package/dist/skill-test/run-harness.js.map +1 -1
- package/dist/skill-test/staging.d.ts +20 -8
- package/dist/skill-test/staging.d.ts.map +1 -1
- package/dist/skill-test/staging.js +25 -18
- package/dist/skill-test/staging.js.map +1 -1
- package/dist/skill-test/tier-plan.d.ts +1 -1
- package/dist/skill-test/tier-plan.js +1 -1
- package/dist/skill-test/tool-eval-schema.d.ts +6 -6
- package/dist/skill-test/tool-eval-schema.js +2 -2
- package/dist/skill-test/vendor-manifest.d.ts +2 -1
- package/dist/skill-test/vendor-manifest.d.ts.map +1 -1
- package/dist/skill-test/vendor-manifest.js +10 -10
- package/dist/skill-test/vendor-manifest.js.map +1 -1
- package/dist/test-input.d.ts +59 -8
- package/dist/test-input.d.ts.map +1 -1
- package/dist/test-input.js +64 -19
- package/dist/test-input.js.map +1 -1
- package/dist/validators/agent-instruction-presence.d.ts +1 -1
- package/dist/validators/agent-instruction-presence.d.ts.map +1 -1
- package/dist/validators/agent-instruction-presence.js +45 -2
- package/dist/validators/agent-instruction-presence.js.map +1 -1
- package/dist/validators/bundled-resource-link-detection.d.ts +6 -4
- package/dist/validators/bundled-resource-link-detection.d.ts.map +1 -1
- package/dist/validators/bundled-resource-link-detection.js +39 -39
- package/dist/validators/bundled-resource-link-detection.js.map +1 -1
- package/dist/validators/compat-detectors.d.ts +18 -1
- package/dist/validators/compat-detectors.d.ts.map +1 -1
- package/dist/validators/compat-detectors.js +47 -20
- package/dist/validators/compat-detectors.js.map +1 -1
- package/dist/validators/cross-skill-dependency-detection.d.ts +1 -1
- package/dist/validators/cross-skill-dependency-detection.d.ts.map +1 -1
- package/dist/validators/cross-skill-dependency-detection.js +1 -1
- package/dist/validators/cross-skill-dependency-detection.js.map +1 -1
- package/dist/validators/description-style-detection.d.ts +1 -1
- package/dist/validators/description-style-detection.d.ts.map +1 -1
- package/dist/validators/description-style-detection.js +1 -1
- package/dist/validators/description-style-detection.js.map +1 -1
- package/dist/validators/format-detection.d.ts +3 -0
- package/dist/validators/format-detection.d.ts.map +1 -1
- package/dist/validators/format-detection.js +41 -26
- package/dist/validators/format-detection.js.map +1 -1
- package/dist/validators/frontmatter-validation.d.ts +1 -1
- package/dist/validators/frontmatter-validation.d.ts.map +1 -1
- package/dist/validators/frontmatter-validation.js +2 -2
- package/dist/validators/frontmatter-validation.js.map +1 -1
- package/dist/validators/imperative-body-detection.d.ts +1 -1
- package/dist/validators/imperative-body-detection.d.ts.map +1 -1
- package/dist/validators/imperative-body-detection.js +1 -1
- package/dist/validators/imperative-body-detection.js.map +1 -1
- package/dist/validators/index.d.ts +1 -1
- package/dist/validators/index.d.ts.map +1 -1
- package/dist/validators/kebab-case-detection.d.ts +1 -1
- package/dist/validators/kebab-case-detection.d.ts.map +1 -1
- package/dist/validators/kebab-case-detection.js +1 -1
- package/dist/validators/kebab-case-detection.js.map +1 -1
- package/dist/validators/marketplace-validator.d.ts.map +1 -1
- package/dist/validators/marketplace-validator.js +7 -2
- package/dist/validators/marketplace-validator.js.map +1 -1
- package/dist/validators/mcp-tool-qualification.d.ts +158 -0
- package/dist/validators/mcp-tool-qualification.d.ts.map +1 -0
- package/dist/validators/mcp-tool-qualification.js +467 -0
- package/dist/validators/mcp-tool-qualification.js.map +1 -0
- package/dist/validators/packaged-size-limit.d.ts +296 -0
- package/dist/validators/packaged-size-limit.d.ts.map +1 -0
- package/dist/validators/packaged-size-limit.js +492 -0
- package/dist/validators/packaged-size-limit.js.map +1 -0
- package/dist/validators/packaging-validator.d.ts +149 -10
- package/dist/validators/packaging-validator.d.ts.map +1 -1
- package/dist/validators/packaging-validator.js +371 -55
- package/dist/validators/packaging-validator.js.map +1 -1
- package/dist/validators/plugin-hosted-shape.d.ts +4 -2
- package/dist/validators/plugin-hosted-shape.d.ts.map +1 -1
- package/dist/validators/plugin-hosted-shape.js +6 -7
- package/dist/validators/plugin-hosted-shape.js.map +1 -1
- package/dist/validators/plugin-recommended-fields.d.ts +1 -1
- package/dist/validators/plugin-recommended-fields.d.ts.map +1 -1
- package/dist/validators/plugin-recommended-fields.js +1 -1
- package/dist/validators/plugin-recommended-fields.js.map +1 -1
- package/dist/validators/referenced-path-missing.d.ts +211 -0
- package/dist/validators/referenced-path-missing.d.ts.map +1 -0
- package/dist/validators/referenced-path-missing.js +378 -0
- package/dist/validators/referenced-path-missing.js.map +1 -0
- package/dist/validators/registry-validator.d.ts.map +1 -1
- package/dist/validators/registry-validator.js +1 -2
- package/dist/validators/registry-validator.js.map +1 -1
- package/dist/validators/rule-engine/index.d.ts +1 -1
- package/dist/validators/rule-engine/rule-context.d.ts +20 -3
- package/dist/validators/rule-engine/rule-context.d.ts.map +1 -1
- package/dist/validators/rule-engine/rule-context.js +3 -1
- package/dist/validators/rule-engine/rule-context.js.map +1 -1
- package/dist/validators/rule-engine/rule-engine.d.ts +2 -2
- package/dist/validators/rule-engine/rule-engine.d.ts.map +1 -1
- package/dist/validators/rule-engine/rule-engine.js +52 -13
- package/dist/validators/rule-engine/rule-engine.js.map +1 -1
- package/dist/validators/skill-validator.d.ts.map +1 -1
- package/dist/validators/skill-validator.js +91 -54
- package/dist/validators/skill-validator.js.map +1 -1
- package/dist/validators/source-only-codes.js +1 -1
- package/dist/validators/source-only-codes.js.map +1 -1
- package/dist/validators/types.d.ts +21 -1
- package/dist/validators/types.d.ts.map +1 -1
- package/dist/validators/unified-validator.d.ts.map +1 -1
- package/dist/validators/unified-validator.js +4 -5
- package/dist/validators/unified-validator.js.map +1 -1
- package/dist/validators/validation-rules.d.ts +4 -4
- package/dist/validators/validation-rules.d.ts.map +1 -1
- package/dist/validators/validation-rules.js +9 -38
- package/dist/validators/validation-rules.js.map +1 -1
- package/dist/validators/walker-to-issues.d.ts +9 -3
- package/dist/validators/walker-to-issues.d.ts.map +1 -1
- package/dist/validators/walker-to-issues.js +64 -19
- package/dist/validators/walker-to-issues.js.map +1 -1
- package/dist/walk-link-graph.d.ts +64 -5
- package/dist/walk-link-graph.d.ts.map +1 -1
- package/dist/walk-link-graph.js +376 -92
- package/dist/walk-link-graph.js.map +1 -1
- package/package.json +14 -22
- package/dist/skill-test/exit-codes.d.ts +0 -97
- package/dist/skill-test/exit-codes.d.ts.map +0 -1
- package/dist/skill-test/exit-codes.js +0 -141
- package/dist/skill-test/exit-codes.js.map +0 -1
|
@@ -1,13 +1,72 @@
|
|
|
1
1
|
import { cpSync, existsSync } from 'node:fs';
|
|
2
|
-
import { mkdirSyncReal, safePath } from '@vibe-agent-toolkit/utils';
|
|
2
|
+
import { mkdirSyncReal, safePath, VatError } from '@vibe-agent-toolkit/utils';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { sanitizeGraderText, sanitizeTextPreservingLines } from './grader-text.js';
|
|
5
|
+
/**
|
|
6
|
+
* Raised for any eval-input problem (bad JSON, schema failure, missing input file).
|
|
7
|
+
* Reason `preflight`.
|
|
8
|
+
*
|
|
9
|
+
* The FIELD is what makes that sentence true, and until it was added only one of this
|
|
10
|
+
* class's two routes delivered it. `attemptStageWorkspaces` catches the staging
|
|
11
|
+
* instance and maps it explicitly; the instance thrown from {@link armDirSegment}
|
|
12
|
+
* fires deep in the eval loop, outside that handler, and reached
|
|
13
|
+
* `skillTestFailureReason`'s `internal` default — reporting a harness bug for a
|
|
14
|
+
* preflight-class problem while the docblock above claimed otherwise. `preflight`
|
|
15
|
+
* for the internal-invariant case too is consistent with every sibling in this feature.
|
|
16
|
+
*/
|
|
17
|
+
export class EvalInputError extends VatError {
|
|
18
|
+
reason = 'preflight';
|
|
6
19
|
constructor(message) {
|
|
7
|
-
super(message);
|
|
8
|
-
this.name = 'EvalInputError';
|
|
20
|
+
super('EVAL_INPUT', message);
|
|
9
21
|
}
|
|
10
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Neutralize a SUITE-AUTHORED string before it is quoted into an
|
|
25
|
+
* {@link EvalInputError}, whose message reaches `process.stdout` on the
|
|
26
|
+
* `Summary:` line — the one channel deliberately kept machine-readable — and
|
|
27
|
+
* renders twice on the way there.
|
|
28
|
+
*
|
|
29
|
+
* The suite is nominally adopter-authored, but `resolveEvalSuitePath` will
|
|
30
|
+
* harvest one out of a FETCHED npm/url artifact, i.e. out of the skill under
|
|
31
|
+
* test, so treat it as untrusted. `files[]` is the sharp edge: it is
|
|
32
|
+
* `z.array(z.string().min(1))` with NO charset constraint, in deliberate
|
|
33
|
+
* contrast to `id`, which is regex-pinned precisely because it names a
|
|
34
|
+
* directory. A derived path or an OS error text built from such an entry
|
|
35
|
+
* carries the same bytes, so those are sanitized here too, not just the entry.
|
|
36
|
+
*
|
|
37
|
+
* Reuses {@link sanitizeGraderText} rather than growing a second neutralizer:
|
|
38
|
+
* the threat and the remedy (drop escape sequences whole, fold every remaining
|
|
39
|
+
* control code to a space, collapse, cap) are identical — only the source of
|
|
40
|
+
* the untrusted text differs.
|
|
41
|
+
*
|
|
42
|
+
* EXPORTED because the suite reaches an operator surface from more than this
|
|
43
|
+
* module: `eval-lint.ts` quotes `toolExpectations.*` entries — the same
|
|
44
|
+
* unconstrained `z.array(z.string().min(1))` shape as `files[]` — into an advisory
|
|
45
|
+
* that `run-harness.ts` writes to stderr verbatim, and does it at Step 5.5, ahead
|
|
46
|
+
* of both the security-ack gate and the `--dry-run` short-circuit. Every new
|
|
47
|
+
* suite-authored string bound for a terminal goes through HERE, so the trust model
|
|
48
|
+
* above stays stated in one place.
|
|
49
|
+
*/
|
|
50
|
+
export function quoteSuiteText(value) {
|
|
51
|
+
return sanitizeGraderText(value);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The same neutralization for a suite-derived string that is ALREADY multi-line
|
|
55
|
+
* and whose lines carry the meaning — today, exactly one: zod's schema-failure
|
|
56
|
+
* text.
|
|
57
|
+
*
|
|
58
|
+
* That message is a list of issues, one per offending path, and every one of the
|
|
59
|
+
* paths in it is a SUITE-AUTHORED KEY (`evals[17].toolExpecations`) reaching
|
|
60
|
+
* stderr unsanitized. It cannot go through {@link quoteSuiteText}: that collapses
|
|
61
|
+
* the list onto one capped line, which is the difference between "your suite has
|
|
62
|
+
* a typo, here is where" and "your suite has a typo". Degrading the common case to
|
|
63
|
+
* neutralize the rare one is a bad trade, so the sanitizer that keeps lines is
|
|
64
|
+
* used instead. See {@link sanitizeTextPreservingLines} for why it is not the
|
|
65
|
+
* default anywhere else.
|
|
66
|
+
*/
|
|
67
|
+
function quoteSuiteBlock(value) {
|
|
68
|
+
return sanitizeTextPreservingLines(value);
|
|
69
|
+
}
|
|
11
70
|
/**
|
|
12
71
|
* String eval ids name a per-eval working directory ({@link stageEvalWorkspaces}),
|
|
13
72
|
* so they must be safe path segments on every platform. Letters, digits, hyphen,
|
|
@@ -52,6 +111,42 @@ export function isSingleEditAway(key, target) {
|
|
|
52
111
|
return key.slice(i + 1) === target.slice(i); // deletion from key
|
|
53
112
|
return key.slice(i) === target.slice(i + 1); // insertion into key
|
|
54
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Reject an expectation string an eval declares TWICE.
|
|
116
|
+
*
|
|
117
|
+
* The entry, not the text, is the unit every reported score counts:
|
|
118
|
+
* `runGraderForEval`'s declared-vs-graded check compares `fragment.expectations`
|
|
119
|
+
* against `expectations.length`, and each arm's summary and the `--baseline` delta
|
|
120
|
+
* are computed over those entries. A suite that declares the same string twice
|
|
121
|
+
* hands the grader "1. x / 2. x" and gets ONE entry back for it — a perfectly
|
|
122
|
+
* reasonable grader response, and one that fails the count check mid-run with an
|
|
123
|
+
* `InternalHarnessError`, destroying a fully-billed treatment run over an input
|
|
124
|
+
* defect nothing looked at.
|
|
125
|
+
*
|
|
126
|
+
* So it is caught at PARSE, exactly like the duplicate-id rule in
|
|
127
|
+
* {@link parseEvalSuite}: exit 2, user-correctable, before anything is spawned.
|
|
128
|
+
* Scoped to one eval — two different evals may legitimately share expectation
|
|
129
|
+
* text, since each is graded from its own transcript.
|
|
130
|
+
*
|
|
131
|
+
* `expectations` is `z.array(z.string().min(1))` with no charset constraint and
|
|
132
|
+
* the message reaches stdout, so the offending string is sanitized on the way in.
|
|
133
|
+
*/
|
|
134
|
+
function addDuplicateExpectationIssues(expectations, ctx) {
|
|
135
|
+
const seen = new Set();
|
|
136
|
+
for (const [index, expectation] of expectations.entries()) {
|
|
137
|
+
if (!seen.has(expectation)) {
|
|
138
|
+
seen.add(expectation);
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
ctx.addIssue({
|
|
142
|
+
code: z.ZodIssueCode.custom,
|
|
143
|
+
message: `duplicate expectation "${quoteSuiteText(expectation)}" — an eval must declare each expectation ` +
|
|
144
|
+
'once. Every reported score counts fragment ENTRIES, and a grader handed the same text twice ' +
|
|
145
|
+
'returns one entry for it, which fails the declared-count check mid-run.',
|
|
146
|
+
path: ['expectations', index],
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
55
150
|
// evals.json is adopter-authored input that VAT *reads* — so per the project's
|
|
56
151
|
// Postel's Law (read the outside world liberally), we validate only the fields
|
|
57
152
|
// VAT actually consumes and pass everything else through untouched. `id` accepts
|
|
@@ -91,7 +186,7 @@ export const EvalEntrySchema = z
|
|
|
91
186
|
mustRun: z.array(z.string().min(1)).optional(),
|
|
92
187
|
mustNotRun: z.array(z.string().min(1)).optional(),
|
|
93
188
|
// Each named executable must have RUN and its invoking tool_result must
|
|
94
|
-
// NOT be an error
|
|
189
|
+
// NOT be an error. Judged from the transcript by the
|
|
95
190
|
// grader — see tool-eval-schema.ts's ToolSucceedCheckSchema.
|
|
96
191
|
mustSucceed: z.array(z.string().min(1)).optional(),
|
|
97
192
|
sequence: z.array(z.string().min(1)).optional(),
|
|
@@ -101,6 +196,7 @@ export const EvalEntrySchema = z
|
|
|
101
196
|
})
|
|
102
197
|
.passthrough()
|
|
103
198
|
.superRefine((entry, ctx) => {
|
|
199
|
+
addDuplicateExpectationIssues(entry.expectations, ctx);
|
|
104
200
|
for (const key of Object.keys(entry)) {
|
|
105
201
|
if (RECOGNIZED_EVAL_FIELDS.includes(key))
|
|
106
202
|
continue;
|
|
@@ -108,7 +204,9 @@ export const EvalEntrySchema = z
|
|
|
108
204
|
if (near !== undefined) {
|
|
109
205
|
ctx.addIssue({
|
|
110
206
|
code: z.ZodIssueCode.custom,
|
|
111
|
-
|
|
207
|
+
// `key` is a suite-authored object key with no charset constraint, and
|
|
208
|
+
// this message is surfaced through `result.error.message` below.
|
|
209
|
+
message: `unknown eval field "${quoteSuiteText(key)}" — did you mean "${near}"? (other custom fields are allowed and ignored)`,
|
|
112
210
|
path: [key],
|
|
113
211
|
});
|
|
114
212
|
}
|
|
@@ -128,11 +226,14 @@ export function parseEvalSuite(jsonText) {
|
|
|
128
226
|
raw = JSON.parse(jsonText);
|
|
129
227
|
}
|
|
130
228
|
catch (e) {
|
|
131
|
-
|
|
229
|
+
// V8 quotes a verbatim, unescaped slice of the offending bytes into its
|
|
230
|
+
// SyntaxError message — a suite file that is nothing but ANSI escapes would
|
|
231
|
+
// otherwise repaint the operator's terminal from vat's own error line.
|
|
232
|
+
throw new EvalInputError(`evals.json is not valid JSON: ${quoteSuiteText(e.message)}`);
|
|
132
233
|
}
|
|
133
234
|
const result = EvalSuiteSchema.safeParse(raw);
|
|
134
235
|
if (!result.success) {
|
|
135
|
-
throw new EvalInputError(`evals.json failed schema validation: ${result.error.message}`);
|
|
236
|
+
throw new EvalInputError(`evals.json failed schema validation: ${quoteSuiteBlock(result.error.message)}`);
|
|
136
237
|
}
|
|
137
238
|
// Compare ids as strings: each id names a working directory via String(id),
|
|
138
239
|
// so a numeric `1` and a string `"1"` would collide on disk even though they
|
|
@@ -143,18 +244,72 @@ export function parseEvalSuite(jsonText) {
|
|
|
143
244
|
}
|
|
144
245
|
return result.data;
|
|
145
246
|
}
|
|
247
|
+
/** The arms an {@link ArmWorkspaceDirs} covers, in dispatch order. */
|
|
248
|
+
export function armsOf(dirs) {
|
|
249
|
+
return dirs.without === undefined ? ['with'] : ['with', 'without'];
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* The directory segment for one arm. Throws rather than falling back to the arm
|
|
253
|
+
* NAME: a silent fallback would reinstate the unblinding this indirection exists
|
|
254
|
+
* to remove, and would do it invisibly.
|
|
255
|
+
*/
|
|
256
|
+
export function armDirSegment(dirs, arm) {
|
|
257
|
+
const segment = arm === 'with' ? dirs.with : dirs.without;
|
|
258
|
+
if (segment === undefined || segment === '') {
|
|
259
|
+
throw new EvalInputError(`Internal: no workspace directory was minted for the "${arm}" arm. ` +
|
|
260
|
+
'Every arm this run dispatches must have one; falling back to the arm name would ' +
|
|
261
|
+
'tell the executor which side of the A/B it is on.');
|
|
262
|
+
}
|
|
263
|
+
return segment;
|
|
264
|
+
}
|
|
146
265
|
/**
|
|
147
|
-
* Materialize each eval's declared input `files` into
|
|
148
|
-
* preserving relative structure.
|
|
149
|
-
* {@link EvalInputError} if a listed file does not exist (the eval cannot run
|
|
150
|
-
* Returns `workspacesRoot`.
|
|
266
|
+
* Materialize each eval's declared input `files` into
|
|
267
|
+
* `<workspacesRoot>/<armDir>/<id>/<relpath>`, preserving relative structure. Throws
|
|
268
|
+
* {@link EvalInputError} if a listed file does not exist (the eval cannot run
|
|
269
|
+
* without it). Returns `workspacesRoot`.
|
|
270
|
+
*
|
|
271
|
+
* EVERY eval gets a directory, including one that declares no `files` — it is
|
|
272
|
+
* simply left empty. An eval without a workspace used to leave the executor with
|
|
273
|
+
* no cwd of its own, so it ran inside the staged subject dir instead; for the
|
|
274
|
+
* skill-absent arm of a `--baseline` run that placed the control's cwd inside the
|
|
275
|
+
* very skill the arm exists to withhold. An empty dir costs nothing and keeps cwd
|
|
276
|
+
* shaped identically across both arms, which is what makes the A/B a comparison.
|
|
277
|
+
*
|
|
278
|
+
* WHY THE `<arm>` SEGMENT. The two arms of one eval are dispatched ADJACENTLY into
|
|
279
|
+
* a bounded-parallel pool, so they run at the same time. When they shared one
|
|
280
|
+
* directory, the control arm could simply `ls` and read whatever the treatment arm
|
|
281
|
+
* had just written — recovering the treatment's answer without ever touching the
|
|
282
|
+
* skill, and without producing a single detectable harness path. That is a channel
|
|
283
|
+
* BETWEEN the arms rather than into one of them, which is why auditing the four
|
|
284
|
+
* channels into a process (prompt, argv, cwd, env) did not surface it: each arm's
|
|
285
|
+
* own cwd was correct in isolation, and wrong as a pair. The arms must be
|
|
286
|
+
* byte-identical at start and unable to observe each other after it.
|
|
287
|
+
*
|
|
288
|
+
* WHY THE SEGMENT IS AN OPAQUE TOKEN and not the arm's name. It used to be the
|
|
289
|
+
* literal `with`/`without`, which made the executor's own working directory the
|
|
290
|
+
* loudest possible unblinding: the prompt tells each arm `Your working directory
|
|
291
|
+
* is …/vat-skill-test-ws-<token>/without/e1`, so the skill-absent arm was told, in
|
|
292
|
+
* the one string it cannot avoid reading, which side of the experiment it was on —
|
|
293
|
+
* while `buildExecutorPrompt`'s docblock promises it "must NEVER be told (directly
|
|
294
|
+
* or by implication) that it is being tested, evaluated, or graded". It also named
|
|
295
|
+
* the sibling: `../with/<id>/` was a guessable path to the treatment arm's live
|
|
296
|
+
* output. Independent random tokens fix both, and cost nothing.
|
|
151
297
|
*/
|
|
152
298
|
export function stageEvalWorkspaces(input) {
|
|
299
|
+
for (const arm of armsOf(input.armDirs)) {
|
|
300
|
+
stageEvalWorkspacesForArm(input, arm);
|
|
301
|
+
}
|
|
302
|
+
return input.workspacesRoot;
|
|
303
|
+
}
|
|
304
|
+
function stageEvalWorkspacesForArm(input, arm) {
|
|
305
|
+
const armRoot = safePath.joinUnderRoot(input.workspacesRoot, armDirSegment(input.armDirs, arm));
|
|
306
|
+
mkdirSyncReal(armRoot, { recursive: true, mode: 0o700 });
|
|
153
307
|
for (const entry of input.suite.evals) {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
308
|
+
const evalWorkspace = safePath.joinUnderRoot(armRoot, String(entry.id));
|
|
309
|
+
// 0700 like the root above it — created for every eval, populated only by
|
|
310
|
+
// those declaring `files`.
|
|
311
|
+
mkdirSyncReal(evalWorkspace, { recursive: true, mode: 0o700 });
|
|
312
|
+
for (const rel of entry.files ?? []) {
|
|
158
313
|
// Containment first: a `rel` that escapes evalsDir or the workspace is a
|
|
159
314
|
// genuine "escapes the eval directory" problem and is reported as such.
|
|
160
315
|
let src;
|
|
@@ -164,11 +319,11 @@ export function stageEvalWorkspaces(input) {
|
|
|
164
319
|
dest = safePath.joinUnderRoot(evalWorkspace, rel);
|
|
165
320
|
}
|
|
166
321
|
catch (err) {
|
|
167
|
-
throw new EvalInputError(`eval ${entry.id} declares input file "${rel}" that escapes the eval directory:
|
|
322
|
+
throw new EvalInputError(`eval ${entry.id} declares input file "${quoteSuiteText(rel)}" that escapes the eval directory: ` +
|
|
323
|
+
quoteSuiteText(err.message));
|
|
168
324
|
}
|
|
169
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- src is contained under evalsDir via joinUnderRoot; suite is developer-authored
|
|
170
325
|
if (!existsSync(src)) {
|
|
171
|
-
throw new EvalInputError(`eval ${entry.id} declares input file "${rel}" but it is absent at ${src}`);
|
|
326
|
+
throw new EvalInputError(`eval ${entry.id} declares input file "${quoteSuiteText(rel)}" but it is absent at ${quoteSuiteText(src)}`);
|
|
172
327
|
}
|
|
173
328
|
// Copy failures (permissions, illegal filename on the host, disk) are
|
|
174
329
|
// reported accurately rather than mislabeled as a containment escape.
|
|
@@ -179,10 +334,10 @@ export function stageEvalWorkspaces(input) {
|
|
|
179
334
|
cpSync(src, dest, { recursive: true });
|
|
180
335
|
}
|
|
181
336
|
catch (err) {
|
|
182
|
-
throw new EvalInputError(`eval ${entry.id} failed to stage input file "${rel}" into the workspace:
|
|
337
|
+
throw new EvalInputError(`eval ${entry.id} failed to stage input file "${quoteSuiteText(rel)}" into the workspace: ` +
|
|
338
|
+
quoteSuiteText(err.message));
|
|
183
339
|
}
|
|
184
340
|
}
|
|
185
341
|
}
|
|
186
|
-
return input.workspacesRoot;
|
|
187
342
|
}
|
|
188
343
|
//# sourceMappingURL=eval-inputs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eval-inputs.js","sourceRoot":"","sources":["../../src/skill-test/eval-inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"eval-inputs.js","sourceRoot":"","sources":["../../src/skill-test/eval-inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAEnF;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,cAAe,SAAQ,QAAQ;IACjC,MAAM,GAAG,WAAoB,CAAC;IACvC,YAAY,OAAe;QACzB,KAAK,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,SAAS,eAAe,CAAC,KAAa;IACpC,OAAO,2BAA2B,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAE3C;+EAC+E;AAC/E,MAAM,sBAAsB,GAAG;IAC7B,IAAI;IACJ,QAAQ;IACR,iBAAiB;IACjB,OAAO;IACP,cAAc;IACd,MAAM;I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AC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;gBACrB,MAAM,IAAI,cAAc,CACtB,QAAQ,KAAK,CAAC,EAAE,yBAAyB,cAAc,CAAC,GAAG,CAAC,yBAAyB,cAAc,CAAC,GAAG,CAAC,EAAE,CAC3G,CAAC;YACJ,CAAC;YACD,sEAAsE;YACtE,sEAAsE;YACtE,IAAI,CAAC;gBACH,0EAA0E;gBAC1E,kDAAkD;gBAClD,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;gBAC3E,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YACzC,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,MAAM,IAAI,cAAc,CACtB,QAAQ,KAAK,CAAC,EAAE,gCAAgC,cAAc,CAAC,GAAG,CAAC,wBAAwB;oBACzF,cAAc,CAAE,GAAa,CAAC,OAAO,CAAC,CACzC,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Advisory (never-fatal) lint over an eval suite's `expectations` prose
|
|
3
|
-
*
|
|
2
|
+
* Advisory (never-fatal) lint over an eval suite's `expectations` prose.
|
|
3
|
+
* An adopter reported that WEAK expectations — pure "mentions X" /
|
|
4
4
|
* "includes Y" presence checks with no discriminating or negative counterpart —
|
|
5
5
|
* pass even for a hallucinated or right-for-the-wrong-reason answer, giving false
|
|
6
6
|
* confidence in a green run. This module flags that pattern so authors can
|
|
@@ -34,8 +34,8 @@ export interface EvalLintWarning {
|
|
|
34
34
|
export declare function lintEvalExpectations(evals: EvalEntry[]): EvalLintWarning[];
|
|
35
35
|
/**
|
|
36
36
|
* Advisory (never-fatal) lint: flag a `toolExpectations` entry that names an
|
|
37
|
-
* executable which looks like a TYPO of one of the skill's `declaredExecutables
|
|
38
|
-
*
|
|
37
|
+
* executable which looks like a TYPO of one of the skill's `declaredExecutables`.
|
|
38
|
+
* A name that never matches a real tool is a quiet
|
|
39
39
|
* footgun — `mustRun`/`mustSucceed`/`sequence` then fail for the wrong reason, and
|
|
40
40
|
* `mustNotRun` passes vacuously (the tool "never ran" only because the name is
|
|
41
41
|
* wrong). This is zero-token static plumbing, run before any spend.
|
|
@@ -46,6 +46,19 @@ export declare function lintEvalExpectations(evals: EvalEntry[]): EvalLintWarnin
|
|
|
46
46
|
* not close to any declared name (a deliberate built-in/system tool reference), is
|
|
47
47
|
* never flagged. When the skill declares no executables there is nothing to compare
|
|
48
48
|
* against, so it returns no warnings. Pure + side-effect free.
|
|
49
|
+
*
|
|
50
|
+
* ⚠️ EVERY INTERPOLATED NAME IS NEUTRALIZED WITH {@link quoteSuiteText}, at the point
|
|
51
|
+
* of CONSTRUCTION rather than at the stderr write, so the message is safe wherever it
|
|
52
|
+
* is later carried. Both populations here are untrusted: `toolExpectations.*` is
|
|
53
|
+
* `z.array(z.string().min(1))` with no charset constraint on a `.passthrough()` entry,
|
|
54
|
+
* and `resolveEvalSuitePath` will harvest the suite out of a FETCHED artifact — i.e.
|
|
55
|
+
* out of the skill under test; the declared names come from that same skill's
|
|
56
|
+
* manifest. `run-harness.ts` writes this text with no sanitizer of its own, and does
|
|
57
|
+
* it at Step 5.5 — AHEAD of the `--i-understand-this-runs-skill-code` gate and ahead
|
|
58
|
+
* of the `--dry-run` short-circuit, so an unsanitized name repaints the terminal of a
|
|
59
|
+
* run that spawned nothing and that the operator believes never executed skill code.
|
|
60
|
+
* Matching still happens on the RAW value, so neutralization cannot change which
|
|
61
|
+
* names are flagged.
|
|
49
62
|
*/
|
|
50
63
|
export declare function lintToolExpectationExecutables(evals: EvalEntry[], declaredExecutableNames: string[]): EvalLintWarning[];
|
|
51
64
|
//# sourceMappingURL=eval-lint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eval-lint.d.ts","sourceRoot":"","sources":["../../src/skill-test/eval-lint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"eval-lint.d.ts","sourceRoot":"","sources":["../../src/skill-test/eval-lint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEpF,oGAAoG;AACpG,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAsBD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,eAAe,EAAE,CAgB1E;AA0DD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,SAAS,EAAE,EAClB,uBAAuB,EAAE,MAAM,EAAE,GAChC,eAAe,EAAE,CAuBnB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Advisory (never-fatal) lint over an eval suite's `expectations` prose
|
|
3
|
-
*
|
|
2
|
+
* Advisory (never-fatal) lint over an eval suite's `expectations` prose.
|
|
3
|
+
* An adopter reported that WEAK expectations — pure "mentions X" /
|
|
4
4
|
* "includes Y" presence checks with no discriminating or negative counterpart —
|
|
5
5
|
* pass even for a hallucinated or right-for-the-wrong-reason answer, giving false
|
|
6
6
|
* confidence in a green run. This module flags that pattern so authors can
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* than a missed one, since the grader (an LLM judging the transcript) is the real
|
|
12
12
|
* backstop for eval quality.
|
|
13
13
|
*/
|
|
14
|
-
import { isSingleEditAway } from './eval-inputs.js';
|
|
14
|
+
import { isSingleEditAway, quoteSuiteText } from './eval-inputs.js';
|
|
15
15
|
// An expectation "looks like" a pure presence/mention check when it uses one of
|
|
16
16
|
// these verbs — the vocabulary authors reach for when asserting "X shows up
|
|
17
17
|
// somewhere in the output" without saying what a WRONG output would look like.
|
|
@@ -62,7 +62,7 @@ export function lintEvalExpectations(evals) {
|
|
|
62
62
|
return warnings;
|
|
63
63
|
}
|
|
64
64
|
// ---------------------------------------------------------------------------
|
|
65
|
-
// Undeclared-executable lint
|
|
65
|
+
// Undeclared-executable lint
|
|
66
66
|
// ---------------------------------------------------------------------------
|
|
67
67
|
// A trailing script/binary extension we strip before comparing an executable
|
|
68
68
|
// name to a declared one, so `csvsum.py`/`./csvsum`/`csvsum` all normalize to `csvsum` (the
|
|
@@ -115,8 +115,8 @@ function probableDeclaredTypoTarget(name, declared) {
|
|
|
115
115
|
}
|
|
116
116
|
/**
|
|
117
117
|
* Advisory (never-fatal) lint: flag a `toolExpectations` entry that names an
|
|
118
|
-
* executable which looks like a TYPO of one of the skill's `declaredExecutables
|
|
119
|
-
*
|
|
118
|
+
* executable which looks like a TYPO of one of the skill's `declaredExecutables`.
|
|
119
|
+
* A name that never matches a real tool is a quiet
|
|
120
120
|
* footgun — `mustRun`/`mustSucceed`/`sequence` then fail for the wrong reason, and
|
|
121
121
|
* `mustNotRun` passes vacuously (the tool "never ran" only because the name is
|
|
122
122
|
* wrong). This is zero-token static plumbing, run before any spend.
|
|
@@ -127,13 +127,26 @@ function probableDeclaredTypoTarget(name, declared) {
|
|
|
127
127
|
* not close to any declared name (a deliberate built-in/system tool reference), is
|
|
128
128
|
* never flagged. When the skill declares no executables there is nothing to compare
|
|
129
129
|
* against, so it returns no warnings. Pure + side-effect free.
|
|
130
|
+
*
|
|
131
|
+
* ⚠️ EVERY INTERPOLATED NAME IS NEUTRALIZED WITH {@link quoteSuiteText}, at the point
|
|
132
|
+
* of CONSTRUCTION rather than at the stderr write, so the message is safe wherever it
|
|
133
|
+
* is later carried. Both populations here are untrusted: `toolExpectations.*` is
|
|
134
|
+
* `z.array(z.string().min(1))` with no charset constraint on a `.passthrough()` entry,
|
|
135
|
+
* and `resolveEvalSuitePath` will harvest the suite out of a FETCHED artifact — i.e.
|
|
136
|
+
* out of the skill under test; the declared names come from that same skill's
|
|
137
|
+
* manifest. `run-harness.ts` writes this text with no sanitizer of its own, and does
|
|
138
|
+
* it at Step 5.5 — AHEAD of the `--i-understand-this-runs-skill-code` gate and ahead
|
|
139
|
+
* of the `--dry-run` short-circuit, so an unsanitized name repaints the terminal of a
|
|
140
|
+
* run that spawned nothing and that the operator believes never executed skill code.
|
|
141
|
+
* Matching still happens on the RAW value, so neutralization cannot change which
|
|
142
|
+
* names are flagged.
|
|
130
143
|
*/
|
|
131
144
|
export function lintToolExpectationExecutables(evals, declaredExecutableNames) {
|
|
132
145
|
const warnings = [];
|
|
133
146
|
const declared = declaredExecutableNames.map((original) => ({ original, normalized: normalizeExecutableName(original) }));
|
|
134
147
|
if (declared.length === 0)
|
|
135
148
|
return warnings;
|
|
136
|
-
const declaredList = declared.map((d) => d.original).join(', ');
|
|
149
|
+
const declaredList = declared.map((d) => quoteSuiteText(d.original)).join(', ');
|
|
137
150
|
for (const entry of evals) {
|
|
138
151
|
const evalId = String(entry.id);
|
|
139
152
|
const seen = new Set();
|
|
@@ -146,8 +159,8 @@ export function lintToolExpectationExecutables(evals, declaredExecutableNames) {
|
|
|
146
159
|
continue;
|
|
147
160
|
warnings.push({
|
|
148
161
|
evalId,
|
|
149
|
-
message: `eval "${evalId}": toolExpectation references executable "${name}", which no declared executable matches — ` +
|
|
150
|
-
`did you mean "${target}"? A name that never matches a real tool makes mustRun/mustSucceed/sequence fail ` +
|
|
162
|
+
message: `eval "${evalId}": toolExpectation references executable "${quoteSuiteText(name)}", which no declared executable matches — ` +
|
|
163
|
+
`did you mean "${quoteSuiteText(target)}"? A name that never matches a real tool makes mustRun/mustSucceed/sequence fail ` +
|
|
151
164
|
`for the wrong reason (or mustNotRun pass vacuously). Declared executables: ${declaredList}.`,
|
|
152
165
|
});
|
|
153
166
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eval-lint.js","sourceRoot":"","sources":["../../src/skill-test/eval-lint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,gBAAgB,EAAkB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"eval-lint.js","sourceRoot":"","sources":["../../src/skill-test/eval-lint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAkB,MAAM,kBAAkB,CAAC;AAQpF,gFAAgF;AAChF,4EAA4E;AAC5E,+EAA+E;AAC/E,MAAM,qBAAqB,GAAG,2EAA2E,CAAC;AAE1G,iFAAiF;AACjF,kFAAkF;AAClF,0EAA0E;AAC1E,4EAA4E;AAC5E,2EAA2E;AAC3E,kFAAkF;AAClF,6DAA6D;AAC7D,MAAM,sBAAsB,GAC1B,+GAA+G,CAAC;AAElH,0IAA0I;AAC1I,SAAS,yBAAyB,CAAC,WAAmB;IACpD,OAAO,qBAAqB,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAC9F,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAkB;IACrD,MAAM,QAAQ,GAAsB,EAAE,CAAC;IACvC,KAAK,MAAM,KAAK,IAAI,KAAK,EAAE,CAAC;QAC1B,IAAI,KAAK,CAAC,YAAY,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QAC9C,IAAI,KAAK,CAAC,gBAAgB,KAAK,SAAS;YAAE,SAAS;QACnD,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,yBAAyB,CAAC;YAAE,SAAS;QACnE,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAChC,QAAQ,CAAC,IAAI,CAAC;YACZ,MAAM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M,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAChC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;QAC/B,KAAK,MAAM,IAAI,IAAI,iCAAiC,CAAC,KAAK,CAAC,EAAE,CAAC;YAC5D,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;gBAAE,SAAS;YAC7B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACf,MAAM,MAAM,GAAG,0BAA0B,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YAC1D,IAAI,MAAM,KAAK,SAAS;gBAAE,SAAS;YACnC,QAAQ,CAAC,IAAI,CAAC;gBACZ,MAAM;gBACN,OAAO,EACL,SAAS,MAAM,6CAA6C,cAAc,CAAC,IAAI,CAAC,4CAA4C;oBAC5H,iBAAiB,cAAc,CAAC,MAAM,CAAC,mFAAmF;oBAC1H,8EAA8E,YAAY,GAAG;aAChG,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eval-suite-isolation.d.ts","sourceRoot":"","sources":["../../src/skill-test/eval-suite-isolation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAOH;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AAExD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"eval-suite-isolation.d.ts","sourceRoot":"","sources":["../../src/skill-test/eval-suite-isolation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAOH;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AAExD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAaxG;AA0BD,MAAM,WAAW,qBAAqB;IACpC,kFAAkF;IAClF,SAAS,EAAE,MAAM,CAAC;IAClB,6FAA6F;IAC7F,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAoBtE"}
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
*/
|
|
35
35
|
import { cpSync, existsSync, lstatSync, rmSync } from 'node:fs';
|
|
36
36
|
import { basename, dirname } from 'node:path';
|
|
37
|
-
import { mkdirSyncReal, safePath } from '@vibe-agent-toolkit/utils';
|
|
37
|
+
import { isVatError, mkdirSyncReal, PathEscapesRootError, safePath } from '@vibe-agent-toolkit/utils';
|
|
38
38
|
/**
|
|
39
39
|
* Where a skill's eval suite lives by convention. Defined here, beside the code
|
|
40
40
|
* that must REMOVE it, because every lane that reasons about a suite needs the
|
|
@@ -69,8 +69,13 @@ export function evalSuiteUnitPath(skillDir, evalsSubpath) {
|
|
|
69
69
|
try {
|
|
70
70
|
return safePath.joinUnderRoot(skillDir, relative);
|
|
71
71
|
}
|
|
72
|
-
catch {
|
|
73
|
-
|
|
72
|
+
catch (error) {
|
|
73
|
+
// Only the containment helper's OWN refusal means "outside the skill dir";
|
|
74
|
+
// anything else out of it is a bug, and `undefined` would read as
|
|
75
|
+
// "nothing to strip" — leaving the answer key in the staged copy.
|
|
76
|
+
if (isVatError(error, PathEscapesRootError.code))
|
|
77
|
+
return undefined;
|
|
78
|
+
throw error;
|
|
74
79
|
}
|
|
75
80
|
}
|
|
76
81
|
/**
|
|
@@ -109,7 +114,6 @@ function assertInsideRoot(child, root) {
|
|
|
109
114
|
*/
|
|
110
115
|
export function isolateEvalSuite(input) {
|
|
111
116
|
const unit = evalSuiteUnitPath(input.stagedDir, input.evalsSubpath);
|
|
112
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- unit is proven inside our own staged dir
|
|
113
117
|
if (unit === undefined || !existsSync(unit))
|
|
114
118
|
return false;
|
|
115
119
|
assertInsideRoot(input.stagedDir, input.stagingRoot);
|
|
@@ -120,7 +124,6 @@ export function isolateEvalSuite(input) {
|
|
|
120
124
|
// lands at `<holdDir>/<basename(evalsSubpath)>` either way and `fixtures/` keep
|
|
121
125
|
// their positions relative to it — exactly the shape the eval-input staging
|
|
122
126
|
// expects from an authored evals dir.
|
|
123
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- unit is proven inside our own staged dir
|
|
124
127
|
const dest = lstatSync(unit).isDirectory() ? input.holdDir : safePath.join(input.holdDir, basename(unit));
|
|
125
128
|
cpSync(unit, dest, { recursive: true });
|
|
126
129
|
preserved = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eval-suite-isolation.js","sourceRoot":"","sources":["../../src/skill-test/eval-suite-isolation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"eval-suite-isolation.js","sourceRoot":"","sources":["../../src/skill-test/eval-suite-isolation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAE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als-template.ts — scaffold a starter `evals.json` on bootstrap (exit 2, `Reason: bootstrap`).
|
|
3
3
|
*
|
|
4
4
|
* When a subject skill has no `evals/evals.json`, the harness writes an
|
|
5
5
|
* annotated template the user can fill in and re-run. The shape mirrors
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evals-template.d.ts","sourceRoot":"","sources":["../../src/skill-test/evals-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CA6C5D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"evals-template.d.ts","sourceRoot":"","sources":["../../src/skill-test/evals-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CA6C5D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAS/E"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* evals-template.ts — scaffold a starter `evals.json` on bootstrap (exit
|
|
2
|
+
* evals-template.ts — scaffold a starter `evals.json` on bootstrap (exit 2, `Reason: bootstrap`).
|
|
3
3
|
*
|
|
4
4
|
* When a subject skill has no `evals/evals.json`, the harness writes an
|
|
5
5
|
* annotated template the user can fill in and re-run. The shape mirrors
|
|
@@ -70,9 +70,7 @@ export function writeEvalsTemplate(evalsPath, skillName) {
|
|
|
70
70
|
mkdirSyncReal(parent, { recursive: true });
|
|
71
71
|
// Defensive: never clobber an authored eval suite. Callers only reach here when
|
|
72
72
|
// the suite is absent, but guard so a stray call can never destroy real evals.
|
|
73
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- our own resolved scaffold path
|
|
74
73
|
if (!existsSync(evalsPath)) {
|
|
75
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- our own resolved scaffold path
|
|
76
74
|
writeFileSync(evalsPath, buildEvalsTemplate(skillName), 'utf8');
|
|
77
75
|
}
|
|
78
76
|
return evalsPath;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evals-template.js","sourceRoot":"","sources":["../../src/skill-test/evals-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEpE,2EAA2E;AAC3E,MAAM,UAAU,kBAAkB,CAAC,SAAiB;IAClD,MAAM,QAAQ,GAAG;QACf,QAAQ,EAAE;YACR,8DAA8D;YAC9D,oFAAoF;YACpF,kBAAkB;YAClB,8EAA8E;YAC9E,yFAAyF;YACzF,iFAAiF;YACjF,oFAAoF;YACpF,yFAAyF;YACzF,2FAA2F;YAC3F,6FAA6F;YAC7F,mFAAmF;YACnF,uFAAuF;YACvF,wFAAwF;YACxF,gGAAgG;YAChG,kGAAkG;YAClG,mFAAmF;YACnF,+FAA+F;YAC/F,qFAAqF;YACrF,wFAAwF;YACxF,0FAA0F;YAC1F,mFAAmF;YACnF,qFAAqF;YACrF,oFAAoF;YACpF,yFAAyF;YACzF,2GAA2G;SAC5G;QACD,UAAU,EAAE,SAAS;QACrB,KAAK,EAAE;YACL;gBACE,EAAE,EAAE,CAAC;gBACL,QAAQ,EAAE,qDAAqD;gBAC/D,MAAM,EAAE,yEAAyE;gBACjF,eAAe,EAAE,kDAAkD;gBACnE,KAAK,EAAE,EAAE;gBACT,YAAY,EAAE;oBACZ,sGAAsG;oBACtG,2GAA2G;iBAC5G;aACF;SACF;KACF,CAAC;IACF,OAAO,IAAI,CAAC,SAA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EAAE;oBACZ,sGAAsG;oBACtG,2GAA2G;iBAC5G;aACF;SACF;KACF,CAAC;IACF,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;AAClD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,SAAiB,EAAE,SAAiB;IACrE,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC9C,aAAa,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3C,gFAAgF;IAChF,+EAA+E;IAC/E,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC3B,aAAa,CAAC,SAAS,EAAE,kBAAkB,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
export interface BuildExecutorPromptOptions {
|
|
2
2
|
/** The eval's `prompt` field, verbatim — the task the executor must perform. */
|
|
3
3
|
task: string;
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Path to the staged subject (skill/plugin under test).
|
|
6
|
+
*
|
|
7
|
+
* OMITTED for the skill-absent (WITHOUT) arm of a `--baseline` run. Naming it
|
|
8
|
+
* there would hand the control arm the exact thing the arm exists to withhold:
|
|
9
|
+
* the staged dir holds both the skill's SKILL.md and any executable it ships,
|
|
10
|
+
* so a control arm told this path can recover the whole treatment with one
|
|
11
|
+
* `cat`/`ls`. The A/B is only a measurement while this stays absent.
|
|
12
|
+
*/
|
|
13
|
+
subjectPath?: string;
|
|
14
|
+
/** The eval's working directory — the project the executor should operate on. */
|
|
7
15
|
workspaceDir?: string;
|
|
8
16
|
}
|
|
9
17
|
/**
|
|
10
|
-
* Build the prompt handed to the blind executor subagent (
|
|
11
|
-
* transcript-grounded eval
|
|
18
|
+
* Build the prompt handed to the blind executor subagent (the
|
|
19
|
+
* transcript-grounded eval design). The executor is a real worker, not a
|
|
12
20
|
* participant in an eval: it receives the task and its working context ONLY,
|
|
13
21
|
* phrased exactly as a genuine user request. It must NEVER be told (directly
|
|
14
22
|
* or by implication) that it is being tested, evaluated, or graded — that
|
|
15
23
|
* knowledge would change its behavior and invalidate the eval.
|
|
16
24
|
*
|
|
17
25
|
* `subjectPath` is where the skill/plugin under test is staged (context the
|
|
18
|
-
* executor's environment provides)
|
|
19
|
-
*
|
|
26
|
+
* executor's environment provides) and is OMITTED for the skill-absent arm;
|
|
27
|
+
* `workspaceDir` is the project the executor is actually meant to operate on.
|
|
20
28
|
*
|
|
21
29
|
* Pure function: same inputs always produce the same prompt.
|
|
22
30
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor-prompt.d.ts","sourceRoot":"","sources":["../../src/skill-test/executor-prompt.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,0BAA0B;IACzC,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;IACb
|
|
1
|
+
{"version":3,"file":"executor-prompt.d.ts","sourceRoot":"","sources":["../../src/skill-test/executor-prompt.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,0BAA0B;IACzC,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iFAAiF;IACjF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,0BAA0B,GAAG,MAAM,CAS5E;AAWD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAiBjF"}
|