@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
package/dist/config.d.ts CHANGED
@@ -14,8 +14,8 @@
14
14
  * (mainnet V1, testnet V2) for JinnRouter claimDelivery encoding.
15
15
  */
16
16
  import { z } from 'zod';
17
- import type { DesiredState } from './types/desired-state.js';
18
- export declare const JinnConfigSchema: z.ZodObject<{
17
+ import type { RestorationJob } from './types/desired-state.js';
18
+ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
19
19
  /**
20
20
  * Network to connect to.
21
21
  * 'testnet' → Base Sepolia (default during Phase 1b; fast epochs, free funds).
@@ -31,6 +31,13 @@ export declare const JinnConfigSchema: z.ZodObject<{
31
31
  */
32
32
  rpcUrl: z.ZodOptional<z.ZodString>;
33
33
  archiveRpcUrl: z.ZodOptional<z.ZodString>;
34
+ /**
35
+ * Optional L2 proof/archive RPC endpoint for canonical cross-chain canaries.
36
+ * The daemon can use its normal rpcUrl for writes while proof construction
37
+ * uses this endpoint for historical eth_getProof at OP dispute-game blocks.
38
+ * Env: JINN_L2_PROOF_RPC_URL.
39
+ */
40
+ l2ProofRpcUrl: z.ZodOptional<z.ZodString>;
34
41
  /** Earning state directory */
35
42
  earningDir: z.ZodDefault<z.ZodString>;
36
43
  /** SQLite database path */
@@ -52,6 +59,16 @@ export declare const JinnConfigSchema: z.ZodObject<{
52
59
  balanceTopupIntervalMs: z.ZodDefault<z.ZodNumber>;
53
60
  /** HTTP API port */
54
61
  apiPort: z.ZodDefault<z.ZodNumber>;
62
+ /**
63
+ * Bind host for the HTTP API server. Defaults to `127.0.0.1` so the daemon
64
+ * is unreachable across the network out of the box — operators who need
65
+ * LAN access (or who terminate TLS in front of the daemon) opt in via this
66
+ * knob or `JINN_API_BIND_HOST`. Cost-mutating routes (`POST /artifacts`,
67
+ * `POST /v1/artifacts/acquire`) require a bearer token regardless; the
68
+ * bind host is the outer firewall.
69
+ * Env: JINN_API_BIND_HOST.
70
+ */
71
+ apiBindHost: z.ZodOptional<z.ZodString>;
55
72
  /** Path to claude CLI binary */
56
73
  claudePath: z.ZodDefault<z.ZodString>;
57
74
  /** Model for restoration/evaluation agent */
@@ -74,7 +91,7 @@ export declare const JinnConfigSchema: z.ZodObject<{
74
91
  /** Desired states to create and restore. Empty by default; testnet auto-intents fill the loop. */
75
92
  desiredStates: z.ZodDefault<z.ZodArray<z.ZodObject<{
76
93
  id: z.ZodOptional<z.ZodString>;
77
- description: z.ZodString;
94
+ description: z.ZodOptional<z.ZodString>;
78
95
  context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
79
96
  window: z.ZodOptional<z.ZodObject<{
80
97
  startTs: z.ZodNumber;
@@ -94,10 +111,156 @@ export declare const JinnConfigSchema: z.ZodObject<{
94
111
  kind: string;
95
112
  }>, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
96
113
  eligibility: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
114
+ intent: z.ZodOptional<z.ZodEffects<z.ZodObject<{
115
+ schemaVersion: z.ZodLiteral<"intent.v1">;
116
+ id: z.ZodString;
117
+ kind: z.ZodString;
118
+ description: z.ZodString;
119
+ window: z.ZodObject<{
120
+ startTs: z.ZodNumber;
121
+ endTs: z.ZodNumber;
122
+ }, "strip", z.ZodTypeAny, {
123
+ startTs: number;
124
+ endTs: number;
125
+ }, {
126
+ startTs: number;
127
+ endTs: number;
128
+ }>;
129
+ spec: z.ZodIntersection<z.ZodObject<{
130
+ kind: z.ZodString;
131
+ }, "strip", z.ZodTypeAny, {
132
+ kind: string;
133
+ }, {
134
+ kind: string;
135
+ }>, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
136
+ eligibility: z.ZodRecord<z.ZodString, z.ZodUnknown>;
137
+ creator: z.ZodObject<{
138
+ safeAddress: z.ZodString;
139
+ agentEoa: z.ZodString;
140
+ }, "strip", z.ZodTypeAny, {
141
+ safeAddress: string;
142
+ agentEoa: string;
143
+ }, {
144
+ safeAddress: string;
145
+ agentEoa: string;
146
+ }>;
147
+ createdAt: z.ZodNumber;
148
+ signature: z.ZodObject<{
149
+ algo: z.ZodLiteral<"secp256k1">;
150
+ signer: z.ZodString;
151
+ hash: z.ZodString;
152
+ sig: z.ZodString;
153
+ }, "strip", z.ZodTypeAny, {
154
+ hash: string;
155
+ algo: "secp256k1";
156
+ signer: string;
157
+ sig: string;
158
+ }, {
159
+ hash: string;
160
+ algo: "secp256k1";
161
+ signer: string;
162
+ sig: string;
163
+ }>;
164
+ }, "strip", z.ZodTypeAny, {
165
+ id: string;
166
+ signature: {
167
+ hash: string;
168
+ algo: "secp256k1";
169
+ signer: string;
170
+ sig: string;
171
+ };
172
+ schemaVersion: "intent.v1";
173
+ kind: string;
174
+ description: string;
175
+ window: {
176
+ startTs: number;
177
+ endTs: number;
178
+ };
179
+ spec: {
180
+ kind: string;
181
+ } & Record<string, unknown>;
182
+ eligibility: Record<string, unknown>;
183
+ creator: {
184
+ safeAddress: string;
185
+ agentEoa: string;
186
+ };
187
+ createdAt: number;
188
+ }, {
189
+ id: string;
190
+ signature: {
191
+ hash: string;
192
+ algo: "secp256k1";
193
+ signer: string;
194
+ sig: string;
195
+ };
196
+ schemaVersion: "intent.v1";
197
+ kind: string;
198
+ description: string;
199
+ window: {
200
+ startTs: number;
201
+ endTs: number;
202
+ };
203
+ spec: {
204
+ kind: string;
205
+ } & Record<string, unknown>;
206
+ eligibility: Record<string, unknown>;
207
+ creator: {
208
+ safeAddress: string;
209
+ agentEoa: string;
210
+ };
211
+ createdAt: number;
212
+ }>, {
213
+ id: string;
214
+ signature: {
215
+ hash: string;
216
+ algo: "secp256k1";
217
+ signer: string;
218
+ sig: string;
219
+ };
220
+ schemaVersion: "intent.v1";
221
+ kind: string;
222
+ description: string;
223
+ window: {
224
+ startTs: number;
225
+ endTs: number;
226
+ };
227
+ spec: {
228
+ kind: string;
229
+ } & Record<string, unknown>;
230
+ eligibility: Record<string, unknown>;
231
+ creator: {
232
+ safeAddress: string;
233
+ agentEoa: string;
234
+ };
235
+ createdAt: number;
236
+ }, {
237
+ id: string;
238
+ signature: {
239
+ hash: string;
240
+ algo: "secp256k1";
241
+ signer: string;
242
+ sig: string;
243
+ };
244
+ schemaVersion: "intent.v1";
245
+ kind: string;
246
+ description: string;
247
+ window: {
248
+ startTs: number;
249
+ endTs: number;
250
+ };
251
+ spec: {
252
+ kind: string;
253
+ } & Record<string, unknown>;
254
+ eligibility: Record<string, unknown>;
255
+ creator: {
256
+ safeAddress: string;
257
+ agentEoa: string;
258
+ };
259
+ createdAt: number;
260
+ }>>;
97
261
  }, "strip", z.ZodTypeAny, {
98
- description: string;
99
262
  id?: string | undefined;
100
- context?: Record<string, unknown> | undefined;
263
+ description?: string | undefined;
101
264
  window?: {
102
265
  startTs: number;
103
266
  endTs: number;
@@ -106,10 +269,35 @@ export declare const JinnConfigSchema: z.ZodObject<{
106
269
  kind: string;
107
270
  } & Record<string, unknown>) | undefined;
108
271
  eligibility?: Record<string, unknown> | undefined;
272
+ context?: Record<string, unknown> | undefined;
273
+ intent?: {
274
+ id: string;
275
+ signature: {
276
+ hash: string;
277
+ algo: "secp256k1";
278
+ signer: string;
279
+ sig: string;
280
+ };
281
+ schemaVersion: "intent.v1";
282
+ kind: string;
283
+ description: string;
284
+ window: {
285
+ startTs: number;
286
+ endTs: number;
287
+ };
288
+ spec: {
289
+ kind: string;
290
+ } & Record<string, unknown>;
291
+ eligibility: Record<string, unknown>;
292
+ creator: {
293
+ safeAddress: string;
294
+ agentEoa: string;
295
+ };
296
+ createdAt: number;
297
+ } | undefined;
109
298
  }, {
110
- description: string;
111
299
  id?: string | undefined;
112
- context?: Record<string, unknown> | undefined;
300
+ description?: string | undefined;
113
301
  window?: {
114
302
  startTs: number;
115
303
  endTs: number;
@@ -118,6 +306,32 @@ export declare const JinnConfigSchema: z.ZodObject<{
118
306
  kind: string;
119
307
  } & Record<string, unknown>) | undefined;
120
308
  eligibility?: Record<string, unknown> | undefined;
309
+ context?: Record<string, unknown> | undefined;
310
+ intent?: {
311
+ id: string;
312
+ signature: {
313
+ hash: string;
314
+ algo: "secp256k1";
315
+ signer: string;
316
+ sig: string;
317
+ };
318
+ schemaVersion: "intent.v1";
319
+ kind: string;
320
+ description: string;
321
+ window: {
322
+ startTs: number;
323
+ endTs: number;
324
+ };
325
+ spec: {
326
+ kind: string;
327
+ } & Record<string, unknown>;
328
+ eligibility: Record<string, unknown>;
329
+ creator: {
330
+ safeAddress: string;
331
+ agentEoa: string;
332
+ };
333
+ createdAt: number;
334
+ } | undefined;
121
335
  }>, "many">>;
122
336
  /** IPFS upload endpoint */
123
337
  ipfsRegistryUrl: z.ZodDefault<z.ZodString>;
@@ -133,6 +347,73 @@ export declare const JinnConfigSchema: z.ZodObject<{
133
347
  testnetStolasDeploymentPath: z.ZodOptional<z.ZodString>;
134
348
  /** Optional Base Sepolia ClaimRegistry deployment artifact path */
135
349
  testnetClaimRegistryDeploymentPath: z.ZodOptional<z.ZodString>;
350
+ /**
351
+ * Optional deployment artifact for the v0 MVI L1 stack
352
+ * (deployment-jinn-mvi-l1-{network}{,-fast}.json). Provides addresses for
353
+ * JINN, Timelock, JinnGovernor, JinnDistributor, and Messenger.
354
+ * When set the daemon enables the cross-chain JINN claim loop.
355
+ */
356
+ jinnMviL1DeploymentPath: z.ZodOptional<z.ZodString>;
357
+ /**
358
+ * Optional deployment artifact for the v0 MVI L2 emitter
359
+ * (deployment-jinn-mvi-l2-{network}.json). Provides the
360
+ * JinnClaimEmitter address on the measurement chain (Base / Base Sepolia).
361
+ */
362
+ jinnMviL2DeploymentPath: z.ZodOptional<z.ZodString>;
363
+ /**
364
+ * RPC endpoint for the L1 governance chain (Ethereum / Sepolia) where the
365
+ * JinnDistributor lives. Required when jinnDistributorAddress is set.
366
+ * Env: JINN_ETHEREUM_RPC_URL.
367
+ */
368
+ ethereumRpcUrl: z.ZodOptional<z.ZodString>;
369
+ /**
370
+ * Optional archive RPC endpoint for the L1 governance chain. Used for
371
+ * historical block lookups when constructing canonical-mode proofs.
372
+ * Env: JINN_ETHEREUM_ARCHIVE_RPC_URL.
373
+ */
374
+ ethereumArchiveRpcUrl: z.ZodOptional<z.ZodString>;
375
+ /**
376
+ * L1 network used by the cross-chain claim loop. 'sepolia' tracks Base
377
+ * Sepolia testnet; 'ethereum' tracks Base mainnet. Defaults to 'sepolia'
378
+ * during Phase 1b. Env: JINN_L1_NETWORK.
379
+ */
380
+ jinnL1Network: z.ZodDefault<z.ZodEnum<["sepolia", "ethereum"]>>;
381
+ /**
382
+ * JinnDistributor address on the L1 governance chain. Setting this enables
383
+ * the cross-chain claim loop. When set, ethereumRpcUrl MUST also be set.
384
+ * Resolved from jinnMviL1DeploymentPath when omitted; otherwise a manual
385
+ * override. Env: JINN_DISTRIBUTOR_ADDRESS.
386
+ */
387
+ jinnDistributorAddress: z.ZodOptional<z.ZodString>;
388
+ /**
389
+ * JinnClaimEmitter address on the L2 measurement chain (Base / Base
390
+ * Sepolia). Resolved from jinnMviL2DeploymentPath when omitted.
391
+ * Env: JINN_CLAIM_EMITTER_ADDRESS.
392
+ */
393
+ jinnClaimEmitterAddress: z.ZodOptional<z.ZodString>;
394
+ /**
395
+ * Messenger address on the L1 governance chain. Resolved from
396
+ * jinnMviL1DeploymentPath when omitted.
397
+ * Env: JINN_MESSENGER_ADDRESS.
398
+ */
399
+ jinnMessengerAddress: z.ZodOptional<z.ZodString>;
400
+ /**
401
+ * Messenger mode driving proof construction. `mock` submits MockMessenger
402
+ * fixtures — required for automated Sepolia burn-in (`runOnce`). `canonical`
403
+ * builds OP-Stack storage proofs for verifier-only checks; scheduled daemon
404
+ * ticks **skip** canonical mode (multi-day finality) — use
405
+ * `tsx scripts/verify-canonical-canary.ts` after finality instead. Defaults
406
+ * to `canonical`.
407
+ * Env: JINN_MESSENGER_MODE.
408
+ */
409
+ jinnMessengerMode: z.ZodDefault<z.ZodEnum<["canonical", "mock"]>>;
410
+ /**
411
+ * How often the daemon ticks the cross-chain JINN claim loop (ms). Default
412
+ * 3 600 000 (1 hour) — well below mainnet challenge windows while
413
+ * minimising RPC/gas churn. Set to 0 to disable when the address is set.
414
+ * Env: JINN_CLAIM_LOOP_INTERVAL_MS.
415
+ */
416
+ jinnClaimLoopIntervalMs: z.ZodDefault<z.ZodNumber>;
136
417
  /** Staking mode: 'standard' uses stOLAS (no OLAS needed), 'self-bond' uses operator-provided OLAS. */
137
418
  stakingMode: z.ZodDefault<z.ZodEnum<["standard", "self-bond"]>>;
138
419
  /** Number of services to bootstrap and run. */
@@ -147,6 +428,29 @@ export declare const JinnConfigSchema: z.ZodObject<{
147
428
  * Default is applied in bootstrap when unset. Env: JINN_MASTER_ETH_DAILY_WEI
148
429
  */
149
430
  masterEthDailyEstimateWei: z.ZodOptional<z.ZodString>;
431
+ /**
432
+ * Optional gas runway override for bootstrap/top-up targets (wei string).
433
+ * Used by Docker testnet acceptance to match the bundled faucet budget.
434
+ * Env: JINN_MIN_EOA_GAS_WEI
435
+ */
436
+ minEoaGasWei: z.ZodOptional<z.ZodString>;
437
+ /**
438
+ * Optional Safe ETH target override for bootstrap/top-up targets (wei string).
439
+ * Env: JINN_MIN_SAFE_ETH_WEI
440
+ */
441
+ minSafeEthWei: z.ZodOptional<z.ZodString>;
442
+ /**
443
+ * prediction.v0 auto-generator submission window (ms). Default 600000 (10 min).
444
+ * Docker acceptance gate sets 120000 to keep cycles tight.
445
+ * Env: JINN_PREDICTION_V0_WINDOW_MS
446
+ */
447
+ predictionV0WindowMs: z.ZodOptional<z.ZodNumber>;
448
+ /**
449
+ * prediction.v0 auto-generator gap from window end → resolveTs (ms).
450
+ * Default 300000 (5 min). Docker acceptance gate sets 60000.
451
+ * Env: JINN_PREDICTION_V0_RESOLVE_GAP_MS
452
+ */
453
+ predictionV0ResolveGapMs: z.ZodOptional<z.ZodNumber>;
150
454
  /**
151
455
  * Operator-controlled impl dispatch for the restorer engine.
152
456
  *
@@ -155,20 +459,120 @@ export declare const JinnConfigSchema: z.ZodObject<{
155
459
  * byKind: explicit spec.kind → impl name mapping (highest priority)
156
460
  * default: fallback impl name when no kind-specific match is found
157
461
  * disabled: impl names to exclude from dispatch entirely
462
+ * wrapWith: universal-wrap impl name (jinn-mono-0k2). When set AND
463
+ * registered + active + supports the ctx, that impl wins for
464
+ * every non-evaluation dispatch — bypassing byKind/default/
465
+ * first-match. Default ships as `'claude-code-learner'` so the
466
+ * learning envelope wraps every restoration kind. Operators set
467
+ * this to `null` (or any other registered wrapper-style impl
468
+ * name) to flip it off / swap it out. Evaluations always
469
+ * dispatch to specialists.
158
470
  */
159
471
  restorers: z.ZodOptional<z.ZodObject<{
160
472
  byKind: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
161
473
  default: z.ZodOptional<z.ZodString>;
162
474
  disabled: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
475
+ wrapWith: z.ZodOptional<z.ZodNullable<z.ZodString>>;
476
+ /**
477
+ * Operator-supplied external impls — Path 2 plug-in surface.
478
+ *
479
+ * Each entry points the daemon at a manifest-bearing package on disk
480
+ * (typically inside `node_modules/`); `client/src/main.ts` invokes
481
+ * `loadExternalImpl()` for each entry at boot, validates the manifest
482
+ * against `trustedImplSigners`, and registers the resulting impl in
483
+ * the restorer registry. See
484
+ * `docs/superpowers/plans/2026-04-30-plug-in-surface-path-2-foundation.md`
485
+ * step 5.7-5.8.
486
+ */
487
+ externalImpls: z.ZodOptional<z.ZodArray<z.ZodObject<{
488
+ name: z.ZodString;
489
+ entry: z.ZodString;
490
+ package: z.ZodOptional<z.ZodString>;
491
+ /**
492
+ * Optional pinned version. When set, the loader rejects the
493
+ * impl if its manifest's `version` does not match this string
494
+ * exactly — guards against silent upgrades of an on-disk
495
+ * package without an explicit operator config change
496
+ * (Finding 10).
497
+ */
498
+ version: z.ZodOptional<z.ZodString>;
499
+ }, "strip", z.ZodTypeAny, {
500
+ name: string;
501
+ entry: string;
502
+ package?: string | undefined;
503
+ version?: string | undefined;
504
+ }, {
505
+ name: string;
506
+ entry: string;
507
+ package?: string | undefined;
508
+ version?: string | undefined;
509
+ }>, "many">>;
163
510
  }, "strip", z.ZodTypeAny, {
164
511
  byKind?: Record<string, string> | undefined;
165
512
  default?: string | undefined;
166
513
  disabled?: string[] | undefined;
514
+ wrapWith?: string | null | undefined;
515
+ externalImpls?: {
516
+ name: string;
517
+ entry: string;
518
+ package?: string | undefined;
519
+ version?: string | undefined;
520
+ }[] | undefined;
167
521
  }, {
168
522
  byKind?: Record<string, string> | undefined;
169
523
  default?: string | undefined;
170
524
  disabled?: string[] | undefined;
525
+ wrapWith?: string | null | undefined;
526
+ externalImpls?: {
527
+ name: string;
528
+ entry: string;
529
+ package?: string | undefined;
530
+ version?: string | undefined;
531
+ }[] | undefined;
171
532
  }>>;
533
+ /**
534
+ * Trusted ed25519 publishers for external restorer impls. The daemon
535
+ * refuses to load any external impl whose manifest signature is not
536
+ * verifiable against one of these public keys.
537
+ *
538
+ * `publicKey` is base64-encoded raw ed25519. `label` is operator-facing
539
+ * provenance only.
540
+ */
541
+ trustedImplSigners: z.ZodOptional<z.ZodArray<z.ZodObject<{
542
+ alg: z.ZodLiteral<"ed25519">;
543
+ publicKey: z.ZodString;
544
+ label: z.ZodOptional<z.ZodString>;
545
+ }, "strip", z.ZodTypeAny, {
546
+ publicKey: string;
547
+ alg: "ed25519";
548
+ label?: string | undefined;
549
+ }, {
550
+ publicKey: string;
551
+ alg: "ed25519";
552
+ label?: string | undefined;
553
+ }>, "many">>;
554
+ /**
555
+ * Path 1 plug-ins for the bundled `claude-code-learner` impl — npm
556
+ * packages on disk that contribute phase-agent overrides, topic
557
+ * explorers, MCP tools, skill bundles, memory backends, or hooks via
558
+ * `jinn-plugin.json`.
559
+ *
560
+ * Each entry's `entry` is the absolute (or cwd-relative) path to the
561
+ * plug-in package root containing `package.json` + `jinn-plugin.json`.
562
+ * The CLI command `jinn plug-ins {list|add|remove|show}` edits this
563
+ * field. See spec/2026-04-30-plug-in-surface.md §4 and
564
+ * docs/superpowers/plans/2026-04-30-plug-in-surface-path-1-mechanism.md.
565
+ */
566
+ learnerPlugIns: z.ZodOptional<z.ZodArray<z.ZodObject<{
567
+ name: z.ZodString;
568
+ entry: z.ZodString;
569
+ }, "strip", z.ZodTypeAny, {
570
+ name: string;
571
+ entry: string;
572
+ }, {
573
+ name: string;
574
+ entry: string;
575
+ }>, "many">>;
172
576
  /**
173
577
  * Restoration engine durable directories (per-intent work + impl state).
174
578
  * Defaults under ~/.jinn-client/engine/. Env: JINN_ENGINE_WORKING_DIR_ROOT,
@@ -184,6 +588,79 @@ export declare const JinnConfigSchema: z.ZodObject<{
184
588
  workingDirRoot?: string | undefined;
185
589
  implStateDirRoot?: string | undefined;
186
590
  }>>;
591
+ /**
592
+ * Operator-local artifact serving configuration (Phase A.1, jinn-mono-vy37.1).
593
+ *
594
+ * Per spec/2026-04-30-phase-a-umbrella.md §1, restoration artifact bytes
595
+ * stay on the operator's filesystem (served_artifacts) and are dispensed
596
+ * via the operator's HTTP API with x402 gating when `priceUsdc > 0`. The
597
+ * envelope's `artifact.access.endpoint` field tells consumers where to
598
+ * fetch each artifact; `priceUsdc` declares the asking price.
599
+ *
600
+ * `publicEndpoint` is the externally-reachable base URL that gets stamped
601
+ * into every artifact descriptor. `defaultPriceUsdc` is the fallback price
602
+ * when neither OUTPUTS.json nor `perArtifactTypePrice` provides a value.
603
+ * `perArtifactTypePrice` lets operators charge per artifactType.
604
+ *
605
+ * Resolution precedence in `uploadArtifacts`:
606
+ * OUTPUTS.json `access.priceUsdc` > `perArtifactTypePrice[artifactType]`
607
+ * > `defaultPriceUsdc`.
608
+ *
609
+ * Env overrides:
610
+ * JINN_OPERATOR_PUBLIC_ENDPOINT
611
+ * JINN_OPERATOR_DEFAULT_PRICE_USDC
612
+ */
613
+ operator: z.ZodOptional<z.ZodObject<{
614
+ publicEndpoint: z.ZodString;
615
+ defaultPriceUsdc: z.ZodDefault<z.ZodString>;
616
+ perArtifactTypePrice: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
617
+ }, "strip", z.ZodTypeAny, {
618
+ publicEndpoint: string;
619
+ defaultPriceUsdc: string;
620
+ perArtifactTypePrice: Record<string, string>;
621
+ }, {
622
+ publicEndpoint: string;
623
+ defaultPriceUsdc?: string | undefined;
624
+ perArtifactTypePrice?: Record<string, string> | undefined;
625
+ }>>;
626
+ /**
627
+ * Run idempotent legacy migrations at daemon startup (jinn-mono-jgp:
628
+ * backfill `agent_id` on `complete` services that pre-date j07).
629
+ *
630
+ * Defaults to true — the migrations are no-ops on already-migrated
631
+ * fleets and cheap on Base. Operators on a flaky RPC or with locked
632
+ * funds can set this to false and run `jinn migrate-agent-id`
633
+ * explicitly.
634
+ *
635
+ * Env: JINN_RUN_LEGACY_MIGRATIONS=0|1.
636
+ */
637
+ runLegacyMigrations: z.ZodDefault<z.ZodBoolean>;
638
+ /**
639
+ * ERC-8004 Identity Registry contract address on the configured chain.
640
+ * Pre-rebuild config key (PR #37 cleanup left it in place). The post-rebuild
641
+ * client (jinn-mono-j07/3zk) reads the address from
642
+ * `client/src/erc8004/identity.ts` constants and from
643
+ * `EarningState.identity_registry_address`; this config key is currently
644
+ * unused but kept for backwards-compat with operator config files.
645
+ * Env: JINN_IDENTITY_REGISTRY_ADDRESS
646
+ */
647
+ identityRegistryAddress: z.ZodOptional<z.ZodString>;
648
+ /**
649
+ * ERC-8004 Validation Registry contract address on the configured chain.
650
+ * Pre-rebuild config key. The post-rebuild client (jinn-mono-9jg) reads the
651
+ * address from `client/src/erc8004/addresses.ts:VALIDATION_REGISTRY_ADDRESSES`;
652
+ * this config key is currently unused but kept for backwards-compat.
653
+ * Env: JINN_VALIDATION_REGISTRY_ADDRESS
654
+ */
655
+ validationRegistryAddress: z.ZodOptional<z.ZodString>;
656
+ /**
657
+ * Whether to enable the read-only reputation surface (query-time flag).
658
+ * Pre-rebuild config key. The post-rebuild client (jinn-mono-2ff/yg4) is
659
+ * always constructed when `agent_id` is set; this flag is currently unused
660
+ * but kept for backwards-compat.
661
+ * Env: JINN_REPUTATION_ENABLED
662
+ */
663
+ reputationEnabled: z.ZodDefault<z.ZodBoolean>;
187
664
  }, "strip", z.ZodTypeAny, {
188
665
  network: "testnet" | "mainnet";
189
666
  earningDir: string;
@@ -196,9 +673,8 @@ export declare const JinnConfigSchema: z.ZodObject<{
196
673
  claudeModel: string;
197
674
  peers: string[];
198
675
  desiredStates: {
199
- description: string;
200
676
  id?: string | undefined;
201
- context?: Record<string, unknown> | undefined;
677
+ description?: string | undefined;
202
678
  window?: {
203
679
  startTs: number;
204
680
  endTs: number;
@@ -207,14 +683,47 @@ export declare const JinnConfigSchema: z.ZodObject<{
207
683
  kind: string;
208
684
  } & Record<string, unknown>) | undefined;
209
685
  eligibility?: Record<string, unknown> | undefined;
686
+ context?: Record<string, unknown> | undefined;
687
+ intent?: {
688
+ id: string;
689
+ signature: {
690
+ hash: string;
691
+ algo: "secp256k1";
692
+ signer: string;
693
+ sig: string;
694
+ };
695
+ schemaVersion: "intent.v1";
696
+ kind: string;
697
+ description: string;
698
+ window: {
699
+ startTs: number;
700
+ endTs: number;
701
+ };
702
+ spec: {
703
+ kind: string;
704
+ } & Record<string, unknown>;
705
+ eligibility: Record<string, unknown>;
706
+ creator: {
707
+ safeAddress: string;
708
+ agentEoa: string;
709
+ };
710
+ createdAt: number;
711
+ } | undefined;
210
712
  }[];
211
713
  ipfsRegistryUrl: string;
212
714
  ipfsGatewayUrl: string;
715
+ jinnL1Network: "sepolia" | "ethereum";
716
+ jinnMessengerMode: "canonical" | "mock";
717
+ jinnClaimLoopIntervalMs: number;
213
718
  stakingMode: "standard" | "self-bond";
214
719
  targetServices: number;
215
720
  debug: boolean;
721
+ runLegacyMigrations: boolean;
722
+ reputationEnabled: boolean;
216
723
  rpcUrl?: string | undefined;
217
724
  archiveRpcUrl?: string | undefined;
725
+ l2ProofRpcUrl?: string | undefined;
726
+ apiBindHost?: string | undefined;
218
727
  runtimeMode?: "bare" | "docker-compose" | "container" | undefined;
219
728
  subgraphUrl?: string | undefined;
220
729
  nodeEndpoint?: string | undefined;
@@ -223,26 +732,62 @@ export declare const JinnConfigSchema: z.ZodObject<{
223
732
  testnetMechDeploymentPath?: string | undefined;
224
733
  testnetStolasDeploymentPath?: string | undefined;
225
734
  testnetClaimRegistryDeploymentPath?: string | undefined;
735
+ jinnMviL1DeploymentPath?: string | undefined;
736
+ jinnMviL2DeploymentPath?: string | undefined;
737
+ ethereumRpcUrl?: string | undefined;
738
+ ethereumArchiveRpcUrl?: string | undefined;
739
+ jinnDistributorAddress?: string | undefined;
740
+ jinnClaimEmitterAddress?: string | undefined;
741
+ jinnMessengerAddress?: string | undefined;
226
742
  masterEthDailyEstimateWei?: string | undefined;
743
+ minEoaGasWei?: string | undefined;
744
+ minSafeEthWei?: string | undefined;
745
+ predictionV0WindowMs?: number | undefined;
746
+ predictionV0ResolveGapMs?: number | undefined;
227
747
  restorers?: {
228
748
  byKind?: Record<string, string> | undefined;
229
749
  default?: string | undefined;
230
750
  disabled?: string[] | undefined;
751
+ wrapWith?: string | null | undefined;
752
+ externalImpls?: {
753
+ name: string;
754
+ entry: string;
755
+ package?: string | undefined;
756
+ version?: string | undefined;
757
+ }[] | undefined;
231
758
  } | undefined;
759
+ trustedImplSigners?: {
760
+ publicKey: string;
761
+ alg: "ed25519";
762
+ label?: string | undefined;
763
+ }[] | undefined;
764
+ learnerPlugIns?: {
765
+ name: string;
766
+ entry: string;
767
+ }[] | undefined;
232
768
  engine?: {
233
769
  workingDirRoot?: string | undefined;
234
770
  implStateDirRoot?: string | undefined;
235
771
  } | undefined;
772
+ operator?: {
773
+ publicEndpoint: string;
774
+ defaultPriceUsdc: string;
775
+ perArtifactTypePrice: Record<string, string>;
776
+ } | undefined;
777
+ identityRegistryAddress?: string | undefined;
778
+ validationRegistryAddress?: string | undefined;
236
779
  }, {
237
780
  network?: "testnet" | "mainnet" | undefined;
238
781
  rpcUrl?: string | undefined;
239
782
  archiveRpcUrl?: string | undefined;
783
+ l2ProofRpcUrl?: string | undefined;
240
784
  earningDir?: string | undefined;
241
785
  dbPath?: string | undefined;
242
786
  pollIntervalMs?: number | undefined;
243
787
  rewardClaimIntervalMs?: number | undefined;
244
788
  balanceTopupIntervalMs?: number | undefined;
245
789
  apiPort?: number | undefined;
790
+ apiBindHost?: string | undefined;
246
791
  claudePath?: string | undefined;
247
792
  claudeModel?: string | undefined;
248
793
  runtimeMode?: "bare" | "docker-compose" | "container" | undefined;
@@ -250,9 +795,238 @@ export declare const JinnConfigSchema: z.ZodObject<{
250
795
  subgraphUrl?: string | undefined;
251
796
  nodeEndpoint?: string | undefined;
252
797
  desiredStates?: {
253
- description: string;
254
798
  id?: string | undefined;
799
+ description?: string | undefined;
800
+ window?: {
801
+ startTs: number;
802
+ endTs: number;
803
+ } | undefined;
804
+ spec?: ({
805
+ kind: string;
806
+ } & Record<string, unknown>) | undefined;
807
+ eligibility?: Record<string, unknown> | undefined;
808
+ context?: Record<string, unknown> | undefined;
809
+ intent?: {
810
+ id: string;
811
+ signature: {
812
+ hash: string;
813
+ algo: "secp256k1";
814
+ signer: string;
815
+ sig: string;
816
+ };
817
+ schemaVersion: "intent.v1";
818
+ kind: string;
819
+ description: string;
820
+ window: {
821
+ startTs: number;
822
+ endTs: number;
823
+ };
824
+ spec: {
825
+ kind: string;
826
+ } & Record<string, unknown>;
827
+ eligibility: Record<string, unknown>;
828
+ creator: {
829
+ safeAddress: string;
830
+ agentEoa: string;
831
+ };
832
+ createdAt: number;
833
+ } | undefined;
834
+ }[] | undefined;
835
+ ipfsRegistryUrl?: string | undefined;
836
+ ipfsGatewayUrl?: string | undefined;
837
+ testnetL2DeploymentPath?: string | undefined;
838
+ testnetL2TokenDeploymentPath?: string | undefined;
839
+ testnetMechDeploymentPath?: string | undefined;
840
+ testnetStolasDeploymentPath?: string | undefined;
841
+ testnetClaimRegistryDeploymentPath?: string | undefined;
842
+ jinnMviL1DeploymentPath?: string | undefined;
843
+ jinnMviL2DeploymentPath?: string | undefined;
844
+ ethereumRpcUrl?: string | undefined;
845
+ ethereumArchiveRpcUrl?: string | undefined;
846
+ jinnL1Network?: "sepolia" | "ethereum" | undefined;
847
+ jinnDistributorAddress?: string | undefined;
848
+ jinnClaimEmitterAddress?: string | undefined;
849
+ jinnMessengerAddress?: string | undefined;
850
+ jinnMessengerMode?: "canonical" | "mock" | undefined;
851
+ jinnClaimLoopIntervalMs?: number | undefined;
852
+ stakingMode?: "standard" | "self-bond" | undefined;
853
+ targetServices?: number | undefined;
854
+ debug?: boolean | undefined;
855
+ masterEthDailyEstimateWei?: string | undefined;
856
+ minEoaGasWei?: string | undefined;
857
+ minSafeEthWei?: string | undefined;
858
+ predictionV0WindowMs?: number | undefined;
859
+ predictionV0ResolveGapMs?: number | undefined;
860
+ restorers?: {
861
+ byKind?: Record<string, string> | undefined;
862
+ default?: string | undefined;
863
+ disabled?: string[] | undefined;
864
+ wrapWith?: string | null | undefined;
865
+ externalImpls?: {
866
+ name: string;
867
+ entry: string;
868
+ package?: string | undefined;
869
+ version?: string | undefined;
870
+ }[] | undefined;
871
+ } | undefined;
872
+ trustedImplSigners?: {
873
+ publicKey: string;
874
+ alg: "ed25519";
875
+ label?: string | undefined;
876
+ }[] | undefined;
877
+ learnerPlugIns?: {
878
+ name: string;
879
+ entry: string;
880
+ }[] | undefined;
881
+ engine?: {
882
+ workingDirRoot?: string | undefined;
883
+ implStateDirRoot?: string | undefined;
884
+ } | undefined;
885
+ operator?: {
886
+ publicEndpoint: string;
887
+ defaultPriceUsdc?: string | undefined;
888
+ perArtifactTypePrice?: Record<string, string> | undefined;
889
+ } | undefined;
890
+ runLegacyMigrations?: boolean | undefined;
891
+ identityRegistryAddress?: string | undefined;
892
+ validationRegistryAddress?: string | undefined;
893
+ reputationEnabled?: boolean | undefined;
894
+ }>, {
895
+ network: "testnet" | "mainnet";
896
+ earningDir: string;
897
+ dbPath: string;
898
+ pollIntervalMs: number;
899
+ rewardClaimIntervalMs: number;
900
+ balanceTopupIntervalMs: number;
901
+ apiPort: number;
902
+ claudePath: string;
903
+ claudeModel: string;
904
+ peers: string[];
905
+ desiredStates: {
906
+ id?: string | undefined;
907
+ description?: string | undefined;
908
+ window?: {
909
+ startTs: number;
910
+ endTs: number;
911
+ } | undefined;
912
+ spec?: ({
913
+ kind: string;
914
+ } & Record<string, unknown>) | undefined;
915
+ eligibility?: Record<string, unknown> | undefined;
255
916
  context?: Record<string, unknown> | undefined;
917
+ intent?: {
918
+ id: string;
919
+ signature: {
920
+ hash: string;
921
+ algo: "secp256k1";
922
+ signer: string;
923
+ sig: string;
924
+ };
925
+ schemaVersion: "intent.v1";
926
+ kind: string;
927
+ description: string;
928
+ window: {
929
+ startTs: number;
930
+ endTs: number;
931
+ };
932
+ spec: {
933
+ kind: string;
934
+ } & Record<string, unknown>;
935
+ eligibility: Record<string, unknown>;
936
+ creator: {
937
+ safeAddress: string;
938
+ agentEoa: string;
939
+ };
940
+ createdAt: number;
941
+ } | undefined;
942
+ }[];
943
+ ipfsRegistryUrl: string;
944
+ ipfsGatewayUrl: string;
945
+ jinnL1Network: "sepolia" | "ethereum";
946
+ jinnMessengerMode: "canonical" | "mock";
947
+ jinnClaimLoopIntervalMs: number;
948
+ stakingMode: "standard" | "self-bond";
949
+ targetServices: number;
950
+ debug: boolean;
951
+ runLegacyMigrations: boolean;
952
+ reputationEnabled: boolean;
953
+ rpcUrl?: string | undefined;
954
+ archiveRpcUrl?: string | undefined;
955
+ l2ProofRpcUrl?: string | undefined;
956
+ apiBindHost?: string | undefined;
957
+ runtimeMode?: "bare" | "docker-compose" | "container" | undefined;
958
+ subgraphUrl?: string | undefined;
959
+ nodeEndpoint?: string | undefined;
960
+ testnetL2DeploymentPath?: string | undefined;
961
+ testnetL2TokenDeploymentPath?: string | undefined;
962
+ testnetMechDeploymentPath?: string | undefined;
963
+ testnetStolasDeploymentPath?: string | undefined;
964
+ testnetClaimRegistryDeploymentPath?: string | undefined;
965
+ jinnMviL1DeploymentPath?: string | undefined;
966
+ jinnMviL2DeploymentPath?: string | undefined;
967
+ ethereumRpcUrl?: string | undefined;
968
+ ethereumArchiveRpcUrl?: string | undefined;
969
+ jinnDistributorAddress?: string | undefined;
970
+ jinnClaimEmitterAddress?: string | undefined;
971
+ jinnMessengerAddress?: string | undefined;
972
+ masterEthDailyEstimateWei?: string | undefined;
973
+ minEoaGasWei?: string | undefined;
974
+ minSafeEthWei?: string | undefined;
975
+ predictionV0WindowMs?: number | undefined;
976
+ predictionV0ResolveGapMs?: number | undefined;
977
+ restorers?: {
978
+ byKind?: Record<string, string> | undefined;
979
+ default?: string | undefined;
980
+ disabled?: string[] | undefined;
981
+ wrapWith?: string | null | undefined;
982
+ externalImpls?: {
983
+ name: string;
984
+ entry: string;
985
+ package?: string | undefined;
986
+ version?: string | undefined;
987
+ }[] | undefined;
988
+ } | undefined;
989
+ trustedImplSigners?: {
990
+ publicKey: string;
991
+ alg: "ed25519";
992
+ label?: string | undefined;
993
+ }[] | undefined;
994
+ learnerPlugIns?: {
995
+ name: string;
996
+ entry: string;
997
+ }[] | undefined;
998
+ engine?: {
999
+ workingDirRoot?: string | undefined;
1000
+ implStateDirRoot?: string | undefined;
1001
+ } | undefined;
1002
+ operator?: {
1003
+ publicEndpoint: string;
1004
+ defaultPriceUsdc: string;
1005
+ perArtifactTypePrice: Record<string, string>;
1006
+ } | undefined;
1007
+ identityRegistryAddress?: string | undefined;
1008
+ validationRegistryAddress?: string | undefined;
1009
+ }, {
1010
+ network?: "testnet" | "mainnet" | undefined;
1011
+ rpcUrl?: string | undefined;
1012
+ archiveRpcUrl?: string | undefined;
1013
+ l2ProofRpcUrl?: string | undefined;
1014
+ earningDir?: string | undefined;
1015
+ dbPath?: string | undefined;
1016
+ pollIntervalMs?: number | undefined;
1017
+ rewardClaimIntervalMs?: number | undefined;
1018
+ balanceTopupIntervalMs?: number | undefined;
1019
+ apiPort?: number | undefined;
1020
+ apiBindHost?: string | undefined;
1021
+ claudePath?: string | undefined;
1022
+ claudeModel?: string | undefined;
1023
+ runtimeMode?: "bare" | "docker-compose" | "container" | undefined;
1024
+ peers?: string | string[] | undefined;
1025
+ subgraphUrl?: string | undefined;
1026
+ nodeEndpoint?: string | undefined;
1027
+ desiredStates?: {
1028
+ id?: string | undefined;
1029
+ description?: string | undefined;
256
1030
  window?: {
257
1031
  startTs: number;
258
1032
  endTs: number;
@@ -261,6 +1035,32 @@ export declare const JinnConfigSchema: z.ZodObject<{
261
1035
  kind: string;
262
1036
  } & Record<string, unknown>) | undefined;
263
1037
  eligibility?: Record<string, unknown> | undefined;
1038
+ context?: Record<string, unknown> | undefined;
1039
+ intent?: {
1040
+ id: string;
1041
+ signature: {
1042
+ hash: string;
1043
+ algo: "secp256k1";
1044
+ signer: string;
1045
+ sig: string;
1046
+ };
1047
+ schemaVersion: "intent.v1";
1048
+ kind: string;
1049
+ description: string;
1050
+ window: {
1051
+ startTs: number;
1052
+ endTs: number;
1053
+ };
1054
+ spec: {
1055
+ kind: string;
1056
+ } & Record<string, unknown>;
1057
+ eligibility: Record<string, unknown>;
1058
+ creator: {
1059
+ safeAddress: string;
1060
+ agentEoa: string;
1061
+ };
1062
+ createdAt: number;
1063
+ } | undefined;
264
1064
  }[] | undefined;
265
1065
  ipfsRegistryUrl?: string | undefined;
266
1066
  ipfsGatewayUrl?: string | undefined;
@@ -269,24 +1069,63 @@ export declare const JinnConfigSchema: z.ZodObject<{
269
1069
  testnetMechDeploymentPath?: string | undefined;
270
1070
  testnetStolasDeploymentPath?: string | undefined;
271
1071
  testnetClaimRegistryDeploymentPath?: string | undefined;
1072
+ jinnMviL1DeploymentPath?: string | undefined;
1073
+ jinnMviL2DeploymentPath?: string | undefined;
1074
+ ethereumRpcUrl?: string | undefined;
1075
+ ethereumArchiveRpcUrl?: string | undefined;
1076
+ jinnL1Network?: "sepolia" | "ethereum" | undefined;
1077
+ jinnDistributorAddress?: string | undefined;
1078
+ jinnClaimEmitterAddress?: string | undefined;
1079
+ jinnMessengerAddress?: string | undefined;
1080
+ jinnMessengerMode?: "canonical" | "mock" | undefined;
1081
+ jinnClaimLoopIntervalMs?: number | undefined;
272
1082
  stakingMode?: "standard" | "self-bond" | undefined;
273
1083
  targetServices?: number | undefined;
274
1084
  debug?: boolean | undefined;
275
1085
  masterEthDailyEstimateWei?: string | undefined;
1086
+ minEoaGasWei?: string | undefined;
1087
+ minSafeEthWei?: string | undefined;
1088
+ predictionV0WindowMs?: number | undefined;
1089
+ predictionV0ResolveGapMs?: number | undefined;
276
1090
  restorers?: {
277
1091
  byKind?: Record<string, string> | undefined;
278
1092
  default?: string | undefined;
279
1093
  disabled?: string[] | undefined;
1094
+ wrapWith?: string | null | undefined;
1095
+ externalImpls?: {
1096
+ name: string;
1097
+ entry: string;
1098
+ package?: string | undefined;
1099
+ version?: string | undefined;
1100
+ }[] | undefined;
280
1101
  } | undefined;
1102
+ trustedImplSigners?: {
1103
+ publicKey: string;
1104
+ alg: "ed25519";
1105
+ label?: string | undefined;
1106
+ }[] | undefined;
1107
+ learnerPlugIns?: {
1108
+ name: string;
1109
+ entry: string;
1110
+ }[] | undefined;
281
1111
  engine?: {
282
1112
  workingDirRoot?: string | undefined;
283
1113
  implStateDirRoot?: string | undefined;
284
1114
  } | undefined;
1115
+ operator?: {
1116
+ publicEndpoint: string;
1117
+ defaultPriceUsdc?: string | undefined;
1118
+ perArtifactTypePrice?: Record<string, string> | undefined;
1119
+ } | undefined;
1120
+ runLegacyMigrations?: boolean | undefined;
1121
+ identityRegistryAddress?: string | undefined;
1122
+ validationRegistryAddress?: string | undefined;
1123
+ reputationEnabled?: boolean | undefined;
285
1124
  }>;
286
1125
  /** JinnConfig with rpcUrl guaranteed to be resolved (never undefined) and desiredStates with id always assigned. */
287
1126
  export type JinnConfig = Omit<z.infer<typeof JinnConfigSchema>, 'rpcUrl' | 'desiredStates' | 'engine'> & {
288
1127
  rpcUrl: string;
289
- desiredStates: DesiredState[];
1128
+ desiredStates: RestorationJob[];
290
1129
  engine: {
291
1130
  workingDirRoot: string;
292
1131
  implStateDirRoot: string;
@@ -309,3 +1148,36 @@ export declare function loadConfig(configPath?: string): JinnConfig;
309
1148
  * Get the config file path from --config CLI arg, if provided.
310
1149
  */
311
1150
  export declare function getConfigPathFromArgs(argv?: string[]): string | undefined;
1151
+ export interface ConfigProvenance {
1152
+ /** Resolved config file path, or null if only defaults were used. */
1153
+ configPath: string | null;
1154
+ /** Whether a config file was found and loaded. */
1155
+ configLoaded: boolean;
1156
+ /** Resolved network. */
1157
+ network: 'mainnet' | 'testnet';
1158
+ /** Resolved earning state directory. */
1159
+ earningDir: string;
1160
+ /** Resolved SQLite database path. */
1161
+ dbPath: string;
1162
+ /** Resolved runtime mode, or null if auto-detected. */
1163
+ runtimeMode: string | null;
1164
+ /**
1165
+ * Env vars that were set and contributed to the resolved config.
1166
+ * Values are always `"set"` — never the actual value.
1167
+ * JINN_PASSWORD is never listed here.
1168
+ */
1169
+ envOverrides: Record<string, 'set'>;
1170
+ }
1171
+ /**
1172
+ * Build a structured provenance block describing how the config was resolved.
1173
+ *
1174
+ * Pass the same `configPath` you passed to `loadConfig`, and the resulting
1175
+ * `JinnConfig`. The helper inspects `process.env` to discover which tracked
1176
+ * env vars were set; it never reads their values.
1177
+ *
1178
+ * @param configPath — the explicit config file path passed to `loadConfig`,
1179
+ * or undefined if the default path was used.
1180
+ * @param config — the resolved `JinnConfig` returned by `loadConfig`.
1181
+ * @param env — defaults to `process.env`; inject in tests.
1182
+ */
1183
+ export declare function buildConfigProvenance(configPath: string | undefined, config: JinnConfig, env?: NodeJS.ProcessEnv): ConfigProvenance;