@jinn-network/client 0.1.2 → 0.1.3-canary.262e5cda

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 (812) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/CONTRIBUTING.md +8 -2
  3. package/README.md +38 -14
  4. package/deployments/deployment-jinn-mvi-l1-sepolia-fast.json +36 -0
  5. package/deployments/deployment-jinn-mvi-l1-sepolia.json +36 -0
  6. package/deployments/deployment-jinn-mvi-l2-baseSepolia.json +12 -0
  7. package/deployments/deployment-phase1b-mech-baseSepolia-fast.json +3 -3
  8. package/deployments/deployment-stolas-l2-baseSepolia-fast.json +1 -1
  9. package/dist/adapters/adapter.d.ts +2 -2
  10. package/dist/adapters/claim-registry/client.d.ts +9 -0
  11. package/dist/adapters/claim-registry/client.js +22 -2
  12. package/dist/adapters/claim-registry/client.js.map +1 -1
  13. package/dist/adapters/local/adapter.d.ts +2 -2
  14. package/dist/adapters/local/adapter.js +8 -8
  15. package/dist/adapters/local/adapter.js.map +1 -1
  16. package/dist/adapters/mech/adapter.d.ts +3 -4
  17. package/dist/adapters/mech/adapter.js +86 -50
  18. package/dist/adapters/mech/adapter.js.map +1 -1
  19. package/dist/adapters/mech/contracts.d.ts +6 -4
  20. package/dist/adapters/mech/contracts.js +118 -14
  21. package/dist/adapters/mech/contracts.js.map +1 -1
  22. package/dist/adapters/mech/ipfs.d.ts +61 -6
  23. package/dist/adapters/mech/ipfs.js +159 -26
  24. package/dist/adapters/mech/ipfs.js.map +1 -1
  25. package/dist/adapters/mech/safe-revert.d.ts +39 -0
  26. package/dist/adapters/mech/safe-revert.js +130 -0
  27. package/dist/adapters/mech/safe-revert.js.map +1 -0
  28. package/dist/adapters/mech/safe.js +47 -21
  29. package/dist/adapters/mech/safe.js.map +1 -1
  30. package/dist/adapters/mech/types.d.ts +8 -0
  31. package/dist/adapters/mech/types.js.map +1 -1
  32. package/dist/agent/agent-ws.d.ts +55 -0
  33. package/dist/agent/agent-ws.js +288 -0
  34. package/dist/agent/agent-ws.js.map +1 -0
  35. package/dist/agent/auto-mode-detect.d.ts +6 -0
  36. package/dist/agent/auto-mode-detect.js +44 -0
  37. package/dist/agent/auto-mode-detect.js.map +1 -0
  38. package/dist/agent/operator-claude.d.ts +22 -0
  39. package/dist/agent/operator-claude.js +130 -0
  40. package/dist/agent/operator-claude.js.map +1 -0
  41. package/dist/api/admin-endpoint.d.ts +12 -0
  42. package/dist/api/admin-endpoint.js +71 -0
  43. package/dist/api/admin-endpoint.js.map +1 -0
  44. package/dist/api/bootstrap-endpoint.d.ts +16 -0
  45. package/dist/api/bootstrap-endpoint.js +78 -0
  46. package/dist/api/bootstrap-endpoint.js.map +1 -0
  47. package/dist/api/events-endpoint.d.ts +9 -0
  48. package/dist/api/events-endpoint.js +46 -0
  49. package/dist/api/events-endpoint.js.map +1 -0
  50. package/dist/api/fleet-build.d.ts +1 -1
  51. package/dist/api/fleet-build.js +17 -8
  52. package/dist/api/fleet-build.js.map +1 -1
  53. package/dist/api/gather-status.js +5 -1
  54. package/dist/api/gather-status.js.map +1 -1
  55. package/dist/api/handshake.d.ts +17 -0
  56. package/dist/api/handshake.js +28 -0
  57. package/dist/api/handshake.js.map +1 -0
  58. package/dist/api/peers.js +20 -5
  59. package/dist/api/peers.js.map +1 -1
  60. package/dist/api/portfolio-v0-build.d.ts +6 -0
  61. package/dist/api/portfolio-v0-build.js +6 -1
  62. package/dist/api/portfolio-v0-build.js.map +1 -1
  63. package/dist/api/rewards-build.js +3 -8
  64. package/dist/api/rewards-build.js.map +1 -1
  65. package/dist/api/server.d.ts +54 -0
  66. package/dist/api/server.js +239 -13
  67. package/dist/api/server.js.map +1 -1
  68. package/dist/api/setup-endpoints.d.ts +34 -0
  69. package/dist/api/setup-endpoints.js +188 -0
  70. package/dist/api/setup-endpoints.js.map +1 -0
  71. package/dist/api/status-build.d.ts +9 -1
  72. package/dist/api/status-build.js +44 -9
  73. package/dist/api/status-build.js.map +1 -1
  74. package/dist/api/status-rollup-build.d.ts +46 -1
  75. package/dist/api/status-rollup-build.js +168 -5
  76. package/dist/api/status-rollup-build.js.map +1 -1
  77. package/dist/api/ui-token.d.ts +5 -0
  78. package/dist/api/ui-token.js +36 -0
  79. package/dist/api/ui-token.js.map +1 -0
  80. package/dist/build-info.d.ts +32 -0
  81. package/dist/build-info.js +69 -0
  82. package/dist/build-info.js.map +1 -0
  83. package/dist/build-info.json +6 -0
  84. package/dist/build-meta.json +1 -1
  85. package/dist/cli/command.d.ts +9 -0
  86. package/dist/cli/commands/balance.d.ts +7 -0
  87. package/dist/cli/commands/balance.js +38 -32
  88. package/dist/cli/commands/balance.js.map +1 -1
  89. package/dist/cli/commands/bootstrap.d.ts +13 -1
  90. package/dist/cli/commands/bootstrap.js +150 -132
  91. package/dist/cli/commands/bootstrap.js.map +1 -1
  92. package/dist/cli/commands/claim-rewards.js +14 -2
  93. package/dist/cli/commands/claim-rewards.js.map +1 -1
  94. package/dist/cli/commands/conformance.d.ts +12 -0
  95. package/dist/cli/commands/conformance.js +140 -0
  96. package/dist/cli/commands/conformance.js.map +1 -0
  97. package/dist/cli/commands/create.d.ts +36 -0
  98. package/dist/cli/commands/create.js +374 -0
  99. package/dist/cli/commands/create.js.map +1 -0
  100. package/dist/cli/commands/doctor.d.ts +34 -1
  101. package/dist/cli/commands/doctor.js +136 -121
  102. package/dist/cli/commands/doctor.js.map +1 -1
  103. package/dist/cli/commands/fleet-scale.d.ts +19 -1
  104. package/dist/cli/commands/fleet-scale.js +379 -361
  105. package/dist/cli/commands/fleet-scale.js.map +1 -1
  106. package/dist/cli/commands/fleet.d.ts +7 -0
  107. package/dist/cli/commands/fleet.js +39 -33
  108. package/dist/cli/commands/fleet.js.map +1 -1
  109. package/dist/cli/commands/fund-requirements.d.ts +14 -1
  110. package/dist/cli/commands/fund-requirements.js +183 -174
  111. package/dist/cli/commands/fund-requirements.js.map +1 -1
  112. package/dist/cli/commands/history.d.ts +10 -1
  113. package/dist/cli/commands/history.js +66 -57
  114. package/dist/cli/commands/history.js.map +1 -1
  115. package/dist/cli/commands/impls.d.ts +18 -0
  116. package/dist/cli/commands/impls.js +208 -0
  117. package/dist/cli/commands/impls.js.map +1 -0
  118. package/dist/cli/commands/init.js +4 -1
  119. package/dist/cli/commands/init.js.map +1 -1
  120. package/dist/cli/commands/intents.js +13 -9
  121. package/dist/cli/commands/intents.js.map +1 -1
  122. package/dist/cli/commands/logs.d.ts +6 -1
  123. package/dist/cli/commands/logs.js +77 -70
  124. package/dist/cli/commands/logs.js.map +1 -1
  125. package/dist/cli/commands/migrate-agent-id.d.ts +26 -0
  126. package/dist/cli/commands/migrate-agent-id.js +165 -0
  127. package/dist/cli/commands/migrate-agent-id.js.map +1 -0
  128. package/dist/cli/commands/plug-ins.d.ts +34 -0
  129. package/dist/cli/commands/plug-ins.js +282 -0
  130. package/dist/cli/commands/plug-ins.js.map +1 -0
  131. package/dist/cli/commands/plugin-install.d.ts +10 -0
  132. package/dist/cli/commands/plugin-install.js +226 -14
  133. package/dist/cli/commands/plugin-install.js.map +1 -1
  134. package/dist/cli/commands/rewards.d.ts +7 -0
  135. package/dist/cli/commands/rewards.js +46 -40
  136. package/dist/cli/commands/rewards.js.map +1 -1
  137. package/dist/cli/commands/run.d.ts +14 -1
  138. package/dist/cli/commands/run.js +232 -90
  139. package/dist/cli/commands/run.js.map +1 -1
  140. package/dist/cli/commands/status.d.ts +10 -0
  141. package/dist/cli/commands/status.js +97 -34
  142. package/dist/cli/commands/status.js.map +1 -1
  143. package/dist/cli/commands/submit-intent.js +33 -6
  144. package/dist/cli/commands/submit-intent.js.map +1 -1
  145. package/dist/cli/commands/ui.js +45 -0
  146. package/dist/cli/commands/ui.js.map +1 -0
  147. package/dist/cli/commands/update.d.ts +5 -0
  148. package/dist/cli/commands/update.js +102 -97
  149. package/dist/cli/commands/update.js.map +1 -1
  150. package/dist/cli/commands/version.js +3 -1
  151. package/dist/cli/commands/version.js.map +1 -1
  152. package/dist/cli/commands/withdraw.d.ts +21 -1
  153. package/dist/cli/commands/withdraw.js +175 -159
  154. package/dist/cli/commands/withdraw.js.map +1 -1
  155. package/dist/cli/execution-context.d.ts +1 -1
  156. package/dist/cli/execution-context.js +2 -1
  157. package/dist/cli/execution-context.js.map +1 -1
  158. package/dist/cli/help.js +7 -0
  159. package/dist/cli/help.js.map +1 -1
  160. package/dist/cli/index.d.ts +7 -0
  161. package/dist/cli/index.js +18 -2
  162. package/dist/cli/index.js.map +1 -1
  163. package/dist/cli/intent-registry-access.d.ts +33 -1
  164. package/dist/cli/intent-registry-access.js +40 -2
  165. package/dist/cli/intent-registry-access.js.map +1 -1
  166. package/dist/cli/open-browser.d.ts +1 -0
  167. package/dist/cli/open-browser.js +18 -0
  168. package/dist/cli/open-browser.js.map +1 -0
  169. package/dist/cli/password.d.ts +3 -3
  170. package/dist/cli/password.js +5 -5
  171. package/dist/cli/password.js.map +1 -1
  172. package/dist/config.d.ts +883 -11
  173. package/dist/config.js +435 -4
  174. package/dist/config.js.map +1 -1
  175. package/dist/conformance/checks/artifacts.d.ts +37 -0
  176. package/dist/conformance/checks/artifacts.js +110 -0
  177. package/dist/conformance/checks/artifacts.js.map +1 -0
  178. package/dist/conformance/checks/envelope-schema.d.ts +17 -0
  179. package/dist/conformance/checks/envelope-schema.js +36 -0
  180. package/dist/conformance/checks/envelope-schema.js.map +1 -0
  181. package/dist/conformance/checks/hash-signature.d.ts +26 -0
  182. package/dist/conformance/checks/hash-signature.js +70 -0
  183. package/dist/conformance/checks/hash-signature.js.map +1 -0
  184. package/dist/conformance/checks/payload.d.ts +19 -0
  185. package/dist/conformance/checks/payload.js +52 -0
  186. package/dist/conformance/checks/payload.js.map +1 -0
  187. package/dist/conformance/checks/secret-scrub.d.ts +33 -0
  188. package/dist/conformance/checks/secret-scrub.js +118 -0
  189. package/dist/conformance/checks/secret-scrub.js.map +1 -0
  190. package/dist/conformance/checks/source-runtime.d.ts +43 -0
  191. package/dist/conformance/checks/source-runtime.js +68 -0
  192. package/dist/conformance/checks/source-runtime.js.map +1 -0
  193. package/dist/conformance/checks/source-static.d.ts +61 -0
  194. package/dist/conformance/checks/source-static.js +311 -0
  195. package/dist/conformance/checks/source-static.js.map +1 -0
  196. package/dist/conformance/checks/trajectory-chain.d.ts +18 -0
  197. package/dist/conformance/checks/trajectory-chain.js +51 -0
  198. package/dist/conformance/checks/trajectory-chain.js.map +1 -0
  199. package/dist/conformance/checks/trajectory-profile.d.ts +17 -0
  200. package/dist/conformance/checks/trajectory-profile.js +51 -0
  201. package/dist/conformance/checks/trajectory-profile.js.map +1 -0
  202. package/dist/conformance/checks/trajectory-schema.d.ts +20 -0
  203. package/dist/conformance/checks/trajectory-schema.js +40 -0
  204. package/dist/conformance/checks/trajectory-schema.js.map +1 -0
  205. package/dist/conformance/checks/verdict.d.ts +44 -0
  206. package/dist/conformance/checks/verdict.js +122 -0
  207. package/dist/conformance/checks/verdict.js.map +1 -0
  208. package/dist/conformance/harness.d.ts +32 -0
  209. package/dist/conformance/harness.js +228 -0
  210. package/dist/conformance/harness.js.map +1 -0
  211. package/dist/conformance/types.d.ts +88 -0
  212. package/dist/conformance/types.js +31 -0
  213. package/dist/conformance/types.js.map +1 -0
  214. package/dist/corpus/acquire.d.ts +37 -0
  215. package/dist/corpus/acquire.js +155 -0
  216. package/dist/corpus/acquire.js.map +1 -0
  217. package/dist/corpus/cache.d.ts +14 -0
  218. package/dist/corpus/cache.js +18 -0
  219. package/dist/corpus/cache.js.map +1 -0
  220. package/dist/corpus/fetch.d.ts +9 -0
  221. package/dist/corpus/fetch.js +24 -0
  222. package/dist/corpus/fetch.js.map +1 -0
  223. package/dist/corpus/index.d.ts +16 -0
  224. package/dist/corpus/index.js +78 -0
  225. package/dist/corpus/index.js.map +1 -0
  226. package/dist/corpus/query.d.ts +17 -0
  227. package/dist/corpus/query.js +108 -0
  228. package/dist/corpus/query.js.map +1 -0
  229. package/dist/corpus/route-resolver.d.ts +16 -0
  230. package/dist/corpus/route-resolver.js +20 -0
  231. package/dist/corpus/route-resolver.js.map +1 -0
  232. package/dist/corpus/types.d.ts +107 -0
  233. package/dist/corpus/types.js +50 -0
  234. package/dist/corpus/types.js.map +1 -0
  235. package/dist/daemon/balance-topup-loop.js +2 -1
  236. package/dist/daemon/balance-topup-loop.js.map +1 -1
  237. package/dist/daemon/creator.d.ts +2 -2
  238. package/dist/daemon/creator.js +2 -2
  239. package/dist/daemon/creator.js.map +1 -1
  240. package/dist/daemon/daemon.d.ts +70 -15
  241. package/dist/daemon/daemon.js +159 -41
  242. package/dist/daemon/daemon.js.map +1 -1
  243. package/dist/daemon/delivery-watcher.js +31 -1
  244. package/dist/daemon/delivery-watcher.js.map +1 -1
  245. package/dist/daemon/jinn-claim-loop-canonical.d.ts +207 -0
  246. package/dist/daemon/jinn-claim-loop-canonical.js +296 -0
  247. package/dist/daemon/jinn-claim-loop-canonical.js.map +1 -0
  248. package/dist/daemon/jinn-claim-loop-mock.d.ts +61 -0
  249. package/dist/daemon/jinn-claim-loop-mock.js +122 -0
  250. package/dist/daemon/jinn-claim-loop-mock.js.map +1 -0
  251. package/dist/daemon/jinn-claim-loop.d.ts +123 -0
  252. package/dist/daemon/jinn-claim-loop.js +256 -0
  253. package/dist/daemon/jinn-claim-loop.js.map +1 -0
  254. package/dist/daemon/reward-claim-loop.d.ts +2 -0
  255. package/dist/daemon/reward-claim-loop.js +32 -27
  256. package/dist/daemon/reward-claim-loop.js.map +1 -1
  257. package/dist/dashboard/assets/index-Bxlk5qpa.js +68 -0
  258. package/dist/dashboard/assets/index-DQ3u_vP5.css +32 -0
  259. package/dist/dashboard/index.html +18 -74
  260. package/dist/earning/agent-wallet-binding.d.ts +133 -0
  261. package/dist/earning/agent-wallet-binding.js +202 -0
  262. package/dist/earning/agent-wallet-binding.js.map +1 -0
  263. package/dist/earning/bootstrap.d.ts +64 -0
  264. package/dist/earning/bootstrap.js +325 -32
  265. package/dist/earning/bootstrap.js.map +1 -1
  266. package/dist/earning/contracts.d.ts +323 -0
  267. package/dist/earning/contracts.js +276 -0
  268. package/dist/earning/contracts.js.map +1 -1
  269. package/dist/earning/funding-plan.d.ts +90 -0
  270. package/dist/earning/funding-plan.js +203 -0
  271. package/dist/earning/funding-plan.js.map +1 -0
  272. package/dist/earning/migrate-agent-id.d.ts +130 -0
  273. package/dist/earning/migrate-agent-id.js +257 -0
  274. package/dist/earning/migrate-agent-id.js.map +1 -0
  275. package/dist/earning/orphan-sweep.d.ts +14 -0
  276. package/dist/earning/orphan-sweep.js +63 -2
  277. package/dist/earning/orphan-sweep.js.map +1 -1
  278. package/dist/earning/reconcile.d.ts +2 -0
  279. package/dist/earning/reconcile.js +30 -0
  280. package/dist/earning/reconcile.js.map +1 -1
  281. package/dist/earning/stolas-claim.d.ts +86 -6
  282. package/dist/earning/stolas-claim.js +123 -9
  283. package/dist/earning/stolas-claim.js.map +1 -1
  284. package/dist/earning/store.d.ts +39 -0
  285. package/dist/earning/store.js +72 -1
  286. package/dist/earning/store.js.map +1 -1
  287. package/dist/earning/testnet-setup-migration.d.ts +32 -0
  288. package/dist/earning/testnet-setup-migration.js +214 -0
  289. package/dist/earning/testnet-setup-migration.js.map +1 -0
  290. package/dist/earning/types.d.ts +53 -9
  291. package/dist/earning/types.js +51 -2
  292. package/dist/earning/types.js.map +1 -1
  293. package/dist/earning/viem-clients.d.ts +20 -0
  294. package/dist/earning/viem-clients.js +32 -1
  295. package/dist/earning/viem-clients.js.map +1 -1
  296. package/dist/erc8004/abis.d.ts +381 -0
  297. package/dist/erc8004/abis.js +238 -0
  298. package/dist/erc8004/abis.js.map +1 -0
  299. package/dist/erc8004/addresses.d.ts +40 -0
  300. package/dist/erc8004/addresses.js +64 -0
  301. package/dist/erc8004/addresses.js.map +1 -0
  302. package/dist/erc8004/identity.d.ts +202 -0
  303. package/dist/erc8004/identity.js +305 -0
  304. package/dist/erc8004/identity.js.map +1 -0
  305. package/dist/erc8004/index.d.ts +13 -0
  306. package/dist/erc8004/index.js +20 -0
  307. package/dist/erc8004/index.js.map +1 -0
  308. package/dist/erc8004/reputation.d.ts +349 -0
  309. package/dist/erc8004/reputation.js +464 -0
  310. package/dist/erc8004/reputation.js.map +1 -0
  311. package/dist/erc8004/subgraph.d.ts +46 -0
  312. package/dist/erc8004/subgraph.js +37 -0
  313. package/dist/erc8004/subgraph.js.map +1 -0
  314. package/dist/erc8004/validation.d.ts +145 -0
  315. package/dist/erc8004/validation.js +219 -0
  316. package/dist/erc8004/validation.js.map +1 -0
  317. package/dist/errors/persisted-bootstrap-error.d.ts +4 -0
  318. package/dist/errors/persisted-bootstrap-error.js +50 -0
  319. package/dist/errors/persisted-bootstrap-error.js.map +1 -0
  320. package/dist/events/emitter.d.ts +12 -0
  321. package/dist/events/emitter.js +23 -0
  322. package/dist/events/emitter.js.map +1 -0
  323. package/dist/events/ring-buffer.d.ts +25 -0
  324. package/dist/events/ring-buffer.js +46 -0
  325. package/dist/events/ring-buffer.js.map +1 -0
  326. package/dist/events/types.d.ts +42 -0
  327. package/dist/events/types.js +28 -0
  328. package/dist/events/types.js.map +1 -0
  329. package/dist/index.d.ts +1 -1
  330. package/dist/intents/kinds/index.d.ts +10 -0
  331. package/dist/intents/kinds/index.js +7 -0
  332. package/dist/intents/kinds/index.js.map +1 -1
  333. package/dist/intents/kinds/learner-loop-test.d.ts +2 -0
  334. package/dist/intents/kinds/learner-loop-test.js +39 -0
  335. package/dist/intents/kinds/learner-loop-test.js.map +1 -0
  336. package/dist/intents/kinds/prediction-apy-v0.js +5 -1
  337. package/dist/intents/kinds/prediction-apy-v0.js.map +1 -1
  338. package/dist/intents/kinds/prediction-v0.js +5 -0
  339. package/dist/intents/kinds/prediction-v0.js.map +1 -1
  340. package/dist/intents/kinds/spec-kind.d.ts +18 -1
  341. package/dist/intents/posting-service.d.ts +3 -5
  342. package/dist/intents/posting-service.js +16 -50
  343. package/dist/intents/posting-service.js.map +1 -1
  344. package/dist/intents/prediction-apy-v0-auto.d.ts +12 -2
  345. package/dist/intents/prediction-apy-v0-auto.js +27 -2
  346. package/dist/intents/prediction-apy-v0-auto.js.map +1 -1
  347. package/dist/intents/prediction-v0-auto.d.ts +14 -4
  348. package/dist/intents/prediction-v0-auto.js +29 -5
  349. package/dist/intents/prediction-v0-auto.js.map +1 -1
  350. package/dist/intents/signing.d.ts +13 -0
  351. package/dist/intents/signing.js +27 -0
  352. package/dist/intents/signing.js.map +1 -0
  353. package/dist/intents/sources.d.ts +12 -5
  354. package/dist/intents/sources.js +11 -11
  355. package/dist/intents/sources.js.map +1 -1
  356. package/dist/main.d.ts +5 -2
  357. package/dist/main.js +792 -66
  358. package/dist/main.js.map +1 -1
  359. package/dist/mcp/acquire-artifact.d.ts +39 -0
  360. package/dist/mcp/acquire-artifact.js +163 -0
  361. package/dist/mcp/acquire-artifact.js.map +1 -0
  362. package/dist/mcp/operator-server.d.ts +20 -3
  363. package/dist/mcp/operator-server.js +500 -25
  364. package/dist/mcp/operator-server.js.map +1 -1
  365. package/dist/mcp/search-artifacts.d.ts +31 -0
  366. package/dist/mcp/search-artifacts.js +40 -0
  367. package/dist/mcp/search-artifacts.js.map +1 -0
  368. package/dist/mcp/server.js +103 -58
  369. package/dist/mcp/server.js.map +1 -1
  370. package/dist/observability/emit-event.d.ts +1 -1
  371. package/dist/observability/emit-event.js.map +1 -1
  372. package/dist/operator-errors.js +4 -5
  373. package/dist/operator-errors.js.map +1 -1
  374. package/dist/preflight/claude-auth.d.ts +11 -11
  375. package/dist/preflight/claude-auth.js +18 -32
  376. package/dist/preflight/claude-auth.js.map +1 -1
  377. package/dist/restorer/capability/index.d.ts +82 -0
  378. package/dist/restorer/capability/index.js +12 -0
  379. package/dist/restorer/capability/index.js.map +1 -0
  380. package/dist/restorer/capability/scoped-rpc.d.ts +12 -0
  381. package/dist/restorer/capability/scoped-rpc.js +34 -0
  382. package/dist/restorer/capability/scoped-rpc.js.map +1 -0
  383. package/dist/restorer/capability/scoped-secrets.d.ts +8 -0
  384. package/dist/restorer/capability/scoped-secrets.js +10 -0
  385. package/dist/restorer/capability/scoped-secrets.js.map +1 -0
  386. package/dist/restorer/capability/scoped-signer.d.ts +46 -0
  387. package/dist/restorer/capability/scoped-signer.js +73 -0
  388. package/dist/restorer/capability/scoped-signer.js.map +1 -0
  389. package/dist/restorer/engine/canonical-json.d.ts +0 -17
  390. package/dist/restorer/engine/canonical-json.js +56 -49
  391. package/dist/restorer/engine/canonical-json.js.map +1 -1
  392. package/dist/restorer/engine/claim.js +8 -1
  393. package/dist/restorer/engine/claim.js.map +1 -1
  394. package/dist/restorer/engine/delivery.d.ts +2 -0
  395. package/dist/restorer/engine/delivery.js +2 -2
  396. package/dist/restorer/engine/delivery.js.map +1 -1
  397. package/dist/restorer/engine/engine.d.ts +143 -26
  398. package/dist/restorer/engine/engine.js +485 -104
  399. package/dist/restorer/engine/engine.js.map +1 -1
  400. package/dist/restorer/engine/envelope-assembly.d.ts +65 -0
  401. package/dist/restorer/engine/envelope-assembly.js +60 -0
  402. package/dist/restorer/engine/envelope-assembly.js.map +1 -0
  403. package/dist/restorer/engine/packaging.d.ts +30 -30
  404. package/dist/restorer/engine/packaging.js +73 -47
  405. package/dist/restorer/engine/packaging.js.map +1 -1
  406. package/dist/restorer/engine/persistence.d.ts +7 -7
  407. package/dist/restorer/engine/persistence.js +4 -4
  408. package/dist/restorer/engine/persistence.js.map +1 -1
  409. package/dist/restorer/engine/registry.d.ts +24 -13
  410. package/dist/restorer/engine/registry.js +16 -13
  411. package/dist/restorer/engine/registry.js.map +1 -1
  412. package/dist/restorer/engine/validate-manifest.d.ts +23 -0
  413. package/dist/restorer/engine/validate-manifest.js +49 -0
  414. package/dist/restorer/engine/validate-manifest.js.map +1 -0
  415. package/dist/restorer/engine/verification-stub.d.ts +18 -0
  416. package/dist/restorer/engine/verification-stub.js +18 -0
  417. package/dist/restorer/engine/verification-stub.js.map +1 -0
  418. package/dist/restorer/external-impls/index.d.ts +3 -0
  419. package/dist/restorer/external-impls/index.js +2 -0
  420. package/dist/restorer/external-impls/index.js.map +1 -0
  421. package/dist/restorer/external-impls/loader.d.ts +49 -0
  422. package/dist/restorer/external-impls/loader.js +138 -0
  423. package/dist/restorer/external-impls/loader.js.map +1 -0
  424. package/dist/restorer/external-impls/package-hash.d.ts +26 -0
  425. package/dist/restorer/external-impls/package-hash.js +102 -0
  426. package/dist/restorer/external-impls/package-hash.js.map +1 -0
  427. package/dist/restorer/external-impls/types.d.ts +42 -0
  428. package/dist/restorer/external-impls/types.js +10 -0
  429. package/dist/restorer/external-impls/types.js.map +1 -0
  430. package/dist/restorer/impls/claude-code-learner/adapters/claude-code.d.ts +38 -0
  431. package/dist/restorer/impls/claude-code-learner/adapters/claude-code.js +200 -0
  432. package/dist/restorer/impls/claude-code-learner/adapters/claude-code.js.map +1 -0
  433. package/dist/restorer/impls/claude-code-learner/harvest.d.ts +19 -0
  434. package/dist/restorer/impls/claude-code-learner/harvest.js +146 -0
  435. package/dist/restorer/impls/claude-code-learner/harvest.js.map +1 -0
  436. package/dist/restorer/impls/claude-code-learner/index.d.ts +15 -0
  437. package/dist/restorer/impls/claude-code-learner/index.js +14 -0
  438. package/dist/restorer/impls/claude-code-learner/index.js.map +1 -0
  439. package/dist/restorer/impls/claude-code-learner/mcp-config.d.ts +48 -0
  440. package/dist/restorer/impls/claude-code-learner/mcp-config.js +52 -0
  441. package/dist/restorer/impls/claude-code-learner/mcp-config.js.map +1 -0
  442. package/dist/restorer/impls/claude-code-learner/plugin-path.d.ts +14 -0
  443. package/dist/restorer/impls/claude-code-learner/plugin-path.js +30 -0
  444. package/dist/restorer/impls/claude-code-learner/plugin-path.js.map +1 -0
  445. package/dist/restorer/impls/claude-code-learner/restorer.d.ts +38 -0
  446. package/dist/restorer/impls/claude-code-learner/restorer.js +73 -0
  447. package/dist/restorer/impls/claude-code-learner/restorer.js.map +1 -0
  448. package/dist/restorer/impls/claude-code-learner/test-utils/fake-plugin-outputs.d.ts +19 -0
  449. package/dist/restorer/impls/claude-code-learner/test-utils/fake-plugin-outputs.js +111 -0
  450. package/dist/restorer/impls/claude-code-learner/test-utils/fake-plugin-outputs.js.map +1 -0
  451. package/dist/restorer/impls/claude-code-learner/test-utils/noop-adapter.d.ts +22 -0
  452. package/dist/restorer/impls/claude-code-learner/test-utils/noop-adapter.js +35 -0
  453. package/dist/restorer/impls/claude-code-learner/test-utils/noop-adapter.js.map +1 -0
  454. package/dist/restorer/impls/claude-code-learner/test-utils/synthetic-session.d.ts +20 -0
  455. package/dist/restorer/impls/claude-code-learner/test-utils/synthetic-session.js +34 -0
  456. package/dist/restorer/impls/claude-code-learner/test-utils/synthetic-session.js.map +1 -0
  457. package/dist/restorer/impls/claude-code-learner/types.d.ts +99 -0
  458. package/dist/restorer/impls/claude-code-learner/types.js +2 -0
  459. package/dist/restorer/impls/claude-code-learner/types.js.map +1 -0
  460. package/dist/restorer/impls/claude-code-learner/wrapper.d.ts +49 -0
  461. package/dist/restorer/impls/claude-code-learner/wrapper.js +144 -0
  462. package/dist/restorer/impls/claude-code-learner/wrapper.js.map +1 -0
  463. package/dist/restorer/impls/claude-mcp-hyperliquid/index.d.ts +2 -2
  464. package/dist/restorer/impls/claude-mcp-hyperliquid/index.js +2 -2
  465. package/dist/restorer/impls/claude-mcp-hyperliquid/index.js.map +1 -1
  466. package/dist/restorer/impls/claude-mcp-hyperliquid/session-orchestrator.d.ts +7 -0
  467. package/dist/restorer/impls/claude-mcp-hyperliquid/session-orchestrator.js +38 -0
  468. package/dist/restorer/impls/claude-mcp-hyperliquid/session-orchestrator.js.map +1 -1
  469. package/dist/restorer/impls/claude-mcp-prediction/index.d.ts +2 -2
  470. package/dist/restorer/impls/claude-mcp-prediction/index.js +12 -2
  471. package/dist/restorer/impls/claude-mcp-prediction/index.js.map +1 -1
  472. package/dist/restorer/impls/claude-mcp-prediction/session-orchestrator.d.ts +9 -2
  473. package/dist/restorer/impls/claude-mcp-prediction/session-orchestrator.js +9 -125
  474. package/dist/restorer/impls/claude-mcp-prediction/session-orchestrator.js.map +1 -1
  475. package/dist/restorer/impls/claude-mcp-prediction-apy/index.d.ts +2 -2
  476. package/dist/restorer/impls/claude-mcp-prediction-apy/index.js +9 -2
  477. package/dist/restorer/impls/claude-mcp-prediction-apy/index.js.map +1 -1
  478. package/dist/restorer/impls/claude-mcp-prediction-apy/session-orchestrator.d.ts +10 -0
  479. package/dist/restorer/impls/claude-mcp-prediction-apy/session-orchestrator.js +10 -119
  480. package/dist/restorer/impls/claude-mcp-prediction-apy/session-orchestrator.js.map +1 -1
  481. package/dist/restorer/impls/claude-mcp-shared/single-session-orchestrator.d.ts +84 -0
  482. package/dist/restorer/impls/claude-mcp-shared/single-session-orchestrator.js +206 -0
  483. package/dist/restorer/impls/claude-mcp-shared/single-session-orchestrator.js.map +1 -0
  484. package/dist/restorer/impls/evaluation-context.d.ts +11 -4
  485. package/dist/restorer/impls/evaluation-context.js +9 -2
  486. package/dist/restorer/impls/evaluation-context.js.map +1 -1
  487. package/dist/restorer/impls/index.d.ts +46 -1
  488. package/dist/restorer/impls/index.js +38 -0
  489. package/dist/restorer/impls/index.js.map +1 -1
  490. package/dist/restorer/impls/legacy-claude/index.d.ts +13 -1
  491. package/dist/restorer/impls/legacy-claude/index.js +2 -0
  492. package/dist/restorer/impls/legacy-claude/index.js.map +1 -1
  493. package/dist/restorer/impls/portfolio-v0-evaluator/index.d.ts +4 -4
  494. package/dist/restorer/impls/portfolio-v0-evaluator/index.js +184 -55
  495. package/dist/restorer/impls/portfolio-v0-evaluator/index.js.map +1 -1
  496. package/dist/restorer/impls/prediction-apy-v0-baseline/index.d.ts +1 -1
  497. package/dist/restorer/impls/prediction-apy-v0-baseline/index.js +8 -1
  498. package/dist/restorer/impls/prediction-apy-v0-baseline/index.js.map +1 -1
  499. package/dist/restorer/impls/prediction-apy-v0-evaluator/index.d.ts +3 -3
  500. package/dist/restorer/impls/prediction-apy-v0-evaluator/index.js +153 -15
  501. package/dist/restorer/impls/prediction-apy-v0-evaluator/index.js.map +1 -1
  502. package/dist/restorer/impls/prediction-apy-v0-evaluator/parse-submission.d.ts +14 -5
  503. package/dist/restorer/impls/prediction-apy-v0-evaluator/parse-submission.js +16 -23
  504. package/dist/restorer/impls/prediction-apy-v0-evaluator/parse-submission.js.map +1 -1
  505. package/dist/restorer/impls/prediction-v0-baseline/index.d.ts +1 -1
  506. package/dist/restorer/impls/prediction-v0-baseline/index.js +16 -7
  507. package/dist/restorer/impls/prediction-v0-baseline/index.js.map +1 -1
  508. package/dist/restorer/impls/prediction-v0-evaluator/checks/integrity.d.ts +5 -3
  509. package/dist/restorer/impls/prediction-v0-evaluator/checks/integrity.js.map +1 -1
  510. package/dist/restorer/impls/prediction-v0-evaluator/index.d.ts +2 -2
  511. package/dist/restorer/impls/prediction-v0-evaluator/index.js +175 -67
  512. package/dist/restorer/impls/prediction-v0-evaluator/index.js.map +1 -1
  513. package/dist/restorer/manifest/index.d.ts +3 -0
  514. package/dist/restorer/manifest/index.js +3 -0
  515. package/dist/restorer/manifest/index.js.map +1 -0
  516. package/dist/restorer/manifest/load.d.ts +7 -0
  517. package/dist/restorer/manifest/load.js +49 -0
  518. package/dist/restorer/manifest/load.js.map +1 -0
  519. package/dist/restorer/manifest/types.d.ts +75 -0
  520. package/dist/restorer/manifest/types.js +8 -0
  521. package/dist/restorer/manifest/types.js.map +1 -0
  522. package/dist/restorer/manifest/verify.d.ts +15 -0
  523. package/dist/restorer/manifest/verify.js +53 -0
  524. package/dist/restorer/manifest/verify.js.map +1 -0
  525. package/dist/restorer/plug-ins/index.d.ts +14 -0
  526. package/dist/restorer/plug-ins/index.js +11 -0
  527. package/dist/restorer/plug-ins/index.js.map +1 -0
  528. package/dist/restorer/plug-ins/loader.d.ts +27 -0
  529. package/dist/restorer/plug-ins/loader.js +101 -0
  530. package/dist/restorer/plug-ins/loader.js.map +1 -0
  531. package/dist/restorer/plug-ins/manifest.d.ts +7 -0
  532. package/dist/restorer/plug-ins/manifest.js +97 -0
  533. package/dist/restorer/plug-ins/manifest.js.map +1 -0
  534. package/dist/restorer/plug-ins/registry.d.ts +24 -0
  535. package/dist/restorer/plug-ins/registry.js +17 -0
  536. package/dist/restorer/plug-ins/registry.js.map +1 -0
  537. package/dist/restorer/plug-ins/serialise.d.ts +29 -0
  538. package/dist/restorer/plug-ins/serialise.js +29 -0
  539. package/dist/restorer/plug-ins/serialise.js.map +1 -0
  540. package/dist/restorer/plug-ins/types.d.ts +77 -0
  541. package/dist/restorer/plug-ins/types.js +10 -0
  542. package/dist/restorer/plug-ins/types.js.map +1 -0
  543. package/dist/restorer/types.d.ts +66 -11
  544. package/dist/restorer/types.js.map +1 -1
  545. package/dist/runner/claude.d.ts +3 -3
  546. package/dist/runner/claude.js +57 -21
  547. package/dist/runner/claude.js.map +1 -1
  548. package/dist/runner/runner.d.ts +29 -2
  549. package/dist/runner/simple.d.ts +2 -2
  550. package/dist/runner/simple.js +2 -2
  551. package/dist/runner/simple.js.map +1 -1
  552. package/dist/scripts/fix-node-pty.mjs +62 -0
  553. package/dist/setup-mode.d.ts +34 -0
  554. package/dist/setup-mode.js +49 -0
  555. package/dist/setup-mode.js.map +1 -0
  556. package/dist/store/store.d.ts +79 -3
  557. package/dist/store/store.js +189 -6
  558. package/dist/store/store.js.map +1 -1
  559. package/dist/templates/plug-in/hook/README.md.tmpl +24 -0
  560. package/dist/templates/plug-in/hook/gitignore.tmpl +3 -0
  561. package/dist/templates/plug-in/hook/hooks/event.sh.tmpl +15 -0
  562. package/dist/templates/plug-in/hook/jinn-plugin.json.tmpl +16 -0
  563. package/dist/templates/plug-in/hook/package.json.tmpl +14 -0
  564. package/dist/templates/plug-in/hook/test/manifest.test.ts.tmpl +21 -0
  565. package/dist/templates/plug-in/mcp-tool/README.md.tmpl +26 -0
  566. package/dist/templates/plug-in/mcp-tool/gitignore.tmpl +4 -0
  567. package/dist/templates/plug-in/mcp-tool/jinn-plugin.json.tmpl +16 -0
  568. package/dist/templates/plug-in/mcp-tool/package.json.tmpl +19 -0
  569. package/dist/templates/plug-in/mcp-tool/src/server.ts.tmpl +17 -0
  570. package/dist/templates/plug-in/mcp-tool/test/server.test.ts.tmpl +18 -0
  571. package/dist/templates/plug-in/memory-backend/README.md.tmpl +33 -0
  572. package/dist/templates/plug-in/memory-backend/gitignore.tmpl +4 -0
  573. package/dist/templates/plug-in/memory-backend/jinn-plugin.json.tmpl +16 -0
  574. package/dist/templates/plug-in/memory-backend/package.json.tmpl +19 -0
  575. package/dist/templates/plug-in/memory-backend/src/server.ts.tmpl +23 -0
  576. package/dist/templates/plug-in/memory-backend/test/server.test.ts.tmpl +17 -0
  577. package/dist/templates/plug-in/phase-agent-override/README.md.tmpl +30 -0
  578. package/dist/templates/plug-in/phase-agent-override/agents/agent.md.tmpl +26 -0
  579. package/dist/templates/plug-in/phase-agent-override/gitignore.tmpl +3 -0
  580. package/dist/templates/plug-in/phase-agent-override/jinn-plugin.json.tmpl +17 -0
  581. package/dist/templates/plug-in/phase-agent-override/package.json.tmpl +14 -0
  582. package/dist/templates/plug-in/phase-agent-override/test/manifest.test.ts.tmpl +24 -0
  583. package/dist/templates/plug-in/skill-bundle/.claude-plugin/plugin.json.tmpl +5 -0
  584. package/dist/templates/plug-in/skill-bundle/README.md.tmpl +28 -0
  585. package/dist/templates/plug-in/skill-bundle/gitignore.tmpl +3 -0
  586. package/dist/templates/plug-in/skill-bundle/jinn-plugin.json.tmpl +15 -0
  587. package/dist/templates/plug-in/skill-bundle/package.json.tmpl +14 -0
  588. package/dist/templates/plug-in/skill-bundle/skills/example/SKILL.md.tmpl +14 -0
  589. package/dist/templates/plug-in/skill-bundle/test/manifest.test.ts.tmpl +21 -0
  590. package/dist/templates/plug-in/topic-explorer/README.md.tmpl +24 -0
  591. package/dist/templates/plug-in/topic-explorer/agents/explorer.md.tmpl +26 -0
  592. package/dist/templates/plug-in/topic-explorer/gitignore.tmpl +3 -0
  593. package/dist/templates/plug-in/topic-explorer/jinn-plugin.json.tmpl +17 -0
  594. package/dist/templates/plug-in/topic-explorer/package.json.tmpl +14 -0
  595. package/dist/templates/plug-in/topic-explorer/test/manifest.test.ts.tmpl +22 -0
  596. package/dist/templates/restorer/alternative-harness/README.md.tmpl +44 -0
  597. package/dist/templates/restorer/alternative-harness/gitignore.tmpl +3 -0
  598. package/dist/templates/restorer/alternative-harness/jinn.manifest.json.tmpl +22 -0
  599. package/dist/templates/restorer/alternative-harness/package.json.tmpl +26 -0
  600. package/dist/templates/restorer/alternative-harness/src/coordinator.ts.tmpl +50 -0
  601. package/dist/templates/restorer/alternative-harness/src/harness.ts.tmpl +31 -0
  602. package/dist/templates/restorer/alternative-harness/src/index.ts.tmpl +44 -0
  603. package/dist/templates/restorer/alternative-harness/src/mock-harness.ts.tmpl +41 -0
  604. package/dist/templates/restorer/alternative-harness/src/phases/debrief.ts.tmpl +28 -0
  605. package/dist/templates/restorer/alternative-harness/src/phases/execute.ts.tmpl +33 -0
  606. package/dist/templates/restorer/alternative-harness/src/phases/improve.ts.tmpl +31 -0
  607. package/dist/templates/restorer/alternative-harness/src/phases/memory.ts.tmpl +31 -0
  608. package/dist/templates/restorer/alternative-harness/src/phases/orient.ts.tmpl +21 -0
  609. package/dist/templates/restorer/alternative-harness/src/phases/plan.ts.tmpl +25 -0
  610. package/dist/templates/restorer/alternative-harness/src/phases/strategize.ts.tmpl +29 -0
  611. package/dist/templates/restorer/alternative-harness/test/coordinator.test.ts.tmpl +52 -0
  612. package/dist/templates/restorer/alternative-harness/test/unit.test.ts.tmpl +54 -0
  613. package/dist/templates/restorer/alternative-harness/tsconfig.json.tmpl +16 -0
  614. package/dist/templates/restorer/evaluator/README.md.tmpl +36 -0
  615. package/dist/templates/restorer/evaluator/gitignore.tmpl +3 -0
  616. package/dist/templates/restorer/evaluator/jinn.manifest.json.tmpl +22 -0
  617. package/dist/templates/restorer/evaluator/package.json.tmpl +26 -0
  618. package/dist/templates/restorer/evaluator/src/index.ts.tmpl +35 -0
  619. package/dist/templates/restorer/evaluator/test/unit.test.ts.tmpl +48 -0
  620. package/dist/templates/restorer/evaluator/tsconfig.json.tmpl +16 -0
  621. package/dist/templates/restorer/forecaster/README.md.tmpl +25 -0
  622. package/dist/templates/restorer/forecaster/gitignore.tmpl +5 -0
  623. package/dist/templates/restorer/forecaster/jinn.manifest.json.tmpl +22 -0
  624. package/dist/templates/restorer/forecaster/package.json.tmpl +26 -0
  625. package/dist/templates/restorer/forecaster/src/index.ts.tmpl +33 -0
  626. package/dist/templates/restorer/forecaster/test/unit.test.ts.tmpl +41 -0
  627. package/dist/templates/restorer/forecaster/tsconfig.json.tmpl +16 -0
  628. package/dist/trajectory/collector.d.ts +49 -0
  629. package/dist/trajectory/collector.js +86 -0
  630. package/dist/trajectory/collector.js.map +1 -0
  631. package/dist/trajectory/emit.d.ts +27 -0
  632. package/dist/trajectory/emit.js +40 -0
  633. package/dist/trajectory/emit.js.map +1 -0
  634. package/dist/trajectory/hash-chain.d.ts +18 -0
  635. package/dist/trajectory/hash-chain.js +23 -0
  636. package/dist/trajectory/hash-chain.js.map +1 -0
  637. package/dist/trajectory/index.d.ts +22 -0
  638. package/dist/trajectory/index.js +23 -0
  639. package/dist/trajectory/index.js.map +1 -0
  640. package/dist/trajectory/schema.d.ts +14 -14
  641. package/dist/trajectory/secret-scrub.d.ts +32 -0
  642. package/dist/trajectory/secret-scrub.js +51 -0
  643. package/dist/trajectory/secret-scrub.js.map +1 -0
  644. package/dist/trajectory/span-profile.d.ts +27 -0
  645. package/dist/trajectory/span-profile.js +51 -0
  646. package/dist/trajectory/span-profile.js.map +1 -0
  647. package/dist/trajectory/wrappers/http.d.ts +37 -0
  648. package/dist/trajectory/wrappers/http.js +85 -0
  649. package/dist/trajectory/wrappers/http.js.map +1 -0
  650. package/dist/trajectory/wrappers/mcp.d.ts +17 -0
  651. package/dist/trajectory/wrappers/mcp.js +58 -0
  652. package/dist/trajectory/wrappers/mcp.js.map +1 -0
  653. package/dist/trajectory/wrappers/subprocess.d.ts +32 -0
  654. package/dist/trajectory/wrappers/subprocess.js +70 -0
  655. package/dist/trajectory/wrappers/subprocess.js.map +1 -0
  656. package/dist/tx-retry.js +23 -9
  657. package/dist/tx-retry.js.map +1 -1
  658. package/dist/types/desired-state.d.ts +211 -21
  659. package/dist/types/desired-state.js +26 -15
  660. package/dist/types/desired-state.js.map +1 -1
  661. package/dist/types/envelope.d.ts +1473 -0
  662. package/dist/types/envelope.js +114 -0
  663. package/dist/types/envelope.js.map +1 -0
  664. package/dist/types/index.d.ts +4 -4
  665. package/dist/types/index.js +4 -4
  666. package/dist/types/index.js.map +1 -1
  667. package/dist/types/intent.d.ts +276 -0
  668. package/dist/types/intent.js +74 -0
  669. package/dist/types/intent.js.map +1 -0
  670. package/dist/types/payloads/index.d.ts +11 -0
  671. package/dist/types/payloads/index.js +46 -0
  672. package/dist/types/payloads/index.js.map +1 -0
  673. package/dist/types/payloads/portfolio-v0.d.ts +481 -0
  674. package/dist/types/payloads/portfolio-v0.js +94 -0
  675. package/dist/types/payloads/portfolio-v0.js.map +1 -0
  676. package/dist/types/payloads/prediction-apy-v0.d.ts +231 -0
  677. package/dist/types/payloads/prediction-apy-v0.js +63 -0
  678. package/dist/types/payloads/prediction-apy-v0.js.map +1 -0
  679. package/dist/types/payloads/prediction-v0.d.ts +262 -0
  680. package/dist/types/payloads/prediction-v0.js +73 -0
  681. package/dist/types/payloads/prediction-v0.js.map +1 -0
  682. package/dist/types/portfolio.d.ts +23 -685
  683. package/dist/types/portfolio.js +16 -106
  684. package/dist/types/portfolio.js.map +1 -1
  685. package/dist/types/prediction-apy.d.ts +9 -344
  686. package/dist/types/prediction-apy.js +9 -65
  687. package/dist/types/prediction-apy.js.map +1 -1
  688. package/dist/types/prediction.d.ts +25 -396
  689. package/dist/types/prediction.js +5 -79
  690. package/dist/types/prediction.js.map +1 -1
  691. package/dist/types/window.d.ts +12 -0
  692. package/dist/types/window.js +6 -0
  693. package/dist/types/window.js.map +1 -0
  694. package/dist/util/path-safety.d.ts +22 -0
  695. package/dist/util/path-safety.js +29 -0
  696. package/dist/util/path-safety.js.map +1 -0
  697. package/dist/util/redact-rpc-urls.d.ts +5 -0
  698. package/dist/util/redact-rpc-urls.js +9 -0
  699. package/dist/util/redact-rpc-urls.js.map +1 -0
  700. package/dist/x402/acquire.d.ts +14 -3
  701. package/dist/x402/acquire.js +28 -11
  702. package/dist/x402/acquire.js.map +1 -1
  703. package/dist/x402/handler.d.ts +15 -3
  704. package/dist/x402/handler.js +67 -24
  705. package/dist/x402/handler.js.map +1 -1
  706. package/package.json +36 -11
  707. package/plugins/claude-code-learner/.claude-plugin/plugin.json +9 -0
  708. package/plugins/claude-code-learner/AGENTS.md +30 -0
  709. package/plugins/claude-code-learner/CLAUDE.md +31 -0
  710. package/plugins/claude-code-learner/README.md +58 -0
  711. package/plugins/claude-code-learner/agents/analyst.md +69 -0
  712. package/plugins/claude-code-learner/agents/consolidator.md +95 -0
  713. package/plugins/claude-code-learner/agents/explorer.md +54 -0
  714. package/plugins/claude-code-learner/agents/planner.md +88 -0
  715. package/plugins/claude-code-learner/agents/promoter.md +114 -0
  716. package/plugins/claude-code-learner/agents/step-worker.md +48 -0
  717. package/plugins/claude-code-learner/agents/strategist.md +86 -0
  718. package/plugins/claude-code-learner/hooks/hooks.json +16 -0
  719. package/plugins/claude-code-learner/hooks/session-start +49 -0
  720. package/plugins/claude-code-learner/skills/coordinator/SKILL.md +131 -0
  721. package/plugins/claude-code-learner/skills/debrief/SKILL.md +71 -0
  722. package/plugins/claude-code-learner/skills/execute/SKILL.md +91 -0
  723. package/plugins/claude-code-learner/skills/improve/SKILL.md +57 -0
  724. package/plugins/claude-code-learner/skills/memory-consolidation/SKILL.md +57 -0
  725. package/plugins/claude-code-learner/skills/orient/SKILL.md +82 -0
  726. package/plugins/claude-code-learner/skills/plan/SKILL.md +54 -0
  727. package/plugins/claude-code-learner/skills/strategize/SKILL.md +63 -0
  728. package/skills/jinn-operator/SKILL.md +84 -35
  729. package/templates/plug-in/hook/README.md.tmpl +24 -0
  730. package/templates/plug-in/hook/gitignore.tmpl +3 -0
  731. package/templates/plug-in/hook/hooks/event.sh.tmpl +15 -0
  732. package/templates/plug-in/hook/jinn-plugin.json.tmpl +16 -0
  733. package/templates/plug-in/hook/package.json.tmpl +14 -0
  734. package/templates/plug-in/hook/test/manifest.test.ts.tmpl +21 -0
  735. package/templates/plug-in/mcp-tool/README.md.tmpl +26 -0
  736. package/templates/plug-in/mcp-tool/gitignore.tmpl +4 -0
  737. package/templates/plug-in/mcp-tool/jinn-plugin.json.tmpl +16 -0
  738. package/templates/plug-in/mcp-tool/package.json.tmpl +19 -0
  739. package/templates/plug-in/mcp-tool/src/server.ts.tmpl +17 -0
  740. package/templates/plug-in/mcp-tool/test/server.test.ts.tmpl +18 -0
  741. package/templates/plug-in/memory-backend/README.md.tmpl +33 -0
  742. package/templates/plug-in/memory-backend/gitignore.tmpl +4 -0
  743. package/templates/plug-in/memory-backend/jinn-plugin.json.tmpl +16 -0
  744. package/templates/plug-in/memory-backend/package.json.tmpl +19 -0
  745. package/templates/plug-in/memory-backend/src/server.ts.tmpl +23 -0
  746. package/templates/plug-in/memory-backend/test/server.test.ts.tmpl +17 -0
  747. package/templates/plug-in/phase-agent-override/README.md.tmpl +30 -0
  748. package/templates/plug-in/phase-agent-override/agents/agent.md.tmpl +26 -0
  749. package/templates/plug-in/phase-agent-override/gitignore.tmpl +3 -0
  750. package/templates/plug-in/phase-agent-override/jinn-plugin.json.tmpl +17 -0
  751. package/templates/plug-in/phase-agent-override/package.json.tmpl +14 -0
  752. package/templates/plug-in/phase-agent-override/test/manifest.test.ts.tmpl +24 -0
  753. package/templates/plug-in/skill-bundle/.claude-plugin/plugin.json.tmpl +5 -0
  754. package/templates/plug-in/skill-bundle/README.md.tmpl +28 -0
  755. package/templates/plug-in/skill-bundle/gitignore.tmpl +3 -0
  756. package/templates/plug-in/skill-bundle/jinn-plugin.json.tmpl +15 -0
  757. package/templates/plug-in/skill-bundle/package.json.tmpl +14 -0
  758. package/templates/plug-in/skill-bundle/skills/example/SKILL.md.tmpl +14 -0
  759. package/templates/plug-in/skill-bundle/test/manifest.test.ts.tmpl +21 -0
  760. package/templates/plug-in/topic-explorer/README.md.tmpl +24 -0
  761. package/templates/plug-in/topic-explorer/agents/explorer.md.tmpl +26 -0
  762. package/templates/plug-in/topic-explorer/gitignore.tmpl +3 -0
  763. package/templates/plug-in/topic-explorer/jinn-plugin.json.tmpl +17 -0
  764. package/templates/plug-in/topic-explorer/package.json.tmpl +14 -0
  765. package/templates/plug-in/topic-explorer/test/manifest.test.ts.tmpl +22 -0
  766. package/templates/restorer/alternative-harness/README.md.tmpl +44 -0
  767. package/templates/restorer/alternative-harness/gitignore.tmpl +3 -0
  768. package/templates/restorer/alternative-harness/jinn.manifest.json.tmpl +22 -0
  769. package/templates/restorer/alternative-harness/package.json.tmpl +26 -0
  770. package/templates/restorer/alternative-harness/src/coordinator.ts.tmpl +50 -0
  771. package/templates/restorer/alternative-harness/src/harness.ts.tmpl +31 -0
  772. package/templates/restorer/alternative-harness/src/index.ts.tmpl +44 -0
  773. package/templates/restorer/alternative-harness/src/mock-harness.ts.tmpl +41 -0
  774. package/templates/restorer/alternative-harness/src/phases/debrief.ts.tmpl +28 -0
  775. package/templates/restorer/alternative-harness/src/phases/execute.ts.tmpl +33 -0
  776. package/templates/restorer/alternative-harness/src/phases/improve.ts.tmpl +31 -0
  777. package/templates/restorer/alternative-harness/src/phases/memory.ts.tmpl +31 -0
  778. package/templates/restorer/alternative-harness/src/phases/orient.ts.tmpl +21 -0
  779. package/templates/restorer/alternative-harness/src/phases/plan.ts.tmpl +25 -0
  780. package/templates/restorer/alternative-harness/src/phases/strategize.ts.tmpl +29 -0
  781. package/templates/restorer/alternative-harness/test/coordinator.test.ts.tmpl +52 -0
  782. package/templates/restorer/alternative-harness/test/unit.test.ts.tmpl +54 -0
  783. package/templates/restorer/alternative-harness/tsconfig.json.tmpl +16 -0
  784. package/templates/restorer/evaluator/README.md.tmpl +36 -0
  785. package/templates/restorer/evaluator/gitignore.tmpl +3 -0
  786. package/templates/restorer/evaluator/jinn.manifest.json.tmpl +22 -0
  787. package/templates/restorer/evaluator/package.json.tmpl +26 -0
  788. package/templates/restorer/evaluator/src/index.ts.tmpl +35 -0
  789. package/templates/restorer/evaluator/test/unit.test.ts.tmpl +48 -0
  790. package/templates/restorer/evaluator/tsconfig.json.tmpl +16 -0
  791. package/templates/restorer/forecaster/README.md.tmpl +25 -0
  792. package/templates/restorer/forecaster/gitignore.tmpl +5 -0
  793. package/templates/restorer/forecaster/jinn.manifest.json.tmpl +22 -0
  794. package/templates/restorer/forecaster/package.json.tmpl +26 -0
  795. package/templates/restorer/forecaster/src/index.ts.tmpl +33 -0
  796. package/templates/restorer/forecaster/test/unit.test.ts.tmpl +41 -0
  797. package/templates/restorer/forecaster/tsconfig.json.tmpl +16 -0
  798. package/dist/bin/jinn-mcp.d.ts +0 -2
  799. package/dist/bin/jinn-mcp.js +0 -10
  800. package/dist/bin/jinn-mcp.js.map +0 -1
  801. package/dist/cli/commands/quickstart.js +0 -330
  802. package/dist/cli/commands/quickstart.js.map +0 -1
  803. package/dist/discovery/registry.d.ts +0 -97
  804. package/dist/discovery/registry.js +0 -177
  805. package/dist/discovery/registry.js.map +0 -1
  806. package/dist/discovery/subgraph.d.ts +0 -37
  807. package/dist/discovery/subgraph.js +0 -87
  808. package/dist/discovery/subgraph.js.map +0 -1
  809. package/dist/restorer/engine/manifest-assembly.d.ts +0 -67
  810. package/dist/restorer/engine/manifest-assembly.js +0 -79
  811. package/dist/restorer/engine/manifest-assembly.js.map +0 -1
  812. /package/dist/cli/commands/{quickstart.d.ts → ui.d.ts} +0 -0
