@jinn-network/client 0.1.5 โ†’ 0.1.6-canary.0b4ff7f9

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 (326) 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 +2 -0
  11. package/dist/api/bootstrap-endpoint.js.map +1 -1
  12. package/dist/api/discovery-endpoint.d.ts +18 -0
  13. package/dist/api/discovery-endpoint.js +65 -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/harness-readiness-endpoint.d.ts +13 -0
  19. package/dist/api/harness-readiness-endpoint.js +15 -0
  20. package/dist/api/harness-readiness-endpoint.js.map +1 -0
  21. package/dist/api/hermes-doctor-endpoint.d.ts +26 -0
  22. package/dist/api/hermes-doctor-endpoint.js +29 -0
  23. package/dist/api/hermes-doctor-endpoint.js.map +1 -0
  24. package/dist/api/server.d.ts +21 -0
  25. package/dist/api/server.js +22 -0
  26. package/dist/api/server.js.map +1 -1
  27. package/dist/build-info.json +4 -4
  28. package/dist/build-meta.json +1 -1
  29. package/dist/cli/commands/create.d.ts +5 -3
  30. package/dist/cli/commands/create.js +101 -36
  31. package/dist/cli/commands/create.js.map +1 -1
  32. package/dist/cli/commands/solver-nets.d.ts +19 -0
  33. package/dist/cli/commands/solver-nets.js +140 -2
  34. package/dist/cli/commands/solver-nets.js.map +1 -1
  35. package/dist/cli/commands/solver-plugins-publish.d.ts +31 -0
  36. package/dist/cli/commands/solver-plugins-publish.js +169 -0
  37. package/dist/cli/commands/solver-plugins-publish.js.map +1 -0
  38. package/dist/cli/commands/solver-plugins-revoke.d.ts +15 -0
  39. package/dist/cli/commands/solver-plugins-revoke.js +91 -0
  40. package/dist/cli/commands/solver-plugins-revoke.js.map +1 -0
  41. package/dist/cli/commands/solver-plugins.d.ts +50 -6
  42. package/dist/cli/commands/solver-plugins.js +205 -68
  43. package/dist/cli/commands/solver-plugins.js.map +1 -1
  44. package/dist/config.d.ts +27 -0
  45. package/dist/config.js +24 -0
  46. package/dist/config.js.map +1 -1
  47. package/dist/conformance/checks/hash-signature.js +6 -2
  48. package/dist/conformance/checks/hash-signature.js.map +1 -1
  49. package/dist/conformance/checks/payload.js +4 -2
  50. package/dist/conformance/checks/payload.js.map +1 -1
  51. package/dist/conformance/checks/verdict.d.ts +10 -10
  52. package/dist/conformance/checks/verdict.js +16 -15
  53. package/dist/conformance/checks/verdict.js.map +1 -1
  54. package/dist/conformance/harness.d.ts +1 -1
  55. package/dist/conformance/harness.js +16 -9
  56. package/dist/conformance/harness.js.map +1 -1
  57. package/dist/conformance/types.d.ts +10 -3
  58. package/dist/conformance/types.js.map +1 -1
  59. package/dist/corpus/acquire.d.ts +1 -3
  60. package/dist/corpus/acquire.js.map +1 -1
  61. package/dist/corpus/envelope-projection.d.ts +1 -1
  62. package/dist/corpus/envelope-projection.js +14 -7
  63. package/dist/corpus/envelope-projection.js.map +1 -1
  64. package/dist/corpus/index.d.ts +2 -1
  65. package/dist/corpus/index.js.map +1 -1
  66. package/dist/corpus/prediction-brier-scoreboard-report.js +1 -1
  67. package/dist/corpus/prediction-brier-scoreboard-report.js.map +1 -1
  68. package/dist/corpus/prediction-brier-scoreboard.js +3 -1
  69. package/dist/corpus/prediction-brier-scoreboard.js.map +1 -1
  70. package/dist/corpus/types.d.ts +2 -2
  71. package/dist/daemon/daemon.d.ts +17 -1
  72. package/dist/daemon/daemon.js +15 -0
  73. package/dist/daemon/daemon.js.map +1 -1
  74. package/dist/daemon/freeze-fence.js +6 -3
  75. package/dist/daemon/freeze-fence.js.map +1 -1
  76. package/dist/daemon/readiness-gate.d.ts +30 -0
  77. package/dist/daemon/readiness-gate.js +31 -0
  78. package/dist/daemon/readiness-gate.js.map +1 -0
  79. package/dist/dashboard/assets/{index-D_NMfDfV.css โ†’ index-B4sTrvQD.css} +1 -1
  80. package/dist/dashboard/assets/index-C5j0ZJWS.js +140 -0
  81. package/dist/dashboard/index.html +2 -2
  82. package/dist/discovery/http.js +121 -0
  83. package/dist/discovery/http.js.map +1 -1
  84. package/dist/discovery/onchain.js +11 -0
  85. package/dist/discovery/onchain.js.map +1 -1
  86. package/dist/discovery/types.d.ts +112 -0
  87. package/dist/discovery/types.js.map +1 -1
  88. package/dist/discovery/with-fallback.js +9 -0
  89. package/dist/discovery/with-fallback.js.map +1 -1
  90. package/dist/earning/agent-wallet-binding.d.ts +20 -1
  91. package/dist/earning/agent-wallet-binding.js +54 -16
  92. package/dist/earning/agent-wallet-binding.js.map +1 -1
  93. package/dist/earning/bootstrap.d.ts +55 -0
  94. package/dist/earning/bootstrap.js +376 -20
  95. package/dist/earning/bootstrap.js.map +1 -1
  96. package/dist/earning/store.js +48 -1
  97. package/dist/earning/store.js.map +1 -1
  98. package/dist/earning/types.d.ts +30 -0
  99. package/dist/earning/types.js +37 -0
  100. package/dist/earning/types.js.map +1 -1
  101. package/dist/erc8004/abis.d.ts +64 -0
  102. package/dist/erc8004/abis.js +48 -0
  103. package/dist/erc8004/abis.js.map +1 -1
  104. package/dist/erc8004/plugin-registry.d.ts +102 -0
  105. package/dist/erc8004/plugin-registry.js +165 -0
  106. package/dist/erc8004/plugin-registry.js.map +1 -0
  107. package/dist/harnesses/engine/engine.js +15 -3
  108. package/dist/harnesses/engine/engine.js.map +1 -1
  109. package/dist/harnesses/engine/envelope-assembly.d.ts +2 -2
  110. package/dist/harnesses/engine/envelope-assembly.js +4 -2
  111. package/dist/harnesses/engine/envelope-assembly.js.map +1 -1
  112. package/dist/harnesses/freeze.d.ts +4 -1
  113. package/dist/harnesses/freeze.js +12 -2
  114. package/dist/harnesses/freeze.js.map +1 -1
  115. package/dist/harnesses/impls/claude-mcp-prediction/index.d.ts +4 -1
  116. package/dist/harnesses/impls/claude-mcp-prediction/index.js +7 -2
  117. package/dist/harnesses/impls/claude-mcp-prediction/index.js.map +1 -1
  118. package/dist/harnesses/impls/claude-mcp-prediction-apy/index.d.ts +4 -1
  119. package/dist/harnesses/impls/claude-mcp-prediction-apy/index.js +7 -2
  120. package/dist/harnesses/impls/claude-mcp-prediction-apy/index.js.map +1 -1
  121. package/dist/harnesses/impls/evaluation-context.d.ts +15 -4
  122. package/dist/harnesses/impls/evaluation-context.js +24 -8
  123. package/dist/harnesses/impls/evaluation-context.js.map +1 -1
  124. package/dist/harnesses/impls/hermes-agent/adapter.d.ts +34 -0
  125. package/dist/harnesses/impls/hermes-agent/adapter.js +184 -0
  126. package/dist/harnesses/impls/hermes-agent/adapter.js.map +1 -0
  127. package/dist/harnesses/impls/hermes-agent/bootstrap.d.ts +18 -0
  128. package/dist/harnesses/impls/hermes-agent/bootstrap.js +231 -0
  129. package/dist/harnesses/impls/hermes-agent/bootstrap.js.map +1 -0
  130. package/dist/harnesses/impls/hermes-agent/config-builder.d.ts +49 -0
  131. package/dist/harnesses/impls/hermes-agent/config-builder.js +104 -0
  132. package/dist/harnesses/impls/hermes-agent/config-builder.js.map +1 -0
  133. package/dist/harnesses/impls/hermes-agent/harness.d.ts +30 -0
  134. package/dist/harnesses/impls/hermes-agent/harness.js +52 -0
  135. package/dist/harnesses/impls/hermes-agent/harness.js.map +1 -0
  136. package/dist/harnesses/impls/hermes-agent/index.d.ts +5 -0
  137. package/dist/harnesses/impls/hermes-agent/index.js +7 -0
  138. package/dist/harnesses/impls/hermes-agent/index.js.map +1 -0
  139. package/dist/harnesses/impls/hermes-agent/prompt.d.ts +15 -0
  140. package/dist/harnesses/impls/hermes-agent/prompt.js +37 -0
  141. package/dist/harnesses/impls/hermes-agent/prompt.js.map +1 -0
  142. package/dist/harnesses/impls/index.d.ts +6 -0
  143. package/dist/harnesses/impls/index.js +17 -4
  144. package/dist/harnesses/impls/index.js.map +1 -1
  145. package/dist/harnesses/impls/learner/adapters/claude-code.js.map +1 -0
  146. package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/adapters/codex-code.js +13 -34
  147. package/dist/harnesses/impls/learner/adapters/codex-code.js.map +1 -0
  148. package/dist/harnesses/impls/learner/adapters/codex-workspace.js.map +1 -0
  149. package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/harness.d.ts +9 -3
  150. package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/harness.js +24 -1
  151. package/dist/harnesses/impls/learner/harness.js.map +1 -0
  152. package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/harvest.js +15 -3
  153. package/dist/harnesses/impls/learner/harvest.js.map +1 -0
  154. package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/index.d.ts +5 -5
  155. package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/index.js +4 -4
  156. package/dist/harnesses/impls/learner/index.js.map +1 -0
  157. package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/plugin-path.d.ts +4 -4
  158. package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/plugin-path.js +7 -7
  159. package/dist/harnesses/impls/learner/plugin-path.js.map +1 -0
  160. package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/restoration-patch.js +3 -1
  161. package/dist/harnesses/impls/learner/restoration-patch.js.map +1 -0
  162. package/dist/harnesses/impls/learner/test-utils/fake-plugin-outputs.js.map +1 -0
  163. package/dist/harnesses/impls/learner/test-utils/noop-adapter.js.map +1 -0
  164. package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/types.d.ts +12 -2
  165. package/dist/harnesses/impls/learner/types.js.map +1 -0
  166. package/dist/harnesses/impls/portfolio-v0-evaluator/index.js +13 -12
  167. package/dist/harnesses/impls/portfolio-v0-evaluator/index.js.map +1 -1
  168. package/dist/harnesses/impls/prediction-apy-v0-evaluator/index.js +7 -7
  169. package/dist/harnesses/impls/prediction-apy-v0-evaluator/index.js.map +1 -1
  170. package/dist/harnesses/impls/prediction-apy-v0-evaluator/parse-submission.d.ts +3 -3
  171. package/dist/harnesses/impls/prediction-apy-v0-evaluator/parse-submission.js +7 -6
  172. package/dist/harnesses/impls/prediction-apy-v0-evaluator/parse-submission.js.map +1 -1
  173. package/dist/harnesses/impls/prediction-v0-evaluator/checks/integrity.js +1 -1
  174. package/dist/harnesses/impls/prediction-v0-evaluator/checks/integrity.js.map +1 -1
  175. package/dist/harnesses/impls/prediction-v0-evaluator/index.js +11 -10
  176. package/dist/harnesses/impls/prediction-v0-evaluator/index.js.map +1 -1
  177. package/dist/harnesses/impls/prediction-v1-evaluator/index.js +11 -10
  178. package/dist/harnesses/impls/prediction-v1-evaluator/index.js.map +1 -1
  179. package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.d.ts +1 -0
  180. package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.js +10 -2
  181. package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.js.map +1 -1
  182. package/dist/harnesses/impls/swe-rebench-v2-evaluator/harness.d.ts +24 -5
  183. package/dist/harnesses/impls/swe-rebench-v2-evaluator/harness.js +104 -4
  184. package/dist/harnesses/impls/swe-rebench-v2-evaluator/harness.js.map +1 -1
  185. package/dist/harnesses/impls/swe-rebench-v2-evaluator/hf-fetcher.d.ts +9 -0
  186. package/dist/harnesses/impls/swe-rebench-v2-evaluator/hf-fetcher.js +25 -1
  187. package/dist/harnesses/impls/swe-rebench-v2-evaluator/hf-fetcher.js.map +1 -1
  188. package/dist/harnesses/names.d.ts +1 -0
  189. package/dist/harnesses/names.js +3 -0
  190. package/dist/harnesses/names.js.map +1 -1
  191. package/dist/harnesses/readiness-registry.d.ts +48 -0
  192. package/dist/harnesses/readiness-registry.js +136 -0
  193. package/dist/harnesses/readiness-registry.js.map +1 -0
  194. package/dist/harnesses/types.d.ts +7 -0
  195. package/dist/main.d.ts +14 -0
  196. package/dist/main.js +70 -35
  197. package/dist/main.js.map +1 -1
  198. package/dist/mcp/server.js +14 -13
  199. package/dist/mcp/server.js.map +1 -1
  200. package/dist/preflight/claude-auth.d.ts +18 -0
  201. package/dist/preflight/claude-auth.js +38 -0
  202. package/dist/preflight/claude-auth.js.map +1 -1
  203. package/dist/scripts/donation-consumption-acceptance.js +1 -1
  204. package/dist/scripts/donation-consumption-acceptance.js.map +1 -1
  205. package/dist/scripts/swe-rebench-v2-known-bad.json +12 -0
  206. package/dist/scripts/swe-rebench-v2-seed-pool.json +26 -0
  207. package/dist/solver-types/_swe-rebench-v2-substrate.d.ts +52 -0
  208. package/dist/solver-types/_swe-rebench-v2-substrate.js +76 -0
  209. package/dist/solver-types/_swe-rebench-v2-substrate.js.map +1 -0
  210. package/dist/solver-types/_swe-rebench-v2-validated-pool.d.ts +38 -12
  211. package/dist/solver-types/_swe-rebench-v2-validated-pool.js +136 -27
  212. package/dist/solver-types/_swe-rebench-v2-validated-pool.js.map +1 -1
  213. package/dist/solver-types/swe-rebench-v2-auto.d.ts +6 -0
  214. package/dist/solver-types/swe-rebench-v2-auto.js.map +1 -1
  215. package/dist/solver-types/swe-rebench-v2.d.ts +1 -0
  216. package/dist/solver-types/swe-rebench-v2.js +19 -6
  217. package/dist/solver-types/swe-rebench-v2.js.map +1 -1
  218. package/dist/store/store.js +12 -4
  219. package/dist/store/store.js.map +1 -1
  220. package/dist/templates/plugins/runtime-plugin/.mcp.json.tmpl +8 -0
  221. package/dist/templates/plugins/runtime-plugin/README.md.tmpl +30 -0
  222. package/dist/templates/plugins/runtime-plugin/gitignore.tmpl +3 -0
  223. package/dist/templates/plugins/runtime-plugin/jinn.plugin.json.tmpl +21 -0
  224. package/dist/templates/plugins/runtime-plugin/mcp/server.mjs.tmpl +33 -0
  225. package/dist/templates/plugins/runtime-plugin/package.json.tmpl +15 -0
  226. package/dist/templates/plugins/runtime-plugin/test/plugin.test.ts.tmpl +35 -0
  227. package/dist/templates/plugins/runtime-plugin/tsconfig.json.tmpl +11 -0
  228. package/dist/templates/plugins/solver-type-plugin/README.md.tmpl +35 -0
  229. package/dist/templates/plugins/solver-type-plugin/gitignore.tmpl +3 -0
  230. package/dist/templates/plugins/solver-type-plugin/jinn.plugin.json.tmpl +11 -0
  231. package/dist/templates/plugins/solver-type-plugin/package.json.tmpl +15 -0
  232. package/dist/templates/plugins/solver-type-plugin/skills/example/SKILL.md.tmpl +10 -0
  233. package/dist/templates/plugins/solver-type-plugin/test/plugin.test.ts.tmpl +25 -0
  234. package/dist/templates/plugins/solver-type-plugin/tsconfig.json.tmpl +11 -0
  235. package/dist/types/envelope.d.ts +28 -21
  236. package/dist/types/envelope.js +8 -3
  237. package/dist/types/envelope.js.map +1 -1
  238. package/dist/types/payloads/index.d.ts +2 -2
  239. package/dist/types/payloads/index.js +13 -12
  240. package/dist/types/payloads/index.js.map +1 -1
  241. package/dist/types/payloads/portfolio-v0.d.ts +60 -10
  242. package/dist/types/payloads/portfolio-v0.js +16 -6
  243. package/dist/types/payloads/portfolio-v0.js.map +1 -1
  244. package/dist/types/payloads/prediction-apy-v0.d.ts +52 -10
  245. package/dist/types/payloads/prediction-apy-v0.js +16 -6
  246. package/dist/types/payloads/prediction-apy-v0.js.map +1 -1
  247. package/dist/types/payloads/prediction-v0.d.ts +49 -10
  248. package/dist/types/payloads/prediction-v0.js +16 -6
  249. package/dist/types/payloads/prediction-v0.js.map +1 -1
  250. package/dist/vendor/@jinn-network/sdk/dist/payloads/prediction-v1.d.ts +45 -6
  251. package/dist/vendor/@jinn-network/sdk/dist/payloads/prediction-v1.js +16 -6
  252. package/dist/x402/handler.js +51 -20
  253. package/dist/x402/handler.js.map +1 -1
  254. package/package.json +8 -3
  255. package/plugins/swe-rebench-v2-diffmin/.claude-plugin/plugin.json +5 -0
  256. package/plugins/swe-rebench-v2-diffmin/.mcp.json +8 -0
  257. package/plugins/swe-rebench-v2-diffmin/README.md +69 -0
  258. package/plugins/swe-rebench-v2-diffmin/jinn.plugin.json +12 -0
  259. package/plugins/swe-rebench-v2-diffmin/mcp/diff-stats-server.mjs +72 -0
  260. package/plugins/swe-rebench-v2-diffmin/mcp/diff-stats.mjs +48 -0
  261. package/plugins/swe-rebench-v2-diffmin/package.json +19 -0
  262. package/plugins/swe-rebench-v2-diffmin/skills/diffmin/SKILL.md +116 -0
  263. package/plugins/swe-rebench-v2-diffmin/skills/test-map/SKILL.md +126 -0
  264. package/plugins/swe-rebench-v2-diffmin/test/diff-stats.test.ts +62 -0
  265. package/plugins/swe-rebench-v2-diffmin/test/manifest.test.ts +53 -0
  266. package/plugins/swe-rebench-v2-diffmin/tsconfig.json +12 -0
  267. package/plugins/swe-rebench-v2-runtime/README.md +13 -0
  268. package/plugins/swe-rebench-v2-runtime/skills/orient/SKILL.md +7 -3
  269. package/plugins/swe-rebench-v2-runtime/skills/plan/SKILL.md +6 -17
  270. package/templates/plugins/runtime-plugin/.mcp.json.tmpl +8 -0
  271. package/templates/plugins/runtime-plugin/README.md.tmpl +30 -0
  272. package/templates/plugins/runtime-plugin/gitignore.tmpl +3 -0
  273. package/templates/plugins/runtime-plugin/jinn.plugin.json.tmpl +21 -0
  274. package/templates/plugins/runtime-plugin/mcp/server.mjs.tmpl +33 -0
  275. package/templates/plugins/runtime-plugin/package.json.tmpl +15 -0
  276. package/templates/plugins/runtime-plugin/test/plugin.test.ts.tmpl +35 -0
  277. package/templates/plugins/runtime-plugin/tsconfig.json.tmpl +11 -0
  278. package/templates/plugins/solver-type-plugin/README.md.tmpl +35 -0
  279. package/templates/plugins/solver-type-plugin/gitignore.tmpl +3 -0
  280. package/templates/plugins/solver-type-plugin/jinn.plugin.json.tmpl +11 -0
  281. package/templates/plugins/solver-type-plugin/package.json.tmpl +15 -0
  282. package/templates/plugins/solver-type-plugin/skills/example/SKILL.md.tmpl +10 -0
  283. package/templates/plugins/solver-type-plugin/test/plugin.test.ts.tmpl +25 -0
  284. package/templates/plugins/solver-type-plugin/tsconfig.json.tmpl +11 -0
  285. package/dist/dashboard/assets/index-BjtltOGc.js +0 -76
  286. package/dist/harnesses/impls/claude-code-learner/adapters/claude-code.js.map +0 -1
  287. package/dist/harnesses/impls/claude-code-learner/adapters/codex-code.js.map +0 -1
  288. package/dist/harnesses/impls/claude-code-learner/adapters/codex-workspace.js.map +0 -1
  289. package/dist/harnesses/impls/claude-code-learner/harness.js.map +0 -1
  290. package/dist/harnesses/impls/claude-code-learner/harvest.js.map +0 -1
  291. package/dist/harnesses/impls/claude-code-learner/index.js.map +0 -1
  292. package/dist/harnesses/impls/claude-code-learner/plugin-path.js.map +0 -1
  293. package/dist/harnesses/impls/claude-code-learner/restoration-patch.js.map +0 -1
  294. package/dist/harnesses/impls/claude-code-learner/test-utils/fake-plugin-outputs.js.map +0 -1
  295. package/dist/harnesses/impls/claude-code-learner/test-utils/noop-adapter.js.map +0 -1
  296. package/dist/harnesses/impls/claude-code-learner/types.js.map +0 -1
  297. package/dist/preflight/claude-required.d.ts +0 -8
  298. package/dist/preflight/claude-required.js +0 -17
  299. package/dist/preflight/claude-required.js.map +0 -1
  300. /package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/adapters/claude-code.d.ts +0 -0
  301. /package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/adapters/claude-code.js +0 -0
  302. /package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/adapters/codex-code.d.ts +0 -0
  303. /package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/adapters/codex-workspace.d.ts +0 -0
  304. /package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/adapters/codex-workspace.js +0 -0
  305. /package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/harvest.d.ts +0 -0
  306. /package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/restoration-patch.d.ts +0 -0
  307. /package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/test-utils/fake-plugin-outputs.d.ts +0 -0
  308. /package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/test-utils/fake-plugin-outputs.js +0 -0
  309. /package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/test-utils/noop-adapter.d.ts +0 -0
  310. /package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/test-utils/noop-adapter.js +0 -0
  311. /package/dist/harnesses/impls/{claude-code-learner โ†’ learner}/types.js +0 -0
  312. /package/plugins/{claude-code-learner โ†’ learner}/.claude-plugin/plugin.json +0 -0
  313. /package/plugins/{claude-code-learner โ†’ learner}/.codex-plugin/plugin.json +0 -0
  314. /package/plugins/{claude-code-learner โ†’ learner}/AGENTS.md +0 -0
  315. /package/plugins/{claude-code-learner โ†’ learner}/CLAUDE.md +0 -0
  316. /package/plugins/{claude-code-learner โ†’ learner}/README.md +0 -0
  317. /package/plugins/{claude-code-learner โ†’ learner}/hooks/hooks.json +0 -0
  318. /package/plugins/{claude-code-learner โ†’ learner}/hooks/session-start +0 -0
  319. /package/plugins/{claude-code-learner โ†’ learner}/skills/learn/SKILL.md +0 -0
  320. /package/plugins/{claude-code-learner โ†’ learner}/skills/learn/analyst-prompt.md +0 -0
  321. /package/plugins/{claude-code-learner โ†’ learner}/skills/learn/consolidator-prompt.md +0 -0
  322. /package/plugins/{claude-code-learner โ†’ learner}/skills/learn/explorer-prompt.md +0 -0
  323. /package/plugins/{claude-code-learner โ†’ learner}/skills/learn/planner-prompt.md +0 -0
  324. /package/plugins/{claude-code-learner โ†’ learner}/skills/learn/promoter-prompt.md +0 -0
  325. /package/plugins/{claude-code-learner โ†’ learner}/skills/learn/step-worker-prompt.md +0 -0
  326. /package/plugins/{claude-code-learner โ†’ learner}/skills/learn/strategist-prompt.md +0 -0
