@ixo/decision-oracle 0.0.0-stage → 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 +794 -2
- package/dist/act.d.ts +87 -0
- package/dist/act.d.ts.map +1 -0
- package/dist/act.js +20 -0
- package/dist/act.js.map +1 -0
- package/dist/app.d.ts +22 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/app.js +128 -0
- package/dist/app.js.map +1 -0
- package/dist/c2pa.wasm +0 -0
- package/dist/cli/commands/api.d.ts +50 -0
- package/dist/cli/commands/api.d.ts.map +1 -0
- package/dist/cli/commands/api.js +737 -0
- package/dist/cli/commands/api.js.map +1 -0
- package/dist/cli/commands/create-collection.d.ts +40 -0
- package/dist/cli/commands/create-collection.d.ts.map +1 -0
- package/dist/cli/commands/create-collection.js +318 -0
- package/dist/cli/commands/create-collection.js.map +1 -0
- package/dist/cli/commands/create-deed.d.ts +31 -0
- package/dist/cli/commands/create-deed.d.ts.map +1 -0
- package/dist/cli/commands/create-deed.js +208 -0
- package/dist/cli/commands/create-deed.js.map +1 -0
- package/dist/cli/commands/delegation.d.ts +26 -0
- package/dist/cli/commands/delegation.d.ts.map +1 -0
- package/dist/cli/commands/delegation.js +162 -0
- package/dist/cli/commands/delegation.js.map +1 -0
- package/dist/cli/commands/derive.d.ts +22 -0
- package/dist/cli/commands/derive.d.ts.map +1 -0
- package/dist/cli/commands/derive.js +53 -0
- package/dist/cli/commands/derive.js.map +1 -0
- package/dist/cli/commands/engine.d.ts +25 -0
- package/dist/cli/commands/engine.d.ts.map +1 -0
- package/dist/cli/commands/engine.js +107 -0
- package/dist/cli/commands/engine.js.map +1 -0
- package/dist/cli/commands/erase.d.ts +17 -0
- package/dist/cli/commands/erase.d.ts.map +1 -0
- package/dist/cli/commands/erase.js +117 -0
- package/dist/cli/commands/erase.js.map +1 -0
- package/dist/cli/commands/facts-run.d.ts +30 -0
- package/dist/cli/commands/facts-run.d.ts.map +1 -0
- package/dist/cli/commands/facts-run.js +409 -0
- package/dist/cli/commands/facts-run.js.map +1 -0
- package/dist/cli/commands/facts-scaffold.d.ts +22 -0
- package/dist/cli/commands/facts-scaffold.d.ts.map +1 -0
- package/dist/cli/commands/facts-scaffold.js +208 -0
- package/dist/cli/commands/facts-scaffold.js.map +1 -0
- package/dist/cli/commands/init.d.ts +18 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +34 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/login.d.ts +9 -0
- package/dist/cli/commands/login.d.ts.map +1 -0
- package/dist/cli/commands/login.js +16 -0
- package/dist/cli/commands/login.js.map +1 -0
- package/dist/cli/commands/logout.d.ts +10 -0
- package/dist/cli/commands/logout.d.ts.map +1 -0
- package/dist/cli/commands/logout.js +28 -0
- package/dist/cli/commands/logout.js.map +1 -0
- package/dist/cli/commands/manifest.d.ts +12 -0
- package/dist/cli/commands/manifest.d.ts.map +1 -0
- package/dist/cli/commands/manifest.js +48 -0
- package/dist/cli/commands/manifest.js.map +1 -0
- package/dist/cli/commands/oracle-init.d.ts +48 -0
- package/dist/cli/commands/oracle-init.d.ts.map +1 -0
- package/dist/cli/commands/oracle-init.js +1122 -0
- package/dist/cli/commands/oracle-init.js.map +1 -0
- package/dist/cli/commands/org.d.ts +28 -0
- package/dist/cli/commands/org.d.ts.map +1 -0
- package/dist/cli/commands/org.js +309 -0
- package/dist/cli/commands/org.js.map +1 -0
- package/dist/cli/commands/protocol-review.d.ts +20 -0
- package/dist/cli/commands/protocol-review.d.ts.map +1 -0
- package/dist/cli/commands/protocol-review.js +162 -0
- package/dist/cli/commands/protocol-review.js.map +1 -0
- package/dist/cli/commands/publish-protocol.d.ts +43 -0
- package/dist/cli/commands/publish-protocol.d.ts.map +1 -0
- package/dist/cli/commands/publish-protocol.js +345 -0
- package/dist/cli/commands/publish-protocol.js.map +1 -0
- package/dist/cli/commands/register.d.ts +16 -0
- package/dist/cli/commands/register.d.ts.map +1 -0
- package/dist/cli/commands/register.js +54 -0
- package/dist/cli/commands/register.js.map +1 -0
- package/dist/cli/commands/relink.d.ts +11 -0
- package/dist/cli/commands/relink.d.ts.map +1 -0
- package/dist/cli/commands/relink.js +36 -0
- package/dist/cli/commands/relink.js.map +1 -0
- package/dist/cli/commands/rubric-fetch-form.d.ts +16 -0
- package/dist/cli/commands/rubric-fetch-form.d.ts.map +1 -0
- package/dist/cli/commands/rubric-fetch-form.js +83 -0
- package/dist/cli/commands/rubric-fetch-form.js.map +1 -0
- package/dist/cli/commands/rubric-validate.d.ts +72 -0
- package/dist/cli/commands/rubric-validate.d.ts.map +1 -0
- package/dist/cli/commands/rubric-validate.js +163 -0
- package/dist/cli/commands/rubric-validate.js.map +1 -0
- package/dist/cli/commands/scan.d.ts +13 -0
- package/dist/cli/commands/scan.d.ts.map +1 -0
- package/dist/cli/commands/scan.js +39 -0
- package/dist/cli/commands/scan.js.map +1 -0
- package/dist/cli/commands/skills.d.ts +11 -0
- package/dist/cli/commands/skills.d.ts.map +1 -0
- package/dist/cli/commands/skills.js +19 -0
- package/dist/cli/commands/skills.js.map +1 -0
- package/dist/cli/commands/submit-claim.d.ts +25 -0
- package/dist/cli/commands/submit-claim.d.ts.map +1 -0
- package/dist/cli/commands/submit-claim.js +155 -0
- package/dist/cli/commands/submit-claim.js.map +1 -0
- package/dist/cli/index.d.ts +15 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +206 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/lib/agent-card-schema.d.ts +8 -0
- package/dist/cli/lib/agent-card-schema.d.ts.map +1 -0
- package/dist/cli/lib/agent-card-schema.js +169 -0
- package/dist/cli/lib/agent-card-schema.js.map +1 -0
- package/dist/cli/lib/ai-rest.d.ts +12 -0
- package/dist/cli/lib/ai-rest.d.ts.map +1 -0
- package/dist/cli/lib/ai-rest.js +36 -0
- package/dist/cli/lib/ai-rest.js.map +1 -0
- package/dist/cli/lib/args.d.ts +33 -0
- package/dist/cli/lib/args.d.ts.map +1 -0
- package/dist/cli/lib/args.js +24 -0
- package/dist/cli/lib/args.js.map +1 -0
- package/dist/cli/lib/authhub.d.ts +7 -0
- package/dist/cli/lib/authhub.d.ts.map +1 -0
- package/dist/cli/lib/authhub.js +210 -0
- package/dist/cli/lib/authhub.js.map +1 -0
- package/dist/cli/lib/chain.d.ts +264 -0
- package/dist/cli/lib/chain.d.ts.map +1 -0
- package/dist/cli/lib/chain.js +584 -0
- package/dist/cli/lib/chain.js.map +1 -0
- package/dist/cli/lib/devvars.d.ts +59 -0
- package/dist/cli/lib/devvars.d.ts.map +1 -0
- package/dist/cli/lib/devvars.js +206 -0
- package/dist/cli/lib/devvars.js.map +1 -0
- package/dist/cli/lib/engine.d.ts +54 -0
- package/dist/cli/lib/engine.d.ts.map +1 -0
- package/dist/cli/lib/engine.js +112 -0
- package/dist/cli/lib/engine.js.map +1 -0
- package/dist/cli/lib/identity-cards.d.ts +188 -0
- package/dist/cli/lib/identity-cards.d.ts.map +1 -0
- package/dist/cli/lib/identity-cards.js +261 -0
- package/dist/cli/lib/identity-cards.js.map +1 -0
- package/dist/cli/lib/matrix-account.d.ts +79 -0
- package/dist/cli/lib/matrix-account.d.ts.map +1 -0
- package/dist/cli/lib/matrix-account.js +228 -0
- package/dist/cli/lib/matrix-account.js.map +1 -0
- package/dist/cli/lib/oracle-account.d.ts +108 -0
- package/dist/cli/lib/oracle-account.d.ts.map +1 -0
- package/dist/cli/lib/oracle-account.js +207 -0
- package/dist/cli/lib/oracle-account.js.map +1 -0
- package/dist/cli/lib/project.d.ts +22 -0
- package/dist/cli/lib/project.d.ts.map +1 -0
- package/dist/cli/lib/project.js +62 -0
- package/dist/cli/lib/project.js.map +1 -0
- package/dist/cli/lib/session.d.ts +109 -0
- package/dist/cli/lib/session.d.ts.map +1 -0
- package/dist/cli/lib/session.js +354 -0
- package/dist/cli/lib/session.js.map +1 -0
- package/dist/cli/lib/workorder.d.ts +57 -0
- package/dist/cli/lib/workorder.d.ts.map +1 -0
- package/dist/cli/lib/workorder.js +101 -0
- package/dist/cli/lib/workorder.js.map +1 -0
- package/dist/config.d.ts +221 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +431 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +88 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +9 -0
- package/dist/context.js.map +1 -0
- package/dist/contracts/api.d.ts +3367 -0
- package/dist/contracts/api.d.ts.map +1 -0
- package/dist/contracts/api.js +1303 -0
- package/dist/contracts/api.js.map +1 -0
- package/dist/contracts/capabilities.d.ts +126 -0
- package/dist/contracts/capabilities.d.ts.map +1 -0
- package/dist/contracts/capabilities.js +164 -0
- package/dist/contracts/capabilities.js.map +1 -0
- package/dist/contracts/claim-source.d.ts +98 -0
- package/dist/contracts/claim-source.d.ts.map +1 -0
- package/dist/contracts/claim-source.js +17 -0
- package/dist/contracts/claim-source.js.map +1 -0
- package/dist/contracts/errors.d.ts +150 -0
- package/dist/contracts/errors.d.ts.map +1 -0
- package/dist/contracts/errors.js +121 -0
- package/dist/contracts/errors.js.map +1 -0
- package/dist/contracts/index.d.ts +15 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +11 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/payment-gate.d.ts +129 -0
- package/dist/contracts/payment-gate.d.ts.map +1 -0
- package/dist/contracts/payment-gate.js +24 -0
- package/dist/contracts/payment-gate.js.map +1 -0
- package/dist/contracts/start-api-claim.d.ts +90 -0
- package/dist/contracts/start-api-claim.d.ts.map +1 -0
- package/dist/contracts/start-api-claim.js +22 -0
- package/dist/contracts/start-api-claim.js.map +1 -0
- package/dist/contracts/webhooks.d.ts +1487 -0
- package/dist/contracts/webhooks.d.ts.map +1 -0
- package/dist/contracts/webhooks.js +71 -0
- package/dist/contracts/webhooks.js.map +1 -0
- package/dist/contracts/work-order.d.ts +29 -0
- package/dist/contracts/work-order.d.ts.map +1 -0
- package/dist/contracts/work-order.js +12 -0
- package/dist/contracts/work-order.js.map +1 -0
- package/dist/cron/ai-cost.d.ts +29 -0
- package/dist/cron/ai-cost.d.ts.map +1 -0
- package/dist/cron/ai-cost.js +80 -0
- package/dist/cron/ai-cost.js.map +1 -0
- package/dist/cron/api-lane.d.ts +39 -0
- package/dist/cron/api-lane.d.ts.map +1 -0
- package/dist/cron/api-lane.js +203 -0
- package/dist/cron/api-lane.js.map +1 -0
- package/dist/cron/backlog.d.ts +50 -0
- package/dist/cron/backlog.d.ts.map +1 -0
- package/dist/cron/backlog.js +115 -0
- package/dist/cron/backlog.js.map +1 -0
- package/dist/cron/billing.d.ts +11 -0
- package/dist/cron/billing.d.ts.map +1 -0
- package/dist/cron/billing.js +69 -0
- package/dist/cron/billing.js.map +1 -0
- package/dist/cron/collection.d.ts +50 -0
- package/dist/cron/collection.d.ts.map +1 -0
- package/dist/cron/collection.js +118 -0
- package/dist/cron/collection.js.map +1 -0
- package/dist/cron/funding.d.ts +16 -0
- package/dist/cron/funding.d.ts.map +1 -0
- package/dist/cron/funding.js +262 -0
- package/dist/cron/funding.js.map +1 -0
- package/dist/cron/payer-billing.d.ts +38 -0
- package/dist/cron/payer-billing.d.ts.map +1 -0
- package/dist/cron/payer-billing.js +119 -0
- package/dist/cron/payer-billing.js.map +1 -0
- package/dist/cron/scan.d.ts +43 -0
- package/dist/cron/scan.d.ts.map +1 -0
- package/dist/cron/scan.js +250 -0
- package/dist/cron/scan.js.map +1 -0
- package/dist/db/client.d.ts +14 -0
- package/dist/db/client.d.ts.map +1 -0
- package/dist/db/client.js +14 -0
- package/dist/db/client.js.map +1 -0
- package/dist/db/index.d.ts +7 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +7 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/schema.d.ts +6738 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.js +1433 -0
- package/dist/db/schema.js.map +1 -0
- package/dist/define-oracle.d.ts +32 -0
- package/dist/define-oracle.d.ts.map +1 -0
- package/dist/define-oracle.js +80 -0
- package/dist/define-oracle.js.map +1 -0
- package/dist/dev-oracle.d.ts +9 -0
- package/dist/dev-oracle.d.ts.map +1 -0
- package/dist/dev-oracle.js +19 -0
- package/dist/dev-oracle.js.map +1 -0
- package/dist/dev-worker.d.ts +10 -0
- package/dist/dev-worker.d.ts.map +1 -0
- package/dist/dev-worker.js +12 -0
- package/dist/dev-worker.js.map +1 -0
- package/dist/env.d.ts +146 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +10 -0
- package/dist/env.js.map +1 -0
- package/dist/facts/exif.d.ts +43 -0
- package/dist/facts/exif.d.ts.map +1 -0
- package/dist/facts/exif.js +224 -0
- package/dist/facts/exif.js.map +1 -0
- package/dist/facts/fact.d.ts +62 -0
- package/dist/facts/fact.d.ts.map +1 -0
- package/dist/facts/fact.js +105 -0
- package/dist/facts/fact.js.map +1 -0
- package/dist/facts/geo.d.ts +55 -0
- package/dist/facts/geo.d.ts.map +1 -0
- package/dist/facts/geo.js +267 -0
- package/dist/facts/geo.js.map +1 -0
- package/dist/facts/index.d.ts +31 -0
- package/dist/facts/index.d.ts.map +1 -0
- package/dist/facts/index.js +27 -0
- package/dist/facts/index.js.map +1 -0
- package/dist/facts/linked-doc.d.ts +60 -0
- package/dist/facts/linked-doc.d.ts.map +1 -0
- package/dist/facts/linked-doc.js +101 -0
- package/dist/facts/linked-doc.js.map +1 -0
- package/dist/facts/types.d.ts +278 -0
- package/dist/facts/types.d.ts.map +1 -0
- package/dist/facts/types.js +19 -0
- package/dist/facts/types.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/api-lane/accept.d.ts +29 -0
- package/dist/lib/api-lane/accept.d.ts.map +1 -0
- package/dist/lib/api-lane/accept.js +218 -0
- package/dist/lib/api-lane/accept.js.map +1 -0
- package/dist/lib/api-lane/claim-list.d.ts +44 -0
- package/dist/lib/api-lane/claim-list.d.ts.map +1 -0
- package/dist/lib/api-lane/claim-list.js +92 -0
- package/dist/lib/api-lane/claim-list.js.map +1 -0
- package/dist/lib/api-lane/company.d.ts +56 -0
- package/dist/lib/api-lane/company.d.ts.map +1 -0
- package/dist/lib/api-lane/company.js +103 -0
- package/dist/lib/api-lane/company.js.map +1 -0
- package/dist/lib/api-lane/events.d.ts +21 -0
- package/dist/lib/api-lane/events.d.ts.map +1 -0
- package/dist/lib/api-lane/events.js +111 -0
- package/dist/lib/api-lane/events.js.map +1 -0
- package/dist/lib/api-lane/ids.d.ts +39 -0
- package/dist/lib/api-lane/ids.d.ts.map +1 -0
- package/dist/lib/api-lane/ids.js +78 -0
- package/dist/lib/api-lane/ids.js.map +1 -0
- package/dist/lib/api-lane/index.d.ts +16 -0
- package/dist/lib/api-lane/index.d.ts.map +1 -0
- package/dist/lib/api-lane/index.js +16 -0
- package/dist/lib/api-lane/index.js.map +1 -0
- package/dist/lib/api-lane/linked.d.ts +264 -0
- package/dist/lib/api-lane/linked.d.ts.map +1 -0
- package/dist/lib/api-lane/linked.js +272 -0
- package/dist/lib/api-lane/linked.js.map +1 -0
- package/dist/lib/api-lane/media-type.d.ts +15 -0
- package/dist/lib/api-lane/media-type.d.ts.map +1 -0
- package/dist/lib/api-lane/media-type.js +73 -0
- package/dist/lib/api-lane/media-type.js.map +1 -0
- package/dist/lib/api-lane/member-emails.d.ts +83 -0
- package/dist/lib/api-lane/member-emails.d.ts.map +1 -0
- package/dist/lib/api-lane/member-emails.js +213 -0
- package/dist/lib/api-lane/member-emails.js.map +1 -0
- package/dist/lib/api-lane/members.d.ts +42 -0
- package/dist/lib/api-lane/members.d.ts.map +1 -0
- package/dist/lib/api-lane/members.js +75 -0
- package/dist/lib/api-lane/members.js.map +1 -0
- package/dist/lib/api-lane/notify.d.ts +47 -0
- package/dist/lib/api-lane/notify.d.ts.map +1 -0
- package/dist/lib/api-lane/notify.js +240 -0
- package/dist/lib/api-lane/notify.js.map +1 -0
- package/dist/lib/api-lane/pause.d.ts +41 -0
- package/dist/lib/api-lane/pause.d.ts.map +1 -0
- package/dist/lib/api-lane/pause.js +155 -0
- package/dist/lib/api-lane/pause.js.map +1 -0
- package/dist/lib/api-lane/record.d.ts +76 -0
- package/dist/lib/api-lane/record.d.ts.map +1 -0
- package/dist/lib/api-lane/record.js +337 -0
- package/dist/lib/api-lane/record.js.map +1 -0
- package/dist/lib/api-lane/retention.d.ts +43 -0
- package/dist/lib/api-lane/retention.d.ts.map +1 -0
- package/dist/lib/api-lane/retention.js +176 -0
- package/dist/lib/api-lane/retention.js.map +1 -0
- package/dist/lib/api-lane/review.d.ts +76 -0
- package/dist/lib/api-lane/review.d.ts.map +1 -0
- package/dist/lib/api-lane/review.js +355 -0
- package/dist/lib/api-lane/review.js.map +1 -0
- package/dist/lib/api-lane/reviewers.d.ts +109 -0
- package/dist/lib/api-lane/reviewers.d.ts.map +1 -0
- package/dist/lib/api-lane/reviewers.js +755 -0
- package/dist/lib/api-lane/reviewers.js.map +1 -0
- package/dist/lib/api-lane/source-delete.d.ts +16 -0
- package/dist/lib/api-lane/source-delete.d.ts.map +1 -0
- package/dist/lib/api-lane/source-delete.js +50 -0
- package/dist/lib/api-lane/source-delete.js.map +1 -0
- package/dist/lib/api-lane/source.d.ts +19 -0
- package/dist/lib/api-lane/source.d.ts.map +1 -0
- package/dist/lib/api-lane/source.js +226 -0
- package/dist/lib/api-lane/source.js.map +1 -0
- package/dist/lib/api-lane/submitter.d.ts +22 -0
- package/dist/lib/api-lane/submitter.d.ts.map +1 -0
- package/dist/lib/api-lane/submitter.js +34 -0
- package/dist/lib/api-lane/submitter.js.map +1 -0
- package/dist/lib/api-lane/timeline.d.ts +20 -0
- package/dist/lib/api-lane/timeline.d.ts.map +1 -0
- package/dist/lib/api-lane/timeline.js +23 -0
- package/dist/lib/api-lane/timeline.js.map +1 -0
- package/dist/lib/api-lane/webhook-crypto.d.ts +44 -0
- package/dist/lib/api-lane/webhook-crypto.d.ts.map +1 -0
- package/dist/lib/api-lane/webhook-crypto.js +103 -0
- package/dist/lib/api-lane/webhook-crypto.js.map +1 -0
- package/dist/lib/api-lane/webhooks.d.ts +117 -0
- package/dist/lib/api-lane/webhooks.d.ts.map +1 -0
- package/dist/lib/api-lane/webhooks.js +503 -0
- package/dist/lib/api-lane/webhooks.js.map +1 -0
- package/dist/lib/archive.d.ts +64 -0
- package/dist/lib/archive.d.ts.map +1 -0
- package/dist/lib/archive.js +305 -0
- package/dist/lib/archive.js.map +1 -0
- package/dist/lib/bech32.d.ts +8 -0
- package/dist/lib/bech32.d.ts.map +1 -0
- package/dist/lib/bech32.js +39 -0
- package/dist/lib/bech32.js.map +1 -0
- package/dist/lib/claim-erase.d.ts +22 -0
- package/dist/lib/claim-erase.d.ts.map +1 -0
- package/dist/lib/claim-erase.js +44 -0
- package/dist/lib/claim-erase.js.map +1 -0
- package/dist/lib/cursor.d.ts +11 -0
- package/dist/lib/cursor.d.ts.map +1 -0
- package/dist/lib/cursor.js +20 -0
- package/dist/lib/cursor.js.map +1 -0
- package/dist/lib/email/send.d.ts +43 -0
- package/dist/lib/email/send.d.ts.map +1 -0
- package/dist/lib/email/send.js +71 -0
- package/dist/lib/email/send.js.map +1 -0
- package/dist/lib/email/template.d.ts +217 -0
- package/dist/lib/email/template.d.ts.map +1 -0
- package/dist/lib/email/template.js +713 -0
- package/dist/lib/email/template.js.map +1 -0
- package/dist/lib/engine/adr36.d.ts +56 -0
- package/dist/lib/engine/adr36.d.ts.map +1 -0
- package/dist/lib/engine/adr36.js +76 -0
- package/dist/lib/engine/adr36.js.map +1 -0
- package/dist/lib/engine/client.d.ts +162 -0
- package/dist/lib/engine/client.d.ts.map +1 -0
- package/dist/lib/engine/client.js +473 -0
- package/dist/lib/engine/client.js.map +1 -0
- package/dist/lib/engine/types.d.ts +1356 -0
- package/dist/lib/engine/types.d.ts.map +1 -0
- package/dist/lib/engine/types.js +562 -0
- package/dist/lib/engine/types.js.map +1 -0
- package/dist/lib/errors.d.ts +73 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/errors.js +96 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/lib/facts/builder.d.ts +88 -0
- package/dist/lib/facts/builder.d.ts.map +1 -0
- package/dist/lib/facts/builder.js +239 -0
- package/dist/lib/facts/builder.js.map +1 -0
- package/dist/lib/facts/ctx.d.ts +34 -0
- package/dist/lib/facts/ctx.d.ts.map +1 -0
- package/dist/lib/facts/ctx.js +51 -0
- package/dist/lib/facts/ctx.js.map +1 -0
- package/dist/lib/facts/expected.d.ts +23 -0
- package/dist/lib/facts/expected.d.ts.map +1 -0
- package/dist/lib/facts/expected.js +16 -0
- package/dist/lib/facts/expected.js.map +1 -0
- package/dist/lib/facts/fact-cache.d.ts +469 -0
- package/dist/lib/facts/fact-cache.d.ts.map +1 -0
- package/dist/lib/facts/fact-cache.js +52 -0
- package/dist/lib/facts/fact-cache.js.map +1 -0
- package/dist/lib/facts/factset.d.ts +608 -0
- package/dist/lib/facts/factset.d.ts.map +1 -0
- package/dist/lib/facts/factset.js +226 -0
- package/dist/lib/facts/factset.js.map +1 -0
- package/dist/lib/facts/producer.d.ts +190 -0
- package/dist/lib/facts/producer.d.ts.map +1 -0
- package/dist/lib/facts/producer.js +15 -0
- package/dist/lib/facts/producer.js.map +1 -0
- package/dist/lib/facts/runner.d.ts +111 -0
- package/dist/lib/facts/runner.d.ts.map +1 -0
- package/dist/lib/facts/runner.js +438 -0
- package/dist/lib/facts/runner.js.map +1 -0
- package/dist/lib/facts/stock/ai-check.d.ts +100 -0
- package/dist/lib/facts/stock/ai-check.d.ts.map +1 -0
- package/dist/lib/facts/stock/ai-check.js +526 -0
- package/dist/lib/facts/stock/ai-check.js.map +1 -0
- package/dist/lib/facts/stock/ai-inputs.d.ts +104 -0
- package/dist/lib/facts/stock/ai-inputs.d.ts.map +1 -0
- package/dist/lib/facts/stock/ai-inputs.js +332 -0
- package/dist/lib/facts/stock/ai-inputs.js.map +1 -0
- package/dist/lib/facts/stock/ai-provider.d.ts +105 -0
- package/dist/lib/facts/stock/ai-provider.d.ts.map +1 -0
- package/dist/lib/facts/stock/ai-provider.js +250 -0
- package/dist/lib/facts/stock/ai-provider.js.map +1 -0
- package/dist/lib/facts/stock/ai-unique.d.ts +85 -0
- package/dist/lib/facts/stock/ai-unique.d.ts.map +1 -0
- package/dist/lib/facts/stock/ai-unique.js +208 -0
- package/dist/lib/facts/stock/ai-unique.js.map +1 -0
- package/dist/lib/facts/stock/archive.d.ts +63 -0
- package/dist/lib/facts/stock/archive.d.ts.map +1 -0
- package/dist/lib/facts/stock/archive.js +349 -0
- package/dist/lib/facts/stock/archive.js.map +1 -0
- package/dist/lib/facts/stock/c2pa-trust-list.d.ts +16 -0
- package/dist/lib/facts/stock/c2pa-trust-list.d.ts.map +1 -0
- package/dist/lib/facts/stock/c2pa-trust-list.js +637 -0
- package/dist/lib/facts/stock/c2pa-trust-list.js.map +1 -0
- package/dist/lib/facts/stock/c2pa.d.ts +56 -0
- package/dist/lib/facts/stock/c2pa.d.ts.map +1 -0
- package/dist/lib/facts/stock/c2pa.js +234 -0
- package/dist/lib/facts/stock/c2pa.js.map +1 -0
- package/dist/lib/facts/stock/call.d.ts +91 -0
- package/dist/lib/facts/stock/call.d.ts.map +1 -0
- package/dist/lib/facts/stock/call.js +281 -0
- package/dist/lib/facts/stock/call.js.map +1 -0
- package/dist/lib/facts/stock/capability.d.ts +39 -0
- package/dist/lib/facts/stock/capability.d.ts.map +1 -0
- package/dist/lib/facts/stock/capability.js +59 -0
- package/dist/lib/facts/stock/capability.js.map +1 -0
- package/dist/lib/facts/stock/ext-source.d.ts +51 -0
- package/dist/lib/facts/stock/ext-source.d.ts.map +1 -0
- package/dist/lib/facts/stock/ext-source.js +201 -0
- package/dist/lib/facts/stock/ext-source.js.map +1 -0
- package/dist/lib/facts/stock/frequency-fact.d.ts +59 -0
- package/dist/lib/facts/stock/frequency-fact.d.ts.map +1 -0
- package/dist/lib/facts/stock/frequency-fact.js +86 -0
- package/dist/lib/facts/stock/frequency-fact.js.map +1 -0
- package/dist/lib/facts/stock/frequency.d.ts +32 -0
- package/dist/lib/facts/stock/frequency.d.ts.map +1 -0
- package/dist/lib/facts/stock/frequency.js +48 -0
- package/dist/lib/facts/stock/frequency.js.map +1 -0
- package/dist/lib/facts/stock/index.d.ts +27 -0
- package/dist/lib/facts/stock/index.d.ts.map +1 -0
- package/dist/lib/facts/stock/index.js +28 -0
- package/dist/lib/facts/stock/index.js.map +1 -0
- package/dist/lib/facts/stock/normalize.d.ts +45 -0
- package/dist/lib/facts/stock/normalize.d.ts.map +1 -0
- package/dist/lib/facts/stock/normalize.js +135 -0
- package/dist/lib/facts/stock/normalize.js.map +1 -0
- package/dist/lib/facts/stock/phash.d.ts +55 -0
- package/dist/lib/facts/stock/phash.d.ts.map +1 -0
- package/dist/lib/facts/stock/phash.js +256 -0
- package/dist/lib/facts/stock/phash.js.map +1 -0
- package/dist/lib/facts/stock/rule-defaults.d.ts +72 -0
- package/dist/lib/facts/stock/rule-defaults.d.ts.map +1 -0
- package/dist/lib/facts/stock/rule-defaults.js +55 -0
- package/dist/lib/facts/stock/rule-defaults.js.map +1 -0
- package/dist/lib/facts/stock/send.d.ts +52 -0
- package/dist/lib/facts/stock/send.d.ts.map +1 -0
- package/dist/lib/facts/stock/send.js +148 -0
- package/dist/lib/facts/stock/send.js.map +1 -0
- package/dist/lib/facts/stock/unique-score.d.ts +138 -0
- package/dist/lib/facts/stock/unique-score.d.ts.map +1 -0
- package/dist/lib/facts/stock/unique-score.js +257 -0
- package/dist/lib/facts/stock/unique-score.js.map +1 -0
- package/dist/lib/facts/stock/unique-store.d.ts +420 -0
- package/dist/lib/facts/stock/unique-store.d.ts.map +1 -0
- package/dist/lib/facts/stock/unique-store.js +328 -0
- package/dist/lib/facts/stock/unique-store.js.map +1 -0
- package/dist/lib/facts/stock/unique.d.ts +35 -0
- package/dist/lib/facts/stock/unique.d.ts.map +1 -0
- package/dist/lib/facts/stock/unique.js +327 -0
- package/dist/lib/facts/stock/unique.js.map +1 -0
- package/dist/lib/facts/tools.d.ts +57 -0
- package/dist/lib/facts/tools.d.ts.map +1 -0
- package/dist/lib/facts/tools.js +325 -0
- package/dist/lib/facts/tools.js.map +1 -0
- package/dist/lib/facts/validate.d.ts +33 -0
- package/dist/lib/facts/validate.d.ts.map +1 -0
- package/dist/lib/facts/validate.js +137 -0
- package/dist/lib/facts/validate.js.map +1 -0
- package/dist/lib/hash.d.ts +44 -0
- package/dist/lib/hash.d.ts.map +1 -0
- package/dist/lib/hash.js +80 -0
- package/dist/lib/hash.js.map +1 -0
- package/dist/lib/http/client.d.ts +113 -0
- package/dist/lib/http/client.d.ts.map +1 -0
- package/dist/lib/http/client.js +330 -0
- package/dist/lib/http/client.js.map +1 -0
- package/dist/lib/ids.d.ts +17 -0
- package/dist/lib/ids.d.ts.map +1 -0
- package/dist/lib/ids.js +26 -0
- package/dist/lib/ids.js.map +1 -0
- package/dist/lib/ixo/attachments.d.ts +116 -0
- package/dist/lib/ixo/attachments.d.ts.map +1 -0
- package/dist/lib/ixo/attachments.js +290 -0
- package/dist/lib/ixo/attachments.js.map +1 -0
- package/dist/lib/ixo/authz.d.ts +40 -0
- package/dist/lib/ixo/authz.d.ts.map +1 -0
- package/dist/lib/ixo/authz.js +113 -0
- package/dist/lib/ixo/authz.js.map +1 -0
- package/dist/lib/ixo/blocksync/index.d.ts +90 -0
- package/dist/lib/ixo/blocksync/index.d.ts.map +1 -0
- package/dist/lib/ixo/blocksync/index.js +251 -0
- package/dist/lib/ixo/blocksync/index.js.map +1 -0
- package/dist/lib/ixo/blocksync/queries.d.ts +15 -0
- package/dist/lib/ixo/blocksync/queries.d.ts.map +1 -0
- package/dist/lib/ixo/blocksync/queries.js +144 -0
- package/dist/lib/ixo/blocksync/queries.js.map +1 -0
- package/dist/lib/ixo/blocksync/types.d.ts +184 -0
- package/dist/lib/ixo/blocksync/types.d.ts.map +1 -0
- package/dist/lib/ixo/blocksync/types.js +108 -0
- package/dist/lib/ixo/blocksync/types.js.map +1 -0
- package/dist/lib/ixo/cellnode.d.ts +35 -0
- package/dist/lib/ixo/cellnode.d.ts.map +1 -0
- package/dist/lib/ixo/cellnode.js +43 -0
- package/dist/lib/ixo/cellnode.js.map +1 -0
- package/dist/lib/ixo/chain-write.d.ts +130 -0
- package/dist/lib/ixo/chain-write.d.ts.map +1 -0
- package/dist/lib/ixo/chain-write.js +460 -0
- package/dist/lib/ixo/chain-write.js.map +1 -0
- package/dist/lib/ixo/chain.d.ts +1046 -0
- package/dist/lib/ixo/chain.d.ts.map +1 -0
- package/dist/lib/ixo/chain.js +279 -0
- package/dist/lib/ixo/chain.js.map +1 -0
- package/dist/lib/ixo/claim-bot.d.ts +49 -0
- package/dist/lib/ixo/claim-bot.d.ts.map +1 -0
- package/dist/lib/ixo/claim-bot.js +141 -0
- package/dist/lib/ixo/claim-bot.js.map +1 -0
- package/dist/lib/ixo/delegation-verify.d.ts +44 -0
- package/dist/lib/ixo/delegation-verify.d.ts.map +1 -0
- package/dist/lib/ixo/delegation-verify.js +101 -0
- package/dist/lib/ixo/delegation-verify.js.map +1 -0
- package/dist/lib/ixo/did.d.ts +13 -0
- package/dist/lib/ixo/did.d.ts.map +1 -0
- package/dist/lib/ixo/did.js +85 -0
- package/dist/lib/ixo/did.js.map +1 -0
- package/dist/lib/ixo/grant-chain.d.ts +55 -0
- package/dist/lib/ixo/grant-chain.d.ts.map +1 -0
- package/dist/lib/ixo/grant-chain.js +185 -0
- package/dist/lib/ixo/grant-chain.js.map +1 -0
- package/dist/lib/ixo/identity.d.ts +32 -0
- package/dist/lib/ixo/identity.d.ts.map +1 -0
- package/dist/lib/ixo/identity.js +104 -0
- package/dist/lib/ixo/identity.js.map +1 -0
- package/dist/lib/ixo/index.d.ts +118 -0
- package/dist/lib/ixo/index.d.ts.map +1 -0
- package/dist/lib/ixo/index.js +395 -0
- package/dist/lib/ixo/index.js.map +1 -0
- package/dist/lib/ixo/payment.d.ts +104 -0
- package/dist/lib/ixo/payment.d.ts.map +1 -0
- package/dist/lib/ixo/payment.js +136 -0
- package/dist/lib/ixo/payment.js.map +1 -0
- package/dist/lib/ixo/ucan-store.d.ts +30 -0
- package/dist/lib/ixo/ucan-store.d.ts.map +1 -0
- package/dist/lib/ixo/ucan-store.js +134 -0
- package/dist/lib/ixo/ucan-store.js.map +1 -0
- package/dist/lib/ixo/ucan.d.ts +96 -0
- package/dist/lib/ixo/ucan.d.ts.map +1 -0
- package/dist/lib/ixo/ucan.js +216 -0
- package/dist/lib/ixo/ucan.js.map +1 -0
- package/dist/lib/ixo/verified-read.d.ts +43 -0
- package/dist/lib/ixo/verified-read.d.ts.map +1 -0
- package/dist/lib/ixo/verified-read.js +73 -0
- package/dist/lib/ixo/verified-read.js.map +1 -0
- package/dist/lib/ixo/vfs.d.ts +27 -0
- package/dist/lib/ixo/vfs.d.ts.map +1 -0
- package/dist/lib/ixo/vfs.js +42 -0
- package/dist/lib/ixo/vfs.js.map +1 -0
- package/dist/lib/ixo/web-did.d.ts +7 -0
- package/dist/lib/ixo/web-did.d.ts.map +1 -0
- package/dist/lib/ixo/web-did.js +9 -0
- package/dist/lib/ixo/web-did.js.map +1 -0
- package/dist/lib/logger.d.ts +34 -0
- package/dist/lib/logger.d.ts.map +1 -0
- package/dist/lib/logger.js +126 -0
- package/dist/lib/logger.js.map +1 -0
- package/dist/lib/matrix/api.d.ts +57 -0
- package/dist/lib/matrix/api.d.ts.map +1 -0
- package/dist/lib/matrix/api.js +58 -0
- package/dist/lib/matrix/api.js.map +1 -0
- package/dist/lib/matrix/client.d.ts +41 -0
- package/dist/lib/matrix/client.d.ts.map +1 -0
- package/dist/lib/matrix/client.js +104 -0
- package/dist/lib/matrix/client.js.map +1 -0
- package/dist/lib/matrix/deliver.d.ts +224 -0
- package/dist/lib/matrix/deliver.d.ts.map +1 -0
- package/dist/lib/matrix/deliver.js +788 -0
- package/dist/lib/matrix/deliver.js.map +1 -0
- package/dist/lib/matrix/events.d.ts +114 -0
- package/dist/lib/matrix/events.d.ts.map +1 -0
- package/dist/lib/matrix/events.js +143 -0
- package/dist/lib/matrix/events.js.map +1 -0
- package/dist/lib/matrix/mxid.d.ts +24 -0
- package/dist/lib/matrix/mxid.d.ts.map +1 -0
- package/dist/lib/matrix/mxid.js +47 -0
- package/dist/lib/matrix/mxid.js.map +1 -0
- package/dist/lib/metrics.d.ts +105 -0
- package/dist/lib/metrics.d.ts.map +1 -0
- package/dist/lib/metrics.js +204 -0
- package/dist/lib/metrics.js.map +1 -0
- package/dist/lib/oauth/approvals.d.ts +160 -0
- package/dist/lib/oauth/approvals.d.ts.map +1 -0
- package/dist/lib/oauth/approvals.js +273 -0
- package/dist/lib/oauth/approvals.js.map +1 -0
- package/dist/lib/oauth/standing.d.ts +152 -0
- package/dist/lib/oauth/standing.d.ts.map +1 -0
- package/dist/lib/oauth/standing.js +299 -0
- package/dist/lib/oauth/standing.js.map +1 -0
- package/dist/lib/oauth/token.d.ts +60 -0
- package/dist/lib/oauth/token.d.ts.map +1 -0
- package/dist/lib/oauth/token.js +129 -0
- package/dist/lib/oauth/token.js.map +1 -0
- package/dist/lib/payments/extend.d.ts +42 -0
- package/dist/lib/payments/extend.d.ts.map +1 -0
- package/dist/lib/payments/extend.js +98 -0
- package/dist/lib/payments/extend.js.map +1 -0
- package/dist/lib/payments/facilitator.d.ts +220 -0
- package/dist/lib/payments/facilitator.d.ts.map +1 -0
- package/dist/lib/payments/facilitator.js +451 -0
- package/dist/lib/payments/facilitator.js.map +1 -0
- package/dist/lib/payments/gate.d.ts +207 -0
- package/dist/lib/payments/gate.d.ts.map +1 -0
- package/dist/lib/payments/gate.js +481 -0
- package/dist/lib/payments/gate.js.map +1 -0
- package/dist/lib/payments/header-seal.d.ts +33 -0
- package/dist/lib/payments/header-seal.d.ts.map +1 -0
- package/dist/lib/payments/header-seal.js +76 -0
- package/dist/lib/payments/header-seal.js.map +1 -0
- package/dist/lib/payments/index.d.ts +12 -0
- package/dist/lib/payments/index.d.ts.map +1 -0
- package/dist/lib/payments/index.js +11 -0
- package/dist/lib/payments/index.js.map +1 -0
- package/dist/lib/payments/price.d.ts +25 -0
- package/dist/lib/payments/price.d.ts.map +1 -0
- package/dist/lib/payments/price.js +43 -0
- package/dist/lib/payments/price.js.map +1 -0
- package/dist/lib/payments/reconcile.d.ts +77 -0
- package/dist/lib/payments/reconcile.d.ts.map +1 -0
- package/dist/lib/payments/reconcile.js +317 -0
- package/dist/lib/payments/reconcile.js.map +1 -0
- package/dist/lib/payments/refund.d.ts +34 -0
- package/dist/lib/payments/refund.d.ts.map +1 -0
- package/dist/lib/payments/refund.js +123 -0
- package/dist/lib/payments/refund.js.map +1 -0
- package/dist/lib/payments/review-billing.d.ts +222 -0
- package/dist/lib/payments/review-billing.d.ts.map +1 -0
- package/dist/lib/payments/review-billing.js +609 -0
- package/dist/lib/payments/review-billing.js.map +1 -0
- package/dist/lib/payments/settle.d.ts +44 -0
- package/dist/lib/payments/settle.d.ts.map +1 -0
- package/dist/lib/payments/settle.js +306 -0
- package/dist/lib/payments/settle.js.map +1 -0
- package/dist/lib/payments/terms.d.ts +27 -0
- package/dist/lib/payments/terms.d.ts.map +1 -0
- package/dist/lib/payments/terms.js +21 -0
- package/dist/lib/payments/terms.js.map +1 -0
- package/dist/lib/payouts.d.ts +20 -0
- package/dist/lib/payouts.d.ts.map +1 -0
- package/dist/lib/payouts.js +30 -0
- package/dist/lib/payouts.js.map +1 -0
- package/dist/lib/readiness.d.ts +42 -0
- package/dist/lib/readiness.d.ts.map +1 -0
- package/dist/lib/readiness.js +130 -0
- package/dist/lib/readiness.js.map +1 -0
- package/dist/lib/redact.d.ts +23 -0
- package/dist/lib/redact.d.ts.map +1 -0
- package/dist/lib/redact.js +67 -0
- package/dist/lib/redact.js.map +1 -0
- package/dist/lib/register.d.ts +85 -0
- package/dist/lib/register.d.ts.map +1 -0
- package/dist/lib/register.js +390 -0
- package/dist/lib/register.js.map +1 -0
- package/dist/lib/review/attestation.d.ts +92 -0
- package/dist/lib/review/attestation.d.ts.map +1 -0
- package/dist/lib/review/attestation.js +264 -0
- package/dist/lib/review/attestation.js.map +1 -0
- package/dist/lib/review/reviewer-grant.d.ts +146 -0
- package/dist/lib/review/reviewer-grant.d.ts.map +1 -0
- package/dist/lib/review/reviewer-grant.js +359 -0
- package/dist/lib/review/reviewer-grant.js.map +1 -0
- package/dist/lib/review/tasks.d.ts +18 -0
- package/dist/lib/review/tasks.d.ts.map +1 -0
- package/dist/lib/review/tasks.js +36 -0
- package/dist/lib/review/tasks.js.map +1 -0
- package/dist/lib/sentry.d.ts +89 -0
- package/dist/lib/sentry.d.ts.map +1 -0
- package/dist/lib/sentry.js +284 -0
- package/dist/lib/sentry.js.map +1 -0
- package/dist/lib/spans.d.ts +14 -0
- package/dist/lib/spans.d.ts.map +1 -0
- package/dist/lib/spans.js +28 -0
- package/dist/lib/spans.js.map +1 -0
- package/dist/lib/tracing.d.ts +31 -0
- package/dist/lib/tracing.d.ts.map +1 -0
- package/dist/lib/tracing.js +66 -0
- package/dist/lib/tracing.js.map +1 -0
- package/dist/lib/ttl-cache.d.ts +26 -0
- package/dist/lib/ttl-cache.d.ts.map +1 -0
- package/dist/lib/ttl-cache.js +61 -0
- package/dist/lib/ttl-cache.js.map +1 -0
- package/dist/lib/validator.d.ts +19 -0
- package/dist/lib/validator.d.ts.map +1 -0
- package/dist/lib/validator.js +32 -0
- package/dist/lib/validator.js.map +1 -0
- package/dist/lib/work-order/form.d.ts +40 -0
- package/dist/lib/work-order/form.d.ts.map +1 -0
- package/dist/lib/work-order/form.js +316 -0
- package/dist/lib/work-order/form.js.map +1 -0
- package/dist/lib/work-order/index.d.ts +20 -0
- package/dist/lib/work-order/index.d.ts.map +1 -0
- package/dist/lib/work-order/index.js +66 -0
- package/dist/lib/work-order/index.js.map +1 -0
- package/dist/middleware/api/audit.d.ts +9 -0
- package/dist/middleware/api/audit.d.ts.map +1 -0
- package/dist/middleware/api/audit.js +38 -0
- package/dist/middleware/api/audit.js.map +1 -0
- package/dist/middleware/api/auth.d.ts +29 -0
- package/dist/middleware/api/auth.d.ts.map +1 -0
- package/dist/middleware/api/auth.js +105 -0
- package/dist/middleware/api/auth.js.map +1 -0
- package/dist/middleware/api/console.d.ts +92 -0
- package/dist/middleware/api/console.d.ts.map +1 -0
- package/dist/middleware/api/console.js +446 -0
- package/dist/middleware/api/console.js.map +1 -0
- package/dist/middleware/api/errors.d.ts +48 -0
- package/dist/middleware/api/errors.d.ts.map +1 -0
- package/dist/middleware/api/errors.js +133 -0
- package/dist/middleware/api/errors.js.map +1 -0
- package/dist/middleware/api/idempotency.d.ts +23 -0
- package/dist/middleware/api/idempotency.d.ts.map +1 -0
- package/dist/middleware/api/idempotency.js +158 -0
- package/dist/middleware/api/idempotency.js.map +1 -0
- package/dist/middleware/api/keys.d.ts +14 -0
- package/dist/middleware/api/keys.d.ts.map +1 -0
- package/dist/middleware/api/keys.js +66 -0
- package/dist/middleware/api/keys.js.map +1 -0
- package/dist/middleware/api/membership.d.ts +32 -0
- package/dist/middleware/api/membership.d.ts.map +1 -0
- package/dist/middleware/api/membership.js +48 -0
- package/dist/middleware/api/membership.js.map +1 -0
- package/dist/middleware/api/oauth.d.ts +28 -0
- package/dist/middleware/api/oauth.d.ts.map +1 -0
- package/dist/middleware/api/oauth.js +109 -0
- package/dist/middleware/api/oauth.js.map +1 -0
- package/dist/middleware/api/rate-limit.d.ts +23 -0
- package/dist/middleware/api/rate-limit.d.ts.map +1 -0
- package/dist/middleware/api/rate-limit.js +70 -0
- package/dist/middleware/api/rate-limit.js.map +1 -0
- package/dist/middleware/api/types.d.ts +92 -0
- package/dist/middleware/api/types.d.ts.map +1 -0
- package/dist/middleware/api/types.js +7 -0
- package/dist/middleware/api/types.js.map +1 -0
- package/dist/middleware/api/wait.d.ts +21 -0
- package/dist/middleware/api/wait.d.ts.map +1 -0
- package/dist/middleware/api/wait.js +85 -0
- package/dist/middleware/api/wait.js.map +1 -0
- package/dist/middleware/capability.d.ts +32 -0
- package/dist/middleware/capability.d.ts.map +1 -0
- package/dist/middleware/capability.js +113 -0
- package/dist/middleware/capability.js.map +1 -0
- package/dist/middleware/database.d.ts +14 -0
- package/dist/middleware/database.d.ts.map +1 -0
- package/dist/middleware/database.js +18 -0
- package/dist/middleware/database.js.map +1 -0
- package/dist/middleware/error-handler.d.ts +13 -0
- package/dist/middleware/error-handler.d.ts.map +1 -0
- package/dist/middleware/error-handler.js +127 -0
- package/dist/middleware/error-handler.js.map +1 -0
- package/dist/middleware/observability.d.ts +32 -0
- package/dist/middleware/observability.d.ts.map +1 -0
- package/dist/middleware/observability.js +134 -0
- package/dist/middleware/observability.js.map +1 -0
- package/dist/middleware/rate-limit.d.ts +16 -0
- package/dist/middleware/rate-limit.d.ts.map +1 -0
- package/dist/middleware/rate-limit.js +56 -0
- package/dist/middleware/rate-limit.js.map +1 -0
- package/dist/middleware/ucan-auth.d.ts +39 -0
- package/dist/middleware/ucan-auth.d.ts.map +1 -0
- package/dist/middleware/ucan-auth.js +278 -0
- package/dist/middleware/ucan-auth.js.map +1 -0
- package/dist/networks.d.ts +34 -0
- package/dist/networks.d.ts.map +1 -0
- package/dist/networks.js +49 -0
- package/dist/networks.js.map +1 -0
- package/dist/oracle.d.ts +193 -0
- package/dist/oracle.d.ts.map +1 -0
- package/dist/oracle.js +245 -0
- package/dist/oracle.js.map +1 -0
- package/dist/routes/health.d.ts +16 -0
- package/dist/routes/health.d.ts.map +1 -0
- package/dist/routes/health.js +29 -0
- package/dist/routes/health.js.map +1 -0
- package/dist/routes/v1/admin.d.ts +18 -0
- package/dist/routes/v1/admin.d.ts.map +1 -0
- package/dist/routes/v1/admin.js +101 -0
- package/dist/routes/v1/admin.js.map +1 -0
- package/dist/routes/v1/api/admin-claims.d.ts +14 -0
- package/dist/routes/v1/api/admin-claims.d.ts.map +1 -0
- package/dist/routes/v1/api/admin-claims.js +82 -0
- package/dist/routes/v1/api/admin-claims.js.map +1 -0
- package/dist/routes/v1/api/admin-facilitator.d.ts +20 -0
- package/dist/routes/v1/api/admin-facilitator.d.ts.map +1 -0
- package/dist/routes/v1/api/admin-facilitator.js +64 -0
- package/dist/routes/v1/api/admin-facilitator.js.map +1 -0
- package/dist/routes/v1/api/admin.d.ts +9 -0
- package/dist/routes/v1/api/admin.d.ts.map +1 -0
- package/dist/routes/v1/api/admin.js +110 -0
- package/dist/routes/v1/api/admin.js.map +1 -0
- package/dist/routes/v1/api/audit.d.ts +8 -0
- package/dist/routes/v1/api/audit.d.ts.map +1 -0
- package/dist/routes/v1/api/audit.js +56 -0
- package/dist/routes/v1/api/audit.js.map +1 -0
- package/dist/routes/v1/api/batch.d.ts +17 -0
- package/dist/routes/v1/api/batch.d.ts.map +1 -0
- package/dist/routes/v1/api/batch.js +192 -0
- package/dist/routes/v1/api/batch.js.map +1 -0
- package/dist/routes/v1/api/claims-read.d.ts +43 -0
- package/dist/routes/v1/api/claims-read.d.ts.map +1 -0
- package/dist/routes/v1/api/claims-read.js +123 -0
- package/dist/routes/v1/api/claims-read.js.map +1 -0
- package/dist/routes/v1/api/claims.d.ts +131 -0
- package/dist/routes/v1/api/claims.d.ts.map +1 -0
- package/dist/routes/v1/api/claims.js +407 -0
- package/dist/routes/v1/api/claims.js.map +1 -0
- package/dist/routes/v1/api/collections-link.d.ts +14 -0
- package/dist/routes/v1/api/collections-link.d.ts.map +1 -0
- package/dist/routes/v1/api/collections-link.js +97 -0
- package/dist/routes/v1/api/collections-link.js.map +1 -0
- package/dist/routes/v1/api/export.d.ts +48 -0
- package/dist/routes/v1/api/export.d.ts.map +1 -0
- package/dist/routes/v1/api/export.js +251 -0
- package/dist/routes/v1/api/export.js.map +1 -0
- package/dist/routes/v1/api/index.d.ts +16 -0
- package/dist/routes/v1/api/index.d.ts.map +1 -0
- package/dist/routes/v1/api/index.js +68 -0
- package/dist/routes/v1/api/index.js.map +1 -0
- package/dist/routes/v1/api/keys.d.ts +9 -0
- package/dist/routes/v1/api/keys.d.ts.map +1 -0
- package/dist/routes/v1/api/keys.js +95 -0
- package/dist/routes/v1/api/keys.js.map +1 -0
- package/dist/routes/v1/api/me.d.ts +21 -0
- package/dist/routes/v1/api/me.d.ts.map +1 -0
- package/dist/routes/v1/api/me.js +122 -0
- package/dist/routes/v1/api/me.js.map +1 -0
- package/dist/routes/v1/api/members.d.ts +17 -0
- package/dist/routes/v1/api/members.d.ts.map +1 -0
- package/dist/routes/v1/api/members.js +406 -0
- package/dist/routes/v1/api/members.js.map +1 -0
- package/dist/routes/v1/api/meta.d.ts +12 -0
- package/dist/routes/v1/api/meta.d.ts.map +1 -0
- package/dist/routes/v1/api/meta.js +59 -0
- package/dist/routes/v1/api/meta.js.map +1 -0
- package/dist/routes/v1/api/openapi.gen.d.ts +2 -0
- package/dist/routes/v1/api/openapi.gen.d.ts.map +1 -0
- package/dist/routes/v1/api/openapi.gen.js +7 -0
- package/dist/routes/v1/api/openapi.gen.js.map +1 -0
- package/dist/routes/v1/api/protocols.d.ts +22 -0
- package/dist/routes/v1/api/protocols.d.ts.map +1 -0
- package/dist/routes/v1/api/protocols.js +153 -0
- package/dist/routes/v1/api/protocols.js.map +1 -0
- package/dist/routes/v1/api/review-billing.d.ts +18 -0
- package/dist/routes/v1/api/review-billing.d.ts.map +1 -0
- package/dist/routes/v1/api/review-billing.js +196 -0
- package/dist/routes/v1/api/review-billing.js.map +1 -0
- package/dist/routes/v1/api/review.d.ts +30 -0
- package/dist/routes/v1/api/review.d.ts.map +1 -0
- package/dist/routes/v1/api/review.js +302 -0
- package/dist/routes/v1/api/review.js.map +1 -0
- package/dist/routes/v1/api/sources.d.ts +10 -0
- package/dist/routes/v1/api/sources.d.ts.map +1 -0
- package/dist/routes/v1/api/sources.js +293 -0
- package/dist/routes/v1/api/sources.js.map +1 -0
- package/dist/routes/v1/api/uploads.d.ts +37 -0
- package/dist/routes/v1/api/uploads.d.ts.map +1 -0
- package/dist/routes/v1/api/uploads.js +414 -0
- package/dist/routes/v1/api/uploads.js.map +1 -0
- package/dist/routes/v1/api/views.d.ts +18 -0
- package/dist/routes/v1/api/views.d.ts.map +1 -0
- package/dist/routes/v1/api/views.js +95 -0
- package/dist/routes/v1/api/views.js.map +1 -0
- package/dist/routes/v1/api/webhooks.d.ts +14 -0
- package/dist/routes/v1/api/webhooks.d.ts.map +1 -0
- package/dist/routes/v1/api/webhooks.js +282 -0
- package/dist/routes/v1/api/webhooks.js.map +1 -0
- package/dist/routes/v1/api/work-orders.d.ts +45 -0
- package/dist/routes/v1/api/work-orders.d.ts.map +1 -0
- package/dist/routes/v1/api/work-orders.js +171 -0
- package/dist/routes/v1/api/work-orders.js.map +1 -0
- package/dist/routes/v1/claims.d.ts +21 -0
- package/dist/routes/v1/claims.d.ts.map +1 -0
- package/dist/routes/v1/claims.js +153 -0
- package/dist/routes/v1/claims.js.map +1 -0
- package/dist/routes/v1/collections.d.ts +45 -0
- package/dist/routes/v1/collections.d.ts.map +1 -0
- package/dist/routes/v1/collections.js +201 -0
- package/dist/routes/v1/collections.js.map +1 -0
- package/dist/routes/v1/index.d.ts +13 -0
- package/dist/routes/v1/index.d.ts.map +1 -0
- package/dist/routes/v1/index.js +41 -0
- package/dist/routes/v1/index.js.map +1 -0
- package/dist/routes/v1/info.d.ts +14 -0
- package/dist/routes/v1/info.d.ts.map +1 -0
- package/dist/routes/v1/info.js +75 -0
- package/dist/routes/v1/info.js.map +1 -0
- package/dist/routes/v1/mcp/index.d.ts +33 -0
- package/dist/routes/v1/mcp/index.d.ts.map +1 -0
- package/dist/routes/v1/mcp/index.js +252 -0
- package/dist/routes/v1/mcp/index.js.map +1 -0
- package/dist/routes/v1/mcp/oauth.d.ts +27 -0
- package/dist/routes/v1/mcp/oauth.d.ts.map +1 -0
- package/dist/routes/v1/mcp/oauth.js +500 -0
- package/dist/routes/v1/mcp/oauth.js.map +1 -0
- package/dist/routes/v1/mcp/tools.d.ts +71 -0
- package/dist/routes/v1/mcp/tools.d.ts.map +1 -0
- package/dist/routes/v1/mcp/tools.js +432 -0
- package/dist/routes/v1/mcp/tools.js.map +1 -0
- package/dist/routes/v1/mcp/ui.d.ts +45 -0
- package/dist/routes/v1/mcp/ui.d.ts.map +1 -0
- package/dist/routes/v1/mcp/ui.js +454 -0
- package/dist/routes/v1/mcp/ui.js.map +1 -0
- package/dist/routes/v1/oauth.d.ts +29 -0
- package/dist/routes/v1/oauth.d.ts.map +1 -0
- package/dist/routes/v1/oauth.js +256 -0
- package/dist/routes/v1/oauth.js.map +1 -0
- package/dist/routes/v1/reviewers.d.ts +22 -0
- package/dist/routes/v1/reviewers.d.ts.map +1 -0
- package/dist/routes/v1/reviewers.js +165 -0
- package/dist/routes/v1/reviewers.js.map +1 -0
- package/dist/routes/v1/reviews.d.ts +38 -0
- package/dist/routes/v1/reviews.d.ts.map +1 -0
- package/dist/routes/v1/reviews.js +234 -0
- package/dist/routes/v1/reviews.js.map +1 -0
- package/dist/routes/v1/shared.d.ts +586 -0
- package/dist/routes/v1/shared.d.ts.map +1 -0
- package/dist/routes/v1/shared.js +229 -0
- package/dist/routes/v1/shared.js.map +1 -0
- package/dist/routes/well-known.d.ts +15 -0
- package/dist/routes/well-known.d.ts.map +1 -0
- package/dist/routes/well-known.js +35 -0
- package/dist/routes/well-known.js.map +1 -0
- package/dist/runtime.d.ts +100 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +144 -0
- package/dist/runtime.js.map +1 -0
- package/dist/testing/fake-tools.d.ts +104 -0
- package/dist/testing/fake-tools.d.ts.map +1 -0
- package/dist/testing/fake-tools.js +213 -0
- package/dist/testing/fake-tools.js.map +1 -0
- package/dist/testing/index.d.ts +54 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +104 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/samples.d.ts +70 -0
- package/dist/testing/samples.d.ts.map +1 -0
- package/dist/testing/samples.js +92 -0
- package/dist/testing/samples.js.map +1 -0
- package/dist/workflows/claim-ingest.d.ts +250 -0
- package/dist/workflows/claim-ingest.d.ts.map +1 -0
- package/dist/workflows/claim-ingest.js +1020 -0
- package/dist/workflows/claim-ingest.js.map +1 -0
- package/dist/workflows/claim-source.d.ts +25 -0
- package/dist/workflows/claim-source.d.ts.map +1 -0
- package/dist/workflows/claim-source.js +107 -0
- package/dist/workflows/claim-source.js.map +1 -0
- package/dist/workflows/review-complete.d.ts +82 -0
- package/dist/workflows/review-complete.d.ts.map +1 -0
- package/dist/workflows/review-complete.js +455 -0
- package/dist/workflows/review-complete.js.map +1 -0
- package/dist/workflows/steps.d.ts +125 -0
- package/dist/workflows/steps.d.ts.map +1 -0
- package/dist/workflows/steps.js +325 -0
- package/dist/workflows/steps.js.map +1 -0
- package/docs/api.md +2595 -0
- package/docs/guide.md +1525 -0
- package/migrations/0000_init.sql +108 -0
- package/migrations/0001_review_attestation.sql +1 -0
- package/migrations/0002_decisions_facts.sql +1 -0
- package/migrations/0003_api_lane.sql +171 -0
- package/migrations/0004_api_v1_1.sql +19 -0
- package/migrations/0005_member_notify.sql +3 -0
- package/migrations/0006_source_collections.sql +16 -0
- package/migrations/0007_api_settlement.sql +27 -0
- package/migrations/0008_review_extend.sql +1 -0
- package/migrations/0009_card_refunds.sql +4 -0
- package/migrations/0010_even_scorpion.sql +16 -0
- package/migrations/0011_mcp_oauth.sql +27 -0
- package/migrations/0012_mcp_standing.sql +21 -0
- package/migrations/0013_unknown_krista_starr.sql +2 -0
- package/migrations/0014_last_carnage.sql +14 -0
- package/migrations/0015_company_authority.sql +26 -0
- package/migrations/0016_owner_only_links.sql +6 -0
- package/migrations/0017_organisations.sql +35 -0
- package/migrations/0018_remove_app_signed.sql +4 -0
- package/migrations/0019_submitted_via.sql +2 -0
- package/migrations/0020_drop_decision_to_pay.sql +4 -0
- package/migrations/0021_manual_erase.sql +25 -0
- package/migrations/0022_errored_facts.sql +1 -0
- package/migrations/0023_review_billing.sql +20 -0
- package/migrations/0024_pending_task_details.sql +1 -0
- package/migrations/meta/0000_snapshot.json +707 -0
- package/migrations/meta/0001_snapshot.json +714 -0
- package/migrations/meta/0002_snapshot.json +721 -0
- package/migrations/meta/0003_snapshot.json +1845 -0
- package/migrations/meta/0004_snapshot.json +1969 -0
- package/migrations/meta/0005_snapshot.json +1991 -0
- package/migrations/meta/0006_snapshot.json +2097 -0
- package/migrations/meta/0007_snapshot.json +2128 -0
- package/migrations/meta/0008_snapshot.json +2133 -0
- package/migrations/meta/0009_snapshot.json +2161 -0
- package/migrations/meta/0010_snapshot.json +2265 -0
- package/migrations/meta/0011_snapshot.json +2448 -0
- package/migrations/meta/0012_snapshot.json +2577 -0
- package/migrations/meta/0013_snapshot.json +2594 -0
- package/migrations/meta/0014_snapshot.json +2602 -0
- package/migrations/meta/0015_snapshot.json +2778 -0
- package/migrations/meta/0016_snapshot.json +2778 -0
- package/migrations/meta/0017_snapshot.json +2792 -0
- package/migrations/meta/0018_snapshot.json +2778 -0
- package/migrations/meta/0019_snapshot.json +2792 -0
- package/migrations/meta/0020_snapshot.json +2785 -0
- package/migrations/meta/0021_snapshot.json +2762 -0
- package/migrations/meta/0022_snapshot.json +2769 -0
- package/migrations/meta/0023_snapshot.json +2900 -0
- package/migrations/meta/0024_snapshot.json +2907 -0
- package/migrations/meta/_journal.json +181 -0
- package/openapi/decision-api.yaml +12204 -0
- package/package.json +121 -4
- package/skills/README.md +19 -0
- package/skills/add-openhands-support/SKILL.md +113 -0
- package/skills/create-collection/SKILL.md +199 -0
- package/skills/create-collection/reference/claims-stack.md +106 -0
- package/skills/create-collection/reference/collection.md +111 -0
- package/skills/create-oracle/SKILL.md +400 -0
- package/skills/create-rubric/SKILL.md +130 -0
- package/skills/create-rubric/reference/format-cheatsheet.md +186 -0
- package/skills/create-rubric/templates/claim-form.example.json +60 -0
- package/skills/decision-api-client/SKILL.md +236 -0
- package/skills/decision-api-oracle/SKILL.md +336 -0
- package/skills/publish-protocol/SKILL.md +151 -0
- package/skills/publish-protocol/reference/publishing.md +116 -0
- package/skills/reference/engine-contract.md +222 -0
- package/skills/write-facts/SKILL.md +221 -0
- package/skills/write-facts/reference/examples/http-vendor.ts +88 -0
- package/skills/write-facts/reference/examples/price-matches-agreement.ts +67 -0
- package/skills/write-facts/reference/facts-api.md +232 -0
- package/templates/project/.dev.vars.example +93 -0
- package/templates/project/.editorconfig +9 -0
- package/templates/project/CLAUDE.md +45 -0
- package/templates/project/README.md +199 -0
- package/templates/project/biome.json +37 -0
- package/templates/project/gitignore +29 -0
- package/templates/project/package.json +32 -0
- package/templates/project/src/facts/index.ts +19 -0
- package/templates/project/src/index.ts +25 -0
- package/templates/project/test/api-lane.test.ts +57 -0
- package/templates/project/test/facts.test.ts +14 -0
- package/templates/project/tsconfig.json +25 -0
- package/templates/project/vitest.config.ts +13 -0
- package/templates/project/wrangler.jsonc +446 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: decision-api-oracle
|
|
3
|
+
description: Use when setting up, deploying or testing a Decision API oracle (API_LANE on) — the shipment-delivery example on devnet (shipment-delivery-oracle.devnet.ixo.earth), or a provider turning the lane on for their own oracle — or when debugging one - a 401 on the console, PROTOCOL_NOT_ALLOWED, 503 payments-disabled, plan_inactive, an oracle the Decision Console does not list, member or review emails that never arrive.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# A Decision API oracle, from nothing to a passing smoke
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
The Decision API (`API_LANE`) is an oracle's second intake: paid, off-chain claims over HTTP at
|
|
11
|
+
`/v1/api`, decided by the same engine, never written to chain. The oracle holds the sources, keys,
|
|
12
|
+
uploads, reviews and webhooks; the engine decides and bills per the oracle's **plan** (the Standard
|
|
13
|
+
plan from the moment it registers, unless IXO sets another);
|
|
14
|
+
the payments facilitator settles each claim in PAY; the Decision Console
|
|
15
|
+
(`decision-console.devnet.ixo.earth`) is the UI over all of it.
|
|
16
|
+
|
|
17
|
+
The worked run is **`examples/shipment-delivery`** in this package's repo — SwiftDrop Express, a
|
|
18
|
+
fictional last-mile courier with cash on delivery, IXO's devnet deployment at
|
|
19
|
+
`shipment-delivery-oracle.devnet.ixo.earth`. Its README has the outcome table, the demo orders API
|
|
20
|
+
and the courier demo page (`/courier`). A provider's own project (from
|
|
21
|
+
`decision-oracle init`) follows the same steps with their names. Where the example has a script the
|
|
22
|
+
template does not (`deploy:devnet`, an env-scoped `db:migrate:remote`, `bun run smoke`), the step
|
|
23
|
+
says **example** and gives the template's equivalent — use that in a provider's project.
|
|
24
|
+
|
|
25
|
+
**Core principle: every step is an action you perform, in this order.** Run the commands; don't
|
|
26
|
+
recite them. Steps only a human can do are marked **HUMAN** — say exactly what to do and wait.
|
|
27
|
+
**Anything that signs on chain or changes an identity (publish, `oracle init`, a key the oracle
|
|
28
|
+
already uses) is dry-run first, shown, and run with `--yes` only on the owner's explicit OK.**
|
|
29
|
+
|
|
30
|
+
## When to use
|
|
31
|
+
|
|
32
|
+
- "Set up / deploy / test the Decision API example", "stand up shipment-delivery-oracle on devnet"
|
|
33
|
+
- A provider turning `API_LANE` on for their own oracle
|
|
34
|
+
- Any symptom in the troubleshooting table below
|
|
35
|
+
|
|
36
|
+
Not for: the chain lane's collections (`create-collection`), authoring a rubric (`create-rubric`),
|
|
37
|
+
writing handlers (`write-facts`).
|
|
38
|
+
|
|
39
|
+
## The run — in order
|
|
40
|
+
|
|
41
|
+
Work from the project directory (`examples/shipment-delivery` for the example). `bunx decision-oracle`
|
|
42
|
+
is the package CLI.
|
|
43
|
+
|
|
44
|
+
### 0. Prerequisites
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
bunx wrangler whoami # the Cloudflare account that owns the ixo.earth zone
|
|
48
|
+
bunx decision-oracle login --network devnet # the OWNER's AuthHub session — once
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
- `login` opens a browser: run it in the background and tell the human to finish there (**HUMAN**).
|
|
52
|
+
The session is the owner: it publishes the protocol, owns the oracle entity, and is the operator.
|
|
53
|
+
Put the session's OWN DID (`did:ixo:<address>` — `login` prints the address; the session file
|
|
54
|
+
`~/.ixo/publish-session-<network>.json` has the `did`) in `ORACLE_ADMIN_DIDS` in every `vars` block
|
|
55
|
+
of `wrangler.jsonc`. The example ships IXO's DID there — a copy of it must
|
|
56
|
+
replace it with the owner's.
|
|
57
|
+
- The account must hold the zone of the host (`*.ixo.earth` for IXO's deployments), or the Custom
|
|
58
|
+
Domain cannot attach. If `whoami` shows another account, stop and say so (**HUMAN**).
|
|
59
|
+
|
|
60
|
+
### 1. The protocol (example: publish `protocol/`; a provider: their protocol's DID)
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
bunx decision-oracle rubric validate --rubric protocol/rubric.json --form protocol/form.json
|
|
64
|
+
bunx decision-oracle publish-protocol --rubric protocol/rubric.json --form protocol/form.json --network devnet
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The second line is a dry run: show the plan, get the owner's OK, then re-run it with `--yes`. The
|
|
68
|
+
`publish-protocol` skill has the phases and failure modes. Then put the printed protocol DID in
|
|
69
|
+
`src/protocol.ts` (`SHIPMENT_PROTOCOL_DID = "did:ixo:entity:…"`) and keep whatever
|
|
70
|
+
`publish-protocol` left in `protocol/` — those are the anchored bytes. The rubric's four `ext`
|
|
71
|
+
sources share the endpoint `https://shipment-delivery-oracle.devnet.ixo.earth/demo/orders`: it
|
|
72
|
+
answers once step 5 deploys. Each is called with a UCAN from this oracle's did:web to the
|
|
73
|
+
endpoint's own did:web (`did:web:shipment-delivery-oracle.devnet.ixo.earth`), capability
|
|
74
|
+
`ixo:external-source` — the oracle never signs a capability the rubric names, and never an IXO
|
|
75
|
+
service's (`api.md`, "How an external source is called"). Check the work order:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
bunx decision-oracle protocol review <protocol did> --network devnet
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
It must list `ext.orderKnown`, `ext.deliveryCodeValid`, `ext.cashReconciled`,
|
|
82
|
+
`ext.dropoffNearAddress` (custom — one group of ours), `ai.photoShowsDelivery`, `unique`,
|
|
83
|
+
`frequency`.
|
|
84
|
+
|
|
85
|
+
### 2. Identity
|
|
86
|
+
|
|
87
|
+
Do `create-oracle` step 1 (two `derive --new` runs; relabel the first as `SERVICE_ED25519_MNEMONIC`;
|
|
88
|
+
the second is `ORACLE_SECP_MNEMONIC`) and step 6 (the owner's engine delegation), with:
|
|
89
|
+
|
|
90
|
+
- the three public lines (`ORACLE_ADDRESS`, `ORACLE_DID`, `ORACLE_MATRIX_USER_ID`) written into BOTH
|
|
91
|
+
the top-level and `env.devnet` `vars` of `wrangler.jsonc`;
|
|
92
|
+
- the delegation minted for THIS host:
|
|
93
|
+
`bunx decision-oracle delegation --for engine --audience did:web:decision-engine.devnet.ixo.earth --oracle did:web:shipment-delivery-oracle.devnet.ixo.earth --out owner-delegation.car --yes`.
|
|
94
|
+
|
|
95
|
+
An oracle that already has keys keeps them — replacing a live oracle's key is an identity change:
|
|
96
|
+
ask first. Never print a mnemonic or the CAR.
|
|
97
|
+
|
|
98
|
+
### 3. Secrets
|
|
99
|
+
|
|
100
|
+
Write `.dev.vars.<env>` (git-ignored, like `.dev.vars`; the example's is `.dev.vars.devnet`) —
|
|
101
|
+
never echo a value to the terminal:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
{
|
|
105
|
+
grep -E '^(SERVICE_ED25519_MNEMONIC|ORACLE_SECP_MNEMONIC)=' .dev.vars
|
|
106
|
+
printf 'OWNER_DELEGATION_CAR="%s"\n' "$(cat owner-delegation.car)"
|
|
107
|
+
printf 'WEBHOOK_ENCRYPTION_KEY="%s"\n' "$(openssl rand -base64 32)"
|
|
108
|
+
printf 'UNIQUE_HMAC_KEY="%s"\n' "$(openssl rand -base64 32)"
|
|
109
|
+
} > .dev.vars.<env>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The example's AI photo check runs on the Cloudflare AI Gateway (`AI_GATEWAY_ID` in
|
|
113
|
+
`wrangler.jsonc` + the `ai` binding — no secret; the account needs AI Gateway credits). Only with
|
|
114
|
+
`AI_PROVIDER=openrouter`: `OPENROUTER_API_KEY` — ask the owner for the key, **HUMAN**, and append it
|
|
115
|
+
the same way. Optional: `SENTRY_DSN`. `ORACLE_MATRIX_ACCESS_TOKEN` is required but
|
|
116
|
+
comes later — `oracle init` writes it (step 7).
|
|
117
|
+
`WEBHOOK_ENCRYPTION_KEY` and `UNIQUE_HMAC_KEY` are for life — generate them ONCE per deployment;
|
|
118
|
+
on an existing deployment, never regenerate (rotating strands every webhook secret / blinds the
|
|
119
|
+
duplicate registry). `.dev.vars` needs its own `WEBHOOK_ENCRYPTION_KEY` for `bun run dev`.
|
|
120
|
+
|
|
121
|
+
### 4. Cloudflare resources
|
|
122
|
+
|
|
123
|
+
The example's names (a provider: their own, one set per env; `<env>` is the wrangler env you
|
|
124
|
+
deploy — `devnet` in the example, `testnet` / `production` in the template):
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
bunx wrangler d1 create shipment-delivery-oracle-devnet # → env.<env> d1 database_id
|
|
128
|
+
bunx wrangler kv namespace create CACHE_KV --env devnet # → env.<env> kv id
|
|
129
|
+
bunx wrangler r2 bucket create shipment-delivery-oracle-uploads-devnet
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Paste each printed id over its placeholder in `env.<env>` (only there — the top level is local
|
|
133
|
+
dev). Then `bun run cf-typegen` and `bun run check`.
|
|
134
|
+
|
|
135
|
+
### 5. Migrate and deploy
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
bunx wrangler d1 migrations apply DB --remote --env <env> # BEFORE the first deploy
|
|
139
|
+
bunx wrangler deploy --env <env> --secrets-file .dev.vars.<env> # code + secrets in one version
|
|
140
|
+
curl -s https://<host>/.well-known/did.json
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Example:** `bun run db:migrate:remote` and `bun run deploy:devnet -- --secrets-file
|
|
144
|
+
.dev.vars.devnet` are those two lines for `devnet`; also check the demo orders API and the
|
|
145
|
+
courier page answer (`curl -s https://shipment-delivery-oracle.devnet.ixo.earth/demo/orders/ORD-1-C`,
|
|
146
|
+
`/courier`). The template has no env-scoped migrate script — use the `wrangler` line.
|
|
147
|
+
|
|
148
|
+
Later deploys: `bunx wrangler deploy --env <env>` (secrets persist); one secret: `bunx wrangler
|
|
149
|
+
secret put <NAME> --env <env>`. The did.json `id` must be `did:web:<host>`.
|
|
150
|
+
|
|
151
|
+
### 6. Engine registration — payable at once
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
bunx decision-oracle engine register --env <env> --env-file .dev.vars.<env>
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
It proves the oracle's address to the engine (ADR-36) with the owner's delegation and prints the
|
|
158
|
+
billing status. A 402 is the owner's credits: send them to the printed URL (**HUMAN**), then re-run.
|
|
159
|
+
If the engine already binds this did:web to a DIFFERENT address, it prints old → new and refuses:
|
|
160
|
+
that is an identity change — ask the owner before re-running with `--yes`.
|
|
161
|
+
|
|
162
|
+
Registering is the whole step for a provider: an oracle with no plan of its own runs at the
|
|
163
|
+
engine's **Standard** plan at once (payable in PAY, take 20%, paid to the owner's deed account,
|
|
164
|
+
listed in the Decision Console). Nothing to request. Done when the oracle appears in the engine's
|
|
165
|
+
`GET /v1/oracles` (the console's list).
|
|
166
|
+
|
|
167
|
+
**Example only (IXO's own oracles):** IXO staff switch the oracle to the IXO-owned plan in the
|
|
168
|
+
engine's admin plan editor (**HUMAN**, IXO staff) — the example's README names its terms. Done when
|
|
169
|
+
IXO confirms the oracle's plan version is > 0 (Standard is version 0).
|
|
170
|
+
|
|
171
|
+
### 7. On chain — the full identity (mandatory, owner 2026-10-01)
|
|
172
|
+
|
|
173
|
+
Every oracle built with the kit has a full on-chain identity — the entity, its `#pro` profile, its
|
|
174
|
+
`#dmn` domain card and its `#acard` Agent Card (which lists the `decision-api` service at the lane's published
|
|
175
|
+
price) — even when the API lane is all it serves. **Required, not optional:** a deployed oracle
|
|
176
|
+
without `ORACLE_ENTITY_DID` fails `/health/ready` (its `identity` check). In order:
|
|
177
|
+
|
|
178
|
+
1. Run `create-oracle` step 8 — `bunx decision-oracle oracle init --protocol <did> --kit-url https://shipment-delivery-oracle.devnet.ixo.earth --network devnet`
|
|
179
|
+
as a dry run, show the plan, and re-run the identical line with `--yes` only on the owner's OK.
|
|
180
|
+
`--logo <url>` is optional but recommended (without it the portal and the console show a
|
|
181
|
+
placeholder) — ask the owner for one.
|
|
182
|
+
2. Pin the entity DID it prints as `ORACLE_ENTITY_DID` in `wrangler.jsonc` — the top-level `vars`
|
|
183
|
+
AND every `env.<name>.vars` (named envs don't inherit).
|
|
184
|
+
3. `bunx wrangler secret put ORACLE_MATRIX_ACCESS_TOKEN --env <env>` with the value it wrote into
|
|
185
|
+
`.dev.vars` (never echo it), then redeploy (`bunx wrangler deploy --env <env>`).
|
|
186
|
+
4. Verify: `curl -s https://<host>/v1/info` shows `entityDid` = that DID (not `null`), and
|
|
187
|
+
`curl -s https://<host>/health/ready` answers `{"ok":true}`.
|
|
188
|
+
|
|
189
|
+
The oracle is not done until readiness passes. A 503 there names nothing; the operator's
|
|
190
|
+
`GET /v1/admin/status` shows which check failed (`identity` carries the command to run).
|
|
191
|
+
|
|
192
|
+
### 8. Operator: a source, its protocol, its billing, a key
|
|
193
|
+
|
|
194
|
+
The smoke (step 9) does all of this itself; for a real partner:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
K="--kit https://shipment-delivery-oracle.devnet.ixo.earth --network devnet"
|
|
198
|
+
bunx decision-oracle api source create --name "<partner>" --contact <email> --entity <org did> $K # as a controller of the org; pending-link; secret shown ONCE
|
|
199
|
+
bunx decision-oracle api admin protocols <sourceId> <protocol did> $K # dry run → --yes
|
|
200
|
+
bunx decision-oracle api admin billing-mode <sourceId> none $K # only for a partner who must not pay; dry run → --yes
|
|
201
|
+
bunx decision-oracle api key create --source <sourceId> --scopes claims:write,claims:read,webhooks:manage $K
|
|
202
|
+
bunx decision-oracle api review-billing enable --source <sourceId> $K # --cap <PAY> (default 1000); "Pay for reviews": as the org's CHAIN OWNER; dry run → --yes
|
|
203
|
+
bunx decision-oracle api review-billing status --source <sourceId> $K
|
|
204
|
+
bunx decision-oracle api review-billing disable --source <sourceId> $K # drop + revoke in the UCAN store; dry run → --yes
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
`review-billing` exists only while IXO's plan bills the oracle's reviews per review (`/v1/info`
|
|
208
|
+
`reviewBilling.mode: "x402"`; `enable` refuses otherwise). The login must be the organisation's
|
|
209
|
+
owner on chain — the reviews come out of ITS credits — and `--cap` (PAY) is a lifetime total,
|
|
210
|
+
never refunded: raise it by running `enable` again with a higher `--cap`.
|
|
211
|
+
|
|
212
|
+
The source is `pending-link` (no keys, no claims) until a controller of the organisation signs its
|
|
213
|
+
`SourceCompanyLink`, PUTs it to the engine and syncs — the Decision Console's "add oracle" does all
|
|
214
|
+
three, and so does `bunx decision-oracle api source link <sourceId> --yes`. The session runs `source create` / `key create` only as a controller; the operator's own
|
|
215
|
+
session should not be one where its oracle's reviews matter (the engine refuses a review chain
|
|
216
|
+
through the oracle's owner).
|
|
217
|
+
|
|
218
|
+
A new source allows exactly the oracle's `supportedProtocols` (empty until step 1's DID is in
|
|
219
|
+
`src/protocol.ts` and deployed) — `admin protocols` REPLACES the list.
|
|
220
|
+
|
|
221
|
+
### 9. Verify — the smoke (example)
|
|
222
|
+
|
|
223
|
+
The smoke is the example's (`scripts/smoke.ts`, over its protocol and fixtures); a provider's
|
|
224
|
+
project has none — verify theirs with step 8's key: `PUT /v1/api/uploads`, `POST /v1/api/claims`
|
|
225
|
+
with `Prefer: wait=60`, one claim per outcome their rubric can reach, and the review through the
|
|
226
|
+
console. An upload attachment carries the `cid` its upload returned —
|
|
227
|
+
`attachments[].{ question, uploadId, cid }`; accept refuses one without it or with another upload's.
|
|
228
|
+
For the example:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
bun run smoke -- --url https://shipment-delivery-oracle.devnet.ixo.earth \
|
|
232
|
+
[--entity <org did>] [--org-controller <key file|address>] [--reviewer <address>]
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Three people, three keys — never the same account twice:
|
|
236
|
+
|
|
237
|
+
- **the operator** (the AuthHub session, in `ORACLE_ADMIN_DIDS`): only the commercial terms —
|
|
238
|
+
`api admin billing-mode` and `api admin protocols`. It must NOT be the organisation's
|
|
239
|
+
controller or the reviewer: the engine refuses any review grant chain through the oracle's
|
|
240
|
+
identities, its owner included.
|
|
241
|
+
- **the organisation's controller** (`--org-controller`, a test account's key file or its address in
|
|
242
|
+
`~/.ixo/test-accounts-registry.json`; on devnet the default is SwiftDrop's admin Sara,
|
|
243
|
+
`~/.config/ixo-payouts/test-accounts/swiftdrop-sara.json`, controller of `--entity`'s default,
|
|
244
|
+
SwiftDrop's organisation `did:ixo:entity:2eeb3a4c03f3755872ada894734e47d2`): a source belongs to
|
|
245
|
+
an organisation (D10), so the controller creates it (`POST /v1/api/sources { entityDid }` →
|
|
246
|
+
`pending-link`), signs the `SourceCompanyLink` (kid = the did:key of the Ed25519 key on its IID,
|
|
247
|
+
canonical payload) and PUTs it to the ENGINE (`PUT /v1/sources/:oracleDid/:sourceId/company`,
|
|
248
|
+
UCAN `company/link`), syncs (`POST /v1/api/sources/:id/company/sync` → `active`), mints and
|
|
249
|
+
revokes the keys, and invites the reviewer. Its key needs no chain write: it already controls the
|
|
250
|
+
entity.
|
|
251
|
+
- **the reviewer** (`--reviewer`, from `~/.ixo/test-accounts.json`; default the network's first
|
|
252
|
+
account that is neither of the two — make one with the `ixo-test-account` skill): a MEMBER. The
|
|
253
|
+
controller invites it by DID with role `reviewer` and PUTs its role grant (≤ 30 days); the member
|
|
254
|
+
registers a `did:key` reviewer key, grants it `claims/review` on the source and answers through
|
|
255
|
+
the API with that two-link `reviewerGrant` (controller → member → key).
|
|
256
|
+
|
|
257
|
+
Every line `PASS`, then `ALL PASS`. It creates a free source (billing `none`), uploads the
|
|
258
|
+
fixtures, decides one stop per row of the example's outcome table (approve prepaid · approve COD ·
|
|
259
|
+
review cash short · review GPS far · partial refused · reject wrong code · reject unknown order ·
|
|
260
|
+
review reused photo, held on `unique:SD-DUP-1` with its `duplicates[]` naming the earlier claim ·
|
|
261
|
+
reject the same order claimed again by its courier (same `submitter`) · review dispatch down), answers the cash review (and the
|
|
262
|
+
claim-level `SD-RT-CHECKS` asked beside it) as a member does in the Decision Console (devnet's
|
|
263
|
+
reviewer is Dan — never an oracle operator's account, which the engine refuses in a reviewer grant), waits for the engine's fold (`decided partial`), walks
|
|
264
|
+
the rest of the surface, then revokes its keys and DELETEs its sources as the controller (`--keep`
|
|
265
|
+
keeps both). Each run spends ~13 engine decisions (and one review fold) of the owner's
|
|
266
|
+
credits. Then, on the owner's OK:
|
|
267
|
+
|
|
268
|
+
- `--frequency` — one courier over the daily limit (26 more decisions);
|
|
269
|
+
- `--paid` — one x402 claim paid from the session's own devnet deed. Needs a **subscription deed**
|
|
270
|
+
whose admin holds PAY and has granted the facilitator (`ixo173l540tvyu43ghmtstl2wu2lqztdt5e05e05c6`)
|
|
271
|
+
a `SendAuthorization` — the subscriptions service's devnet purchase / top-up does both (**HUMAN**
|
|
272
|
+
if absent). Check: `curl "https://devnet.ixo.earth/rest/cosmos/authz/v1beta1/grants?granter=<deed admin>&grantee=ixo173l540tvyu43ghmtstl2wu2lqztdt5e05e05c6&msg_type_url=/cosmos.bank.v1beta1.MsgSend"`.
|
|
273
|
+
Spends one decision price of PAY (60¢ in the example). The next SwiftDrop smoke after the
|
|
274
|
+
company-authority joint deploy runs with `--paid`.
|
|
275
|
+
|
|
276
|
+
### 10. Verify — the six member / review emails
|
|
277
|
+
|
|
278
|
+
Needs `EMAIL_FROM_ADDRESS`'s domain onboarded to Cloudflare Email Service on the account
|
|
279
|
+
(dashboard → Email Service, **HUMAN** if not) and `CONSOLE_URL` set (every link is a console link).
|
|
280
|
+
With the owner's email as the test inbox, in the console (**HUMAN** clicks; you watch
|
|
281
|
+
`bunx wrangler tail <worker> --env <env>` for `email.*` lines):
|
|
282
|
+
|
|
283
|
+
| # | Email | Trigger |
|
|
284
|
+
| --- | --- | --- |
|
|
285
|
+
| 1 | "<inviter> invited you to <source>" | the owner invites a reviewer by email (Members → Invite) |
|
|
286
|
+
| 2 | "<member> accepted your invitation to <source>" | the invitee accepts — to the inviter (a source owner without a member email gets it at the source's contact) |
|
|
287
|
+
| 3 | "Your access to <source> is ready" | the acceptance grants the delegation — to the member |
|
|
288
|
+
| 4 | "Review needed: <protocol> claim for <source>" | a claim goes `pending_review` (example: a COD stop with the cash short, from the courier page's stop 4) — to each member with `claims/review`, an email and `notifyReviews` on |
|
|
289
|
+
| 5 | "<n> claims need your review for <source>" | a second review claim inside 15 min is held, then sent as one batch by the minute tick |
|
|
290
|
+
| 6 | "Still waiting" / "Two weeks waiting: …" | reminders at 3 and 14 days for an unanswered claim — confirm it is scheduled, don't wait |
|
|
291
|
+
|
|
292
|
+
### 11. Payments on (a provider turning it on)
|
|
293
|
+
|
|
294
|
+
`API_PAYMENTS: "true"`, `X402_FACILITATOR_URL`, `X402_NETWORK` (`cosmos:devnet-1` / `cosmos:pandora-8`
|
|
295
|
+
/ `cosmos:ixo-5`) and `EARNINGS_ADDRESS` (the operator's own `ixo1…`, each offer's `payTo`; unset ⇒ no PAY)
|
|
296
|
+
in the env's vars, a price (`pricing.api` in `defineOracle`, whole cents), and the
|
|
297
|
+
oracle registered with the engine (step 6) — the facilitator reads the oracle's terms from its plan
|
|
298
|
+
(Standard unless IXO set another). `API_PAYMENTS:
|
|
299
|
+
"false"` is the kill switch: new x402 submits answer 503 `payments-disabled`, `none` sources keep
|
|
300
|
+
deciding. The example's devnet env ships with payments on.
|
|
301
|
+
|
|
302
|
+
### Pricing and card
|
|
303
|
+
|
|
304
|
+
The price per decision is `pricing.api` in `src/oracle.ts` (micro-USD, whole cents; `byProtocol` per
|
|
305
|
+
protocol), or the `API_PRICE_USD_CENTS` var when `pricing.api` is absent. Change it and redeploy;
|
|
306
|
+
the facilitator picks it up within ~5 min. **Card needs ≥ 50¢ per decision** (Stripe's minimum,
|
|
307
|
+
checked per claim), so a cheaper price offers PAY only. The example is 60¢ for that reason. The
|
|
308
|
+
Decision Console shows the price and card eligibility read-only.
|
|
309
|
+
|
|
310
|
+
## Troubleshooting
|
|
311
|
+
|
|
312
|
+
| Symptom | Cause → fix |
|
|
313
|
+
| --- | --- |
|
|
314
|
+
| Console / CLI 401 `UNAUTHORIZED` on a UCAN call | audience mismatch: the invocation names the did:web read from `<host>/.well-known/did.json` — `ORACLE_HOSTNAME` must equal the Custom Domain, and `--kit` must be that host |
|
|
315
|
+
| Worker 500s on every request after deploy; logs say `WEBHOOK_ENCRYPTION_KEY: required when API_LANE is on` | the secret is missing in that env — `bunx wrangler secret put WEBHOOK_ENCRYPTION_KEY --env <env>` (for a new deployment only; never replace an existing one) |
|
|
316
|
+
| `PROTOCOL_NOT_ALLOWED` on submit | the source's allow-list lacks it — empty means NONE; `api admin protocols <src> <did> --yes` |
|
|
317
|
+
| 503 `SOURCE_PAUSED` `payments-disabled` | `API_PAYMENTS` is off and the source bills `x402` — turn payments on, or `api admin billing-mode <src> none` |
|
|
318
|
+
| 402 again after a `PAYMENT-SIGNATURE` | the facilitator refused the payer: no deed / no `SendAuthorization` / not enough PAY — the fresh 402's error says which |
|
|
319
|
+
| offers refused `plan_inactive`, `accepts: []` | the engine has nobody to pay: the oracle is not registered (step 6), or its owner has no oracle claims collection / deed account to receive the Standard payout (the owner's subscription sets that up — **HUMAN**); the refusal's reason says which |
|
|
320
|
+
| Not listed in the console | not registered with the engine (step 6), or not payable (the row above); or the host is not a `*.ixo.earth` Custom Domain; or `CORS_ORIGINS` lacks `https://decision-console.devnet.ixo.earth` |
|
|
321
|
+
| Every API claim rejects with `frequency` | the caller sends no `submitter` — an uncountable window fails closed; send the courier id |
|
|
322
|
+
| 409 `REVIEW_EXPIRED` on a review answer | the paid claim's `answerBy` (its x402 reservation's expiry: extended up to 30 days for the review, else 24 h after verify) has passed — it can no longer be paid, and nothing was written. Answer paid reviews before the date the emails state |
|
|
323
|
+
| Claims go `pending_review` on `SD-RT-CHECKS` (example) | an errored fact (onError `review`) held them for a person: the AI provider unavailable (the photo check — no gateway credits, or `OPENROUTER_API_KEY` missing on `openrouter`), or the orders endpoint unreachable (`DEMO_ORDERS` off, or an `ORD-…-E` order) — read the claim's report; fix it, and new claims decide again (the held ones are answered in the console). A rubric without a claim-level ReviewTask parks such claims `review` with NO task — give it one |
|
|
324
|
+
| `engine register` refuses: "registered … as <old> — this would re-bind it to <new>" | the did:web is bound to another key on the engine — the configured `ORACLE_SECP_MNEMONIC` is not the one it registered with. Restore the old key, or (owner's OK) `--yes` |
|
|
325
|
+
| No emails at all | the `EMAIL_FROM_ADDRESS` domain is not onboarded, or `CONSOLE_URL` is unset — the lane logs and skips |
|
|
326
|
+
| `engine register` 402 | the owner's credits — top up at the printed URL, re-run |
|
|
327
|
+
| `/health/ready` 503 while the worker otherwise serves | `GET /v1/admin/status` names the failed check; `identity` ⇒ no `ORACLE_ENTITY_DID` on a deployed host — finish step 7 (`oracle init`, pin it in every `vars` block, redeploy) |
|
|
328
|
+
| `engine register` fails resolving the did:web | the env is not deployed yet, or `--env <env>` was left off (it registered `localhost`) |
|
|
329
|
+
|
|
330
|
+
## Output contract
|
|
331
|
+
|
|
332
|
+
Say plainly what is done and what is owed: the protocol DID and where it was written, the
|
|
333
|
+
worker's host and did:web, the oracle entity DID (`/v1/info` `entityDid`) and the `/health/ready`
|
|
334
|
+
answer, which ids and secrets were set (names only), the engine registration and
|
|
335
|
+
billing status, whether the oracle is listed/payable (for IXO's own: the plan version IXO confirmed), the smoke's last line and
|
|
336
|
+
any FAIL lines verbatim, the email rows seen, and every HUMAN step still open.
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: publish-protocol
|
|
3
|
+
description: Use when a use case needs to become an on-chain IXO protocol — anchoring a new claim form (#vct) and rubric (#rub) as a protocol entity, adopting a protocol that already has its form by anchoring or replacing its rubric alone, sourcing its Matrix room, resuming a half-finished publish, or debugging IXO_ROOM_NOT_FOUND / a missing #rub on chain.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Publishing a protocol
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
A **protocol** is an on-chain IXO entity (`entityType: protocol/verifiableClaim`) carrying two
|
|
11
|
+
LinkedResources — the claim form (`#vct`, SurveyJS) and the rubric (`#rub`, the JSON-LD rulebook a
|
|
12
|
+
decision engine judges claims by) — plus a Matrix room the claim bot needs before it will accept
|
|
13
|
+
submissions against it. This skill composes two things:
|
|
14
|
+
|
|
15
|
+
- **`create-rubric`** authors and validates the form + rubric pair. The decision engine owns the
|
|
16
|
+
rubric format; `bunx decision-oracle rubric validate` is that engine over HTTP.
|
|
17
|
+
- **`bunx decision-oracle publish-protocol`** does the chain authoring: `MsgCreateEntity` → Matrix
|
|
18
|
+
upload → `MsgAddLinkedResource` (`#vct` + `#rub`) + `MsgAddService` → source the Matrix room.
|
|
19
|
+
Phases `entity` / `resources` / `room` (default `all`), resumable with `--entity <did> --phase <p>`.
|
|
20
|
+
Plus `rub`, which is a different job — see below.
|
|
21
|
+
|
|
22
|
+
There are two jobs here, and picking the wrong one fails on chain:
|
|
23
|
+
|
|
24
|
+
| You have | Run |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| Nothing yet — a form and a rubric to publish as a NEW protocol | `--phase all` (the pipeline below) |
|
|
27
|
+
| A protocol that ALREADY carries its form (`#vct`), yours or someone else's | `--phase rub` |
|
|
28
|
+
|
|
29
|
+
## Safety — read before running anything
|
|
30
|
+
|
|
31
|
+
- **devnet is the only implicit network.** `--network` defaults to devnet; testnet/mainnet must be
|
|
32
|
+
named explicitly, never assumed.
|
|
33
|
+
- **Every chain write is a real signed transaction.** Every write goes through a confirm gate that
|
|
34
|
+
prints the exact plan (network, signer, messages, fee) and exits 0 without signing unless `--yes`
|
|
35
|
+
is passed. Run WITHOUT `--yes` first, show the printed plan to the user, and only re-run WITH
|
|
36
|
+
`--yes` after they explicitly say to proceed. These commands spend real funds (gas).
|
|
37
|
+
- **Signing is an AuthHub session, not a mnemonic.** `bunx decision-oracle login --network <n>` once —
|
|
38
|
+
it opens the login URL, waits for the callback, and saves a session under the user's home
|
|
39
|
+
directory. Every command after that reads it automatically. The session is also the Matrix
|
|
40
|
+
identity the `resources`/`room` phases use. Never ask anyone to paste a mnemonic or a session file
|
|
41
|
+
into a message.
|
|
42
|
+
|
|
43
|
+
## When to use
|
|
44
|
+
|
|
45
|
+
- "Publish a protocol / anchor a claim form and rubric on chain / get a protocol DID"
|
|
46
|
+
- "Adopt this protocol" / "put my rubric on an existing protocol" / "publish a new version of the
|
|
47
|
+
rules" — the protocol already has its form, so only `#rub` changes: see `--phase rub` below
|
|
48
|
+
- Resuming a publish that stopped partway (an entity DID exists, resources or room don't)
|
|
49
|
+
- `IXO_ROOM_NOT_FOUND` from the claim bot, or Blocksync shows a protocol with no `#rub`
|
|
50
|
+
|
|
51
|
+
## Pipeline
|
|
52
|
+
|
|
53
|
+
1. **Author + validate FIRST — before any chain write.** With the `create-rubric` skill: author
|
|
54
|
+
`form.json` (from its `templates/claim-form.example.json`) and `rubric.json` per its interview,
|
|
55
|
+
leaving `claimSchema.protocol` / `proof` as `"TO-BE-SET-AFTER-ANCHORING"` — the `resources` phase
|
|
56
|
+
overwrites both with the real values once the form is uploaded. Then:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
bunx decision-oracle rubric validate --rubric rubric.json --form form.json
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Exit 0 is required before step 2 (a placeholder-proof warning is fine pre-anchoring); exit 2 is
|
|
63
|
+
the engine reporting bind issues. Never anchor around a validation failure. `publish-protocol`
|
|
64
|
+
runs the same validation itself before it writes anything — a second gate, for free.
|
|
65
|
+
|
|
66
|
+
2. **Log in once, then publish.**
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
bunx decision-oracle login --network devnet # only if there is no session for this network yet
|
|
70
|
+
bunx decision-oracle publish-protocol --rubric rubric.json --form form.json \
|
|
71
|
+
[--network devnet] [--phase entity|resources|room|all] [--entity <protocol did>] \
|
|
72
|
+
[--engine-url <url>] [--yes]
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
A dry run (no `--yes`) prints the plan for every phase that would run. Get the user's explicit OK,
|
|
76
|
+
then re-run identically with `--yes` appended. `reference/publishing.md` has what each phase signs
|
|
77
|
+
and uploads, and its failure modes.
|
|
78
|
+
|
|
79
|
+
3. **Hand off.** From the final published block, report: the protocol DID, the `#vct` proof, the
|
|
80
|
+
`#rub` proof (= the rubric's id, its sha256), the room id, and the next command:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
bunx decision-oracle create-deed --protocol <protocol did> --title "<deed name>"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The `create-collection` skill takes it from there, on the same session. A protocol is only the
|
|
87
|
+
SCHEMA: claims are hosted by a DEED (a domain entity whose `linkedClaim` names the protocol), and
|
|
88
|
+
the collection is created on the deed — never on the protocol, or the portal answers "No claim
|
|
89
|
+
protocols are linked to this entity". `create-collection`'s `reference/claims-stack.md` has the
|
|
90
|
+
model.
|
|
91
|
+
|
|
92
|
+
## Adopting a protocol that already has its form — `--phase rub`
|
|
93
|
+
|
|
94
|
+
Use this when the protocol EXISTS and carries a `#vct` already: IXO's own oracle-service-claim
|
|
95
|
+
protocols, a protocol published by a partner, or simply a second version of your own rules. Do NOT
|
|
96
|
+
reach for `--phase resources` — it re-anchors `#vct` too, and the chain refuses a linked-resource id
|
|
97
|
+
that already exists (`duplicated resource id`), so the whole transaction fails.
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
bunx decision-oracle rubric fetch-form --protocol <protocol did> --out form.json # the live #vct
|
|
101
|
+
# author rubric.json against form.json with the create-rubric skill, then:
|
|
102
|
+
bunx decision-oracle rubric validate --rubric rubric.json --form form.json
|
|
103
|
+
bunx decision-oracle publish-protocol --phase rub --protocol <protocol did> \
|
|
104
|
+
--rubric rubric.json --form form.json [--network devnet] [--yes]
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
What it does, and nothing else: uploads the rubric to the IXO Vault (else the IPFS gateway), then signs ONE transaction —
|
|
108
|
+
`MsgDeleteLinkedResource` + `MsgAddLinkedResource` when a `#rub` is already anchored, or just the
|
|
109
|
+
add when there is none. `--form` is still required because the rubric is validated against the real
|
|
110
|
+
form before anything is written; the rubric's `claimSchema` is repinned from the CHAIN's live `#vct`
|
|
111
|
+
proof (copied verbatim — on a portal-published protocol it is a CID, not a sha256).
|
|
112
|
+
|
|
113
|
+
Three things to expect:
|
|
114
|
+
|
|
115
|
+
- **It is idempotent.** If the anchored `#rub` proof already equals the id these bytes hash to, it
|
|
116
|
+
prints `already anchored` and does nothing — no upload, no transaction, no fee.
|
|
117
|
+
- **Only the protocol's owner can anchor.** If the session doesn't own it, the rubric is still
|
|
118
|
+
uploaded and the exact messages are printed, composed for the owner to broadcast. Send them those
|
|
119
|
+
lines; they sign them. (Same posture as `oracle init --phase backlink`.)
|
|
120
|
+
- **The room is not this command's business.** A protocol that already has claims already has its
|
|
121
|
+
room; `--phase rub` never touches it.
|
|
122
|
+
|
|
123
|
+
## Interview slots
|
|
124
|
+
|
|
125
|
+
The interview belongs to `create-rubric` (step 1) — form, gates, thresholds, review, duplicates,
|
|
126
|
+
settlement. This skill itself asks exactly two things: **which network** (devnet is the only implicit
|
|
127
|
+
one), and **explicit go-ahead before any broadcast** (show the dry-run plan, then `--yes`).
|
|
128
|
+
|
|
129
|
+
## Common mistakes
|
|
130
|
+
|
|
131
|
+
| Mistake | Fix |
|
|
132
|
+
| --- | --- |
|
|
133
|
+
| Anchoring bytes that were never validated | `rubric validate` first; a rubric that doesn't bind decides `unusable` in production |
|
|
134
|
+
| Re-formatting `rubric.json` after validating | the id is the sha256 of the bytes — anchor exactly what was validated |
|
|
135
|
+
| Filling in `claimSchema.protocol` / `proof` by hand before publishing | leave the placeholders; the `resources` phase patches the real values in |
|
|
136
|
+
| Running `--yes` on the first invocation | dry-run, show the plan, then confirm — every phase signs real transactions |
|
|
137
|
+
| Skipping the `room` phase | the claim bot answers `IXO_ROOM_NOT_FOUND` for every submission, though the entity looks complete |
|
|
138
|
+
| Creating the collection on the protocol | collections live on a DEED (`create-deed` → `create-collection`) |
|
|
139
|
+
| `--phase resources` on a protocol that already has a `#vct` | the chain refuses the duplicate id and the whole tx fails — use `--phase rub` |
|
|
140
|
+
| Using an oracle's Matrix token instead of the session | the room's invites must come from the entity owner's own Matrix user |
|
|
141
|
+
|
|
142
|
+
## Output contract
|
|
143
|
+
|
|
144
|
+
The protocol DID, both proofs (`#vct` and `#rub` — the latter is the rubric's id), the room id, what
|
|
145
|
+
each phase actually signed, and the exact `create-deed` command to run next. Plus anything still
|
|
146
|
+
owed: a phase that failed, an un-invited bot, or a rubric change that would need re-anchoring.
|
|
147
|
+
|
|
148
|
+
## Reference
|
|
149
|
+
|
|
150
|
+
`reference/publishing.md` — phase-by-phase detail (what each signs and uploads), resuming a partial
|
|
151
|
+
run, the Matrix identity rule, and the network endpoints.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Publishing a protocol — phase reference
|
|
2
|
+
|
|
3
|
+
## Login (once per network)
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
bunx decision-oracle login --network devnet|testnet|mainnet
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
PKCE (S256) + `state` against the ixo AuthHub for that network. It prints the login URL (and tries
|
|
10
|
+
to open it), then waits for EITHER a loopback callback on `http://localhost:8976/callback` OR a full
|
|
11
|
+
callback URL pasted into the terminal — whichever arrives first. The session is saved under the
|
|
12
|
+
user's home directory with mode 0600 and a warning printed: it is a bearer session signing key
|
|
13
|
+
(derived — the AuthHub root key never leaves the hub), so treat it like a password. Every other
|
|
14
|
+
command loads it automatically; there is no mnemonic anywhere in this flow.
|
|
15
|
+
|
|
16
|
+
## Phases
|
|
17
|
+
|
|
18
|
+
### `entity`
|
|
19
|
+
|
|
20
|
+
Signs `MsgCreateEntity` (`entityType: protocol/verifiableClaim`), then extracts the new
|
|
21
|
+
`did:ixo:entity:…` from the tx's events. If extraction fails the command exits non-zero even though
|
|
22
|
+
the tx landed — the entity exists on chain but its DID has to be found by hand (a Blocksync `entity`
|
|
23
|
+
query filtered by owner) before resuming. Skip this phase with `--entity <existing did>` to build
|
|
24
|
+
resources/room onto an entity created some other way, or by a previous run.
|
|
25
|
+
|
|
26
|
+
### `resources`
|
|
27
|
+
|
|
28
|
+
Uploads `form.json` and a **patched** copy of `rubric.json` (its `claimSchema.protocol` / `proof` set
|
|
29
|
+
to the new entity DID and the form's own proof) to the IXO Vault as two separate uploads — gated by
|
|
30
|
+
one confirm, not a chain write so there is no fee line — then signs ONE tx with three messages:
|
|
31
|
+
`MsgAddLinkedResource #vct`, `MsgAddLinkedResource #rub`, `MsgAddService #matrix`. Requires
|
|
32
|
+
`--entity` when run standalone. The uploads are signed with the session's own Ed25519 key (a
|
|
33
|
+
one-write UCAN) and anchored by their public `<vfs>/public/cid/<cid>` URL; if the Vault refuses, the
|
|
34
|
+
CLI prints a `⚠` and stores them on the IXO IPFS gateway instead — nothing to configure.
|
|
35
|
+
|
|
36
|
+
### `rub`
|
|
37
|
+
|
|
38
|
+
The adopt-an-existing-protocol phase, and the one phase `--phase all` never runs. Target it with
|
|
39
|
+
`--protocol <did>` (`--entity` works too — same flag, the other spelling):
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
bunx decision-oracle publish-protocol --phase rub --protocol <did> \
|
|
43
|
+
--rubric rubric.json --form form.json [--network devnet] [--yes]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
1. Resolves the protocol on Blocksync and reads its `#vct` proof. No `#vct` ⇒ refused: that is a
|
|
47
|
+
`resources` publish, not an adoption.
|
|
48
|
+
2. Checks the rubric's `claimSchema` against that protocol DID and that proof **verbatim** — for a
|
|
49
|
+
protocol published through the portal the proof is the template lane's CID, not a sha256 of
|
|
50
|
+
`form.json`, and the engine string-compares it. A file that ALREADY pins both is anchored byte
|
|
51
|
+
for byte as written, so its id is the `sha256(raw file bytes)` that `rubric validate` printed.
|
|
52
|
+
Otherwise it is repinned and re-serialized (`JSON.stringify(doc, null, 2)`), and the id is the
|
|
53
|
+
sha256 of THOSE bytes. Either way that sha256 is the rubric's id and the `#rub` proof.
|
|
54
|
+
3. Already anchored under that exact id ⇒ prints `already anchored` and stops. Nothing uploaded,
|
|
55
|
+
nothing signed.
|
|
56
|
+
4. Uploads the patched rubric to the IXO Vault, else the IXO IPFS gateway (own confirm gate, no
|
|
57
|
+
fee line).
|
|
58
|
+
5. Signs ONE tx: `MsgDeleteLinkedResource` + `MsgAddLinkedResource` when a `#rub` exists, else the
|
|
59
|
+
add alone. It has to be one tx — `MsgAddLinkedResource` is refused for an id that already exists
|
|
60
|
+
(`duplicated resource id`), and splitting it across two would leave the protocol with no rubric
|
|
61
|
+
in between. The delete names the resource id EXACTLY as the chain stores it: the unexpanded
|
|
62
|
+
`{id}#rub` literal Blocksync reports, never a rebuilt `did:…#rub`.
|
|
63
|
+
|
|
64
|
+
**Ownership.** The chain checks the signer against the DID's authentication relationship, so only
|
|
65
|
+
the protocol's owner can anchor. When the session is not the owner the messages are composed for the
|
|
66
|
+
owner, printed, and not broadcast — the upload has already happened, so all they have to do is sign
|
|
67
|
+
the printed lines. Same behaviour as `oracle init --phase backlink`.
|
|
68
|
+
|
|
69
|
+
`--form` stays required: it is what the engine's binder validates the rubric against before anything
|
|
70
|
+
is written. Get it with `rubric fetch-form --protocol <did> --out form.json`, which downloads the
|
|
71
|
+
live `#vct` bytes.
|
|
72
|
+
|
|
73
|
+
### `room`
|
|
74
|
+
|
|
75
|
+
Sources the entity's Matrix room and invites the claim bot. Without it the claim bot answers every
|
|
76
|
+
submission with `IXO_ROOM_NOT_FOUND`, even though the entity and its resources are fully anchored.
|
|
77
|
+
Joins and invites as the session's Matrix user and mints its UCAN from the session's own signing
|
|
78
|
+
mnemonic — no Matrix-vault PIN, no separate room id or value pin.
|
|
79
|
+
|
|
80
|
+
## Resuming a partial run
|
|
81
|
+
|
|
82
|
+
Every phase after `entity` needs an entity DID. If a run stopped after `entity` (or you are building
|
|
83
|
+
onto an entity made another way), pass `--entity <did>` and `--phase resources` (or `room`, or `all`
|
|
84
|
+
— the `entity` phase is a no-op when `--entity` is given). There is no state file; the whole resume
|
|
85
|
+
mechanism is that pair.
|
|
86
|
+
|
|
87
|
+
`rub` is not part of that sequence and never runs under `all` — it is the adoption path, not a step
|
|
88
|
+
of a publish.
|
|
89
|
+
|
|
90
|
+
## Validation is not optional, and not re-implemented here
|
|
91
|
+
|
|
92
|
+
`publish-protocol` re-validates on every invocation before touching the chain, independent of
|
|
93
|
+
`--phase`, by asking the ENGINE to parse and bind the rubric against the form (the same call
|
|
94
|
+
`bunx decision-oracle rubric validate` makes; `--engine-url` overrides which engine). A rubric that fails
|
|
95
|
+
to bind is refused with the specific issues printed, never anchored. This package has no rubric
|
|
96
|
+
schema or binder of its own — the engine owns the format, and this is that same gate run a second
|
|
97
|
+
time.
|
|
98
|
+
|
|
99
|
+
## Matrix identity — the session, and only the session
|
|
100
|
+
|
|
101
|
+
`room` needs a Matrix access token (the uploads do not — they go to the Vault). AuthHub hands back a Matrix mnemonic (alongside
|
|
102
|
+
the Matrix user id and homeserver), never a token; the CLI turns it into one exactly the way the
|
|
103
|
+
portal does on sign-in. One login per run, minted only after a phase has passed its confirm gate — a
|
|
104
|
+
dry run logs nobody in.
|
|
105
|
+
|
|
106
|
+
**It has to be this user.** The rooms bot invites the UCAN issuer — the session DID's Matrix user —
|
|
107
|
+
into the sourced room, and the claim-bot invite then sets power levels, so both must run as the
|
|
108
|
+
entity OWNER's account. An oracle's own bot token is a different user: the join fails
|
|
109
|
+
`M_FORBIDDEN You are not invited to this room` and leaves the room sourced but the claim bot
|
|
110
|
+
uninvited.
|
|
111
|
+
|
|
112
|
+
## Network endpoints
|
|
113
|
+
|
|
114
|
+
`--network` (devnet by default) is the ONLY source of RPC / Blocksync / Matrix / AuthHub endpoints.
|
|
115
|
+
The session's homeserver is asserted equal to the network's, so a session logged in against another
|
|
116
|
+
network fails with a clear message rather than writing to the wrong chain.
|