@pome-sh/cli 0.4.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 +31 -6
- 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 +49 -16
- 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/install.d.ts +4 -41
- package/dist/src/cli/install.js +31 -412
- package/dist/src/cli/main.js +212 -118
- package/dist/src/cli/register.d.ts +4 -22
- package/dist/src/cli/register.js +6 -31
- 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 +12 -3
- 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 -7
- package/{scenarios → tasks}/00-default-seed.md +1 -1
- package/{scenarios → tasks}/14-stripe-refund-retry.md +1 -1
- package/dist/src/cli/agent-sdk.d.ts +0 -32
- package/dist/src/cli/agent-sdk.js +0 -105
- package/dist/src/cli/embedded-wiring.d.ts +0 -47
- package/dist/src/cli/embedded-wiring.js +0 -443
- package/dist/src/cli/scenarios-catalog.d.ts +0 -25
- package/dist/src/cli/scenarios.d.ts +0 -13
- package/dist/src/cli/skills.d.ts +0 -8
- package/dist/src/cli/skills.js +0 -141
- 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/skills/pome-setup/SKILL.md +0 -150
- package/skills/pome-test/SKILL.md +0 -137
- /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
|
@@ -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();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Task } from "../task/taskSchema.js";
|
|
2
2
|
import { writeRunArtifactsCore } from "../recorder/artifacts.js";
|
|
3
3
|
import type { RecorderEvent } from "@pome-sh/shared-types";
|
|
4
4
|
export interface WriteRunInput {
|
|
5
5
|
artifactsDir: string;
|
|
6
6
|
runId: string;
|
|
7
|
-
scenario:
|
|
7
|
+
scenario: Task;
|
|
8
8
|
startedAt: string;
|
|
9
9
|
completedAt: string;
|
|
10
10
|
agentStdout: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type HostedClient } from "../hosted/client.js";
|
|
2
2
|
import type { CreateSessionResponse } from "../types/shared.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { Task } from "../task/taskSchema.js";
|
|
4
4
|
import type { Score } from "../hosted/evalResultView.js";
|
|
5
5
|
import type { RunArtifacts } from "../recorder/artifacts.js";
|
|
6
|
-
export interface
|
|
7
|
-
|
|
6
|
+
export interface RunTaskHostedOptions {
|
|
7
|
+
taskPath: string;
|
|
8
8
|
agentCommand: string;
|
|
9
9
|
artifactsDir?: string;
|
|
10
10
|
hosted: {
|
|
@@ -37,8 +37,8 @@ export interface RunScenarioHostedOptions {
|
|
|
37
37
|
* local artifacts. Absent on single runs (verdict.json gets null). */
|
|
38
38
|
groupId?: string;
|
|
39
39
|
}
|
|
40
|
-
export interface
|
|
41
|
-
scenario:
|
|
40
|
+
export interface RunTaskHostedResult {
|
|
41
|
+
scenario: Task;
|
|
42
42
|
runId: string;
|
|
43
43
|
cloudRunId: string;
|
|
44
44
|
cloudDashboardUrl: string;
|
|
@@ -87,4 +87,4 @@ export declare function buildAgentEnv(params: {
|
|
|
87
87
|
slug: string;
|
|
88
88
|
signalsPath: string;
|
|
89
89
|
}): Record<string, string>;
|
|
90
|
-
export declare function
|
|
90
|
+
export declare function runTaskHosted(options: RunTaskHostedOptions): Promise<RunTaskHostedResult>;
|
|
@@ -7,7 +7,7 @@ import { runAgentCommand } from "./agentRunner.js";
|
|
|
7
7
|
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
|
-
import {
|
|
10
|
+
import { parseTaskFile } from "../task/parseTask.js";
|
|
11
11
|
import { createHostedClient, perTwinReturnedByCloud, } from "../hosted/client.js";
|
|
12
12
|
import { ensureMcpSuffix } from "../cli/session.js";
|
|
13
13
|
import { redactJsonl, scoreFromFinalizeResponse, uploadRunBlobs, } from "../hosted/uploadAndFinalize.js";
|
|
@@ -105,10 +105,10 @@ export function buildAgentEnv(params) {
|
|
|
105
105
|
}
|
|
106
106
|
return env;
|
|
107
107
|
}
|
|
108
|
-
export async function
|
|
109
|
-
const scenario = await
|
|
110
|
-
const
|
|
111
|
-
const
|
|
108
|
+
export async function runTaskHosted(options) {
|
|
109
|
+
const scenario = await parseTaskFile(options.taskPath);
|
|
110
|
+
const taskSource = await readFile(options.taskPath, "utf8");
|
|
111
|
+
const taskHash = createHash("sha256").update(taskSource).digest("hex");
|
|
112
112
|
const artifactsDir = options.artifactsDir ?? "runs";
|
|
113
113
|
const startedAt = new Date().toISOString();
|
|
114
114
|
const client = options.client ??
|
|
@@ -119,7 +119,7 @@ export async function runScenarioHosted(options) {
|
|
|
119
119
|
// `agent_version` stamps the session; `--agent-version` overrides it. All are
|
|
120
120
|
// optional during rollout — a manifest-less repo runs unattributed.
|
|
121
121
|
const identity = await resolveRunAgentIdentity({
|
|
122
|
-
startDir: dirname(options.
|
|
122
|
+
startDir: dirname(options.taskPath),
|
|
123
123
|
apiBaseUrl: options.hosted.baseUrl,
|
|
124
124
|
agentVersionOverride: options.agentVersion,
|
|
125
125
|
});
|
|
@@ -138,11 +138,11 @@ export async function runScenarioHosted(options) {
|
|
|
138
138
|
// groups mint all k sessions upfront (one shared group_id) and pass each
|
|
139
139
|
// one in as `premintedSession`; the single-run path mints its own here.
|
|
140
140
|
// Forward the resolved seed (sidecar -> inline JSON -> twin defaults, in that
|
|
141
|
-
// precedence; see
|
|
141
|
+
// precedence; see parseTask.resolveSeedState) so the cloud doesn't need
|
|
142
142
|
// to re-extract it from the markdown. Prose `## Seed State` sections have no
|
|
143
143
|
// fenced JSON to extract — cloud would 422 with "no fenced code block".
|
|
144
144
|
const session = await createSessionOrExplain(client, options.premintedSession, {
|
|
145
|
-
|
|
145
|
+
taskSource,
|
|
146
146
|
twins: scenario.config.twins,
|
|
147
147
|
agentId,
|
|
148
148
|
agentVersion,
|
|
@@ -450,9 +450,9 @@ export async function runScenarioHosted(options) {
|
|
|
450
450
|
agentModel: options.agentModel ?? "unknown",
|
|
451
451
|
agentSdk,
|
|
452
452
|
criteria: criteriaDefs,
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
453
|
+
taskName: scenario.slug,
|
|
454
|
+
taskHash,
|
|
455
|
+
taskPrompt: scenario.prompt,
|
|
456
456
|
expectedBehavior: scenario.expectedBehavior,
|
|
457
457
|
// Explicit overrides when uploads succeeded; otherwise let cloud fall
|
|
458
458
|
// back. For events.jsonl the conventional `team-<>/session-<>/events.jsonl`
|
|
@@ -504,7 +504,7 @@ export async function runScenarioHosted(options) {
|
|
|
504
504
|
version: VERDICT_ARTIFACT_VERSION,
|
|
505
505
|
source: "cloud-finalize",
|
|
506
506
|
task_name: scenario.slug,
|
|
507
|
-
scenario_path: options.
|
|
507
|
+
scenario_path: options.taskPath,
|
|
508
508
|
group_id: options.groupId ?? null,
|
|
509
509
|
session_id: session.session_id,
|
|
510
510
|
cloud_run_id: finalized.run_id,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HostedClient } from "../hosted/client.js";
|
|
2
|
-
import {
|
|
2
|
+
import { runTaskHosted } from "./runTaskHosted.js";
|
|
3
3
|
import { type TrialRow } from "./groupRender.js";
|
|
4
4
|
/** Per-request transport timeout. Durable evaluation has a separate budget. */
|
|
5
5
|
export declare const GROUP_FINALIZE_TIMEOUT_MS = 60000;
|
|
@@ -9,7 +9,7 @@ export declare const GROUP_FINALIZE_TIMEOUT_MS = 60000;
|
|
|
9
9
|
export declare const LAZY_MINT_RETRY_MS = 2000;
|
|
10
10
|
export declare const LAZY_MINT_MAX_ATTEMPTS = 5;
|
|
11
11
|
export interface RunTrialGroupOptions {
|
|
12
|
-
|
|
12
|
+
taskPath: string;
|
|
13
13
|
agentCommand: string;
|
|
14
14
|
/** Where the agent command came from, for the header copy
|
|
15
15
|
* ("pome.json" | "--agent" | "built-in default"). */
|
|
@@ -31,11 +31,11 @@ export interface RunTrialGroupOptions {
|
|
|
31
31
|
/** FDRS-644 — the literal command the fix handoff tells the user to
|
|
32
32
|
* re-run after their coding agent applies a fix. The caller knows the
|
|
33
33
|
* invocation shape (bare `pome run` vs an explicit path + -n); default
|
|
34
|
-
* reconstructs it from
|
|
34
|
+
* reconstructs it from taskPath + trials. */
|
|
35
35
|
rerunCommand?: string;
|
|
36
36
|
out?: (line: string) => void;
|
|
37
37
|
client?: HostedClient;
|
|
38
|
-
|
|
38
|
+
runTaskHostedFn?: typeof runTaskHosted;
|
|
39
39
|
groupId?: string;
|
|
40
40
|
/** FDRS-663 — lazy-mint retry pause; defaults to a real setTimeout. */
|
|
41
41
|
sleepFn?: (ms: number) => Promise<void>;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
// half-group back (best-effort DELETEs) and aborts before any agent
|
|
17
17
|
// spawns.
|
|
18
18
|
// 2. Run the k trials with concurrency = the number of upfront mints
|
|
19
|
-
// (= k when quota never pushed back).
|
|
19
|
+
// (= k when quota never pushed back). runTaskHosted stays the
|
|
20
20
|
// isolation unit: each trial gets its session via the
|
|
21
21
|
// `premintedSession` seam, `abandonOnFailure` on, and still DELETEs
|
|
22
22
|
// its own session in its `finally` — that delete frees the quota slot
|
|
@@ -40,10 +40,10 @@ import { createHostedClient } from "../hosted/client.js";
|
|
|
40
40
|
import { HostedQuotaError, HostedTrialError } from "../hosted/errors.js";
|
|
41
41
|
import { newGroupId } from "../demo/ids.js";
|
|
42
42
|
import { criterionPhrase } from "../demo/render.js";
|
|
43
|
-
import {
|
|
43
|
+
import { parseTaskFile } from "../task/parseTask.js";
|
|
44
44
|
import { outcomeOf } from "../hosted/evalResultView.js";
|
|
45
45
|
import { resolveRunAgentIdentity } from "../cli/agent-identity.js";
|
|
46
|
-
import {
|
|
46
|
+
import { runTaskHosted } from "./runTaskHosted.js";
|
|
47
47
|
import { fixHandoffLines, flagHintLine, groupExitCode, groupSummaryLines, mostCommonFailedCriterion, provisioningLine, shortReason, spawningAgentLine, trialRowLine, } from "./groupRender.js";
|
|
48
48
|
/** Per-request transport timeout. Durable evaluation has a separate budget. */
|
|
49
49
|
export const GROUP_FINALIZE_TIMEOUT_MS = 60_000;
|
|
@@ -57,7 +57,7 @@ export async function runTrialGroup(options) {
|
|
|
57
57
|
throw new Error(`runTrialGroup requires k>1 (got ${options.trials}); k=1 takes the single-run path so no group is stamped.`);
|
|
58
58
|
}
|
|
59
59
|
const out = options.out ?? ((line) => console.error(line));
|
|
60
|
-
const runFn = options.
|
|
60
|
+
const runFn = options.runTaskHostedFn ?? runTaskHosted;
|
|
61
61
|
const client = options.client ??
|
|
62
62
|
createHostedClient({
|
|
63
63
|
baseUrl: options.hosted.baseUrl,
|
|
@@ -66,12 +66,12 @@ export async function runTrialGroup(options) {
|
|
|
66
66
|
});
|
|
67
67
|
const groupId = options.groupId ?? newGroupId();
|
|
68
68
|
const agentCommandSource = options.agentCommandSource ?? "pome.json";
|
|
69
|
-
const scenario = await
|
|
70
|
-
const
|
|
69
|
+
const scenario = await parseTaskFile(options.taskPath);
|
|
70
|
+
const taskSource = await readFile(options.taskPath, "utf8");
|
|
71
71
|
// Same agent resolution as the single-run path (F-819): the group's trials
|
|
72
72
|
// are recorded under the agent the manifest's `agent.slug` resolves to.
|
|
73
73
|
const identity = await resolveRunAgentIdentity({
|
|
74
|
-
startDir: dirname(options.
|
|
74
|
+
startDir: dirname(options.taskPath),
|
|
75
75
|
apiBaseUrl: options.hosted.baseUrl,
|
|
76
76
|
agentVersionOverride: options.agentVersion,
|
|
77
77
|
});
|
|
@@ -83,7 +83,7 @@ export async function runTrialGroup(options) {
|
|
|
83
83
|
const sleep = options.sleepFn ??
|
|
84
84
|
((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
85
85
|
const mintOne = () => client.createSession({
|
|
86
|
-
|
|
86
|
+
taskSource,
|
|
87
87
|
twins: scenario.config.twins,
|
|
88
88
|
agentId,
|
|
89
89
|
agentVersion,
|
|
@@ -158,7 +158,7 @@ export async function runTrialGroup(options) {
|
|
|
158
158
|
try {
|
|
159
159
|
const session = index < sessions.length ? sessions[index] : await mintLazily();
|
|
160
160
|
const result = await runFn({
|
|
161
|
-
|
|
161
|
+
taskPath: options.taskPath,
|
|
162
162
|
agentCommand: options.agentCommand,
|
|
163
163
|
artifactsDir: options.artifactsDir,
|
|
164
164
|
hosted: options.hosted,
|
|
@@ -239,7 +239,7 @@ export async function runTrialGroup(options) {
|
|
|
239
239
|
? "pome fix-prompt"
|
|
240
240
|
: `pome fix-prompt ${artifactsDir}`;
|
|
241
241
|
const rerunCommand = options.rerunCommand ??
|
|
242
|
-
`pome run ${options.
|
|
242
|
+
`pome run ${options.taskPath} -n ${options.trials}`;
|
|
243
243
|
for (const line of fixHandoffLines({ fixPromptCommand, rerunCommand })) {
|
|
244
244
|
out(line);
|
|
245
245
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// FDRS-636 — trial-count resolution for `pome run -n k`.
|
|
3
3
|
//
|
|
4
4
|
// [DECISION 2026-07-05]: -n is an integer 1..20 on the hosted run path. The
|
|
5
|
-
// DEFAULT is the scenario config's `runs` field (
|
|
5
|
+
// DEFAULT is the scenario config's `runs` field (taskConfigSchema parses
|
|
6
6
|
// it, defaulting 1; nothing consumed it before this ticket) — -n overrides;
|
|
7
7
|
// both are capped at 20. k=1 keeps EXACTLY today's single-run behavior (no
|
|
8
8
|
// group is ever stamped — a group of 1 would flip the reliability page off
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Task } from "./taskSchema.js";
|
|
2
|
+
export declare function parseTaskFile(path: string): Promise<Task>;
|
|
3
|
+
export declare function parseTask(markdown: string, slug?: string, sidecarSeed?: unknown, taskPath?: string): Task;
|
|
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: Task, twin: string): unknown;
|
|
9
|
+
export declare function formatTaskError(error: unknown, filePath: string): string;
|
|
@@ -8,23 +8,23 @@ import { defaultSeedState, seedSchema } from "@pome-sh/twin-github";
|
|
|
8
8
|
import { defaultSeedState as defaultGmailSeedState, gmailSeedSchema, } from "@pome-sh/twin-gmail";
|
|
9
9
|
import { defaultSeedState as defaultLinearSeedState, linearSeedSchema as linearSeedStateSchema, } from "@pome-sh/twin-linear";
|
|
10
10
|
import { parseGitHubSeedState } from "./githubSeedCompat.js";
|
|
11
|
-
import { criterionSchema,
|
|
12
|
-
export async function
|
|
11
|
+
import { criterionSchema, taskConfigSchema, taskSchema, slackSeedStateSchema, stripeSeedStateSchema } from "./taskSchema.js";
|
|
12
|
+
export async function parseTaskFile(path) {
|
|
13
13
|
const markdown = await readFile(path, "utf8");
|
|
14
14
|
const sidecarSeed = await readSidecarSeed(path);
|
|
15
|
-
return
|
|
15
|
+
return parseTask(markdown, slugFromPath(path), sidecarSeed, path);
|
|
16
16
|
}
|
|
17
|
-
export function
|
|
17
|
+
export function parseTask(markdown, slug = "scenario", sidecarSeed, taskPath) {
|
|
18
18
|
const title = markdown.match(/^#\s+(.+)$/m)?.[1]?.trim() ?? slug;
|
|
19
19
|
const sections = splitSections(markdown);
|
|
20
20
|
const prompt = sections.get("prompt") ?? sections.get("task") ?? "";
|
|
21
21
|
const criteriaText = sections.get("success criteria") ?? sections.get("checks") ?? "";
|
|
22
22
|
const configText = sections.get("config") ?? "";
|
|
23
23
|
const seedText = sections.get("seed state") ?? "";
|
|
24
|
-
const config = configText.trim() ?
|
|
24
|
+
const config = configText.trim() ? taskConfigSchema.parse(parseFencedYaml(configText)) : taskConfigSchema.parse({});
|
|
25
25
|
const criteria = parseCriteria(criteriaText, config.twins);
|
|
26
|
-
const seedState = resolveSeedState({ sidecarSeed, seedText, config,
|
|
27
|
-
return
|
|
26
|
+
const seedState = resolveSeedState({ sidecarSeed, seedText, config, taskPath });
|
|
27
|
+
return taskSchema.parse({
|
|
28
28
|
slug,
|
|
29
29
|
title,
|
|
30
30
|
setup: sections.get("setup") ?? "",
|
|
@@ -46,7 +46,7 @@ function resolveSeedState(args) {
|
|
|
46
46
|
// validated against the in-memory twin. The `_meta` key (source hash,
|
|
47
47
|
// model, etc.) is stripped before schema parsing.
|
|
48
48
|
if (args.sidecarSeed !== undefined) {
|
|
49
|
-
return
|
|
49
|
+
return parseSeedStateForTask(stripSidecarMeta(args.sidecarSeed), args.config);
|
|
50
50
|
}
|
|
51
51
|
if (args.seedText.trim()) {
|
|
52
52
|
const raw = stripFence(args.seedText);
|
|
@@ -55,10 +55,10 @@ function resolveSeedState(args) {
|
|
|
55
55
|
// got here, the sidecar is missing — tell the user what to do instead of
|
|
56
56
|
// letting JSON.parse surface "Unexpected token 'A'".
|
|
57
57
|
if (!/^[\[{]/.test(raw)) {
|
|
58
|
-
throw new Error(missingSidecarMessage(args.
|
|
58
|
+
throw new Error(missingSidecarMessage(args.taskPath));
|
|
59
59
|
}
|
|
60
60
|
try {
|
|
61
|
-
return
|
|
61
|
+
return parseSeedStateForTask(JSON.parse(raw), args.config);
|
|
62
62
|
}
|
|
63
63
|
catch (err) {
|
|
64
64
|
if (err instanceof SyntaxError) {
|
|
@@ -84,7 +84,7 @@ function resolveMultiTwinSeedState(args) {
|
|
|
84
84
|
else if (args.seedText.trim()) {
|
|
85
85
|
const text = stripFence(args.seedText);
|
|
86
86
|
if (!/^[\[{]/.test(text)) {
|
|
87
|
-
throw new Error(missingSidecarMessage(args.
|
|
87
|
+
throw new Error(missingSidecarMessage(args.taskPath));
|
|
88
88
|
}
|
|
89
89
|
try {
|
|
90
90
|
raw = JSON.parse(text);
|
|
@@ -155,10 +155,10 @@ function defaultSeedForTwin(twin) {
|
|
|
155
155
|
}
|
|
156
156
|
return seedSchema.parse(defaultSeedState());
|
|
157
157
|
}
|
|
158
|
-
function missingSidecarMessage(
|
|
159
|
-
const pathLabel =
|
|
160
|
-
const sidecarLabel =
|
|
161
|
-
?
|
|
158
|
+
function missingSidecarMessage(taskPath) {
|
|
159
|
+
const pathLabel = taskPath ?? "<task>.md";
|
|
160
|
+
const sidecarLabel = taskPath
|
|
161
|
+
? taskPath.replace(/\.md$/i, ".seed.json")
|
|
162
162
|
: "<task>.seed.json";
|
|
163
163
|
return [
|
|
164
164
|
`Task has a prose ## Seed State section but no compiled sidecar (${sidecarLabel}). Run:`,
|
|
@@ -175,9 +175,9 @@ function stripSidecarMeta(seed) {
|
|
|
175
175
|
}
|
|
176
176
|
return seed;
|
|
177
177
|
}
|
|
178
|
-
async function readSidecarSeed(
|
|
179
|
-
const sidecarPath =
|
|
180
|
-
if (sidecarPath ===
|
|
178
|
+
async function readSidecarSeed(taskPath) {
|
|
179
|
+
const sidecarPath = taskPath.replace(/\.md$/i, ".seed.json");
|
|
180
|
+
if (sidecarPath === taskPath || !existsSync(sidecarPath))
|
|
181
181
|
return undefined;
|
|
182
182
|
const raw = await readFile(sidecarPath, "utf8");
|
|
183
183
|
try {
|
|
@@ -276,7 +276,7 @@ function parseFencedYaml(input) {
|
|
|
276
276
|
// FDRS-365: scenario seed shape is FLAT per twin, disambiguated by config.twins.
|
|
277
277
|
// Stripe-only scenarios parse with the Stripe schema; everything else (default
|
|
278
278
|
// `["github"]`, or explicit github) parses with the GitHub schema.
|
|
279
|
-
function
|
|
279
|
+
function parseSeedStateForTask(input, config) {
|
|
280
280
|
if (isStripeOnly(config.twins))
|
|
281
281
|
return stripeSeedStateSchema.parse(input);
|
|
282
282
|
if (isSlackOnly(config.twins))
|
|
@@ -295,7 +295,7 @@ function defaultSeedStateForConfig(twins) {
|
|
|
295
295
|
}
|
|
296
296
|
if (isSlackOnly(twins)) {
|
|
297
297
|
// Empty Slack seed — the twin's own `parseSeed`/`defaultSeedState` fills the
|
|
298
|
-
// world at boot.
|
|
298
|
+
// world at boot. Tasks always ship a sidecar, so this is just the
|
|
299
299
|
// schema-valid floor.
|
|
300
300
|
return slackSeedStateSchema.parse({});
|
|
301
301
|
}
|
|
@@ -329,7 +329,7 @@ function slugFromPath(path) {
|
|
|
329
329
|
.replace(/[^a-z0-9]+/g, "-")
|
|
330
330
|
.replace(/^-|-$/g, "");
|
|
331
331
|
}
|
|
332
|
-
export function
|
|
332
|
+
export function formatTaskError(error, filePath) {
|
|
333
333
|
if (error instanceof z.ZodError) {
|
|
334
334
|
return `Invalid task ${filePath}: ${error.issues.map((issue) => `${issue.path.join(".")}: ${issue.message}`).join("; ")}`;
|
|
335
335
|
}
|
|
@@ -2,7 +2,7 @@ import type { CompileResult } from "./seed-compiler.js";
|
|
|
2
2
|
export interface CompileSeedHostedOptions {
|
|
3
3
|
apiBaseUrl: string;
|
|
4
4
|
twin?: "github";
|
|
5
|
-
|
|
5
|
+
taskPath?: string;
|
|
6
6
|
timeoutMs?: number;
|
|
7
7
|
}
|
|
8
8
|
export declare function compileSeedHosted(prose: string, opts: CompileSeedHostedOptions): Promise<CompileResult>;
|
|
@@ -4,7 +4,7 @@ import { linearSeedSchema as linearSeedStateSchema } from "@pome-sh/twin-linear"
|
|
|
4
4
|
import { criterionSchema } from "@pome-sh/shared-types";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
export { criterionSchema };
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const taskConfigSchema: z.ZodObject<{
|
|
8
8
|
twins: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
9
9
|
timeout: z.ZodDefault<z.ZodNumber>;
|
|
10
10
|
runs: z.ZodDefault<z.ZodNumber>;
|
|
@@ -979,7 +979,7 @@ export declare const seedEnvelopeSchema: z.ZodRecord<z.ZodString, z.ZodUnion<rea
|
|
|
979
979
|
body: z.ZodUnknown;
|
|
980
980
|
}, z.core.$strip>>>;
|
|
981
981
|
}, z.core.$strict>]>>;
|
|
982
|
-
export declare const
|
|
982
|
+
export declare const taskSchema: z.ZodObject<{
|
|
983
983
|
slug: z.ZodString;
|
|
984
984
|
title: z.ZodString;
|
|
985
985
|
setup: z.ZodDefault<z.ZodString>;
|
|
@@ -1930,7 +1930,7 @@ export declare const scenarioSchema: z.ZodObject<{
|
|
|
1930
1930
|
}, z.core.$strict>]>>]>;
|
|
1931
1931
|
}, z.core.$strip>;
|
|
1932
1932
|
export type Criterion = z.infer<typeof criterionSchema>;
|
|
1933
|
-
export type
|
|
1933
|
+
export type TaskConfig = z.infer<typeof taskConfigSchema>;
|
|
1934
1934
|
export type GithubSeedState = z.infer<typeof githubSeedStateSchema>;
|
|
1935
1935
|
export type StripeSeedState = z.infer<typeof stripeSeedStateSchema>;
|
|
1936
1936
|
export type SlackSeedState = z.infer<typeof slackSeedStateSchema>;
|
|
@@ -1939,4 +1939,4 @@ export type LinearSeedState = z.infer<typeof linearSeedStateSchema>;
|
|
|
1939
1939
|
export type StripeFailureInjectionRule = z.infer<typeof stripeFailureInjectionRuleSchema>;
|
|
1940
1940
|
export type SeedState = z.infer<typeof seedStateSchema>;
|
|
1941
1941
|
export type SeedEnvelope = z.infer<typeof seedEnvelopeSchema>;
|
|
1942
|
-
export type
|
|
1942
|
+
export type Task = z.infer<typeof taskSchema>;
|
|
@@ -10,7 +10,7 @@ import { linearSeedSchema as linearSeedStateSchema } from "@pome-sh/twin-linear"
|
|
|
10
10
|
import { criterionSchema } from "@pome-sh/shared-types";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
export { criterionSchema };
|
|
13
|
-
export const
|
|
13
|
+
export const taskConfigSchema = z.object({
|
|
14
14
|
twins: z.array(z.string()).default(["github"]),
|
|
15
15
|
timeout: z.number().int().positive().default(60),
|
|
16
16
|
runs: z.number().int().positive().default(1),
|
|
@@ -70,7 +70,7 @@ export const slackSeedStateSchema = z
|
|
|
70
70
|
// Slack scenarios use the Slack seed shape (`{ users, channels, ... }`).
|
|
71
71
|
// Multi-twin scenarios are not a current requirement; the wrapped
|
|
72
72
|
// `{ <twin>: { seed: ... } }` form was rejected here to keep one canonical
|
|
73
|
-
// shape that twin parsers already speak natively.
|
|
73
|
+
// shape that twin parsers already speak natively. parseTask disambiguates
|
|
74
74
|
// the union by `config.twins`.
|
|
75
75
|
//
|
|
76
76
|
// Slack arm is FIRST because it is the only `.strict()` arm: a GitHub/Stripe
|
|
@@ -87,18 +87,18 @@ export const seedStateSchema = z.union([
|
|
|
87
87
|
// ONLY for scenarios whose `config.twins` has >1 entry (the envelope-iff-multi-twin
|
|
88
88
|
// rule, decided from `twins` alone — never by sniffing the seed shape). Each value
|
|
89
89
|
// is one twin's flat seed, the same shapes `seedStateSchema` unions. Single-twin
|
|
90
|
-
// scenarios keep the flat shape byte-identical.
|
|
90
|
+
// scenarios keep the flat shape byte-identical. parseTask builds and validates
|
|
91
91
|
// the envelope value-by-value with each twin's own schema; this record is the outer
|
|
92
|
-
// shape
|
|
92
|
+
// shape taskSchema re-validates against.
|
|
93
93
|
export const seedEnvelopeSchema = z.record(z.string(), seedStateSchema);
|
|
94
|
-
export const
|
|
94
|
+
export const taskSchema = z.object({
|
|
95
95
|
slug: z.string().min(1),
|
|
96
96
|
title: z.string().min(1),
|
|
97
97
|
setup: z.string().default(""),
|
|
98
98
|
prompt: z.string().min(1),
|
|
99
99
|
expectedBehavior: z.string().default(""),
|
|
100
100
|
criteria: z.array(criterionSchema).min(1),
|
|
101
|
-
config:
|
|
101
|
+
config: taskConfigSchema,
|
|
102
102
|
// Flat single-twin seed OR the multi-twin per-twin envelope. Flat is tried
|
|
103
103
|
// first so single-twin seeds match their strict arms; the envelope only
|
|
104
104
|
// matches when the flat union can't (its keys are twin ids, not seed fields).
|
|
@@ -102,7 +102,7 @@ async function callStripeTool(name: string, input: any) {
|
|
|
102
102
|
throw new Error(`Unknown tool ${name}`);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
// Hero bug surfaced by
|
|
105
|
+
// Hero bug surfaced by tasks/14-stripe-refund-retry.md: this agent intentionally
|
|
106
106
|
// never sends an `Idempotency-Key` header on POST /v1/refunds. When the twin's
|
|
107
107
|
// failure-injection middleware drops the first response, the LLM-driven retry
|
|
108
108
|
// creates a second refund row — exactly the double-charge bug Pome is built to catch.
|