@jinn-network/client 0.1.5 → 0.1.6-canary.118cd4d0

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 (343) hide show
  1. package/CHANGELOG.md +98 -0
  2. package/dist/adapters/mech/adapter.js +7 -7
  3. package/dist/adapters/mech/adapter.js.map +1 -1
  4. package/dist/adapters/mech/ipfs-pinfile.d.ts +22 -0
  5. package/dist/adapters/mech/ipfs-pinfile.js +54 -0
  6. package/dist/adapters/mech/ipfs-pinfile.js.map +1 -0
  7. package/dist/adapters/mech/ipfs.d.ts +1 -0
  8. package/dist/adapters/mech/ipfs.js +24 -1
  9. package/dist/adapters/mech/ipfs.js.map +1 -1
  10. package/dist/api/bootstrap-endpoint.js +14 -1
  11. package/dist/api/bootstrap-endpoint.js.map +1 -1
  12. package/dist/api/discovery-endpoint.d.ts +31 -0
  13. package/dist/api/discovery-endpoint.js +78 -0
  14. package/dist/api/discovery-endpoint.js.map +1 -0
  15. package/dist/api/fleet-build.d.ts +7 -0
  16. package/dist/api/fleet-build.js +6 -1
  17. package/dist/api/fleet-build.js.map +1 -1
  18. package/dist/api/gather-status.js +20 -3
  19. package/dist/api/gather-status.js.map +1 -1
  20. package/dist/api/harness-readiness-endpoint.d.ts +25 -0
  21. package/dist/api/harness-readiness-endpoint.js +24 -0
  22. package/dist/api/harness-readiness-endpoint.js.map +1 -0
  23. package/dist/api/hermes-doctor-endpoint.d.ts +26 -0
  24. package/dist/api/hermes-doctor-endpoint.js +29 -0
  25. package/dist/api/hermes-doctor-endpoint.js.map +1 -0
  26. package/dist/api/server.d.ts +43 -0
  27. package/dist/api/server.js +39 -0
  28. package/dist/api/server.js.map +1 -1
  29. package/dist/api/setup-endpoints.d.ts +5 -0
  30. package/dist/api/setup-endpoints.js +24 -5
  31. package/dist/api/setup-endpoints.js.map +1 -1
  32. package/dist/build-info.json +4 -4
  33. package/dist/build-meta.json +1 -1
  34. package/dist/cli/commands/auth.js +3 -1
  35. package/dist/cli/commands/auth.js.map +1 -1
  36. package/dist/cli/commands/create.d.ts +5 -3
  37. package/dist/cli/commands/create.js +101 -36
  38. package/dist/cli/commands/create.js.map +1 -1
  39. package/dist/cli/commands/solver-nets.d.ts +19 -0
  40. package/dist/cli/commands/solver-nets.js +140 -2
  41. package/dist/cli/commands/solver-nets.js.map +1 -1
  42. package/dist/cli/commands/solver-plugins-publish.d.ts +31 -0
  43. package/dist/cli/commands/solver-plugins-publish.js +169 -0
  44. package/dist/cli/commands/solver-plugins-publish.js.map +1 -0
  45. package/dist/cli/commands/solver-plugins-revoke.d.ts +15 -0
  46. package/dist/cli/commands/solver-plugins-revoke.js +91 -0
  47. package/dist/cli/commands/solver-plugins-revoke.js.map +1 -0
  48. package/dist/cli/commands/solver-plugins.d.ts +50 -6
  49. package/dist/cli/commands/solver-plugins.js +205 -68
  50. package/dist/cli/commands/solver-plugins.js.map +1 -1
  51. package/dist/config.d.ts +27 -0
  52. package/dist/config.js +30 -2
  53. package/dist/config.js.map +1 -1
  54. package/dist/conformance/checks/hash-signature.js +6 -2
  55. package/dist/conformance/checks/hash-signature.js.map +1 -1
  56. package/dist/conformance/checks/payload.js +4 -2
  57. package/dist/conformance/checks/payload.js.map +1 -1
  58. package/dist/conformance/checks/verdict.d.ts +10 -10
  59. package/dist/conformance/checks/verdict.js +16 -15
  60. package/dist/conformance/checks/verdict.js.map +1 -1
  61. package/dist/conformance/harness.d.ts +1 -1
  62. package/dist/conformance/harness.js +16 -9
  63. package/dist/conformance/harness.js.map +1 -1
  64. package/dist/conformance/types.d.ts +10 -3
  65. package/dist/conformance/types.js.map +1 -1
  66. package/dist/corpus/acquire.d.ts +1 -3
  67. package/dist/corpus/acquire.js.map +1 -1
  68. package/dist/corpus/envelope-projection.d.ts +1 -1
  69. package/dist/corpus/envelope-projection.js +14 -7
  70. package/dist/corpus/envelope-projection.js.map +1 -1
  71. package/dist/corpus/index.d.ts +2 -1
  72. package/dist/corpus/index.js.map +1 -1
  73. package/dist/corpus/prediction-brier-scoreboard-report.js +1 -1
  74. package/dist/corpus/prediction-brier-scoreboard-report.js.map +1 -1
  75. package/dist/corpus/prediction-brier-scoreboard.js +3 -1
  76. package/dist/corpus/prediction-brier-scoreboard.js.map +1 -1
  77. package/dist/corpus/types.d.ts +2 -2
  78. package/dist/daemon/daemon.d.ts +17 -1
  79. package/dist/daemon/daemon.js +15 -0
  80. package/dist/daemon/daemon.js.map +1 -1
  81. package/dist/daemon/freeze-fence.js +6 -3
  82. package/dist/daemon/freeze-fence.js.map +1 -1
  83. package/dist/daemon/readiness-gate.d.ts +30 -0
  84. package/dist/daemon/readiness-gate.js +31 -0
  85. package/dist/daemon/readiness-gate.js.map +1 -0
  86. package/dist/dashboard/assets/{index-D_NMfDfV.css → index-DOlzFN8a.css} +1 -1
  87. package/dist/dashboard/assets/index-NkZ7CTAT.js +140 -0
  88. package/dist/dashboard/index.html +2 -2
  89. package/dist/discovery/http.js +121 -0
  90. package/dist/discovery/http.js.map +1 -1
  91. package/dist/discovery/onchain.js +11 -0
  92. package/dist/discovery/onchain.js.map +1 -1
  93. package/dist/discovery/types.d.ts +112 -0
  94. package/dist/discovery/types.js.map +1 -1
  95. package/dist/discovery/with-fallback.js +9 -0
  96. package/dist/discovery/with-fallback.js.map +1 -1
  97. package/dist/earning/agent-wallet-binding.d.ts +20 -1
  98. package/dist/earning/agent-wallet-binding.js +54 -16
  99. package/dist/earning/agent-wallet-binding.js.map +1 -1
  100. package/dist/earning/bootstrap.d.ts +119 -0
  101. package/dist/earning/bootstrap.js +482 -16
  102. package/dist/earning/bootstrap.js.map +1 -1
  103. package/dist/earning/contracts.js +9 -1
  104. package/dist/earning/contracts.js.map +1 -1
  105. package/dist/earning/funding-plan.js +15 -2
  106. package/dist/earning/funding-plan.js.map +1 -1
  107. package/dist/earning/store.js +48 -1
  108. package/dist/earning/store.js.map +1 -1
  109. package/dist/earning/types.d.ts +30 -0
  110. package/dist/earning/types.js +37 -0
  111. package/dist/earning/types.js.map +1 -1
  112. package/dist/erc8004/abis.d.ts +64 -0
  113. package/dist/erc8004/abis.js +48 -0
  114. package/dist/erc8004/abis.js.map +1 -1
  115. package/dist/erc8004/plugin-registry.d.ts +102 -0
  116. package/dist/erc8004/plugin-registry.js +165 -0
  117. package/dist/erc8004/plugin-registry.js.map +1 -0
  118. package/dist/events/types.d.ts +2 -2
  119. package/dist/harnesses/engine/engine.js +15 -3
  120. package/dist/harnesses/engine/engine.js.map +1 -1
  121. package/dist/harnesses/engine/envelope-assembly.d.ts +2 -2
  122. package/dist/harnesses/engine/envelope-assembly.js +4 -2
  123. package/dist/harnesses/engine/envelope-assembly.js.map +1 -1
  124. package/dist/harnesses/freeze.d.ts +4 -1
  125. package/dist/harnesses/freeze.js +12 -2
  126. package/dist/harnesses/freeze.js.map +1 -1
  127. package/dist/harnesses/impls/claude-mcp-prediction/index.d.ts +4 -1
  128. package/dist/harnesses/impls/claude-mcp-prediction/index.js +7 -2
  129. package/dist/harnesses/impls/claude-mcp-prediction/index.js.map +1 -1
  130. package/dist/harnesses/impls/claude-mcp-prediction-apy/index.d.ts +4 -1
  131. package/dist/harnesses/impls/claude-mcp-prediction-apy/index.js +7 -2
  132. package/dist/harnesses/impls/claude-mcp-prediction-apy/index.js.map +1 -1
  133. package/dist/harnesses/impls/evaluation-context.d.ts +15 -4
  134. package/dist/harnesses/impls/evaluation-context.js +24 -8
  135. package/dist/harnesses/impls/evaluation-context.js.map +1 -1
  136. package/dist/harnesses/impls/hermes-agent/adapter.d.ts +34 -0
  137. package/dist/harnesses/impls/hermes-agent/adapter.js +205 -0
  138. package/dist/harnesses/impls/hermes-agent/adapter.js.map +1 -0
  139. package/dist/harnesses/impls/hermes-agent/bootstrap.d.ts +18 -0
  140. package/dist/harnesses/impls/hermes-agent/bootstrap.js +231 -0
  141. package/dist/harnesses/impls/hermes-agent/bootstrap.js.map +1 -0
  142. package/dist/harnesses/impls/hermes-agent/config-builder.d.ts +49 -0
  143. package/dist/harnesses/impls/hermes-agent/config-builder.js +104 -0
  144. package/dist/harnesses/impls/hermes-agent/config-builder.js.map +1 -0
  145. package/dist/harnesses/impls/hermes-agent/harness.d.ts +30 -0
  146. package/dist/harnesses/impls/hermes-agent/harness.js +52 -0
  147. package/dist/harnesses/impls/hermes-agent/harness.js.map +1 -0
  148. package/dist/harnesses/impls/hermes-agent/index.d.ts +5 -0
  149. package/dist/harnesses/impls/hermes-agent/index.js +7 -0
  150. package/dist/harnesses/impls/hermes-agent/index.js.map +1 -0
  151. package/dist/harnesses/impls/hermes-agent/prompt.d.ts +15 -0
  152. package/dist/harnesses/impls/hermes-agent/prompt.js +37 -0
  153. package/dist/harnesses/impls/hermes-agent/prompt.js.map +1 -0
  154. package/dist/harnesses/impls/index.d.ts +6 -0
  155. package/dist/harnesses/impls/index.js +17 -4
  156. package/dist/harnesses/impls/index.js.map +1 -1
  157. package/dist/harnesses/impls/learner/adapters/claude-code.js.map +1 -0
  158. package/dist/harnesses/impls/{claude-code-learner → learner}/adapters/codex-code.js +13 -34
  159. package/dist/harnesses/impls/learner/adapters/codex-code.js.map +1 -0
  160. package/dist/harnesses/impls/learner/adapters/codex-workspace.js.map +1 -0
  161. package/dist/harnesses/impls/{claude-code-learner → learner}/harness.d.ts +9 -3
  162. package/dist/harnesses/impls/{claude-code-learner → learner}/harness.js +24 -1
  163. package/dist/harnesses/impls/learner/harness.js.map +1 -0
  164. package/dist/harnesses/impls/{claude-code-learner → learner}/harvest.js +15 -3
  165. package/dist/harnesses/impls/learner/harvest.js.map +1 -0
  166. package/dist/harnesses/impls/{claude-code-learner → learner}/index.d.ts +5 -5
  167. package/dist/harnesses/impls/{claude-code-learner → learner}/index.js +4 -4
  168. package/dist/harnesses/impls/learner/index.js.map +1 -0
  169. package/dist/harnesses/impls/{claude-code-learner → learner}/plugin-path.d.ts +4 -4
  170. package/dist/harnesses/impls/{claude-code-learner → learner}/plugin-path.js +7 -7
  171. package/dist/harnesses/impls/learner/plugin-path.js.map +1 -0
  172. package/dist/harnesses/impls/{claude-code-learner → learner}/restoration-patch.js +3 -1
  173. package/dist/harnesses/impls/learner/restoration-patch.js.map +1 -0
  174. package/dist/harnesses/impls/learner/test-utils/fake-plugin-outputs.js.map +1 -0
  175. package/dist/harnesses/impls/learner/test-utils/noop-adapter.js.map +1 -0
  176. package/dist/harnesses/impls/{claude-code-learner → learner}/types.d.ts +12 -2
  177. package/dist/harnesses/impls/learner/types.js.map +1 -0
  178. package/dist/harnesses/impls/portfolio-v0-evaluator/index.js +13 -12
  179. package/dist/harnesses/impls/portfolio-v0-evaluator/index.js.map +1 -1
  180. package/dist/harnesses/impls/prediction-apy-v0-evaluator/index.js +7 -7
  181. package/dist/harnesses/impls/prediction-apy-v0-evaluator/index.js.map +1 -1
  182. package/dist/harnesses/impls/prediction-apy-v0-evaluator/parse-submission.d.ts +3 -3
  183. package/dist/harnesses/impls/prediction-apy-v0-evaluator/parse-submission.js +7 -6
  184. package/dist/harnesses/impls/prediction-apy-v0-evaluator/parse-submission.js.map +1 -1
  185. package/dist/harnesses/impls/prediction-v0-evaluator/checks/integrity.js +1 -1
  186. package/dist/harnesses/impls/prediction-v0-evaluator/checks/integrity.js.map +1 -1
  187. package/dist/harnesses/impls/prediction-v0-evaluator/index.js +11 -10
  188. package/dist/harnesses/impls/prediction-v0-evaluator/index.js.map +1 -1
  189. package/dist/harnesses/impls/prediction-v1-evaluator/index.js +11 -10
  190. package/dist/harnesses/impls/prediction-v1-evaluator/index.js.map +1 -1
  191. package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.d.ts +1 -0
  192. package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.js +10 -2
  193. package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.js.map +1 -1
  194. package/dist/harnesses/impls/swe-rebench-v2-evaluator/harness.d.ts +24 -5
  195. package/dist/harnesses/impls/swe-rebench-v2-evaluator/harness.js +104 -4
  196. package/dist/harnesses/impls/swe-rebench-v2-evaluator/harness.js.map +1 -1
  197. package/dist/harnesses/impls/swe-rebench-v2-evaluator/hf-fetcher.d.ts +9 -0
  198. package/dist/harnesses/impls/swe-rebench-v2-evaluator/hf-fetcher.js +25 -1
  199. package/dist/harnesses/impls/swe-rebench-v2-evaluator/hf-fetcher.js.map +1 -1
  200. package/dist/harnesses/names.d.ts +1 -0
  201. package/dist/harnesses/names.js +3 -0
  202. package/dist/harnesses/names.js.map +1 -1
  203. package/dist/harnesses/readiness-registry.d.ts +48 -0
  204. package/dist/harnesses/readiness-registry.js +136 -0
  205. package/dist/harnesses/readiness-registry.js.map +1 -0
  206. package/dist/harnesses/types.d.ts +7 -0
  207. package/dist/main.d.ts +14 -0
  208. package/dist/main.js +112 -37
  209. package/dist/main.js.map +1 -1
  210. package/dist/mcp/server.js +14 -13
  211. package/dist/mcp/server.js.map +1 -1
  212. package/dist/operator-errors.js +13 -1
  213. package/dist/operator-errors.js.map +1 -1
  214. package/dist/preflight/claude-auth.d.ts +18 -0
  215. package/dist/preflight/claude-auth.js +38 -0
  216. package/dist/preflight/claude-auth.js.map +1 -1
  217. package/dist/scripts/donation-consumption-acceptance.js +1 -1
  218. package/dist/scripts/donation-consumption-acceptance.js.map +1 -1
  219. package/dist/scripts/swe-rebench-v2-known-bad.json +12 -0
  220. package/dist/scripts/swe-rebench-v2-seed-pool.json +26 -0
  221. package/dist/solver-types/_swe-rebench-v2-substrate.d.ts +52 -0
  222. package/dist/solver-types/_swe-rebench-v2-substrate.js +76 -0
  223. package/dist/solver-types/_swe-rebench-v2-substrate.js.map +1 -0
  224. package/dist/solver-types/_swe-rebench-v2-validated-pool.d.ts +38 -12
  225. package/dist/solver-types/_swe-rebench-v2-validated-pool.js +136 -27
  226. package/dist/solver-types/_swe-rebench-v2-validated-pool.js.map +1 -1
  227. package/dist/solver-types/swe-rebench-v2-auto.d.ts +6 -0
  228. package/dist/solver-types/swe-rebench-v2-auto.js.map +1 -1
  229. package/dist/solver-types/swe-rebench-v2.d.ts +1 -0
  230. package/dist/solver-types/swe-rebench-v2.js +19 -6
  231. package/dist/solver-types/swe-rebench-v2.js.map +1 -1
  232. package/dist/store/store.js +12 -4
  233. package/dist/store/store.js.map +1 -1
  234. package/dist/templates/plugins/runtime-plugin/.mcp.json.tmpl +8 -0
  235. package/dist/templates/plugins/runtime-plugin/README.md.tmpl +30 -0
  236. package/dist/templates/plugins/runtime-plugin/gitignore.tmpl +3 -0
  237. package/dist/templates/plugins/runtime-plugin/jinn.plugin.json.tmpl +21 -0
  238. package/dist/templates/plugins/runtime-plugin/mcp/server.mjs.tmpl +33 -0
  239. package/dist/templates/plugins/runtime-plugin/package.json.tmpl +15 -0
  240. package/dist/templates/plugins/runtime-plugin/test/plugin.test.ts.tmpl +35 -0
  241. package/dist/templates/plugins/runtime-plugin/tsconfig.json.tmpl +11 -0
  242. package/dist/templates/plugins/solver-type-plugin/README.md.tmpl +35 -0
  243. package/dist/templates/plugins/solver-type-plugin/gitignore.tmpl +3 -0
  244. package/dist/templates/plugins/solver-type-plugin/jinn.plugin.json.tmpl +11 -0
  245. package/dist/templates/plugins/solver-type-plugin/package.json.tmpl +15 -0
  246. package/dist/templates/plugins/solver-type-plugin/skills/example/SKILL.md.tmpl +10 -0
  247. package/dist/templates/plugins/solver-type-plugin/test/plugin.test.ts.tmpl +25 -0
  248. package/dist/templates/plugins/solver-type-plugin/tsconfig.json.tmpl +11 -0
  249. package/dist/tx-retry.d.ts +13 -0
  250. package/dist/tx-retry.js +22 -0
  251. package/dist/tx-retry.js.map +1 -1
  252. package/dist/types/envelope.d.ts +28 -21
  253. package/dist/types/envelope.js +8 -3
  254. package/dist/types/envelope.js.map +1 -1
  255. package/dist/types/payloads/index.d.ts +2 -2
  256. package/dist/types/payloads/index.js +13 -12
  257. package/dist/types/payloads/index.js.map +1 -1
  258. package/dist/types/payloads/portfolio-v0.d.ts +60 -10
  259. package/dist/types/payloads/portfolio-v0.js +16 -6
  260. package/dist/types/payloads/portfolio-v0.js.map +1 -1
  261. package/dist/types/payloads/prediction-apy-v0.d.ts +52 -10
  262. package/dist/types/payloads/prediction-apy-v0.js +16 -6
  263. package/dist/types/payloads/prediction-apy-v0.js.map +1 -1
  264. package/dist/types/payloads/prediction-v0.d.ts +49 -10
  265. package/dist/types/payloads/prediction-v0.js +16 -6
  266. package/dist/types/payloads/prediction-v0.js.map +1 -1
  267. package/dist/vendor/@jinn-network/sdk/dist/payloads/prediction-v1.d.ts +45 -6
  268. package/dist/vendor/@jinn-network/sdk/dist/payloads/prediction-v1.js +16 -6
  269. package/dist/x402/handler.js +51 -20
  270. package/dist/x402/handler.js.map +1 -1
  271. package/package.json +11 -3
  272. package/plugins/swe-rebench-v2-diffmin/.claude-plugin/plugin.json +5 -0
  273. package/plugins/swe-rebench-v2-diffmin/.mcp.json +8 -0
  274. package/plugins/swe-rebench-v2-diffmin/README.md +69 -0
  275. package/plugins/swe-rebench-v2-diffmin/jinn.plugin.json +12 -0
  276. package/plugins/swe-rebench-v2-diffmin/mcp/diff-stats-server.mjs +72 -0
  277. package/plugins/swe-rebench-v2-diffmin/mcp/diff-stats.mjs +48 -0
  278. package/plugins/swe-rebench-v2-diffmin/package.json +19 -0
  279. package/plugins/swe-rebench-v2-diffmin/skills/diffmin/SKILL.md +116 -0
  280. package/plugins/swe-rebench-v2-diffmin/skills/test-map/SKILL.md +126 -0
  281. package/plugins/swe-rebench-v2-diffmin/test/diff-stats.test.ts +62 -0
  282. package/plugins/swe-rebench-v2-diffmin/test/manifest.test.ts +53 -0
  283. package/plugins/swe-rebench-v2-diffmin/tsconfig.json +12 -0
  284. package/plugins/swe-rebench-v2-runtime/README.md +13 -0
  285. package/plugins/swe-rebench-v2-runtime/skills/orient/SKILL.md +7 -3
  286. package/plugins/swe-rebench-v2-runtime/skills/plan/SKILL.md +6 -17
  287. package/templates/plugins/runtime-plugin/.mcp.json.tmpl +8 -0
  288. package/templates/plugins/runtime-plugin/README.md.tmpl +30 -0
  289. package/templates/plugins/runtime-plugin/gitignore.tmpl +3 -0
  290. package/templates/plugins/runtime-plugin/jinn.plugin.json.tmpl +21 -0
  291. package/templates/plugins/runtime-plugin/mcp/server.mjs.tmpl +33 -0
  292. package/templates/plugins/runtime-plugin/package.json.tmpl +15 -0
  293. package/templates/plugins/runtime-plugin/test/plugin.test.ts.tmpl +35 -0
  294. package/templates/plugins/runtime-plugin/tsconfig.json.tmpl +11 -0
  295. package/templates/plugins/solver-type-plugin/README.md.tmpl +35 -0
  296. package/templates/plugins/solver-type-plugin/gitignore.tmpl +3 -0
  297. package/templates/plugins/solver-type-plugin/jinn.plugin.json.tmpl +11 -0
  298. package/templates/plugins/solver-type-plugin/package.json.tmpl +15 -0
  299. package/templates/plugins/solver-type-plugin/skills/example/SKILL.md.tmpl +10 -0
  300. package/templates/plugins/solver-type-plugin/test/plugin.test.ts.tmpl +25 -0
  301. package/templates/plugins/solver-type-plugin/tsconfig.json.tmpl +11 -0
  302. package/dist/dashboard/assets/index-BjtltOGc.js +0 -76
  303. package/dist/harnesses/impls/claude-code-learner/adapters/claude-code.js.map +0 -1
  304. package/dist/harnesses/impls/claude-code-learner/adapters/codex-code.js.map +0 -1
  305. package/dist/harnesses/impls/claude-code-learner/adapters/codex-workspace.js.map +0 -1
  306. package/dist/harnesses/impls/claude-code-learner/harness.js.map +0 -1
  307. package/dist/harnesses/impls/claude-code-learner/harvest.js.map +0 -1
  308. package/dist/harnesses/impls/claude-code-learner/index.js.map +0 -1
  309. package/dist/harnesses/impls/claude-code-learner/plugin-path.js.map +0 -1
  310. package/dist/harnesses/impls/claude-code-learner/restoration-patch.js.map +0 -1
  311. package/dist/harnesses/impls/claude-code-learner/test-utils/fake-plugin-outputs.js.map +0 -1
  312. package/dist/harnesses/impls/claude-code-learner/test-utils/noop-adapter.js.map +0 -1
  313. package/dist/harnesses/impls/claude-code-learner/types.js.map +0 -1
  314. package/dist/preflight/claude-required.d.ts +0 -8
  315. package/dist/preflight/claude-required.js +0 -17
  316. package/dist/preflight/claude-required.js.map +0 -1
  317. /package/dist/harnesses/impls/{claude-code-learner → learner}/adapters/claude-code.d.ts +0 -0
  318. /package/dist/harnesses/impls/{claude-code-learner → learner}/adapters/claude-code.js +0 -0
  319. /package/dist/harnesses/impls/{claude-code-learner → learner}/adapters/codex-code.d.ts +0 -0
  320. /package/dist/harnesses/impls/{claude-code-learner → learner}/adapters/codex-workspace.d.ts +0 -0
  321. /package/dist/harnesses/impls/{claude-code-learner → learner}/adapters/codex-workspace.js +0 -0
  322. /package/dist/harnesses/impls/{claude-code-learner → learner}/harvest.d.ts +0 -0
  323. /package/dist/harnesses/impls/{claude-code-learner → learner}/restoration-patch.d.ts +0 -0
  324. /package/dist/harnesses/impls/{claude-code-learner → learner}/test-utils/fake-plugin-outputs.d.ts +0 -0
  325. /package/dist/harnesses/impls/{claude-code-learner → learner}/test-utils/fake-plugin-outputs.js +0 -0
  326. /package/dist/harnesses/impls/{claude-code-learner → learner}/test-utils/noop-adapter.d.ts +0 -0
  327. /package/dist/harnesses/impls/{claude-code-learner → learner}/test-utils/noop-adapter.js +0 -0
  328. /package/dist/harnesses/impls/{claude-code-learner → learner}/types.js +0 -0
  329. /package/plugins/{claude-code-learner → learner}/.claude-plugin/plugin.json +0 -0
  330. /package/plugins/{claude-code-learner → learner}/.codex-plugin/plugin.json +0 -0
  331. /package/plugins/{claude-code-learner → learner}/AGENTS.md +0 -0
  332. /package/plugins/{claude-code-learner → learner}/CLAUDE.md +0 -0
  333. /package/plugins/{claude-code-learner → learner}/README.md +0 -0
  334. /package/plugins/{claude-code-learner → learner}/hooks/hooks.json +0 -0
  335. /package/plugins/{claude-code-learner → learner}/hooks/session-start +0 -0
  336. /package/plugins/{claude-code-learner → learner}/skills/learn/SKILL.md +0 -0
  337. /package/plugins/{claude-code-learner → learner}/skills/learn/analyst-prompt.md +0 -0
  338. /package/plugins/{claude-code-learner → learner}/skills/learn/consolidator-prompt.md +0 -0
  339. /package/plugins/{claude-code-learner → learner}/skills/learn/explorer-prompt.md +0 -0
  340. /package/plugins/{claude-code-learner → learner}/skills/learn/planner-prompt.md +0 -0
  341. /package/plugins/{claude-code-learner → learner}/skills/learn/promoter-prompt.md +0 -0
  342. /package/plugins/{claude-code-learner → learner}/skills/learn/step-worker-prompt.md +0 -0
  343. /package/plugins/{claude-code-learner → learner}/skills/learn/strategist-prompt.md +0 -0
