@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
package/dist/rules/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* no schema. Common's schemas are built on the same rules, and the server
|
|
5
5
|
* stays the authority on submit.
|
|
6
6
|
*/
|
|
7
|
+
export * from './activity.js';
|
|
8
|
+
export * from './alert.js';
|
|
7
9
|
export * from './duration.js';
|
|
8
10
|
export * from './label-handle.js';
|
|
9
11
|
export * from './page-size.js';
|
package/dist/rules/index.js
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* no schema. Common's schemas are built on the same rules, and the server
|
|
5
5
|
* stays the authority on submit.
|
|
6
6
|
*/
|
|
7
|
+
export * from './activity.js';
|
|
8
|
+
export * from './alert.js';
|
|
7
9
|
export * from './duration.js';
|
|
8
10
|
export * from './label-handle.js';
|
|
9
11
|
export * from './page-size.js';
|
package/dist/rules/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC"}
|
package/dist/rules/payload.d.ts
CHANGED
package/dist/rules/payload.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A payload is at most
|
|
2
|
+
* A payload is at most 256 KB (decision 0006): a message carries a reference and an
|
|
3
3
|
* instruction, not the content itself.
|
|
4
4
|
*/
|
|
5
|
-
export const PAYLOAD_MAX_BYTES =
|
|
5
|
+
export const PAYLOAD_MAX_BYTES = 256 * 1024;
|
|
6
6
|
const utf8 = new TextEncoder();
|
|
7
7
|
/**
|
|
8
8
|
* The size of a payload serialized: the bytes of its text in UTF-8, as the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../src/rules/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../src/rules/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,GAAG,IAAI,CAAC;AAE5C,MAAM,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC;AAE/B;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;AACzC,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The kind of a session's latest event as its trierarch observes it
|
|
4
|
+
* (headless design, H14): text, a tool call, a tool result or an error. No
|
|
5
|
+
* content: the fleet holds none of a transcript.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ACTIVITY_KINDS: readonly ["text", "tool", "result", "error"];
|
|
8
|
+
export declare const activityKindSchema: z.ZodEnum<{
|
|
9
|
+
error: "error";
|
|
10
|
+
text: "text";
|
|
11
|
+
tool: "tool";
|
|
12
|
+
result: "result";
|
|
13
|
+
}>;
|
|
14
|
+
export type ActivityKind = z.infer<typeof activityKindSchema>;
|
|
15
|
+
/** The longest a tool call's tool name may be. */
|
|
16
|
+
export declare const ACTIVITY_TOOL_MAX_LENGTH = 100;
|
|
17
|
+
/** The most ships one `fleet.reportActivity` writes. */
|
|
18
|
+
export declare const ACTIVITY_SHIPS_MAX = 100;
|
|
19
|
+
/** The longest report interval a trierarch may state, in seconds: a day. */
|
|
20
|
+
export declare const ACTIVITY_INTERVAL_MAX_SECONDS: number;
|
|
21
|
+
/**
|
|
22
|
+
* Input of `fleet.reportActivity` (crew:run): the report interval the
|
|
23
|
+
* trierarch writes at, in seconds, and per crewed ship it runs its session's
|
|
24
|
+
* latest event: when, its kind, and for a tool call the tool's name
|
|
25
|
+
* (docs/design/monitoring, 4.3).
|
|
26
|
+
*/
|
|
27
|
+
export declare const reportActivityInputSchema: z.ZodObject<{
|
|
28
|
+
intervalSeconds: z.ZodInt;
|
|
29
|
+
activities: z.ZodArray<z.ZodObject<{
|
|
30
|
+
shipId: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
31
|
+
at: z.ZodISODateTime;
|
|
32
|
+
kind: z.ZodEnum<{
|
|
33
|
+
error: "error";
|
|
34
|
+
text: "text";
|
|
35
|
+
tool: "tool";
|
|
36
|
+
result: "result";
|
|
37
|
+
}>;
|
|
38
|
+
tool: z.ZodOptional<z.ZodString>;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
export type ReportActivityInput = z.infer<typeof reportActivityInputSchema>;
|
|
42
|
+
/**
|
|
43
|
+
* Output of `fleet.reportActivity`: the entries refused, each with its ship,
|
|
44
|
+
* the refusal's code and message; every other entry was taken.
|
|
45
|
+
*/
|
|
46
|
+
export declare const reportActivityOutputSchema: z.ZodObject<{
|
|
47
|
+
refused: z.ZodArray<z.ZodObject<{
|
|
48
|
+
shipId: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
49
|
+
code: z.ZodString;
|
|
50
|
+
message: z.ZodString;
|
|
51
|
+
}, z.core.$strip>>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
export type ReportActivityOutput = z.infer<typeof reportActivityOutputSchema>;
|
|
54
|
+
/**
|
|
55
|
+
* A crewed ship's activity as the fleet shows it (ISO 8601 in UTC): its
|
|
56
|
+
* session's latest event, when its trierarch wrote it and the report interval
|
|
57
|
+
* it stated, so a reader tells when it reads unknown (`isActivityUnknown`).
|
|
58
|
+
*/
|
|
59
|
+
export declare const listedActivitySchema: z.ZodObject<{
|
|
60
|
+
at: z.ZodISODateTime;
|
|
61
|
+
kind: z.ZodEnum<{
|
|
62
|
+
error: "error";
|
|
63
|
+
text: "text";
|
|
64
|
+
tool: "tool";
|
|
65
|
+
result: "result";
|
|
66
|
+
}>;
|
|
67
|
+
tool: z.ZodNullable<z.ZodString>;
|
|
68
|
+
reportedAt: z.ZodISODateTime;
|
|
69
|
+
intervalSeconds: z.ZodInt;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
export type ListedActivity = z.infer<typeof listedActivitySchema>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { idSchema } from '../ids/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* The kind of a session's latest event as its trierarch observes it
|
|
5
|
+
* (headless design, H14): text, a tool call, a tool result or an error. No
|
|
6
|
+
* content: the fleet holds none of a transcript.
|
|
7
|
+
*/
|
|
8
|
+
export const ACTIVITY_KINDS = ['text', 'tool', 'result', 'error'];
|
|
9
|
+
export const activityKindSchema = z.enum(ACTIVITY_KINDS);
|
|
10
|
+
/** The longest a tool call's tool name may be. */
|
|
11
|
+
export const ACTIVITY_TOOL_MAX_LENGTH = 100;
|
|
12
|
+
/** The most ships one `fleet.reportActivity` writes. */
|
|
13
|
+
export const ACTIVITY_SHIPS_MAX = 100;
|
|
14
|
+
/** The longest report interval a trierarch may state, in seconds: a day. */
|
|
15
|
+
export const ACTIVITY_INTERVAL_MAX_SECONDS = 24 * 60 * 60;
|
|
16
|
+
/**
|
|
17
|
+
* Input of `fleet.reportActivity` (crew:run): the report interval the
|
|
18
|
+
* trierarch writes at, in seconds, and per crewed ship it runs its session's
|
|
19
|
+
* latest event: when, its kind, and for a tool call the tool's name
|
|
20
|
+
* (docs/design/monitoring, 4.3).
|
|
21
|
+
*/
|
|
22
|
+
export const reportActivityInputSchema = z.object({
|
|
23
|
+
intervalSeconds: z.int().min(1).max(ACTIVITY_INTERVAL_MAX_SECONDS),
|
|
24
|
+
activities: z
|
|
25
|
+
.array(z.object({
|
|
26
|
+
shipId: idSchema('ship'),
|
|
27
|
+
at: z.iso.datetime(),
|
|
28
|
+
kind: activityKindSchema,
|
|
29
|
+
tool: z.string().trim().min(1).max(ACTIVITY_TOOL_MAX_LENGTH).optional(),
|
|
30
|
+
}))
|
|
31
|
+
.min(1)
|
|
32
|
+
.max(ACTIVITY_SHIPS_MAX),
|
|
33
|
+
});
|
|
34
|
+
/**
|
|
35
|
+
* Output of `fleet.reportActivity`: the entries refused, each with its ship,
|
|
36
|
+
* the refusal's code and message; every other entry was taken.
|
|
37
|
+
*/
|
|
38
|
+
export const reportActivityOutputSchema = z.object({
|
|
39
|
+
refused: z.array(z.object({ shipId: idSchema('ship'), code: z.string(), message: z.string() })),
|
|
40
|
+
});
|
|
41
|
+
/**
|
|
42
|
+
* A crewed ship's activity as the fleet shows it (ISO 8601 in UTC): its
|
|
43
|
+
* session's latest event, when its trierarch wrote it and the report interval
|
|
44
|
+
* it stated, so a reader tells when it reads unknown (`isActivityUnknown`).
|
|
45
|
+
*/
|
|
46
|
+
export const listedActivitySchema = z.object({
|
|
47
|
+
at: z.iso.datetime(),
|
|
48
|
+
kind: activityKindSchema,
|
|
49
|
+
tool: z.string().nullable(),
|
|
50
|
+
reportedAt: z.iso.datetime(),
|
|
51
|
+
intervalSeconds: z.int().min(1),
|
|
52
|
+
});
|
|
53
|
+
//# sourceMappingURL=activity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity.js","sourceRoot":"","sources":["../../src/schemas/activity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAC;AAC3E,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AAGzD,kDAAkD;AAClD,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAE5C,wDAAwD;AACxD,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAEtC,4EAA4E;AAC5E,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,eAAe,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,6BAA6B,CAAC;IACl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