@jinn-network/client 0.1.9-canary.5c19fc6d → 0.1.9-canary.5ff3d8cb

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 (295) hide show
  1. package/CONTRIBUTING.md +2 -2
  2. package/dist/adapters/mech/adapter.d.ts +10 -0
  3. package/dist/adapters/mech/adapter.js +19 -1
  4. package/dist/adapters/mech/adapter.js.map +1 -1
  5. package/dist/adapters/mech/types.d.ts +1 -88
  6. package/dist/adapters/mech/types.js +1 -45
  7. package/dist/adapters/mech/types.js.map +1 -1
  8. package/dist/api/bootstrap-endpoint.d.ts +18 -3
  9. package/dist/api/bootstrap-endpoint.js +3 -0
  10. package/dist/api/bootstrap-endpoint.js.map +1 -1
  11. package/dist/api/gather-status.js +6 -5
  12. package/dist/api/gather-status.js.map +1 -1
  13. package/dist/api/launcher-endpoints.js +6 -1
  14. package/dist/api/launcher-endpoints.js.map +1 -1
  15. package/dist/api/launcher-status.d.ts +2 -0
  16. package/dist/api/launcher-status.js.map +1 -1
  17. package/dist/api/launcher-tasks.d.ts +47 -0
  18. package/dist/api/launcher-tasks.js +88 -3
  19. package/dist/api/launcher-tasks.js.map +1 -1
  20. package/dist/api/loop-completion-build.d.ts +2 -2
  21. package/dist/api/loop-completion-build.js +2 -3
  22. package/dist/api/loop-completion-build.js.map +1 -1
  23. package/dist/api/portfolio-v0-build.d.ts +2 -1
  24. package/dist/api/portfolio-v0-build.js +5 -7
  25. package/dist/api/portfolio-v0-build.js.map +1 -1
  26. package/dist/api/prediction-v1-build.d.ts +2 -2
  27. package/dist/api/prediction-v1-build.js +5 -7
  28. package/dist/api/prediction-v1-build.js.map +1 -1
  29. package/dist/api/setup-endpoints.d.ts +4 -0
  30. package/dist/api/setup-endpoints.js +13 -7
  31. package/dist/api/setup-endpoints.js.map +1 -1
  32. package/dist/api/status-build.js +1 -4
  33. package/dist/api/status-build.js.map +1 -1
  34. package/dist/api/task-run-routing.d.ts +1 -1
  35. package/dist/api/task-runs-build.d.ts +2 -2
  36. package/dist/api/task-runs-build.js +5 -7
  37. package/dist/api/task-runs-build.js.map +1 -1
  38. package/dist/bin/jinn-distill-mcp.js +813 -0
  39. package/dist/bin/jinn-layer.js +4992 -1151
  40. package/dist/build-info.json +4 -4
  41. package/dist/build-meta.json +1 -1
  42. package/dist/captures/distil-export.d.ts +54 -0
  43. package/dist/captures/distil-export.js +135 -0
  44. package/dist/captures/distil-export.js.map +1 -0
  45. package/dist/captures/ingest.d.ts +21 -0
  46. package/dist/captures/ingest.js +144 -0
  47. package/dist/captures/ingest.js.map +1 -0
  48. package/dist/captures/live-publisher.js +4 -3
  49. package/dist/captures/live-publisher.js.map +1 -1
  50. package/dist/captures/publish.d.ts +4 -0
  51. package/dist/captures/publish.js +2 -2
  52. package/dist/captures/publish.js.map +1 -1
  53. package/dist/cli/execution-context.js +2 -1
  54. package/dist/cli/execution-context.js.map +1 -1
  55. package/dist/config.js +34 -1
  56. package/dist/config.js.map +1 -1
  57. package/dist/contracts/abis.d.ts +100 -0
  58. package/dist/contracts/abis.js +58 -0
  59. package/dist/contracts/abis.js.map +1 -0
  60. package/dist/contracts/addresses.d.ts +36 -0
  61. package/dist/contracts/addresses.js +60 -0
  62. package/dist/contracts/addresses.js.map +1 -0
  63. package/dist/corpus/onchain-query.d.ts +0 -1
  64. package/dist/corpus/onchain-query.js +2 -5
  65. package/dist/corpus/onchain-query.js.map +1 -1
  66. package/dist/daemon/balance-topup-loop.js +27 -12
  67. package/dist/daemon/balance-topup-loop.js.map +1 -1
  68. package/dist/daemon/creator.js +15 -13
  69. package/dist/daemon/creator.js.map +1 -1
  70. package/dist/daemon/daemon.js +35 -13
  71. package/dist/daemon/daemon.js.map +1 -1
  72. package/dist/daemon/loop-heartbeat.d.ts +62 -7
  73. package/dist/daemon/loop-heartbeat.js +50 -13
  74. package/dist/daemon/loop-heartbeat.js.map +1 -1
  75. package/dist/{api/peers.js → daemon/peer-sync.js} +2 -2
  76. package/dist/daemon/peer-sync.js.map +1 -0
  77. package/dist/daemon/reward-claim-loop.js +27 -12
  78. package/dist/daemon/reward-claim-loop.js.map +1 -1
  79. package/dist/daemon/spend-cap-gate.d.ts +0 -6
  80. package/dist/daemon/spend-cap-gate.js +1 -8
  81. package/dist/daemon/spend-cap-gate.js.map +1 -1
  82. package/dist/dashboard/assets/index-BdGCkGPF.js +157 -0
  83. package/dist/dashboard/assets/index-D7rvJRNa.css +1 -0
  84. package/dist/dashboard/index.html +2 -2
  85. package/dist/discovery/http.js +83 -1
  86. package/dist/discovery/http.js.map +1 -1
  87. package/dist/discovery/onchain.js +16 -8
  88. package/dist/discovery/onchain.js.map +1 -1
  89. package/dist/discovery/types.d.ts +43 -0
  90. package/dist/discovery/types.js.map +1 -1
  91. package/dist/discovery/with-fallback.js +10 -0
  92. package/dist/discovery/with-fallback.js.map +1 -1
  93. package/dist/earning/bootstrap-run.d.ts +25 -0
  94. package/dist/earning/bootstrap-run.js +315 -0
  95. package/dist/earning/bootstrap-run.js.map +1 -0
  96. package/dist/earning/bootstrap.d.ts +6 -11
  97. package/dist/earning/bootstrap.js +45 -195
  98. package/dist/earning/bootstrap.js.map +1 -1
  99. package/dist/earning/contracts.d.ts +2 -3
  100. package/dist/earning/contracts.js +12 -21
  101. package/dist/earning/contracts.js.map +1 -1
  102. package/dist/earning/master-gas.d.ts +10 -0
  103. package/dist/earning/master-gas.js +11 -0
  104. package/dist/earning/master-gas.js.map +1 -0
  105. package/dist/earning/safe-adapter.js +1 -45
  106. package/dist/earning/safe-adapter.js.map +1 -1
  107. package/dist/earning/steps/context.d.ts +42 -0
  108. package/dist/earning/steps/context.js +4 -0
  109. package/dist/earning/steps/context.js.map +1 -0
  110. package/dist/earning/steps/fleet-identity-register.d.ts +4 -0
  111. package/dist/earning/steps/fleet-identity-register.js +65 -0
  112. package/dist/earning/steps/fleet-identity-register.js.map +1 -0
  113. package/dist/earning/steps/fleet-safe-deploy.d.ts +4 -0
  114. package/dist/earning/steps/fleet-safe-deploy.js +62 -0
  115. package/dist/earning/steps/fleet-safe-deploy.js.map +1 -0
  116. package/dist/earning/steps/fleet-safe-predict.d.ts +4 -0
  117. package/dist/earning/steps/fleet-safe-predict.js +18 -0
  118. package/dist/earning/steps/fleet-safe-predict.js.map +1 -0
  119. package/dist/earning/steps/receipt-parsing.d.ts +12 -0
  120. package/dist/earning/steps/receipt-parsing.js +71 -0
  121. package/dist/earning/steps/receipt-parsing.js.map +1 -0
  122. package/dist/earning/stolas-staking.js +20 -14
  123. package/dist/earning/stolas-staking.js.map +1 -1
  124. package/dist/erc8004/addresses.d.ts +6 -5
  125. package/dist/erc8004/addresses.js +7 -5
  126. package/dist/erc8004/addresses.js.map +1 -1
  127. package/dist/erc8004/identity.d.ts +12 -1
  128. package/dist/erc8004/identity.js +31 -0
  129. package/dist/erc8004/identity.js.map +1 -1
  130. package/dist/erc8004/index.d.ts +1 -1
  131. package/dist/erc8004/index.js +1 -1
  132. package/dist/erc8004/index.js.map +1 -1
  133. package/dist/erc8004/reputation.js +16 -12
  134. package/dist/erc8004/reputation.js.map +1 -1
  135. package/dist/erc8004/validation.js +5 -4
  136. package/dist/erc8004/validation.js.map +1 -1
  137. package/dist/eval/capability-slate.d.ts +54 -0
  138. package/dist/eval/capability-slate.js +116 -0
  139. package/dist/eval/capability-slate.js.map +1 -0
  140. package/dist/eval/capability-stats.d.ts +39 -0
  141. package/dist/eval/capability-stats.js +123 -0
  142. package/dist/eval/capability-stats.js.map +1 -0
  143. package/dist/eval/contested-band.d.ts +18 -0
  144. package/dist/eval/contested-band.js +19 -0
  145. package/dist/eval/contested-band.js.map +1 -0
  146. package/dist/eval/corpus-index.d.ts +21 -0
  147. package/dist/eval/corpus-index.js +55 -0
  148. package/dist/eval/corpus-index.js.map +1 -0
  149. package/dist/eval/disjointness.d.ts +26 -0
  150. package/dist/eval/disjointness.js +67 -0
  151. package/dist/eval/disjointness.js.map +1 -0
  152. package/dist/eval/mcnemar-power.d.ts +14 -0
  153. package/dist/eval/mcnemar-power.js +40 -0
  154. package/dist/eval/mcnemar-power.js.map +1 -0
  155. package/dist/harnesses/engine/engine.d.ts +2 -1
  156. package/dist/harnesses/engine/engine.js +15 -2
  157. package/dist/harnesses/engine/engine.js.map +1 -1
  158. package/dist/harnesses/engine/persistence.d.ts +2 -61
  159. package/dist/harnesses/engine/persistence.js.map +1 -1
  160. package/dist/harnesses/impls/_evaluator-base.d.ts +48 -0
  161. package/dist/harnesses/impls/_evaluator-base.js +35 -0
  162. package/dist/harnesses/impls/_evaluator-base.js.map +1 -0
  163. package/dist/harnesses/impls/claude-mcp-prediction/index.d.ts +2 -3
  164. package/dist/harnesses/impls/claude-mcp-prediction/index.js +29 -99
  165. package/dist/harnesses/impls/claude-mcp-prediction/index.js.map +1 -1
  166. package/dist/harnesses/impls/claude-mcp-prediction/mcp-tools.js +4 -21
  167. package/dist/harnesses/impls/claude-mcp-prediction/mcp-tools.js.map +1 -1
  168. package/dist/harnesses/impls/claude-mcp-prediction/session-orchestrator.d.ts +2 -0
  169. package/dist/harnesses/impls/claude-mcp-prediction/session-orchestrator.js +1 -1
  170. package/dist/harnesses/impls/claude-mcp-prediction/session-orchestrator.js.map +1 -1
  171. package/dist/harnesses/impls/claude-mcp-prediction-apy/index.js +30 -79
  172. package/dist/harnesses/impls/claude-mcp-prediction-apy/index.js.map +1 -1
  173. package/dist/harnesses/impls/claude-mcp-prediction-apy/mcp-tools.js +4 -19
  174. package/dist/harnesses/impls/claude-mcp-prediction-apy/mcp-tools.js.map +1 -1
  175. package/dist/harnesses/impls/claude-mcp-prediction-apy/session-orchestrator.d.ts +2 -0
  176. package/dist/harnesses/impls/claude-mcp-prediction-apy/session-orchestrator.js +1 -1
  177. package/dist/harnesses/impls/claude-mcp-prediction-apy/session-orchestrator.js.map +1 -1
  178. package/dist/harnesses/impls/claude-mcp-shared/mcp-server-script.d.ts +39 -0
  179. package/dist/harnesses/impls/claude-mcp-shared/mcp-server-script.js +62 -0
  180. package/dist/harnesses/impls/claude-mcp-shared/mcp-server-script.js.map +1 -0
  181. package/dist/harnesses/impls/claude-mcp-shared/mcp-server.d.ts +40 -0
  182. package/dist/harnesses/impls/claude-mcp-shared/mcp-server.js +44 -0
  183. package/dist/harnesses/impls/claude-mcp-shared/mcp-server.js.map +1 -0
  184. package/dist/harnesses/impls/claude-mcp-shared/single-session-harness.d.ts +56 -0
  185. package/dist/harnesses/impls/claude-mcp-shared/single-session-harness.js +79 -0
  186. package/dist/harnesses/impls/claude-mcp-shared/single-session-harness.js.map +1 -0
  187. package/dist/harnesses/impls/learner/adapters/codex-code.d.ts +3 -1
  188. package/dist/harnesses/impls/learner/adapters/codex-code.js +39 -4
  189. package/dist/harnesses/impls/learner/adapters/codex-code.js.map +1 -1
  190. package/dist/harnesses/impls/portfolio-v0-evaluator/index.d.ts +5 -15
  191. package/dist/harnesses/impls/portfolio-v0-evaluator/index.js +10 -29
  192. package/dist/harnesses/impls/portfolio-v0-evaluator/index.js.map +1 -1
  193. package/dist/harnesses/impls/prediction-apy-v0-evaluator/index.d.ts +5 -15
  194. package/dist/harnesses/impls/prediction-apy-v0-evaluator/index.js +10 -23
  195. package/dist/harnesses/impls/prediction-apy-v0-evaluator/index.js.map +1 -1
  196. package/dist/harnesses/impls/prediction-v0-evaluator/index.d.ts +5 -15
  197. package/dist/harnesses/impls/prediction-v0-evaluator/index.js +10 -25
  198. package/dist/harnesses/impls/prediction-v0-evaluator/index.js.map +1 -1
  199. package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.js +8 -0
  200. package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.js.map +1 -1
  201. package/dist/learner/verification-gate.d.ts +53 -0
  202. package/dist/learner/verification-gate.js +80 -0
  203. package/dist/learner/verification-gate.js.map +1 -0
  204. package/dist/main.js +74 -457
  205. package/dist/main.js.map +1 -1
  206. package/dist/monitoring/net-liveness.d.ts +143 -0
  207. package/dist/monitoring/net-liveness.js +301 -0
  208. package/dist/monitoring/net-liveness.js.map +1 -0
  209. package/dist/observability/progress.d.ts +11 -0
  210. package/dist/observability/progress.js +16 -0
  211. package/dist/observability/progress.js.map +1 -0
  212. package/dist/pilot/cost.d.ts +19 -0
  213. package/dist/pilot/cost.js +31 -0
  214. package/dist/pilot/cost.js.map +1 -0
  215. package/dist/pilot/instance.d.ts +20 -0
  216. package/dist/pilot/instance.js +19 -0
  217. package/dist/pilot/instance.js.map +1 -0
  218. package/dist/pilot/repo.d.ts +31 -0
  219. package/dist/pilot/repo.js +42 -0
  220. package/dist/pilot/repo.js.map +1 -0
  221. package/dist/pilot/solve.d.ts +22 -0
  222. package/dist/pilot/solve.js +37 -0
  223. package/dist/pilot/solve.js.map +1 -0
  224. package/dist/pilot/tally.d.ts +35 -0
  225. package/dist/pilot/tally.js +61 -0
  226. package/dist/pilot/tally.js.map +1 -0
  227. package/dist/plugins/local-trace-distiller/.claude-plugin/plugin.json +9 -0
  228. package/dist/plugins/local-trace-distiller/.codex-plugin/plugin.json +41 -0
  229. package/dist/plugins/local-trace-distiller/.mcp.json +8 -0
  230. package/dist/plugins/local-trace-distiller/README.md +27 -0
  231. package/dist/plugins/local-trace-distiller/jinn.plugin.json +36 -0
  232. package/dist/plugins/local-trace-distiller/skills/distill/SKILL.md +51 -0
  233. package/dist/preflight/rpc-network.d.ts +10 -3
  234. package/dist/preflight/rpc-network.js +46 -13
  235. package/dist/preflight/rpc-network.js.map +1 -1
  236. package/dist/preflight/stable-cwd.d.ts +29 -0
  237. package/dist/preflight/stable-cwd.js +98 -0
  238. package/dist/preflight/stable-cwd.js.map +1 -0
  239. package/dist/solvernets/launched-record-dispatcher.js +6 -0
  240. package/dist/solvernets/launched-record-dispatcher.js.map +1 -1
  241. package/dist/spend/credential.d.ts +2 -2
  242. package/dist/spend/credential.js +9 -3
  243. package/dist/spend/credential.js.map +1 -1
  244. package/dist/spend/spend-cap.d.ts +10 -0
  245. package/dist/spend/spend-cap.js +13 -0
  246. package/dist/spend/spend-cap.js.map +1 -0
  247. package/dist/store/store.d.ts +14 -0
  248. package/dist/store/store.js +10 -1
  249. package/dist/store/store.js.map +1 -1
  250. package/dist/trajectory/processors/identity-scrub.js +22 -3
  251. package/dist/trajectory/processors/identity-scrub.js.map +1 -1
  252. package/dist/trajectory/scrub/build.d.ts +19 -0
  253. package/dist/trajectory/scrub/build.js +25 -0
  254. package/dist/trajectory/scrub/build.js.map +1 -1
  255. package/dist/trajectory/scrub/layer2.d.ts +23 -0
  256. package/dist/trajectory/scrub/layer2.js +33 -0
  257. package/dist/trajectory/scrub/layer2.js.map +1 -0
  258. package/dist/trajectory/scrub/openredaction-stage.d.ts +127 -0
  259. package/dist/trajectory/scrub/openredaction-stage.js +186 -2
  260. package/dist/trajectory/scrub/openredaction-stage.js.map +1 -1
  261. package/dist/trajectory/scrub/pipeline.d.ts +21 -0
  262. package/dist/trajectory/scrub/pipeline.js +57 -0
  263. package/dist/trajectory/scrub/pipeline.js.map +1 -1
  264. package/dist/trajectory/scrub/plain-patterns-stage.d.ts +14 -1
  265. package/dist/trajectory/scrub/plain-patterns-stage.js +35 -5
  266. package/dist/trajectory/scrub/plain-patterns-stage.js.map +1 -1
  267. package/dist/trajectory/scrub/secretlint-stage.d.ts +22 -3
  268. package/dist/trajectory/scrub/secretlint-stage.js +118 -27
  269. package/dist/trajectory/scrub/secretlint-stage.js.map +1 -1
  270. package/dist/trajectory/transcript-watcher.d.ts +26 -0
  271. package/dist/trajectory/transcript-watcher.js +33 -0
  272. package/dist/trajectory/transcript-watcher.js.map +1 -1
  273. package/dist/types/skill-artifact.d.ts +442 -0
  274. package/dist/types/skill-artifact.js +137 -0
  275. package/dist/types/skill-artifact.js.map +1 -0
  276. package/dist/types/task-run-read-model.d.ts +21 -0
  277. package/dist/types/task-run-read-model.js +2 -0
  278. package/dist/types/task-run-read-model.js.map +1 -0
  279. package/dist/types/task-run.d.ts +75 -0
  280. package/dist/types/task-run.js +2 -0
  281. package/dist/types/task-run.js.map +1 -0
  282. package/dist/util/redact-rpc-urls.d.ts +1 -1
  283. package/dist/util/redact-rpc-urls.js +57 -2
  284. package/dist/util/redact-rpc-urls.js.map +1 -1
  285. package/package.json +11 -8
  286. package/plugins/local-trace-distiller/.claude-plugin/plugin.json +9 -0
  287. package/plugins/local-trace-distiller/.codex-plugin/plugin.json +41 -0
  288. package/plugins/local-trace-distiller/.mcp.json +8 -0
  289. package/plugins/local-trace-distiller/README.md +27 -0
  290. package/plugins/local-trace-distiller/jinn.plugin.json +36 -0
  291. package/plugins/local-trace-distiller/skills/distill/SKILL.md +51 -0
  292. package/dist/api/peers.js.map +0 -1
  293. package/dist/dashboard/assets/index-BsrAAmvC.js +0 -171
  294. package/dist/dashboard/assets/index-DQOWJ2SF.css +0 -1
  295. /package/dist/{api/peers.d.ts → daemon/peer-sync.d.ts} +0 -0
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Neutral task-run row + state types (#1584).
3
+ *
4
+ * `PersistedTaskRun` is the canonical persisted-row shape read by both the
5
+ * engine persistence layer and the API read path. It lives here — in the
6
+ * neutral `types/` layer — so the API can type-import it without depending on
7
+ * `harnesses/engine/persistence`. `harnesses/engine/persistence.ts` re-exports
8
+ * it for back-compat. `TaskRunState` is re-exported from
9
+ * `harnesses/engine/state.ts` (its canonical const+type home) for one-stop
10
+ * neutral access.
11
+ */
12
+ import type { Task } from './task.js';
13
+ export type { TaskRunState } from '../harnesses/engine/state.js';
14
+ import type { TaskRunState } from '../harnesses/engine/state.js';
15
+ export interface PersistedTaskRun {
16
+ requestId: string;
17
+ taskId: string | null;
18
+ attemptIndex: number | null;
19
+ taskCid: string;
20
+ onchainCreationTx: string;
21
+ onchainCreationBlock: number;
22
+ solverType: string | null;
23
+ /** SolverNet manifest CID this task was posted under; null for legacy rows. */
24
+ solverNetManifestCid: string | null;
25
+ taskRole: 'restoration' | 'evaluation' | null;
26
+ implName: string | null;
27
+ state: TaskRunState;
28
+ stateUpdatedAt: number;
29
+ workingDir: string | null;
30
+ implStateDir: string | null;
31
+ windowStartTs: number;
32
+ windowEndTs: number;
33
+ /** Unix ms timestamp captured when this operator successfully claimed the run. */
34
+ runStartedAt: number | null;
35
+ preSnapshotCapturedAt: number | null;
36
+ preSnapshotPayload: unknown | null;
37
+ postSnapshotCapturedAt: number | null;
38
+ postSnapshotPayload: unknown | null;
39
+ fillsPayload: unknown[] | null;
40
+ gatingClaim: Record<string, unknown> | null;
41
+ informationalClaim: Record<string, unknown> | null;
42
+ artifactCids: Record<string, string> | null;
43
+ manifestCid: string | null;
44
+ deliveryTxHash: string | null;
45
+ /** Persisted once at first PACKAGING entry; reused on retry for manifest CID determinism. */
46
+ manifestGeneratedAt: number | null;
47
+ /** keccak256 of signed manifest canonical JSON; used by deliver() as evidenceHash. */
48
+ evidenceHash: string | null;
49
+ /** Full Task payload as recorded at observe() time; null for pre-migration rows. */
50
+ task: Task | null;
51
+ /**
52
+ * Serialised Solution from runImpl, persisted before the
53
+ * RUNNING → PACKAGING transition. Used by pack() to recover solution outputs
54
+ * after a crash so the manifest CID remains deterministic. Null for
55
+ * pre-migration rows and tasks that have already been packed.
56
+ * Added by WT-C for PACKAGING recovery fidelity.
57
+ */
58
+ solutionOutputsJson: string | null;
59
+ runtimePluginsJson: string | null;
60
+ /**
61
+ * Executor mode declared on this run ('train' | 'frozen').
62
+ * Captured by `pack()` from the freeze-fence's HarnessExecutionMode and
63
+ * read by `deliver()` to emit a payload v2 setMetadata. Null for legacy
64
+ * rows that completed before payload v2 wiring (deliver() defaults to v1).
65
+ */
66
+ executorMode: 'train' | 'frozen' | null;
67
+ /**
68
+ * Executor codeDigest (`sha256:<hex>` form) declared on this run.
69
+ * Captured by `pack()` from the freeze-fence and read by `deliver()` for
70
+ * payload v2 setMetadata. Null for legacy rows; deliver() defaults to v1.
71
+ */
72
+ executorCodeDigest: string | null;
73
+ failureReason: string | null;
74
+ failureAt: number | null;
75
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=task-run.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-run.js","sourceRoot":"","sources":["../../src/types/task-run.ts"],"names":[],"mappings":""}
@@ -2,4 +2,4 @@
2
2
  * Strip URLs from arbitrary error messages before they hit logs / stdout.
3
3
  * RPC endpoints often embed API keys; logging an `Error.message` verbatim leaks them.
4
4
  */
5
- export declare function redactRpcUrls(input: unknown): string;
5
+ export declare function redactRpcUrls(input: unknown, configuredRpcUrls?: readonly string[]): string;
@@ -2,8 +2,63 @@
2
2
  * Strip URLs from arbitrary error messages before they hit logs / stdout.
3
3
  * RPC endpoints often embed API keys; logging an `Error.message` verbatim leaks them.
4
4
  */
5
- export function redactRpcUrls(input) {
6
- const message = input instanceof Error ? input.message : String(input);
5
+ export function redactRpcUrls(input, configuredRpcUrls = []) {
6
+ let message = input instanceof Error ? input.message : String(input);
7
+ for (const url of configuredRpcUrlCandidates(configuredRpcUrls)) {
8
+ message = message.replaceAll(url, '<rpc-url>');
9
+ }
10
+ for (const secret of configuredRpcSecretCandidates(configuredRpcUrls)) {
11
+ message = message.replaceAll(secret, '<rpc-secret>');
12
+ }
7
13
  return message.replace(/https?:\/\/[^\s"]+/g, '<rpc-url>');
8
14
  }
15
+ function configuredRpcUrlCandidates(configuredRpcUrls) {
16
+ return configuredRpcUrls
17
+ .flatMap((url) => url.split(','))
18
+ .map((url) => url.trim())
19
+ .filter((url) => url.length > 0);
20
+ }
21
+ function configuredRpcSecretCandidates(configuredRpcUrls) {
22
+ const secrets = new Set();
23
+ for (const rawUrl of configuredRpcUrlCandidates(configuredRpcUrls)) {
24
+ let parsed;
25
+ try {
26
+ parsed = new URL(rawUrl);
27
+ }
28
+ catch {
29
+ continue;
30
+ }
31
+ addSecretCandidate(secrets, parsed.username);
32
+ addSecretCandidate(secrets, parsed.password);
33
+ for (const value of parsed.searchParams.values()) {
34
+ addSecretCandidate(secrets, value);
35
+ }
36
+ const segments = parsed.pathname.split('/');
37
+ for (let i = 0; i < segments.length; i += 1) {
38
+ const segment = segments[i];
39
+ if (!segment)
40
+ continue;
41
+ const previous = segments[i - 1]?.toLowerCase();
42
+ if (previous && /^v\d+$/.test(previous)) {
43
+ addSecretCandidate(secrets, segment);
44
+ continue;
45
+ }
46
+ if (segment.length >= 20 && /[A-Za-z]/.test(segment) && /[0-9A-Z]/.test(segment)) {
47
+ addSecretCandidate(secrets, segment);
48
+ }
49
+ }
50
+ }
51
+ return [...secrets].sort((a, b) => b.length - a.length);
52
+ }
53
+ function addSecretCandidate(secrets, value) {
54
+ if (value.length < 6)
55
+ return;
56
+ secrets.add(value);
57
+ try {
58
+ secrets.add(decodeURIComponent(value));
59
+ }
60
+ catch {
61
+ // Keep the encoded candidate when URL decoding fails.
62
+ }
63
+ }
9
64
  //# sourceMappingURL=redact-rpc-urls.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"redact-rpc-urls.js","sourceRoot":"","sources":["../../src/util/redact-rpc-urls.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,OAAO,OAAO,CAAC,OAAO,CAAC,qBAAqB,EAAE,WAAW,CAAC,CAAC;AAC7D,CAAC"}
1
+ {"version":3,"file":"redact-rpc-urls.js","sourceRoot":"","sources":["../../src/util/redact-rpc-urls.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,KAAc,EAAE,oBAAuC,EAAE;IACrF,IAAI,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrE,KAAK,MAAM,GAAG,IAAI,0BAA0B,CAAC,iBAAiB,CAAC,EAAE,CAAC;QAChE,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,GA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5c19fc6d",
3
+ "version": "0.1.9-canary.5ff3d8cb",
4
4
  "description": "Jinn protocol client — headless daemon for the restoration training loop",
5
5
  "type": "module",
6
6
  "packageManager": "yarn@4.13.0",
@@ -20,6 +20,7 @@
20
20
  "bin": {
21
21
  "client": "./dist/bin/jinn.js",
22
22
  "jinn": "./dist/bin/jinn.js",
23
+ "jinn-distill-mcp": "./dist/bin/jinn-distill-mcp.js",
23
24
  "jinn-layer": "./dist/bin/jinn-layer.js",
24
25
  "jinn-stop-hook": "./dist/bin/jinn-stop-hook.js"
25
26
  },
@@ -52,7 +53,7 @@
52
53
  "typecheck:harness-layer": "tsc --noEmit -p packages/harness-layer/tsconfig.json",
53
54
  "dev": "yarn build && node dist/bin/jinn.js",
54
55
  "build:sdk": "yarn --cwd ../packages/sdk install --immutable && yarn --cwd ../packages/sdk build",
55
- "build": "yarn build:sdk && yarn build:spa && tsc && chmod +x dist/bin/jinn.js && node scripts/bundle-jinn-layer.mjs && rm -rf dist/dashboard && mkdir -p dist/dashboard && cp -R src/dashboard/spa/dist/. dist/dashboard/ && rm -rf dist/templates && cp -R templates dist/templates && rm -rf dist/plugins/learner && mkdir -p dist/plugins && cp -R plugins/learner dist/plugins/learner && mkdir -p dist/scripts && cp scripts/fix-node-pty.mjs scripts/swe-rebench-v2-seed-pool.json scripts/swe-rebench-v2-known-bad.json scripts/swe-rebench-v2-pytest-missing.json dist/scripts/ && mkdir -p dist/solver-types/slates && cp src/solver-types/slates/*.json dist/solver-types/slates/ && node scripts/vendor-sdk.mjs && node scripts/write-dist-build-meta.mjs && yarn typecheck:harness-layer",
56
+ "build": "yarn build:sdk && yarn build:spa && tsc && chmod +x dist/bin/jinn.js && node scripts/bundle-jinn-layer.mjs && rm -rf dist/dashboard && mkdir -p dist/dashboard && cp -R src/dashboard/spa/dist/. dist/dashboard/ && rm -rf dist/templates && cp -R templates dist/templates && rm -rf dist/plugins/learner dist/plugins/local-trace-distiller && mkdir -p dist/plugins && cp -R plugins/learner dist/plugins/learner && cp -R plugins/local-trace-distiller dist/plugins/local-trace-distiller && mkdir -p dist/scripts && cp scripts/fix-node-pty.mjs scripts/swe-rebench-v2-seed-pool.json scripts/swe-rebench-v2-known-bad.json scripts/swe-rebench-v2-pytest-missing.json dist/scripts/ && mkdir -p dist/solver-types/slates && cp src/solver-types/slates/*.json dist/solver-types/slates/ && node scripts/vendor-sdk.mjs && node scripts/write-dist-build-meta.mjs && yarn typecheck:harness-layer",
56
57
  "typecheck": "yarn build:sdk && tsc --noEmit && yarn typecheck:harness-layer",
57
58
  "lint:no-late-mount": "node scripts/check-no-late-route-mount.mjs",
58
59
  "test": "yarn build:sdk && vitest run",
@@ -83,6 +84,8 @@
83
84
  "release:testnet-acceptance:docker": "node scripts/testnet-acceptance-docker.mjs",
84
85
  "release:testnet-acceptance:host": "node scripts/testnet-acceptance.mjs",
85
86
  "status": "tsx scripts/status.ts",
87
+ "audit:failures": "tsx scripts/audit-task-run-failures.ts",
88
+ "net-liveness": "tsx scripts/net-liveness-probe.ts",
86
89
  "cleanup:engine-work": "tsx scripts/cleanup-engine-work.ts",
87
90
  "e2e": "tsx test/e2e/validate.ts",
88
91
  "e2e:task-first-local": "tsx test/e2e/task-first-local.ts",
@@ -121,7 +124,7 @@
121
124
  "dependencies": {
122
125
  "@ethereumjs/wallet": "^10.0.0",
123
126
  "@grpc/grpc-js": "^1.14.3",
124
- "@hono/node-server": "^1.19.12",
127
+ "@hono/node-server": "^2.0.5",
125
128
  "@huggingface/transformers": "^4.2.0",
126
129
  "@modelcontextprotocol/sdk": "^1.27.1",
127
130
  "@msgpack/msgpack": "^3.0.0",
@@ -129,14 +132,14 @@
129
132
  "@noble/hashes": "^2.2.0",
130
133
  "@opentelemetry/api": "^1.9.1",
131
134
  "@opentelemetry/core": "^2.7.1",
132
- "@opentelemetry/exporter-trace-otlp-grpc": "^0.218.0",
133
- "@opentelemetry/exporter-trace-otlp-http": "^0.218.0",
135
+ "@opentelemetry/exporter-trace-otlp-grpc": "^0.220.0",
136
+ "@opentelemetry/exporter-trace-otlp-http": "^0.220.0",
134
137
  "@opentelemetry/resources": "^2.7.1",
135
- "@opentelemetry/sdk-node": "^0.219.0",
138
+ "@opentelemetry/sdk-node": "^0.220.0",
136
139
  "@opentelemetry/sdk-trace-base": "^2.7.1",
137
- "@safe-global/protocol-kit": "^7.2.0",
140
+ "@safe-global/protocol-kit": "^8.0.3",
138
141
  "@safe-global/safe-deployments": "^1.37.56",
139
- "@safe-global/types-kit": "^3.0.0",
142
+ "@safe-global/types-kit": "^4.0.1",
140
143
  "@scure/bip32": "^2.2.0",
141
144
  "@scure/bip39": "^1.4.0",
142
145
  "@secretlint/core": "^13.0.2",
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "local-trace-distiller",
3
+ "description": "Local trace distillation tools and workflow for deriving experimental skills from private session traces.",
4
+ "version": "0.1.0",
5
+ "author": {
6
+ "name": "Jinn Network",
7
+ "url": "https://github.com/Jinn-Network/mono"
8
+ }
9
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "local-trace-distiller",
3
+ "version": "0.1.0",
4
+ "description": "Local trace distillation tools and skill workflow for deriving experimental skills from private session traces.",
5
+ "author": {
6
+ "name": "Jinn Network",
7
+ "url": "https://github.com/Jinn-Network/mono"
8
+ },
9
+ "homepage": "https://github.com/Jinn-Network/mono",
10
+ "repository": "https://github.com/Jinn-Network/mono",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "jinn",
14
+ "distill",
15
+ "traces",
16
+ "skills",
17
+ "mcp"
18
+ ],
19
+ "skills": "./skills/",
20
+ "mcpServers": "./.mcp.json",
21
+ "interface": {
22
+ "displayName": "Local Trace Distiller",
23
+ "shortDescription": "Derive experimental skills from local traces",
24
+ "longDescription": "Searches local captured session traces, clusters recurring patterns, and runs the existing Jinn distillation flow using the user's selected LLM provider.",
25
+ "developerName": "Jinn Network",
26
+ "category": "Coding",
27
+ "capabilities": [
28
+ "Interactive",
29
+ "Read",
30
+ "Write"
31
+ ],
32
+ "websiteURL": "https://github.com/Jinn-Network/mono",
33
+ "privacyPolicyURL": "https://github.com/Jinn-Network/mono",
34
+ "termsOfServiceURL": "https://github.com/Jinn-Network/mono",
35
+ "defaultPrompt": [
36
+ "Use /distill to derive an experimental skill from local traces."
37
+ ],
38
+ "brandColor": "#2563EB",
39
+ "screenshots": []
40
+ }
41
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "mcpServers": {
3
+ "jinn-local-distill": {
4
+ "command": "jinn-distill-mcp",
5
+ "args": []
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,27 @@
1
+ # local-trace-distiller
2
+
3
+ Local trace distillation plugin for deriving experimental skills from private session traces.
4
+
5
+ ## Components
6
+
7
+ - `skills/distill/SKILL.md` — `/distill` workflow. No argument defaults to `this`; `all` runs a capped cluster-first scan.
8
+ - `.mcp.json` — launches `jinn-distil-mcp`.
9
+ - `jinn-distil-mcp` tools:
10
+ - `distill_trace_search` — compact local trace cards.
11
+ - `distill_trace_read` — scoped trace reads with full-transcript gating.
12
+ - `distill_trace_cluster` — cheap repeated-signal candidate discovery.
13
+ - `distill_local` — confirmed local run through `jinn-layer distil`.
14
+
15
+ ## Local Capture Source
16
+
17
+ Stop-hook captures are exported as `CapturedTask` JSON under:
18
+
19
+ ```text
20
+ ~/.jinn-client/harness-layer/captures
21
+ ```
22
+
23
+ Set `JINN_LAYER_CAPTURES_DIR` to override the directory. The MCP server and `jinn-layer distil` use the same directory, so agents can search traces and then invoke the existing distillation flow without a second data path.
24
+
25
+ ## Status
26
+
27
+ Generated skills are marked experimental and should be improved through user feedback before they are treated as stable. Public marketplace listing is intentionally out of scope for this version.
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@jinn-network/local-trace-distiller",
3
+ "version": "0.1.0",
4
+ "description": "Local trace distillation plugin. Searches private captures, clusters candidate skill opportunities, and invokes the existing Jinn skill distiller locally.",
5
+ "jinn": {
6
+ "supports": [
7
+ "jinn.local-distill"
8
+ ],
9
+ "capabilities": {
10
+ "tools": {
11
+ "jinn-local-distill": [
12
+ "distill_trace_search",
13
+ "distill_trace_read",
14
+ "distill_trace_cluster",
15
+ "distill_local",
16
+ "distill_feedback_record"
17
+ ]
18
+ }
19
+ },
20
+ "mcpServers": {
21
+ "jinn-local-distill": {
22
+ "command": "jinn-distill-mcp",
23
+ "tools": [
24
+ "distill_trace_search",
25
+ "distill_trace_read",
26
+ "distill_trace_cluster",
27
+ "distill_local",
28
+ "distill_feedback_record"
29
+ ]
30
+ }
31
+ },
32
+ "skills": [
33
+ "skills/distill/SKILL.md"
34
+ ]
35
+ }
36
+ }
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: distill
3
+ description: Use local trace tools to derive experimental skills from private session traces. Trigger on /distill, "distill this", "distill all", or requests to turn repeated local work into a reusable skill.
4
+ tools: distill_trace_search, distill_trace_read, distill_trace_cluster, distill_local, distill_feedback_record
5
+ ---
6
+
7
+ # Local Trace Distill
8
+
9
+ Use this skill to help the user turn local work traces into experimental skills using the existing Jinn distillation methodology.
10
+
11
+ ## Arguments
12
+
13
+ - No argument means `this`: focus on the current or most recent session.
14
+ - `this`, `current`, or `recent`: inspect the most recent local trace cards, choose the best match for the current session, then distill only that trace unless the user chooses a broader set.
15
+ - `all`: run a capped, cheap scan over local trace cards, cluster recurring signals, present candidates, and ask the user which candidate to distill.
16
+ - A trace id, session id, or candidate trace list: inspect those traces and distill only the selected traces.
17
+
18
+ ## Tool Workflow
19
+
20
+ 1. Start with `distill_trace_search`, using compact cards. Do not read full transcripts first.
21
+ 2. For `all`, call `distill_trace_cluster` with a conservative cap. Default to `limit: 50` unless the user requested a different cap.
22
+ 3. Read only what is needed:
23
+ - Use `mode: "summary"` for orientation.
24
+ - Use `mode: "tool_calls"` to understand commands and edits.
25
+ - Use `mode: "transcript_excerpt"` with a query when one section matters.
26
+ - Use `mode: "full_transcript"` only when the skill cannot be safely derived from smaller reads, and set `allowFullTranscript: true` only after deciding it is necessary.
27
+ 4. Before calling `distill_local`, summarize the proposed source traces and the likely skill opportunity in one short paragraph.
28
+ 5. Call `distill_local` with `confirm: true` only after the user explicitly approves the run or has already requested an execution form such as "distill this now".
29
+ 6. Pass selected `traceIds` or `sessionIds` whenever the user chose a candidate. Avoid distilling every capture unless the user asked for `all` and then approved that broad run.
30
+
31
+ ## Distillation Methodology
32
+
33
+ Reuse the existing Jinn distillation methodology rather than inventing a new prompt:
34
+
35
+ - Prefer evaluator/user-accepted successful traces for success patterns.
36
+ - Use failed or abandoned traces only for concrete lessons and failure avoidances.
37
+ - Keep the skill grounded in repeated evidence when available; label single-trace outputs as experimental.
38
+ - Preserve provenance through the generated skill metadata.
39
+ - Run through the existing scrub, contamination, structure, and package gates via `distill_local`.
40
+
41
+ ## User Feedback Loop
42
+
43
+ Generated skills are experimental. After a later session uses one, ask the user whether it helped, hurt, was mixed, or went unused. If the user gives feedback, call `distill_feedback_record` with the skill name, verdict, session id if known, and only user-approved notes or accepted changes. Convert accepted feedback into a targeted skill improvement instead of accumulating broad notes.
44
+
45
+ ## Future Marketplace
46
+
47
+ Do not list local skills publicly in this version. Later versions may let users publish useful skills to a marketplace for others to use and pay for, but that requires explicit user approval and a separate publish flow.
48
+
49
+ ## Privacy
50
+
51
+ Local traces are private by default. Do not export trace content or generated skills to a remote marketplace or shared corpus unless the user explicitly asks for that future publish flow.
@@ -1 +0,0 @@
1
- {"version":3,"file":"peers.js","sourceRoot":"","sources":["../../src/api/peers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EACL,sBAAsB,GAGvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAS7D,MAAM,OAAO,QAAQ;IACX,OAAO,GAAG,KAAK,CAAC;IACP,KAAK,CAAW;IAChB,KAAK,CAAQ;IACb,MAAM,CAAiB;IACvB,cAAc,CAAS;IAExC,YAAY,MAAsB;QAChC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