@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db.js","sourceRoot":"","sources":["../src/db.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,
|
|
1
|
+
{"version":3,"file":"db.js","sourceRoot":"","sources":["../src/db.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,4EAA4E;AAC5E,2EAA2E;AAC3E,0EAA0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EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const heatTierSchema: z.ZodEnum<{
|
|
3
|
+
hot: "hot";
|
|
4
|
+
warm: "warm";
|
|
5
|
+
cold: "cold";
|
|
6
|
+
unclassified: "unclassified";
|
|
7
|
+
}>;
|
|
8
|
+
export type HeatTier = z.infer<typeof heatTierSchema>;
|
|
9
|
+
export declare const fidelitySurfaceSchema: z.ZodObject<{
|
|
10
|
+
name: z.ZodString;
|
|
11
|
+
heat: z.ZodEnum<{
|
|
12
|
+
hot: "hot";
|
|
13
|
+
warm: "warm";
|
|
14
|
+
cold: "cold";
|
|
15
|
+
unclassified: "unclassified";
|
|
16
|
+
}>;
|
|
17
|
+
fidelity: z.ZodEnum<{
|
|
18
|
+
semantic: "semantic";
|
|
19
|
+
unsupported: "unsupported";
|
|
20
|
+
shape: "shape";
|
|
21
|
+
}>;
|
|
22
|
+
justification: z.ZodString;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
export type FidelitySurface = z.infer<typeof fidelitySurfaceSchema>;
|
|
25
|
+
export declare const fidelityDocDriftSchema: z.ZodObject<{
|
|
26
|
+
kind: z.ZodEnum<{
|
|
27
|
+
tool: "tool";
|
|
28
|
+
rest: "rest";
|
|
29
|
+
}>;
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
reason: z.ZodString;
|
|
32
|
+
ticket: z.ZodString;
|
|
33
|
+
}, z.core.$strict>;
|
|
34
|
+
export type FidelityDocDrift = z.infer<typeof fidelityDocDriftSchema>;
|
|
35
|
+
export declare const fidelityInventorySchema: z.ZodObject<{
|
|
36
|
+
twin: z.ZodString;
|
|
37
|
+
package: z.ZodString;
|
|
38
|
+
updated: z.ZodString;
|
|
39
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
40
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
41
|
+
name: z.ZodString;
|
|
42
|
+
heat: z.ZodEnum<{
|
|
43
|
+
hot: "hot";
|
|
44
|
+
warm: "warm";
|
|
45
|
+
cold: "cold";
|
|
46
|
+
unclassified: "unclassified";
|
|
47
|
+
}>;
|
|
48
|
+
fidelity: z.ZodEnum<{
|
|
49
|
+
semantic: "semantic";
|
|
50
|
+
unsupported: "unsupported";
|
|
51
|
+
shape: "shape";
|
|
52
|
+
}>;
|
|
53
|
+
justification: z.ZodString;
|
|
54
|
+
}, z.core.$strict>>;
|
|
55
|
+
rest: z.ZodArray<z.ZodObject<{
|
|
56
|
+
name: z.ZodString;
|
|
57
|
+
heat: z.ZodEnum<{
|
|
58
|
+
hot: "hot";
|
|
59
|
+
warm: "warm";
|
|
60
|
+
cold: "cold";
|
|
61
|
+
unclassified: "unclassified";
|
|
62
|
+
}>;
|
|
63
|
+
fidelity: z.ZodEnum<{
|
|
64
|
+
semantic: "semantic";
|
|
65
|
+
unsupported: "unsupported";
|
|
66
|
+
shape: "shape";
|
|
67
|
+
}>;
|
|
68
|
+
justification: z.ZodString;
|
|
69
|
+
}, z.core.$strict>>;
|
|
70
|
+
doc_drift: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
71
|
+
kind: z.ZodEnum<{
|
|
72
|
+
tool: "tool";
|
|
73
|
+
rest: "rest";
|
|
74
|
+
}>;
|
|
75
|
+
name: z.ZodString;
|
|
76
|
+
reason: z.ZodString;
|
|
77
|
+
ticket: z.ZodString;
|
|
78
|
+
}, z.core.$strict>>>;
|
|
79
|
+
}, z.core.$strict>;
|
|
80
|
+
export type FidelityInventory = z.infer<typeof fidelityInventorySchema>;
|
|
81
|
+
export declare function loadFidelityInventory(path: string): FidelityInventory;
|
|
82
|
+
export interface FidelityDocRow {
|
|
83
|
+
name: string;
|
|
84
|
+
fidelity: string;
|
|
85
|
+
/** Present only when the table carries the optional Heat column. */
|
|
86
|
+
heat?: string;
|
|
87
|
+
}
|
|
88
|
+
export interface FidelityDocSource {
|
|
89
|
+
/** Shown in lint problems, e.g. "FIDELITY.md". */
|
|
90
|
+
label: string;
|
|
91
|
+
kind: "tool" | "rest";
|
|
92
|
+
markdown: string;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Expand one name cell into surface names. Backticked spans are the names;
|
|
96
|
+
* a span with no `.`, `/`, or space is shorthand for a sibling of the first
|
|
97
|
+
* span (Slack-style `` `reactions.add` / `remove` / `get` ``) and inherits
|
|
98
|
+
* its dotted prefix. Cells with no backticks name the surface verbatim
|
|
99
|
+
* (e.g. "Any unsupported path").
|
|
100
|
+
*/
|
|
101
|
+
export declare function expandSurfaceCell(cell: string): string[];
|
|
102
|
+
/**
|
|
103
|
+
* Parse every markdown table whose header names surfaces of `kind` + Tier.
|
|
104
|
+
* The Heat column (ENDPOINT-TIERS.md) is optional: parsed when the header
|
|
105
|
+
* names it, omitted otherwise, so pre-heat tables stay legal.
|
|
106
|
+
*/
|
|
107
|
+
export declare function parseFidelityDocRows(markdown: string, kind: "tool" | "rest"): FidelityDocRow[];
|
|
108
|
+
/**
|
|
109
|
+
* 1:1-lint the inventory against the FIDELITY doc tables. Returns human-
|
|
110
|
+
* readable problems (empty = clean). Directions checked per kind:
|
|
111
|
+
* every doc row must be in the inventory with the same fidelity tier, and
|
|
112
|
+
* every inventory entry must be documented unless a `doc_drift` entry
|
|
113
|
+
* (with its owning ticket) declares the gap. A drift declaration whose
|
|
114
|
+
* name IS documented is stale and reported, so drift entries self-expire.
|
|
115
|
+
*/
|
|
116
|
+
export declare function lintFidelityInventory(inventory: FidelityInventory, docs: FidelityDocSource[]): string[];
|
|
117
|
+
/** Set-compare tool names: inventory vs the live `listTools()` surface. */
|
|
118
|
+
export declare function compareToolNames(inventoryNames: string[], liveNames: string[]): {
|
|
119
|
+
missing: string[];
|
|
120
|
+
extra: string[];
|
|
121
|
+
};
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
//
|
|
3
|
+
// Structured fidelity inventory (F-730). Each twin ships a machine-readable
|
|
4
|
+
// surface list — `fidelity.inventory.json` — carrying, per MCP tool and REST
|
|
5
|
+
// surface, the heat tier (how deep the endpoint SHOULD be, ruled by the
|
|
6
|
+
// F-729 rubric) orthogonal to the fidelity tier (how deep it IS, per
|
|
7
|
+
// `fidelityTierSchema`), plus a justification for the classification.
|
|
8
|
+
//
|
|
9
|
+
// The FIDELITY doc tables are 1:1-linted against this inventory instead of
|
|
10
|
+
// the old soft "docs mention the tool name" checks (which let twin-stripe's
|
|
11
|
+
// implemented-but-undocumented refunds drift by silently). Known, ticketed
|
|
12
|
+
// doc gaps are declared in `doc_drift`: the lint accepts exactly those
|
|
13
|
+
// gaps and fails loudly once the docs catch up, so a declaration can never
|
|
14
|
+
// outlive the drift it describes.
|
|
15
|
+
import { readFileSync } from "node:fs";
|
|
16
|
+
import { z } from "zod";
|
|
17
|
+
import { fidelityTierSchema } from "./index.js";
|
|
18
|
+
export const heatTierSchema = z.enum(["hot", "warm", "cold", "unclassified"]);
|
|
19
|
+
export const fidelitySurfaceSchema = z.strictObject({
|
|
20
|
+
/** MCP tool name, or the REST surface string exactly as documented. */
|
|
21
|
+
name: z.string().min(1),
|
|
22
|
+
heat: heatTierSchema,
|
|
23
|
+
fidelity: fidelityTierSchema,
|
|
24
|
+
justification: z.string().min(1),
|
|
25
|
+
});
|
|
26
|
+
export const fidelityDocDriftSchema = z.strictObject({
|
|
27
|
+
kind: z.enum(["tool", "rest"]),
|
|
28
|
+
/** Must match an inventory entry of the same kind. */
|
|
29
|
+
name: z.string().min(1),
|
|
30
|
+
reason: z.string().min(1),
|
|
31
|
+
/** The Linear ticket that owns reconciling the docs. */
|
|
32
|
+
ticket: z.string().regex(/^F-\d+$/),
|
|
33
|
+
});
|
|
34
|
+
export const fidelityInventorySchema = z.strictObject({
|
|
35
|
+
twin: z.string().min(1),
|
|
36
|
+
package: z.string().min(1),
|
|
37
|
+
/** ISO date (YYYY-MM-DD) of the last human review of this inventory. */
|
|
38
|
+
updated: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
39
|
+
notes: z.string().optional(),
|
|
40
|
+
tools: z.array(fidelitySurfaceSchema).min(1),
|
|
41
|
+
rest: z.array(fidelitySurfaceSchema),
|
|
42
|
+
doc_drift: z.array(fidelityDocDriftSchema).default([]),
|
|
43
|
+
});
|
|
44
|
+
export function loadFidelityInventory(path) {
|
|
45
|
+
return fidelityInventorySchema.parse(JSON.parse(readFileSync(path, "utf8")));
|
|
46
|
+
}
|
|
47
|
+
const TOOL_NAME_HEADERS = new Set(["tool"]);
|
|
48
|
+
const REST_NAME_HEADERS = new Set(["route", "endpoint", "surface"]);
|
|
49
|
+
function splitTableRow(line) {
|
|
50
|
+
return line
|
|
51
|
+
.replace(/^\s*\|/, "")
|
|
52
|
+
.replace(/\|\s*$/, "")
|
|
53
|
+
.split("|")
|
|
54
|
+
.map((cell) => cell.trim());
|
|
55
|
+
}
|
|
56
|
+
function isSeparatorRow(cells) {
|
|
57
|
+
return cells.every((cell) => /^:?-{3,}:?$/.test(cell));
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Expand one name cell into surface names. Backticked spans are the names;
|
|
61
|
+
* a span with no `.`, `/`, or space is shorthand for a sibling of the first
|
|
62
|
+
* span (Slack-style `` `reactions.add` / `remove` / `get` ``) and inherits
|
|
63
|
+
* its dotted prefix. Cells with no backticks name the surface verbatim
|
|
64
|
+
* (e.g. "Any unsupported path").
|
|
65
|
+
*/
|
|
66
|
+
export function expandSurfaceCell(cell) {
|
|
67
|
+
const spans = [...cell.matchAll(/`([^`]+)`/g)].map((match) => match[1].trim());
|
|
68
|
+
if (spans.length === 0) {
|
|
69
|
+
const text = cell.trim();
|
|
70
|
+
return text.length > 0 ? [text] : [];
|
|
71
|
+
}
|
|
72
|
+
const [first, ...rest] = spans;
|
|
73
|
+
const lastDot = first.lastIndexOf(".");
|
|
74
|
+
const prefix = lastDot >= 0 ? first.slice(0, lastDot + 1) : "";
|
|
75
|
+
return [
|
|
76
|
+
first,
|
|
77
|
+
...rest.map((span) => /[./ ]/.test(span) || prefix === "" ? span : `${prefix}${span}`),
|
|
78
|
+
];
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Parse every markdown table whose header names surfaces of `kind` + Tier.
|
|
82
|
+
* The Heat column (ENDPOINT-TIERS.md) is optional: parsed when the header
|
|
83
|
+
* names it, omitted otherwise, so pre-heat tables stay legal.
|
|
84
|
+
*/
|
|
85
|
+
export function parseFidelityDocRows(markdown, kind) {
|
|
86
|
+
const nameHeaders = kind === "tool" ? TOOL_NAME_HEADERS : REST_NAME_HEADERS;
|
|
87
|
+
const rows = [];
|
|
88
|
+
const lines = markdown.split("\n");
|
|
89
|
+
let nameIdx = -1;
|
|
90
|
+
let tierIdx = -1;
|
|
91
|
+
let heatIdx = -1;
|
|
92
|
+
let inTable = false;
|
|
93
|
+
for (const line of lines) {
|
|
94
|
+
if (!line.trimStart().startsWith("|")) {
|
|
95
|
+
inTable = false;
|
|
96
|
+
nameIdx = -1;
|
|
97
|
+
tierIdx = -1;
|
|
98
|
+
heatIdx = -1;
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
const cells = splitTableRow(line);
|
|
102
|
+
if (!inTable) {
|
|
103
|
+
const headers = cells.map((cell) => cell.toLowerCase());
|
|
104
|
+
nameIdx = headers.findIndex((header) => nameHeaders.has(header));
|
|
105
|
+
tierIdx = headers.findIndex((header) => header === "tier");
|
|
106
|
+
heatIdx = headers.findIndex((header) => header === "heat");
|
|
107
|
+
inTable = true;
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if (isSeparatorRow(cells) || nameIdx < 0 || tierIdx < 0)
|
|
111
|
+
continue;
|
|
112
|
+
const fidelity = cells[tierIdx] ?? "";
|
|
113
|
+
const heat = heatIdx >= 0 ? { heat: cells[heatIdx] ?? "" } : {};
|
|
114
|
+
for (const name of expandSurfaceCell(cells[nameIdx] ?? "")) {
|
|
115
|
+
rows.push({ name, fidelity, ...heat });
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return rows;
|
|
119
|
+
}
|
|
120
|
+
// ─── Lint: inventory ⇔ docs, both directions ─────────────────────────────────
|
|
121
|
+
/**
|
|
122
|
+
* 1:1-lint the inventory against the FIDELITY doc tables. Returns human-
|
|
123
|
+
* readable problems (empty = clean). Directions checked per kind:
|
|
124
|
+
* every doc row must be in the inventory with the same fidelity tier, and
|
|
125
|
+
* every inventory entry must be documented unless a `doc_drift` entry
|
|
126
|
+
* (with its owning ticket) declares the gap. A drift declaration whose
|
|
127
|
+
* name IS documented is stale and reported, so drift entries self-expire.
|
|
128
|
+
*/
|
|
129
|
+
export function lintFidelityInventory(inventory, docs) {
|
|
130
|
+
const problems = [];
|
|
131
|
+
for (const kind of ["tool", "rest"]) {
|
|
132
|
+
const sources = docs.filter((doc) => doc.kind === kind);
|
|
133
|
+
if (sources.length === 0)
|
|
134
|
+
continue;
|
|
135
|
+
const labels = sources.map((doc) => doc.label).join(", ");
|
|
136
|
+
const entries = kind === "tool" ? inventory.tools : inventory.rest;
|
|
137
|
+
const drift = new Map(inventory.doc_drift.filter((d) => d.kind === kind).map((d) => [d.name, d]));
|
|
138
|
+
const inventoryByName = new Map();
|
|
139
|
+
for (const entry of entries) {
|
|
140
|
+
if (inventoryByName.has(entry.name)) {
|
|
141
|
+
problems.push(`inventory ${kind} '${entry.name}' is listed twice`);
|
|
142
|
+
}
|
|
143
|
+
inventoryByName.set(entry.name, entry);
|
|
144
|
+
}
|
|
145
|
+
const documented = new Map();
|
|
146
|
+
for (const source of sources) {
|
|
147
|
+
for (const row of parseFidelityDocRows(source.markdown, kind)) {
|
|
148
|
+
const existing = documented.get(row.name);
|
|
149
|
+
if (existing && existing.fidelity !== row.fidelity) {
|
|
150
|
+
problems.push(`${labels}: ${kind} '${row.name}' is documented twice with conflicting tiers ('${existing.fidelity}' vs '${row.fidelity}')`);
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
if (existing &&
|
|
154
|
+
existing.heat !== undefined &&
|
|
155
|
+
row.heat !== undefined &&
|
|
156
|
+
existing.heat !== row.heat) {
|
|
157
|
+
problems.push(`${labels}: ${kind} '${row.name}' is documented twice with conflicting heat ('${existing.heat}' vs '${row.heat}')`);
|
|
158
|
+
continue;
|
|
159
|
+
}
|
|
160
|
+
documented.set(row.name, row);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
for (const [name, row] of documented) {
|
|
164
|
+
const entry = inventoryByName.get(name);
|
|
165
|
+
if (!entry) {
|
|
166
|
+
problems.push(`${labels}: ${kind} '${name}' documented but missing from fidelity.inventory.json`);
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
if (entry.fidelity !== row.fidelity) {
|
|
170
|
+
problems.push(`${kind} '${name}': inventory says fidelity '${entry.fidelity}' but ${labels} says '${row.fidelity}'`);
|
|
171
|
+
}
|
|
172
|
+
if (row.heat !== undefined && entry.heat !== row.heat) {
|
|
173
|
+
problems.push(`${kind} '${name}': inventory says heat '${entry.heat}' but ${labels} says '${row.heat}'`);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
for (const entry of entries) {
|
|
177
|
+
if (documented.has(entry.name))
|
|
178
|
+
continue;
|
|
179
|
+
const declared = drift.get(entry.name);
|
|
180
|
+
if (!declared) {
|
|
181
|
+
problems.push(`${kind} '${entry.name}' is in fidelity.inventory.json but undocumented in ${labels}; add the row or declare doc_drift`);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
for (const declared of drift.values()) {
|
|
185
|
+
if (!inventoryByName.has(declared.name)) {
|
|
186
|
+
problems.push(`doc_drift ${kind} '${declared.name}' (${declared.ticket}) matches no inventory entry`);
|
|
187
|
+
}
|
|
188
|
+
if (documented.has(declared.name)) {
|
|
189
|
+
problems.push(`doc_drift ${kind} '${declared.name}' (${declared.ticket}) is stale — ${labels} now documents it; remove the declaration`);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return problems;
|
|
194
|
+
}
|
|
195
|
+
/** Set-compare tool names: inventory vs the live `listTools()` surface. */
|
|
196
|
+
export function compareToolNames(inventoryNames, liveNames) {
|
|
197
|
+
const inventory = new Set(inventoryNames);
|
|
198
|
+
const live = new Set(liveNames);
|
|
199
|
+
return {
|
|
200
|
+
missing: [...live].filter((name) => !inventory.has(name)).sort(),
|
|
201
|
+
extra: [...inventory].filter((name) => !live.has(name)).sort(),
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
//# sourceMappingURL=fidelity-inventory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fidelity-inventory.js","sourceRoot":"","sources":["../src/fidelity-inventory.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,4EAA4E;AAC5E,6EAA6E;AAC7E,wEAAwE;AACxE,qEAAqE;AACrE,sEAAsE;AACtE,EAAE;AACF,2EAA2E;AAC3E,4EAA4E;AAC5E,2EAA2E;AAC3E,uEAAuE;AACvE,2EAA2E;AAC3E,kCAAkC;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;AAG9E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,YAAY,CAAC;IAClD,uEAAuE;IACvE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,IAAI,EAAE,cAAc;IACpB,QAAQ,EAAE,kBAAkB;IAC5B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACjC,CAAC,CAAC;AAGH,MAAM,C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C,CAAC;IAC1C,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO;QACL,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;QAChE,KAAK,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;KAC/D,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type FidelityInventory } from "./fidelity-inventory.js";
|
|
2
|
+
export type ParityState = Record<string, unknown>;
|
|
3
|
+
export interface ParityStep {
|
|
4
|
+
tool: string;
|
|
5
|
+
arguments?: Record<string, unknown> | ((state: ParityState) => Record<string, unknown>);
|
|
6
|
+
/** Pull cross-call state (ids, numbers, shas) out of the response body. */
|
|
7
|
+
capture?: (body: unknown, state: ParityState) => void;
|
|
8
|
+
/** Expected HTTP status; default: any 2xx. */
|
|
9
|
+
status?: number;
|
|
10
|
+
/** Extra body assertion; return a problem string to fail the step. */
|
|
11
|
+
verify?: (body: unknown) => string | undefined;
|
|
12
|
+
}
|
|
13
|
+
export interface ParityRestProbe {
|
|
14
|
+
/** Label in the report, e.g. "unsupported-rest". */
|
|
15
|
+
surface: string;
|
|
16
|
+
method?: string;
|
|
17
|
+
/** Session-relative path, e.g. "/repos/acme/api/actions/runs". */
|
|
18
|
+
path: string;
|
|
19
|
+
/** Expected HTTP status. */
|
|
20
|
+
status: number;
|
|
21
|
+
/** Assert the body carries a `fidelity: "unsupported"` marker. */
|
|
22
|
+
expectUnsupportedEnvelope?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface ParityAppLike {
|
|
25
|
+
request(path: string | Request, init?: RequestInit): Response | Promise<Response>;
|
|
26
|
+
}
|
|
27
|
+
export interface RunParityOptions {
|
|
28
|
+
app: ParityAppLike;
|
|
29
|
+
twin: string;
|
|
30
|
+
inventory: FidelityInventory;
|
|
31
|
+
/** `listTools()` names from the twin source — the code truth. */
|
|
32
|
+
liveToolNames: string[];
|
|
33
|
+
steps: ParityStep[];
|
|
34
|
+
restProbes?: ParityRestProbe[];
|
|
35
|
+
/** Session id; default "fidelity-parity". */
|
|
36
|
+
sid?: string;
|
|
37
|
+
/** JWT secret; default env TWIN_AUTH_SECRET or the engine dev secret. */
|
|
38
|
+
secret?: string;
|
|
39
|
+
/** Extra JWT claims (login, team_id, account_id, ...). */
|
|
40
|
+
claims?: Record<string, unknown>;
|
|
41
|
+
/** Applied to every step without its own `verify` (twin error envelopes). */
|
|
42
|
+
stepVerify?: (body: unknown) => string | undefined;
|
|
43
|
+
/** Optional live upstream probes; entries are appended to the report. */
|
|
44
|
+
live?: () => Promise<unknown[]>;
|
|
45
|
+
}
|
|
46
|
+
export interface ParityResult {
|
|
47
|
+
ok: boolean;
|
|
48
|
+
failures: string[];
|
|
49
|
+
report: unknown[];
|
|
50
|
+
}
|
|
51
|
+
export declare function runFidelityParity(options: RunParityOptions): Promise<ParityResult>;
|
|
52
|
+
/** Script entrypoint: run, print the JSON report, set the exit code. */
|
|
53
|
+
export declare function runParityCli(options: RunParityOptions): Promise<ParityResult>;
|
|
54
|
+
export { compareToolNames, expandSurfaceCell, fidelityDocDriftSchema, fidelityInventorySchema, fidelitySurfaceSchema, heatTierSchema, lintFidelityInventory, loadFidelityInventory, parseFidelityDocRows, } from "./fidelity-inventory.js";
|
|
55
|
+
export type { FidelityDocDrift, FidelityDocRow, FidelityDocSource, FidelityInventory, FidelitySurface, HeatTier, } from "./fidelity-inventory.js";
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
//
|
|
3
|
+
// Shared fidelity:parity runner (F-730). One engine-level runner; each twin
|
|
4
|
+
// supplies declarative scenario data — an ordered, stateful chain of MCP
|
|
5
|
+
// calls with cross-call captures (a PR number, a charge id, a message ts) —
|
|
6
|
+
// plus its structured fidelity inventory. No per-twin runner copies (M1
|
|
7
|
+
// "twin-infra copies: 0" gate).
|
|
8
|
+
//
|
|
9
|
+
// The runner asserts three rings agree before it reports green:
|
|
10
|
+
// 1. live tool list (code truth from listTools())
|
|
11
|
+
// 2. fidelity.inventory.json tools (the machine-readable inventory)
|
|
12
|
+
// 3. scenario step coverage (every inventory tool exercised)
|
|
13
|
+
// and that every step answers its expected status through the frozen
|
|
14
|
+
// `POST /s/:sid/mcp/call` surface. Optional REST probes pin the loud-501
|
|
15
|
+
// unsupported envelope; an optional `live` hook lets a twin compare
|
|
16
|
+
// read-only shapes against the real upstream (e.g. `gh api`).
|
|
17
|
+
import { sign } from "hono/jwt";
|
|
18
|
+
import { compareToolNames, } from "./fidelity-inventory.js";
|
|
19
|
+
function bodyKeys(body) {
|
|
20
|
+
if (Array.isArray(body))
|
|
21
|
+
return ["array"];
|
|
22
|
+
if (body && typeof body === "object") {
|
|
23
|
+
return Object.keys(body).sort();
|
|
24
|
+
}
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
export async function runFidelityParity(options) {
|
|
28
|
+
const sid = options.sid ?? "fidelity-parity";
|
|
29
|
+
const secret = options.secret ?? process.env.TWIN_AUTH_SECRET ?? "dev-only-insecure-secret";
|
|
30
|
+
const token = await sign({ sid, exp: Math.floor(Date.now() / 1000) + 3600, ...options.claims }, secret);
|
|
31
|
+
const base = `/s/${sid}`;
|
|
32
|
+
const failures = [];
|
|
33
|
+
const report = [];
|
|
34
|
+
// Ring 1 ⇔ ring 2: inventory tools must equal the live tool list.
|
|
35
|
+
const inventoryNames = options.inventory.tools.map((entry) => entry.name);
|
|
36
|
+
const inventoryDiff = compareToolNames(inventoryNames, options.liveToolNames);
|
|
37
|
+
for (const name of inventoryDiff.missing) {
|
|
38
|
+
failures.push(`tool '${name}' is live in listTools() but missing from fidelity.inventory.json`);
|
|
39
|
+
}
|
|
40
|
+
for (const name of inventoryDiff.extra) {
|
|
41
|
+
failures.push(`tool '${name}' is in fidelity.inventory.json but not in listTools()`);
|
|
42
|
+
}
|
|
43
|
+
// Ring 2 ⇔ ring 3: every inventory tool needs at least one scenario step.
|
|
44
|
+
const covered = new Set(options.steps.map((step) => step.tool));
|
|
45
|
+
for (const name of inventoryNames) {
|
|
46
|
+
if (!covered.has(name))
|
|
47
|
+
failures.push(`no parity scenario step covers tool '${name}'`);
|
|
48
|
+
}
|
|
49
|
+
for (const tool of covered) {
|
|
50
|
+
if (!inventoryNames.includes(tool)) {
|
|
51
|
+
failures.push(`scenario step calls '${tool}' which is not in fidelity.inventory.json`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const state = {};
|
|
55
|
+
for (const step of options.steps) {
|
|
56
|
+
const args = typeof step.arguments === "function" ? step.arguments(state) : step.arguments ?? {};
|
|
57
|
+
const response = await options.app.request(`${base}/mcp/call`, {
|
|
58
|
+
method: "POST",
|
|
59
|
+
headers: { authorization: `Bearer ${token}`, "content-type": "application/json" },
|
|
60
|
+
body: JSON.stringify({ tool: step.tool, arguments: args }),
|
|
61
|
+
});
|
|
62
|
+
const body = await response.json().catch(() => ({}));
|
|
63
|
+
const expected = step.status === undefined ? response.ok : response.status === step.status;
|
|
64
|
+
if (!expected) {
|
|
65
|
+
failures.push(`${step.tool}: expected ${step.status ?? "2xx"}, got ${response.status} ${JSON.stringify(body).slice(0, 300)}`);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
const problem = (step.verify ?? options.stepVerify)?.(body);
|
|
69
|
+
if (problem)
|
|
70
|
+
failures.push(`${step.tool}: ${problem}`);
|
|
71
|
+
step.capture?.(body, state);
|
|
72
|
+
}
|
|
73
|
+
report.push({ tool: step.tool, status: response.status, ok: response.ok, keys: bodyKeys(body) });
|
|
74
|
+
}
|
|
75
|
+
for (const probe of options.restProbes ?? []) {
|
|
76
|
+
const response = await options.app.request(`${base}${probe.path}`, {
|
|
77
|
+
method: probe.method ?? "GET",
|
|
78
|
+
headers: { authorization: `Bearer ${token}` },
|
|
79
|
+
});
|
|
80
|
+
const body = await response.json().catch(() => ({}));
|
|
81
|
+
if (response.status !== probe.status) {
|
|
82
|
+
failures.push(`${probe.surface}: expected ${probe.status}, got ${response.status}`);
|
|
83
|
+
}
|
|
84
|
+
if (probe.expectUnsupportedEnvelope && !JSON.stringify(body).includes('"fidelity":"unsupported"')) {
|
|
85
|
+
failures.push(`${probe.surface}: body does not carry the fidelity:"unsupported" envelope`);
|
|
86
|
+
}
|
|
87
|
+
report.push({ surface: probe.surface, status: response.status, body });
|
|
88
|
+
}
|
|
89
|
+
if (options.live) {
|
|
90
|
+
report.push(...(await options.live()));
|
|
91
|
+
}
|
|
92
|
+
return { ok: failures.length === 0, failures, report };
|
|
93
|
+
}
|
|
94
|
+
/** Script entrypoint: run, print the JSON report, set the exit code. */
|
|
95
|
+
export async function runParityCli(options) {
|
|
96
|
+
const result = await runFidelityParity(options);
|
|
97
|
+
console.log(JSON.stringify({
|
|
98
|
+
twin: options.twin,
|
|
99
|
+
tools: options.inventory.tools.length,
|
|
100
|
+
rest_surfaces: options.inventory.rest.length,
|
|
101
|
+
ok: result.ok,
|
|
102
|
+
failures: result.failures,
|
|
103
|
+
report: result.report,
|
|
104
|
+
}, null, 2));
|
|
105
|
+
if (!result.ok) {
|
|
106
|
+
console.error(`fidelity:parity FAILED for ${options.twin} (${result.failures.length} problem(s))`);
|
|
107
|
+
process.exitCode = 1;
|
|
108
|
+
}
|
|
109
|
+
return result;
|
|
110
|
+
}
|
|
111
|
+
export { compareToolNames, expandSurfaceCell, fidelityDocDriftSchema, fidelityInventorySchema, fidelitySurfaceSchema, heatTierSchema, lintFidelityInventory, loadFidelityInventory, parseFidelityDocRows, } from "./fidelity-inventory.js";
|
|
112
|
+
//# sourceMappingURL=parity.js.map
|
|
@@ -0,0 +1 @@
|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
|
|
|
13
13
|
};
|
|
14
14
|
/** Hostnames the boot guard treats as loopback binds. */
|
|
15
15
|
export declare function isLoopbackHost(value: string): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* F-708: self-generate `TWIN_AUTH_SECRET` on first boot. An env-injected
|
|
18
|
+
* secret always wins (pome-cloud injects per-tenant secrets — that contract
|
|
19
|
+
* is untouched), and loopback binds keep the dev-fallback path. Otherwise
|
|
20
|
+
* the secret persisted at the compose-era contract location
|
|
21
|
+
* `.pome-data/<twin>/secret` (cwd-relative; `POME_TWIN_DATA_DIR` overrides
|
|
22
|
+
* the directory) is reused, or a fresh 32-byte hex secret is generated,
|
|
23
|
+
* persisted there, and printed once to stdout so the operator can mint JWTs.
|
|
24
|
+
*
|
|
25
|
+
* The resolved secret lands in `process.env.TWIN_AUTH_SECRET`, which is
|
|
26
|
+
* process-global by design: the engine's auth (`resolveAuthSecret`) reads
|
|
27
|
+
* the env, so one process serves one secret — the frozen boot contract is
|
|
28
|
+
* one twin per process, and a multi-twin process shares the first secret.
|
|
29
|
+
*/
|
|
30
|
+
export declare function ensureTwinAuthSecret(twin: string, host: string): void;
|
|
16
31
|
export declare function shadowedPrefix(routePath: string): string | null;
|
|
17
32
|
export declare function assertUniqueToolNames<TDomain>(tools: ReadonlyArray<ToolSpec<TDomain>>, twinId: string): void;
|
|
18
33
|
export declare function findTool<TDb, TSeed, TDomain>(definition: TwinDefinition<TDb, TSeed, TDomain>, name: string): ToolSpec<TDomain>;
|