@wjarka/cezarion 0.14.6 → 0.14.7
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 +37 -2
- package/dist/agent-config/model-settings/shared.d.ts +2 -1
- package/dist/agent-config/model-settings/shared.js +1 -1
- package/dist/agent-config/model-settings/shared.js.map +1 -1
- package/dist/ci-wait/client.d.ts +4 -0
- package/dist/ci-wait/client.js +67 -0
- package/dist/ci-wait/client.js.map +1 -0
- package/dist/ci-wait/controller.d.ts +78 -0
- package/dist/ci-wait/controller.js +148 -0
- package/dist/ci-wait/controller.js.map +1 -0
- package/dist/ci-wait/github.d.ts +61 -0
- package/dist/ci-wait/github.js +209 -0
- package/dist/ci-wait/github.js.map +1 -0
- package/dist/ci-wait/injection.d.ts +3 -0
- package/dist/ci-wait/injection.js +26 -0
- package/dist/ci-wait/injection.js.map +1 -0
- package/dist/ci-wait/mcp.d.ts +97 -0
- package/dist/ci-wait/mcp.js +35 -0
- package/dist/ci-wait/mcp.js.map +1 -0
- package/dist/ci-wait/resources.d.ts +7 -0
- package/dist/ci-wait/resources.js +32 -0
- package/dist/ci-wait/resources.js.map +1 -0
- package/dist/ci-wait/supervisor.d.ts +21 -0
- package/dist/ci-wait/supervisor.js +163 -0
- package/dist/ci-wait/supervisor.js.map +1 -0
- package/dist/contract/ci-wait.d.ts +151 -0
- package/dist/contract/conversations.d.ts +7 -0
- package/dist/contract/delegation.d.ts +2 -0
- package/dist/contract/events.d.ts +3 -0
- package/dist/contract/index.d.ts +1 -0
- package/dist/contract/index.js +1016 -935
- package/dist/contract/runs.d.ts +461 -0
- package/dist/contract/skills.d.ts +92 -0
- package/dist/core/agent-env.js +2 -0
- package/dist/core/agent-env.js.map +1 -1
- package/dist/core/agent-runner.d.ts +6 -0
- package/dist/core/agent-runner.js +1 -0
- package/dist/core/agent-runner.js.map +1 -1
- package/dist/core/claude-cli-runner.js +10 -0
- package/dist/core/claude-cli-runner.js.map +1 -1
- package/dist/core/codex-app-server-runner.js +5 -1
- package/dist/core/codex-app-server-runner.js.map +1 -1
- package/dist/core/codex-app-server-transport.js +3 -1
- package/dist/core/codex-app-server-transport.js.map +1 -1
- package/dist/core/cursor-acp-runner.js +9 -1
- package/dist/core/cursor-acp-runner.js.map +1 -1
- package/dist/core/opencode-server-runner.js +6 -2
- package/dist/core/opencode-server-runner.js.map +1 -1
- package/dist/core/pi-runner.js +7 -1
- package/dist/core/pi-runner.js.map +1 -1
- package/dist/delegation/cli.js +8 -4
- package/dist/delegation/cli.js.map +1 -1
- package/dist/delegation/conversations.js +2 -1
- package/dist/delegation/conversations.js.map +1 -1
- package/dist/delegation/input.d.ts +6 -0
- package/dist/delegation/input.js +22 -0
- package/dist/delegation/input.js.map +1 -1
- package/dist/delegation/provision.js +3 -1
- package/dist/delegation/provision.js.map +1 -1
- package/dist/delegation/routes.d.ts +11 -0
- package/dist/delegation/service.js +31 -7
- package/dist/delegation/service.js.map +1 -1
- package/dist/delegation/transport.d.ts +11 -0
- package/dist/runs/delegation-state.d.ts +2 -0
- package/dist/runs/run-index.js +2 -3
- package/dist/runs/run-index.js.map +1 -1
- package/dist/runs/store.d.ts +514 -3
- package/dist/runs/store.js +85 -6
- package/dist/runs/store.js.map +1 -1
- package/dist/server/server.d.ts +1376 -12
- package/dist/workflows/run.d.ts +25 -1
- package/dist/workflows/run.js +470 -43
- package/dist/workflows/run.js.map +1 -1
- package/package.json +4 -3
- package/scripts/mock-ci-tool.mjs +53 -0
- package/scripts/mock-claude.mjs +8 -0
- package/scripts/mock-codex-app-server.mjs +212 -0
- package/scripts/mock-cursor-acp.mjs +6 -2
- package/scripts/mock-opencode-serve.mjs +392 -0
- package/scripts/mock-pi-rpc.mjs +7 -0
- package/scripts/pi-ci-wait.mjs +14 -0
- package/web/dist/assets/{agent-accounts-lP_xK83o.js → agent-accounts-BZm_2WAv.js} +1 -1
- package/web/dist/assets/{alert-dialog-CmDuefYh.js → alert-dialog-B422RI-k.js} +1 -1
- package/web/dist/assets/{collapsible-BqX8REmY.js → collapsible-Cy_Fmkrd.js} +1 -1
- package/web/dist/assets/{commit-list-BWvv1H7A.js → commit-list-CLxXMZvP.js} +1 -1
- package/web/dist/assets/{compare-variants-Bg7eLW3z.js → compare-variants-D2dRj6H_.js} +1 -1
- package/web/dist/assets/{diff-controls-HwWHHait.js → diff-controls-BGrXGi7O.js} +1 -1
- package/web/dist/assets/{diff-stat-mNkhAc5m.js → diff-stat-Cgnl_hYF.js} +1 -1
- package/web/dist/assets/{diff-0GBum40Q2.js → diff-tRE59UNb2.js} +2 -2
- package/web/dist/assets/{diff-view-DW64doDY.js → diff-view-DN1ort7Q.js} +1 -1
- package/web/dist/assets/{dropdown-menu-sZjYPcLh.js → dropdown-menu-dwDGT8MM.js} +1 -1
- package/web/dist/assets/{git-toolbar-DBW5EIcY.js → git-toolbar-UiHnGvE0.js} +1 -1
- package/web/dist/assets/{github-CkZ4hWI5.js → github-CaGjGQnW.js} +1 -1
- package/web/dist/assets/{image-preview-DZicGNkU.js → image-preview-C2JGcBlC.js} +1 -1
- package/web/dist/assets/index-CXZukB1O.css +1 -0
- package/web/dist/assets/{index-DWWI-B9n.js → index-D0RwD9-c.js} +3 -3
- package/web/dist/assets/{markdown-AY2K3kIV.js → markdown-C_IcKVQd.js} +1 -1
- package/web/dist/assets/{pill-CcJqA1cL.js → pill-BsbO6G7y.js} +1 -1
- package/web/dist/assets/{project-router-SwsXRKXs.js → project-router-DbLkll25.js} +1 -1
- package/web/dist/assets/{prompt-templates-iV2WD2jy.js → prompt-templates-BlTGJB5W.js} +1 -1
- package/web/dist/assets/{repo-git-BW3TOs3U.js → repo-git-CWD2dO8S.js} +1 -1
- package/web/dist/assets/{run-diff-DPUNj56q.js → run-diff-CyG0Nciv.js} +1 -1
- package/web/dist/assets/{run-header-CSaJIGXl.css → run-header-BJQfFL2l.css} +1 -1
- package/web/dist/assets/run-header-IFyIGCey.js +1 -0
- package/web/dist/assets/{skills-Dv8Vwv5D.js → skills-e7wHnuoc.js} +1 -1
- package/web/dist/assets/{tab-link-DSftvkZS.js → tab-link-BWNp3mLY.js} +1 -1
- package/web/dist/assets/{task-changes-CTCuVls1.js → task-changes-CpJImtq8.js} +1 -1
- package/web/dist/assets/{task-commits-weJQ5GSl.js → task-commits-hujrykPI.js} +1 -1
- package/web/dist/assets/{task-files-B4bUimY8.js → task-files-CjTiGtjt.js} +1 -1
- package/web/dist/assets/{task-thread-BuXrVB9K.js → task-thread-DDPFDS8C.js} +4 -4
- package/web/dist/assets/task-thread-Dc3wplva.css +1 -0
- package/web/dist/assets/{textarea-CxRdTWlq.js → textarea-FjaU370i.js} +1 -1
- package/web/dist/assets/thread-loading-77sJ8Yu_.js +1 -0
- package/web/dist/assets/{token-metrics-Z3UFYbuD.js → token-metrics-Clxh03bE.js} +1 -1
- package/web/dist/assets/utils-PYYcpCFZ.js +64 -0
- package/web/dist/assets/{workflows-vA27Yi8W.js → workflows-DGUQmWy7.js} +1 -1
- package/web/dist/assets/{zoomable-image-DUE1KFJ0.js → zoomable-image-Z3JDnm0b.js} +1 -1
- package/web/dist/index.html +14 -14
- package/web/dist/assets/index-DK0Mkv2m.css +0 -1
- package/web/dist/assets/run-header-DbDluWoV.js +0 -1
- package/web/dist/assets/task-thread-DMRD0IVt.css +0 -1
- package/web/dist/assets/thread-loading-JlP6dUpX.js +0 -1
- package/web/dist/assets/utils-CUnaAifW.js +0 -64
package/dist/runs/store.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from 'node:events';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import type { ConversationState, AgentInput, DelegationState, WorkerCollectedResult } from '../contract/index.js';
|
|
3
|
+
import type { CiWait, ConversationState, AgentInput, DelegationState, WorkerCollectedResult } from '../contract/index.js';
|
|
4
4
|
import { type WorkerExecutionIdentity } from '../delegation/execution-identity.ts';
|
|
5
5
|
import { workflowDefSchema } from '../workflows/types.ts';
|
|
6
6
|
import type { RunnerId } from '../core/agent-runner.ts';
|
|
@@ -96,6 +96,7 @@ export declare const runRecordSchema: z.ZodObject<{
|
|
|
96
96
|
human: "human";
|
|
97
97
|
lifecycle: "lifecycle";
|
|
98
98
|
}>>;
|
|
99
|
+
agentInputId: z.ZodOptional<z.ZodUUID>;
|
|
99
100
|
}, z.core.$strip>>;
|
|
100
101
|
invalidAsk: z.ZodOptional<z.ZodBoolean>;
|
|
101
102
|
delegation: z.ZodCatch<z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -122,6 +123,8 @@ export declare const runRecordSchema: z.ZodObject<{
|
|
|
122
123
|
destroyed: "destroyed";
|
|
123
124
|
late: "late";
|
|
124
125
|
}>;
|
|
126
|
+
resumed: z.ZodOptional<z.ZodLiteral<true>>;
|
|
127
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
125
128
|
}, z.core.$strict>>;
|
|
126
129
|
outcomes: z.ZodArray<z.ZodObject<{
|
|
127
130
|
requestId: z.ZodUUID;
|
|
@@ -484,6 +487,95 @@ export declare const runRecordSchema: z.ZodObject<{
|
|
|
484
487
|
createdAt: z.ZodISODateTime;
|
|
485
488
|
deliveredAt: z.ZodOptional<z.ZodISODateTime>;
|
|
486
489
|
}, z.core.$strict>>>;
|
|
490
|
+
ciWait: z.ZodOptional<z.ZodObject<{
|
|
491
|
+
prUrl: z.ZodString;
|
|
492
|
+
repository: z.ZodString;
|
|
493
|
+
prNumber: z.ZodNumber;
|
|
494
|
+
headSha: z.ZodString;
|
|
495
|
+
id: z.ZodUUID;
|
|
496
|
+
generation: z.ZodString;
|
|
497
|
+
turnId: z.ZodString;
|
|
498
|
+
timeoutSeconds: z.ZodNumber;
|
|
499
|
+
registeredAt: z.ZodISODateTime;
|
|
500
|
+
deadline: z.ZodISODateTime;
|
|
501
|
+
phase: z.ZodEnum<{
|
|
502
|
+
delivered: "delivered";
|
|
503
|
+
parked: "parked";
|
|
504
|
+
registered: "registered";
|
|
505
|
+
"wake-pending": "wake-pending";
|
|
506
|
+
withdrawn: "withdrawn";
|
|
507
|
+
}>;
|
|
508
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
509
|
+
outcome: z.ZodEnum<{
|
|
510
|
+
cancelled: "cancelled";
|
|
511
|
+
deadline: "deadline";
|
|
512
|
+
error: "error";
|
|
513
|
+
failed: "failed";
|
|
514
|
+
head_changed: "head_changed";
|
|
515
|
+
no_checks: "no_checks";
|
|
516
|
+
passed: "passed";
|
|
517
|
+
skipped: "skipped";
|
|
518
|
+
}>;
|
|
519
|
+
headSha: z.ZodString;
|
|
520
|
+
observedHeadSha: z.ZodOptional<z.ZodString>;
|
|
521
|
+
observedAt: z.ZodISODateTime;
|
|
522
|
+
checks: z.ZodArray<z.ZodObject<{
|
|
523
|
+
name: z.ZodString;
|
|
524
|
+
state: z.ZodString;
|
|
525
|
+
link: z.ZodString;
|
|
526
|
+
}, z.core.$strict>>;
|
|
527
|
+
totalChecks: z.ZodNumber;
|
|
528
|
+
truncated: z.ZodBoolean;
|
|
529
|
+
diagnostic: z.ZodOptional<z.ZodString>;
|
|
530
|
+
}, z.core.$strict>>;
|
|
531
|
+
wakeId: z.ZodOptional<z.ZodString>;
|
|
532
|
+
deliveredAt: z.ZodOptional<z.ZodISODateTime>;
|
|
533
|
+
}, z.core.$strict>>;
|
|
534
|
+
lastCiWait: z.ZodOptional<z.ZodObject<{
|
|
535
|
+
prUrl: z.ZodString;
|
|
536
|
+
repository: z.ZodString;
|
|
537
|
+
prNumber: z.ZodNumber;
|
|
538
|
+
headSha: z.ZodString;
|
|
539
|
+
id: z.ZodUUID;
|
|
540
|
+
generation: z.ZodString;
|
|
541
|
+
turnId: z.ZodString;
|
|
542
|
+
timeoutSeconds: z.ZodNumber;
|
|
543
|
+
registeredAt: z.ZodISODateTime;
|
|
544
|
+
deadline: z.ZodISODateTime;
|
|
545
|
+
phase: z.ZodEnum<{
|
|
546
|
+
delivered: "delivered";
|
|
547
|
+
parked: "parked";
|
|
548
|
+
registered: "registered";
|
|
549
|
+
"wake-pending": "wake-pending";
|
|
550
|
+
withdrawn: "withdrawn";
|
|
551
|
+
}>;
|
|
552
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
553
|
+
outcome: z.ZodEnum<{
|
|
554
|
+
cancelled: "cancelled";
|
|
555
|
+
deadline: "deadline";
|
|
556
|
+
error: "error";
|
|
557
|
+
failed: "failed";
|
|
558
|
+
head_changed: "head_changed";
|
|
559
|
+
no_checks: "no_checks";
|
|
560
|
+
passed: "passed";
|
|
561
|
+
skipped: "skipped";
|
|
562
|
+
}>;
|
|
563
|
+
headSha: z.ZodString;
|
|
564
|
+
observedHeadSha: z.ZodOptional<z.ZodString>;
|
|
565
|
+
observedAt: z.ZodISODateTime;
|
|
566
|
+
checks: z.ZodArray<z.ZodObject<{
|
|
567
|
+
name: z.ZodString;
|
|
568
|
+
state: z.ZodString;
|
|
569
|
+
link: z.ZodString;
|
|
570
|
+
}, z.core.$strict>>;
|
|
571
|
+
totalChecks: z.ZodNumber;
|
|
572
|
+
truncated: z.ZodBoolean;
|
|
573
|
+
diagnostic: z.ZodOptional<z.ZodString>;
|
|
574
|
+
}, z.core.$strict>>;
|
|
575
|
+
wakeId: z.ZodOptional<z.ZodString>;
|
|
576
|
+
deliveredAt: z.ZodOptional<z.ZodISODateTime>;
|
|
577
|
+
}, z.core.$strict>>;
|
|
578
|
+
lastCiWaitError: z.ZodOptional<z.ZodString>;
|
|
487
579
|
taskImages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
488
580
|
model: z.ZodOptional<z.ZodString>;
|
|
489
581
|
effort: z.ZodOptional<z.ZodString>;
|
|
@@ -641,6 +733,415 @@ export declare const runRecordSchema: z.ZodObject<{
|
|
|
641
733
|
path: z.ZodOptional<z.ZodString>;
|
|
642
734
|
}, z.core.$strip>>>;
|
|
643
735
|
}, z.core.$strip>;
|
|
736
|
+
/** Salvage CI state identically for live stores and the read-only workspace index. */
|
|
737
|
+
export declare function parseRunRecords(raw: unknown): z.ZodSafeParseResult<{
|
|
738
|
+
id: string;
|
|
739
|
+
title: string;
|
|
740
|
+
titleSummary?: string | undefined;
|
|
741
|
+
diffStat?: {
|
|
742
|
+
adds: number;
|
|
743
|
+
dels: number;
|
|
744
|
+
files: number;
|
|
745
|
+
repointed?: boolean | undefined;
|
|
746
|
+
} | undefined;
|
|
747
|
+
workflow: string;
|
|
748
|
+
task: string;
|
|
749
|
+
queuedMessages?: {
|
|
750
|
+
id: string;
|
|
751
|
+
text: string;
|
|
752
|
+
images?: string[] | undefined;
|
|
753
|
+
createdAt: string;
|
|
754
|
+
}[] | undefined;
|
|
755
|
+
continuationMessage?: {
|
|
756
|
+
id: string;
|
|
757
|
+
text: string;
|
|
758
|
+
images?: string[] | undefined;
|
|
759
|
+
createdAt: string;
|
|
760
|
+
origin?: "human" | "lifecycle" | undefined;
|
|
761
|
+
agentInputId?: string | undefined;
|
|
762
|
+
} | undefined;
|
|
763
|
+
invalidAsk?: boolean | undefined;
|
|
764
|
+
delegation?: {
|
|
765
|
+
role: "root";
|
|
766
|
+
conversation?: {
|
|
767
|
+
messages: {
|
|
768
|
+
senderRunId: string;
|
|
769
|
+
recipientRunId: string;
|
|
770
|
+
kind: "follow-up" | "progress" | "reply" | "request";
|
|
771
|
+
requestId?: string | undefined;
|
|
772
|
+
id: string;
|
|
773
|
+
text: string;
|
|
774
|
+
createdAt: string;
|
|
775
|
+
deadline?: string | undefined;
|
|
776
|
+
requestHash: string;
|
|
777
|
+
state: "accepted" | "continuation-required" | "destroyed" | "late";
|
|
778
|
+
resumed?: true | undefined;
|
|
779
|
+
instruction?: string | undefined;
|
|
780
|
+
}[];
|
|
781
|
+
outcomes: {
|
|
782
|
+
requestId: string;
|
|
783
|
+
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "replied" | "sender-closed" | "timed-out";
|
|
784
|
+
observedAt: string;
|
|
785
|
+
replyId?: string | undefined;
|
|
786
|
+
}[];
|
|
787
|
+
} | undefined;
|
|
788
|
+
permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
|
|
789
|
+
receipts: {
|
|
790
|
+
requestId: string;
|
|
791
|
+
workerId: string;
|
|
792
|
+
requestHash: string;
|
|
793
|
+
deletion?: {
|
|
794
|
+
phase: "complete" | "pending";
|
|
795
|
+
revision: number;
|
|
796
|
+
resourceId: string;
|
|
797
|
+
generation: string;
|
|
798
|
+
} | undefined;
|
|
799
|
+
}[];
|
|
800
|
+
wait?: {
|
|
801
|
+
id: string;
|
|
802
|
+
workerIds: string[];
|
|
803
|
+
requestIds?: string[] | undefined;
|
|
804
|
+
requestOutcomes?: {
|
|
805
|
+
requestId: string;
|
|
806
|
+
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "replied" | "sender-closed" | "timed-out";
|
|
807
|
+
observedAt: string;
|
|
808
|
+
replyId?: string | undefined;
|
|
809
|
+
}[] | undefined;
|
|
810
|
+
deadline: string;
|
|
811
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
812
|
+
revisions?: {
|
|
813
|
+
workerId: string;
|
|
814
|
+
revision: number;
|
|
815
|
+
}[] | undefined;
|
|
816
|
+
reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
|
|
817
|
+
phase: "parked" | "registered" | "wake-pending";
|
|
818
|
+
outcomes: {
|
|
819
|
+
workerId: string;
|
|
820
|
+
status: "cancelled" | "done" | "failed" | "review";
|
|
821
|
+
observedAt: string;
|
|
822
|
+
summary?: string | undefined;
|
|
823
|
+
revision?: number | undefined;
|
|
824
|
+
}[];
|
|
825
|
+
wakeId?: string | undefined;
|
|
826
|
+
} | undefined;
|
|
827
|
+
lastWait?: {
|
|
828
|
+
id: string;
|
|
829
|
+
workerIds: string[];
|
|
830
|
+
requestIds?: string[] | undefined;
|
|
831
|
+
requestOutcomes?: {
|
|
832
|
+
requestId: string;
|
|
833
|
+
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "replied" | "sender-closed" | "timed-out";
|
|
834
|
+
observedAt: string;
|
|
835
|
+
replyId?: string | undefined;
|
|
836
|
+
}[] | undefined;
|
|
837
|
+
deadline: string;
|
|
838
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
839
|
+
revisions?: {
|
|
840
|
+
workerId: string;
|
|
841
|
+
revision: number;
|
|
842
|
+
}[] | undefined;
|
|
843
|
+
reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
|
|
844
|
+
phase: "parked" | "registered" | "wake-pending";
|
|
845
|
+
outcomes: {
|
|
846
|
+
workerId: string;
|
|
847
|
+
status: "cancelled" | "done" | "failed" | "review";
|
|
848
|
+
observedAt: string;
|
|
849
|
+
summary?: string | undefined;
|
|
850
|
+
revision?: number | undefined;
|
|
851
|
+
}[];
|
|
852
|
+
wakeId?: string | undefined;
|
|
853
|
+
} | undefined;
|
|
854
|
+
results?: {
|
|
855
|
+
workerId: string;
|
|
856
|
+
revision: number;
|
|
857
|
+
snapshotId: string;
|
|
858
|
+
observedAt: string;
|
|
859
|
+
lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
|
|
860
|
+
previous?: {
|
|
861
|
+
revision: number;
|
|
862
|
+
observedAt: string;
|
|
863
|
+
lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
|
|
864
|
+
} | undefined;
|
|
865
|
+
}[] | undefined;
|
|
866
|
+
finishRequestedAt?: string | undefined;
|
|
867
|
+
historyDeletion?: "pending" | undefined;
|
|
868
|
+
completion?: {
|
|
869
|
+
phase: "attention" | "waiting";
|
|
870
|
+
waitId?: string | undefined;
|
|
871
|
+
} | undefined;
|
|
872
|
+
} | {
|
|
873
|
+
role: "worker";
|
|
874
|
+
wait?: {
|
|
875
|
+
id: string;
|
|
876
|
+
workerIds: string[];
|
|
877
|
+
requestIds?: string[] | undefined;
|
|
878
|
+
requestOutcomes?: {
|
|
879
|
+
requestId: string;
|
|
880
|
+
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "replied" | "sender-closed" | "timed-out";
|
|
881
|
+
observedAt: string;
|
|
882
|
+
replyId?: string | undefined;
|
|
883
|
+
}[] | undefined;
|
|
884
|
+
deadline: string;
|
|
885
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
886
|
+
revisions?: {
|
|
887
|
+
workerId: string;
|
|
888
|
+
revision: number;
|
|
889
|
+
}[] | undefined;
|
|
890
|
+
reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
|
|
891
|
+
phase: "parked" | "registered" | "wake-pending";
|
|
892
|
+
outcomes: {
|
|
893
|
+
workerId: string;
|
|
894
|
+
status: "cancelled" | "done" | "failed" | "review";
|
|
895
|
+
observedAt: string;
|
|
896
|
+
summary?: string | undefined;
|
|
897
|
+
revision?: number | undefined;
|
|
898
|
+
}[];
|
|
899
|
+
wakeId?: string | undefined;
|
|
900
|
+
} | undefined;
|
|
901
|
+
lastWait?: {
|
|
902
|
+
id: string;
|
|
903
|
+
workerIds: string[];
|
|
904
|
+
requestIds?: string[] | undefined;
|
|
905
|
+
requestOutcomes?: {
|
|
906
|
+
requestId: string;
|
|
907
|
+
status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "replied" | "sender-closed" | "timed-out";
|
|
908
|
+
observedAt: string;
|
|
909
|
+
replyId?: string | undefined;
|
|
910
|
+
}[] | undefined;
|
|
911
|
+
deadline: string;
|
|
912
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
913
|
+
revisions?: {
|
|
914
|
+
workerId: string;
|
|
915
|
+
revision: number;
|
|
916
|
+
}[] | undefined;
|
|
917
|
+
reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
|
|
918
|
+
phase: "parked" | "registered" | "wake-pending";
|
|
919
|
+
outcomes: {
|
|
920
|
+
workerId: string;
|
|
921
|
+
status: "cancelled" | "done" | "failed" | "review";
|
|
922
|
+
observedAt: string;
|
|
923
|
+
summary?: string | undefined;
|
|
924
|
+
revision?: number | undefined;
|
|
925
|
+
}[];
|
|
926
|
+
wakeId?: string | undefined;
|
|
927
|
+
} | undefined;
|
|
928
|
+
permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
|
|
929
|
+
parentRunId: string;
|
|
930
|
+
workspace: {
|
|
931
|
+
ownerRunId: string;
|
|
932
|
+
resourceId: string;
|
|
933
|
+
kind: "owned-isolated";
|
|
934
|
+
path: string;
|
|
935
|
+
branch: string;
|
|
936
|
+
baselineSha: string;
|
|
937
|
+
};
|
|
938
|
+
destroy?: {
|
|
939
|
+
requestedAt: string;
|
|
940
|
+
phase: "cleaning" | "complete" | "incomplete" | "requested" | "terminating";
|
|
941
|
+
remaining: ("branch" | "process" | "worktree")[];
|
|
942
|
+
error?: string | undefined;
|
|
943
|
+
} | undefined;
|
|
944
|
+
context?: {
|
|
945
|
+
text?: string | undefined;
|
|
946
|
+
inputs: {
|
|
947
|
+
source: {
|
|
948
|
+
kind: "baseline-file";
|
|
949
|
+
path: string;
|
|
950
|
+
} | {
|
|
951
|
+
kind: "parent-attachment";
|
|
952
|
+
id: string;
|
|
953
|
+
};
|
|
954
|
+
path: string;
|
|
955
|
+
sha256: string;
|
|
956
|
+
bytes: number;
|
|
957
|
+
}[];
|
|
958
|
+
} | undefined;
|
|
959
|
+
executionRevision?: number | undefined;
|
|
960
|
+
executionStartSeq?: number | undefined;
|
|
961
|
+
} | {
|
|
962
|
+
role: "invalid";
|
|
963
|
+
} | undefined;
|
|
964
|
+
agentInputs?: {
|
|
965
|
+
conversation?: {
|
|
966
|
+
senderRunId: string;
|
|
967
|
+
recipientRunId: string;
|
|
968
|
+
kind: "follow-up" | "progress" | "reply" | "request";
|
|
969
|
+
requestId?: string | undefined;
|
|
970
|
+
} | undefined;
|
|
971
|
+
id: string;
|
|
972
|
+
source: "agent" | "lifecycle";
|
|
973
|
+
parentRunId: string;
|
|
974
|
+
text: string;
|
|
975
|
+
createdAt: string;
|
|
976
|
+
deliveredAt?: string | undefined;
|
|
977
|
+
}[] | undefined;
|
|
978
|
+
ciWait?: {
|
|
979
|
+
prUrl: string;
|
|
980
|
+
repository: string;
|
|
981
|
+
prNumber: number;
|
|
982
|
+
headSha: string;
|
|
983
|
+
id: string;
|
|
984
|
+
generation: string;
|
|
985
|
+
turnId: string;
|
|
986
|
+
timeoutSeconds: number;
|
|
987
|
+
registeredAt: string;
|
|
988
|
+
deadline: string;
|
|
989
|
+
phase: "delivered" | "parked" | "registered" | "wake-pending" | "withdrawn";
|
|
990
|
+
result?: {
|
|
991
|
+
outcome: "cancelled" | "deadline" | "error" | "failed" | "head_changed" | "no_checks" | "passed" | "skipped";
|
|
992
|
+
headSha: string;
|
|
993
|
+
observedHeadSha?: string | undefined;
|
|
994
|
+
observedAt: string;
|
|
995
|
+
checks: {
|
|
996
|
+
name: string;
|
|
997
|
+
state: string;
|
|
998
|
+
link: string;
|
|
999
|
+
}[];
|
|
1000
|
+
totalChecks: number;
|
|
1001
|
+
truncated: boolean;
|
|
1002
|
+
diagnostic?: string | undefined;
|
|
1003
|
+
} | undefined;
|
|
1004
|
+
wakeId?: string | undefined;
|
|
1005
|
+
deliveredAt?: string | undefined;
|
|
1006
|
+
} | undefined;
|
|
1007
|
+
lastCiWait?: {
|
|
1008
|
+
prUrl: string;
|
|
1009
|
+
repository: string;
|
|
1010
|
+
prNumber: number;
|
|
1011
|
+
headSha: string;
|
|
1012
|
+
id: string;
|
|
1013
|
+
generation: string;
|
|
1014
|
+
turnId: string;
|
|
1015
|
+
timeoutSeconds: number;
|
|
1016
|
+
registeredAt: string;
|
|
1017
|
+
deadline: string;
|
|
1018
|
+
phase: "delivered" | "parked" | "registered" | "wake-pending" | "withdrawn";
|
|
1019
|
+
result?: {
|
|
1020
|
+
outcome: "cancelled" | "deadline" | "error" | "failed" | "head_changed" | "no_checks" | "passed" | "skipped";
|
|
1021
|
+
headSha: string;
|
|
1022
|
+
observedHeadSha?: string | undefined;
|
|
1023
|
+
observedAt: string;
|
|
1024
|
+
checks: {
|
|
1025
|
+
name: string;
|
|
1026
|
+
state: string;
|
|
1027
|
+
link: string;
|
|
1028
|
+
}[];
|
|
1029
|
+
totalChecks: number;
|
|
1030
|
+
truncated: boolean;
|
|
1031
|
+
diagnostic?: string | undefined;
|
|
1032
|
+
} | undefined;
|
|
1033
|
+
wakeId?: string | undefined;
|
|
1034
|
+
deliveredAt?: string | undefined;
|
|
1035
|
+
} | undefined;
|
|
1036
|
+
lastCiWaitError?: string | undefined;
|
|
1037
|
+
taskImages?: string[] | undefined;
|
|
1038
|
+
model?: string | undefined;
|
|
1039
|
+
effort?: string | undefined;
|
|
1040
|
+
modelIdentity?: string | undefined;
|
|
1041
|
+
runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
|
|
1042
|
+
agentProfile?: string | undefined;
|
|
1043
|
+
systemPrompt?: string | undefined;
|
|
1044
|
+
generateFollowups?: boolean | undefined;
|
|
1045
|
+
autonomous?: boolean | undefined;
|
|
1046
|
+
automation?: {
|
|
1047
|
+
automationId: string;
|
|
1048
|
+
automationRevision: number;
|
|
1049
|
+
receiptId: string;
|
|
1050
|
+
event: string;
|
|
1051
|
+
githubUrl: string;
|
|
1052
|
+
} | undefined;
|
|
1053
|
+
status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
|
|
1054
|
+
stopping?: boolean | undefined;
|
|
1055
|
+
activity?: "monitoring" | undefined;
|
|
1056
|
+
hasPendingHumanAsk?: boolean | undefined;
|
|
1057
|
+
monitoringWakeAt?: string | undefined;
|
|
1058
|
+
monitoringWakeCapReached?: boolean | undefined;
|
|
1059
|
+
autoResumeAt?: string | undefined;
|
|
1060
|
+
autoResumeAttempts?: number | undefined;
|
|
1061
|
+
createdAt: string;
|
|
1062
|
+
startedAt?: string | undefined;
|
|
1063
|
+
finishedAt?: string | undefined;
|
|
1064
|
+
tokensUsed: number;
|
|
1065
|
+
inputTokens?: number | undefined;
|
|
1066
|
+
outputTokens?: number | undefined;
|
|
1067
|
+
costUsd?: number | undefined;
|
|
1068
|
+
pullRequestUrl?: string | undefined;
|
|
1069
|
+
referencedPullRequestUrl?: string | undefined;
|
|
1070
|
+
prNumber?: number | undefined;
|
|
1071
|
+
issueNumber?: number | undefined;
|
|
1072
|
+
referencedIssueNumberSeeded?: boolean | undefined;
|
|
1073
|
+
titleOrigin?: "auto" | "marker" | "user" | undefined;
|
|
1074
|
+
markerRefs?: {
|
|
1075
|
+
pr?: number | undefined;
|
|
1076
|
+
issue?: number | undefined;
|
|
1077
|
+
} | undefined;
|
|
1078
|
+
referencedPrCandidates?: string[] | undefined;
|
|
1079
|
+
referencedIssueUrl?: string | undefined;
|
|
1080
|
+
referencedIssueCandidates?: string[] | undefined;
|
|
1081
|
+
worktree?: false | undefined;
|
|
1082
|
+
worktreePath?: string | undefined;
|
|
1083
|
+
branch?: string | undefined;
|
|
1084
|
+
baseBranch?: string | undefined;
|
|
1085
|
+
worktreeReclaimedAt?: string | undefined;
|
|
1086
|
+
groupId?: string | undefined;
|
|
1087
|
+
variant?: string | undefined;
|
|
1088
|
+
peakRssBytes?: number | undefined;
|
|
1089
|
+
peakProcCount?: number | undefined;
|
|
1090
|
+
archived: boolean;
|
|
1091
|
+
archivedAt?: string | undefined;
|
|
1092
|
+
pinned?: boolean | undefined;
|
|
1093
|
+
pinnedAt?: string | undefined;
|
|
1094
|
+
seenAt?: string | undefined;
|
|
1095
|
+
currentStepId?: string | undefined;
|
|
1096
|
+
error?: string | undefined;
|
|
1097
|
+
steps: {
|
|
1098
|
+
id: string;
|
|
1099
|
+
name: string;
|
|
1100
|
+
kind: "agent" | "check";
|
|
1101
|
+
status: "cancelled" | "done" | "failed" | "pending" | "review" | "running" | "skipped" | "waiting";
|
|
1102
|
+
iterations: number;
|
|
1103
|
+
retriesUsed?: number | undefined;
|
|
1104
|
+
tokensUsed: number;
|
|
1105
|
+
inputTokens?: number | undefined;
|
|
1106
|
+
outputTokens?: number | undefined;
|
|
1107
|
+
usageInvocationsStarted?: number | undefined;
|
|
1108
|
+
usageInvocationsObserved?: number | undefined;
|
|
1109
|
+
usageTurnsStarted?: number | undefined;
|
|
1110
|
+
usageTurnsRecorded?: number | undefined;
|
|
1111
|
+
usageInvocationEpoch?: number | undefined;
|
|
1112
|
+
startedAt?: string | undefined;
|
|
1113
|
+
finishedAt?: string | undefined;
|
|
1114
|
+
error?: string | undefined;
|
|
1115
|
+
sessionId?: string | undefined;
|
|
1116
|
+
backend?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
|
|
1117
|
+
profileId?: string | undefined;
|
|
1118
|
+
costUsd?: number | undefined;
|
|
1119
|
+
synthetic?: "continuation" | undefined;
|
|
1120
|
+
}[];
|
|
1121
|
+
workflowDef?: {
|
|
1122
|
+
name: string;
|
|
1123
|
+
description?: string | undefined;
|
|
1124
|
+
steps: {
|
|
1125
|
+
id: string;
|
|
1126
|
+
name?: string | undefined;
|
|
1127
|
+
prompt?: string | undefined;
|
|
1128
|
+
skill?: string | undefined;
|
|
1129
|
+
model?: string | undefined;
|
|
1130
|
+
effort?: string | undefined;
|
|
1131
|
+
runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
|
|
1132
|
+
agentProfile?: string | undefined;
|
|
1133
|
+
allowedTools?: string[] | undefined;
|
|
1134
|
+
bashAllowlist?: string[] | undefined;
|
|
1135
|
+
command?: string | undefined;
|
|
1136
|
+
onFail?: {
|
|
1137
|
+
retry: string;
|
|
1138
|
+
max: number;
|
|
1139
|
+
} | undefined;
|
|
1140
|
+
}[];
|
|
1141
|
+
source: "built-in" | "file";
|
|
1142
|
+
path?: string | undefined;
|
|
1143
|
+
} | undefined;
|
|
1144
|
+
}[]>;
|
|
644
1145
|
export type StepState = z.infer<typeof stepStateSchema>;
|
|
645
1146
|
export type QueuedMessage = z.infer<typeof queuedMessageSchema>;
|
|
646
1147
|
export type RunRecord = z.infer<typeof runRecordSchema>;
|
|
@@ -746,7 +1247,13 @@ export declare class RunStore extends EventEmitter {
|
|
|
746
1247
|
input: AgentInput;
|
|
747
1248
|
}): void;
|
|
748
1249
|
/** Observable atomic input checkpoint: a failed write publishes nothing. */
|
|
749
|
-
commitAgentInputs(id: string, inputs: readonly AgentInput[]): void;
|
|
1250
|
+
commitAgentInputs(id: string, inputs: readonly AgentInput[], openingContinuationInputId?: string): void;
|
|
1251
|
+
/** CI intent and its wake entry share one atomic index replacement. */
|
|
1252
|
+
commitCiWait(id: string, wait: CiWait, input?: AgentInput): void;
|
|
1253
|
+
/** Retire the wait and precisely its pending wake, optionally accepting human input. */
|
|
1254
|
+
commitCiWaitWithdrawal(id: string, acceptedHumanMessage?: QueuedMessage): void;
|
|
1255
|
+
/** Provider acceptance and receipt retirement have one delivery checkpoint. */
|
|
1256
|
+
commitCiWaitDelivery(id: string, inputId: string): void;
|
|
750
1257
|
/** Retain the settled receipt and retire exactly one wait together with any human message that superseded it. */
|
|
751
1258
|
commitWorkerWaitWithdrawal(id: string, waitId: string, acceptedHumanMessage?: QueuedMessage): void;
|
|
752
1259
|
/** Successful deferred human delivery consumes only its persisted queue ID.
|
|
@@ -766,7 +1273,11 @@ export declare class RunStore extends EventEmitter {
|
|
|
766
1273
|
delegation: DelegationState;
|
|
767
1274
|
}>): void;
|
|
768
1275
|
/** Accepted execution revision is public lifecycle identity, separate from process generations. */
|
|
769
|
-
commitWorkerContinuation(id: string, patch: Partial<Omit<RunRecord, 'id' | 'steps' | 'delegation'>>, step?: Pick<StepState, 'id' | 'name' | 'kind' | 'synthetic'
|
|
1276
|
+
commitWorkerContinuation(id: string, patch: Partial<Omit<RunRecord, 'id' | 'steps' | 'delegation'>>, step?: Pick<StepState, 'id' | 'name' | 'kind' | 'synthetic'>, conversation?: {
|
|
1277
|
+
rootId: string;
|
|
1278
|
+
state: ConversationState;
|
|
1279
|
+
input: AgentInput;
|
|
1280
|
+
}): void;
|
|
770
1281
|
private workerResultsDir;
|
|
771
1282
|
workerResultSnapshotPath(parentId: string, workerId: string, snapshotId: string): string;
|
|
772
1283
|
private readWorkerResultFile;
|