@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,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.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pome-sh/twin-gmail",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Deterministic Gmail-shaped twin for agent testing — SQLite-backed domain core.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@pome-sh/sdk": "0.5.
|
|
50
|
+
"@pome-sh/sdk": "0.5.1",
|
|
51
51
|
"hono": "^4.12.27",
|
|
52
52
|
"zod": "^4.1.13"
|
|
53
53
|
},
|
|
@@ -31,4 +31,5 @@ export * from "./task.js"; // §3 TASKS — task config / task / persisted-task
|
|
|
31
31
|
export * from "./rest.js"; // §4 PUBLIC REST API (minus finalize family)
|
|
32
32
|
export * from "./finalize-shapes.js"; // §4 PUBLIC REST API — /finalize response family
|
|
33
33
|
export * from "./errors.js"; // §5 ERROR ENVELOPE
|
|
34
|
+
export * from "./manifest.js"; // §6 MANIFEST — pome.json/pome.yaml + slug authority (F-818)
|
|
34
35
|
//# sourceMappingURL=index.js.map
|
package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC;;;;;;;;;;;;GAYG;AAEH,8EAA8E;AAC9E,+CAA+C;AAC/C,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gBAAgB,CAAC;AAC/B,gFAAgF;AAChF,6EAA6E;AAC7E,cAAc,iBAAiB,CAAC;AAEhC,6EAA6E;AAC7E,cAAc,eAAe,CAAC,CAAU,cAAc;AACtD,cAAc,eAAe,CAAC,CAAU,cAAc;AACtD,cAAc,iBAAiB,CAAC,CAAQ,yCAAyC;AACjF,cAAc,oBAAoB,CAAC,CAAK,2CAA2C;AACnF,cAAc,WAAW,CAAC,CAAc,iDAAiD;AACzF,cAAc,WAAW,CAAC,CAAc,6CAA6C;AACrF,cAAc,sBAAsB,CAAC,CAAG,iDAAiD;AACzF,cAAc,aAAa,CAAC,CAAY,oBAAoB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC;;;;;;;;;;;;GAYG;AAEH,8EAA8E;AAC9E,+CAA+C;AAC/C,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gBAAgB,CAAC;AAC/B,gFAAgF;AAChF,6EAA6E;AAC7E,cAAc,iBAAiB,CAAC;AAEhC,6EAA6E;AAC7E,cAAc,eAAe,CAAC,CAAU,cAAc;AACtD,cAAc,eAAe,CAAC,CAAU,cAAc;AACtD,cAAc,iBAAiB,CAAC,CAAQ,yCAAyC;AACjF,cAAc,oBAAoB,CAAC,CAAK,2CAA2C;AACnF,cAAc,WAAW,CAAC,CAAc,iDAAiD;AACzF,cAAc,WAAW,CAAC,CAAc,6CAA6C;AACrF,cAAc,sBAAsB,CAAC,CAAG,iDAAiD;AACzF,cAAc,aAAa,CAAC,CAAY,oBAAoB;AAC5D,cAAc,eAAe,CAAC,CAAU,6DAA6D"}
|
package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/manifest.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const SLUG_RE: RegExp;
|
|
3
|
+
export declare const SLUG_MAX_LENGTH = 64;
|
|
4
|
+
export declare function deriveAgentSlug(input: string): string;
|
|
5
|
+
export declare const agentSlugSchema: z.ZodString;
|
|
6
|
+
export declare const manifestAgentSchema: z.ZodObject<{
|
|
7
|
+
slug: z.ZodString;
|
|
8
|
+
name: z.ZodOptional<z.ZodString>;
|
|
9
|
+
description: z.ZodOptional<z.ZodString>;
|
|
10
|
+
version: z.ZodOptional<z.ZodString>;
|
|
11
|
+
framework: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export type ManifestAgent = z.infer<typeof manifestAgentSchema>;
|
|
14
|
+
export declare const manifestSchema: z.ZodObject<{
|
|
15
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
16
|
+
agent: z.ZodObject<{
|
|
17
|
+
slug: z.ZodString;
|
|
18
|
+
name: z.ZodOptional<z.ZodString>;
|
|
19
|
+
description: z.ZodOptional<z.ZodString>;
|
|
20
|
+
version: z.ZodOptional<z.ZodString>;
|
|
21
|
+
framework: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
command: z.ZodOptional<z.ZodString>;
|
|
24
|
+
twins: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
25
|
+
tasks: z.ZodOptional<z.ZodString>;
|
|
26
|
+
artifacts_dir: z.ZodDefault<z.ZodString>;
|
|
27
|
+
pass_threshold: z.ZodDefault<z.ZodNumber>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export type Manifest = z.infer<typeof manifestSchema>;
|
|
30
|
+
export type ManifestInput = z.input<typeof manifestSchema>;
|
|
31
|
+
export declare function buildManifestJsonSchema(): Record<string, unknown>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
//
|
|
3
|
+
// shared-types §6 — the pome.json / pome.yaml MANIFEST (F-818, format spec
|
|
4
|
+
// F-804). One canonical zod schema; JSON and YAML are interchangeable carriers
|
|
5
|
+
// of the same snake_case keys (both files present is a hard error at the CLI
|
|
6
|
+
// loader, not here). The `agent` block is the stable cross-carrier identity
|
|
7
|
+
// contract; top-level keys are CLI run-config and may evolve faster.
|
|
8
|
+
//
|
|
9
|
+
// SLUG_RE and deriveAgentSlug are THE slug authority for every consumer (CLI,
|
|
10
|
+
// control-plane /v1/agents, dashboard, MCP). SLUG_RE is byte-identical to the
|
|
11
|
+
// pome-cloud control-plane's regex; deriveAgentSlug is a behavior-identical
|
|
12
|
+
// port of packages/db/src/agent-slug.ts (equivalence pinned in
|
|
13
|
+
// test/manifest.test.ts). pome-cloud imports both from here as of F-820 —
|
|
14
|
+
// local and server validation must never drift again.
|
|
15
|
+
import { z } from "zod";
|
|
16
|
+
// Canonical agent-slug shape: kebab-case, lowercase alphanumerics, no edge or
|
|
17
|
+
// doubled dashes. Length is capped separately (the regex is anchored on shape).
|
|
18
|
+
export const SLUG_RE = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
19
|
+
export const SLUG_MAX_LENGTH = 64;
|
|
20
|
+
// Shared agent slug derivation for REST, dashboard, and CLI registration
|
|
21
|
+
// paths. Keep this pure: validation and reserved-slug checks live at each API
|
|
22
|
+
// edge. Returns "" when nothing sluggable remains — callers must check.
|
|
23
|
+
//
|
|
24
|
+
// The first replace collapses every non-alphanumeric run (dashes included) to
|
|
25
|
+
// a single dash, so afterwards each edge carries at most one dash — the
|
|
26
|
+
// anchored single-char strips are exhaustive and stay linear (the upstream
|
|
27
|
+
// `/^-+|-+$/g` form is a CodeQL js/polynomial-redos finding).
|
|
28
|
+
export function deriveAgentSlug(input) {
|
|
29
|
+
return input
|
|
30
|
+
.toLowerCase()
|
|
31
|
+
.trim()
|
|
32
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
33
|
+
.replace(/^-/, "")
|
|
34
|
+
.replace(/-$/, "");
|
|
35
|
+
}
|
|
36
|
+
export const agentSlugSchema = z
|
|
37
|
+
.string()
|
|
38
|
+
.max(SLUG_MAX_LENGTH)
|
|
39
|
+
.regex(SLUG_RE, "Agent slug must be kebab-case: lowercase letters, digits, single dashes");
|
|
40
|
+
// The `agent` identity block. `slug` is the only required field in the whole
|
|
41
|
+
// manifest — portable and non-sensitive. The registered `agt_` id is
|
|
42
|
+
// deliberately NOT here: committed opaque ids are the fork-404 bug class; the
|
|
43
|
+
// platform resolver (POST /v1/agents) maps slug → id under the caller's team.
|
|
44
|
+
export const manifestAgentSchema = z.object({
|
|
45
|
+
slug: agentSlugSchema,
|
|
46
|
+
name: z.string().min(1).optional(), // display name (server display_name)
|
|
47
|
+
description: z.string().optional(), // shown on dashboard
|
|
48
|
+
version: z.string().optional(), // user-declared label; never auto-bumped
|
|
49
|
+
// Open enum by design: unknown frameworks get a did-you-mean warning at the
|
|
50
|
+
// consuming edge, never a validation error.
|
|
51
|
+
framework: z.string().min(1).optional(), // langgraph | claude-agent-sdk | openai-agents | …
|
|
52
|
+
});
|
|
53
|
+
export const manifestSchema = z.object({
|
|
54
|
+
// pome.json carries the editor pointer; pome.yaml uses a comment instead.
|
|
55
|
+
$schema: z.string().optional(),
|
|
56
|
+
agent: manifestAgentSchema,
|
|
57
|
+
command: z.string().min(1).optional(), // how the CLI launches the agent
|
|
58
|
+
twins: z.array(z.string().min(1)).min(1).optional(), // default twin set for runs
|
|
59
|
+
tasks: z.string().min(1).optional(), // task files directory (legacy name: scenarios)
|
|
60
|
+
artifacts_dir: z.string().min(1).default("runs"),
|
|
61
|
+
pass_threshold: z.number().int().min(0).max(100).default(100),
|
|
62
|
+
});
|
|
63
|
+
// The JSON Schema served at pome.sh/schemas/v1/pome.json (F-821) and resolved
|
|
64
|
+
// by editors via the manifest's `$schema` pointer. `io: "input"` emits the
|
|
65
|
+
// AUTHOR-side shape — run-config keys with defaults stay optional instead of
|
|
66
|
+
// being promoted to required by the parsed (output) view. Shared by the
|
|
67
|
+
// build-time emitter (scripts/emit-manifest-schema.mjs) and the snapshot test
|
|
68
|
+
// so the two can never disagree.
|
|
69
|
+
export function buildManifestJsonSchema() {
|
|
70
|
+
return {
|
|
71
|
+
$id: "https://pome.sh/schemas/v1/pome.json",
|
|
72
|
+
title: "Pome agent manifest (pome.json / pome.yaml)",
|
|
73
|
+
...z.toJSONSchema(manifestSchema, { io: "input" }),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=manifest.js.map
|
package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/manifest.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,2EAA2E;AAC3E,+EAA+E;AAC/E,6EAA6E;AAC7E,4EAA4E;AAC5E,qEAAqE;AACrE,EAAE;AACF,8EAA8E;AAC9E,8EAA8E;AAC9E,4EAA4E;AAC5E,+DAA+D;AAC/D,0EAA0E;AAC1E,sDAAsD;AAEtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8EAA8E;AAC9E,gFAAgF;AAChF,MAAM,CAAC,MAAM,OAAO,GAAG,4BAA4B,CAAC;AACpD,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAElC,yEAAyE;AACzE,8EAA8E;AAC9E,wEAAwE;AACxE,EAAE;AACF,8EAA8E;AAC9E,wEAAwE;AACxE,2EAA2E;AAC3E,8DAA8D;AAC9D,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,OAAO,KAAK;SACT,WAAW,EAAE;SACb,IAAI,EAAE;SACN,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;SACjB,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AACvB,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC;KAC7B,MAAM,EAAE;KACR,GAAG,CAAC,eAAe,CAAC;KACpB,KAAK,CAAC,OAAO,EAAE,yEAAyE,CAAC,CAAC;AAE7F,6EAA6E;AAC7E,qEAAqE;AACrE,8EAA8E;AAC9E,8EAA8E;AAC9E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAW,qCAAqC;IAClF,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAW,qBAAqB;IAClE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAe,yCAAyC;IACtF,4EAA4E;IAC5E,4CAA4C;IAC5C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAM,mDAAmD;CACjG,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,0EAA0E;IAC1E,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,KAAK,EAAE,mBAAmB;IAC1B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAQ,iCAAiC;IAC9E,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,4BAA4B;IACjF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAU,gDAAgD;IAC7F,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IAChD,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;CAC9D,CAAC,CAAC;AAMH,8EAA8E;AAC9E,2EAA2E;AAC3E,6EAA6E;AAC7E,wEAAwE;AACxE,8EAA8E;AAC9E,iCAAiC;AACjC,MAAM,UAAU,uBAAuB;IACrC,OAAO;QACL,GAAG,EAAE,sCAAsC;QAC3C,KAAK,EAAE,6CAA6C;QACpD,GAAG,CAAC,CAAC,YAAY,CAAC,cAAc,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC;KACnD,CAAC;AACJ,CAAC"}
|