@aeolus-fleet/common 0.21.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fleet/busy-wait.d.ts +6 -0
- package/dist/fleet/busy-wait.js +10 -0
- package/dist/fleet/busy-wait.js.map +1 -0
- package/dist/fleet/index.d.ts +10 -1
- package/dist/fleet/index.js +9 -0
- package/dist/fleet/index.js.map +1 -1
- package/dist/fleet/no-terminal-questions.d.ts +7 -0
- package/dist/fleet/no-terminal-questions.js +8 -0
- package/dist/fleet/no-terminal-questions.js.map +1 -0
- package/dist/schemas/fleet.d.ts +2 -0
- package/dist/schemas/follow.d.ts +1 -0
- package/dist/schemas/history.d.ts +2 -0
- 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/network.d.ts +102 -10
- package/dist/schemas/network.js +24 -6
- package/dist/schemas/network.js.map +1 -1
- package/dist/schemas/operator-inbox.d.ts +16 -2
- package/dist/schemas/operator-inbox.js +7 -3
- package/dist/schemas/operator-inbox.js.map +1 -1
- package/dist/schemas/question.d.ts +138 -0
- package/dist/schemas/question.js +154 -0
- package/dist/schemas/question.js.map +1 -0
- package/dist/schemas/system.d.ts +7 -0
- package/dist/schemas/system.js +6 -0
- package/dist/schemas/system.js.map +1 -1
- package/package.json +5 -2
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The wait before the next call while the fleet answers busy: drawn between
|
|
3
|
+
* half and all of `waitMs`, so callers the fleet refused together do not call
|
|
4
|
+
* again together. `random` draws in [0, 1], as Math.random does.
|
|
5
|
+
*/
|
|
6
|
+
export declare function busyWaitMs(waitMs: number, random: () => number): number;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The wait before the next call while the fleet answers busy: drawn between
|
|
3
|
+
* half and all of `waitMs`, so callers the fleet refused together do not call
|
|
4
|
+
* again together. `random` draws in [0, 1], as Math.random does.
|
|
5
|
+
*/
|
|
6
|
+
export function busyWaitMs(waitMs, random) {
|
|
7
|
+
const half = waitMs / 2;
|
|
8
|
+
return half + random() * half;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=busy-wait.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"busy-wait.js","sourceRoot":"","sources":["../../src/fleet/busy-wait.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,MAAc,EAAE,MAAoB;IAC7D,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,CAAC;IACxB,OAAO,IAAI,GAAG,MAAM,EAAE,GAAG,IAAI,CAAC;AAChC,CAAC"}
|
package/dist/fleet/index.d.ts
CHANGED
|
@@ -89,7 +89,7 @@ export declare const deliveryStateSchema: z.ZodEnum<{
|
|
|
89
89
|
}>;
|
|
90
90
|
export type DeliveryState = z.infer<typeof deliveryStateSchema>;
|
|
91
91
|
/** The event types written so far. Each later slice adds the ones it writes. */
|
|
92
|
-
export declare const EVENT_TYPES: readonly ["FleetInitialised", "ShipCommissioned", "ShipClaimed", "LeaseRevoked", "CredentialRevoked", "StartingPromptIssued", "OperatorPasswordReset", "MessageAccepted", "DeliveryClaimed", "DeliveryAcknowledged", "DeliveryUndeliverable", "DeliveryReturned", "ShipRetired", "DeliveryAbandoned", "DeliveryDismissed", "ShipRenamed", "ShipReported", "SignInTicketIssued", "FleetLimitsChanged", "ViewerSessionStarted", "CrewRequested", "CrewRequestRemoved", "CrewAssigned", "CrewStatusChanged", "CrewRequestExplained", "CrewRequestGivenBack", "LabelDefined", "LabelValuesChanged", "LabelRetired", "LabelAssigned", "LabelUnassigned", "LabelDeleted", "WorktreeClearRequested", "WorktreeCleared", "WorktreeClearRemoved", "NetworkRulesSet", "NetworkPluginRegistered", "NetworkPluginUnregistered"];
|
|
92
|
+
export declare const EVENT_TYPES: readonly ["FleetInitialised", "ShipCommissioned", "ShipClaimed", "LeaseRevoked", "CredentialRevoked", "StartingPromptIssued", "OperatorPasswordReset", "MessageAccepted", "DeliveryClaimed", "DeliveryAcknowledged", "DeliveryUndeliverable", "DeliveryReturned", "ShipRetired", "DeliveryAbandoned", "DeliveryDismissed", "ShipRenamed", "ShipReported", "SignInTicketIssued", "FleetLimitsChanged", "ViewerSessionStarted", "CrewRequested", "CrewRequestRemoved", "CrewAssigned", "CrewStatusChanged", "CrewRequestExplained", "CrewRequestGivenBack", "LabelDefined", "LabelValuesChanged", "LabelRetired", "LabelAssigned", "LabelUnassigned", "LabelDeleted", "WorktreeClearRequested", "WorktreeCleared", "WorktreeClearRemoved", "NetworkRulesSet", "NetworkRulesDeclared", "NetworkPluginRegistered", "NetworkPluginUnregistered"];
|
|
93
93
|
export declare const eventTypeSchema: z.ZodEnum<{
|
|
94
94
|
FleetInitialised: "FleetInitialised";
|
|
95
95
|
ShipCommissioned: "ShipCommissioned";
|
|
@@ -127,8 +127,17 @@ export declare const eventTypeSchema: z.ZodEnum<{
|
|
|
127
127
|
WorktreeCleared: "WorktreeCleared";
|
|
128
128
|
WorktreeClearRemoved: "WorktreeClearRemoved";
|
|
129
129
|
NetworkRulesSet: "NetworkRulesSet";
|
|
130
|
+
NetworkRulesDeclared: "NetworkRulesDeclared";
|
|
130
131
|
NetworkPluginRegistered: "NetworkPluginRegistered";
|
|
131
132
|
NetworkPluginUnregistered: "NetworkPluginUnregistered";
|
|
132
133
|
}>;
|
|
133
134
|
export type EventType = z.infer<typeof eventTypeSchema>;
|
|
135
|
+
export * from './busy-wait.js';
|
|
134
136
|
export * from './mcp-url.js';
|
|
137
|
+
export * from './no-terminal-questions.js';
|
|
138
|
+
/**
|
|
139
|
+
* How long a caller waits before each next call while the fleet answers busy
|
|
140
|
+
* (`SERVICE_UNAVAILABLE`, nothing stored; docs/architecture.md): bounded and
|
|
141
|
+
* longer each time, then the refusal stands. Each is drawn by `busyWaitMs`.
|
|
142
|
+
*/
|
|
143
|
+
export declare const FLEET_BUSY_WAITS_MS: readonly [1000, 2000, 4000, 8000];
|
package/dist/fleet/index.js
CHANGED
|
@@ -78,9 +78,18 @@ export const EVENT_TYPES = [
|
|
|
78
78
|
'WorktreeCleared',
|
|
79
79
|
'WorktreeClearRemoved',
|
|
80
80
|
'NetworkRulesSet',
|
|
81
|
+
'NetworkRulesDeclared',
|
|
81
82
|
'NetworkPluginRegistered',
|
|
82
83
|
'NetworkPluginUnregistered',
|
|
83
84
|
];
|
|
84
85
|
export const eventTypeSchema = z.enum(EVENT_TYPES);
|
|
86
|
+
export * from './busy-wait.js';
|
|
85
87
|
export * from './mcp-url.js';
|
|
88
|
+
export * from './no-terminal-questions.js';
|
|
89
|
+
/**
|
|
90
|
+
* How long a caller waits before each next call while the fleet answers busy
|
|
91
|
+
* (`SERVICE_UNAVAILABLE`, nothing stored; docs/architecture.md): bounded and
|
|
92
|
+
* longer each time, then the refusal stands. Each is drawn by `busyWaitMs`.
|
|
93
|
+
*/
|
|
94
|
+
export const FLEET_BUSY_WAITS_MS = [1000, 2000, 4000, 8000];
|
|
86
95
|
//# sourceMappingURL=index.js.map
|
package/dist/fleet/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fleet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AAEH,gGAAgG;AAChG,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,eAAe,EAAE,kBAAkB,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,CAAU,CAAC;AACjL,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAG1C;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,YAAY,EAAE,cAAc,EAAE,aAAa,EAA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mBAAmB;IACnB,sBAAsB;IACtB,sBAAsB;IACtB,cAAc;IACd,oBAAoB;IACpB,cAAc;IACd,eAAe;IACf,iBAAiB;IACjB,cAAc;IACd,wBAAwB;IACxB,iBAAiB;IACjB,sBAAsB;IACtB,iBAAiB;IACjB,sBAAsB;IACtB,yBAAyB;IACzB,2BAA2B;CACnB,CAAC;AACX,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAGnD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,4BAA4B,CAAC;AAE3C;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The line every crewed session is told (#585): nobody watches its pane, so a
|
|
3
|
+
* question asked there waits for ever. The ship protocol states it, the
|
|
4
|
+
* trierarch adds it to its first and every wake prompt, and the aeolus
|
|
5
|
+
* plugin's crew skills say the same.
|
|
6
|
+
*/
|
|
7
|
+
export declare const NO_TERMINAL_QUESTIONS = "No human reads this terminal. Never ask here; ask over the fleet. A question only the operator can answer goes to argo.";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The line every crewed session is told (#585): nobody watches its pane, so a
|
|
3
|
+
* question asked there waits for ever. The ship protocol states it, the
|
|
4
|
+
* trierarch adds it to its first and every wake prompt, and the aeolus
|
|
5
|
+
* plugin's crew skills say the same.
|
|
6
|
+
*/
|
|
7
|
+
export const NO_TERMINAL_QUESTIONS = 'No human reads this terminal. Never ask here; ask over the fleet. A question only the operator can answer goes to argo.';
|
|
8
|
+
//# sourceMappingURL=no-terminal-questions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-terminal-questions.js","sourceRoot":"","sources":["../../src/fleet/no-terminal-questions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,yHAAyH,CAAC"}
|
package/dist/schemas/fleet.d.ts
CHANGED
|
@@ -397,6 +397,7 @@ export declare const liveFleetEventSchema: z.ZodObject<{
|
|
|
397
397
|
WorktreeCleared: "WorktreeCleared";
|
|
398
398
|
WorktreeClearRemoved: "WorktreeClearRemoved";
|
|
399
399
|
NetworkRulesSet: "NetworkRulesSet";
|
|
400
|
+
NetworkRulesDeclared: "NetworkRulesDeclared";
|
|
400
401
|
NetworkPluginRegistered: "NetworkPluginRegistered";
|
|
401
402
|
NetworkPluginUnregistered: "NetworkPluginUnregistered";
|
|
402
403
|
}>;
|
|
@@ -453,6 +454,7 @@ export declare const fleetStreamItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
453
454
|
WorktreeCleared: "WorktreeCleared";
|
|
454
455
|
WorktreeClearRemoved: "WorktreeClearRemoved";
|
|
455
456
|
NetworkRulesSet: "NetworkRulesSet";
|
|
457
|
+
NetworkRulesDeclared: "NetworkRulesDeclared";
|
|
456
458
|
NetworkPluginRegistered: "NetworkPluginRegistered";
|
|
457
459
|
NetworkPluginUnregistered: "NetworkPluginUnregistered";
|
|
458
460
|
}>;
|
package/dist/schemas/follow.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ export declare const followFleetOutputSchema: z.ZodObject<{
|
|
|
58
58
|
WorktreeCleared: "WorktreeCleared";
|
|
59
59
|
WorktreeClearRemoved: "WorktreeClearRemoved";
|
|
60
60
|
NetworkRulesSet: "NetworkRulesSet";
|
|
61
|
+
NetworkRulesDeclared: "NetworkRulesDeclared";
|
|
61
62
|
NetworkPluginRegistered: "NetworkPluginRegistered";
|
|
62
63
|
NetworkPluginUnregistered: "NetworkPluginUnregistered";
|
|
63
64
|
}>;
|
|
@@ -179,6 +179,7 @@ export declare const timelineEntrySchema: z.ZodObject<{
|
|
|
179
179
|
WorktreeCleared: "WorktreeCleared";
|
|
180
180
|
WorktreeClearRemoved: "WorktreeClearRemoved";
|
|
181
181
|
NetworkRulesSet: "NetworkRulesSet";
|
|
182
|
+
NetworkRulesDeclared: "NetworkRulesDeclared";
|
|
182
183
|
NetworkPluginRegistered: "NetworkPluginRegistered";
|
|
183
184
|
NetworkPluginUnregistered: "NetworkPluginUnregistered";
|
|
184
185
|
}>;
|
|
@@ -255,6 +256,7 @@ export declare const shipTimelineOutputSchema: z.ZodArray<z.ZodObject<{
|
|
|
255
256
|
WorktreeCleared: "WorktreeCleared";
|
|
256
257
|
WorktreeClearRemoved: "WorktreeClearRemoved";
|
|
257
258
|
NetworkRulesSet: "NetworkRulesSet";
|
|
259
|
+
NetworkRulesDeclared: "NetworkRulesDeclared";
|
|
258
260
|
NetworkPluginRegistered: "NetworkPluginRegistered";
|
|
259
261
|
NetworkPluginUnregistered: "NetworkPluginUnregistered";
|
|
260
262
|
}>;
|
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,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,cAAc,CAAC;AAC7B,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,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
|
|
@@ -2,33 +2,125 @@ import { z } from 'zod';
|
|
|
2
2
|
/**
|
|
3
3
|
* Network rules (decision 0034): which ships may send to which. A rule says
|
|
4
4
|
* that the ships matching one label selector may send to the ships matching
|
|
5
|
-
* another; a selector is a
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* another; a selector is a list of terms that must all hold (an empty one
|
|
6
|
+
* holds for every ship). Allow-only. The limits are the decision's; the server
|
|
7
|
+
* checks them, so every refusal names it.
|
|
8
8
|
*/
|
|
9
|
-
/** The most rules one fleet may hold. */
|
|
9
|
+
/** The most rules of argo's one fleet may hold, beside the rules its ships declared (decision 0037). */
|
|
10
10
|
export declare const NETWORK_RULES_MAX = 200;
|
|
11
|
+
/** The most rules one ship may declare (decision 0037). */
|
|
12
|
+
export declare const DECLARED_NETWORK_RULES_MAX = 20;
|
|
11
13
|
/** The most refusals one read of them answers: the latest. */
|
|
12
14
|
export declare const REACH_REFUSALS_READ_MAX = 100;
|
|
13
|
-
/**
|
|
14
|
-
export declare const
|
|
15
|
+
/** A term's value that is any value of its label: the ship carries the label. */
|
|
16
|
+
export declare const ANY_LABEL_VALUE: "*";
|
|
17
|
+
/** A term's value that is any value of its label the ship on the other side of the rule carries too. */
|
|
18
|
+
export declare const SAME_LABEL_VALUE: "#";
|
|
19
|
+
/**
|
|
20
|
+
* One term of a selector: an exact label value, written as its id, which
|
|
21
|
+
* names its label; or a label with any value (`*`) or with the same value as
|
|
22
|
+
* the other side's (`#`), which binds the same label there only.
|
|
23
|
+
*/
|
|
24
|
+
export declare const selectorTermSchema: z.ZodUnion<readonly [z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>, z.ZodObject<{
|
|
25
|
+
labelId: z.ZodType<`lbl_${string}`, unknown, z.core.$ZodTypeInternals<`lbl_${string}`, unknown>>;
|
|
26
|
+
value: z.ZodEnum<{
|
|
27
|
+
"*": "*";
|
|
28
|
+
"#": "#";
|
|
29
|
+
}>;
|
|
30
|
+
}, z.core.$strip>]>;
|
|
31
|
+
export type SelectorTerm = z.infer<typeof selectorTermSchema>;
|
|
32
|
+
/** The ships for which every one of these terms holds, combined with AND. */
|
|
33
|
+
export declare const labelSelectorSchema: z.ZodArray<z.ZodUnion<readonly [z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>, z.ZodObject<{
|
|
34
|
+
labelId: z.ZodType<`lbl_${string}`, unknown, z.core.$ZodTypeInternals<`lbl_${string}`, unknown>>;
|
|
35
|
+
value: z.ZodEnum<{
|
|
36
|
+
"*": "*";
|
|
37
|
+
"#": "#";
|
|
38
|
+
}>;
|
|
39
|
+
}, z.core.$strip>]>>;
|
|
15
40
|
/** One rule: the ships matching `from` may send to the ships matching `to`. */
|
|
16
41
|
export declare const networkRuleSchema: z.ZodObject<{
|
|
17
|
-
from: z.ZodArray<z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown
|
|
18
|
-
|
|
42
|
+
from: z.ZodArray<z.ZodUnion<readonly [z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>, z.ZodObject<{
|
|
43
|
+
labelId: z.ZodType<`lbl_${string}`, unknown, z.core.$ZodTypeInternals<`lbl_${string}`, unknown>>;
|
|
44
|
+
value: z.ZodEnum<{
|
|
45
|
+
"*": "*";
|
|
46
|
+
"#": "#";
|
|
47
|
+
}>;
|
|
48
|
+
}, z.core.$strip>]>>;
|
|
49
|
+
to: z.ZodArray<z.ZodUnion<readonly [z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>, z.ZodObject<{
|
|
50
|
+
labelId: z.ZodType<`lbl_${string}`, unknown, z.core.$ZodTypeInternals<`lbl_${string}`, unknown>>;
|
|
51
|
+
value: z.ZodEnum<{
|
|
52
|
+
"*": "*";
|
|
53
|
+
"#": "#";
|
|
54
|
+
}>;
|
|
55
|
+
}, z.core.$strip>]>>;
|
|
19
56
|
}, z.core.$strip>;
|
|
20
57
|
export type NetworkRule = z.infer<typeof networkRuleSchema>;
|
|
21
58
|
/** Input of `fleet.setNetworkRules` (fleet:network): every rule the fleet holds from now on, or none for all-to-all. */
|
|
22
59
|
export declare const setNetworkRulesInputSchema: z.ZodObject<{
|
|
23
60
|
rules: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
24
|
-
from: z.ZodArray<z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown
|
|
25
|
-
|
|
61
|
+
from: z.ZodArray<z.ZodUnion<readonly [z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>, z.ZodObject<{
|
|
62
|
+
labelId: z.ZodType<`lbl_${string}`, unknown, z.core.$ZodTypeInternals<`lbl_${string}`, unknown>>;
|
|
63
|
+
value: z.ZodEnum<{
|
|
64
|
+
"*": "*";
|
|
65
|
+
"#": "#";
|
|
66
|
+
}>;
|
|
67
|
+
}, z.core.$strip>]>>;
|
|
68
|
+
to: z.ZodArray<z.ZodUnion<readonly [z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>, z.ZodObject<{
|
|
69
|
+
labelId: z.ZodType<`lbl_${string}`, unknown, z.core.$ZodTypeInternals<`lbl_${string}`, unknown>>;
|
|
70
|
+
value: z.ZodEnum<{
|
|
71
|
+
"*": "*";
|
|
72
|
+
"#": "#";
|
|
73
|
+
}>;
|
|
74
|
+
}, z.core.$strip>]>>;
|
|
26
75
|
}, z.core.$strip>>>;
|
|
27
76
|
}, z.core.$strip>;
|
|
28
77
|
/** Output of `fleet.setNetworkRules`: the version the fleet's network settings have now. */
|
|
29
78
|
export declare const setNetworkRulesOutputSchema: z.ZodObject<{
|
|
30
79
|
version: z.ZodInt;
|
|
31
80
|
}, z.core.$strip>;
|
|
81
|
+
/** Input of `fleet.declareNetworkRules` (labels:define): every rule the ship declares from now on, on labels it owns; an empty list withdraws them (decision 0037). */
|
|
82
|
+
export declare const declareNetworkRulesInputSchema: z.ZodObject<{
|
|
83
|
+
rules: z.ZodArray<z.ZodObject<{
|
|
84
|
+
from: z.ZodArray<z.ZodUnion<readonly [z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>, z.ZodObject<{
|
|
85
|
+
labelId: z.ZodType<`lbl_${string}`, unknown, z.core.$ZodTypeInternals<`lbl_${string}`, unknown>>;
|
|
86
|
+
value: z.ZodEnum<{
|
|
87
|
+
"*": "*";
|
|
88
|
+
"#": "#";
|
|
89
|
+
}>;
|
|
90
|
+
}, z.core.$strip>]>>;
|
|
91
|
+
to: z.ZodArray<z.ZodUnion<readonly [z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>, z.ZodObject<{
|
|
92
|
+
labelId: z.ZodType<`lbl_${string}`, unknown, z.core.$ZodTypeInternals<`lbl_${string}`, unknown>>;
|
|
93
|
+
value: z.ZodEnum<{
|
|
94
|
+
"*": "*";
|
|
95
|
+
"#": "#";
|
|
96
|
+
}>;
|
|
97
|
+
}, z.core.$strip>]>>;
|
|
98
|
+
}, z.core.$strip>>;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
/** Output of `fleet.declareNetworkRules`: how many rules the ship declares now. */
|
|
101
|
+
export declare const declareNetworkRulesOutputSchema: z.ZodObject<{
|
|
102
|
+
rules: z.ZodInt;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
/** Output of `fleet.declaredNetworkRules` (fleet:network): each ship that declared rules, with its whole list. */
|
|
105
|
+
export declare const declaredNetworkRulesOutputSchema: z.ZodArray<z.ZodObject<{
|
|
106
|
+
shipId: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
107
|
+
rules: z.ZodArray<z.ZodObject<{
|
|
108
|
+
from: z.ZodArray<z.ZodUnion<readonly [z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>, z.ZodObject<{
|
|
109
|
+
labelId: z.ZodType<`lbl_${string}`, unknown, z.core.$ZodTypeInternals<`lbl_${string}`, unknown>>;
|
|
110
|
+
value: z.ZodEnum<{
|
|
111
|
+
"*": "*";
|
|
112
|
+
"#": "#";
|
|
113
|
+
}>;
|
|
114
|
+
}, z.core.$strip>]>>;
|
|
115
|
+
to: z.ZodArray<z.ZodUnion<readonly [z.ZodType<`lbv_${string}`, unknown, z.core.$ZodTypeInternals<`lbv_${string}`, unknown>>, z.ZodObject<{
|
|
116
|
+
labelId: z.ZodType<`lbl_${string}`, unknown, z.core.$ZodTypeInternals<`lbl_${string}`, unknown>>;
|
|
117
|
+
value: z.ZodEnum<{
|
|
118
|
+
"*": "*";
|
|
119
|
+
"#": "#";
|
|
120
|
+
}>;
|
|
121
|
+
}, z.core.$strip>]>>;
|
|
122
|
+
}, z.core.$strip>>;
|
|
123
|
+
}, z.core.$strip>>;
|
|
32
124
|
/**
|
|
33
125
|
* What happens to sends while a fleet's networking plugin is unavailable
|
|
34
126
|
* (decision 0035): every send refused but the fixed exceptions, every send
|
package/dist/schemas/network.js
CHANGED
|
@@ -4,22 +4,40 @@ import { carriedLabelSchema } from './label.js';
|
|
|
4
4
|
/**
|
|
5
5
|
* Network rules (decision 0034): which ships may send to which. A rule says
|
|
6
6
|
* that the ships matching one label selector may send to the ships matching
|
|
7
|
-
* another; a selector is a
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* another; a selector is a list of terms that must all hold (an empty one
|
|
8
|
+
* holds for every ship). Allow-only. The limits are the decision's; the server
|
|
9
|
+
* checks them, so every refusal names it.
|
|
10
10
|
*/
|
|
11
|
-
/** The most rules one fleet may hold. */
|
|
11
|
+
/** The most rules of argo's one fleet may hold, beside the rules its ships declared (decision 0037). */
|
|
12
12
|
export const NETWORK_RULES_MAX = 200;
|
|
13
|
+
/** The most rules one ship may declare (decision 0037). */
|
|
14
|
+
export const DECLARED_NETWORK_RULES_MAX = 20;
|
|
13
15
|
/** The most refusals one read of them answers: the latest. */
|
|
14
16
|
export const REACH_REFUSALS_READ_MAX = 100;
|
|
15
|
-
/**
|
|
16
|
-
export const
|
|
17
|
+
/** A term's value that is any value of its label: the ship carries the label. */
|
|
18
|
+
export const ANY_LABEL_VALUE = '*';
|
|
19
|
+
/** A term's value that is any value of its label the ship on the other side of the rule carries too. */
|
|
20
|
+
export const SAME_LABEL_VALUE = '#';
|
|
21
|
+
/**
|
|
22
|
+
* One term of a selector: an exact label value, written as its id, which
|
|
23
|
+
* names its label; or a label with any value (`*`) or with the same value as
|
|
24
|
+
* the other side's (`#`), which binds the same label there only.
|
|
25
|
+
*/
|
|
26
|
+
export const selectorTermSchema = z.union([idSchema('labelValue'), z.object({ labelId: idSchema('label'), value: z.enum([ANY_LABEL_VALUE, SAME_LABEL_VALUE]) })]);
|
|
27
|
+
/** The ships for which every one of these terms holds, combined with AND. */
|
|
28
|
+
export const labelSelectorSchema = z.array(selectorTermSchema);
|
|
17
29
|
/** One rule: the ships matching `from` may send to the ships matching `to`. */
|
|
18
30
|
export const networkRuleSchema = z.object({ from: labelSelectorSchema, to: labelSelectorSchema });
|
|
19
31
|
/** Input of `fleet.setNetworkRules` (fleet:network): every rule the fleet holds from now on, or none for all-to-all. */
|
|
20
32
|
export const setNetworkRulesInputSchema = z.object({ rules: z.array(networkRuleSchema).nullable() });
|
|
21
33
|
/** Output of `fleet.setNetworkRules`: the version the fleet's network settings have now. */
|
|
22
34
|
export const setNetworkRulesOutputSchema = z.object({ version: z.int().min(1) });
|
|
35
|
+
/** Input of `fleet.declareNetworkRules` (labels:define): every rule the ship declares from now on, on labels it owns; an empty list withdraws them (decision 0037). */
|
|
36
|
+
export const declareNetworkRulesInputSchema = z.object({ rules: z.array(networkRuleSchema) });
|
|
37
|
+
/** Output of `fleet.declareNetworkRules`: how many rules the ship declares now. */
|
|
38
|
+
export const declareNetworkRulesOutputSchema = z.object({ rules: z.int().min(0) });
|
|
39
|
+
/** Output of `fleet.declaredNetworkRules` (fleet:network): each ship that declared rules, with its whole list. */
|
|
40
|
+
export const declaredNetworkRulesOutputSchema = z.array(z.object({ shipId: idSchema('ship'), rules: z.array(networkRuleSchema) }));
|
|
23
41
|
/**
|
|
24
42
|
* What happens to sends while a fleet's networking plugin is unavailable
|
|
25
43
|
* (decision 0035): every send refused but the fixed exceptions, every send
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.js","sourceRoot":"","sources":["../../src/schemas/network.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD;;;;;;GAMG;AAEH,
|
|
1
|
+
{"version":3,"file":"network.js","sourceRoot":"","sources":["../../src/schemas/network.ts"],"names":[],"mappings":"AAAA,OAAO,EA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QAAQ,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAEzH,gHAAgH;AAChH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -15,7 +15,7 @@ export declare const operatorInboxInputSchema: z.ZodObject<{
|
|
|
15
15
|
all: "all";
|
|
16
16
|
}>;
|
|
17
17
|
}, z.core.$strip>;
|
|
18
|
-
/** One message to argo: its delivery's state, when it was read and done, the reply that made it done, and the message. */
|
|
18
|
+
/** One message to argo: its delivery's state, when it was read and done, the reply that made it done, argo's replies to it, and the message. */
|
|
19
19
|
export declare const inboxMessageSchema: z.ZodObject<{
|
|
20
20
|
deliveryId: z.ZodType<`dlv_${string}`, unknown, z.core.$ZodTypeInternals<`dlv_${string}`, unknown>>;
|
|
21
21
|
state: z.ZodEnum<{
|
|
@@ -29,6 +29,12 @@ export declare const inboxMessageSchema: z.ZodObject<{
|
|
|
29
29
|
readAt: z.ZodNullable<z.ZodISODateTime>;
|
|
30
30
|
doneAt: z.ZodNullable<z.ZodISODateTime>;
|
|
31
31
|
repliedWith: z.ZodNullable<z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>>;
|
|
32
|
+
replies: z.ZodArray<z.ZodObject<{
|
|
33
|
+
id: z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>;
|
|
34
|
+
contentType: z.ZodString;
|
|
35
|
+
payload: z.ZodString;
|
|
36
|
+
sentAt: z.ZodISODateTime;
|
|
37
|
+
}, z.core.$strip>>;
|
|
32
38
|
message: z.ZodObject<{
|
|
33
39
|
id: z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>;
|
|
34
40
|
sender: z.ZodObject<{
|
|
@@ -57,6 +63,12 @@ export declare const operatorInboxOutputSchema: z.ZodArray<z.ZodObject<{
|
|
|
57
63
|
readAt: z.ZodNullable<z.ZodISODateTime>;
|
|
58
64
|
doneAt: z.ZodNullable<z.ZodISODateTime>;
|
|
59
65
|
repliedWith: z.ZodNullable<z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>>;
|
|
66
|
+
replies: z.ZodArray<z.ZodObject<{
|
|
67
|
+
id: z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>;
|
|
68
|
+
contentType: z.ZodString;
|
|
69
|
+
payload: z.ZodString;
|
|
70
|
+
sentAt: z.ZodISODateTime;
|
|
71
|
+
}, z.core.$strip>>;
|
|
60
72
|
message: z.ZodObject<{
|
|
61
73
|
id: z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>;
|
|
62
74
|
sender: z.ZodObject<{
|
|
@@ -83,11 +95,13 @@ export declare const markDoneInputSchema: z.ZodObject<{
|
|
|
83
95
|
}, z.core.$strip>;
|
|
84
96
|
/**
|
|
85
97
|
* Input of `fleet.reply`: an answer to a message sent to argo, named by its
|
|
86
|
-
* delivery,
|
|
98
|
+
* delivery, to its sender, as plain text unless it says another content type,
|
|
99
|
+
* which also marks the message done.
|
|
87
100
|
*/
|
|
88
101
|
export declare const replyInputSchema: z.ZodObject<{
|
|
89
102
|
deliveryId: z.ZodType<`dlv_${string}`, unknown, z.core.$ZodTypeInternals<`dlv_${string}`, unknown>>;
|
|
90
103
|
payload: z.ZodString;
|
|
104
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
91
105
|
idempotencyKey: z.ZodString;
|
|
92
106
|
}, z.core.$strip>;
|
|
93
107
|
/** Output of `fleet.reply`: the reply. */
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { deliveryStateSchema } from '../fleet/index.js';
|
|
3
3
|
import { idSchema } from '../ids/index.js';
|
|
4
4
|
import { partySchema } from './history.js';
|
|
5
|
-
import { sendInputSchema } from './message.js';
|
|
5
|
+
import { contentTypeSchema, sendInputSchema } from './message.js';
|
|
6
6
|
/**
|
|
7
7
|
* Inputs and outputs of the operator inbox (docs/blueprint.md, "Inbox"): the
|
|
8
8
|
* messages ships sent to argo. Opening one marks it read; read is not done.
|
|
@@ -15,7 +15,7 @@ export const INBOX_FILTERS = ['open', 'done', 'all'];
|
|
|
15
15
|
export const inboxFilterSchema = z.enum(INBOX_FILTERS);
|
|
16
16
|
/** Input of `fleet.inbox`. */
|
|
17
17
|
export const operatorInboxInputSchema = z.object({ filter: inboxFilterSchema });
|
|
18
|
-
/** One message to argo: its delivery's state, when it was read and done, the reply that made it done, and the message. */
|
|
18
|
+
/** One message to argo: its delivery's state, when it was read and done, the reply that made it done, argo's replies to it, and the message. */
|
|
19
19
|
export const inboxMessageSchema = z.object({
|
|
20
20
|
deliveryId: idSchema('delivery'),
|
|
21
21
|
state: deliveryStateSchema,
|
|
@@ -25,6 +25,8 @@ export const inboxMessageSchema = z.object({
|
|
|
25
25
|
doneAt: isoTime.nullable(),
|
|
26
26
|
/** The reply that acknowledged it, when a reply did. */
|
|
27
27
|
repliedWith: idSchema('message').nullable(),
|
|
28
|
+
/** Every reply argo sent to it, oldest first: what a console reads an answer from (decision 0038). */
|
|
29
|
+
replies: z.array(z.object({ id: idSchema('message'), contentType: z.string(), payload: z.string(), sentAt: isoTime })),
|
|
28
30
|
message: z.object({
|
|
29
31
|
id: idSchema('message'),
|
|
30
32
|
sender: partySchema,
|
|
@@ -46,11 +48,13 @@ export const inboxActionOutputSchema = z.strictObject({});
|
|
|
46
48
|
export const markDoneInputSchema = z.object({ deliveryId: idSchema('delivery') });
|
|
47
49
|
/**
|
|
48
50
|
* Input of `fleet.reply`: an answer to a message sent to argo, named by its
|
|
49
|
-
* delivery,
|
|
51
|
+
* delivery, to its sender, as plain text unless it says another content type,
|
|
52
|
+
* which also marks the message done.
|
|
50
53
|
*/
|
|
51
54
|
export const replyInputSchema = z.object({
|
|
52
55
|
deliveryId: idSchema('delivery'),
|
|
53
56
|
payload: sendInputSchema.shape.payload,
|
|
57
|
+
contentType: contentTypeSchema.optional(),
|
|
54
58
|
idempotencyKey: sendInputSchema.shape.idempotencyKey,
|
|
55
59
|
});
|
|
56
60
|
/** Output of `fleet.reply`: the reply. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operator-inbox.js","sourceRoot":"","sources":["../../src/schemas/operator-inbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"operator-inbox.js","sourceRoot":"","sources":["../../src/schemas/operator-inbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAElE;;;;GAIG;AAEH,uBAAuB;AACvB,MAAM,OAAO,GAAG,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;AAEjC,yDAAyD;AACzD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAU,CAAC;AAC9D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AAGvD,8BA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,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AAEvG,sFAAsF;AACtF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AAE1D,mFAAmF;AACnF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;AAElF;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC;IAChC,OAAO,EAAE,eAAe,CAAC,KAAK,CAAC,OAAO;IACtC,WAAW,EAAE,iBAAiB,CAAC,QAAQ,EAAE;IACzC,cAAc,EAAE,eAAe,CAAC,KAAK,CAAC,cAAc;CACrD,CAAC,CAAC;AAEH,0CAA0C;AAC1C,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type MessageId } from '../ids/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Questions to argo (decision 0038): a ship asks the operator by sending a
|
|
5
|
+
* message of the question content type to argo; the console answers it with a
|
|
6
|
+
* reply of the answer content type. Both payloads are data only: the fleet
|
|
7
|
+
* carries them as any message and never reads them; the console's server
|
|
8
|
+
* does. A question is open until argo
|
|
9
|
+
* sends its answer, whatever its delivery's state. The asking ship withdraws
|
|
10
|
+
* a question, or replaces it with a new one, by a message of its own content
|
|
11
|
+
* type naming the question's uuid.
|
|
12
|
+
*/
|
|
13
|
+
export declare const QUESTION_CONTENT_TYPE = "application/vnd.aeolus.question+json";
|
|
14
|
+
export declare const ANSWER_CONTENT_TYPE = "application/vnd.aeolus.answer+json";
|
|
15
|
+
export declare const WITHDRAWAL_CONTENT_TYPE = "application/vnd.aeolus.question-withdrawal+json";
|
|
16
|
+
export declare const REPLACEMENT_CONTENT_TYPE = "application/vnd.aeolus.question-replacement+json";
|
|
17
|
+
export declare function isQuestionContentType(contentType: string): boolean;
|
|
18
|
+
export declare function isAnswerContentType(contentType: string): boolean;
|
|
19
|
+
export declare function isWithdrawalContentType(contentType: string): boolean;
|
|
20
|
+
export declare function isReplacementContentType(contentType: string): boolean;
|
|
21
|
+
/** A question: its own uuid, a title, the context to answer from, numbered options, and the asker's pick and why. */
|
|
22
|
+
export declare const questionSchema: z.ZodObject<{
|
|
23
|
+
id: z.ZodUUID;
|
|
24
|
+
title: z.ZodString;
|
|
25
|
+
context: z.ZodString;
|
|
26
|
+
options: z.ZodArray<z.ZodObject<{
|
|
27
|
+
key: z.ZodInt;
|
|
28
|
+
label: z.ZodString;
|
|
29
|
+
detail: z.ZodString;
|
|
30
|
+
}, z.core.$strip>>;
|
|
31
|
+
pick: z.ZodObject<{
|
|
32
|
+
option: z.ZodInt;
|
|
33
|
+
why: z.ZodString;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export type Question = z.infer<typeof questionSchema>;
|
|
37
|
+
/** A withdrawal: the uuid of the question the asker withdraws. */
|
|
38
|
+
export declare const withdrawalSchema: z.ZodObject<{
|
|
39
|
+
questionId: z.ZodUUID;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
/** A replacement: the uuid of the question the asker replaces, and the new question, with a uuid of its own. */
|
|
42
|
+
export declare const replacementSchema: z.ZodObject<{
|
|
43
|
+
questionId: z.ZodUUID;
|
|
44
|
+
question: z.ZodObject<{
|
|
45
|
+
id: z.ZodUUID;
|
|
46
|
+
title: z.ZodString;
|
|
47
|
+
context: z.ZodString;
|
|
48
|
+
options: z.ZodArray<z.ZodObject<{
|
|
49
|
+
key: z.ZodInt;
|
|
50
|
+
label: z.ZodString;
|
|
51
|
+
detail: z.ZodString;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
pick: z.ZodObject<{
|
|
54
|
+
option: z.ZodInt;
|
|
55
|
+
why: z.ZodString;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
/** What the operator answers: one option and an optional note, or a note alone (more context needed, or none of the options). */
|
|
60
|
+
export declare const answerChoiceSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
61
|
+
option: z.ZodInt;
|
|
62
|
+
note: z.ZodOptional<z.ZodString>;
|
|
63
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
64
|
+
note: z.ZodString;
|
|
65
|
+
}, z.core.$strip>]>;
|
|
66
|
+
export type AnswerChoice = z.infer<typeof answerChoiceSchema>;
|
|
67
|
+
/** An answer: the question's uuid, and one option plus an optional note, or a note alone. */
|
|
68
|
+
export declare const answerSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
69
|
+
questionId: z.ZodUUID;
|
|
70
|
+
option: z.ZodInt;
|
|
71
|
+
note: z.ZodOptional<z.ZodString>;
|
|
72
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
73
|
+
questionId: z.ZodUUID;
|
|
74
|
+
note: z.ZodString;
|
|
75
|
+
}, z.core.$strip>]>;
|
|
76
|
+
export type Answer = z.infer<typeof answerSchema>;
|
|
77
|
+
/** The answer a question in argo's inbox has: the reply that carries it, when, and what it says. */
|
|
78
|
+
export declare const inboxAnswerSchema: z.ZodObject<{
|
|
79
|
+
messageId: z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>;
|
|
80
|
+
sentAt: z.ZodISODateTime;
|
|
81
|
+
option: z.ZodNullable<z.ZodInt>;
|
|
82
|
+
note: z.ZodNullable<z.ZodString>;
|
|
83
|
+
}, z.core.$strip>;
|
|
84
|
+
/** A question in argo's inbox, with its answer; null while it is open. */
|
|
85
|
+
export declare const inboxQuestionSchema: z.ZodObject<{
|
|
86
|
+
id: z.ZodUUID;
|
|
87
|
+
title: z.ZodString;
|
|
88
|
+
context: z.ZodString;
|
|
89
|
+
options: z.ZodArray<z.ZodObject<{
|
|
90
|
+
key: z.ZodInt;
|
|
91
|
+
label: z.ZodString;
|
|
92
|
+
detail: z.ZodString;
|
|
93
|
+
}, z.core.$strip>>;
|
|
94
|
+
pick: z.ZodObject<{
|
|
95
|
+
option: z.ZodInt;
|
|
96
|
+
why: z.ZodString;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
answer: z.ZodNullable<z.ZodObject<{
|
|
99
|
+
messageId: z.ZodType<`msg_${string}`, unknown, z.core.$ZodTypeInternals<`msg_${string}`, unknown>>;
|
|
100
|
+
sentAt: z.ZodISODateTime;
|
|
101
|
+
option: z.ZodNullable<z.ZodInt>;
|
|
102
|
+
note: z.ZodNullable<z.ZodString>;
|
|
103
|
+
}, z.core.$strip>>;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
export type InboxQuestion = z.infer<typeof inboxQuestionSchema>;
|
|
106
|
+
interface Carried {
|
|
107
|
+
contentType: string;
|
|
108
|
+
payload: string;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The question a message withdraws, and the new question when it replaces it;
|
|
112
|
+
* null when the message is neither a withdrawal nor a replacement.
|
|
113
|
+
*/
|
|
114
|
+
export declare function withdrawalOf({ contentType, payload }: Carried): {
|
|
115
|
+
questionId: string;
|
|
116
|
+
replacement: Question | null;
|
|
117
|
+
} | null;
|
|
118
|
+
/**
|
|
119
|
+
* The question a message to argo asks (a question, or the new question of a
|
|
120
|
+
* replacement), and its answer among argo's replies
|
|
121
|
+
* to it (the first answer naming the question); null when the message asks
|
|
122
|
+
* no question.
|
|
123
|
+
*/
|
|
124
|
+
export declare function inboxQuestionOf<T>({ message, replies, }: {
|
|
125
|
+
message: Carried;
|
|
126
|
+
replies: readonly (Carried & {
|
|
127
|
+
id: MessageId;
|
|
128
|
+
sentAt: T;
|
|
129
|
+
})[];
|
|
130
|
+
}): (Question & {
|
|
131
|
+
answer: {
|
|
132
|
+
messageId: MessageId;
|
|
133
|
+
sentAt: T;
|
|
134
|
+
option: number | null;
|
|
135
|
+
note: string | null;
|
|
136
|
+
} | null;
|
|
137
|
+
}) | null;
|
|
138
|
+
export {};
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { idSchema } from '../ids/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Questions to argo (decision 0038): a ship asks the operator by sending a
|
|
5
|
+
* message of the question content type to argo; the console answers it with a
|
|
6
|
+
* reply of the answer content type. Both payloads are data only: the fleet
|
|
7
|
+
* carries them as any message and never reads them; the console's server
|
|
8
|
+
* does. A question is open until argo
|
|
9
|
+
* sends its answer, whatever its delivery's state. The asking ship withdraws
|
|
10
|
+
* a question, or replaces it with a new one, by a message of its own content
|
|
11
|
+
* type naming the question's uuid.
|
|
12
|
+
*/
|
|
13
|
+
export const QUESTION_CONTENT_TYPE = 'application/vnd.aeolus.question+json';
|
|
14
|
+
export const ANSWER_CONTENT_TYPE = 'application/vnd.aeolus.answer+json';
|
|
15
|
+
export const WITHDRAWAL_CONTENT_TYPE = 'application/vnd.aeolus.question-withdrawal+json';
|
|
16
|
+
export const REPLACEMENT_CONTENT_TYPE = 'application/vnd.aeolus.question-replacement+json';
|
|
17
|
+
/** A content type's essence: media types compare without case and without their parameters (RFC 9110). */
|
|
18
|
+
function essenceOf(contentType) {
|
|
19
|
+
const [essence = ''] = contentType.split(';');
|
|
20
|
+
return essence.trim().toLowerCase();
|
|
21
|
+
}
|
|
22
|
+
export function isQuestionContentType(contentType) {
|
|
23
|
+
return essenceOf(contentType) === QUESTION_CONTENT_TYPE;
|
|
24
|
+
}
|
|
25
|
+
export function isAnswerContentType(contentType) {
|
|
26
|
+
return essenceOf(contentType) === ANSWER_CONTENT_TYPE;
|
|
27
|
+
}
|
|
28
|
+
export function isWithdrawalContentType(contentType) {
|
|
29
|
+
return essenceOf(contentType) === WITHDRAWAL_CONTENT_TYPE;
|
|
30
|
+
}
|
|
31
|
+
export function isReplacementContentType(contentType) {
|
|
32
|
+
return essenceOf(contentType) === REPLACEMENT_CONTENT_TYPE;
|
|
33
|
+
}
|
|
34
|
+
const FIRST_OPTION = 1;
|
|
35
|
+
/** An option's number, from 1. */
|
|
36
|
+
const optionKeySchema = z.int().min(FIRST_OPTION);
|
|
37
|
+
const textSchema = z.string().min(1);
|
|
38
|
+
const optionSchema = z.object({ key: optionKeySchema, label: textSchema, detail: z.string() });
|
|
39
|
+
/** A question: its own uuid, a title, the context to answer from, numbered options, and the asker's pick and why. */
|
|
40
|
+
export const questionSchema = z
|
|
41
|
+
.object({
|
|
42
|
+
id: z.uuid(),
|
|
43
|
+
title: textSchema,
|
|
44
|
+
context: z.string(),
|
|
45
|
+
options: z.array(optionSchema).min(1),
|
|
46
|
+
pick: z.object({ option: optionKeySchema, why: textSchema }),
|
|
47
|
+
})
|
|
48
|
+
.refine(({ options }) => new Set(options.map(({ key }) => key)).size === options.length, {
|
|
49
|
+
message: 'Every option has its own number',
|
|
50
|
+
path: ['options'],
|
|
51
|
+
})
|
|
52
|
+
.refine(({ options, pick }) => options.some(({ key }) => key === pick.option), {
|
|
53
|
+
message: 'The pick names one of the options',
|
|
54
|
+
path: ['pick', 'option'],
|
|
55
|
+
});
|
|
56
|
+
/** A withdrawal: the uuid of the question the asker withdraws. */
|
|
57
|
+
export const withdrawalSchema = z.object({ questionId: z.uuid() });
|
|
58
|
+
/** A replacement: the uuid of the question the asker replaces, and the new question, with a uuid of its own. */
|
|
59
|
+
export const replacementSchema = z
|
|
60
|
+
.object({ questionId: z.uuid(), question: questionSchema })
|
|
61
|
+
.refine(({ questionId, question }) => question.id !== questionId, {
|
|
62
|
+
message: 'The new question has a uuid of its own',
|
|
63
|
+
path: ['question', 'id'],
|
|
64
|
+
});
|
|
65
|
+
/** What the operator answers: one option and an optional note, or a note alone (more context needed, or none of the options). */
|
|
66
|
+
export const answerChoiceSchema = z.union([
|
|
67
|
+
z.object({ option: optionKeySchema, note: textSchema.optional() }),
|
|
68
|
+
z.object({ note: textSchema }),
|
|
69
|
+
]);
|
|
70
|
+
/** An answer: the question's uuid, and one option plus an optional note, or a note alone. */
|
|
71
|
+
export const answerSchema = z.union([
|
|
72
|
+
z.object({ questionId: z.uuid(), option: optionKeySchema, note: textSchema.optional() }),
|
|
73
|
+
z.object({ questionId: z.uuid(), note: textSchema }),
|
|
74
|
+
]);
|
|
75
|
+
/** The answer a question in argo's inbox has: the reply that carries it, when, and what it says. */
|
|
76
|
+
export const inboxAnswerSchema = z.object({
|
|
77
|
+
messageId: idSchema('message'),
|
|
78
|
+
sentAt: z.iso.datetime(),
|
|
79
|
+
option: optionKeySchema.nullable(),
|
|
80
|
+
note: z.string().nullable(),
|
|
81
|
+
});
|
|
82
|
+
/** A question in argo's inbox, with its answer; null while it is open. */
|
|
83
|
+
export const inboxQuestionSchema = z.object({
|
|
84
|
+
id: z.uuid(),
|
|
85
|
+
title: z.string(),
|
|
86
|
+
context: z.string(),
|
|
87
|
+
options: z.array(optionSchema),
|
|
88
|
+
pick: z.object({ option: optionKeySchema, why: z.string() }),
|
|
89
|
+
answer: inboxAnswerSchema.nullable(),
|
|
90
|
+
});
|
|
91
|
+
/** A payload as JSON; undefined when it is not JSON. */
|
|
92
|
+
function jsonOf(payload) {
|
|
93
|
+
try {
|
|
94
|
+
return JSON.parse(payload);
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
return undefined;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/** The question a message asks: a question's payload, or the new question a replacement carries; null for any other message. */
|
|
101
|
+
function questionOf({ contentType, payload }) {
|
|
102
|
+
if (isQuestionContentType(contentType)) {
|
|
103
|
+
const question = questionSchema.safeParse(jsonOf(payload));
|
|
104
|
+
return question.success ? question.data : null;
|
|
105
|
+
}
|
|
106
|
+
if (isReplacementContentType(contentType)) {
|
|
107
|
+
const replacement = replacementSchema.safeParse(jsonOf(payload));
|
|
108
|
+
return replacement.success ? replacement.data.question : null;
|
|
109
|
+
}
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* The question a message withdraws, and the new question when it replaces it;
|
|
114
|
+
* null when the message is neither a withdrawal nor a replacement.
|
|
115
|
+
*/
|
|
116
|
+
export function withdrawalOf({ contentType, payload }) {
|
|
117
|
+
if (isWithdrawalContentType(contentType)) {
|
|
118
|
+
const withdrawal = withdrawalSchema.safeParse(jsonOf(payload));
|
|
119
|
+
return withdrawal.success ? { questionId: withdrawal.data.questionId, replacement: null } : null;
|
|
120
|
+
}
|
|
121
|
+
if (isReplacementContentType(contentType)) {
|
|
122
|
+
const replacement = replacementSchema.safeParse(jsonOf(payload));
|
|
123
|
+
return replacement.success ? { questionId: replacement.data.questionId, replacement: replacement.data.question } : null;
|
|
124
|
+
}
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* The question a message to argo asks (a question, or the new question of a
|
|
129
|
+
* replacement), and its answer among argo's replies
|
|
130
|
+
* to it (the first answer naming the question); null when the message asks
|
|
131
|
+
* no question.
|
|
132
|
+
*/
|
|
133
|
+
export function inboxQuestionOf({ message, replies, }) {
|
|
134
|
+
const question = questionOf(message);
|
|
135
|
+
if (question === null) {
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
for (const reply of replies) {
|
|
139
|
+
const answer = isAnswerContentType(reply.contentType) ? answerSchema.safeParse(jsonOf(reply.payload)) : undefined;
|
|
140
|
+
if (answer?.success === true && answer.data.questionId === question.id) {
|
|
141
|
+
return {
|
|
142
|
+
...question,
|
|
143
|
+
answer: {
|
|
144
|
+
messageId: reply.id,
|
|
145
|
+
sentAt: reply.sentAt,
|
|
146
|
+
option: 'option' in answer.data ? answer.data.option : null,
|
|
147
|
+
note: answer.data.note ?? null,
|
|
148
|
+
},
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return { ...question, answer: null };
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=question.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"question.js","sourceRoot":"","sources":["../../src/schemas/question.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAkB,MAAM,iBAAiB,CAAC;AAE3D;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,sCAAsC,CAAC;AAC5E,MAAM,CAAC,MAAM,mBAAmB,GAAG,oCAAoC,CAAC;AACxE,MAAM,CAAC,MAAM,uBAAuB,GAAG,iDAAiD,CAAC;AACzF,MAAM,CAAC,MAAM,wBAAwB,GAAG,kDAAkD,CAAC;AAE3F,0GAA0G;AAC1G,SAAS,SAAS,CAAC,WAAmB;IACpC,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9C,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,WAAmB;IACvD,OAAO,SAAS,CAAC,WAAW,CAAC,KAAK,qBAAqB,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,WAAmB;IACrD,OAAO,SAAS,CAAC,WAAW,CAAC,KAAK,mBAAmB,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,WAAmB;IACzD,OAAO,SAAS,CAAC,WAAW,CAAC,KAAK,uBAAuB,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,WAAmB;IAC1D,OAAO,SAAS,CAAC,WAAW,CAAC,K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E,CAAC;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,MAAM,MAAM,GAAG,mBAAmB,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAClH,IAAI,MAAM,EAAE,OAAO,KAAK,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,KAAK,QAAQ,CAAC,EAAE,EAAE,CAAC;YACvE,OAAO;gBACL,GAAG,QAAQ;gBACX,MAAM,EAAE;oBACN,SAAS,EAAE,KAAK,CAAC,EAAE;oBACnB,MAAM,EAAE,KAAK,CAAC,MAAM;oBACpB,MAAM,EAAE,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI;oBAC3D,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI;iBAC/B;aACF,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,EAAE,GAAG,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AACvC,CAAC"}
|
package/dist/schemas/system.d.ts
CHANGED
|
@@ -5,3 +5,10 @@ export declare const pingOutputSchema: z.ZodObject<{
|
|
|
5
5
|
fleetCount: z.ZodInt;
|
|
6
6
|
}, z.core.$strip>;
|
|
7
7
|
export type PingOutput = z.infer<typeof pingOutputSchema>;
|
|
8
|
+
/** Output of `system.version`: the versions the server process runs and the latest migration applied to its database (null before the first). */
|
|
9
|
+
export declare const systemVersionOutputSchema: z.ZodObject<{
|
|
10
|
+
server: z.ZodString;
|
|
11
|
+
common: z.ZodString;
|
|
12
|
+
migration: z.ZodNullable<z.ZodString>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type SystemVersionOutput = z.infer<typeof systemVersionOutputSchema>;
|
package/dist/schemas/system.js
CHANGED
|
@@ -5,4 +5,10 @@ export const pingOutputSchema = z.object({
|
|
|
5
5
|
serverTime: z.iso.datetime(),
|
|
6
6
|
fleetCount: z.int().nonnegative(),
|
|
7
7
|
});
|
|
8
|
+
/** Output of `system.version`: the versions the server process runs and the latest migration applied to its database (null before the first). */
|
|
9
|
+
export const systemVersionOutputSchema = z.object({
|
|
10
|
+
server: z.string(),
|
|
11
|
+
common: z.string(),
|
|
12
|
+
migration: z.string().nullable(),
|
|
13
|
+
});
|
|
8
14
|
//# sourceMappingURL=system.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.js","sourceRoot":"","sources":["../../src/schemas/system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,0FAA0F;AAC1F,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,uBAAuB;IACvB,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;IAC5B,UAAU,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CAClC,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"system.js","sourceRoot":"","sources":["../../src/schemas/system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,0FAA0F;AAC1F,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,uBAAuB;IACvB,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;IAC5B,UAAU,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CAClC,CAAC,CAAC;AAIH,iJAAiJ;AACjJ,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeolus-fleet/common",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.23.0",
|
|
4
|
+
"description": "Shared schemas and ids for Aeolus packages.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"aeolus"
|
|
7
|
+
],
|
|
5
8
|
"license": "Apache-2.0",
|
|
6
9
|
"type": "module",
|
|
7
10
|
"sideEffects": false,
|