project-cpu-mcp 0.9.0 → 0.10.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 +26 -8
- package/dist/api/types.d.ts +1374 -103
- package/dist/api/types.d.ts.map +1 -1
- package/dist/api/types.js +121 -35
- package/dist/api/types.js.map +1 -1
- package/dist/config/boolean-env.utils.d.ts +2 -0
- package/dist/config/boolean-env.utils.d.ts.map +1 -0
- package/dist/config/boolean-env.utils.js +15 -0
- package/dist/config/boolean-env.utils.js.map +1 -0
- package/dist/config/constants.d.ts +6 -0
- package/dist/config/constants.d.ts.map +1 -1
- package/dist/config/constants.js +6 -0
- package/dist/config/constants.js.map +1 -1
- package/dist/config/env.d.ts.map +1 -1
- package/dist/config/env.js +3 -0
- package/dist/config/env.js.map +1 -1
- package/dist/config/network.types.d.ts +8 -0
- package/dist/config/network.types.d.ts.map +1 -0
- package/dist/config/network.types.js +10 -0
- package/dist/config/network.types.js.map +1 -0
- package/dist/config/types.d.ts +11 -12
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js +4 -11
- package/dist/config/types.js.map +1 -1
- package/dist/contracts/cell.abi.d.ts +48 -0
- package/dist/contracts/cell.abi.d.ts.map +1 -1
- package/dist/contracts/cell.abi.js +14 -0
- package/dist/contracts/cell.abi.js.map +1 -1
- package/dist/contracts/trade.abi.d.ts +5 -0
- package/dist/contracts/trade.abi.d.ts.map +1 -1
- package/dist/contracts/trade.abi.js +1 -0
- package/dist/contracts/trade.abi.js.map +1 -1
- package/dist/contracts/transport.abi.d.ts +10 -0
- package/dist/contracts/transport.abi.d.ts.map +1 -1
- package/dist/contracts/transport.abi.js +2 -0
- package/dist/contracts/transport.abi.js.map +1 -1
- package/dist/geometry/adjacency.data.d.ts +1 -1
- package/dist/geometry/adjacency.data.d.ts.map +1 -1
- package/dist/geometry/adjacency.data.js +115 -193
- package/dist/geometry/adjacency.data.js.map +1 -1
- package/dist/geometry/constants.d.ts +1 -1
- package/dist/geometry/constants.js +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/logger/index.js +2 -1
- package/dist/logger/index.js.map +1 -1
- package/dist/map/attention.utils.d.ts +2 -3
- package/dist/map/attention.utils.d.ts.map +1 -1
- package/dist/map/attention.utils.js +29 -14
- 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 +22 -20
- package/dist/map/cell-view.utils.js.map +1 -1
- package/dist/map/constants.d.ts +0 -1
- package/dist/map/constants.d.ts.map +1 -1
- package/dist/map/constants.js +0 -1
- package/dist/map/constants.js.map +1 -1
- package/dist/map/map.utils.d.ts +8 -3
- package/dist/map/map.utils.d.ts.map +1 -1
- package/dist/map/map.utils.js.map +1 -1
- package/dist/map/process-projection.utils.d.ts +4 -0
- package/dist/map/process-projection.utils.d.ts.map +1 -0
- package/dist/map/process-projection.utils.js +144 -0
- package/dist/map/process-projection.utils.js.map +1 -0
- package/dist/map/reader.d.ts +2 -2
- package/dist/map/reader.d.ts.map +1 -1
- package/dist/map/reader.js +12 -4
- package/dist/map/reader.js.map +1 -1
- package/dist/map/reader.utils.d.ts +4 -4
- package/dist/map/reader.utils.d.ts.map +1 -1
- package/dist/map/reader.utils.js +15 -9
- package/dist/map/reader.utils.js.map +1 -1
- package/dist/map/socket.d.ts.map +1 -1
- package/dist/map/socket.js +1 -0
- package/dist/map/socket.js.map +1 -1
- package/dist/map/storage.utils.d.ts +3 -6
- package/dist/map/storage.utils.d.ts.map +1 -1
- package/dist/map/storage.utils.js +9 -41
- package/dist/map/storage.utils.js.map +1 -1
- package/dist/map/store.d.ts +7 -0
- package/dist/map/store.d.ts.map +1 -1
- package/dist/map/store.js +28 -0
- package/dist/map/store.js.map +1 -1
- package/dist/map/sync.d.ts +4 -0
- package/dist/map/sync.d.ts.map +1 -1
- package/dist/map/sync.js +42 -2
- package/dist/map/sync.js.map +1 -1
- package/dist/map/types.d.ts +123 -28
- package/dist/map/types.d.ts.map +1 -1
- package/dist/map/types.js +3 -1
- package/dist/map/types.js.map +1 -1
- package/dist/server.constants.d.ts +3 -0
- package/dist/server.constants.d.ts.map +1 -0
- package/dist/server.constants.js +24 -0
- package/dist/server.constants.js.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +30 -76
- package/dist/server.js.map +1 -1
- package/dist/services/app-config.service.d.ts.map +1 -1
- package/dist/services/app-config.service.js +3 -48
- package/dist/services/app-config.service.js.map +1 -1
- package/dist/services/app-config.utils.d.ts +2 -12
- package/dist/services/app-config.utils.d.ts.map +1 -1
- package/dist/services/app-config.utils.js +51 -10
- package/dist/services/app-config.utils.js.map +1 -1
- package/dist/services/build.service.d.ts +0 -3
- package/dist/services/build.service.d.ts.map +1 -1
- package/dist/services/build.service.js +15 -35
- package/dist/services/build.service.js.map +1 -1
- package/dist/services/craft-quote.constants.d.ts +2 -0
- package/dist/services/craft-quote.constants.d.ts.map +1 -0
- package/dist/services/craft-quote.constants.js +2 -0
- package/dist/services/craft-quote.constants.js.map +1 -0
- package/dist/services/craft-quote.utils.d.ts +4 -0
- package/dist/services/craft-quote.utils.d.ts.map +1 -0
- package/dist/services/craft-quote.utils.js +12 -0
- package/dist/services/craft-quote.utils.js.map +1 -0
- package/dist/services/craft.service.d.ts +1 -7
- package/dist/services/craft.service.d.ts.map +1 -1
- package/dist/services/craft.service.js +60 -90
- package/dist/services/craft.service.js.map +1 -1
- package/dist/services/mining.service.d.ts +1 -4
- package/dist/services/mining.service.d.ts.map +1 -1
- package/dist/services/mining.service.js +41 -72
- package/dist/services/mining.service.js.map +1 -1
- package/dist/services/mint.constants.d.ts +1 -0
- package/dist/services/mint.constants.d.ts.map +1 -1
- package/dist/services/mint.constants.js +3 -0
- package/dist/services/mint.constants.js.map +1 -1
- package/dist/services/mint.service.d.ts +0 -1
- package/dist/services/mint.service.d.ts.map +1 -1
- package/dist/services/mint.service.js +10 -17
- package/dist/services/mint.service.js.map +1 -1
- package/dist/services/mode-switch.d.ts +9 -0
- package/dist/services/mode-switch.d.ts.map +1 -0
- package/dist/services/mode-switch.js +71 -0
- package/dist/services/mode-switch.js.map +1 -0
- package/dist/services/mode-switch.types.d.ts +60 -0
- package/dist/services/mode-switch.types.d.ts.map +1 -0
- package/dist/services/mode-switch.types.js +6 -0
- package/dist/services/mode-switch.types.js.map +1 -0
- package/dist/services/paid-action.constants.d.ts +3 -0
- package/dist/services/paid-action.constants.d.ts.map +1 -0
- package/dist/services/paid-action.constants.js +11 -0
- package/dist/services/paid-action.constants.js.map +1 -0
- package/dist/services/paid-action.d.ts +3 -0
- package/dist/services/paid-action.d.ts.map +1 -0
- package/dist/services/paid-action.js +23 -0
- package/dist/services/paid-action.js.map +1 -0
- package/dist/services/paid-action.types.d.ts +22 -0
- package/dist/services/paid-action.types.d.ts.map +1 -0
- package/dist/services/paid-action.types.js +11 -0
- package/dist/services/paid-action.types.js.map +1 -0
- package/dist/services/reveal-fulfilment.service.d.ts.map +1 -1
- package/dist/services/reveal-fulfilment.service.js +2 -5
- package/dist/services/reveal-fulfilment.service.js.map +1 -1
- package/dist/services/reveal.service.d.ts.map +1 -1
- package/dist/services/reveal.service.js +5 -9
- package/dist/services/reveal.service.js.map +1 -1
- package/dist/services/route.artifact.d.ts +4 -0
- package/dist/services/route.artifact.d.ts.map +1 -0
- package/dist/services/route.artifact.js +18 -0
- package/dist/services/route.artifact.js.map +1 -0
- package/dist/services/route.constants.d.ts +14 -0
- package/dist/services/route.constants.d.ts.map +1 -1
- package/dist/services/route.constants.js +84 -8
- package/dist/services/route.constants.js.map +1 -1
- package/dist/services/route.service.d.ts +4 -0
- package/dist/services/route.service.d.ts.map +1 -1
- package/dist/services/route.service.js +108 -87
- package/dist/services/route.service.js.map +1 -1
- package/dist/services/route.utils.d.ts +96 -5
- package/dist/services/route.utils.d.ts.map +1 -1
- package/dist/services/route.utils.js +196 -37
- package/dist/services/route.utils.js.map +1 -1
- package/dist/services/swap.service.d.ts +0 -1
- package/dist/services/swap.service.d.ts.map +1 -1
- package/dist/services/swap.service.js +11 -17
- package/dist/services/swap.service.js.map +1 -1
- package/dist/services/syndicate.constants.d.ts +3 -0
- package/dist/services/syndicate.constants.d.ts.map +1 -0
- package/dist/services/syndicate.constants.js +3 -0
- package/dist/services/syndicate.constants.js.map +1 -0
- package/dist/services/syndicate.helpers.d.ts.map +1 -1
- package/dist/services/syndicate.helpers.js +0 -2
- package/dist/services/syndicate.helpers.js.map +1 -1
- package/dist/services/syndicate.service.d.ts +3 -3
- package/dist/services/syndicate.service.d.ts.map +1 -1
- package/dist/services/syndicate.service.js +27 -32
- package/dist/services/syndicate.service.js.map +1 -1
- package/dist/services/trade.service.d.ts +0 -3
- package/dist/services/trade.service.d.ts.map +1 -1
- package/dist/services/trade.service.js +27 -47
- package/dist/services/trade.service.js.map +1 -1
- package/dist/services/transport.service.d.ts +0 -2
- package/dist/services/transport.service.d.ts.map +1 -1
- package/dist/services/transport.service.js +16 -33
- package/dist/services/transport.service.js.map +1 -1
- package/dist/services/types.d.ts +88 -44
- package/dist/services/types.d.ts.map +1 -1
- package/dist/services/types.js.map +1 -1
- package/dist/services/withdraw.service.d.ts +0 -2
- package/dist/services/withdraw.service.d.ts.map +1 -1
- package/dist/services/withdraw.service.js +6 -17
- package/dist/services/withdraw.service.js.map +1 -1
- package/dist/tools/authenticate.d.ts.map +1 -1
- package/dist/tools/authenticate.js +3 -1
- package/dist/tools/authenticate.js.map +1 -1
- package/dist/tools/build/build.d.ts +1 -1
- package/dist/tools/build/build.d.ts.map +1 -1
- package/dist/tools/build/build.js +10 -35
- package/dist/tools/build/build.js.map +1 -1
- package/dist/tools/build/constants.d.ts +36 -0
- package/dist/tools/build/constants.d.ts.map +1 -1
- package/dist/tools/build/constants.js +36 -0
- package/dist/tools/build/constants.js.map +1 -1
- package/dist/tools/build/demolish.d.ts +1 -1
- package/dist/tools/build/demolish.d.ts.map +1 -1
- package/dist/tools/build/demolish.js +5 -1
- package/dist/tools/build/demolish.js.map +1 -1
- package/dist/tools/build/panel.utils.d.ts +4 -0
- package/dist/tools/build/panel.utils.d.ts.map +1 -0
- package/dist/tools/build/panel.utils.js +103 -0
- package/dist/tools/build/panel.utils.js.map +1 -0
- package/dist/tools/build/types.d.ts +9 -0
- package/dist/tools/build/types.d.ts.map +1 -1
- package/dist/tools/build/types.js.map +1 -1
- package/dist/tools/build/upgrade.d.ts +1 -1
- package/dist/tools/build/upgrade.d.ts.map +1 -1
- package/dist/tools/build/upgrade.js +10 -22
- package/dist/tools/build/upgrade.js.map +1 -1
- package/dist/tools/config/building-card/building-card.d.ts +4 -0
- package/dist/tools/config/building-card/building-card.d.ts.map +1 -0
- package/dist/tools/config/building-card/building-card.js +20 -0
- package/dist/tools/config/building-card/building-card.js.map +1 -0
- package/dist/tools/config/building-card/building-card.utils.d.ts +10 -0
- package/dist/tools/config/building-card/building-card.utils.d.ts.map +1 -0
- package/dist/tools/config/building-card/building-card.utils.js +206 -0
- package/dist/tools/config/building-card/building-card.utils.js.map +1 -0
- package/dist/tools/config/building-card/constants.d.ts +39 -0
- package/dist/tools/config/building-card/constants.d.ts.map +1 -0
- package/dist/tools/config/building-card/constants.js +43 -0
- package/dist/tools/config/building-card/constants.js.map +1 -0
- package/dist/tools/config/building-card/types.d.ts +63 -0
- package/dist/tools/config/building-card/types.d.ts.map +1 -0
- package/dist/tools/config/building-card/types.js +8 -0
- package/dist/tools/config/building-card/types.js.map +1 -0
- package/dist/tools/config/find-buildings/constants.d.ts +9 -0
- package/dist/tools/config/find-buildings/constants.d.ts.map +1 -0
- package/dist/tools/config/find-buildings/constants.js +19 -0
- package/dist/tools/config/find-buildings/constants.js.map +1 -0
- package/dist/tools/config/find-buildings/find-buildings.d.ts +4 -0
- package/dist/tools/config/find-buildings/find-buildings.d.ts.map +1 -0
- package/dist/tools/config/find-buildings/find-buildings.js +31 -0
- package/dist/tools/config/find-buildings/find-buildings.js.map +1 -0
- package/dist/tools/config/find-buildings/find-buildings.utils.d.ts +14 -0
- package/dist/tools/config/find-buildings/find-buildings.utils.d.ts.map +1 -0
- package/dist/tools/config/find-buildings/find-buildings.utils.js +85 -0
- package/dist/tools/config/find-buildings/find-buildings.utils.js.map +1 -0
- package/dist/tools/config/find-buildings/types.d.ts +36 -0
- package/dist/tools/config/find-buildings/types.d.ts.map +1 -0
- package/dist/tools/config/find-buildings/types.js +40 -0
- package/dist/tools/config/find-buildings/types.js.map +1 -0
- package/dist/tools/config/get-game-config/constants.d.ts +19 -7
- package/dist/tools/config/get-game-config/constants.d.ts.map +1 -1
- package/dist/tools/config/get-game-config/constants.js +48 -15
- 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 +4 -43
- 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 +9 -5
- 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 +73 -77
- 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 +36 -0
- package/dist/tools/config/get-game-config/types.d.ts.map +1 -0
- package/dist/tools/config/get-game-config/types.js +2 -0
- package/dist/tools/config/get-game-config/types.js.map +1 -0
- package/dist/tools/config/resource-lens/constants.d.ts +24 -0
- package/dist/tools/config/resource-lens/constants.d.ts.map +1 -0
- package/dist/tools/config/resource-lens/constants.js +36 -0
- package/dist/tools/config/resource-lens/constants.js.map +1 -0
- package/dist/tools/config/resource-lens/resource-lens.d.ts +4 -0
- package/dist/tools/config/resource-lens/resource-lens.d.ts.map +1 -0
- package/dist/tools/config/resource-lens/resource-lens.js +16 -0
- package/dist/tools/config/resource-lens/resource-lens.js.map +1 -0
- package/dist/tools/config/resource-lens/resource-lens.utils.d.ts +6 -0
- package/dist/tools/config/resource-lens/resource-lens.utils.d.ts.map +1 -0
- package/dist/tools/config/resource-lens/resource-lens.utils.js +108 -0
- package/dist/tools/config/resource-lens/resource-lens.utils.js.map +1 -0
- package/dist/tools/config/resource-lens/types.d.ts +34 -0
- package/dist/tools/config/resource-lens/types.d.ts.map +1 -0
- package/dist/tools/config/resource-lens/types.js +8 -0
- package/dist/tools/config/resource-lens/types.js.map +1 -0
- package/dist/tools/craft/claim/claim-craft.d.ts +1 -1
- package/dist/tools/craft/claim/claim-craft.d.ts.map +1 -1
- package/dist/tools/craft/claim/claim-craft.js +5 -1
- package/dist/tools/craft/claim/claim-craft.js.map +1 -1
- package/dist/tools/craft/craft.d.ts +1 -1
- package/dist/tools/craft/craft.d.ts.map +1 -1
- package/dist/tools/craft/craft.js +5 -1
- package/dist/tools/craft/craft.js.map +1 -1
- package/dist/tools/map/attention/attention.d.ts.map +1 -1
- package/dist/tools/map/attention/attention.js +12 -6
- package/dist/tools/map/attention/attention.js.map +1 -1
- package/dist/tools/map/attention/constants.d.ts +19 -0
- package/dist/tools/map/attention/constants.d.ts.map +1 -1
- package/dist/tools/map/attention/constants.js +22 -0
- package/dist/tools/map/attention/constants.js.map +1 -1
- package/dist/tools/map/attention/panel.utils.d.ts +3 -0
- package/dist/tools/map/attention/panel.utils.d.ts.map +1 -0
- package/dist/tools/map/attention/panel.utils.js +57 -0
- package/dist/tools/map/attention/panel.utils.js.map +1 -0
- package/dist/tools/map/attention/types.d.ts +12 -1
- 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-cell/constants.d.ts +20 -0
- package/dist/tools/map/get-cell/constants.d.ts.map +1 -1
- package/dist/tools/map/get-cell/constants.js +20 -0
- package/dist/tools/map/get-cell/constants.js.map +1 -1
- package/dist/tools/map/get-cell/demolish.utils.d.ts +1 -1
- package/dist/tools/map/get-cell/demolish.utils.d.ts.map +1 -1
- package/dist/tools/map/get-cell/demolish.utils.js +3 -5
- package/dist/tools/map/get-cell/demolish.utils.js.map +1 -1
- package/dist/tools/map/get-cell/get-cell.d.ts.map +1 -1
- package/dist/tools/map/get-cell/get-cell.js +12 -5
- package/dist/tools/map/get-cell/get-cell.js.map +1 -1
- package/dist/tools/map/get-cell/panel.utils.d.ts +3 -0
- package/dist/tools/map/get-cell/panel.utils.d.ts.map +1 -0
- package/dist/tools/map/get-cell/panel.utils.js +65 -0
- package/dist/tools/map/get-cell/panel.utils.js.map +1 -0
- package/dist/tools/map/get-cell/types.d.ts +9 -0
- package/dist/tools/map/get-cell/types.d.ts.map +1 -1
- package/dist/tools/map/get-cell/types.js.map +1 -1
- package/dist/tools/map/get-changes/constants.d.ts +31 -0
- package/dist/tools/map/get-changes/constants.d.ts.map +1 -1
- package/dist/tools/map/get-changes/constants.js +47 -0
- package/dist/tools/map/get-changes/constants.js.map +1 -1
- package/dist/tools/map/get-changes/get-changes.d.ts.map +1 -1
- package/dist/tools/map/get-changes/get-changes.js +9 -3
- package/dist/tools/map/get-changes/get-changes.js.map +1 -1
- package/dist/tools/map/get-changes/panel.utils.d.ts +3 -0
- package/dist/tools/map/get-changes/panel.utils.d.ts.map +1 -0
- package/dist/tools/map/get-changes/panel.utils.js +46 -0
- package/dist/tools/map/get-changes/panel.utils.js.map +1 -0
- package/dist/tools/map/get-changes/types.d.ts +9 -0
- package/dist/tools/map/get-changes/types.d.ts.map +1 -1
- package/dist/tools/map/get-changes/types.js.map +1 -1
- package/dist/tools/map/get-map/constants.js +1 -1
- package/dist/tools/map/label.utils.d.ts +1 -0
- package/dist/tools/map/label.utils.d.ts.map +1 -1
- package/dist/tools/mining/claim/claim-mining.d.ts +1 -1
- package/dist/tools/mining/claim/claim-mining.d.ts.map +1 -1
- package/dist/tools/mining/claim/claim-mining.js +5 -1
- package/dist/tools/mining/claim/claim-mining.js.map +1 -1
- package/dist/tools/mining/start/start-mining.d.ts +1 -1
- package/dist/tools/mining/start/start-mining.d.ts.map +1 -1
- package/dist/tools/mining/start/start-mining.js +5 -1
- package/dist/tools/mining/start/start-mining.js.map +1 -1
- package/dist/tools/mint/constants.d.ts.map +1 -1
- package/dist/tools/mint/constants.js +10 -9
- package/dist/tools/mint/constants.js.map +1 -1
- package/dist/tools/mint/format.utils.js +4 -4
- package/dist/tools/mint/format.utils.js.map +1 -1
- package/dist/tools/mint/mint-cell.d.ts +1 -1
- package/dist/tools/mint/mint-cell.d.ts.map +1 -1
- package/dist/tools/mint/mint-cell.js +2 -1
- package/dist/tools/mint/mint-cell.js.map +1 -1
- package/dist/tools/persona/constants.d.ts +12 -0
- package/dist/tools/persona/constants.d.ts.map +1 -0
- package/dist/tools/persona/constants.js +144 -0
- package/dist/tools/persona/constants.js.map +1 -0
- package/dist/tools/persona/persona.d.ts +4 -0
- package/dist/tools/persona/persona.d.ts.map +1 -0
- package/dist/tools/persona/persona.gate.d.ts +5 -0
- package/dist/tools/persona/persona.gate.d.ts.map +1 -0
- package/dist/tools/persona/persona.gate.js +21 -0
- package/dist/tools/persona/persona.gate.js.map +1 -0
- package/dist/tools/persona/persona.js +9 -0
- package/dist/tools/persona/persona.js.map +1 -0
- package/dist/tools/persona/persona.utils.d.ts +2 -0
- package/dist/tools/persona/persona.utils.d.ts.map +1 -0
- package/dist/tools/persona/persona.utils.js +17 -0
- package/dist/tools/persona/persona.utils.js.map +1 -0
- package/dist/tools/persona/types.d.ts +14 -0
- package/dist/tools/persona/types.d.ts.map +1 -0
- package/dist/tools/persona/types.js +11 -0
- package/dist/tools/persona/types.js.map +1 -0
- package/dist/tools/reveal/fulfill-reveal.d.ts +1 -1
- package/dist/tools/reveal/fulfill-reveal.d.ts.map +1 -1
- package/dist/tools/reveal/fulfill-reveal.js +11 -1
- package/dist/tools/reveal/fulfill-reveal.js.map +1 -1
- package/dist/tools/reveal/reveal.d.ts +1 -1
- package/dist/tools/reveal/reveal.d.ts.map +1 -1
- package/dist/tools/reveal/reveal.js +11 -1
- package/dist/tools/reveal/reveal.js.map +1 -1
- package/dist/tools/swap/swap.d.ts +1 -1
- package/dist/tools/swap/swap.d.ts.map +1 -1
- package/dist/tools/swap/swap.js +2 -1
- package/dist/tools/swap/swap.js.map +1 -1
- package/dist/tools/syndicate/create/create-syndicate.d.ts.map +1 -1
- package/dist/tools/syndicate/create/create-syndicate.js +6 -9
- package/dist/tools/syndicate/create/create-syndicate.js.map +1 -1
- package/dist/tools/syndicate/format.utils.d.ts.map +1 -1
- package/dist/tools/syndicate/format.utils.js +7 -9
- package/dist/tools/syndicate/format.utils.js.map +1 -1
- package/dist/tools/syndicate/get/constants.d.ts.map +1 -1
- package/dist/tools/syndicate/get/constants.js +3 -2
- package/dist/tools/syndicate/get/constants.js.map +1 -1
- package/dist/tools/syndicate/get/get-syndicate.d.ts.map +1 -1
- package/dist/tools/syndicate/get/get-syndicate.js +6 -9
- package/dist/tools/syndicate/get/get-syndicate.js.map +1 -1
- package/dist/tools/syndicate/join/constants.d.ts.map +1 -1
- package/dist/tools/syndicate/join/constants.js +2 -1
- package/dist/tools/syndicate/join/constants.js.map +1 -1
- package/dist/tools/syndicate/join/join-syndicate.d.ts.map +1 -1
- package/dist/tools/syndicate/join/join-syndicate.js +6 -9
- package/dist/tools/syndicate/join/join-syndicate.js.map +1 -1
- package/dist/tools/syndicate/leave/leave-syndicate.d.ts.map +1 -1
- package/dist/tools/syndicate/leave/leave-syndicate.js +6 -9
- package/dist/tools/syndicate/leave/leave-syndicate.js.map +1 -1
- package/dist/tools/syndicate/list/constants.d.ts.map +1 -1
- package/dist/tools/syndicate/list/constants.js +3 -2
- package/dist/tools/syndicate/list/constants.js.map +1 -1
- package/dist/tools/syndicate/list/list-syndicates.d.ts.map +1 -1
- package/dist/tools/syndicate/list/list-syndicates.js +6 -9
- package/dist/tools/syndicate/list/list-syndicates.js.map +1 -1
- package/dist/tools/syndicate/membership/constants.js +2 -2
- package/dist/tools/syndicate/membership/constants.js.map +1 -1
- package/dist/tools/syndicate/membership/get-membership.d.ts.map +1 -1
- package/dist/tools/syndicate/membership/get-membership.js +6 -9
- package/dist/tools/syndicate/membership/get-membership.js.map +1 -1
- package/dist/tools/syndicate/player-content/constants.d.ts +3 -0
- package/dist/tools/syndicate/player-content/constants.d.ts.map +1 -0
- package/dist/tools/syndicate/player-content/constants.js +13 -0
- package/dist/tools/syndicate/player-content/constants.js.map +1 -0
- package/dist/tools/syndicate/player-content/get-syndicate-player-content.d.ts +4 -0
- package/dist/tools/syndicate/player-content/get-syndicate-player-content.d.ts.map +1 -0
- package/dist/tools/syndicate/player-content/get-syndicate-player-content.js +13 -0
- package/dist/tools/syndicate/player-content/get-syndicate-player-content.js.map +1 -0
- package/dist/tools/syndicate/player-content/presentation.utils.d.ts +21 -0
- package/dist/tools/syndicate/player-content/presentation.utils.d.ts.map +1 -0
- package/dist/tools/syndicate/player-content/presentation.utils.js +22 -0
- package/dist/tools/syndicate/player-content/presentation.utils.js.map +1 -0
- package/dist/tools/syndicate/player-content/types.d.ts +71 -0
- package/dist/tools/syndicate/player-content/types.d.ts.map +1 -0
- package/dist/tools/syndicate/player-content/types.js +30 -0
- package/dist/tools/syndicate/player-content/types.js.map +1 -0
- package/dist/tools/syndicate/presentation.utils.d.ts +8 -0
- package/dist/tools/syndicate/presentation.utils.d.ts.map +1 -0
- package/dist/tools/syndicate/presentation.utils.js +121 -0
- package/dist/tools/syndicate/presentation.utils.js.map +1 -0
- package/dist/tools/syndicate/set-params/constants.d.ts.map +1 -1
- package/dist/tools/syndicate/set-params/constants.js +4 -2
- package/dist/tools/syndicate/set-params/constants.js.map +1 -1
- package/dist/tools/syndicate/set-params/set-syndicate-params.d.ts.map +1 -1
- package/dist/tools/syndicate/set-params/set-syndicate-params.js +6 -9
- package/dist/tools/syndicate/set-params/set-syndicate-params.js.map +1 -1
- package/dist/tools/syndicate/transfer-manager/transfer-syndicate-manager.d.ts.map +1 -1
- package/dist/tools/syndicate/transfer-manager/transfer-syndicate-manager.js +6 -9
- package/dist/tools/syndicate/transfer-manager/transfer-syndicate-manager.js.map +1 -1
- package/dist/tools/syndicate/types.d.ts +36 -0
- package/dist/tools/syndicate/types.d.ts.map +1 -1
- package/dist/tools/syndicate/types.js +11 -0
- package/dist/tools/syndicate/types.js.map +1 -1
- package/dist/tools/trade/buy-lot/buy-lot.d.ts +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 -1
- package/dist/tools/trade/buy-lot/buy-lot.js.map +1 -1
- package/dist/tools/trade/cancel-lot/cancel-lot.d.ts +1 -1
- package/dist/tools/trade/cancel-lot/cancel-lot.d.ts.map +1 -1
- package/dist/tools/trade/cancel-lot/cancel-lot.js +2 -1
- package/dist/tools/trade/cancel-lot/cancel-lot.js.map +1 -1
- package/dist/tools/trade/create-lot/create-lot.d.ts +1 -1
- package/dist/tools/trade/create-lot/create-lot.d.ts.map +1 -1
- package/dist/tools/trade/create-lot/create-lot.js +2 -1
- package/dist/tools/trade/create-lot/create-lot.js.map +1 -1
- package/dist/tools/trade/set-sale-fee/set-sale-fee.d.ts +1 -1
- package/dist/tools/trade/set-sale-fee/set-sale-fee.d.ts.map +1 -1
- package/dist/tools/trade/set-sale-fee/set-sale-fee.js +2 -1
- package/dist/tools/trade/set-sale-fee/set-sale-fee.js.map +1 -1
- package/dist/tools/transport/constants.d.ts.map +1 -1
- package/dist/tools/transport/constants.js +45 -29
- package/dist/tools/transport/constants.js.map +1 -1
- package/dist/tools/transport/finalize/finalize-delivery.d.ts +1 -1
- package/dist/tools/transport/finalize/finalize-delivery.d.ts.map +1 -1
- package/dist/tools/transport/finalize/finalize-delivery.js +2 -1
- package/dist/tools/transport/finalize/finalize-delivery.js.map +1 -1
- package/dist/tools/transport/network/constants.d.ts +16 -0
- package/dist/tools/transport/network/constants.d.ts.map +1 -1
- package/dist/tools/transport/network/constants.js +16 -0
- package/dist/tools/transport/network/constants.js.map +1 -1
- package/dist/tools/transport/network/panel.utils.d.ts +3 -0
- package/dist/tools/transport/network/panel.utils.d.ts.map +1 -0
- package/dist/tools/transport/network/panel.utils.js +32 -0
- package/dist/tools/transport/network/panel.utils.js.map +1 -0
- package/dist/tools/transport/network/route-network.d.ts.map +1 -1
- package/dist/tools/transport/network/route-network.js +3 -20
- package/dist/tools/transport/network/route-network.js.map +1 -1
- package/dist/tools/transport/next-hops/constants.d.ts +1 -0
- package/dist/tools/transport/next-hops/constants.d.ts.map +1 -1
- package/dist/tools/transport/next-hops/constants.js +2 -0
- package/dist/tools/transport/next-hops/constants.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 +20 -9
- 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 +8 -3
- package/dist/tools/transport/quote/constants.js.map +1 -1
- package/dist/tools/transport/transport.d.ts +1 -1
- package/dist/tools/transport/transport.d.ts.map +1 -1
- package/dist/tools/transport/transport.js +2 -1
- package/dist/tools/transport/transport.js.map +1 -1
- package/dist/tools/transport/types.d.ts +3 -2
- package/dist/tools/transport/types.d.ts.map +1 -1
- package/dist/tools/transport/types.js +21 -14
- package/dist/tools/transport/types.js.map +1 -1
- package/dist/tools/types.d.ts +25 -0
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/types.js +26 -1
- package/dist/tools/types.js.map +1 -1
- package/dist/tools/withdraw/withdraw.d.ts +1 -1
- package/dist/tools/withdraw/withdraw.d.ts.map +1 -1
- package/dist/tools/withdraw/withdraw.js +2 -1
- package/dist/tools/withdraw/withdraw.js.map +1 -1
- package/dist/utils/panel.constants.d.ts +18 -0
- package/dist/utils/panel.constants.d.ts.map +1 -0
- package/dist/utils/panel.constants.js +24 -0
- package/dist/utils/panel.constants.js.map +1 -0
- package/dist/utils/panel.types.d.ts +10 -0
- package/dist/utils/panel.types.d.ts.map +1 -0
- package/dist/utils/panel.types.js +2 -0
- package/dist/utils/panel.types.js.map +1 -0
- package/dist/utils/panel.utils.d.ts +4 -0
- package/dist/utils/panel.utils.d.ts.map +1 -0
- package/dist/utils/panel.utils.js +117 -0
- package/dist/utils/panel.utils.js.map +1 -0
- package/dist/utils/safe-json.constants.d.ts +2 -0
- package/dist/utils/safe-json.constants.d.ts.map +1 -0
- package/dist/utils/safe-json.constants.js +20 -0
- package/dist/utils/safe-json.constants.js.map +1 -0
- package/dist/utils/safe-json.utils.d.ts +3 -0
- package/dist/utils/safe-json.utils.d.ts.map +1 -0
- package/dist/utils/safe-json.utils.js +44 -0
- package/dist/utils/safe-json.utils.js.map +1 -0
- package/dist/version/tool-guard.d.ts +1 -1
- package/dist/version/tool-guard.d.ts.map +1 -1
- package/dist/version/tool-guard.js +3 -3
- package/dist/version/tool-guard.js.map +1 -1
- package/dist/version/types.d.ts +1 -1
- package/dist/version/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/map/process.utils.d.ts +0 -32
- package/dist/map/process.utils.d.ts.map +0 -1
- package/dist/map/process.utils.js +0 -30
- package/dist/map/process.utils.js.map +0 -1
- package/dist/map/settle.utils.d.ts +0 -20
- package/dist/map/settle.utils.d.ts.map +0 -1
- package/dist/map/settle.utils.js +0 -77
- package/dist/map/settle.utils.js.map +0 -1
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { parseEther } from 'viem';
|
|
2
|
+
import { BUILD_INPUTS_LABEL, BUILD_TIME_LABEL, CARD_INDENT, CONSTRUCTION_SECTION_TITLE, COST_LABEL, CYCLE_TIME_LABEL, DEMOLISH_LABEL, EXAMPLE_TYPE_COUNT, EXTRACTION_SHARE_LABEL, EXTRACTOR_NO_INPUT_RESOURCES_NOTE, FREE_CYCLE_VALUE, HUB_OPERATION_NOTE, HUB_ROLE_SUMMARY, LIFECYCLE_SECTION_TITLE, MINABLE_RESOURCES_LABEL, MODE_SWITCH_IMPOSSIBLE_NOTE, MODE_SWITCH_LABEL, MODE_SWITCH_UNKNOWN_NOTE, NO_BUILD_INPUTS_VALUE, NO_MINABLE_RESOURCES_NOTE, NO_UPGRADE_PREDECESSOR_VALUE, NO_UPGRADE_SUCCESSOR_VALUE, NOTHING_MINED_SUMMARY, OPERATION_SECTION_TITLE, RECIPE_DETAILS_MISSING_NOTE, RECIPE_INPUT_EFFICIENCY_LABEL, RECIPE_INPUTS_LABEL, RECIPE_OUTPUTS_LABEL, RECIPE_PLAN_INDENT, RECIPES_ONLY_SUMMARY, UNKNOWN_BUILDING_TYPE_HINT, UNPRICED_OPEX_NOTE, UPGRADE_FROM_LABEL, UPGRADE_TO_LABEL, } from './constants.js';
|
|
3
|
+
import { BuildingKind } from '../../../api/types.js';
|
|
4
|
+
import { ModeSwitchKind } from '../../../services/types.js';
|
|
5
|
+
import { bpToPercent, cpuFromWei, resourceLabel, resourceName, } from '../../../utils/format.utils.js';
|
|
6
|
+
function sumCpu(base, opex) {
|
|
7
|
+
return cpuFromWei((parseEther(base) + parseEther(opex)).toString());
|
|
8
|
+
}
|
|
9
|
+
function isZeroCpu(amount) {
|
|
10
|
+
return parseEther(amount) === 0n;
|
|
11
|
+
}
|
|
12
|
+
function normalizeType(type) {
|
|
13
|
+
return type.trim().toLowerCase();
|
|
14
|
+
}
|
|
15
|
+
export function findBuilding(buildings, type) {
|
|
16
|
+
const wanted = normalizeType(type);
|
|
17
|
+
return buildings.find((building) => normalizeType(building.type) === wanted) ?? null;
|
|
18
|
+
}
|
|
19
|
+
export function unknownBuildingTypeError(buildings, type) {
|
|
20
|
+
const examples = buildings
|
|
21
|
+
.slice(0, EXAMPLE_TYPE_COUNT)
|
|
22
|
+
.map((building) => building.type)
|
|
23
|
+
.join(', ');
|
|
24
|
+
const known = examples === '' ? '' : ` Catalog types look like: ${examples}.`;
|
|
25
|
+
return new Error(`No building of type "${type}" in the catalog of the loaded config.${known} ` +
|
|
26
|
+
`${UNKNOWN_BUILDING_TYPE_HINT}.`);
|
|
27
|
+
}
|
|
28
|
+
function labelStacks(stacks, resources) {
|
|
29
|
+
return stacks.map((stack) => ({
|
|
30
|
+
resourceId: stack.resourceId,
|
|
31
|
+
resourceName: resourceName(resources, stack.resourceId),
|
|
32
|
+
amount: stack.amount,
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
function labelResources(ids, resources) {
|
|
36
|
+
return ids.map((resourceId) => ({ resourceId, resourceName: resourceName(resources, resourceId) }));
|
|
37
|
+
}
|
|
38
|
+
function recipePlan(id, building, recipes, resources) {
|
|
39
|
+
const recipe = recipes.find((candidate) => candidate.id === id) ?? null;
|
|
40
|
+
const costCpu = recipe?.costCpu ?? null;
|
|
41
|
+
const opexCpu = building.recipeOpexCpu?.[id] ?? null;
|
|
42
|
+
return {
|
|
43
|
+
id,
|
|
44
|
+
name: recipe?.name ?? null,
|
|
45
|
+
durationSec: recipe?.durationSec ?? null,
|
|
46
|
+
costCpu,
|
|
47
|
+
opexCpu,
|
|
48
|
+
totalCpu: costCpu === null || opexCpu === null ? null : sumCpu(costCpu, opexCpu),
|
|
49
|
+
recipeInputs: recipe === null ? [] : labelStacks(recipe.inputs, resources),
|
|
50
|
+
recipeOutputs: recipe === null ? [] : labelStacks(recipe.outputs, resources),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export function summarizeBuildingRole(building, recipes, resources) {
|
|
54
|
+
if (building.kind === BuildingKind.Hub) {
|
|
55
|
+
return HUB_ROLE_SUMMARY;
|
|
56
|
+
}
|
|
57
|
+
if (building.kind === BuildingKind.Extractor) {
|
|
58
|
+
const mined = building.minableResources.map((id) => resourceName(resources, id)).join(', ');
|
|
59
|
+
return mined === '' ? NOTHING_MINED_SUMMARY : `mines ${mined}`;
|
|
60
|
+
}
|
|
61
|
+
const produced = [
|
|
62
|
+
...new Set(building.recipes.flatMap((id) => (recipes.find((recipe) => recipe.id === id)?.outputs ?? []).map((stack) => resourceName(resources, stack.resourceId)))),
|
|
63
|
+
].join(', ');
|
|
64
|
+
return produced === ''
|
|
65
|
+
? `${RECIPES_ONLY_SUMMARY.verb} ${building.recipes.length} ${RECIPES_ONLY_SUMMARY.unit}`
|
|
66
|
+
: `crafts ${produced}`;
|
|
67
|
+
}
|
|
68
|
+
export function buildBuildingCard(building, recipes, resources) {
|
|
69
|
+
return {
|
|
70
|
+
type: building.type,
|
|
71
|
+
name: building.name,
|
|
72
|
+
kind: building.kind,
|
|
73
|
+
tier: building.tier,
|
|
74
|
+
summary: summarizeBuildingRole(building, recipes, resources),
|
|
75
|
+
construction: {
|
|
76
|
+
costCpu: building.buildCost,
|
|
77
|
+
buildTimeSec: building.buildTimeSec,
|
|
78
|
+
buildInputs: labelStacks(building.buildInputs, resources),
|
|
79
|
+
},
|
|
80
|
+
operation: {
|
|
81
|
+
kind: building.kind,
|
|
82
|
+
recipes: building.recipes.map((id) => recipePlan(id, building, recipes, resources)),
|
|
83
|
+
minableResources: labelResources(building.minableResources, resources),
|
|
84
|
+
consumesRecipeInputs: building.kind === BuildingKind.Crafter,
|
|
85
|
+
effects: {
|
|
86
|
+
cycleTimePercent: bpToPercent(building.effects.cycleTimeBp),
|
|
87
|
+
extractionSharePercent: bpToPercent(building.effects.extractionShareBp),
|
|
88
|
+
recipeInputEfficiency: building.effects.inputEfficiency.map((entry) => ({
|
|
89
|
+
resourceId: entry.resourceId,
|
|
90
|
+
resourceName: resourceName(resources, entry.resourceId),
|
|
91
|
+
percent: entry.percent,
|
|
92
|
+
})),
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
lifecycle: {
|
|
96
|
+
demolish: {
|
|
97
|
+
costCpu: building.demolishCost.cpu,
|
|
98
|
+
inputs: labelStacks(building.demolishCost.inputs, resources),
|
|
99
|
+
},
|
|
100
|
+
modeSwitch: building.modeSwitch,
|
|
101
|
+
upgradeFrom: building.upgradeFrom,
|
|
102
|
+
upgradeTo: building.upgradeTo,
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function stackList(stacks, resources) {
|
|
107
|
+
return stacks.map((stack) => `${stack.amount} ${resourceLabel(resources, stack.resourceId)}`).join(', ');
|
|
108
|
+
}
|
|
109
|
+
function resourceList(entries, resources) {
|
|
110
|
+
return entries.map((entry) => resourceLabel(resources, entry.resourceId)).join(', ');
|
|
111
|
+
}
|
|
112
|
+
function line(label, value, indent = CARD_INDENT) {
|
|
113
|
+
return `${indent}${label}: ${value}`;
|
|
114
|
+
}
|
|
115
|
+
function constructionLines(card, resources) {
|
|
116
|
+
const inputs = card.construction.buildInputs;
|
|
117
|
+
return [
|
|
118
|
+
line(COST_LABEL, `${card.construction.costCpu} $CPU`),
|
|
119
|
+
line(BUILD_TIME_LABEL, `${card.construction.buildTimeSec}s`),
|
|
120
|
+
line(BUILD_INPUTS_LABEL, inputs.length === 0 ? NO_BUILD_INPUTS_VALUE : `${stackList(inputs, resources)}, burned once`),
|
|
121
|
+
];
|
|
122
|
+
}
|
|
123
|
+
function cycleCost(plan) {
|
|
124
|
+
if (plan.costCpu === null) {
|
|
125
|
+
return RECIPE_DETAILS_MISSING_NOTE;
|
|
126
|
+
}
|
|
127
|
+
if (plan.opexCpu === null) {
|
|
128
|
+
return `${plan.costCpu} $CPU base, ${UNPRICED_OPEX_NOTE}`;
|
|
129
|
+
}
|
|
130
|
+
if (isZeroCpu(plan.opexCpu)) {
|
|
131
|
+
return isZeroCpu(plan.costCpu) ? FREE_CYCLE_VALUE : `${plan.costCpu} $CPU/cycle`;
|
|
132
|
+
}
|
|
133
|
+
return `${plan.costCpu} $CPU base + ${plan.opexCpu} $CPU opex = ${plan.totalCpu} $CPU/cycle`;
|
|
134
|
+
}
|
|
135
|
+
function recipeLines(plan, resources) {
|
|
136
|
+
const name = plan.name === null ? '' : ` (${plan.name})`;
|
|
137
|
+
const terms = plan.durationSec === null ? RECIPE_DETAILS_MISSING_NOTE : `${plan.durationSec}s/cycle, ${cycleCost(plan)}`;
|
|
138
|
+
return [
|
|
139
|
+
`${CARD_INDENT}${plan.id}${name} — ${terms}`,
|
|
140
|
+
line(RECIPE_INPUTS_LABEL, stackList(plan.recipeInputs, resources), RECIPE_PLAN_INDENT),
|
|
141
|
+
line(RECIPE_OUTPUTS_LABEL, stackList(plan.recipeOutputs, resources), RECIPE_PLAN_INDENT),
|
|
142
|
+
].filter((text) => !text.endsWith(': '));
|
|
143
|
+
}
|
|
144
|
+
function effectLines(card, resources) {
|
|
145
|
+
const { effects } = card.operation;
|
|
146
|
+
const lines = [line(CYCLE_TIME_LABEL, `${effects.cycleTimePercent}% of the base cycle`)];
|
|
147
|
+
if (card.kind === BuildingKind.Extractor) {
|
|
148
|
+
lines.push(line(EXTRACTION_SHARE_LABEL, `${effects.extractionSharePercent}% of the take credited to the warehouse`));
|
|
149
|
+
}
|
|
150
|
+
if (effects.recipeInputEfficiency.length > 0) {
|
|
151
|
+
const efficiency = effects.recipeInputEfficiency
|
|
152
|
+
.map((entry) => `${resourceLabel(resources, entry.resourceId)} ${entry.percent}%`)
|
|
153
|
+
.join(', ');
|
|
154
|
+
lines.push(line(RECIPE_INPUT_EFFICIENCY_LABEL, efficiency));
|
|
155
|
+
}
|
|
156
|
+
return lines;
|
|
157
|
+
}
|
|
158
|
+
function operationLines(card, resources) {
|
|
159
|
+
const { minableResources, recipes } = card.operation;
|
|
160
|
+
if (card.kind === BuildingKind.Hub) {
|
|
161
|
+
return [`${CARD_INDENT}${HUB_OPERATION_NOTE}`];
|
|
162
|
+
}
|
|
163
|
+
if (card.kind === BuildingKind.Extractor) {
|
|
164
|
+
return [
|
|
165
|
+
line(MINABLE_RESOURCES_LABEL, minableResources.length === 0 ? NO_MINABLE_RESOURCES_NOTE : resourceList(minableResources, resources)),
|
|
166
|
+
`${CARD_INDENT}${EXTRACTOR_NO_INPUT_RESOURCES_NOTE}`,
|
|
167
|
+
...effectLines(card, resources),
|
|
168
|
+
];
|
|
169
|
+
}
|
|
170
|
+
return [...recipes.flatMap((plan) => recipeLines(plan, resources)), ...effectLines(card, resources)];
|
|
171
|
+
}
|
|
172
|
+
function modeSwitchValue(card) {
|
|
173
|
+
switch (card.lifecycle.modeSwitch.kind) {
|
|
174
|
+
case ModeSwitchKind.Possible:
|
|
175
|
+
return `${card.lifecycle.modeSwitch.costCpu} $CPU to re-point it at another output`;
|
|
176
|
+
case ModeSwitchKind.Impossible:
|
|
177
|
+
return MODE_SWITCH_IMPOSSIBLE_NOTE;
|
|
178
|
+
case ModeSwitchKind.Unknown:
|
|
179
|
+
return MODE_SWITCH_UNKNOWN_NOTE;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
function lifecycleLines(card, resources) {
|
|
183
|
+
const { demolish, upgradeFrom, upgradeTo } = card.lifecycle;
|
|
184
|
+
const fromWarehouse = demolish.inputs.length === 0 ? '' : ` + ${stackList(demolish.inputs, resources)}`;
|
|
185
|
+
return [
|
|
186
|
+
line(DEMOLISH_LABEL, `${demolish.costCpu} $CPU${fromWarehouse}, no refund`),
|
|
187
|
+
line(MODE_SWITCH_LABEL, modeSwitchValue(card)),
|
|
188
|
+
line(UPGRADE_FROM_LABEL, upgradeFrom ?? NO_UPGRADE_PREDECESSOR_VALUE),
|
|
189
|
+
line(UPGRADE_TO_LABEL, upgradeTo.length === 0 ? NO_UPGRADE_SUCCESSOR_VALUE : upgradeTo.join(', ')),
|
|
190
|
+
];
|
|
191
|
+
}
|
|
192
|
+
export function renderBuildingCard(card, resources) {
|
|
193
|
+
return [
|
|
194
|
+
`${card.name} (${card.type}) — ${card.kind}, tier ${card.tier}; ${card.summary}.`,
|
|
195
|
+
'',
|
|
196
|
+
CONSTRUCTION_SECTION_TITLE,
|
|
197
|
+
...constructionLines(card, resources),
|
|
198
|
+
'',
|
|
199
|
+
OPERATION_SECTION_TITLE,
|
|
200
|
+
...operationLines(card, resources),
|
|
201
|
+
'',
|
|
202
|
+
LIFECYCLE_SECTION_TITLE,
|
|
203
|
+
...lifecycleLines(card, resources),
|
|
204
|
+
].join('\n');
|
|
205
|
+
}
|
|
206
|
+
//# sourceMappingURL=building-card.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"building-card.utils.js","sourceRoot":"","sources":["../../../../src/tools/config/building-card/building-card.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,OAAO,EACH,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACX,0BAA0B,EAC1B,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,iCAAiC,EACjC,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,EAC3B,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,yBAAyB,EACzB,4BAA4B,EAC5B,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,EACvB,2BAA2B,EAC3B,6BAA6B,EAC7B,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,0BAA0B,EAC1B,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,GACnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,YAAY,EAAwC,MAAM,uBAAuB,CAAC;AAC3F,OAAO,EAA4B,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACtF,OAAO,EACH,WAAW,EACX,UAAU,EACV,aAAa,EACb,YAAY,GAEf,MAAM,gCAAgC,CAAC;AAExC,SAAS,MAAM,CAAC,IAAY,EAAE,IAAY;IACtC,OAAO,UAAU,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AACxE,CAAC;AAED,SAAS,SAAS,CAAC,MAAc;IAC7B,OAAO,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;AACrC,CAAC;AAED,SAAS,aAAa,CAAC,IAAY;IAC/B,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,YAAY,CA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,IAAsB,EAAE,SAAwB;IAC/E,OAAO;QACH,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC,IAAI,UAAU,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,GAAG;QACjF,EAAE;QACF,0BAA0B;QAC1B,GAAG,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC;QACrC,EAAE;QACF,uBAAuB;QACvB,GAAG,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC;QAClC,EAAE;QACF,uBAAuB;QACvB,GAAG,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC;KACrC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare const GET_BUILDING_DESCRIPTION: string;
|
|
2
|
+
export declare const CONSTRUCTION_SECTION_TITLE = "Construction";
|
|
3
|
+
export declare const OPERATION_SECTION_TITLE = "Operation";
|
|
4
|
+
export declare const LIFECYCLE_SECTION_TITLE = "Lifecycle";
|
|
5
|
+
export declare const BUILD_INPUTS_LABEL = "Build inputs";
|
|
6
|
+
export declare const RECIPE_INPUTS_LABEL = "Recipe inputs";
|
|
7
|
+
export declare const RECIPE_OUTPUTS_LABEL = "Recipe outputs";
|
|
8
|
+
export declare const MINABLE_RESOURCES_LABEL = "Minable resources";
|
|
9
|
+
export declare const NO_BUILD_INPUTS_VALUE = "none, $CPU only";
|
|
10
|
+
export declare const EXTRACTOR_NO_INPUT_RESOURCES_NOTE = "No input resources: an extractor draws from the deposit of the cell it stands on and consumes nothing to run.";
|
|
11
|
+
export declare const HUB_OPERATION_NOTE = "Produces nothing: a hub routes transport and settles trade on its cell, and charges transit and sale fees.";
|
|
12
|
+
export declare const NO_MINABLE_RESOURCES_NOTE = "Nothing to mine: this building draws from no deposit.";
|
|
13
|
+
export declare const RECIPE_DETAILS_MISSING_NOTE = "details absent from the loaded config; read cpu_list_recipes";
|
|
14
|
+
export declare const UNPRICED_OPEX_NOTE = "plus a per-recipe opex the chain adds on top (not priced here)";
|
|
15
|
+
export declare const FREE_CYCLE_VALUE = "free";
|
|
16
|
+
export declare const MODE_SWITCH_IMPOSSIBLE_NOTE = "cannot switch \u2014 one output or none, so it can never be re-pointed";
|
|
17
|
+
export declare const MODE_SWITCH_UNKNOWN_NOTE = "unknown \u2014 this config predates the price; cpu_get_cell prices it per cell";
|
|
18
|
+
export declare const NO_UPGRADE_PREDECESSOR_VALUE = "none (base building)";
|
|
19
|
+
export declare const NO_UPGRADE_SUCCESSOR_VALUE = "none (terminal)";
|
|
20
|
+
export declare const UNKNOWN_BUILDING_TYPE_HINT = "cpu_get_game_config lists every catalog type";
|
|
21
|
+
export declare const CARD_INDENT = " ";
|
|
22
|
+
export declare const RECIPE_PLAN_INDENT = " ";
|
|
23
|
+
export declare const EXAMPLE_TYPE_COUNT = 3;
|
|
24
|
+
export declare const HUB_ROLE_SUMMARY = "routes transport and settles trade on its cell";
|
|
25
|
+
export declare const NOTHING_MINED_SUMMARY = "mines nothing";
|
|
26
|
+
export declare const RECIPES_ONLY_SUMMARY: {
|
|
27
|
+
verb: string;
|
|
28
|
+
unit: string;
|
|
29
|
+
};
|
|
30
|
+
export declare const COST_LABEL = "Cost";
|
|
31
|
+
export declare const BUILD_TIME_LABEL = "Build time";
|
|
32
|
+
export declare const CYCLE_TIME_LABEL = "Cycle time";
|
|
33
|
+
export declare const EXTRACTION_SHARE_LABEL = "Extraction share";
|
|
34
|
+
export declare const RECIPE_INPUT_EFFICIENCY_LABEL = "Recipe input efficiency";
|
|
35
|
+
export declare const DEMOLISH_LABEL = "Demolish";
|
|
36
|
+
export declare const MODE_SWITCH_LABEL = "Mode switch";
|
|
37
|
+
export declare const UPGRADE_FROM_LABEL = "Upgrades from";
|
|
38
|
+
export declare const UPGRADE_TO_LABEL = "Upgrades to";
|
|
39
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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eAAO,MAAM,gBAAgB,eAAe,CAAC;AAE7C,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AAEzD,eAAO,MAAM,6BAA6B,4BAA4B,CAAC;AAEvE,eAAO,MAAM,cAAc,aAAa,CAAC;AAEzC,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAE/C,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;AAElD,eAAO,MAAM,gBAAgB,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export const GET_BUILDING_DESCRIPTION = [
|
|
2
|
+
'One building of the catalog as a card. Input is the catalog `type` (as `cpu_get_game_config` lists it).',
|
|
3
|
+
'Three plans, never mixed: CONSTRUCTION — $CPU cost, build time, build inputs burned once to erect it;',
|
|
4
|
+
'OPERATION — a crafter: every recipe it runs (inputs → outputs, cycle duration, $CPU per cycle); an',
|
|
5
|
+
'extractor: the minable resources it draws from the cell deposit (it consumes no inputs); a hub: what it',
|
|
6
|
+
'routes; LIFECYCLE — demolish cost, mode switching, upgrade links both ways. Build inputs are spent once',
|
|
7
|
+
'at construction; recipe inputs on every cycle. Read-only. No session needed.',
|
|
8
|
+
].join(' ');
|
|
9
|
+
export const CONSTRUCTION_SECTION_TITLE = 'Construction';
|
|
10
|
+
export const OPERATION_SECTION_TITLE = 'Operation';
|
|
11
|
+
export const LIFECYCLE_SECTION_TITLE = 'Lifecycle';
|
|
12
|
+
export const BUILD_INPUTS_LABEL = 'Build inputs';
|
|
13
|
+
export const RECIPE_INPUTS_LABEL = 'Recipe inputs';
|
|
14
|
+
export const RECIPE_OUTPUTS_LABEL = 'Recipe outputs';
|
|
15
|
+
export const MINABLE_RESOURCES_LABEL = 'Minable resources';
|
|
16
|
+
export const NO_BUILD_INPUTS_VALUE = 'none, $CPU only';
|
|
17
|
+
export const EXTRACTOR_NO_INPUT_RESOURCES_NOTE = 'No input resources: an extractor draws from the deposit of the cell it stands on and consumes nothing to run.';
|
|
18
|
+
export const HUB_OPERATION_NOTE = 'Produces nothing: a hub routes transport and settles trade on its cell, and charges transit and sale fees.';
|
|
19
|
+
export const NO_MINABLE_RESOURCES_NOTE = 'Nothing to mine: this building draws from no deposit.';
|
|
20
|
+
export const RECIPE_DETAILS_MISSING_NOTE = 'details absent from the loaded config; read cpu_list_recipes';
|
|
21
|
+
export const UNPRICED_OPEX_NOTE = 'plus a per-recipe opex the chain adds on top (not priced here)';
|
|
22
|
+
export const FREE_CYCLE_VALUE = 'free';
|
|
23
|
+
export const MODE_SWITCH_IMPOSSIBLE_NOTE = 'cannot switch — one output or none, so it can never be re-pointed';
|
|
24
|
+
export const MODE_SWITCH_UNKNOWN_NOTE = 'unknown — this config predates the price; cpu_get_cell prices it per cell';
|
|
25
|
+
export const NO_UPGRADE_PREDECESSOR_VALUE = 'none (base building)';
|
|
26
|
+
export const NO_UPGRADE_SUCCESSOR_VALUE = 'none (terminal)';
|
|
27
|
+
export const UNKNOWN_BUILDING_TYPE_HINT = 'cpu_get_game_config lists every catalog type';
|
|
28
|
+
export const CARD_INDENT = ' ';
|
|
29
|
+
export const RECIPE_PLAN_INDENT = ' ';
|
|
30
|
+
export const EXAMPLE_TYPE_COUNT = 3;
|
|
31
|
+
export const HUB_ROLE_SUMMARY = 'routes transport and settles trade on its cell';
|
|
32
|
+
export const NOTHING_MINED_SUMMARY = 'mines nothing';
|
|
33
|
+
export const RECIPES_ONLY_SUMMARY = { verb: 'runs', unit: 'recipe(s)' };
|
|
34
|
+
export const COST_LABEL = 'Cost';
|
|
35
|
+
export const BUILD_TIME_LABEL = 'Build time';
|
|
36
|
+
export const CYCLE_TIME_LABEL = 'Cycle time';
|
|
37
|
+
export const EXTRACTION_SHARE_LABEL = 'Extraction share';
|
|
38
|
+
export const RECIPE_INPUT_EFFICIENCY_LABEL = 'Recipe input efficiency';
|
|
39
|
+
export const DEMOLISH_LABEL = 'Demolish';
|
|
40
|
+
export const MODE_SWITCH_LABEL = 'Mode switch';
|
|
41
|
+
export const UPGRADE_FROM_LABEL = 'Upgrades from';
|
|
42
|
+
export const UPGRADE_TO_LABEL = 'Upgrades to';
|
|
43
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/tools/config/building-card/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACpC,yGAAyG;IACzG,uGAAuG;IACvG,oGAAoG;IACpG,yGAAyG;IACzG,yGAAyG;IACzG,8EAA8E;CACjF,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,0BAA0B,GAAG,cAAc,CAAC;AAEzD,MAAM,CAAC,MAAM,uBAAuB,GAAG,WAAW,CAAC;AAEnD,MAAM,CAAC,MAAM,uBAAuB,GAAG,WAAW,CAAC;AAEnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAEjD,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAEnD,MAAM,CAAC,MAAM,oBAAoB,GAAG,gBAAgB,CAAC;AAErD,MAAM,CAAC,MAAM,uBAAuB,GAAG,mBAAmB,CAAC;AAE3D,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AAEvD,MAAM,CAAC,MAAM,iCAAiC,GAC1C,+GAA+G,CAAC;AAEpH,MAAM,CAAC,MAAM,kBAAkB,GAC3B,4GAA4G,CAAC;AAEjH,MAAM,CAAC,MAAM,yBAAyB,GAAG,uDAAuD,CAAC;AAEjG,MAAM,CAAC,MAAM,2BAA2B,GAAG,8DAA8D,CAAC;AAE1G,MAAM,CAAC,MAAM,kBAAkB,GAAG,gEAAgE,CAAC;AAEnG,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEvC,MAAM,CAAC,MAAM,2BAA2B,GAAG,mEAAmE,CAAC;AAE/G,MAAM,CAAC,MAAM,wBAAwB,GAAG,2EAA2E,CAAC;AAEpH,MAAM,CAAC,MAAM,4BAA4B,GAAG,sBAAsB,CAAC;AAEnE,MAAM,CAAC,MAAM,0BAA0B,GAAG,iBAAiB,CAAC;AAE5D,MAAM,CAAC,MAAM,0BAA0B,GAAG,8CAA8C,CAAC;AAEzF,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC;AAEhC,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAEzC,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAEpC,MAAM,CAAC,MAAM,gBAAgB,GAAG,gDAAgD,CAAC;AAEjF,MAAM,CAAC,MAAM,qBAAqB,GAAG,eAAe,CAAC;AAErD,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;AAExE,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC;AAEjC,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAE7C,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAE7C,MAAM,CAAC,MAAM,sBAAsB,GAAG,kBAAkB,CAAC;AAEzD,MAAM,CAAC,MAAM,6BAA6B,GAAG,yBAAyB,CAAC;AAEvE,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;AAEzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAE/C,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAElD,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { BuildingKind } from '../../../api/types.js';
|
|
3
|
+
import type { ModeSwitchView } from '../../../services/types.js';
|
|
4
|
+
export declare const getBuildingInputSchema: {
|
|
5
|
+
buildingType: z.ZodString;
|
|
6
|
+
};
|
|
7
|
+
export interface LabeledResourceView {
|
|
8
|
+
resourceId: number;
|
|
9
|
+
resourceName: string;
|
|
10
|
+
}
|
|
11
|
+
export interface LabeledStackView extends LabeledResourceView {
|
|
12
|
+
amount: number;
|
|
13
|
+
}
|
|
14
|
+
export interface BuildingConstructionView {
|
|
15
|
+
costCpu: string;
|
|
16
|
+
buildTimeSec: number;
|
|
17
|
+
buildInputs: Array<LabeledStackView>;
|
|
18
|
+
}
|
|
19
|
+
export interface BuildingRecipePlanView {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string | null;
|
|
22
|
+
durationSec: number | null;
|
|
23
|
+
costCpu: string | null;
|
|
24
|
+
opexCpu: string | null;
|
|
25
|
+
totalCpu: string | null;
|
|
26
|
+
recipeInputs: Array<LabeledStackView>;
|
|
27
|
+
recipeOutputs: Array<LabeledStackView>;
|
|
28
|
+
}
|
|
29
|
+
export interface BuildingEffectsCardView {
|
|
30
|
+
cycleTimePercent: number;
|
|
31
|
+
extractionSharePercent: number;
|
|
32
|
+
recipeInputEfficiency: Array<LabeledResourceView & {
|
|
33
|
+
percent: number;
|
|
34
|
+
}>;
|
|
35
|
+
}
|
|
36
|
+
export interface BuildingOperationView {
|
|
37
|
+
kind: BuildingKind;
|
|
38
|
+
recipes: Array<BuildingRecipePlanView>;
|
|
39
|
+
minableResources: Array<LabeledResourceView>;
|
|
40
|
+
consumesRecipeInputs: boolean;
|
|
41
|
+
effects: BuildingEffectsCardView;
|
|
42
|
+
}
|
|
43
|
+
export interface BuildingDemolishView {
|
|
44
|
+
costCpu: string;
|
|
45
|
+
inputs: Array<LabeledStackView>;
|
|
46
|
+
}
|
|
47
|
+
export interface BuildingLifecycleView {
|
|
48
|
+
demolish: BuildingDemolishView;
|
|
49
|
+
modeSwitch: ModeSwitchView;
|
|
50
|
+
upgradeFrom: string | null;
|
|
51
|
+
upgradeTo: Array<string>;
|
|
52
|
+
}
|
|
53
|
+
export interface BuildingCardView {
|
|
54
|
+
type: string;
|
|
55
|
+
name: string;
|
|
56
|
+
kind: BuildingKind;
|
|
57
|
+
tier: number;
|
|
58
|
+
summary: string;
|
|
59
|
+
construction: BuildingConstructionView;
|
|
60
|
+
operation: BuildingOperationView;
|
|
61
|
+
lifecycle: BuildingLifecycleView;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/tools/config/building-card/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,eAAO,MAAM,sBAAsB;;CAKlC,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IACzD,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,wBAAwB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,sBAAsB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACtC,aAAa,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,uBAAuB;IACpC,gBAAgB,EAAE,MAAM,CAAC;IACzB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2F,CAAC;CAC7G,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const DEFAULT_MATCH_LIMIT = 50;
|
|
2
|
+
export declare const MAX_MATCH_LIMIT = 200;
|
|
3
|
+
export declare const FIND_BUILDINGS_DESCRIPTION: string;
|
|
4
|
+
export declare const INDEX_COLUMNS_LEGEND = "One row each \u2014 type | name | kind | tier | build cost | what it does:";
|
|
5
|
+
export declare const NO_FILTERS_LABEL = "no filters, so the whole catalog";
|
|
6
|
+
export declare const NO_MATCH_HINT = "Not an error: the catalog holds no such building. Loosen a filter, or check the resource ids with cpu_get_game_config.";
|
|
7
|
+
export declare const SINGLE_MATCH_NOTE = "Exactly one building matches, so here is its full card instead of a row.";
|
|
8
|
+
export declare const TRUNCATED_HINT = "Narrow the filters to see the rest \u2014 the catalog is finite and there is no second page.";
|
|
9
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/tools/config/find-buildings/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,eAAO,MAAM,0BAA0B,QAU5B,CAAC;AAEZ,eAAO,MAAM,oBAAoB,+EAA0E,CAAC;AAE5G,eAAO,MAAM,gBAAgB,qCAAqC,CAAC;AAEnE,eAAO,MAAM,aAAa,2HACkG,CAAC;AAE7H,eAAO,MAAM,iBAAiB,6EAA6E,CAAC;AAE5G,eAAO,MAAM,cAAc,iGAA4F,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const DEFAULT_MATCH_LIMIT = 50;
|
|
2
|
+
export const MAX_MATCH_LIMIT = 200;
|
|
3
|
+
export const FIND_BUILDINGS_DESCRIPTION = [
|
|
4
|
+
'Search the building catalog by what a building consumes, produces or mines ("which buildings process',
|
|
5
|
+
'steel"). Filters are optional and combine with AND. The four resource filters are four distinct roles:',
|
|
6
|
+
'`buildInput` — a build input, burned ONCE to erect the building; `recipeInput` — a recipe input, consumed',
|
|
7
|
+
'on EVERY production cycle;',
|
|
8
|
+
'`recipeOutput` — what a cycle produces; `minableResource` — what an extractor draws from its own cell',
|
|
9
|
+
'deposit. `kind` and `tier` narrow further. Answers are index rows (type, name, kind, tier, build cost, one',
|
|
10
|
+
`line of what it does), up to ${DEFAULT_MATCH_LIMIT} by default — narrow the filters rather than paging. A`,
|
|
11
|
+
'single match returns the full card, as `cpu_get_building` does. No match is a plain answer, not an error.',
|
|
12
|
+
'Read-only. No session needed.',
|
|
13
|
+
].join(' ');
|
|
14
|
+
export const INDEX_COLUMNS_LEGEND = 'One row each — type | name | kind | tier | build cost | what it does:';
|
|
15
|
+
export const NO_FILTERS_LABEL = 'no filters, so the whole catalog';
|
|
16
|
+
export const NO_MATCH_HINT = 'Not an error: the catalog holds no such building. Loosen a filter, or check the resource ids with cpu_get_game_config.';
|
|
17
|
+
export const SINGLE_MATCH_NOTE = 'Exactly one building matches, so here is its full card instead of a row.';
|
|
18
|
+
export const TRUNCATED_HINT = 'Narrow the filters to see the rest — the catalog is finite and there is no second page.';
|
|
19
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/tools/config/find-buildings/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAEtC,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC;AAEnC,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACtC,sGAAsG;IACtG,wGAAwG;IACxG,2GAA2G;IAC3G,4BAA4B;IAC5B,uGAAuG;IACvG,4GAA4G;IAC5G,gCAAgC,mBAAmB,wDAAwD;IAC3G,2GAA2G;IAC3G,+BAA+B;CAClC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,oBAAoB,GAAG,uEAAuE,CAAC;AAE5G,MAAM,CAAC,MAAM,gBAAgB,GAAG,kCAAkC,CAAC;AAEnE,MAAM,CAAC,MAAM,aAAa,GACtB,wHAAwH,CAAC;AAE7H,MAAM,CAAC,MAAM,iBAAiB,GAAG,0EAA0E,CAAC;AAE5G,MAAM,CAAC,MAAM,cAAc,GAAG,yFAAyF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-buildings.d.ts","sourceRoot":"","sources":["../../../../src/tools/config/find-buildings/find-buildings.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI,CAiC1F"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FIND_BUILDINGS_DESCRIPTION } from './constants.js';
|
|
2
|
+
import { buildIndexRow, renderIndex, renderNoMatch, renderSingleMatchHeadline, resultLimit, selectBuildings, } from './find-buildings.utils.js';
|
|
3
|
+
import { findBuildingsInputSchema } from './types.js';
|
|
4
|
+
import { buildBuildingCard, renderBuildingCard } from '../building-card/building-card.utils.js';
|
|
5
|
+
export function registerFindBuildingsTool(server, context) {
|
|
6
|
+
server.registerTool('cpu_find_buildings', { description: FIND_BUILDINGS_DESCRIPTION, inputSchema: findBuildingsInputSchema }, async (args) => {
|
|
7
|
+
const { buildings, recipes, resources } = await context.appConfig.load();
|
|
8
|
+
const matched = selectBuildings(buildings, args, recipes);
|
|
9
|
+
const shown = matched.slice(0, resultLimit(args.limit));
|
|
10
|
+
const only = matched.length === 1 ? matched[0] : null;
|
|
11
|
+
const card = only === undefined || only === null ? null : buildBuildingCard(only, recipes, resources);
|
|
12
|
+
const result = {
|
|
13
|
+
filters: args,
|
|
14
|
+
matchCount: matched.length,
|
|
15
|
+
buildings: shown.map((building) => buildIndexRow(building, recipes, resources)),
|
|
16
|
+
card,
|
|
17
|
+
};
|
|
18
|
+
const text = card !== null
|
|
19
|
+
? `${renderSingleMatchHeadline(args, resources)}\n\n${renderBuildingCard(card, resources)}`
|
|
20
|
+
: matched.length === 0
|
|
21
|
+
? renderNoMatch(args, resources)
|
|
22
|
+
: renderIndex(result.buildings, matched.length, args, resources);
|
|
23
|
+
return {
|
|
24
|
+
content: [
|
|
25
|
+
{ type: 'text', text },
|
|
26
|
+
{ type: 'text', text: JSON.stringify(result) },
|
|
27
|
+
],
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=find-buildings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-buildings.js","sourceRoot":"","sources":["../../../../src/tools/config/find-buildings/find-buildings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EACH,aAAa,EACb,WAAW,EACX,aAAa,EACb,yBAAyB,EACzB,WAAW,EACX,eAAe,GAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,wBAAwB,EAAwD,MAAM,YAAY,CAAC;AAG5G,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAEhG,MAAM,UAAU,yBAAyB,CAAC,MAAqB,EAAE,OAAmB;IAChF,MAAM,CAAC,YAAY,CACf,oBAAoB,EACpB,EAAE,WAAW,EAAE,0BAA0B,EAAE,WAAW,EAAE,wBAAwB,EAAE,EAClF,KAAK,EAAE,IAAuB,EAAE,EAAE;QAC9B,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACzE,MAAM,OAAO,GAAG,eAAe,CAAC,SAAS,EAAE,IAAI,EAAE,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AC;AACN,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BuildingIndexRowView, FindBuildingsArgs } from './types.js';
|
|
2
|
+
import type { RecipeView } from '../../../api/types.js';
|
|
3
|
+
import type { CatalogBuildingView } from '../../../services/types.js';
|
|
4
|
+
import { type ResourceNames } from '../../../utils/format.utils.js';
|
|
5
|
+
export declare function selectBuildings(buildings: Array<CatalogBuildingView>, filters: FindBuildingsArgs, recipes: Array<RecipeView>): Array<CatalogBuildingView>;
|
|
6
|
+
export declare function resultLimit(limit: number | null): number;
|
|
7
|
+
export declare function buildIndexRow(building: CatalogBuildingView, recipes: Array<RecipeView>, resources: ResourceNames): BuildingIndexRowView;
|
|
8
|
+
export declare function renderIndexRow(row: BuildingIndexRowView): string;
|
|
9
|
+
export declare function renderBuildingIndexLine(building: CatalogBuildingView, recipes: Array<RecipeView>, resources: ResourceNames): string;
|
|
10
|
+
export declare function describeFilters(filters: FindBuildingsArgs, resources: ResourceNames): string;
|
|
11
|
+
export declare function renderNoMatch(filters: FindBuildingsArgs, resources: ResourceNames): string;
|
|
12
|
+
export declare function renderSingleMatchHeadline(filters: FindBuildingsArgs, resources: ResourceNames): string;
|
|
13
|
+
export declare function renderIndex(rows: Array<BuildingIndexRowView>, matchCount: number, filters: FindBuildingsArgs, resources: ResourceNames): string;
|
|
14
|
+
//# sourceMappingURL=find-buildings.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-buildings.utils.d.ts","sourceRoot":"","sources":["../../../../src/tools/config/find-buildings/find-buildings.utils.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,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js';
|
|
3
|
+
import { PANEL_FIELD_SEPARATOR } from '../../../utils/panel.constants.js';
|
|
4
|
+
import { summarizeBuildingRole } from '../building-card/building-card.utils.js';
|
|
5
|
+
function recipesOf(building, recipes) {
|
|
6
|
+
return building.recipes.flatMap((id) => recipes.filter((recipe) => recipe.id === id));
|
|
7
|
+
}
|
|
8
|
+
function matchesFilters(building, filters, recipes) {
|
|
9
|
+
const own = recipesOf(building, recipes);
|
|
10
|
+
if (filters.buildInput !== null && !building.buildInputs.some((s) => s.resourceId === filters.buildInput)) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
if (filters.recipeInput !== null &&
|
|
14
|
+
!own.some((recipe) => recipe.inputs.some((s) => s.resourceId === filters.recipeInput))) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
if (filters.recipeOutput !== null &&
|
|
18
|
+
!own.some((recipe) => recipe.outputs.some((s) => s.resourceId === filters.recipeOutput))) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
if (filters.minableResource !== null && !building.minableResources.includes(filters.minableResource)) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
if (filters.kind !== null && building.kind !== filters.kind) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
return filters.tier === null || building.tier === filters.tier;
|
|
28
|
+
}
|
|
29
|
+
export function selectBuildings(buildings, filters, recipes) {
|
|
30
|
+
return buildings.filter((building) => matchesFilters(building, filters, recipes));
|
|
31
|
+
}
|
|
32
|
+
export function resultLimit(limit) {
|
|
33
|
+
return limit ?? DEFAULT_MATCH_LIMIT;
|
|
34
|
+
}
|
|
35
|
+
export function buildIndexRow(building, recipes, resources) {
|
|
36
|
+
return {
|
|
37
|
+
type: building.type,
|
|
38
|
+
name: building.name,
|
|
39
|
+
kind: building.kind,
|
|
40
|
+
tier: building.tier,
|
|
41
|
+
buildCostCpu: building.buildCost,
|
|
42
|
+
summary: summarizeBuildingRole(building, recipes, resources),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export function renderIndexRow(row) {
|
|
46
|
+
return [row.type, row.name, row.kind, `tier ${row.tier}`, `build ${row.buildCostCpu} $CPU`, row.summary].join(PANEL_FIELD_SEPARATOR);
|
|
47
|
+
}
|
|
48
|
+
export function renderBuildingIndexLine(building, recipes, resources) {
|
|
49
|
+
return renderIndexRow(buildIndexRow(building, recipes, resources));
|
|
50
|
+
}
|
|
51
|
+
export function describeFilters(filters, resources) {
|
|
52
|
+
const terms = [];
|
|
53
|
+
if (filters.buildInput !== null) {
|
|
54
|
+
terms.push(`build inputs include ${resourceLabel(resources, filters.buildInput)}`);
|
|
55
|
+
}
|
|
56
|
+
if (filters.recipeInput !== null) {
|
|
57
|
+
terms.push(`recipe inputs include ${resourceLabel(resources, filters.recipeInput)}`);
|
|
58
|
+
}
|
|
59
|
+
if (filters.recipeOutput !== null) {
|
|
60
|
+
terms.push(`recipe outputs include ${resourceLabel(resources, filters.recipeOutput)}`);
|
|
61
|
+
}
|
|
62
|
+
if (filters.minableResource !== null) {
|
|
63
|
+
terms.push(`minable resources include ${resourceLabel(resources, filters.minableResource)}`);
|
|
64
|
+
}
|
|
65
|
+
if (filters.kind !== null) {
|
|
66
|
+
terms.push(`kind ${filters.kind}`);
|
|
67
|
+
}
|
|
68
|
+
if (filters.tier !== null) {
|
|
69
|
+
terms.push(`tier ${filters.tier}`);
|
|
70
|
+
}
|
|
71
|
+
return terms.length === 0 ? NO_FILTERS_LABEL : terms.join('; ');
|
|
72
|
+
}
|
|
73
|
+
export function renderNoMatch(filters, resources) {
|
|
74
|
+
return `No catalog building matches ${describeFilters(filters, resources)}. ${NO_MATCH_HINT}`;
|
|
75
|
+
}
|
|
76
|
+
export function renderSingleMatchHeadline(filters, resources) {
|
|
77
|
+
return `${SINGLE_MATCH_NOTE} Filters: ${describeFilters(filters, resources)}.`;
|
|
78
|
+
}
|
|
79
|
+
export function renderIndex(rows, matchCount, filters, resources) {
|
|
80
|
+
const shown = rows.length === matchCount ? `${matchCount}` : `${rows.length} of ${matchCount}`;
|
|
81
|
+
const headline = `${shown} catalog building(s) match ${describeFilters(filters, resources)}.`;
|
|
82
|
+
const tail = rows.length === matchCount ? [] : ['', TRUNCATED_HINT];
|
|
83
|
+
return [headline, INDEX_COLUMNS_LEGEND, ...rows.map(renderIndexRow), ...tail].join('\n');
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=find-buildings.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-buildings.utils.js","sourceRoot":"","sources":["../../../../src/tools/config/find-buildings/find-buildings.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,cAAc,GACjB,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAAE,aAAa,EAAsB,MAAM,gCAAgC,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAEhF,SAAS,SAAS,CAAC,QAA6B,EAAE,OAA0B;IACxE,OAAO,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;AAC1F,CAAC;AAED,SAAS,cAAc,CACnB,QAA6B,EAC7B,OAA0B,EAC1B,OAA0B;IAE1B,MAAM,GAAG,GAAG,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACzC,IAAI,OAAO,CAAC,UAAU,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,KAAK,OAAO,CAAC,UAAU,CAAC,EAAE,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