@jinn-network/client 0.1.7 → 0.1.8-canary.09a3b2f6
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.
- package/README.md +67 -1
- package/dist/adapters/mech/adapter.d.ts +39 -2
- package/dist/adapters/mech/adapter.js +178 -20
- package/dist/adapters/mech/adapter.js.map +1 -1
- package/dist/adapters/mech/contracts.d.ts +22 -1
- package/dist/adapters/mech/contracts.js +96 -52
- package/dist/adapters/mech/contracts.js.map +1 -1
- package/dist/adapters/mech/safe-revert.d.ts +4 -0
- package/dist/adapters/mech/safe-revert.js +5 -1
- package/dist/adapters/mech/safe-revert.js.map +1 -1
- package/dist/adapters/mech/safe.d.ts +1 -1
- package/dist/adapters/mech/safe.js +10 -4
- package/dist/adapters/mech/safe.js.map +1 -1
- package/dist/adapters/mech/types.d.ts +6 -1
- package/dist/adapters/mech/types.js.map +1 -1
- package/dist/agent/operator-claude.js +8 -0
- package/dist/agent/operator-claude.js.map +1 -1
- package/dist/api/activity-events-endpoint.d.ts +14 -0
- package/dist/api/activity-events-endpoint.js +59 -0
- package/dist/api/activity-events-endpoint.js.map +1 -0
- package/dist/api/bootstrap-endpoint.d.ts +1 -2
- package/dist/api/bootstrap-endpoint.js +42 -24
- package/dist/api/bootstrap-endpoint.js.map +1 -1
- package/dist/api/codex-doctor-endpoint.d.ts +22 -5
- package/dist/api/codex-doctor-endpoint.js +136 -17
- package/dist/api/codex-doctor-endpoint.js.map +1 -1
- package/dist/api/debug-report-endpoint.d.ts +27 -0
- package/dist/api/debug-report-endpoint.js +157 -0
- package/dist/api/debug-report-endpoint.js.map +1 -0
- package/dist/api/discovery-endpoint.d.ts +1 -0
- package/dist/api/discovery-endpoint.js +24 -0
- package/dist/api/discovery-endpoint.js.map +1 -1
- package/dist/api/fleet-build.d.ts +1 -7
- package/dist/api/fleet-build.js +0 -7
- package/dist/api/fleet-build.js.map +1 -1
- package/dist/api/gather-status.d.ts +39 -0
- package/dist/api/gather-status.js +181 -84
- package/dist/api/gather-status.js.map +1 -1
- package/dist/api/hermes-doctor-endpoint.d.ts +15 -7
- package/dist/api/hermes-doctor-endpoint.js +56 -19
- package/dist/api/hermes-doctor-endpoint.js.map +1 -1
- package/dist/api/launcher-status.d.ts +4 -2
- package/dist/api/launcher-status.js +11 -10
- package/dist/api/launcher-status.js.map +1 -1
- package/dist/api/launcher-tasks.d.ts +1 -1
- package/dist/api/launcher-tasks.js +12 -8
- package/dist/api/launcher-tasks.js.map +1 -1
- package/dist/api/loop-completion-build.d.ts +79 -0
- package/dist/api/loop-completion-build.js +155 -0
- package/dist/api/loop-completion-build.js.map +1 -0
- package/dist/api/operator-artifacts-endpoint.js +73 -6
- package/dist/api/operator-artifacts-endpoint.js.map +1 -1
- package/dist/api/portfolio-v0-build.d.ts +7 -1
- package/dist/api/portfolio-v0-build.js +6 -2
- package/dist/api/portfolio-v0-build.js.map +1 -1
- package/dist/api/prediction-v1-build.d.ts +6 -0
- package/dist/api/prediction-v1-build.js +3 -1
- package/dist/api/prediction-v1-build.js.map +1 -1
- package/dist/api/server.d.ts +17 -0
- package/dist/api/server.js +40 -1
- package/dist/api/server.js.map +1 -1
- package/dist/api/setup-endpoints.d.ts +13 -9
- package/dist/api/setup-endpoints.js +50 -173
- package/dist/api/setup-endpoints.js.map +1 -1
- package/dist/api/solvernets-endpoints.js +33 -63
- package/dist/api/solvernets-endpoints.js.map +1 -1
- package/dist/api/status-build.d.ts +140 -17
- package/dist/api/status-build.js +47 -34
- package/dist/api/status-build.js.map +1 -1
- package/dist/api/status-harness-rollup.d.ts +35 -0
- package/dist/api/status-harness-rollup.js +45 -0
- package/dist/api/status-harness-rollup.js.map +1 -0
- package/dist/api/status-rollup-build.d.ts +0 -4
- package/dist/api/status-rollup-build.js +0 -4
- package/dist/api/status-rollup-build.js.map +1 -1
- package/dist/api/task-runs-build.d.ts +8 -0
- package/dist/api/task-runs-build.js +5 -1
- package/dist/api/task-runs-build.js.map +1 -1
- package/dist/build-info.json +4 -4
- package/dist/build-meta.json +1 -1
- package/dist/captures/live-publisher.js +24 -4
- package/dist/captures/live-publisher.js.map +1 -1
- package/dist/captures/publish.d.ts +1 -1
- package/dist/chain-read-errors.d.ts +12 -0
- package/dist/chain-read-errors.js +26 -1
- package/dist/chain-read-errors.js.map +1 -1
- package/dist/cli/commands/codedigest-revert-check.d.ts +33 -0
- package/dist/cli/commands/codedigest-revert-check.js +253 -0
- package/dist/cli/commands/codedigest-revert-check.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +3 -0
- package/dist/cli/commands/doctor.js +35 -0
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/eval.d.ts +76 -0
- package/dist/cli/commands/eval.js +401 -0
- package/dist/cli/commands/eval.js.map +1 -0
- package/dist/cli/commands/rewards.d.ts +2 -0
- package/dist/cli/commands/rewards.js +27 -0
- package/dist/cli/commands/rewards.js.map +1 -1
- package/dist/cli/commands/solver-nets.d.ts +1 -0
- package/dist/cli/commands/solver-nets.js +245 -22
- package/dist/cli/commands/solver-nets.js.map +1 -1
- package/dist/cli/commands/solver-plugins-block.d.ts +33 -0
- package/dist/cli/commands/solver-plugins-block.js +118 -0
- package/dist/cli/commands/solver-plugins-block.js.map +1 -0
- package/dist/cli/commands/solver-plugins-feedback.d.ts +72 -0
- package/dist/cli/commands/solver-plugins-feedback.js +262 -0
- package/dist/cli/commands/solver-plugins-feedback.js.map +1 -0
- package/dist/cli/commands/solver-plugins-read.d.ts +54 -0
- package/dist/cli/commands/solver-plugins-read.js +259 -0
- package/dist/cli/commands/solver-plugins-read.js.map +1 -0
- package/dist/cli/commands/solver-plugins.d.ts +35 -0
- package/dist/cli/commands/solver-plugins.js +399 -2
- package/dist/cli/commands/solver-plugins.js.map +1 -1
- package/dist/cli/commands/status.js +0 -1
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/tasks.js +15 -2
- package/dist/cli/commands/tasks.js.map +1 -1
- package/dist/cli/index.js +4 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/task-native-readiness.d.ts +7 -0
- package/dist/cli/task-native-readiness.js +7 -5
- package/dist/cli/task-native-readiness.js.map +1 -1
- package/dist/config.d.ts +206 -232
- package/dist/config.js +289 -107
- package/dist/config.js.map +1 -1
- package/dist/daemon/ai-units-gate.d.ts +54 -0
- package/dist/daemon/ai-units-gate.js +83 -0
- package/dist/daemon/ai-units-gate.js.map +1 -0
- package/dist/daemon/creator.js +13 -0
- package/dist/daemon/creator.js.map +1 -1
- package/dist/daemon/daemon.d.ts +10 -0
- package/dist/daemon/daemon.js +205 -30
- package/dist/daemon/daemon.js.map +1 -1
- package/dist/daemon/eviction-loop.d.ts +7 -0
- package/dist/daemon/eviction-loop.js +16 -0
- package/dist/daemon/eviction-loop.js.map +1 -1
- package/dist/daemon/gate-logger.d.ts +9 -0
- package/dist/daemon/gate-logger.js +2 -0
- package/dist/daemon/gate-logger.js.map +1 -0
- package/dist/daemon/jinn-claim-loop.js +22 -4
- package/dist/daemon/jinn-claim-loop.js.map +1 -1
- package/dist/daemon/readiness-gate.d.ts +1 -4
- package/dist/daemon/readiness-gate.js.map +1 -1
- package/dist/daemon/spend-cap-gate.d.ts +40 -0
- package/dist/daemon/spend-cap-gate.js +46 -0
- package/dist/daemon/spend-cap-gate.js.map +1 -0
- package/dist/dashboard/assets/index-3quVQqik.js +167 -0
- package/dist/dashboard/assets/index-BVAWkLwY.css +1 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/discovery/http.d.ts +7 -0
- package/dist/discovery/http.js +567 -24
- package/dist/discovery/http.js.map +1 -1
- package/dist/discovery/onchain.js +197 -5
- package/dist/discovery/onchain.js.map +1 -1
- package/dist/discovery/types.d.ts +235 -0
- package/dist/discovery/types.js +40 -0
- package/dist/discovery/types.js.map +1 -1
- package/dist/discovery/with-fallback.js +41 -0
- package/dist/discovery/with-fallback.js.map +1 -1
- package/dist/earning/bootstrap.d.ts +31 -3
- package/dist/earning/bootstrap.js +94 -22
- package/dist/earning/bootstrap.js.map +1 -1
- package/dist/earning/faucet.d.ts +1 -1
- package/dist/earning/faucet.js +2 -2
- package/dist/earning/faucet.js.map +1 -1
- package/dist/earning/safe-adapter.js +34 -11
- package/dist/earning/safe-adapter.js.map +1 -1
- package/dist/earning/types.d.ts +6 -6
- package/dist/earning/viem-clients.d.ts +11 -4
- package/dist/earning/viem-clients.js +14 -5
- package/dist/earning/viem-clients.js.map +1 -1
- package/dist/erc8004/identity.d.ts +19 -3
- package/dist/erc8004/identity.js +38 -11
- package/dist/erc8004/identity.js.map +1 -1
- package/dist/erc8004/index.d.ts +1 -1
- package/dist/erc8004/index.js.map +1 -1
- package/dist/eval/eval-harness-run.d.ts +63 -0
- package/dist/eval/eval-harness-run.js +123 -0
- package/dist/eval/eval-harness-run.js.map +1 -0
- package/dist/eval/orchestrator.d.ts +163 -0
- package/dist/eval/orchestrator.js +232 -0
- package/dist/eval/orchestrator.js.map +1 -0
- package/dist/eval/paired.d.ts +68 -0
- package/dist/eval/paired.js +93 -0
- package/dist/eval/paired.js.map +1 -0
- package/dist/eval/resolve-slate-tasks.d.ts +35 -0
- package/dist/eval/resolve-slate-tasks.js +56 -0
- package/dist/eval/resolve-slate-tasks.js.map +1 -0
- package/dist/eval/screen-discovery.d.ts +22 -0
- package/dist/eval/screen-discovery.js +71 -0
- package/dist/eval/screen-discovery.js.map +1 -0
- package/dist/eval/screen-progress.d.ts +41 -0
- package/dist/eval/screen-progress.js +60 -0
- package/dist/eval/screen-progress.js.map +1 -0
- package/dist/eval/screen-runner.d.ts +30 -0
- package/dist/eval/screen-runner.js +289 -0
- package/dist/eval/screen-runner.js.map +1 -0
- package/dist/eval/screen.d.ts +107 -0
- package/dist/eval/screen.js +159 -0
- package/dist/eval/screen.js.map +1 -0
- package/dist/eval/slope.d.ts +29 -0
- package/dist/eval/slope.js +46 -0
- package/dist/eval/slope.js.map +1 -0
- package/dist/eval/train-sequence.d.ts +35 -0
- package/dist/eval/train-sequence.js +59 -0
- package/dist/eval/train-sequence.js.map +1 -0
- package/dist/eval/wilson.d.ts +45 -0
- package/dist/eval/wilson.js +48 -0
- package/dist/eval/wilson.js.map +1 -0
- package/dist/events/types.d.ts +2 -2
- package/dist/harnesses/cost-estimates.d.ts +10 -31
- package/dist/harnesses/cost-estimates.js +11 -43
- package/dist/harnesses/cost-estimates.js.map +1 -1
- package/dist/harnesses/engine/canonical-json.js +5 -3
- package/dist/harnesses/engine/canonical-json.js.map +1 -1
- package/dist/harnesses/engine/engine.d.ts +37 -4
- package/dist/harnesses/engine/engine.js +151 -20
- package/dist/harnesses/engine/engine.js.map +1 -1
- package/dist/harnesses/engine/persistence.d.ts +38 -4
- package/dist/harnesses/engine/persistence.js +71 -6
- package/dist/harnesses/engine/persistence.js.map +1 -1
- package/dist/harnesses/engine/state.d.ts +9 -0
- package/dist/harnesses/engine/state.js +23 -10
- package/dist/harnesses/engine/state.js.map +1 -1
- package/dist/harnesses/impls/hermes-agent/adapter.d.ts +2 -0
- package/dist/harnesses/impls/hermes-agent/adapter.js +8 -5
- package/dist/harnesses/impls/hermes-agent/adapter.js.map +1 -1
- package/dist/harnesses/impls/hermes-agent/bootstrap.d.ts +1 -0
- package/dist/harnesses/impls/hermes-agent/bootstrap.js +10 -3
- package/dist/harnesses/impls/hermes-agent/bootstrap.js.map +1 -1
- package/dist/harnesses/impls/hermes-agent/config-builder.d.ts +1 -1
- package/dist/harnesses/impls/hermes-agent/config-builder.js +4 -2
- package/dist/harnesses/impls/hermes-agent/config-builder.js.map +1 -1
- package/dist/harnesses/impls/hermes-agent/harness.d.ts +31 -3
- package/dist/harnesses/impls/hermes-agent/harness.js +84 -7
- package/dist/harnesses/impls/hermes-agent/harness.js.map +1 -1
- package/dist/harnesses/impls/hermes-agent/prompt.d.ts +6 -6
- package/dist/harnesses/impls/hermes-agent/prompt.js +6 -6
- package/dist/harnesses/impls/index.d.ts +2 -0
- package/dist/harnesses/impls/index.js +2 -0
- package/dist/harnesses/impls/index.js.map +1 -1
- package/dist/harnesses/impls/learner/adapters/claude-code.d.ts +17 -0
- package/dist/harnesses/impls/learner/adapters/claude-code.js +118 -14
- package/dist/harnesses/impls/learner/adapters/claude-code.js.map +1 -1
- package/dist/harnesses/impls/learner/adapters/codex-code.d.ts +9 -0
- package/dist/harnesses/impls/learner/adapters/codex-code.js +30 -8
- package/dist/harnesses/impls/learner/adapters/codex-code.js.map +1 -1
- package/dist/harnesses/impls/learner/harness.d.ts +41 -1
- package/dist/harnesses/impls/learner/harness.js +78 -4
- package/dist/harnesses/impls/learner/harness.js.map +1 -1
- package/dist/harnesses/impls/learner/harvest.d.ts +3 -1
- package/dist/harnesses/impls/learner/harvest.js +30 -6
- package/dist/harnesses/impls/learner/harvest.js.map +1 -1
- package/dist/harnesses/impls/learner/plugin-path.js +1 -0
- package/dist/harnesses/impls/learner/plugin-path.js.map +1 -1
- package/dist/harnesses/impls/learner/restoration-patch.d.ts +2 -2
- package/dist/harnesses/impls/learner/restoration-patch.js +25 -6
- package/dist/harnesses/impls/learner/restoration-patch.js.map +1 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.js +21 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.js.map +1 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/harness.js +3 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/harness.js.map +1 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/hf-fetcher.d.ts +74 -5
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/hf-fetcher.js +103 -32
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/hf-fetcher.js.map +1 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/index.d.ts +2 -2
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/index.js +3 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/index.js.map +1 -1
- package/dist/harnesses/readiness-registry.d.ts +7 -0
- package/dist/harnesses/readiness-registry.js +9 -0
- package/dist/harnesses/readiness-registry.js.map +1 -1
- package/dist/harnesses/types.d.ts +14 -0
- package/dist/learner/revert-decision.d.ts +74 -0
- package/dist/learner/revert-decision.js +73 -0
- package/dist/learner/revert-decision.js.map +1 -0
- package/dist/learner/revert-stats.d.ts +38 -0
- package/dist/learner/revert-stats.js +86 -0
- package/dist/learner/revert-stats.js.map +1 -0
- package/dist/local-provider-url.d.ts +3 -0
- package/dist/local-provider-url.js +28 -0
- package/dist/local-provider-url.js.map +1 -0
- package/dist/main.js +199 -104
- package/dist/main.js.map +1 -1
- package/dist/mcp/get-codedigest-reward.d.ts +13 -0
- package/dist/mcp/get-codedigest-reward.js +23 -0
- package/dist/mcp/get-codedigest-reward.js.map +1 -0
- package/dist/mcp/server.js +23 -0
- package/dist/mcp/server.js.map +1 -1
- package/dist/observability/debug-report-assemble.d.ts +43 -0
- package/dist/observability/debug-report-assemble.js +80 -0
- package/dist/observability/debug-report-assemble.js.map +1 -0
- package/dist/observability/emit-event.d.ts +9 -2
- package/dist/observability/emit-event.js +36 -2
- package/dist/observability/emit-event.js.map +1 -1
- package/dist/observability/file-logger.d.ts +69 -0
- package/dist/observability/file-logger.js +177 -0
- package/dist/observability/file-logger.js.map +1 -0
- package/dist/observability/redact-secrets.d.ts +65 -0
- package/dist/observability/redact-secrets.js +300 -0
- package/dist/observability/redact-secrets.js.map +1 -0
- package/dist/observability/tar.d.ts +30 -0
- package/dist/observability/tar.js +102 -0
- package/dist/observability/tar.js.map +1 -0
- package/dist/plugins/learner/.claude-plugin/plugin.json +1 -1
- package/dist/plugins/learner/.codex-plugin/plugin.json +1 -1
- package/dist/plugins/learner/hooks/session-start +30 -1
- package/dist/plugins/learner/skills/learn/consolidator-prompt.md +22 -1
- package/dist/plugins/learner/skills/learn/promoter-prompt.md +72 -1
- package/dist/preflight/deployment-readiness.d.ts +147 -0
- package/dist/preflight/deployment-readiness.js +366 -0
- package/dist/preflight/deployment-readiness.js.map +1 -0
- package/dist/preflight/pidfile-liveness.d.ts +50 -0
- package/dist/preflight/pidfile-liveness.js +117 -0
- package/dist/preflight/pidfile-liveness.js.map +1 -0
- package/dist/preflight/rpc-network.d.ts +40 -0
- package/dist/preflight/rpc-network.js +67 -1
- package/dist/preflight/rpc-network.js.map +1 -1
- package/dist/rpc/transport.d.ts +145 -0
- package/dist/rpc/transport.js +319 -0
- package/dist/rpc/transport.js.map +1 -0
- package/dist/scripts/donation-consumption-acceptance.js +7 -28
- package/dist/scripts/donation-consumption-acceptance.js.map +1 -1
- package/dist/scripts/swe-rebench-v2-pytest-missing.json +16 -0
- package/dist/solver-nets/prediction-operator-ux.d.ts +1 -2
- package/dist/solver-nets/prediction-operator-ux.js +56 -53
- package/dist/solver-nets/prediction-operator-ux.js.map +1 -1
- package/dist/solver-nets/registry.d.ts +19 -1
- package/dist/solver-nets/registry.js +37 -24
- package/dist/solver-nets/registry.js.map +1 -1
- package/dist/solver-types/_swe-rebench-v2-held-out-slate.d.ts +76 -0
- package/dist/solver-types/_swe-rebench-v2-held-out-slate.js +156 -0
- package/dist/solver-types/_swe-rebench-v2-held-out-slate.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-pool-recovery.d.ts +81 -0
- package/dist/solver-types/_swe-rebench-v2-pool-recovery.js +116 -0
- package/dist/solver-types/_swe-rebench-v2-pool-recovery.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-pool.d.ts +9 -2
- package/dist/solver-types/_swe-rebench-v2-pool.js +15 -20
- package/dist/solver-types/_swe-rebench-v2-pool.js.map +1 -1
- package/dist/solver-types/_swe-rebench-v2-state.d.ts +24 -0
- package/dist/solver-types/_swe-rebench-v2-state.js +33 -0
- package/dist/solver-types/_swe-rebench-v2-state.js.map +1 -1
- package/dist/solver-types/_swe-rebench-v2-validated-pool.d.ts +116 -2
- package/dist/solver-types/_swe-rebench-v2-validated-pool.js +296 -21
- package/dist/solver-types/_swe-rebench-v2-validated-pool.js.map +1 -1
- package/dist/solver-types/slates/held-out-slate.swe-rebench-v2.v1.json +20 -0
- package/dist/solver-types/slates/held-out-slate.swe-rebench-v2.v2.json +19 -0
- package/dist/solver-types/slates/held-out-slate.swe-rebench-v2.v2.screening-report.json +628 -0
- package/dist/solver-types/solver-type.d.ts +8 -0
- package/dist/solver-types/swe-rebench-v2-auto.d.ts +20 -11
- package/dist/solver-types/swe-rebench-v2-auto.js +64 -19
- package/dist/solver-types/swe-rebench-v2-auto.js.map +1 -1
- package/dist/solver-types/swe-rebench-v2.d.ts +10 -2
- package/dist/solver-types/swe-rebench-v2.js +233 -13
- package/dist/solver-types/swe-rebench-v2.js.map +1 -1
- package/dist/solvernets/daemon-init.d.ts +1 -1
- package/dist/solvernets/daemon-init.js +19 -4
- package/dist/solvernets/daemon-init.js.map +1 -1
- package/dist/solvernets/launched-record-dispatcher.d.ts +7 -0
- package/dist/solvernets/launched-record-dispatcher.js +10 -4
- package/dist/solvernets/launched-record-dispatcher.js.map +1 -1
- package/dist/solvernets/registry-client-erc8004.js +40 -37
- package/dist/solvernets/registry-client-erc8004.js.map +1 -1
- package/dist/solvernets/registry-client.d.ts +6 -0
- package/dist/solvernets/store.d.ts +2 -2
- package/dist/solvernets/store.js +7 -2
- package/dist/solvernets/store.js.map +1 -1
- package/dist/spend/ai-units-config.d.ts +49 -0
- package/dist/spend/ai-units-config.js +34 -0
- package/dist/spend/ai-units-config.js.map +1 -0
- package/dist/spend/ai-units.d.ts +140 -0
- package/dist/spend/ai-units.js +229 -0
- package/dist/spend/ai-units.js.map +1 -0
- package/dist/spend/cost-surface-status.d.ts +12 -0
- package/dist/spend/cost-surface-status.js +24 -0
- package/dist/spend/cost-surface-status.js.map +1 -0
- package/dist/spend/credential.d.ts +39 -0
- package/dist/spend/credential.js +71 -0
- package/dist/spend/credential.js.map +1 -0
- package/dist/spend/daemon-config.d.ts +13 -0
- package/dist/spend/daemon-config.js +24 -0
- package/dist/spend/daemon-config.js.map +1 -0
- package/dist/spend/pricing.d.ts +16 -0
- package/dist/spend/pricing.js +26 -0
- package/dist/spend/pricing.js.map +1 -0
- package/dist/spend/record.d.ts +13 -0
- package/dist/spend/record.js +43 -0
- package/dist/spend/record.js.map +1 -0
- package/dist/spend/usage.d.ts +27 -0
- package/dist/spend/usage.js +113 -0
- package/dist/spend/usage.js.map +1 -0
- package/dist/store/store.d.ts +187 -0
- package/dist/store/store.js +467 -4
- package/dist/store/store.js.map +1 -1
- package/dist/trajectory/transcript-parsers/codex-session.d.ts +12 -6
- package/dist/trajectory/transcript-parsers/codex-session.js +114 -13
- package/dist/trajectory/transcript-parsers/codex-session.js.map +1 -1
- package/dist/trajectory/transcript-parsers/types.d.ts +8 -8
- package/dist/trajectory/transcript-session-dirs.d.ts +18 -0
- package/dist/trajectory/transcript-session-dirs.js +85 -0
- package/dist/trajectory/transcript-session-dirs.js.map +1 -0
- package/dist/trajectory/transcript-watcher.d.ts +20 -1
- package/dist/trajectory/transcript-watcher.js +108 -32
- package/dist/trajectory/transcript-watcher.js.map +1 -1
- package/dist/tx-retry.d.ts +25 -0
- package/dist/tx-retry.js +95 -7
- package/dist/tx-retry.js.map +1 -1
- package/dist/types/payloads/portfolio-v0.d.ts +3 -3
- package/dist/types/payloads/prediction-apy-v0.d.ts +3 -3
- package/dist/types/payloads/prediction-v0.d.ts +12 -12
- package/dist/vendor/@jinn-network/sdk/dist/payloads/swe-rebench-v2.d.ts +108 -1
- package/dist/vendor/@jinn-network/sdk/dist/payloads/swe-rebench-v2.js +25 -1
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/swe-rebench-v2-held-out-slate.d.ts +65 -0
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/swe-rebench-v2-held-out-slate.js +123 -0
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/swe-rebench-v2.d.ts +2 -2
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/swe-rebench-v2.js +1 -1
- package/dist/vendor/@jinn-network/sdk/package.json +4 -0
- package/docker-compose.yml +3 -2
- package/package.json +30 -18
- package/plugins/learner/.claude-plugin/plugin.json +1 -1
- package/plugins/learner/.codex-plugin/plugin.json +1 -1
- package/plugins/learner/hooks/session-start +30 -1
- package/plugins/learner/skills/learn/consolidator-prompt.md +22 -1
- package/plugins/learner/skills/learn/promoter-prompt.md +72 -1
- package/plugins/swe-rebench-v2-diffmin/README.md +10 -9
- package/plugins/swe-rebench-v2-diffmin/jinn.plugin.json +1 -1
- package/plugins/swe-rebench-v2-diffmin/skills/diffmin/SKILL.md +15 -10
- package/plugins/swe-rebench-v2-diffmin/skills/test-map/SKILL.md +10 -12
- package/plugins/swe-rebench-v2-runtime/.claude-plugin/plugin.json +1 -1
- package/plugins/swe-rebench-v2-runtime/.codex-plugin/plugin.json +3 -3
- package/plugins/swe-rebench-v2-runtime/README.md +6 -6
- package/plugins/swe-rebench-v2-runtime/hooks/hooks.json +16 -0
- package/plugins/swe-rebench-v2-runtime/hooks/session-start +74 -0
- package/plugins/swe-rebench-v2-runtime/jinn.plugin.json +2 -3
- package/plugins/swe-rebench-v2-runtime/skills/task/SKILL.md +81 -0
- package/dist/dashboard/assets/index-BUlE8F3Y.js +0 -330
- package/dist/dashboard/assets/index-blqc7eqq.css +0 -32
- package/plugins/swe-rebench-v2-runtime/skills/orient/SKILL.md +0 -29
- package/plugins/swe-rebench-v2-runtime/skills/plan/SKILL.md +0 -53
package/dist/config.js
CHANGED
|
@@ -18,15 +18,10 @@ import { homedir } from 'node:os';
|
|
|
18
18
|
import { dirname, join } from 'node:path';
|
|
19
19
|
import { z } from 'zod';
|
|
20
20
|
import { TaskSchema, parseTask } from './types/task.js';
|
|
21
|
-
import { canonicalHarnessName
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
* migration burden. Fresh installs no longer seed the `prediction` entry;
|
|
26
|
-
* the operator joins SolverNets through the registry (Task 21's
|
|
27
|
-
* `joinedSolverNets` block).
|
|
28
|
-
*/
|
|
29
|
-
export const DEFAULT_SOLVER_NETS = {};
|
|
21
|
+
import { canonicalHarnessName } from './harnesses/names.js';
|
|
22
|
+
import { parseRpcUrls } from './rpc/transport.js';
|
|
23
|
+
import { canonicalLocalHttpBaseUrl } from './local-provider-url.js';
|
|
24
|
+
// ── Schema ──────────────────────────────────────────────────────────────────
|
|
30
25
|
const HarnessNameSchema = z.string().transform((name) => canonicalHarnessName(name));
|
|
31
26
|
export const JinnConfigSchema = z.object({
|
|
32
27
|
/**
|
|
@@ -38,19 +33,36 @@ export const JinnConfigSchema = z.object({
|
|
|
38
33
|
*/
|
|
39
34
|
network: z.enum(['mainnet', 'testnet']).default('testnet'),
|
|
40
35
|
/**
|
|
41
|
-
* Base RPC endpoint.
|
|
42
|
-
*
|
|
43
|
-
*
|
|
36
|
+
* Base RPC endpoint(s). Accepts either a single URL string or an array of
|
|
37
|
+
* URLs. When an array (or a comma-separated env var) is supplied, the
|
|
38
|
+
* daemon builds a viem `fallback()` chain in slot order (primary first).
|
|
39
|
+
* See `client/src/rpc/transport.ts` for the wrapper. Defaults to the
|
|
40
|
+
* publicnode+sepolia.base.org two-provider chain on testnet and the public
|
|
41
|
+
* `mainnet.base.org` on mainnet. Set explicitly to override.
|
|
42
|
+
*
|
|
43
|
+
* Env: JINN_RPC_URL / BASE_SEPOLIA_RPC_URL / BASE_RPC_URL (comma-separated).
|
|
44
44
|
*/
|
|
45
|
-
rpcUrl: z.string().optional(),
|
|
46
|
-
archiveRpcUrl: z.string().optional(),
|
|
45
|
+
rpcUrl: z.union([z.string(), z.array(z.string()).min(1)]).optional(),
|
|
46
|
+
archiveRpcUrl: z.union([z.string(), z.array(z.string()).min(1)]).optional(),
|
|
47
47
|
/**
|
|
48
|
-
* Optional L2 proof/archive RPC endpoint for canonical cross-chain canaries.
|
|
48
|
+
* Optional L2 proof/archive RPC endpoint(s) for canonical cross-chain canaries.
|
|
49
49
|
* The daemon can use its normal rpcUrl for writes while proof construction
|
|
50
50
|
* uses this endpoint for historical eth_getProof at OP dispute-game blocks.
|
|
51
|
-
* Env: JINN_L2_PROOF_RPC_URL.
|
|
51
|
+
* Accepts string or array form (see rpcUrl). Env: JINN_L2_PROOF_RPC_URL.
|
|
52
52
|
*/
|
|
53
|
-
l2ProofRpcUrl: z.string().
|
|
53
|
+
l2ProofRpcUrl: z.union([z.string(), z.array(z.string()).min(1)]).optional(),
|
|
54
|
+
/**
|
|
55
|
+
* Single volume-aware durable-state root. When set (env JINN_STATE_DIR or
|
|
56
|
+
* this file field), `earningDir`, `dbPath`, `engine.implStateDirRoot`, and
|
|
57
|
+
* the swe-rebench-v2 pool dir derive from it as `<stateDir>/<subdir>` —
|
|
58
|
+
* UNLESS each is individually overridden, in which case the per-key value
|
|
59
|
+
* wins (derive-don't-collapse). With `stateDir` unset, every default is
|
|
60
|
+
* byte-identical to the legacy `~/.jinn-client/<subdir>` paths. Hosted
|
|
61
|
+
* deploys collapse four ENV lines to one `JINN_STATE_DIR=/data`.
|
|
62
|
+
* `engine.workingDirRoot` is deliberately NOT derived — it stays ephemeral
|
|
63
|
+
* (reaped per-task).
|
|
64
|
+
*/
|
|
65
|
+
stateDir: z.string().optional(),
|
|
54
66
|
/** Earning state directory */
|
|
55
67
|
earningDir: z.string().default(join(homedir(), '.jinn-client', 'earning')),
|
|
56
68
|
/** SQLite database path */
|
|
@@ -106,6 +118,22 @@ export const JinnConfigSchema = z.object({
|
|
|
106
118
|
hermesModel: z.string().optional(),
|
|
107
119
|
/** Hermes provider (e.g. 'anthropic'). */
|
|
108
120
|
hermesProvider: z.string().optional(),
|
|
121
|
+
/** Local OpenAI-compatible Hermes base URL, e.g. http://127.0.0.1:11434/v1 for Ollama. */
|
|
122
|
+
hermesBaseUrl: z
|
|
123
|
+
.string()
|
|
124
|
+
.url()
|
|
125
|
+
.transform((value, ctx) => {
|
|
126
|
+
const canonical = canonicalLocalHttpBaseUrl(value);
|
|
127
|
+
if (!canonical) {
|
|
128
|
+
ctx.addIssue({
|
|
129
|
+
code: z.ZodIssueCode.custom,
|
|
130
|
+
message: 'hermesBaseUrl must be a local HTTP(S) URL',
|
|
131
|
+
});
|
|
132
|
+
return z.NEVER;
|
|
133
|
+
}
|
|
134
|
+
return canonical;
|
|
135
|
+
})
|
|
136
|
+
.optional(),
|
|
109
137
|
/**
|
|
110
138
|
* Timeout in ms for `hermes doctor` health-check runs.
|
|
111
139
|
* Default 30 000 ms. Env: JINN_HERMES_DOCTOR_TIMEOUT_MS.
|
|
@@ -164,6 +192,17 @@ export const JinnConfigSchema = z.object({
|
|
|
164
192
|
* backlog while proving one fresh task path.
|
|
165
193
|
*/
|
|
166
194
|
taskDiscoveryAllowedTaskIds: z.array(z.string()).optional(),
|
|
195
|
+
/**
|
|
196
|
+
* Explicit absolute lower bound (L2 block number) for the mech adapter's
|
|
197
|
+
* on-chain TaskCreated backlog scan. Unset → the scan defaults to a bounded
|
|
198
|
+
* rolling window (`head − DEFAULT_ONCHAIN_SCAN_WINDOW_BLOCKS`, ~28h on Base),
|
|
199
|
+
* so a restart no longer replays full chain history every boot (#801); the
|
|
200
|
+
* indexer (DiscoveryAPI.findClaimableTasks) is the primary discovery path and
|
|
201
|
+
* the on-chain scan is a bounded backstop. Set this to widen the backstop to a
|
|
202
|
+
* specific block (the value pins both the scan start and the gh #300 admission
|
|
203
|
+
* floor). Env: JINN_TASK_DISCOVERY_FROM_BLOCK.
|
|
204
|
+
*/
|
|
205
|
+
taskDiscoveryOnchainFromBlock: z.number().int().min(0).optional(),
|
|
167
206
|
/** This node's public HTTP endpoint (for 8004 registration) */
|
|
168
207
|
nodeEndpoint: z.string().optional(),
|
|
169
208
|
/** Tasks to create and solve. Empty by default; enabled SolverNet generators fill the loop. */
|
|
@@ -195,18 +234,19 @@ export const JinnConfigSchema = z.object({
|
|
|
195
234
|
jinnMviL2DeploymentPath: z.string().optional(),
|
|
196
235
|
// ── Cross-chain claim loop (Phase B / jinn-mono-7x5) ─────────────────────
|
|
197
236
|
/**
|
|
198
|
-
* RPC endpoint for the L1 governance chain (Ethereum / Sepolia) where
|
|
199
|
-
* JinnDistributor lives.
|
|
200
|
-
*
|
|
201
|
-
*
|
|
237
|
+
* RPC endpoint(s) for the L1 governance chain (Ethereum / Sepolia) where
|
|
238
|
+
* the JinnDistributor lives. Accepts string or array form (see rpcUrl) and
|
|
239
|
+
* supports comma-separated env values. Testnet defaults to a public Sepolia
|
|
240
|
+
* RPC; mainnet requires an operator override when L1 submit mode is
|
|
241
|
+
* configured. Env: JINN_ETHEREUM_RPC_URL.
|
|
202
242
|
*/
|
|
203
|
-
ethereumRpcUrl: z.string().
|
|
243
|
+
ethereumRpcUrl: z.union([z.string(), z.array(z.string()).min(1)]).optional(),
|
|
204
244
|
/**
|
|
205
|
-
* Optional archive RPC endpoint for the L1 governance chain. Used for
|
|
206
|
-
* historical block lookups when constructing canonical-mode proofs.
|
|
207
|
-
* Env: JINN_ETHEREUM_ARCHIVE_RPC_URL.
|
|
245
|
+
* Optional archive RPC endpoint(s) for the L1 governance chain. Used for
|
|
246
|
+
* historical block lookups when constructing canonical-mode proofs. Accepts
|
|
247
|
+
* string or array form. Env: JINN_ETHEREUM_ARCHIVE_RPC_URL.
|
|
208
248
|
*/
|
|
209
|
-
ethereumArchiveRpcUrl: z.string().
|
|
249
|
+
ethereumArchiveRpcUrl: z.union([z.string(), z.array(z.string()).min(1)]).optional(),
|
|
210
250
|
/**
|
|
211
251
|
* L1 network used by the cross-chain claim loop. 'sepolia' tracks Base
|
|
212
252
|
* Sepolia testnet; 'ethereum' tracks Base mainnet. Defaults to 'sepolia'
|
|
@@ -354,69 +394,7 @@ export const JinnConfigSchema = z.object({
|
|
|
354
394
|
})
|
|
355
395
|
.default({ mode: 'train' }),
|
|
356
396
|
/**
|
|
357
|
-
*
|
|
358
|
-
*
|
|
359
|
-
* Each entry's `roles` is a non-empty subset of `['solving', 'evaluating']`.
|
|
360
|
-
* Multiple roles can run concurrently for the same SolverNet; the
|
|
361
|
-
* protocol-level `disallowSolverSelfEvaluation` flag prevents the operator
|
|
362
|
-
* from evaluating its own Solutions and the on-chain
|
|
363
|
-
* TaskActivityCheckerV3 tracks Solution and Verdict counters independently
|
|
364
|
-
* (additive into `eligibleActivityWeight`).
|
|
365
|
-
*
|
|
366
|
-
* Launcher ownership lives in the launched-record subsystem
|
|
367
|
-
* (spec/2026-05-05-solvernet-creation-and-launch.md §11), not in operator
|
|
368
|
-
* config — there is no `'launching'` operator role. Legacy entries that
|
|
369
|
-
* include `'launching'` in `roles` have it stripped by the preprocessor so
|
|
370
|
-
* older config files keep loading.
|
|
371
|
-
*
|
|
372
|
-
* Backwards-compat: a legacy `role: 'solving' | 'evaluating'` field is
|
|
373
|
-
* auto-promoted to `roles: [<role>]` by the zod preprocessor below so
|
|
374
|
-
* existing `~/.jinn-client/config.json` files keep loading without an
|
|
375
|
-
* operator migration step.
|
|
376
|
-
*/
|
|
377
|
-
solverNets: z.record(z.preprocess((raw) => {
|
|
378
|
-
if (typeof raw !== 'object' || raw === null)
|
|
379
|
-
return raw;
|
|
380
|
-
const obj = raw;
|
|
381
|
-
// Promote legacy `role: X` → `roles: [X]` when only the singular form
|
|
382
|
-
// is provided. If both are present (mid-migration third-party config),
|
|
383
|
-
// `roles` wins and `role` is dropped.
|
|
384
|
-
if (Array.isArray(obj['roles']) && obj['roles'].length > 0) {
|
|
385
|
-
// Drop legacy `'launching'` entries — operator config no longer
|
|
386
|
-
// carries the launcher role; ownership is via launched records.
|
|
387
|
-
const filteredRoles = obj['roles'].filter((r) => r !== 'launching');
|
|
388
|
-
const { role: _legacyRole, ...rest } = obj;
|
|
389
|
-
return { ...rest, roles: filteredRoles };
|
|
390
|
-
}
|
|
391
|
-
if (typeof obj['role'] === 'string' && (obj['role'] === 'solving' || obj['role'] === 'evaluating')) {
|
|
392
|
-
const { role, ...rest } = obj;
|
|
393
|
-
return { ...rest, roles: [role] };
|
|
394
|
-
}
|
|
395
|
-
return obj;
|
|
396
|
-
}, z.object({
|
|
397
|
-
enabled: z.boolean().default(true),
|
|
398
|
-
solverType: z.string(),
|
|
399
|
-
roles: z.array(z.enum(['solving', 'evaluating']))
|
|
400
|
-
.min(1, 'each SolverNet must enable at least one role')
|
|
401
|
-
.default(['solving'])
|
|
402
|
-
// Deduplicate to keep downstream consumers simple.
|
|
403
|
-
.transform((arr) => Array.from(new Set(arr))),
|
|
404
|
-
harness: HarnessNameSchema.default(CLAUDE_CODE_HARNESS),
|
|
405
|
-
model: z.string().optional(),
|
|
406
|
-
plugins: z.array(z.union([
|
|
407
|
-
z.string(),
|
|
408
|
-
z.object({
|
|
409
|
-
name: z.string().optional(),
|
|
410
|
-
source: z.string(),
|
|
411
|
-
version: z.string().optional(),
|
|
412
|
-
}),
|
|
413
|
-
])).default([]),
|
|
414
|
-
taskGenerator: z.object({
|
|
415
|
-
enabled: z.boolean().default(true),
|
|
416
|
-
}).default({ enabled: true }),
|
|
417
|
-
}))).default(DEFAULT_SOLVER_NETS),
|
|
418
|
-
/**
|
|
419
|
-
* Manifest-keyed joined SolverNets (Task 21).
|
|
397
|
+
* Manifest-keyed joined SolverNets.
|
|
420
398
|
*
|
|
421
399
|
* Spec: spec/2026-05-05-solvernet-creation-and-launch.md §12.
|
|
422
400
|
*
|
|
@@ -425,10 +403,10 @@ export const JinnConfigSchema = z.object({
|
|
|
425
403
|
* (CIDv0 / CIDv1) — the only stable identifier that maps back to a
|
|
426
404
|
* launched-instance authority across launchers.
|
|
427
405
|
*
|
|
428
|
-
*
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
*
|
|
406
|
+
* The daemon narrows this block into runtime SolverNet registry entries on
|
|
407
|
+
* restart. Legacy short-name-keyed `solverNets` blocks on operator config
|
|
408
|
+
* files are auto-migrated into synthetic `legacy:<short-name>`-keyed
|
|
409
|
+
* entries at load time (see `migrateLegacySolverNets`).
|
|
432
410
|
*/
|
|
433
411
|
joinedSolverNets: z
|
|
434
412
|
.record(z.string(), z.object({
|
|
@@ -572,6 +550,33 @@ export const JinnConfigSchema = z.object({
|
|
|
572
550
|
* Env: JINN_REPUTATION_ENABLED
|
|
573
551
|
*/
|
|
574
552
|
reputationEnabled: z.boolean().default(false),
|
|
553
|
+
/**
|
|
554
|
+
* Per-credential daily spend caps (USD). Keys are credential identifiers
|
|
555
|
+
* (e.g. `'anthropic:api-key'`); values are positive numbers representing
|
|
556
|
+
* the maximum USD spend per day for that credential.
|
|
557
|
+
*
|
|
558
|
+
* `JINN_SPEND_CAP_USD` (env-only, consumed directly by the spend-budget
|
|
559
|
+
* subsystem in Task 9) is tracked for provenance in TRACKED_ENV_VARS below
|
|
560
|
+
* but is NOT a config-file field and has no entry in this schema.
|
|
561
|
+
*/
|
|
562
|
+
spendCaps: z.record(z.string(), z.number().positive()).optional(),
|
|
563
|
+
/**
|
|
564
|
+
* Operator-local SolverPlugin trust state.
|
|
565
|
+
*
|
|
566
|
+
* `blockedCids` is the list of plug-in CIDs the operator has chosen to
|
|
567
|
+
* refuse to load — populated by `jinn solver-plugins block <cid>` and read
|
|
568
|
+
* at daemon startup. The block list complements the on-chain
|
|
569
|
+
* `giveFeedback(score=0)` write (which is the public-trust signal); the
|
|
570
|
+
* local list is the operator's own refusal to execute, applied even when
|
|
571
|
+
* the network write fails. File-managed only — no env override.
|
|
572
|
+
*
|
|
573
|
+
* See spec/2026-05-26-117-design.md "Failure modes" and "Local-only effects".
|
|
574
|
+
*/
|
|
575
|
+
solverPlugins: z
|
|
576
|
+
.object({
|
|
577
|
+
blockedCids: z.array(z.string()).default([]),
|
|
578
|
+
})
|
|
579
|
+
.default({ blockedCids: [] }),
|
|
575
580
|
}).refine((cfg) => cfg.jinnClaimSubmissionMode !== 'submit' ||
|
|
576
581
|
!cfg.jinnDistributorAddress ||
|
|
577
582
|
!!cfg.ethereumRpcUrl, {
|
|
@@ -596,6 +601,20 @@ export const DEFAULT_CONFIG_PATH = join(DEFAULT_DIR, 'config.json');
|
|
|
596
601
|
*/
|
|
597
602
|
export const DEFAULT_TESTNET_DISCOVERY_URL = 'https://jinn-indexer-production.up.railway.app';
|
|
598
603
|
export const DEFAULT_TESTNET_ETHEREUM_RPC_URL = 'https://ethereum-sepolia-rpc.publicnode.com';
|
|
604
|
+
/**
|
|
605
|
+
* Default fallback chain for the L2 measurement chain (Base Sepolia) on
|
|
606
|
+
* testnet. Per AC2 of issue #592:
|
|
607
|
+
* slot 0 — `https://base-sepolia.publicnode.com` (no-auth, 50k-block
|
|
608
|
+
* getLogs cap, no shared-quota cliff).
|
|
609
|
+
* slot 1 — `https://sepolia.base.org` (free public Coinbase endpoint,
|
|
610
|
+
* 2k-block cap; last-resort backup).
|
|
611
|
+
* Operators are encouraged to prepend a paid primary key (Alchemy, Tenderly,
|
|
612
|
+
* etc.) via `rpcUrl` config or `JINN_RPC_URL` / `BASE_SEPOLIA_RPC_URL` env.
|
|
613
|
+
*/
|
|
614
|
+
export const DEFAULT_TESTNET_RPC_URLS = [
|
|
615
|
+
'https://base-sepolia.publicnode.com',
|
|
616
|
+
'https://sepolia.base.org',
|
|
617
|
+
];
|
|
599
618
|
export class ConfigLoadError extends Error {
|
|
600
619
|
code;
|
|
601
620
|
details;
|
|
@@ -606,7 +625,93 @@ export class ConfigLoadError extends Error {
|
|
|
606
625
|
this.details = details;
|
|
607
626
|
}
|
|
608
627
|
}
|
|
609
|
-
|
|
628
|
+
/**
|
|
629
|
+
* Parse a legacy `<id>.<version>` solverType string into `{id, version}`.
|
|
630
|
+
* Falls back to `{ id: fallbackId, version: 'v1' }` when the string lacks a
|
|
631
|
+
* dot or terminates in one — this happens only on hand-edited operator
|
|
632
|
+
* configs and keeps the migration loud-but-non-fatal.
|
|
633
|
+
*/
|
|
634
|
+
function parseSolverTypeRef(solverType, fallbackId) {
|
|
635
|
+
if (typeof solverType !== 'string') {
|
|
636
|
+
return { id: fallbackId, version: 'v1' };
|
|
637
|
+
}
|
|
638
|
+
const dot = solverType.lastIndexOf('.');
|
|
639
|
+
if (dot <= 0 || dot === solverType.length - 1) {
|
|
640
|
+
return { id: fallbackId, version: 'v1' };
|
|
641
|
+
}
|
|
642
|
+
return { id: solverType.slice(0, dot), version: solverType.slice(dot + 1) };
|
|
643
|
+
}
|
|
644
|
+
/**
|
|
645
|
+
* Translate any legacy short-name-keyed `solverNets` block on the raw parsed
|
|
646
|
+
* config into manifest-keyed `joinedSolverNets` entries with synthetic
|
|
647
|
+
* `legacy:<short-name>` keys.
|
|
648
|
+
*
|
|
649
|
+
* This is the auto-migration path for operators upgrading past issue #421.
|
|
650
|
+
* The runtime claim filter remains manifest-digest gated, so synthetic-keyed
|
|
651
|
+
* entries don't change task eligibility — they exist purely so the diagnostic
|
|
652
|
+
* surfaces (Overview SOLVING-ON eyebrow, prediction-operator-status) keep
|
|
653
|
+
* showing the operator's previous SolverNets until they re-join via the SPA.
|
|
654
|
+
*
|
|
655
|
+
* Returns the number of legacy entries migrated. Idempotent — calling on an
|
|
656
|
+
* already-migrated raw config is a no-op.
|
|
657
|
+
*
|
|
658
|
+
* @param raw — the JSON-parsed config file contents (mutated in place).
|
|
659
|
+
*/
|
|
660
|
+
export function migrateLegacySolverNets(raw) {
|
|
661
|
+
const legacy = raw['solverNets'];
|
|
662
|
+
if (!legacy || typeof legacy !== 'object' || Array.isArray(legacy)) {
|
|
663
|
+
return 0;
|
|
664
|
+
}
|
|
665
|
+
const entries = Object.entries(legacy);
|
|
666
|
+
if (entries.length === 0) {
|
|
667
|
+
delete raw['solverNets'];
|
|
668
|
+
return 0;
|
|
669
|
+
}
|
|
670
|
+
const joined = (typeof raw['joinedSolverNets'] === 'object' && raw['joinedSolverNets'] !== null && !Array.isArray(raw['joinedSolverNets']))
|
|
671
|
+
? raw['joinedSolverNets']
|
|
672
|
+
: {};
|
|
673
|
+
let migrated = 0;
|
|
674
|
+
for (const [name, entryRaw] of entries) {
|
|
675
|
+
if (!entryRaw || typeof entryRaw !== 'object')
|
|
676
|
+
continue;
|
|
677
|
+
const entry = entryRaw;
|
|
678
|
+
const syntheticKey = `legacy:${name}`;
|
|
679
|
+
// Do not overwrite a pre-existing joinedSolverNets entry under the same key.
|
|
680
|
+
if (joined[syntheticKey] !== undefined)
|
|
681
|
+
continue;
|
|
682
|
+
const contract = parseSolverTypeRef(entry.solverType, name);
|
|
683
|
+
const rolesIn = Array.isArray(entry.roles) && entry.roles.length > 0
|
|
684
|
+
? entry.roles
|
|
685
|
+
: ['solving'];
|
|
686
|
+
const roles = [];
|
|
687
|
+
for (const r of rolesIn) {
|
|
688
|
+
if (r === 'solving')
|
|
689
|
+
roles.push('solver');
|
|
690
|
+
else if (r === 'evaluating')
|
|
691
|
+
roles.push('evaluator');
|
|
692
|
+
// 'launching' (and any other unknown role) is dropped — operator config
|
|
693
|
+
// no longer carries the launcher role per spec §11.
|
|
694
|
+
}
|
|
695
|
+
if (roles.length === 0)
|
|
696
|
+
roles.push('solver');
|
|
697
|
+
joined[syntheticKey] = {
|
|
698
|
+
manifestCid: syntheticKey,
|
|
699
|
+
name,
|
|
700
|
+
contract,
|
|
701
|
+
roles: Array.from(new Set(roles)),
|
|
702
|
+
...(typeof entry.harness === 'string' ? { harness: entry.harness } : {}),
|
|
703
|
+
...(typeof entry.model === 'string' ? { model: entry.model } : {}),
|
|
704
|
+
plugins: Array.isArray(entry.plugins) ? entry.plugins : [],
|
|
705
|
+
disabledDefaultPlugins: [],
|
|
706
|
+
};
|
|
707
|
+
migrated += 1;
|
|
708
|
+
}
|
|
709
|
+
if (Object.keys(joined).length > 0) {
|
|
710
|
+
raw['joinedSolverNets'] = joined;
|
|
711
|
+
}
|
|
712
|
+
delete raw['solverNets'];
|
|
713
|
+
return migrated;
|
|
714
|
+
}
|
|
610
715
|
/**
|
|
611
716
|
* Load config with resolution: env > config file > defaults.
|
|
612
717
|
*
|
|
@@ -658,6 +763,9 @@ export function loadConfig(configPath) {
|
|
|
658
763
|
if (env['JINN_CHECKPOINT_INTERVAL_MS'] !== undefined) {
|
|
659
764
|
merged.checkpointIntervalMs = Number.parseInt(env['JINN_CHECKPOINT_INTERVAL_MS'], 10);
|
|
660
765
|
}
|
|
766
|
+
if (env['JINN_TASK_DISCOVERY_FROM_BLOCK'] !== undefined) {
|
|
767
|
+
merged.taskDiscoveryOnchainFromBlock = Number.parseInt(env['JINN_TASK_DISCOVERY_FROM_BLOCK'], 10);
|
|
768
|
+
}
|
|
661
769
|
if (env['JINN_API_PORT'])
|
|
662
770
|
merged.apiPort = parseInt(env['JINN_API_PORT'], 10);
|
|
663
771
|
if (env['JINN_API_BIND_HOST'])
|
|
@@ -672,6 +780,8 @@ export function loadConfig(configPath) {
|
|
|
672
780
|
merged.hermesModel = env['JINN_HERMES_MODEL'];
|
|
673
781
|
if (env['JINN_HERMES_PROVIDER'])
|
|
674
782
|
merged.hermesProvider = env['JINN_HERMES_PROVIDER'];
|
|
783
|
+
if (env['JINN_HERMES_BASE_URL'])
|
|
784
|
+
merged.hermesBaseUrl = env['JINN_HERMES_BASE_URL'];
|
|
675
785
|
if (env['JINN_HERMES_DOCTOR_TIMEOUT_MS']) {
|
|
676
786
|
merged.hermesDoctorTimeoutMs = parseInt(env['JINN_HERMES_DOCTOR_TIMEOUT_MS'], 10);
|
|
677
787
|
}
|
|
@@ -842,6 +952,28 @@ export function loadConfig(configPath) {
|
|
|
842
952
|
...(env['JINN_ENGINE_IMPL_STATE_DIR_ROOT'] ? { implStateDirRoot: env['JINN_ENGINE_IMPL_STATE_DIR_ROOT'] } : {}),
|
|
843
953
|
};
|
|
844
954
|
}
|
|
955
|
+
// JINN_STATE_DIR: single volume-aware root. Runs AFTER all per-key env
|
|
956
|
+
// overrides above are applied into `merged` and BEFORE safeParse — so a
|
|
957
|
+
// still-`undefined` per-key value means neither file nor env set it. Per-key
|
|
958
|
+
// precedence: explicit (file or env, already in `merged`) > <stateDir>/<subdir>
|
|
959
|
+
// > legacy default (filled by the schema / engine assembly when still absent).
|
|
960
|
+
// workingDirRoot is deliberately NOT derived — it stays ephemeral.
|
|
961
|
+
const stateDir = env['JINN_STATE_DIR']
|
|
962
|
+
?? (typeof merged['stateDir'] === 'string' ? merged['stateDir'] : undefined);
|
|
963
|
+
if (stateDir) {
|
|
964
|
+
merged['stateDir'] = stateDir;
|
|
965
|
+
if (merged['earningDir'] === undefined)
|
|
966
|
+
merged['earningDir'] = join(stateDir, 'earning');
|
|
967
|
+
if (merged['dbPath'] === undefined)
|
|
968
|
+
merged['dbPath'] = join(stateDir, 'jinn.db');
|
|
969
|
+
const engineObj = (typeof merged['engine'] === 'object' && merged['engine'] !== null)
|
|
970
|
+
? merged['engine']
|
|
971
|
+
: {};
|
|
972
|
+
if (engineObj['implStateDirRoot'] === undefined) {
|
|
973
|
+
engineObj['implStateDirRoot'] = join(stateDir, 'engine', 'impl-state');
|
|
974
|
+
merged['engine'] = engineObj;
|
|
975
|
+
}
|
|
976
|
+
}
|
|
845
977
|
const resolvedNetwork = merged.network === 'testnet' ? 'testnet' : 'mainnet';
|
|
846
978
|
// Testnet default: point discovery at the privately-operated Ponder indexer
|
|
847
979
|
// (jinn-mono-280n.4), unless the operator has set their own `discovery` block.
|
|
@@ -911,6 +1043,17 @@ export function loadConfig(configPath) {
|
|
|
911
1043
|
});
|
|
912
1044
|
}
|
|
913
1045
|
}
|
|
1046
|
+
// Auto-migrate any legacy short-name-keyed `solverNets` block into
|
|
1047
|
+
// `joinedSolverNets` with synthetic `legacy:<name>` keys. Operators upgrade
|
|
1048
|
+
// without an explicit action; the warning surfaces the migration so they
|
|
1049
|
+
// know to re-join via the SPA when they want a real manifest CID. See
|
|
1050
|
+
// spec/2026-05-25-retire-legacy-solvernets-config.md and issue #421.
|
|
1051
|
+
const migratedCount = migrateLegacySolverNets(merged);
|
|
1052
|
+
if (migratedCount > 0) {
|
|
1053
|
+
console.warn(`[config] Migrated ${migratedCount} legacy solverNets ${migratedCount === 1 ? 'entry' : 'entries'} to joinedSolverNets. ` +
|
|
1054
|
+
'Open Operator > SolverNets in the dashboard to re-join via the registry ' +
|
|
1055
|
+
'(replaces the synthetic legacy:* keys with real manifest CIDs).');
|
|
1056
|
+
}
|
|
914
1057
|
// 3. Validate
|
|
915
1058
|
const result = JinnConfigSchema.safeParse(merged);
|
|
916
1059
|
if (!result.success) {
|
|
@@ -922,21 +1065,56 @@ export function loadConfig(configPath) {
|
|
|
922
1065
|
});
|
|
923
1066
|
}
|
|
924
1067
|
// 4. Resolve rpcUrl default based on network (if not explicitly set).
|
|
925
|
-
// Testnet default
|
|
926
|
-
//
|
|
927
|
-
//
|
|
928
|
-
//
|
|
929
|
-
//
|
|
930
|
-
//
|
|
931
|
-
// The sibling Ethereum L1
|
|
932
|
-
// is already publicnode —
|
|
1068
|
+
// Testnet default per AC2 (issue #592) is a two-provider fallback chain:
|
|
1069
|
+
// slot 0 — base-sepolia.publicnode.com (50k-block getLogs cap, no quota)
|
|
1070
|
+
// slot 1 — sepolia.base.org (free, 2k-block cap; last-resort backup)
|
|
1071
|
+
// Publicnode is no-auth, no shared-key quota cliff (avoids the Tenderly
|
|
1072
|
+
// shared-quota cliff of 2026-05-24 that took out every default-config
|
|
1073
|
+
// daemon at once). See #554 + the NetworkSection.tsx "shared RPC" panel for
|
|
1074
|
+
// the operator-facing pitch to bring their own key. The sibling Ethereum L1
|
|
1075
|
+
// default (DEFAULT_TESTNET_ETHEREUM_RPC_URL above) is already publicnode —
|
|
1076
|
+
// this keeps the two L1/L2 defaults symmetric.
|
|
933
1077
|
const parsed = result.data;
|
|
934
|
-
const
|
|
935
|
-
?
|
|
936
|
-
: 'https://mainnet.base.org';
|
|
1078
|
+
const defaultRpcUrls = parsed.network === 'testnet'
|
|
1079
|
+
? DEFAULT_TESTNET_RPC_URLS
|
|
1080
|
+
: ['https://mainnet.base.org'];
|
|
1081
|
+
const rpcUrlsResolved = parsed.rpcUrl !== undefined
|
|
1082
|
+
? parseRpcUrls(parsed.rpcUrl)
|
|
1083
|
+
: [...defaultRpcUrls];
|
|
1084
|
+
const archiveRpcUrlsResolved = parsed.archiveRpcUrl !== undefined
|
|
1085
|
+
? parseRpcUrls(parsed.archiveRpcUrl)
|
|
1086
|
+
: undefined;
|
|
1087
|
+
const l2ProofRpcUrlsResolved = parsed.l2ProofRpcUrl !== undefined
|
|
1088
|
+
? parseRpcUrls(parsed.l2ProofRpcUrl)
|
|
1089
|
+
: undefined;
|
|
1090
|
+
const ethereumRpcUrlsResolved = parsed.ethereumRpcUrl !== undefined
|
|
1091
|
+
? parseRpcUrls(parsed.ethereumRpcUrl)
|
|
1092
|
+
: undefined;
|
|
1093
|
+
const ethereumArchiveRpcUrlsResolved = parsed.ethereumArchiveRpcUrl !== undefined
|
|
1094
|
+
? parseRpcUrls(parsed.ethereumArchiveRpcUrl)
|
|
1095
|
+
: undefined;
|
|
1096
|
+
// Strip the union-typed (string | string[]) RPC fields from `parsed` — the
|
|
1097
|
+
// returned shape carries the resolved head URL plus a `*Urls` array instead.
|
|
1098
|
+
const { rpcUrl: _rpcUrl, archiveRpcUrl: _archiveRpcUrl, l2ProofRpcUrl: _l2ProofRpcUrl, ethereumRpcUrl: _ethereumRpcUrl, ethereumArchiveRpcUrl: _ethereumArchiveRpcUrl, ...rest } = parsed;
|
|
937
1099
|
return {
|
|
938
|
-
...
|
|
939
|
-
rpcUrl:
|
|
1100
|
+
...rest,
|
|
1101
|
+
rpcUrl: rpcUrlsResolved[0],
|
|
1102
|
+
rpcUrls: rpcUrlsResolved,
|
|
1103
|
+
...(archiveRpcUrlsResolved
|
|
1104
|
+
? { archiveRpcUrl: archiveRpcUrlsResolved[0], archiveRpcUrls: archiveRpcUrlsResolved }
|
|
1105
|
+
: {}),
|
|
1106
|
+
...(l2ProofRpcUrlsResolved
|
|
1107
|
+
? { l2ProofRpcUrl: l2ProofRpcUrlsResolved[0], l2ProofRpcUrls: l2ProofRpcUrlsResolved }
|
|
1108
|
+
: {}),
|
|
1109
|
+
...(ethereumRpcUrlsResolved
|
|
1110
|
+
? { ethereumRpcUrl: ethereumRpcUrlsResolved[0], ethereumRpcUrls: ethereumRpcUrlsResolved }
|
|
1111
|
+
: {}),
|
|
1112
|
+
...(ethereumArchiveRpcUrlsResolved
|
|
1113
|
+
? {
|
|
1114
|
+
ethereumArchiveRpcUrl: ethereumArchiveRpcUrlsResolved[0],
|
|
1115
|
+
ethereumArchiveRpcUrls: ethereumArchiveRpcUrlsResolved,
|
|
1116
|
+
}
|
|
1117
|
+
: {}),
|
|
940
1118
|
// parseTask assigns a UUID to any entry missing an id
|
|
941
1119
|
tasks: parsed.tasks.map(parseTask),
|
|
942
1120
|
engine: {
|
|
@@ -979,6 +1157,7 @@ export function persistTopLevelConfigValue(key, value, configPath) {
|
|
|
979
1157
|
*/
|
|
980
1158
|
const TRACKED_ENV_VARS = [
|
|
981
1159
|
'JINN_NETWORK',
|
|
1160
|
+
'JINN_STATE_DIR',
|
|
982
1161
|
'JINN_EARNING_DIR',
|
|
983
1162
|
'JINN_DB_PATH',
|
|
984
1163
|
'JINN_POLL_INTERVAL_MS',
|
|
@@ -992,6 +1171,7 @@ const TRACKED_ENV_VARS = [
|
|
|
992
1171
|
'JINN_HERMES_PATH',
|
|
993
1172
|
'JINN_HERMES_MODEL',
|
|
994
1173
|
'JINN_HERMES_PROVIDER',
|
|
1174
|
+
'JINN_HERMES_BASE_URL',
|
|
995
1175
|
'JINN_HERMES_DOCTOR_TIMEOUT_MS',
|
|
996
1176
|
'JINN_RUNTIME_MODE',
|
|
997
1177
|
'JINN_PEERS',
|
|
@@ -1034,12 +1214,14 @@ const TRACKED_ENV_VARS = [
|
|
|
1034
1214
|
'JINN_TASKS',
|
|
1035
1215
|
'JINN_ENGINE_WORKING_DIR_ROOT',
|
|
1036
1216
|
'JINN_ENGINE_IMPL_STATE_DIR_ROOT',
|
|
1217
|
+
'JINN_SWE_REBENCH_V2_STATE_DIR',
|
|
1037
1218
|
'JINN_OPERATOR_PUBLIC_ENDPOINT',
|
|
1038
1219
|
'JINN_OPERATOR_DEFAULT_PRICE_USDC',
|
|
1039
1220
|
'JINN_OPERATOR_DONATION_ENABLED',
|
|
1040
1221
|
'JINN_CAPTURES_LLM_PROXY_ENABLED',
|
|
1041
1222
|
'JINN_CAPTURES_LLM_PROXY_PORT',
|
|
1042
1223
|
'JINN_BUILD_COMMIT',
|
|
1224
|
+
'JINN_SPEND_CAP_USD',
|
|
1043
1225
|
];
|
|
1044
1226
|
/**
|
|
1045
1227
|
* Build a structured provenance block describing how the config was resolved.
|