@@ -1,16 +1,23 @@
1
1
  import { writeFileSync } from 'node:fs';
2
+ import { createHash } from 'node:crypto';
2
3
  import { join } from 'node:path';
3
- import { createPublicClient, http, keccak256, stringToHex } from 'viem';
4
+ import { createPublicClient, http } from 'viem';
4
5
  import { base, baseSepolia, mainnet } from 'viem/chains';
5
6
  import { privateKeyToAccount } from 'viem/accounts';
7
+ import { signCanonical } from '../../engine/signing.js';
8
+ import { buildVerificationStub } from '../../engine/verification-stub.js';
6
9
  import { REQUIRES_LIVE_DAEMON_READINESS } from '../../types.js';
7
10
  import { PredictionApyV0IntentSchema } from '../../../types/prediction-apy.js';
8
11
  import { twApyBpsOverWindow } from '../../../venues/aave-v3/client.js';
9
12
  import { checkIntentRef, checkIntentRefMissingExpected, checkManifestSignature, recomputeTopLevelSignatureHash, } from '../prediction-v0-evaluator/checks/integrity.js';
10
- import { resolveExpectedRestorationIntentCid } from '../evaluation-context.js';
13
+ import { resolveExpectedRestorationIntentCid, RESTORATION_ENVELOPE_CID_CONTEXT_KEY } from '../evaluation-context.js';
14
+ import { canonicalJson } from '../../engine/canonical-json.js';
11
15
  import { deriveGroundTruthBps } from './canonical-metrics.js';
