@aeolus-fleet/common 0.27.1 → 0.28.1

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.
Files changed (40) hide show
  1. package/dist/fleet/index.d.ts +24 -4
  2. package/dist/fleet/index.js +40 -2
  3. package/dist/fleet/index.js.map +1 -1
  4. package/dist/ids/index.d.ts +3 -0
  5. package/dist/ids/index.js +2 -0
  6. package/dist/ids/index.js.map +1 -1
  7. package/dist/schemas/account-token.d.ts +49 -0
  8. package/dist/schemas/account-token.js +51 -0
  9. package/dist/schemas/account-token.js.map +1 -0
  10. package/dist/schemas/console.d.ts +8 -0
  11. package/dist/schemas/console.js +3 -1
  12. package/dist/schemas/console.js.map +1 -1
  13. package/dist/schemas/fleet.d.ts +29 -2
  14. package/dist/schemas/fleet.js +15 -4
  15. package/dist/schemas/fleet.js.map +1 -1
  16. package/dist/schemas/follow.d.ts +12 -0
  17. package/dist/schemas/history.d.ts +16 -1
  18. package/dist/schemas/history.js +4 -1
  19. package/dist/schemas/history.js.map +1 -1
  20. package/dist/schemas/index.d.ts +2 -0
  21. package/dist/schemas/index.js +2 -0
  22. package/dist/schemas/index.js.map +1 -1
  23. package/dist/schemas/installation.d.ts +12 -0
  24. package/dist/schemas/installation.js +14 -1
  25. package/dist/schemas/installation.js.map +1 -1
  26. package/dist/schemas/label.d.ts +19 -5
  27. package/dist/schemas/label.js +7 -2
  28. package/dist/schemas/label.js.map +1 -1
  29. package/dist/schemas/network.d.ts +398 -96
  30. package/dist/schemas/network.js +73 -55
  31. package/dist/schemas/network.js.map +1 -1
  32. package/dist/schemas/statement.d.ts +35 -1
  33. package/dist/schemas/statement.js +4 -1
  34. package/dist/schemas/statement.js.map +1 -1
  35. package/dist/schemas/verified-fact.d.ts +109 -0
  36. package/dist/schemas/verified-fact.js +57 -0
  37. package/dist/schemas/verified-fact.js.map +1 -0
  38. package/dist/trierarch/crew-settings.js +1 -1
  39. package/dist/trierarch/report-details.js +2 -2
  40. package/package.json +1 -3
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { idSchema } from '../ids/index.js';
3
+ import { accountIdSchema } from './account-token.js';
3
4
  import { carriedLabelSchema } from './label.js';
4
5
  /**
5
6
  * Network rules (decision 0034): which ships may send to, read or manage
@@ -8,7 +9,7 @@ import { carriedLabelSchema } from './label.js';
8
9
  * holds for every ship). Allow-only. The limits are the decision's; the server
9
10
  * checks them, so every refusal names it.
10
11
  */
11
- /** The most rules of argo's one fleet may hold, beside the rules its ships declared (decision 0037). */
12
+ /** The most rules of its own one fleet may hold, beside the rules its ships declared (decision 0037). */
12
13
  export const NETWORK_RULES_MAX = 200;
13
14
  /** The most rules one ship may declare (decision 0037). */
14
15
  export const DECLARED_NETWORK_RULES_MAX = 20;
@@ -39,62 +40,54 @@ export const labelSelectorSchema = z.array(selectorTermSchema);
39
40
  export const NETWORK_VERBS = ['send', 'read', 'manage'];
40
41
  /** One rule: the ships matching `from` may do its verb to the ships matching `to`. */
41
42
  export const networkRuleSchema = z.object({ verb: z.enum(NETWORK_VERBS), from: labelSelectorSchema, to: labelSelectorSchema });
