@ixo/decision-oracle 0.0.0-stage → 0.2.1

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.
Files changed (1118) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +794 -2
  3. package/dist/act.d.ts +87 -0
  4. package/dist/act.d.ts.map +1 -0
  5. package/dist/act.js +20 -0
  6. package/dist/act.js.map +1 -0
  7. package/dist/app.d.ts +22 -0
  8. package/dist/app.d.ts.map +1 -0
  9. package/dist/app.js +128 -0
  10. package/dist/app.js.map +1 -0
  11. package/dist/c2pa.wasm +0 -0
  12. package/dist/cli/commands/api.d.ts +50 -0
  13. package/dist/cli/commands/api.d.ts.map +1 -0
  14. package/dist/cli/commands/api.js +737 -0
  15. package/dist/cli/commands/api.js.map +1 -0
  16. package/dist/cli/commands/create-collection.d.ts +40 -0
  17. package/dist/cli/commands/create-collection.d.ts.map +1 -0
  18. package/dist/cli/commands/create-collection.js +318 -0
  19. package/dist/cli/commands/create-collection.js.map +1 -0
  20. package/dist/cli/commands/create-deed.d.ts +31 -0
  21. package/dist/cli/commands/create-deed.d.ts.map +1 -0
  22. package/dist/cli/commands/create-deed.js +208 -0
  23. package/dist/cli/commands/create-deed.js.map +1 -0
  24. package/dist/cli/commands/delegation.d.ts +26 -0
  25. package/dist/cli/commands/delegation.d.ts.map +1 -0
  26. package/dist/cli/commands/delegation.js +162 -0
  27. package/dist/cli/commands/delegation.js.map +1 -0
  28. package/dist/cli/commands/derive.d.ts +22 -0
  29. package/dist/cli/commands/derive.d.ts.map +1 -0
  30. package/dist/cli/commands/derive.js +53 -0
  31. package/dist/cli/commands/derive.js.map +1 -0
  32. package/dist/cli/commands/engine.d.ts +25 -0
  33. package/dist/cli/commands/engine.d.ts.map +1 -0
  34. package/dist/cli/commands/engine.js +107 -0
  35. package/dist/cli/commands/engine.js.map +1 -0
  36. package/dist/cli/commands/erase.d.ts +17 -0
  37. package/dist/cli/commands/erase.d.ts.map +1 -0
  38. package/dist/cli/commands/erase.js +117 -0
  39. package/dist/cli/commands/erase.js.map +1 -0
  40. package/dist/cli/commands/facts-run.d.ts +30 -0
  41. package/dist/cli/commands/facts-run.d.ts.map +1 -0
  42. package/dist/cli/commands/facts-run.js +409 -0
  43. package/dist/cli/commands/facts-run.js.map +1 -0
  44. package/dist/cli/commands/facts-scaffold.d.ts +22 -0
  45. package/dist/cli/commands/facts-scaffold.d.ts.map +1 -0
  46. package/dist/cli/commands/facts-scaffold.js +208 -0
  47. package/dist/cli/commands/facts-scaffold.js.map +1 -0
  48. package/dist/cli/commands/init.d.ts +18 -0
  49. package/dist/cli/commands/init.d.ts.map +1 -0
  50. package/dist/cli/commands/init.js +34 -0
  51. package/dist/cli/commands/init.js.map +1 -0
  52. package/dist/cli/commands/login.d.ts +9 -0
  53. package/dist/cli/commands/login.d.ts.map +1 -0
  54. package/dist/cli/commands/login.js +16 -0
  55. package/dist/cli/commands/login.js.map +1 -0
  56. package/dist/cli/commands/logout.d.ts +10 -0
  57. package/dist/cli/commands/logout.d.ts.map +1 -0
  58. package/dist/cli/commands/logout.js +28 -0
  59. package/dist/cli/commands/logout.js.map +1 -0
  60. package/dist/cli/commands/manifest.d.ts +12 -0
  61. package/dist/cli/commands/manifest.d.ts.map +1 -0
  62. package/dist/cli/commands/manifest.js +48 -0
  63. package/dist/cli/commands/manifest.js.map +1 -0
  64. package/dist/cli/commands/oracle-init.d.ts +48 -0
  65. package/dist/cli/commands/oracle-init.d.ts.map +1 -0
  66. package/dist/cli/commands/oracle-init.js +1122 -0
  67. package/dist/cli/commands/oracle-init.js.map +1 -0
  68. package/dist/cli/commands/org.d.ts +28 -0
  69. package/dist/cli/commands/org.d.ts.map +1 -0
  70. package/dist/cli/commands/org.js +309 -0
  71. package/dist/cli/commands/org.js.map +1 -0
  72. package/dist/cli/commands/protocol-review.d.ts +20 -0
  73. package/dist/cli/commands/protocol-review.d.ts.map +1 -0
  74. package/dist/cli/commands/protocol-review.js +162 -0
  75. package/dist/cli/commands/protocol-review.js.map +1 -0
  76. package/dist/cli/commands/publish-protocol.d.ts +43 -0
  77. package/dist/cli/commands/publish-protocol.d.ts.map +1 -0
  78. package/dist/cli/commands/publish-protocol.js +345 -0
  79. package/dist/cli/commands/publish-protocol.js.map +1 -0
  80. package/dist/cli/commands/register.d.ts +16 -0
  81. package/dist/cli/commands/register.d.ts.map +1 -0
  82. package/dist/cli/commands/register.js +54 -0
  83. package/dist/cli/commands/register.js.map +1 -0
  84. package/dist/cli/commands/relink.d.ts +11 -0
  85. package/dist/cli/commands/relink.d.ts.map +1 -0
  86. package/dist/cli/commands/relink.js +36 -0
  87. package/dist/cli/commands/relink.js.map +1 -0
  88. package/dist/cli/commands/rubric-fetch-form.d.ts +16 -0
  89. package/dist/cli/commands/rubric-fetch-form.d.ts.map +1 -0
  90. package/dist/cli/commands/rubric-fetch-form.js +83 -0
  91. package/dist/cli/commands/rubric-fetch-form.js.map +1 -0
  92. package/dist/cli/commands/rubric-validate.d.ts +72 -0
  93. package/dist/cli/commands/rubric-validate.d.ts.map +1 -0
  94. package/dist/cli/commands/rubric-validate.js +163 -0
  95. package/dist/cli/commands/rubric-validate.js.map +1 -0
  96. package/dist/cli/commands/scan.d.ts +13 -0
  97. package/dist/cli/commands/scan.d.ts.map +1 -0
  98. package/dist/cli/commands/scan.js +39 -0
  99. package/dist/cli/commands/scan.js.map +1 -0
  100. package/dist/cli/commands/skills.d.ts +11 -0
  101. package/dist/cli/commands/skills.d.ts.map +1 -0
  102. package/dist/cli/commands/skills.js +19 -0
  103. package/dist/cli/commands/skills.js.map +1 -0
  104. package/dist/cli/commands/submit-claim.d.ts +25 -0
  105. package/dist/cli/commands/submit-claim.d.ts.map +1 -0
  106. package/dist/cli/commands/submit-claim.js +155 -0
  107. package/dist/cli/commands/submit-claim.js.map +1 -0
  108. package/dist/cli/index.d.ts +15 -0
  109. package/dist/cli/index.d.ts.map +1 -0
  110. package/dist/cli/index.js +206 -0
  111. package/dist/cli/index.js.map +1 -0
  112. package/dist/cli/lib/agent-card-schema.d.ts +8 -0
  113. package/dist/cli/lib/agent-card-schema.d.ts.map +1 -0
  114. package/dist/cli/lib/agent-card-schema.js +169 -0
  115. package/dist/cli/lib/agent-card-schema.js.map +1 -0
  116. package/dist/cli/lib/ai-rest.d.ts +12 -0
  117. package/dist/cli/lib/ai-rest.d.ts.map +1 -0
  118. package/dist/cli/lib/ai-rest.js +36 -0
  119. package/dist/cli/lib/ai-rest.js.map +1 -0
  120. package/dist/cli/lib/args.d.ts +33 -0
  121. package/dist/cli/lib/args.d.ts.map +1 -0
  122. package/dist/cli/lib/args.js +24 -0
  123. package/dist/cli/lib/args.js.map +1 -0
  124. package/dist/cli/lib/authhub.d.ts +7 -0
  125. package/dist/cli/lib/authhub.d.ts.map +1 -0
  126. package/dist/cli/lib/authhub.js +210 -0
  127. package/dist/cli/lib/authhub.js.map +1 -0
  128. package/dist/cli/lib/chain.d.ts +264 -0
  129. package/dist/cli/lib/chain.d.ts.map +1 -0
  130. package/dist/cli/lib/chain.js +584 -0
  131. package/dist/cli/lib/chain.js.map +1 -0
  132. package/dist/cli/lib/devvars.d.ts +59 -0
  133. package/dist/cli/lib/devvars.d.ts.map +1 -0
  134. package/dist/cli/lib/devvars.js +206 -0
  135. package/dist/cli/lib/devvars.js.map +1 -0
  136. package/dist/cli/lib/engine.d.ts +54 -0
  137. package/dist/cli/lib/engine.d.ts.map +1 -0
  138. package/dist/cli/lib/engine.js +112 -0
  139. package/dist/cli/lib/engine.js.map +1 -0
  140. package/dist/cli/lib/identity-cards.d.ts +188 -0
  141. package/dist/cli/lib/identity-cards.d.ts.map +1 -0
  142. package/dist/cli/lib/identity-cards.js +261 -0
  143. package/dist/cli/lib/identity-cards.js.map +1 -0
  144. package/dist/cli/lib/matrix-account.d.ts +79 -0
  145. package/dist/cli/lib/matrix-account.d.ts.map +1 -0
  146. package/dist/cli/lib/matrix-account.js +228 -0
  147. package/dist/cli/lib/matrix-account.js.map +1 -0
  148. package/dist/cli/lib/oracle-account.d.ts +108 -0
  149. package/dist/cli/lib/oracle-account.d.ts.map +1 -0
  150. package/dist/cli/lib/oracle-account.js +207 -0
  151. package/dist/cli/lib/oracle-account.js.map +1 -0
  152. package/dist/cli/lib/project.d.ts +22 -0
  153. package/dist/cli/lib/project.d.ts.map +1 -0
  154. package/dist/cli/lib/project.js +62 -0
  155. package/dist/cli/lib/project.js.map +1 -0
  156. package/dist/cli/lib/session.d.ts +109 -0
  157. package/dist/cli/lib/session.d.ts.map +1 -0
  158. package/dist/cli/lib/session.js +354 -0
  159. package/dist/cli/lib/session.js.map +1 -0
  160. package/dist/cli/lib/workorder.d.ts +57 -0
  161. package/dist/cli/lib/workorder.d.ts.map +1 -0
  162. package/dist/cli/lib/workorder.js +101 -0
  163. package/dist/cli/lib/workorder.js.map +1 -0
  164. package/dist/config.d.ts +221 -0
  165. package/dist/config.d.ts.map +1 -0
  166. package/dist/config.js +431 -0
  167. package/dist/config.js.map +1 -0
  168. package/dist/context.d.ts +88 -0
  169. package/dist/context.d.ts.map +1 -0
  170. package/dist/context.js +9 -0
  171. package/dist/context.js.map +1 -0
  172. package/dist/contracts/api.d.ts +3367 -0
  173. package/dist/contracts/api.d.ts.map +1 -0
  174. package/dist/contracts/api.js +1303 -0
  175. package/dist/contracts/api.js.map +1 -0
  176. package/dist/contracts/capabilities.d.ts +126 -0
  177. package/dist/contracts/capabilities.d.ts.map +1 -0
  178. package/dist/contracts/capabilities.js +164 -0
  179. package/dist/contracts/capabilities.js.map +1 -0
  180. package/dist/contracts/claim-source.d.ts +98 -0
  181. package/dist/contracts/claim-source.d.ts.map +1 -0
  182. package/dist/contracts/claim-source.js +17 -0
  183. package/dist/contracts/claim-source.js.map +1 -0
  184. package/dist/contracts/errors.d.ts +150 -0
  185. package/dist/contracts/errors.d.ts.map +1 -0
  186. package/dist/contracts/errors.js +121 -0
  187. package/dist/contracts/errors.js.map +1 -0
  188. package/dist/contracts/index.d.ts +15 -0
  189. package/dist/contracts/index.d.ts.map +1 -0
  190. package/dist/contracts/index.js +11 -0
  191. package/dist/contracts/index.js.map +1 -0
  192. package/dist/contracts/payment-gate.d.ts +129 -0
  193. package/dist/contracts/payment-gate.d.ts.map +1 -0
  194. package/dist/contracts/payment-gate.js +24 -0
  195. package/dist/contracts/payment-gate.js.map +1 -0
  196. package/dist/contracts/start-api-claim.d.ts +90 -0
  197. package/dist/contracts/start-api-claim.d.ts.map +1 -0
  198. package/dist/contracts/start-api-claim.js +22 -0
  199. package/dist/contracts/start-api-claim.js.map +1 -0
  200. package/dist/contracts/webhooks.d.ts +1487 -0
  201. package/dist/contracts/webhooks.d.ts.map +1 -0
  202. package/dist/contracts/webhooks.js +71 -0
  203. package/dist/contracts/webhooks.js.map +1 -0
  204. package/dist/contracts/work-order.d.ts +29 -0
  205. package/dist/contracts/work-order.d.ts.map +1 -0
  206. package/dist/contracts/work-order.js +12 -0
  207. package/dist/contracts/work-order.js.map +1 -0
  208. package/dist/cron/ai-cost.d.ts +29 -0
  209. package/dist/cron/ai-cost.d.ts.map +1 -0
  210. package/dist/cron/ai-cost.js +80 -0
  211. package/dist/cron/ai-cost.js.map +1 -0
  212. package/dist/cron/api-lane.d.ts +39 -0
  213. package/dist/cron/api-lane.d.ts.map +1 -0
  214. package/dist/cron/api-lane.js +203 -0
  215. package/dist/cron/api-lane.js.map +1 -0
  216. package/dist/cron/backlog.d.ts +50 -0
  217. package/dist/cron/backlog.d.ts.map +1 -0
  218. package/dist/cron/backlog.js +115 -0
  219. package/dist/cron/backlog.js.map +1 -0
  220. package/dist/cron/billing.d.ts +11 -0
  221. package/dist/cron/billing.d.ts.map +1 -0
  222. package/dist/cron/billing.js +69 -0
  223. package/dist/cron/billing.js.map +1 -0
  224. package/dist/cron/collection.d.ts +50 -0
  225. package/dist/cron/collection.d.ts.map +1 -0
  226. package/dist/cron/collection.js +118 -0
  227. package/dist/cron/collection.js.map +1 -0
  228. package/dist/cron/funding.d.ts +16 -0
  229. package/dist/cron/funding.d.ts.map +1 -0
  230. package/dist/cron/funding.js +262 -0
  231. package/dist/cron/funding.js.map +1 -0
  232. package/dist/cron/payer-billing.d.ts +38 -0
  233. package/dist/cron/payer-billing.d.ts.map +1 -0
  234. package/dist/cron/payer-billing.js +119 -0
  235. package/dist/cron/payer-billing.js.map +1 -0
  236. package/dist/cron/scan.d.ts +43 -0
  237. package/dist/cron/scan.d.ts.map +1 -0
  238. package/dist/cron/scan.js +250 -0
  239. package/dist/cron/scan.js.map +1 -0
  240. package/dist/db/client.d.ts +14 -0
  241. package/dist/db/client.d.ts.map +1 -0
  242. package/dist/db/client.js +14 -0
  243. package/dist/db/client.js.map +1 -0
  244. package/dist/db/index.d.ts +7 -0
  245. package/dist/db/index.d.ts.map +1 -0
  246. package/dist/db/index.js +7 -0
  247. package/dist/db/index.js.map +1 -0
  248. package/dist/db/schema.d.ts +6738 -0
  249. package/dist/db/schema.d.ts.map +1 -0
  250. package/dist/db/schema.js +1433 -0
  251. package/dist/db/schema.js.map +1 -0
  252. package/dist/define-oracle.d.ts +32 -0
  253. package/dist/define-oracle.d.ts.map +1 -0
  254. package/dist/define-oracle.js +80 -0
  255. package/dist/define-oracle.js.map +1 -0
  256. package/dist/dev-oracle.d.ts +9 -0
  257. package/dist/dev-oracle.d.ts.map +1 -0
  258. package/dist/dev-oracle.js +19 -0
  259. package/dist/dev-oracle.js.map +1 -0
  260. package/dist/dev-worker.d.ts +10 -0
  261. package/dist/dev-worker.d.ts.map +1 -0
  262. package/dist/dev-worker.js +12 -0
  263. package/dist/dev-worker.js.map +1 -0
  264. package/dist/env.d.ts +146 -0
  265. package/dist/env.d.ts.map +1 -0
  266. package/dist/env.js +10 -0
  267. package/dist/env.js.map +1 -0
  268. package/dist/facts/exif.d.ts +43 -0
  269. package/dist/facts/exif.d.ts.map +1 -0
  270. package/dist/facts/exif.js +224 -0
  271. package/dist/facts/exif.js.map +1 -0
  272. package/dist/facts/fact.d.ts +62 -0
  273. package/dist/facts/fact.d.ts.map +1 -0
  274. package/dist/facts/fact.js +105 -0
  275. package/dist/facts/fact.js.map +1 -0
  276. package/dist/facts/geo.d.ts +55 -0
  277. package/dist/facts/geo.d.ts.map +1 -0
  278. package/dist/facts/geo.js +267 -0
  279. package/dist/facts/geo.js.map +1 -0
  280. package/dist/facts/index.d.ts +31 -0
  281. package/dist/facts/index.d.ts.map +1 -0
  282. package/dist/facts/index.js +27 -0
  283. package/dist/facts/index.js.map +1 -0
  284. package/dist/facts/linked-doc.d.ts +60 -0
  285. package/dist/facts/linked-doc.d.ts.map +1 -0
  286. package/dist/facts/linked-doc.js +101 -0
  287. package/dist/facts/linked-doc.js.map +1 -0
  288. package/dist/facts/types.d.ts +278 -0
  289. package/dist/facts/types.d.ts.map +1 -0
  290. package/dist/facts/types.js +19 -0
  291. package/dist/facts/types.js.map +1 -0
  292. package/dist/index.d.ts +25 -0
  293. package/dist/index.d.ts.map +1 -0
  294. package/dist/index.js +19 -0
  295. package/dist/index.js.map +1 -0
  296. package/dist/lib/api-lane/accept.d.ts +29 -0
  297. package/dist/lib/api-lane/accept.d.ts.map +1 -0
  298. package/dist/lib/api-lane/accept.js +218 -0
  299. package/dist/lib/api-lane/accept.js.map +1 -0
  300. package/dist/lib/api-lane/claim-list.d.ts +44 -0
  301. package/dist/lib/api-lane/claim-list.d.ts.map +1 -0
  302. package/dist/lib/api-lane/claim-list.js +92 -0
  303. package/dist/lib/api-lane/claim-list.js.map +1 -0
  304. package/dist/lib/api-lane/company.d.ts +56 -0
  305. package/dist/lib/api-lane/company.d.ts.map +1 -0
  306. package/dist/lib/api-lane/company.js +103 -0
  307. package/dist/lib/api-lane/company.js.map +1 -0
  308. package/dist/lib/api-lane/events.d.ts +21 -0
  309. package/dist/lib/api-lane/events.d.ts.map +1 -0
  310. package/dist/lib/api-lane/events.js +111 -0
  311. package/dist/lib/api-lane/events.js.map +1 -0
  312. package/dist/lib/api-lane/ids.d.ts +39 -0
  313. package/dist/lib/api-lane/ids.d.ts.map +1 -0
  314. package/dist/lib/api-lane/ids.js +78 -0
  315. package/dist/lib/api-lane/ids.js.map +1 -0
  316. package/dist/lib/api-lane/index.d.ts +16 -0
  317. package/dist/lib/api-lane/index.d.ts.map +1 -0
  318. package/dist/lib/api-lane/index.js +16 -0
  319. package/dist/lib/api-lane/index.js.map +1 -0
  320. package/dist/lib/api-lane/linked.d.ts +264 -0
  321. package/dist/lib/api-lane/linked.d.ts.map +1 -0
  322. package/dist/lib/api-lane/linked.js +272 -0
  323. package/dist/lib/api-lane/linked.js.map +1 -0
  324. package/dist/lib/api-lane/media-type.d.ts +15 -0
  325. package/dist/lib/api-lane/media-type.d.ts.map +1 -0
  326. package/dist/lib/api-lane/media-type.js +73 -0
  327. package/dist/lib/api-lane/media-type.js.map +1 -0
  328. package/dist/lib/api-lane/member-emails.d.ts +83 -0
  329. package/dist/lib/api-lane/member-emails.d.ts.map +1 -0
  330. package/dist/lib/api-lane/member-emails.js +213 -0
  331. package/dist/lib/api-lane/member-emails.js.map +1 -0
  332. package/dist/lib/api-lane/members.d.ts +42 -0
  333. package/dist/lib/api-lane/members.d.ts.map +1 -0
  334. package/dist/lib/api-lane/members.js +75 -0
  335. package/dist/lib/api-lane/members.js.map +1 -0
  336. package/dist/lib/api-lane/notify.d.ts +47 -0
  337. package/dist/lib/api-lane/notify.d.ts.map +1 -0
  338. package/dist/lib/api-lane/notify.js +240 -0
  339. package/dist/lib/api-lane/notify.js.map +1 -0
  340. package/dist/lib/api-lane/pause.d.ts +41 -0
  341. package/dist/lib/api-lane/pause.d.ts.map +1 -0
  342. package/dist/lib/api-lane/pause.js +155 -0
  343. package/dist/lib/api-lane/pause.js.map +1 -0
  344. package/dist/lib/api-lane/record.d.ts +76 -0
  345. package/dist/lib/api-lane/record.d.ts.map +1 -0
  346. package/dist/lib/api-lane/record.js +337 -0
  347. package/dist/lib/api-lane/record.js.map +1 -0
  348. package/dist/lib/api-lane/retention.d.ts +43 -0
  349. package/dist/lib/api-lane/retention.d.ts.map +1 -0
  350. package/dist/lib/api-lane/retention.js +176 -0
  351. package/dist/lib/api-lane/retention.js.map +1 -0
  352. package/dist/lib/api-lane/review.d.ts +76 -0
  353. package/dist/lib/api-lane/review.d.ts.map +1 -0
  354. package/dist/lib/api-lane/review.js +355 -0
  355. package/dist/lib/api-lane/review.js.map +1 -0
  356. package/dist/lib/api-lane/reviewers.d.ts +109 -0
  357. package/dist/lib/api-lane/reviewers.d.ts.map +1 -0
  358. package/dist/lib/api-lane/reviewers.js +755 -0
  359. package/dist/lib/api-lane/reviewers.js.map +1 -0
  360. package/dist/lib/api-lane/source-delete.d.ts +16 -0
  361. package/dist/lib/api-lane/source-delete.d.ts.map +1 -0
  362. package/dist/lib/api-lane/source-delete.js +50 -0
  363. package/dist/lib/api-lane/source-delete.js.map +1 -0
  364. package/dist/lib/api-lane/source.d.ts +19 -0
  365. package/dist/lib/api-lane/source.d.ts.map +1 -0
  366. package/dist/lib/api-lane/source.js +226 -0
  367. package/dist/lib/api-lane/source.js.map +1 -0
  368. package/dist/lib/api-lane/submitter.d.ts +22 -0
  369. package/dist/lib/api-lane/submitter.d.ts.map +1 -0
  370. package/dist/lib/api-lane/submitter.js +34 -0
  371. package/dist/lib/api-lane/submitter.js.map +1 -0
  372. package/dist/lib/api-lane/timeline.d.ts +20 -0
  373. package/dist/lib/api-lane/timeline.d.ts.map +1 -0
  374. package/dist/lib/api-lane/timeline.js +23 -0
  375. package/dist/lib/api-lane/timeline.js.map +1 -0
  376. package/dist/lib/api-lane/webhook-crypto.d.ts +44 -0
  377. package/dist/lib/api-lane/webhook-crypto.d.ts.map +1 -0
  378. package/dist/lib/api-lane/webhook-crypto.js +103 -0
  379. package/dist/lib/api-lane/webhook-crypto.js.map +1 -0
  380. package/dist/lib/api-lane/webhooks.d.ts +117 -0
  381. package/dist/lib/api-lane/webhooks.d.ts.map +1 -0
  382. package/dist/lib/api-lane/webhooks.js +503 -0
  383. package/dist/lib/api-lane/webhooks.js.map +1 -0
  384. package/dist/lib/archive.d.ts +64 -0
  385. package/dist/lib/archive.d.ts.map +1 -0
  386. package/dist/lib/archive.js +305 -0
  387. package/dist/lib/archive.js.map +1 -0
  388. package/dist/lib/bech32.d.ts +8 -0
  389. package/dist/lib/bech32.d.ts.map +1 -0
  390. package/dist/lib/bech32.js +39 -0
  391. package/dist/lib/bech32.js.map +1 -0
  392. package/dist/lib/claim-erase.d.ts +22 -0
  393. package/dist/lib/claim-erase.d.ts.map +1 -0
  394. package/dist/lib/claim-erase.js +44 -0
  395. package/dist/lib/claim-erase.js.map +1 -0
  396. package/dist/lib/cursor.d.ts +11 -0
  397. package/dist/lib/cursor.d.ts.map +1 -0
  398. package/dist/lib/cursor.js +20 -0
  399. package/dist/lib/cursor.js.map +1 -0
  400. package/dist/lib/email/send.d.ts +43 -0
  401. package/dist/lib/email/send.d.ts.map +1 -0
  402. package/dist/lib/email/send.js +71 -0
  403. package/dist/lib/email/send.js.map +1 -0
  404. package/dist/lib/email/template.d.ts +217 -0
  405. package/dist/lib/email/template.d.ts.map +1 -0
  406. package/dist/lib/email/template.js +713 -0
  407. package/dist/lib/email/template.js.map +1 -0
  408. package/dist/lib/engine/adr36.d.ts +56 -0
  409. package/dist/lib/engine/adr36.d.ts.map +1 -0
  410. package/dist/lib/engine/adr36.js +76 -0
  411. package/dist/lib/engine/adr36.js.map +1 -0
  412. package/dist/lib/engine/client.d.ts +162 -0
  413. package/dist/lib/engine/client.d.ts.map +1 -0
  414. package/dist/lib/engine/client.js +473 -0
  415. package/dist/lib/engine/client.js.map +1 -0
  416. package/dist/lib/engine/types.d.ts +1356 -0
  417. package/dist/lib/engine/types.d.ts.map +1 -0
  418. package/dist/lib/engine/types.js +562 -0
  419. package/dist/lib/engine/types.js.map +1 -0
  420. package/dist/lib/errors.d.ts +73 -0
  421. package/dist/lib/errors.d.ts.map +1 -0
  422. package/dist/lib/errors.js +96 -0
  423. package/dist/lib/errors.js.map +1 -0
  424. package/dist/lib/facts/builder.d.ts +88 -0
  425. package/dist/lib/facts/builder.d.ts.map +1 -0
  426. package/dist/lib/facts/builder.js +239 -0
  427. package/dist/lib/facts/builder.js.map +1 -0
  428. package/dist/lib/facts/ctx.d.ts +34 -0
  429. package/dist/lib/facts/ctx.d.ts.map +1 -0
  430. package/dist/lib/facts/ctx.js +51 -0
  431. package/dist/lib/facts/ctx.js.map +1 -0
  432. package/dist/lib/facts/expected.d.ts +23 -0
  433. package/dist/lib/facts/expected.d.ts.map +1 -0
  434. package/dist/lib/facts/expected.js +16 -0
  435. package/dist/lib/facts/expected.js.map +1 -0
  436. package/dist/lib/facts/fact-cache.d.ts +469 -0
  437. package/dist/lib/facts/fact-cache.d.ts.map +1 -0
  438. package/dist/lib/facts/fact-cache.js +52 -0
  439. package/dist/lib/facts/fact-cache.js.map +1 -0
  440. package/dist/lib/facts/factset.d.ts +608 -0
  441. package/dist/lib/facts/factset.d.ts.map +1 -0
  442. package/dist/lib/facts/factset.js +226 -0
  443. package/dist/lib/facts/factset.js.map +1 -0
  444. package/dist/lib/facts/producer.d.ts +190 -0
  445. package/dist/lib/facts/producer.d.ts.map +1 -0
  446. package/dist/lib/facts/producer.js +15 -0
  447. package/dist/lib/facts/producer.js.map +1 -0
  448. package/dist/lib/facts/runner.d.ts +111 -0
  449. package/dist/lib/facts/runner.d.ts.map +1 -0
  450. package/dist/lib/facts/runner.js +438 -0
  451. package/dist/lib/facts/runner.js.map +1 -0
  452. package/dist/lib/facts/stock/ai-check.d.ts +100 -0
  453. package/dist/lib/facts/stock/ai-check.d.ts.map +1 -0
  454. package/dist/lib/facts/stock/ai-check.js +526 -0
  455. package/dist/lib/facts/stock/ai-check.js.map +1 -0
  456. package/dist/lib/facts/stock/ai-inputs.d.ts +104 -0
  457. package/dist/lib/facts/stock/ai-inputs.d.ts.map +1 -0
  458. package/dist/lib/facts/stock/ai-inputs.js +332 -0
  459. package/dist/lib/facts/stock/ai-inputs.js.map +1 -0
  460. package/dist/lib/facts/stock/ai-provider.d.ts +105 -0
  461. package/dist/lib/facts/stock/ai-provider.d.ts.map +1 -0
  462. package/dist/lib/facts/stock/ai-provider.js +250 -0
  463. package/dist/lib/facts/stock/ai-provider.js.map +1 -0
  464. package/dist/lib/facts/stock/ai-unique.d.ts +85 -0
  465. package/dist/lib/facts/stock/ai-unique.d.ts.map +1 -0
  466. package/dist/lib/facts/stock/ai-unique.js +208 -0
  467. package/dist/lib/facts/stock/ai-unique.js.map +1 -0
  468. package/dist/lib/facts/stock/archive.d.ts +63 -0
  469. package/dist/lib/facts/stock/archive.d.ts.map +1 -0
  470. package/dist/lib/facts/stock/archive.js +349 -0
  471. package/dist/lib/facts/stock/archive.js.map +1 -0
  472. package/dist/lib/facts/stock/c2pa-trust-list.d.ts +16 -0
  473. package/dist/lib/facts/stock/c2pa-trust-list.d.ts.map +1 -0
  474. package/dist/lib/facts/stock/c2pa-trust-list.js +637 -0
  475. package/dist/lib/facts/stock/c2pa-trust-list.js.map +1 -0
  476. package/dist/lib/facts/stock/c2pa.d.ts +56 -0
  477. package/dist/lib/facts/stock/c2pa.d.ts.map +1 -0
  478. package/dist/lib/facts/stock/c2pa.js +234 -0
  479. package/dist/lib/facts/stock/c2pa.js.map +1 -0
  480. package/dist/lib/facts/stock/call.d.ts +91 -0
  481. package/dist/lib/facts/stock/call.d.ts.map +1 -0
  482. package/dist/lib/facts/stock/call.js +281 -0
  483. package/dist/lib/facts/stock/call.js.map +1 -0
  484. package/dist/lib/facts/stock/capability.d.ts +39 -0
  485. package/dist/lib/facts/stock/capability.d.ts.map +1 -0
  486. package/dist/lib/facts/stock/capability.js +59 -0
  487. package/dist/lib/facts/stock/capability.js.map +1 -0
  488. package/dist/lib/facts/stock/ext-source.d.ts +51 -0
  489. package/dist/lib/facts/stock/ext-source.d.ts.map +1 -0
  490. package/dist/lib/facts/stock/ext-source.js +201 -0
  491. package/dist/lib/facts/stock/ext-source.js.map +1 -0
  492. package/dist/lib/facts/stock/frequency-fact.d.ts +59 -0
  493. package/dist/lib/facts/stock/frequency-fact.d.ts.map +1 -0
  494. package/dist/lib/facts/stock/frequency-fact.js +86 -0
  495. package/dist/lib/facts/stock/frequency-fact.js.map +1 -0
  496. package/dist/lib/facts/stock/frequency.d.ts +32 -0
  497. package/dist/lib/facts/stock/frequency.d.ts.map +1 -0
  498. package/dist/lib/facts/stock/frequency.js +48 -0
  499. package/dist/lib/facts/stock/frequency.js.map +1 -0
  500. package/dist/lib/facts/stock/index.d.ts +27 -0
  501. package/dist/lib/facts/stock/index.d.ts.map +1 -0
  502. package/dist/lib/facts/stock/index.js +28 -0
  503. package/dist/lib/facts/stock/index.js.map +1 -0
  504. package/dist/lib/facts/stock/normalize.d.ts +45 -0
  505. package/dist/lib/facts/stock/normalize.d.ts.map +1 -0
  506. package/dist/lib/facts/stock/normalize.js +135 -0
  507. package/dist/lib/facts/stock/normalize.js.map +1 -0
  508. package/dist/lib/facts/stock/phash.d.ts +55 -0
  509. package/dist/lib/facts/stock/phash.d.ts.map +1 -0
  510. package/dist/lib/facts/stock/phash.js +256 -0
  511. package/dist/lib/facts/stock/phash.js.map +1 -0
  512. package/dist/lib/facts/stock/rule-defaults.d.ts +72 -0
  513. package/dist/lib/facts/stock/rule-defaults.d.ts.map +1 -0
  514. package/dist/lib/facts/stock/rule-defaults.js +55 -0
  515. package/dist/lib/facts/stock/rule-defaults.js.map +1 -0
  516. package/dist/lib/facts/stock/send.d.ts +52 -0
  517. package/dist/lib/facts/stock/send.d.ts.map +1 -0
  518. package/dist/lib/facts/stock/send.js +148 -0
  519. package/dist/lib/facts/stock/send.js.map +1 -0
  520. package/dist/lib/facts/stock/unique-score.d.ts +138 -0
  521. package/dist/lib/facts/stock/unique-score.d.ts.map +1 -0
  522. package/dist/lib/facts/stock/unique-score.js +257 -0
  523. package/dist/lib/facts/stock/unique-score.js.map +1 -0
  524. package/dist/lib/facts/stock/unique-store.d.ts +420 -0
  525. package/dist/lib/facts/stock/unique-store.d.ts.map +1 -0
  526. package/dist/lib/facts/stock/unique-store.js +328 -0
  527. package/dist/lib/facts/stock/unique-store.js.map +1 -0
  528. package/dist/lib/facts/stock/unique.d.ts +35 -0
  529. package/dist/lib/facts/stock/unique.d.ts.map +1 -0
  530. package/dist/lib/facts/stock/unique.js +327 -0
  531. package/dist/lib/facts/stock/unique.js.map +1 -0
  532. package/dist/lib/facts/tools.d.ts +57 -0
  533. package/dist/lib/facts/tools.d.ts.map +1 -0
  534. package/dist/lib/facts/tools.js +325 -0
  535. package/dist/lib/facts/tools.js.map +1 -0
  536. package/dist/lib/facts/validate.d.ts +33 -0
  537. package/dist/lib/facts/validate.d.ts.map +1 -0
  538. package/dist/lib/facts/validate.js +137 -0
  539. package/dist/lib/facts/validate.js.map +1 -0
  540. package/dist/lib/hash.d.ts +44 -0
  541. package/dist/lib/hash.d.ts.map +1 -0
  542. package/dist/lib/hash.js +80 -0
  543. package/dist/lib/hash.js.map +1 -0
  544. package/dist/lib/http/client.d.ts +113 -0
  545. package/dist/lib/http/client.d.ts.map +1 -0
  546. package/dist/lib/http/client.js +330 -0
  547. package/dist/lib/http/client.js.map +1 -0
  548. package/dist/lib/ids.d.ts +17 -0
  549. package/dist/lib/ids.d.ts.map +1 -0
  550. package/dist/lib/ids.js +26 -0
  551. package/dist/lib/ids.js.map +1 -0
  552. package/dist/lib/ixo/attachments.d.ts +116 -0
  553. package/dist/lib/ixo/attachments.d.ts.map +1 -0
  554. package/dist/lib/ixo/attachments.js +290 -0
  555. package/dist/lib/ixo/attachments.js.map +1 -0
  556. package/dist/lib/ixo/authz.d.ts +40 -0
  557. package/dist/lib/ixo/authz.d.ts.map +1 -0
  558. package/dist/lib/ixo/authz.js +113 -0
  559. package/dist/lib/ixo/authz.js.map +1 -0
  560. package/dist/lib/ixo/blocksync/index.d.ts +90 -0
  561. package/dist/lib/ixo/blocksync/index.d.ts.map +1 -0
  562. package/dist/lib/ixo/blocksync/index.js +251 -0
  563. package/dist/lib/ixo/blocksync/index.js.map +1 -0
  564. package/dist/lib/ixo/blocksync/queries.d.ts +15 -0
  565. package/dist/lib/ixo/blocksync/queries.d.ts.map +1 -0
  566. package/dist/lib/ixo/blocksync/queries.js +144 -0
  567. package/dist/lib/ixo/blocksync/queries.js.map +1 -0
  568. package/dist/lib/ixo/blocksync/types.d.ts +184 -0
  569. package/dist/lib/ixo/blocksync/types.d.ts.map +1 -0
  570. package/dist/lib/ixo/blocksync/types.js +108 -0
  571. package/dist/lib/ixo/blocksync/types.js.map +1 -0
  572. package/dist/lib/ixo/cellnode.d.ts +35 -0
  573. package/dist/lib/ixo/cellnode.d.ts.map +1 -0
  574. package/dist/lib/ixo/cellnode.js +43 -0
  575. package/dist/lib/ixo/cellnode.js.map +1 -0
  576. package/dist/lib/ixo/chain-write.d.ts +130 -0
  577. package/dist/lib/ixo/chain-write.d.ts.map +1 -0
  578. package/dist/lib/ixo/chain-write.js +460 -0
  579. package/dist/lib/ixo/chain-write.js.map +1 -0
  580. package/dist/lib/ixo/chain.d.ts +1046 -0
  581. package/dist/lib/ixo/chain.d.ts.map +1 -0
  582. package/dist/lib/ixo/chain.js +279 -0
  583. package/dist/lib/ixo/chain.js.map +1 -0
  584. package/dist/lib/ixo/claim-bot.d.ts +49 -0
  585. package/dist/lib/ixo/claim-bot.d.ts.map +1 -0
  586. package/dist/lib/ixo/claim-bot.js +141 -0
  587. package/dist/lib/ixo/claim-bot.js.map +1 -0
  588. package/dist/lib/ixo/delegation-verify.d.ts +44 -0
  589. package/dist/lib/ixo/delegation-verify.d.ts.map +1 -0
  590. package/dist/lib/ixo/delegation-verify.js +101 -0
  591. package/dist/lib/ixo/delegation-verify.js.map +1 -0
  592. package/dist/lib/ixo/did.d.ts +13 -0
  593. package/dist/lib/ixo/did.d.ts.map +1 -0
  594. package/dist/lib/ixo/did.js +85 -0
  595. package/dist/lib/ixo/did.js.map +1 -0
  596. package/dist/lib/ixo/grant-chain.d.ts +55 -0
  597. package/dist/lib/ixo/grant-chain.d.ts.map +1 -0
  598. package/dist/lib/ixo/grant-chain.js +185 -0
  599. package/dist/lib/ixo/grant-chain.js.map +1 -0
  600. package/dist/lib/ixo/identity.d.ts +32 -0
  601. package/dist/lib/ixo/identity.d.ts.map +1 -0
  602. package/dist/lib/ixo/identity.js +104 -0
  603. package/dist/lib/ixo/identity.js.map +1 -0
  604. package/dist/lib/ixo/index.d.ts +118 -0
  605. package/dist/lib/ixo/index.d.ts.map +1 -0
  606. package/dist/lib/ixo/index.js +395 -0
  607. package/dist/lib/ixo/index.js.map +1 -0
  608. package/dist/lib/ixo/payment.d.ts +104 -0
  609. package/dist/lib/ixo/payment.d.ts.map +1 -0
  610. package/dist/lib/ixo/payment.js +136 -0
  611. package/dist/lib/ixo/payment.js.map +1 -0
  612. package/dist/lib/ixo/ucan-store.d.ts +30 -0
  613. package/dist/lib/ixo/ucan-store.d.ts.map +1 -0
  614. package/dist/lib/ixo/ucan-store.js +134 -0
  615. package/dist/lib/ixo/ucan-store.js.map +1 -0
  616. package/dist/lib/ixo/ucan.d.ts +96 -0
  617. package/dist/lib/ixo/ucan.d.ts.map +1 -0
  618. package/dist/lib/ixo/ucan.js +216 -0
  619. package/dist/lib/ixo/ucan.js.map +1 -0
  620. package/dist/lib/ixo/verified-read.d.ts +43 -0
  621. package/dist/lib/ixo/verified-read.d.ts.map +1 -0
  622. package/dist/lib/ixo/verified-read.js +73 -0
  623. package/dist/lib/ixo/verified-read.js.map +1 -0
  624. package/dist/lib/ixo/vfs.d.ts +27 -0
  625. package/dist/lib/ixo/vfs.d.ts.map +1 -0
  626. package/dist/lib/ixo/vfs.js +42 -0
  627. package/dist/lib/ixo/vfs.js.map +1 -0
  628. package/dist/lib/ixo/web-did.d.ts +7 -0
  629. package/dist/lib/ixo/web-did.d.ts.map +1 -0
  630. package/dist/lib/ixo/web-did.js +9 -0
  631. package/dist/lib/ixo/web-did.js.map +1 -0
  632. package/dist/lib/logger.d.ts +34 -0
  633. package/dist/lib/logger.d.ts.map +1 -0
  634. package/dist/lib/logger.js +126 -0
  635. package/dist/lib/logger.js.map +1 -0
  636. package/dist/lib/matrix/api.d.ts +57 -0
  637. package/dist/lib/matrix/api.d.ts.map +1 -0
  638. package/dist/lib/matrix/api.js +58 -0
  639. package/dist/lib/matrix/api.js.map +1 -0
  640. package/dist/lib/matrix/client.d.ts +41 -0
  641. package/dist/lib/matrix/client.d.ts.map +1 -0
  642. package/dist/lib/matrix/client.js +104 -0
  643. package/dist/lib/matrix/client.js.map +1 -0
  644. package/dist/lib/matrix/deliver.d.ts +224 -0
  645. package/dist/lib/matrix/deliver.d.ts.map +1 -0
  646. package/dist/lib/matrix/deliver.js +788 -0
  647. package/dist/lib/matrix/deliver.js.map +1 -0
  648. package/dist/lib/matrix/events.d.ts +114 -0
  649. package/dist/lib/matrix/events.d.ts.map +1 -0
  650. package/dist/lib/matrix/events.js +143 -0
  651. package/dist/lib/matrix/events.js.map +1 -0
  652. package/dist/lib/matrix/mxid.d.ts +24 -0
  653. package/dist/lib/matrix/mxid.d.ts.map +1 -0
  654. package/dist/lib/matrix/mxid.js +47 -0
  655. package/dist/lib/matrix/mxid.js.map +1 -0
  656. package/dist/lib/metrics.d.ts +105 -0
  657. package/dist/lib/metrics.d.ts.map +1 -0
  658. package/dist/lib/metrics.js +204 -0
  659. package/dist/lib/metrics.js.map +1 -0
  660. package/dist/lib/oauth/approvals.d.ts +160 -0
  661. package/dist/lib/oauth/approvals.d.ts.map +1 -0
  662. package/dist/lib/oauth/approvals.js +273 -0
  663. package/dist/lib/oauth/approvals.js.map +1 -0
  664. package/dist/lib/oauth/standing.d.ts +152 -0
  665. package/dist/lib/oauth/standing.d.ts.map +1 -0
  666. package/dist/lib/oauth/standing.js +299 -0
  667. package/dist/lib/oauth/standing.js.map +1 -0
  668. package/dist/lib/oauth/token.d.ts +60 -0
  669. package/dist/lib/oauth/token.d.ts.map +1 -0
  670. package/dist/lib/oauth/token.js +129 -0
  671. package/dist/lib/oauth/token.js.map +1 -0
  672. package/dist/lib/payments/extend.d.ts +42 -0
  673. package/dist/lib/payments/extend.d.ts.map +1 -0
  674. package/dist/lib/payments/extend.js +98 -0
  675. package/dist/lib/payments/extend.js.map +1 -0
  676. package/dist/lib/payments/facilitator.d.ts +220 -0
  677. package/dist/lib/payments/facilitator.d.ts.map +1 -0
  678. package/dist/lib/payments/facilitator.js +451 -0
  679. package/dist/lib/payments/facilitator.js.map +1 -0
  680. package/dist/lib/payments/gate.d.ts +207 -0
  681. package/dist/lib/payments/gate.d.ts.map +1 -0
  682. package/dist/lib/payments/gate.js +481 -0
  683. package/dist/lib/payments/gate.js.map +1 -0
  684. package/dist/lib/payments/header-seal.d.ts +33 -0
  685. package/dist/lib/payments/header-seal.d.ts.map +1 -0
  686. package/dist/lib/payments/header-seal.js +76 -0
  687. package/dist/lib/payments/header-seal.js.map +1 -0
  688. package/dist/lib/payments/index.d.ts +12 -0
  689. package/dist/lib/payments/index.d.ts.map +1 -0
  690. package/dist/lib/payments/index.js +11 -0
  691. package/dist/lib/payments/index.js.map +1 -0
  692. package/dist/lib/payments/price.d.ts +25 -0
  693. package/dist/lib/payments/price.d.ts.map +1 -0
  694. package/dist/lib/payments/price.js +43 -0
  695. package/dist/lib/payments/price.js.map +1 -0
  696. package/dist/lib/payments/reconcile.d.ts +77 -0
  697. package/dist/lib/payments/reconcile.d.ts.map +1 -0
  698. package/dist/lib/payments/reconcile.js +317 -0
  699. package/dist/lib/payments/reconcile.js.map +1 -0
  700. package/dist/lib/payments/refund.d.ts +34 -0
  701. package/dist/lib/payments/refund.d.ts.map +1 -0
  702. package/dist/lib/payments/refund.js +123 -0
  703. package/dist/lib/payments/refund.js.map +1 -0
  704. package/dist/lib/payments/review-billing.d.ts +222 -0
  705. package/dist/lib/payments/review-billing.d.ts.map +1 -0
  706. package/dist/lib/payments/review-billing.js +609 -0
  707. package/dist/lib/payments/review-billing.js.map +1 -0
  708. package/dist/lib/payments/settle.d.ts +44 -0
  709. package/dist/lib/payments/settle.d.ts.map +1 -0
  710. package/dist/lib/payments/settle.js +306 -0
  711. package/dist/lib/payments/settle.js.map +1 -0
  712. package/dist/lib/payments/terms.d.ts +27 -0
  713. package/dist/lib/payments/terms.d.ts.map +1 -0
  714. package/dist/lib/payments/terms.js +21 -0
  715. package/dist/lib/payments/terms.js.map +1 -0
  716. package/dist/lib/payouts.d.ts +20 -0
  717. package/dist/lib/payouts.d.ts.map +1 -0
  718. package/dist/lib/payouts.js +30 -0
  719. package/dist/lib/payouts.js.map +1 -0
  720. package/dist/lib/readiness.d.ts +42 -0
  721. package/dist/lib/readiness.d.ts.map +1 -0
  722. package/dist/lib/readiness.js +130 -0
  723. package/dist/lib/readiness.js.map +1 -0
  724. package/dist/lib/redact.d.ts +23 -0
  725. package/dist/lib/redact.d.ts.map +1 -0
  726. package/dist/lib/redact.js +67 -0
  727. package/dist/lib/redact.js.map +1 -0
  728. package/dist/lib/register.d.ts +85 -0
  729. package/dist/lib/register.d.ts.map +1 -0
  730. package/dist/lib/register.js +390 -0
  731. package/dist/lib/register.js.map +1 -0
  732. package/dist/lib/review/attestation.d.ts +92 -0
  733. package/dist/lib/review/attestation.d.ts.map +1 -0
  734. package/dist/lib/review/attestation.js +264 -0
  735. package/dist/lib/review/attestation.js.map +1 -0
  736. package/dist/lib/review/reviewer-grant.d.ts +146 -0
  737. package/dist/lib/review/reviewer-grant.d.ts.map +1 -0
  738. package/dist/lib/review/reviewer-grant.js +359 -0
  739. package/dist/lib/review/reviewer-grant.js.map +1 -0
  740. package/dist/lib/review/tasks.d.ts +18 -0
  741. package/dist/lib/review/tasks.d.ts.map +1 -0
  742. package/dist/lib/review/tasks.js +36 -0
  743. package/dist/lib/review/tasks.js.map +1 -0
  744. package/dist/lib/sentry.d.ts +89 -0
  745. package/dist/lib/sentry.d.ts.map +1 -0
  746. package/dist/lib/sentry.js +284 -0
  747. package/dist/lib/sentry.js.map +1 -0
  748. package/dist/lib/spans.d.ts +14 -0
  749. package/dist/lib/spans.d.ts.map +1 -0
  750. package/dist/lib/spans.js +28 -0
  751. package/dist/lib/spans.js.map +1 -0
  752. package/dist/lib/tracing.d.ts +31 -0
  753. package/dist/lib/tracing.d.ts.map +1 -0
  754. package/dist/lib/tracing.js +66 -0
  755. package/dist/lib/tracing.js.map +1 -0
  756. package/dist/lib/ttl-cache.d.ts +26 -0
  757. package/dist/lib/ttl-cache.d.ts.map +1 -0
  758. package/dist/lib/ttl-cache.js +61 -0
  759. package/dist/lib/ttl-cache.js.map +1 -0
  760. package/dist/lib/validator.d.ts +19 -0
  761. package/dist/lib/validator.d.ts.map +1 -0
  762. package/dist/lib/validator.js +32 -0
  763. package/dist/lib/validator.js.map +1 -0
  764. package/dist/lib/work-order/form.d.ts +40 -0
  765. package/dist/lib/work-order/form.d.ts.map +1 -0
  766. package/dist/lib/work-order/form.js +316 -0
  767. package/dist/lib/work-order/form.js.map +1 -0
  768. package/dist/lib/work-order/index.d.ts +20 -0
  769. package/dist/lib/work-order/index.d.ts.map +1 -0
  770. package/dist/lib/work-order/index.js +66 -0
  771. package/dist/lib/work-order/index.js.map +1 -0
  772. package/dist/middleware/api/audit.d.ts +9 -0
  773. package/dist/middleware/api/audit.d.ts.map +1 -0
  774. package/dist/middleware/api/audit.js +38 -0
  775. package/dist/middleware/api/audit.js.map +1 -0
  776. package/dist/middleware/api/auth.d.ts +29 -0
  777. package/dist/middleware/api/auth.d.ts.map +1 -0
  778. package/dist/middleware/api/auth.js +105 -0
  779. package/dist/middleware/api/auth.js.map +1 -0
  780. package/dist/middleware/api/console.d.ts +92 -0
  781. package/dist/middleware/api/console.d.ts.map +1 -0
  782. package/dist/middleware/api/console.js +446 -0
  783. package/dist/middleware/api/console.js.map +1 -0
  784. package/dist/middleware/api/errors.d.ts +48 -0
  785. package/dist/middleware/api/errors.d.ts.map +1 -0
  786. package/dist/middleware/api/errors.js +133 -0
  787. package/dist/middleware/api/errors.js.map +1 -0
  788. package/dist/middleware/api/idempotency.d.ts +23 -0
  789. package/dist/middleware/api/idempotency.d.ts.map +1 -0
  790. package/dist/middleware/api/idempotency.js +158 -0
  791. package/dist/middleware/api/idempotency.js.map +1 -0
  792. package/dist/middleware/api/keys.d.ts +14 -0
  793. package/dist/middleware/api/keys.d.ts.map +1 -0
  794. package/dist/middleware/api/keys.js +66 -0
  795. package/dist/middleware/api/keys.js.map +1 -0
  796. package/dist/middleware/api/membership.d.ts +32 -0
  797. package/dist/middleware/api/membership.d.ts.map +1 -0
  798. package/dist/middleware/api/membership.js +48 -0
  799. package/dist/middleware/api/membership.js.map +1 -0
  800. package/dist/middleware/api/oauth.d.ts +28 -0
  801. package/dist/middleware/api/oauth.d.ts.map +1 -0
  802. package/dist/middleware/api/oauth.js +109 -0
  803. package/dist/middleware/api/oauth.js.map +1 -0
  804. package/dist/middleware/api/rate-limit.d.ts +23 -0
  805. package/dist/middleware/api/rate-limit.d.ts.map +1 -0
  806. package/dist/middleware/api/rate-limit.js +70 -0
  807. package/dist/middleware/api/rate-limit.js.map +1 -0
  808. package/dist/middleware/api/types.d.ts +92 -0
  809. package/dist/middleware/api/types.d.ts.map +1 -0
  810. package/dist/middleware/api/types.js +7 -0
  811. package/dist/middleware/api/types.js.map +1 -0
  812. package/dist/middleware/api/wait.d.ts +21 -0
  813. package/dist/middleware/api/wait.d.ts.map +1 -0
  814. package/dist/middleware/api/wait.js +85 -0
  815. package/dist/middleware/api/wait.js.map +1 -0
  816. package/dist/middleware/capability.d.ts +32 -0
  817. package/dist/middleware/capability.d.ts.map +1 -0
  818. package/dist/middleware/capability.js +113 -0
  819. package/dist/middleware/capability.js.map +1 -0
  820. package/dist/middleware/database.d.ts +14 -0
  821. package/dist/middleware/database.d.ts.map +1 -0
  822. package/dist/middleware/database.js +18 -0
  823. package/dist/middleware/database.js.map +1 -0
  824. package/dist/middleware/error-handler.d.ts +13 -0
  825. package/dist/middleware/error-handler.d.ts.map +1 -0
  826. package/dist/middleware/error-handler.js +127 -0
  827. package/dist/middleware/error-handler.js.map +1 -0
  828. package/dist/middleware/observability.d.ts +32 -0
  829. package/dist/middleware/observability.d.ts.map +1 -0
  830. package/dist/middleware/observability.js +134 -0
  831. package/dist/middleware/observability.js.map +1 -0
  832. package/dist/middleware/rate-limit.d.ts +16 -0
  833. package/dist/middleware/rate-limit.d.ts.map +1 -0
  834. package/dist/middleware/rate-limit.js +56 -0
  835. package/dist/middleware/rate-limit.js.map +1 -0
  836. package/dist/middleware/ucan-auth.d.ts +39 -0
  837. package/dist/middleware/ucan-auth.d.ts.map +1 -0
  838. package/dist/middleware/ucan-auth.js +278 -0
  839. package/dist/middleware/ucan-auth.js.map +1 -0
  840. package/dist/networks.d.ts +34 -0
  841. package/dist/networks.d.ts.map +1 -0
  842. package/dist/networks.js +49 -0
  843. package/dist/networks.js.map +1 -0
  844. package/dist/oracle.d.ts +193 -0
  845. package/dist/oracle.d.ts.map +1 -0
  846. package/dist/oracle.js +245 -0
  847. package/dist/oracle.js.map +1 -0
  848. package/dist/routes/health.d.ts +16 -0
  849. package/dist/routes/health.d.ts.map +1 -0
  850. package/dist/routes/health.js +29 -0
  851. package/dist/routes/health.js.map +1 -0
  852. package/dist/routes/v1/admin.d.ts +18 -0
  853. package/dist/routes/v1/admin.d.ts.map +1 -0
  854. package/dist/routes/v1/admin.js +101 -0
  855. package/dist/routes/v1/admin.js.map +1 -0
  856. package/dist/routes/v1/api/admin-claims.d.ts +14 -0
  857. package/dist/routes/v1/api/admin-claims.d.ts.map +1 -0
  858. package/dist/routes/v1/api/admin-claims.js +82 -0
  859. package/dist/routes/v1/api/admin-claims.js.map +1 -0
  860. package/dist/routes/v1/api/admin-facilitator.d.ts +20 -0
  861. package/dist/routes/v1/api/admin-facilitator.d.ts.map +1 -0
  862. package/dist/routes/v1/api/admin-facilitator.js +64 -0
  863. package/dist/routes/v1/api/admin-facilitator.js.map +1 -0
  864. package/dist/routes/v1/api/admin.d.ts +9 -0
  865. package/dist/routes/v1/api/admin.d.ts.map +1 -0
  866. package/dist/routes/v1/api/admin.js +110 -0
  867. package/dist/routes/v1/api/admin.js.map +1 -0
  868. package/dist/routes/v1/api/audit.d.ts +8 -0
  869. package/dist/routes/v1/api/audit.d.ts.map +1 -0
  870. package/dist/routes/v1/api/audit.js +56 -0
  871. package/dist/routes/v1/api/audit.js.map +1 -0
  872. package/dist/routes/v1/api/batch.d.ts +17 -0
  873. package/dist/routes/v1/api/batch.d.ts.map +1 -0
  874. package/dist/routes/v1/api/batch.js +192 -0
  875. package/dist/routes/v1/api/batch.js.map +1 -0
  876. package/dist/routes/v1/api/claims-read.d.ts +43 -0
  877. package/dist/routes/v1/api/claims-read.d.ts.map +1 -0
  878. package/dist/routes/v1/api/claims-read.js +123 -0
  879. package/dist/routes/v1/api/claims-read.js.map +1 -0
  880. package/dist/routes/v1/api/claims.d.ts +131 -0
  881. package/dist/routes/v1/api/claims.d.ts.map +1 -0
  882. package/dist/routes/v1/api/claims.js +407 -0
  883. package/dist/routes/v1/api/claims.js.map +1 -0
  884. package/dist/routes/v1/api/collections-link.d.ts +14 -0
  885. package/dist/routes/v1/api/collections-link.d.ts.map +1 -0
  886. package/dist/routes/v1/api/collections-link.js +97 -0
  887. package/dist/routes/v1/api/collections-link.js.map +1 -0
  888. package/dist/routes/v1/api/export.d.ts +48 -0
  889. package/dist/routes/v1/api/export.d.ts.map +1 -0
  890. package/dist/routes/v1/api/export.js +251 -0
  891. package/dist/routes/v1/api/export.js.map +1 -0
  892. package/dist/routes/v1/api/index.d.ts +16 -0
  893. package/dist/routes/v1/api/index.d.ts.map +1 -0
  894. package/dist/routes/v1/api/index.js +68 -0
  895. package/dist/routes/v1/api/index.js.map +1 -0
  896. package/dist/routes/v1/api/keys.d.ts +9 -0
  897. package/dist/routes/v1/api/keys.d.ts.map +1 -0
  898. package/dist/routes/v1/api/keys.js +95 -0
  899. package/dist/routes/v1/api/keys.js.map +1 -0
  900. package/dist/routes/v1/api/me.d.ts +21 -0
  901. package/dist/routes/v1/api/me.d.ts.map +1 -0
  902. package/dist/routes/v1/api/me.js +122 -0
  903. package/dist/routes/v1/api/me.js.map +1 -0
  904. package/dist/routes/v1/api/members.d.ts +17 -0
  905. package/dist/routes/v1/api/members.d.ts.map +1 -0
  906. package/dist/routes/v1/api/members.js +406 -0
  907. package/dist/routes/v1/api/members.js.map +1 -0
  908. package/dist/routes/v1/api/meta.d.ts +12 -0
  909. package/dist/routes/v1/api/meta.d.ts.map +1 -0
  910. package/dist/routes/v1/api/meta.js +59 -0
  911. package/dist/routes/v1/api/meta.js.map +1 -0
  912. package/dist/routes/v1/api/openapi.gen.d.ts +2 -0
  913. package/dist/routes/v1/api/openapi.gen.d.ts.map +1 -0
  914. package/dist/routes/v1/api/openapi.gen.js +7 -0
  915. package/dist/routes/v1/api/openapi.gen.js.map +1 -0
  916. package/dist/routes/v1/api/protocols.d.ts +22 -0
  917. package/dist/routes/v1/api/protocols.d.ts.map +1 -0
  918. package/dist/routes/v1/api/protocols.js +153 -0
  919. package/dist/routes/v1/api/protocols.js.map +1 -0
  920. package/dist/routes/v1/api/review-billing.d.ts +18 -0
  921. package/dist/routes/v1/api/review-billing.d.ts.map +1 -0
  922. package/dist/routes/v1/api/review-billing.js +196 -0
  923. package/dist/routes/v1/api/review-billing.js.map +1 -0
  924. package/dist/routes/v1/api/review.d.ts +30 -0
  925. package/dist/routes/v1/api/review.d.ts.map +1 -0
  926. package/dist/routes/v1/api/review.js +302 -0
  927. package/dist/routes/v1/api/review.js.map +1 -0
  928. package/dist/routes/v1/api/sources.d.ts +10 -0
  929. package/dist/routes/v1/api/sources.d.ts.map +1 -0
  930. package/dist/routes/v1/api/sources.js +293 -0
  931. package/dist/routes/v1/api/sources.js.map +1 -0
  932. package/dist/routes/v1/api/uploads.d.ts +37 -0
  933. package/dist/routes/v1/api/uploads.d.ts.map +1 -0
  934. package/dist/routes/v1/api/uploads.js +414 -0
  935. package/dist/routes/v1/api/uploads.js.map +1 -0
  936. package/dist/routes/v1/api/views.d.ts +18 -0
  937. package/dist/routes/v1/api/views.d.ts.map +1 -0
  938. package/dist/routes/v1/api/views.js +95 -0
  939. package/dist/routes/v1/api/views.js.map +1 -0
  940. package/dist/routes/v1/api/webhooks.d.ts +14 -0
  941. package/dist/routes/v1/api/webhooks.d.ts.map +1 -0
  942. package/dist/routes/v1/api/webhooks.js +282 -0
  943. package/dist/routes/v1/api/webhooks.js.map +1 -0
  944. package/dist/routes/v1/api/work-orders.d.ts +45 -0
  945. package/dist/routes/v1/api/work-orders.d.ts.map +1 -0
  946. package/dist/routes/v1/api/work-orders.js +171 -0
  947. package/dist/routes/v1/api/work-orders.js.map +1 -0
  948. package/dist/routes/v1/claims.d.ts +21 -0
  949. package/dist/routes/v1/claims.d.ts.map +1 -0
  950. package/dist/routes/v1/claims.js +153 -0
  951. package/dist/routes/v1/claims.js.map +1 -0
  952. package/dist/routes/v1/collections.d.ts +45 -0
  953. package/dist/routes/v1/collections.d.ts.map +1 -0
  954. package/dist/routes/v1/collections.js +201 -0
  955. package/dist/routes/v1/collections.js.map +1 -0
  956. package/dist/routes/v1/index.d.ts +13 -0
  957. package/dist/routes/v1/index.d.ts.map +1 -0
  958. package/dist/routes/v1/index.js +41 -0
  959. package/dist/routes/v1/index.js.map +1 -0
  960. package/dist/routes/v1/info.d.ts +14 -0
  961. package/dist/routes/v1/info.d.ts.map +1 -0
  962. package/dist/routes/v1/info.js +75 -0
  963. package/dist/routes/v1/info.js.map +1 -0
  964. package/dist/routes/v1/mcp/index.d.ts +33 -0
  965. package/dist/routes/v1/mcp/index.d.ts.map +1 -0
  966. package/dist/routes/v1/mcp/index.js +252 -0
  967. package/dist/routes/v1/mcp/index.js.map +1 -0
  968. package/dist/routes/v1/mcp/oauth.d.ts +27 -0
  969. package/dist/routes/v1/mcp/oauth.d.ts.map +1 -0
  970. package/dist/routes/v1/mcp/oauth.js +500 -0
  971. package/dist/routes/v1/mcp/oauth.js.map +1 -0
  972. package/dist/routes/v1/mcp/tools.d.ts +71 -0
  973. package/dist/routes/v1/mcp/tools.d.ts.map +1 -0
  974. package/dist/routes/v1/mcp/tools.js +432 -0
  975. package/dist/routes/v1/mcp/tools.js.map +1 -0
  976. package/dist/routes/v1/mcp/ui.d.ts +45 -0
  977. package/dist/routes/v1/mcp/ui.d.ts.map +1 -0
  978. package/dist/routes/v1/mcp/ui.js +454 -0
  979. package/dist/routes/v1/mcp/ui.js.map +1 -0
  980. package/dist/routes/v1/oauth.d.ts +29 -0
  981. package/dist/routes/v1/oauth.d.ts.map +1 -0
  982. package/dist/routes/v1/oauth.js +256 -0
  983. package/dist/routes/v1/oauth.js.map +1 -0
  984. package/dist/routes/v1/reviewers.d.ts +22 -0
  985. package/dist/routes/v1/reviewers.d.ts.map +1 -0
  986. package/dist/routes/v1/reviewers.js +165 -0
  987. package/dist/routes/v1/reviewers.js.map +1 -0
  988. package/dist/routes/v1/reviews.d.ts +38 -0
  989. package/dist/routes/v1/reviews.d.ts.map +1 -0
  990. package/dist/routes/v1/reviews.js +234 -0
  991. package/dist/routes/v1/reviews.js.map +1 -0
  992. package/dist/routes/v1/shared.d.ts +586 -0
  993. package/dist/routes/v1/shared.d.ts.map +1 -0
  994. package/dist/routes/v1/shared.js +229 -0
  995. package/dist/routes/v1/shared.js.map +1 -0
  996. package/dist/routes/well-known.d.ts +15 -0
  997. package/dist/routes/well-known.d.ts.map +1 -0
  998. package/dist/routes/well-known.js +35 -0
  999. package/dist/routes/well-known.js.map +1 -0
  1000. package/dist/runtime.d.ts +100 -0
  1001. package/dist/runtime.d.ts.map +1 -0
  1002. package/dist/runtime.js +144 -0
  1003. package/dist/runtime.js.map +1 -0
  1004. package/dist/testing/fake-tools.d.ts +104 -0
  1005. package/dist/testing/fake-tools.d.ts.map +1 -0
  1006. package/dist/testing/fake-tools.js +213 -0
  1007. package/dist/testing/fake-tools.js.map +1 -0
  1008. package/dist/testing/index.d.ts +54 -0
  1009. package/dist/testing/index.d.ts.map +1 -0
  1010. package/dist/testing/index.js +104 -0
  1011. package/dist/testing/index.js.map +1 -0
  1012. package/dist/testing/samples.d.ts +70 -0
  1013. package/dist/testing/samples.d.ts.map +1 -0
  1014. package/dist/testing/samples.js +92 -0
  1015. package/dist/testing/samples.js.map +1 -0
  1016. package/dist/workflows/claim-ingest.d.ts +250 -0
  1017. package/dist/workflows/claim-ingest.d.ts.map +1 -0
  1018. package/dist/workflows/claim-ingest.js +1020 -0
  1019. package/dist/workflows/claim-ingest.js.map +1 -0
  1020. package/dist/workflows/claim-source.d.ts +25 -0
  1021. package/dist/workflows/claim-source.d.ts.map +1 -0
  1022. package/dist/workflows/claim-source.js +107 -0
  1023. package/dist/workflows/claim-source.js.map +1 -0
  1024. package/dist/workflows/review-complete.d.ts +82 -0
  1025. package/dist/workflows/review-complete.d.ts.map +1 -0
  1026. package/dist/workflows/review-complete.js +455 -0
  1027. package/dist/workflows/review-complete.js.map +1 -0
  1028. package/dist/workflows/steps.d.ts +125 -0
  1029. package/dist/workflows/steps.d.ts.map +1 -0
  1030. package/dist/workflows/steps.js +325 -0
  1031. package/dist/workflows/steps.js.map +1 -0
  1032. package/docs/api.md +2595 -0
  1033. package/docs/guide.md +1525 -0
  1034. package/migrations/0000_init.sql +108 -0
  1035. package/migrations/0001_review_attestation.sql +1 -0
  1036. package/migrations/0002_decisions_facts.sql +1 -0
  1037. package/migrations/0003_api_lane.sql +171 -0
  1038. package/migrations/0004_api_v1_1.sql +19 -0
  1039. package/migrations/0005_member_notify.sql +3 -0
  1040. package/migrations/0006_source_collections.sql +16 -0
  1041. package/migrations/0007_api_settlement.sql +27 -0
  1042. package/migrations/0008_review_extend.sql +1 -0
  1043. package/migrations/0009_card_refunds.sql +4 -0
  1044. package/migrations/0010_even_scorpion.sql +16 -0
  1045. package/migrations/0011_mcp_oauth.sql +27 -0
  1046. package/migrations/0012_mcp_standing.sql +21 -0
  1047. package/migrations/0013_unknown_krista_starr.sql +2 -0
  1048. package/migrations/0014_last_carnage.sql +14 -0
  1049. package/migrations/0015_company_authority.sql +26 -0
  1050. package/migrations/0016_owner_only_links.sql +6 -0
  1051. package/migrations/0017_organisations.sql +35 -0
  1052. package/migrations/0018_remove_app_signed.sql +4 -0
  1053. package/migrations/0019_submitted_via.sql +2 -0
  1054. package/migrations/0020_drop_decision_to_pay.sql +4 -0
  1055. package/migrations/0021_manual_erase.sql +25 -0
  1056. package/migrations/0022_errored_facts.sql +1 -0
  1057. package/migrations/0023_review_billing.sql +20 -0
  1058. package/migrations/0024_pending_task_details.sql +1 -0
  1059. package/migrations/meta/0000_snapshot.json +707 -0
  1060. package/migrations/meta/0001_snapshot.json +714 -0
  1061. package/migrations/meta/0002_snapshot.json +721 -0
  1062. package/migrations/meta/0003_snapshot.json +1845 -0
  1063. package/migrations/meta/0004_snapshot.json +1969 -0
  1064. package/migrations/meta/0005_snapshot.json +1991 -0
  1065. package/migrations/meta/0006_snapshot.json +2097 -0
  1066. package/migrations/meta/0007_snapshot.json +2128 -0
  1067. package/migrations/meta/0008_snapshot.json +2133 -0
  1068. package/migrations/meta/0009_snapshot.json +2161 -0
  1069. package/migrations/meta/0010_snapshot.json +2265 -0
  1070. package/migrations/meta/0011_snapshot.json +2448 -0
  1071. package/migrations/meta/0012_snapshot.json +2577 -0
  1072. package/migrations/meta/0013_snapshot.json +2594 -0
  1073. package/migrations/meta/0014_snapshot.json +2602 -0
  1074. package/migrations/meta/0015_snapshot.json +2778 -0
  1075. package/migrations/meta/0016_snapshot.json +2778 -0
  1076. package/migrations/meta/0017_snapshot.json +2792 -0
  1077. package/migrations/meta/0018_snapshot.json +2778 -0
  1078. package/migrations/meta/0019_snapshot.json +2792 -0
  1079. package/migrations/meta/0020_snapshot.json +2785 -0
  1080. package/migrations/meta/0021_snapshot.json +2762 -0
  1081. package/migrations/meta/0022_snapshot.json +2769 -0
  1082. package/migrations/meta/0023_snapshot.json +2900 -0
  1083. package/migrations/meta/0024_snapshot.json +2907 -0
  1084. package/migrations/meta/_journal.json +181 -0
  1085. package/openapi/decision-api.yaml +12204 -0
  1086. package/package.json +123 -4
  1087. package/skills/README.md +19 -0
  1088. package/skills/add-openhands-support/SKILL.md +113 -0
  1089. package/skills/create-collection/SKILL.md +199 -0
  1090. package/skills/create-collection/reference/claims-stack.md +106 -0
  1091. package/skills/create-collection/reference/collection.md +111 -0
  1092. package/skills/create-oracle/SKILL.md +400 -0
  1093. package/skills/create-rubric/SKILL.md +130 -0
  1094. package/skills/create-rubric/reference/format-cheatsheet.md +186 -0
  1095. package/skills/create-rubric/templates/claim-form.example.json +60 -0
  1096. package/skills/decision-api-client/SKILL.md +236 -0
  1097. package/skills/decision-api-oracle/SKILL.md +336 -0
  1098. package/skills/publish-protocol/SKILL.md +151 -0
  1099. package/skills/publish-protocol/reference/publishing.md +116 -0
  1100. package/skills/reference/engine-contract.md +222 -0
  1101. package/skills/write-facts/SKILL.md +221 -0
  1102. package/skills/write-facts/reference/examples/http-vendor.ts +88 -0
  1103. package/skills/write-facts/reference/examples/price-matches-agreement.ts +67 -0
  1104. package/skills/write-facts/reference/facts-api.md +232 -0
  1105. package/templates/project/.dev.vars.example +93 -0
  1106. package/templates/project/.editorconfig +9 -0
  1107. package/templates/project/CLAUDE.md +45 -0
  1108. package/templates/project/README.md +199 -0
  1109. package/templates/project/biome.json +37 -0
  1110. package/templates/project/gitignore +29 -0
  1111. package/templates/project/package.json +32 -0
  1112. package/templates/project/src/facts/index.ts +19 -0
  1113. package/templates/project/src/index.ts +25 -0
  1114. package/templates/project/test/api-lane.test.ts +57 -0
  1115. package/templates/project/test/facts.test.ts +14 -0
  1116. package/templates/project/tsconfig.json +25 -0
  1117. package/templates/project/vitest.config.ts +13 -0
  1118. package/templates/project/wrangler.jsonc +446 -0
