@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
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: swe-rebench-v2-test-map
|
|
3
|
+
description: Walk PASS_TO_PASS test names to their source files via repo grep, identify the test-to-source ratio, and pre-load the relevant call graph into context before writing the patch.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PASS_TO_PASS test mapping for SWE-rebench v2
|
|
7
|
+
|
|
8
|
+
Before writing a single line of fix code, map the test names you must preserve
|
|
9
|
+
(`PASS_TO_PASS`) to their source files. This gives you an accurate picture of
|
|
10
|
+
the call graph your patch must not disturb, which is the information needed to
|
|
11
|
+
apply minimal-diff discipline correctly.
|
|
12
|
+
|
|
13
|
+
## Why this matters
|
|
14
|
+
|
|
15
|
+
`PASS_TO_PASS` names are the regressions you cannot afford. A patch that fixes
|
|
16
|
+
`FAIL_TO_PASS` but breaks five `PASS_TO_PASS` tests scores zero on the
|
|
17
|
+
`brier-loss.v1` evaluator. The test map shows you exactly which functions,
|
|
18
|
+
structs, and files are exercised by those tests — a constraint that shapes
|
|
19
|
+
where you can safely edit.
|
|
20
|
+
|
|
21
|
+
## Steps
|
|
22
|
+
|
|
23
|
+
### Step 1: Extract PASS_TO_PASS names from the task spec
|
|
24
|
+
|
|
25
|
+
The task body includes `goal.spec.PASS_TO_PASS`, a list of test identifiers
|
|
26
|
+
in the form `<module>::<function>` or `<file>::<class>::<method>`. Example:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
goal.spec.PASS_TO_PASS = [
|
|
30
|
+
"test_nc_get_var_string::test_basic_string_read",
|
|
31
|
+
"test_fill_value::test_default_fill",
|
|
32
|
+
"test_fill_value::test_custom_fill"
|
|
33
|
+
]
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Step 2: Grep test names to source files
|
|
37
|
+
|
|
38
|
+
For each `PASS_TO_PASS` test name, grep the repo for the function or class
|
|
39
|
+
definition. Use the filesystem tools or bash to run:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
grep -r "test_basic_string_read" <repo_root> --include="*.c" --include="*.py" -l
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Build a map: `test name → test file → source file under test`.
|
|
46
|
+
|
|
47
|
+
Identify the source file by reading the test: find the `#include`, `import`,
|
|
48
|
+
or `open()` call that loads the module under test. This is the source file your
|
|
49
|
+
patch may not break.
|
|
50
|
+
|
|
51
|
+
### Step 3: Compute the test-to-source ratio
|
|
52
|
+
|
|
53
|
+
Count the number of `PASS_TO_PASS` test functions that exercise each source
|
|
54
|
+
file. A high ratio (e.g. 8 tests → 1 source file) means the file is heavily
|
|
55
|
+
covered and every edit carries regression risk. A low ratio means fewer hidden
|
|
56
|
+
dependencies.
|
|
57
|
+
|
|
58
|
+
Annotate your edit plan: "source file `libsrc/var.c` is exercised by 3
|
|
59
|
+
PASS_TO_PASS tests; edits must not change the function signature or remove any
|
|
60
|
+
branch reachable from `test_fill_value`."
|
|
61
|
+
|
|
62
|
+
### Step 4: Pre-load the call graph for the affected function
|
|
63
|
+
|
|
64
|
+
Read the function you intend to edit (identified by the Orient skill). Trace:
|
|
65
|
+
- Which sub-functions does it call?
|
|
66
|
+
- Which of those sub-functions appear in the PASS_TO_PASS test map?
|
|
67
|
+
|
|
68
|
+
If a sub-function appears in the test map, your patch must not change its
|
|
69
|
+
behaviour. If it does not appear, it may be safe to touch — confirm with
|
|
70
|
+
step 3's ratio.
|
|
71
|
+
|
|
72
|
+
### Step 5: Write the edit constraint list
|
|
73
|
+
|
|
74
|
+
Output a structured list before starting Execute:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
Edit constraint list:
|
|
78
|
+
- File: libsrc/var.c
|
|
79
|
+
- Function: nc_get_var_string
|
|
80
|
+
- Lines: 400-410
|
|
81
|
+
- PASS_TO_PASS coverage: 3 tests depend on this function
|
|
82
|
+
- Sub-functions NOT to touch: nc_fill_string (covered by test_fill_value::test_default_fill)
|
|
83
|
+
- Safe to change: local variable stat comparison on line 402
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Pass this list to the Plan/Execute phase.
|
|
87
|
+
|
|
88
|
+
## Worked example: org__repo-42 (fictional)
|
|
89
|
+
|
|
90
|
+
**Instance:** `org__repo-42`
|
|
91
|
+
**FAIL_TO_PASS:** `test_parser::test_malformed_json`
|
|
92
|
+
**PASS_TO_PASS:** `test_parser::test_valid_json`, `test_parser::test_empty_object`, `test_roundtrip::test_encode_decode`
|
|
93
|
+
|
|
94
|
+
**Step 1:** Extract names — three tests to preserve.
|
|
95
|
+
|
|
96
|
+
**Step 2:** Grep reveals:
|
|
97
|
+
- `test_valid_json` and `test_empty_object` live in `tests/test_parser.py`, which imports `src/parser.py`.
|
|
98
|
+
- `test_encode_decode` lives in `tests/test_roundtrip.py`, which imports both `src/parser.py` and `src/encoder.py`.
|
|
99
|
+
|
|
100
|
+
**Step 3:** Ratio for `src/parser.py`: 3 tests. Ratio for `src/encoder.py`: 1 test. `src/parser.py` is more risky.
|
|
101
|
+
|
|
102
|
+
**Step 4:** The function to fix is `parse_json()` in `src/parser.py`. It calls `_tokenize()` and `_validate_token()`. `_validate_token()` appears in `test_valid_json` (it is called on valid JSON). Do not change `_validate_token()`; it is covered. `_tokenize()` does not appear — lower risk.
|
|
103
|
+
|
|
104
|
+
**Step 5:** Edit constraint list:
|
|
105
|
+
```
|
|
106
|
+
- File: src/parser.py
|
|
107
|
+
- Function: parse_json
|
|
108
|
+
- PASS_TO_PASS coverage: 3 tests via parse_json + _validate_token
|
|
109
|
+
- Sub-functions NOT to touch: _validate_token (PASS_TO_PASS coverage)
|
|
110
|
+
- Sub-functions safe to touch: _tokenize (no direct PASS_TO_PASS coverage)
|
|
111
|
+
- Preferred: fix on lines 88-92 where malformed JSON triggers early return
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
This constraint list feeds directly into the diffmin skill's heuristics: one
|
|
115
|
+
hunk, one file, no renames, no changes to `_validate_token`.
|
|
116
|
+
|
|
117
|
+
## Integration with the diffmin skill
|
|
118
|
+
|
|
119
|
+
Run this test-map skill in parallel with the Orient skill. By the time Plan
|
|
120
|
+
begins, you should have:
|
|
121
|
+
1. The Orient summary (hypothesis + target function).
|
|
122
|
+
2. The test-map constraint list (which sub-functions are covered by PASS_TO_PASS).
|
|
123
|
+
|
|
124
|
+
Both feed into the Plan phase. After Execute produces the patch, run
|
|
125
|
+
`mcp__diff-stats__diff_stats` via the diffmin skill to confirm the diff
|
|
126
|
+
satisfies the hunk and file count constraints before submitting.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { computeDiffStats } from '../mcp/diff-stats.mjs';
|
|
3
|
+
|
|
4
|
+
const ONE_LINE_FIX = `--- a/src/foo.c
|
|
5
|
+
+++ b/src/foo.c
|
|
6
|
+
@@ -1 +1 @@
|
|
7
|
+
-broken
|
|
8
|
+
+fixed
|
|
9
|
+
`;
|
|
10
|
+
|
|
11
|
+
const MULTI_HUNK_TWO_FILES = `--- a/src/foo.c
|
|
12
|
+
+++ b/src/foo.c
|
|
13
|
+
@@ -1,3 +1,3 @@
|
|
14
|
+
line1
|
|
15
|
+
-bad
|
|
16
|
+
+good
|
|
17
|
+
line3
|
|
18
|
+
@@ -10 +10 @@
|
|
19
|
+
-also bad
|
|
20
|
+
+also good
|
|
21
|
+
--- a/test/test_foo.c
|
|
22
|
+
+++ b/test/test_foo.c
|
|
23
|
+
@@ -5 +5 @@
|
|
24
|
+
-old
|
|
25
|
+
+new
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
const RENAME_PATCH = `diff --git a/src/old.c b/src/new.c
|
|
29
|
+
similarity index 90%
|
|
30
|
+
rename from src/old.c
|
|
31
|
+
rename to src/new.c
|
|
32
|
+
--- a/src/old.c
|
|
33
|
+
+++ b/src/new.c
|
|
34
|
+
@@ -1 +1 @@
|
|
35
|
+
-old
|
|
36
|
+
+new
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
describe('computeDiffStats (r83r diff-stats library)', () => {
|
|
40
|
+
it('returns 1 hunk / 1 file / 1 add / 1 remove for the one-line fix', () => {
|
|
41
|
+
expect(computeDiffStats(ONE_LINE_FIX)).toEqual({
|
|
42
|
+
hunks: 1, filesTouched: 1, addedLines: 1, removedLines: 1, hasRenames: false,
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it('returns 3 hunks / 2 files for the multi-hunk patch', () => {
|
|
47
|
+
const s = computeDiffStats(MULTI_HUNK_TWO_FILES);
|
|
48
|
+
expect(s.hunks).toBe(3);
|
|
49
|
+
expect(s.filesTouched).toBe(2);
|
|
50
|
+
expect(s.addedLines).toBe(3);
|
|
51
|
+
expect(s.removedLines).toBe(3);
|
|
52
|
+
expect(s.hasRenames).toBe(false);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it('flags hasRenames: true when a rename header is present', () => {
|
|
56
|
+
expect(computeDiffStats(RENAME_PATCH).hasRenames).toBe(true);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it('rejects an empty patch with a sensible error', () => {
|
|
60
|
+
expect(() => computeDiffStats('')).toThrow(/empty patch/i);
|
|
61
|
+
});
|
|
62
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
3
|
+
import { join, dirname } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { loadSolverPluginManifest } from '../../../src/plugins/manifest.js';
|
|
6
|
+
import { digestDirectory } from '../../../src/plugins/digest.js';
|
|
7
|
+
|
|
8
|
+
const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
9
|
+
|
|
10
|
+
describe('swe-rebench-v2-diffmin manifest (r83r)', () => {
|
|
11
|
+
it('has a valid jinn.plugin.json that loadSolverPluginManifest parses', () => {
|
|
12
|
+
const { manifest } = loadSolverPluginManifest(ROOT);
|
|
13
|
+
expect(manifest.name).toBe('swe-rebench-v2-diffmin');
|
|
14
|
+
expect(manifest.jinn.supports).toContain('swe-rebench-v2.v1');
|
|
15
|
+
expect(manifest.jinn.skills?.length ?? 0).toBeGreaterThanOrEqual(2);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('passes the SolverType-plugin validator (no jinn.runtime in supports)', () => {
|
|
19
|
+
const { manifest } = loadSolverPluginManifest(ROOT);
|
|
20
|
+
// SolverType mode: supports must not include 'jinn.runtime'
|
|
21
|
+
expect(manifest.jinn.supports).not.toContain('jinn.runtime');
|
|
22
|
+
// Every entry must be a SolverType identifier
|
|
23
|
+
for (const entry of manifest.jinn.supports) {
|
|
24
|
+
expect(typeof entry).toBe('string');
|
|
25
|
+
expect(entry.length).toBeGreaterThan(0);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('declares an .mcp.json that points at the bundled diff-stats server', () => {
|
|
30
|
+
const mcp = JSON.parse(readFileSync(join(ROOT, '.mcp.json'), 'utf8'));
|
|
31
|
+
expect(mcp.mcpServers).toBeDefined();
|
|
32
|
+
expect(mcp.mcpServers['diff-stats']).toBeDefined();
|
|
33
|
+
expect(mcp.mcpServers['diff-stats'].command).toBe('node');
|
|
34
|
+
expect(mcp.mcpServers['diff-stats'].args?.[0]).toContain('mcp/diff-stats-server.mjs');
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('every declared skill file exists with non-empty frontmatter', () => {
|
|
38
|
+
const manifest = JSON.parse(readFileSync(join(ROOT, 'jinn.plugin.json'), 'utf8'));
|
|
39
|
+
for (const skill of manifest.jinn.skills) {
|
|
40
|
+
const p = join(ROOT, skill);
|
|
41
|
+
expect(existsSync(p), `missing skill file: ${skill}`).toBe(true);
|
|
42
|
+
const body = readFileSync(p, 'utf8');
|
|
43
|
+
expect(body, `empty skill: ${skill}`).toMatch(/^---[\s\S]+name:\s*\S+[\s\S]+description:\s*\S+[\s\S]+---/);
|
|
44
|
+
// Reject placeholder content — this plug-in must be real.
|
|
45
|
+
expect(body, `placeholder content in ${skill}`).not.toMatch(/Replace this body|placeholder/i);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('digestDirectory produces a stable sha256 for the package contents', () => {
|
|
50
|
+
const digest = digestDirectory(ROOT);
|
|
51
|
+
expect(digest).toMatch(/^[0-9a-f]{64}$/);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "ESNext",
|
|
4
|
+
"moduleResolution": "Bundler",
|
|
5
|
+
"target": "ES2022",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"types": ["node", "vitest/globals"]
|
|
10
|
+
},
|
|
11
|
+
"include": ["test/**/*.ts", "mcp/**/*.mjs"]
|
|
12
|
+
}
|
|
@@ -9,3 +9,16 @@ This plugin bundles two skills:
|
|
|
9
9
|
The plugin is loaded automatically when an operator's daemon has the `swe-rebench-v2.v1` SolverNet enabled, per the SDK's `defaultRuntimePlugins: ['bundled:swe-rebench-v2-runtime']`.
|
|
10
10
|
|
|
11
11
|
License: MIT.
|
|
12
|
+
|
|
13
|
+
## See also
|
|
14
|
+
|
|
15
|
+
- `client/plugins/swe-rebench-v2-diffmin/` — complementary minimal-diff +
|
|
16
|
+
test-mapping skills. Stacks with this plug-in: a daemon can load both for
|
|
17
|
+
the same SolverNet. The two plug-ins cover different angles:
|
|
18
|
+
`swe-rebench-v2-runtime` orients + plans; `swe-rebench-v2-diffmin` enforces
|
|
19
|
+
minimal-diff discipline and pre-loads the PASS_TO_PASS call-graph.
|
|
20
|
+
|
|
21
|
+
Already shipping a Hermes skill? Drop it under `skills/<name>/SKILL.md`, add
|
|
22
|
+
a `jinn.plugin.json` targeting `swe-rebench-v2.v1`, `yarn pack`, then
|
|
23
|
+
`jinn solver-plugins publish`. See `swe-rebench-v2-diffmin/README.md` for
|
|
24
|
+
the Hermes-migrator quickstart.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: swe-rebench-v2-orient
|
|
3
|
-
description: Orient on a SWE-rebench v2 task —
|
|
3
|
+
description: Orient on a SWE-rebench v2 task — set up the repo at the right base commit, read the problem statement and auxiliary interface info, identify the test files in FAIL_TO_PASS, look for prior execution data, and understand what change the issue requires.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Orient on a SWE-rebench v2 task
|
|
@@ -14,11 +14,15 @@ Inputs you receive under `goal.spec` in the full task body:
|
|
|
14
14
|
- `goal.spec.problem_statement` — the issue description
|
|
15
15
|
- `goal.spec.interface` — auxiliary interface info (function names, signatures, descriptions). May be empty.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
## Set up the repo
|
|
18
|
+
|
|
19
|
+
Treat `$workingDir/repo` as the only task repository checkout. Do not reuse a repo from another `workingDir` or from `implStateDir`. If `$workingDir/repo/.git` is missing, clone `https://github.com/<goal.spec.repo>.git` into `$workingDir/repo` and checkout `<goal.spec.base_commit>` before editing. All your in-tree edits must live in `$workingDir/repo` — that's both where the test infrastructure expects to find them and where the daemon's harvester reads a `git diff` from as a last-resort fallback if your typed-payload submission never lands.
|
|
20
|
+
|
|
21
|
+
## Steps
|
|
18
22
|
|
|
19
23
|
1. Read the problem statement carefully. Note the symptom, the expected behaviour, and any hints about which files / symbols are involved.
|
|
20
24
|
2. If `task.interface` is non-empty, treat it as authoritative for function names + signatures of the API you must implement / fix.
|
|
21
|
-
3.
|
|
25
|
+
3. Look for prior execution data from similar SWE-rebench v2 work in the Jinn knowledge corpus: search for records with `solverType: "swe-rebench-v2.v1"`, `role: "restoration"`, and `artifactType: "swe-rebench-v2_v1_solution"`. For any promising hit, examine its index card before deciding to spend on artifact bytes — only download the full execution data when its index card suggests it is likely relevant. Your available Jinn corpus tools include separate "search", "inspect", and "acquire" operations; pick each by what you are trying to do (find candidates → examine one → download bytes).
|
|
22
26
|
4. Check the `FAIL_TO_PASS` test names from the HF row — these define the success criterion. Find them in the codebase via grep / fs search.
|
|
23
27
|
5. Output a brief Orient summary (3-5 sentences): your hypothesis about the bug, the files you intend to touch, the test you intend to satisfy, and any donated execution data that affected the plan.
|
|
24
28
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: swe-rebench-v2-plan
|
|
3
|
-
description: Plan the patch for a SWE-rebench v2 task — given the Orient summary, sketch the minimal diff that resolves the issue without breaking existing PASS_TO_PASS tests, then submit the final patch
|
|
3
|
+
description: Plan the patch for a SWE-rebench v2 task — given the Orient summary, sketch the minimal diff that resolves the issue without breaking existing PASS_TO_PASS tests, then submit the final patch as a typed structured payload to the daemon.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Plan the patch
|
|
@@ -25,11 +25,9 @@ Pass this plan forward to the Execute phase, which produces the actual patch.
|
|
|
25
25
|
|
|
26
26
|
## Submitting the final patch
|
|
27
27
|
|
|
28
|
-
Once Execute has produced the unified diff,
|
|
28
|
+
Once Execute has produced the unified diff, hand the Solution back to the daemon by submitting a **typed structured payload** through the Jinn client tools available to you. Your tool catalogue includes a dedicated "submit typed payload" action that validates the payload against the active SolverNet contract schema before persisting it. The validator runs server-side — on schema mismatch you will receive a Zod-style `issues[]` tree and can correct the payload and re-submit.
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
Required payload shape for `swe-rebench-v2.v1`:
|
|
30
|
+
The required payload shape for `swe-rebench-v2.v1` restoration is:
|
|
33
31
|
|
|
34
32
|
```json
|
|
35
33
|
{
|
|
@@ -44,21 +42,12 @@ Optional fields:
|
|
|
44
42
|
|
|
45
43
|
Do **not** include daemon-derived fields (e.g. trajectory CIDs) — the daemon attaches trajectory provenance to the envelope automatically. The Solution payload is purely solver-known fields.
|
|
46
44
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
```
|
|
50
|
-
submit_typed_payload({
|
|
51
|
-
payload: {
|
|
52
|
-
schemaVersion: "swe-rebench-v2-solution.v1",
|
|
53
|
-
patch: "--- a/src/foo.c\n+++ b/src/foo.c\n@@ -1 +1 @@\n-old\n+new\n"
|
|
54
|
-
}
|
|
55
|
-
})
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
A successful response looks like:
|
|
45
|
+
A successful submission response looks like:
|
|
59
46
|
|
|
60
47
|
```json
|
|
61
48
|
{ "accepted": true, "solverType": "swe-rebench-v2.v1", "role": "restoration", "persistedTo": "<workingDir>/.execute/solution-payload.json" }
|
|
62
49
|
```
|
|
63
50
|
|
|
51
|
+
If — and only if — your harness exposes no typed-payload submission tool at all, fall back by writing the same payload object directly to `<workingDir>/.execute/solution-payload.json` (create the `.execute` directory if needed). The daemon's harvester reads that file post-execution and applies the same SolverNet payload schema during envelope assembly. Prefer the tool path whenever it exists, because the tool gives you immediate schema validation feedback while the file path does not.
|
|
52
|
+
|
|
64
53
|
After a successful submission, this Plan/Execute cycle is complete — the daemon's harness picks up the persisted payload post-execution and assembles the on-chain envelope.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# {{packageName}}
|
|
2
|
+
|
|
3
|
+
Jinn runtime SolverPlugin — exposes MCP tools to every Jinn harness session, regardless of SolverNet.
|
|
4
|
+
|
|
5
|
+
## What this is
|
|
6
|
+
|
|
7
|
+
A runtime SolverPlugin declares `jinn.supports: ['jinn.runtime']` and is loaded by Jinn-running daemons as a global MCP tool source. Use this pattern when your plug-in's value is harness-shaped (a network tool, a data lookup, a system probe) rather than task-shaped.
|
|
8
|
+
|
|
9
|
+
If your plug-in is task-shaped (skills + tools scoped to a specific SolverNet), use the `solver-type-plugin` pattern instead: `jinn create plugin <name> --pattern solver-type-plugin --solver-type <id>`.
|
|
10
|
+
|
|
11
|
+
## Get started
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
yarn install
|
|
15
|
+
yarn test
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Replace `mcp/server.mjs` with a real MCP server implementation (typically via `@modelcontextprotocol/sdk`) exposing the tools you want available.
|
|
19
|
+
|
|
20
|
+
## Publish
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
jinn solver-plugins validate path:.
|
|
24
|
+
jinn solver-plugins publish path:.
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Reference
|
|
28
|
+
|
|
29
|
+
- Quickstart: https://github.com/Jinn-Network/mono/blob/main/cargo/docs/build/quickstart.md (placeholder until `52x3.6` ships the canonical docs tree)
|
|
30
|
+
- Existing reference: `client/plugins/network-tools/` in the Jinn monorepo.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{packageName}}",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"jinn": {
|
|
5
|
+
"supports": ["jinn.runtime"],
|
|
6
|
+
"capabilities": {
|
|
7
|
+
"tools": {
|
|
8
|
+
"example": [
|
|
9
|
+
"example_tool"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"mcpServers": {
|
|
14
|
+
"example": {
|
|
15
|
+
"command": "node",
|
|
16
|
+
"args": ["mcp/server.mjs"]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"description": "Example runtime SolverPlugin exposing one MCP tool."
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// Minimal MCP server stub.
|
|
4
|
+
//
|
|
5
|
+
// Replace this body with a real MCP server implementation (e.g. via
|
|
6
|
+
// @modelcontextprotocol/sdk) that exposes the tools declared in
|
|
7
|
+
// jinn.plugin.json's jinn.mcpServers.example.
|
|
8
|
+
|
|
9
|
+
import { createInterface } from 'node:readline';
|
|
10
|
+
|
|
11
|
+
const rl = createInterface({ input: process.stdin });
|
|
12
|
+
|
|
13
|
+
rl.on('line', (line) => {
|
|
14
|
+
let msg;
|
|
15
|
+
try {
|
|
16
|
+
msg = JSON.parse(line);
|
|
17
|
+
} catch {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (msg?.method === 'initialize') {
|
|
21
|
+
process.stdout.write(
|
|
22
|
+
JSON.stringify({
|
|
23
|
+
jsonrpc: '2.0',
|
|
24
|
+
id: msg.id,
|
|
25
|
+
result: {
|
|
26
|
+
protocolVersion: '2024-11-05',
|
|
27
|
+
capabilities: { tools: {} },
|
|
28
|
+
serverInfo: { name: '{{packageNameSlug}}-example', version: '0.1.0' },
|
|
29
|
+
},
|
|
30
|
+
}) + '\n',
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{packageName}}",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Jinn runtime SolverPlugin — exposes MCP tools available to every harness session.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": ["jinn.plugin.json", ".mcp.json", "mcp/", "README.md"],
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "vitest run"
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"vitest": "^2.0.0"
|
|
12
|
+
},
|
|
13
|
+
"keywords": ["jinn", "solver-plugin", "runtime", "mcp"],
|
|
14
|
+
"license": "MIT"
|
|
15
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { readFileSync, existsSync } from 'node:fs';
|
|
3
|
+
import { join, dirname } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
|
|
6
|
+
const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
7
|
+
|
|
8
|
+
describe('{{packageName}} runtime manifest', () => {
|
|
9
|
+
it('has a valid jinn.plugin.json declaring jinn.runtime', () => {
|
|
10
|
+
const manifest = JSON.parse(
|
|
11
|
+
readFileSync(join(ROOT, 'jinn.plugin.json'), 'utf8'),
|
|
12
|
+
);
|
|
13
|
+
expect(manifest.name).toBe('{{packageName}}');
|
|
14
|
+
expect(manifest.jinn.supports).toEqual(['jinn.runtime']);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('has a .mcp.json mirroring the jinn.plugin.json mcpServers block', () => {
|
|
18
|
+
expect(existsSync(join(ROOT, '.mcp.json'))).toBe(true);
|
|
19
|
+
const mcp = JSON.parse(readFileSync(join(ROOT, '.mcp.json'), 'utf8'));
|
|
20
|
+
expect(mcp.mcpServers).toBeDefined();
|
|
21
|
+
expect(Object.keys(mcp.mcpServers).length).toBeGreaterThan(0);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('every declared MCP server entry-point file exists', () => {
|
|
25
|
+
const mcp = JSON.parse(readFileSync(join(ROOT, '.mcp.json'), 'utf8'));
|
|
26
|
+
for (const [, server] of Object.entries(mcp.mcpServers as Record<string, { args?: string[] }>)) {
|
|
27
|
+
const args = server.args ?? [];
|
|
28
|
+
for (const arg of args) {
|
|
29
|
+
if (arg.endsWith('.mjs') || arg.endsWith('.js') || arg.endsWith('.ts')) {
|
|
30
|
+
expect(existsSync(join(ROOT, arg)), `missing MCP entry file: ${arg}`).toBe(true);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# {{packageName}}
|
|
2
|
+
|
|
3
|
+
Jinn SolverPlugin targeting `{{solverTypeString}}`.
|
|
4
|
+
|
|
5
|
+
## What this is
|
|
6
|
+
|
|
7
|
+
A SolverPlugin is a package that drops into a Jinn-running harness (Hermes, Claude Code, Codex) and contributes skills + MCP tools when the harness runs a task on `{{solverTypeString}}`. See the canonical `/docs/build/` tree for the full builder reference.
|
|
8
|
+
|
|
9
|
+
## Get started
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
yarn install
|
|
13
|
+
yarn test
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Edit `skills/example/SKILL.md` with the actual skill content you want to ship. Add new skill files under `skills/<name>/SKILL.md` and add their paths to `jinn.plugin.json`'s `jinn.skills` array.
|
|
17
|
+
|
|
18
|
+
## Publish
|
|
19
|
+
|
|
20
|
+
When ready to ship:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Validate the manifest first
|
|
24
|
+
jinn solver-plugins validate path:.
|
|
25
|
+
|
|
26
|
+
# Publish to the Jinn network
|
|
27
|
+
jinn solver-plugins publish path:.
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The published plug-in becomes discoverable to operators running `{{solverTypeString}}` SolverNets.
|
|
31
|
+
|
|
32
|
+
## Reference
|
|
33
|
+
|
|
34
|
+
- Quickstart: https://github.com/Jinn-Network/mono/blob/main/cargo/docs/build/quickstart.md (placeholder until `52x3.6` ships the canonical docs tree)
|
|
35
|
+
- Spec: `docs/superpowers/specs/2026-05-13-plug-in-builder-entry-point-design.md`
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{packageName}}",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Jinn SolverPlugin for {{solverTypeString}}.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": ["jinn.plugin.json", "skills/", "README.md"],
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "vitest run"
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"vitest": "^2.0.0"
|
|
12
|
+
},
|
|
13
|
+
"keywords": ["jinn", "solver-plugin", "{{solverTypeString}}"],
|
|
14
|
+
"license": "MIT"
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: {{packageNameSlug}}-example
|
|
3
|
+
description: An example skill that ships with the {{packageName}} plug-in. Replace this body with your plug-in's actual skill content.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Example skill
|
|
7
|
+
|
|
8
|
+
This skill is a placeholder. Replace its body with content that helps a solver agent attempt `{{solverTypeString}}` tasks.
|
|
9
|
+
|
|
10
|
+
Skills are markdown files with YAML frontmatter. The frontmatter's `name` and `description` are used by harnesses to decide when to load the skill into context.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { readFileSync, existsSync } from 'node:fs';
|
|
3
|
+
import { join, dirname } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
|
|
6
|
+
const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
7
|
+
|
|
8
|
+
describe('{{packageName}} manifest', () => {
|
|
9
|
+
it('has a valid jinn.plugin.json', () => {
|
|
10
|
+
const manifestPath = join(ROOT, 'jinn.plugin.json');
|
|
11
|
+
expect(existsSync(manifestPath)).toBe(true);
|
|
12
|
+
const manifest = JSON.parse(readFileSync(manifestPath, 'utf8'));
|
|
13
|
+
expect(manifest.name).toBe('{{packageName}}');
|
|
14
|
+
expect(manifest.jinn.supports).toContain('{{solverTypeString}}');
|
|
15
|
+
expect(Array.isArray(manifest.jinn.skills)).toBe(true);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('every declared skill file exists', () => {
|
|
19
|
+
const manifestPath = join(ROOT, 'jinn.plugin.json');
|
|
20
|
+
const manifest = JSON.parse(readFileSync(manifestPath, 'utf8'));
|
|
21
|
+
for (const skill of manifest.jinn.skills ?? []) {
|
|
22
|
+
expect(existsSync(join(ROOT, skill)), `missing skill file: ${skill}`).toBe(true);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
});
|