@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
|
@@ -6,20 +6,23 @@
|
|
|
6
6
|
* Operator setup is automated via {@link SweRebenchV2EvaluatorHarness.onEnable}:
|
|
7
7
|
* `jinn harnesses enable swe-rebench-v2-evaluator`
|
|
8
8
|
* - Validates Docker + Python availability.
|
|
9
|
-
* -
|
|
10
|
-
*
|
|
11
|
-
* - Writes a
|
|
9
|
+
* - Pins the upstream `SWE-rebench/SWE-rebench-V2` checkout at a reviewed commit.
|
|
10
|
+
* - Applies the versioned Jinn report/parser bundle and runs its Python self-test.
|
|
11
|
+
* - Writes a state marker binding commit, bundle digest, and trusted parser metadata.
|
|
12
12
|
*
|
|
13
13
|
* `isReady()` reports `ready: false` (with a `nextStep` pointing at the
|
|
14
|
-
* enable command) until
|
|
14
|
+
* enable command) until a current durable marker is written.
|
|
15
15
|
*
|
|
16
16
|
* Spec: docs/superpowers/specs/2026-05-06-agent-harness-solvernet-design.md §3.4
|
|
17
17
|
*/
|
|
18
18
|
import { existsSync, readFileSync } from 'node:fs';
|
|
19
19
|
import { mkdir, writeFile } from 'node:fs/promises';
|
|
20
|
-
import { spawn } from 'node:child_process';
|
|
20
|
+
import { spawn, spawnSync } from 'node:child_process';
|
|
21
|
+
import { createHash } from 'node:crypto';
|
|
21
22
|
import { homedir } from 'node:os';
|
|
22
|
-
import { join } from 'node:path';
|
|
23
|
+
import { dirname, join, resolve } from 'node:path';
|
|
24
|
+
import { performance } from 'node:perf_hooks';
|
|
25
|
+
import { fileURLToPath } from 'node:url';
|
|
23
26
|
import { SweRebenchV2TaskSchema, SweRebenchV2SolutionPayloadSchema, } from '../../../vendor/@jinn-network/sdk/dist/solvernets/swe-rebench-v2.js';
|
|
24
27
|
import { REQUIRES_LIVE_DAEMON_READINESS, SkippableError } from '../../types.js';
|
|
25
28
|
import { SignedEnvelopeSchema, normalizeEnvelopeRole } from '../../../types/envelope.js';
|
|
@@ -27,15 +30,138 @@ import { fetchFromIpfs, uploadToIpfs } from '../../../adapters/mech/ipfs.js';
|
|
|
27
30
|
import { SweRebenchV2Evaluator } from './index.js';
|
|
28
31
|
import { PythonEvalRunner, EvalCouldNotGradeError, } from './eval-runner.js';
|
|
29
32
|
import { HttpHfFetcher } from './hf-fetcher.js';
|
|
33
|
+
import { RoutingTaskRowFetcher, parseMintedPoolArtifact } from './routing-task-row-fetcher.js';
|
|
30
34
|
import { ValidatedPoolStore, EVAL_SEMANTICS_VERSION, hashVettedPoolArtifact, loadVettedPoolArtifactScorableEntries, parseVettedPoolArtifact, vettedPoolArtifactRefFromEligibility, } from '../../../solver-types/_swe-rebench-v2-validated-pool.js';
|
|
31
|
-
import { computeRowHash, resolveImageDigest, } from '../../../solver-types/_swe-rebench-v2-substrate.js';
|
|
35
|
+
import { computeRowHash, pullDigestQualifiedImage, resolveImageDigest, resolveImagePlatform, } from '../../../solver-types/_swe-rebench-v2-substrate.js';
|
|
36
|
+
import { computeMintedPoolRowV2Hash, isMintedPoolRowV2, parseMintedIpfsDataset, } from '../../../solver-types/_swe-rebench-v2-minted-pool.js';
|
|
37
|
+
import { hashTaskEnvironmentSpecV1, parseTaskEnvironmentSpecV1, verifyEnvironmentAttestationV1, } from '../../../task-creator/environment/contracts.js';
|
|
38
|
+
import { canonicalJson } from '../../engine/canonical-json.js';
|
|
39
|
+
import { hashDifferentialAdmissionReceiptV2, targetRecipeCommandForTestPath, verifyDifferentialAdmissionReceiptV2, } from '../../../solver-types/_swe-rebench-v2-differential-admission.js';
|
|
32
40
|
import { defaultStateDir as defaultSolverTypeStateDir, loadSweRebenchV2Pool, } from '../../../solver-types/swe-rebench-v2.js';
|
|
33
41
|
import { PoolCacheStore, loadPoolWithCacheFallback, } from '../../../solver-types/_swe-rebench-v2-pool-cache.js';
|
|
34
42
|
const DEFAULT_IPFS_REGISTRY_URL = 'https://registry.autonolas.tech';
|
|
35
43
|
const DEFAULT_IPFS_GATEWAY_URL = 'https://gateway.autonolas.tech';
|
|
36
44
|
const UPSTREAM_REPO_URL = 'https://github.com/SWE-rebench/SWE-rebench-V2.git';
|
|
45
|
+
const UPSTREAM_COMMIT = 'c71902a8cf8d2b725f63d51f199f4d3e56f68d2d';
|
|
46
|
+
const PATCH_BUNDLE_ID = 'jinn.swe-rebench-v2.patch-bundle.v1';
|
|
47
|
+
const PATCH_BUNDLE_VERSION = 'v1';
|
|
48
|
+
const PATCH_BUNDLE_FILE = 'swe-rebench-v2-evaluator.bundle.v1.patch';
|
|
49
|
+
const VITEST_JSON_PARSER = { id: 'vitest-json.v1', version: 'v1' };
|
|
37
50
|
const STATE_FILE = 'state.json';
|
|
38
51
|
const ENABLE_CLI = 'jinn harnesses enable swe-rebench-v2-evaluator';
|
|
52
|
+
const DEFAULT_EVAL_COMPUTE_USD_PER_HOUR = 0.2;
|
|
53
|
+
/**
|
|
54
|
+
* Resolve the compute rate (USD/hour) used to meter `evaluator_cost_usd`
|
|
55
|
+
* from wall-clock grade() time (#1828). Env-only: unset → default 0.20;
|
|
56
|
+
* explicit invalid or ≤0 value → 0 with a warning — a misconfigured rate
|
|
57
|
+
* must never throw or block an eval.
|
|
58
|
+
*/
|
|
59
|
+
function resolveComputeUsdPerHour() {
|
|
60
|
+
const envRaw = process.env['JINN_EVAL_COMPUTE_USD_PER_HOUR'];
|
|
61
|
+
if (envRaw === undefined)
|
|
62
|
+
return DEFAULT_EVAL_COMPUTE_USD_PER_HOUR;
|
|
63
|
+
const parsed = Number(envRaw);
|
|
64
|
+
if (Number.isFinite(parsed) && parsed > 0)
|
|
65
|
+
return parsed;
|
|
66
|
+
console.warn('[swe-rebench-v2] JINN_EVAL_COMPUTE_USD_PER_HOUR is not a positive number — ' +
|
|
67
|
+
'recording evaluator_cost_usd=0');
|
|
68
|
+
return 0;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* The source tree keeps the bundle in `client/scripts`; the published package
|
|
72
|
+
* copies it to `dist/scripts`. Resolve both layouts so `tsx` development runs
|
|
73
|
+
* and the built CLI apply the identical, versioned patch bytes.
|
|
74
|
+
*/
|
|
75
|
+
function patchBundlePath() {
|
|
76
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
77
|
+
const candidates = [
|
|
78
|
+
resolve(here, '../../../../scripts', PATCH_BUNDLE_FILE),
|
|
79
|
+
resolve(here, '../../../scripts', PATCH_BUNDLE_FILE),
|
|
80
|
+
];
|
|
81
|
+
const path = candidates.find(existsSync);
|
|
82
|
+
if (!path) {
|
|
83
|
+
throw new Error(`missing ${PATCH_BUNDLE_FILE}; reinstall @jinn-network/client`);
|
|
84
|
+
}
|
|
85
|
+
return path;
|
|
86
|
+
}
|
|
87
|
+
function patchBundleMetadata(bundlePath) {
|
|
88
|
+
const digest = createHash('sha256').update(readFileSync(bundlePath)).digest('hex');
|
|
89
|
+
return {
|
|
90
|
+
id: PATCH_BUNDLE_ID,
|
|
91
|
+
version: PATCH_BUNDLE_VERSION,
|
|
92
|
+
sha256: `sha256:${digest}`,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function hasCurrentEnableContract(state) {
|
|
96
|
+
if (!state || state.schemaVersion !== 'swe-rebench-v2-evaluator-state.v2')
|
|
97
|
+
return false;
|
|
98
|
+
if (state.upstream?.repoUrl !== UPSTREAM_REPO_URL || state.upstream?.commit !== UPSTREAM_COMMIT)
|
|
99
|
+
return false;
|
|
100
|
+
if (state.patchBundle?.id !== PATCH_BUNDLE_ID || state.patchBundle.version !== PATCH_BUNDLE_VERSION)
|
|
101
|
+
return false;
|
|
102
|
+
return state.trustedParsers.some((parser) => parser.id === VITEST_JSON_PARSER.id &&
|
|
103
|
+
parser.version === VITEST_JSON_PARSER.version &&
|
|
104
|
+
parser.bundleId === state.patchBundle.id &&
|
|
105
|
+
parser.bundleSha256 === state.patchBundle.sha256);
|
|
106
|
+
}
|
|
107
|
+
function isCurrentEnabledState(state, bundle, upstreamRepoDir) {
|
|
108
|
+
if (!hasCurrentEnableContract(state))
|
|
109
|
+
return false;
|
|
110
|
+
if (state.upstreamRepoDir !== upstreamRepoDir)
|
|
111
|
+
return false;
|
|
112
|
+
if (state.patchBundle.id !== bundle.id ||
|
|
113
|
+
state.patchBundle.version !== bundle.version ||
|
|
114
|
+
state.patchBundle.sha256 !== bundle.sha256)
|
|
115
|
+
return false;
|
|
116
|
+
return state.trustedParsers.some((parser) => parser.bundleId === bundle.id &&
|
|
117
|
+
parser.bundleSha256 === bundle.sha256);
|
|
118
|
+
}
|
|
119
|
+
function sameParser(a, b) {
|
|
120
|
+
return a.id === b.id && a.version === b.version && a.digest === b.digest && a.bundleId === b.bundleId;
|
|
121
|
+
}
|
|
122
|
+
function sameAttestation(a, b) {
|
|
123
|
+
return a.scheme === b.scheme &&
|
|
124
|
+
a.algo === b.algo &&
|
|
125
|
+
a.environmentHash === b.environmentHash &&
|
|
126
|
+
a.operatorSafe.toLowerCase() === b.operatorSafe.toLowerCase() &&
|
|
127
|
+
a.signer.toLowerCase() === b.signer.toLowerCase() &&
|
|
128
|
+
a.signature.toLowerCase() === b.signature.toLowerCase();
|
|
129
|
+
}
|
|
130
|
+
function sameV2AdmissionBinding(a, b) {
|
|
131
|
+
return a.environmentSpecCid === b.environmentSpecCid &&
|
|
132
|
+
a.environmentHash === b.environmentHash &&
|
|
133
|
+
sameParser(a.parser, b.parser) &&
|
|
134
|
+
a.image.reference === b.image.reference &&
|
|
135
|
+
a.image.digest === b.image.digest &&
|
|
136
|
+
a.platform === b.platform;
|
|
137
|
+
}
|
|
138
|
+
function sameDifferentialAdmissionBinding(a, b) {
|
|
139
|
+
return a.admissionPolicyVersion === b.admissionPolicyVersion &&
|
|
140
|
+
a.receiptCid === b.receiptCid &&
|
|
141
|
+
a.receiptHash === b.receiptHash;
|
|
142
|
+
}
|
|
143
|
+
function canonicalCommandHash(command) {
|
|
144
|
+
return `sha256:${createHash('sha256').update(canonicalJson(command)).digest('hex')}`;
|
|
145
|
+
}
|
|
146
|
+
function sha256(value) {
|
|
147
|
+
return `sha256:${createHash('sha256').update(value).digest('hex')}`;
|
|
148
|
+
}
|
|
149
|
+
function sameStringArray(left, right) {
|
|
150
|
+
return left.length === right.length && left.every((value, index) => value === right[index]);
|
|
151
|
+
}
|
|
152
|
+
/** Runs without Docker: it proves the patched final report exposes actual
|
|
153
|
+
* empirical sets and that the checked-in Vitest JSON parser is registered. */
|
|
154
|
+
const EMPIRICAL_SELF_TEST = [
|
|
155
|
+
'import json',
|
|
156
|
+
'from scripts.eval import build_report_item',
|
|
157
|
+
'from lib.agent.log_parsers import NAME_TO_PARSER, TestStatus',
|
|
158
|
+
"item = build_report_item({'instance_id': 'jinn-enable-self-test', 'FAIL_TO_PASS': [], 'PASS_TO_PASS': []}, {'result': {'passed_actual': ['passes'], 'failed_actual': ['fails'], 'passed_match': False, 'exit_code': 1, 'log_path': 'log'}})",
|
|
159
|
+
"assert item['passed_actual'] == ['passes']",
|
|
160
|
+
"assert item['failed_actual'] == ['fails']",
|
|
161
|
+
"parser = NAME_TO_PARSER['vitest-json.v1']",
|
|
162
|
+
"parsed = parser(json.dumps({'testResults': [{'assertionResults': [{'fullName': 'suite passes', 'status': 'passed'}, {'ancestorTitles': ['suite'], 'title': 'fails', 'status': 'failed'}]}]}))",
|
|
163
|
+
"assert parsed == {'suite passes': TestStatus.PASSED.value, 'suite fails': TestStatus.FAILED.value}",
|
|
164
|
+
].join('\n');
|
|
39
165
|
export class SweRebenchV2EvaluatorHarness {
|
|
40
166
|
name = 'swe-rebench-v2-evaluator';
|
|
41
167
|
version = '1.0.0';
|
|
@@ -89,7 +215,11 @@ export class SweRebenchV2EvaluatorHarness {
|
|
|
89
215
|
if (this.deps.fetcher)
|
|
90
216
|
return this.deps.fetcher;
|
|
91
217
|
if (!this.cachedFetcher) {
|
|
92
|
-
this.
|
|
218
|
+
const fetchArtifact = this.deps.fetchFromIpfs ?? fetchFromIpfs;
|
|
219
|
+
this.cachedFetcher = new RoutingTaskRowFetcher({
|
|
220
|
+
hf: new HttpHfFetcher(),
|
|
221
|
+
fetchMintedArtifact: async (cid) => parseMintedPoolArtifact(await fetchArtifact(this.ipfsGatewayUrl, cid)),
|
|
222
|
+
});
|
|
93
223
|
}
|
|
94
224
|
return this.cachedFetcher;
|
|
95
225
|
}
|
|
@@ -189,6 +319,7 @@ export class SweRebenchV2EvaluatorHarness {
|
|
|
189
319
|
};
|
|
190
320
|
}
|
|
191
321
|
const state = readEnabledState(this.implStateDir);
|
|
322
|
+
const upstreamRepoDir = join(this.implStateDir, 'upstream');
|
|
192
323
|
if (!state) {
|
|
193
324
|
return {
|
|
194
325
|
ready: false,
|
|
@@ -199,16 +330,54 @@ export class SweRebenchV2EvaluatorHarness {
|
|
|
199
330
|
},
|
|
200
331
|
};
|
|
201
332
|
}
|
|
202
|
-
if (
|
|
333
|
+
if (state.upstreamRepoDir !== upstreamRepoDir) {
|
|
203
334
|
return {
|
|
204
335
|
ready: false,
|
|
205
|
-
reason:
|
|
336
|
+
reason: 'swe-rebench-v2 evaluator enable state requires durable bundle repair',
|
|
337
|
+
nextStep: {
|
|
338
|
+
description: `Re-run \`${ENABLE_CLI}\` to restore the managed upstream evaluator checkout.`,
|
|
339
|
+
cli: ENABLE_CLI,
|
|
340
|
+
},
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
if (!existsSync(upstreamRepoDir)) {
|
|
344
|
+
return {
|
|
345
|
+
ready: false,
|
|
346
|
+
reason: `upstream repo missing at ${upstreamRepoDir}`,
|
|
206
347
|
nextStep: {
|
|
207
348
|
description: `Re-run \`${ENABLE_CLI}\` to re-clone the upstream eval harness.`,
|
|
208
349
|
cli: ENABLE_CLI,
|
|
209
350
|
},
|
|
210
351
|
};
|
|
211
352
|
}
|
|
353
|
+
// v1 markers are intentionally readable so callers can locate their old
|
|
354
|
+
// checkout, but they do not prove that the required patch bundle and
|
|
355
|
+
// parser are present. Re-enable repairs them before this evaluator may
|
|
356
|
+
// claim more work.
|
|
357
|
+
let bundle;
|
|
358
|
+
try {
|
|
359
|
+
bundle = patchBundleMetadata(patchBundlePath());
|
|
360
|
+
}
|
|
361
|
+
catch (err) {
|
|
362
|
+
return {
|
|
363
|
+
ready: false,
|
|
364
|
+
reason: `cannot load durable evaluator patch bundle: ${err instanceof Error ? err.message : String(err)}`,
|
|
365
|
+
nextStep: {
|
|
366
|
+
description: `Reinstall @jinn-network/client, then re-run \`${ENABLE_CLI}\`.`,
|
|
367
|
+
cli: ENABLE_CLI,
|
|
368
|
+
},
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
if (!isCurrentEnabledState(state, bundle, upstreamRepoDir)) {
|
|
372
|
+
return {
|
|
373
|
+
ready: false,
|
|
374
|
+
reason: 'swe-rebench-v2 evaluator enable state requires durable bundle repair',
|
|
375
|
+
nextStep: {
|
|
376
|
+
description: `Re-run \`${ENABLE_CLI}\` to pin and self-test the upstream evaluator bundle.`,
|
|
377
|
+
cli: ENABLE_CLI,
|
|
378
|
+
},
|
|
379
|
+
};
|
|
380
|
+
}
|
|
212
381
|
// Live Docker probe (TTL-cached): the eval shells out to per-instance
|
|
213
382
|
// `docker run` images. Docker is validated at `jinn harnesses enable` time,
|
|
214
383
|
// but it can stop afterwards — re-check periodically so the daemon does
|
|
@@ -231,7 +400,7 @@ export class SweRebenchV2EvaluatorHarness {
|
|
|
231
400
|
return {
|
|
232
401
|
description: 'swe-rebench-v2.v1 — code-issue benchmark from the SWE-rebench/SWE-rebench-V2 dataset. ' +
|
|
233
402
|
'Requires Docker (per-instance images) and Python 3 (upstream eval.py harness). ' +
|
|
234
|
-
'Enable
|
|
403
|
+
'Enable pins and self-tests https://github.com/SWE-rebench/SWE-rebench-V2 in the impl state directory.',
|
|
235
404
|
externalResources: [
|
|
236
405
|
{ name: 'SWE-rebench-V2 (upstream)', url: 'https://github.com/SWE-rebench/SWE-rebench-V2' },
|
|
237
406
|
{ name: 'Docker install', url: 'https://docs.docker.com/get-docker/' },
|
|
@@ -245,12 +414,18 @@ export class SweRebenchV2EvaluatorHarness {
|
|
|
245
414
|
message: 'implStateDir is not configured. Set JINN_ENGINE_IMPL_STATE_DIR_ROOT (or engine.implStateDirRoot in config) and restart the daemon, then re-run.',
|
|
246
415
|
};
|
|
247
416
|
}
|
|
248
|
-
const upstreamRepoDir = join(this.implStateDir, 'upstream');
|
|
249
|
-
// Idempotent: if already enabled and the repo is present, we're done.
|
|
250
417
|
const existing = readEnabledState(this.implStateDir);
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
418
|
+
// Never trust the marker to select a checkout: a stale or corrupt marker
|
|
419
|
+
// must be repairable without allowing `checkout --force` / `reset --hard`
|
|
420
|
+
// to run in another repository.
|
|
421
|
+
//
|
|
422
|
+
// WP1 (#1646): operators who enabled before a given upstream patch shipped
|
|
423
|
+
// must still receive it. next's enable path already re-runs the self-test
|
|
424
|
+
// and `applyUpstreamPatches` unconditionally on every enable (the guarded
|
|
425
|
+
// block below only skips the clone/checkout when the marker is already
|
|
426
|
+
// current), so the patches are re-applied idempotently without a separate
|
|
427
|
+
// already-enabled fast-path early-return.
|
|
428
|
+
const upstreamRepoDir = join(this.implStateDir, 'upstream');
|
|
254
429
|
const run = this.deps.runCommand ?? runCommand;
|
|
255
430
|
// Validate Docker (daemon reachable) before doing any disk work.
|
|
256
431
|
const dockerCheck = await run('docker', ['info']);
|
|
@@ -281,33 +456,111 @@ export class SweRebenchV2EvaluatorHarness {
|
|
|
281
456
|
},
|
|
282
457
|
};
|
|
283
458
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
459
|
+
let bundlePath;
|
|
460
|
+
let bundle;
|
|
461
|
+
try {
|
|
462
|
+
bundlePath = patchBundlePath();
|
|
463
|
+
bundle = patchBundleMetadata(bundlePath);
|
|
464
|
+
}
|
|
465
|
+
catch (err) {
|
|
466
|
+
return {
|
|
467
|
+
status: 'error',
|
|
468
|
+
message: `cannot load durable evaluator patch bundle: ${err instanceof Error ? err.message : String(err)}`,
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
// A v2 marker binds the exact commit, patch bytes, and parser registry.
|
|
472
|
+
// Any legacy or stale marker is repaired from a clean checkout. The
|
|
473
|
+
// upstream directory is managed evaluator state, so --force is deliberate:
|
|
474
|
+
// carrying a local manual patch forward would defeat the recorded binding.
|
|
475
|
+
if (!isCurrentEnabledState(existing, bundle, upstreamRepoDir) || !existsSync(upstreamRepoDir)) {
|
|
476
|
+
await mkdir(this.implStateDir, { recursive: true, mode: 0o755 });
|
|
477
|
+
if (!existsSync(upstreamRepoDir)) {
|
|
478
|
+
const clone = await run('git', [
|
|
479
|
+
'clone',
|
|
480
|
+
'--no-checkout',
|
|
481
|
+
UPSTREAM_REPO_URL,
|
|
482
|
+
upstreamRepoDir,
|
|
483
|
+
]);
|
|
484
|
+
if (clone.exitCode !== 0) {
|
|
485
|
+
return {
|
|
486
|
+
status: 'error',
|
|
487
|
+
message: `git clone failed (exit ${clone.exitCode}): ${clone.stderr.slice(-500)}`,
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
const fetch = await run('git', ['fetch', '--depth=1', 'origin', UPSTREAM_COMMIT], { cwd: upstreamRepoDir });
|
|
492
|
+
if (fetch.exitCode !== 0) {
|
|
493
|
+
return {
|
|
494
|
+
status: 'error',
|
|
495
|
+
message: `git fetch pinned upstream failed (exit ${fetch.exitCode}): ${fetch.stderr.slice(-500)}`,
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
const checkout = await run('git', ['checkout', '--detach', '--force', UPSTREAM_COMMIT], { cwd: upstreamRepoDir });
|
|
499
|
+
if (checkout.exitCode !== 0) {
|
|
500
|
+
return {
|
|
501
|
+
status: 'error',
|
|
502
|
+
message: `git checkout pinned upstream failed (exit ${checkout.exitCode}): ${checkout.stderr.slice(-500)}`,
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
const reset = await run('git', ['reset', '--hard', UPSTREAM_COMMIT], { cwd: upstreamRepoDir });
|
|
506
|
+
if (reset.exitCode !== 0) {
|
|
507
|
+
return {
|
|
508
|
+
status: 'error',
|
|
509
|
+
message: `git reset pinned upstream failed (exit ${reset.exitCode}): ${reset.stderr.slice(-500)}`,
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
const patchCheck = await run('git', ['apply', '--check', bundlePath], { cwd: upstreamRepoDir });
|
|
513
|
+
if (patchCheck.exitCode !== 0) {
|
|
294
514
|
return {
|
|
295
515
|
status: 'error',
|
|
296
|
-
message: `
|
|
516
|
+
message: `evaluator patch bundle is incompatible with ${UPSTREAM_COMMIT}: ${patchCheck.stderr.slice(-500)}`,
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
const apply = await run('git', ['apply', bundlePath], { cwd: upstreamRepoDir });
|
|
520
|
+
if (apply.exitCode !== 0) {
|
|
521
|
+
return {
|
|
522
|
+
status: 'error',
|
|
523
|
+
message: `evaluator patch bundle failed to apply: ${apply.stderr.slice(-500)}`,
|
|
297
524
|
};
|
|
298
525
|
}
|
|
299
526
|
}
|
|
527
|
+
// Never write the durable marker until both empirical actual-result fields
|
|
528
|
+
// and the trusted Vitest JSON parser work in the patched upstream tree.
|
|
529
|
+
const selfTest = await run('python3', ['-c', EMPIRICAL_SELF_TEST], { cwd: upstreamRepoDir });
|
|
530
|
+
if (selfTest.exitCode !== 0) {
|
|
531
|
+
return {
|
|
532
|
+
status: 'error',
|
|
533
|
+
message: `patched upstream empirical self-test failed (exit ${selfTest.exitCode}): ${selfTest.stderr.slice(-500)}`,
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
// Apply Jinn's upstream eval.py patches (idempotent — see applyUpstreamPatches).
|
|
537
|
+
try {
|
|
538
|
+
(this.deps.applyUpstreamPatches ?? applyUpstreamPatches)(upstreamRepoDir);
|
|
539
|
+
}
|
|
540
|
+
catch (err) {
|
|
541
|
+
return {
|
|
542
|
+
status: 'error',
|
|
543
|
+
message: err instanceof Error ? err.message : String(err),
|
|
544
|
+
};
|
|
545
|
+
}
|
|
300
546
|
// Persist marker.
|
|
301
547
|
const state = {
|
|
302
|
-
schemaVersion: 'swe-rebench-v2-evaluator-state.
|
|
548
|
+
schemaVersion: 'swe-rebench-v2-evaluator-state.v2',
|
|
303
549
|
enabled: true,
|
|
304
550
|
enabledAt: new Date().toISOString(),
|
|
305
551
|
upstreamRepoDir,
|
|
552
|
+
upstream: { repoUrl: UPSTREAM_REPO_URL, commit: UPSTREAM_COMMIT },
|
|
553
|
+
patchBundle: bundle,
|
|
554
|
+
trustedParsers: [{
|
|
555
|
+
...VITEST_JSON_PARSER,
|
|
556
|
+
bundleId: bundle.id,
|
|
557
|
+
bundleSha256: bundle.sha256,
|
|
558
|
+
}],
|
|
306
559
|
};
|
|
307
560
|
await writeFile(join(this.implStateDir, STATE_FILE), JSON.stringify(state, null, 2));
|
|
308
561
|
return {
|
|
309
562
|
status: 'ready',
|
|
310
|
-
details: { upstreamRepoDir },
|
|
563
|
+
details: { upstreamRepoDir, upstreamCommit: UPSTREAM_COMMIT, patchBundle: bundle.id },
|
|
311
564
|
};
|
|
312
565
|
}
|
|
313
566
|
/**
|
|
@@ -391,6 +644,219 @@ export class SweRebenchV2EvaluatorHarness {
|
|
|
391
644
|
}
|
|
392
645
|
return recheckRow;
|
|
393
646
|
}
|
|
647
|
+
/**
|
|
648
|
+
* Recheck an explicit-environment v2 minted row. Unlike v1 benchmark rows,
|
|
649
|
+
* every grading input is supplied by the immutable IPFS artifact and the
|
|
650
|
+
* signed TaskEnvironmentSpec. Any missing/changed observation is a skip —
|
|
651
|
+
* never a fallback to a local admission record or a binary verdict.
|
|
652
|
+
*/
|
|
653
|
+
async recheckMintedV2(task, runtimeTask, fetcher, enabledState) {
|
|
654
|
+
if (!parseMintedIpfsDataset(task.hf_dataset))
|
|
655
|
+
return null;
|
|
656
|
+
if (!(fetcher instanceof RoutingTaskRowFetcher)) {
|
|
657
|
+
throw new SkippableError('minted_pool_router_unavailable', `cannot resolve immutable minted artifact for ${task.instance_id}`);
|
|
658
|
+
}
|
|
659
|
+
let routed;
|
|
660
|
+
try {
|
|
661
|
+
routed = await fetcher.fetchMintedRow({
|
|
662
|
+
hf_dataset: task.hf_dataset,
|
|
663
|
+
instance_id: task.instance_id,
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
catch (err) {
|
|
667
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
668
|
+
throw new SkippableError(/publicRowHash/u.test(detail) ? 'minted_substrate_drift_public_row_hash' : 'minted_pool_artifact_invalid', `cannot load minted artifact for ${task.instance_id}: ${detail}`);
|
|
669
|
+
}
|
|
670
|
+
// v1 is deliberately routed through the historical admission path below.
|
|
671
|
+
if (!routed || routed.artifact.schemaVersion !== 'swe-rebench-v2-minted-pool.v2')
|
|
672
|
+
return null;
|
|
673
|
+
if (routed.artifact.evalSemanticsVersion !== EVAL_SEMANTICS_VERSION) {
|
|
674
|
+
throw new SkippableError('minted_pool_semantics_mismatch', `minted artifact semanticsVersion=${routed.artifact.evalSemanticsVersion} does not match evaluator semanticsVersion=${EVAL_SEMANTICS_VERSION}`);
|
|
675
|
+
}
|
|
676
|
+
if (!isMintedPoolRowV2(routed.row)) {
|
|
677
|
+
throw new SkippableError('minted_pool_artifact_invalid', `v2 artifact row lacks v2 bindings for ${task.instance_id}`);
|
|
678
|
+
}
|
|
679
|
+
const row = routed.row;
|
|
680
|
+
const binding = row.environment;
|
|
681
|
+
if (computeMintedPoolRowV2Hash(row) !== row.publicRowHash) {
|
|
682
|
+
throw new SkippableError('minted_substrate_drift_public_row_hash', `public row hash drift for ${task.instance_id}`);
|
|
683
|
+
}
|
|
684
|
+
if (row.instance_id !== task.instance_id ||
|
|
685
|
+
row.repo !== task.repo ||
|
|
686
|
+
row.base_commit !== task.base_commit ||
|
|
687
|
+
row.language !== task.language) {
|
|
688
|
+
throw new SkippableError('minted_substrate_task_binding_drift', `on-chain task fields do not match v2 minted row for ${task.instance_id}`);
|
|
689
|
+
}
|
|
690
|
+
if (row.image_name !== binding.image.reference || row.install_config.log_parser !== binding.parser.id) {
|
|
691
|
+
throw new SkippableError('minted_substrate_grading_binding_drift', `grading image or parser id does not match v2 environment binding for ${task.instance_id}`);
|
|
692
|
+
}
|
|
693
|
+
const admission = await this.requireMintedV2Admission(task, runtimeTask, row);
|
|
694
|
+
const spec = await this.loadAndVerifyMintedEnvironmentSpec(binding, task, enabledState);
|
|
695
|
+
await this.recheckMintedV2DifferentialAdmission(task, row, admission, spec);
|
|
696
|
+
// The environment contract declares the image which the runner must use;
|
|
697
|
+
// checking the row too prevents a public artifact from redirecting tests to
|
|
698
|
+
// an otherwise valid but unrelated environment image.
|
|
699
|
+
if (spec.execution.image.reference !== row.image_name) {
|
|
700
|
+
throw new SkippableError('minted_substrate_image_reference_drift', `v2 row image does not match published environment spec for ${task.instance_id}`);
|
|
701
|
+
}
|
|
702
|
+
const commandRunner = (this.deps.runCommand ?? runCommand);
|
|
703
|
+
if (!(await pullDigestQualifiedImage(binding.image.reference, commandRunner))) {
|
|
704
|
+
throw new SkippableError('minted_substrate_image_pull_failed', `cannot pull digest-qualified evaluator image for ${task.instance_id}`);
|
|
705
|
+
}
|
|
706
|
+
const currentDigest = await resolveImageDigest(binding.image.reference, commandRunner);
|
|
707
|
+
if (!currentDigest) {
|
|
708
|
+
throw new SkippableError('minted_substrate_image_unavailable', `cannot inspect digest-qualified evaluator image for ${task.instance_id}`);
|
|
709
|
+
}
|
|
710
|
+
if (currentDigest !== binding.image.digest) {
|
|
711
|
+
throw new SkippableError('minted_substrate_drift_image_digest', `evaluator image digest drift for ${task.instance_id}: bound=${binding.image.digest}, current=${currentDigest}`);
|
|
712
|
+
}
|
|
713
|
+
const currentPlatform = await resolveImagePlatform(binding.image.reference, commandRunner);
|
|
714
|
+
if (currentPlatform !== binding.platform) {
|
|
715
|
+
throw new SkippableError('minted_substrate_drift_image_platform', `evaluator image platform unavailable or mismatched for ${task.instance_id}: bound=${binding.platform}`);
|
|
716
|
+
}
|
|
717
|
+
return {
|
|
718
|
+
instance_id: row.instance_id,
|
|
719
|
+
repo: row.repo,
|
|
720
|
+
image_name: row.image_name,
|
|
721
|
+
FAIL_TO_PASS: row.FAIL_TO_PASS,
|
|
722
|
+
PASS_TO_PASS: row.PASS_TO_PASS,
|
|
723
|
+
test_patch: row.test_patch,
|
|
724
|
+
install_config: row.install_config,
|
|
725
|
+
};
|
|
726
|
+
}
|
|
727
|
+
/** A v2 row is gradeable only when the launcher-published vetted pool binds
|
|
728
|
+
* the exact public row and explicit evaluator environment. */
|
|
729
|
+
async requireMintedV2Admission(task, runtimeTask, row) {
|
|
730
|
+
let ref;
|
|
731
|
+
try {
|
|
732
|
+
ref = vettedPoolArtifactRefFromEligibility(runtimeTask.eligibility);
|
|
733
|
+
}
|
|
734
|
+
catch (err) {
|
|
735
|
+
throw new SkippableError('minted_v2_admission_invalid', `invalid vetted-pool ref: ${err instanceof Error ? err.message : String(err)}`);
|
|
736
|
+
}
|
|
737
|
+
if (!ref) {
|
|
738
|
+
throw new SkippableError('minted_v2_admission_missing', `v2 minted row ${task.instance_id} has no vetted-pool admission ref`);
|
|
739
|
+
}
|
|
740
|
+
if (runtimeTask.solverNetManifestCid && ref.manifestCid !== runtimeTask.solverNetManifestCid) {
|
|
741
|
+
throw new SkippableError('minted_v2_admission_invalid', `vetted-pool manifest mismatch for ${task.instance_id}`);
|
|
742
|
+
}
|
|
743
|
+
if (ref.evalSemanticsVersion !== EVAL_SEMANTICS_VERSION) {
|
|
744
|
+
throw new SkippableError('minted_v2_admission_invalid', `vetted-pool semantics mismatch for ${task.instance_id}`);
|
|
745
|
+
}
|
|
746
|
+
const artifact = await this.loadPublishedPoolArtifact(ref.artifactCid);
|
|
747
|
+
if (artifact.evalSemanticsVersion !== ref.evalSemanticsVersion || artifact.artifactHash !== ref.artifactHash) {
|
|
748
|
+
throw new SkippableError('minted_v2_admission_invalid', `vetted-pool artifact binding mismatch for ${task.instance_id}`);
|
|
749
|
+
}
|
|
750
|
+
const entry = artifact.entries.byId.get(task.instance_id);
|
|
751
|
+
if (!entry || entry.rowHashVersion !== 2 || !entry.publicRowHash || !entry.v2Environment) {
|
|
752
|
+
throw new SkippableError('minted_v2_admission_missing', `no v2 scorable admission for ${task.instance_id}`);
|
|
753
|
+
}
|
|
754
|
+
if (entry.publicRowHash !== row.publicRowHash ||
|
|
755
|
+
!sameV2AdmissionBinding(entry.v2Environment, row.environment)) {
|
|
756
|
+
throw new SkippableError('minted_v2_admission_drift', `vetted-pool admission drift for ${task.instance_id}`);
|
|
757
|
+
}
|
|
758
|
+
if (row.differentialAdmission && (!row.fix_commit || entry.v2FixCommit !== row.fix_commit)) {
|
|
759
|
+
throw new SkippableError('minted_v2_differential_fix_commit_drift', `differential fix commit admission drift for ${task.instance_id}`);
|
|
760
|
+
}
|
|
761
|
+
return entry;
|
|
762
|
+
}
|
|
763
|
+
/** Re-derive every receipt command from the signed environment before grade. */
|
|
764
|
+
async recheckMintedV2DifferentialAdmission(task, row, admission, spec) {
|
|
765
|
+
const rowReference = row.differentialAdmission;
|
|
766
|
+
const admissionReference = admission.differentialAdmission;
|
|
767
|
+
// Pre-hardening v2 rows retain their historical contract. New public-repo
|
|
768
|
+
// admissions always include both references, and never fail open if one is
|
|
769
|
+
// stripped or changed after publication.
|
|
770
|
+
if (!rowReference && !admissionReference)
|
|
771
|
+
return;
|
|
772
|
+
if (!rowReference || !admissionReference || !sameDifferentialAdmissionBinding(rowReference, admissionReference)) {
|
|
773
|
+
throw new SkippableError('minted_v2_differential_admission_drift', `differential admission reference drift for ${task.instance_id}`);
|
|
774
|
+
}
|
|
775
|
+
let receipt;
|
|
776
|
+
try {
|
|
777
|
+
const fetchArtifact = this.deps.fetchFromIpfs ?? fetchFromIpfs;
|
|
778
|
+
const raw = await fetchArtifact(this.ipfsGatewayUrl, rowReference.receiptCid);
|
|
779
|
+
receipt = verifyDifferentialAdmissionReceiptV2(raw);
|
|
780
|
+
}
|
|
781
|
+
catch (err) {
|
|
782
|
+
throw new SkippableError('minted_v2_differential_receipt_unavailable', `cannot load or parse differential receipt for ${task.instance_id}: ${err instanceof Error ? err.message : String(err)}`);
|
|
783
|
+
}
|
|
784
|
+
if (hashDifferentialAdmissionReceiptV2(receipt) !== rowReference.receiptHash) {
|
|
785
|
+
throw new SkippableError('minted_v2_differential_receipt_hash_drift', `differential receipt hash drift for ${task.instance_id}`);
|
|
786
|
+
}
|
|
787
|
+
if (receipt.task.fixCommit !== row.fix_commit) {
|
|
788
|
+
throw new SkippableError('minted_v2_differential_fix_commit_drift', `differential receipt fix commit drift for ${task.instance_id}`);
|
|
789
|
+
}
|
|
790
|
+
if (receipt.task.instanceId !== task.instance_id ||
|
|
791
|
+
receipt.task.repo !== task.repo ||
|
|
792
|
+
receipt.task.baseCommit !== task.base_commit ||
|
|
793
|
+
receipt.testPatchHash !== sha256(row.test_patch) ||
|
|
794
|
+
receipt.evalSemanticsVersion !== EVAL_SEMANTICS_VERSION ||
|
|
795
|
+
receipt.environment.environmentHash !== spec.attestation.environmentHash ||
|
|
796
|
+
receipt.environment.image.reference !== spec.execution.image.reference ||
|
|
797
|
+
receipt.environment.image.digest !== spec.execution.image.digest ||
|
|
798
|
+
receipt.environment.platform !== spec.execution.platform ||
|
|
799
|
+
!sameParser(receipt.environment.parser, spec.execution.parser)) {
|
|
800
|
+
throw new SkippableError('minted_v2_differential_context_drift', `differential receipt task/environment/parser/semantics drift for ${task.instance_id}`);
|
|
801
|
+
}
|
|
802
|
+
try {
|
|
803
|
+
for (const path of receipt.testPaths) {
|
|
804
|
+
if (canonicalCommandHash(targetRecipeCommandForTestPath(spec, path.testPath)) !== path.commandHash) {
|
|
805
|
+
throw new Error(`command binding drift for ${path.testPath}`);
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
catch (err) {
|
|
810
|
+
throw new SkippableError('minted_v2_differential_command_drift', `differential receipt command drift for ${task.instance_id}: ${err instanceof Error ? err.message : String(err)}`);
|
|
811
|
+
}
|
|
812
|
+
const FAIL_TO_PASS = receipt.testPaths.flatMap((path) => path.FAIL_TO_PASS);
|
|
813
|
+
const PASS_TO_PASS = receipt.testPaths.flatMap((path) => path.PASS_TO_PASS);
|
|
814
|
+
if (!sameStringArray(row.FAIL_TO_PASS, FAIL_TO_PASS) || !sameStringArray(row.PASS_TO_PASS, PASS_TO_PASS)) {
|
|
815
|
+
throw new SkippableError('minted_v2_differential_row_drift', `differential receipt assertions do not match public row for ${task.instance_id}`);
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
async loadAndVerifyMintedEnvironmentSpec(binding, task, enabledState) {
|
|
819
|
+
let spec;
|
|
820
|
+
try {
|
|
821
|
+
const fetchArtifact = this.deps.fetchFromIpfs ?? fetchFromIpfs;
|
|
822
|
+
const raw = await fetchArtifact(this.ipfsGatewayUrl, binding.environmentSpecCid);
|
|
823
|
+
spec = parseTaskEnvironmentSpecV1(raw);
|
|
824
|
+
}
|
|
825
|
+
catch (err) {
|
|
826
|
+
throw new SkippableError('minted_environment_spec_unavailable', `cannot load or parse environment spec ${binding.environmentSpecCid}: ${err instanceof Error ? err.message : String(err)}`);
|
|
827
|
+
}
|
|
828
|
+
const environmentHash = hashTaskEnvironmentSpecV1(spec);
|
|
829
|
+
if (environmentHash !== binding.environmentHash || spec.attestation.environmentHash !== binding.environmentHash) {
|
|
830
|
+
throw new SkippableError('minted_substrate_drift_environment_hash', `environment hash drift for ${task.instance_id}`);
|
|
831
|
+
}
|
|
832
|
+
if (!sameAttestation(spec.attestation, binding.attestation)) {
|
|
833
|
+
throw new SkippableError('minted_substrate_drift_attestation', `environment attestation drift for ${task.instance_id}`);
|
|
834
|
+
}
|
|
835
|
+
if (!(await verifyEnvironmentAttestationV1(spec.attestation))) {
|
|
836
|
+
throw new SkippableError('minted_substrate_attestation_invalid', `environment attestation signature is invalid for ${task.instance_id}`);
|
|
837
|
+
}
|
|
838
|
+
if (spec.source.repo !== task.repo ||
|
|
839
|
+
spec.source.baseCommit !== task.base_commit ||
|
|
840
|
+
spec.execution.platform !== binding.platform ||
|
|
841
|
+
spec.execution.image.reference !== binding.image.reference ||
|
|
842
|
+
spec.execution.image.digest !== binding.image.digest ||
|
|
843
|
+
!sameParser(spec.execution.parser, binding.parser)) {
|
|
844
|
+
throw new SkippableError('minted_substrate_environment_binding_drift', `published environment binding drift for ${task.instance_id}`);
|
|
845
|
+
}
|
|
846
|
+
const canonicalRepoUrl = `https://github.com/${task.repo}.git`;
|
|
847
|
+
const canonicalInputRef = `git+${canonicalRepoUrl}#${task.base_commit}`;
|
|
848
|
+
if (spec.source.repoUrl !== canonicalRepoUrl ||
|
|
849
|
+
!spec.inputs.some((input) => input.inputRef === canonicalInputRef)) {
|
|
850
|
+
throw new SkippableError('minted_substrate_source_binding_drift', `published environment source URL/input binding drift for ${task.instance_id}`);
|
|
851
|
+
}
|
|
852
|
+
if (!hasCurrentEnableContract(enabledState) || !enabledState.trustedParsers.some((parser) => parser.id === binding.parser.id &&
|
|
853
|
+
parser.version === binding.parser.version &&
|
|
854
|
+
parser.bundleId === binding.parser.bundleId &&
|
|
855
|
+
parser.bundleSha256 === binding.parser.digest)) {
|
|
856
|
+
throw new SkippableError('minted_substrate_parser_untrusted', `environment parser is not enabled and trusted for ${task.instance_id}`);
|
|
857
|
+
}
|
|
858
|
+
return spec;
|
|
859
|
+
}
|
|
394
860
|
async loadPublishedPoolRow(task, runtimeTask, fetcher) {
|
|
395
861
|
let ref;
|
|
396
862
|
try {
|
|
@@ -462,11 +928,18 @@ export class SweRebenchV2EvaluatorHarness {
|
|
|
462
928
|
process.env['JINN_SWE_REBENCH_V2_STATE_DIR'] ??
|
|
463
929
|
defaultSolverTypeStateDir();
|
|
464
930
|
const fetcher = this.getFetcher();
|
|
465
|
-
const
|
|
466
|
-
const
|
|
931
|
+
const mintedV2Row = await this.recheckMintedV2(task, ctx.task, fetcher, state);
|
|
932
|
+
const publishedPoolRow = mintedV2Row
|
|
933
|
+
? null
|
|
934
|
+
: await this.loadPublishedPoolRow(task, ctx.task, fetcher);
|
|
935
|
+
const recheckRow = mintedV2Row ?? publishedPoolRow ?? await this.recheckSubstrate(task, fetcher, () => this.loadPoolForRecheck(stateDir), stateDir);
|
|
467
936
|
// ── End substrate recheck ─────────────────────────────────────────────────
|
|
468
937
|
const runner = this.getRunner(state.upstreamRepoDir);
|
|
469
938
|
const evaluator = new SweRebenchV2Evaluator({ fetcher, runner });
|
|
939
|
+
// Meter real evaluator cost as grade() wall-time × compute rate (#1828).
|
|
940
|
+
// Only the grade() call is timed — not the IPFS upload or the substrate
|
|
941
|
+
// recheck above.
|
|
942
|
+
const gradeStartedAtMs = performance.now();
|
|
470
943
|
let graded;
|
|
471
944
|
try {
|
|
472
945
|
graded = await evaluator.grade({ task, solutionPayload, row: recheckRow });
|
|
@@ -481,6 +954,13 @@ export class SweRebenchV2EvaluatorHarness {
|
|
|
481
954
|
}
|
|
482
955
|
throw err;
|
|
483
956
|
}
|
|
957
|
+
const computedEvaluatorCostUsd = (Math.max(0, performance.now() - gradeStartedAtMs) / 3_600_000) * resolveComputeUsdPerHour();
|
|
958
|
+
let evaluatorCostUsd = computedEvaluatorCostUsd;
|
|
959
|
+
if (!Number.isFinite(computedEvaluatorCostUsd) || computedEvaluatorCostUsd < 0) {
|
|
960
|
+
console.warn('[swe-rebench-v2] evaluator cost computation was not finite and nonnegative — ' +
|
|
961
|
+
'recording evaluator_cost_usd=0');
|
|
962
|
+
evaluatorCostUsd = 0;
|
|
963
|
+
}
|
|
484
964
|
// Pin the test log to IPFS so anyone (evaluator dispute, audit, model
|
|
485
965
|
// training) can fetch it anonymously by CID. The CID is surfaced via the
|
|
486
966
|
// verdict-artifact's metadata, not the typed Verdict payload — the
|
|
@@ -496,7 +976,7 @@ export class SweRebenchV2EvaluatorHarness {
|
|
|
496
976
|
schemaVersion: 'swe-rebench-v2-verdict.v2',
|
|
497
977
|
score: graded.score,
|
|
498
978
|
passed_match: graded.passed_match,
|
|
499
|
-
evaluator_cost_usd:
|
|
979
|
+
evaluator_cost_usd: evaluatorCostUsd,
|
|
500
980
|
passedCount: graded.passedCount,
|
|
501
981
|
totalCount: graded.totalCount,
|
|
502
982
|
};
|
|
@@ -564,6 +1044,45 @@ async function runCommand(bin, args, opts = {}) {
|
|
|
564
1044
|
});
|
|
565
1045
|
});
|
|
566
1046
|
}
|
|
1047
|
+
/**
|
|
1048
|
+
* Upstream `SWE-rebench/SWE-rebench-V2` ships `scripts/eval.py` with a
|
|
1049
|
+
* `build_report_item()` that never surfaces `passed_actual`/`failed_actual`
|
|
1050
|
+
* on the report item it returns, even though it already derives
|
|
1051
|
+
* `passed_actual` internally to compute `from_fail_to_pass`. Jinn's
|
|
1052
|
+
* `PythonEvalRunner` (`eval-runner.ts`) reads exactly those two keys off
|
|
1053
|
+
* each report item to derive empirical F2P/P2P — without this patch they
|
|
1054
|
+
* are always empty, silently breaking empirical mining. See
|
|
1055
|
+
* `docs/handoffs/2026-07-10-task-creator-rung1-plumbing-handoff.md` ("Bugs
|
|
1056
|
+
* fixed during verification" #1) and `upstream-patches/passed-actual.patch`.
|
|
1057
|
+
*/
|
|
1058
|
+
const UPSTREAM_PATCHES = ['passed-actual.patch'];
|
|
1059
|
+
/**
|
|
1060
|
+
* Apply Jinn's upstream `eval.py` patches to a freshly-cloned (or
|
|
1061
|
+
* previously-cloned) `SWE-rebench-V2` checkout, idempotently. Each patch is
|
|
1062
|
+
* checked with `git apply --check --reverse` first — if it reverse-applies
|
|
1063
|
+
* cleanly the fix is already present (either from a prior run of this
|
|
1064
|
+
* function, or because upstream has since shipped it natively) and the
|
|
1065
|
+
* patch is skipped rather than re-applied.
|
|
1066
|
+
*
|
|
1067
|
+
* Throws if a patch is neither already applied nor cleanly appliable, so
|
|
1068
|
+
* `onEnable` can surface it as a setup error instead of silently shipping a
|
|
1069
|
+
* harness that can't derive empirical F2P/P2P.
|
|
1070
|
+
*/
|
|
1071
|
+
export function applyUpstreamPatches(upstreamRepoDir) {
|
|
1072
|
+
const patchesDir = join(dirname(fileURLToPath(import.meta.url)), 'upstream-patches');
|
|
1073
|
+
for (const patchFile of UPSTREAM_PATCHES) {
|
|
1074
|
+
const patchPath = join(patchesDir, patchFile);
|
|
1075
|
+
const reversed = spawnSync('git', ['apply', '--check', '--reverse', patchPath], {
|
|
1076
|
+
cwd: upstreamRepoDir,
|
|
1077
|
+
});
|
|
1078
|
+
if (reversed.status === 0)
|
|
1079
|
+
continue; // already applied — no-op.
|
|
1080
|
+
const applied = spawnSync('git', ['apply', patchPath], { cwd: upstreamRepoDir });
|
|
1081
|
+
if (applied.status !== 0) {
|
|
1082
|
+
throw new Error(`failed to apply upstream patch ${patchFile} to ${upstreamRepoDir}: ${applied.stderr?.toString() ?? ''}`);
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
567
1086
|
/**
|
|
568
1087
|
* The default `implStateDir` for the swe-rebench-v2 evaluator. The daemon
|
|
569
1088
|
* normally injects this via `engine.implStateDirRoot`; consumers (e.g. the
|
|
@@ -573,15 +1092,51 @@ async function runCommand(bin, args, opts = {}) {
|
|
|
573
1092
|
export function defaultSweRebenchV2EvaluatorImplStateDir() {
|
|
574
1093
|
return join(process.env['HOME'] ?? homedir(), '.jinn-client', 'engine', 'impl-state', 'swe-rebench-v2-evaluator');
|
|
575
1094
|
}
|
|
1095
|
+
function isRecord(value) {
|
|
1096
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
1097
|
+
}
|
|
1098
|
+
function isSha256(value) {
|
|
1099
|
+
return typeof value === 'string' && /^sha256:[a-f0-9]{64}$/.test(value);
|
|
1100
|
+
}
|
|
1101
|
+
function isLegacyEnabledState(value) {
|
|
1102
|
+
return isRecord(value) &&
|
|
1103
|
+
value['schemaVersion'] === 'swe-rebench-v2-evaluator-state.v1' &&
|
|
1104
|
+
value['enabled'] === true &&
|
|
1105
|
+
typeof value['enabledAt'] === 'string' &&
|
|
1106
|
+
typeof value['upstreamRepoDir'] === 'string';
|
|
1107
|
+
}
|
|
1108
|
+
function isEnabledState(value) {
|
|
1109
|
+
if (!isRecord(value) ||
|
|
1110
|
+
value['schemaVersion'] !== 'swe-rebench-v2-evaluator-state.v2' ||
|
|
1111
|
+
value['enabled'] !== true ||
|
|
1112
|
+
typeof value['enabledAt'] !== 'string' ||
|
|
1113
|
+
typeof value['upstreamRepoDir'] !== 'string' ||
|
|
1114
|
+
!isRecord(value['upstream']) ||
|
|
1115
|
+
typeof value['upstream']['repoUrl'] !== 'string' ||
|
|
1116
|
+
typeof value['upstream']['commit'] !== 'string' ||
|
|
1117
|
+
!isRecord(value['patchBundle']) ||
|
|
1118
|
+
typeof value['patchBundle']['id'] !== 'string' ||
|
|
1119
|
+
typeof value['patchBundle']['version'] !== 'string' ||
|
|
1120
|
+
!isSha256(value['patchBundle']['sha256']) ||
|
|
1121
|
+
!Array.isArray(value['trustedParsers']))
|
|
1122
|
+
return false;
|
|
1123
|
+
return value['trustedParsers'].every((parser) => isRecord(parser) &&
|
|
1124
|
+
typeof parser['id'] === 'string' &&
|
|
1125
|
+
typeof parser['version'] === 'string' &&
|
|
1126
|
+
typeof parser['bundleId'] === 'string' &&
|
|
1127
|
+
isSha256(parser['bundleSha256']));
|
|
1128
|
+
}
|
|
576
1129
|
export function readEnabledState(implStateDir) {
|
|
577
1130
|
const path = join(implStateDir, STATE_FILE);
|
|
578
1131
|
if (!existsSync(path))
|
|
579
1132
|
return null;
|
|
580
1133
|
try {
|
|
581
1134
|
const raw = JSON.parse(readFileSync(path, 'utf8'));
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
1135
|
+
// Keep structurally-valid v1 state readable so enable can repair it in
|
|
1136
|
+
// place, while refusing every partial or malformed v2 marker.
|
|
1137
|
+
if (isLegacyEnabledState(raw) || isEnabledState(raw))
|
|
1138
|
+
return raw;
|
|
1139
|
+
return null;
|
|
585
1140
|
}
|
|
586
1141
|
catch {
|
|
587
1142
|
return null;
|