@pome-sh/cli 0.1.0 → 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/doctor/checks.js +2 -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/db.d.ts +4 -4
- package/node_modules/@pome-sh/sdk/dist/db.js +93 -25
- package/node_modules/@pome-sh/sdk/dist/db.js.map +1 -1
- 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 +7 -7
- 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 +5 -8
- 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 -5
- 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.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 -5
- package/node_modules/@pome-sh/twin-stripe/FIDELITY.md +151 -50
- package/node_modules/@pome-sh/twin-stripe/README.md +44 -47
- 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 -5
- package/package.json +9 -10
- package/skills/pome-setup/SKILL.md +1 -1
- package/dist/src/recorder/verdictArtifact.d.ts +0 -71
- package/dist/src/recorder/verdictArtifact.js +0 -207
- package/dist/src/score/view.d.ts +0 -38
- package/dist/src/score/view.js +0 -59
- package/dist/src/twin/github/app.d.ts +0 -10
- package/dist/src/twin/github/app.js +0 -316
- package/dist/src/twin/github/db/migrations.d.ts +0 -2
- package/dist/src/twin/github/db/migrations.js +0 -64
- package/dist/src/twin/github/db/openDatabase.d.ts +0 -2
- package/dist/src/twin/github/db/openDatabase.js +0 -13
- package/dist/src/twin/github/db/queries.d.ts +0 -77
- package/dist/src/twin/github/db/queries.js +0 -93
- package/dist/src/twin/github/domain/seed.d.ts +0 -74
- package/dist/src/twin/github/domain/seed.js +0 -104
- package/dist/src/twin/github/domain/serializers.d.ts +0 -113
- package/dist/src/twin/github/domain/serializers.js +0 -76
- package/dist/src/twin/github/types.d.ts +0 -66
- package/dist/src/twin/github/types.js +0 -1
- package/dist/src/twin-github/app.d.ts +0 -9
- package/dist/src/twin-github/app.js +0 -327
- package/dist/src/twin-github/auth.d.ts +0 -16
- package/dist/src/twin-github/auth.js +0 -142
- package/dist/src/twin-github/build-info.d.ts +0 -7
- package/dist/src/twin-github/build-info.js +0 -52
- package/dist/src/twin-github/db.d.ts +0 -4
- package/dist/src/twin-github/db.js +0 -362
- package/dist/src/twin-github/domain.d.ts +0 -1649
- package/dist/src/twin-github/domain.js +0 -957
- package/dist/src/twin-github/errors.d.ts +0 -14
- package/dist/src/twin-github/errors.js +0 -34
- package/dist/src/twin-github/index.d.ts +0 -9
- package/dist/src/twin-github/index.js +0 -7
- package/dist/src/twin-github/mcp.d.ts +0 -17
- package/dist/src/twin-github/mcp.js +0 -281
- package/dist/src/twin-github/recorder.d.ts +0 -2
- package/dist/src/twin-github/recorder.js +0 -29
- package/dist/src/twin-github/seed.d.ts +0 -74
- package/dist/src/twin-github/seed.js +0 -107
- package/dist/src/twin-github/serializers.d.ts +0 -449
- package/dist/src/twin-github/serializers.js +0 -429
- package/dist/src/twin-github/server.js +0 -34
- package/dist/src/twin-github/tools.d.ts +0 -1545
- package/dist/src/twin-github/tools.js +0 -347
- package/dist/src/twin-github/types.d.ts +0 -198
- package/dist/src/twin-github/unsupported-envelope.d.ts +0 -10
- package/dist/src/twin-github/unsupported-envelope.js +0 -29
- package/dist/src/twin-github/util.d.ts +0 -13
- package/dist/src/twin-github/util.js +0 -61
- package/dist/src/twin-slack/app.d.ts +0 -17
- package/dist/src/twin-slack/app.js +0 -683
- package/dist/src/twin-slack/auth.d.ts +0 -38
- package/dist/src/twin-slack/auth.js +0 -219
- package/dist/src/twin-slack/build-info.d.ts +0 -7
- package/dist/src/twin-slack/build-info.js +0 -9
- package/dist/src/twin-slack/db.d.ts +0 -4
- package/dist/src/twin-slack/db.js +0 -213
- package/dist/src/twin-slack/domain.d.ts +0 -236
- package/dist/src/twin-slack/domain.js +0 -1293
- package/dist/src/twin-slack/errors.d.ts +0 -16
- package/dist/src/twin-slack/errors.js +0 -60
- package/dist/src/twin-slack/index.d.ts +0 -8
- package/dist/src/twin-slack/index.js +0 -8
- package/dist/src/twin-slack/mcp.d.ts +0 -17
- package/dist/src/twin-slack/mcp.js +0 -226
- package/dist/src/twin-slack/recorder.d.ts +0 -2
- package/dist/src/twin-slack/recorder.js +0 -15
- package/dist/src/twin-slack/seed.d.ts +0 -49
- package/dist/src/twin-slack/seed.js +0 -139
- package/dist/src/twin-slack/serializers.d.ts +0 -141
- package/dist/src/twin-slack/serializers.js +0 -377
- package/dist/src/twin-slack/tools.d.ts +0 -97
- package/dist/src/twin-slack/tools.js +0 -171
- package/dist/src/twin-slack/types.d.ts +0 -164
- package/dist/src/twin-slack/types.js +0 -1
- package/dist/src/twin-slack/unsupported-envelope.d.ts +0 -12
- package/dist/src/twin-slack/unsupported-envelope.js +0 -61
- package/dist/src/twin-slack/upstream-types.d.ts +0 -19
- package/dist/src/twin-slack/upstream-types.js +0 -1
- package/dist/src/twin-slack/util.d.ts +0 -31
- package/dist/src/twin-slack/util.js +0 -136
- package/node_modules/base64-js/LICENSE +0 -21
- package/node_modules/base64-js/README.md +0 -34
- package/node_modules/base64-js/base64js.min.js +0 -1
- package/node_modules/base64-js/index.d.ts +0 -3
- package/node_modules/base64-js/index.js +0 -150
- package/node_modules/base64-js/package.json +0 -47
- package/node_modules/better-sqlite3/LICENSE +0 -21
- package/node_modules/better-sqlite3/README.md +0 -99
- package/node_modules/better-sqlite3/binding.gyp +0 -38
- package/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
- package/node_modules/better-sqlite3/deps/common.gypi +0 -68
- package/node_modules/better-sqlite3/deps/copy.js +0 -31
- package/node_modules/better-sqlite3/deps/defines.gypi +0 -42
- package/node_modules/better-sqlite3/deps/download.sh +0 -123
- package/node_modules/better-sqlite3/deps/patches/1208.patch +0 -15
- package/node_modules/better-sqlite3/deps/sqlite3/sqlite3.c +0 -269395
- package/node_modules/better-sqlite3/deps/sqlite3/sqlite3.h +0 -14347
- package/node_modules/better-sqlite3/deps/sqlite3/sqlite3ext.h +0 -739
- package/node_modules/better-sqlite3/deps/sqlite3.gyp +0 -80
- package/node_modules/better-sqlite3/deps/test_extension.c +0 -21
- package/node_modules/better-sqlite3/lib/database.js +0 -90
- package/node_modules/better-sqlite3/lib/index.js +0 -3
- package/node_modules/better-sqlite3/lib/methods/aggregate.js +0 -43
- package/node_modules/better-sqlite3/lib/methods/backup.js +0 -67
- package/node_modules/better-sqlite3/lib/methods/function.js +0 -31
- package/node_modules/better-sqlite3/lib/methods/inspect.js +0 -7
- package/node_modules/better-sqlite3/lib/methods/pragma.js +0 -12
- package/node_modules/better-sqlite3/lib/methods/serialize.js +0 -16
- package/node_modules/better-sqlite3/lib/methods/table.js +0 -189
- package/node_modules/better-sqlite3/lib/methods/transaction.js +0 -78
- package/node_modules/better-sqlite3/lib/methods/wrappers.js +0 -54
- package/node_modules/better-sqlite3/lib/sqlite-error.js +0 -20
- package/node_modules/better-sqlite3/lib/util.js +0 -12
- package/node_modules/better-sqlite3/package.json +0 -59
- package/node_modules/better-sqlite3/src/addon.cpp +0 -47
- package/node_modules/better-sqlite3/src/better_sqlite3.cpp +0 -74
- package/node_modules/better-sqlite3/src/objects/backup.cpp +0 -120
- package/node_modules/better-sqlite3/src/objects/backup.hpp +0 -36
- package/node_modules/better-sqlite3/src/objects/database.cpp +0 -417
- package/node_modules/better-sqlite3/src/objects/database.hpp +0 -103
- package/node_modules/better-sqlite3/src/objects/statement-iterator.cpp +0 -113
- package/node_modules/better-sqlite3/src/objects/statement-iterator.hpp +0 -50
- package/node_modules/better-sqlite3/src/objects/statement.cpp +0 -383
- package/node_modules/better-sqlite3/src/objects/statement.hpp +0 -58
- package/node_modules/better-sqlite3/src/util/bind-map.cpp +0 -73
- package/node_modules/better-sqlite3/src/util/binder.cpp +0 -193
- package/node_modules/better-sqlite3/src/util/constants.cpp +0 -172
- package/node_modules/better-sqlite3/src/util/custom-aggregate.cpp +0 -121
- package/node_modules/better-sqlite3/src/util/custom-function.cpp +0 -59
- package/node_modules/better-sqlite3/src/util/custom-table.cpp +0 -409
- package/node_modules/better-sqlite3/src/util/data-converter.cpp +0 -17
- package/node_modules/better-sqlite3/src/util/data.cpp +0 -194
- package/node_modules/better-sqlite3/src/util/helpers.cpp +0 -109
- package/node_modules/better-sqlite3/src/util/macros.cpp +0 -90
- package/node_modules/better-sqlite3/src/util/query-macros.cpp +0 -71
- package/node_modules/better-sqlite3/src/util/row-builder.cpp +0 -49
- package/node_modules/bindings/LICENSE.md +0 -22
- package/node_modules/bindings/README.md +0 -98
- package/node_modules/bindings/bindings.js +0 -221
- package/node_modules/bindings/package.json +0 -28
- package/node_modules/bl/.travis.yml +0 -17
- package/node_modules/bl/BufferList.js +0 -396
- package/node_modules/bl/LICENSE.md +0 -13
- package/node_modules/bl/README.md +0 -247
- package/node_modules/bl/bl.js +0 -84
- package/node_modules/bl/package.json +0 -37
- package/node_modules/bl/test/convert.js +0 -21
- package/node_modules/bl/test/indexOf.js +0 -492
- package/node_modules/bl/test/isBufferList.js +0 -32
- package/node_modules/bl/test/test.js +0 -869
- package/node_modules/buffer/AUTHORS.md +0 -70
- package/node_modules/buffer/LICENSE +0 -21
- package/node_modules/buffer/README.md +0 -410
- package/node_modules/buffer/index.d.ts +0 -186
- package/node_modules/buffer/index.js +0 -1817
- package/node_modules/buffer/package.json +0 -96
- package/node_modules/chownr/LICENSE +0 -15
- package/node_modules/chownr/README.md +0 -3
- package/node_modules/chownr/chownr.js +0 -167
- package/node_modules/chownr/package.json +0 -29
- package/node_modules/decompress-response/index.d.ts +0 -22
- package/node_modules/decompress-response/index.js +0 -58
- package/node_modules/decompress-response/license +0 -9
- package/node_modules/decompress-response/package.json +0 -56
- package/node_modules/decompress-response/readme.md +0 -48
- package/node_modules/deep-extend/CHANGELOG.md +0 -46
- package/node_modules/deep-extend/LICENSE +0 -20
- package/node_modules/deep-extend/README.md +0 -91
- package/node_modules/deep-extend/index.js +0 -1
- package/node_modules/deep-extend/lib/deep-extend.js +0 -150
- package/node_modules/deep-extend/package.json +0 -62
- package/node_modules/detect-libc/LICENSE +0 -201
- package/node_modules/detect-libc/README.md +0 -163
- package/node_modules/detect-libc/index.d.ts +0 -14
- package/node_modules/detect-libc/lib/detect-libc.js +0 -313
- package/node_modules/detect-libc/lib/elf.js +0 -39
- package/node_modules/detect-libc/lib/filesystem.js +0 -51
- package/node_modules/detect-libc/lib/process.js +0 -24
- package/node_modules/detect-libc/package.json +0 -44
- package/node_modules/end-of-stream/LICENSE +0 -21
- package/node_modules/end-of-stream/README.md +0 -54
- package/node_modules/end-of-stream/index.js +0 -96
- package/node_modules/end-of-stream/package.json +0 -37
- package/node_modules/expand-template/.travis.yml +0 -6
- package/node_modules/expand-template/LICENSE +0 -21
- package/node_modules/expand-template/README.md +0 -43
- package/node_modules/expand-template/index.js +0 -26
- package/node_modules/expand-template/package.json +0 -29
- package/node_modules/expand-template/test.js +0 -67
- package/node_modules/file-uri-to-path/.npmignore +0 -1
- package/node_modules/file-uri-to-path/.travis.yml +0 -30
- package/node_modules/file-uri-to-path/History.md +0 -21
- package/node_modules/file-uri-to-path/LICENSE +0 -20
- package/node_modules/file-uri-to-path/README.md +0 -74
- package/node_modules/file-uri-to-path/index.d.ts +0 -2
- package/node_modules/file-uri-to-path/index.js +0 -66
- package/node_modules/file-uri-to-path/package.json +0 -32
- package/node_modules/file-uri-to-path/test/test.js +0 -24
- package/node_modules/file-uri-to-path/test/tests.json +0 -13
- package/node_modules/fs-constants/LICENSE +0 -21
- package/node_modules/fs-constants/README.md +0 -26
- package/node_modules/fs-constants/browser.js +0 -1
- package/node_modules/fs-constants/index.js +0 -1
- package/node_modules/fs-constants/package.json +0 -19
- package/node_modules/github-from-package/.travis.yml +0 -4
- package/node_modules/github-from-package/LICENSE +0 -18
- package/node_modules/github-from-package/example/package.json +0 -8
- package/node_modules/github-from-package/example/url.js +0 -3
- package/node_modules/github-from-package/index.js +0 -17
- package/node_modules/github-from-package/package.json +0 -30
- package/node_modules/github-from-package/readme.markdown +0 -53
- package/node_modules/github-from-package/test/a.json +0 -8
- package/node_modules/github-from-package/test/b.json +0 -5
- package/node_modules/github-from-package/test/c.json +0 -5
- package/node_modules/github-from-package/test/d.json +0 -7
- package/node_modules/github-from-package/test/e.json +0 -5
- package/node_modules/github-from-package/test/url.js +0 -19
- package/node_modules/ieee754/LICENSE +0 -11
- package/node_modules/ieee754/README.md +0 -51
- package/node_modules/ieee754/index.d.ts +0 -10
- package/node_modules/ieee754/index.js +0 -85
- package/node_modules/ieee754/package.json +0 -52
- package/node_modules/inherits/LICENSE +0 -16
- package/node_modules/inherits/README.md +0 -42
- package/node_modules/inherits/inherits.js +0 -9
- package/node_modules/inherits/inherits_browser.js +0 -27
- package/node_modules/inherits/package.json +0 -29
- package/node_modules/ini/LICENSE +0 -15
- package/node_modules/ini/README.md +0 -102
- package/node_modules/ini/ini.js +0 -206
- package/node_modules/ini/package.json +0 -33
- package/node_modules/mimic-response/index.d.ts +0 -17
- package/node_modules/mimic-response/index.js +0 -77
- package/node_modules/mimic-response/license +0 -9
- package/node_modules/mimic-response/package.json +0 -42
- package/node_modules/mimic-response/readme.md +0 -78
- package/node_modules/minimist/.eslintrc +0 -29
- package/node_modules/minimist/.github/FUNDING.yml +0 -12
- package/node_modules/minimist/.nycrc +0 -14
- package/node_modules/minimist/CHANGELOG.md +0 -298
- package/node_modules/minimist/LICENSE +0 -18
- package/node_modules/minimist/README.md +0 -121
- package/node_modules/minimist/example/parse.js +0 -4
- package/node_modules/minimist/index.js +0 -263
- package/node_modules/minimist/package.json +0 -75
- package/node_modules/minimist/test/all_bool.js +0 -34
- package/node_modules/minimist/test/bool.js +0 -177
- package/node_modules/minimist/test/dash.js +0 -43
- package/node_modules/minimist/test/default_bool.js +0 -37
- package/node_modules/minimist/test/dotted.js +0 -24
- package/node_modules/minimist/test/kv_short.js +0 -32
- package/node_modules/minimist/test/long.js +0 -33
- package/node_modules/minimist/test/num.js +0 -38
- package/node_modules/minimist/test/parse.js +0 -209
- package/node_modules/minimist/test/parse_modified.js +0 -11
- package/node_modules/minimist/test/proto.js +0 -64
- package/node_modules/minimist/test/short.js +0 -69
- package/node_modules/minimist/test/stop_early.js +0 -17
- package/node_modules/minimist/test/unknown.js +0 -104
- package/node_modules/minimist/test/whitespace.js +0 -10
- package/node_modules/mkdirp-classic/LICENSE +0 -21
- package/node_modules/mkdirp-classic/README.md +0 -18
- package/node_modules/mkdirp-classic/index.js +0 -98
- package/node_modules/mkdirp-classic/package.json +0 -18
- package/node_modules/napi-build-utils/.github/workflows/run-npm-tests.yml +0 -31
- package/node_modules/napi-build-utils/LICENSE +0 -21
- package/node_modules/napi-build-utils/README.md +0 -52
- package/node_modules/napi-build-utils/index.js +0 -214
- package/node_modules/napi-build-utils/index.md +0 -0
- package/node_modules/napi-build-utils/package.json +0 -42
- package/node_modules/node-abi/LICENSE +0 -21
- package/node_modules/node-abi/README.md +0 -54
- package/node_modules/node-abi/abi_registry.json +0 -453
- package/node_modules/node-abi/index.js +0 -179
- package/node_modules/node-abi/package.json +0 -45
- package/node_modules/once/LICENSE +0 -15
- package/node_modules/once/README.md +0 -79
- package/node_modules/once/once.js +0 -42
- package/node_modules/once/package.json +0 -33
- package/node_modules/prebuild-install/CHANGELOG.md +0 -131
- package/node_modules/prebuild-install/CONTRIBUTING.md +0 -6
- package/node_modules/prebuild-install/LICENSE +0 -21
- package/node_modules/prebuild-install/README.md +0 -163
- package/node_modules/prebuild-install/asset.js +0 -44
- package/node_modules/prebuild-install/bin.js +0 -78
- package/node_modules/prebuild-install/download.js +0 -142
- package/node_modules/prebuild-install/error.js +0 -14
- package/node_modules/prebuild-install/help.txt +0 -16
- package/node_modules/prebuild-install/index.js +0 -1
- package/node_modules/prebuild-install/log.js +0 -33
- package/node_modules/prebuild-install/package.json +0 -67
- package/node_modules/prebuild-install/proxy.js +0 -35
- package/node_modules/prebuild-install/rc.js +0 -64
- package/node_modules/prebuild-install/util.js +0 -143
- package/node_modules/pump/.github/FUNDING.yml +0 -2
- package/node_modules/pump/.travis.yml +0 -5
- package/node_modules/pump/LICENSE +0 -21
- package/node_modules/pump/README.md +0 -74
- package/node_modules/pump/SECURITY.md +0 -5
- package/node_modules/pump/empty.js +0 -1
- package/node_modules/pump/index.js +0 -86
- package/node_modules/pump/package.json +0 -30
- package/node_modules/pump/test-browser.js +0 -66
- package/node_modules/pump/test-node.js +0 -53
- package/node_modules/rc/LICENSE.APACHE2 +0 -15
- package/node_modules/rc/LICENSE.BSD +0 -26
- package/node_modules/rc/LICENSE.MIT +0 -24
- package/node_modules/rc/README.md +0 -227
- package/node_modules/rc/browser.js +0 -7
- package/node_modules/rc/cli.js +0 -4
- package/node_modules/rc/index.js +0 -53
- package/node_modules/rc/lib/utils.js +0 -104
- package/node_modules/rc/package.json +0 -29
- package/node_modules/rc/test/ini.js +0 -16
- package/node_modules/rc/test/nested-env-vars.js +0 -50
- package/node_modules/rc/test/test.js +0 -59
- package/node_modules/readable-stream/CONTRIBUTING.md +0 -38
- package/node_modules/readable-stream/GOVERNANCE.md +0 -136
- package/node_modules/readable-stream/LICENSE +0 -47
- package/node_modules/readable-stream/README.md +0 -106
- package/node_modules/readable-stream/errors-browser.js +0 -127
- package/node_modules/readable-stream/errors.js +0 -116
- package/node_modules/readable-stream/experimentalWarning.js +0 -17
- package/node_modules/readable-stream/lib/_stream_duplex.js +0 -126
- package/node_modules/readable-stream/lib/_stream_passthrough.js +0 -37
- package/node_modules/readable-stream/lib/_stream_readable.js +0 -1027
- package/node_modules/readable-stream/lib/_stream_transform.js +0 -190
- package/node_modules/readable-stream/lib/_stream_writable.js +0 -641
- package/node_modules/readable-stream/lib/internal/streams/async_iterator.js +0 -180
- package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +0 -183
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -96
- package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +0 -86
- package/node_modules/readable-stream/lib/internal/streams/from-browser.js +0 -3
- package/node_modules/readable-stream/lib/internal/streams/from.js +0 -52
- package/node_modules/readable-stream/lib/internal/streams/pipeline.js +0 -86
- package/node_modules/readable-stream/lib/internal/streams/state.js +0 -22
- package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
- package/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
- package/node_modules/readable-stream/package.json +0 -68
- package/node_modules/readable-stream/readable-browser.js +0 -9
- package/node_modules/readable-stream/readable.js +0 -16
- package/node_modules/safe-buffer/LICENSE +0 -21
- package/node_modules/safe-buffer/README.md +0 -584
- package/node_modules/safe-buffer/index.d.ts +0 -187
- package/node_modules/safe-buffer/index.js +0 -65
- package/node_modules/safe-buffer/package.json +0 -51
- package/node_modules/semver/LICENSE +0 -15
- package/node_modules/semver/README.md +0 -680
- package/node_modules/semver/bin/semver.js +0 -195
- package/node_modules/semver/classes/comparator.js +0 -143
- package/node_modules/semver/classes/index.js +0 -7
- package/node_modules/semver/classes/range.js +0 -577
- package/node_modules/semver/classes/semver.js +0 -350
- package/node_modules/semver/functions/clean.js +0 -8
- package/node_modules/semver/functions/cmp.js +0 -54
- package/node_modules/semver/functions/coerce.js +0 -62
- package/node_modules/semver/functions/compare-build.js +0 -9
- package/node_modules/semver/functions/compare-loose.js +0 -5
- package/node_modules/semver/functions/compare.js +0 -7
- package/node_modules/semver/functions/diff.js +0 -60
- package/node_modules/semver/functions/eq.js +0 -5
- package/node_modules/semver/functions/gt.js +0 -5
- package/node_modules/semver/functions/gte.js +0 -5
- package/node_modules/semver/functions/inc.js +0 -21
- package/node_modules/semver/functions/lt.js +0 -5
- package/node_modules/semver/functions/lte.js +0 -5
- package/node_modules/semver/functions/major.js +0 -5
- package/node_modules/semver/functions/minor.js +0 -5
- package/node_modules/semver/functions/neq.js +0 -5
- package/node_modules/semver/functions/parse.js +0 -18
- package/node_modules/semver/functions/patch.js +0 -5
- package/node_modules/semver/functions/prerelease.js +0 -8
- package/node_modules/semver/functions/rcompare.js +0 -5
- package/node_modules/semver/functions/rsort.js +0 -5
- package/node_modules/semver/functions/satisfies.js +0 -12
- package/node_modules/semver/functions/sort.js +0 -5
- package/node_modules/semver/functions/truncate.js +0 -48
- package/node_modules/semver/functions/valid.js +0 -8
- package/node_modules/semver/index.js +0 -93
- package/node_modules/semver/internal/constants.js +0 -37
- package/node_modules/semver/internal/debug.js +0 -11
- package/node_modules/semver/internal/identifiers.js +0 -29
- package/node_modules/semver/internal/lrucache.js +0 -42
- package/node_modules/semver/internal/parse-options.js +0 -17
- package/node_modules/semver/internal/re.js +0 -223
- package/node_modules/semver/package.json +0 -78
- package/node_modules/semver/preload.js +0 -4
- package/node_modules/semver/range.bnf +0 -17
- package/node_modules/semver/ranges/gtr.js +0 -6
- package/node_modules/semver/ranges/intersects.js +0 -9
- package/node_modules/semver/ranges/ltr.js +0 -6
- package/node_modules/semver/ranges/max-satisfying.js +0 -27
- package/node_modules/semver/ranges/min-satisfying.js +0 -26
- package/node_modules/semver/ranges/min-version.js +0 -63
- package/node_modules/semver/ranges/outside.js +0 -82
- package/node_modules/semver/ranges/simplify.js +0 -49
- package/node_modules/semver/ranges/subset.js +0 -249
- package/node_modules/semver/ranges/to-comparators.js +0 -10
- package/node_modules/semver/ranges/valid.js +0 -13
- package/node_modules/simple-concat/.travis.yml +0 -3
- package/node_modules/simple-concat/LICENSE +0 -20
- package/node_modules/simple-concat/README.md +0 -44
- package/node_modules/simple-concat/index.js +0 -15
- package/node_modules/simple-concat/package.json +0 -47
- package/node_modules/simple-concat/test/basic.js +0 -41
- package/node_modules/simple-get/.github/dependabot.yml +0 -15
- package/node_modules/simple-get/.github/workflows/ci.yml +0 -23
- package/node_modules/simple-get/LICENSE +0 -20
- package/node_modules/simple-get/README.md +0 -333
- package/node_modules/simple-get/index.js +0 -108
- package/node_modules/simple-get/package.json +0 -67
- package/node_modules/string_decoder/LICENSE +0 -48
- package/node_modules/string_decoder/README.md +0 -47
- package/node_modules/string_decoder/lib/string_decoder.js +0 -296
- package/node_modules/string_decoder/package.json +0 -34
- package/node_modules/strip-json-comments/index.js +0 -70
- package/node_modules/strip-json-comments/license +0 -21
- package/node_modules/strip-json-comments/package.json +0 -42
- package/node_modules/strip-json-comments/readme.md +0 -64
- package/node_modules/tar-fs/.travis.yml +0 -6
- package/node_modules/tar-fs/LICENSE +0 -21
- package/node_modules/tar-fs/README.md +0 -165
- package/node_modules/tar-fs/index.js +0 -392
- package/node_modules/tar-fs/package.json +0 -46
- package/node_modules/tar-fs/test/fixtures/a/hello.txt +0 -1
- package/node_modules/tar-fs/test/fixtures/b/a/test.txt +0 -1
- package/node_modules/tar-fs/test/fixtures/d/file1 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/file2 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-files/file3 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-files/file4 +0 -0
- package/node_modules/tar-fs/test/fixtures/e/directory/.ignore +0 -0
- package/node_modules/tar-fs/test/fixtures/e/file +0 -0
- package/node_modules/tar-fs/test/fixtures/invalid.tar +0 -0
- package/node_modules/tar-fs/test/index.js +0 -457
- package/node_modules/tar-stream/LICENSE +0 -21
- package/node_modules/tar-stream/README.md +0 -168
- package/node_modules/tar-stream/extract.js +0 -257
- package/node_modules/tar-stream/headers.js +0 -295
- package/node_modules/tar-stream/index.js +0 -2
- package/node_modules/tar-stream/pack.js +0 -255
- package/node_modules/tar-stream/package.json +0 -58
- package/node_modules/tar-stream/sandbox.js +0 -11
- package/node_modules/tunnel-agent/LICENSE +0 -55
- package/node_modules/tunnel-agent/README.md +0 -4
- package/node_modules/tunnel-agent/index.js +0 -244
- package/node_modules/tunnel-agent/package.json +0 -22
- package/node_modules/util-deprecate/History.md +0 -16
- package/node_modules/util-deprecate/LICENSE +0 -24
- package/node_modules/util-deprecate/README.md +0 -53
- package/node_modules/util-deprecate/browser.js +0 -67
- package/node_modules/util-deprecate/node.js +0 -6
- package/node_modules/util-deprecate/package.json +0 -27
- package/node_modules/wrappy/LICENSE +0 -15
- package/node_modules/wrappy/README.md +0 -36
- package/node_modules/wrappy/package.json +0 -29
- package/node_modules/wrappy/wrappy.js +0 -33
- /package/{dist/src/twin-github/server.d.ts → node_modules/@pome-sh/twin-slack/dist/scripts/fidelity-parity.d.ts} +0 -0
- /package/{dist/src/twin-github/types.js → node_modules/@pome-sh/twin-stripe/dist/scripts/fidelity-parity.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pome-sh/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Twin engine for Pome digital twins — defineTwin() + serve(): HTTP mounting, bearer auth, trace recorder, MCP dispatch, SQLite-backed state.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
"./server": {
|
|
15
15
|
"types": "./dist/server.d.ts",
|
|
16
16
|
"default": "./dist/server.js"
|
|
17
|
+
},
|
|
18
|
+
"./parity": {
|
|
19
|
+
"types": "./dist/parity.d.ts",
|
|
20
|
+
"default": "./dist/parity.js"
|
|
17
21
|
}
|
|
18
22
|
},
|
|
19
23
|
"publishConfig": {
|
|
@@ -32,20 +36,16 @@
|
|
|
32
36
|
"dist"
|
|
33
37
|
],
|
|
34
38
|
"dependencies": {
|
|
35
|
-
"@pome-sh/shared-types": "0.6.
|
|
39
|
+
"@pome-sh/shared-types": "0.6.1",
|
|
36
40
|
"hono": "^4.12.27",
|
|
37
41
|
"zod": "^4.1.13"
|
|
38
42
|
},
|
|
39
43
|
"peerDependencies": {
|
|
40
|
-
"@hono/node-server": "^2.0.8"
|
|
41
|
-
"better-sqlite3": "^12.5.0"
|
|
44
|
+
"@hono/node-server": "^2.0.8"
|
|
42
45
|
},
|
|
43
46
|
"peerDependenciesMeta": {
|
|
44
47
|
"@hono/node-server": {
|
|
45
48
|
"optional": true
|
|
46
|
-
},
|
|
47
|
-
"better-sqlite3": {
|
|
48
|
-
"optional": true
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const apiErrorTypeSchema: z.ZodEnum<{
|
|
3
|
+
invalid_auth: "invalid_auth";
|
|
4
|
+
revoked_key: "revoked_key";
|
|
5
|
+
forbidden: "forbidden";
|
|
6
|
+
quota_exceeded: "quota_exceeded";
|
|
7
|
+
validation_failed: "validation_failed";
|
|
8
|
+
not_found: "not_found";
|
|
9
|
+
session_expired: "session_expired";
|
|
10
|
+
conflict: "conflict";
|
|
11
|
+
rate_limited: "rate_limited";
|
|
12
|
+
internal_error: "internal_error";
|
|
13
|
+
endpoint_not_implemented: "endpoint_not_implemented";
|
|
14
|
+
downstream_unavailable: "downstream_unavailable";
|
|
15
|
+
}>;
|
|
16
|
+
export type ApiErrorType = z.infer<typeof apiErrorTypeSchema>;
|
|
17
|
+
export declare const apiErrorSchema: z.ZodObject<{
|
|
18
|
+
error: z.ZodObject<{
|
|
19
|
+
type: z.ZodEnum<{
|
|
20
|
+
invalid_auth: "invalid_auth";
|
|
21
|
+
revoked_key: "revoked_key";
|
|
22
|
+
forbidden: "forbidden";
|
|
23
|
+
quota_exceeded: "quota_exceeded";
|
|
24
|
+
validation_failed: "validation_failed";
|
|
25
|
+
not_found: "not_found";
|
|
26
|
+
session_expired: "session_expired";
|
|
27
|
+
conflict: "conflict";
|
|
28
|
+
rate_limited: "rate_limited";
|
|
29
|
+
internal_error: "internal_error";
|
|
30
|
+
endpoint_not_implemented: "endpoint_not_implemented";
|
|
31
|
+
downstream_unavailable: "downstream_unavailable";
|
|
32
|
+
}>;
|
|
33
|
+
message: z.ZodString;
|
|
34
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
35
|
+
documentation_url: z.ZodOptional<z.ZodString>;
|
|
36
|
+
request_id: z.ZodString;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
export type ApiError = z.infer<typeof apiErrorSchema>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
//
|
|
3
|
+
// shared-types §5 — ERROR ENVELOPE (public REST). The `error.type` enum and the
|
|
4
|
+
// wrapping envelope shape. Re-exported through the `@pome-sh/shared-types`
|
|
5
|
+
// barrel (index.ts).
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
8
|
+
// 5. ERROR ENVELOPE (public REST)
|
|
9
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
10
|
+
export const apiErrorTypeSchema = z.enum([
|
|
11
|
+
"invalid_auth",
|
|
12
|
+
"revoked_key",
|
|
13
|
+
"forbidden", // 403 non-auth permission denial
|
|
14
|
+
"quota_exceeded",
|
|
15
|
+
"validation_failed",
|
|
16
|
+
"not_found",
|
|
17
|
+
"session_expired", // distinct from not_found for CLI UX
|
|
18
|
+
"conflict", // 409 (uniqueness, etc.)
|
|
19
|
+
"rate_limited",
|
|
20
|
+
"internal_error",
|
|
21
|
+
"endpoint_not_implemented",
|
|
22
|
+
"downstream_unavailable",
|
|
23
|
+
]);
|
|
24
|
+
export const apiErrorSchema = z.object({
|
|
25
|
+
error: z.object({
|
|
26
|
+
type: apiErrorTypeSchema,
|
|
27
|
+
message: z.string(),
|
|
28
|
+
details: z.record(z.string(), z.unknown()).optional(),
|
|
29
|
+
documentation_url: z.string().url().optional(),
|
|
30
|
+
request_id: z.string(),
|
|
31
|
+
}),
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,gFAAgF;AAChF,2EAA2E;AAC3E,qBAAqB;AAErB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gFAAgF;AAChF,kCAAkC;AAClC,gFAAgF;AAEhF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC;IACvC,cAAc;IACd,aAAa;IACb,WAAW,EAAkC,iCAAiC;IAC9E,gBAAgB;IAChB,mBAAmB;IACnB,WAAW;IACX,iBAAiB,EAA4B,qCAAqC;IAClF,UAAU,EAAmC,yBAAyB;IACtE,cAAc;IACd,gBAAgB;IAChB,0BAA0B;IAC1B,wBAAwB;CACzB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;QACnB,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;QACrD,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QAC9C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;KACvB,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const finalizeRequestSchema: z.ZodObject<{
|
|
3
|
+
stop_reason: z.ZodString;
|
|
4
|
+
exit_code: z.ZodNumber;
|
|
5
|
+
duration_ms: z.ZodNumber;
|
|
6
|
+
agent_model: z.ZodString;
|
|
7
|
+
agent_sdk: z.ZodNullable<z.ZodString>;
|
|
8
|
+
criteria: z.ZodArray<z.ZodObject<{
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
text: z.ZodString;
|
|
11
|
+
kind: z.ZodEnum<{
|
|
12
|
+
D: "D";
|
|
13
|
+
P: "P";
|
|
14
|
+
}>;
|
|
15
|
+
twin: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
scenario_name: z.ZodString;
|
|
18
|
+
scenario_hash: z.ZodString;
|
|
19
|
+
scenario_prompt: z.ZodString;
|
|
20
|
+
expected_behavior: z.ZodString;
|
|
21
|
+
trace_storage_key: z.ZodOptional<z.ZodString>;
|
|
22
|
+
state_initial_storage_key: z.ZodOptional<z.ZodString>;
|
|
23
|
+
state_final_storage_key: z.ZodOptional<z.ZodString>;
|
|
24
|
+
signals_storage_key: z.ZodOptional<z.ZodString>;
|
|
25
|
+
per_twin_state_keys: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
26
|
+
state_initial_key: z.ZodOptional<z.ZodString>;
|
|
27
|
+
state_final_key: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, z.core.$strip>>>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export type FinalizeRequest = z.infer<typeof finalizeRequestSchema>;
|
|
31
|
+
export declare const finalizeResponseSchema: z.ZodObject<{
|
|
32
|
+
run_id: z.ZodString;
|
|
33
|
+
score: z.ZodNumber;
|
|
34
|
+
judge_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
35
|
+
dashboard_url: z.ZodString;
|
|
36
|
+
criteria_results: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
37
|
+
criterion: z.ZodObject<{
|
|
38
|
+
type: z.ZodPipe<z.ZodEnum<{
|
|
39
|
+
model: "model";
|
|
40
|
+
code: "code";
|
|
41
|
+
D: "D";
|
|
42
|
+
P: "P";
|
|
43
|
+
}>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
|
|
44
|
+
text: z.ZodString;
|
|
45
|
+
twin: z.ZodOptional<z.ZodString>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
passed: z.ZodBoolean;
|
|
48
|
+
skipped: z.ZodBoolean;
|
|
49
|
+
reason: z.ZodString;
|
|
50
|
+
confidence: z.ZodNumber;
|
|
51
|
+
judge_model: z.ZodString;
|
|
52
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
53
|
+
criterion: z.ZodObject<{
|
|
54
|
+
type: z.ZodPipe<z.ZodEnum<{
|
|
55
|
+
model: "model";
|
|
56
|
+
code: "code";
|
|
57
|
+
D: "D";
|
|
58
|
+
P: "P";
|
|
59
|
+
}>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
|
|
60
|
+
text: z.ZodString;
|
|
61
|
+
twin: z.ZodOptional<z.ZodString>;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
passed: z.ZodBoolean;
|
|
64
|
+
skipped: z.ZodBoolean;
|
|
65
|
+
reason: z.ZodString;
|
|
66
|
+
}, z.core.$strip>]>>>;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
export type FinalizeResponse = z.infer<typeof finalizeResponseSchema>;
|
|
69
|
+
export declare const finalizeStatusUrlSchema: z.ZodString;
|
|
70
|
+
export type FinalizeStatusUrl = z.infer<typeof finalizeStatusUrlSchema>;
|
|
71
|
+
export declare const finalizeAcceptedResponseSchema: z.ZodObject<{
|
|
72
|
+
evaluation_id: z.ZodString;
|
|
73
|
+
run_id: z.ZodString;
|
|
74
|
+
status: z.ZodLiteral<"queued">;
|
|
75
|
+
status_url: z.ZodString;
|
|
76
|
+
}, z.core.$strict>;
|
|
77
|
+
export type FinalizeAcceptedResponse = z.infer<typeof finalizeAcceptedResponseSchema>;
|
|
78
|
+
export declare const finalizeQueuedStatusResponseSchema: z.ZodObject<{
|
|
79
|
+
status: z.ZodLiteral<"queued">;
|
|
80
|
+
evaluation_id: z.ZodString;
|
|
81
|
+
run_id: z.ZodString;
|
|
82
|
+
}, z.core.$strict>;
|
|
83
|
+
export type FinalizeQueuedStatusResponse = z.infer<typeof finalizeQueuedStatusResponseSchema>;
|
|
84
|
+
export declare const finalizeRunningStatusResponseSchema: z.ZodObject<{
|
|
85
|
+
status: z.ZodLiteral<"running">;
|
|
86
|
+
evaluation_id: z.ZodString;
|
|
87
|
+
run_id: z.ZodString;
|
|
88
|
+
}, z.core.$strict>;
|
|
89
|
+
export type FinalizeRunningStatusResponse = z.infer<typeof finalizeRunningStatusResponseSchema>;
|
|
90
|
+
export declare const finalizeFailureErrorSchema: z.ZodObject<{
|
|
91
|
+
type: z.ZodString;
|
|
92
|
+
message: z.ZodString;
|
|
93
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
94
|
+
}, z.core.$strict>;
|
|
95
|
+
export type FinalizeFailureError = z.infer<typeof finalizeFailureErrorSchema>;
|
|
96
|
+
export declare const finalizeFailedStatusResponseSchema: z.ZodObject<{
|
|
97
|
+
status: z.ZodLiteral<"failed">;
|
|
98
|
+
error: z.ZodObject<{
|
|
99
|
+
type: z.ZodString;
|
|
100
|
+
message: z.ZodString;
|
|
101
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
102
|
+
}, z.core.$strict>;
|
|
103
|
+
evaluation_id: z.ZodString;
|
|
104
|
+
run_id: z.ZodString;
|
|
105
|
+
}, z.core.$strict>;
|
|
106
|
+
export type FinalizeFailedStatusResponse = z.infer<typeof finalizeFailedStatusResponseSchema>;
|
|
107
|
+
export declare const finalizeCompletedStatusResponseSchema: z.ZodObject<{
|
|
108
|
+
status: z.ZodLiteral<"completed">;
|
|
109
|
+
result: z.ZodObject<{
|
|
110
|
+
run_id: z.ZodString;
|
|
111
|
+
score: z.ZodNumber;
|
|
112
|
+
judge_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
113
|
+
dashboard_url: z.ZodString;
|
|
114
|
+
criteria_results: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
115
|
+
criterion: z.ZodObject<{
|
|
116
|
+
type: z.ZodPipe<z.ZodEnum<{
|
|
117
|
+
model: "model";
|
|
118
|
+
code: "code";
|
|
119
|
+
D: "D";
|
|
120
|
+
P: "P";
|
|
121
|
+
}>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
|
|
122
|
+
text: z.ZodString;
|
|
123
|
+
twin: z.ZodOptional<z.ZodString>;
|
|
124
|
+
}, z.core.$strip>;
|
|
125
|
+
passed: z.ZodBoolean;
|
|
126
|
+
skipped: z.ZodBoolean;
|
|
127
|
+
reason: z.ZodString;
|
|
128
|
+
confidence: z.ZodNumber;
|
|
129
|
+
judge_model: z.ZodString;
|
|
130
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
131
|
+
criterion: z.ZodObject<{
|
|
132
|
+
type: z.ZodPipe<z.ZodEnum<{
|
|
133
|
+
model: "model";
|
|
134
|
+
code: "code";
|
|
135
|
+
D: "D";
|
|
136
|
+
P: "P";
|
|
137
|
+
}>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
|
|
138
|
+
text: z.ZodString;
|
|
139
|
+
twin: z.ZodOptional<z.ZodString>;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
passed: z.ZodBoolean;
|
|
142
|
+
skipped: z.ZodBoolean;
|
|
143
|
+
reason: z.ZodString;
|
|
144
|
+
}, z.core.$strip>]>>>;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
evaluation_id: z.ZodString;
|
|
147
|
+
run_id: z.ZodString;
|
|
148
|
+
}, z.core.$strict>;
|
|
149
|
+
export type FinalizeCompletedStatusResponse = z.infer<typeof finalizeCompletedStatusResponseSchema>;
|
|
150
|
+
export declare const finalizeStatusResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
151
|
+
status: z.ZodLiteral<"queued">;
|
|
152
|
+
evaluation_id: z.ZodString;
|
|
153
|
+
run_id: z.ZodString;
|
|
154
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
155
|
+
status: z.ZodLiteral<"running">;
|
|
156
|
+
evaluation_id: z.ZodString;
|
|
157
|
+
run_id: z.ZodString;
|
|
158
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
159
|
+
status: z.ZodLiteral<"failed">;
|
|
160
|
+
error: z.ZodObject<{
|
|
161
|
+
type: z.ZodString;
|
|
162
|
+
message: z.ZodString;
|
|
163
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
164
|
+
}, z.core.$strict>;
|
|
165
|
+
evaluation_id: z.ZodString;
|
|
166
|
+
run_id: z.ZodString;
|
|
167
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
168
|
+
status: z.ZodLiteral<"completed">;
|
|
169
|
+
result: z.ZodObject<{
|
|
170
|
+
run_id: z.ZodString;
|
|
171
|
+
score: z.ZodNumber;
|
|
172
|
+
judge_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
173
|
+
dashboard_url: z.ZodString;
|
|
174
|
+
criteria_results: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
175
|
+
criterion: z.ZodObject<{
|
|
176
|
+
type: z.ZodPipe<z.ZodEnum<{
|
|
177
|
+
model: "model";
|
|
178
|
+
code: "code";
|
|
179
|
+
D: "D";
|
|
180
|
+
P: "P";
|
|
181
|
+
}>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
|
|
182
|
+
text: z.ZodString;
|
|
183
|
+
twin: z.ZodOptional<z.ZodString>;
|
|
184
|
+
}, z.core.$strip>;
|
|
185
|
+
passed: z.ZodBoolean;
|
|
186
|
+
skipped: z.ZodBoolean;
|
|
187
|
+
reason: z.ZodString;
|
|
188
|
+
confidence: z.ZodNumber;
|
|
189
|
+
judge_model: z.ZodString;
|
|
190
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
191
|
+
criterion: z.ZodObject<{
|
|
192
|
+
type: z.ZodPipe<z.ZodEnum<{
|
|
193
|
+
model: "model";
|
|
194
|
+
code: "code";
|
|
195
|
+
D: "D";
|
|
196
|
+
P: "P";
|
|
197
|
+
}>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
|
|
198
|
+
text: z.ZodString;
|
|
199
|
+
twin: z.ZodOptional<z.ZodString>;
|
|
200
|
+
}, z.core.$strip>;
|
|
201
|
+
passed: z.ZodBoolean;
|
|
202
|
+
skipped: z.ZodBoolean;
|
|
203
|
+
reason: z.ZodString;
|
|
204
|
+
}, z.core.$strip>]>>>;
|
|
205
|
+
}, z.core.$strip>;
|
|
206
|
+
evaluation_id: z.ZodString;
|
|
207
|
+
run_id: z.ZodString;
|
|
208
|
+
}, z.core.$strict>], "status">;
|
|
209
|
+
export type FinalizeStatusResponse = z.infer<typeof finalizeStatusResponseSchema>;
|
|
210
|
+
export declare const finalizeInitialResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
211
|
+
run_id: z.ZodString;
|
|
212
|
+
score: z.ZodNumber;
|
|
213
|
+
judge_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
214
|
+
dashboard_url: z.ZodString;
|
|
215
|
+
criteria_results: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
216
|
+
criterion: z.ZodObject<{
|
|
217
|
+
type: z.ZodPipe<z.ZodEnum<{
|
|
218
|
+
model: "model";
|
|
219
|
+
code: "code";
|
|
220
|
+
D: "D";
|
|
221
|
+
P: "P";
|
|
222
|
+
}>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
|
|
223
|
+
text: z.ZodString;
|
|
224
|
+
twin: z.ZodOptional<z.ZodString>;
|
|
225
|
+
}, z.core.$strip>;
|
|
226
|
+
passed: z.ZodBoolean;
|
|
227
|
+
skipped: z.ZodBoolean;
|
|
228
|
+
reason: z.ZodString;
|
|
229
|
+
confidence: z.ZodNumber;
|
|
230
|
+
judge_model: z.ZodString;
|
|
231
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
232
|
+
criterion: z.ZodObject<{
|
|
233
|
+
type: z.ZodPipe<z.ZodEnum<{
|
|
234
|
+
model: "model";
|
|
235
|
+
code: "code";
|
|
236
|
+
D: "D";
|
|
237
|
+
P: "P";
|
|
238
|
+
}>, z.ZodTransform<"model" | "code", "model" | "code" | "D" | "P">>;
|
|
239
|
+
text: z.ZodString;
|
|
240
|
+
twin: z.ZodOptional<z.ZodString>;
|
|
241
|
+
}, z.core.$strip>;
|
|
242
|
+
passed: z.ZodBoolean;
|
|
243
|
+
skipped: z.ZodBoolean;
|
|
244
|
+
reason: z.ZodString;
|
|
245
|
+
}, z.core.$strip>]>>>;
|
|
246
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
247
|
+
evaluation_id: z.ZodString;
|
|
248
|
+
run_id: z.ZodString;
|
|
249
|
+
status: z.ZodLiteral<"queued">;
|
|
250
|
+
status_url: z.ZodString;
|
|
251
|
+
}, z.core.$strict>]>;
|
|
252
|
+
export type FinalizeInitialResponse = z.infer<typeof finalizeInitialResponseSchema>;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
//
|
|
3
|
+
// shared-types — /v1/sessions/:id/finalize response family (part of §4 PUBLIC
|
|
4
|
+
// REST API). ADR-013 managed-judge synchronous result plus the F-700 async
|
|
5
|
+
// `Prefer: respond-async` accepted/status/union shapes. Re-exported through the
|
|
6
|
+
// `@pome-sh/shared-types` barrel (index.ts).
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { criterionResultSchema } from "./run.js";
|
|
9
|
+
import { criterionDefSchema, perTwinStateKeysSchema } from "./rest.js";
|
|
10
|
+
// POST /v1/sessions/:id/finalize — ADR-013 managed-judge REQUEST. This is the
|
|
11
|
+
// LIVE scoring wire: the CLI (cli/src/hosted/client.ts `finalize`) uploads trace
|
|
12
|
+
// / state / signals blobs via the presigned upload-url routes, then POSTs the
|
|
13
|
+
// criterion *definitions* plus the storage KEYS here; the cloud runs the managed
|
|
14
|
+
// judge and returns `finalizeInitialResponseSchema`. (The sibling
|
|
15
|
+
// `submitResultRequestSchema` in rest.ts is the DEPRECATED BYOK shim that scores
|
|
16
|
+
// CLI-side and uploads inline state_*_json_b64.)
|
|
17
|
+
//
|
|
18
|
+
// Not `.strict()`: a tolerant reader that strips unknown additive keys, matching
|
|
19
|
+
// the rest of the §4 request/response family. Field set mirrors the CLI body
|
|
20
|
+
// exactly — `scenario_*` vocab (finalize does not take the W3 `task_*` aliases),
|
|
21
|
+
// storage keys optional (cloud falls back to conventional paths when omitted).
|
|
22
|
+
export const finalizeRequestSchema = z.object({
|
|
23
|
+
stop_reason: z.string(), // "completed" | "timeout" | "preflight_failed" | …
|
|
24
|
+
exit_code: z.number().int(),
|
|
25
|
+
duration_ms: z.number().int(),
|
|
26
|
+
agent_model: z.string(),
|
|
27
|
+
agent_sdk: z.string().nullable(), // normalizeAgentSdk() output: trimmed string or null
|
|
28
|
+
// Criterion DEFINITIONS (not results): cloud judges these against the recorded
|
|
29
|
+
// trace/state and returns the authoritative score. Carries optional per-criterion
|
|
30
|
+
// twin attribution (multi-twin M3).
|
|
31
|
+
criteria: z.array(criterionDefSchema),
|
|
32
|
+
scenario_name: z.string(),
|
|
33
|
+
scenario_hash: z.string(),
|
|
34
|
+
scenario_prompt: z.string(),
|
|
35
|
+
expected_behavior: z.string(),
|
|
36
|
+
// Optional storage-key overrides; omitted keys fall back to the conventional
|
|
37
|
+
// team-<>/session-<>/<filename> paths written by the *-upload-url routes.
|
|
38
|
+
trace_storage_key: z.string().optional(),
|
|
39
|
+
state_initial_storage_key: z.string().optional(),
|
|
40
|
+
state_final_storage_key: z.string().optional(),
|
|
41
|
+
signals_storage_key: z.string().optional(),
|
|
42
|
+
// Multi-twin (M3): additive per-twin state storage keys, keyed by twin id.
|
|
43
|
+
// Absent on single-twin sessions, which use the flat state_*_storage_key fields
|
|
44
|
+
// above. Unknown to an older cloud, which strips it and scores the primary twin
|
|
45
|
+
// unchanged (new CLI × old cloud degrades gracefully).
|
|
46
|
+
per_twin_state_keys: perTwinStateKeysSchema.optional(),
|
|
47
|
+
});
|
|
48
|
+
// /v1/sessions/:id/finalize — ADR-013 managed-judge response.
|
|
49
|
+
// Not `.strict()`: cloud may emit additive M7 keys (`evaluator_version`,
|
|
50
|
+
// `criteria_breakdown`, `all_skipped`, `provenance`) that older/newer CLIs
|
|
51
|
+
// strip rather than reject.
|
|
52
|
+
export const finalizeResponseSchema = z.object({
|
|
53
|
+
run_id: z.string(),
|
|
54
|
+
score: z.number().int().min(0).max(100),
|
|
55
|
+
judge_model: z.string().nullable().optional(),
|
|
56
|
+
dashboard_url: z.string().url(),
|
|
57
|
+
criteria_results: z.array(criterionResultSchema).optional(),
|
|
58
|
+
});
|
|
59
|
+
// F-700: `status_url` is a same-origin absolute URL *or* an absolute-path
|
|
60
|
+
// relative URL (cloud returns `/v1/sessions/:id/evaluation`).
|
|
61
|
+
export const finalizeStatusUrlSchema = z
|
|
62
|
+
.string()
|
|
63
|
+
.min(1)
|
|
64
|
+
.refine((value) => {
|
|
65
|
+
if (value.startsWith("/") && !value.startsWith("//"))
|
|
66
|
+
return true;
|
|
67
|
+
try {
|
|
68
|
+
new URL(value);
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
}, { message: "Invalid status_url" });
|
|
75
|
+
// POST /v1/sessions/:id/finalize with `Prefer: respond-async`.
|
|
76
|
+
// The legacy scored response remains in the initial-response union for the
|
|
77
|
+
// synchronous N-1 compatibility window.
|
|
78
|
+
export const finalizeAcceptedResponseSchema = z.object({
|
|
79
|
+
evaluation_id: z.string().min(1),
|
|
80
|
+
run_id: z.string().min(1),
|
|
81
|
+
status: z.literal("queued"),
|
|
82
|
+
status_url: finalizeStatusUrlSchema,
|
|
83
|
+
}).strict();
|
|
84
|
+
const finalizeStatusIdentitySchema = {
|
|
85
|
+
evaluation_id: z.string().min(1),
|
|
86
|
+
run_id: z.string().min(1),
|
|
87
|
+
};
|
|
88
|
+
export const finalizeQueuedStatusResponseSchema = z.object({
|
|
89
|
+
...finalizeStatusIdentitySchema,
|
|
90
|
+
status: z.literal("queued"),
|
|
91
|
+
}).strict();
|
|
92
|
+
export const finalizeRunningStatusResponseSchema = z.object({
|
|
93
|
+
...finalizeStatusIdentitySchema,
|
|
94
|
+
status: z.literal("running"),
|
|
95
|
+
}).strict();
|
|
96
|
+
// F-700 wire error on GET .../evaluation failed status.
|
|
97
|
+
export const finalizeFailureErrorSchema = z.object({
|
|
98
|
+
type: z.string().min(1),
|
|
99
|
+
message: z.string().min(1),
|
|
100
|
+
details: z.record(z.string(), z.unknown()).optional(),
|
|
101
|
+
}).strict();
|
|
102
|
+
export const finalizeFailedStatusResponseSchema = z.object({
|
|
103
|
+
...finalizeStatusIdentitySchema,
|
|
104
|
+
status: z.literal("failed"),
|
|
105
|
+
error: finalizeFailureErrorSchema,
|
|
106
|
+
}).strict();
|
|
107
|
+
export const finalizeCompletedStatusResponseSchema = z.object({
|
|
108
|
+
...finalizeStatusIdentitySchema,
|
|
109
|
+
status: z.literal("completed"),
|
|
110
|
+
result: finalizeResponseSchema,
|
|
111
|
+
}).strict();
|
|
112
|
+
export const finalizeStatusResponseSchema = z.discriminatedUnion("status", [
|
|
113
|
+
finalizeQueuedStatusResponseSchema,
|
|
114
|
+
finalizeRunningStatusResponseSchema,
|
|
115
|
+
finalizeFailedStatusResponseSchema,
|
|
116
|
+
finalizeCompletedStatusResponseSchema,
|
|
117
|
+
]);
|
|
118
|
+
export const finalizeInitialResponseSchema = z.union([
|
|
119
|
+
finalizeResponseSchema,
|
|
120
|
+
finalizeAcceptedResponseSchema,
|
|
121
|
+
]);
|
|
122
|
+
//# sourceMappingURL=finalize-shapes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finalize-shapes.js","sourceRoot":"","sources":["../src/finalize-shapes.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const userSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
clerk_user_id: z.ZodString;
|
|
5
|
+
email: z.ZodString;
|
|
6
|
+
display_name: z.ZodNullable<z.ZodString>;
|
|
7
|
+
created_at: z.ZodString;
|
|
8
|
+
updated_at: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type User = z.infer<typeof userSchema>;
|
|
11
|
+
export declare const planTierSchema: z.ZodEnum<{
|
|
12
|
+
free: "free";
|
|
13
|
+
hobby: "hobby";
|
|
14
|
+
pro: "pro";
|
|
15
|
+
team: "team";
|
|
16
|
+
self_host_annual: "self_host_annual";
|
|
17
|
+
enterprise: "enterprise";
|
|
18
|
+
}>;
|
|
19
|
+
export type PlanTier = z.infer<typeof planTierSchema>;
|
|
20
|
+
export declare const teamSchema: z.ZodObject<{
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
slug: z.ZodString;
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
plan_tier: z.ZodEnum<{
|
|
25
|
+
free: "free";
|
|
26
|
+
hobby: "hobby";
|
|
27
|
+
pro: "pro";
|
|
28
|
+
team: "team";
|
|
29
|
+
self_host_annual: "self_host_annual";
|
|
30
|
+
enterprise: "enterprise";
|
|
31
|
+
}>;
|
|
32
|
+
stripe_customer_id: z.ZodNullable<z.ZodString>;
|
|
33
|
+
created_at: z.ZodString;
|
|
34
|
+
updated_at: z.ZodString;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export type Team = z.infer<typeof teamSchema>;
|
|
37
|
+
export declare const teamRoleSchema: z.ZodEnum<{
|
|
38
|
+
owner: "owner";
|
|
39
|
+
admin: "admin";
|
|
40
|
+
member: "member";
|
|
41
|
+
}>;
|
|
42
|
+
export type TeamRole = z.infer<typeof teamRoleSchema>;
|
|
43
|
+
export declare const teamMemberSchema: z.ZodObject<{
|
|
44
|
+
team_id: z.ZodString;
|
|
45
|
+
user_id: z.ZodString;
|
|
46
|
+
role: z.ZodEnum<{
|
|
47
|
+
owner: "owner";
|
|
48
|
+
admin: "admin";
|
|
49
|
+
member: "member";
|
|
50
|
+
}>;
|
|
51
|
+
invited_at: z.ZodString;
|
|
52
|
+
accepted_at: z.ZodNullable<z.ZodString>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
export type TeamMember = z.infer<typeof teamMemberSchema>;
|
|
55
|
+
export declare const teamInviteSchema: z.ZodObject<{
|
|
56
|
+
id: z.ZodString;
|
|
57
|
+
team_id: z.ZodString;
|
|
58
|
+
email: z.ZodString;
|
|
59
|
+
role: z.ZodEnum<{
|
|
60
|
+
owner: "owner";
|
|
61
|
+
admin: "admin";
|
|
62
|
+
member: "member";
|
|
63
|
+
}>;
|
|
64
|
+
invited_by: z.ZodString;
|
|
65
|
+
expires_at: z.ZodString;
|
|
66
|
+
accepted_at: z.ZodNullable<z.ZodString>;
|
|
67
|
+
created_at: z.ZodString;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
export type TeamInvite = z.infer<typeof teamInviteSchema>;
|
|
70
|
+
export declare const apiKeySchema: z.ZodObject<{
|
|
71
|
+
id: z.ZodString;
|
|
72
|
+
team_id: z.ZodString;
|
|
73
|
+
name: z.ZodString;
|
|
74
|
+
created_by: z.ZodString;
|
|
75
|
+
last_used_at: z.ZodNullable<z.ZodString>;
|
|
76
|
+
created_at: z.ZodString;
|
|
77
|
+
revoked_at: z.ZodNullable<z.ZodString>;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
export type ApiKey = z.infer<typeof apiKeySchema>;
|
|
80
|
+
export declare const apiKeyCreatedSchema: z.ZodObject<{
|
|
81
|
+
id: z.ZodString;
|
|
82
|
+
team_id: z.ZodString;
|
|
83
|
+
name: z.ZodString;
|
|
84
|
+
created_by: z.ZodString;
|
|
85
|
+
last_used_at: z.ZodNullable<z.ZodString>;
|
|
86
|
+
created_at: z.ZodString;
|
|
87
|
+
revoked_at: z.ZodNullable<z.ZodString>;
|
|
88
|
+
full_key: z.ZodString;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
export type ApiKeyCreated = z.infer<typeof apiKeyCreatedSchema>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
//
|
|
3
|
+
// shared-types §1 — IDENTITY. Users, teams, memberships, invites, API keys.
|
|
4
|
+
// Re-exported through the `@pome-sh/shared-types` barrel (index.ts).
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
7
|
+
// 1. IDENTITY
|
|
8
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
9
|
+
export const userSchema = z.object({
|
|
10
|
+
id: z.string(), // usr_<nanoid> (text, not uuid; per /plan-eng-review L7)
|
|
11
|
+
clerk_user_id: z.string(), // Clerk user ID (`user_*`)
|
|
12
|
+
email: z.string().email(),
|
|
13
|
+
display_name: z.string().nullable(),
|
|
14
|
+
created_at: z.string().datetime(),
|
|
15
|
+
updated_at: z.string().datetime(),
|
|
16
|
+
});
|
|
17
|
+
// FDRS-613: reconciled to pome-cloud /v1 wire truth — `hobby` and `team` were
|
|
18
|
+
// added cloud-side for the launch pricing tiers; adopted here so a cloud-issued
|
|
19
|
+
// MeResponse / UsageResponse (plan_tier) parses under the twins schema.
|
|
20
|
+
export const planTierSchema = z.enum([
|
|
21
|
+
"free",
|
|
22
|
+
"hobby",
|
|
23
|
+
"pro",
|
|
24
|
+
"team",
|
|
25
|
+
"self_host_annual",
|
|
26
|
+
"enterprise",
|
|
27
|
+
]);
|
|
28
|
+
export const teamSchema = z.object({
|
|
29
|
+
id: z.string(), // tm_<nanoid>
|
|
30
|
+
slug: z.string(), // /dashboard/[teamSlug]/...
|
|
31
|
+
name: z.string(),
|
|
32
|
+
plan_tier: planTierSchema,
|
|
33
|
+
stripe_customer_id: z.string().nullable(),
|
|
34
|
+
created_at: z.string().datetime(),
|
|
35
|
+
updated_at: z.string().datetime(),
|
|
36
|
+
});
|
|
37
|
+
export const teamRoleSchema = z.enum(["owner", "admin", "member"]);
|
|
38
|
+
export const teamMemberSchema = z.object({
|
|
39
|
+
team_id: z.string(),
|
|
40
|
+
user_id: z.string(),
|
|
41
|
+
role: teamRoleSchema,
|
|
42
|
+
invited_at: z.string().datetime(),
|
|
43
|
+
accepted_at: z.string().datetime().nullable(),
|
|
44
|
+
});
|
|
45
|
+
// Public invite shape — token is NEVER returned in API responses. The plaintext
|
|
46
|
+
// token is delivered exactly once via `createInviteResponseSchema.invite_url`
|
|
47
|
+
// (which embeds it as a path segment). Server stores only sha256(token) in
|
|
48
|
+
// `team_invites.token_hash`.
|
|
49
|
+
export const teamInviteSchema = z.object({
|
|
50
|
+
id: z.string(), // inv_<nanoid>
|
|
51
|
+
team_id: z.string(),
|
|
52
|
+
email: z.string().email(),
|
|
53
|
+
role: teamRoleSchema,
|
|
54
|
+
invited_by: z.string(), // user_id
|
|
55
|
+
expires_at: z.string().datetime(),
|
|
56
|
+
accepted_at: z.string().datetime().nullable(),
|
|
57
|
+
created_at: z.string().datetime(),
|
|
58
|
+
});
|
|
59
|
+
export const apiKeySchema = z.object({
|
|
60
|
+
id: z.string(), // pme_<short> public prefix; hashed_key NEVER appears in API responses (kept server-side only)
|
|
61
|
+
team_id: z.string(),
|
|
62
|
+
name: z.string(),
|
|
63
|
+
created_by: z.string(), // user_id
|
|
64
|
+
last_used_at: z.string().datetime().nullable(),
|
|
65
|
+
created_at: z.string().datetime(),
|
|
66
|
+
revoked_at: z.string().datetime().nullable(),
|
|
67
|
+
});
|
|
68
|
+
// One-time response shape — full key string is only in the create-response, never persisted.
|
|
69
|
+
export const apiKeyCreatedSchema = apiKeySchema.extend({
|
|
70
|
+
full_key: z.string(), // pme_<full> — show once, then redact
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"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"}
|