@jinn-network/client 0.1.2 → 0.1.3-canary.12cf8b76

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 (1266) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/CONTRIBUTING.md +8 -2
  3. package/README.md +67 -47
  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/deployments/deployment-task-coordinator-router-v3-baseSepolia-fast.json +38 -0
  10. package/dist/adapters/adapter.d.ts +19 -8
  11. package/dist/adapters/local/adapter.d.ts +10 -9
  12. package/dist/adapters/local/adapter.js +52 -79
  13. package/dist/adapters/local/adapter.js.map +1 -1
  14. package/dist/adapters/mech/adapter.d.ts +33 -15
  15. package/dist/adapters/mech/adapter.js +471 -353
  16. package/dist/adapters/mech/adapter.js.map +1 -1
  17. package/dist/adapters/mech/contracts.d.ts +68 -20
  18. package/dist/adapters/mech/contracts.js +338 -100
  19. package/dist/adapters/mech/contracts.js.map +1 -1
  20. package/dist/adapters/mech/ipfs.d.ts +66 -12
  21. package/dist/adapters/mech/ipfs.js +165 -30
  22. package/dist/adapters/mech/ipfs.js.map +1 -1
  23. package/dist/adapters/mech/safe-revert.d.ts +39 -0
  24. package/dist/adapters/mech/safe-revert.js +124 -0
  25. package/dist/adapters/mech/safe-revert.js.map +1 -0
  26. package/dist/adapters/mech/safe.js +48 -22
  27. package/dist/adapters/mech/safe.js.map +1 -1
  28. package/dist/adapters/mech/types.d.ts +245 -84
  29. package/dist/adapters/mech/types.js +125 -50
  30. package/dist/adapters/mech/types.js.map +1 -1
  31. package/dist/agent/agent-ws.d.ts +57 -0
  32. package/dist/agent/agent-ws.js +301 -0
  33. package/dist/agent/agent-ws.js.map +1 -0
  34. package/dist/agent/auto-mode-detect.d.ts +6 -0
  35. package/dist/agent/auto-mode-detect.js +44 -0
  36. package/dist/agent/auto-mode-detect.js.map +1 -0
  37. package/dist/agent/operator-claude.d.ts +22 -0
  38. package/dist/agent/operator-claude.js +134 -0
  39. package/dist/agent/operator-claude.js.map +1 -0
  40. package/dist/api/admin-endpoint.d.ts +12 -0
  41. package/dist/api/admin-endpoint.js +71 -0
  42. package/dist/api/admin-endpoint.js.map +1 -0
  43. package/dist/api/agent-binding-endpoint.d.ts +26 -0
  44. package/dist/api/agent-binding-endpoint.js +28 -0
  45. package/dist/api/agent-binding-endpoint.js.map +1 -0
  46. package/dist/api/bootstrap-endpoint.d.ts +24 -0
  47. package/dist/api/bootstrap-endpoint.js +103 -0
  48. package/dist/api/bootstrap-endpoint.js.map +1 -0
  49. package/dist/api/events-endpoint.d.ts +9 -0
  50. package/dist/api/events-endpoint.js +46 -0
  51. package/dist/api/events-endpoint.js.map +1 -0
  52. package/dist/api/fleet-build.d.ts +1 -1
  53. package/dist/api/fleet-build.js +17 -8
  54. package/dist/api/fleet-build.js.map +1 -1
  55. package/dist/api/gather-status.d.ts +16 -1
  56. package/dist/api/gather-status.js +163 -3
  57. package/dist/api/gather-status.js.map +1 -1
  58. package/dist/api/handshake.d.ts +17 -0
  59. package/dist/api/handshake.js +28 -0
  60. package/dist/api/handshake.js.map +1 -0
  61. package/dist/api/harness-status-endpoint.d.ts +20 -0
  62. package/dist/api/harness-status-endpoint.js +13 -0
  63. package/dist/api/harness-status-endpoint.js.map +1 -0
  64. package/dist/api/history-build.d.ts +2 -2
  65. package/dist/api/history-build.js +3 -3
  66. package/dist/api/history-build.js.map +1 -1
  67. package/dist/api/launcher-endpoints.d.ts +43 -0
  68. package/dist/api/launcher-endpoints.js +50 -0
  69. package/dist/api/launcher-endpoints.js.map +1 -0
  70. package/dist/api/launcher-status.d.ts +92 -0
  71. package/dist/api/launcher-status.js +82 -0
  72. package/dist/api/launcher-status.js.map +1 -0
  73. package/dist/api/launcher-tasks.d.ts +104 -0
  74. package/dist/api/launcher-tasks.js +83 -0
  75. package/dist/api/launcher-tasks.js.map +1 -0
  76. package/dist/api/leaderboard-api.d.ts +20 -0
  77. package/dist/api/leaderboard-api.js +18 -0
  78. package/dist/api/leaderboard-api.js.map +1 -0
  79. package/dist/api/peers.js +21 -6
  80. package/dist/api/peers.js.map +1 -1
  81. package/dist/api/portfolio-v0-build.d.ts +16 -10
  82. package/dist/api/portfolio-v0-build.js +36 -31
  83. package/dist/api/portfolio-v0-build.js.map +1 -1
  84. package/dist/api/portfolio-v0-doctor.js +1 -1
  85. package/dist/api/portfolio-v0-doctor.js.map +1 -1
  86. package/dist/api/prediction-v1-build.d.ts +65 -0
  87. package/dist/api/prediction-v1-build.js +73 -0
  88. package/dist/api/prediction-v1-build.js.map +1 -0
  89. package/dist/api/rewards-build.js +3 -8
  90. package/dist/api/rewards-build.js.map +1 -1
  91. package/dist/api/server.d.ts +97 -1
  92. package/dist/api/server.js +334 -16
  93. package/dist/api/server.js.map +1 -1
  94. package/dist/api/setup-endpoints.d.ts +62 -0
  95. package/dist/api/setup-endpoints.js +705 -0
  96. package/dist/api/setup-endpoints.js.map +1 -0
  97. package/dist/api/solvernets-catalog-build.d.ts +37 -0
  98. package/dist/api/solvernets-catalog-build.js +19 -0
  99. package/dist/api/solvernets-catalog-build.js.map +1 -0
  100. package/dist/api/solvernets-endpoint.d.ts +15 -0
  101. package/dist/api/solvernets-endpoint.js +5 -0
  102. package/dist/api/solvernets-endpoint.js.map +1 -0
  103. package/dist/api/solvernets-endpoints.d.ts +104 -0
  104. package/dist/api/solvernets-endpoints.js +1023 -0
  105. package/dist/api/solvernets-endpoints.js.map +1 -0
  106. package/dist/api/status-build.d.ts +15 -2
  107. package/dist/api/status-build.js +45 -9
  108. package/dist/api/status-build.js.map +1 -1
  109. package/dist/api/status-rollup-build.d.ts +46 -1
  110. package/dist/api/status-rollup-build.js +168 -5
  111. package/dist/api/status-rollup-build.js.map +1 -1
  112. package/dist/api/ui-token.d.ts +5 -0
  113. package/dist/api/ui-token.js +36 -0
  114. package/dist/api/ui-token.js.map +1 -0
  115. package/dist/build-info.d.ts +32 -0
  116. package/dist/build-info.js +69 -0
  117. package/dist/build-info.js.map +1 -0
  118. package/dist/build-info.json +6 -0
  119. package/dist/build-meta.json +1 -1
  120. package/dist/cli/command.d.ts +9 -0
  121. package/dist/cli/commands/auth.js +6 -3
  122. package/dist/cli/commands/auth.js.map +1 -1
  123. package/dist/cli/commands/balance.d.ts +7 -0
  124. package/dist/cli/commands/balance.js +38 -32
  125. package/dist/cli/commands/balance.js.map +1 -1
  126. package/dist/cli/commands/bootstrap.d.ts +13 -1
  127. package/dist/cli/commands/bootstrap.js +150 -133
  128. package/dist/cli/commands/bootstrap.js.map +1 -1
  129. package/dist/cli/commands/checkpoint.d.ts +85 -0
  130. package/dist/cli/commands/checkpoint.js +75 -0
  131. package/dist/cli/commands/checkpoint.js.map +1 -0
  132. package/dist/cli/commands/claim-rewards.js +14 -2
  133. package/dist/cli/commands/claim-rewards.js.map +1 -1
  134. package/dist/cli/commands/conformance.d.ts +12 -0
  135. package/dist/cli/commands/conformance.js +140 -0
  136. package/dist/cli/commands/conformance.js.map +1 -0
  137. package/dist/cli/commands/create.d.ts +22 -0
  138. package/dist/cli/commands/create.js +226 -0
  139. package/dist/cli/commands/create.js.map +1 -0
  140. package/dist/cli/commands/doctor.d.ts +49 -1
  141. package/dist/cli/commands/doctor.js +162 -134
  142. package/dist/cli/commands/doctor.js.map +1 -1
  143. package/dist/cli/commands/fleet-scale.d.ts +19 -1
  144. package/dist/cli/commands/fleet-scale.js +378 -361
  145. package/dist/cli/commands/fleet-scale.js.map +1 -1
  146. package/dist/cli/commands/fleet.d.ts +7 -0
  147. package/dist/cli/commands/fleet.js +39 -33
  148. package/dist/cli/commands/fleet.js.map +1 -1
  149. package/dist/cli/commands/fund-requirements.d.ts +14 -1
  150. package/dist/cli/commands/fund-requirements.js +182 -174
  151. package/dist/cli/commands/fund-requirements.js.map +1 -1
  152. package/dist/cli/commands/harnesses.d.ts +38 -0
  153. package/dist/cli/commands/harnesses.js +305 -0
  154. package/dist/cli/commands/harnesses.js.map +1 -0
  155. package/dist/cli/commands/history.d.ts +10 -1
  156. package/dist/cli/commands/history.js +68 -59
  157. package/dist/cli/commands/history.js.map +1 -1
  158. package/dist/cli/commands/init.js +4 -1
  159. package/dist/cli/commands/init.js.map +1 -1
  160. package/dist/cli/commands/integrations.d.ts +13 -0
  161. package/dist/cli/commands/integrations.js +1010 -0
  162. package/dist/cli/commands/integrations.js.map +1 -0
  163. package/dist/cli/commands/logs.d.ts +6 -1
  164. package/dist/cli/commands/logs.js +77 -70
  165. package/dist/cli/commands/logs.js.map +1 -1
  166. package/dist/cli/commands/migrate-agent-id.d.ts +26 -0
  167. package/dist/cli/commands/migrate-agent-id.js +164 -0
  168. package/dist/cli/commands/migrate-agent-id.js.map +1 -0
  169. package/dist/cli/commands/prediction-scoreboard.d.ts +10 -0
  170. package/dist/cli/commands/prediction-scoreboard.js +136 -0
  171. package/dist/cli/commands/prediction-scoreboard.js.map +1 -0
  172. package/dist/cli/commands/quickstart.d.ts +51 -1
  173. package/dist/cli/commands/quickstart.js +514 -296
  174. package/dist/cli/commands/quickstart.js.map +1 -1
  175. package/dist/cli/commands/rewards.d.ts +7 -0
  176. package/dist/cli/commands/rewards.js +46 -40
  177. package/dist/cli/commands/rewards.js.map +1 -1
  178. package/dist/cli/commands/run.d.ts +14 -1
  179. package/dist/cli/commands/run.js +243 -91
  180. package/dist/cli/commands/run.js.map +1 -1
  181. package/dist/cli/commands/solver-nets.js +229 -0
  182. package/dist/cli/commands/solver-nets.js.map +1 -0
  183. package/dist/cli/commands/solver-plugins.d.ts +9 -0
  184. package/dist/cli/commands/solver-plugins.js +186 -0
  185. package/dist/cli/commands/solver-plugins.js.map +1 -0
  186. package/dist/cli/commands/status.d.ts +13 -0
  187. package/dist/cli/commands/status.js +105 -34
  188. package/dist/cli/commands/status.js.map +1 -1
  189. package/dist/cli/commands/tasks.js +405 -0
  190. package/dist/cli/commands/tasks.js.map +1 -0
  191. package/dist/cli/commands/ui.d.ts +3 -0
  192. package/dist/cli/commands/ui.js +45 -0
  193. package/dist/cli/commands/ui.js.map +1 -0
  194. package/dist/cli/commands/update.d.ts +12 -0
  195. package/dist/cli/commands/update.js +321 -91
  196. package/dist/cli/commands/update.js.map +1 -1
  197. package/dist/cli/commands/version.js +3 -2
  198. package/dist/cli/commands/version.js.map +1 -1
  199. package/dist/cli/commands/withdraw.d.ts +21 -1
  200. package/dist/cli/commands/withdraw.js +175 -159
  201. package/dist/cli/commands/withdraw.js.map +1 -1
  202. package/dist/cli/deployment-digest.js +0 -5
  203. package/dist/cli/deployment-digest.js.map +1 -1
  204. package/dist/cli/execution-context.d.ts +1 -1
  205. package/dist/cli/execution-context.js +4 -4
  206. package/dist/cli/execution-context.js.map +1 -1
  207. package/dist/cli/help.js +8 -1
  208. package/dist/cli/help.js.map +1 -1
  209. package/dist/cli/index.d.ts +7 -0
  210. package/dist/cli/index.js +26 -6
  211. package/dist/cli/index.js.map +1 -1
  212. package/dist/cli/introspection-context.js +0 -1
  213. package/dist/cli/introspection-context.js.map +1 -1
  214. package/dist/cli/open-browser.d.ts +1 -0
  215. package/dist/cli/open-browser.js +18 -0
  216. package/dist/cli/open-browser.js.map +1 -0
  217. package/dist/cli/password.d.ts +3 -3
  218. package/dist/cli/password.js +6 -6
  219. package/dist/cli/password.js.map +1 -1
  220. package/dist/cli/task-native-readiness.d.ts +27 -0
  221. package/dist/cli/task-native-readiness.js +170 -0
  222. package/dist/cli/task-native-readiness.js.map +1 -0
  223. package/dist/config.d.ts +1771 -57
  224. package/dist/config.js +527 -31
  225. package/dist/config.js.map +1 -1
  226. package/dist/conformance/checks/artifacts.d.ts +37 -0
  227. package/dist/conformance/checks/artifacts.js +110 -0
  228. package/dist/conformance/checks/artifacts.js.map +1 -0
  229. package/dist/conformance/checks/envelope-schema.d.ts +17 -0
  230. package/dist/conformance/checks/envelope-schema.js +36 -0
  231. package/dist/conformance/checks/envelope-schema.js.map +1 -0
  232. package/dist/conformance/checks/hash-signature.d.ts +26 -0
  233. package/dist/conformance/checks/hash-signature.js +70 -0
  234. package/dist/conformance/checks/hash-signature.js.map +1 -0
  235. package/dist/conformance/checks/payload.d.ts +19 -0
  236. package/dist/conformance/checks/payload.js +52 -0
  237. package/dist/conformance/checks/payload.js.map +1 -0
  238. package/dist/conformance/checks/secret-scrub.d.ts +33 -0
  239. package/dist/conformance/checks/secret-scrub.js +118 -0
  240. package/dist/conformance/checks/secret-scrub.js.map +1 -0
  241. package/dist/conformance/checks/source-runtime.d.ts +43 -0
  242. package/dist/conformance/checks/source-runtime.js +68 -0
  243. package/dist/conformance/checks/source-runtime.js.map +1 -0
  244. package/dist/conformance/checks/source-static.d.ts +61 -0
  245. package/dist/conformance/checks/source-static.js +311 -0
  246. package/dist/conformance/checks/source-static.js.map +1 -0
  247. package/dist/conformance/checks/trajectory-chain.d.ts +18 -0
  248. package/dist/conformance/checks/trajectory-chain.js +51 -0
  249. package/dist/conformance/checks/trajectory-chain.js.map +1 -0
  250. package/dist/conformance/checks/trajectory-profile.d.ts +17 -0
  251. package/dist/conformance/checks/trajectory-profile.js +51 -0
  252. package/dist/conformance/checks/trajectory-profile.js.map +1 -0
  253. package/dist/conformance/checks/trajectory-schema.d.ts +20 -0
  254. package/dist/conformance/checks/trajectory-schema.js +40 -0
  255. package/dist/conformance/checks/trajectory-schema.js.map +1 -0
  256. package/dist/conformance/checks/verdict.d.ts +44 -0
  257. package/dist/conformance/checks/verdict.js +122 -0
  258. package/dist/conformance/checks/verdict.js.map +1 -0
  259. package/dist/conformance/harness.d.ts +32 -0
  260. package/dist/conformance/harness.js +227 -0
  261. package/dist/conformance/harness.js.map +1 -0
  262. package/dist/conformance/types.d.ts +88 -0
  263. package/dist/conformance/types.js +31 -0
  264. package/dist/conformance/types.js.map +1 -0
  265. package/dist/corpus/acquire.d.ts +37 -0
  266. package/dist/corpus/acquire.js +155 -0
  267. package/dist/corpus/acquire.js.map +1 -0
  268. package/dist/corpus/cache.d.ts +14 -0
  269. package/dist/corpus/cache.js +18 -0
  270. package/dist/corpus/cache.js.map +1 -0
  271. package/dist/corpus/envelope-projection.d.ts +12 -0
  272. package/dist/corpus/envelope-projection.js +110 -0
  273. package/dist/corpus/envelope-projection.js.map +1 -0
  274. package/dist/corpus/fetch.d.ts +9 -0
  275. package/dist/corpus/fetch.js +24 -0
  276. package/dist/corpus/fetch.js.map +1 -0
  277. package/dist/corpus/index.d.ts +19 -0
  278. package/dist/corpus/index.js +81 -0
  279. package/dist/corpus/index.js.map +1 -0
  280. package/dist/corpus/prediction-brier-scoreboard-report.d.ts +17 -0
  281. package/dist/corpus/prediction-brier-scoreboard-report.js +148 -0
  282. package/dist/corpus/prediction-brier-scoreboard-report.js.map +1 -0
  283. package/dist/corpus/prediction-brier-scoreboard.d.ts +56 -0
  284. package/dist/corpus/prediction-brier-scoreboard.js +269 -0
  285. package/dist/corpus/prediction-brier-scoreboard.js.map +1 -0
  286. package/dist/corpus/prediction-scoreable-verdicts.d.ts +4 -0
  287. package/dist/corpus/prediction-scoreable-verdicts.js +23 -0
  288. package/dist/corpus/prediction-scoreable-verdicts.js.map +1 -0
  289. package/dist/corpus/query.d.ts +17 -0
  290. package/dist/corpus/query.js +108 -0
  291. package/dist/corpus/query.js.map +1 -0
  292. package/dist/corpus/route-resolver.d.ts +16 -0
  293. package/dist/corpus/route-resolver.js +20 -0
  294. package/dist/corpus/route-resolver.js.map +1 -0
  295. package/dist/corpus/types.d.ts +150 -0
  296. package/dist/corpus/types.js +50 -0
  297. package/dist/corpus/types.js.map +1 -0
  298. package/dist/daemon/balance-topup-loop.js +2 -1
  299. package/dist/daemon/balance-topup-loop.js.map +1 -1
  300. package/dist/daemon/creator.d.ts +7 -7
  301. package/dist/daemon/creator.js +11 -14
  302. package/dist/daemon/creator.js.map +1 -1
  303. package/dist/daemon/daemon.d.ts +83 -31
  304. package/dist/daemon/daemon.js +206 -67
  305. package/dist/daemon/daemon.js.map +1 -1
  306. package/dist/daemon/delivery-watcher.js +50 -4
  307. package/dist/daemon/delivery-watcher.js.map +1 -1
  308. package/dist/daemon/freeze-fence.d.ts +42 -0
  309. package/dist/daemon/freeze-fence.js +71 -0
  310. package/dist/daemon/freeze-fence.js.map +1 -0
  311. package/dist/daemon/jinn-claim-loop-canonical.d.ts +207 -0
  312. package/dist/daemon/jinn-claim-loop-canonical.js +296 -0
  313. package/dist/daemon/jinn-claim-loop-canonical.js.map +1 -0
  314. package/dist/daemon/jinn-claim-loop-mock.d.ts +61 -0
  315. package/dist/daemon/jinn-claim-loop-mock.js +122 -0
  316. package/dist/daemon/jinn-claim-loop-mock.js.map +1 -0
  317. package/dist/daemon/jinn-claim-loop.d.ts +123 -0
  318. package/dist/daemon/jinn-claim-loop.js +256 -0
  319. package/dist/daemon/jinn-claim-loop.js.map +1 -0
  320. package/dist/daemon/reward-claim-loop.d.ts +2 -0
  321. package/dist/daemon/reward-claim-loop.js +32 -27
  322. package/dist/daemon/reward-claim-loop.js.map +1 -1
  323. package/dist/dashboard/assets/index-C4Vp0vkW.js +76 -0
  324. package/dist/dashboard/assets/index-a0yafmyT.css +32 -0
  325. package/dist/dashboard/index.html +18 -74
  326. package/dist/earning/agent-wallet-binding.d.ts +133 -0
  327. package/dist/earning/agent-wallet-binding.js +202 -0
  328. package/dist/earning/agent-wallet-binding.js.map +1 -0
  329. package/dist/earning/bootstrap.d.ts +88 -1
  330. package/dist/earning/bootstrap.js +409 -56
  331. package/dist/earning/bootstrap.js.map +1 -1
  332. package/dist/earning/contracts.d.ts +328 -6
  333. package/dist/earning/contracts.js +295 -14
  334. package/dist/earning/contracts.js.map +1 -1
  335. package/dist/earning/evidence-simhash.d.ts +1 -1
  336. package/dist/earning/faucet.d.ts +31 -0
  337. package/dist/earning/faucet.js +37 -0
  338. package/dist/earning/faucet.js.map +1 -1
  339. package/dist/earning/funding-plan.d.ts +89 -0
  340. package/dist/earning/funding-plan.js +202 -0
  341. package/dist/earning/funding-plan.js.map +1 -0
  342. package/dist/earning/migrate-agent-id.d.ts +129 -0
  343. package/dist/earning/migrate-agent-id.js +256 -0
  344. package/dist/earning/migrate-agent-id.js.map +1 -0
  345. package/dist/earning/orphan-sweep.d.ts +14 -0
  346. package/dist/earning/orphan-sweep.js +63 -2
  347. package/dist/earning/orphan-sweep.js.map +1 -1
  348. package/dist/earning/reconcile.d.ts +2 -0
  349. package/dist/earning/reconcile.js +30 -0
  350. package/dist/earning/reconcile.js.map +1 -1
  351. package/dist/earning/safe-adapter.js +45 -3
  352. package/dist/earning/safe-adapter.js.map +1 -1
  353. package/dist/earning/stolas-claim.d.ts +86 -6
  354. package/dist/earning/stolas-claim.js +123 -9
  355. package/dist/earning/stolas-claim.js.map +1 -1
  356. package/dist/earning/store.d.ts +47 -0
  357. package/dist/earning/store.js +113 -1
  358. package/dist/earning/store.js.map +1 -1
  359. package/dist/earning/testnet-setup-migration.d.ts +32 -0
  360. package/dist/earning/testnet-setup-migration.js +214 -0
  361. package/dist/earning/testnet-setup-migration.js.map +1 -0
  362. package/dist/earning/types.d.ts +57 -9
  363. package/dist/earning/types.js +51 -2
  364. package/dist/earning/types.js.map +1 -1
  365. package/dist/earning/viem-clients.d.ts +20 -0
  366. package/dist/earning/viem-clients.js +32 -1
  367. package/dist/earning/viem-clients.js.map +1 -1
  368. package/dist/erc8004/abis.d.ts +423 -0
  369. package/dist/erc8004/abis.js +265 -0
  370. package/dist/erc8004/abis.js.map +1 -0
  371. package/dist/erc8004/addresses.d.ts +40 -0
  372. package/dist/erc8004/addresses.js +64 -0
  373. package/dist/erc8004/addresses.js.map +1 -0
  374. package/dist/erc8004/identity.d.ts +273 -0
  375. package/dist/erc8004/identity.js +405 -0
  376. package/dist/erc8004/identity.js.map +1 -0
  377. package/dist/erc8004/index.d.ts +13 -0
  378. package/dist/erc8004/index.js +20 -0
  379. package/dist/erc8004/index.js.map +1 -0
  380. package/dist/erc8004/reputation.d.ts +349 -0
  381. package/dist/erc8004/reputation.js +464 -0
  382. package/dist/erc8004/reputation.js.map +1 -0
  383. package/dist/erc8004/subgraph.d.ts +46 -0
  384. package/dist/erc8004/subgraph.js +37 -0
  385. package/dist/erc8004/subgraph.js.map +1 -0
  386. package/dist/erc8004/validation.d.ts +145 -0
  387. package/dist/erc8004/validation.js +219 -0
  388. package/dist/erc8004/validation.js.map +1 -0
  389. package/dist/errors/persisted-bootstrap-error.d.ts +4 -0
  390. package/dist/errors/persisted-bootstrap-error.js +50 -0
  391. package/dist/errors/persisted-bootstrap-error.js.map +1 -0
  392. package/dist/events/emitter.d.ts +12 -0
  393. package/dist/events/emitter.js +23 -0
  394. package/dist/events/emitter.js.map +1 -0
  395. package/dist/events/ring-buffer.d.ts +25 -0
  396. package/dist/events/ring-buffer.js +46 -0
  397. package/dist/events/ring-buffer.js.map +1 -0
  398. package/dist/events/types.d.ts +42 -0
  399. package/dist/events/types.js +28 -0
  400. package/dist/events/types.js.map +1 -0
  401. package/dist/harnesses/capability/index.d.ts +82 -0
  402. package/dist/harnesses/capability/index.js +12 -0
  403. package/dist/harnesses/capability/index.js.map +1 -0
  404. package/dist/harnesses/capability/scoped-rpc.d.ts +12 -0
  405. package/dist/harnesses/capability/scoped-rpc.js +34 -0
  406. package/dist/harnesses/capability/scoped-rpc.js.map +1 -0
  407. package/dist/harnesses/capability/scoped-secrets.d.ts +8 -0
  408. package/dist/harnesses/capability/scoped-secrets.js +10 -0
  409. package/dist/harnesses/capability/scoped-secrets.js.map +1 -0
  410. package/dist/harnesses/capability/scoped-signer.d.ts +46 -0
  411. package/dist/harnesses/capability/scoped-signer.js +73 -0
  412. package/dist/harnesses/capability/scoped-signer.js.map +1 -0
  413. package/dist/harnesses/engine/canonical-json.d.ts +1 -0
  414. package/dist/harnesses/engine/canonical-json.js +66 -0
  415. package/dist/harnesses/engine/canonical-json.js.map +1 -0
  416. package/dist/harnesses/engine/delivery.d.ts +58 -0
  417. package/dist/harnesses/engine/delivery.js +67 -0
  418. package/dist/harnesses/engine/delivery.js.map +1 -0
  419. package/dist/harnesses/engine/engine.d.ts +516 -0
  420. package/dist/harnesses/engine/engine.js +1544 -0
  421. package/dist/harnesses/engine/engine.js.map +1 -0
  422. package/dist/harnesses/engine/envelope-assembly.d.ts +73 -0
  423. package/dist/harnesses/engine/envelope-assembly.js +60 -0
  424. package/dist/harnesses/engine/envelope-assembly.js.map +1 -0
  425. package/dist/harnesses/engine/packaging.d.ts +87 -0
  426. package/dist/harnesses/engine/packaging.js +376 -0
  427. package/dist/harnesses/engine/packaging.js.map +1 -0
  428. package/dist/harnesses/engine/persistence.d.ts +193 -0
  429. package/dist/harnesses/engine/persistence.js +421 -0
  430. package/dist/harnesses/engine/persistence.js.map +1 -0
  431. package/dist/harnesses/engine/recovery.d.ts +22 -0
  432. package/dist/harnesses/engine/recovery.js +24 -0
  433. package/dist/harnesses/engine/recovery.js.map +1 -0
  434. package/dist/harnesses/engine/registry.d.ts +55 -0
  435. package/dist/harnesses/engine/registry.js +65 -0
  436. package/dist/harnesses/engine/registry.js.map +1 -0
  437. package/dist/harnesses/engine/signing.d.ts +30 -0
  438. package/dist/harnesses/engine/signing.js +39 -0
  439. package/dist/harnesses/engine/signing.js.map +1 -0
  440. package/dist/harnesses/engine/state.d.ts +42 -0
  441. package/dist/harnesses/engine/state.js +87 -0
  442. package/dist/harnesses/engine/state.js.map +1 -0
  443. package/dist/harnesses/engine/validate-manifest.d.ts +23 -0
  444. package/dist/harnesses/engine/validate-manifest.js +49 -0
  445. package/dist/harnesses/engine/validate-manifest.js.map +1 -0
  446. package/dist/harnesses/engine/verification-stub.d.ts +18 -0
  447. package/dist/harnesses/engine/verification-stub.js +18 -0
  448. package/dist/harnesses/engine/verification-stub.js.map +1 -0
  449. package/dist/harnesses/external-impls/index.d.ts +3 -0
  450. package/dist/harnesses/external-impls/index.js +2 -0
  451. package/dist/harnesses/external-impls/index.js.map +1 -0
  452. package/dist/harnesses/external-impls/loader.d.ts +50 -0
  453. package/dist/harnesses/external-impls/loader.js +139 -0
  454. package/dist/harnesses/external-impls/loader.js.map +1 -0
  455. package/dist/harnesses/external-impls/package-hash.d.ts +26 -0
  456. package/dist/harnesses/external-impls/package-hash.js +102 -0
  457. package/dist/harnesses/external-impls/package-hash.js.map +1 -0
  458. package/dist/harnesses/external-impls/types.d.ts +42 -0
  459. package/dist/harnesses/external-impls/types.js +10 -0
  460. package/dist/harnesses/external-impls/types.js.map +1 -0
  461. package/dist/harnesses/freeze.d.ts +34 -0
  462. package/dist/harnesses/freeze.js +60 -0
  463. package/dist/harnesses/freeze.js.map +1 -0
  464. package/dist/harnesses/impls/claude-code-learner/adapters/claude-code.d.ts +57 -0
  465. package/dist/harnesses/impls/claude-code-learner/adapters/claude-code.js +235 -0
  466. package/dist/harnesses/impls/claude-code-learner/adapters/claude-code.js.map +1 -0
  467. package/dist/harnesses/impls/claude-code-learner/harness.d.ts +22 -0
  468. package/dist/harnesses/impls/claude-code-learner/harness.js +56 -0
  469. package/dist/harnesses/impls/claude-code-learner/harness.js.map +1 -0
  470. package/dist/harnesses/impls/claude-code-learner/harvest.d.ts +20 -0
  471. package/dist/harnesses/impls/claude-code-learner/harvest.js +426 -0
  472. package/dist/harnesses/impls/claude-code-learner/harvest.js.map +1 -0
  473. package/dist/harnesses/impls/claude-code-learner/index.d.ts +14 -0
  474. package/dist/harnesses/impls/claude-code-learner/index.js +13 -0
  475. package/dist/harnesses/impls/claude-code-learner/index.js.map +1 -0
  476. package/dist/harnesses/impls/claude-code-learner/plugin-path.d.ts +14 -0
  477. package/dist/harnesses/impls/claude-code-learner/plugin-path.js +30 -0
  478. package/dist/harnesses/impls/claude-code-learner/plugin-path.js.map +1 -0
  479. package/dist/harnesses/impls/claude-code-learner/test-utils/fake-plugin-outputs.d.ts +50 -0
  480. package/dist/harnesses/impls/claude-code-learner/test-utils/fake-plugin-outputs.js +192 -0
  481. package/dist/harnesses/impls/claude-code-learner/test-utils/fake-plugin-outputs.js.map +1 -0
  482. package/dist/harnesses/impls/claude-code-learner/test-utils/noop-adapter.d.ts +22 -0
  483. package/dist/harnesses/impls/claude-code-learner/test-utils/noop-adapter.js +35 -0
  484. package/dist/harnesses/impls/claude-code-learner/test-utils/noop-adapter.js.map +1 -0
  485. package/dist/harnesses/impls/claude-code-learner/types.d.ts +112 -0
  486. package/dist/harnesses/impls/claude-code-learner/types.js.map +1 -0
  487. package/dist/harnesses/impls/claude-mcp-hyperliquid/api-wallet.d.ts +64 -0
  488. package/dist/harnesses/impls/claude-mcp-hyperliquid/api-wallet.js.map +1 -0
  489. package/dist/harnesses/impls/claude-mcp-hyperliquid/index.d.ts +106 -0
  490. package/dist/harnesses/impls/claude-mcp-hyperliquid/index.js +723 -0
  491. package/dist/harnesses/impls/claude-mcp-hyperliquid/index.js.map +1 -0
  492. package/dist/harnesses/impls/claude-mcp-hyperliquid/mcp-tools.js.map +1 -0
  493. package/dist/harnesses/impls/claude-mcp-hyperliquid/safety-rails.js.map +1 -0
  494. package/dist/harnesses/impls/claude-mcp-hyperliquid/session-orchestrator.d.ts +104 -0
  495. package/dist/harnesses/impls/claude-mcp-hyperliquid/session-orchestrator.js +264 -0
  496. package/dist/harnesses/impls/claude-mcp-hyperliquid/session-orchestrator.js.map +1 -0
  497. package/dist/harnesses/impls/claude-mcp-prediction/index.d.ts +44 -0
  498. package/dist/harnesses/impls/claude-mcp-prediction/index.js +250 -0
  499. package/dist/harnesses/impls/claude-mcp-prediction/index.js.map +1 -0
  500. package/dist/harnesses/impls/claude-mcp-prediction/mcp-tools.js +135 -0
  501. package/dist/harnesses/impls/claude-mcp-prediction/mcp-tools.js.map +1 -0
  502. package/dist/harnesses/impls/claude-mcp-prediction/prompt.d.ts +8 -0
  503. package/dist/harnesses/impls/claude-mcp-prediction/prompt.js +54 -0
  504. package/dist/harnesses/impls/claude-mcp-prediction/prompt.js.map +1 -0
  505. package/dist/harnesses/impls/claude-mcp-prediction/session-orchestrator.d.ts +43 -0
  506. package/dist/harnesses/impls/claude-mcp-prediction/session-orchestrator.js +21 -0
  507. package/dist/harnesses/impls/claude-mcp-prediction/session-orchestrator.js.map +1 -0
  508. package/dist/harnesses/impls/claude-mcp-prediction/types.d.ts +84 -0
  509. package/dist/harnesses/impls/claude-mcp-prediction/types.js +6 -0
  510. package/dist/harnesses/impls/claude-mcp-prediction/types.js.map +1 -0
  511. package/dist/harnesses/impls/claude-mcp-prediction-apy/index.d.ts +36 -0
  512. package/dist/harnesses/impls/claude-mcp-prediction-apy/index.js +241 -0
  513. package/dist/harnesses/impls/claude-mcp-prediction-apy/index.js.map +1 -0
  514. package/dist/harnesses/impls/claude-mcp-prediction-apy/mcp-tools.js +136 -0
  515. package/dist/harnesses/impls/claude-mcp-prediction-apy/mcp-tools.js.map +1 -0
  516. package/dist/harnesses/impls/claude-mcp-prediction-apy/prompt.d.ts +7 -0
  517. package/dist/harnesses/impls/claude-mcp-prediction-apy/prompt.js +46 -0
  518. package/dist/harnesses/impls/claude-mcp-prediction-apy/prompt.js.map +1 -0
  519. package/dist/harnesses/impls/claude-mcp-prediction-apy/session-orchestrator.d.ts +37 -0
  520. package/dist/harnesses/impls/claude-mcp-prediction-apy/session-orchestrator.js +19 -0
  521. package/dist/harnesses/impls/claude-mcp-prediction-apy/session-orchestrator.js.map +1 -0
  522. package/dist/harnesses/impls/claude-mcp-prediction-apy/types.d.ts +64 -0
  523. package/dist/harnesses/impls/claude-mcp-prediction-apy/types.js +6 -0
  524. package/dist/harnesses/impls/claude-mcp-prediction-apy/types.js.map +1 -0
  525. package/dist/harnesses/impls/claude-mcp-shared/single-session-orchestrator.d.ts +84 -0
  526. package/dist/harnesses/impls/claude-mcp-shared/single-session-orchestrator.js +206 -0
  527. package/dist/harnesses/impls/claude-mcp-shared/single-session-orchestrator.js.map +1 -0
  528. package/dist/harnesses/impls/evaluation-context.d.ts +23 -0
  529. package/dist/harnesses/impls/evaluation-context.js +25 -0
  530. package/dist/harnesses/impls/evaluation-context.js.map +1 -0
  531. package/dist/harnesses/impls/index.d.ts +74 -0
  532. package/dist/harnesses/impls/index.js +112 -0
  533. package/dist/harnesses/impls/index.js.map +1 -0
  534. package/dist/harnesses/impls/legacy-claude/index.d.ts +66 -0
  535. package/dist/harnesses/impls/legacy-claude/index.js +168 -0
  536. package/dist/harnesses/impls/legacy-claude/index.js.map +1 -0
  537. package/dist/harnesses/impls/portfolio-v0-evaluator/canonical-metrics.d.ts +68 -0
  538. package/dist/harnesses/impls/portfolio-v0-evaluator/canonical-metrics.js +117 -0
  539. package/dist/harnesses/impls/portfolio-v0-evaluator/canonical-metrics.js.map +1 -0
  540. package/dist/harnesses/impls/portfolio-v0-evaluator/checks/availability.js.map +1 -0
  541. package/dist/harnesses/impls/portfolio-v0-evaluator/checks/consistency.d.ts +78 -0
  542. package/dist/harnesses/impls/portfolio-v0-evaluator/checks/consistency.js +274 -0
  543. package/dist/harnesses/impls/portfolio-v0-evaluator/checks/consistency.js.map +1 -0
  544. package/dist/harnesses/impls/portfolio-v0-evaluator/checks/eligibility.d.ts +23 -0
  545. package/dist/harnesses/impls/portfolio-v0-evaluator/checks/eligibility.js +49 -0
  546. package/dist/harnesses/impls/portfolio-v0-evaluator/checks/eligibility.js.map +1 -0
  547. package/dist/harnesses/impls/portfolio-v0-evaluator/checks/integrity.d.ts +25 -0
  548. package/dist/harnesses/impls/portfolio-v0-evaluator/checks/integrity.js +44 -0
  549. package/dist/harnesses/impls/portfolio-v0-evaluator/checks/integrity.js.map +1 -0
  550. package/dist/harnesses/impls/portfolio-v0-evaluator/checks/spec.d.ts +17 -0
  551. package/dist/harnesses/impls/portfolio-v0-evaluator/checks/spec.js +43 -0
  552. package/dist/harnesses/impls/portfolio-v0-evaluator/checks/spec.js.map +1 -0
  553. package/dist/harnesses/impls/portfolio-v0-evaluator/index.d.ts +44 -0
  554. package/dist/harnesses/impls/portfolio-v0-evaluator/index.js +569 -0
  555. package/dist/harnesses/impls/portfolio-v0-evaluator/index.js.map +1 -0
  556. package/dist/harnesses/impls/portfolio-v0-evaluator/score.js.map +1 -0
  557. package/dist/harnesses/impls/portfolio-v0-evaluator/types.d.ts +34 -0
  558. package/dist/harnesses/impls/portfolio-v0-evaluator/types.js.map +1 -0
  559. package/dist/harnesses/impls/prediction-apy-v0-baseline/index.d.ts +42 -0
  560. package/dist/harnesses/impls/prediction-apy-v0-baseline/index.js +114 -0
  561. package/dist/harnesses/impls/prediction-apy-v0-baseline/index.js.map +1 -0
  562. package/dist/harnesses/impls/prediction-apy-v0-baseline/strategy.js.map +1 -0
  563. package/dist/harnesses/impls/prediction-apy-v0-baseline/types.js.map +1 -0
  564. package/dist/harnesses/impls/prediction-apy-v0-evaluator/canonical-metrics.d.ts +6 -0
  565. package/dist/harnesses/impls/prediction-apy-v0-evaluator/canonical-metrics.js +11 -0
  566. package/dist/harnesses/impls/prediction-apy-v0-evaluator/canonical-metrics.js.map +1 -0
  567. package/dist/harnesses/impls/prediction-apy-v0-evaluator/index.d.ts +42 -0
  568. package/dist/harnesses/impls/prediction-apy-v0-evaluator/index.js +346 -0
  569. package/dist/harnesses/impls/prediction-apy-v0-evaluator/index.js.map +1 -0
  570. package/dist/harnesses/impls/prediction-apy-v0-evaluator/parse-submission.d.ts +16 -0
  571. package/dist/harnesses/impls/prediction-apy-v0-evaluator/parse-submission.js +22 -0
  572. package/dist/harnesses/impls/prediction-apy-v0-evaluator/parse-submission.js.map +1 -0
  573. package/dist/harnesses/impls/prediction-apy-v0-evaluator/score.js.map +1 -0
  574. package/dist/harnesses/impls/prediction-apy-v0-evaluator/types.js.map +1 -0
  575. package/dist/harnesses/impls/prediction-v0-baseline/index.d.ts +33 -0
  576. package/dist/harnesses/impls/prediction-v0-baseline/index.js +109 -0
  577. package/dist/harnesses/impls/prediction-v0-baseline/index.js.map +1 -0
  578. package/dist/harnesses/impls/prediction-v0-baseline/strategy.d.ts +8 -0
  579. package/dist/harnesses/impls/prediction-v0-baseline/strategy.js +41 -0
  580. package/dist/harnesses/impls/prediction-v0-baseline/strategy.js.map +1 -0
  581. package/dist/harnesses/impls/prediction-v0-baseline/types.d.ts +7 -0
  582. package/dist/harnesses/impls/prediction-v0-baseline/types.js.map +1 -0
  583. package/dist/harnesses/impls/prediction-v0-evaluator/canonical-metrics.d.ts +20 -0
  584. package/dist/harnesses/impls/prediction-v0-evaluator/canonical-metrics.js.map +1 -0
  585. package/dist/harnesses/impls/prediction-v0-evaluator/checks/availability.d.ts +9 -0
  586. package/dist/harnesses/impls/prediction-v0-evaluator/checks/availability.js.map +1 -0
  587. package/dist/harnesses/impls/prediction-v0-evaluator/checks/eligibility.d.ts +3 -0
  588. package/dist/harnesses/impls/prediction-v0-evaluator/checks/eligibility.js.map +1 -0
  589. package/dist/harnesses/impls/prediction-v0-evaluator/checks/integrity.d.ts +15 -0
  590. package/dist/harnesses/impls/prediction-v0-evaluator/checks/integrity.js +111 -0
  591. package/dist/harnesses/impls/prediction-v0-evaluator/checks/integrity.js.map +1 -0
  592. package/dist/harnesses/impls/prediction-v0-evaluator/checks/spec.d.ts +5 -0
  593. package/dist/harnesses/impls/prediction-v0-evaluator/checks/spec.js.map +1 -0
  594. package/dist/harnesses/impls/prediction-v0-evaluator/index.d.ts +36 -0
  595. package/dist/harnesses/impls/prediction-v0-evaluator/index.js +342 -0
  596. package/dist/harnesses/impls/prediction-v0-evaluator/index.js.map +1 -0
  597. package/dist/harnesses/impls/prediction-v0-evaluator/score.js.map +1 -0
  598. package/dist/harnesses/impls/prediction-v0-evaluator/types.js +2 -0
  599. package/dist/harnesses/impls/prediction-v0-evaluator/types.js.map +1 -0
  600. package/dist/harnesses/impls/prediction-v1-baseline/index.d.ts +31 -0
  601. package/dist/harnesses/impls/prediction-v1-baseline/index.js +79 -0
  602. package/dist/harnesses/impls/prediction-v1-baseline/index.js.map +1 -0
  603. package/dist/harnesses/impls/prediction-v1-evaluator/index.d.ts +32 -0
  604. package/dist/harnesses/impls/prediction-v1-evaluator/index.js +219 -0
  605. package/dist/harnesses/impls/prediction-v1-evaluator/index.js.map +1 -0
  606. package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.d.ts +20 -0
  607. package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.js +88 -0
  608. package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.js.map +1 -0
  609. package/dist/harnesses/impls/swe-rebench-v2-evaluator/index.d.ts +56 -0
  610. package/dist/harnesses/impls/swe-rebench-v2-evaluator/index.js +40 -0
  611. package/dist/harnesses/impls/swe-rebench-v2-evaluator/index.js.map +1 -0
  612. package/dist/harnesses/manifest/index.d.ts +3 -0
  613. package/dist/harnesses/manifest/index.js +3 -0
  614. package/dist/harnesses/manifest/index.js.map +1 -0
  615. package/dist/harnesses/manifest/load.d.ts +7 -0
  616. package/dist/harnesses/manifest/load.js +49 -0
  617. package/dist/harnesses/manifest/load.js.map +1 -0
  618. package/dist/harnesses/manifest/types.d.ts +75 -0
  619. package/dist/harnesses/manifest/types.js +8 -0
  620. package/dist/harnesses/manifest/types.js.map +1 -0
  621. package/dist/harnesses/manifest/verify.d.ts +15 -0
  622. package/dist/harnesses/manifest/verify.js +53 -0
  623. package/dist/harnesses/manifest/verify.js.map +1 -0
  624. package/dist/harnesses/mode-state.d.ts +7 -0
  625. package/dist/harnesses/mode-state.js +43 -0
  626. package/dist/harnesses/mode-state.js.map +1 -0
  627. package/dist/harnesses/types.d.ts +274 -0
  628. package/dist/harnesses/types.js +28 -0
  629. package/dist/harnesses/types.js.map +1 -0
  630. package/dist/index.d.ts +1 -1
  631. package/dist/main.d.ts +17 -2
  632. package/dist/main.js +1257 -127
  633. package/dist/main.js.map +1 -1
  634. package/dist/mcp/acquire-artifact.d.ts +39 -0
  635. package/dist/mcp/acquire-artifact.js +163 -0
  636. package/dist/mcp/acquire-artifact.js.map +1 -0
  637. package/dist/mcp/operator-server.d.ts +21 -4
  638. package/dist/mcp/operator-server.js +505 -30
  639. package/dist/mcp/operator-server.js.map +1 -1
  640. package/dist/mcp/search-records.d.ts +92 -0
  641. package/dist/mcp/search-records.js +393 -0
  642. package/dist/mcp/search-records.js.map +1 -0
  643. package/dist/mcp/server.d.ts +4 -4
  644. package/dist/mcp/server.js +148 -61
  645. package/dist/mcp/server.js.map +1 -1
  646. package/dist/observability/emit-event.d.ts +2 -2
  647. package/dist/observability/emit-event.js +2 -2
  648. package/dist/observability/emit-event.js.map +1 -1
  649. package/dist/operator-errors.d.ts +14 -0
  650. package/dist/operator-errors.js +39 -10
  651. package/dist/operator-errors.js.map +1 -1
  652. package/dist/plugins/digest.d.ts +1 -0
  653. package/dist/plugins/digest.js +28 -0
  654. package/dist/plugins/digest.js.map +1 -0
  655. package/dist/plugins/index.d.ts +6 -0
  656. package/dist/plugins/index.js +6 -0
  657. package/dist/plugins/index.js.map +1 -0
  658. package/dist/plugins/manifest.d.ts +7 -0
  659. package/dist/plugins/manifest.js +22 -0
  660. package/dist/plugins/manifest.js.map +1 -0
  661. package/dist/plugins/registry.d.ts +9 -0
  662. package/dist/plugins/registry.js +24 -0
  663. package/dist/plugins/registry.js.map +1 -0
  664. package/dist/plugins/resolvers.d.ts +2 -0
  665. package/dist/plugins/resolvers.js +126 -0
  666. package/dist/plugins/resolvers.js.map +1 -0
  667. package/dist/plugins/types.d.ts +35 -0
  668. package/dist/plugins/types.js +2 -0
  669. package/dist/plugins/types.js.map +1 -0
  670. package/dist/plugins/validator.d.ts +3 -0
  671. package/dist/plugins/validator.js +50 -0
  672. package/dist/plugins/validator.js.map +1 -0
  673. package/dist/preflight/claude-auth.d.ts +14 -12
  674. package/dist/preflight/claude-auth.js +23 -37
  675. package/dist/preflight/claude-auth.js.map +1 -1
  676. package/dist/runner/claude.d.ts +3 -3
  677. package/dist/runner/claude.js +62 -26
  678. package/dist/runner/claude.js.map +1 -1
  679. package/dist/runner/runner.d.ts +29 -2
  680. package/dist/runner/simple.d.ts +2 -2
  681. package/dist/runner/simple.js +2 -2
  682. package/dist/runner/simple.js.map +1 -1
  683. package/dist/scripts/fix-node-pty.mjs +62 -0
  684. package/dist/setup/claude-code-install.d.ts +19 -0
  685. package/dist/setup/claude-code-install.js +51 -0
  686. package/dist/setup/claude-code-install.js.map +1 -0
  687. package/dist/setup-mode.d.ts +34 -0
  688. package/dist/setup-mode.js +49 -0
  689. package/dist/setup-mode.js.map +1 -0
  690. package/dist/solver-nets/contracts.d.ts +2 -0
  691. package/dist/solver-nets/contracts.js +2 -0
  692. package/dist/solver-nets/contracts.js.map +1 -0
  693. package/dist/solver-nets/prediction-operator-ux.d.ts +112 -0
  694. package/dist/solver-nets/prediction-operator-ux.js +456 -0
  695. package/dist/solver-nets/prediction-operator-ux.js.map +1 -0
  696. package/dist/solver-nets/registry.d.ts +50 -0
  697. package/dist/solver-nets/registry.js +150 -0
  698. package/dist/solver-nets/registry.js.map +1 -0
  699. package/dist/solver-types/_swe-rebench-v2-aggregate.d.ts +31 -0
  700. package/dist/solver-types/_swe-rebench-v2-aggregate.js +49 -0
  701. package/dist/solver-types/_swe-rebench-v2-aggregate.js.map +1 -0
  702. package/dist/solver-types/_swe-rebench-v2-escrow.d.ts +27 -0
  703. package/dist/solver-types/_swe-rebench-v2-escrow.js +26 -0
  704. package/dist/solver-types/_swe-rebench-v2-escrow.js.map +1 -0
  705. package/dist/solver-types/_swe-rebench-v2-pool.d.ts +39 -0
  706. package/dist/solver-types/_swe-rebench-v2-pool.js +66 -0
  707. package/dist/solver-types/_swe-rebench-v2-pool.js.map +1 -0
  708. package/dist/solver-types/_swe-rebench-v2-state.d.ts +24 -0
  709. package/dist/solver-types/_swe-rebench-v2-state.js +54 -0
  710. package/dist/solver-types/_swe-rebench-v2-state.js.map +1 -0
  711. package/dist/solver-types/constants.d.ts +5 -0
  712. package/dist/solver-types/constants.js +6 -0
  713. package/dist/solver-types/constants.js.map +1 -0
  714. package/dist/solver-types/index.d.ts +10 -0
  715. package/dist/solver-types/index.js +30 -0
  716. package/dist/solver-types/index.js.map +1 -0
  717. package/dist/solver-types/learner-loop-test.d.ts +2 -0
  718. package/dist/solver-types/learner-loop-test.js +39 -0
  719. package/dist/solver-types/learner-loop-test.js.map +1 -0
  720. package/dist/solver-types/portfolio-v0.d.ts +2 -0
  721. package/dist/solver-types/portfolio-v0.js +13 -0
  722. package/dist/solver-types/portfolio-v0.js.map +1 -0
  723. package/dist/solver-types/prediction-apy-v0-auto.d.ts +27 -0
  724. package/dist/solver-types/prediction-apy-v0-auto.js +109 -0
  725. package/dist/solver-types/prediction-apy-v0-auto.js.map +1 -0
  726. package/dist/solver-types/prediction-apy-v0-template.d.ts +8 -0
  727. package/dist/solver-types/prediction-apy-v0-template.js +22 -0
  728. package/dist/solver-types/prediction-apy-v0-template.js.map +1 -0
  729. package/dist/solver-types/prediction-apy-v0.d.ts +3 -0
  730. package/dist/solver-types/prediction-apy-v0.js +25 -0
  731. package/dist/solver-types/prediction-apy-v0.js.map +1 -0
  732. package/dist/solver-types/prediction-v0-auto.d.ts +69 -0
  733. package/dist/solver-types/prediction-v0-auto.js +146 -0
  734. package/dist/solver-types/prediction-v0-auto.js.map +1 -0
  735. package/dist/solver-types/prediction-v0-template.d.ts +70 -0
  736. package/dist/solver-types/prediction-v0-template.js +145 -0
  737. package/dist/solver-types/prediction-v0-template.js.map +1 -0
  738. package/dist/solver-types/prediction-v0.d.ts +13 -0
  739. package/dist/solver-types/prediction-v0.js +31 -0
  740. package/dist/solver-types/prediction-v0.js.map +1 -0
  741. package/dist/solver-types/prediction-v1-auto.d.ts +122 -0
  742. package/dist/solver-types/prediction-v1-auto.js +366 -0
  743. package/dist/solver-types/prediction-v1-auto.js.map +1 -0
  744. package/dist/solver-types/prediction-v1.d.ts +11 -0
  745. package/dist/solver-types/prediction-v1.js +27 -0
  746. package/dist/solver-types/prediction-v1.js.map +1 -0
  747. package/dist/solver-types/solver-type.d.ts +53 -0
  748. package/dist/solver-types/solver-type.js +6 -0
  749. package/dist/solver-types/solver-type.js.map +1 -0
  750. package/dist/solver-types/swe-rebench-v2-auto.d.ts +38 -0
  751. package/dist/solver-types/swe-rebench-v2-auto.js +56 -0
  752. package/dist/solver-types/swe-rebench-v2-auto.js.map +1 -0
  753. package/dist/solver-types/swe-rebench-v2.d.ts +24 -0
  754. package/dist/solver-types/swe-rebench-v2.js +146 -0
  755. package/dist/solver-types/swe-rebench-v2.js.map +1 -0
  756. package/dist/solvernets/daemon-init.d.ts +291 -0
  757. package/dist/solvernets/daemon-init.js +431 -0
  758. package/dist/solvernets/daemon-init.js.map +1 -0
  759. package/dist/solvernets/launch-state-machine.d.ts +165 -0
  760. package/dist/solvernets/launch-state-machine.js +406 -0
  761. package/dist/solvernets/launch-state-machine.js.map +1 -0
  762. package/dist/solvernets/lifecycle-transitions.d.ts +183 -0
  763. package/dist/solvernets/lifecycle-transitions.js +386 -0
  764. package/dist/solvernets/lifecycle-transitions.js.map +1 -0
  765. package/dist/solvernets/manifest.d.ts +120 -0
  766. package/dist/solvernets/manifest.js +166 -0
  767. package/dist/solvernets/manifest.js.map +1 -0
  768. package/dist/solvernets/most-recent-wins.d.ts +77 -0
  769. package/dist/solvernets/most-recent-wins.js +82 -0
  770. package/dist/solvernets/most-recent-wins.js.map +1 -0
  771. package/dist/solvernets/registry-client-erc8004.d.ts +239 -0
  772. package/dist/solvernets/registry-client-erc8004.js +382 -0
  773. package/dist/solvernets/registry-client-erc8004.js.map +1 -0
  774. package/dist/solvernets/registry-client.d.ts +121 -0
  775. package/dist/solvernets/registry-client.js +19 -0
  776. package/dist/solvernets/registry-client.js.map +1 -0
  777. package/dist/solvernets/store.d.ts +298 -0
  778. package/dist/solvernets/store.js +271 -0
  779. package/dist/solvernets/store.js.map +1 -0
  780. package/dist/store/store.d.ts +175 -21
  781. package/dist/store/store.js +711 -46
  782. package/dist/store/store.js.map +1 -1
  783. package/dist/tasks/posting-service.d.ts +25 -0
  784. package/dist/tasks/posting-service.js +149 -0
  785. package/dist/tasks/posting-service.js.map +1 -0
  786. package/dist/tasks/signing.d.ts +4 -0
  787. package/dist/tasks/signing.js +18 -0
  788. package/dist/tasks/signing.js.map +1 -0
  789. package/dist/tasks/sources.d.ts +46 -0
  790. package/dist/tasks/sources.js +45 -0
  791. package/dist/tasks/sources.js.map +1 -0
  792. package/dist/templates/harnesses/alternative-harness/README.md.tmpl +44 -0
  793. package/dist/templates/harnesses/alternative-harness/gitignore.tmpl +3 -0
  794. package/dist/templates/harnesses/alternative-harness/jinn.manifest.json.tmpl +22 -0
  795. package/dist/templates/harnesses/alternative-harness/package.json.tmpl +26 -0
  796. package/dist/templates/harnesses/alternative-harness/src/coordinator.ts.tmpl +50 -0
  797. package/dist/templates/harnesses/alternative-harness/src/harness.ts.tmpl +31 -0
  798. package/dist/templates/harnesses/alternative-harness/src/index.ts.tmpl +44 -0
  799. package/dist/templates/harnesses/alternative-harness/src/mock-harness.ts.tmpl +41 -0
  800. package/dist/templates/harnesses/alternative-harness/src/phases/debrief.ts.tmpl +28 -0
  801. package/dist/templates/harnesses/alternative-harness/src/phases/execute.ts.tmpl +33 -0
  802. package/dist/templates/harnesses/alternative-harness/src/phases/improve.ts.tmpl +31 -0
  803. package/dist/templates/harnesses/alternative-harness/src/phases/memory.ts.tmpl +31 -0
  804. package/dist/templates/harnesses/alternative-harness/src/phases/orient.ts.tmpl +21 -0
  805. package/dist/templates/harnesses/alternative-harness/src/phases/plan.ts.tmpl +25 -0
  806. package/dist/templates/harnesses/alternative-harness/src/phases/strategize.ts.tmpl +29 -0
  807. package/dist/templates/harnesses/alternative-harness/test/coordinator.test.ts.tmpl +53 -0
  808. package/dist/templates/harnesses/alternative-harness/test/unit.test.ts.tmpl +55 -0
  809. package/dist/templates/harnesses/alternative-harness/tsconfig.json.tmpl +16 -0
  810. package/dist/templates/harnesses/evaluator/README.md.tmpl +36 -0
  811. package/dist/templates/harnesses/evaluator/gitignore.tmpl +3 -0
  812. package/dist/templates/harnesses/evaluator/jinn.manifest.json.tmpl +22 -0
  813. package/dist/templates/harnesses/evaluator/package.json.tmpl +26 -0
  814. package/dist/templates/harnesses/evaluator/src/index.ts.tmpl +35 -0
  815. package/dist/templates/harnesses/evaluator/test/unit.test.ts.tmpl +49 -0
  816. package/dist/templates/harnesses/evaluator/tsconfig.json.tmpl +16 -0
  817. package/dist/templates/harnesses/forecaster/README.md.tmpl +25 -0
  818. package/dist/templates/harnesses/forecaster/gitignore.tmpl +5 -0
  819. package/dist/templates/harnesses/forecaster/jinn.manifest.json.tmpl +22 -0
  820. package/dist/templates/harnesses/forecaster/package.json.tmpl +26 -0
  821. package/dist/templates/harnesses/forecaster/src/index.ts.tmpl +33 -0
  822. package/dist/templates/harnesses/forecaster/test/unit.test.ts.tmpl +42 -0
  823. package/dist/templates/harnesses/forecaster/tsconfig.json.tmpl +16 -0
  824. package/dist/trajectory/collector.d.ts +49 -0
  825. package/dist/trajectory/collector.js +86 -0
  826. package/dist/trajectory/collector.js.map +1 -0
  827. package/dist/trajectory/emit.d.ts +27 -0
  828. package/dist/trajectory/emit.js +40 -0
  829. package/dist/trajectory/emit.js.map +1 -0
  830. package/dist/trajectory/hash-chain.d.ts +18 -0
  831. package/dist/trajectory/hash-chain.js +23 -0
  832. package/dist/trajectory/hash-chain.js.map +1 -0
  833. package/dist/trajectory/index.d.ts +22 -0
  834. package/dist/trajectory/index.js +23 -0
  835. package/dist/trajectory/index.js.map +1 -0
  836. package/dist/trajectory/schema.d.ts +14 -14
  837. package/dist/trajectory/secret-scrub.d.ts +32 -0
  838. package/dist/trajectory/secret-scrub.js +51 -0
  839. package/dist/trajectory/secret-scrub.js.map +1 -0
  840. package/dist/trajectory/span-profile.d.ts +27 -0
  841. package/dist/trajectory/span-profile.js +51 -0
  842. package/dist/trajectory/span-profile.js.map +1 -0
  843. package/dist/trajectory/wrappers/http.d.ts +37 -0
  844. package/dist/trajectory/wrappers/http.js +85 -0
  845. package/dist/trajectory/wrappers/http.js.map +1 -0
  846. package/dist/trajectory/wrappers/mcp.d.ts +17 -0
  847. package/dist/trajectory/wrappers/mcp.js +58 -0
  848. package/dist/trajectory/wrappers/mcp.js.map +1 -0
  849. package/dist/trajectory/wrappers/subprocess.d.ts +32 -0
  850. package/dist/trajectory/wrappers/subprocess.js +70 -0
  851. package/dist/trajectory/wrappers/subprocess.js.map +1 -0
  852. package/dist/tx-retry.js +34 -9
  853. package/dist/tx-retry.js.map +1 -1
  854. package/dist/types/envelope.d.ts +1659 -0
  855. package/dist/types/envelope.js +133 -0
  856. package/dist/types/envelope.js.map +1 -0
  857. package/dist/types/index.d.ts +4 -4
  858. package/dist/types/index.js +4 -4
  859. package/dist/types/index.js.map +1 -1
  860. package/dist/types/payloads/index.d.ts +12 -0
  861. package/dist/types/payloads/index.js +60 -0
  862. package/dist/types/payloads/index.js.map +1 -0
  863. package/dist/types/payloads/portfolio-v0.d.ts +481 -0
  864. package/dist/types/payloads/portfolio-v0.js +94 -0
  865. package/dist/types/payloads/portfolio-v0.js.map +1 -0
  866. package/dist/types/payloads/prediction-apy-v0.d.ts +231 -0
  867. package/dist/types/payloads/prediction-apy-v0.js +63 -0
  868. package/dist/types/payloads/prediction-apy-v0.js.map +1 -0
  869. package/dist/types/payloads/prediction-v0.d.ts +262 -0
  870. package/dist/types/payloads/prediction-v0.js +73 -0
  871. package/dist/types/payloads/prediction-v0.js.map +1 -0
  872. package/dist/types/payloads/prediction-v1.d.ts +2 -0
  873. package/dist/types/payloads/prediction-v1.js +2 -0
  874. package/dist/types/payloads/prediction-v1.js.map +1 -0
  875. package/dist/types/portfolio.d.ts +31 -698
  876. package/dist/types/portfolio.js +20 -110
  877. package/dist/types/portfolio.js.map +1 -1
  878. package/dist/types/prediction-apy.d.ts +26 -366
  879. package/dist/types/prediction-apy.js +12 -68
  880. package/dist/types/prediction-apy.js.map +1 -1
  881. package/dist/types/prediction-v1.d.ts +2 -0
  882. package/dist/types/prediction-v1.js +2 -0
  883. package/dist/types/prediction-v1.js.map +1 -0
  884. package/dist/types/prediction.d.ts +546 -382
  885. package/dist/types/prediction.js +16 -87
  886. package/dist/types/prediction.js.map +1 -1
  887. package/dist/types/task-document.d.ts +1121 -0
  888. package/dist/types/task-document.js +99 -0
  889. package/dist/types/task-document.js.map +1 -0
  890. package/dist/types/task.d.ts +805 -0
  891. package/dist/types/task.js +88 -0
  892. package/dist/types/task.js.map +1 -0
  893. package/dist/types/window.d.ts +12 -0
  894. package/dist/types/window.js +6 -0
  895. package/dist/types/window.js.map +1 -0
  896. package/dist/util/path-safety.d.ts +21 -0
  897. package/dist/util/path-safety.js +28 -0
  898. package/dist/util/path-safety.js.map +1 -0
  899. package/dist/util/redact-rpc-urls.d.ts +5 -0
  900. package/dist/util/redact-rpc-urls.js +9 -0
  901. package/dist/util/redact-rpc-urls.js.map +1 -0
  902. package/dist/vendor/@jinn-network/sdk/README.md +89 -0
  903. package/dist/vendor/@jinn-network/sdk/dist/capabilities.d.ts +52 -0
  904. package/dist/vendor/@jinn-network/sdk/dist/capabilities.js +1 -0
  905. package/dist/vendor/@jinn-network/sdk/dist/checkpoint.d.ts +120 -0
  906. package/dist/vendor/@jinn-network/sdk/dist/checkpoint.js +39 -0
  907. package/dist/vendor/@jinn-network/sdk/dist/contracts.d.ts +144 -0
  908. package/dist/vendor/@jinn-network/sdk/dist/contracts.js +248 -0
  909. package/dist/vendor/@jinn-network/sdk/dist/harness.d.ts +120 -0
  910. package/dist/vendor/@jinn-network/sdk/dist/harness.js +31 -0
  911. package/dist/vendor/@jinn-network/sdk/dist/index.d.ts +2 -0
  912. package/dist/vendor/@jinn-network/sdk/dist/index.js +5 -0
  913. package/dist/vendor/@jinn-network/sdk/dist/json-schema.d.ts +32 -0
  914. package/dist/vendor/@jinn-network/sdk/dist/json-schema.js +131 -0
  915. package/dist/vendor/@jinn-network/sdk/dist/manifest.d.ts +69 -0
  916. package/dist/vendor/@jinn-network/sdk/dist/manifest.js +3 -0
  917. package/dist/vendor/@jinn-network/sdk/dist/payloads/prediction-v1.d.ts +223 -0
  918. package/dist/vendor/@jinn-network/sdk/dist/payloads/prediction-v1.js +64 -0
  919. package/dist/vendor/@jinn-network/sdk/dist/payloads/swe-rebench-v2.d.ts +107 -0
  920. package/dist/vendor/@jinn-network/sdk/dist/payloads/swe-rebench-v2.js +51 -0
  921. package/dist/vendor/@jinn-network/sdk/dist/plugins.d.ts +36 -0
  922. package/dist/vendor/@jinn-network/sdk/dist/plugins.js +54 -0
  923. package/dist/vendor/@jinn-network/sdk/dist/prediction-v1.d.ts +870 -0
  924. package/dist/vendor/@jinn-network/sdk/dist/prediction-v1.js +80 -0
  925. package/dist/vendor/@jinn-network/sdk/dist/solvernets/index.d.ts +6 -0
  926. package/dist/vendor/@jinn-network/sdk/dist/solvernets/index.js +8 -0
  927. package/dist/vendor/@jinn-network/sdk/dist/solvernets/manifest-schema.d.ts +559 -0
  928. package/dist/vendor/@jinn-network/sdk/dist/solvernets/manifest-schema.js +126 -0
  929. package/dist/vendor/@jinn-network/sdk/dist/solvernets/prediction-v1.d.ts +6 -0
  930. package/dist/vendor/@jinn-network/sdk/dist/solvernets/prediction-v1.js +3 -0
  931. package/dist/vendor/@jinn-network/sdk/dist/solvernets/swe-rebench-v2.d.ts +4 -0
  932. package/dist/vendor/@jinn-network/sdk/dist/solvernets/swe-rebench-v2.js +2 -0
  933. package/dist/vendor/@jinn-network/sdk/dist/swe-rebench-v2.d.ts +66 -0
  934. package/dist/vendor/@jinn-network/sdk/dist/swe-rebench-v2.js +44 -0
  935. package/dist/vendor/@jinn-network/sdk/dist/types.d.ts +116 -0
  936. package/dist/vendor/@jinn-network/sdk/dist/types.js +21 -0
  937. package/dist/vendor/@jinn-network/sdk/package.json +43 -0
  938. package/dist/venues/hyperliquid/account-value.d.ts +1 -1
  939. package/dist/venues/hyperliquid/account-value.js +1 -1
  940. package/dist/venues/polymarket/client.d.ts +77 -0
  941. package/dist/venues/polymarket/client.js +309 -0
  942. package/dist/venues/polymarket/client.js.map +1 -0
  943. package/dist/withdraw/run-withdraw-plan.js +0 -2
  944. package/dist/withdraw/run-withdraw-plan.js.map +1 -1
  945. package/dist/x402/acquire.d.ts +14 -3
  946. package/dist/x402/acquire.js +28 -11
  947. package/dist/x402/acquire.js.map +1 -1
  948. package/dist/x402/handler.d.ts +15 -3
  949. package/dist/x402/handler.js +67 -24
  950. package/dist/x402/handler.js.map +1 -1
  951. package/package.json +46 -15
  952. package/plugins/claude-code-learner/.claude-plugin/plugin.json +9 -0
  953. package/plugins/claude-code-learner/AGENTS.md +31 -0
  954. package/plugins/claude-code-learner/CLAUDE.md +33 -0
  955. package/plugins/claude-code-learner/README.md +57 -0
  956. package/plugins/claude-code-learner/hooks/hooks.json +16 -0
  957. package/plugins/claude-code-learner/hooks/session-start +38 -0
  958. package/plugins/claude-code-learner/skills/learn/SKILL.md +405 -0
  959. package/plugins/claude-code-learner/skills/learn/analyst-prompt.md +68 -0
  960. package/plugins/claude-code-learner/skills/learn/consolidator-prompt.md +94 -0
  961. package/plugins/claude-code-learner/skills/learn/explorer-prompt.md +53 -0
  962. package/plugins/claude-code-learner/skills/learn/planner-prompt.md +87 -0
  963. package/plugins/claude-code-learner/skills/learn/promoter-prompt.md +113 -0
  964. package/plugins/claude-code-learner/skills/learn/step-worker-prompt.md +47 -0
  965. package/plugins/claude-code-learner/skills/learn/strategist-prompt.md +85 -0
  966. package/plugins/jinn-prediction-plugin/.claude-plugin/plugin.json +19 -0
  967. package/plugins/jinn-prediction-plugin/.mcp.json +8 -0
  968. package/plugins/jinn-prediction-plugin/GEMINI.md +7 -0
  969. package/plugins/jinn-prediction-plugin/gemini-extension.json +13 -0
  970. package/plugins/jinn-prediction-plugin/jinn.plugin.json +26 -0
  971. package/plugins/jinn-prediction-plugin/mcp/polymarket-server.mjs +322 -0
  972. package/plugins/jinn-prediction-plugin/schemas/prediction-v0-solution.schema.json +12 -0
  973. package/plugins/jinn-prediction-plugin/schemas/prediction-v0-task.schema.json +25 -0
  974. package/plugins/jinn-prediction-plugin/schemas/prediction-v0-verdict.schema.json +11 -0
  975. package/plugins/jinn-prediction-plugin/schemas/prediction-v1-solution.schema.json +34 -0
  976. package/plugins/jinn-prediction-plugin/schemas/prediction-v1-task.schema.json +118 -0
  977. package/plugins/jinn-prediction-plugin/schemas/prediction-v1-verdict.schema.json +84 -0
  978. package/plugins/jinn-prediction-plugin/skills/base-rate-forecasting/SKILL.md +3 -0
  979. package/plugins/jinn-prediction-plugin/skills/calibration/SKILL.md +3 -0
  980. package/plugins/jinn-prediction-plugin/skills/common-biases/SKILL.md +3 -0
  981. package/plugins/jinn-prediction-plugin/skills/polymarket-task-handling/SKILL.md +5 -0
  982. package/plugins/jinn-prediction-plugin/skills/prediction-corpus-retrieval/SKILL.md +35 -0
  983. package/plugins/network-tools/.claude-plugin/plugin.json +12 -0
  984. package/plugins/network-tools/jinn.plugin.json +29 -0
  985. package/plugins/network-tools/mcp/jinn-client-server.mjs +110 -0
  986. package/plugins/swe-rebench-v2-runtime/.claude-plugin/plugin.json +9 -0
  987. package/plugins/swe-rebench-v2-runtime/README.md +11 -0
  988. package/plugins/swe-rebench-v2-runtime/jinn.plugin.json +12 -0
  989. package/plugins/swe-rebench-v2-runtime/skills/orient/SKILL.md +25 -0
  990. package/plugins/swe-rebench-v2-runtime/skills/plan/SKILL.md +24 -0
  991. package/skills/jinn-operator/SKILL.md +120 -101
  992. package/templates/harnesses/alternative-harness/README.md.tmpl +44 -0
  993. package/templates/harnesses/alternative-harness/gitignore.tmpl +3 -0
  994. package/templates/harnesses/alternative-harness/jinn.manifest.json.tmpl +22 -0
  995. package/templates/harnesses/alternative-harness/package.json.tmpl +26 -0
  996. package/templates/harnesses/alternative-harness/src/coordinator.ts.tmpl +50 -0
  997. package/templates/harnesses/alternative-harness/src/harness.ts.tmpl +31 -0
  998. package/templates/harnesses/alternative-harness/src/index.ts.tmpl +44 -0
  999. package/templates/harnesses/alternative-harness/src/mock-harness.ts.tmpl +41 -0
  1000. package/templates/harnesses/alternative-harness/src/phases/debrief.ts.tmpl +28 -0
  1001. package/templates/harnesses/alternative-harness/src/phases/execute.ts.tmpl +33 -0
  1002. package/templates/harnesses/alternative-harness/src/phases/improve.ts.tmpl +31 -0
  1003. package/templates/harnesses/alternative-harness/src/phases/memory.ts.tmpl +31 -0
  1004. package/templates/harnesses/alternative-harness/src/phases/orient.ts.tmpl +21 -0
  1005. package/templates/harnesses/alternative-harness/src/phases/plan.ts.tmpl +25 -0
  1006. package/templates/harnesses/alternative-harness/src/phases/strategize.ts.tmpl +29 -0
  1007. package/templates/harnesses/alternative-harness/test/coordinator.test.ts.tmpl +53 -0
  1008. package/templates/harnesses/alternative-harness/test/unit.test.ts.tmpl +55 -0
  1009. package/templates/harnesses/alternative-harness/tsconfig.json.tmpl +16 -0
  1010. package/templates/harnesses/evaluator/README.md.tmpl +36 -0
  1011. package/templates/harnesses/evaluator/gitignore.tmpl +3 -0
  1012. package/templates/harnesses/evaluator/jinn.manifest.json.tmpl +22 -0
  1013. package/templates/harnesses/evaluator/package.json.tmpl +26 -0
  1014. package/templates/harnesses/evaluator/src/index.ts.tmpl +35 -0
  1015. package/templates/harnesses/evaluator/test/unit.test.ts.tmpl +49 -0
  1016. package/templates/harnesses/evaluator/tsconfig.json.tmpl +16 -0
  1017. package/templates/harnesses/forecaster/README.md.tmpl +25 -0
  1018. package/templates/harnesses/forecaster/gitignore.tmpl +5 -0
  1019. package/templates/harnesses/forecaster/jinn.manifest.json.tmpl +22 -0
  1020. package/templates/harnesses/forecaster/package.json.tmpl +26 -0
  1021. package/templates/harnesses/forecaster/src/index.ts.tmpl +33 -0
  1022. package/templates/harnesses/forecaster/test/unit.test.ts.tmpl +42 -0
  1023. package/templates/harnesses/forecaster/tsconfig.json.tmpl +16 -0
  1024. package/dist/adapters/claim-registry/abi.d.ts +0 -127
  1025. package/dist/adapters/claim-registry/abi.js +0 -93
  1026. package/dist/adapters/claim-registry/abi.js.map +0 -1
  1027. package/dist/adapters/claim-registry/client.d.ts +0 -89
  1028. package/dist/adapters/claim-registry/client.js +0 -205
  1029. package/dist/adapters/claim-registry/client.js.map +0 -1
  1030. package/dist/adapters/mech/claim-policy.d.ts +0 -40
  1031. package/dist/adapters/mech/claim-policy.js +0 -104
  1032. package/dist/adapters/mech/claim-policy.js.map +0 -1
  1033. package/dist/bin/jinn-mcp.d.ts +0 -2
  1034. package/dist/bin/jinn-mcp.js +0 -10
  1035. package/dist/bin/jinn-mcp.js.map +0 -1
  1036. package/dist/cli/commands/intents.d.ts +0 -17
  1037. package/dist/cli/commands/intents.js +0 -489
  1038. package/dist/cli/commands/intents.js.map +0 -1
  1039. package/dist/cli/commands/plugin-install.js +0 -803
  1040. package/dist/cli/commands/plugin-install.js.map +0 -1
  1041. package/dist/cli/commands/submit-intent.js +0 -245
  1042. package/dist/cli/commands/submit-intent.js.map +0 -1
  1043. package/dist/cli/intent-registry-access.d.ts +0 -62
  1044. package/dist/cli/intent-registry-access.js +0 -165
  1045. package/dist/cli/intent-registry-access.js.map +0 -1
  1046. package/dist/discovery/registry.d.ts +0 -97
  1047. package/dist/discovery/registry.js +0 -177
  1048. package/dist/discovery/registry.js.map +0 -1
  1049. package/dist/discovery/subgraph.d.ts +0 -37
  1050. package/dist/discovery/subgraph.js +0 -87
  1051. package/dist/discovery/subgraph.js.map +0 -1
  1052. package/dist/intents/kinds/constants.d.ts +0 -5
  1053. package/dist/intents/kinds/constants.js +0 -6
  1054. package/dist/intents/kinds/constants.js.map +0 -1
  1055. package/dist/intents/kinds/index.d.ts +0 -28
  1056. package/dist/intents/kinds/index.js +0 -50
  1057. package/dist/intents/kinds/index.js.map +0 -1
  1058. package/dist/intents/kinds/portfolio-v0.d.ts +0 -2
  1059. package/dist/intents/kinds/portfolio-v0.js +0 -13
  1060. package/dist/intents/kinds/portfolio-v0.js.map +0 -1
  1061. package/dist/intents/kinds/prediction-apy-v0.d.ts +0 -3
  1062. package/dist/intents/kinds/prediction-apy-v0.js +0 -21
  1063. package/dist/intents/kinds/prediction-apy-v0.js.map +0 -1
  1064. package/dist/intents/kinds/prediction-v0.d.ts +0 -3
  1065. package/dist/intents/kinds/prediction-v0.js +0 -32
  1066. package/dist/intents/kinds/prediction-v0.js.map +0 -1
  1067. package/dist/intents/kinds/spec-kind.d.ts +0 -38
  1068. package/dist/intents/kinds/spec-kind.js +0 -6
  1069. package/dist/intents/kinds/spec-kind.js.map +0 -1
  1070. package/dist/intents/posting-service.d.ts +0 -26
  1071. package/dist/intents/posting-service.js +0 -218
  1072. package/dist/intents/posting-service.js.map +0 -1
  1073. package/dist/intents/prediction-apy-v0-auto.d.ts +0 -11
  1074. package/dist/intents/prediction-apy-v0-auto.js +0 -46
  1075. package/dist/intents/prediction-apy-v0-auto.js.map +0 -1
  1076. package/dist/intents/prediction-apy-v0-template.d.ts +0 -8
  1077. package/dist/intents/prediction-apy-v0-template.js +0 -22
  1078. package/dist/intents/prediction-apy-v0-template.js.map +0 -1
  1079. package/dist/intents/prediction-v0-auto.d.ts +0 -53
  1080. package/dist/intents/prediction-v0-auto.js +0 -84
  1081. package/dist/intents/prediction-v0-auto.js.map +0 -1
  1082. package/dist/intents/prediction-v0-template.d.ts +0 -70
  1083. package/dist/intents/prediction-v0-template.js +0 -145
  1084. package/dist/intents/prediction-v0-template.js.map +0 -1
  1085. package/dist/intents/sources.d.ts +0 -39
  1086. package/dist/intents/sources.js +0 -42
  1087. package/dist/intents/sources.js.map +0 -1
  1088. package/dist/restorer/engine/canonical-json.d.ts +0 -18
  1089. package/dist/restorer/engine/canonical-json.js +0 -59
  1090. package/dist/restorer/engine/canonical-json.js.map +0 -1
  1091. package/dist/restorer/engine/claim.d.ts +0 -69
  1092. package/dist/restorer/engine/claim.js +0 -104
  1093. package/dist/restorer/engine/claim.js.map +0 -1
  1094. package/dist/restorer/engine/delivery.d.ts +0 -52
  1095. package/dist/restorer/engine/delivery.js +0 -63
  1096. package/dist/restorer/engine/delivery.js.map +0 -1
  1097. package/dist/restorer/engine/engine.d.ts +0 -213
  1098. package/dist/restorer/engine/engine.js +0 -769
  1099. package/dist/restorer/engine/engine.js.map +0 -1
  1100. package/dist/restorer/engine/manifest-assembly.d.ts +0 -67
  1101. package/dist/restorer/engine/manifest-assembly.js +0 -79
  1102. package/dist/restorer/engine/manifest-assembly.js.map +0 -1
  1103. package/dist/restorer/engine/packaging.d.ts +0 -87
  1104. package/dist/restorer/engine/packaging.js +0 -350
  1105. package/dist/restorer/engine/packaging.js.map +0 -1
  1106. package/dist/restorer/engine/persistence.d.ts +0 -170
  1107. package/dist/restorer/engine/persistence.js +0 -381
  1108. package/dist/restorer/engine/persistence.js.map +0 -1
  1109. package/dist/restorer/engine/recovery.d.ts +0 -22
  1110. package/dist/restorer/engine/recovery.js +0 -24
  1111. package/dist/restorer/engine/recovery.js.map +0 -1
  1112. package/dist/restorer/engine/registry.d.ts +0 -62
  1113. package/dist/restorer/engine/registry.js +0 -73
  1114. package/dist/restorer/engine/registry.js.map +0 -1
  1115. package/dist/restorer/engine/signing.d.ts +0 -30
  1116. package/dist/restorer/engine/signing.js +0 -39
  1117. package/dist/restorer/engine/signing.js.map +0 -1
  1118. package/dist/restorer/engine/state.d.ts +0 -42
  1119. package/dist/restorer/engine/state.js +0 -87
  1120. package/dist/restorer/engine/state.js.map +0 -1
  1121. package/dist/restorer/impls/claude-mcp-hyperliquid/api-wallet.d.ts +0 -64
  1122. package/dist/restorer/impls/claude-mcp-hyperliquid/api-wallet.js.map +0 -1
  1123. package/dist/restorer/impls/claude-mcp-hyperliquid/index.d.ts +0 -104
  1124. package/dist/restorer/impls/claude-mcp-hyperliquid/index.js +0 -721
  1125. package/dist/restorer/impls/claude-mcp-hyperliquid/index.js.map +0 -1
  1126. package/dist/restorer/impls/claude-mcp-hyperliquid/mcp-tools.js.map +0 -1
  1127. package/dist/restorer/impls/claude-mcp-hyperliquid/safety-rails.js.map +0 -1
  1128. package/dist/restorer/impls/claude-mcp-hyperliquid/session-orchestrator.d.ts +0 -97
  1129. package/dist/restorer/impls/claude-mcp-hyperliquid/session-orchestrator.js +0 -226
  1130. package/dist/restorer/impls/claude-mcp-hyperliquid/session-orchestrator.js.map +0 -1
  1131. package/dist/restorer/impls/claude-mcp-prediction/index.d.ts +0 -44
  1132. package/dist/restorer/impls/claude-mcp-prediction/index.js +0 -239
  1133. package/dist/restorer/impls/claude-mcp-prediction/index.js.map +0 -1
  1134. package/dist/restorer/impls/claude-mcp-prediction/mcp-tools.js +0 -135
  1135. package/dist/restorer/impls/claude-mcp-prediction/mcp-tools.js.map +0 -1
  1136. package/dist/restorer/impls/claude-mcp-prediction/prompt.d.ts +0 -8
  1137. package/dist/restorer/impls/claude-mcp-prediction/prompt.js +0 -54
  1138. package/dist/restorer/impls/claude-mcp-prediction/prompt.js.map +0 -1
  1139. package/dist/restorer/impls/claude-mcp-prediction/session-orchestrator.d.ts +0 -36
  1140. package/dist/restorer/impls/claude-mcp-prediction/session-orchestrator.js +0 -137
  1141. package/dist/restorer/impls/claude-mcp-prediction/session-orchestrator.js.map +0 -1
  1142. package/dist/restorer/impls/claude-mcp-prediction/types.d.ts +0 -84
  1143. package/dist/restorer/impls/claude-mcp-prediction/types.js +0 -6
  1144. package/dist/restorer/impls/claude-mcp-prediction/types.js.map +0 -1
  1145. package/dist/restorer/impls/claude-mcp-prediction-apy/index.d.ts +0 -34
  1146. package/dist/restorer/impls/claude-mcp-prediction-apy/index.js +0 -233
  1147. package/dist/restorer/impls/claude-mcp-prediction-apy/index.js.map +0 -1
  1148. package/dist/restorer/impls/claude-mcp-prediction-apy/mcp-tools.js +0 -136
  1149. package/dist/restorer/impls/claude-mcp-prediction-apy/mcp-tools.js.map +0 -1
  1150. package/dist/restorer/impls/claude-mcp-prediction-apy/prompt.d.ts +0 -7
  1151. package/dist/restorer/impls/claude-mcp-prediction-apy/prompt.js +0 -46
  1152. package/dist/restorer/impls/claude-mcp-prediction-apy/prompt.js.map +0 -1
  1153. package/dist/restorer/impls/claude-mcp-prediction-apy/session-orchestrator.d.ts +0 -27
  1154. package/dist/restorer/impls/claude-mcp-prediction-apy/session-orchestrator.js +0 -128
  1155. package/dist/restorer/impls/claude-mcp-prediction-apy/session-orchestrator.js.map +0 -1
  1156. package/dist/restorer/impls/claude-mcp-prediction-apy/types.d.ts +0 -64
  1157. package/dist/restorer/impls/claude-mcp-prediction-apy/types.js +0 -6
  1158. package/dist/restorer/impls/claude-mcp-prediction-apy/types.js.map +0 -1
  1159. package/dist/restorer/impls/evaluation-context.d.ts +0 -16
  1160. package/dist/restorer/impls/evaluation-context.js +0 -18
  1161. package/dist/restorer/impls/evaluation-context.js.map +0 -1
  1162. package/dist/restorer/impls/index.d.ts +0 -46
  1163. package/dist/restorer/impls/index.js +0 -88
  1164. package/dist/restorer/impls/index.js.map +0 -1
  1165. package/dist/restorer/impls/legacy-claude/index.d.ts +0 -52
  1166. package/dist/restorer/impls/legacy-claude/index.js +0 -140
  1167. package/dist/restorer/impls/legacy-claude/index.js.map +0 -1
  1168. package/dist/restorer/impls/portfolio-v0-evaluator/canonical-metrics.d.ts +0 -68
  1169. package/dist/restorer/impls/portfolio-v0-evaluator/canonical-metrics.js +0 -117
  1170. package/dist/restorer/impls/portfolio-v0-evaluator/canonical-metrics.js.map +0 -1
  1171. package/dist/restorer/impls/portfolio-v0-evaluator/checks/availability.js.map +0 -1
  1172. package/dist/restorer/impls/portfolio-v0-evaluator/checks/consistency.d.ts +0 -78
  1173. package/dist/restorer/impls/portfolio-v0-evaluator/checks/consistency.js +0 -274
  1174. package/dist/restorer/impls/portfolio-v0-evaluator/checks/consistency.js.map +0 -1
  1175. package/dist/restorer/impls/portfolio-v0-evaluator/checks/eligibility.d.ts +0 -23
  1176. package/dist/restorer/impls/portfolio-v0-evaluator/checks/eligibility.js +0 -49
  1177. package/dist/restorer/impls/portfolio-v0-evaluator/checks/eligibility.js.map +0 -1
  1178. package/dist/restorer/impls/portfolio-v0-evaluator/checks/integrity.d.ts +0 -25
  1179. package/dist/restorer/impls/portfolio-v0-evaluator/checks/integrity.js +0 -44
  1180. package/dist/restorer/impls/portfolio-v0-evaluator/checks/integrity.js.map +0 -1
  1181. package/dist/restorer/impls/portfolio-v0-evaluator/checks/spec.d.ts +0 -17
  1182. package/dist/restorer/impls/portfolio-v0-evaluator/checks/spec.js +0 -43
  1183. package/dist/restorer/impls/portfolio-v0-evaluator/checks/spec.js.map +0 -1
  1184. package/dist/restorer/impls/portfolio-v0-evaluator/index.d.ts +0 -44
  1185. package/dist/restorer/impls/portfolio-v0-evaluator/index.js +0 -440
  1186. package/dist/restorer/impls/portfolio-v0-evaluator/index.js.map +0 -1
  1187. package/dist/restorer/impls/portfolio-v0-evaluator/score.js.map +0 -1
  1188. package/dist/restorer/impls/portfolio-v0-evaluator/types.d.ts +0 -34
  1189. package/dist/restorer/impls/portfolio-v0-evaluator/types.js.map +0 -1
  1190. package/dist/restorer/impls/prediction-apy-v0-baseline/index.d.ts +0 -40
  1191. package/dist/restorer/impls/prediction-apy-v0-baseline/index.js +0 -107
  1192. package/dist/restorer/impls/prediction-apy-v0-baseline/index.js.map +0 -1
  1193. package/dist/restorer/impls/prediction-apy-v0-baseline/strategy.js.map +0 -1
  1194. package/dist/restorer/impls/prediction-apy-v0-baseline/types.js.map +0 -1
  1195. package/dist/restorer/impls/prediction-apy-v0-evaluator/canonical-metrics.d.ts +0 -6
  1196. package/dist/restorer/impls/prediction-apy-v0-evaluator/canonical-metrics.js +0 -11
  1197. package/dist/restorer/impls/prediction-apy-v0-evaluator/canonical-metrics.js.map +0 -1
  1198. package/dist/restorer/impls/prediction-apy-v0-evaluator/index.d.ts +0 -42
  1199. package/dist/restorer/impls/prediction-apy-v0-evaluator/index.js +0 -208
  1200. package/dist/restorer/impls/prediction-apy-v0-evaluator/index.js.map +0 -1
  1201. package/dist/restorer/impls/prediction-apy-v0-evaluator/parse-submission.d.ts +0 -7
  1202. package/dist/restorer/impls/prediction-apy-v0-evaluator/parse-submission.js +0 -29
  1203. package/dist/restorer/impls/prediction-apy-v0-evaluator/parse-submission.js.map +0 -1
  1204. package/dist/restorer/impls/prediction-apy-v0-evaluator/score.js.map +0 -1
  1205. package/dist/restorer/impls/prediction-apy-v0-evaluator/types.js.map +0 -1
  1206. package/dist/restorer/impls/prediction-v0-baseline/index.d.ts +0 -31
  1207. package/dist/restorer/impls/prediction-v0-baseline/index.js +0 -100
  1208. package/dist/restorer/impls/prediction-v0-baseline/index.js.map +0 -1
  1209. package/dist/restorer/impls/prediction-v0-baseline/strategy.d.ts +0 -8
  1210. package/dist/restorer/impls/prediction-v0-baseline/strategy.js +0 -41
  1211. package/dist/restorer/impls/prediction-v0-baseline/strategy.js.map +0 -1
  1212. package/dist/restorer/impls/prediction-v0-baseline/types.d.ts +0 -7
  1213. package/dist/restorer/impls/prediction-v0-baseline/types.js.map +0 -1
  1214. package/dist/restorer/impls/prediction-v0-evaluator/canonical-metrics.d.ts +0 -20
  1215. package/dist/restorer/impls/prediction-v0-evaluator/canonical-metrics.js.map +0 -1
  1216. package/dist/restorer/impls/prediction-v0-evaluator/checks/availability.d.ts +0 -9
  1217. package/dist/restorer/impls/prediction-v0-evaluator/checks/availability.js.map +0 -1
  1218. package/dist/restorer/impls/prediction-v0-evaluator/checks/eligibility.d.ts +0 -3
  1219. package/dist/restorer/impls/prediction-v0-evaluator/checks/eligibility.js.map +0 -1
  1220. package/dist/restorer/impls/prediction-v0-evaluator/checks/integrity.d.ts +0 -13
  1221. package/dist/restorer/impls/prediction-v0-evaluator/checks/integrity.js +0 -111
  1222. package/dist/restorer/impls/prediction-v0-evaluator/checks/integrity.js.map +0 -1
  1223. package/dist/restorer/impls/prediction-v0-evaluator/checks/spec.d.ts +0 -5
  1224. package/dist/restorer/impls/prediction-v0-evaluator/checks/spec.js.map +0 -1
  1225. package/dist/restorer/impls/prediction-v0-evaluator/index.d.ts +0 -36
  1226. package/dist/restorer/impls/prediction-v0-evaluator/index.js +0 -234
  1227. package/dist/restorer/impls/prediction-v0-evaluator/index.js.map +0 -1
  1228. package/dist/restorer/impls/prediction-v0-evaluator/score.js.map +0 -1
  1229. package/dist/restorer/impls/prediction-v0-evaluator/types.js.map +0 -1
  1230. package/dist/restorer/types.d.ts +0 -194
  1231. package/dist/restorer/types.js +0 -28
  1232. package/dist/restorer/types.js.map +0 -1
  1233. package/dist/types/desired-state.d.ts +0 -94
  1234. package/dist/types/desired-state.js +0 -36
  1235. package/dist/types/desired-state.js.map +0 -1
  1236. /package/dist/cli/commands/{plugin-install.d.ts → solver-nets.d.ts} +0 -0
  1237. /package/dist/cli/commands/{submit-intent.d.ts → tasks.d.ts} +0 -0
  1238. /package/dist/{restorer/impls/prediction-apy-v0-baseline → harnesses/impls/claude-code-learner}/types.js +0 -0
  1239. /package/dist/{restorer → harnesses}/impls/claude-mcp-hyperliquid/api-wallet.js +0 -0
  1240. /package/dist/{restorer → harnesses}/impls/claude-mcp-hyperliquid/mcp-tools.d.ts +0 -0
  1241. /package/dist/{restorer → harnesses}/impls/claude-mcp-hyperliquid/mcp-tools.js +0 -0
  1242. /package/dist/{restorer → harnesses}/impls/claude-mcp-hyperliquid/safety-rails.d.ts +0 -0
  1243. /package/dist/{restorer → harnesses}/impls/claude-mcp-hyperliquid/safety-rails.js +0 -0
  1244. /package/dist/{restorer → harnesses}/impls/claude-mcp-prediction/mcp-tools.d.ts +0 -0
  1245. /package/dist/{restorer → harnesses}/impls/claude-mcp-prediction-apy/mcp-tools.d.ts +0 -0
  1246. /package/dist/{restorer → harnesses}/impls/portfolio-v0-evaluator/checks/availability.d.ts +0 -0
  1247. /package/dist/{restorer → harnesses}/impls/portfolio-v0-evaluator/checks/availability.js +0 -0
  1248. /package/dist/{restorer → harnesses}/impls/portfolio-v0-evaluator/score.d.ts +0 -0
  1249. /package/dist/{restorer → harnesses}/impls/portfolio-v0-evaluator/score.js +0 -0
  1250. /package/dist/{restorer → harnesses}/impls/portfolio-v0-evaluator/types.js +0 -0
  1251. /package/dist/{restorer → harnesses}/impls/prediction-apy-v0-baseline/strategy.d.ts +0 -0
  1252. /package/dist/{restorer → harnesses}/impls/prediction-apy-v0-baseline/strategy.js +0 -0
  1253. /package/dist/{restorer → harnesses}/impls/prediction-apy-v0-baseline/types.d.ts +0 -0
  1254. /package/dist/{restorer/impls/prediction-apy-v0-evaluator → harnesses/impls/prediction-apy-v0-baseline}/types.js +0 -0
  1255. /package/dist/{restorer → harnesses}/impls/prediction-apy-v0-evaluator/score.d.ts +0 -0
  1256. /package/dist/{restorer → harnesses}/impls/prediction-apy-v0-evaluator/score.js +0 -0
  1257. /package/dist/{restorer → harnesses}/impls/prediction-apy-v0-evaluator/types.d.ts +0 -0
  1258. /package/dist/{restorer/impls/prediction-v0-baseline → harnesses/impls/prediction-apy-v0-evaluator}/types.js +0 -0
  1259. /package/dist/{restorer/impls/prediction-v0-evaluator → harnesses/impls/prediction-v0-baseline}/types.js +0 -0
  1260. /package/dist/{restorer → harnesses}/impls/prediction-v0-evaluator/canonical-metrics.js +0 -0
  1261. /package/dist/{restorer → harnesses}/impls/prediction-v0-evaluator/checks/availability.js +0 -0
  1262. /package/dist/{restorer → harnesses}/impls/prediction-v0-evaluator/checks/eligibility.js +0 -0
  1263. /package/dist/{restorer → harnesses}/impls/prediction-v0-evaluator/checks/spec.js +0 -0
  1264. /package/dist/{restorer → harnesses}/impls/prediction-v0-evaluator/score.d.ts +0 -0
  1265. /package/dist/{restorer → harnesses}/impls/prediction-v0-evaluator/score.js +0 -0
  1266. /package/dist/{restorer → harnesses}/impls/prediction-v0-evaluator/types.d.ts +0 -0