@@ -0,0 +1,336 @@
1
+ ---
2
+ name: decision-api-oracle
3
+ description: Use when setting up, deploying or testing a Decision API oracle (API_LANE on) — the shipment-delivery example on devnet (shipment-delivery-oracle.devnet.ixo.earth), or a provider turning the lane on for their own oracle — or when debugging one - a 401 on the console, PROTOCOL_NOT_ALLOWED, 503 payments-disabled, plan_inactive, an oracle the Decision Console does not list, member or review emails that never arrive.
4
+ ---
5
+
6
+ # A Decision API oracle, from nothing to a passing smoke
7
+
8
+ ## Overview
9
+
10
+ The Decision API (`API_LANE`) is an oracle's second intake: paid, off-chain claims over HTTP at
11
+ `/v1/api`, decided by the same engine, never written to chain. The oracle holds the sources, keys,
12
+ uploads, reviews and webhooks; the engine decides and bills per the oracle's **plan** (the Standard
13
+ plan from the moment it registers, unless IXO sets another);
14
+ the payments facilitator settles each claim in PAY; the Decision Console
15
+ (`decision-console.devnet.ixo.earth`) is the UI over all of it.
16
+
17
+ The worked run is **`examples/shipment-delivery`** in this package's repo — SwiftDrop Express, a
18
+ fictional last-mile courier with cash on delivery, IXO's devnet deployment at
19
+ `shipment-delivery-oracle.devnet.ixo.earth`. Its README has the outcome table, the demo orders API
20
+ and the courier demo page (`/courier`). A provider's own project (from
21
+ `decision-oracle init`) follows the same steps with their names. Where the example has a script the
22
+ template does not (`deploy:devnet`, an env-scoped `db:migrate:remote`, `bun run smoke`), the step
23
+ says **example** and gives the template's equivalent — use that in a provider's project.
24
+
25
+ **Core principle: every step is an action you perform, in this order.** Run the commands; don't
26
+ recite them. Steps only a human can do are marked **HUMAN** — say exactly what to do and wait.
27
+ **Anything that signs on chain or changes an identity (publish, `oracle init`, a key the oracle
28
+ already uses) is dry-run first, shown, and run with `--yes` only on the owner's explicit OK.**
29
+
30
+ ## When to use
31
+
32
+ - "Set up / deploy / test the Decision API example", "stand up shipment-delivery-oracle on devnet"
33
+ - A provider turning `API_LANE` on for their own oracle
34
+ - Any symptom in the troubleshooting table below
35
+
36
+ Not for: the chain lane's collections (`create-collection`), authoring a rubric (`create-rubric`),
37
+ writing handlers (`write-facts`).
38
+
39
+ ## The run — in order
40
+
41
+ Work from the project directory (`examples/shipment-delivery` for the example). `bunx decision-oracle`
42
+ is the package CLI.
43
+
44
+ ### 0. Prerequisites
45
+
46
+ ```bash
47
+ bunx wrangler whoami # the Cloudflare account that owns the ixo.earth zone
48
+ bunx decision-oracle login --network devnet # the OWNER's AuthHub session — once
49
+ ```
50
+
51
+ - `login` opens a browser: run it in the background and tell the human to finish there (**HUMAN**).
52
+ The session is the owner: it publishes the protocol, owns the oracle entity, and is the operator.
53
+ Put the session's OWN DID (`did:ixo:<address>` — `login` prints the address; the session file
54
+ `~/.ixo/publish-session-<network>.json` has the `did`) in `ORACLE_ADMIN_DIDS` in every `vars` block
55
+ of `wrangler.jsonc`. The example ships IXO's DID there — a copy of it must
56
+ replace it with the owner's.
57
+ - The account must hold the zone of the host (`*.ixo.earth` for IXO's deployments), or the Custom
58
+ Domain cannot attach. If `whoami` shows another account, stop and say so (**HUMAN**).
59
+
60
+ ### 1. The protocol (example: publish `protocol/`; a provider: their protocol's DID)
61
+
62
+ ```bash
63
+ bunx decision-oracle rubric validate --rubric protocol/rubric.json --form protocol/form.json
64
+ bunx decision-oracle publish-protocol --rubric protocol/rubric.json --form protocol/form.json --network devnet
65
+ ```
66
+
67
+ The second line is a dry run: show the plan, get the owner's OK, then re-run it with `--yes`. The
68
+ `publish-protocol` skill has the phases and failure modes. Then put the printed protocol DID in
69
+ `src/protocol.ts` (`SHIPMENT_PROTOCOL_DID = "did:ixo:entity:…"`) and keep whatever
70
+ `publish-protocol` left in `protocol/` — those are the anchored bytes. The rubric's four `ext`
71
+ sources share the endpoint `https://shipment-delivery-oracle.devnet.ixo.earth/demo/orders`: it
72
+ answers once step 5 deploys. Each is called with a UCAN from this oracle's did:web to the
73
+ endpoint's own did:web (`did:web:shipment-delivery-oracle.devnet.ixo.earth`), capability
74
+ `ixo:external-source` — the oracle never signs a capability the rubric names, and never an IXO
75
+ service's (`api.md`, "How an external source is called"). Check the work order:
76
+
77
+ ```bash
78
+ bunx decision-oracle protocol review <protocol did> --network devnet
79
+ ```
80
+
81
+ It must list `ext.orderKnown`, `ext.deliveryCodeValid`, `ext.cashReconciled`,
82
+ `ext.dropoffNearAddress` (custom — one group of ours), `ai.photoShowsDelivery`, `unique`,
83
+ `frequency`.
84
+
85
+ ### 2. Identity
86
+
87
+ Do `create-oracle` step 1 (two `derive --new` runs; relabel the first as `SERVICE_ED25519_MNEMONIC`;
88
+ the second is `ORACLE_SECP_MNEMONIC`) and step 6 (the owner's engine delegation), with:
89
+
90
+ - the three public lines (`ORACLE_ADDRESS`, `ORACLE_DID`, `ORACLE_MATRIX_USER_ID`) written into BOTH
91
+ the top-level and `env.devnet` `vars` of `wrangler.jsonc`;
92
+ - the delegation minted for THIS host:
93
+ `bunx decision-oracle delegation --for engine --audience did:web:decision-engine.devnet.ixo.earth --oracle did:web:shipment-delivery-oracle.devnet.ixo.earth --out owner-delegation.car --yes`.
94
+
95
+ An oracle that already has keys keeps them — replacing a live oracle's key is an identity change:
96
+ ask first. Never print a mnemonic or the CAR.
97
+
98
+ ### 3. Secrets
99
+
100
+ Write `.dev.vars.<env>` (git-ignored, like `.dev.vars`; the example's is `.dev.vars.devnet`) —
101
+ never echo a value to the terminal:
102
+
103
+ ```bash
104
+ {
105
+ grep -E '^(SERVICE_ED25519_MNEMONIC|ORACLE_SECP_MNEMONIC)=' .dev.vars
106
+ printf 'OWNER_DELEGATION_CAR="%s"\n' "$(cat owner-delegation.car)"
107
+ printf 'WEBHOOK_ENCRYPTION_KEY="%s"\n' "$(openssl rand -base64 32)"
108
+ printf 'UNIQUE_HMAC_KEY="%s"\n' "$(openssl rand -base64 32)"
109
+ } > .dev.vars.<env>
110
+ ```
111
+
112
+ The example's AI photo check runs on the Cloudflare AI Gateway (`AI_GATEWAY_ID` in
113
+ `wrangler.jsonc` + the `ai` binding — no secret; the account needs AI Gateway credits). Only with
114
+ `AI_PROVIDER=openrouter`: `OPENROUTER_API_KEY` — ask the owner for the key, **HUMAN**, and append it
115
+ the same way. Optional: `SENTRY_DSN`. `ORACLE_MATRIX_ACCESS_TOKEN` is required but
116
+ comes later — `oracle init` writes it (step 7).
117
+ `WEBHOOK_ENCRYPTION_KEY` and `UNIQUE_HMAC_KEY` are for life — generate them ONCE per deployment;
118
+ on an existing deployment, never regenerate (rotating strands every webhook secret / blinds the
119
+ duplicate registry). `.dev.vars` needs its own `WEBHOOK_ENCRYPTION_KEY` for `bun run dev`.
120
+
121
+ ### 4. Cloudflare resources
122
+
123
+ The example's names (a provider: their own, one set per env; `<env>` is the wrangler env you
124
+ deploy — `devnet` in the example, `testnet` / `production` in the template):
125
+
126
+ ```bash
127
+ bunx wrangler d1 create shipment-delivery-oracle-devnet # → env.<env> d1 database_id
128
+ bunx wrangler kv namespace create CACHE_KV --env devnet # → env.<env> kv id
129
+ bunx wrangler r2 bucket create shipment-delivery-oracle-uploads-devnet
130
+ ```
131
+
132
+ Paste each printed id over its placeholder in `env.<env>` (only there — the top level is local
133
+ dev). Then `bun run cf-typegen` and `bun run check`.
134
+
135
+ ### 5. Migrate and deploy
136
+
137
+ ```bash
138
+ bunx wrangler d1 migrations apply DB --remote --env <env> # BEFORE the first deploy
139
+ bunx wrangler deploy --env <env> --secrets-file .dev.vars.<env> # code + secrets in one version
140
+ curl -s https://<host>/.well-known/did.json
141
+ ```
142
+
143
+ **Example:** `bun run db:migrate:remote` and `bun run deploy:devnet -- --secrets-file
144
+ .dev.vars.devnet` are those two lines for `devnet`; also check the demo orders API and the
145
+ courier page answer (`curl -s https://shipment-delivery-oracle.devnet.ixo.earth/demo/orders/ORD-1-C`,
146
+ `/courier`). The template has no env-scoped migrate script — use the `wrangler` line.
147
+
148
+ Later deploys: `bunx wrangler deploy --env <env>` (secrets persist); one secret: `bunx wrangler
149
+ secret put <NAME> --env <env>`. The did.json `id` must be `did:web:<host>`.
150
+
151
+ ### 6. Engine registration — payable at once
152
+
153
+ ```bash
154
+ bunx decision-oracle engine register --env <env> --env-file .dev.vars.<env>
155
+ ```
156
+
157
+ It proves the oracle's address to the engine (ADR-36) with the owner's delegation and prints the
158
+ billing status. A 402 is the owner's credits: send them to the printed URL (**HUMAN**), then re-run.
159
+ If the engine already binds this did:web to a DIFFERENT address, it prints old → new and refuses:
160
+ that is an identity change — ask the owner before re-running with `--yes`.
161
+
162
+ Registering is the whole step for a provider: an oracle with no plan of its own runs at the
163
+ engine's **Standard** plan at once (payable in PAY, take 20%, paid to the owner's deed account,
164
+ listed in the Decision Console). Nothing to request. Done when the oracle appears in the engine's
165
+ `GET /v1/oracles` (the console's list).
166
+
167
+ **Example only (IXO's own oracles):** IXO staff switch the oracle to the IXO-owned plan in the
168
+ engine's admin plan editor (**HUMAN**, IXO staff) — the example's README names its terms. Done when
169
+ IXO confirms the oracle's plan version is > 0 (Standard is version 0).
170
+
171
+ ### 7. On chain — the full identity (mandatory, owner 2026-10-01)
172
+
173
+ Every oracle built with the kit has a full on-chain identity — the entity, its `#pro` profile, its
174
+ `#dmn` domain card and its `#acard` Agent Card (which lists the `decision-api` service at the lane's published
175
+ price) — even when the API lane is all it serves. **Required, not optional:** a deployed oracle
176
+ without `ORACLE_ENTITY_DID` fails `/health/ready` (its `identity` check). In order:
177
+
178
+ 1. Run `create-oracle` step 8 — `bunx decision-oracle oracle init --protocol <did> --kit-url https://shipment-delivery-oracle.devnet.ixo.earth --network devnet`
179
+ as a dry run, show the plan, and re-run the identical line with `--yes` only on the owner's OK.
180
+ `--logo <url>` is optional but recommended (without it the portal and the console show a
181
+ placeholder) — ask the owner for one.
182
+ 2. Pin the entity DID it prints as `ORACLE_ENTITY_DID` in `wrangler.jsonc` — the top-level `vars`
183
+ AND every `env.<name>.vars` (named envs don't inherit).
184
+ 3. `bunx wrangler secret put ORACLE_MATRIX_ACCESS_TOKEN --env <env>` with the value it wrote into
185
+ `.dev.vars` (never echo it), then redeploy (`bunx wrangler deploy --env <env>`).
186
+ 4. Verify: `curl -s https://<host>/v1/info` shows `entityDid` = that DID (not `null`), and
187
+ `curl -s https://<host>/health/ready` answers `{"ok":true}`.
188
+
189
+ The oracle is not done until readiness passes. A 503 there names nothing; the operator's
190
+ `GET /v1/admin/status` shows which check failed (`identity` carries the command to run).
191
+
192
+ ### 8. Operator: a source, its protocol, its billing, a key
193
+
194
+ The smoke (step 9) does all of this itself; for a real partner:
195
+
196
+ ```bash
197
+ K="--kit https://shipment-delivery-oracle.devnet.ixo.earth --network devnet"
198
+ bunx decision-oracle api source create --name "<partner>" --contact <email> --entity <org did> $K # as a controller of the org; pending-link; secret shown ONCE
199
+ bunx decision-oracle api admin protocols <sourceId> <protocol did> $K # dry run → --yes
200
+ bunx decision-oracle api admin billing-mode <sourceId> none $K # only for a partner who must not pay; dry run → --yes
201
+ bunx decision-oracle api key create --source <sourceId> --scopes claims:write,claims:read,webhooks:manage $K
202
+ bunx decision-oracle api review-billing enable --source <sourceId> $K # --cap <PAY> (default 1000); "Pay for reviews": as the org's CHAIN OWNER; dry run → --yes
203
+ bunx decision-oracle api review-billing status --source <sourceId> $K
204
+ bunx decision-oracle api review-billing disable --source <sourceId> $K # drop + revoke in the UCAN store; dry run → --yes
205
+ ```
206
+
207
+ `review-billing` exists only while IXO's plan bills the oracle's reviews per review (`/v1/info`
208
+ `reviewBilling.mode: "x402"`; `enable` refuses otherwise). The login must be the organisation's
209
+ owner on chain — the reviews come out of ITS credits — and `--cap` (PAY) is a lifetime total,
210
+ never refunded: raise it by running `enable` again with a higher `--cap`.
211
+
212
+ The source is `pending-link` (no keys, no claims) until a controller of the organisation signs its
213
+ `SourceCompanyLink`, PUTs it to the engine and syncs — the Decision Console's "add oracle" does all
214
+ three, and so does `bunx decision-oracle api source link <sourceId> --yes`. The session runs `source create` / `key create` only as a controller; the operator's own
215
+ session should not be one where its oracle's reviews matter (the engine refuses a review chain
216
+ through the oracle's owner).
217
+
218
+ A new source allows exactly the oracle's `supportedProtocols` (empty until step 1's DID is in
219
+ `src/protocol.ts` and deployed) — `admin protocols` REPLACES the list.
220
+
221
+ ### 9. Verify — the smoke (example)
222
+
223
+ The smoke is the example's (`scripts/smoke.ts`, over its protocol and fixtures); a provider's
224
+ project has none — verify theirs with step 8's key: `PUT /v1/api/uploads`, `POST /v1/api/claims`
225
+ with `Prefer: wait=60`, one claim per outcome their rubric can reach, and the review through the
226
+ console. An upload attachment carries the `cid` its upload returned —
227
+ `attachments[].{ question, uploadId, cid }`; accept refuses one without it or with another upload's.
228
+ For the example:
229
+
230
+ ```bash
231
+ bun run smoke -- --url https://shipment-delivery-oracle.devnet.ixo.earth \
232
+ [--entity <org did>] [--org-controller <key file|address>] [--reviewer <address>]
233
+ ```
234
+
235
+ Three people, three keys — never the same account twice:
236
+
237
+ - **the operator** (the AuthHub session, in `ORACLE_ADMIN_DIDS`): only the commercial terms —
238
+ `api admin billing-mode` and `api admin protocols`. It must NOT be the organisation's
239
+ controller or the reviewer: the engine refuses any review grant chain through the oracle's
240
+ identities, its owner included.
241
+ - **the organisation's controller** (`--org-controller`, a test account's key file or its address in
242
+ `~/.ixo/test-accounts-registry.json`; on devnet the default is SwiftDrop's admin Sara,
243
+ `~/.config/ixo-payouts/test-accounts/swiftdrop-sara.json`, controller of `--entity`'s default,
244
+ SwiftDrop's organisation `did:ixo:entity:2eeb3a4c03f3755872ada894734e47d2`): a source belongs to
245
+ an organisation (D10), so the controller creates it (`POST /v1/api/sources { entityDid }` →
246
+ `pending-link`), signs the `SourceCompanyLink` (kid = the did:key of the Ed25519 key on its IID,
247
+ canonical payload) and PUTs it to the ENGINE (`PUT /v1/sources/:oracleDid/:sourceId/company`,
248
+ UCAN `company/link`), syncs (`POST /v1/api/sources/:id/company/sync` → `active`), mints and
249
+ revokes the keys, and invites the reviewer. Its key needs no chain write: it already controls the
250
+ entity.
251
+ - **the reviewer** (`--reviewer`, from `~/.ixo/test-accounts.json`; default the network's first
252
+ account that is neither of the two — make one with the `ixo-test-account` skill): a MEMBER. The
253
+ controller invites it by DID with role `reviewer` and PUTs its role grant (≤ 30 days); the member
254
+ registers a `did:key` reviewer key, grants it `claims/review` on the source and answers through
255
+ the API with that two-link `reviewerGrant` (controller → member → key).
256
+
257
+ Every line `PASS`, then `ALL PASS`. It creates a free source (billing `none`), uploads the
258
+ fixtures, decides one stop per row of the example's outcome table (approve prepaid · approve COD ·
259
+ review cash short · review GPS far · partial refused · reject wrong code · reject unknown order ·
260
+ review reused photo, held on `unique:SD-DUP-1` with its `duplicates[]` naming the earlier claim ·
261
+ reject the same order claimed again by its courier (same `submitter`) · review dispatch down), answers the cash review (and the
262
+ claim-level `SD-RT-CHECKS` asked beside it) as a member does in the Decision Console (devnet's
263
+ reviewer is Dan — never an oracle operator's account, which the engine refuses in a reviewer grant), waits for the engine's fold (`decided partial`), walks
264
+ the rest of the surface, then revokes its keys and DELETEs its sources as the controller (`--keep`
265
+ keeps both). Each run spends ~13 engine decisions (and one review fold) of the owner's
266
+ credits. Then, on the owner's OK:
267
+
268
+ - `--frequency` — one courier over the daily limit (26 more decisions);
269
+ - `--paid` — one x402 claim paid from the session's own devnet deed. Needs a **subscription deed**
270
+ whose admin holds PAY and has granted the facilitator (`ixo173l540tvyu43ghmtstl2wu2lqztdt5e05e05c6`)
271
+ a `SendAuthorization` — the subscriptions service's devnet purchase / top-up does both (**HUMAN**
272
+ if absent). Check: `curl "https://devnet.ixo.earth/rest/cosmos/authz/v1beta1/grants?granter=<deed admin>&grantee=ixo173l540tvyu43ghmtstl2wu2lqztdt5e05e05c6&msg_type_url=/cosmos.bank.v1beta1.MsgSend"`.
273
+ Spends one decision price of PAY (60¢ in the example). The next SwiftDrop smoke after the
274
+ company-authority joint deploy runs with `--paid`.
275
+
276
+ ### 10. Verify — the six member / review emails
277
+
278
+ Needs `EMAIL_FROM_ADDRESS`'s domain onboarded to Cloudflare Email Service on the account
279
+ (dashboard → Email Service, **HUMAN** if not) and `CONSOLE_URL` set (every link is a console link).
280
+ With the owner's email as the test inbox, in the console (**HUMAN** clicks; you watch
281
+ `bunx wrangler tail <worker> --env <env>` for `email.*` lines):
282
+
283
+ | # | Email | Trigger |
284
+ | --- | --- | --- |
285
+ | 1 | "<inviter> invited you to <source>" | the owner invites a reviewer by email (Members → Invite) |
286
+ | 2 | "<member> accepted your invitation to <source>" | the invitee accepts — to the inviter (a source owner without a member email gets it at the source's contact) |
287
+ | 3 | "Your access to <source> is ready" | the acceptance grants the delegation — to the member |
288
+ | 4 | "Review needed: <protocol> claim for <source>" | a claim goes `pending_review` (example: a COD stop with the cash short, from the courier page's stop 4) — to each member with `claims/review`, an email and `notifyReviews` on |
289
+ | 5 | "<n> claims need your review for <source>" | a second review claim inside 15 min is held, then sent as one batch by the minute tick |
290
+ | 6 | "Still waiting" / "Two weeks waiting: …" | reminders at 3 and 14 days for an unanswered claim — confirm it is scheduled, don't wait |
291
+
292
+ ### 11. Payments on (a provider turning it on)
293
+
294
+ `API_PAYMENTS: "true"`, `X402_FACILITATOR_URL`, `X402_NETWORK` (`cosmos:devnet-1` / `cosmos:pandora-8`
295
+ / `cosmos:ixo-5`) and `EARNINGS_ADDRESS` (the operator's own `ixo1…`, each offer's `payTo`; unset ⇒ no PAY)
296
+ in the env's vars, a price (`pricing.api` in `defineOracle`, whole cents), and the
297
+ oracle registered with the engine (step 6) — the facilitator reads the oracle's terms from its plan
298
+ (Standard unless IXO set another). `API_PAYMENTS:
299
+ "false"` is the kill switch: new x402 submits answer 503 `payments-disabled`, `none` sources keep
300
+ deciding. The example's devnet env ships with payments on.
301
+
302
+ ### Pricing and card
303
+
304
+ The price per decision is `pricing.api` in `src/oracle.ts` (micro-USD, whole cents; `byProtocol` per
305
+ protocol), or the `API_PRICE_USD_CENTS` var when `pricing.api` is absent. Change it and redeploy;
306
+ the facilitator picks it up within ~5 min. **Card needs ≥ 50¢ per decision** (Stripe's minimum,
307
+ checked per claim), so a cheaper price offers PAY only. The example is 60¢ for that reason. The
308
+ Decision Console shows the price and card eligibility read-only.
309
+
310
+ ## Troubleshooting
311
+
312
+ | Symptom | Cause → fix |
313
+ | --- | --- |
314
+ | Console / CLI 401 `UNAUTHORIZED` on a UCAN call | audience mismatch: the invocation names the did:web read from `<host>/.well-known/did.json` — `ORACLE_HOSTNAME` must equal the Custom Domain, and `--kit` must be that host |
315
+ | Worker 500s on every request after deploy; logs say `WEBHOOK_ENCRYPTION_KEY: required when API_LANE is on` | the secret is missing in that env — `bunx wrangler secret put WEBHOOK_ENCRYPTION_KEY --env <env>` (for a new deployment only; never replace an existing one) |
316
+ | `PROTOCOL_NOT_ALLOWED` on submit | the source's allow-list lacks it — empty means NONE; `api admin protocols <src> <did> --yes` |
317
+ | 503 `SOURCE_PAUSED` `payments-disabled` | `API_PAYMENTS` is off and the source bills `x402` — turn payments on, or `api admin billing-mode <src> none` |
318
+ | 402 again after a `PAYMENT-SIGNATURE` | the facilitator refused the payer: no deed / no `SendAuthorization` / not enough PAY — the fresh 402's error says which |
319
+ | offers refused `plan_inactive`, `accepts: []` | the engine has nobody to pay: the oracle is not registered (step 6), or its owner has no oracle claims collection / deed account to receive the Standard payout (the owner's subscription sets that up — **HUMAN**); the refusal's reason says which |
320
+ | Not listed in the console | not registered with the engine (step 6), or not payable (the row above); or the host is not a `*.ixo.earth` Custom Domain; or `CORS_ORIGINS` lacks `https://decision-console.devnet.ixo.earth` |
321
+ | Every API claim rejects with `frequency` | the caller sends no `submitter` — an uncountable window fails closed; send the courier id |
322
+ | 409 `REVIEW_EXPIRED` on a review answer | the paid claim's `answerBy` (its x402 reservation's expiry: extended up to 30 days for the review, else 24 h after verify) has passed — it can no longer be paid, and nothing was written. Answer paid reviews before the date the emails state |
323
+ | Claims go `pending_review` on `SD-RT-CHECKS` (example) | an errored fact (onError `review`) held them for a person: the AI provider unavailable (the photo check — no gateway credits, or `OPENROUTER_API_KEY` missing on `openrouter`), or the orders endpoint unreachable (`DEMO_ORDERS` off, or an `ORD-…-E` order) — read the claim's report; fix it, and new claims decide again (the held ones are answered in the console). A rubric without a claim-level ReviewTask parks such claims `review` with NO task — give it one |
324
+ | `engine register` refuses: "registered … as <old> — this would re-bind it to <new>" | the did:web is bound to another key on the engine — the configured `ORACLE_SECP_MNEMONIC` is not the one it registered with. Restore the old key, or (owner's OK) `--yes` |
325
+ | No emails at all | the `EMAIL_FROM_ADDRESS` domain is not onboarded, or `CONSOLE_URL` is unset — the lane logs and skips |
326
+ | `engine register` 402 | the owner's credits — top up at the printed URL, re-run |
327
+ | `/health/ready` 503 while the worker otherwise serves | `GET /v1/admin/status` names the failed check; `identity` ⇒ no `ORACLE_ENTITY_DID` on a deployed host — finish step 7 (`oracle init`, pin it in every `vars` block, redeploy) |
328
+ | `engine register` fails resolving the did:web | the env is not deployed yet, or `--env <env>` was left off (it registered `localhost`) |
329
+
330
+ ## Output contract
331
+
332
+ Say plainly what is done and what is owed: the protocol DID and where it was written, the
333
+ worker's host and did:web, the oracle entity DID (`/v1/info` `entityDid`) and the `/health/ready`
334
+ answer, which ids and secrets were set (names only), the engine registration and
335
+ billing status, whether the oracle is listed/payable (for IXO's own: the plan version IXO confirmed), the smoke's last line and
336
+ any FAIL lines verbatim, the email rows seen, and every HUMAN step still open.
@@ -0,0 +1,151 @@
1
+ ---
2
+ name: publish-protocol
3
+ description: Use when a use case needs to become an on-chain IXO protocol — anchoring a new claim form (#vct) and rubric (#rub) as a protocol entity, adopting a protocol that already has its form by anchoring or replacing its rubric alone, sourcing its Matrix room, resuming a half-finished publish, or debugging IXO_ROOM_NOT_FOUND / a missing #rub on chain.
4
+ ---
5
+
6
+ # Publishing a protocol
7
+
8
+ ## Overview
9
+
10
+ A **protocol** is an on-chain IXO entity (`entityType: protocol/verifiableClaim`) carrying two
11
+ LinkedResources — the claim form (`#vct`, SurveyJS) and the rubric (`#rub`, the JSON-LD rulebook a
12
+ decision engine judges claims by) — plus a Matrix room the claim bot needs before it will accept
13
+ submissions against it. This skill composes two things:
14
+
15
+ - **`create-rubric`** authors and validates the form + rubric pair. The decision engine owns the
16
+ rubric format; `bunx decision-oracle rubric validate` is that engine over HTTP.
17
+ - **`bunx decision-oracle publish-protocol`** does the chain authoring: `MsgCreateEntity` → Matrix
18
+ upload → `MsgAddLinkedResource` (`#vct` + `#rub`) + `MsgAddService` → source the Matrix room.
19
+ Phases `entity` / `resources` / `room` (default `all`), resumable with `--entity <did> --phase <p>`.
20
+ Plus `rub`, which is a different job — see below.
21
+
22
+ There are two jobs here, and picking the wrong one fails on chain:
23
+
24
+ | You have | Run |
25
+ | --- | --- |
26
+ | Nothing yet — a form and a rubric to publish as a NEW protocol | `--phase all` (the pipeline below) |
27
+ | A protocol that ALREADY carries its form (`#vct`), yours or someone else's | `--phase rub` |
28
+
29
+ ## Safety — read before running anything
30
+
31
+ - **devnet is the only implicit network.** `--network` defaults to devnet; testnet/mainnet must be
32
+ named explicitly, never assumed.
33
+ - **Every chain write is a real signed transaction.** Every write goes through a confirm gate that
34
+ prints the exact plan (network, signer, messages, fee) and exits 0 without signing unless `--yes`
35
+ is passed. Run WITHOUT `--yes` first, show the printed plan to the user, and only re-run WITH
36
+ `--yes` after they explicitly say to proceed. These commands spend real funds (gas).
37
+ - **Signing is an AuthHub session, not a mnemonic.** `bunx decision-oracle login --network <n>` once —
38
+ it opens the login URL, waits for the callback, and saves a session under the user's home
39
+ directory. Every command after that reads it automatically. The session is also the Matrix
40
+ identity the `resources`/`room` phases use. Never ask anyone to paste a mnemonic or a session file
41
+ into a message.
42
+
43
+ ## When to use
44
+
45
+ - "Publish a protocol / anchor a claim form and rubric on chain / get a protocol DID"
46
+ - "Adopt this protocol" / "put my rubric on an existing protocol" / "publish a new version of the
47
+ rules" — the protocol already has its form, so only `#rub` changes: see `--phase rub` below
48
+ - Resuming a publish that stopped partway (an entity DID exists, resources or room don't)
49
+ - `IXO_ROOM_NOT_FOUND` from the claim bot, or Blocksync shows a protocol with no `#rub`
50
+
51
+ ## Pipeline
52
+
53
+ 1. **Author + validate FIRST — before any chain write.** With the `create-rubric` skill: author
54
+ `form.json` (from its `templates/claim-form.example.json`) and `rubric.json` per its interview,
55
+ leaving `claimSchema.protocol` / `proof` as `"TO-BE-SET-AFTER-ANCHORING"` — the `resources` phase
56
+ overwrites both with the real values once the form is uploaded. Then:
57
+
58
+ ```bash
59
+ bunx decision-oracle rubric validate --rubric rubric.json --form form.json
60
+ ```
61
+
62
+ Exit 0 is required before step 2 (a placeholder-proof warning is fine pre-anchoring); exit 2 is
63
+ the engine reporting bind issues. Never anchor around a validation failure. `publish-protocol`
64
+ runs the same validation itself before it writes anything — a second gate, for free.
65
+
66
+ 2. **Log in once, then publish.**
67
+
68
+ ```bash
69
+ bunx decision-oracle login --network devnet # only if there is no session for this network yet
70
+ bunx decision-oracle publish-protocol --rubric rubric.json --form form.json \
71
+ [--network devnet] [--phase entity|resources|room|all] [--entity <protocol did>] \
72
+ [--engine-url <url>] [--yes]
73
+ ```
74
+
75
+ A dry run (no `--yes`) prints the plan for every phase that would run. Get the user's explicit OK,
76
+ then re-run identically with `--yes` appended. `reference/publishing.md` has what each phase signs
77
+ and uploads, and its failure modes.
78
+
79
+ 3. **Hand off.** From the final published block, report: the protocol DID, the `#vct` proof, the
80
+ `#rub` proof (= the rubric's id, its sha256), the room id, and the next command:
81
+
82
+ ```bash
83
+ bunx decision-oracle create-deed --protocol <protocol did> --title "<deed name>"
84
+ ```
85
+
86
+ The `create-collection` skill takes it from there, on the same session. A protocol is only the
87
+ SCHEMA: claims are hosted by a DEED (a domain entity whose `linkedClaim` names the protocol), and
88
+ the collection is created on the deed — never on the protocol, or the portal answers "No claim
89
+ protocols are linked to this entity". `create-collection`'s `reference/claims-stack.md` has the
90
+ model.
91
+
92
+ ## Adopting a protocol that already has its form — `--phase rub`
93
+
94
+ Use this when the protocol EXISTS and carries a `#vct` already: IXO's own oracle-service-claim
95
+ protocols, a protocol published by a partner, or simply a second version of your own rules. Do NOT
96
+ reach for `--phase resources` — it re-anchors `#vct` too, and the chain refuses a linked-resource id
97
+ that already exists (`duplicated resource id`), so the whole transaction fails.
98
+
99
+ ```bash
100
+ bunx decision-oracle rubric fetch-form --protocol <protocol did> --out form.json # the live #vct
101
+ # author rubric.json against form.json with the create-rubric skill, then:
102
+ bunx decision-oracle rubric validate --rubric rubric.json --form form.json
103
+ bunx decision-oracle publish-protocol --phase rub --protocol <protocol did> \
104
+ --rubric rubric.json --form form.json [--network devnet] [--yes]
105
+ ```
106
+
107
+ What it does, and nothing else: uploads the rubric to the IXO Vault (else the IPFS gateway), then signs ONE transaction —
108
+ `MsgDeleteLinkedResource` + `MsgAddLinkedResource` when a `#rub` is already anchored, or just the
109
+ add when there is none. `--form` is still required because the rubric is validated against the real
110
+ form before anything is written; the rubric's `claimSchema` is repinned from the CHAIN's live `#vct`
111
+ proof (copied verbatim — on a portal-published protocol it is a CID, not a sha256).
112
+
113
+ Three things to expect:
114
+
115
+ - **It is idempotent.** If the anchored `#rub` proof already equals the id these bytes hash to, it
116
+ prints `already anchored` and does nothing — no upload, no transaction, no fee.
117
+ - **Only the protocol's owner can anchor.** If the session doesn't own it, the rubric is still
118
+ uploaded and the exact messages are printed, composed for the owner to broadcast. Send them those
119
+ lines; they sign them. (Same posture as `oracle init --phase backlink`.)
120
+ - **The room is not this command's business.** A protocol that already has claims already has its
121
+ room; `--phase rub` never touches it.
122
+
123
+ ## Interview slots
124
+
125
+ The interview belongs to `create-rubric` (step 1) — form, gates, thresholds, review, duplicates,
126
+ settlement. This skill itself asks exactly two things: **which network** (devnet is the only implicit
127
+ one), and **explicit go-ahead before any broadcast** (show the dry-run plan, then `--yes`).
128
+
129
+ ## Common mistakes
130
+
131
+ | Mistake | Fix |
132
+ | --- | --- |
133
+ | Anchoring bytes that were never validated | `rubric validate` first; a rubric that doesn't bind decides `unusable` in production |
134
+ | Re-formatting `rubric.json` after validating | the id is the sha256 of the bytes — anchor exactly what was validated |
135
+ | Filling in `claimSchema.protocol` / `proof` by hand before publishing | leave the placeholders; the `resources` phase patches the real values in |
136
+ | Running `--yes` on the first invocation | dry-run, show the plan, then confirm — every phase signs real transactions |
137
+ | Skipping the `room` phase | the claim bot answers `IXO_ROOM_NOT_FOUND` for every submission, though the entity looks complete |
138
+ | Creating the collection on the protocol | collections live on a DEED (`create-deed` → `create-collection`) |
139
+ | `--phase resources` on a protocol that already has a `#vct` | the chain refuses the duplicate id and the whole tx fails — use `--phase rub` |
140
+ | Using an oracle's Matrix token instead of the session | the room's invites must come from the entity owner's own Matrix user |
141
+
142
+ ## Output contract
143
+
144
+ The protocol DID, both proofs (`#vct` and `#rub` — the latter is the rubric's id), the room id, what
145
+ each phase actually signed, and the exact `create-deed` command to run next. Plus anything still
146
+ owed: a phase that failed, an un-invited bot, or a rubric change that would need re-anchoring.
147
+
148
+ ## Reference
149
+
150
+ `reference/publishing.md` — phase-by-phase detail (what each signs and uploads), resuming a partial
151
+ run, the Matrix identity rule, and the network endpoints.
@@ -0,0 +1,116 @@
1
+ # Publishing a protocol — phase reference
2
+
3
+ ## Login (once per network)
4
+
5
+ ```bash
6
+ bunx decision-oracle login --network devnet|testnet|mainnet
7
+ ```
8
+
9
+ PKCE (S256) + `state` against the ixo AuthHub for that network. It prints the login URL (and tries
10
+ to open it), then waits for EITHER a loopback callback on `http://localhost:8976/callback` OR a full
11
+ callback URL pasted into the terminal — whichever arrives first. The session is saved under the
12
+ user's home directory with mode 0600 and a warning printed: it is a bearer session signing key
13
+ (derived — the AuthHub root key never leaves the hub), so treat it like a password. Every other
14
+ command loads it automatically; there is no mnemonic anywhere in this flow.
15
+
16
+ ## Phases
17
+
18
+ ### `entity`
19
+
20
+ Signs `MsgCreateEntity` (`entityType: protocol/verifiableClaim`), then extracts the new
21
+ `did:ixo:entity:…` from the tx's events. If extraction fails the command exits non-zero even though
22
+ the tx landed — the entity exists on chain but its DID has to be found by hand (a Blocksync `entity`
23
+ query filtered by owner) before resuming. Skip this phase with `--entity <existing did>` to build
24
+ resources/room onto an entity created some other way, or by a previous run.
25
+
26
+ ### `resources`
27
+
28
+ Uploads `form.json` and a **patched** copy of `rubric.json` (its `claimSchema.protocol` / `proof` set
29
+ to the new entity DID and the form's own proof) to the IXO Vault as two separate uploads — gated by
30
+ one confirm, not a chain write so there is no fee line — then signs ONE tx with three messages:
31
+ `MsgAddLinkedResource #vct`, `MsgAddLinkedResource #rub`, `MsgAddService #matrix`. Requires
32
+ `--entity` when run standalone. The uploads are signed with the session's own Ed25519 key (a
33
+ one-write UCAN) and anchored by their public `<vfs>/public/cid/<cid>` URL; if the Vault refuses, the
34
+ CLI prints a `⚠` and stores them on the IXO IPFS gateway instead — nothing to configure.
35
+
36
+ ### `rub`
37
+
38
+ The adopt-an-existing-protocol phase, and the one phase `--phase all` never runs. Target it with
39
+ `--protocol <did>` (`--entity` works too — same flag, the other spelling):
40
+
41
+ ```bash
42
+ bunx decision-oracle publish-protocol --phase rub --protocol <did> \
43
+ --rubric rubric.json --form form.json [--network devnet] [--yes]
44
+ ```
45
+
46
+ 1. Resolves the protocol on Blocksync and reads its `#vct` proof. No `#vct` ⇒ refused: that is a
47
+ `resources` publish, not an adoption.
48
+ 2. Checks the rubric's `claimSchema` against that protocol DID and that proof **verbatim** — for a
49
+ protocol published through the portal the proof is the template lane's CID, not a sha256 of
50
+ `form.json`, and the engine string-compares it. A file that ALREADY pins both is anchored byte
51
+ for byte as written, so its id is the `sha256(raw file bytes)` that `rubric validate` printed.
52
+ Otherwise it is repinned and re-serialized (`JSON.stringify(doc, null, 2)`), and the id is the
53
+ sha256 of THOSE bytes. Either way that sha256 is the rubric's id and the `#rub` proof.
54
+ 3. Already anchored under that exact id ⇒ prints `already anchored` and stops. Nothing uploaded,
55
+ nothing signed.
56
+ 4. Uploads the patched rubric to the IXO Vault, else the IXO IPFS gateway (own confirm gate, no
57
+ fee line).
58
+ 5. Signs ONE tx: `MsgDeleteLinkedResource` + `MsgAddLinkedResource` when a `#rub` exists, else the
59
+ add alone. It has to be one tx — `MsgAddLinkedResource` is refused for an id that already exists
60
+ (`duplicated resource id`), and splitting it across two would leave the protocol with no rubric
61
+ in between. The delete names the resource id EXACTLY as the chain stores it: the unexpanded
62
+ `{id}#rub` literal Blocksync reports, never a rebuilt `did:…#rub`.
63
+
64
+ **Ownership.** The chain checks the signer against the DID's authentication relationship, so only
65
+ the protocol's owner can anchor. When the session is not the owner the messages are composed for the
66
+ owner, printed, and not broadcast — the upload has already happened, so all they have to do is sign
67
+ the printed lines. Same behaviour as `oracle init --phase backlink`.
68
+
69
+ `--form` stays required: it is what the engine's binder validates the rubric against before anything
70
+ is written. Get it with `rubric fetch-form --protocol <did> --out form.json`, which downloads the
71
+ live `#vct` bytes.
72
+
73
+ ### `room`
74
+
75
+ Sources the entity's Matrix room and invites the claim bot. Without it the claim bot answers every
76
+ submission with `IXO_ROOM_NOT_FOUND`, even though the entity and its resources are fully anchored.
77
+ Joins and invites as the session's Matrix user and mints its UCAN from the session's own signing
78
+ mnemonic — no Matrix-vault PIN, no separate room id or value pin.
79
+
80
+ ## Resuming a partial run
81
+
82
+ Every phase after `entity` needs an entity DID. If a run stopped after `entity` (or you are building
83
+ onto an entity made another way), pass `--entity <did>` and `--phase resources` (or `room`, or `all`
84
+ — the `entity` phase is a no-op when `--entity` is given). There is no state file; the whole resume
85
+ mechanism is that pair.
86
+
87
+ `rub` is not part of that sequence and never runs under `all` — it is the adoption path, not a step
88
+ of a publish.
89
+
90
+ ## Validation is not optional, and not re-implemented here
91
+
92
+ `publish-protocol` re-validates on every invocation before touching the chain, independent of
93
+ `--phase`, by asking the ENGINE to parse and bind the rubric against the form (the same call
94
+ `bunx decision-oracle rubric validate` makes; `--engine-url` overrides which engine). A rubric that fails
95
+ to bind is refused with the specific issues printed, never anchored. This package has no rubric
96
+ schema or binder of its own — the engine owns the format, and this is that same gate run a second
97
+ time.
98
+
99
+ ## Matrix identity — the session, and only the session
100
+
101
+ `room` needs a Matrix access token (the uploads do not — they go to the Vault). AuthHub hands back a Matrix mnemonic (alongside
102
+ the Matrix user id and homeserver), never a token; the CLI turns it into one exactly the way the
103
+ portal does on sign-in. One login per run, minted only after a phase has passed its confirm gate — a
104
+ dry run logs nobody in.
105
+
106
+ **It has to be this user.** The rooms bot invites the UCAN issuer — the session DID's Matrix user —
107
+ into the sourced room, and the claim-bot invite then sets power levels, so both must run as the
108
+ entity OWNER's account. An oracle's own bot token is a different user: the join fails
109
+ `M_FORBIDDEN You are not invited to this room` and leaves the room sourced but the claim bot
110
+ uninvited.
111
+
112
+ ## Network endpoints
113
+
114
+ `--network` (devnet by default) is the ONLY source of RPC / Blocksync / Matrix / AuthHub endpoints.
115
+ The session's homeserver is asserted equal to the network's, so a session logged in against another
116
+ network fails with a clear message rather than writing to the wrong chain.