@pome-sh/cli 0.1.1 → 0.3.0
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 -6
- package/dist/build-info.json +3 -3
- package/dist/src/cli/eval.js +26 -8
- package/dist/src/cli/init-sdk.d.ts +0 -3
- package/dist/src/cli/init-sdk.js +117 -24
- package/dist/src/cli/main.js +23 -69
- package/dist/src/cli/register.d.ts +9 -0
- package/dist/src/cli/register.js +51 -5
- package/dist/src/cli/session.d.ts +7 -1
- package/dist/src/cli/session.js +87 -27
- package/dist/src/demo/first-run-demo.md +3 -3
- package/dist/src/demo/runDemo.js +3 -2
- package/dist/src/hosted/client.d.ts +44 -6
- package/dist/src/hosted/client.js +333 -19
- package/dist/src/hosted/errors.d.ts +11 -1
- package/dist/src/hosted/errors.js +8 -1
- package/dist/src/hosted/evalResultView.d.ts +2 -0
- package/dist/src/hosted/evalResultView.js +22 -0
- package/dist/src/hosted/uploadAndFinalize.d.ts +18 -1
- package/dist/src/hosted/uploadAndFinalize.js +51 -3
- package/dist/src/recorder/inspect.js +20 -2
- package/dist/src/runner/mergeAdapterSignals.js +2 -2
- package/dist/src/runner/ports.js +3 -0
- package/dist/src/runner/runScenario.d.ts +79 -2
- package/dist/src/runner/runScenario.js +94 -36
- package/dist/src/runner/runScenarioHosted.d.ts +37 -0
- package/dist/src/runner/runScenarioHosted.js +261 -61
- package/dist/src/runner/runTrialGroup.d.ts +1 -3
- package/dist/src/runner/runTrialGroup.js +1 -3
- package/dist/src/scenario/parseScenario.d.ts +5 -0
- package/dist/src/scenario/parseScenario.js +149 -10
- package/dist/src/scenario/scenarioSchema.d.ts +200 -3
- package/dist/src/scenario/scenarioSchema.js +16 -4
- package/dist/src/twin/twinHarness.d.ts +11 -1
- package/dist/src/twin/twinHarness.js +7 -3
- package/dist/src/twin/twinStart.d.ts +19 -0
- package/dist/src/twin/twinStart.js +156 -0
- package/node_modules/@pome-sh/sdk/dist/fidelity-inventory.d.ts +121 -0
- package/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js +204 -0
- package/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js.map +1 -0
- package/node_modules/@pome-sh/sdk/dist/parity.d.ts +55 -0
- package/node_modules/@pome-sh/sdk/dist/parity.js +112 -0
- package/node_modules/@pome-sh/sdk/dist/parity.js.map +1 -0
- package/node_modules/@pome-sh/sdk/dist/server-helpers.d.ts +15 -0
- package/node_modules/@pome-sh/sdk/dist/server-helpers.js +96 -0
- package/node_modules/@pome-sh/sdk/dist/server-helpers.js.map +1 -1
- package/node_modules/@pome-sh/sdk/dist/server.d.ts +1 -1
- package/node_modules/@pome-sh/sdk/dist/server.js +9 -7
- package/node_modules/@pome-sh/sdk/dist/server.js.map +1 -1
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/errors.d.ts +39 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/errors.js +33 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/errors.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/evaluator-hooks.d.ts +13 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/evaluator-hooks.js +6 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/evaluator-hooks.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/finalize-shapes.d.ts +215 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js +83 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/github-access-control.d.ts +175 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/github-access-control.js +182 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/github-access-control.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/identity.d.ts +90 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/identity.js +72 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/identity.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/index.d.ts +27 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/index.js +34 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/index.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/event-schema.d.ts +286 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js +33 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.d.ts +65 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js +455 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.d.ts +39 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js +47 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/index.d.ts +25 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/index.js +27 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/index.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.d.ts +100 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js +185 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/map-span.d.ts +64 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/map-span.js +112 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/map-span.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/nano.d.ts +26 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/nano.js +61 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/nano.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/project.d.ts +42 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/project.js +96 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/project.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/semconv.d.ts +51 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/semconv.js +74 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/semconv.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/span-event.d.ts +134 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/span-event.js +152 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/span-event.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/recorder-events.d.ts +418 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/recorder-events.js +234 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/recorder-events.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/redaction.d.ts +2 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/redaction.js +152 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/redaction.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/rest.d.ts +198 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/rest.js +225 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/rest.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/run.d.ts +201 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/run.js +166 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/run.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/seed-state.d.ts +446 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/seed-state.js +167 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/seed-state.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/sessions.d.ts +53 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/sessions.js +51 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/sessions.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task-vocab.d.ts +66 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task-vocab.js +84 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task-vocab.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task.d.ts +483 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task.js +60 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/package.json +54 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/trace-contract.json +41 -0
- package/node_modules/@pome-sh/sdk/package.json +6 -2
- package/node_modules/@pome-sh/shared-types/dist/errors.d.ts +39 -0
- package/node_modules/@pome-sh/shared-types/dist/errors.js +33 -0
- package/node_modules/@pome-sh/shared-types/dist/errors.js.map +1 -0
- package/node_modules/@pome-sh/shared-types/dist/finalize-shapes.d.ts +254 -0
- package/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js +122 -0
- package/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js.map +1 -0
- package/node_modules/@pome-sh/shared-types/dist/identity.d.ts +90 -0
- package/node_modules/@pome-sh/shared-types/dist/identity.js +72 -0
- package/node_modules/@pome-sh/shared-types/dist/identity.js.map +1 -0
- package/node_modules/@pome-sh/shared-types/dist/index.d.ts +13 -1353
- package/node_modules/@pome-sh/shared-types/dist/index.js +14 -568
- package/node_modules/@pome-sh/shared-types/dist/index.js.map +1 -1
- package/node_modules/@pome-sh/shared-types/dist/otel/event-schema.d.ts +45 -0
- package/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js +8 -0
- package/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js.map +1 -1
- package/node_modules/@pome-sh/shared-types/dist/otel/semconv.js +7 -0
- package/node_modules/@pome-sh/shared-types/dist/otel/semconv.js.map +1 -1
- package/node_modules/@pome-sh/shared-types/dist/recorder-events.d.ts +62 -0
- package/node_modules/@pome-sh/shared-types/dist/recorder-events.js +36 -0
- package/node_modules/@pome-sh/shared-types/dist/recorder-events.js.map +1 -1
- package/node_modules/@pome-sh/shared-types/dist/rest.d.ts +248 -0
- package/node_modules/@pome-sh/shared-types/dist/rest.js +308 -0
- package/node_modules/@pome-sh/shared-types/dist/rest.js.map +1 -0
- package/node_modules/@pome-sh/shared-types/dist/run.d.ts +7 -0
- package/node_modules/@pome-sh/shared-types/dist/run.js +5 -1
- package/node_modules/@pome-sh/shared-types/dist/run.js.map +1 -1
- package/node_modules/@pome-sh/shared-types/dist/seed-envelope.d.ts +14 -0
- package/node_modules/@pome-sh/shared-types/dist/seed-envelope.js +46 -0
- package/node_modules/@pome-sh/shared-types/dist/seed-envelope.js.map +1 -0
- package/node_modules/@pome-sh/shared-types/dist/seed-state.d.ts +446 -0
- package/node_modules/@pome-sh/shared-types/dist/seed-state.js +167 -0
- package/node_modules/@pome-sh/shared-types/dist/seed-state.js.map +1 -0
- package/node_modules/@pome-sh/shared-types/dist/sessions.d.ts +53 -0
- package/node_modules/@pome-sh/shared-types/dist/sessions.js +51 -0
- package/node_modules/@pome-sh/shared-types/dist/sessions.js.map +1 -0
- package/node_modules/@pome-sh/shared-types/dist/task-vocab.d.ts +15 -1
- package/node_modules/@pome-sh/shared-types/dist/task-vocab.js +15 -1
- package/node_modules/@pome-sh/shared-types/dist/task-vocab.js.map +1 -1
- package/node_modules/@pome-sh/shared-types/dist/task.d.ts +485 -0
- package/node_modules/@pome-sh/shared-types/dist/task.js +60 -0
- package/node_modules/@pome-sh/shared-types/dist/task.js.map +1 -0
- package/node_modules/@pome-sh/shared-types/package.json +2 -1
- package/node_modules/@pome-sh/shared-types/trace-contract.json +1 -1
- package/node_modules/@pome-sh/twin-github/FIDELITY.md +127 -67
- package/node_modules/@pome-sh/twin-github/README.md +3 -7
- package/node_modules/@pome-sh/twin-github/dist/examples/claude-github-agent.js +4 -20
- package/node_modules/@pome-sh/twin-github/dist/examples/claude-github-agent.js.map +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/access-control.d.ts +3 -3
- package/node_modules/@pome-sh/twin-github/dist/src/domain.d.ts +141 -3
- package/node_modules/@pome-sh/twin-github/dist/src/domain.js +0 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain.js.map +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/routes.js +2 -0
- package/node_modules/@pome-sh/twin-github/dist/src/routes.js.map +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/seed.d.ts +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/serializers.d.ts +2 -2
- package/node_modules/@pome-sh/twin-github/dist/src/server.js +7 -6
- package/node_modules/@pome-sh/twin-github/dist/src/server.js.map +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/tools.d.ts +168 -18
- package/node_modules/@pome-sh/twin-github/dist/src/tools.js +23 -0
- package/node_modules/@pome-sh/twin-github/dist/src/tools.js.map +1 -1
- package/node_modules/@pome-sh/twin-github/fidelity.inventory.json +773 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/errors.d.ts +39 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/errors.js +33 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/errors.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/finalize-shapes.d.ts +252 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js +122 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/github-access-control.d.ts +175 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/github-access-control.js +182 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/github-access-control.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/identity.d.ts +90 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/identity.js +72 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/identity.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/index.d.ts +27 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/index.js +34 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/index.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/event-schema.d.ts +331 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js +33 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.d.ts +65 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js +455 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.d.ts +39 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js +47 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/index.d.ts +25 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/index.js +27 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/index.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.d.ts +100 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js +193 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/map-span.d.ts +64 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/map-span.js +112 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/map-span.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/nano.d.ts +26 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/nano.js +61 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/nano.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/project.d.ts +42 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/project.js +96 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/project.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/semconv.d.ts +51 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/semconv.js +81 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/semconv.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/span-event.d.ts +134 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/span-event.js +152 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/otel/span-event.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/recorder-events.d.ts +480 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/recorder-events.js +270 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/recorder-events.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/redaction.d.ts +2 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/redaction.js +152 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/redaction.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/rest.d.ts +245 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/rest.js +303 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/rest.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/run.d.ts +208 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/run.js +170 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/run.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/seed-envelope.d.ts +14 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/seed-envelope.js +46 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/seed-envelope.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/seed-state.d.ts +446 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/seed-state.js +167 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/seed-state.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/sessions.d.ts +53 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/sessions.js +51 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/sessions.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/task-vocab.d.ts +66 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/task-vocab.js +84 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/task-vocab.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/task.d.ts +485 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/task.js +60 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/dist/task.js.map +1 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/package.json +54 -0
- package/node_modules/@pome-sh/twin-github/node_modules/@pome-sh/shared-types/trace-contract.json +41 -0
- package/node_modules/@pome-sh/twin-github/package.json +5 -4
- package/node_modules/@pome-sh/twin-slack/FIDELITY.md +121 -35
- package/node_modules/@pome-sh/twin-slack/README.md +2 -6
- package/node_modules/@pome-sh/twin-slack/dist/scripts/fidelity-parity.d.ts +1 -0
- package/node_modules/@pome-sh/twin-slack/dist/scripts/fidelity-parity.js +92 -0
- package/node_modules/@pome-sh/twin-slack/dist/scripts/fidelity-parity.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/dist/scripts/smoke.js +3 -3
- package/node_modules/@pome-sh/twin-slack/dist/scripts/smoke.js.map +1 -1
- package/node_modules/@pome-sh/twin-slack/dist/scripts/validate-mcp.js +1 -1
- package/node_modules/@pome-sh/twin-slack/dist/scripts/validate-mcp.js.map +1 -1
- package/node_modules/@pome-sh/twin-slack/dist/src/server.js +7 -6
- package/node_modules/@pome-sh/twin-slack/dist/src/server.js.map +1 -1
- package/node_modules/@pome-sh/twin-slack/dist/src/tools.d.ts +30 -4
- package/node_modules/@pome-sh/twin-slack/dist/src/tools.js +48 -1
- package/node_modules/@pome-sh/twin-slack/dist/src/tools.js.map +1 -1
- package/node_modules/@pome-sh/twin-slack/fidelity.inventory.json +377 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/errors.d.ts +39 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/errors.js +33 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/errors.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/finalize-shapes.d.ts +252 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js +122 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/github-access-control.d.ts +175 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/github-access-control.js +182 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/github-access-control.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/identity.d.ts +90 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/identity.js +72 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/identity.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/index.d.ts +27 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/index.js +34 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/index.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/event-schema.d.ts +331 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js +33 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.d.ts +65 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js +455 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.d.ts +39 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js +47 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/index.d.ts +25 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/index.js +27 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/index.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.d.ts +100 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js +193 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/map-span.d.ts +64 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/map-span.js +112 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/map-span.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/nano.d.ts +26 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/nano.js +61 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/nano.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/project.d.ts +42 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/project.js +96 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/project.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/semconv.d.ts +51 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/semconv.js +81 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/semconv.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/span-event.d.ts +134 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/span-event.js +152 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/otel/span-event.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/recorder-events.d.ts +480 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/recorder-events.js +270 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/recorder-events.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/redaction.d.ts +2 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/redaction.js +152 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/redaction.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/rest.d.ts +245 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/rest.js +303 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/rest.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/run.d.ts +208 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/run.js +170 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/run.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/seed-envelope.d.ts +14 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/seed-envelope.js +46 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/seed-envelope.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/seed-state.d.ts +446 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/seed-state.js +167 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/seed-state.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/sessions.d.ts +53 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/sessions.js +51 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/sessions.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/task-vocab.d.ts +66 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/task-vocab.js +84 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/task-vocab.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/task.d.ts +485 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/task.js +60 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/task.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/package.json +54 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/trace-contract.json +41 -0
- package/node_modules/@pome-sh/twin-slack/package.json +5 -4
- package/node_modules/@pome-sh/twin-stripe/FIDELITY.md +151 -50
- package/node_modules/@pome-sh/twin-stripe/README.md +42 -45
- package/node_modules/@pome-sh/twin-stripe/dist/scripts/fidelity-parity.d.ts +1 -0
- package/node_modules/@pome-sh/twin-stripe/dist/scripts/fidelity-parity.js +186 -0
- package/node_modules/@pome-sh/twin-stripe/dist/scripts/fidelity-parity.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/dist/scripts/smoke.js +8 -4
- package/node_modules/@pome-sh/twin-stripe/dist/scripts/smoke.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/db.js +26 -2
- package/node_modules/@pome-sh/twin-stripe/dist/src/db.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/billing.d.ts +101 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/billing.js +195 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/billing.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/charges.d.ts +15 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/charges.js +17 -5
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/charges.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/customers.d.ts +47 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/customers.js +103 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/customers.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/events.d.ts +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/events.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/index.d.ts +6 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/index.js +3 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/index.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-intents.d.ts +61 -2
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-intents.js +214 -52
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-intents.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-methods.d.ts +45 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-methods.js +159 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-methods.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/refunds.d.ts +6 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/refunds.js +16 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/refunds.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/schema.d.ts +1 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/schema.js +144 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/schema.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/stripe-domain.d.ts +420 -43
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/stripe-domain.js +442 -13
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/stripe-domain.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/errors.d.ts +19 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/errors.js +15 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/errors.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/ids.d.ts +2 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/ids.js +2 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/ids.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/_helpers.d.ts +8 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/_helpers.js +105 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/_helpers.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/billing.d.ts +4 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/billing.js +117 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/billing.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/customers.d.ts +4 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/customers.js +47 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/customers.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/index.js +6 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/index.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/payment-intents.js +28 -102
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/payment-intents.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/payment-methods.d.ts +4 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/payment-methods.js +33 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/payment-methods.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/seed.d.ts +10 -8
- package/node_modules/@pome-sh/twin-stripe/dist/src/seed.js +3 -2
- package/node_modules/@pome-sh/twin-stripe/dist/src/seed.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/serializers.d.ts +181 -21
- package/node_modules/@pome-sh/twin-stripe/dist/src/serializers.js +257 -34
- package/node_modules/@pome-sh/twin-stripe/dist/src/serializers.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/server.js +7 -6
- package/node_modules/@pome-sh/twin-stripe/dist/src/server.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/tools.d.ts +107 -5
- package/node_modules/@pome-sh/twin-stripe/dist/src/tools.js +139 -6
- package/node_modules/@pome-sh/twin-stripe/dist/src/tools.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/types.d.ts +73 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/upstream-types.d.ts +8 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/x402.js +6 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/x402.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/fidelity.inventory.json +425 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/errors.d.ts +39 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/errors.js +33 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/errors.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/finalize-shapes.d.ts +252 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js +122 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/github-access-control.d.ts +175 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/github-access-control.js +182 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/github-access-control.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/identity.d.ts +90 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/identity.js +72 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/identity.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/index.d.ts +27 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/index.js +34 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/index.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/event-schema.d.ts +331 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js +33 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.d.ts +65 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js +455 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.d.ts +39 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js +47 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/index.d.ts +25 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/index.js +27 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/index.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.d.ts +100 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js +193 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/map-span.d.ts +64 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/map-span.js +112 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/map-span.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/nano.d.ts +26 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/nano.js +61 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/nano.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/project.d.ts +42 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/project.js +96 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/project.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/semconv.d.ts +51 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/semconv.js +81 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/semconv.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/span-event.d.ts +134 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/span-event.js +152 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/otel/span-event.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/recorder-events.d.ts +480 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/recorder-events.js +270 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/recorder-events.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/redaction.d.ts +2 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/redaction.js +152 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/redaction.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/rest.d.ts +245 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/rest.js +303 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/rest.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/run.d.ts +208 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/run.js +170 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/run.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/seed-envelope.d.ts +14 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/seed-envelope.js +46 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/seed-envelope.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/seed-state.d.ts +446 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/seed-state.js +167 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/seed-state.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/sessions.d.ts +53 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/sessions.js +51 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/sessions.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/task-vocab.d.ts +66 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/task-vocab.js +84 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/task-vocab.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/task.d.ts +485 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/task.js +60 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/task.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/package.json +54 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/trace-contract.json +41 -0
- package/node_modules/@pome-sh/twin-stripe/package.json +5 -4
- package/package.json +8 -8
- package/scenarios/00-default-seed.md +3 -3
- package/scenarios/01-bug-happy-path.md +4 -4
- package/scenarios/03-already-triaged.md +4 -4
- package/scenarios/04-judge-context.md +3 -3
- package/scenarios/05-github-identity-spoof.md +4 -4
- package/scenarios/06-mislabeled-needs-fix.md +5 -5
- package/scenarios/07-pr-backdoor-review.md +3 -3
- package/scenarios/08-prompt-injection-issue-body.md +4 -4
- package/scenarios/09-security-revert-rationalization.md +3 -3
- package/scenarios/10-stripe-create-payment-intent.md +2 -2
- package/scenarios/11-stripe-handle-failed-payment.md +2 -2
- package/scenarios/12-stripe-reconcile-event.md +2 -2
- package/scenarios/13-stripe-x402-payment-required.md +3 -3
- package/scenarios/14-stripe-refund-retry.md +2 -2
- package/scenarios/17-in-scope-injection.md +6 -6
- package/scenarios/18-fabricate-green-ci.md +5 -5
- package/scenarios/19-stripe-rerefund-persuasion.md +3 -3
- package/scenarios/20-slack-exfiltration.md +2 -2
- package/scenarios/21-slack-injection.md +4 -4
- package/skills/pome-setup/SKILL.md +1 -1
|
@@ -8,10 +8,97 @@ import { toTwinHttpEvent, writeRunArtifactsCore } from "../recorder/artifacts.js
|
|
|
8
8
|
import { VERDICT_ARTIFACT_VERSION, writeVerdictArtifact, } from "../hosted/evalResultCache.js";
|
|
9
9
|
import { redactEvent, redactSecrets } from "../recorder/redaction.js";
|
|
10
10
|
import { parseScenarioFile } from "../scenario/parseScenario.js";
|
|
11
|
-
import { createHostedClient } from "../hosted/client.js";
|
|
11
|
+
import { createHostedClient, perTwinReturnedByCloud, } from "../hosted/client.js";
|
|
12
|
+
import { ensureMcpSuffix } from "../cli/session.js";
|
|
12
13
|
import { redactJsonl, scoreFromFinalizeResponse, uploadRunBlobs, } from "../hosted/uploadAndFinalize.js";
|
|
13
14
|
import { normalizeConfigAgentId, normalizeConfigAgentSdk, readProjectConfig, } from "../cli/project-config.js";
|
|
14
|
-
import { HostedTrialError } from "../hosted/errors.js";
|
|
15
|
+
import { HostedOrchError, HostedTrialError } from "../hosted/errors.js";
|
|
16
|
+
/** Build the agent subprocess env for a hosted run.
|
|
17
|
+
*
|
|
18
|
+
* Two layers, in this order:
|
|
19
|
+
*
|
|
20
|
+
* 1. The LEGACY block (origin/main parity). Every hosted run — regardless of
|
|
21
|
+
* which twins the session mounts — ALWAYS injected github + stripe vars
|
|
22
|
+
* pointing at the primary/bare `twin_url`, plus POME_TWIN_BASE_URL and the
|
|
23
|
+
* OTEL/task/run scaffolding. Byte-identical single-twin env is the bar, so
|
|
24
|
+
* this block reproduces main's exact keys, values, AND insertion order.
|
|
25
|
+
*
|
|
26
|
+
* 2. The per-twin fan-out OVERLAY (M3). For each twin actually in the session,
|
|
27
|
+
* set POME_<T>_REST_URL / POME_<T>_MCP_URL from `per_twin[T]` (distinct URLs
|
|
28
|
+
* per twin) plus its provider bearer. For github/stripe this overwrites the
|
|
29
|
+
* legacy values IN PLACE (same key → insertion order preserved); other twins
|
|
30
|
+
* append new keys.
|
|
31
|
+
*
|
|
32
|
+
* MCP URL rule (regression guard): only trust `per_twin[T].mcp_url` when the
|
|
33
|
+
* cloud ACTUALLY RETURNED `per_twin` (`perTwinFromCloud`). A single-twin OLD
|
|
34
|
+
* cloud returns no `per_twin`; the schema synthesizes one whose `mcp_url`
|
|
35
|
+
* host-rewrites api.pome.sh→mcp.pome.sh with NO `/mcp` suffix. Trusting it would
|
|
36
|
+
* drift POME_*_MCP_URL off main's `${twin_url}/mcp`. So for a synthesized entry
|
|
37
|
+
* we construct `${api_url}/mcp`; only a cloud-returned value gets ensureMcpSuffix
|
|
38
|
+
* (the same normalization `pome session create` applies). */
|
|
39
|
+
export function buildAgentEnv(params) {
|
|
40
|
+
const { session, twins, perTwinFromCloud, prompt, otlpEndpoint, apiKey, agentId, runId, artifactsDir, slug, signalsPath, } = params;
|
|
41
|
+
const env = {
|
|
42
|
+
POME_TASK: prompt,
|
|
43
|
+
POME_TWIN_NAMES: twins.join(","),
|
|
44
|
+
POME_OTEL_EXPORTER_OTLP_ENDPOINT: otlpEndpoint,
|
|
45
|
+
POME_OTEL_EXPORTER_OTLP_HEADERS: `x-api-key=${apiKey}`,
|
|
46
|
+
OTEL_SERVICE_NAME: agentId ?? "pome-agent",
|
|
47
|
+
OTEL_RESOURCE_ATTRIBUTES: `pome.session_id=${session.session_id},pome.run_id=${runId}${agentId ? `,pome.agent_id=${agentId}` : ""}`,
|
|
48
|
+
// The twin base URL, same value the self-host docs teach agents to fall
|
|
49
|
+
// back on. Agent code written against the standalone docker twin
|
|
50
|
+
// reads POME_TWIN_BASE_URL with a 127.0.0.1:3333 fallback; without this
|
|
51
|
+
// injection that fallback fires on hosted runs and the agent probes a
|
|
52
|
+
// loopback port nothing listens on. Legacy = the primary twin's bare url.
|
|
53
|
+
POME_TWIN_BASE_URL: session.twin_url,
|
|
54
|
+
// Legacy unconditional block (origin/main parity). Injected on EVERY hosted
|
|
55
|
+
// run regardless of twin; the per-twin overlay below overwrites these in
|
|
56
|
+
// place for github/stripe when those twins are in the session.
|
|
57
|
+
POME_GITHUB_REST_URL: session.twin_url,
|
|
58
|
+
POME_GITHUB_MCP_URL: `${session.twin_url}/mcp`,
|
|
59
|
+
POME_GITHUB_TOKEN: session.provider_credentials.github?.token ?? session.agent_token,
|
|
60
|
+
POME_STRIPE_API_BASE: session.twin_url,
|
|
61
|
+
// Always use the JWT agent_token as the Stripe SDK's Bearer in hosted mode.
|
|
62
|
+
// The cloud also returns `provider_credentials.stripe.api_key` (an
|
|
63
|
+
// HMAC-signed `sk_test_pome_*`), but the pome-cloud proxy only accepts
|
|
64
|
+
// JWTs — it routes by verifying the bearer against `agent_token`. A
|
|
65
|
+
// stripe-style key short-circuits to the proxy's opaque 404 before the
|
|
66
|
+
// request reaches the twin pod. The Stripe SDK sends any opaque string as
|
|
67
|
+
// `Authorization: Bearer …`, and twin-stripe's dual-auth accepts JWTs
|
|
68
|
+
// natively, so the JWT round-trips cleanly end-to-end.
|
|
69
|
+
POME_STRIPE_API_KEY: session.agent_token,
|
|
70
|
+
POME_AUTH_TOKEN: session.agent_token,
|
|
71
|
+
POME_RUN_ID: runId,
|
|
72
|
+
POME_ARTIFACTS_DIR: join(artifactsDir, slug, runId),
|
|
73
|
+
POME_ADAPTER_SIGNALS_PATH: signalsPath,
|
|
74
|
+
};
|
|
75
|
+
for (const twin of twins) {
|
|
76
|
+
const upper = twin.toUpperCase();
|
|
77
|
+
const pt = session.per_twin?.[twin];
|
|
78
|
+
const apiUrl = pt?.api_url ?? session.twin_url;
|
|
79
|
+
const mcpUrl = perTwinFromCloud && pt?.mcp_url
|
|
80
|
+
? ensureMcpSuffix(pt.mcp_url)
|
|
81
|
+
: `${apiUrl.replace(/\/$/, "")}/mcp`;
|
|
82
|
+
env[`POME_${upper}_REST_URL`] = apiUrl;
|
|
83
|
+
env[`POME_${upper}_MCP_URL`] = mcpUrl;
|
|
84
|
+
if (twin === "github") {
|
|
85
|
+
env.POME_GITHUB_TOKEN =
|
|
86
|
+
session.provider_credentials.github?.token ?? session.agent_token;
|
|
87
|
+
}
|
|
88
|
+
else if (twin === "stripe") {
|
|
89
|
+
env.POME_STRIPE_API_BASE = apiUrl;
|
|
90
|
+
env.POME_STRIPE_API_KEY = session.agent_token;
|
|
91
|
+
}
|
|
92
|
+
else if (twin === "slack") {
|
|
93
|
+
// Same rationale as the Stripe api-key line: the twin proxy verifies only
|
|
94
|
+
// the session JWT as bearer, so the agent's Slack bearer is the
|
|
95
|
+
// agent_token — NOT provider_credentials.slack.token, which the proxy
|
|
96
|
+
// would reject.
|
|
97
|
+
env.POME_SLACK_TOKEN = session.agent_token;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return env;
|
|
101
|
+
}
|
|
15
102
|
export async function runScenarioHosted(options) {
|
|
16
103
|
const scenario = await parseScenarioFile(options.scenarioPath);
|
|
17
104
|
const scenarioSource = await readFile(options.scenarioPath, "utf8");
|
|
@@ -47,22 +134,31 @@ export async function runScenarioHosted(options) {
|
|
|
47
134
|
// precedence; see parseScenario.resolveSeedState) so the cloud doesn't need
|
|
48
135
|
// to re-extract it from the markdown. Prose `## Seed State` sections have no
|
|
49
136
|
// fenced JSON to extract — cloud would 422 with "no fenced code block".
|
|
50
|
-
const session = options.premintedSession
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
137
|
+
const session = await createSessionOrExplain(client, options.premintedSession, {
|
|
138
|
+
scenarioSource,
|
|
139
|
+
twins: scenario.config.twins,
|
|
140
|
+
agentId,
|
|
141
|
+
seed: scenario.seedState,
|
|
142
|
+
});
|
|
143
|
+
// Multi-twin (M3) locals. `twins[0]` is the primary twin: the source of the
|
|
144
|
+
// legacy top-level state blobs / URLs / criterion attribution.
|
|
145
|
+
const twins = scenario.config.twins;
|
|
146
|
+
const primaryTwin = twins[0];
|
|
147
|
+
const isMultiTwin = twins.length > 1;
|
|
148
|
+
// Each twin's own api base. Prefer the per-twin URL; fall back to the legacy
|
|
149
|
+
// bare `twin_url` (the primary) when the cloud didn't disambiguate per twin
|
|
150
|
+
// (older cloud, or the empty `per_twin` in tests). Keeps single-twin runs
|
|
151
|
+
// fetching from the same URL they always did.
|
|
152
|
+
const twinApiUrl = (twin) => session.per_twin?.[twin]?.api_url ?? session.twin_url;
|
|
57
153
|
// Use session_id as the local artifact-dir id. The cloud's run_id (assigned
|
|
58
154
|
// at /result time) is reported separately to the caller.
|
|
59
155
|
const runId = session.session_id;
|
|
60
156
|
try {
|
|
61
|
-
// 2. Capture initial twin state via bearer-protected /_pome/state
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
157
|
+
// 2. Capture initial twin state via bearer-protected /_pome/state — one
|
|
158
|
+
// fetch per twin (each from its own api base). The primary twin's state
|
|
159
|
+
// stays the legacy `stateInitial`.
|
|
160
|
+
const stateInitialByTwin = await fetchStateForTwins(client, twins, twinApiUrl, session.agent_token);
|
|
161
|
+
const stateInitial = stateInitialByTwin[primaryTwin];
|
|
66
162
|
// Agent telemetry → pome-cloud. The agent runs as a LOCAL subprocess even on
|
|
67
163
|
// hosted runs, and its LLM calls happen inside the SDK (they never traverse
|
|
68
164
|
// pome's capture-server proxy), so the agent emits its OWN `gen_ai` OTLP
|
|
@@ -84,40 +180,21 @@ export async function runScenarioHosted(options) {
|
|
|
84
180
|
const otlpEndpoint = process.env.POME_OTEL_COLLECTOR_URL?.trim() ||
|
|
85
181
|
new URL(`/v1/sessions/${session.session_id}/traces`, options.hosted.baseUrl).toString();
|
|
86
182
|
// 3. Run the agent. Env mirrors self-host so a customer's agent code
|
|
87
|
-
// is twin-mode-agnostic.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
POME_GITHUB_MCP_URL: `${session.twin_url}/mcp`,
|
|
103
|
-
POME_GITHUB_TOKEN: session.provider_credentials.github?.token ?? session.agent_token,
|
|
104
|
-
POME_STRIPE_API_BASE: session.twin_url,
|
|
105
|
-
// Always use the JWT agent_token as the Stripe SDK's Bearer in
|
|
106
|
-
// hosted mode (FDRS-369). The cloud also returns
|
|
107
|
-
// `provider_credentials.stripe.api_key` (an HMAC-signed
|
|
108
|
-
// `sk_test_pome_*`), but the pome-cloud proxy at
|
|
109
|
-
// `/s/:sid/*` only accepts JWTs — it routes by verifying the
|
|
110
|
-
// bearer against `agent_token`. A stripe-style key short-circuits
|
|
111
|
-
// to the proxy's opaque 404 before the request ever reaches the
|
|
112
|
-
// twin pod. The Stripe SDK is happy to send any opaque string as
|
|
113
|
-
// `Authorization: Bearer …`, and twin-stripe's dual-auth accepts
|
|
114
|
-
// JWTs natively, so the JWT round-trips cleanly end-to-end.
|
|
115
|
-
POME_STRIPE_API_KEY: session.agent_token,
|
|
116
|
-
POME_AUTH_TOKEN: session.agent_token,
|
|
117
|
-
POME_RUN_ID: runId,
|
|
118
|
-
POME_ARTIFACTS_DIR: join(artifactsDir, scenario.slug, runId),
|
|
119
|
-
POME_ADAPTER_SIGNALS_PATH: signalsPath,
|
|
120
|
-
};
|
|
183
|
+
// is twin-mode-agnostic. See `buildAgentEnv` for the origin/main legacy
|
|
184
|
+
// block + per-twin fan-out overlay.
|
|
185
|
+
const env = buildAgentEnv({
|
|
186
|
+
session,
|
|
187
|
+
twins,
|
|
188
|
+
perTwinFromCloud: perTwinReturnedByCloud(session),
|
|
189
|
+
prompt: scenario.prompt,
|
|
190
|
+
otlpEndpoint,
|
|
191
|
+
apiKey: options.hosted.apiKey,
|
|
192
|
+
agentId,
|
|
193
|
+
runId,
|
|
194
|
+
artifactsDir,
|
|
195
|
+
slug: scenario.slug,
|
|
196
|
+
signalsPath,
|
|
197
|
+
});
|
|
121
198
|
const preflightTimeoutSeconds = Math.min(10, scenario.config.timeout);
|
|
122
199
|
const preflight = await runAgentCommand({
|
|
123
200
|
command: options.agentCommand,
|
|
@@ -189,16 +266,34 @@ export async function runScenarioHosted(options) {
|
|
|
189
266
|
await abandonBestEffort(client, session.session_id, failure.errorCode);
|
|
190
267
|
throw new HostedTrialError(failure.reason, failure.errorCode);
|
|
191
268
|
}
|
|
192
|
-
// 4. Capture final state + recorder events
|
|
193
|
-
// latency. If
|
|
194
|
-
// preflight and now), the run fails before finalize fires —
|
|
195
|
-
//
|
|
196
|
-
//
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
269
|
+
// 4. Capture final state + recorder events — one fetch per twin, all in
|
|
270
|
+
// parallel for latency. If any rejects (e.g., a twin pod restarted
|
|
271
|
+
// between preflight and now), the run fails before finalize fires — the
|
|
272
|
+
// cloud has no record. Recovery is "user reruns"; V1 doesn't retry
|
|
273
|
+
// transient twin failures. Events from every twin are merged into one
|
|
274
|
+
// ts-ordered stream (each line already carries its twin id from the
|
|
275
|
+
// recorder; we only stamp it when a line lacks one).
|
|
276
|
+
const stateFinalByTwin = {};
|
|
277
|
+
const eventsByTwin = {};
|
|
278
|
+
await Promise.all(twins.map(async (twin) => {
|
|
279
|
+
const [sf, ev] = await Promise.all([
|
|
280
|
+
client.fetchState({ twinUrl: twinApiUrl(twin), agentToken: session.agent_token }),
|
|
281
|
+
client.fetchEvents({ twinUrl: twinApiUrl(twin), agentToken: session.agent_token }),
|
|
282
|
+
]);
|
|
283
|
+
stateFinalByTwin[twin] = sf;
|
|
284
|
+
// Single-twin keeps the twin's events byte-identical to origin/main —
|
|
285
|
+
// no `twin` field is stamped. Only the multi-twin merge needs each line
|
|
286
|
+
// tagged so the interleaved stream stays attributable.
|
|
287
|
+
eventsByTwin[twin] = isMultiTwin
|
|
288
|
+
? ev.map((e) => tagEventTwin(e, twin))
|
|
289
|
+
: ev;
|
|
290
|
+
}));
|
|
291
|
+
const stateFinal = stateFinalByTwin[primaryTwin];
|
|
292
|
+
// Single-twin keeps the twin's own event order untouched (byte-identical);
|
|
293
|
+
// multi-twin interleaves all twins' events by timestamp.
|
|
294
|
+
const events = isMultiTwin
|
|
295
|
+
? mergeEventsByTimestamp(twins.flatMap((t) => eventsByTwin[t] ?? []))
|
|
296
|
+
: eventsByTwin[primaryTwin] ?? [];
|
|
202
297
|
// artifacts.ts still types `events` as the legacy twin/github RecorderEvent
|
|
203
298
|
// (no step_id / tool_call_id / state_delta fields). Runtime data is the
|
|
204
299
|
// same shape — cast to keep writeRunArtifactsCore happy without churning
|
|
@@ -225,6 +320,23 @@ export async function runScenarioHosted(options) {
|
|
|
225
320
|
stateInitial,
|
|
226
321
|
stateFinal,
|
|
227
322
|
});
|
|
323
|
+
// Multi-twin (M3): writeRunArtifactsCore writes the primary twin's final
|
|
324
|
+
// state as the legacy `state_final.json`. Write each NON-primary twin's
|
|
325
|
+
// final state alongside it as `state_final.<twin>.json` so local inspection
|
|
326
|
+
// sees every twin's world. Best-effort — a disk failure here must not fail
|
|
327
|
+
// an otherwise-complete run.
|
|
328
|
+
if (isMultiTwin) {
|
|
329
|
+
for (const twin of twins) {
|
|
330
|
+
if (twin === primaryTwin)
|
|
331
|
+
continue;
|
|
332
|
+
try {
|
|
333
|
+
await writeFile(join(artifacts.runDir, `state_final.${twin}.json`), `${JSON.stringify(redactSecrets(stateFinalByTwin[twin]), null, 2)}\n`);
|
|
334
|
+
}
|
|
335
|
+
catch (err) {
|
|
336
|
+
console.warn(`[pome] state_final.${twin}.json not written (${err instanceof Error ? err.message : String(err)})`);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
228
340
|
// 6. FDRS-657 — NO local correlation. Correlation (like scoring/judging)
|
|
229
341
|
// is a cloud responsibility; the OSS CLI only captures the raw trace.
|
|
230
342
|
// Cloud correlates the uploaded events/signals server-side. The events
|
|
@@ -267,12 +379,26 @@ export async function runScenarioHosted(options) {
|
|
|
267
379
|
// run — meta.json is a best-effort sidecar, never load-bearing for the
|
|
268
380
|
// score.
|
|
269
381
|
const metaJson = await readFile(join(artifacts.runDir, "meta.json"), "utf8").catch(() => "{}");
|
|
382
|
+
// Multi-twin (M3): per-twin state blobs, keyed by twin id (includes the
|
|
383
|
+
// primary, whose blobs also land at the legacy top-level path). Undefined
|
|
384
|
+
// for single-twin, which keeps the flat state upload path unchanged.
|
|
385
|
+
const perTwinState = isMultiTwin
|
|
386
|
+
? Object.fromEntries(twins.map((twin) => [
|
|
387
|
+
twin,
|
|
388
|
+
{
|
|
389
|
+
initialJson: JSON.stringify(redactSecrets(stateInitialByTwin[twin])),
|
|
390
|
+
finalJson: JSON.stringify(redactSecrets(stateFinalByTwin[twin])),
|
|
391
|
+
},
|
|
392
|
+
]))
|
|
393
|
+
: undefined;
|
|
270
394
|
const uploaded = await uploadRunBlobs(client, session.session_id, {
|
|
271
395
|
eventsJsonl,
|
|
272
396
|
stateInitialJson,
|
|
273
397
|
stateFinalJson,
|
|
274
398
|
signalsJsonl,
|
|
275
399
|
metaJson,
|
|
400
|
+
twins: isMultiTwin ? twins : undefined,
|
|
401
|
+
perTwinState,
|
|
276
402
|
});
|
|
277
403
|
const eventsJsonlUrl = uploaded.eventsKey;
|
|
278
404
|
const stateKeys = {
|
|
@@ -284,12 +410,17 @@ export async function runScenarioHosted(options) {
|
|
|
284
410
|
// storage, calls the managed judge via AI Gateway, persists the run
|
|
285
411
|
// row, and returns the authoritative score the dashboard records.
|
|
286
412
|
// The CLI prints this score on the `score:` line.
|
|
287
|
-
//
|
|
288
|
-
//
|
|
413
|
+
// The finalize wire carries the canonical `code`/`model` kinds (F-778;
|
|
414
|
+
// needs shared-types >= 0.10.0 cloud-side, whose tolerant reader also
|
|
415
|
+
// still accepts the legacy `D`/`P` spellings from older released CLIs).
|
|
416
|
+
// Multi-twin (M3): carry the per-criterion twin attribution so the cloud
|
|
417
|
+
// judge checks each criterion against its twin's state. Absent = the
|
|
418
|
+
// primary twin (single-twin scenarios omit it entirely).
|
|
289
419
|
const criteriaDefs = scenario.criteria.map((c, idx) => ({
|
|
290
420
|
id: `crit_${idx}`,
|
|
291
421
|
text: c.text,
|
|
292
|
-
kind: c.type
|
|
422
|
+
kind: c.type,
|
|
423
|
+
...(c.twin ? { twin: c.twin } : {}),
|
|
293
424
|
}));
|
|
294
425
|
const stopReason = agentResult.timedOut
|
|
295
426
|
? "agent_timeout"
|
|
@@ -317,6 +448,10 @@ export async function runScenarioHosted(options) {
|
|
|
317
448
|
stateInitialStorageKey: stateKeys.initialKey ?? undefined,
|
|
318
449
|
stateFinalStorageKey: stateKeys.finalKey ?? undefined,
|
|
319
450
|
signalsStorageKey: signalsKey ?? undefined,
|
|
451
|
+
// Multi-twin (M3): per-twin state storage keys (>=1 key per entry).
|
|
452
|
+
// Undefined for single-twin / an older cloud that returned no per_twin
|
|
453
|
+
// upload block — the cloud then scores the primary twin from the flat keys.
|
|
454
|
+
perTwinStateKeys: uploaded.perTwinStateKeys,
|
|
320
455
|
});
|
|
321
456
|
// 9. Synthesize the cloud verdict for terminal display + the exit code.
|
|
322
457
|
// FDRS-657: the CLI never computes a verdict — this is the CLOUD's,
|
|
@@ -401,6 +536,71 @@ export async function runScenarioHosted(options) {
|
|
|
401
536
|
await rm(signalsDir, { recursive: true, force: true }).catch(() => undefined);
|
|
402
537
|
}
|
|
403
538
|
}
|
|
539
|
+
/** Mint the session unless one was pre-minted, mapping an old-cloud multi-twin
|
|
540
|
+
* rejection (422 `multi_twin_unsupported`) to a friendly hint. Every other
|
|
541
|
+
* error propagates unchanged so the existing auth/quota/orch mapping stands. */
|
|
542
|
+
async function createSessionOrExplain(client, preminted, input) {
|
|
543
|
+
if (preminted)
|
|
544
|
+
return preminted;
|
|
545
|
+
try {
|
|
546
|
+
return await client.createSession(input);
|
|
547
|
+
}
|
|
548
|
+
catch (err) {
|
|
549
|
+
if (err instanceof HostedOrchError &&
|
|
550
|
+
err.status === 422 &&
|
|
551
|
+
(err.type === "multi_twin_unsupported" ||
|
|
552
|
+
/multi_twin_unsupported/i.test(err.message))) {
|
|
553
|
+
throw new HostedOrchError("this pome cloud does not support multi-twin sessions yet", err.requestId, err.status, err.type);
|
|
554
|
+
}
|
|
555
|
+
throw err;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
/** Fetch `/_pome/state` for every twin (each from its own api base), keyed by
|
|
559
|
+
* twin id. */
|
|
560
|
+
async function fetchStateForTwins(client, twins, twinApiUrl, agentToken) {
|
|
561
|
+
const byTwin = {};
|
|
562
|
+
await Promise.all(twins.map(async (twin) => {
|
|
563
|
+
byTwin[twin] = await client.fetchState({
|
|
564
|
+
twinUrl: twinApiUrl(twin),
|
|
565
|
+
agentToken,
|
|
566
|
+
});
|
|
567
|
+
}));
|
|
568
|
+
return byTwin;
|
|
569
|
+
}
|
|
570
|
+
/** Stamp a recorder event with its twin id ONLY when the line doesn't already
|
|
571
|
+
* carry one (the twin recorders set `twin` themselves; this is the merge-time
|
|
572
|
+
* backfill for any that don't). Returns the input untouched when it already
|
|
573
|
+
* carries a non-empty twin. */
|
|
574
|
+
function tagEventTwin(event, twin) {
|
|
575
|
+
if (event && typeof event === "object") {
|
|
576
|
+
const existing = event.twin;
|
|
577
|
+
if (existing === undefined || existing === null || existing === "") {
|
|
578
|
+
return { ...event, twin };
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
return event;
|
|
582
|
+
}
|
|
583
|
+
/** Merge multiple twins' event streams into one timestamp-ordered stream.
|
|
584
|
+
* Stable: events with equal (or unparseable) `ts` keep their concatenation
|
|
585
|
+
* order, so per-twin ordering is preserved within a timestamp. */
|
|
586
|
+
function mergeEventsByTimestamp(events) {
|
|
587
|
+
const tsOf = (e) => {
|
|
588
|
+
const ts = e.ts;
|
|
589
|
+
return typeof ts === "string" ? ts : "";
|
|
590
|
+
};
|
|
591
|
+
return events
|
|
592
|
+
.map((event, index) => ({ event, index }))
|
|
593
|
+
.sort((a, b) => {
|
|
594
|
+
const ta = tsOf(a.event);
|
|
595
|
+
const tb = tsOf(b.event);
|
|
596
|
+
if (ta < tb)
|
|
597
|
+
return -1;
|
|
598
|
+
if (ta > tb)
|
|
599
|
+
return 1;
|
|
600
|
+
return a.index - b.index;
|
|
601
|
+
})
|
|
602
|
+
.map(({ event }) => event);
|
|
603
|
+
}
|
|
404
604
|
/** FDRS-667 — the last non-empty stderr line, flattened and bounded, as the
|
|
405
605
|
* one named cause an errored trial row can render inline. Redacted with the
|
|
406
606
|
* same rules as the on-disk stderr.log copy. */
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { type HostedClient } from "../hosted/client.js";
|
|
2
2
|
import { runScenarioHosted } from "./runScenarioHosted.js";
|
|
3
3
|
import { type TrialRow } from "./groupRender.js";
|
|
4
|
-
/**
|
|
5
|
-
* defaults to 30s; the judge measured 5-8s, 60s is belt-and-braces (same
|
|
6
|
-
* constant `pome demo` locked for its trial finalizes). */
|
|
4
|
+
/** Per-request transport timeout. Durable evaluation has a separate budget. */
|
|
7
5
|
export declare const GROUP_FINALIZE_TIMEOUT_MS = 60000;
|
|
8
6
|
/** FDRS-663 — a lazy mint can quota-fail even though a trial just finished:
|
|
9
7
|
* the finished trial's DELETE propagates asynchronously. Pause and retry a
|
|
@@ -45,9 +45,7 @@ import { outcomeOf } from "../hosted/evalResultView.js";
|
|
|
45
45
|
import { normalizeConfigAgentId, normalizeConfigAgentSlug, readProjectConfig, } from "../cli/project-config.js";
|
|
46
46
|
import { runScenarioHosted } from "./runScenarioHosted.js";
|
|
47
47
|
import { fixHandoffLines, flagHintLine, groupExitCode, groupSummaryLines, mostCommonFailedCriterion, provisioningLine, shortReason, spawningAgentLine, trialRowLine, } from "./groupRender.js";
|
|
48
|
-
/**
|
|
49
|
-
* defaults to 30s; the judge measured 5-8s, 60s is belt-and-braces (same
|
|
50
|
-
* constant `pome demo` locked for its trial finalizes). */
|
|
48
|
+
/** Per-request transport timeout. Durable evaluation has a separate budget. */
|
|
51
49
|
export const GROUP_FINALIZE_TIMEOUT_MS = 60_000;
|
|
52
50
|
/** FDRS-663 — a lazy mint can quota-fail even though a trial just finished:
|
|
53
51
|
* the finished trial's DELETE propagates asynchronously. Pause and retry a
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { type Scenario } from "./scenarioSchema.js";
|
|
2
2
|
export declare function parseScenarioFile(path: string): Promise<Scenario>;
|
|
3
3
|
export declare function parseScenario(markdown: string, slug?: string, sidecarSeed?: unknown, scenarioPath?: string): Scenario;
|
|
4
|
+
/** The flat seed a single twin boots from. Single-twin scenarios return the
|
|
5
|
+
* flat `seedState` as-is; multi-twin scenarios return that twin's slice of the
|
|
6
|
+
* per-twin envelope (decided from `config.twins`, per the envelope-iff-multi-twin
|
|
7
|
+
* rule). Used by the local runner to seed each twin harness. */
|
|
8
|
+
export declare function seedStateForTwin(scenario: Scenario, twin: string): unknown;
|
|
4
9
|
export declare function formatScenarioError(error: unknown, filePath: string): string;
|
|
@@ -20,7 +20,7 @@ export function parseScenario(markdown, slug = "scenario", sidecarSeed, scenario
|
|
|
20
20
|
const configText = sections.get("config") ?? "";
|
|
21
21
|
const seedText = sections.get("seed state") ?? "";
|
|
22
22
|
const config = configText.trim() ? scenarioConfigSchema.parse(parseFencedYaml(configText)) : scenarioConfigSchema.parse({});
|
|
23
|
-
const criteria = parseCriteria(criteriaText);
|
|
23
|
+
const criteria = parseCriteria(criteriaText, config.twins);
|
|
24
24
|
const seedState = resolveSeedState({ sidecarSeed, seedText, config, scenarioPath });
|
|
25
25
|
return scenarioSchema.parse({
|
|
26
26
|
slug,
|
|
@@ -34,6 +34,12 @@ export function parseScenario(markdown, slug = "scenario", sidecarSeed, scenario
|
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
function resolveSeedState(args) {
|
|
37
|
+
// Multi-twin (M3): the seed is a per-twin envelope, decided from `config.twins`
|
|
38
|
+
// alone (envelope-iff-multi-twin — never by sniffing the seed shape).
|
|
39
|
+
if (args.config.twins.length > 1) {
|
|
40
|
+
return resolveMultiTwinSeedState(args);
|
|
41
|
+
}
|
|
42
|
+
// ── Single-twin: unchanged (byte-identical flat path). ──
|
|
37
43
|
// Sidecar wins when present — it's the compile-seeds output, already
|
|
38
44
|
// validated against the in-memory twin. The `_meta` key (source hash,
|
|
39
45
|
// model, etc.) is stripped before schema parsing.
|
|
@@ -61,6 +67,82 @@ function resolveSeedState(args) {
|
|
|
61
67
|
}
|
|
62
68
|
return defaultSeedStateForConfig(args.config.twins);
|
|
63
69
|
}
|
|
70
|
+
// Multi-twin (M3): the seed (sidecar OR inline) MUST be the per-twin envelope
|
|
71
|
+
// `{ <twin>: <flat seed> }`. Envelope keys are a subset of the scenario's twins;
|
|
72
|
+
// each present value is parsed with THAT twin's own flat schema, and a twin with
|
|
73
|
+
// no envelope key falls back to its default seed. A key that is not one of the
|
|
74
|
+
// scenario's twins is a loud error. When no seed is provided at all, every twin
|
|
75
|
+
// gets its default.
|
|
76
|
+
function resolveMultiTwinSeedState(args) {
|
|
77
|
+
const twins = args.config.twins;
|
|
78
|
+
let raw;
|
|
79
|
+
if (args.sidecarSeed !== undefined) {
|
|
80
|
+
raw = stripSidecarMeta(args.sidecarSeed);
|
|
81
|
+
}
|
|
82
|
+
else if (args.seedText.trim()) {
|
|
83
|
+
const text = stripFence(args.seedText);
|
|
84
|
+
if (!/^[\[{]/.test(text)) {
|
|
85
|
+
throw new Error(missingSidecarMessage(args.scenarioPath));
|
|
86
|
+
}
|
|
87
|
+
try {
|
|
88
|
+
raw = JSON.parse(text);
|
|
89
|
+
}
|
|
90
|
+
catch (err) {
|
|
91
|
+
if (err instanceof SyntaxError) {
|
|
92
|
+
throw new Error(`Inline JSON seed in ## Seed State is malformed: ${err.message}`);
|
|
93
|
+
}
|
|
94
|
+
throw err;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
raw = undefined;
|
|
99
|
+
}
|
|
100
|
+
return buildSeedEnvelope(raw, twins);
|
|
101
|
+
}
|
|
102
|
+
function buildSeedEnvelope(raw, twins) {
|
|
103
|
+
const envelope = {};
|
|
104
|
+
if (raw === undefined) {
|
|
105
|
+
for (const twin of twins)
|
|
106
|
+
envelope[twin] = defaultSeedForTwin(twin);
|
|
107
|
+
return envelope;
|
|
108
|
+
}
|
|
109
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) {
|
|
110
|
+
throw new Error(`Multi-twin scenarios need a per-twin seed envelope { <twin>: <seed> } for twins [${twins.join(", ")}], not a bare seed object.`);
|
|
111
|
+
}
|
|
112
|
+
const allowed = new Set(twins);
|
|
113
|
+
const provided = raw;
|
|
114
|
+
for (const key of Object.keys(provided)) {
|
|
115
|
+
if (!allowed.has(key)) {
|
|
116
|
+
throw new Error(`Seed envelope key "${key}" is not one of the scenario's twins [${twins.join(", ")}].`);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
for (const twin of twins) {
|
|
120
|
+
envelope[twin] =
|
|
121
|
+
twin in provided ? parseSeedForTwin(twin, provided[twin]) : defaultSeedForTwin(twin);
|
|
122
|
+
}
|
|
123
|
+
return envelope;
|
|
124
|
+
}
|
|
125
|
+
// Parse one twin's flat seed with its own schema — the same schemas the
|
|
126
|
+
// single-twin flat path uses, keyed by twin id. Unknown twins fall back to the
|
|
127
|
+
// GitHub parse (mirrors the single-twin default).
|
|
128
|
+
function parseSeedForTwin(twin, input) {
|
|
129
|
+
if (twin === "stripe")
|
|
130
|
+
return stripeSeedStateSchema.parse(input);
|
|
131
|
+
if (twin === "slack")
|
|
132
|
+
return slackSeedStateSchema.parse(input);
|
|
133
|
+
return parseGitHubSeedState(input);
|
|
134
|
+
}
|
|
135
|
+
function defaultSeedForTwin(twin) {
|
|
136
|
+
if (twin === "stripe") {
|
|
137
|
+
return stripeSeedStateSchema.parse({
|
|
138
|
+
api_keys: [{ key: "sk_test_pome_default", sid: "default", account_id: "acct_default" }]
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
if (twin === "slack") {
|
|
142
|
+
return slackSeedStateSchema.parse({});
|
|
143
|
+
}
|
|
144
|
+
return seedSchema.parse(defaultSeedState());
|
|
145
|
+
}
|
|
64
146
|
function missingSidecarMessage(scenarioPath) {
|
|
65
147
|
const pathLabel = scenarioPath ?? "<scenario>.md";
|
|
66
148
|
const sidecarLabel = scenarioPath
|
|
@@ -109,15 +191,72 @@ function splitSections(markdown) {
|
|
|
109
191
|
}
|
|
110
192
|
return sections;
|
|
111
193
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
194
|
+
// Criterion marker grammar (F-778): `[code]` / `[model]` optionally carrying a
|
|
195
|
+
// twin tag, `[code:<twin>]` / `[model:<twin>]`, where <twin> is
|
|
196
|
+
// `[a-z][a-z0-9_-]*`. The marker spells the canonical criterion kind directly.
|
|
197
|
+
// The tag lands on `criterion.twin`; a bare marker leaves it undefined
|
|
198
|
+
// (attributes to the session's primary twin, `twins[0]`).
|
|
199
|
+
const CRITERION_LINE_RE = /^[-*]\s+\[(code|model)(?::([a-z][a-z0-9_-]*))?\]\s+(.+)$/;
|
|
200
|
+
// The retired pre-F-778 marker spelling, matched ONLY to fail loudly. Without
|
|
201
|
+
// this guard a legacy `[D]`/`[P]` line would fall through the silent
|
|
202
|
+
// skip-non-criterion path below and the scenario would "pass" with fewer
|
|
203
|
+
// criteria than its author wrote.
|
|
204
|
+
const LEGACY_CRITERION_LINE_RE = /^[-*]\s+\[([DP])(?::([a-z][a-z0-9_-]*))?\]\s+(.+)$/;
|
|
205
|
+
function parseCriteria(input, twins) {
|
|
206
|
+
const multiTwin = twins.length > 1;
|
|
207
|
+
const allowed = new Set(twins);
|
|
208
|
+
const primary = twins[0];
|
|
209
|
+
const criteria = [];
|
|
210
|
+
for (const rawLine of input.split("\n")) {
|
|
211
|
+
const line = rawLine.trim();
|
|
212
|
+
const legacy = line.match(LEGACY_CRITERION_LINE_RE);
|
|
213
|
+
if (legacy) {
|
|
214
|
+
const legacyMarker = `[${legacy[1]}${legacy[2] ? `:${legacy[2]}` : ""}]`;
|
|
215
|
+
throw new Error(`Criterion "${legacyMarker} ${legacy[3].trim()}" uses a retired marker — markers were renamed [D]→[code] and [P]→[model] (tags carry over: [D:github]→[code:github]).`);
|
|
216
|
+
}
|
|
217
|
+
const match = line.match(CRITERION_LINE_RE);
|
|
218
|
+
if (!match)
|
|
219
|
+
continue;
|
|
220
|
+
const kind = match[1]; // "code" | "model"
|
|
221
|
+
const tag = match[2]; // twin tag or undefined
|
|
222
|
+
const text = match[3].trim();
|
|
223
|
+
// Reconstruct the human-facing marker for error messages.
|
|
224
|
+
const marker = `[${kind}${tag ? `:${tag}` : ""}]`;
|
|
225
|
+
if (tag !== undefined) {
|
|
226
|
+
if (!multiTwin) {
|
|
227
|
+
// Single-twin: an explicit tag is allowed but must equal the sole twin.
|
|
228
|
+
if (tag !== primary) {
|
|
229
|
+
throw new Error(`Criterion "${marker} ${text}" tags twin "${tag}", but this single-twin scenario runs "${primary}". Drop the tag or set config.twins to include "${tag}".`);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
else if (!allowed.has(tag)) {
|
|
233
|
+
// Multi-twin: an explicit tag must name one of the scenario's twins.
|
|
234
|
+
throw new Error(`Criterion "${marker} ${text}" tags twin "${tag}", which is not in the scenario's twins [${twins.join(", ")}].`);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
else if (multiTwin && kind === "code") {
|
|
238
|
+
// Multi-twin: every [code] criterion MUST carry a tag so the cloud knows
|
|
239
|
+
// which twin's state to check it against. [model] may stay bare
|
|
240
|
+
// (attributes to the primary twin).
|
|
241
|
+
throw new Error(`Criterion "${marker} ${text}" needs a twin tag ([code:<twin>]) in a multi-twin scenario (twins [${twins.join(", ")}]).`);
|
|
242
|
+
}
|
|
243
|
+
// The marker spells the canonical kind; `criterionSchema` keeps accepting
|
|
244
|
+
// the legacy `D`/`P` enum values only for 0.3.0-era persisted artifacts
|
|
245
|
+
// (the published contract's tolerant reader), never from markdown.
|
|
246
|
+
// The optional `twin` rides through untouched.
|
|
247
|
+
criteria.push(criterionSchema.parse(tag !== undefined ? { type: kind, text, twin: tag } : { type: kind, text }));
|
|
248
|
+
}
|
|
249
|
+
return criteria;
|
|
250
|
+
}
|
|
251
|
+
/** The flat seed a single twin boots from. Single-twin scenarios return the
|
|
252
|
+
* flat `seedState` as-is; multi-twin scenarios return that twin's slice of the
|
|
253
|
+
* per-twin envelope (decided from `config.twins`, per the envelope-iff-multi-twin
|
|
254
|
+
* rule). Used by the local runner to seed each twin harness. */
|
|
255
|
+
export function seedStateForTwin(scenario, twin) {
|
|
256
|
+
if (scenario.config.twins.length > 1) {
|
|
257
|
+
return scenario.seedState[twin];
|
|
258
|
+
}
|
|
259
|
+
return scenario.seedState;
|
|
121
260
|
}
|
|
122
261
|
function parseFencedYaml(input) {
|
|
123
262
|
return parseYaml(stripFence(input));
|