@@ -0,0 +1,405 @@
1
+ ---
2
+ name: learn
3
+ description: Use when running a goal end-to-end through a seven-phase learning loop. Sequences Orient → Strategize → Plan → Execute → Debrief → Improve → Memory consolidation, dispatching specialized subagents per phase, and improves itself between runs by mutating its own state directory.
4
+ allowed-tools: Bash, Read, Write, Edit, Glob, Grep, Task
5
+ ---
6
+
7
+ # Learn — claude-code-learner orchestrator
8
+
9
+ You are running one goal end-to-end through a seven-phase learning loop. This single skill drives the full pipeline. Each phase below dispatches a fresh-context subagent whose prompt body is read from a sibling `*-prompt.md` file in this skill directory; you collect the subagent's output and proceed.
10
+
11
+ ## Inputs (from the harness)
12
+
13
+ - `goal` — `{ id, description, kind?, deadline?, spec? }`. Free-form payload describing what to achieve. The plugin reads `description` to know the task and may organize prior runs by `kind` if present. The plugin does not interpret `kind` semantically; it is an opaque string used for organizing artifacts.
14
+ - `workingDir` — ephemeral path; the harness harvests it for delivery when this skill returns.
15
+ - `implStateDir` — the agent's persistent self-state. Git-backed by the SessionStart hook. Mutations here persist across runs and constitute "learning."
16
+ - `msUntilDeadline` — function returning remaining time.
17
+ - `mode` — `train` or `frozen`. Default to `train` if absent. In `frozen` mode, the learning loop must not mutate `implStateDir`.
18
+ - An abort signal that fires at the goal's deadline (if any).
19
+
20
+ The session-start hook (`hooks/session-start`) has already initialized `implStateDir` as a git repo with the `claude-code-learner` author identity.
21
+
22
+ ## 1. Boot
23
+
24
+ The session-start hook (`hooks/session-start`) has already run with `IMPL_STATE_DIR` set, so:
25
+ - `implStateDir` is a git repo
26
+ - The claude-code-learner git author identity is configured
27
+ - HEAD sha is the implStateDir state at run start
28
+
29
+ Capture it for the constitution span:
30
+
31
+ ```bash
32
+ IMPL_STATE_DIR_SHA=$(git -C "$IMPL_STATE_DIR" rev-parse HEAD)
33
+ SKILL_BUNDLE_CID=$(find "${CLAUDE_PLUGIN_ROOT:-$PLUGIN_ROOT}" -type f \( -name '*.md' -o -name '*.sh' -o -name '*.mjs' \) | sort | xargs sha256sum | sha256sum | cut -d' ' -f1)
34
+ ```
35
+
36
+ The plugin root is provided by Claude Code as `${CLAUDE_PLUGIN_ROOT}`. Other harnesses may set `$PLUGIN_ROOT` from their session-start hook (the claude-code-learner hook does both for portability — sets and exports `PLUGIN_ROOT`). If neither is set, hash the loaded skills from their loaded paths.
37
+
38
+ Write `workingDir/.coordinator/boot.json` (downstream phases — particularly Strategize — read it for the constitution span). The directory name is `coordinator` for backward compatibility with the existing on-disk artifact layout consumed by Strategize and Debrief; do not rename it. The shape is:
39
+
40
+ ```json
41
+ {
42
+ "implStateDirShaAtStart": "<git HEAD sha of implStateDir at run start>",
43
+ "skillBundleCid": "sha256:<plugin bundle digest>",
44
+ "goalId": "<goal.id>",
45
+ "deadline": <goal.deadline as milliseconds since epoch>
46
+ }
47
+ ```
48
+
49
+ The harness hands you `goal`, `workingDir`, and `implStateDir` as session inputs (not POSIX env vars). Bind them to the variables this section uses, then write the file:
50
+
51
+ ```bash
52
+ # Bind session inputs into shell variables (substitute your harness's
53
+ # mechanism — e.g., values pulled from the initial prompt context or a
54
+ # harness-provided JSON input):
55
+ WORKING_DIR="<workingDir from session inputs>"
56
+ GOAL_ID="<goal.id from session inputs>"
57
+ DEADLINE="<goal.deadline from session inputs>"
58
+
59
+ mkdir -p "$WORKING_DIR/.coordinator"
60
+ cat > "$WORKING_DIR/.coordinator/boot.json" <<EOF
61
+ {
62
+ "implStateDirShaAtStart": "$IMPL_STATE_DIR_SHA",
63
+ "skillBundleCid": "sha256:$SKILL_BUNDLE_CID",
64
+ "goalId": "$GOAL_ID",
65
+ "deadline": $DEADLINE
66
+ }
67
+ EOF
68
+ ```
69
+
70
+ `deadline` is the goal's deadline in milliseconds since epoch.
71
+
72
+ ## 2. Phase-range guard
73
+
74
+ *Phase-range hint:* if the env var `LEARNER_PHASE_RANGE` is set, run only the corresponding subset:
75
+
76
+ - `full` (or unset) — run all seven phases (sections 3–9), then verify and return (sections 10–11).
77
+ - `pre-execute` — run only sections 3–5 (Orient, Strategize, Plan), then return. The harness's specialist wrapper will run Execute itself and invoke this skill again with `post-execute`.
78
+ - `post-execute` — run section 7 (Debrief), plus sections 8–9 (Improve, Memory consolidation) only when `mode = train`. The harness's specialist wrapper has already populated `workingDir/.execute/` from a domain-specialist Execute path before invoking this pass.
79
+
80
+ This protocol exists so the harness's first-match wrapper can wrap domain-specialist Execute paths in the learning envelope without the specialist needing to know about the wrapper.
81
+
82
+ Mode controls whether the self-improving phases are allowed:
83
+
84
+ - `mode = train` — run Improve and Memory consolidation when phase-range includes sections 8–9.
85
+ - `mode = frozen` — run Orient, Strategize, Plan, Execute, and Debrief only. Skip Improve and Memory consolidation, do not mutate `implStateDir`, and return with no `.improve/` or `.memory-consolidation/` requirement. The daemon enforces this with a freeze fence and rejects any envelope that mutates the frozen implementation state.
86
+
87
+ For each section below, in order:
88
+
89
+ 1. Dispatch the section's subagent(s) per the uniform shape (see "Uniform dispatch shape" below).
90
+ 2. Collect outputs and verify the artifacts exist.
91
+ 3. Append a JSONL entry to `workingDir/.coordinator/log.jsonl`:
92
+ `{ ts, phase, status, summary }`.
93
+
94
+ ## Uniform dispatch shape
95
+
96
+ Every section that dispatches a subagent uses the same shape. Spawn a fresh-context subagent. Read the prompt body from `${PLUGIN_ROOT}/skills/learn/<role>-prompt.md` (or `${CLAUDE_PLUGIN_ROOT}/skills/learn/<role>-prompt.md`) and pass it as the subagent's instructions. Pass these inputs:
97
+
98
+ ```
99
+ goal = <copy of goal>
100
+ workingDir = <path>
101
+ implStateDir = <path, read-only unless this role mutates it>
102
+ outputPath = workingDir/.<phase>/<artifact>.json
103
+ msUntilDeadline = <current value>
104
+ ... role-specific inputs (see <role>-prompt.md inputs section) ...
105
+ ```
106
+
107
+ The subagent reads the prompt, follows it, writes `outputPath`, and returns a one-line summary plus `artifactPath`.
108
+
109
+ Do not reference any registered-subagent registry by name. There is no `subagent_type:` argument and no `claude-code-learner:<role>` identifier. The mechanism is: read prompt file → spawn fresh-context subagent → pass prompt as instructions.
110
+
111
+ For sections that dispatch multiple subagents in parallel (Orient, optional Debrief probes), spawn one subagent per topic with its own `topic` and `outputPath`. If your harness supports it, run them concurrently; otherwise dispatch sequentially. Subagents do not spawn further subagents — they are one level deep.
112
+
113
+ ## 3. Orient
114
+
115
+ Purpose: gather goal + world-state + history; produce findings Strategize will consume.
116
+
117
+ Decide what topics need gathering. Choose from these typical categories; add or omit based on the goal:
118
+
119
+ 1. **goal-parse** — what's the goal, kind (if present), deadline, spec, eligibility? Always include.
120
+ 2. **world-state** — for goals where the harness exposes tools to inspect external state, pull current relevant state. Include if such tools are available for this goal.
121
+ 3. **own-history** — list prior runs of this kind by this operator. Include if `implStateDir/runs/index.json` exists or the harness's history-of-runs query is exposed.
122
+ 4. **others-history** — recent runs of this kind by other operators. Include only if `implStateDir/policy.json` sets `allowCrossOperatorReads: true` AND the harness's history-of-runs query is exposed.
123
+
124
+ For each chosen topic, dispatch an explorer subagent in parallel. Use the uniform dispatch shape with these role-specific inputs:
125
+
126
+ ```
127
+ prompt body = ${PLUGIN_ROOT}/skills/learn/explorer-prompt.md
128
+ topic = <topic name, e.g. "goal-parse">
129
+ goal = <copy of goal>
130
+ scope = <topic-specific scope; explorer-prompt.md describes what it expects>
131
+ workingDir = <path>
132
+ implStateDir = <path, read-only>
133
+ outputPath = workingDir/.orient/<topic>.json
134
+ msUntilDeadline = <current value>
135
+ ```
136
+
137
+ After all explorers return, read each `workingDir/.orient/<topic>.json` and write `workingDir/.orient/summary.json`:
138
+
139
+ ```json
140
+ {
141
+ "goal": { "id": "...", "kind": "...", "deadline": 0 },
142
+ "topics": [
143
+ { "topic": "goal-parse", "artifact": "workingDir/.orient/goal-parse.json", "summary": "...", "flags": [] },
144
+ { "topic": "world-state", "artifact": "workingDir/.orient/world-state.json", "summary": "...", "flags": ["stale"] }
145
+ ],
146
+ "openQuestions": ["string — anything Strategize needs to know was uncertain or unavailable"]
147
+ }
148
+ ```
149
+
150
+ Append a JSONL entry to `workingDir/.coordinator/log.jsonl`:
151
+ `{ ts, phase, status, summary }`.
152
+
153
+ ## 4. Strategize
154
+
155
+ Purpose: pick approach, freeze success criteria + timing posture into a constitution record.
156
+
157
+ Dispatch a strategist subagent. Use the uniform dispatch shape with these role-specific inputs:
158
+
159
+ ```
160
+ prompt body = ${PLUGIN_ROOT}/skills/learn/strategist-prompt.md
161
+ goal = <copy of goal>
162
+ orientSummaryPath = workingDir/.orient/summary.json
163
+ priorStrategiesPath = implStateDir/strategies/<goal.kind>/ (or null if absent)
164
+ workingDir = <path>
165
+ implStateDir = <path, read-only>
166
+ outputDir = workingDir/.strategize/
167
+ skillBundleCid = <from boot.json>
168
+ implStateDirShaAtStart = <from boot.json>
169
+ msUntilDeadline = <current value>
170
+ ```
171
+
172
+ After it returns, verify both files exist:
173
+ - `workingDir/.strategize/strategy.json`
174
+ - `workingDir/.strategize/constitution.json`
175
+
176
+ If either is missing, write `workingDir/.errors/strategize.json` with the failure context and abort the pipeline. In `train` mode, still run section 9, Memory consolidation, before returning. In `frozen` mode, return without running section 9.
177
+
178
+ After Strategize, read `workingDir/.strategize/constitution.json`. If the harness exposes an OTel tracer, emit the constitution fields as attributes on a state-transition span (the harness defines the span name). Otherwise the file itself is the constitution record; Debrief reads it from there.
179
+
180
+ Never run a second strategist after the first has committed (no re-strategizing mid-run). The strategy is frozen for the remainder of this run.
181
+
182
+ Append a JSONL entry to `workingDir/.coordinator/log.jsonl`:
183
+ `{ ts, phase, status, summary }`.
184
+
185
+ ## 5. Plan
186
+
187
+ Purpose: produce concrete steps, optionally time-anchored.
188
+
189
+ Dispatch a planner subagent. Use the uniform dispatch shape with these role-specific inputs:
190
+
191
+ ```
192
+ prompt body = ${PLUGIN_ROOT}/skills/learn/planner-prompt.md
193
+ goal = <copy of goal>
194
+ strategyPath = workingDir/.strategize/strategy.json
195
+ orientSummaryPath = workingDir/.orient/summary.json
196
+ priorPlanTemplatesPath = implStateDir/plans/<goal.kind>/ (or null)
197
+ replanContextPath = workingDir/.plan/replan-context.json (or null on first plan)
198
+ priorPlanArchives = [workingDir/.plan/plan-v1.json, ...] (or empty on first plan)
199
+ workingDir = <path>
200
+ implStateDir = <path, read-only>
201
+ outputPath = workingDir/.plan/plan.json
202
+ msUntilDeadline = <current value>
203
+ ```
204
+
205
+ After it returns, verify `workingDir/.plan/plan.json` exists. If not, write `workingDir/.errors/plan.json` and abort the pipeline (still run section 9 before returning).
206
+
207
+ Append a JSONL entry to `workingDir/.coordinator/log.jsonl`:
208
+ `{ ts, phase, status, summary }`.
209
+
210
+ ## 6. Execute
211
+
212
+ Purpose: walk the plan, dispatch one step-worker per work step, honor wait steps, decide at runtime when stuck.
213
+
214
+ Inputs you read directly:
215
+ - `workingDir/.plan/plan.json` — the steps
216
+ - `workingDir/.strategize/strategy.json` — success criteria + timing posture
217
+ - `workingDir/.orient/summary.json` — grounding
218
+ - The goal + deadline + remaining time budget
219
+
220
+ For each step in order, respecting `concurrency` markings:
221
+
222
+ ### Work steps
223
+
224
+ Dispatch a step-worker subagent. Use the uniform dispatch shape with these role-specific inputs:
225
+
226
+ ```
227
+ prompt body = ${PLUGIN_ROOT}/skills/learn/step-worker-prompt.md
228
+ stepSpec = <the entire step object from plan.json>
229
+ goal = <copy of goal>
230
+ workingDir = <path>
231
+ implStateDir = <path, read-only>
232
+ msUntilDeadline = <current value>
233
+ ```
234
+
235
+ For parallel-batch steps (steps sharing a `concurrency: parallel-batch-X` label), dispatch the whole batch concurrently if your harness supports it; wait for all to return before advancing.
236
+
237
+ After a worker returns:
238
+ - The worker's self-reported `status` and `blockers` are evidence; the authoritative verdict is your re-check of the step's `successSignal` against actual outputs on disk.
239
+ - Check `successSignal` — did the step succeed?
240
+ - If yes: append to `workingDir/.execute/log.jsonl` (carrying the worker's `status` and `blockers` into the log entry) and advance.
241
+ - If no: see "When stuck" below.
242
+
243
+ ### Wait steps
244
+
245
+ Use the harness's wait primitive (per spec §8 harness-adapter contract). Plan-emitted wait steps may include any combination of `durationMs`, `untilTs`, and `condition`; treat absent and explicit `null` identically as "not set." When multiple wakers are set, wake on the first to fire (per spec §5: `wait` wakes when any of duration / deadline / condition fires). The abort signal from the harness (the goal's `deadline`) always overrides any wait.
246
+
247
+ ### When stuck
248
+
249
+ When a step fails its success signal or a worker returns without expected outputs, judge:
250
+
251
+ - **continue** — accept partial; advance.
252
+ - **retry-step** — dispatch a fresh worker for the same step. Cap at 2 retries unless step `abortCondition` says otherwise.
253
+ - **replan** — archive the current plan and re-run section 5 (Plan), then continue Execute on the new plan. Concretely: rename `workingDir/.plan/plan.json` to `workingDir/.plan/plan-v<N>.json` where N is the next unused integer (start at 1), write `workingDir/.plan/replan-context.json` with `{ failedStepId, blockers, partialOutputs[] }`, then re-dispatch the planner subagent (section 5). The new `plan.json` is grounded in what's now in `workingDir/` (including the archived prior plans, the execute log up to the failure, and the replan-context). Continue Execute on the new `plan.json`.
254
+ - **abort** — write `workingDir/.errors/execute.json` with failure context; exit Execute. Continue to Debrief and, in `train` mode only, Improve / Memory consolidation. Abort here is not a pipeline-level abort.
255
+
256
+ Explain your judgment in `workingDir/.execute/log.jsonl`.
257
+
258
+ ### Outputs
259
+
260
+ Throughout the phase:
261
+ - `workingDir/.execute/log.jsonl` — one entry per step boundary: `{ ts, stepId, decision, summary, retryCount, workerStatus, workerBlockers }`. `workerStatus` and `workerBlockers` come directly from the step-worker's return shape so Debrief sees both the worker's self-assessment and Execute's verdict.
262
+ - Per-step outputs as the plan declared.
263
+
264
+ At end, write `workingDir/.execute/summary.json`:
265
+
266
+ ```json
267
+ {
268
+ "stepsCompleted": ["step-1", "step-2"],
269
+ "stepsFailed": [],
270
+ "decisions": ["continue", "retry-step", "continue"],
271
+ "elapsedMs": 0,
272
+ "returnReason": "all-steps-completed | early-return | hold-and-revise-window-end | continuous-observation-window-end | abort"
273
+ }
274
+ ```
275
+
276
+ Append a JSONL entry to `workingDir/.coordinator/log.jsonl`:
277
+ `{ ts, phase, status, summary }`.
278
+
279
+ ## 7. Debrief
280
+
281
+ Purpose: post-execution analysis. Mirrors Orient — gather + sense-make in hindsight.
282
+
283
+ ### Optional: dispatch debrief explorers
284
+
285
+ If the operator's policy enables cross-operator reads or fresh-world-state probes, dispatch explorer subagents in parallel for each post-execution topic. Typical topics:
286
+
287
+ - `outcome-probe` — re-pull world state via whatever tools the harness exposes for this goal, to see post-execution outcome.
288
+ - `cross-operator-comparison` — the harness's history-of-runs query, if exposed, for similar runs by other operators (only if policy allows).
289
+
290
+ Use the uniform dispatch shape; each explorer writes `workingDir/.debrief/<topic>.json`.
291
+
292
+ ### Dispatch the analyst
293
+
294
+ Dispatch an analyst subagent. Use the uniform dispatch shape with these role-specific inputs:
295
+
296
+ ```
297
+ prompt body = ${PLUGIN_ROOT}/skills/learn/analyst-prompt.md
298
+ goal = <copy of goal>
299
+ strategyPath = workingDir/.strategize/strategy.json
300
+ constitutionPath = workingDir/.strategize/constitution.json
301
+ planPath = workingDir/.plan/plan.json
302
+ executeSummaryPath = workingDir/.execute/summary.json
303
+ executeLogPath = workingDir/.execute/log.jsonl
304
+ orientSummaryPath = workingDir/.orient/summary.json
305
+ debriefExplorerPaths = [workingDir/.debrief/<topic>.json, ...]
306
+ ownHistoryPath = implStateDir/runs/index.json (or null)
307
+ workingDir = <path>
308
+ implStateDir = <path, read-only>
309
+ outputPath = workingDir/.debrief/analysis.json
310
+ msUntilDeadline = <current value>
311
+ ```
312
+
313
+ After it returns, verify `workingDir/.debrief/analysis.json` exists. If not, write `workingDir/.errors/debrief.json` and abort the pipeline. In `train` mode, still run section 9 before returning. In `frozen` mode, return without running section 9.
314
+
315
+ Append a JSONL entry to `workingDir/.coordinator/log.jsonl`:
316
+ `{ ts, phase, status, summary }`.
317
+
318
+ ## 8. Improve
319
+
320
+ Purpose: mutate `implStateDir`, commit each accepted mutation as a separate git commit. Changes take effect NEXT run.
321
+
322
+ Run this section only when `mode = train`. If `mode = frozen`, skip it entirely and append a coordinator log entry noting `{ phase: "improve", status: "skipped", summary: "mode=frozen" }`.
323
+
324
+ Dispatch a promoter subagent. Use the uniform dispatch shape with these role-specific inputs:
325
+
326
+ ```
327
+ prompt body = ${PLUGIN_ROOT}/skills/learn/promoter-prompt.md
328
+ goal = <copy of goal>
329
+ analysisPath = workingDir/.debrief/analysis.json
330
+ policyPath = implStateDir/policy.json (or null)
331
+ implStateDir = <path, read-write for the promoter>
332
+ workingDir = <path>
333
+ outputDir = workingDir/.improve/
334
+ msUntilDeadline = <current value>
335
+ ```
336
+
337
+ The promoter writes mutations directly into `implStateDir`, commits each as a separate git commit (the session-start hook configured the author identity already), and writes one `promotion_record` per mutation under `workingDir/.improve/promotions/`.
338
+
339
+ After it returns, read `workingDir/.improve/summary.json`. Verify:
340
+ - `implStateDirShaAfter` matches `git -C <implStateDir> rev-parse HEAD`
341
+ - One `promotion_record` per accepted change
342
+ - Operator-access requests under `workingDir/.operator-requests/` if any
343
+
344
+ If anything is inconsistent, write `workingDir/.errors/improve.json` and abort the pipeline, then still run section 9 before returning. This section only runs in `train` mode.
345
+
346
+ Append a JSONL entry to `workingDir/.coordinator/log.jsonl`:
347
+ `{ ts, phase, status, summary }`.
348
+
349
+ ## 9. Memory consolidation
350
+
351
+ Purpose: curate `implStateDir` (prune unused, revert regressions) and `workingDir` (set public/private boundary); commit durable curation as one separate commit.
352
+
353
+ Run this section only when `mode = train`. If `mode = frozen`, skip it entirely and append a coordinator log entry noting `{ phase: "memory-consolidation", status: "skipped", summary: "mode=frozen" }`. Do not create durable commits or modify `implStateDir` in frozen mode.
354
+
355
+ Dispatch a consolidator subagent. Use the uniform dispatch shape with these role-specific inputs:
356
+
357
+ ```
358
+ prompt body = ${PLUGIN_ROOT}/skills/learn/consolidator-prompt.md
359
+ goal = <copy of goal>
360
+ analysisPath = workingDir/.debrief/analysis.json
361
+ improveSummaryPath = workingDir/.improve/summary.json
362
+ improvePromotionsDir = workingDir/.improve/promotions/
363
+ policyPath = implStateDir/policy.json (or null)
364
+ implStateDir = <path, read-write>
365
+ workingDir = <path, read-write>
366
+ outputPath = workingDir/.memory-consolidation/consolidation_record.json
367
+ msUntilDeadline = <current value>
368
+ ```
369
+
370
+ The consolidator does both workstreams (durable + ephemeral), writes a single git commit on `implStateDir` for the durable curation, and produces the `consolidation_record`.
371
+
372
+ After it returns, verify the `consolidation_record` exists. If the consolidator made a commit, `implStateDirShaAfter` must match `git -C <implStateDir> rev-parse HEAD`. If no commit was made (empty curation set), `implStateDirShaAfter` must equal `implStateDirShaBefore` and HEAD remains at that sha.
373
+
374
+ Append a JSONL entry to `workingDir/.coordinator/log.jsonl`:
375
+ `{ ts, phase, status, summary }`.
376
+
377
+ ## 10. Verify and return
378
+
379
+ Before returning, assert each primary artifact exists:
380
+
381
+ - `workingDir/.orient/summary.json`
382
+ - `workingDir/.strategize/strategy.json`
383
+ - `workingDir/.plan/plan.json`
384
+ - `workingDir/.execute/summary.json`
385
+ - `workingDir/.debrief/analysis.json`
386
+ - `workingDir/.improve/summary.json`
387
+ - `workingDir/.memory-consolidation/consolidation_record.json`
388
+
389
+ When `mode = frozen`, do not require `workingDir/.improve/summary.json` or `workingDir/.memory-consolidation/consolidation_record.json`; those phases are skipped by contract.
390
+
391
+ Do NOT include any goal-kind-specific assertions. The harness owns goal-kind enforcement (e.g. domain-specific solution payloads). The plugin verifies only its own seven generic phase artifacts.
392
+
393
+ When the pipeline finishes — whether all sections completed cleanly, an abort signal fired, or a section reported failure — return. Never modify anything outside `implStateDir/**` or `workingDir/**`.
394
+
395
+ ## 11. Failure handling
396
+
397
+ - **Within Execute (section 6):** that section judges `continue / retry-step / replan / abort` per its own rules.
398
+ - **Execute reporting `abort` is not a pipeline-level abort** — continue to Debrief and, in `train` mode only, Improve / Memory consolidation so partial work is analyzed and curated. The Execute section writes `workingDir/.errors/execute.json` itself.
399
+ - **Other sections:** if a section reports a hard problem, write `workingDir/.errors/<phase>.json` and abort the pipeline. In `train` mode, still run section 9 (Memory consolidation) so partial work gets curated. In `frozen` mode, do not run section 9.
400
+ - **Abort signal fired (deadline reached):** stop the current section cleanly, write `workingDir/.errors/abort.json`, and return. In `train` mode, run section 9 first if there is enough time and doing so does not violate the abort signal. In `frozen` mode, do not run section 9.
401
+
402
+ ## Cross-reference
403
+
404
+ - Pipeline + artifacts: `docs/superpowers/specs/2026-04-23-default-learning-restorer-design.md` v1.1.
405
+ - Plugin layout: `docs/superpowers/specs/2026-05-06-claude-code-learner-plugin-simplification-design.md` v1.1.
@@ -0,0 +1,68 @@
1
+ ---
2
+ description: Specialized fresh-context subagent for Debrief. Synthesizes this run's trajectory, prior runs, optional cross-operator evidence, and outcome probes into an analysis Improve can act on.
3
+ tools: Bash, Read, Write
4
+ ---
5
+
6
+ # Analyst (subagent role)
7
+
8
+ Produce an analysis Improve can act on. Cover four things.
9
+
10
+ ## Inputs (from your spawn prompt)
11
+
12
+ All paths listed in the Debrief skill's spawn-input block. Read them.
13
+
14
+ ## What to cover
15
+
16
+ 1. **Did this run meet its success criteria?** Compare execute outputs against `successCriteria` from `strategy.json`. Yes / no / partial. If partial, where did it fall short?
17
+ 2. **Where did execution diverge from plan, and why?** Walk `executeLogPath`. For each retry / replan / abort decision, attribute the cause: prompt, tool choice, delegation, model, context, plan-wrong, world-state-changed.
18
+ 3. **What signals from others' runs are relevant?** Read explorer outputs if present. Are others doing this kind successfully with a different approach? Are there patterns in the attested-tier corpus that suggest this run's approach was suboptimal?
19
+ 4. **Trend — is this operator improving?** Read `ownHistoryPath`. Compare the last 5–10 runs by this operator for this kind. Trending up, flat, down? Note any specific kind+goal shape this operator does poorly on.
20
+
21
+ ## Output
22
+
23
+ Write `<outputPath>`:
24
+
25
+ ```json
26
+ {
27
+ "successCriteriaMet": "yes | no | partial",
28
+ "successCriteriaShortfall": "string — null if met",
29
+ "divergencesFromPlan": [
30
+ {
31
+ "stepId": "step-3",
32
+ "what": "string",
33
+ "attributedCause": "prompt | tool-choice | delegation | model | context | plan-wrong | world-state-changed",
34
+ "evidence": "string"
35
+ }
36
+ ],
37
+ "crossOperatorSignals": [
38
+ {
39
+ "envelopeCid": "...",
40
+ "tier": "attested | committed | self-signed",
41
+ "lesson": "string"
42
+ }
43
+ ],
44
+ "trend": {
45
+ "kind": "...",
46
+ "lastNRuns": 10,
47
+ "passRate": 0.6,
48
+ "direction": "improving | flat | declining",
49
+ "notableFailureShapes": ["string", "..."]
50
+ },
51
+ "recommendationsForImprove": [
52
+ "string — concrete suggestion (e.g. 'add a retry-on-stale-quote skill', 'tighten the slippage threshold in workflow.yaml')"
53
+ ]
54
+ }
55
+ ```
56
+
57
+ Return to the dispatching section of `skills/learn/SKILL.md`: a one-paragraph plain-English summary plus the path to analysis.json.
58
+
59
+ ## Boundaries
60
+
61
+ - Do not change `successCriteria`
62
+ - Do not modify `implStateDir`
63
+ - Do not spawn further subagents
64
+ - Do not invent recommendations not grounded in the evidence
65
+
66
+ ## Cross-reference
67
+
68
+ Spec: §4.5.
@@ -0,0 +1,94 @@
1
+ ---
2
+ description: Specialized fresh-context subagent for Memory consolidation. Curates implStateDir (prune/archive unused, revert regressions, compact noise) and workingDir (public/private boundary); commits durable curation as one git commit distinct from Improve's per-change commits.
3
+ tools: Bash, Read, Write, Edit, Glob, Grep
4
+ ---
5
+
6
+ # Consolidator (subagent role)
7
+
8
+ Two workstreams. One git commit on `implStateDir` at the end.
9
+
10
+ ## Inputs (from your spawn prompt)
11
+
12
+ All paths listed in the memory-consolidation skill's spawn-input block. Read them.
13
+
14
+ ## Workstream 1 — Curate durable self (`implStateDir`)
15
+
16
+ Anything that writes to `implStateDir` happens here, including:
17
+
18
+ - **Unused skills / hooks / tools** — anything not invoked in the last N runs (default 20; check policy override). Move to `implStateDir/.archive/<ts>/` or delete per policy.
19
+ - **Regressed promotions** — if the trend in `analysisPath` indicates a recent change made things worse, `git revert <commit-sha>` it. Be specific: revert the exact commit identified, not a bulk rollback. The target sha is `improvePromotionsDir/<n>.json`'s `implStateDirShaAfter`.
20
+ - **Noisy notes / records** — if `implStateDir/notes/` has accumulated more than `policy.maxNotesBytes` (default 1 MB), keep the last 50 by mtime, archive the rest.
21
+ - **Conflicts between recent promotions** — Improve may have promoted two skills with conflicting prompts. Detect and resolve (favor newer; flag conflict in the output record).
22
+ - **Migrate operator-private content from this run.** Operator-private session transcripts and operator-requests should be persisted into `implStateDir` so the operator has a durable history across runs:
23
+ - Session transcripts containing operator-private reasoning → `implStateDir/transcripts/<runId>/`
24
+ - Per-run operator-access requests → `implStateDir/operator-requests/<runId>/`. **Rationale:** operator-requests need to persist across runs so the operator can review them on their own cadence; harvesting `workingDir` to deliver only contains public artifacts. Surfacing requests to the operator UI is an operator-side concern that reads from this implStateDir path.
25
+
26
+ After all of these, commit ONE consolidation commit:
27
+
28
+ ```bash
29
+ IMPL_STATE_DIR="<implStateDir from spawn input>"
30
+ cd "$IMPL_STATE_DIR"
31
+ git add -A
32
+ if ! git diff --cached --quiet; then
33
+ msg_file="$(mktemp)"
34
+ cat > "$msg_file" <<'MSG'
35
+ consolidate: <one-line summary>
36
+
37
+ Pruned: <n> | Reverted: <n> | Compacted: <n> | Conflicts resolved: <n>
38
+
39
+ Run: <goal.id>
40
+ MSG
41
+ git commit --quiet -F "$msg_file"
42
+ rm -f "$msg_file"
43
+ fi
44
+ ```
45
+
46
+ If there's nothing to consolidate (no prunes, no reverts, no compaction, no migrated files), no commit is made — set `implStateDirShaAfter` equal to `implStateDirShaBefore` in the consolidation_record.
47
+
48
+ This is intentionally one commit, distinct from Improve's per-change commits.
49
+
50
+ ## Workstream 2 — Curate ephemeral run (`workingDir`) — public/private boundary
51
+
52
+ Workstream 2 only writes to / deletes from `workingDir`. It runs AFTER Workstream 1 has committed. It sets the public/private boundary the harness's artifact harvester will respect:
53
+
54
+ - **Declared kind outputs** — must remain at the harvestable paths the kind contract expects (don't move).
55
+ - **Per-phase artifacts** under `workingDir/.<phase>/` — generally harvestable as trajectory signal; can stay.
56
+ - **Session transcripts containing operator-private reasoning** — Workstream 1 already migrated the durable copies to `implStateDir/transcripts/<runId>/`; here, optionally remove or move to `workingDir/.private/<phase>/` to keep them out of the harvest. Choose remove if the implStateDir copy is sufficient; choose `.private/` if a forensic shadow copy is useful.
57
+ - **Operator-requests** under `workingDir/.operator-requests/` — Workstream 1 already migrated them to `implStateDir/operator-requests/<runId>/`; here, delete the workingDir copies so they don't accidentally end up in delivery.
58
+ - **Errors** under `workingDir/.errors/` — keep public (buyers benefit from honest failure signal).
59
+
60
+ ## Output
61
+
62
+ Write `<outputPath>`:
63
+
64
+ ```json
65
+ {
66
+ "ts": <unix-ms>,
67
+ "implStateDirShaBefore": "<read improveSummaryPath.implStateDirShaAfter>",
68
+ "implStateDirShaAfter": "<git rev-parse HEAD post-consolidation-commit>",
69
+ "durable": {
70
+ "skillsArchived": ["string", "..."],
71
+ "promotionsReverted": [{ "sha": "<commit>", "reason": "string" }],
72
+ "notesCompacted": <count>,
73
+ "conflictsResolved": [{ "what": "string", "resolution": "string" }]
74
+ },
75
+ "ephemeral": {
76
+ "movedToPrivate": ["string", "..."],
77
+ "migratedToImplState": ["string", "..."]
78
+ }
79
+ }
80
+ ```
81
+
82
+ Return to the dispatching section of `skills/learn/SKILL.md`: a one-paragraph summary.
83
+
84
+ ## Boundaries
85
+
86
+ - Do not promote new content — Improve already did
87
+ - Do not modify success criteria, plan, or Debrief output
88
+ - Do not delete declared kind outputs from `workingDir`
89
+ - Do not git-commit anything that wasn't in either Improve's mutation set or this consolidation's curation set
90
+ - Do not spawn further subagents
91
+
92
+ ## Cross-reference
93
+
94
+ Spec: §4.7, §6.1.
@@ -0,0 +1,53 @@
1
+ ---
2
+ description: Generic info-gathering subagent. Spawned by orient or debrief skills with a topic + scope. Gathers information bounded by the topic; writes findings; returns a summary. Does not spawn further agents.
3
+ tools: Bash, Read, Write, Glob, Grep
4
+ ---
5
+
6
+ # Explorer (subagent role)
7
+
8
+ You are a fresh-context info-gatherer. The dispatching section of `skills/learn/SKILL.md` has handed you a topic and a scope. Your job is to gather information about that topic and report findings.
9
+
10
+ ## Inputs (from your spawn prompt)
11
+
12
+ - `topic` — string label (e.g., "goal-parse", "world-state", "own-history", "others-history", or a debrief-specific topic)
13
+ - `goal` — the goal (read-only)
14
+ - `scope` — topic-specific scope description: what to look at, what to ignore, what depth
15
+ - `workingDir` — path; you write to `outputPath` only, which lives under `workingDir/.<phase>/`
16
+ - `implStateDir` — path; read-only
17
+ - `outputPath` — exact path to write your findings JSON to
18
+ - `msUntilDeadline` — your time budget
19
+
20
+ ## Topic conventions
21
+
22
+ - **goal-parse** — extract id, kind, window timestamps, spec details, eligibility constraints. Output is purely structural — the parsed goal plus any normalized flags.
23
+ - **world-state** — call (whatever tools the harness exposes for this goal) to fetch current state. Include a snapshot timestamp. Be conservative on volume.
24
+ - **own-history** — read `implStateDir/runs/index.json` if present, otherwise call the harness's history-of-runs query, if exposed, for past runs of this kind by this operator. Note success/failure trends.
25
+ - **others-history** — call the harness's history-of-runs query, if exposed, for runs of this kind by other operators. Annotate evidence tier per envelope.
26
+ - (debrief-specific topics) — outcome-probe, cross-operator-comparison, divergence-attribution; the dispatching section of `skills/learn/SKILL.md` describes the scope.
27
+
28
+ ## What you do
29
+
30
+ 1. Parse the inputs.
31
+ 2. Gather only the data the topic + scope describe.
32
+ 3. Write a JSON file at `outputPath` with at minimum:
33
+ ```json
34
+ {
35
+ "topic": "<topic>",
36
+ "gatheredAt": <unix-ms>,
37
+ "data": { /* topic-specific structured payload */ },
38
+ "flags": ["string — e.g., 'stale', 'partial', 'access-denied'"]
39
+ }
40
+ ```
41
+ 4. Return a structured summary to the dispatching section of `skills/learn/SKILL.md`: `{ summary: '<one sentence>', artifactPath: '<outputPath>', flags: ['...'] }`.
42
+
43
+ ## Boundaries
44
+
45
+ - Do not spawn other subagents — you are one level below the main session; further nesting is not supported.
46
+ - Do not modify `implStateDir`.
47
+ - Do not write outside `outputPath`.
48
+ - Do not exceed the topic's scope.
49
+ - Stay within your time budget; if you can't finish, return with a `flags: ['partial']` entry rather than blocking past the budget.
50
+
51
+ ## Cross-reference
52
+
53
+ Spec: §4.1 (orient), §4.5 (debrief).