@aeolus-fleet/common 0.31.0 → 0.32.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 +29 -6
- package/dist/fleet/index.js +27 -4
- package/dist/fleet/index.js.map +1 -1
- package/dist/ids/index.d.ts +3 -0
- package/dist/ids/index.js +2 -0
- package/dist/ids/index.js.map +1 -1
- package/dist/rules/duration.d.ts +2 -0
- package/dist/rules/duration.js +22 -0
- package/dist/rules/duration.js.map +1 -0
- package/dist/rules/index.d.ts +1 -0
- package/dist/rules/index.js +1 -0
- package/dist/rules/index.js.map +1 -1
- package/dist/schemas/apps-list.d.ts +4 -4
- package/dist/schemas/console.d.ts +3 -25
- package/dist/schemas/console.js +4 -3
- package/dist/schemas/console.js.map +1 -1
- package/dist/schemas/delivery.d.ts +26 -5
- package/dist/schemas/delivery.js +19 -7
- package/dist/schemas/delivery.js.map +1 -1
- package/dist/schemas/fleet.d.ts +36 -2
- package/dist/schemas/fleet.js +9 -2
- package/dist/schemas/fleet.js.map +1 -1
- package/dist/schemas/follow.d.ts +11 -0
- package/dist/schemas/history.d.ts +138 -2
- package/dist/schemas/history.js +25 -2
- package/dist/schemas/history.js.map +1 -1
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/installation.d.ts +118 -4
- package/dist/schemas/installation.js +34 -5
- package/dist/schemas/installation.js.map +1 -1
- package/dist/schemas/label.d.ts +4 -4
- package/dist/schemas/message.d.ts +38 -2
- package/dist/schemas/message.js +34 -5
- package/dist/schemas/message.js.map +1 -1
- package/dist/schemas/needs-attention.d.ts +14 -0
- package/dist/schemas/schedule.d.ts +372 -0
- package/dist/schemas/schedule.js +132 -0
- package/dist/schemas/schedule.js.map +1 -0
- package/dist/schemas/scopes.d.ts +29 -3
- package/dist/schemas/scopes.js +17 -3
- package/dist/schemas/scopes.js.map +1 -1
- package/dist/schemas/ship.js +1 -1
- package/dist/schemas/statement.d.ts +5 -0
- package/dist/schemas/statement.js +3 -1
- package/dist/schemas/statement.js.map +1 -1
- package/dist/trierarch/report-details.js +1 -1
- package/package.json +1 -1
|
@@ -7,6 +7,16 @@ export declare const fleetLimitSettingSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
7
7
|
limit: z.ZodNullable<z.ZodInt>;
|
|
8
8
|
}, z.core.$strict>], "kind">;
|
|
9
9
|
export type FleetLimitSetting = z.infer<typeof fleetLimitSettingSchema>;
|
|
10
|
+
/** A retention as configured: a whole number of days of at least 1, or null for kept for good (decision 0066). */
|
|
11
|
+
export declare const retentionDaysSchema: z.ZodNullable<z.ZodInt>;
|
|
12
|
+
/** How a fleet's retention is set: it follows the installation default, or is set for the fleet to a number of days or to none. */
|
|
13
|
+
export declare const retentionSettingSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
14
|
+
kind: z.ZodLiteral<"default">;
|
|
15
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
16
|
+
kind: z.ZodLiteral<"fleet">;
|
|
17
|
+
days: z.ZodNullable<z.ZodInt>;
|
|
18
|
+
}, z.core.$strict>], "kind">;
|
|
19
|
+
export type RetentionSetting = z.infer<typeof retentionSettingSchema>;
|
|
10
20
|
/** A new fleet with its operator, who has no password: a hosted operator signs in another way. */
|
|
11
21
|
export declare const installationFleetsCreateInputSchema: z.ZodObject<{
|
|
12
22
|
requestId: z.ZodString;
|
|
@@ -58,6 +68,33 @@ export declare const installationFleetSchema: z.ZodObject<{
|
|
|
58
68
|
}, z.core.$strict>], "kind">;
|
|
59
69
|
applies: z.ZodNullable<z.ZodInt>;
|
|
60
70
|
}, z.core.$strip>;
|
|
71
|
+
schedulesPerShip: z.ZodObject<{
|
|
72
|
+
setting: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
73
|
+
kind: z.ZodLiteral<"default">;
|
|
74
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
75
|
+
kind: z.ZodLiteral<"fleet">;
|
|
76
|
+
limit: z.ZodNullable<z.ZodInt>;
|
|
77
|
+
}, z.core.$strict>], "kind">;
|
|
78
|
+
applies: z.ZodNullable<z.ZodInt>;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
minimumScheduleInterval: z.ZodObject<{
|
|
81
|
+
setting: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
82
|
+
kind: z.ZodLiteral<"default">;
|
|
83
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
84
|
+
kind: z.ZodLiteral<"fleet">;
|
|
85
|
+
limit: z.ZodNullable<z.ZodInt>;
|
|
86
|
+
}, z.core.$strict>], "kind">;
|
|
87
|
+
applies: z.ZodNullable<z.ZodInt>;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
retention: z.ZodObject<{
|
|
90
|
+
setting: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
91
|
+
kind: z.ZodLiteral<"default">;
|
|
92
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
93
|
+
kind: z.ZodLiteral<"fleet">;
|
|
94
|
+
days: z.ZodNullable<z.ZodInt>;
|
|
95
|
+
}, z.core.$strict>], "kind">;
|
|
96
|
+
applies: z.ZodNullable<z.ZodInt>;
|
|
97
|
+
}, z.core.$strip>;
|
|
61
98
|
}, z.core.$strip>;
|
|
62
99
|
health: z.ZodObject<{
|
|
63
100
|
stuck: z.ZodArray<z.ZodObject<{
|
|
@@ -149,6 +186,33 @@ export declare const installationFleetsListOutputSchema: z.ZodArray<z.ZodObject<
|
|
|
149
186
|
}, z.core.$strict>], "kind">;
|
|
150
187
|
applies: z.ZodNullable<z.ZodInt>;
|
|
151
188
|
}, z.core.$strip>;
|
|
189
|
+
schedulesPerShip: z.ZodObject<{
|
|
190
|
+
setting: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
191
|
+
kind: z.ZodLiteral<"default">;
|
|
192
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
193
|
+
kind: z.ZodLiteral<"fleet">;
|
|
194
|
+
limit: z.ZodNullable<z.ZodInt>;
|
|
195
|
+
}, z.core.$strict>], "kind">;
|
|
196
|
+
applies: z.ZodNullable<z.ZodInt>;
|
|
197
|
+
}, z.core.$strip>;
|
|
198
|
+
minimumScheduleInterval: z.ZodObject<{
|
|
199
|
+
setting: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
200
|
+
kind: z.ZodLiteral<"default">;
|
|
201
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
202
|
+
kind: z.ZodLiteral<"fleet">;
|
|
203
|
+
limit: z.ZodNullable<z.ZodInt>;
|
|
204
|
+
}, z.core.$strict>], "kind">;
|
|
205
|
+
applies: z.ZodNullable<z.ZodInt>;
|
|
206
|
+
}, z.core.$strip>;
|
|
207
|
+
retention: z.ZodObject<{
|
|
208
|
+
setting: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
209
|
+
kind: z.ZodLiteral<"default">;
|
|
210
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
211
|
+
kind: z.ZodLiteral<"fleet">;
|
|
212
|
+
days: z.ZodNullable<z.ZodInt>;
|
|
213
|
+
}, z.core.$strict>], "kind">;
|
|
214
|
+
applies: z.ZodNullable<z.ZodInt>;
|
|
215
|
+
}, z.core.$strip>;
|
|
152
216
|
}, z.core.$strip>;
|
|
153
217
|
health: z.ZodObject<{
|
|
154
218
|
stuck: z.ZodArray<z.ZodObject<{
|
|
@@ -231,17 +295,21 @@ export declare const installationOperatorsIssueSignInTicketOutputSchema: z.ZodOb
|
|
|
231
295
|
ticket: z.ZodString;
|
|
232
296
|
}, z.core.$strip>;
|
|
233
297
|
/**
|
|
234
|
-
* The installation's settings: the ship
|
|
235
|
-
* follows unless set for it, and the cap on the
|
|
236
|
-
* null: no limit
|
|
298
|
+
* The installation's settings: the ship, daily message and schedule limits
|
|
299
|
+
* and the retention a fleet follows unless set for it, and the cap on the
|
|
300
|
+
* number of fleets. Each may be null: no limit, and for the retention kept
|
|
301
|
+
* for good.
|
|
237
302
|
*/
|
|
238
303
|
export declare const installationSettingsSchema: z.ZodObject<{
|
|
239
304
|
defaultShipLimit: z.ZodNullable<z.ZodInt>;
|
|
240
305
|
defaultDailyMessageLimit: z.ZodNullable<z.ZodInt>;
|
|
306
|
+
defaultSchedulesPerShipLimit: z.ZodNullable<z.ZodInt>;
|
|
307
|
+
defaultMinimumScheduleInterval: z.ZodNullable<z.ZodInt>;
|
|
308
|
+
defaultRetentionDays: z.ZodNullable<z.ZodInt>;
|
|
241
309
|
fleetCap: z.ZodNullable<z.ZodInt>;
|
|
242
310
|
}, z.core.$strict>;
|
|
243
311
|
export type InstallationSettings = z.infer<typeof installationSettingsSchema>;
|
|
244
|
-
/** A fleet's
|
|
312
|
+
/** A fleet's limits and its retention: how each is set, and the limit or days that apply (null: none). */
|
|
245
313
|
export declare const installationFleetLimitsSchema: z.ZodObject<{
|
|
246
314
|
fleetId: z.ZodType<`flt_${string}`, unknown, z.core.$ZodTypeInternals<`flt_${string}`, unknown>>;
|
|
247
315
|
ships: z.ZodObject<{
|
|
@@ -262,7 +330,35 @@ export declare const installationFleetLimitsSchema: z.ZodObject<{
|
|
|
262
330
|
}, z.core.$strict>], "kind">;
|
|
263
331
|
applies: z.ZodNullable<z.ZodInt>;
|
|
264
332
|
}, z.core.$strip>;
|
|
333
|
+
schedulesPerShip: z.ZodObject<{
|
|
334
|
+
setting: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
335
|
+
kind: z.ZodLiteral<"default">;
|
|
336
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
337
|
+
kind: z.ZodLiteral<"fleet">;
|
|
338
|
+
limit: z.ZodNullable<z.ZodInt>;
|
|
339
|
+
}, z.core.$strict>], "kind">;
|
|
340
|
+
applies: z.ZodNullable<z.ZodInt>;
|
|
341
|
+
}, z.core.$strip>;
|
|
342
|
+
minimumScheduleInterval: z.ZodObject<{
|
|
343
|
+
setting: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
344
|
+
kind: z.ZodLiteral<"default">;
|
|
345
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
346
|
+
kind: z.ZodLiteral<"fleet">;
|
|
347
|
+
limit: z.ZodNullable<z.ZodInt>;
|
|
348
|
+
}, z.core.$strict>], "kind">;
|
|
349
|
+
applies: z.ZodNullable<z.ZodInt>;
|
|
350
|
+
}, z.core.$strip>;
|
|
351
|
+
retention: z.ZodObject<{
|
|
352
|
+
setting: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
353
|
+
kind: z.ZodLiteral<"default">;
|
|
354
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
355
|
+
kind: z.ZodLiteral<"fleet">;
|
|
356
|
+
days: z.ZodNullable<z.ZodInt>;
|
|
357
|
+
}, z.core.$strict>], "kind">;
|
|
358
|
+
applies: z.ZodNullable<z.ZodInt>;
|
|
359
|
+
}, z.core.$strip>;
|
|
265
360
|
}, z.core.$strip>;
|
|
361
|
+
/** Sets some of a fleet's limits and its retention; one left out keeps how it is set. */
|
|
266
362
|
export declare const installationFleetsSetLimitsInputSchema: z.ZodObject<{
|
|
267
363
|
fleetId: z.ZodType<`flt_${string}`, unknown, z.core.$ZodTypeInternals<`flt_${string}`, unknown>>;
|
|
268
364
|
ships: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -277,6 +373,24 @@ export declare const installationFleetsSetLimitsInputSchema: z.ZodObject<{
|
|
|
277
373
|
kind: z.ZodLiteral<"fleet">;
|
|
278
374
|
limit: z.ZodNullable<z.ZodInt>;
|
|
279
375
|
}, z.core.$strict>], "kind">>;
|
|
376
|
+
schedulesPerShip: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
377
|
+
kind: z.ZodLiteral<"default">;
|
|
378
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
379
|
+
kind: z.ZodLiteral<"fleet">;
|
|
380
|
+
limit: z.ZodNullable<z.ZodInt>;
|
|
381
|
+
}, z.core.$strict>], "kind">>;
|
|
382
|
+
minimumScheduleInterval: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
383
|
+
kind: z.ZodLiteral<"default">;
|
|
384
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
385
|
+
kind: z.ZodLiteral<"fleet">;
|
|
386
|
+
limit: z.ZodNullable<z.ZodInt>;
|
|
387
|
+
}, z.core.$strict>], "kind">>;
|
|
388
|
+
retention: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
389
|
+
kind: z.ZodLiteral<"default">;
|
|
390
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
391
|
+
kind: z.ZodLiteral<"fleet">;
|
|
392
|
+
days: z.ZodNullable<z.ZodInt>;
|
|
393
|
+
}, z.core.$strict>], "kind">>;
|
|
280
394
|
}, z.core.$strict>;
|
|
281
395
|
/**
|
|
282
396
|
* Input of `installation.accounts.cutOff`: the account pagasae disabled, by
|
|
@@ -18,6 +18,14 @@ export const fleetLimitSettingSchema = z.discriminatedUnion('kind', [
|
|
|
18
18
|
z.strictObject({ kind: z.literal('fleet'), limit: limitSchema }),
|
|
19
19
|
]);
|
|
20
20
|
const fleetLimitSchema = z.object({ setting: fleetLimitSettingSchema, applies: limitSchema });
|
|
21
|
+
/** A retention as configured: a whole number of days of at least 1, or null for kept for good (decision 0066). */
|
|
22
|
+
export const retentionDaysSchema = z.int().min(1).nullable();
|
|
23
|
+
/** How a fleet's retention is set: it follows the installation default, or is set for the fleet to a number of days or to none. */
|
|
24
|
+
export const retentionSettingSchema = z.discriminatedUnion('kind', [
|
|
25
|
+
z.strictObject({ kind: z.literal('default') }),
|
|
26
|
+
z.strictObject({ kind: z.literal('fleet'), days: retentionDaysSchema }),
|
|
27
|
+
]);
|
|
28
|
+
const fleetRetentionSchema = z.object({ setting: retentionSettingSchema, applies: retentionDaysSchema });
|
|
21
29
|
/** A new fleet with its operator, who has no password: a hosted operator signs in another way. */
|
|
22
30
|
export const installationFleetsCreateInputSchema = z.strictObject({
|
|
23
31
|
requestId: idempotencyKeySchema,
|
|
@@ -51,7 +59,13 @@ export const installationFleetSchema = z.object({
|
|
|
51
59
|
/** The messages stored on each UTC day of the last 7, today last. */
|
|
52
60
|
messagesPerDay: z.array(z.object({ date: z.iso.date(), count: z.int().min(0) })),
|
|
53
61
|
/** How each limit is set and the limit that applies (null: none). */
|
|
54
|
-
limits: z.object({
|
|
62
|
+
limits: z.object({
|
|
63
|
+
ships: fleetLimitSchema,
|
|
64
|
+
dailyMessages: fleetLimitSchema,
|
|
65
|
+
schedulesPerShip: fleetLimitSchema,
|
|
66
|
+
minimumScheduleInterval: fleetLimitSchema,
|
|
67
|
+
retention: fleetRetentionSchema,
|
|
68
|
+
}),
|
|
55
69
|
/** Whether its deliveries reach their ships (#304). */
|
|
56
70
|
health: z.object({
|
|
57
71
|
/** When its oldest pending delivery was sent; null when none is pending. */
|
|
@@ -82,25 +96,40 @@ export const installationOperatorsIssueSignInTicketInputSchema = z.strictObject(
|
|
|
82
96
|
});
|
|
83
97
|
export const installationOperatorsIssueSignInTicketOutputSchema = z.object({ ticket: z.string() });
|
|
84
98
|
/**
|
|
85
|
-
* The installation's settings: the ship
|
|
86
|
-
* follows unless set for it, and the cap on the
|
|
87
|
-
* null: no limit
|
|
99
|
+
* The installation's settings: the ship, daily message and schedule limits
|
|
100
|
+
* and the retention a fleet follows unless set for it, and the cap on the
|
|
101
|
+
* number of fleets. Each may be null: no limit, and for the retention kept
|
|
102
|
+
* for good.
|
|
88
103
|
*/
|
|
89
104
|
export const installationSettingsSchema = z.strictObject({
|
|
90
105
|
defaultShipLimit: limitSchema,
|
|
91
106
|
defaultDailyMessageLimit: limitSchema,
|
|
107
|
+
/** The schedules a ship may hold active or paused (decision 0062). */
|
|
108
|
+
defaultSchedulesPerShipLimit: limitSchema,
|
|
109
|
+
/** The shortest time between two send times of a repeating schedule, in seconds (decision 0062). */
|
|
110
|
+
defaultMinimumScheduleInterval: limitSchema,
|
|
111
|
+
/** The days a fleet keeps its finished history (decision 0066). */
|
|
112
|
+
defaultRetentionDays: retentionDaysSchema,
|
|
92
113
|
fleetCap: limitSchema,
|
|
93
114
|
});
|
|
94
|
-
/** A fleet's
|
|
115
|
+
/** A fleet's limits and its retention: how each is set, and the limit or days that apply (null: none). */
|
|
95
116
|
export const installationFleetLimitsSchema = z.object({
|
|
96
117
|
fleetId: idSchema('fleet'),
|
|
97
118
|
ships: fleetLimitSchema,
|
|
98
119
|
dailyMessages: fleetLimitSchema,
|
|
120
|
+
schedulesPerShip: fleetLimitSchema,
|
|
121
|
+
minimumScheduleInterval: fleetLimitSchema,
|
|
122
|
+
retention: fleetRetentionSchema,
|
|
99
123
|
});
|
|
124
|
+
/** Sets some of a fleet's limits and its retention; one left out keeps how it is set. */
|
|
100
125
|
export const installationFleetsSetLimitsInputSchema = z.strictObject({
|
|
101
126
|
fleetId: idSchema('fleet'),
|
|
102
127
|
ships: fleetLimitSettingSchema.optional(),
|
|
103
128
|
dailyMessages: fleetLimitSettingSchema.optional(),
|
|
129
|
+
schedulesPerShip: fleetLimitSettingSchema.optional(),
|
|
130
|
+
/** In seconds. */
|
|
131
|
+
minimumScheduleInterval: fleetLimitSettingSchema.optional(),
|
|
132
|
+
retention: retentionSettingSchema.optional(),
|
|
104
133
|
});
|
|
105
134
|
/**
|
|
106
135
|
* Input of `installation.accounts.cutOff`: the account pagasae disabled, by
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installation.js","sourceRoot":"","sources":["../../src/schemas/installation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,O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,CAAC,MAAM,sCAAsC,GAAG,CAAC,CAAC,YAAY,CAAC;IACnE,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC;IAC1B,KAAK,EAAE,uBAAuB,CAAC,QAAQ,EAAE;IACzC,aAAa,EAAE,uBAAuB,CAAC,QAAQ,EAAE;IACjD,gBAAgB,EAAE,uBAAuB,CAAC,QAAQ,EAAE;IACpD,kBAAkB;IAClB,uBAAuB,EAAE,uBAAuB,CAAC,QAAQ,EAAE;IAC3D,SAAS,EAAE,sBAAsB,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,CAAC;AACpG,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AAEzE;;;;GAIG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,CAAC;AACrG,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC"}
|
package/dist/schemas/label.d.ts
CHANGED
|
@@ -30,9 +30,9 @@ export declare const carriedLabelSchema: z.ZodObject<{
|
|
|
30
30
|
*/
|
|
31
31
|
export declare const AGENT_KINDS: readonly ["console", "claudeCode", "codex", "trierarch", "plugin", "other"];
|
|
32
32
|
export declare const agentKindSchema: z.ZodEnum<{
|
|
33
|
+
trierarch: "trierarch";
|
|
33
34
|
plugin: "plugin";
|
|
34
35
|
console: "console";
|
|
35
|
-
trierarch: "trierarch";
|
|
36
36
|
claudeCode: "claudeCode";
|
|
37
37
|
codex: "codex";
|
|
38
38
|
other: "other";
|
|
@@ -82,9 +82,9 @@ export declare const fleetListFilterSchema: z.ZodObject<{
|
|
|
82
82
|
valueIds: z.ZodOptional<z.ZodArray<z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>>>;
|
|
83
83
|
shipIds: z.ZodOptional<z.ZodArray<z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>>>;
|
|
84
84
|
kind: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
85
|
+
trierarch: "trierarch";
|
|
85
86
|
plugin: "plugin";
|
|
86
87
|
console: "console";
|
|
87
|
-
trierarch: "trierarch";
|
|
88
88
|
claudeCode: "claudeCode";
|
|
89
89
|
codex: "codex";
|
|
90
90
|
other: "other";
|
|
@@ -128,9 +128,9 @@ export declare const shipCountsInputSchema: z.ZodOptional<z.ZodObject<{
|
|
|
128
128
|
valueIds: z.ZodOptional<z.ZodArray<z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>>>;
|
|
129
129
|
shipIds: z.ZodOptional<z.ZodArray<z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>>>;
|
|
130
130
|
kind: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
131
|
+
trierarch: "trierarch";
|
|
131
132
|
plugin: "plugin";
|
|
132
133
|
console: "console";
|
|
133
|
-
trierarch: "trierarch";
|
|
134
134
|
claudeCode: "claudeCode";
|
|
135
135
|
codex: "codex";
|
|
136
136
|
other: "other";
|
|
@@ -248,9 +248,9 @@ export declare const fleetListInputSchema: z.ZodOptional<z.ZodObject<{
|
|
|
248
248
|
valueIds: z.ZodOptional<z.ZodArray<z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>>>;
|
|
249
249
|
shipIds: z.ZodOptional<z.ZodArray<z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>>>;
|
|
250
250
|
kind: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
251
|
+
trierarch: "trierarch";
|
|
251
252
|
plugin: "plugin";
|
|
252
253
|
console: "console";
|
|
253
|
-
trierarch: "trierarch";
|
|
254
254
|
claudeCode: "claudeCode";
|
|
255
255
|
codex: "codex";
|
|
256
256
|
other: "other";
|
|
@@ -25,10 +25,20 @@ export declare const MODEL_MAX_LENGTH = 100;
|
|
|
25
25
|
* Self-reported: the fleet stores it and never verifies it.
|
|
26
26
|
*/
|
|
27
27
|
export declare const modelSchema: z.ZodString;
|
|
28
|
+
/**
|
|
29
|
+
* A label selection a message is sent to (decision 0065): one value id up to
|
|
30
|
+
* as many as a ship carries, each once; exact and AND, so a ship carrying
|
|
31
|
+
* every value gets a delivery. Ids only, never texts (decision 0031).
|
|
32
|
+
*/
|
|
33
|
+
export declare const labelValuesSelectorSchema: z.ZodObject<{
|
|
34
|
+
kind: z.ZodLiteral<"label">;
|
|
35
|
+
valueIds: z.ZodArray<z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>>;
|
|
36
|
+
}, z.core.$strict>;
|
|
28
37
|
/**
|
|
29
38
|
* Who a message is for (docs/blueprint.md, "Selector"): one ship, by id or by
|
|
30
|
-
* name, any ship of a type,
|
|
31
|
-
* 0061)
|
|
39
|
+
* name, any ship of a type, every other participant of a meeting (decision
|
|
40
|
+
* 0061), or every ship a label selection names (decision 0065). A name is
|
|
41
|
+
* resolved to the ship's id at send time.
|
|
32
42
|
*/
|
|
33
43
|
export declare const selectorSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
34
44
|
kind: z.ZodLiteral<"ship">;
|
|
@@ -42,7 +52,30 @@ export declare const selectorSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
42
52
|
}, z.core.$strict>, z.ZodObject<{
|
|
43
53
|
kind: z.ZodLiteral<"meeting">;
|
|
44
54
|
meetingId: z.ZodType<`mtg_${string}`, unknown, z.core.$ZodTypeInternals<`mtg_${string}`, unknown>>;
|
|
55
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
56
|
+
kind: z.ZodLiteral<"label">;
|
|
57
|
+
valueIds: z.ZodArray<z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>>;
|
|
58
|
+
}, z.core.$strict>]>;
|
|
59
|
+
/**
|
|
60
|
+
* What a schedule sends to (decision 0062): one ship, by id or by name, a
|
|
61
|
+
* type, or a label selection resolved at each send time (decision 0065);
|
|
62
|
+
* never a meeting.
|
|
63
|
+
*/
|
|
64
|
+
export declare const scheduleSelectorSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
65
|
+
kind: z.ZodLiteral<"ship">;
|
|
66
|
+
shipId: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
67
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
68
|
+
kind: z.ZodLiteral<"ship">;
|
|
69
|
+
name: z.ZodString;
|
|
70
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
71
|
+
kind: z.ZodLiteral<"type">;
|
|
72
|
+
type: z.ZodString;
|
|
73
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
74
|
+
kind: z.ZodLiteral<"label">;
|
|
75
|
+
valueIds: z.ZodArray<z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>>;
|
|
45
76
|
}, z.core.$strict>]>;
|
|
77
|
+
/** A payload: any text of at most 64 KB in UTF-8 (ADR 0006). */
|
|
78
|
+
export declare const payloadSchema: z.ZodString;
|
|
46
79
|
export type SelectorInput = z.infer<typeof selectorSchema>;
|
|
47
80
|
/** Input of `ship.send`. The sender is the calling ship, never named in the input. */
|
|
48
81
|
export declare const sendInputSchema: z.ZodObject<{
|
|
@@ -58,6 +91,9 @@ export declare const sendInputSchema: z.ZodObject<{
|
|
|
58
91
|
}, z.core.$strict>, z.ZodObject<{
|
|
59
92
|
kind: z.ZodLiteral<"meeting">;
|
|
60
93
|
meetingId: z.ZodType<`mtg_${string}`, unknown, z.core.$ZodTypeInternals<`mtg_${string}`, unknown>>;
|
|
94
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
95
|
+
kind: z.ZodLiteral<"label">;
|
|
96
|
+
valueIds: z.ZodArray<z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>>;
|
|
61
97
|
}, z.core.$strict>]>;
|
|
62
98
|
payload: z.ZodString;
|
|
63
99
|
contentType: z.ZodOptional<z.ZodString>;
|
package/dist/schemas/message.js
CHANGED
|
@@ -3,6 +3,7 @@ import { idSchema } from '../ids/index.js';
|
|
|
3
3
|
import { PAYLOAD_MAX_BYTES, payloadBytes } from '../rules/payload.js';
|
|
4
4
|
import { shipHandleSchema } from './fleet.js';
|
|
5
5
|
import { idempotencyKeySchema } from './idempotency-key.js';
|
|
6
|
+
import { SHIP_LABELS_MAX } from './label.js';
|
|
6
7
|
/**
|
|
7
8
|
* Inputs and outputs of sending a message (`ship.send`): who it is for, its
|
|
8
9
|
* payload and content type, the model the sender runs, the sender's
|
|
@@ -47,23 +48,51 @@ export const modelSchema = z
|
|
|
47
48
|
.min(1, 'A model is the exact model id the session runs, such as claude-opus-5-5')
|
|
48
49
|
.max(MODEL_MAX_LENGTH, `A model is at most ${String(MODEL_MAX_LENGTH)} characters`)
|
|
49
50
|
.regex(/^\S+$/, 'A model id has no spaces');
|
|
51
|
+
/**
|
|
52
|
+
* A label selection a message is sent to (decision 0065): one value id up to
|
|
53
|
+
* as many as a ship carries, each once; exact and AND, so a ship carrying
|
|
54
|
+
* every value gets a delivery. Ids only, never texts (decision 0031).
|
|
55
|
+
*/
|
|
56
|
+
export const labelValuesSelectorSchema = z.strictObject({
|
|
57
|
+
kind: z.literal('label'),
|
|
58
|
+
valueIds: z
|
|
59
|
+
.array(idSchema('labelValue'))
|
|
60
|
+
.min(1, 'A label selection names at least one value id')
|
|
61
|
+
.max(SHIP_LABELS_MAX, `A label selection names at most ${String(SHIP_LABELS_MAX)} value ids, as many as a ship carries`)
|
|
62
|
+
.refine((valueIds) => new Set(valueIds).size === valueIds.length, 'A label selection names each value id once'),
|
|
63
|
+
});
|
|
50
64
|
/**
|
|
51
65
|
* Who a message is for (docs/blueprint.md, "Selector"): one ship, by id or by
|
|
52
|
-
* name, any ship of a type,
|
|
53
|
-
* 0061)
|
|
66
|
+
* name, any ship of a type, every other participant of a meeting (decision
|
|
67
|
+
* 0061), or every ship a label selection names (decision 0065). A name is
|
|
68
|
+
* resolved to the ship's id at send time.
|
|
54
69
|
*/
|
|
55
70
|
export const selectorSchema = z.union([
|
|
56
71
|
z.strictObject({ kind: z.literal('ship'), shipId: idSchema('ship') }),
|
|
57
72
|
z.strictObject({ kind: z.literal('ship'), name: shipHandleSchema }),
|
|
58
73
|
z.strictObject({ kind: z.literal('type'), type: shipHandleSchema }),
|
|
59
74
|
z.strictObject({ kind: z.literal('meeting'), meetingId: idSchema('meeting') }),
|
|
75
|
+
labelValuesSelectorSchema,
|
|
76
|
+
]);
|
|
77
|
+
/**
|
|
78
|
+
* What a schedule sends to (decision 0062): one ship, by id or by name, a
|
|
79
|
+
* type, or a label selection resolved at each send time (decision 0065);
|
|
80
|
+
* never a meeting.
|
|
81
|
+
*/
|
|
82
|
+
export const scheduleSelectorSchema = z.union([
|
|
83
|
+
z.strictObject({ kind: z.literal('ship'), shipId: idSchema('ship') }),
|
|
84
|
+
z.strictObject({ kind: z.literal('ship'), name: shipHandleSchema }),
|
|
85
|
+
z.strictObject({ kind: z.literal('type'), type: shipHandleSchema }),
|
|
86
|
+
labelValuesSelectorSchema,
|
|
60
87
|
]);
|
|
88
|
+
/** A payload: any text of at most 64 KB in UTF-8 (ADR 0006). */
|
|
89
|
+
export const payloadSchema = z
|
|
90
|
+
.string()
|
|
91
|
+
.refine((payload) => payloadBytes(payload) <= PAYLOAD_MAX_BYTES, `A payload is at most ${PAYLOAD_MAX_BYTES} bytes (64 KB) in UTF-8`);
|
|
61
92
|
/** Input of `ship.send`. The sender is the calling ship, never named in the input. */
|
|
62
93
|
export const sendInputSchema = z.object({
|
|
63
94
|
selector: selectorSchema,
|
|
64
|
-
payload:
|
|
65
|
-
.string()
|
|
66
|
-
.refine((payload) => payloadBytes(payload) <= PAYLOAD_MAX_BYTES, `A payload is at most ${PAYLOAD_MAX_BYTES} bytes (64 KB) in UTF-8`),
|
|
95
|
+
payload: payloadSchema,
|
|
67
96
|
/** Without it, the payload is text/plain. */
|
|
68
97
|
contentType: contentTypeSchema.optional(),
|
|
69
98
|
/** The exact model the sending session runs now. Every ship states it; argo states none. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/schemas/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/schemas/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;GAIG;AAEH,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEtE,uEAAuE;AACvE,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAA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AO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;IACnE,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;IACnE,yBAAyB;CAC1B,CAAC,CAAC;AAEH,gEAAgE;AAChE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC;KAC3B,MAAM,EAAE;KACR,MAAM,CACL,CAAC,OAAO,EAAE,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,iBAAiB,EACvD,wBAAwB,iBAAiB,yBAAyB,CACnE,CAAC;AAIJ,sFAAsF;AACtF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,QAAQ,EAAE,cAAc;IACxB,OAAO,EAAE,aAAa;IACtB,6CAA6C;IAC7C,WAAW,EAAE,iBAAiB,CAAC,QAAQ,EAAE;IACzC,4FAA4F;IAC5F,KAAK,EAAE,WAAW,CAAC,QAAQ,EAAE;IAC7B,cAAc,EAAE,oBAAoB;IACpC,0EAA0E;IAC1E,SAAS,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE;IACzC,iGAAiG;IACjG,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC;AAIH,0GAA0G;AAC1G,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -37,6 +37,13 @@ export declare const needsAttentionDeliverySchema: z.ZodObject<{
|
|
|
37
37
|
}, z.core.$strip>, z.ZodObject<{
|
|
38
38
|
kind: z.ZodLiteral<"meeting">;
|
|
39
39
|
meetingId: z.ZodType<`mtg_${string}`, unknown, z.core.$ZodTypeInternals<`mtg_${string}`, unknown>>;
|
|
40
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
41
|
+
kind: z.ZodLiteral<"label">;
|
|
42
|
+
values: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
43
|
+
valueId: z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>;
|
|
44
|
+
key: z.ZodNullable<z.ZodString>;
|
|
45
|
+
value: z.ZodNullable<z.ZodString>;
|
|
46
|
+
}, z.core.$strip>>>;
|
|
40
47
|
}, z.core.$strip>], "kind">;
|
|
41
48
|
inReplyTo: z.ZodNullable<z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>>;
|
|
42
49
|
sentAt: z.ZodISODateTime;
|
|
@@ -90,6 +97,13 @@ export declare const needsAttentionOutputSchema: z.ZodObject<{
|
|
|
90
97
|
}, z.core.$strip>, z.ZodObject<{
|
|
91
98
|
kind: z.ZodLiteral<"meeting">;
|
|
92
99
|
meetingId: z.ZodType<`mtg_${string}`, unknown, z.core.$ZodTypeInternals<`mtg_${string}`, unknown>>;
|
|
100
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
101
|
+
kind: z.ZodLiteral<"label">;
|
|
102
|
+
values: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
103
|
+
valueId: z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>;
|
|
104
|
+
key: z.ZodNullable<z.ZodString>;
|
|
105
|
+
value: z.ZodNullable<z.ZodString>;
|
|
106
|
+
}, z.core.$strip>>>;
|
|
93
107
|
}, z.core.$strip>], "kind">;
|
|
94
108
|
inReplyTo: z.ZodNullable<z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>>;
|
|
95
109
|
sentAt: z.ZodISODateTime;
|