@aeolus-fleet/common 0.17.3 → 0.19.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 +17 -8
- package/dist/fleet/index.js +12 -5
- package/dist/fleet/index.js.map +1 -1
- package/dist/fleet/mcp-url.d.ts +7 -0
- package/dist/fleet/mcp-url.js +10 -0
- package/dist/fleet/mcp-url.js.map +1 -0
- package/dist/schemas/console.d.ts +2 -1
- package/dist/schemas/crew-request.d.ts +152 -0
- package/dist/schemas/crew-request.js +102 -0
- package/dist/schemas/crew-request.js.map +1 -0
- package/dist/schemas/fleet.d.ts +59 -4
- package/dist/schemas/fleet.js +9 -11
- package/dist/schemas/fleet.js.map +1 -1
- package/dist/schemas/follow.d.ts +5 -0
- package/dist/schemas/history.d.ts +37 -3
- package/dist/schemas/history.js +6 -0
- 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/report.d.ts +77 -1
- package/dist/schemas/report.js +49 -2
- package/dist/schemas/report.js.map +1 -1
- package/dist/trierarch/configuration.js +1 -1
- package/dist/trierarch/configuration.js.map +1 -1
- package/dist/trierarch/crew-settings.d.ts +36 -0
- package/dist/trierarch/crew-settings.js +36 -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 +32 -0
- package/dist/trierarch/report-details.js +30 -0
- package/dist/trierarch/report-details.js.map +1 -0
- package/package.json +4 -2
- package/dist/trierarch/protocol.d.ts +0 -130
- package/dist/trierarch/protocol.js +0 -109
- 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,7 +26,8 @@ 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
|
-
"
|
|
29
|
+
"crew:assign": "crew:assign";
|
|
30
|
+
"crew:run": "crew:run";
|
|
30
31
|
}>>>;
|
|
31
32
|
note: z.ZodOptional<z.ZodString>;
|
|
32
33
|
idempotencyKey: z.ZodString;
|
|
@@ -181,7 +182,8 @@ export declare const listedShipSchema: z.ZodObject<{
|
|
|
181
182
|
"messages:receive": "messages:receive";
|
|
182
183
|
"fleet:read": "fleet:read";
|
|
183
184
|
"fleet:manage": "fleet:manage";
|
|
184
|
-
"
|
|
185
|
+
"crew:assign": "crew:assign";
|
|
186
|
+
"crew:run": "crew:run";
|
|
185
187
|
}>>;
|
|
186
188
|
report: z.ZodNullable<z.ZodObject<{
|
|
187
189
|
state: z.ZodEnum<{
|
|
@@ -191,6 +193,27 @@ export declare const listedShipSchema: z.ZodObject<{
|
|
|
191
193
|
}>;
|
|
192
194
|
note: z.ZodNullable<z.ZodString>;
|
|
193
195
|
reportedAt: z.ZodISODateTime;
|
|
196
|
+
detailsVersion: z.ZodInt;
|
|
197
|
+
}, z.core.$strip>>;
|
|
198
|
+
crewRequest: z.ZodNullable<z.ZodObject<{
|
|
199
|
+
settingsVersion: z.ZodInt;
|
|
200
|
+
requestedAt: z.ZodISODateTime;
|
|
201
|
+
assignedTo: z.ZodNullable<z.ZodObject<{
|
|
202
|
+
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
203
|
+
name: z.ZodString;
|
|
204
|
+
}, z.core.$strip>>;
|
|
205
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
206
|
+
crewing: "crewing";
|
|
207
|
+
running: "running";
|
|
208
|
+
restarting: "restarting";
|
|
209
|
+
crashed: "crashed";
|
|
210
|
+
releasing: "releasing";
|
|
211
|
+
}>>;
|
|
212
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
213
|
+
crewedBy: z.ZodNullable<z.ZodObject<{
|
|
214
|
+
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
215
|
+
name: z.ZodString;
|
|
216
|
+
}, z.core.$strip>>;
|
|
194
217
|
}, z.core.$strip>>;
|
|
195
218
|
awaitingCrewSince: z.ZodNullable<z.ZodISODateTime>;
|
|
196
219
|
retiredAt: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -245,7 +268,8 @@ export declare const fleetListOutputSchema: z.ZodArray<z.ZodObject<{
|
|
|
245
268
|
"messages:receive": "messages:receive";
|
|
246
269
|
"fleet:read": "fleet:read";
|
|
247
270
|
"fleet:manage": "fleet:manage";
|
|
248
|
-
"
|
|
271
|
+
"crew:assign": "crew:assign";
|
|
272
|
+
"crew:run": "crew:run";
|
|
249
273
|
}>>;
|
|
250
274
|
report: z.ZodNullable<z.ZodObject<{
|
|
251
275
|
state: z.ZodEnum<{
|
|
@@ -255,6 +279,27 @@ export declare const fleetListOutputSchema: z.ZodArray<z.ZodObject<{
|
|
|
255
279
|
}>;
|
|
256
280
|
note: z.ZodNullable<z.ZodString>;
|
|
257
281
|
reportedAt: z.ZodISODateTime;
|
|
282
|
+
detailsVersion: z.ZodInt;
|
|
283
|
+
}, z.core.$strip>>;
|
|
284
|
+
crewRequest: z.ZodNullable<z.ZodObject<{
|
|
285
|
+
settingsVersion: z.ZodInt;
|
|
286
|
+
requestedAt: z.ZodISODateTime;
|
|
287
|
+
assignedTo: z.ZodNullable<z.ZodObject<{
|
|
288
|
+
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
289
|
+
name: z.ZodString;
|
|
290
|
+
}, z.core.$strip>>;
|
|
291
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
292
|
+
crewing: "crewing";
|
|
293
|
+
running: "running";
|
|
294
|
+
restarting: "restarting";
|
|
295
|
+
crashed: "crashed";
|
|
296
|
+
releasing: "releasing";
|
|
297
|
+
}>>;
|
|
298
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
299
|
+
crewedBy: z.ZodNullable<z.ZodObject<{
|
|
300
|
+
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
301
|
+
name: z.ZodString;
|
|
302
|
+
}, z.core.$strip>>;
|
|
258
303
|
}, z.core.$strip>>;
|
|
259
304
|
awaitingCrewSince: z.ZodNullable<z.ZodISODateTime>;
|
|
260
305
|
retiredAt: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -298,6 +343,11 @@ export declare const liveFleetEventSchema: z.ZodObject<{
|
|
|
298
343
|
SignInTicketIssued: "SignInTicketIssued";
|
|
299
344
|
FleetLimitsChanged: "FleetLimitsChanged";
|
|
300
345
|
ViewerSessionStarted: "ViewerSessionStarted";
|
|
346
|
+
CrewRequested: "CrewRequested";
|
|
347
|
+
CrewRequestRemoved: "CrewRequestRemoved";
|
|
348
|
+
CrewAssigned: "CrewAssigned";
|
|
349
|
+
CrewStatusChanged: "CrewStatusChanged";
|
|
350
|
+
CrewRequestExplained: "CrewRequestExplained";
|
|
301
351
|
}>;
|
|
302
352
|
occurredAt: z.ZodISODateTime;
|
|
303
353
|
actorShipId: z.ZodNullable<z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>>;
|
|
@@ -336,6 +386,11 @@ export declare const fleetStreamItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
336
386
|
SignInTicketIssued: "SignInTicketIssued";
|
|
337
387
|
FleetLimitsChanged: "FleetLimitsChanged";
|
|
338
388
|
ViewerSessionStarted: "ViewerSessionStarted";
|
|
389
|
+
CrewRequested: "CrewRequested";
|
|
390
|
+
CrewRequestRemoved: "CrewRequestRemoved";
|
|
391
|
+
CrewAssigned: "CrewAssigned";
|
|
392
|
+
CrewStatusChanged: "CrewStatusChanged";
|
|
393
|
+
CrewRequestExplained: "CrewRequestExplained";
|
|
339
394
|
}>;
|
|
340
395
|
occurredAt: z.ZodISODateTime;
|
|
341
396
|
actorShipId: z.ZodNullable<z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>>;
|
package/dist/schemas/fleet.js
CHANGED
|
@@ -2,7 +2,8 @@ import { z } from 'zod';
|
|
|
2
2
|
import { eventTypeSchema, fleetScopeSchema, locationKindSchema, scopeSchema, shipKindSchema, shipStatusSchema } from '../fleet/index.js';
|
|
3
3
|
import { idSchema } from '../ids/index.js';
|
|
4
4
|
import { idempotencyKeySchema } from './idempotency-key.js';
|
|
5
|
-
import {
|
|
5
|
+
import { listedCrewRequestSchema } from './crew-request.js';
|
|
6
|
+
import { listedReportSchema } from './report.js';
|
|
6
7
|
/**
|
|
7
8
|
* Inputs and outputs of the fleet procedures: commission a ship, get its
|
|
8
9
|
* starting prompt, release it, list the fleet, follow its events live.
|
|
@@ -23,7 +24,7 @@ export const SHIP_NOTE_MAX_LENGTH = 500;
|
|
|
23
24
|
/**
|
|
24
25
|
* Input of `fleet.commission`. The note is free text for the operator;
|
|
25
26
|
* whitespace around it is dropped. `fleetScopes` adds fleet:read,
|
|
26
|
-
* fleet:manage and/or
|
|
27
|
+
* fleet:manage, crew:assign and/or crew:run to the scopes every agent ship has; none
|
|
27
28
|
* when left out.
|
|
28
29
|
* `idempotencyKey` is the caller's own key, as for a send: a retry with the
|
|
29
30
|
* same key and the same request commissions no second ship.
|
|
@@ -151,16 +152,13 @@ export const listedShipSchema = z.object({
|
|
|
151
152
|
/** What the ship may do, checked on every call: every agent ship sends and receives, argo has all. */
|
|
152
153
|
scopes: z.array(scopeSchema),
|
|
153
154
|
/**
|
|
154
|
-
* The crew's last report (ISO 8601 in UTC): its state, its note,
|
|
155
|
-
* last reported
|
|
155
|
+
* The crew's last report (ISO 8601 in UTC): its state, its note, when it
|
|
156
|
+
* last reported and the version of its details, never the details
|
|
157
|
+
* themselves. Null until the crew reports, and for a ship no session crews.
|
|
156
158
|
*/
|
|
157
|
-
report:
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
note: z.string().nullable(),
|
|
161
|
-
reportedAt: z.iso.datetime(),
|
|
162
|
-
})
|
|
163
|
-
.nullable(),
|
|
159
|
+
report: listedReportSchema.nullable(),
|
|
160
|
+
/** The ship's crew request (decision 0029); null when it holds none. */
|
|
161
|
+
crewRequest: listedCrewRequestSchema.nullable(),
|
|
164
162
|
/** Since when the ship awaits crew (ISO 8601 in UTC): its commission, or the end of its last session. Null unless it awaits crew. */
|
|
165
163
|
awaitingCrewSince: z.iso.datetime().nullable(),
|
|
166
164
|
/** 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,
|
|
1
|
+
{"version":3,"file":"fleet.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AAE,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
|
@@ -42,6 +42,11 @@ export declare const followFleetOutputSchema: z.ZodObject<{
|
|
|
42
42
|
SignInTicketIssued: "SignInTicketIssued";
|
|
43
43
|
FleetLimitsChanged: "FleetLimitsChanged";
|
|
44
44
|
ViewerSessionStarted: "ViewerSessionStarted";
|
|
45
|
+
CrewRequested: "CrewRequested";
|
|
46
|
+
CrewRequestRemoved: "CrewRequestRemoved";
|
|
47
|
+
CrewAssigned: "CrewAssigned";
|
|
48
|
+
CrewStatusChanged: "CrewStatusChanged";
|
|
49
|
+
CrewRequestExplained: "CrewRequestExplained";
|
|
45
50
|
}>;
|
|
46
51
|
occurredAt: z.ZodISODateTime;
|
|
47
52
|
actorShipId: z.ZodNullable<z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>>;
|
|
@@ -74,8 +74,11 @@ 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
|
-
"
|
|
77
|
+
"crew:assign": "crew:assign";
|
|
78
|
+
"crew:run": "crew:run";
|
|
78
79
|
}>>;
|
|
80
|
+
awaitingCrewSince: z.ZodNullable<z.ZodISODateTime>;
|
|
81
|
+
retiredAt: z.ZodNullable<z.ZodISODateTime>;
|
|
79
82
|
report: z.ZodNullable<z.ZodObject<{
|
|
80
83
|
state: z.ZodEnum<{
|
|
81
84
|
working: "working";
|
|
@@ -84,9 +87,30 @@ export declare const shipDetailOutputSchema: z.ZodObject<{
|
|
|
84
87
|
}>;
|
|
85
88
|
note: z.ZodNullable<z.ZodString>;
|
|
86
89
|
reportedAt: z.ZodISODateTime;
|
|
90
|
+
detailsVersion: z.ZodInt;
|
|
91
|
+
details: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
92
|
+
}, z.core.$strip>>;
|
|
93
|
+
crewRequest: z.ZodNullable<z.ZodObject<{
|
|
94
|
+
settingsVersion: z.ZodInt;
|
|
95
|
+
requestedAt: z.ZodISODateTime;
|
|
96
|
+
assignedTo: z.ZodNullable<z.ZodObject<{
|
|
97
|
+
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
98
|
+
name: z.ZodString;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
101
|
+
crewing: "crewing";
|
|
102
|
+
running: "running";
|
|
103
|
+
restarting: "restarting";
|
|
104
|
+
crashed: "crashed";
|
|
105
|
+
releasing: "releasing";
|
|
106
|
+
}>>;
|
|
107
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
108
|
+
crewedBy: z.ZodNullable<z.ZodObject<{
|
|
109
|
+
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
110
|
+
name: z.ZodString;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
settings: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
87
113
|
}, z.core.$strip>>;
|
|
88
|
-
awaitingCrewSince: z.ZodNullable<z.ZodISODateTime>;
|
|
89
|
-
retiredAt: z.ZodNullable<z.ZodISODateTime>;
|
|
90
114
|
commissionedAt: z.ZodISODateTime;
|
|
91
115
|
crewedSince: z.ZodNullable<z.ZodISODateTime>;
|
|
92
116
|
inFlightDeliveries: z.ZodInt;
|
|
@@ -118,6 +142,11 @@ export declare const timelineEntrySchema: z.ZodObject<{
|
|
|
118
142
|
SignInTicketIssued: "SignInTicketIssued";
|
|
119
143
|
FleetLimitsChanged: "FleetLimitsChanged";
|
|
120
144
|
ViewerSessionStarted: "ViewerSessionStarted";
|
|
145
|
+
CrewRequested: "CrewRequested";
|
|
146
|
+
CrewRequestRemoved: "CrewRequestRemoved";
|
|
147
|
+
CrewAssigned: "CrewAssigned";
|
|
148
|
+
CrewStatusChanged: "CrewStatusChanged";
|
|
149
|
+
CrewRequestExplained: "CrewRequestExplained";
|
|
121
150
|
}>;
|
|
122
151
|
occurredAt: z.ZodISODateTime;
|
|
123
152
|
actor: z.ZodNullable<z.ZodObject<{
|
|
@@ -175,6 +204,11 @@ export declare const shipTimelineOutputSchema: z.ZodArray<z.ZodObject<{
|
|
|
175
204
|
SignInTicketIssued: "SignInTicketIssued";
|
|
176
205
|
FleetLimitsChanged: "FleetLimitsChanged";
|
|
177
206
|
ViewerSessionStarted: "ViewerSessionStarted";
|
|
207
|
+
CrewRequested: "CrewRequested";
|
|
208
|
+
CrewRequestRemoved: "CrewRequestRemoved";
|
|
209
|
+
CrewAssigned: "CrewAssigned";
|
|
210
|
+
CrewStatusChanged: "CrewStatusChanged";
|
|
211
|
+
CrewRequestExplained: "CrewRequestExplained";
|
|
178
212
|
}>;
|
|
179
213
|
occurredAt: z.ZodISODateTime;
|
|
180
214
|
actor: z.ZodNullable<z.ZodObject<{
|
package/dist/schemas/history.js
CHANGED
|
@@ -2,6 +2,8 @@ import { z } from 'zod';
|
|
|
2
2
|
import { deliveryStateSchema, eventTypeSchema, locationKindSchema } from '../fleet/index.js';
|
|
3
3
|
import { idSchema } from '../ids/index.js';
|
|
4
4
|
import { listedShipSchema } from './fleet.js';
|
|
5
|
+
import { crewRequestSchema } from './crew-request.js';
|
|
6
|
+
import { reportSchema } from './report.js';
|
|
5
7
|
/**
|
|
6
8
|
* Inputs and outputs of the history procedures, for the ship page: one ship,
|
|
7
9
|
* its timeline from the event log, its messages, and one message with the
|
|
@@ -24,6 +26,10 @@ export const shipInputSchema = z.object({ shipId: idSchema('ship') });
|
|
|
24
26
|
* when it retired.
|
|
25
27
|
*/
|
|
26
28
|
export const shipDetailOutputSchema = listedShipSchema.extend({
|
|
29
|
+
/** The crew's last report as the fleet lists it, with its details. */
|
|
30
|
+
report: reportSchema.nullable(),
|
|
31
|
+
/** The ship's crew request, settings included. */
|
|
32
|
+
crewRequest: crewRequestSchema.nullable(),
|
|
27
33
|
commissionedAt: isoTime,
|
|
28
34
|
crewedSince: isoTime.nullable(),
|
|
29
35
|
/** What its crew holds in flight now: what a release or a re-crew returns to pending. */
|
|
@@ -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,CAA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ACH,CAAC,CAAC"}
|
package/dist/schemas/index.d.ts
CHANGED
package/dist/schemas/index.js
CHANGED
|
@@ -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,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,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"}
|
package/dist/schemas/report.d.ts
CHANGED
|
@@ -11,7 +11,23 @@ export type ReportState = z.infer<typeof reportStateSchema>;
|
|
|
11
11
|
export declare const REPORT_NOTE_MAX_LENGTH = 200;
|
|
12
12
|
/** Whether a note fits on one line. */
|
|
13
13
|
export declare function isOneLine(text: string): boolean;
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* The most a report's details may hold: 16 KB as the UTF-8 bytes of their
|
|
16
|
+
* serialized JSON (decision 0028). Status, not storage: content goes
|
|
17
|
+
* elsewhere, by reference.
|
|
18
|
+
*/
|
|
19
|
+
export declare const REPORT_DETAILS_MAX_BYTES: number;
|
|
20
|
+
/** The size of a report's details: the UTF-8 bytes of their serialized JSON. */
|
|
21
|
+
export declare function reportDetailsBytes(details: ReportDetails): number;
|
|
22
|
+
/** A report's details: one JSON object, whose meaning lives outside the server (decision 0028). */
|
|
23
|
+
export declare const reportDetailsSchema: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
24
|
+
export type ReportDetails = z.infer<typeof reportDetailsSchema>;
|
|
25
|
+
/**
|
|
26
|
+
* Input of `report`: the crew's state and a short note on what it is doing,
|
|
27
|
+
* trimmed, and optionally its details. `details` sets them whole, null clears
|
|
28
|
+
* them; `detailsPatch` applies a JSON Merge Patch (RFC 7386) to them; never
|
|
29
|
+
* both. Left out, the details stay as they are. Calling it is a check-in.
|
|
30
|
+
*/
|
|
15
31
|
export declare const reportInputSchema: z.ZodObject<{
|
|
16
32
|
state: z.ZodEnum<{
|
|
17
33
|
working: "working";
|
|
@@ -19,7 +35,67 @@ export declare const reportInputSchema: z.ZodObject<{
|
|
|
19
35
|
idle: "idle";
|
|
20
36
|
}>;
|
|
21
37
|
note: z.ZodOptional<z.ZodString>;
|
|
38
|
+
details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
39
|
+
detailsPatch: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
22
40
|
}, z.core.$strip>;
|
|
23
41
|
export type ReportInput = z.infer<typeof reportInputSchema>;
|
|
24
42
|
/** Output of `report`: nothing; the OK is the answer. */
|
|
25
43
|
export declare const reportOutputSchema: z.ZodObject<{}, z.core.$strict>;
|
|
44
|
+
/**
|
|
45
|
+
* A crew's report as the fleet list shows it (ISO 8601 in UTC): its state,
|
|
46
|
+
* its note, when it last reported, and the version of its details, which
|
|
47
|
+
* moves each time they change (0 before any).
|
|
48
|
+
*/
|
|
49
|
+
export declare const listedReportSchema: z.ZodObject<{
|
|
50
|
+
state: z.ZodEnum<{
|
|
51
|
+
working: "working";
|
|
52
|
+
blocked: "blocked";
|
|
53
|
+
idle: "idle";
|
|
54
|
+
}>;
|
|
55
|
+
note: z.ZodNullable<z.ZodString>;
|
|
56
|
+
reportedAt: z.ZodISODateTime;
|
|
57
|
+
detailsVersion: z.ZodInt;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
/** A crew's report whole: as the fleet list shows it, with its details; null when it has none. */
|
|
60
|
+
export declare const reportSchema: z.ZodObject<{
|
|
61
|
+
state: z.ZodEnum<{
|
|
62
|
+
working: "working";
|
|
63
|
+
blocked: "blocked";
|
|
64
|
+
idle: "idle";
|
|
65
|
+
}>;
|
|
66
|
+
note: z.ZodNullable<z.ZodString>;
|
|
67
|
+
reportedAt: z.ZodISODateTime;
|
|
68
|
+
detailsVersion: z.ZodInt;
|
|
69
|
+
details: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
export type ShipReportOutput = z.infer<typeof reportSchema>;
|
|
72
|
+
/**
|
|
73
|
+
* Output of `reportLog`: the crew's own report, and the last report of the
|
|
74
|
+
* ship's previous crew, read-only (the crew log of the previous crew). Each
|
|
75
|
+
* null when there is none.
|
|
76
|
+
*/
|
|
77
|
+
export declare const reportLogOutputSchema: z.ZodObject<{
|
|
78
|
+
report: z.ZodNullable<z.ZodObject<{
|
|
79
|
+
state: z.ZodEnum<{
|
|
80
|
+
working: "working";
|
|
81
|
+
blocked: "blocked";
|
|
82
|
+
idle: "idle";
|
|
83
|
+
}>;
|
|
84
|
+
note: z.ZodNullable<z.ZodString>;
|
|
85
|
+
reportedAt: z.ZodISODateTime;
|
|
86
|
+
detailsVersion: z.ZodInt;
|
|
87
|
+
details: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
88
|
+
}, z.core.$strip>>;
|
|
89
|
+
previousCrew: z.ZodNullable<z.ZodObject<{
|
|
90
|
+
state: z.ZodEnum<{
|
|
91
|
+
working: "working";
|
|
92
|
+
blocked: "blocked";
|
|
93
|
+
idle: "idle";
|
|
94
|
+
}>;
|
|
95
|
+
note: z.ZodNullable<z.ZodString>;
|
|
96
|
+
reportedAt: z.ZodISODateTime;
|
|
97
|
+
detailsVersion: z.ZodInt;
|
|
98
|
+
details: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
export type ReportLogOutput = z.infer<typeof reportLogOutputSchema>;
|
package/dist/schemas/report.js
CHANGED
|
@@ -9,11 +9,58 @@ const NOTE_MESSAGE = `A note is one line of at most ${String(REPORT_NOTE_MAX_LEN
|
|
|
9
9
|
export function isOneLine(text) {
|
|
10
10
|
return !/[\r\n]/.test(text);
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
13
|
-
|
|
12
|
+
/**
|
|
13
|
+
* The most a report's details may hold: 16 KB as the UTF-8 bytes of their
|
|
14
|
+
* serialized JSON (decision 0028). Status, not storage: content goes
|
|
15
|
+
* elsewhere, by reference.
|
|
16
|
+
*/
|
|
17
|
+
export const REPORT_DETAILS_MAX_BYTES = 16 * 1024;
|
|
18
|
+
const utf8 = new TextEncoder();
|
|
19
|
+
/** The size of a report's details: the UTF-8 bytes of their serialized JSON. */
|
|
20
|
+
export function reportDetailsBytes(details) {
|
|
21
|
+
return utf8.encode(JSON.stringify(details)).byteLength;
|
|
22
|
+
}
|
|
23
|
+
/** A report's details: one JSON object, whose meaning lives outside the server (decision 0028). */
|
|
24
|
+
export const reportDetailsSchema = z.record(z.string(), z.json());
|
|
25
|
+
/**
|
|
26
|
+
* Input of `report`: the crew's state and a short note on what it is doing,
|
|
27
|
+
* trimmed, and optionally its details. `details` sets them whole, null clears
|
|
28
|
+
* them; `detailsPatch` applies a JSON Merge Patch (RFC 7386) to them; never
|
|
29
|
+
* both. Left out, the details stay as they are. Calling it is a check-in.
|
|
30
|
+
*/
|
|
31
|
+
export const reportInputSchema = z
|
|
32
|
+
.object({
|
|
14
33
|
state: reportStateSchema,
|
|
15
34
|
note: z.string().trim().max(REPORT_NOTE_MAX_LENGTH, NOTE_MESSAGE).refine(isOneLine, NOTE_MESSAGE).optional(),
|
|
35
|
+
details: reportDetailsSchema.nullable().optional(),
|
|
36
|
+
detailsPatch: reportDetailsSchema.nullable().optional(),
|
|
37
|
+
})
|
|
38
|
+
.refine((input) => input.details === undefined || input.detailsPatch === undefined, {
|
|
39
|
+
message: 'Give details or detailsPatch, not both',
|
|
40
|
+
path: ['detailsPatch'],
|
|
16
41
|
});
|
|
17
42
|
/** Output of `report`: nothing; the OK is the answer. */
|
|
18
43
|
export const reportOutputSchema = z.strictObject({});
|
|
44
|
+
/**
|
|
45
|
+
* A crew's report as the fleet list shows it (ISO 8601 in UTC): its state,
|
|
46
|
+
* its note, when it last reported, and the version of its details, which
|
|
47
|
+
* moves each time they change (0 before any).
|
|
48
|
+
*/
|
|
49
|
+
export const listedReportSchema = z.object({
|
|
50
|
+
state: reportStateSchema,
|
|
51
|
+
note: z.string().nullable(),
|
|
52
|
+
reportedAt: z.iso.datetime(),
|
|
53
|
+
detailsVersion: z.int().min(0),
|
|
54
|
+
});
|
|
55
|
+
/** A crew's report whole: as the fleet list shows it, with its details; null when it has none. */
|
|
56
|
+
export const reportSchema = listedReportSchema.extend({ details: reportDetailsSchema.nullable() });
|
|
57
|
+
/**
|
|
58
|
+
* Output of `reportLog`: the crew's own report, and the last report of the
|
|
59
|
+
* ship's previous crew, read-only (the crew log of the previous crew). Each
|
|
60
|
+
* null when there is none.
|
|
61
|
+
*/
|
|
62
|
+
export const reportLogOutputSchema = z.object({
|
|
63
|
+
report: reportSchema.nullable(),
|
|
64
|
+
previousCrew: reportSchema.nullable(),
|
|
65
|
+
});
|
|
19
66
|
//# sourceMappingURL=report.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../src/schemas/report.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8FAA8F;AAC9F,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,CAAU,CAAC;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AAGvD,0CAA0C;AAC1C,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAE1C,MAAM,YAAY,GAAG,iCAAiC,MAAM,CAAC,sBAAsB,CAAC,aAAa,CAAC;AAElG,uCAAuC;AACvC,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC;AAED,
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../src/schemas/report.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8FAA8F;AAC9F,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,CAAU,CAAC;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AAGvD,0CAA0C;AAC1C,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAE1C,MAAM,YAAY,GAAG,iCAAiC,MAAM,CAAC,sBAAsB,CAAC,aAAa,CAAC;AAElG,uCAAuC;AACvC,MAAM,UAAU,SAAS,C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;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,KAAK,EAAE,iBAAiB;IACxB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;IAC5B,cAAc,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC/B,CAAC,CAAC;AAEH,kGAAkG;AAClG,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,mBAAmB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAInG;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE;IAC/B,YAAY,EAAE,YAAY,CAAC,QAAQ,EAAE;CACtC,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,Y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AAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,YAAY,CAAC;IACzD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,+FAA+F;IAC/F,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC1C,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,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,36 @@
|
|
|
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
|
+
}, z.core.$strict>;
|
|
36
|
+
export type CrewSettings = z.infer<typeof crewSettingsSchema>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { shipHandleSchema } from '../schemas/fleet.js';
|
|
3
|
+
import { harnessSchema } from '../schemas/ship.js';
|
|
4
|
+
import { trierarchNameSchema } from './names.js';
|
|
5
|
+
const utf8 = new TextEncoder();
|
|
6
|
+
/** The longest first prompt, in UTF-8 bytes: 8 KB, given on the first start only. */
|
|
7
|
+
export const FIRST_PROMPT_MAX_BYTES = 8192;
|
|
8
|
+
/** A new git worktree of a configured repository, or a configured folder used as it is: named, never a path. */
|
|
9
|
+
export const trierarchWorkspaceSchema = z.discriminatedUnion('kind', [
|
|
10
|
+
z.strictObject({ kind: z.literal('worktree'), repository: trierarchNameSchema, ref: z.string().min(1).optional() }),
|
|
11
|
+
z.strictObject({ kind: z.literal('folder'), name: trierarchNameSchema }),
|
|
12
|
+
]);
|
|
13
|
+
/**
|
|
14
|
+
* A crew request's settings as a trierarch reads them (decision 0027): the
|
|
15
|
+
* fixed core of harness, workspace, an optional squadron, an optional first
|
|
16
|
+
* prompt and options. The server stores them without meaning; the trierarch
|
|
17
|
+
* plugin and the trierarch parse them with this schema. Never a path or a
|
|
18
|
+
* command-line flag: a workspace names a repository or folder, options pick
|
|
19
|
+
* named settings, and a first prompt never starts with `-`.
|
|
20
|
+
*/
|
|
21
|
+
export const crewSettingsSchema = z.strictObject({
|
|
22
|
+
harness: harnessSchema,
|
|
23
|
+
workspace: trierarchWorkspaceSchema,
|
|
24
|
+
/** The squadron the ship is a member of, so it checks in at its flagship as a crew line's squadron id does. */
|
|
25
|
+
squadron: shipHandleSchema.optional(),
|
|
26
|
+
firstPrompt: z
|
|
27
|
+
.string()
|
|
28
|
+
.min(1)
|
|
29
|
+
.refine((prompt) => utf8.encode(prompt).byteLength <= FIRST_PROMPT_MAX_BYTES, `A first prompt is at most ${String(FIRST_PROMPT_MAX_BYTES)} bytes`)
|
|
30
|
+
// A harness would read it as a flag the operator never configured (decision 0027).
|
|
31
|
+
.refine((prompt) => !prompt.startsWith('-'), 'A first prompt may not start with -, which reads as a flag')
|
|
32
|
+
.optional(),
|
|
33
|
+
/** Named settings, checked against the JSON Schema the trierarch reports for the harness. */
|
|
34
|
+
options: z.record(z.string(), z.json()),
|
|
35
|
+
});
|
|
36
|
+
//# 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,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,a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;IAC7F,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;CACxC,CAAC,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"}
|