42
- /** Input of `fleet.setNetworkRules` (fleet:network): every rule the fleet holds from now on beside the built-in ones. */
43
- export const setNetworkRulesInputSchema = z.object({ rules: z.array(networkRuleSchema) });
43
+ /** The fleet's own rules: the whole list, or none for all-to-all, open on (decision 0034). */
44
+ export const networkRulesSchema = z.array(networkRuleSchema).nullable();
45
+ /** Input of `fleet.saveNetworkRulesDraft` (fleet:network): the draft of the fleet's own rules, a whole list or none for all-to-all. */
46
+ export const saveNetworkRulesDraftInputSchema = z.object({ rules: networkRulesSchema });
47
+ /** Output of `fleet.saveNetworkRulesDraft`: the settings version the draft was saved against, which its apply names. */
48
+ export const saveNetworkRulesDraftOutputSchema = z.object({ savedAgainstVersion: z.int().min(0) });
49
+ /** Input of `fleet.applyNetworkRules` (fleet:network): the settings version the caller saw the draft against; a moved one refuses the apply. */
50
+ export const applyNetworkRulesInputSchema = z.object({ version: z.int().min(0) });
51
+ /**
52
+ * Output of `fleet.networkRules` (fleet:network): the applied rules at the
53
+ * settings version, none for a fleet that never set any, and the draft, with
54
+ * when it was saved and against which version, or none.
55
+ */
56
+ export const networkRulesOutputSchema = z.object({
57
+ applied: z.object({ rules: networkRulesSchema, version: z.int().min(0) }),
58
+ draft: z.object({ rules: networkRulesSchema, savedAt: z.iso.datetime(), savedAgainstVersion: z.int().min(0) }).nullable(),
59
+ });
60
+ /** Output of `fleet.discardNetworkRulesDraft`. */
61
+ export const discardNetworkRulesDraftOutputSchema = z.object({});
44
62
  /**
45
63
  * The built-in rules, core's own (decision 0034): argo to and from every ship,
46
64
  * the owner's ship to the ships it owns, an answer to the sender of the
47
65
  * message it answers, and a connected plugin's ship reading every ship, which
48
66
  * are never off; the viewer reading every ship,
49
- * which argo turns off or on; and open, every ship to every ship, one per
50
- * verb, which the networking plugin turns off or on.
67
+ * which an actor holding fleet:network turns off or on; the installation
68
+ * managing person ships and the ships they own, never off (decision 0020); and
69
+ * open, every ship to every ship by every verb, on exactly while the fleet has
70
+ * no rules applied.
51
71
  */
52
- export const BUILT_IN_RULES = ['argo', 'owner', 'answer', 'pluginRead', 'viewerRead', 'open'];
72
+ export const BUILT_IN_RULES = ['argo', 'owner', 'answer', 'pluginRead', 'viewerRead', 'installation', 'open'];
53
73
  /** The built-in rules that are never off. */
54
- export const FIXED_BUILT_IN_RULES = ['argo', 'owner', 'answer', 'pluginRead'];
55
- /** Input of `fleet.setBuiltInRule` (fleet:network): a built-in rule turned on or off, open for one verb, which it names and no other rule does. */
56
- export const setBuiltInRuleInputSchema = z
57
- .object({ rule: z.enum(BUILT_IN_RULES), verb: z.enum(NETWORK_VERBS).optional(), isOn: z.boolean() })
58
- .refine((input) => (input.rule === 'open') === (input.verb !== undefined), { message: 'open names its verb, and no other built-in rule names one', path: ['verb'] });
59
- /**
60
- * One built-in rule as it is now: open for one verb, which it names and no
61
- * other rule does, and whether it is on; the fixed ones always are.
62
- */
63
- export const builtInRuleStateSchema = z.union([
64
- z.object({ rule: z.enum(['argo', 'owner', 'answer', 'pluginRead', 'viewerRead']), isOn: z.boolean() }),
65
- z.object({ rule: z.literal('open'), verb: z.enum(NETWORK_VERBS), isOn: z.boolean() }),
66
- ]);
74
+ export const FIXED_BUILT_IN_RULES = ['argo', 'owner', 'answer', 'pluginRead', 'installation'];
75
+ /** Input of `fleet.setBuiltInRule` (fleet:network): a built-in rule turned on or off; the server turns only the viewer reading. */
76
+ export const setBuiltInRuleInputSchema = z.object({ rule: z.enum(BUILT_IN_RULES), isOn: z.boolean() });
77
+ /** One built-in rule as it is now, and whether it is on; the fixed ones always are. */
78
+ export const builtInRuleStateSchema = z.object({ rule: z.enum(BUILT_IN_RULES), isOn: z.boolean() });
67
79
  /** Output of `fleet.builtInRules` (fleet:network): every built-in rule as it is now, in the order the rule list shows them, first (decision 0034). */
68
80
  export const builtInRulesOutputSchema = z.array(builtInRuleStateSchema);
69
- /**
70
- * Output of `fleet.networkPlugin` (fleet:read): the fleet's networking plugin,
71
- * its ship and when it registered, or null without one (decision 0035). The
72
- * gateway reads it before it switches on for a fleet (interop I-3).
73
- */
74
- export const networkPluginOutputSchema = z.object({ shipId: idSchema('ship'), registeredAt: z.iso.datetime() }).nullable();
75
- /** Output of `fleet.setNetworkRules`: the version the fleet's network settings have now. */
76
- export const setNetworkRulesOutputSchema = z.object({ version: z.int().min(1) });
81
+ /** Output of `fleet.applyNetworkRules` and `fleet.setBuiltInRule`: the version the fleet's network settings have now. */
82
+ export const networkVersionOutputSchema = z.object({ version: z.int().min(0) });
77
83
  /** 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). */
