@agent-deck/backend 2.1.1 → 2.2.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.
- package/dist/.tsbuildinfo +1 -1
- package/dist/agent-run/adapter.d.ts +134 -0
- package/dist/agent-run/adapter.d.ts.map +1 -0
- package/dist/agent-run/adapter.js +70 -0
- package/dist/agent-run/adapter.js.map +1 -0
- package/dist/agent-run/claude-probe.d.ts +30 -0
- package/dist/agent-run/claude-probe.d.ts.map +1 -0
- package/dist/agent-run/claude-probe.js +85 -0
- package/dist/agent-run/claude-probe.js.map +1 -0
- package/dist/agent-run/claude.d.ts +49 -0
- package/dist/agent-run/claude.d.ts.map +1 -0
- package/dist/agent-run/claude.js +104 -0
- package/dist/agent-run/claude.js.map +1 -0
- package/dist/agent-run/codex.d.ts +86 -0
- package/dist/agent-run/codex.d.ts.map +1 -0
- package/dist/agent-run/codex.js +377 -0
- package/dist/agent-run/codex.js.map +1 -0
- package/dist/agent-run/cursor.d.ts +80 -0
- package/dist/agent-run/cursor.d.ts.map +1 -0
- package/dist/agent-run/cursor.js +462 -0
- package/dist/agent-run/cursor.js.map +1 -0
- package/dist/agent-run/index.d.ts +15 -0
- package/dist/agent-run/index.d.ts.map +1 -0
- package/dist/agent-run/index.js +31 -0
- package/dist/agent-run/index.js.map +1 -0
- package/dist/agent-run/muse.d.ts +134 -0
- package/dist/agent-run/muse.d.ts.map +1 -0
- package/dist/agent-run/muse.js +512 -0
- package/dist/agent-run/muse.js.map +1 -0
- package/dist/agent-run/provenance.d.ts +28 -0
- package/dist/agent-run/provenance.d.ts.map +1 -0
- package/dist/agent-run/provenance.js +118 -0
- package/dist/agent-run/provenance.js.map +1 -0
- package/dist/agent-run/records.d.ts +182 -0
- package/dist/agent-run/records.d.ts.map +1 -0
- package/dist/agent-run/records.js +359 -0
- package/dist/agent-run/records.js.map +1 -0
- package/dist/agent-run/service.d.ts +206 -0
- package/dist/agent-run/service.d.ts.map +1 -0
- package/dist/agent-run/service.js +503 -0
- package/dist/agent-run/service.js.map +1 -0
- package/dist/agent-run-api/auth.d.ts +22 -0
- package/dist/agent-run-api/auth.d.ts.map +1 -0
- package/dist/agent-run-api/auth.js +54 -0
- package/dist/agent-run-api/auth.js.map +1 -0
- package/dist/agent-run-api/finalization-store.d.ts +62 -0
- package/dist/agent-run-api/finalization-store.d.ts.map +1 -0
- package/dist/agent-run-api/finalization-store.js +126 -0
- package/dist/agent-run-api/finalization-store.js.map +1 -0
- package/dist/agent-run-api/git-finalize.d.ts +98 -0
- package/dist/agent-run-api/git-finalize.d.ts.map +1 -0
- package/dist/agent-run-api/git-finalize.js +639 -0
- package/dist/agent-run-api/git-finalize.js.map +1 -0
- package/dist/agent-run-api/host.d.ts +10 -0
- package/dist/agent-run-api/host.d.ts.map +1 -0
- package/dist/agent-run-api/host.js +27 -0
- package/dist/agent-run-api/host.js.map +1 -0
- package/dist/agent-run-api/run-index.d.ts +40 -0
- package/dist/agent-run-api/run-index.d.ts.map +1 -0
- package/dist/agent-run-api/run-index.js +69 -0
- package/dist/agent-run-api/run-index.js.map +1 -0
- package/dist/audit/store.d.ts +22 -3
- package/dist/audit/store.d.ts.map +1 -1
- package/dist/audit/store.js +67 -6
- package/dist/audit/store.js.map +1 -1
- package/dist/auth/client-grants.d.ts +28 -3
- package/dist/auth/client-grants.d.ts.map +1 -1
- package/dist/auth/client-grants.js +40 -10
- package/dist/auth/client-grants.js.map +1 -1
- package/dist/auth/hosted-mode.d.ts +2 -0
- package/dist/auth/hosted-mode.d.ts.map +1 -1
- package/dist/auth/hosted-mode.js +27 -1
- package/dist/auth/hosted-mode.js.map +1 -1
- package/dist/mcp-server.d.ts +6 -0
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +33 -0
- package/dist/mcp-server.js.map +1 -1
- package/dist/mcp-session-binding.d.ts +15 -0
- package/dist/mcp-session-binding.d.ts.map +1 -1
- package/dist/mcp-session-binding.js +29 -0
- package/dist/mcp-session-binding.js.map +1 -1
- package/dist/routes/agent-grants.d.ts.map +1 -1
- package/dist/routes/agent-grants.js +63 -1
- package/dist/routes/agent-grants.js.map +1 -1
- package/dist/routes/agent-runs.d.ts +40 -0
- package/dist/routes/agent-runs.d.ts.map +1 -0
- package/dist/routes/agent-runs.js +755 -0
- package/dist/routes/agent-runs.js.map +1 -0
- package/dist/routes/scope.d.ts.map +1 -1
- package/dist/routes/scope.js +7 -1
- package/dist/routes/scope.js.map +1 -1
- package/dist/routes/websocket.d.ts +31 -1
- package/dist/routes/websocket.d.ts.map +1 -1
- package/dist/routes/websocket.js +71 -52
- package/dist/routes/websocket.js.map +1 -1
- package/dist/scope/display.d.ts +8 -0
- package/dist/scope/display.d.ts.map +1 -1
- package/dist/scope/display.js +39 -0
- package/dist/scope/display.js.map +1 -1
- package/dist/scope/live-display-registry.d.ts +5 -0
- package/dist/scope/live-display-registry.d.ts.map +1 -1
- package/dist/scope/live-display-registry.js +3 -0
- package/dist/scope/live-display-registry.js.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +25 -13
- package/dist/server/index.js.map +1 -1
- package/dist/services/health-reprobe.d.ts +54 -0
- package/dist/services/health-reprobe.d.ts.map +1 -0
- package/dist/services/health-reprobe.js +145 -0
- package/dist/services/health-reprobe.js.map +1 -0
- package/dist/services/service-manager.d.ts +15 -0
- package/dist/services/service-manager.d.ts.map +1 -1
- package/dist/services/service-manager.js +39 -2
- package/dist/services/service-manager.js.map +1 -1
- package/dist/trusted-session/auth.d.ts +12 -1
- package/dist/trusted-session/auth.d.ts.map +1 -1
- package/dist/trusted-session/auth.js +1 -0
- package/dist/trusted-session/auth.js.map +1 -1
- package/dist/trusted-session/policy-hook.d.ts.map +1 -1
- package/dist/trusted-session/policy-hook.js +25 -9
- package/dist/trusted-session/policy-hook.js.map +1 -1
- package/dist/trusted-session/route-policy-registry.d.ts.map +1 -1
- package/dist/trusted-session/route-policy-registry.js +11 -0
- package/dist/trusted-session/route-policy-registry.js.map +1 -1
- package/package.json +13 -2
- package/static-ui/assets/{index-ynIby2JK.js → index-CnXSzXCn.js} +58 -58
- package/static-ui/index.html +1 -1
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.newRunId = newRunId;
|
|
7
|
+
exports.runsRoot = runsRoot;
|
|
8
|
+
exports.runPaths = runPaths;
|
|
9
|
+
exports.metaPathForLog = metaPathForLog;
|
|
10
|
+
exports.writeRunMeta = writeRunMeta;
|
|
11
|
+
exports.appendRunLogLine = appendRunLogLine;
|
|
12
|
+
exports.readRunMeta = readRunMeta;
|
|
13
|
+
exports.logEventSessionId = logEventSessionId;
|
|
14
|
+
exports.readRunLog = readRunLog;
|
|
15
|
+
exports.isProcessAlive = isProcessAlive;
|
|
16
|
+
exports.isRunPidAlive = isRunPidAlive;
|
|
17
|
+
exports.findReceiptDeckMismatch = findReceiptDeckMismatch;
|
|
18
|
+
exports.reconcileRunState = reconcileRunState;
|
|
19
|
+
exports.collectRunStatus = collectRunStatus;
|
|
20
|
+
exports.listRunInfos = listRunInfos;
|
|
21
|
+
/**
|
|
22
|
+
* Canonical run records for the host-local agent run service (NOT-400,
|
|
23
|
+
* NOT-402, NOT-479).
|
|
24
|
+
*
|
|
25
|
+
* One run is a directory holding `meta.json` (the run record) and
|
|
26
|
+
* `run.jsonl` (the normalized event log). Both the CLI and the backend read
|
|
27
|
+
* and write runs only through this module, so there is exactly one event
|
|
28
|
+
* history: the JSONL log. A `running` meta whose pid is no longer alive is
|
|
29
|
+
* reported as `died` so orchestrators never wait forever. Pid-reuse is
|
|
30
|
+
* mitigated by comparing `startedAt` with the process start time where `ps`
|
|
31
|
+
* is available.
|
|
32
|
+
*/
|
|
33
|
+
const node_child_process_1 = require("node:child_process");
|
|
34
|
+
const node_crypto_1 = require("node:crypto");
|
|
35
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
36
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
37
|
+
function newRunId() {
|
|
38
|
+
const stamp = new Date().toISOString().replace(/[-:]/g, '').replace(/\..+/, '');
|
|
39
|
+
return `run-${stamp}-${(0, node_crypto_1.randomBytes)(3).toString('hex')}`;
|
|
40
|
+
}
|
|
41
|
+
function runsRoot(homeDir) {
|
|
42
|
+
return node_path_1.default.join(homeDir, 'runs');
|
|
43
|
+
}
|
|
44
|
+
/** Default record location for `runId` under `homeDir`. */
|
|
45
|
+
function runPaths(homeDir, runId) {
|
|
46
|
+
const dir = node_path_1.default.join(runsRoot(homeDir), runId);
|
|
47
|
+
return { dir, metaPath: node_path_1.default.join(dir, 'meta.json'), logPath: node_path_1.default.join(dir, 'run.jsonl') };
|
|
48
|
+
}
|
|
49
|
+
/** meta.json always sits next to the log, whether the log path is default or custom. */
|
|
50
|
+
function metaPathForLog(logPath) {
|
|
51
|
+
return node_path_1.default.join(node_path_1.default.dirname(logPath), 'meta.json');
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Atomic run-record write: readers (`run status`, detach tests, orchestrators)
|
|
55
|
+
* poll meta.json while the run child rewrites it, and a plain writeFileSync
|
|
56
|
+
* truncates before writing — a concurrent read lands on empty/partial bytes
|
|
57
|
+
* and JSON.parse throws. Writing to a sibling temp file and renaming keeps
|
|
58
|
+
* every observed state a complete document (rename is atomic on POSIX and
|
|
59
|
+
* Windows). The pid suffix keeps the starter's and the child's temp files
|
|
60
|
+
* distinct when both target the same meta.json.
|
|
61
|
+
*/
|
|
62
|
+
function writeRunMeta(metaPath, meta) {
|
|
63
|
+
const tmpPath = `${metaPath}.tmp-${process.pid}`;
|
|
64
|
+
node_fs_1.default.writeFileSync(tmpPath, `${JSON.stringify(meta, null, 2)}\n`, 'utf8');
|
|
65
|
+
node_fs_1.default.renameSync(tmpPath, metaPath);
|
|
66
|
+
}
|
|
67
|
+
function appendRunLogLine(logPath, line) {
|
|
68
|
+
node_fs_1.default.appendFileSync(logPath, `${JSON.stringify(line)}\n`, 'utf8');
|
|
69
|
+
}
|
|
70
|
+
const RUN_META_STATES = ['running', 'ended', 'error', 'canceled', 'died'];
|
|
71
|
+
function readRunMeta(metaPath) {
|
|
72
|
+
let raw;
|
|
73
|
+
try {
|
|
74
|
+
raw = node_fs_1.default.readFileSync(metaPath, 'utf8');
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
return { ok: false, reason: 'unreadable', partial: {} };
|
|
78
|
+
}
|
|
79
|
+
let parsed;
|
|
80
|
+
try {
|
|
81
|
+
parsed = JSON.parse(raw);
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
return { ok: false, reason: 'invalid JSON', partial: {} };
|
|
85
|
+
}
|
|
86
|
+
if (!parsed || typeof parsed !== 'object') {
|
|
87
|
+
return { ok: false, reason: 'not an object', partial: {} };
|
|
88
|
+
}
|
|
89
|
+
const partial = parsed;
|
|
90
|
+
if (typeof partial.runId !== 'string' ||
|
|
91
|
+
typeof partial.deck !== 'string' ||
|
|
92
|
+
typeof partial.client !== 'string' ||
|
|
93
|
+
typeof partial.startedAt !== 'string' ||
|
|
94
|
+
!RUN_META_STATES.includes(partial.state)) {
|
|
95
|
+
return { ok: false, reason: 'missing required fields', partial };
|
|
96
|
+
}
|
|
97
|
+
return { ok: true, meta: partial };
|
|
98
|
+
}
|
|
99
|
+
function logEventSessionId(event) {
|
|
100
|
+
const value = event.sessionId;
|
|
101
|
+
return typeof value === 'string' && value ? value : null;
|
|
102
|
+
}
|
|
103
|
+
function readRunLog(logPath) {
|
|
104
|
+
const empty = {
|
|
105
|
+
exists: false,
|
|
106
|
+
events: [],
|
|
107
|
+
truncated: false,
|
|
108
|
+
lastTs: null,
|
|
109
|
+
lastSessionId: null,
|
|
110
|
+
sawEnd: false,
|
|
111
|
+
sawError: false,
|
|
112
|
+
sawCanceled: false,
|
|
113
|
+
lastResultSubtype: null,
|
|
114
|
+
};
|
|
115
|
+
let raw;
|
|
116
|
+
try {
|
|
117
|
+
raw = node_fs_1.default.readFileSync(logPath, 'utf8');
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
return empty;
|
|
121
|
+
}
|
|
122
|
+
empty.exists = true;
|
|
123
|
+
if (!raw) {
|
|
124
|
+
return empty;
|
|
125
|
+
}
|
|
126
|
+
const endsWithNewline = raw.endsWith('\n');
|
|
127
|
+
const chunks = raw.split('\n');
|
|
128
|
+
// A trailing newline leaves an empty final chunk that is not a line.
|
|
129
|
+
const lines = endsWithNewline ? chunks.slice(0, -1) : chunks;
|
|
130
|
+
for (let i = 0; i < lines.length; i += 1) {
|
|
131
|
+
const line = lines[i];
|
|
132
|
+
const isLast = i === lines.length - 1;
|
|
133
|
+
if (!line) {
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
let parsed;
|
|
137
|
+
try {
|
|
138
|
+
parsed = JSON.parse(line);
|
|
139
|
+
}
|
|
140
|
+
catch {
|
|
141
|
+
// Only the last chunk of a file without a trailing newline can be a
|
|
142
|
+
// torn write; anything else is a corrupt line. Both are skipped.
|
|
143
|
+
void isLast;
|
|
144
|
+
empty.truncated = true;
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
if (!parsed || typeof parsed !== 'object' || typeof parsed.t !== 'string') {
|
|
148
|
+
empty.truncated = true;
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
const event = parsed;
|
|
152
|
+
empty.events.push({ raw: line, event });
|
|
153
|
+
if (typeof event.ts === 'string' && event.ts) {
|
|
154
|
+
empty.lastTs = event.ts;
|
|
155
|
+
}
|
|
156
|
+
const sessionId = logEventSessionId(event);
|
|
157
|
+
if (sessionId) {
|
|
158
|
+
empty.lastSessionId = sessionId;
|
|
159
|
+
}
|
|
160
|
+
if (event.t === 'end') {
|
|
161
|
+
empty.sawEnd = true;
|
|
162
|
+
}
|
|
163
|
+
else if (event.t === 'error') {
|
|
164
|
+
empty.sawError = true;
|
|
165
|
+
}
|
|
166
|
+
else if (event.t === 'canceled') {
|
|
167
|
+
empty.sawCanceled = true;
|
|
168
|
+
}
|
|
169
|
+
else if (event.t === 'result') {
|
|
170
|
+
empty.lastResultSubtype = typeof event.subtype === 'string' ? event.subtype : '';
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return empty;
|
|
174
|
+
}
|
|
175
|
+
function isProcessAlive(pid) {
|
|
176
|
+
if (!Number.isFinite(pid) || pid <= 0) {
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
try {
|
|
180
|
+
process.kill(pid, 0);
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
catch {
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/** Best-effort process start time via `ps`; null when unavailable. */
|
|
188
|
+
function getProcessStartTime(pid) {
|
|
189
|
+
try {
|
|
190
|
+
const out = (0, node_child_process_1.execFileSync)('ps', ['-o', 'lstart=', '-p', String(pid)], {
|
|
191
|
+
encoding: 'utf8',
|
|
192
|
+
timeout: 2000,
|
|
193
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
194
|
+
}).trim();
|
|
195
|
+
if (!out) {
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
198
|
+
const parsed = new Date(out);
|
|
199
|
+
return Number.isNaN(parsed.getTime()) ? null : parsed;
|
|
200
|
+
}
|
|
201
|
+
catch {
|
|
202
|
+
return null;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* True when `pid` is alive and not obviously recycled: the runner process
|
|
207
|
+
* started before it wrote `startedAt`, so a live pid whose start time is
|
|
208
|
+
* well after `startedAt` must be a different process.
|
|
209
|
+
*/
|
|
210
|
+
function isRunPidAlive(pid, startedAt) {
|
|
211
|
+
if (!isProcessAlive(pid)) {
|
|
212
|
+
return false;
|
|
213
|
+
}
|
|
214
|
+
const procStart = getProcessStartTime(pid);
|
|
215
|
+
const runStart = new Date(startedAt);
|
|
216
|
+
if (!procStart || Number.isNaN(runStart.getTime())) {
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
219
|
+
// 2s tolerance for `ps` one-second resolution and clock skew.
|
|
220
|
+
return procStart.getTime() <= runStart.getTime() + 2000;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Session receipt check: the agent harness prints the bound deck as one
|
|
224
|
+
* `get_session_context` receipt line rendering `display_summary`
|
|
225
|
+
* (e.g. `◆ dev · 2 MCP · 0 keys · 1 playbooks`). Returns the mismatching deck
|
|
226
|
+
* token when the log positively shows a deck other than the requested one;
|
|
227
|
+
* a missing receipt is not a mismatch (the pre-start assignment gate is the
|
|
228
|
+
* fail-closed check; this is a second net for a mis-bound session).
|
|
229
|
+
* The fragments are joined before scanning: real clients stream token-level
|
|
230
|
+
* deltas, so one receipt line can arrive split across many text events and a
|
|
231
|
+
* per-fragment scan would miss the mismatch.
|
|
232
|
+
*/
|
|
233
|
+
function findReceiptDeckMismatch(texts, deck) {
|
|
234
|
+
const joined = texts.join('');
|
|
235
|
+
const pattern = /◆\s*([^·\r\n]+?)\s*·/g;
|
|
236
|
+
for (const match of joined.matchAll(pattern)) {
|
|
237
|
+
const token = match[1].trim();
|
|
238
|
+
if (token && token !== deck.name && token !== deck.id) {
|
|
239
|
+
return token;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return null;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Terminal state the canonical log proves for a run whose recorded owner is
|
|
246
|
+
* gone, or null when the log holds no terminal line. `ended` needs the same
|
|
247
|
+
* evidence the live run uses — an `end` after a `success` result and a
|
|
248
|
+
* receipt that names the run's deck — so a crash between the last log line
|
|
249
|
+
* and the meta write never reads as more successful than the run was.
|
|
250
|
+
*/
|
|
251
|
+
function terminalFromLog(meta, log) {
|
|
252
|
+
if (log.sawError) {
|
|
253
|
+
return 'error';
|
|
254
|
+
}
|
|
255
|
+
if (!log.sawEnd) {
|
|
256
|
+
return null;
|
|
257
|
+
}
|
|
258
|
+
if (log.lastResultSubtype !== 'success' || !meta.deckName) {
|
|
259
|
+
return 'error';
|
|
260
|
+
}
|
|
261
|
+
const texts = log.events.flatMap(({ event }) => (event.t === 'text' ? [event.text] : []));
|
|
262
|
+
return findReceiptDeckMismatch(texts, { id: meta.deck, name: meta.deckName }) ? 'error' : 'ended';
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Truthful state from the run record, the canonical log, and the recorded
|
|
266
|
+
* owner process (NOT-481). A `canceled` line is final whatever follows it; a
|
|
267
|
+
* recorded terminal state stands; a `running` record is `running` only while
|
|
268
|
+
* its owner lives, then whatever terminal state the log proves, else `died`.
|
|
269
|
+
* Launch acknowledgement and a missing process never read as success.
|
|
270
|
+
*/
|
|
271
|
+
function reconcileRunState(meta, log, isAlive = isRunPidAlive) {
|
|
272
|
+
if (log.sawCanceled || meta.state === 'canceled') {
|
|
273
|
+
return 'canceled';
|
|
274
|
+
}
|
|
275
|
+
if (meta.state !== 'running') {
|
|
276
|
+
return meta.state;
|
|
277
|
+
}
|
|
278
|
+
if (isAlive(meta.pid, meta.startedAt)) {
|
|
279
|
+
return 'running';
|
|
280
|
+
}
|
|
281
|
+
return terminalFromLog(meta, log) ?? 'died';
|
|
282
|
+
}
|
|
283
|
+
function collectRunStatus(runId, homeDir) {
|
|
284
|
+
const { metaPath, logPath } = runPaths(homeDir, runId);
|
|
285
|
+
if (!node_fs_1.default.existsSync(metaPath)) {
|
|
286
|
+
return { found: false };
|
|
287
|
+
}
|
|
288
|
+
const metaRead = readRunMeta(metaPath);
|
|
289
|
+
const log = readRunLog(logPath);
|
|
290
|
+
const warnings = [];
|
|
291
|
+
if (metaRead.ok) {
|
|
292
|
+
const meta = metaRead.meta;
|
|
293
|
+
const sessionId = typeof meta.sessionId === 'string' && meta.sessionId ? meta.sessionId : log.lastSessionId;
|
|
294
|
+
if (log.truncated) {
|
|
295
|
+
warnings.push(`truncated log line in ${logPath} (ignored)`);
|
|
296
|
+
}
|
|
297
|
+
return {
|
|
298
|
+
found: true,
|
|
299
|
+
corruptMeta: false,
|
|
300
|
+
warnings,
|
|
301
|
+
info: {
|
|
302
|
+
runId: meta.runId,
|
|
303
|
+
deck: meta.deck,
|
|
304
|
+
client: meta.client,
|
|
305
|
+
state: reconcileRunState(meta, log),
|
|
306
|
+
sessionId,
|
|
307
|
+
startedAt: meta.startedAt,
|
|
308
|
+
lastLogTs: log.lastTs,
|
|
309
|
+
logPath,
|
|
310
|
+
...(meta.resumedFrom ? { resumedFrom: meta.resumedFrom } : {}),
|
|
311
|
+
},
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
warnings.push(`meta.json is corrupt (${metaRead.reason}); showing log-derived info`);
|
|
315
|
+
if (log.truncated) {
|
|
316
|
+
warnings.push(`truncated log line in ${logPath} (ignored)`);
|
|
317
|
+
}
|
|
318
|
+
const partial = metaRead.partial;
|
|
319
|
+
return {
|
|
320
|
+
found: true,
|
|
321
|
+
corruptMeta: true,
|
|
322
|
+
warnings,
|
|
323
|
+
info: {
|
|
324
|
+
runId: typeof partial.runId === 'string' ? partial.runId : runId,
|
|
325
|
+
deck: typeof partial.deck === 'string' ? partial.deck : 'unknown',
|
|
326
|
+
client: typeof partial.client === 'string' ? partial.client : 'unknown',
|
|
327
|
+
state: 'error',
|
|
328
|
+
sessionId: (typeof partial.sessionId === 'string' && partial.sessionId ? partial.sessionId : null) ??
|
|
329
|
+
log.lastSessionId,
|
|
330
|
+
startedAt: typeof partial.startedAt === 'string' ? partial.startedAt : 'unknown',
|
|
331
|
+
lastLogTs: log.lastTs,
|
|
332
|
+
logPath,
|
|
333
|
+
},
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
function listRunInfos(homeDir, limit) {
|
|
337
|
+
let entries;
|
|
338
|
+
try {
|
|
339
|
+
entries = node_fs_1.default.readdirSync(runsRoot(homeDir));
|
|
340
|
+
}
|
|
341
|
+
catch {
|
|
342
|
+
return [];
|
|
343
|
+
}
|
|
344
|
+
const infos = [];
|
|
345
|
+
for (const runId of entries) {
|
|
346
|
+
const collected = collectRunStatus(runId, homeDir);
|
|
347
|
+
if (collected.found) {
|
|
348
|
+
infos.push(collected.info);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
infos.sort((a, b) => {
|
|
352
|
+
if (a.startedAt !== b.startedAt) {
|
|
353
|
+
return a.startedAt < b.startedAt ? 1 : -1;
|
|
354
|
+
}
|
|
355
|
+
return a.runId < b.runId ? 1 : -1;
|
|
356
|
+
});
|
|
357
|
+
return infos.slice(0, limit);
|
|
358
|
+
}
|
|
359
|
+
//# sourceMappingURL=records.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"records.js","sourceRoot":"","sources":["../../src/agent-run/records.ts"],"names":[],"mappings":";;;;;AA8FA,4BAGC;AAED,4BAEC;AAGD,4BAMC;AAGD,wCAEC;AAWD,oCAIC;AAED,4CAEC;AAQD,kCA2BC;AAoBD,8CAGC;AAED,gCAkEC;AAED,wCAUC;AAyBD,sCAWC;AAaD,0DAaC;AA8BD,8CAeC;AAMD,4CAsDC;AAED,oCAqBC;AA9cD;;;;;;;;;;;GAWG;AACH,2DAAkD;AAClD,6CAA0C;AAC1C,sDAAyB;AACzB,0DAA6B;AA+E7B,SAAgB,QAAQ;IACtB,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAChF,OAAO,OAAO,KAAK,IAAI,IAAA,yBAAW,EAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;AAC1D,CAAC;AAED,SAAgB,QAAQ,CAAC,OAAe;IACtC,OAAO,mBAAI,CAAC,IAAI,C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AC5B,MAAM,SAAS,GAAG,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACnD,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC;YACpB,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAClB,IAAI,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS,EAAE,CAAC;YAChC,OAAO,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5C,CAAC;QACD,OAAO,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { type ClientAdapter, type RunClient, type RunClientProfiles, type RunToolsProfile } from './adapter';
|
|
2
|
+
import { type ClaudeAdapterDeps } from './claude';
|
|
3
|
+
import { type ClaudeClientProbe } from './claude-probe';
|
|
4
|
+
import { type CodexAdapterDeps } from './codex';
|
|
5
|
+
import { type CursorAdapterDeps } from './cursor';
|
|
6
|
+
import { type MuseAdapterDeps } from './muse';
|
|
7
|
+
import { type CollectedStatus, type LogRead, type RunInspectState, type RunResumeOrigin, type RunStatusInfo } from './records';
|
|
8
|
+
/** Grace between SIGTERM and SIGKILL for a canceled run's process group. */
|
|
9
|
+
export declare const RUN_CANCEL_KILL_GRACE_MS = 5000;
|
|
10
|
+
/**
|
|
11
|
+
* Stop one run-owned process group: SIGTERM, then SIGKILL after a grace
|
|
12
|
+
* period. Never signals this process's own pid or a non-group id.
|
|
13
|
+
*/
|
|
14
|
+
export declare function defaultKillProcessGroup(pgid: number): void;
|
|
15
|
+
export type RunDeck = {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
};
|
|
19
|
+
/** The deck a working directory is assigned to; empty when unassigned. */
|
|
20
|
+
export type RunDeckBinding = {
|
|
21
|
+
deckId?: string;
|
|
22
|
+
deckName?: string;
|
|
23
|
+
};
|
|
24
|
+
export type RunAdapterDeps = {
|
|
25
|
+
claude?: ClaudeAdapterDeps;
|
|
26
|
+
codex?: CodexAdapterDeps;
|
|
27
|
+
cursor?: CursorAdapterDeps;
|
|
28
|
+
muse?: MuseAdapterDeps;
|
|
29
|
+
};
|
|
30
|
+
export type AgentRunServiceDeps = {
|
|
31
|
+
/** Agent Deck home; run records live under `<homeDir>/runs/<runId>/`. */
|
|
32
|
+
homeDir: string;
|
|
33
|
+
resolveDeck: (ref: string) => Promise<RunDeck | null>;
|
|
34
|
+
/** Read-only folder assignment lookup. The service never rewrites it. */
|
|
35
|
+
resolveDeckBinding: (cwd: string) => Promise<RunDeckBinding>;
|
|
36
|
+
/** Defaults to the real `claude auth status` probe. */
|
|
37
|
+
claudeProbe?: ClaudeClientProbe;
|
|
38
|
+
/** Process seams for the shipped adapters (spawn, probe, SDK loader, ...). */
|
|
39
|
+
adapters?: RunAdapterDeps;
|
|
40
|
+
/** Replaces adapter construction entirely (fixture adapters in tests). */
|
|
41
|
+
createAdapter?: (client: RunClient) => ClientAdapter;
|
|
42
|
+
/** Signals one run-owned process group (NOT-481); defaults to {@link defaultKillProcessGroup}. */
|
|
43
|
+
killProcessGroup?: (pgid: number) => void;
|
|
44
|
+
};
|
|
45
|
+
export type AgentRunRequest = {
|
|
46
|
+
/** Deck name or id as the caller named it; used in remedies. */
|
|
47
|
+
deckRef: string;
|
|
48
|
+
client: RunClient;
|
|
49
|
+
/** Absolute working directory on this host. */
|
|
50
|
+
cwd: string;
|
|
51
|
+
/** Brief text (already read from any file by the caller). */
|
|
52
|
+
prompt: string;
|
|
53
|
+
tools: RunToolsProfile;
|
|
54
|
+
/** Continue this client session id under a new run. */
|
|
55
|
+
resumeId?: string;
|
|
56
|
+
};
|
|
57
|
+
export type PreparedRun = {
|
|
58
|
+
request: AgentRunRequest;
|
|
59
|
+
deck: RunDeck;
|
|
60
|
+
/** Trusted origin of `request.resumeId`, when the client requires one. */
|
|
61
|
+
resumedFrom?: RunResumeOrigin;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Why a run failed closed before any model call. Stable for API mapping;
|
|
65
|
+
* the accompanying message stays CLI-worded for the terminal.
|
|
66
|
+
*/
|
|
67
|
+
export type AgentRunRejectionCode = 'prompt_empty' | 'cwd_not_found' | 'cwd_not_directory' | 'deck_not_found' | 'deck_unassigned' | 'deck_mismatch' | 'client_unavailable' | 'profile_unsupported' | 'resume_unverified' | 'finalization_invalid' | 'index_dirty';
|
|
68
|
+
export type AgentRunValidation = {
|
|
69
|
+
ok: true;
|
|
70
|
+
deck: RunDeck;
|
|
71
|
+
resumedFrom?: RunResumeOrigin;
|
|
72
|
+
} | {
|
|
73
|
+
ok: false;
|
|
74
|
+
code: AgentRunRejectionCode;
|
|
75
|
+
error: string;
|
|
76
|
+
};
|
|
77
|
+
export type RunLaunchOptions = {
|
|
78
|
+
/** Reuse an allocated run id (the CLI's detached child). */
|
|
79
|
+
runId?: string;
|
|
80
|
+
/** Custom log path; meta.json is written next to it. */
|
|
81
|
+
logPath?: string;
|
|
82
|
+
/** Pid recorded in meta.json for liveness checks. Defaults to this process. */
|
|
83
|
+
pid?: number;
|
|
84
|
+
/**
|
|
85
|
+
* Spawn the client as its own process group so {@link AgentRunService.cancel}
|
|
86
|
+
* can stop it (NOT-481). The backend sets this; CLI runs leave it off so a
|
|
87
|
+
* foreground client still receives the terminal's ^C.
|
|
88
|
+
*/
|
|
89
|
+
ownProcessGroup?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Host gate run after every validation and client preflight, immediately
|
|
92
|
+
* before the run record is written and the adapter starts (NOT-486: the
|
|
93
|
+
* finalization baseline). A rejection fails the launch closed with no model
|
|
94
|
+
* work.
|
|
95
|
+
*/
|
|
96
|
+
beforeStart?: () => Promise<{
|
|
97
|
+
ok: true;
|
|
98
|
+
} | {
|
|
99
|
+
ok: false;
|
|
100
|
+
code: AgentRunRejectionCode;
|
|
101
|
+
message: string;
|
|
102
|
+
}>;
|
|
103
|
+
};
|
|
104
|
+
export type FinishedRun = {
|
|
105
|
+
kind: 'finished';
|
|
106
|
+
runId: string;
|
|
107
|
+
logPath: string;
|
|
108
|
+
metaPath: string;
|
|
109
|
+
/** `canceled` when the run was canceled; `died` when abandoned at {@link AgentRunService.shutdown}. */
|
|
110
|
+
state: 'ended' | 'error' | 'canceled' | 'died';
|
|
111
|
+
sessionId: string | null;
|
|
112
|
+
/** Deck token a session receipt named instead of the requested deck. */
|
|
113
|
+
receiptMismatch: string | null;
|
|
114
|
+
/** Adapter/stream failure message recorded as the `error` log line. */
|
|
115
|
+
failure: string | null;
|
|
116
|
+
};
|
|
117
|
+
/** Failed closed before any run record was written. */
|
|
118
|
+
export type RejectedRun = {
|
|
119
|
+
kind: 'rejected';
|
|
120
|
+
code: AgentRunRejectionCode;
|
|
121
|
+
message: string;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* A run whose record is written (state `running`) and whose stream continues
|
|
125
|
+
* in the background; `completion` settles at the terminal state and never
|
|
126
|
+
* rejects.
|
|
127
|
+
*/
|
|
128
|
+
export type LaunchedRun = {
|
|
129
|
+
kind: 'launched';
|
|
130
|
+
runId: string;
|
|
131
|
+
logPath: string;
|
|
132
|
+
metaPath: string;
|
|
133
|
+
completion: Promise<FinishedRun>;
|
|
134
|
+
};
|
|
135
|
+
export type AgentRunOutcome = RejectedRun | FinishedRun;
|
|
136
|
+
export type RunTerminalState = Exclude<RunInspectState, 'running'>;
|
|
137
|
+
export type RunCancelOutcome = {
|
|
138
|
+
kind: 'not_found';
|
|
139
|
+
}
|
|
140
|
+
/** This call canceled the run: `canceled` is recorded and the owned group signaled. */
|
|
141
|
+
| {
|
|
142
|
+
kind: 'canceled';
|
|
143
|
+
}
|
|
144
|
+
/** Already terminal: history is unchanged. */
|
|
145
|
+
| {
|
|
146
|
+
kind: 'already_terminal';
|
|
147
|
+
state: RunTerminalState;
|
|
148
|
+
}
|
|
149
|
+
/** Running under another process that recorded no owned process group. */
|
|
150
|
+
| {
|
|
151
|
+
kind: 'not_cancelable';
|
|
152
|
+
};
|
|
153
|
+
/** A `running` record that reconciliation moved to a terminal state. */
|
|
154
|
+
export type RunReconciliation = {
|
|
155
|
+
runId: string;
|
|
156
|
+
state: RunTerminalState;
|
|
157
|
+
/** The run's orphaned process group was still alive and was signaled. */
|
|
158
|
+
orphanSignaled: boolean;
|
|
159
|
+
};
|
|
160
|
+
/** A client whose real host preflight passed, with the profiles it can enforce. */
|
|
161
|
+
export type RunClientCapability = {
|
|
162
|
+
client: RunClient;
|
|
163
|
+
} & RunClientProfiles;
|
|
164
|
+
export type AgentRunService = {
|
|
165
|
+
/** Everything a run must prove before it may start (shared with detached starters). */
|
|
166
|
+
validate(request: AgentRunRequest): Promise<AgentRunValidation>;
|
|
167
|
+
/** Client preflight, start plan, record, and stream one validated run to a terminal state. */
|
|
168
|
+
execute(prepared: PreparedRun, launch?: RunLaunchOptions): Promise<AgentRunOutcome>;
|
|
169
|
+
/** validate + execute. */
|
|
170
|
+
start(request: AgentRunRequest, launch?: RunLaunchOptions): Promise<AgentRunOutcome>;
|
|
171
|
+
/**
|
|
172
|
+
* validate + client preflight + start plan + run record, then return
|
|
173
|
+
* without waiting for the stream. Every fail-closed gate runs before this
|
|
174
|
+
* resolves, so a `rejected` result means no model work was started.
|
|
175
|
+
*/
|
|
176
|
+
launch(request: AgentRunRequest, launch?: RunLaunchOptions): Promise<RejectedRun | LaunchedRun>;
|
|
177
|
+
/** Allocate a run id and record paths without starting anything. */
|
|
178
|
+
allocate(logPath?: string): {
|
|
179
|
+
runId: string;
|
|
180
|
+
logPath: string;
|
|
181
|
+
metaPath: string;
|
|
182
|
+
};
|
|
183
|
+
status(runId: string): CollectedStatus;
|
|
184
|
+
list(limit: number): RunStatusInfo[];
|
|
185
|
+
/** Ordered normalized events from the canonical JSONL log; null for an unknown run. */
|
|
186
|
+
events(runId: string): LogRead | null;
|
|
187
|
+
/**
|
|
188
|
+
* Idempotent cancel (NOT-481): records a terminal `canceled` line and state,
|
|
189
|
+
* suppresses anything the stream would write afterwards, and signals only
|
|
190
|
+
* the run-owned process group.
|
|
191
|
+
*/
|
|
192
|
+
cancel(runId: string): RunCancelOutcome;
|
|
193
|
+
/**
|
|
194
|
+
* Restart recovery: every `running` record not owned by this service is
|
|
195
|
+
* re-derived from its owner process and canonical log; terminal results are
|
|
196
|
+
* persisted and orphaned process groups signaled. Still-live runs stay.
|
|
197
|
+
*/
|
|
198
|
+
reconcile(): RunReconciliation[];
|
|
199
|
+
/** Clients whose real preflight passes on this host (no model call). */
|
|
200
|
+
capabilities(): Promise<RunClientCapability[]>;
|
|
201
|
+
/** Stop owned process groups without recording an outcome; they reconcile as `died`. */
|
|
202
|
+
shutdown(): void;
|
|
203
|
+
};
|
|
204
|
+
export declare function createRunAdapter(client: RunClient, deps?: RunAdapterDeps): ClientAdapter;
|
|
205
|
+
export declare function createAgentRunService(deps: AgentRunServiceDeps): AgentRunService;
|
|
206
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/agent-run/service.ts"],"names":[],"mappings":"AAkBA,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,iBAAiB,EAEtB,KAAK,eAAe,EACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAsB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