project-cpu-mcp 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +111 -35
- package/dist/api/authentication-required.error.d.ts +6 -0
- package/dist/api/authentication-required.error.d.ts.map +1 -0
- package/dist/api/authentication-required.error.js +9 -0
- package/dist/api/authentication-required.error.js.map +1 -0
- package/dist/api/client.d.ts +7 -5
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +29 -14
- package/dist/api/client.js.map +1 -1
- package/dist/api/constants.d.ts +2 -0
- package/dist/api/constants.d.ts.map +1 -1
- package/dist/api/constants.js +6 -0
- package/dist/api/constants.js.map +1 -1
- package/dist/api/types.d.ts +189 -220
- package/dist/api/types.d.ts.map +1 -1
- package/dist/api/types.js +43 -29
- package/dist/api/types.js.map +1 -1
- package/dist/config/constants.d.ts +6 -2
- package/dist/config/constants.d.ts.map +1 -1
- package/dist/config/constants.js +6 -2
- package/dist/config/constants.js.map +1 -1
- package/dist/config/types.js +2 -2
- package/dist/config/types.js.map +1 -1
- package/dist/contracts/cell.abi.d.ts +26 -2
- package/dist/contracts/cell.abi.d.ts.map +1 -1
- package/dist/contracts/cell.abi.js +21 -2
- package/dist/contracts/cell.abi.js.map +1 -1
- package/dist/contracts/erc20.abi.d.ts.map +1 -1
- package/dist/contracts/erc20.abi.js +1 -2
- package/dist/contracts/erc20.abi.js.map +1 -1
- package/dist/contracts/trade.abi.d.ts +341 -0
- package/dist/contracts/trade.abi.d.ts.map +1 -1
- package/dist/contracts/trade.abi.js +163 -0
- package/dist/contracts/trade.abi.js.map +1 -1
- package/dist/contracts/trade.types.d.ts +14 -0
- package/dist/contracts/trade.types.d.ts.map +1 -0
- package/dist/contracts/trade.types.js +15 -0
- package/dist/contracts/trade.types.js.map +1 -0
- package/dist/contracts/transport.abi.d.ts +4 -0
- package/dist/contracts/transport.abi.d.ts.map +1 -1
- package/dist/contracts/transport.abi.js +1 -0
- package/dist/contracts/transport.abi.js.map +1 -1
- package/dist/index.js +40 -3
- package/dist/index.js.map +1 -1
- package/dist/logger/constants.d.ts +7 -0
- package/dist/logger/constants.d.ts.map +1 -1
- package/dist/logger/constants.js +11 -0
- package/dist/logger/constants.js.map +1 -1
- package/dist/logger/file-log.utils.d.ts +4 -0
- package/dist/logger/file-log.utils.d.ts.map +1 -0
- package/dist/logger/file-log.utils.js +23 -0
- package/dist/logger/file-log.utils.js.map +1 -0
- package/dist/logger/index.d.ts +1 -1
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/logger/index.js +5 -3
- package/dist/logger/index.js.map +1 -1
- package/dist/logger/logger.d.ts +4 -0
- package/dist/logger/logger.d.ts.map +1 -1
- package/dist/logger/logger.js +48 -3
- package/dist/logger/logger.js.map +1 -1
- package/dist/logger/redact.utils.d.ts.map +1 -1
- package/dist/logger/redact.utils.js +7 -2
- package/dist/logger/redact.utils.js.map +1 -1
- package/dist/logger/types.d.ts +8 -0
- package/dist/logger/types.d.ts.map +1 -1
- package/dist/map/attention.utils.d.ts.map +1 -1
- package/dist/map/attention.utils.js +1 -0
- package/dist/map/attention.utils.js.map +1 -1
- package/dist/map/cell-view.utils.d.ts.map +1 -1
- package/dist/map/cell-view.utils.js +5 -3
- package/dist/map/cell-view.utils.js.map +1 -1
- package/dist/map/process-projection.utils.js +2 -2
- package/dist/map/process-projection.utils.js.map +1 -1
- package/dist/map/reader.utils.d.ts.map +1 -1
- package/dist/map/reader.utils.js +3 -2
- package/dist/map/reader.utils.js.map +1 -1
- package/dist/map/storage.utils.d.ts.map +1 -1
- package/dist/map/storage.utils.js +5 -1
- package/dist/map/storage.utils.js.map +1 -1
- package/dist/map/types.d.ts +21 -0
- package/dist/map/types.d.ts.map +1 -1
- package/dist/map/types.js +6 -0
- package/dist/map/types.js.map +1 -1
- package/dist/paybox/auth/authority.d.ts +46 -0
- package/dist/paybox/auth/authority.d.ts.map +1 -0
- package/dist/paybox/auth/authority.js +410 -0
- package/dist/paybox/auth/authority.js.map +1 -0
- package/dist/paybox/auth/browser-opener.d.ts +8 -0
- package/dist/paybox/auth/browser-opener.d.ts.map +1 -0
- package/dist/paybox/auth/browser-opener.js +22 -0
- package/dist/paybox/auth/browser-opener.js.map +1 -0
- package/dist/paybox/auth/browser-opener.utils.d.ts +2 -0
- package/dist/paybox/auth/browser-opener.utils.d.ts.map +1 -0
- package/dist/paybox/auth/browser-opener.utils.js +10 -0
- package/dist/paybox/auth/browser-opener.utils.js.map +1 -0
- package/dist/paybox/auth/constants.d.ts +16 -0
- package/dist/paybox/auth/constants.d.ts.map +1 -0
- package/dist/paybox/auth/constants.js +16 -0
- package/dist/paybox/auth/constants.js.map +1 -0
- package/dist/paybox/auth/coordinator.d.ts +21 -0
- package/dist/paybox/auth/coordinator.d.ts.map +1 -0
- package/dist/paybox/auth/coordinator.factory.d.ts +5 -0
- package/dist/paybox/auth/coordinator.factory.d.ts.map +1 -0
- package/dist/paybox/auth/coordinator.factory.js +5 -0
- package/dist/paybox/auth/coordinator.factory.js.map +1 -0
- package/dist/paybox/auth/coordinator.js +87 -0
- package/dist/paybox/auth/coordinator.js.map +1 -0
- package/dist/paybox/auth/coordinator.utils.d.ts +4 -0
- package/dist/paybox/auth/coordinator.utils.d.ts.map +1 -0
- package/dist/paybox/auth/coordinator.utils.js +8 -0
- package/dist/paybox/auth/coordinator.utils.js.map +1 -0
- package/dist/paybox/auth/flow-session.d.ts +24 -0
- package/dist/paybox/auth/flow-session.d.ts.map +1 -0
- package/dist/paybox/auth/flow-session.js +155 -0
- package/dist/paybox/auth/flow-session.js.map +1 -0
- package/dist/paybox/auth/loopback-flow.d.ts +49 -0
- package/dist/paybox/auth/loopback-flow.d.ts.map +1 -0
- package/dist/paybox/auth/loopback-flow.js +381 -0
- package/dist/paybox/auth/loopback-flow.js.map +1 -0
- package/dist/paybox/auth/loopback-flow.utils.d.ts +7 -0
- package/dist/paybox/auth/loopback-flow.utils.d.ts.map +1 -0
- package/dist/paybox/auth/loopback-flow.utils.js +47 -0
- package/dist/paybox/auth/loopback-flow.utils.js.map +1 -0
- package/dist/paybox/auth/loopback-page-fonts.constants.d.ts +3 -0
- package/dist/paybox/auth/loopback-page-fonts.constants.d.ts.map +1 -0
- package/dist/paybox/auth/loopback-page-fonts.constants.js +228 -0
- package/dist/paybox/auth/loopback-page-fonts.constants.js.map +1 -0
- package/dist/paybox/auth/loopback-page.utils.d.ts +4 -0
- package/dist/paybox/auth/loopback-page.utils.d.ts.map +1 -0
- package/dist/paybox/auth/loopback-page.utils.js +261 -0
- package/dist/paybox/auth/loopback-page.utils.js.map +1 -0
- package/dist/paybox/auth/provisioning.utils.d.ts +3 -0
- package/dist/paybox/auth/provisioning.utils.d.ts.map +1 -0
- package/dist/paybox/auth/provisioning.utils.js +27 -0
- package/dist/paybox/auth/provisioning.utils.js.map +1 -0
- package/dist/paybox/auth/signing-key.utils.d.ts +2 -0
- package/dist/paybox/auth/signing-key.utils.d.ts.map +1 -0
- package/dist/paybox/auth/signing-key.utils.js +14 -0
- package/dist/paybox/auth/signing-key.utils.js.map +1 -0
- package/dist/paybox/auth/types.d.ts +18 -0
- package/dist/paybox/auth/types.d.ts.map +1 -0
- package/dist/paybox/auth/types.js +6 -0
- package/dist/paybox/auth/types.js.map +1 -0
- package/dist/paybox/auth/utils.d.ts +5 -0
- package/dist/paybox/auth/utils.d.ts.map +1 -0
- package/dist/paybox/auth/utils.js +17 -0
- package/dist/paybox/auth/utils.js.map +1 -0
- package/dist/paybox/constants.d.ts +11 -0
- package/dist/paybox/constants.d.ts.map +1 -0
- package/dist/paybox/constants.js +11 -0
- package/dist/paybox/constants.js.map +1 -0
- package/dist/paybox/errors.d.ts +43 -0
- package/dist/paybox/errors.d.ts.map +1 -0
- package/dist/paybox/errors.js +141 -0
- package/dist/paybox/errors.js.map +1 -0
- package/dist/paybox/sdk/adapter.d.ts +16 -0
- package/dist/paybox/sdk/adapter.d.ts.map +1 -0
- package/dist/paybox/sdk/adapter.js +127 -0
- package/dist/paybox/sdk/adapter.js.map +1 -0
- package/dist/paybox/sdk/constants.d.ts +14 -0
- package/dist/paybox/sdk/constants.d.ts.map +1 -0
- package/dist/paybox/sdk/constants.js +23 -0
- package/dist/paybox/sdk/constants.js.map +1 -0
- package/dist/paybox/sdk/factory.d.ts +4 -0
- package/dist/paybox/sdk/factory.d.ts.map +1 -0
- package/dist/paybox/sdk/factory.js +24 -0
- package/dist/paybox/sdk/factory.js.map +1 -0
- package/dist/paybox/sdk/logging.utils.d.ts +4 -0
- package/dist/paybox/sdk/logging.utils.d.ts.map +1 -0
- package/dist/paybox/sdk/logging.utils.js +19 -0
- package/dist/paybox/sdk/logging.utils.js.map +1 -0
- package/dist/paybox/sdk/utils.d.ts +7 -0
- package/dist/paybox/sdk/utils.d.ts.map +1 -0
- package/dist/paybox/sdk/utils.js +182 -0
- package/dist/paybox/sdk/utils.js.map +1 -0
- package/dist/paybox/storage.d.ts +17 -0
- package/dist/paybox/storage.d.ts.map +1 -0
- package/dist/paybox/storage.js +87 -0
- package/dist/paybox/storage.js.map +1 -0
- package/dist/paybox/types.d.ts +481 -0
- package/dist/paybox/types.d.ts.map +1 -0
- package/dist/paybox/types.js +144 -0
- package/dist/paybox/types.js.map +1 -0
- package/dist/paybox/wallet/manager.d.ts +22 -0
- package/dist/paybox/wallet/manager.d.ts.map +1 -0
- package/dist/paybox/wallet/manager.js +111 -0
- package/dist/paybox/wallet/manager.js.map +1 -0
- package/dist/paybox/wallet/rpc.client.d.ts +16 -0
- package/dist/paybox/wallet/rpc.client.d.ts.map +1 -0
- package/dist/paybox/wallet/rpc.client.js +53 -0
- package/dist/paybox/wallet/rpc.client.js.map +1 -0
- package/dist/paybox/wallet/utils.d.ts +5 -0
- package/dist/paybox/wallet/utils.d.ts.map +1 -0
- package/dist/paybox/wallet/utils.js +82 -0
- package/dist/paybox/wallet/utils.js.map +1 -0
- package/dist/server.constants.d.ts.map +1 -1
- package/dist/server.constants.js +5 -2
- package/dist/server.constants.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +8 -2
- package/dist/server.js.map +1 -1
- package/dist/services/app-config.utils.d.ts.map +1 -1
- package/dist/services/app-config.utils.js +22 -11
- package/dist/services/app-config.utils.js.map +1 -1
- package/dist/services/auth.service.d.ts +3 -5
- package/dist/services/auth.service.d.ts.map +1 -1
- package/dist/services/auth.service.js +20 -77
- package/dist/services/auth.service.js.map +1 -1
- package/dist/services/cell.client.d.ts.map +1 -1
- package/dist/services/cell.client.js +22 -9
- package/dist/services/cell.client.js.map +1 -1
- package/dist/services/lot-return.constants.d.ts +3 -0
- package/dist/services/lot-return.constants.d.ts.map +1 -0
- package/dist/services/lot-return.constants.js +35 -0
- package/dist/services/lot-return.constants.js.map +1 -0
- package/dist/services/lot-return.service.d.ts +25 -0
- package/dist/services/lot-return.service.d.ts.map +1 -0
- package/dist/services/lot-return.service.js +151 -0
- package/dist/services/lot-return.service.js.map +1 -0
- package/dist/services/lot-return.types.d.ts +19 -0
- package/dist/services/lot-return.types.d.ts.map +1 -0
- package/dist/services/lot-return.types.js +2 -0
- package/dist/services/lot-return.types.js.map +1 -0
- package/dist/services/lot-return.utils.d.ts +33 -0
- package/dist/services/lot-return.utils.d.ts.map +1 -0
- package/dist/services/lot-return.utils.js +128 -0
- package/dist/services/lot-return.utils.js.map +1 -0
- package/dist/services/lot-terms.constants.d.ts +4 -0
- package/dist/services/lot-terms.constants.d.ts.map +1 -0
- package/dist/services/lot-terms.constants.js +5 -0
- package/dist/services/lot-terms.constants.js.map +1 -0
- package/dist/services/lot-terms.helpers.d.ts +11 -0
- package/dist/services/lot-terms.helpers.d.ts.map +1 -0
- package/dist/services/lot-terms.helpers.js +45 -0
- package/dist/services/lot-terms.helpers.js.map +1 -0
- package/dist/services/lot-terms.service.d.ts +20 -0
- package/dist/services/lot-terms.service.d.ts.map +1 -0
- package/dist/services/lot-terms.service.js +119 -0
- package/dist/services/lot-terms.service.js.map +1 -0
- package/dist/services/lot-terms.types.d.ts +25 -0
- package/dist/services/lot-terms.types.d.ts.map +1 -0
- package/dist/services/lot-terms.types.js +2 -0
- package/dist/services/lot-terms.types.js.map +1 -0
- package/dist/services/reveal-revert.utils.d.ts +1 -0
- package/dist/services/reveal-revert.utils.d.ts.map +1 -1
- package/dist/services/reveal-revert.utils.js +20 -0
- package/dist/services/reveal-revert.utils.js.map +1 -1
- package/dist/services/reveal.constants.d.ts +1 -1
- package/dist/services/reveal.constants.d.ts.map +1 -1
- package/dist/services/reveal.constants.js +1 -1
- package/dist/services/reveal.constants.js.map +1 -1
- package/dist/services/reveal.service.d.ts +4 -3
- package/dist/services/reveal.service.d.ts.map +1 -1
- package/dist/services/reveal.service.js +35 -10
- package/dist/services/reveal.service.js.map +1 -1
- package/dist/services/reveal.utils.d.ts +7 -8
- package/dist/services/reveal.utils.d.ts.map +1 -1
- package/dist/services/reveal.utils.js +15 -8
- package/dist/services/reveal.utils.js.map +1 -1
- package/dist/services/route.constants.d.ts +12 -1
- package/dist/services/route.constants.d.ts.map +1 -1
- package/dist/services/route.constants.js +66 -15
- package/dist/services/route.constants.js.map +1 -1
- package/dist/services/route.lots.d.ts +18 -0
- package/dist/services/route.lots.d.ts.map +1 -0
- package/dist/services/route.lots.js +33 -0
- package/dist/services/route.lots.js.map +1 -0
- package/dist/services/route.service.d.ts +13 -4
- package/dist/services/route.service.d.ts.map +1 -1
- package/dist/services/route.service.js +95 -13
- package/dist/services/route.service.js.map +1 -1
- package/dist/services/route.types.d.ts +76 -0
- package/dist/services/route.types.d.ts.map +1 -0
- package/dist/services/route.types.js +8 -0
- package/dist/services/route.types.js.map +1 -0
- package/dist/services/route.utils.d.ts +19 -0
- package/dist/services/route.utils.d.ts.map +1 -1
- package/dist/services/route.utils.js +35 -0
- package/dist/services/route.utils.js.map +1 -1
- package/dist/services/trade-eviction.constants.d.ts +12 -0
- package/dist/services/trade-eviction.constants.d.ts.map +1 -0
- package/dist/services/trade-eviction.constants.js +25 -0
- package/dist/services/trade-eviction.constants.js.map +1 -0
- package/dist/services/trade-eviction.service.d.ts +22 -0
- package/dist/services/trade-eviction.service.d.ts.map +1 -0
- package/dist/services/trade-eviction.service.js +101 -0
- package/dist/services/trade-eviction.service.js.map +1 -0
- package/dist/services/trade-eviction.types.d.ts +30 -0
- package/dist/services/trade-eviction.types.d.ts.map +1 -0
- package/dist/services/trade-eviction.types.js +2 -0
- package/dist/services/trade-eviction.types.js.map +1 -0
- package/dist/services/trade-eviction.utils.d.ts +9 -0
- package/dist/services/trade-eviction.utils.d.ts.map +1 -0
- package/dist/services/trade-eviction.utils.js +38 -0
- package/dist/services/trade-eviction.utils.js.map +1 -0
- package/dist/services/trade-rules.service.d.ts +15 -0
- package/dist/services/trade-rules.service.d.ts.map +1 -0
- package/dist/services/trade-rules.service.js +45 -0
- package/dist/services/trade-rules.service.js.map +1 -0
- package/dist/services/trade.client.d.ts +11 -1
- package/dist/services/trade.client.d.ts.map +1 -1
- package/dist/services/trade.client.js +87 -0
- package/dist/services/trade.client.js.map +1 -1
- package/dist/services/trade.constants.d.ts +9 -0
- package/dist/services/trade.constants.d.ts.map +1 -0
- package/dist/services/trade.constants.js +28 -0
- package/dist/services/trade.constants.js.map +1 -0
- package/dist/services/trade.helpers.d.ts +9 -1
- package/dist/services/trade.helpers.d.ts.map +1 -1
- package/dist/services/trade.helpers.js +40 -27
- package/dist/services/trade.helpers.js.map +1 -1
- package/dist/services/transport-revert.utils.d.ts +3 -0
- package/dist/services/transport-revert.utils.d.ts.map +1 -0
- package/dist/services/transport-revert.utils.js +15 -0
- package/dist/services/transport-revert.utils.js.map +1 -0
- package/dist/services/transport.client.d.ts.map +1 -1
- package/dist/services/transport.client.js +14 -6
- package/dist/services/transport.client.js.map +1 -1
- package/dist/services/types.d.ts +249 -21
- package/dist/services/types.d.ts.map +1 -1
- package/dist/services/types.js +25 -0
- package/dist/services/types.js.map +1 -1
- package/dist/services/warehouse.utils.d.ts +8 -0
- package/dist/services/warehouse.utils.d.ts.map +1 -1
- package/dist/services/warehouse.utils.js +25 -0
- package/dist/services/warehouse.utils.js.map +1 -1
- package/dist/session/manager.d.ts +1 -0
- package/dist/session/manager.d.ts.map +1 -1
- package/dist/session/manager.js +13 -0
- package/dist/session/manager.js.map +1 -1
- package/dist/session/storage.d.ts +0 -3
- package/dist/session/storage.d.ts.map +1 -1
- package/dist/session/storage.js +6 -43
- package/dist/session/storage.js.map +1 -1
- package/dist/session/types.d.ts +4 -98
- package/dist/session/types.d.ts.map +1 -1
- package/dist/session/types.js +0 -15
- package/dist/session/types.js.map +1 -1
- package/dist/tools/authenticate.d.ts +1 -1
- package/dist/tools/authenticate.d.ts.map +1 -1
- package/dist/tools/authenticate.js +19 -45
- package/dist/tools/authenticate.js.map +1 -1
- package/dist/tools/config/get-game-config/constants.d.ts +3 -0
- package/dist/tools/config/get-game-config/constants.d.ts.map +1 -1
- package/dist/tools/config/get-game-config/constants.js +13 -2
- package/dist/tools/config/get-game-config/constants.js.map +1 -1
- package/dist/tools/config/get-game-config/get-game-config.d.ts.map +1 -1
- package/dist/tools/config/get-game-config/get-game-config.js +6 -3
- package/dist/tools/config/get-game-config/get-game-config.js.map +1 -1
- package/dist/tools/config/get-game-config/get-game-config.utils.d.ts +4 -4
- package/dist/tools/config/get-game-config/get-game-config.utils.d.ts.map +1 -1
- package/dist/tools/config/get-game-config/get-game-config.utils.js +26 -9
- package/dist/tools/config/get-game-config/get-game-config.utils.js.map +1 -1
- package/dist/tools/config/get-game-config/types.d.ts +6 -2
- package/dist/tools/config/get-game-config/types.d.ts.map +1 -1
- package/dist/tools/config/resource-lens/resource-lens.utils.d.ts.map +1 -1
- package/dist/tools/config/resource-lens/resource-lens.utils.js +5 -4
- package/dist/tools/config/resource-lens/resource-lens.utils.js.map +1 -1
- package/dist/tools/map/attention/attention.d.ts.map +1 -1
- package/dist/tools/map/attention/attention.js +16 -5
- package/dist/tools/map/attention/attention.js.map +1 -1
- package/dist/tools/map/attention/constants.d.ts +6 -0
- package/dist/tools/map/attention/constants.d.ts.map +1 -1
- package/dist/tools/map/attention/constants.js +16 -2
- package/dist/tools/map/attention/constants.js.map +1 -1
- package/dist/tools/map/attention/evicted.service.d.ts +19 -0
- package/dist/tools/map/attention/evicted.service.d.ts.map +1 -0
- package/dist/tools/map/attention/evicted.service.js +73 -0
- package/dist/tools/map/attention/evicted.service.js.map +1 -0
- package/dist/tools/map/attention/evicted.utils.d.ts +16 -0
- package/dist/tools/map/attention/evicted.utils.d.ts.map +1 -0
- package/dist/tools/map/attention/evicted.utils.js +72 -0
- package/dist/tools/map/attention/evicted.utils.js.map +1 -0
- package/dist/tools/map/attention/panel.utils.d.ts.map +1 -1
- package/dist/tools/map/attention/panel.utils.js +1 -0
- package/dist/tools/map/attention/panel.utils.js.map +1 -1
- package/dist/tools/map/attention/types.d.ts +17 -0
- package/dist/tools/map/attention/types.d.ts.map +1 -1
- package/dist/tools/map/attention/types.js.map +1 -1
- package/dist/tools/map/get-map/constants.d.ts.map +1 -1
- package/dist/tools/map/get-map/constants.js +4 -2
- package/dist/tools/map/get-map/constants.js.map +1 -1
- package/dist/tools/reveal/constants.d.ts.map +1 -1
- package/dist/tools/reveal/constants.js +3 -1
- package/dist/tools/reveal/constants.js.map +1 -1
- package/dist/tools/trade/buy-lot/buy-lot.d.ts.map +1 -1
- package/dist/tools/trade/buy-lot/buy-lot.js +2 -0
- package/dist/tools/trade/buy-lot/buy-lot.js.map +1 -1
- package/dist/tools/trade/buy-lot/constants.d.ts.map +1 -1
- package/dist/tools/trade/buy-lot/constants.js +2 -0
- package/dist/tools/trade/buy-lot/constants.js.map +1 -1
- package/dist/tools/trade/buyer-guard/constants.d.ts +4 -0
- package/dist/tools/trade/buyer-guard/constants.d.ts.map +1 -0
- package/dist/tools/trade/buyer-guard/constants.js +11 -0
- package/dist/tools/trade/buyer-guard/constants.js.map +1 -0
- package/dist/tools/trade/buyer-guard/lot-open.guard.d.ts +9 -0
- package/dist/tools/trade/buyer-guard/lot-open.guard.d.ts.map +1 -0
- package/dist/tools/trade/buyer-guard/lot-open.guard.js +15 -0
- package/dist/tools/trade/buyer-guard/lot-open.guard.js.map +1 -0
- package/dist/tools/trade/buyer-guard/types.d.ts +6 -0
- package/dist/tools/trade/buyer-guard/types.d.ts.map +1 -0
- package/dist/tools/trade/buyer-guard/types.js +2 -0
- package/dist/tools/trade/buyer-guard/types.js.map +1 -0
- package/dist/tools/trade/constants.d.ts +5 -0
- package/dist/tools/trade/constants.d.ts.map +1 -0
- package/dist/tools/trade/constants.js +14 -0
- package/dist/tools/trade/constants.js.map +1 -0
- package/dist/tools/trade/create-lot/constants.d.ts.map +1 -1
- package/dist/tools/trade/create-lot/constants.js +4 -1
- package/dist/tools/trade/create-lot/constants.js.map +1 -1
- package/dist/tools/trade/create-lot/create-lot.d.ts +2 -1
- package/dist/tools/trade/create-lot/create-lot.d.ts.map +1 -1
- package/dist/tools/trade/create-lot/create-lot.js +15 -1
- package/dist/tools/trade/create-lot/create-lot.js.map +1 -1
- package/dist/tools/trade/evict-lot/constants.d.ts +4 -0
- package/dist/tools/trade/evict-lot/constants.d.ts.map +1 -0
- package/dist/tools/trade/evict-lot/constants.js +13 -0
- package/dist/tools/trade/evict-lot/constants.js.map +1 -0
- package/dist/tools/trade/evict-lot/evict-lot.d.ts +6 -0
- package/dist/tools/trade/evict-lot/evict-lot.d.ts.map +1 -0
- package/dist/tools/trade/evict-lot/evict-lot.js +35 -0
- package/dist/tools/trade/evict-lot/evict-lot.js.map +1 -0
- package/dist/tools/trade/evict-lot/format.utils.d.ts +5 -0
- package/dist/tools/trade/evict-lot/format.utils.d.ts.map +1 -0
- package/dist/tools/trade/evict-lot/format.utils.js +10 -0
- package/dist/tools/trade/evict-lot/format.utils.js.map +1 -0
- package/dist/tools/trade/evict-lot/types.d.ts +5 -0
- package/dist/tools/trade/evict-lot/types.d.ts.map +1 -0
- package/dist/tools/trade/evict-lot/types.js +8 -0
- package/dist/tools/trade/evict-lot/types.js.map +1 -0
- package/dist/tools/trade/format.utils.d.ts +2 -4
- package/dist/tools/trade/format.utils.d.ts.map +1 -1
- package/dist/tools/trade/format.utils.js +11 -13
- package/dist/tools/trade/format.utils.js.map +1 -1
- package/dist/tools/trade/get-lot/constants.d.ts.map +1 -1
- package/dist/tools/trade/get-lot/constants.js +2 -1
- package/dist/tools/trade/get-lot/constants.js.map +1 -1
- package/dist/tools/trade/list-lots/constants.d.ts +2 -0
- package/dist/tools/trade/list-lots/constants.d.ts.map +1 -1
- package/dist/tools/trade/list-lots/constants.js +5 -1
- package/dist/tools/trade/list-lots/constants.js.map +1 -1
- package/dist/tools/trade/list-lots/list-lots.d.ts.map +1 -1
- package/dist/tools/trade/list-lots/list-lots.js +2 -1
- package/dist/tools/trade/list-lots/list-lots.js.map +1 -1
- package/dist/tools/trade/list-lots/list-lots.utils.d.ts +8 -0
- package/dist/tools/trade/list-lots/list-lots.utils.d.ts.map +1 -0
- package/dist/tools/trade/list-lots/list-lots.utils.js +10 -0
- package/dist/tools/trade/list-lots/list-lots.utils.js.map +1 -0
- package/dist/tools/trade/list-mine/constants.d.ts.map +1 -1
- package/dist/tools/trade/list-mine/constants.js +3 -1
- package/dist/tools/trade/list-mine/constants.js.map +1 -1
- package/dist/tools/trade/lot-terms/constants.d.ts +5 -0
- package/dist/tools/trade/lot-terms/constants.d.ts.map +1 -0
- package/dist/tools/trade/lot-terms/constants.js +13 -0
- package/dist/tools/trade/lot-terms/constants.js.map +1 -0
- package/dist/tools/trade/lot-terms/factory.d.ts +4 -0
- package/dist/tools/trade/lot-terms/factory.d.ts.map +1 -0
- package/dist/tools/trade/lot-terms/factory.js +14 -0
- package/dist/tools/trade/lot-terms/factory.js.map +1 -0
- package/dist/tools/trade/lot-terms/format.utils.d.ts +4 -0
- package/dist/tools/trade/lot-terms/format.utils.d.ts.map +1 -0
- package/dist/tools/trade/lot-terms/format.utils.js +30 -0
- package/dist/tools/trade/lot-terms/format.utils.js.map +1 -0
- package/dist/tools/trade/lot-terms/lot-terms.d.ts +5 -0
- package/dist/tools/trade/lot-terms/lot-terms.d.ts.map +1 -0
- package/dist/tools/trade/lot-terms/lot-terms.js +23 -0
- package/dist/tools/trade/lot-terms/lot-terms.js.map +1 -0
- package/dist/tools/trade/lot-terms/types.d.ts +6 -0
- package/dist/tools/trade/lot-terms/types.d.ts.map +1 -0
- package/dist/tools/trade/lot-terms/types.js +7 -0
- package/dist/tools/trade/lot-terms/types.js.map +1 -0
- package/dist/tools/trade/market-index/constants.d.ts.map +1 -1
- package/dist/tools/trade/market-index/constants.js +2 -0
- package/dist/tools/trade/market-index/constants.js.map +1 -1
- package/dist/tools/trade/markets/constants.d.ts.map +1 -1
- package/dist/tools/trade/markets/constants.js +2 -1
- package/dist/tools/trade/markets/constants.js.map +1 -1
- package/dist/tools/trade/quote-buy/constants.d.ts.map +1 -1
- package/dist/tools/trade/quote-buy/constants.js +4 -2
- package/dist/tools/trade/quote-buy/constants.js.map +1 -1
- package/dist/tools/trade/quote-buy/quote-buy.d.ts.map +1 -1
- package/dist/tools/trade/quote-buy/quote-buy.js +2 -0
- package/dist/tools/trade/quote-buy/quote-buy.js.map +1 -1
- package/dist/tools/trade/quote-lot-return/constants.d.ts +2 -0
- package/dist/tools/trade/quote-lot-return/constants.d.ts.map +1 -0
- package/dist/tools/trade/quote-lot-return/constants.js +11 -0
- package/dist/tools/trade/quote-lot-return/constants.js.map +1 -0
- package/dist/tools/trade/quote-lot-return/quote-lot-return.d.ts +5 -0
- package/dist/tools/trade/quote-lot-return/quote-lot-return.d.ts.map +1 -0
- package/dist/tools/trade/quote-lot-return/quote-lot-return.js +20 -0
- package/dist/tools/trade/quote-lot-return/quote-lot-return.js.map +1 -0
- package/dist/tools/trade/return-lot/constants.d.ts +5 -0
- package/dist/tools/trade/return-lot/constants.d.ts.map +1 -0
- package/dist/tools/trade/return-lot/constants.js +26 -0
- package/dist/tools/trade/return-lot/constants.js.map +1 -0
- package/dist/tools/trade/return-lot/factory.d.ts +4 -0
- package/dist/tools/trade/return-lot/factory.d.ts.map +1 -0
- package/dist/tools/trade/return-lot/factory.js +18 -0
- package/dist/tools/trade/return-lot/factory.js.map +1 -0
- package/dist/tools/trade/return-lot/format.utils.d.ts +5 -0
- package/dist/tools/trade/return-lot/format.utils.d.ts.map +1 -0
- package/dist/tools/trade/return-lot/format.utils.js +39 -0
- package/dist/tools/trade/return-lot/format.utils.js.map +1 -0
- package/dist/tools/trade/return-lot/return-lot.d.ts +5 -0
- package/dist/tools/trade/return-lot/return-lot.d.ts.map +1 -0
- package/dist/tools/trade/return-lot/return-lot.js +25 -0
- package/dist/tools/trade/return-lot/return-lot.js.map +1 -0
- package/dist/tools/trade/return-lot/types.d.ts +11 -0
- package/dist/tools/trade/return-lot/types.d.ts.map +1 -0
- package/dist/tools/trade/return-lot/types.js +21 -0
- package/dist/tools/trade/return-lot/types.js.map +1 -0
- package/dist/tools/trade/types.d.ts +0 -4
- package/dist/tools/trade/types.d.ts.map +1 -1
- package/dist/tools/trade/types.js +4 -12
- package/dist/tools/trade/types.js.map +1 -1
- package/dist/tools/transport/constants.d.ts.map +1 -1
- package/dist/tools/transport/constants.js +9 -0
- package/dist/tools/transport/constants.js.map +1 -1
- package/dist/tools/transport/network/constants.d.ts +2 -0
- package/dist/tools/transport/network/constants.d.ts.map +1 -1
- package/dist/tools/transport/network/constants.js +2 -0
- package/dist/tools/transport/network/constants.js.map +1 -1
- package/dist/tools/transport/network/panel.utils.d.ts +2 -2
- package/dist/tools/transport/network/panel.utils.d.ts.map +1 -1
- package/dist/tools/transport/network/panel.utils.js +20 -0
- package/dist/tools/transport/network/panel.utils.js.map +1 -1
- package/dist/tools/transport/network/route-network.d.ts.map +1 -1
- package/dist/tools/transport/network/route-network.js +1 -1
- package/dist/tools/transport/network/route-network.js.map +1 -1
- package/dist/tools/transport/next-hops/next-hops.d.ts.map +1 -1
- package/dist/tools/transport/next-hops/next-hops.js +13 -3
- package/dist/tools/transport/next-hops/next-hops.js.map +1 -1
- package/dist/tools/transport/quote/constants.d.ts.map +1 -1
- package/dist/tools/transport/quote/constants.js +5 -3
- package/dist/tools/transport/quote/constants.js.map +1 -1
- package/dist/tools/transport/types.d.ts +2 -0
- package/dist/tools/transport/types.d.ts.map +1 -1
- package/dist/tools/transport/types.js +16 -0
- package/dist/tools/transport/types.js.map +1 -1
- package/dist/tools/types.d.ts +7 -1
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/types.js +16 -1
- package/dist/tools/types.js.map +1 -1
- package/dist/types.d.ts +3 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/wei.constants.d.ts +6 -0
- package/dist/utils/wei.constants.d.ts.map +1 -0
- package/dist/utils/wei.constants.js +6 -0
- package/dist/utils/wei.constants.js.map +1 -0
- package/dist/wallet/index.d.ts.map +1 -1
- package/dist/wallet/index.js +2 -3
- package/dist/wallet/index.js.map +1 -1
- package/dist/wallet/types.d.ts +0 -9
- package/dist/wallet/types.d.ts.map +1 -1
- package/dist/wallet/types.js.map +1 -1
- package/package.json +2 -2
- package/dist/tools/trade/cancel-lot/cancel-lot.d.ts +0 -4
- package/dist/tools/trade/cancel-lot/cancel-lot.d.ts.map +0 -1
- package/dist/tools/trade/cancel-lot/cancel-lot.js +0 -20
- package/dist/tools/trade/cancel-lot/cancel-lot.js.map +0 -1
- package/dist/tools/trade/cancel-lot/constants.d.ts +0 -2
- package/dist/tools/trade/cancel-lot/constants.d.ts.map +0 -1
- package/dist/tools/trade/cancel-lot/constants.js +0 -8
- package/dist/tools/trade/cancel-lot/constants.js.map +0 -1
- package/dist/wallet/agw.manager.d.ts +0 -20
- package/dist/wallet/agw.manager.d.ts.map +0 -1
- package/dist/wallet/agw.manager.js +0 -90
- package/dist/wallet/agw.manager.js.map +0 -1
- package/dist/wallet/agw.provider.d.ts +0 -14
- package/dist/wallet/agw.provider.d.ts.map +0 -1
- package/dist/wallet/agw.provider.js +0 -48
- package/dist/wallet/agw.provider.js.map +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { QUOTE_LOT_RETURN_DESCRIPTION } from './constants.js';
|
|
2
|
+
import { createLotReturnService } from '../return-lot/factory.js';
|
|
3
|
+
import { summarizeLotReturnQuote } from '../return-lot/format.utils.js';
|
|
4
|
+
import { lotReturnQuoteInputSchema } from '../return-lot/types.js';
|
|
5
|
+
export function registerQuoteLotReturnTool(server, context, service = null) {
|
|
6
|
+
// Built on first use, not at registration: registering a tool must not reach for the wallet.
|
|
7
|
+
let returnService = service;
|
|
8
|
+
const lotReturn = () => (returnService ??= createLotReturnService(context));
|
|
9
|
+
server.registerTool('cpu_quote_lot_return', { description: QUOTE_LOT_RETURN_DESCRIPTION, inputSchema: lotReturnQuoteInputSchema }, async (args) => {
|
|
10
|
+
const quote = await lotReturn().quoteReturn({ lotId: args.lotId, chain: args.chain });
|
|
11
|
+
const { resources } = await context.appConfig.load();
|
|
12
|
+
return {
|
|
13
|
+
content: [
|
|
14
|
+
{ type: 'text', text: summarizeLotReturnQuote(quote, resources) },
|
|
15
|
+
{ type: 'text', text: JSON.stringify(quote) },
|
|
16
|
+
],
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=quote-lot-return.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quote-lot-return.js","sourceRoot":"","sources":["../../../../src/tools/trade/quote-lot-return/quote-lot-return.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAI9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,MAAM,UAAU,0BAA0B,CACtC,MAAqB,EACrB,OAAmB,EACnB,UAAyD,IAAI;IAE7D,6FAA6F;IAC7F,IAAI,aAAa,GAAG,OAAO,CAAC;IAC5B,MAAM,SAAS,GAAG,GAA2C,EAAE,CAAC,CAAC,aAAa,KAAK,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC;IAEpH,MAAM,CAAC,YAAY,CACf,sBAAsB,EACtB,EAAE,WAAW,EAAE,4BAA4B,EAAE,WAAW,EAAE,yBAAyB,EAAE,EACrF,KAAK,EAAE,IAAI,EAAE,EAAE;QACX,MAAM,KAAK,GAAG,MAAM,SAAS,EAAE,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QACtF,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QAErD,OAAO;YACH,OAAO,EAAE;gBACL,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE;gBACjE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;aAChD;SACJ,CAAC;IACN,CAAC,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const RETURN_LOT_DESCRIPTION: string;
|
|
2
|
+
export declare const MAX_TRANSIT_FEE_WEI_DESCRIPTION: string;
|
|
3
|
+
export declare const MAX_TRANSIT_FEE_WEI_MESSAGE: string;
|
|
4
|
+
export declare const DESTINATION_TRANSFER_WARNING: string;
|
|
5
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/tools/trade/return-lot/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,QAUxB,CAAC;AAEZ,eAAO,MAAM,+BAA+B,QASjC,CAAC;AAEZ,eAAO,MAAM,2BAA2B,QAEK,CAAC;AAE9C,eAAO,MAAM,4BAA4B,QAEyC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export const RETURN_LOT_DESCRIPTION = [
|
|
2
|
+
'Send one of your lots home: the whole unsold remainder ships from its hub to a cell you own, on-chain.',
|
|
3
|
+
'Requires a session. Works on an OPEN lot (the offer is withdrawn) and on an EVICTED one (the hub owner',
|
|
4
|
+
'threw it out and the units are still yours) — pass the lot and the client picks the right branch. Pass',
|
|
5
|
+
'chain = [hub, ...waypoints, your destination cell] for the whole route (required). It is always the whole',
|
|
6
|
+
'remainder, never part of it, and never more than one lot. Quote it first with `cpu_quote_lot_return` and',
|
|
7
|
+
'pass the `maxTransitFeeWei` it answers with back here: this call re-prices the route on-chain and, if the',
|
|
8
|
+
'fee has moved above the ceiling you passed, refuses before approving or sending anything rather than',
|
|
9
|
+
'overspend it. The units are credited only after they arrive and you `cpu_finalize_delivery` on the',
|
|
10
|
+
'returned deliveryId.',
|
|
11
|
+
].join(' ');
|
|
12
|
+
export const MAX_TRANSIT_FEE_WEI_DESCRIPTION = [
|
|
13
|
+
'The most transit you will pay for this return, in WEI (not $CPU) — copy the `maxTransitFeeWei` field',
|
|
14
|
+
'from the `cpu_quote_lot_return` you just ran for this same lot and route, unchanged. Only the source',
|
|
15
|
+
'hub charges the rate pinned when the lot was listed; every later waypoint on the way home can raise its',
|
|
16
|
+
'own rate between that quote and this call, which is why this ceiling exists. The route is re-priced',
|
|
17
|
+
'on-chain before anything is approved or sent, and a total above this figure is refused right there;',
|
|
18
|
+
'the same figure then travels with the transaction as a cap on the whole route total, so the chain',
|
|
19
|
+
'refuses it too if a rate moves before the call is mined. A ceiling that went stale costs you a re-quote',
|
|
20
|
+
'instead of the difference.',
|
|
21
|
+
].join(' ');
|
|
22
|
+
export const MAX_TRANSIT_FEE_WEI_MESSAGE = 'maxTransitFeeWei is a whole number of wei — pass the maxTransitFeeWei field from cpu_quote_lot_return ' +
|
|
23
|
+
'unchanged, not the decimal $CPU figure.';
|
|
24
|
+
export const DESTINATION_TRANSFER_WARNING = 'The goods land in the destination cell, not in your wallet: transfer or sell that cell before the ' +
|
|
25
|
+
'delivery is finalized and the returned resources arrive under its new owner.';
|
|
26
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/tools/trade/return-lot/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,wGAAwG;IACxG,wGAAwG;IACxG,wGAAwG;IACxG,2GAA2G;IAC3G,0GAA0G;IAC1G,2GAA2G;IAC3G,sGAAsG;IACtG,oGAAoG;IACpG,sBAAsB;CACzB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC3C,sGAAsG;IACtG,sGAAsG;IACtG,yGAAyG;IACzG,qGAAqG;IACrG,qGAAqG;IACrG,mGAAmG;IACnG,yGAAyG;IACzG,4BAA4B;CAC/B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,2BAA2B,GACpC,wGAAwG;IACxG,yCAAyC,CAAC;AAE9C,MAAM,CAAC,MAAM,4BAA4B,GACrC,oGAAoG;IACpG,8EAA8E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/tools/trade/return-lot/factory.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,UAAU,GAAG,iBAAiB,CAY7E"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AllowanceService } from '../../../services/allowance.service.js';
|
|
2
|
+
import { LotReturnService } from '../../../services/lot-return.service.js';
|
|
3
|
+
import { TradeClient } from '../../../services/trade.client.js';
|
|
4
|
+
import { ContractClient } from '../../../wallet/contract-client.js';
|
|
5
|
+
export function createLotReturnService(context) {
|
|
6
|
+
const logger = context.logger.child('trade:return');
|
|
7
|
+
const contracts = new ContractClient({ wallet: context.wallet, logger: logger.child('contract'), retry: null });
|
|
8
|
+
return new LotReturnService({
|
|
9
|
+
wallet: context.wallet,
|
|
10
|
+
appConfig: context.appConfig,
|
|
11
|
+
allowance: new AllowanceService({ wallet: context.wallet, logger: logger.child('allowance') }),
|
|
12
|
+
contracts,
|
|
13
|
+
tradeClient: new TradeClient({ contracts, logger: logger.child('client') }),
|
|
14
|
+
mapReader: context.mapReader,
|
|
15
|
+
logger,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../../src/tools/trade/return-lot/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAE3E,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAEhE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEpE,MAAM,UAAU,sBAAsB,CAAC,OAAmB;IACtD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IACpD,MAAM,SAAS,GAAG,IAAI,cAAc,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAChH,OAAO,IAAI,gBAAgB,CAAC;QACxB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,SAAS,EAAE,IAAI,gBAAgB,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC;QAC9F,SAAS;QACT,WAAW,EAAE,IAAI,WAAW,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC3E,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,MAAM;KACT,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type LotReturnQuote, type LotReturnResult } from '../../../services/types.js';
|
|
2
|
+
import { type ResourceNames } from '../../../utils/format.utils.js';
|
|
3
|
+
export declare function summarizeLotReturnQuote(quote: LotReturnQuote, resources: ResourceNames): string;
|
|
4
|
+
export declare function summarizeLotReturn(result: LotReturnResult, resources: ResourceNames): string;
|
|
5
|
+
//# sourceMappingURL=format.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.utils.d.ts","sourceRoot":"","sources":["../../../../src/tools/trade/return-lot/format.utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AACxG,OAAO,EAAsD,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAmBxH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,GAAG,MAAM,CAU/F;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,aAAa,GAAG,MAAM,CAe5F"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { DESTINATION_TRANSFER_WARNING } from './constants.js';
|
|
2
|
+
import { LotState } from '../../../api/types.js';
|
|
3
|
+
import { LotReturnBranch } from '../../../services/types.js';
|
|
4
|
+
import { formatUnixSeconds, resourceLabel, summarizeTransit } from '../../../utils/format.utils.js';
|
|
5
|
+
function describeCapacity(quote) {
|
|
6
|
+
if (quote.capacity.free === null) {
|
|
7
|
+
return `Cell ${quote.destinationTokenId} has uncapped storage for this resource, so the whole remainder fits.`;
|
|
8
|
+
}
|
|
9
|
+
if (quote.capacity.fits) {
|
|
10
|
+
return (`Cell ${quote.destinationTokenId} has ${quote.capacity.free} free right now (what it holds and ` +
|
|
11
|
+
`everything reserved on it counted), so the ${quote.capacity.required} units fit.`);
|
|
12
|
+
}
|
|
13
|
+
return (`Cell ${quote.destinationTokenId} does not fit the whole remainder: ${quote.capacity.required} units need ` +
|
|
14
|
+
`room and only ${quote.capacity.free} are free (what it holds and everything reserved on it counted). ` +
|
|
15
|
+
`Free the space or pick another cell you own — cpu_return_lot refuses before it approves anything.`);
|
|
16
|
+
}
|
|
17
|
+
export function summarizeLotReturnQuote(quote, resources) {
|
|
18
|
+
return (`Lot ${quote.lotId} return: the whole remainder, ${quote.amount} ` +
|
|
19
|
+
`${resourceLabel(resources, quote.resourceId)}, from Hub ${quote.hubTokenId} to your cell ` +
|
|
20
|
+
`${quote.destinationTokenId} over ${quote.totalDistance} grid steps, arriving ` +
|
|
21
|
+
`${formatUnixSeconds(quote.arrivalAt)}. Transit fee ` +
|
|
22
|
+
`${summarizeTransit(quote.maxTransitFee, quote.transitDiscount)} — pass ` +
|
|
23
|
+
`maxTransitFeeWei=${quote.maxTransitFeeWei} to cpu_return_lot and it refuses rather than pay more than ` +
|
|
24
|
+
`this, so quote it again if you wait. ${describeCapacity(quote)}`);
|
|
25
|
+
}
|
|
26
|
+
export function summarizeLotReturn(result, resources) {
|
|
27
|
+
const approve = result.approveTxHash !== null ? `approve tx ${result.approveTxHash}, ` : '';
|
|
28
|
+
const branch = result.branch === LotReturnBranch.Reclaimed
|
|
29
|
+
? `reclaimed the remainder of evicted lot ${result.lotId}`
|
|
30
|
+
: `cancelled lot ${result.lotId}`;
|
|
31
|
+
const wasEvicted = result.originalState === LotState.Evicted ? ' It no longer blocks new lots on that hub.' : '';
|
|
32
|
+
return (`Returned lot ${result.lotId}: ${branch} on Hub ${result.hubTokenId} and sent the whole remainder, ` +
|
|
33
|
+
`${result.returned} ${resourceLabel(resources, result.resourceId)}, home to cell ` +
|
|
34
|
+
`${result.destinationTokenId} (delivery ${result.deliveryId}, ETA ${formatUnixSeconds(result.arrivalAt)}) — ` +
|
|
35
|
+
`run finalize_delivery on ${result.deliveryId} after the ETA to take them in.${wasEvicted} Transit fee ` +
|
|
36
|
+
`${summarizeTransit(result.transitPaid, result.transitDiscount)}. ${DESTINATION_TRANSFER_WARNING} ` +
|
|
37
|
+
`${approve}return tx ${result.txHash} in block ${result.blockNumber}.`);
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=format.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.utils.js","sourceRoot":"","sources":["../../../../src/tools/trade/return-lot/format.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,eAAe,EAA6C,MAAM,4BAA4B,CAAC;AACxG,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,gBAAgB,EAAsB,MAAM,gCAAgC,CAAC;AAExH,SAAS,gBAAgB,CAAC,KAAqB;IAC3C,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;QAC/B,OAAO,QAAQ,KAAK,CAAC,kBAAkB,uEAAuE,CAAC;IACnH,CAAC;IACD,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACtB,OAAO,CACH,QAAQ,KAAK,CAAC,kBAAkB,QAAQ,KAAK,CAAC,QAAQ,CAAC,IAAI,qCAAqC;YAChG,8CAA8C,KAAK,CAAC,QAAQ,C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,EAAE,CAAC;IACjH,OAAO,CACH,gBAAgB,MAAM,CAAC,KAAK,KAAK,MAAM,WAAW,MAAM,CAAC,UAAU,iCAAiC;QACpG,GAAG,MAAM,CAAC,QAAQ,IAAI,aAAa,CAAC,SAAS,EAAE,MAAM,CAAC,UAAU,CAAC,iBAAiB;QAClF,GAAG,MAAM,CAAC,kBAAkB,cAAc,MAAM,CAAC,UAAU,SAAS,iBAAiB,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM;QAC7G,4BAA4B,MAAM,CAAC,UAAU,kCAAkC,UAAU,eAAe;QACxG,GAAG,gBAAgB,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,eAAe,CAAC,KAAK,4BAA4B,GAAG;QACnG,GAAG,OAAO,aAAa,MAAM,CAAC,MAAM,aAAa,MAAM,CAAC,WAAW,GAAG,CACzE,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ILotReturnService } from '../../../services/lot-return.types.js';
|
|
2
|
+
import type { AppContext } from '../../../types.js';
|
|
3
|
+
import { type ToolRegistrar } from '../../types.js';
|
|
4
|
+
export declare function registerReturnLotTool(server: ToolRegistrar, context: AppContext, service?: Pick<ILotReturnService, 'returnLot'> | null): void;
|
|
5
|
+
//# sourceMappingURL=return-lot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"return-lot.d.ts","sourceRoot":"","sources":["../../../../src/tools/trade/return-lot/return-lot.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEnE,wBAAgB,qBAAqB,CACjC,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,UAAU,EACnB,OAAO,GAAE,IAAI,CAAC,iBAAiB,EAAE,WAAW,CAAC,GAAG,IAAW,GAC5D,IAAI,CAwBN"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RETURN_LOT_DESCRIPTION } from './constants.js';
|
|
2
|
+
import { createLotReturnService } from './factory.js';
|
|
3
|
+
import { summarizeLotReturn } from './format.utils.js';
|
|
4
|
+
import { lotReturnInputSchema } from './types.js';
|
|
5
|
+
import { ToolEventType } from '../../types.js';
|
|
6
|
+
export function registerReturnLotTool(server, context, service = null) {
|
|
7
|
+
// Built on first use, not at registration: registering a tool must not reach for the wallet.
|
|
8
|
+
let returnService = service;
|
|
9
|
+
const lotReturn = () => (returnService ??= createLotReturnService(context));
|
|
10
|
+
server.registerTool('cpu_return_lot', { description: RETURN_LOT_DESCRIPTION, inputSchema: lotReturnInputSchema }, async (args) => {
|
|
11
|
+
const result = await lotReturn().returnLot({
|
|
12
|
+
lotId: args.lotId,
|
|
13
|
+
chain: args.chain,
|
|
14
|
+
maxTransitFeeWei: args.maxTransitFeeWei,
|
|
15
|
+
});
|
|
16
|
+
const { resources } = await context.appConfig.load();
|
|
17
|
+
return {
|
|
18
|
+
content: [
|
|
19
|
+
{ type: 'text', text: summarizeLotReturn(result, resources) },
|
|
20
|
+
{ type: 'text', text: JSON.stringify({ ...result, eventType: ToolEventType.LotReturned }) },
|
|
21
|
+
],
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=return-lot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"return-lot.js","sourceRoot":"","sources":["../../../../src/tools/trade/return-lot/return-lot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAGlD,OAAO,EAAE,aAAa,EAAsB,MAAM,gBAAgB,CAAC;AAEnE,MAAM,UAAU,qBAAqB,CACjC,MAAqB,EACrB,OAAmB,EACnB,UAAuD,IAAI;IAE3D,6FAA6F;IAC7F,IAAI,aAAa,GAAG,OAAO,CAAC;IAC5B,MAAM,SAAS,GAAG,GAAyC,EAAE,CAAC,CAAC,aAAa,KAAK,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC;IAElH,MAAM,CAAC,YAAY,CACf,gBAAgB,EAChB,EAAE,WAAW,EAAE,sBAAsB,EAAE,WAAW,EAAE,oBAAoB,EAAE,EAC1E,KAAK,EAAE,IAAI,EAAE,EAAE;QACX,MAAM,MAAM,GAAG,MAAM,SAAS,EAAE,CAAC,SAAS,CAAC;YACvC,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;SAC1C,CAAC,CAAC;QACH,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QAErD,OAAO;YACH,OAAO,EAAE;gBACL,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE;gBAC7D,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,MAAM,EAAE,SAAS,EAAE,aAAa,CAAC,WAAW,EAAE,CAAC,EAAE;aAC9F;SACJ,CAAC;IACN,CAAC,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const lotReturnQuoteInputSchema: {
|
|
3
|
+
lotId: z.ZodString;
|
|
4
|
+
chain: z.ZodArray<z.ZodNumber, "many">;
|
|
5
|
+
};
|
|
6
|
+
export declare const lotReturnInputSchema: {
|
|
7
|
+
maxTransitFeeWei: z.ZodString;
|
|
8
|
+
lotId: z.ZodString;
|
|
9
|
+
chain: z.ZodArray<z.ZodNumber, "many">;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/tools/trade/return-lot/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,yBAAyB;;;CAUrC,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;CAMhC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MAX_TRANSIT_FEE_WEI_DESCRIPTION, MAX_TRANSIT_FEE_WEI_MESSAGE } from './constants.js';
|
|
3
|
+
import { tokenIdSchema } from '../../../geometry/types.js';
|
|
4
|
+
import { WEI_STRING_PATTERN } from '../../../utils/wei.constants.js';
|
|
5
|
+
export const lotReturnQuoteInputSchema = {
|
|
6
|
+
lotId: z.string().describe('The lot to send home (must be yours; open or evicted).'),
|
|
7
|
+
chain: z
|
|
8
|
+
.array(tokenIdSchema)
|
|
9
|
+
.min(2)
|
|
10
|
+
.describe('Waypoint tokenIds [hub, ...waypoints, destination] for the whole route home — the first node is ' +
|
|
11
|
+
'the hub holding the lot, the last is your own revealed cell where the remainder lands. Scout ' +
|
|
12
|
+
'waypoints with cpu_next_hops.'),
|
|
13
|
+
};
|
|
14
|
+
export const lotReturnInputSchema = {
|
|
15
|
+
...lotReturnQuoteInputSchema,
|
|
16
|
+
maxTransitFeeWei: z
|
|
17
|
+
.string()
|
|
18
|
+
.regex(WEI_STRING_PATTERN, MAX_TRANSIT_FEE_WEI_MESSAGE)
|
|
19
|
+
.describe(MAX_TRANSIT_FEE_WEI_DESCRIPTION),
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/tools/trade/return-lot/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,+BAA+B,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACrC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wDAAwD,CAAC;IACpF,KAAK,EAAE,CAAC;SACH,KAAK,CAAC,aAAa,CAAC;SACpB,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACL,kGAAkG;QAC9F,+FAA+F;QAC/F,+BAA+B,CACtC;CACR,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,GAAG,yBAAyB;IAC5B,gBAAgB,EAAE,CAAC;SACd,MAAM,EAAE;SACR,KAAK,CAAC,kBAAkB,EAAE,2BAA2B,CAAC;SACtD,QAAQ,CAAC,+BAA+B,CAAC;CACjD,CAAC"}
|
|
@@ -20,10 +20,6 @@ export declare const buyLotInputSchema: {
|
|
|
20
20
|
chain: z.ZodArray<z.ZodNumber, "many">;
|
|
21
21
|
value: z.ZodString;
|
|
22
22
|
};
|
|
23
|
-
export declare const cancelLotInputSchema: {
|
|
24
|
-
lotId: z.ZodString;
|
|
25
|
-
chain: z.ZodArray<z.ZodNumber, "many">;
|
|
26
|
-
};
|
|
27
23
|
export declare const quoteBuyInputSchema: {
|
|
28
24
|
lotId: z.ZodString;
|
|
29
25
|
value: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tools/trade/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAIpG,MAAM,WAAW,qBAAsB,SAAQ,qBAAqB;IAChE,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAOD,eAAO,MAAM,oBAAoB;;;;;;CA2BhC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;CAUjC,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;CAU7B,CAAC;AAEF,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tools/trade/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAIpG,MAAM,WAAW,qBAAsB,SAAQ,qBAAqB;IAChE,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAOD,eAAO,MAAM,oBAAoB;;;;;;CA2BhC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;CAUjC,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;CAU7B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;CAY/B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;CA8B/B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;CAiBhC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;CAY9B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;CAE7B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;CASjC,CAAC"}
|
|
@@ -27,8 +27,8 @@ export const createLotInputSchema = {
|
|
|
27
27
|
.describe('Optional seller tolerance: the highest sale-fee percent (0–100) you accept the hub charging on each ' +
|
|
28
28
|
"sale. Omit to lock in the hub's live rate at listing time as the tolerance. The hub settles its " +
|
|
29
29
|
'live rate on every sale (never more than the tolerance); if the owner later raises it above the ' +
|
|
30
|
-
'tolerance the lot freezes — buys revert until the rate drops back to the tolerance or below
|
|
31
|
-
'
|
|
30
|
+
'tolerance the lot freezes — buys revert until the rate drops back to the tolerance or below. ' +
|
|
31
|
+
'Sending a frozen lot home costs no sale fee, but still costs transit for the route you choose.'),
|
|
32
32
|
};
|
|
33
33
|
export const setSaleFeeInputSchema = {
|
|
34
34
|
hubTokenId: tokenIdSchema.describe('The Hub cell token id whose sale-fee rate you are setting (you must own it).'),
|
|
@@ -48,15 +48,6 @@ export const buyLotInputSchema = {
|
|
|
48
48
|
'revealed cell where the goods are delivered. Scout waypoints with cpu_next_hops.'),
|
|
49
49
|
value: positiveIntString.describe('Units to buy, as a positive integer string (≤ the lot remaining).'),
|
|
50
50
|
};
|
|
51
|
-
export const cancelLotInputSchema = {
|
|
52
|
-
lotId: z.string().describe('The lot id to cancel (must be yours).'),
|
|
53
|
-
chain: z
|
|
54
|
-
.array(tokenIdSchema)
|
|
55
|
-
.min(2)
|
|
56
|
-
.describe('Waypoint tokenIds [hub, ...waypoints, destination] for the return shipment — first node is the lot ' +
|
|
57
|
-
'Hub, last is your own revealed cell where the unsold units return. A route through a foreign Hub ' +
|
|
58
|
-
'is paid in $CPU.'),
|
|
59
|
-
};
|
|
60
51
|
export const quoteBuyInputSchema = {
|
|
61
52
|
lotId: z.string().describe('The lot id to preview a buy on.'),
|
|
62
53
|
value: positiveIntString.describe('Units to buy, as a positive integer string.'),
|
|
@@ -134,6 +125,7 @@ export const listMyLotsInputSchema = {
|
|
|
134
125
|
.nativeEnum(LotState)
|
|
135
126
|
.nullable()
|
|
136
127
|
.default(null)
|
|
137
|
-
.describe('Optional lifecycle filter (delivering, open, sold, cancelled). Omit for all
|
|
128
|
+
.describe('Optional lifecycle filter (delivering, open, evicted, sold, cancelled). Omit for all of them, ' +
|
|
129
|
+
'evicted included — an evicted lot is still yours and still owes a return home.'),
|
|
138
130
|
};
|
|
139
131
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/tools/trade/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAA8B,MAAM,oBAAoB,CAAC;AACpG,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAMxD,MAAM,iBAAiB,GAAG,CAAC;KACtB,MAAM,EAAE;KACR,KAAK,CAAC,YAAY,CAAC;KACnB,QAAQ,CAAC,+DAA+D,CAAC,CAAC;AAE/E,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,KAAK,EAAE,CAAC;SACH,KAAK,CAAC,aAAa,CAAC;SACpB,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACL,sGAAsG;QAClG,yFAAyF,CAChG;IACL,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,oEAAoE,CAAC;IAC3G,KAAK,EAAE,iBAAiB,CAAC,QAAQ,CAAC,8CAA8C,CAAC;IACjF,YAAY,EAAE,CAAC;SACV,MAAM,EAAE;SACR,KAAK,CAAC,eAAe,CAAC;SACtB,QAAQ,CAAC,mFAAmF,CAAC;IAClG,iBAAiB,EAAE,CAAC;SACf,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,GAAG,CAAC;SACR,QAAQ,EAAE;SACV,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CACL,sGAAsG;QAClG,kGAAkG;QAClG,kGAAkG;QAClG
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/tools/trade/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CA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AAC,MAAM,qBAAqB,GAAG;IACjC,KAAK,EAAE,CAAC;SACH,UAAU,CAAC,QAAQ,CAAC;SACpB,QAAQ,EAAE;SACV,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CACL,gGAAgG;QAC5F,gFAAgF,CACvF;CACR,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/tools/transport/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,QAevB,CAAC;AAEZ,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/tools/transport/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,QAevB,CAAC;AAEZ,eAAO,MAAM,yBAAyB,QAuB3B,CAAC;AAEZ,eAAO,MAAM,qBAAqB,QA8BvB,CAAC"}
|
|
@@ -32,6 +32,11 @@ export const ROUTE_NETWORK_DESCRIPTION = [
|
|
|
32
32
|
'goods stop at the border until you bridge it with a border Hub (it still needs an eligible landing point',
|
|
33
33
|
'within reach on the far side), land across, or a detour.',
|
|
34
34
|
'Routing over the graph is YOUR job: pick the chain, then verify it with cpu_quote_transport before spending.',
|
|
35
|
+
'Pass `lotId` to plan one lot’s way home instead: for an Evicted lot the source becomes the hub it was',
|
|
36
|
+
'listed on, admitted from the lot itself at the reach and the rate recorded there, so the plan holds after',
|
|
37
|
+
'that hub is demolished, rebuilt, left unfinished or sold. Only the source changes — the destination is',
|
|
38
|
+
'still your own revealed cell, every later waypoint keeps the ordinary rules, and the prefilled quote call',
|
|
39
|
+
'becomes cpu_quote_lot_return.',
|
|
35
40
|
].join(' ');
|
|
36
41
|
export const NEXT_HOPS_DESCRIPTION = [
|
|
37
42
|
'Survey the legal next waypoints from a cell (read-only). Lists every eligible waypoint within one hop under',
|
|
@@ -59,5 +64,9 @@ export const NEXT_HOPS_DESCRIPTION = [
|
|
|
59
64
|
'open ground. WHEN: the cheap point check — call it right before each leg and after',
|
|
60
65
|
'cpu_get_changes shows movement (hubs get demolished, fees change while goods travel); replan via',
|
|
61
66
|
'cpu_route_network only when a local fix is impossible.',
|
|
67
|
+
'Pass `lotId` to survey one lot’s way home instead: for an Evicted lot the origin becomes the hub it was',
|
|
68
|
+
'listed on, admitted from the lot itself at the reach recorded there, whatever stands on that cell now.',
|
|
69
|
+
'Only the origin changes — every candidate is still judged on today’s map — and the chain you build is',
|
|
70
|
+
'verified with cpu_quote_lot_return.',
|
|
62
71
|
].join(' ');
|
|
63
72
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/tools/transport/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACjC,+FAA+F;IAC/F,4GAA4G;IAC5G,6GAA6G;IAC7G,0GAA0G;IAC1G,2GAA2G;IAC3G,4GAA4G;IAC5G,mFAAmF;IACnF,2GAA2G;IAC3G,gEAAgE;IAChE,8BAA8B;IAC9B,+FAA+F;IAC/F,2GAA2G;IAC3G,6GAA6G;IAC7G,yCAAyC;CAC5C,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACrC,4GAA4G;IAC5G,wGAAwG;IACxG,4GAA4G;IAC5G,8GAA8G;IAC9G,6GAA6G;IAC7G,oEAAoE;IACpE,6GAA6G;IAC7G,6GAA6G;IAC7G,4GAA4G;IAC5G,2GAA2G;IAC3G,0GAA0G;IAC1G,mGAAmG;IACnG,0GAA0G;IAC1G,2GAA2G;IAC3G,0GAA0G;IAC1G,0DAA0D;IAC1D,8GAA8G;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/tools/transport/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACjC,+FAA+F;IAC/F,4GAA4G;IA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"","sources":["../../../../src/tools/transport/network/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,eAAO,MAAM,mBAAmB,gBAAgB,CAAC;AAEjD,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/tools/transport/network/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,eAAO,MAAM,mBAAmB,gBAAgB,CAAC;AAEjD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;CAchC,CAAC;AAEF,eAAO,MAAM,oBAAoB,qEAAgE,CAAC;AAClG,eAAO,MAAM,mBAAmB,0EAAqE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/tools/transport/network/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC;AAEjD,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,KAAK,EAAE,YAAY;IACnB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,6DAA6D,CAAC;AAClG,MAAM,CAAC,MAAM,mBAAmB,GAAG,kEAAkE,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/tools/transport/network/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC;AAEjD,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,KAAK,EAAE,YAAY;IACnB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,YAAY;IACjB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,6DAA6D,CAAC;AAClG,MAAM,CAAC,MAAM,mBAAmB,GAAG,kEAAkE,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function routeNetworkPanel(result:
|
|
1
|
+
import type { PlannedRouteNetworkResult } from '../../../services/route.types.js';
|
|
2
|
+
export declare function routeNetworkPanel(result: PlannedRouteNetworkResult): string;
|
|
3
3
|
//# sourceMappingURL=panel.utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.utils.d.ts","sourceRoot":"","sources":["../../../../src/tools/transport/network/panel.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"panel.utils.d.ts","sourceRoot":"","sources":["../../../../src/tools/transport/network/panel.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAyBlF,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,yBAAyB,GAAG,MAAM,CA8B3E"}
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
import { ROUTE_NETWORK_LABELS, ROUTE_NETWORK_LINKED, ROUTE_NETWORK_SPLIT, ROUTE_NETWORK_TITLE } from './constants.js';
|
|
2
2
|
import { renderPanel } from '../../../utils/panel.utils.js';
|
|
3
|
+
function lotReturnRows(result) {
|
|
4
|
+
const plan = result.request.lotReturn;
|
|
5
|
+
if (plan === null) {
|
|
6
|
+
return [];
|
|
7
|
+
}
|
|
8
|
+
const source = plan.historicalSource;
|
|
9
|
+
return [
|
|
10
|
+
[
|
|
11
|
+
{ label: ROUTE_NETWORK_LABELS.lot, value: `${plan.lotId} (${plan.lotState})` },
|
|
12
|
+
{
|
|
13
|
+
label: ROUTE_NETWORK_LABELS.source,
|
|
14
|
+
value: source === null
|
|
15
|
+
? 'judged on today’s map, exactly like an ordinary plan'
|
|
16
|
+
: `the listed hub of the lot, admitted at reach ${source.radius} and ` +
|
|
17
|
+
`${source.transitFeePerUnit} $CPU per unit whatever stands there now`,
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
];
|
|
21
|
+
}
|
|
3
22
|
export function routeNetworkPanel(result) {
|
|
4
23
|
const labels = ROUTE_NETWORK_LABELS;
|
|
5
24
|
const request = result.request;
|
|
@@ -18,6 +37,7 @@ export function routeNetworkPanel(result) {
|
|
|
18
37
|
{ label: labels.towards, value: request.towards },
|
|
19
38
|
{ label: labels.cargo, value: `${request.amount} of resource ${request.resourceId}` },
|
|
20
39
|
],
|
|
40
|
+
...lotReturnRows(result),
|
|
21
41
|
[{ label: labels.link, value: result.connected ? ROUTE_NETWORK_LINKED : ROUTE_NETWORK_SPLIT }],
|
|
22
42
|
[
|
|
23
43
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.utils.js","sourceRoot":"","sources":["../../../../src/tools/transport/network/panel.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"panel.utils.js","sourceRoot":"","sources":["../../../../src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,wBAAwB,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"route-network.d.ts","sourceRoot":"","sources":["../../../../src/tools/transport/network/route-network.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI,CAuBzF"}
|
|
@@ -8,7 +8,7 @@ export function registerRouteNetworkTool(server, context) {
|
|
|
8
8
|
towards: args.towards,
|
|
9
9
|
resourceId: args.resourceId,
|
|
10
10
|
amount: args.amount,
|
|
11
|
-
});
|
|
11
|
+
}, args.lotId === null ? null : { lotId: args.lotId });
|
|
12
12
|
return {
|
|
13
13
|
content: [
|
|
14
14
|
{ type: 'text', text: routeNetworkPanel(result) },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-network.js","sourceRoot":"","sources":["../../../../src/tools/transport/network/route-network.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,UAAU,wBAAwB,CAAC,MAAqB,EAAE,OAAmB;IAC/E,MAAM,CAAC,YAAY,CACf,mBAAmB,EACnB,EAAE,WAAW,EAAE,yBAAyB,EAAE,WAAW,EAAE,uBAAuB,EAAE,EAChF,KAAK,EAAE,IAAI,EAAE,EAAE;QACX,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"route-network.js","sourceRoot":"","sources":["../../../../src/tools/transport/network/route-network.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,UAAU,wBAAwB,CAAC,MAAqB,EAAE,OAAmB;IAC/E,MAAM,CAAC,YAAY,CACf,mBAAmB,EACnB,EAAE,WAAW,EAAE,yBAAyB,EAAE,WAAW,EAAE,uBAAuB,EAAE,EAChF,KAAK,EAAE,IAAI,EAAE,EAAE;QACX,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,OAAO,CACtC;YACI,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,MAAM,EAAE,IAAI,CAAC,MAAM;SACtB,EACD,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CACrD,CAAC;QAEF,OAAO;YACH,OAAO,EAAE;gBACL,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,EAAE;gBACjD,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE;aACjD;SACJ,CAAC;IACN,CAAC,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next-hops.d.ts","sourceRoot":"","sources":["../../../../src/tools/transport/next-hops/next-hops.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"next-hops.d.ts","sourceRoot":"","sources":["../../../../src/tools/transport/next-hops/next-hops.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AA6DpD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI,CAsBrF"}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { NEXT_HOPS_DESCRIPTION, NEXT_HOPS_SUMMARY_LIMIT } from './constants.js';
|
|
2
2
|
import { nextHopsInputSchema } from '../types.js';
|
|
3
|
+
/** Says out loud why the origin is legal at all — nothing on today's map explains a hop from a razed hub. */
|
|
4
|
+
function returnNote(result) {
|
|
5
|
+
const source = result.lotReturn?.historicalSource ?? null;
|
|
6
|
+
if (source === null) {
|
|
7
|
+
return '';
|
|
8
|
+
}
|
|
9
|
+
return (` This survey plans the way home for lot ${result.lotReturn?.lotId ?? ''}: ${result.from} is its listed ` +
|
|
10
|
+
`hub, admitted from the lot itself with the reach recorded there (${source.radius}), whatever stands ` +
|
|
11
|
+
'there now. Every candidate below is judged on today’s map as usual.');
|
|
12
|
+
}
|
|
3
13
|
function originNote(result) {
|
|
4
14
|
if (result.fromReady !== false) {
|
|
5
15
|
return '';
|
|
@@ -22,7 +32,7 @@ function summarizeHops(result) {
|
|
|
22
32
|
if (result.hops.length === 0) {
|
|
23
33
|
return (`No eligible waypoints within reach of ${result.from} (radius ${result.fromRadius}) — the route ends ` +
|
|
24
34
|
'here.' +
|
|
25
|
-
`${originNote(result)} ` +
|
|
35
|
+
`${returnNote(result)}${originNote(result)} ` +
|
|
26
36
|
'Build a Hub to bridge the gap, use closer cells, or reveal what you own nearby.');
|
|
27
37
|
}
|
|
28
38
|
const towards = result.towards !== null ? ` towards ${result.towards} (${result.targetDistance ?? '?'} steps away)` : '';
|
|
@@ -32,7 +42,7 @@ function summarizeHops(result) {
|
|
|
32
42
|
const rest = hidden > 0 ? ` + ${hidden} more in the JSON payload` : '';
|
|
33
43
|
return (`${result.hops.length} legal next hop(s) from ${result.from} (radius ${result.fromRadius})${towards}: ` +
|
|
34
44
|
`${lines.join('; ')}${rest}.` +
|
|
35
|
-
`${originNote(result)} ${result.note}`);
|
|
45
|
+
`${returnNote(result)}${originNote(result)} ${result.note}`);
|
|
36
46
|
}
|
|
37
47
|
export function registerNextHopsTool(server, context) {
|
|
38
48
|
server.registerTool('cpu_next_hops', { description: NEXT_HOPS_DESCRIPTION, inputSchema: nextHopsInputSchema }, async (args) => {
|
|
@@ -40,7 +50,7 @@ export function registerNextHopsTool(server, context) {
|
|
|
40
50
|
from: args.from,
|
|
41
51
|
towards: args.towards,
|
|
42
52
|
resourceId: args.resourceId,
|
|
43
|
-
});
|
|
53
|
+
}, args.lotId === null ? null : { lotId: args.lotId });
|
|
44
54
|
return {
|
|
45
55
|
content: [
|
|
46
56
|
{ type: 'text', text: summarizeHops(result) },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next-hops.js","sourceRoot":"","sources":["../../../../src/tools/transport/next-hops/next-hops.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"next-hops.js","sourceRoot":"","sources":["../../../../src/tools/transport/next-hops/next-hops.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAKhF,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,6GAA6G;AAC7G,SAAS,UAAU,CAAC,MAA6B;IAC7C,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,gBAAgB,IAAI,IAAI,CAAC;IAC1D,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QAClB,OAAO,EAAE,CAAC;IACd,CAAC;IACD,OAAO,CACH,2CAA2C,MAAM,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE,KAAK,MAAM,CAAC,IAAI,iBAAiB;QACzG,oEAAoE,MAAM,CAAC,MAAM,qBAAqB;Q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AAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CACrD,CAAC;QAEF,OAAO;YACH,OAAO,EAAE;gBACL,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE;gBAC7C,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE;aACjD;SACJ,CAAC;IACN,CAAC,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/tools/transport/quote/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/tools/transport/quote/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,QAc7B,CAAC"}
|
|
@@ -5,9 +5,11 @@ export const QUOTE_TRANSPORT_DESCRIPTION = [
|
|
|
5
5
|
'on-chain view with no side effects. It also validates the chain and names the rejection reason: a hop longer',
|
|
6
6
|
'than radius(from)+radius(to)−1 grid steps, an ineligible waypoint (foreign land past its first completed',
|
|
7
7
|
'reveal carrying no finished Hub — Virgin ground and foreign finished Hubs are passage, not obstacles), or',
|
|
8
|
-
'endpoints that are not your own cells past their first completed reveal
|
|
9
|
-
'
|
|
10
|
-
'
|
|
8
|
+
'endpoints that are not your own cells past their first completed reveal, or a destination with no room once',
|
|
9
|
+
'liquid, reserved and pending production are counted. A successful quote validates route mechanics and',
|
|
10
|
+
'economics at quote time, destination capacity included; it reserves no room and does not promise the later',
|
|
11
|
+
'`cpu_transport` will succeed — ownership, balances, capacity, pauses, allowances and live state can still',
|
|
12
|
+
'change before the send. Plan the chain with',
|
|
11
13
|
'`cpu_route_network` when you have a code runner and with `cpu_next_hops` when you do not; use this before',
|
|
12
14
|
'`cpu_transport`.',
|
|
13
15
|
].join(' ');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/tools/transport/quote/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACvC,8GAA8G;IAC9G,0GAA0G;IAC1G,6GAA6G;IAC7G,8GAA8G;IAC9G,0GAA0G;IAC1G,2GAA2G;IAC3G,6GAA6G;IAC7G,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/tools/transport/quote/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACvC,8GAA8G;IAC9G,0GAA0G;IAC1G,6GAA6G;IAC7G,8GAA8G;IAC9G,0GAA0G;IAC1G,2GAA2G;IAC3G,6GAA6G;IAC7G,uGAAuG;IACvG,4GAA4G;IAC5G,2GAA2G;IAC3G,6CAA6C;IAC7C,2GAA2G;IAC3G,kBAAkB;CACrB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -10,11 +10,13 @@ export declare const routeNetworkInputSchema: {
|
|
|
10
10
|
towards: z.ZodNumber;
|
|
11
11
|
resourceId: z.ZodNumber;
|
|
12
12
|
amount: z.ZodString;
|
|
13
|
+
lotId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
13
14
|
};
|
|
14
15
|
export declare const nextHopsInputSchema: {
|
|
15
16
|
from: z.ZodNumber;
|
|
16
17
|
resourceId: z.ZodNumber;
|
|
17
18
|
towards: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
19
|
+
lotId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
18
20
|
};
|
|
19
21
|
export declare const getTransportStatusInputSchema: {
|
|
20
22
|
deliveryId: z.ZodString;
|