@jinn-network/client 0.1.5 → 0.1.6-canary.107ea271
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +131 -0
- package/dist/adapters/mech/adapter.d.ts +23 -1
- package/dist/adapters/mech/adapter.js +169 -33
- package/dist/adapters/mech/adapter.js.map +1 -1
- package/dist/adapters/mech/contracts.d.ts +1 -0
- package/dist/adapters/mech/contracts.js +1 -0
- package/dist/adapters/mech/contracts.js.map +1 -1
- package/dist/adapters/mech/ipfs-pinfile.d.ts +22 -0
- package/dist/adapters/mech/ipfs-pinfile.js +54 -0
- package/dist/adapters/mech/ipfs-pinfile.js.map +1 -0
- package/dist/adapters/mech/ipfs.d.ts +1 -0
- package/dist/adapters/mech/ipfs.js +24 -1
- package/dist/adapters/mech/ipfs.js.map +1 -1
- package/dist/adapters/mech/verdict-code.d.ts +1 -0
- package/dist/adapters/mech/verdict-code.js +18 -0
- package/dist/adapters/mech/verdict-code.js.map +1 -1
- package/dist/api/bootstrap-endpoint.js +63 -1
- package/dist/api/bootstrap-endpoint.js.map +1 -1
- package/dist/api/codex-doctor-endpoint.d.ts +73 -0
- package/dist/api/codex-doctor-endpoint.js +158 -0
- package/dist/api/codex-doctor-endpoint.js.map +1 -0
- package/dist/api/discovery-endpoint.d.ts +31 -0
- package/dist/api/discovery-endpoint.js +78 -0
- package/dist/api/discovery-endpoint.js.map +1 -0
- package/dist/api/fleet-build.d.ts +8 -0
- package/dist/api/fleet-build.js +8 -2
- package/dist/api/fleet-build.js.map +1 -1
- package/dist/api/gather-status.js +90 -4
- package/dist/api/gather-status.js.map +1 -1
- package/dist/api/harness-readiness-endpoint.d.ts +25 -0
- package/dist/api/harness-readiness-endpoint.js +24 -0
- package/dist/api/harness-readiness-endpoint.js.map +1 -0
- package/dist/api/hermes-doctor-endpoint.d.ts +66 -0
- package/dist/api/hermes-doctor-endpoint.js +75 -0
- package/dist/api/hermes-doctor-endpoint.js.map +1 -0
- package/dist/api/portfolio-v0-build.d.ts +10 -0
- package/dist/api/portfolio-v0-build.js +24 -5
- package/dist/api/portfolio-v0-build.js.map +1 -1
- package/dist/api/prediction-v1-build.d.ts +9 -0
- package/dist/api/prediction-v1-build.js +6 -1
- package/dist/api/prediction-v1-build.js.map +1 -1
- package/dist/api/server.d.ts +70 -0
- package/dist/api/server.js +107 -1
- package/dist/api/server.js.map +1 -1
- package/dist/api/setup-endpoints.d.ts +21 -0
- package/dist/api/setup-endpoints.js +101 -8
- package/dist/api/setup-endpoints.js.map +1 -1
- package/dist/api/setup-retry-endpoint.d.ts +19 -0
- package/dist/api/setup-retry-endpoint.js +32 -0
- package/dist/api/setup-retry-endpoint.js.map +1 -0
- package/dist/api/solvernets-endpoints.js +8 -1
- package/dist/api/solvernets-endpoints.js.map +1 -1
- package/dist/api/status-build.d.ts +14 -0
- package/dist/api/status-build.js +23 -18
- package/dist/api/status-build.js.map +1 -1
- package/dist/api/task-run-routing.d.ts +7 -0
- package/dist/api/task-run-routing.js +12 -0
- package/dist/api/task-run-routing.js.map +1 -0
- package/dist/api/task-runs-build.d.ts +20 -0
- package/dist/api/task-runs-build.js +4 -0
- 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/chain-read-errors.d.ts +10 -0
- package/dist/chain-read-errors.js +15 -0
- package/dist/chain-read-errors.js.map +1 -1
- package/dist/cli/commands/auth.js +3 -1
- package/dist/cli/commands/auth.js.map +1 -1
- package/dist/cli/commands/create.d.ts +5 -3
- package/dist/cli/commands/create.js +102 -36
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/solver-nets.d.ts +19 -0
- package/dist/cli/commands/solver-nets.js +164 -11
- package/dist/cli/commands/solver-nets.js.map +1 -1
- package/dist/cli/commands/solver-plugins-publish.d.ts +31 -0
- package/dist/cli/commands/solver-plugins-publish.js +169 -0
- package/dist/cli/commands/solver-plugins-publish.js.map +1 -0
- package/dist/cli/commands/solver-plugins-revoke.d.ts +15 -0
- package/dist/cli/commands/solver-plugins-revoke.js +91 -0
- package/dist/cli/commands/solver-plugins-revoke.js.map +1 -0
- package/dist/cli/commands/solver-plugins.d.ts +50 -6
- package/dist/cli/commands/solver-plugins.js +205 -68
- package/dist/cli/commands/solver-plugins.js.map +1 -1
- package/dist/cli/commands/update.d.ts +10 -0
- package/dist/cli/commands/update.js +36 -0
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/config.d.ts +51 -0
- package/dist/config.js +49 -2
- package/dist/config.js.map +1 -1
- package/dist/conformance/checks/hash-signature.js +6 -2
- package/dist/conformance/checks/hash-signature.js.map +1 -1
- package/dist/conformance/checks/payload.js +4 -2
- package/dist/conformance/checks/payload.js.map +1 -1
- package/dist/conformance/checks/verdict.d.ts +10 -10
- package/dist/conformance/checks/verdict.js +16 -15
- package/dist/conformance/checks/verdict.js.map +1 -1
- package/dist/conformance/harness.d.ts +1 -1
- package/dist/conformance/harness.js +16 -9
- package/dist/conformance/harness.js.map +1 -1
- package/dist/conformance/types.d.ts +10 -3
- package/dist/conformance/types.js.map +1 -1
- package/dist/corpus/acquire.d.ts +1 -3
- package/dist/corpus/acquire.js.map +1 -1
- package/dist/corpus/envelope-projection.d.ts +1 -1
- package/dist/corpus/envelope-projection.js +14 -7
- package/dist/corpus/envelope-projection.js.map +1 -1
- package/dist/corpus/index.d.ts +2 -1
- package/dist/corpus/index.js.map +1 -1
- package/dist/corpus/prediction-brier-scoreboard-report.js +1 -1
- package/dist/corpus/prediction-brier-scoreboard-report.js.map +1 -1
- package/dist/corpus/prediction-brier-scoreboard.js +3 -1
- package/dist/corpus/prediction-brier-scoreboard.js.map +1 -1
- package/dist/corpus/types.d.ts +2 -2
- package/dist/daemon/daemon.d.ts +26 -1
- package/dist/daemon/daemon.js +63 -1
- package/dist/daemon/daemon.js.map +1 -1
- package/dist/daemon/eviction-loop.d.ts +40 -0
- package/dist/daemon/eviction-loop.js +67 -0
- package/dist/daemon/eviction-loop.js.map +1 -0
- package/dist/daemon/freeze-fence.js +6 -3
- package/dist/daemon/freeze-fence.js.map +1 -1
- package/dist/daemon/readiness-gate.d.ts +30 -0
- package/dist/daemon/readiness-gate.js +31 -0
- package/dist/daemon/readiness-gate.js.map +1 -0
- package/dist/daemon/skip-log-dedup.d.ts +69 -0
- package/dist/daemon/skip-log-dedup.js +106 -0
- package/dist/daemon/skip-log-dedup.js.map +1 -0
- package/dist/dashboard/assets/{index-D_NMfDfV.css → index-DE4qUnzV.css} +1 -1
- package/dist/dashboard/assets/index-Di7xA4eB.js +170 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/discovery/http.js +121 -0
- package/dist/discovery/http.js.map +1 -1
- package/dist/discovery/onchain.d.ts +5 -0
- package/dist/discovery/onchain.js +292 -7
- package/dist/discovery/onchain.js.map +1 -1
- package/dist/discovery/types.d.ts +127 -1
- package/dist/discovery/types.js +8 -10
- package/dist/discovery/types.js.map +1 -1
- package/dist/discovery/with-fallback.js +9 -0
- package/dist/discovery/with-fallback.js.map +1 -1
- package/dist/earning/agent-wallet-binding.d.ts +20 -1
- package/dist/earning/agent-wallet-binding.js +54 -16
- package/dist/earning/agent-wallet-binding.js.map +1 -1
- package/dist/earning/bootstrap.d.ts +178 -0
- package/dist/earning/bootstrap.js +628 -57
- package/dist/earning/bootstrap.js.map +1 -1
- package/dist/earning/contracts.d.ts +12 -0
- package/dist/earning/contracts.js +16 -1
- package/dist/earning/contracts.js.map +1 -1
- package/dist/earning/funding-plan.js +15 -2
- package/dist/earning/funding-plan.js.map +1 -1
- package/dist/earning/jinn-rewards.d.ts +46 -0
- package/dist/earning/jinn-rewards.js +32 -0
- package/dist/earning/jinn-rewards.js.map +1 -1
- package/dist/earning/store.d.ts +8 -0
- package/dist/earning/store.js +48 -1
- package/dist/earning/store.js.map +1 -1
- package/dist/earning/testnet-setup-migration.d.ts +12 -0
- package/dist/earning/testnet-setup-migration.js +27 -1
- package/dist/earning/testnet-setup-migration.js.map +1 -1
- package/dist/earning/types.d.ts +45 -0
- package/dist/earning/types.js +37 -0
- package/dist/earning/types.js.map +1 -1
- package/dist/erc8004/abis.d.ts +64 -0
- package/dist/erc8004/abis.js +48 -0
- package/dist/erc8004/abis.js.map +1 -1
- package/dist/erc8004/plugin-registry.d.ts +102 -0
- package/dist/erc8004/plugin-registry.js +165 -0
- package/dist/erc8004/plugin-registry.js.map +1 -0
- package/dist/erc8004/reputation.d.ts +8 -0
- package/dist/erc8004/reputation.js +22 -3
- package/dist/erc8004/reputation.js.map +1 -1
- package/dist/events/types.d.ts +2 -2
- package/dist/harnesses/cost-estimates.d.ts +145 -0
- package/dist/harnesses/cost-estimates.js +297 -0
- package/dist/harnesses/cost-estimates.js.map +1 -0
- package/dist/harnesses/engine/engine.d.ts +40 -0
- package/dist/harnesses/engine/engine.js +69 -8
- package/dist/harnesses/engine/engine.js.map +1 -1
- package/dist/harnesses/engine/envelope-assembly.d.ts +2 -2
- package/dist/harnesses/engine/envelope-assembly.js +4 -2
- package/dist/harnesses/engine/envelope-assembly.js.map +1 -1
- package/dist/harnesses/engine/persistence.d.ts +21 -0
- package/dist/harnesses/engine/persistence.js +39 -0
- package/dist/harnesses/engine/persistence.js.map +1 -1
- package/dist/harnesses/engine/work-dir-reaper.d.ts +65 -0
- package/dist/harnesses/engine/work-dir-reaper.js +100 -0
- package/dist/harnesses/engine/work-dir-reaper.js.map +1 -0
- package/dist/harnesses/freeze.d.ts +4 -1
- package/dist/harnesses/freeze.js +12 -2
- package/dist/harnesses/freeze.js.map +1 -1
- package/dist/harnesses/impls/claude-mcp-prediction/index.d.ts +4 -1
- package/dist/harnesses/impls/claude-mcp-prediction/index.js +7 -2
- package/dist/harnesses/impls/claude-mcp-prediction/index.js.map +1 -1
- package/dist/harnesses/impls/claude-mcp-prediction-apy/index.d.ts +4 -1
- package/dist/harnesses/impls/claude-mcp-prediction-apy/index.js +7 -2
- package/dist/harnesses/impls/claude-mcp-prediction-apy/index.js.map +1 -1
- package/dist/harnesses/impls/evaluation-context.d.ts +15 -4
- package/dist/harnesses/impls/evaluation-context.js +24 -8
- package/dist/harnesses/impls/evaluation-context.js.map +1 -1
- package/dist/harnesses/impls/hermes-agent/adapter.d.ts +34 -0
- package/dist/harnesses/impls/hermes-agent/adapter.js +205 -0
- package/dist/harnesses/impls/hermes-agent/adapter.js.map +1 -0
- package/dist/harnesses/impls/hermes-agent/bootstrap.d.ts +18 -0
- package/dist/harnesses/impls/hermes-agent/bootstrap.js +231 -0
- package/dist/harnesses/impls/hermes-agent/bootstrap.js.map +1 -0
- package/dist/harnesses/impls/hermes-agent/config-builder.d.ts +49 -0
- package/dist/harnesses/impls/hermes-agent/config-builder.js +132 -0
- package/dist/harnesses/impls/hermes-agent/config-builder.js.map +1 -0
- package/dist/harnesses/impls/hermes-agent/harness.d.ts +58 -0
- package/dist/harnesses/impls/hermes-agent/harness.js +118 -0
- package/dist/harnesses/impls/hermes-agent/harness.js.map +1 -0
- package/dist/harnesses/impls/hermes-agent/index.d.ts +5 -0
- package/dist/harnesses/impls/hermes-agent/index.js +7 -0
- package/dist/harnesses/impls/hermes-agent/index.js.map +1 -0
- package/dist/harnesses/impls/hermes-agent/prompt.d.ts +15 -0
- package/dist/harnesses/impls/hermes-agent/prompt.js +37 -0
- package/dist/harnesses/impls/hermes-agent/prompt.js.map +1 -0
- package/dist/harnesses/impls/index.d.ts +13 -0
- package/dist/harnesses/impls/index.js +32 -4
- package/dist/harnesses/impls/index.js.map +1 -1
- package/dist/harnesses/impls/learner/adapters/claude-code.js.map +1 -0
- package/dist/harnesses/impls/{claude-code-learner → learner}/adapters/codex-code.js +13 -34
- package/dist/harnesses/impls/learner/adapters/codex-code.js.map +1 -0
- package/dist/harnesses/impls/learner/adapters/codex-workspace.js.map +1 -0
- package/dist/harnesses/impls/learner/harness.d.ts +62 -0
- package/dist/harnesses/impls/learner/harness.js +179 -0
- package/dist/harnesses/impls/learner/harness.js.map +1 -0
- package/dist/harnesses/impls/{claude-code-learner → learner}/harvest.js +15 -3
- package/dist/harnesses/impls/learner/harvest.js.map +1 -0
- package/dist/harnesses/impls/{claude-code-learner → learner}/index.d.ts +5 -5
- package/dist/harnesses/impls/{claude-code-learner → learner}/index.js +4 -4
- package/dist/harnesses/impls/learner/index.js.map +1 -0
- package/dist/harnesses/impls/{claude-code-learner → learner}/plugin-path.d.ts +4 -4
- package/dist/harnesses/impls/{claude-code-learner → learner}/plugin-path.js +7 -7
- package/dist/harnesses/impls/learner/plugin-path.js.map +1 -0
- package/dist/harnesses/impls/{claude-code-learner → learner}/restoration-patch.js +3 -1
- package/dist/harnesses/impls/learner/restoration-patch.js.map +1 -0
- package/dist/harnesses/impls/learner/test-utils/fake-plugin-outputs.js.map +1 -0
- package/dist/harnesses/impls/learner/test-utils/noop-adapter.js.map +1 -0
- package/dist/harnesses/impls/{claude-code-learner → learner}/types.d.ts +23 -2
- package/dist/harnesses/impls/learner/types.js.map +1 -0
- package/dist/harnesses/impls/portfolio-v0-evaluator/index.js +13 -12
- package/dist/harnesses/impls/portfolio-v0-evaluator/index.js.map +1 -1
- package/dist/harnesses/impls/prediction-apy-v0-evaluator/index.js +7 -7
- package/dist/harnesses/impls/prediction-apy-v0-evaluator/index.js.map +1 -1
- package/dist/harnesses/impls/prediction-apy-v0-evaluator/parse-submission.d.ts +3 -3
- package/dist/harnesses/impls/prediction-apy-v0-evaluator/parse-submission.js +7 -6
- package/dist/harnesses/impls/prediction-apy-v0-evaluator/parse-submission.js.map +1 -1
- package/dist/harnesses/impls/prediction-v0-evaluator/checks/integrity.js +1 -1
- package/dist/harnesses/impls/prediction-v0-evaluator/checks/integrity.js.map +1 -1
- package/dist/harnesses/impls/prediction-v0-evaluator/index.js +11 -10
- package/dist/harnesses/impls/prediction-v0-evaluator/index.js.map +1 -1
- package/dist/harnesses/impls/prediction-v1-evaluator/index.js +11 -10
- package/dist/harnesses/impls/prediction-v1-evaluator/index.js.map +1 -1
- package/dist/harnesses/impls/stub.d.ts +58 -0
- package/dist/harnesses/impls/stub.js +89 -0
- package/dist/harnesses/impls/stub.js.map +1 -0
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.d.ts +1 -0
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.js +10 -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 +24 -5
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/harness.js +104 -4
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/harness.js.map +1 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/hf-fetcher.d.ts +9 -0
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/hf-fetcher.js +25 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/hf-fetcher.js.map +1 -1
- package/dist/harnesses/names.d.ts +1 -0
- package/dist/harnesses/names.js +3 -0
- package/dist/harnesses/names.js.map +1 -1
- package/dist/harnesses/readiness-registry.d.ts +48 -0
- package/dist/harnesses/readiness-registry.js +144 -0
- package/dist/harnesses/readiness-registry.js.map +1 -0
- package/dist/harnesses/types.d.ts +7 -0
- package/dist/main.d.ts +14 -0
- package/dist/main.js +372 -90
- package/dist/main.js.map +1 -1
- package/dist/mcp/server.js +14 -13
- package/dist/mcp/server.js.map +1 -1
- package/dist/operator-errors.d.ts +7 -0
- package/dist/operator-errors.js +26 -2
- package/dist/operator-errors.js.map +1 -1
- package/dist/preflight/claude-auth.d.ts +18 -0
- package/dist/preflight/claude-auth.js +38 -0
- package/dist/preflight/claude-auth.js.map +1 -1
- package/dist/restart-daemon.d.ts +71 -0
- package/dist/restart-daemon.js +82 -0
- package/dist/restart-daemon.js.map +1 -0
- package/dist/scripts/donation-consumption-acceptance.js +1 -1
- package/dist/scripts/donation-consumption-acceptance.js.map +1 -1
- package/dist/scripts/swe-rebench-v2-known-bad.json +12 -0
- package/dist/scripts/swe-rebench-v2-seed-pool.json +26 -0
- package/dist/setup/halt-mode.d.ts +14 -0
- package/dist/setup/halt-mode.js +17 -0
- package/dist/setup/halt-mode.js.map +1 -0
- package/dist/solver-nets/prediction-operator-ux.js +43 -3
- package/dist/solver-nets/prediction-operator-ux.js.map +1 -1
- package/dist/solver-nets/registry.d.ts +1 -0
- package/dist/solver-nets/registry.js +1 -1
- package/dist/solver-nets/registry.js.map +1 -1
- package/dist/solver-types/_swe-rebench-v2-substrate.d.ts +52 -0
- package/dist/solver-types/_swe-rebench-v2-substrate.js +76 -0
- package/dist/solver-types/_swe-rebench-v2-substrate.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-validated-pool.d.ts +38 -12
- package/dist/solver-types/_swe-rebench-v2-validated-pool.js +136 -27
- package/dist/solver-types/_swe-rebench-v2-validated-pool.js.map +1 -1
- package/dist/solver-types/swe-rebench-v2-auto.d.ts +6 -0
- package/dist/solver-types/swe-rebench-v2-auto.js.map +1 -1
- package/dist/solver-types/swe-rebench-v2.d.ts +1 -0
- package/dist/solver-types/swe-rebench-v2.js +19 -6
- package/dist/solver-types/swe-rebench-v2.js.map +1 -1
- package/dist/solvernets/daemon-init.d.ts +10 -2
- package/dist/solvernets/daemon-init.js +22 -2
- package/dist/solvernets/daemon-init.js.map +1 -1
- package/dist/store/store.js +12 -4
- package/dist/store/store.js.map +1 -1
- package/dist/templates/plugins/runtime-plugin/.mcp.json.tmpl +8 -0
- package/dist/templates/plugins/runtime-plugin/README.md.tmpl +30 -0
- package/dist/templates/plugins/runtime-plugin/gitignore.tmpl +3 -0
- package/dist/templates/plugins/runtime-plugin/jinn.plugin.json.tmpl +21 -0
- package/dist/templates/plugins/runtime-plugin/mcp/server.mjs.tmpl +33 -0
- package/dist/templates/plugins/runtime-plugin/package.json.tmpl +15 -0
- package/dist/templates/plugins/runtime-plugin/test/plugin.test.ts.tmpl +35 -0
- package/dist/templates/plugins/runtime-plugin/tsconfig.json.tmpl +11 -0
- package/dist/templates/plugins/solver-type-plugin/README.md.tmpl +35 -0
- package/dist/templates/plugins/solver-type-plugin/gitignore.tmpl +3 -0
- package/dist/templates/plugins/solver-type-plugin/jinn.plugin.json.tmpl +11 -0
- package/dist/templates/plugins/solver-type-plugin/package.json.tmpl +15 -0
- package/dist/templates/plugins/solver-type-plugin/skills/example/SKILL.md.tmpl +10 -0
- package/dist/templates/plugins/solver-type-plugin/test/plugin.test.ts.tmpl +25 -0
- package/dist/templates/plugins/solver-type-plugin/tsconfig.json.tmpl +11 -0
- package/dist/tx-retry.d.ts +13 -0
- package/dist/tx-retry.js +22 -0
- package/dist/tx-retry.js.map +1 -1
- package/dist/types/envelope.d.ts +28 -21
- package/dist/types/envelope.js +8 -3
- package/dist/types/envelope.js.map +1 -1
- package/dist/types/payloads/index.d.ts +2 -2
- package/dist/types/payloads/index.js +13 -12
- package/dist/types/payloads/index.js.map +1 -1
- package/dist/types/payloads/portfolio-v0.d.ts +60 -10
- package/dist/types/payloads/portfolio-v0.js +16 -6
- package/dist/types/payloads/portfolio-v0.js.map +1 -1
- package/dist/types/payloads/prediction-apy-v0.d.ts +56 -14
- package/dist/types/payloads/prediction-apy-v0.js +16 -6
- package/dist/types/payloads/prediction-apy-v0.js.map +1 -1
- package/dist/types/payloads/prediction-v0.d.ts +53 -14
- package/dist/types/payloads/prediction-v0.js +16 -6
- package/dist/types/payloads/prediction-v0.js.map +1 -1
- package/dist/util/extract-tx-hash.d.ts +14 -0
- package/dist/util/extract-tx-hash.js +19 -0
- package/dist/util/extract-tx-hash.js.map +1 -0
- package/dist/vendor/@jinn-network/sdk/dist/payloads/prediction-v1.d.ts +45 -6
- package/dist/vendor/@jinn-network/sdk/dist/payloads/prediction-v1.js +16 -6
- package/dist/x402/handler.js +51 -20
- package/dist/x402/handler.js.map +1 -1
- package/package.json +38 -13
- package/plugins/swe-rebench-v2-diffmin/.claude-plugin/plugin.json +5 -0
- package/plugins/swe-rebench-v2-diffmin/.mcp.json +8 -0
- package/plugins/swe-rebench-v2-diffmin/README.md +69 -0
- package/plugins/swe-rebench-v2-diffmin/jinn.plugin.json +12 -0
- package/plugins/swe-rebench-v2-diffmin/mcp/diff-stats-server.mjs +72 -0
- package/plugins/swe-rebench-v2-diffmin/mcp/diff-stats.mjs +48 -0
- package/plugins/swe-rebench-v2-diffmin/package.json +19 -0
- package/plugins/swe-rebench-v2-diffmin/skills/diffmin/SKILL.md +116 -0
- package/plugins/swe-rebench-v2-diffmin/skills/test-map/SKILL.md +126 -0
- package/plugins/swe-rebench-v2-diffmin/test/diff-stats.test.ts +62 -0
- package/plugins/swe-rebench-v2-diffmin/test/manifest.test.ts +53 -0
- package/plugins/swe-rebench-v2-diffmin/tsconfig.json +12 -0
- package/plugins/swe-rebench-v2-runtime/README.md +13 -0
- package/plugins/swe-rebench-v2-runtime/skills/orient/SKILL.md +7 -3
- package/plugins/swe-rebench-v2-runtime/skills/plan/SKILL.md +6 -17
- package/templates/plugins/runtime-plugin/.mcp.json.tmpl +8 -0
- package/templates/plugins/runtime-plugin/README.md.tmpl +30 -0
- package/templates/plugins/runtime-plugin/gitignore.tmpl +3 -0
- package/templates/plugins/runtime-plugin/jinn.plugin.json.tmpl +21 -0
- package/templates/plugins/runtime-plugin/mcp/server.mjs.tmpl +33 -0
- package/templates/plugins/runtime-plugin/package.json.tmpl +15 -0
- package/templates/plugins/runtime-plugin/test/plugin.test.ts.tmpl +35 -0
- package/templates/plugins/runtime-plugin/tsconfig.json.tmpl +11 -0
- package/templates/plugins/solver-type-plugin/README.md.tmpl +35 -0
- package/templates/plugins/solver-type-plugin/gitignore.tmpl +3 -0
- package/templates/plugins/solver-type-plugin/jinn.plugin.json.tmpl +11 -0
- package/templates/plugins/solver-type-plugin/package.json.tmpl +15 -0
- package/templates/plugins/solver-type-plugin/skills/example/SKILL.md.tmpl +10 -0
- package/templates/plugins/solver-type-plugin/test/plugin.test.ts.tmpl +25 -0
- package/templates/plugins/solver-type-plugin/tsconfig.json.tmpl +11 -0
- package/dist/dashboard/assets/index-BjtltOGc.js +0 -76
- package/dist/harnesses/impls/claude-code-learner/adapters/claude-code.js.map +0 -1
- package/dist/harnesses/impls/claude-code-learner/adapters/codex-code.js.map +0 -1
- package/dist/harnesses/impls/claude-code-learner/adapters/codex-workspace.js.map +0 -1
- package/dist/harnesses/impls/claude-code-learner/harness.d.ts +0 -22
- package/dist/harnesses/impls/claude-code-learner/harness.js +0 -62
- package/dist/harnesses/impls/claude-code-learner/harness.js.map +0 -1
- package/dist/harnesses/impls/claude-code-learner/harvest.js.map +0 -1
- package/dist/harnesses/impls/claude-code-learner/index.js.map +0 -1
- package/dist/harnesses/impls/claude-code-learner/plugin-path.js.map +0 -1
- package/dist/harnesses/impls/claude-code-learner/restoration-patch.js.map +0 -1
- package/dist/harnesses/impls/claude-code-learner/test-utils/fake-plugin-outputs.js.map +0 -1
- package/dist/harnesses/impls/claude-code-learner/test-utils/noop-adapter.js.map +0 -1
- package/dist/harnesses/impls/claude-code-learner/types.js.map +0 -1
- package/dist/preflight/claude-required.d.ts +0 -8
- package/dist/preflight/claude-required.js +0 -17
- package/dist/preflight/claude-required.js.map +0 -1
- /package/dist/harnesses/impls/{claude-code-learner → learner}/adapters/claude-code.d.ts +0 -0
- /package/dist/harnesses/impls/{claude-code-learner → learner}/adapters/claude-code.js +0 -0
- /package/dist/harnesses/impls/{claude-code-learner → learner}/adapters/codex-code.d.ts +0 -0
- /package/dist/harnesses/impls/{claude-code-learner → learner}/adapters/codex-workspace.d.ts +0 -0
- /package/dist/harnesses/impls/{claude-code-learner → learner}/adapters/codex-workspace.js +0 -0
- /package/dist/harnesses/impls/{claude-code-learner → learner}/harvest.d.ts +0 -0
- /package/dist/harnesses/impls/{claude-code-learner → learner}/restoration-patch.d.ts +0 -0
- /package/dist/harnesses/impls/{claude-code-learner → learner}/test-utils/fake-plugin-outputs.d.ts +0 -0
- /package/dist/harnesses/impls/{claude-code-learner → learner}/test-utils/fake-plugin-outputs.js +0 -0
- /package/dist/harnesses/impls/{claude-code-learner → learner}/test-utils/noop-adapter.d.ts +0 -0
- /package/dist/harnesses/impls/{claude-code-learner → learner}/test-utils/noop-adapter.js +0 -0
- /package/dist/harnesses/impls/{claude-code-learner → learner}/types.js +0 -0
- /package/plugins/{claude-code-learner → learner}/.claude-plugin/plugin.json +0 -0
- /package/plugins/{claude-code-learner → learner}/.codex-plugin/plugin.json +0 -0
- /package/plugins/{claude-code-learner → learner}/AGENTS.md +0 -0
- /package/plugins/{claude-code-learner → learner}/CLAUDE.md +0 -0
- /package/plugins/{claude-code-learner → learner}/README.md +0 -0
- /package/plugins/{claude-code-learner → learner}/hooks/hooks.json +0 -0
- /package/plugins/{claude-code-learner → learner}/hooks/session-start +0 -0
- /package/plugins/{claude-code-learner → learner}/skills/learn/SKILL.md +0 -0
- /package/plugins/{claude-code-learner → learner}/skills/learn/analyst-prompt.md +0 -0
- /package/plugins/{claude-code-learner → learner}/skills/learn/consolidator-prompt.md +0 -0
- /package/plugins/{claude-code-learner → learner}/skills/learn/explorer-prompt.md +0 -0
- /package/plugins/{claude-code-learner → learner}/skills/learn/planner-prompt.md +0 -0
- /package/plugins/{claude-code-learner → learner}/skills/learn/promoter-prompt.md +0 -0
- /package/plugins/{claude-code-learner → learner}/skills/learn/step-worker-prompt.md +0 -0
- /package/plugins/{claude-code-learner → learner}/skills/learn/strategist-prompt.md +0 -0
package/dist/x402/handler.js
CHANGED
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
* The route is keyed by sha256, matching the artifact identifier in the signed
|
|
11
11
|
* envelope (post jinn-mono-vy37.1.2 — artifacts no longer have IPFS CIDs).
|
|
12
12
|
*/
|
|
13
|
+
import { x402ResourceServer } from '@x402/core/server';
|
|
14
|
+
import { decodePaymentSignatureHeader, encodePaymentRequiredHeader, encodePaymentResponseHeader } from '@x402/core/http';
|
|
15
|
+
import { registerExactEvmScheme as registerExactEvmServerScheme } from '@x402/evm/exact/server';
|
|
13
16
|
import { createLocalFacilitatorClient } from './facilitator.js';
|
|
14
17
|
function dollarStringFromUsdc(usdc) {
|
|
15
18
|
// X402 'exact' scheme expects a string like '$0.001' for USDC amounts.
|
|
@@ -43,7 +46,9 @@ function stringFromRecord(value, keys) {
|
|
|
43
46
|
return typeof current === 'string' && current.length > 0 ? current : null;
|
|
44
47
|
}
|
|
45
48
|
function payerFromPayload(payload) {
|
|
46
|
-
return (stringFromRecord(payload, ['
|
|
49
|
+
return (stringFromRecord(payload, ['authorization', 'from'])
|
|
50
|
+
?? stringFromRecord(payload, ['permit2Authorization', 'owner'])
|
|
51
|
+
?? stringFromRecord(payload, ['payload', 'authorization', 'from'])
|
|
47
52
|
?? stringFromRecord(payload, ['payload', 'permit2Authorization', 'owner'])
|
|
48
53
|
?? stringFromRecord(payload, ['payer']));
|
|
49
54
|
}
|
|
@@ -67,7 +72,36 @@ export function addX402Routes(app, store, config) {
|
|
|
67
72
|
network: config.network,
|
|
68
73
|
rpcUrl: config.rpcUrl,
|
|
69
74
|
});
|
|
75
|
+
const resourceServer = new x402ResourceServer(facilitator);
|
|
70
76
|
const network = (config.network ?? 'eip155:8453');
|
|
77
|
+
registerExactEvmServerScheme(resourceServer, { networks: [network] });
|
|
78
|
+
const resourceServerReady = resourceServer.initialize();
|
|
79
|
+
async function paymentRequiredFor(c, sha256, priceUsdc) {
|
|
80
|
+
await resourceServerReady;
|
|
81
|
+
const requirements = await resourceServer.buildPaymentRequirements({
|
|
82
|
+
scheme: 'exact',
|
|
83
|
+
payTo: config.recipientAddress,
|
|
84
|
+
price: dollarStringFromUsdc(priceUsdc),
|
|
85
|
+
network,
|
|
86
|
+
maxTimeoutSeconds: 300,
|
|
87
|
+
});
|
|
88
|
+
const response = await resourceServer.createPaymentRequiredResponse(requirements, {
|
|
89
|
+
url: c.req.url,
|
|
90
|
+
description: `artifact ${sha256.slice(0, 12)}`,
|
|
91
|
+
mimeType: 'application/octet-stream',
|
|
92
|
+
}, 'Payment required');
|
|
93
|
+
return { requirements, response };
|
|
94
|
+
}
|
|
95
|
+
function paymentRequiredResponse(response) {
|
|
96
|
+
return new Response(JSON.stringify(response), {
|
|
97
|
+
status: 402,
|
|
98
|
+
headers: {
|
|
99
|
+
'Content-Type': 'application/json',
|
|
100
|
+
'PAYMENT-REQUIRED': encodePaymentRequiredHeader(response),
|
|
101
|
+
'Access-Control-Expose-Headers': 'PAYMENT-REQUIRED,X-PAYMENT-RESPONSE',
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
}
|
|
71
105
|
app.get('/v1/artifacts/:sha256/content', async (c) => {
|
|
72
106
|
const sha256 = c.req.param('sha256');
|
|
73
107
|
if (!sha256)
|
|
@@ -99,16 +133,10 @@ export function addX402Routes(app, store, config) {
|
|
|
99
133
|
c.header('X-Artifact-Type', row.artifactType ?? '');
|
|
100
134
|
return c.body(new Uint8Array(row.content));
|
|
101
135
|
}
|
|
102
|
-
// Paid path
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
price: dollarStringFromUsdc(row.priceUsdc),
|
|
107
|
-
network,
|
|
108
|
-
description: `artifact ${sha256.slice(0, 12)}…`,
|
|
109
|
-
}];
|
|
110
|
-
const xPayment = c.req.header('X-Payment');
|
|
111
|
-
if (!xPayment) {
|
|
136
|
+
// Paid path.
|
|
137
|
+
const { requirements, response: paymentRequired } = await paymentRequiredFor(c, sha256, row.priceUsdc);
|
|
138
|
+
const paymentSignature = c.req.header('PAYMENT-SIGNATURE') ?? c.req.header('X-Payment');
|
|
139
|
+
if (!paymentSignature) {
|
|
112
140
|
safeRecordAccess(store, {
|
|
113
141
|
sha256,
|
|
114
142
|
artifactType: row.artifactType,
|
|
@@ -118,12 +146,12 @@ export function addX402Routes(app, store, config) {
|
|
|
118
146
|
createdAt: new Date().toISOString(),
|
|
119
147
|
...requestMeta(c),
|
|
120
148
|
});
|
|
121
|
-
return
|
|
149
|
+
return paymentRequiredResponse(paymentRequired);
|
|
122
150
|
}
|
|
123
151
|
let decoded;
|
|
124
152
|
try {
|
|
125
|
-
decoded =
|
|
126
|
-
const requirement =
|
|
153
|
+
decoded = decodePaymentSignatureHeader(paymentSignature);
|
|
154
|
+
const requirement = resourceServer.findMatchingRequirements(requirements, decoded);
|
|
127
155
|
if (!requirement) {
|
|
128
156
|
safeRecordAccess(store, {
|
|
129
157
|
sha256,
|
|
@@ -136,9 +164,9 @@ export function addX402Routes(app, store, config) {
|
|
|
136
164
|
createdAt: new Date().toISOString(),
|
|
137
165
|
...requestMeta(c),
|
|
138
166
|
});
|
|
139
|
-
return
|
|
167
|
+
return paymentRequiredResponse(paymentRequired);
|
|
140
168
|
}
|
|
141
|
-
const verification = await
|
|
169
|
+
const verification = await resourceServer.verifyPayment(decoded, requirement);
|
|
142
170
|
if (!verification.isValid) {
|
|
143
171
|
const reason = verification.invalidReason ?? 'Payment verification failed';
|
|
144
172
|
safeRecordAccess(store, {
|
|
@@ -152,9 +180,9 @@ export function addX402Routes(app, store, config) {
|
|
|
152
180
|
createdAt: new Date().toISOString(),
|
|
153
181
|
...requestMeta(c),
|
|
154
182
|
});
|
|
155
|
-
return
|
|
183
|
+
return paymentRequiredResponse(paymentRequired);
|
|
156
184
|
}
|
|
157
|
-
const settlement = await
|
|
185
|
+
const settlement = await resourceServer.settlePayment(decoded, requirement);
|
|
158
186
|
if (!settlement.success) {
|
|
159
187
|
const reason = settlement.errorReason ?? 'Settlement failed';
|
|
160
188
|
safeRecordAccess(store, {
|
|
@@ -169,7 +197,7 @@ export function addX402Routes(app, store, config) {
|
|
|
169
197
|
createdAt: new Date().toISOString(),
|
|
170
198
|
...requestMeta(c),
|
|
171
199
|
});
|
|
172
|
-
return
|
|
200
|
+
return paymentRequiredResponse(paymentRequired);
|
|
173
201
|
}
|
|
174
202
|
safeRecordAccess(store, {
|
|
175
203
|
sha256,
|
|
@@ -182,6 +210,9 @@ export function addX402Routes(app, store, config) {
|
|
|
182
210
|
createdAt: new Date().toISOString(),
|
|
183
211
|
...requestMeta(c),
|
|
184
212
|
});
|
|
213
|
+
const paymentResponse = encodePaymentResponseHeader(settlement);
|
|
214
|
+
c.header('PAYMENT-RESPONSE', paymentResponse);
|
|
215
|
+
c.header('X-PAYMENT-RESPONSE', paymentResponse);
|
|
185
216
|
}
|
|
186
217
|
catch (err) {
|
|
187
218
|
const msg = err instanceof Error ? err.message : String(err);
|
|
@@ -195,7 +226,7 @@ export function addX402Routes(app, store, config) {
|
|
|
195
226
|
createdAt: new Date().toISOString(),
|
|
196
227
|
...requestMeta(c),
|
|
197
228
|
});
|
|
198
|
-
return
|
|
229
|
+
return paymentRequiredResponse(paymentRequired);
|
|
199
230
|
}
|
|
200
231
|
c.header('Content-Type', mimeForArtifactType(row.artifactType));
|
|
201
232
|
c.header('X-Artifact-Type', row.artifactType ?? '');
|
package/dist/x402/handler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../src/x402/handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAehE,SAAS,oBAAoB,CAAC,IAAY;IACxC,uEAAuE;IACvE,OAAO,IAAI,IAAI,EAAE,CAAC;AACpB,CAAC;AAED,SAAS,mBAAmB,CAAC,YAAgC;IAC3D,IAAI,CAAC,YAAY;QAAE,OAAO,0BAA0B,CAAC;IACrD,MAAM,CAAC,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC;IACrC,IAAI,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,eAAe,CAAC;IACxE,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,OAAO,kBAAkB,CAAC;IACrE,OAAO,0BAA0B,CAAC;AACpC,CAAC;AAED,SAAS,WAAW,CAAC,CAAU;IAC7B,OAAO;QACL,UAAU,EACR,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,i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B,CAAC,KAAK,EAAE;gBACtB,MAAM;gBACN,YAAY,EAAE,GAAG,CAAC,YAAY;gBAC9B,SAAS,EAAE,GAAG,CAAC,SAAS;gBACxB,OAAO,EAAE,mBAAmD;gBAC5D,UAAU,EAAE,GAAG;gBACf,WAAW,EAAE,GAAG;gBAChB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACnC,GAAG,WAAW,CAAC,CAAC,CAAC;aAClB,CAAC,CAAC;YACH,OAAO,uBAAuB,CAAC,eAAe,CAAC,CAAC;QAClD,CAAC;QAED,CAAC,CAAC,MAAM,CAAC,cAAc,EAAE,mBAAmB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;QAChE,CAAC,CAAC,MAAM,CAAC,iBAAiB,EAAE,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC;QACpD,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jinn-network/client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6-canary.107ea271",
|
|
4
4
|
"description": "Jinn protocol client — headless daemon for the restoration training loop",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "yarn@4.13.0",
|
|
@@ -24,29 +24,31 @@
|
|
|
24
24
|
"main": "./dist/index.js",
|
|
25
25
|
"types": "./dist/index.d.ts",
|
|
26
26
|
"files": [
|
|
27
|
-
"dist/",
|
|
28
|
-
"deployments/",
|
|
29
|
-
"plugins/",
|
|
30
|
-
"skills/",
|
|
31
|
-
"templates/",
|
|
32
|
-
"docker-compose.yml",
|
|
33
|
-
"CONTRIBUTING.md",
|
|
34
|
-
"CHANGELOG.md",
|
|
35
|
-
"README.md",
|
|
36
|
-
"LICENSE"
|
|
27
|
+
"/dist/",
|
|
28
|
+
"/deployments/",
|
|
29
|
+
"/plugins/",
|
|
30
|
+
"/skills/",
|
|
31
|
+
"/templates/",
|
|
32
|
+
"/docker-compose.yml",
|
|
33
|
+
"/CONTRIBUTING.md",
|
|
34
|
+
"/CHANGELOG.md",
|
|
35
|
+
"/README.md",
|
|
36
|
+
"/LICENSE"
|
|
37
37
|
],
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"postinstall": "node dist/scripts/fix-node-pty.mjs 2>/dev/null || node scripts/fix-node-pty.mjs 2>/dev/null || true",
|
|
43
|
-
"e2e:
|
|
43
|
+
"e2e:cold-start-builder": "vitest run --config vitest.acceptance.config.ts",
|
|
44
|
+
"e2e:full-cycle": "tsx test/e2e/learner-full-cycle.ts",
|
|
44
45
|
"jinn": "tsx src/bin/jinn.ts",
|
|
45
46
|
"dev": "yarn build && node dist/bin/jinn.js",
|
|
46
47
|
"build:sdk": "yarn --cwd ../packages/sdk install --immutable && yarn --cwd ../packages/sdk build",
|
|
47
|
-
"build": "yarn build:sdk && yarn build:spa && tsc && chmod +x dist/bin/jinn.js && rm -rf dist/dashboard && mkdir -p dist/dashboard && cp -R src/dashboard/spa/dist/. dist/dashboard/ && rm -rf dist/templates && cp -R templates dist/templates && mkdir -p dist/scripts && cp scripts/fix-node-pty.mjs dist/scripts/ && node scripts/vendor-sdk.mjs && node scripts/write-dist-build-meta.mjs",
|
|
48
|
+
"build": "yarn build:sdk && yarn build:spa && tsc && chmod +x dist/bin/jinn.js && rm -rf dist/dashboard && mkdir -p dist/dashboard && cp -R src/dashboard/spa/dist/. dist/dashboard/ && rm -rf dist/templates && cp -R templates dist/templates && mkdir -p dist/scripts && cp scripts/fix-node-pty.mjs scripts/swe-rebench-v2-seed-pool.json scripts/swe-rebench-v2-known-bad.json dist/scripts/ && node scripts/vendor-sdk.mjs && node scripts/write-dist-build-meta.mjs",
|
|
48
49
|
"typecheck": "yarn build:sdk && tsc --noEmit",
|
|
49
50
|
"test": "yarn build:sdk && vitest run",
|
|
51
|
+
"lint:no-late-mount": "node scripts/check-no-late-route-mount.mjs",
|
|
50
52
|
"test:watch": "vitest",
|
|
51
53
|
"test:claude-prediction": "yarn build && JINN_TEST_CLAUDE_PREDICTION=1 vitest run test/harnesses/impls/claude-mcp-prediction/isolation.test.ts",
|
|
52
54
|
"test:claude-prediction-apy": "yarn build && JINN_TEST_CLAUDE_PREDICTION_APY=1 vitest run test/harnesses/impls/claude-mcp-prediction-apy/isolation.test.ts",
|
|
@@ -56,6 +58,17 @@
|
|
|
56
58
|
"pack:smoke": "node scripts/smoke-test-pack.mjs",
|
|
57
59
|
"release:client": "node scripts/release-client.mjs",
|
|
58
60
|
"release:operator-gate": "yarn staking && yarn e2e",
|
|
61
|
+
"release:tier-1": "tsx scripts/release/run-tier-1.ts",
|
|
62
|
+
"release:tier-1:T1.1": "vitest run --config vitest.release-tier-1.config.ts test/release/tier-1/T1.1-bootstrap-fresh-anvil.test.ts",
|
|
63
|
+
"release:tier-1:T1.2": "vitest run --config vitest.release-tier-1.config.ts test/release/tier-1/T1.2-harness-readiness-contract.test.ts",
|
|
64
|
+
"release:tier-1:T1.3": "vitest run test/release/tier-1/T1.3-indexer-round-trip.test.ts",
|
|
65
|
+
"release:tier-1:T1.4": "playwright test --config=playwright.config.ts test/dashboard/release-prep/spa-route-smoke.e2e.test.ts",
|
|
66
|
+
"release:tier-2": "tsx scripts/release/run-tier-2.ts",
|
|
67
|
+
"release:tier-2:T2.1": "vitest run test/release/tier-2/T2.1-cross-op-donation.test.ts",
|
|
68
|
+
"release:tier-2:T2.2": "vitest run test/release/tier-2/T2.2-producer-evaluator.test.ts",
|
|
69
|
+
"release:tier-2:T2.3": "playwright test --config=playwright.config.ts test/dashboard/multi-op/launcher-join-flow.e2e.test.ts",
|
|
70
|
+
"release:tier-3": "tsx scripts/release/run-tier-3.ts",
|
|
71
|
+
"release:tier-3:T3.1": "JINN_T31_REAL=1 vitest run test/release/tier-3/T3.1-producer-evaluator-real.test.ts",
|
|
59
72
|
"release:donation-consumption": "node dist/scripts/donation-consumption-acceptance.js",
|
|
60
73
|
"setup:testnet-acceptance-operator": "node scripts/setup-testnet-acceptance-operator-docker.mjs",
|
|
61
74
|
"setup:testnet-acceptance-operator:docker": "node scripts/setup-testnet-acceptance-operator-docker.mjs",
|
|
@@ -64,21 +77,32 @@
|
|
|
64
77
|
"release:testnet-acceptance:docker": "node scripts/testnet-acceptance-docker.mjs",
|
|
65
78
|
"release:testnet-acceptance:host": "node scripts/testnet-acceptance.mjs",
|
|
66
79
|
"status": "tsx scripts/status.ts",
|
|
80
|
+
"cleanup:engine-work": "tsx scripts/cleanup-engine-work.ts",
|
|
67
81
|
"e2e": "tsx test/e2e/validate.ts",
|
|
68
82
|
"e2e:task-first-local": "tsx test/e2e/task-first-local.ts",
|
|
69
83
|
"e2e:claude-code-learner": "tsx test/e2e/claude-code-learner-portfolio-v0.ts",
|
|
70
84
|
"e2e:prediction": "tsx test/e2e/prediction-v1.ts",
|
|
85
|
+
"e2e:corpus": "yarn build:sdk && tsx test/e2e/corpus-x402.ts",
|
|
71
86
|
"e2e:freeze-mode": "tsx test/e2e/freeze-mode.test.ts",
|
|
72
87
|
"e2e:checkpoint-flow": "tsx test/e2e/checkpoint-flow.test.ts",
|
|
73
88
|
"e2e:swe-rebench-v2": "tsx test/e2e/swe-rebench-v2.test.ts",
|
|
89
|
+
"e2e:hermes": "tsx test/e2e/hermes-agent-full-cycle.ts",
|
|
90
|
+
"e2e:daemon-harness": "tsx test/e2e/daemon-harness-cycle.ts",
|
|
74
91
|
"e2e:capture": "tsx scripts/e2e-capture-validate.ts",
|
|
75
92
|
"staking": "tsx test/e2e/staking.ts",
|
|
76
93
|
"stolas": "tsx test/e2e/stolas.ts",
|
|
94
|
+
"substrate:adopt": "tsx scripts/release/substrate-adopt.ts",
|
|
95
|
+
"substrate:copy": "tsx scripts/release/substrate-copy.ts",
|
|
96
|
+
"substrate:reap": "tsx scripts/release/substrate-reap.ts",
|
|
97
|
+
"substrate:topup": "tsx scripts/release/substrate-topup.ts",
|
|
98
|
+
"substrate:verify": "tsx scripts/release/substrate-verify.ts",
|
|
77
99
|
"withdraw": "tsx scripts/withdraw.ts",
|
|
78
100
|
"build:spa": "yarn workspace @jinn-network/operator-spa build",
|
|
79
101
|
"dev:spa": "yarn workspace @jinn-network/operator-spa dev",
|
|
80
102
|
"e2e:spa": "yarn build && playwright test --config=playwright.config.ts test/dashboard/spa.e2e.test.ts",
|
|
81
103
|
"e2e:solvernet-flow": "yarn build && playwright test --config=playwright.config.ts test/dashboard/solvernet-flow.e2e.test.ts",
|
|
104
|
+
"e2e:funding-sequence": "yarn build && playwright test --config=playwright.config.ts test/dashboard/funding-sequence.e2e.test.ts",
|
|
105
|
+
"e2e:dashboard": "yarn build && playwright test --config=playwright.config.ts",
|
|
82
106
|
"e2e:donation": "vitest run test/smoke/donation-mode-smoke.test.ts test/smoke/donation-ipfs-http-smoke.test.ts"
|
|
83
107
|
},
|
|
84
108
|
"dependencies": {
|
|
@@ -118,6 +142,7 @@
|
|
|
118
142
|
"semver": "^7.7.4",
|
|
119
143
|
"viem": "^2.0.0",
|
|
120
144
|
"ws": "^8.20.0",
|
|
145
|
+
"yaml": "^2.8.4",
|
|
121
146
|
"zod": "^3.22.0"
|
|
122
147
|
},
|
|
123
148
|
"optionalDependencies": {
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# swe-rebench-v2-diffmin
|
|
2
|
+
|
|
3
|
+
Minimal-diff discipline and PASS\_TO\_PASS test-mapping skills for the
|
|
4
|
+
`swe-rebench-v2.v1` SolverNet. This plugin competes on a different vertical
|
|
5
|
+
than `swe-rebench-v2-runtime`: where the runtime plugin teaches the solver to
|
|
6
|
+
orient and plan, this plugin constrains how the solver patches — keeping diffs
|
|
7
|
+
small, renames absent, and PASS\_TO\_PASS coverage explicit before the first
|
|
8
|
+
line of code is written.
|
|
9
|
+
|
|
10
|
+
## What the skills do
|
|
11
|
+
|
|
12
|
+
- **`swe-rebench-v2-diffmin`** — Minimal-diff discipline. Heuristics: single-hunk
|
|
13
|
+
preference, single-file preference, no-rename rule, function-scope
|
|
14
|
+
containment, dead-code-deletion last resort. Includes a worked
|
|
15
|
+
`unidata/netcdf-c-1925` example. Uses the bundled `diff_stats` MCP tool
|
|
16
|
+
(`mcp__diff-stats__diff_stats`) to validate hunk count, file count, and
|
|
17
|
+
rename absence before submitting.
|
|
18
|
+
|
|
19
|
+
- **`swe-rebench-v2-test-map`** — PASS\_TO\_PASS test mapping. Greps test names
|
|
20
|
+
to source files, computes test-to-source coverage ratios, pre-loads the call
|
|
21
|
+
graph for the function under fix. Produces an edit-constraint list before
|
|
22
|
+
the Execute phase begins.
|
|
23
|
+
|
|
24
|
+
Both skills reference real SWE-rebench v2 mechanics (`FAIL_TO_PASS`,
|
|
25
|
+
`PASS_TO_PASS`, `base_commit`, `instance_id`, `goal.spec`). They read like a
|
|
26
|
+
Hermes-migrator can use them on day 1.
|
|
27
|
+
|
|
28
|
+
## Already shipping a Hermes skill?
|
|
29
|
+
|
|
30
|
+
Drop it under `skills/<name>/SKILL.md`, add a `jinn.plugin.json` like this
|
|
31
|
+
one, `yarn pack`, `jinn solver-plugins publish`. Your existing skill becomes
|
|
32
|
+
discoverable and attributable on the SolverNet — no other changes required.
|
|
33
|
+
|
|
34
|
+
## Stacking with swe-rebench-v2-runtime
|
|
35
|
+
|
|
36
|
+
The two plugins are designed to stack. An operator loads both and the solver
|
|
37
|
+
gets the full set of skills:
|
|
38
|
+
|
|
39
|
+
| Plugin | Skills |
|
|
40
|
+
|--------|--------|
|
|
41
|
+
| `swe-rebench-v2-runtime` | `supports: ["swe-rebench-v2.v1"]` — orient, plan |
|
|
42
|
+
| `swe-rebench-v2-diffmin` | `supports: ["swe-rebench-v2.v1"]` — diffmin, test-map |
|
|
43
|
+
|
|
44
|
+
The harness loads skills from all plugins that declare `swe-rebench-v2.v1`
|
|
45
|
+
support. Adding this plugin alongside the runtime plugin gives the solver four
|
|
46
|
+
complementary skills for a single task: orient → plan → test-map → diffmin.
|
|
47
|
+
|
|
48
|
+
## Bundled MCP tool: diff_stats
|
|
49
|
+
|
|
50
|
+
The `.mcp.json` in this package declares one MCP server, `diff-stats`, with one
|
|
51
|
+
tool `diff_stats(patch: string)`. It parses a unified diff and returns:
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"hunks": 1,
|
|
56
|
+
"filesTouched": 1,
|
|
57
|
+
"addedLines": 3,
|
|
58
|
+
"removedLines": 2,
|
|
59
|
+
"hasRenames": false
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The diffmin skill calls this tool before submitting. The server is a ~50-line
|
|
64
|
+
pure Node.js script with no runtime dependencies — it starts in under 50 ms
|
|
65
|
+
and does not touch the network.
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
MIT.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "swe-rebench-v2-diffmin",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"jinn": {
|
|
5
|
+
"supports": ["swe-rebench-v2.v1"],
|
|
6
|
+
"skills": [
|
|
7
|
+
"skills/diffmin/SKILL.md",
|
|
8
|
+
"skills/test-map/SKILL.md"
|
|
9
|
+
],
|
|
10
|
+
"description": "Minimal-diff discipline + PASS_TO_PASS test-mapping skills for swe-rebench-v2.v1. Complementary to swe-rebench-v2-runtime's orient/plan skills; the two stack."
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* diff-stats MCP server — exposes one tool, diff_stats(patch: string),
|
|
4
|
+
* that parses a unified diff and returns hunk/line/file/rename statistics.
|
|
5
|
+
*
|
|
6
|
+
* Designed to be invoked as a stdio MCP server by Claude Code or any other
|
|
7
|
+
* MCP-compatible host. No runtime dependencies beyond @modelcontextprotocol/sdk
|
|
8
|
+
* (already present in @jinn-network/client's node_modules).
|
|
9
|
+
*/
|
|
10
|
+
import { pathToFileURL } from 'node:url';
|
|
11
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
12
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
13
|
+
import { z } from 'zod';
|
|
14
|
+
import { computeDiffStats } from './diff-stats.mjs';
|
|
15
|
+
|
|
16
|
+
const DiffArgsShape = {
|
|
17
|
+
patch: z.string().min(1).describe(
|
|
18
|
+
'A unified diff string (git-format or standard format). ' +
|
|
19
|
+
'Pass the complete diff including --- and +++ headers and @@ hunk markers.',
|
|
20
|
+
),
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
function ok(data) {
|
|
24
|
+
return {
|
|
25
|
+
content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function toolErr(code, message) {
|
|
30
|
+
return {
|
|
31
|
+
content: [{ type: 'text', text: JSON.stringify({ error: true, code, message }) }],
|
|
32
|
+
isError: true,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function createDiffStatsServer() {
|
|
37
|
+
const server = new McpServer({ name: 'diff-stats', version: '0.1.0' });
|
|
38
|
+
|
|
39
|
+
server.tool(
|
|
40
|
+
'diff_stats',
|
|
41
|
+
'Parse a unified diff and return statistics: hunks, filesTouched, addedLines, removedLines, hasRenames. ' +
|
|
42
|
+
'Call this before submitting a patch to verify it meets minimal-diff discipline (hunks <= 3, filesTouched <= 2, hasRenames === false).',
|
|
43
|
+
DiffArgsShape,
|
|
44
|
+
async (args) => {
|
|
45
|
+
try {
|
|
46
|
+
const stats = computeDiffStats(args.patch);
|
|
47
|
+
return ok(stats);
|
|
48
|
+
} catch (err) {
|
|
49
|
+
return toolErr('DIFF_PARSE_FAILED', err instanceof Error ? err.message : String(err));
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
return server;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export async function startMcpServer() {
|
|
58
|
+
const server = createDiffStatsServer();
|
|
59
|
+
const transport = new StdioServerTransport();
|
|
60
|
+
await server.connect(transport);
|
|
61
|
+
await new Promise((resolve) => {
|
|
62
|
+
process.stdin.on('close', resolve);
|
|
63
|
+
process.stdin.on('end', resolve);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
68
|
+
startMcpServer().catch((err) => {
|
|
69
|
+
console.error(err instanceof Error ? err.stack ?? err.message : String(err));
|
|
70
|
+
process.exit(1);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* diff-stats library — parse a unified diff into per-file statistics.
|
|
3
|
+
*
|
|
4
|
+
* Pure function, no dependencies. Usable directly in tests and by the
|
|
5
|
+
* diff-stats-server.mjs MCP server.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {{ hunks: number; filesTouched: number; addedLines: number; removedLines: number; hasRenames: boolean }} DiffStats
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Parse a unified diff string and return statistics.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} patch - A unified diff string (git-format or standard format).
|
|
16
|
+
* @returns {DiffStats}
|
|
17
|
+
* @throws {Error} if patch is empty.
|
|
18
|
+
*/
|
|
19
|
+
export function computeDiffStats(patch) {
|
|
20
|
+
if (typeof patch !== 'string' || patch.trim().length === 0) {
|
|
21
|
+
throw new Error('empty patch — pass a unified diff string');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const lines = patch.split('\n');
|
|
25
|
+
let hunks = 0;
|
|
26
|
+
let addedLines = 0;
|
|
27
|
+
let removedLines = 0;
|
|
28
|
+
let hasRenames = false;
|
|
29
|
+
const files = new Set();
|
|
30
|
+
|
|
31
|
+
for (const line of lines) {
|
|
32
|
+
if (line.startsWith('@@ ')) {
|
|
33
|
+
hunks++;
|
|
34
|
+
} else if (line.startsWith('+++') && !line.startsWith('+++ /dev/null')) {
|
|
35
|
+
// Match both `+++ b/path` (git format) and `+++ path` (standard format)
|
|
36
|
+
const m = /^\+{3}\s+(?:b\/)?(.+)$/.exec(line);
|
|
37
|
+
if (m) files.add(m[1].trim());
|
|
38
|
+
} else if (line.startsWith('rename from ') || line.startsWith('rename to ')) {
|
|
39
|
+
hasRenames = true;
|
|
40
|
+
} else if (line.startsWith('+') && !line.startsWith('+++')) {
|
|
41
|
+
addedLines++;
|
|
42
|
+
} else if (line.startsWith('-') && !line.startsWith('---')) {
|
|
43
|
+
removedLines++;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return { hunks, filesTouched: files.size, addedLines, removedLines, hasRenames };
|
|
48
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "swe-rebench-v2-diffmin",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": true,
|
|
6
|
+
"description": "Reference competing plug-in for swe-rebench-v2.v1 — minimal-diff + test-mapping angle.",
|
|
7
|
+
"files": [
|
|
8
|
+
"jinn.plugin.json",
|
|
9
|
+
".claude-plugin/",
|
|
10
|
+
".mcp.json",
|
|
11
|
+
"skills/",
|
|
12
|
+
"mcp/",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "vitest run"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT"
|
|
19
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: swe-rebench-v2-diffmin
|
|
3
|
+
description: Bias the patch toward the smallest change that flips FAIL_TO_PASS without disturbing PASS_TO_PASS. Use diff_stats to validate hunk count, file count, and rename absence before submitting.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Minimal-diff discipline for SWE-rebench v2
|
|
7
|
+
|
|
8
|
+
This skill keeps your patch as small as possible. Smaller diffs are easier to
|
|
9
|
+
verify, less likely to introduce regressions, and align with how maintainers
|
|
10
|
+
actually ship fixes. Apply it after the Orient phase has identified the root
|
|
11
|
+
cause and before writing the patch in the Execute phase.
|
|
12
|
+
|
|
13
|
+
## Core heuristics
|
|
14
|
+
|
|
15
|
+
### 1. Single-hunk preference
|
|
16
|
+
|
|
17
|
+
Prefer a patch that touches one contiguous code block in one file. A single
|
|
18
|
+
hunk means the diff is self-contained: reviewers can read it in isolation and
|
|
19
|
+
test runners can bisect it easily. If you find yourself adding a second hunk,
|
|
20
|
+
stop and ask whether the second change is strictly required to flip
|
|
21
|
+
`FAIL_TO_PASS`. Often the first hunk is the fix; the second hunk is cleanup
|
|
22
|
+
that can be deferred.
|
|
23
|
+
|
|
24
|
+
### 2. Single-file preference
|
|
25
|
+
|
|
26
|
+
When the root cause is clearly in one file, do not touch other files to make
|
|
27
|
+
tests pass. Fixes that spread across files indicate either (a) the root cause
|
|
28
|
+
analysis was incomplete, or (b) a larger refactor is being smuggled in. Neither
|
|
29
|
+
belongs in a minimal-diff submission.
|
|
30
|
+
|
|
31
|
+
If two files genuinely must change (e.g. a struct definition and one call
|
|
32
|
+
site), verify that both changes are causally required: remove one and confirm
|
|
33
|
+
that `FAIL_TO_PASS` fails again.
|
|
34
|
+
|
|
35
|
+
### 3. No-rename rule
|
|
36
|
+
|
|
37
|
+
Never rename functions, variables, or files to fix a bug. Renames change every
|
|
38
|
+
call site and inflate the diff with changes that are semantically neutral to
|
|
39
|
+
the failing test but risky for `PASS_TO_PASS` tests. If you feel a rename
|
|
40
|
+
would help, file a note in the solution cost field and ship the fix without the
|
|
41
|
+
rename.
|
|
42
|
+
|
|
43
|
+
### 4. Function-scope containment
|
|
44
|
+
|
|
45
|
+
Limit edits to the function or method that the failing test exercises. Check
|
|
46
|
+
the call graph: if the test calls `parse_netcdf_header()`, your change should
|
|
47
|
+
live inside `parse_netcdf_header()` or a helper it directly calls — not in a
|
|
48
|
+
shared utility ten layers up that happens to also be called by unrelated code.
|
|
49
|
+
|
|
50
|
+
### 5. Dead-code deletion last resort
|
|
51
|
+
|
|
52
|
+
Deleting dead code (unreachable branches, commented-out blocks) is tempting
|
|
53
|
+
but risky: it inflates the diff with changes unrelated to `FAIL_TO_PASS` and
|
|
54
|
+
can break `PASS_TO_PASS` if the "dead" code was actually reachable in some
|
|
55
|
+
path. Delete dead code only when it is the direct cause of the failing test
|
|
56
|
+
(e.g. an always-false guard that prevents a required code path from running).
|
|
57
|
+
|
|
58
|
+
## Using the diff_stats MCP tool
|
|
59
|
+
|
|
60
|
+
Before submitting, call `mcp__diff-stats__diff_stats` with your complete
|
|
61
|
+
unified diff string. The tool returns:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"hunks": 1,
|
|
66
|
+
"filesTouched": 1,
|
|
67
|
+
"addedLines": 3,
|
|
68
|
+
"removedLines": 2,
|
|
69
|
+
"hasRenames": false
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Reject and revise your patch if:
|
|
74
|
+
- `hunks > 3` — almost always indicates scope creep
|
|
75
|
+
- `filesTouched > 2` — consider whether both files are causally required
|
|
76
|
+
- `hasRenames === true` — strip the rename and fix in place
|
|
77
|
+
- `addedLines + removedLines > 50` — verify against single-hunk and single-file rules
|
|
78
|
+
|
|
79
|
+
Accept the patch if all checks pass and `FAIL_TO_PASS` flips while
|
|
80
|
+
`PASS_TO_PASS` stays green.
|
|
81
|
+
|
|
82
|
+
## Worked example: unidata/netcdf-c-1925
|
|
83
|
+
|
|
84
|
+
**Instance:** `unidata__netcdf-c-1925`
|
|
85
|
+
**Problem:** `nc_get_var_string()` returns garbage when the variable has a
|
|
86
|
+
fill value because `NC_EEMPTY` was tested with `!=` instead of `==`.
|
|
87
|
+
|
|
88
|
+
**Bad patch (17 hunks, 3 files, 200 lines):**
|
|
89
|
+
Refactors the fill-value handling layer to share a common helper, moves the
|
|
90
|
+
check into a new function, renames `nc_fill_string` to `nc_fill_str`. Correct
|
|
91
|
+
in intent but violates every heuristic.
|
|
92
|
+
|
|
93
|
+
**Minimal patch (1 hunk, 1 file, 2 lines):**
|
|
94
|
+
```diff
|
|
95
|
+
--- a/libsrc/var.c
|
|
96
|
+
+++ b/libsrc/var.c
|
|
97
|
+
@@ -402,7 +402,7 @@ nc_get_var_string(int ncid, int varid, char **sp)
|
|
98
|
+
- if (stat != NC_EEMPTY) {
|
|
99
|
+
+ if (stat == NC_EEMPTY) {
|
|
100
|
+
```
|
|
101
|
+
`diff_stats` returns `{ hunks: 1, filesTouched: 1, addedLines: 1, removedLines: 1, hasRenames: false }`.
|
|
102
|
+
All checks pass. The `FAIL_TO_PASS` test now sees a proper empty string
|
|
103
|
+
instead of garbage; `PASS_TO_PASS` tests are untouched.
|
|
104
|
+
|
|
105
|
+
## Integration with the Plan skill
|
|
106
|
+
|
|
107
|
+
The `swe-rebench-v2-plan` skill from `swe-rebench-v2-runtime` sketches the
|
|
108
|
+
edit list. Run this diffmin skill after Plan and before submitting:
|
|
109
|
+
|
|
110
|
+
1. Plan produces: "change line 402 in `libsrc/var.c` from `!=` to `==`."
|
|
111
|
+
2. Execute writes the patch.
|
|
112
|
+
3. **This skill validates:** call `mcp__diff-stats__diff_stats` on the patch,
|
|
113
|
+
confirm `hunks: 1, filesTouched: 1, hasRenames: false`.
|
|
114
|
+
4. Submit via `submit_typed_payload` only after validation passes.
|
|
115
|
+
|
|
116
|
+
If validation fails, trim the patch and re-validate before submitting.
|