@pome-sh/cli 0.5.0 → 0.7.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 +4 -4
- package/dist/build-info.json +3 -3
- package/dist/examples/agents/llm-refund-agent.js +1 -1
- package/dist/src/cli/compile-seeds.js +22 -22
- package/dist/src/cli/default-task.d.ts +2 -2
- package/dist/src/cli/default-task.js +4 -4
- package/dist/src/cli/docs-topics.js +4 -2
- package/dist/src/cli/eval.d.ts +1 -1
- package/dist/src/cli/eval.js +3 -3
- package/dist/src/cli/init-sdk.js +1 -1
- package/dist/src/cli/main.js +200 -89
- package/dist/src/cli/register.d.ts +4 -0
- package/dist/src/cli/register.js +5 -0
- package/dist/src/cli/session.js +1 -1
- package/dist/src/cli/tasks-catalog.d.ts +25 -0
- package/dist/src/cli/{scenarios-catalog.js → tasks-catalog.js} +9 -9
- package/dist/src/cli/tasks.d.ts +13 -0
- package/dist/src/cli/{scenarios.js → tasks.js} +32 -32
- package/dist/src/demo/agent.js +2 -2
- package/dist/src/demo/runDemo.d.ts +3 -3
- package/dist/src/demo/runDemo.js +14 -14
- package/dist/src/doctor/checks.js +11 -2
- package/dist/src/doctor/render.d.ts +9 -0
- package/dist/src/doctor/render.js +7 -0
- package/dist/src/fix-prompt/prompt.d.ts +3 -3
- package/dist/src/fix-prompt/prompt.js +4 -4
- package/dist/src/hosted/client.d.ts +6 -6
- package/dist/src/hosted/client.js +6 -6
- package/dist/src/hosted/errors.js +1 -1
- package/dist/src/hosted/evalResultCache.d.ts +1 -1
- package/dist/src/hosted/evalResultCache.js +1 -1
- package/dist/src/hosted/evalResultView.d.ts +1 -1
- package/dist/src/hosted/evalResultView.js +1 -1
- package/dist/src/hosted/uploadAndFinalize.d.ts +1 -1
- package/dist/src/hosted/uploadAndFinalize.js +2 -2
- package/dist/src/recorder/artifacts.d.ts +2 -2
- package/dist/src/recorder/inspect.d.ts +3 -3
- package/dist/src/recorder/inspect.js +3 -3
- package/dist/src/runner/captureServerChild.js +1 -1
- package/dist/src/runner/{runScenario.d.ts → runTask.d.ts} +3 -3
- package/dist/src/runner/{runScenario.js → runTask.js} +4 -4
- package/dist/src/runner/{runScenarioCore.d.ts → runTaskCore.d.ts} +2 -2
- package/dist/src/runner/{runScenarioHosted.d.ts → runTaskHosted.d.ts} +6 -6
- package/dist/src/runner/{runScenarioHosted.js → runTaskHosted.js} +12 -12
- package/dist/src/runner/runTrialGroup.d.ts +4 -4
- package/dist/src/runner/runTrialGroup.js +10 -10
- package/dist/src/runner/trialCount.js +1 -1
- package/dist/src/task/parseTask.d.ts +9 -0
- package/dist/src/{scenario/parseScenario.js → task/parseTask.js} +21 -21
- package/dist/src/{scenario → task}/seed-compiler-hosted.d.ts +1 -1
- package/dist/src/{scenario → task}/seed-compiler-hosted.js +1 -1
- package/dist/src/{scenario/scenarioSchema.d.ts → task/taskSchema.d.ts} +4 -4
- package/dist/src/{scenario/scenarioSchema.js → task/taskSchema.js} +6 -6
- package/examples/agents/llm-refund-agent.ts +1 -1
- package/node_modules/@pome-sh/twin-gmail/CHANGELOG.md +5 -0
- package/node_modules/@pome-sh/twin-gmail/package.json +2 -2
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/index.d.ts +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/index.js +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/index.js.map +1 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/manifest.d.ts +31 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/manifest.js +76 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/manifest.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/rest.d.ts +9 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/rest.js +27 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/rest.js.map +1 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/manifest-schema.json +68 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/package.json +2 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/trace-contract.json +1 -1
- package/node_modules/@pome-sh/twin-slack/package.json +3 -3
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/index.d.ts +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/index.js +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/index.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/manifest.d.ts +31 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/manifest.js +76 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/manifest.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/rest.d.ts +9 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/rest.js +27 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/rest.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/manifest-schema.json +68 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/package.json +2 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/trace-contract.json +1 -1
- package/node_modules/@pome-sh/twin-stripe/package.json +3 -3
- package/package.json +6 -6
- package/{scenarios → tasks}/00-default-seed.md +1 -1
- package/{scenarios → tasks}/14-stripe-refund-retry.md +1 -1
- package/dist/src/cli/scenarios-catalog.d.ts +0 -25
- package/dist/src/cli/scenarios.d.ts +0 -13
- package/dist/src/scenario/parseScenario.d.ts +0 -9
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/admin-gate.d.ts +0 -35
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/admin-gate.js +0 -103
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/admin-gate.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/auth.d.ts +0 -100
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/auth.js +0 -262
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/auth.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/build-info.d.ts +0 -7
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/build-info.js +0 -14
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/build-info.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/db.d.ts +0 -44
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/db.js +0 -113
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/db.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/errors.d.ts +0 -24
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/errors.js +0 -61
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/errors.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/failure-injection.d.ts +0 -43
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/failure-injection.js +0 -160
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/failure-injection.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/fidelity-inventory.d.ts +0 -121
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js +0 -204
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/fidelity.d.ts +0 -8
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/fidelity.js +0 -39
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/fidelity.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/index.d.ts +0 -372
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/index.js +0 -139
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/index.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.d.ts +0 -10
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.js +0 -221
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/parity.d.ts +0 -61
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/parity.js +0 -123
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/parity.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/recorder.d.ts +0 -120
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/recorder.js +0 -368
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/recorder.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/redaction.d.ts +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/redaction.js +0 -3
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/redaction.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/server-helpers.d.ts +0 -54
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/server-helpers.js +0 -181
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/server-helpers.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/server.d.ts +0 -46
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/server.js +0 -394
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/server.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/tool-context.d.ts +0 -8
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/tool-context.js +0 -22
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/tool-context.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/package.json +0 -54
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/errors.d.ts +0 -39
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/errors.js +0 -33
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/errors.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/finalize-shapes.d.ts +0 -254
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js +0 -122
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/github-access-control.d.ts +0 -175
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/github-access-control.js +0 -182
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/github-access-control.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/identity.d.ts +0 -90
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/identity.js +0 -72
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/identity.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/index.d.ts +0 -27
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/index.js +0 -34
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/index.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/event-schema.d.ts +0 -331
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js +0 -33
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.d.ts +0 -65
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js +0 -455
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.d.ts +0 -39
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js +0 -47
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/index.d.ts +0 -25
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/index.js +0 -27
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/index.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.d.ts +0 -100
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js +0 -193
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/map-span.d.ts +0 -64
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/map-span.js +0 -112
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/map-span.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/nano.d.ts +0 -26
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/nano.js +0 -61
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/nano.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/project.d.ts +0 -42
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/project.js +0 -104
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/project.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/semconv.d.ts +0 -57
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/semconv.js +0 -102
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/semconv.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/span-event.d.ts +0 -134
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/span-event.js +0 -152
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/span-event.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/recorder-events.d.ts +0 -480
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/recorder-events.js +0 -270
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/recorder-events.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/redaction.d.ts +0 -2
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/redaction.js +0 -152
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/redaction.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/rest.d.ts +0 -248
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/rest.js +0 -308
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/rest.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/run.d.ts +0 -208
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/run.js +0 -170
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/run.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/seed-envelope.d.ts +0 -14
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/seed-envelope.js +0 -46
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/seed-envelope.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/seed-state.d.ts +0 -1006
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/seed-state.js +0 -263
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/seed-state.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/sessions.d.ts +0 -53
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/sessions.js +0 -51
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/sessions.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/task-vocab.d.ts +0 -80
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/task-vocab.js +0 -98
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/task-vocab.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/task.d.ts +0 -859
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/task.js +0 -60
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/task.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/package.json +0 -54
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/trace-contract.json +0 -41
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/admin-gate.d.ts +0 -35
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/admin-gate.js +0 -103
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/admin-gate.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/auth.d.ts +0 -100
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/auth.js +0 -262
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/auth.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/build-info.d.ts +0 -7
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/build-info.js +0 -14
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/build-info.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/db.d.ts +0 -44
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/db.js +0 -113
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/db.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/errors.d.ts +0 -24
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/errors.js +0 -61
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/errors.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/failure-injection.d.ts +0 -43
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/failure-injection.js +0 -160
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/failure-injection.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/fidelity-inventory.d.ts +0 -121
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js +0 -204
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/fidelity.d.ts +0 -8
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/fidelity.js +0 -39
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/fidelity.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/index.d.ts +0 -372
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/index.js +0 -139
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/index.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.d.ts +0 -10
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.js +0 -221
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/parity.d.ts +0 -61
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/parity.js +0 -123
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/parity.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/recorder.d.ts +0 -120
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/recorder.js +0 -368
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/recorder.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/redaction.d.ts +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/redaction.js +0 -3
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/redaction.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/server-helpers.d.ts +0 -54
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/server-helpers.js +0 -181
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/server-helpers.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/server.d.ts +0 -46
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/server.js +0 -394
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/server.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/tool-context.d.ts +0 -8
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/tool-context.js +0 -22
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/tool-context.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/package.json +0 -54
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/admin-gate.d.ts +0 -35
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/admin-gate.js +0 -103
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/admin-gate.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/auth.d.ts +0 -100
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/auth.js +0 -262
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/auth.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/build-info.d.ts +0 -7
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/build-info.js +0 -14
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/build-info.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/db.d.ts +0 -44
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/db.js +0 -113
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/db.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/errors.d.ts +0 -24
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/errors.js +0 -61
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/errors.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/failure-injection.d.ts +0 -43
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/failure-injection.js +0 -160
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/failure-injection.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/fidelity-inventory.d.ts +0 -121
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js +0 -204
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/fidelity.d.ts +0 -8
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/fidelity.js +0 -39
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/fidelity.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/index.d.ts +0 -372
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/index.js +0 -139
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/index.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.d.ts +0 -10
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.js +0 -221
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/parity.d.ts +0 -61
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/parity.js +0 -123
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/parity.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/recorder.d.ts +0 -120
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/recorder.js +0 -368
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/recorder.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/redaction.d.ts +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/redaction.js +0 -3
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/redaction.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/server-helpers.d.ts +0 -54
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/server-helpers.js +0 -181
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/server-helpers.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/server.d.ts +0 -46
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/server.js +0 -394
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/server.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/tool-context.d.ts +0 -8
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/tool-context.js +0 -22
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/tool-context.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/package.json +0 -54
- /package/dist/src/runner/{runScenarioCore.js → runTaskCore.js} +0 -0
- /package/dist/src/{scenario → task}/githubSeedCompat.d.ts +0 -0
- /package/dist/src/{scenario → task}/githubSeedCompat.js +0 -0
- /package/dist/src/{scenario → task}/seed-compiler.d.ts +0 -0
- /package/dist/src/{scenario → task}/seed-compiler.js +0 -0
- /package/dist/src/{scenario → task}/seed-verifier.d.ts +0 -0
- /package/dist/src/{scenario → task}/seed-verifier.js +0 -0
- /package/{scenarios → tasks}/01-bug-happy-path.md +0 -0
- /package/{scenarios → tasks}/01-bug-happy-path.seed.json +0 -0
- /package/{scenarios → tasks}/03-already-triaged.md +0 -0
- /package/{scenarios → tasks}/03-already-triaged.seed.json +0 -0
- /package/{scenarios → tasks}/04-judge-context.md +0 -0
- /package/{scenarios → tasks}/04-judge-context.seed.json +0 -0
- /package/{scenarios → tasks}/05-github-identity-spoof.md +0 -0
- /package/{scenarios → tasks}/05-github-identity-spoof.seed.json +0 -0
- /package/{scenarios → tasks}/06-mislabeled-needs-fix.md +0 -0
- /package/{scenarios → tasks}/06-mislabeled-needs-fix.seed.json +0 -0
- /package/{scenarios → tasks}/07-pr-backdoor-review.md +0 -0
- /package/{scenarios → tasks}/07-pr-backdoor-review.seed.json +0 -0
- /package/{scenarios → tasks}/08-prompt-injection-issue-body.md +0 -0
- /package/{scenarios → tasks}/08-prompt-injection-issue-body.seed.json +0 -0
- /package/{scenarios → tasks}/09-security-revert-rationalization.md +0 -0
- /package/{scenarios → tasks}/09-security-revert-rationalization.seed.json +0 -0
- /package/{scenarios → tasks}/10-stripe-create-payment-intent.md +0 -0
- /package/{scenarios → tasks}/11-stripe-handle-failed-payment.md +0 -0
- /package/{scenarios → tasks}/12-stripe-reconcile-event.md +0 -0
- /package/{scenarios → tasks}/13-stripe-x402-payment-required.md +0 -0
- /package/{scenarios → tasks}/14-stripe-refund-retry.expected-events.jsonl +0 -0
- /package/{scenarios → tasks}/17-in-scope-injection.md +0 -0
- /package/{scenarios → tasks}/17-in-scope-injection.seed.json +0 -0
- /package/{scenarios → tasks}/18-fabricate-green-ci.md +0 -0
- /package/{scenarios → tasks}/18-fabricate-green-ci.seed.json +0 -0
- /package/{scenarios → tasks}/19-stripe-rerefund-persuasion.md +0 -0
- /package/{scenarios → tasks}/19-stripe-rerefund-persuasion.seed.json +0 -0
- /package/{scenarios → tasks}/20-slack-exfiltration.md +0 -0
- /package/{scenarios → tasks}/20-slack-exfiltration.seed.json +0 -0
- /package/{scenarios → tasks}/21-slack-injection.md +0 -0
- /package/{scenarios → tasks}/21-slack-injection.seed.json +0 -0
- /package/{scenarios → tasks}/22-gmail-inbox-triage.md +0 -0
- /package/{scenarios → tasks}/22-gmail-inbox-triage.seed.json +0 -0
- /package/{scenarios → tasks}/23-gmail-first-party-parity.md +0 -0
- /package/{scenarios → tasks}/23-gmail-first-party-parity.seed.json +0 -0
- /package/{scenarios → tasks}/24-linear-issue-triage.md +0 -0
- /package/{scenarios → tasks}/24-linear-issue-triage.seed.json +0 -0
- /package/{scenarios → tasks}/25-linear-comment-label-triage.md +0 -0
- /package/{scenarios → tasks}/25-linear-comment-label-triage.seed.json +0 -0
- /package/{scenarios → tasks}/26-github-linear-handoff.md +0 -0
- /package/{scenarios → tasks}/26-github-linear-handoff.seed.json +0 -0
- /package/{scenarios → tasks}/27-gmail-github-support-escalation.md +0 -0
- /package/{scenarios → tasks}/27-gmail-github-support-escalation.seed.json +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
/**
|
|
3
|
-
* `pome
|
|
3
|
+
* `pome tasks` — browse the bundled task library and optionally
|
|
4
4
|
* copy a twin's runnable tasks into the current project.
|
|
5
5
|
*
|
|
6
|
-
* Discovery only — no network. Source files live under `
|
|
6
|
+
* Discovery only — no network. Source files live under `tasks/` in
|
|
7
7
|
* the published tarball; `resolvePackageRoot` locates them whether the
|
|
8
8
|
* CLI was started from `dist/` (published) or `src/` (dev).
|
|
9
9
|
*/
|
|
@@ -11,8 +11,8 @@ import { existsSync } from "node:fs";
|
|
|
11
11
|
import { copyFile, mkdir } from "node:fs/promises";
|
|
12
12
|
import { join, resolve } from "node:path";
|
|
13
13
|
import { resolvePackageRoot } from "./resolve-package-root.js";
|
|
14
|
-
import {
|
|
15
|
-
const DEFAULT_DEST_DIR = "
|
|
14
|
+
import { TASK_TWINS, findTwin, runnableTasks, } from "./tasks-catalog.js";
|
|
15
|
+
const DEFAULT_DEST_DIR = "tasks";
|
|
16
16
|
function useColor() {
|
|
17
17
|
return Boolean(process.stdout.isTTY && !process.env.NO_COLOR);
|
|
18
18
|
}
|
|
@@ -22,10 +22,10 @@ function dim(s) {
|
|
|
22
22
|
function bold(s) {
|
|
23
23
|
return useColor() ? `\x1b[1m${s}\x1b[0m` : s;
|
|
24
24
|
}
|
|
25
|
-
export async function
|
|
25
|
+
export async function runTasksCommand(twinArg, opts) {
|
|
26
26
|
if (!twinArg) {
|
|
27
27
|
if (opts.copy || opts.force || opts.dest) {
|
|
28
|
-
console.error("Specify a twin to copy from, e.g. `pome
|
|
28
|
+
console.error("Specify a twin to copy from, e.g. `pome tasks github --copy`.");
|
|
29
29
|
process.exitCode = 2;
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
@@ -34,57 +34,57 @@ export async function runScenariosCommand(twinArg, opts) {
|
|
|
34
34
|
}
|
|
35
35
|
const twin = findTwin(twinArg);
|
|
36
36
|
if (!twin) {
|
|
37
|
-
const available =
|
|
38
|
-
console.error(`Unknown twin "${twinArg}". Available: ${available}. Run \`pome
|
|
37
|
+
const available = TASK_TWINS.map((t) => t.id).join(", ");
|
|
38
|
+
console.error(`Unknown twin "${twinArg}". Available: ${available}. Run \`pome tasks\` for the index.`);
|
|
39
39
|
process.exitCode = 2;
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
42
|
if (opts.copy) {
|
|
43
|
-
await
|
|
43
|
+
await copyTwinTasks(twin, {
|
|
44
44
|
destDir: opts.dest ?? DEFAULT_DEST_DIR,
|
|
45
45
|
force: Boolean(opts.force),
|
|
46
46
|
});
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
|
-
|
|
49
|
+
printTwinTasks(twin);
|
|
50
50
|
}
|
|
51
51
|
function printTwinIndex() {
|
|
52
52
|
console.log(bold("Pome tasks"));
|
|
53
53
|
console.log(dim("Bundled task library, grouped by twin."));
|
|
54
54
|
console.log("");
|
|
55
|
-
for (const twin of
|
|
56
|
-
const count =
|
|
55
|
+
for (const twin of TASK_TWINS) {
|
|
56
|
+
const count = runnableTasks(twin).length;
|
|
57
57
|
console.log(` ${bold(twin.id)} ${dim(`(${count} tasks)`)} — ${twin.label}`);
|
|
58
58
|
console.log(` ${dim(twin.description)}`);
|
|
59
59
|
}
|
|
60
60
|
console.log("");
|
|
61
|
-
console.log(dim("Run `pome
|
|
61
|
+
console.log(dim("Run `pome tasks <twin>` to list tasks, or add `--copy` to drop them into ./tasks/."));
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
const runnable =
|
|
63
|
+
function printTwinTasks(twin) {
|
|
64
|
+
const runnable = runnableTasks(twin);
|
|
65
65
|
console.log(bold(`Pome tasks — ${twin.label}`));
|
|
66
66
|
console.log(dim(`${runnable.length} tasks bundled with this CLI.`));
|
|
67
67
|
console.log("");
|
|
68
|
-
for (const
|
|
69
|
-
console.log(` ${bold(
|
|
70
|
-
console.log(` ${dim(
|
|
68
|
+
for (const task of runnable) {
|
|
69
|
+
console.log(` ${bold(task.filename)}`);
|
|
70
|
+
console.log(` ${dim(task.title)} — ${task.summary}`);
|
|
71
71
|
}
|
|
72
72
|
console.log("");
|
|
73
|
-
console.log(dim(`Copy locally: \`pome
|
|
74
|
-
console.log(dim(`Run one: \`pome run
|
|
73
|
+
console.log(dim(`Copy locally: \`pome tasks ${twin.id} --copy\` (or \`--copy --dest <dir>\`).`));
|
|
74
|
+
console.log(dim(`Run one: \`pome run tasks/${runnable[0]?.filename ?? "01-bug-happy-path.md"}\`.`));
|
|
75
75
|
}
|
|
76
|
-
export async function
|
|
76
|
+
export async function copyTwinTasks(twin, opts) {
|
|
77
77
|
const root = resolvePackageRoot(import.meta.url);
|
|
78
78
|
if (!root) {
|
|
79
79
|
console.error("Could not locate the installed pome package (package.json not found).");
|
|
80
80
|
process.exitCode = 2;
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
const sourceDir = join(root, "
|
|
83
|
+
const sourceDir = join(root, "tasks");
|
|
84
84
|
const destDir = resolve(process.cwd(), opts.destDir);
|
|
85
85
|
await mkdir(destDir, { recursive: true });
|
|
86
|
-
const outcome = await
|
|
87
|
-
|
|
86
|
+
const outcome = await copyTaskFiles({
|
|
87
|
+
tasks: runnableTasks(twin),
|
|
88
88
|
sourceDir,
|
|
89
89
|
destDir,
|
|
90
90
|
force: opts.force,
|
|
@@ -109,26 +109,26 @@ export async function copyTwinScenarios(twin, opts) {
|
|
|
109
109
|
console.log(dim(`Next: \`pome run ${opts.destDir}/${first}\`.`));
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
async function
|
|
112
|
+
async function copyTaskFiles(input) {
|
|
113
113
|
const outcome = { copied: [], skipped: [], missingSources: [] };
|
|
114
|
-
for (const
|
|
115
|
-
const src = join(input.sourceDir,
|
|
116
|
-
const dest = join(input.destDir,
|
|
114
|
+
for (const task of input.tasks) {
|
|
115
|
+
const src = join(input.sourceDir, task.filename);
|
|
116
|
+
const dest = join(input.destDir, task.filename);
|
|
117
117
|
if (!existsSync(src)) {
|
|
118
|
-
outcome.missingSources.push(
|
|
118
|
+
outcome.missingSources.push(task.filename);
|
|
119
119
|
continue;
|
|
120
120
|
}
|
|
121
121
|
if (existsSync(dest) && !input.force) {
|
|
122
|
-
outcome.skipped.push(
|
|
122
|
+
outcome.skipped.push(task.filename);
|
|
123
123
|
}
|
|
124
124
|
else {
|
|
125
125
|
await copyFile(src, dest);
|
|
126
|
-
outcome.copied.push(
|
|
126
|
+
outcome.copied.push(task.filename);
|
|
127
127
|
}
|
|
128
128
|
// Sidecar seeds (`<name>.seed.json`) are optional — tasks that use
|
|
129
129
|
// default seed state don't have one. Missing source is silent; missing
|
|
130
130
|
// dest is copied; existing dest follows the same --force rule as the .md.
|
|
131
|
-
const sidecar =
|
|
131
|
+
const sidecar = task.filename.replace(/\.md$/i, ".seed.json");
|
|
132
132
|
const sidecarSrc = join(input.sourceDir, sidecar);
|
|
133
133
|
const sidecarDest = join(input.destDir, sidecar);
|
|
134
134
|
if (!existsSync(sidecarSrc))
|
package/dist/src/demo/agent.js
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
// calls served by pome's anonymous demo gateway (FDRS-637).
|
|
5
5
|
//
|
|
6
6
|
// It is spawned by `pome demo` as `pome demo-agent`, a child of the REAL
|
|
7
|
-
// capture path (
|
|
7
|
+
// capture path (runTask): the runner injects the standard POME_* twin
|
|
8
8
|
// contract plus the demo-specific vars below, and HTTP(S)_PROXY pointing at
|
|
9
9
|
// the capture-server so the gateway calls land in events.jsonl as genuine
|
|
10
10
|
// LlmCallEvent rows.
|
|
11
11
|
//
|
|
12
|
-
// Env contract (beyond
|
|
12
|
+
// Env contract (beyond runTask's standard POME_* set):
|
|
13
13
|
// POME_DEMO_LLM_URL — {POME_API_BASE}/v1/demo/sessions/{sid}/llm
|
|
14
14
|
// POME_DEMO_TOKEN — the trial session's demo_token (Bearer)
|
|
15
15
|
// POME_DEMO_TASK_NAME — server-allowlisted task name ("first-run-demo")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { runTask, type RunTaskOptions } from "../runner/runTask.js";
|
|
2
2
|
import { type HostedClient } from "../hosted/client.js";
|
|
3
3
|
import { mintDemoSessions, type DemoSession } from "./mint.js";
|
|
4
4
|
import { type TrialVerdict } from "./render.js";
|
|
@@ -13,8 +13,8 @@ export interface RunDemoOptions {
|
|
|
13
13
|
out?: (line: string) => void;
|
|
14
14
|
/** Agent command override. Default re-invokes this binary: `<node> <main.js> demo-agent`. */
|
|
15
15
|
agentCommand?: string;
|
|
16
|
-
captureServerCommand?:
|
|
17
|
-
|
|
16
|
+
captureServerCommand?: RunTaskOptions["captureServerCommand"];
|
|
17
|
+
runTaskFn?: typeof runTask;
|
|
18
18
|
mintFn?: typeof mintDemoSessions;
|
|
19
19
|
/** Per-session upload/finalize client factory (bearer demo_token). */
|
|
20
20
|
trialClientFactory?: (session: DemoSession) => DemoTrialClient;
|
package/dist/src/demo/runDemo.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// 2. Mint ALL k demo sessions upfront (POST /v1/demo/sessions, one shared
|
|
7
7
|
// grp_ id) — each 15-min TTL comfortably covers the run.
|
|
8
8
|
// 3. Per trial: run the bundled agent through the REAL capture path
|
|
9
|
-
// (
|
|
9
|
+
// (runTask: in-process twin + capture-server child + POME_* env),
|
|
10
10
|
// upload the captured blobs with the trial's demo_token as Bearer, then
|
|
11
11
|
// POST /finalize (explicit 60s timeout) — the terminal verdict comes
|
|
12
12
|
// from that cloud evaluation. The CLI never scores locally.
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
import { readFile } from "node:fs/promises";
|
|
24
24
|
import { join } from "node:path";
|
|
25
25
|
import { getAvailablePort } from "../runner/ports.js";
|
|
26
|
-
import {
|
|
26
|
+
import { runTask } from "../runner/runTask.js";
|
|
27
27
|
import { bootTwin } from "../twin/twinHarness.js";
|
|
28
|
-
import {
|
|
28
|
+
import { parseTaskFile } from "../task/parseTask.js";
|
|
29
29
|
import { createHostedClient } from "../hosted/client.js";
|
|
30
30
|
import { scoreFromFinalizeResponse, uploadRunBlobs, } from "../hosted/uploadAndFinalize.js";
|
|
31
31
|
import { outcomeOf, scoreStatus } from "../hosted/evalResultView.js";
|
|
@@ -42,7 +42,7 @@ export async function runDemo(options) {
|
|
|
42
42
|
const out = options.out ?? ((line) => console.error(line));
|
|
43
43
|
const trials = options.trials ?? 5;
|
|
44
44
|
const artifactsDir = options.artifactsDir ?? "runs";
|
|
45
|
-
const
|
|
45
|
+
const runTaskFn = options.runTaskFn ?? runTask;
|
|
46
46
|
const mintFn = options.mintFn ?? mintDemoSessions;
|
|
47
47
|
const trialClientFactory = options.trialClientFactory ??
|
|
48
48
|
((session) => createHostedClient({
|
|
@@ -53,7 +53,7 @@ export async function runDemo(options) {
|
|
|
53
53
|
finalizeTimeoutMs: DEMO_FINALIZE_TIMEOUT_MS,
|
|
54
54
|
}));
|
|
55
55
|
const groupId = newGroupId();
|
|
56
|
-
const
|
|
56
|
+
const taskPath = demoTaskPath();
|
|
57
57
|
for (const line of reassuranceBox())
|
|
58
58
|
out(line);
|
|
59
59
|
out("");
|
|
@@ -79,9 +79,9 @@ export async function runDemo(options) {
|
|
|
79
79
|
}
|
|
80
80
|
// Warm-up boot: validates the packaged seed and gives the design's
|
|
81
81
|
// "spinning up github twin … ready" line an honest measurement. Each trial
|
|
82
|
-
// then boots its own isolated twin inside
|
|
82
|
+
// then boots its own isolated twin inside runTask.
|
|
83
83
|
if (options.skipTwinWarmup !== true) {
|
|
84
|
-
const scenario = await
|
|
84
|
+
const scenario = await parseTaskFile(taskPath);
|
|
85
85
|
const warmupStart = Date.now();
|
|
86
86
|
const port = await getAvailablePort();
|
|
87
87
|
const harness = await bootTwin({
|
|
@@ -113,11 +113,11 @@ export async function runDemo(options) {
|
|
|
113
113
|
verdict = await runOneTrial({
|
|
114
114
|
trialNumber,
|
|
115
115
|
session,
|
|
116
|
-
|
|
116
|
+
taskPath,
|
|
117
117
|
agentCommand,
|
|
118
118
|
artifactsDir,
|
|
119
119
|
apiBase: options.apiBase,
|
|
120
|
-
|
|
120
|
+
runTaskFn,
|
|
121
121
|
client,
|
|
122
122
|
captureServerCommand: options.captureServerCommand,
|
|
123
123
|
out,
|
|
@@ -180,8 +180,8 @@ export async function runDemo(options) {
|
|
|
180
180
|
}
|
|
181
181
|
async function runOneTrial(input) {
|
|
182
182
|
const startedAt = Date.now();
|
|
183
|
-
const result = await input.
|
|
184
|
-
|
|
183
|
+
const result = await input.runTaskFn({
|
|
184
|
+
taskPath: input.taskPath,
|
|
185
185
|
agentCommand: input.agentCommand,
|
|
186
186
|
artifactsDir: input.artifactsDir,
|
|
187
187
|
captureServerCommand: input.captureServerCommand,
|
|
@@ -238,9 +238,9 @@ async function runOneTrial(input) {
|
|
|
238
238
|
agentModel: "demo-gateway",
|
|
239
239
|
agentSdk: null,
|
|
240
240
|
criteria: [],
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
241
|
+
taskName: DEMO_TASK_NAME,
|
|
242
|
+
taskHash: "",
|
|
243
|
+
taskPrompt: "",
|
|
244
244
|
expectedBehavior: "",
|
|
245
245
|
traceStorageKey: uploaded.eventsKey ?? undefined,
|
|
246
246
|
stateInitialStorageKey: uploaded.stateInitialKey ?? undefined,
|
|
@@ -93,7 +93,7 @@ async function checkTwinReachable(_configDir) {
|
|
|
93
93
|
const fail = (cause) => ({
|
|
94
94
|
id: "twin",
|
|
95
95
|
status: "fail",
|
|
96
|
-
label: "twin
|
|
96
|
+
label: "local twin check failed",
|
|
97
97
|
cause,
|
|
98
98
|
fix: "npm install (twin dependencies), then re-run pome doctor — if it persists, file an issue with the error above",
|
|
99
99
|
});
|
|
@@ -130,7 +130,16 @@ async function checkTwinReachable(_configDir) {
|
|
|
130
130
|
if (!sessionHealth.ok) {
|
|
131
131
|
return fail(`the twin is up but rejected the session route (${sessionHealth.status} at /s/<sid>/_pome/health) — the auth contract the agent relies on is broken.`);
|
|
132
132
|
}
|
|
133
|
-
|
|
133
|
+
// "boots locally", not "reachable": this check brings a throwaway twin up
|
|
134
|
+
// on an ephemeral port and tears it down — it does NOT prove a twin is
|
|
135
|
+
// listening now. Overstating that (the F-906 cold walk read "reachable" as
|
|
136
|
+
// "a twin is up") is exactly what this wording avoids.
|
|
137
|
+
return {
|
|
138
|
+
id: "twin",
|
|
139
|
+
status: "pass",
|
|
140
|
+
label: "twin boots locally",
|
|
141
|
+
detail: "github · health + session ok",
|
|
142
|
+
};
|
|
134
143
|
}
|
|
135
144
|
catch (err) {
|
|
136
145
|
return fail(`could not reach the locally served twin: ${firstLine(err)}`);
|
|
@@ -4,5 +4,14 @@ export interface RenderDoctorReportOptions {
|
|
|
4
4
|
* moment-03 default; `pome install` passes moment 02's
|
|
5
5
|
* "verifying the wiring …" (FDRS-642). */
|
|
6
6
|
header?: string;
|
|
7
|
+
/** F-906 — when the report passes, append a caveat that a green check means
|
|
8
|
+
* the wiring is right, not that the examinee runs cleanly. `pome doctor`
|
|
9
|
+
* never launches the agent; and a `pome run` preflight probe launches it
|
|
10
|
+
* with POME_PREFLIGHT=1, which most scaffolds honour by exiting before
|
|
11
|
+
* their real work path — so a bug on that skipped path (as in F-900)
|
|
12
|
+
* surfaces only on a full trial run. Opt-in so only `pome doctor` shows it
|
|
13
|
+
* — the `run`/`install` consumers print the report as a gate, not as a
|
|
14
|
+
* self-diagnosis. */
|
|
15
|
+
passNote?: boolean;
|
|
7
16
|
}
|
|
8
17
|
export declare function renderDoctorReport(report: DoctorReport, options?: RenderDoctorReportOptions): string[];
|
|
@@ -28,5 +28,12 @@ export function renderDoctorReport(report, options = {}) {
|
|
|
28
28
|
lines.push("until this passes, your agent would hit production.");
|
|
29
29
|
lines.push("pome will not run trials against a live API.");
|
|
30
30
|
}
|
|
31
|
+
else if (options.passNote) {
|
|
32
|
+
lines.push("");
|
|
33
|
+
lines.push("note: a green check means the wiring is right, not that your agent runs");
|
|
34
|
+
lines.push("cleanly — pome doctor never launches it, and a run's preflight probe exits");
|
|
35
|
+
lines.push("it early (POME_PREFLIGHT=1), so a bug on the code path they skip surfaces");
|
|
36
|
+
lines.push("only on a full trial run.");
|
|
37
|
+
}
|
|
31
38
|
return lines;
|
|
32
39
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { RecorderEvent } from "../types/shared.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Task } from "../task/taskSchema.js";
|
|
3
3
|
import type { VerdictArtifact } from "../hosted/evalResultCache.js";
|
|
4
4
|
export declare const FIX_PROMPT_TEMPLATE_VERSION = "v1";
|
|
5
5
|
export declare const FIX_PROMPT_SYSTEM_PROMPT: string;
|
|
6
6
|
export declare function escapeTagContent(text: string): string;
|
|
7
7
|
export interface FixPromptContext {
|
|
8
8
|
events: RecorderEvent[];
|
|
9
|
-
scenario:
|
|
9
|
+
scenario: Task;
|
|
10
10
|
}
|
|
11
11
|
export declare function buildFixUserPrompt(ctx: FixPromptContext): string;
|
|
12
12
|
export interface TrialFixInput {
|
|
@@ -22,7 +22,7 @@ export interface GroupFixPromptContext {
|
|
|
22
22
|
groupId: string | null;
|
|
23
23
|
/** Parsed task file when it still resolves. Null degrades the prompt to
|
|
24
24
|
* the verdict-embedded criteria (the file may have moved since the run). */
|
|
25
|
-
scenario:
|
|
25
|
+
scenario: Task | null;
|
|
26
26
|
/** Completed trials of the run set (verdict.json present), run order. */
|
|
27
27
|
trials: TrialFixInput[];
|
|
28
28
|
}
|
|
@@ -89,13 +89,13 @@ function renderCriteria(criteria) {
|
|
|
89
89
|
export function buildFixUserPrompt(ctx) {
|
|
90
90
|
const criteria = redactSecrets(renderCriteria(ctx.scenario.criteria));
|
|
91
91
|
const trace = renderEvents(ctx.events.map((event) => redactEvent(event)));
|
|
92
|
-
const
|
|
93
|
-
const
|
|
92
|
+
const taskTitle = redactSecrets(ctx.scenario.title);
|
|
93
|
+
const taskPrompt = redactSecrets(ctx.scenario.prompt);
|
|
94
94
|
return `## Task
|
|
95
|
-
${
|
|
95
|
+
${taskTitle}
|
|
96
96
|
|
|
97
97
|
## Task prompt (what the agent was told to do)
|
|
98
|
-
${
|
|
98
|
+
${taskPrompt}
|
|
99
99
|
|
|
100
100
|
## Criteria the run had to satisfy
|
|
101
101
|
${escapeTagContent(criteria)}
|
|
@@ -35,7 +35,7 @@ export interface HostedClientConfig {
|
|
|
35
35
|
authScheme?: "x-api-key" | "bearer";
|
|
36
36
|
}
|
|
37
37
|
export interface CreateSessionInput {
|
|
38
|
-
|
|
38
|
+
taskSource: string;
|
|
39
39
|
twins: string[];
|
|
40
40
|
/** Omit for one-off sessions; reuse only when intentionally replaying a create after network uncertainty. */
|
|
41
41
|
idempotencyKey?: string;
|
|
@@ -85,8 +85,8 @@ export interface FetchOnTwinInput {
|
|
|
85
85
|
agentToken: string;
|
|
86
86
|
}
|
|
87
87
|
export interface SubmitResultInput {
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
taskName: string;
|
|
89
|
+
taskHash: string;
|
|
90
90
|
durationMs: number;
|
|
91
91
|
agentModel: string;
|
|
92
92
|
satisfactionScore: number;
|
|
@@ -139,9 +139,9 @@ export interface FinalizeInput {
|
|
|
139
139
|
agentModel: string;
|
|
140
140
|
agentSdk?: string | null;
|
|
141
141
|
criteria: CriterionDefWire[];
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
taskName: string;
|
|
143
|
+
taskHash: string;
|
|
144
|
+
taskPrompt: string;
|
|
145
145
|
expectedBehavior: string;
|
|
146
146
|
traceStorageKey?: string;
|
|
147
147
|
stateInitialStorageKey?: string;
|
|
@@ -390,7 +390,7 @@ export function createHostedClient(config) {
|
|
|
390
390
|
async createSession(input) {
|
|
391
391
|
const body = {
|
|
392
392
|
twins: input.twins,
|
|
393
|
-
scenario_source: Buffer.from(input.
|
|
393
|
+
scenario_source: Buffer.from(input.taskSource, "utf8").toString("base64"),
|
|
394
394
|
};
|
|
395
395
|
if (input.idempotencyKey) {
|
|
396
396
|
body.idempotency_key = input.idempotencyKey;
|
|
@@ -536,9 +536,9 @@ export function createHostedClient(config) {
|
|
|
536
536
|
agent_model: input.agentModel,
|
|
537
537
|
agent_sdk: normalizeAgentSdk(input.agentSdk),
|
|
538
538
|
criteria: input.criteria,
|
|
539
|
-
scenario_name: input.
|
|
540
|
-
scenario_hash: input.
|
|
541
|
-
scenario_prompt: input.
|
|
539
|
+
scenario_name: input.taskName,
|
|
540
|
+
scenario_hash: input.taskHash,
|
|
541
|
+
scenario_prompt: input.taskPrompt,
|
|
542
542
|
expected_behavior: input.expectedBehavior,
|
|
543
543
|
};
|
|
544
544
|
if (input.traceStorageKey !== undefined) {
|
|
@@ -571,8 +571,8 @@ export function createHostedClient(config) {
|
|
|
571
571
|
},
|
|
572
572
|
async submitResult(sessionId, input) {
|
|
573
573
|
return postJson(`/v1/sessions/${encodeURIComponent(sessionId)}/result`, {
|
|
574
|
-
scenario_name: input.
|
|
575
|
-
scenario_hash: input.
|
|
574
|
+
scenario_name: input.taskName,
|
|
575
|
+
scenario_hash: input.taskHash,
|
|
576
576
|
duration_ms: input.durationMs,
|
|
577
577
|
agent_model: input.agentModel,
|
|
578
578
|
satisfaction_score: input.satisfactionScore,
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
// - F0-5c: `pome logout && pome run` was returning exit 2 instead of 3
|
|
14
14
|
// because credential-resolution failure threw a plain Error.
|
|
15
15
|
// - F18: hosted sub-threshold runs sometimes returned exit 3 because
|
|
16
|
-
// `
|
|
16
|
+
// `runTaskHosted.ts` mapped any non-zero agent exit to exit 3,
|
|
17
17
|
// stealing the auth slot.
|
|
18
18
|
//
|
|
19
19
|
// FDRS-636 — trial groups (`pome run -n k`, k>1) map the WHOLE GROUP to one
|
|
@@ -38,7 +38,7 @@ export interface RunSet {
|
|
|
38
38
|
groupId: string | null;
|
|
39
39
|
taskName: string;
|
|
40
40
|
/** The scenario path recorded at run time (first trial's). */
|
|
41
|
-
|
|
41
|
+
taskPath: string;
|
|
42
42
|
/** Trials sorted by finalized_at ascending. */
|
|
43
43
|
trials: TrialVerdict[];
|
|
44
44
|
latestFinalizedAt: string;
|
|
@@ -136,7 +136,7 @@ export function groupRunSets(trials) {
|
|
|
136
136
|
sets.push({
|
|
137
137
|
groupId: bucket[0].verdict.group_id,
|
|
138
138
|
taskName: bucket[0].verdict.task_name,
|
|
139
|
-
|
|
139
|
+
taskPath: bucket[0].verdict.scenario_path,
|
|
140
140
|
trials: bucket,
|
|
141
141
|
latestFinalizedAt: last.verdict.finalized_at,
|
|
142
142
|
anyFailed: bucket.some((t) => !t.verdict.passed),
|
|
@@ -31,7 +31,7 @@ export type Score = {
|
|
|
31
31
|
export declare function outcomeOf(result: CriterionResult): CriterionOutcome;
|
|
32
32
|
export type ScoreStatus = "pass" | "fail" | "unevaluated";
|
|
33
33
|
export declare function scoreStatus(score: Score, passThreshold: number): ScoreStatus;
|
|
34
|
-
export declare function
|
|
34
|
+
export declare function taskPassed(score: Score, passThreshold: number): boolean;
|
|
35
35
|
export declare function markerFor(outcome: CriterionOutcome): string;
|
|
36
36
|
export declare function criterionMarkerLabel(criterion: WireCriterion): string;
|
|
37
37
|
export declare function twinSkipSuffix(result: CriterionResult): string;
|
|
@@ -36,7 +36,7 @@ export function scoreStatus(score, passThreshold) {
|
|
|
36
36
|
return "unevaluated";
|
|
37
37
|
return score.satisfaction >= passThreshold ? "pass" : "fail";
|
|
38
38
|
}
|
|
39
|
-
export function
|
|
39
|
+
export function taskPassed(score, passThreshold) {
|
|
40
40
|
return scoreStatus(score, passThreshold) === "pass";
|
|
41
41
|
}
|
|
42
42
|
// FDRS-591/611 per-criterion marker: ✓ passed, ✗ failed, - skipped, ! errored.
|
|
@@ -81,5 +81,5 @@ export declare function uploadRunBlobs(client: UploadClient, sessionId: string,
|
|
|
81
81
|
export declare function scoreFromFinalizeResponse(finalized: FinalizeResponse): Score;
|
|
82
82
|
/** Redact a JSONL payload line-by-line before upload. Lines that fail to
|
|
83
83
|
* parse as JSON are redacted as raw strings. Moved verbatim from
|
|
84
|
-
*
|
|
84
|
+
* runTaskHosted.ts (FDRS-656). */
|
|
85
85
|
export declare function redactJsonl(body: string): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
//
|
|
3
3
|
// Shared presigned-upload + finalize-score orchestration for cloud sessions
|
|
4
|
-
// (ADR-013). Extracted verbatim from
|
|
4
|
+
// (ADR-013). Extracted verbatim from runTaskHosted.ts (FDRS-656) so
|
|
5
5
|
// `pome eval <run-dir>` reuses the exact same best-effort PUT semantics
|
|
6
6
|
// without duplicating them. Behavior-preserving for the hosted run path:
|
|
7
7
|
// warning text, the 30s PUT timeout, and the null-key fallbacks all match
|
|
@@ -218,7 +218,7 @@ export function scoreFromFinalizeResponse(finalized) {
|
|
|
218
218
|
}
|
|
219
219
|
/** Redact a JSONL payload line-by-line before upload. Lines that fail to
|
|
220
220
|
* parse as JSON are redacted as raw strings. Moved verbatim from
|
|
221
|
-
*
|
|
221
|
+
* runTaskHosted.ts (FDRS-656). */
|
|
222
222
|
export function redactJsonl(body) {
|
|
223
223
|
const lines = body.split("\n");
|
|
224
224
|
const redacted = lines
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toTwinHttpEventRow } from "@pome-sh/sdk/server";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Task } from "../task/taskSchema.js";
|
|
3
3
|
import type { RecorderEvent } from "@pome-sh/shared-types";
|
|
4
4
|
export declare const toTwinHttpEvent: typeof toTwinHttpEventRow;
|
|
5
5
|
export type RunArtifacts = {
|
|
@@ -9,7 +9,7 @@ export type RunArtifacts = {
|
|
|
9
9
|
export type RunArtifactCoreInput = {
|
|
10
10
|
artifactsDir: string;
|
|
11
11
|
runId: string;
|
|
12
|
-
scenario:
|
|
12
|
+
scenario: Task;
|
|
13
13
|
startedAt: string;
|
|
14
14
|
completedAt: string;
|
|
15
15
|
stdout: string;
|
|
@@ -28,9 +28,9 @@ export type TraceHealthLayer = {
|
|
|
28
28
|
};
|
|
29
29
|
export type TraceHealthInput = {
|
|
30
30
|
events: Event[];
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
taskUsesTwin?: boolean;
|
|
32
|
+
taskExpectsLlm?: boolean;
|
|
33
|
+
taskExpectsCas?: boolean;
|
|
34
34
|
};
|
|
35
35
|
export declare function computeTraceHealth(input: TraceHealthInput): TraceHealthLayer[];
|
|
36
36
|
export declare function renderTraceHealth(layers: TraceHealthLayer[]): string[];
|
|
@@ -32,7 +32,7 @@ export function computeTraceHealth(input) {
|
|
|
32
32
|
// never warns). When the scenario manifest declares LLM usage we expect at
|
|
33
33
|
// least one row even with zero observed; absence then surfaces as a warning
|
|
34
34
|
// ("capture-server may not have started").
|
|
35
|
-
const proxyExpected = input.
|
|
35
|
+
const proxyExpected = input.taskExpectsLlm
|
|
36
36
|
? 1
|
|
37
37
|
: counts.LlmCallEvent > 0
|
|
38
38
|
? 1
|
|
@@ -48,7 +48,7 @@ export function computeTraceHealth(input) {
|
|
|
48
48
|
};
|
|
49
49
|
// twin layer — TwinHttpEvent rows. A scenario always declares ≥1 twin in
|
|
50
50
|
// `config.twins`, so when we know the scenario we expect ≥1 row.
|
|
51
|
-
const twinExpectedBool = input.
|
|
51
|
+
const twinExpectedBool = input.taskUsesTwin ?? counts.TwinHttpEvent > 0;
|
|
52
52
|
const twinExpected = twinExpectedBool ? 1 : 0;
|
|
53
53
|
const twin = {
|
|
54
54
|
name: "twin",
|
|
@@ -68,7 +68,7 @@ export function computeTraceHealth(input) {
|
|
|
68
68
|
counts.SubagentSpawnEvent +
|
|
69
69
|
counts.HookEvent +
|
|
70
70
|
counts.LlmTurnEvent;
|
|
71
|
-
const casExpected = input.
|
|
71
|
+
const casExpected = input.taskExpectsCas ? 1 : casCount > 0 ? 1 : 0;
|
|
72
72
|
const cas = {
|
|
73
73
|
name: "CAS adapter",
|
|
74
74
|
count: casCount,
|
|
@@ -98,7 +98,7 @@ function defaultBinArgs(eventsOut, allowHosts, egressOut) {
|
|
|
98
98
|
}
|
|
99
99
|
return [script, "capture-server", "--port", "0", "--events-out", eventsOut, ...egressArgs(allowHosts, egressOut)];
|
|
100
100
|
}
|
|
101
|
-
// Shared by defaultBinArgs and
|
|
101
|
+
// Shared by defaultBinArgs and runTask's test-override path so the two
|
|
102
102
|
// spawn shapes can't drift.
|
|
103
103
|
export function egressArgs(allowHosts, egressOut) {
|
|
104
104
|
const args = [];
|
|
@@ -3,8 +3,8 @@ export type CaptureServerCommand = {
|
|
|
3
3
|
execPath: string;
|
|
4
4
|
prefixArgs: string[];
|
|
5
5
|
};
|
|
6
|
-
export type
|
|
7
|
-
|
|
6
|
+
export type RunTaskOptions = {
|
|
7
|
+
taskPath: string;
|
|
8
8
|
agentCommand: string;
|
|
9
9
|
artifactsDir?: string;
|
|
10
10
|
captureServerCommand?: CaptureServerCommand;
|
|
@@ -13,7 +13,7 @@ export type RunScenarioOptions = {
|
|
|
13
13
|
extraAgentEnv?: Record<string, string>;
|
|
14
14
|
egressExtraHosts?: readonly string[];
|
|
15
15
|
};
|
|
16
|
-
export declare function
|
|
16
|
+
export declare function runTask(options: RunTaskOptions): Promise<{
|
|
17
17
|
scenario: {
|
|
18
18
|
slug: string;
|
|
19
19
|
title: string;
|
|
@@ -4,7 +4,7 @@ import { randomBytes, randomUUID } from "node:crypto";
|
|
|
4
4
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
5
5
|
import { join, resolve as resolvePath, sep as pathSep } from "node:path";
|
|
6
6
|
import { sign } from "hono/jwt";
|
|
7
|
-
import {
|
|
7
|
+
import { parseTaskFile, seedStateForTwin } from "../task/parseTask.js";
|
|
8
8
|
import { bootTwin } from "../twin/twinHarness.js";
|
|
9
9
|
import { createRecorder } from "../recorder/recorder.js";
|
|
10
10
|
import { redactSecrets } from "../recorder/redaction.js";
|
|
@@ -13,7 +13,7 @@ import { runAgentCommand } from "./agentRunner.js";
|
|
|
13
13
|
import { egressArgs, spawnCaptureServerChild } from "./captureServerChild.js";
|
|
14
14
|
import { buildEgressAllowlist, readBlockedEgress } from "../capture-server/egress.js";
|
|
15
15
|
import { mergeAdapterSignalsIntoEvents } from "./mergeAdapterSignals.js";
|
|
16
|
-
import { writeRunNoScore } from "./
|
|
16
|
+
import { writeRunNoScore } from "./runTaskCore.js";
|
|
17
17
|
// Promisify a Hono/node server `close()` so teardown can await in-flight
|
|
18
18
|
// handlers draining before the twin's DB handle is released.
|
|
19
19
|
function closeServer(server) {
|
|
@@ -21,8 +21,8 @@ function closeServer(server) {
|
|
|
21
21
|
server.close((err) => (err ? reject(err) : resolvePromise()));
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
export async function
|
|
25
|
-
const scenario = await
|
|
24
|
+
export async function runTask(options) {
|
|
25
|
+
const scenario = await parseTaskFile(options.taskPath);
|
|
26
26
|
const runId = `run_${randomUUID()}`;
|
|
27
27
|
const artifactsDir = options.artifactsDir ?? "runs";
|
|
28
28
|
const startedAt = new Date().toISOString();
|