@aeolus-fleet/common 0.5.0 → 0.6.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/dist/fleet/index.d.ts +2 -1
- package/dist/fleet/index.js +1 -0
- package/dist/fleet/index.js.map +1 -1
- package/dist/schemas/fleet.d.ts +2 -0
- package/dist/schemas/history.d.ts +5 -1
- package/dist/schemas/history.js +1 -0
- package/dist/schemas/history.js.map +1 -1
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/needs-attention.d.ts +73 -0
- package/dist/schemas/needs-attention.js +48 -0
- package/dist/schemas/needs-attention.js.map +1 -0
- package/dist/schemas/operator-inbox.d.ts +94 -0
- package/dist/schemas/operator-inbox.js +56 -0
- package/dist/schemas/operator-inbox.js.map +1 -0
- package/package.json +1 -1
package/dist/fleet/index.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export declare const deliveryStateSchema: z.ZodEnum<{
|
|
|
63
63
|
}>;
|
|
64
64
|
export type DeliveryState = z.infer<typeof deliveryStateSchema>;
|
|
65
65
|
/** The event types written so far. Each later slice adds the ones it writes. */
|
|
66
|
-
export declare const EVENT_TYPES: readonly ["FleetInitialised", "ShipCommissioned", "ShipClaimed", "LeaseRevoked", "CredentialRevoked", "StartingPromptIssued", "OperatorPasswordReset", "MessageAccepted", "DeliveryClaimed", "DeliveryAcknowledged", "DeliveryUndeliverable", "DeliveryReturned", "ShipRetired", "DeliveryAbandoned"];
|
|
66
|
+
export declare const EVENT_TYPES: readonly ["FleetInitialised", "ShipCommissioned", "ShipClaimed", "LeaseRevoked", "CredentialRevoked", "StartingPromptIssued", "OperatorPasswordReset", "MessageAccepted", "DeliveryClaimed", "DeliveryAcknowledged", "DeliveryUndeliverable", "DeliveryReturned", "ShipRetired", "DeliveryAbandoned", "DeliveryDismissed"];
|
|
67
67
|
export declare const eventTypeSchema: z.ZodEnum<{
|
|
68
68
|
FleetInitialised: "FleetInitialised";
|
|
69
69
|
ShipCommissioned: "ShipCommissioned";
|
|
@@ -79,5 +79,6 @@ export declare const eventTypeSchema: z.ZodEnum<{
|
|
|
79
79
|
DeliveryReturned: "DeliveryReturned";
|
|
80
80
|
ShipRetired: "ShipRetired";
|
|
81
81
|
DeliveryAbandoned: "DeliveryAbandoned";
|
|
82
|
+
DeliveryDismissed: "DeliveryDismissed";
|
|
82
83
|
}>;
|
|
83
84
|
export type EventType = z.infer<typeof eventTypeSchema>;
|
package/dist/fleet/index.js
CHANGED
package/dist/fleet/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fleet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AAEH,gGAAgG;AAChG,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,eAAe,EAAE,kBAAkB,EAAE,YAAY,EAAE,cAAc,CAAU,CAAC;AACnG,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAG1C,4FAA4F;AAC5F,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,UAAU,EAAE,OAAO,CAAU,CAAC;AACzD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAGjD,kFAAkF;AAClF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAC;AAC9E,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AAGzD;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,cAAc,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AAC5E,MAAM,CAAC,MAAM,gBAAgB,GAAG,C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148
|
DeliveryReturned: "DeliveryReturned";
|
|
149
149
|
ShipRetired: "ShipRetired";
|
|
150
150
|
DeliveryAbandoned: "DeliveryAbandoned";
|
|
151
|
+
DeliveryDismissed: "DeliveryDismissed";
|
|
151
152
|
}>;
|
|
152
153
|
occurredAt: z.ZodISODateTime;
|
|
153
154
|
actorShipId: z.ZodNullable<z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>>;
|
|
@@ -180,6 +181,7 @@ export declare const fleetStreamItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
180
181
|
DeliveryReturned: "DeliveryReturned";
|
|
181
182
|
ShipRetired: "ShipRetired";
|
|
182
183
|
DeliveryAbandoned: "DeliveryAbandoned";
|
|
184
|
+
DeliveryDismissed: "DeliveryDismissed";
|
|
183
185
|
}>;
|
|
184
186
|
occurredAt: z.ZodISODateTime;
|
|
185
187
|
actorShipId: z.ZodNullable<z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>>;
|
|
@@ -78,6 +78,7 @@ export declare const timelineEntrySchema: z.ZodObject<{
|
|
|
78
78
|
DeliveryReturned: "DeliveryReturned";
|
|
79
79
|
ShipRetired: "ShipRetired";
|
|
80
80
|
DeliveryAbandoned: "DeliveryAbandoned";
|
|
81
|
+
DeliveryDismissed: "DeliveryDismissed";
|
|
81
82
|
}>;
|
|
82
83
|
occurredAt: z.ZodISODateTime;
|
|
83
84
|
actor: z.ZodNullable<z.ZodObject<{
|
|
@@ -127,6 +128,7 @@ export declare const shipTimelineOutputSchema: z.ZodArray<z.ZodObject<{
|
|
|
127
128
|
DeliveryReturned: "DeliveryReturned";
|
|
128
129
|
ShipRetired: "ShipRetired";
|
|
129
130
|
DeliveryAbandoned: "DeliveryAbandoned";
|
|
131
|
+
DeliveryDismissed: "DeliveryDismissed";
|
|
130
132
|
}>;
|
|
131
133
|
occurredAt: z.ZodISODateTime;
|
|
132
134
|
actor: z.ZodNullable<z.ZodObject<{
|
|
@@ -236,7 +238,7 @@ export declare const messageInputSchema: z.ZodObject<{
|
|
|
236
238
|
messageId: z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>;
|
|
237
239
|
}, z.core.$strip>;
|
|
238
240
|
/** The event types that change a delivery: its history. */
|
|
239
|
-
export declare const DELIVERY_HISTORY_TYPES: readonly ["MessageAccepted", "DeliveryClaimed", "DeliveryReturned", "DeliveryAcknowledged", "DeliveryUndeliverable", "DeliveryAbandoned"];
|
|
241
|
+
export declare const DELIVERY_HISTORY_TYPES: readonly ["MessageAccepted", "DeliveryClaimed", "DeliveryReturned", "DeliveryAcknowledged", "DeliveryUndeliverable", "DeliveryAbandoned", "DeliveryDismissed"];
|
|
240
242
|
/** One change to a delivery: when, which ship held it and where its session ran, and the claims counted by then. */
|
|
241
243
|
export declare const deliveryHistoryEntrySchema: z.ZodObject<{
|
|
242
244
|
seq: z.ZodNumber;
|
|
@@ -247,6 +249,7 @@ export declare const deliveryHistoryEntrySchema: z.ZodObject<{
|
|
|
247
249
|
DeliveryUndeliverable: "DeliveryUndeliverable";
|
|
248
250
|
DeliveryReturned: "DeliveryReturned";
|
|
249
251
|
DeliveryAbandoned: "DeliveryAbandoned";
|
|
252
|
+
DeliveryDismissed: "DeliveryDismissed";
|
|
250
253
|
}>;
|
|
251
254
|
occurredAt: z.ZodISODateTime;
|
|
252
255
|
ship: z.ZodNullable<z.ZodObject<{
|
|
@@ -310,6 +313,7 @@ export declare const messageOutputSchema: z.ZodObject<{
|
|
|
310
313
|
DeliveryUndeliverable: "DeliveryUndeliverable";
|
|
311
314
|
DeliveryReturned: "DeliveryReturned";
|
|
312
315
|
DeliveryAbandoned: "DeliveryAbandoned";
|
|
316
|
+
DeliveryDismissed: "DeliveryDismissed";
|
|
313
317
|
}>;
|
|
314
318
|
occurredAt: z.ZodISODateTime;
|
|
315
319
|
ship: z.ZodNullable<z.ZodObject<{
|
package/dist/schemas/history.js
CHANGED
|
@@ -79,6 +79,7 @@ export const DELIVERY_HISTORY_TYPES = [
|
|
|
79
79
|
'DeliveryAcknowledged',
|
|
80
80
|
'DeliveryUndeliverable',
|
|
81
81
|
'DeliveryAbandoned',
|
|
82
|
+
'DeliveryDismissed',
|
|
82
83
|
];
|
|
83
84
|
/** One change to a delivery: when, which ship held it and where its session ran, and the claims counted by then. */
|
|
84
85
|
export const deliveryHistoryEntrySchema = z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history.js","sourceRoot":"","sources":["../../src/schemas/history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;GAIG;AAEH,uBAAuB;AACvB,MAAM,OAAO,GAAG,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;AAEjC,2FAA2F;AAC3F,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAIhF,uEAAuE;AACvE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACjE,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IACxD,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;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,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;CACpD,CAAC,CAAC;AAIH,4GAA4G;AAC5G,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;IACpG,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC;QACjB,EAAE,EAAE,QAAQ,CAAC,UAAU,CAAC;QACxB,KAAK,EAAE,mBAAmB;QAC1B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;QACxC,SAAS,EAAE,WAAW,CAAC,QAAQ,EAAE;QACjC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,0BAA0B,CAAC;KAC7C,CAAC;CACH,CAAC,CAAC"}
|
package/dist/schemas/index.d.ts
CHANGED
package/dist/schemas/index.js
CHANGED
|
@@ -3,6 +3,8 @@ export * from './delivery.js';
|
|
|
3
3
|
export * from './fleet.js';
|
|
4
4
|
export * from './history.js';
|
|
5
5
|
export * from './message.js';
|
|
6
|
+
export * from './needs-attention.js';
|
|
7
|
+
export * from './operator-inbox.js';
|
|
6
8
|
export * from './ship.js';
|
|
7
9
|
export * from './system.js';
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** One undeliverable delivery: its claims, since when it is undeliverable, and its whole message. */
|
|
3
|
+
export declare const undeliverableDeliverySchema: z.ZodObject<{
|
|
4
|
+
deliveryId: z.ZodType<`dlv_${string}`, unknown, z.core.$ZodTypeInternals<`dlv_${string}`, unknown>>;
|
|
5
|
+
attempts: z.ZodInt;
|
|
6
|
+
since: z.ZodISODateTime;
|
|
7
|
+
message: z.ZodObject<{
|
|
8
|
+
id: z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>;
|
|
9
|
+
sender: z.ZodObject<{
|
|
10
|
+
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
recipient: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
14
|
+
kind: z.ZodLiteral<"ship">;
|
|
15
|
+
ship: z.ZodObject<{
|
|
16
|
+
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
17
|
+
name: z.ZodString;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
20
|
+
kind: z.ZodLiteral<"type">;
|
|
21
|
+
type: z.ZodString;
|
|
22
|
+
}, z.core.$strip>], "kind">;
|
|
23
|
+
inReplyTo: z.ZodNullable<z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>>;
|
|
24
|
+
sentAt: z.ZodISODateTime;
|
|
25
|
+
contentType: z.ZodString;
|
|
26
|
+
payload: z.ZodString;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export type UndeliverableDelivery = z.infer<typeof undeliverableDeliverySchema>;
|
|
30
|
+
/** Output of `fleet.needsAttention`: every undeliverable delivery of the fleet, oldest first. */
|
|
31
|
+
export declare const needsAttentionOutputSchema: z.ZodArray<z.ZodObject<{
|
|
32
|
+
deliveryId: z.ZodType<`dlv_${string}`, unknown, z.core.$ZodTypeInternals<`dlv_${string}`, unknown>>;
|
|
33
|
+
attempts: z.ZodInt;
|
|
34
|
+
since: z.ZodISODateTime;
|
|
35
|
+
message: z.ZodObject<{
|
|
36
|
+
id: z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>;
|
|
37
|
+
sender: z.ZodObject<{
|
|
38
|
+
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
39
|
+
name: z.ZodString;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
recipient: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
42
|
+
kind: z.ZodLiteral<"ship">;
|
|
43
|
+
ship: z.ZodObject<{
|
|
44
|
+
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
45
|
+
name: z.ZodString;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
48
|
+
kind: z.ZodLiteral<"type">;
|
|
49
|
+
type: z.ZodString;
|
|
50
|
+
}, z.core.$strip>], "kind">;
|
|
51
|
+
inReplyTo: z.ZodNullable<z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>>;
|
|
52
|
+
sentAt: z.ZodISODateTime;
|
|
53
|
+
contentType: z.ZodString;
|
|
54
|
+
payload: z.ZodString;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
/** Input of `fleet.dismiss`: the undeliverable delivery the operator lets go. It stays in history, dismissed. */
|
|
58
|
+
export declare const dismissDeliveryInputSchema: z.ZodObject<{
|
|
59
|
+
deliveryId: z.ZodType<`dlv_${string}`, unknown, z.core.$ZodTypeInternals<`dlv_${string}`, unknown>>;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
/** Output of `fleet.dismiss`: nothing; the OK is the answer. */
|
|
62
|
+
export declare const dismissDeliveryOutputSchema: z.ZodObject<{}, z.core.$strict>;
|
|
63
|
+
/**
|
|
64
|
+
* Input of `fleet.resend`: the undeliverable delivery to send again, as a new
|
|
65
|
+
* message from the same sender to the same recipient that names the original.
|
|
66
|
+
*/
|
|
67
|
+
export declare const resendDeliveryInputSchema: z.ZodObject<{
|
|
68
|
+
deliveryId: z.ZodType<`dlv_${string}`, unknown, z.core.$ZodTypeInternals<`dlv_${string}`, unknown>>;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
/** Output of `fleet.resend`: the new message. */
|
|
71
|
+
export declare const resendDeliveryOutputSchema: z.ZodObject<{
|
|
72
|
+
messageId: z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>;
|
|
73
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { idSchema } from '../ids/index.js';
|
|
3
|
+
import { messageRecipientSchema, partySchema } from './history.js';
|
|
4
|
+
/**
|
|
5
|
+
* Inputs and outputs of Needs attention (docs/blueprint.md, 'Domain events'):
|
|
6
|
+
* the undeliverable deliveries, oldest first, which the operator resends or
|
|
7
|
+
* dismisses. The list reads with fleet:read; resend and dismiss need
|
|
8
|
+
* fleet:manage.
|
|
9
|
+
*/
|
|
10
|
+
/** ISO 8601 in UTC. */
|
|
11
|
+
const isoTime = z.iso.datetime();
|
|
12
|
+
/** One undeliverable delivery: its claims, since when it is undeliverable, and its whole message. */
|
|
13
|
+
export const undeliverableDeliverySchema = z.object({
|
|
14
|
+
deliveryId: idSchema('delivery'),
|
|
15
|
+
/** The claims counted, none of them acknowledged. */
|
|
16
|
+
attempts: z.int().min(0),
|
|
17
|
+
/** When it became undeliverable. */
|
|
18
|
+
since: isoTime,
|
|
19
|
+
message: z.object({
|
|
20
|
+
id: idSchema('message'),
|
|
21
|
+
sender: partySchema,
|
|
22
|
+
recipient: messageRecipientSchema,
|
|
23
|
+
inReplyTo: idSchema('message').nullable(),
|
|
24
|
+
sentAt: isoTime,
|
|
25
|
+
contentType: z.string(),
|
|
26
|
+
payload: z.string(),
|
|
27
|
+
}),
|
|
28
|
+
});
|
|
29
|
+
/** Output of `fleet.needsAttention`: every undeliverable delivery of the fleet, oldest first. */
|
|
30
|
+
export const needsAttentionOutputSchema = z.array(undeliverableDeliverySchema);
|
|
31
|
+
/** Input of `fleet.dismiss`: the undeliverable delivery the operator lets go. It stays in history, dismissed. */
|
|
32
|
+
export const dismissDeliveryInputSchema = z.object({
|
|
33
|
+
deliveryId: idSchema('delivery'),
|
|
34
|
+
});
|
|
35
|
+
/** Output of `fleet.dismiss`: nothing; the OK is the answer. */
|
|
36
|
+
export const dismissDeliveryOutputSchema = z.strictObject({});
|
|
37
|
+
/**
|
|
38
|
+
* Input of `fleet.resend`: the undeliverable delivery to send again, as a new
|
|
39
|
+
* message from the same sender to the same recipient that names the original.
|
|
40
|
+
*/
|
|
41
|
+
export const resendDeliveryInputSchema = z.object({
|
|
42
|
+
deliveryId: idSchema('delivery'),
|
|
43
|
+
});
|
|
44
|
+
/** Output of `fleet.resend`: the new message. */
|
|
45
|
+
export const resendDeliveryOutputSchema = z.object({
|
|
46
|
+
messageId: idSchema('message'),
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=needs-attention.js.map
|
|
@@ -0,0 +1 @@
|
|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AY,CAAC,EAAE,CAAC,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC;CACjC,CAAC,CAAC;AAEH,iDAAiD;AACjD,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,SAAS,EAAE,QAAQ,CAAC,SAAS,CAAC;CAC/B,CAAC,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Open: not done yet. Done: acknowledged. All: both. */
|
|
3
|
+
export declare const INBOX_FILTERS: readonly ["open", "done", "all"];
|
|
4
|
+
export declare const inboxFilterSchema: z.ZodEnum<{
|
|
5
|
+
done: "done";
|
|
6
|
+
open: "open";
|
|
7
|
+
all: "all";
|
|
8
|
+
}>;
|
|
9
|
+
export type InboxFilter = z.infer<typeof inboxFilterSchema>;
|
|
10
|
+
/** Input of `fleet.inbox`. */
|
|
11
|
+
export declare const operatorInboxInputSchema: z.ZodObject<{
|
|
12
|
+
filter: z.ZodEnum<{
|
|
13
|
+
done: "done";
|
|
14
|
+
open: "open";
|
|
15
|
+
all: "all";
|
|
16
|
+
}>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
/** One message to argo: its delivery's state, when it was read and done, the reply that made it done, and the message. */
|
|
19
|
+
export declare const inboxMessageSchema: z.ZodObject<{
|
|
20
|
+
deliveryId: z.ZodType<`dlv_${string}`, unknown, z.core.$ZodTypeInternals<`dlv_${string}`, unknown>>;
|
|
21
|
+
state: z.ZodEnum<{
|
|
22
|
+
pending: "pending";
|
|
23
|
+
delivered: "delivered";
|
|
24
|
+
acknowledged: "acknowledged";
|
|
25
|
+
undeliverable: "undeliverable";
|
|
26
|
+
dismissed: "dismissed";
|
|
27
|
+
abandoned: "abandoned";
|
|
28
|
+
}>;
|
|
29
|
+
readAt: z.ZodNullable<z.ZodISODateTime>;
|
|
30
|
+
doneAt: z.ZodNullable<z.ZodISODateTime>;
|
|
31
|
+
repliedWith: z.ZodNullable<z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>>;
|
|
32
|
+
message: z.ZodObject<{
|
|
33
|
+
id: z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>;
|
|
34
|
+
sender: z.ZodObject<{
|
|
35
|
+
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
36
|
+
name: z.ZodString;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
inReplyTo: z.ZodNullable<z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>>;
|
|
39
|
+
sentAt: z.ZodISODateTime;
|
|
40
|
+
contentType: z.ZodString;
|
|
41
|
+
payload: z.ZodString;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
export type InboxMessage = z.infer<typeof inboxMessageSchema>;
|
|
45
|
+
/** Output of `fleet.inbox`: the messages to argo the filter keeps, newest first. */
|
|
46
|
+
export declare const operatorInboxOutputSchema: z.ZodArray<z.ZodObject<{
|
|
47
|
+
deliveryId: z.ZodType<`dlv_${string}`, unknown, z.core.$ZodTypeInternals<`dlv_${string}`, unknown>>;
|
|
48
|
+
state: z.ZodEnum<{
|
|
49
|
+
pending: "pending";
|
|
50
|
+
delivered: "delivered";
|
|
51
|
+
acknowledged: "acknowledged";
|
|
52
|
+
undeliverable: "undeliverable";
|
|
53
|
+
dismissed: "dismissed";
|
|
54
|
+
abandoned: "abandoned";
|
|
55
|
+
}>;
|
|
56
|
+
readAt: z.ZodNullable<z.ZodISODateTime>;
|
|
57
|
+
doneAt: z.ZodNullable<z.ZodISODateTime>;
|
|
58
|
+
repliedWith: z.ZodNullable<z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>>;
|
|
59
|
+
message: z.ZodObject<{
|
|
60
|
+
id: z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>;
|
|
61
|
+
sender: z.ZodObject<{
|
|
62
|
+
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
63
|
+
name: z.ZodString;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
inReplyTo: z.ZodNullable<z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>>;
|
|
66
|
+
sentAt: z.ZodISODateTime;
|
|
67
|
+
contentType: z.ZodString;
|
|
68
|
+
payload: z.ZodString;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
}, z.core.$strip>>;
|
|
71
|
+
/** Input of `fleet.markRead`: a delivery to argo, read or unread again. */
|
|
72
|
+
export declare const markReadInputSchema: z.ZodObject<{
|
|
73
|
+
deliveryId: z.ZodType<`dlv_${string}`, unknown, z.core.$ZodTypeInternals<`dlv_${string}`, unknown>>;
|
|
74
|
+
isRead: z.ZodBoolean;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
/** Output of `fleet.markRead` and `fleet.markDone`: nothing; the OK is the answer. */
|
|
77
|
+
export declare const inboxActionOutputSchema: z.ZodObject<{}, z.core.$strict>;
|
|
78
|
+
/** Input of `fleet.markDone`: a delivery to argo, acknowledged without a reply. */
|
|
79
|
+
export declare const markDoneInputSchema: z.ZodObject<{
|
|
80
|
+
deliveryId: z.ZodType<`dlv_${string}`, unknown, z.core.$ZodTypeInternals<`dlv_${string}`, unknown>>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
/**
|
|
83
|
+
* Input of `fleet.reply`: an answer to a message sent to argo, named by its
|
|
84
|
+
* delivery, as plain text to its sender, which also marks the message done.
|
|
85
|
+
*/
|
|
86
|
+
export declare const replyInputSchema: z.ZodObject<{
|
|
87
|
+
deliveryId: z.ZodType<`dlv_${string}`, unknown, z.core.$ZodTypeInternals<`dlv_${string}`, unknown>>;
|
|
88
|
+
payload: z.ZodString;
|
|
89
|
+
idempotencyKey: z.ZodString;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
/** Output of `fleet.reply`: the reply. */
|
|
92
|
+
export declare const replyOutputSchema: z.ZodObject<{
|
|
93
|
+
messageId: z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>;
|
|
94
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { deliveryStateSchema } from '../fleet/index.js';
|
|
3
|
+
import { idSchema } from '../ids/index.js';
|
|
4
|
+
import { partySchema } from './history.js';
|
|
5
|
+
import { sendInputSchema } from './message.js';
|
|
6
|
+
/**
|
|
7
|
+
* Inputs and outputs of the operator inbox (docs/blueprint.md, "Inbox"): the
|
|
8
|
+
* messages ships sent to argo. Opening one marks it read; read is not done.
|
|
9
|
+
* Mark done or Reply acknowledges it. Only argo's console session calls them.
|
|
10
|
+
*/
|
|
11
|
+
/** ISO 8601 in UTC. */
|
|
12
|
+
const isoTime = z.iso.datetime();
|
|
13
|
+
/** Open: not done yet. Done: acknowledged. All: both. */
|
|
14
|
+
export const INBOX_FILTERS = ['open', 'done', 'all'];
|
|
15
|
+
export const inboxFilterSchema = z.enum(INBOX_FILTERS);
|
|
16
|
+
/** Input of `fleet.inbox`. */
|
|
17
|
+
export const operatorInboxInputSchema = z.object({ filter: inboxFilterSchema });
|
|
18
|
+
/** One message to argo: its delivery's state, when it was read and done, the reply that made it done, and the message. */
|
|
19
|
+
export const inboxMessageSchema = z.object({
|
|
20
|
+
deliveryId: idSchema('delivery'),
|
|
21
|
+
state: deliveryStateSchema,
|
|
22
|
+
/** When the operator opened it; null while unread. */
|
|
23
|
+
readAt: isoTime.nullable(),
|
|
24
|
+
/** When it was acknowledged; null while open. */
|
|
25
|
+
doneAt: isoTime.nullable(),
|
|
26
|
+
/** The reply that acknowledged it, when a reply did. */
|
|
27
|
+
repliedWith: idSchema('message').nullable(),
|
|
28
|
+
message: z.object({
|
|
29
|
+
id: idSchema('message'),
|
|
30
|
+
sender: partySchema,
|
|
31
|
+
inReplyTo: idSchema('message').nullable(),
|
|
32
|
+
sentAt: isoTime,
|
|
33
|
+
contentType: z.string(),
|
|
34
|
+
payload: z.string(),
|
|
35
|
+
}),
|
|
36
|
+
});
|
|
37
|
+
/** Output of `fleet.inbox`: the messages to argo the filter keeps, newest first. */
|
|
38
|
+
export const operatorInboxOutputSchema = z.array(inboxMessageSchema);
|
|
39
|
+
/** Input of `fleet.markRead`: a delivery to argo, read or unread again. */
|
|
40
|
+
export const markReadInputSchema = z.object({ deliveryId: idSchema('delivery'), isRead: z.boolean() });
|
|
41
|
+
/** Output of `fleet.markRead` and `fleet.markDone`: nothing; the OK is the answer. */
|
|
42
|
+
export const inboxActionOutputSchema = z.strictObject({});
|
|
43
|
+
/** Input of `fleet.markDone`: a delivery to argo, acknowledged without a reply. */
|
|
44
|
+
export const markDoneInputSchema = z.object({ deliveryId: idSchema('delivery') });
|
|
45
|
+
/**
|
|
46
|
+
* Input of `fleet.reply`: an answer to a message sent to argo, named by its
|
|
47
|
+
* delivery, as plain text to its sender, which also marks the message done.
|
|
48
|
+
*/
|
|
49
|
+
export const replyInputSchema = z.object({
|
|
50
|
+
deliveryId: idSchema('delivery'),
|
|
51
|
+
payload: sendInputSchema.shape.payload,
|
|
52
|
+
idempotencyKey: sendInputSchema.shape.idempotencyKey,
|
|
53
|
+
});
|
|
54
|
+
/** Output of `fleet.reply`: the reply. */
|
|
55
|
+
export const replyOutputSchema = z.object({ messageId: idSchema('message') });
|
|
56
|
+
//# sourceMappingURL=operator-inbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operator-inbox.js","sourceRoot":"","sources":["../../src/schemas/operator-inbox.ts"],"names":[],"mappings":"AAAA,OAA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