@@ -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;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,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;IAC9C,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,SAA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,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE;YACnD,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;YACtD,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE;SACxD;KACF;IACD;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,oBAAoB;QAC1B,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE;YAC5D,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE;YACnD,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE;YACvD,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;YACnD,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;YACvD,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,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;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EACL,mBAAmB,EACnB,kBAAkB,GAKnB,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,kCAAkC,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EACL,kCAAkC,EAClC,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,WAAW,CAAC;AA8BnB,MAAM,OAAO,4BAA6B,SAAQ,KAAK;IACrD,YAAY,MAAc;QACxB,KAAK,CAAC,qCAAqC,MAAM,EAAE,CAAC,CAAC;QACrD,IAAI,CAAC,IAAI,GAAG,8BAA8B,CAAC;IAC7C,CAAC;CACF;AAED,gFAAgF;AAEhF,MAAM,UAAU,GAAG,mBAAsB,CAAC;AAE1C,MAAM,UAAU,qBAAqB,CAAC,OAAsB;IAC1D,IAAI,OAAO,CAAC,OAAO,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,4BAA4B,CAAC,0BAA0B,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;IACD,IAAI,OAAO,OAAO,CAAC,UAAU,KAAK,QAAQ,IAAI,OAAO,CAAC,U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IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;IACvD,CAAC;IAEO,KAAK,CAAC,YAAY,CAAC,WAAmB,EAAE,aAAkB;QAChE,MAAM,QAAQ,GAAG,kBAAkB,CAAC;YAClC,GAAG,EAAE,kCAAkC;YACvC,YAAY,EAAE,aAAa;YAC3B,IAAI,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,WAAW,EAAE,aAAa,CAAC;SACxD,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,MAAM,sBAAsB,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE;YAChF,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,EAAE,EAAE,IAAI,CAAC,uBAAuB;YAChC,KAAK,EAAE,EAAE;YACT,IAAI,EAAE,QAAQ;SACf,CAAC,CAAC;QAEH,MAAM,kCAAkC,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;QACpE,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
@@ -818,6 +818,18 @@ export class TaskEngine {
818
818
  console.warn(`[harness-engine] ${task.requestId}: failed to hydrate solutionOutputsJson: ${err instanceof Error ? err.message : err}`);
819
819
  }
