@aeolus-fleet/core 0.26.1 → 0.27.1
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 +1 -1
- package/dist/adapters/http/request-credentials.d.ts +2 -9
- package/dist/adapters/http/request-credentials.js +8 -1
- package/dist/adapters/http/request-credentials.js.map +1 -1
- package/dist/adapters/http/server.js +2 -1
- package/dist/adapters/http/server.js.map +1 -1
- package/dist/adapters/mcp/mcp-endpoint.js +11 -1
- package/dist/adapters/mcp/mcp-endpoint.js.map +1 -1
- package/dist/adapters/prisma/generated/browser.d.ts +14 -0
- package/dist/adapters/prisma/generated/client.d.ts +14 -0
- package/dist/adapters/prisma/generated/commonInputTypes.d.ts +30 -0
- package/dist/adapters/prisma/generated/enums.d.ts +10 -0
- package/dist/adapters/prisma/generated/enums.js +10 -1
- package/dist/adapters/prisma/generated/enums.js.map +1 -1
- package/dist/adapters/prisma/generated/internal/class.d.ts +22 -0
- package/dist/adapters/prisma/generated/internal/class.js +4 -4
- package/dist/adapters/prisma/generated/internal/class.js.map +1 -1
- package/dist/adapters/prisma/generated/internal/prismaNamespace.d.ts +186 -1
- package/dist/adapters/prisma/generated/internal/prismaNamespace.js +27 -2
- package/dist/adapters/prisma/generated/internal/prismaNamespace.js.map +1 -1
- package/dist/adapters/prisma/generated/internal/prismaNamespaceBrowser.d.ts +27 -0
- package/dist/adapters/prisma/generated/internal/prismaNamespaceBrowser.js +27 -2
- package/dist/adapters/prisma/generated/internal/prismaNamespaceBrowser.js.map +1 -1
- package/dist/adapters/prisma/generated/models/Delivery.d.ts +71 -1
- package/dist/adapters/prisma/generated/models/Fleet.d.ts +558 -0
- package/dist/adapters/prisma/generated/models/Lease.d.ts +172 -1
- package/dist/adapters/prisma/generated/models/NetworkSettings.d.ts +185 -21
- package/dist/adapters/prisma/generated/models/PluginConnection.d.ts +1180 -0
- package/dist/adapters/prisma/generated/models/PluginConnection.js +2 -0
- package/dist/adapters/prisma/generated/models/PluginConnection.js.map +1 -0
- package/dist/adapters/prisma/generated/models/ReachRefusal.d.ts +71 -1
- package/dist/adapters/prisma/generated/models/ScopeNamespace.d.ts +1220 -0
- package/dist/adapters/prisma/generated/models/ScopeNamespace.js +2 -0
- package/dist/adapters/prisma/generated/models/ScopeNamespace.js.map +1 -0
- package/dist/adapters/prisma/generated/models/Ship.d.ts +1269 -51
- package/dist/adapters/prisma/generated/models.d.ts +2 -0
- package/dist/adapters/prisma/health.js +27 -7
- package/dist/adapters/prisma/health.js.map +1 -1
- package/dist/adapters/prisma/history.js +18 -72
- package/dist/adapters/prisma/history.js.map +1 -1
- package/dist/adapters/prisma/messaging.js +31 -35
- package/dist/adapters/prisma/messaging.js.map +1 -1
- package/dist/adapters/prisma/network.js +45 -15
- package/dist/adapters/prisma/network.js.map +1 -1
- package/dist/adapters/prisma/overdue.js +4 -3
- package/dist/adapters/prisma/overdue.js.map +1 -1
- package/dist/adapters/prisma/plugin-connections.d.ts +4 -0
- package/dist/adapters/prisma/plugin-connections.js +20 -0
- package/dist/adapters/prisma/plugin-connections.js.map +1 -0
- package/dist/adapters/prisma/registry.js +68 -13
- package/dist/adapters/prisma/registry.js.map +1 -1
- package/dist/adapters/prisma/rows.d.ts +3 -0
- package/dist/adapters/prisma/rows.js +22 -7
- package/dist/adapters/prisma/rows.js.map +1 -1
- package/dist/adapters/prisma/scope-namespaces.d.ts +4 -0
- package/dist/adapters/prisma/scope-namespaces.js +39 -0
- package/dist/adapters/prisma/scope-namespaces.js.map +1 -0
- package/dist/adapters/prisma/unit-of-work.d.ts +3 -1
- package/dist/adapters/prisma/unit-of-work.js +4 -0
- package/dist/adapters/prisma/unit-of-work.js.map +1 -1
- package/dist/adapters/rest/rest-api.js +2 -2
- package/dist/adapters/rest/rest-api.js.map +1 -1
- package/dist/adapters/trpc/console.d.ts +1 -1
- package/dist/adapters/trpc/console.js +6 -4
- package/dist/adapters/trpc/console.js.map +1 -1
- package/dist/adapters/trpc/context.d.ts +28 -4
- package/dist/adapters/trpc/fleet.d.ts +243 -90
- package/dist/adapters/trpc/fleet.js +146 -57
- package/dist/adapters/trpc/fleet.js.map +1 -1
- package/dist/adapters/trpc/router.d.ts +366 -86
- package/dist/adapters/trpc/ship-contract.js +5 -0
- package/dist/adapters/trpc/ship-contract.js.map +1 -1
- package/dist/adapters/trpc/ship-protocol.js +7 -5
- package/dist/adapters/trpc/ship-protocol.js.map +1 -1
- package/dist/adapters/trpc/ship.d.ts +156 -3
- package/dist/adapters/trpc/ship.js +89 -8
- package/dist/adapters/trpc/ship.js.map +1 -1
- package/dist/adapters/trpc/trpc.d.ts +13 -9
- package/dist/adapters/trpc/trpc.js +90 -26
- package/dist/adapters/trpc/trpc.js.map +1 -1
- package/dist/domain/messaging/check-inbox.d.ts +5 -5
- package/dist/domain/messaging/check-inbox.js +9 -7
- package/dist/domain/messaging/check-inbox.js.map +1 -1
- package/dist/domain/messaging/delivery.d.ts +8 -2
- package/dist/domain/messaging/delivery.js +14 -9
- package/dist/domain/messaging/delivery.js.map +1 -1
- package/dist/domain/messaging/dismiss-delivery.d.ts +9 -4
- package/dist/domain/messaging/dismiss-delivery.js +26 -19
- package/dist/domain/messaging/dismiss-delivery.js.map +1 -1
- package/dist/domain/messaging/hand-over-delivery.d.ts +1 -0
- package/dist/domain/messaging/hand-over-delivery.js +1 -0
- package/dist/domain/messaging/hand-over-delivery.js.map +1 -1
- package/dist/domain/messaging/message.d.ts +11 -5
- package/dist/domain/messaging/message.js +11 -4
- package/dist/domain/messaging/message.js.map +1 -1
- package/dist/domain/messaging/overdue.d.ts +2 -0
- package/dist/domain/messaging/overdue.js +3 -0
- package/dist/domain/messaging/overdue.js.map +1 -1
- package/dist/domain/messaging/ping-ship.d.ts +3 -3
- package/dist/domain/messaging/ping-ship.js +6 -2
- package/dist/domain/messaging/ping-ship.js.map +1 -1
- package/dist/domain/messaging/ports.d.ts +11 -3
- package/dist/domain/messaging/push-receive-deliveries.d.ts +4 -1
- package/dist/domain/messaging/push-receive-deliveries.js +5 -3
- package/dist/domain/messaging/push-receive-deliveries.js.map +1 -1
- package/dist/domain/messaging/receive-deliveries.d.ts +23 -0
- package/dist/domain/messaging/receive-deliveries.js +6 -3
- package/dist/domain/messaging/receive-deliveries.js.map +1 -1
- package/dist/domain/messaging/receive-reply.d.ts +32 -0
- package/dist/domain/messaging/receive-reply.js +25 -0
- package/dist/domain/messaging/receive-reply.js.map +1 -0
- package/dist/domain/messaging/resend-delivery.d.ts +5 -2
- package/dist/domain/messaging/resend-delivery.js +8 -4
- package/dist/domain/messaging/resend-delivery.js.map +1 -1
- package/dist/domain/messaging/send-message.d.ts +9 -2
- package/dist/domain/messaging/send-message.js +12 -2
- package/dist/domain/messaging/send-message.js.map +1 -1
- package/dist/domain/messaging/send-request.d.ts +3 -1
- package/dist/domain/messaging/send-request.js +4 -2
- package/dist/domain/messaging/send-request.js.map +1 -1
- package/dist/domain/registry/assign-label.d.ts +2 -1
- package/dist/domain/registry/assign-label.js +3 -2
- package/dist/domain/registry/assign-label.js.map +1 -1
- package/dist/domain/registry/check-reach.d.ts +69 -6
- package/dist/domain/registry/check-reach.js +109 -12
- package/dist/domain/registry/check-reach.js.map +1 -1
- package/dist/domain/registry/commission-ship.d.ts +21 -8
- package/dist/domain/registry/commission-ship.js +55 -10
- package/dist/domain/registry/commission-ship.js.map +1 -1
- package/dist/domain/registry/connect-plugin.d.ts +30 -0
- package/dist/domain/registry/connect-plugin.js +35 -0
- package/dist/domain/registry/connect-plugin.js.map +1 -0
- package/dist/domain/registry/crew-request.d.ts +1 -1
- package/dist/domain/registry/declare-scopes.d.ts +38 -0
- package/dist/domain/registry/declare-scopes.js +34 -0
- package/dist/domain/registry/declare-scopes.js.map +1 -0
- package/dist/domain/registry/declared-network-rules.d.ts +2 -1
- package/dist/domain/registry/declared-network-rules.js +11 -5
- package/dist/domain/registry/declared-network-rules.js.map +1 -1
- package/dist/domain/registry/discover.d.ts +29 -0
- package/dist/domain/registry/discover.js +54 -0
- package/dist/domain/registry/discover.js.map +1 -0
- package/dist/domain/registry/explain-reach.d.ts +13 -12
- package/dist/domain/registry/explain-reach.js +35 -12
- package/dist/domain/registry/explain-reach.js.map +1 -1
- package/dist/domain/registry/get-ship.d.ts +11 -3
- package/dist/domain/registry/get-ship.js +8 -2
- package/dist/domain/registry/get-ship.js.map +1 -1
- package/dist/domain/registry/get-starting-prompt.d.ts +18 -2
- package/dist/domain/registry/get-starting-prompt.js +7 -7
- package/dist/domain/registry/get-starting-prompt.js.map +1 -1
- package/dist/domain/registry/grant-scopes.d.ts +34 -0
- package/dist/domain/registry/grant-scopes.js +35 -0
- package/dist/domain/registry/grant-scopes.js.map +1 -0
- package/dist/domain/registry/label.d.ts +12 -7
- package/dist/domain/registry/label.js +21 -4
- package/dist/domain/registry/label.js.map +1 -1
- package/dist/domain/registry/leases.d.ts +6 -3
- package/dist/domain/registry/leases.js +7 -5
- package/dist/domain/registry/leases.js.map +1 -1
- package/dist/domain/registry/list-fleet.d.ts +19 -6
- package/dist/domain/registry/list-fleet.js +18 -3
- package/dist/domain/registry/list-fleet.js.map +1 -1
- package/dist/domain/registry/list-scopes.d.ts +24 -0
- package/dist/domain/registry/list-scopes.js +22 -0
- package/dist/domain/registry/list-scopes.js.map +1 -0
- package/dist/domain/registry/managed-or-assigned.d.ts +25 -0
- package/dist/domain/registry/managed-or-assigned.js +23 -0
- package/dist/domain/registry/managed-or-assigned.js.map +1 -0
- package/dist/domain/registry/named-namespaces.d.ts +19 -0
- package/dist/domain/registry/named-namespaces.js +19 -0
- package/dist/domain/registry/named-namespaces.js.map +1 -0
- package/dist/domain/registry/network-settings.d.ts +95 -24
- package/dist/domain/registry/network-settings.js +146 -46
- package/dist/domain/registry/network-settings.js.map +1 -1
- package/dist/domain/registry/plugin-connection.d.ts +48 -0
- package/dist/domain/registry/plugin-connection.js +35 -0
- package/dist/domain/registry/plugin-connection.js.map +1 -0
- package/dist/domain/registry/ports.d.ts +75 -1
- package/dist/domain/registry/public.d.ts +3 -2
- package/dist/domain/registry/public.js +3 -2
- package/dist/domain/registry/public.js.map +1 -1
- package/dist/domain/registry/reach-refusal.d.ts +12 -4
- package/dist/domain/registry/read-assigned-crew-requests.d.ts +12 -3
- package/dist/domain/registry/read-assigned-crew-requests.js +8 -8
- package/dist/domain/registry/read-assigned-crew-requests.js.map +1 -1
- package/dist/domain/registry/read-built-in-rules.d.ts +20 -0
- package/dist/domain/registry/read-built-in-rules.js +24 -0
- package/dist/domain/registry/read-built-in-rules.js.map +1 -0
- package/dist/domain/registry/read-clear-requests.d.ts +5 -3
- package/dist/domain/registry/read-clear-requests.js +7 -5
- package/dist/domain/registry/read-clear-requests.js.map +1 -1
- package/dist/domain/registry/read-network-plugin.d.ts +23 -0
- package/dist/domain/registry/read-network-plugin.js +15 -0
- package/dist/domain/registry/read-network-plugin.js.map +1 -0
- package/dist/domain/registry/read-on-behalf.d.ts +20 -0
- package/dist/domain/registry/read-on-behalf.js +31 -0
- package/dist/domain/registry/read-on-behalf.js.map +1 -0
- package/dist/domain/registry/read-reach.d.ts +64 -0
- package/dist/domain/registry/read-reach.js +83 -0
- package/dist/domain/registry/read-reach.js.map +1 -0
- package/dist/domain/registry/recrew-ship.d.ts +3 -2
- package/dist/domain/registry/recrew-ship.js +8 -1
- package/dist/domain/registry/recrew-ship.js.map +1 -1
- package/dist/domain/registry/release-ship.d.ts +10 -5
- package/dist/domain/registry/release-ship.js +11 -8
- package/dist/domain/registry/release-ship.js.map +1 -1
- package/dist/domain/registry/remove-crew-request.d.ts +4 -3
- package/dist/domain/registry/remove-crew-request.js +6 -1
- package/dist/domain/registry/remove-crew-request.js.map +1 -1
- package/dist/domain/registry/rename-ship.d.ts +7 -5
- package/dist/domain/registry/rename-ship.js +9 -3
- package/dist/domain/registry/rename-ship.js.map +1 -1
- package/dist/domain/registry/request-crew.d.ts +5 -4
- package/dist/domain/registry/request-crew.js +6 -1
- package/dist/domain/registry/request-crew.js.map +1 -1
- package/dist/domain/registry/request-worktree-clear.d.ts +3 -2
- package/dist/domain/registry/request-worktree-clear.js +6 -1
- package/dist/domain/registry/request-worktree-clear.js.map +1 -1
- package/dist/domain/registry/retire-ship.d.ts +17 -7
- package/dist/domain/registry/retire-ship.js +48 -5
- package/dist/domain/registry/retire-ship.js.map +1 -1
- package/dist/domain/registry/scope-grant.d.ts +53 -0
- package/dist/domain/registry/scope-grant.js +74 -0
- package/dist/domain/registry/scope-grant.js.map +1 -0
- package/dist/domain/registry/scope-namespace.d.ts +68 -0
- package/dist/domain/registry/scope-namespace.js +82 -0
- package/dist/domain/registry/scope-namespace.js.map +1 -0
- package/dist/domain/registry/set-built-in-rule.d.ts +28 -0
- package/dist/domain/registry/set-built-in-rule.js +33 -0
- package/dist/domain/registry/set-built-in-rule.js.map +1 -0
- package/dist/domain/registry/set-network-rules.d.ts +3 -3
- package/dist/domain/registry/set-network-rules.js +2 -2
- package/dist/domain/registry/set-owner.d.ts +30 -0
- package/dist/domain/registry/set-owner.js +37 -0
- package/dist/domain/registry/set-owner.js.map +1 -0
- package/dist/domain/registry/set-statement.d.ts +27 -0
- package/dist/domain/registry/set-statement.js +28 -0
- package/dist/domain/registry/set-statement.js.map +1 -0
- package/dist/domain/registry/ship.d.ts +74 -10
- package/dist/domain/registry/ship.js +128 -10
- package/dist/domain/registry/ship.js.map +1 -1
- package/dist/domain/registry/statement.d.ts +32 -0
- package/dist/domain/registry/statement.js +39 -0
- package/dist/domain/registry/statement.js.map +1 -0
- package/dist/domain/registry/unassign-label.js +1 -1
- package/dist/domain/registry/unassign-label.js.map +1 -1
- package/dist/domain/registry/whoami.d.ts +5 -1
- package/dist/domain/registry/whoami.js +7 -4
- package/dist/domain/registry/whoami.js.map +1 -1
- package/dist/domain/shared/caller.d.ts +5 -2
- package/dist/domain/shared/caller.js.map +1 -1
- package/dist/domain/shared/delivery-way.d.ts +9 -5
- package/dist/domain/shared/delivery-way.js +17 -5
- package/dist/domain/shared/delivery-way.js.map +1 -1
- package/dist/domain/shared/errors.d.ts +1 -1
- package/dist/domain/shared/errors.js.map +1 -1
- package/dist/domain/shared/events-read.d.ts +16 -0
- package/dist/domain/shared/events-read.js +15 -0
- package/dist/domain/shared/events-read.js.map +1 -0
- package/dist/domain/shared/follow-fleet.d.ts +8 -2
- package/dist/domain/shared/follow-fleet.js +14 -4
- package/dist/domain/shared/follow-fleet.js.map +1 -1
- package/dist/domain/shared/health.d.ts +11 -2
- package/dist/domain/shared/health.js +11 -3
- package/dist/domain/shared/health.js.map +1 -1
- package/dist/domain/shared/history.d.ts +11 -42
- package/dist/domain/shared/history.js +9 -0
- package/dist/domain/shared/history.js.map +1 -1
- package/dist/domain/shared/read-fleet-events.d.ts +8 -2
- package/dist/domain/shared/read-fleet-events.js +10 -4
- package/dist/domain/shared/read-fleet-events.js.map +1 -1
- package/dist/domain/shared/read-health.d.ts +5 -1
- package/dist/domain/shared/read-health.js +13 -2
- package/dist/domain/shared/read-health.js.map +1 -1
- package/dist/domain/shared/read-inbox.d.ts +6 -3
- package/dist/domain/shared/read-inbox.js +14 -4
- package/dist/domain/shared/read-inbox.js.map +1 -1
- package/dist/domain/shared/read-message.d.ts +6 -2
- package/dist/domain/shared/read-message.js +6 -2
- package/dist/domain/shared/read-message.js.map +1 -1
- package/dist/domain/shared/read-needs-attention.d.ts +4 -1
- package/dist/domain/shared/read-needs-attention.js +8 -3
- package/dist/domain/shared/read-needs-attention.js.map +1 -1
- package/dist/domain/shared/read-sent-message.d.ts +31 -0
- package/dist/domain/shared/read-sent-message.js +28 -0
- package/dist/domain/shared/read-sent-message.js.map +1 -0
- package/dist/domain/shared/read-ship-messages.d.ts +6 -2
- package/dist/domain/shared/read-ship-messages.js +7 -2
- package/dist/domain/shared/read-ship-messages.js.map +1 -1
- package/dist/domain/shared/read-ship-timeline.d.ts +5 -2
- package/dist/domain/shared/read-ship-timeline.js +11 -6
- package/dist/domain/shared/read-ship-timeline.js.map +1 -1
- package/dist/domain/shared/read-ship-way.d.ts +11 -4
- package/dist/domain/shared/read-ship-way.js +9 -2
- package/dist/domain/shared/read-ship-way.js.map +1 -1
- package/dist/domain/shared/stuck.d.ts +10 -1
- package/dist/domain/shared/stuck.js +5 -3
- package/dist/domain/shared/stuck.js.map +1 -1
- package/dist/testing/container-images.d.ts +14 -0
- package/dist/testing/container-images.js +18 -0
- package/dist/testing/container-images.js.map +1 -0
- package/dist/testing/database.d.ts +14 -0
- package/dist/testing/database.js +48 -0
- package/dist/testing/database.js.map +1 -0
- package/dist/testing/fleet.d.ts +13 -0
- package/dist/testing/fleet.js +17 -0
- package/dist/testing/fleet.js.map +1 -0
- package/dist/testing/index.d.ts +12 -0
- package/dist/testing/index.js +12 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/keys.d.ts +1 -0
- package/dist/testing/keys.js +7 -0
- package/dist/testing/keys.js.map +1 -0
- package/dist/testing/migrate-lock.d.ts +12 -0
- package/dist/testing/migrate-lock.js +51 -0
- package/dist/testing/migrate-lock.js.map +1 -0
- package/dist/testing/migrated-template.d.ts +12 -0
- package/dist/testing/migrated-template.js +29 -0
- package/dist/testing/migrated-template.js.map +1 -0
- package/dist/testing/postgres-container.d.ts +16 -0
- package/dist/testing/postgres-container.js +30 -0
- package/dist/testing/postgres-container.js.map +1 -0
- package/dist/testing/postgres-global-setup.d.ts +15 -0
- package/dist/testing/postgres-global-setup.js +20 -0
- package/dist/testing/postgres-global-setup.js.map +1 -0
- package/dist/testing/prisma-cli.d.ts +5 -0
- package/dist/testing/prisma-cli.js +15 -0
- package/dist/testing/prisma-cli.js.map +1 -0
- package/dist/testing/result.d.ts +5 -0
- package/dist/testing/result.js +15 -0
- package/dist/testing/result.js.map +1 -0
- package/dist/wiring.d.ts +26 -4
- package/dist/wiring.js +51 -18
- package/dist/wiring.js.map +1 -1
- package/package.json +28 -2
- package/src/adapters/prisma/migrations/20261018100000_force_scope/migration.sql +8 -0
- package/src/adapters/prisma/migrations/20261018110000_forced_delivery/migration.sql +4 -0
- package/src/adapters/prisma/migrations/20261018120000_person_and_app_ships/migration.sql +3 -0
- package/src/adapters/prisma/migrations/20261018130000_owners/migration.sql +14 -0
- package/src/adapters/prisma/migrations/20261018140000_owners_on_reach_refusals/migration.sql +14 -0
- package/src/adapters/prisma/migrations/20261018150000_network_verbs/migration.sql +9 -0
- package/src/adapters/prisma/migrations/20261018160000_built_in_rules/migration.sql +13 -0
- package/src/adapters/prisma/migrations/20261018170000_network_rules_a_list/migration.sql +5 -0
- package/src/adapters/prisma/migrations/20261018180000_verb_on_reach_refusals/migration.sql +4 -0
- package/src/adapters/prisma/migrations/20261018200000_lease_statements/migration.sql +3 -0
- package/src/adapters/prisma/migrations/20261018210000_declare_and_grant_scopes/migration.sql +8 -0
- package/src/adapters/prisma/migrations/20261018220000_plugin_scopes/migration.sql +14 -0
- package/src/adapters/prisma/migrations/20261018230000_scope_namespaces/migration.sql +20 -0
- package/src/adapters/prisma/migrations/20261018240000_trierarch_plugin_crew_run/migration.sql +44 -0
- package/src/adapters/prisma/migrations/20261018250000_scope_catalogue/migration.sql +67 -0
- package/src/adapters/prisma/migrations/20261019090000_reach_refusal_asked_by/migration.sql +2 -0
- package/src/adapters/prisma/migrations/20261019100000_on_behalf_scope/migration.sql +61 -0
- package/src/adapters/prisma/migrations/20261019110000_events_fleet_id_occurred_at/migration.sql +2 -0
- package/src/adapters/prisma/migrations/20261019130000_plugin_connections/migration.sql +54 -0
- package/src/adapters/prisma/migrations/20261019150000_network_plugin_registered_at/migration.sql +23 -0
- package/src/adapters/prisma/migrations/20261019160000_lease_waker/migration.sql +4 -0
- package/src/adapters/prisma/schema.prisma +81 -7
- package/dist/domain/shared/read-no-ship-can-take.d.ts +0 -13
- package/dist/domain/shared/read-no-ship-can-take.js +0 -12
- package/dist/domain/shared/read-no-ship-can-take.js.map +0 -1
- package/dist/domain/shared/read-overdue.d.ts +0 -13
- package/dist/domain/shared/read-overdue.js +0 -12
- package/dist/domain/shared/read-overdue.js.map +0 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
-- fleet:on-behalf joins the core scopes (decision 0046): a ship reads on behalf of a named ship with it (decision 0034).
|
|
2
|
+
CREATE OR REPLACE FUNCTION "ships_scopes_are_known"("scopes" TEXT[]) RETURNS BOOLEAN IMMUTABLE LANGUAGE SQL AS $$
|
|
3
|
+
SELECT "scopes" IS NOT NULL AND NOT EXISTS (
|
|
4
|
+
SELECT 1 FROM unnest("scopes") AS "scope"
|
|
5
|
+
WHERE NOT (
|
|
6
|
+
"scope" = ANY(ARRAY['messages:send', 'messages:receive', 'messages:force', 'messages:resend', 'fleet:read', 'fleet:commission', 'fleet:manage', 'crew:assign', 'crew:run', 'labels:define', 'labels:assign', 'fleet:network', 'fleet:on-behalf', 'scopes:declare', 'scopes:grant']::TEXT[])
|
|
7
|
+
OR ("scope" ~ '^[a-z][a-z0-9-]{0,31}:[a-z][a-z0-9-]{0,31}$' AND split_part("scope", ':', 1) <> ALL(ARRAY['messages', 'fleet', 'crew', 'labels', 'scopes']::TEXT[]))
|
|
8
|
+
)
|
|
9
|
+
)
|
|
10
|
+
$$;
|
|
11
|
+
|
|
12
|
+
-- argo holds every scope, and squadrons reads on behalf of a person's ship (decision 0017): every argo and every
|
|
13
|
+
-- active squadrons ship gets fleet:on-behalf, its scopes kept in catalogue order, a plugin's own after them.
|
|
14
|
+
-- Squadrons' ship is known by its name and type together, as the console connects it: types are not reserved,
|
|
15
|
+
-- so another ship of type squadrons keeps what it holds.
|
|
16
|
+
-- Every state change writes its event: each ship it changes gets
|
|
17
|
+
-- ScopesChanged, by the system, taking the next number of its fleet's stream. Its id is an evt_ id as
|
|
18
|
+
-- common/src/ids makes them: the time in milliseconds, then 80 random bits, in lowercase Crockford base32.
|
|
19
|
+
DO $$
|
|
20
|
+
DECLARE
|
|
21
|
+
alphabet CONSTANT text := '0123456789abcdefghjkmnpqrstvwxyz';
|
|
22
|
+
catalogue CONSTANT text[] := ARRAY['messages:send', 'messages:receive', 'messages:force', 'messages:resend', 'fleet:read', 'fleet:commission', 'fleet:manage', 'crew:assign', 'crew:run', 'labels:define', 'labels:assign', 'fleet:network', 'fleet:on-behalf', 'scopes:declare', 'scopes:grant'];
|
|
23
|
+
changed record;
|
|
24
|
+
at timestamptz;
|
|
25
|
+
millis bigint;
|
|
26
|
+
body text;
|
|
27
|
+
next_seq bigint;
|
|
28
|
+
BEGIN
|
|
29
|
+
FOR changed IN
|
|
30
|
+
UPDATE "ships" SET "scopes" = (
|
|
31
|
+
SELECT array_agg("scope" ORDER BY coalesce(array_position(catalogue, "scope"), cardinality(catalogue) + 1), "place")
|
|
32
|
+
FROM unnest(array_append("ships"."scopes", 'fleet:on-behalf')) WITH ORDINALITY AS u("scope", "place")
|
|
33
|
+
)
|
|
34
|
+
WHERE ("kind" = 'operator' OR ("name" = 'squadrons' AND "type" = 'squadrons')) AND "retired_at" IS NULL AND NOT ('fleet:on-behalf' = ANY("scopes"))
|
|
35
|
+
RETURNING "fleet_id", "id"
|
|
36
|
+
LOOP
|
|
37
|
+
at := clock_timestamp();
|
|
38
|
+
millis := floor(extract(epoch FROM at) * 1000)::bigint;
|
|
39
|
+
body := '';
|
|
40
|
+
FOR position IN REVERSE 9..0 LOOP
|
|
41
|
+
body := body || substr(alphabet, ((millis >> (position * 5)) & 31)::integer + 1, 1);
|
|
42
|
+
END LOOP;
|
|
43
|
+
FOR position IN 1..16 LOOP
|
|
44
|
+
body := body || substr(alphabet, floor(random() * 32)::integer + 1, 1);
|
|
45
|
+
END LOOP;
|
|
46
|
+
|
|
47
|
+
UPDATE "fleets" SET "last_event_seq" = "last_event_seq" + 1 WHERE "id" = changed."fleet_id"
|
|
48
|
+
RETURNING "last_event_seq" INTO next_seq;
|
|
49
|
+
INSERT INTO "events" ("id", "fleet_id", "type", "occurred_at", "ship_id", "details", "seq")
|
|
50
|
+
VALUES (
|
|
51
|
+
'evt_' || body,
|
|
52
|
+
changed."fleet_id",
|
|
53
|
+
'ScopesChanged',
|
|
54
|
+
at,
|
|
55
|
+
changed."id",
|
|
56
|
+
jsonb_build_object('added', 'fleet:on-behalf', 'removed', ''),
|
|
57
|
+
next_seq
|
|
58
|
+
);
|
|
59
|
+
END LOOP;
|
|
60
|
+
END;
|
|
61
|
+
$$;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
-- A plugin argo connected (decision 0034): its ship reads every ship of the fleet, whatever the rules, until a
|
|
2
|
+
-- release or a retire of the ship ends it.
|
|
3
|
+
-- CreateTable
|
|
4
|
+
CREATE TABLE "plugin_connections" (
|
|
5
|
+
"fleet_id" TEXT NOT NULL,
|
|
6
|
+
"ship_id" TEXT NOT NULL,
|
|
7
|
+
"connected_at" TIMESTAMPTZ(3) NOT NULL,
|
|
8
|
+
|
|
9
|
+
CONSTRAINT "plugin_connections_pkey" PRIMARY KEY ("fleet_id","ship_id")
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
-- AddForeignKey
|
|
13
|
+
ALTER TABLE "plugin_connections" ADD CONSTRAINT "plugin_connections_fleet_id_fkey" FOREIGN KEY ("fleet_id") REFERENCES "fleets"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
14
|
+
|
|
15
|
+
-- AddForeignKey
|
|
16
|
+
ALTER TABLE "plugin_connections" ADD CONSTRAINT "plugin_connections_fleet_id_ship_id_fkey" FOREIGN KEY ("fleet_id", "ship_id") REFERENCES "ships"("fleet_id", "id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
17
|
+
|
|
18
|
+
-- The plugins argo connected before: every active ship the console connects a plugin as, known by its name and type
|
|
19
|
+
-- together (squadrons, the trierarch plugin, the networking plugin), is connected now. Each gets PluginConnected, by
|
|
20
|
+
-- the system, at the next number of its fleet's stream, with an evt_ id as common/src/ids makes them (the time in
|
|
21
|
+
-- milliseconds, then 80 random bits, in lowercase Crockford base32).
|
|
22
|
+
DO $$
|
|
23
|
+
DECLARE
|
|
24
|
+
alphabet CONSTANT text := '0123456789abcdefghjkmnpqrstvwxyz';
|
|
25
|
+
plugin record;
|
|
26
|
+
at timestamptz;
|
|
27
|
+
millis bigint;
|
|
28
|
+
body text;
|
|
29
|
+
next_seq bigint;
|
|
30
|
+
BEGIN
|
|
31
|
+
FOR plugin IN
|
|
32
|
+
SELECT "id", "fleet_id" FROM "ships"
|
|
33
|
+
WHERE "retired_at" IS NULL AND "name" = "type" AND "type" IN ('squadrons', 'trierarch-plugin', 'networking-plugin')
|
|
34
|
+
ORDER BY "fleet_id", "id"
|
|
35
|
+
LOOP
|
|
36
|
+
at := clock_timestamp();
|
|
37
|
+
INSERT INTO "plugin_connections" ("fleet_id", "ship_id", "connected_at") VALUES (plugin."fleet_id", plugin."id", at);
|
|
38
|
+
|
|
39
|
+
millis := floor(extract(epoch FROM at) * 1000)::bigint;
|
|
40
|
+
body := '';
|
|
41
|
+
FOR position IN REVERSE 9..0 LOOP
|
|
42
|
+
body := body || substr(alphabet, ((millis >> (position * 5)) & 31)::integer + 1, 1);
|
|
43
|
+
END LOOP;
|
|
44
|
+
FOR position IN 1..16 LOOP
|
|
45
|
+
body := body || substr(alphabet, floor(random() * 32)::integer + 1, 1);
|
|
46
|
+
END LOOP;
|
|
47
|
+
|
|
48
|
+
UPDATE "fleets" SET "last_event_seq" = "last_event_seq" + 1 WHERE "id" = plugin."fleet_id"
|
|
49
|
+
RETURNING "last_event_seq" INTO next_seq;
|
|
50
|
+
INSERT INTO "events" ("id", "fleet_id", "type", "occurred_at", "ship_id", "details", "seq")
|
|
51
|
+
VALUES ('evt_' || body, plugin."fleet_id", 'PluginConnected', at, plugin."id", '{}'::jsonb, next_seq);
|
|
52
|
+
END LOOP;
|
|
53
|
+
END;
|
|
54
|
+
$$;
|
package/src/adapters/prisma/migrations/20261019150000_network_plugin_registered_at/migration.sql
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
-- When the fleet's networking plugin first registered (decision 0035), set
|
|
2
|
+
-- with its ship and declaration, all four or none. A plugin registered before
|
|
3
|
+
-- this column takes the time of its first NetworkPluginRegistered event since
|
|
4
|
+
-- the fleet's latest NetworkPluginUnregistered (a retirement writes one too).
|
|
5
|
+
ALTER TABLE "network_settings" ADD COLUMN "plugin_registered_at" TIMESTAMPTZ(3);
|
|
6
|
+
|
|
7
|
+
UPDATE "network_settings" AS s
|
|
8
|
+
SET "plugin_registered_at" = COALESCE(
|
|
9
|
+
(SELECT min(e."occurred_at") FROM "events" e
|
|
10
|
+
WHERE e."fleet_id" = s."fleet_id" AND e."type" = 'NetworkPluginRegistered' AND e."ship_id" = s."plugin_ship_id"
|
|
11
|
+
AND e."occurred_at" > COALESCE(
|
|
12
|
+
(SELECT max(u."occurred_at") FROM "events" u WHERE u."fleet_id" = s."fleet_id" AND u."type" = 'NetworkPluginUnregistered'),
|
|
13
|
+
'-infinity')),
|
|
14
|
+
now())
|
|
15
|
+
WHERE s."plugin_ship_id" IS NOT NULL;
|
|
16
|
+
|
|
17
|
+
ALTER TABLE "network_settings"
|
|
18
|
+
DROP CONSTRAINT "network_settings_plugin_whole",
|
|
19
|
+
ADD CONSTRAINT "network_settings_plugin_whole" CHECK (
|
|
20
|
+
("plugin_ship_id" IS NULL) = ("plugin_while_unavailable" IS NULL)
|
|
21
|
+
AND ("plugin_ship_id" IS NULL) = ("plugin_not_responding_after_seconds" IS NULL)
|
|
22
|
+
AND ("plugin_ship_id" IS NULL) = ("plugin_registered_at" IS NULL)
|
|
23
|
+
);
|
|
@@ -53,6 +53,8 @@ model Fleet {
|
|
|
53
53
|
shipLabels ShipLabel[]
|
|
54
54
|
networkSettings NetworkSettings?
|
|
55
55
|
declaredNetworkRules DeclaredNetworkRules[]
|
|
56
|
+
scopeNamespaces ScopeNamespace[]
|
|
57
|
+
pluginConnections PluginConnection[]
|
|
56
58
|
reachRefusals ReachRefusal[]
|
|
57
59
|
credentials Credential[]
|
|
58
60
|
messages Message[]
|
|
@@ -68,11 +70,13 @@ model Fleet {
|
|
|
68
70
|
@@map("fleets")
|
|
69
71
|
}
|
|
70
72
|
|
|
71
|
-
///
|
|
73
|
+
/// What a ship is (decision 0044): argo the one operator, the viewer, an agent session, a person's ship or an app's.
|
|
72
74
|
enum ShipKind {
|
|
73
75
|
operator
|
|
74
76
|
agent
|
|
75
77
|
viewer
|
|
78
|
+
person
|
|
79
|
+
app
|
|
76
80
|
|
|
77
81
|
@@map("ship_kind")
|
|
78
82
|
}
|
|
@@ -93,8 +97,12 @@ model Ship {
|
|
|
93
97
|
commissionedBy String? @map("commissioned_by")
|
|
94
98
|
commissionKey String? @map("commission_key")
|
|
95
99
|
commissionRequestHash String? @map("commission_request_hash")
|
|
100
|
+
/// The ship that answers for it, a person's ship or argo (decision 0045); null for argo and the viewer.
|
|
101
|
+
ownerShipId String? @map("owner_ship_id")
|
|
96
102
|
|
|
97
103
|
fleet Fleet @relation(fields: [fleetId], references: [id])
|
|
104
|
+
owner Ship? @relation("ShipOwner", fields: [fleetId, ownerShipId], references: [fleetId, id], onDelete: Restrict)
|
|
105
|
+
ownedShips Ship[] @relation("ShipOwner")
|
|
98
106
|
leases Lease[]
|
|
99
107
|
credentials Credential[]
|
|
100
108
|
sentMessages Message[] @relation("MessageSender")
|
|
@@ -114,6 +122,8 @@ model Ship {
|
|
|
114
122
|
ownedLabels Label[] @relation("LabelOwner")
|
|
115
123
|
labels ShipLabel[] @relation("ShipLabelShip")
|
|
116
124
|
declaredNetworkRules DeclaredNetworkRules[]
|
|
125
|
+
declaredNamespace ScopeNamespace?
|
|
126
|
+
pluginConnection PluginConnection?
|
|
117
127
|
|
|
118
128
|
@@unique([fleetId, id])
|
|
119
129
|
/// An idempotency key is used once per commissioning ship.
|
|
@@ -124,6 +134,7 @@ model Ship {
|
|
|
124
134
|
@@unique([fleetId], map: "ships_fleet_id_operator_key", where: raw("kind = 'operator'::ship_kind"))
|
|
125
135
|
/// At most one viewer ship per fleet (decision 0022).
|
|
126
136
|
@@unique([fleetId], map: "ships_fleet_id_viewer_key", where: raw("kind = 'viewer'::ship_kind"))
|
|
137
|
+
@@index([fleetId, ownerShipId])
|
|
127
138
|
@@map("ships")
|
|
128
139
|
}
|
|
129
140
|
|
|
@@ -137,6 +148,16 @@ enum ReportState {
|
|
|
137
148
|
}
|
|
138
149
|
|
|
139
150
|
/// A pushed session's turn, as its hooks report it (decision 0040).
|
|
151
|
+
enum LeaseWaker {
|
|
152
|
+
trierarch
|
|
153
|
+
pluginWatcher
|
|
154
|
+
personApp
|
|
155
|
+
gateway
|
|
156
|
+
adapter
|
|
157
|
+
|
|
158
|
+
@@map("lease_waker")
|
|
159
|
+
}
|
|
160
|
+
|
|
140
161
|
enum TurnState {
|
|
141
162
|
idle
|
|
142
163
|
busy
|
|
@@ -178,8 +199,14 @@ model Lease {
|
|
|
178
199
|
reportDetails Json? @map("report_details")
|
|
179
200
|
/// Moves by one each time the details change; 0 before any.
|
|
180
201
|
reportDetailsVersion Int @default(0) @map("report_details_version")
|
|
202
|
+
/// The crew's statement: what its ship is and offers, at most 64 KB, its shape common's; null until it states one (decision 0047).
|
|
203
|
+
statement Json?
|
|
204
|
+
/// Moves by one each time the statement changes; 0 before any.
|
|
205
|
+
statementVersion Int @default(0) @map("statement_version")
|
|
181
206
|
/// From the lease's first push receive: the computer side takes its deliveries, and the agent's plain receive answers nothing (decision 0040).
|
|
182
207
|
pushedAt DateTime? @map("pushed_at") @db.Timestamptz(3)
|
|
208
|
+
/// What wakes the ship, as its first push receive stated it; null when it stated none (interop 5.1).
|
|
209
|
+
waker LeaseWaker?
|
|
183
210
|
/// The session's turn as its hooks last reported it, and when they saw it change; null until they report (decision 0040).
|
|
184
211
|
turn TurnState?
|
|
185
212
|
turnAt DateTime? @map("turn_at") @db.Timestamptz(3)
|
|
@@ -350,13 +377,20 @@ model ShipLabel {
|
|
|
350
377
|
/// set take turns on an advisory lock on them (network.ts).
|
|
351
378
|
model NetworkSettings {
|
|
352
379
|
fleetId String @id @map("fleet_id")
|
|
353
|
-
rules Json
|
|
380
|
+
rules Json @default("[]")
|
|
381
|
+
/// The built-in rules that can be off (decision 0034): the viewer reading,
|
|
382
|
+
/// argo's, and open per verb, the networking plugin's. On at fleet create.
|
|
383
|
+
builtInViewerRead Boolean @default(true) @map("built_in_viewer_read")
|
|
384
|
+
builtInOpenSend Boolean @default(true) @map("built_in_open_send")
|
|
385
|
+
builtInOpenRead Boolean @default(true) @map("built_in_open_read")
|
|
386
|
+
builtInOpenManage Boolean @default(true) @map("built_in_open_manage")
|
|
354
387
|
version Int
|
|
355
|
-
/// The fleet's networking plugin (decision 0035): its ship
|
|
356
|
-
/// declared, all
|
|
357
|
-
pluginShipId String?
|
|
358
|
-
pluginWhileUnavailable String?
|
|
359
|
-
pluginNotRespondingAfterSeconds Int?
|
|
388
|
+
/// The fleet's networking plugin (decision 0035): its ship, what it
|
|
389
|
+
/// declared and when it first registered, all four set or none.
|
|
390
|
+
pluginShipId String? @map("plugin_ship_id")
|
|
391
|
+
pluginWhileUnavailable String? @map("plugin_while_unavailable")
|
|
392
|
+
pluginNotRespondingAfterSeconds Int? @map("plugin_not_responding_after_seconds")
|
|
393
|
+
pluginRegisteredAt DateTime? @map("plugin_registered_at") @db.Timestamptz(3)
|
|
360
394
|
|
|
361
395
|
fleet Fleet @relation(fields: [fleetId], references: [id])
|
|
362
396
|
|
|
@@ -378,6 +412,38 @@ model DeclaredNetworkRules {
|
|
|
378
412
|
@@map("declared_network_rules")
|
|
379
413
|
}
|
|
380
414
|
|
|
415
|
+
/// A plugin's namespace (decision 0046): taken up for good by the ship that
|
|
416
|
+
/// declared it, one per ship and unique in the fleet, with its whole list of
|
|
417
|
+
/// scopes and their descriptions as JSON, in order. It goes when its declarer
|
|
418
|
+
/// retires.
|
|
419
|
+
model ScopeNamespace {
|
|
420
|
+
fleetId String @map("fleet_id")
|
|
421
|
+
namespace String
|
|
422
|
+
declaredBy String @map("declared_by")
|
|
423
|
+
scopes Json
|
|
424
|
+
|
|
425
|
+
fleet Fleet @relation(fields: [fleetId], references: [id])
|
|
426
|
+
declarer Ship @relation(fields: [fleetId, declaredBy], references: [fleetId, id])
|
|
427
|
+
|
|
428
|
+
@@id([fleetId, namespace])
|
|
429
|
+
@@unique([fleetId, declaredBy])
|
|
430
|
+
@@map("scope_namespaces")
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/// A plugin argo connected (decision 0034): its ship reads every ship of the
|
|
434
|
+
/// fleet, whatever the rules, until a release or a retire of the ship ends it.
|
|
435
|
+
model PluginConnection {
|
|
436
|
+
fleetId String @map("fleet_id")
|
|
437
|
+
shipId String @map("ship_id")
|
|
438
|
+
connectedAt DateTime @map("connected_at") @db.Timestamptz(3)
|
|
439
|
+
|
|
440
|
+
fleet Fleet @relation(fields: [fleetId], references: [id])
|
|
441
|
+
ship Ship @relation(fields: [fleetId, shipId], references: [fleetId, id])
|
|
442
|
+
|
|
443
|
+
@@id([fleetId, shipId])
|
|
444
|
+
@@map("plugin_connections")
|
|
445
|
+
}
|
|
446
|
+
|
|
381
447
|
/// A send the network rules refused (decision 0034), recorded in the
|
|
382
448
|
/// transaction that refused it. Ids start with rfs_. Sender and recipient are
|
|
383
449
|
/// as they were then: ids, names and the label values they carried, as JSON,
|
|
@@ -387,7 +453,11 @@ model ReachRefusal {
|
|
|
387
453
|
fleetId String @map("fleet_id")
|
|
388
454
|
at DateTime @db.Timestamptz(3)
|
|
389
455
|
sender Json
|
|
456
|
+
/// The plugin ship that read on behalf of the sender (decision 0034); null for the sender's own call.
|
|
457
|
+
askedBy Json? @map("asked_by")
|
|
390
458
|
recipient Json
|
|
459
|
+
/// What the sender tried to do: send, read or manage (decision 0034).
|
|
460
|
+
verb String
|
|
391
461
|
settingsVersion Int @map("settings_version")
|
|
392
462
|
/// What the networking plugin declared, when it refused while the plugin
|
|
393
463
|
/// was not responding (decision 0035): block-all or keep-latest.
|
|
@@ -513,6 +583,8 @@ model Delivery {
|
|
|
513
583
|
handOverNumber Int? @map("hand_over_number")
|
|
514
584
|
/// When its crew handed it once more after the turn that took it died; only once (decision 0040).
|
|
515
585
|
handedOnceMoreAt DateTime? @map("handed_once_more_at") @db.Timestamptz(3)
|
|
586
|
+
/// Whether its message was forced: it comes first in receive and push receive (decision 0040).
|
|
587
|
+
isForced Boolean @default(false) @map("is_forced")
|
|
516
588
|
reachableShipIds String[] @default([]) @map("reachable_ship_ids")
|
|
517
589
|
readAt DateTime? @map("read_at") @db.Timestamptz(3)
|
|
518
590
|
createdAt DateTime @map("created_at") @db.Timestamptz(3)
|
|
@@ -609,6 +681,8 @@ model Event {
|
|
|
609
681
|
@@index([fleetId, shipId])
|
|
610
682
|
@@index([fleetId, messageId])
|
|
611
683
|
@@index([fleetId, deliveryId])
|
|
684
|
+
/// The health reads take a fleet's events since a time (decision 0042).
|
|
685
|
+
@@index([fleetId, occurredAt])
|
|
612
686
|
@@map("events")
|
|
613
687
|
}
|
|
614
688
|
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Caller } from './caller.js';
|
|
2
|
-
import { type ShipHistory, type ShownNoShipCanTakeEntry } from './history.js';
|
|
3
|
-
export type ReadNoShipCanTake = (caller: Caller) => Promise<ShownNoShipCanTakeEntry[]>;
|
|
4
|
-
/**
|
|
5
|
-
* Use case: the pending deliveries of the caller's fleet to a type no active
|
|
6
|
-
* ship can take (decision 0041), oldest sent first, for Needs attention. Each
|
|
7
|
-
* clears by itself once a ship of the type can take it; there is nothing to
|
|
8
|
-
* resend or dismiss. The caller's scope (fleet:read) is checked before this
|
|
9
|
-
* runs.
|
|
10
|
-
*/
|
|
11
|
-
export declare function createReadNoShipCanTake(deps: {
|
|
12
|
-
history: ShipHistory;
|
|
13
|
-
}): ReadNoShipCanTake;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { withPing } from './history.js';
|
|
2
|
-
/**
|
|
3
|
-
* Use case: the pending deliveries of the caller's fleet to a type no active
|
|
4
|
-
* ship can take (decision 0041), oldest sent first, for Needs attention. Each
|
|
5
|
-
* clears by itself once a ship of the type can take it; there is nothing to
|
|
6
|
-
* resend or dismiss. The caller's scope (fleet:read) is checked before this
|
|
7
|
-
* runs.
|
|
8
|
-
*/
|
|
9
|
-
export function createReadNoShipCanTake(deps) {
|
|
10
|
-
return async (caller) => (await deps.history.noShipCanTake(caller.fleetId)).map((entry) => ({ ...entry, message: withPing(entry.message) }));
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=read-no-ship-can-take.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"read-no-ship-can-take.js","sourceRoot":"","sources":["../../../src/domain/shared/read-no-ship-can-take.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAkD,MAAM,cAAc,CAAC;AAIxF;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAA8B;IACpE,OAAO,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC/I,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Caller } from './caller.js';
|
|
2
|
-
import { type ShipHistory, type ShownOverdueEntry } from './history.js';
|
|
3
|
-
export type ReadOverdue = (caller: Caller) => Promise<ShownOverdueEntry[]>;
|
|
4
|
-
/**
|
|
5
|
-
* Use case: the deliveries of the caller's fleet argo was told are overdue by
|
|
6
|
-
* the 10 and 60 minute clocks (decision 0040), oldest told first, for Needs
|
|
7
|
-
* attention. Each clears by itself once its delivery leaves the state it was
|
|
8
|
-
* told in or its lease ends; there is nothing to resend or dismiss. The
|
|
9
|
-
* caller's scope (fleet:read) is checked before this runs.
|
|
10
|
-
*/
|
|
11
|
-
export declare function createReadOverdue(deps: {
|
|
12
|
-
history: ShipHistory;
|
|
13
|
-
}): ReadOverdue;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { withPing } from './history.js';
|
|
2
|
-
/**
|
|
3
|
-
* Use case: the deliveries of the caller's fleet argo was told are overdue by
|
|
4
|
-
* the 10 and 60 minute clocks (decision 0040), oldest told first, for Needs
|
|
5
|
-
* attention. Each clears by itself once its delivery leaves the state it was
|
|
6
|
-
* told in or its lease ends; there is nothing to resend or dismiss. The
|
|
7
|
-
* caller's scope (fleet:read) is checked before this runs.
|
|
8
|
-
*/
|
|
9
|
-
export function createReadOverdue(deps) {
|
|
10
|
-
return async (caller) => (await deps.history.overdue(caller.fleetId)).map((entry) => ({ ...entry, message: withPing(entry.message) }));
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=read-overdue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"read-overdue.js","sourceRoot":"","sources":["../../../src/domain/shared/read-overdue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAA4C,MAAM,cAAc,CAAC;AAIlF;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAA8B;IAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AACzI,CAAC"}
|