@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,238 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared ABI table for the three ERC-8004 registries Jinn touches.
|
|
3
|
+
*
|
|
4
|
+
* Minimal slices of the deployed contract ABIs — only the surfaces the
|
|
5
|
+
* consolidated clients actually call. Cross-checked against:
|
|
6
|
+
* - `/tmp/erc8004-ref/IdentityRegistryUpgradeable.sol`
|
|
7
|
+
* - `/tmp/erc8004-ref/ReputationRegistryUpgradeable.sol`
|
|
8
|
+
* - `/tmp/erc8004-ref/ValidationRegistryUpgradeable.sol`
|
|
9
|
+
* - `subgraph/abis/{Identity,Reputation,Validation}Registry.json`
|
|
10
|
+
*
|
|
11
|
+
* Keep the slices tight: typed-ABI inference from viem/abitype is what makes
|
|
12
|
+
* the client surface stay sharp, and full ABIs widen the inferred types
|
|
13
|
+
* unnecessarily.
|
|
14
|
+
*/
|
|
15
|
+
// ── IdentityRegistry ──────────────────────────────────────────────────────────
|
|
16
|
+
/** Canonical v1 ABI tuple for per-execution payloads. See payload-schema §3.1. */
|
|
17
|
+
export const PAYLOAD_TUPLE = [
|
|
18
|
+
{ name: 'version', type: 'uint8' },
|
|
19
|
+
{ name: 'tier', type: 'uint8' },
|
|
20
|
+
{ name: 'manifestHash', type: 'bytes32' },
|
|
21
|
+
{ name: 'attestationQuoteCid', type: 'bytes' },
|
|
22
|
+
{ name: 'sourceMeasurement', type: 'bytes32' },
|
|
23
|
+
];
|
|
24
|
+
/** ERC-8004 IdentityRegistry — only the function the publisher calls. */
|
|
25
|
+
export const IDENTITY_REGISTRY_SET_METADATA_ABI = [
|
|
26
|
+
{
|
|
27
|
+
type: 'function',
|
|
28
|
+
name: 'setMetadata',
|
|
29
|
+
stateMutability: 'nonpayable',
|
|
30
|
+
inputs: [
|
|
31
|
+
{ name: 'agentId', type: 'uint256' },
|
|
32
|
+
{ name: 'metadataKey', type: 'string' },
|
|
33
|
+
{ name: 'metadataValue', type: 'bytes' },
|
|
34
|
+
],
|
|
35
|
+
outputs: [],
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
// ── ReputationRegistry ────────────────────────────────────────────────────────
|
|
39
|
+
//
|
|
40
|
+
// `giveFeedback` takes `value: int128, valueDecimals: uint8` (signed
|
|
41
|
+
// fixed-point), not `score: uint8`. The higher-level surface exposes a
|
|
42
|
+
// numeric-friendly `score` parameter.
|
|
43
|
+
export const REPUTATION_REGISTRY_ABI = [
|
|
44
|
+
{
|
|
45
|
+
type: 'function',
|
|
46
|
+
name: 'giveFeedback',
|
|
47
|
+
stateMutability: 'nonpayable',
|
|
48
|
+
inputs: [
|
|
49
|
+
{ name: 'agentId', type: 'uint256' },
|
|
50
|
+
{ name: 'value', type: 'int128' },
|
|
51
|
+
{ name: 'valueDecimals', type: 'uint8' },
|
|
52
|
+
{ name: 'tag1', type: 'string' },
|
|
53
|
+
{ name: 'tag2', type: 'string' },
|
|
54
|
+
{ name: 'endpoint', type: 'string' },
|
|
55
|
+
{ name: 'feedbackURI', type: 'string' },
|
|
56
|
+
{ name: 'feedbackHash', type: 'bytes32' },
|
|
57
|
+
],
|
|
58
|
+
outputs: [],
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
type: 'function',
|
|
62
|
+
name: 'revokeFeedback',
|
|
63
|
+
stateMutability: 'nonpayable',
|
|
64
|
+
inputs: [
|
|
65
|
+
{ name: 'agentId', type: 'uint256' },
|
|
66
|
+
{ name: 'feedbackIndex', type: 'uint64' },
|
|
67
|
+
],
|
|
68
|
+
outputs: [],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
type: 'function',
|
|
72
|
+
name: 'appendResponse',
|
|
73
|
+
stateMutability: 'nonpayable',
|
|
74
|
+
inputs: [
|
|
75
|
+
{ name: 'agentId', type: 'uint256' },
|
|
76
|
+
{ name: 'clientAddress', type: 'address' },
|
|
77
|
+
{ name: 'feedbackIndex', type: 'uint64' },
|
|
78
|
+
{ name: 'responseURI', type: 'string' },
|
|
79
|
+
{ name: 'responseHash', type: 'bytes32' },
|
|
80
|
+
],
|
|
81
|
+
outputs: [],
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: 'function',
|
|
85
|
+
name: 'readFeedback',
|
|
86
|
+
stateMutability: 'view',
|
|
87
|
+
inputs: [
|
|
88
|
+
{ name: 'agentId', type: 'uint256' },
|
|
89
|
+
{ name: 'clientAddress', type: 'address' },
|
|
90
|
+
{ name: 'feedbackIndex', type: 'uint64' },
|
|
91
|
+
],
|
|
92
|
+
outputs: [
|
|
93
|
+
{ name: 'value', type: 'int128' },
|
|
94
|
+
{ name: 'valueDecimals', type: 'uint8' },
|
|
95
|
+
{ name: 'tag1', type: 'string' },
|
|
96
|
+
{ name: 'tag2', type: 'string' },
|
|
97
|
+
{ name: 'isRevoked', type: 'bool' },
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
type: 'function',
|
|
102
|
+
name: 'readAllFeedback',
|
|
103
|
+
stateMutability: 'view',
|
|
104
|
+
inputs: [
|
|
105
|
+
{ name: 'agentId', type: 'uint256' },
|
|
106
|
+
{ name: 'clientAddresses', type: 'address[]' },
|
|
107
|
+
{ name: 'tag1', type: 'string' },
|
|
108
|
+
{ name: 'tag2', type: 'string' },
|
|
109
|
+
{ name: 'includeRevoked', type: 'bool' },
|
|
110
|
+
],
|
|
111
|
+
outputs: [
|
|
112
|
+
{ name: 'clients', type: 'address[]' },
|
|
113
|
+
{ name: 'feedbackIndexes', type: 'uint64[]' },
|
|
114
|
+
{ name: 'values', type: 'int128[]' },
|
|
115
|
+
{ name: 'valueDecimals', type: 'uint8[]' },
|
|
116
|
+
{ name: 'tag1s', type: 'string[]' },
|
|
117
|
+
{ name: 'tag2s', type: 'string[]' },
|
|
118
|
+
{ name: 'revokedStatuses', type: 'bool[]' },
|
|
119
|
+
],
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
type: 'function',
|
|
123
|
+
name: 'getSummary',
|
|
124
|
+
stateMutability: 'view',
|
|
125
|
+
inputs: [
|
|
126
|
+
{ name: 'agentId', type: 'uint256' },
|
|
127
|
+
{ name: 'clientAddresses', type: 'address[]' },
|
|
128
|
+
{ name: 'tag1', type: 'string' },
|
|
129
|
+
{ name: 'tag2', type: 'string' },
|
|
130
|
+
],
|
|
131
|
+
outputs: [
|
|
132
|
+
{ name: 'count', type: 'uint64' },
|
|
133
|
+
{ name: 'summaryValue', type: 'int128' },
|
|
134
|
+
{ name: 'summaryValueDecimals', type: 'uint8' },
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
type: 'function',
|
|
139
|
+
name: 'getClients',
|
|
140
|
+
stateMutability: 'view',
|
|
141
|
+
inputs: [{ name: 'agentId', type: 'uint256' }],
|
|
142
|
+
outputs: [{ name: '', type: 'address[]' }],
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
type: 'function',
|
|
146
|
+
name: 'getLastIndex',
|
|
147
|
+
stateMutability: 'view',
|
|
148
|
+
inputs: [
|
|
149
|
+
{ name: 'agentId', type: 'uint256' },
|
|
150
|
+
{ name: 'clientAddress', type: 'address' },
|
|
151
|
+
],
|
|
152
|
+
outputs: [{ name: '', type: 'uint64' }],
|
|
153
|
+
},
|
|
154
|
+
];
|
|
155
|
+
// ── ValidationRegistry ────────────────────────────────────────────────────────
|
|
156
|
+
export const VALIDATION_REGISTRY_ABI = [
|
|
157
|
+
// ── Write functions ──────────────────────────────────────────────────────────
|
|
158
|
+
{
|
|
159
|
+
name: 'validationRequest',
|
|
160
|
+
type: 'function',
|
|
161
|
+
stateMutability: 'nonpayable',
|
|
162
|
+
inputs: [
|
|
163
|
+
{ name: 'validatorAddress', type: 'address' },
|
|
164
|
+
{ name: 'agentId', type: 'uint256' },
|
|
165
|
+
{ name: 'requestURI', type: 'string' },
|
|
166
|
+
{ name: 'requestHash', type: 'bytes32' },
|
|
167
|
+
],
|
|
168
|
+
outputs: [],
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: 'validationResponse',
|
|
172
|
+
type: 'function',
|
|
173
|
+
stateMutability: 'nonpayable',
|
|
174
|
+
inputs: [
|
|
175
|
+
{ name: 'requestHash', type: 'bytes32' },
|
|
176
|
+
{ name: 'response', type: 'uint8' },
|
|
177
|
+
{ name: 'responseURI', type: 'string' },
|
|
178
|
+
{ name: 'responseHash', type: 'bytes32' },
|
|
179
|
+
{ name: 'tag', type: 'string' },
|
|
180
|
+
],
|
|
181
|
+
outputs: [],
|
|
182
|
+
},
|
|
183
|
+
// ── Read functions ──────────────────────────────────────────────────────────
|
|
184
|
+
{
|
|
185
|
+
name: 'getValidationStatus',
|
|
186
|
+
type: 'function',
|
|
187
|
+
stateMutability: 'view',
|
|
188
|
+
inputs: [{ name: 'requestHash', type: 'bytes32' }],
|
|
189
|
+
outputs: [
|
|
190
|
+
{ name: 'validatorAddress', type: 'address' },
|
|
191
|
+
{ name: 'agentId', type: 'uint256' },
|
|
192
|
+
{ name: 'response', type: 'uint8' },
|
|
193
|
+
{ name: 'responseHash', type: 'bytes32' },
|
|
194
|
+
{ name: 'tag', type: 'string' },
|
|
195
|
+
{ name: 'lastUpdate', type: 'uint256' },
|
|
196
|
+
],
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
name: 'getAgentValidations',
|
|
200
|
+
type: 'function',
|
|
201
|
+
stateMutability: 'view',
|
|
202
|
+
inputs: [{ name: 'agentId', type: 'uint256' }],
|
|
203
|
+
outputs: [{ name: '', type: 'bytes32[]' }],
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: 'getValidatorRequests',
|
|
207
|
+
type: 'function',
|
|
208
|
+
stateMutability: 'view',
|
|
209
|
+
inputs: [{ name: 'validatorAddress', type: 'address' }],
|
|
210
|
+
outputs: [{ name: '', type: 'bytes32[]' }],
|
|
211
|
+
},
|
|
212
|
+
// ── Events (kept for parity with the deployed ABI; consumers may decode
|
|
213
|
+
// logs directly with this fragment). ───────────────────────────────────────
|
|
214
|
+
{
|
|
215
|
+
type: 'event',
|
|
216
|
+
name: 'ValidationRequest',
|
|
217
|
+
inputs: [
|
|
218
|
+
{ name: 'validatorAddress', type: 'address', indexed: true },
|
|
219
|
+
{ name: 'agentId', type: 'uint256', indexed: true },
|
|
220
|
+
{ name: 'requestURI', type: 'string', indexed: false },
|
|
221
|
+
{ name: 'requestHash', type: 'bytes32', indexed: true },
|
|
222
|
+
],
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
type: 'event',
|
|
226
|
+
name: 'ValidationResponse',
|
|
227
|
+
inputs: [
|
|
228
|
+
{ name: 'validatorAddress', type: 'address', indexed: true },
|
|
229
|
+
{ name: 'agentId', type: 'uint256', indexed: true },
|
|
230
|
+
{ name: 'requestHash', type: 'bytes32', indexed: true },
|
|
231
|
+
{ name: 'response', type: 'uint8', indexed: false },
|
|
232
|
+
{ name: 'responseURI', type: 'string', indexed: false },
|
|
233
|
+
{ name: 'responseHash', type: 'bytes32', indexed: false },
|
|
234
|
+
{ name: 'tag', type: 'string', indexed: false },
|
|
235
|
+
],
|
|
236
|
+
},
|
|
237
|
+
];
|
|
238
|
+
//# sourceMappingURL=abis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abis.js","sourceRoot":"","sources":["../../src/erc8004/abis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,iFAAiF;AAEjF,kFAAkF;AAClF,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,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AAS,EAAE,OAAO,EAAE,IAAI,EAAE;YACvD,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;YACnD,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;YACvD,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE;YACzD,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;SAChD;KACF;CACO,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical ERC-8004 registry addresses, keyed by chainId.
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for the three deployed registries Jinn touches:
|
|
5
|
+
*
|
|
6
|
+
* - IdentityRegistry — minted operator agent NFTs + per-execution `setMetadata`.
|
|
7
|
+
* - ReputationRegistry — evaluator → restorer feedback (DR §4.3).
|
|
8
|
+
* - ValidationRegistry — Phase 1b challenge mechanism (DR §4.4).
|
|
9
|
+
*
|
|
10
|
+
* Cross-checked against `subgraph/networks.json` and the canonical
|
|
11
|
+
* `erc-8004/erc-8004-contracts` reference. Mainnets and their respective
|
|
12
|
+
* testnets share vanity prefixes (0x8004…); the chains 1/8453 vs 11155111/84532
|
|
13
|
+
* pair accordingly.
|
|
14
|
+
*
|
|
15
|
+
* IdentityRegistry addresses live alongside the staking contract config in
|
|
16
|
+
* `client/src/earning/contracts.ts` (since the bootstrap reads them at mint
|
|
17
|
+
* time); we duplicate the lookup here for the consolidated ERC-8004 surface.
|
|
18
|
+
*
|
|
19
|
+
* If you add a chain, update all three maps + `subgraph/networks.json`.
|
|
20
|
+
*/
|
|
21
|
+
import type { Address } from 'viem';
|
|
22
|
+
/**
|
|
23
|
+
* Canonical 0x8004… ReputationRegistry deployments.
|
|
24
|
+
*/
|
|
25
|
+
export declare const REPUTATION_REGISTRY_ADDRESSES: Record<number, Address>;
|
|
26
|
+
/**
|
|
27
|
+
* Resolve the ReputationRegistry address for a chainId, or `null` if the
|
|
28
|
+
* chain is not known.
|
|
29
|
+
*/
|
|
30
|
+
export declare function getReputationRegistryAddress(chainId: number): Address | null;
|
|
31
|
+
/**
|
|
32
|
+
* Canonical 0x8004… ValidationRegistry deployments. Source of truth:
|
|
33
|
+
* `subgraph/networks.json` (populated by `jinn-mono-fud`).
|
|
34
|
+
*/
|
|
35
|
+
export declare const VALIDATION_REGISTRY_ADDRESSES: Record<number, Address>;
|
|
36
|
+
/**
|
|
37
|
+
* Resolve the ValidationRegistry address for a chainId, or `null` if the
|
|
38
|
+
* chain is not known.
|
|
39
|
+
*/
|
|
40
|
+
export declare function getValidationRegistryAddress(chainId: number): Address | null;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical ERC-8004 registry addresses, keyed by chainId.
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for the three deployed registries Jinn touches:
|
|
5
|
+
*
|
|
6
|
+
* - IdentityRegistry — minted operator agent NFTs + per-execution `setMetadata`.
|
|
7
|
+
* - ReputationRegistry — evaluator → restorer feedback (DR §4.3).
|
|
8
|
+
* - ValidationRegistry — Phase 1b challenge mechanism (DR §4.4).
|
|
9
|
+
*
|
|
10
|
+
* Cross-checked against `subgraph/networks.json` and the canonical
|
|
11
|
+
* `erc-8004/erc-8004-contracts` reference. Mainnets and their respective
|
|
12
|
+
* testnets share vanity prefixes (0x8004…); the chains 1/8453 vs 11155111/84532
|
|
13
|
+
* pair accordingly.
|
|
14
|
+
*
|
|
15
|
+
* IdentityRegistry addresses live alongside the staking contract config in
|
|
16
|
+
* `client/src/earning/contracts.ts` (since the bootstrap reads them at mint
|
|
17
|
+
* time); we duplicate the lookup here for the consolidated ERC-8004 surface.
|
|
18
|
+
*
|
|
19
|
+
* If you add a chain, update all three maps + `subgraph/networks.json`.
|
|
20
|
+
*/
|
|
21
|
+
// ── ReputationRegistry ────────────────────────────────────────────────────────
|
|
22
|
+
/**
|
|
23
|
+
* Canonical 0x8004… ReputationRegistry deployments.
|
|
24
|
+
*/
|
|
25
|
+
export const REPUTATION_REGISTRY_ADDRESSES = {
|
|
26
|
+
// Base mainnet
|
|
27
|
+
8453: '0x8004BAa17C55a88189AE136b182e5fdA19dE9b63',
|
|
28
|
+
// Base Sepolia
|
|
29
|
+
84532: '0x8004B663056A597Dffe9eCcC1965A193B7388713',
|
|
30
|
+
// Ethereum mainnet (shares Base mainnet vanity)
|
|
31
|
+
1: '0x8004BAa17C55a88189AE136b182e5fdA19dE9b63',
|
|
32
|
+
// Ethereum Sepolia (shares Base Sepolia vanity)
|
|
33
|
+
11155111: '0x8004B663056A597Dffe9eCcC1965A193B7388713',
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Resolve the ReputationRegistry address for a chainId, or `null` if the
|
|
37
|
+
* chain is not known.
|
|
38
|
+
*/
|
|
39
|
+
export function getReputationRegistryAddress(chainId) {
|
|
40
|
+
return REPUTATION_REGISTRY_ADDRESSES[chainId] ?? null;
|
|
41
|
+
}
|
|
42
|
+
// ── ValidationRegistry ────────────────────────────────────────────────────────
|
|
43
|
+
/**
|
|
44
|
+
* Canonical 0x8004… ValidationRegistry deployments. Source of truth:
|
|
45
|
+
* `subgraph/networks.json` (populated by `jinn-mono-fud`).
|
|
46
|
+
*/
|
|
47
|
+
export const VALIDATION_REGISTRY_ADDRESSES = {
|
|
48
|
+
// Base mainnet
|
|
49
|
+
8453: '0x8004Cc8439f36fd5F9F049D9fF86523Df6dAAB58',
|
|
50
|
+
// Base Sepolia
|
|
51
|
+
84532: '0x8004Cb1BF31DAf7788923b405b754f57acEB4272',
|
|
52
|
+
// Ethereum mainnet (shares Base mainnet vanity)
|
|
53
|
+
1: '0x8004Cc8439f36fd5F9F049D9fF86523Df6dAAB58',
|
|
54
|
+
// Sepolia (shares Base Sepolia vanity)
|
|
55
|
+
11155111: '0x8004Cb1BF31DAf7788923b405b754f57acEB4272',
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Resolve the ValidationRegistry address for a chainId, or `null` if the
|
|
59
|
+
* chain is not known.
|
|
60
|
+
*/
|
|
61
|
+
export function getValidationRegistryAddress(chainId) {
|
|
62
|
+
return VALIDATION_REGISTRY_ADDRESSES[chainId] ?? null;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=addresses.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addresses.js","sourceRoot":"","sources":["../../src/erc8004/addresses.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,iFAAiF;AAEjF;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAA4B;IACpE,eAAe;IACf,IAAI,EAAE,4CAA4C;IAClD,eAAe;IACf,KAAK,EAAE,4CAA4C;IACnD,gDAAgD;IAChD,CAAC,EAAE,4CAA4C;IAC/C,gDAAgD;IAChD,QAAQ,EAAE,4CAA4C;CACvD,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,4BAA4B,CAAC,OAAe;IAC1D,OAAO,6BAA6B,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC;AACxD,CAAC;AAED,iFAAiF;AAEjF;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAA4B;IACpE,eAAe;IACf,IAAI,EAAE,4CAA4C;IAClD,eAAe;IACf,KAAK,EAAE,4CAA4C;IACnD,gDAAgD;IAChD,CAAC,EAAE,4CAA4C;IAC/C,uCAAuC;IACvC,QAAQ,EAAE,4CAA4C;CACvD,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,4BAA4B,CAAC,OAAe;IAC1D,OAAO,6BAA6B,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ERC-8004 IdentityRegistry surface.
|
|
3
|
+
*
|
|
4
|
+
* Two complementary capabilities live here:
|
|
5
|
+
*
|
|
6
|
+
* 1. `IdentityPublisher` — per-execution `setMetadata` writes that anchor
|
|
7
|
+
* envelope/evaluation commitments under the operator's agent NFT. Implements
|
|
8
|
+
* the v1 ABI-encoded payload tuple specified in
|
|
9
|
+
* `docs/superpowers/specs/2026-04-27-erc-8004-payload-schema.md` §3.1:
|
|
10
|
+
*
|
|
11
|
+
* abi.encode(
|
|
12
|
+
* uint8 version, // = 1
|
|
13
|
+
* uint8 tier, // 0..4
|
|
14
|
+
* bytes32 manifestHash, // = JinnRouter evidenceHash
|
|
15
|
+
* bytes attestationQuoteCid, // raw multibase-decoded CID bytes; 0x for tier < 3
|
|
16
|
+
* bytes32 sourceMeasurement // 0x00...00 for tier < 3
|
|
17
|
+
* )
|
|
18
|
+
*
|
|
19
|
+
* The encoded payload is passed to
|
|
20
|
+
* IdentityRegistry.setMetadata(agentId, "<kind>:<cid>", payload)
|
|
21
|
+
*
|
|
22
|
+
* per the entity-model decision in §4.2 of
|
|
23
|
+
* `docs/superpowers/specs/2026-04-27-erc-8004-entity-model-design.md` —
|
|
24
|
+
* one operator agent NFT per Safe; per-execution commitments anchor under it.
|
|
25
|
+
*
|
|
26
|
+
* This module ONLY publishes — it does not mint the agent NFT (`jinn-mono-j07`),
|
|
27
|
+
* call `setAgentWallet` (`jinn-mono-aev`), or write reputation/validation
|
|
28
|
+
* registries (`jinn-mono-2ff` / `jinn-mono-9jg`).
|
|
29
|
+
*
|
|
30
|
+
* 2. `resolveAgentIdForManifest` — evaluator-side lookup of the restorer's
|
|
31
|
+
* `agentId` from a manifest's `evidenceHash`. Per DR §4.3, the evaluator
|
|
32
|
+
* must call `ReputationRegistry.giveFeedback(restorerAgentId, ...)` keyed
|
|
33
|
+
* on the restorer's ERC-8004 agent NFT id — but the on-chain `claimDelivery`
|
|
34
|
+
* payload only carries the `requestId` and `evidenceHash`, not the
|
|
35
|
+
* restorer's agentId.
|
|
36
|
+
*
|
|
37
|
+
* Resolution paths:
|
|
38
|
+
*
|
|
39
|
+
* (b) Subgraph: `Execution { operator { agentId } where manifestHash: $h }`
|
|
40
|
+
* — the Jinn subgraph already indexes envelope publishes joined to the
|
|
41
|
+
* operator. This is the recommended path: O(1) and aligned with the
|
|
42
|
+
* rest of the discovery surface.
|
|
43
|
+
* (c) On-chain `IdentityRegistry.Registered` event scan filtered by the
|
|
44
|
+
* restorer's Safe address — cheaper than a global scan, but still O(n)
|
|
45
|
+
* in registered-events. Documented as a fallback only.
|
|
46
|
+
*
|
|
47
|
+
* This module implements (b). The fallback is intentionally **not** wired in
|
|
48
|
+
* yet: the resolver returns `null` cleanly when the subgraph URL is undefined
|
|
49
|
+
* or the query has no match, and the caller (the feedback hook) treats that
|
|
50
|
+
* as a no-op (DR §4.3: "skip but don't fail — claimDelivery is authoritative").
|
|
51
|
+
*/
|
|
52
|
+
import { type Hex, type PublicClient, type WalletClient } from 'viem';
|
|
53
|
+
import { IDENTITY_REGISTRY_SET_METADATA_ABI, PAYLOAD_TUPLE } from './abis.js';
|
|
54
|
+
export { IDENTITY_REGISTRY_SET_METADATA_ABI, PAYLOAD_TUPLE };
|
|
55
|
+
/**
|
|
56
|
+
* Evidence tier on the canonical ladder.
|
|
57
|
+
*
|
|
58
|
+
* V1 admits only `{0=self-signed, 1=committed, 3=attested}` — aligned with
|
|
59
|
+
* `EvidenceTierSchema` in `client/src/types/envelope.ts` (PR #37 commit
|
|
60
|
+
* 44cc949b stripped V2+ tiers `consensus`=2 and `proved`=4 from V1). The
|
|
61
|
+
* gap at 2 and the absent 4 are intentional: future schema-version bumps
|
|
62
|
+
* re-admit them. See payload-schema §5.
|
|
63
|
+
*/
|
|
64
|
+
export type ExecutionTier = 0 | 1 | 3;
|
|
65
|
+
/** Metadata key prefix. See payload-schema §6.1. */
|
|
66
|
+
export type ContentKind = 'envelope' | 'evaluation';
|
|
67
|
+
/**
|
|
68
|
+
* v1 payload as caller-friendly hex strings. The encoder validates and
|
|
69
|
+
* ABI-encodes per §3.1. `version` is fixed at 1 — this is the only schema
|
|
70
|
+
* version this module emits.
|
|
71
|
+
*/
|
|
72
|
+
export interface ExecutionPayload {
|
|
73
|
+
version: 1;
|
|
74
|
+
tier: ExecutionTier;
|
|
75
|
+
/** 32-byte hex (= JinnRouter evidenceHash). */
|
|
76
|
+
manifestHash: Hex;
|
|
77
|
+
/** Raw multibase-decoded CID bytes hex. `"0x"` for tier < 3. */
|
|
78
|
+
attestationQuoteCid: Hex;
|
|
79
|
+
/** 32-byte hex enclave measurement. All-zero for tier < 3. */
|
|
80
|
+
sourceMeasurement: Hex;
|
|
81
|
+
}
|
|
82
|
+
export interface IdentityPublisherConfig {
|
|
83
|
+
identityRegistryAddress: `0x${string}`;
|
|
84
|
+
agentId: bigint;
|
|
85
|
+
walletClient: WalletClient;
|
|
86
|
+
publicClient: PublicClient;
|
|
87
|
+
}
|
|
88
|
+
export interface PublishContentArgs {
|
|
89
|
+
kind: ContentKind;
|
|
90
|
+
/** Textual CID embedded in the metadataKey (`<kind>:<cid>`). */
|
|
91
|
+
cid: string;
|
|
92
|
+
payload: ExecutionPayload;
|
|
93
|
+
}
|
|
94
|
+
/** Thrown when an `ExecutionPayload` violates §5 strict-mode validity rules. */
|
|
95
|
+
export declare class PayloadValidationError extends Error {
|
|
96
|
+
readonly tier: ExecutionTier;
|
|
97
|
+
readonly reason: string;
|
|
98
|
+
constructor(tier: ExecutionTier, reason: string);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Validate `payload` against the strict-mode per-tier rules in payload-schema §5.
|
|
102
|
+
* Throws `PayloadValidationError` on mismatch; otherwise returns the payload.
|
|
103
|
+
*
|
|
104
|
+
* Rules:
|
|
105
|
+
* - V1 admits only tiers {0=self-signed, 1=committed, 3=attested}. Tiers 2
|
|
106
|
+
* (consensus) and 4 (proved) are V2+ and rejected here.
|
|
107
|
+
* - tier ∈ {0,1}: attestationQuoteCid MUST be empty, sourceMeasurement MUST be zero.
|
|
108
|
+
* - tier === 3: attestationQuoteCid MUST be non-empty, sourceMeasurement MUST be non-zero.
|
|
109
|
+
* - version MUST equal 1 (this module only emits v1).
|
|
110
|
+
*/
|
|
111
|
+
export declare function validatePayload(payload: ExecutionPayload): ExecutionPayload;
|
|
112
|
+
/**
|
|
113
|
+
* ABI-encode the v1 payload per payload-schema §3.1.
|
|
114
|
+
*
|
|
115
|
+
* Validates first; throws `PayloadValidationError` on mismatch. Never silently
|
|
116
|
+
* produces malformed bytes.
|
|
117
|
+
*/
|
|
118
|
+
export declare function encodeExecutionPayload(payload: ExecutionPayload): Hex;
|
|
119
|
+
/** Build the `<kind>:<cid>` metadata key per payload-schema §6.1. */
|
|
120
|
+
export declare function buildMetadataKey(kind: ContentKind, cid: string): string;
|
|
121
|
+
/**
|
|
122
|
+
* Per-execution `setMetadata` client.
|
|
123
|
+
*
|
|
124
|
+
* Stateless beyond config. Each `publishContent()` call validates the payload,
|
|
125
|
+
* ABI-encodes it, and submits a single `setMetadata(agentId, key, value)`
|
|
126
|
+
* transaction. Returns the on-chain tx hash. Failures are surfaced to the
|
|
127
|
+
* caller — the engine catches and logs them as non-fatal.
|
|
128
|
+
*/
|
|
129
|
+
export declare class IdentityPublisher {
|
|
130
|
+
private readonly identityRegistryAddress;
|
|
131
|
+
private readonly agentId;
|
|
132
|
+
private readonly walletClient;
|
|
133
|
+
private readonly publicClient;
|
|
134
|
+
constructor(config: IdentityPublisherConfig);
|
|
135
|
+
/** The agentId this publisher anchors metadata under. */
|
|
136
|
+
get agent(): bigint;
|
|
137
|
+
/** The IdentityRegistry contract this publisher writes to. */
|
|
138
|
+
get registry(): `0x${string}`;
|
|
139
|
+
/**
|
|
140
|
+
* Publish a per-execution commitment under the operator's agent NFT.
|
|
141
|
+
*
|
|
142
|
+
* Calls `IdentityRegistry.setMetadata(agentId, "<kind>:<cid>", encode(payload))`.
|
|
143
|
+
* Returns the on-chain tx hash. Throws on encode/validation/network failure.
|
|
144
|
+
*/
|
|
145
|
+
publishContent(args: PublishContentArgs): Promise<Hex>;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Inputs for `resolveAgentIdForManifest`.
|
|
149
|
+
*
|
|
150
|
+
* `manifestHash` is the keccak256 of the restorer's signed manifest — i.e.
|
|
151
|
+
* the `evidenceHash` JinnRouter records on `claimDelivery`. The subgraph
|
|
152
|
+
* indexes this as `Execution.manifestHash` (see `subgraph/schema.graphql`
|
|
153
|
+
* § Execution).
|
|
154
|
+
*
|
|
155
|
+
* `subgraphUrl` is optional: when undefined, the resolver returns `null`
|
|
156
|
+
* without attempting the query. This lets the call site stay terse —
|
|
157
|
+
* `await resolveAgentIdForManifest({ manifestHash, subgraphUrl: cfg.subgraphUrl })`
|
|
158
|
+
* — without conditional plumbing.
|
|
159
|
+
*/
|
|
160
|
+
export interface ResolveAgentIdArgs {
|
|
161
|
+
manifestHash: `0x${string}`;
|
|
162
|
+
/** GraphQL endpoint URL. When undefined, returns null without querying. */
|
|
163
|
+
subgraphUrl?: string;
|
|
164
|
+
/**
|
|
165
|
+
* Optional override for `fetch`. Production passes nothing (uses global
|
|
166
|
+
* `fetch`); tests pass a stub that captures the GraphQL query/variables.
|
|
167
|
+
*/
|
|
168
|
+
fetchImpl?: typeof fetch;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Resolved record for a manifest hash. The agentId is the primary signal
|
|
172
|
+
* the feedback hook needs; the optional `manifestCid` is a convenience —
|
|
173
|
+
* the subgraph already knows it from indexing the operator's envelope
|
|
174
|
+
* publish, so returning it here saves the caller from re-deriving it.
|
|
175
|
+
*/
|
|
176
|
+
export interface ResolvedAgent {
|
|
177
|
+
agentId: bigint;
|
|
178
|
+
/**
|
|
179
|
+
* The manifest CID indexed alongside this manifestHash, when the
|
|
180
|
+
* subgraph has it. Useful for the feedback `manifestRef` body without
|
|
181
|
+
* a second round-trip.
|
|
182
|
+
*/
|
|
183
|
+
manifestCid: string | null;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Resolve the operator `agentId` for a given manifest hash.
|
|
187
|
+
*
|
|
188
|
+
* Returns `null` when:
|
|
189
|
+
* - `subgraphUrl` is undefined (no on-chain fallback wired yet — see
|
|
190
|
+
* module-level comment).
|
|
191
|
+
* - The subgraph has no `Execution` indexed for this `manifestHash` (the
|
|
192
|
+
* restorer hasn't published an envelope yet, or the subgraph is behind
|
|
193
|
+
* head).
|
|
194
|
+
* - The query fails or returns malformed data. This is intentional: a
|
|
195
|
+
* transient subgraph failure must NOT block the evaluator's
|
|
196
|
+
* `claimDelivery` settlement, so the resolver fails closed (no
|
|
197
|
+
* feedback) rather than throwing.
|
|
198
|
+
*
|
|
199
|
+
* Errors are logged via `console.warn` so a flaky subgraph surface is
|
|
200
|
+
* observable without rerouting through the engine's logger.
|
|
201
|
+
*/
|
|
202
|
+
export declare function resolveAgentIdForManifest(args: ResolveAgentIdArgs): Promise<ResolvedAgent | null>;
|