@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
|
@@ -3,183 +3,262 @@ import { COMMON_FLAGS } from '../command.js';
|
|
|
3
3
|
import { emitResult } from '../output.js';
|
|
4
4
|
import { emitEnvelope } from '../../errors/envelope.js';
|
|
5
5
|
import { ensureConfirmed, emitDryRun } from '../action.js';
|
|
6
|
-
import { gatherIntrospectionRaw } from '../introspection-context.js';
|
|
7
|
-
import { resolveCliPassword } from '../password.js';
|
|
8
|
-
import { createCliSignerContext } from '../execution-context.js';
|
|
6
|
+
import { gatherIntrospectionRaw as defaultGatherIntrospectionRaw } from '../introspection-context.js';
|
|
7
|
+
import { resolveCliPassword as defaultResolveCliPassword } from '../password.js';
|
|
8
|
+
import { createCliSignerContext as defaultCreateCliSignerContext, } from '../execution-context.js';
|
|
9
9
|
import { FleetBootstrapper } from '../../earning/bootstrap.js';
|
|
10
|
-
import { retireFleetServiceOnChain } from '../../earning/fleet-retire.js';
|
|
11
|
-
import { findServiceByDisplayIndex } from '../../earning/fleet-display-index.js';
|
|
12
|
-
import { isRecoverableTransactionError } from '../../tx-retry.js';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
const raw = await gatherIntrospectionRaw({ argv: ctx.argv });
|
|
47
|
-
const sorted = [...(raw.fleet?.services ?? [])].sort((a, b) => a.index - b.index);
|
|
48
|
-
const current = sorted.length;
|
|
49
|
-
const dryRun = parsed.values['dry-run'];
|
|
50
|
-
const yes = parsed.values.yes;
|
|
51
|
-
let plan = [];
|
|
52
|
-
let description;
|
|
53
|
-
if (to === current) {
|
|
54
|
-
plan = [];
|
|
55
|
-
description = `Fleet is already at size ${current}. No action.`;
|
|
56
|
-
}
|
|
57
|
-
else if (to > current) {
|
|
58
|
-
plan = [{ action: 'grow', from: current, to }];
|
|
59
|
-
description = `Would grow fleet from ${current} to ${to} via bootstrap with targetServices=${to}.`;
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
const indices = sorted.slice(to).map(s => s.index);
|
|
63
|
-
plan = [{ action: 'retire', from: current, to, indices }];
|
|
64
|
-
description = `Would retire services with HD service.index ${indices.join(', ')} (on-chain slot; shrink path) to shrink fleet from ${current} to ${to}.`;
|
|
65
|
-
}
|
|
66
|
-
if (dryRun) {
|
|
67
|
-
emitDryRun(ctx, { verb: 'fleet scale', description, plan });
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
if (!ensureConfirmed(ctx, { yes, dryRun: false }))
|
|
71
|
-
return;
|
|
72
|
-
if (to === current) {
|
|
73
|
-
emitResult({
|
|
74
|
-
schemaVersion: 1,
|
|
75
|
-
generatedAt: new Date().toISOString(),
|
|
76
|
-
verb: 'fleet scale',
|
|
77
|
-
from: current,
|
|
78
|
-
to,
|
|
79
|
-
action: 'none',
|
|
80
|
-
}, (v) => {
|
|
81
|
-
const value = v;
|
|
82
|
-
return `Fleet already at target size ${value.to}.`;
|
|
83
|
-
}, {
|
|
84
|
-
json: Boolean(parsed.values.json),
|
|
85
|
-
human: Boolean(parsed.values.human),
|
|
86
|
-
writer: ctx.writer,
|
|
87
|
-
stdoutIsTty: ctx.stdoutIsTty,
|
|
88
|
-
noColor: Boolean(ctx.env['NO_COLOR']),
|
|
89
|
-
});
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
const pw = resolveCliPassword(ctx.argv, ctx.env);
|
|
93
|
-
if (!pw.ok) {
|
|
94
|
-
emitEnvelope({
|
|
95
|
-
code: 'invalid_invocation',
|
|
96
|
-
message: pw.message,
|
|
97
|
-
exampleCli: 'jinn fleet scale --to 3 --yes',
|
|
98
|
-
details: { field: 'keystore password' },
|
|
99
|
-
}, { writer: ctx.writer, exit: ctx.exit });
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
const built = await createCliSignerContext({ argv: ctx.argv, env: ctx.env });
|
|
103
|
-
if (!built.ok) {
|
|
104
|
-
emitEnvelope(built.envelope, { writer: ctx.writer, exit: ctx.exit });
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
const { config, networkChain, chainConfig, fleetStore, masterWallet, publicClient } = built.ctx;
|
|
108
|
-
if (to > current) {
|
|
109
|
-
const bootstrapper = new FleetBootstrapper({
|
|
110
|
-
earningDir: config.earningDir,
|
|
111
|
-
chain: networkChain,
|
|
112
|
-
rpcUrl: config.rpcUrl,
|
|
113
|
-
stakingMode: config.stakingMode,
|
|
114
|
-
targetServices: to,
|
|
115
|
-
testnetL2DeploymentPath: config.testnetL2DeploymentPath,
|
|
116
|
-
testnetL2TokenDeploymentPath: config.testnetL2TokenDeploymentPath,
|
|
117
|
-
testnetMechDeploymentPath: config.testnetMechDeploymentPath,
|
|
118
|
-
testnetStolasDeploymentPath: config.testnetStolasDeploymentPath,
|
|
119
|
-
testnetClaimRegistryDeploymentPath: config.testnetClaimRegistryDeploymentPath,
|
|
120
|
-
debug: config.debug,
|
|
121
|
-
masterEthDailyEstimateWei: config.masterEthDailyEstimateWei,
|
|
122
|
-
pollIntervalMs: config.pollIntervalMs,
|
|
123
|
-
});
|
|
124
|
-
let result;
|
|
10
|
+
import { retireFleetServiceOnChain as defaultRetireFleetServiceOnChain } from '../../earning/fleet-retire.js';
|
|
11
|
+
import { findServiceByDisplayIndex as defaultFindServiceByDisplayIndex } from '../../earning/fleet-display-index.js';
|
|
12
|
+
import { isRecoverableTransactionError as defaultIsRecoverableTransactionError } from '../../tx-retry.js';
|
|
13
|
+
import { loadConfig as defaultLoadConfig, getConfigPathFromArgs as defaultGetConfigPathFromArgs, } from '../../config.js';
|
|
14
|
+
import { isOperationalServiceStep } from '../../earning/types.js';
|
|
15
|
+
const PRODUCTION_DEPS = {
|
|
16
|
+
loadConfig: defaultLoadConfig,
|
|
17
|
+
getConfigPathFromArgs: defaultGetConfigPathFromArgs,
|
|
18
|
+
gatherIntrospectionRaw: defaultGatherIntrospectionRaw,
|
|
19
|
+
resolveCliPassword: defaultResolveCliPassword,
|
|
20
|
+
signerContextFactory: defaultCreateCliSignerContext,
|
|
21
|
+
bootstrapperFactory: (config) => new FleetBootstrapper({
|
|
22
|
+
earningDir: config.earningDir,
|
|
23
|
+
chain: config.networkChain ?? (config.network === 'testnet' ? 'base-sepolia' : 'base'),
|
|
24
|
+
rpcUrl: config.rpcUrl,
|
|
25
|
+
stakingMode: config.stakingMode,
|
|
26
|
+
targetServices: config.targetServices,
|
|
27
|
+
testnetL2DeploymentPath: config.testnetL2DeploymentPath,
|
|
28
|
+
testnetL2TokenDeploymentPath: config.testnetL2TokenDeploymentPath,
|
|
29
|
+
testnetMechDeploymentPath: config.testnetMechDeploymentPath,
|
|
30
|
+
testnetStolasDeploymentPath: config.testnetStolasDeploymentPath,
|
|
31
|
+
testnetClaimRegistryDeploymentPath: config.testnetClaimRegistryDeploymentPath,
|
|
32
|
+
debug: config.debug,
|
|
33
|
+
masterEthDailyEstimateWei: config.masterEthDailyEstimateWei,
|
|
34
|
+
minEoaGasWei: config.minEoaGasWei,
|
|
35
|
+
minSafeEthWei: config.minSafeEthWei,
|
|
36
|
+
pollIntervalMs: config.pollIntervalMs,
|
|
37
|
+
}),
|
|
38
|
+
retireFleetServiceOnChain: defaultRetireFleetServiceOnChain,
|
|
39
|
+
findServiceByDisplayIndex: defaultFindServiceByDisplayIndex,
|
|
40
|
+
isRecoverableTransactionError: defaultIsRecoverableTransactionError,
|
|
41
|
+
};
|
|
42
|
+
export function createFleetScaleCommand(deps = PRODUCTION_DEPS) {
|
|
43
|
+
async function runScale(ctx, rest) {
|
|
44
|
+
let parsed;
|
|
125
45
|
try {
|
|
126
|
-
|
|
46
|
+
parsed = parseArgs({
|
|
47
|
+
args: rest,
|
|
48
|
+
options: {
|
|
49
|
+
...COMMON_FLAGS,
|
|
50
|
+
to: { type: 'string' },
|
|
51
|
+
'dry-run': { type: 'boolean', default: false },
|
|
52
|
+
yes: { type: 'boolean', default: false },
|
|
53
|
+
},
|
|
54
|
+
allowPositionals: false,
|
|
55
|
+
});
|
|
127
56
|
}
|
|
128
|
-
catch (
|
|
129
|
-
if (isRecoverableTransactionError(e)) {
|
|
130
|
-
emitEnvelope({
|
|
131
|
-
code: 'transient_error',
|
|
132
|
-
message: e instanceof Error ? e.message : String(e),
|
|
133
|
-
exampleCli: 'jinn fleet scale --to 3 --yes',
|
|
134
|
-
details: { cause: e instanceof Error ? e.message : String(e) },
|
|
135
|
-
}, { writer: ctx.writer, exit: ctx.exit });
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
57
|
+
catch (err) {
|
|
138
58
|
emitEnvelope({
|
|
139
|
-
code: '
|
|
140
|
-
message:
|
|
141
|
-
|
|
59
|
+
code: 'invalid_invocation',
|
|
60
|
+
message: err instanceof Error ? err.message : String(err),
|
|
61
|
+
exampleCli: 'jinn fleet scale --to 3 --dry-run',
|
|
62
|
+
details: { field: 'flags' },
|
|
142
63
|
}, { writer: ctx.writer, exit: ctx.exit });
|
|
143
64
|
return;
|
|
144
65
|
}
|
|
145
|
-
|
|
66
|
+
const to = parseInt(parsed.values.to, 10);
|
|
67
|
+
if (!Number.isFinite(to) || to < 0) {
|
|
146
68
|
emitEnvelope({
|
|
147
|
-
code: '
|
|
148
|
-
message:
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
details: {
|
|
152
|
-
role: 'master',
|
|
153
|
-
address: result.funding.master_address,
|
|
154
|
-
asset: 'native',
|
|
155
|
-
needWei: result.funding.eth_required,
|
|
156
|
-
haveWei: result.funding.eth_balance,
|
|
157
|
-
},
|
|
69
|
+
code: 'invalid_invocation',
|
|
70
|
+
message: '--to must be a non-negative integer',
|
|
71
|
+
exampleCli: 'jinn fleet scale --to 3 --dry-run',
|
|
72
|
+
details: { field: '--to', expected: 'non-negative integer' },
|
|
158
73
|
}, { writer: ctx.writer, exit: ctx.exit });
|
|
159
74
|
return;
|
|
160
75
|
}
|
|
161
|
-
|
|
76
|
+
const raw = await deps.gatherIntrospectionRaw({ argv: ctx.argv });
|
|
77
|
+
const sorted = [...(raw.fleet?.services ?? [])].sort((a, b) => a.index - b.index);
|
|
78
|
+
const current = sorted.length;
|
|
79
|
+
const dryRun = parsed.values['dry-run'];
|
|
80
|
+
const yes = parsed.values.yes;
|
|
81
|
+
let plan = [];
|
|
82
|
+
let description;
|
|
83
|
+
if (to === current) {
|
|
84
|
+
plan = [];
|
|
85
|
+
description = `Fleet is already at size ${current}. No action.`;
|
|
86
|
+
}
|
|
87
|
+
else if (to > current) {
|
|
88
|
+
plan = [{ action: 'grow', from: current, to }];
|
|
89
|
+
description = `Would grow fleet from ${current} to ${to} via bootstrap with targetServices=${to}.`;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
const indices = sorted.slice(to).map(s => s.index);
|
|
93
|
+
plan = [{ action: 'retire', from: current, to, indices }];
|
|
94
|
+
description = `Would retire services with HD service.index ${indices.join(', ')} (on-chain slot; shrink path) to shrink fleet from ${current} to ${to}.`;
|
|
95
|
+
}
|
|
96
|
+
if (dryRun) {
|
|
97
|
+
emitDryRun(ctx, { verb: 'fleet scale', description, plan });
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
if (!ensureConfirmed(ctx, { yes, dryRun: false }))
|
|
101
|
+
return;
|
|
102
|
+
if (to === current) {
|
|
103
|
+
emitResult({
|
|
104
|
+
schemaVersion: 1,
|
|
105
|
+
generatedAt: new Date().toISOString(),
|
|
106
|
+
verb: 'fleet scale',
|
|
107
|
+
from: current,
|
|
108
|
+
to,
|
|
109
|
+
action: 'none',
|
|
110
|
+
}, (v) => {
|
|
111
|
+
const value = v;
|
|
112
|
+
return `Fleet already at target size ${value.to}.`;
|
|
113
|
+
}, {
|
|
114
|
+
json: Boolean(parsed.values.json),
|
|
115
|
+
human: Boolean(parsed.values.human),
|
|
116
|
+
writer: ctx.writer,
|
|
117
|
+
stdoutIsTty: ctx.stdoutIsTty,
|
|
118
|
+
noColor: Boolean(ctx.env['NO_COLOR']),
|
|
119
|
+
});
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const pw = deps.resolveCliPassword(ctx.argv, ctx.env);
|
|
123
|
+
if (!pw.ok) {
|
|
162
124
|
emitEnvelope({
|
|
163
|
-
code: '
|
|
164
|
-
message:
|
|
165
|
-
|
|
166
|
-
details: {
|
|
125
|
+
code: 'invalid_invocation',
|
|
126
|
+
message: pw.message,
|
|
127
|
+
exampleCli: 'jinn fleet scale --to 3 --yes',
|
|
128
|
+
details: { field: 'keystore password' },
|
|
167
129
|
}, { writer: ctx.writer, exit: ctx.exit });
|
|
168
130
|
return;
|
|
169
131
|
}
|
|
170
|
-
const
|
|
132
|
+
const built = await deps.signerContextFactory({ argv: ctx.argv, env: ctx.env });
|
|
133
|
+
if (!built.ok) {
|
|
134
|
+
emitEnvelope(built.envelope, { writer: ctx.writer, exit: ctx.exit });
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const { config, networkChain, chainConfig, fleetStore, masterWallet, publicClient } = built.ctx;
|
|
138
|
+
if (to > current) {
|
|
139
|
+
const bootstrapper = deps.bootstrapperFactory({ ...config, networkChain });
|
|
140
|
+
let result;
|
|
141
|
+
try {
|
|
142
|
+
result = await bootstrapper.bootstrap(pw.password);
|
|
143
|
+
}
|
|
144
|
+
catch (e) {
|
|
145
|
+
if (deps.isRecoverableTransactionError(e)) {
|
|
146
|
+
emitEnvelope({
|
|
147
|
+
code: 'transient_error',
|
|
148
|
+
message: e instanceof Error ? e.message : String(e),
|
|
149
|
+
exampleCli: 'jinn fleet scale --to 3 --yes',
|
|
150
|
+
details: { cause: e instanceof Error ? e.message : String(e) },
|
|
151
|
+
}, { writer: ctx.writer, exit: ctx.exit });
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
emitEnvelope({
|
|
155
|
+
code: 'fatal',
|
|
156
|
+
message: e instanceof Error ? e.message : String(e),
|
|
157
|
+
details: { cause: e instanceof Error ? e.message : String(e) },
|
|
158
|
+
}, { writer: ctx.writer, exit: ctx.exit });
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
if (result.funding) {
|
|
162
|
+
emitEnvelope({
|
|
163
|
+
code: 'funding_required',
|
|
164
|
+
message: result.message,
|
|
165
|
+
hint: 'Fund the listed address and re-run.',
|
|
166
|
+
exampleCli: 'jinn fund-requirements --json',
|
|
167
|
+
details: {
|
|
168
|
+
role: 'master',
|
|
169
|
+
address: result.funding.master_address,
|
|
170
|
+
asset: 'native',
|
|
171
|
+
needWei: result.funding.eth_required,
|
|
172
|
+
haveWei: result.funding.eth_balance,
|
|
173
|
+
},
|
|
174
|
+
}, { writer: ctx.writer, exit: ctx.exit });
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
if (!result.ok) {
|
|
178
|
+
emitEnvelope({
|
|
179
|
+
code: 'fatal',
|
|
180
|
+
message: result.message,
|
|
181
|
+
hint: 'Bootstrap failed before the fleet reached the target size.',
|
|
182
|
+
details: { cause: result.message },
|
|
183
|
+
}, { writer: ctx.writer, exit: ctx.exit });
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
const state = result.fleet_state;
|
|
187
|
+
emitResult({
|
|
188
|
+
schemaVersion: 1,
|
|
189
|
+
generatedAt: new Date().toISOString(),
|
|
190
|
+
verb: 'fleet scale',
|
|
191
|
+
action: 'grow',
|
|
192
|
+
from: current,
|
|
193
|
+
to,
|
|
194
|
+
servicesComplete: state.services.filter(s => isOperationalServiceStep(s.step)).length,
|
|
195
|
+
message: result.message,
|
|
196
|
+
}, (v) => {
|
|
197
|
+
const value = v;
|
|
198
|
+
return `Fleet grow complete.\nFrom: ${value.from}\nTo: ${value.to}\nComplete services: ${value.servicesComplete}`;
|
|
199
|
+
}, {
|
|
200
|
+
json: Boolean(parsed.values.json),
|
|
201
|
+
human: Boolean(parsed.values.human),
|
|
202
|
+
writer: ctx.writer,
|
|
203
|
+
stdoutIsTty: ctx.stdoutIsTty,
|
|
204
|
+
noColor: Boolean(ctx.env['NO_COLOR']),
|
|
205
|
+
});
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
const indices = sorted
|
|
209
|
+
.slice(to)
|
|
210
|
+
.map(s => s.index)
|
|
211
|
+
.sort((a, b) => b - a);
|
|
212
|
+
const retired = [];
|
|
213
|
+
for (const index of indices) {
|
|
214
|
+
try {
|
|
215
|
+
const r = await deps.retireFleetServiceOnChain({
|
|
216
|
+
publicClient,
|
|
217
|
+
masterWallet,
|
|
218
|
+
distributorAddress: chainConfig.distributorAddress,
|
|
219
|
+
fleetStore,
|
|
220
|
+
chain: networkChain,
|
|
221
|
+
serviceIndex: index,
|
|
222
|
+
});
|
|
223
|
+
retired.push({ index, txHash: r.txHash, message: r.message });
|
|
224
|
+
if (!r.ok) {
|
|
225
|
+
emitEnvelope({
|
|
226
|
+
code: 'fatal',
|
|
227
|
+
message: r.message,
|
|
228
|
+
hint: 'Fix the on-chain or fleet state issue, then retry shrink.',
|
|
229
|
+
details: { index, partialRetire: retired },
|
|
230
|
+
}, { writer: ctx.writer, exit: ctx.exit });
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
catch (e) {
|
|
235
|
+
if (deps.isRecoverableTransactionError(e)) {
|
|
236
|
+
emitEnvelope({
|
|
237
|
+
code: 'transient_error',
|
|
238
|
+
message: e instanceof Error ? e.message : String(e),
|
|
239
|
+
details: { index, partialRetire: retired },
|
|
240
|
+
}, { writer: ctx.writer, exit: ctx.exit });
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
emitEnvelope({
|
|
244
|
+
code: 'fatal',
|
|
245
|
+
message: e instanceof Error ? e.message : String(e),
|
|
246
|
+
details: { index, partialRetire: retired },
|
|
247
|
+
}, { writer: ctx.writer, exit: ctx.exit });
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
171
251
|
emitResult({
|
|
172
252
|
schemaVersion: 1,
|
|
173
253
|
generatedAt: new Date().toISOString(),
|
|
174
254
|
verb: 'fleet scale',
|
|
175
|
-
action: '
|
|
255
|
+
action: 'shrink',
|
|
176
256
|
from: current,
|
|
177
257
|
to,
|
|
178
|
-
|
|
179
|
-
message: result.message,
|
|
258
|
+
retired,
|
|
180
259
|
}, (v) => {
|
|
181
260
|
const value = v;
|
|
182
|
-
return `Fleet
|
|
261
|
+
return `Fleet shrink complete.\nFrom: ${value.from}\nTo: ${value.to}\nRetired chain indices: ${value.retired.map((r) => r.index).join(', ')}`;
|
|
183
262
|
}, {
|
|
184
263
|
json: Boolean(parsed.values.json),
|
|
185
264
|
human: Boolean(parsed.values.human),
|
|
@@ -187,250 +266,187 @@ async function runScale(ctx, rest) {
|
|
|
187
266
|
stdoutIsTty: ctx.stdoutIsTty,
|
|
188
267
|
noColor: Boolean(ctx.env['NO_COLOR']),
|
|
189
268
|
});
|
|
190
|
-
return;
|
|
191
269
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
270
|
+
async function runRetire(ctx, rest) {
|
|
271
|
+
const [indexArg, ...flagArgs] = rest;
|
|
272
|
+
if (!indexArg || indexArg.startsWith('--')) {
|
|
273
|
+
emitEnvelope({
|
|
274
|
+
code: 'invalid_invocation',
|
|
275
|
+
message: 'jinn fleet retire requires a service index',
|
|
276
|
+
exampleCli: 'jinn fleet retire 2 --dry-run',
|
|
277
|
+
details: {
|
|
278
|
+
field: '<index>',
|
|
279
|
+
expected: 'non-negative display index (same as services[].index in jinn fleet JSON)',
|
|
280
|
+
},
|
|
281
|
+
}, { writer: ctx.writer, exit: ctx.exit });
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
const displayIndex = parseInt(indexArg, 10);
|
|
285
|
+
if (!Number.isFinite(displayIndex) || displayIndex < 0) {
|
|
286
|
+
emitEnvelope({
|
|
287
|
+
code: 'invalid_invocation',
|
|
288
|
+
message: `Invalid service index: ${indexArg}`,
|
|
289
|
+
exampleCli: 'jinn fleet retire 2 --dry-run',
|
|
290
|
+
details: {
|
|
291
|
+
field: '<index>',
|
|
292
|
+
expected: 'non-negative display index (same as services[].index in jinn fleet JSON)',
|
|
293
|
+
},
|
|
294
|
+
}, { writer: ctx.writer, exit: ctx.exit });
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
let parsed;
|
|
198
298
|
try {
|
|
199
|
-
|
|
299
|
+
parsed = parseArgs({
|
|
300
|
+
args: flagArgs,
|
|
301
|
+
options: {
|
|
302
|
+
...COMMON_FLAGS,
|
|
303
|
+
'dry-run': { type: 'boolean', default: false },
|
|
304
|
+
yes: { type: 'boolean', default: false },
|
|
305
|
+
},
|
|
306
|
+
allowPositionals: false,
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
catch (err) {
|
|
310
|
+
emitEnvelope({
|
|
311
|
+
code: 'invalid_invocation',
|
|
312
|
+
message: err instanceof Error ? err.message : String(err),
|
|
313
|
+
exampleCli: 'jinn fleet retire 2 --dry-run',
|
|
314
|
+
details: { field: 'flags' },
|
|
315
|
+
}, { writer: ctx.writer, exit: ctx.exit });
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
const raw = await deps.gatherIntrospectionRaw({ argv: ctx.argv });
|
|
319
|
+
const fleet = raw.fleet;
|
|
320
|
+
const svc = fleet ? deps.findServiceByDisplayIndex(fleet.services, displayIndex) : undefined;
|
|
321
|
+
const dryRun = parsed.values['dry-run'];
|
|
322
|
+
const yes = parsed.values.yes;
|
|
323
|
+
let plan;
|
|
324
|
+
let description;
|
|
325
|
+
if (!svc) {
|
|
326
|
+
plan = [];
|
|
327
|
+
description = `Display index ${displayIndex} is not in fleet state (already retired or never existed). No action.`;
|
|
328
|
+
}
|
|
329
|
+
else {
|
|
330
|
+
plan = [{ action: 'retire', index: displayIndex, chainIndex: svc.index, txCount: 1 }];
|
|
331
|
+
description = `Would retire display index ${displayIndex} (HD service.index=${svc.index}): distributor.unstakeAndWithdraw, then remove row from earning_state.json.`;
|
|
332
|
+
}
|
|
333
|
+
if (dryRun) {
|
|
334
|
+
emitDryRun(ctx, { verb: 'fleet retire', description, plan });
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
if (!ensureConfirmed(ctx, { yes, dryRun: false }))
|
|
338
|
+
return;
|
|
339
|
+
if (!svc) {
|
|
340
|
+
emitResult({
|
|
341
|
+
schemaVersion: 1,
|
|
342
|
+
generatedAt: new Date().toISOString(),
|
|
343
|
+
verb: 'fleet retire',
|
|
344
|
+
index: displayIndex,
|
|
345
|
+
action: 'none',
|
|
346
|
+
}, (v) => `Service ${String(v.index)} is already absent from fleet state.`, {
|
|
347
|
+
json: Boolean(parsed.values.json),
|
|
348
|
+
human: Boolean(parsed.values.human),
|
|
349
|
+
writer: ctx.writer,
|
|
350
|
+
stdoutIsTty: ctx.stdoutIsTty,
|
|
351
|
+
noColor: Boolean(ctx.env['NO_COLOR']),
|
|
352
|
+
});
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
355
|
+
const pw = deps.resolveCliPassword(ctx.argv, ctx.env);
|
|
356
|
+
if (!pw.ok) {
|
|
357
|
+
emitEnvelope({
|
|
358
|
+
code: 'invalid_invocation',
|
|
359
|
+
message: pw.message,
|
|
360
|
+
exampleCli: 'jinn fleet retire 2 --yes',
|
|
361
|
+
details: { field: 'keystore password' },
|
|
362
|
+
}, { writer: ctx.writer, exit: ctx.exit });
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
const built = await deps.signerContextFactory({ argv: ctx.argv, env: ctx.env });
|
|
366
|
+
if (!built.ok) {
|
|
367
|
+
emitEnvelope(built.envelope, { writer: ctx.writer, exit: ctx.exit });
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
const { networkChain, chainConfig, fleetStore, masterWallet, publicClient } = built.ctx;
|
|
371
|
+
try {
|
|
372
|
+
const r = await deps.retireFleetServiceOnChain({
|
|
200
373
|
publicClient,
|
|
201
374
|
masterWallet,
|
|
202
375
|
distributorAddress: chainConfig.distributorAddress,
|
|
203
376
|
fleetStore,
|
|
204
377
|
chain: networkChain,
|
|
205
|
-
serviceIndex: index,
|
|
378
|
+
serviceIndex: svc.index,
|
|
206
379
|
});
|
|
207
|
-
retired.push({ index, txHash: r.txHash, message: r.message });
|
|
208
380
|
if (!r.ok) {
|
|
209
381
|
emitEnvelope({
|
|
210
382
|
code: 'fatal',
|
|
211
383
|
message: r.message,
|
|
212
|
-
|
|
213
|
-
details: { index, partialRetire: retired },
|
|
384
|
+
details: { displayIndex, chainIndex: svc.index },
|
|
214
385
|
}, { writer: ctx.writer, exit: ctx.exit });
|
|
215
386
|
return;
|
|
216
387
|
}
|
|
388
|
+
emitResult({
|
|
389
|
+
schemaVersion: 1,
|
|
390
|
+
generatedAt: new Date().toISOString(),
|
|
391
|
+
verb: 'fleet retire',
|
|
392
|
+
index: displayIndex,
|
|
393
|
+
chainIndex: svc.index,
|
|
394
|
+
ok: r.ok,
|
|
395
|
+
txHash: r.txHash ?? null,
|
|
396
|
+
message: r.message,
|
|
397
|
+
}, (v) => {
|
|
398
|
+
const value = v;
|
|
399
|
+
return `Service retired.\nDisplay index: ${value.index}\nChain index: ${value.chainIndex}\nTx: ${value.txHash ?? 'n/a'}`;
|
|
400
|
+
}, {
|
|
401
|
+
json: Boolean(parsed.values.json),
|
|
402
|
+
human: Boolean(parsed.values.human),
|
|
403
|
+
writer: ctx.writer,
|
|
404
|
+
stdoutIsTty: ctx.stdoutIsTty,
|
|
405
|
+
noColor: Boolean(ctx.env['NO_COLOR']),
|
|
406
|
+
});
|
|
217
407
|
}
|
|
218
408
|
catch (e) {
|
|
219
|
-
if (isRecoverableTransactionError(e)) {
|
|
409
|
+
if (deps.isRecoverableTransactionError(e)) {
|
|
220
410
|
emitEnvelope({
|
|
221
411
|
code: 'transient_error',
|
|
222
412
|
message: e instanceof Error ? e.message : String(e),
|
|
223
|
-
details: {
|
|
413
|
+
details: { displayIndex, chainIndex: svc.index },
|
|
224
414
|
}, { writer: ctx.writer, exit: ctx.exit });
|
|
225
415
|
return;
|
|
226
416
|
}
|
|
227
417
|
emitEnvelope({
|
|
228
418
|
code: 'fatal',
|
|
229
419
|
message: e instanceof Error ? e.message : String(e),
|
|
230
|
-
details: { index, partialRetire: retired },
|
|
231
|
-
}, { writer: ctx.writer, exit: ctx.exit });
|
|
232
|
-
return;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
emitResult({
|
|
236
|
-
schemaVersion: 1,
|
|
237
|
-
generatedAt: new Date().toISOString(),
|
|
238
|
-
verb: 'fleet scale',
|
|
239
|
-
action: 'shrink',
|
|
240
|
-
from: current,
|
|
241
|
-
to,
|
|
242
|
-
retired,
|
|
243
|
-
}, (v) => {
|
|
244
|
-
const value = v;
|
|
245
|
-
return `Fleet shrink complete.\nFrom: ${value.from}\nTo: ${value.to}\nRetired chain indices: ${value.retired.map((r) => r.index).join(', ')}`;
|
|
246
|
-
}, {
|
|
247
|
-
json: Boolean(parsed.values.json),
|
|
248
|
-
human: Boolean(parsed.values.human),
|
|
249
|
-
writer: ctx.writer,
|
|
250
|
-
stdoutIsTty: ctx.stdoutIsTty,
|
|
251
|
-
noColor: Boolean(ctx.env['NO_COLOR']),
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
async function runRetire(ctx, rest) {
|
|
255
|
-
const [indexArg, ...flagArgs] = rest;
|
|
256
|
-
if (!indexArg || indexArg.startsWith('--')) {
|
|
257
|
-
emitEnvelope({
|
|
258
|
-
code: 'invalid_invocation',
|
|
259
|
-
message: 'jinn fleet retire requires a service index',
|
|
260
|
-
exampleCli: 'jinn fleet retire 2 --dry-run',
|
|
261
|
-
details: {
|
|
262
|
-
field: '<index>',
|
|
263
|
-
expected: 'non-negative display index (same as services[].index in jinn fleet JSON)',
|
|
264
|
-
},
|
|
265
|
-
}, { writer: ctx.writer, exit: ctx.exit });
|
|
266
|
-
return;
|
|
267
|
-
}
|
|
268
|
-
const displayIndex = parseInt(indexArg, 10);
|
|
269
|
-
if (!Number.isFinite(displayIndex) || displayIndex < 0) {
|
|
270
|
-
emitEnvelope({
|
|
271
|
-
code: 'invalid_invocation',
|
|
272
|
-
message: `Invalid service index: ${indexArg}`,
|
|
273
|
-
exampleCli: 'jinn fleet retire 2 --dry-run',
|
|
274
|
-
details: {
|
|
275
|
-
field: '<index>',
|
|
276
|
-
expected: 'non-negative display index (same as services[].index in jinn fleet JSON)',
|
|
277
|
-
},
|
|
278
|
-
}, { writer: ctx.writer, exit: ctx.exit });
|
|
279
|
-
return;
|
|
280
|
-
}
|
|
281
|
-
let parsed;
|
|
282
|
-
try {
|
|
283
|
-
parsed = parseArgs({
|
|
284
|
-
args: flagArgs,
|
|
285
|
-
options: {
|
|
286
|
-
...COMMON_FLAGS,
|
|
287
|
-
'dry-run': { type: 'boolean', default: false },
|
|
288
|
-
yes: { type: 'boolean', default: false },
|
|
289
|
-
},
|
|
290
|
-
allowPositionals: false,
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
catch (err) {
|
|
294
|
-
emitEnvelope({
|
|
295
|
-
code: 'invalid_invocation',
|
|
296
|
-
message: err instanceof Error ? err.message : String(err),
|
|
297
|
-
exampleCli: 'jinn fleet retire 2 --dry-run',
|
|
298
|
-
details: { field: 'flags' },
|
|
299
|
-
}, { writer: ctx.writer, exit: ctx.exit });
|
|
300
|
-
return;
|
|
301
|
-
}
|
|
302
|
-
const raw = await gatherIntrospectionRaw({ argv: ctx.argv });
|
|
303
|
-
const fleet = raw.fleet;
|
|
304
|
-
const svc = fleet ? findServiceByDisplayIndex(fleet.services, displayIndex) : undefined;
|
|
305
|
-
const dryRun = parsed.values['dry-run'];
|
|
306
|
-
const yes = parsed.values.yes;
|
|
307
|
-
let plan;
|
|
308
|
-
let description;
|
|
309
|
-
if (!svc) {
|
|
310
|
-
plan = [];
|
|
311
|
-
description = `Display index ${displayIndex} is not in fleet state (already retired or never existed). No action.`;
|
|
312
|
-
}
|
|
313
|
-
else {
|
|
314
|
-
plan = [{ action: 'retire', index: displayIndex, chainIndex: svc.index, txCount: 1 }];
|
|
315
|
-
description = `Would retire display index ${displayIndex} (HD service.index=${svc.index}): distributor.unstakeAndWithdraw, then remove row from earning_state.json.`;
|
|
316
|
-
}
|
|
317
|
-
if (dryRun) {
|
|
318
|
-
emitDryRun(ctx, { verb: 'fleet retire', description, plan });
|
|
319
|
-
return;
|
|
320
|
-
}
|
|
321
|
-
if (!ensureConfirmed(ctx, { yes, dryRun: false }))
|
|
322
|
-
return;
|
|
323
|
-
if (!svc) {
|
|
324
|
-
emitResult({
|
|
325
|
-
schemaVersion: 1,
|
|
326
|
-
generatedAt: new Date().toISOString(),
|
|
327
|
-
verb: 'fleet retire',
|
|
328
|
-
index: displayIndex,
|
|
329
|
-
action: 'none',
|
|
330
|
-
}, (v) => `Service ${String(v.index)} is already absent from fleet state.`, {
|
|
331
|
-
json: Boolean(parsed.values.json),
|
|
332
|
-
human: Boolean(parsed.values.human),
|
|
333
|
-
writer: ctx.writer,
|
|
334
|
-
stdoutIsTty: ctx.stdoutIsTty,
|
|
335
|
-
noColor: Boolean(ctx.env['NO_COLOR']),
|
|
336
|
-
});
|
|
337
|
-
return;
|
|
338
|
-
}
|
|
339
|
-
const pw = resolveCliPassword(ctx.argv, ctx.env);
|
|
340
|
-
if (!pw.ok) {
|
|
341
|
-
emitEnvelope({
|
|
342
|
-
code: 'invalid_invocation',
|
|
343
|
-
message: pw.message,
|
|
344
|
-
exampleCli: 'jinn fleet retire 2 --yes',
|
|
345
|
-
details: { field: 'keystore password' },
|
|
346
|
-
}, { writer: ctx.writer, exit: ctx.exit });
|
|
347
|
-
return;
|
|
348
|
-
}
|
|
349
|
-
const built = await createCliSignerContext({ argv: ctx.argv, env: ctx.env });
|
|
350
|
-
if (!built.ok) {
|
|
351
|
-
emitEnvelope(built.envelope, { writer: ctx.writer, exit: ctx.exit });
|
|
352
|
-
return;
|
|
353
|
-
}
|
|
354
|
-
const { networkChain, chainConfig, fleetStore, masterWallet, publicClient } = built.ctx;
|
|
355
|
-
try {
|
|
356
|
-
const r = await retireFleetServiceOnChain({
|
|
357
|
-
publicClient,
|
|
358
|
-
masterWallet,
|
|
359
|
-
distributorAddress: chainConfig.distributorAddress,
|
|
360
|
-
fleetStore,
|
|
361
|
-
chain: networkChain,
|
|
362
|
-
serviceIndex: svc.index,
|
|
363
|
-
});
|
|
364
|
-
if (!r.ok) {
|
|
365
|
-
emitEnvelope({
|
|
366
|
-
code: 'fatal',
|
|
367
|
-
message: r.message,
|
|
368
420
|
details: { displayIndex, chainIndex: svc.index },
|
|
369
421
|
}, { writer: ctx.writer, exit: ctx.exit });
|
|
370
|
-
return;
|
|
371
422
|
}
|
|
372
|
-
emitResult({
|
|
373
|
-
schemaVersion: 1,
|
|
374
|
-
generatedAt: new Date().toISOString(),
|
|
375
|
-
verb: 'fleet retire',
|
|
376
|
-
index: displayIndex,
|
|
377
|
-
chainIndex: svc.index,
|
|
378
|
-
ok: r.ok,
|
|
379
|
-
txHash: r.txHash ?? null,
|
|
380
|
-
message: r.message,
|
|
381
|
-
}, (v) => {
|
|
382
|
-
const value = v;
|
|
383
|
-
return `Service retired.\nDisplay index: ${value.index}\nChain index: ${value.chainIndex}\nTx: ${value.txHash ?? 'n/a'}`;
|
|
384
|
-
}, {
|
|
385
|
-
json: Boolean(parsed.values.json),
|
|
386
|
-
human: Boolean(parsed.values.human),
|
|
387
|
-
writer: ctx.writer,
|
|
388
|
-
stdoutIsTty: ctx.stdoutIsTty,
|
|
389
|
-
noColor: Boolean(ctx.env['NO_COLOR']),
|
|
390
|
-
});
|
|
391
423
|
}
|
|
392
|
-
|
|
393
|
-
|
|
424
|
+
async function run(ctx) {
|
|
425
|
+
const [subverb, ...rest] = ctx.argv;
|
|
426
|
+
if (!subverb) {
|
|
394
427
|
emitEnvelope({
|
|
395
|
-
code: '
|
|
396
|
-
message:
|
|
397
|
-
|
|
428
|
+
code: 'invalid_invocation',
|
|
429
|
+
message: 'jinn fleet requires a subverb: scale | retire',
|
|
430
|
+
exampleCli: 'jinn fleet scale --to 3 --dry-run',
|
|
431
|
+
details: { field: 'subverb', expected: 'scale | retire' },
|
|
398
432
|
}, { writer: ctx.writer, exit: ctx.exit });
|
|
399
433
|
return;
|
|
400
434
|
}
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
}, { writer: ctx.writer, exit: ctx.exit });
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
async function run(ctx) {
|
|
409
|
-
const [subverb, ...rest] = ctx.argv;
|
|
410
|
-
if (!subverb) {
|
|
435
|
+
if (subverb === 'scale')
|
|
436
|
+
return runScale(ctx, rest);
|
|
437
|
+
if (subverb === 'retire')
|
|
438
|
+
return runRetire(ctx, rest);
|
|
411
439
|
emitEnvelope({
|
|
412
440
|
code: 'invalid_invocation',
|
|
413
|
-
message:
|
|
414
|
-
exampleCli: 'jinn fleet
|
|
441
|
+
message: `Unknown fleet subverb: ${subverb}`,
|
|
442
|
+
exampleCli: 'jinn fleet --help',
|
|
415
443
|
details: { field: 'subverb', expected: 'scale | retire' },
|
|
416
444
|
}, { writer: ctx.writer, exit: ctx.exit });
|
|
417
|
-
return;
|
|
418
445
|
}
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
emitEnvelope({
|
|
424
|
-
code: 'invalid_invocation',
|
|
425
|
-
message: `Unknown fleet subverb: ${subverb}`,
|
|
426
|
-
exampleCli: 'jinn fleet --help',
|
|
427
|
-
details: { field: 'subverb', expected: 'scale | retire' },
|
|
428
|
-
}, { writer: ctx.writer, exit: ctx.exit });
|
|
429
|
-
}
|
|
430
|
-
const command = {
|
|
431
|
-
name: 'fleet-manage',
|
|
432
|
-
summary: 'Fleet management: scale | retire <index>',
|
|
433
|
-
helpText: `Usage: jinn fleet <subverb> [flags...]
|
|
446
|
+
return {
|
|
447
|
+
name: 'fleet-manage',
|
|
448
|
+
summary: 'Fleet management: scale | retire <index>',
|
|
449
|
+
helpText: `Usage: jinn fleet <subverb> [flags...]
|
|
434
450
|
|
|
435
451
|
Subverbs:
|
|
436
452
|
scale --to N [--dry-run] [--yes] Grow or shrink the fleet to N services (idempotent)
|
|
@@ -444,7 +460,9 @@ Examples:
|
|
|
444
460
|
jinn fleet scale --to 3 --yes
|
|
445
461
|
jinn fleet retire 1 --dry-run
|
|
446
462
|
`,
|
|
447
|
-
|
|
448
|
-
};
|
|
463
|
+
run,
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
const command = createFleetScaleCommand();
|
|
449
467
|
export default command;
|
|
450
468
|
//# sourceMappingURL=fleet-scale.js.map
|