@jinn-network/client 0.1.2 → 0.1.3-canary.262e5cda
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/CONTRIBUTING.md +8 -2
- package/README.md +38 -14
- package/deployments/deployment-jinn-mvi-l1-sepolia-fast.json +36 -0
- package/deployments/deployment-jinn-mvi-l1-sepolia.json +36 -0
- package/deployments/deployment-jinn-mvi-l2-baseSepolia.json +12 -0
- package/deployments/deployment-phase1b-mech-baseSepolia-fast.json +3 -3
- package/deployments/deployment-stolas-l2-baseSepolia-fast.json +1 -1
- package/dist/adapters/adapter.d.ts +2 -2
- package/dist/adapters/claim-registry/client.d.ts +9 -0
- package/dist/adapters/claim-registry/client.js +22 -2
- package/dist/adapters/claim-registry/client.js.map +1 -1
- package/dist/adapters/local/adapter.d.ts +2 -2
- package/dist/adapters/local/adapter.js +8 -8
- package/dist/adapters/local/adapter.js.map +1 -1
- package/dist/adapters/mech/adapter.d.ts +3 -4
- package/dist/adapters/mech/adapter.js +86 -50
- package/dist/adapters/mech/adapter.js.map +1 -1
- package/dist/adapters/mech/contracts.d.ts +6 -4
- package/dist/adapters/mech/contracts.js +118 -14
- package/dist/adapters/mech/contracts.js.map +1 -1
- package/dist/adapters/mech/ipfs.d.ts +61 -6
- package/dist/adapters/mech/ipfs.js +159 -26
- package/dist/adapters/mech/ipfs.js.map +1 -1
- package/dist/adapters/mech/safe-revert.d.ts +39 -0
- package/dist/adapters/mech/safe-revert.js +130 -0
- package/dist/adapters/mech/safe-revert.js.map +1 -0
- package/dist/adapters/mech/safe.js +47 -21
- package/dist/adapters/mech/safe.js.map +1 -1
- package/dist/adapters/mech/types.d.ts +8 -0
- package/dist/adapters/mech/types.js.map +1 -1
- package/dist/agent/agent-ws.d.ts +55 -0
- package/dist/agent/agent-ws.js +288 -0
- package/dist/agent/agent-ws.js.map +1 -0
- package/dist/agent/auto-mode-detect.d.ts +6 -0
- package/dist/agent/auto-mode-detect.js +44 -0
- package/dist/agent/auto-mode-detect.js.map +1 -0
- package/dist/agent/operator-claude.d.ts +22 -0
- package/dist/agent/operator-claude.js +130 -0
- package/dist/agent/operator-claude.js.map +1 -0
- package/dist/api/admin-endpoint.d.ts +12 -0
- package/dist/api/admin-endpoint.js +71 -0
- package/dist/api/admin-endpoint.js.map +1 -0
- package/dist/api/bootstrap-endpoint.d.ts +16 -0
- package/dist/api/bootstrap-endpoint.js +78 -0
- package/dist/api/bootstrap-endpoint.js.map +1 -0
- package/dist/api/events-endpoint.d.ts +9 -0
- package/dist/api/events-endpoint.js +46 -0
- package/dist/api/events-endpoint.js.map +1 -0
- package/dist/api/fleet-build.d.ts +1 -1
- package/dist/api/fleet-build.js +17 -8
- package/dist/api/fleet-build.js.map +1 -1
- package/dist/api/gather-status.js +5 -1
- package/dist/api/gather-status.js.map +1 -1
- package/dist/api/handshake.d.ts +17 -0
- package/dist/api/handshake.js +28 -0
- package/dist/api/handshake.js.map +1 -0
- package/dist/api/peers.js +20 -5
- package/dist/api/peers.js.map +1 -1
- package/dist/api/portfolio-v0-build.d.ts +6 -0
- package/dist/api/portfolio-v0-build.js +6 -1
- package/dist/api/portfolio-v0-build.js.map +1 -1
- package/dist/api/rewards-build.js +3 -8
- package/dist/api/rewards-build.js.map +1 -1
- package/dist/api/server.d.ts +54 -0
- package/dist/api/server.js +239 -13
- package/dist/api/server.js.map +1 -1
- package/dist/api/setup-endpoints.d.ts +34 -0
- package/dist/api/setup-endpoints.js +188 -0
- package/dist/api/setup-endpoints.js.map +1 -0
- package/dist/api/status-build.d.ts +9 -1
- package/dist/api/status-build.js +44 -9
- package/dist/api/status-build.js.map +1 -1
- package/dist/api/status-rollup-build.d.ts +46 -1
- package/dist/api/status-rollup-build.js +168 -5
- package/dist/api/status-rollup-build.js.map +1 -1
- package/dist/api/ui-token.d.ts +5 -0
- package/dist/api/ui-token.js +36 -0
- package/dist/api/ui-token.js.map +1 -0
- package/dist/build-info.d.ts +32 -0
- package/dist/build-info.js +69 -0
- package/dist/build-info.js.map +1 -0
- package/dist/build-info.json +6 -0
- package/dist/build-meta.json +1 -1
- package/dist/cli/command.d.ts +9 -0
- package/dist/cli/commands/balance.d.ts +7 -0
- package/dist/cli/commands/balance.js +38 -32
- package/dist/cli/commands/balance.js.map +1 -1
- package/dist/cli/commands/bootstrap.d.ts +13 -1
- package/dist/cli/commands/bootstrap.js +150 -132
- package/dist/cli/commands/bootstrap.js.map +1 -1
- package/dist/cli/commands/claim-rewards.js +14 -2
- package/dist/cli/commands/claim-rewards.js.map +1 -1
- package/dist/cli/commands/conformance.d.ts +12 -0
- package/dist/cli/commands/conformance.js +140 -0
- package/dist/cli/commands/conformance.js.map +1 -0
- package/dist/cli/commands/create.d.ts +36 -0
- package/dist/cli/commands/create.js +374 -0
- package/dist/cli/commands/create.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +34 -1
- package/dist/cli/commands/doctor.js +136 -121
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/fleet-scale.d.ts +19 -1
- package/dist/cli/commands/fleet-scale.js +379 -361
- package/dist/cli/commands/fleet-scale.js.map +1 -1
- package/dist/cli/commands/fleet.d.ts +7 -0
- package/dist/cli/commands/fleet.js +39 -33
- package/dist/cli/commands/fleet.js.map +1 -1
- package/dist/cli/commands/fund-requirements.d.ts +14 -1
- package/dist/cli/commands/fund-requirements.js +183 -174
- package/dist/cli/commands/fund-requirements.js.map +1 -1
- package/dist/cli/commands/history.d.ts +10 -1
- package/dist/cli/commands/history.js +66 -57
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/impls.d.ts +18 -0
- package/dist/cli/commands/impls.js +208 -0
- package/dist/cli/commands/impls.js.map +1 -0
- package/dist/cli/commands/init.js +4 -1
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/intents.js +13 -9
- package/dist/cli/commands/intents.js.map +1 -1
- package/dist/cli/commands/logs.d.ts +6 -1
- package/dist/cli/commands/logs.js +77 -70
- package/dist/cli/commands/logs.js.map +1 -1
- package/dist/cli/commands/migrate-agent-id.d.ts +26 -0
- package/dist/cli/commands/migrate-agent-id.js +165 -0
- package/dist/cli/commands/migrate-agent-id.js.map +1 -0
- package/dist/cli/commands/plug-ins.d.ts +34 -0
- package/dist/cli/commands/plug-ins.js +282 -0
- package/dist/cli/commands/plug-ins.js.map +1 -0
- package/dist/cli/commands/plugin-install.d.ts +10 -0
- package/dist/cli/commands/plugin-install.js +226 -14
- package/dist/cli/commands/plugin-install.js.map +1 -1
- package/dist/cli/commands/rewards.d.ts +7 -0
- package/dist/cli/commands/rewards.js +46 -40
- package/dist/cli/commands/rewards.js.map +1 -1
- package/dist/cli/commands/run.d.ts +14 -1
- package/dist/cli/commands/run.js +232 -90
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/status.d.ts +10 -0
- package/dist/cli/commands/status.js +97 -34
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/submit-intent.js +33 -6
- package/dist/cli/commands/submit-intent.js.map +1 -1
- package/dist/cli/commands/ui.js +45 -0
- package/dist/cli/commands/ui.js.map +1 -0
- package/dist/cli/commands/update.d.ts +5 -0
- package/dist/cli/commands/update.js +102 -97
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/version.js +3 -1
- package/dist/cli/commands/version.js.map +1 -1
- package/dist/cli/commands/withdraw.d.ts +21 -1
- package/dist/cli/commands/withdraw.js +175 -159
- package/dist/cli/commands/withdraw.js.map +1 -1
- package/dist/cli/execution-context.d.ts +1 -1
- package/dist/cli/execution-context.js +2 -1
- package/dist/cli/execution-context.js.map +1 -1
- package/dist/cli/help.js +7 -0
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.js +18 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/intent-registry-access.d.ts +33 -1
- package/dist/cli/intent-registry-access.js +40 -2
- package/dist/cli/intent-registry-access.js.map +1 -1
- package/dist/cli/open-browser.d.ts +1 -0
- package/dist/cli/open-browser.js +18 -0
- package/dist/cli/open-browser.js.map +1 -0
- package/dist/cli/password.d.ts +3 -3
- package/dist/cli/password.js +5 -5
- package/dist/cli/password.js.map +1 -1
- package/dist/config.d.ts +883 -11
- package/dist/config.js +435 -4
- package/dist/config.js.map +1 -1
- package/dist/conformance/checks/artifacts.d.ts +37 -0
- package/dist/conformance/checks/artifacts.js +110 -0
- package/dist/conformance/checks/artifacts.js.map +1 -0
- package/dist/conformance/checks/envelope-schema.d.ts +17 -0
- package/dist/conformance/checks/envelope-schema.js +36 -0
- package/dist/conformance/checks/envelope-schema.js.map +1 -0
- package/dist/conformance/checks/hash-signature.d.ts +26 -0
- package/dist/conformance/checks/hash-signature.js +70 -0
- package/dist/conformance/checks/hash-signature.js.map +1 -0
- package/dist/conformance/checks/payload.d.ts +19 -0
- package/dist/conformance/checks/payload.js +52 -0
- package/dist/conformance/checks/payload.js.map +1 -0
- package/dist/conformance/checks/secret-scrub.d.ts +33 -0
- package/dist/conformance/checks/secret-scrub.js +118 -0
- package/dist/conformance/checks/secret-scrub.js.map +1 -0
- package/dist/conformance/checks/source-runtime.d.ts +43 -0
- package/dist/conformance/checks/source-runtime.js +68 -0
- package/dist/conformance/checks/source-runtime.js.map +1 -0
- package/dist/conformance/checks/source-static.d.ts +61 -0
- package/dist/conformance/checks/source-static.js +311 -0
- package/dist/conformance/checks/source-static.js.map +1 -0
- package/dist/conformance/checks/trajectory-chain.d.ts +18 -0
- package/dist/conformance/checks/trajectory-chain.js +51 -0
- package/dist/conformance/checks/trajectory-chain.js.map +1 -0
- package/dist/conformance/checks/trajectory-profile.d.ts +17 -0
- package/dist/conformance/checks/trajectory-profile.js +51 -0
- package/dist/conformance/checks/trajectory-profile.js.map +1 -0
- package/dist/conformance/checks/trajectory-schema.d.ts +20 -0
- package/dist/conformance/checks/trajectory-schema.js +40 -0
- package/dist/conformance/checks/trajectory-schema.js.map +1 -0
- package/dist/conformance/checks/verdict.d.ts +44 -0
- package/dist/conformance/checks/verdict.js +122 -0
- package/dist/conformance/checks/verdict.js.map +1 -0
- package/dist/conformance/harness.d.ts +32 -0
- package/dist/conformance/harness.js +228 -0
- package/dist/conformance/harness.js.map +1 -0
- package/dist/conformance/types.d.ts +88 -0
- package/dist/conformance/types.js +31 -0
- package/dist/conformance/types.js.map +1 -0
- package/dist/corpus/acquire.d.ts +37 -0
- package/dist/corpus/acquire.js +155 -0
- package/dist/corpus/acquire.js.map +1 -0
- package/dist/corpus/cache.d.ts +14 -0
- package/dist/corpus/cache.js +18 -0
- package/dist/corpus/cache.js.map +1 -0
- package/dist/corpus/fetch.d.ts +9 -0
- package/dist/corpus/fetch.js +24 -0
- package/dist/corpus/fetch.js.map +1 -0
- package/dist/corpus/index.d.ts +16 -0
- package/dist/corpus/index.js +78 -0
- package/dist/corpus/index.js.map +1 -0
- package/dist/corpus/query.d.ts +17 -0
- package/dist/corpus/query.js +108 -0
- package/dist/corpus/query.js.map +1 -0
- package/dist/corpus/route-resolver.d.ts +16 -0
- package/dist/corpus/route-resolver.js +20 -0
- package/dist/corpus/route-resolver.js.map +1 -0
- package/dist/corpus/types.d.ts +107 -0
- package/dist/corpus/types.js +50 -0
- package/dist/corpus/types.js.map +1 -0
- package/dist/daemon/balance-topup-loop.js +2 -1
- package/dist/daemon/balance-topup-loop.js.map +1 -1
- package/dist/daemon/creator.d.ts +2 -2
- package/dist/daemon/creator.js +2 -2
- package/dist/daemon/creator.js.map +1 -1
- package/dist/daemon/daemon.d.ts +70 -15
- package/dist/daemon/daemon.js +159 -41
- package/dist/daemon/daemon.js.map +1 -1
- package/dist/daemon/delivery-watcher.js +31 -1
- package/dist/daemon/delivery-watcher.js.map +1 -1
- package/dist/daemon/jinn-claim-loop-canonical.d.ts +207 -0
- package/dist/daemon/jinn-claim-loop-canonical.js +296 -0
- package/dist/daemon/jinn-claim-loop-canonical.js.map +1 -0
- package/dist/daemon/jinn-claim-loop-mock.d.ts +61 -0
- package/dist/daemon/jinn-claim-loop-mock.js +122 -0
- package/dist/daemon/jinn-claim-loop-mock.js.map +1 -0
- package/dist/daemon/jinn-claim-loop.d.ts +123 -0
- package/dist/daemon/jinn-claim-loop.js +256 -0
- package/dist/daemon/jinn-claim-loop.js.map +1 -0
- package/dist/daemon/reward-claim-loop.d.ts +2 -0
- package/dist/daemon/reward-claim-loop.js +32 -27
- package/dist/daemon/reward-claim-loop.js.map +1 -1
- package/dist/dashboard/assets/index-Bxlk5qpa.js +68 -0
- package/dist/dashboard/assets/index-DQ3u_vP5.css +32 -0
- package/dist/dashboard/index.html +18 -74
- package/dist/earning/agent-wallet-binding.d.ts +133 -0
- package/dist/earning/agent-wallet-binding.js +202 -0
- package/dist/earning/agent-wallet-binding.js.map +1 -0
- package/dist/earning/bootstrap.d.ts +64 -0
- package/dist/earning/bootstrap.js +325 -32
- package/dist/earning/bootstrap.js.map +1 -1
- package/dist/earning/contracts.d.ts +323 -0
- package/dist/earning/contracts.js +276 -0
- package/dist/earning/contracts.js.map +1 -1
- package/dist/earning/funding-plan.d.ts +90 -0
- package/dist/earning/funding-plan.js +203 -0
- package/dist/earning/funding-plan.js.map +1 -0
- package/dist/earning/migrate-agent-id.d.ts +130 -0
- package/dist/earning/migrate-agent-id.js +257 -0
- package/dist/earning/migrate-agent-id.js.map +1 -0
- package/dist/earning/orphan-sweep.d.ts +14 -0
- package/dist/earning/orphan-sweep.js +63 -2
- package/dist/earning/orphan-sweep.js.map +1 -1
- package/dist/earning/reconcile.d.ts +2 -0
- package/dist/earning/reconcile.js +30 -0
- package/dist/earning/reconcile.js.map +1 -1
- package/dist/earning/stolas-claim.d.ts +86 -6
- package/dist/earning/stolas-claim.js +123 -9
- package/dist/earning/stolas-claim.js.map +1 -1
- package/dist/earning/store.d.ts +39 -0
- package/dist/earning/store.js +72 -1
- package/dist/earning/store.js.map +1 -1
- package/dist/earning/testnet-setup-migration.d.ts +32 -0
- package/dist/earning/testnet-setup-migration.js +214 -0
- package/dist/earning/testnet-setup-migration.js.map +1 -0
- package/dist/earning/types.d.ts +53 -9
- package/dist/earning/types.js +51 -2
- package/dist/earning/types.js.map +1 -1
- package/dist/earning/viem-clients.d.ts +20 -0
- package/dist/earning/viem-clients.js +32 -1
- package/dist/earning/viem-clients.js.map +1 -1
- package/dist/erc8004/abis.d.ts +381 -0
- package/dist/erc8004/abis.js +238 -0
- package/dist/erc8004/abis.js.map +1 -0
- package/dist/erc8004/addresses.d.ts +40 -0
- package/dist/erc8004/addresses.js +64 -0
- package/dist/erc8004/addresses.js.map +1 -0
- package/dist/erc8004/identity.d.ts +202 -0
- package/dist/erc8004/identity.js +305 -0
- package/dist/erc8004/identity.js.map +1 -0
- package/dist/erc8004/index.d.ts +13 -0
- package/dist/erc8004/index.js +20 -0
- package/dist/erc8004/index.js.map +1 -0
- package/dist/erc8004/reputation.d.ts +349 -0
- package/dist/erc8004/reputation.js +464 -0
- package/dist/erc8004/reputation.js.map +1 -0
- package/dist/erc8004/subgraph.d.ts +46 -0
- package/dist/erc8004/subgraph.js +37 -0
- package/dist/erc8004/subgraph.js.map +1 -0
- package/dist/erc8004/validation.d.ts +145 -0
- package/dist/erc8004/validation.js +219 -0
- package/dist/erc8004/validation.js.map +1 -0
- package/dist/errors/persisted-bootstrap-error.d.ts +4 -0
- package/dist/errors/persisted-bootstrap-error.js +50 -0
- package/dist/errors/persisted-bootstrap-error.js.map +1 -0
- package/dist/events/emitter.d.ts +12 -0
- package/dist/events/emitter.js +23 -0
- package/dist/events/emitter.js.map +1 -0
- package/dist/events/ring-buffer.d.ts +25 -0
- package/dist/events/ring-buffer.js +46 -0
- package/dist/events/ring-buffer.js.map +1 -0
- package/dist/events/types.d.ts +42 -0
- package/dist/events/types.js +28 -0
- package/dist/events/types.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/intents/kinds/index.d.ts +10 -0
- package/dist/intents/kinds/index.js +7 -0
- package/dist/intents/kinds/index.js.map +1 -1
- package/dist/intents/kinds/learner-loop-test.d.ts +2 -0
- package/dist/intents/kinds/learner-loop-test.js +39 -0
- package/dist/intents/kinds/learner-loop-test.js.map +1 -0
- package/dist/intents/kinds/prediction-apy-v0.js +5 -1
- package/dist/intents/kinds/prediction-apy-v0.js.map +1 -1
- package/dist/intents/kinds/prediction-v0.js +5 -0
- package/dist/intents/kinds/prediction-v0.js.map +1 -1
- package/dist/intents/kinds/spec-kind.d.ts +18 -1
- package/dist/intents/posting-service.d.ts +3 -5
- package/dist/intents/posting-service.js +16 -50
- package/dist/intents/posting-service.js.map +1 -1
- package/dist/intents/prediction-apy-v0-auto.d.ts +12 -2
- package/dist/intents/prediction-apy-v0-auto.js +27 -2
- package/dist/intents/prediction-apy-v0-auto.js.map +1 -1
- package/dist/intents/prediction-v0-auto.d.ts +14 -4
- package/dist/intents/prediction-v0-auto.js +29 -5
- package/dist/intents/prediction-v0-auto.js.map +1 -1
- package/dist/intents/signing.d.ts +13 -0
- package/dist/intents/signing.js +27 -0
- package/dist/intents/signing.js.map +1 -0
- package/dist/intents/sources.d.ts +12 -5
- package/dist/intents/sources.js +11 -11
- package/dist/intents/sources.js.map +1 -1
- package/dist/main.d.ts +5 -2
- package/dist/main.js +792 -66
- package/dist/main.js.map +1 -1
- package/dist/mcp/acquire-artifact.d.ts +39 -0
- package/dist/mcp/acquire-artifact.js +163 -0
- package/dist/mcp/acquire-artifact.js.map +1 -0
- package/dist/mcp/operator-server.d.ts +20 -3
- package/dist/mcp/operator-server.js +500 -25
- package/dist/mcp/operator-server.js.map +1 -1
- package/dist/mcp/search-artifacts.d.ts +31 -0
- package/dist/mcp/search-artifacts.js +40 -0
- package/dist/mcp/search-artifacts.js.map +1 -0
- package/dist/mcp/server.js +103 -58
- package/dist/mcp/server.js.map +1 -1
- package/dist/observability/emit-event.d.ts +1 -1
- package/dist/observability/emit-event.js.map +1 -1
- package/dist/operator-errors.js +4 -5
- package/dist/operator-errors.js.map +1 -1
- package/dist/preflight/claude-auth.d.ts +11 -11
- package/dist/preflight/claude-auth.js +18 -32
- package/dist/preflight/claude-auth.js.map +1 -1
- package/dist/restorer/capability/index.d.ts +82 -0
- package/dist/restorer/capability/index.js +12 -0
- package/dist/restorer/capability/index.js.map +1 -0
- package/dist/restorer/capability/scoped-rpc.d.ts +12 -0
- package/dist/restorer/capability/scoped-rpc.js +34 -0
- package/dist/restorer/capability/scoped-rpc.js.map +1 -0
- package/dist/restorer/capability/scoped-secrets.d.ts +8 -0
- package/dist/restorer/capability/scoped-secrets.js +10 -0
- package/dist/restorer/capability/scoped-secrets.js.map +1 -0
- package/dist/restorer/capability/scoped-signer.d.ts +46 -0
- package/dist/restorer/capability/scoped-signer.js +73 -0
- package/dist/restorer/capability/scoped-signer.js.map +1 -0
- package/dist/restorer/engine/canonical-json.d.ts +0 -17
- package/dist/restorer/engine/canonical-json.js +56 -49
- package/dist/restorer/engine/canonical-json.js.map +1 -1
- package/dist/restorer/engine/claim.js +8 -1
- package/dist/restorer/engine/claim.js.map +1 -1
- package/dist/restorer/engine/delivery.d.ts +2 -0
- package/dist/restorer/engine/delivery.js +2 -2
- package/dist/restorer/engine/delivery.js.map +1 -1
- package/dist/restorer/engine/engine.d.ts +143 -26
- package/dist/restorer/engine/engine.js +485 -104
- package/dist/restorer/engine/engine.js.map +1 -1
- package/dist/restorer/engine/envelope-assembly.d.ts +65 -0
- package/dist/restorer/engine/envelope-assembly.js +60 -0
- package/dist/restorer/engine/envelope-assembly.js.map +1 -0
- package/dist/restorer/engine/packaging.d.ts +30 -30
- package/dist/restorer/engine/packaging.js +73 -47
- package/dist/restorer/engine/packaging.js.map +1 -1
- package/dist/restorer/engine/persistence.d.ts +7 -7
- package/dist/restorer/engine/persistence.js +4 -4
- package/dist/restorer/engine/persistence.js.map +1 -1
- package/dist/restorer/engine/registry.d.ts +24 -13
- package/dist/restorer/engine/registry.js +16 -13
- package/dist/restorer/engine/registry.js.map +1 -1
- package/dist/restorer/engine/validate-manifest.d.ts +23 -0
- package/dist/restorer/engine/validate-manifest.js +49 -0
- package/dist/restorer/engine/validate-manifest.js.map +1 -0
- package/dist/restorer/engine/verification-stub.d.ts +18 -0
- package/dist/restorer/engine/verification-stub.js +18 -0
- package/dist/restorer/engine/verification-stub.js.map +1 -0
- package/dist/restorer/external-impls/index.d.ts +3 -0
- package/dist/restorer/external-impls/index.js +2 -0
- package/dist/restorer/external-impls/index.js.map +1 -0
- package/dist/restorer/external-impls/loader.d.ts +49 -0
- package/dist/restorer/external-impls/loader.js +138 -0
- package/dist/restorer/external-impls/loader.js.map +1 -0
- package/dist/restorer/external-impls/package-hash.d.ts +26 -0
- package/dist/restorer/external-impls/package-hash.js +102 -0
- package/dist/restorer/external-impls/package-hash.js.map +1 -0
- package/dist/restorer/external-impls/types.d.ts +42 -0
- package/dist/restorer/external-impls/types.js +10 -0
- package/dist/restorer/external-impls/types.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/adapters/claude-code.d.ts +38 -0
- package/dist/restorer/impls/claude-code-learner/adapters/claude-code.js +200 -0
- package/dist/restorer/impls/claude-code-learner/adapters/claude-code.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/harvest.d.ts +19 -0
- package/dist/restorer/impls/claude-code-learner/harvest.js +146 -0
- package/dist/restorer/impls/claude-code-learner/harvest.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/index.d.ts +15 -0
- package/dist/restorer/impls/claude-code-learner/index.js +14 -0
- package/dist/restorer/impls/claude-code-learner/index.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/mcp-config.d.ts +48 -0
- package/dist/restorer/impls/claude-code-learner/mcp-config.js +52 -0
- package/dist/restorer/impls/claude-code-learner/mcp-config.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/plugin-path.d.ts +14 -0
- package/dist/restorer/impls/claude-code-learner/plugin-path.js +30 -0
- package/dist/restorer/impls/claude-code-learner/plugin-path.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/restorer.d.ts +38 -0
- package/dist/restorer/impls/claude-code-learner/restorer.js +73 -0
- package/dist/restorer/impls/claude-code-learner/restorer.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/test-utils/fake-plugin-outputs.d.ts +19 -0
- package/dist/restorer/impls/claude-code-learner/test-utils/fake-plugin-outputs.js +111 -0
- package/dist/restorer/impls/claude-code-learner/test-utils/fake-plugin-outputs.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/test-utils/noop-adapter.d.ts +22 -0
- package/dist/restorer/impls/claude-code-learner/test-utils/noop-adapter.js +35 -0
- package/dist/restorer/impls/claude-code-learner/test-utils/noop-adapter.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/test-utils/synthetic-session.d.ts +20 -0
- package/dist/restorer/impls/claude-code-learner/test-utils/synthetic-session.js +34 -0
- package/dist/restorer/impls/claude-code-learner/test-utils/synthetic-session.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/types.d.ts +99 -0
- package/dist/restorer/impls/claude-code-learner/types.js +2 -0
- package/dist/restorer/impls/claude-code-learner/types.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/wrapper.d.ts +49 -0
- package/dist/restorer/impls/claude-code-learner/wrapper.js +144 -0
- package/dist/restorer/impls/claude-code-learner/wrapper.js.map +1 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/index.d.ts +2 -2
- package/dist/restorer/impls/claude-mcp-hyperliquid/index.js +2 -2
- package/dist/restorer/impls/claude-mcp-hyperliquid/index.js.map +1 -1
- package/dist/restorer/impls/claude-mcp-hyperliquid/session-orchestrator.d.ts +7 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/session-orchestrator.js +38 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/session-orchestrator.js.map +1 -1
- package/dist/restorer/impls/claude-mcp-prediction/index.d.ts +2 -2
- package/dist/restorer/impls/claude-mcp-prediction/index.js +12 -2
- package/dist/restorer/impls/claude-mcp-prediction/index.js.map +1 -1
- package/dist/restorer/impls/claude-mcp-prediction/session-orchestrator.d.ts +9 -2
- package/dist/restorer/impls/claude-mcp-prediction/session-orchestrator.js +9 -125
- package/dist/restorer/impls/claude-mcp-prediction/session-orchestrator.js.map +1 -1
- package/dist/restorer/impls/claude-mcp-prediction-apy/index.d.ts +2 -2
- package/dist/restorer/impls/claude-mcp-prediction-apy/index.js +9 -2
- package/dist/restorer/impls/claude-mcp-prediction-apy/index.js.map +1 -1
- package/dist/restorer/impls/claude-mcp-prediction-apy/session-orchestrator.d.ts +10 -0
- package/dist/restorer/impls/claude-mcp-prediction-apy/session-orchestrator.js +10 -119
- package/dist/restorer/impls/claude-mcp-prediction-apy/session-orchestrator.js.map +1 -1
- package/dist/restorer/impls/claude-mcp-shared/single-session-orchestrator.d.ts +84 -0
- package/dist/restorer/impls/claude-mcp-shared/single-session-orchestrator.js +206 -0
- package/dist/restorer/impls/claude-mcp-shared/single-session-orchestrator.js.map +1 -0
- package/dist/restorer/impls/evaluation-context.d.ts +11 -4
- package/dist/restorer/impls/evaluation-context.js +9 -2
- package/dist/restorer/impls/evaluation-context.js.map +1 -1
- package/dist/restorer/impls/index.d.ts +46 -1
- package/dist/restorer/impls/index.js +38 -0
- package/dist/restorer/impls/index.js.map +1 -1
- package/dist/restorer/impls/legacy-claude/index.d.ts +13 -1
- package/dist/restorer/impls/legacy-claude/index.js +2 -0
- package/dist/restorer/impls/legacy-claude/index.js.map +1 -1
- package/dist/restorer/impls/portfolio-v0-evaluator/index.d.ts +4 -4
- package/dist/restorer/impls/portfolio-v0-evaluator/index.js +184 -55
- package/dist/restorer/impls/portfolio-v0-evaluator/index.js.map +1 -1
- package/dist/restorer/impls/prediction-apy-v0-baseline/index.d.ts +1 -1
- package/dist/restorer/impls/prediction-apy-v0-baseline/index.js +8 -1
- package/dist/restorer/impls/prediction-apy-v0-baseline/index.js.map +1 -1
- package/dist/restorer/impls/prediction-apy-v0-evaluator/index.d.ts +3 -3
- package/dist/restorer/impls/prediction-apy-v0-evaluator/index.js +153 -15
- package/dist/restorer/impls/prediction-apy-v0-evaluator/index.js.map +1 -1
- package/dist/restorer/impls/prediction-apy-v0-evaluator/parse-submission.d.ts +14 -5
- package/dist/restorer/impls/prediction-apy-v0-evaluator/parse-submission.js +16 -23
- package/dist/restorer/impls/prediction-apy-v0-evaluator/parse-submission.js.map +1 -1
- package/dist/restorer/impls/prediction-v0-baseline/index.d.ts +1 -1
- package/dist/restorer/impls/prediction-v0-baseline/index.js +16 -7
- package/dist/restorer/impls/prediction-v0-baseline/index.js.map +1 -1
- package/dist/restorer/impls/prediction-v0-evaluator/checks/integrity.d.ts +5 -3
- package/dist/restorer/impls/prediction-v0-evaluator/checks/integrity.js.map +1 -1
- package/dist/restorer/impls/prediction-v0-evaluator/index.d.ts +2 -2
- package/dist/restorer/impls/prediction-v0-evaluator/index.js +175 -67
- package/dist/restorer/impls/prediction-v0-evaluator/index.js.map +1 -1
- package/dist/restorer/manifest/index.d.ts +3 -0
- package/dist/restorer/manifest/index.js +3 -0
- package/dist/restorer/manifest/index.js.map +1 -0
- package/dist/restorer/manifest/load.d.ts +7 -0
- package/dist/restorer/manifest/load.js +49 -0
- package/dist/restorer/manifest/load.js.map +1 -0
- package/dist/restorer/manifest/types.d.ts +75 -0
- package/dist/restorer/manifest/types.js +8 -0
- package/dist/restorer/manifest/types.js.map +1 -0
- package/dist/restorer/manifest/verify.d.ts +15 -0
- package/dist/restorer/manifest/verify.js +53 -0
- package/dist/restorer/manifest/verify.js.map +1 -0
- package/dist/restorer/plug-ins/index.d.ts +14 -0
- package/dist/restorer/plug-ins/index.js +11 -0
- package/dist/restorer/plug-ins/index.js.map +1 -0
- package/dist/restorer/plug-ins/loader.d.ts +27 -0
- package/dist/restorer/plug-ins/loader.js +101 -0
- package/dist/restorer/plug-ins/loader.js.map +1 -0
- package/dist/restorer/plug-ins/manifest.d.ts +7 -0
- package/dist/restorer/plug-ins/manifest.js +97 -0
- package/dist/restorer/plug-ins/manifest.js.map +1 -0
- package/dist/restorer/plug-ins/registry.d.ts +24 -0
- package/dist/restorer/plug-ins/registry.js +17 -0
- package/dist/restorer/plug-ins/registry.js.map +1 -0
- package/dist/restorer/plug-ins/serialise.d.ts +29 -0
- package/dist/restorer/plug-ins/serialise.js +29 -0
- package/dist/restorer/plug-ins/serialise.js.map +1 -0
- package/dist/restorer/plug-ins/types.d.ts +77 -0
- package/dist/restorer/plug-ins/types.js +10 -0
- package/dist/restorer/plug-ins/types.js.map +1 -0
- package/dist/restorer/types.d.ts +66 -11
- package/dist/restorer/types.js.map +1 -1
- package/dist/runner/claude.d.ts +3 -3
- package/dist/runner/claude.js +57 -21
- package/dist/runner/claude.js.map +1 -1
- package/dist/runner/runner.d.ts +29 -2
- package/dist/runner/simple.d.ts +2 -2
- package/dist/runner/simple.js +2 -2
- package/dist/runner/simple.js.map +1 -1
- package/dist/scripts/fix-node-pty.mjs +62 -0
- package/dist/setup-mode.d.ts +34 -0
- package/dist/setup-mode.js +49 -0
- package/dist/setup-mode.js.map +1 -0
- package/dist/store/store.d.ts +79 -3
- package/dist/store/store.js +189 -6
- package/dist/store/store.js.map +1 -1
- package/dist/templates/plug-in/hook/README.md.tmpl +24 -0
- package/dist/templates/plug-in/hook/gitignore.tmpl +3 -0
- package/dist/templates/plug-in/hook/hooks/event.sh.tmpl +15 -0
- package/dist/templates/plug-in/hook/jinn-plugin.json.tmpl +16 -0
- package/dist/templates/plug-in/hook/package.json.tmpl +14 -0
- package/dist/templates/plug-in/hook/test/manifest.test.ts.tmpl +21 -0
- package/dist/templates/plug-in/mcp-tool/README.md.tmpl +26 -0
- package/dist/templates/plug-in/mcp-tool/gitignore.tmpl +4 -0
- package/dist/templates/plug-in/mcp-tool/jinn-plugin.json.tmpl +16 -0
- package/dist/templates/plug-in/mcp-tool/package.json.tmpl +19 -0
- package/dist/templates/plug-in/mcp-tool/src/server.ts.tmpl +17 -0
- package/dist/templates/plug-in/mcp-tool/test/server.test.ts.tmpl +18 -0
- package/dist/templates/plug-in/memory-backend/README.md.tmpl +33 -0
- package/dist/templates/plug-in/memory-backend/gitignore.tmpl +4 -0
- package/dist/templates/plug-in/memory-backend/jinn-plugin.json.tmpl +16 -0
- package/dist/templates/plug-in/memory-backend/package.json.tmpl +19 -0
- package/dist/templates/plug-in/memory-backend/src/server.ts.tmpl +23 -0
- package/dist/templates/plug-in/memory-backend/test/server.test.ts.tmpl +17 -0
- package/dist/templates/plug-in/phase-agent-override/README.md.tmpl +30 -0
- package/dist/templates/plug-in/phase-agent-override/agents/agent.md.tmpl +26 -0
- package/dist/templates/plug-in/phase-agent-override/gitignore.tmpl +3 -0
- package/dist/templates/plug-in/phase-agent-override/jinn-plugin.json.tmpl +17 -0
- package/dist/templates/plug-in/phase-agent-override/package.json.tmpl +14 -0
- package/dist/templates/plug-in/phase-agent-override/test/manifest.test.ts.tmpl +24 -0
- package/dist/templates/plug-in/skill-bundle/.claude-plugin/plugin.json.tmpl +5 -0
- package/dist/templates/plug-in/skill-bundle/README.md.tmpl +28 -0
- package/dist/templates/plug-in/skill-bundle/gitignore.tmpl +3 -0
- package/dist/templates/plug-in/skill-bundle/jinn-plugin.json.tmpl +15 -0
- package/dist/templates/plug-in/skill-bundle/package.json.tmpl +14 -0
- package/dist/templates/plug-in/skill-bundle/skills/example/SKILL.md.tmpl +14 -0
- package/dist/templates/plug-in/skill-bundle/test/manifest.test.ts.tmpl +21 -0
- package/dist/templates/plug-in/topic-explorer/README.md.tmpl +24 -0
- package/dist/templates/plug-in/topic-explorer/agents/explorer.md.tmpl +26 -0
- package/dist/templates/plug-in/topic-explorer/gitignore.tmpl +3 -0
- package/dist/templates/plug-in/topic-explorer/jinn-plugin.json.tmpl +17 -0
- package/dist/templates/plug-in/topic-explorer/package.json.tmpl +14 -0
- package/dist/templates/plug-in/topic-explorer/test/manifest.test.ts.tmpl +22 -0
- package/dist/templates/restorer/alternative-harness/README.md.tmpl +44 -0
- package/dist/templates/restorer/alternative-harness/gitignore.tmpl +3 -0
- package/dist/templates/restorer/alternative-harness/jinn.manifest.json.tmpl +22 -0
- package/dist/templates/restorer/alternative-harness/package.json.tmpl +26 -0
- package/dist/templates/restorer/alternative-harness/src/coordinator.ts.tmpl +50 -0
- package/dist/templates/restorer/alternative-harness/src/harness.ts.tmpl +31 -0
- package/dist/templates/restorer/alternative-harness/src/index.ts.tmpl +44 -0
- package/dist/templates/restorer/alternative-harness/src/mock-harness.ts.tmpl +41 -0
- package/dist/templates/restorer/alternative-harness/src/phases/debrief.ts.tmpl +28 -0
- package/dist/templates/restorer/alternative-harness/src/phases/execute.ts.tmpl +33 -0
- package/dist/templates/restorer/alternative-harness/src/phases/improve.ts.tmpl +31 -0
- package/dist/templates/restorer/alternative-harness/src/phases/memory.ts.tmpl +31 -0
- package/dist/templates/restorer/alternative-harness/src/phases/orient.ts.tmpl +21 -0
- package/dist/templates/restorer/alternative-harness/src/phases/plan.ts.tmpl +25 -0
- package/dist/templates/restorer/alternative-harness/src/phases/strategize.ts.tmpl +29 -0
- package/dist/templates/restorer/alternative-harness/test/coordinator.test.ts.tmpl +52 -0
- package/dist/templates/restorer/alternative-harness/test/unit.test.ts.tmpl +54 -0
- package/dist/templates/restorer/alternative-harness/tsconfig.json.tmpl +16 -0
- package/dist/templates/restorer/evaluator/README.md.tmpl +36 -0
- package/dist/templates/restorer/evaluator/gitignore.tmpl +3 -0
- package/dist/templates/restorer/evaluator/jinn.manifest.json.tmpl +22 -0
- package/dist/templates/restorer/evaluator/package.json.tmpl +26 -0
- package/dist/templates/restorer/evaluator/src/index.ts.tmpl +35 -0
- package/dist/templates/restorer/evaluator/test/unit.test.ts.tmpl +48 -0
- package/dist/templates/restorer/evaluator/tsconfig.json.tmpl +16 -0
- package/dist/templates/restorer/forecaster/README.md.tmpl +25 -0
- package/dist/templates/restorer/forecaster/gitignore.tmpl +5 -0
- package/dist/templates/restorer/forecaster/jinn.manifest.json.tmpl +22 -0
- package/dist/templates/restorer/forecaster/package.json.tmpl +26 -0
- package/dist/templates/restorer/forecaster/src/index.ts.tmpl +33 -0
- package/dist/templates/restorer/forecaster/test/unit.test.ts.tmpl +41 -0
- package/dist/templates/restorer/forecaster/tsconfig.json.tmpl +16 -0
- package/dist/trajectory/collector.d.ts +49 -0
- package/dist/trajectory/collector.js +86 -0
- package/dist/trajectory/collector.js.map +1 -0
- package/dist/trajectory/emit.d.ts +27 -0
- package/dist/trajectory/emit.js +40 -0
- package/dist/trajectory/emit.js.map +1 -0
- package/dist/trajectory/hash-chain.d.ts +18 -0
- package/dist/trajectory/hash-chain.js +23 -0
- package/dist/trajectory/hash-chain.js.map +1 -0
- package/dist/trajectory/index.d.ts +22 -0
- package/dist/trajectory/index.js +23 -0
- package/dist/trajectory/index.js.map +1 -0
- package/dist/trajectory/schema.d.ts +14 -14
- package/dist/trajectory/secret-scrub.d.ts +32 -0
- package/dist/trajectory/secret-scrub.js +51 -0
- package/dist/trajectory/secret-scrub.js.map +1 -0
- package/dist/trajectory/span-profile.d.ts +27 -0
- package/dist/trajectory/span-profile.js +51 -0
- package/dist/trajectory/span-profile.js.map +1 -0
- package/dist/trajectory/wrappers/http.d.ts +37 -0
- package/dist/trajectory/wrappers/http.js +85 -0
- package/dist/trajectory/wrappers/http.js.map +1 -0
- package/dist/trajectory/wrappers/mcp.d.ts +17 -0
- package/dist/trajectory/wrappers/mcp.js +58 -0
- package/dist/trajectory/wrappers/mcp.js.map +1 -0
- package/dist/trajectory/wrappers/subprocess.d.ts +32 -0
- package/dist/trajectory/wrappers/subprocess.js +70 -0
- package/dist/trajectory/wrappers/subprocess.js.map +1 -0
- package/dist/tx-retry.js +23 -9
- package/dist/tx-retry.js.map +1 -1
- package/dist/types/desired-state.d.ts +211 -21
- package/dist/types/desired-state.js +26 -15
- package/dist/types/desired-state.js.map +1 -1
- package/dist/types/envelope.d.ts +1473 -0
- package/dist/types/envelope.js +114 -0
- package/dist/types/envelope.js.map +1 -0
- package/dist/types/index.d.ts +4 -4
- package/dist/types/index.js +4 -4
- package/dist/types/index.js.map +1 -1
- package/dist/types/intent.d.ts +276 -0
- package/dist/types/intent.js +74 -0
- package/dist/types/intent.js.map +1 -0
- package/dist/types/payloads/index.d.ts +11 -0
- package/dist/types/payloads/index.js +46 -0
- package/dist/types/payloads/index.js.map +1 -0
- package/dist/types/payloads/portfolio-v0.d.ts +481 -0
- package/dist/types/payloads/portfolio-v0.js +94 -0
- package/dist/types/payloads/portfolio-v0.js.map +1 -0
- package/dist/types/payloads/prediction-apy-v0.d.ts +231 -0
- package/dist/types/payloads/prediction-apy-v0.js +63 -0
- package/dist/types/payloads/prediction-apy-v0.js.map +1 -0
- package/dist/types/payloads/prediction-v0.d.ts +262 -0
- package/dist/types/payloads/prediction-v0.js +73 -0
- package/dist/types/payloads/prediction-v0.js.map +1 -0
- package/dist/types/portfolio.d.ts +23 -685
- package/dist/types/portfolio.js +16 -106
- package/dist/types/portfolio.js.map +1 -1
- package/dist/types/prediction-apy.d.ts +9 -344
- package/dist/types/prediction-apy.js +9 -65
- package/dist/types/prediction-apy.js.map +1 -1
- package/dist/types/prediction.d.ts +25 -396
- package/dist/types/prediction.js +5 -79
- package/dist/types/prediction.js.map +1 -1
- package/dist/types/window.d.ts +12 -0
- package/dist/types/window.js +6 -0
- package/dist/types/window.js.map +1 -0
- package/dist/util/path-safety.d.ts +22 -0
- package/dist/util/path-safety.js +29 -0
- package/dist/util/path-safety.js.map +1 -0
- package/dist/util/redact-rpc-urls.d.ts +5 -0
- package/dist/util/redact-rpc-urls.js +9 -0
- package/dist/util/redact-rpc-urls.js.map +1 -0
- package/dist/x402/acquire.d.ts +14 -3
- package/dist/x402/acquire.js +28 -11
- package/dist/x402/acquire.js.map +1 -1
- package/dist/x402/handler.d.ts +15 -3
- package/dist/x402/handler.js +67 -24
- package/dist/x402/handler.js.map +1 -1
- package/package.json +36 -11
- package/plugins/claude-code-learner/.claude-plugin/plugin.json +9 -0
- package/plugins/claude-code-learner/AGENTS.md +30 -0
- package/plugins/claude-code-learner/CLAUDE.md +31 -0
- package/plugins/claude-code-learner/README.md +58 -0
- package/plugins/claude-code-learner/agents/analyst.md +69 -0
- package/plugins/claude-code-learner/agents/consolidator.md +95 -0
- package/plugins/claude-code-learner/agents/explorer.md +54 -0
- package/plugins/claude-code-learner/agents/planner.md +88 -0
- package/plugins/claude-code-learner/agents/promoter.md +114 -0
- package/plugins/claude-code-learner/agents/step-worker.md +48 -0
- package/plugins/claude-code-learner/agents/strategist.md +86 -0
- package/plugins/claude-code-learner/hooks/hooks.json +16 -0
- package/plugins/claude-code-learner/hooks/session-start +49 -0
- package/plugins/claude-code-learner/skills/coordinator/SKILL.md +131 -0
- package/plugins/claude-code-learner/skills/debrief/SKILL.md +71 -0
- package/plugins/claude-code-learner/skills/execute/SKILL.md +91 -0
- package/plugins/claude-code-learner/skills/improve/SKILL.md +57 -0
- package/plugins/claude-code-learner/skills/memory-consolidation/SKILL.md +57 -0
- package/plugins/claude-code-learner/skills/orient/SKILL.md +82 -0
- package/plugins/claude-code-learner/skills/plan/SKILL.md +54 -0
- package/plugins/claude-code-learner/skills/strategize/SKILL.md +63 -0
- package/skills/jinn-operator/SKILL.md +84 -35
- package/templates/plug-in/hook/README.md.tmpl +24 -0
- package/templates/plug-in/hook/gitignore.tmpl +3 -0
- package/templates/plug-in/hook/hooks/event.sh.tmpl +15 -0
- package/templates/plug-in/hook/jinn-plugin.json.tmpl +16 -0
- package/templates/plug-in/hook/package.json.tmpl +14 -0
- package/templates/plug-in/hook/test/manifest.test.ts.tmpl +21 -0
- package/templates/plug-in/mcp-tool/README.md.tmpl +26 -0
- package/templates/plug-in/mcp-tool/gitignore.tmpl +4 -0
- package/templates/plug-in/mcp-tool/jinn-plugin.json.tmpl +16 -0
- package/templates/plug-in/mcp-tool/package.json.tmpl +19 -0
- package/templates/plug-in/mcp-tool/src/server.ts.tmpl +17 -0
- package/templates/plug-in/mcp-tool/test/server.test.ts.tmpl +18 -0
- package/templates/plug-in/memory-backend/README.md.tmpl +33 -0
- package/templates/plug-in/memory-backend/gitignore.tmpl +4 -0
- package/templates/plug-in/memory-backend/jinn-plugin.json.tmpl +16 -0
- package/templates/plug-in/memory-backend/package.json.tmpl +19 -0
- package/templates/plug-in/memory-backend/src/server.ts.tmpl +23 -0
- package/templates/plug-in/memory-backend/test/server.test.ts.tmpl +17 -0
- package/templates/plug-in/phase-agent-override/README.md.tmpl +30 -0
- package/templates/plug-in/phase-agent-override/agents/agent.md.tmpl +26 -0
- package/templates/plug-in/phase-agent-override/gitignore.tmpl +3 -0
- package/templates/plug-in/phase-agent-override/jinn-plugin.json.tmpl +17 -0
- package/templates/plug-in/phase-agent-override/package.json.tmpl +14 -0
- package/templates/plug-in/phase-agent-override/test/manifest.test.ts.tmpl +24 -0
- package/templates/plug-in/skill-bundle/.claude-plugin/plugin.json.tmpl +5 -0
- package/templates/plug-in/skill-bundle/README.md.tmpl +28 -0
- package/templates/plug-in/skill-bundle/gitignore.tmpl +3 -0
- package/templates/plug-in/skill-bundle/jinn-plugin.json.tmpl +15 -0
- package/templates/plug-in/skill-bundle/package.json.tmpl +14 -0
- package/templates/plug-in/skill-bundle/skills/example/SKILL.md.tmpl +14 -0
- package/templates/plug-in/skill-bundle/test/manifest.test.ts.tmpl +21 -0
- package/templates/plug-in/topic-explorer/README.md.tmpl +24 -0
- package/templates/plug-in/topic-explorer/agents/explorer.md.tmpl +26 -0
- package/templates/plug-in/topic-explorer/gitignore.tmpl +3 -0
- package/templates/plug-in/topic-explorer/jinn-plugin.json.tmpl +17 -0
- package/templates/plug-in/topic-explorer/package.json.tmpl +14 -0
- package/templates/plug-in/topic-explorer/test/manifest.test.ts.tmpl +22 -0
- package/templates/restorer/alternative-harness/README.md.tmpl +44 -0
- package/templates/restorer/alternative-harness/gitignore.tmpl +3 -0
- package/templates/restorer/alternative-harness/jinn.manifest.json.tmpl +22 -0
- package/templates/restorer/alternative-harness/package.json.tmpl +26 -0
- package/templates/restorer/alternative-harness/src/coordinator.ts.tmpl +50 -0
- package/templates/restorer/alternative-harness/src/harness.ts.tmpl +31 -0
- package/templates/restorer/alternative-harness/src/index.ts.tmpl +44 -0
- package/templates/restorer/alternative-harness/src/mock-harness.ts.tmpl +41 -0
- package/templates/restorer/alternative-harness/src/phases/debrief.ts.tmpl +28 -0
- package/templates/restorer/alternative-harness/src/phases/execute.ts.tmpl +33 -0
- package/templates/restorer/alternative-harness/src/phases/improve.ts.tmpl +31 -0
- package/templates/restorer/alternative-harness/src/phases/memory.ts.tmpl +31 -0
- package/templates/restorer/alternative-harness/src/phases/orient.ts.tmpl +21 -0
- package/templates/restorer/alternative-harness/src/phases/plan.ts.tmpl +25 -0
- package/templates/restorer/alternative-harness/src/phases/strategize.ts.tmpl +29 -0
- package/templates/restorer/alternative-harness/test/coordinator.test.ts.tmpl +52 -0
- package/templates/restorer/alternative-harness/test/unit.test.ts.tmpl +54 -0
- package/templates/restorer/alternative-harness/tsconfig.json.tmpl +16 -0
- package/templates/restorer/evaluator/README.md.tmpl +36 -0
- package/templates/restorer/evaluator/gitignore.tmpl +3 -0
- package/templates/restorer/evaluator/jinn.manifest.json.tmpl +22 -0
- package/templates/restorer/evaluator/package.json.tmpl +26 -0
- package/templates/restorer/evaluator/src/index.ts.tmpl +35 -0
- package/templates/restorer/evaluator/test/unit.test.ts.tmpl +48 -0
- package/templates/restorer/evaluator/tsconfig.json.tmpl +16 -0
- package/templates/restorer/forecaster/README.md.tmpl +25 -0
- package/templates/restorer/forecaster/gitignore.tmpl +5 -0
- package/templates/restorer/forecaster/jinn.manifest.json.tmpl +22 -0
- package/templates/restorer/forecaster/package.json.tmpl +26 -0
- package/templates/restorer/forecaster/src/index.ts.tmpl +33 -0
- package/templates/restorer/forecaster/test/unit.test.ts.tmpl +41 -0
- package/templates/restorer/forecaster/tsconfig.json.tmpl +16 -0
- package/dist/bin/jinn-mcp.d.ts +0 -2
- package/dist/bin/jinn-mcp.js +0 -10
- package/dist/bin/jinn-mcp.js.map +0 -1
- package/dist/cli/commands/quickstart.js +0 -330
- package/dist/cli/commands/quickstart.js.map +0 -1
- package/dist/discovery/registry.d.ts +0 -97
- package/dist/discovery/registry.js +0 -177
- package/dist/discovery/registry.js.map +0 -1
- package/dist/discovery/subgraph.d.ts +0 -37
- package/dist/discovery/subgraph.js +0 -87
- package/dist/discovery/subgraph.js.map +0 -1
- package/dist/restorer/engine/manifest-assembly.d.ts +0 -67
- package/dist/restorer/engine/manifest-assembly.js +0 -79
- package/dist/restorer/engine/manifest-assembly.js.map +0 -1
- /package/dist/cli/commands/{quickstart.d.ts → ui.d.ts} +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jinn-network/client claude-code-learner restorer impl.
|
|
3
|
+
*
|
|
4
|
+
* Bridges the engine's RestorerImpl interface to the claude-code-learner
|
|
5
|
+
* plugin shipped at client/plugins/claude-code-learner/.
|
|
6
|
+
*
|
|
7
|
+
* Spec: docs/superpowers/specs/2026-04-23-default-learning-restorer-design.md (v1.1)
|
|
8
|
+
*/
|
|
9
|
+
export { ClaudeCodeLearnerImpl } from './restorer.js';
|
|
10
|
+
export { resolvePluginRoot } from './plugin-path.js';
|
|
11
|
+
export { harvestOutput } from './harvest.js';
|
|
12
|
+
export { ClaudeCodeHarnessAdapter } from './adapters/claude-code.js';
|
|
13
|
+
export { ClaudeCodeLearnerWrapper } from './wrapper.js';
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/restorer/impls/claude-code-learner/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,EAAE,wBAAwB,EAAuC,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP-server config merger for Path 1 plug-ins. The Claude Code adapter
|
|
3
|
+
* spawns the harness with a baseline `mcpServers` map (in-repo MCP
|
|
4
|
+
* tools); this helper extends that map with `mcp-tool` and
|
|
5
|
+
* `memory-backend` slots from the loaded plug-in registry.
|
|
6
|
+
*
|
|
7
|
+
* Slot key resolution:
|
|
8
|
+
* - mcp-tool → `slot.namespace ?? plugInName`
|
|
9
|
+
* - memory-backend → `memory-<plugInName>` (always prefixed so the
|
|
10
|
+
* memory-consolidation skill can pattern-match)
|
|
11
|
+
*
|
|
12
|
+
* Collisions with the baseline (or between two plug-ins) throw — the
|
|
13
|
+
* loader cannot silently overwrite an in-repo MCP server.
|
|
14
|
+
*
|
|
15
|
+
* Spec: spec/2026-04-30-plug-in-surface.md §4 (slots: mcp-tool,
|
|
16
|
+
* memory-backend). Plan tasks 9 + 11.
|
|
17
|
+
*
|
|
18
|
+
* Slot integrations rely on Claude Code's `--mcp-config` argument; this
|
|
19
|
+
* module only assembles the JSON shape — it does not write it to disk
|
|
20
|
+
* or pass it to the adapter. The adapter materialises this output as a
|
|
21
|
+
* temp `.mcp.json` and points the harness at it.
|
|
22
|
+
*/
|
|
23
|
+
import type { RegistrySlot } from '../../plug-ins/registry.js';
|
|
24
|
+
import type { McpToolSlot, MemoryBackendSlot } from '../../plug-ins/types.js';
|
|
25
|
+
export interface McpServerEntry {
|
|
26
|
+
command: string;
|
|
27
|
+
args: readonly string[];
|
|
28
|
+
}
|
|
29
|
+
export interface McpConfig {
|
|
30
|
+
mcpServers: Record<string, McpServerEntry>;
|
|
31
|
+
}
|
|
32
|
+
export declare function mergeMcpConfig(baseline: McpConfig, slots: ReadonlyArray<RegistrySlot<McpToolSlot>>): McpConfig;
|
|
33
|
+
export declare function mergeMemoryBackendsIntoMcpConfig(baseline: McpConfig, slots: ReadonlyArray<RegistrySlot<MemoryBackendSlot>>): McpConfig;
|
|
34
|
+
/**
|
|
35
|
+
* Skill-bundle integration uses Claude Code's `--plugin-dir` argument:
|
|
36
|
+
* each plug-in's package root is its own loaded plugin. The bundled
|
|
37
|
+
* claude-code-learner plugin always ships first; plug-in skill bundles
|
|
38
|
+
* extend the list. See plan Task 10.
|
|
39
|
+
*/
|
|
40
|
+
export interface SerialisedRegistryLike {
|
|
41
|
+
skillBundles: ReadonlyArray<{
|
|
42
|
+
packageRoot: string;
|
|
43
|
+
slot: {
|
|
44
|
+
skillsDir: string;
|
|
45
|
+
};
|
|
46
|
+
}>;
|
|
47
|
+
}
|
|
48
|
+
export declare function pluginDirsForSession(registry: SerialisedRegistryLike, bundledPluginRoot: string): string[];
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP-server config merger for Path 1 plug-ins. The Claude Code adapter
|
|
3
|
+
* spawns the harness with a baseline `mcpServers` map (in-repo MCP
|
|
4
|
+
* tools); this helper extends that map with `mcp-tool` and
|
|
5
|
+
* `memory-backend` slots from the loaded plug-in registry.
|
|
6
|
+
*
|
|
7
|
+
* Slot key resolution:
|
|
8
|
+
* - mcp-tool → `slot.namespace ?? plugInName`
|
|
9
|
+
* - memory-backend → `memory-<plugInName>` (always prefixed so the
|
|
10
|
+
* memory-consolidation skill can pattern-match)
|
|
11
|
+
*
|
|
12
|
+
* Collisions with the baseline (or between two plug-ins) throw — the
|
|
13
|
+
* loader cannot silently overwrite an in-repo MCP server.
|
|
14
|
+
*
|
|
15
|
+
* Spec: spec/2026-04-30-plug-in-surface.md §4 (slots: mcp-tool,
|
|
16
|
+
* memory-backend). Plan tasks 9 + 11.
|
|
17
|
+
*
|
|
18
|
+
* Slot integrations rely on Claude Code's `--mcp-config` argument; this
|
|
19
|
+
* module only assembles the JSON shape — it does not write it to disk
|
|
20
|
+
* or pass it to the adapter. The adapter materialises this output as a
|
|
21
|
+
* temp `.mcp.json` and points the harness at it.
|
|
22
|
+
*/
|
|
23
|
+
export function mergeMcpConfig(baseline, slots) {
|
|
24
|
+
const out = { mcpServers: { ...baseline.mcpServers } };
|
|
25
|
+
for (const reg of slots) {
|
|
26
|
+
const key = reg.slot.namespace ?? reg.plugInName;
|
|
27
|
+
if (key in out.mcpServers) {
|
|
28
|
+
throw new Error(`MCP server name collision: ${key} (already in baseline or another plug-in)`);
|
|
29
|
+
}
|
|
30
|
+
out.mcpServers[key] = { command: reg.slot.command, args: reg.slot.args };
|
|
31
|
+
}
|
|
32
|
+
return out;
|
|
33
|
+
}
|
|
34
|
+
export function mergeMemoryBackendsIntoMcpConfig(baseline, slots) {
|
|
35
|
+
const out = { mcpServers: { ...baseline.mcpServers } };
|
|
36
|
+
for (const reg of slots) {
|
|
37
|
+
const key = `memory-${reg.plugInName}`;
|
|
38
|
+
if (key in out.mcpServers) {
|
|
39
|
+
throw new Error(`MCP server name collision: ${key}`);
|
|
40
|
+
}
|
|
41
|
+
out.mcpServers[key] = { command: reg.slot.command, args: reg.slot.args };
|
|
42
|
+
}
|
|
43
|
+
return out;
|
|
44
|
+
}
|
|
45
|
+
export function pluginDirsForSession(registry, bundledPluginRoot) {
|
|
46
|
+
const dirs = [bundledPluginRoot];
|
|
47
|
+
for (const r of registry.skillBundles) {
|
|
48
|
+
dirs.push(r.packageRoot);
|
|
49
|
+
}
|
|
50
|
+
return dirs;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=mcp-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-config.js","sourceRoot":"","sources":["../../../../src/restorer/impls/claude-code-learner/mcp-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAiBH,MAAM,UAAU,cAAc,CAC5B,QAAmB,EACnB,KAA+C;IAE/C,MAAM,GAAG,GAAc,EAAE,UAAU,EAAE,EAAE,GAAG,QAAQ,CAAC,UAAU,EAAE,EAAE,CAAC;IAClE,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC;QACxB,MAAM,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,SAAS,IAAI,GAAG,CAAC,UAAU,CAAC;QACjD,IAAI,GAAG,IAAI,GAAG,CAAC,UAAU,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CACb,8BAA8B,GAAG,2CAA2C,CAC7E,CAAC;QACJ,CAAC;QACD,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IAC3E,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,QAAmB,EACnB,KAAqD;IAErD,MAAM,GAAG,GAAc,EAAE,UAAU,EAAE,EAAE,GAAG,QAAQ,CAAC,UAAU,EAAE,EAAE,CAAC;IAClE,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC;QACxB,MAAM,GAAG,GAAG,UAAU,GAAG,CAAC,UAAU,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,GAAG,CAAC,UAAU,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,8BAA8B,GAAG,EAAE,CAAC,CAAC;QACvD,CAAC;QACD,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IAC3E,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAYD,MAAM,UAAU,oBAAoB,CAClC,QAAgC,EAChC,iBAAyB;IAEzB,MAAM,IAAI,GAAa,CAAC,iBAAiB,CAAC,CAAC;IAC3C,KAAK,MAAM,CAAC,IAAI,QAAQ,CAAC,YAAY,EAAE,CAAC;QACtC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IAC3B,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve the claude-code-learner plugin root from the impl directory's
|
|
3
|
+
* runtime location.
|
|
4
|
+
*
|
|
5
|
+
* Layout assumption: this file lives at
|
|
6
|
+
* <package>/<src-or-dist>/restorer/impls/claude-code-learner/plugin-path.{ts,js}
|
|
7
|
+
* and the plugin lives at
|
|
8
|
+
* <package>/plugins/claude-code-learner/
|
|
9
|
+
*
|
|
10
|
+
* Walks up four directories from this file (impls → restorer → src/dist →
|
|
11
|
+
* package root) then descends into plugins/claude-code-learner/. Verifies the
|
|
12
|
+
* expected layout exists and throws with a clear message if not.
|
|
13
|
+
*/
|
|
14
|
+
export declare function resolvePluginRoot(): string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { dirname, join, resolve } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
/**
|
|
5
|
+
* Resolve the claude-code-learner plugin root from the impl directory's
|
|
6
|
+
* runtime location.
|
|
7
|
+
*
|
|
8
|
+
* Layout assumption: this file lives at
|
|
9
|
+
* <package>/<src-or-dist>/restorer/impls/claude-code-learner/plugin-path.{ts,js}
|
|
10
|
+
* and the plugin lives at
|
|
11
|
+
* <package>/plugins/claude-code-learner/
|
|
12
|
+
*
|
|
13
|
+
* Walks up four directories from this file (impls → restorer → src/dist →
|
|
14
|
+
* package root) then descends into plugins/claude-code-learner/. Verifies the
|
|
15
|
+
* expected layout exists and throws with a clear message if not.
|
|
16
|
+
*/
|
|
17
|
+
export function resolvePluginRoot() {
|
|
18
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
19
|
+
const packageRoot = resolve(here, '..', '..', '..', '..');
|
|
20
|
+
const pluginRoot = join(packageRoot, 'plugins', 'claude-code-learner');
|
|
21
|
+
if (!existsSync(pluginRoot)) {
|
|
22
|
+
throw new Error(`claude-code-learner plugin not found at expected path: ${pluginRoot}. ` +
|
|
23
|
+
`Resolved from impl dir: ${here}.`);
|
|
24
|
+
}
|
|
25
|
+
if (!existsSync(join(pluginRoot, 'skills', 'coordinator', 'SKILL.md'))) {
|
|
26
|
+
throw new Error(`claude-code-learner plugin at ${pluginRoot} is missing skills/coordinator/SKILL.md`);
|
|
27
|
+
}
|
|
28
|
+
return pluginRoot;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=plugin-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-path.js","sourceRoot":"","sources":["../../../../src/restorer/impls/claude-code-learner/plugin-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACrD,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC1D,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,qBAAqB,CAAC,CAAC;IAEvE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CACb,0DAA0D,UAAU,IAAI;YACtE,2BAA2B,IAAI,GAAG,CACrC,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC;QACvE,MAAM,IAAI,KAAK,CACb,iCAAiC,UAAU,yCAAyC,CACrF,CAAC;IACJ,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { RestorerImpl, RestorationContext, RestorationOutput } from '../../types.js';
|
|
2
|
+
import type { ClaudeCodeLearnerConfig } from './types.js';
|
|
3
|
+
import type { ImplIntentPeek } from '../../types.js';
|
|
4
|
+
/**
|
|
5
|
+
* `RestorerImpl` shell. Bridges the engine's dispatch contract
|
|
6
|
+
* (`await impl.run(ctx)`) into the harness adapter + markdown plugin.
|
|
7
|
+
*
|
|
8
|
+
* `supports()` is true for restoration jobs only (`type !== 'evaluation'`).
|
|
9
|
+
* `ClaudeCodeLearnerWrapper`
|
|
10
|
+
* (./wrapper.ts) is the first-match dispatcher that delegates Execute to a
|
|
11
|
+
* kind-specific specialist when one exists; this shim runs the plugin's full
|
|
12
|
+
* pipeline when no specialist matches.
|
|
13
|
+
*/
|
|
14
|
+
export declare class ClaudeCodeLearnerImpl implements RestorerImpl {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly version: string;
|
|
17
|
+
private readonly adapter;
|
|
18
|
+
private readonly pluginRoot;
|
|
19
|
+
/**
|
|
20
|
+
* Pre-built serialised slot registry (Path 1 plug-ins) threaded into the
|
|
21
|
+
* harness via `JINN_SLOT_REGISTRY_JSON`. Constructed once at daemon boot
|
|
22
|
+
* from `config.learnerPlugIns[]`. See plan Task 5.
|
|
23
|
+
*/
|
|
24
|
+
private readonly slotRegistryJson;
|
|
25
|
+
constructor(config: ClaudeCodeLearnerConfig & {
|
|
26
|
+
slotRegistryJson?: string;
|
|
27
|
+
});
|
|
28
|
+
supports(spec: ImplIntentPeek): boolean;
|
|
29
|
+
run(ctx: RestorationContext): Promise<RestorationOutput>;
|
|
30
|
+
/**
|
|
31
|
+
* Public escape hatch for the ClaudeCodeLearnerWrapper. Threads
|
|
32
|
+
* adapterEnv through IntentSessionInputs so the wrapper can hand
|
|
33
|
+
* the coordinator skill a phase-range hint without mutating
|
|
34
|
+
* process.env (which would not propagate to the spawned harness
|
|
35
|
+
* anyway).
|
|
36
|
+
*/
|
|
37
|
+
runWithAdapterEnv(ctx: RestorationContext, adapterEnv: Record<string, string>): Promise<RestorationOutput>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { resolvePluginRoot } from './plugin-path.js';
|
|
2
|
+
import { harvestOutput } from './harvest.js';
|
|
3
|
+
/**
|
|
4
|
+
* `RestorerImpl` shell. Bridges the engine's dispatch contract
|
|
5
|
+
* (`await impl.run(ctx)`) into the harness adapter + markdown plugin.
|
|
6
|
+
*
|
|
7
|
+
* `supports()` is true for restoration jobs only (`type !== 'evaluation'`).
|
|
8
|
+
* `ClaudeCodeLearnerWrapper`
|
|
9
|
+
* (./wrapper.ts) is the first-match dispatcher that delegates Execute to a
|
|
10
|
+
* kind-specific specialist when one exists; this shim runs the plugin's full
|
|
11
|
+
* pipeline when no specialist matches.
|
|
12
|
+
*/
|
|
13
|
+
export class ClaudeCodeLearnerImpl {
|
|
14
|
+
name;
|
|
15
|
+
version;
|
|
16
|
+
adapter;
|
|
17
|
+
pluginRoot;
|
|
18
|
+
/**
|
|
19
|
+
* Pre-built serialised slot registry (Path 1 plug-ins) threaded into the
|
|
20
|
+
* harness via `JINN_SLOT_REGISTRY_JSON`. Constructed once at daemon boot
|
|
21
|
+
* from `config.learnerPlugIns[]`. See plan Task 5.
|
|
22
|
+
*/
|
|
23
|
+
slotRegistryJson;
|
|
24
|
+
constructor(config) {
|
|
25
|
+
this.adapter = config.adapter;
|
|
26
|
+
this.name = config.name ?? 'claude-code-learner';
|
|
27
|
+
this.version = config.version ?? '0.1.0-shim';
|
|
28
|
+
this.pluginRoot = config.pluginRoot ?? resolvePluginRoot();
|
|
29
|
+
this.slotRegistryJson = config.slotRegistryJson;
|
|
30
|
+
}
|
|
31
|
+
supports(spec) {
|
|
32
|
+
return spec.type !== 'evaluation';
|
|
33
|
+
}
|
|
34
|
+
async run(ctx) {
|
|
35
|
+
return this.runWithAdapterEnv(ctx, {});
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Public escape hatch for the ClaudeCodeLearnerWrapper. Threads
|
|
39
|
+
* adapterEnv through IntentSessionInputs so the wrapper can hand
|
|
40
|
+
* the coordinator skill a phase-range hint without mutating
|
|
41
|
+
* process.env (which would not propagate to the spawned harness
|
|
42
|
+
* anyway).
|
|
43
|
+
*/
|
|
44
|
+
async runWithAdapterEnv(ctx, adapterEnv) {
|
|
45
|
+
// Merge the pre-built slot registry (if any) into adapterEnv so the
|
|
46
|
+
// session-start hook in the harness writes it to slots.json.
|
|
47
|
+
const adapterEnvMerged = { ...adapterEnv };
|
|
48
|
+
if (this.slotRegistryJson) {
|
|
49
|
+
adapterEnvMerged.JINN_SLOT_REGISTRY_JSON = this.slotRegistryJson;
|
|
50
|
+
}
|
|
51
|
+
const window = ctx.intent.window ?? { startTs: 0, endTs: 0 };
|
|
52
|
+
const inputs = {
|
|
53
|
+
intentId: ctx.intent.id,
|
|
54
|
+
intentCid: ctx.intentCid,
|
|
55
|
+
intentKind: ctx.intent.spec?.kind,
|
|
56
|
+
intentBody: ctx.intent,
|
|
57
|
+
implStateDir: ctx.implStateDir,
|
|
58
|
+
workingDir: ctx.workingDir,
|
|
59
|
+
windowStartTs: window.startTs,
|
|
60
|
+
windowEndTs: window.endTs,
|
|
61
|
+
msUntilEndTs: ctx.msUntilEndTs(),
|
|
62
|
+
abort: ctx.abort,
|
|
63
|
+
adapterEnv: Object.keys(adapterEnvMerged).length > 0 ? adapterEnvMerged : undefined,
|
|
64
|
+
};
|
|
65
|
+
await this.adapter.runIntent(inputs, this.pluginRoot);
|
|
66
|
+
// Pass the phase-range hint (if any) through to harvestOutput so that
|
|
67
|
+
// a pre-execute or post-execute pass only validates the artifacts that
|
|
68
|
+
// the coordinator was asked to produce for that pass.
|
|
69
|
+
const phaseRange = adapterEnv['JINN_CLAUDE_CODE_LEARNER_PHASE_RANGE'];
|
|
70
|
+
return harvestOutput(ctx.workingDir, phaseRange);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=restorer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restorer.js","sourceRoot":"","sources":["../../../../src/restorer/impls/claude-code-learner/restorer.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C;;;;;;;;;GASG;AACH,MAAM,OAAO,qBAAqB;IACvB,IAAI,CAAS;IACb,OAAO,CAAS;IACR,OAAO,CAAiB;IACxB,UAAU,CAAS;IACpC;;;;OAIG;IACc,gBAAgB,CAAqB;IAEtD,YACE,MAA+D;QAE/D,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,qBAAqB,CAAC;QACjD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,YAAY,CAAC;QAC9C,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,iBAAiB,EAAE,CAAC;QAC3D,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;IAClD,CAAC;IAED,QAAQ,CAAC,IAAoB;QAC3B,OAAO,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,GAAuB;QAC/B,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACzC,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,iBAAiB,CACrB,GAAuB,EACvB,UAAkC;QAElC,oEAAoE;QACpE,6DAA6D;QAC7D,MAAM,gBAAgB,GAA2B,EAAE,GAAG,UAAU,EAAE,CAAC;QACnE,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC1B,gBAAgB,CAAC,uBAAuB,GAAG,IAAI,CAAC,gBAAgB,CAAC;QACnE,CAAC;QAED,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;QAC7D,MAAM,MAAM,GAAwB;YAClC,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE;YACvB,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI;YACjC,UAAU,EAAE,GAAG,CAAC,MAA2C;YAC3D,YAAY,EAAE,GAAG,CAAC,YAAY;YAC9B,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,aAAa,EAAE,MAAM,CAAC,OAAO;YAC7B,WAAW,EAAE,MAAM,CAAC,KAAK;YACzB,YAAY,EAAE,GAAG,CAAC,YAAY,EAAE;YAChC,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,UAAU,EACR,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS;SAC1E,CAAC;QAEF,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAEtD,sEAAsE;QACtE,uEAAuE;QACvE,sDAAsD;QACtD,MAAM,UAAU,GAAG,UAAU,CAAC,sCAAsC,CAAC,CAAC;QACtE,OAAO,aAAa,CAAC,GAAG,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACnD,CAAC;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare function fakeOrientSummary(workingDir: string, intentId: string, intentKind: string): void;
|
|
2
|
+
export declare function fakeStrategy(workingDir: string, posture: 'early-return' | 'hold-and-revise' | 'continuous-observation'): void;
|
|
3
|
+
export declare function fakePlan(workingDir: string, stepCount: number): void;
|
|
4
|
+
export declare function fakeExecuteSummary(workingDir: string, opts?: {
|
|
5
|
+
stepsCompleted?: string[];
|
|
6
|
+
stepsFailed?: string[];
|
|
7
|
+
returnReason?: string;
|
|
8
|
+
elapsedMs?: number;
|
|
9
|
+
}): void;
|
|
10
|
+
export declare function fakeDebriefAnalysis(workingDir: string, verdict: 'yes' | 'no' | 'partial'): void;
|
|
11
|
+
export declare function fakeImproveSummary(workingDir: string): void;
|
|
12
|
+
export declare function fakeMemoryConsolidationRecord(workingDir: string): void;
|
|
13
|
+
/** Convenience: write all seven happy-path phase artifacts. */
|
|
14
|
+
export declare function fakeFullPipelineRun(workingDir: string, opts?: {
|
|
15
|
+
intentId?: string;
|
|
16
|
+
intentKind?: string;
|
|
17
|
+
posture?: 'early-return' | 'hold-and-revise' | 'continuous-observation';
|
|
18
|
+
verdict?: 'yes' | 'no' | 'partial';
|
|
19
|
+
}): void;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
/**
|
|
4
|
+
* Helpers to seed workingDir with realistic plugin artifacts so tests
|
|
5
|
+
* can exercise the shim's harvest + lifecycle logic without spawning a
|
|
6
|
+
* real harness.
|
|
7
|
+
*
|
|
8
|
+
* Each function writes one phase's output. The shapes match what the
|
|
9
|
+
* plugin (Plan 1) writes per its skill/agent contracts.
|
|
10
|
+
*/
|
|
11
|
+
function writeJson(path, payload) {
|
|
12
|
+
const dir = path.substring(0, path.lastIndexOf('/'));
|
|
13
|
+
mkdirSync(dir, { recursive: true });
|
|
14
|
+
writeFileSync(path, JSON.stringify(payload, null, 2));
|
|
15
|
+
}
|
|
16
|
+
export function fakeOrientSummary(workingDir, intentId, intentKind) {
|
|
17
|
+
writeJson(join(workingDir, '.orient', 'summary.json'), {
|
|
18
|
+
intent: { id: intentId, kind: intentKind, window: { startTs: 0, endTs: 0 } },
|
|
19
|
+
topics: [
|
|
20
|
+
{ topic: 'intent-parse', artifact: 'workingDir/.orient/intent-parse.json', summary: 'parsed', flags: [] },
|
|
21
|
+
],
|
|
22
|
+
openQuestions: [],
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
export function fakeStrategy(workingDir, posture) {
|
|
26
|
+
writeJson(join(workingDir, '.strategize', 'strategy.json'), {
|
|
27
|
+
approach: 'fake-approach',
|
|
28
|
+
rationale: 'test',
|
|
29
|
+
successCriteria: 'fake passes if test passes',
|
|
30
|
+
timingPosture: posture,
|
|
31
|
+
constraints: [],
|
|
32
|
+
rejectedAlternatives: [],
|
|
33
|
+
});
|
|
34
|
+
writeJson(join(workingDir, '.strategize', 'constitution.json'), {
|
|
35
|
+
successCriteriaCid: 'sha256:fake',
|
|
36
|
+
timingPosture: posture,
|
|
37
|
+
skillBundleCid: 'sha256:fake',
|
|
38
|
+
implStateDirSha: 'fakeSha',
|
|
39
|
+
editableScope: [`${workingDir}/**`],
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
export function fakePlan(workingDir, stepCount) {
|
|
43
|
+
writeJson(join(workingDir, '.plan', 'plan.json'), {
|
|
44
|
+
successCriteria: 'fake passes if test passes',
|
|
45
|
+
timingPosture: 'early-return',
|
|
46
|
+
steps: Array.from({ length: stepCount }, (_, i) => ({
|
|
47
|
+
id: `step-${i + 1}`,
|
|
48
|
+
kind: 'work',
|
|
49
|
+
concurrency: 'sequential',
|
|
50
|
+
description: `fake step ${i + 1}`,
|
|
51
|
+
inputs: {},
|
|
52
|
+
toolsNeeded: [],
|
|
53
|
+
expectedOutputs: [],
|
|
54
|
+
successSignal: 'always',
|
|
55
|
+
abortCondition: 'never',
|
|
56
|
+
})),
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
export function fakeExecuteSummary(workingDir, opts = {}) {
|
|
60
|
+
writeJson(join(workingDir, '.execute', 'summary.json'), {
|
|
61
|
+
stepsCompleted: opts.stepsCompleted ?? ['step-1'],
|
|
62
|
+
stepsFailed: opts.stepsFailed ?? [],
|
|
63
|
+
decisions: [],
|
|
64
|
+
elapsedMs: opts.elapsedMs ?? 0,
|
|
65
|
+
returnReason: opts.returnReason ?? 'all-steps-completed',
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
export function fakeDebriefAnalysis(workingDir, verdict) {
|
|
69
|
+
writeJson(join(workingDir, '.debrief', 'analysis.json'), {
|
|
70
|
+
successCriteriaMet: verdict,
|
|
71
|
+
successCriteriaShortfall: verdict === 'yes' ? null : 'fake shortfall',
|
|
72
|
+
divergencesFromPlan: [],
|
|
73
|
+
crossOperatorSignals: [],
|
|
74
|
+
trend: { kind: 'fake', lastNRuns: 0, passRate: 1, direction: 'flat', notableFailureShapes: [] },
|
|
75
|
+
recommendationsForImprove: [],
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
export function fakeImproveSummary(workingDir) {
|
|
79
|
+
writeJson(join(workingDir, '.improve', 'summary.json'), {
|
|
80
|
+
implStateDirShaBefore: 'fakeShaBefore',
|
|
81
|
+
implStateDirShaAfter: 'fakeShaBefore',
|
|
82
|
+
changesAccepted: 0,
|
|
83
|
+
changesRejected: 0,
|
|
84
|
+
operatorRequests: 0,
|
|
85
|
+
rejectionsRationale: [],
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
export function fakeMemoryConsolidationRecord(workingDir) {
|
|
89
|
+
writeJson(join(workingDir, '.memory-consolidation', 'consolidation_record.json'), {
|
|
90
|
+
ts: Date.now(),
|
|
91
|
+
implStateDirShaBefore: 'fakeShaBefore',
|
|
92
|
+
implStateDirShaAfter: 'fakeShaBefore',
|
|
93
|
+
durable: { skillsArchived: [], promotionsReverted: [], notesCompacted: 0, conflictsResolved: [] },
|
|
94
|
+
ephemeral: { movedToPrivate: [], migratedToImplState: [] },
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
/** Convenience: write all seven happy-path phase artifacts. */
|
|
98
|
+
export function fakeFullPipelineRun(workingDir, opts = {}) {
|
|
99
|
+
const intentId = opts.intentId ?? 'fake-intent';
|
|
100
|
+
const intentKind = opts.intentKind ?? 'fake.kind';
|
|
101
|
+
const posture = opts.posture ?? 'early-return';
|
|
102
|
+
const verdict = opts.verdict ?? 'yes';
|
|
103
|
+
fakeOrientSummary(workingDir, intentId, intentKind);
|
|
104
|
+
fakeStrategy(workingDir, posture);
|
|
105
|
+
fakePlan(workingDir, 1);
|
|
106
|
+
fakeExecuteSummary(workingDir);
|
|
107
|
+
fakeDebriefAnalysis(workingDir, verdict);
|
|
108
|
+
fakeImproveSummary(workingDir);
|
|
109
|
+
fakeMemoryConsolidationRecord(workingDir);
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=fake-plugin-outputs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fake-plugin-outputs.js","sourceRoot":"","sources":["../../../../../src/restorer/impls/claude-code-learner/test-utils/fake-plugin-outputs.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { HarnessAdapter, IntentSessionInputs } from '../types.js';
|
|
2
|
+
export type NoOpRunHandler = (inputs: IntentSessionInputs, pluginRoot: string) => void | Promise<void>;
|
|
3
|
+
/**
|
|
4
|
+
* Test-only HarnessAdapter. By default, a runIntent call simulates a
|
|
5
|
+
* full happy-path pipeline by writing all seven phase artifacts to
|
|
6
|
+
* inputs.workingDir. Tests can override via .on() to inject failures,
|
|
7
|
+
* partial completion, etc.
|
|
8
|
+
*/
|
|
9
|
+
export declare class NoOpHarnessAdapter implements HarnessAdapter {
|
|
10
|
+
readonly name = "noop";
|
|
11
|
+
readonly allowsHarnessSelfModification = false;
|
|
12
|
+
private handler;
|
|
13
|
+
private invocations;
|
|
14
|
+
/** Override the default happy-path simulation. */
|
|
15
|
+
on(handler: NoOpRunHandler): this;
|
|
16
|
+
/** Inspect what runIntent was called with — useful for assertions. */
|
|
17
|
+
getInvocations(): ReadonlyArray<{
|
|
18
|
+
inputs: IntentSessionInputs;
|
|
19
|
+
pluginRoot: string;
|
|
20
|
+
}>;
|
|
21
|
+
runIntent(inputs: IntentSessionInputs, pluginRoot: string): Promise<void>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { fakeFullPipelineRun } from './fake-plugin-outputs.js';
|
|
2
|
+
/**
|
|
3
|
+
* Test-only HarnessAdapter. By default, a runIntent call simulates a
|
|
4
|
+
* full happy-path pipeline by writing all seven phase artifacts to
|
|
5
|
+
* inputs.workingDir. Tests can override via .on() to inject failures,
|
|
6
|
+
* partial completion, etc.
|
|
7
|
+
*/
|
|
8
|
+
export class NoOpHarnessAdapter {
|
|
9
|
+
name = 'noop';
|
|
10
|
+
allowsHarnessSelfModification = false;
|
|
11
|
+
handler = null;
|
|
12
|
+
invocations = [];
|
|
13
|
+
/** Override the default happy-path simulation. */
|
|
14
|
+
on(handler) {
|
|
15
|
+
this.handler = handler;
|
|
16
|
+
return this;
|
|
17
|
+
}
|
|
18
|
+
/** Inspect what runIntent was called with — useful for assertions. */
|
|
19
|
+
getInvocations() {
|
|
20
|
+
return this.invocations;
|
|
21
|
+
}
|
|
22
|
+
async runIntent(inputs, pluginRoot) {
|
|
23
|
+
this.invocations.push({ inputs, pluginRoot });
|
|
24
|
+
if (this.handler) {
|
|
25
|
+
await this.handler(inputs, pluginRoot);
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
fakeFullPipelineRun(inputs.workingDir, {
|
|
29
|
+
intentId: inputs.intentId,
|
|
30
|
+
intentKind: inputs.intentKind ?? 'unknown',
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=noop-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"noop-adapter.js","sourceRoot":"","sources":["../../../../../src/restorer/impls/claude-code-learner/test-utils/noop-adapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAI/D;;;;;GAKG;AACH,MAAM,OAAO,kBAAkB;IACpB,IAAI,GAAG,MAAM,CAAC;IACd,6BAA6B,GAAG,KAAK,CAAC;IAEvC,OAAO,GAA0B,IAAI,CAAC;IACtC,WAAW,GAA+D,EAAE,CAAC;IAErF,kDAAkD;IAClD,EAAE,CAAC,OAAuB;QACxB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,sEAAsE;IACtE,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,MAA2B,EAAE,UAAkB;QAC7D,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;QAC9C,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QACzC,CAAC;aAAM,CAAC;YACN,mBAAmB,CAAC,MAAM,CAAC,UAAU,EAAE;gBACrC,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,SAAS;aAC3C,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Synthetic-session fixture for testing Path 1 plug-in slot-registry
|
|
3
|
+
* hand-off without spawning a real Claude Code subprocess. Mirrors the
|
|
4
|
+
* effect of the bundled `hooks/session-start` script: when the env
|
|
5
|
+
* carries `JINN_SLOT_REGISTRY_JSON`, write it to
|
|
6
|
+
* `<workingDir>/.coordinator/slots.json`.
|
|
7
|
+
*
|
|
8
|
+
* See plan
|
|
9
|
+
* docs/superpowers/plans/2026-04-30-plug-in-surface-path-1-mechanism.md
|
|
10
|
+
* Task 5 step 5.7.
|
|
11
|
+
*/
|
|
12
|
+
export interface SyntheticSession {
|
|
13
|
+
/** Synthesised workingDir for this session. */
|
|
14
|
+
workingDir: string;
|
|
15
|
+
/** Apply the equivalent of the hook script to the supplied env. */
|
|
16
|
+
applySessionStart(env: Record<string, string>): void;
|
|
17
|
+
/** Read the resulting slots.json (returns null if not written). */
|
|
18
|
+
readSlots(): unknown | null;
|
|
19
|
+
}
|
|
20
|
+
export declare function makeSyntheticSession(): SyntheticSession;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Synthetic-session fixture for testing Path 1 plug-in slot-registry
|
|
3
|
+
* hand-off without spawning a real Claude Code subprocess. Mirrors the
|
|
4
|
+
* effect of the bundled `hooks/session-start` script: when the env
|
|
5
|
+
* carries `JINN_SLOT_REGISTRY_JSON`, write it to
|
|
6
|
+
* `<workingDir>/.coordinator/slots.json`.
|
|
7
|
+
*
|
|
8
|
+
* See plan
|
|
9
|
+
* docs/superpowers/plans/2026-04-30-plug-in-surface-path-1-mechanism.md
|
|
10
|
+
* Task 5 step 5.7.
|
|
11
|
+
*/
|
|
12
|
+
import { mkdtempSync, writeFileSync, mkdirSync, readFileSync, existsSync, } from 'node:fs';
|
|
13
|
+
import { join } from 'node:path';
|
|
14
|
+
import { tmpdir } from 'node:os';
|
|
15
|
+
export function makeSyntheticSession() {
|
|
16
|
+
const workingDir = mkdtempSync(join(tmpdir(), 'jinn-synth-'));
|
|
17
|
+
return {
|
|
18
|
+
workingDir,
|
|
19
|
+
applySessionStart(env) {
|
|
20
|
+
const json = env.JINN_SLOT_REGISTRY_JSON;
|
|
21
|
+
if (!json)
|
|
22
|
+
return;
|
|
23
|
+
mkdirSync(join(workingDir, '.coordinator'), { recursive: true });
|
|
24
|
+
writeFileSync(join(workingDir, '.coordinator', 'slots.json'), json);
|
|
25
|
+
},
|
|
26
|
+
readSlots() {
|
|
27
|
+
const path = join(workingDir, '.coordinator', 'slots.json');
|
|
28
|
+
return existsSync(path)
|
|
29
|
+
? JSON.parse(readFileSync(path, 'utf8'))
|
|
30
|
+
: null;
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=synthetic-session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"synthetic-session.js","sourceRoot":"","sources":["../../../../../src/restorer/impls/claude-code-learner/test-utils/synthetic-session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,WAAW,EACX,aAAa,EACb,SAAS,EACT,YAAY,EACZ,UAAU,GACX,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAWjC,MAAM,UAAU,oBAAoB;IAClC,MAAM,UAAU,GAAG,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC;IAC9D,OAAO;QACL,UAAU;QACV,iBAAiB,CAAC,GAA2B;YAC3C,MAAM,IAAI,GAAG,GAAG,CAAC,uBAAuB,CAAC;YACzC,IAAI,CAAC,IAAI;gBAAE,OAAO;YAClB,SAAS,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YACjE,aAAa,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,EAAE,YAAY,CAAC,EAAE,IAAI,CAAC,CAAC;QACtE,CAAC;QACD,SAAS;YACP,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;YAC5D,OAAO,UAAU,CAAC,IAAI,CAAC;gBACrB,CAAC,CAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAa;gBACrD,CAAC,CAAC,IAAI,CAAC;QACX,CAAC;KACF,CAAC;AACJ,CAAC"}
|