@maiaos/cli 0.1.0-canary.62 → 0.1.0-canary.63
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/bin/maia.cdx.json +19 -19
- package/dist/bin/maia.mjs +1 -1
- package/dist/command-line/emit/rows.d.ts +1 -1
- package/dist/command-line/emit/rows.js +1 -3
- package/dist/session/output/human.js +1 -1
- package/dist/status/output/human.js +15 -5
- package/dist/terminal/output/human.js +1 -1
- package/package.json +4 -4
|
@@ -9,6 +9,6 @@ export type CliTable = {
|
|
|
9
9
|
readonly headers: readonly string[];
|
|
10
10
|
};
|
|
11
11
|
export declare const formatRows: <TValue>(items: readonly TValue[], format: (value: TValue) => string, text?: CliTable | string) => string;
|
|
12
|
-
export declare const withPrunedHistory: (text: string,
|
|
12
|
+
export declare const withPrunedHistory: (text: string, pruned: boolean) => string;
|
|
13
13
|
export declare const withNextPage: (text: string, nextCursor?: string) => string;
|
|
14
14
|
//# sourceMappingURL=rows.d.ts.map
|
|
@@ -42,8 +42,6 @@ export const formatRows = (items, format, text) => {
|
|
|
42
42
|
? align([text.headers, ...lines.map((line) => line.split("\t"))])
|
|
43
43
|
: `${lines.join("\n")}\n`;
|
|
44
44
|
};
|
|
45
|
-
export const withPrunedHistory = (text,
|
|
46
|
-
? text
|
|
47
|
-
: `earlier history pruned; oldest retained cursor ${oldest}\n${text}`;
|
|
45
|
+
export const withPrunedHistory = (text, pruned) => pruned ? `Earlier history was pruned.\n${text}` : text;
|
|
48
46
|
export const withNextPage = (text, nextCursor) => nextCursor === undefined ? text : `${text}next: --after ${nextCursor}\n`;
|
|
49
47
|
//# sourceMappingURL=rows.js.map
|
|
@@ -71,7 +71,7 @@ const formatLifecycle = ({ revision, sessionId, state, }) => `${fields([
|
|
|
71
71
|
const formatSessions = (result) => result.items.length === 0 ? "No Sessions.\n" : formatSessionList(result);
|
|
72
72
|
const formatInboxAck = ({ delivery, deliveryRecord, mailboxRevision, }) => `${tab([deliveryRecord.deliveryId, delivery, mailboxRevision])}\n`;
|
|
73
73
|
const formatMessageSend = ({ delivery, deliveryId, sequence, }) => `${tab([deliveryId, delivery, sequence])}\n`;
|
|
74
|
-
const formatEventsPage = ({ items, oldestRetainedCursor, }) => withPrunedHistory(formatSessionEvents(items), oldestRetainedCursor);
|
|
74
|
+
const formatEventsPage = ({ items, oldestRetainedCursor, }) => withPrunedHistory(formatSessionEvents(items), oldestRetainedCursor !== undefined);
|
|
75
75
|
export const formatSessionResult = (result) => {
|
|
76
76
|
switch (result.command) {
|
|
77
77
|
case "session.agent-permission.confirm":
|
|
@@ -75,14 +75,24 @@ const executorHostLines = (host) => {
|
|
|
75
75
|
userNamespaces[host.userNamespaces],
|
|
76
76
|
];
|
|
77
77
|
};
|
|
78
|
+
const days = (milliseconds) => {
|
|
79
|
+
const count = Math.floor(milliseconds / 86_400_000);
|
|
80
|
+
if (count < 1)
|
|
81
|
+
return "less than a day";
|
|
82
|
+
return count === 1 ? "1 day" : `${String(count)} days`;
|
|
83
|
+
};
|
|
78
84
|
const eventLines = (events) => events === undefined
|
|
79
85
|
? []
|
|
80
86
|
: [
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
(events.
|
|
87
|
+
...(events.oldestAgeMs === undefined
|
|
88
|
+
? []
|
|
89
|
+
: [`events: history reaches back ${days(events.oldestAgeMs)}`]),
|
|
90
|
+
...(events.excessBytes > 0
|
|
91
|
+
? [`events: ${String(events.excessBytes)} bytes over the size limit`]
|
|
92
|
+
: []),
|
|
93
|
+
...(events.checkpointBlocked === true
|
|
94
|
+
? ["events: checkpoint blocked"]
|
|
95
|
+
: []),
|
|
86
96
|
];
|
|
87
97
|
export const formatHumanStatus = ({ node }) => {
|
|
88
98
|
const lines = [
|
|
@@ -21,7 +21,7 @@ const formatTerminalEvent = (event) => {
|
|
|
21
21
|
}
|
|
22
22
|
return `${cell(event.cursor)}\t${cell(event.type)}`;
|
|
23
23
|
};
|
|
24
|
-
export const formatTerminalEvents = (result) => withPrunedHistory(formatRows(result.items, formatTerminalEvent), result.oldestRetainedCursor);
|
|
24
|
+
export const formatTerminalEvents = (result) => withPrunedHistory(formatRows(result.items, formatTerminalEvent), result.oldestRetainedCursor !== undefined);
|
|
25
25
|
export const formatTerminalRead = (result) => (result.gap === undefined
|
|
26
26
|
? ""
|
|
27
27
|
: `gap\t${result.gap.reason}\t${cell(result.gap.oldestAvailableCursor)}\n`) +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maiaos/cli",
|
|
3
|
-
"version": "0.1.0-canary.
|
|
3
|
+
"version": "0.1.0-canary.63",
|
|
4
4
|
"description": "The maia CLI and MCP server: start, drive, observe and stop swarms of Claude Code and Codex agents from a terminal, a script or another agent.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"maia",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@earendil-works/pi-tui": "1.0.0",
|
|
66
66
|
"@effect/platform-node-shared": "4.0.0",
|
|
67
|
-
"@maiaos/agent": "0.1.0-canary.
|
|
68
|
-
"@maiaos/client-core": "0.1.0-canary.
|
|
69
|
-
"@maiaos/sdk": "0.1.0-canary.
|
|
67
|
+
"@maiaos/agent": "0.1.0-canary.63",
|
|
68
|
+
"@maiaos/client-core": "0.1.0-canary.63",
|
|
69
|
+
"@maiaos/sdk": "0.1.0-canary.63",
|
|
70
70
|
"effect": "4.0.0"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|