@cotal-ai/manager 0.85.0 → 0.87.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/commands.js +25 -11
- package/dist/commands.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/manager-service-contract.d.ts +7 -0
- package/dist/manager-service-contract.d.ts.map +1 -1
- package/dist/manager-service-contract.js +13 -35
- package/dist/manager-service-contract.js.map +1 -1
- package/dist/manager.d.ts +60 -12
- package/dist/manager.d.ts.map +1 -1
- package/dist/manager.js +376 -45
- package/dist/manager.js.map +1 -1
- package/dist/resume.d.ts +110 -0
- package/dist/resume.d.ts.map +1 -1
- package/dist/resume.js +57 -1
- package/dist/resume.js.map +1 -1
- package/dist/static-lifecycle.d.ts +2 -2
- package/dist/static-lifecycle.js +2 -2
- package/package.json +12 -12
package/dist/resume.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
1
2
|
import type { ManagerResumeInventory } from "./manager.js";
|
|
2
3
|
export declare const MAX_RESUME_CONTROL_BYTES: number;
|
|
3
4
|
export declare const MAX_RESUME_COMMIT_BYTES = 1024;
|
|
@@ -19,4 +20,113 @@ export declare function parseResumeFinalizeArgs(value: unknown): {
|
|
|
19
20
|
attemptId: string;
|
|
20
21
|
durableCommitToken: string;
|
|
21
22
|
};
|
|
23
|
+
/** What a successor manager needs to take back one seat this manager runs, should this manager's
|
|
24
|
+
* process end without stopping it: the seat's resume entry, and for a supervised seat the restart
|
|
25
|
+
* policy its spawn carried and the deaths already counted against it (#4094). One file per seat,
|
|
26
|
+
* written by the manager that runs it. The entry carries file references and digests only, never a
|
|
27
|
+
* secret value. */
|
|
28
|
+
declare const seatRecord: z.ZodObject<{
|
|
29
|
+
version: z.ZodLiteral<"cotal-seat-record/v1">;
|
|
30
|
+
instanceId: z.ZodString;
|
|
31
|
+
supervise: z.ZodOptional<z.ZodObject<{
|
|
32
|
+
restarts: z.ZodNumber;
|
|
33
|
+
windowMs: z.ZodNumber;
|
|
34
|
+
}, z.core.$strict>>;
|
|
35
|
+
crashes: z.ZodArray<z.ZodNumber>;
|
|
36
|
+
agent: z.ZodObject<{
|
|
37
|
+
space: z.ZodString;
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
role: z.ZodOptional<z.ZodString>;
|
|
40
|
+
identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
41
|
+
mode: z.ZodLiteral<"open">;
|
|
42
|
+
id: z.ZodString;
|
|
43
|
+
lifecycleUid: z.ZodString;
|
|
44
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
45
|
+
mode: z.ZodLiteral<"static">;
|
|
46
|
+
id: z.ZodString;
|
|
47
|
+
lifecycleUid: z.ZodString;
|
|
48
|
+
credential: z.ZodObject<{
|
|
49
|
+
kind: z.ZodLiteral<"file">;
|
|
50
|
+
path: z.ZodString;
|
|
51
|
+
sha256: z.ZodString;
|
|
52
|
+
}, z.core.$strict>;
|
|
53
|
+
issued: z.ZodOptional<z.ZodObject<{
|
|
54
|
+
generation: z.ZodString;
|
|
55
|
+
acceptedToken: z.ZodString;
|
|
56
|
+
}, z.core.$strict>>;
|
|
57
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
58
|
+
mode: z.ZodLiteral<"user">;
|
|
59
|
+
owner: z.ZodString;
|
|
60
|
+
actor: z.ZodString;
|
|
61
|
+
lifecycleUid: z.ZodString;
|
|
62
|
+
actorToken: z.ZodObject<{
|
|
63
|
+
kind: z.ZodLiteral<"file">;
|
|
64
|
+
path: z.ZodString;
|
|
65
|
+
sha256: z.ZodString;
|
|
66
|
+
}, z.core.$strict>;
|
|
67
|
+
sentinelCredential: z.ZodObject<{
|
|
68
|
+
kind: z.ZodLiteral<"file">;
|
|
69
|
+
path: z.ZodString;
|
|
70
|
+
sha256: z.ZodString;
|
|
71
|
+
}, z.core.$strict>;
|
|
72
|
+
health: z.ZodObject<{
|
|
73
|
+
kind: z.ZodLiteral<"file">;
|
|
74
|
+
path: z.ZodString;
|
|
75
|
+
}, z.core.$strict>;
|
|
76
|
+
}, z.core.$strict>], "mode">;
|
|
77
|
+
launch: z.ZodObject<{
|
|
78
|
+
connector: z.ZodString;
|
|
79
|
+
runtime: z.ZodString;
|
|
80
|
+
cwd: z.ZodString;
|
|
81
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
82
|
+
kind: z.ZodLiteral<"persona">;
|
|
83
|
+
ref: z.ZodString;
|
|
84
|
+
configPath: z.ZodString;
|
|
85
|
+
configSha256: z.ZodString;
|
|
86
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
87
|
+
kind: z.ZodLiteral<"manifest">;
|
|
88
|
+
runId: z.ZodString;
|
|
89
|
+
requested: z.ZodString;
|
|
90
|
+
hash: z.ZodString;
|
|
91
|
+
configPath: z.ZodString;
|
|
92
|
+
configSha256: z.ZodString;
|
|
93
|
+
manifestSha256: z.ZodString;
|
|
94
|
+
}, z.core.$strict>], "kind">;
|
|
95
|
+
model: z.ZodOptional<z.ZodString>;
|
|
96
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
97
|
+
subscribe: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
98
|
+
allowSubscribe: z.ZodArray<z.ZodString>;
|
|
99
|
+
allowPublish: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
100
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
101
|
+
events: z.ZodDefault<z.ZodBoolean>;
|
|
102
|
+
shareTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
103
|
+
forkSource: z.ZodOptional<z.ZodString>;
|
|
104
|
+
resumed: z.ZodOptional<z.ZodObject<{
|
|
105
|
+
source: z.ZodString;
|
|
106
|
+
title: z.ZodOptional<z.ZodString>;
|
|
107
|
+
transcriptSha256: z.ZodString;
|
|
108
|
+
}, z.core.$strict>>;
|
|
109
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
110
|
+
sessionStatePath: z.ZodOptional<z.ZodString>;
|
|
111
|
+
unresolvedLaunchOptionKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
112
|
+
}, z.core.$strict>;
|
|
113
|
+
dependencies: z.ZodArray<z.ZodString>;
|
|
114
|
+
spawner: z.ZodString;
|
|
115
|
+
authorityParent: z.ZodOptional<z.ZodString>;
|
|
116
|
+
startedAt: z.ZodString;
|
|
117
|
+
backfillFloor: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
}, z.core.$strict>;
|
|
119
|
+
}, z.core.$strict>;
|
|
120
|
+
export type SeatRecord = Omit<z.infer<typeof seatRecord>, "agent"> & {
|
|
121
|
+
agent: ManagerResumeInventory["agents"][number];
|
|
122
|
+
};
|
|
123
|
+
export declare function seatRecordPath(root: string, space: string, name: string): string;
|
|
124
|
+
/** Replace the record atomically, so a crash mid-write leaves the previous one. */
|
|
125
|
+
export declare function writeSeatRecord(root: string, record: SeatRecord): void;
|
|
126
|
+
/** Undefined when no record exists. A record that does not parse throws: it was written by this
|
|
127
|
+
* code, so a malformed one is damage to report, never a seat to skip silently. */
|
|
128
|
+
export declare function readSeatRecord(root: string, space: string, name: string): SeatRecord | undefined;
|
|
129
|
+
/** Remove the record of one incarnation. A record of another incarnation under the same name is left. */
|
|
130
|
+
export declare function removeSeatRecord(root: string, space: string, name: string, lifecycleUid: string): void;
|
|
131
|
+
export {};
|
|
22
132
|
//# sourceMappingURL=resume.d.ts.map
|
package/dist/resume.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resume.d.ts","sourceRoot":"","sources":["../src/resume.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resume.d.ts","sourceRoot":"","sources":["../src/resume.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EA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AAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAahG;AAED,yGAAyG;AACzG,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAWtG"}
|
package/dist/resume.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mkdirSync, readFileSync, rmSync } from "node:fs";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { parseShareSelection, writeSecretFileAtomic } from "@cotal-ai/core";
|
|
2
4
|
import { z } from "zod";
|
|
3
5
|
export const MAX_RESUME_CONTROL_BYTES = 512 * 1024;
|
|
4
6
|
export const MAX_RESUME_COMMIT_BYTES = 1024;
|
|
@@ -160,4 +162,58 @@ export function parseResumeCommitArgs(value) {
|
|
|
160
162
|
export function parseResumeFinalizeArgs(value) {
|
|
161
163
|
return parseBounded("finalizeResume", MAX_RESUME_COMMIT_BYTES, finalizeArgsSchema, value);
|
|
162
164
|
}
|
|
165
|
+
/** What a successor manager needs to take back one seat this manager runs, should this manager's
|
|
166
|
+
* process end without stopping it: the seat's resume entry, and for a supervised seat the restart
|
|
167
|
+
* policy its spawn carried and the deaths already counted against it (#4094). One file per seat,
|
|
168
|
+
* written by the manager that runs it. The entry carries file references and digests only, never a
|
|
169
|
+
* secret value. */
|
|
170
|
+
const seatRecord = z.strictObject({
|
|
171
|
+
version: z.literal("cotal-seat-record/v1"),
|
|
172
|
+
instanceId: z.string().min(1).max(256),
|
|
173
|
+
supervise: z.strictObject({ restarts: z.number().int().min(1), windowMs: z.number().int().min(1) }).optional(),
|
|
174
|
+
crashes: z.array(z.number().int().nonnegative()).max(1024),
|
|
175
|
+
agent,
|
|
176
|
+
});
|
|
177
|
+
export function seatRecordPath(root, space, name) {
|
|
178
|
+
return join(root, ".cotal", "seat-records", space, `${name}.json`);
|
|
179
|
+
}
|
|
180
|
+
/** Replace the record atomically, so a crash mid-write leaves the previous one. */
|
|
181
|
+
export function writeSeatRecord(root, record) {
|
|
182
|
+
const path = seatRecordPath(root, record.agent.space, record.agent.name);
|
|
183
|
+
mkdirSync(dirname(path), { recursive: true, mode: 0o700 });
|
|
184
|
+
writeSecretFileAtomic(path, `${JSON.stringify(seatRecord.parse(record))}\n`);
|
|
185
|
+
}
|
|
186
|
+
/** Undefined when no record exists. A record that does not parse throws: it was written by this
|
|
187
|
+
* code, so a malformed one is damage to report, never a seat to skip silently. */
|
|
188
|
+
export function readSeatRecord(root, space, name) {
|
|
189
|
+
const path = seatRecordPath(root, space, name);
|
|
190
|
+
let text;
|
|
191
|
+
try {
|
|
192
|
+
text = readFileSync(path, "utf8");
|
|
193
|
+
}
|
|
194
|
+
catch (e) {
|
|
195
|
+
if (e.code === "ENOENT")
|
|
196
|
+
return undefined;
|
|
197
|
+
throw e;
|
|
198
|
+
}
|
|
199
|
+
const parsed = seatRecord.safeParse(JSON.parse(text));
|
|
200
|
+
if (!parsed.success)
|
|
201
|
+
throw new Error(`seat record ${path}: ${parsed.error.issues.map((issue) => `${issue.path.join(".") || "<root>"}: ${issue.message}`).join("; ")}`);
|
|
202
|
+
return parsed.data;
|
|
203
|
+
}
|
|
204
|
+
/** Remove the record of one incarnation. A record of another incarnation under the same name is left. */
|
|
205
|
+
export function removeSeatRecord(root, space, name, lifecycleUid) {
|
|
206
|
+
const path = seatRecordPath(root, space, name);
|
|
207
|
+
let current;
|
|
208
|
+
try {
|
|
209
|
+
current = readSeatRecord(root, space, name);
|
|
210
|
+
}
|
|
211
|
+
catch {
|
|
212
|
+
// An unreadable record names no incarnation, so it cannot be another one's: remove it.
|
|
213
|
+
rmSync(path, { force: true });
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
if (current?.agent.identity.lifecycleUid === lifecycleUid)
|
|
217
|
+
rmSync(path, { force: true });
|
|
218
|
+
}
|
|
163
219
|
//# sourceMappingURL=resume.js.map
|
package/dist/resume.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resume.js","sourceRoot":"","sources":["../src/resume.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"resume.js","sourceRoot":"","sources":["../src/resume.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,GAAG,IAAI,CAAC;AACnD,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAC5C;;;8DAG8D;AAC9D,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,CAAC;AAC7B,MAAM,KAAK,GAAG,iBAAiB,CAAC;AAChC,MAAM,MAAM,GAAG,gBAAgB,CAAC;AAEhC,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,+BAA+B,CAAC,CAAC;AACvF,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,kBAAkB,EAAE,sBAAsB,CAAC,CAAC;AAC3F,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,kBAAkB,EAAE,8BAA8B,CAAC,CAAC;AACvG,M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AI,GAAG,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAC/C,IAAI,OAA+B,CAAC;IACpC,IAAI,CAAC;QACH,OAAO,GAAG,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAC9C,CAAC;IAAC,MAAM,CAAC;QACP,uFAAuF;QACvF,MAAM,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9B,OAAO;IACT,CAAC;IACD,IAAI,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,YAAY,KAAK,YAAY;QAAE,MAAM,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC3F,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* slot mapping (F3 outer spawn intent + the F5-bind alias -> (owner, actor, uid) join), the
|
|
6
6
|
* static credential-ledger rows, and the F1 terminal sequence.
|
|
7
7
|
*
|
|
8
|
-
* Three-way split
|
|
8
|
+
* Three-way split: the key/value GRAMMAR lives in core
|
|
9
9
|
* `lifecycle-state.ts`; the CAS SEQUENCING is the shared core saga this module DELEGATES to
|
|
10
10
|
* (never a hand-ordered local copy); the barrier ORCHESTRATION here is the static executor's
|
|
11
11
|
* own (revoke from the slot's recorded credentialIds, fail-closed broker connection eviction of the
|
|
@@ -153,7 +153,7 @@ export declare function activateStaticLifecycle(t: LifecycleStateTransport, args
|
|
|
153
153
|
* footprint teardown; on a normal stop the manager separately proves runtime exit) -> gate
|
|
154
154
|
* `frozen -> retired` -> head `retiring -> retired` LAST -> slot `retired` (the alias frees).
|
|
155
155
|
* Every gate/head step DELEGATES to the shared core saga; recovery recognizes a SAME-OP
|
|
156
|
-
* terminal gate and finishes the head (
|
|
156
|
+
* terminal gate and finishes the head (a lost ack otherwise wedges the alias).
|
|
157
157
|
*
|
|
158
158
|
* Total over partial durable state: an alias whose activation never reached the saga (slot
|
|
159
159
|
* `provisioning`, no gate) terminalizes by slot alone; a crashed activation frozen by its own
|
package/dist/static-lifecycle.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* slot mapping (F3 outer spawn intent + the F5-bind alias -> (owner, actor, uid) join), the
|
|
6
6
|
* static credential-ledger rows, and the F1 terminal sequence.
|
|
7
7
|
*
|
|
8
|
-
* Three-way split
|
|
8
|
+
* Three-way split: the key/value GRAMMAR lives in core
|
|
9
9
|
* `lifecycle-state.ts`; the CAS SEQUENCING is the shared core saga this module DELEGATES to
|
|
10
10
|
* (never a hand-ordered local copy); the barrier ORCHESTRATION here is the static executor's
|
|
11
11
|
* own (revoke from the slot's recorded credentialIds, fail-closed broker connection eviction of the
|
|
@@ -358,7 +358,7 @@ async function cleanupStaticSlotOnce(t, args, cleanup, log) {
|
|
|
358
358
|
* footprint teardown; on a normal stop the manager separately proves runtime exit) -> gate
|
|
359
359
|
* `frozen -> retired` -> head `retiring -> retired` LAST -> slot `retired` (the alias frees).
|
|
360
360
|
* Every gate/head step DELEGATES to the shared core saga; recovery recognizes a SAME-OP
|
|
361
|
-
* terminal gate and finishes the head (
|
|
361
|
+
* terminal gate and finishes the head (a lost ack otherwise wedges the alias).
|
|
362
362
|
*
|
|
363
363
|
* Total over partial durable state: an alias whose activation never reached the saga (slot
|
|
364
364
|
* `provisioning`, no gate) terminalizes by slot alone; a crashed activation frozen by its own
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cotal-ai/manager",
|
|
3
3
|
"description": "Cotal agent supervisor: spawns and manages mesh nodes via a pluggable runtime (pty/tmux/cmux/orca/herdr).",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.87.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@cotal-ai/core": "0.
|
|
22
|
-
"@cotal-ai/seat": "0.
|
|
23
|
-
"@cotal-ai/workspace": "0.
|
|
21
|
+
"@cotal-ai/core": "0.87.0",
|
|
22
|
+
"@cotal-ai/seat": "0.87.0",
|
|
23
|
+
"@cotal-ai/workspace": "0.87.0",
|
|
24
24
|
"@lydell/node-pty": "1.2.0-beta.12",
|
|
25
25
|
"@nats-io/jetstream": "^3.4.0",
|
|
26
26
|
"@nats-io/kv": "^3.4.0",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
"zod": "^4.4.3"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@cotal-ai/auth": "0.
|
|
39
|
-
"@cotal-ai/connector-claude-code": "0.
|
|
40
|
-
"@cotal-ai/connector-codex": "0.
|
|
38
|
+
"@cotal-ai/auth": "0.87.0",
|
|
39
|
+
"@cotal-ai/connector-claude-code": "0.87.0",
|
|
40
|
+
"@cotal-ai/connector-codex": "0.87.0",
|
|
41
41
|
"@cotal-ai/smoke-kit": "0.0.0",
|
|
42
|
-
"@cotal-ai/connector-core": "0.
|
|
43
|
-
"@cotal-ai/connector-hermes": "0.
|
|
44
|
-
"@cotal-ai/connector-opencode": "0.
|
|
45
|
-
"@cotal-ai/delivery": "0.
|
|
46
|
-
"@cotal-ai/runtime": "0.
|
|
42
|
+
"@cotal-ai/connector-core": "0.87.0",
|
|
43
|
+
"@cotal-ai/connector-hermes": "0.87.0",
|
|
44
|
+
"@cotal-ai/connector-opencode": "0.87.0",
|
|
45
|
+
"@cotal-ai/delivery": "0.87.0",
|
|
46
|
+
"@cotal-ai/runtime": "0.87.0",
|
|
47
47
|
"@nats-io/nats-core": "^3.4.0",
|
|
48
48
|
"@types/ws": "^8.18.1",
|
|
49
49
|
"esbuild": "^0.28.1"
|