820
820
  }
821
+ // jinn-mono-4tfq: SkippableError caught in RUNNING leaves a skip-marker
822
+ // Solution with no payload; short-circuit before envelope assembly.
823
+ // Runs BEFORE the deps guard โ€” skipping needs nothing wired.
824
+ const earlyImplOutput = this.solutionOutputs.get(task.requestId);
825
+ const gatingClaim = earlyImplOutput?.gating;
826
+ if (gatingClaim?.['skipped'] === true) {
827
+ const reason = String(gatingClaim['reason'] ?? 'unknown');
828
+ const detail = String(earlyImplOutput?.informational?.['detail'] ?? '');
829
+ console.log(`[harness-engine] ${task.requestId}: PACKAGING short-circuited โ€” impl was skipped (${reason})${detail ? `: ${detail}` : ''}`);
830
+ this.persistence.markFailed(task.requestId, `impl skipped: ${reason}${detail ? ` โ€” ${detail}` : ''}`);
831
+ return;
832
+ }
821
833
  if (!this.packagingDeps || !this.envelopeDeps) {
822
834
  throw new NotImplementedError('pack');
823
835
  }
@@ -911,9 +923,9 @@ export class TaskEngine {
911
923
  // Record payload so validatePayload does not reject the output.
912
924
  const solverType = task.solverType ?? 'legacy.v0';
913
925
  // Derive role from Task.role. Evaluator tasks produce 'verdict' envelopes;
914
- // all other tasks produce 'restoration' envelopes.
926
+ // all other tasks produce 'solution' envelopes.
915
927
  const isEvaluation = task.taskRole === 'evaluation';
916
- const role = isEvaluation ? 'verdict' : 'restoration';
928
+ const role = isEvaluation ? 'verdict' : 'solution';
917
929
  let envelopePayload;
918
930
  if (isEvaluation) {
919
931
  // โ”€โ”€ Verdict envelope payload โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
@@ -926,7 +938,7 @@ export class TaskEngine {
926
938
  // with a wrong shape โ€” validatePayload will catch schema mismatches.
927
939
  //
928
940
  // verificationOfRestoration: stubbed โ€” Plan D will connect the real SDK.
929
- // restorationEnvelope.sha256: placeholder โ€” Plan D wires real sha256 derivation.
941
+ // solutionEnvelope.sha256: placeholder โ€” Plan D wires real sha256 derivation.
930
942
  const verdictPayload = implOutput?.verdictPayload;
931
943
  if (!verdictPayload) {
932
944
  throw new Error(`pack: evaluator impl for ${task.requestId} did not produce verdictPayload on Solution; ` +