@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
package/dist/src/cli/main.js
CHANGED
|
@@ -7,8 +7,8 @@ import { basename, dirname, join, relative, resolve } from "node:path";
|
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
import { readLatestRun, readMetaSummary, } from "../recorder/artifacts.js";
|
|
9
9
|
import { LEGACY_EVENTS_MESSAGE, computeTraceHealth, readEventsJsonl, renderEvents, renderTraceHealth, } from "../recorder/inspect.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { runTask } from "../runner/runTask.js";
|
|
11
|
+
import { runTaskHosted } from "../runner/runTaskHosted.js";
|
|
12
12
|
import { effectiveTrialCount, parseTrialsFlag } from "../runner/trialCount.js";
|
|
13
13
|
import { runScoreLine, scoreStatus } from "../hosted/evalResultView.js";
|
|
14
14
|
import { HostedUsageError, exitCodeFor } from "../hosted/errors.js";
|
|
@@ -16,10 +16,10 @@ import { resolveCredentials, clearLocalCredentials } from "./credentials.js";
|
|
|
16
16
|
import { loginWithClerk } from "./login.js";
|
|
17
17
|
import { runDocsCommand } from "./docs.js";
|
|
18
18
|
import { runCompileSeeds } from "./compile-seeds.js";
|
|
19
|
-
import {
|
|
19
|
+
import { runTasksCommand } from "./tasks.js";
|
|
20
20
|
import { runEvalCommand } from "./eval.js";
|
|
21
21
|
import { copyAnnounceLine, ensureDefaultTask, runYoursFrameLines, trialsPinFallbackLine, } from "./default-task.js";
|
|
22
|
-
import { findTwin,
|
|
22
|
+
import { findTwin, runnableTasks, } from "./tasks-catalog.js";
|
|
23
23
|
import { friendlyHostedError, runSessionCreate, runSessionList, runSessionStop, } from "./session.js";
|
|
24
24
|
import { normalizeRegisterTwins, runRegisterAgent } from "./register.js";
|
|
25
25
|
import { resolvePackageRoot } from "./resolve-package-root.js";
|
|
@@ -30,10 +30,11 @@ import { MANIFEST_JSON, readManifest, writeManifest, } from "./project-config.js
|
|
|
30
30
|
import { createGitHubCloneApp } from "../twin/githubCloneAdapter.js";
|
|
31
31
|
import { buildFixPrompt, buildGroupFixPrompt, } from "../fix-prompt/index.js";
|
|
32
32
|
import { discoverRunSet, loadTrialEvents, } from "../hosted/evalResultCache.js";
|
|
33
|
-
import {
|
|
33
|
+
import { parseTaskFile } from "../task/parseTask.js";
|
|
34
34
|
const PACKAGE_VERSION = readPackageVersion();
|
|
35
35
|
const SESSION_CREATE_FORMATS = new Set(["text", "json", "env"]);
|
|
36
|
-
const
|
|
36
|
+
const DEFAULT_AGENT_FILE = "examples/agents/scripted-triage-agent.ts";
|
|
37
|
+
const DEFAULT_AGENT_COMMAND = `npx tsx ${DEFAULT_AGENT_FILE}`;
|
|
37
38
|
const MANIFEST_SCHEMA_URL = "https://pome.sh/schemas/v1/pome.json";
|
|
38
39
|
function readPackageVersion() {
|
|
39
40
|
try {
|
|
@@ -67,6 +68,8 @@ export function createProgram() {
|
|
|
67
68
|
.command("init")
|
|
68
69
|
.description("Create starter Pome config and folders")
|
|
69
70
|
.option("--sdk <name>", "Scaffold for a specific agent SDK (claude | claude-managed). Adds the SDK-specific example file and pre-fills agent.framework so the dashboard badges runs correctly.")
|
|
71
|
+
.option("--bare", "Write only the manifest — skip the starter task library and sample agents. Auto-selected when the current directory already has a package.json (the bring-your-own-agent case).")
|
|
72
|
+
.option("--starter", "Force the full starter library even in an existing project.")
|
|
70
73
|
.action(async (opts) => {
|
|
71
74
|
const sdk = opts.sdk?.trim();
|
|
72
75
|
if (sdk !== undefined &&
|
|
@@ -81,23 +84,54 @@ export function createProgram() {
|
|
|
81
84
|
process.exitCode = 2;
|
|
82
85
|
return;
|
|
83
86
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
if (opts.bare && opts.starter) {
|
|
88
|
+
console.error("Pass at most one of --bare / --starter.");
|
|
89
|
+
process.exitCode = 2;
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
// F-904 — a directory that already has a package.json is the "bring your
|
|
93
|
+
// own agent" case: scaffold only the manifest, never the starter library
|
|
94
|
+
// (a 2026-07-24 cold walk dumped 28 untracked files into a real project).
|
|
95
|
+
// --starter / --bare override the auto-decision in either direction.
|
|
96
|
+
const looksLikeExistingProject = existsSync(join(process.cwd(), "package.json"));
|
|
97
|
+
const bare = opts.starter
|
|
98
|
+
? false
|
|
99
|
+
: Boolean(opts.bare) || looksLikeExistingProject;
|
|
100
|
+
if (!bare) {
|
|
101
|
+
await mkdir("tasks", { recursive: true });
|
|
102
|
+
await mkdir("examples/agents", { recursive: true });
|
|
103
|
+
await mkdir("runs", { recursive: true });
|
|
104
|
+
await copyStarterFiles();
|
|
105
|
+
}
|
|
106
|
+
// Bare mode omits `command`: the BYO user launches their own agent, so a
|
|
107
|
+
// default pointer at an unscaffolded examples/agents/... file would be a
|
|
108
|
+
// broken instruction. --sdk still writes a real file and sets command.
|
|
109
|
+
let command = bare ? undefined : DEFAULT_AGENT_COMMAND;
|
|
89
110
|
let framework;
|
|
90
|
-
let postInitMessage =
|
|
91
|
-
"
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
111
|
+
let postInitMessage = bare
|
|
112
|
+
? "Pome initialized (existing project — starter library skipped).\n" +
|
|
113
|
+
"Next steps:\n" +
|
|
114
|
+
' 1. Set "command" in pome.json to your agent\'s launch command\n' +
|
|
115
|
+
" 2. pome login # one-time, opens the dashboard to sign in\n" +
|
|
116
|
+
" 3. pome register agent <name> # scopes runs to this project (writes agent.slug to pome.json)\n" +
|
|
117
|
+
" 4. pome run <your-task>.md\n" +
|
|
118
|
+
"\n" +
|
|
119
|
+
"Optional follow-ups:\n" +
|
|
120
|
+
" - pome tasks github --copy # drop the starter task library into tasks/\n" +
|
|
121
|
+
" - pome init --sdk claude # scaffold a Claude Agent SDK starter\n" +
|
|
122
|
+
"\n" +
|
|
123
|
+
"See `pome docs getting-started` for a narrative walkthrough."
|
|
124
|
+
: "Pome initialized.\n" +
|
|
125
|
+
"Next steps:\n" +
|
|
126
|
+
" 1. pome login # one-time, opens the dashboard to sign in\n" +
|
|
127
|
+
" 2. pome register agent <name> # scopes runs to this project (writes agent.slug to pome.json)\n" +
|
|
128
|
+
" 3. pome run tasks/01-bug-happy-path.md\n" +
|
|
129
|
+
"\n" +
|
|
130
|
+
"Optional follow-ups:\n" +
|
|
131
|
+
" - pome init --sdk claude # scaffold a Claude Agent SDK starter\n" +
|
|
132
|
+
" - pome tasks stripe --copy # add Stripe payment tasks when needed\n" +
|
|
133
|
+
"\n" +
|
|
134
|
+
"See `pome docs getting-started` for a narrative walkthrough.";
|
|
101
135
|
if (sdk) {
|
|
102
136
|
const scaffold = await writeSdkScaffold(sdk);
|
|
103
137
|
command = scaffold.agentCommand;
|
|
@@ -106,6 +140,10 @@ export function createProgram() {
|
|
|
106
140
|
`Pome initialized with --sdk ${sdk}. Scaffolded ${scaffold.exampleAgentRelativePath}.\n` +
|
|
107
141
|
scaffold.postInstallHint;
|
|
108
142
|
}
|
|
143
|
+
// Point the manifest at an existing task directory so bare `pome run`
|
|
144
|
+
// (F-865) resolves it. The starter path always creates tasks/; bare mode
|
|
145
|
+
// only claims it when the user already keeps their tasks there.
|
|
146
|
+
const tasksDir = !bare || (await hasMarkdownTasks("tasks")) ? "tasks" : undefined;
|
|
109
147
|
// The manifest requires `agent.slug` (F-804). `pome init` runs before
|
|
110
148
|
// `pome register`, so seed a portable slug derived from the directory
|
|
111
149
|
// name; register later overwrites it with the server-canonical slug.
|
|
@@ -115,13 +153,17 @@ export function createProgram() {
|
|
|
115
153
|
const agent = { slug };
|
|
116
154
|
if (framework)
|
|
117
155
|
agent.framework = framework;
|
|
118
|
-
|
|
156
|
+
const manifest = {
|
|
119
157
|
$schema: MANIFEST_SCHEMA_URL,
|
|
120
158
|
agent,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
159
|
+
};
|
|
160
|
+
if (command)
|
|
161
|
+
manifest.command = command;
|
|
162
|
+
if (tasksDir)
|
|
163
|
+
manifest.tasks = tasksDir;
|
|
164
|
+
manifest.artifacts_dir = "runs";
|
|
165
|
+
manifest.pass_threshold = 100;
|
|
166
|
+
await writeManifest(join(process.cwd(), MANIFEST_JSON), "json", manifest);
|
|
125
167
|
}
|
|
126
168
|
else if (sdk) {
|
|
127
169
|
const priorAgent = typeof existing.raw.agent === "object" && existing.raw.agent !== null
|
|
@@ -177,23 +219,35 @@ export function createProgram() {
|
|
|
177
219
|
.action(async (topic, opts) => {
|
|
178
220
|
await runDocsCommand(topic, { site: opts.site, urlOnly: Boolean(opts.url) });
|
|
179
221
|
});
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
222
|
+
const registerTasksCommand = (name, hidden) => {
|
|
223
|
+
const cmd = program
|
|
224
|
+
.command(name, { hidden })
|
|
225
|
+
.argument("[twin]", "Twin id (e.g. github). Omit to list available twins.")
|
|
226
|
+
.option("--copy", "Copy the twin's runnable tasks into the local project.", false)
|
|
227
|
+
.option("--force", "With --copy, overwrite existing files in the destination.", false)
|
|
228
|
+
.option("--dest <dir>", "With --copy, write into this directory instead of ./tasks/.")
|
|
229
|
+
.description("Browse the bundled task library (or copy a twin's tasks into the local project)")
|
|
230
|
+
.action(async (twin, opts) => {
|
|
231
|
+
// F-892 — `pome scenarios` was renamed to `pome tasks`. The old name
|
|
232
|
+
// stays as a hidden, still-working alias with a one-line pointer so
|
|
233
|
+
// existing muscle memory / scripts don't break; help only shows
|
|
234
|
+
// `pome tasks`.
|
|
235
|
+
if (hidden) {
|
|
236
|
+
console.error("`pome scenarios` was renamed to `pome tasks` — running it for you. Update your scripts; the old name will be removed in a future release.");
|
|
237
|
+
}
|
|
238
|
+
await runTasksCommand(twin, {
|
|
239
|
+
copy: opts.copy,
|
|
240
|
+
force: opts.force,
|
|
241
|
+
dest: opts.dest,
|
|
242
|
+
});
|
|
192
243
|
});
|
|
193
|
-
|
|
244
|
+
return cmd;
|
|
245
|
+
};
|
|
246
|
+
registerTasksCommand("tasks", false);
|
|
247
|
+
registerTasksCommand("scenarios", true);
|
|
194
248
|
program
|
|
195
249
|
.command("compile-seeds")
|
|
196
|
-
.argument("[target]", "Task .md file or directory (defaults to ./
|
|
250
|
+
.argument("[target]", "Task .md file or directory (defaults to ./tasks)")
|
|
197
251
|
.option("--force", "Recompile even if the sidecar's source hash matches", false)
|
|
198
252
|
.option("--hosted", "Compile via the Pome control plane instead of calling Anthropic directly (uses your Pome API key; no ANTHROPIC_API_KEY needed)", false)
|
|
199
253
|
.option("--api-url <url>", "Control-plane base URL (only relevant with --hosted).", process.env.POME_API_URL ?? DEFAULT_CONTROL_PLANE_URL)
|
|
@@ -224,6 +278,7 @@ export function createProgram() {
|
|
|
224
278
|
try {
|
|
225
279
|
await runRegisterAgent({
|
|
226
280
|
apiBaseUrl: opts.apiUrl,
|
|
281
|
+
dashboardBaseUrl: process.env.POME_DASHBOARD_URL ?? DEFAULT_DASHBOARD_URL,
|
|
227
282
|
name,
|
|
228
283
|
force: opts.force,
|
|
229
284
|
twins: normalizeRegisterTwins(opts.twins),
|
|
@@ -316,7 +371,7 @@ export function createProgram() {
|
|
|
316
371
|
});
|
|
317
372
|
program
|
|
318
373
|
.command("run")
|
|
319
|
-
.argument("[path]", 'Task markdown file or directory. Omit to run the demo task ("that was ours, run yours"):
|
|
374
|
+
.argument("[path]", 'Task markdown file or directory. Omit to run the demo task ("that was ours, run yours"): tasks/first-run-demo.md is dropped into your project on first use with runs: 5 pinned.')
|
|
320
375
|
.option("--agent <command>", "Agent command to run")
|
|
321
376
|
.option("-n, --trials <count>", "FDRS-636: run <count> isolated trials of the task as ONE trial group (integer 1-20; hosted only). " +
|
|
322
377
|
"Default is the task config's `runs` field (capped at 20). k>1 mints sessions with a shared group id up to your " +
|
|
@@ -334,7 +389,7 @@ export function createProgram() {
|
|
|
334
389
|
.option("--agent-version <version>", "Override the manifest's agent.version for this run (stamped on the session/run).")
|
|
335
390
|
.option("--no-capture", "Self-host only: skip spawning the capture-server child and don't inject HTTP_PROXY/HTTPS_PROXY into the agent. Used by the CI overhead gate (FDRS-405) to baseline proxy-on-vs-off latency. No-op on hosted runs.")
|
|
336
391
|
.option("--local", "Self-host: run against an in-process twin and CAPTURE a raw trace only (an audit log — no score, no verdict, no judge). A verdict comes from the cloud: run `pome eval <run-dir>` on the captured trace, or `pome login` and run against Pome cloud.")
|
|
337
|
-
.description('Run one or more Pome tasks. With no path, runs the demo task (
|
|
392
|
+
.description('Run one or more Pome tasks. With no path, runs the demo task (tasks/first-run-demo.md, copied into your project on first use — "that was ours, run yours"). Refuses to start if the doctor wiring checks fail (see `pome doctor`); there is no --force.')
|
|
338
393
|
.action(async (target, options) => {
|
|
339
394
|
// F0-5 — `pome run`'s pre-flight (resolving files, reading config,
|
|
340
395
|
// resolving credentials) used to propagate plain `Error`s to
|
|
@@ -357,31 +412,50 @@ export function createProgram() {
|
|
|
357
412
|
return;
|
|
358
413
|
}
|
|
359
414
|
}
|
|
360
|
-
//
|
|
361
|
-
//
|
|
362
|
-
|
|
363
|
-
//
|
|
364
|
-
//
|
|
415
|
+
// Read the manifest once — both bare-run task resolution (F-865) and
|
|
416
|
+
// the agent command below consume it.
|
|
417
|
+
const manifestRead = await readManifest(process.cwd()).catch(() => null);
|
|
418
|
+
// FDRS-645 / F-865 — bare `pome run` (no path) resolves its default:
|
|
419
|
+
// - a MIGRATED project (manifest with a `tasks` key) runs that whole
|
|
420
|
+
// declared directory, exactly like `pome run <that-dir>`: no demo
|
|
421
|
+
// drop, no "run yours" frame, each file at its own `runs`/-n;
|
|
422
|
+
// - an UN-MIGRATED project (no manifest / no `tasks` key) keeps the
|
|
423
|
+
// "run yours" demo default — a user-visible copy at
|
|
424
|
+
// tasks/first-run-demo.md (dropped on first use; its Config pins
|
|
425
|
+
// runs: 5 so an explicit -n still wins). The moment-05 frame prints
|
|
426
|
+
// later, once the doctor + credential gates have passed.
|
|
365
427
|
let defaultTask = null;
|
|
428
|
+
let bareViaManifestTasks = false;
|
|
366
429
|
if (target === undefined) {
|
|
367
|
-
|
|
368
|
-
|
|
430
|
+
const declaredTasks = manifestRead?.manifest.tasks;
|
|
431
|
+
if (manifestRead && declaredTasks) {
|
|
432
|
+
// Resolve the declared dir relative to the manifest, not cwd — the
|
|
433
|
+
// manifest can be discovered up-tree. A declared-but-missing dir
|
|
434
|
+
// surfaces as taskFiles' usage error below (exit 5); we never
|
|
435
|
+
// silently fall back to the demo drop once intent is declared.
|
|
436
|
+
target = resolve(dirname(manifestRead.path), declaredTasks);
|
|
437
|
+
bareViaManifestTasks = true;
|
|
369
438
|
}
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
439
|
+
else {
|
|
440
|
+
try {
|
|
441
|
+
defaultTask = await ensureDefaultTask();
|
|
442
|
+
}
|
|
443
|
+
catch (err) {
|
|
444
|
+
console.error(err instanceof Error ? err.message : String(err));
|
|
445
|
+
process.exitCode = exitCodeFor(err);
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
if (defaultTask.copied)
|
|
449
|
+
console.error(copyAnnounceLine(defaultTask));
|
|
450
|
+
if (!defaultTask.trialsApplied)
|
|
451
|
+
console.error(trialsPinFallbackLine());
|
|
452
|
+
target = defaultTask.path;
|
|
374
453
|
}
|
|
375
|
-
if (defaultTask.copied)
|
|
376
|
-
console.error(copyAnnounceLine(defaultTask));
|
|
377
|
-
if (!defaultTask.trialsApplied)
|
|
378
|
-
console.error(trialsPinFallbackLine());
|
|
379
|
-
target = defaultTask.path;
|
|
380
454
|
}
|
|
381
455
|
let files;
|
|
382
456
|
let hostedCreds;
|
|
383
457
|
try {
|
|
384
|
-
files = await
|
|
458
|
+
files = await taskFiles(target);
|
|
385
459
|
}
|
|
386
460
|
catch (err) {
|
|
387
461
|
const code = exitCodeFor(err);
|
|
@@ -389,9 +463,31 @@ export function createProgram() {
|
|
|
389
463
|
process.exitCode = code;
|
|
390
464
|
return;
|
|
391
465
|
}
|
|
392
|
-
|
|
466
|
+
// F-865 — make a manifest-driven bare run legible: name where the set
|
|
467
|
+
// came from, and never let an empty declared dir no-op silently.
|
|
468
|
+
if (bareViaManifestTasks) {
|
|
469
|
+
const manifestFile = basename(manifestRead.path);
|
|
470
|
+
const declared = manifestRead.manifest.tasks;
|
|
471
|
+
if (files.length === 0) {
|
|
472
|
+
console.error(`no task .md files found in ${declared}/ (declared in ${manifestFile}) — add tasks or copy some with \`pome tasks <twin> --copy\`.`);
|
|
473
|
+
}
|
|
474
|
+
else {
|
|
475
|
+
console.error(`resolved ${files.length} task(s) from ${manifestFile} (tasks: "${declared}")`);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
393
478
|
const configCommand = manifestRead?.manifest.command;
|
|
394
|
-
const
|
|
479
|
+
const resolvedCommand = options.agent ?? configCommand;
|
|
480
|
+
// Bare `pome init` (existing project) writes no `command`. Don't
|
|
481
|
+
// silently fall back to the starter scaffold it never created — a
|
|
482
|
+
// spawn of a missing file gives a cryptic error. Use the default only
|
|
483
|
+
// when that file actually exists; otherwise fail with guidance.
|
|
484
|
+
if (resolvedCommand === undefined && !existsSync(DEFAULT_AGENT_FILE)) {
|
|
485
|
+
console.error('No agent command configured. Set "command" in pome.json to your ' +
|
|
486
|
+
'agent\'s launch command, or pass --agent "<command>".');
|
|
487
|
+
process.exitCode = 2;
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
const agentCommand = resolvedCommand ?? DEFAULT_AGENT_COMMAND;
|
|
395
491
|
let worstExit = 0;
|
|
396
492
|
// Hosted is the default. Self-host runs against an in-process twin via
|
|
397
493
|
// `--local` (documented) or POME_LOCAL=1 (an internal escape hatch).
|
|
@@ -466,8 +562,8 @@ export function createProgram() {
|
|
|
466
562
|
// config's `runs` field (both capped at 20). k>1 takes the
|
|
467
563
|
// trial-group path; k=1 stays EXACTLY the single-run path
|
|
468
564
|
// below (no group is ever stamped for it).
|
|
469
|
-
const
|
|
470
|
-
const k = effectiveTrialCount(trialsFlag,
|
|
565
|
+
const taskForRuns = await parseTaskFile(file);
|
|
566
|
+
const k = effectiveTrialCount(trialsFlag, taskForRuns.config.runs);
|
|
471
567
|
if (k > 1) {
|
|
472
568
|
const { runTrialGroup } = await import("../runner/runTrialGroup.js");
|
|
473
569
|
// FDRS-644 — the literal re-run command the fix handoff
|
|
@@ -482,7 +578,7 @@ export function createProgram() {
|
|
|
482
578
|
? fileForRerun
|
|
483
579
|
: file} -n ${k}`;
|
|
484
580
|
const groupResult = await runTrialGroup({
|
|
485
|
-
|
|
581
|
+
taskPath: file,
|
|
486
582
|
agentCommand,
|
|
487
583
|
agentCommandSource: options.agent
|
|
488
584
|
? "--agent"
|
|
@@ -505,8 +601,8 @@ export function createProgram() {
|
|
|
505
601
|
}
|
|
506
602
|
continue;
|
|
507
603
|
}
|
|
508
|
-
const result = await
|
|
509
|
-
|
|
604
|
+
const result = await runTaskHosted({
|
|
605
|
+
taskPath: file,
|
|
510
606
|
agentCommand,
|
|
511
607
|
artifactsDir: options.artifactsDir,
|
|
512
608
|
hosted: { baseUrl: hostedCreds.apiBaseUrl, apiKey: hostedCreds.apiKey },
|
|
@@ -535,8 +631,8 @@ export function createProgram() {
|
|
|
535
631
|
// no score, no verdict, no judge. Let exceptions (file-not-found,
|
|
536
632
|
// parse errors, agent failures) propagate to Commander's top-level
|
|
537
633
|
// handler.
|
|
538
|
-
const result = await
|
|
539
|
-
|
|
634
|
+
const result = await runTask({
|
|
635
|
+
taskPath: file,
|
|
540
636
|
agentCommand,
|
|
541
637
|
artifactsDir: options.artifactsDir,
|
|
542
638
|
// Commander negates --no-* flags: `--no-capture` → `capture: false`.
|
|
@@ -589,7 +685,7 @@ export function createProgram() {
|
|
|
589
685
|
});
|
|
590
686
|
// Hidden: the bundled demo agent `pome demo` spawns as its trial child
|
|
591
687
|
// through the real capture path (FDRS-643). Reads the POME_* env contract
|
|
592
|
-
// injected by
|
|
688
|
+
// injected by runTask plus POME_DEMO_* gateway coordinates.
|
|
593
689
|
program
|
|
594
690
|
.command("demo-agent", { hidden: true })
|
|
595
691
|
.description("Internal: the bundled demo agent process (spawned by `pome demo`).")
|
|
@@ -601,12 +697,12 @@ export function createProgram() {
|
|
|
601
697
|
});
|
|
602
698
|
program
|
|
603
699
|
.command("doctor")
|
|
604
|
-
.description("Check the agent↔twin wiring: pome.json (or pome.yaml) present + valid, twin
|
|
700
|
+
.description("Check the agent↔twin wiring: pome.json (or pome.yaml) present + valid, the local twin boots + serves, requests routed to the twin (not a hardcoded production host), egress floor active. On failure prints one named cause (file:line where knowable) + one concrete fix and exits non-zero.")
|
|
605
701
|
.action(async () => {
|
|
606
702
|
const { runDoctorChecks } = await import("../doctor/checks.js");
|
|
607
703
|
const { renderDoctorReport } = await import("../doctor/render.js");
|
|
608
704
|
const report = await runDoctorChecks();
|
|
609
|
-
for (const line of renderDoctorReport(report))
|
|
705
|
+
for (const line of renderDoctorReport(report, { passNote: true }))
|
|
610
706
|
console.error(line);
|
|
611
707
|
if (!report.ok)
|
|
612
708
|
process.exitCode = 1;
|
|
@@ -655,7 +751,7 @@ export function createProgram() {
|
|
|
655
751
|
else {
|
|
656
752
|
const health = computeTraceHealth({
|
|
657
753
|
events: eventsResult.events,
|
|
658
|
-
|
|
754
|
+
taskUsesTwin: meta.twins.length > 0,
|
|
659
755
|
});
|
|
660
756
|
for (const line of renderTraceHealth(health))
|
|
661
757
|
console.log(line);
|
|
@@ -672,18 +768,18 @@ export function createProgram() {
|
|
|
672
768
|
.argument("[target]", "Artifacts root or a trial run dir (default: runs). Legacy form: a path to events.jsonl — then <task> is required.")
|
|
673
769
|
.argument("[task]", "Path to the task .md file (only with an events.jsonl target)")
|
|
674
770
|
.description("Assemble a paste-into-IDE fix prompt (no LLM call, no network). With no args, reads the latest FAILED run set under ./runs: the persisted cloud verdicts (verdict.json) become grouped failure signatures over the raw traces, in one prompt. Point it at a trial run dir to target that set, or use the legacy `<events.jsonl> <task.md>` form for a single trace.")
|
|
675
|
-
.action(async (target,
|
|
771
|
+
.action(async (target, taskArg) => {
|
|
676
772
|
// Legacy 2-arg form: <events.jsonl> <scenario.md> — unchanged
|
|
677
773
|
// (CAPTURE-ONLY, FDRS-657: raw trace + declared criteria, no verdict).
|
|
678
774
|
if (target !== undefined && target.endsWith(".jsonl")) {
|
|
679
|
-
if (!
|
|
775
|
+
if (!taskArg) {
|
|
680
776
|
console.error("The events.jsonl form needs the task file: pome fix-prompt <events.jsonl> <task.md>");
|
|
681
777
|
process.exitCode = 5;
|
|
682
778
|
return;
|
|
683
779
|
}
|
|
684
780
|
const [eventsRaw, scenario] = await Promise.all([
|
|
685
781
|
readFile(resolve(target), "utf8"),
|
|
686
|
-
|
|
782
|
+
parseTaskFile(resolve(taskArg)),
|
|
687
783
|
]);
|
|
688
784
|
const events = eventsRaw
|
|
689
785
|
.split("\n")
|
|
@@ -693,7 +789,7 @@ export function createProgram() {
|
|
|
693
789
|
console.log(buildFixPrompt({ events, scenario }));
|
|
694
790
|
return;
|
|
695
791
|
}
|
|
696
|
-
if (
|
|
792
|
+
if (taskArg !== undefined) {
|
|
697
793
|
console.error("The second argument only applies to the events.jsonl form: pome fix-prompt <events.jsonl> <task.md>");
|
|
698
794
|
process.exitCode = 5;
|
|
699
795
|
return;
|
|
@@ -716,7 +812,7 @@ export function createProgram() {
|
|
|
716
812
|
const set = discovery.set;
|
|
717
813
|
let scenario = null;
|
|
718
814
|
try {
|
|
719
|
-
scenario = await
|
|
815
|
+
scenario = await parseTaskFile(resolve(set.taskPath));
|
|
720
816
|
}
|
|
721
817
|
catch {
|
|
722
818
|
// Task file moved/edited since the run — the prompt degrades to the
|
|
@@ -877,7 +973,7 @@ const SUPPORTED_GMAIL_ENDPOINTS = [
|
|
|
877
973
|
"GET /gmail/v1/users/:userId/settings/sendAs/:email",
|
|
878
974
|
"POST /upload/gmail/v1/users/:userId/{messages,drafts} (media|multipart)",
|
|
879
975
|
];
|
|
880
|
-
async function
|
|
976
|
+
async function taskFiles(target) {
|
|
881
977
|
const resolved = resolve(target);
|
|
882
978
|
// F0-5a — surface bad-input paths as `HostedUsageError` so the top-level
|
|
883
979
|
// exit-code mapper returns the documented exit 5 ("usage error") instead
|
|
@@ -895,12 +991,27 @@ async function scenarioFiles(target) {
|
|
|
895
991
|
.sort()
|
|
896
992
|
.map((entry) => join(resolved, entry));
|
|
897
993
|
}
|
|
994
|
+
// F-904 — does the cwd already carry a task directory worth recording in the
|
|
995
|
+
// manifest? A directory named `dir` counts only when it holds at least one
|
|
996
|
+
// `.md` (an empty scaffold dir is not a task set).
|
|
997
|
+
async function hasMarkdownTasks(dir) {
|
|
998
|
+
const abs = join(process.cwd(), dir);
|
|
999
|
+
if (!existsSync(abs))
|
|
1000
|
+
return false;
|
|
1001
|
+
try {
|
|
1002
|
+
const entries = await readdir(abs);
|
|
1003
|
+
return entries.some((f) => f.toLowerCase().endsWith(".md"));
|
|
1004
|
+
}
|
|
1005
|
+
catch {
|
|
1006
|
+
return false;
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
898
1009
|
async function copyStarterFiles() {
|
|
899
1010
|
const packageRoot = resolvePackageRoot(import.meta.url);
|
|
900
1011
|
if (!packageRoot)
|
|
901
1012
|
return;
|
|
902
1013
|
await Promise.all([
|
|
903
|
-
|
|
1014
|
+
copyStarterTasks(packageRoot),
|
|
904
1015
|
copyIfPresent(join(packageRoot, "examples", "agents"), join("examples", "agents")),
|
|
905
1016
|
]);
|
|
906
1017
|
}
|
|
@@ -913,20 +1024,20 @@ async function copyIfPresent(source, target) {
|
|
|
913
1024
|
errorOnExist: false,
|
|
914
1025
|
});
|
|
915
1026
|
}
|
|
916
|
-
async function
|
|
917
|
-
const
|
|
918
|
-
if (!existsSync(
|
|
1027
|
+
async function copyStarterTasks(packageRoot) {
|
|
1028
|
+
const taskDir = join(packageRoot, "tasks");
|
|
1029
|
+
if (!existsSync(taskDir))
|
|
919
1030
|
return;
|
|
920
1031
|
const starterTwin = findTwin("github");
|
|
921
|
-
const
|
|
922
|
-
?
|
|
1032
|
+
const starterTasks = starterTwin
|
|
1033
|
+
? runnableTasks(starterTwin).map((t) => t.filename)
|
|
923
1034
|
: [];
|
|
924
|
-
await mkdir("
|
|
925
|
-
await Promise.all(
|
|
1035
|
+
await mkdir("tasks", { recursive: true });
|
|
1036
|
+
await Promise.all(starterTasks.flatMap((file) => {
|
|
926
1037
|
const sidecar = file.replace(/\.md$/i, ".seed.json");
|
|
927
1038
|
return [
|
|
928
|
-
copyIfPresent(join(
|
|
929
|
-
copyIfPresent(join(
|
|
1039
|
+
copyIfPresent(join(taskDir, file), join("tasks", file)),
|
|
1040
|
+
copyIfPresent(join(taskDir, sidecar), join("tasks", sidecar)),
|
|
930
1041
|
];
|
|
931
1042
|
}));
|
|
932
1043
|
}
|
|
@@ -2,6 +2,10 @@ import { type InteractiveSeams } from "./agent-resolver.js";
|
|
|
2
2
|
import { friendlyHostedError } from "./session.js";
|
|
3
3
|
interface RegisterAgentOptions extends InteractiveSeams {
|
|
4
4
|
apiBaseUrl: string;
|
|
5
|
+
/** Dashboard base for the post-register deep link (POME_DASHBOARD_URL /
|
|
6
|
+
* DEFAULT_DASHBOARD_URL — resolved at the main.ts boundary, like the runner's
|
|
7
|
+
* reliability-page handoff). */
|
|
8
|
+
dashboardBaseUrl: string;
|
|
5
9
|
name: string;
|
|
6
10
|
force: boolean;
|
|
7
11
|
twins?: string[];
|
package/dist/src/cli/register.js
CHANGED
|
@@ -159,6 +159,11 @@ export async function runRegisterAgent(opts) {
|
|
|
159
159
|
else if (opts.twins && opts.twins.length > 0) {
|
|
160
160
|
console.error("Enabled services: not reported by this pome cloud (older control plane) — twin scoping may not have taken effect.");
|
|
161
161
|
}
|
|
162
|
+
// Deep-link the registered agent's dashboard page. `/agents/<slug>` is the
|
|
163
|
+
// same IA the runner's reliability handoff relies on (/agents/<slug>/tasks/…),
|
|
164
|
+
// so this lands on the agent, not a generic root.
|
|
165
|
+
const base = opts.dashboardBaseUrl.replace(/\/$/, "");
|
|
166
|
+
console.error(`Dashboard: ${base}/agents/${encodeURIComponent(agent.slug)}`);
|
|
162
167
|
}
|
|
163
168
|
function stripControlCharacters(value) {
|
|
164
169
|
return value.replace(/[\u0000-\u001f\u007f]/g, "");
|
package/dist/src/cli/session.js
CHANGED
|
@@ -129,7 +129,7 @@ export async function runSessionCreate(opts) {
|
|
|
129
129
|
});
|
|
130
130
|
const session = await client.createSession({
|
|
131
131
|
twins,
|
|
132
|
-
|
|
132
|
+
taskSource: "# ..\n",
|
|
133
133
|
idempotencyKey: randomUUID(),
|
|
134
134
|
agentId: identity.agentId,
|
|
135
135
|
agentVersion: identity.agentVersion,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Catalog of tasks bundled with the CLI, grouped by twin.
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for `pome tasks` (browse + copy). `pome init`
|
|
5
|
+
* uses the GitHub twin entries from this catalog as its starter scaffold while
|
|
6
|
+
* Stripe/Slack tasks remain opt-in via `pome tasks <twin> --copy`.
|
|
7
|
+
*
|
|
8
|
+
* `runnable: false` marks a seed-only reference document (not a task
|
|
9
|
+
* to execute) — copy commands skip these.
|
|
10
|
+
*/
|
|
11
|
+
export interface CatalogTask {
|
|
12
|
+
filename: string;
|
|
13
|
+
title: string;
|
|
14
|
+
summary: string;
|
|
15
|
+
runnable: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface TaskTwin {
|
|
18
|
+
id: string;
|
|
19
|
+
label: string;
|
|
20
|
+
description: string;
|
|
21
|
+
tasks: CatalogTask[];
|
|
22
|
+
}
|
|
23
|
+
export declare const TASK_TWINS: TaskTwin[];
|
|
24
|
+
export declare function findTwin(id: string): TaskTwin | null;
|
|
25
|
+
export declare function runnableTasks(twin: TaskTwin): CatalogTask[];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const TASK_TWINS = [
|
|
2
2
|
{
|
|
3
3
|
id: "github",
|
|
4
4
|
label: "GitHub twin",
|
|
5
5
|
description: "Issue triage, labeling, PR review, and identity checks against a deterministic GitHub clone.",
|
|
6
|
-
|
|
6
|
+
tasks: [
|
|
7
7
|
{
|
|
8
8
|
filename: "00-default-seed.md",
|
|
9
9
|
title: "Default seed (reference)",
|
|
@@ -82,7 +82,7 @@ export const SCENARIO_TWINS = [
|
|
|
82
82
|
id: "stripe",
|
|
83
83
|
label: "Stripe twin",
|
|
84
84
|
description: "Payments, refunds, events, and x402 flows against a deterministic Stripe clone.",
|
|
85
|
-
|
|
85
|
+
tasks: [
|
|
86
86
|
{
|
|
87
87
|
filename: "10-stripe-create-payment-intent.md",
|
|
88
88
|
title: "Create PaymentIntent",
|
|
@@ -125,7 +125,7 @@ export const SCENARIO_TWINS = [
|
|
|
125
125
|
id: "slack",
|
|
126
126
|
label: "Slack twin",
|
|
127
127
|
description: "Channel summaries, DLP, and injection resistance against a deterministic Slack clone.",
|
|
128
|
-
|
|
128
|
+
tasks: [
|
|
129
129
|
{
|
|
130
130
|
filename: "20-slack-exfiltration.md",
|
|
131
131
|
title: "Secret exfiltration",
|
|
@@ -144,7 +144,7 @@ export const SCENARIO_TWINS = [
|
|
|
144
144
|
id: "gmail",
|
|
145
145
|
label: "Gmail twin",
|
|
146
146
|
description: "Inbox triage, drafting, search, and label workflows against a deterministic Gmail clone.",
|
|
147
|
-
|
|
147
|
+
tasks: [
|
|
148
148
|
{
|
|
149
149
|
filename: "22-gmail-inbox-triage.md",
|
|
150
150
|
title: "Gmail inbox triage",
|
|
@@ -169,7 +169,7 @@ export const SCENARIO_TWINS = [
|
|
|
169
169
|
id: "linear",
|
|
170
170
|
label: "Linear twin",
|
|
171
171
|
description: "Issue triage, comments, and project workflows against a deterministic Linear clone.",
|
|
172
|
-
|
|
172
|
+
tasks: [
|
|
173
173
|
{
|
|
174
174
|
filename: "24-linear-issue-triage.md",
|
|
175
175
|
title: "Linear issue triage",
|
|
@@ -189,8 +189,8 @@ export function findTwin(id) {
|
|
|
189
189
|
const q = id.trim().toLowerCase();
|
|
190
190
|
if (!q)
|
|
191
191
|
return null;
|
|
192
|
-
return
|
|
192
|
+
return TASK_TWINS.find((twin) => twin.id === q) ?? null;
|
|
193
193
|
}
|
|
194
|
-
export function
|
|
195
|
-
return twin.
|
|
194
|
+
export function runnableTasks(twin) {
|
|
195
|
+
return twin.tasks.filter((t) => t.runnable);
|
|
196
196
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type TaskTwin } from "./tasks-catalog.js";
|
|
2
|
+
export interface TasksCommandOptions {
|
|
3
|
+
copy?: boolean;
|
|
4
|
+
force?: boolean;
|
|
5
|
+
dest?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function runTasksCommand(twinArg: string | undefined, opts: TasksCommandOptions): Promise<void>;
|
|
8
|
+
interface CopyOptions {
|
|
9
|
+
destDir: string;
|
|
10
|
+
force: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function copyTwinTasks(twin: TaskTwin, opts: CopyOptions): Promise<void>;
|
|
13
|
+
export {};
|