@jinn-network/client 0.1.9 → 0.2.0
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/CONTRIBUTING.md +2 -2
- package/README.md +13 -2
- package/deployments/deployment-phase1b-mech-baseSepolia-fast.json +3 -3
- package/deployments/deployment-stolas-l2-baseSepolia-fast.json +23 -3
- package/deployments/deployment-task-coordinator-router-v3-baseSepolia-fast.json +34 -6
- package/dist/adapters/mech/adapter.d.ts +30 -0
- package/dist/adapters/mech/adapter.js +198 -54
- package/dist/adapters/mech/adapter.js.map +1 -1
- package/dist/adapters/mech/contracts.d.ts +174 -13
- package/dist/adapters/mech/contracts.js +37 -21
- package/dist/adapters/mech/contracts.js.map +1 -1
- package/dist/adapters/mech/ipfs.d.ts +15 -27
- package/dist/adapters/mech/ipfs.js +39 -102
- package/dist/adapters/mech/ipfs.js.map +1 -1
- package/dist/adapters/mech/safe.js +74 -2
- package/dist/adapters/mech/safe.js.map +1 -1
- package/dist/adapters/mech/types.d.ts +15 -130
- package/dist/adapters/mech/types.js +9 -65
- package/dist/adapters/mech/types.js.map +1 -1
- package/dist/api/bootstrap-endpoint.d.ts +19 -3
- package/dist/api/bootstrap-endpoint.js +4 -0
- package/dist/api/bootstrap-endpoint.js.map +1 -1
- package/dist/api/gather-status.d.ts +49 -15
- package/dist/api/gather-status.js +115 -417
- package/dist/api/gather-status.js.map +1 -1
- package/dist/api/harness-auth-status-endpoint.d.ts +21 -0
- package/dist/api/harness-auth-status-endpoint.js +17 -0
- package/dist/api/harness-auth-status-endpoint.js.map +1 -0
- package/dist/api/launcher-endpoints.js +6 -1
- package/dist/api/launcher-endpoints.js.map +1 -1
- package/dist/api/launcher-status.d.ts +2 -0
- package/dist/api/launcher-status.js.map +1 -1
- package/dist/api/launcher-tasks.d.ts +47 -0
- package/dist/api/launcher-tasks.js +88 -3
- package/dist/api/launcher-tasks.js.map +1 -1
- package/dist/api/loop-completion-build.d.ts +2 -2
- package/dist/api/loop-completion-build.js +2 -3
- package/dist/api/loop-completion-build.js.map +1 -1
- package/dist/api/operator-artifacts-endpoint.js +1 -1
- package/dist/api/operator-artifacts-endpoint.js.map +1 -1
- package/dist/api/portfolio-v0-build.d.ts +2 -1
- package/dist/api/portfolio-v0-build.js +5 -7
- package/dist/api/portfolio-v0-build.js.map +1 -1
- package/dist/api/prediction-v1-build.d.ts +2 -2
- package/dist/api/prediction-v1-build.js +5 -7
- package/dist/api/prediction-v1-build.js.map +1 -1
- package/dist/api/rewards-build.d.ts +8 -1
- package/dist/api/rewards-build.js +32 -4
- package/dist/api/rewards-build.js.map +1 -1
- package/dist/api/rewards-endpoint.d.ts +12 -0
- package/dist/api/rewards-endpoint.js +46 -0
- package/dist/api/rewards-endpoint.js.map +1 -0
- package/dist/api/run-outcome.d.ts +49 -0
- package/dist/api/run-outcome.js +65 -0
- package/dist/api/run-outcome.js.map +1 -0
- package/dist/api/server.d.ts +6 -16
- package/dist/api/server.js +36 -26
- package/dist/api/server.js.map +1 -1
- package/dist/api/setup-endpoints.d.ts +32 -0
- package/dist/api/setup-endpoints.js +232 -32
- package/dist/api/setup-endpoints.js.map +1 -1
- package/dist/api/solvernets-endpoints.js +1 -1
- package/dist/api/solvernets-endpoints.js.map +1 -1
- package/dist/api/status-build.d.ts +74 -64
- package/dist/api/status-build.js +31 -55
- package/dist/api/status-build.js.map +1 -1
- package/dist/api/stop-hook.d.ts +1 -1
- package/dist/api/stop-hook.js +1 -1
- package/dist/api/stop-hook.js.map +1 -1
- package/dist/api/task-run-routing.d.ts +1 -1
- package/dist/api/task-runs-build.d.ts +21 -2
- package/dist/api/task-runs-build.js +27 -7
- 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/ingest.d.ts +21 -0
- package/dist/captures/ingest.js +133 -0
- package/dist/captures/ingest.js.map +1 -0
- package/dist/captures/live-publisher.d.ts +9 -0
- package/dist/captures/live-publisher.js +5 -3
- package/dist/captures/live-publisher.js.map +1 -1
- package/dist/captures/publish.d.ts +25 -0
- package/dist/captures/publish.js +17 -7
- package/dist/captures/publish.js.map +1 -1
- package/dist/cli/commands/backfill-failed-deliveries.d.ts +40 -0
- package/dist/cli/commands/backfill-failed-deliveries.js +172 -0
- package/dist/cli/commands/backfill-failed-deliveries.js.map +1 -0
- package/dist/cli/commands/doctor.js +4 -7
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/eval.d.ts +11 -0
- package/dist/cli/commands/eval.js +103 -23
- package/dist/cli/commands/eval.js.map +1 -1
- package/dist/cli/commands/kill.d.ts +14 -0
- package/dist/cli/commands/kill.js +141 -0
- package/dist/cli/commands/kill.js.map +1 -0
- package/dist/cli/commands/rewards.js +17 -15
- package/dist/cli/commands/rewards.js.map +1 -1
- package/dist/cli/commands/run.js +18 -4
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/solver-nets.d.ts +6 -0
- package/dist/cli/commands/solver-nets.js +145 -2
- package/dist/cli/commands/solver-nets.js.map +1 -1
- package/dist/cli/commands/solver-plugins.js +2 -2
- package/dist/cli/commands/solver-plugins.js.map +1 -1
- package/dist/cli/commands/stop.js +97 -21
- package/dist/cli/commands/stop.js.map +1 -1
- package/dist/cli/commands/update.js +8 -0
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/version.js +4 -0
- package/dist/cli/commands/version.js.map +1 -1
- package/dist/cli/execution-context.js +2 -1
- package/dist/cli/execution-context.js.map +1 -1
- package/dist/cli/index.js +4 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/introspection-context.js +0 -3
- package/dist/cli/introspection-context.js.map +1 -1
- package/dist/cli/ui-auto-open-gate.d.ts +22 -0
- package/dist/cli/ui-auto-open-gate.js +24 -0
- package/dist/cli/ui-auto-open-gate.js.map +1 -0
- package/dist/config.d.ts +258 -540
- package/dist/config.js +280 -193
- package/dist/config.js.map +1 -1
- package/dist/conformance/execution-envelope-authenticator.d.ts +2 -0
- package/dist/conformance/execution-envelope-authenticator.js +38 -0
- package/dist/conformance/execution-envelope-authenticator.js.map +1 -0
- package/dist/contracts/abis.d.ts +100 -0
- package/dist/contracts/abis.js +58 -0
- package/dist/contracts/abis.js.map +1 -0
- package/dist/contracts/addresses.d.ts +36 -0
- package/dist/contracts/addresses.js +60 -0
- package/dist/contracts/addresses.js.map +1 -0
- package/dist/corpus/acquire.d.ts +1 -40
- package/dist/corpus/acquire.js +1 -212
- package/dist/corpus/acquire.js.map +1 -1
- package/dist/corpus/cache.d.ts +1 -14
- package/dist/corpus/cache.js +1 -17
- package/dist/corpus/cache.js.map +1 -1
- package/dist/corpus/fetch-artifact.d.ts +1 -0
- package/dist/corpus/fetch-artifact.js +2 -0
- package/dist/corpus/fetch-artifact.js.map +1 -0
- package/dist/corpus/fetch.d.ts +3 -7
- package/dist/corpus/fetch.js +9 -22
- package/dist/corpus/fetch.js.map +1 -1
- package/dist/corpus/index.d.ts +2 -3
- package/dist/corpus/index.js +19 -110
- package/dist/corpus/index.js.map +1 -1
- package/dist/corpus/onchain-query.d.ts +0 -1
- package/dist/corpus/onchain-query.js +2 -5
- package/dist/corpus/onchain-query.js.map +1 -1
- package/dist/corpus/route-resolver.d.ts +1 -16
- package/dist/corpus/route-resolver.js +1 -19
- package/dist/corpus/route-resolver.js.map +1 -1
- package/dist/corpus/types.d.ts +1 -17
- package/dist/corpus/types.js +1 -34
- package/dist/corpus/types.js.map +1 -1
- package/dist/daemon/balance-topup-loop.js +27 -9
- package/dist/daemon/balance-topup-loop.js.map +1 -1
- package/dist/daemon/checkpoint-loop.js +2 -2
- package/dist/daemon/creator.d.ts +1 -0
- package/dist/daemon/creator.js +39 -25
- package/dist/daemon/creator.js.map +1 -1
- package/dist/daemon/daemon.d.ts +31 -12
- package/dist/daemon/daemon.js +138 -32
- package/dist/daemon/daemon.js.map +1 -1
- package/dist/daemon/delivery-watcher.d.ts +9 -0
- package/dist/daemon/delivery-watcher.js +24 -1
- package/dist/daemon/delivery-watcher.js.map +1 -1
- package/dist/daemon/eviction-loop.d.ts +3 -0
- package/dist/daemon/eviction-loop.js +7 -4
- package/dist/daemon/eviction-loop.js.map +1 -1
- package/dist/daemon/harvest-loop.d.ts +72 -0
- package/dist/daemon/harvest-loop.js +474 -0
- package/dist/daemon/harvest-loop.js.map +1 -0
- package/dist/daemon/join-applier.d.ts +40 -0
- package/dist/daemon/join-applier.js +52 -0
- package/dist/daemon/join-applier.js.map +1 -0
- package/dist/daemon/loop-heartbeat.d.ts +95 -0
- package/dist/daemon/loop-heartbeat.js +80 -0
- package/dist/daemon/loop-heartbeat.js.map +1 -0
- package/dist/{api/peers.js → daemon/peer-sync.js} +3 -1
- package/dist/daemon/peer-sync.js.map +1 -0
- package/dist/daemon/reward-claim-loop.js +28 -10
- package/dist/daemon/reward-claim-loop.js.map +1 -1
- package/dist/daemon/skip-log-dedup.d.ts +1 -1
- package/dist/daemon/skip-log-dedup.js +3 -0
- package/dist/daemon/skip-log-dedup.js.map +1 -1
- package/dist/daemon/spend-cap-gate.d.ts +0 -6
- package/dist/daemon/spend-cap-gate.js +1 -8
- package/dist/daemon/spend-cap-gate.js.map +1 -1
- package/dist/daemon/watchdog-loop.d.ts +84 -0
- package/dist/daemon/watchdog-loop.js +91 -0
- package/dist/daemon/watchdog-loop.js.map +1 -0
- package/dist/dashboard/assets/index-C988eu68.js +95 -0
- package/dist/dashboard/assets/index-CawZUjVI.css +1 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/discovery/http.d.ts +10 -0
- package/dist/discovery/http.js +178 -335
- package/dist/discovery/http.js.map +1 -1
- package/dist/discovery/onchain.js +30 -9
- package/dist/discovery/onchain.js.map +1 -1
- package/dist/discovery/types.d.ts +98 -52
- package/dist/discovery/types.js.map +1 -1
- package/dist/discovery/with-fallback.js +19 -0
- package/dist/discovery/with-fallback.js.map +1 -1
- package/dist/earning/bootstrap-run.d.ts +25 -0
- package/dist/earning/bootstrap-run.js +315 -0
- package/dist/earning/bootstrap-run.js.map +1 -0
- package/dist/earning/bootstrap.d.ts +11 -14
- package/dist/earning/bootstrap.js +56 -204
- package/dist/earning/bootstrap.js.map +1 -1
- package/dist/earning/contracts.d.ts +2 -232
- package/dist/earning/contracts.js +16 -205
- package/dist/earning/contracts.js.map +1 -1
- package/dist/earning/faucet-topup-store.d.ts +41 -0
- package/dist/earning/faucet-topup-store.js +89 -0
- package/dist/earning/faucet-topup-store.js.map +1 -0
- package/dist/earning/master-gas.d.ts +10 -0
- package/dist/earning/master-gas.js +11 -0
- package/dist/earning/master-gas.js.map +1 -0
- package/dist/earning/safe-adapter.js +1 -45
- package/dist/earning/safe-adapter.js.map +1 -1
- package/dist/earning/steps/context.d.ts +42 -0
- package/dist/earning/steps/context.js +4 -0
- package/dist/earning/steps/context.js.map +1 -0
- package/dist/earning/steps/fleet-identity-register.d.ts +4 -0
- package/dist/earning/steps/fleet-identity-register.js +65 -0
- package/dist/earning/steps/fleet-identity-register.js.map +1 -0
- package/dist/earning/steps/fleet-safe-deploy.d.ts +4 -0
- package/dist/earning/steps/fleet-safe-deploy.js +62 -0
- package/dist/earning/steps/fleet-safe-deploy.js.map +1 -0
- package/dist/earning/steps/fleet-safe-predict.d.ts +4 -0
- package/dist/earning/steps/fleet-safe-predict.js +18 -0
- package/dist/earning/steps/fleet-safe-predict.js.map +1 -0
- package/dist/earning/steps/receipt-parsing.d.ts +12 -0
- package/dist/earning/steps/receipt-parsing.js +71 -0
- package/dist/earning/steps/receipt-parsing.js.map +1 -0
- package/dist/earning/stolas-claim.js +8 -8
- package/dist/earning/stolas-claim.js.map +1 -1
- package/dist/earning/{jinn-rewards.d.ts → stolas-staking.d.ts} +4 -8
- package/dist/earning/{jinn-rewards.js → stolas-staking.js} +25 -23
- package/dist/earning/stolas-staking.js.map +1 -0
- package/dist/earning/testnet-setup-migration.d.ts +1 -0
- package/dist/earning/testnet-setup-migration.js +7 -2
- package/dist/earning/testnet-setup-migration.js.map +1 -1
- package/dist/earning/types.d.ts +9 -9
- package/dist/earning/types.js +1 -1
- package/dist/earning/types.js.map +1 -1
- package/dist/earning/viem-clients.d.ts +3 -19
- package/dist/earning/viem-clients.js +4 -31
- package/dist/earning/viem-clients.js.map +1 -1
- package/dist/erc8004/abis.d.ts +16 -0
- package/dist/erc8004/abis.js +12 -0
- package/dist/erc8004/abis.js.map +1 -1
- package/dist/erc8004/addresses.d.ts +6 -5
- package/dist/erc8004/addresses.js +7 -5
- package/dist/erc8004/addresses.js.map +1 -1
- package/dist/erc8004/identity.d.ts +54 -1
- package/dist/erc8004/identity.js +114 -5
- package/dist/erc8004/identity.js.map +1 -1
- package/dist/erc8004/index.d.ts +5 -2
- package/dist/erc8004/index.js +6 -2
- package/dist/erc8004/index.js.map +1 -1
- package/dist/erc8004/manifest-consumer.d.ts +32 -0
- package/dist/erc8004/manifest-consumer.js +95 -0
- package/dist/erc8004/manifest-consumer.js.map +1 -0
- package/dist/erc8004/manifest-registry.d.ts +1 -0
- package/dist/erc8004/manifest-registry.js +2 -0
- package/dist/erc8004/manifest-registry.js.map +1 -0
- package/dist/erc8004/merkle.d.ts +1 -0
- package/dist/erc8004/merkle.js +2 -0
- package/dist/erc8004/merkle.js.map +1 -0
- package/dist/erc8004/publisher-safe-resolver.d.ts +32 -0
- package/dist/erc8004/publisher-safe-resolver.js +102 -0
- package/dist/erc8004/publisher-safe-resolver.js.map +1 -0
- package/dist/erc8004/reputation.js +16 -12
- package/dist/erc8004/reputation.js.map +1 -1
- package/dist/erc8004/validation.js +5 -4
- package/dist/erc8004/validation.js.map +1 -1
- package/dist/eval/attribution-instrument.d.ts +190 -0
- package/dist/eval/attribution-instrument.js +719 -0
- package/dist/eval/attribution-instrument.js.map +1 -0
- package/dist/eval/attribution-verdict-evidence.d.ts +41 -0
- package/dist/eval/attribution-verdict-evidence.js +124 -0
- package/dist/eval/attribution-verdict-evidence.js.map +1 -0
- package/dist/eval/capability-slate.d.ts +64 -0
- package/dist/eval/capability-slate.js +136 -0
- package/dist/eval/capability-slate.js.map +1 -0
- package/dist/eval/capability-stats.d.ts +39 -0
- package/dist/eval/capability-stats.js +123 -0
- package/dist/eval/capability-stats.js.map +1 -0
- package/dist/eval/contested-band.d.ts +18 -0
- package/dist/eval/contested-band.js +19 -0
- package/dist/eval/contested-band.js.map +1 -0
- package/dist/eval/corpus-index.d.ts +21 -0
- package/dist/eval/corpus-index.js +55 -0
- package/dist/eval/corpus-index.js.map +1 -0
- package/dist/eval/disjointness.d.ts +26 -0
- package/dist/eval/disjointness.js +67 -0
- package/dist/eval/disjointness.js.map +1 -0
- package/dist/eval/mcnemar-power.d.ts +14 -0
- package/dist/eval/mcnemar-power.js +40 -0
- package/dist/eval/mcnemar-power.js.map +1 -0
- package/dist/eval/orchestrator.d.ts +64 -3
- package/dist/eval/orchestrator.js +37 -19
- package/dist/eval/orchestrator.js.map +1 -1
- package/dist/eval/paired.d.ts +2 -68
- package/dist/eval/paired.js +2 -92
- package/dist/eval/paired.js.map +1 -1
- package/dist/eval/resolve-slate-tasks.js +2 -2
- package/dist/eval/resolve-slate-tasks.js.map +1 -1
- package/dist/eval/screen-discovery.d.ts +5 -8
- package/dist/eval/screen-discovery.js +13 -55
- package/dist/eval/screen-discovery.js.map +1 -1
- package/dist/events/types.d.ts +1 -1
- package/dist/events/types.js +1 -1
- package/dist/events/types.js.map +1 -1
- package/dist/harnesses/auth-source.d.ts +51 -0
- package/dist/harnesses/auth-source.js +155 -0
- package/dist/harnesses/auth-source.js.map +1 -0
- package/dist/harnesses/engine/backfill-failed-deliveries.d.ts +59 -0
- package/dist/harnesses/engine/backfill-failed-deliveries.js +94 -0
- package/dist/harnesses/engine/backfill-failed-deliveries.js.map +1 -0
- package/dist/harnesses/engine/canonical-json.d.ts +2 -1
- package/dist/harnesses/engine/canonical-json.js +2 -67
- package/dist/harnesses/engine/canonical-json.js.map +1 -1
- package/dist/harnesses/engine/corpus-knowledge.d.ts +67 -0
- package/dist/harnesses/engine/corpus-knowledge.js +194 -0
- package/dist/harnesses/engine/corpus-knowledge.js.map +1 -0
- package/dist/harnesses/engine/engine.d.ts +85 -1
- package/dist/harnesses/engine/engine.js +313 -6
- package/dist/harnesses/engine/engine.js.map +1 -1
- package/dist/harnesses/engine/envelope-assembly.d.ts +9 -1
- package/dist/harnesses/engine/envelope-assembly.js +6 -0
- package/dist/harnesses/engine/envelope-assembly.js.map +1 -1
- package/dist/harnesses/engine/generator-model.d.ts +36 -0
- package/dist/harnesses/engine/generator-model.js +118 -0
- package/dist/harnesses/engine/generator-model.js.map +1 -0
- package/dist/harnesses/engine/packaging.js +5 -5
- package/dist/harnesses/engine/packaging.js.map +1 -1
- package/dist/harnesses/engine/persistence.d.ts +37 -62
- package/dist/harnesses/engine/persistence.js +66 -0
- package/dist/harnesses/engine/persistence.js.map +1 -1
- package/dist/harnesses/impls/_evaluator-base.d.ts +48 -0
- package/dist/harnesses/impls/_evaluator-base.js +35 -0
- package/dist/harnesses/impls/_evaluator-base.js.map +1 -0
- package/dist/harnesses/impls/claude-mcp-hyperliquid/mcp-tools.d.ts +1 -1
- package/dist/harnesses/impls/claude-mcp-hyperliquid/mcp-tools.js +1 -1
- package/dist/harnesses/impls/claude-mcp-hyperliquid/mcp-tools.js.map +1 -1
- package/dist/harnesses/impls/claude-mcp-prediction/index.d.ts +2 -3
- package/dist/harnesses/impls/claude-mcp-prediction/index.js +29 -99
- package/dist/harnesses/impls/claude-mcp-prediction/index.js.map +1 -1
- package/dist/harnesses/impls/claude-mcp-prediction/mcp-tools.js +4 -21
- package/dist/harnesses/impls/claude-mcp-prediction/mcp-tools.js.map +1 -1
- package/dist/harnesses/impls/claude-mcp-prediction/session-orchestrator.d.ts +2 -0
- package/dist/harnesses/impls/claude-mcp-prediction/session-orchestrator.js +1 -1
- package/dist/harnesses/impls/claude-mcp-prediction/session-orchestrator.js.map +1 -1
- package/dist/harnesses/impls/claude-mcp-prediction-apy/index.js +30 -79
- package/dist/harnesses/impls/claude-mcp-prediction-apy/index.js.map +1 -1
- package/dist/harnesses/impls/claude-mcp-prediction-apy/mcp-tools.js +4 -19
- package/dist/harnesses/impls/claude-mcp-prediction-apy/mcp-tools.js.map +1 -1
- package/dist/harnesses/impls/claude-mcp-prediction-apy/session-orchestrator.d.ts +2 -0
- package/dist/harnesses/impls/claude-mcp-prediction-apy/session-orchestrator.js +1 -1
- package/dist/harnesses/impls/claude-mcp-prediction-apy/session-orchestrator.js.map +1 -1
- package/dist/harnesses/impls/claude-mcp-shared/mcp-server-script.d.ts +39 -0
- package/dist/harnesses/impls/claude-mcp-shared/mcp-server-script.js +62 -0
- package/dist/harnesses/impls/claude-mcp-shared/mcp-server-script.js.map +1 -0
- package/dist/harnesses/impls/claude-mcp-shared/mcp-server.d.ts +40 -0
- package/dist/harnesses/impls/claude-mcp-shared/mcp-server.js +44 -0
- package/dist/harnesses/impls/claude-mcp-shared/mcp-server.js.map +1 -0
- package/dist/harnesses/impls/claude-mcp-shared/single-session-harness.d.ts +56 -0
- package/dist/harnesses/impls/claude-mcp-shared/single-session-harness.js +79 -0
- package/dist/harnesses/impls/claude-mcp-shared/single-session-harness.js.map +1 -0
- package/dist/harnesses/impls/hermes-agent/adapter.js +56 -2
- package/dist/harnesses/impls/hermes-agent/adapter.js.map +1 -1
- package/dist/harnesses/impls/hermes-agent/bootstrap.d.ts +6 -0
- package/dist/harnesses/impls/hermes-agent/bootstrap.js +7 -2
- package/dist/harnesses/impls/hermes-agent/bootstrap.js.map +1 -1
- package/dist/harnesses/impls/hermes-agent/harness.d.ts +8 -0
- package/dist/harnesses/impls/hermes-agent/harness.js +21 -0
- package/dist/harnesses/impls/hermes-agent/harness.js.map +1 -1
- package/dist/harnesses/impls/index.js +8 -1
- package/dist/harnesses/impls/index.js.map +1 -1
- package/dist/harnesses/impls/jinn-repo-evaluator/eval-runner.d.ts +34 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/eval-runner.js +111 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/eval-runner.js.map +1 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/evaluator.d.ts +24 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/evaluator.js +19 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/evaluator.js.map +1 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/harness.d.ts +97 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/harness.js +265 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/harness.js.map +1 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/live-eval-runner.d.ts +68 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/live-eval-runner.js +223 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/live-eval-runner.js.map +1 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/repro.d.ts +32 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/repro.js +73 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/repro.js.map +1 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/scope-tests.d.ts +62 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/scope-tests.js +91 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/scope-tests.js.map +1 -0
- package/dist/harnesses/impls/learner/adapters/claude-code.js +9 -2
- package/dist/harnesses/impls/learner/adapters/claude-code.js.map +1 -1
- package/dist/harnesses/impls/learner/adapters/codex-code.d.ts +11 -1
- package/dist/harnesses/impls/learner/adapters/codex-code.js +130 -15
- package/dist/harnesses/impls/learner/adapters/codex-code.js.map +1 -1
- package/dist/harnesses/impls/learner/harness.d.ts +12 -0
- package/dist/harnesses/impls/learner/harness.js +42 -0
- package/dist/harnesses/impls/learner/harness.js.map +1 -1
- package/dist/harnesses/impls/learner/harvest.js +51 -1
- package/dist/harnesses/impls/learner/harvest.js.map +1 -1
- package/dist/harnesses/impls/portfolio-v0-evaluator/index.d.ts +5 -15
- package/dist/harnesses/impls/portfolio-v0-evaluator/index.js +10 -29
- package/dist/harnesses/impls/portfolio-v0-evaluator/index.js.map +1 -1
- package/dist/harnesses/impls/prediction-apy-v0-evaluator/index.d.ts +5 -15
- package/dist/harnesses/impls/prediction-apy-v0-evaluator/index.js +10 -23
- package/dist/harnesses/impls/prediction-apy-v0-evaluator/index.js.map +1 -1
- package/dist/harnesses/impls/prediction-v0-evaluator/index.d.ts +5 -15
- package/dist/harnesses/impls/prediction-v0-evaluator/index.js +10 -25
- package/dist/harnesses/impls/prediction-v0-evaluator/index.js.map +1 -1
- package/dist/harnesses/impls/stub.d.ts +2 -2
- package/dist/harnesses/impls/stub.js +2 -2
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.js +16 -2
- 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 +65 -6
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/harness.js +590 -35
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/harness.js.map +1 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/hf-fetcher.js +4 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/hf-fetcher.js.map +1 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/routing-task-row-fetcher.d.ts +37 -0
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/routing-task-row-fetcher.js +59 -0
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/routing-task-row-fetcher.js.map +1 -0
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/upstream-patches/passed-actual.patch +21 -0
- package/dist/harnesses/readiness-registry.d.ts +16 -0
- package/dist/harnesses/readiness-registry.js +28 -6
- package/dist/harnesses/readiness-registry.js.map +1 -1
- package/dist/harnesses/types.d.ts +12 -0
- package/dist/learner/verification-gate.d.ts +53 -0
- package/dist/learner/verification-gate.js +80 -0
- package/dist/learner/verification-gate.js.map +1 -0
- package/dist/lifecycle/process-discovery.d.ts +41 -0
- package/dist/lifecycle/process-discovery.js +109 -0
- package/dist/lifecycle/process-discovery.js.map +1 -0
- package/dist/main.js +358 -581
- package/dist/main.js.map +1 -1
- package/dist/mcp/acquire-artifact.d.ts +3 -3
- package/dist/mcp/acquire-artifact.js +3 -3
- package/dist/mcp/operator-server.js +1 -1
- package/dist/mcp/operator-server.js.map +1 -1
- package/dist/mcp/server.js +5 -6
- package/dist/mcp/server.js.map +1 -1
- package/dist/monitoring/net-liveness.d.ts +143 -0
- package/dist/monitoring/net-liveness.js +301 -0
- package/dist/monitoring/net-liveness.js.map +1 -0
- package/dist/observability/emit-event.d.ts +1 -1
- package/dist/observability/emit-event.js +2 -4
- package/dist/observability/emit-event.js.map +1 -1
- package/dist/observability/progress.d.ts +11 -0
- package/dist/observability/progress.js +16 -0
- package/dist/observability/progress.js.map +1 -0
- package/dist/pilot/arm-homes.d.ts +39 -0
- package/dist/pilot/arm-homes.js +104 -0
- package/dist/pilot/arm-homes.js.map +1 -0
- package/dist/pilot/cost.d.ts +19 -0
- package/dist/pilot/cost.js +31 -0
- package/dist/pilot/cost.js.map +1 -0
- package/dist/pilot/instance.d.ts +26 -0
- package/dist/pilot/instance.js +53 -0
- package/dist/pilot/instance.js.map +1 -0
- package/dist/pilot/pipeline.d.ts +17 -0
- package/dist/pilot/pipeline.js +35 -0
- package/dist/pilot/pipeline.js.map +1 -0
- package/dist/pilot/repo.d.ts +37 -0
- package/dist/pilot/repo.js +65 -0
- package/dist/pilot/repo.js.map +1 -0
- package/dist/pilot/resume.d.ts +101 -0
- package/dist/pilot/resume.js +204 -0
- package/dist/pilot/resume.js.map +1 -0
- package/dist/pilot/solve.d.ts +23 -0
- package/dist/pilot/solve.js +37 -0
- package/dist/pilot/solve.js.map +1 -0
- package/dist/pilot/tally.d.ts +42 -0
- package/dist/pilot/tally.js +100 -0
- package/dist/pilot/tally.js.map +1 -0
- package/dist/pilot/task-selection.d.ts +27 -0
- package/dist/pilot/task-selection.js +112 -0
- package/dist/pilot/task-selection.js.map +1 -0
- package/dist/plugins/resolvers.js +7 -4
- package/dist/plugins/resolvers.js.map +1 -1
- package/dist/plugins/types.d.ts +8 -0
- package/dist/preflight/deployment-readiness.d.ts +2 -22
- package/dist/preflight/deployment-readiness.js +1 -59
- package/dist/preflight/deployment-readiness.js.map +1 -1
- package/dist/preflight/pidfile-liveness.d.ts +3 -2
- package/dist/preflight/pidfile-liveness.js +18 -2
- package/dist/preflight/pidfile-liveness.js.map +1 -1
- package/dist/preflight/rpc-network.d.ts +10 -3
- package/dist/preflight/rpc-network.js +46 -13
- package/dist/preflight/rpc-network.js.map +1 -1
- package/dist/preflight/stable-cwd.d.ts +29 -0
- package/dist/preflight/stable-cwd.js +98 -0
- package/dist/preflight/stable-cwd.js.map +1 -0
- package/dist/preflight/version-check.d.ts +41 -0
- package/dist/preflight/version-check.js +80 -0
- package/dist/preflight/version-check.js.map +1 -0
- package/dist/rpc/transport.d.ts +7 -5
- package/dist/rpc/transport.js +8 -6
- package/dist/rpc/transport.js.map +1 -1
- package/dist/scripts/swe-rebench-v2-evaluator.bundle.v1.patch +79 -0
- package/dist/solver-nets/registry.d.ts +19 -0
- package/dist/solver-nets/registry.js +99 -66
- package/dist/solver-nets/registry.js.map +1 -1
- package/dist/solver-types/_jinn-repo-pool.d.ts +61 -0
- package/dist/solver-types/_jinn-repo-pool.js +34 -0
- package/dist/solver-types/_jinn-repo-pool.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-commit-echo-git.d.ts +46 -0
- package/dist/solver-types/_swe-rebench-v2-commit-echo-git.js +192 -0
- package/dist/solver-types/_swe-rebench-v2-commit-echo-git.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-commit-echo.d.ts +57 -0
- package/dist/solver-types/_swe-rebench-v2-commit-echo.js +57 -0
- package/dist/solver-types/_swe-rebench-v2-commit-echo.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-differential-admission.d.ts +395 -0
- package/dist/solver-types/_swe-rebench-v2-differential-admission.js +231 -0
- package/dist/solver-types/_swe-rebench-v2-differential-admission.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-empirical-tests.d.ts +47 -0
- package/dist/solver-types/_swe-rebench-v2-empirical-tests.js +67 -0
- package/dist/solver-types/_swe-rebench-v2-empirical-tests.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-escrow.d.ts +2 -0
- package/dist/solver-types/_swe-rebench-v2-escrow.js +13 -0
- package/dist/solver-types/_swe-rebench-v2-escrow.js.map +1 -1
- package/dist/solver-types/_swe-rebench-v2-guards.d.ts +44 -0
- package/dist/solver-types/_swe-rebench-v2-guards.js +111 -0
- package/dist/solver-types/_swe-rebench-v2-guards.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-harvest-state.d.ts +191 -0
- package/dist/solver-types/_swe-rebench-v2-harvest-state.js +349 -0
- package/dist/solver-types/_swe-rebench-v2-harvest-state.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-harvest.d.ts +123 -0
- package/dist/solver-types/_swe-rebench-v2-harvest.js +539 -0
- package/dist/solver-types/_swe-rebench-v2-harvest.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-held-out-slate.d.ts +1 -1
- package/dist/solver-types/_swe-rebench-v2-held-out-slate.js +1 -1
- package/dist/solver-types/_swe-rebench-v2-held-out-slate.js.map +1 -1
- package/dist/solver-types/_swe-rebench-v2-hunk-echo.d.ts +28 -0
- package/dist/solver-types/_swe-rebench-v2-hunk-echo.js +32 -0
- package/dist/solver-types/_swe-rebench-v2-hunk-echo.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-lookup-tripwire.d.ts +16 -0
- package/dist/solver-types/_swe-rebench-v2-lookup-tripwire.js +18 -0
- package/dist/solver-types/_swe-rebench-v2-lookup-tripwire.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-mineable-store-port.d.ts +74 -0
- package/dist/solver-types/_swe-rebench-v2-mineable-store-port.js +9 -0
- package/dist/solver-types/_swe-rebench-v2-mineable-store-port.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-mineable-store.d.ts +51 -0
- package/dist/solver-types/_swe-rebench-v2-mineable-store.js +171 -0
- package/dist/solver-types/_swe-rebench-v2-mineable-store.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-mint-cli.d.ts +82 -0
- package/dist/solver-types/_swe-rebench-v2-mint-cli.js +434 -0
- package/dist/solver-types/_swe-rebench-v2-mint-cli.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-minted-environment-verifier.d.ts +25 -0
- package/dist/solver-types/_swe-rebench-v2-minted-environment-verifier.js +101 -0
- package/dist/solver-types/_swe-rebench-v2-minted-environment-verifier.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-minted-pool.d.ts +179 -0
- package/dist/solver-types/_swe-rebench-v2-minted-pool.js +408 -0
- package/dist/solver-types/_swe-rebench-v2-minted-pool.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-session-echo.d.ts +36 -0
- package/dist/solver-types/_swe-rebench-v2-session-echo.js +193 -0
- package/dist/solver-types/_swe-rebench-v2-session-echo.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-substrate.d.ts +11 -0
- package/dist/solver-types/_swe-rebench-v2-substrate.js +24 -0
- package/dist/solver-types/_swe-rebench-v2-substrate.js.map +1 -1
- package/dist/solver-types/_swe-rebench-v2-synthetic-claim.d.ts +9 -0
- package/dist/solver-types/_swe-rebench-v2-synthetic-claim.js +16 -0
- package/dist/solver-types/_swe-rebench-v2-synthetic-claim.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-validated-pool.d.ts +144 -1
- package/dist/solver-types/_swe-rebench-v2-validated-pool.js +292 -14
- package/dist/solver-types/_swe-rebench-v2-validated-pool.js.map +1 -1
- package/dist/solver-types/_swe-rebench-v2-verifier-facts.d.ts +93 -0
- package/dist/solver-types/_swe-rebench-v2-verifier-facts.js +583 -0
- package/dist/solver-types/_swe-rebench-v2-verifier-facts.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-yield-report-data.d.ts +5 -0
- package/dist/solver-types/_swe-rebench-v2-yield-report-data.js +16 -0
- package/dist/solver-types/_swe-rebench-v2-yield-report-data.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-yield.d.ts +51 -0
- package/dist/solver-types/_swe-rebench-v2-yield.js +53 -0
- package/dist/solver-types/_swe-rebench-v2-yield.js.map +1 -0
- package/dist/solver-types/index.js +2 -0
- package/dist/solver-types/index.js.map +1 -1
- package/dist/solver-types/jinn-repo-admit.d.ts +17 -0
- package/dist/solver-types/jinn-repo-admit.js +16 -0
- package/dist/solver-types/jinn-repo-admit.js.map +1 -0
- package/dist/solver-types/jinn-repo-auto.d.ts +60 -0
- package/dist/solver-types/jinn-repo-auto.js +163 -0
- package/dist/solver-types/jinn-repo-auto.js.map +1 -0
- package/dist/solver-types/jinn-repo-definition.d.ts +15 -0
- package/dist/solver-types/jinn-repo-definition.js +34 -0
- package/dist/solver-types/jinn-repo-definition.js.map +1 -0
- package/dist/solver-types/jinn-repo-extract.d.ts +16 -0
- package/dist/solver-types/jinn-repo-extract.js +33 -0
- package/dist/solver-types/jinn-repo-extract.js.map +1 -0
- package/dist/solver-types/jinn-repo-live-auto.d.ts +203 -0
- package/dist/solver-types/jinn-repo-live-auto.js +348 -0
- package/dist/solver-types/jinn-repo-live-auto.js.map +1 -0
- package/dist/solver-types/jinn-repo.d.ts +42 -0
- package/dist/solver-types/jinn-repo.js +42 -0
- package/dist/solver-types/jinn-repo.js.map +1 -0
- package/dist/solver-types/learner-loop-test.js +1 -1
- package/dist/solver-types/learner-loop-test.js.map +1 -1
- package/dist/solver-types/slates/held-out-slate.swe-rebench-v2.v3.json +34 -0
- package/dist/solver-types/slates/held-out-slate.swe-rebench-v2.v3.quality-screen.json +186 -0
- package/dist/solver-types/slates/held-out-slate.swe-rebench-v2.v3.screening-report.json +488 -0
- package/dist/solver-types/swe-rebench-v2-auto.d.ts +13 -0
- package/dist/solver-types/swe-rebench-v2-auto.js +36 -1
- package/dist/solver-types/swe-rebench-v2-auto.js.map +1 -1
- package/dist/solver-types/swe-rebench-v2.js +48 -11
- package/dist/solver-types/swe-rebench-v2.js.map +1 -1
- package/dist/solvernets/launched-record-dispatcher.d.ts +14 -0
- package/dist/solvernets/launched-record-dispatcher.js +28 -1
- package/dist/solvernets/launched-record-dispatcher.js.map +1 -1
- package/dist/solvernets/store.d.ts +1 -1
- package/dist/solvernets/store.js +1 -1
- package/dist/solvernets/store.js.map +1 -1
- package/dist/spend/credential.d.ts +2 -2
- package/dist/spend/credential.js +9 -3
- package/dist/spend/credential.js.map +1 -1
- package/dist/spend/spend-cap.d.ts +10 -0
- package/dist/spend/spend-cap.js +13 -0
- package/dist/spend/spend-cap.js.map +1 -0
- package/dist/spend/usage.js +39 -3
- package/dist/spend/usage.js.map +1 -1
- package/dist/store/store.d.ts +59 -1
- package/dist/store/store.js +157 -6
- package/dist/store/store.js.map +1 -1
- package/dist/task-creator/environment/adapters.d.ts +139 -0
- package/dist/task-creator/environment/adapters.js +446 -0
- package/dist/task-creator/environment/adapters.js.map +1 -0
- package/dist/task-creator/environment/build.d.ts +5 -0
- package/dist/task-creator/environment/build.js +53 -0
- package/dist/task-creator/environment/build.js.map +1 -0
- package/dist/task-creator/environment/contracts.d.ts +1338 -0
- package/dist/task-creator/environment/contracts.js +207 -0
- package/dist/task-creator/environment/contracts.js.map +1 -0
- package/dist/task-creator/environment/github.d.ts +25 -0
- package/dist/task-creator/environment/github.js +67 -0
- package/dist/task-creator/environment/github.js.map +1 -0
- package/dist/task-creator/environment/interfaces.d.ts +60 -0
- package/dist/task-creator/environment/interfaces.js +3 -0
- package/dist/task-creator/environment/interfaces.js.map +1 -0
- package/dist/task-creator/environment/jinn-differential-policy.d.ts +22 -0
- package/dist/task-creator/environment/jinn-differential-policy.js +73 -0
- package/dist/task-creator/environment/jinn-differential-policy.js.map +1 -0
- package/dist/task-creator/environment/policy.d.ts +38 -0
- package/dist/task-creator/environment/policy.js +51 -0
- package/dist/task-creator/environment/policy.js.map +1 -0
- package/dist/task-creator/environment/publication.d.ts +39 -0
- package/dist/task-creator/environment/publication.js +139 -0
- package/dist/task-creator/environment/publication.js.map +1 -0
- package/dist/task-creator/environment/publish-cli.d.ts +427 -0
- package/dist/task-creator/environment/publish-cli.js +180 -0
- package/dist/task-creator/environment/publish-cli.js.map +1 -0
- package/dist/task-creator/environment/recipes.d.ts +19 -0
- package/dist/task-creator/environment/recipes.js +122 -0
- package/dist/task-creator/environment/recipes.js.map +1 -0
- package/dist/task-creator/environment/resolver.d.ts +53 -0
- package/dist/task-creator/environment/resolver.js +57 -0
- package/dist/task-creator/environment/resolver.js.map +1 -0
- package/dist/task-creator/proofs/differential-receipt-bound-proof.d.ts +27 -0
- package/dist/task-creator/proofs/differential-receipt-bound-proof.js +86 -0
- package/dist/task-creator/proofs/differential-receipt-bound-proof.js.map +1 -0
- package/dist/task-creator/proofs/ipfs-cid.d.ts +7 -0
- package/dist/task-creator/proofs/ipfs-cid.js +98 -0
- package/dist/task-creator/proofs/ipfs-cid.js.map +1 -0
- package/dist/task-creator/proofs/live-proof.d.ts +99 -0
- package/dist/task-creator/proofs/live-proof.js +419 -0
- package/dist/task-creator/proofs/live-proof.js.map +1 -0
- package/dist/task-creator/proofs/public-repo-fixtures.d.ts +53 -0
- package/dist/task-creator/proofs/public-repo-fixtures.js +93 -0
- package/dist/task-creator/proofs/public-repo-fixtures.js.map +1 -0
- package/dist/task-creator/proofs/vitest-json-fixture.d.ts +40 -0
- package/dist/task-creator/proofs/vitest-json-fixture.js +115 -0
- package/dist/task-creator/proofs/vitest-json-fixture.js.map +1 -0
- package/dist/trajectory/emit.d.ts +6 -0
- package/dist/trajectory/emit.js +9 -1
- package/dist/trajectory/emit.js.map +1 -1
- package/dist/trajectory/harness-bundle-schema.d.ts +3 -3
- package/dist/trajectory/harness-bundle-schema.js +1 -1
- package/dist/trajectory/harness-bundle-schema.js.map +1 -1
- package/dist/trajectory/hash-chain.d.ts +1 -18
- package/dist/trajectory/hash-chain.js +1 -22
- package/dist/trajectory/hash-chain.js.map +1 -1
- package/dist/trajectory/index.d.ts +2 -0
- package/dist/trajectory/index.js +2 -0
- package/dist/trajectory/index.js.map +1 -1
- package/dist/trajectory/processors/identity-scrub.js +22 -3
- package/dist/trajectory/processors/identity-scrub.js.map +1 -1
- package/dist/trajectory/schema.d.ts +1 -598
- package/dist/trajectory/schema.js +1 -102
- package/dist/trajectory/schema.js.map +1 -1
- package/dist/trajectory/scrub/build.d.ts +1 -0
- package/dist/trajectory/scrub/build.js +2 -0
- package/dist/trajectory/scrub/build.js.map +1 -0
- package/dist/trajectory/scrub/emit-scrub.d.ts +1 -0
- package/dist/trajectory/scrub/emit-scrub.js +2 -0
- package/dist/trajectory/scrub/emit-scrub.js.map +1 -0
- package/dist/trajectory/scrub/key-policy.d.ts +1 -0
- package/dist/trajectory/scrub/key-policy.js +2 -0
- package/dist/trajectory/scrub/key-policy.js.map +1 -0
- package/dist/trajectory/scrub/layer2.d.ts +1 -0
- package/dist/trajectory/scrub/layer2.js +2 -0
- package/dist/trajectory/scrub/layer2.js.map +1 -0
- package/dist/trajectory/scrub/ml-pii-stage.d.ts +1 -0
- package/dist/trajectory/scrub/ml-pii-stage.js +2 -0
- package/dist/trajectory/scrub/ml-pii-stage.js.map +1 -0
- package/dist/trajectory/scrub/openredaction-stage.d.ts +1 -0
- package/dist/trajectory/scrub/openredaction-stage.js +2 -0
- package/dist/trajectory/scrub/openredaction-stage.js.map +1 -0
- package/dist/trajectory/scrub/pii-build.d.ts +1 -0
- package/dist/trajectory/scrub/pii-build.js +2 -0
- package/dist/trajectory/scrub/pii-build.js.map +1 -0
- package/dist/trajectory/scrub/pipeline.d.ts +1 -0
- package/dist/trajectory/scrub/pipeline.js +2 -0
- package/dist/trajectory/scrub/pipeline.js.map +1 -0
- package/dist/trajectory/scrub/plain-patterns-stage.d.ts +1 -0
- package/dist/trajectory/scrub/plain-patterns-stage.js +2 -0
- package/dist/trajectory/scrub/plain-patterns-stage.js.map +1 -0
- package/dist/trajectory/scrub/secretlint-stage.d.ts +1 -0
- package/dist/trajectory/scrub/secretlint-stage.js +2 -0
- package/dist/trajectory/scrub/secretlint-stage.js.map +1 -0
- package/dist/trajectory/scrub/transformers-detector.d.ts +1 -0
- package/dist/trajectory/scrub/transformers-detector.js +2 -0
- package/dist/trajectory/scrub/transformers-detector.js.map +1 -0
- package/dist/trajectory/scrub/types.d.ts +1 -0
- package/dist/trajectory/scrub/types.js +2 -0
- package/dist/trajectory/scrub/types.js.map +1 -0
- package/dist/trajectory/secret-scrub.d.ts +4 -6
- package/dist/trajectory/secret-scrub.js +52 -12
- package/dist/trajectory/secret-scrub.js.map +1 -1
- package/dist/trajectory/span-profile.js +14 -0
- package/dist/trajectory/span-profile.js.map +1 -1
- package/dist/trajectory/transcript-parsers/aider-history.d.ts +1 -42
- package/dist/trajectory/transcript-parsers/aider-history.js +1 -181
- package/dist/trajectory/transcript-parsers/aider-history.js.map +1 -1
- package/dist/trajectory/transcript-parsers/claude-code-jsonl.d.ts +1 -37
- package/dist/trajectory/transcript-parsers/claude-code-jsonl.js +1 -142
- package/dist/trajectory/transcript-parsers/claude-code-jsonl.js.map +1 -1
- package/dist/trajectory/transcript-parsers/codex-session.d.ts +1 -42
- package/dist/trajectory/transcript-parsers/codex-session.js +1 -235
- package/dist/trajectory/transcript-parsers/codex-session.js.map +1 -1
- package/dist/trajectory/transcript-parsers/continue-devdata.d.ts +1 -41
- package/dist/trajectory/transcript-parsers/continue-devdata.js +1 -190
- package/dist/trajectory/transcript-parsers/continue-devdata.js.map +1 -1
- package/dist/trajectory/transcript-parsers/cursor-sqlite.d.ts +1 -38
- package/dist/trajectory/transcript-parsers/cursor-sqlite.js +1 -118
- package/dist/trajectory/transcript-parsers/cursor-sqlite.js.map +1 -1
- package/dist/trajectory/transcript-parsers/gemini-session.d.ts +1 -35
- package/dist/trajectory/transcript-parsers/gemini-session.js +1 -137
- package/dist/trajectory/transcript-parsers/gemini-session.js.map +1 -1
- package/dist/trajectory/transcript-parsers/types.d.ts +1 -101
- package/dist/trajectory/transcript-parsers/types.js +1 -32
- package/dist/trajectory/transcript-parsers/types.js.map +1 -1
- package/dist/trajectory/transcript-to-spans/attrs.d.ts +1 -0
- package/dist/trajectory/transcript-to-spans/attrs.js +2 -0
- package/dist/trajectory/transcript-to-spans/attrs.js.map +1 -0
- package/dist/trajectory/transcript-to-spans/claude-code-stream-json.d.ts +1 -0
- package/dist/trajectory/transcript-to-spans/claude-code-stream-json.js +2 -0
- package/dist/trajectory/transcript-to-spans/claude-code-stream-json.js.map +1 -0
- package/dist/trajectory/transcript-to-spans/codex-exec-json.d.ts +1 -0
- package/dist/trajectory/transcript-to-spans/codex-exec-json.js +2 -0
- package/dist/trajectory/transcript-to-spans/codex-exec-json.js.map +1 -0
- package/dist/trajectory/transcript-to-spans/hermes-session-json.d.ts +48 -0
- package/dist/trajectory/transcript-to-spans/hermes-session-json.js +193 -0
- package/dist/trajectory/transcript-to-spans/hermes-session-json.js.map +1 -0
- package/dist/trajectory/transcript-to-spans/index.d.ts +38 -0
- package/dist/trajectory/transcript-to-spans/index.js +77 -0
- package/dist/trajectory/transcript-to-spans/index.js.map +1 -0
- package/dist/trajectory/transcript-to-spans/types.d.ts +16 -0
- package/dist/trajectory/transcript-to-spans/types.js +11 -0
- package/dist/trajectory/transcript-to-spans/types.js.map +1 -0
- package/dist/trajectory/transcript-watcher.d.ts +41 -0
- package/dist/trajectory/transcript-watcher.js +34 -0
- package/dist/trajectory/transcript-watcher.js.map +1 -1
- package/dist/tx-retry.d.ts +18 -0
- package/dist/tx-retry.js +52 -12
- package/dist/tx-retry.js.map +1 -1
- package/dist/types/envelope.d.ts +3 -2785
- package/dist/types/envelope.js +3 -160
- package/dist/types/envelope.js.map +1 -1
- package/dist/types/manifest.d.ts +1 -0
- package/dist/types/manifest.js +2 -0
- package/dist/types/manifest.js.map +1 -0
- package/dist/types/payloads/index.d.ts +1 -1
- package/dist/types/payloads/index.js +7 -1
- package/dist/types/payloads/index.js.map +1 -1
- package/dist/types/payloads/portfolio-v0.d.ts +4 -4
- package/dist/types/payloads/portfolio-v0.js +1 -1
- package/dist/types/payloads/portfolio-v0.js.map +1 -1
- package/dist/types/payloads/prediction-apy-v0.d.ts +4 -4
- package/dist/types/payloads/prediction-apy-v0.js +1 -1
- package/dist/types/payloads/prediction-apy-v0.js.map +1 -1
- package/dist/types/payloads/prediction-v0.d.ts +4 -4
- package/dist/types/payloads/prediction-v0.js +1 -1
- package/dist/types/payloads/prediction-v0.js.map +1 -1
- package/dist/types/portfolio.d.ts +1 -1
- package/dist/types/portfolio.js +1 -1
- package/dist/types/portfolio.js.map +1 -1
- package/dist/types/prediction-apy.d.ts +1 -1
- package/dist/types/prediction-apy.js +1 -1
- package/dist/types/prediction-apy.js.map +1 -1
- package/dist/types/prediction.d.ts +1 -1
- package/dist/types/prediction.js +1 -1
- package/dist/types/prediction.js.map +1 -1
- package/dist/types/session-provenance.d.ts +2 -71
- package/dist/types/session-provenance.js +2 -18
- package/dist/types/session-provenance.js.map +1 -1
- package/dist/types/skill-artifact.d.ts +5 -0
- package/dist/types/skill-artifact.js +6 -0
- package/dist/types/skill-artifact.js.map +1 -0
- package/dist/types/task-document.d.ts +315 -1
- package/dist/types/task-document.js +9 -1
- package/dist/types/task-document.js.map +1 -1
- package/dist/types/task-run-read-model.d.ts +21 -0
- package/dist/types/task-run-read-model.js +2 -0
- package/dist/types/task-run-read-model.js.map +1 -0
- package/dist/types/task-run.d.ts +88 -0
- package/dist/types/task-run.js +2 -0
- package/dist/types/task-run.js.map +1 -0
- package/dist/types/task.d.ts +36 -1
- package/dist/types/task.js +1 -1
- package/dist/types/task.js.map +1 -1
- package/dist/types/window.d.ts +2 -12
- package/dist/types/window.js +2 -5
- package/dist/types/window.js.map +1 -1
- package/dist/util/redact-rpc-urls.d.ts +1 -1
- package/dist/util/redact-rpc-urls.js +57 -2
- package/dist/util/redact-rpc-urls.js.map +1 -1
- package/dist/vendor/@jinn-network/core/dist/canonical-json.d.ts +1 -0
- package/dist/vendor/@jinn-network/core/dist/canonical-json.js +67 -0
- package/dist/vendor/@jinn-network/core/dist/captured-task.d.ts +140 -0
- package/dist/vendor/@jinn-network/core/dist/captured-task.js +122 -0
- package/dist/vendor/@jinn-network/core/dist/contribution-store.d.ts +97 -0
- package/dist/vendor/@jinn-network/core/dist/contribution-store.js +770 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/acquire.d.ts +39 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/acquire.js +212 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/cache.d.ts +14 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/cache.js +17 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/capture-meta.d.ts +16 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/capture-meta.js +18 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/create-corpus.d.ts +2 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/create-corpus.js +97 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/fetch-artifact.d.ts +21 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/fetch-artifact.js +32 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/fetch.d.ts +12 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/fetch.js +24 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/http-discovery.d.ts +9 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/http-discovery.js +128 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/index.d.ts +10 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/index.js +10 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/ipfs.d.ts +5 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/ipfs.js +72 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/route-resolver.d.ts +16 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/route-resolver.js +19 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/types.d.ts +177 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/types.js +42 -0
- package/dist/vendor/@jinn-network/core/dist/envelope.d.ts +134 -0
- package/dist/vendor/@jinn-network/core/dist/envelope.js +162 -0
- package/dist/vendor/@jinn-network/core/dist/evidence-adapter.d.ts +26 -0
- package/dist/vendor/@jinn-network/core/dist/evidence-adapter.js +321 -0
- package/dist/vendor/@jinn-network/core/dist/evidence-filesystem.d.ts +40 -0
- package/dist/vendor/@jinn-network/core/dist/evidence-filesystem.js +267 -0
- package/dist/vendor/@jinn-network/core/dist/evidence-index.d.ts +117 -0
- package/dist/vendor/@jinn-network/core/dist/evidence-index.js +1083 -0
- package/dist/vendor/@jinn-network/core/dist/evidence-store-lock.d.ts +2 -0
- package/dist/vendor/@jinn-network/core/dist/evidence-store-lock.js +208 -0
- package/dist/vendor/@jinn-network/core/dist/execution-envelope.d.ts +3142 -0
- package/dist/vendor/@jinn-network/core/dist/execution-envelope.js +203 -0
- package/dist/vendor/@jinn-network/core/dist/index.d.ts +12 -0
- package/dist/vendor/@jinn-network/core/dist/index.js +12 -0
- package/dist/vendor/@jinn-network/core/dist/manifest.d.ts +75 -0
- package/dist/vendor/@jinn-network/core/dist/manifest.js +184 -0
- package/dist/vendor/@jinn-network/core/dist/paired.d.ts +68 -0
- package/dist/vendor/@jinn-network/core/dist/paired.js +92 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/build.d.ts +55 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/build.js +87 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/emit-scrub.d.ts +41 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/emit-scrub.js +87 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/index.d.ts +12 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/index.js +12 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/key-policy.d.ts +20 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/key-policy.js +42 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/layer2.d.ts +24 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/layer2.js +33 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/ml-pii-stage.d.ts +24 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/ml-pii-stage.js +42 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/openredaction-stage.d.ts +196 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/openredaction-stage.js +270 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/pii-build.d.ts +38 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/pii-build.js +67 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/pipeline.d.ts +38 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/pipeline.js +83 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/plain-patterns-stage.d.ts +42 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/plain-patterns-stage.js +114 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/secretlint-stage.d.ts +36 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/secretlint-stage.js +249 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/transformers-detector.d.ts +35 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/transformers-detector.js +67 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/types.d.ts +25 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/types.js +1 -0
- package/dist/vendor/@jinn-network/core/dist/session-provenance.d.ts +75 -0
- package/dist/vendor/@jinn-network/core/dist/session-provenance.js +20 -0
- package/dist/vendor/@jinn-network/core/dist/skill-artifact.d.ts +442 -0
- package/dist/vendor/@jinn-network/core/dist/skill-artifact.js +136 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/hash-chain.d.ts +18 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/hash-chain.js +47 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/index.d.ts +4 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/index.js +4 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/schema.d.ts +606 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/schema.js +110 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/aider-history.d.ts +42 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/aider-history.js +181 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/claude-code-jsonl.d.ts +37 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/claude-code-jsonl.js +142 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/codex-session.d.ts +42 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/codex-session.js +235 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/continue-devdata.d.ts +41 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/continue-devdata.js +190 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/cursor-sqlite.d.ts +38 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/cursor-sqlite.js +118 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/gemini-session.d.ts +35 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/gemini-session.js +137 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/index.d.ts +7 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/index.js +7 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/types.d.ts +101 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/types.js +32 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-to-spans/attrs.d.ts +4 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-to-spans/attrs.js +30 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-to-spans/claude-code-stream-json.d.ts +8 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-to-spans/claude-code-stream-json.js +162 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-to-spans/codex-exec-json.d.ts +8 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-to-spans/codex-exec-json.js +253 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-to-spans/index.d.ts +4 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-to-spans/index.js +4 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-to-spans/types.d.ts +18 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-to-spans/types.js +1 -0
- package/dist/vendor/@jinn-network/core/dist/window.d.ts +12 -0
- package/dist/vendor/@jinn-network/core/dist/window.js +5 -0
- package/dist/vendor/@jinn-network/core/package.json +38 -0
- package/dist/vendor/@jinn-network/plugin/dist/eligibility.d.ts +12 -0
- package/dist/vendor/@jinn-network/plugin/dist/eligibility.js +12 -0
- package/dist/vendor/@jinn-network/plugin/dist/history.d.ts +35 -0
- package/dist/vendor/@jinn-network/plugin/dist/history.js +140 -0
- package/dist/vendor/@jinn-network/plugin/dist/index.d.ts +32 -0
- package/dist/vendor/@jinn-network/plugin/dist/index.js +15 -0
- package/dist/vendor/@jinn-network/plugin/dist/outcome.d.ts +26 -0
- package/dist/vendor/@jinn-network/plugin/dist/outcome.js +23 -0
- package/dist/vendor/@jinn-network/plugin/dist/pickup.d.ts +101 -0
- package/dist/vendor/@jinn-network/plugin/dist/pickup.js +354 -0
- package/dist/vendor/@jinn-network/plugin/dist/plugin.d.ts +157 -0
- package/dist/vendor/@jinn-network/plugin/dist/plugin.js +586 -0
- package/dist/vendor/@jinn-network/plugin/dist/ports/contribution-port.d.ts +53 -0
- package/dist/vendor/@jinn-network/plugin/dist/ports/contribution-port.js +14 -0
- package/dist/vendor/@jinn-network/plugin/dist/ports/corpus-port.d.ts +63 -0
- package/dist/vendor/@jinn-network/plugin/dist/ports/corpus-port.js +1 -0
- package/dist/vendor/@jinn-network/plugin/dist/ports/evidence-port.d.ts +17 -0
- package/dist/vendor/@jinn-network/plugin/dist/ports/evidence-port.js +1 -0
- package/dist/vendor/@jinn-network/plugin/dist/ports/local-learning-port.d.ts +22 -0
- package/dist/vendor/@jinn-network/plugin/dist/ports/local-learning-port.js +1 -0
- package/dist/vendor/@jinn-network/plugin/dist/ports/skills-port.d.ts +12 -0
- package/dist/vendor/@jinn-network/plugin/dist/ports/skills-port.js +1 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/contribution-candidate.d.ts +116 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/contribution-candidate.js +63 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/eligibility-verdict.d.ts +8 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/eligibility-verdict.js +7 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/episode.d.ts +432 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/episode.js +452 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/history-entry.d.ts +40 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/history-entry.js +30 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/knowledge-hit.d.ts +27 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/knowledge-hit.js +23 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/knowledge-packet.d.ts +79 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/knowledge-packet.js +213 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/pickup-config.d.ts +20 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/pickup-config.js +34 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/session-summary.d.ts +17 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/session-summary.js +19 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/contract-kits.d.ts +12 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/contract-kits.js +201 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/in-memory-contribution.d.ts +93 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/in-memory-contribution.js +104 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/in-memory-corpus.d.ts +47 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/in-memory-corpus.js +54 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/in-memory-evidence.d.ts +335 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/in-memory-evidence.js +23 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/in-memory-local-learning.d.ts +25 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/in-memory-local-learning.js +30 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/in-memory-skills.d.ts +9 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/in-memory-skills.js +16 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing.d.ts +6 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing.js +8 -0
- package/dist/vendor/@jinn-network/plugin/dist/visibility.d.ts +7 -0
- package/dist/vendor/@jinn-network/plugin/dist/visibility.js +9 -0
- package/dist/vendor/@jinn-network/plugin/package.json +22 -0
- package/dist/vendor/@jinn-network/sdk/dist/checkpoint.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/checkpoint.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/contracts.d.ts +3 -2
- package/dist/vendor/@jinn-network/sdk/dist/contracts.js +49 -0
- package/dist/vendor/@jinn-network/sdk/dist/jinn-repo.d.ts +214 -0
- package/dist/vendor/@jinn-network/sdk/dist/jinn-repo.js +75 -0
- package/dist/vendor/@jinn-network/sdk/dist/json-schema.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/json-schema.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/payloads/jinn-repo.d.ts +140 -0
- package/dist/vendor/@jinn-network/sdk/dist/payloads/jinn-repo.js +52 -0
- package/dist/vendor/@jinn-network/sdk/dist/payloads/prediction-v1.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/payloads/prediction-v1.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/payloads/session-derived.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/payloads/session-derived.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/payloads/swe-rebench-v2.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/payloads/swe-rebench-v2.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/prediction-v1.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/prediction-v1.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/jinn-repo.d.ts +4 -0
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/jinn-repo.js +2 -0
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/manifest-schema.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/manifest-schema.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/swe-rebench-v2.d.ts +34 -6
- package/dist/vendor/@jinn-network/sdk/dist/swe-rebench-v2.js +28 -5
- package/dist/vendor/@jinn-network/sdk/package.json +5 -1
- package/node_modules/@jinn-network/core/dist/canonical-json.d.ts +1 -0
- package/node_modules/@jinn-network/core/dist/canonical-json.js +67 -0
- package/node_modules/@jinn-network/core/dist/captured-task.d.ts +140 -0
- package/node_modules/@jinn-network/core/dist/captured-task.js +122 -0
- package/node_modules/@jinn-network/core/dist/contribution-store.d.ts +97 -0
- package/node_modules/@jinn-network/core/dist/contribution-store.js +770 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/acquire.d.ts +39 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/acquire.js +212 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/cache.d.ts +14 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/cache.js +17 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/capture-meta.d.ts +16 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/capture-meta.js +18 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/create-corpus.d.ts +2 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/create-corpus.js +97 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/fetch-artifact.d.ts +21 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/fetch-artifact.js +32 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/fetch.d.ts +12 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/fetch.js +24 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/http-discovery.d.ts +9 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/http-discovery.js +128 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/index.d.ts +10 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/index.js +10 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/ipfs.d.ts +5 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/ipfs.js +72 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/route-resolver.d.ts +16 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/route-resolver.js +19 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/types.d.ts +177 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/types.js +42 -0
- package/node_modules/@jinn-network/core/dist/envelope.d.ts +134 -0
- package/node_modules/@jinn-network/core/dist/envelope.js +162 -0
- package/node_modules/@jinn-network/core/dist/evidence-adapter.d.ts +26 -0
- package/node_modules/@jinn-network/core/dist/evidence-adapter.js +321 -0
- package/node_modules/@jinn-network/core/dist/evidence-filesystem.d.ts +40 -0
- package/node_modules/@jinn-network/core/dist/evidence-filesystem.js +267 -0
- package/node_modules/@jinn-network/core/dist/evidence-index.d.ts +117 -0
- package/node_modules/@jinn-network/core/dist/evidence-index.js +1083 -0
- package/node_modules/@jinn-network/core/dist/evidence-store-lock.d.ts +2 -0
- package/node_modules/@jinn-network/core/dist/evidence-store-lock.js +208 -0
- package/node_modules/@jinn-network/core/dist/execution-envelope.d.ts +3142 -0
- package/node_modules/@jinn-network/core/dist/execution-envelope.js +203 -0
- package/node_modules/@jinn-network/core/dist/index.d.ts +12 -0
- package/node_modules/@jinn-network/core/dist/index.js +12 -0
- package/node_modules/@jinn-network/core/dist/manifest.d.ts +75 -0
- package/node_modules/@jinn-network/core/dist/manifest.js +184 -0
- package/node_modules/@jinn-network/core/dist/paired.d.ts +68 -0
- package/node_modules/@jinn-network/core/dist/paired.js +92 -0
- package/node_modules/@jinn-network/core/dist/scrub/build.d.ts +55 -0
- package/node_modules/@jinn-network/core/dist/scrub/build.js +87 -0
- package/node_modules/@jinn-network/core/dist/scrub/emit-scrub.d.ts +41 -0
- package/node_modules/@jinn-network/core/dist/scrub/emit-scrub.js +87 -0
- package/node_modules/@jinn-network/core/dist/scrub/index.d.ts +12 -0
- package/node_modules/@jinn-network/core/dist/scrub/index.js +12 -0
- package/node_modules/@jinn-network/core/dist/scrub/key-policy.d.ts +20 -0
- package/node_modules/@jinn-network/core/dist/scrub/key-policy.js +42 -0
- package/node_modules/@jinn-network/core/dist/scrub/layer2.d.ts +24 -0
- package/node_modules/@jinn-network/core/dist/scrub/layer2.js +33 -0
- package/node_modules/@jinn-network/core/dist/scrub/ml-pii-stage.d.ts +24 -0
- package/node_modules/@jinn-network/core/dist/scrub/ml-pii-stage.js +42 -0
- package/node_modules/@jinn-network/core/dist/scrub/openredaction-stage.d.ts +196 -0
- package/node_modules/@jinn-network/core/dist/scrub/openredaction-stage.js +270 -0
- package/node_modules/@jinn-network/core/dist/scrub/pii-build.d.ts +38 -0
- package/node_modules/@jinn-network/core/dist/scrub/pii-build.js +67 -0
- package/node_modules/@jinn-network/core/dist/scrub/pipeline.d.ts +38 -0
- package/node_modules/@jinn-network/core/dist/scrub/pipeline.js +83 -0
- package/node_modules/@jinn-network/core/dist/scrub/plain-patterns-stage.d.ts +42 -0
- package/node_modules/@jinn-network/core/dist/scrub/plain-patterns-stage.js +114 -0
- package/node_modules/@jinn-network/core/dist/scrub/secretlint-stage.d.ts +36 -0
- package/node_modules/@jinn-network/core/dist/scrub/secretlint-stage.js +249 -0
- package/node_modules/@jinn-network/core/dist/scrub/transformers-detector.d.ts +35 -0
- package/node_modules/@jinn-network/core/dist/scrub/transformers-detector.js +67 -0
- package/node_modules/@jinn-network/core/dist/scrub/types.d.ts +25 -0
- package/node_modules/@jinn-network/core/dist/scrub/types.js +1 -0
- package/node_modules/@jinn-network/core/dist/session-provenance.d.ts +75 -0
- package/node_modules/@jinn-network/core/dist/session-provenance.js +20 -0
- package/node_modules/@jinn-network/core/dist/skill-artifact.d.ts +442 -0
- package/node_modules/@jinn-network/core/dist/skill-artifact.js +136 -0
- package/node_modules/@jinn-network/core/dist/trajectory/hash-chain.d.ts +18 -0
- package/node_modules/@jinn-network/core/dist/trajectory/hash-chain.js +47 -0
- package/node_modules/@jinn-network/core/dist/trajectory/index.d.ts +4 -0
- package/node_modules/@jinn-network/core/dist/trajectory/index.js +4 -0
- package/node_modules/@jinn-network/core/dist/trajectory/schema.d.ts +606 -0
- package/node_modules/@jinn-network/core/dist/trajectory/schema.js +110 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/aider-history.d.ts +42 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/aider-history.js +181 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/claude-code-jsonl.d.ts +37 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/claude-code-jsonl.js +142 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/codex-session.d.ts +42 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/codex-session.js +235 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/continue-devdata.d.ts +41 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/continue-devdata.js +190 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/cursor-sqlite.d.ts +38 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/cursor-sqlite.js +118 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/gemini-session.d.ts +35 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/gemini-session.js +137 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/index.d.ts +7 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/index.js +7 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/types.d.ts +101 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/types.js +32 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-to-spans/attrs.d.ts +4 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-to-spans/attrs.js +30 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-to-spans/claude-code-stream-json.d.ts +8 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-to-spans/claude-code-stream-json.js +162 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-to-spans/codex-exec-json.d.ts +8 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-to-spans/codex-exec-json.js +253 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-to-spans/index.d.ts +4 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-to-spans/index.js +4 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-to-spans/types.d.ts +18 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-to-spans/types.js +1 -0
- package/node_modules/@jinn-network/core/dist/window.d.ts +12 -0
- package/node_modules/@jinn-network/core/dist/window.js +5 -0
- package/node_modules/@jinn-network/core/package.json +61 -0
- package/node_modules/@jinn-network/plugin/dist/eligibility.d.ts +12 -0
- package/node_modules/@jinn-network/plugin/dist/eligibility.js +12 -0
- package/node_modules/@jinn-network/plugin/dist/history.d.ts +35 -0
- package/node_modules/@jinn-network/plugin/dist/history.js +140 -0
- package/node_modules/@jinn-network/plugin/dist/index.d.ts +32 -0
- package/node_modules/@jinn-network/plugin/dist/index.js +15 -0
- package/node_modules/@jinn-network/plugin/dist/outcome.d.ts +26 -0
- package/node_modules/@jinn-network/plugin/dist/outcome.js +23 -0
- package/node_modules/@jinn-network/plugin/dist/pickup.d.ts +101 -0
- package/node_modules/@jinn-network/plugin/dist/pickup.js +354 -0
- package/node_modules/@jinn-network/plugin/dist/plugin.d.ts +157 -0
- package/node_modules/@jinn-network/plugin/dist/plugin.js +586 -0
- package/node_modules/@jinn-network/plugin/dist/ports/contribution-port.d.ts +53 -0
- package/node_modules/@jinn-network/plugin/dist/ports/contribution-port.js +14 -0
- package/node_modules/@jinn-network/plugin/dist/ports/corpus-port.d.ts +63 -0
- package/node_modules/@jinn-network/plugin/dist/ports/corpus-port.js +1 -0
- package/node_modules/@jinn-network/plugin/dist/ports/evidence-port.d.ts +17 -0
- package/node_modules/@jinn-network/plugin/dist/ports/evidence-port.js +1 -0
- package/node_modules/@jinn-network/plugin/dist/ports/local-learning-port.d.ts +22 -0
- package/node_modules/@jinn-network/plugin/dist/ports/local-learning-port.js +1 -0
- package/node_modules/@jinn-network/plugin/dist/ports/skills-port.d.ts +12 -0
- package/node_modules/@jinn-network/plugin/dist/ports/skills-port.js +1 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/contribution-candidate.d.ts +116 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/contribution-candidate.js +63 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/eligibility-verdict.d.ts +8 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/eligibility-verdict.js +7 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/episode.d.ts +432 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/episode.js +452 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/history-entry.d.ts +40 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/history-entry.js +30 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/knowledge-hit.d.ts +27 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/knowledge-hit.js +23 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/knowledge-packet.d.ts +79 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/knowledge-packet.js +213 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/pickup-config.d.ts +20 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/pickup-config.js +34 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/session-summary.d.ts +17 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/session-summary.js +19 -0
- package/node_modules/@jinn-network/plugin/dist/testing/contract-kits.d.ts +12 -0
- package/node_modules/@jinn-network/plugin/dist/testing/contract-kits.js +201 -0
- package/node_modules/@jinn-network/plugin/dist/testing/in-memory-contribution.d.ts +93 -0
- package/node_modules/@jinn-network/plugin/dist/testing/in-memory-contribution.js +104 -0
- package/node_modules/@jinn-network/plugin/dist/testing/in-memory-corpus.d.ts +47 -0
- package/node_modules/@jinn-network/plugin/dist/testing/in-memory-corpus.js +54 -0
- package/node_modules/@jinn-network/plugin/dist/testing/in-memory-evidence.d.ts +335 -0
- package/node_modules/@jinn-network/plugin/dist/testing/in-memory-evidence.js +23 -0
- package/node_modules/@jinn-network/plugin/dist/testing/in-memory-local-learning.d.ts +25 -0
- package/node_modules/@jinn-network/plugin/dist/testing/in-memory-local-learning.js +30 -0
- package/node_modules/@jinn-network/plugin/dist/testing/in-memory-skills.d.ts +9 -0
- package/node_modules/@jinn-network/plugin/dist/testing/in-memory-skills.js +16 -0
- package/node_modules/@jinn-network/plugin/dist/testing.d.ts +6 -0
- package/node_modules/@jinn-network/plugin/dist/testing.js +8 -0
- package/node_modules/@jinn-network/plugin/dist/visibility.d.ts +7 -0
- package/node_modules/@jinn-network/plugin/dist/visibility.js +9 -0
- package/node_modules/@jinn-network/plugin/package.json +50 -0
- package/node_modules/@jinn-network/plugin/process-contract.json +8 -0
- package/package.json +60 -18
- package/plugins/jinn-repo-runtime/.claude-plugin/plugin.json +5 -0
- package/plugins/jinn-repo-runtime/.codex-plugin/plugin.json +39 -0
- package/plugins/jinn-repo-runtime/README.md +27 -0
- package/plugins/jinn-repo-runtime/hooks/hooks.json +16 -0
- package/plugins/jinn-repo-runtime/hooks/session-start +73 -0
- package/plugins/jinn-repo-runtime/jinn.plugin.json +11 -0
- package/plugins/jinn-repo-runtime/skills/task/SKILL.md +92 -0
- package/skills/jinn-operator/SKILL.md +29 -15
- package/deployments/deployment-jinn-mvi-l1-sepolia-fast.json +0 -55
- package/deployments/deployment-jinn-mvi-l1-sepolia.json +0 -55
- package/deployments/deployment-jinn-mvi-l2-baseSepolia.json +0 -13
- package/deployments/deployment-jinn-testnet-faucet-baseSepolia-fast.json +0 -15
- package/dist/api/peers.js.map +0 -1
- package/dist/daemon/jinn-claim-loop-canonical.d.ts +0 -207
- package/dist/daemon/jinn-claim-loop-canonical.js +0 -296
- package/dist/daemon/jinn-claim-loop-canonical.js.map +0 -1
- package/dist/daemon/jinn-claim-loop-mock.d.ts +0 -61
- package/dist/daemon/jinn-claim-loop-mock.js +0 -122
- package/dist/daemon/jinn-claim-loop-mock.js.map +0 -1
- package/dist/daemon/jinn-claim-loop-wiring.d.ts +0 -33
- package/dist/daemon/jinn-claim-loop-wiring.js +0 -40
- package/dist/daemon/jinn-claim-loop-wiring.js.map +0 -1
- package/dist/daemon/jinn-claim-loop.d.ts +0 -130
- package/dist/daemon/jinn-claim-loop.js +0 -328
- package/dist/daemon/jinn-claim-loop.js.map +0 -1
- package/dist/dashboard/assets/index-BVAWkLwY.css +0 -1
- package/dist/dashboard/assets/index-DEPqtGOA.js +0 -167
- package/dist/earning/jinn-rewards.js.map +0 -1
- package/dist/scripts/donation-consumption-acceptance.d.ts +0 -85
- package/dist/scripts/donation-consumption-acceptance.js +0 -1382
- package/dist/scripts/donation-consumption-acceptance.js.map +0 -1
- package/dist/x402/acquire.d.ts +0 -17
- package/dist/x402/acquire.js +0 -49
- package/dist/x402/acquire.js.map +0 -1
- package/dist/x402/facilitator.d.ts +0 -11
- package/dist/x402/facilitator.js +0 -52
- package/dist/x402/facilitator.js.map +0 -1
- package/dist/x402/handler.d.ts +0 -27
- package/dist/x402/handler.js +0 -236
- package/dist/x402/handler.js.map +0 -1
- /package/dist/{api/peers.d.ts → daemon/peer-sync.d.ts} +0 -0
package/dist/main.js
CHANGED
|
@@ -24,45 +24,48 @@ import { homedir, hostname, userInfo } from 'node:os';
|
|
|
24
24
|
import { randomBytes as cryptoRandomBytes } from 'node:crypto';
|
|
25
25
|
import { dirname, join } from 'node:path';
|
|
26
26
|
import { fileURLToPath } from 'node:url';
|
|
27
|
-
import { loadConfig, getConfigPathFromArgs, DEFAULT_CONFIG_PATH } from './config.js';
|
|
27
|
+
import { loadConfig, getConfigPathFromArgs, DEFAULT_CONFIG_PATH, DEFAULT_TESTNET_RPC_URLS } from './config.js';
|
|
28
28
|
import { Store } from './store/store.js';
|
|
29
29
|
import { startApiServer, isEmbeddedAgentEnabled } from './api/server.js';
|
|
30
|
-
import { setDefaultTxSubmissionLedger } from './tx-retry.js';
|
|
30
|
+
import { setDefaultTxSubmissionLedger, withEoaBroadcastLock } from './tx-retry.js';
|
|
31
31
|
// addHarnessReadinessRoutes is wired through startApiServer's holder ref now
|
|
32
32
|
// (jinn-mono-u34i). No direct import needed.
|
|
33
33
|
import { CapturePublishUnavailableError } from './api/captures.js';
|
|
34
34
|
import { invalidatePredictionOperatorStatusCache } from './api/gather-status.js';
|
|
35
35
|
import { ensureUiToken } from './api/ui-token.js';
|
|
36
|
+
import { decideUiAutoOpen } from './cli/ui-auto-open-gate.js';
|
|
36
37
|
import { getFileLogger, closeFileLogger } from './observability/file-logger.js';
|
|
38
|
+
import { emitProgress } from './observability/progress.js';
|
|
37
39
|
import { hashImplStateDir } from './harnesses/freeze.js';
|
|
38
40
|
import { readModeState } from './harnesses/mode-state.js';
|
|
39
41
|
import { attachAgentWs, updateAgentClaudePath } from './agent/agent-ws.js';
|
|
40
42
|
import { createSetupModeController } from './setup-mode.js';
|
|
41
43
|
import { requestDaemonRestart } from './restart-daemon.js';
|
|
42
|
-
import {
|
|
43
|
-
import { clearBootstrapError, persistBootstrapError, } from './errors/persisted-bootstrap-error.js';
|
|
44
|
+
import { emitEnvelope } from './errors/envelope.js';
|
|
44
45
|
import { emitStructured } from './events/emitter.js';
|
|
45
46
|
import { applyPidfileLivenessGate } from './preflight/pidfile-liveness.js';
|
|
46
47
|
import { applyDeploymentReadinessGate } from './preflight/deployment-readiness.js';
|
|
48
|
+
import { ensureStableCwd } from './preflight/stable-cwd.js';
|
|
47
49
|
import { detectAuthContext } from './preflight/claude-auth.js';
|
|
48
50
|
import { FleetBootstrapper, recoverEvictedService as recoverEvictedServiceFn } from './earning/bootstrap.js';
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
+
import { runFleetBootstrap, SetupBootstrapHalted } from './earning/bootstrap-run.js';
|
|
52
|
+
import { applyChainGasOverrides, getChainConfig } from './earning/contracts.js';
|
|
53
|
+
import { getJinnRouterAddress } from './contracts/addresses.js';
|
|
51
54
|
import { FleetStateStore } from './earning/store.js';
|
|
52
|
-
import { isOperationalServiceStep
|
|
53
|
-
import { decryptMnemonic, deriveMasterSigner
|
|
55
|
+
import { isOperationalServiceStep } from './earning/types.js';
|
|
56
|
+
import { decryptMnemonic, deriveMasterSigner } from './earning/wallet.js';
|
|
54
57
|
import { MechAdapter } from './adapters/mech/adapter.js';
|
|
55
58
|
import { ClaudeRunner } from './runner/claude.js';
|
|
56
59
|
import { Daemon } from './daemon/daemon.js';
|
|
57
60
|
import { buildSpendCapConfig } from './spend/daemon-config.js';
|
|
58
61
|
import { buildAiUnitsConfig } from './spend/ai-units-config.js';
|
|
59
62
|
import { REFERENCE_CEILING } from './spend/ai-units.js';
|
|
60
|
-
import {
|
|
61
|
-
import { createJinnPublicClient, createJinnWalletClient, createJinnL1PublicClient, createJinnL1WalletClient } from './earning/viem-clients.js';
|
|
63
|
+
import { createJinnPublicClient, createJinnWalletClient } from './earning/viem-clients.js';
|
|
62
64
|
import { privateKeyToAccount } from 'viem/accounts';
|
|
63
65
|
import { getAddress } from 'viem';
|
|
64
66
|
import { DEFAULT_DISABLED_HARNESSES, DEFAULT_HARNESS, HarnessRegistry, } from './harnesses/engine/registry.js';
|
|
65
|
-
import {
|
|
67
|
+
import { createMutableJoinedSolverNetsView } from './harnesses/engine/engine.js';
|
|
68
|
+
import { createJoinApplier } from './daemon/join-applier.js';
|
|
66
69
|
import { buildHarnesses } from './harnesses/impls/index.js';
|
|
67
70
|
import { loadExternalImpl } from './harnesses/external-impls/index.js';
|
|
68
71
|
import { CLAUDE_CODE_HARNESS, CODEX_HARNESS, HERMES_AGENT_HARNESS, harnessStateDirName } from './harnesses/names.js';
|
|
@@ -74,17 +77,15 @@ import { createCorpus } from './corpus/index.js';
|
|
|
74
77
|
import { DEFAULT_EXECUTION_DISCOVERY_FROM_BLOCK } from './corpus/onchain-query.js';
|
|
75
78
|
import { CapturesStore } from './store/captures.js';
|
|
76
79
|
import { createLiveCapturePublisher } from './captures/live-publisher.js';
|
|
80
|
+
import { EnsurePendingCaptureProcessor, ensurePendingCapture, ingestStopHookCapture } from './captures/ingest.js';
|
|
77
81
|
import { startReceiver } from './trajectory/receiver.js';
|
|
78
82
|
import { startSyntheticSpanProvider, emitSyntheticSpan } from './trajectory/synthetic-span-builder.js';
|
|
79
83
|
import { CredentialScrubProcessor } from './trajectory/processors/credential-scrub.js';
|
|
80
84
|
import { TranscriptContentScrubProcessor } from './trajectory/processors/transcript-content-scrub.js';
|
|
81
85
|
import { IdentityScrubProcessor } from './trajectory/processors/identity-scrub.js';
|
|
82
86
|
import { PathScrubProcessor } from './trajectory/processors/path-scrub.js';
|
|
87
|
+
import { buildScrubPipeline, maybeBuildPiiDetector, } from '@jinn-network/core/scrub';
|
|
83
88
|
import { SqliteExporterProcessor } from './trajectory/processors/sqlite-exporter.js';
|
|
84
|
-
import { ClaudeCodeJsonlParser } from './trajectory/transcript-parsers/claude-code-jsonl.js';
|
|
85
|
-
import { CodexSessionParser } from './trajectory/transcript-parsers/codex-session.js';
|
|
86
|
-
import { GeminiSessionParser } from './trajectory/transcript-parsers/gemini-session.js';
|
|
87
|
-
import { CursorSqliteParser } from './trajectory/transcript-parsers/cursor-sqlite.js';
|
|
88
89
|
import { startTranscriptWatcher, } from './trajectory/transcript-watcher.js';
|
|
89
90
|
import { defaultTranscriptWatchDirectories } from './trajectory/transcript-session-dirs.js';
|
|
90
91
|
import { buildInfo } from './build-info.js';
|
|
@@ -92,8 +93,8 @@ import { BASE_FEEDS } from './venues/chainlink/feeds.js';
|
|
|
92
93
|
import { GeneratedTaskSource, StaticConfiguredTaskSource, filterBindableTasks } from './tasks/sources.js';
|
|
93
94
|
import { checkRpcNetwork, logRpcLocalDevToStderr, probeFallbackChain, rpcNetworkFailureHint, summarizeFallbackChain, } from './preflight/rpc-network.js';
|
|
94
95
|
import { apiPortFailureMessage, checkApiPortAvailable } from './preflight/api-port.js';
|
|
96
|
+
import { fetchLatestVersion, getRunningVersion, isNewerVersion, isVersionCheckEnabled, formatUpdateLogLine, VERSION_CHECK_INTERVAL_MS, } from './preflight/version-check.js';
|
|
95
97
|
import { openBrowser } from './cli/open-browser.js';
|
|
96
|
-
import { keepSetupUiOnBootstrapError } from './setup/halt-mode.js';
|
|
97
98
|
if (process.env['JINN_LOAD_DEV_ENV'] === '1' || process.env['NODE_ENV'] === 'development') {
|
|
98
99
|
dotenvConfig({ path: join(dirname(fileURLToPath(import.meta.url)), '..', '.env') });
|
|
99
100
|
}
|
|
@@ -163,6 +164,11 @@ let activeClaudePath = config.claudePath ?? 'claude';
|
|
|
163
164
|
const selectClaudePath = (claudePath) => {
|
|
164
165
|
activeClaudePath = claudePath;
|
|
165
166
|
config.claudePath = claudePath;
|
|
167
|
+
// Harmless no-op when the embedded agent is disabled
|
|
168
|
+
// (`embeddedAgentEnabled` is false at this point): the agent surface
|
|
169
|
+
// that consumes this path isn't mounted, so the update has nothing to
|
|
170
|
+
// propagate to. Called unconditionally to keep the path in sync
|
|
171
|
+
// whenever the agent IS enabled.
|
|
166
172
|
updateAgentClaudePath(claudePath);
|
|
167
173
|
};
|
|
168
174
|
const NETWORK_CHAIN = config.network === 'testnet' ? 'base-sepolia' : 'base';
|
|
@@ -175,21 +181,18 @@ const CHAIN_CONFIG = applyChainGasOverrides(getChainConfig(NETWORK_CHAIN, {
|
|
|
175
181
|
minEoaGasWei: config.minEoaGasWei,
|
|
176
182
|
minSafeEthWei: config.minSafeEthWei,
|
|
177
183
|
});
|
|
178
|
-
const MESSENGER_MODE_EXPLICIT = process.env['JINN_MESSENGER_MODE'] !== undefined ||
|
|
179
|
-
configFileHasTopLevelKey(CONFIG_PATH, 'jinnMessengerMode');
|
|
180
|
-
const JINN_MVI_CONFIG = loadJinnMviConfig({
|
|
181
|
-
l1ArtifactPath: config.jinnMviL1DeploymentPath ??
|
|
182
|
-
(config.network === 'testnet' ? DEFAULT_TESTNET_ARTIFACTS.jinnMviL1 : undefined),
|
|
183
|
-
l2ArtifactPath: config.jinnMviL2DeploymentPath ??
|
|
184
|
-
(config.network === 'testnet' ? DEFAULT_TESTNET_ARTIFACTS.jinnMviL2 : undefined),
|
|
185
|
-
distributorAddress: config.jinnDistributorAddress,
|
|
186
|
-
messengerAddress: config.jinnMessengerAddress,
|
|
187
|
-
claimEmitterAddress: config.jinnClaimEmitterAddress,
|
|
188
|
-
messengerMode: MESSENGER_MODE_EXPLICIT ? config.jinnMessengerMode : undefined,
|
|
189
|
-
});
|
|
190
|
-
const JINN_CLAIM_MESSENGER_MODE = JINN_MVI_CONFIG.messengerMode ?? config.jinnMessengerMode;
|
|
191
184
|
const MARKETPLACE_ADDRESS = CHAIN_CONFIG.mechMarketplace;
|
|
192
|
-
const ROUTER_ADDRESS = (CHAIN_CONFIG.jinnRouter ??
|
|
185
|
+
const ROUTER_ADDRESS = (CHAIN_CONFIG.jinnRouter ?? getJinnRouterAddress(CHAIN_CONFIG.chainId));
|
|
186
|
+
/** #913: the bundled public RPC fallback chain for the current network. The
|
|
187
|
+
* setup/network endpoint persists `[primary, ...RPC_PUBLIC_DEFAULTS]` so the
|
|
188
|
+
* operator keeps the public backup chain when they set a primary, and the
|
|
189
|
+
* Settings → Network UI renders these as the trailing read-only slots. */
|
|
190
|
+
const RPC_PUBLIC_DEFAULTS = NETWORK_CHAIN === 'base-sepolia' ? DEFAULT_TESTNET_RPC_URLS : [CHAIN_CONFIG.rpcUrl];
|
|
191
|
+
/** #913: last L2 boot-probe result per RPC slot. Captured at boot, surfaced
|
|
192
|
+
* via /v1/bootstrap so Settings → Network can render per-slot health. Hosts
|
|
193
|
+
* are already masked by probeFallbackChain. The RPC chain is restart-required,
|
|
194
|
+
* so this never drifts without a re-probing restart. */
|
|
195
|
+
let lastL2Probe = [];
|
|
193
196
|
function configFileHasTopLevelKey(configPath, key) {
|
|
194
197
|
const filePath = configPath ?? join(process.env['HOME'] ?? '', '.jinn-client', 'config.json');
|
|
195
198
|
if (!filePath || !existsSync(filePath))
|
|
@@ -202,455 +205,17 @@ function configFileHasTopLevelKey(configPath, key) {
|
|
|
202
205
|
return false;
|
|
203
206
|
}
|
|
204
207
|
}
|
|
205
|
-
class EnsurePendingCaptureProcessor {
|
|
206
|
-
captures;
|
|
207
|
-
constructor(captures) {
|
|
208
|
-
this.captures = captures;
|
|
209
|
-
}
|
|
210
|
-
forceFlush() { return Promise.resolve(); }
|
|
211
|
-
shutdown() { return Promise.resolve(); }
|
|
212
|
-
onStart() { }
|
|
213
|
-
onEnd(span) {
|
|
214
|
-
const sessionId = stringAttribute(span.attributes['jinn.session.id']);
|
|
215
|
-
if (!sessionId)
|
|
216
|
-
return;
|
|
217
|
-
ensurePendingCapture(this.captures, {
|
|
218
|
-
sessionId,
|
|
219
|
-
capturedAt: hrTimeToIso(span.startTime),
|
|
220
|
-
tool: inferCaptureTool(span),
|
|
221
|
-
capturePath: inferCapturePath(span),
|
|
222
|
-
...repoMetadataFromSpan(span),
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
function stringAttribute(value) {
|
|
227
|
-
return typeof value === 'string' && value.trim() !== '' ? value : undefined;
|
|
228
|
-
}
|
|
229
|
-
function hrTimeToIso(time) {
|
|
230
|
-
const millis = (time[0] * 1000) + Math.floor(time[1] / 1_000_000);
|
|
231
|
-
return new Date(millis).toISOString();
|
|
232
|
-
}
|
|
233
|
-
function inferCaptureTool(span) {
|
|
234
|
-
return stringAttribute(span.attributes['transcript.tool'])
|
|
235
|
-
?? stringAttribute(span.resource.attributes['service.name'])
|
|
236
|
-
?? 'otel';
|
|
237
|
-
}
|
|
238
|
-
function inferCapturePath(span) {
|
|
239
|
-
if (stringAttribute(span.attributes['transcript.tool']))
|
|
240
|
-
return 'B';
|
|
241
|
-
return 'A';
|
|
242
|
-
}
|
|
243
|
-
function repoMetadataFromSpan(span) {
|
|
244
|
-
const attrs = span.attributes;
|
|
245
|
-
const repoRemoteUrl = stringAttribute(attrs['repo.remote_url'])
|
|
246
|
-
?? stringAttribute(attrs['vcs.repository.url'])
|
|
247
|
-
?? stringAttribute(attrs['git.remote_url']);
|
|
248
|
-
const repoCommitHash = stringAttribute(attrs['repo.commit_hash'])
|
|
249
|
-
?? stringAttribute(attrs['vcs.ref.head.revision'])
|
|
250
|
-
?? stringAttribute(attrs['git.commit']);
|
|
251
|
-
return {
|
|
252
|
-
...(repoRemoteUrl ? { repoRemoteUrl } : {}),
|
|
253
|
-
...(repoCommitHash ? { repoCommitHash } : {}),
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
function parserForStopHookTool(tool) {
|
|
257
|
-
switch (tool) {
|
|
258
|
-
case 'claude-code':
|
|
259
|
-
return new ClaudeCodeJsonlParser();
|
|
260
|
-
case 'codex':
|
|
261
|
-
return new CodexSessionParser();
|
|
262
|
-
case 'gemini-cli':
|
|
263
|
-
return new GeminiSessionParser();
|
|
264
|
-
case 'cursor':
|
|
265
|
-
return new CursorSqliteParser();
|
|
266
|
-
default: {
|
|
267
|
-
const exhaustive = tool;
|
|
268
|
-
throw new Error(`No transcript parser for stop-hook tool: ${String(exhaustive)}`);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
function ensurePendingCapture(captures, params) {
|
|
273
|
-
if (captures.getBySession(params.sessionId))
|
|
274
|
-
return;
|
|
275
|
-
try {
|
|
276
|
-
captures.savePending({
|
|
277
|
-
sessionId: params.sessionId,
|
|
278
|
-
capturedAt: params.capturedAt,
|
|
279
|
-
originatingTool: { name: params.tool },
|
|
280
|
-
capturePath: params.capturePath,
|
|
281
|
-
status: 'pending',
|
|
282
|
-
spanCount: 0,
|
|
283
|
-
durationMs: 0,
|
|
284
|
-
redactedSpanCount: 0,
|
|
285
|
-
...(params.repoRemoteUrl ? { repoRemoteUrl: params.repoRemoteUrl } : {}),
|
|
286
|
-
...(params.repoCommitHash ? { repoCommitHash: params.repoCommitHash } : {}),
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
catch (err) {
|
|
290
|
-
if (!captures.getBySession(params.sessionId))
|
|
291
|
-
throw err;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
async function ingestStopHookCapture(captures, receiver, payload) {
|
|
295
|
-
ensurePendingCapture(captures, {
|
|
296
|
-
sessionId: payload.sessionId,
|
|
297
|
-
capturedAt: payload.stoppedAt,
|
|
298
|
-
tool: payload.tool,
|
|
299
|
-
capturePath: 'D',
|
|
300
|
-
});
|
|
301
|
-
if (!payload.transcriptPath)
|
|
302
|
-
return;
|
|
303
|
-
if (!receiver) {
|
|
304
|
-
console.warn('[main] stop-hook capture received but OTLP receiver is unavailable; pending capture has no transcript spans.');
|
|
305
|
-
return;
|
|
306
|
-
}
|
|
307
|
-
const parser = parserForStopHookTool(payload.tool);
|
|
308
|
-
let events;
|
|
309
|
-
try {
|
|
310
|
-
events = await parser.parseFull({ sessionId: payload.sessionId, path: payload.transcriptPath });
|
|
311
|
-
}
|
|
312
|
-
catch (err) {
|
|
313
|
-
console.warn(`[main] stop-hook transcript import failed for ${payload.transcriptPath}: ` +
|
|
314
|
-
`${err instanceof Error ? err.message : String(err)}`);
|
|
315
|
-
return;
|
|
316
|
-
}
|
|
317
|
-
if (events.length === 0)
|
|
318
|
-
return;
|
|
319
|
-
const provider = startSyntheticSpanProvider({
|
|
320
|
-
otlpHttpEndpoint: `http://127.0.0.1:${receiver.httpPort}/v1/traces`,
|
|
321
|
-
});
|
|
322
|
-
try {
|
|
323
|
-
for (const event of events) {
|
|
324
|
-
emitSyntheticSpan(provider, { tool: parser.tool, sessionId: payload.sessionId, event });
|
|
325
|
-
}
|
|
326
|
-
await provider.flush();
|
|
327
|
-
}
|
|
328
|
-
finally {
|
|
329
|
-
await provider.shutdown();
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
const STANDARD_SERVICE_PROGRESSION = [
|
|
333
|
-
'awaiting_stake',
|
|
334
|
-
'staked',
|
|
335
|
-
'mech_deployed',
|
|
336
|
-
'agent_registered',
|
|
337
|
-
'safe_binding_pending',
|
|
338
|
-
'complete',
|
|
339
|
-
];
|
|
340
|
-
const SELF_BOND_SERVICE_PROGRESSION = [
|
|
341
|
-
'awaiting_stake',
|
|
342
|
-
'service_created',
|
|
343
|
-
'service_activated',
|
|
344
|
-
'agents_registered',
|
|
345
|
-
'service_deployed',
|
|
346
|
-
'service_staked',
|
|
347
|
-
'mech_deployed',
|
|
348
|
-
'agent_registered',
|
|
349
|
-
'safe_binding_pending',
|
|
350
|
-
'complete',
|
|
351
|
-
];
|
|
352
|
-
/** §6.2 `bootstrap_incomplete` — `{ currentStep, nextStep }` from persisted fleet state. */
|
|
353
|
-
function bootstrapIncompleteSteps(state) {
|
|
354
|
-
const progression = state.staking_mode === 'self-bond'
|
|
355
|
-
? SELF_BOND_SERVICE_PROGRESSION
|
|
356
|
-
: STANDARD_SERVICE_PROGRESSION;
|
|
357
|
-
const byIndex = [...state.services].sort((a, b) => a.index - b.index);
|
|
358
|
-
const focus = byIndex.find(s => isOperationalServiceStep(s.step) && !s.safe_address) ??
|
|
359
|
-
byIndex.find(s => !isOperationalServiceStep(s.step)) ??
|
|
360
|
-
byIndex.find(s => s.step === 'safe_binding_pending') ??
|
|
361
|
-
byIndex[0];
|
|
362
|
-
if (!focus) {
|
|
363
|
-
return { currentStep: 'awaiting_service', nextStep: 'awaiting_stake' };
|
|
364
|
-
}
|
|
365
|
-
if (isOperationalServiceStep(focus.step) && !focus.safe_address) {
|
|
366
|
-
return { currentStep: 'complete', nextStep: 'bootstrap' };
|
|
367
|
-
}
|
|
368
|
-
const i = progression.indexOf(focus.step);
|
|
369
|
-
if (i === -1) {
|
|
370
|
-
return { currentStep: focus.step, nextStep: 'bootstrap' };
|
|
371
|
-
}
|
|
372
|
-
if (i < progression.length - 1) {
|
|
373
|
-
return { currentStep: focus.step, nextStep: progression[i + 1] };
|
|
374
|
-
}
|
|
375
|
-
return { currentStep: focus.step, nextStep: 'bootstrap' };
|
|
376
|
-
}
|
|
377
|
-
// ── Bootstrap ───────────────────────────────────────────────────────────────
|
|
378
|
-
async function bootstrap() {
|
|
379
|
-
console.log('[main] Running fleet bootstrap...');
|
|
380
|
-
// A fresh bootstrap attempt clears any stale error breadcrumb. If this run
|
|
381
|
-
// hits the same failure, it'll be re-persisted below; if it succeeds (or
|
|
382
|
-
// proceeds past the previously-failed step), the panel returns to a clean
|
|
383
|
-
// state on the next /v1/bootstrap poll.
|
|
384
|
-
clearBootstrapError(config.earningDir);
|
|
385
|
-
// Persist the envelope to disk before emitEnvelope's process.exit fires,
|
|
386
|
-
// so /v1/bootstrap can surface it to the panel after the daemon has
|
|
387
|
-
// exited (operator restart → panel reload → error visible).
|
|
388
|
-
function failBootstrap(input) {
|
|
389
|
-
const envelope = buildEnvelope(input);
|
|
390
|
-
persistBootstrapError(envelope, config.earningDir);
|
|
391
|
-
if (keepSetupUiOnBootstrapError()) {
|
|
392
|
-
emitStructured({
|
|
393
|
-
kind: 'error',
|
|
394
|
-
message: envelope.message,
|
|
395
|
-
errorCode: envelope.code,
|
|
396
|
-
details: {
|
|
397
|
-
phase: 'bootstrap',
|
|
398
|
-
exitCode: envelope.exitCode,
|
|
399
|
-
...(envelope.details ?? {}),
|
|
400
|
-
},
|
|
401
|
-
});
|
|
402
|
-
console.error(`[main] Bootstrap halted (${envelope.code}); setup UI remains available. ` +
|
|
403
|
-
`Resolve the issue and run jinn run again.`);
|
|
404
|
-
throw new SetupBootstrapHalted(envelope);
|
|
405
|
-
}
|
|
406
|
-
emitEnvelope(input);
|
|
407
|
-
// Unreachable in production (emitEnvelope exits); satisfies `never`.
|
|
408
|
-
throw new Error('unreachable');
|
|
409
|
-
}
|
|
410
|
-
const bootstrapper = new FleetBootstrapper({
|
|
411
|
-
earningDir: config.earningDir,
|
|
412
|
-
chain: NETWORK_CHAIN,
|
|
413
|
-
rpcUrl: config.rpcUrl,
|
|
414
|
-
stakingMode: config.stakingMode,
|
|
415
|
-
targetServices: config.targetServices,
|
|
416
|
-
testnetL2DeploymentPath: config.testnetL2DeploymentPath,
|
|
417
|
-
testnetL2TokenDeploymentPath: config.testnetL2TokenDeploymentPath,
|
|
418
|
-
testnetMechDeploymentPath: config.testnetMechDeploymentPath,
|
|
419
|
-
testnetStolasDeploymentPath: config.testnetStolasDeploymentPath,
|
|
420
|
-
debug: config.debug,
|
|
421
|
-
masterEthDailyEstimateWei: config.masterEthDailyEstimateWei,
|
|
422
|
-
minEoaGasWei: config.minEoaGasWei,
|
|
423
|
-
minSafeEthWei: config.minSafeEthWei,
|
|
424
|
-
pollIntervalMs: config.pollIntervalMs,
|
|
425
|
-
autoTestnetFaucet: process.env['JINN_AUTO_TESTNET_FAUCET'] === '1',
|
|
426
|
-
});
|
|
427
|
-
// Funding poll: stay up while waiting for the operator to fund the wallet.
|
|
428
|
-
// The setup-mode API server is already running; the panel renders the
|
|
429
|
-
// funding card and auto-advances when funds land. Daemon-side, we poll
|
|
430
|
-
// bootstrap on a 15s tick and only escalate (exit) if a non-funding error
|
|
431
|
-
// occurs or the configured timeout elapses. Each tick re-runs the full
|
|
432
|
-
// bootstrap state machine — completed steps are no-ops, so this is safe.
|
|
433
|
-
// Testnet faucet funding is panel-driven: bootstrap reports the funding gate,
|
|
434
|
-
// and the operator clicks the funding action before this loop can advance.
|
|
435
|
-
const FUNDING_POLL_INTERVAL_MS = 15_000;
|
|
436
|
-
const fundingTimeoutMs = (() => {
|
|
437
|
-
const raw = process.env['JINN_FUNDING_TIMEOUT_MS'];
|
|
438
|
-
if (!raw)
|
|
439
|
-
return Number.POSITIVE_INFINITY;
|
|
440
|
-
const n = Number.parseInt(raw, 10);
|
|
441
|
-
return Number.isFinite(n) && n > 0 ? n : Number.POSITIVE_INFINITY;
|
|
442
|
-
})();
|
|
443
|
-
emitProgress({
|
|
444
|
-
type: 'progress',
|
|
445
|
-
phase: 'bootstrap',
|
|
446
|
-
step: 'advance_state_machine',
|
|
447
|
-
estimatedWaitMs: 60_000,
|
|
448
|
-
});
|
|
449
|
-
const fundingStartedAt = Date.now();
|
|
450
|
-
let result;
|
|
451
|
-
let lastFundingMessage = '';
|
|
452
|
-
const fundingGatePath = join(config.earningDir, 'bootstrap-funding.json');
|
|
453
|
-
const persistFundingGate = (funding) => {
|
|
454
|
-
mkdirSync(config.earningDir, { recursive: true, mode: 0o700 });
|
|
455
|
-
writeFileSyncMain(fundingGatePath, `${JSON.stringify({
|
|
456
|
-
schemaVersion: 1,
|
|
457
|
-
generatedAt: new Date().toISOString(),
|
|
458
|
-
...funding,
|
|
459
|
-
}, null, 2)}\n`, { mode: 0o600 });
|
|
460
|
-
};
|
|
461
|
-
const clearFundingGate = () => {
|
|
462
|
-
try {
|
|
463
|
-
unlinkSync(fundingGatePath);
|
|
464
|
-
}
|
|
465
|
-
catch {
|
|
466
|
-
// best-effort: absent/stale funding gate should not affect bootstrap
|
|
467
|
-
}
|
|
468
|
-
};
|
|
469
|
-
// eslint-disable-next-line no-constant-condition
|
|
470
|
-
while (true) {
|
|
471
|
-
result = await bootstrapper.ensureStage1And2(PASSWORD);
|
|
472
|
-
if (!result.funding) {
|
|
473
|
-
clearFundingGate();
|
|
474
|
-
break;
|
|
475
|
-
}
|
|
476
|
-
persistFundingGate(result.funding);
|
|
477
|
-
// Emit a structured event so the panel's Visibility region shows the gate.
|
|
478
|
-
// Dedupe by message to avoid spamming the ring buffer on each poll.
|
|
479
|
-
const fundingMsg = result.message ?? 'awaiting funding';
|
|
480
|
-
if (fundingMsg !== lastFundingMessage) {
|
|
481
|
-
emitStructured({
|
|
482
|
-
kind: 'fleet',
|
|
483
|
-
message: fundingMsg,
|
|
484
|
-
details: {
|
|
485
|
-
phase: 'awaiting_funding',
|
|
486
|
-
role: 'master',
|
|
487
|
-
address: result.funding.master_address,
|
|
488
|
-
asset: 'native',
|
|
489
|
-
needWei: result.funding.eth_required,
|
|
490
|
-
haveWei: result.funding.eth_balance,
|
|
491
|
-
},
|
|
492
|
-
});
|
|
493
|
-
// Mirror the structured event to NDJSON progress for --json-progress
|
|
494
|
-
// consumers (CI, agents). Same dedup gate so we don't spam stdout.
|
|
495
|
-
emitProgress({
|
|
496
|
-
type: 'progress',
|
|
497
|
-
phase: 'bootstrap',
|
|
498
|
-
step: 'awaiting_funding',
|
|
499
|
-
blocking: true,
|
|
500
|
-
nextAction: 'Fund the address shown in addresses.fundingAddress, then wait for automatic retry.',
|
|
501
|
-
addresses: { fundingAddress: result.funding.master_address },
|
|
502
|
-
estimatedWaitMs: 1_800_000,
|
|
503
|
-
});
|
|
504
|
-
lastFundingMessage = fundingMsg;
|
|
505
|
-
}
|
|
506
|
-
const elapsed = Date.now() - fundingStartedAt;
|
|
507
|
-
if (elapsed >= fundingTimeoutMs) {
|
|
508
|
-
failBootstrap({
|
|
509
|
-
code: 'funding_required',
|
|
510
|
-
message: `${result.message} (timeout after ${Math.round(elapsed / 1000)}s)`,
|
|
511
|
-
hint: 'Fund the listed address and re-run this command.',
|
|
512
|
-
exampleCli: 'jinn fund-requirements --json',
|
|
513
|
-
details: {
|
|
514
|
-
// jinn-mono-hjex.6: structured envelope so SPA can render the
|
|
515
|
-
// specific address + amount instead of a prose disjunction.
|
|
516
|
-
category: 'insufficient_funds',
|
|
517
|
-
step: 'awaiting_funding',
|
|
518
|
-
address: result.funding.master_address,
|
|
519
|
-
requiredWei: result.funding.eth_required,
|
|
520
|
-
haveWei: result.funding.eth_balance,
|
|
521
|
-
// Legacy aliases kept for any external consumers that read these.
|
|
522
|
-
role: 'master',
|
|
523
|
-
asset: 'native',
|
|
524
|
-
needWei: result.funding.eth_required,
|
|
525
|
-
},
|
|
526
|
-
});
|
|
527
|
-
}
|
|
528
|
-
console.log(`[main] Awaiting funding... (${Math.round(elapsed / 1000)}s elapsed; ` +
|
|
529
|
-
`will retry in ${FUNDING_POLL_INTERVAL_MS / 1000}s)`);
|
|
530
|
-
await new Promise((r) => setTimeout(r, FUNDING_POLL_INTERVAL_MS));
|
|
531
|
-
}
|
|
532
|
-
if (!result.ok) {
|
|
533
|
-
failBootstrap({
|
|
534
|
-
code: 'fatal',
|
|
535
|
-
message: result.message,
|
|
536
|
-
hint: 'Bootstrap failed before the fleet reached a runnable state.',
|
|
537
|
-
details: {
|
|
538
|
-
cause: result.message,
|
|
539
|
-
// jinn-mono-hjex.6: propagate structured category from the bootstrapper
|
|
540
|
-
// so the SPA can render category-specific UI (e.g. funding shortfall).
|
|
541
|
-
...(result.errorCategory !== undefined ? { category: result.errorCategory } : {}),
|
|
542
|
-
// Preserve the raw underlying error so a misclassified summary can
|
|
543
|
-
// be diagnosed without re-running with JINN_DEBUG. See jinn-mono-jz9f.
|
|
544
|
-
...(result.rawErrorMessage && result.rawErrorMessage !== result.message
|
|
545
|
-
? { rawErrorMessage: result.rawErrorMessage }
|
|
546
|
-
: {}),
|
|
547
|
-
// jinn-mono-hjex reviewer fix: propagate tx hash so the SPA can render
|
|
548
|
-
// a block-explorer link for failed on-chain revert transactions.
|
|
549
|
-
...(result.txHash != null ? { txHash: result.txHash } : {}),
|
|
550
|
-
},
|
|
551
|
-
});
|
|
552
|
-
}
|
|
553
|
-
// Legacy migration (jinn-mono-jgp): backfill `agent_id` on `complete`
|
|
554
|
-
// services that pre-date j07. Idempotent + per-service failure-isolated;
|
|
555
|
-
// a failure here does not abort daemon startup, but we surface counts so
|
|
556
|
-
// operators notice. Disabled via `runLegacyMigrations: false` /
|
|
557
|
-
// JINN_RUN_LEGACY_MIGRATIONS=0 — operators can run `jinn migrate-agent-id`
|
|
558
|
-
// explicitly instead.
|
|
559
|
-
let state = result.fleet_state;
|
|
560
|
-
if (config.runLegacyMigrations) {
|
|
561
|
-
try {
|
|
562
|
-
const migration = await runLegacyAgentIdMigration({
|
|
563
|
-
earningDir: config.earningDir,
|
|
564
|
-
network: NETWORK_CHAIN,
|
|
565
|
-
rpcUrl: config.rpcUrl,
|
|
566
|
-
password: PASSWORD,
|
|
567
|
-
testnetL2DeploymentPath: config.testnetL2DeploymentPath,
|
|
568
|
-
testnetL2TokenDeploymentPath: config.testnetL2TokenDeploymentPath,
|
|
569
|
-
testnetMechDeploymentPath: config.testnetMechDeploymentPath,
|
|
570
|
-
testnetStolasDeploymentPath: config.testnetStolasDeploymentPath,
|
|
571
|
-
});
|
|
572
|
-
if (migration.migrated.length > 0 || migration.failed.length > 0) {
|
|
573
|
-
console.log(`[main] Legacy agent_id migration: migrated=${migration.migrated.length} ` +
|
|
574
|
-
`skipped=${migration.skipped.length} failed=${migration.failed.length}`);
|
|
575
|
-
for (const f of migration.failed) {
|
|
576
|
-
console.log(`[main] service ${f.service.index} (agent ${f.service.agent_address}): ${f.error}`);
|
|
577
|
-
}
|
|
578
|
-
// Reload state so downstream wiring (agent_id, identityRegistry)
|
|
579
|
-
// sees the migrated rows.
|
|
580
|
-
state = await new FleetStateStore(config.earningDir).load(NETWORK_CHAIN);
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
catch (err) {
|
|
584
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
585
|
-
console.error(`[main] Legacy agent_id migration failed (non-fatal): ${message}`);
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
// Use the first operational service for the daemon. `safe_binding_pending`
|
|
589
|
-
// means staking/mech are live; only the ERC-8004 Safe→agent metadata bind
|
|
590
|
-
// is still retrying.
|
|
591
|
-
const firstComplete = state.services.find(s => isOperationalServiceStep(s.step));
|
|
592
|
-
if (!firstComplete || !firstComplete.safe_address) {
|
|
593
|
-
failBootstrap({
|
|
594
|
-
code: 'bootstrap_incomplete',
|
|
595
|
-
message: 'Bootstrap completed but no service is ready.',
|
|
596
|
-
hint: 'Re-run to continue the state machine toward a running fleet.',
|
|
597
|
-
exampleCli: 'jinn bootstrap --json',
|
|
598
|
-
details: bootstrapIncompleteSteps(state),
|
|
599
|
-
});
|
|
600
|
-
}
|
|
601
|
-
// Derive agent private key from mnemonic
|
|
602
|
-
const store = new FleetStateStore(config.earningDir);
|
|
603
|
-
const mnemonic = await decryptMnemonic(await store.loadMnemonicKeystore(), PASSWORD);
|
|
604
|
-
const agentPrivateKey = walletPrivateKeyAtIndex(mnemonic, firstComplete.index);
|
|
605
|
-
console.log(`[main] Fleet bootstrap complete.`);
|
|
606
|
-
console.log(` Master: ${state.master_address}`);
|
|
607
|
-
console.log(` Services: ${state.services.filter(s => isOperationalServiceStep(s.step)).length}/${config.targetServices}`);
|
|
608
|
-
console.log(` Active: service ${firstComplete.service_id} (agent ${firstComplete.agent_address})`);
|
|
609
|
-
if (firstComplete.mech_address) {
|
|
610
|
-
console.log(` Mech: ${firstComplete.mech_address}`);
|
|
611
|
-
}
|
|
612
|
-
return {
|
|
613
|
-
masterAddress: state.master_address,
|
|
614
|
-
serviceIndex: firstComplete.index,
|
|
615
|
-
serviceId: firstComplete.service_id ?? null,
|
|
616
|
-
stakingAddress: firstComplete.staking_address ? firstComplete.staking_address : null,
|
|
617
|
-
agentPrivateKey: agentPrivateKey,
|
|
618
|
-
safeAddress: firstComplete.safe_address,
|
|
619
|
-
mechAddress: firstComplete.mech_address ? firstComplete.mech_address : undefined,
|
|
620
|
-
agentId: firstComplete.agent_id ?? null,
|
|
621
|
-
identityRegistryAddress: firstComplete.identity_registry_address
|
|
622
|
-
? firstComplete.identity_registry_address
|
|
623
|
-
: null,
|
|
624
|
-
};
|
|
625
|
-
}
|
|
626
|
-
class SetupBootstrapHalted extends Error {
|
|
627
|
-
envelope;
|
|
628
|
-
constructor(envelope) {
|
|
629
|
-
super(envelope.message);
|
|
630
|
-
this.envelope = envelope;
|
|
631
|
-
this.name = 'SetupBootstrapHalted';
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
208
|
// hjex.6: gate for the halt-and-resume loop. Lives in ./setup/halt-mode.ts
|
|
635
209
|
// so it can be unit-tested without dragging main.ts's top-level side
|
|
636
210
|
// effects (password resolution, config load) into the test.
|
|
637
211
|
// ── Main ────────────────────────────────────────────────────────────────────
|
|
638
|
-
/**
|
|
639
|
-
* --json-progress: emit NDJSON progress envelopes on stdout during long
|
|
640
|
-
* phases (init, bootstrap, daemon startup). The `jinn run --json-progress`
|
|
641
|
-
* flag flips JINN_JSON_PROGRESS=1 in run.ts before calling main(); when
|
|
642
|
-
* unset this is a no-op so tests / non-flag invocations stay silent on
|
|
643
|
-
* stdout.
|
|
644
|
-
*/
|
|
645
|
-
function progressEnabled() {
|
|
646
|
-
return process.env['JINN_JSON_PROGRESS'] === '1';
|
|
647
|
-
}
|
|
648
|
-
function emitProgress(envelope) {
|
|
649
|
-
if (progressEnabled()) {
|
|
650
|
-
process.stdout.write(JSON.stringify(envelope) + '\n');
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
212
|
export async function main() {
|
|
213
|
+
// Issue #909: chdir to a stable directory before spawning any child process.
|
|
214
|
+
// `jinn run` inherits the launch shell's CWD; when daemonised from an
|
|
215
|
+
// ephemeral dir that is later deleted, the CWD becomes a dangling inode and
|
|
216
|
+
// child processes (the `claude` CLI harness probe) crash on getcwd() ENOENT.
|
|
217
|
+
// Must run first — before getFileLogger() and any subprocess spawn.
|
|
218
|
+
ensureStableCwd({ earningDir: config.earningDir });
|
|
654
219
|
console.log(`[main] jinn-client starting on ${NETWORK_CHAIN}`);
|
|
655
220
|
// Issue #420: initialise the rotating daemon file logger early so lifecycle
|
|
656
221
|
// events (tapped in `observability/emit-event.ts`) accumulate durable,
|
|
@@ -700,12 +265,8 @@ export async function main() {
|
|
|
700
265
|
// Boot-time RPC fallback-chain probe (issue #592, AC7 + AC9). Log-only —
|
|
701
266
|
// per-slot 429s/5xx never gate startup. checkRpcNetwork above already
|
|
702
267
|
// fail-loud on chain-id mismatch against the head provider.
|
|
703
|
-
await probeFallbackChain(config.rpcUrls, config.network, 'L2');
|
|
268
|
+
lastL2Probe = await probeFallbackChain(config.rpcUrls, config.network, 'L2');
|
|
704
269
|
console.error(summarizeFallbackChain('L2', config.rpcUrls));
|
|
705
|
-
if (config.jinnClaimLoopEnabled && config.ethereumRpcUrls) {
|
|
706
|
-
await probeFallbackChain(config.ethereumRpcUrls, config.network, 'L1');
|
|
707
|
-
console.error(summarizeFallbackChain('L1', config.ethereumRpcUrls));
|
|
708
|
-
}
|
|
709
270
|
const portPreflight = await checkApiPortAvailable(config.apiPort);
|
|
710
271
|
if (!portPreflight.ok) {
|
|
711
272
|
emitEnvelope({
|
|
@@ -860,6 +421,17 @@ export async function main() {
|
|
|
860
421
|
// builder-artifacts. Holder ref lets the routes register eagerly and
|
|
861
422
|
// start returning real data the moment main.ts assigns holder.current.
|
|
862
423
|
const discoveryApiHolder = { current: undefined };
|
|
424
|
+
// #1037: same eager-register / late-populate pattern for the join applier.
|
|
425
|
+
// The join endpoint registers eagerly inside startApiServer; the applier is
|
|
426
|
+
// built only after the latest join-consuming subsystem (the engine view,
|
|
427
|
+
// wired in the Daemon ctor). The endpoint tolerates an empty holder in the
|
|
428
|
+
// gap between server-start and populate by falling back to
|
|
429
|
+
// restartRequired:true.
|
|
430
|
+
const joinApplierHolder = { current: undefined };
|
|
431
|
+
// #641: latest published `@jinn-network/client` version, back-filled by the
|
|
432
|
+
// start-time npm-registry check below. `/v1/status.latestVersion` reads this
|
|
433
|
+
// via the `latestVersion` getter threaded into the ApiServer status config.
|
|
434
|
+
const latestVersionHolder = { current: null };
|
|
863
435
|
// hjex.6: retry signal for the bootstrap halt-and-resume loop.
|
|
864
436
|
// When a SetupBootstrapHalted is caught (fatal non-funding error or funding
|
|
865
437
|
// timeout), main() waits on this promise instead of returning, so the setup
|
|
@@ -965,7 +537,27 @@ export async function main() {
|
|
|
965
537
|
configReader: () => ({
|
|
966
538
|
rpcUrl: config.rpcUrl,
|
|
967
539
|
defaultRpcUrl: CHAIN_CONFIG.rpcUrl,
|
|
540
|
+
rpcUrls: config.rpcUrls,
|
|
541
|
+
publicDefaults: RPC_PUBLIC_DEFAULTS,
|
|
542
|
+
rpcSlotHealth: lastL2Probe.map((p) => p.ok
|
|
543
|
+
? {
|
|
544
|
+
ok: true,
|
|
545
|
+
host: p.host,
|
|
546
|
+
latencyMs: p.latencyMs,
|
|
547
|
+
expectedChainId: p.expectedChainId,
|
|
548
|
+
actualChainId: p.actualChainId,
|
|
549
|
+
...(p.localDev ? { localDev: true } : {}),
|
|
550
|
+
}
|
|
551
|
+
: {
|
|
552
|
+
ok: false,
|
|
553
|
+
host: p.host,
|
|
554
|
+
code: p.code,
|
|
555
|
+
reason: p.reason,
|
|
556
|
+
expectedChainId: p.expectedChainId,
|
|
557
|
+
actualChainId: p.actualChainId,
|
|
558
|
+
}),
|
|
968
559
|
joinedSolverNets: config.joinedSolverNets,
|
|
560
|
+
onboardingComplete: config.onboardingComplete,
|
|
969
561
|
}),
|
|
970
562
|
},
|
|
971
563
|
// SolverNet catalog. Stubbed to the bundled `prediction` net for v1.
|
|
@@ -1082,10 +674,15 @@ export async function main() {
|
|
|
1082
674
|
// targetServices DOES need to flow through so the faucet drips enough
|
|
1083
675
|
// ETH to cover ALL services for the operator's chosen targetServices.
|
|
1084
676
|
targetServices: config.targetServices,
|
|
677
|
+
// Issue #560: batched daily-cap top-up knobs — single source of truth
|
|
678
|
+
// in JinnConfig, surfaced to the SPA via GET /v1/setup/drip/quota.
|
|
679
|
+
faucetDailyTopupCap: config.faucetDailyTopupCap,
|
|
680
|
+
faucetTopupCooldownMs: config.faucetTopupCooldownMs,
|
|
1085
681
|
claudePath: activeClaudePath,
|
|
1086
682
|
getClaudePath: () => activeClaudePath,
|
|
1087
683
|
configPath: CONFIG_PATH ?? DEFAULT_CONFIG_PATH,
|
|
1088
684
|
defaultRpcUrlForChain: () => CHAIN_CONFIG.rpcUrl,
|
|
685
|
+
defaultRpcUrlsForChain: () => RPC_PUBLIC_DEFAULTS,
|
|
1089
686
|
onClaudePathSelected: selectClaudePath,
|
|
1090
687
|
// Issue #421 retired the legacy `solverNets` write target. Setup
|
|
1091
688
|
// endpoints no longer call back into the daemon to mutate operator
|
|
@@ -1113,16 +710,21 @@ export async function main() {
|
|
|
1113
710
|
resolve();
|
|
1114
711
|
});
|
|
1115
712
|
},
|
|
713
|
+
// #1037: hot-apply a join to the running daemon. Populated after the
|
|
714
|
+
// join-consuming subsystems are built (see joinApplierHolder). Empty
|
|
715
|
+
// until then → the endpoint returns restartRequired:true.
|
|
716
|
+
joinApplier: joinApplierHolder,
|
|
717
|
+
// #983: mutate the in-memory config so GET /v1/bootstrap reflects the
|
|
718
|
+
// completion flag live (the endpoint persists to disk; this keeps the
|
|
719
|
+
// configReader's in-memory read consistent — same pattern as the
|
|
720
|
+
// join-applier's config write). Cast: JinnConfig has the optional field.
|
|
721
|
+
markOnboardingComplete: () => {
|
|
722
|
+
config.onboardingComplete = true;
|
|
723
|
+
},
|
|
1116
724
|
},
|
|
1117
725
|
status: {
|
|
1118
726
|
earningDir: config.earningDir,
|
|
1119
727
|
rpcUrl: config.rpcUrl,
|
|
1120
|
-
// tJINN identity comes from the bundled JINN MVI L1 artifact
|
|
1121
|
-
// (`JINN_MVI_CONFIG`) — one source of truth. The Sepolia RPC endpoint
|
|
1122
|
-
// is read from `config.ethereumRpcUrl` via the threaded `config`.
|
|
1123
|
-
tjinnTokenAddress: JINN_MVI_CONFIG.jinn,
|
|
1124
|
-
tjinnChainId: JINN_MVI_CONFIG.l1ChainId,
|
|
1125
|
-
tjinnDistributorAddress: JINN_MVI_CONFIG.distributor,
|
|
1126
728
|
network: config.network,
|
|
1127
729
|
pollIntervalMs: config.pollIntervalMs,
|
|
1128
730
|
masterEthDailyEstimateWei: config.masterEthDailyEstimateWei,
|
|
@@ -1134,6 +736,10 @@ export async function main() {
|
|
|
1134
736
|
engine: config.engine,
|
|
1135
737
|
config,
|
|
1136
738
|
configPath: CONFIG_PATH ?? DEFAULT_CONFIG_PATH,
|
|
739
|
+
passwordRotation: {
|
|
740
|
+
source: passwordResolution.source,
|
|
741
|
+
filePath: passwordResolution.filePath,
|
|
742
|
+
},
|
|
1137
743
|
},
|
|
1138
744
|
// Launcher mode (Tasks 6 + 7). Deps are resolved lazily because the
|
|
1139
745
|
// generator and Safe address are constructed after bootstrap, after
|
|
@@ -1226,6 +832,11 @@ export async function main() {
|
|
|
1226
832
|
const rows = sharedStore.listPostedTasksByCreator(opts);
|
|
1227
833
|
return rows.map((r) => ({
|
|
1228
834
|
taskId: r.taskId,
|
|
835
|
+
// On-chain decimal id (#579) — the launcher status chip keys its
|
|
836
|
+
// indexer lookup on this, not the off-chain display taskId. Empty
|
|
837
|
+
// string (no on-chain id recorded) maps to undefined so the
|
|
838
|
+
// gatherer falls back to taskId.
|
|
839
|
+
...(r.protocolTaskId ? { protocolTaskId: r.protocolTaskId } : {}),
|
|
1229
840
|
taskCid: r.taskCid,
|
|
1230
841
|
solverType: r.solverType ?? undefined,
|
|
1231
842
|
postedAt: r.postedAt,
|
|
@@ -1233,6 +844,16 @@ export async function main() {
|
|
|
1233
844
|
...(r.claims ? { claims: r.claims } : {}),
|
|
1234
845
|
}));
|
|
1235
846
|
},
|
|
847
|
+
// #579: on-chain finalized/open/expired status for the Recent posted
|
|
848
|
+
// Tasks chip. discoveryApiHolder is populated post-bootstrap; before
|
|
849
|
+
// that (or with no discovery API) we return an empty Map → all chips
|
|
850
|
+
// render 'unknown', the safe degraded default.
|
|
851
|
+
fetchTaskStatuses: async (manifestCid) => {
|
|
852
|
+
const api = discoveryApiHolder.current;
|
|
853
|
+
if (!api)
|
|
854
|
+
return new Map();
|
|
855
|
+
return api.getTaskStatuses({ manifestCid });
|
|
856
|
+
},
|
|
1236
857
|
},
|
|
1237
858
|
},
|
|
1238
859
|
});
|
|
@@ -1260,11 +881,36 @@ export async function main() {
|
|
|
1260
881
|
`http://127.0.0.1:${setupApiServer.port}/?k=${handshakeKey}`;
|
|
1261
882
|
// Auto-open the operator panel as soon as the setup-mode API is up so the
|
|
1262
883
|
// operator can watch bootstrap progress (including the funding wait, which
|
|
1263
|
-
// is the whole point of starting the API early).
|
|
1264
|
-
//
|
|
1265
|
-
|
|
884
|
+
// is the whole point of starting the API early). Only on the first-ever
|
|
885
|
+
// launch (tracked by a marker file) — otherwise every restart during a
|
|
886
|
+
// dogfooding session opens a fresh browser tab and stale tabs accumulate
|
|
887
|
+
// (issue #804). `jinn run --no-ui` / JINN_NO_UI=1 always suppresses;
|
|
888
|
+
// `jinn run --ui` / JINN_FORCE_UI=1 forces a reopen even past first launch.
|
|
889
|
+
const uiOpenedMarkerPath = join(config.earningDir, '.ui-opened');
|
|
890
|
+
const noUi = process.env['JINN_NO_UI'] === '1';
|
|
891
|
+
const forceUi = process.env['JINN_FORCE_UI'] === '1';
|
|
892
|
+
const uiAutoOpenDecision = decideUiAutoOpen({
|
|
893
|
+
noUi,
|
|
894
|
+
forceUi,
|
|
895
|
+
markerExists: existsSync(uiOpenedMarkerPath),
|
|
896
|
+
});
|
|
897
|
+
if (uiAutoOpenDecision.shouldOpen) {
|
|
1266
898
|
openBrowser(process.env['JINN_UI_HANDSHAKE_URL']);
|
|
1267
899
|
}
|
|
900
|
+
else if (!noUi) {
|
|
901
|
+
console.log(`[main] Dashboard ready at http://127.0.0.1:${setupApiServer.port} — ` +
|
|
902
|
+
`run 'jinn ui' to open it (auto-open suppressed after first launch; use --ui to force)`);
|
|
903
|
+
}
|
|
904
|
+
if (uiAutoOpenDecision.shouldWriteMarker) {
|
|
905
|
+
try {
|
|
906
|
+
mkdirSync(dirname(uiOpenedMarkerPath), { recursive: true });
|
|
907
|
+
writeFileSyncMain(uiOpenedMarkerPath, new Date().toISOString() + '\n');
|
|
908
|
+
}
|
|
909
|
+
catch (err) {
|
|
910
|
+
console.warn(`[main] Failed to write UI-opened marker at ${uiOpenedMarkerPath}: ` +
|
|
911
|
+
(err instanceof Error ? err.message : String(err)));
|
|
912
|
+
}
|
|
913
|
+
}
|
|
1268
914
|
console.log(`[main] Setup-mode API up (mode=${setupController.mode()}). ` +
|
|
1269
915
|
`Dashboard: http://127.0.0.1:${setupApiServer.port}`);
|
|
1270
916
|
// ── Operator agent WebSocket bridge ──────────────────────────────────────
|
|
@@ -1356,7 +1002,7 @@ export async function main() {
|
|
|
1356
1002
|
// eslint-disable-next-line no-constant-condition
|
|
1357
1003
|
while (true) {
|
|
1358
1004
|
try {
|
|
1359
|
-
bootstrapResult = await
|
|
1005
|
+
bootstrapResult = await runFleetBootstrap({ config, password: PASSWORD, network: NETWORK_CHAIN, emitProgress });
|
|
1360
1006
|
break; // success — exit the retry loop
|
|
1361
1007
|
}
|
|
1362
1008
|
catch (err) {
|
|
@@ -1506,6 +1152,11 @@ export async function main() {
|
|
|
1506
1152
|
const taskDiscoveryManifestCids = Object.values(config.joinedSolverNets ?? {})
|
|
1507
1153
|
.filter((entry) => entry.roles.includes('solver'))
|
|
1508
1154
|
.map((entry) => entry.manifestCid);
|
|
1155
|
+
// #547: only scan/ingest evaluation opportunities when this operator holds the
|
|
1156
|
+
// evaluator role in at least one joined SolverNet. The join applier flips this
|
|
1157
|
+
// on live via adapter.setEvaluatorEnabled(true).
|
|
1158
|
+
const evaluatorEnabled = Object.values(config.joinedSolverNets ?? {})
|
|
1159
|
+
.some((entry) => entry.roles.includes('evaluator'));
|
|
1509
1160
|
// ── DiscoveryAPI construction ─────────────────────────────────────────────
|
|
1510
1161
|
// Build the shared DiscoveryAPI used by MechAdapter (task discovery),
|
|
1511
1162
|
// the SolverNet registry client (lifecycle status), and the corpus library
|
|
@@ -1549,6 +1200,28 @@ export async function main() {
|
|
|
1549
1200
|
// the panel's next refetch. Before this, the routes 404'd forever and
|
|
1550
1201
|
// the /build page rendered "Discovery unavailable" permanently.
|
|
1551
1202
|
discoveryApiHolder.current = sharedDiscoveryApi;
|
|
1203
|
+
// #1037: the live task-discovery descriptor. Always present with a mutable
|
|
1204
|
+
// `solverNetManifestCids` array (`taskDiscoveryManifestCids` is a fresh
|
|
1205
|
+
// `.map` result, safe to push onto). The join applier holds this same object
|
|
1206
|
+
// reference and pushes a newly-joined cid onto it live.
|
|
1207
|
+
const taskDiscovery = {
|
|
1208
|
+
discoveryApi: sharedDiscoveryApi,
|
|
1209
|
+
solverNetManifestCids: taskDiscoveryManifestCids,
|
|
1210
|
+
// No explicit `onchainFromBlock` by default — let `MechAdapter`'s
|
|
1211
|
+
// `DEFAULT_TASK_DISCOVERY_FROM_BLOCK` per-chain default flow through.
|
|
1212
|
+
// Hardcoding here shadowed the adapter's default and re-introduced the
|
|
1213
|
+
// ghost-task floor every release; removing the shadow makes `adapter.ts`
|
|
1214
|
+
// the single source of truth. See gh #300. An operator MAY opt in to a
|
|
1215
|
+
// recent floor via `taskDiscoveryOnchainFromBlock` to bound the canonical
|
|
1216
|
+
// getLogs scan (which otherwise parses a large history on the main thread
|
|
1217
|
+
// and can stall the loop) and lean on the indexer DiscoveryAPI.
|
|
1218
|
+
...(config.taskDiscoveryOnchainFromBlock !== undefined
|
|
1219
|
+
? { onchainFromBlock: config.taskDiscoveryOnchainFromBlock }
|
|
1220
|
+
: {}),
|
|
1221
|
+
...(config.taskDiscoveryAllowedTaskIds?.length
|
|
1222
|
+
? { allowedTaskIds: config.taskDiscoveryAllowedTaskIds }
|
|
1223
|
+
: {}),
|
|
1224
|
+
};
|
|
1552
1225
|
const adapter = new MechAdapter({
|
|
1553
1226
|
rpcUrl: config.rpcUrls,
|
|
1554
1227
|
mechMarketplaceAddress: MARKETPLACE_ADDRESS,
|
|
@@ -1562,27 +1235,8 @@ export async function main() {
|
|
|
1562
1235
|
chainId: config.network === 'testnet' ? 84532 : 8453,
|
|
1563
1236
|
routerClaimDeliveryVariant: CHAIN_CONFIG.routerClaimDeliveryVersion,
|
|
1564
1237
|
evictionRecovery,
|
|
1565
|
-
taskDiscovery
|
|
1566
|
-
|
|
1567
|
-
discoveryApi: sharedDiscoveryApi,
|
|
1568
|
-
solverNetManifestCids: taskDiscoveryManifestCids,
|
|
1569
|
-
// No explicit `onchainFromBlock` by default — let `MechAdapter`'s
|
|
1570
|
-
// `DEFAULT_TASK_DISCOVERY_FROM_BLOCK` per-chain default flow
|
|
1571
|
-
// through. Hardcoding here shadowed the adapter's default and
|
|
1572
|
-
// re-introduced the ghost-task floor every release; removing the
|
|
1573
|
-
// shadow makes `adapter.ts` the single source of truth. See gh
|
|
1574
|
-
// #300. An operator MAY opt in to a recent floor via
|
|
1575
|
-
// `taskDiscoveryOnchainFromBlock` to bound the canonical getLogs
|
|
1576
|
-
// scan (which otherwise parses a large history on the main thread
|
|
1577
|
-
// and can stall the loop) and lean on the indexer DiscoveryAPI.
|
|
1578
|
-
...(config.taskDiscoveryOnchainFromBlock !== undefined
|
|
1579
|
-
? { onchainFromBlock: config.taskDiscoveryOnchainFromBlock }
|
|
1580
|
-
: {}),
|
|
1581
|
-
...(config.taskDiscoveryAllowedTaskIds?.length
|
|
1582
|
-
? { allowedTaskIds: config.taskDiscoveryAllowedTaskIds }
|
|
1583
|
-
: {}),
|
|
1584
|
-
}
|
|
1585
|
-
: undefined,
|
|
1238
|
+
taskDiscovery,
|
|
1239
|
+
evaluatorEnabled,
|
|
1586
1240
|
}, sharedStore);
|
|
1587
1241
|
// ── TaskEngine wiring ─────────────────────────────────────────────────
|
|
1588
1242
|
// Build agent viem clients (same creds as MechAdapter uses internally).
|
|
@@ -1590,57 +1244,7 @@ export async function main() {
|
|
|
1590
1244
|
const agentChain = config.network === 'testnet'
|
|
1591
1245
|
? viemChains.baseSepolia
|
|
1592
1246
|
: viemChains.base;
|
|
1593
|
-
const l1Chain = config.jinnL1Network === 'sepolia' ? viemChains.sepolia : viemChains.mainnet;
|
|
1594
|
-
const agentChainContracts = agentChain.contracts;
|
|
1595
|
-
const optimismPortalAddress = agentChainContracts?.portal?.[l1Chain.id]?.address;
|
|
1596
|
-
const disputeGameFactoryAddress = agentChainContracts?.disputeGameFactory?.[l1Chain.id]?.address;
|
|
1597
|
-
const l2ProofClient = config.l2ProofRpcUrls
|
|
1598
|
-
? createJinnPublicClient(config.l2ProofRpcUrls, NETWORK_CHAIN)
|
|
1599
|
-
: undefined;
|
|
1600
1247
|
const agentClients = createClients(config.rpcUrls, agentPrivateKey, agentChain);
|
|
1601
|
-
// ── L1 (Sepolia / Ethereum mainnet) clients for cross-chain JINN claim loop ──
|
|
1602
|
-
// Uses the agent EOA because MockMessenger.owner is the agent on testnet.
|
|
1603
|
-
// Same key as L2; only the chain differs.
|
|
1604
|
-
const shouldWireJinnClaimL1 = shouldWireJinnClaimL1Signer({
|
|
1605
|
-
enabled: config.jinnClaimLoopEnabled,
|
|
1606
|
-
intervalMs: config.jinnClaimLoopIntervalMs,
|
|
1607
|
-
submissionMode: config.jinnClaimSubmissionMode,
|
|
1608
|
-
distributorAddress: JINN_MVI_CONFIG.distributor,
|
|
1609
|
-
ethereumRpcUrl: config.ethereumRpcUrl,
|
|
1610
|
-
});
|
|
1611
|
-
const l1ClientsForJinnClaim = shouldWireJinnClaimL1 && config.ethereumRpcUrls
|
|
1612
|
-
? {
|
|
1613
|
-
public: createJinnL1PublicClient(config.ethereumRpcUrls, config.jinnL1Network),
|
|
1614
|
-
wallet: createJinnL1WalletClient(config.ethereumRpcUrls, config.jinnL1Network, privateKeyToAccount(agentPrivateKey)),
|
|
1615
|
-
}
|
|
1616
|
-
: undefined;
|
|
1617
|
-
const jinnClaimLoopConfig = buildJinnClaimLoopConfig({
|
|
1618
|
-
enabled: config.jinnClaimLoopEnabled,
|
|
1619
|
-
intervalMs: config.jinnClaimLoopIntervalMs,
|
|
1620
|
-
submissionMode: config.jinnClaimSubmissionMode,
|
|
1621
|
-
messengerMode: JINN_CLAIM_MESSENGER_MODE,
|
|
1622
|
-
mvi: JINN_MVI_CONFIG,
|
|
1623
|
-
l2Client: agentClients.publicClient,
|
|
1624
|
-
l2ProofClient,
|
|
1625
|
-
l2Wallet: agentClients.walletClient,
|
|
1626
|
-
l1Clients: l1ClientsForJinnClaim,
|
|
1627
|
-
store: earningStore,
|
|
1628
|
-
chain: NETWORK_CHAIN,
|
|
1629
|
-
optimismPortalAddress,
|
|
1630
|
-
disputeGameFactoryAddress,
|
|
1631
|
-
});
|
|
1632
|
-
if (jinnClaimLoopConfig) {
|
|
1633
|
-
console.log(`[main] JinnClaimLoop: enabled (submission=${config.jinnClaimSubmissionMode}, ` +
|
|
1634
|
-
`mode=${JINN_CLAIM_MESSENGER_MODE}, ` +
|
|
1635
|
-
`interval=${config.jinnClaimLoopIntervalMs}ms, distributor=${JINN_MVI_CONFIG.distributor}, ` +
|
|
1636
|
-
`emitter=${JINN_MVI_CONFIG.claimEmitter})`);
|
|
1637
|
-
}
|
|
1638
|
-
else if (!config.jinnClaimLoopEnabled) {
|
|
1639
|
-
console.log('[main] JinnClaimLoop: disabled (jinnClaimLoopEnabled=false)');
|
|
1640
|
-
}
|
|
1641
|
-
else {
|
|
1642
|
-
console.log(`[main] JinnClaimLoop: disabled (missing claim-loop artifacts, interval disabled, or L1 submit wiring)`);
|
|
1643
|
-
}
|
|
1644
1248
|
// ── Harness registry ─────────────────────────────────────────────────────────
|
|
1645
1249
|
const solverNetRegistry = await loadSolverNets(config);
|
|
1646
1250
|
for (const net of solverNetRegistry.list()) {
|
|
@@ -1765,6 +1369,13 @@ export async function main() {
|
|
|
1765
1369
|
// is no longer needed and would throw on Hono's locked matcher.
|
|
1766
1370
|
harnessReadinessRegistryHolder.current = harnessReadinessRegistry;
|
|
1767
1371
|
console.log('[main] HarnessReadinessRegistry started; /v1/harnesses/readiness routes active.');
|
|
1372
|
+
// #1037: always construct the engine eligibility view (mutable) so a
|
|
1373
|
+
// hot-applied join can inject its cid live. Previously this was wired only
|
|
1374
|
+
// when config.joinedSolverNets was truthy; a zero-join daemon then ran the
|
|
1375
|
+
// legacy solverType gate. With an always-present empty view, a zero-join
|
|
1376
|
+
// daemon rejects cid-bearing tasks (its discovery cid set is empty so it
|
|
1377
|
+
// discovers none) and still passes legacy no-cid tasks. See plan §behaviour-change.
|
|
1378
|
+
const joinedSolverNetsView = createMutableJoinedSolverNetsView(config.joinedSolverNets);
|
|
1768
1379
|
// ── Engine deps ───────────────────────────────────────────────────────────────
|
|
1769
1380
|
// Packaging deps: artifacts are always written to served_artifacts
|
|
1770
1381
|
// (operator-local SQLite). In public-testnet donation mode, scrubbed artifact
|
|
@@ -1830,6 +1441,17 @@ export async function main() {
|
|
|
1830
1441
|
claimDeliveryVariant: CHAIN_CONFIG.routerClaimDeliveryVersion,
|
|
1831
1442
|
evictionRecovery,
|
|
1832
1443
|
};
|
|
1444
|
+
// ── Contribution reference queue (task-creator spec §10) ─────────────────
|
|
1445
|
+
//
|
|
1446
|
+
// ALWAYS constructed so legacy v1/v2 files migrate once to the reference-only
|
|
1447
|
+
// v3 schema. Stage 2 keeps every unpublished reference explicitly disabled;
|
|
1448
|
+
// canonical Episode persistence is owned by the harness layer.
|
|
1449
|
+
const { ContributionStore, resolveContributionStateDir } = await import('./vendor/@jinn-network/core/dist/index.js');
|
|
1450
|
+
const contributionStore = new ContributionStore({
|
|
1451
|
+
stateDir: resolveContributionStateDir(),
|
|
1452
|
+
});
|
|
1453
|
+
await contributionStore.disableUnpublished();
|
|
1454
|
+
console.log('[main] contribution references: local eligibility queue — publication=parked');
|
|
1833
1455
|
// ── IdentityPublisher (jinn-mono-3zk) ───────────────────────────────────────
|
|
1834
1456
|
//
|
|
1835
1457
|
// When the bootstrap has minted an ERC-8004 IdentityRegistry NFT for the
|
|
@@ -1851,6 +1473,14 @@ export async function main() {
|
|
|
1851
1473
|
else {
|
|
1852
1474
|
console.log('[main] IdentityPublisher: disabled (no agent_id on active service — re-run bootstrap to mint the operator agent NFT)');
|
|
1853
1475
|
}
|
|
1476
|
+
// ── Seller-side scrub pipeline (publish-time) ─────────────────────────────
|
|
1477
|
+
// One pipeline shared by the task engine and the live capture publisher so
|
|
1478
|
+
// every published trajectory passes through the same maintained scrub stack
|
|
1479
|
+
// (structural key policy → openredaction → secretlint/entropy → optional ML
|
|
1480
|
+
// PII). The OTLP receiver above runs best-effort ingest-time scrubbers; this
|
|
1481
|
+
// is the authoritative final gate before a trajectory becomes public/sellable.
|
|
1482
|
+
const sellerPiiDetector = await maybeBuildPiiDetector(config.captures.piiDetection);
|
|
1483
|
+
const sellerScrubPipeline = buildScrubPipeline(sellerPiiDetector ? { piiDetector: sellerPiiDetector } : {});
|
|
1854
1484
|
const liveCapturePublisher = createLiveCapturePublisher({
|
|
1855
1485
|
store: sharedStore,
|
|
1856
1486
|
captures: capturesStore,
|
|
@@ -1863,6 +1493,7 @@ export async function main() {
|
|
|
1863
1493
|
clientGitSha: buildInfo.clientGitSha,
|
|
1864
1494
|
identityPublisher,
|
|
1865
1495
|
harnessMode: config.harness.mode,
|
|
1496
|
+
scrubPipeline: sellerScrubPipeline,
|
|
1866
1497
|
});
|
|
1867
1498
|
capturePublishRef.current = liveCapturePublisher.publishCapture;
|
|
1868
1499
|
// ── Reputation feedback hook (jinn-mono-yg4) ──────────────────────────────
|
|
@@ -2101,13 +1732,27 @@ export async function main() {
|
|
|
2101
1732
|
new StaticConfiguredTaskSource(bindableConfigTasks),
|
|
2102
1733
|
...launchedRecordGenerators.map(({ solverType, generator }, idx) => new GeneratedTaskSource(`launched:${solverType}:${idx}`, generator, {
|
|
2103
1734
|
bucketKeyForTask: (task) => {
|
|
2104
|
-
if (task.solverType
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
return
|
|
2110
|
-
|
|
1735
|
+
if (task.solverType === 'swe-rebench-v2.v1') {
|
|
1736
|
+
const instanceId = task.spec?.['instance_id'];
|
|
1737
|
+
const postedCount = task.eligibility?.['posted_count_after_record'];
|
|
1738
|
+
if (typeof instanceId !== 'string' || typeof postedCount !== 'number')
|
|
1739
|
+
return undefined;
|
|
1740
|
+
return `swe-rebench-v2:${instanceId}:${postedCount}`;
|
|
1741
|
+
}
|
|
1742
|
+
// Issue #1893: jinn-repo.v1 live-issue tasks bucket on
|
|
1743
|
+
// <issueNumber>:<snapshotHash> (carried on `eligibility` by
|
|
1744
|
+
// `jinn-repo-live-auto.ts`) rather than the default window-based
|
|
1745
|
+
// key — the window's startTs/endTs changes every tick, which would
|
|
1746
|
+
// defeat once-per-bucket dedup for a generator whose own re-post
|
|
1747
|
+
// signal is a material issue edit, not the passage of time.
|
|
1748
|
+
if (task.solverType === 'jinn-repo.v1' && task.spec?.['source'] === 'live-issue') {
|
|
1749
|
+
const issueNumber = task.eligibility?.['issue_number'];
|
|
1750
|
+
const snapshotHash = task.eligibility?.['snapshot_hash'];
|
|
1751
|
+
if (typeof issueNumber !== 'number' || typeof snapshotHash !== 'string')
|
|
1752
|
+
return undefined;
|
|
1753
|
+
return `jinn-repo-live:${issueNumber}:${snapshotHash}`;
|
|
1754
|
+
}
|
|
1755
|
+
return undefined;
|
|
2111
1756
|
},
|
|
2112
1757
|
})),
|
|
2113
1758
|
];
|
|
@@ -2157,6 +1802,66 @@ export async function main() {
|
|
|
2157
1802
|
const source = overrideSet && !matchesDefault ? 'env' : 'default';
|
|
2158
1803
|
console.log(`[ai-units] cap=${aiUnits.capPerBlock}/${aiUnits.capPerWeek} per (block, week) source=${source}`);
|
|
2159
1804
|
}
|
|
1805
|
+
let harvestLoopConfig;
|
|
1806
|
+
const harvestMinesSessions = config.harvest.sources.includes('sessions');
|
|
1807
|
+
if (config.harvest.enabled &&
|
|
1808
|
+
config.harvest.intervalMs > 0 &&
|
|
1809
|
+
(config.harvest.repos.length > 0 || harvestMinesSessions)) {
|
|
1810
|
+
const { resolveHarvestRepoConfigs } = await import('./daemon/harvest-loop.js');
|
|
1811
|
+
const harvestRepos = await resolveHarvestRepoConfigs(config.harvest.repos);
|
|
1812
|
+
// A sessions-only operator legitimately has zero repos. The loop remains
|
|
1813
|
+
// schedulable so it can report the explicit Stage 2 parked marker.
|
|
1814
|
+
if (harvestRepos.length > 0 || harvestMinesSessions) {
|
|
1815
|
+
const { defaultStateDir } = await import('./solver-types/swe-rebench-v2.js');
|
|
1816
|
+
const harvestStateDir = defaultStateDir();
|
|
1817
|
+
const baseHarvestLoopConfig = {
|
|
1818
|
+
intervalMs: config.harvest.intervalMs,
|
|
1819
|
+
stateDir: harvestStateDir,
|
|
1820
|
+
repos: harvestRepos,
|
|
1821
|
+
limitPerRepo: config.harvest.limitPerRepo,
|
|
1822
|
+
publish: config.harvest.publish,
|
|
1823
|
+
minterSafe: safeAddress,
|
|
1824
|
+
sources: config.harvest.sources,
|
|
1825
|
+
};
|
|
1826
|
+
const hasCommitWork = config.harvest.sources.includes('commits') && harvestRepos.length > 0;
|
|
1827
|
+
if (!hasCommitWork) {
|
|
1828
|
+
harvestLoopConfig = baseHarvestLoopConfig;
|
|
1829
|
+
console.log(`[main] harvest loop enabled: 0 repo(s), sources=${config.harvest.sources.join(',')}, interval=${config.harvest.intervalMs}ms (sessions parked)`);
|
|
1830
|
+
}
|
|
1831
|
+
else {
|
|
1832
|
+
const { readEnabledState, defaultSweRebenchV2EvaluatorImplStateDir } = await import('./harnesses/impls/swe-rebench-v2-evaluator/harness.js');
|
|
1833
|
+
const { existsSync } = await import('node:fs');
|
|
1834
|
+
const enabled = readEnabledState(defaultSweRebenchV2EvaluatorImplStateDir());
|
|
1835
|
+
if (!enabled || !existsSync(enabled.upstreamRepoDir)) {
|
|
1836
|
+
console.warn('[main] harvest enabled but swe-rebench-v2 evaluator is not set up — run `jinn harnesses enable swe-rebench-v2-evaluator`');
|
|
1837
|
+
}
|
|
1838
|
+
else {
|
|
1839
|
+
const { getSweRebenchV2ValidatedPoolStore } = await import('./solver-types/swe-rebench-v2.js');
|
|
1840
|
+
const { getDefaultMintedPoolStore } = await import('./solver-types/_swe-rebench-v2-minted-pool.js');
|
|
1841
|
+
const { HttpHfFetcher } = await import('./harnesses/impls/swe-rebench-v2-evaluator/hf-fetcher.js');
|
|
1842
|
+
const { PythonEvalRunner } = await import('./harnesses/impls/swe-rebench-v2-evaluator/eval-runner.js');
|
|
1843
|
+
const { createGitHubPublicRepoChecker } = await import('./solver-types/_swe-rebench-v2-guards.js');
|
|
1844
|
+
harvestLoopConfig = {
|
|
1845
|
+
...baseHarvestLoopConfig,
|
|
1846
|
+
mintDeps: {
|
|
1847
|
+
stateDir: harvestStateDir,
|
|
1848
|
+
ipfsRegistryUrl: config.ipfsRegistryUrl,
|
|
1849
|
+
ipfsGatewayUrl: config.ipfsGatewayUrl,
|
|
1850
|
+
validatedStore: getSweRebenchV2ValidatedPoolStore(harvestStateDir),
|
|
1851
|
+
mintedStore: getDefaultMintedPoolStore(harvestStateDir),
|
|
1852
|
+
hfFetcher: new HttpHfFetcher(),
|
|
1853
|
+
runner: new PythonEvalRunner({ upstreamRepoDir: enabled.upstreamRepoDir }),
|
|
1854
|
+
upstreamRepoDir: enabled.upstreamRepoDir,
|
|
1855
|
+
publicRepoChecker: createGitHubPublicRepoChecker({
|
|
1856
|
+
token: process.env.GITHUB_TOKEN,
|
|
1857
|
+
}),
|
|
1858
|
+
},
|
|
1859
|
+
};
|
|
1860
|
+
console.log(`[main] harvest loop enabled: ${harvestRepos.length} repo(s), sources=${config.harvest.sources.join(',')}, interval=${config.harvest.intervalMs}ms`);
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
2160
1865
|
const daemon = new Daemon({
|
|
2161
1866
|
adapter,
|
|
2162
1867
|
runner,
|
|
@@ -2178,12 +1883,6 @@ export async function main() {
|
|
|
2178
1883
|
status: {
|
|
2179
1884
|
earningDir: config.earningDir,
|
|
2180
1885
|
rpcUrl: config.rpcUrl,
|
|
2181
|
-
// tJINN identity comes from the bundled JINN MVI L1 artifact
|
|
2182
|
-
// (`JINN_MVI_CONFIG`) — one source of truth. The Sepolia RPC endpoint
|
|
2183
|
-
// is read from `config.ethereumRpcUrl` via the threaded `config`.
|
|
2184
|
-
tjinnTokenAddress: JINN_MVI_CONFIG.jinn,
|
|
2185
|
-
tjinnChainId: JINN_MVI_CONFIG.l1ChainId,
|
|
2186
|
-
tjinnDistributorAddress: JINN_MVI_CONFIG.distributor,
|
|
2187
1886
|
// stOLAS L2 distributor — mirrors `CHAIN_CONFIG.distributorAddress`
|
|
2188
1887
|
// used to gate the EvictionLoop (issue #651). Threaded through so the
|
|
2189
1888
|
// SPA's autoRestake predicate keys off the same on-chain artifact as
|
|
@@ -2200,6 +1899,13 @@ export async function main() {
|
|
|
2200
1899
|
engine: config.engine,
|
|
2201
1900
|
config,
|
|
2202
1901
|
configPath: CONFIG_PATH ?? DEFAULT_CONFIG_PATH,
|
|
1902
|
+
passwordRotation: {
|
|
1903
|
+
source: passwordResolution.source,
|
|
1904
|
+
filePath: passwordResolution.filePath,
|
|
1905
|
+
},
|
|
1906
|
+
// #641: back-fills /v1/status.latestVersion from the start-time
|
|
1907
|
+
// npm-registry check (populated after the daemon-running line below).
|
|
1908
|
+
latestVersion: () => latestVersionHolder.current,
|
|
2203
1909
|
spendCaps: spendCap?.caps,
|
|
2204
1910
|
aiUnits,
|
|
2205
1911
|
},
|
|
@@ -2213,7 +1919,6 @@ export async function main() {
|
|
|
2213
1919
|
distributorAddress: CHAIN_CONFIG.distributorAddress,
|
|
2214
1920
|
}
|
|
2215
1921
|
: undefined,
|
|
2216
|
-
jinnClaim: jinnClaimLoopConfig,
|
|
2217
1922
|
restorationEngine: {
|
|
2218
1923
|
paths: {
|
|
2219
1924
|
workingDirRoot: config.engine.workingDirRoot,
|
|
@@ -2224,15 +1929,25 @@ export async function main() {
|
|
|
2224
1929
|
deliveryDeps,
|
|
2225
1930
|
implRegistry,
|
|
2226
1931
|
solverNetRegistry,
|
|
1932
|
+
// #1827: resolves envelope.task.createdAt at claim() time. getBlock
|
|
1933
|
+
// errors propagate deliberately — engine.ts retries a bounded number of
|
|
1934
|
+
// times and keeps/fails the task before signing rather than emitting a
|
|
1935
|
+
// provenance tuple without its authoritative creation timestamp.
|
|
1936
|
+
blockTimestamp: {
|
|
1937
|
+
getBlockTimestamp: async (blockNumber) => {
|
|
1938
|
+
const block = await publicClient.getBlock({ blockNumber: BigInt(blockNumber) });
|
|
1939
|
+
return Number(block.timestamp);
|
|
1940
|
+
},
|
|
1941
|
+
configuredRpcUrls: config.rpcUrls,
|
|
1942
|
+
},
|
|
2227
1943
|
// Spec §14, Task 28: per-launch claim eligibility filter. Operators
|
|
2228
1944
|
// populate `joinedSolverNets[<manifestCid>]` via the SPA's join flow;
|
|
2229
1945
|
// the engine refuses tasks whose `manifestDigest = keccak256(cid)`
|
|
2230
1946
|
// doesn't match a joined entry (plus a role gate). Absent when the
|
|
2231
1947
|
// operator hasn't joined any nets yet — the engine then falls back to
|
|
2232
1948
|
// the legacy solverType-keyed gate.
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
: {}),
|
|
1949
|
+
// #1037: always wire the (mutable) view so a hot-applied join is live.
|
|
1950
|
+
joinedSolverNets: joinedSolverNetsView,
|
|
2236
1951
|
// Spec §14: task validation resolves manifest → contract → schemas.
|
|
2237
1952
|
// Threaded only when the SolverNet registry client was constructed
|
|
2238
1953
|
// (testnet branch above). The engine treats absence as "schema
|
|
@@ -2243,7 +1958,14 @@ export async function main() {
|
|
|
2243
1958
|
identityPublisher,
|
|
2244
1959
|
reputationFeedback,
|
|
2245
1960
|
operatorConfig,
|
|
1961
|
+
operatorSafeAddress: safeAddress,
|
|
2246
1962
|
harnessMode: config.harness.mode,
|
|
1963
|
+
// #1393: corpus knowledge autoload — operator opt-out flag. The corpus
|
|
1964
|
+
// instance itself is injected by the Daemon (built from corpusFactory).
|
|
1965
|
+
knowledge: { enabled: config.engine.knowledgeAutoload },
|
|
1966
|
+
// Share the one maintained scrub pipeline (incl. optional ML PII) so task
|
|
1967
|
+
// trajectories and captures are scrubbed by the same stack before publish.
|
|
1968
|
+
scrubPipeline: sellerScrubPipeline,
|
|
2247
1969
|
},
|
|
2248
1970
|
balanceTopup: config.balanceTopupIntervalMs > 0
|
|
2249
1971
|
? {
|
|
@@ -2295,7 +2017,7 @@ export async function main() {
|
|
|
2295
2017
|
store: earningStore,
|
|
2296
2018
|
chain: NETWORK_CHAIN,
|
|
2297
2019
|
writeCheckpoint: async ({ stakingProxy }) => {
|
|
2298
|
-
const txHash = await masterWallet.writeContract({
|
|
2020
|
+
const txHash = await withEoaBroadcastLock(masterAccount.address, () => masterWallet.writeContract({
|
|
2299
2021
|
address: stakingProxy,
|
|
2300
2022
|
abi: [
|
|
2301
2023
|
{
|
|
@@ -2309,12 +2031,33 @@ export async function main() {
|
|
|
2309
2031
|
functionName: 'checkpoint',
|
|
2310
2032
|
account: masterAccount,
|
|
2311
2033
|
chain: null,
|
|
2312
|
-
});
|
|
2034
|
+
}));
|
|
2313
2035
|
return { txHash };
|
|
2314
2036
|
},
|
|
2315
2037
|
}
|
|
2316
2038
|
: undefined,
|
|
2039
|
+
harvest: harvestLoopConfig,
|
|
2040
|
+
// #1043 loop watchdog. Always constructed in production so a stale loop is
|
|
2041
|
+
// detected + surfaced; the process-exit recovery is flag-gated (default
|
|
2042
|
+
// OFF) by config.watchdogAutoRestart.
|
|
2043
|
+
watchdog: { autoRestart: config.watchdogAutoRestart },
|
|
2317
2044
|
});
|
|
2045
|
+
// #1037: populate the join applier now that all four join-consuming
|
|
2046
|
+
// subsystems exist — the live task-discovery descriptor (`taskDiscovery`),
|
|
2047
|
+
// the mutable engine view (`joinedSolverNetsView`), the readiness registry,
|
|
2048
|
+
// and the SolverNet registry. The join endpoint registered eagerly at
|
|
2049
|
+
// server-start; before this point it returns restartRequired:true.
|
|
2050
|
+
joinApplierHolder.current = createJoinApplier({
|
|
2051
|
+
taskDiscovery,
|
|
2052
|
+
view: joinedSolverNetsView,
|
|
2053
|
+
readiness: harnessReadinessRegistry,
|
|
2054
|
+
registry: solverNetRegistry,
|
|
2055
|
+
config,
|
|
2056
|
+
enableEvaluator: () => adapter.setEvaluatorEnabled(true),
|
|
2057
|
+
});
|
|
2058
|
+
if (config.watchdogAutoRestart) {
|
|
2059
|
+
console.log('[watchdog] auto-restart ENABLED (stale loop → non-zero exit)');
|
|
2060
|
+
}
|
|
2318
2061
|
// Write pidfile so `jinn stop` can find us. First, refuse the run if another
|
|
2319
2062
|
// daemon already owns this earning directory — see issue #649. The gate
|
|
2320
2063
|
// handles all three branches (refuse-and-exit, unlink-stale-and-continue,
|
|
@@ -2330,13 +2073,11 @@ export async function main() {
|
|
|
2330
2073
|
await applyDeploymentReadinessGate({
|
|
2331
2074
|
stateDir: config.stateDir,
|
|
2332
2075
|
earningDir: config.earningDir,
|
|
2333
|
-
relayerUrl: undefined,
|
|
2334
2076
|
runtimeMode: config.runtimeMode,
|
|
2335
2077
|
}, {
|
|
2336
2078
|
env: process.env,
|
|
2337
2079
|
getuid: typeof process.getuid === 'function' ? process.getuid.bind(process) : undefined,
|
|
2338
2080
|
detectAuthContext,
|
|
2339
|
-
fetch,
|
|
2340
2081
|
});
|
|
2341
2082
|
const pidPath = join(config.earningDir, 'daemon.pid');
|
|
2342
2083
|
applyPidfileLivenessGate(pidPath);
|
|
@@ -2354,6 +2095,8 @@ export async function main() {
|
|
|
2354
2095
|
// flow (they were created in setup-mode before bootstrap), so we close
|
|
2355
2096
|
// them explicitly after Daemon.stop() completes.
|
|
2356
2097
|
let shutdownPromise = null;
|
|
2098
|
+
// #641: recurring npm-registry version check; cleared on shutdown.
|
|
2099
|
+
let versionCheckTimer = null;
|
|
2357
2100
|
const shutdown = async (signal) => {
|
|
2358
2101
|
if (shutdownPromise)
|
|
2359
2102
|
return shutdownPromise;
|
|
@@ -2361,6 +2104,8 @@ export async function main() {
|
|
|
2361
2104
|
let exitCode = 0;
|
|
2362
2105
|
console.log(`\n[main] Received ${signal}, shutting down...`);
|
|
2363
2106
|
try {
|
|
2107
|
+
if (versionCheckTimer)
|
|
2108
|
+
clearInterval(versionCheckTimer);
|
|
2364
2109
|
harnessReadinessRegistry.stop();
|
|
2365
2110
|
await daemon.stop();
|
|
2366
2111
|
await setupApiServer.close().catch(() => undefined);
|
|
@@ -2415,6 +2160,38 @@ export async function main() {
|
|
|
2415
2160
|
throw error;
|
|
2416
2161
|
}
|
|
2417
2162
|
console.log(`[main] Daemon running. Dashboard: http://127.0.0.1:${config.apiPort}`);
|
|
2163
|
+
// #641: start-time (and recurring) npm-registry version check. Fire-and-forget
|
|
2164
|
+
// — never awaited, never rejects into boot. When a newer client is published
|
|
2165
|
+
// it logs one line and back-fills the dashboard's update_available banner via
|
|
2166
|
+
// `latestVersionHolder`. Opt out with JINN_VERSION_CHECK=0.
|
|
2167
|
+
if (isVersionCheckEnabled(process.env)) {
|
|
2168
|
+
const refreshVersionCheck = async () => {
|
|
2169
|
+
try {
|
|
2170
|
+
const latest = await fetchLatestVersion();
|
|
2171
|
+
if (latest && isNewerVersion(getRunningVersion(), latest)) {
|
|
2172
|
+
// Only surface a value when the published latest is genuinely newer
|
|
2173
|
+
// than the running build. The dashboard banner derives directly from
|
|
2174
|
+
// a non-null `latestVersion`, so this keeps the log and the banner on
|
|
2175
|
+
// the same semver strictly-greater check.
|
|
2176
|
+
latestVersionHolder.current = latest;
|
|
2177
|
+
console.log(formatUpdateLogLine(latest));
|
|
2178
|
+
}
|
|
2179
|
+
else {
|
|
2180
|
+
// Not newer (equal, older, or unfetchable) — clear any prior value so
|
|
2181
|
+
// a stale tick can't linger as a false upgrade signal.
|
|
2182
|
+
latestVersionHolder.current = null;
|
|
2183
|
+
}
|
|
2184
|
+
}
|
|
2185
|
+
catch {
|
|
2186
|
+
// Advisory only — a registry hiccup must never disturb the daemon.
|
|
2187
|
+
}
|
|
2188
|
+
};
|
|
2189
|
+
void refreshVersionCheck();
|
|
2190
|
+
versionCheckTimer = setInterval(() => {
|
|
2191
|
+
void refreshVersionCheck();
|
|
2192
|
+
}, VERSION_CHECK_INTERVAL_MS);
|
|
2193
|
+
versionCheckTimer.unref();
|
|
2194
|
+
}
|
|
2418
2195
|
return {
|
|
2419
2196
|
schemaVersion: 1,
|
|
2420
2197
|
generatedAt: new Date().toISOString(),
|