@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
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
// file-size: one serializer per Stripe resource the twin emits — splitting the anchored emitters would scatter the FDRS-478 shape-anchor discipline across modules.
|
|
1
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
3
|
//
|
|
3
4
|
// Row → Stripe-shape JSON serializers. Owned by AGENT-B.
|
|
4
5
|
// Mirrors twin-github/src/serializers.ts in spirit — pure functions,
|
|
5
6
|
// row in / object out.
|
|
6
7
|
import { STRIPE_API_VERSION } from "./domain/constants.js";
|
|
8
|
+
import { piTypes } from "./domain/payment-intents.js";
|
|
7
9
|
export function paymentIntentJson(row) {
|
|
8
10
|
// LIFT via named, type-annotated variable spread (the github `parentRef` trick:
|
|
9
11
|
// a spread from a named variable bypasses TS excess-property checks, so the
|
|
@@ -15,13 +17,25 @@ export function paymentIntentJson(row) {
|
|
|
15
17
|
// • wire-version delta (ST-DIV-015): the twin still emits `invoice` (faithful
|
|
16
18
|
// to wire apiVersion 2026-03-04.preview); the anchor library stripe@22.2.0
|
|
17
19
|
// (2026-05-27.dahlia) DROPPED `invoice` from PaymentIntent.
|
|
20
|
+
// Card PIs (F-731) carry Stripe's default card options instead of the
|
|
21
|
+
// crypto rail. piTypes is the one rail predicate (domain uses it too).
|
|
22
|
+
const types = piTypes(row);
|
|
18
23
|
const wireLift = {
|
|
19
|
-
payment_method_options:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
payment_method_options: types.includes("card")
|
|
25
|
+
? {
|
|
26
|
+
card: {
|
|
27
|
+
installments: null,
|
|
28
|
+
mandate_options: null,
|
|
29
|
+
network: null,
|
|
30
|
+
request_three_d_secure: "automatic",
|
|
31
|
+
},
|
|
32
|
+
}
|
|
33
|
+
: {
|
|
34
|
+
crypto: {
|
|
35
|
+
mode: "deposit",
|
|
36
|
+
deposit_options: { networks: ["base"] },
|
|
37
|
+
},
|
|
23
38
|
},
|
|
24
|
-
},
|
|
25
39
|
invoice: null,
|
|
26
40
|
};
|
|
27
41
|
return {
|
|
@@ -44,17 +58,20 @@ export function paymentIntentJson(row) {
|
|
|
44
58
|
confirmation_method: row.confirmation_method,
|
|
45
59
|
created: row.created,
|
|
46
60
|
currency: row.currency,
|
|
47
|
-
customer:
|
|
61
|
+
customer: row.customer_id,
|
|
48
62
|
description: null,
|
|
49
|
-
|
|
63
|
+
// Card declines (F-731): the last failed attempt, parsed from the row.
|
|
64
|
+
// The stored blob is Stripe's LastPaymentError shape; narrow for the
|
|
65
|
+
// type anchor only (FDRS-454), runtime unchanged.
|
|
66
|
+
last_payment_error: parseJson(row.last_payment_error_json, null),
|
|
50
67
|
latest_charge: row.latest_charge_id,
|
|
51
68
|
livemode: false,
|
|
52
69
|
metadata: parseJson(row.metadata_json, {}),
|
|
53
70
|
next_action: row.status === "requires_action" ? parseJson(row.next_action_json, null) : null,
|
|
54
71
|
on_behalf_of: null,
|
|
55
|
-
payment_method:
|
|
72
|
+
payment_method: row.payment_method_id,
|
|
56
73
|
payment_method_configuration_details: null,
|
|
57
|
-
payment_method_types:
|
|
74
|
+
payment_method_types: types,
|
|
58
75
|
processing: null,
|
|
59
76
|
receipt_email: null,
|
|
60
77
|
review: null,
|
|
@@ -74,6 +91,22 @@ export function chargeJson(row) {
|
|
|
74
91
|
// (2026-05-27.dahlia) DROPPED `invoice` from Charge. Named-variable spread so the
|
|
75
92
|
// divergent field is allowed while every directly-written field stays checked.
|
|
76
93
|
const wireLift = { invoice: null };
|
|
94
|
+
const failed = row.status === "failed";
|
|
95
|
+
// Card charges (F-731) store their PM details at mint time; crypto
|
|
96
|
+
// charges keep the x402 deposit rail shape.
|
|
97
|
+
const paymentMethodDetails = parseJson(row.payment_method_details_json, {
|
|
98
|
+
type: "crypto",
|
|
99
|
+
crypto: {
|
|
100
|
+
// Upstream `Charge.PaymentMethodDetails.Crypto.{buyer_address,transaction_hash}`
|
|
101
|
+
// are `string | undefined`; the twin surfaces `null` pre-settlement (no
|
|
102
|
+
// on-chain tx yet). Narrow the pre-resolution null for the type anchor only
|
|
103
|
+
// (FDRS-454), runtime value (null) unchanged.
|
|
104
|
+
buyer_address: null,
|
|
105
|
+
network: "base",
|
|
106
|
+
token_currency: "usdc",
|
|
107
|
+
transaction_hash: null,
|
|
108
|
+
},
|
|
109
|
+
});
|
|
77
110
|
return {
|
|
78
111
|
id: row.id,
|
|
79
112
|
object: "charge",
|
|
@@ -94,39 +127,39 @@ export function chargeJson(row) {
|
|
|
94
127
|
captured: Boolean(row.captured),
|
|
95
128
|
created: row.created,
|
|
96
129
|
currency: row.currency,
|
|
97
|
-
customer:
|
|
130
|
+
customer: row.customer_id,
|
|
98
131
|
description: null,
|
|
99
132
|
disputed: false,
|
|
100
133
|
failure_balance_transaction: null,
|
|
101
|
-
|
|
102
|
-
|
|
134
|
+
// Twin failure columns carry Stripe's literal decline codes; the row
|
|
135
|
+
// type is a free `string`. Narrow for the type anchor only (FDRS-454).
|
|
136
|
+
failure_code: row.failure_code,
|
|
137
|
+
failure_message: row.failure_message,
|
|
103
138
|
fraud_details: {},
|
|
104
139
|
livemode: false,
|
|
105
140
|
metadata: {},
|
|
106
141
|
on_behalf_of: null,
|
|
107
|
-
outcome:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
142
|
+
outcome: failed
|
|
143
|
+
? {
|
|
144
|
+
network_status: "declined_by_network",
|
|
145
|
+
reason: row.failure_decline_code,
|
|
146
|
+
risk_level: "normal",
|
|
147
|
+
seller_message: "The bank did not return any further details with this decline.",
|
|
148
|
+
type: "issuer_declined",
|
|
149
|
+
}
|
|
150
|
+
: {
|
|
151
|
+
network_status: "approved_by_network",
|
|
152
|
+
reason: null,
|
|
153
|
+
risk_level: "normal",
|
|
154
|
+
seller_message: "Payment complete.",
|
|
155
|
+
type: "authorized",
|
|
156
|
+
},
|
|
114
157
|
paid: row.status === "succeeded",
|
|
115
158
|
payment_intent: row.payment_intent_id,
|
|
116
|
-
payment_method:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
// Upstream `Charge.PaymentMethodDetails.Crypto.{buyer_address,transaction_hash}`
|
|
121
|
-
// are `string | undefined`; the twin surfaces `null` pre-settlement (no
|
|
122
|
-
// on-chain tx yet). Narrow the pre-resolution null for the type anchor only
|
|
123
|
-
// (FDRS-454), runtime value (null) unchanged.
|
|
124
|
-
buyer_address: null,
|
|
125
|
-
network: "base",
|
|
126
|
-
token_currency: "usdc",
|
|
127
|
-
transaction_hash: null,
|
|
128
|
-
},
|
|
129
|
-
},
|
|
159
|
+
payment_method: row.payment_method_id,
|
|
160
|
+
// Stored blob is spec-faithful (built from the PM row at mint time);
|
|
161
|
+
// narrow for the type anchor only (FDRS-454).
|
|
162
|
+
payment_method_details: paymentMethodDetails,
|
|
130
163
|
receipt_email: null,
|
|
131
164
|
receipt_number: null,
|
|
132
165
|
receipt_url: null,
|
|
@@ -149,7 +182,7 @@ export function refundJson(row) {
|
|
|
149
182
|
id: row.id,
|
|
150
183
|
object: "refund",
|
|
151
184
|
amount: row.amount,
|
|
152
|
-
balance_transaction:
|
|
185
|
+
balance_transaction: row.balance_transaction_id,
|
|
153
186
|
charge: row.charge_id,
|
|
154
187
|
created: row.created,
|
|
155
188
|
currency: row.currency,
|
|
@@ -164,6 +197,82 @@ export function refundJson(row) {
|
|
|
164
197
|
transfer_reversal: null,
|
|
165
198
|
};
|
|
166
199
|
}
|
|
200
|
+
export function customerJson(row) {
|
|
201
|
+
return {
|
|
202
|
+
id: row.id,
|
|
203
|
+
object: "customer",
|
|
204
|
+
address: null,
|
|
205
|
+
balance: 0,
|
|
206
|
+
created: row.created,
|
|
207
|
+
currency: null,
|
|
208
|
+
default_source: null,
|
|
209
|
+
delinquent: false,
|
|
210
|
+
description: row.description,
|
|
211
|
+
discount: null,
|
|
212
|
+
email: row.email,
|
|
213
|
+
invoice_settings: {
|
|
214
|
+
custom_fields: null,
|
|
215
|
+
default_payment_method: null,
|
|
216
|
+
footer: null,
|
|
217
|
+
rendering_options: null,
|
|
218
|
+
},
|
|
219
|
+
livemode: false,
|
|
220
|
+
metadata: parseJson(row.metadata_json, {}),
|
|
221
|
+
name: row.name,
|
|
222
|
+
phone: row.phone,
|
|
223
|
+
preferred_locales: [],
|
|
224
|
+
shipping: null,
|
|
225
|
+
tax_exempt: "none",
|
|
226
|
+
test_clock: null,
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Real Stripe serves this stub for DELETE and for every retrieve of a
|
|
231
|
+
* deleted customer — three fields, nothing else.
|
|
232
|
+
*/
|
|
233
|
+
export function deletedCustomerJson(row) {
|
|
234
|
+
return {
|
|
235
|
+
id: row.id,
|
|
236
|
+
object: "customer",
|
|
237
|
+
deleted: true,
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* The card block shared by PaymentMethod.card and (via the domain's
|
|
242
|
+
* cardChargeDetails) Charge.payment_method_details.card — one source so the
|
|
243
|
+
* two surfaces can never drift for the same PM.
|
|
244
|
+
*/
|
|
245
|
+
export function cardJson(row) {
|
|
246
|
+
return {
|
|
247
|
+
brand: row.card_brand,
|
|
248
|
+
exp_month: row.card_exp_month,
|
|
249
|
+
exp_year: row.card_exp_year,
|
|
250
|
+
fingerprint: row.card_fingerprint,
|
|
251
|
+
funding: "credit",
|
|
252
|
+
last4: row.card_last4,
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
export function paymentMethodJson(row) {
|
|
256
|
+
return {
|
|
257
|
+
id: row.id,
|
|
258
|
+
object: "payment_method",
|
|
259
|
+
billing_details: {
|
|
260
|
+
address: { city: null, country: null, line1: null, line2: null, postal_code: null, state: null },
|
|
261
|
+
email: null,
|
|
262
|
+
name: null,
|
|
263
|
+
phone: null,
|
|
264
|
+
},
|
|
265
|
+
card: cardJson(row),
|
|
266
|
+
created: row.created,
|
|
267
|
+
customer: row.customer_id,
|
|
268
|
+
livemode: false,
|
|
269
|
+
metadata: {},
|
|
270
|
+
// Twin row `type` is a free `string`; upstream `PaymentMethod.type` is a
|
|
271
|
+
// literal union. Narrow for the type anchor only (FDRS-454), runtime
|
|
272
|
+
// value ("card") unchanged.
|
|
273
|
+
type: row.type,
|
|
274
|
+
};
|
|
275
|
+
}
|
|
167
276
|
export function balanceTransactionJson(row) {
|
|
168
277
|
return {
|
|
169
278
|
id: row.id,
|
|
@@ -208,6 +317,120 @@ export function eventJson(row) {
|
|
|
208
317
|
type: row.type,
|
|
209
318
|
};
|
|
210
319
|
}
|
|
320
|
+
// ---------- Billing serializers (F-734, shape tier) ----------
|
|
321
|
+
//
|
|
322
|
+
// Faithful subsets served off stored rows — the anchor is the entire shape
|
|
323
|
+
// check here; there is no semantic machine behind these objects (no events,
|
|
324
|
+
// no invoices, no billing-cycle arithmetic; see FIDELITY.md).
|
|
325
|
+
export function productJson(row) {
|
|
326
|
+
return {
|
|
327
|
+
id: row.id,
|
|
328
|
+
object: "product",
|
|
329
|
+
active: Boolean(row.active),
|
|
330
|
+
created: row.created,
|
|
331
|
+
default_price: null,
|
|
332
|
+
description: row.description,
|
|
333
|
+
images: [],
|
|
334
|
+
livemode: false,
|
|
335
|
+
marketing_features: [],
|
|
336
|
+
metadata: parseJson(row.metadata_json, {}),
|
|
337
|
+
name: row.name,
|
|
338
|
+
package_dimensions: null,
|
|
339
|
+
shippable: null,
|
|
340
|
+
tax_code: null,
|
|
341
|
+
type: "service",
|
|
342
|
+
unit_label: null,
|
|
343
|
+
updated: row.updated,
|
|
344
|
+
url: null,
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
export function priceJson(row) {
|
|
348
|
+
const recurring = row.recurring_interval
|
|
349
|
+
? {
|
|
350
|
+
// Twin row `recurring_interval` is a free `string`; upstream
|
|
351
|
+
// `Price.Recurring.interval` is a literal union. Narrow for the type
|
|
352
|
+
// anchor only (FDRS-454), runtime unchanged.
|
|
353
|
+
interval: row.recurring_interval,
|
|
354
|
+
interval_count: row.recurring_interval_count ?? 1,
|
|
355
|
+
meter: null,
|
|
356
|
+
usage_type: "licensed",
|
|
357
|
+
}
|
|
358
|
+
: null;
|
|
359
|
+
return {
|
|
360
|
+
id: row.id,
|
|
361
|
+
object: "price",
|
|
362
|
+
active: Boolean(row.active),
|
|
363
|
+
billing_scheme: "per_unit",
|
|
364
|
+
created: row.created,
|
|
365
|
+
currency: row.currency,
|
|
366
|
+
custom_unit_amount: null,
|
|
367
|
+
livemode: false,
|
|
368
|
+
lookup_key: row.lookup_key,
|
|
369
|
+
metadata: parseJson(row.metadata_json, {}),
|
|
370
|
+
nickname: row.nickname,
|
|
371
|
+
product: row.product_id,
|
|
372
|
+
recurring,
|
|
373
|
+
tax_behavior: "unspecified",
|
|
374
|
+
tiers_mode: null,
|
|
375
|
+
transform_quantity: null,
|
|
376
|
+
type: recurring ? "recurring" : "one_time",
|
|
377
|
+
unit_amount: row.unit_amount,
|
|
378
|
+
unit_amount_decimal: row.unit_amount === null ? null : String(row.unit_amount),
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Subscription with expanded item prices (upstream `SubscriptionItem.price`
|
|
383
|
+
* is the full Price object, so the caller resolves each item's PriceRow).
|
|
384
|
+
* `current_period_start/end` are deliberately OMITTED from the items — the
|
|
385
|
+
* shape tier carries no billing-cycle arithmetic (documented divergence).
|
|
386
|
+
*/
|
|
387
|
+
export function subscriptionJson(row, itemPrices) {
|
|
388
|
+
const items = parseJson(row.items_json, []);
|
|
389
|
+
const firstPrice = items[0] ? itemPrices.get(items[0].price) : undefined;
|
|
390
|
+
const itemsData = items.map((item) => {
|
|
391
|
+
const price = itemPrices.get(item.price);
|
|
392
|
+
return {
|
|
393
|
+
id: item.id,
|
|
394
|
+
object: "subscription_item",
|
|
395
|
+
created: row.created,
|
|
396
|
+
metadata: {},
|
|
397
|
+
// Anchor bridge: every stored item price resolves (referential check at
|
|
398
|
+
// create time); the Map lookup type keeps `undefined` in the signature.
|
|
399
|
+
price: (price ? priceJson(price) : undefined),
|
|
400
|
+
quantity: item.quantity,
|
|
401
|
+
subscription: row.id,
|
|
402
|
+
};
|
|
403
|
+
});
|
|
404
|
+
return {
|
|
405
|
+
id: row.id,
|
|
406
|
+
object: "subscription",
|
|
407
|
+
billing_cycle_anchor: row.created,
|
|
408
|
+
cancel_at: null,
|
|
409
|
+
cancel_at_period_end: Boolean(row.cancel_at_period_end),
|
|
410
|
+
canceled_at: row.canceled_at,
|
|
411
|
+
collection_method: "charge_automatically",
|
|
412
|
+
created: row.created,
|
|
413
|
+
currency: firstPrice?.currency ?? "usd",
|
|
414
|
+
customer: row.customer_id,
|
|
415
|
+
days_until_due: null,
|
|
416
|
+
default_payment_method: null,
|
|
417
|
+
description: null,
|
|
418
|
+
ended_at: row.ended_at,
|
|
419
|
+
items: {
|
|
420
|
+
object: "list",
|
|
421
|
+
data: itemsData,
|
|
422
|
+
has_more: false,
|
|
423
|
+
url: `/v1/subscription_items?subscription=${row.id}`,
|
|
424
|
+
},
|
|
425
|
+
latest_invoice: null,
|
|
426
|
+
livemode: false,
|
|
427
|
+
metadata: parseJson(row.metadata_json, {}),
|
|
428
|
+
start_date: row.created,
|
|
429
|
+
status: row.status,
|
|
430
|
+
trial_end: null,
|
|
431
|
+
trial_start: null,
|
|
432
|
+
};
|
|
433
|
+
}
|
|
211
434
|
/**
|
|
212
435
|
* Stripe-shape paginated list. Real Stripe lists carry a `url` field (the
|
|
213
436
|
* canonical path of the resource type), `data`, and `has_more`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializers.js","sourceRoot":"","sources":["../../src/serializers.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,yDAAyD;AACzD,qEAAqE;AACrE,uBAAuB;AAavB,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,UAAU,iBAAiB,CAA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7
7
|
// `serve()`. Listens on :3333 (Vercel Sandbox port-forward target) and
|
|
8
8
|
// honors STRIPE_CLONE_HOST=0.0.0.0 in containerized envs.
|
|
9
|
-
import {
|
|
9
|
+
import { ensureTwinAuthSecret, resolveRecorderStore, serve } from "@pome-sh/sdk/server";
|
|
10
10
|
import { openTwinStripeDatabase } from "./db.js";
|
|
11
11
|
import { loadSeedFromEnv } from "./seed.js";
|
|
12
12
|
import { createStripeTwinDefinition } from "./twin.js";
|
|
13
13
|
const port = Number(process.env.PORT ?? process.env.STRIPE_CLONE_PORT ?? 3333);
|
|
14
14
|
const host = process.env.STRIPE_CLONE_HOST ?? "127.0.0.1";
|
|
15
15
|
const dbPath = process.env.STRIPE_CLONE_DB ?? ".stripe_clone/stripe.db";
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
// F-708: an env-injected TWIN_AUTH_SECRET always wins; a non-loopback bind
|
|
17
|
+
// with no env self-generates a secret and persists it at the compose-era
|
|
18
|
+
// contract location (.pome-data/stripe/secret). The engine's serve() runs
|
|
19
|
+
// the same guard; calling it here first keeps a failed boot from touching
|
|
20
|
+
// the filesystem (no db file is created).
|
|
21
|
+
ensureTwinAuthSecret("stripe", host);
|
|
21
22
|
const startedAtMs = Date.now();
|
|
22
23
|
const db = openTwinStripeDatabase(dbPath);
|
|
23
24
|
// POME_SEED_JSON (FDRS-353) is strict-parsed: a malformed cloud seed fails
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":";AACA,sCAAsC;AACtC,EAAE;AACF,wEAAwE;AACxE,uEAAuE;AACvE,qEAAqE;AACrE,uEAAuE;AACvE,0DAA0D;AAE1D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":";AACA,sCAAsC;AACtC,EAAE;AACF,wEAAwE;AACxE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,oBAAoB,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;IACrD,IAAI;IACJ,QAAQ,EAAE,IAAI;IACd,EAAE;IACF,IAAI;IACJ,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,OAAO;CAC1C,CAAC,CAAC;AAEH,OAAO,CAAC,GAAG,CAAC,mCAAmC,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;AAC/D,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;AAC5C,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,IAAI,IAAI,cAAc,CAAC,CAAC;AAExD,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;IAC3E,OAAO,CAAC,IAAI,CACV,4EAA4E;QAC1E,8EAA8E,CACjF,CAAC;AACJ,CAAC"}
|
|
@@ -2,11 +2,14 @@ import { z } from "zod";
|
|
|
2
2
|
import type { StripeDomain } from "./domain/index.js";
|
|
3
3
|
export declare const toolDefinitions: readonly [{
|
|
4
4
|
readonly name: "create_payment_intent";
|
|
5
|
-
readonly description: "Create a crypto-deposit
|
|
5
|
+
readonly description: "Create a PaymentIntent: crypto-deposit (the x402 entry point) or card (optionally with payment_method / customer / confirm).";
|
|
6
6
|
readonly schema: z.ZodObject<{
|
|
7
7
|
amount: z.ZodCoercedNumber<unknown>;
|
|
8
8
|
currency: z.ZodString;
|
|
9
|
-
payment_method_types: z.ZodArray<z.
|
|
9
|
+
payment_method_types: z.ZodArray<z.ZodEnum<{
|
|
10
|
+
crypto: "crypto";
|
|
11
|
+
card: "card";
|
|
12
|
+
}>>;
|
|
10
13
|
payment_method_options: z.ZodOptional<z.ZodObject<{
|
|
11
14
|
crypto: z.ZodObject<{
|
|
12
15
|
mode: z.ZodLiteral<"deposit">;
|
|
@@ -15,6 +18,9 @@ export declare const toolDefinitions: readonly [{
|
|
|
15
18
|
}, z.core.$strip>>;
|
|
16
19
|
}, z.core.$strip>;
|
|
17
20
|
}, z.core.$strip>>;
|
|
21
|
+
payment_method: z.ZodOptional<z.ZodString>;
|
|
22
|
+
customer: z.ZodOptional<z.ZodString>;
|
|
23
|
+
confirm: z.ZodOptional<z.ZodBoolean>;
|
|
18
24
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
19
25
|
capture_method: z.ZodOptional<z.ZodString>;
|
|
20
26
|
confirmation_method: z.ZodOptional<z.ZodString>;
|
|
@@ -39,9 +45,20 @@ export declare const toolDefinitions: readonly [{
|
|
|
39
45
|
}, z.core.$strip>;
|
|
40
46
|
}, {
|
|
41
47
|
readonly name: "confirm_payment_intent";
|
|
42
|
-
readonly description: "Confirm a PaymentIntent.
|
|
48
|
+
readonly description: "Confirm a PaymentIntent. Card PIs attempt the charge synchronously (magic test PMs decline); crypto-deposit PIs are idempotent here.";
|
|
43
49
|
readonly schema: z.ZodObject<{
|
|
44
50
|
id: z.ZodString;
|
|
51
|
+
payment_method: z.ZodOptional<z.ZodString>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
}, {
|
|
54
|
+
readonly name: "update_payment_intent";
|
|
55
|
+
readonly description: "Update a non-terminal PaymentIntent (amount, metadata, payment_method, customer). The card retry step: attach a new PM after a decline, then confirm again.";
|
|
56
|
+
readonly schema: z.ZodObject<{
|
|
57
|
+
id: z.ZodString;
|
|
58
|
+
amount: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
59
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
|
|
60
|
+
payment_method: z.ZodOptional<z.ZodString>;
|
|
61
|
+
customer: z.ZodOptional<z.ZodString>;
|
|
45
62
|
}, z.core.$strip>;
|
|
46
63
|
}, {
|
|
47
64
|
readonly name: "cancel_payment_intent";
|
|
@@ -103,6 +120,91 @@ export declare const toolDefinitions: readonly [{
|
|
|
103
120
|
}, z.core.$strip>]>>;
|
|
104
121
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
105
122
|
}, z.core.$strip>;
|
|
123
|
+
}, {
|
|
124
|
+
readonly name: "create_customer";
|
|
125
|
+
readonly description: "Create a customer. All fields optional, like real Stripe.";
|
|
126
|
+
readonly schema: z.ZodObject<{
|
|
127
|
+
name: z.ZodOptional<z.ZodString>;
|
|
128
|
+
email: z.ZodOptional<z.ZodString>;
|
|
129
|
+
description: z.ZodOptional<z.ZodString>;
|
|
130
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
131
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
132
|
+
}, z.core.$strip>;
|
|
133
|
+
}, {
|
|
134
|
+
readonly name: "retrieve_customer";
|
|
135
|
+
readonly description: "Retrieve a Customer by id. Deleted customers return the {deleted: true} stub.";
|
|
136
|
+
readonly schema: z.ZodObject<{
|
|
137
|
+
id: z.ZodString;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
}, {
|
|
140
|
+
readonly name: "update_customer";
|
|
141
|
+
readonly description: "Update a customer's fields. Metadata merges per-key; a null or empty value unsets the key.";
|
|
142
|
+
readonly schema: z.ZodObject<{
|
|
143
|
+
id: z.ZodString;
|
|
144
|
+
name: z.ZodOptional<z.ZodString>;
|
|
145
|
+
email: z.ZodOptional<z.ZodString>;
|
|
146
|
+
description: z.ZodOptional<z.ZodString>;
|
|
147
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
148
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
|
|
149
|
+
}, z.core.$strip>;
|
|
150
|
+
}, {
|
|
151
|
+
readonly name: "delete_customer";
|
|
152
|
+
readonly description: "Delete a customer (soft delete; its payment methods are detached).";
|
|
153
|
+
readonly schema: z.ZodObject<{
|
|
154
|
+
id: z.ZodString;
|
|
155
|
+
}, z.core.$strip>;
|
|
156
|
+
}, {
|
|
157
|
+
readonly name: "list_customers";
|
|
158
|
+
readonly description: "List customers with optional email / created filters.";
|
|
159
|
+
readonly schema: z.ZodObject<{
|
|
160
|
+
email: z.ZodOptional<z.ZodString>;
|
|
161
|
+
created: z.ZodOptional<z.ZodUnion<readonly [z.ZodCoercedNumber<unknown>, z.ZodObject<{
|
|
162
|
+
gt: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
163
|
+
gte: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
164
|
+
lt: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
165
|
+
lte: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
166
|
+
}, z.core.$strip>]>>;
|
|
167
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
}, {
|
|
170
|
+
readonly name: "list_customer_payment_methods";
|
|
171
|
+
readonly description: "List the payment methods attached to a customer.";
|
|
172
|
+
readonly schema: z.ZodObject<{
|
|
173
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
174
|
+
customer: z.ZodString;
|
|
175
|
+
type: z.ZodOptional<z.ZodString>;
|
|
176
|
+
}, z.core.$strip>;
|
|
177
|
+
}, {
|
|
178
|
+
readonly name: "create_payment_method";
|
|
179
|
+
readonly description: "Create a card payment method from test card details (e.g. number 4242424242424242).";
|
|
180
|
+
readonly schema: z.ZodObject<{
|
|
181
|
+
type: z.ZodLiteral<"card">;
|
|
182
|
+
card: z.ZodObject<{
|
|
183
|
+
number: z.ZodString;
|
|
184
|
+
exp_month: z.ZodCoercedNumber<unknown>;
|
|
185
|
+
exp_year: z.ZodCoercedNumber<unknown>;
|
|
186
|
+
cvc: z.ZodOptional<z.ZodString>;
|
|
187
|
+
}, z.core.$strip>;
|
|
188
|
+
}, z.core.$strip>;
|
|
189
|
+
}, {
|
|
190
|
+
readonly name: "retrieve_payment_method";
|
|
191
|
+
readonly description: "Retrieve a PaymentMethod by id.";
|
|
192
|
+
readonly schema: z.ZodObject<{
|
|
193
|
+
id: z.ZodString;
|
|
194
|
+
}, z.core.$strip>;
|
|
195
|
+
}, {
|
|
196
|
+
readonly name: "attach_payment_method";
|
|
197
|
+
readonly description: "Attach a payment method to a customer. One customer per PM; a detached PM cannot be reattached.";
|
|
198
|
+
readonly schema: z.ZodObject<{
|
|
199
|
+
id: z.ZodString;
|
|
200
|
+
customer: z.ZodString;
|
|
201
|
+
}, z.core.$strip>;
|
|
202
|
+
}, {
|
|
203
|
+
readonly name: "detach_payment_method";
|
|
204
|
+
readonly description: "Detach a payment method from its customer.";
|
|
205
|
+
readonly schema: z.ZodObject<{
|
|
206
|
+
id: z.ZodString;
|
|
207
|
+
}, z.core.$strip>;
|
|
106
208
|
}, {
|
|
107
209
|
readonly name: "retrieve_balance";
|
|
108
210
|
readonly description: "Retrieve the current balance (available + pending per currency).";
|
|
@@ -142,8 +244,8 @@ export declare const toolDefinitions: readonly [{
|
|
|
142
244
|
}];
|
|
143
245
|
export type ToolName = (typeof toolDefinitions)[number]["name"];
|
|
144
246
|
export declare function listTools(): {
|
|
145
|
-
name: "simulate_crypto_deposit" | "create_payment_intent" | "retrieve_payment_intent" | "list_payment_intents" | "confirm_payment_intent" | "cancel_payment_intent" | "retrieve_charge" | "list_charges" | "create_refund" | "retrieve_refund" | "list_refunds" | "retrieve_balance" | "list_balance_transactions" | "retrieve_event" | "list_events";
|
|
146
|
-
description: "Create a crypto-deposit
|
|
247
|
+
name: "simulate_crypto_deposit" | "create_payment_intent" | "retrieve_payment_intent" | "list_payment_intents" | "confirm_payment_intent" | "update_payment_intent" | "cancel_payment_intent" | "retrieve_charge" | "list_charges" | "create_refund" | "retrieve_refund" | "list_refunds" | "create_customer" | "retrieve_customer" | "update_customer" | "delete_customer" | "list_customers" | "list_customer_payment_methods" | "create_payment_method" | "retrieve_payment_method" | "attach_payment_method" | "detach_payment_method" | "retrieve_balance" | "list_balance_transactions" | "retrieve_event" | "list_events";
|
|
248
|
+
description: "Create a PaymentIntent: crypto-deposit (the x402 entry point) or card (optionally with payment_method / customer / confirm)." | "Retrieve a PaymentIntent by id." | "List PaymentIntents with optional filters." | "Confirm a PaymentIntent. Card PIs attempt the charge synchronously (magic test PMs decline); crypto-deposit PIs are idempotent here." | "Update a non-terminal PaymentIntent (amount, metadata, payment_method, customer). The card retry step: attach a new PM after a decline, then confirm again." | "Cancel a PaymentIntent. Refused once succeeded." | "Test helper: drive a crypto-deposit PI from requires_action through processing to succeeded." | "Retrieve a Charge by id." | "List charges with optional payment_intent / customer / created filters." | "Refund a charge, fully or partially. Stripe refuses a refund on a charge that is already fully refunded, or one that would exceed the remaining refundable amount." | "Retrieve a Refund by id." | "List refunds, optionally filtered by charge or payment_intent." | "Create a customer. All fields optional, like real Stripe." | "Retrieve a Customer by id. Deleted customers return the {deleted: true} stub." | "Update a customer's fields. Metadata merges per-key; a null or empty value unsets the key." | "Delete a customer (soft delete; its payment methods are detached)." | "List customers with optional email / created filters." | "List the payment methods attached to a customer." | "Create a card payment method from test card details (e.g. number 4242424242424242)." | "Retrieve a PaymentMethod by id." | "Attach a payment method to a customer. One customer per PM; a detached PM cannot be reattached." | "Detach a payment method from its customer." | "Retrieve the current balance (available + pending per currency)." | "List balance transactions (charges, refunds, fees)." | "Retrieve an event by id." | "List events. Filter by type and created.";
|
|
147
249
|
input_schema: unknown;
|
|
148
250
|
}[];
|
|
149
251
|
/** Names of tools that mutate state. The MCP route uses this for recorder annotation. */
|