78
84
  export const declareNetworkRulesInputSchema = z.object({ rules: z.array(networkRuleSchema) });
79
85
  /** Output of `fleet.declareNetworkRules`: how many rules the ship declares now. */
80
86
  export const declareNetworkRulesOutputSchema = z.object({ rules: z.int().min(0) });
81
- /** Output of `fleet.declaredNetworkRules` (fleet:network): each ship that declared rules, with its whole list. */
82
- export const declaredNetworkRulesOutputSchema = z.array(z.object({ shipId: idSchema('ship'), rules: z.array(networkRuleSchema) }));
83
- /**
84
- * What happens to sends while a fleet's networking plugin is unavailable
85
- * (decision 0035): every send refused but the fixed exceptions, every send
86
- * allowed, or the rules it supplied last kept.
87
- */
88
- export const WHILE_UNAVAILABLE = ['block-all', 'open-all', 'keep-latest'];
89
- /** The least time without a call from its ship after which a networking plugin is not responding: longer than a receive waits. */
90
- export const NETWORK_PLUGIN_NOT_RESPONDING_AFTER_MIN_SECONDS = 60;
91
- /** The most: a day. */
92
- export const NETWORK_PLUGIN_NOT_RESPONDING_AFTER_MAX_SECONDS = 86_400;
93
- /** Input of `fleet.registerNetworkPlugin` (fleet:network): what happens while the plugin is unavailable, and after how long without a call it is not responding. */
94
- export const registerNetworkPluginInputSchema = z.object({
95
- whileUnavailable: z.enum(WHILE_UNAVAILABLE),
96
- notRespondingAfterSeconds: z.int().min(NETWORK_PLUGIN_NOT_RESPONDING_AFTER_MIN_SECONDS).max(NETWORK_PLUGIN_NOT_RESPONDING_AFTER_MAX_SECONDS),
97
- });
87
+ /** Who declared network rules (decisions 0037, 0052): a ship, or the installation on the labels it owns. */
88
+ export const declarerSchema = z.discriminatedUnion('kind', [z.object({ kind: z.literal('ship'), shipId: idSchema('ship') }), z.object({ kind: z.literal('installation') })]);
89
+ /** Output of `fleet.declaredNetworkRules` (fleet:network): each declarer of rules, with its whole list. */
90
+ export const declaredNetworkRulesOutputSchema = z.array(z.object({ declarer: declarerSchema, rules: z.array(networkRuleSchema) }));
98
91
  /** A ship as a reach refusal saw it: its id, its name, the label values it carried then and its owner's ship then, none for argo and the viewer (decision 0045). */
