@aeolus-fleet/core 0.34.0 → 0.35.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 +5 -4
- package/dist/adapters/prisma/alerts.d.ts +21 -0
- package/dist/adapters/prisma/alerts.js +61 -0
- package/dist/adapters/prisma/alerts.js.map +1 -0
- package/dist/adapters/prisma/expectations.d.ts +19 -0
- package/dist/adapters/prisma/expectations.js +46 -0
- package/dist/adapters/prisma/expectations.js.map +1 -0
- package/dist/adapters/prisma/generated/browser.d.ts +18 -1
- package/dist/adapters/prisma/generated/client.d.ts +18 -1
- package/dist/adapters/prisma/generated/commonInputTypes.d.ts +30 -0
- package/dist/adapters/prisma/generated/enums.d.ts +7 -0
- package/dist/adapters/prisma/generated/enums.js +6 -0
- 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 +197 -1
- package/dist/adapters/prisma/generated/internal/prismaNamespace.js +36 -0
- package/dist/adapters/prisma/generated/internal/prismaNamespace.js.map +1 -1
- package/dist/adapters/prisma/generated/internal/prismaNamespaceBrowser.d.ts +38 -0
- package/dist/adapters/prisma/generated/internal/prismaNamespaceBrowser.js +36 -0
- package/dist/adapters/prisma/generated/internal/prismaNamespaceBrowser.js.map +1 -1
- package/dist/adapters/prisma/generated/models/Alert.d.ts +1527 -0
- package/dist/adapters/prisma/generated/models/Alert.js +2 -0
- package/dist/adapters/prisma/generated/models/Alert.js.map +1 -0
- package/dist/adapters/prisma/generated/models/Fleet.d.ts +1068 -118
- package/dist/adapters/prisma/generated/models/Lease.d.ts +509 -2
- package/dist/adapters/prisma/generated/models/Message.d.ts +1 -1
- package/dist/adapters/prisma/generated/models/Ship.d.ts +939 -1
- package/dist/adapters/prisma/generated/models/ShipExpectations.d.ts +1468 -0
- package/dist/adapters/prisma/generated/models/ShipExpectations.js +2 -0
- package/dist/adapters/prisma/generated/models/ShipExpectations.js.map +1 -0
- package/dist/adapters/prisma/generated/models.d.ts +2 -0
- package/dist/adapters/prisma/history-pruner.js +24 -2
- package/dist/adapters/prisma/history-pruner.js.map +1 -1
- package/dist/adapters/prisma/history.js +9 -2
- package/dist/adapters/prisma/history.js.map +1 -1
- package/dist/adapters/prisma/overdue.js +1 -1
- package/dist/adapters/prisma/registry.d.ts +2 -1
- package/dist/adapters/prisma/registry.js +66 -14
- package/dist/adapters/prisma/registry.js.map +1 -1
- package/dist/adapters/prisma/rows.d.ts +3 -0
- package/dist/adapters/prisma/rows.js +40 -4
- package/dist/adapters/prisma/rows.js.map +1 -1
- 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/trpc/alert-output.d.ts +4 -0
- package/dist/adapters/trpc/alert-output.js +15 -0
- package/dist/adapters/trpc/alert-output.js.map +1 -0
- package/dist/adapters/trpc/context.d.ts +12 -0
- package/dist/adapters/trpc/fleet.d.ts +479 -5
- package/dist/adapters/trpc/fleet.js +123 -10
- package/dist/adapters/trpc/fleet.js.map +1 -1
- package/dist/adapters/trpc/router.d.ts +506 -4
- 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 +1 -1
- package/dist/adapters/trpc/ship-protocol.js.map +1 -1
- package/dist/adapters/trpc/ship.d.ts +38 -3
- package/dist/adapters/trpc/ship.js +11 -7
- package/dist/adapters/trpc/ship.js.map +1 -1
- package/dist/adapters/trpc/trpc.js +4 -0
- package/dist/adapters/trpc/trpc.js.map +1 -1
- package/dist/domain/messaging/message.d.ts +5 -1
- package/dist/domain/messaging/message.js.map +1 -1
- package/dist/domain/messaging/overdue.d.ts +4 -1
- package/dist/domain/messaging/overdue.js +3 -3
- package/dist/domain/messaging/overdue.js.map +1 -1
- package/dist/domain/messaging/payload.d.ts +1 -1
- package/dist/domain/messaging/payload.js +2 -2
- package/dist/domain/messaging/payload.js.map +1 -1
- package/dist/domain/messaging/sealed-payload.js +1 -1
- package/dist/domain/messaging/send-message.d.ts +1 -1
- package/dist/domain/messaging/send-message.js +1 -1
- package/dist/domain/registry/alert.d.ts +75 -0
- package/dist/domain/registry/alert.js +71 -0
- package/dist/domain/registry/alert.js.map +1 -0
- package/dist/domain/registry/claim-ship.d.ts +2 -1
- package/dist/domain/registry/claim-ship.js +1 -1
- package/dist/domain/registry/claim-ship.js.map +1 -1
- package/dist/domain/registry/clear-alert.d.ts +32 -0
- package/dist/domain/registry/clear-alert.js +40 -0
- package/dist/domain/registry/clear-alert.js.map +1 -0
- package/dist/domain/registry/crew-request.d.ts +9 -0
- package/dist/domain/registry/crew-request.js +7 -0
- package/dist/domain/registry/crew-request.js.map +1 -1
- package/dist/domain/registry/expectations.d.ts +68 -0
- package/dist/domain/registry/expectations.js +84 -0
- package/dist/domain/registry/expectations.js.map +1 -0
- package/dist/domain/registry/get-ship.d.ts +9 -1
- package/dist/domain/registry/get-ship.js +10 -2
- package/dist/domain/registry/get-ship.js.map +1 -1
- package/dist/domain/registry/lease-activity.d.ts +15 -0
- package/dist/domain/registry/lease-activity.js +2 -0
- package/dist/domain/registry/lease-activity.js.map +1 -0
- package/dist/domain/registry/lease.d.ts +1 -1
- package/dist/domain/registry/list-fleet.d.ts +6 -1
- package/dist/domain/registry/list-fleet.js +5 -3
- package/dist/domain/registry/list-fleet.js.map +1 -1
- package/dist/domain/registry/ports.d.ts +61 -1
- package/dist/domain/registry/public.d.ts +2 -0
- package/dist/domain/registry/public.js +1 -0
- package/dist/domain/registry/public.js.map +1 -1
- package/dist/domain/registry/raise-alert.d.ts +31 -0
- package/dist/domain/registry/raise-alert.js +43 -0
- package/dist/domain/registry/raise-alert.js.map +1 -0
- package/dist/domain/registry/read-open-alerts.d.ts +23 -0
- package/dist/domain/registry/read-open-alerts.js +21 -0
- package/dist/domain/registry/read-open-alerts.js.map +1 -0
- package/dist/domain/registry/report-activity.d.ts +41 -0
- package/dist/domain/registry/report-activity.js +43 -0
- package/dist/domain/registry/report-activity.js.map +1 -0
- package/dist/domain/registry/report-step.d.ts +8 -0
- package/dist/domain/registry/report-step.js +16 -0
- package/dist/domain/registry/report-step.js.map +1 -0
- package/dist/domain/registry/report-task.d.ts +14 -0
- package/dist/domain/registry/report-task.js +39 -0
- package/dist/domain/registry/report-task.js.map +1 -0
- package/dist/domain/registry/report.d.ts +2 -2
- package/dist/domain/registry/report.js.map +1 -1
- package/dist/domain/registry/retire-ship.d.ts +6 -2
- package/dist/domain/registry/retire-ship.js +12 -1
- package/dist/domain/registry/retire-ship.js.map +1 -1
- package/dist/domain/registry/set-expectations.d.ts +33 -0
- package/dist/domain/registry/set-expectations.js +47 -0
- package/dist/domain/registry/set-expectations.js.map +1 -0
- package/dist/domain/registry/ship-report.d.ts +24 -7
- package/dist/domain/registry/ship-report.js +41 -5
- package/dist/domain/registry/ship-report.js.map +1 -1
- package/dist/domain/registry/ship.d.ts +7 -1
- package/dist/domain/registry/ship.js +3 -0
- package/dist/domain/registry/ship.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/history-pruning.d.ts +19 -2
- package/dist/domain/shared/history-pruning.js +1 -1
- package/dist/domain/shared/history-pruning.js.map +1 -1
- package/dist/domain/shared/history.d.ts +2 -1
- package/dist/domain/shared/history.js.map +1 -1
- package/dist/domain/shared/prune-history.d.ts +2 -1
- package/dist/domain/shared/prune-history.js +8 -6
- package/dist/domain/shared/prune-history.js.map +1 -1
- package/dist/domain/shared/read-message-deliveries.d.ts +2 -1
- package/dist/domain/shared/read-message-deliveries.js +4 -3
- package/dist/domain/shared/read-message-deliveries.js.map +1 -1
- package/dist/domain/shared/read-message.d.ts +2 -1
- package/dist/domain/shared/read-message.js +6 -3
- package/dist/domain/shared/read-message.js.map +1 -1
- package/dist/domain/shared/read-report-tasks.d.ts +10 -0
- package/dist/domain/shared/read-report-tasks.js +24 -0
- package/dist/domain/shared/read-report-tasks.js.map +1 -0
- package/dist/wiring.d.ts +12 -0
- package/dist/wiring.js +12 -0
- package/dist/wiring.js.map +1 -1
- package/package.json +2 -2
- package/src/adapters/prisma/migrations/20261103090000_removed_ships/migration.sql +21 -0
- package/src/adapters/prisma/migrations/20261104090000_report_task_step/migration.sql +10 -0
- package/src/adapters/prisma/migrations/20261105090000_payload_limit_256kb/migration.sql +15 -0
- package/src/adapters/prisma/migrations/20261106090000_lease_activity/migration.sql +11 -0
- package/src/adapters/prisma/migrations/20261107090000_alert_scope/migration.sql +64 -0
- package/src/adapters/prisma/migrations/20261107100000_alerts/migration.sql +33 -0
- package/src/adapters/prisma/migrations/20261108090000_ship_expectations/migration.sql +22 -0
- package/src/adapters/prisma/schema.prisma +106 -23
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The [Aeolus](https://github.com/ThomasHendrickx/aeolus-fleet) server: one tRPC API and the fleet domain on Postgres, with its migrations.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Before 1.0.0 the API may change between minor releases.
|
|
6
6
|
|
|
7
7
|
## Running from npm
|
|
8
8
|
|
|
@@ -41,6 +41,7 @@ Environment variables, validated at startup (see `.env.example`):
|
|
|
41
41
|
| `TRUST_PROXY` | `false` | `true` behind a reverse proxy, so the sign-in and failed-register rate limits count per client address from `X-Forwarded-For`; without it every client behind the proxy shares one budget |
|
|
42
42
|
| `COOKIE_DOMAIN` | unset | The domain the console session cookie is set for, such as `fleet.example.com`, so a console on another host under it receives the cookie. Every host under it does, so pick the narrowest domain the console and the server share. Unset: the server's host only |
|
|
43
43
|
| `INSTALLATION_TOKEN` | unset | The token a hosting service presents to the installation procedures (at least 32 characters; see docs/architecture.md, "Installation"). Unset: they are off, as a self-hosted server needs |
|
|
44
|
+
| `ACCOUNT_TOKEN_ISSUER` | unset | pagasae's issuer (`https://`), whose keys at `<issuer>/.well-known/jwks.json` sign account tokens (decision 0058; docs/architecture.md, Actors). Unset, no account token is trusted |
|
|
44
45
|
| `KMS_REGION` | unset | The AWS KMS region of the installation's one KMS principal, which seals fleets under each company's own key (docs/decisions/0068-sealed-fleets.md). Its credentials come from the AWS SDK's own chain: `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`, or the role the server runs as. Unset: no fleet can be sealed |
|
|
45
46
|
| `KMS_ENDPOINT` | AWS's own | Another KMS endpoint, such as LocalStack's `http://localhost:4566`; needs `KMS_REGION` |
|
|
46
47
|
| `CONSOLE_ORIGIN` | `PUBLIC_URL`'s origin | The console's origin, such as `https://console.fleet.example.com`: the only origin a state-changing console call (sign-in, sign-out, a change made with the session cookie) is taken from, and the one origin allowed to call with credentials from another host (CORS). The default fits web and server behind one host. In development the console runs on `http://localhost:3000` (see `.env.example`) |
|
|
@@ -126,7 +127,7 @@ The operator gets a ship's starting prompt from `fleet.commission`, or later fro
|
|
|
126
127
|
|
|
127
128
|
A session crews an agent ship with `ship.register`: the ship id and secret from its starting prompt, and where it runs (`DEVICE`, `CLOUD`, `SERVER`, or `OTHER` with a description). It gets a crew token (`aeolus_ct_v1_...`) back once, and every later call carries it as `Authorization: Bearer <crew token>`; the secret works only for `register`. A second `register` fails while a session crews the ship. Failed `register` attempts (a wrong ship id or secret) are rate-limited per client address; a successful claim never counts, so one address can start many sessions. `ship.whoami` answers the caller's ship: id, fleet, name and type.
|
|
128
129
|
|
|
129
|
-
`ship.send` sends a message from the calling ship (a crew token, or the console session as `argo`); it needs the `messages:send` scope. It takes a selector (`{ "kind": "ship", "shipId": "shp_..." }`, `{ "kind": "ship", "name": "scout" }` or `{ "kind": "type", "type": "reviewer" }`), a payload (text of at most
|
|
130
|
+
`ship.send` sends a message from the calling ship (a crew token, or the console session as `argo`); it needs the `messages:send` scope. It takes a selector (`{ "kind": "ship", "shipId": "shp_..." }`, `{ "kind": "ship", "name": "scout" }` or `{ "kind": "type", "type": "reviewer" }`), a payload (text of at most 256 KB in UTF-8, never parsed), optionally its content type (any well-formed media type, such as `text/plain` or `application/json; charset=utf-8`, passed on untouched; `text/plain` when left out), the model the sending session runs now (`model`, its exact id, such as `claude-opus-5-5`; every ship states it on every send, so a send without it is refused (`BAD_REQUEST`), and only `argo` states none; code that runs no model, such as a script or a service, states its package or name and the version it runs, as squadrons states `@aeolus-fleet/squadrons@<version>`), the sender's own idempotency key (1 to 256 characters) and, for a reply, `inReplyTo` (a message id of the fleet). A name is resolved to the ship's id when the message is sent; a retired or unknown ship, or a type without an active ship, is refused. It answers `{ "messageId": "msg_..." }` only once the message and its delivery are stored. A repeat of the key with the same request (selector as sent, payload, content type, `inReplyTo`; no content type is the same as `text/plain`) answers with the original id; the same key with another request is refused (`CONFLICT`). When the send commits, Postgres `NOTIFY` announces the delivery on the channel `aeolus_delivery_pending`.
|
|
130
131
|
|
|
131
132
|
`ship.receive` and `ship.ack` take the crew token only (the console session is refused) and need the `messages:receive` scope. `ship.receive` takes `{ "max": 1 to 10 }`, one when left out, and answers `{ "deliveries": [...] }`: the crew's own unacknowledged deliveries in flight first, then the oldest pending ones for its ship or its type. Each comes with its message and its sender (`deliveryId`, `messageId`, `senderShipId`, `senderName`, `senderType`, `recipient`, `payload`, `contentType`, `inReplyTo`, `sentAt`, `attempts`; the sender's name and type as they are at the receive, so a renamed sender goes by its new name) and is handed at once: in flight with the crew until acknowledged or the lease ends. The crew's next receive hands it again, counted as another attempt, so a lost reply loses nothing. The fifth attempt of a delivery never acknowledged is refused: it becomes undeliverable instead and is handed to no one. With nothing there, a receive waits about 25 seconds and answers with no deliveries; a delivery for its ship or type wakes it at once. `ship.pushReceive` (decision 0040), for a pushed ship's trierarch or plugin watcher, takes the same input as `ship.receive` and answers the same deliveries, each with `state` (`received` or `handed`) and `handOverNumber`: a pending one becomes received, in flight with the crew, with no attempt counted; the crew's own received and handed ones come first again, unchanged. From the lease's first push receive until it ends, `ship.receive` answers no deliveries. `ship.handed` takes `{ "deliveryId": "dlv_...", "handOverNumber": n }` and answers `{ "state": "handed" | "acknowledged" | "undeliverable" }`: a number higher than the last counts one attempt, the same or a lower one changes nothing, and the fifth attempt is undeliverable; with `"isOnceMore": true` it hands an acknowledged delivery once more after its turn died, counting no attempt, only once. `ship.handled` and `ship.notHandled` take `{ "deliveryId": "dlv_..." }` and answer `{}`: the turn that took an acknowledged delivery ended by itself, or the turn it was handed once more to died too; again is OK, and a delivery not acknowledged, or not handed once more for `notHandled`, is refused (`CONFLICT`). `ship.ack` takes `{ "deliveryId": "dlv_..." }` and answers `{}`: only the ship holding the delivery in flight, received or handed, acknowledges it, and acknowledging it again is OK. `ship.pong` takes the crew token and the same scope, takes `{ "deliveryId": "dlv_..." }` of a ping the ship holds in flight and answers `{}`: it acknowledges the ping, with `answer: pong` in `DeliveryAcknowledged`, and marks the lease last seen, in one transaction; again is OK and changes nothing, and a delivery that is not a ping is refused (`CONFLICT`). `ship.report` takes the crew token and no scope: `{ "state": "working" | "blocked" | "idle", "note"?: "..." }` (one line, at most 200 characters, trimmed), answers `{}`. The report is kept with the crew's lease, so the ship's next crew starts with none, and `fleet.list` and `fleet.ship` show it (`report: { state, note, reportedAt }` or null); `ShipReported` is written only when the state or the note changes, so reporting the same again is a check-in. `ship.turn` takes the crew token and no scope: `{ "turn": "idle" | "busy", "at": "<ISO 8601>" }`, answers `{}`; the lease keeps the turn at that time with `TurnReported`, and the same turn again or a report older than the one held changes nothing. `ship.inbox` takes the crew token and the same scope, takes `{ "waitSeconds": 0 to 25 }`, none when left out, and answers `{ "waiting": n }`: how many deliveries the crew's next receive would hand it, its own in flight included. It claims nothing. While none waits it waits up to `waitSeconds`, woken like a receive. A mutation only so REST takes its body; it changes nothing.
|
|
132
133
|
|
|
@@ -142,9 +143,9 @@ Needs attention: `fleet.needsAttention` (`fleet:read`) lists every undeliverable
|
|
|
142
143
|
|
|
143
144
|
The operator inbox: `fleet.inbox` (`{ "filter": "open" | "done" | "all" }`, `fleet:read`) lists the messages addressed to the caller itself (argo's, for the console; argo's too for a viewer session, decision 0022), newest first, each with its delivery's state, `readAt`, `doneAt`, `repliedWith` and its whole message. Only argo's console session calls the rest; any other ship is refused (`FORBIDDEN`), and a delivery not in argo's inbox is `NOT_FOUND`. `fleet.markRead` (`{ "deliveryId", "isRead" }`, `messages:receive`) marks it read (keeping the first read) or unread; read is not done, and no event is written. `fleet.markDone` (`{ "deliveryId" }`, `messages:receive`) hands and acknowledges it at once under the console session's lease; again is OK. `fleet.reply` (`{ "deliveryId", "payload", "idempotencyKey" }`, `messages:send` and `messages:receive`) sends the payload as `text/plain` from argo to the message's sender with `inReplyTo`, and marks the message done in one transaction; it answers `{ "messageId" }`, and a repeat of the key answers the same reply.
|
|
144
145
|
|
|
145
|
-
A ship reaches the same calls without installing anything, as REST under `/api/v1` or as MCP tools at `/mcp`. Both map onto the ship procedures above and hold no logic of their own; neither reads the console session cookie, so a call without a valid crew token is told to use the crew token alone, and failed `register` attempts count against one limit per client address whichever door they come through. A failure in either door, inside a procedure or not, answers only `Internal error` and the request's id. The MCP server sends the ship protocol (`adapters/trpc/ship-protocol.ts`) as its instructions when a client connects, and the OpenAPI spec's description opens with the same text
|
|
146
|
+
A ship reaches the same calls without installing anything, as REST under `/api/v1` or as MCP tools at `/mcp`. Both map onto the ship procedures above and hold no logic of their own; neither reads the console session cookie, so a call without a valid crew token is told to use the crew token alone, and failed `register` attempts count against one limit per client address whichever door they come through. A failure in either door, inside a procedure or not, answers only `Internal error` and the request's id. The MCP server sends the ship protocol (`adapters/trpc/ship-protocol.ts`) as its instructions when a client connects, and the OpenAPI spec's description opens with the same text. Each call's description states only that call's own rules, such as `inReplyTo` taking the message id and a new idempotency key for every message; no rule is stated in both.
|
|
146
147
|
|
|
147
|
-
- **REST**:
|
|
148
|
+
- **REST**: one route per ship procedure and fleet action (`src/adapters/rest/README.md`), with the crew token as `Authorization: Bearer`. A refusal answers with its code's HTTP status and `{ "code": "CONFLICT", "message": "..." }`. The OpenAPI 3.1 spec is at `/api/v1/openapi.json`, and as a readable page at `/api/v1/docs`.
|
|
148
149
|
- **MCP**: a remote MCP server over streamable HTTP, one tool per call. The connection carries no ship, so many conversations can share it (ADR 0015): every tool but `register` takes the crew token as its `crewToken` argument. A refusal is a tool error reading `CODE: message`. To add it to Claude Code, for every session on the machine: `claude mcp add --transport http --scope user aeolus <PUBLIC_URL>/mcp`. A chat app (Claude chat, ChatGPT) connects `<PUBLIC_URL>/mcp` as a remote MCP server or connector, without auth.
|
|
149
150
|
|
|
150
151
|
The server listens on `aeolus_delivery_pending` over a connection of its own (named `aeolus-delivery-listener` in Postgres), which needs a direct database connection, not a transaction pooler. After a lost connection it listens again, with a delay that doubles up to 30 seconds, and every waiting receive then looks again, since notices sent meanwhile are gone.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Alert } from '../../domain/registry/alert.js';
|
|
2
|
+
import type { AlertRepository } from '../../domain/registry/ports.js';
|
|
3
|
+
import type { Db } from './client.js';
|
|
4
|
+
interface AlertRow {
|
|
5
|
+
id: string;
|
|
6
|
+
fleetId: string;
|
|
7
|
+
shipId: string;
|
|
8
|
+
signal: string;
|
|
9
|
+
occurrenceKey: string;
|
|
10
|
+
facts: unknown;
|
|
11
|
+
ownerShipId: string | null;
|
|
12
|
+
since: Date;
|
|
13
|
+
raisedAt: Date;
|
|
14
|
+
clearedAt: Date | null;
|
|
15
|
+
clearedWhy: string | null;
|
|
16
|
+
}
|
|
17
|
+
/** The alert a row holds, its signal and facts parsed by common's schema. */
|
|
18
|
+
export declare function alertOf(row: AlertRow): Alert;
|
|
19
|
+
/** The fleet's alerts on Postgres (decision 0071), unique per ship, signal and occurrence. */
|
|
20
|
+
export declare function createPrismaAlertRepository(db: Db): AlertRepository;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { alertClearedWhySchema, alertSignalFactsSchema, idSchema } from '@aeolus-fleet/common';
|
|
2
|
+
/** The alert a row holds, its signal and facts parsed by common's schema. */
|
|
3
|
+
export function alertOf(row) {
|
|
4
|
+
const signalFacts = alertSignalFactsSchema.parse({ signal: row.signal, facts: row.facts });
|
|
5
|
+
return {
|
|
6
|
+
...signalFacts,
|
|
7
|
+
fleetId: idSchema('fleet').parse(row.fleetId),
|
|
8
|
+
id: idSchema('alert').parse(row.id),
|
|
9
|
+
shipId: idSchema('ship').parse(row.shipId),
|
|
10
|
+
occurrenceKey: row.occurrenceKey,
|
|
11
|
+
ownerShipId: row.ownerShipId === null ? null : idSchema('ship').parse(row.ownerShipId),
|
|
12
|
+
since: row.since,
|
|
13
|
+
raisedAt: row.raisedAt,
|
|
14
|
+
cleared: row.clearedAt === null ? null : { at: row.clearedAt, why: alertClearedWhySchema.parse(row.clearedWhy) },
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/** The fleet's alerts on Postgres (decision 0071), unique per ship, signal and occurrence. */
|
|
18
|
+
export function createPrismaAlertRepository(db) {
|
|
19
|
+
const find = async (fleetId, alertId) => {
|
|
20
|
+
const row = await db.alert.findFirst({ where: { fleetId, id: alertId } });
|
|
21
|
+
return row === null ? undefined : alertOf(row);
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
findByOccurrence: async (fleetId, { shipId, signal, occurrenceKey }) => {
|
|
25
|
+
const row = await db.alert.findUnique({ where: { fleetId_shipId_signal_occurrenceKey: { fleetId, shipId, signal, occurrenceKey } } });
|
|
26
|
+
return row === null ? undefined : alertOf(row);
|
|
27
|
+
},
|
|
28
|
+
find,
|
|
29
|
+
findForUpdate: async (fleetId, alertId) => {
|
|
30
|
+
await db.$queryRaw `SELECT 1 FROM alerts WHERE fleet_id = ${fleetId} AND id = ${alertId} FOR UPDATE`;
|
|
31
|
+
return find(fleetId, alertId);
|
|
32
|
+
},
|
|
33
|
+
listOpenOnShipForUpdate: async (fleetId, shipId) => {
|
|
34
|
+
// Through alerts_open_on_ship_idx.
|
|
35
|
+
await db.$queryRaw `SELECT 1 FROM alerts WHERE fleet_id = ${fleetId} AND ship_id = ${shipId} AND cleared_at IS NULL FOR UPDATE`;
|
|
36
|
+
return (await db.alert.findMany({ where: { fleetId, shipId, clearedAt: null }, orderBy: { id: 'asc' } })).map(alertOf);
|
|
37
|
+
},
|
|
38
|
+
create: async (alert) => {
|
|
39
|
+
await db.alert.create({
|
|
40
|
+
data: {
|
|
41
|
+
id: alert.id,
|
|
42
|
+
fleetId: alert.fleetId,
|
|
43
|
+
shipId: alert.shipId,
|
|
44
|
+
signal: alert.signal,
|
|
45
|
+
occurrenceKey: alert.occurrenceKey,
|
|
46
|
+
facts: alert.facts,
|
|
47
|
+
ownerShipId: alert.ownerShipId,
|
|
48
|
+
since: alert.since,
|
|
49
|
+
raisedAt: alert.raisedAt,
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
saveCleared: async (alert) => {
|
|
54
|
+
await db.alert.update({
|
|
55
|
+
where: { id: alert.id, fleetId: alert.fleetId },
|
|
56
|
+
data: { clearedAt: alert.cleared?.at ?? null, clearedWhy: alert.cleared?.why ?? null },
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=alerts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alerts.js","sourceRoot":"","sources":["../../../src/adapters/prisma/alerts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,QAAQ,EAAyB,MAAM,sBAAsB,CAAC;AAoBtH,6EAA6E;AAC7E,MAAM,UAAU,OAAO,CAAC,GAAa;IACnC,MAAM,WAAW,GAAqB,sBAAsB,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,CA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aAAa,EAAE,KAAK,CAAC,aAAa;oBAClC,KAAK,EAAE,KAAK,CAAC,KAAK;oBAClB,WAAW,EAAE,KAAK,CAAC,WAAW;oBAC9B,KAAK,EAAE,KAAK,CAAC,KAAK;oBAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ;iBACzB;aACF,CAAC,CAAC;QACL,CAAC;QACD,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;YAC3B,MAAM,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;gBACpB,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE;gBAC/C,IAAI,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,EAAE;aACvF,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ShipExpectations } from '../../domain/registry/expectations.js';
|
|
2
|
+
import type { ExpectationsRepository } from '../../domain/registry/ports.js';
|
|
3
|
+
import type { Db } from './client.js';
|
|
4
|
+
interface ExpectationsRow {
|
|
5
|
+
fleetId: string;
|
|
6
|
+
shipId: string;
|
|
7
|
+
reportChangesWithinMinutes: number | null;
|
|
8
|
+
reportChangesWithinSetBy: unknown;
|
|
9
|
+
reportChangesWithinSetAt: Date | null;
|
|
10
|
+
taskDoneByTask: unknown;
|
|
11
|
+
taskDoneBy: Date | null;
|
|
12
|
+
taskDoneBySetBy: unknown;
|
|
13
|
+
taskDoneBySetAt: Date | null;
|
|
14
|
+
}
|
|
15
|
+
/** What a row holds, its setters and task parsed by common's schemas; an expectation whose columns are null is not set. */
|
|
16
|
+
export declare function shipExpectationsOf(row: ExpectationsRow): ShipExpectations;
|
|
17
|
+
/** The expectations on ships on Postgres (decision 0071), one row per ship. */
|
|
18
|
+
export declare function createPrismaExpectationsRepository(db: Db): ExpectationsRepository;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { expectationSetterSchema, idSchema, reportTaskSchema } from '@aeolus-fleet/common';
|
|
2
|
+
import { Prisma } from './generated/client.js';
|
|
3
|
+
/** What a row holds, its setters and task parsed by common's schemas; an expectation whose columns are null is not set. */
|
|
4
|
+
export function shipExpectationsOf(row) {
|
|
5
|
+
return {
|
|
6
|
+
reportChangesWithin: row.reportChangesWithinMinutes === null || row.reportChangesWithinSetAt === null
|
|
7
|
+
? null
|
|
8
|
+
: { minutes: row.reportChangesWithinMinutes, setBy: expectationSetterSchema.parse(row.reportChangesWithinSetBy), setAt: row.reportChangesWithinSetAt },
|
|
9
|
+
taskDoneBy: row.taskDoneBy === null || row.taskDoneBySetAt === null
|
|
10
|
+
? null
|
|
11
|
+
: { task: reportTaskSchema.parse(row.taskDoneByTask), doneBy: row.taskDoneBy, setBy: expectationSetterSchema.parse(row.taskDoneBySetBy), setAt: row.taskDoneBySetAt },
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/** The row's columns; DbNull: an expectation not set is SQL NULL, not the JSON value null. */
|
|
15
|
+
function columnsOf({ reportChangesWithin, taskDoneBy }) {
|
|
16
|
+
return {
|
|
17
|
+
reportChangesWithinMinutes: reportChangesWithin?.minutes ?? null,
|
|
18
|
+
reportChangesWithinSetBy: reportChangesWithin?.setBy ?? Prisma.DbNull,
|
|
19
|
+
reportChangesWithinSetAt: reportChangesWithin?.setAt ?? null,
|
|
20
|
+
taskDoneByTask: taskDoneBy?.task ?? Prisma.DbNull,
|
|
21
|
+
taskDoneBy: taskDoneBy?.doneBy ?? null,
|
|
22
|
+
taskDoneBySetBy: taskDoneBy?.setBy ?? Prisma.DbNull,
|
|
23
|
+
taskDoneBySetAt: taskDoneBy?.setAt ?? null,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/** The expectations on ships on Postgres (decision 0071), one row per ship. */
|
|
27
|
+
export function createPrismaExpectationsRepository(db) {
|
|
28
|
+
return {
|
|
29
|
+
find: async (fleetId, shipId) => {
|
|
30
|
+
const row = await db.shipExpectations.findUnique({ where: { fleetId_shipId: { fleetId, shipId } } });
|
|
31
|
+
return row === null ? undefined : { fleetId: idSchema('fleet').parse(row.fleetId), shipId: idSchema('ship').parse(row.shipId), ...shipExpectationsOf(row) };
|
|
32
|
+
},
|
|
33
|
+
save: async (expectations) => {
|
|
34
|
+
const columns = columnsOf(expectations);
|
|
35
|
+
await db.shipExpectations.upsert({
|
|
36
|
+
where: { fleetId_shipId: { fleetId: expectations.fleetId, shipId: expectations.shipId } },
|
|
37
|
+
create: { fleetId: expectations.fleetId, shipId: expectations.shipId, ...columns },
|
|
38
|
+
update: columns,
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
remove: async (fleetId, shipId) => {
|
|
42
|
+
await db.shipExpectations.deleteMany({ where: { fleetId, shipId } });
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=expectations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expectations.js","sourceRoot":"","sources":["../../../src/adapters/prisma/expectations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAK3F,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAc/C,2HAA2H;AAC3H,MAAM,UAAU,kBAAkB,CAAC,GAAoB;IACrD,OAAO;QACL,mBAAmB,EACjB,GAAG,CAAC,0BAA0B,KAAK,IAAI,IAAI,GAAG,CAAC,wBAAwB,KAAK,IAAI;YAC9E,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,0BAA0B,EAAE,KAAK,EAAE,uBAAuB,CAAC,KAAK,CAAC,GAAG,CAAC,wBAAwB,CAAC,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,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,GAAG,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC;QAC9J,CAAC;QACD,IAAI,EAAE,KAAK,EAAE,YAA0B,EAAE,EAAE;YACzC,MAAM,OAAO,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC;YACxC,MAAM,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC;gBAC/B,KAAK,EAAE,EAAE,cAAc,EAAE,EAAE,OAAO,EAAE,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,MAAM,EAAE,EAAE;gBACzF,MAAM,EAAE,EAAE,OAAO,EAAE,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,MAAM,EAAE,GAAG,OAAO,EAAE;gBAClF,MAAM,EAAE,OAAO;aAChB,CAAC,CAAC;QACL,CAAC;QACD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;YAChC,MAAM,EAAE,CAAC,gBAAgB,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QACvE,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -109,6 +109,23 @@ export type DefinedScope = Prisma.DefinedScopeModel;
|
|
|
109
109
|
* by its name, as a commissioning actor is.
|
|
110
110
|
*/
|
|
111
111
|
export type VerifiedFacts = Prisma.VerifiedFactsModel;
|
|
112
|
+
/**
|
|
113
|
+
* Model Alert
|
|
114
|
+
* An alert on a ship (decision 0071): what the watch raised when a fact and
|
|
115
|
+
* its signal parted, open until the watch clears it or the ship retires.
|
|
116
|
+
* Ids start with alt_. One per ship, signal and occurrence, open or cleared,
|
|
117
|
+
* so an occurrence is raised once. facts holds the signal's facts at raise,
|
|
118
|
+
* as common's schema gives them.
|
|
119
|
+
*/
|
|
120
|
+
export type Alert = Prisma.AlertModel;
|
|
121
|
+
/**
|
|
122
|
+
* Model ShipExpectations
|
|
123
|
+
* The expectations on a ship (decision 0071): what its owner, or a ship
|
|
124
|
+
* that manages it, expects of it, standing, at most one of each. Each keeps
|
|
125
|
+
* who set it (JSON, as common's expectation setter) and when; its columns
|
|
126
|
+
* are null while it is not set. No row while none holds; a retire removes it.
|
|
127
|
+
*/
|
|
128
|
+
export type ShipExpectations = Prisma.ShipExpectationsModel;
|
|
112
129
|
/**
|
|
113
130
|
* Model ReachRefusal
|
|
114
131
|
* A send the network rules refused (decision 0034), recorded in the
|
|
@@ -143,7 +160,7 @@ export type FleetFeatureFlag = Prisma.FleetFeatureFlagModel;
|
|
|
143
160
|
export type MessageDay = Prisma.MessageDayModel;
|
|
144
161
|
/**
|
|
145
162
|
* Model Message
|
|
146
|
-
* An immutable envelope plus an opaque payload of at most
|
|
163
|
+
* An immutable envelope plus an opaque payload of at most 256 KB, sent by one ship.
|
|
147
164
|
* Ids start with msg_. The selector is stored as resolved at send time: a ship's
|
|
148
165
|
* id, never its name, or a type. It can name the message it replies to, and a
|
|
149
166
|
* resend names the message it resends (nothing sets that yet).
|
|
@@ -128,6 +128,23 @@ export type DefinedScope = Prisma.DefinedScopeModel;
|
|
|
128
128
|
* by its name, as a commissioning actor is.
|
|
129
129
|
*/
|
|
130
130
|
export type VerifiedFacts = Prisma.VerifiedFactsModel;
|
|
131
|
+
/**
|
|
132
|
+
* Model Alert
|
|
133
|
+
* An alert on a ship (decision 0071): what the watch raised when a fact and
|
|
134
|
+
* its signal parted, open until the watch clears it or the ship retires.
|
|
135
|
+
* Ids start with alt_. One per ship, signal and occurrence, open or cleared,
|
|
136
|
+
* so an occurrence is raised once. facts holds the signal's facts at raise,
|
|
137
|
+
* as common's schema gives them.
|
|
138
|
+
*/
|
|
139
|
+
export type Alert = Prisma.AlertModel;
|
|
140
|
+
/**
|
|
141
|
+
* Model ShipExpectations
|
|
142
|
+
* The expectations on a ship (decision 0071): what its owner, or a ship
|
|
143
|
+
* that manages it, expects of it, standing, at most one of each. Each keeps
|
|
144
|
+
* who set it (JSON, as common's expectation setter) and when; its columns
|
|
145
|
+
* are null while it is not set. No row while none holds; a retire removes it.
|
|
146
|
+
*/
|
|
147
|
+
export type ShipExpectations = Prisma.ShipExpectationsModel;
|
|
131
148
|
/**
|
|
132
149
|
* Model ReachRefusal
|
|
133
150
|
* A send the network rules refused (decision 0034), recorded in the
|
|
@@ -162,7 +179,7 @@ export type FleetFeatureFlag = Prisma.FleetFeatureFlagModel;
|
|
|
162
179
|
export type MessageDay = Prisma.MessageDayModel;
|
|
163
180
|
/**
|
|
164
181
|
* Model Message
|
|
165
|
-
* An immutable envelope plus an opaque payload of at most
|
|
182
|
+
* An immutable envelope plus an opaque payload of at most 256 KB, sent by one ship.
|
|
166
183
|
* Ids start with msg_. The selector is stored as resolved at send time: a ship's
|
|
167
184
|
* id, never its name, or a type. It can name the message it replies to, and a
|
|
168
185
|
* resend names the message it resends (nothing sets that yet).
|
|
@@ -285,6 +285,12 @@ export type EnumTurnStateNullableFilter<$PrismaModel = never> = {
|
|
|
285
285
|
notIn?: $Enums.TurnState[] | Prisma.ListEnumTurnStateFieldRefInput<$PrismaModel> | null;
|
|
286
286
|
not?: Prisma.NestedEnumTurnStateNullableFilter<$PrismaModel> | $Enums.TurnState | null;
|
|
287
287
|
};
|
|
288
|
+
export type EnumActivityKindNullableFilter<$PrismaModel = never> = {
|
|
289
|
+
equals?: $Enums.ActivityKind | Prisma.EnumActivityKindFieldRefInput<$PrismaModel> | null;
|
|
290
|
+
in?: $Enums.ActivityKind[] | Prisma.ListEnumActivityKindFieldRefInput<$PrismaModel> | null;
|
|
291
|
+
notIn?: $Enums.ActivityKind[] | Prisma.ListEnumActivityKindFieldRefInput<$PrismaModel> | null;
|
|
292
|
+
not?: Prisma.NestedEnumActivityKindNullableFilter<$PrismaModel> | $Enums.ActivityKind | null;
|
|
293
|
+
};
|
|
288
294
|
export type EnumLocationKindWithAggregatesFilter<$PrismaModel = never> = {
|
|
289
295
|
equals?: $Enums.LocationKind | Prisma.EnumLocationKindFieldRefInput<$PrismaModel>;
|
|
290
296
|
in?: $Enums.LocationKind[] | Prisma.ListEnumLocationKindFieldRefInput<$PrismaModel>;
|
|
@@ -341,6 +347,15 @@ export type EnumTurnStateNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
|
341
347
|
_min?: Prisma.NestedEnumTurnStateNullableFilter<$PrismaModel>;
|
|
342
348
|
_max?: Prisma.NestedEnumTurnStateNullableFilter<$PrismaModel>;
|
|
343
349
|
};
|
|
350
|
+
export type EnumActivityKindNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
351
|
+
equals?: $Enums.ActivityKind | Prisma.EnumActivityKindFieldRefInput<$PrismaModel> | null;
|
|
352
|
+
in?: $Enums.ActivityKind[] | Prisma.ListEnumActivityKindFieldRefInput<$PrismaModel> | null;
|
|
353
|
+
notIn?: $Enums.ActivityKind[] | Prisma.ListEnumActivityKindFieldRefInput<$PrismaModel> | null;
|
|
354
|
+
not?: Prisma.NestedEnumActivityKindNullableWithAggregatesFilter<$PrismaModel> | $Enums.ActivityKind | null;
|
|
355
|
+
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>;
|
|
356
|
+
_min?: Prisma.NestedEnumActivityKindNullableFilter<$PrismaModel>;
|
|
357
|
+
_max?: Prisma.NestedEnumActivityKindNullableFilter<$PrismaModel>;
|
|
358
|
+
};
|
|
344
359
|
export type JsonFilter<$PrismaModel = never> = Prisma.PatchUndefined<Prisma.Either<Required<JsonFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonFilterBase<$PrismaModel>>, 'path'>>, Required<JsonFilterBase<$PrismaModel>>> | Prisma.OptionalFlat<Omit<Required<JsonFilterBase<$PrismaModel>>, 'path'>>;
|
|
345
360
|
export type JsonFilterBase<$PrismaModel = never> = {
|
|
346
361
|
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter;
|
|
@@ -987,6 +1002,12 @@ export type NestedEnumTurnStateNullableFilter<$PrismaModel = never> = {
|
|
|
987
1002
|
notIn?: $Enums.TurnState[] | Prisma.ListEnumTurnStateFieldRefInput<$PrismaModel> | null;
|
|
988
1003
|
not?: Prisma.NestedEnumTurnStateNullableFilter<$PrismaModel> | $Enums.TurnState | null;
|
|
989
1004
|
};
|
|
1005
|
+
export type NestedEnumActivityKindNullableFilter<$PrismaModel = never> = {
|
|
1006
|
+
equals?: $Enums.ActivityKind | Prisma.EnumActivityKindFieldRefInput<$PrismaModel> | null;
|
|
1007
|
+
in?: $Enums.ActivityKind[] | Prisma.ListEnumActivityKindFieldRefInput<$PrismaModel> | null;
|
|
1008
|
+
notIn?: $Enums.ActivityKind[] | Prisma.ListEnumActivityKindFieldRefInput<$PrismaModel> | null;
|
|
1009
|
+
not?: Prisma.NestedEnumActivityKindNullableFilter<$PrismaModel> | $Enums.ActivityKind | null;
|
|
1010
|
+
};
|
|
990
1011
|
export type NestedEnumLocationKindWithAggregatesFilter<$PrismaModel = never> = {
|
|
991
1012
|
equals?: $Enums.LocationKind | Prisma.EnumLocationKindFieldRefInput<$PrismaModel>;
|
|
992
1013
|
in?: $Enums.LocationKind[] | Prisma.ListEnumLocationKindFieldRefInput<$PrismaModel>;
|
|
@@ -1040,6 +1061,15 @@ export type NestedEnumTurnStateNullableWithAggregatesFilter<$PrismaModel = never
|
|
|
1040
1061
|
_min?: Prisma.NestedEnumTurnStateNullableFilter<$PrismaModel>;
|
|
1041
1062
|
_max?: Prisma.NestedEnumTurnStateNullableFilter<$PrismaModel>;
|
|
1042
1063
|
};
|
|
1064
|
+
export type NestedEnumActivityKindNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
1065
|
+
equals?: $Enums.ActivityKind | Prisma.EnumActivityKindFieldRefInput<$PrismaModel> | null;
|
|
1066
|
+
in?: $Enums.ActivityKind[] | Prisma.ListEnumActivityKindFieldRefInput<$PrismaModel> | null;
|
|
1067
|
+
notIn?: $Enums.ActivityKind[] | Prisma.ListEnumActivityKindFieldRefInput<$PrismaModel> | null;
|
|
1068
|
+
not?: Prisma.NestedEnumActivityKindNullableWithAggregatesFilter<$PrismaModel> | $Enums.ActivityKind | null;
|
|
1069
|
+
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>;
|
|
1070
|
+
_min?: Prisma.NestedEnumActivityKindNullableFilter<$PrismaModel>;
|
|
1071
|
+
_max?: Prisma.NestedEnumActivityKindNullableFilter<$PrismaModel>;
|
|
1072
|
+
};
|
|
1043
1073
|
export type NestedEnumCrewStatusNullableFilter<$PrismaModel = never> = {
|
|
1044
1074
|
equals?: $Enums.CrewStatus | Prisma.EnumCrewStatusFieldRefInput<$PrismaModel> | null;
|
|
1045
1075
|
in?: $Enums.CrewStatus[] | Prisma.ListEnumCrewStatusFieldRefInput<$PrismaModel> | null;
|
|
@@ -31,6 +31,13 @@ export declare const TurnState: {
|
|
|
31
31
|
readonly busy: "busy";
|
|
32
32
|
};
|
|
33
33
|
export type TurnState = (typeof TurnState)[keyof typeof TurnState];
|
|
34
|
+
export declare const ActivityKind: {
|
|
35
|
+
readonly text: "text";
|
|
36
|
+
readonly tool: "tool";
|
|
37
|
+
readonly result: "result";
|
|
38
|
+
readonly error: "error";
|
|
39
|
+
};
|
|
40
|
+
export type ActivityKind = (typeof ActivityKind)[keyof typeof ActivityKind];
|
|
34
41
|
export declare const LocationKind: {
|
|
35
42
|
readonly DEVICE: "DEVICE";
|
|
36
43
|
readonly CLOUD: "CLOUD";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../../../src/adapters/prisma/generated/enums.ts"],"names":[],"mappings":"AACA,qEAAqE;AACrE,oBAAoB;AACpB,wCAAwC;AACxC,eAAe;AACf;;;;EAIE;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|
|
294
294
|
omit: OmitOpts;
|
|
295
295
|
}>;
|
|
296
|
+
/**
|
|
297
|
+
* `prisma.alert`: Exposes CRUD operations for the **Alert** model.
|
|
298
|
+
* Example usage:
|
|
299
|
+
* ```ts
|
|
300
|
+
* // Fetch zero or more Alerts
|
|
301
|
+
* const alerts = await prisma.alert.findMany()
|
|
302
|
+
* ```
|
|
303
|
+
*/
|
|
304
|
+
get alert(): Prisma.AlertDelegate<ExtArgs, {
|
|
305
|
+
omit: OmitOpts;
|
|
306
|
+
}>;
|
|
307
|
+
/**
|
|
308
|
+
* `prisma.shipExpectations`: Exposes CRUD operations for the **ShipExpectations** model.
|
|
309
|
+
* Example usage:
|
|
310
|
+
* ```ts
|
|
311
|
+
* // Fetch zero or more ShipExpectations
|
|
312
|
+
* const shipExpectations = await prisma.shipExpectations.findMany()
|
|
313
|
+
* ```
|
|
314
|
+
*/
|
|
315
|
+
get shipExpectations(): Prisma.ShipExpectationsDelegate<ExtArgs, {
|
|
316
|
+
omit: OmitOpts;
|
|
317
|
+
}>;
|
|
296
318
|
/**
|
|
297
319
|
* `prisma.reachRefusal`: Exposes CRUD operations for the **ReachRefusal** model.
|
|
298
320
|
* Example usage:
|