@jinn-network/client 0.1.9 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +2 -2
- package/README.md +13 -2
- package/deployments/deployment-phase1b-mech-baseSepolia-fast.json +3 -3
- package/deployments/deployment-stolas-l2-baseSepolia-fast.json +23 -3
- package/deployments/deployment-task-coordinator-router-v3-baseSepolia-fast.json +34 -6
- package/dist/adapters/mech/adapter.d.ts +30 -0
- package/dist/adapters/mech/adapter.js +198 -54
- package/dist/adapters/mech/adapter.js.map +1 -1
- package/dist/adapters/mech/contracts.d.ts +174 -13
- package/dist/adapters/mech/contracts.js +37 -21
- package/dist/adapters/mech/contracts.js.map +1 -1
- package/dist/adapters/mech/ipfs.d.ts +15 -27
- package/dist/adapters/mech/ipfs.js +39 -102
- package/dist/adapters/mech/ipfs.js.map +1 -1
- package/dist/adapters/mech/safe.js +74 -2
- package/dist/adapters/mech/safe.js.map +1 -1
- package/dist/adapters/mech/types.d.ts +15 -130
- package/dist/adapters/mech/types.js +9 -65
- package/dist/adapters/mech/types.js.map +1 -1
- package/dist/api/bootstrap-endpoint.d.ts +19 -3
- package/dist/api/bootstrap-endpoint.js +4 -0
- package/dist/api/bootstrap-endpoint.js.map +1 -1
- package/dist/api/gather-status.d.ts +49 -15
- package/dist/api/gather-status.js +115 -417
- package/dist/api/gather-status.js.map +1 -1
- package/dist/api/harness-auth-status-endpoint.d.ts +21 -0
- package/dist/api/harness-auth-status-endpoint.js +17 -0
- package/dist/api/harness-auth-status-endpoint.js.map +1 -0
- package/dist/api/launcher-endpoints.js +6 -1
- package/dist/api/launcher-endpoints.js.map +1 -1
- package/dist/api/launcher-status.d.ts +2 -0
- package/dist/api/launcher-status.js.map +1 -1
- package/dist/api/launcher-tasks.d.ts +47 -0
- package/dist/api/launcher-tasks.js +88 -3
- package/dist/api/launcher-tasks.js.map +1 -1
- package/dist/api/loop-completion-build.d.ts +2 -2
- package/dist/api/loop-completion-build.js +2 -3
- package/dist/api/loop-completion-build.js.map +1 -1
- package/dist/api/operator-artifacts-endpoint.js +1 -1
- package/dist/api/operator-artifacts-endpoint.js.map +1 -1
- package/dist/api/portfolio-v0-build.d.ts +2 -1
- package/dist/api/portfolio-v0-build.js +5 -7
- package/dist/api/portfolio-v0-build.js.map +1 -1
- package/dist/api/prediction-v1-build.d.ts +2 -2
- package/dist/api/prediction-v1-build.js +5 -7
- package/dist/api/prediction-v1-build.js.map +1 -1
- package/dist/api/rewards-build.d.ts +8 -1
- package/dist/api/rewards-build.js +32 -4
- package/dist/api/rewards-build.js.map +1 -1
- package/dist/api/rewards-endpoint.d.ts +12 -0
- package/dist/api/rewards-endpoint.js +46 -0
- package/dist/api/rewards-endpoint.js.map +1 -0
- package/dist/api/run-outcome.d.ts +49 -0
- package/dist/api/run-outcome.js +65 -0
- package/dist/api/run-outcome.js.map +1 -0
- package/dist/api/server.d.ts +6 -16
- package/dist/api/server.js +36 -26
- package/dist/api/server.js.map +1 -1
- package/dist/api/setup-endpoints.d.ts +32 -0
- package/dist/api/setup-endpoints.js +232 -32
- package/dist/api/setup-endpoints.js.map +1 -1
- package/dist/api/solvernets-endpoints.js +1 -1
- package/dist/api/solvernets-endpoints.js.map +1 -1
- package/dist/api/status-build.d.ts +74 -64
- package/dist/api/status-build.js +31 -55
- package/dist/api/status-build.js.map +1 -1
- package/dist/api/stop-hook.d.ts +1 -1
- package/dist/api/stop-hook.js +1 -1
- package/dist/api/stop-hook.js.map +1 -1
- package/dist/api/task-run-routing.d.ts +1 -1
- package/dist/api/task-runs-build.d.ts +21 -2
- package/dist/api/task-runs-build.js +27 -7
- package/dist/api/task-runs-build.js.map +1 -1
- package/dist/build-info.json +4 -4
- package/dist/build-meta.json +1 -1
- package/dist/captures/ingest.d.ts +21 -0
- package/dist/captures/ingest.js +133 -0
- package/dist/captures/ingest.js.map +1 -0
- package/dist/captures/live-publisher.d.ts +9 -0
- package/dist/captures/live-publisher.js +5 -3
- package/dist/captures/live-publisher.js.map +1 -1
- package/dist/captures/publish.d.ts +25 -0
- package/dist/captures/publish.js +17 -7
- package/dist/captures/publish.js.map +1 -1
- package/dist/cli/commands/backfill-failed-deliveries.d.ts +40 -0
- package/dist/cli/commands/backfill-failed-deliveries.js +172 -0
- package/dist/cli/commands/backfill-failed-deliveries.js.map +1 -0
- package/dist/cli/commands/doctor.js +4 -7
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/eval.d.ts +11 -0
- package/dist/cli/commands/eval.js +103 -23
- package/dist/cli/commands/eval.js.map +1 -1
- package/dist/cli/commands/kill.d.ts +14 -0
- package/dist/cli/commands/kill.js +141 -0
- package/dist/cli/commands/kill.js.map +1 -0
- package/dist/cli/commands/rewards.js +17 -15
- package/dist/cli/commands/rewards.js.map +1 -1
- package/dist/cli/commands/run.js +18 -4
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/solver-nets.d.ts +6 -0
- package/dist/cli/commands/solver-nets.js +145 -2
- package/dist/cli/commands/solver-nets.js.map +1 -1
- package/dist/cli/commands/solver-plugins.js +2 -2
- package/dist/cli/commands/solver-plugins.js.map +1 -1
- package/dist/cli/commands/stop.js +97 -21
- package/dist/cli/commands/stop.js.map +1 -1
- package/dist/cli/commands/update.js +8 -0
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/version.js +4 -0
- package/dist/cli/commands/version.js.map +1 -1
- package/dist/cli/execution-context.js +2 -1
- package/dist/cli/execution-context.js.map +1 -1
- package/dist/cli/index.js +4 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/introspection-context.js +0 -3
- package/dist/cli/introspection-context.js.map +1 -1
- package/dist/cli/ui-auto-open-gate.d.ts +22 -0
- package/dist/cli/ui-auto-open-gate.js +24 -0
- package/dist/cli/ui-auto-open-gate.js.map +1 -0
- package/dist/config.d.ts +258 -540
- package/dist/config.js +280 -193
- package/dist/config.js.map +1 -1
- package/dist/conformance/execution-envelope-authenticator.d.ts +2 -0
- package/dist/conformance/execution-envelope-authenticator.js +38 -0
- package/dist/conformance/execution-envelope-authenticator.js.map +1 -0
- package/dist/contracts/abis.d.ts +100 -0
- package/dist/contracts/abis.js +58 -0
- package/dist/contracts/abis.js.map +1 -0
- package/dist/contracts/addresses.d.ts +36 -0
- package/dist/contracts/addresses.js +60 -0
- package/dist/contracts/addresses.js.map +1 -0
- package/dist/corpus/acquire.d.ts +1 -40
- package/dist/corpus/acquire.js +1 -212
- package/dist/corpus/acquire.js.map +1 -1
- package/dist/corpus/cache.d.ts +1 -14
- package/dist/corpus/cache.js +1 -17
- package/dist/corpus/cache.js.map +1 -1
- package/dist/corpus/fetch-artifact.d.ts +1 -0
- package/dist/corpus/fetch-artifact.js +2 -0
- package/dist/corpus/fetch-artifact.js.map +1 -0
- package/dist/corpus/fetch.d.ts +3 -7
- package/dist/corpus/fetch.js +9 -22
- package/dist/corpus/fetch.js.map +1 -1
- package/dist/corpus/index.d.ts +2 -3
- package/dist/corpus/index.js +19 -110
- package/dist/corpus/index.js.map +1 -1
- package/dist/corpus/onchain-query.d.ts +0 -1
- package/dist/corpus/onchain-query.js +2 -5
- package/dist/corpus/onchain-query.js.map +1 -1
- package/dist/corpus/route-resolver.d.ts +1 -16
- package/dist/corpus/route-resolver.js +1 -19
- package/dist/corpus/route-resolver.js.map +1 -1
- package/dist/corpus/types.d.ts +1 -17
- package/dist/corpus/types.js +1 -34
- package/dist/corpus/types.js.map +1 -1
- package/dist/daemon/balance-topup-loop.js +27 -9
- package/dist/daemon/balance-topup-loop.js.map +1 -1
- package/dist/daemon/checkpoint-loop.js +2 -2
- package/dist/daemon/creator.d.ts +1 -0
- package/dist/daemon/creator.js +39 -25
- package/dist/daemon/creator.js.map +1 -1
- package/dist/daemon/daemon.d.ts +31 -12
- package/dist/daemon/daemon.js +138 -32
- package/dist/daemon/daemon.js.map +1 -1
- package/dist/daemon/delivery-watcher.d.ts +9 -0
- package/dist/daemon/delivery-watcher.js +24 -1
- package/dist/daemon/delivery-watcher.js.map +1 -1
- package/dist/daemon/eviction-loop.d.ts +3 -0
- package/dist/daemon/eviction-loop.js +7 -4
- package/dist/daemon/eviction-loop.js.map +1 -1
- package/dist/daemon/harvest-loop.d.ts +72 -0
- package/dist/daemon/harvest-loop.js +474 -0
- package/dist/daemon/harvest-loop.js.map +1 -0
- package/dist/daemon/join-applier.d.ts +40 -0
- package/dist/daemon/join-applier.js +52 -0
- package/dist/daemon/join-applier.js.map +1 -0
- package/dist/daemon/loop-heartbeat.d.ts +95 -0
- package/dist/daemon/loop-heartbeat.js +80 -0
- package/dist/daemon/loop-heartbeat.js.map +1 -0
- package/dist/{api/peers.js → daemon/peer-sync.js} +3 -1
- package/dist/daemon/peer-sync.js.map +1 -0
- package/dist/daemon/reward-claim-loop.js +28 -10
- package/dist/daemon/reward-claim-loop.js.map +1 -1
- package/dist/daemon/skip-log-dedup.d.ts +1 -1
- package/dist/daemon/skip-log-dedup.js +3 -0
- package/dist/daemon/skip-log-dedup.js.map +1 -1
- package/dist/daemon/spend-cap-gate.d.ts +0 -6
- package/dist/daemon/spend-cap-gate.js +1 -8
- package/dist/daemon/spend-cap-gate.js.map +1 -1
- package/dist/daemon/watchdog-loop.d.ts +84 -0
- package/dist/daemon/watchdog-loop.js +91 -0
- package/dist/daemon/watchdog-loop.js.map +1 -0
- package/dist/dashboard/assets/index-C988eu68.js +95 -0
- package/dist/dashboard/assets/index-CawZUjVI.css +1 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/discovery/http.d.ts +10 -0
- package/dist/discovery/http.js +178 -335
- package/dist/discovery/http.js.map +1 -1
- package/dist/discovery/onchain.js +30 -9
- package/dist/discovery/onchain.js.map +1 -1
- package/dist/discovery/types.d.ts +98 -52
- package/dist/discovery/types.js.map +1 -1
- package/dist/discovery/with-fallback.js +19 -0
- package/dist/discovery/with-fallback.js.map +1 -1
- package/dist/earning/bootstrap-run.d.ts +25 -0
- package/dist/earning/bootstrap-run.js +315 -0
- package/dist/earning/bootstrap-run.js.map +1 -0
- package/dist/earning/bootstrap.d.ts +11 -14
- package/dist/earning/bootstrap.js +56 -204
- package/dist/earning/bootstrap.js.map +1 -1
- package/dist/earning/contracts.d.ts +2 -232
- package/dist/earning/contracts.js +16 -205
- package/dist/earning/contracts.js.map +1 -1
- package/dist/earning/faucet-topup-store.d.ts +41 -0
- package/dist/earning/faucet-topup-store.js +89 -0
- package/dist/earning/faucet-topup-store.js.map +1 -0
- package/dist/earning/master-gas.d.ts +10 -0
- package/dist/earning/master-gas.js +11 -0
- package/dist/earning/master-gas.js.map +1 -0
- package/dist/earning/safe-adapter.js +1 -45
- package/dist/earning/safe-adapter.js.map +1 -1
- package/dist/earning/steps/context.d.ts +42 -0
- package/dist/earning/steps/context.js +4 -0
- package/dist/earning/steps/context.js.map +1 -0
- package/dist/earning/steps/fleet-identity-register.d.ts +4 -0
- package/dist/earning/steps/fleet-identity-register.js +65 -0
- package/dist/earning/steps/fleet-identity-register.js.map +1 -0
- package/dist/earning/steps/fleet-safe-deploy.d.ts +4 -0
- package/dist/earning/steps/fleet-safe-deploy.js +62 -0
- package/dist/earning/steps/fleet-safe-deploy.js.map +1 -0
- package/dist/earning/steps/fleet-safe-predict.d.ts +4 -0
- package/dist/earning/steps/fleet-safe-predict.js +18 -0
- package/dist/earning/steps/fleet-safe-predict.js.map +1 -0
- package/dist/earning/steps/receipt-parsing.d.ts +12 -0
- package/dist/earning/steps/receipt-parsing.js +71 -0
- package/dist/earning/steps/receipt-parsing.js.map +1 -0
- package/dist/earning/stolas-claim.js +8 -8
- package/dist/earning/stolas-claim.js.map +1 -1
- package/dist/earning/{jinn-rewards.d.ts → stolas-staking.d.ts} +4 -8
- package/dist/earning/{jinn-rewards.js → stolas-staking.js} +25 -23
- package/dist/earning/stolas-staking.js.map +1 -0
- package/dist/earning/testnet-setup-migration.d.ts +1 -0
- package/dist/earning/testnet-setup-migration.js +7 -2
- package/dist/earning/testnet-setup-migration.js.map +1 -1
- package/dist/earning/types.d.ts +9 -9
- package/dist/earning/types.js +1 -1
- package/dist/earning/types.js.map +1 -1
- package/dist/earning/viem-clients.d.ts +3 -19
- package/dist/earning/viem-clients.js +4 -31
- package/dist/earning/viem-clients.js.map +1 -1
- package/dist/erc8004/abis.d.ts +16 -0
- package/dist/erc8004/abis.js +12 -0
- package/dist/erc8004/abis.js.map +1 -1
- package/dist/erc8004/addresses.d.ts +6 -5
- package/dist/erc8004/addresses.js +7 -5
- package/dist/erc8004/addresses.js.map +1 -1
- package/dist/erc8004/identity.d.ts +54 -1
- package/dist/erc8004/identity.js +114 -5
- package/dist/erc8004/identity.js.map +1 -1
- package/dist/erc8004/index.d.ts +5 -2
- package/dist/erc8004/index.js +6 -2
- package/dist/erc8004/index.js.map +1 -1
- package/dist/erc8004/manifest-consumer.d.ts +32 -0
- package/dist/erc8004/manifest-consumer.js +95 -0
- package/dist/erc8004/manifest-consumer.js.map +1 -0
- package/dist/erc8004/manifest-registry.d.ts +1 -0
- package/dist/erc8004/manifest-registry.js +2 -0
- package/dist/erc8004/manifest-registry.js.map +1 -0
- package/dist/erc8004/merkle.d.ts +1 -0
- package/dist/erc8004/merkle.js +2 -0
- package/dist/erc8004/merkle.js.map +1 -0
- package/dist/erc8004/publisher-safe-resolver.d.ts +32 -0
- package/dist/erc8004/publisher-safe-resolver.js +102 -0
- package/dist/erc8004/publisher-safe-resolver.js.map +1 -0
- package/dist/erc8004/reputation.js +16 -12
- package/dist/erc8004/reputation.js.map +1 -1
- package/dist/erc8004/validation.js +5 -4
- package/dist/erc8004/validation.js.map +1 -1
- package/dist/eval/attribution-instrument.d.ts +190 -0
- package/dist/eval/attribution-instrument.js +719 -0
- package/dist/eval/attribution-instrument.js.map +1 -0
- package/dist/eval/attribution-verdict-evidence.d.ts +41 -0
- package/dist/eval/attribution-verdict-evidence.js +124 -0
- package/dist/eval/attribution-verdict-evidence.js.map +1 -0
- package/dist/eval/capability-slate.d.ts +64 -0
- package/dist/eval/capability-slate.js +136 -0
- package/dist/eval/capability-slate.js.map +1 -0
- package/dist/eval/capability-stats.d.ts +39 -0
- package/dist/eval/capability-stats.js +123 -0
- package/dist/eval/capability-stats.js.map +1 -0
- package/dist/eval/contested-band.d.ts +18 -0
- package/dist/eval/contested-band.js +19 -0
- package/dist/eval/contested-band.js.map +1 -0
- package/dist/eval/corpus-index.d.ts +21 -0
- package/dist/eval/corpus-index.js +55 -0
- package/dist/eval/corpus-index.js.map +1 -0
- package/dist/eval/disjointness.d.ts +26 -0
- package/dist/eval/disjointness.js +67 -0
- package/dist/eval/disjointness.js.map +1 -0
- package/dist/eval/mcnemar-power.d.ts +14 -0
- package/dist/eval/mcnemar-power.js +40 -0
- package/dist/eval/mcnemar-power.js.map +1 -0
- package/dist/eval/orchestrator.d.ts +64 -3
- package/dist/eval/orchestrator.js +37 -19
- package/dist/eval/orchestrator.js.map +1 -1
- package/dist/eval/paired.d.ts +2 -68
- package/dist/eval/paired.js +2 -92
- package/dist/eval/paired.js.map +1 -1
- package/dist/eval/resolve-slate-tasks.js +2 -2
- package/dist/eval/resolve-slate-tasks.js.map +1 -1
- package/dist/eval/screen-discovery.d.ts +5 -8
- package/dist/eval/screen-discovery.js +13 -55
- package/dist/eval/screen-discovery.js.map +1 -1
- package/dist/events/types.d.ts +1 -1
- package/dist/events/types.js +1 -1
- package/dist/events/types.js.map +1 -1
- package/dist/harnesses/auth-source.d.ts +51 -0
- package/dist/harnesses/auth-source.js +155 -0
- package/dist/harnesses/auth-source.js.map +1 -0
- package/dist/harnesses/engine/backfill-failed-deliveries.d.ts +59 -0
- package/dist/harnesses/engine/backfill-failed-deliveries.js +94 -0
- package/dist/harnesses/engine/backfill-failed-deliveries.js.map +1 -0
- package/dist/harnesses/engine/canonical-json.d.ts +2 -1
- package/dist/harnesses/engine/canonical-json.js +2 -67
- package/dist/harnesses/engine/canonical-json.js.map +1 -1
- package/dist/harnesses/engine/corpus-knowledge.d.ts +67 -0
- package/dist/harnesses/engine/corpus-knowledge.js +194 -0
- package/dist/harnesses/engine/corpus-knowledge.js.map +1 -0
- package/dist/harnesses/engine/engine.d.ts +85 -1
- package/dist/harnesses/engine/engine.js +313 -6
- package/dist/harnesses/engine/engine.js.map +1 -1
- package/dist/harnesses/engine/envelope-assembly.d.ts +9 -1
- package/dist/harnesses/engine/envelope-assembly.js +6 -0
- package/dist/harnesses/engine/envelope-assembly.js.map +1 -1
- package/dist/harnesses/engine/generator-model.d.ts +36 -0
- package/dist/harnesses/engine/generator-model.js +118 -0
- package/dist/harnesses/engine/generator-model.js.map +1 -0
- package/dist/harnesses/engine/packaging.js +5 -5
- package/dist/harnesses/engine/packaging.js.map +1 -1
- package/dist/harnesses/engine/persistence.d.ts +37 -62
- package/dist/harnesses/engine/persistence.js +66 -0
- package/dist/harnesses/engine/persistence.js.map +1 -1
- package/dist/harnesses/impls/_evaluator-base.d.ts +48 -0
- package/dist/harnesses/impls/_evaluator-base.js +35 -0
- package/dist/harnesses/impls/_evaluator-base.js.map +1 -0
- package/dist/harnesses/impls/claude-mcp-hyperliquid/mcp-tools.d.ts +1 -1
- package/dist/harnesses/impls/claude-mcp-hyperliquid/mcp-tools.js +1 -1
- package/dist/harnesses/impls/claude-mcp-hyperliquid/mcp-tools.js.map +1 -1
- package/dist/harnesses/impls/claude-mcp-prediction/index.d.ts +2 -3
- package/dist/harnesses/impls/claude-mcp-prediction/index.js +29 -99
- package/dist/harnesses/impls/claude-mcp-prediction/index.js.map +1 -1
- package/dist/harnesses/impls/claude-mcp-prediction/mcp-tools.js +4 -21
- package/dist/harnesses/impls/claude-mcp-prediction/mcp-tools.js.map +1 -1
- package/dist/harnesses/impls/claude-mcp-prediction/session-orchestrator.d.ts +2 -0
- package/dist/harnesses/impls/claude-mcp-prediction/session-orchestrator.js +1 -1
- package/dist/harnesses/impls/claude-mcp-prediction/session-orchestrator.js.map +1 -1
- package/dist/harnesses/impls/claude-mcp-prediction-apy/index.js +30 -79
- package/dist/harnesses/impls/claude-mcp-prediction-apy/index.js.map +1 -1
- package/dist/harnesses/impls/claude-mcp-prediction-apy/mcp-tools.js +4 -19
- package/dist/harnesses/impls/claude-mcp-prediction-apy/mcp-tools.js.map +1 -1
- package/dist/harnesses/impls/claude-mcp-prediction-apy/session-orchestrator.d.ts +2 -0
- package/dist/harnesses/impls/claude-mcp-prediction-apy/session-orchestrator.js +1 -1
- package/dist/harnesses/impls/claude-mcp-prediction-apy/session-orchestrator.js.map +1 -1
- package/dist/harnesses/impls/claude-mcp-shared/mcp-server-script.d.ts +39 -0
- package/dist/harnesses/impls/claude-mcp-shared/mcp-server-script.js +62 -0
- package/dist/harnesses/impls/claude-mcp-shared/mcp-server-script.js.map +1 -0
- package/dist/harnesses/impls/claude-mcp-shared/mcp-server.d.ts +40 -0
- package/dist/harnesses/impls/claude-mcp-shared/mcp-server.js +44 -0
- package/dist/harnesses/impls/claude-mcp-shared/mcp-server.js.map +1 -0
- package/dist/harnesses/impls/claude-mcp-shared/single-session-harness.d.ts +56 -0
- package/dist/harnesses/impls/claude-mcp-shared/single-session-harness.js +79 -0
- package/dist/harnesses/impls/claude-mcp-shared/single-session-harness.js.map +1 -0
- package/dist/harnesses/impls/hermes-agent/adapter.js +56 -2
- package/dist/harnesses/impls/hermes-agent/adapter.js.map +1 -1
- package/dist/harnesses/impls/hermes-agent/bootstrap.d.ts +6 -0
- package/dist/harnesses/impls/hermes-agent/bootstrap.js +7 -2
- package/dist/harnesses/impls/hermes-agent/bootstrap.js.map +1 -1
- package/dist/harnesses/impls/hermes-agent/harness.d.ts +8 -0
- package/dist/harnesses/impls/hermes-agent/harness.js +21 -0
- package/dist/harnesses/impls/hermes-agent/harness.js.map +1 -1
- package/dist/harnesses/impls/index.js +8 -1
- package/dist/harnesses/impls/index.js.map +1 -1
- package/dist/harnesses/impls/jinn-repo-evaluator/eval-runner.d.ts +34 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/eval-runner.js +111 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/eval-runner.js.map +1 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/evaluator.d.ts +24 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/evaluator.js +19 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/evaluator.js.map +1 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/harness.d.ts +97 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/harness.js +265 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/harness.js.map +1 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/live-eval-runner.d.ts +68 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/live-eval-runner.js +223 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/live-eval-runner.js.map +1 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/repro.d.ts +32 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/repro.js +73 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/repro.js.map +1 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/scope-tests.d.ts +62 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/scope-tests.js +91 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/scope-tests.js.map +1 -0
- package/dist/harnesses/impls/learner/adapters/claude-code.js +9 -2
- package/dist/harnesses/impls/learner/adapters/claude-code.js.map +1 -1
- package/dist/harnesses/impls/learner/adapters/codex-code.d.ts +11 -1
- package/dist/harnesses/impls/learner/adapters/codex-code.js +130 -15
- package/dist/harnesses/impls/learner/adapters/codex-code.js.map +1 -1
- package/dist/harnesses/impls/learner/harness.d.ts +12 -0
- package/dist/harnesses/impls/learner/harness.js +42 -0
- package/dist/harnesses/impls/learner/harness.js.map +1 -1
- package/dist/harnesses/impls/learner/harvest.js +51 -1
- package/dist/harnesses/impls/learner/harvest.js.map +1 -1
- package/dist/harnesses/impls/portfolio-v0-evaluator/index.d.ts +5 -15
- package/dist/harnesses/impls/portfolio-v0-evaluator/index.js +10 -29
- package/dist/harnesses/impls/portfolio-v0-evaluator/index.js.map +1 -1
- package/dist/harnesses/impls/prediction-apy-v0-evaluator/index.d.ts +5 -15
- package/dist/harnesses/impls/prediction-apy-v0-evaluator/index.js +10 -23
- package/dist/harnesses/impls/prediction-apy-v0-evaluator/index.js.map +1 -1
- package/dist/harnesses/impls/prediction-v0-evaluator/index.d.ts +5 -15
- package/dist/harnesses/impls/prediction-v0-evaluator/index.js +10 -25
- package/dist/harnesses/impls/prediction-v0-evaluator/index.js.map +1 -1
- package/dist/harnesses/impls/stub.d.ts +2 -2
- package/dist/harnesses/impls/stub.js +2 -2
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.js +16 -2
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/eval-runner.js.map +1 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/harness.d.ts +65 -6
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/harness.js +590 -35
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/harness.js.map +1 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/hf-fetcher.js +4 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/hf-fetcher.js.map +1 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/routing-task-row-fetcher.d.ts +37 -0
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/routing-task-row-fetcher.js +59 -0
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/routing-task-row-fetcher.js.map +1 -0
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/upstream-patches/passed-actual.patch +21 -0
- package/dist/harnesses/readiness-registry.d.ts +16 -0
- package/dist/harnesses/readiness-registry.js +28 -6
- package/dist/harnesses/readiness-registry.js.map +1 -1
- package/dist/harnesses/types.d.ts +12 -0
- package/dist/learner/verification-gate.d.ts +53 -0
- package/dist/learner/verification-gate.js +80 -0
- package/dist/learner/verification-gate.js.map +1 -0
- package/dist/lifecycle/process-discovery.d.ts +41 -0
- package/dist/lifecycle/process-discovery.js +109 -0
- package/dist/lifecycle/process-discovery.js.map +1 -0
- package/dist/main.js +358 -581
- package/dist/main.js.map +1 -1
- package/dist/mcp/acquire-artifact.d.ts +3 -3
- package/dist/mcp/acquire-artifact.js +3 -3
- package/dist/mcp/operator-server.js +1 -1
- package/dist/mcp/operator-server.js.map +1 -1
- package/dist/mcp/server.js +5 -6
- package/dist/mcp/server.js.map +1 -1
- package/dist/monitoring/net-liveness.d.ts +143 -0
- package/dist/monitoring/net-liveness.js +301 -0
- package/dist/monitoring/net-liveness.js.map +1 -0
- package/dist/observability/emit-event.d.ts +1 -1
- package/dist/observability/emit-event.js +2 -4
- package/dist/observability/emit-event.js.map +1 -1
- package/dist/observability/progress.d.ts +11 -0
- package/dist/observability/progress.js +16 -0
- package/dist/observability/progress.js.map +1 -0
- package/dist/pilot/arm-homes.d.ts +39 -0
- package/dist/pilot/arm-homes.js +104 -0
- package/dist/pilot/arm-homes.js.map +1 -0
- package/dist/pilot/cost.d.ts +19 -0
- package/dist/pilot/cost.js +31 -0
- package/dist/pilot/cost.js.map +1 -0
- package/dist/pilot/instance.d.ts +26 -0
- package/dist/pilot/instance.js +53 -0
- package/dist/pilot/instance.js.map +1 -0
- package/dist/pilot/pipeline.d.ts +17 -0
- package/dist/pilot/pipeline.js +35 -0
- package/dist/pilot/pipeline.js.map +1 -0
- package/dist/pilot/repo.d.ts +37 -0
- package/dist/pilot/repo.js +65 -0
- package/dist/pilot/repo.js.map +1 -0
- package/dist/pilot/resume.d.ts +101 -0
- package/dist/pilot/resume.js +204 -0
- package/dist/pilot/resume.js.map +1 -0
- package/dist/pilot/solve.d.ts +23 -0
- package/dist/pilot/solve.js +37 -0
- package/dist/pilot/solve.js.map +1 -0
- package/dist/pilot/tally.d.ts +42 -0
- package/dist/pilot/tally.js +100 -0
- package/dist/pilot/tally.js.map +1 -0
- package/dist/pilot/task-selection.d.ts +27 -0
- package/dist/pilot/task-selection.js +112 -0
- package/dist/pilot/task-selection.js.map +1 -0
- package/dist/plugins/resolvers.js +7 -4
- package/dist/plugins/resolvers.js.map +1 -1
- package/dist/plugins/types.d.ts +8 -0
- package/dist/preflight/deployment-readiness.d.ts +2 -22
- package/dist/preflight/deployment-readiness.js +1 -59
- package/dist/preflight/deployment-readiness.js.map +1 -1
- package/dist/preflight/pidfile-liveness.d.ts +3 -2
- package/dist/preflight/pidfile-liveness.js +18 -2
- package/dist/preflight/pidfile-liveness.js.map +1 -1
- package/dist/preflight/rpc-network.d.ts +10 -3
- package/dist/preflight/rpc-network.js +46 -13
- package/dist/preflight/rpc-network.js.map +1 -1
- package/dist/preflight/stable-cwd.d.ts +29 -0
- package/dist/preflight/stable-cwd.js +98 -0
- package/dist/preflight/stable-cwd.js.map +1 -0
- package/dist/preflight/version-check.d.ts +41 -0
- package/dist/preflight/version-check.js +80 -0
- package/dist/preflight/version-check.js.map +1 -0
- package/dist/rpc/transport.d.ts +7 -5
- package/dist/rpc/transport.js +8 -6
- package/dist/rpc/transport.js.map +1 -1
- package/dist/scripts/swe-rebench-v2-evaluator.bundle.v1.patch +79 -0
- package/dist/solver-nets/registry.d.ts +19 -0
- package/dist/solver-nets/registry.js +99 -66
- package/dist/solver-nets/registry.js.map +1 -1
- package/dist/solver-types/_jinn-repo-pool.d.ts +61 -0
- package/dist/solver-types/_jinn-repo-pool.js +34 -0
- package/dist/solver-types/_jinn-repo-pool.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-commit-echo-git.d.ts +46 -0
- package/dist/solver-types/_swe-rebench-v2-commit-echo-git.js +192 -0
- package/dist/solver-types/_swe-rebench-v2-commit-echo-git.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-commit-echo.d.ts +57 -0
- package/dist/solver-types/_swe-rebench-v2-commit-echo.js +57 -0
- package/dist/solver-types/_swe-rebench-v2-commit-echo.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-differential-admission.d.ts +395 -0
- package/dist/solver-types/_swe-rebench-v2-differential-admission.js +231 -0
- package/dist/solver-types/_swe-rebench-v2-differential-admission.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-empirical-tests.d.ts +47 -0
- package/dist/solver-types/_swe-rebench-v2-empirical-tests.js +67 -0
- package/dist/solver-types/_swe-rebench-v2-empirical-tests.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-escrow.d.ts +2 -0
- package/dist/solver-types/_swe-rebench-v2-escrow.js +13 -0
- package/dist/solver-types/_swe-rebench-v2-escrow.js.map +1 -1
- package/dist/solver-types/_swe-rebench-v2-guards.d.ts +44 -0
- package/dist/solver-types/_swe-rebench-v2-guards.js +111 -0
- package/dist/solver-types/_swe-rebench-v2-guards.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-harvest-state.d.ts +191 -0
- package/dist/solver-types/_swe-rebench-v2-harvest-state.js +349 -0
- package/dist/solver-types/_swe-rebench-v2-harvest-state.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-harvest.d.ts +123 -0
- package/dist/solver-types/_swe-rebench-v2-harvest.js +539 -0
- package/dist/solver-types/_swe-rebench-v2-harvest.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-held-out-slate.d.ts +1 -1
- package/dist/solver-types/_swe-rebench-v2-held-out-slate.js +1 -1
- package/dist/solver-types/_swe-rebench-v2-held-out-slate.js.map +1 -1
- package/dist/solver-types/_swe-rebench-v2-hunk-echo.d.ts +28 -0
- package/dist/solver-types/_swe-rebench-v2-hunk-echo.js +32 -0
- package/dist/solver-types/_swe-rebench-v2-hunk-echo.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-lookup-tripwire.d.ts +16 -0
- package/dist/solver-types/_swe-rebench-v2-lookup-tripwire.js +18 -0
- package/dist/solver-types/_swe-rebench-v2-lookup-tripwire.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-mineable-store-port.d.ts +74 -0
- package/dist/solver-types/_swe-rebench-v2-mineable-store-port.js +9 -0
- package/dist/solver-types/_swe-rebench-v2-mineable-store-port.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-mineable-store.d.ts +51 -0
- package/dist/solver-types/_swe-rebench-v2-mineable-store.js +171 -0
- package/dist/solver-types/_swe-rebench-v2-mineable-store.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-mint-cli.d.ts +82 -0
- package/dist/solver-types/_swe-rebench-v2-mint-cli.js +434 -0
- package/dist/solver-types/_swe-rebench-v2-mint-cli.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-minted-environment-verifier.d.ts +25 -0
- package/dist/solver-types/_swe-rebench-v2-minted-environment-verifier.js +101 -0
- package/dist/solver-types/_swe-rebench-v2-minted-environment-verifier.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-minted-pool.d.ts +179 -0
- package/dist/solver-types/_swe-rebench-v2-minted-pool.js +408 -0
- package/dist/solver-types/_swe-rebench-v2-minted-pool.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-session-echo.d.ts +36 -0
- package/dist/solver-types/_swe-rebench-v2-session-echo.js +193 -0
- package/dist/solver-types/_swe-rebench-v2-session-echo.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-substrate.d.ts +11 -0
- package/dist/solver-types/_swe-rebench-v2-substrate.js +24 -0
- package/dist/solver-types/_swe-rebench-v2-substrate.js.map +1 -1
- package/dist/solver-types/_swe-rebench-v2-synthetic-claim.d.ts +9 -0
- package/dist/solver-types/_swe-rebench-v2-synthetic-claim.js +16 -0
- package/dist/solver-types/_swe-rebench-v2-synthetic-claim.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-validated-pool.d.ts +144 -1
- package/dist/solver-types/_swe-rebench-v2-validated-pool.js +292 -14
- package/dist/solver-types/_swe-rebench-v2-validated-pool.js.map +1 -1
- package/dist/solver-types/_swe-rebench-v2-verifier-facts.d.ts +93 -0
- package/dist/solver-types/_swe-rebench-v2-verifier-facts.js +583 -0
- package/dist/solver-types/_swe-rebench-v2-verifier-facts.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-yield-report-data.d.ts +5 -0
- package/dist/solver-types/_swe-rebench-v2-yield-report-data.js +16 -0
- package/dist/solver-types/_swe-rebench-v2-yield-report-data.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-yield.d.ts +51 -0
- package/dist/solver-types/_swe-rebench-v2-yield.js +53 -0
- package/dist/solver-types/_swe-rebench-v2-yield.js.map +1 -0
- package/dist/solver-types/index.js +2 -0
- package/dist/solver-types/index.js.map +1 -1
- package/dist/solver-types/jinn-repo-admit.d.ts +17 -0
- package/dist/solver-types/jinn-repo-admit.js +16 -0
- package/dist/solver-types/jinn-repo-admit.js.map +1 -0
- package/dist/solver-types/jinn-repo-auto.d.ts +60 -0
- package/dist/solver-types/jinn-repo-auto.js +163 -0
- package/dist/solver-types/jinn-repo-auto.js.map +1 -0
- package/dist/solver-types/jinn-repo-definition.d.ts +15 -0
- package/dist/solver-types/jinn-repo-definition.js +34 -0
- package/dist/solver-types/jinn-repo-definition.js.map +1 -0
- package/dist/solver-types/jinn-repo-extract.d.ts +16 -0
- package/dist/solver-types/jinn-repo-extract.js +33 -0
- package/dist/solver-types/jinn-repo-extract.js.map +1 -0
- package/dist/solver-types/jinn-repo-live-auto.d.ts +203 -0
- package/dist/solver-types/jinn-repo-live-auto.js +348 -0
- package/dist/solver-types/jinn-repo-live-auto.js.map +1 -0
- package/dist/solver-types/jinn-repo.d.ts +42 -0
- package/dist/solver-types/jinn-repo.js +42 -0
- package/dist/solver-types/jinn-repo.js.map +1 -0
- package/dist/solver-types/learner-loop-test.js +1 -1
- package/dist/solver-types/learner-loop-test.js.map +1 -1
- package/dist/solver-types/slates/held-out-slate.swe-rebench-v2.v3.json +34 -0
- package/dist/solver-types/slates/held-out-slate.swe-rebench-v2.v3.quality-screen.json +186 -0
- package/dist/solver-types/slates/held-out-slate.swe-rebench-v2.v3.screening-report.json +488 -0
- package/dist/solver-types/swe-rebench-v2-auto.d.ts +13 -0
- package/dist/solver-types/swe-rebench-v2-auto.js +36 -1
- package/dist/solver-types/swe-rebench-v2-auto.js.map +1 -1
- package/dist/solver-types/swe-rebench-v2.js +48 -11
- package/dist/solver-types/swe-rebench-v2.js.map +1 -1
- package/dist/solvernets/launched-record-dispatcher.d.ts +14 -0
- package/dist/solvernets/launched-record-dispatcher.js +28 -1
- package/dist/solvernets/launched-record-dispatcher.js.map +1 -1
- package/dist/solvernets/store.d.ts +1 -1
- package/dist/solvernets/store.js +1 -1
- package/dist/solvernets/store.js.map +1 -1
- package/dist/spend/credential.d.ts +2 -2
- package/dist/spend/credential.js +9 -3
- package/dist/spend/credential.js.map +1 -1
- package/dist/spend/spend-cap.d.ts +10 -0
- package/dist/spend/spend-cap.js +13 -0
- package/dist/spend/spend-cap.js.map +1 -0
- package/dist/spend/usage.js +39 -3
- package/dist/spend/usage.js.map +1 -1
- package/dist/store/store.d.ts +59 -1
- package/dist/store/store.js +157 -6
- package/dist/store/store.js.map +1 -1
- package/dist/task-creator/environment/adapters.d.ts +139 -0
- package/dist/task-creator/environment/adapters.js +446 -0
- package/dist/task-creator/environment/adapters.js.map +1 -0
- package/dist/task-creator/environment/build.d.ts +5 -0
- package/dist/task-creator/environment/build.js +53 -0
- package/dist/task-creator/environment/build.js.map +1 -0
- package/dist/task-creator/environment/contracts.d.ts +1338 -0
- package/dist/task-creator/environment/contracts.js +207 -0
- package/dist/task-creator/environment/contracts.js.map +1 -0
- package/dist/task-creator/environment/github.d.ts +25 -0
- package/dist/task-creator/environment/github.js +67 -0
- package/dist/task-creator/environment/github.js.map +1 -0
- package/dist/task-creator/environment/interfaces.d.ts +60 -0
- package/dist/task-creator/environment/interfaces.js +3 -0
- package/dist/task-creator/environment/interfaces.js.map +1 -0
- package/dist/task-creator/environment/jinn-differential-policy.d.ts +22 -0
- package/dist/task-creator/environment/jinn-differential-policy.js +73 -0
- package/dist/task-creator/environment/jinn-differential-policy.js.map +1 -0
- package/dist/task-creator/environment/policy.d.ts +38 -0
- package/dist/task-creator/environment/policy.js +51 -0
- package/dist/task-creator/environment/policy.js.map +1 -0
- package/dist/task-creator/environment/publication.d.ts +39 -0
- package/dist/task-creator/environment/publication.js +139 -0
- package/dist/task-creator/environment/publication.js.map +1 -0
- package/dist/task-creator/environment/publish-cli.d.ts +427 -0
- package/dist/task-creator/environment/publish-cli.js +180 -0
- package/dist/task-creator/environment/publish-cli.js.map +1 -0
- package/dist/task-creator/environment/recipes.d.ts +19 -0
- package/dist/task-creator/environment/recipes.js +122 -0
- package/dist/task-creator/environment/recipes.js.map +1 -0
- package/dist/task-creator/environment/resolver.d.ts +53 -0
- package/dist/task-creator/environment/resolver.js +57 -0
- package/dist/task-creator/environment/resolver.js.map +1 -0
- package/dist/task-creator/proofs/differential-receipt-bound-proof.d.ts +27 -0
- package/dist/task-creator/proofs/differential-receipt-bound-proof.js +86 -0
- package/dist/task-creator/proofs/differential-receipt-bound-proof.js.map +1 -0
- package/dist/task-creator/proofs/ipfs-cid.d.ts +7 -0
- package/dist/task-creator/proofs/ipfs-cid.js +98 -0
- package/dist/task-creator/proofs/ipfs-cid.js.map +1 -0
- package/dist/task-creator/proofs/live-proof.d.ts +99 -0
- package/dist/task-creator/proofs/live-proof.js +419 -0
- package/dist/task-creator/proofs/live-proof.js.map +1 -0
- package/dist/task-creator/proofs/public-repo-fixtures.d.ts +53 -0
- package/dist/task-creator/proofs/public-repo-fixtures.js +93 -0
- package/dist/task-creator/proofs/public-repo-fixtures.js.map +1 -0
- package/dist/task-creator/proofs/vitest-json-fixture.d.ts +40 -0
- package/dist/task-creator/proofs/vitest-json-fixture.js +115 -0
- package/dist/task-creator/proofs/vitest-json-fixture.js.map +1 -0
- package/dist/trajectory/emit.d.ts +6 -0
- package/dist/trajectory/emit.js +9 -1
- package/dist/trajectory/emit.js.map +1 -1
- package/dist/trajectory/harness-bundle-schema.d.ts +3 -3
- package/dist/trajectory/harness-bundle-schema.js +1 -1
- package/dist/trajectory/harness-bundle-schema.js.map +1 -1
- package/dist/trajectory/hash-chain.d.ts +1 -18
- package/dist/trajectory/hash-chain.js +1 -22
- package/dist/trajectory/hash-chain.js.map +1 -1
- package/dist/trajectory/index.d.ts +2 -0
- package/dist/trajectory/index.js +2 -0
- package/dist/trajectory/index.js.map +1 -1
- package/dist/trajectory/processors/identity-scrub.js +22 -3
- package/dist/trajectory/processors/identity-scrub.js.map +1 -1
- package/dist/trajectory/schema.d.ts +1 -598
- package/dist/trajectory/schema.js +1 -102
- package/dist/trajectory/schema.js.map +1 -1
- package/dist/trajectory/scrub/build.d.ts +1 -0
- package/dist/trajectory/scrub/build.js +2 -0
- package/dist/trajectory/scrub/build.js.map +1 -0
- package/dist/trajectory/scrub/emit-scrub.d.ts +1 -0
- package/dist/trajectory/scrub/emit-scrub.js +2 -0
- package/dist/trajectory/scrub/emit-scrub.js.map +1 -0
- package/dist/trajectory/scrub/key-policy.d.ts +1 -0
- package/dist/trajectory/scrub/key-policy.js +2 -0
- package/dist/trajectory/scrub/key-policy.js.map +1 -0
- package/dist/trajectory/scrub/layer2.d.ts +1 -0
- package/dist/trajectory/scrub/layer2.js +2 -0
- package/dist/trajectory/scrub/layer2.js.map +1 -0
- package/dist/trajectory/scrub/ml-pii-stage.d.ts +1 -0
- package/dist/trajectory/scrub/ml-pii-stage.js +2 -0
- package/dist/trajectory/scrub/ml-pii-stage.js.map +1 -0
- package/dist/trajectory/scrub/openredaction-stage.d.ts +1 -0
- package/dist/trajectory/scrub/openredaction-stage.js +2 -0
- package/dist/trajectory/scrub/openredaction-stage.js.map +1 -0
- package/dist/trajectory/scrub/pii-build.d.ts +1 -0
- package/dist/trajectory/scrub/pii-build.js +2 -0
- package/dist/trajectory/scrub/pii-build.js.map +1 -0
- package/dist/trajectory/scrub/pipeline.d.ts +1 -0
- package/dist/trajectory/scrub/pipeline.js +2 -0
- package/dist/trajectory/scrub/pipeline.js.map +1 -0
- package/dist/trajectory/scrub/plain-patterns-stage.d.ts +1 -0
- package/dist/trajectory/scrub/plain-patterns-stage.js +2 -0
- package/dist/trajectory/scrub/plain-patterns-stage.js.map +1 -0
- package/dist/trajectory/scrub/secretlint-stage.d.ts +1 -0
- package/dist/trajectory/scrub/secretlint-stage.js +2 -0
- package/dist/trajectory/scrub/secretlint-stage.js.map +1 -0
- package/dist/trajectory/scrub/transformers-detector.d.ts +1 -0
- package/dist/trajectory/scrub/transformers-detector.js +2 -0
- package/dist/trajectory/scrub/transformers-detector.js.map +1 -0
- package/dist/trajectory/scrub/types.d.ts +1 -0
- package/dist/trajectory/scrub/types.js +2 -0
- package/dist/trajectory/scrub/types.js.map +1 -0
- package/dist/trajectory/secret-scrub.d.ts +4 -6
- package/dist/trajectory/secret-scrub.js +52 -12
- package/dist/trajectory/secret-scrub.js.map +1 -1
- package/dist/trajectory/span-profile.js +14 -0
- package/dist/trajectory/span-profile.js.map +1 -1
- package/dist/trajectory/transcript-parsers/aider-history.d.ts +1 -42
- package/dist/trajectory/transcript-parsers/aider-history.js +1 -181
- package/dist/trajectory/transcript-parsers/aider-history.js.map +1 -1
- package/dist/trajectory/transcript-parsers/claude-code-jsonl.d.ts +1 -37
- package/dist/trajectory/transcript-parsers/claude-code-jsonl.js +1 -142
- package/dist/trajectory/transcript-parsers/claude-code-jsonl.js.map +1 -1
- package/dist/trajectory/transcript-parsers/codex-session.d.ts +1 -42
- package/dist/trajectory/transcript-parsers/codex-session.js +1 -235
- package/dist/trajectory/transcript-parsers/codex-session.js.map +1 -1
- package/dist/trajectory/transcript-parsers/continue-devdata.d.ts +1 -41
- package/dist/trajectory/transcript-parsers/continue-devdata.js +1 -190
- package/dist/trajectory/transcript-parsers/continue-devdata.js.map +1 -1
- package/dist/trajectory/transcript-parsers/cursor-sqlite.d.ts +1 -38
- package/dist/trajectory/transcript-parsers/cursor-sqlite.js +1 -118
- package/dist/trajectory/transcript-parsers/cursor-sqlite.js.map +1 -1
- package/dist/trajectory/transcript-parsers/gemini-session.d.ts +1 -35
- package/dist/trajectory/transcript-parsers/gemini-session.js +1 -137
- package/dist/trajectory/transcript-parsers/gemini-session.js.map +1 -1
- package/dist/trajectory/transcript-parsers/types.d.ts +1 -101
- package/dist/trajectory/transcript-parsers/types.js +1 -32
- package/dist/trajectory/transcript-parsers/types.js.map +1 -1
- package/dist/trajectory/transcript-to-spans/attrs.d.ts +1 -0
- package/dist/trajectory/transcript-to-spans/attrs.js +2 -0
- package/dist/trajectory/transcript-to-spans/attrs.js.map +1 -0
- package/dist/trajectory/transcript-to-spans/claude-code-stream-json.d.ts +1 -0
- package/dist/trajectory/transcript-to-spans/claude-code-stream-json.js +2 -0
- package/dist/trajectory/transcript-to-spans/claude-code-stream-json.js.map +1 -0
- package/dist/trajectory/transcript-to-spans/codex-exec-json.d.ts +1 -0
- package/dist/trajectory/transcript-to-spans/codex-exec-json.js +2 -0
- package/dist/trajectory/transcript-to-spans/codex-exec-json.js.map +1 -0
- package/dist/trajectory/transcript-to-spans/hermes-session-json.d.ts +48 -0
- package/dist/trajectory/transcript-to-spans/hermes-session-json.js +193 -0
- package/dist/trajectory/transcript-to-spans/hermes-session-json.js.map +1 -0
- package/dist/trajectory/transcript-to-spans/index.d.ts +38 -0
- package/dist/trajectory/transcript-to-spans/index.js +77 -0
- package/dist/trajectory/transcript-to-spans/index.js.map +1 -0
- package/dist/trajectory/transcript-to-spans/types.d.ts +16 -0
- package/dist/trajectory/transcript-to-spans/types.js +11 -0
- package/dist/trajectory/transcript-to-spans/types.js.map +1 -0
- package/dist/trajectory/transcript-watcher.d.ts +41 -0
- package/dist/trajectory/transcript-watcher.js +34 -0
- package/dist/trajectory/transcript-watcher.js.map +1 -1
- package/dist/tx-retry.d.ts +18 -0
- package/dist/tx-retry.js +52 -12
- package/dist/tx-retry.js.map +1 -1
- package/dist/types/envelope.d.ts +3 -2785
- package/dist/types/envelope.js +3 -160
- package/dist/types/envelope.js.map +1 -1
- package/dist/types/manifest.d.ts +1 -0
- package/dist/types/manifest.js +2 -0
- package/dist/types/manifest.js.map +1 -0
- package/dist/types/payloads/index.d.ts +1 -1
- package/dist/types/payloads/index.js +7 -1
- package/dist/types/payloads/index.js.map +1 -1
- package/dist/types/payloads/portfolio-v0.d.ts +4 -4
- package/dist/types/payloads/portfolio-v0.js +1 -1
- package/dist/types/payloads/portfolio-v0.js.map +1 -1
- package/dist/types/payloads/prediction-apy-v0.d.ts +4 -4
- package/dist/types/payloads/prediction-apy-v0.js +1 -1
- package/dist/types/payloads/prediction-apy-v0.js.map +1 -1
- package/dist/types/payloads/prediction-v0.d.ts +4 -4
- package/dist/types/payloads/prediction-v0.js +1 -1
- package/dist/types/payloads/prediction-v0.js.map +1 -1
- package/dist/types/portfolio.d.ts +1 -1
- package/dist/types/portfolio.js +1 -1
- package/dist/types/portfolio.js.map +1 -1
- package/dist/types/prediction-apy.d.ts +1 -1
- package/dist/types/prediction-apy.js +1 -1
- package/dist/types/prediction-apy.js.map +1 -1
- package/dist/types/prediction.d.ts +1 -1
- package/dist/types/prediction.js +1 -1
- package/dist/types/prediction.js.map +1 -1
- package/dist/types/session-provenance.d.ts +2 -71
- package/dist/types/session-provenance.js +2 -18
- package/dist/types/session-provenance.js.map +1 -1
- package/dist/types/skill-artifact.d.ts +5 -0
- package/dist/types/skill-artifact.js +6 -0
- package/dist/types/skill-artifact.js.map +1 -0
- package/dist/types/task-document.d.ts +315 -1
- package/dist/types/task-document.js +9 -1
- package/dist/types/task-document.js.map +1 -1
- package/dist/types/task-run-read-model.d.ts +21 -0
- package/dist/types/task-run-read-model.js +2 -0
- package/dist/types/task-run-read-model.js.map +1 -0
- package/dist/types/task-run.d.ts +88 -0
- package/dist/types/task-run.js +2 -0
- package/dist/types/task-run.js.map +1 -0
- package/dist/types/task.d.ts +36 -1
- package/dist/types/task.js +1 -1
- package/dist/types/task.js.map +1 -1
- package/dist/types/window.d.ts +2 -12
- package/dist/types/window.js +2 -5
- package/dist/types/window.js.map +1 -1
- package/dist/util/redact-rpc-urls.d.ts +1 -1
- package/dist/util/redact-rpc-urls.js +57 -2
- package/dist/util/redact-rpc-urls.js.map +1 -1
- package/dist/vendor/@jinn-network/core/dist/canonical-json.d.ts +1 -0
- package/dist/vendor/@jinn-network/core/dist/canonical-json.js +67 -0
- package/dist/vendor/@jinn-network/core/dist/captured-task.d.ts +140 -0
- package/dist/vendor/@jinn-network/core/dist/captured-task.js +122 -0
- package/dist/vendor/@jinn-network/core/dist/contribution-store.d.ts +97 -0
- package/dist/vendor/@jinn-network/core/dist/contribution-store.js +770 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/acquire.d.ts +39 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/acquire.js +212 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/cache.d.ts +14 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/cache.js +17 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/capture-meta.d.ts +16 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/capture-meta.js +18 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/create-corpus.d.ts +2 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/create-corpus.js +97 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/fetch-artifact.d.ts +21 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/fetch-artifact.js +32 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/fetch.d.ts +12 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/fetch.js +24 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/http-discovery.d.ts +9 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/http-discovery.js +128 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/index.d.ts +10 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/index.js +10 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/ipfs.d.ts +5 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/ipfs.js +72 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/route-resolver.d.ts +16 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/route-resolver.js +19 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/types.d.ts +177 -0
- package/dist/vendor/@jinn-network/core/dist/corpus-read/types.js +42 -0
- package/dist/vendor/@jinn-network/core/dist/envelope.d.ts +134 -0
- package/dist/vendor/@jinn-network/core/dist/envelope.js +162 -0
- package/dist/vendor/@jinn-network/core/dist/evidence-adapter.d.ts +26 -0
- package/dist/vendor/@jinn-network/core/dist/evidence-adapter.js +321 -0
- package/dist/vendor/@jinn-network/core/dist/evidence-filesystem.d.ts +40 -0
- package/dist/vendor/@jinn-network/core/dist/evidence-filesystem.js +267 -0
- package/dist/vendor/@jinn-network/core/dist/evidence-index.d.ts +117 -0
- package/dist/vendor/@jinn-network/core/dist/evidence-index.js +1083 -0
- package/dist/vendor/@jinn-network/core/dist/evidence-store-lock.d.ts +2 -0
- package/dist/vendor/@jinn-network/core/dist/evidence-store-lock.js +208 -0
- package/dist/vendor/@jinn-network/core/dist/execution-envelope.d.ts +3142 -0
- package/dist/vendor/@jinn-network/core/dist/execution-envelope.js +203 -0
- package/dist/vendor/@jinn-network/core/dist/index.d.ts +12 -0
- package/dist/vendor/@jinn-network/core/dist/index.js +12 -0
- package/dist/vendor/@jinn-network/core/dist/manifest.d.ts +75 -0
- package/dist/vendor/@jinn-network/core/dist/manifest.js +184 -0
- package/dist/vendor/@jinn-network/core/dist/paired.d.ts +68 -0
- package/dist/vendor/@jinn-network/core/dist/paired.js +92 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/build.d.ts +55 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/build.js +87 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/emit-scrub.d.ts +41 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/emit-scrub.js +87 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/index.d.ts +12 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/index.js +12 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/key-policy.d.ts +20 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/key-policy.js +42 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/layer2.d.ts +24 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/layer2.js +33 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/ml-pii-stage.d.ts +24 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/ml-pii-stage.js +42 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/openredaction-stage.d.ts +196 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/openredaction-stage.js +270 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/pii-build.d.ts +38 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/pii-build.js +67 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/pipeline.d.ts +38 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/pipeline.js +83 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/plain-patterns-stage.d.ts +42 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/plain-patterns-stage.js +114 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/secretlint-stage.d.ts +36 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/secretlint-stage.js +249 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/transformers-detector.d.ts +35 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/transformers-detector.js +67 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/types.d.ts +25 -0
- package/dist/vendor/@jinn-network/core/dist/scrub/types.js +1 -0
- package/dist/vendor/@jinn-network/core/dist/session-provenance.d.ts +75 -0
- package/dist/vendor/@jinn-network/core/dist/session-provenance.js +20 -0
- package/dist/vendor/@jinn-network/core/dist/skill-artifact.d.ts +442 -0
- package/dist/vendor/@jinn-network/core/dist/skill-artifact.js +136 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/hash-chain.d.ts +18 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/hash-chain.js +47 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/index.d.ts +4 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/index.js +4 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/schema.d.ts +606 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/schema.js +110 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/aider-history.d.ts +42 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/aider-history.js +181 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/claude-code-jsonl.d.ts +37 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/claude-code-jsonl.js +142 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/codex-session.d.ts +42 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/codex-session.js +235 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/continue-devdata.d.ts +41 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/continue-devdata.js +190 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/cursor-sqlite.d.ts +38 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/cursor-sqlite.js +118 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/gemini-session.d.ts +35 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/gemini-session.js +137 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/index.d.ts +7 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/index.js +7 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/types.d.ts +101 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-parsers/types.js +32 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-to-spans/attrs.d.ts +4 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-to-spans/attrs.js +30 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-to-spans/claude-code-stream-json.d.ts +8 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-to-spans/claude-code-stream-json.js +162 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-to-spans/codex-exec-json.d.ts +8 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-to-spans/codex-exec-json.js +253 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-to-spans/index.d.ts +4 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-to-spans/index.js +4 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-to-spans/types.d.ts +18 -0
- package/dist/vendor/@jinn-network/core/dist/trajectory/transcript-to-spans/types.js +1 -0
- package/dist/vendor/@jinn-network/core/dist/window.d.ts +12 -0
- package/dist/vendor/@jinn-network/core/dist/window.js +5 -0
- package/dist/vendor/@jinn-network/core/package.json +38 -0
- package/dist/vendor/@jinn-network/plugin/dist/eligibility.d.ts +12 -0
- package/dist/vendor/@jinn-network/plugin/dist/eligibility.js +12 -0
- package/dist/vendor/@jinn-network/plugin/dist/history.d.ts +35 -0
- package/dist/vendor/@jinn-network/plugin/dist/history.js +140 -0
- package/dist/vendor/@jinn-network/plugin/dist/index.d.ts +32 -0
- package/dist/vendor/@jinn-network/plugin/dist/index.js +15 -0
- package/dist/vendor/@jinn-network/plugin/dist/outcome.d.ts +26 -0
- package/dist/vendor/@jinn-network/plugin/dist/outcome.js +23 -0
- package/dist/vendor/@jinn-network/plugin/dist/pickup.d.ts +101 -0
- package/dist/vendor/@jinn-network/plugin/dist/pickup.js +354 -0
- package/dist/vendor/@jinn-network/plugin/dist/plugin.d.ts +157 -0
- package/dist/vendor/@jinn-network/plugin/dist/plugin.js +586 -0
- package/dist/vendor/@jinn-network/plugin/dist/ports/contribution-port.d.ts +53 -0
- package/dist/vendor/@jinn-network/plugin/dist/ports/contribution-port.js +14 -0
- package/dist/vendor/@jinn-network/plugin/dist/ports/corpus-port.d.ts +63 -0
- package/dist/vendor/@jinn-network/plugin/dist/ports/corpus-port.js +1 -0
- package/dist/vendor/@jinn-network/plugin/dist/ports/evidence-port.d.ts +17 -0
- package/dist/vendor/@jinn-network/plugin/dist/ports/evidence-port.js +1 -0
- package/dist/vendor/@jinn-network/plugin/dist/ports/local-learning-port.d.ts +22 -0
- package/dist/vendor/@jinn-network/plugin/dist/ports/local-learning-port.js +1 -0
- package/dist/vendor/@jinn-network/plugin/dist/ports/skills-port.d.ts +12 -0
- package/dist/vendor/@jinn-network/plugin/dist/ports/skills-port.js +1 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/contribution-candidate.d.ts +116 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/contribution-candidate.js +63 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/eligibility-verdict.d.ts +8 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/eligibility-verdict.js +7 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/episode.d.ts +432 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/episode.js +452 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/history-entry.d.ts +40 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/history-entry.js +30 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/knowledge-hit.d.ts +27 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/knowledge-hit.js +23 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/knowledge-packet.d.ts +79 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/knowledge-packet.js +213 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/pickup-config.d.ts +20 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/pickup-config.js +34 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/session-summary.d.ts +17 -0
- package/dist/vendor/@jinn-network/plugin/dist/schemas/session-summary.js +19 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/contract-kits.d.ts +12 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/contract-kits.js +201 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/in-memory-contribution.d.ts +93 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/in-memory-contribution.js +104 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/in-memory-corpus.d.ts +47 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/in-memory-corpus.js +54 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/in-memory-evidence.d.ts +335 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/in-memory-evidence.js +23 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/in-memory-local-learning.d.ts +25 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/in-memory-local-learning.js +30 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/in-memory-skills.d.ts +9 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing/in-memory-skills.js +16 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing.d.ts +6 -0
- package/dist/vendor/@jinn-network/plugin/dist/testing.js +8 -0
- package/dist/vendor/@jinn-network/plugin/dist/visibility.d.ts +7 -0
- package/dist/vendor/@jinn-network/plugin/dist/visibility.js +9 -0
- package/dist/vendor/@jinn-network/plugin/package.json +22 -0
- package/dist/vendor/@jinn-network/sdk/dist/checkpoint.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/checkpoint.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/contracts.d.ts +3 -2
- package/dist/vendor/@jinn-network/sdk/dist/contracts.js +49 -0
- package/dist/vendor/@jinn-network/sdk/dist/jinn-repo.d.ts +214 -0
- package/dist/vendor/@jinn-network/sdk/dist/jinn-repo.js +75 -0
- package/dist/vendor/@jinn-network/sdk/dist/json-schema.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/json-schema.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/payloads/jinn-repo.d.ts +140 -0
- package/dist/vendor/@jinn-network/sdk/dist/payloads/jinn-repo.js +52 -0
- package/dist/vendor/@jinn-network/sdk/dist/payloads/prediction-v1.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/payloads/prediction-v1.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/payloads/session-derived.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/payloads/session-derived.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/payloads/swe-rebench-v2.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/payloads/swe-rebench-v2.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/prediction-v1.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/prediction-v1.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/jinn-repo.d.ts +4 -0
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/jinn-repo.js +2 -0
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/manifest-schema.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/manifest-schema.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/swe-rebench-v2.d.ts +34 -6
- package/dist/vendor/@jinn-network/sdk/dist/swe-rebench-v2.js +28 -5
- package/dist/vendor/@jinn-network/sdk/package.json +5 -1
- package/node_modules/@jinn-network/core/dist/canonical-json.d.ts +1 -0
- package/node_modules/@jinn-network/core/dist/canonical-json.js +67 -0
- package/node_modules/@jinn-network/core/dist/captured-task.d.ts +140 -0
- package/node_modules/@jinn-network/core/dist/captured-task.js +122 -0
- package/node_modules/@jinn-network/core/dist/contribution-store.d.ts +97 -0
- package/node_modules/@jinn-network/core/dist/contribution-store.js +770 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/acquire.d.ts +39 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/acquire.js +212 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/cache.d.ts +14 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/cache.js +17 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/capture-meta.d.ts +16 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/capture-meta.js +18 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/create-corpus.d.ts +2 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/create-corpus.js +97 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/fetch-artifact.d.ts +21 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/fetch-artifact.js +32 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/fetch.d.ts +12 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/fetch.js +24 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/http-discovery.d.ts +9 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/http-discovery.js +128 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/index.d.ts +10 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/index.js +10 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/ipfs.d.ts +5 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/ipfs.js +72 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/route-resolver.d.ts +16 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/route-resolver.js +19 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/types.d.ts +177 -0
- package/node_modules/@jinn-network/core/dist/corpus-read/types.js +42 -0
- package/node_modules/@jinn-network/core/dist/envelope.d.ts +134 -0
- package/node_modules/@jinn-network/core/dist/envelope.js +162 -0
- package/node_modules/@jinn-network/core/dist/evidence-adapter.d.ts +26 -0
- package/node_modules/@jinn-network/core/dist/evidence-adapter.js +321 -0
- package/node_modules/@jinn-network/core/dist/evidence-filesystem.d.ts +40 -0
- package/node_modules/@jinn-network/core/dist/evidence-filesystem.js +267 -0
- package/node_modules/@jinn-network/core/dist/evidence-index.d.ts +117 -0
- package/node_modules/@jinn-network/core/dist/evidence-index.js +1083 -0
- package/node_modules/@jinn-network/core/dist/evidence-store-lock.d.ts +2 -0
- package/node_modules/@jinn-network/core/dist/evidence-store-lock.js +208 -0
- package/node_modules/@jinn-network/core/dist/execution-envelope.d.ts +3142 -0
- package/node_modules/@jinn-network/core/dist/execution-envelope.js +203 -0
- package/node_modules/@jinn-network/core/dist/index.d.ts +12 -0
- package/node_modules/@jinn-network/core/dist/index.js +12 -0
- package/node_modules/@jinn-network/core/dist/manifest.d.ts +75 -0
- package/node_modules/@jinn-network/core/dist/manifest.js +184 -0
- package/node_modules/@jinn-network/core/dist/paired.d.ts +68 -0
- package/node_modules/@jinn-network/core/dist/paired.js +92 -0
- package/node_modules/@jinn-network/core/dist/scrub/build.d.ts +55 -0
- package/node_modules/@jinn-network/core/dist/scrub/build.js +87 -0
- package/node_modules/@jinn-network/core/dist/scrub/emit-scrub.d.ts +41 -0
- package/node_modules/@jinn-network/core/dist/scrub/emit-scrub.js +87 -0
- package/node_modules/@jinn-network/core/dist/scrub/index.d.ts +12 -0
- package/node_modules/@jinn-network/core/dist/scrub/index.js +12 -0
- package/node_modules/@jinn-network/core/dist/scrub/key-policy.d.ts +20 -0
- package/node_modules/@jinn-network/core/dist/scrub/key-policy.js +42 -0
- package/node_modules/@jinn-network/core/dist/scrub/layer2.d.ts +24 -0
- package/node_modules/@jinn-network/core/dist/scrub/layer2.js +33 -0
- package/node_modules/@jinn-network/core/dist/scrub/ml-pii-stage.d.ts +24 -0
- package/node_modules/@jinn-network/core/dist/scrub/ml-pii-stage.js +42 -0
- package/node_modules/@jinn-network/core/dist/scrub/openredaction-stage.d.ts +196 -0
- package/node_modules/@jinn-network/core/dist/scrub/openredaction-stage.js +270 -0
- package/node_modules/@jinn-network/core/dist/scrub/pii-build.d.ts +38 -0
- package/node_modules/@jinn-network/core/dist/scrub/pii-build.js +67 -0
- package/node_modules/@jinn-network/core/dist/scrub/pipeline.d.ts +38 -0
- package/node_modules/@jinn-network/core/dist/scrub/pipeline.js +83 -0
- package/node_modules/@jinn-network/core/dist/scrub/plain-patterns-stage.d.ts +42 -0
- package/node_modules/@jinn-network/core/dist/scrub/plain-patterns-stage.js +114 -0
- package/node_modules/@jinn-network/core/dist/scrub/secretlint-stage.d.ts +36 -0
- package/node_modules/@jinn-network/core/dist/scrub/secretlint-stage.js +249 -0
- package/node_modules/@jinn-network/core/dist/scrub/transformers-detector.d.ts +35 -0
- package/node_modules/@jinn-network/core/dist/scrub/transformers-detector.js +67 -0
- package/node_modules/@jinn-network/core/dist/scrub/types.d.ts +25 -0
- package/node_modules/@jinn-network/core/dist/scrub/types.js +1 -0
- package/node_modules/@jinn-network/core/dist/session-provenance.d.ts +75 -0
- package/node_modules/@jinn-network/core/dist/session-provenance.js +20 -0
- package/node_modules/@jinn-network/core/dist/skill-artifact.d.ts +442 -0
- package/node_modules/@jinn-network/core/dist/skill-artifact.js +136 -0
- package/node_modules/@jinn-network/core/dist/trajectory/hash-chain.d.ts +18 -0
- package/node_modules/@jinn-network/core/dist/trajectory/hash-chain.js +47 -0
- package/node_modules/@jinn-network/core/dist/trajectory/index.d.ts +4 -0
- package/node_modules/@jinn-network/core/dist/trajectory/index.js +4 -0
- package/node_modules/@jinn-network/core/dist/trajectory/schema.d.ts +606 -0
- package/node_modules/@jinn-network/core/dist/trajectory/schema.js +110 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/aider-history.d.ts +42 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/aider-history.js +181 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/claude-code-jsonl.d.ts +37 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/claude-code-jsonl.js +142 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/codex-session.d.ts +42 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/codex-session.js +235 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/continue-devdata.d.ts +41 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/continue-devdata.js +190 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/cursor-sqlite.d.ts +38 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/cursor-sqlite.js +118 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/gemini-session.d.ts +35 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/gemini-session.js +137 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/index.d.ts +7 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/index.js +7 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/types.d.ts +101 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-parsers/types.js +32 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-to-spans/attrs.d.ts +4 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-to-spans/attrs.js +30 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-to-spans/claude-code-stream-json.d.ts +8 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-to-spans/claude-code-stream-json.js +162 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-to-spans/codex-exec-json.d.ts +8 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-to-spans/codex-exec-json.js +253 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-to-spans/index.d.ts +4 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-to-spans/index.js +4 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-to-spans/types.d.ts +18 -0
- package/node_modules/@jinn-network/core/dist/trajectory/transcript-to-spans/types.js +1 -0
- package/node_modules/@jinn-network/core/dist/window.d.ts +12 -0
- package/node_modules/@jinn-network/core/dist/window.js +5 -0
- package/node_modules/@jinn-network/core/package.json +61 -0
- package/node_modules/@jinn-network/plugin/dist/eligibility.d.ts +12 -0
- package/node_modules/@jinn-network/plugin/dist/eligibility.js +12 -0
- package/node_modules/@jinn-network/plugin/dist/history.d.ts +35 -0
- package/node_modules/@jinn-network/plugin/dist/history.js +140 -0
- package/node_modules/@jinn-network/plugin/dist/index.d.ts +32 -0
- package/node_modules/@jinn-network/plugin/dist/index.js +15 -0
- package/node_modules/@jinn-network/plugin/dist/outcome.d.ts +26 -0
- package/node_modules/@jinn-network/plugin/dist/outcome.js +23 -0
- package/node_modules/@jinn-network/plugin/dist/pickup.d.ts +101 -0
- package/node_modules/@jinn-network/plugin/dist/pickup.js +354 -0
- package/node_modules/@jinn-network/plugin/dist/plugin.d.ts +157 -0
- package/node_modules/@jinn-network/plugin/dist/plugin.js +586 -0
- package/node_modules/@jinn-network/plugin/dist/ports/contribution-port.d.ts +53 -0
- package/node_modules/@jinn-network/plugin/dist/ports/contribution-port.js +14 -0
- package/node_modules/@jinn-network/plugin/dist/ports/corpus-port.d.ts +63 -0
- package/node_modules/@jinn-network/plugin/dist/ports/corpus-port.js +1 -0
- package/node_modules/@jinn-network/plugin/dist/ports/evidence-port.d.ts +17 -0
- package/node_modules/@jinn-network/plugin/dist/ports/evidence-port.js +1 -0
- package/node_modules/@jinn-network/plugin/dist/ports/local-learning-port.d.ts +22 -0
- package/node_modules/@jinn-network/plugin/dist/ports/local-learning-port.js +1 -0
- package/node_modules/@jinn-network/plugin/dist/ports/skills-port.d.ts +12 -0
- package/node_modules/@jinn-network/plugin/dist/ports/skills-port.js +1 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/contribution-candidate.d.ts +116 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/contribution-candidate.js +63 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/eligibility-verdict.d.ts +8 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/eligibility-verdict.js +7 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/episode.d.ts +432 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/episode.js +452 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/history-entry.d.ts +40 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/history-entry.js +30 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/knowledge-hit.d.ts +27 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/knowledge-hit.js +23 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/knowledge-packet.d.ts +79 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/knowledge-packet.js +213 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/pickup-config.d.ts +20 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/pickup-config.js +34 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/session-summary.d.ts +17 -0
- package/node_modules/@jinn-network/plugin/dist/schemas/session-summary.js +19 -0
- package/node_modules/@jinn-network/plugin/dist/testing/contract-kits.d.ts +12 -0
- package/node_modules/@jinn-network/plugin/dist/testing/contract-kits.js +201 -0
- package/node_modules/@jinn-network/plugin/dist/testing/in-memory-contribution.d.ts +93 -0
- package/node_modules/@jinn-network/plugin/dist/testing/in-memory-contribution.js +104 -0
- package/node_modules/@jinn-network/plugin/dist/testing/in-memory-corpus.d.ts +47 -0
- package/node_modules/@jinn-network/plugin/dist/testing/in-memory-corpus.js +54 -0
- package/node_modules/@jinn-network/plugin/dist/testing/in-memory-evidence.d.ts +335 -0
- package/node_modules/@jinn-network/plugin/dist/testing/in-memory-evidence.js +23 -0
- package/node_modules/@jinn-network/plugin/dist/testing/in-memory-local-learning.d.ts +25 -0
- package/node_modules/@jinn-network/plugin/dist/testing/in-memory-local-learning.js +30 -0
- package/node_modules/@jinn-network/plugin/dist/testing/in-memory-skills.d.ts +9 -0
- package/node_modules/@jinn-network/plugin/dist/testing/in-memory-skills.js +16 -0
- package/node_modules/@jinn-network/plugin/dist/testing.d.ts +6 -0
- package/node_modules/@jinn-network/plugin/dist/testing.js +8 -0
- package/node_modules/@jinn-network/plugin/dist/visibility.d.ts +7 -0
- package/node_modules/@jinn-network/plugin/dist/visibility.js +9 -0
- package/node_modules/@jinn-network/plugin/package.json +50 -0
- package/node_modules/@jinn-network/plugin/process-contract.json +8 -0
- package/package.json +60 -18
- package/plugins/jinn-repo-runtime/.claude-plugin/plugin.json +5 -0
- package/plugins/jinn-repo-runtime/.codex-plugin/plugin.json +39 -0
- package/plugins/jinn-repo-runtime/README.md +27 -0
- package/plugins/jinn-repo-runtime/hooks/hooks.json +16 -0
- package/plugins/jinn-repo-runtime/hooks/session-start +73 -0
- package/plugins/jinn-repo-runtime/jinn.plugin.json +11 -0
- package/plugins/jinn-repo-runtime/skills/task/SKILL.md +92 -0
- package/skills/jinn-operator/SKILL.md +29 -15
- package/deployments/deployment-jinn-mvi-l1-sepolia-fast.json +0 -55
- package/deployments/deployment-jinn-mvi-l1-sepolia.json +0 -55
- package/deployments/deployment-jinn-mvi-l2-baseSepolia.json +0 -13
- package/deployments/deployment-jinn-testnet-faucet-baseSepolia-fast.json +0 -15
- package/dist/api/peers.js.map +0 -1
- package/dist/daemon/jinn-claim-loop-canonical.d.ts +0 -207
- package/dist/daemon/jinn-claim-loop-canonical.js +0 -296
- package/dist/daemon/jinn-claim-loop-canonical.js.map +0 -1
- package/dist/daemon/jinn-claim-loop-mock.d.ts +0 -61
- package/dist/daemon/jinn-claim-loop-mock.js +0 -122
- package/dist/daemon/jinn-claim-loop-mock.js.map +0 -1
- package/dist/daemon/jinn-claim-loop-wiring.d.ts +0 -33
- package/dist/daemon/jinn-claim-loop-wiring.js +0 -40
- package/dist/daemon/jinn-claim-loop-wiring.js.map +0 -1
- package/dist/daemon/jinn-claim-loop.d.ts +0 -130
- package/dist/daemon/jinn-claim-loop.js +0 -328
- package/dist/daemon/jinn-claim-loop.js.map +0 -1
- package/dist/dashboard/assets/index-BVAWkLwY.css +0 -1
- package/dist/dashboard/assets/index-DEPqtGOA.js +0 -167
- package/dist/earning/jinn-rewards.js.map +0 -1
- package/dist/scripts/donation-consumption-acceptance.d.ts +0 -85
- package/dist/scripts/donation-consumption-acceptance.js +0 -1382
- package/dist/scripts/donation-consumption-acceptance.js.map +0 -1
- package/dist/x402/acquire.d.ts +0 -17
- package/dist/x402/acquire.js +0 -49
- package/dist/x402/acquire.js.map +0 -1
- package/dist/x402/facilitator.d.ts +0 -11
- package/dist/x402/facilitator.js +0 -52
- package/dist/x402/facilitator.js.map +0 -1
- package/dist/x402/handler.d.ts +0 -27
- package/dist/x402/handler.js +0 -236
- package/dist/x402/handler.js.map +0 -1
- /package/dist/{api/peers.d.ts → daemon/peer-sync.d.ts} +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/** Evidence-first pickup policy (rescope design §3.3; lexical v2 term
|
|
2
|
+
* selection — #1791, #1790, #1789). No I/O: term derivation + selection
|
|
3
|
+
* only. Orchestration (search/get over ports, packet projection, rendering)
|
|
4
|
+
* lives in plugin.ts. */
|
|
5
|
+
import type { CorpusRecord } from './ports/corpus-port.js';
|
|
6
|
+
import type { KnowledgeHit } from './schemas/knowledge-hit.js';
|
|
7
|
+
export declare const STOPWORDS: ReadonlySet<string>;
|
|
8
|
+
/**
|
|
9
|
+
* The repository vocabulary shared by interactive pickup and repo-scoped
|
|
10
|
+
* corpus probes. A full `owner/repo` slug does not occur in record text; the
|
|
11
|
+
* repository name is the searchable term (#1790). Keep the minimum length in
|
|
12
|
+
* this one helper so non-session consumers cannot drift from pickup.
|
|
13
|
+
*/
|
|
14
|
+
export declare function deriveRepositorySearchTerms(repositorySlug?: string): string[];
|
|
15
|
+
/**
|
|
16
|
+
* Up to `maxTerms` deterministic lowercase search terms, in priority order
|
|
17
|
+
* (rescope §3.3, lexical v2 — #1791/#1790/#1789): backticked/quoted tokens
|
|
18
|
+
* (edge-stripped, near-verbatim); identifier-shaped tokens — a `/`-bearing
|
|
19
|
+
* one also contributes its path segments, right after the full token; the
|
|
20
|
+
* session repository's NAME (not its full slug, #1790); the remaining
|
|
21
|
+
* non-stopword tokens (>=4 chars) in MESSAGE ORDER — order of first
|
|
22
|
+
* appearance, not longest-first (#1791: length is not a retrievability
|
|
23
|
+
* signal against a corpus of short summaries and tags). Operates over the
|
|
24
|
+
* whole message (not just the first line). Deduplicated.
|
|
25
|
+
*/
|
|
26
|
+
export declare function deriveSearchTerms(message: string, repositorySlug?: string, maxTerms?: number): string[];
|
|
27
|
+
/** Ports classify_payload — 'skill' or 'unknown'. Prefers the explicit
|
|
28
|
+
* payloadKind classification field; falls back to hit.kind === 'skill'. */
|
|
29
|
+
export declare function classifyPayload(hit: Pick<KnowledgeHit, 'payloadKind' | 'kind'>): 'skill' | 'unknown';
|
|
30
|
+
/** Dedup by ref, then by content key (rescope §3.3 step 2). */
|
|
31
|
+
export declare function dedupeKnowledgeHits(hits: KnowledgeHit[]): KnowledgeHit[];
|
|
32
|
+
export declare const RELEVANCE_FLOOR = 2;
|
|
33
|
+
export declare const MAX_SELECTED_PACKETS = 2;
|
|
34
|
+
export declare const MAX_CONTENT_RESCORE_CANDIDATES = 3;
|
|
35
|
+
export interface ScoredKnowledgeHit {
|
|
36
|
+
hit: KnowledgeHit;
|
|
37
|
+
score: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The scoring vocabulary: `terms` minus the repository-name term (#1886).
|
|
41
|
+
*
|
|
42
|
+
* The repository name tags every record in an in-repo corpus, so it matches
|
|
43
|
+
* everything and discriminates nothing — yet it counted 1 toward
|
|
44
|
+
* `RELEVANCE_FLOOR`, halving the effective floor for any query issued inside
|
|
45
|
+
* the repository. It remains a *search* term (it is what surfaces
|
|
46
|
+
* repo-relevant records at all); it just no longer helps a record clear the
|
|
47
|
+
* floor. Callers pass the full list to search and this list to scoring.
|
|
48
|
+
*/
|
|
49
|
+
export declare function discriminatingTerms(terms: string[], repositorySlug?: string): string[];
|
|
50
|
+
/** Count of matched terms across `taskSummary + tags` (rescope §3.3 step 3,
|
|
51
|
+
* lexical v2 — #1790/#1791) — every match counts 1. The repository-slug
|
|
52
|
+
* match used to count 2, but the slug it matched against could never
|
|
53
|
+
* appear in a record's text (#1790); the repository's NAME is now a
|
|
54
|
+
* normal derived term (see `deriveSearchTerms` step 3) and scores like any
|
|
55
|
+
* other term, with no special case. */
|
|
56
|
+
export declare function scoreKnowledgeHit(hit: KnowledgeHit, terms: string[]): number;
|
|
57
|
+
/**
|
|
58
|
+
* Re-score an already plausible metadata candidate against the two concise,
|
|
59
|
+
* human-authored content fields available after `CorpusPort.get`: synthesis
|
|
60
|
+
* and step titles. Each original normalized term contributes at most one
|
|
61
|
+
* point across metadata + content, so repeating the same match in synthesis
|
|
62
|
+
* cannot manufacture relevance.
|
|
63
|
+
*/
|
|
64
|
+
export declare function scoreKnowledgeRecord(hit: KnowledgeHit, record: CorpusRecord, terms: string[]): number;
|
|
65
|
+
/** Return a copied, deterministically ranked scored-candidate list. */
|
|
66
|
+
export declare function rankScoredKnowledgeHits(candidates: ScoredKnowledgeHit[]): ScoredKnowledgeHit[];
|
|
67
|
+
/**
|
|
68
|
+
* Eligible, deduplicated candidates that have at least one metadata match.
|
|
69
|
+
* Score-1 results are intentionally retained here for the bounded content
|
|
70
|
+
* escalation; `rankKnowledgeHits` remains the honest floor-enforcing API.
|
|
71
|
+
*/
|
|
72
|
+
export declare function rankKnowledgeCandidates(hits: KnowledgeHit[], terms: string[]): ScoredKnowledgeHit[];
|
|
73
|
+
/**
|
|
74
|
+
* Full ranked candidate pool (rescope §3.3 selection policy): drop skill
|
|
75
|
+
* hits, dedup, score, apply the relevance floor (honest nothing-found below
|
|
76
|
+
* it), rank score desc → tier desc → recency desc — every candidate that
|
|
77
|
+
* clears the floor, not sliced to `MAX_SELECTED_PACKETS`.
|
|
78
|
+
*
|
|
79
|
+
* Content-level guards that can only run after a candidate's content is
|
|
80
|
+
* fetched (mono #1782: post-fetch skill-payload classification, empty-packet
|
|
81
|
+
* honesty) need to walk past a disqualified top candidate to the
|
|
82
|
+
* next-ranked one, so the orchestrator (`plugin.ts` `firstTurnPickup`) walks
|
|
83
|
+
* this unsliced list and does its own promotion-aware slicing.
|
|
84
|
+
* `selectKnowledgeHits` remains the pre-guards convenience wrapper for
|
|
85
|
+
* callers that only need the top slice.
|
|
86
|
+
*
|
|
87
|
+
* Also fail-closed allowlist-filters to `retrievalVisible === true` (#1824,
|
|
88
|
+
* W2) — absence of the field excludes the hit; this is the ranking-side half
|
|
89
|
+
* of the two-layer enforcement, `firstTurnPickup`'s post-fetch content guard
|
|
90
|
+
* is the other half.
|
|
91
|
+
*/
|
|
92
|
+
export declare function rankKnowledgeHits(hits: KnowledgeHit[], terms: string[]): KnowledgeHit[];
|
|
93
|
+
/**
|
|
94
|
+
* Evidence-first selection (rescope §3.3): the top `MAX_SELECTED_PACKETS` of
|
|
95
|
+
* `rankKnowledgeHits`. A caller that also needs to apply the post-fetch
|
|
96
|
+
* content-level guards (mono #1782) should walk `rankKnowledgeHits` directly
|
|
97
|
+
* instead — slicing here happens before those guards can run, so a
|
|
98
|
+
* candidate they disqualify would lose its slot rather than promoting the
|
|
99
|
+
* next-ranked one.
|
|
100
|
+
*/
|
|
101
|
+
export declare function selectKnowledgeHits(hits: KnowledgeHit[], terms: string[]): KnowledgeHit[];
|
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
import { TIER_ORDER } from './schemas/pickup-config.js';
|
|
2
|
+
// Ported verbatim from the pre-rescope heuristic (still the plugin's stopword list).
|
|
3
|
+
export const STOPWORDS = new Set([
|
|
4
|
+
'the', 'a', 'an', 'and', 'or', 'but', 'for', 'with', 'into', 'onto',
|
|
5
|
+
'this', 'that', 'these', 'those', 'from', 'then', 'than', 'when',
|
|
6
|
+
'what', 'which', 'where', 'how', 'why', 'can', 'could', 'should',
|
|
7
|
+
'would', 'will', 'just', 'please', 'help', 'need', 'want', 'make',
|
|
8
|
+
'using', 'about', 'have', 'has', 'had', 'you', 'your', 'our', 'not',
|
|
9
|
+
]);
|
|
10
|
+
// Lexical v2 (#1791): a tight 6-term budget forced real trade-offs between
|
|
11
|
+
// terms that could plausibly match a record's summary/tags — 10 gives
|
|
12
|
+
// selection room to include more of the message before the floor decides
|
|
13
|
+
// relevance. Search is one cheap indexer call per term.
|
|
14
|
+
const MAX_TERMS = 10;
|
|
15
|
+
const MIN_REMAINDER_LENGTH = 4;
|
|
16
|
+
const MIN_PATH_SEGMENT_LENGTH = 3;
|
|
17
|
+
const MIN_REPO_NAME_LENGTH = 3;
|
|
18
|
+
const QUOTED_SPAN_RE = /`([^`]+)`|"([^"]+)"|'([^']+)'/g;
|
|
19
|
+
/** Unicode-aware alnum filter (matches Python's `str.isalnum()`), keeping the
|
|
20
|
+
* identifier separators this function itself tests for — but only when they
|
|
21
|
+
* are internal. Leading/trailing separators are stripped so ordinary
|
|
22
|
+
* sentence-final prose (`done.`, `else.`) never reads as identifier-shaped
|
|
23
|
+
* (mono #1786); a leading `/` on a path-like token (`/v1/status`) is
|
|
24
|
+
* stripped too — `v1/status` stays a useful, greppable search term, and
|
|
25
|
+
* treating every separator position the same way keeps the rule one rule.
|
|
26
|
+
* Space is also kept (not just alnum/`_-./`) so this same function is safe
|
|
27
|
+
* to run on a multi-word backticked/quoted span (#1789) — the other two
|
|
28
|
+
* call sites split on whitespace first, so a raw space never reaches them
|
|
29
|
+
* and this is a no-op there. */
|
|
30
|
+
function cleanWord(raw) {
|
|
31
|
+
const kept = [...raw].filter((c) => /[\p{L}\p{N}]/u.test(c) || '_-./ '.includes(c)).join('');
|
|
32
|
+
return kept.replace(/^[_\-./]+/, '').replace(/[_\-./]+$/, '');
|
|
33
|
+
}
|
|
34
|
+
/** "Identifier-shaped": contains `_`, `-`, `.`, `/`, a digit, or a camelCase
|
|
35
|
+
* transition (a lowercase letter immediately followed by an uppercase one). */
|
|
36
|
+
function isIdentifierShaped(word) {
|
|
37
|
+
return /[_\-./]/.test(word) || /\d/.test(word) || /[a-z][A-Z]/.test(word);
|
|
38
|
+
}
|
|
39
|
+
/** Path segments of a `/`-bearing identifier-shaped token (#1791 root cause
|
|
40
|
+
* 1): an over-specific path like `client/src/dashboard/spa/src` rarely
|
|
41
|
+
* matches a record's summary/tags verbatim, but a shorter segment within it
|
|
42
|
+
* (`dashboard`) often does. Each segment is cleaned, filtered to
|
|
43
|
+
* `MIN_PATH_SEGMENT_LENGTH`, stopword-filtered, and deduplicated against
|
|
44
|
+
* itself (the caller's `push` handles dedup against the running term list). */
|
|
45
|
+
function pathSegments(token) {
|
|
46
|
+
const seenLocal = new Set();
|
|
47
|
+
const segments = [];
|
|
48
|
+
for (const raw of token.split('/')) {
|
|
49
|
+
const cleaned = cleanWord(raw);
|
|
50
|
+
const lower = cleaned.toLowerCase();
|
|
51
|
+
if (cleaned.length < MIN_PATH_SEGMENT_LENGTH || STOPWORDS.has(lower) || seenLocal.has(lower)) {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
seenLocal.add(lower);
|
|
55
|
+
segments.push(cleaned);
|
|
56
|
+
}
|
|
57
|
+
return segments;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The repository vocabulary shared by interactive pickup and repo-scoped
|
|
61
|
+
* corpus probes. A full `owner/repo` slug does not occur in record text; the
|
|
62
|
+
* repository name is the searchable term (#1790). Keep the minimum length in
|
|
63
|
+
* this one helper so non-session consumers cannot drift from pickup.
|
|
64
|
+
*/
|
|
65
|
+
export function deriveRepositorySearchTerms(repositorySlug) {
|
|
66
|
+
if (!repositorySlug || repositorySlug.trim().length === 0)
|
|
67
|
+
return [];
|
|
68
|
+
const slug = repositorySlug.trim();
|
|
69
|
+
const lastSlash = slug.lastIndexOf('/');
|
|
70
|
+
const repoName = lastSlash >= 0 ? slug.slice(lastSlash + 1) : slug;
|
|
71
|
+
if (repoName.length < MIN_REPO_NAME_LENGTH)
|
|
72
|
+
return [];
|
|
73
|
+
return [repoName.toLowerCase()];
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Up to `maxTerms` deterministic lowercase search terms, in priority order
|
|
77
|
+
* (rescope §3.3, lexical v2 — #1791/#1790/#1789): backticked/quoted tokens
|
|
78
|
+
* (edge-stripped, near-verbatim); identifier-shaped tokens — a `/`-bearing
|
|
79
|
+
* one also contributes its path segments, right after the full token; the
|
|
80
|
+
* session repository's NAME (not its full slug, #1790); the remaining
|
|
81
|
+
* non-stopword tokens (>=4 chars) in MESSAGE ORDER — order of first
|
|
82
|
+
* appearance, not longest-first (#1791: length is not a retrievability
|
|
83
|
+
* signal against a corpus of short summaries and tags). Operates over the
|
|
84
|
+
* whole message (not just the first line). Deduplicated.
|
|
85
|
+
*/
|
|
86
|
+
export function deriveSearchTerms(message, repositorySlug, maxTerms = MAX_TERMS) {
|
|
87
|
+
const text = message ?? '';
|
|
88
|
+
const terms = [];
|
|
89
|
+
const seen = new Set();
|
|
90
|
+
const push = (raw) => {
|
|
91
|
+
const trimmed = raw.trim();
|
|
92
|
+
if (trimmed.length === 0 || terms.length >= maxTerms)
|
|
93
|
+
return;
|
|
94
|
+
const lower = trimmed.toLowerCase();
|
|
95
|
+
if (seen.has(lower))
|
|
96
|
+
return;
|
|
97
|
+
seen.add(lower);
|
|
98
|
+
terms.push(lower);
|
|
99
|
+
};
|
|
100
|
+
// 1. Backticked/quoted tokens — each span is one term, taken near-verbatim
|
|
101
|
+
// but run through cleanWord's leading/trailing `_-./` strip (#1789) so
|
|
102
|
+
// a captured span like "npm test." doesn't keep its trailing period.
|
|
103
|
+
// cleanWord also keeps internal spaces, so a multi-word span
|
|
104
|
+
// ("version status fetch") and a path-shaped one ("client/src/dash")
|
|
105
|
+
// both keep their shape.
|
|
106
|
+
for (const match of text.matchAll(QUOTED_SPAN_RE)) {
|
|
107
|
+
if (terms.length >= maxTerms)
|
|
108
|
+
break;
|
|
109
|
+
push(cleanWord(match[1] ?? match[2] ?? match[3] ?? ''));
|
|
110
|
+
}
|
|
111
|
+
// 2. Identifier-shaped tokens (whole message). A `/`-bearing token also
|
|
112
|
+
// contributes its path segments, right after the full token (#1791
|
|
113
|
+
// root cause 1) — the full token is often over-specific for a record's
|
|
114
|
+
// summary/tags, while a shorter segment within it often matches.
|
|
115
|
+
if (terms.length < maxTerms) {
|
|
116
|
+
for (const rawWord of text.split(/\s+/)) {
|
|
117
|
+
if (terms.length >= maxTerms)
|
|
118
|
+
break;
|
|
119
|
+
const word = cleanWord(rawWord);
|
|
120
|
+
if (word.length < 2 || STOPWORDS.has(word.toLowerCase()))
|
|
121
|
+
continue;
|
|
122
|
+
if (!isIdentifierShaped(word))
|
|
123
|
+
continue;
|
|
124
|
+
push(word);
|
|
125
|
+
if (word.includes('/')) {
|
|
126
|
+
for (const segment of pathSegments(word)) {
|
|
127
|
+
if (terms.length >= maxTerms)
|
|
128
|
+
break;
|
|
129
|
+
push(segment);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
// 3. The session repository's NAME — the segment after the last `/` of
|
|
135
|
+
// `repositorySlug` (e.g. `mono` from `Jinn-Network/mono`), not the full
|
|
136
|
+
// slug: no record's text ever contains the literal `owner/repo` slug,
|
|
137
|
+
// so the slug itself was dead weight as a search term (#1790).
|
|
138
|
+
if (terms.length < maxTerms) {
|
|
139
|
+
for (const repoTerm of deriveRepositorySearchTerms(repositorySlug)) {
|
|
140
|
+
push(repoTerm);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
// 4. Remaining non-stopword tokens (>=4 chars), in MESSAGE ORDER (#1791
|
|
144
|
+
// root cause 2) — order of first appearance, not longest-first. Length
|
|
145
|
+
// is not a retrievability signal: a short on-topic word ("flaky", 5
|
|
146
|
+
// chars) is a better search term than a long one ("deterministic", 13
|
|
147
|
+
// chars) against a corpus of short summaries and tags, but the old
|
|
148
|
+
// longest-first sort always preferred the long word.
|
|
149
|
+
if (terms.length < maxTerms) {
|
|
150
|
+
const remainder = text
|
|
151
|
+
.split(/\s+/)
|
|
152
|
+
.map(cleanWord)
|
|
153
|
+
.filter((word) => word.length >= MIN_REMAINDER_LENGTH && !STOPWORDS.has(word.toLowerCase()));
|
|
154
|
+
for (const word of remainder) {
|
|
155
|
+
if (terms.length >= maxTerms)
|
|
156
|
+
break;
|
|
157
|
+
push(word);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return terms;
|
|
161
|
+
}
|
|
162
|
+
/** Ports classify_payload — 'skill' or 'unknown'. Prefers the explicit
|
|
163
|
+
* payloadKind classification field; falls back to hit.kind === 'skill'. */
|
|
164
|
+
export function classifyPayload(hit) {
|
|
165
|
+
if (hit.payloadKind === 'skill')
|
|
166
|
+
return 'skill';
|
|
167
|
+
if (hit.payloadKind === 'unknown')
|
|
168
|
+
return 'unknown';
|
|
169
|
+
return hit.kind === 'skill' ? 'skill' : 'unknown';
|
|
170
|
+
}
|
|
171
|
+
function isSkillHit(hit) {
|
|
172
|
+
return hit.kind === 'skill' || classifyPayload(hit) === 'skill';
|
|
173
|
+
}
|
|
174
|
+
/** `(taskSummary, origin)` content key — kills the duplicated-seed symptom at
|
|
175
|
+
* the consumer even before store hygiene lands (rescope §3.3 step 2). Hits
|
|
176
|
+
* that carry neither a summary/title nor an origin never collide on this key
|
|
177
|
+
* (an empty key would otherwise collapse unrelated hits). */
|
|
178
|
+
function contentKey(hit) {
|
|
179
|
+
const summary = (hit.snippet ?? hit.title ?? '').trim().toLowerCase();
|
|
180
|
+
const origin = (hit.origin ?? '').trim().toLowerCase();
|
|
181
|
+
if (summary.length === 0 && origin.length === 0)
|
|
182
|
+
return undefined;
|
|
183
|
+
return `${summary} ${origin}`;
|
|
184
|
+
}
|
|
185
|
+
/** Dedup by ref, then by content key (rescope §3.3 step 2). */
|
|
186
|
+
export function dedupeKnowledgeHits(hits) {
|
|
187
|
+
const seenRefs = new Set();
|
|
188
|
+
const seenContent = new Set();
|
|
189
|
+
const out = [];
|
|
190
|
+
for (const hit of hits) {
|
|
191
|
+
if (seenRefs.has(hit.ref))
|
|
192
|
+
continue;
|
|
193
|
+
const key = contentKey(hit);
|
|
194
|
+
if (key !== undefined && seenContent.has(key))
|
|
195
|
+
continue;
|
|
196
|
+
seenRefs.add(hit.ref);
|
|
197
|
+
if (key !== undefined)
|
|
198
|
+
seenContent.add(key);
|
|
199
|
+
out.push(hit);
|
|
200
|
+
}
|
|
201
|
+
return out;
|
|
202
|
+
}
|
|
203
|
+
export const RELEVANCE_FLOOR = 2;
|
|
204
|
+
export const MAX_SELECTED_PACKETS = 2;
|
|
205
|
+
export const MAX_CONTENT_RESCORE_CANDIDATES = 3;
|
|
206
|
+
function haystackFor(hit) {
|
|
207
|
+
return `${hit.snippet ?? hit.title ?? ''} ${hit.tags.join(' ')}`.toLowerCase();
|
|
208
|
+
}
|
|
209
|
+
const REGEX_META_RE = /[.*+?^${}()|[\]\\]/g;
|
|
210
|
+
/** Whole-word containment: the term must not be flanked by another word
|
|
211
|
+
* character (#1886). Plain `includes` matched inside longer words — `load`
|
|
212
|
+
* hit `payload`, `under` hit `underlying` — and one such accident is enough
|
|
213
|
+
* to clear `RELEVANCE_FLOOR`. `_` counts as a word character so an
|
|
214
|
+
* identifier term like `update_available` is not split, while `/`, `-`, `.`
|
|
215
|
+
* and whitespace remain boundaries, so `dashboard` still matches inside
|
|
216
|
+
* `client/src/dashboard/spa`. */
|
|
217
|
+
function matchesWholeWord(haystack, term) {
|
|
218
|
+
const escaped = term.replace(REGEX_META_RE, '\\$&');
|
|
219
|
+
return new RegExp(`(?<![\\p{L}\\p{N}_])${escaped}(?![\\p{L}\\p{N}_])`, 'u').test(haystack);
|
|
220
|
+
}
|
|
221
|
+
/** A term matches if it appears as a whole word (#1886), or — for a term
|
|
222
|
+
* ending in a simple plural `s` — its singular form does (#1791 lexical v2:
|
|
223
|
+
* closes small, common bag-of-words vocabulary gaps like `tests` -> `test`).
|
|
224
|
+
* One-directional (term -> singular only) and length-gated
|
|
225
|
+
* (`term.length > 3`) so a short word like `its` never folds to `it`. */
|
|
226
|
+
function termMatches(haystack, term) {
|
|
227
|
+
if (matchesWholeWord(haystack, term))
|
|
228
|
+
return true;
|
|
229
|
+
return term.endsWith('s') && term.length > 3 && matchesWholeWord(haystack, term.slice(0, -1));
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* The scoring vocabulary: `terms` minus the repository-name term (#1886).
|
|
233
|
+
*
|
|
234
|
+
* The repository name tags every record in an in-repo corpus, so it matches
|
|
235
|
+
* everything and discriminates nothing — yet it counted 1 toward
|
|
236
|
+
* `RELEVANCE_FLOOR`, halving the effective floor for any query issued inside
|
|
237
|
+
* the repository. It remains a *search* term (it is what surfaces
|
|
238
|
+
* repo-relevant records at all); it just no longer helps a record clear the
|
|
239
|
+
* floor. Callers pass the full list to search and this list to scoring.
|
|
240
|
+
*/
|
|
241
|
+
export function discriminatingTerms(terms, repositorySlug) {
|
|
242
|
+
const repoTerms = new Set(deriveRepositorySearchTerms(repositorySlug));
|
|
243
|
+
if (repoTerms.size === 0)
|
|
244
|
+
return terms;
|
|
245
|
+
return terms.filter((term) => !repoTerms.has(term));
|
|
246
|
+
}
|
|
247
|
+
/** Count of matched terms across `taskSummary + tags` (rescope §3.3 step 3,
|
|
248
|
+
* lexical v2 — #1790/#1791) — every match counts 1. The repository-slug
|
|
249
|
+
* match used to count 2, but the slug it matched against could never
|
|
250
|
+
* appear in a record's text (#1790); the repository's NAME is now a
|
|
251
|
+
* normal derived term (see `deriveSearchTerms` step 3) and scores like any
|
|
252
|
+
* other term, with no special case. */
|
|
253
|
+
export function scoreKnowledgeHit(hit, terms) {
|
|
254
|
+
const haystack = haystackFor(hit);
|
|
255
|
+
let score = 0;
|
|
256
|
+
for (const term of terms) {
|
|
257
|
+
if (term.length === 0)
|
|
258
|
+
continue;
|
|
259
|
+
if (termMatches(haystack, term))
|
|
260
|
+
score += 1;
|
|
261
|
+
}
|
|
262
|
+
return score;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Re-score an already plausible metadata candidate against the two concise,
|
|
266
|
+
* human-authored content fields available after `CorpusPort.get`: synthesis
|
|
267
|
+
* and step titles. Each original normalized term contributes at most one
|
|
268
|
+
* point across metadata + content, so repeating the same match in synthesis
|
|
269
|
+
* cannot manufacture relevance.
|
|
270
|
+
*/
|
|
271
|
+
export function scoreKnowledgeRecord(hit, record, terms) {
|
|
272
|
+
const metadataHaystack = haystackFor(hit);
|
|
273
|
+
const contentHaystack = [
|
|
274
|
+
record.synthesis ?? '',
|
|
275
|
+
...record.steps.flatMap((step) => {
|
|
276
|
+
const authoredTitle = step.attributes['seed.step.title'];
|
|
277
|
+
return typeof authoredTitle === 'string'
|
|
278
|
+
? [step.name, authoredTitle]
|
|
279
|
+
: [step.name];
|
|
280
|
+
}),
|
|
281
|
+
].join(' ').toLowerCase();
|
|
282
|
+
let score = 0;
|
|
283
|
+
for (const term of terms) {
|
|
284
|
+
if (term.length === 0)
|
|
285
|
+
continue;
|
|
286
|
+
if (termMatches(metadataHaystack, term) || termMatches(contentHaystack, term))
|
|
287
|
+
score += 1;
|
|
288
|
+
}
|
|
289
|
+
return score;
|
|
290
|
+
}
|
|
291
|
+
function tierRank(tier) {
|
|
292
|
+
if (tier === undefined)
|
|
293
|
+
return -1;
|
|
294
|
+
return TIER_ORDER.indexOf(tier);
|
|
295
|
+
}
|
|
296
|
+
function compareScoredKnowledgeHits(a, b) {
|
|
297
|
+
if (b.score !== a.score)
|
|
298
|
+
return b.score - a.score;
|
|
299
|
+
const tierDiff = tierRank(b.hit.tier) - tierRank(a.hit.tier);
|
|
300
|
+
if (tierDiff !== 0)
|
|
301
|
+
return tierDiff;
|
|
302
|
+
return (b.hit.publishedAt ?? 0) - (a.hit.publishedAt ?? 0);
|
|
303
|
+
}
|
|
304
|
+
/** Return a copied, deterministically ranked scored-candidate list. */
|
|
305
|
+
export function rankScoredKnowledgeHits(candidates) {
|
|
306
|
+
return [...candidates].sort(compareScoredKnowledgeHits);
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Eligible, deduplicated candidates that have at least one metadata match.
|
|
310
|
+
* Score-1 results are intentionally retained here for the bounded content
|
|
311
|
+
* escalation; `rankKnowledgeHits` remains the honest floor-enforcing API.
|
|
312
|
+
*/
|
|
313
|
+
export function rankKnowledgeCandidates(hits, terms) {
|
|
314
|
+
const evidence = hits.filter((hit) => !isSkillHit(hit) && hit.retrievalVisible === true);
|
|
315
|
+
const deduped = dedupeKnowledgeHits(evidence);
|
|
316
|
+
return rankScoredKnowledgeHits(deduped
|
|
317
|
+
.map((hit) => ({ hit, score: scoreKnowledgeHit(hit, terms) }))
|
|
318
|
+
.filter((scoredHit) => scoredHit.score >= 1));
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Full ranked candidate pool (rescope §3.3 selection policy): drop skill
|
|
322
|
+
* hits, dedup, score, apply the relevance floor (honest nothing-found below
|
|
323
|
+
* it), rank score desc → tier desc → recency desc — every candidate that
|
|
324
|
+
* clears the floor, not sliced to `MAX_SELECTED_PACKETS`.
|
|
325
|
+
*
|
|
326
|
+
* Content-level guards that can only run after a candidate's content is
|
|
327
|
+
* fetched (mono #1782: post-fetch skill-payload classification, empty-packet
|
|
328
|
+
* honesty) need to walk past a disqualified top candidate to the
|
|
329
|
+
* next-ranked one, so the orchestrator (`plugin.ts` `firstTurnPickup`) walks
|
|
330
|
+
* this unsliced list and does its own promotion-aware slicing.
|
|
331
|
+
* `selectKnowledgeHits` remains the pre-guards convenience wrapper for
|
|
332
|
+
* callers that only need the top slice.
|
|
333
|
+
*
|
|
334
|
+
* Also fail-closed allowlist-filters to `retrievalVisible === true` (#1824,
|
|
335
|
+
* W2) — absence of the field excludes the hit; this is the ranking-side half
|
|
336
|
+
* of the two-layer enforcement, `firstTurnPickup`'s post-fetch content guard
|
|
337
|
+
* is the other half.
|
|
338
|
+
*/
|
|
339
|
+
export function rankKnowledgeHits(hits, terms) {
|
|
340
|
+
return rankKnowledgeCandidates(hits, terms)
|
|
341
|
+
.filter((candidate) => candidate.score >= RELEVANCE_FLOOR)
|
|
342
|
+
.map((candidate) => candidate.hit);
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Evidence-first selection (rescope §3.3): the top `MAX_SELECTED_PACKETS` of
|
|
346
|
+
* `rankKnowledgeHits`. A caller that also needs to apply the post-fetch
|
|
347
|
+
* content-level guards (mono #1782) should walk `rankKnowledgeHits` directly
|
|
348
|
+
* instead — slicing here happens before those guards can run, so a
|
|
349
|
+
* candidate they disqualify would lose its slot rather than promoting the
|
|
350
|
+
* next-ranked one.
|
|
351
|
+
*/
|
|
352
|
+
export function selectKnowledgeHits(hits, terms) {
|
|
353
|
+
return rankKnowledgeHits(hits, terms).slice(0, MAX_SELECTED_PACKETS);
|
|
354
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host-neutral Stage 1 product workflow. Embedded hosts buffer their session
|
|
3
|
+
* through `PluginSession`; process hosts pass the already-captured EpisodeV1
|
|
4
|
+
* to `completeSession`. Both paths persist the same canonical evidence and
|
|
5
|
+
* contribution contracts.
|
|
6
|
+
*/
|
|
7
|
+
import type { ContributionLedgerEntry, ContributionPort, ContributionStatusSnapshot } from './ports/contribution-port.js';
|
|
8
|
+
import type { CorpusPort } from './ports/corpus-port.js';
|
|
9
|
+
import type { EvidencePort } from './ports/evidence-port.js';
|
|
10
|
+
import type { LocalLearningPort } from './ports/local-learning-port.js';
|
|
11
|
+
import type { SkillsPort } from './ports/skills-port.js';
|
|
12
|
+
import type { EligibilityVerdict } from './schemas/eligibility-verdict.js';
|
|
13
|
+
import type { EpisodeV1, SessionActivityFacts } from './schemas/episode.js';
|
|
14
|
+
import { type ContributionCandidateV1 } from './schemas/contribution-candidate.js';
|
|
15
|
+
import type { SessionSummary } from './schemas/session-summary.js';
|
|
16
|
+
import { type KnowledgePacket } from './schemas/knowledge-packet.js';
|
|
17
|
+
import { type PortResult } from './outcome.js';
|
|
18
|
+
import { type PickupConfig } from './schemas/pickup-config.js';
|
|
19
|
+
import { type HistoryResult, type SessionExplanation } from './history.js';
|
|
20
|
+
export interface JinnPluginDeps {
|
|
21
|
+
corpus: CorpusPort;
|
|
22
|
+
evidence: EvidencePort;
|
|
23
|
+
contribution: ContributionPort;
|
|
24
|
+
localLearning: LocalLearningPort;
|
|
25
|
+
skills: SkillsPort;
|
|
26
|
+
}
|
|
27
|
+
export interface SessionMeta {
|
|
28
|
+
sessionId: string;
|
|
29
|
+
taskSummary: string;
|
|
30
|
+
distributionTags?: string[];
|
|
31
|
+
harness: {
|
|
32
|
+
name: string;
|
|
33
|
+
version: string;
|
|
34
|
+
};
|
|
35
|
+
model: string;
|
|
36
|
+
tools: string[];
|
|
37
|
+
skillsLoadout?: string[];
|
|
38
|
+
pickup?: PickupConfig;
|
|
39
|
+
/** Known at session start (e.g. `session_bridge.snapshot_repository`) —
|
|
40
|
+
* fed into `deriveSearchTerms`, which derives the repository's name (not
|
|
41
|
+
* its full slug) as a normal search term (#1790). */
|
|
42
|
+
repositorySlug?: string;
|
|
43
|
+
kind?: 'user' | 'host-internal';
|
|
44
|
+
parentSessionId?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface FirstTurnPickupResult {
|
|
47
|
+
contextBlock: string | null;
|
|
48
|
+
packets: KnowledgePacket[];
|
|
49
|
+
searchedTerms: string[];
|
|
50
|
+
retrievalFired: boolean;
|
|
51
|
+
eligibleRefs: string[];
|
|
52
|
+
deliveredRefs: string[];
|
|
53
|
+
deliveryMode: 'delivered' | 'disabled' | 'degraded' | 'withheld';
|
|
54
|
+
deliveredContentHash?: string;
|
|
55
|
+
degraded?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface ToolCallEvent {
|
|
58
|
+
spanId: string;
|
|
59
|
+
parentSpanId: string | null;
|
|
60
|
+
name: string;
|
|
61
|
+
startTimeUnixNano: string;
|
|
62
|
+
endTimeUnixNano: string;
|
|
63
|
+
attributes: Record<string, unknown>;
|
|
64
|
+
redactedKeys?: string[];
|
|
65
|
+
}
|
|
66
|
+
export interface SessionOutcome {
|
|
67
|
+
status: 'completed' | 'failed' | 'abandoned';
|
|
68
|
+
verifiabilityTier: 'user-accepted' | 'tests-passed' | 'evaluator-verified';
|
|
69
|
+
summary?: string;
|
|
70
|
+
durationMs: number;
|
|
71
|
+
tokens?: {
|
|
72
|
+
input: number;
|
|
73
|
+
output: number;
|
|
74
|
+
};
|
|
75
|
+
retentionPolicy: 'local-private' | 'contribution-eligible';
|
|
76
|
+
publicRepo?: boolean;
|
|
77
|
+
acceptedDiff?: boolean;
|
|
78
|
+
testRuns?: {
|
|
79
|
+
passed: number;
|
|
80
|
+
failed: number;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export interface SessionEndResult {
|
|
84
|
+
/**
|
|
85
|
+
* Locally-generated episode id. This is a local reference, NOT proof of
|
|
86
|
+
* persistence — branch on `persistence.status` to know whether the episode
|
|
87
|
+
* was durably stored.
|
|
88
|
+
*/
|
|
89
|
+
episodeRef: string;
|
|
90
|
+
/** Honest surfacing of the `evidence.put()` outcome (#1696 AC2). */
|
|
91
|
+
persistence: PortResult<{
|
|
92
|
+
episodeId: string;
|
|
93
|
+
}>;
|
|
94
|
+
/** Present iff a candidate was supplied; independent from persistence. */
|
|
95
|
+
contribution?: PortResult<ContributionCompletionReceipt>;
|
|
96
|
+
eligibility: EligibilityVerdict;
|
|
97
|
+
summary: SessionSummary;
|
|
98
|
+
}
|
|
99
|
+
export type ContributionCompletionReceipt = {
|
|
100
|
+
recordId: string;
|
|
101
|
+
} & Partial<ContributionStatusSnapshot>;
|
|
102
|
+
export interface ContributionPreview {
|
|
103
|
+
recordId: string;
|
|
104
|
+
repositorySlug: string;
|
|
105
|
+
baseCommit: string;
|
|
106
|
+
localState: 'recorded' | 'minted' | 'rejected';
|
|
107
|
+
publicationState: 'preview-required' | 'queued';
|
|
108
|
+
status: 'preview-required' | 'queued';
|
|
109
|
+
acknowledged: boolean;
|
|
110
|
+
}
|
|
111
|
+
export declare const JINN_PLUGIN_CONTRACT_VERSION: 1;
|
|
112
|
+
export interface CompleteSessionEligibilityInputs {
|
|
113
|
+
publicRepo?: boolean;
|
|
114
|
+
acceptedDiff?: boolean;
|
|
115
|
+
}
|
|
116
|
+
export interface CompleteSessionInput {
|
|
117
|
+
contractVersion: typeof JINN_PLUGIN_CONTRACT_VERSION;
|
|
118
|
+
episode: EpisodeV1;
|
|
119
|
+
activity: SessionActivityFacts;
|
|
120
|
+
eligibilityInputs: CompleteSessionEligibilityInputs;
|
|
121
|
+
contributionCandidate?: ContributionCandidateV1;
|
|
122
|
+
/** Per-task publication veto; defaults to false. The candidate is still recorded locally. */
|
|
123
|
+
contributionVetoed?: boolean;
|
|
124
|
+
}
|
|
125
|
+
export declare class PluginSession {
|
|
126
|
+
private readonly deps;
|
|
127
|
+
private readonly meta;
|
|
128
|
+
private readonly trajectory;
|
|
129
|
+
private searchedTerms;
|
|
130
|
+
private providedRefs;
|
|
131
|
+
private fetchedRefs;
|
|
132
|
+
private packets;
|
|
133
|
+
private retrievalFired;
|
|
134
|
+
private eligibleRefs;
|
|
135
|
+
private deliveryMode;
|
|
136
|
+
private deliveredContentHash;
|
|
137
|
+
private readonly capturedAt;
|
|
138
|
+
constructor(deps: JinnPluginDeps, meta: SessionMeta);
|
|
139
|
+
firstTurnPickup(firstMessage: string): Promise<FirstTurnPickupResult>;
|
|
140
|
+
noteUserTurn(content: string): void;
|
|
141
|
+
noteAssistantTurn(content: string): void;
|
|
142
|
+
private pushTurn;
|
|
143
|
+
noteToolCall(call: ToolCallEvent): void;
|
|
144
|
+
end(outcome: SessionOutcome): Promise<SessionEndResult>;
|
|
145
|
+
}
|
|
146
|
+
export interface JinnPlugin {
|
|
147
|
+
session(meta: SessionMeta): PluginSession;
|
|
148
|
+
completeSession(input: CompleteSessionInput): Promise<SessionEndResult>;
|
|
149
|
+
history(): Promise<HistoryResult>;
|
|
150
|
+
explain(sessionRef: string): Promise<SessionExplanation>;
|
|
151
|
+
previewContribution(acknowledge?: boolean): Promise<PortResult<ContributionPreview | null>>;
|
|
152
|
+
contributionLedger(): Promise<PortResult<ContributionLedgerEntry[]>>;
|
|
153
|
+
disableContributionPublication(): Promise<PortResult<{
|
|
154
|
+
recordIds: string[];
|
|
155
|
+
}>>;
|
|
156
|
+
}
|
|
157
|
+
export declare function createJinnPlugin(deps: JinnPluginDeps): JinnPlugin;
|