@pome-sh/cli 0.1.1 → 0.2.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 +5 -6
- package/dist/build-info.json +3 -3
- package/dist/src/cli/eval.js +26 -8
- package/dist/src/cli/init-sdk.d.ts +0 -3
- package/dist/src/cli/init-sdk.js +117 -24
- package/dist/src/cli/main.js +23 -69
- package/dist/src/cli/register.d.ts +9 -0
- package/dist/src/cli/register.js +51 -5
- package/dist/src/cli/session.d.ts +7 -1
- package/dist/src/cli/session.js +87 -27
- package/dist/src/demo/runDemo.js +3 -2
- package/dist/src/hosted/client.d.ts +41 -5
- package/dist/src/hosted/client.js +333 -19
- package/dist/src/hosted/errors.d.ts +11 -1
- package/dist/src/hosted/errors.js +8 -1
- package/dist/src/hosted/evalResultView.d.ts +2 -0
- package/dist/src/hosted/evalResultView.js +22 -0
- package/dist/src/hosted/uploadAndFinalize.d.ts +18 -1
- package/dist/src/hosted/uploadAndFinalize.js +51 -3
- package/dist/src/recorder/inspect.js +20 -2
- package/dist/src/runner/mergeAdapterSignals.js +2 -2
- package/dist/src/runner/ports.js +3 -0
- package/dist/src/runner/runScenario.d.ts +79 -2
- package/dist/src/runner/runScenario.js +94 -36
- package/dist/src/runner/runScenarioHosted.d.ts +37 -0
- package/dist/src/runner/runScenarioHosted.js +257 -58
- package/dist/src/runner/runTrialGroup.d.ts +1 -3
- package/dist/src/runner/runTrialGroup.js +1 -3
- package/dist/src/scenario/parseScenario.d.ts +5 -0
- package/dist/src/scenario/parseScenario.js +135 -8
- package/dist/src/scenario/scenarioSchema.d.ts +200 -3
- package/dist/src/scenario/scenarioSchema.js +12 -1
- package/dist/src/twin/twinHarness.d.ts +10 -0
- package/dist/src/twin/twinHarness.js +6 -2
- package/dist/src/twin/twinStart.d.ts +19 -0
- package/dist/src/twin/twinStart.js +156 -0
- package/node_modules/@pome-sh/sdk/dist/fidelity-inventory.d.ts +121 -0
- package/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js +204 -0
- package/node_modules/@pome-sh/sdk/dist/fidelity-inventory.js.map +1 -0
- package/node_modules/@pome-sh/sdk/dist/parity.d.ts +55 -0
- package/node_modules/@pome-sh/sdk/dist/parity.js +112 -0
- package/node_modules/@pome-sh/sdk/dist/parity.js.map +1 -0
- package/node_modules/@pome-sh/sdk/dist/server-helpers.d.ts +15 -0
- package/node_modules/@pome-sh/sdk/dist/server-helpers.js +96 -0
- package/node_modules/@pome-sh/sdk/dist/server-helpers.js.map +1 -1
- package/node_modules/@pome-sh/sdk/dist/server.d.ts +1 -1
- package/node_modules/@pome-sh/sdk/dist/server.js +9 -7
- package/node_modules/@pome-sh/sdk/dist/server.js.map +1 -1
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/errors.d.ts +39 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/errors.js +33 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/errors.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/evaluator-hooks.d.ts +13 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/evaluator-hooks.js +6 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/evaluator-hooks.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/finalize-shapes.d.ts +215 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js +83 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/github-access-control.d.ts +175 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/github-access-control.js +182 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/github-access-control.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/identity.d.ts +90 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/identity.js +72 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/identity.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/index.d.ts +27 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/index.js +34 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/index.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/event-schema.d.ts +286 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js +33 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/event-schema.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.d.ts +65 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js +455 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/data.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.d.ts +39 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js +47 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/fixtures/index.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/index.d.ts +25 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/index.js +27 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/index.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.d.ts +100 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js +185 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/map-span.d.ts +64 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/map-span.js +112 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/map-span.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/nano.d.ts +26 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/nano.js +61 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/nano.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/project.d.ts +42 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/project.js +96 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/project.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/semconv.d.ts +51 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/semconv.js +74 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/semconv.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/span-event.d.ts +134 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/span-event.js +152 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/otel/span-event.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/recorder-events.d.ts +418 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/recorder-events.js +234 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/recorder-events.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/redaction.d.ts +2 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/redaction.js +152 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/redaction.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/rest.d.ts +198 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/rest.js +225 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/rest.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/run.d.ts +201 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/run.js +166 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/run.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/seed-state.d.ts +446 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/seed-state.js +167 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/seed-state.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/sessions.d.ts +53 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/sessions.js +51 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/sessions.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task-vocab.d.ts +66 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task-vocab.js +84 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task-vocab.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task.d.ts +483 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task.js +60 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/dist/task.js.map +1 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/package.json +54 -0
- package/node_modules/@pome-sh/sdk/node_modules/@pome-sh/shared-types/trace-contract.json +41 -0
- package/node_modules/@pome-sh/sdk/package.json +6 -2
- package/node_modules/@pome-sh/shared-types/dist/errors.d.ts +39 -0
- package/node_modules/@pome-sh/shared-types/dist/errors.js +33 -0
- package/node_modules/@pome-sh/shared-types/dist/errors.js.map +1 -0
- package/node_modules/@pome-sh/shared-types/dist/finalize-shapes.d.ts +252 -0
- package/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js +122 -0
- package/node_modules/@pome-sh/shared-types/dist/finalize-shapes.js.map +1 -0
- package/node_modules/@pome-sh/shared-types/dist/identity.d.ts +90 -0
- package/node_modules/@pome-sh/shared-types/dist/identity.js +72 -0
- package/node_modules/@pome-sh/shared-types/dist/identity.js.map +1 -0
- package/node_modules/@pome-sh/shared-types/dist/index.d.ts +13 -1353
- package/node_modules/@pome-sh/shared-types/dist/index.js +14 -568
- package/node_modules/@pome-sh/shared-types/dist/index.js.map +1 -1
- package/node_modules/@pome-sh/shared-types/dist/otel/event-schema.d.ts +45 -0
- package/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js +8 -0
- package/node_modules/@pome-sh/shared-types/dist/otel/legacy-shim.js.map +1 -1
- package/node_modules/@pome-sh/shared-types/dist/otel/semconv.js +7 -0
- package/node_modules/@pome-sh/shared-types/dist/otel/semconv.js.map +1 -1
- package/node_modules/@pome-sh/shared-types/dist/recorder-events.d.ts +62 -0
- package/node_modules/@pome-sh/shared-types/dist/recorder-events.js +36 -0
- package/node_modules/@pome-sh/shared-types/dist/recorder-events.js.map +1 -1
- package/node_modules/@pome-sh/shared-types/dist/rest.d.ts +245 -0
- package/node_modules/@pome-sh/shared-types/dist/rest.js +303 -0
- package/node_modules/@pome-sh/shared-types/dist/rest.js.map +1 -0
- package/node_modules/@pome-sh/shared-types/dist/run.d.ts +7 -0
- package/node_modules/@pome-sh/shared-types/dist/run.js +4 -0
- package/node_modules/@pome-sh/shared-types/dist/run.js.map +1 -1
- package/node_modules/@pome-sh/shared-types/dist/seed-envelope.d.ts +14 -0
- package/node_modules/@pome-sh/shared-types/dist/seed-envelope.js +46 -0
- package/node_modules/@pome-sh/shared-types/dist/seed-envelope.js.map +1 -0
- package/node_modules/@pome-sh/shared-types/dist/seed-state.d.ts +446 -0
- package/node_modules/@pome-sh/shared-types/dist/seed-state.js +167 -0
- package/node_modules/@pome-sh/shared-types/dist/seed-state.js.map +1 -0
- package/node_modules/@pome-sh/shared-types/dist/sessions.d.ts +53 -0
- package/node_modules/@pome-sh/shared-types/dist/sessions.js +51 -0
- package/node_modules/@pome-sh/shared-types/dist/sessions.js.map +1 -0
- package/node_modules/@pome-sh/shared-types/dist/task.d.ts +485 -0
- package/node_modules/@pome-sh/shared-types/dist/task.js +60 -0
- package/node_modules/@pome-sh/shared-types/dist/task.js.map +1 -0
- package/node_modules/@pome-sh/shared-types/package.json +2 -1
- package/node_modules/@pome-sh/shared-types/trace-contract.json +1 -1
- package/node_modules/@pome-sh/twin-github/FIDELITY.md +127 -67
- package/node_modules/@pome-sh/twin-github/README.md +3 -7
- package/node_modules/@pome-sh/twin-github/dist/examples/claude-github-agent.js +4 -20
- package/node_modules/@pome-sh/twin-github/dist/examples/claude-github-agent.js.map +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/access-control.d.ts +3 -3
- package/node_modules/@pome-sh/twin-github/dist/src/domain.d.ts +141 -3
- package/node_modules/@pome-sh/twin-github/dist/src/domain.js +0 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain.js.map +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/routes.js +2 -0
- package/node_modules/@pome-sh/twin-github/dist/src/routes.js.map +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/seed.d.ts +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/serializers.d.ts +2 -2
- package/node_modules/@pome-sh/twin-github/dist/src/server.js +7 -6
- package/node_modules/@pome-sh/twin-github/dist/src/server.js.map +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/tools.d.ts +168 -18
- package/node_modules/@pome-sh/twin-github/dist/src/tools.js +23 -0
- package/node_modules/@pome-sh/twin-github/dist/src/tools.js.map +1 -1
- package/node_modules/@pome-sh/twin-github/fidelity.inventory.json +773 -0
- package/node_modules/@pome-sh/twin-github/package.json +5 -4
- package/node_modules/@pome-sh/twin-slack/FIDELITY.md +121 -35
- package/node_modules/@pome-sh/twin-slack/README.md +2 -6
- package/node_modules/@pome-sh/twin-slack/dist/scripts/fidelity-parity.d.ts +1 -0
- package/node_modules/@pome-sh/twin-slack/dist/scripts/fidelity-parity.js +92 -0
- package/node_modules/@pome-sh/twin-slack/dist/scripts/fidelity-parity.js.map +1 -0
- package/node_modules/@pome-sh/twin-slack/dist/scripts/smoke.js +3 -3
- package/node_modules/@pome-sh/twin-slack/dist/scripts/smoke.js.map +1 -1
- package/node_modules/@pome-sh/twin-slack/dist/scripts/validate-mcp.js +1 -1
- package/node_modules/@pome-sh/twin-slack/dist/scripts/validate-mcp.js.map +1 -1
- package/node_modules/@pome-sh/twin-slack/dist/src/server.js +7 -6
- package/node_modules/@pome-sh/twin-slack/dist/src/server.js.map +1 -1
- package/node_modules/@pome-sh/twin-slack/dist/src/tools.d.ts +30 -4
- package/node_modules/@pome-sh/twin-slack/dist/src/tools.js +48 -1
- package/node_modules/@pome-sh/twin-slack/dist/src/tools.js.map +1 -1
- package/node_modules/@pome-sh/twin-slack/fidelity.inventory.json +377 -0
- package/node_modules/@pome-sh/twin-slack/package.json +5 -4
- package/node_modules/@pome-sh/twin-stripe/FIDELITY.md +151 -50
- package/node_modules/@pome-sh/twin-stripe/README.md +42 -45
- package/node_modules/@pome-sh/twin-stripe/dist/scripts/fidelity-parity.d.ts +1 -0
- package/node_modules/@pome-sh/twin-stripe/dist/scripts/fidelity-parity.js +186 -0
- package/node_modules/@pome-sh/twin-stripe/dist/scripts/fidelity-parity.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/dist/scripts/smoke.js +8 -4
- package/node_modules/@pome-sh/twin-stripe/dist/scripts/smoke.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/db.js +26 -2
- package/node_modules/@pome-sh/twin-stripe/dist/src/db.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/billing.d.ts +101 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/billing.js +195 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/billing.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/charges.d.ts +15 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/charges.js +17 -5
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/charges.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/customers.d.ts +47 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/customers.js +103 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/customers.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/events.d.ts +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/events.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/index.d.ts +6 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/index.js +3 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/index.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-intents.d.ts +61 -2
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-intents.js +214 -52
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-intents.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-methods.d.ts +45 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-methods.js +159 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/payment-methods.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/refunds.d.ts +6 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/refunds.js +16 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/refunds.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/schema.d.ts +1 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/schema.js +144 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/schema.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/stripe-domain.d.ts +420 -43
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/stripe-domain.js +442 -13
- package/node_modules/@pome-sh/twin-stripe/dist/src/domain/stripe-domain.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/errors.d.ts +19 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/errors.js +15 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/errors.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/ids.d.ts +2 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/ids.js +2 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/ids.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/_helpers.d.ts +8 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/_helpers.js +105 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/_helpers.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/billing.d.ts +4 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/billing.js +117 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/billing.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/customers.d.ts +4 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/customers.js +47 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/customers.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/index.js +6 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/index.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/payment-intents.js +28 -102
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/payment-intents.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/payment-methods.d.ts +4 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/payment-methods.js +33 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/payment-methods.js.map +1 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/seed.d.ts +10 -8
- package/node_modules/@pome-sh/twin-stripe/dist/src/seed.js +3 -2
- package/node_modules/@pome-sh/twin-stripe/dist/src/seed.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/serializers.d.ts +181 -21
- package/node_modules/@pome-sh/twin-stripe/dist/src/serializers.js +257 -34
- package/node_modules/@pome-sh/twin-stripe/dist/src/serializers.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/server.js +7 -6
- package/node_modules/@pome-sh/twin-stripe/dist/src/server.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/tools.d.ts +107 -5
- package/node_modules/@pome-sh/twin-stripe/dist/src/tools.js +139 -6
- package/node_modules/@pome-sh/twin-stripe/dist/src/tools.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/types.d.ts +73 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/upstream-types.d.ts +8 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/x402.js +6 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/x402.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/fidelity.inventory.json +425 -0
- package/node_modules/@pome-sh/twin-stripe/package.json +5 -4
- package/package.json +8 -8
- package/skills/pome-setup/SKILL.md +1 -1
package/dist/src/cli/session.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { chmod, mkdir, writeFile } from "node:fs/promises";
|
|
4
4
|
import { dirname } from "node:path";
|
|
5
|
-
import {
|
|
5
|
+
import { MOUNTED_TWINS } from "@pome-sh/shared-types";
|
|
6
|
+
import { createHostedClient, perTwinReturnedByCloud } from "../hosted/client.js";
|
|
6
7
|
import { HostedAuthError, HostedOrchError, HostedQuotaError, } from "../hosted/errors.js";
|
|
7
8
|
import { resolveCredentials } from "./credentials.js";
|
|
8
9
|
import { DEFAULT_DASHBOARD_URL } from "./defaults.js";
|
|
@@ -12,10 +13,13 @@ import { normalizeConfigAgentId, readProjectConfig } from "./project-config.js";
|
|
|
12
13
|
// standalone `pome twin start` path already appends `/mcp` in `cli/main.ts`;
|
|
13
14
|
// mirror that here so agents reading the printed value get a working MCP URL
|
|
14
15
|
// regardless of which side ships the fix first.
|
|
15
|
-
function ensureMcpSuffix(url) {
|
|
16
|
+
export function ensureMcpSuffix(url) {
|
|
16
17
|
return /\/mcp\/?$/.test(url) ? url : `${url.replace(/\/$/, "")}/mcp`;
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
+
// Multi-twin (M3): the CLI's ad-hoc session allowlist is the shared mounted-twin
|
|
20
|
+
// set (github, stripe, slack). Slack is now reachable; repeated `--twin` flags
|
|
21
|
+
// stand up a multi-twin session in one call.
|
|
22
|
+
const ALLOWED_TWINS = new Set(MOUNTED_TWINS);
|
|
19
23
|
function redactSession(res) {
|
|
20
24
|
const pcIn = res.provider_credentials;
|
|
21
25
|
const pcOut = {};
|
|
@@ -25,6 +29,9 @@ function redactSession(res) {
|
|
|
25
29
|
if (pcIn.stripe) {
|
|
26
30
|
pcOut.stripe = { ...pcIn.stripe, api_key: "***redacted***" };
|
|
27
31
|
}
|
|
32
|
+
if (pcIn.slack) {
|
|
33
|
+
pcOut.slack = { ...pcIn.slack, token: "***redacted***" };
|
|
34
|
+
}
|
|
28
35
|
return {
|
|
29
36
|
session_id: res.session_id,
|
|
30
37
|
session_token: res.session_token ? "***redacted***" : res.session_id,
|
|
@@ -36,34 +43,74 @@ function redactSession(res) {
|
|
|
36
43
|
agent_token: "***redacted***",
|
|
37
44
|
};
|
|
38
45
|
}
|
|
39
|
-
function formatEnvExport(res,
|
|
46
|
+
function formatEnvExport(res, twins) {
|
|
40
47
|
const lines = [
|
|
41
|
-
`# Pome hosted session — treat as secret.
|
|
48
|
+
`# Pome hosted session — treat as secret. Twins: ${twins.join(", ")}`,
|
|
42
49
|
`export POME_AUTH_TOKEN=${JSON.stringify(res.agent_token)}`,
|
|
43
50
|
`export POME_SESSION_ID=${JSON.stringify(res.session_id)}`,
|
|
51
|
+
// Legacy single-endpoint URL (= the primary twin's api_url). Kept for
|
|
52
|
+
// agents written against the pre-multi-twin contract.
|
|
44
53
|
`export POME_TWIN_URL=${JSON.stringify(res.twin_url)}`,
|
|
54
|
+
`export POME_TWIN_NAMES=${JSON.stringify(twins.join(","))}`,
|
|
45
55
|
];
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
if (
|
|
57
|
-
|
|
56
|
+
// Only trust per_twin.mcp_url when the cloud actually returned per_twin —
|
|
57
|
+
// the schema synthesizes mcp.pome.sh entries for old-cloud bodies, and those
|
|
58
|
+
// hosts don't serve MCP. Otherwise derive <api_url>/mcp (the legacy shape).
|
|
59
|
+
const fromCloud = perTwinReturnedByCloud(res);
|
|
60
|
+
// Multi-twin (M3): one POME_<TWIN>_{REST,MCP}_URL pair per twin, plus the
|
|
61
|
+
// provider-specific credential line. Loops per_twin so a github+slack session
|
|
62
|
+
// emits distinct endpoints for each.
|
|
63
|
+
for (const twin of twins) {
|
|
64
|
+
const upper = twin.toUpperCase();
|
|
65
|
+
const pt = res.per_twin?.[twin];
|
|
66
|
+
if (pt?.api_url) {
|
|
67
|
+
const mcpUrl = fromCloud ? ensureMcpSuffix(pt.mcp_url) : ensureMcpSuffix(pt.api_url);
|
|
68
|
+
lines.push(`export POME_${upper}_REST_URL=${JSON.stringify(pt.api_url)}`);
|
|
69
|
+
lines.push(`export POME_${upper}_MCP_URL=${JSON.stringify(mcpUrl)}`);
|
|
70
|
+
}
|
|
71
|
+
if (twin === "github") {
|
|
72
|
+
const gh = res.provider_credentials.github;
|
|
73
|
+
if (gh) {
|
|
74
|
+
lines.push(`export POME_GITHUB_TOKEN=${JSON.stringify(gh.token)}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else if (twin === "stripe") {
|
|
78
|
+
const st = res.provider_credentials.stripe;
|
|
79
|
+
if (st) {
|
|
80
|
+
lines.push(`export POME_STRIPE_API_KEY=${JSON.stringify(st.api_key)}`);
|
|
81
|
+
}
|
|
82
|
+
if (pt?.api_url) {
|
|
83
|
+
lines.push(`export POME_STRIPE_API_BASE=${JSON.stringify(pt.api_url)}`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
else if (twin === "slack") {
|
|
87
|
+
// The twin proxy verifies only the session JWT (agent_token) as bearer —
|
|
88
|
+
// the provider-specific Slack credential is NOT accepted at the proxy
|
|
89
|
+
// (same rationale as the Stripe api-key line in the hosted runner). So
|
|
90
|
+
// the agent's Slack bearer is the JWT, not provider_credentials.slack.token.
|
|
91
|
+
lines.push(`export POME_SLACK_TOKEN=${JSON.stringify(res.agent_token)}`);
|
|
58
92
|
}
|
|
59
93
|
}
|
|
60
94
|
return `${lines.join("\n")}\n`;
|
|
61
95
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
96
|
+
/** Normalize one-or-more `--twin` flags into a validated, de-duped twin list.
|
|
97
|
+
* Repeated flags stand up an ad-hoc multi-twin session; each is validated
|
|
98
|
+
* against MOUNTED_TWINS for a friendly error before the round-trip. */
|
|
99
|
+
export function normalizeSessionTwins(raw) {
|
|
100
|
+
const twins = raw.map((t) => t.trim().toLowerCase()).filter((t) => t.length > 0);
|
|
101
|
+
for (const twin of twins) {
|
|
102
|
+
if (!ALLOWED_TWINS.has(twin)) {
|
|
103
|
+
throw new Error(`Unknown twin "${twin}". Supported: ${[...ALLOWED_TWINS].join(", ")}.`);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
const deduped = [...new Set(twins)];
|
|
107
|
+
if (deduped.length === 0) {
|
|
108
|
+
throw new Error(`No twin specified. Pass --twin <name> (repeat for multi-twin). Supported: ${[...ALLOWED_TWINS].join(", ")}.`);
|
|
66
109
|
}
|
|
110
|
+
return deduped;
|
|
111
|
+
}
|
|
112
|
+
export async function runSessionCreate(opts) {
|
|
113
|
+
const twins = normalizeSessionTwins(opts.twins);
|
|
67
114
|
const creds = await resolveCredentials({ apiBaseUrl: opts.apiBaseUrl });
|
|
68
115
|
const client = createHostedClient({
|
|
69
116
|
baseUrl: creds.apiBaseUrl,
|
|
@@ -74,13 +121,13 @@ export async function runSessionCreate(opts) {
|
|
|
74
121
|
? normalizeConfigAgentId(configRead.config)
|
|
75
122
|
: undefined;
|
|
76
123
|
const session = await client.createSession({
|
|
77
|
-
twins
|
|
124
|
+
twins,
|
|
78
125
|
scenarioSource: "# ..\n",
|
|
79
126
|
idempotencyKey: randomUUID(),
|
|
80
127
|
agentId,
|
|
81
128
|
});
|
|
82
129
|
if (opts.secretsFile) {
|
|
83
|
-
await writeSecretsFile(opts.secretsFile, formatEnvExport(session,
|
|
130
|
+
await writeSecretsFile(opts.secretsFile, formatEnvExport(session, twins));
|
|
84
131
|
console.error(`Wrote session secrets to ${opts.secretsFile} (mode 0600).`);
|
|
85
132
|
}
|
|
86
133
|
if (opts.format === "json") {
|
|
@@ -98,11 +145,24 @@ export async function runSessionCreate(opts) {
|
|
|
98
145
|
}
|
|
99
146
|
console.error(`Session: ${session.session_id}`);
|
|
100
147
|
console.error(`Expires: ${session.expires_at}`);
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
148
|
+
// Multi-twin (M3): print one API/MCP line per twin so a github+slack session
|
|
149
|
+
// shows both endpoints. Falls back to the legacy bare twin_url on an older
|
|
150
|
+
// cloud that only ships it.
|
|
151
|
+
let printedAny = false;
|
|
152
|
+
const mcpFromCloud = perTwinReturnedByCloud(session);
|
|
153
|
+
for (const twin of twins) {
|
|
154
|
+
const pt = session.per_twin?.[twin];
|
|
155
|
+
if (pt) {
|
|
156
|
+
const label = twins.length > 1 ? `${twin} ` : "";
|
|
157
|
+
// Synthesized per_twin entries carry an mcp.pome.sh host that doesn't
|
|
158
|
+
// serve MCP — derive <api_url>/mcp unless the cloud returned per_twin.
|
|
159
|
+
const mcpUrl = mcpFromCloud ? ensureMcpSuffix(pt.mcp_url) : ensureMcpSuffix(pt.api_url);
|
|
160
|
+
console.error(`${label}API: ${pt.api_url}`);
|
|
161
|
+
console.error(`${label}MCP: ${mcpUrl}`);
|
|
162
|
+
printedAny = true;
|
|
163
|
+
}
|
|
104
164
|
}
|
|
105
|
-
|
|
165
|
+
if (!printedAny) {
|
|
106
166
|
// Fallback for older cloud responses that only ship twin_url. Drop the
|
|
107
167
|
// "(legacy)" label that confused users into thinking the URL was
|
|
108
168
|
// deprecated (F21) — it's just the un-disambiguated single endpoint.
|
package/dist/src/demo/runDemo.js
CHANGED
|
@@ -35,8 +35,8 @@ import { newGroupId } from "./ids.js";
|
|
|
35
35
|
import { mintDemoSessions } from "./mint.js";
|
|
36
36
|
import { criterionPhrase, evaluatingLine, reassuranceBox, summaryLines, trialLine, trialsHeaderLine, twinReadyLine, } from "./render.js";
|
|
37
37
|
import { DEMO_REPO, DEMO_TASK_NAME, demoTaskPath } from "./task.js";
|
|
38
|
-
/** Explicit finalize timeout — the
|
|
39
|
-
*
|
|
38
|
+
/** Explicit overall finalize timeout — the demo judge measured 5-8s, 60s is
|
|
39
|
+
* belt-and-braces ([DECISION]). */
|
|
40
40
|
const DEMO_FINALIZE_TIMEOUT_MS = 60_000;
|
|
41
41
|
export async function runDemo(options) {
|
|
42
42
|
const out = options.out ?? ((line) => console.error(line));
|
|
@@ -50,6 +50,7 @@ export async function runDemo(options) {
|
|
|
50
50
|
apiKey: session.demo_token,
|
|
51
51
|
authScheme: "bearer",
|
|
52
52
|
timeoutMs: DEMO_FINALIZE_TIMEOUT_MS,
|
|
53
|
+
finalizeTimeoutMs: DEMO_FINALIZE_TIMEOUT_MS,
|
|
53
54
|
}));
|
|
54
55
|
const groupId = newGroupId();
|
|
55
56
|
const scenarioPath = demoTaskPath();
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
import { type CreateEvalSessionResponse, type CreateSessionResponse, type CriterionDef, type FinalizeResponse, type SessionPublic, type SubmitResultResponse, type CriterionResult, type Lane, type Step } from "../types/shared.js";
|
|
1
|
+
import { type CreateEvalSessionResponse, type CreateSessionResponse, type CriterionDef, type FinalizeResponse, type SessionPublic, type SubmitResultResponse, type CriterionResult, type Lane, type PerTwinStateKeys, type Step } from "../types/shared.js";
|
|
2
|
+
/** True when the cloud's create-session body actually returned a `per_twin`
|
|
3
|
+
* key (empty `{}` counts) — i.e. `per_twin` was NOT synthesized by the schema
|
|
4
|
+
* from a legacy `twin_url`-only response. Consumers use this to decide whether
|
|
5
|
+
* `per_twin[twin].mcp_url` is trustworthy. */
|
|
6
|
+
export declare function perTwinReturnedByCloud(session: CreateSessionResponse): boolean;
|
|
7
|
+
/** Whether a raw create-session wire body carried a usable `per_twin` map
|
|
8
|
+
* (before schema synthesis). A `per_twin: null` counts as absent — the schema
|
|
9
|
+
* would synthesize entries for it, and synthesized URLs must not be trusted.
|
|
10
|
+
* Exported so the runner's env unit test can model the exact provenance the
|
|
11
|
+
* client stamps. */
|
|
12
|
+
export declare function rawBodyHadPerTwin(raw: unknown): boolean;
|
|
2
13
|
export interface HostedClientConfig {
|
|
3
14
|
baseUrl: string;
|
|
4
15
|
/** Team API key (`pme_…`) — or, with `authScheme: "bearer"`, a
|
|
@@ -7,6 +18,13 @@ export interface HostedClientConfig {
|
|
|
7
18
|
/** Per-request timeout. Defaults to 30s; the cloud's own twin spawn is
|
|
8
19
|
* ~2s cold but we leave headroom for GHCR pulls. */
|
|
9
20
|
timeoutMs?: number;
|
|
21
|
+
/** Overall time allowed for finalize request + asynchronous polling to
|
|
22
|
+
* reach a terminal state. Defaults to five minutes. */
|
|
23
|
+
finalizeTimeoutMs?: number;
|
|
24
|
+
/** Initial async-finalize polling delay. Defaults to 500ms. */
|
|
25
|
+
finalizePollInitialDelayMs?: number;
|
|
26
|
+
/** Maximum async-finalize polling delay. Defaults to 5s. */
|
|
27
|
+
finalizePollMaxDelayMs?: number;
|
|
10
28
|
/** FDRS-643 — how the credential travels. "x-api-key" (default) is the
|
|
11
29
|
* team-key contract. "bearer" sends `Authorization: Bearer <apiKey>` for
|
|
12
30
|
* the session-token surface (upload-url/finalize accept a sid-scoped JWT
|
|
@@ -86,9 +104,17 @@ export interface StateUploadUrlEntry {
|
|
|
86
104
|
url: string;
|
|
87
105
|
key: string;
|
|
88
106
|
}
|
|
107
|
+
export interface StateUploadUrlPair {
|
|
108
|
+
state_initial: StateUploadUrlEntry;
|
|
109
|
+
state_final: StateUploadUrlEntry;
|
|
110
|
+
}
|
|
89
111
|
export interface StateUploadUrlResponse {
|
|
90
112
|
state_initial: StateUploadUrlEntry;
|
|
91
113
|
state_final: StateUploadUrlEntry;
|
|
114
|
+
/** Multi-twin (M3): one initial/final URL+key pair per twin, keyed by twin
|
|
115
|
+
* id. Absent on single-twin sessions and on an older cloud, where the
|
|
116
|
+
* top-level pair (= primary twin) is authoritative. */
|
|
117
|
+
per_twin?: Record<string, StateUploadUrlPair>;
|
|
92
118
|
}
|
|
93
119
|
export interface SignalsUploadUrlResponse {
|
|
94
120
|
url: string;
|
|
@@ -114,6 +140,11 @@ export interface FinalizeInput {
|
|
|
114
140
|
stateInitialStorageKey?: string;
|
|
115
141
|
stateFinalStorageKey?: string;
|
|
116
142
|
signalsStorageKey?: string;
|
|
143
|
+
perTwinStateKeys?: PerTwinStateKeys;
|
|
144
|
+
}
|
|
145
|
+
export interface FinalizeOptions {
|
|
146
|
+
/** Cancels the finalize POST, any status request, or a pending poll delay. */
|
|
147
|
+
signal?: AbortSignal;
|
|
117
148
|
}
|
|
118
149
|
export interface HostedClient {
|
|
119
150
|
createSession(input: CreateSessionInput): Promise<CreateSessionResponse>;
|
|
@@ -128,7 +159,7 @@ export interface HostedClient {
|
|
|
128
159
|
fetchState(input: FetchOnTwinInput): Promise<unknown>;
|
|
129
160
|
fetchEvents(input: FetchOnTwinInput): Promise<unknown[]>;
|
|
130
161
|
/** ADR-013 — authoritative run finalize. Cloud judges and returns the score. */
|
|
131
|
-
finalize(sessionId: string, input: FinalizeInput): Promise<FinalizeResponse>;
|
|
162
|
+
finalize(sessionId: string, input: FinalizeInput, options?: FinalizeOptions): Promise<FinalizeResponse>;
|
|
132
163
|
/**
|
|
133
164
|
* @deprecated Use `finalize` instead. `/v1/sessions/:id/result` is a shim
|
|
134
165
|
* kept for ≥1 OSS CLI release per ADR-013; cloud ignores the CLI-supplied
|
|
@@ -145,10 +176,15 @@ export interface HostedClient {
|
|
|
145
176
|
errorCode?: string;
|
|
146
177
|
}): Promise<AbandonSessionResponse>;
|
|
147
178
|
requestEventsUploadUrl(sessionId: string): Promise<EventsUploadUrlResponse>;
|
|
148
|
-
|
|
179
|
+
/** Multi-twin (M3): pass `twins` (>1) to receive a per-twin URL+key pair
|
|
180
|
+
* under `per_twin` in addition to the top-level primary-twin pair. Omit for
|
|
181
|
+
* single-twin sessions. An older cloud ignores the body and returns only
|
|
182
|
+
* the top-level pair. */
|
|
183
|
+
requestStateUploadUrl(sessionId: string, twins?: string[]): Promise<StateUploadUrlResponse>;
|
|
149
184
|
/** F0-4 / L7 — mint a signed PUT for `signals.jsonl` (adapter-emitted
|
|
150
|
-
* HookEvent / ToolUseEvent /
|
|
151
|
-
* `key` flows into
|
|
185
|
+
* HookEvent / ToolUseEvent / ToolResultEvent / SubagentSpawnEvent /
|
|
186
|
+
* LlmTurnEvent rows). The returned `key` flows into
|
|
187
|
+
* `FinalizeInput.signalsStorageKey`. */
|
|
152
188
|
requestSignalsUploadUrl(sessionId: string): Promise<SignalsUploadUrlResponse>;
|
|
153
189
|
/** D18.1 — mint a signed PUT for meta.json. See `MetaUploadUrlResponse`
|
|
154
190
|
* for the feature-detection contract (a 404 here means an older control
|