@wjarka/cezarion 0.14.9-dev.1009 → 0.14.9-dev.1015
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/core/codex-app-server-runner.js +79 -0
- package/dist/core/codex-app-server-runner.js.map +1 -1
- package/dist/core/codex-stream-error.d.ts +2 -0
- package/dist/core/codex-stream-error.js +12 -0
- package/dist/core/codex-stream-error.js.map +1 -0
- package/dist/core/codex-ui-mapper.js +9 -0
- package/dist/core/codex-ui-mapper.js.map +1 -1
- package/dist/delegation/routes.d.ts +13 -13
- package/dist/delegation/transport.d.ts +63 -63
- package/dist/workflows/run.js +37 -7
- package/dist/workflows/run.js.map +1 -1
- package/package.json +3 -3
- package/scripts/mock-codex-app-server.mjs +16 -0
- package/web/dist/assets/{agent-accounts-CerclGiO.js → agent-accounts-DyL8fuLm.js} +1 -1
- package/web/dist/assets/centered-state-BS3y81sP.js +43 -0
- package/web/dist/assets/{collapsible-De2G0xqQ.js → collapsible-B_5Byaac.js} +1 -1
- package/web/dist/assets/{commit-list-s6JPY3qv.js → commit-list-DcstMSP2.js} +1 -1
- package/web/dist/assets/{compare-variants-BQu_t-_g.js → compare-variants-BSTikfuI.js} +1 -1
- package/web/dist/assets/{diff-controls-B6ok0TtQ.js → diff-controls-B5u0d3Ni.js} +1 -1
- package/web/dist/assets/{dropdown-menu-7KGQMoFj.js → dropdown-menu-BILyQM1H.js} +1 -1
- package/web/dist/assets/git-toolbar-pocL8rsv.js +1 -0
- package/web/dist/assets/{github-DCkk6sBm.js → github-CNmPdhB_.js} +1 -1
- package/web/dist/assets/index-C6s-lgD_.css +1 -0
- package/web/dist/assets/index-DzY_fd2W.js +7 -0
- package/web/dist/assets/{markdown-DvbymqXz.js → markdown-Bxw0CkSS.js} +1 -1
- package/web/dist/assets/pill-D0gYCUCW.js +1 -0
- package/web/dist/assets/{project-router-ChC5Rb-Y.js → project-router-CYgfAd0B.js} +1 -1
- package/web/dist/assets/{prompt-templates-j8qlK7c-.js → prompt-templates-C3okTwnY.js} +1 -1
- package/web/dist/assets/{repo-git-_h1NjOVt.js → repo-git-D1svWVbB.js} +1 -1
- package/web/dist/assets/{run-diff-BuATgZpx.js → run-diff-wfKABrYX.js} +1 -1
- package/web/dist/assets/run-header-ChtrVwvM.js +1 -0
- package/web/dist/assets/{skills-C-fq5BrZ.js → skills-CJvSNmFw.js} +1 -1
- package/web/dist/assets/{tab-link-BmGKj9Rt.js → tab-link-B5RpMPwe.js} +1 -1
- package/web/dist/assets/{task-changes-CHa6JWOS.js → task-changes-CUl7-JXd.js} +1 -1
- package/web/dist/assets/{task-commits-BqCqyWm1.js → task-commits-BJRxgIVH.js} +1 -1
- package/web/dist/assets/{task-files-BSA0l-YP.js → task-files-CKgtm7WB.js} +1 -1
- package/web/dist/assets/{task-thread-Q7Nj33DH.js → task-thread-DjtgrCED.js} +6 -6
- package/web/dist/assets/{textarea-ByZ-txS7.js → textarea-CcPLMGgF.js} +1 -1
- package/web/dist/assets/{thread-loading-DHT9p5o5.js → thread-loading-SU_xKa7g.js} +1 -1
- package/web/dist/assets/{token-metrics-k4XoovDS.js → token-metrics-CqDOn3bu.js} +1 -1
- package/web/dist/assets/use-desktop-vnn3Lv3H.js +1 -0
- package/web/dist/assets/{workflows-HJOd3lVi.js → workflows-GtbSAkW7.js} +1 -1
- package/web/dist/index.html +13 -13
- package/web/dist/assets/centered-state-DH8qtCz-.js +0 -43
- package/web/dist/assets/git-toolbar-DqbapMXr.js +0 -1
- package/web/dist/assets/index-Bnva-ttR.js +0 -7
- package/web/dist/assets/index-D5NkwqY7.css +0 -1
- package/web/dist/assets/pill-BL6ugwXo.js +0 -1
- package/web/dist/assets/run-header-DuAWswYM.js +0 -1
- package/web/dist/assets/square-terminal-B6RYYieR.js +0 -1
- package/web/dist/assets/use-desktop-BaYgO7YW.js +0 -1
|
@@ -3,6 +3,15 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
3
3
|
"/discover": {
|
|
4
4
|
$post: {
|
|
5
5
|
output: {
|
|
6
|
+
scope: "host-default-account";
|
|
7
|
+
runners: {
|
|
8
|
+
status: "connected" | "disconnected" | "not-installed" | "unknown";
|
|
9
|
+
enabled?: boolean | undefined;
|
|
10
|
+
hint?: string | undefined;
|
|
11
|
+
authFailureId?: string | undefined;
|
|
12
|
+
runner: "claude" | "codex" | "cursor" | "opencode" | "pi";
|
|
13
|
+
}[];
|
|
14
|
+
} | {
|
|
6
15
|
runner: "claude" | "codex" | "cursor" | "opencode" | "pi";
|
|
7
16
|
models: {
|
|
8
17
|
id: string;
|
|
@@ -13,15 +22,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
13
22
|
source: "cache" | "live" | "unavailable";
|
|
14
23
|
stale: boolean;
|
|
15
24
|
reason?: string | undefined;
|
|
16
|
-
} | {
|
|
17
|
-
scope: "host-default-account";
|
|
18
|
-
runners: {
|
|
19
|
-
status: "connected" | "disconnected" | "not-installed" | "unknown";
|
|
20
|
-
enabled?: boolean | undefined;
|
|
21
|
-
hint?: string | undefined;
|
|
22
|
-
authFailureId?: string | undefined;
|
|
23
|
-
runner: "claude" | "codex" | "cursor" | "opencode" | "pi";
|
|
24
|
-
}[];
|
|
25
25
|
};
|
|
26
26
|
outputFormat: "json";
|
|
27
27
|
status: 200;
|
|
@@ -104,13 +104,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
104
104
|
status: 200;
|
|
105
105
|
input: {
|
|
106
106
|
json: {
|
|
107
|
-
requestIds: string[];
|
|
108
|
-
mode?: "all" | "any" | "one" | undefined;
|
|
109
|
-
timeoutSeconds?: number | undefined;
|
|
110
|
-
} | {
|
|
111
107
|
workerIds: string[];
|
|
112
108
|
timeoutSeconds?: number | undefined;
|
|
113
109
|
mode?: "all" | "any" | "one" | undefined;
|
|
110
|
+
} | {
|
|
111
|
+
requestIds: string[];
|
|
112
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
113
|
+
timeoutSeconds?: number | undefined;
|
|
114
114
|
};
|
|
115
115
|
};
|
|
116
116
|
};
|
|
@@ -461,18 +461,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
461
461
|
} & {
|
|
462
462
|
"/:workerId": {
|
|
463
463
|
$get: {
|
|
464
|
-
output: {
|
|
465
|
-
error: string;
|
|
466
|
-
code?: "invalid_input" | undefined;
|
|
467
|
-
};
|
|
468
|
-
outputFormat: "json";
|
|
469
|
-
status: 400;
|
|
470
|
-
input: {
|
|
471
|
-
param: {
|
|
472
|
-
workerId: string;
|
|
473
|
-
};
|
|
474
|
-
};
|
|
475
|
-
} | {
|
|
476
464
|
output: {
|
|
477
465
|
workerId: string;
|
|
478
466
|
parentRunId: string;
|
|
@@ -549,11 +537,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
549
537
|
workerId: string;
|
|
550
538
|
};
|
|
551
539
|
};
|
|
552
|
-
}
|
|
553
|
-
};
|
|
554
|
-
} & {
|
|
555
|
-
"/:workerId/collect": {
|
|
556
|
-
$post: {
|
|
540
|
+
} | {
|
|
557
541
|
output: {
|
|
558
542
|
error: string;
|
|
559
543
|
code?: "invalid_input" | undefined;
|
|
@@ -564,10 +548,12 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
564
548
|
param: {
|
|
565
549
|
workerId: string;
|
|
566
550
|
};
|
|
567
|
-
} & {
|
|
568
|
-
json: Record<string, never>;
|
|
569
551
|
};
|
|
570
|
-
}
|
|
552
|
+
};
|
|
553
|
+
};
|
|
554
|
+
} & {
|
|
555
|
+
"/:workerId/collect": {
|
|
556
|
+
$post: {
|
|
571
557
|
output: {
|
|
572
558
|
workerId: string;
|
|
573
559
|
parentRunId: string;
|
|
@@ -669,11 +655,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
669
655
|
} & {
|
|
670
656
|
json: Record<string, never>;
|
|
671
657
|
};
|
|
672
|
-
}
|
|
673
|
-
};
|
|
674
|
-
} & {
|
|
675
|
-
"/:workerId/steer": {
|
|
676
|
-
$post: {
|
|
658
|
+
} | {
|
|
677
659
|
output: {
|
|
678
660
|
error: string;
|
|
679
661
|
code?: "invalid_input" | undefined;
|
|
@@ -685,11 +667,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
685
667
|
workerId: string;
|
|
686
668
|
};
|
|
687
669
|
} & {
|
|
688
|
-
json:
|
|
689
|
-
text: string;
|
|
690
|
-
};
|
|
670
|
+
json: Record<string, never>;
|
|
691
671
|
};
|
|
692
|
-
}
|
|
672
|
+
};
|
|
673
|
+
};
|
|
674
|
+
} & {
|
|
675
|
+
"/:workerId/steer": {
|
|
676
|
+
$post: {
|
|
693
677
|
output: {
|
|
694
678
|
workerId: string;
|
|
695
679
|
state: "delivered" | "queued";
|
|
@@ -705,11 +689,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
705
689
|
text: string;
|
|
706
690
|
};
|
|
707
691
|
};
|
|
708
|
-
}
|
|
709
|
-
};
|
|
710
|
-
} & {
|
|
711
|
-
"/:workerId/stop": {
|
|
712
|
-
$post: {
|
|
692
|
+
} | {
|
|
713
693
|
output: {
|
|
714
694
|
error: string;
|
|
715
695
|
code?: "invalid_input" | undefined;
|
|
@@ -721,9 +701,15 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
721
701
|
workerId: string;
|
|
722
702
|
};
|
|
723
703
|
} & {
|
|
724
|
-
json:
|
|
704
|
+
json: {
|
|
705
|
+
text: string;
|
|
706
|
+
};
|
|
725
707
|
};
|
|
726
|
-
}
|
|
708
|
+
};
|
|
709
|
+
};
|
|
710
|
+
} & {
|
|
711
|
+
"/:workerId/stop": {
|
|
712
|
+
$post: {
|
|
727
713
|
output: {
|
|
728
714
|
workerId: string;
|
|
729
715
|
state: "stopping" | "terminated";
|
|
@@ -737,11 +723,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
737
723
|
} & {
|
|
738
724
|
json: Record<string, never>;
|
|
739
725
|
};
|
|
740
|
-
}
|
|
741
|
-
};
|
|
742
|
-
} & {
|
|
743
|
-
"/:workerId/destroy": {
|
|
744
|
-
$post: {
|
|
726
|
+
} | {
|
|
745
727
|
output: {
|
|
746
728
|
error: string;
|
|
747
729
|
code?: "invalid_input" | undefined;
|
|
@@ -755,7 +737,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
755
737
|
} & {
|
|
756
738
|
json: Record<string, never>;
|
|
757
739
|
};
|
|
758
|
-
}
|
|
740
|
+
};
|
|
741
|
+
};
|
|
742
|
+
} & {
|
|
743
|
+
"/:workerId/destroy": {
|
|
744
|
+
$post: {
|
|
759
745
|
output: {
|
|
760
746
|
workerId: string;
|
|
761
747
|
state: "complete" | "incomplete";
|
|
@@ -778,6 +764,20 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
778
764
|
} & {
|
|
779
765
|
json: Record<string, never>;
|
|
780
766
|
};
|
|
767
|
+
} | {
|
|
768
|
+
output: {
|
|
769
|
+
error: string;
|
|
770
|
+
code?: "invalid_input" | undefined;
|
|
771
|
+
};
|
|
772
|
+
outputFormat: "json";
|
|
773
|
+
status: 400;
|
|
774
|
+
input: {
|
|
775
|
+
param: {
|
|
776
|
+
workerId: string;
|
|
777
|
+
};
|
|
778
|
+
} & {
|
|
779
|
+
json: Record<string, never>;
|
|
780
|
+
};
|
|
781
781
|
} | {
|
|
782
782
|
output: {
|
|
783
783
|
workerId: string;
|
|
@@ -807,11 +807,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
807
807
|
"/:workerId/diff": {
|
|
808
808
|
$get: {
|
|
809
809
|
output: {
|
|
810
|
-
|
|
811
|
-
|
|
810
|
+
workerId: string;
|
|
811
|
+
baselineSha: string;
|
|
812
|
+
diff: string;
|
|
813
|
+
truncated: boolean;
|
|
812
814
|
};
|
|
813
815
|
outputFormat: "json";
|
|
814
|
-
status:
|
|
816
|
+
status: 200;
|
|
815
817
|
input: {
|
|
816
818
|
param: {
|
|
817
819
|
workerId: string;
|
|
@@ -819,13 +821,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
819
821
|
};
|
|
820
822
|
} | {
|
|
821
823
|
output: {
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
diff: string;
|
|
825
|
-
truncated: boolean;
|
|
824
|
+
error: string;
|
|
825
|
+
code?: "invalid_input" | undefined;
|
|
826
826
|
};
|
|
827
827
|
outputFormat: "json";
|
|
828
|
-
status:
|
|
828
|
+
status: 400;
|
|
829
829
|
input: {
|
|
830
830
|
param: {
|
|
831
831
|
workerId: string;
|
package/dist/workflows/run.js
CHANGED
|
@@ -1313,7 +1313,7 @@ export class RunManager {
|
|
|
1313
1313
|
}
|
|
1314
1314
|
parkCiWait(runId, state) {
|
|
1315
1315
|
const wait = this.store.getRun(runId)?.ciWait;
|
|
1316
|
-
if (!wait || !state.session?.open || state.cancelled || state.pendingHumanAsk
|
|
1316
|
+
if (!wait || !state.session?.open || state.cancelled || state.pendingHumanAsk)
|
|
1317
1317
|
return false;
|
|
1318
1318
|
if (wait.phase === 'registered')
|
|
1319
1319
|
this.store.commitCiWait(runId, { ...wait, phase: 'parked' });
|
|
@@ -1331,10 +1331,21 @@ export class RunManager {
|
|
|
1331
1331
|
queueCiWake(runId) {
|
|
1332
1332
|
const run = this.store.getRun(runId);
|
|
1333
1333
|
const wait = run?.ciWait;
|
|
1334
|
-
if (this.disposed || this.recovering || !run || !wait?.result || !wait.wakeId ||
|
|
1335
|
-
|
|
1334
|
+
if (this.disposed || this.recovering || !run || !wait?.result || !wait.wakeId ||
|
|
1335
|
+
!['running', 'waiting', 'queued'].includes(run.status) || run.stopping ||
|
|
1336
1336
|
this.hasPendingHumanAsk(runId) || this.workerExecutionStopped(runId) || this.executionBlockedByRootFinish(run))
|
|
1337
1337
|
return;
|
|
1338
|
+
// Settlement ends the watcher. Keep a bounded-rate wake source until ACK,
|
|
1339
|
+
// withdrawal or termination, including refusals with no runner-ready callback.
|
|
1340
|
+
this.retryCiAdmission(runId);
|
|
1341
|
+
if (this.ciWakeAdmitted.has(runId)) {
|
|
1342
|
+
this.flushAgentInputs(runId);
|
|
1343
|
+
return;
|
|
1344
|
+
}
|
|
1345
|
+
if (this.ciWakeQueuedAt.has(runId)) {
|
|
1346
|
+
this.releaseSlot();
|
|
1347
|
+
return;
|
|
1348
|
+
}
|
|
1338
1349
|
const state = this.active.get(runId);
|
|
1339
1350
|
if (state) {
|
|
1340
1351
|
if (!this.monitoring.has(runId) || state.atTurnBoundary !== state.session || state.pendingHumanAsk)
|
|
@@ -1581,7 +1592,9 @@ export class RunManager {
|
|
|
1581
1592
|
*/
|
|
1582
1593
|
busySlots() {
|
|
1583
1594
|
const ordinaryWaiting = this.waiting.size - this.monitoring.size;
|
|
1584
|
-
|
|
1595
|
+
// An admitted CI wake reserves its slot while remaining visibly parked until ACK.
|
|
1596
|
+
const admittedMonitoring = [...this.ciWakeAdmitted].filter(id => this.monitoring.has(id)).length;
|
|
1597
|
+
const exemptMonitoring = Math.min(this.monitoring.size - admittedMonitoring, this.semaphore.maxMonitoringSessions());
|
|
1585
1598
|
return this.active.size + this.starting.size - ordinaryWaiting - exemptMonitoring - this.workerWaiting.size;
|
|
1586
1599
|
}
|
|
1587
1600
|
/** Epoch ms of this manager's oldest queued run (the semaphore's fairness
|
|
@@ -1673,7 +1686,7 @@ export class RunManager {
|
|
|
1673
1686
|
const defaultRunner = anyHold ? (await loadConfig(this.repoRoot)).defaultRunner : undefined;
|
|
1674
1687
|
// Removing one monitor above the exemption cap needs no new slot: it already holds one.
|
|
1675
1688
|
const chargedCiWake = (id) => this.ciWakeQueuedAt.has(id) && this.monitoring.has(id) &&
|
|
1676
|
-
this.monitoring.size > this.semaphore.maxMonitoringSessions();
|
|
1689
|
+
this.monitoring.size - [...this.ciWakeAdmitted].filter(id => this.monitoring.has(id)).length > this.semaphore.maxMonitoringSessions();
|
|
1677
1690
|
while (this.queue.length > 0) {
|
|
1678
1691
|
// FIFO among the runs that CAN start; a held one keeps its place in the queue rather
|
|
1679
1692
|
// than being dequeued and re-queued (which would churn its position and its record).
|
|
@@ -1717,10 +1730,16 @@ export class RunManager {
|
|
|
1717
1730
|
const state = this.active.get(runId);
|
|
1718
1731
|
if (!state.pendingHumanAsk && this.store.getRun(runId)?.ciWait?.result && state.atTurnBoundary === state.session) {
|
|
1719
1732
|
this.ciWakeAdmitted.add(runId);
|
|
1720
|
-
this.waiting.delete(runId);
|
|
1721
|
-
this.monitoring.delete(runId);
|
|
1722
1733
|
this.flushAgentInputs(runId);
|
|
1723
1734
|
}
|
|
1735
|
+
else if (this.store.getRun(runId)?.ciWait?.result) {
|
|
1736
|
+
// The runner may lose its boundary between queueing and admission.
|
|
1737
|
+
// Retain the wake, but do not spin on it in this pump pass.
|
|
1738
|
+
this.ciWakeQueuedAt.set(runId, Date.now());
|
|
1739
|
+
this.queue.push(runId);
|
|
1740
|
+
this.retryCiAdmission(runId);
|
|
1741
|
+
break;
|
|
1742
|
+
}
|
|
1724
1743
|
continue;
|
|
1725
1744
|
}
|
|
1726
1745
|
if (this.ciWakeQueuedAt.delete(runId))
|
|
@@ -4208,6 +4227,13 @@ export class RunManager {
|
|
|
4208
4227
|
throw new Error('CI observation must be delivered separately');
|
|
4209
4228
|
this.store.commitCiWaitDelivery(runId, ciWakeId);
|
|
4210
4229
|
this.ciWakeAdmitted.delete(runId);
|
|
4230
|
+
const retry = this.ciRetries.get(runId);
|
|
4231
|
+
if (retry)
|
|
4232
|
+
clearTimeout(retry);
|
|
4233
|
+
this.ciRetries.delete(runId);
|
|
4234
|
+
this.waiting.delete(runId);
|
|
4235
|
+
this.monitoring.delete(runId);
|
|
4236
|
+
this.store.updateRun(runId, { status: 'running', activity: undefined });
|
|
4211
4237
|
}
|
|
4212
4238
|
else {
|
|
4213
4239
|
const deliveredAt = new Date().toISOString();
|
|
@@ -4376,6 +4402,10 @@ export class RunManager {
|
|
|
4376
4402
|
this.workerWaiting.delete(runId);
|
|
4377
4403
|
this.clearIdleTimer(state);
|
|
4378
4404
|
this.clearMonitoringWakeTimer(state, runId);
|
|
4405
|
+
// A CI command can emit activity before its transport ACK. Keep its park
|
|
4406
|
+
// until the durable delivery checkpoint; admission already reserves capacity.
|
|
4407
|
+
if (this.store.getRun(runId)?.ciWait && this.ciWakeAdmitted.has(runId))
|
|
4408
|
+
return;
|
|
4379
4409
|
this.waiting.delete(runId);
|
|
4380
4410
|
this.monitoring.delete(runId);
|
|
4381
4411
|
this.store.updateRun(runId, { status: 'running', activity: undefined });
|