12
- import { parsePredictionApySubmissionManifest } from './parse-submission.js';
16
+ import { parsePredictionApySubmissionEnvelope } from './parse-submission.js';
13
17
  import { computeScore } from './score.js';
18
+ function nowNanos() {
19
+ return `${BigInt(Date.now()) * 1000000n}`;
20
+ }
14
21
  function chainForVenue(venue) {
15
22
  if (venue === 'aave-v3-base-sepolia')
16
23
  return { chain: baseSepolia, chainId: 84532 };
@@ -56,12 +63,14 @@ export class PredictionApyV0Evaluator {
56
63
  const intent = PredictionApyV0IntentSchema.parse(ctx.intent);
57
64
  const manifestJson = ctx.intent.context['restorationResult'];
58
65
  const rawPayload = JSON.parse(manifestJson);
59
- const submission = parsePredictionApySubmissionManifest(manifestJson);
66
+ const { envelope: submissionEnvelope, payload: submission } = parsePredictionApySubmissionEnvelope(manifestJson);
60
67
  const checks = [];
61
68
  const { venue, pool, reserve } = intent.spec.oracle;
62
69
  const { chain, chainId } = chainForVenue(venue);
63
70
  let twApyBps;
64
71
  let sampleCount;
72
+ const aaveFetchStart = nowNanos();
73
+ const aavePeerName = `aave-v3.${venue}`;
65
74
  try {
66
75
  if (testDeps?.twApyBpsOverWindow) {
67
76
  const result = await testDeps.twApyBpsOverWindow({
@@ -92,10 +101,53 @@ export class PredictionApyV0Evaluator {
92
101
  twApyBps = result.twApyBps;
93
102
  sampleCount = result.sampleCount;
94
103
  }
104
+ ctx.trajectory.addSpan({
105
+ name: `aave-v3.twApyBpsOverWindow ${aavePeerName}`,
106
+ kind: 'CLIENT',
107
+ startTimeUnixNano: aaveFetchStart,
108
+ endTimeUnixNano: nowNanos(),
109
+ attributes: {
110
+ 'jinn.span.kind': 'jinn.venue_io',
111
+ 'net.peer.name': aavePeerName,
112
+ 'http.request.method': 'POST',
113
+ 'http.response.status_code': 200,
114
+ 'url.full': this.config.archiveRpcUrl ?? this.config.rpcUrl ?? 'rpc',
115
+ 'venue.id': 'aave-v3',
116
+ 'aave.pool': pool,
117
+ 'aave.reserve': reserve,
118
+ },
119
+ events: [],
120
+ status: { code: 'OK' },
121
+ });
95
122
  checks.push({ name: 'availability.aave_readable', status: 'PASS' });
96
123
  }
97
124
  catch (error) {
98
- checks.push({ name: 'availability.aave_readable', status: 'FAIL', detail: String(error) });
125
+ const msg = String(error);
126
+ ctx.trajectory.addSpan({
127
+ name: `aave-v3.twApyBpsOverWindow ${aavePeerName}`,
128
+ kind: 'CLIENT',
129
+ startTimeUnixNano: aaveFetchStart,
130
+ endTimeUnixNano: nowNanos(),
131
+ attributes: {
132
+ 'jinn.span.kind': 'jinn.venue_io',
133
+ 'net.peer.name': aavePeerName,
134
+ 'http.request.method': 'POST',
135
+ 'http.response.status_code': 0,
136
+ 'url.full': this.config.archiveRpcUrl ?? this.config.rpcUrl ?? 'rpc',
137
+ 'venue.id': 'aave-v3',
138
+ 'aave.pool': pool,
139
+ 'aave.reserve': reserve,
140
+ },
141
+ events: [
142
+ {
143
+ timeUnixNano: nowNanos(),
144
+ name: 'exception',
145
+ attributes: { 'exception.message': msg },
146
+ },
147
+ ],
148
+ status: { code: 'ERROR', message: msg },
149
+ });
150
+ checks.push({ name: 'availability.aave_readable', status: 'FAIL', detail: msg });
99
151
  twApyBps = 0;
100
152
  sampleCount = 0;
101
153
  }
@@ -124,13 +176,13 @@ export class PredictionApyV0Evaluator {
124
176
  }
125
177
  {
126
178
  const recomputed = recomputeTopLevelSignatureHash(rawPayload);
127
- checks.push(await checkManifestSignature(recomputed, submission.signature));
179
+ checks.push(await checkManifestSignature(recomputed, submissionEnvelope.signature));
128
180
  }
129
181
  if (expectedRef.kind === 'missing') {
130
182
  checks.push(checkIntentRefMissingExpected());
131
183
  }
132
184
  else {
133
- checks.push(checkIntentRef(submission.intent.cid, expectedRef.cid));
185
+ checks.push(checkIntentRef(submissionEnvelope.intent.cid, expectedRef.cid));
134
186
  }
135
187
  if (intent.spec.metric.toleranceBps > 0) {
136
188
  checks.push({ name: 'spec.tolerance_positive', status: 'PASS' });
@@ -138,14 +190,30 @@ export class PredictionApyV0Evaluator {
138
190
  else {
139
191
  checks.push({ name: 'spec.tolerance_positive', status: 'FAIL' });
140
192
  }
193
+ const scoreStart = nowNanos();
141
194
  const verdict = deriveVerdict(checks);
142
195
  const groundTruthBps = deriveGroundTruthBps(intent, twApyBps);
143
196
  const scored = computeScore(verdict, submission.prediction.predictedBps, groundTruthBps, intent.spec.metric.toleranceBps);
197
+ const scoreEnd = nowNanos();
198
+ ctx.trajectory.addSpan({
199
+ name: 'score.absolute-error-linear.v1',
200
+ kind: 'INTERNAL',
201
+ startTimeUnixNano: scoreStart,
202
+ endTimeUnixNano: scoreEnd,
203
+ attributes: {
204
+ 'jinn.span.kind': 'jinn.state_transition',
205
+ 'jinn.state.from': 'FETCHED',
206
+ 'jinn.state.to': 'SCORED',
207
+ 'verdict': verdict,
208
+ 'score.basis': scored.scoreBasis,
209
+ },
210
+ events: [],
211
+ status: { code: 'OK' },
212
+ });
144
213
  const evaluatorAccount = privateKeyToAccount(this.config.evaluatorPk);
145
214
  const baseManifest = {
146
- schemaVersion: 'prediction.apy.v0.verdict.v1',
147
215
  generatedAt: Date.now(),
148
- intent: submission.intent,
216
+ intent: submissionEnvelope.intent,
149
217
  evaluator: { safeAddress: this.config.evaluatorSafeAddress, agentEoa: evaluatorAccount.address },
150
218
  window: intent.window,
151
219
  verdict,
@@ -170,13 +238,75 @@ export class PredictionApyV0Evaluator {
170
238
  },
171
239
  checks,
172
240
  };
173
- const hash = keccak256(stringToHex(JSON.stringify(baseManifest)));
174
- const sig = await evaluatorAccount.sign({ hash });
241
+ // Sign with JCS canonical form (RFC 8785) via signCanonical — matching
242
+ // envelope-assembly and portfolio-v0-evaluator.
243
+ const signed = await signCanonical(baseManifest, this.config.evaluatorPk, evaluatorAccount.address);
175
244
  const verdictManifest = {
176
245
  ...baseManifest,
177
- signature: { algo: 'secp256k1', signer: evaluatorAccount.address, hash, sig },
246
+ signature: { algo: 'secp256k1', signer: evaluatorAccount.address, hash: signed.hash, sig: signed.sig },
247
+ };
248
+ const verdictJson = JSON.stringify(verdictManifest, null, 2);
249
+ const verdictSha256 = createHash('sha256').update(verdictJson).digest('hex');
250
+ writeFileSync(join(ctx.workingDir, 'verdict.json'), verdictJson);
251
+ const artifactEmitNs = nowNanos();
252
+ ctx.trajectory.addSpan({
253
+ name: 'artifact.emit verdict.json',
254
+ kind: 'INTERNAL',
255
+ startTimeUnixNano: artifactEmitNs,
256
+ endTimeUnixNano: artifactEmitNs,
257
+ attributes: {
258
+ 'jinn.span.kind': 'jinn.artifact.emit',
259
+ 'jinn.artifact.cid': 'pending',
260
+ 'jinn.artifact.artifactType': 'evaluation_verdict',
261
+ 'jinn.artifact.sha256': verdictSha256,
262
+ 'artifact.path': 'verdict.json',
263
+ },
264
+ events: [],
265
+ status: { code: 'OK' },
266
+ });
267
+ // ── Verdict payload for engine.pack() (role='verdict' envelope) ───────────
268
+ // Assembles the PredictionApyV0VerdictPayload from the already-computed fields.
269
+ //
270
+ // restorationEnvelope: CID threaded from the daemon via context, sha256
271
+ // computed as sha256(JCS(restorationEnvelope)) — matching the upload pipeline
272
+ // and the conformance harness (8l6 fix A).
273
+ //
274
+ // verificationOfRestoration: stub — Plan D will connect the real SDK that
275
+ // fetches + validates the restoration envelope against its claimed tier.
276
+ // For V1 the stub always reports 'valid' (self-signed tier), which means
277
+ // the REJECTED-if-invalid path in engine.pack() never fires in practice
278
+ // until Plan D replaces this stub.
279
+ const envelopeCid = ctx.intent.context?.[RESTORATION_ENVELOPE_CID_CONTEXT_KEY]
280
+ ?? ctx.intent.restorationRequestId
281
+ ?? 'bafy-unknown';
282
+ // Use JCS canonical bytes so the sha256 matches the upload pipeline (8l6 fix A).
283
+ const envelopeSha256 = createHash('sha256').update(canonicalJson(rawPayload)).digest('hex');
284
+ const restorationEnvelope = {
285
+ cid: envelopeCid,
286
+ sha256: envelopeSha256,
287
+ };
288
+ const verificationOfRestoration = buildVerificationStub();
289
+ const verdictPayload = {
290
+ restorationEnvelope,
291
+ verificationOfRestoration,
292
+ verdict,
293
+ score: scored.score,
294
+ scoreBasis: scored.scoreBasis,
295
+ scoreVersion: scored.scoreVersion,
296
+ oracleReading: baseManifest['oracleReading'],
297
+ claimed: {
298
+ predictedBps: submission.prediction.predictedBps,
299
+ submittedAt: submission.prediction.submittedAt,
300
+ modelId: submission.prediction.modelId,
301
+ // submissionManifestCid omitted — not available from inline manifest context
302
+ // TODO(plan-d): populate once IPFS submission CID is resolved
303
+ },
304
+ groundTruth: {
305
+ twApyBps: groundTruthBps,
306
+ errorBps: scored.errorBps,
307
+ },
308
+ checks,
178
309
  };
179
- writeFileSync(join(ctx.workingDir, 'verdict.json'), JSON.stringify(verdictManifest, null, 2));
180
310
  return {
181
311
  venueRef: { name: 'aave-v3' },
182
312
  gating: {
@@ -188,7 +318,15 @@ export class PredictionApyV0Evaluator {
188
318
  informational: {
189
319
  predictedBps: submission.prediction.predictedBps,
190
320
  },
191
- artifacts: [{ path: 'verdict.json', role: 'evaluation_verdict' }],
321
+ verdictPayload,
322
+ artifacts: [
323
+ {
324
+ path: 'verdict.json',
325
+ artifactType: 'evaluation_verdict',
326
+ metadata: { verdict, score: scored.score },
327
+ access: { priceUsdc: '0' },
328
+ },
329
+ ],
192
330
  };
193
331
  }
194
332
  }
@@ -203,6 +341,6 @@ function deriveVerdict(checks) {
203
341
  return 'FAIL';
204
342
  return 'PASS';
205
343
  }
206
- export { parsePredictionApySubmissionManifest } from './parse-submission.js';
344
+ export { parsePredictionApySubmissionEnvelope } from './parse-submission.js';
207
345
  export default PredictionApyV0Evaluator;
208
346
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/restorer/impls/prediction-apy-v0-evaluator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAGpD,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAE,2BAA2B,EAAqC,MAAM,kCAAkC,CAAC;AAClH,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EACL,cAAc,EACd,6BAA6B,EAC7B,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,mCAAmC,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,oCAAoC,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAqB1C,SAAS,aAAa,CAAC,KAAkE;IACvF,IAAI,KAAK,KAAK,sBAAsB;QAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,OAA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AAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,eAAe,CAAC;QAAE,OAAO,eAAe,CAAC;IAChH,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC;QAAE,OAAO,UAAU,CAAC;IACpG,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC;QAAE,OAAO,MAAM,CAAC;IAC9H,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,OAAO,EAAE,oCAAoC,EAAE,MAAM,uBAAuB,CAAC;AAC7E,eAAe,wBAAwB,CAAC"}
@@ -1,7 +1,16 @@
1
- import { type PredictionApySubmissionManifest } from '../../../types/prediction-apy.js';
1
+ import type { SignedEnvelope } from '../../../types/envelope.js';
2
+ import type { PredictionApyV0RestorationPayload } from '../../../types/payloads/prediction-apy-v0.js';
2
3
  /**
3
- * Parse a restoration submission for prediction.apy.v0. Engine-wrapped jobs store
4
- * the prediction under `gating` (see manifest assembly); direct IPFS manifests
5
- * use `prediction` per schema.
4
+ * Parse a restoration submission envelope for prediction.apy.v0.
5
+ *
6
+ * Restorations are published as jinn.execution.v1 SignedEnvelopes with
7
+ * kind='prediction.apy.v0' and role='restoration'. The prediction payload
8
+ * lives at envelope.payload per PredictionApyV0RestorationPayloadSchema.
9
+ *
10
+ * Returns both the envelope (for signature / intent provenance) and the
11
+ * typed payload (for prediction fields).
6
12
  */
7
- export declare function parsePredictionApySubmissionManifest(manifestJson: string): PredictionApySubmissionManifest;
13
+ export declare function parsePredictionApySubmissionEnvelope(manifestJson: string): {
14
+ envelope: SignedEnvelope;
15
+ payload: PredictionApyV0RestorationPayload;
16
+ };
@@ -1,29 +1,22 @@
1
- import { PredictionApySubmissionManifestSchema, } from '../../../types/prediction-apy.js';
1
+ import { SignedEnvelopeSchema } from '../../../types/envelope.js';
2
+ import { PredictionApyV0RestorationPayloadSchema } from '../../../types/payloads/prediction-apy-v0.js';
2
3
  /**
3
- * Parse a restoration submission for prediction.apy.v0. Engine-wrapped jobs store
4
- * the prediction under `gating` (see manifest assembly); direct IPFS manifests
5
- * use `prediction` per schema.
4
+ * Parse a restoration submission envelope for prediction.apy.v0.
5
+ *
6
+ * Restorations are published as jinn.execution.v1 SignedEnvelopes with
7
+ * kind='prediction.apy.v0' and role='restoration'. The prediction payload
8
+ * lives at envelope.payload per PredictionApyV0RestorationPayloadSchema.
9
+ *
10
+ * Returns both the envelope (for signature / intent provenance) and the
11
+ * typed payload (for prediction fields).
6
12
  */
7
- export function parsePredictionApySubmissionManifest(manifestJson) {
13
+ export function parsePredictionApySubmissionEnvelope(manifestJson) {
8
14
  const raw = JSON.parse(manifestJson);
9
- const gating = raw['gating'];
10
- const gatingBps = gating?.['predictedBps'];
11
- if (gating && (typeof gatingBps === 'string' || typeof gatingBps === 'number')) {
12
- const normalized = {
13
- schemaVersion: 'prediction.apy.v0.submission.v1',
14
- generatedAt: raw['generatedAt'] ?? Date.now(),
15
- intent: raw['intent'],
16
- restorer: raw['restorer'],
17
- window: raw['window'],
18
- prediction: {
19
- predictedBps: String(gatingBps),
20
- submittedAt: Number(gating['submittedAt'] ?? 0),
21
- modelId: String(gating['modelId'] ?? ''),
22
- },
23
- signature: raw['signature'],
24
- };
25
- return PredictionApySubmissionManifestSchema.parse(normalized);
15
+ const envelope = SignedEnvelopeSchema.parse(raw);
16
+ if (envelope.kind !== 'prediction.apy.v0' || envelope.role !== 'restoration') {
17
+ throw new Error(`Unexpected envelope kind/role: ${envelope.kind}/${envelope.role}; expected prediction.apy.v0/restoration`);
26
18
  }
27
- return PredictionApySubmissionManifestSchema.parse(raw);
19
+ const payload = PredictionApyV0RestorationPayloadSchema.parse(envelope.payload);
20
+ return { envelope, payload };
28
21
  }
29
22
  //# sourceMappingURL=parse-submission.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parse-submission.js","sourceRoot":"","sources":["../../../../src/restorer/impls/prediction-apy-v0-evaluator/parse-submission.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qCAAqC,GAEtC,MAAM,kCAAkC,CAAC;AAE1C;;;;GAIG;AACH,MAAM,UAAU,oCAAoC,CAAC,YAAoB;IACvE,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAA4B,CAAC;IAChE,MAAM,MAAM,GAAG,GAAG,CAAC,QAAQ,CAAwC,CAAC;IACpE,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC,cAAc,CAAC,CAAC;IAC3C,IAAI,MAAM,IAAI,CAAC,OAAO,SAAS,KAAK,QAAQ,IAAI,OAAO,SAAS,KAAK,QAAQ,CAAC,EAAE,CAAC;QAC/E,MAAM,UAAU,GAAG;YACjB,aAAa,EAAE,iCAAiC;YAChD,WAAW,EAAE,GAAG,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE;YAC7C,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC;YACrB,QAAQ,EAAE,GAAG,CAAC,UAAU,CAAC;YACzB,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC;YACrB,UAAU,EAAE;gBACV,YAAY,EAAE,MAAM,CAAC,SAAS,CAAC;gBAC/B,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;gBAC/C,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;aACzC;YACD,SAAS,EAAE,GAAG,CAAC,WAAW,CAAC;SAC5B,CAAC;QACF,OAAO,qCAAqC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,qCAAqC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC1D,CAAC"}
1
+ {"version":3,"file":"parse-submission.js","sourceRoot":"","sources":["../../../../src/restorer/impls/prediction-apy-v0-evaluator/parse-submission.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAO,EAAE,uCAAuC,EAAE,MAAM,8CAA8C,CAAC;AAGvG;;;;;;;;;GASG;AACH,MAAM,UAAU,oCAAoC,CAAC,YAAoB;IAIvE,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAA4B,CAAC;IAChE,MAAM,QAAQ,GAAG,oBAAoB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjD,IAAI,QAAQ,CAAC,IAAI,KAAK,mBAAmB,IAAI,QAAQ,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;QAC7E,MAAM,IAAI,KAAK,CACb,kCAAkC,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,0CAA0C,CAC3G,CAAC;IACJ,CAAC;IACD,MAAM,OAAO,GAAG,uCAAuC,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAChF,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AAC/B,CAAC"}
@@ -20,7 +20,7 @@ export declare class PredictionV0BaselineImpl implements RestorerImpl {
20
20
  isReady(): Promise<ReadyStatus>;
21
21
  enableMetadata(): IntentEnableMetadata;
22
22
  onEnable(_args: Record<string, string | undefined>): Promise<EnableResult>;
23
- canAttempt(intent: import('../../../types/desired-state.js').DesiredState): Promise<{
23
+ canAttempt(intent: import('../../../types/desired-state.js').RestorationJob): Promise<{
24
24
  ok: true;
25
25
  } | {
26
26
  ok: false;
@@ -74,6 +74,12 @@ export class PredictionV0BaselineImpl {
74
74
  const prediction = { probability, submittedAt, modelId };
75
75
  writeFileSync(join(workingDir, 'prediction.json'), JSON.stringify(prediction, null, 2));
76
76
  log({ level: 'info', msg: 'prediction-v0-baseline: submitted', data: { currentPrice, probability, modelId } });
77
+ const oracleSnapshot = {
78
+ feed: feed,
79
+ roundId: String(snapshot.roundId),
80
+ answer: String(snapshot.answer),
81
+ updatedAt: snapshot.updatedAt,
82
+ };
77
83
  return {
78
84
  venueRef: { name: 'chainlink' },
79
85
  gating: {
@@ -82,16 +88,19 @@ export class PredictionV0BaselineImpl {
82
88
  modelId,
83
89
  },
84
90
  informational: {
85
- oracleSnapshot: {
86
- feed,
87
- roundId: String(snapshot.roundId),
88
- answer: String(snapshot.answer),
89
- updatedAt: snapshot.updatedAt,
90
- },
91
+ oracleSnapshot,
91
92
  currentPrice,
92
93
  },
94
+ restorationPayload: {
95
+ prediction: {
96
+ probability,
97
+ submittedAt,
98
+ modelId,
99
+ },
100
+ oracleSnapshot,
101
+ },
93
102
  artifacts: [
94
- { path: 'prediction.json', role: 'prediction_submission' },
103
+ { path: 'prediction.json', artifactType: 'prediction_submission' },
95
104
  ],
96
105
  };
97
106
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/restorer/impls/prediction-v0-baseline/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAUhD,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EACL,mBAAmB,EACnB,cAAc,GAEf,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,M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C,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;YAC/B,SAAS,EAAE,QAAQ,CAAC,SAAS;SAC9B,CAAC;QAEF,OAAO;YACL,QAAQ,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;YAC/B,MAAM,EAAE;gBACN,WAAW;gBACX,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC;gBAChC,OAAO;aACR;YACD,aAAa,EAAE;gBACb,cAAc;gBACd,YAAY;aACb;YACD,kBAAkB,EAAE;gBAClB,UAAU,EAAE;oBACV,WAAW;oBACX,WAAW;oBACX,OAAO;iBACR;gBACD,cAAc;aACf;YACD,SAAS,EAAE;gBACT,EAAE,IAAI,EAAE,iBAAiB,EAAE,YAAY,EAAE,uBAAuB,EAAE;aACnE;SACF,CAAC;IACJ,CAAC;CACF;AAED,eAAe,wBAAwB,CAAC"}
@@ -1,13 +1,15 @@
1
1
  import type { Check } from '../types.js';
2
- import type { PredictionV0Intent, PredictionSubmissionManifest } from '../../../../types/prediction.js';
2
+ import type { PredictionV0Intent } from '../../../../types/prediction.js';
3
+ import type { PredictionV0RestorationPayload } from '../../../../types/payloads/prediction-v0.js';
4
+ import type { SignedEnvelope } from '../../../../types/envelope.js';
3
5
  export declare function checkWindowBounds(intent: PredictionV0Intent): Check;
4
- export declare function checkManifestFieldsPresent(prediction: PredictionSubmissionManifest['prediction']): Check;
6
+ export declare function checkManifestFieldsPresent(prediction: PredictionV0RestorationPayload['prediction']): Check;
5
7
  /**
6
8
  * Recompute keccak256 over the canonical JSON of the top-level object after
7
9
  * removing `signature` — the same pre-image the restorer `signCanonical` hashes.
8
10
  */
9
11
  export declare function recomputeTopLevelSignatureHash(manifest: Record<string, unknown>): `0x${string}`;
10
- export declare function checkManifestSignature(canonicalHash: `0x${string}`, signature: PredictionSubmissionManifest['signature']): Promise<Check>;
12
+ export declare function checkManifestSignature(canonicalHash: `0x${string}`, signature: SignedEnvelope['signature']): Promise<Check>;
11
13
  /** Verify the restorer's claimed intent CID matches the on-chain request. */
12
14
  export declare function checkIntentRef(manifestIntentCid: string, expectedIntentCid: string): Check;
13
15
  export declare function checkIntentRefMissingExpected(): Check;
@@ -1 +1 @@
1
- {"version":3,"file":"integrity.js","sourceRoot":"","sources":["../../../../../src/restorer/impls/prediction-v0-evaluator/checks/integrity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAIlE;;;;;GAKG;AACH,MAAM,aAAa,GAAG,MAAM,CAAC;AAC7B,MAAM,aAAa,GAAG,UAAU,CAAC;AACjC,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAErC,MAAM,UAAU,iBAAiB,CAAC,MAA0B;IAC1D,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;IAC3D,IAAI,MAAM,GAAG,aAAa,IAAI,MAAM,GAAG,aAAa,EAAE,CAAC;QACrD,OAAO;YACL,IAAI,EAAE,yBAAyB;YAC/B,MAAM,EAAE,MAAM;YACd,MAAM,EAAE;gBACN,MAAM,EAAE,sBAAsB;gBAC9B,GAAG,EAAE,MAAM;gBACX,GAAG,EAAE,aAAa;gBAClB,GAAG,EAAE,aAAa;aACnB;SACF,CAAC;IACJ,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;IACpE,IAAI,MAAM,GAAG,CAAC,IAAI,MAAM,GAAG,kBAAkB,EAAE,CAAC;QAC9C,OAAO;YACL,IAAI,EAAE,yBAAyB;YAC/B,MAAM,EAAE,MAAM;YACd,MAAM,EAAE;gBACN,MAAM,EAAE,2BAA2B;gBACnC,GAAG,EAAE,MAAM;gBACX,GAAG,EAAE,CAAC;gBACN,GAAG,EAAE,kBAAkB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AE,iBAAiB,KAAK,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;QACjE,MAAM,EAAE,iBAAiB,KAAK,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,iBAAiB,EAAE;KACvG,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,6BAA6B;IAC3C,OAAO;QACL,IAAI,EAAE,sBAAsB;QAC5B,MAAM,EAAE,eAAe;QACvB,MAAM,EAAE;YACN,MAAM,EACJ,uFAAuF;SAC1F;KACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"integrity.js","sourceRoot":"","sources":["../../../../../src/restorer/impls/prediction-v0-evaluator/checks/integrity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAMlE;;;;;GAKG;AACH,MAAM,aAAa,GAAG,MAAM,CAAC;AAC7B,MAAM,aAAa,GAAG,UAAU,CAAC;AACjC,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAErC,MAAM,UAAU,iBAAiB,CAAC,MAA0B;IAC1D,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;IAC3D,IAAI,MAAM,GAAG,aAAa,IAAI,MAAM,GAAG,aAAa,EAAE,CAAC;QACrD,OAAO;YACL,IAAI,EAAE,yBAAyB;YAC/B,MAAM,EAAE,MAAM;YACd,MAAM,EAAE;gBACN,MAAM,EAAE,sBAAsB;gBAC9B,GAAG,EAAE,MAAM;gBACX,GAAG,EAAE,aAAa;gBAClB,GAAG,EAAE,aAAa;aACnB;SACF,CAAC;IACJ,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,KA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QACb,OAAO,EAAE,IAAI,EAAE,8BAA8B,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;IACvF,CAAC;AACH,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,cAAc,CAAC,iBAAyB,EAAE,iBAAyB;IACjF,OAAO;QACL,IAAI,EAAE,sBAAsB;QAC5B,MAAM,EAAE,iBAAiB,KAAK,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;QACjE,MAAM,EAAE,iBAAiB,KAAK,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,iBAAiB,EAAE;KACvG,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,6BAA6B;IAC3C,OAAO;QACL,IAAI,EAAE,sBAAsB;QAC5B,MAAM,EAAE,eAAe;QACvB,MAAM,EAAE;YACN,MAAM,EACJ,uFAAuF;SAC1F;KACF,CAAC;AACJ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { RestorerImpl, RestorationContext, RestorationOutput, ReadyStatus } from '../../types.js';
2
- import type { DesiredState } from '../../../types/desired-state.js';
2
+ import type { RestorationJob } from '../../../types/desired-state.js';
3
3
  import { type SpanningResult } from '../../../venues/chainlink/client.js';
4
4
  export interface PredictionV0EvaluatorConfig {
5
5
  /** Set by {@link buildRestorerImpls} for CLI registries (no real signer). */
@@ -25,7 +25,7 @@ export declare class PredictionV0Evaluator implements RestorerImpl {
25
25
  type?: 'restoration' | 'evaluation';
26
26
  }): boolean;
27
27
  isReady(): Promise<ReadyStatus>;
28
- canAttempt(intent: DesiredState): Promise<{
28
+ canAttempt(intent: RestorationJob): Promise<{
29
29
  ok: true;
30
30
  } | {
31
31
  ok: false;