@pome-sh/cli 0.4.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -6
- package/dist/build-info.json +3 -3
- package/dist/examples/agents/llm-refund-agent.js +1 -1
- package/dist/src/cli/compile-seeds.js +22 -22
- package/dist/src/cli/default-task.d.ts +2 -2
- package/dist/src/cli/default-task.js +4 -4
- package/dist/src/cli/docs-topics.js +49 -16
- package/dist/src/cli/eval.d.ts +1 -1
- package/dist/src/cli/eval.js +3 -3
- package/dist/src/cli/init-sdk.js +1 -1
- package/dist/src/cli/install.d.ts +4 -41
- package/dist/src/cli/install.js +31 -412
- package/dist/src/cli/main.js +212 -118
- package/dist/src/cli/register.d.ts +4 -22
- package/dist/src/cli/register.js +6 -31
- package/dist/src/cli/session.js +1 -1
- package/dist/src/cli/tasks-catalog.d.ts +25 -0
- package/dist/src/cli/{scenarios-catalog.js → tasks-catalog.js} +9 -9
- package/dist/src/cli/tasks.d.ts +13 -0
- package/dist/src/cli/{scenarios.js → tasks.js} +32 -32
- package/dist/src/demo/agent.js +2 -2
- package/dist/src/demo/runDemo.d.ts +3 -3
- package/dist/src/demo/runDemo.js +14 -14
- package/dist/src/doctor/checks.js +12 -3
- package/dist/src/doctor/render.d.ts +9 -0
- package/dist/src/doctor/render.js +7 -0
- package/dist/src/fix-prompt/prompt.d.ts +3 -3
- package/dist/src/fix-prompt/prompt.js +4 -4
- package/dist/src/hosted/client.d.ts +6 -6
- package/dist/src/hosted/client.js +6 -6
- package/dist/src/hosted/errors.js +1 -1
- package/dist/src/hosted/evalResultCache.d.ts +1 -1
- package/dist/src/hosted/evalResultCache.js +1 -1
- package/dist/src/hosted/evalResultView.d.ts +1 -1
- package/dist/src/hosted/evalResultView.js +1 -1
- package/dist/src/hosted/uploadAndFinalize.d.ts +1 -1
- package/dist/src/hosted/uploadAndFinalize.js +2 -2
- package/dist/src/recorder/artifacts.d.ts +2 -2
- package/dist/src/recorder/inspect.d.ts +3 -3
- package/dist/src/recorder/inspect.js +3 -3
- package/dist/src/runner/captureServerChild.js +1 -1
- package/dist/src/runner/{runScenario.d.ts → runTask.d.ts} +3 -3
- package/dist/src/runner/{runScenario.js → runTask.js} +4 -4
- package/dist/src/runner/{runScenarioCore.d.ts → runTaskCore.d.ts} +2 -2
- package/dist/src/runner/{runScenarioHosted.d.ts → runTaskHosted.d.ts} +6 -6
- package/dist/src/runner/{runScenarioHosted.js → runTaskHosted.js} +12 -12
- package/dist/src/runner/runTrialGroup.d.ts +4 -4
- package/dist/src/runner/runTrialGroup.js +10 -10
- package/dist/src/runner/trialCount.js +1 -1
- package/dist/src/task/parseTask.d.ts +9 -0
- package/dist/src/{scenario/parseScenario.js → task/parseTask.js} +21 -21
- package/dist/src/{scenario → task}/seed-compiler-hosted.d.ts +1 -1
- package/dist/src/{scenario → task}/seed-compiler-hosted.js +1 -1
- package/dist/src/{scenario/scenarioSchema.d.ts → task/taskSchema.d.ts} +4 -4
- package/dist/src/{scenario/scenarioSchema.js → task/taskSchema.js} +6 -6
- package/examples/agents/llm-refund-agent.ts +1 -1
- package/node_modules/@pome-sh/twin-gmail/CHANGELOG.md +5 -0
- package/node_modules/@pome-sh/twin-gmail/package.json +2 -2
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/index.d.ts +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/index.js +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/index.js.map +1 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/manifest.d.ts +31 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/manifest.js +76 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/manifest.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/rest.d.ts +9 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/rest.js +27 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/dist/rest.js.map +1 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/manifest-schema.json +68 -0
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/package.json +2 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/shared-types/trace-contract.json +1 -1
- package/node_modules/@pome-sh/twin-slack/package.json +3 -3
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/index.d.ts +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/index.js +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/index.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/manifest.d.ts +31 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/manifest.js +76 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/manifest.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/rest.d.ts +9 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/rest.js +27 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/dist/rest.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/manifest-schema.json +68 -0
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/package.json +2 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/shared-types/trace-contract.json +1 -1
- package/node_modules/@pome-sh/twin-stripe/package.json +3 -3
- package/package.json +6 -7
- package/{scenarios → tasks}/00-default-seed.md +1 -1
- package/{scenarios → tasks}/14-stripe-refund-retry.md +1 -1
- package/dist/src/cli/agent-sdk.d.ts +0 -32
- package/dist/src/cli/agent-sdk.js +0 -105
- package/dist/src/cli/embedded-wiring.d.ts +0 -47
- package/dist/src/cli/embedded-wiring.js +0 -443
- package/dist/src/cli/scenarios-catalog.d.ts +0 -25
- package/dist/src/cli/scenarios.d.ts +0 -13
- package/dist/src/cli/skills.d.ts +0 -8
- package/dist/src/cli/skills.js +0 -141
- package/dist/src/scenario/parseScenario.d.ts +0 -9
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/admin-gate.d.ts +0 -35
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/admin-gate.js +0 -103
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/admin-gate.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/auth.d.ts +0 -100
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/auth.js +0 -262
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/auth.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/build-info.d.ts +0 -7
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/build-info.js +0 -14
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/build-info.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/db.d.ts +0 -44
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/db.js +0 -113
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/db.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/errors.d.ts +0 -24
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/errors.js +0 -61
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/errors.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/failure-injection.d.ts +0 -43
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/failure-injection.js +0 -160
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/failure-injection.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/fidelity-inventory.d.ts +0 -121
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js +0 -204
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/fidelity.d.ts +0 -8
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/fidelity.js +0 -39
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/fidelity.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/index.d.ts +0 -372
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/index.js +0 -139
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/index.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.d.ts +0 -10
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.js +0 -221
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/parity.d.ts +0 -61
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/parity.js +0 -123
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/parity.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/recorder.d.ts +0 -120
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/recorder.js +0 -368
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/recorder.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/redaction.d.ts +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/redaction.js +0 -3
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/redaction.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/server-helpers.d.ts +0 -54
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/server-helpers.js +0 -181
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/server-helpers.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/server.d.ts +0 -46
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/server.js +0 -394
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/server.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/tool-context.d.ts +0 -8
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/tool-context.js +0 -22
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/dist/tool-context.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/sdk/package.json +0 -54
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/errors.d.ts +0 -39
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/errors.js +0 -33
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/errors.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/finalize-shapes.d.ts +0 -254
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js +0 -122
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/github-access-control.d.ts +0 -175
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/github-access-control.js +0 -182
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/github-access-control.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/identity.d.ts +0 -90
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/identity.js +0 -72
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/identity.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/index.d.ts +0 -27
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/index.js +0 -34
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/index.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/event-schema.d.ts +0 -331
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js +0 -33
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.d.ts +0 -65
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js +0 -455
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.d.ts +0 -39
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js +0 -47
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/index.d.ts +0 -25
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/index.js +0 -27
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/index.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.d.ts +0 -100
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js +0 -193
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/map-span.d.ts +0 -64
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/map-span.js +0 -112
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/map-span.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/nano.d.ts +0 -26
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/nano.js +0 -61
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/nano.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/project.d.ts +0 -42
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/project.js +0 -104
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/project.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/semconv.d.ts +0 -57
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/semconv.js +0 -102
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/semconv.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/span-event.d.ts +0 -134
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/span-event.js +0 -152
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/otel/span-event.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/recorder-events.d.ts +0 -480
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/recorder-events.js +0 -270
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/recorder-events.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/redaction.d.ts +0 -2
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/redaction.js +0 -152
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/redaction.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/rest.d.ts +0 -248
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/rest.js +0 -308
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/rest.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/run.d.ts +0 -208
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/run.js +0 -170
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/run.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/seed-envelope.d.ts +0 -14
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/seed-envelope.js +0 -46
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/seed-envelope.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/seed-state.d.ts +0 -1006
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/seed-state.js +0 -263
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/seed-state.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/sessions.d.ts +0 -53
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/sessions.js +0 -51
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/sessions.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/task-vocab.d.ts +0 -80
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/task-vocab.js +0 -98
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/task-vocab.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/task.d.ts +0 -859
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/task.js +0 -60
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/dist/task.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/package.json +0 -54
- package/node_modules/@pome-sh/twin-gmail/node_modules/@pome-sh/shared-types/trace-contract.json +0 -41
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/admin-gate.d.ts +0 -35
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/admin-gate.js +0 -103
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/admin-gate.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/auth.d.ts +0 -100
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/auth.js +0 -262
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/auth.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/build-info.d.ts +0 -7
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/build-info.js +0 -14
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/build-info.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/db.d.ts +0 -44
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/db.js +0 -113
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/db.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/errors.d.ts +0 -24
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/errors.js +0 -61
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/errors.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/failure-injection.d.ts +0 -43
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/failure-injection.js +0 -160
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/failure-injection.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/fidelity-inventory.d.ts +0 -121
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js +0 -204
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/fidelity.d.ts +0 -8
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/fidelity.js +0 -39
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/fidelity.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/index.d.ts +0 -372
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/index.js +0 -139
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/index.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.d.ts +0 -10
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.js +0 -221
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/parity.d.ts +0 -61
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/parity.js +0 -123
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/parity.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/recorder.d.ts +0 -120
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/recorder.js +0 -368
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/recorder.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/redaction.d.ts +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/redaction.js +0 -3
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/redaction.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/server-helpers.d.ts +0 -54
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/server-helpers.js +0 -181
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/server-helpers.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/server.d.ts +0 -46
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/server.js +0 -394
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/server.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/tool-context.d.ts +0 -8
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/tool-context.js +0 -22
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/dist/tool-context.js.map +0 -1
- package/node_modules/@pome-sh/twin-slack/node_modules/@pome-sh/sdk/package.json +0 -54
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/admin-gate.d.ts +0 -35
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/admin-gate.js +0 -103
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/admin-gate.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/auth.d.ts +0 -100
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/auth.js +0 -262
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/auth.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/build-info.d.ts +0 -7
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/build-info.js +0 -14
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/build-info.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/db.d.ts +0 -44
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/db.js +0 -113
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/db.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/errors.d.ts +0 -24
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/errors.js +0 -61
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/errors.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/failure-injection.d.ts +0 -43
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/failure-injection.js +0 -160
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/failure-injection.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/fidelity-inventory.d.ts +0 -121
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js +0 -204
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/fidelity.d.ts +0 -8
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/fidelity.js +0 -39
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/fidelity.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/index.d.ts +0 -372
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/index.js +0 -139
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/index.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.d.ts +0 -10
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.js +0 -221
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/mcp-jsonrpc.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/parity.d.ts +0 -61
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/parity.js +0 -123
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/parity.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/recorder.d.ts +0 -120
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/recorder.js +0 -368
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/recorder.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/redaction.d.ts +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/redaction.js +0 -3
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/redaction.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/server-helpers.d.ts +0 -54
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/server-helpers.js +0 -181
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/server-helpers.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/server.d.ts +0 -46
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/server.js +0 -394
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/server.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/tool-context.d.ts +0 -8
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/tool-context.js +0 -22
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/dist/tool-context.js.map +0 -1
- package/node_modules/@pome-sh/twin-stripe/node_modules/@pome-sh/sdk/package.json +0 -54
- package/skills/pome-setup/SKILL.md +0 -150
- package/skills/pome-test/SKILL.md +0 -137
- /package/dist/src/runner/{runScenarioCore.js → runTaskCore.js} +0 -0
- /package/dist/src/{scenario → task}/githubSeedCompat.d.ts +0 -0
- /package/dist/src/{scenario → task}/githubSeedCompat.js +0 -0
- /package/dist/src/{scenario → task}/seed-compiler.d.ts +0 -0
- /package/dist/src/{scenario → task}/seed-compiler.js +0 -0
- /package/dist/src/{scenario → task}/seed-verifier.d.ts +0 -0
- /package/dist/src/{scenario → task}/seed-verifier.js +0 -0
- /package/{scenarios → tasks}/01-bug-happy-path.md +0 -0
- /package/{scenarios → tasks}/01-bug-happy-path.seed.json +0 -0
- /package/{scenarios → tasks}/03-already-triaged.md +0 -0
- /package/{scenarios → tasks}/03-already-triaged.seed.json +0 -0
- /package/{scenarios → tasks}/04-judge-context.md +0 -0
- /package/{scenarios → tasks}/04-judge-context.seed.json +0 -0
- /package/{scenarios → tasks}/05-github-identity-spoof.md +0 -0
- /package/{scenarios → tasks}/05-github-identity-spoof.seed.json +0 -0
- /package/{scenarios → tasks}/06-mislabeled-needs-fix.md +0 -0
- /package/{scenarios → tasks}/06-mislabeled-needs-fix.seed.json +0 -0
- /package/{scenarios → tasks}/07-pr-backdoor-review.md +0 -0
- /package/{scenarios → tasks}/07-pr-backdoor-review.seed.json +0 -0
- /package/{scenarios → tasks}/08-prompt-injection-issue-body.md +0 -0
- /package/{scenarios → tasks}/08-prompt-injection-issue-body.seed.json +0 -0
- /package/{scenarios → tasks}/09-security-revert-rationalization.md +0 -0
- /package/{scenarios → tasks}/09-security-revert-rationalization.seed.json +0 -0
- /package/{scenarios → tasks}/10-stripe-create-payment-intent.md +0 -0
- /package/{scenarios → tasks}/11-stripe-handle-failed-payment.md +0 -0
- /package/{scenarios → tasks}/12-stripe-reconcile-event.md +0 -0
- /package/{scenarios → tasks}/13-stripe-x402-payment-required.md +0 -0
- /package/{scenarios → tasks}/14-stripe-refund-retry.expected-events.jsonl +0 -0
- /package/{scenarios → tasks}/17-in-scope-injection.md +0 -0
- /package/{scenarios → tasks}/17-in-scope-injection.seed.json +0 -0
- /package/{scenarios → tasks}/18-fabricate-green-ci.md +0 -0
- /package/{scenarios → tasks}/18-fabricate-green-ci.seed.json +0 -0
- /package/{scenarios → tasks}/19-stripe-rerefund-persuasion.md +0 -0
- /package/{scenarios → tasks}/19-stripe-rerefund-persuasion.seed.json +0 -0
- /package/{scenarios → tasks}/20-slack-exfiltration.md +0 -0
- /package/{scenarios → tasks}/20-slack-exfiltration.seed.json +0 -0
- /package/{scenarios → tasks}/21-slack-injection.md +0 -0
- /package/{scenarios → tasks}/21-slack-injection.seed.json +0 -0
- /package/{scenarios → tasks}/22-gmail-inbox-triage.md +0 -0
- /package/{scenarios → tasks}/22-gmail-inbox-triage.seed.json +0 -0
- /package/{scenarios → tasks}/23-gmail-first-party-parity.md +0 -0
- /package/{scenarios → tasks}/23-gmail-first-party-parity.seed.json +0 -0
- /package/{scenarios → tasks}/24-linear-issue-triage.md +0 -0
- /package/{scenarios → tasks}/24-linear-issue-triage.seed.json +0 -0
- /package/{scenarios → tasks}/25-linear-comment-label-triage.md +0 -0
- /package/{scenarios → tasks}/25-linear-comment-label-triage.seed.json +0 -0
- /package/{scenarios → tasks}/26-github-linear-handoff.md +0 -0
- /package/{scenarios → tasks}/26-github-linear-handoff.seed.json +0 -0
- /package/{scenarios → tasks}/27-gmail-github-support-escalation.md +0 -0
- /package/{scenarios → tasks}/27-gmail-github-support-escalation.seed.json +0 -0
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,11 +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
|
-
import { runSkillsInstall } from "./skills.js";
|
|
22
21
|
import { copyAnnounceLine, ensureDefaultTask, runYoursFrameLines, trialsPinFallbackLine, } from "./default-task.js";
|
|
23
|
-
import { findTwin,
|
|
22
|
+
import { findTwin, runnableTasks, } from "./tasks-catalog.js";
|
|
24
23
|
import { friendlyHostedError, runSessionCreate, runSessionList, runSessionStop, } from "./session.js";
|
|
25
24
|
import { normalizeRegisterTwins, runRegisterAgent } from "./register.js";
|
|
26
25
|
import { resolvePackageRoot } from "./resolve-package-root.js";
|
|
@@ -31,10 +30,11 @@ import { MANIFEST_JSON, readManifest, writeManifest, } from "./project-config.js
|
|
|
31
30
|
import { createGitHubCloneApp } from "../twin/githubCloneAdapter.js";
|
|
32
31
|
import { buildFixPrompt, buildGroupFixPrompt, } from "../fix-prompt/index.js";
|
|
33
32
|
import { discoverRunSet, loadTrialEvents, } from "../hosted/evalResultCache.js";
|
|
34
|
-
import {
|
|
33
|
+
import { parseTaskFile } from "../task/parseTask.js";
|
|
35
34
|
const PACKAGE_VERSION = readPackageVersion();
|
|
36
35
|
const SESSION_CREATE_FORMATS = new Set(["text", "json", "env"]);
|
|
37
|
-
const
|
|
36
|
+
const DEFAULT_AGENT_FILE = "examples/agents/scripted-triage-agent.ts";
|
|
37
|
+
const DEFAULT_AGENT_COMMAND = `npx tsx ${DEFAULT_AGENT_FILE}`;
|
|
38
38
|
const MANIFEST_SCHEMA_URL = "https://pome.sh/schemas/v1/pome.json";
|
|
39
39
|
function readPackageVersion() {
|
|
40
40
|
try {
|
|
@@ -68,6 +68,8 @@ export function createProgram() {
|
|
|
68
68
|
.command("init")
|
|
69
69
|
.description("Create starter Pome config and folders")
|
|
70
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.")
|
|
71
73
|
.action(async (opts) => {
|
|
72
74
|
const sdk = opts.sdk?.trim();
|
|
73
75
|
if (sdk !== undefined &&
|
|
@@ -82,23 +84,54 @@ export function createProgram() {
|
|
|
82
84
|
process.exitCode = 2;
|
|
83
85
|
return;
|
|
84
86
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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;
|
|
90
110
|
let framework;
|
|
91
|
-
let postInitMessage =
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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.";
|
|
102
135
|
if (sdk) {
|
|
103
136
|
const scaffold = await writeSdkScaffold(sdk);
|
|
104
137
|
command = scaffold.agentCommand;
|
|
@@ -107,6 +140,10 @@ export function createProgram() {
|
|
|
107
140
|
`Pome initialized with --sdk ${sdk}. Scaffolded ${scaffold.exampleAgentRelativePath}.\n` +
|
|
108
141
|
scaffold.postInstallHint;
|
|
109
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;
|
|
110
147
|
// The manifest requires `agent.slug` (F-804). `pome init` runs before
|
|
111
148
|
// `pome register`, so seed a portable slug derived from the directory
|
|
112
149
|
// name; register later overwrites it with the server-canonical slug.
|
|
@@ -116,13 +153,17 @@ export function createProgram() {
|
|
|
116
153
|
const agent = { slug };
|
|
117
154
|
if (framework)
|
|
118
155
|
agent.framework = framework;
|
|
119
|
-
|
|
156
|
+
const manifest = {
|
|
120
157
|
$schema: MANIFEST_SCHEMA_URL,
|
|
121
158
|
agent,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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);
|
|
126
167
|
}
|
|
127
168
|
else if (sdk) {
|
|
128
169
|
const priorAgent = typeof existing.raw.agent === "object" && existing.raw.agent !== null
|
|
@@ -141,19 +182,16 @@ export function createProgram() {
|
|
|
141
182
|
});
|
|
142
183
|
program
|
|
143
184
|
.command("install")
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
.
|
|
149
|
-
|
|
150
|
-
|
|
185
|
+
// F-893 — the Gen-1 agent-driven wiring is retired; this is a redirect to
|
|
186
|
+
// the Gen-2 path. allowUnknownOption + allowExcessArguments keep old
|
|
187
|
+
// invocations (`pome install --interactive`, `--api-url …`) landing on the
|
|
188
|
+
// redirect instead of erroring on a now-removed flag or stray operand.
|
|
189
|
+
.allowUnknownOption()
|
|
190
|
+
.allowExcessArguments()
|
|
191
|
+
.description("Retired (F-893). Prints the Gen-2 wiring path: `claude mcp add … pome` + `npx skills add pome-sh/digital-twins`, then the pome-intake / REST-launch preflight.")
|
|
192
|
+
.action(async () => {
|
|
151
193
|
const { runInstall } = await import("./install.js");
|
|
152
|
-
|
|
153
|
-
apiUrl: opts.apiUrl,
|
|
154
|
-
dashboardUrl: opts.dashboardUrl,
|
|
155
|
-
interactive: opts.interactive,
|
|
156
|
-
});
|
|
194
|
+
runInstall();
|
|
157
195
|
});
|
|
158
196
|
program
|
|
159
197
|
.command("login")
|
|
@@ -181,23 +219,35 @@ export function createProgram() {
|
|
|
181
219
|
.action(async (topic, opts) => {
|
|
182
220
|
await runDocsCommand(topic, { site: opts.site, urlOnly: Boolean(opts.url) });
|
|
183
221
|
});
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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
|
+
});
|
|
196
243
|
});
|
|
197
|
-
|
|
244
|
+
return cmd;
|
|
245
|
+
};
|
|
246
|
+
registerTasksCommand("tasks", false);
|
|
247
|
+
registerTasksCommand("scenarios", true);
|
|
198
248
|
program
|
|
199
249
|
.command("compile-seeds")
|
|
200
|
-
.argument("[target]", "Task .md file or directory (defaults to ./
|
|
250
|
+
.argument("[target]", "Task .md file or directory (defaults to ./tasks)")
|
|
201
251
|
.option("--force", "Recompile even if the sidecar's source hash matches", false)
|
|
202
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)
|
|
203
253
|
.option("--api-url <url>", "Control-plane base URL (only relevant with --hosted).", process.env.POME_API_URL ?? DEFAULT_CONTROL_PLANE_URL)
|
|
@@ -211,22 +261,9 @@ export function createProgram() {
|
|
|
211
261
|
if (code !== 0)
|
|
212
262
|
process.exitCode = code;
|
|
213
263
|
});
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
skills
|
|
218
|
-
.command("install")
|
|
219
|
-
.description("Install /pome-setup and /pome-test into ~/.claude/skills/ (symlinked to this pome install by default)")
|
|
220
|
-
.option("--copy", "Copy each skill instead of symlinking (CI, Windows without symlink permission)", false)
|
|
221
|
-
.option("--force", "Overwrite an existing install of the same skill", false)
|
|
222
|
-
.option("--dest <dir>", "Install into <dir> instead of ~/.claude/skills/ (testing and advanced users)")
|
|
223
|
-
.action(async (opts) => {
|
|
224
|
-
await runSkillsInstall({
|
|
225
|
-
copy: opts.copy,
|
|
226
|
-
force: opts.force,
|
|
227
|
-
dest: opts.dest,
|
|
228
|
-
});
|
|
229
|
-
});
|
|
264
|
+
// F-893 — `pome skills` / `pome skills install` retired. It only symlinked
|
|
265
|
+
// the two Gen-1 tombstone skills into ~/.claude/skills/; the Gen-2 coach set
|
|
266
|
+
// installs via `npx skills add pome-sh/digital-twins`.
|
|
230
267
|
const register = program
|
|
231
268
|
.command("register")
|
|
232
269
|
.description("Register a cloud entity (agent, ...) and link this project to it");
|
|
@@ -241,6 +278,7 @@ export function createProgram() {
|
|
|
241
278
|
try {
|
|
242
279
|
await runRegisterAgent({
|
|
243
280
|
apiBaseUrl: opts.apiUrl,
|
|
281
|
+
dashboardBaseUrl: process.env.POME_DASHBOARD_URL ?? DEFAULT_DASHBOARD_URL,
|
|
244
282
|
name,
|
|
245
283
|
force: opts.force,
|
|
246
284
|
twins: normalizeRegisterTwins(opts.twins),
|
|
@@ -333,7 +371,7 @@ export function createProgram() {
|
|
|
333
371
|
});
|
|
334
372
|
program
|
|
335
373
|
.command("run")
|
|
336
|
-
.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.')
|
|
337
375
|
.option("--agent <command>", "Agent command to run")
|
|
338
376
|
.option("-n, --trials <count>", "FDRS-636: run <count> isolated trials of the task as ONE trial group (integer 1-20; hosted only). " +
|
|
339
377
|
"Default is the task config's `runs` field (capped at 20). k>1 mints sessions with a shared group id up to your " +
|
|
@@ -351,7 +389,7 @@ export function createProgram() {
|
|
|
351
389
|
.option("--agent-version <version>", "Override the manifest's agent.version for this run (stamped on the session/run).")
|
|
352
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.")
|
|
353
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.")
|
|
354
|
-
.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.')
|
|
355
393
|
.action(async (target, options) => {
|
|
356
394
|
// F0-5 — `pome run`'s pre-flight (resolving files, reading config,
|
|
357
395
|
// resolving credentials) used to propagate plain `Error`s to
|
|
@@ -374,31 +412,50 @@ export function createProgram() {
|
|
|
374
412
|
return;
|
|
375
413
|
}
|
|
376
414
|
}
|
|
377
|
-
//
|
|
378
|
-
//
|
|
379
|
-
|
|
380
|
-
//
|
|
381
|
-
//
|
|
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.
|
|
382
427
|
let defaultTask = null;
|
|
428
|
+
let bareViaManifestTasks = false;
|
|
383
429
|
if (target === undefined) {
|
|
384
|
-
|
|
385
|
-
|
|
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;
|
|
386
438
|
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
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;
|
|
391
453
|
}
|
|
392
|
-
if (defaultTask.copied)
|
|
393
|
-
console.error(copyAnnounceLine(defaultTask));
|
|
394
|
-
if (!defaultTask.trialsApplied)
|
|
395
|
-
console.error(trialsPinFallbackLine());
|
|
396
|
-
target = defaultTask.path;
|
|
397
454
|
}
|
|
398
455
|
let files;
|
|
399
456
|
let hostedCreds;
|
|
400
457
|
try {
|
|
401
|
-
files = await
|
|
458
|
+
files = await taskFiles(target);
|
|
402
459
|
}
|
|
403
460
|
catch (err) {
|
|
404
461
|
const code = exitCodeFor(err);
|
|
@@ -406,9 +463,31 @@ export function createProgram() {
|
|
|
406
463
|
process.exitCode = code;
|
|
407
464
|
return;
|
|
408
465
|
}
|
|
409
|
-
|
|
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
|
+
}
|
|
410
478
|
const configCommand = manifestRead?.manifest.command;
|
|
411
|
-
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;
|
|
412
491
|
let worstExit = 0;
|
|
413
492
|
// Hosted is the default. Self-host runs against an in-process twin via
|
|
414
493
|
// `--local` (documented) or POME_LOCAL=1 (an internal escape hatch).
|
|
@@ -483,8 +562,8 @@ export function createProgram() {
|
|
|
483
562
|
// config's `runs` field (both capped at 20). k>1 takes the
|
|
484
563
|
// trial-group path; k=1 stays EXACTLY the single-run path
|
|
485
564
|
// below (no group is ever stamped for it).
|
|
486
|
-
const
|
|
487
|
-
const k = effectiveTrialCount(trialsFlag,
|
|
565
|
+
const taskForRuns = await parseTaskFile(file);
|
|
566
|
+
const k = effectiveTrialCount(trialsFlag, taskForRuns.config.runs);
|
|
488
567
|
if (k > 1) {
|
|
489
568
|
const { runTrialGroup } = await import("../runner/runTrialGroup.js");
|
|
490
569
|
// FDRS-644 — the literal re-run command the fix handoff
|
|
@@ -499,7 +578,7 @@ export function createProgram() {
|
|
|
499
578
|
? fileForRerun
|
|
500
579
|
: file} -n ${k}`;
|
|
501
580
|
const groupResult = await runTrialGroup({
|
|
502
|
-
|
|
581
|
+
taskPath: file,
|
|
503
582
|
agentCommand,
|
|
504
583
|
agentCommandSource: options.agent
|
|
505
584
|
? "--agent"
|
|
@@ -522,8 +601,8 @@ export function createProgram() {
|
|
|
522
601
|
}
|
|
523
602
|
continue;
|
|
524
603
|
}
|
|
525
|
-
const result = await
|
|
526
|
-
|
|
604
|
+
const result = await runTaskHosted({
|
|
605
|
+
taskPath: file,
|
|
527
606
|
agentCommand,
|
|
528
607
|
artifactsDir: options.artifactsDir,
|
|
529
608
|
hosted: { baseUrl: hostedCreds.apiBaseUrl, apiKey: hostedCreds.apiKey },
|
|
@@ -552,8 +631,8 @@ export function createProgram() {
|
|
|
552
631
|
// no score, no verdict, no judge. Let exceptions (file-not-found,
|
|
553
632
|
// parse errors, agent failures) propagate to Commander's top-level
|
|
554
633
|
// handler.
|
|
555
|
-
const result = await
|
|
556
|
-
|
|
634
|
+
const result = await runTask({
|
|
635
|
+
taskPath: file,
|
|
557
636
|
agentCommand,
|
|
558
637
|
artifactsDir: options.artifactsDir,
|
|
559
638
|
// Commander negates --no-* flags: `--no-capture` → `capture: false`.
|
|
@@ -606,7 +685,7 @@ export function createProgram() {
|
|
|
606
685
|
});
|
|
607
686
|
// Hidden: the bundled demo agent `pome demo` spawns as its trial child
|
|
608
687
|
// through the real capture path (FDRS-643). Reads the POME_* env contract
|
|
609
|
-
// injected by
|
|
688
|
+
// injected by runTask plus POME_DEMO_* gateway coordinates.
|
|
610
689
|
program
|
|
611
690
|
.command("demo-agent", { hidden: true })
|
|
612
691
|
.description("Internal: the bundled demo agent process (spawned by `pome demo`).")
|
|
@@ -618,12 +697,12 @@ export function createProgram() {
|
|
|
618
697
|
});
|
|
619
698
|
program
|
|
620
699
|
.command("doctor")
|
|
621
|
-
.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.")
|
|
622
701
|
.action(async () => {
|
|
623
702
|
const { runDoctorChecks } = await import("../doctor/checks.js");
|
|
624
703
|
const { renderDoctorReport } = await import("../doctor/render.js");
|
|
625
704
|
const report = await runDoctorChecks();
|
|
626
|
-
for (const line of renderDoctorReport(report))
|
|
705
|
+
for (const line of renderDoctorReport(report, { passNote: true }))
|
|
627
706
|
console.error(line);
|
|
628
707
|
if (!report.ok)
|
|
629
708
|
process.exitCode = 1;
|
|
@@ -672,7 +751,7 @@ export function createProgram() {
|
|
|
672
751
|
else {
|
|
673
752
|
const health = computeTraceHealth({
|
|
674
753
|
events: eventsResult.events,
|
|
675
|
-
|
|
754
|
+
taskUsesTwin: meta.twins.length > 0,
|
|
676
755
|
});
|
|
677
756
|
for (const line of renderTraceHealth(health))
|
|
678
757
|
console.log(line);
|
|
@@ -689,18 +768,18 @@ export function createProgram() {
|
|
|
689
768
|
.argument("[target]", "Artifacts root or a trial run dir (default: runs). Legacy form: a path to events.jsonl — then <task> is required.")
|
|
690
769
|
.argument("[task]", "Path to the task .md file (only with an events.jsonl target)")
|
|
691
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.")
|
|
692
|
-
.action(async (target,
|
|
771
|
+
.action(async (target, taskArg) => {
|
|
693
772
|
// Legacy 2-arg form: <events.jsonl> <scenario.md> — unchanged
|
|
694
773
|
// (CAPTURE-ONLY, FDRS-657: raw trace + declared criteria, no verdict).
|
|
695
774
|
if (target !== undefined && target.endsWith(".jsonl")) {
|
|
696
|
-
if (!
|
|
775
|
+
if (!taskArg) {
|
|
697
776
|
console.error("The events.jsonl form needs the task file: pome fix-prompt <events.jsonl> <task.md>");
|
|
698
777
|
process.exitCode = 5;
|
|
699
778
|
return;
|
|
700
779
|
}
|
|
701
780
|
const [eventsRaw, scenario] = await Promise.all([
|
|
702
781
|
readFile(resolve(target), "utf8"),
|
|
703
|
-
|
|
782
|
+
parseTaskFile(resolve(taskArg)),
|
|
704
783
|
]);
|
|
705
784
|
const events = eventsRaw
|
|
706
785
|
.split("\n")
|
|
@@ -710,7 +789,7 @@ export function createProgram() {
|
|
|
710
789
|
console.log(buildFixPrompt({ events, scenario }));
|
|
711
790
|
return;
|
|
712
791
|
}
|
|
713
|
-
if (
|
|
792
|
+
if (taskArg !== undefined) {
|
|
714
793
|
console.error("The second argument only applies to the events.jsonl form: pome fix-prompt <events.jsonl> <task.md>");
|
|
715
794
|
process.exitCode = 5;
|
|
716
795
|
return;
|
|
@@ -733,7 +812,7 @@ export function createProgram() {
|
|
|
733
812
|
const set = discovery.set;
|
|
734
813
|
let scenario = null;
|
|
735
814
|
try {
|
|
736
|
-
scenario = await
|
|
815
|
+
scenario = await parseTaskFile(resolve(set.taskPath));
|
|
737
816
|
}
|
|
738
817
|
catch {
|
|
739
818
|
// Task file moved/edited since the run — the prompt degrades to the
|
|
@@ -894,7 +973,7 @@ const SUPPORTED_GMAIL_ENDPOINTS = [
|
|
|
894
973
|
"GET /gmail/v1/users/:userId/settings/sendAs/:email",
|
|
895
974
|
"POST /upload/gmail/v1/users/:userId/{messages,drafts} (media|multipart)",
|
|
896
975
|
];
|
|
897
|
-
async function
|
|
976
|
+
async function taskFiles(target) {
|
|
898
977
|
const resolved = resolve(target);
|
|
899
978
|
// F0-5a — surface bad-input paths as `HostedUsageError` so the top-level
|
|
900
979
|
// exit-code mapper returns the documented exit 5 ("usage error") instead
|
|
@@ -912,12 +991,27 @@ async function scenarioFiles(target) {
|
|
|
912
991
|
.sort()
|
|
913
992
|
.map((entry) => join(resolved, entry));
|
|
914
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
|
+
}
|
|
915
1009
|
async function copyStarterFiles() {
|
|
916
1010
|
const packageRoot = resolvePackageRoot(import.meta.url);
|
|
917
1011
|
if (!packageRoot)
|
|
918
1012
|
return;
|
|
919
1013
|
await Promise.all([
|
|
920
|
-
|
|
1014
|
+
copyStarterTasks(packageRoot),
|
|
921
1015
|
copyIfPresent(join(packageRoot, "examples", "agents"), join("examples", "agents")),
|
|
922
1016
|
]);
|
|
923
1017
|
}
|
|
@@ -930,20 +1024,20 @@ async function copyIfPresent(source, target) {
|
|
|
930
1024
|
errorOnExist: false,
|
|
931
1025
|
});
|
|
932
1026
|
}
|
|
933
|
-
async function
|
|
934
|
-
const
|
|
935
|
-
if (!existsSync(
|
|
1027
|
+
async function copyStarterTasks(packageRoot) {
|
|
1028
|
+
const taskDir = join(packageRoot, "tasks");
|
|
1029
|
+
if (!existsSync(taskDir))
|
|
936
1030
|
return;
|
|
937
1031
|
const starterTwin = findTwin("github");
|
|
938
|
-
const
|
|
939
|
-
?
|
|
1032
|
+
const starterTasks = starterTwin
|
|
1033
|
+
? runnableTasks(starterTwin).map((t) => t.filename)
|
|
940
1034
|
: [];
|
|
941
|
-
await mkdir("
|
|
942
|
-
await Promise.all(
|
|
1035
|
+
await mkdir("tasks", { recursive: true });
|
|
1036
|
+
await Promise.all(starterTasks.flatMap((file) => {
|
|
943
1037
|
const sidecar = file.replace(/\.md$/i, ".seed.json");
|
|
944
1038
|
return [
|
|
945
|
-
copyIfPresent(join(
|
|
946
|
-
copyIfPresent(join(
|
|
1039
|
+
copyIfPresent(join(taskDir, file), join("tasks", file)),
|
|
1040
|
+
copyIfPresent(join(taskDir, sidecar), join("tasks", sidecar)),
|
|
947
1041
|
];
|
|
948
1042
|
}));
|
|
949
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[];
|
|
@@ -11,26 +15,4 @@ interface RegisterAgentOptions extends InteractiveSeams {
|
|
|
11
15
|
/** Normalize a `--twins github,slack` comma list to a validated twin array. */
|
|
12
16
|
export declare function normalizeRegisterTwins(raw: string | undefined): string[] | undefined;
|
|
13
17
|
export declare function runRegisterAgent(opts: RegisterAgentOptions): Promise<void>;
|
|
14
|
-
export interface EnsureAgentRegisteredOptions extends InteractiveSeams {
|
|
15
|
-
apiBaseUrl: string;
|
|
16
|
-
/** Where to look for the manifest. Defaults to process.cwd(). */
|
|
17
|
-
cwd?: string;
|
|
18
|
-
/** Test seam — forwarded to resolveCredentials. */
|
|
19
|
-
credentialsPath?: string;
|
|
20
|
-
}
|
|
21
|
-
export type EnsureAgentRegisteredResult = {
|
|
22
|
-
status: "registered";
|
|
23
|
-
agentId: string;
|
|
24
|
-
agentSlug: string;
|
|
25
|
-
} | {
|
|
26
|
-
status: "already-registered";
|
|
27
|
-
agentId: string;
|
|
28
|
-
agentSlug?: string;
|
|
29
|
-
} | {
|
|
30
|
-
status: "no-config";
|
|
31
|
-
};
|
|
32
|
-
/** Idempotent registration for `pome install`: a repo already linked under the
|
|
33
|
-
* caller's team keeps its id (no network, no duplicate); a fresh repo registers
|
|
34
|
-
* under the manifest name (or the config directory's basename). */
|
|
35
|
-
export declare function ensureAgentRegistered(opts: EnsureAgentRegisteredOptions): Promise<EnsureAgentRegisteredResult>;
|
|
36
18
|
export { friendlyHostedError };
|