@aeolus-fleet/common 0.18.0 → 0.20.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/LICENSE +201 -0
- package/dist/fleet/index.d.ts +21 -9
- package/dist/fleet/index.js +16 -6
- package/dist/fleet/index.js.map +1 -1
- package/dist/ids/index.d.ts +4 -0
- package/dist/ids/index.js +2 -0
- package/dist/ids/index.js.map +1 -1
- package/dist/schemas/clear-request.d.ts +46 -0
- package/dist/schemas/clear-request.js +42 -0
- package/dist/schemas/clear-request.js.map +1 -0
- package/dist/schemas/console.d.ts +2 -1
- package/dist/schemas/crew-request.d.ts +6 -0
- package/dist/schemas/crew-request.js +12 -1
- package/dist/schemas/crew-request.js.map +1 -1
- package/dist/schemas/fleet.d.ts +41 -4
- package/dist/schemas/fleet.js +4 -1
- package/dist/schemas/fleet.js.map +1 -1
- package/dist/schemas/follow.d.ts +9 -0
- package/dist/schemas/history.d.ts +28 -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/label.d.ts +110 -0
- package/dist/schemas/label.js +58 -0
- package/dist/schemas/label.js.map +1 -0
- package/dist/trierarch/configuration.js +1 -1
- package/dist/trierarch/configuration.js.map +1 -1
- package/dist/trierarch/crew-settings.d.ts +42 -0
- package/dist/trierarch/crew-settings.js +49 -0
- package/dist/trierarch/crew-settings.js.map +1 -0
- package/dist/trierarch/index.d.ts +2 -1
- package/dist/trierarch/index.js +2 -1
- package/dist/trierarch/index.js.map +1 -1
- package/dist/trierarch/report-details.d.ts +42 -0
- package/dist/trierarch/report-details.js +52 -0
- package/dist/trierarch/report-details.js.map +1 -0
- package/package.json +4 -2
- package/dist/trierarch/protocol.d.ts +0 -146
- package/dist/trierarch/protocol.js +0 -115
- package/dist/trierarch/protocol.js.map +0 -1
package/dist/schemas/fleet.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare const SHIP_NOTE_MAX_LENGTH = 500;
|
|
|
15
15
|
/**
|
|
16
16
|
* Input of `fleet.commission`. The note is free text for the operator;
|
|
17
17
|
* whitespace around it is dropped. `fleetScopes` adds fleet:read,
|
|
18
|
-
* fleet:manage and/or
|
|
18
|
+
* fleet:manage, crew:assign and/or crew:run to the scopes every agent ship has; none
|
|
19
19
|
* when left out.
|
|
20
20
|
* `idempotencyKey` is the caller's own key, as for a send: a retry with the
|
|
21
21
|
* same key and the same request commissions no second ship.
|
|
@@ -26,9 +26,10 @@ export declare const commissionShipInputSchema: z.ZodObject<{
|
|
|
26
26
|
fleetScopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
27
27
|
"fleet:read": "fleet:read";
|
|
28
28
|
"fleet:manage": "fleet:manage";
|
|
29
|
-
"fleet:crew": "fleet:crew";
|
|
30
29
|
"crew:assign": "crew:assign";
|
|
31
30
|
"crew:run": "crew:run";
|
|
31
|
+
"labels:define": "labels:define";
|
|
32
|
+
"labels:assign": "labels:assign";
|
|
32
33
|
}>>>;
|
|
33
34
|
note: z.ZodOptional<z.ZodString>;
|
|
34
35
|
idempotencyKey: z.ZodString;
|
|
@@ -183,9 +184,10 @@ export declare const listedShipSchema: z.ZodObject<{
|
|
|
183
184
|
"messages:receive": "messages:receive";
|
|
184
185
|
"fleet:read": "fleet:read";
|
|
185
186
|
"fleet:manage": "fleet:manage";
|
|
186
|
-
"fleet:crew": "fleet:crew";
|
|
187
187
|
"crew:assign": "crew:assign";
|
|
188
188
|
"crew:run": "crew:run";
|
|
189
|
+
"labels:define": "labels:define";
|
|
190
|
+
"labels:assign": "labels:assign";
|
|
189
191
|
}>>;
|
|
190
192
|
report: z.ZodNullable<z.ZodObject<{
|
|
191
193
|
state: z.ZodEnum<{
|
|
@@ -216,6 +218,14 @@ export declare const listedShipSchema: z.ZodObject<{
|
|
|
216
218
|
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
217
219
|
name: z.ZodString;
|
|
218
220
|
}, z.core.$strip>>;
|
|
221
|
+
attempt: z.ZodInt;
|
|
222
|
+
startedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
223
|
+
}, z.core.$strip>>;
|
|
224
|
+
labels: z.ZodArray<z.ZodObject<{
|
|
225
|
+
labelId: z.ZodType<`lbl_${string}`, unknown, z.core.$ZodTypeInternals<`lbl_${string}`, unknown>>;
|
|
226
|
+
key: z.ZodString;
|
|
227
|
+
valueId: z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>;
|
|
228
|
+
value: z.ZodString;
|
|
219
229
|
}, z.core.$strip>>;
|
|
220
230
|
awaitingCrewSince: z.ZodNullable<z.ZodISODateTime>;
|
|
221
231
|
retiredAt: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -270,9 +280,10 @@ export declare const fleetListOutputSchema: z.ZodArray<z.ZodObject<{
|
|
|
270
280
|
"messages:receive": "messages:receive";
|
|
271
281
|
"fleet:read": "fleet:read";
|
|
272
282
|
"fleet:manage": "fleet:manage";
|
|
273
|
-
"fleet:crew": "fleet:crew";
|
|
274
283
|
"crew:assign": "crew:assign";
|
|
275
284
|
"crew:run": "crew:run";
|
|
285
|
+
"labels:define": "labels:define";
|
|
286
|
+
"labels:assign": "labels:assign";
|
|
276
287
|
}>>;
|
|
277
288
|
report: z.ZodNullable<z.ZodObject<{
|
|
278
289
|
state: z.ZodEnum<{
|
|
@@ -303,6 +314,14 @@ export declare const fleetListOutputSchema: z.ZodArray<z.ZodObject<{
|
|
|
303
314
|
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
304
315
|
name: z.ZodString;
|
|
305
316
|
}, z.core.$strip>>;
|
|
317
|
+
attempt: z.ZodInt;
|
|
318
|
+
startedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
319
|
+
}, z.core.$strip>>;
|
|
320
|
+
labels: z.ZodArray<z.ZodObject<{
|
|
321
|
+
labelId: z.ZodType<`lbl_${string}`, unknown, z.core.$ZodTypeInternals<`lbl_${string}`, unknown>>;
|
|
322
|
+
key: z.ZodString;
|
|
323
|
+
valueId: z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>;
|
|
324
|
+
value: z.ZodString;
|
|
306
325
|
}, z.core.$strip>>;
|
|
307
326
|
awaitingCrewSince: z.ZodNullable<z.ZodISODateTime>;
|
|
308
327
|
retiredAt: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -351,6 +370,15 @@ export declare const liveFleetEventSchema: z.ZodObject<{
|
|
|
351
370
|
CrewAssigned: "CrewAssigned";
|
|
352
371
|
CrewStatusChanged: "CrewStatusChanged";
|
|
353
372
|
CrewRequestExplained: "CrewRequestExplained";
|
|
373
|
+
LabelDefined: "LabelDefined";
|
|
374
|
+
LabelValuesChanged: "LabelValuesChanged";
|
|
375
|
+
LabelRetired: "LabelRetired";
|
|
376
|
+
LabelAssigned: "LabelAssigned";
|
|
377
|
+
LabelUnassigned: "LabelUnassigned";
|
|
378
|
+
LabelDeleted: "LabelDeleted";
|
|
379
|
+
WorktreeClearRequested: "WorktreeClearRequested";
|
|
380
|
+
WorktreeCleared: "WorktreeCleared";
|
|
381
|
+
WorktreeClearRemoved: "WorktreeClearRemoved";
|
|
354
382
|
}>;
|
|
355
383
|
occurredAt: z.ZodISODateTime;
|
|
356
384
|
actorShipId: z.ZodNullable<z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>>;
|
|
@@ -394,6 +422,15 @@ export declare const fleetStreamItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
394
422
|
CrewAssigned: "CrewAssigned";
|
|
395
423
|
CrewStatusChanged: "CrewStatusChanged";
|
|
396
424
|
CrewRequestExplained: "CrewRequestExplained";
|
|
425
|
+
LabelDefined: "LabelDefined";
|
|
426
|
+
LabelValuesChanged: "LabelValuesChanged";
|
|
427
|
+
LabelRetired: "LabelRetired";
|
|
428
|
+
LabelAssigned: "LabelAssigned";
|
|
429
|
+
LabelUnassigned: "LabelUnassigned";
|
|
430
|
+
LabelDeleted: "LabelDeleted";
|
|
431
|
+
WorktreeClearRequested: "WorktreeClearRequested";
|
|
432
|
+
WorktreeCleared: "WorktreeCleared";
|
|
433
|
+
WorktreeClearRemoved: "WorktreeClearRemoved";
|
|
397
434
|
}>;
|
|
398
435
|
occurredAt: z.ZodISODateTime;
|
|
399
436
|
actorShipId: z.ZodNullable<z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>>;
|
package/dist/schemas/fleet.js
CHANGED
|
@@ -3,6 +3,7 @@ import { eventTypeSchema, fleetScopeSchema, locationKindSchema, scopeSchema, shi
|
|
|
3
3
|
import { idSchema } from '../ids/index.js';
|
|
4
4
|
import { idempotencyKeySchema } from './idempotency-key.js';
|
|
5
5
|
import { listedCrewRequestSchema } from './crew-request.js';
|
|
6
|
+
import { carriedLabelSchema } from './label.js';
|
|
6
7
|
import { listedReportSchema } from './report.js';
|
|
7
8
|
/**
|
|
8
9
|
* Inputs and outputs of the fleet procedures: commission a ship, get its
|
|
@@ -24,7 +25,7 @@ export const SHIP_NOTE_MAX_LENGTH = 500;
|
|
|
24
25
|
/**
|
|
25
26
|
* Input of `fleet.commission`. The note is free text for the operator;
|
|
26
27
|
* whitespace around it is dropped. `fleetScopes` adds fleet:read,
|
|
27
|
-
* fleet:manage and/or
|
|
28
|
+
* fleet:manage, crew:assign and/or crew:run to the scopes every agent ship has; none
|
|
28
29
|
* when left out.
|
|
29
30
|
* `idempotencyKey` is the caller's own key, as for a send: a retry with the
|
|
30
31
|
* same key and the same request commissions no second ship.
|
|
@@ -159,6 +160,8 @@ export const listedShipSchema = z.object({
|
|
|
159
160
|
report: listedReportSchema.nullable(),
|
|
160
161
|
/** The ship's crew request (decision 0029); null when it holds none. */
|
|
161
162
|
crewRequest: listedCrewRequestSchema.nullable(),
|
|
163
|
+
/** The label values the ship carries, with their labels, by key then value (decision 0031). */
|
|
164
|
+
labels: z.array(carriedLabelSchema),
|
|
162
165
|
/** Since when the ship awaits crew (ISO 8601 in UTC): its commission, or the end of its last session. Null unless it awaits crew. */
|
|
163
166
|
awaitingCrewSince: z.iso.datetime().nullable(),
|
|
164
167
|
/** When the operator retired the ship (ISO 8601 in UTC); null while it is active. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fleet.js","sourceRoot":"","sources":["../../src/schemas/fleet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,WAAW,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACzI,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AACzC,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;AACnD,MAAM,cAAc,GAAG,YAAY,sBAAsB,+CAA+C,CAAC;AAEzG,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC;KAC9B,MAAM,EAAE;KACR,GAAG,CAAC,sBAAsB,EAAE,cAAc,CAAC;KAC3C,KAAK,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC;AAE9C,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE,gBAAgB;IACtB,IAA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E,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC;IACnE,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;CACxC,CAAC,CAAC;AAIH;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5E,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC;CACjH,CAAC,CAAC"}
|
package/dist/schemas/follow.d.ts
CHANGED
|
@@ -47,6 +47,15 @@ export declare const followFleetOutputSchema: z.ZodObject<{
|
|
|
47
47
|
CrewAssigned: "CrewAssigned";
|
|
48
48
|
CrewStatusChanged: "CrewStatusChanged";
|
|
49
49
|
CrewRequestExplained: "CrewRequestExplained";
|
|
50
|
+
LabelDefined: "LabelDefined";
|
|
51
|
+
LabelValuesChanged: "LabelValuesChanged";
|
|
52
|
+
LabelRetired: "LabelRetired";
|
|
53
|
+
LabelAssigned: "LabelAssigned";
|
|
54
|
+
LabelUnassigned: "LabelUnassigned";
|
|
55
|
+
LabelDeleted: "LabelDeleted";
|
|
56
|
+
WorktreeClearRequested: "WorktreeClearRequested";
|
|
57
|
+
WorktreeCleared: "WorktreeCleared";
|
|
58
|
+
WorktreeClearRemoved: "WorktreeClearRemoved";
|
|
50
59
|
}>;
|
|
51
60
|
occurredAt: z.ZodISODateTime;
|
|
52
61
|
actorShipId: z.ZodNullable<z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>>;
|
|
@@ -74,10 +74,17 @@ export declare const shipDetailOutputSchema: z.ZodObject<{
|
|
|
74
74
|
"messages:receive": "messages:receive";
|
|
75
75
|
"fleet:read": "fleet:read";
|
|
76
76
|
"fleet:manage": "fleet:manage";
|
|
77
|
-
"fleet:crew": "fleet:crew";
|
|
78
77
|
"crew:assign": "crew:assign";
|
|
79
78
|
"crew:run": "crew:run";
|
|
79
|
+
"labels:define": "labels:define";
|
|
80
|
+
"labels:assign": "labels:assign";
|
|
80
81
|
}>>;
|
|
82
|
+
labels: z.ZodArray<z.ZodObject<{
|
|
83
|
+
labelId: z.ZodType<`lbl_${string}`, unknown, z.core.$ZodTypeInternals<`lbl_${string}`, unknown>>;
|
|
84
|
+
key: z.ZodString;
|
|
85
|
+
valueId: z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>;
|
|
86
|
+
value: z.ZodString;
|
|
87
|
+
}, z.core.$strip>>;
|
|
81
88
|
awaitingCrewSince: z.ZodNullable<z.ZodISODateTime>;
|
|
82
89
|
retiredAt: z.ZodNullable<z.ZodISODateTime>;
|
|
83
90
|
report: z.ZodNullable<z.ZodObject<{
|
|
@@ -110,6 +117,8 @@ export declare const shipDetailOutputSchema: z.ZodObject<{
|
|
|
110
117
|
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
111
118
|
name: z.ZodString;
|
|
112
119
|
}, z.core.$strip>>;
|
|
120
|
+
attempt: z.ZodInt;
|
|
121
|
+
startedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
113
122
|
settings: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
114
123
|
}, z.core.$strip>>;
|
|
115
124
|
commissionedAt: z.ZodISODateTime;
|
|
@@ -148,6 +157,15 @@ export declare const timelineEntrySchema: z.ZodObject<{
|
|
|
148
157
|
CrewAssigned: "CrewAssigned";
|
|
149
158
|
CrewStatusChanged: "CrewStatusChanged";
|
|
150
159
|
CrewRequestExplained: "CrewRequestExplained";
|
|
160
|
+
LabelDefined: "LabelDefined";
|
|
161
|
+
LabelValuesChanged: "LabelValuesChanged";
|
|
162
|
+
LabelRetired: "LabelRetired";
|
|
163
|
+
LabelAssigned: "LabelAssigned";
|
|
164
|
+
LabelUnassigned: "LabelUnassigned";
|
|
165
|
+
LabelDeleted: "LabelDeleted";
|
|
166
|
+
WorktreeClearRequested: "WorktreeClearRequested";
|
|
167
|
+
WorktreeCleared: "WorktreeCleared";
|
|
168
|
+
WorktreeClearRemoved: "WorktreeClearRemoved";
|
|
151
169
|
}>;
|
|
152
170
|
occurredAt: z.ZodISODateTime;
|
|
153
171
|
actor: z.ZodNullable<z.ZodObject<{
|
|
@@ -210,6 +228,15 @@ export declare const shipTimelineOutputSchema: z.ZodArray<z.ZodObject<{
|
|
|
210
228
|
CrewAssigned: "CrewAssigned";
|
|
211
229
|
CrewStatusChanged: "CrewStatusChanged";
|
|
212
230
|
CrewRequestExplained: "CrewRequestExplained";
|
|
231
|
+
LabelDefined: "LabelDefined";
|
|
232
|
+
LabelValuesChanged: "LabelValuesChanged";
|
|
233
|
+
LabelRetired: "LabelRetired";
|
|
234
|
+
LabelAssigned: "LabelAssigned";
|
|
235
|
+
LabelUnassigned: "LabelUnassigned";
|
|
236
|
+
LabelDeleted: "LabelDeleted";
|
|
237
|
+
WorktreeClearRequested: "WorktreeClearRequested";
|
|
238
|
+
WorktreeCleared: "WorktreeCleared";
|
|
239
|
+
WorktreeClearRemoved: "WorktreeClearRemoved";
|
|
213
240
|
}>;
|
|
214
241
|
occurredAt: z.ZodISODateTime;
|
|
215
242
|
actor: z.ZodNullable<z.ZodObject<{
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './clear-request.js';
|
|
1
2
|
export * from './console.js';
|
|
2
3
|
export * from './crew-request.js';
|
|
3
4
|
export * from './delivery.js';
|
|
@@ -7,6 +8,7 @@ export * from './guide.js';
|
|
|
7
8
|
export * from './history.js';
|
|
8
9
|
export * from './idempotency-key.js';
|
|
9
10
|
export * from './installation.js';
|
|
11
|
+
export * from './label.js';
|
|
10
12
|
export * from './message.js';
|
|
11
13
|
export * from './needs-attention.js';
|
|
12
14
|
export * from './notice.js';
|
package/dist/schemas/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './clear-request.js';
|
|
1
2
|
export * from './console.js';
|
|
2
3
|
export * from './crew-request.js';
|
|
3
4
|
export * from './delivery.js';
|
|
@@ -7,6 +8,7 @@ export * from './guide.js';
|
|
|
7
8
|
export * from './history.js';
|
|
8
9
|
export * from './idempotency-key.js';
|
|
9
10
|
export * from './installation.js';
|
|
11
|
+
export * from './label.js';
|
|
10
12
|
export * from './message.js';
|
|
11
13
|
export * from './needs-attention.js';
|
|
12
14
|
export * from './notice.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Labels (decision 0031): an owned vocabulary for selecting ships. A label is
|
|
4
|
+
* a key with a defined set of values, the label and each value with its own
|
|
5
|
+
* id; a ship holds a set of value ids. Ids are for machines, key and value
|
|
6
|
+
* texts for people. The limits below are the decision's; every refusal names
|
|
7
|
+
* it.
|
|
8
|
+
*/
|
|
9
|
+
/** The most characters a label's key or one of its values may have. */
|
|
10
|
+
export declare const LABEL_HANDLE_MAX_LENGTH = 63;
|
|
11
|
+
/** A label's key or value: lowercase letters, digits and hyphens, at least one. */
|
|
12
|
+
export declare const LABEL_HANDLE_PATTERN: RegExp;
|
|
13
|
+
/** The most values one label may define. */
|
|
14
|
+
export declare const LABEL_VALUES_MAX = 50;
|
|
15
|
+
/** The most label values one ship may carry. */
|
|
16
|
+
export declare const SHIP_LABELS_MAX = 20;
|
|
17
|
+
/** One value of a label: its id and its text. */
|
|
18
|
+
export declare const labelValueSchema: z.ZodObject<{
|
|
19
|
+
id: z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>;
|
|
20
|
+
value: z.ZodString;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
/** One value a ship carries, with its label: ids and texts. */
|
|
23
|
+
export declare const carriedLabelSchema: z.ZodObject<{
|
|
24
|
+
labelId: z.ZodType<`lbl_${string}`, unknown, z.core.$ZodTypeInternals<`lbl_${string}`, unknown>>;
|
|
25
|
+
key: z.ZodString;
|
|
26
|
+
valueId: z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>;
|
|
27
|
+
value: z.ZodString;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
/** Input of `fleet.list`: none, or the value ids a listed ship must carry: exact matches, combined with AND. */
|
|
30
|
+
export declare const fleetListInputSchema: z.ZodOptional<z.ZodObject<{
|
|
31
|
+
valueIds: z.ZodOptional<z.ZodArray<z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>>>;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
/** Input of `fleet.defineLabel` (labels:define): the key, unique in the fleet, and its values. */
|
|
34
|
+
export declare const defineLabelInputSchema: z.ZodObject<{
|
|
35
|
+
key: z.ZodString;
|
|
36
|
+
values: z.ZodArray<z.ZodString>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
/** Output of `fleet.defineLabel`: the label's id and each value with its id. */
|
|
39
|
+
export declare const defineLabelOutputSchema: z.ZodObject<{
|
|
40
|
+
labelId: z.ZodType<`lbl_${string}`, unknown, z.core.$ZodTypeInternals<`lbl_${string}`, unknown>>;
|
|
41
|
+
values: z.ZodArray<z.ZodObject<{
|
|
42
|
+
id: z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>;
|
|
43
|
+
value: z.ZodString;
|
|
44
|
+
}, z.core.$strip>>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
/** Input of `fleet.changeLabelValues` (labels:define, owner only): the label by its id and every value it has from now on. */
|
|
47
|
+
export declare const changeLabelValuesInputSchema: z.ZodObject<{
|
|
48
|
+
labelId: z.ZodType<`lbl_${string}`, unknown, z.core.$ZodTypeInternals<`lbl_${string}`, unknown>>;
|
|
49
|
+
values: z.ZodArray<z.ZodString>;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
/** Output of `fleet.changeLabelValues`: each value with its id, a kept value with the id it had. */
|
|
52
|
+
export declare const changeLabelValuesOutputSchema: z.ZodObject<{
|
|
53
|
+
values: z.ZodArray<z.ZodObject<{
|
|
54
|
+
id: z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>;
|
|
55
|
+
value: z.ZodString;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
/** Input of `fleet.deleteLabel` (labels:define, owner only): the label by its id. */
|
|
59
|
+
export declare const deleteLabelInputSchema: z.ZodObject<{
|
|
60
|
+
labelId: z.ZodType<`lbl_${string}`, unknown, z.core.$ZodTypeInternals<`lbl_${string}`, unknown>>;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
/** Input of `fleet.findLabelValue` (fleet:read): a key and a value as people write them. */
|
|
63
|
+
export declare const findLabelValueInputSchema: z.ZodObject<{
|
|
64
|
+
key: z.ZodString;
|
|
65
|
+
value: z.ZodString;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
/** Output of `fleet.findLabelValue`: the label's id and the value's id. */
|
|
68
|
+
export declare const findLabelValueOutputSchema: z.ZodObject<{
|
|
69
|
+
labelId: z.ZodType<`lbl_${string}`, unknown, z.core.$ZodTypeInternals<`lbl_${string}`, unknown>>;
|
|
70
|
+
valueId: z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
/** Input of `fleet.assignLabel` (labels:assign, owner only): the ship and the value it carries from now on, by their ids. */
|
|
73
|
+
export declare const assignLabelInputSchema: z.ZodObject<{
|
|
74
|
+
shipId: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
75
|
+
valueId: z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
/** Input of `fleet.unassignLabel` (labels:assign, owner only): the ship and the value it no longer carries, by their ids. */
|
|
78
|
+
export declare const unassignLabelInputSchema: z.ZodObject<{
|
|
79
|
+
shipId: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
80
|
+
valueId: z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
/** Output of the label assignments: nothing, the OK is the answer. */
|
|
83
|
+
export declare const labelWriteOutputSchema: z.ZodObject<{}, z.core.$strip>;
|
|
84
|
+
/** One label of the fleet: its id, its key, its values with their ids and its owner by id and name. */
|
|
85
|
+
export declare const listedLabelSchema: z.ZodObject<{
|
|
86
|
+
id: z.ZodType<`lbl_${string}`, unknown, z.core.$ZodTypeInternals<`lbl_${string}`, unknown>>;
|
|
87
|
+
key: z.ZodString;
|
|
88
|
+
values: z.ZodArray<z.ZodObject<{
|
|
89
|
+
id: z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>;
|
|
90
|
+
value: z.ZodString;
|
|
91
|
+
}, z.core.$strip>>;
|
|
92
|
+
owner: z.ZodObject<{
|
|
93
|
+
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
94
|
+
name: z.ZodString;
|
|
95
|
+
}, z.core.$strip>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
export type ListedLabel = z.infer<typeof listedLabelSchema>;
|
|
98
|
+
/** Output of `fleet.labels` (fleet:read): the fleet's labels by key. */
|
|
99
|
+
export declare const labelsOutputSchema: z.ZodArray<z.ZodObject<{
|
|
100
|
+
id: z.ZodType<`lbl_${string}`, unknown, z.core.$ZodTypeInternals<`lbl_${string}`, unknown>>;
|
|
101
|
+
key: z.ZodString;
|
|
102
|
+
values: z.ZodArray<z.ZodObject<{
|
|
103
|
+
id: z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>;
|
|
104
|
+
value: z.ZodString;
|
|
105
|
+
}, z.core.$strip>>;
|
|
106
|
+
owner: z.ZodObject<{
|
|
107
|
+
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
108
|
+
name: z.ZodString;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
}, z.core.$strip>>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { idSchema } from '../ids/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Labels (decision 0031): an owned vocabulary for selecting ships. A label is
|
|
5
|
+
* a key with a defined set of values, the label and each value with its own
|
|
6
|
+
* id; a ship holds a set of value ids. Ids are for machines, key and value
|
|
7
|
+
* texts for people. The limits below are the decision's; every refusal names
|
|
8
|
+
* it.
|
|
9
|
+
*/
|
|
10
|
+
/** The most characters a label's key or one of its values may have. */
|
|
11
|
+
export const LABEL_HANDLE_MAX_LENGTH = 63;
|
|
12
|
+
/** A label's key or value: lowercase letters, digits and hyphens, at least one. */
|
|
13
|
+
export const LABEL_HANDLE_PATTERN = /^[a-z0-9-]+$/;
|
|
14
|
+
/** The most values one label may define. */
|
|
15
|
+
export const LABEL_VALUES_MAX = 50;
|
|
16
|
+
/** The most label values one ship may carry. */
|
|
17
|
+
export const SHIP_LABELS_MAX = 20;
|
|
18
|
+
/**
|
|
19
|
+
* A key or a value as a call carries it: plain text. The server checks the
|
|
20
|
+
* limits above, so every refusal names their decision.
|
|
21
|
+
*/
|
|
22
|
+
const labelTextSchema = z.string();
|
|
23
|
+
/** One value of a label: its id and its text. */
|
|
24
|
+
export const labelValueSchema = z.object({ id: idSchema('labelValue'), value: z.string() });
|
|
25
|
+
/** One value a ship carries, with its label: ids and texts. */
|
|
26
|
+
export const carriedLabelSchema = z.object({ labelId: idSchema('label'), key: z.string(), valueId: idSchema('labelValue'), value: z.string() });
|
|
27
|
+
/** Input of `fleet.list`: none, or the value ids a listed ship must carry: exact matches, combined with AND. */
|
|
28
|
+
export const fleetListInputSchema = z.object({ valueIds: z.array(idSchema('labelValue')).optional() }).optional();
|
|
29
|
+
/** Input of `fleet.defineLabel` (labels:define): the key, unique in the fleet, and its values. */
|
|
30
|
+
export const defineLabelInputSchema = z.object({ key: labelTextSchema, values: z.array(labelTextSchema) });
|
|
31
|
+
/** Output of `fleet.defineLabel`: the label's id and each value with its id. */
|
|
32
|
+
export const defineLabelOutputSchema = z.object({ labelId: idSchema('label'), values: z.array(labelValueSchema) });
|
|
33
|
+
/** Input of `fleet.changeLabelValues` (labels:define, owner only): the label by its id and every value it has from now on. */
|
|
34
|
+
export const changeLabelValuesInputSchema = z.object({ labelId: idSchema('label'), values: z.array(labelTextSchema) });
|
|
35
|
+
/** Output of `fleet.changeLabelValues`: each value with its id, a kept value with the id it had. */
|
|
36
|
+
export const changeLabelValuesOutputSchema = z.object({ values: z.array(labelValueSchema) });
|
|
37
|
+
/** Input of `fleet.deleteLabel` (labels:define, owner only): the label by its id. */
|
|
38
|
+
export const deleteLabelInputSchema = z.object({ labelId: idSchema('label') });
|
|
39
|
+
/** Input of `fleet.findLabelValue` (fleet:read): a key and a value as people write them. */
|
|
40
|
+
export const findLabelValueInputSchema = z.object({ key: labelTextSchema, value: labelTextSchema });
|
|
41
|
+
/** Output of `fleet.findLabelValue`: the label's id and the value's id. */
|
|
42
|
+
export const findLabelValueOutputSchema = z.object({ labelId: idSchema('label'), valueId: idSchema('labelValue') });
|
|
43
|
+
/** Input of `fleet.assignLabel` (labels:assign, owner only): the ship and the value it carries from now on, by their ids. */
|
|
44
|
+
export const assignLabelInputSchema = z.object({ shipId: idSchema('ship'), valueId: idSchema('labelValue') });
|
|
45
|
+
/** Input of `fleet.unassignLabel` (labels:assign, owner only): the ship and the value it no longer carries, by their ids. */
|
|
46
|
+
export const unassignLabelInputSchema = assignLabelInputSchema;
|
|
47
|
+
/** Output of the label assignments: nothing, the OK is the answer. */
|
|
48
|
+
export const labelWriteOutputSchema = z.object({});
|
|
49
|
+
/** One label of the fleet: its id, its key, its values with their ids and its owner by id and name. */
|
|
50
|
+
export const listedLabelSchema = z.object({
|
|
51
|
+
id: idSchema('label'),
|
|
52
|
+
key: z.string(),
|
|
53
|
+
values: z.array(labelValueSchema),
|
|
54
|
+
owner: z.object({ id: idSchema('ship'), name: z.string() }),
|
|
55
|
+
});
|
|
56
|
+
/** Output of `fleet.labels` (fleet:read): the fleet's labels by key. */
|
|
57
|
+
export const labelsOutputSchema = z.array(listedLabelSchema);
|
|
58
|
+
//# sourceMappingURL=label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../src/schemas/label.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C;;;;;;GAMG;AAEH,uEAAuE;AACvE,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAE1C,mFAAmF;AACnF,MAAM,CAAC,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAEnD,4CAA4C;AAC5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAEnC,gDAAgD;AAChD,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAElC;;;GAGG;AACH,MA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jC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;CAC5D,CAAC,CAAC;AAIH,wEAAwE;AACxE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { trierarchNameSchema } from './names.js';
|
|
|
8
8
|
* The trierarch adds no flag by itself.
|
|
9
9
|
*/
|
|
10
10
|
const placeSchema = z.strictObject({ path: z.string().min(1) });
|
|
11
|
-
/** An option a
|
|
11
|
+
/** An option a crew request's settings may set: its values by name, each with the flags it adds, and the value used when the settings set none. */
|
|
12
12
|
const optionSchema = z
|
|
13
13
|
.strictObject({ values: z.record(trierarchNameSchema, z.array(z.string())), default: trierarchNameSchema.optional() })
|
|
14
14
|
.refine((option) => option.default === undefined || option.default in option.values, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../src/trierarch/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD;;;;;GAKG;AAEH,MAAM,WAAW,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAEhE,
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../src/trierarch/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,mBAA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GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;IAChF,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC,mBAAmB,EAAE,WAAW,CAAC;IACxD,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,mBAAmB,EAAE,WAAW,CAAC;IACnD,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,aAAa,EAAE,0BAA0B,CAAC;CAC/D,CAAC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** The longest first prompt, in UTF-8 bytes: 8 KB, given on the first start only. */
|
|
3
|
+
export declare const FIRST_PROMPT_MAX_BYTES = 8192;
|
|
4
|
+
/** A new git worktree of a configured repository, or a configured folder used as it is: named, never a path. */
|
|
5
|
+
export declare const trierarchWorkspaceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
|
+
kind: z.ZodLiteral<"worktree">;
|
|
7
|
+
repository: z.ZodString;
|
|
8
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
10
|
+
kind: z.ZodLiteral<"folder">;
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
}, z.core.$strict>], "kind">;
|
|
13
|
+
export type TrierarchWorkspace = z.infer<typeof trierarchWorkspaceSchema>;
|
|
14
|
+
/**
|
|
15
|
+
* A crew request's settings as a trierarch reads them (decision 0027): the
|
|
16
|
+
* fixed core of harness, workspace, an optional squadron, an optional first
|
|
17
|
+
* prompt and options. The server stores them without meaning; the trierarch
|
|
18
|
+
* plugin and the trierarch parse them with this schema. Never a path or a
|
|
19
|
+
* command-line flag: a workspace names a repository or folder, options pick
|
|
20
|
+
* named settings, and a first prompt never starts with `-`.
|
|
21
|
+
*/
|
|
22
|
+
export declare const crewSettingsSchema: z.ZodObject<{
|
|
23
|
+
harness: z.ZodString;
|
|
24
|
+
workspace: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
25
|
+
kind: z.ZodLiteral<"worktree">;
|
|
26
|
+
repository: z.ZodString;
|
|
27
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
29
|
+
kind: z.ZodLiteral<"folder">;
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
}, z.core.$strict>], "kind">;
|
|
32
|
+
squadron: z.ZodOptional<z.ZodString>;
|
|
33
|
+
firstPrompt: z.ZodOptional<z.ZodString>;
|
|
34
|
+
options: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
35
|
+
machineLabels: z.ZodOptional<z.ZodArray<z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>>>;
|
|
36
|
+
}, z.core.$strict>;
|
|
37
|
+
/**
|
|
38
|
+
* The reason the trierarch plugin writes on a request no machine carries
|
|
39
|
+
* every machine label of; it waits, and the console words it in full.
|
|
40
|
+
*/
|
|
41
|
+
export declare const NO_MACHINE_MATCHES_REASON = "no machine matches its labels";
|
|
42
|
+
export type CrewSettings = z.infer<typeof crewSettingsSchema>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { idSchema } from '../ids/index.js';
|
|
3
|
+
import { shipHandleSchema } from '../schemas/fleet.js';
|
|
4
|
+
import { SHIP_LABELS_MAX } from '../schemas/label.js';
|
|
5
|
+
import { harnessSchema } from '../schemas/ship.js';
|
|
6
|
+
import { trierarchNameSchema } from './names.js';
|
|
7
|
+
const utf8 = new TextEncoder();
|
|
8
|
+
/** The longest first prompt, in UTF-8 bytes: 8 KB, given on the first start only. */
|
|
9
|
+
export const FIRST_PROMPT_MAX_BYTES = 8192;
|
|
10
|
+
/** A new git worktree of a configured repository, or a configured folder used as it is: named, never a path. */
|
|
11
|
+
export const trierarchWorkspaceSchema = z.discriminatedUnion('kind', [
|
|
12
|
+
z.strictObject({ kind: z.literal('worktree'), repository: trierarchNameSchema, ref: z.string().min(1).optional() }),
|
|
13
|
+
z.strictObject({ kind: z.literal('folder'), name: trierarchNameSchema }),
|
|
14
|
+
]);
|
|
15
|
+
/**
|
|
16
|
+
* A crew request's settings as a trierarch reads them (decision 0027): the
|
|
17
|
+
* fixed core of harness, workspace, an optional squadron, an optional first
|
|
18
|
+
* prompt and options. The server stores them without meaning; the trierarch
|
|
19
|
+
* plugin and the trierarch parse them with this schema. Never a path or a
|
|
20
|
+
* command-line flag: a workspace names a repository or folder, options pick
|
|
21
|
+
* named settings, and a first prompt never starts with `-`.
|
|
22
|
+
*/
|
|
23
|
+
export const crewSettingsSchema = z.strictObject({
|
|
24
|
+
harness: harnessSchema,
|
|
25
|
+
workspace: trierarchWorkspaceSchema,
|
|
26
|
+
/** The squadron the ship is a member of, so it checks in at its flagship as a crew line's squadron id does. */
|
|
27
|
+
squadron: shipHandleSchema.optional(),
|
|
28
|
+
firstPrompt: z
|
|
29
|
+
.string()
|
|
30
|
+
.min(1)
|
|
31
|
+
.refine((prompt) => utf8.encode(prompt).byteLength <= FIRST_PROMPT_MAX_BYTES, `A first prompt is at most ${String(FIRST_PROMPT_MAX_BYTES)} bytes`)
|
|
32
|
+
// A harness would read it as a flag the operator never configured (decision 0027).
|
|
33
|
+
.refine((prompt) => !prompt.startsWith('-'), 'A first prompt may not start with -, which reads as a flag')
|
|
34
|
+
.optional(),
|
|
35
|
+
/** Named settings, checked against the JSON Schema the trierarch reports for the harness. */
|
|
36
|
+
options: z.record(z.string(), z.json()),
|
|
37
|
+
/**
|
|
38
|
+
* The label values a machine carries every one of for the request to go to
|
|
39
|
+
* it (#102; docs/trierarch.md, "Machine labels"): exact matches, AND. A
|
|
40
|
+
* machine carries at most 20, so no more can match. None: any machine.
|
|
41
|
+
*/
|
|
42
|
+
machineLabels: z.array(idSchema('labelValue')).max(SHIP_LABELS_MAX).optional(),
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* The reason the trierarch plugin writes on a request no machine carries
|
|
46
|
+
* every machine label of; it waits, and the console words it in full.
|
|
47
|
+
*/
|
|
48
|
+
export const NO_MACHINE_MATCHES_REASON = 'no machine matches its labels';
|
|
49
|
+
//# sourceMappingURL=crew-settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crew-settings.js","sourceRoot":"","sources":["../../src/trierarch/crew-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC;AAE/B,qFAAqF;AACrF,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC;AAE3C,gHAAgH;AAChH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACnE,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,mBAAmB,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC;IACnH,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC;CACzE,CAAC,CAAC;AAGH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,YAAY,CAAC;IAC/C,OAAO,EAAE,aAAa;IACtB,SAAS,EAAE,wBAAwB;IACnC,+GAA+G;IAC/G,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,EAAE;IACrC,WAAW,EAAE,CAAC;SACX,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,IAAI,sBAAsB,EAAE,6BAA6B,MAAM,CAAC,sBAAsB,CAAC,QAAQ,CAAC;QAClJ,mFAAmF;SAClF,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,4DAA4D,CAAC;SACzG,QAAQ,EAAE;IACb,6FAA6F;IAC7F,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACvC;;;;OAIG;IACH,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,QAAQ,EAAE;CAC/E,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,+BAA+B,CAAC"}
|
package/dist/trierarch/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/trierarch/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/trierarch/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** The operating systems a trierarch names its machine by, for the trierarch plugin's os label (#102); any other is left out. */
|
|
3
|
+
export declare const MACHINE_OS: readonly ["macos", "linux", "windows"];
|
|
4
|
+
/** The architectures a trierarch names its machine by, for the trierarch plugin's arch label (#102); any other is left out. */
|
|
5
|
+
export declare const MACHINE_ARCH: readonly ["arm64", "amd64"];
|
|
6
|
+
export declare const trierarchReportDetailsSchema: z.ZodObject<{
|
|
7
|
+
harnesses: z.ZodArray<z.ZodObject<{
|
|
8
|
+
harness: z.ZodString;
|
|
9
|
+
options: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
10
|
+
flags: z.ZodArray<z.ZodString>;
|
|
11
|
+
riskyFlags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12
|
+
}, z.core.$strict>>;
|
|
13
|
+
workspaces: z.ZodObject<{
|
|
14
|
+
repositories: z.ZodArray<z.ZodString>;
|
|
15
|
+
folders: z.ZodArray<z.ZodString>;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
caps: z.ZodObject<{
|
|
18
|
+
ships: z.ZodInt;
|
|
19
|
+
running: z.ZodInt;
|
|
20
|
+
}, z.core.$strict>;
|
|
21
|
+
kept: z.ZodArray<z.ZodObject<{
|
|
22
|
+
shipId: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
23
|
+
repository: z.ZodString;
|
|
24
|
+
}, z.core.$strict>>;
|
|
25
|
+
orphans: z.ZodArray<z.ZodObject<{
|
|
26
|
+
repository: z.ZodString;
|
|
27
|
+
name: z.ZodString;
|
|
28
|
+
}, z.core.$strict>>;
|
|
29
|
+
machine: z.ZodOptional<z.ZodObject<{
|
|
30
|
+
os: z.ZodOptional<z.ZodEnum<{
|
|
31
|
+
macos: "macos";
|
|
32
|
+
linux: "linux";
|
|
33
|
+
windows: "windows";
|
|
34
|
+
}>>;
|
|
35
|
+
arch: z.ZodOptional<z.ZodEnum<{
|
|
36
|
+
arm64: "arm64";
|
|
37
|
+
amd64: "amd64";
|
|
38
|
+
}>>;
|
|
39
|
+
}, z.core.$strict>>;
|
|
40
|
+
version: z.ZodString;
|
|
41
|
+
}, z.core.$strict>;
|
|
42
|
+
export type TrierarchReportDetails = z.infer<typeof trierarchReportDetailsSchema>;
|