@@ -1,6 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  export declare const StakingModeSchema: z.ZodEnum<["standard", "self-bond"]>;
3
3
  export type StakingMode = z.infer<typeof StakingModeSchema>;
4
+ export declare const FleetStageSchema: z.ZodEnum<["none", "stage1", "stage1_and_2"]>;
5
+ export type FleetStage = z.infer<typeof FleetStageSchema>;
4
6
  export declare const ServiceStepSchema: z.ZodEnum<["awaiting_stake", "service_created", "service_activated", "agents_registered", "service_deployed", "service_staked", "staked", "mech_deployed", "agent_registered", "safe_binding_pending", "complete"]>;
5
7
  export type ServiceStep = z.infer<typeof ServiceStepSchema>;
6
8
  export declare const OPERATIONAL_SERVICE_STEPS: Set<"awaiting_stake" | "service_created" | "service_activated" | "agents_registered" | "service_deployed" | "service_staked" | "staked" | "mech_deployed" | "agent_registered" | "safe_binding_pending" | "complete">;
@@ -21,6 +23,8 @@ export declare const ServiceStateSchema: z.ZodObject<{
21
23
  identity_registry_address: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
22
24
  agent_registered_tx: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
23
25
  safe_bound_to_agent: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
26
+ error_revert_reason: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
27
+ error_short_message: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
24
28
  }, "strip", z.ZodTypeAny, {
25
29
  error: string | null;
26
30
  index: number;
@@ -35,6 +39,8 @@ export declare const ServiceStateSchema: z.ZodObject<{
35
39
  identity_registry_address: string | null;
36
40
  agent_registered_tx: string | null;
37
41
  safe_bound_to_agent: boolean | null;
42
+ error_revert_reason: string | null;
43
+ error_short_message: string | null;
38
44
  }, {
39
45
  error: string | null;
40
46
  index: number;
@@ -49,6 +55,8 @@ export declare const ServiceStateSchema: z.ZodObject<{
49
55
  identity_registry_address?: string | null | undefined;
50
56
  agent_registered_tx?: string | null | undefined;
51
57
  safe_bound_to_agent?: boolean | null | undefined;
58
+ error_revert_reason?: string | null | undefined;
59
+ error_short_message?: string | null | undefined;
52
60
  }>;
53
61
  export type ServiceState = z.infer<typeof ServiceStateSchema>;
54
62
  export declare const FleetStateSchema: z.ZodObject<{
@@ -69,6 +77,8 @@ export declare const FleetStateSchema: z.ZodObject<{
69
77
  identity_registry_address: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
70
78
  agent_registered_tx: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
71
79
  safe_bound_to_agent: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
80
+ error_revert_reason: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
81
+ error_short_message: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
72
82
  }, "strip", z.ZodTypeAny, {
73
83
  error: string | null;
74
84
  index: number;
@@ -83,6 +93,8 @@ export declare const FleetStateSchema: z.ZodObject<{
83
93
  identity_registry_address: string | null;
84
94
  agent_registered_tx: string | null;
85
95
  safe_bound_to_agent: boolean | null;
96
+ error_revert_reason: string | null;
97
+ error_short_message: string | null;
86
98
  }, {
87
99
  error: string | null;
88
100
  index: number;
@@ -97,8 +109,14 @@ export declare const FleetStateSchema: z.ZodObject<{
97
109
  identity_registry_address?: string | null | undefined;
98
110
  agent_registered_tx?: string | null | undefined;
99
111
  safe_bound_to_agent?: boolean | null | undefined;
112
+ error_revert_reason?: string | null | undefined;
113
+ error_short_message?: string | null | undefined;
100
114
  }>, "many">;
101
115
  updated_at: z.ZodString;
116
+ fleet_agent_id: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
117
+ fleet_safe_address: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
118
+ fleet_identity_registry: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
119
+ fleet_stage: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "stage1", "stage1_and_2"]>>>;
102
120
  }, "strip", z.ZodTypeAny, {
103
121
  chain: "base" | "base-sepolia";
104
122
  master_address: string | null;
@@ -117,8 +135,14 @@ export declare const FleetStateSchema: z.ZodObject<{
117
135
  identity_registry_address: string | null;
118
136
  agent_registered_tx: string | null;
119
137
  safe_bound_to_agent: boolean | null;
138
+ error_revert_reason: string | null;
139
+ error_short_message: string | null;
120
140
  }[];
121
141
  updated_at: string;
142
+ fleet_agent_id: string | null;
143
+ fleet_safe_address: string | null;
144
+ fleet_identity_registry: string | null;
145
+ fleet_stage: "none" | "stage1" | "stage1_and_2";
122
146
  }, {
123
147
  chain: "base" | "base-sepolia";
124
148
  master_address: string | null;
@@ -136,9 +160,15 @@ export declare const FleetStateSchema: z.ZodObject<{
136
160
  identity_registry_address?: string | null | undefined;
137
161
  agent_registered_tx?: string | null | undefined;
138
162
  safe_bound_to_agent?: boolean | null | undefined;
163
+ error_revert_reason?: string | null | undefined;
164
+ error_short_message?: string | null | undefined;
139
165
  }[];
140
166
  updated_at: string;
141
167
  staking_mode?: "standard" | "self-bond" | undefined;
168
+ fleet_agent_id?: string | null | undefined;
169
+ fleet_safe_address?: string | null | undefined;
170
+ fleet_identity_registry?: string | null | undefined;
171
+ fleet_stage?: "none" | "stage1" | "stage1_and_2" | undefined;
142
172
  }>;
143
173
  export type FleetState = z.infer<typeof FleetStateSchema>;
144
174
  export declare function createDefaultFleetState(chain?: 'base' | 'base-sepolia'): FleetState;
@@ -1,6 +1,17 @@
1
1
  import { z } from 'zod';
2
2
  // ── Staking mode ─────────────────────────────────────────────────────────────
3
3
  export const StakingModeSchema = z.enum(['standard', 'self-bond']);
4
+ // ── Fleet bootstrap stage marker (nghf) ─────────────────────────────────────
5
+ //
6
+ // `none` — fresh fleet; no identity provisioned yet.
7
+ // `stage1` — fleet-level identity is provisioned (Safe deployed, agentId
8
+ // minted, setAgentWallet bound). Builder-only completion.
9
+ // `stage1_and_2` — at least one service row has reached `complete` /
10
+ // `safe_binding_pending`. Full operator completion.
11
+ //
12
+ // See docs/superpowers/specs/2026-05-13-plug-in-builder-entry-point-design.md §5.1
13
+ // and docs/superpowers/specs/2026-05-14-nghf-staged-bootstrap-fit-findings.md.
14
+ export const FleetStageSchema = z.enum(['none', 'stage1', 'stage1_and_2']);
4
15
  // ── Service step progression ─────────────────────────────────────────────────
5
16
  //
6
17
  // Standard (stOLAS) mode:
@@ -74,6 +85,13 @@ export const ServiceStateSchema = z.object({
74
85
  // Currently always `false` — wallet binding is deferred to jinn-mono-aev
75
86
  // (Safe ERC-1271 wrapping).
76
87
  safe_bound_to_agent: z.boolean().nullable().optional().default(false),
88
+ // Structured diagnostics for safe_binding_failed errors (jinn-mono-hjex.4).
89
+ // Optional — absent on state files written before this field was added.
90
+ // `error_revert_reason` is the decoded contract Error(string) payload or
91
+ // named custom error name; null when the revert had no reason data.
92
+ // `error_short_message` is the concise one-liner from viem's BaseError.
93
+ error_revert_reason: z.string().nullable().optional().default(null),
94
+ error_short_message: z.string().nullable().optional().default(null),
77
95
  });
78
96
  // ── Fleet state (top-level) ──────────────────────────────────────────────────
79
97
  export const FleetStateSchema = z.object({
@@ -82,6 +100,19 @@ export const FleetStateSchema = z.object({
82
100
  staking_mode: StakingModeSchema.default('standard'),
83
101
  services: z.array(ServiceStateSchema),
84
102
  updated_at: z.string(),
103
+ // ── Fleet-level Stage 1 identity (nghf) ─────────────────────────────────
104
+ //
105
+ // These four fields are added so a fleet can carry ERC-8004 identity
106
+ // independently of any service row, enabling builder-only (services: [])
107
+ // operation. Stage 1 always uses the self-bond Safe topology
108
+ // (deterministic prediction from the HD-index-1 agent EOA) regardless of
109
+ // the eventual staking mode — in standard mode, Stage 2 later creates a
110
+ // separate staking Safe via `distributor.stake()`, so dual-role operators
111
+ // end up with two Safes. See findings §8 (Option A).
112
+ fleet_agent_id: z.string().nullable().optional().default(null),
113
+ fleet_safe_address: z.string().nullable().optional().default(null),
114
+ fleet_identity_registry: z.string().nullable().optional().default(null),
115
+ fleet_stage: FleetStageSchema.optional().default('none'),
85
116
  });
86
117
  // ── Factories ────────────────────────────────────────────────────────────────
87
118
  export function createDefaultFleetState(chain = 'base') {
@@ -91,6 +122,10 @@ export function createDefaultFleetState(chain = 'base') {
91
122
  staking_mode: 'standard',
92
123
  services: [],
93
124
  updated_at: new Date().toISOString(),
125
+ fleet_agent_id: null,
126
+ fleet_safe_address: null,
127
+ fleet_identity_registry: null,
128
+ fleet_stage: 'none',
94
129
  };
95
130
  }
96
131
  export function createDefaultServiceState(index, agentAddress) {
@@ -108,6 +143,8 @@ export function createDefaultServiceState(index, agentAddress) {
108
143
  identity_registry_address: null,
109
144
  agent_registered_tx: null,
110
145
  safe_bound_to_agent: false,
146
+ error_revert_reason: null,
147
+ error_short_message: null,
111
148
  };
112
149
  }
113
150
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/earning/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gFAAgF;AAEhF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;AAGnE,gFAAgF;AAChF,EAAE;AACF,0BAA0B;AAC1B,qEAAqE;AACrE,qCAAqC;AACrC,EAAE;AACF,2BAA2B;AAC3B,mFAAmF;AACnF,+EAA+E;AAC/E,qCAAqC;AACrC,EAAE;AACF,2DAA2D;AAC3D,wCAAwC;AACxC,2EAA2E;AAE3E,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC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,EAAE,IAAI;QAClB,UAAU,EAAE,IAAI;QAChB,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,IAAI;QACrB,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,IAAI;QACd,SAAS,EAAE,IAAI;QACf,yBAAyB,EAAE,IAAI;QAC/B,mBAAmB,EAAE,IAAI;QACzB,mBAAmB,EAAE,KAAK;QAC1B,mBAAmB,EAAE,IAAI;QACzB,mBAAmB,EAAE,IAAI;KAC1B,CAAC;AACJ,CAAC"}
@@ -70,6 +70,70 @@ export declare const PAYLOAD_TUPLE_V2: readonly [{
70
70
  readonly name: "modeFlag";
71
71
  readonly type: "uint8";
72
72
  }];
73
+ /**
74
+ * Plug-in registry payload tuple (1pbc).
75
+ *
76
+ * Per `docs/superpowers/specs/2026-05-13-plug-in-builder-entry-point-design.md` §5.2,
77
+ * a published plug-in record is anchored on the existing
78
+ * `IdentityRegistry.setMetadata` surface under the key
79
+ * `plugin:<pluginCid>`, with the payload ABI-encoded against this tuple:
80
+ *
81
+ * abi.encode(
82
+ * uint8 version, // = 1
83
+ * string pluginName, // npm package name
84
+ * string pluginVersion, // semver
85
+ * bytes32 pluginSha256, // digestDirectory output for the packed tarball
86
+ * string[] supports, // SolverType ids (e.g. ["swe-rebench-v2.v1"])
87
+ * uint64 publishedAt // unix seconds
88
+ * )
89
+ *
90
+ * The textual `pluginCid` in the metadataKey is the IPFS CID of the packed
91
+ * tarball; it is the canonical primary key for the record. Builders publish
92
+ * a new CID per version (`plugin:<newCid>`).
93
+ */
94
+ export declare const PLUGIN_PAYLOAD_TUPLE: readonly [{
95
+ readonly name: "version";
96
+ readonly type: "uint8";
97
+ }, {
98
+ readonly name: "pluginName";
99
+ readonly type: "string";
100
+ }, {
101
+ readonly name: "pluginVersion";
102
+ readonly type: "string";
103
+ }, {
104
+ readonly name: "pluginSha256";
105
+ readonly type: "bytes32";
106
+ }, {
107
+ readonly name: "supports";
108
+ readonly type: "string[]";
109
+ }, {
110
+ readonly name: "publishedAt";
111
+ readonly type: "uint64";
112
+ }];
113
+ /**
114
+ * Plug-in revocation payload tuple (1pbc).
115
+ *
116
+ * Builders overwrite `plugin:<pluginCid>` with a `version=2` revoked-marker
117
+ * payload. The indexer treats the most-recent metadata value as authoritative
118
+ * (per spec §5.2 "Revocation"). The key stays the same so the primary-key
119
+ * stability across overwrites is preserved.
120
+ *
121
+ * abi.encode(
122
+ * uint8 version, // = 2
123
+ * bool revoked, // = true
124
+ * string reason
125
+ * )
126
+ */
127
+ export declare const REVOCATION_PAYLOAD_TUPLE: readonly [{
128
+ readonly name: "version";
129
+ readonly type: "uint8";
130
+ }, {
131
+ readonly name: "revoked";
132
+ readonly type: "bool";
133
+ }, {
134
+ readonly name: "reason";
135
+ readonly type: "string";
136
+ }];
73
137
  /** ERC-8004 IdentityRegistry — only the function the publisher calls. */
74
138
  export declare const IDENTITY_REGISTRY_SET_METADATA_ABI: readonly [{
75
139
  readonly type: "function";
@@ -47,6 +47,54 @@ export const PAYLOAD_TUPLE_V2 = [
47
47
  { name: 'implName', type: 'string' },
48
48
  { name: 'modeFlag', type: 'uint8' },
49
49
  ];
50
+ /**
51
+ * Plug-in registry payload tuple (1pbc).
52
+ *
53
+ * Per `docs/superpowers/specs/2026-05-13-plug-in-builder-entry-point-design.md` §5.2,
54
+ * a published plug-in record is anchored on the existing
55
+ * `IdentityRegistry.setMetadata` surface under the key
56
+ * `plugin:<pluginCid>`, with the payload ABI-encoded against this tuple:
57
+ *
58
+ * abi.encode(
59
+ * uint8 version, // = 1
60
+ * string pluginName, // npm package name
61
+ * string pluginVersion, // semver
62
+ * bytes32 pluginSha256, // digestDirectory output for the packed tarball
63
+ * string[] supports, // SolverType ids (e.g. ["swe-rebench-v2.v1"])
64
+ * uint64 publishedAt // unix seconds
65
+ * )
66
+ *
67
+ * The textual `pluginCid` in the metadataKey is the IPFS CID of the packed
68
+ * tarball; it is the canonical primary key for the record. Builders publish
69
+ * a new CID per version (`plugin:<newCid>`).
70
+ */
71
+ export const PLUGIN_PAYLOAD_TUPLE = [
72
+ { name: 'version', type: 'uint8' },
73
+ { name: 'pluginName', type: 'string' },
74
+ { name: 'pluginVersion', type: 'string' },
75
+ { name: 'pluginSha256', type: 'bytes32' },
76
+ { name: 'supports', type: 'string[]' },
77
+ { name: 'publishedAt', type: 'uint64' },
78
+ ];
79
+ /**
80
+ * Plug-in revocation payload tuple (1pbc).
81
+ *
82
+ * Builders overwrite `plugin:<pluginCid>` with a `version=2` revoked-marker
83
+ * payload. The indexer treats the most-recent metadata value as authoritative
84
+ * (per spec §5.2 "Revocation"). The key stays the same so the primary-key
85
+ * stability across overwrites is preserved.
86
+ *
87
+ * abi.encode(
88
+ * uint8 version, // = 2
89
+ * bool revoked, // = true
90
+ * string reason
91
+ * )
92
+ */
93
+ export const REVOCATION_PAYLOAD_TUPLE = [
94
+ { name: 'version', type: 'uint8' },
95
+ { name: 'revoked', type: 'bool' },
96
+ { name: 'reason', type: 'string' },
97
+ ];
50
98
  /** ERC-8004 IdentityRegistry — only the function the publisher calls. */
51
99
  export const IDENTITY_REGISTRY_SET_METADATA_ABI = [
52
100
  {
@@ -1 +1 @@
1
- {"version":3,"file":"abis.js","sourceRoot":"","sources":["../../src/erc8004/abis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,iFAAiF;AAEjF,kFAAkF;AAClF,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE;IAClC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE;IAC/B,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE;IACzC,EAAE,IAAI,EAAE,qBAAqB,EAAE,IAAI,EAAE,OAAO,EAAE;IAC9C,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,SAAS,EAAE;CACtC,CAAC;AAEX;;;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,KAAK,EAAE;YACzD,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;SAChD;KACF;CACO,CAAC"}
@@ -0,0 +1,102 @@
1
+ /**
2
+ * ERC-8004 plug-in registry surface (jinn-mono-1pbc).
3
+ *
4
+ * Plug-in records are anchored on the existing `IdentityRegistry.setMetadata`
5
+ * write surface — there is NO new contract. The builder's agentId is the
6
+ * subject; the metadataKey is `plugin:<pluginCid>`; the value is ABI-encoded
7
+ * per the `PLUGIN_PAYLOAD_TUPLE` (or, for revocations, the
8
+ * `REVOCATION_PAYLOAD_TUPLE`) declared in `./abis.js`.
9
+ *
10
+ * This is a BUILDER action, not an operator action: it accrues against the
11
+ * fleet's Stage 1 identity Safe (`fleet_safe_address`), and never touches
12
+ * Stage 2 (OLAS service / staking) state. The CLI verb that wraps this
13
+ * publisher (`jinn solver-plugins publish`) lazily runs
14
+ * `FleetBootstrapper.ensureStage1(password)` before any chain write so a
15
+ * builder can complete the full publish flow without ever standing up a
16
+ * Stage 2 service.
17
+ *
18
+ * See `docs/superpowers/specs/2026-05-13-plug-in-builder-entry-point-design.md`
19
+ * §5.2 ("Plug-in registry = a new `kind=plugin` on `IdentityRegistry.setMetadata`")
20
+ * and §6.3 ("Plug-in publication: `jinn solver-plugins publish`").
21
+ */
22
+ import { type Address, type Hex, type PublicClient, type WalletClient } from 'viem';
23
+ /** Plug-in publication payload (spec §5.2). */
24
+ export interface PluginPayload {
25
+ /** Schema version (= 1 for this kind). */
26
+ version: 1;
27
+ /** npm package name, e.g. "@builder/swe-skill". Non-empty. */
28
+ pluginName: string;
29
+ /** Semver, e.g. "0.1.0". Non-empty. */
30
+ pluginVersion: string;
31
+ /** 32-byte hex digest of the packed tarball (`digestDirectory` output). */
32
+ pluginSha256: Hex;
33
+ /** SolverType ids — must include at least one (e.g. "swe-rebench-v2.v1"). */
34
+ supports: string[];
35
+ /** Unix seconds. Must fit in uint64. */
36
+ publishedAt: number;
37
+ }
38
+ /** Plug-in revocation payload (spec §5.2 "Revocation"). */
39
+ export interface RevocationPayload {
40
+ /** Schema version (= 2 for the revocation marker). */
41
+ version: 2;
42
+ /** Always `true` — a revocation cannot un-revoke; publish a new CID instead. */
43
+ revoked: true;
44
+ /** Non-empty human-readable reason (e.g. "security advisory CVE-2026-…"). */
45
+ reason: string;
46
+ }
47
+ export declare class PluginPayloadValidationError extends Error {
48
+ constructor(reason: string);
49
+ }
50
+ export declare function validatePluginPayload(payload: PluginPayload): PluginPayload;
51
+ export declare function validateRevocationPayload(payload: RevocationPayload): RevocationPayload;
52
+ export declare function encodePluginPayload(payload: PluginPayload): Hex;
53
+ export declare function encodeRevocationPayload(payload: RevocationPayload): Hex;
54
+ /**
55
+ * Canonical prefix for plug-in metadata keys on the IdentityRegistry.
56
+ * Duplicated as `PLUGIN_KEY_PREFIX` in packages/indexer/src/types.ts
57
+ * (cross-package imports are not wired in this codebase).
58
+ */
59
+ export declare const PLUGIN_METADATA_KEY_PREFIX = "plugin:";
60
+ /** Build `plugin:<cid>` per spec §5.2. Never strips, never normalises. */
61
+ export declare function buildPluginMetadataKey(pluginCid: string): string;
62
+ export interface PluginRegistryPublisherConfig {
63
+ identityRegistryAddress: Address;
64
+ /** Builder's ERC-8004 agentId (= `fleet_agent_id` from FleetState). */
65
+ builderAgentId: bigint;
66
+ /** Stage 1 fleet identity Safe (= `fleet_safe_address`). Required. */
67
+ safeAddress: Address;
68
+ publicClient: PublicClient;
69
+ walletClient: WalletClient;
70
+ }
71
+ export interface PublishPluginArgs {
72
+ pluginCid: string;
73
+ payload: PluginPayload;
74
+ }
75
+ export interface RevokePluginArgs {
76
+ pluginCid: string;
77
+ payload: RevocationPayload;
78
+ }
79
+ /**
80
+ * High-level publisher for plug-in records.
81
+ *
82
+ * Routes writes through the operator's Stage 1 identity Safe via
83
+ * `executeSafeTransaction`, mirroring `ReputationRegistryClient.sendWrite`'s
84
+ * Safe-routed path. We require `safeAddress` (no direct-EOA escape hatch) —
85
+ * the on-chain `msg.sender` must be the operator's canonical Stage 1 Safe
86
+ * for the metadata write to bind to the right agentId owner.
87
+ */
88
+ export declare class PluginRegistryPublisher {
89
+ private readonly identityRegistryAddress;
90
+ private readonly builderAgentId;
91
+ private readonly safeAddress;
92
+ private readonly publicClient;
93
+ private readonly walletClient;
94
+ constructor(config: PluginRegistryPublisherConfig);
95
+ get agentId(): bigint;
96
+ get safe(): Address;
97
+ /** Publish a `plugin:<cid>` record. Returns the tx hash. */
98
+ publish(args: PublishPluginArgs): Promise<Hex>;
99
+ /** Overwrite a `plugin:<cid>` record with a revoked-marker payload. */
100
+ revoke(args: RevokePluginArgs): Promise<Hex>;
101
+ private _setMetadata;
102
+ }
@@ -0,0 +1,165 @@
1
+ /**
2
+ * ERC-8004 plug-in registry surface (jinn-mono-1pbc).
3
+ *
4
+ * Plug-in records are anchored on the existing `IdentityRegistry.setMetadata`
5
+ * write surface — there is NO new contract. The builder's agentId is the
6
+ * subject; the metadataKey is `plugin:<pluginCid>`; the value is ABI-encoded
7
+ * per the `PLUGIN_PAYLOAD_TUPLE` (or, for revocations, the
8
+ * `REVOCATION_PAYLOAD_TUPLE`) declared in `./abis.js`.
9
+ *
10
+ * This is a BUILDER action, not an operator action: it accrues against the
11
+ * fleet's Stage 1 identity Safe (`fleet_safe_address`), and never touches
12
+ * Stage 2 (OLAS service / staking) state. The CLI verb that wraps this
13
+ * publisher (`jinn solver-plugins publish`) lazily runs
14
+ * `FleetBootstrapper.ensureStage1(password)` before any chain write so a
15
+ * builder can complete the full publish flow without ever standing up a
16
+ * Stage 2 service.
17
+ *
18
+ * See `docs/superpowers/specs/2026-05-13-plug-in-builder-entry-point-design.md`
19
+ * §5.2 ("Plug-in registry = a new `kind=plugin` on `IdentityRegistry.setMetadata`")
20
+ * and §6.3 ("Plug-in publication: `jinn solver-plugins publish`").
21
+ */
22
+ import { encodeAbiParameters, encodeFunctionData, } from 'viem';
23
+ import { executeSafeTransaction } from '../adapters/mech/safe.js';
24
+ import { waitForTransactionReceiptWithRetry } from '../tx-retry.js';
25
+ import { IDENTITY_REGISTRY_SET_METADATA_ABI, PLUGIN_PAYLOAD_TUPLE, REVOCATION_PAYLOAD_TUPLE, } from './abis.js';
26
+ export class PluginPayloadValidationError extends Error {
27
+ constructor(reason) {
28
+ super(`plugin payload validation failed: ${reason}`);
29
+ this.name = 'PluginPayloadValidationError';
30
+ }
31
+ }
32
+ // ── Validators ───────────────────────────────────────────────────────────────
33
+ const MAX_UINT64 = 0xffffffffffffffffn;
34
+ export function validatePluginPayload(payload) {
35
+ if (payload.version !== 1) {
36
+ throw new PluginPayloadValidationError(`version must be 1, got ${payload.version}`);
37
+ }
38
+ if (typeof payload.pluginName !== 'string' || payload.pluginName.length === 0) {
39
+ throw new PluginPayloadValidationError('pluginName must be a non-empty string');
40
+ }
41
+ if (typeof payload.pluginVersion !== 'string' || payload.pluginVersion.length === 0) {
42
+ throw new PluginPayloadValidationError('pluginVersion must be a non-empty string');
43
+ }
44
+ if (!/^0x[0-9a-fA-F]{64}$/.test(payload.pluginSha256)) {
45
+ throw new PluginPayloadValidationError(`pluginSha256 must be 32-byte hex (0x + 64 hex chars)`);
46
+ }
47
+ if (!Array.isArray(payload.supports) || payload.supports.length === 0) {
48
+ throw new PluginPayloadValidationError('supports must be a non-empty string[]');
49
+ }
50
+ for (const s of payload.supports) {
51
+ if (typeof s !== 'string' || s.length === 0) {
52
+ throw new PluginPayloadValidationError('supports entries must be non-empty strings');
53
+ }
54
+ }
55
+ if (!Number.isInteger(payload.publishedAt) || payload.publishedAt < 0) {
56
+ throw new PluginPayloadValidationError(`publishedAt must be a non-negative integer; got ${payload.publishedAt}`);
57
+ }
58
+ if (BigInt(payload.publishedAt) > MAX_UINT64) {
59
+ throw new PluginPayloadValidationError(`publishedAt exceeds uint64 range; got ${payload.publishedAt}`);
60
+ }
61
+ return payload;
62
+ }
63
+ export function validateRevocationPayload(payload) {
64
+ if (payload.version !== 2) {
65
+ throw new PluginPayloadValidationError(`revocation version must be 2, got ${payload.version}`);
66
+ }
67
+ if (payload.revoked !== true) {
68
+ throw new PluginPayloadValidationError('revocation payloads must set revoked=true');
69
+ }
70
+ if (typeof payload.reason !== 'string' || payload.reason.length === 0) {
71
+ throw new PluginPayloadValidationError('revocation reason must be a non-empty string');
72
+ }
73
+ return payload;
74
+ }
75
+ // ── Encoders ─────────────────────────────────────────────────────────────────
76
+ export function encodePluginPayload(payload) {
77
+ validatePluginPayload(payload);
78
+ return encodeAbiParameters(PLUGIN_PAYLOAD_TUPLE, [
79
+ payload.version,
80
+ payload.pluginName,
81
+ payload.pluginVersion,
82
+ payload.pluginSha256,
83
+ payload.supports,
84
+ BigInt(payload.publishedAt),
85
+ ]);
86
+ }
87
+ export function encodeRevocationPayload(payload) {
88
+ validateRevocationPayload(payload);
89
+ return encodeAbiParameters(REVOCATION_PAYLOAD_TUPLE, [
90
+ payload.version,
91
+ payload.revoked,
92
+ payload.reason,
93
+ ]);
94
+ }
95
+ // ── Metadata key ─────────────────────────────────────────────────────────────
96
+ /**
97
+ * Canonical prefix for plug-in metadata keys on the IdentityRegistry.
98
+ * Duplicated as `PLUGIN_KEY_PREFIX` in packages/indexer/src/types.ts
99
+ * (cross-package imports are not wired in this codebase).
100
+ */
101
+ export const PLUGIN_METADATA_KEY_PREFIX = 'plugin:';
102
+ /** Build `plugin:<cid>` per spec §5.2. Never strips, never normalises. */
103
+ export function buildPluginMetadataKey(pluginCid) {
104
+ if (typeof pluginCid !== 'string' || pluginCid.length === 0) {
105
+ throw new PluginPayloadValidationError('pluginCid must be a non-empty string');
106
+ }
107
+ return `${PLUGIN_METADATA_KEY_PREFIX}${pluginCid}`;
108
+ }
109
+ /**
110
+ * High-level publisher for plug-in records.
111
+ *
112
+ * Routes writes through the operator's Stage 1 identity Safe via
113
+ * `executeSafeTransaction`, mirroring `ReputationRegistryClient.sendWrite`'s
114
+ * Safe-routed path. We require `safeAddress` (no direct-EOA escape hatch) —
115
+ * the on-chain `msg.sender` must be the operator's canonical Stage 1 Safe
116
+ * for the metadata write to bind to the right agentId owner.
117
+ */
118
+ export class PluginRegistryPublisher {
119
+ identityRegistryAddress;
120
+ builderAgentId;
121
+ safeAddress;
122
+ publicClient;
123
+ walletClient;
124
+ constructor(config) {
125
+ this.identityRegistryAddress = config.identityRegistryAddress;
126
+ this.builderAgentId = config.builderAgentId;
127
+ this.safeAddress = config.safeAddress;
128
+ this.publicClient = config.publicClient;
129
+ this.walletClient = config.walletClient;
130
+ }
131
+ get agentId() {
132
+ return this.builderAgentId;
133
+ }
134
+ get safe() {
135
+ return this.safeAddress;
136
+ }
137
+ /** Publish a `plugin:<cid>` record. Returns the tx hash. */
138
+ async publish(args) {
139
+ const metadataKey = buildPluginMetadataKey(args.pluginCid);
140
+ const metadataValue = encodePluginPayload(args.payload);
141
+ return this._setMetadata(metadataKey, metadataValue);
142
+ }
143
+ /** Overwrite a `plugin:<cid>` record with a revoked-marker payload. */
144
+ async revoke(args) {
145
+ const metadataKey = buildPluginMetadataKey(args.pluginCid);
146
+ const metadataValue = encodeRevocationPayload(args.payload);
147
+ return this._setMetadata(metadataKey, metadataValue);
148
+ }
149
+ async _setMetadata(metadataKey, metadataValue) {
150
+ const calldata = encodeFunctionData({
151
+ abi: IDENTITY_REGISTRY_SET_METADATA_ABI,
152
+ functionName: 'setMetadata',
153
+ args: [this.builderAgentId, metadataKey, metadataValue],
154
+ });
155
+ const txHash = await executeSafeTransaction(this.publicClient, this.walletClient, {
156
+ safeAddress: this.safeAddress,
157
+ to: this.identityRegistryAddress,
158
+ value: 0n,
159
+ data: calldata,
160
+ });
161
+ await waitForTransactionReceiptWithRetry(this.publicClient, txHash);
162
+ return txHash;
163
+ }
164
+ }
165
+ //# sourceMappingURL=plugin-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-registry.js","sourceRoot":"","sources":["../../src/erc8004/plugin-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;G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AI,EAAE,QAAQ;SACf,CAAC,CAAC;QAEH,MAAM,kCAAkC,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;QACpE,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
@@ -21,7 +21,7 @@ export declare const StructuredEventSchema: z.ZodObject<{
21
21
  }, "strip", z.ZodTypeAny, {
22
22
  message: string;
23
23
  id: string;
24
- kind: "reward" | "error" | "log" | "fleet" | "intent" | "system";
24
+ kind: "reward" | "error" | "system" | "log" | "fleet" | "intent";
25
25
  schemaVersion: 1;
26
26
  ts: string;
27
27
  details?: Record<string, unknown> | undefined;
@@ -31,7 +31,7 @@ export declare const StructuredEventSchema: z.ZodObject<{
31
31
  }, {
32
32
  message: string;
33
33
  id: string;
34
- kind: "reward" | "error" | "log" | "fleet" | "intent" | "system";
34
+ kind: "reward" | "error" | "system" | "log" | "fleet" | "intent";
35
35
  schemaVersion: 1;
36
36
  ts: string;
37
37
  details?: Record<string, unknown> | undefined;