@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,111 @@
|
|
|
1
|
+
# Creating a collection — reference
|
|
2
|
+
|
|
3
|
+
`reference/claims-stack.md` is the model (protocol → deed → collection); this file is the
|
|
4
|
+
message-level detail of `bunx decision-oracle create-deed` and `bunx decision-oracle create-collection`.
|
|
5
|
+
|
|
6
|
+
## `create-deed` phases
|
|
7
|
+
|
|
8
|
+
### `entity`
|
|
9
|
+
|
|
10
|
+
`MsgCreateEntity` of `--type` (default `deed`), owner/controller = the AuthHub session's DID, relayer
|
|
11
|
+
node from the network map — the same builder `publish-protocol` uses for a protocol. The new DID is
|
|
12
|
+
read from the tx events; if that fails, the tx still landed and the DID must be found by hand (a
|
|
13
|
+
Blocksync `entities` query filtered by owner) before resuming with `--entity`.
|
|
14
|
+
|
|
15
|
+
### `room`
|
|
16
|
+
|
|
17
|
+
The rooms bot sources the room, the session's Matrix user joins, the claim bot is invited, then the
|
|
18
|
+
state bot is invited through the state-bot client (which also sets its power level). Both invites run
|
|
19
|
+
as the session's Matrix user. Idempotent: re-running on an existing room just re-invites.
|
|
20
|
+
|
|
21
|
+
### `claims`
|
|
22
|
+
|
|
23
|
+
Builds the claims-config doc, computes its CID (CIDv1, raw codec, sha256), and — with the session's
|
|
24
|
+
UCAN only, no Matrix token — writes it into room state at key `claims`, path `<cid>`, then sets the
|
|
25
|
+
public ACL. Then ONE tx: `MsgAddLinkedClaim` (`{id}#claims`, `matrix:<cid>`, proof `<cid>`) +
|
|
26
|
+
`MsgAddService` (`{id}#matrix`). Re-running rewrites the doc under a new cid (its `createdAt`
|
|
27
|
+
changes) and adds a second `linkedClaim` — harmless to the picker (it dedupes by protocol) but avoid
|
|
28
|
+
it; resume from `claims` only when that phase actually failed.
|
|
29
|
+
|
|
30
|
+
## `create-collection` phases
|
|
31
|
+
|
|
32
|
+
### `collection`
|
|
33
|
+
|
|
34
|
+
First the portal's gate: `--entity` must not be a protocol, must have a `linkedClaim`, and its
|
|
35
|
+
`matrix:` docs must name `--protocol`. Then `MsgCreateCollection`: `entity` = the deed, `protocol` =
|
|
36
|
+
the protocol, `startDate` = now − 1 day, `endDate` = now + `--days`, `quota`, and four payment legs
|
|
37
|
+
(submission / approval / rejection / evaluation), each `Payment{ account: <deed admin>, amount,
|
|
38
|
+
isOraclePayment: false }` — only `evaluation` carries a nonzero amount (`--eval-amount` /
|
|
39
|
+
`--eval-denom`); the other three legs are empty. `isOraclePayment` is never turned on by this command
|
|
40
|
+
on ANY leg: the chain rule is that it is only ever legal on the approval leg, so setting it on
|
|
41
|
+
evaluation would be a protocol violation. After signing, it polls Blocksync for a few seconds waiting
|
|
42
|
+
for the new collection to index before moving on to fund/grants.
|
|
43
|
+
|
|
44
|
+
### `fund`
|
|
45
|
+
|
|
46
|
+
A plain `MsgSend` from the signer to the DEED's admin account. Skipped — not defaulted to zero — when
|
|
47
|
+
`--fund` is omitted; it says so rather than silently sending nothing.
|
|
48
|
+
|
|
49
|
+
### `grants`
|
|
50
|
+
|
|
51
|
+
One `MsgGrantEntityAccountAuthz` per address in `--evaluate` / `--submit`, `id` = the deed, granter =
|
|
52
|
+
the deed's `admin` account (looked up from Blocksync's `entity.accounts`, NOT the signer's address),
|
|
53
|
+
365-day expiration. Grant body: `EvaluateClaimAuthorization{ admin, constraints: [{ collectionId,
|
|
54
|
+
claimIds: [], agentQuota, beforeDate: <expiry>, maxCustomAmount: [<--max-custom-amount>] }] }`
|
|
55
|
+
(mirrored for `SubmitClaimAuthorization`, which has no amount). `MaxCustomAmount` is written
|
|
56
|
+
explicitly — `0<--eval-denom>` unless the owner passes `--max-custom-amount <amount><denom>`. The
|
|
57
|
+
chain checks EVERY non-empty evaluation amount against it (x/claims `IsCoinsInMaxConstraints`; the
|
|
58
|
+
denom must be listed), and the act lane sends an ordinary claim's own coins by default, so claims
|
|
59
|
+
that carry coins need a cap ≥ the largest claim amount in each denom — at `0` their approvals fail
|
|
60
|
+
at MsgExec. It is also the owner's cap on any amount an evaluator sets (company authority D7); the
|
|
61
|
+
oracle side's own switch is the owner's `operatorAmounts` (`PATCH /v1/collections/:id/settings`),
|
|
62
|
+
honoured only while the owner who set it still owns the collection. All grant messages for one run
|
|
63
|
+
broadcast as ONE tx. No addresses given ⇒
|
|
64
|
+
it says nothing was granted and returns cleanly, no tx signed.
|
|
65
|
+
|
|
66
|
+
## Resuming
|
|
67
|
+
|
|
68
|
+
There is no `--collection` flag — every phase resolves the collection FROM the (`--entity`,
|
|
69
|
+
`--protocol`) pair via Blocksync (one protocol backs many deeds, so `protocol` alone is not an
|
|
70
|
+
identity). Re-running `--phase all` on a deed that already holds a collection for the protocol logs
|
|
71
|
+
that it exists and proceeds to fund/grants. There is no risk of creating a second collection for the
|
|
72
|
+
same pair by re-running.
|
|
73
|
+
|
|
74
|
+
## The admin-funding gotcha, in full
|
|
75
|
+
|
|
76
|
+
The collection's `admin` account (an entity-module sub-account of the DEED, NOT the wallet that signs
|
|
77
|
+
these commands) is what `MsgEvaluateClaim` actually debits for every evaluation payment. It starts at
|
|
78
|
+
zero balance. And it pays on EVERY evaluation, not only approvals — a reject debits the same amount.
|
|
79
|
+
On the same message it also pays the approval payment of an ordinary approve (the claim's own coins,
|
|
80
|
+
else the collection's approval default; an intent claim's comes from escrow) or the rejection
|
|
81
|
+
payment of a reject, and chain v8 fails the whole message unless the account covers every leg.
|
|
82
|
+
If nothing funds it — no `--fund`, no other transfer — the FIRST `MsgEvaluateClaim` an oracle submits
|
|
83
|
+
against this collection fails with `payment withdrawal failed`, not a clean 403: the collection,
|
|
84
|
+
grants and delegation all look correct, decisions get made, but the payout write on chain fails.
|
|
85
|
+
|
|
86
|
+
The oracle treats that failure as what it is — deterministic, not a blip. It parks the decision
|
|
87
|
+
`chainStatus: blocked` (no retries) and pauses the collection `pausedReason: admin-unfunded`; the
|
|
88
|
+
owner is told once, through the same channel as every other pause (a Matrix notice in the
|
|
89
|
+
collection's review room plus an email to `contactEmail`), and the notice names the admin account,
|
|
90
|
+
the full amount the failed claim needs (evaluation + its verdict's payment, per denom) and its
|
|
91
|
+
balance. Scanning stops, so the engine stops billing the owner's credits for decisions that could
|
|
92
|
+
not be paid out. Once the account is topped up, the oracle's funding cron sees the balance cover the
|
|
93
|
+
largest single parked delivery, resumes the collection, sends the paired "resumed" notice and
|
|
94
|
+
re-delivers the parked decisions — within a minute, nothing to re-run.
|
|
95
|
+
|
|
96
|
+
Fund by EVALUATIONS plus the approval payouts the admin pays: enough to cover the volume you
|
|
97
|
+
expect before the next top-up. Nothing here
|
|
98
|
+
schedules recurring funding, and the admin's balance is not one of the columns `create-collection`
|
|
99
|
+
reports at the end — check it separately (Blocksync, or a bank-balance query) before the oracle does
|
|
100
|
+
it for you.
|
|
101
|
+
|
|
102
|
+
## The delegation's identity
|
|
103
|
+
|
|
104
|
+
`bunx decision-oracle delegation` reads no env file at all: the owner is whoever is logged in
|
|
105
|
+
(`bunx decision-oracle login`), the same AuthHub session `create-collection` used — the deed owner is
|
|
106
|
+
also the collection's funder in most flows. It signs with the session's own signing mnemonic (no
|
|
107
|
+
Matrix-vault PIN). The default (`--for bot`) resource is always the Matrix claims bot, and `--days`
|
|
108
|
+
(default 30) sets that delegation's expiry, independent of the grants' 365-day expiration — renew it
|
|
109
|
+
on its own schedule. `--for engine` is a different delegation entirely: the oracle OWNER's billing
|
|
110
|
+
delegation to the decision engine (`create-oracle` step 6), 100 years by default — nothing renews
|
|
111
|
+
that one.
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-oracle
|
|
3
|
+
description: Use when someone wants to run an evaluation oracle for an IXO protocol or collection — "build an oracle for protocol X", "what would my oracle need to produce", onboarding a provider onto a protocol, or setting up / deploying a project built on @ixo/decision-oracle (init, identity, register, oracle init, get hired).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Building an oracle for a protocol
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
`@ixo/decision-oracle` is the whole oracle except the facts: it pulls each new claim from the collections
|
|
11
|
+
this oracle was hired for, produces the facts the rubric asks for, sends them to the IXO **decision
|
|
12
|
+
engine**, and signs the verdict on chain. A provider writes `src/facts/*.ts` — one function per named
|
|
13
|
+
fact — plus a few config values. This skill is the runbook from an empty directory to a hired oracle.
|
|
14
|
+
|
|
15
|
+
**Core principle: the manifest is the work order — never the rubric doc.** The engine publishes what
|
|
16
|
+
a protocol's rubric declares (`bunx decision-oracle protocol review <did>`); this oracle produces exactly
|
|
17
|
+
those names and nothing else. It never parses a rubric, never binds a form, never decides. If the
|
|
18
|
+
manifest is `unusable`, there is nothing to build against yet — stop and say so.
|
|
19
|
+
|
|
20
|
+
## When to use
|
|
21
|
+
|
|
22
|
+
- "Build / set up / configure an oracle for protocol X", "what would my oracle need to produce"
|
|
23
|
+
- Onboarding a provider onto a protocol whose rubric is already anchored (`#rub`)
|
|
24
|
+
- Deploying, declaring on chain, or getting an existing oracle hired
|
|
25
|
+
|
|
26
|
+
Not for: authoring the rubric (`create-rubric` — its anchored `#rub` is this skill's input), or the
|
|
27
|
+
handlers themselves (`write-facts`, handed off to at step 3).
|
|
28
|
+
|
|
29
|
+
## The pipeline — every step, in order
|
|
30
|
+
|
|
31
|
+
### 0. The project
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
bunx @ixo/decision-oracle init <dir> [--name <project-name>]
|
|
35
|
+
cd <dir> && bun install
|
|
36
|
+
bun run cf-typegen # after ANY wrangler.jsonc binding/var change, too
|
|
37
|
+
wrangler d1 create <project-name> # paste the id into wrangler.jsonc
|
|
38
|
+
wrangler kv namespace create CACHE_KV # paste the id into wrangler.jsonc
|
|
39
|
+
bun run db:migrate # the package's own migrations, applied to the local D1
|
|
40
|
+
cp .dev.vars.example .dev.vars # git-ignored; secrets only
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Three files are the provider's: `src/index.ts` (what the oracle IS), `src/facts/index.ts` (how it
|
|
44
|
+
answers), `wrangler.jsonc` (where it runs).
|
|
45
|
+
|
|
46
|
+
### 1. Identity — two keys
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
bunx decision-oracle derive --new # run TWICE
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
- Run one: take the mnemonic line and paste it into `.dev.vars` **relabelled** as
|
|
53
|
+
`SERVICE_ED25519_MNEMONIC=` — `derive` always prints it as `ORACLE_SECP_MNEMONIC=`, so a verbatim
|
|
54
|
+
paste silently sets the wrong key. This is the did:web key that signs every UCAN invocation this
|
|
55
|
+
oracle mints and backs `/.well-known/did.json`; ignore the `ORACLE_*` lines this run prints.
|
|
56
|
+
- Run two: the mnemonic is `ORACLE_SECP_MNEMONIC` (the chain wallet that signs `MsgEvaluateClaim`);
|
|
57
|
+
the same run prints `ORACLE_ADDRESS`, `ORACLE_DID` and `ORACLE_MATRIX_USER_ID` — those three are
|
|
58
|
+
**public vars**, so they go in `wrangler.jsonc` `vars`, not `.dev.vars`.
|
|
59
|
+
|
|
60
|
+
Also set `ORACLE_HOSTNAME` (the host the did:web is served from — `localhost:8787` locally, and it
|
|
61
|
+
must equal the Custom Domain in `routes` for any env you deploy), `IXO_NETWORK`, and
|
|
62
|
+
`UNIQUE_HMAC_KEY` in `.dev.vars` (any long random string; rotating it orphans every registered
|
|
63
|
+
duplicate digest). `derive "<existing mnemonic>"` uses a wallet the provider already holds instead of
|
|
64
|
+
minting one. `ORACLE_ADDRESS` is asserted against the mnemonic before the first proof or signature:
|
|
65
|
+
a hand-typed one that differs fails loud, never signs as someone else.
|
|
66
|
+
|
|
67
|
+
Both keys are only strings in files at this point: funding the wallet, the on-chain IID document and
|
|
68
|
+
Ed25519 verification method, and the Matrix account behind `ORACLE_MATRIX_ACCESS_TOKEN` are all
|
|
69
|
+
step 8's job. Never ask the provider to obtain that token — `oracle init` writes it.
|
|
70
|
+
|
|
71
|
+
### 2. The work order
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
bunx decision-oracle protocol review <protocol did> [--network devnet|testnet|mainnet] [--json]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Present it in plain words: the claim-form **fields** the product submits, the `ctx`/`derived` values
|
|
78
|
+
the rules read, then the work order itself — each `ext` source (name, endpoint, `send`,
|
|
79
|
+
`boolean`/`score`, `onError`), each `ai` check (name, instructions, `send`, `onError`), and the
|
|
80
|
+
`unique`/`frequency` rules (stock lanes cover those — no code). It also says which names need a
|
|
81
|
+
handler. Per `ext` source it prints what the oracle will sign and to whom (`calls POST <endpoint> —
|
|
82
|
+
UCAN from this oracle's did:web to <audience>, capability ixo:external-source`): relay any
|
|
83
|
+
`WARNING` (the rubric declares a `capability` — ignored, the oracle's developer owns what its key
|
|
84
|
+
signs; a handler that needs one sets it in code via `tools.http.json(url, { ucan: { capability } })`)
|
|
85
|
+
and any `ERROR: this source will not be called` (the audience is not the endpoint's own did:web —
|
|
86
|
+
the name shows as `refused: fix the rubric`, the command exits 1, and only the protocol owner can fix
|
|
87
|
+
it; no handler stands in). Then fill in `src/index.ts` with the provider's answers (the interview
|
|
88
|
+
table below):
|
|
89
|
+
`supportedProtocols: ["<protocol did>"]`, `pricing.evaluation` (denom + `minAmount` in integer base
|
|
90
|
+
units — the on-chain evaluation payment a collection must carry, or register refuses it; optionally
|
|
91
|
+
`pricing.byProtocol` to charge a different fee per protocol DID — `minAmount: "0"` accepts a
|
|
92
|
+
collection whose evaluation leg is empty, for a protocol whose income isn't the evaluation split),
|
|
93
|
+
and `policies`: `allowAiChecks` true iff anything asks for a model (an `ai` check, or a `unique` rule
|
|
94
|
+
with its judge on), `allowImageChecks` true iff a check reads a photo and the provider wants C2PA
|
|
95
|
+
screening, `autoSign` true only when unattended chain writes are deliberate (the `AUTO_SIGN` var
|
|
96
|
+
gates it too — both must be on), and `allowStandingApprovals` — REQUIRED, no default: `true` lets a
|
|
97
|
+
signed-in AI app's own auto-approve limits (the hosted MCP's "Don't ask again") pay for a submit
|
|
98
|
+
without a per-claim approval; `false` means every such submit waits for the user's approval of that
|
|
99
|
+
claim. IXO's own oracles turn it on; anyone else decides it explicitly — ask.
|
|
100
|
+
|
|
101
|
+
### 3. The handlers → the `write-facts` skill
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
bunx decision-oracle facts scaffold <protocol did> [--all] [--dir src/facts]
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
One `src/facts/<name>.ts` per name that needs a handler — each stubbed as
|
|
108
|
+
`fact.error("not implemented: <name>")` — plus a test beside it; nothing existing is overwritten, and
|
|
109
|
+
you list each export in `src/facts/index.ts`. **Hand off to `write-facts` here** — it has the
|
|
110
|
+
input/tools cheat sheet, the stock-vs-custom table and two worked handlers. Come back when
|
|
111
|
+
`bun run check` is green.
|
|
112
|
+
|
|
113
|
+
### 4. Test the handlers
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
bun run test # plain vitest in node: the real runner, fake tools, no Worker and no network
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
A handler with only a happy-path test is not tested — cover the failure it will meet.
|
|
120
|
+
|
|
121
|
+
### 5. Run them against a claim
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
bunx decision-oracle facts run --protocol <protocol did> --claim <answers file> \
|
|
125
|
+
[--collection <id>] [--preview] [--facts src/facts/index.ts] [--json]
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
`--claim` takes either a flat answers object (the same file `submit-claim --answers` posts) or the
|
|
129
|
+
`{ answers, attachments?: [...] }` envelope when a handler needs files. It prints the facts your
|
|
130
|
+
table produced plus any validation issue (exit 1 if there are issues); `--preview` sends them to the
|
|
131
|
+
engine's preview lane and prints the decision they would produce — nothing persisted, nothing billed,
|
|
132
|
+
no grant needed. This is the first end-to-end proof.
|
|
133
|
+
|
|
134
|
+
A flat answers file has no attachments, so any fact that reads one fails closed: in the passport
|
|
135
|
+
example the AI check freezes as an `error` (its guard's path) rather than reaching the stock judge.
|
|
136
|
+
Exercising that lane needs a claim file with an `attachments` entry pointing at a local photo.
|
|
137
|
+
|
|
138
|
+
### 6. The owner's delegation (engine billing)
|
|
139
|
+
|
|
140
|
+
The engine bills the oracle OWNER's credits, so the owner — whoever holds the IXO subscription —
|
|
141
|
+
mints a delegation to the engine before register will work. **Do this step, don't just quote it.**
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
bunx decision-oracle login --network <devnet|testnet|mainnet> # once per network; a browser login
|
|
145
|
+
bunx decision-oracle delegation --for engine \
|
|
146
|
+
--audience did:web:<engine host> --oracle did:web:<ORACLE_HOSTNAME> \
|
|
147
|
+
--out owner-delegation.car [--days 36500] [--network <n>] --yes
|
|
148
|
+
printf 'OWNER_DELEGATION_CAR="%s"\n' "$(cat owner-delegation.car)" >> .dev.vars
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
- The engine host is the one this oracle is configured against: the per-network default
|
|
152
|
+
(`decision-engine.<network>.ixo.earth`) unless `EVAL_ENGINE_HOSTNAME` overrides it. A `:` in a host
|
|
153
|
+
is `%3A` inside a did:web.
|
|
154
|
+
- **Never print the CAR** — it is a bearer credential. Deployed:
|
|
155
|
+
`wrangler secret put OWNER_DELEGATION_CAR < owner-delegation.car`. **Restart `wrangler dev` after
|
|
156
|
+
editing `.dev.vars`** — a running one reloads source, not secrets. The CAR's lifetime is 100 years
|
|
157
|
+
by default, because nothing renews it; if you shorten it with `--days`, re-mint AND re-register
|
|
158
|
+
before it lapses.
|
|
159
|
+
- Only the human can do the login. Run it in the background so the loopback callback lands, and tell
|
|
160
|
+
them to finish in the browser.
|
|
161
|
+
- **A 402 at register is the owner's credits, not a bug**: `NO_SUBSCRIPTION` (none at all) or
|
|
162
|
+
`INSUFFICIENT_CREDITS` (below one decision's price, carrying `manageSubscriptionUrl`). Send the
|
|
163
|
+
owner to that portal URL to buy credits, then register again — nothing here can fake it.
|
|
164
|
+
|
|
165
|
+
### 7. Run it locally — and leave it running
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
bun run dev # local D1 under .wrangler/state, cron fireable:
|
|
169
|
+
curl "http://localhost:8787/__scheduled?cron=*+*+*+*+*"
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
`GET /v1/info` is the public listing, `GET /.well-known/did.json` the identity. Step 8 reads that
|
|
173
|
+
`/v1/info` for the oracle's on-chain profile, so keep this server up while you run it.
|
|
174
|
+
|
|
175
|
+
### 8. Provision the oracle on chain
|
|
176
|
+
|
|
177
|
+
Everything `derive` produced is, so far, only strings in the provider's files. On chain the wallet is
|
|
178
|
+
**unfunded** (it cannot pay for a `MsgEvaluateClaim`), `did:ixo:<ORACLE_ADDRESS>` has **no IID
|
|
179
|
+
document and no Ed25519 verification method** (so the claim bot and the UCAN Store refuse every
|
|
180
|
+
invocation minted as it), there is **no Matrix account** (so `ORACLE_MATRIX_ACCESS_TOKEN` has no
|
|
181
|
+
producer and the review-card lane no-ops), and **no oracle entity**, so nobody browsing the protocol
|
|
182
|
+
finds this oracle. One command does all of it:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
bunx decision-oracle oracle init --protocol <protocol did> --kit-url http://localhost:8787 \
|
|
186
|
+
[--logo <url>] [--only <step>] [--relogin] [--network <n>] [--yes]
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**A full on-chain identity is mandatory** (owner, 2026-10-01): every oracle built with this kit gets
|
|
190
|
+
its entity, its `#pro` profile, its `#dmn` domain card and its `#acard` Agent Card — this command
|
|
191
|
+
does all four. `--logo <url>` is optional, but ASK the provider for one: without it the portal and
|
|
192
|
+
the console show a placeholder, and every run prints `⚠ recommended: --logo`.
|
|
193
|
+
|
|
194
|
+
Thirteen steps, always in this order. Each reads live state and prints one aligned line — `do` or
|
|
195
|
+
`skip` plus the reason. A dry run over a half-provisioned oracle looks like this:
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
entity : <entity did> (#orz grants <ORACLE_ADDRESS>)
|
|
199
|
+
|
|
200
|
+
fund skip <ORACLE_ADDRESS> holds 5000000uixo (≥ 1000000uixo)
|
|
201
|
+
iid skip did:ixo:<ORACLE_ADDRESS> already has an IID document
|
|
202
|
+
key skip <did>#<key> is already a verification method
|
|
203
|
+
matrix skip .dev.vars holds a live token for <mxid>
|
|
204
|
+
entity skip <entity did> is this oracle's (#orz grants <ORACLE_ADDRESS>)
|
|
205
|
+
orz skip #orz already on <entity did>
|
|
206
|
+
profile do #pro Settings → "<name>" from https://<host>/v1/info
|
|
207
|
+
domain do add #dmn domainCard "<name>" (no --logo: the portal and the console show a placeholder — pass --logo <url>)
|
|
208
|
+
acard do add #acard agentCard "<name>" (services: claim-evaluation)
|
|
209
|
+
linked skip edge → <protocol did> already on <entity did>
|
|
210
|
+
service do re-point #eval: https://old.example.com → https://<host>
|
|
211
|
+
backlink skip edge → <entity did> already on <protocol did>
|
|
212
|
+
index do POST https://domain-indexer.devnet.ixo.earth/index { did: <entity did> } — no #dmn anchored yet
|
|
213
|
+
|
|
214
|
+
DRY RUN — nothing signed, created or written. Re-run with --yes to execute.
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
On a fresh oracle every line is a `do` instead — `entity`, for one, reads
|
|
218
|
+
`MsgCreateEntity (oracle) owned by <session did>, carrying #matrix, #eval and the protocol edge —
|
|
219
|
+
none of this session's oracle entities is bound to this oracle (#orz granting <ORACLE_ADDRESS>, or
|
|
220
|
+
#eval at <kit-url>); if you created one moments ago, wait for the indexer before --yes or a second
|
|
221
|
+
entity is minted`.
|
|
222
|
+
|
|
223
|
+
**The entity is found by THIS oracle, never by its owner** — one AuthHub session may own several
|
|
224
|
+
oracles' entities. `ORACLE_ENTITY_DID`, when set, pins it (checked to be an oracle entity the session
|
|
225
|
+
owns); otherwise it is the session's oracle entity whose `#orz` grants `ORACLE_ADDRESS`, else whose
|
|
226
|
+
`#eval` is `--kit-url`. Two matches stop the run — set `ORACLE_ENTITY_DID` and re-run.
|
|
227
|
+
|
|
228
|
+
| Step | Signer | What it does |
|
|
229
|
+
| --- | --- | --- |
|
|
230
|
+
| `fund` | the AuthHub session | tops `ORACLE_ADDRESS` up to 1 IXO (`1000000uixo`) — the gas for every verdict it signs. A **floor check**, not a once-only step: a later run finds the balance below 1 IXO and sends another full top-up |
|
|
231
|
+
| `iid` | the **oracle's own** wallet | `MsgCreateIidDocument` for `did:ixo:<ORACLE_ADDRESS>` + a `#matrix` service |
|
|
232
|
+
| `key` | the oracle's own wallet | `MsgAddVerification` putting the `SERVICE_ED25519_MNEMONIC` public key on it — what makes the claim-bot and UCAN-Store lanes resolve and verify this oracle |
|
|
233
|
+
| `matrix` | the oracle's own wallet (it signs the rooms bot's challenge) | creates the Matrix account if absent, logs in, **writes `ORACLE_MATRIX_ACCESS_TOKEN` into `.dev.vars`** (never printed) |
|
|
234
|
+
| `entity` | the session | `MsgCreateEntity (oracle)` owned by the session DID, carrying `#matrix`, `#eval` and the protocol edge in one tx; its DID is written into `.dev.vars` as `ORACLE_ENTITY_DID` at once, so a re-run never mints a second |
|
|
235
|
+
| `orz` | the session | `#orz` `oracleAuthZConfig` — the portal's entity → `ORACLE_ADDRESS` bridge |
|
|
236
|
+
| `profile` | the session | `#pro` `Settings`, built from the running oracle's `GET <kit-url>/v1/info` (+ `--logo`); add-only, except a differing `--logo` replaces it as a merge (the portal's avatar) |
|
|
237
|
+
| `domain` | the session | `#dmn` `domainCard` — the portal's `ixo:DomainCard` credential (name, description, `url` = kit URL, logo only with `--logo`); added, or deleted + re-added in ONE tx — merged onto the live card, the provider's own fields kept — when a field the kit owns drifted or the proof is not the CID of its bytes; an unreadable card is left alone with a `⚠` |
|
|
238
|
+
| `acard` | the session | `#acard` `agentCard` — an `ixo:AgentCard` credential (`claim-evaluation` when the kit publishes evaluation pricing, `decision-api` when its Decision API publishes a price for `--protocol` — at the oracle's effective prices), validated against the engine's schema first; same skip/replace rule. To be listed in the Openhands app pass `--openhands`: it adds a `check-openhands` service priced in PAY (`/v1/info`'s `pricing.api`, else `--price-pay <n>`); the oracle must also be `engine register`ed (`add-openhands-support`) |
|
|
239
|
+
| `linked` / `backlink` | the session | the oracle → protocol edge, and the protocol's edge back (the marketplace filter) |
|
|
240
|
+
| `service` | the session | `#eval` → `--kit-url`; a different endpoint is deleted and re-added in ONE tx |
|
|
241
|
+
| `index` | — | tells the domain indexer the entity exists — after `domain`, so it reads the card; on `--yes` only, skipped when the indexer serves the anchored `#dmn` with `status: completed` (a dry run asks it nothing) |
|
|
242
|
+
|
|
243
|
+
**The contract: dry-run, read the plan out loud, then — on the provider's OK — re-run the identical line with `--yes`.**
|
|
244
|
+
Without `--yes` nothing is signed, created or written — the planners only read — so the plan shown is
|
|
245
|
+
exactly the plan that executes. Every step is idempotent against live chain / homeserver / entity
|
|
246
|
+
state, never against a marker the command wrote, so a re-run after a partial failure or a redeploy is
|
|
247
|
+
always safe.
|
|
248
|
+
|
|
249
|
+
**Then pin the entity DID it prints as `ORACLE_ENTITY_DID` in `wrangler.jsonc`** — the top-level
|
|
250
|
+
`vars` AND every `env.<name>.vars` (named envs don't inherit) — and restart / redeploy. Required, not
|
|
251
|
+
optional: a deployed oracle without it fails `/health/ready` (the `identity` check), and its reviews
|
|
252
|
+
can only be answered from the portal's claim page, not from a Matrix card.
|
|
253
|
+
The entity is owned by whoever logged in via AuthHub, while `ORACLE_ADDRESS` / `ORACLE_DID` stay this
|
|
254
|
+
oracle's runtime identity — what signs `MsgEvaluateClaim` and what a commissioner's grant must name.
|
|
255
|
+
Keep `supportedProtocols` in step with what you declared; nothing reconciles that drift for you.
|
|
256
|
+
|
|
257
|
+
`--only <step>` runs exactly one step when a run got stuck; `--relogin` forces a fresh Matrix login
|
|
258
|
+
where a live token would have skipped (it mints a new Matrix device — not a casual flag).
|
|
259
|
+
|
|
260
|
+
### 9. Deploy it
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
bun run db:migrate:remote # BEFORE the first deploy of that environment
|
|
264
|
+
bun run deploy # or deploy:testnet / deploy:production
|
|
265
|
+
wrangler secret put ORACLE_MATRIX_ACCESS_TOKEN # the value step 8 wrote into .dev.vars
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Before deploying: the D1/KV ids for that env are real, the Custom Domain equals that env's
|
|
269
|
+
`ORACLE_HOSTNAME`, and every secret is set with `wrangler secret put`. **Then run step 8 again with
|
|
270
|
+
`--kit-url https://<the deployed host>` and `--yes`**: the `service` step re-points `#eval` at the
|
|
271
|
+
real host and `profile` anchors the `#pro` it had to skip. `fund` may act again too — it is a floor
|
|
272
|
+
check, so a wallet the first run's own `iid`/`key` transactions left below 1 IXO is topped back
|
|
273
|
+
up with another full 1 IXO. The rest say `skip`.
|
|
274
|
+
|
|
275
|
+
**Done only when readiness passes:**
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
curl -s https://<host>/v1/info | jq .entityDid # the ORACLE_ENTITY_DID you pinned — never null
|
|
279
|
+
curl -s https://<host>/health/ready # {"ok":true}
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
A `503` names nothing; `GET /v1/admin/status` (a UCAN from a DID in `ORACLE_ADMIN_DIDS`) shows the
|
|
283
|
+
failed check — `identity` means `ORACLE_ENTITY_DID` is missing from that env's `vars`.
|
|
284
|
+
|
|
285
|
+
**Then register with the engine — do it now, don't wait for the first claim:**
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
bunx decision-oracle engine register --env <env> --env-file .dev.vars
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
The chain lane proves its address lazily, on its first `decide`; until then the engine — and the
|
|
292
|
+
Decision Console, which lists the engine's `GET /v1/oracles` — does not know this oracle exists.
|
|
293
|
+
`billing: ok` is done; a 402 is the owner's credits (step 6).
|
|
294
|
+
|
|
295
|
+
### 10. Get hired
|
|
296
|
+
|
|
297
|
+
Hired from the Openhands app (asks, the Yoma youth world) rather than a portal collection? That is
|
|
298
|
+
the `add-openhands-support` skill — the hire/scan adapter, the bridge's fact names, the picker's
|
|
299
|
+
card fields.
|
|
300
|
+
|
|
301
|
+
A real commissioner grants `ORACLE_ADDRESS` the Evaluate role on their collection and registers it
|
|
302
|
+
(the portal makes that call). To prove the loop yourself, hire yourself with the `create-collection`
|
|
303
|
+
skill — same AuthHub session — then:
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
bunx decision-oracle register --collection <collection id> [--delegation delegation.car] \
|
|
307
|
+
[--contact-email <addr>] [--kit <url>]
|
|
308
|
+
bunx decision-oracle scan --collection <collection id> # discover claims now, not at the next tick
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
`--delegation` is the owner→oracle claim-bot CAR (`delegation --for bot --audience
|
|
312
|
+
did:ixo:<ORACLE_ADDRESS>`): without it the oracle holds the on-chain grant but still cannot pull
|
|
313
|
+
claim bodies from Matrix. A refusal names its gate — not the chain owner, no Evaluate grant for
|
|
314
|
+
`ORACLE_ADDRESS`, or an evaluation payment below the required fee (`pricing.byProtocol` for that
|
|
315
|
+
collection's protocol, else `pricing.evaluation.minAmount`).
|
|
316
|
+
|
|
317
|
+
## Interview slots (ask, don't assume)
|
|
318
|
+
|
|
319
|
+
| Slot | Ask | Lands in |
|
|
320
|
+
| --- | --- | --- |
|
|
321
|
+
| Protocol | the DID, and which network | `--protocol`, `supportedProtocols` |
|
|
322
|
+
| Pricing | denom + minimum per-evaluation payment; any protocol priced differently (incl. free)? | `pricing.evaluation`, optionally `pricing.byProtocol` |
|
|
323
|
+
| AI / image policy | does the work order declare `ai` checks; do any read images | `policies.allowAiChecks` / `allowImageChecks` |
|
|
324
|
+
| Auto-sign | should this oracle sign `MsgEvaluateClaim` unattended | `policies.autoSign` + the `AUTO_SIGN` var |
|
|
325
|
+
| Standing approvals | may a signed-in AI app's own auto-approve limits pay without a per-claim approval (hosted MCP) — IXO's own oracles say yes | `policies.allowStandingApprovals` (required) |
|
|
326
|
+
| Custom lanes | per judgment-call name: do you control the endpoint / is a stock AI check the right judge | the `src/facts/` table (`write-facts`) |
|
|
327
|
+
| Identity | a fresh wallet, or an existing mnemonic to derive from | `derive`, `.dev.vars` + `wrangler.jsonc` vars |
|
|
328
|
+
| Owner | who owns this oracle — the AuthHub login whose subscription pays the engine | `login`, `delegation --for engine` |
|
|
329
|
+
| Funding | nothing to ask — `oracle init` keeps the wallet topped up to 1 IXO for gas | `oracle init` (the `fund` step) |
|
|
330
|
+
| Hosts | the did:web host per env (it IS the identity) | `ORACLE_HOSTNAME`, `routes` |
|
|
331
|
+
| Contact | the address that gets pause / review notices | `register --contact-email` |
|
|
332
|
+
|
|
333
|
+
## Safety rules
|
|
334
|
+
|
|
335
|
+
- **Never invent a fact value.** A stub is a visible `fact.error("not implemented: <name>")`, never a
|
|
336
|
+
fake pass — a wrong value that passes shape validation is worse than a loud failure the rubric
|
|
337
|
+
routes itself. And **the oracle never decides**: no thresholds, no gates, no rubric parsing in `src/`.
|
|
338
|
+
- **No secrets in code or commits.** Identities come from `derive` into `.dev.vars` /
|
|
339
|
+
`wrangler secret put`; the delegation CAR is written to a file and never printed.
|
|
340
|
+
- **Chain writes are real.** `oracle init` and everything under `create-collection` sign real
|
|
341
|
+
transactions and spend gas — and `oracle init`'s `fund` step moves the owner's own IXO into the
|
|
342
|
+
oracle's wallet: dry-run first, show the plan, only then `--yes`. `--network` defaults to devnet —
|
|
343
|
+
testnet and mainnet are always explicit.
|
|
344
|
+
- **`bun run check` (typecheck + lint + test) stays green** after any `src/` edit.
|
|
345
|
+
|
|
346
|
+
## Common mistakes
|
|
347
|
+
|
|
348
|
+
| Mistake | Fix |
|
|
349
|
+
| --- | --- |
|
|
350
|
+
| Reading `rubric.json` to work out what to produce | read the manifest — `protocol review` / `manifest <did>` |
|
|
351
|
+
| A stub that returns a fake `ok` so a run looks green | `fact.error("not implemented: <name>")` |
|
|
352
|
+
| Register answers 402 and the agent retries | it is the owner's credits — send them to the printed portal URL, then re-run |
|
|
353
|
+
| `.dev.vars` edited but the old value still in play | a running `wrangler dev` reloads source, not secrets — restart it |
|
|
354
|
+
| `ORACLE_ADDRESS` typed by hand | must match the mnemonic exactly — asserted at first use |
|
|
355
|
+
| Guessing `pricing.evaluation.minAmount` | ask what the collection's on-chain evaluation payment is (or will be) — too low and register 402s |
|
|
356
|
+
| `allowAiChecks: false` while the work order declares AI checks | every `ai` fact freezes `error` and the rubric's `onError` decides — ask first |
|
|
357
|
+
| `ORACLE_HOSTNAME` ≠ the deployed Custom Domain | callers resolve the did:web by fetching that host — they must be the same string |
|
|
358
|
+
| `ORACLE_ENTITY_DID` left unset after `oracle init` (or set only at the top level) | the deployed oracle fails `/health/ready` (`identity`); the Matrix review card can't resolve it, so reviews only work from the portal page |
|
|
359
|
+
| Running `oracle init --yes` with nothing serving `--kit-url` | `profile`, `domain` and `acard` skip (all three are built from the live `GET /v1/info`) — start `bun run dev`, or deploy, before the run that should anchor them |
|
|
360
|
+
| Skipping `--logo` without asking | the identity is still complete, but the portal and the console show a placeholder — ask the provider for a logo URL and pass `--logo` |
|
|
361
|
+
| Not re-running `oracle init` after the deploy | `#eval` and both cards still name `localhost` and `#pro` may be missing — re-run with the deployed `--kit-url` and `--yes` |
|
|
362
|
+
| Treating `⚠ domain indexer …` as a failure | it is a warning and the exit code is 0 — the entity is on chain either way |
|
|
363
|
+
| Registering with the on-chain grant but no claim-bot delegation | the oracle can't pull bodies — mint `delegation --for bot` and pass `--delegation` |
|
|
364
|
+
|
|
365
|
+
## Worked example
|
|
366
|
+
|
|
367
|
+
`examples/passport-delivery` in this package's repo is a generated project, filled in: `protocol/`
|
|
368
|
+
holds the claim form and rubric, `src/facts/handoverPhotoLooksReal.ts` answers the one AI check that
|
|
369
|
+
rubric declares (a guard for a claim with no photo, otherwise the stock judge), `test/facts/` runs it
|
|
370
|
+
under `runFacts`, and `supportedProtocols` is `[]`. It is the shape steps 2–5 produce.
|
|
371
|
+
|
|
372
|
+
## Appendix — a local engine (engine developers only)
|
|
373
|
+
|
|
374
|
+
A provider never needs this. With the decision engine running on your own machine:
|
|
375
|
+
`EVAL_ENGINE_HOSTNAME=localhost:8787` in this oracle's `.dev.vars`, this oracle on another port (its
|
|
376
|
+
`ORACLE_HOSTNAME` says which), and decisions work over plain localhost. **Register does not**: the
|
|
377
|
+
hosted subscriptions API resolves the ENGINE's did:web when it presents the owner delegation, so that
|
|
378
|
+
leg needs a public tunnel to the engine — its host in both the engine's own hostname var and this
|
|
379
|
+
oracle's `EVAL_ENGINE_HOSTNAME`, and the CAR minted with `--audience did:web:<tunnel host>`. A quick
|
|
380
|
+
tunnel's host changes every run and the host IS the engine's DID: a new tunnel means re-mint,
|
|
381
|
+
restart, re-register. Restart both dev servers after any `.dev.vars` edit.
|
|
382
|
+
|
|
383
|
+
## Reference
|
|
384
|
+
|
|
385
|
+
- `node_modules/@ixo/decision-oracle/docs/guide.md` — "Building an evaluation oracle": the same pipeline
|
|
386
|
+
as prose, with the concepts, the project anatomy, full handler examples per lane, local dev,
|
|
387
|
+
billing, deploy, getting hired, operating, and a symptom → cause → fix table.
|
|
388
|
+
- `node_modules/@ixo/decision-oracle/docs/api.md` — the complete API reference (every export, option,
|
|
389
|
+
default and cap; the routes, cron lanes, pause reasons and billing the package already owns).
|
|
390
|
+
- `../reference/engine-contract.md` — the engine's side: register, the error table, billing,
|
|
391
|
+
receipts, review folds. Background, not an interface.
|
|
392
|
+
|
|
393
|
+
## Output contract
|
|
394
|
+
|
|
395
|
+
The review output from step 2, the stock-vs-custom verdict and the handlers written (or stubbed,
|
|
396
|
+
named), the `src/index.ts` config block, the `.dev.vars` / `wrangler.jsonc` lines to set (never
|
|
397
|
+
committed, never printed), the `facts run --preview` decision, and — plainly — what the provider
|
|
398
|
+
still owes: credits on the owner's subscription, the on-chain Evaluate grant (or the step-10
|
|
399
|
+
self-hire), the deployment that replaces `localhost`, the `oracle init` re-run that re-points
|
|
400
|
+
`#eval` at it, and any name still on a stub.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-rubric
|
|
3
|
+
description: Use when someone needs a rubric (the evaluation rules a decision engine judges claims by) for an IXO protocol or claim collection — "create a rubric", "rules for my claims", "what should get approved / rejected", a new protocol needs its #rub, or an existing rubric fails to validate or bind (schema error, BIND_FIELD, RUBRIC_UNRESOLVED, an unusable manifest).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Creating a rubric
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
A rubric is one JSON-LD file: must-pass **gates**, scored **criteria** with thresholds,
|
|
11
|
+
**human-review** tasks, settlement, and optional external/AI/duplicate/rate rules — bound to exactly
|
|
12
|
+
ONE claim form (the protocol's `#vct`). The decision engine owns the format: its schema is what is
|
|
13
|
+
legal, its binder is the only judge of whether a rubric fits a form, and the rubric's id is the
|
|
14
|
+
sha256 of the file's raw bytes. `bunx decision-oracle rubric validate` is that engine, over HTTP —
|
|
15
|
+
nothing here re-implements it.
|
|
16
|
+
|
|
17
|
+
**Core principle: form first, ask — don't invent, validate with the engine.** A rubric that has not
|
|
18
|
+
been parsed by the engine's schema AND bound against the real form is a guess, and in production a
|
|
19
|
+
guess decides `unusable`.
|
|
20
|
+
|
|
21
|
+
## When to use
|
|
22
|
+
|
|
23
|
+
- "Create a rubric / rules / evaluation criteria for my protocol or collection"
|
|
24
|
+
- A new protocol needs its `#rub`; an owner wants to change what gets approved
|
|
25
|
+
- A rubric fails on the engine or an oracle: schema error, `BIND_FIELD`, `RUBRIC_UNRESOLVED`, an
|
|
26
|
+
unusable manifest
|
|
27
|
+
|
|
28
|
+
Not for: the portal's rubric builder UI, or producing facts for a rubric (`write-facts`).
|
|
29
|
+
|
|
30
|
+
## The pipeline — every step, in order
|
|
31
|
+
|
|
32
|
+
1. **Get the form.** Ask whether the protocol exists on chain.
|
|
33
|
+
- Yes →
|
|
34
|
+
```bash
|
|
35
|
+
bunx decision-oracle rubric fetch-form --protocol <protocol did> --out form.json \
|
|
36
|
+
[--rub rubric.json] [--network devnet|testnet|mainnet]
|
|
37
|
+
```
|
|
38
|
+
writes the live form and prints the `claimSchema` block with the chain's `#vct` proof. `--rub`
|
|
39
|
+
also downloads the protocol's current rubric bytes, to edit rather than start blank — validate
|
|
40
|
+
them unchanged first.
|
|
41
|
+
- No → author the form from `templates/claim-form.example.json` (SurveyJS inside the
|
|
42
|
+
`ixo:entity#surveyTemplate` envelope; question `name`s are what rules reference — keep the
|
|
43
|
+
envelope, replace every question), have it anchored, then fetch it. Until then validate against
|
|
44
|
+
the local file and leave `claimSchema.proof` as `TO-BE-SET-AFTER-ANCHORING`; say so in the
|
|
45
|
+
hand-off.
|
|
46
|
+
|
|
47
|
+
Rules can only reference questions that are on the form. No question, no rule. If the author
|
|
48
|
+
names something the form has no question for, STOP and ask which they want: bind to an existing
|
|
49
|
+
question they confirm, or add the question and re-anchor the form first — never map a rule to a
|
|
50
|
+
similar-looking field on your own.
|
|
51
|
+
|
|
52
|
+
2. **Interview.** Fill every slot in the contract below with the author's answer, or a default they
|
|
53
|
+
explicitly accepted. Use plain language (reject / affects the score / a person checks). Batch
|
|
54
|
+
related questions; skip what the form makes moot.
|
|
55
|
+
|
|
56
|
+
3. **Draft `rubric.json`.** Read `reference/format-cheatsheet.md` first — only shapes it shows.
|
|
57
|
+
`constants` and `@const` refs do not exist: inline literals, or use `derived`.
|
|
58
|
+
|
|
59
|
+
4. **Validate, bind, read the work order.**
|
|
60
|
+
```bash
|
|
61
|
+
bunx decision-oracle rubric validate --rubric rubric.json --form form.json \
|
|
62
|
+
[--proof <the chain #vct proof>] [--json] [--engine-url <url>] [--network <n>]
|
|
63
|
+
```
|
|
64
|
+
Exit 0 (valid and binds) before you stop — exit 2 is the engine calling it unusable and prints
|
|
65
|
+
its issues, exit 1 means the engine refused or is unreachable. The printed manifest is what the
|
|
66
|
+
author's oracle will have to produce: show it to them (ext sources, AI checks, size probes,
|
|
67
|
+
duplicate/rate parameters).
|
|
68
|
+
|
|
69
|
+
5. **Hand off.** The EXACT validated bytes get anchored on the protocol as `#rub` (the
|
|
70
|
+
`publish-protocol` skill) — the id is their sha256, so re-formatting after validating changes it.
|
|
71
|
+
Print the id and the counts.
|
|
72
|
+
|
|
73
|
+
## Interview contract — every slot is REQUIRED
|
|
74
|
+
|
|
75
|
+
| Slot | Ask the author | Serialises to |
|
|
76
|
+
| --- | --- | --- |
|
|
77
|
+
| Form | protocol DID or form file; confirm question names + types | `claimSchema`, every `$ref` |
|
|
78
|
+
| Must-pass | what disqualifies outright; per check: reject, or send to a person? | `gates[]` — `onFail`, `class` |
|
|
79
|
+
| Score | what earns points and how (proportional / bands / yes-no / a person decides); importance 1–5 | `scoring.criteria[]`, `weight` |
|
|
80
|
+
| Thresholds | approve at (0–100); partial floor; review floor — explain the ladder | `approveAt`, `partialFloor`, `reviewFloor` (bps) |
|
|
81
|
+
| Critical | any criterion that alone rejects below a floor | `critical`, `min` |
|
|
82
|
+
| Files | mandatory? allowed types? max MB? what must a PERSON confirm about them | `present` / `mediaTypeIn` / `maxSizeMB` gates; `ManualScore` + `ReviewTask` |
|
|
83
|
+
| Review | who reviews (a Matrix room or one person's DID), SLA hours, on timeout | `review` |
|
|
84
|
+
| Duplicates | what makes two claims "the same" (identity key); flag for review, or reject | `unique` (`by`, `thresholds`) |
|
|
85
|
+
| Rate | max claims per submitter per day/week/month/year, or none | `frequency` (`max`, `per`) |
|
|
86
|
+
| External / AI | another system to ask (endpoint + did:web) or plain-language checks a model should make | `sources[]` / `aiChecks[]` |
|
|
87
|
+
| Settlement | full pay on approve; prorate a partial by what | `settlement` |
|
|
88
|
+
|
|
89
|
+
Named defaults to OFFER (never assume silently): review 48 h → reject · `weighted_average` · file
|
|
90
|
+
size cap 10 MB · allowed file types = the form question's `acceptedTypes` · unique thresholds
|
|
91
|
+
9000/5000 (reject/review) · unique `by` = the whole claim body · no rate limit. Anything without a
|
|
92
|
+
default here is the author's call — ask.
|
|
93
|
+
|
|
94
|
+
## Rules that bite (the engine's, not opinions)
|
|
95
|
+
|
|
96
|
+
- `claimSchema.proof` is the chain's `#vct` proof copied verbatim (a CID, compared as a string) —
|
|
97
|
+
never computed.
|
|
98
|
+
- File content is never machine-judged: presence / type / size only. "Does the photo show X" is
|
|
99
|
+
`ManualScore` + `ReviewTask`, `answer` boolean or enum, `map` covering every answer — or an
|
|
100
|
+
`aiChecks` entry, which an oracle answers.
|
|
101
|
+
- Missing answers: `present` false, `empty` true, every other operator false. Optional-but-valid
|
|
102
|
+
needs `appliesWhen`.
|
|
103
|
+
- Gates run in order; the first failure ends it. Gate `class` ∈ refuted / invalid_evidence /
|
|
104
|
+
out_of_authority (reject) or insufficient_evidence / requires_human_review (review).
|
|
105
|
+
- `approveAt > partialFloor ≥ reviewFloor`; points are bps 0–10000; `weight` (1–5) only counts under
|
|
106
|
+
`weighted_average`.
|
|
107
|
+
- Codes match `^[A-Z0-9]+-[0-9]+-[A-Z0-9-]+$` and are unique. Unknown keys anywhere = schema error.
|
|
108
|
+
- Duplicate/rate rules are declared here but detected by the oracle; proration exists on partial
|
|
109
|
+
approvals only.
|
|
110
|
+
- Everything a rubric declares under `sources` / `aiChecks` becomes work for whatever oracle is
|
|
111
|
+
hired: a name declared here is a fact someone has to produce. Don't declare one nobody can answer.
|
|
112
|
+
|
|
113
|
+
## Output contract
|
|
114
|
+
|
|
115
|
+
`rubric.json` (and `form.json` when authored) in the directory the user names — default the current
|
|
116
|
+
one — and a one-screen summary: the rubric id, gates / criteria / review-task counts, the manifest's
|
|
117
|
+
"your oracle must produce" list, the anchoring instruction (exact bytes), and any decision the user
|
|
118
|
+
still owes (e.g. the proof).
|
|
119
|
+
|
|
120
|
+
## Common mistakes
|
|
121
|
+
|
|
122
|
+
| Mistake | Fix |
|
|
123
|
+
| --- | --- |
|
|
124
|
+
| `claimSchema.protocol` / `proof` left as placeholders | `rubric fetch-form`; if the form isn't anchored yet, say the proof is owed |
|
|
125
|
+
| Thresholds, weights, SLA, duplicate key invented | ask; offer the default by name |
|
|
126
|
+
| `constants` / `@const` copied from old prose | they don't exist — literals or `derived` |
|
|
127
|
+
| Parsed by eye, never validated | `rubric validate` parses AND binds; a bind failure is `unusable` in production |
|
|
128
|
+
| A gate that "checks the photo is real" | `ManualScore` + `ReviewTask`, or an `aiChecks` entry an oracle runs |
|
|
129
|
+
| "Pay proportionally" applied to approvals | proration is `settlement.onPartial.prorateBy`; approve pays in full — say so |
|
|
130
|
+
| Pretty-printing the file after validating | the id changes; validate the bytes you anchor |
|