@jinn-network/client 0.1.6 → 0.1.7-canary.0a586ca9
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/CHANGELOG.md +33 -0
- package/README.md +67 -1
- package/deployments/deployment-jinn-mvi-l1-sepolia-fast.json +23 -4
- package/deployments/deployment-jinn-mvi-l1-sepolia.json +23 -4
- package/deployments/deployment-jinn-mvi-l2-baseSepolia.json +5 -4
- package/dist/adapters/mech/adapter.d.ts +57 -2
- package/dist/adapters/mech/adapter.js +366 -63
- package/dist/adapters/mech/adapter.js.map +1 -1
- package/dist/adapters/mech/contracts.d.ts +17 -4
- package/dist/adapters/mech/contracts.js +19 -4
- package/dist/adapters/mech/contracts.js.map +1 -1
- package/dist/adapters/mech/safe-revert.d.ts +20 -0
- package/dist/adapters/mech/safe-revert.js +12 -4
- package/dist/adapters/mech/safe-revert.js.map +1 -1
- package/dist/adapters/mech/safe.d.ts +6 -2
- package/dist/adapters/mech/safe.js +32 -11
- 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/adapters/mech/verdict-code.d.ts +1 -0
- package/dist/adapters/mech/verdict-code.js +18 -0
- package/dist/adapters/mech/verdict-code.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/admin-endpoint.d.ts +15 -3
- package/dist/api/admin-endpoint.js +24 -2
- package/dist/api/admin-endpoint.js.map +1 -1
- package/dist/api/bootstrap-endpoint.d.ts +1 -2
- package/dist/api/bootstrap-endpoint.js +85 -18
- package/dist/api/bootstrap-endpoint.js.map +1 -1
- package/dist/api/codex-doctor-endpoint.d.ts +90 -0
- package/dist/api/codex-doctor-endpoint.js +296 -0
- package/dist/api/codex-doctor-endpoint.js.map +1 -0
- package/dist/api/discovery-endpoint.d.ts +1 -0
- package/dist/api/discovery-endpoint.js +26 -0
- package/dist/api/discovery-endpoint.js.map +1 -1
- package/dist/api/fleet-build.d.ts +1 -0
- package/dist/api/fleet-build.js +2 -1
- package/dist/api/fleet-build.js.map +1 -1
- package/dist/api/gather-status.d.ts +37 -0
- package/dist/api/gather-status.js +572 -19
- package/dist/api/gather-status.js.map +1 -1
- package/dist/api/hermes-doctor-endpoint.d.ts +128 -3
- package/dist/api/hermes-doctor-endpoint.js +265 -22
- package/dist/api/hermes-doctor-endpoint.js.map +1 -1
- package/dist/api/launcher-status.d.ts +24 -17
- package/dist/api/launcher-status.js +13 -11
- 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/operator-artifacts-endpoint.js +73 -6
- package/dist/api/operator-artifacts-endpoint.js.map +1 -1
- package/dist/api/portfolio-v0-build.d.ts +10 -0
- package/dist/api/portfolio-v0-build.js +24 -5
- package/dist/api/portfolio-v0-build.js.map +1 -1
- package/dist/api/prediction-v1-build.d.ts +10 -0
- package/dist/api/prediction-v1-build.js +7 -1
- package/dist/api/prediction-v1-build.js.map +1 -1
- package/dist/api/server.d.ts +31 -1
- package/dist/api/server.js +95 -2
- package/dist/api/server.js.map +1 -1
- package/dist/api/setup-endpoints.d.ts +7 -0
- package/dist/api/setup-endpoints.js +67 -135
- package/dist/api/setup-endpoints.js.map +1 -1
- package/dist/api/setup-retry-endpoint.d.ts +19 -0
- package/dist/api/setup-retry-endpoint.js +32 -0
- package/dist/api/setup-retry-endpoint.js.map +1 -0
- package/dist/api/solvernets-endpoints.d.ts +8 -0
- package/dist/api/solvernets-endpoints.js +100 -105
- package/dist/api/solvernets-endpoints.js.map +1 -1
- package/dist/api/status-build.d.ts +167 -2
- package/dist/api/status-build.js +118 -27
- 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/task-run-routing.d.ts +7 -0
- package/dist/api/task-run-routing.js +12 -0
- package/dist/api/task-run-routing.js.map +1 -0
- package/dist/api/task-runs-build.d.ts +21 -0
- package/dist/api/task-runs-build.js +14 -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 +22 -0
- package/dist/chain-read-errors.js +41 -1
- package/dist/chain-read-errors.js.map +1 -1
- package/dist/cli/commands/auth.js +1 -1
- package/dist/cli/commands/auth.js.map +1 -1
- package/dist/cli/commands/codedigest-revert-check.d.ts +33 -0
- package/dist/cli/commands/codedigest-revert-check.js +249 -0
- package/dist/cli/commands/codedigest-revert-check.js.map +1 -0
- package/dist/cli/commands/create.js +3 -2
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/doctor.d.ts +2 -0
- package/dist/cli/commands/doctor.js +2 -0
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/rewards.js +11 -7
- 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 +179 -16
- 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 +1 -1
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/tasks.js +101 -11
- package/dist/cli/commands/tasks.js.map +1 -1
- package/dist/cli/commands/update.d.ts +10 -0
- package/dist/cli/commands/update.js +36 -0
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/introspection-context.js +5 -0
- package/dist/cli/introspection-context.js.map +1 -1
- package/dist/cli/task-native-readiness.d.ts +10 -1
- package/dist/cli/task-native-readiness.js +30 -6
- package/dist/cli/task-native-readiness.js.map +1 -1
- package/dist/config.d.ts +287 -235
- package/dist/config.js +318 -114
- package/dist/config.js.map +1 -1
- package/dist/daemon/checkpoint-loop.d.ts +48 -0
- package/dist/daemon/checkpoint-loop.js +76 -0
- package/dist/daemon/checkpoint-loop.js.map +1 -0
- package/dist/daemon/creator.d.ts +1 -1
- package/dist/daemon/creator.js +20 -3
- package/dist/daemon/creator.js.map +1 -1
- package/dist/daemon/daemon.d.ts +22 -0
- package/dist/daemon/daemon.js +174 -31
- package/dist/daemon/daemon.js.map +1 -1
- package/dist/daemon/eviction-loop.d.ts +40 -0
- package/dist/daemon/eviction-loop.js +67 -0
- package/dist/daemon/eviction-loop.js.map +1 -0
- 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-wiring.d.ts +33 -0
- package/dist/daemon/jinn-claim-loop-wiring.js +40 -0
- package/dist/daemon/jinn-claim-loop-wiring.js.map +1 -0
- package/dist/daemon/jinn-claim-loop.d.ts +24 -17
- package/dist/daemon/jinn-claim-loop.js +77 -23
- 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/skip-log-dedup.d.ts +69 -0
- package/dist/daemon/skip-log-dedup.js +106 -0
- package/dist/daemon/skip-log-dedup.js.map +1 -0
- 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-BNs_ewI6.js +345 -0
- package/dist/dashboard/assets/index-C4huIsUW.css +32 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/discovery/factory.d.ts +17 -5
- package/dist/discovery/factory.js +46 -18
- package/dist/discovery/factory.js.map +1 -1
- package/dist/discovery/http.js +469 -3
- package/dist/discovery/http.js.map +1 -1
- package/dist/discovery/onchain.d.ts +5 -0
- package/dist/discovery/onchain.js +448 -18
- package/dist/discovery/onchain.js.map +1 -1
- package/dist/discovery/types.d.ts +174 -1
- package/dist/discovery/types.js +8 -10
- package/dist/discovery/types.js.map +1 -1
- package/dist/discovery/with-fallback.d.ts +7 -0
- package/dist/discovery/with-fallback.js +37 -0
- package/dist/discovery/with-fallback.js.map +1 -1
- package/dist/earning/bootstrap.d.ts +100 -4
- package/dist/earning/bootstrap.js +239 -76
- package/dist/earning/bootstrap.js.map +1 -1
- package/dist/earning/contracts.d.ts +14 -0
- package/dist/earning/contracts.js +17 -5
- package/dist/earning/contracts.js.map +1 -1
- package/dist/earning/funding-plan.js +27 -18
- package/dist/earning/funding-plan.js.map +1 -1
- package/dist/earning/jinn-rewards.d.ts +46 -0
- package/dist/earning/jinn-rewards.js +32 -0
- package/dist/earning/jinn-rewards.js.map +1 -1
- package/dist/earning/safe-adapter.d.ts +2 -0
- package/dist/earning/safe-adapter.js +37 -11
- package/dist/earning/safe-adapter.js.map +1 -1
- package/dist/earning/store.d.ts +8 -0
- package/dist/earning/store.js.map +1 -1
- package/dist/earning/testnet-setup-migration.d.ts +12 -0
- package/dist/earning/testnet-setup-migration.js +27 -1
- package/dist/earning/testnet-setup-migration.js.map +1 -1
- package/dist/earning/types.d.ts +21 -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 +21 -6
- 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/erc8004/reputation.d.ts +8 -0
- package/dist/erc8004/reputation.js +22 -3
- package/dist/erc8004/reputation.js.map +1 -1
- package/dist/events/types.d.ts +2 -2
- package/dist/harnesses/cost-estimates.d.ts +124 -0
- package/dist/harnesses/cost-estimates.js +265 -0
- package/dist/harnesses/cost-estimates.js.map +1 -0
- package/dist/harnesses/engine/engine.d.ts +78 -0
- package/dist/harnesses/engine/engine.js +153 -11
- package/dist/harnesses/engine/engine.js.map +1 -1
- package/dist/harnesses/engine/persistence.d.ts +51 -1
- package/dist/harnesses/engine/persistence.js +118 -5
- package/dist/harnesses/engine/persistence.js.map +1 -1
- package/dist/harnesses/engine/work-dir-reaper.d.ts +65 -0
- package/dist/harnesses/engine/work-dir-reaper.js +100 -0
- package/dist/harnesses/engine/work-dir-reaper.js.map +1 -0
- package/dist/harnesses/impls/hermes-agent/adapter.js +40 -0
- package/dist/harnesses/impls/hermes-agent/adapter.js.map +1 -1
- package/dist/harnesses/impls/hermes-agent/bootstrap.d.ts +20 -0
- package/dist/harnesses/impls/hermes-agent/bootstrap.js +44 -8
- 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 +59 -1
- package/dist/harnesses/impls/hermes-agent/harness.js +104 -0
- 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 +7 -0
- package/dist/harnesses/impls/index.js +16 -1
- package/dist/harnesses/impls/index.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 +47 -4
- package/dist/harnesses/impls/learner/harness.js +105 -2
- package/dist/harnesses/impls/learner/harness.js.map +1 -1
- package/dist/harnesses/impls/learner/harvest.d.ts +1 -1
- package/dist/harnesses/impls/learner/harvest.js +23 -5
- package/dist/harnesses/impls/learner/harvest.js.map +1 -1
- package/dist/harnesses/impls/learner/plugin-path.d.ts +0 -13
- package/dist/harnesses/impls/learner/plugin-path.js +35 -15
- 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/learner/types.d.ts +11 -0
- package/dist/harnesses/impls/stub.d.ts +58 -0
- package/dist/harnesses/impls/stub.js +89 -0
- package/dist/harnesses/impls/stub.js.map +1 -0
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.d.ts +69 -50
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.js +199 -94
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.js.map +1 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/harness.d.ts +12 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/harness.js +121 -7
- 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 +88 -4
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/hf-fetcher.js +143 -22
- 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 +6 -0
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/index.js +1 -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 +18 -1
- package/dist/harnesses/readiness-registry.js.map +1 -1
- package/dist/learner/revert-decision.d.ts +59 -0
- package/dist/learner/revert-decision.js +53 -0
- package/dist/learner/revert-decision.js.map +1 -0
- package/dist/learner/revert-stats.d.ts +24 -0
- package/dist/learner/revert-stats.js +44 -0
- package/dist/learner/revert-stats.js.map +1 -0
- package/dist/main.js +470 -142
- 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/emit-event.d.ts +3 -2
- package/dist/observability/emit-event.js +22 -1
- package/dist/observability/emit-event.js.map +1 -1
- package/dist/operator-errors.d.ts +7 -0
- package/dist/operator-errors.js +13 -1
- package/dist/operator-errors.js.map +1 -1
- package/dist/plugins/learner/.claude-plugin/plugin.json +9 -0
- package/dist/plugins/learner/.codex-plugin/plugin.json +39 -0
- package/dist/plugins/learner/AGENTS.md +40 -0
- package/dist/plugins/learner/CLAUDE.md +33 -0
- package/dist/plugins/learner/README.md +59 -0
- package/dist/plugins/learner/hooks/hooks.json +16 -0
- package/dist/plugins/learner/hooks/session-start +38 -0
- package/dist/plugins/learner/skills/learn/SKILL.md +412 -0
- package/dist/plugins/learner/skills/learn/analyst-prompt.md +68 -0
- package/dist/plugins/learner/skills/learn/consolidator-prompt.md +111 -0
- package/dist/plugins/learner/skills/learn/explorer-prompt.md +53 -0
- package/dist/plugins/learner/skills/learn/planner-prompt.md +87 -0
- package/dist/plugins/learner/skills/learn/promoter-prompt.md +184 -0
- package/dist/plugins/learner/skills/learn/step-worker-prompt.md +47 -0
- package/dist/plugins/learner/skills/learn/strategist-prompt.md +85 -0
- package/dist/preflight/pidfile-liveness.d.ts +44 -0
- package/dist/preflight/pidfile-liveness.js +103 -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/restart-daemon.d.ts +90 -0
- package/dist/restart-daemon.js +95 -0
- package/dist/restart-daemon.js.map +1 -0
- package/dist/rpc/transport.d.ts +109 -0
- package/dist/rpc/transport.js +220 -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/setup/halt-mode.d.ts +14 -0
- package/dist/setup/halt-mode.js +17 -0
- package/dist/setup/halt-mode.js.map +1 -0
- package/dist/solver-nets/prediction-operator-ux.d.ts +1 -2
- package/dist/solver-nets/prediction-operator-ux.js +90 -47
- package/dist/solver-nets/prediction-operator-ux.js.map +1 -1
- package/dist/solver-nets/registry.d.ts +20 -1
- package/dist/solver-nets/registry.js +38 -25
- package/dist/solver-nets/registry.js.map +1 -1
- package/dist/solver-types/_swe-rebench-v2-pool-cache.d.ts +58 -0
- package/dist/solver-types/_swe-rebench-v2-pool-cache.js +87 -0
- package/dist/solver-types/_swe-rebench-v2-pool-cache.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 +15 -0
- package/dist/solver-types/_swe-rebench-v2-state.js +19 -0
- package/dist/solver-types/_swe-rebench-v2-state.js.map +1 -1
- package/dist/solver-types/_swe-rebench-v2-substrate.d.ts +1 -0
- package/dist/solver-types/_swe-rebench-v2-substrate.js +10 -0
- package/dist/solver-types/_swe-rebench-v2-substrate.js.map +1 -1
- package/dist/solver-types/_swe-rebench-v2-validated-pool.d.ts +145 -2
- package/dist/solver-types/_swe-rebench-v2-validated-pool.js +482 -44
- package/dist/solver-types/_swe-rebench-v2-validated-pool.js.map +1 -1
- package/dist/solver-types/swe-rebench-v2-auto.d.ts +38 -14
- package/dist/solver-types/swe-rebench-v2-auto.js +87 -28
- package/dist/solver-types/swe-rebench-v2-auto.js.map +1 -1
- package/dist/solver-types/swe-rebench-v2.d.ts +19 -2
- package/dist/solver-types/swe-rebench-v2.js +351 -96
- package/dist/solver-types/swe-rebench-v2.js.map +1 -1
- package/dist/solvernets/daemon-init.d.ts +10 -2
- package/dist/solvernets/daemon-init.js +22 -2
- package/dist/solvernets/daemon-init.js.map +1 -1
- package/dist/solvernets/launched-record-dispatcher.d.ts +4 -0
- package/dist/solvernets/launched-record-dispatcher.js +41 -7
- package/dist/solvernets/launched-record-dispatcher.js.map +1 -1
- package/dist/solvernets/registry-client-erc8004.js +11 -0
- package/dist/solvernets/registry-client-erc8004.js.map +1 -1
- package/dist/solvernets/store.d.ts +7 -2
- package/dist/solvernets/store.js +1 -0
- package/dist/solvernets/store.js.map +1 -1
- package/dist/spend/cost-surface-status.d.ts +10 -0
- package/dist/spend/cost-surface-status.js +22 -0
- package/dist/spend/cost-surface-status.js.map +1 -0
- package/dist/spend/credential.d.ts +8 -0
- package/dist/spend/credential.js +30 -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 +30 -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 +61 -0
- package/dist/store/store.js +302 -7
- package/dist/store/store.js.map +1 -1
- package/dist/tasks/sources.d.ts +18 -1
- package/dist/tasks/sources.js +33 -5
- package/dist/tasks/sources.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 +98 -32
- package/dist/trajectory/transcript-watcher.js.map +1 -1
- package/dist/tx-retry.d.ts +166 -19
- package/dist/tx-retry.js +310 -32
- 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 +8 -8
- package/dist/types/payloads/prediction-v0.d.ts +17 -17
- package/dist/types/task-document.d.ts +392 -0
- package/dist/types/task-document.js +10 -0
- package/dist/types/task-document.js.map +1 -1
- package/dist/types/task.d.ts +28 -0
- package/dist/util/extract-tx-hash.d.ts +14 -0
- package/dist/util/extract-tx-hash.js +19 -0
- package/dist/util/extract-tx-hash.js.map +1 -0
- package/dist/vendor/@jinn-network/sdk/dist/contracts.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/manifest-schema.d.ts +3 -0
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/manifest-schema.js +1 -0
- package/package.json +37 -13
- package/plugins/learner/skills/learn/consolidator-prompt.md +18 -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/jinn.plugin.json +2 -3
- package/plugins/swe-rebench-v2-runtime/skills/task/SKILL.md +69 -0
- package/dist/dashboard/assets/index-DOlzFN8a.css +0 -32
- package/dist/dashboard/assets/index-NkZ7CTAT.js +0 -140
- 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,9 @@ 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
|
-
* spec/2026-05-05-solvernet-creation-and-launch.md — pre-release, no
|
|
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
|
+
// ── Schema ──────────────────────────────────────────────────────────────────
|
|
30
24
|
const HarnessNameSchema = z.string().transform((name) => canonicalHarnessName(name));
|
|
31
25
|
export const JinnConfigSchema = z.object({
|
|
32
26
|
/**
|
|
@@ -38,19 +32,24 @@ export const JinnConfigSchema = z.object({
|
|
|
38
32
|
*/
|
|
39
33
|
network: z.enum(['mainnet', 'testnet']).default('testnet'),
|
|
40
34
|
/**
|
|
41
|
-
* Base RPC endpoint.
|
|
42
|
-
*
|
|
43
|
-
*
|
|
35
|
+
* Base RPC endpoint(s). Accepts either a single URL string or an array of
|
|
36
|
+
* URLs. When an array (or a comma-separated env var) is supplied, the
|
|
37
|
+
* daemon builds a viem `fallback()` chain in slot order (primary first).
|
|
38
|
+
* See `client/src/rpc/transport.ts` for the wrapper. Defaults to the
|
|
39
|
+
* publicnode+sepolia.base.org two-provider chain on testnet and the public
|
|
40
|
+
* `mainnet.base.org` on mainnet. Set explicitly to override.
|
|
41
|
+
*
|
|
42
|
+
* Env: JINN_RPC_URL / BASE_SEPOLIA_RPC_URL / BASE_RPC_URL (comma-separated).
|
|
44
43
|
*/
|
|
45
|
-
rpcUrl: z.string().optional(),
|
|
46
|
-
archiveRpcUrl: z.string().optional(),
|
|
44
|
+
rpcUrl: z.union([z.string(), z.array(z.string()).min(1)]).optional(),
|
|
45
|
+
archiveRpcUrl: z.union([z.string(), z.array(z.string()).min(1)]).optional(),
|
|
47
46
|
/**
|
|
48
|
-
* Optional L2 proof/archive RPC endpoint for canonical cross-chain canaries.
|
|
47
|
+
* Optional L2 proof/archive RPC endpoint(s) for canonical cross-chain canaries.
|
|
49
48
|
* The daemon can use its normal rpcUrl for writes while proof construction
|
|
50
49
|
* uses this endpoint for historical eth_getProof at OP dispute-game blocks.
|
|
51
|
-
* Env: JINN_L2_PROOF_RPC_URL.
|
|
50
|
+
* Accepts string or array form (see rpcUrl). Env: JINN_L2_PROOF_RPC_URL.
|
|
52
51
|
*/
|
|
53
|
-
l2ProofRpcUrl: z.string().
|
|
52
|
+
l2ProofRpcUrl: z.union([z.string(), z.array(z.string()).min(1)]).optional(),
|
|
54
53
|
/** Earning state directory */
|
|
55
54
|
earningDir: z.string().default(join(homedir(), '.jinn-client', 'earning')),
|
|
56
55
|
/** SQLite database path */
|
|
@@ -70,6 +69,20 @@ export const JinnConfigSchema = z.object({
|
|
|
70
69
|
* Set to 0 to disable. Env: JINN_BALANCE_TOPUP_INTERVAL_MS
|
|
71
70
|
*/
|
|
72
71
|
balanceTopupIntervalMs: z.number().int().min(0).default(300_000),
|
|
72
|
+
/**
|
|
73
|
+
* Interval between eviction-state polls for the staking proxy (ms).
|
|
74
|
+
* Default 60000 (1 min). Set to 0 to disable. Env: JINN_EVICTION_CHECK_INTERVAL_MS
|
|
75
|
+
*/
|
|
76
|
+
evictionCheckIntervalMs: z.number().int().min(0).default(60_000),
|
|
77
|
+
/**
|
|
78
|
+
* Interval between proactive `checkpoint()` tx calls to each staked
|
|
79
|
+
* proxy (ms). Keeps `tsCheckpoint` advancing so the activity-rate window
|
|
80
|
+
* stays narrow — without it operators silently fail liveness on realistic
|
|
81
|
+
* cadence (issue #505). Default 300_000 (5 min), matching the standard
|
|
82
|
+
* `livenessPeriod` on stOLAS staking proxies. Set to 0 to disable.
|
|
83
|
+
* Env: JINN_CHECKPOINT_INTERVAL_MS.
|
|
84
|
+
*/
|
|
85
|
+
checkpointIntervalMs: z.number().int().min(0).default(300_000),
|
|
73
86
|
/** HTTP API port */
|
|
74
87
|
apiPort: z.number().int().positive().default(7331),
|
|
75
88
|
/**
|
|
@@ -97,6 +110,13 @@ export const JinnConfigSchema = z.object({
|
|
|
97
110
|
* Default 30 000 ms. Env: JINN_HERMES_DOCTOR_TIMEOUT_MS.
|
|
98
111
|
*/
|
|
99
112
|
hermesDoctorTimeoutMs: z.number().int().positive().default(30_000),
|
|
113
|
+
/** Path to the `codex` executable. Defaults to `codex` when unset. */
|
|
114
|
+
codexPath: z.string().optional(),
|
|
115
|
+
/**
|
|
116
|
+
* Timeout in ms for `codex --version` health-check runs.
|
|
117
|
+
* Default 30 000 ms. Env: JINN_CODEX_DOCTOR_TIMEOUT_MS.
|
|
118
|
+
*/
|
|
119
|
+
codexDoctorTimeoutMs: z.number().int().positive().default(30_000),
|
|
100
120
|
/**
|
|
101
121
|
* How the operator runs the daemon. Set once by app-guided setup or the
|
|
102
122
|
* legacy `jinn auth` compatibility command, then read by every command that
|
|
@@ -143,6 +163,16 @@ export const JinnConfigSchema = z.object({
|
|
|
143
163
|
* backlog while proving one fresh task path.
|
|
144
164
|
*/
|
|
145
165
|
taskDiscoveryAllowedTaskIds: z.array(z.string()).optional(),
|
|
166
|
+
/**
|
|
167
|
+
* Opt-in lower bound (L2 block number) for the mech adapter's canonical
|
|
168
|
+
* on-chain TaskCreated backlog scan. Unset → the adapter's per-chain default
|
|
169
|
+
* (DEFAULT_TASK_DISCOVERY_FROM_BLOCK) flows through (see gh #300). Set this to
|
|
170
|
+
* a recent block to bound the scan to a small recent window so the indexer
|
|
171
|
+
* (DiscoveryAPI.findClaimableTasks) carries the bulk of discovery — the
|
|
172
|
+
* canonical getLogs scan over a large/bloated history parses huge responses
|
|
173
|
+
* on the main thread and can stall the event loop. Env: JINN_TASK_DISCOVERY_FROM_BLOCK.
|
|
174
|
+
*/
|
|
175
|
+
taskDiscoveryOnchainFromBlock: z.number().int().min(0).optional(),
|
|
146
176
|
/** This node's public HTTP endpoint (for 8004 registration) */
|
|
147
177
|
nodeEndpoint: z.string().optional(),
|
|
148
178
|
/** Tasks to create and solve. Empty by default; enabled SolverNet generators fill the loop. */
|
|
@@ -174,17 +204,19 @@ export const JinnConfigSchema = z.object({
|
|
|
174
204
|
jinnMviL2DeploymentPath: z.string().optional(),
|
|
175
205
|
// ── Cross-chain claim loop (Phase B / jinn-mono-7x5) ─────────────────────
|
|
176
206
|
/**
|
|
177
|
-
* RPC endpoint for the L1 governance chain (Ethereum / Sepolia) where
|
|
178
|
-
* JinnDistributor lives.
|
|
179
|
-
*
|
|
207
|
+
* RPC endpoint(s) for the L1 governance chain (Ethereum / Sepolia) where
|
|
208
|
+
* the JinnDistributor lives. Accepts string or array form (see rpcUrl) and
|
|
209
|
+
* supports comma-separated env values. Testnet defaults to a public Sepolia
|
|
210
|
+
* RPC; mainnet requires an operator override when L1 submit mode is
|
|
211
|
+
* configured. Env: JINN_ETHEREUM_RPC_URL.
|
|
180
212
|
*/
|
|
181
|
-
ethereumRpcUrl: z.string().
|
|
213
|
+
ethereumRpcUrl: z.union([z.string(), z.array(z.string()).min(1)]).optional(),
|
|
182
214
|
/**
|
|
183
|
-
* Optional archive RPC endpoint for the L1 governance chain. Used for
|
|
184
|
-
* historical block lookups when constructing canonical-mode proofs.
|
|
185
|
-
* Env: JINN_ETHEREUM_ARCHIVE_RPC_URL.
|
|
215
|
+
* Optional archive RPC endpoint(s) for the L1 governance chain. Used for
|
|
216
|
+
* historical block lookups when constructing canonical-mode proofs. Accepts
|
|
217
|
+
* string or array form. Env: JINN_ETHEREUM_ARCHIVE_RPC_URL.
|
|
186
218
|
*/
|
|
187
|
-
ethereumArchiveRpcUrl: z.string().
|
|
219
|
+
ethereumArchiveRpcUrl: z.union([z.string(), z.array(z.string()).min(1)]).optional(),
|
|
188
220
|
/**
|
|
189
221
|
* L1 network used by the cross-chain claim loop. 'sepolia' tracks Base
|
|
190
222
|
* Sepolia testnet; 'ethereum' tracks Base mainnet. Defaults to 'sepolia'
|
|
@@ -192,10 +224,10 @@ export const JinnConfigSchema = z.object({
|
|
|
192
224
|
*/
|
|
193
225
|
jinnL1Network: z.enum(['sepolia', 'ethereum']).default('sepolia'),
|
|
194
226
|
/**
|
|
195
|
-
* JinnDistributor address on the L1 governance chain.
|
|
196
|
-
*
|
|
197
|
-
* Resolved from jinnMviL1DeploymentPath when omitted;
|
|
198
|
-
* override. Env: JINN_DISTRIBUTOR_ADDRESS.
|
|
227
|
+
* JinnDistributor address on the L1 governance chain. Required for
|
|
228
|
+
* jinnClaimSubmissionMode='submit'. When set for submit mode, ethereumRpcUrl
|
|
229
|
+
* MUST also be set. Resolved from jinnMviL1DeploymentPath when omitted;
|
|
230
|
+
* otherwise a manual override. Env: JINN_DISTRIBUTOR_ADDRESS.
|
|
199
231
|
*/
|
|
200
232
|
jinnDistributorAddress: z
|
|
201
233
|
.string()
|
|
@@ -229,6 +261,20 @@ export const JinnConfigSchema = z.object({
|
|
|
229
261
|
* Env: JINN_MESSENGER_MODE.
|
|
230
262
|
*/
|
|
231
263
|
jinnMessengerMode: z.enum(['canonical', 'mock']).default('canonical'),
|
|
264
|
+
/**
|
|
265
|
+
* Claim submission mode. `emit-only` only submits TaskClaimEmitter.emitClaim
|
|
266
|
+
* on L2 and records the resulting ticket. `submit` continues into the L1
|
|
267
|
+
* messenger/distributor path.
|
|
268
|
+
* Env: JINN_CLAIM_SUBMISSION_MODE.
|
|
269
|
+
*/
|
|
270
|
+
jinnClaimSubmissionMode: z.enum(['emit-only', 'submit']).default('emit-only'),
|
|
271
|
+
/**
|
|
272
|
+
* Explicit operator gate for the cross-chain JINN claim loop. The schema
|
|
273
|
+
* default stays off for mainnet/unknown networks; loadConfig defaults this
|
|
274
|
+
* on for testnet now that the emitter and standing relayer are live.
|
|
275
|
+
* Env: JINN_CLAIM_LOOP_ENABLED=1|true|yes.
|
|
276
|
+
*/
|
|
277
|
+
jinnClaimLoopEnabled: z.boolean().default(false),
|
|
232
278
|
/**
|
|
233
279
|
* How often the daemon ticks the cross-chain JINN claim loop (ms). Default
|
|
234
280
|
* 3 600 000 (1 hour) — well below mainnet challenge windows while
|
|
@@ -318,69 +364,7 @@ export const JinnConfigSchema = z.object({
|
|
|
318
364
|
})
|
|
319
365
|
.default({ mode: 'train' }),
|
|
320
366
|
/**
|
|
321
|
-
*
|
|
322
|
-
*
|
|
323
|
-
* Each entry's `roles` is a non-empty subset of `['solving', 'evaluating']`.
|
|
324
|
-
* Multiple roles can run concurrently for the same SolverNet; the
|
|
325
|
-
* protocol-level `disallowSolverSelfEvaluation` flag prevents the operator
|
|
326
|
-
* from evaluating its own Solutions and the on-chain
|
|
327
|
-
* TaskActivityCheckerV3 tracks Solution and Verdict counters independently
|
|
328
|
-
* (additive into `eligibleActivityWeight`).
|
|
329
|
-
*
|
|
330
|
-
* Launcher ownership lives in the launched-record subsystem
|
|
331
|
-
* (spec/2026-05-05-solvernet-creation-and-launch.md §11), not in operator
|
|
332
|
-
* config — there is no `'launching'` operator role. Legacy entries that
|
|
333
|
-
* include `'launching'` in `roles` have it stripped by the preprocessor so
|
|
334
|
-
* older config files keep loading.
|
|
335
|
-
*
|
|
336
|
-
* Backwards-compat: a legacy `role: 'solving' | 'evaluating'` field is
|
|
337
|
-
* auto-promoted to `roles: [<role>]` by the zod preprocessor below so
|
|
338
|
-
* existing `~/.jinn-client/config.json` files keep loading without an
|
|
339
|
-
* operator migration step.
|
|
340
|
-
*/
|
|
341
|
-
solverNets: z.record(z.preprocess((raw) => {
|
|
342
|
-
if (typeof raw !== 'object' || raw === null)
|
|
343
|
-
return raw;
|
|
344
|
-
const obj = raw;
|
|
345
|
-
// Promote legacy `role: X` → `roles: [X]` when only the singular form
|
|
346
|
-
// is provided. If both are present (mid-migration third-party config),
|
|
347
|
-
// `roles` wins and `role` is dropped.
|
|
348
|
-
if (Array.isArray(obj['roles']) && obj['roles'].length > 0) {
|
|
349
|
-
// Drop legacy `'launching'` entries — operator config no longer
|
|
350
|
-
// carries the launcher role; ownership is via launched records.
|
|
351
|
-
const filteredRoles = obj['roles'].filter((r) => r !== 'launching');
|
|
352
|
-
const { role: _legacyRole, ...rest } = obj;
|
|
353
|
-
return { ...rest, roles: filteredRoles };
|
|
354
|
-
}
|
|
355
|
-
if (typeof obj['role'] === 'string' && (obj['role'] === 'solving' || obj['role'] === 'evaluating')) {
|
|
356
|
-
const { role, ...rest } = obj;
|
|
357
|
-
return { ...rest, roles: [role] };
|
|
358
|
-
}
|
|
359
|
-
return obj;
|
|
360
|
-
}, z.object({
|
|
361
|
-
enabled: z.boolean().default(true),
|
|
362
|
-
solverType: z.string(),
|
|
363
|
-
roles: z.array(z.enum(['solving', 'evaluating']))
|
|
364
|
-
.min(1, 'each SolverNet must enable at least one role')
|
|
365
|
-
.default(['solving'])
|
|
366
|
-
// Deduplicate to keep downstream consumers simple.
|
|
367
|
-
.transform((arr) => Array.from(new Set(arr))),
|
|
368
|
-
harness: HarnessNameSchema.default(CLAUDE_CODE_HARNESS),
|
|
369
|
-
model: z.string().optional(),
|
|
370
|
-
plugins: z.array(z.union([
|
|
371
|
-
z.string(),
|
|
372
|
-
z.object({
|
|
373
|
-
name: z.string().optional(),
|
|
374
|
-
source: z.string(),
|
|
375
|
-
version: z.string().optional(),
|
|
376
|
-
}),
|
|
377
|
-
])).default([]),
|
|
378
|
-
taskGenerator: z.object({
|
|
379
|
-
enabled: z.boolean().default(true),
|
|
380
|
-
}).default({ enabled: true }),
|
|
381
|
-
}))).default(DEFAULT_SOLVER_NETS),
|
|
382
|
-
/**
|
|
383
|
-
* Manifest-keyed joined SolverNets (Task 21).
|
|
367
|
+
* Manifest-keyed joined SolverNets.
|
|
384
368
|
*
|
|
385
369
|
* Spec: spec/2026-05-05-solvernet-creation-and-launch.md §12.
|
|
386
370
|
*
|
|
@@ -389,10 +373,10 @@ export const JinnConfigSchema = z.object({
|
|
|
389
373
|
* (CIDv0 / CIDv1) — the only stable identifier that maps back to a
|
|
390
374
|
* launched-instance authority across launchers.
|
|
391
375
|
*
|
|
392
|
-
*
|
|
393
|
-
*
|
|
394
|
-
*
|
|
395
|
-
*
|
|
376
|
+
* The daemon narrows this block into runtime SolverNet registry entries on
|
|
377
|
+
* restart. Legacy short-name-keyed `solverNets` blocks on operator config
|
|
378
|
+
* files are auto-migrated into synthetic `legacy:<short-name>`-keyed
|
|
379
|
+
* entries at load time (see `migrateLegacySolverNets`).
|
|
396
380
|
*/
|
|
397
381
|
joinedSolverNets: z
|
|
398
382
|
.record(z.string(), z.object({
|
|
@@ -536,8 +520,37 @@ export const JinnConfigSchema = z.object({
|
|
|
536
520
|
* Env: JINN_REPUTATION_ENABLED
|
|
537
521
|
*/
|
|
538
522
|
reputationEnabled: z.boolean().default(false),
|
|
539
|
-
|
|
540
|
-
|
|
523
|
+
/**
|
|
524
|
+
* Per-credential daily spend caps (USD). Keys are credential identifiers
|
|
525
|
+
* (e.g. `'anthropic:api-key'`); values are positive numbers representing
|
|
526
|
+
* the maximum USD spend per day for that credential.
|
|
527
|
+
*
|
|
528
|
+
* `JINN_SPEND_CAP_USD` (env-only, consumed directly by the spend-budget
|
|
529
|
+
* subsystem in Task 9) is tracked for provenance in TRACKED_ENV_VARS below
|
|
530
|
+
* but is NOT a config-file field and has no entry in this schema.
|
|
531
|
+
*/
|
|
532
|
+
spendCaps: z.record(z.string(), z.number().positive()).optional(),
|
|
533
|
+
/**
|
|
534
|
+
* Operator-local SolverPlugin trust state.
|
|
535
|
+
*
|
|
536
|
+
* `blockedCids` is the list of plug-in CIDs the operator has chosen to
|
|
537
|
+
* refuse to load — populated by `jinn solver-plugins block <cid>` and read
|
|
538
|
+
* at daemon startup. The block list complements the on-chain
|
|
539
|
+
* `giveFeedback(score=0)` write (which is the public-trust signal); the
|
|
540
|
+
* local list is the operator's own refusal to execute, applied even when
|
|
541
|
+
* the network write fails. File-managed only — no env override.
|
|
542
|
+
*
|
|
543
|
+
* See spec/2026-05-26-117-design.md "Failure modes" and "Local-only effects".
|
|
544
|
+
*/
|
|
545
|
+
solverPlugins: z
|
|
546
|
+
.object({
|
|
547
|
+
blockedCids: z.array(z.string()).default([]),
|
|
548
|
+
})
|
|
549
|
+
.default({ blockedCids: [] }),
|
|
550
|
+
}).refine((cfg) => cfg.jinnClaimSubmissionMode !== 'submit' ||
|
|
551
|
+
!cfg.jinnDistributorAddress ||
|
|
552
|
+
!!cfg.ethereumRpcUrl, {
|
|
553
|
+
message: 'ethereumRpcUrl must be set when jinnDistributorAddress is configured in submit mode ' +
|
|
541
554
|
'(env JINN_ETHEREUM_RPC_URL or config field). The cross-chain claim loop ' +
|
|
542
555
|
'cannot reach the L1 governance chain without it.',
|
|
543
556
|
path: ['ethereumRpcUrl'],
|
|
@@ -557,6 +570,21 @@ export const DEFAULT_CONFIG_PATH = join(DEFAULT_DIR, 'config.json');
|
|
|
557
570
|
* historical sync — see ponder.config.ts).
|
|
558
571
|
*/
|
|
559
572
|
export const DEFAULT_TESTNET_DISCOVERY_URL = 'https://jinn-indexer-production.up.railway.app';
|
|
573
|
+
export const DEFAULT_TESTNET_ETHEREUM_RPC_URL = 'https://ethereum-sepolia-rpc.publicnode.com';
|
|
574
|
+
/**
|
|
575
|
+
* Default fallback chain for the L2 measurement chain (Base Sepolia) on
|
|
576
|
+
* testnet. Per AC2 of issue #592:
|
|
577
|
+
* slot 0 — `https://base-sepolia.publicnode.com` (no-auth, 50k-block
|
|
578
|
+
* getLogs cap, no shared-quota cliff).
|
|
579
|
+
* slot 1 — `https://sepolia.base.org` (free public Coinbase endpoint,
|
|
580
|
+
* 2k-block cap; last-resort backup).
|
|
581
|
+
* Operators are encouraged to prepend a paid primary key (Alchemy, Tenderly,
|
|
582
|
+
* etc.) via `rpcUrl` config or `JINN_RPC_URL` / `BASE_SEPOLIA_RPC_URL` env.
|
|
583
|
+
*/
|
|
584
|
+
export const DEFAULT_TESTNET_RPC_URLS = [
|
|
585
|
+
'https://base-sepolia.publicnode.com',
|
|
586
|
+
'https://sepolia.base.org',
|
|
587
|
+
];
|
|
560
588
|
export class ConfigLoadError extends Error {
|
|
561
589
|
code;
|
|
562
590
|
details;
|
|
@@ -567,7 +595,93 @@ export class ConfigLoadError extends Error {
|
|
|
567
595
|
this.details = details;
|
|
568
596
|
}
|
|
569
597
|
}
|
|
570
|
-
|
|
598
|
+
/**
|
|
599
|
+
* Parse a legacy `<id>.<version>` solverType string into `{id, version}`.
|
|
600
|
+
* Falls back to `{ id: fallbackId, version: 'v1' }` when the string lacks a
|
|
601
|
+
* dot or terminates in one — this happens only on hand-edited operator
|
|
602
|
+
* configs and keeps the migration loud-but-non-fatal.
|
|
603
|
+
*/
|
|
604
|
+
function parseSolverTypeRef(solverType, fallbackId) {
|
|
605
|
+
if (typeof solverType !== 'string') {
|
|
606
|
+
return { id: fallbackId, version: 'v1' };
|
|
607
|
+
}
|
|
608
|
+
const dot = solverType.lastIndexOf('.');
|
|
609
|
+
if (dot <= 0 || dot === solverType.length - 1) {
|
|
610
|
+
return { id: fallbackId, version: 'v1' };
|
|
611
|
+
}
|
|
612
|
+
return { id: solverType.slice(0, dot), version: solverType.slice(dot + 1) };
|
|
613
|
+
}
|
|
614
|
+
/**
|
|
615
|
+
* Translate any legacy short-name-keyed `solverNets` block on the raw parsed
|
|
616
|
+
* config into manifest-keyed `joinedSolverNets` entries with synthetic
|
|
617
|
+
* `legacy:<short-name>` keys.
|
|
618
|
+
*
|
|
619
|
+
* This is the auto-migration path for operators upgrading past issue #421.
|
|
620
|
+
* The runtime claim filter remains manifest-digest gated, so synthetic-keyed
|
|
621
|
+
* entries don't change task eligibility — they exist purely so the diagnostic
|
|
622
|
+
* surfaces (Overview SOLVING-ON eyebrow, prediction-operator-status) keep
|
|
623
|
+
* showing the operator's previous SolverNets until they re-join via the SPA.
|
|
624
|
+
*
|
|
625
|
+
* Returns the number of legacy entries migrated. Idempotent — calling on an
|
|
626
|
+
* already-migrated raw config is a no-op.
|
|
627
|
+
*
|
|
628
|
+
* @param raw — the JSON-parsed config file contents (mutated in place).
|
|
629
|
+
*/
|
|
630
|
+
export function migrateLegacySolverNets(raw) {
|
|
631
|
+
const legacy = raw['solverNets'];
|
|
632
|
+
if (!legacy || typeof legacy !== 'object' || Array.isArray(legacy)) {
|
|
633
|
+
return 0;
|
|
634
|
+
}
|
|
635
|
+
const entries = Object.entries(legacy);
|
|
636
|
+
if (entries.length === 0) {
|
|
637
|
+
delete raw['solverNets'];
|
|
638
|
+
return 0;
|
|
639
|
+
}
|
|
640
|
+
const joined = (typeof raw['joinedSolverNets'] === 'object' && raw['joinedSolverNets'] !== null && !Array.isArray(raw['joinedSolverNets']))
|
|
641
|
+
? raw['joinedSolverNets']
|
|
642
|
+
: {};
|
|
643
|
+
let migrated = 0;
|
|
644
|
+
for (const [name, entryRaw] of entries) {
|
|
645
|
+
if (!entryRaw || typeof entryRaw !== 'object')
|
|
646
|
+
continue;
|
|
647
|
+
const entry = entryRaw;
|
|
648
|
+
const syntheticKey = `legacy:${name}`;
|
|
649
|
+
// Do not overwrite a pre-existing joinedSolverNets entry under the same key.
|
|
650
|
+
if (joined[syntheticKey] !== undefined)
|
|
651
|
+
continue;
|
|
652
|
+
const contract = parseSolverTypeRef(entry.solverType, name);
|
|
653
|
+
const rolesIn = Array.isArray(entry.roles) && entry.roles.length > 0
|
|
654
|
+
? entry.roles
|
|
655
|
+
: ['solving'];
|
|
656
|
+
const roles = [];
|
|
657
|
+
for (const r of rolesIn) {
|
|
658
|
+
if (r === 'solving')
|
|
659
|
+
roles.push('solver');
|
|
660
|
+
else if (r === 'evaluating')
|
|
661
|
+
roles.push('evaluator');
|
|
662
|
+
// 'launching' (and any other unknown role) is dropped — operator config
|
|
663
|
+
// no longer carries the launcher role per spec §11.
|
|
664
|
+
}
|
|
665
|
+
if (roles.length === 0)
|
|
666
|
+
roles.push('solver');
|
|
667
|
+
joined[syntheticKey] = {
|
|
668
|
+
manifestCid: syntheticKey,
|
|
669
|
+
name,
|
|
670
|
+
contract,
|
|
671
|
+
roles: Array.from(new Set(roles)),
|
|
672
|
+
...(typeof entry.harness === 'string' ? { harness: entry.harness } : {}),
|
|
673
|
+
...(typeof entry.model === 'string' ? { model: entry.model } : {}),
|
|
674
|
+
plugins: Array.isArray(entry.plugins) ? entry.plugins : [],
|
|
675
|
+
disabledDefaultPlugins: [],
|
|
676
|
+
};
|
|
677
|
+
migrated += 1;
|
|
678
|
+
}
|
|
679
|
+
if (Object.keys(joined).length > 0) {
|
|
680
|
+
raw['joinedSolverNets'] = joined;
|
|
681
|
+
}
|
|
682
|
+
delete raw['solverNets'];
|
|
683
|
+
return migrated;
|
|
684
|
+
}
|
|
571
685
|
/**
|
|
572
686
|
* Load config with resolution: env > config file > defaults.
|
|
573
687
|
*
|
|
@@ -614,6 +728,14 @@ export function loadConfig(configPath) {
|
|
|
614
728
|
}
|
|
615
729
|
if (env['JINN_BALANCE_TOPUP_INTERVAL_MS'])
|
|
616
730
|
merged.balanceTopupIntervalMs = Number.parseInt(env['JINN_BALANCE_TOPUP_INTERVAL_MS'], 10);
|
|
731
|
+
if (env['JINN_EVICTION_CHECK_INTERVAL_MS'])
|
|
732
|
+
merged.evictionCheckIntervalMs = Number.parseInt(env['JINN_EVICTION_CHECK_INTERVAL_MS'], 10);
|
|
733
|
+
if (env['JINN_CHECKPOINT_INTERVAL_MS'] !== undefined) {
|
|
734
|
+
merged.checkpointIntervalMs = Number.parseInt(env['JINN_CHECKPOINT_INTERVAL_MS'], 10);
|
|
735
|
+
}
|
|
736
|
+
if (env['JINN_TASK_DISCOVERY_FROM_BLOCK'] !== undefined) {
|
|
737
|
+
merged.taskDiscoveryOnchainFromBlock = Number.parseInt(env['JINN_TASK_DISCOVERY_FROM_BLOCK'], 10);
|
|
738
|
+
}
|
|
617
739
|
if (env['JINN_API_PORT'])
|
|
618
740
|
merged.apiPort = parseInt(env['JINN_API_PORT'], 10);
|
|
619
741
|
if (env['JINN_API_BIND_HOST'])
|
|
@@ -631,6 +753,11 @@ export function loadConfig(configPath) {
|
|
|
631
753
|
if (env['JINN_HERMES_DOCTOR_TIMEOUT_MS']) {
|
|
632
754
|
merged.hermesDoctorTimeoutMs = parseInt(env['JINN_HERMES_DOCTOR_TIMEOUT_MS'], 10);
|
|
633
755
|
}
|
|
756
|
+
if (env['JINN_CODEX_PATH'])
|
|
757
|
+
merged.codexPath = env['JINN_CODEX_PATH'];
|
|
758
|
+
if (env['JINN_CODEX_DOCTOR_TIMEOUT_MS']) {
|
|
759
|
+
merged.codexDoctorTimeoutMs = parseInt(env['JINN_CODEX_DOCTOR_TIMEOUT_MS'], 10);
|
|
760
|
+
}
|
|
634
761
|
if (env['JINN_RUNTIME_MODE'])
|
|
635
762
|
merged.runtimeMode = env['JINN_RUNTIME_MODE'];
|
|
636
763
|
if (env['JINN_PEERS'])
|
|
@@ -647,12 +774,14 @@ export function loadConfig(configPath) {
|
|
|
647
774
|
// A URL only makes sense in http mode — when the operator points
|
|
648
775
|
// JINN_DISCOVERY_URL at a host but doesn't say JINN_DISCOVERY_MODE,
|
|
649
776
|
// default mode to 'http' so the URL is actually consulted (and isn't
|
|
650
|
-
// silently dropped by the on-chain default in createDiscoveryAPI).
|
|
651
|
-
//
|
|
652
|
-
//
|
|
777
|
+
// silently dropped by the on-chain default in createDiscoveryAPI).
|
|
778
|
+
// `fallbackToOnchain` is NOT defaulted on here (since the 2026-05-23
|
|
779
|
+
// substrate incident): silent fall-through hides indexer outages and
|
|
780
|
+
// storms shared RPC. Operators opt in via JINN_DISCOVERY_FALLBACK=1 or
|
|
781
|
+
// the config file when they want it.
|
|
653
782
|
const inferredHttp = !!env['JINN_DISCOVERY_URL'] && !env['JINN_DISCOVERY_MODE'] && !prevDiscovery['mode'];
|
|
654
783
|
const mode = env['JINN_DISCOVERY_MODE'] ?? (inferredHttp ? 'http' : undefined);
|
|
655
|
-
const resolvedFallback = fallbackToOnchain
|
|
784
|
+
const resolvedFallback = fallbackToOnchain;
|
|
656
785
|
merged['discovery'] = {
|
|
657
786
|
...prevDiscovery,
|
|
658
787
|
...(mode ? { mode } : {}),
|
|
@@ -690,6 +819,13 @@ export function loadConfig(configPath) {
|
|
|
690
819
|
merged.jinnMessengerAddress = env['JINN_MESSENGER_ADDRESS'];
|
|
691
820
|
if (env['JINN_MESSENGER_MODE'])
|
|
692
821
|
merged.jinnMessengerMode = env['JINN_MESSENGER_MODE'];
|
|
822
|
+
if (env['JINN_CLAIM_SUBMISSION_MODE']) {
|
|
823
|
+
merged.jinnClaimSubmissionMode = env['JINN_CLAIM_SUBMISSION_MODE'];
|
|
824
|
+
}
|
|
825
|
+
if (env['JINN_CLAIM_LOOP_ENABLED'] !== undefined) {
|
|
826
|
+
const v = env['JINN_CLAIM_LOOP_ENABLED'].trim().toLowerCase();
|
|
827
|
+
merged.jinnClaimLoopEnabled = v === '1' || v === 'true' || v === 'yes';
|
|
828
|
+
}
|
|
693
829
|
if (env['JINN_CLAIM_LOOP_INTERVAL_MS'] !== undefined) {
|
|
694
830
|
merged.jinnClaimLoopIntervalMs = parseInt(env['JINN_CLAIM_LOOP_INTERVAL_MS'], 10);
|
|
695
831
|
}
|
|
@@ -787,7 +923,13 @@ export function loadConfig(configPath) {
|
|
|
787
923
|
const resolvedNetwork = merged.network === 'testnet' ? 'testnet' : 'mainnet';
|
|
788
924
|
// Testnet default: point discovery at the privately-operated Ponder indexer
|
|
789
925
|
// (jinn-mono-280n.4), unless the operator has set their own `discovery` block.
|
|
790
|
-
//
|
|
926
|
+
//
|
|
927
|
+
// `fallbackToOnchain` is NOT defaulted on (since the 2026-05-23 substrate
|
|
928
|
+
// incident): silent fall-through to direct eth_getLogs hides indexer outages
|
|
929
|
+
// and turns every daemon into its own indexer, which storms shared RPC
|
|
930
|
+
// quota and can take the indexer down. Operators opt in explicitly when
|
|
931
|
+
// they need it (typically only when self-hosting an RPC with generous
|
|
932
|
+
// getLogs quotas).
|
|
791
933
|
//
|
|
792
934
|
// Only fill fields the operator left absent — never overwrite an
|
|
793
935
|
// operator-set `url` / `mode` / `fallbackToOnchain`. A bare
|
|
@@ -804,9 +946,17 @@ export function loadConfig(configPath) {
|
|
|
804
946
|
...(existing ?? {}),
|
|
805
947
|
mode: existing?.mode ?? 'http',
|
|
806
948
|
url: existing?.url ?? DEFAULT_TESTNET_DISCOVERY_URL,
|
|
807
|
-
|
|
949
|
+
...(existing?.fallbackToOnchain !== undefined
|
|
950
|
+
? { fallbackToOnchain: existing.fallbackToOnchain }
|
|
951
|
+
: {}),
|
|
808
952
|
};
|
|
809
953
|
}
|
|
954
|
+
if (resolvedNetwork === 'testnet' && !merged.ethereumRpcUrl) {
|
|
955
|
+
merged.ethereumRpcUrl = DEFAULT_TESTNET_ETHEREUM_RPC_URL;
|
|
956
|
+
}
|
|
957
|
+
if (resolvedNetwork === 'testnet' && merged.jinnClaimLoopEnabled === undefined) {
|
|
958
|
+
merged.jinnClaimLoopEnabled = true;
|
|
959
|
+
}
|
|
810
960
|
// Keep the legacy BASE_RPC_URL override for Base mainnet only. Testnet must
|
|
811
961
|
// not silently inherit a mainnet RPC from client/.env during bootstrap.
|
|
812
962
|
if (env['JINN_RPC_URL']) {
|
|
@@ -839,6 +989,17 @@ export function loadConfig(configPath) {
|
|
|
839
989
|
});
|
|
840
990
|
}
|
|
841
991
|
}
|
|
992
|
+
// Auto-migrate any legacy short-name-keyed `solverNets` block into
|
|
993
|
+
// `joinedSolverNets` with synthetic `legacy:<name>` keys. Operators upgrade
|
|
994
|
+
// without an explicit action; the warning surfaces the migration so they
|
|
995
|
+
// know to re-join via the SPA when they want a real manifest CID. See
|
|
996
|
+
// spec/2026-05-25-retire-legacy-solvernets-config.md and issue #421.
|
|
997
|
+
const migratedCount = migrateLegacySolverNets(merged);
|
|
998
|
+
if (migratedCount > 0) {
|
|
999
|
+
console.warn(`[config] Migrated ${migratedCount} legacy solverNets ${migratedCount === 1 ? 'entry' : 'entries'} to joinedSolverNets. ` +
|
|
1000
|
+
'Open Operator > SolverNets in the dashboard to re-join via the registry ' +
|
|
1001
|
+
'(replaces the synthetic legacy:* keys with real manifest CIDs).');
|
|
1002
|
+
}
|
|
842
1003
|
// 3. Validate
|
|
843
1004
|
const result = JinnConfigSchema.safeParse(merged);
|
|
844
1005
|
if (!result.success) {
|
|
@@ -850,17 +1011,56 @@ export function loadConfig(configPath) {
|
|
|
850
1011
|
});
|
|
851
1012
|
}
|
|
852
1013
|
// 4. Resolve rpcUrl default based on network (if not explicitly set).
|
|
853
|
-
// Testnet default
|
|
854
|
-
//
|
|
855
|
-
//
|
|
856
|
-
//
|
|
1014
|
+
// Testnet default per AC2 (issue #592) is a two-provider fallback chain:
|
|
1015
|
+
// slot 0 — base-sepolia.publicnode.com (50k-block getLogs cap, no quota)
|
|
1016
|
+
// slot 1 — sepolia.base.org (free, 2k-block cap; last-resort backup)
|
|
1017
|
+
// Publicnode is no-auth, no shared-key quota cliff (avoids the Tenderly
|
|
1018
|
+
// shared-quota cliff of 2026-05-24 that took out every default-config
|
|
1019
|
+
// daemon at once). See #554 + the NetworkSection.tsx "shared RPC" panel for
|
|
1020
|
+
// the operator-facing pitch to bring their own key. The sibling Ethereum L1
|
|
1021
|
+
// default (DEFAULT_TESTNET_ETHEREUM_RPC_URL above) is already publicnode —
|
|
1022
|
+
// this keeps the two L1/L2 defaults symmetric.
|
|
857
1023
|
const parsed = result.data;
|
|
858
|
-
const
|
|
859
|
-
?
|
|
860
|
-
: 'https://mainnet.base.org';
|
|
1024
|
+
const defaultRpcUrls = parsed.network === 'testnet'
|
|
1025
|
+
? DEFAULT_TESTNET_RPC_URLS
|
|
1026
|
+
: ['https://mainnet.base.org'];
|
|
1027
|
+
const rpcUrlsResolved = parsed.rpcUrl !== undefined
|
|
1028
|
+
? parseRpcUrls(parsed.rpcUrl)
|
|
1029
|
+
: [...defaultRpcUrls];
|
|
1030
|
+
const archiveRpcUrlsResolved = parsed.archiveRpcUrl !== undefined
|
|
1031
|
+
? parseRpcUrls(parsed.archiveRpcUrl)
|
|
1032
|
+
: undefined;
|
|
1033
|
+
const l2ProofRpcUrlsResolved = parsed.l2ProofRpcUrl !== undefined
|
|
1034
|
+
? parseRpcUrls(parsed.l2ProofRpcUrl)
|
|
1035
|
+
: undefined;
|
|
1036
|
+
const ethereumRpcUrlsResolved = parsed.ethereumRpcUrl !== undefined
|
|
1037
|
+
? parseRpcUrls(parsed.ethereumRpcUrl)
|
|
1038
|
+
: undefined;
|
|
1039
|
+
const ethereumArchiveRpcUrlsResolved = parsed.ethereumArchiveRpcUrl !== undefined
|
|
1040
|
+
? parseRpcUrls(parsed.ethereumArchiveRpcUrl)
|
|
1041
|
+
: undefined;
|
|
1042
|
+
// Strip the union-typed (string | string[]) RPC fields from `parsed` — the
|
|
1043
|
+
// returned shape carries the resolved head URL plus a `*Urls` array instead.
|
|
1044
|
+
const { rpcUrl: _rpcUrl, archiveRpcUrl: _archiveRpcUrl, l2ProofRpcUrl: _l2ProofRpcUrl, ethereumRpcUrl: _ethereumRpcUrl, ethereumArchiveRpcUrl: _ethereumArchiveRpcUrl, ...rest } = parsed;
|
|
861
1045
|
return {
|
|
862
|
-
...
|
|
863
|
-
rpcUrl:
|
|
1046
|
+
...rest,
|
|
1047
|
+
rpcUrl: rpcUrlsResolved[0],
|
|
1048
|
+
rpcUrls: rpcUrlsResolved,
|
|
1049
|
+
...(archiveRpcUrlsResolved
|
|
1050
|
+
? { archiveRpcUrl: archiveRpcUrlsResolved[0], archiveRpcUrls: archiveRpcUrlsResolved }
|
|
1051
|
+
: {}),
|
|
1052
|
+
...(l2ProofRpcUrlsResolved
|
|
1053
|
+
? { l2ProofRpcUrl: l2ProofRpcUrlsResolved[0], l2ProofRpcUrls: l2ProofRpcUrlsResolved }
|
|
1054
|
+
: {}),
|
|
1055
|
+
...(ethereumRpcUrlsResolved
|
|
1056
|
+
? { ethereumRpcUrl: ethereumRpcUrlsResolved[0], ethereumRpcUrls: ethereumRpcUrlsResolved }
|
|
1057
|
+
: {}),
|
|
1058
|
+
...(ethereumArchiveRpcUrlsResolved
|
|
1059
|
+
? {
|
|
1060
|
+
ethereumArchiveRpcUrl: ethereumArchiveRpcUrlsResolved[0],
|
|
1061
|
+
ethereumArchiveRpcUrls: ethereumArchiveRpcUrlsResolved,
|
|
1062
|
+
}
|
|
1063
|
+
: {}),
|
|
864
1064
|
// parseTask assigns a UUID to any entry missing an id
|
|
865
1065
|
tasks: parsed.tasks.map(parseTask),
|
|
866
1066
|
engine: {
|
|
@@ -907,6 +1107,7 @@ const TRACKED_ENV_VARS = [
|
|
|
907
1107
|
'JINN_DB_PATH',
|
|
908
1108
|
'JINN_POLL_INTERVAL_MS',
|
|
909
1109
|
'JINN_REWARD_CLAIM_INTERVAL_MS',
|
|
1110
|
+
'JINN_CHECKPOINT_INTERVAL_MS',
|
|
910
1111
|
'JINN_BALANCE_TOPUP_INTERVAL_MS',
|
|
911
1112
|
'JINN_API_PORT',
|
|
912
1113
|
'JINN_API_BIND_HOST',
|
|
@@ -937,6 +1138,8 @@ const TRACKED_ENV_VARS = [
|
|
|
937
1138
|
'JINN_CLAIM_EMITTER_ADDRESS',
|
|
938
1139
|
'JINN_MESSENGER_ADDRESS',
|
|
939
1140
|
'JINN_MESSENGER_MODE',
|
|
1141
|
+
'JINN_CLAIM_SUBMISSION_MODE',
|
|
1142
|
+
'JINN_CLAIM_LOOP_ENABLED',
|
|
940
1143
|
'JINN_CLAIM_LOOP_INTERVAL_MS',
|
|
941
1144
|
'JINN_STAKING_MODE',
|
|
942
1145
|
'JINN_TARGET_SERVICES',
|
|
@@ -961,6 +1164,7 @@ const TRACKED_ENV_VARS = [
|
|
|
961
1164
|
'JINN_CAPTURES_LLM_PROXY_ENABLED',
|
|
962
1165
|
'JINN_CAPTURES_LLM_PROXY_PORT',
|
|
963
1166
|
'JINN_BUILD_COMMIT',
|
|
1167
|
+
'JINN_SPEND_CAP_USD',
|
|
964
1168
|
];
|
|
965
1169
|
/**
|
|
966
1170
|
* Build a structured provenance block describing how the config was resolved.
|