@aeolus-fleet/common 0.33.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/fleet/index.d.ts +23 -5
- package/dist/fleet/index.js +22 -2
- package/dist/fleet/index.js.map +1 -1
- package/dist/header/index.d.ts +2 -0
- package/dist/header/index.js +2 -0
- package/dist/header/index.js.map +1 -1
- package/dist/header/sign-in-background.d.ts +10 -0
- package/dist/header/sign-in-background.js +48 -0
- package/dist/header/sign-in-background.js.map +1 -0
- package/dist/header/sign-in-backgrounds.d.ts +40 -0
- package/dist/header/sign-in-backgrounds.js +135 -0
- package/dist/header/sign-in-backgrounds.js.map +1 -0
- package/dist/ids/index.d.ts +6 -0
- package/dist/ids/index.js +4 -0
- package/dist/ids/index.js.map +1 -1
- package/dist/rules/activity.d.ts +10 -0
- package/dist/rules/activity.js +13 -0
- package/dist/rules/activity.js.map +1 -0
- package/dist/rules/alert.d.ts +14 -0
- package/dist/rules/alert.js +33 -0
- package/dist/rules/alert.js.map +1 -0
- package/dist/rules/index.d.ts +2 -0
- package/dist/rules/index.js +2 -0
- package/dist/rules/index.js.map +1 -1
- package/dist/rules/payload.d.ts +1 -1
- package/dist/rules/payload.js +2 -2
- package/dist/rules/payload.js.map +1 -1
- package/dist/schemas/activity.d.ts +71 -0
- package/dist/schemas/activity.js +53 -0
- package/dist/schemas/activity.js.map +1 -0
- package/dist/schemas/alert.d.ts +564 -0
- package/dist/schemas/alert.js +123 -0
- package/dist/schemas/alert.js.map +1 -0
- package/dist/schemas/console.d.ts +3 -0
- package/dist/schemas/console.js +3 -0
- package/dist/schemas/console.js.map +1 -1
- package/dist/schemas/delivery.d.ts +1 -1
- package/dist/schemas/delivery.js +1 -1
- package/dist/schemas/expectations.d.ts +76 -0
- package/dist/schemas/expectations.js +41 -0
- package/dist/schemas/expectations.js.map +1 -0
- package/dist/schemas/feature-flags.d.ts +55 -0
- package/dist/schemas/feature-flags.js +41 -0
- package/dist/schemas/feature-flags.js.map +1 -0
- package/dist/schemas/fleet.d.ts +103 -1
- package/dist/schemas/fleet.js +10 -1
- package/dist/schemas/fleet.js.map +1 -1
- package/dist/schemas/follow.d.ts +13 -0
- package/dist/schemas/health.d.ts +64 -0
- package/dist/schemas/health.js +9 -0
- package/dist/schemas/health.js.map +1 -1
- package/dist/schemas/history.d.ts +331 -0
- package/dist/schemas/history.js +18 -2
- package/dist/schemas/history.js.map +1 -1
- package/dist/schemas/index.d.ts +6 -0
- package/dist/schemas/index.js +6 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/installation.d.ts +17 -0
- package/dist/schemas/installation.js +5 -0
- package/dist/schemas/installation.js.map +1 -1
- package/dist/schemas/label.d.ts +2 -2
- package/dist/schemas/meeting.d.ts +2 -0
- package/dist/schemas/meeting.js +2 -0
- package/dist/schemas/meeting.js.map +1 -1
- package/dist/schemas/message-task-access.d.ts +11 -0
- package/dist/schemas/message-task-access.js +7 -0
- package/dist/schemas/message-task-access.js.map +1 -0
- package/dist/schemas/message.d.ts +4 -3
- package/dist/schemas/message.js +5 -4
- package/dist/schemas/message.js.map +1 -1
- package/dist/schemas/needs-attention.d.ts +2 -0
- package/dist/schemas/needs-attention.js +2 -0
- package/dist/schemas/needs-attention.js.map +1 -1
- package/dist/schemas/network-rules-file.js +2 -2
- package/dist/schemas/network-rules-file.js.map +1 -1
- package/dist/schemas/network.d.ts +13 -13
- package/dist/schemas/operator-inbox.d.ts +6 -0
- package/dist/schemas/operator-inbox.js +5 -1
- package/dist/schemas/operator-inbox.js.map +1 -1
- package/dist/schemas/report.d.ts +81 -3
- package/dist/schemas/report.js +26 -3
- package/dist/schemas/report.js.map +1 -1
- package/dist/schemas/sealing.d.ts +126 -0
- package/dist/schemas/sealing.js +75 -0
- package/dist/schemas/sealing.js.map +1 -0
- package/dist/schemas/ship.d.ts +8 -4
- package/dist/schemas/ship.js +8 -4
- package/dist/schemas/ship.js.map +1 -1
- package/dist/schemas/statement.d.ts +2 -2
- package/dist/schemas/statement.js +4 -4
- package/dist/schemas/statement.js.map +1 -1
- package/dist/trierarch/index.d.ts +1 -0
- package/dist/trierarch/index.js +1 -0
- package/dist/trierarch/index.js.map +1 -1
- package/dist/trierarch/report-details.d.ts +57 -0
- package/dist/trierarch/report-details.js +34 -14
- package/dist/trierarch/report-details.js.map +1 -1
- package/dist/trierarch/usage-message.d.ts +47 -0
- package/dist/trierarch/usage-message.js +51 -0
- package/dist/trierarch/usage-message.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { idSchema } from '../ids/index.js';
|
|
3
|
+
import { payloadBytes } from '../rules/payload.js';
|
|
4
|
+
import { pageInputOf, pageOutputOf } from './page.js';
|
|
5
|
+
import { reportTaskSchema } from './report.js';
|
|
6
|
+
/**
|
|
7
|
+
* Alerts (decision 0071, docs/design/monitoring 4.4, 4.5 and 4.9): the watch
|
|
8
|
+
* raises one in core per occurrence of a signal on a ship, then sends the
|
|
9
|
+
* owner's ship the alert message. Core holds the alert and never speaks for
|
|
10
|
+
* a ship; the message is the watch's. Both read the signal and its facts
|
|
11
|
+
* from here.
|
|
12
|
+
*/
|
|
13
|
+
/** The content type of the alert message the watch sends (4.9). */
|
|
14
|
+
export const ALERT_CONTENT_TYPE = 'application/vnd.aeolus.alert+json';
|
|
15
|
+
/** What parted (4.4): the four distribution signals, then the two expectations. */
|
|
16
|
+
export const ALERT_SIGNALS = ['crew-request-unassigned', 'delivery-unacknowledged', 'delivery-overdue', 'ping-unanswered', 'report-unchanged', 'task-not-done'];
|
|
17
|
+
export const alertSignalSchema = z.enum(ALERT_SIGNALS);
|
|
18
|
+
/** The longest headline an alert message carries: an inbox shows it first (instruction 6). */
|
|
19
|
+
export const ALERT_HEADLINE_MAX_LENGTH = 80;
|
|
20
|
+
/** The most bytes an alert message's markdown body takes. */
|
|
21
|
+
export const ALERT_BODY_MAX_BYTES = 2 * 1024;
|
|
22
|
+
/** The most bytes a whole alert message payload takes, as JSON. */
|
|
23
|
+
export const ALERT_PAYLOAD_MAX_BYTES = 8 * 1024;
|
|
24
|
+
/** The longest occurrence key a raise names (4.4: a delivery id, a version, a time). */
|
|
25
|
+
export const ALERT_OCCURRENCE_KEY_MAX_LENGTH = 200;
|
|
26
|
+
const isoTime = z.iso.datetime({ offset: true });
|
|
27
|
+
const minutesSchema = z.int().min(1);
|
|
28
|
+
/** The facts at raise of each signal (4.9). */
|
|
29
|
+
const crewRequestUnassignedFactsSchema = z.strictObject({ settingsVersion: z.int().min(1), minutes: minutesSchema, reason: z.string().nullable() });
|
|
30
|
+
const deliveryUnacknowledgedFactsSchema = z.strictObject({
|
|
31
|
+
deliveryId: idSchema('delivery'),
|
|
32
|
+
messageId: idSchema('message'),
|
|
33
|
+
state: z.enum(['pending', 'received', 'handed']),
|
|
34
|
+
awaitingCrew: z.boolean(),
|
|
35
|
+
minutes: minutesSchema,
|
|
36
|
+
});
|
|
37
|
+
const deliveryOverdueFactsSchema = z.strictObject({ deliveryId: idSchema('delivery'), messageId: idSchema('message'), overdueEventId: idSchema('event') });
|
|
38
|
+
const pingUnansweredFactsSchema = z.strictObject({ deliveryId: idSchema('delivery'), messageId: idSchema('message'), minutes: minutesSchema });
|
|
39
|
+
const reportUnchangedFactsSchema = z.strictObject({ reportChangedAt: isoTime, state: z.enum(['working', 'blocked']), minutes: minutesSchema, setBy: idSchema('ship') });
|
|
40
|
+
const taskNotDoneFactsSchema = z.strictObject({ task: reportTaskSchema, doneBy: isoTime, setBy: idSchema('ship') });
|
|
41
|
+
const alertFactsBySignal = [
|
|
42
|
+
z.object({ signal: z.literal('crew-request-unassigned'), facts: crewRequestUnassignedFactsSchema }),
|
|
43
|
+
z.object({ signal: z.literal('delivery-unacknowledged'), facts: deliveryUnacknowledgedFactsSchema }),
|
|
44
|
+
z.object({ signal: z.literal('delivery-overdue'), facts: deliveryOverdueFactsSchema }),
|
|
45
|
+
z.object({ signal: z.literal('ping-unanswered'), facts: pingUnansweredFactsSchema }),
|
|
46
|
+
z.object({ signal: z.literal('report-unchanged'), facts: reportUnchangedFactsSchema }),
|
|
47
|
+
z.object({ signal: z.literal('task-not-done'), facts: taskNotDoneFactsSchema }),
|
|
48
|
+
];
|
|
49
|
+
/** A signal with its facts at raise. */
|
|
50
|
+
export const alertSignalFactsSchema = z.discriminatedUnion('signal', alertFactsBySignal);
|
|
51
|
+
/**
|
|
52
|
+
* The alert message's payload (4.9): the alert in core, the line an inbox
|
|
53
|
+
* shows first and the facts in words, the signal with its facts at raise,
|
|
54
|
+
* the ship, its fleet, and why this recipient is told.
|
|
55
|
+
*/
|
|
56
|
+
export const alertMessageSchema = z
|
|
57
|
+
.intersection(z.object({
|
|
58
|
+
alertId: idSchema('alert'),
|
|
59
|
+
headline: z.string().min(1).max(ALERT_HEADLINE_MAX_LENGTH),
|
|
60
|
+
body: z.string().refine((body) => payloadBytes(body) <= ALERT_BODY_MAX_BYTES, `A body is at most ${String(ALERT_BODY_MAX_BYTES)} bytes`),
|
|
61
|
+
ship: z.object({ id: idSchema('ship'), name: z.string() }),
|
|
62
|
+
fleetId: idSchema('fleet'),
|
|
63
|
+
toldAs: z.enum(['owner', 'setter']),
|
|
64
|
+
since: isoTime,
|
|
65
|
+
raisedAt: isoTime,
|
|
66
|
+
}), alertSignalFactsSchema)
|
|
67
|
+
.refine((message) => payloadBytes(JSON.stringify(message)) <= ALERT_PAYLOAD_MAX_BYTES, `An alert message is at most ${String(ALERT_PAYLOAD_MAX_BYTES)} bytes`);
|
|
68
|
+
/**
|
|
69
|
+
* Input of `fleet.raiseAlert` (fleet:alert, 4.5): the ship, the signal and
|
|
70
|
+
* its facts at raise, the occurrence key the alert is unique by, and since
|
|
71
|
+
* when the fact parted.
|
|
72
|
+
*/
|
|
73
|
+
export const raiseAlertInputSchema = z
|
|
74
|
+
.object({
|
|
75
|
+
shipId: idSchema('ship'),
|
|
76
|
+
signal: alertSignalSchema,
|
|
77
|
+
facts: z.union([
|
|
78
|
+
crewRequestUnassignedFactsSchema,
|
|
79
|
+
deliveryUnacknowledgedFactsSchema,
|
|
80
|
+
deliveryOverdueFactsSchema,
|
|
81
|
+
pingUnansweredFactsSchema,
|
|
82
|
+
reportUnchangedFactsSchema,
|
|
83
|
+
taskNotDoneFactsSchema,
|
|
84
|
+
]),
|
|
85
|
+
occurrenceKey: z.string().min(1).max(ALERT_OCCURRENCE_KEY_MAX_LENGTH),
|
|
86
|
+
since: isoTime,
|
|
87
|
+
})
|
|
88
|
+
// One object for the doors' JSON Schema; the facts must be the signal's.
|
|
89
|
+
.transform(({ shipId, signal, facts, occurrenceKey, since }, context) => {
|
|
90
|
+
const signalFacts = alertSignalFactsSchema.safeParse({ signal, facts });
|
|
91
|
+
if (!signalFacts.success) {
|
|
92
|
+
context.addIssue({ code: 'custom', message: "The facts are not the signal's", path: ['facts'] });
|
|
93
|
+
return z.NEVER;
|
|
94
|
+
}
|
|
95
|
+
return { shipId, occurrenceKey, since, ...signalFacts.data };
|
|
96
|
+
});
|
|
97
|
+
/** Input of `fleet.clearAlert` (fleet:alert): the alert to clear. */
|
|
98
|
+
export const clearAlertInputSchema = z.object({ alertId: idSchema('alert') });
|
|
99
|
+
/** Why an alert cleared: its fact moved back, as the watch saw, or its ship retired. */
|
|
100
|
+
export const ALERT_CLEARED_WHYS = ['cleared', 'retired'];
|
|
101
|
+
export const alertClearedWhySchema = z.enum(ALERT_CLEARED_WHYS);
|
|
102
|
+
/**
|
|
103
|
+
* An alert as core holds it: the ship, the signal and its facts at raise,
|
|
104
|
+
* the occurrence key, the owner told (the ship's owner at raise), since when
|
|
105
|
+
* the fact parted, when it was raised, and when and why it cleared, null
|
|
106
|
+
* while it is open.
|
|
107
|
+
*/
|
|
108
|
+
export const alertSchema = z.intersection(z.object({
|
|
109
|
+
id: idSchema('alert'),
|
|
110
|
+
ship: z.object({ id: idSchema('ship'), name: z.string() }),
|
|
111
|
+
occurrenceKey: z.string(),
|
|
112
|
+
ownerShipId: idSchema('ship').nullable(),
|
|
113
|
+
since: z.iso.datetime(),
|
|
114
|
+
raisedAt: z.iso.datetime(),
|
|
115
|
+
cleared: z.object({ at: z.iso.datetime(), why: alertClearedWhySchema }).nullable(),
|
|
116
|
+
}), alertSignalFactsSchema);
|
|
117
|
+
/** Output of `fleet.raiseAlert` and `fleet.clearAlert`: the alert as core holds it now. */
|
|
118
|
+
export const alertOutputSchema = alertSchema;
|
|
119
|
+
/** Input of `fleet.openAlerts` (fleet:read): the cursor and size of a page. */
|
|
120
|
+
export const openAlertsInputSchema = pageInputOf(idSchema('alert')).optional();
|
|
121
|
+
/** Output of `fleet.openAlerts`: a page of the fleet's open alerts on the ships the caller reads, newest first. */
|
|
122
|
+
export const openAlertsOutputSchema = pageOutputOf(alertSchema, idSchema('alert'));
|
|
123
|
+
//# sourceMappingURL=alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../src/schemas/alert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;;GAMG;AAEH,mEAAmE;AACnE,MAAM,CAAC,MAAM,kBAAkB,GAAG,mCAAmC,CAAC;AAEtE,mFAAmF;AACnF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,yBAAyB,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,eAAe,CAAU,CAAC;AACzK,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAA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|
|
62
|
+
featureFlags: z.ZodArray<z.ZodEnum<{
|
|
63
|
+
sealing: "sealing";
|
|
64
|
+
}>>;
|
|
62
65
|
}, z.core.$strip>;
|
|
63
66
|
/** Input of `console.presentAccountToken`: the account token pagasae gave the console's server for this fleet (decision 0058). */
|
|
64
67
|
export declare const presentAccountTokenInputSchema: z.ZodObject<{
|
package/dist/schemas/console.js
CHANGED
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { scopeNameSchema } from '../fleet/index.js';
|
|
3
3
|
import { idSchema } from '../ids/index.js';
|
|
4
4
|
import { accountIdSchema } from './account-token.js';
|
|
5
|
+
import { featureFlagSchema } from './feature-flags.js';
|
|
5
6
|
import { EMAIL_REQUIRED, EMAIL_TOO_LONG, OPERATOR_EMAIL_MAX_LENGTH, OPERATOR_PASSWORD_MAX_LENGTH, OPERATOR_PASSWORD_MIN_LENGTH, PASSWORD_REQUIRED, PASSWORD_TOO_LONG, PASSWORD_TOO_SHORT, } from '../rules/sign-in.js';
|
|
6
7
|
/** One @ with something on each side, and no whitespace. */
|
|
7
8
|
export const OPERATOR_EMAIL_PATTERN = /^[^\s@]+@[^\s@]+$/;
|
|
@@ -52,6 +53,8 @@ export const consoleSessionOutputSchema = z.object({
|
|
|
52
53
|
kind: consoleSessionKindSchema,
|
|
53
54
|
accountId: accountIdSchema.optional(),
|
|
54
55
|
scopes: z.array(scopeNameSchema),
|
|
56
|
+
/** The fleet's feature flags that are on (decision 0069): the console shows nothing of a feature whose flag is off. */
|
|
57
|
+
featureFlags: z.array(featureFlagSchema),
|
|
55
58
|
});
|
|
56
59
|
/** Input of `console.presentAccountToken`: the account token pagasae gave the console's server for this fleet (decision 0058). */
|
|
57
60
|
export const presentAccountTokenInputSchema = z.object({ token: z.string().min(1).max(16_384) });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.js","sourceRoot":"","sources":["../../src/schemas/console.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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G,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { z } from 'zod';
|
|
|
9
9
|
export declare const RECEIVE_MAX_DEFAULT = 1;
|
|
10
10
|
/**
|
|
11
11
|
* The most deliveries one receive returns. The ship chooses up to this many
|
|
12
|
-
* (ADR 0016); the bound keeps one answer at ten
|
|
12
|
+
* (ADR 0016); the bound keeps one answer at ten 256 KB payloads.
|
|
13
13
|
*/
|
|
14
14
|
export declare const RECEIVE_MAX_UPPER_BOUND = 10;
|
|
15
15
|
/** Input of `ship.receive`: at most how many deliveries to return, 1 to 10. Without it, one. */
|
package/dist/schemas/delivery.js
CHANGED
|
@@ -13,7 +13,7 @@ import { isOneLine } from './report.js';
|
|
|
13
13
|
export const RECEIVE_MAX_DEFAULT = 1;
|
|
14
14
|
/**
|
|
15
15
|
* The most deliveries one receive returns. The ship chooses up to this many
|
|
16
|
-
* (ADR 0016); the bound keeps one answer at ten
|
|
16
|
+
* (ADR 0016); the bound keeps one answer at ten 256 KB payloads.
|
|
17
17
|
*/
|
|
18
18
|
export const RECEIVE_MAX_UPPER_BOUND = 10;
|
|
19
19
|
/** Input of `ship.receive`: at most how many deliveries to return, 1 to 10. Without it, one. */
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Expectations on a ship (decision 0071, docs/design/monitoring 4.7): what
|
|
4
|
+
* its owner, or a ship the fleet's rules let manage it, expects of it,
|
|
5
|
+
* standing, at most one of each. Core holds them and compares nothing; the
|
|
6
|
+
* watch compares them with the ship's report and tells.
|
|
7
|
+
*/
|
|
8
|
+
/** The fewest minutes "report changes within" may expect. */
|
|
9
|
+
export declare const REPORT_CHANGES_WITHIN_MIN_MINUTES = 5;
|
|
10
|
+
/** The most minutes "report changes within" may expect: a week. */
|
|
11
|
+
export declare const REPORT_CHANGES_WITHIN_MAX_MINUTES = 10080;
|
|
12
|
+
/** Minutes within which the report is expected to change, while it says working or blocked. */
|
|
13
|
+
export declare const reportChangesWithinMinutesSchema: z.ZodInt;
|
|
14
|
+
/**
|
|
15
|
+
* Input of `fleet.setExpectations` (fleet:manage, manage reach on the ship):
|
|
16
|
+
* `reportChangesWithin` in minutes, and `taskDoneBy`, the task it is set for
|
|
17
|
+
* and the time it is expected done by. Left out, one stays as it is; null
|
|
18
|
+
* clears it.
|
|
19
|
+
*/
|
|
20
|
+
export declare const setExpectationsInputSchema: z.ZodObject<{
|
|
21
|
+
shipId: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
22
|
+
reportChangesWithin: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
23
|
+
taskDoneBy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
24
|
+
task: z.ZodObject<{
|
|
25
|
+
kind: z.ZodString;
|
|
26
|
+
}, z.core.$catchall<z.ZodJSONSchema>>;
|
|
27
|
+
doneBy: z.ZodISODateTime;
|
|
28
|
+
}, z.core.$strip>>>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export type SetExpectationsInput = z.infer<typeof setExpectationsInputSchema>;
|
|
31
|
+
/** Output of `fleet.setExpectations`: nothing; read them back with the ship (`fleet.ship`). */
|
|
32
|
+
export declare const setExpectationsOutputSchema: z.ZodObject<{}, z.core.$strict>;
|
|
33
|
+
/** Who set an expectation, as decision 0057 names an actor: an account by its id only. */
|
|
34
|
+
export declare const expectationSetterSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
35
|
+
kind: z.ZodLiteral<"ship">;
|
|
36
|
+
shipId: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
37
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
38
|
+
kind: z.ZodLiteral<"account">;
|
|
39
|
+
accountId: z.core.$ZodBranded<z.ZodString, "AccountId", "out">;
|
|
40
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
41
|
+
kind: z.ZodLiteral<"installation">;
|
|
42
|
+
}, z.core.$strip>], "kind">;
|
|
43
|
+
export type ExpectationSetter = z.infer<typeof expectationSetterSchema>;
|
|
44
|
+
/** A ship's expectations as `fleet.ship` reads them back (ISO 8601 in UTC): each with who set it and when; null while not set. */
|
|
45
|
+
export declare const expectationsSchema: z.ZodObject<{
|
|
46
|
+
reportChangesWithin: z.ZodNullable<z.ZodObject<{
|
|
47
|
+
minutes: z.ZodInt;
|
|
48
|
+
setBy: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
49
|
+
kind: z.ZodLiteral<"ship">;
|
|
50
|
+
shipId: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
51
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
52
|
+
kind: z.ZodLiteral<"account">;
|
|
53
|
+
accountId: z.core.$ZodBranded<z.ZodString, "AccountId", "out">;
|
|
54
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
55
|
+
kind: z.ZodLiteral<"installation">;
|
|
56
|
+
}, z.core.$strip>], "kind">;
|
|
57
|
+
setAt: z.ZodISODateTime;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
taskDoneBy: z.ZodNullable<z.ZodObject<{
|
|
60
|
+
task: z.ZodObject<{
|
|
61
|
+
kind: z.ZodString;
|
|
62
|
+
}, z.core.$catchall<z.ZodJSONSchema>>;
|
|
63
|
+
doneBy: z.ZodISODateTime;
|
|
64
|
+
setBy: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
65
|
+
kind: z.ZodLiteral<"ship">;
|
|
66
|
+
shipId: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
67
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
68
|
+
kind: z.ZodLiteral<"account">;
|
|
69
|
+
accountId: z.core.$ZodBranded<z.ZodString, "AccountId", "out">;
|
|
70
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
71
|
+
kind: z.ZodLiteral<"installation">;
|
|
72
|
+
}, z.core.$strip>], "kind">;
|
|
73
|
+
setAt: z.ZodISODateTime;
|
|
74
|
+
}, z.core.$strip>>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
export type ExpectationsOutput = z.infer<typeof expectationsSchema>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { idSchema } from '../ids/index.js';
|
|
3
|
+
import { accountIdSchema } from './account-token.js';
|
|
4
|
+
import { reportTaskSchema } from './report.js';
|
|
5
|
+
/**
|
|
6
|
+
* Expectations on a ship (decision 0071, docs/design/monitoring 4.7): what
|
|
7
|
+
* its owner, or a ship the fleet's rules let manage it, expects of it,
|
|
8
|
+
* standing, at most one of each. Core holds them and compares nothing; the
|
|
9
|
+
* watch compares them with the ship's report and tells.
|
|
10
|
+
*/
|
|
11
|
+
/** The fewest minutes "report changes within" may expect. */
|
|
12
|
+
export const REPORT_CHANGES_WITHIN_MIN_MINUTES = 5;
|
|
13
|
+
/** The most minutes "report changes within" may expect: a week. */
|
|
14
|
+
export const REPORT_CHANGES_WITHIN_MAX_MINUTES = 10_080;
|
|
15
|
+
/** Minutes within which the report is expected to change, while it says working or blocked. */
|
|
16
|
+
export const reportChangesWithinMinutesSchema = z.int().min(REPORT_CHANGES_WITHIN_MIN_MINUTES).max(REPORT_CHANGES_WITHIN_MAX_MINUTES);
|
|
17
|
+
/**
|
|
18
|
+
* Input of `fleet.setExpectations` (fleet:manage, manage reach on the ship):
|
|
19
|
+
* `reportChangesWithin` in minutes, and `taskDoneBy`, the task it is set for
|
|
20
|
+
* and the time it is expected done by. Left out, one stays as it is; null
|
|
21
|
+
* clears it.
|
|
22
|
+
*/
|
|
23
|
+
export const setExpectationsInputSchema = z.object({
|
|
24
|
+
shipId: idSchema('ship'),
|
|
25
|
+
reportChangesWithin: reportChangesWithinMinutesSchema.nullable().optional(),
|
|
26
|
+
taskDoneBy: z.object({ task: reportTaskSchema, doneBy: z.iso.datetime({ offset: true }) }).nullable().optional(),
|
|
27
|
+
});
|
|
28
|
+
/** Output of `fleet.setExpectations`: nothing; read them back with the ship (`fleet.ship`). */
|
|
29
|
+
export const setExpectationsOutputSchema = z.strictObject({});
|
|
30
|
+
/** Who set an expectation, as decision 0057 names an actor: an account by its id only. */
|
|
31
|
+
export const expectationSetterSchema = z.discriminatedUnion('kind', [
|
|
32
|
+
z.object({ kind: z.literal('ship'), shipId: idSchema('ship') }),
|
|
33
|
+
z.object({ kind: z.literal('account'), accountId: accountIdSchema }),
|
|
34
|
+
z.object({ kind: z.literal('installation') }),
|
|
35
|
+
]);
|
|
36
|
+
/** A ship's expectations as `fleet.ship` reads them back (ISO 8601 in UTC): each with who set it and when; null while not set. */
|
|
37
|
+
export const expectationsSchema = z.object({
|
|
38
|
+
reportChangesWithin: z.object({ minutes: z.int(), setBy: expectationSetterSchema, setAt: z.iso.datetime() }).nullable(),
|
|
39
|
+
taskDoneBy: z.object({ task: reportTaskSchema, doneBy: z.iso.datetime(), setBy: expectationSetterSchema, setAt: z.iso.datetime() }).nullable(),
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=expectations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expectations.js","sourceRoot":"","sources":["../../src/schemas/expectations.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,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;GAKG;AAEH,6DAA6D;AAC7D,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC;AAEnD,mEAAmE;AACnE,MAAM,CAAC,MAAM,iCAAiC,GAAG,MAAM,CAAC;AAExD,+FAA+F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MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE;IACvH,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC/I,CAAC,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The feature flags there are (decision 0069): each a key, a name, one line
|
|
4
|
+
* saying what it turns on, and the line the installation shows while a fleet
|
|
5
|
+
* uses the feature, so the flag cannot go off. Core names them; pagasae lists
|
|
6
|
+
* what core names, so a new flag needs no pagasae change.
|
|
7
|
+
*/
|
|
8
|
+
export declare const featureFlagSchema: z.ZodEnum<{
|
|
9
|
+
sealing: "sealing";
|
|
10
|
+
}>;
|
|
11
|
+
export type FeatureFlag = z.infer<typeof featureFlagSchema>;
|
|
12
|
+
export declare const FEATURE_FLAGS: readonly FeatureFlagDescription[];
|
|
13
|
+
/** One flag as the installation lists it. */
|
|
14
|
+
export declare const featureFlagDescriptionSchema: z.ZodObject<{
|
|
15
|
+
key: z.ZodEnum<{
|
|
16
|
+
sealing: "sealing";
|
|
17
|
+
}>;
|
|
18
|
+
name: z.ZodString;
|
|
19
|
+
description: z.ZodString;
|
|
20
|
+
inUseNote: z.ZodString;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export type FeatureFlagDescription = z.infer<typeof featureFlagDescriptionSchema>;
|
|
23
|
+
/** Output of `installation.featureFlags.list`: every flag core names. */
|
|
24
|
+
export declare const installationFeatureFlagsListOutputSchema: z.ZodArray<z.ZodObject<{
|
|
25
|
+
key: z.ZodEnum<{
|
|
26
|
+
sealing: "sealing";
|
|
27
|
+
}>;
|
|
28
|
+
name: z.ZodString;
|
|
29
|
+
description: z.ZodString;
|
|
30
|
+
inUseNote: z.ZodString;
|
|
31
|
+
}, z.core.$strip>>;
|
|
32
|
+
/** One flag of one fleet: on or off, and whether it can go off now; it cannot while the fleet uses the feature. */
|
|
33
|
+
export declare const fleetFeatureFlagSchema: z.ZodObject<{
|
|
34
|
+
flag: z.ZodEnum<{
|
|
35
|
+
sealing: "sealing";
|
|
36
|
+
}>;
|
|
37
|
+
isOn: z.ZodBoolean;
|
|
38
|
+
canTurnOff: z.ZodBoolean;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
export type FleetFeatureFlag = z.infer<typeof fleetFeatureFlagSchema>;
|
|
41
|
+
/** Input of `installation.fleets.setFeatureFlag`: one flag on or off for one fleet. */
|
|
42
|
+
export declare const installationFleetsSetFeatureFlagInputSchema: z.ZodObject<{
|
|
43
|
+
fleetId: z.ZodType<`flt_${string}`, unknown, z.core.$ZodTypeInternals<`flt_${string}`, unknown>>;
|
|
44
|
+
flag: z.ZodEnum<{
|
|
45
|
+
sealing: "sealing";
|
|
46
|
+
}>;
|
|
47
|
+
isOn: z.ZodBoolean;
|
|
48
|
+
}, z.core.$strict>;
|
|
49
|
+
export declare const installationFleetsSetFeatureFlagOutputSchema: z.ZodObject<{
|
|
50
|
+
flag: z.ZodEnum<{
|
|
51
|
+
sealing: "sealing";
|
|
52
|
+
}>;
|
|
53
|
+
isOn: z.ZodBoolean;
|
|
54
|
+
canTurnOff: z.ZodBoolean;
|
|
55
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { idSchema } from '../ids/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* The feature flags there are (decision 0069): each a key, a name, one line
|
|
5
|
+
* saying what it turns on, and the line the installation shows while a fleet
|
|
6
|
+
* uses the feature, so the flag cannot go off. Core names them; pagasae lists
|
|
7
|
+
* what core names, so a new flag needs no pagasae change.
|
|
8
|
+
*/
|
|
9
|
+
export const featureFlagSchema = z.enum(['sealing']);
|
|
10
|
+
export const FEATURE_FLAGS = [
|
|
11
|
+
{
|
|
12
|
+
key: 'sealing',
|
|
13
|
+
name: 'Sealing',
|
|
14
|
+
description: 'The fleet may seal its payloads under its company’s own key (decision 0068).',
|
|
15
|
+
inUseNote: 'Sealed fleets keep sealing',
|
|
16
|
+
},
|
|
17
|
+
];
|
|
18
|
+
/** One flag as the installation lists it. */
|
|
19
|
+
export const featureFlagDescriptionSchema = z.object({
|
|
20
|
+
key: featureFlagSchema,
|
|
21
|
+
name: z.string(),
|
|
22
|
+
description: z.string(),
|
|
23
|
+
/** The line shown with the switch locked on while a fleet uses the feature. */
|
|
24
|
+
inUseNote: z.string(),
|
|
25
|
+
});
|
|
26
|
+
/** Output of `installation.featureFlags.list`: every flag core names. */
|
|
27
|
+
export const installationFeatureFlagsListOutputSchema = z.array(featureFlagDescriptionSchema);
|
|
28
|
+
/** One flag of one fleet: on or off, and whether it can go off now; it cannot while the fleet uses the feature. */
|
|
29
|
+
export const fleetFeatureFlagSchema = z.object({
|
|
30
|
+
flag: featureFlagSchema,
|
|
31
|
+
isOn: z.boolean(),
|
|
32
|
+
canTurnOff: z.boolean(),
|
|
33
|
+
});
|
|
34
|
+
/** Input of `installation.fleets.setFeatureFlag`: one flag on or off for one fleet. */
|
|
35
|
+
export const installationFleetsSetFeatureFlagInputSchema = z.strictObject({
|
|
36
|
+
fleetId: idSchema('fleet'),
|
|
37
|
+
flag: featureFlagSchema,
|
|
38
|
+
isOn: z.boolean(),
|
|
39
|
+
});
|
|
40
|
+
export const installationFleetsSetFeatureFlagOutputSchema = fleetFeatureFlagSchema;
|
|
41
|
+
//# sourceMappingURL=feature-flags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-fl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A4C,GAAG,sBAAsB,CAAC"}
|
package/dist/schemas/fleet.d.ts
CHANGED
|
@@ -38,7 +38,8 @@ export declare const getStartingPromptInputSchema: z.ZodObject<{
|
|
|
38
38
|
/**
|
|
39
39
|
* One crew line: the starting prompt's identity in one line for a harness
|
|
40
40
|
* with the Aeolus Fleet plugin, `/aeolus-fleet:crew <fleetUrl> <shipId> <secret>` for
|
|
41
|
-
* Claude Code, `$aeolus-fleet-crew <fleetUrl> <shipId> <secret>` for Codex
|
|
41
|
+
* Claude Code, `$aeolus-fleet-crew <fleetUrl> <shipId> <secret>` for Codex,
|
|
42
|
+
* and the same `/aeolus-fleet:crew <fleetUrl> <shipId> <secret>` for Copilot.
|
|
42
43
|
*/
|
|
43
44
|
export declare const crewLineSchema: z.ZodObject<{
|
|
44
45
|
harness: z.ZodString;
|
|
@@ -199,9 +200,33 @@ export declare const listedShipSchema: z.ZodObject<{
|
|
|
199
200
|
idle: "idle";
|
|
200
201
|
}>;
|
|
201
202
|
note: z.ZodNullable<z.ZodString>;
|
|
203
|
+
task: z.ZodNullable<z.ZodObject<{
|
|
204
|
+
kind: z.ZodString;
|
|
205
|
+
}, z.core.$catchall<z.ZodJSONSchema>>>;
|
|
206
|
+
taskView: z.ZodOptional<z.ZodObject<{
|
|
207
|
+
canOpen: z.ZodBoolean;
|
|
208
|
+
fleetName: z.ZodNullable<z.ZodString>;
|
|
209
|
+
}, z.core.$strip>>;
|
|
210
|
+
step: z.ZodNullable<z.ZodObject<{
|
|
211
|
+
at: z.ZodNumber;
|
|
212
|
+
of: z.ZodNumber;
|
|
213
|
+
}, z.core.$strip>>;
|
|
202
214
|
reportedAt: z.ZodISODateTime;
|
|
215
|
+
reportChangedAt: z.ZodISODateTime;
|
|
203
216
|
detailsVersion: z.ZodInt;
|
|
204
217
|
}, z.core.$strip>>;
|
|
218
|
+
activity: z.ZodNullable<z.ZodObject<{
|
|
219
|
+
at: z.ZodISODateTime;
|
|
220
|
+
kind: z.ZodEnum<{
|
|
221
|
+
error: "error";
|
|
222
|
+
text: "text";
|
|
223
|
+
tool: "tool";
|
|
224
|
+
result: "result";
|
|
225
|
+
}>;
|
|
226
|
+
tool: z.ZodNullable<z.ZodString>;
|
|
227
|
+
reportedAt: z.ZodISODateTime;
|
|
228
|
+
intervalSeconds: z.ZodInt;
|
|
229
|
+
}, z.core.$strip>>;
|
|
205
230
|
crewRequest: z.ZodNullable<z.ZodObject<{
|
|
206
231
|
settingsVersion: z.ZodInt;
|
|
207
232
|
requestedAt: z.ZodISODateTime;
|
|
@@ -242,6 +267,7 @@ export declare const listedShipSchema: z.ZodObject<{
|
|
|
242
267
|
awaitingCrewSince: z.ZodNullable<z.ZodISODateTime>;
|
|
243
268
|
retiredAt: z.ZodNullable<z.ZodISODateTime>;
|
|
244
269
|
ownerShipId: z.ZodNullable<z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>>;
|
|
270
|
+
openAlertCount: z.ZodInt;
|
|
245
271
|
}, z.core.$strip>;
|
|
246
272
|
export type ListedShip = z.infer<typeof listedShipSchema>;
|
|
247
273
|
/** A ship outside the caller's read reach (decision 0034): its name, type and status only. */
|
|
@@ -319,9 +345,33 @@ export declare const fleetListOutputSchema: z.ZodObject<{
|
|
|
319
345
|
idle: "idle";
|
|
320
346
|
}>;
|
|
321
347
|
note: z.ZodNullable<z.ZodString>;
|
|
348
|
+
task: z.ZodNullable<z.ZodObject<{
|
|
349
|
+
kind: z.ZodString;
|
|
350
|
+
}, z.core.$catchall<z.ZodJSONSchema>>>;
|
|
351
|
+
taskView: z.ZodOptional<z.ZodObject<{
|
|
352
|
+
canOpen: z.ZodBoolean;
|
|
353
|
+
fleetName: z.ZodNullable<z.ZodString>;
|
|
354
|
+
}, z.core.$strip>>;
|
|
355
|
+
step: z.ZodNullable<z.ZodObject<{
|
|
356
|
+
at: z.ZodNumber;
|
|
357
|
+
of: z.ZodNumber;
|
|
358
|
+
}, z.core.$strip>>;
|
|
322
359
|
reportedAt: z.ZodISODateTime;
|
|
360
|
+
reportChangedAt: z.ZodISODateTime;
|
|
323
361
|
detailsVersion: z.ZodInt;
|
|
324
362
|
}, z.core.$strip>>;
|
|
363
|
+
activity: z.ZodNullable<z.ZodObject<{
|
|
364
|
+
at: z.ZodISODateTime;
|
|
365
|
+
kind: z.ZodEnum<{
|
|
366
|
+
error: "error";
|
|
367
|
+
text: "text";
|
|
368
|
+
tool: "tool";
|
|
369
|
+
result: "result";
|
|
370
|
+
}>;
|
|
371
|
+
tool: z.ZodNullable<z.ZodString>;
|
|
372
|
+
reportedAt: z.ZodISODateTime;
|
|
373
|
+
intervalSeconds: z.ZodInt;
|
|
374
|
+
}, z.core.$strip>>;
|
|
325
375
|
crewRequest: z.ZodNullable<z.ZodObject<{
|
|
326
376
|
settingsVersion: z.ZodInt;
|
|
327
377
|
requestedAt: z.ZodISODateTime;
|
|
@@ -362,6 +412,7 @@ export declare const fleetListOutputSchema: z.ZodObject<{
|
|
|
362
412
|
awaitingCrewSince: z.ZodNullable<z.ZodISODateTime>;
|
|
363
413
|
retiredAt: z.ZodNullable<z.ZodISODateTime>;
|
|
364
414
|
ownerShipId: z.ZodNullable<z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>>;
|
|
415
|
+
openAlertCount: z.ZodInt;
|
|
365
416
|
}, z.core.$strip>, z.ZodObject<{
|
|
366
417
|
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
367
418
|
name: z.ZodString;
|
|
@@ -430,9 +481,33 @@ export declare const listedShipOutputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
430
481
|
idle: "idle";
|
|
431
482
|
}>;
|
|
432
483
|
note: z.ZodNullable<z.ZodString>;
|
|
484
|
+
task: z.ZodNullable<z.ZodObject<{
|
|
485
|
+
kind: z.ZodString;
|
|
486
|
+
}, z.core.$catchall<z.ZodJSONSchema>>>;
|
|
487
|
+
taskView: z.ZodOptional<z.ZodObject<{
|
|
488
|
+
canOpen: z.ZodBoolean;
|
|
489
|
+
fleetName: z.ZodNullable<z.ZodString>;
|
|
490
|
+
}, z.core.$strip>>;
|
|
491
|
+
step: z.ZodNullable<z.ZodObject<{
|
|
492
|
+
at: z.ZodNumber;
|
|
493
|
+
of: z.ZodNumber;
|
|
494
|
+
}, z.core.$strip>>;
|
|
433
495
|
reportedAt: z.ZodISODateTime;
|
|
496
|
+
reportChangedAt: z.ZodISODateTime;
|
|
434
497
|
detailsVersion: z.ZodInt;
|
|
435
498
|
}, z.core.$strip>>;
|
|
499
|
+
activity: z.ZodNullable<z.ZodObject<{
|
|
500
|
+
at: z.ZodISODateTime;
|
|
501
|
+
kind: z.ZodEnum<{
|
|
502
|
+
error: "error";
|
|
503
|
+
text: "text";
|
|
504
|
+
tool: "tool";
|
|
505
|
+
result: "result";
|
|
506
|
+
}>;
|
|
507
|
+
tool: z.ZodNullable<z.ZodString>;
|
|
508
|
+
reportedAt: z.ZodISODateTime;
|
|
509
|
+
intervalSeconds: z.ZodInt;
|
|
510
|
+
}, z.core.$strip>>;
|
|
436
511
|
crewRequest: z.ZodNullable<z.ZodObject<{
|
|
437
512
|
settingsVersion: z.ZodInt;
|
|
438
513
|
requestedAt: z.ZodISODateTime;
|
|
@@ -473,6 +548,7 @@ export declare const listedShipOutputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
473
548
|
awaitingCrewSince: z.ZodNullable<z.ZodISODateTime>;
|
|
474
549
|
retiredAt: z.ZodNullable<z.ZodISODateTime>;
|
|
475
550
|
ownerShipId: z.ZodNullable<z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>>;
|
|
551
|
+
openAlertCount: z.ZodInt;
|
|
476
552
|
}, z.core.$strip>, z.ZodObject<{
|
|
477
553
|
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
478
554
|
name: z.ZodString;
|
|
@@ -615,6 +691,19 @@ export declare const liveFleetEventSchema: z.ZodObject<{
|
|
|
615
691
|
ScheduleResumed: "ScheduleResumed";
|
|
616
692
|
ScheduleEnded: "ScheduleEnded";
|
|
617
693
|
HistoryPruned: "HistoryPruned";
|
|
694
|
+
FleetSealingTurnedOn: "FleetSealingTurnedOn";
|
|
695
|
+
FleetPayloadsSealed: "FleetPayloadsSealed";
|
|
696
|
+
FleetKeyUnavailable: "FleetKeyUnavailable";
|
|
697
|
+
FleetKeyAvailable: "FleetKeyAvailable";
|
|
698
|
+
FleetDataKeyCreated: "FleetDataKeyCreated";
|
|
699
|
+
FleetCompanyKeyChanged: "FleetCompanyKeyChanged";
|
|
700
|
+
FleetRecoveryKeyChanged: "FleetRecoveryKeyChanged";
|
|
701
|
+
FleetKeysRecovered: "FleetKeysRecovered";
|
|
702
|
+
FeatureFlagTurnedOn: "FeatureFlagTurnedOn";
|
|
703
|
+
FeatureFlagTurnedOff: "FeatureFlagTurnedOff";
|
|
704
|
+
AlertRaised: "AlertRaised";
|
|
705
|
+
AlertCleared: "AlertCleared";
|
|
706
|
+
ExpectationsSet: "ExpectationsSet";
|
|
618
707
|
}>;
|
|
619
708
|
occurredAt: z.ZodISODateTime;
|
|
620
709
|
actorKind: z.ZodEnum<{
|
|
@@ -724,6 +813,19 @@ export declare const fleetStreamItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
724
813
|
ScheduleResumed: "ScheduleResumed";
|
|
725
814
|
ScheduleEnded: "ScheduleEnded";
|
|
726
815
|
HistoryPruned: "HistoryPruned";
|
|
816
|
+
FleetSealingTurnedOn: "FleetSealingTurnedOn";
|
|
817
|
+
FleetPayloadsSealed: "FleetPayloadsSealed";
|
|
818
|
+
FleetKeyUnavailable: "FleetKeyUnavailable";
|
|
819
|
+
FleetKeyAvailable: "FleetKeyAvailable";
|
|
820
|
+
FleetDataKeyCreated: "FleetDataKeyCreated";
|
|
821
|
+
FleetCompanyKeyChanged: "FleetCompanyKeyChanged";
|
|
822
|
+
FleetRecoveryKeyChanged: "FleetRecoveryKeyChanged";
|
|
823
|
+
FleetKeysRecovered: "FleetKeysRecovered";
|
|
824
|
+
FeatureFlagTurnedOn: "FeatureFlagTurnedOn";
|
|
825
|
+
FeatureFlagTurnedOff: "FeatureFlagTurnedOff";
|
|
826
|
+
AlertRaised: "AlertRaised";
|
|
827
|
+
AlertCleared: "AlertCleared";
|
|
828
|
+
ExpectationsSet: "ExpectationsSet";
|
|
727
829
|
}>;
|
|
728
830
|
occurredAt: z.ZodISODateTime;
|
|
729
831
|
actorKind: z.ZodEnum<{
|
package/dist/schemas/fleet.js
CHANGED
|
@@ -7,6 +7,7 @@ import { idempotencyKeySchema } from './idempotency-key.js';
|
|
|
7
7
|
import { listedCrewRequestSchema } from './crew-request.js';
|
|
8
8
|
import { carriedLabelSchema, SHIP_LABELS_MAX } from './label.js';
|
|
9
9
|
import { pageOutputOf } from './page.js';
|
|
10
|
+
import { listedActivitySchema } from './activity.js';
|
|
10
11
|
import { listedReportSchema } from './report.js';
|
|
11
12
|
/**
|
|
12
13
|
* Inputs and outputs of the fleet procedures: commission a ship, get its
|
|
@@ -50,7 +51,8 @@ export const getStartingPromptInputSchema = z.object({ shipId: idSchema('ship')
|
|
|
50
51
|
/**
|
|
51
52
|
* One crew line: the starting prompt's identity in one line for a harness
|
|
52
53
|
* with the Aeolus Fleet plugin, `/aeolus-fleet:crew <fleetUrl> <shipId> <secret>` for
|
|
53
|
-
* Claude Code, `$aeolus-fleet-crew <fleetUrl> <shipId> <secret>` for Codex
|
|
54
|
+
* Claude Code, `$aeolus-fleet-crew <fleetUrl> <shipId> <secret>` for Codex,
|
|
55
|
+
* and the same `/aeolus-fleet:crew <fleetUrl> <shipId> <secret>` for Copilot.
|
|
54
56
|
*/
|
|
55
57
|
export const crewLineSchema = z.object({ harness: z.string(), line: z.string() });
|
|
56
58
|
/**
|
|
@@ -170,6 +172,11 @@ export const listedShipSchema = z.object({
|
|
|
170
172
|
* themselves. Null until the crew reports, and for a ship no session crews.
|
|
171
173
|
*/
|
|
172
174
|
report: listedReportSchema.nullable(),
|
|
175
|
+
/**
|
|
176
|
+
* What its trierarch last observed of the crewing session (docs/design/monitoring, 4.3):
|
|
177
|
+
* null for a ship crewed by hand, before its trierarch writes any, and for a ship no session crews.
|
|
178
|
+
*/
|
|
179
|
+
activity: listedActivitySchema.nullable(),
|
|
173
180
|
/** The ship's crew request (decision 0029); null when it holds none. */
|
|
174
181
|
crewRequest: listedCrewRequestSchema.nullable(),
|
|
175
182
|
/** The label values the ship carries, with their labels, by key then value (decision 0031). */
|
|
@@ -180,6 +187,8 @@ export const listedShipSchema = z.object({
|
|
|
180
187
|
retiredAt: z.iso.datetime().nullable(),
|
|
181
188
|
/** The ship that owns it (decision 0045); null for argo and the viewer, which no ship owns. */
|
|
182
189
|
ownerShipId: idSchema('ship').nullable(),
|
|
190
|
+
/** How many open alerts the ship has (decision 0071); `fleet.openAlerts` lists them. */
|
|
191
|
+
openAlertCount: z.int().min(0),
|
|
183
192
|
});
|
|
184
193
|
/** A ship outside the caller's read reach (decision 0034): its name, type and status only. */
|
|
185
194
|
export const shipOutsideReadReachSchema = z.object({
|