99
92
  const refusedShipSchema = z.object({
100
93
  id: idSchema('ship'),
@@ -108,11 +101,26 @@ const refusedShipSchema = z.object({
108
101
  * (decision 0034). Any other call refuses it.
109
102
  */
110
103
  export const ON_BEHALF_OF_HEADER = 'aeolus-on-behalf-of';
111
- /** One refused send: who tried to reach whom by which verb, both ships as they were with their owners, the settings version that refused it and when. */
104
+ /**
105
+ * Who a refusal refused (decision 0057): a ship as it was; an account by
106
+ * its id only, never an email, with the `group` values its token carried
107
+ * that the fleet defines and its person ship then; or the installation.
108
+ */
109
+ const refusedActorSchema = z.discriminatedUnion('kind', [
110
+ refusedShipSchema.extend({ kind: z.literal('ship') }),
111
+ z.object({
112
+ kind: z.literal('account'),
113
+ accountId: accountIdSchema,
114
+ labels: z.array(carriedLabelSchema),
115
+ personShip: z.object({ id: idSchema('ship'), name: z.string() }).nullable(),
116
+ }),
117
+ z.object({ kind: z.literal('installation') }),
118
+ ]);
119
+ /** One refused call: who tried to reach whom by which verb, the actor and the ship as they were with their owners, the settings version that refused it and when. */
112
120
  export const reachRefusalSchema = z.object({
113
121
  id: idSchema('reachRefusal'),
114
122
  at: z.iso.datetime(),
115
- sender: refusedShipSchema,
123
+ sender: refusedActorSchema,
116
124
  /** The plugin ship that read on behalf of the sender (decision 0034), as it was then; null for the sender's own call. */
117
125
  askedBy: refusedShipSchema.nullable(),
118
126
  recipient: z.discriminatedUnion('kind', [
@@ -123,25 +131,35 @@ export const reachRefusalSchema = z.object({
123
131
  /** What the sender tried to do: send, the one verb checked so far. */
124
132
  verb: z.enum(NETWORK_VERBS),
125
133
  settingsVersion: z.int().min(1),
126
- /** What the plugin declared for while it is unavailable, when it refused because the plugin was not responding (decision 0035); null otherwise. */
127
- whilePluginUnavailable: z.enum(['block-all', 'keep-latest']).nullable(),
128
134
  });
129
135
  /** Output of `fleet.reachRefusals` (argo only): the fleet's latest refusals, newest first, at most REACH_REFUSALS_READ_MAX. */
130
136
  export const reachRefusalsOutputSchema = z.array(reachRefusalSchema);
131
- /** Input of `fleet.explainReach` (argo only): the ship to explain from, and the one ship asked about, or none for every ship. */
132
- export const explainReachInputSchema = z.object({ fromShipId: idSchema('ship'), toShipId: idSchema('ship').optional() });
137
+ /** Input of `fleet.explainReach` (fleet:explain): the ship to explain from, the one ship asked about or none for every ship, and the rules to explain against: the applied ones, or the draft. */
138
+ export const explainReachInputSchema = z.object({ fromShipId: idSchema('ship'), toShipId: idSchema('ship').optional(), against: z.enum(['applied', 'draft']).optional() });
133
139
  /**
134
140
  * The rule that lets one ship reach another (decision 0034): a built-in rule;
135
- * a rule the networking plugin supplied, by its place in the fleet's list;
136
- * or a rule a ship declared, by its declarer and its place in that ship's
137
- * list (decision 0037).
141
+ * one of the fleet's own rules, by its place in the fleet's list;
142
+ * or a declared rule, by its declarer, a ship or the installation, and its
143
+ * place in that declarer's list (decision 0037).
138
144
  */
139
145
  export const reachRuleSchema = z.union([
140
146
  z.object({ builtIn: z.enum(BUILT_IN_RULES) }),
141
- z.object({ plugin: z.int().min(0) }),
142
- z.object({ declared: idSchema('ship'), index: z.int().min(0) }),
147
+ z.object({ rule: z.int().min(0) }),
148
+ z.object({ declared: declarerSchema, index: z.int().min(0) }),
143
149
  ]);
144
150
  const reachedShipsSchema = z.array(z.object({ shipId: idSchema('ship'), rule: reachRuleSchema }));
145
151
  /** Output of `fleet.explainReach`: per verb, the ships it reaches now, each with the rule that allows it. */
146
152
  export const explainReachOutputSchema = z.object({ send: reachedShipsSchema, read: reachedShipsSchema, manage: reachedShipsSchema });
153
+ const reachChangesSchema = z.array(z.object({ fromShipId: idSchema('ship'), toShipId: idSchema('ship'), rule: reachRuleSchema }));
154
+ /**
155
+ * Output of `fleet.networkRulesDraftChanges` (fleet:network): per verb, the
156
+ * pairs of ships the caller reads whose reach the draft gains, each with the
157
+ * draft's rule that allows it, and loses, each with the applied rule that
158
+ * allows it now (decision 0034).
159
+ */
160
+ export const networkRulesDraftChangesOutputSchema = z.object({
161
+ send: z.object({ gained: reachChangesSchema, lost: reachChangesSchema }),
162
+ read: z.object({ gained: reachChangesSchema, lost: reachChangesSchema }),
163
+ manage: z.object({ gained: reachChangesSchema, lost: reachChangesSchema }),
164
+ });
147
165
  //# sourceMappingURL=network.js.map
@@ -1 +1 @@
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,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC;AAElI;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3D,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;IACxE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;IACxE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;CAC3E,CAAC,CAAC"}
@@ -126,7 +126,7 @@ export declare const discoveredStatementSchema: z.ZodNullable<z.ZodDiscriminated
126
126
  export type DiscoveredStatement = z.infer<typeof discoveredStatementSchema>;
127
127
  /**
128
128
  * Output of `discover` (messages:send): the ships the caller may send to now,
129
- * each with its name, type, kind, status and statement, and each type with
129
+ * each with its name, type, kind, status, statement and verified facts, and each type with
130
130
  * how many of its ships it reaches (decision 0047). Ships, never rules.
131
131
  */
132
132
  export declare const discoverOutputSchema: z.ZodObject<{
@@ -173,6 +173,40 @@ export declare const discoverOutputSchema: z.ZodObject<{
173
173
  by: z.ZodLiteral<"commission">;
174
174
  note: z.ZodString;
175
175
  }, z.core.$strip>], "by">>;
176
+ verified: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
177
+ checked: z.ZodEnum<{
178
+ clientIdDocumentDomain: "clientIdDocumentDomain";
179
+ tlsHost: "tlsHost";
180
+ a2aCardDomain: "a2aCardDomain";
181
+ }>;
182
+ value: z.ZodString;
183
+ by: z.ZodDiscriminatedUnion<[z.ZodObject<{
184
+ kind: z.ZodLiteral<"ship">;
185
+ id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
186
+ name: z.ZodString;
187
+ }, z.core.$strict>, z.ZodObject<{
188
+ kind: z.ZodLiteral<"account">;
189
+ id: z.core.$ZodBranded<z.ZodString, "AccountId", "out">;
190
+ }, z.core.$strict>, z.ZodObject<{
191
+ kind: z.ZodLiteral<"installation">;
192
+ }, z.core.$strict>], "kind">;
193
+ at: z.ZodISODateTime;
194
+ }, z.core.$strict>, z.ZodObject<{
195
+ checked: z.ZodLiteral<"oauthSubject">;
196
+ issuer: z.ZodString;
197
+ value: z.ZodString;
198
+ by: z.ZodDiscriminatedUnion<[z.ZodObject<{
199
+ kind: z.ZodLiteral<"ship">;
200
+ id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
201
+ name: z.ZodString;
202
+ }, z.core.$strict>, z.ZodObject<{
203
+ kind: z.ZodLiteral<"account">;
204
+ id: z.core.$ZodBranded<z.ZodString, "AccountId", "out">;
205
+ }, z.core.$strict>, z.ZodObject<{
206
+ kind: z.ZodLiteral<"installation">;
207
+ }, z.core.$strict>], "kind">;
208
+ at: z.ZodISODateTime;
209
+ }, z.core.$strict>], "checked">>;
176
210
  }, z.core.$strip>>;
177
211
  types: z.ZodArray<z.ZodObject<{
178
212
  type: z.ZodString;
@@ -2,6 +2,7 @@ import { z } from 'zod';
2
2
  import { shipKindSchema, shipStatusSchema } from '../fleet/index.js';
3
3
  import { idSchema } from '../ids/index.js';
4
4
  import { contentTypeSchema } from './message.js';
5
+ import { discoveredVerifiedFactSchema } from './verified-fact.js';
5
6
  /**
6
7
  * A ship's statement (decision 0047): what it is and what it offers, stated
7
8
  * by its crew and read by the ships that can send to it. A short summary and
@@ -97,7 +98,7 @@ export const discoveredStatementSchema = z
97
98
  .nullable();
98
99
  /**
99
100
  * Output of `discover` (messages:send): the ships the caller may send to now,
100
- * each with its name, type, kind, status and statement, and each type with
101
+ * each with its name, type, kind, status, statement and verified facts, and each type with
101
102
  * how many of its ships it reaches (decision 0047). Ships, never rules.
102
103
  */
103
104
  export const discoverOutputSchema = z.object({
@@ -108,6 +109,8 @@ export const discoverOutputSchema = z.object({
108
109
  kind: shipKindSchema,
109
110
  status: shipStatusSchema,
110
111
  statement: discoveredStatementSchema,
112
+ /** The facts actors checked about it, oldest first, each naming its writer (decision 0059). */
113
+ verified: z.array(discoveredVerifiedFactSchema),
111
114
  })),
112
115
  types: z.array(z.object({ type: z.string(), reachable: z.int().min(1) })),
113
116
  });
@@ -1 +1 @@
1
- {"version":3,"file":"statement.js","sourceRoot":"","sources":["../../src/schemas/statement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD;;;;;;;;;GASG;AAEH,2GAA2G;AAC3G,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,GAAG,IAAI,CAAC;AAE7C,gDAAgD;AAChD,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,CAAC;AAEjD,0FAA0F;AAC1F,MAAM,eAAe,GAAG,yBAAyB,CAAC;AAElD,MAAM,uBAAuB,GAAG,+EAA+E,CAAC;AAEhH,qFAAqF;AACrF,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AAExD,mHAAmH;AACnH,MAAM,CAAC,MAAM,sBAAsB,GAAG,OAAO,CAAC;AAE9C,oFAAoF;AACpF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAElE,oGAAoG;AACpG,M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EAAE,CAAC,CAAC;CAC1E,CAAC,CAAC"}
@@ -0,0 +1,109 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * A verified fact (decision 0059): what an actor checked about a ship, stored
4
+ * as its writer wrote it and shown beside the ship's statement in discovery,
5
+ * naming the writer. One fixed shape: what was checked, from a closed list,
6
+ * the value the check found, and the issuer only where a value means
7
+ * something under one. Core checks the shape and acts on none of it.
8
+ */
9
+ /**
10
+ * What a writer may have checked: the domain a client id document came from,
11
+ * the host a TLS certificate was valid for, the domain an A2A card came from,
12
+ * and the subject an OAuth issuer issued a credential to.
13
+ */
14
+ export declare const VERIFIED_CHECKS: readonly ["clientIdDocumentDomain", "tlsHost", "a2aCardDomain", "oauthSubject"];
15
+ export declare const verifiedCheckSchema: z.ZodEnum<{
16
+ clientIdDocumentDomain: "clientIdDocumentDomain";
17
+ tlsHost: "tlsHost";
18
+ a2aCardDomain: "a2aCardDomain";
19
+ oauthSubject: "oauthSubject";
20
+ }>;
21
+ export type VerifiedCheck = z.infer<typeof verifiedCheckSchema>;
22
+ /** The longest value a fact holds: a domain, a host or a subject. */
23
+ export declare const VERIFIED_FACT_VALUE_MAX_LENGTH = 255;
24
+ /** The longest issuer a fact names. */
25
+ export declare const VERIFIED_FACT_ISSUER_MAX_LENGTH = 2048;
26
+ /** The most facts one writer holds about one ship. */
27
+ export declare const VERIFIED_FACTS_MAX = 10;
28
+ /** One fact as its writer writes it: an OAuth subject with its issuer, every other check without one. */
29
+ export declare const verifiedFactSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
30
+ checked: z.ZodEnum<{
31
+ clientIdDocumentDomain: "clientIdDocumentDomain";
32
+ tlsHost: "tlsHost";
33
+ a2aCardDomain: "a2aCardDomain";
34
+ }>;
35
+ value: z.ZodString;
36
+ }, z.core.$strict>, z.ZodObject<{
37
+ checked: z.ZodLiteral<"oauthSubject">;
38
+ issuer: z.ZodString;
39
+ value: z.ZodString;
40
+ }, z.core.$strict>], "checked">;
41
+ export type VerifiedFact = z.infer<typeof verifiedFactSchema>;
42
+ /**
43
+ * Input of `fleet.setVerifiedFacts` (fleet:verify): the ship written about
44
+ * and the caller's facts about it, whole, each fact once; none withdraws
45
+ * them.
46
+ */
47
+ export declare const setVerifiedFactsInputSchema: z.ZodObject<{
48
+ shipId: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
49
+ facts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
50
+ checked: z.ZodEnum<{
51
+ clientIdDocumentDomain: "clientIdDocumentDomain";
52
+ tlsHost: "tlsHost";
53
+ a2aCardDomain: "a2aCardDomain";
54
+ }>;
55
+ value: z.ZodString;
56
+ }, z.core.$strict>, z.ZodObject<{
57
+ checked: z.ZodLiteral<"oauthSubject">;
58
+ issuer: z.ZodString;
59
+ value: z.ZodString;
60
+ }, z.core.$strict>], "checked">>;
61
+ }, z.core.$strip>;
62
+ /** Output of `fleet.setVerifiedFacts`: nothing; the OK is the answer. */
63
+ export declare const setVerifiedFactsOutputSchema: z.ZodObject<{}, z.core.$strict>;
64
+ /** Who wrote a fact, as discovery names an actor (decision 0057): a ship by id and name, an account by its id only, or the installation. */
65
+ export declare const factWriterSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
66
+ kind: z.ZodLiteral<"ship">;
67
+ id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
68
+ name: z.ZodString;
69
+ }, z.core.$strict>, z.ZodObject<{
70
+ kind: z.ZodLiteral<"account">;
71
+ id: z.core.$ZodBranded<z.ZodString, "AccountId", "out">;
72
+ }, z.core.$strict>, z.ZodObject<{
73
+ kind: z.ZodLiteral<"installation">;
74
+ }, z.core.$strict>], "kind">;
75
+ export declare const discoveredVerifiedFactSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
76
+ checked: z.ZodEnum<{
77
+ clientIdDocumentDomain: "clientIdDocumentDomain";
78
+ tlsHost: "tlsHost";
79
+ a2aCardDomain: "a2aCardDomain";
80
+ }>;
81
+ value: z.ZodString;
82
+ by: z.ZodDiscriminatedUnion<[z.ZodObject<{
83
+ kind: z.ZodLiteral<"ship">;
84
+ id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
85
+ name: z.ZodString;
86
+ }, z.core.$strict>, z.ZodObject<{
87
+ kind: z.ZodLiteral<"account">;
88
+ id: z.core.$ZodBranded<z.ZodString, "AccountId", "out">;
89
+ }, z.core.$strict>, z.ZodObject<{
90
+ kind: z.ZodLiteral<"installation">;
91
+ }, z.core.$strict>], "kind">;
92
+ at: z.ZodISODateTime;
93
+ }, z.core.$strict>, z.ZodObject<{
94
+ checked: z.ZodLiteral<"oauthSubject">;
95
+ issuer: z.ZodString;
96
+ value: z.ZodString;
97
+ by: z.ZodDiscriminatedUnion<[z.ZodObject<{
98
+ kind: z.ZodLiteral<"ship">;
99
+ id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
100
+ name: z.ZodString;
101
+ }, z.core.$strict>, z.ZodObject<{
102
+ kind: z.ZodLiteral<"account">;
103
+ id: z.core.$ZodBranded<z.ZodString, "AccountId", "out">;
104
+ }, z.core.$strict>, z.ZodObject<{
105
+ kind: z.ZodLiteral<"installation">;
106
+ }, z.core.$strict>], "kind">;
107
+ at: z.ZodISODateTime;
108
+ }, z.core.$strict>], "checked">;
109
+ export type DiscoveredVerifiedFact = z.infer<typeof discoveredVerifiedFactSchema>;
@@ -0,0 +1,57 @@
1
+ import { z } from 'zod';
2
+ import { idSchema } from '../ids/index.js';
3
+ import { accountIdSchema } from './account-token.js';
4
+ /**
5
+ * A verified fact (decision 0059): what an actor checked about a ship, stored
6
+ * as its writer wrote it and shown beside the ship's statement in discovery,
7
+ * naming the writer. One fixed shape: what was checked, from a closed list,
8
+ * the value the check found, and the issuer only where a value means
9
+ * something under one. Core checks the shape and acts on none of it.
10
+ */
11
+ /**
12
+ * What a writer may have checked: the domain a client id document came from,
13
+ * the host a TLS certificate was valid for, the domain an A2A card came from,
14
+ * and the subject an OAuth issuer issued a credential to.
15
+ */
16
+ export const VERIFIED_CHECKS = ['clientIdDocumentDomain', 'tlsHost', 'a2aCardDomain', 'oauthSubject'];
17
+ export const verifiedCheckSchema = z.enum(VERIFIED_CHECKS);
18
+ /** The longest value a fact holds: a domain, a host or a subject. */
19
+ export const VERIFIED_FACT_VALUE_MAX_LENGTH = 255;
20
+ /** The longest issuer a fact names. */
21
+ export const VERIFIED_FACT_ISSUER_MAX_LENGTH = 2048;
22
+ /** The most facts one writer holds about one ship. */
23
+ export const VERIFIED_FACTS_MAX = 10;
24
+ const valueSchema = z.string().min(1).max(VERIFIED_FACT_VALUE_MAX_LENGTH);
25
+ /** One fact as its writer writes it: an OAuth subject with its issuer, every other check without one. */
26
+ export const verifiedFactSchema = z.discriminatedUnion('checked', [
27
+ z.strictObject({ checked: z.enum(['clientIdDocumentDomain', 'tlsHost', 'a2aCardDomain']), value: valueSchema }),
28
+ z.strictObject({ checked: z.literal('oauthSubject'), issuer: z.string().min(1).max(VERIFIED_FACT_ISSUER_MAX_LENGTH), value: valueSchema }),
29
+ ]);
30
+ /** The same fact twice is the same check, issuer and value. */
31
+ function factKey(fact) {
32
+ return JSON.stringify([fact.checked, 'issuer' in fact ? fact.issuer : null, fact.value]);
33
+ }
34
+ /**
35
+ * Input of `fleet.setVerifiedFacts` (fleet:verify): the ship written about
36
+ * and the caller's facts about it, whole, each fact once; none withdraws
37
+ * them.
38
+ */
39
+ export const setVerifiedFactsInputSchema = z.object({
40
+ shipId: idSchema('ship'),
41
+ facts: z
42
+ .array(verifiedFactSchema)
43
+ .max(VERIFIED_FACTS_MAX, `A writer holds at most ${String(VERIFIED_FACTS_MAX)} facts about a ship`)
44
+ .refine((facts) => new Set(facts.map(factKey)).size === facts.length, 'Each fact once'),
45
+ });
46
+ /** Output of `fleet.setVerifiedFacts`: nothing; the OK is the answer. */
47
+ export const setVerifiedFactsOutputSchema = z.strictObject({});
48
+ /** Who wrote a fact, as discovery names an actor (decision 0057): a ship by id and name, an account by its id only, or the installation. */
49
+ export const factWriterSchema = z.discriminatedUnion('kind', [
50
+ z.strictObject({ kind: z.literal('ship'), id: idSchema('ship'), name: z.string() }),
51
+ z.strictObject({ kind: z.literal('account'), id: accountIdSchema }),
52
+ z.strictObject({ kind: z.literal('installation') }),
53
+ ]);
54
+ /** A fact as discovery shows it: as written, with its writer and when it was written. */
55
+ const writtenBy = { by: factWriterSchema, at: z.iso.datetime() };
56
+ export const discoveredVerifiedFactSchema = z.discriminatedUnion('checked', [verifiedFactSchema.options[0].extend(writtenBy), verifiedFactSchema.options[1].extend(writtenBy)]);
57
+ //# sourceMappingURL=verified-fact.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verified-fact.js","sourceRoot":"","sources":["../../src/schemas/verified-fact.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;AAErD;;;;;;GAMG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,wBAAwB,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,CAAU,CAAC;AAC/G,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AAG3D,qEAAqE;AACrE,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAElD,uCAAuC;AACvC,MAAM,CAAC,MAAM,+BAA+B,GAAG,IAAI,CAAC;AAEpD,sDAAsD;AACtD,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAErC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,8BAA8B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AAM,4BAA4B,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AAE/D,4IAA4I;AAC5I,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAC3D,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;IACnF,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,eAAe,EAAE,CAAC;IACnE,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;CACpD,CAAC,CAAC;AAEH,yFAAyF;AACzF,MAAM,SAAS,GAAG,EAAE,EAAE,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC;AACjE,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,kBAAkB,CAAC,SAAS,EAAE,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC"}
@@ -37,7 +37,7 @@ export const crewSettingsSchema = z.strictObject({
37
37
  options: z.record(z.string(), z.json()),
38
38
  /**
39
39
  * The label values a machine carries every one of for the request to go to
40
- * it (#102; docs/trierarch.md, "Machine labels"): exact matches, AND. A
40
+ * it (#102; aeolus-fleet-trierarch's docs/trierarch.md, "Machine labels"): exact matches, AND. A
41
41
  * machine carries at most 20, so no more can match. None: any machine.
42
42
  */
43
43
  machineLabels: z.array(idSchema('labelValue')).max(SHIP_LABELS_MAX).optional(),
@@ -9,7 +9,7 @@ export const MACHINE_ARCH = ['arm64', 'amd64'];
9
9
  /** Where a trierarch runs its sessions: on the host or each in a container of its own (decision 0039). */
10
10
  export const SESSION_RUNTIMES = ['host', 'container'];
11
11
  /**
12
- * The details of a trierarch's report (docs/trierarch.md, "What a trierarch
12
+ * The details of a trierarch's report (aeolus-fleet-trierarch's docs/trierarch.md, "What a trierarch
13
13
  * reports"; decision 0028): what its machine can do, read from its local
14
14
  * configuration and what runs. The trierarch plugin places crew requests
15
15
  * from them. No entry per ship: each crew request carries its own status.
@@ -48,7 +48,7 @@ export const trierarchReportDetailsSchema = z.strictObject({
48
48
  orphans: z.array(z.strictObject({ repository: worktreeFolderNameSchema, name: worktreeFolderNameSchema })),
49
49
  /**
50
50
  * The machine it runs on, for the trierarch plugin to label its ship by
51
- * (docs/trierarch.md, "Machine labels"): an os or arch outside the known
51
+ * (aeolus-fleet-trierarch's docs/trierarch.md, "Machine labels"): an os or arch outside the known
52
52
  * ones is left out. None from a trierarch before 0.20.0.
53
53
  */
54
54
  machine: z.strictObject({ os: z.enum(MACHINE_OS).optional(), arch: z.enum(MACHINE_ARCH).optional() }).optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeolus-fleet/common",
3
- "version": "0.27.1",
3
+ "version": "0.28.1",
4
4
  "description": "Shared schemas and ids for Aeolus packages.",
5
5
  "keywords": [
6
6
  "aeolus"
@@ -18,12 +18,10 @@
18
18
  },
19
19
  "exports": {
20
20
  ".": {
21
- "@aeolus-fleet/source": "./src/index.ts",
22
21
  "types": "./dist/index.d.ts",
23
22
  "default": "./dist/index.js"
24
23
  },
25
24
  "./rules": {
26
- "@aeolus-fleet/source": "./src/rules/index.ts",
27
25
  "types": "./dist/rules/index.d.ts",
28
26
  "default": "./dist/rules/index.js"
29
27
  }