@wjarka/cezarion 0.14.8 → 0.14.9-dev.842
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 +76 -2
- package/dist/application-update/bin-recovery.d.ts +5 -0
- package/dist/application-update/bin-recovery.js +96 -0
- package/dist/application-update/bin-recovery.js.map +1 -0
- package/dist/application-update/discovery.d.ts +22 -0
- package/dist/application-update/discovery.js +91 -0
- package/dist/application-update/discovery.js.map +1 -0
- package/dist/application-update/helper.d.ts +57 -0
- package/dist/application-update/helper.js +374 -0
- package/dist/application-update/helper.js.map +1 -0
- package/dist/application-update/launcher.d.ts +8 -0
- package/dist/application-update/launcher.js +53 -0
- package/dist/application-update/launcher.js.map +1 -0
- package/dist/application-update/lock.d.ts +4 -0
- package/dist/application-update/lock.js +70 -0
- package/dist/application-update/lock.js.map +1 -0
- package/dist/application-update/npm-process.d.ts +17 -0
- package/dist/application-update/npm-process.js +133 -0
- package/dist/application-update/npm-process.js.map +1 -0
- package/dist/application-update/service.d.ts +69 -0
- package/dist/application-update/service.js +456 -0
- package/dist/application-update/service.js.map +1 -0
- package/dist/artifacts/cli.d.ts +1 -0
- package/dist/artifacts/cli.js +32 -0
- package/dist/artifacts/cli.js.map +1 -0
- package/dist/artifacts/lifecycle.d.ts +4 -0
- package/dist/artifacts/lifecycle.js +42 -0
- package/dist/artifacts/lifecycle.js.map +1 -0
- package/dist/artifacts/resolve.d.ts +18 -0
- package/dist/artifacts/resolve.js +102 -0
- package/dist/artifacts/resolve.js.map +1 -0
- package/dist/artifacts/store.d.ts +8 -0
- package/dist/artifacts/store.js +323 -0
- package/dist/artifacts/store.js.map +1 -0
- package/dist/ci-wait/mcp.d.ts +3 -0
- package/dist/ci-wait/mcp.js +14 -3
- package/dist/ci-wait/mcp.js.map +1 -1
- package/dist/contract/application-update.d.ts +32 -0
- package/dist/contract/artifacts.d.ts +83 -0
- package/dist/contract/ask-schema.d.ts +32 -0
- package/dist/contract/ask.d.ts +2 -32
- package/dist/contract/conversations.d.ts +165 -0
- package/dist/contract/delegation.d.ts +39 -0
- package/dist/contract/events.d.ts +49 -0
- package/dist/contract/health.d.ts +12 -0
- package/dist/contract/index.d.ts +2 -0
- package/dist/contract/index.js +1374 -1247
- package/dist/contract/runs.d.ts +143 -0
- package/dist/contract/skills.d.ts +28 -0
- package/dist/core/agent-runner.d.ts +33 -4
- package/dist/core/agent-runner.js +5 -0
- package/dist/core/agent-runner.js.map +1 -1
- package/dist/core/claude-cli-runner.d.ts +6 -12
- package/dist/core/claude-cli-runner.js +89 -19
- package/dist/core/claude-cli-runner.js.map +1 -1
- package/dist/core/codex-app-server-runner.d.ts +2 -1
- package/dist/core/codex-app-server-runner.js +327 -92
- package/dist/core/codex-app-server-runner.js.map +1 -1
- package/dist/core/codex-app-server-transport.d.ts +13 -1
- package/dist/core/codex-app-server-transport.js +58 -17
- package/dist/core/codex-app-server-transport.js.map +1 -1
- package/dist/core/cursor-acp-runner.d.ts +4 -1
- package/dist/core/cursor-acp-runner.js +3 -0
- package/dist/core/cursor-acp-runner.js.map +1 -1
- package/dist/core/cursor-provider-error.js +6 -1
- package/dist/core/cursor-provider-error.js.map +1 -1
- package/dist/core/input-submissions.d.ts +14 -0
- package/dist/core/input-submissions.js +26 -0
- package/dist/core/input-submissions.js.map +1 -0
- package/dist/core/opencode-server-runner.d.ts +4 -1
- package/dist/core/opencode-server-runner.js +144 -21
- package/dist/core/opencode-server-runner.js.map +1 -1
- package/dist/core/pi-runner.d.ts +2 -1
- package/dist/core/pi-runner.js +72 -7
- package/dist/core/pi-runner.js.map +1 -1
- package/dist/delegation/cli.js +102 -6
- package/dist/delegation/cli.js.map +1 -1
- package/dist/delegation/conversations.js +13 -5
- package/dist/delegation/conversations.js.map +1 -1
- package/dist/delegation/input.d.ts +2 -1
- package/dist/delegation/input.js +6 -1
- package/dist/delegation/input.js.map +1 -1
- package/dist/delegation/provision.js +5 -3
- package/dist/delegation/provision.js.map +1 -1
- package/dist/delegation/questions.d.ts +19 -0
- package/dist/delegation/questions.js +45 -0
- package/dist/delegation/questions.js.map +1 -0
- package/dist/delegation/results.d.ts +1 -1
- package/dist/delegation/results.js +23 -13
- package/dist/delegation/results.js.map +1 -1
- package/dist/delegation/routes.d.ts +142 -15
- package/dist/delegation/routes.js +4 -1
- package/dist/delegation/routes.js.map +1 -1
- package/dist/delegation/service.d.ts +9 -5
- package/dist/delegation/service.js +106 -7
- package/dist/delegation/service.js.map +1 -1
- package/dist/delegation/transport.d.ts +188 -61
- package/dist/index.js +72 -26
- package/dist/index.js.map +1 -1
- package/dist/open-url.d.ts +2 -0
- package/dist/open-url.js +20 -0
- package/dist/open-url.js.map +1 -0
- package/dist/release/snapshot.d.ts +3 -3
- package/dist/release/snapshot.js +6 -6
- package/dist/release/snapshot.js.map +1 -1
- package/dist/runs/client-request.d.ts +11 -0
- package/dist/runs/client-request.js +26 -0
- package/dist/runs/client-request.js.map +1 -0
- package/dist/runs/delegation-state.d.ts +17 -0
- package/dist/runs/event-history.js +6 -0
- package/dist/runs/event-history.js.map +1 -1
- package/dist/runs/store.d.ts +78 -6
- package/dist/runs/store.js +163 -1
- package/dist/runs/store.js.map +1 -1
- package/dist/server/server.d.ts +3761 -1648
- package/dist/server/server.js +170 -4
- package/dist/server/server.js.map +1 -1
- package/dist/task-cli/cli.d.ts +38 -0
- package/dist/task-cli/cli.js +463 -0
- package/dist/task-cli/cli.js.map +1 -0
- package/dist/task-cli/discovery.d.ts +22 -0
- package/dist/task-cli/discovery.js +95 -0
- package/dist/task-cli/discovery.js.map +1 -0
- package/dist/task-cli/http.d.ts +43 -0
- package/dist/task-cli/http.js +101 -0
- package/dist/task-cli/http.js.map +1 -0
- package/dist/task-cli/projections.d.ts +40 -0
- package/dist/task-cli/projections.js +45 -0
- package/dist/task-cli/projections.js.map +1 -0
- package/dist/task-cli/watch.d.ts +78 -0
- package/dist/task-cli/watch.js +336 -0
- package/dist/task-cli/watch.js.map +1 -0
- package/dist/workflows/run.d.ts +93 -0
- package/dist/workflows/run.js +816 -81
- package/dist/workflows/run.js.map +1 -1
- package/dist/workspace/projects-cli.js +1 -1
- package/package.json +3 -3
- package/scripts/mock-claude.mjs +38 -2
- package/scripts/mock-codex-app-server.mjs +98 -1
- package/scripts/mock-cursor-acp.mjs +8 -0
- package/scripts/mock-opencode-serve.mjs +69 -2
- package/scripts/mock-pi-rpc.mjs +63 -2
- package/web/dist/assets/agent-accounts-JPfZPgKn.js +1 -0
- package/web/dist/assets/centered-state-HwCqQkH3.js +43 -0
- package/web/dist/assets/collapsible-CTymFdL7.js +1 -0
- package/web/dist/assets/commit-list-BZpYGQl2.js +1 -0
- package/web/dist/assets/compare-variants-9VkybaQ7.js +1 -0
- package/web/dist/assets/{diff-tRE59UNb2.js → diff-CZcD4D1r2.js} +2 -2
- package/web/dist/assets/diff-controls-CpcHG3Mm.js +1 -0
- package/web/dist/assets/{diff-stat-Cgnl_hYF.js → diff-stat-Cn7rzy1H.js} +1 -1
- package/web/dist/assets/{diff-view-DN1ort7Q.js → diff-view-C46nHiP2.js} +2 -2
- package/web/dist/assets/dropdown-menu-_YAzCaoQ.js +1 -0
- package/web/dist/assets/git-toolbar-BvKDz6uS.js +1 -0
- package/web/dist/assets/github-CgjJCGrD.js +1 -0
- package/web/dist/assets/{image-preview-C2JGcBlC.js → image-preview-B618kDBH.js} +1 -1
- package/web/dist/assets/index-BJtve0Pm.js +7 -0
- package/web/dist/assets/index-D0WAgmTQ.css +1 -0
- package/web/dist/assets/markdown-CFWZnvMh.js +2 -0
- package/web/dist/assets/pill-QfwkuR50.js +1 -0
- package/web/dist/assets/project-router-CkAA39N5.js +1 -0
- package/web/dist/assets/prompt-templates-Cfna_S0T.js +15 -0
- package/web/dist/assets/repo-git-DgzgJ0cP.js +1 -0
- package/web/dist/assets/{run-diff-CyG0Nciv.js → run-diff-YbCEQn5I.js} +2 -2
- package/web/dist/assets/run-header-DMgIbr1d.js +1 -0
- package/web/dist/assets/skills-BW79kUTd.js +1 -0
- package/web/dist/assets/{tab-link-BWNp3mLY.js → tab-link-MIHvczEm.js} +1 -1
- package/web/dist/assets/task-changes-C96ekt94.js +1 -0
- package/web/dist/assets/task-commits-DBfcMZyG.js +1 -0
- package/web/dist/assets/task-files-BKpH8dKQ.js +2 -0
- package/web/dist/assets/task-thread-Bw_nQuTx.css +1 -0
- package/web/dist/assets/task-thread-Dnq7Ek6W.js +9 -0
- package/web/dist/assets/textarea-D2vAVgYW.js +1 -0
- package/web/dist/assets/thread-loading-NW8Mthco.js +1 -0
- package/web/dist/assets/token-metrics-D188e6_0.js +1 -0
- package/web/dist/assets/utils-DKheTxGD.js +64 -0
- package/web/dist/assets/workflows-BFY1hgp3.js +11 -0
- package/web/dist/assets/{zoomable-image-Z3JDnm0b.js → zoomable-image-YW3Qdrr_.js} +1 -1
- package/web/dist/index.html +14 -14
- package/web/dist/assets/agent-accounts-BZm_2WAv.js +0 -1
- package/web/dist/assets/alert-dialog-B422RI-k.js +0 -43
- package/web/dist/assets/collapsible-Cy_Fmkrd.js +0 -1
- package/web/dist/assets/commit-list-Dcnk7TnI.js +0 -1
- package/web/dist/assets/compare-variants-Ciqwvd_f.js +0 -1
- package/web/dist/assets/diff-controls-BGrXGi7O.js +0 -1
- package/web/dist/assets/dropdown-menu-dwDGT8MM.js +0 -1
- package/web/dist/assets/git-toolbar-UiHnGvE0.js +0 -1
- package/web/dist/assets/github-D-MrkbJ7.js +0 -1
- package/web/dist/assets/ibm-plex-mono-regular-BF3vfe7_.ttf +0 -0
- package/web/dist/assets/index-BszfYvBq.js +0 -7
- package/web/dist/assets/index-CWh4pKP3.css +0 -1
- package/web/dist/assets/markdown-C_IcKVQd.js +0 -2
- package/web/dist/assets/pill-BsbO6G7y.js +0 -1
- package/web/dist/assets/project-router-DbLkll25.js +0 -1
- package/web/dist/assets/prompt-templates-BlTGJB5W.js +0 -15
- package/web/dist/assets/repo-git-Bm3s6Why.js +0 -1
- package/web/dist/assets/run-header-IFyIGCey.js +0 -1
- package/web/dist/assets/skills-C-C4DVFY.js +0 -1
- package/web/dist/assets/task-changes-D2PHtWUW.js +0 -1
- package/web/dist/assets/task-commits-N5u9U0_R.js +0 -1
- package/web/dist/assets/task-files-BS7c7CFm.js +0 -2
- package/web/dist/assets/task-thread-BQFdz1dJ.css +0 -1
- package/web/dist/assets/task-thread-DGM2dZV-.js +0 -9
- package/web/dist/assets/textarea-FjaU370i.js +0 -1
- package/web/dist/assets/thread-loading-77sJ8Yu_.js +0 -1
- package/web/dist/assets/token-metrics-Clxh03bE.js +0 -1
- package/web/dist/assets/utils-PYYcpCFZ.js +0 -64
- package/web/dist/assets/workflows-Czl0ZfXH.js +0 -11
|
@@ -41,7 +41,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
41
41
|
requestIds?: string[] | undefined;
|
|
42
42
|
requestOutcomes?: {
|
|
43
43
|
requestId: string;
|
|
44
|
-
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "replied" | "sender-closed" | "timed-out";
|
|
44
|
+
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
|
|
45
45
|
observedAt: string;
|
|
46
46
|
replyId?: string | undefined;
|
|
47
47
|
}[] | undefined;
|
|
@@ -89,7 +89,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
89
89
|
requestIds?: string[] | undefined;
|
|
90
90
|
requestOutcomes?: {
|
|
91
91
|
requestId: string;
|
|
92
|
-
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "replied" | "sender-closed" | "timed-out";
|
|
92
|
+
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
|
|
93
93
|
observedAt: string;
|
|
94
94
|
replyId?: string | undefined;
|
|
95
95
|
}[] | undefined;
|
|
@@ -137,11 +137,23 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
137
137
|
state: "accepted" | "continuation-required" | "destroyed" | "late";
|
|
138
138
|
resumed?: true | undefined;
|
|
139
139
|
instruction?: string | undefined;
|
|
140
|
+
question?: {
|
|
141
|
+
questions: {
|
|
142
|
+
id?: string | undefined;
|
|
143
|
+
header: string;
|
|
144
|
+
question: string;
|
|
145
|
+
options: {
|
|
146
|
+
label: string;
|
|
147
|
+
description?: string | undefined;
|
|
148
|
+
}[];
|
|
149
|
+
multiSelect?: boolean | undefined;
|
|
150
|
+
}[];
|
|
151
|
+
} | undefined;
|
|
140
152
|
};
|
|
141
|
-
delivery: "delivered" | "not-delivered" | "queued";
|
|
153
|
+
delivery: "consumed" | "delivered" | "not-delivered" | "queued";
|
|
142
154
|
outcome?: {
|
|
143
155
|
requestId: string;
|
|
144
|
-
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "replied" | "sender-closed" | "timed-out";
|
|
156
|
+
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
|
|
145
157
|
observedAt: string;
|
|
146
158
|
replyId?: string | undefined;
|
|
147
159
|
} | undefined;
|
|
@@ -178,11 +190,23 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
178
190
|
state: "accepted" | "continuation-required" | "destroyed" | "late";
|
|
179
191
|
resumed?: true | undefined;
|
|
180
192
|
instruction?: string | undefined;
|
|
193
|
+
question?: {
|
|
194
|
+
questions: {
|
|
195
|
+
id?: string | undefined;
|
|
196
|
+
header: string;
|
|
197
|
+
question: string;
|
|
198
|
+
options: {
|
|
199
|
+
label: string;
|
|
200
|
+
description?: string | undefined;
|
|
201
|
+
}[];
|
|
202
|
+
multiSelect?: boolean | undefined;
|
|
203
|
+
}[];
|
|
204
|
+
} | undefined;
|
|
181
205
|
};
|
|
182
|
-
delivery: "delivered" | "not-delivered" | "queued";
|
|
206
|
+
delivery: "consumed" | "delivered" | "not-delivered" | "queued";
|
|
183
207
|
outcome?: {
|
|
184
208
|
requestId: string;
|
|
185
|
-
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "replied" | "sender-closed" | "timed-out";
|
|
209
|
+
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
|
|
186
210
|
observedAt: string;
|
|
187
211
|
replyId?: string | undefined;
|
|
188
212
|
} | undefined;
|
|
@@ -219,11 +243,23 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
219
243
|
state: "accepted" | "continuation-required" | "destroyed" | "late";
|
|
220
244
|
resumed?: true | undefined;
|
|
221
245
|
instruction?: string | undefined;
|
|
246
|
+
question?: {
|
|
247
|
+
questions: {
|
|
248
|
+
id?: string | undefined;
|
|
249
|
+
header: string;
|
|
250
|
+
question: string;
|
|
251
|
+
options: {
|
|
252
|
+
label: string;
|
|
253
|
+
description?: string | undefined;
|
|
254
|
+
}[];
|
|
255
|
+
multiSelect?: boolean | undefined;
|
|
256
|
+
}[];
|
|
257
|
+
} | undefined;
|
|
222
258
|
};
|
|
223
|
-
delivery: "delivered" | "not-delivered" | "queued";
|
|
259
|
+
delivery: "consumed" | "delivered" | "not-delivered" | "queued";
|
|
224
260
|
outcome?: {
|
|
225
261
|
requestId: string;
|
|
226
|
-
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "replied" | "sender-closed" | "timed-out";
|
|
262
|
+
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
|
|
227
263
|
observedAt: string;
|
|
228
264
|
replyId?: string | undefined;
|
|
229
265
|
} | undefined;
|
|
@@ -260,13 +296,26 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
260
296
|
state: "accepted" | "continuation-required" | "destroyed" | "late";
|
|
261
297
|
resumed?: true | undefined;
|
|
262
298
|
instruction?: string | undefined;
|
|
299
|
+
question?: {
|
|
300
|
+
questions: {
|
|
301
|
+
id?: string | undefined;
|
|
302
|
+
header: string;
|
|
303
|
+
question: string;
|
|
304
|
+
options: {
|
|
305
|
+
label: string;
|
|
306
|
+
description?: string | undefined;
|
|
307
|
+
}[];
|
|
308
|
+
multiSelect?: boolean | undefined;
|
|
309
|
+
}[];
|
|
310
|
+
} | undefined;
|
|
263
311
|
}[];
|
|
264
312
|
outcomes: {
|
|
265
313
|
requestId: string;
|
|
266
|
-
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "replied" | "sender-closed" | "timed-out";
|
|
314
|
+
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
|
|
267
315
|
observedAt: string;
|
|
268
316
|
replyId?: string | undefined;
|
|
269
317
|
}[];
|
|
318
|
+
hint?: string | undefined;
|
|
270
319
|
};
|
|
271
320
|
outputFormat: "json";
|
|
272
321
|
status: 200;
|
|
@@ -277,12 +326,90 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
277
326
|
};
|
|
278
327
|
};
|
|
279
328
|
};
|
|
329
|
+
} & {
|
|
330
|
+
"/inbox": {
|
|
331
|
+
$post: {
|
|
332
|
+
output: {
|
|
333
|
+
messages: {
|
|
334
|
+
senderRunId: string;
|
|
335
|
+
recipientRunId: string;
|
|
336
|
+
kind: "follow-up" | "progress" | "reply" | "request";
|
|
337
|
+
requestId?: string | undefined;
|
|
338
|
+
id: string;
|
|
339
|
+
text: string;
|
|
340
|
+
createdAt: string;
|
|
341
|
+
deadline?: string | undefined;
|
|
342
|
+
requestHash: string;
|
|
343
|
+
state: "accepted" | "continuation-required" | "destroyed" | "late";
|
|
344
|
+
resumed?: true | undefined;
|
|
345
|
+
instruction?: string | undefined;
|
|
346
|
+
question?: {
|
|
347
|
+
questions: {
|
|
348
|
+
id?: string | undefined;
|
|
349
|
+
header: string;
|
|
350
|
+
question: string;
|
|
351
|
+
options: {
|
|
352
|
+
label: string;
|
|
353
|
+
description?: string | undefined;
|
|
354
|
+
}[];
|
|
355
|
+
multiSelect?: boolean | undefined;
|
|
356
|
+
}[];
|
|
357
|
+
} | undefined;
|
|
358
|
+
}[];
|
|
359
|
+
outcomes: {
|
|
360
|
+
requestId: string;
|
|
361
|
+
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
|
|
362
|
+
observedAt: string;
|
|
363
|
+
replyId?: string | undefined;
|
|
364
|
+
}[];
|
|
365
|
+
receiptId?: string | undefined;
|
|
366
|
+
expiresAt?: string | undefined;
|
|
367
|
+
};
|
|
368
|
+
outputFormat: "json";
|
|
369
|
+
status: 200;
|
|
370
|
+
input: {
|
|
371
|
+
json: Record<string, never>;
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
} & {
|
|
376
|
+
"/inbox/ack": {
|
|
377
|
+
$post: {
|
|
378
|
+
output: {
|
|
379
|
+
receiptId: string;
|
|
380
|
+
status: "acknowledged" | "already-acknowledged" | "released";
|
|
381
|
+
};
|
|
382
|
+
outputFormat: "json";
|
|
383
|
+
status: 200;
|
|
384
|
+
input: {
|
|
385
|
+
json: {
|
|
386
|
+
receiptId: string;
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
};
|
|
391
|
+
} & {
|
|
392
|
+
"/inbox/release": {
|
|
393
|
+
$post: {
|
|
394
|
+
output: {
|
|
395
|
+
receiptId: string;
|
|
396
|
+
status: "acknowledged" | "already-acknowledged" | "released";
|
|
397
|
+
};
|
|
398
|
+
outputFormat: "json";
|
|
399
|
+
status: 200;
|
|
400
|
+
input: {
|
|
401
|
+
json: {
|
|
402
|
+
receiptId: string;
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
};
|
|
280
407
|
} & {
|
|
281
408
|
"/cancel-request": {
|
|
282
409
|
$post: {
|
|
283
410
|
output: {
|
|
284
411
|
requestId: string;
|
|
285
|
-
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "replied" | "sender-closed" | "timed-out";
|
|
412
|
+
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
|
|
286
413
|
observedAt: string;
|
|
287
414
|
replyId?: string | undefined;
|
|
288
415
|
};
|
|
@@ -298,18 +425,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
298
425
|
} & {
|
|
299
426
|
"/:workerId": {
|
|
300
427
|
$get: {
|
|
301
|
-
output: {
|
|
302
|
-
error: string;
|
|
303
|
-
code?: "invalid_input" | undefined;
|
|
304
|
-
};
|
|
305
|
-
outputFormat: "json";
|
|
306
|
-
status: 400;
|
|
307
|
-
input: {
|
|
308
|
-
param: {
|
|
309
|
-
workerId: string;
|
|
310
|
-
};
|
|
311
|
-
};
|
|
312
|
-
} | {
|
|
313
428
|
output: {
|
|
314
429
|
workerId: string;
|
|
315
430
|
parentRunId: string;
|
|
@@ -344,7 +459,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
344
459
|
requestIds?: string[] | undefined;
|
|
345
460
|
requestOutcomes?: {
|
|
346
461
|
requestId: string;
|
|
347
|
-
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "replied" | "sender-closed" | "timed-out";
|
|
462
|
+
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
|
|
348
463
|
observedAt: string;
|
|
349
464
|
replyId?: string | undefined;
|
|
350
465
|
}[] | undefined;
|
|
@@ -386,11 +501,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
386
501
|
workerId: string;
|
|
387
502
|
};
|
|
388
503
|
};
|
|
389
|
-
}
|
|
390
|
-
};
|
|
391
|
-
} & {
|
|
392
|
-
"/:workerId/collect": {
|
|
393
|
-
$post: {
|
|
504
|
+
} | {
|
|
394
505
|
output: {
|
|
395
506
|
error: string;
|
|
396
507
|
code?: "invalid_input" | undefined;
|
|
@@ -401,10 +512,12 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
401
512
|
param: {
|
|
402
513
|
workerId: string;
|
|
403
514
|
};
|
|
404
|
-
} & {
|
|
405
|
-
json: Record<string, never>;
|
|
406
515
|
};
|
|
407
|
-
}
|
|
516
|
+
};
|
|
517
|
+
};
|
|
518
|
+
} & {
|
|
519
|
+
"/:workerId/collect": {
|
|
520
|
+
$post: {
|
|
408
521
|
output: {
|
|
409
522
|
workerId: string;
|
|
410
523
|
parentRunId: string;
|
|
@@ -506,11 +619,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
506
619
|
} & {
|
|
507
620
|
json: Record<string, never>;
|
|
508
621
|
};
|
|
509
|
-
}
|
|
510
|
-
};
|
|
511
|
-
} & {
|
|
512
|
-
"/:workerId/steer": {
|
|
513
|
-
$post: {
|
|
622
|
+
} | {
|
|
514
623
|
output: {
|
|
515
624
|
error: string;
|
|
516
625
|
code?: "invalid_input" | undefined;
|
|
@@ -522,11 +631,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
522
631
|
workerId: string;
|
|
523
632
|
};
|
|
524
633
|
} & {
|
|
525
|
-
json:
|
|
526
|
-
text: string;
|
|
527
|
-
};
|
|
634
|
+
json: Record<string, never>;
|
|
528
635
|
};
|
|
529
|
-
}
|
|
636
|
+
};
|
|
637
|
+
};
|
|
638
|
+
} & {
|
|
639
|
+
"/:workerId/steer": {
|
|
640
|
+
$post: {
|
|
530
641
|
output: {
|
|
531
642
|
workerId: string;
|
|
532
643
|
state: "delivered" | "queued";
|
|
@@ -542,11 +653,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
542
653
|
text: string;
|
|
543
654
|
};
|
|
544
655
|
};
|
|
545
|
-
}
|
|
546
|
-
};
|
|
547
|
-
} & {
|
|
548
|
-
"/:workerId/stop": {
|
|
549
|
-
$post: {
|
|
656
|
+
} | {
|
|
550
657
|
output: {
|
|
551
658
|
error: string;
|
|
552
659
|
code?: "invalid_input" | undefined;
|
|
@@ -558,9 +665,15 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
558
665
|
workerId: string;
|
|
559
666
|
};
|
|
560
667
|
} & {
|
|
561
|
-
json:
|
|
668
|
+
json: {
|
|
669
|
+
text: string;
|
|
670
|
+
};
|
|
562
671
|
};
|
|
563
|
-
}
|
|
672
|
+
};
|
|
673
|
+
};
|
|
674
|
+
} & {
|
|
675
|
+
"/:workerId/stop": {
|
|
676
|
+
$post: {
|
|
564
677
|
output: {
|
|
565
678
|
workerId: string;
|
|
566
679
|
state: "stopping" | "terminated";
|
|
@@ -574,11 +687,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
574
687
|
} & {
|
|
575
688
|
json: Record<string, never>;
|
|
576
689
|
};
|
|
577
|
-
}
|
|
578
|
-
};
|
|
579
|
-
} & {
|
|
580
|
-
"/:workerId/destroy": {
|
|
581
|
-
$post: {
|
|
690
|
+
} | {
|
|
582
691
|
output: {
|
|
583
692
|
error: string;
|
|
584
693
|
code?: "invalid_input" | undefined;
|
|
@@ -592,7 +701,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
592
701
|
} & {
|
|
593
702
|
json: Record<string, never>;
|
|
594
703
|
};
|
|
595
|
-
}
|
|
704
|
+
};
|
|
705
|
+
};
|
|
706
|
+
} & {
|
|
707
|
+
"/:workerId/destroy": {
|
|
708
|
+
$post: {
|
|
596
709
|
output: {
|
|
597
710
|
workerId: string;
|
|
598
711
|
state: "complete" | "incomplete";
|
|
@@ -615,6 +728,20 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
615
728
|
} & {
|
|
616
729
|
json: Record<string, never>;
|
|
617
730
|
};
|
|
731
|
+
} | {
|
|
732
|
+
output: {
|
|
733
|
+
error: string;
|
|
734
|
+
code?: "invalid_input" | undefined;
|
|
735
|
+
};
|
|
736
|
+
outputFormat: "json";
|
|
737
|
+
status: 400;
|
|
738
|
+
input: {
|
|
739
|
+
param: {
|
|
740
|
+
workerId: string;
|
|
741
|
+
};
|
|
742
|
+
} & {
|
|
743
|
+
json: Record<string, never>;
|
|
744
|
+
};
|
|
618
745
|
} | {
|
|
619
746
|
output: {
|
|
620
747
|
workerId: string;
|
|
@@ -644,11 +771,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
644
771
|
"/:workerId/diff": {
|
|
645
772
|
$get: {
|
|
646
773
|
output: {
|
|
647
|
-
|
|
648
|
-
|
|
774
|
+
workerId: string;
|
|
775
|
+
baselineSha: string;
|
|
776
|
+
diff: string;
|
|
777
|
+
truncated: boolean;
|
|
649
778
|
};
|
|
650
779
|
outputFormat: "json";
|
|
651
|
-
status:
|
|
780
|
+
status: 200;
|
|
652
781
|
input: {
|
|
653
782
|
param: {
|
|
654
783
|
workerId: string;
|
|
@@ -656,13 +785,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
656
785
|
};
|
|
657
786
|
} | {
|
|
658
787
|
output: {
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
diff: string;
|
|
662
|
-
truncated: boolean;
|
|
788
|
+
error: string;
|
|
789
|
+
code?: "invalid_input" | undefined;
|
|
663
790
|
};
|
|
664
791
|
outputFormat: "json";
|
|
665
|
-
status:
|
|
792
|
+
status: 400;
|
|
666
793
|
input: {
|
|
667
794
|
param: {
|
|
668
795
|
workerId: string;
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { DelegationController } from './delegation/provision.js';
|
|
3
3
|
import { parseArgs } from 'node:util';
|
|
4
|
-
import {
|
|
4
|
+
import { execFileSync } from 'node:child_process';
|
|
5
5
|
import { createServer } from 'node:net';
|
|
6
|
+
import { once } from 'node:events';
|
|
6
7
|
import { mkdirSync, writeFileSync, existsSync, readFileSync } from 'node:fs';
|
|
7
8
|
import { dirname, join, resolve } from 'node:path';
|
|
8
9
|
import { fileURLToPath } from 'node:url';
|
|
@@ -27,6 +28,12 @@ import { runMigrations } from './workspace/migrations.js';
|
|
|
27
28
|
import { registerProject, shouldRegisterProject } from './workspace/projects.js';
|
|
28
29
|
import { runProjectsCommand } from './workspace/projects-cli.js';
|
|
29
30
|
import { WorkspaceSemaphore } from './workspace/semaphore.js';
|
|
31
|
+
import { ApplicationUpdateService } from './application-update/service.js';
|
|
32
|
+
import { armRestartHelper } from './application-update/launcher.js';
|
|
33
|
+
import { restartEndpoint } from './application-update/helper.js';
|
|
34
|
+
import { readNpmConfiguration } from './application-update/npm-process.js';
|
|
35
|
+
import { cezarHomeDir } from './paths.js';
|
|
36
|
+
import { openUrl } from './open-url.js';
|
|
30
37
|
const HELP = `cezar — local cockpit for AI agent tasks in your repo
|
|
31
38
|
|
|
32
39
|
Usage:
|
|
@@ -34,8 +41,11 @@ Usage:
|
|
|
34
41
|
cez run "<task>" run a task headless in the terminal
|
|
35
42
|
cez init scaffold .ai/cezar/ (example workflow + skill)
|
|
36
43
|
cez projects list the projects this cockpit serves
|
|
37
|
-
(also: projects add [<dir>] · projects remove <id>
|
|
44
|
+
(also: projects add [<dir>] · projects remove|rm <id> ·
|
|
45
|
+
projects tag <id> [<tag>…])
|
|
38
46
|
cez worker manage owned workers (see: worker --help)
|
|
47
|
+
cez task start/watch/steer cockpit tasks from the terminal (see: task --help)
|
|
48
|
+
cez artifact publish <path> publish a local task artifact (see: artifact --help)
|
|
39
49
|
cez server-install interactive wizard to host cezar on a server
|
|
40
50
|
cez server-deploy redeploy a new version (reload the service) + verify
|
|
41
51
|
cez server-uninstall reverse a server-install
|
|
@@ -69,6 +79,17 @@ Skills live in .ai/skills/, .ai/cezar/skills/ and your team skills repo
|
|
|
69
79
|
(default open-mercato/skills; override via .ai/cezar/config.json);
|
|
70
80
|
workflows in .ai/cezar/workflows/.`;
|
|
71
81
|
async function main() {
|
|
82
|
+
if (process.argv[2] === 'artifact') {
|
|
83
|
+
const { runArtifactCommand } = await import('./artifacts/cli.js');
|
|
84
|
+
process.exitCode = await runArtifactCommand(process.argv.slice(3), process.env);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (process.argv[2] === 'task') {
|
|
88
|
+
// Before the global parseArgs, like `worker`: task flags are not cockpit flags (#504).
|
|
89
|
+
const { runTaskCommand } = await import('./task-cli/cli.js');
|
|
90
|
+
process.exitCode = await runTaskCommand(process.argv.slice(3), process.env);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
72
93
|
if (process.argv[2] === 'worker') {
|
|
73
94
|
const { runWorkerCommand } = await import('./delegation/cli.js');
|
|
74
95
|
process.exitCode = await runWorkerCommand(process.argv.slice(3), process.env);
|
|
@@ -89,6 +110,7 @@ async function main() {
|
|
|
89
110
|
reconfigure: { type: 'string' },
|
|
90
111
|
reinstall: { type: 'boolean', default: false },
|
|
91
112
|
help: { type: 'boolean', short: 'h', default: false },
|
|
113
|
+
'restart-exact': { type: 'boolean', default: false },
|
|
92
114
|
},
|
|
93
115
|
allowPositionals: true,
|
|
94
116
|
});
|
|
@@ -109,7 +131,7 @@ async function main() {
|
|
|
109
131
|
const repoRoot = repoInfo?.root ?? cwd;
|
|
110
132
|
switch (command) {
|
|
111
133
|
case 'serve':
|
|
112
|
-
await serveCommand(repoRoot, Number(values.port), !values['no-open'], values['bind-host']);
|
|
134
|
+
await serveCommand(repoRoot, Number(values.port), !values['no-open'], values['bind-host'], Boolean(values['restart-exact']));
|
|
113
135
|
return;
|
|
114
136
|
case 'run':
|
|
115
137
|
await runCommand(repoRoot, positionals.slice(1).join(' ').trim(), values.workflow, values.model);
|
|
@@ -187,7 +209,7 @@ async function initWorkspace(repoRoot) {
|
|
|
187
209
|
return undefined;
|
|
188
210
|
}
|
|
189
211
|
// ---- serve -----------------------------------------------------------------
|
|
190
|
-
async function serveCommand(repoRoot, preferredPort, openBrowser, bindHost) {
|
|
212
|
+
async function serveCommand(repoRoot, preferredPort, openBrowser, bindHost, restartExact = false) {
|
|
191
213
|
const bootProjectId = await initWorkspace(repoRoot);
|
|
192
214
|
// ONE workspace semaphore for the whole process (spec 2026-07-20, step 2.5):
|
|
193
215
|
// the boot manager and every lazily-built project context count their runs
|
|
@@ -240,7 +262,7 @@ async function serveCommand(repoRoot, preferredPort, openBrowser, bindHost) {
|
|
|
240
262
|
update.latest = latest;
|
|
241
263
|
console.log(`\n ⬆ cezar ${latest} is available (running ${version}) — restart with: npx ${pkgName}@latest\n`);
|
|
242
264
|
});
|
|
243
|
-
const port = await pickPort(preferredPort);
|
|
265
|
+
const port = restartExact ? preferredPort : await pickPort(preferredPort);
|
|
244
266
|
// SECURITY: cezar executes agents. A non-loopback bind exposes that box to
|
|
245
267
|
// whatever can reach the interface, and cezar itself has NO auth — it is only
|
|
246
268
|
// for a deliberate hosted setup where a reverse proxy in front provides TLS +
|
|
@@ -250,13 +272,29 @@ async function serveCommand(repoRoot, preferredPort, openBrowser, bindHost) {
|
|
|
250
272
|
` Only do this behind a reverse proxy that enforces authentication,\n` +
|
|
251
273
|
` and make sure this interface is not reachable from the internet.\n`);
|
|
252
274
|
}
|
|
253
|
-
|
|
275
|
+
// Discovery reads npm metadata only; a missing npm or source checkout degrades to manual update.
|
|
276
|
+
const npm = readNpmConfiguration();
|
|
277
|
+
const npmPrefix = npm?.prefix;
|
|
278
|
+
const npmCache = npm?.cache;
|
|
279
|
+
let server;
|
|
280
|
+
const applicationUpdate = (npmPrefix && npmCache) || process.env.CEZ_DRY_RUN === '1'
|
|
281
|
+
? new ApplicationUpdateService({
|
|
282
|
+
packageRoot: join(dirname(fileURLToPath(import.meta.url)), '..'),
|
|
283
|
+
launchEntry: resolve(process.argv[1] ?? ''),
|
|
284
|
+
npmPrefix: npmPrefix ?? join(cezarHomeDir(), 'dry-prefix'),
|
|
285
|
+
npmCache: npmCache ?? join(cezarHomeDir(), 'dry-cache'), npmBin: npm?.npmBin, home: cezarHomeDir(), targetVersion: () => update.latest,
|
|
286
|
+
dryRun: process.env.CEZ_DRY_RUN === '1',
|
|
287
|
+
armRestart: (plan) => armRestartHelper(plan, { repoRoot, ...restartEndpoint(server.address()), npmBin: npm?.npmBin ?? 'npm' }),
|
|
288
|
+
handoff: () => { void server.shutdownForRestart().then(() => process.exit(0)); },
|
|
289
|
+
}) : undefined;
|
|
290
|
+
server = startServer({
|
|
254
291
|
delegation,
|
|
255
292
|
repoRoot,
|
|
256
293
|
store,
|
|
257
294
|
manager,
|
|
258
295
|
version,
|
|
259
296
|
update,
|
|
297
|
+
applicationUpdate,
|
|
260
298
|
bootProjectId,
|
|
261
299
|
semaphore,
|
|
262
300
|
bindHost,
|
|
@@ -264,7 +302,17 @@ async function serveCommand(repoRoot, preferredPort, openBrowser, bindHost) {
|
|
|
264
302
|
providerRuntimeAuth,
|
|
265
303
|
workspaceEvents,
|
|
266
304
|
}, port);
|
|
267
|
-
|
|
305
|
+
if (!server.listening)
|
|
306
|
+
await once(server, 'listening');
|
|
307
|
+
const address = server.address();
|
|
308
|
+
if (!address || typeof address === 'string')
|
|
309
|
+
throw new Error('cockpit TCP listener is unavailable');
|
|
310
|
+
const boundPort = address.port;
|
|
311
|
+
const boundHost = address.address;
|
|
312
|
+
if (restartExact && process.send) {
|
|
313
|
+
process.send({ type: 'application-update-listening', host: boundHost, port: boundPort, repoRoot, version }, () => process.disconnect?.());
|
|
314
|
+
}
|
|
315
|
+
const url = `http://${boundHost.includes(':') ? `[${boundHost}]` : boundHost}:${boundPort}`;
|
|
268
316
|
console.log(`\n cezar v${version} — ${repoRoot}`);
|
|
269
317
|
console.log(` ${repo ? `branch ${repo.branch}` : 'not a git repository (tasks run in place, one at a time; repo view is empty)'}`);
|
|
270
318
|
for (const check of checks) {
|
|
@@ -272,8 +320,8 @@ async function serveCommand(repoRoot, preferredPort, openBrowser, bindHost) {
|
|
|
272
320
|
const detail = check.available ? (check.version ?? 'ok') : (check.hint ?? 'missing');
|
|
273
321
|
console.log(` ${mark} ${check.name.padEnd(6)} ${detail}`);
|
|
274
322
|
}
|
|
275
|
-
if (
|
|
276
|
-
console.log(` (port ${preferredPort} was busy — using ${
|
|
323
|
+
if (preferredPort !== 0 && boundPort !== preferredPort)
|
|
324
|
+
console.log(` (port ${preferredPort} was busy — using ${boundPort})`);
|
|
277
325
|
console.log(`\n cockpit → ${url}\n`);
|
|
278
326
|
// Silenced by CEZ_NO_BANNER=1 or by dismissing the cockpit's banner (#391).
|
|
279
327
|
await printSkillsBanner(repoRoot);
|
|
@@ -326,12 +374,27 @@ async function waitForHealth(healthUrl, timeoutMs) {
|
|
|
326
374
|
return false;
|
|
327
375
|
}
|
|
328
376
|
// ---- run (headless) ----------------------------------------------------------
|
|
377
|
+
/**
|
|
378
|
+
* Headless `run` stays headless (#504), but a cockpit already serving this repo will never see
|
|
379
|
+
* the run until it restarts — say so once, on stderr. Capped so it never delays the run, and
|
|
380
|
+
* silent on any failure.
|
|
381
|
+
*/
|
|
382
|
+
async function hintRunningCockpit(repoRoot) {
|
|
383
|
+
const { discoverCockpit } = await import('./task-cli/discovery.js');
|
|
384
|
+
const found = await Promise.race([
|
|
385
|
+
discoverCockpit({ repoDir: repoRoot, timeoutMs: 300 }).catch(() => undefined),
|
|
386
|
+
new Promise((done) => setTimeout(() => done(undefined), 600).unref()),
|
|
387
|
+
]);
|
|
388
|
+
if (found)
|
|
389
|
+
console.error(`a cockpit is running at ${found.origin}; use "cez task start" to run this task there instead`);
|
|
390
|
+
}
|
|
329
391
|
async function runCommand(repoRoot, task, workflowName, model) {
|
|
330
392
|
if (!task) {
|
|
331
393
|
console.error('usage: cez run "<task>" [--workflow name] [--model model]');
|
|
332
394
|
process.exitCode = 1;
|
|
333
395
|
return;
|
|
334
396
|
}
|
|
397
|
+
await hintRunningCockpit(repoRoot);
|
|
335
398
|
await initWorkspace(repoRoot);
|
|
336
399
|
const { workflows, issues } = await loadWorkflows(repoRoot);
|
|
337
400
|
for (const issue of issues)
|
|
@@ -671,23 +734,6 @@ function readOwnVersion() {
|
|
|
671
734
|
return '0.0.0';
|
|
672
735
|
}
|
|
673
736
|
}
|
|
674
|
-
function openUrl(url) {
|
|
675
|
-
const cmd = process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'cmd' : 'xdg-open';
|
|
676
|
-
const args = process.platform === 'win32' ? ['/c', 'start', '', url] : [url];
|
|
677
|
-
try {
|
|
678
|
-
const child = spawn(cmd, args, { stdio: 'ignore', detached: true });
|
|
679
|
-
// A missing opener (e.g. no `xdg-open` on a headless Linux VPS) surfaces
|
|
680
|
-
// asynchronously as an 'error' event, NOT a synchronous throw — without a
|
|
681
|
-
// listener Node promotes it to an unhandled error and hard-crashes the whole
|
|
682
|
-
// process, even though the cockpit is already serving. Swallow it: the URL is
|
|
683
|
-
// printed above, so a browser-less host just doesn't auto-open.
|
|
684
|
-
child.on('error', () => { });
|
|
685
|
-
child.unref();
|
|
686
|
-
}
|
|
687
|
-
catch {
|
|
688
|
-
// the printed URL is enough
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
737
|
function previewJson(input) {
|
|
692
738
|
try {
|
|
693
739
|
const s = JSON.stringify(input);
|