@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/contract/index.js
CHANGED
|
@@ -15,7 +15,10 @@ var conversationMessageSchema = conversationAttributionSchema.extend({
|
|
|
15
15
|
createdAt: z.iso.datetime(),
|
|
16
16
|
deadline: z.iso.datetime().optional(),
|
|
17
17
|
requestHash: z.string().regex(/^[0-9a-f]{64}$/),
|
|
18
|
-
state: z.enum(["accepted", "continuation-required", "destroyed", "late"])
|
|
18
|
+
state: z.enum(["accepted", "continuation-required", "destroyed", "late"]),
|
|
19
|
+
/** A parent-authorized new execution; retained on exact message retries. */
|
|
20
|
+
resumed: z.literal(true).optional(),
|
|
21
|
+
instruction: z.string().max(2048).optional()
|
|
19
22
|
});
|
|
20
23
|
var requestOutcomeSchema = z.object({
|
|
21
24
|
requestId: z.uuid(),
|
|
@@ -30,8 +33,9 @@ var conversationSendRequestSchema = z.object({
|
|
|
30
33
|
kind: conversationAttributionSchema.shape.kind,
|
|
31
34
|
requestId: z.uuid().optional(),
|
|
32
35
|
text: z.string().min(1).max(1e5).refine((text) => text.trim().length > 0),
|
|
33
|
-
timeoutSeconds: z.number().int().min(1).max(1800).default(600)
|
|
34
|
-
|
|
36
|
+
timeoutSeconds: z.number().int().min(1).max(1800).default(600),
|
|
37
|
+
resume: z.boolean().optional()
|
|
38
|
+
}).strict().refine((value) => (value.kind === "reply" || value.kind === "follow-up") === (value.requestId !== void 0), { message: "Replies and follow-ups require a request ID; new messages must omit it" }).refine((value) => !value.resume || value.kind === "request" || value.kind === "progress", { message: "--resume requires a new request or progress instruction" });
|
|
35
39
|
var conversationSendResultSchema = z.object({ message: conversationMessageSchema, delivery: z.enum(["queued", "delivered", "not-delivered"]), outcome: requestOutcomeSchema.optional() }).strict();
|
|
36
40
|
var conversationInspectRequestSchema = z.object({ recipientRunId: z.uuid() }).strict();
|
|
37
41
|
var conversationCancelRequestSchema = z.object({ requestId: z.uuid() }).strict();
|
|
@@ -316,7 +320,7 @@ var runEventSchema = z4.looseObject({
|
|
|
316
320
|
stepId: z4.string().optional(),
|
|
317
321
|
type: z4.string()
|
|
318
322
|
});
|
|
319
|
-
var conversationMessageEventSchema = runEventSchema.extend({ type: z4.literal("conversation-message"), message: conversationMessageSchema, delivery: z4.enum(["queued", "delivered", "not-delivered"]) });
|
|
323
|
+
var conversationMessageEventSchema = runEventSchema.extend({ type: z4.literal("conversation-message"), message: conversationMessageSchema, delivery: z4.enum(["queued", "delivered", "not-delivered"]), deliveredAt: z4.iso.datetime().optional() });
|
|
320
324
|
var requestOutcomeEventSchema = runEventSchema.extend({ type: z4.literal("request-outcome"), outcome: requestOutcomeSchema });
|
|
321
325
|
var agentInputEventSchema = runEventSchema.extend({
|
|
322
326
|
type: z4.literal("agent-input"),
|
|
@@ -478,84 +482,144 @@ var healthResponseSchema = z6.object({
|
|
|
478
482
|
bootProject: z6.string()
|
|
479
483
|
});
|
|
480
484
|
|
|
485
|
+
// ../contract/src/ci-wait.ts
|
|
486
|
+
import { z as z7 } from "zod";
|
|
487
|
+
var CI_WAIT_LIMITATION = "Passing reported checks does not prove that every expected workflow has appeared or that the PR is merge-ready. This observation is not merge approval.";
|
|
488
|
+
var CI_WAIT_RECEIPT_INSTRUCTION = "End your turn to wait for CI; no marker is needed. " + CI_WAIT_LIMITATION;
|
|
489
|
+
var prPattern = /^https:\/\/([a-zA-Z0-9](?:[a-zA-Z0-9.-]*[a-zA-Z0-9])?)\/([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_.-]+)\/pull\/([1-9][0-9]*)$/;
|
|
490
|
+
var ciPrUrlSchema = z7.string().max(2048).regex(prPattern).refine((value) => {
|
|
491
|
+
const match = prPattern.exec(value);
|
|
492
|
+
return !!match && Number.isSafeInteger(Number(match[4])) && match[3] !== "." && match[3] !== "..";
|
|
493
|
+
}, "Expected an HTTPS GitHub PR URL with a positive integer PR number");
|
|
494
|
+
var ciWaitRequestSchema = z7.object({
|
|
495
|
+
pr: ciPrUrlSchema,
|
|
496
|
+
timeout_seconds: z7.number().int().min(1).max(7200).default(1800)
|
|
497
|
+
}).strict();
|
|
498
|
+
var sha = z7.string().regex(/^[0-9a-f]{40}$/i);
|
|
499
|
+
var ciPrIdentitySchema = z7.object({
|
|
500
|
+
prUrl: ciPrUrlSchema,
|
|
501
|
+
repository: z7.string().max(2048).regex(/^[a-zA-Z0-9_-]+\/[a-zA-Z0-9_.-]+$/),
|
|
502
|
+
prNumber: z7.number().int().positive().max(Number.MAX_SAFE_INTEGER),
|
|
503
|
+
headSha: sha
|
|
504
|
+
}).strict();
|
|
505
|
+
var ciWaitOutcomeSchema = z7.enum(["passed", "failed", "cancelled", "skipped", "no_checks", "head_changed", "deadline", "error"]);
|
|
506
|
+
var ciWaitErrorCodeSchema = z7.enum(["invalid_request", "unsupported_host", "gh_missing", "authentication", "inaccessible_pr", "malformed_data", "output_limit", "query_timeout", "command_failed", "wait_conflict", "capacity", "unavailable", "unauthorized", "persistence"]);
|
|
507
|
+
var ciWaitErrorSchema = z7.object({ code: ciWaitErrorCodeSchema, message: z7.string().max(4096) }).strict();
|
|
508
|
+
function utf8Bytes(value) {
|
|
509
|
+
let bytes = 0;
|
|
510
|
+
for (const char of value) {
|
|
511
|
+
const point = char.codePointAt(0);
|
|
512
|
+
bytes += point <= 127 ? 1 : point <= 2047 ? 2 : point <= 65535 ? 3 : 4;
|
|
513
|
+
}
|
|
514
|
+
return bytes;
|
|
515
|
+
}
|
|
516
|
+
var ciWaitResultSchema = z7.object({
|
|
517
|
+
outcome: ciWaitOutcomeSchema,
|
|
518
|
+
headSha: sha,
|
|
519
|
+
observedHeadSha: sha.optional(),
|
|
520
|
+
observedAt: z7.iso.datetime(),
|
|
521
|
+
checks: z7.array(z7.object({ name: z7.string().max(256), state: z7.string().max(256), link: z7.string().max(2048) }).strict()).max(100),
|
|
522
|
+
totalChecks: z7.number().int().nonnegative(),
|
|
523
|
+
truncated: z7.boolean(),
|
|
524
|
+
diagnostic: z7.string().max(4096).refine((value) => utf8Bytes(value) <= 4096).optional()
|
|
525
|
+
}).strict().refine((value) => utf8Bytes(JSON.stringify(value)) <= 32 * 1024, "CI result exceeds 32 KiB");
|
|
526
|
+
var ciWaitSchema = ciPrIdentitySchema.extend({
|
|
527
|
+
id: z7.uuid(),
|
|
528
|
+
generation: z7.string().min(1).max(256),
|
|
529
|
+
turnId: z7.string().min(1).max(256),
|
|
530
|
+
timeoutSeconds: z7.number().int().min(1).max(7200),
|
|
531
|
+
registeredAt: z7.iso.datetime(),
|
|
532
|
+
deadline: z7.iso.datetime(),
|
|
533
|
+
phase: z7.enum(["registered", "parked", "wake-pending", "delivered", "withdrawn"]),
|
|
534
|
+
result: ciWaitResultSchema.optional(),
|
|
535
|
+
wakeId: z7.string().min(1).max(256).optional(),
|
|
536
|
+
deliveredAt: z7.iso.datetime().optional()
|
|
537
|
+
}).strict();
|
|
538
|
+
var ciWaitReceiptSchema = ciPrIdentitySchema.extend({
|
|
539
|
+
waitId: z7.uuid(),
|
|
540
|
+
registeredAt: z7.iso.datetime(),
|
|
541
|
+
deadline: z7.iso.datetime(),
|
|
542
|
+
phase: ciWaitSchema.shape.phase
|
|
543
|
+
}).strict();
|
|
544
|
+
|
|
481
545
|
// ../contract/src/runs.ts
|
|
482
|
-
import { z as
|
|
546
|
+
import { z as z10 } from "zod";
|
|
483
547
|
|
|
484
548
|
// ../contract/src/github.ts
|
|
485
|
-
import { z as
|
|
486
|
-
var checksGlyphSchema =
|
|
487
|
-
var githubItemSchema =
|
|
488
|
-
kind:
|
|
489
|
-
number:
|
|
490
|
-
title:
|
|
491
|
-
author:
|
|
492
|
-
createdAt:
|
|
493
|
-
labels:
|
|
494
|
-
body:
|
|
495
|
-
url:
|
|
496
|
-
comments:
|
|
549
|
+
import { z as z8 } from "zod";
|
|
550
|
+
var checksGlyphSchema = z8.enum(["passing", "failing", "pending"]).nullable();
|
|
551
|
+
var githubItemSchema = z8.object({
|
|
552
|
+
kind: z8.enum(["issue", "pr"]),
|
|
553
|
+
number: z8.number(),
|
|
554
|
+
title: z8.string(),
|
|
555
|
+
author: z8.string(),
|
|
556
|
+
createdAt: z8.string(),
|
|
557
|
+
labels: z8.array(z8.string()),
|
|
558
|
+
body: z8.string(),
|
|
559
|
+
url: z8.string(),
|
|
560
|
+
comments: z8.number(),
|
|
497
561
|
/** Issues only; absent on older servers. */
|
|
498
|
-
assignees:
|
|
499
|
-
projectIds:
|
|
562
|
+
assignees: z8.array(z8.string()).optional(),
|
|
563
|
+
projectIds: z8.array(z8.string()).optional(),
|
|
500
564
|
/** PRs only. */
|
|
501
|
-
isDraft:
|
|
502
|
-
additions:
|
|
503
|
-
deletions:
|
|
565
|
+
isDraft: z8.boolean().optional(),
|
|
566
|
+
additions: z8.number().optional(),
|
|
567
|
+
deletions: z8.number().optional(),
|
|
504
568
|
checks: checksGlyphSchema.optional()
|
|
505
569
|
});
|
|
506
|
-
var githubProjectSchema =
|
|
507
|
-
id:
|
|
508
|
-
title:
|
|
509
|
-
url:
|
|
570
|
+
var githubProjectSchema = z8.object({
|
|
571
|
+
id: z8.string(),
|
|
572
|
+
title: z8.string(),
|
|
573
|
+
url: z8.string()
|
|
510
574
|
});
|
|
511
|
-
var githubDataSchema =
|
|
512
|
-
available:
|
|
575
|
+
var githubDataSchema = z8.object({
|
|
576
|
+
available: z8.boolean(),
|
|
513
577
|
/** Why it is unavailable (`gh` missing, no remote, offline…). Never an error — a hint. */
|
|
514
|
-
reason:
|
|
578
|
+
reason: z8.string().optional(),
|
|
515
579
|
/** owner/name, when known. */
|
|
516
|
-
repo:
|
|
517
|
-
syncedAt:
|
|
518
|
-
issues:
|
|
519
|
-
prs:
|
|
580
|
+
repo: z8.string().optional(),
|
|
581
|
+
syncedAt: z8.string().optional(),
|
|
582
|
+
issues: z8.array(githubItemSchema),
|
|
583
|
+
prs: z8.array(githubItemSchema),
|
|
520
584
|
/** Repo-wide label name → 6-hex color (no `#`); lets chips tint like GitHub. Additive. */
|
|
521
|
-
labelColors:
|
|
522
|
-
viewerLogin:
|
|
585
|
+
labelColors: z8.record(z8.string(), z8.string()).optional(),
|
|
586
|
+
viewerLogin: z8.string().optional(),
|
|
523
587
|
/** Repository-linked Projects v2. Absent when lookup is unavailable; [] means none. */
|
|
524
|
-
projects:
|
|
525
|
-
projectsReason:
|
|
588
|
+
projects: z8.array(githubProjectSchema).optional(),
|
|
589
|
+
projectsReason: z8.string().optional()
|
|
526
590
|
});
|
|
527
|
-
var githubChecksDataSchema =
|
|
528
|
-
|
|
529
|
-
available:
|
|
530
|
-
checks:
|
|
591
|
+
var githubChecksDataSchema = z8.discriminatedUnion("available", [
|
|
592
|
+
z8.object({
|
|
593
|
+
available: z8.literal(true),
|
|
594
|
+
checks: z8.record(z8.number(), checksGlyphSchema)
|
|
531
595
|
}),
|
|
532
|
-
|
|
533
|
-
available:
|
|
534
|
-
reason:
|
|
596
|
+
z8.object({
|
|
597
|
+
available: z8.literal(false),
|
|
598
|
+
reason: z8.string()
|
|
535
599
|
})
|
|
536
600
|
]);
|
|
537
601
|
var GITHUB_SEARCH_MAX = 50;
|
|
538
|
-
var githubSearchQuerySchema =
|
|
539
|
-
kind:
|
|
540
|
-
q:
|
|
541
|
-
limit:
|
|
602
|
+
var githubSearchQuerySchema = z8.object({
|
|
603
|
+
kind: z8.enum(["issue", "pr"]),
|
|
604
|
+
q: z8.string().trim().min(1).max(256),
|
|
605
|
+
limit: z8.coerce.number().int().positive().max(GITHUB_SEARCH_MAX).optional()
|
|
542
606
|
});
|
|
543
|
-
var githubSearchDataSchema =
|
|
544
|
-
available:
|
|
607
|
+
var githubSearchDataSchema = z8.object({
|
|
608
|
+
available: z8.boolean(),
|
|
545
609
|
/** Membership is unknown when lookup fails; never substitute empty projectIds. */
|
|
546
|
-
projectsReason:
|
|
610
|
+
projectsReason: z8.string().optional(),
|
|
547
611
|
/** Why it could not search (`gh` missing, no remote, rate-limited…). A hint, never an error. */
|
|
548
|
-
reason:
|
|
612
|
+
reason: z8.string().optional(),
|
|
549
613
|
/** The same rows the list ships. `checks` is always `null` here — hydrated lazily through
|
|
550
614
|
* `/github/checks`, exactly as list rows have been since #664. */
|
|
551
|
-
items:
|
|
615
|
+
items: z8.array(githubItemSchema),
|
|
552
616
|
/** The hit list filled the server's cap; there may be more matches on the forge. */
|
|
553
|
-
truncated:
|
|
617
|
+
truncated: z8.boolean().optional(),
|
|
554
618
|
/** Label name → 6-hex color for the labels these hits carry. A closed item often wears labels
|
|
555
619
|
* no open one does, which the repo-wide map from the list call would not cover. Additive. */
|
|
556
|
-
labelColors:
|
|
620
|
+
labelColors: z8.record(z8.string(), z8.string()).optional()
|
|
557
621
|
});
|
|
558
|
-
var referenceStatusSchema =
|
|
622
|
+
var referenceStatusSchema = z8.enum([
|
|
559
623
|
"draft",
|
|
560
624
|
"review-required",
|
|
561
625
|
"changes-requested",
|
|
@@ -568,13 +632,13 @@ var referenceStatusSchema = z7.enum([
|
|
|
568
632
|
"completed",
|
|
569
633
|
"not-planned"
|
|
570
634
|
]);
|
|
571
|
-
var recheckAfterMsSchema =
|
|
635
|
+
var recheckAfterMsSchema = z8.number().nullable();
|
|
572
636
|
var REFERENCE_STATUS_MAX = 100;
|
|
573
|
-
var githubRefStatusDataSchema =
|
|
574
|
-
|
|
575
|
-
available:
|
|
576
|
-
prs:
|
|
577
|
-
issues:
|
|
637
|
+
var githubRefStatusDataSchema = z8.discriminatedUnion("available", [
|
|
638
|
+
z8.object({
|
|
639
|
+
available: z8.literal(true),
|
|
640
|
+
prs: z8.record(z8.number(), referenceStatusSchema),
|
|
641
|
+
issues: z8.record(z8.number(), referenceStatusSchema),
|
|
578
642
|
/**
|
|
579
643
|
* The pull request numbers that do NOT merge cleanly into their base right now.
|
|
580
644
|
*
|
|
@@ -594,28 +658,28 @@ var githubRefStatusDataSchema = z7.discriminatedUnion("available", [
|
|
|
594
658
|
* ever named — GitHub reports `UNKNOWN` for merged and closed ones, and `UNKNOWN` (which is
|
|
595
659
|
* also what it answers while it is still computing) is never listed.
|
|
596
660
|
*/
|
|
597
|
-
conflicts:
|
|
661
|
+
conflicts: z8.array(z8.number()).optional(),
|
|
598
662
|
recheckAfterMs: recheckAfterMsSchema
|
|
599
663
|
}),
|
|
600
|
-
|
|
601
|
-
available:
|
|
602
|
-
reason:
|
|
664
|
+
z8.object({
|
|
665
|
+
available: z8.literal(false),
|
|
666
|
+
reason: z8.string(),
|
|
603
667
|
recheckAfterMs: recheckAfterMsSchema
|
|
604
668
|
})
|
|
605
669
|
]);
|
|
606
|
-
var githubCommentSchema =
|
|
607
|
-
id:
|
|
670
|
+
var githubCommentSchema = z8.object({
|
|
671
|
+
id: z8.number(),
|
|
608
672
|
/** Author login, `'?'` fallback when gh omits the user. */
|
|
609
|
-
author:
|
|
610
|
-
avatarUrl:
|
|
611
|
-
createdAt:
|
|
612
|
-
body:
|
|
613
|
-
kind:
|
|
673
|
+
author: z8.string(),
|
|
674
|
+
avatarUrl: z8.string().optional(),
|
|
675
|
+
createdAt: z8.string(),
|
|
676
|
+
body: z8.string(),
|
|
677
|
+
kind: z8.enum(["comment", "review"]),
|
|
614
678
|
/** Reviews only — drives the state chip. */
|
|
615
|
-
reviewState:
|
|
616
|
-
url:
|
|
679
|
+
reviewState: z8.enum(["approved", "changes_requested", "commented", "dismissed"]).optional(),
|
|
680
|
+
url: z8.string()
|
|
617
681
|
});
|
|
618
|
-
var githubTimelineEventKindSchema =
|
|
682
|
+
var githubTimelineEventKindSchema = z8.enum([
|
|
619
683
|
"committed",
|
|
620
684
|
"labeled",
|
|
621
685
|
"unlabeled",
|
|
@@ -628,134 +692,134 @@ var githubTimelineEventKindSchema = z7.enum([
|
|
|
628
692
|
"cross-referenced",
|
|
629
693
|
"renamed"
|
|
630
694
|
]);
|
|
631
|
-
var githubTimelineEventSchema =
|
|
632
|
-
id:
|
|
695
|
+
var githubTimelineEventSchema = z8.object({
|
|
696
|
+
id: z8.string(),
|
|
633
697
|
kind: githubTimelineEventKindSchema,
|
|
634
698
|
/** Login — or the git author name for `committed`, which carries no GitHub actor. */
|
|
635
|
-
actor:
|
|
699
|
+
actor: z8.string(),
|
|
636
700
|
/** Absent for `committed`. */
|
|
637
|
-
avatarUrl:
|
|
638
|
-
createdAt:
|
|
639
|
-
url:
|
|
701
|
+
avatarUrl: z8.string().optional(),
|
|
702
|
+
createdAt: z8.string(),
|
|
703
|
+
url: z8.string().optional(),
|
|
640
704
|
/** `committed` — full 40-char SHA. */
|
|
641
|
-
sha:
|
|
705
|
+
sha: z8.string().optional(),
|
|
642
706
|
/** `committed` — first line, capped at 120 chars. */
|
|
643
|
-
message:
|
|
707
|
+
message: z8.string().optional(),
|
|
644
708
|
/** `committed` — **absent** (lookup failed/skipped) and **`null`** (no CI configured) both
|
|
645
709
|
* render no glyph, but stay distinct values. */
|
|
646
710
|
checks: checksGlyphSchema.optional(),
|
|
647
|
-
label:
|
|
711
|
+
label: z8.object({ name: z8.string(), color: z8.string().optional() }).optional(),
|
|
648
712
|
/** `assigned`/`unassigned` login, or the new title for `renamed`. */
|
|
649
|
-
subject:
|
|
650
|
-
refNumber:
|
|
651
|
-
refTitle:
|
|
652
|
-
refIsPr:
|
|
653
|
-
});
|
|
654
|
-
var githubCommentsDataSchema =
|
|
655
|
-
available:
|
|
656
|
-
reason:
|
|
713
|
+
subject: z8.string().optional(),
|
|
714
|
+
refNumber: z8.number().optional(),
|
|
715
|
+
refTitle: z8.string().optional(),
|
|
716
|
+
refIsPr: z8.boolean().optional()
|
|
717
|
+
});
|
|
718
|
+
var githubCommentsDataSchema = z8.object({
|
|
719
|
+
available: z8.boolean(),
|
|
720
|
+
reason: z8.string().optional(),
|
|
657
721
|
/** Chronological, oldest first. */
|
|
658
|
-
comments:
|
|
722
|
+
comments: z8.array(githubCommentSchema),
|
|
659
723
|
/** True when either stream hit its cap, or the timeline fetch stopped short. */
|
|
660
|
-
truncated:
|
|
724
|
+
truncated: z8.boolean().optional(),
|
|
661
725
|
/** Timeline events (#525) — additive; absent when the server degraded to the legacy
|
|
662
726
|
* comments-only fetch. Capped independently of `comments`. */
|
|
663
|
-
events:
|
|
664
|
-
});
|
|
665
|
-
var githubMergeMethodSchema =
|
|
666
|
-
var githubPrCheckSchema =
|
|
667
|
-
name:
|
|
668
|
-
state:
|
|
669
|
-
required:
|
|
670
|
-
url:
|
|
671
|
-
});
|
|
672
|
-
var githubPrMergeStateSchema =
|
|
673
|
-
number:
|
|
674
|
-
title:
|
|
675
|
-
url:
|
|
676
|
-
state:
|
|
677
|
-
isDraft:
|
|
678
|
-
headRef:
|
|
679
|
-
baseRef:
|
|
680
|
-
headSha:
|
|
681
|
-
mergeable:
|
|
682
|
-
reviewDecision:
|
|
683
|
-
checks:
|
|
684
|
-
methods:
|
|
727
|
+
events: z8.array(githubTimelineEventSchema).optional()
|
|
728
|
+
});
|
|
729
|
+
var githubMergeMethodSchema = z8.enum(["merge", "squash", "rebase"]);
|
|
730
|
+
var githubPrCheckSchema = z8.object({
|
|
731
|
+
name: z8.string(),
|
|
732
|
+
state: z8.enum(["passing", "failing", "pending", "unknown"]),
|
|
733
|
+
required: z8.boolean().nullable(),
|
|
734
|
+
url: z8.string().optional()
|
|
735
|
+
});
|
|
736
|
+
var githubPrMergeStateSchema = z8.object({
|
|
737
|
+
number: z8.number(),
|
|
738
|
+
title: z8.string(),
|
|
739
|
+
url: z8.string(),
|
|
740
|
+
state: z8.enum(["open", "closed", "merged"]),
|
|
741
|
+
isDraft: z8.boolean(),
|
|
742
|
+
headRef: z8.string(),
|
|
743
|
+
baseRef: z8.string(),
|
|
744
|
+
headSha: z8.string(),
|
|
745
|
+
mergeable: z8.enum(["mergeable", "conflicting", "unknown"]),
|
|
746
|
+
reviewDecision: z8.enum(["approved", "changes-requested", "review-required", "unknown"]),
|
|
747
|
+
checks: z8.array(githubPrCheckSchema),
|
|
748
|
+
methods: z8.array(githubMergeMethodSchema),
|
|
685
749
|
defaultMethod: githubMergeMethodSchema.nullable(),
|
|
686
|
-
eligibility:
|
|
687
|
-
blockers:
|
|
688
|
-
canMerge:
|
|
689
|
-
canOverride:
|
|
690
|
-
});
|
|
691
|
-
var githubPrMergeStateResponseSchema =
|
|
692
|
-
|
|
693
|
-
|
|
750
|
+
eligibility: z8.enum(["ready", "blocked", "pending", "unauthorized", "terminal", "unknown"]),
|
|
751
|
+
blockers: z8.array(z8.object({ code: z8.string(), message: z8.string() })),
|
|
752
|
+
canMerge: z8.boolean(),
|
|
753
|
+
canOverride: z8.boolean()
|
|
754
|
+
});
|
|
755
|
+
var githubPrMergeStateResponseSchema = z8.discriminatedUnion("available", [
|
|
756
|
+
z8.object({ available: z8.literal(true), mergeState: githubPrMergeStateSchema }),
|
|
757
|
+
z8.object({ available: z8.literal(false), reason: z8.string() })
|
|
694
758
|
]);
|
|
695
|
-
var githubMergeResponseSchema =
|
|
696
|
-
merged:
|
|
697
|
-
number:
|
|
698
|
-
url:
|
|
759
|
+
var githubMergeResponseSchema = z8.object({
|
|
760
|
+
merged: z8.literal(true),
|
|
761
|
+
number: z8.number(),
|
|
762
|
+
url: z8.string(),
|
|
699
763
|
method: githubMergeMethodSchema,
|
|
700
|
-
mergeCommitSha:
|
|
701
|
-
});
|
|
702
|
-
var githubPrChangeSchema =
|
|
703
|
-
path:
|
|
704
|
-
previousPath:
|
|
705
|
-
status:
|
|
706
|
-
additions:
|
|
707
|
-
deletions:
|
|
708
|
-
patch:
|
|
709
|
-
patchUnavailableReason:
|
|
710
|
-
truncated:
|
|
711
|
-
});
|
|
712
|
-
var githubPrChangesDataSchema =
|
|
713
|
-
|
|
714
|
-
available:
|
|
715
|
-
number:
|
|
716
|
-
headSha:
|
|
717
|
-
files:
|
|
718
|
-
additions:
|
|
719
|
-
deletions:
|
|
720
|
-
truncated:
|
|
764
|
+
mergeCommitSha: z8.string().optional()
|
|
765
|
+
});
|
|
766
|
+
var githubPrChangeSchema = z8.object({
|
|
767
|
+
path: z8.string(),
|
|
768
|
+
previousPath: z8.string().optional(),
|
|
769
|
+
status: z8.enum(["added", "modified", "removed", "renamed", "copied", "changed"]),
|
|
770
|
+
additions: z8.number(),
|
|
771
|
+
deletions: z8.number(),
|
|
772
|
+
patch: z8.string().optional(),
|
|
773
|
+
patchUnavailableReason: z8.enum(["binary", "too-large", "not-provided"]).optional(),
|
|
774
|
+
truncated: z8.boolean().optional()
|
|
775
|
+
});
|
|
776
|
+
var githubPrChangesDataSchema = z8.discriminatedUnion("available", [
|
|
777
|
+
z8.object({
|
|
778
|
+
available: z8.literal(true),
|
|
779
|
+
number: z8.number(),
|
|
780
|
+
headSha: z8.string(),
|
|
781
|
+
files: z8.array(githubPrChangeSchema),
|
|
782
|
+
additions: z8.number(),
|
|
783
|
+
deletions: z8.number(),
|
|
784
|
+
truncated: z8.boolean(),
|
|
721
785
|
/** Present when the payload is complete but partial in some other way (a capped patch). */
|
|
722
|
-
reason:
|
|
786
|
+
reason: z8.string().optional()
|
|
723
787
|
}),
|
|
724
|
-
|
|
788
|
+
z8.object({ available: z8.literal(false), reason: z8.string() })
|
|
725
789
|
]);
|
|
726
790
|
|
|
727
791
|
// ../contract/src/workflows.ts
|
|
728
|
-
import { z as
|
|
729
|
-
var workflowStepDefSchema =
|
|
730
|
-
id:
|
|
731
|
-
name:
|
|
792
|
+
import { z as z9 } from "zod";
|
|
793
|
+
var workflowStepDefSchema = z9.object({
|
|
794
|
+
id: z9.string().min(1),
|
|
795
|
+
name: z9.string().optional(),
|
|
732
796
|
// agent step
|
|
733
|
-
prompt:
|
|
734
|
-
skill:
|
|
735
|
-
model:
|
|
736
|
-
effort:
|
|
797
|
+
prompt: z9.string().optional(),
|
|
798
|
+
skill: z9.string().optional(),
|
|
799
|
+
model: z9.string().optional(),
|
|
800
|
+
effort: z9.string().max(32).optional(),
|
|
737
801
|
/** Per-step agent backend override (falls back to the task / config default). */
|
|
738
802
|
runner: runnerSchema.optional(),
|
|
739
803
|
/** Agent account id for this step (spec 2026-07-29-agent-profiles); resolved per step for owned workers (#452). */
|
|
740
|
-
agentProfile:
|
|
741
|
-
allowedTools:
|
|
742
|
-
bashAllowlist:
|
|
804
|
+
agentProfile: z9.string().min(1).max(64).optional(),
|
|
805
|
+
allowedTools: z9.array(z9.string()).optional(),
|
|
806
|
+
bashAllowlist: z9.array(z9.string()).optional(),
|
|
743
807
|
// check step
|
|
744
|
-
command:
|
|
745
|
-
onFail:
|
|
746
|
-
retry:
|
|
747
|
-
max:
|
|
808
|
+
command: z9.string().optional(),
|
|
809
|
+
onFail: z9.object({
|
|
810
|
+
retry: z9.string().min(1),
|
|
811
|
+
max: z9.number().int().positive().default(2)
|
|
748
812
|
}).optional()
|
|
749
813
|
}).refine((s) => Boolean(s.command) !== Boolean(s.prompt ?? s.skill), {
|
|
750
814
|
message: "a step is either an agent step (prompt/skill) or a check step (command), not both"
|
|
751
815
|
});
|
|
752
|
-
var workflowDefSchema =
|
|
753
|
-
name:
|
|
754
|
-
description:
|
|
755
|
-
steps:
|
|
756
|
-
source:
|
|
816
|
+
var workflowDefSchema = z9.object({
|
|
817
|
+
name: z9.string(),
|
|
818
|
+
description: z9.string().optional(),
|
|
819
|
+
steps: z9.array(workflowStepDefSchema),
|
|
820
|
+
source: z9.enum(["built-in", "file"]),
|
|
757
821
|
/** Absent on built-ins — which is exactly what makes them undeletable. */
|
|
758
|
-
path:
|
|
822
|
+
path: z9.string().optional()
|
|
759
823
|
});
|
|
760
824
|
function providersRequiredByWorkflow(workflow, fallback) {
|
|
761
825
|
const required = /* @__PURE__ */ new Set();
|
|
@@ -764,46 +828,46 @@ function providersRequiredByWorkflow(workflow, fallback) {
|
|
|
764
828
|
}
|
|
765
829
|
return runnerSchema.options.filter((provider) => required.has(provider));
|
|
766
830
|
}
|
|
767
|
-
var workflowLoadIssueSchema =
|
|
768
|
-
path:
|
|
769
|
-
message:
|
|
770
|
-
});
|
|
771
|
-
var workflowsResponseSchema =
|
|
772
|
-
workflows:
|
|
773
|
-
issues:
|
|
774
|
-
});
|
|
775
|
-
var saveWorkflowInputSchema =
|
|
776
|
-
name:
|
|
777
|
-
description:
|
|
778
|
-
steps:
|
|
779
|
-
skills:
|
|
780
|
-
overwrite:
|
|
831
|
+
var workflowLoadIssueSchema = z9.object({
|
|
832
|
+
path: z9.string(),
|
|
833
|
+
message: z9.string()
|
|
834
|
+
});
|
|
835
|
+
var workflowsResponseSchema = z9.object({
|
|
836
|
+
workflows: z9.array(workflowDefSchema),
|
|
837
|
+
issues: z9.array(workflowLoadIssueSchema)
|
|
838
|
+
});
|
|
839
|
+
var saveWorkflowInputSchema = z9.object({
|
|
840
|
+
name: z9.string().trim().min(1).max(80),
|
|
841
|
+
description: z9.string().max(2e3, "must be at most 2000 characters").optional(),
|
|
842
|
+
steps: z9.array(workflowStepDefSchema).min(1).max(8).optional(),
|
|
843
|
+
skills: z9.array(z9.string().trim().min(1)).min(1).max(8).optional(),
|
|
844
|
+
overwrite: z9.boolean().optional()
|
|
781
845
|
}).refine((b) => Boolean(b.steps) !== Boolean(b.skills), {
|
|
782
846
|
message: 'provide either "steps" or "skills", not both'
|
|
783
847
|
});
|
|
784
|
-
var saveWorkflowResponseSchema =
|
|
785
|
-
path:
|
|
786
|
-
name:
|
|
848
|
+
var saveWorkflowResponseSchema = z9.object({
|
|
849
|
+
path: z9.string(),
|
|
850
|
+
name: z9.string()
|
|
787
851
|
});
|
|
788
|
-
var parsedWorkflowSchema =
|
|
789
|
-
name:
|
|
790
|
-
description:
|
|
791
|
-
steps:
|
|
852
|
+
var parsedWorkflowSchema = z9.object({
|
|
853
|
+
name: z9.string(),
|
|
854
|
+
description: z9.string().optional(),
|
|
855
|
+
steps: z9.array(workflowStepDefSchema)
|
|
792
856
|
});
|
|
793
|
-
var deleteWorkflowResponseSchema =
|
|
794
|
-
ok:
|
|
795
|
-
path:
|
|
857
|
+
var deleteWorkflowResponseSchema = z9.object({
|
|
858
|
+
ok: z9.literal(true),
|
|
859
|
+
path: z9.string()
|
|
796
860
|
});
|
|
797
|
-
var planResponseSchema =
|
|
861
|
+
var planResponseSchema = z9.object({
|
|
798
862
|
/** The kebab-case workflow title the planner proposed. Absent on the degraded fallback. */
|
|
799
|
-
name:
|
|
800
|
-
steps:
|
|
801
|
-
rationale:
|
|
802
|
-
fallback:
|
|
863
|
+
name: z9.string().optional(),
|
|
864
|
+
steps: z9.array(workflowStepDefSchema),
|
|
865
|
+
rationale: z9.string(),
|
|
866
|
+
fallback: z9.boolean()
|
|
803
867
|
});
|
|
804
868
|
|
|
805
869
|
// ../contract/src/runs.ts
|
|
806
|
-
var runStatusSchema =
|
|
870
|
+
var runStatusSchema = z10.enum([
|
|
807
871
|
"queued",
|
|
808
872
|
"running",
|
|
809
873
|
"waiting",
|
|
@@ -812,8 +876,8 @@ var runStatusSchema = z9.enum([
|
|
|
812
876
|
"failed",
|
|
813
877
|
"cancelled"
|
|
814
878
|
]);
|
|
815
|
-
var runActivitySchema =
|
|
816
|
-
var stepStatusSchema =
|
|
879
|
+
var runActivitySchema = z10.enum(["monitoring"]);
|
|
880
|
+
var stepStatusSchema = z10.enum([
|
|
817
881
|
"pending",
|
|
818
882
|
"running",
|
|
819
883
|
"waiting",
|
|
@@ -823,16 +887,16 @@ var stepStatusSchema = z9.enum([
|
|
|
823
887
|
"cancelled",
|
|
824
888
|
"skipped"
|
|
825
889
|
]);
|
|
826
|
-
var usageCounterSchema =
|
|
827
|
-
var stepStateSchema =
|
|
828
|
-
id:
|
|
829
|
-
name:
|
|
830
|
-
kind:
|
|
890
|
+
var usageCounterSchema = z10.number().finite().nonnegative();
|
|
891
|
+
var stepStateSchema = z10.object({
|
|
892
|
+
id: z10.string(),
|
|
893
|
+
name: z10.string(),
|
|
894
|
+
kind: z10.enum(["agent", "check"]),
|
|
831
895
|
status: stepStatusSchema,
|
|
832
|
-
iterations:
|
|
896
|
+
iterations: z10.number(),
|
|
833
897
|
/** Durable count of onFail retry loops consumed by this check. */
|
|
834
|
-
retriesUsed:
|
|
835
|
-
tokensUsed:
|
|
898
|
+
retriesUsed: z10.number().int().nonnegative().optional(),
|
|
899
|
+
tokensUsed: z10.number(),
|
|
836
900
|
inputTokens: usageCounterSchema.optional(),
|
|
837
901
|
outputTokens: usageCounterSchema.optional(),
|
|
838
902
|
usageInvocationsStarted: usageCounterSchema.optional(),
|
|
@@ -840,93 +904,99 @@ var stepStateSchema = z9.object({
|
|
|
840
904
|
usageTurnsStarted: usageCounterSchema.optional(),
|
|
841
905
|
usageTurnsRecorded: usageCounterSchema.optional(),
|
|
842
906
|
usageInvocationEpoch: usageCounterSchema.optional(),
|
|
843
|
-
startedAt:
|
|
844
|
-
finishedAt:
|
|
845
|
-
error:
|
|
907
|
+
startedAt: z10.string().optional(),
|
|
908
|
+
finishedAt: z10.string().optional(),
|
|
909
|
+
error: z10.string().optional(),
|
|
846
910
|
/** Latest agent session id — `claude --resume <id>` and friends. */
|
|
847
|
-
sessionId:
|
|
911
|
+
sessionId: z10.string().optional(),
|
|
848
912
|
/** Backend that owns `sessionId`; absent on records written before backend affinity. */
|
|
849
913
|
backend: runnerSchema.optional(),
|
|
850
914
|
/** Agent account (spec 2026-07-29-agent-profiles) that owns `sessionId` — `default`, or a
|
|
851
915
|
* stored profile id. The two are a PAIR: a session id only resolves inside the config dir
|
|
852
916
|
* that created it, so resume and Continue read this rather than the project's current
|
|
853
917
|
* selection. Absent on records written before accounts existed. */
|
|
854
|
-
profileId:
|
|
855
|
-
costUsd:
|
|
918
|
+
profileId: z10.string().optional(),
|
|
919
|
+
costUsd: z10.number().optional(),
|
|
856
920
|
/** Explicit provenance for engine-generated continuation steps. */
|
|
857
|
-
synthetic:
|
|
921
|
+
synthetic: z10.literal("continuation").optional()
|
|
858
922
|
});
|
|
859
|
-
var diffStatSchema =
|
|
860
|
-
adds:
|
|
861
|
-
dels:
|
|
862
|
-
files:
|
|
923
|
+
var diffStatSchema = z10.object({
|
|
924
|
+
adds: z10.number(),
|
|
925
|
+
dels: z10.number(),
|
|
926
|
+
files: z10.number(),
|
|
863
927
|
/** Additive since #751, and present ONLY when true: the numbers were measured against a
|
|
864
928
|
* branch the agent checked out into the task's worktree, as the run found it, because the
|
|
865
929
|
* worktree's HEAD had been repointed off the task's own branch (every review/QA run does
|
|
866
930
|
* this) and the merge-base anchor would otherwise have reported that branch's entire diff
|
|
867
931
|
* as this task's. Absent on every normal run and on every record written before #751 — a
|
|
868
932
|
* consumer that ignores it sees exactly the old shape. */
|
|
869
|
-
repointed:
|
|
933
|
+
repointed: z10.boolean().optional()
|
|
870
934
|
});
|
|
871
|
-
var queuedMessageSchema =
|
|
872
|
-
id:
|
|
873
|
-
text:
|
|
935
|
+
var queuedMessageSchema = z10.object({
|
|
936
|
+
id: z10.string(),
|
|
937
|
+
text: z10.string(),
|
|
874
938
|
/** `/api/v1/runs/:id/images/…` URLs — attachments are persisted, never inlined. Images and
|
|
875
939
|
* files share this one list; read `isImageAttachmentName` on the file name to tell them apart. */
|
|
876
|
-
images:
|
|
877
|
-
createdAt:
|
|
940
|
+
images: z10.array(z10.string()).optional(),
|
|
941
|
+
createdAt: z10.string()
|
|
878
942
|
});
|
|
879
943
|
var continuationMessageSchema = queuedMessageSchema.extend({
|
|
880
|
-
origin:
|
|
944
|
+
origin: z10.enum(["human", "lifecycle"]).optional(),
|
|
945
|
+
/** An attributed parent message used as the opening prompt, never a human answer. */
|
|
946
|
+
agentInputId: z10.uuid().optional()
|
|
881
947
|
});
|
|
882
|
-
var processUsageSchema =
|
|
948
|
+
var processUsageSchema = z10.object({
|
|
883
949
|
/** Sum of `%cpu` across the tree — can exceed 100 on multi-core work. */
|
|
884
|
-
cpuPct:
|
|
885
|
-
rssBytes:
|
|
886
|
-
procCount:
|
|
950
|
+
cpuPct: z10.number(),
|
|
951
|
+
rssBytes: z10.number(),
|
|
952
|
+
procCount: z10.number()
|
|
887
953
|
});
|
|
888
|
-
var runRecordSchema =
|
|
889
|
-
id:
|
|
890
|
-
title:
|
|
954
|
+
var runRecordSchema = z10.object({
|
|
955
|
+
id: z10.string(),
|
|
956
|
+
title: z10.string(),
|
|
891
957
|
/** Display title (#389): auto-derived from the first agent turn, or the user's inline edit
|
|
892
958
|
* (`PATCH /runs/:id` sets it together with `title`). Show `titleSummary ?? title`. */
|
|
893
|
-
titleSummary:
|
|
959
|
+
titleSummary: z10.string().optional(),
|
|
894
960
|
/** Refreshed on every turn-end; absent until the first turn ends (and on worktree-less runs). */
|
|
895
961
|
diffStat: diffStatSchema.optional(),
|
|
896
|
-
workflow:
|
|
897
|
-
task:
|
|
962
|
+
workflow: z10.string(),
|
|
963
|
+
task: z10.string(),
|
|
898
964
|
/** Prompt messages stacked onto the run while it waited for a free agent slot (#472). Folded
|
|
899
965
|
* into the prompt at dequeue — never delivered as their own turns. Absent on pre-#472 runs. */
|
|
900
|
-
queuedMessages:
|
|
966
|
+
queuedMessages: z10.array(queuedMessageSchema).optional(),
|
|
901
967
|
/** Stop was accepted; execution termination is still pending. */
|
|
902
|
-
stopping:
|
|
968
|
+
stopping: z10.boolean().optional(),
|
|
903
969
|
/** Opening Continue message, retained until its first completed turn for crash recovery. */
|
|
904
970
|
continuationMessage: continuationMessageSchema.optional(),
|
|
905
971
|
/** The last turn carried a malformed explicit structured question. */
|
|
906
|
-
invalidAsk:
|
|
972
|
+
invalidAsk: z10.boolean().optional(),
|
|
907
973
|
/** Owned-run authority; absence is legacy, invalid is explicitly quarantined. */
|
|
908
974
|
delegation: delegationStateSchema.optional(),
|
|
909
975
|
/** Durable non-human input, kept separate from human prompt/answer queues. */
|
|
910
|
-
agentInputs:
|
|
976
|
+
agentInputs: z10.array(agentInputSchema).optional(),
|
|
977
|
+
ciWait: ciWaitSchema.optional(),
|
|
978
|
+
lastCiWait: ciWaitSchema.optional(),
|
|
979
|
+
/** Retained recovery observation when previous CI metadata cannot be trusted. */
|
|
980
|
+
lastCiWaitError: z10.string().max(256).optional(),
|
|
911
981
|
/** URLs of images and document attachments on the initial task prompt; branch on isImageAttachmentName. */
|
|
912
|
-
taskImages:
|
|
913
|
-
model:
|
|
982
|
+
taskImages: z10.array(z10.string()).optional(),
|
|
983
|
+
model: z10.string().optional(),
|
|
914
984
|
/** Reasoning-effort pin (#45). Canonical `low`/`medium`/`high`/`xhigh`/`max`.
|
|
915
985
|
* Absent = harness default. Additive: pre-#45 records omit it and still parse. */
|
|
916
|
-
effort:
|
|
986
|
+
effort: z10.string().max(32).optional(),
|
|
917
987
|
/** Normalized provider/model identity used for attribution and reproducible replay. */
|
|
918
|
-
modelIdentity:
|
|
988
|
+
modelIdentity: z10.string().optional(),
|
|
919
989
|
runner: runnerSchema.optional(),
|
|
920
990
|
/** The composer's per-task agent account (spec 2026-07-29-agent-profiles), applying to steps
|
|
921
991
|
* on `runner`. Absent = the run follows the project's own selection. */
|
|
922
|
-
agentProfile:
|
|
992
|
+
agentProfile: z10.string().optional(),
|
|
923
993
|
/** Echo of the extra system prompt the run used (POST override or config default). */
|
|
924
|
-
systemPrompt:
|
|
994
|
+
systemPrompt: z10.string().optional(),
|
|
925
995
|
/** false when the run deliberately disabled follow-up todo generation. Absent means enabled. */
|
|
926
|
-
generateFollowups:
|
|
996
|
+
generateFollowups: z10.boolean().optional(),
|
|
927
997
|
/** Autonomous mode (#autonomous): the run never parks at `waiting` or the terminal `review`
|
|
928
998
|
* gate. Absent = falsy = not autonomous. */
|
|
929
|
-
autonomous:
|
|
999
|
+
autonomous: z10.boolean().optional(),
|
|
930
1000
|
/**
|
|
931
1001
|
* Provenance for a task a project GitHub automation launched (#694). Absent on every ordinary
|
|
932
1002
|
* run, which is what makes it additive — the cockpit shows the "from automation" link only when
|
|
@@ -936,12 +1006,12 @@ var runRecordSchema = z9.object({
|
|
|
936
1006
|
* launching definition matched, recorded on the run for the audit trail, and `src/runs/store.ts`
|
|
937
1007
|
* persists it as free text so an older cezar can still read a record written by a newer one.
|
|
938
1008
|
*/
|
|
939
|
-
automation:
|
|
940
|
-
automationId:
|
|
941
|
-
automationRevision:
|
|
942
|
-
receiptId:
|
|
943
|
-
event:
|
|
944
|
-
githubUrl:
|
|
1009
|
+
automation: z10.object({
|
|
1010
|
+
automationId: z10.string(),
|
|
1011
|
+
automationRevision: z10.number(),
|
|
1012
|
+
receiptId: z10.string(),
|
|
1013
|
+
event: z10.string(),
|
|
1014
|
+
githubUrl: z10.string()
|
|
945
1015
|
}).optional(),
|
|
946
1016
|
status: runStatusSchema,
|
|
947
1017
|
/** `monitoring` while `status === 'running'` and the agent is working on downstream work.
|
|
@@ -949,84 +1019,84 @@ var runRecordSchema = z9.object({
|
|
|
949
1019
|
activity: runActivitySchema.optional(),
|
|
950
1020
|
/** Derived from valid human questions and matching delivery receipts in durable history.
|
|
951
1021
|
* List attention only; never authorization to deliver an answer or wake a worker. */
|
|
952
|
-
hasPendingHumanAsk:
|
|
1022
|
+
hasPendingHumanAsk: z10.boolean().optional(),
|
|
953
1023
|
/** Exact ISO-8601 deadline for the next automatic monitoring check. */
|
|
954
|
-
monitoringWakeAt:
|
|
1024
|
+
monitoringWakeAt: z10.string().optional(),
|
|
955
1025
|
/** The current live monitoring epoch exhausted its 40 automatic checks. */
|
|
956
|
-
monitoringWakeCapReached:
|
|
1026
|
+
monitoringWakeCapReached: z10.boolean().optional(),
|
|
957
1027
|
/** Exact ISO-8601 instant this run resumes itself after a provider usage limit stopped it
|
|
958
1028
|
* (spec 2026-08-03-auto-resume-after-usage-limit). Present only on a `failed` run with a
|
|
959
1029
|
* pending automatic resume — its absence is what "no resume is scheduled" looks like. */
|
|
960
|
-
autoResumeAt:
|
|
1030
|
+
autoResumeAt: z10.string().optional(),
|
|
961
1031
|
/** Consecutive automatic resumes since the last human turn, against the safety cap. */
|
|
962
|
-
autoResumeAttempts:
|
|
963
|
-
createdAt:
|
|
964
|
-
startedAt:
|
|
965
|
-
finishedAt:
|
|
966
|
-
tokensUsed:
|
|
1032
|
+
autoResumeAttempts: z10.number().optional(),
|
|
1033
|
+
createdAt: z10.string(),
|
|
1034
|
+
startedAt: z10.string().optional(),
|
|
1035
|
+
finishedAt: z10.string().optional(),
|
|
1036
|
+
tokensUsed: z10.number(),
|
|
967
1037
|
inputTokens: usageCounterSchema.optional(),
|
|
968
1038
|
outputTokens: usageCounterSchema.optional(),
|
|
969
|
-
costUsd:
|
|
970
|
-
pullRequestUrl:
|
|
1039
|
+
costUsd: z10.number().optional(),
|
|
1040
|
+
pullRequestUrl: z10.string().optional(),
|
|
971
1041
|
/** The PR this task is ABOUT (#407) — auto-discovered from conversation references. Display
|
|
972
1042
|
* tier only: `pullRequestUrl` (the PR this task CREATED) wins, and the action gates ignore it. */
|
|
973
|
-
referencedPullRequestUrl:
|
|
1043
|
+
referencedPullRequestUrl: z10.string().optional(),
|
|
974
1044
|
/** The PR/issue number this task is ABOUT (task auto-naming spec) — display tier only. */
|
|
975
|
-
prNumber:
|
|
976
|
-
issueNumber:
|
|
1045
|
+
prNumber: z10.number().optional(),
|
|
1046
|
+
issueNumber: z10.number().optional(),
|
|
977
1047
|
/** Server-side provenance: referenced-issue discovery currently owns `issueNumber`. */
|
|
978
|
-
referencedIssueNumberSeeded:
|
|
1048
|
+
referencedIssueNumberSeeded: z10.boolean().optional(),
|
|
979
1049
|
/** 'user' = renamed via PATCH, never auto-overwritten; 'marker' = agent-declared via
|
|
980
1050
|
* CEZ:TITLE (spec 2026-07-18-task-ref-markers); 'auto' = namer-owned. */
|
|
981
|
-
titleOrigin:
|
|
1051
|
+
titleOrigin: z10.enum(["user", "auto", "marker"]).optional(),
|
|
982
1052
|
/** References the agent declared via CEZ:PR/CEZ:ISSUE markers — authoritative over the namer
|
|
983
1053
|
* for the matching kind. */
|
|
984
|
-
markerRefs:
|
|
1054
|
+
markerRefs: z10.object({ pr: z10.number().optional(), issue: z10.number().optional() }).optional(),
|
|
985
1055
|
/** The referenced tier's working set (distinct PR URLs spotted, capped server-side). */
|
|
986
|
-
referencedPrCandidates:
|
|
1056
|
+
referencedPrCandidates: z10.array(z10.string()).optional(),
|
|
987
1057
|
/** The issue this task is ABOUT (spec 2026-07-21-report-ref-discovery). Display-only. */
|
|
988
|
-
referencedIssueUrl:
|
|
1058
|
+
referencedIssueUrl: z10.string().optional(),
|
|
989
1059
|
/** The referenced-issue working set, persisted like `referencedPrCandidates`. Capped. */
|
|
990
|
-
referencedIssueCandidates:
|
|
1060
|
+
referencedIssueCandidates: z10.array(z10.string()).optional(),
|
|
991
1061
|
/** Explicit execution policy. `false` means the run intentionally uses the repo root;
|
|
992
1062
|
* absent on older runs and for the default isolated-worktree mode. */
|
|
993
|
-
worktree:
|
|
1063
|
+
worktree: z10.literal(false).optional(),
|
|
994
1064
|
/** Absent for in-place runs and after an isolated worktree is removed. */
|
|
995
|
-
worktreePath:
|
|
996
|
-
branch:
|
|
1065
|
+
worktreePath: z10.string().optional(),
|
|
1066
|
+
branch: z10.string().optional(),
|
|
997
1067
|
/** Stable baseline for session git views: a worktree's fork ref, or an in-place run's starting commit. */
|
|
998
|
-
baseBranch:
|
|
1068
|
+
baseBranch: z10.string().optional(),
|
|
999
1069
|
/** Set when count-based retention (#483) reclaimed the worktree DIRECTORY (the branch is
|
|
1000
1070
|
* kept): the dir is gone but recoverable. */
|
|
1001
|
-
worktreeReclaimedAt:
|
|
1071
|
+
worktreeReclaimedAt: z10.string().optional(),
|
|
1002
1072
|
/** Parallel variants (spec 010): runs sharing a groupId are one group. */
|
|
1003
|
-
groupId:
|
|
1073
|
+
groupId: z10.string().optional(),
|
|
1004
1074
|
/** Variant letter within the group — 'A' | 'B' | 'C'. */
|
|
1005
|
-
variant:
|
|
1006
|
-
peakRssBytes:
|
|
1007
|
-
peakProcCount:
|
|
1008
|
-
archived:
|
|
1009
|
-
archivedAt:
|
|
1075
|
+
variant: z10.string().optional(),
|
|
1076
|
+
peakRssBytes: z10.number().optional(),
|
|
1077
|
+
peakProcCount: z10.number().optional(),
|
|
1078
|
+
archived: z10.boolean(),
|
|
1079
|
+
archivedAt: z10.string().optional(),
|
|
1010
1080
|
/** Pinned to the top of this project's task list (#935) — the `Pinned` group above
|
|
1011
1081
|
* `Needs you`. Optional, unlike `archived`: absent IS "not pinned", which is what every
|
|
1012
1082
|
* record written before this carries, and the store never writes `false`. Archiving
|
|
1013
1083
|
* clears it, because archiving is how a user resigns from a task. */
|
|
1014
|
-
pinned:
|
|
1084
|
+
pinned: z10.boolean().optional(),
|
|
1015
1085
|
/** When the pin was set. Deliberately WRITE-ONLY today, like the `archivedAt` above it:
|
|
1016
1086
|
* ordering inside `Pinned` uses the ordinary status/recency rules, so nothing reads this
|
|
1017
1087
|
* yet. It is here because a field on a protected surface is far cheaper to add now than to
|
|
1018
1088
|
* add later — "pinned oldest first" and "unpin what you pinned a month ago" both need it,
|
|
1019
1089
|
* and neither can be reconstructed after the fact. */
|
|
1020
|
-
pinnedAt:
|
|
1090
|
+
pinnedAt: z10.string().optional(),
|
|
1021
1091
|
/** Read receipt (#unread-done-items): ISO time the cockpit last opened this run's
|
|
1022
1092
|
* thread. A finished (`done`/`failed`) run reads as *unread* until seen since it
|
|
1023
1093
|
* finished — see `isUnread()` in the cockpit's `lib/read-state.ts`. Absent on old
|
|
1024
1094
|
* runs, on any run not yet opened, and on one deliberately put back to unread via
|
|
1025
1095
|
* `POST /runs/:id/unread` (#775) — all three count as unread. */
|
|
1026
|
-
seenAt:
|
|
1027
|
-
currentStepId:
|
|
1028
|
-
error:
|
|
1029
|
-
steps:
|
|
1096
|
+
seenAt: z10.string().optional(),
|
|
1097
|
+
currentStepId: z10.string().optional(),
|
|
1098
|
+
error: z10.string().optional(),
|
|
1099
|
+
steps: z10.array(stepStateSchema),
|
|
1030
1100
|
/**
|
|
1031
1101
|
* The persisted workflow definition, so a `queued` run survives a restart — including the ad-hoc
|
|
1032
1102
|
* "(planned)" chains that exist nowhere else.
|
|
@@ -1044,48 +1114,48 @@ var runRecordSchema = z9.object({
|
|
|
1044
1114
|
var apiRunSchema = runRecordSchema.extend({
|
|
1045
1115
|
/** Read-only GET /runs/:id verdict: null permits Finish, a string explains refusal.
|
|
1046
1116
|
* Absent on lists, stored records and mutation responses; absence is not permission. */
|
|
1047
|
-
finishBlocked:
|
|
1117
|
+
finishBlocked: z10.string().nullable().optional(),
|
|
1048
1118
|
/** Server-resolved Cursor CLI command, including the configured executable. Never persisted. */
|
|
1049
|
-
cliResumeCommand:
|
|
1119
|
+
cliResumeCommand: z10.string().optional(),
|
|
1050
1120
|
usage: processUsageSchema.optional()
|
|
1051
1121
|
});
|
|
1052
|
-
var runIndexEntrySchema =
|
|
1122
|
+
var runIndexEntrySchema = z10.object({
|
|
1053
1123
|
/** The registered project this run belongs to. Joins against `GET /projects`. */
|
|
1054
|
-
projectId:
|
|
1055
|
-
id:
|
|
1056
|
-
title:
|
|
1057
|
-
titleSummary:
|
|
1058
|
-
titleOrigin:
|
|
1124
|
+
projectId: z10.string(),
|
|
1125
|
+
id: z10.string(),
|
|
1126
|
+
title: z10.string(),
|
|
1127
|
+
titleSummary: z10.string().optional(),
|
|
1128
|
+
titleOrigin: z10.enum(["user", "auto", "marker"]).optional(),
|
|
1059
1129
|
status: runStatusSchema,
|
|
1060
1130
|
activity: runActivitySchema.optional(),
|
|
1061
1131
|
hasPendingHumanAsk: runRecordSchema.shape.hasPendingHumanAsk,
|
|
1062
1132
|
/** Only the relationship role and wait phase used by list attention. */
|
|
1063
1133
|
delegation: runDelegationSummarySchema.optional(),
|
|
1064
|
-
createdAt:
|
|
1065
|
-
finishedAt:
|
|
1134
|
+
createdAt: z10.string(),
|
|
1135
|
+
finishedAt: z10.string().optional(),
|
|
1066
1136
|
/** With `status`/`finishedAt`/`archived`, the four inputs `isUnread` reads — what lets the
|
|
1067
1137
|
* palette lead with "finished while you weren't looking" across every project, not just the
|
|
1068
1138
|
* one you happen to be standing in. */
|
|
1069
|
-
seenAt:
|
|
1139
|
+
seenAt: z10.string().optional(),
|
|
1070
1140
|
/** Always present, like `RunRecord.archived`: absent would read as "not archived", and the
|
|
1071
1141
|
* unread rule treats archiving as a stronger "done with this" than reading. */
|
|
1072
|
-
archived:
|
|
1142
|
+
archived: z10.boolean(),
|
|
1073
1143
|
/** A run parked by a provider usage limit is `failed` on the record with a resume booked
|
|
1074
1144
|
* (spec 2026-08-03-auto-resume-after-usage-limit). Both `deriveAttention` and `isUnread` read
|
|
1075
1145
|
* it, so without it here a cross-project row would show a red "failed" dot and land in
|
|
1076
1146
|
* Recently finished for work that is simply waiting for its appointment. */
|
|
1077
|
-
autoResumeAt:
|
|
1147
|
+
autoResumeAt: z10.string().optional(),
|
|
1078
1148
|
/** The workflow the run executes — the global Tasks page shows it in a column and groups by
|
|
1079
1149
|
* it. Always present on the record (`RunRecord.workflow`), so required here; the display
|
|
1080
1150
|
* refinement `workflowLabel` applies needs `steps[]`, which this row deliberately omits, so
|
|
1081
1151
|
* a `(planned)` chain reads as itself here rather than as its first agent's name. */
|
|
1082
|
-
workflow:
|
|
1152
|
+
workflow: z10.string(),
|
|
1083
1153
|
/** The task's branch, when it has one — a column on the global page, and the one field that
|
|
1084
1154
|
* makes a cross-project row identifiable at a glance without opening it. */
|
|
1085
|
-
branch:
|
|
1155
|
+
branch: z10.string().optional(),
|
|
1086
1156
|
/** When the agent actually started, as opposed to when the task was created. The global page's
|
|
1087
1157
|
* age column prefers it and falls back to `createdAt`, exactly as the per-project table does. */
|
|
1088
|
-
startedAt:
|
|
1158
|
+
startedAt: z10.string().optional(),
|
|
1089
1159
|
/**
|
|
1090
1160
|
* The six fields `taskReference()` (`web/src/lib/tasks-table.ts`) reads to decide a task's PR
|
|
1091
1161
|
* or issue chip. Carried verbatim rather than pre-resolved into a `{kind, number, url}` on the
|
|
@@ -1097,20 +1167,20 @@ var runIndexEntrySchema = z9.object({
|
|
|
1097
1167
|
* Six scalars is still the slim row this schema exists to keep: `steps[]` and `workflowDef`,
|
|
1098
1168
|
* the expensive half, stay off it.
|
|
1099
1169
|
*/
|
|
1100
|
-
pullRequestUrl:
|
|
1101
|
-
referencedPullRequestUrl:
|
|
1102
|
-
prNumber:
|
|
1103
|
-
issueNumber:
|
|
1104
|
-
referencedIssueUrl:
|
|
1105
|
-
markerRefs:
|
|
1170
|
+
pullRequestUrl: z10.string().optional(),
|
|
1171
|
+
referencedPullRequestUrl: z10.string().optional(),
|
|
1172
|
+
prNumber: z10.number().optional(),
|
|
1173
|
+
issueNumber: z10.number().optional(),
|
|
1174
|
+
referencedIssueUrl: z10.string().optional(),
|
|
1175
|
+
markerRefs: z10.object({ pr: z10.number().optional(), issue: z10.number().optional() }).optional(),
|
|
1106
1176
|
/** What the run has cost so far. Absent means nothing was recorded, which is NOT `$0` — the
|
|
1107
1177
|
* cockpit prints an em dash rather than claiming a measurement that never happened. */
|
|
1108
|
-
costUsd:
|
|
1178
|
+
costUsd: z10.number().optional(),
|
|
1109
1179
|
/** The persisted high-water marks a FINISHED run leaves behind. `usage` below stops existing
|
|
1110
1180
|
* the moment the process tree does, so without these a finished row could say nothing at all
|
|
1111
1181
|
* about what it took to run. */
|
|
1112
|
-
peakRssBytes:
|
|
1113
|
-
peakProcCount:
|
|
1182
|
+
peakRssBytes: z10.number().optional(),
|
|
1183
|
+
peakProcCount: z10.number().optional(),
|
|
1114
1184
|
/**
|
|
1115
1185
|
* The live CPU/RSS sample of this run's process tree, attached on the way out exactly as
|
|
1116
1186
|
* `GET /runs` attaches it (`withUsage`) — never persisted.
|
|
@@ -1122,90 +1192,90 @@ var runIndexEntrySchema = z9.object({
|
|
|
1122
1192
|
*/
|
|
1123
1193
|
usage: processUsageSchema.optional()
|
|
1124
1194
|
});
|
|
1125
|
-
var referenceStatusesByProjectSchema =
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
prs:
|
|
1129
|
-
issues:
|
|
1195
|
+
var referenceStatusesByProjectSchema = z10.record(
|
|
1196
|
+
z10.string(),
|
|
1197
|
+
z10.object({
|
|
1198
|
+
prs: z10.record(z10.number(), referenceStatusSchema),
|
|
1199
|
+
issues: z10.record(z10.number(), referenceStatusSchema)
|
|
1130
1200
|
})
|
|
1131
1201
|
);
|
|
1132
|
-
var runsIndexResponseSchema =
|
|
1202
|
+
var runsIndexResponseSchema = z10.object({
|
|
1133
1203
|
/** Newest first, across every registered project. Archived runs are included — `GET /runs`
|
|
1134
1204
|
* carries them for the project you are standing in, and a finder that dropped them elsewhere
|
|
1135
1205
|
* would make a task vanish the moment you left its project. */
|
|
1136
|
-
runs:
|
|
1206
|
+
runs: z10.array(runIndexEntrySchema),
|
|
1137
1207
|
/** Additive: absent statuses mean "nothing warm", never "nothing to show". */
|
|
1138
1208
|
referenceStatuses: referenceStatusesByProjectSchema,
|
|
1139
1209
|
/** The per-project cap that produced this list. */
|
|
1140
|
-
perProjectLimit:
|
|
1210
|
+
perProjectLimit: z10.number(),
|
|
1141
1211
|
/** Ids of the projects that had more runs than the cap allowed. */
|
|
1142
|
-
truncated:
|
|
1212
|
+
truncated: z10.array(z10.string())
|
|
1143
1213
|
});
|
|
1144
|
-
var createRunResponseSchema =
|
|
1214
|
+
var createRunResponseSchema = z10.union([
|
|
1145
1215
|
runRecordSchema,
|
|
1146
|
-
|
|
1216
|
+
z10.object({ runs: z10.array(runRecordSchema) })
|
|
1147
1217
|
]);
|
|
1148
|
-
var cancelResponseSchema =
|
|
1149
|
-
var cancelAutoResumeResponseSchema =
|
|
1150
|
-
var archiveFinishedResponseSchema =
|
|
1151
|
-
var markAllReadResponseSchema =
|
|
1152
|
-
var deleteRunResponseSchema =
|
|
1153
|
-
var finishResponseSchema =
|
|
1154
|
-
var continueResponseSchema =
|
|
1155
|
-
var createPrResponseSchema =
|
|
1156
|
-
url:
|
|
1157
|
-
dryRun:
|
|
1158
|
-
});
|
|
1159
|
-
var messageResponseSchema =
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1218
|
+
var cancelResponseSchema = z10.object({ cancelled: z10.boolean() });
|
|
1219
|
+
var cancelAutoResumeResponseSchema = z10.object({ cancelled: z10.literal(true) });
|
|
1220
|
+
var archiveFinishedResponseSchema = z10.object({ archived: z10.number() });
|
|
1221
|
+
var markAllReadResponseSchema = z10.object({ read: z10.number() });
|
|
1222
|
+
var deleteRunResponseSchema = z10.object({ deleted: z10.literal(true) });
|
|
1223
|
+
var finishResponseSchema = z10.object({ finished: z10.literal(true) });
|
|
1224
|
+
var continueResponseSchema = z10.object({ continued: z10.literal(true) });
|
|
1225
|
+
var createPrResponseSchema = z10.object({
|
|
1226
|
+
url: z10.string(),
|
|
1227
|
+
dryRun: z10.boolean()
|
|
1228
|
+
});
|
|
1229
|
+
var messageResponseSchema = z10.union([
|
|
1230
|
+
z10.object({ delivered: z10.literal(true) }),
|
|
1231
|
+
z10.object({ queued: z10.literal(true), message: queuedMessageSchema }),
|
|
1232
|
+
z10.object({ deferred: z10.literal(true) })
|
|
1163
1233
|
]);
|
|
1164
|
-
var editQueuedMessageResponseSchema =
|
|
1165
|
-
var removeQueuedMessageResponseSchema =
|
|
1166
|
-
var openInCliResponseSchema =
|
|
1167
|
-
opened:
|
|
1168
|
-
command:
|
|
1169
|
-
});
|
|
1170
|
-
var removeWorktreeResponseSchema =
|
|
1171
|
-
var gitCommitResponseSchema =
|
|
1172
|
-
committed:
|
|
1173
|
-
sha:
|
|
1174
|
-
});
|
|
1175
|
-
var gitPushResponseSchema =
|
|
1176
|
-
pushed:
|
|
1177
|
-
branch:
|
|
1178
|
-
remote:
|
|
1179
|
-
upstreamSet:
|
|
1180
|
-
});
|
|
1181
|
-
var runCommitSchema =
|
|
1182
|
-
sha:
|
|
1183
|
-
subject:
|
|
1184
|
-
author:
|
|
1234
|
+
var editQueuedMessageResponseSchema = z10.object({ message: queuedMessageSchema });
|
|
1235
|
+
var removeQueuedMessageResponseSchema = z10.object({ removed: z10.literal(true) });
|
|
1236
|
+
var openInCliResponseSchema = z10.object({
|
|
1237
|
+
opened: z10.literal(true),
|
|
1238
|
+
command: z10.string()
|
|
1239
|
+
});
|
|
1240
|
+
var removeWorktreeResponseSchema = z10.object({ removed: z10.literal(true) });
|
|
1241
|
+
var gitCommitResponseSchema = z10.object({
|
|
1242
|
+
committed: z10.literal(true),
|
|
1243
|
+
sha: z10.string()
|
|
1244
|
+
});
|
|
1245
|
+
var gitPushResponseSchema = z10.object({
|
|
1246
|
+
pushed: z10.literal(true),
|
|
1247
|
+
branch: z10.string(),
|
|
1248
|
+
remote: z10.string(),
|
|
1249
|
+
upstreamSet: z10.boolean()
|
|
1250
|
+
});
|
|
1251
|
+
var runCommitSchema = z10.object({
|
|
1252
|
+
sha: z10.string(),
|
|
1253
|
+
subject: z10.string(),
|
|
1254
|
+
author: z10.string(),
|
|
1185
1255
|
/** Relative time ("3 hours ago") — git's `%cr`. */
|
|
1186
|
-
when:
|
|
1256
|
+
when: z10.string()
|
|
1187
1257
|
});
|
|
1188
|
-
var runCommitsResponseSchema =
|
|
1189
|
-
var groupVariantSchema =
|
|
1190
|
-
id:
|
|
1258
|
+
var runCommitsResponseSchema = z10.object({ commits: z10.array(runCommitSchema) });
|
|
1259
|
+
var groupVariantSchema = z10.object({
|
|
1260
|
+
id: z10.string(),
|
|
1191
1261
|
/** 'A' | 'B' | 'C' in practice; `'?'` for a record that lost its letter. */
|
|
1192
|
-
variant:
|
|
1193
|
-
title:
|
|
1262
|
+
variant: z10.string(),
|
|
1263
|
+
title: z10.string(),
|
|
1194
1264
|
status: runStatusSchema,
|
|
1195
|
-
archived:
|
|
1196
|
-
tokensUsed:
|
|
1265
|
+
archived: z10.boolean(),
|
|
1266
|
+
tokensUsed: z10.number(),
|
|
1197
1267
|
inputTokens: usageCounterSchema.optional(),
|
|
1198
1268
|
outputTokens: usageCounterSchema.optional(),
|
|
1199
|
-
costUsd:
|
|
1200
|
-
diffStat:
|
|
1269
|
+
costUsd: z10.number().optional(),
|
|
1270
|
+
diffStat: z10.string(),
|
|
1201
1271
|
/** First lines of the handoff journal's "## Progress log" section, as markdown. */
|
|
1202
|
-
handoffExcerpt:
|
|
1272
|
+
handoffExcerpt: z10.string()
|
|
1203
1273
|
});
|
|
1204
|
-
var groupResponseSchema =
|
|
1205
|
-
groupId:
|
|
1206
|
-
runs:
|
|
1274
|
+
var groupResponseSchema = z10.object({
|
|
1275
|
+
groupId: z10.string(),
|
|
1276
|
+
runs: z10.array(groupVariantSchema)
|
|
1207
1277
|
});
|
|
1208
|
-
var pickVariantResponseSchema =
|
|
1278
|
+
var pickVariantResponseSchema = z10.object({
|
|
1209
1279
|
winner: runRecordSchema.optional()
|
|
1210
1280
|
});
|
|
1211
1281
|
var FILE_ATTACHMENT_MEDIA_TYPES = [
|
|
@@ -1228,174 +1298,174 @@ function isImageAttachmentName(name) {
|
|
|
1228
1298
|
const ext = name.split(".").pop()?.toLowerCase();
|
|
1229
1299
|
return ext !== void 0 && IMAGE_ATTACHMENT_EXTENSIONS.has(ext);
|
|
1230
1300
|
}
|
|
1231
|
-
var attachmentFileParamSchema =
|
|
1232
|
-
id:
|
|
1233
|
-
file:
|
|
1301
|
+
var attachmentFileParamSchema = z10.object({
|
|
1302
|
+
id: z10.string().min(1),
|
|
1303
|
+
file: z10.string().regex(/^[A-Za-z0-9_-][A-Za-z0-9._-]*$/).refine((name) => !name.includes(".."))
|
|
1234
1304
|
});
|
|
1235
|
-
var attachmentInputSchema =
|
|
1236
|
-
mediaType:
|
|
1305
|
+
var attachmentInputSchema = z10.object({
|
|
1306
|
+
mediaType: z10.string().refine(isAttachmentMediaType, {
|
|
1237
1307
|
message: "unsupported attachment type \u2014 images, plain text, markdown and PDF only"
|
|
1238
1308
|
}),
|
|
1239
|
-
data:
|
|
1309
|
+
data: z10.string().min(1).max(7e6)
|
|
1240
1310
|
});
|
|
1241
1311
|
var imageInputSchema = attachmentInputSchema;
|
|
1242
|
-
var createRunInputBaseSchema =
|
|
1243
|
-
workflow:
|
|
1312
|
+
var createRunInputBaseSchema = z10.object({
|
|
1313
|
+
workflow: z10.string().min(1).optional(),
|
|
1244
1314
|
/** An inline chain (spec 008 — an approved plan runs as an ad-hoc workflow, never written to
|
|
1245
1315
|
* a file). The catalog's own step shape, not a copy of it. */
|
|
1246
|
-
steps:
|
|
1247
|
-
task:
|
|
1248
|
-
model:
|
|
1316
|
+
steps: z10.array(workflowStepDefSchema).min(1).max(8).optional(),
|
|
1317
|
+
task: z10.string().min(1).max(1e5, "must be at most 100000 characters"),
|
|
1318
|
+
model: z10.string().optional(),
|
|
1249
1319
|
/** Reasoning-effort pin (#45). Omit for the harness default; empty/`auto` stay implicit. */
|
|
1250
|
-
effort:
|
|
1320
|
+
effort: z10.string().max(32).optional(),
|
|
1251
1321
|
runner: runnerSchema.optional(),
|
|
1252
1322
|
/** Agent account for this task (spec 2026-07-29-agent-profiles). Omit to follow the
|
|
1253
1323
|
* project's own selection; an id that no longer exists is a 400, not a silent default. */
|
|
1254
|
-
agentProfile:
|
|
1324
|
+
agentProfile: z10.string().max(64).optional(),
|
|
1255
1325
|
/** 1–3. Above 1 the response is `{ runs }` rather than a single record. */
|
|
1256
|
-
variants:
|
|
1326
|
+
variants: z10.number().int().min(1).max(3).optional(),
|
|
1257
1327
|
/** false → run in the repo working tree instead of an isolated worktree (read-only skills).
|
|
1258
1328
|
* Omit for the default. Ignored server-side when variants > 1. */
|
|
1259
|
-
worktree:
|
|
1329
|
+
worktree: z10.boolean().optional(),
|
|
1260
1330
|
/** true → autonomous run: never parks at "waiting"; auto-continues until done. */
|
|
1261
|
-
autonomous:
|
|
1331
|
+
autonomous: z10.boolean().optional(),
|
|
1262
1332
|
/** false → keep the handoff journal but do not expose or request a follow-up todos file.
|
|
1263
1333
|
* Omit for the default (enabled); a server with the capability off pins it to false. */
|
|
1264
|
-
generateFollowups:
|
|
1334
|
+
generateFollowups: z10.boolean().optional(),
|
|
1265
1335
|
/** Per-run system-prompt override (R2 2.3) — programmatic callers only. Wins over the
|
|
1266
1336
|
* config.json default; whitespace-only degrades to absent. */
|
|
1267
|
-
systemPrompt:
|
|
1337
|
+
systemPrompt: z10.string().trim().max(2e4, "must be at most 20000 characters").optional().transform((s) => s ? s : void 0),
|
|
1268
1338
|
/** Attachments pasted into the new-task form — screenshots, and since #950 PDF/TXT/MD files
|
|
1269
1339
|
* too; delivered with the first agent step. The key keeps its name: the wire contract widened
|
|
1270
1340
|
* in place rather than growing a second list. */
|
|
1271
|
-
images:
|
|
1341
|
+
images: z10.array(attachmentInputSchema).max(4).optional(),
|
|
1272
1342
|
/** The inbox entry this task came from (#374). Best-effort bookkeeping: an unknown or
|
|
1273
1343
|
* already-started id never fails the run. For ×2/×3 the FIRST variant is recorded. */
|
|
1274
|
-
todoId:
|
|
1344
|
+
todoId: z10.string().min(1).max(200, "must be at most 200 characters").optional()
|
|
1275
1345
|
});
|
|
1276
1346
|
var createRunInputSchema = createRunInputBaseSchema.refine(
|
|
1277
1347
|
(b) => Boolean(b.workflow) !== Boolean(b.steps),
|
|
1278
1348
|
{ message: 'provide either "workflow" or "steps", not both' }
|
|
1279
1349
|
);
|
|
1280
|
-
var messageInputSchema =
|
|
1281
|
-
text:
|
|
1282
|
-
images:
|
|
1350
|
+
var messageInputSchema = z10.object({
|
|
1351
|
+
text: z10.string().max(1e5).default(""),
|
|
1352
|
+
images: z10.array(attachmentInputSchema).max(4).default([])
|
|
1283
1353
|
}).refine((m) => m.text.trim().length > 0 || m.images.length > 0, {
|
|
1284
1354
|
message: "message needs text or at least one attachment"
|
|
1285
1355
|
});
|
|
1286
|
-
var patchRunInputSchema =
|
|
1287
|
-
title:
|
|
1288
|
-
task:
|
|
1356
|
+
var patchRunInputSchema = z10.object({
|
|
1357
|
+
title: z10.string().trim().min(1).max(300).optional(),
|
|
1358
|
+
task: z10.string().trim().min(1).max(1e5).optional()
|
|
1289
1359
|
});
|
|
1290
|
-
var pinRunInputSchema =
|
|
1360
|
+
var pinRunInputSchema = z10.object({ pinned: z10.boolean().optional() });
|
|
1291
1361
|
|
|
1292
1362
|
// ../contract/src/repo.ts
|
|
1293
|
-
import { z as
|
|
1294
|
-
var statusEntrySchema =
|
|
1295
|
-
status:
|
|
1296
|
-
path:
|
|
1297
|
-
});
|
|
1298
|
-
var logEntrySchema =
|
|
1299
|
-
hash:
|
|
1300
|
-
subject:
|
|
1301
|
-
author:
|
|
1302
|
-
when:
|
|
1303
|
-
});
|
|
1304
|
-
var repoResponseSchema =
|
|
1305
|
-
|
|
1306
|
-
info:
|
|
1307
|
-
status:
|
|
1308
|
-
log:
|
|
1309
|
-
branches:
|
|
1310
|
-
baseBranch:
|
|
1363
|
+
import { z as z11 } from "zod";
|
|
1364
|
+
var statusEntrySchema = z11.object({
|
|
1365
|
+
status: z11.string(),
|
|
1366
|
+
path: z11.string()
|
|
1367
|
+
});
|
|
1368
|
+
var logEntrySchema = z11.object({
|
|
1369
|
+
hash: z11.string(),
|
|
1370
|
+
subject: z11.string(),
|
|
1371
|
+
author: z11.string(),
|
|
1372
|
+
when: z11.string()
|
|
1373
|
+
});
|
|
1374
|
+
var repoResponseSchema = z11.union([
|
|
1375
|
+
z11.object({
|
|
1376
|
+
info: z11.null(),
|
|
1377
|
+
status: z11.array(z11.never()),
|
|
1378
|
+
log: z11.array(z11.never()),
|
|
1379
|
+
branches: z11.array(z11.never()),
|
|
1380
|
+
baseBranch: z11.null()
|
|
1311
1381
|
}),
|
|
1312
|
-
|
|
1382
|
+
z11.object({
|
|
1313
1383
|
info: repoInfoSchema,
|
|
1314
|
-
status:
|
|
1315
|
-
log:
|
|
1316
|
-
branches:
|
|
1317
|
-
baseBranch:
|
|
1384
|
+
status: z11.array(statusEntrySchema),
|
|
1385
|
+
log: z11.array(logEntrySchema),
|
|
1386
|
+
branches: z11.array(z11.string()),
|
|
1387
|
+
baseBranch: z11.string().nullable()
|
|
1318
1388
|
})
|
|
1319
1389
|
]);
|
|
1320
|
-
var repoBranchResponseSchema =
|
|
1321
|
-
branch:
|
|
1322
|
-
created:
|
|
1323
|
-
});
|
|
1324
|
-
var repoPullBranchesResponseSchema =
|
|
1325
|
-
var repoPullInputSchema =
|
|
1326
|
-
branch:
|
|
1327
|
-
confirm:
|
|
1328
|
-
});
|
|
1329
|
-
var repoPullResponseSchema =
|
|
1330
|
-
branch:
|
|
1331
|
-
pulled:
|
|
1332
|
-
summary:
|
|
1333
|
-
});
|
|
1334
|
-
var repoPullConfirmationSchema =
|
|
1335
|
-
error:
|
|
1336
|
-
branch:
|
|
1337
|
-
risks:
|
|
1338
|
-
});
|
|
1339
|
-
var repoPullErrorSchema =
|
|
1390
|
+
var repoBranchResponseSchema = z11.object({
|
|
1391
|
+
branch: z11.string(),
|
|
1392
|
+
created: z11.boolean()
|
|
1393
|
+
});
|
|
1394
|
+
var repoPullBranchesResponseSchema = z11.object({ branches: z11.array(z11.string()) });
|
|
1395
|
+
var repoPullInputSchema = z11.object({
|
|
1396
|
+
branch: z11.string().trim().min(1).max(200).optional(),
|
|
1397
|
+
confirm: z11.boolean().optional()
|
|
1398
|
+
});
|
|
1399
|
+
var repoPullResponseSchema = z11.object({
|
|
1400
|
+
branch: z11.string(),
|
|
1401
|
+
pulled: z11.literal(true),
|
|
1402
|
+
summary: z11.string()
|
|
1403
|
+
});
|
|
1404
|
+
var repoPullConfirmationSchema = z11.object({
|
|
1405
|
+
error: z11.string(),
|
|
1406
|
+
branch: z11.string(),
|
|
1407
|
+
risks: z11.array(z11.enum(["active_runs", "dirty_tree"]))
|
|
1408
|
+
});
|
|
1409
|
+
var repoPullErrorSchema = z11.union([
|
|
1340
1410
|
repoPullConfirmationSchema,
|
|
1341
|
-
|
|
1411
|
+
z11.object({ error: z11.string() })
|
|
1342
1412
|
]);
|
|
1343
|
-
var diffStatSchema2 =
|
|
1344
|
-
adds:
|
|
1345
|
-
dels:
|
|
1346
|
-
files:
|
|
1413
|
+
var diffStatSchema2 = z11.object({
|
|
1414
|
+
adds: z11.number(),
|
|
1415
|
+
dels: z11.number(),
|
|
1416
|
+
files: z11.number()
|
|
1347
1417
|
});
|
|
1348
|
-
var changedFileSchema =
|
|
1349
|
-
path:
|
|
1418
|
+
var changedFileSchema = z11.object({
|
|
1419
|
+
path: z11.string(),
|
|
1350
1420
|
/** Rename/copy source — present only when `status` is renamed/copied. */
|
|
1351
|
-
oldPath:
|
|
1352
|
-
status:
|
|
1353
|
-
adds:
|
|
1354
|
-
dels:
|
|
1421
|
+
oldPath: z11.string().optional(),
|
|
1422
|
+
status: z11.enum(["added", "modified", "deleted", "renamed", "copied"]),
|
|
1423
|
+
adds: z11.number(),
|
|
1424
|
+
dels: z11.number(),
|
|
1355
1425
|
/** Binary per numstat — there is no text patch to render. */
|
|
1356
|
-
binary:
|
|
1426
|
+
binary: z11.boolean(),
|
|
1357
1427
|
/** True when the path is one the raw-bytes route serves as an `<img>` (#365) — present only
|
|
1358
1428
|
* when true, so old clients that never read it stay correct. */
|
|
1359
|
-
image:
|
|
1429
|
+
image: z11.boolean().optional(),
|
|
1360
1430
|
/** This file's unified-diff section; possibly `… (patch truncated)`, possibly empty. */
|
|
1361
|
-
patch:
|
|
1431
|
+
patch: z11.string()
|
|
1362
1432
|
});
|
|
1363
|
-
var changesPayloadSchema =
|
|
1364
|
-
files:
|
|
1433
|
+
var changesPayloadSchema = z11.object({
|
|
1434
|
+
files: z11.array(changedFileSchema),
|
|
1365
1435
|
stat: diffStatSchema2,
|
|
1366
1436
|
/** Additive context for review tasks whose worktree HEAD no longer matches their own branch. */
|
|
1367
|
-
repointedHead:
|
|
1437
|
+
repointedHead: z11.object({ headBranch: z11.string(), taskBranch: z11.string() }).optional()
|
|
1368
1438
|
});
|
|
1369
|
-
var repoCommitPayloadSchema =
|
|
1370
|
-
sha:
|
|
1371
|
-
subject:
|
|
1372
|
-
author:
|
|
1439
|
+
var repoCommitPayloadSchema = z11.object({
|
|
1440
|
+
sha: z11.string(),
|
|
1441
|
+
subject: z11.string(),
|
|
1442
|
+
author: z11.string(),
|
|
1373
1443
|
/** Relative time ("3 hours ago") — same `%cr` format as the /api/v1/repo log. */
|
|
1374
|
-
when:
|
|
1375
|
-
files:
|
|
1444
|
+
when: z11.string(),
|
|
1445
|
+
files: z11.array(changedFileSchema),
|
|
1376
1446
|
stat: diffStatSchema2
|
|
1377
1447
|
});
|
|
1378
|
-
var worktreeDirEntrySchema =
|
|
1379
|
-
name:
|
|
1380
|
-
type:
|
|
1381
|
-
size:
|
|
1382
|
-
});
|
|
1383
|
-
var worktreeEntrySchema =
|
|
1384
|
-
|
|
1385
|
-
type:
|
|
1386
|
-
path:
|
|
1387
|
-
entries:
|
|
1448
|
+
var worktreeDirEntrySchema = z11.object({
|
|
1449
|
+
name: z11.string(),
|
|
1450
|
+
type: z11.enum(["dir", "file"]),
|
|
1451
|
+
size: z11.number().optional()
|
|
1452
|
+
});
|
|
1453
|
+
var worktreeEntrySchema = z11.discriminatedUnion("type", [
|
|
1454
|
+
z11.object({
|
|
1455
|
+
type: z11.literal("dir"),
|
|
1456
|
+
path: z11.string(),
|
|
1457
|
+
entries: z11.array(worktreeDirEntrySchema)
|
|
1388
1458
|
}),
|
|
1389
|
-
|
|
1390
|
-
type:
|
|
1391
|
-
path:
|
|
1392
|
-
size:
|
|
1393
|
-
binary:
|
|
1394
|
-
tooLarge:
|
|
1395
|
-
content:
|
|
1459
|
+
z11.object({
|
|
1460
|
+
type: z11.literal("file"),
|
|
1461
|
+
path: z11.string(),
|
|
1462
|
+
size: z11.number(),
|
|
1463
|
+
binary: z11.boolean(),
|
|
1464
|
+
tooLarge: z11.boolean(),
|
|
1465
|
+
content: z11.string().optional()
|
|
1396
1466
|
})
|
|
1397
1467
|
]);
|
|
1398
|
-
var worktreeRunStatusSchema =
|
|
1468
|
+
var worktreeRunStatusSchema = z11.enum([
|
|
1399
1469
|
"queued",
|
|
1400
1470
|
"running",
|
|
1401
1471
|
"waiting",
|
|
@@ -1404,41 +1474,41 @@ var worktreeRunStatusSchema = z10.enum([
|
|
|
1404
1474
|
"failed",
|
|
1405
1475
|
"cancelled"
|
|
1406
1476
|
]);
|
|
1407
|
-
var worktreeInfoSchema =
|
|
1408
|
-
runId:
|
|
1409
|
-
title:
|
|
1477
|
+
var worktreeInfoSchema = z11.object({
|
|
1478
|
+
runId: z11.string(),
|
|
1479
|
+
title: z11.string(),
|
|
1410
1480
|
status: worktreeRunStatusSchema,
|
|
1411
|
-
branch:
|
|
1412
|
-
sizeBytes:
|
|
1413
|
-
finishedAt:
|
|
1414
|
-
reclaimable:
|
|
1481
|
+
branch: z11.string().nullable(),
|
|
1482
|
+
sizeBytes: z11.number().nullable(),
|
|
1483
|
+
finishedAt: z11.string().nullable(),
|
|
1484
|
+
reclaimable: z11.boolean()
|
|
1415
1485
|
});
|
|
1416
|
-
var worktreesResponseSchema =
|
|
1417
|
-
worktrees:
|
|
1418
|
-
totalBytes:
|
|
1419
|
-
keep:
|
|
1486
|
+
var worktreesResponseSchema = z11.object({
|
|
1487
|
+
worktrees: z11.array(worktreeInfoSchema),
|
|
1488
|
+
totalBytes: z11.number().nullable(),
|
|
1489
|
+
keep: z11.number()
|
|
1420
1490
|
});
|
|
1421
|
-
var reclaimWorktreesResponseSchema =
|
|
1422
|
-
reclaimed:
|
|
1491
|
+
var reclaimWorktreesResponseSchema = z11.object({
|
|
1492
|
+
reclaimed: z11.array(z11.string())
|
|
1423
1493
|
});
|
|
1424
1494
|
|
|
1425
1495
|
// ../contract/src/projects.ts
|
|
1426
|
-
import { z as
|
|
1427
|
-
var projectListEntrySchema =
|
|
1428
|
-
id:
|
|
1429
|
-
name:
|
|
1496
|
+
import { z as z12 } from "zod";
|
|
1497
|
+
var projectListEntrySchema = z12.object({
|
|
1498
|
+
id: z12.string(),
|
|
1499
|
+
name: z12.string(),
|
|
1430
1500
|
/** Absolute, realpath-normalized repo root. */
|
|
1431
|
-
root:
|
|
1432
|
-
addedAt:
|
|
1433
|
-
lastOpenedAt:
|
|
1434
|
-
source:
|
|
1501
|
+
root: z12.string(),
|
|
1502
|
+
addedAt: z12.string(),
|
|
1503
|
+
lastOpenedAt: z12.string(),
|
|
1504
|
+
source: z12.enum(["local", "checkout"]),
|
|
1435
1505
|
/** `not-git` is fully usable (degraded single-queue mode); only `missing` blocks. */
|
|
1436
|
-
status:
|
|
1506
|
+
status: z12.enum(["ok", "missing", "not-git"]),
|
|
1437
1507
|
/** Current branch when cheaply available (omitted e.g. on an unborn HEAD). */
|
|
1438
|
-
branch:
|
|
1508
|
+
branch: z12.string().optional(),
|
|
1439
1509
|
/** Which forge this project's remote belongs to (#698) — classified server-side from the
|
|
1440
1510
|
* remote URL alone. Gates the project group's GitHub nav item; omitted = no forge remote. */
|
|
1441
|
-
forge:
|
|
1511
|
+
forge: z12.literal("github").optional(),
|
|
1442
1512
|
/**
|
|
1443
1513
|
* The remote's web root, `https://github.com/owner/repo`. Rebuilt server-side from the parsed
|
|
1444
1514
|
* remote rather than passed through, so a remote carrying credentials cannot leak into the
|
|
@@ -1448,10 +1518,10 @@ var projectListEntrySchema = z11.object({
|
|
|
1448
1518
|
* the global Tasks page has one row per project, so it cannot use any single repo's base the
|
|
1449
1519
|
* way a project-scoped view can. With this, every reference it shows is a link.
|
|
1450
1520
|
*/
|
|
1451
|
-
repoUrl:
|
|
1521
|
+
repoUrl: z12.string().optional(),
|
|
1452
1522
|
/** Per-project cap on concurrently running tasks (spec 2026-07-22). Omitted = inherit the
|
|
1453
1523
|
* workspace `resources.maxParallel`; a number pins this project. */
|
|
1454
|
-
maxParallel:
|
|
1524
|
+
maxParallel: z12.number().optional(),
|
|
1455
1525
|
/**
|
|
1456
1526
|
* Free-form labels grouping CONNECTED repositories — a `storefront` tag on the API, the web
|
|
1457
1527
|
* app and the design system says those three are one piece of work spread over three repos.
|
|
@@ -1463,85 +1533,85 @@ var projectListEntrySchema = z11.object({
|
|
|
1463
1533
|
* server-side (trimmed, deduped case-insensitively, sorted), so a consumer may compare them
|
|
1464
1534
|
* directly.
|
|
1465
1535
|
*/
|
|
1466
|
-
tags:
|
|
1536
|
+
tags: z12.array(z12.string()).optional()
|
|
1467
1537
|
});
|
|
1468
|
-
var projectsResponseSchema =
|
|
1469
|
-
projects:
|
|
1470
|
-
bootProject:
|
|
1471
|
-
projectsDir:
|
|
1538
|
+
var projectsResponseSchema = z12.object({
|
|
1539
|
+
projects: z12.array(projectListEntrySchema),
|
|
1540
|
+
bootProject: z12.string(),
|
|
1541
|
+
projectsDir: z12.string()
|
|
1472
1542
|
});
|
|
1473
|
-
var registerProjectResponseSchema =
|
|
1543
|
+
var registerProjectResponseSchema = z12.object({
|
|
1474
1544
|
project: projectListEntrySchema,
|
|
1475
|
-
error:
|
|
1545
|
+
error: z12.string().optional()
|
|
1476
1546
|
});
|
|
1477
|
-
var removeProjectResponseSchema =
|
|
1478
|
-
removed:
|
|
1479
|
-
id:
|
|
1547
|
+
var removeProjectResponseSchema = z12.object({
|
|
1548
|
+
removed: z12.literal(true),
|
|
1549
|
+
id: z12.string()
|
|
1480
1550
|
});
|
|
1481
|
-
var updateProjectResponseSchema =
|
|
1551
|
+
var updateProjectResponseSchema = z12.object({
|
|
1482
1552
|
project: projectListEntrySchema
|
|
1483
1553
|
});
|
|
1484
1554
|
var PROJECT_TAG_MAX_LENGTH = 32;
|
|
1485
1555
|
var PROJECT_TAGS_MAX = 20;
|
|
1486
|
-
var updateProjectInputSchema =
|
|
1487
|
-
maxParallel:
|
|
1488
|
-
tags:
|
|
1556
|
+
var updateProjectInputSchema = z12.object({
|
|
1557
|
+
maxParallel: z12.number().int().min(1).max(16).nullable().optional(),
|
|
1558
|
+
tags: z12.array(z12.string().trim().min(1).max(PROJECT_TAG_MAX_LENGTH)).max(PROJECT_TAGS_MAX).nullable().optional()
|
|
1489
1559
|
}).refine(
|
|
1490
1560
|
(body) => body.maxParallel !== void 0 || body.tags !== void 0,
|
|
1491
1561
|
"specify maxParallel or tags"
|
|
1492
1562
|
);
|
|
1493
|
-
var checkoutProjectInputSchema =
|
|
1494
|
-
url:
|
|
1495
|
-
name:
|
|
1496
|
-
checkoutId:
|
|
1497
|
-
});
|
|
1498
|
-
var fsBrowseDirSchema =
|
|
1499
|
-
name:
|
|
1500
|
-
path:
|
|
1563
|
+
var checkoutProjectInputSchema = z12.object({
|
|
1564
|
+
url: z12.string().trim().min(1).max(512),
|
|
1565
|
+
name: z12.string().trim().max(128).optional(),
|
|
1566
|
+
checkoutId: z12.string().trim().max(128).optional()
|
|
1567
|
+
});
|
|
1568
|
+
var fsBrowseDirSchema = z12.object({
|
|
1569
|
+
name: z12.string(),
|
|
1570
|
+
path: z12.string(),
|
|
1501
1571
|
/** Has a `.git` entry — drives the "git" badge. A non-repo folder is still selectable. */
|
|
1502
|
-
isRepo:
|
|
1572
|
+
isRepo: z12.boolean()
|
|
1503
1573
|
});
|
|
1504
|
-
var fsBrowseResponseSchema =
|
|
1574
|
+
var fsBrowseResponseSchema = z12.object({
|
|
1505
1575
|
/** The realpath'd directory actually listed — never the spelling asked for, so the breadcrumb
|
|
1506
1576
|
* shows where the picker really is. */
|
|
1507
|
-
path:
|
|
1577
|
+
path: z12.string(),
|
|
1508
1578
|
/** `null` AT the browse root: there is no "up" out of it, and the dialog must render no parent
|
|
1509
1579
|
* row rather than one that 400s. */
|
|
1510
|
-
parent:
|
|
1511
|
-
dirs:
|
|
1580
|
+
parent: z12.string().nullable(),
|
|
1581
|
+
dirs: z12.array(fsBrowseDirSchema),
|
|
1512
1582
|
/** True when the listing was capped server-side — surfaced honestly instead of showing a
|
|
1513
1583
|
* silently short list. */
|
|
1514
|
-
truncated:
|
|
1584
|
+
truncated: z12.boolean()
|
|
1515
1585
|
});
|
|
1516
|
-
var launchKeyResponseSchema =
|
|
1517
|
-
key:
|
|
1586
|
+
var launchKeyResponseSchema = z12.object({
|
|
1587
|
+
key: z12.string()
|
|
1518
1588
|
});
|
|
1519
1589
|
|
|
1520
1590
|
// ../contract/src/workspace.ts
|
|
1521
|
-
import { z as
|
|
1522
|
-
var workspaceConfigResponseSchema =
|
|
1591
|
+
import { z as z13 } from "zod";
|
|
1592
|
+
var workspaceConfigResponseSchema = z13.object({
|
|
1523
1593
|
/** Root exposed by the Add-project directory browser — stored as written (`~` kept). */
|
|
1524
|
-
browseRoot:
|
|
1594
|
+
browseRoot: z13.string(),
|
|
1525
1595
|
/** Checkout root for GUI-cloned projects — stored as written (`~` kept). */
|
|
1526
|
-
projectsDir:
|
|
1596
|
+
projectsDir: z13.string(),
|
|
1527
1597
|
/** Stored override; `null` means inherit `CEZ_SKILLS_AUTO_UPDATE`, then true. */
|
|
1528
|
-
skillsAutoUpdate:
|
|
1529
|
-
effectiveSkillsAutoUpdate:
|
|
1530
|
-
composerDefaults:
|
|
1531
|
-
autonomous:
|
|
1532
|
-
worktree:
|
|
1598
|
+
skillsAutoUpdate: z13.boolean().nullable(),
|
|
1599
|
+
effectiveSkillsAutoUpdate: z13.boolean(),
|
|
1600
|
+
composerDefaults: z13.object({
|
|
1601
|
+
autonomous: z13.boolean().nullable(),
|
|
1602
|
+
worktree: z13.boolean().nullable(),
|
|
1533
1603
|
/** `'source-dependent'` when no `CEZ_AUTONOMOUS_DEFAULT` pins it either way. */
|
|
1534
|
-
inheritedAutonomous:
|
|
1535
|
-
inheritedWorktree:
|
|
1604
|
+
inheritedAutonomous: z13.union([z13.boolean(), z13.literal("source-dependent")]),
|
|
1605
|
+
inheritedWorktree: z13.boolean()
|
|
1536
1606
|
}),
|
|
1537
|
-
resources:
|
|
1538
|
-
maxParallel:
|
|
1539
|
-
maxMonitoringSessions:
|
|
1540
|
-
monitoringWakeIntervalMinutes:
|
|
1607
|
+
resources: z13.object({
|
|
1608
|
+
maxParallel: z13.number(),
|
|
1609
|
+
maxMonitoringSessions: z13.number(),
|
|
1610
|
+
monitoringWakeIntervalMinutes: z13.number().nullable(),
|
|
1541
1611
|
/** Resume a run a provider usage limit stopped, once the limit resets. Default `true`. */
|
|
1542
|
-
autoResumeOnUsageLimit:
|
|
1543
|
-
memoryLimitMb:
|
|
1544
|
-
worktreeRetentionDefault:
|
|
1612
|
+
autoResumeOnUsageLimit: z13.boolean(),
|
|
1613
|
+
memoryLimitMb: z13.number().nullable(),
|
|
1614
|
+
worktreeRetentionDefault: z13.number()
|
|
1545
1615
|
}),
|
|
1546
1616
|
/**
|
|
1547
1617
|
* What a repo that has set none of its own runs (spec 2026-07-29-agent-profiles).
|
|
@@ -1551,121 +1621,121 @@ var workspaceConfigResponseSchema = z12.object({
|
|
|
1551
1621
|
* from a value someone chose or the fallback collapses into "always claude". Consulted only where
|
|
1552
1622
|
* the repo's own `.ai/cezar/config.json` is silent — a repo that chose is never overruled.
|
|
1553
1623
|
*/
|
|
1554
|
-
agentDefaults:
|
|
1624
|
+
agentDefaults: z13.object({
|
|
1555
1625
|
runner: runnerSchema.optional(),
|
|
1556
|
-
models:
|
|
1557
|
-
claude:
|
|
1558
|
-
codex:
|
|
1559
|
-
opencode:
|
|
1560
|
-
pi:
|
|
1561
|
-
cursor:
|
|
1626
|
+
models: z13.object({
|
|
1627
|
+
claude: z13.string().optional(),
|
|
1628
|
+
codex: z13.string().optional(),
|
|
1629
|
+
opencode: z13.string().optional(),
|
|
1630
|
+
pi: z13.string().optional(),
|
|
1631
|
+
cursor: z13.string().optional()
|
|
1562
1632
|
}).optional()
|
|
1563
1633
|
})
|
|
1564
1634
|
});
|
|
1565
|
-
var setWorkspaceConfigInputSchema =
|
|
1566
|
-
browseRoot:
|
|
1567
|
-
projectsDir:
|
|
1568
|
-
skillsAutoUpdate:
|
|
1569
|
-
composerDefaults:
|
|
1570
|
-
autonomous:
|
|
1571
|
-
worktree:
|
|
1635
|
+
var setWorkspaceConfigInputSchema = z13.object({
|
|
1636
|
+
browseRoot: z13.string().trim().min(1).max(4096).optional(),
|
|
1637
|
+
projectsDir: z13.string().trim().min(1).max(4096).optional(),
|
|
1638
|
+
skillsAutoUpdate: z13.boolean().nullable().optional(),
|
|
1639
|
+
composerDefaults: z13.object({
|
|
1640
|
+
autonomous: z13.boolean().nullable().optional(),
|
|
1641
|
+
worktree: z13.boolean().nullable().optional()
|
|
1572
1642
|
}).optional(),
|
|
1573
1643
|
/** Machine-wide agent defaults. `null` on a key CLEARS it back to "no opinion", which a bare
|
|
1574
1644
|
* absent key cannot say in a partial patch. */
|
|
1575
|
-
agentDefaults:
|
|
1645
|
+
agentDefaults: z13.object({
|
|
1576
1646
|
runner: runnerSchema.nullable().optional(),
|
|
1577
|
-
models:
|
|
1578
|
-
claude:
|
|
1579
|
-
codex:
|
|
1580
|
-
opencode:
|
|
1581
|
-
pi:
|
|
1582
|
-
cursor:
|
|
1647
|
+
models: z13.object({
|
|
1648
|
+
claude: z13.string().trim().min(1).max(200).nullable().optional(),
|
|
1649
|
+
codex: z13.string().trim().min(1).max(200).nullable().optional(),
|
|
1650
|
+
opencode: z13.string().trim().min(1).max(200).nullable().optional(),
|
|
1651
|
+
pi: z13.string().trim().min(1).max(200).nullable().optional(),
|
|
1652
|
+
cursor: z13.string().trim().min(1).max(200).nullable().optional()
|
|
1583
1653
|
}).optional()
|
|
1584
1654
|
}).optional(),
|
|
1585
|
-
resources:
|
|
1586
|
-
maxParallel:
|
|
1587
|
-
maxMonitoringSessions:
|
|
1588
|
-
monitoringWakeIntervalMinutes:
|
|
1589
|
-
autoResumeOnUsageLimit:
|
|
1590
|
-
memoryLimitMb:
|
|
1591
|
-
worktreeRetentionDefault:
|
|
1655
|
+
resources: z13.object({
|
|
1656
|
+
maxParallel: z13.number().int().min(1).max(16).optional(),
|
|
1657
|
+
maxMonitoringSessions: z13.number().int().min(0).max(16).optional(),
|
|
1658
|
+
monitoringWakeIntervalMinutes: z13.number().int().min(1).max(60).nullable().optional(),
|
|
1659
|
+
autoResumeOnUsageLimit: z13.boolean().optional(),
|
|
1660
|
+
memoryLimitMb: z13.number().int().min(0).max(1048576).nullable().optional(),
|
|
1661
|
+
worktreeRetentionDefault: z13.number().int().min(0).max(1e3).optional()
|
|
1592
1662
|
}).optional()
|
|
1593
1663
|
});
|
|
1594
|
-
var appearanceSchema =
|
|
1595
|
-
accent:
|
|
1596
|
-
density:
|
|
1597
|
-
width:
|
|
1664
|
+
var appearanceSchema = z13.object({
|
|
1665
|
+
accent: z13.enum(["cezarion", "lime", "violet"]).optional(),
|
|
1666
|
+
density: z13.enum(["comfortable", "compact", "ultra"]).optional(),
|
|
1667
|
+
width: z13.enum(["narrow", "wide"]).optional()
|
|
1598
1668
|
});
|
|
1599
|
-
var taskTableUiStateSchema =
|
|
1669
|
+
var taskTableUiStateSchema = z13.looseObject({
|
|
1600
1670
|
/** Explicit user choices only. Missing ids keep the registry-owned default. */
|
|
1601
|
-
expandedColumns:
|
|
1671
|
+
expandedColumns: z13.record(z13.string(), z13.boolean()).optional()
|
|
1602
1672
|
});
|
|
1603
|
-
var uiStateSchema =
|
|
1673
|
+
var uiStateSchema = z13.looseObject({
|
|
1604
1674
|
/** What the last started run used. `null` is a VALUE, not an absence: it records a run that
|
|
1605
1675
|
* chose neither a skill nor a workflow (the plain built-in `quick-task`), which the composer
|
|
1606
1676
|
* can now express since the source picker grew an empty state. Absent still means "no
|
|
1607
1677
|
* run has been recorded here" — a cockpit reading either one selects nothing. */
|
|
1608
|
-
lastTask:
|
|
1678
|
+
lastTask: z13.object({ source: z13.enum(["workflow", "skill"]), ref: z13.string() }).nullable().optional(),
|
|
1609
1679
|
/** Most-recently-run sources, newest first (deduped, capped). Feeds the composer picker's
|
|
1610
1680
|
* recency sort. */
|
|
1611
|
-
recentSources:
|
|
1681
|
+
recentSources: z13.array(z13.object({ source: z13.enum(["workflow", "skill"]), ref: z13.string() })).optional(),
|
|
1612
1682
|
/** The last worktree choice for a single-skill run. Absent → the default (isolated worktree). */
|
|
1613
|
-
lastWorktree:
|
|
1683
|
+
lastWorktree: z13.boolean().optional(),
|
|
1614
1684
|
/** The last autonomous choice — remembered like `lastWorktree`. Absent → off. */
|
|
1615
|
-
lastAutonomous:
|
|
1685
|
+
lastAutonomous: z13.boolean().optional(),
|
|
1616
1686
|
/** Whether new runs should ask agents to append follow-up work. Absent → on. */
|
|
1617
|
-
lastGenerateFollowups:
|
|
1687
|
+
lastGenerateFollowups: z13.boolean().optional(),
|
|
1618
1688
|
/** Skill selection frequency (#408): name → times chosen, across BOTH composers. */
|
|
1619
|
-
skillUsage:
|
|
1620
|
-
runsView:
|
|
1689
|
+
skillUsage: z13.record(z13.string(), z13.number()).optional(),
|
|
1690
|
+
runsView: z13.enum(["list", "table"]).optional(),
|
|
1621
1691
|
/** The GitHub tab's last-selected sub-tab (#417). Absent → issues. */
|
|
1622
|
-
githubView:
|
|
1692
|
+
githubView: z13.enum(["issues", "prs"]).optional(),
|
|
1623
1693
|
/** Settings → Appearance. The theme itself stays in localStorage (`cez-theme`) — it must
|
|
1624
1694
|
* pre-paint, and it is per-browser by design. */
|
|
1625
1695
|
appearance: appearanceSchema.optional(),
|
|
1626
1696
|
/** Follow-up prompt templates (#413). Absent → the built-in defaults; present (even `[]`) is
|
|
1627
1697
|
* the user's own edited list. `skills` are the skill names the template auto-applies for. */
|
|
1628
|
-
promptTemplates:
|
|
1629
|
-
|
|
1630
|
-
id:
|
|
1631
|
-
label:
|
|
1632
|
-
text:
|
|
1633
|
-
skills:
|
|
1698
|
+
promptTemplates: z13.array(
|
|
1699
|
+
z13.object({
|
|
1700
|
+
id: z13.string(),
|
|
1701
|
+
label: z13.string(),
|
|
1702
|
+
text: z13.string(),
|
|
1703
|
+
skills: z13.array(z13.string()).optional()
|
|
1634
1704
|
})
|
|
1635
1705
|
).optional(),
|
|
1636
1706
|
/** The open-mercato/skills promo banner (#391), dismissed for good. Legacy — the banner is
|
|
1637
1707
|
* gone, replaced by `WorkspaceUiState.importedSkills`; retained so old files round-trip. */
|
|
1638
|
-
dismissedSkillsBanner:
|
|
1708
|
+
dismissedSkillsBanner: z13.boolean().optional()
|
|
1639
1709
|
});
|
|
1640
|
-
var workspaceLastLocationSchema =
|
|
1641
|
-
projectId:
|
|
1642
|
-
pathname:
|
|
1643
|
-
search:
|
|
1644
|
-
hash:
|
|
1710
|
+
var workspaceLastLocationSchema = z13.strictObject({
|
|
1711
|
+
projectId: z13.string().min(1).max(64),
|
|
1712
|
+
pathname: z13.string().min(1).max(2048).startsWith("/p/"),
|
|
1713
|
+
search: z13.string().max(4096).startsWith("?").optional(),
|
|
1714
|
+
hash: z13.string().max(2048).startsWith("#").optional()
|
|
1645
1715
|
});
|
|
1646
|
-
var workspaceUiStateSchema =
|
|
1716
|
+
var workspaceUiStateSchema = z13.looseObject({
|
|
1647
1717
|
/** LEGACY — the sidebar's per-project collapse map (step 3.3). Still accepted and still
|
|
1648
1718
|
* round-tripped so an older cockpit sharing this home keeps working, but the current cockpit
|
|
1649
1719
|
* neither reads nor writes it: which groups are shut describes the WINDOW, not the workspace,
|
|
1650
1720
|
* so it lives in that browser's localStorage (`packages/web/src/lib/sidebar-collapse.ts`).
|
|
1651
1721
|
* One shared answer meant a phone collapsing a group collapsed it on the desktop too. */
|
|
1652
|
-
sidebar:
|
|
1722
|
+
sidebar: z13.looseObject({ collapsed: z13.record(z13.string(), z13.boolean()).optional() }).optional(),
|
|
1653
1723
|
/** Dismissed runtime-auth incident IDs, keyed by provider. An ID is only dismissed until the
|
|
1654
1724
|
* provider reports a different incident, so this stays workspace-global with the browser
|
|
1655
1725
|
* rather than one project checkout. */
|
|
1656
|
-
dismissedProviderAuthFailures:
|
|
1657
|
-
claude:
|
|
1658
|
-
codex:
|
|
1659
|
-
opencode:
|
|
1660
|
-
pi:
|
|
1661
|
-
cursor:
|
|
1726
|
+
dismissedProviderAuthFailures: z13.object({
|
|
1727
|
+
claude: z13.string().optional(),
|
|
1728
|
+
codex: z13.string().optional(),
|
|
1729
|
+
opencode: z13.string().optional(),
|
|
1730
|
+
pi: z13.string().optional(),
|
|
1731
|
+
cursor: z13.string().optional()
|
|
1662
1732
|
}).optional(),
|
|
1663
1733
|
/** Settings → Appearance, GLOBAL since step 3.5: accent + density describe the person at the
|
|
1664
1734
|
* keyboard, not a repo. */
|
|
1665
1735
|
appearance: appearanceSchema.optional(),
|
|
1666
1736
|
/** Settings → Notifications, GLOBAL since step 3.5 — one answer for the whole workspace, since
|
|
1667
1737
|
* the delivering browser is one browser whichever project you are looking at. */
|
|
1668
|
-
notifications:
|
|
1738
|
+
notifications: z13.looseObject({ enabled: z13.boolean().optional() }).optional(),
|
|
1669
1739
|
/** Desktop Tasks-table density, shared across every project in this workspace. */
|
|
1670
1740
|
taskTable: taskTableUiStateSchema.optional(),
|
|
1671
1741
|
/** LEGACY, exactly like `sidebar` above — the last settled project-scoped page, restored when
|
|
@@ -1676,27 +1746,27 @@ var workspaceUiStateSchema = z12.looseObject({
|
|
|
1676
1746
|
/** The user's curated selection of default (vendor) skills. Tri-state: ABSENT means "not
|
|
1677
1747
|
* curated", so every default skill shows; a PRESENT array (even `[]`) means only those names
|
|
1678
1748
|
* show from that repo. */
|
|
1679
|
-
importedSkills:
|
|
1749
|
+
importedSkills: z13.array(z13.string()).optional()
|
|
1680
1750
|
});
|
|
1681
1751
|
var WORKSPACE_UI_STATE_MAX_KEYS = 200;
|
|
1682
1752
|
var TASK_TABLE_MAX_COLUMNS = 50;
|
|
1683
|
-
var setWorkspaceUiStateInputSchema =
|
|
1753
|
+
var setWorkspaceUiStateInputSchema = z13.looseObject({
|
|
1684
1754
|
...workspaceUiStateSchema.shape,
|
|
1685
|
-
sidebar:
|
|
1686
|
-
collapsed:
|
|
1755
|
+
sidebar: z13.looseObject({
|
|
1756
|
+
collapsed: z13.record(z13.string().min(1).max(64), z13.boolean()).refine((map) => Object.keys(map).length <= WORKSPACE_UI_STATE_MAX_KEYS, {
|
|
1687
1757
|
message: `sidebar.collapsed must have at most ${WORKSPACE_UI_STATE_MAX_KEYS} entries`
|
|
1688
1758
|
}).optional()
|
|
1689
1759
|
}).optional(),
|
|
1690
|
-
dismissedProviderAuthFailures:
|
|
1691
|
-
claude:
|
|
1692
|
-
codex:
|
|
1693
|
-
opencode:
|
|
1694
|
-
pi:
|
|
1695
|
-
cursor:
|
|
1760
|
+
dismissedProviderAuthFailures: z13.strictObject({
|
|
1761
|
+
claude: z13.string().min(1).max(128).optional(),
|
|
1762
|
+
codex: z13.string().min(1).max(128).optional(),
|
|
1763
|
+
opencode: z13.string().min(1).max(128).optional(),
|
|
1764
|
+
pi: z13.string().min(1).max(128).optional(),
|
|
1765
|
+
cursor: z13.string().min(1).max(128).optional()
|
|
1696
1766
|
}).optional(),
|
|
1697
|
-
importedSkills:
|
|
1767
|
+
importedSkills: z13.array(z13.string().min(1).max(200)).max(WORKSPACE_UI_STATE_MAX_KEYS).optional(),
|
|
1698
1768
|
taskTable: taskTableUiStateSchema.extend({
|
|
1699
|
-
expandedColumns:
|
|
1769
|
+
expandedColumns: z13.record(z13.string().min(1).max(64), z13.boolean()).refine((map) => Object.keys(map).length <= TASK_TABLE_MAX_COLUMNS, {
|
|
1700
1770
|
message: `taskTable.expandedColumns must have at most ${TASK_TABLE_MAX_COLUMNS} entries`
|
|
1701
1771
|
}).optional()
|
|
1702
1772
|
}).optional()
|
|
@@ -1708,56 +1778,56 @@ var setWorkspaceUiStateInputSchema = z12.looseObject({
|
|
|
1708
1778
|
});
|
|
1709
1779
|
}
|
|
1710
1780
|
});
|
|
1711
|
-
var runnerModelsSchema =
|
|
1712
|
-
claude:
|
|
1713
|
-
codex:
|
|
1714
|
-
opencode:
|
|
1715
|
-
pi:
|
|
1716
|
-
cursor:
|
|
1781
|
+
var runnerModelsSchema = z13.object({
|
|
1782
|
+
claude: z13.string().optional(),
|
|
1783
|
+
codex: z13.string().optional(),
|
|
1784
|
+
opencode: z13.string().optional(),
|
|
1785
|
+
pi: z13.string().optional(),
|
|
1786
|
+
cursor: z13.string().optional()
|
|
1717
1787
|
});
|
|
1718
|
-
var configResponseSchema =
|
|
1719
|
-
baseBranch:
|
|
1788
|
+
var configResponseSchema = z13.object({
|
|
1789
|
+
baseBranch: z13.string().nullable(),
|
|
1720
1790
|
defaultRunner: runnerSchema,
|
|
1721
|
-
systemPrompt:
|
|
1791
|
+
systemPrompt: z13.string().nullable(),
|
|
1722
1792
|
defaultModels: runnerModelsSchema,
|
|
1723
1793
|
/** True when native coding-agent settings are authoritative and model picks are read-only. */
|
|
1724
|
-
modelsLocked:
|
|
1794
|
+
modelsLocked: z13.boolean(),
|
|
1725
1795
|
/** How many tasks run at once (1–16). */
|
|
1726
|
-
maxParallel:
|
|
1796
|
+
maxParallel: z13.number(),
|
|
1727
1797
|
/** Per-task memory ceiling in MiB (whole process tree); null = no limit. */
|
|
1728
|
-
memoryLimitMb:
|
|
1798
|
+
memoryLimitMb: z13.number().nullable(),
|
|
1729
1799
|
/** Keep the last N finished worktrees on disk (#483); 0 = unlimited. Older ones are reclaimed
|
|
1730
1800
|
* (directory only — branch kept, so work is recoverable). */
|
|
1731
|
-
worktreeRetention:
|
|
1801
|
+
worktreeRetention: z13.number(),
|
|
1732
1802
|
/** Live title updates: null = no config key, the `CEZ_TITLE_UPDATES` env default (ON) decides. */
|
|
1733
|
-
liveTitleUpdates:
|
|
1803
|
+
liveTitleUpdates: z13.boolean().nullable(),
|
|
1734
1804
|
/** Optional review gate (#489): null = no config key, the `CEZ_REVIEW_GATE` env default (OFF)
|
|
1735
1805
|
* decides. */
|
|
1736
|
-
reviewGate:
|
|
1806
|
+
reviewGate: z13.boolean().nullable()
|
|
1737
1807
|
});
|
|
1738
1808
|
var setConfigResponseSchema = configResponseSchema;
|
|
1739
|
-
var setConfigInputSchema =
|
|
1740
|
-
baseBranch:
|
|
1809
|
+
var setConfigInputSchema = z13.object({
|
|
1810
|
+
baseBranch: z13.string().trim().min(1).max(200).nullable().optional(),
|
|
1741
1811
|
defaultRunner: runnerSchema.optional(),
|
|
1742
|
-
systemPrompt:
|
|
1743
|
-
defaultModels:
|
|
1744
|
-
claude:
|
|
1745
|
-
codex:
|
|
1746
|
-
opencode:
|
|
1747
|
-
pi:
|
|
1748
|
-
cursor:
|
|
1812
|
+
systemPrompt: z13.string().trim().max(2e4).nullable().optional(),
|
|
1813
|
+
defaultModels: z13.object({
|
|
1814
|
+
claude: z13.string().trim().max(200).nullable().optional(),
|
|
1815
|
+
codex: z13.string().trim().max(200).nullable().optional(),
|
|
1816
|
+
opencode: z13.string().trim().max(200).nullable().optional(),
|
|
1817
|
+
pi: z13.string().trim().max(200).nullable().optional(),
|
|
1818
|
+
cursor: z13.string().trim().max(200).nullable().optional()
|
|
1749
1819
|
}).optional(),
|
|
1750
|
-
maxParallel:
|
|
1820
|
+
maxParallel: z13.number().int().min(1).max(16).optional(),
|
|
1751
1821
|
/** null or 0 clears the ceiling back to "no limit". */
|
|
1752
|
-
memoryLimitMb:
|
|
1822
|
+
memoryLimitMb: z13.number().int().min(0).max(1048576).nullable().optional(),
|
|
1753
1823
|
/** Keep last N finished worktrees (#483); 0 = unlimited, null clears back to the default (10). */
|
|
1754
|
-
worktreeRetention:
|
|
1824
|
+
worktreeRetention: z13.number().int().min(0).max(1e3).nullable().optional(),
|
|
1755
1825
|
/** null clears the key back to the env-default behavior. */
|
|
1756
|
-
liveTitleUpdates:
|
|
1826
|
+
liveTitleUpdates: z13.boolean().nullable().optional(),
|
|
1757
1827
|
/** null clears the key back to the env-default behavior (OFF). */
|
|
1758
|
-
reviewGate:
|
|
1828
|
+
reviewGate: z13.boolean().nullable().optional()
|
|
1759
1829
|
});
|
|
1760
|
-
var skillsUpdateStatusSchema =
|
|
1830
|
+
var skillsUpdateStatusSchema = z13.enum([
|
|
1761
1831
|
"idle",
|
|
1762
1832
|
"checking",
|
|
1763
1833
|
"available",
|
|
@@ -1766,225 +1836,225 @@ var skillsUpdateStatusSchema = z12.enum([
|
|
|
1766
1836
|
"unavailable",
|
|
1767
1837
|
"error"
|
|
1768
1838
|
]);
|
|
1769
|
-
var skillsUpdateScopeStateSchema =
|
|
1770
|
-
scope:
|
|
1839
|
+
var skillsUpdateScopeStateSchema = z13.object({
|
|
1840
|
+
scope: z13.enum(["project", "global"]),
|
|
1771
1841
|
status: skillsUpdateStatusSchema,
|
|
1772
|
-
available:
|
|
1773
|
-
skills:
|
|
1774
|
-
checkedAt:
|
|
1775
|
-
updatedAt:
|
|
1776
|
-
reason:
|
|
1842
|
+
available: z13.boolean(),
|
|
1843
|
+
skills: z13.array(z13.string()),
|
|
1844
|
+
checkedAt: z13.string().nullable(),
|
|
1845
|
+
updatedAt: z13.string().nullable(),
|
|
1846
|
+
reason: z13.string().optional()
|
|
1777
1847
|
});
|
|
1778
|
-
var skillsUpdateStateSchema =
|
|
1848
|
+
var skillsUpdateStateSchema = z13.object({
|
|
1779
1849
|
status: skillsUpdateStatusSchema,
|
|
1780
|
-
available:
|
|
1781
|
-
autoUpdateEnabled:
|
|
1782
|
-
inherited:
|
|
1783
|
-
checkedAt:
|
|
1784
|
-
updatedAt:
|
|
1785
|
-
scopes:
|
|
1786
|
-
needsUpgradeNotes:
|
|
1850
|
+
available: z13.boolean(),
|
|
1851
|
+
autoUpdateEnabled: z13.boolean(),
|
|
1852
|
+
inherited: z13.boolean(),
|
|
1853
|
+
checkedAt: z13.string().nullable(),
|
|
1854
|
+
updatedAt: z13.string().nullable(),
|
|
1855
|
+
scopes: z13.array(skillsUpdateScopeStateSchema),
|
|
1856
|
+
needsUpgradeNotes: z13.boolean()
|
|
1787
1857
|
});
|
|
1788
1858
|
var providerIdSchema = runnerSchema;
|
|
1789
|
-
var providerConnectionStateSchema =
|
|
1859
|
+
var providerConnectionStateSchema = z13.enum([
|
|
1790
1860
|
"connected",
|
|
1791
1861
|
"disconnected",
|
|
1792
1862
|
"not-installed",
|
|
1793
1863
|
"unknown"
|
|
1794
1864
|
]);
|
|
1795
|
-
var providerStatusSchema =
|
|
1865
|
+
var providerStatusSchema = z13.object({
|
|
1796
1866
|
provider: providerIdSchema,
|
|
1797
1867
|
status: providerConnectionStateSchema,
|
|
1798
|
-
enabled:
|
|
1799
|
-
hint:
|
|
1800
|
-
authFailureId:
|
|
1868
|
+
enabled: z13.boolean().optional(),
|
|
1869
|
+
hint: z13.string().optional(),
|
|
1870
|
+
authFailureId: z13.string().optional(),
|
|
1801
1871
|
/** Which agent account this row describes (spec 2026-07-29-agent-profiles). ABSENT on
|
|
1802
1872
|
* `GET /api/v1/providers/status`, which deliberately keeps answering exactly one row per
|
|
1803
1873
|
* provider — the discovered default — so an older client sees no change at all. Per-account
|
|
1804
1874
|
* rows are carried by `GET /api/v1/workspace/agent-profiles` instead. */
|
|
1805
|
-
profileId:
|
|
1875
|
+
profileId: z13.string().optional()
|
|
1806
1876
|
});
|
|
1807
|
-
var providerStatusResponseSchema =
|
|
1808
|
-
providers:
|
|
1877
|
+
var providerStatusResponseSchema = z13.object({
|
|
1878
|
+
providers: z13.array(providerStatusSchema)
|
|
1809
1879
|
});
|
|
1810
|
-
var providerConnectResponseSchema =
|
|
1811
|
-
|
|
1812
|
-
|
|
1880
|
+
var providerConnectResponseSchema = z13.discriminatedUnion("opened", [
|
|
1881
|
+
z13.object({ opened: z13.literal(true), command: z13.string() }),
|
|
1882
|
+
z13.object({ opened: z13.literal(false), connected: z13.literal(true), command: z13.string() })
|
|
1813
1883
|
]);
|
|
1814
|
-
var modelDiscoveryRunnerSchema =
|
|
1884
|
+
var modelDiscoveryRunnerSchema = z13.enum(["claude", "codex", "opencode", "pi", "cursor"]);
|
|
1815
1885
|
var MODEL_DISCOVERY_RUNNERS = modelDiscoveryRunnerSchema.options;
|
|
1816
1886
|
function runnerDiscoversModels(runner) {
|
|
1817
1887
|
return MODEL_DISCOVERY_RUNNERS.includes(runner);
|
|
1818
1888
|
}
|
|
1819
|
-
var runnerModelOptionSchema =
|
|
1820
|
-
id:
|
|
1821
|
-
label:
|
|
1822
|
-
description:
|
|
1823
|
-
effortLevels:
|
|
1889
|
+
var runnerModelOptionSchema = z13.object({
|
|
1890
|
+
id: z13.string(),
|
|
1891
|
+
label: z13.string(),
|
|
1892
|
+
description: z13.string(),
|
|
1893
|
+
effortLevels: z13.array(effortLevelSchema).optional()
|
|
1824
1894
|
});
|
|
1825
|
-
var runnerModelCatalogResponseSchema =
|
|
1895
|
+
var runnerModelCatalogResponseSchema = z13.object({
|
|
1826
1896
|
runner: runnerSchema,
|
|
1827
|
-
models:
|
|
1828
|
-
source:
|
|
1829
|
-
stale:
|
|
1830
|
-
reason:
|
|
1897
|
+
models: z13.array(runnerModelOptionSchema),
|
|
1898
|
+
source: z13.enum(["live", "cache", "unavailable"]),
|
|
1899
|
+
stale: z13.boolean(),
|
|
1900
|
+
reason: z13.string().optional()
|
|
1831
1901
|
});
|
|
1832
|
-
var openTargetSchema =
|
|
1833
|
-
id:
|
|
1834
|
-
label:
|
|
1902
|
+
var openTargetSchema = z13.object({
|
|
1903
|
+
id: z13.string(),
|
|
1904
|
+
label: z13.string(),
|
|
1835
1905
|
/** A stable icon key (#361) the UI maps to a concrete icon. Optional: an older server omitting
|
|
1836
1906
|
* it just renders the generic fallback icon. */
|
|
1837
|
-
icon:
|
|
1907
|
+
icon: z13.string().optional()
|
|
1838
1908
|
});
|
|
1839
|
-
var openTargetsResponseSchema =
|
|
1840
|
-
targets:
|
|
1909
|
+
var openTargetsResponseSchema = z13.object({
|
|
1910
|
+
targets: z13.array(openTargetSchema)
|
|
1841
1911
|
});
|
|
1842
|
-
var openProjectInSchema =
|
|
1912
|
+
var openProjectInSchema = z13.object({
|
|
1843
1913
|
// A short bound (#429): matched against a downstream allowlist, so an app id is never long.
|
|
1844
|
-
target:
|
|
1914
|
+
target: z13.string().trim().min(1, "target required").max(200)
|
|
1845
1915
|
});
|
|
1846
|
-
var openProjectInResponseSchema =
|
|
1847
|
-
opened:
|
|
1848
|
-
path:
|
|
1916
|
+
var openProjectInResponseSchema = z13.object({
|
|
1917
|
+
opened: z13.literal(true),
|
|
1918
|
+
path: z13.string()
|
|
1849
1919
|
});
|
|
1850
1920
|
|
|
1851
1921
|
// ../contract/src/skills.ts
|
|
1852
|
-
import { z as
|
|
1853
|
-
var skillSchema =
|
|
1854
|
-
name:
|
|
1855
|
-
description:
|
|
1922
|
+
import { z as z14 } from "zod";
|
|
1923
|
+
var skillSchema = z14.object({
|
|
1924
|
+
name: z14.string(),
|
|
1925
|
+
description: z14.string().optional(),
|
|
1856
1926
|
/** Advisory hint for untouched composer run-mode choices. */
|
|
1857
|
-
interactive:
|
|
1858
|
-
body:
|
|
1859
|
-
path:
|
|
1860
|
-
source:
|
|
1927
|
+
interactive: z14.literal(true).optional(),
|
|
1928
|
+
body: z14.string(),
|
|
1929
|
+
path: z14.string(),
|
|
1930
|
+
source: z14.enum(["ai", "cezar", "agents", "global", "team"]),
|
|
1861
1931
|
/** Team skills only: where the definition lives in its skills repo. */
|
|
1862
|
-
team:
|
|
1863
|
-
repo:
|
|
1864
|
-
ref:
|
|
1865
|
-
path:
|
|
1932
|
+
team: z14.object({
|
|
1933
|
+
repo: z14.string(),
|
|
1934
|
+
ref: z14.string(),
|
|
1935
|
+
path: z14.string(),
|
|
1866
1936
|
/** True for the `SKILL.md` convention — a whole directory (references/…). */
|
|
1867
|
-
dir:
|
|
1937
|
+
dir: z14.boolean(),
|
|
1868
1938
|
/**
|
|
1869
1939
|
* The exact commit `ref` resolved to when the skill was read (#428).
|
|
1870
1940
|
*
|
|
1871
1941
|
* The hand-written DTO omitted this field entirely — it was NARROWER than the route,
|
|
1872
1942
|
* which has served it since #428.
|
|
1873
1943
|
*/
|
|
1874
|
-
commit:
|
|
1944
|
+
commit: z14.string().optional()
|
|
1875
1945
|
}).optional()
|
|
1876
1946
|
});
|
|
1877
|
-
var importableSkillSchema =
|
|
1878
|
-
name:
|
|
1879
|
-
description:
|
|
1947
|
+
var importableSkillSchema = z14.object({
|
|
1948
|
+
name: z14.string(),
|
|
1949
|
+
description: z14.string().optional()
|
|
1880
1950
|
});
|
|
1881
|
-
var todoItemSchema =
|
|
1882
|
-
id:
|
|
1883
|
-
ts:
|
|
1884
|
-
taskId:
|
|
1885
|
-
summary:
|
|
1886
|
-
action:
|
|
1887
|
-
prUrl:
|
|
1888
|
-
suggestedSkill:
|
|
1889
|
-
suggestedArgs:
|
|
1890
|
-
suggestedPrompt:
|
|
1951
|
+
var todoItemSchema = z14.object({
|
|
1952
|
+
id: z14.string(),
|
|
1953
|
+
ts: z14.string().optional(),
|
|
1954
|
+
taskId: z14.string().optional(),
|
|
1955
|
+
summary: z14.string().min(1),
|
|
1956
|
+
action: z14.string().optional(),
|
|
1957
|
+
prUrl: z14.string().optional(),
|
|
1958
|
+
suggestedSkill: z14.string().optional(),
|
|
1959
|
+
suggestedArgs: z14.string().optional(),
|
|
1960
|
+
suggestedPrompt: z14.string().optional(),
|
|
1891
1961
|
/** Explicit intent; missing infers from suggestedSkill/suggestedPrompt for old files. */
|
|
1892
|
-
runnable:
|
|
1962
|
+
runnable: z14.boolean().optional(),
|
|
1893
1963
|
/** Set once a task was started from this entry — it then leaves the inbox and stays as
|
|
1894
1964
|
* the audit trail. A later launch never overwrites the first. */
|
|
1895
|
-
startedTaskId:
|
|
1965
|
+
startedTaskId: z14.string().optional()
|
|
1896
1966
|
});
|
|
1897
|
-
var removeTodoResponseSchema =
|
|
1898
|
-
removed:
|
|
1967
|
+
var removeTodoResponseSchema = z14.object({
|
|
1968
|
+
removed: z14.literal(true)
|
|
1899
1969
|
});
|
|
1900
|
-
var startTodoResponseSchema =
|
|
1970
|
+
var startTodoResponseSchema = z14.object({
|
|
1901
1971
|
run: runRecordSchema
|
|
1902
1972
|
});
|
|
1903
1973
|
|
|
1904
1974
|
// ../contract/src/agent-config.ts
|
|
1905
|
-
import { z as
|
|
1906
|
-
var agentConfigFormatSchema =
|
|
1907
|
-
var agentConfigScopeSchema =
|
|
1908
|
-
var agentConfigKindSchema =
|
|
1909
|
-
var agentConfigTrackedSchema =
|
|
1910
|
-
var agentConfigFileSchema =
|
|
1975
|
+
import { z as z15 } from "zod";
|
|
1976
|
+
var agentConfigFormatSchema = z15.enum(["json", "jsonc", "toml", "markdown"]);
|
|
1977
|
+
var agentConfigScopeSchema = z15.enum(["user", "project", "local"]);
|
|
1978
|
+
var agentConfigKindSchema = z15.enum(["settings", "memory", "mcp"]);
|
|
1979
|
+
var agentConfigTrackedSchema = z15.enum(["tracked", "gitignored", "outside-repo"]);
|
|
1980
|
+
var agentConfigFileSchema = z15.object({
|
|
1911
1981
|
/** Stable, opaque, URL-safe — the ONLY thing a client may name (traversal-proof). */
|
|
1912
|
-
id:
|
|
1982
|
+
id: z15.string(),
|
|
1913
1983
|
/** Every runner that reads this file: `<repo>/AGENTS.md` is one file, two readers. */
|
|
1914
|
-
runners:
|
|
1984
|
+
runners: z15.array(runnerSchema),
|
|
1915
1985
|
kind: agentConfigKindSchema,
|
|
1916
1986
|
scope: agentConfigScopeSchema,
|
|
1917
|
-
label:
|
|
1918
|
-
path:
|
|
1987
|
+
label: z15.string(),
|
|
1988
|
+
path: z15.string(),
|
|
1919
1989
|
format: agentConfigFormatSchema,
|
|
1920
1990
|
tracked: agentConfigTrackedSchema,
|
|
1921
|
-
seeded:
|
|
1922
|
-
holdsMcp:
|
|
1991
|
+
seeded: z15.boolean(),
|
|
1992
|
+
holdsMcp: z15.boolean(),
|
|
1923
1993
|
/** VERBATIM from the vendor docs. Never computed, never generic. */
|
|
1924
|
-
precedence:
|
|
1994
|
+
precedence: z15.string(),
|
|
1925
1995
|
/** Documented mid-run reload behaviour, or absent when the vendor is silent. */
|
|
1926
|
-
hotReload:
|
|
1927
|
-
docsUrl:
|
|
1928
|
-
exists:
|
|
1929
|
-
size:
|
|
1996
|
+
hotReload: z15.string().optional(),
|
|
1997
|
+
docsUrl: z15.string(),
|
|
1998
|
+
exists: z15.boolean(),
|
|
1999
|
+
size: z15.number(),
|
|
1930
2000
|
/** sha256 of the bytes, or null when absent. */
|
|
1931
|
-
version:
|
|
2001
|
+
version: z15.string().nullable(),
|
|
1932
2002
|
/** False in hosted mode (whole feature) — the client renders read-only up front. */
|
|
1933
|
-
writable:
|
|
1934
|
-
readOnlyReason:
|
|
2003
|
+
writable: z15.boolean(),
|
|
2004
|
+
readOnlyReason: z15.string().optional()
|
|
1935
2005
|
});
|
|
1936
|
-
var userMcpListingSchema =
|
|
1937
|
-
path:
|
|
1938
|
-
servers:
|
|
1939
|
-
readable:
|
|
2006
|
+
var userMcpListingSchema = z15.object({
|
|
2007
|
+
path: z15.string(),
|
|
2008
|
+
servers: z15.array(z15.string()),
|
|
2009
|
+
readable: z15.boolean()
|
|
1940
2010
|
});
|
|
1941
|
-
var agentConfigListingSchema =
|
|
1942
|
-
editable:
|
|
1943
|
-
files:
|
|
2011
|
+
var agentConfigListingSchema = z15.object({
|
|
2012
|
+
editable: z15.boolean(),
|
|
2013
|
+
files: z15.array(agentConfigFileSchema),
|
|
1944
2014
|
/** null in hosted mode (host-state disclosure guard). */
|
|
1945
2015
|
userMcp: userMcpListingSchema.nullable()
|
|
1946
2016
|
});
|
|
1947
|
-
var agentConfigFileContentSchema =
|
|
1948
|
-
id:
|
|
1949
|
-
path:
|
|
1950
|
-
exists:
|
|
1951
|
-
content:
|
|
2017
|
+
var agentConfigFileContentSchema = z15.object({
|
|
2018
|
+
id: z15.string(),
|
|
2019
|
+
path: z15.string(),
|
|
2020
|
+
exists: z15.boolean(),
|
|
2021
|
+
content: z15.string(),
|
|
1952
2022
|
/** sha256 of the bytes, or null when the file does not exist yet. */
|
|
1953
|
-
version:
|
|
2023
|
+
version: z15.string().nullable()
|
|
1954
2024
|
});
|
|
1955
|
-
var setAgentConfigInputSchema =
|
|
1956
|
-
content:
|
|
1957
|
-
version:
|
|
2025
|
+
var setAgentConfigInputSchema = z15.object({
|
|
2026
|
+
content: z15.string().max(2e6),
|
|
2027
|
+
version: z15.string().nullable()
|
|
1958
2028
|
});
|
|
1959
2029
|
|
|
1960
2030
|
// ../contract/src/agent-profiles.ts
|
|
1961
|
-
import { z as
|
|
2031
|
+
import { z as z16 } from "zod";
|
|
1962
2032
|
var DEFAULT_AGENT_ACCOUNT_ID = "default";
|
|
1963
|
-
var agentAccountFileSchema =
|
|
1964
|
-
id:
|
|
2033
|
+
var agentAccountFileSchema = z16.object({
|
|
2034
|
+
id: z16.string(),
|
|
1965
2035
|
/** e.g. `settings.json` — the file's own name, since the folder is shown once on the account. */
|
|
1966
|
-
label:
|
|
2036
|
+
label: z16.string(),
|
|
1967
2037
|
/** Absolute, resolved inside this account's config folder. */
|
|
1968
|
-
path:
|
|
1969
|
-
exists:
|
|
2038
|
+
path: z16.string(),
|
|
2039
|
+
exists: z16.boolean()
|
|
1970
2040
|
});
|
|
1971
|
-
var agentProfileSchema =
|
|
2041
|
+
var agentProfileSchema = z16.object({
|
|
1972
2042
|
/** `default` for the discovered profile, else the stored slug. */
|
|
1973
|
-
id:
|
|
2043
|
+
id: z16.string(),
|
|
1974
2044
|
provider: providerIdSchema,
|
|
1975
|
-
label:
|
|
2045
|
+
label: z16.string(),
|
|
1976
2046
|
/** As the user wrote it — a literal `~` is preserved, matching `browseRoot`/`projectsDir`. */
|
|
1977
|
-
configDir:
|
|
2047
|
+
configDir: z16.string(),
|
|
1978
2048
|
/** Expanded absolute path. Same-origin route, like `ProjectListEntry.root`. */
|
|
1979
|
-
path:
|
|
2049
|
+
path: z16.string(),
|
|
1980
2050
|
/** False for a dir the CLI has not created yet — legitimate, and NOT a reason to fall back
|
|
1981
2051
|
* to another account at run time (that would silently bill the wrong subscription). */
|
|
1982
|
-
exists:
|
|
2052
|
+
exists: z16.boolean(),
|
|
1983
2053
|
/** Whether the dir carries this agent's own marker files. ADVISORY: an unrecognised dir is
|
|
1984
2054
|
* still accepted, because "add profile → Connect → the CLI creates it" is the real flow. */
|
|
1985
|
-
looksValid:
|
|
2055
|
+
looksValid: z16.boolean(),
|
|
1986
2056
|
/** True for the profile cezar discovers from the environment. Never stored, never deletable. */
|
|
1987
|
-
isDefault:
|
|
2057
|
+
isDefault: z16.boolean(),
|
|
1988
2058
|
/** This account's own authentication state — two Claude logins answer independently.
|
|
1989
2059
|
*
|
|
1990
2060
|
* **Absent until the probe has warmed.** Every probe shells out to an agent CLI, and this
|
|
@@ -1995,36 +2065,36 @@ var agentProfileSchema = z15.object({
|
|
|
1995
2065
|
status: providerStatusSchema.optional(),
|
|
1996
2066
|
/** This agent's own user-scope config files, resolved inside THIS account's folder — so a
|
|
1997
2067
|
* second login's `settings.json` is the one you open, not the default account's. */
|
|
1998
|
-
files:
|
|
2068
|
+
files: z16.array(agentAccountFileSchema)
|
|
1999
2069
|
});
|
|
2000
2070
|
function agentAccountRouteId(profile) {
|
|
2001
2071
|
return profile.isDefault ? `default:${profile.provider}` : profile.id;
|
|
2002
2072
|
}
|
|
2003
|
-
var agentAccountSelectionSchema =
|
|
2004
|
-
claude:
|
|
2005
|
-
codex:
|
|
2006
|
-
opencode:
|
|
2007
|
-
pi:
|
|
2008
|
-
cursor:
|
|
2009
|
-
});
|
|
2010
|
-
var agentProfilesResponseSchema =
|
|
2011
|
-
editable:
|
|
2012
|
-
profiles:
|
|
2073
|
+
var agentAccountSelectionSchema = z16.object({
|
|
2074
|
+
claude: z16.string().optional(),
|
|
2075
|
+
codex: z16.string().optional(),
|
|
2076
|
+
opencode: z16.string().optional(),
|
|
2077
|
+
pi: z16.string().optional(),
|
|
2078
|
+
cursor: z16.string().optional()
|
|
2079
|
+
});
|
|
2080
|
+
var agentProfilesResponseSchema = z16.object({
|
|
2081
|
+
editable: z16.boolean(),
|
|
2082
|
+
profiles: z16.array(agentProfileSchema),
|
|
2013
2083
|
/** Providers that can carry more than one account at all — what "Add account" is offered for.
|
|
2014
2084
|
* OpenCode is absent: its credentials live in a SQLite DB behind a separate `OPENCODE_DB`, so
|
|
2015
2085
|
* a config-dir profile would swap settings while still billing the other account. */
|
|
2016
|
-
profileCapableProviders:
|
|
2086
|
+
profileCapableProviders: z16.array(providerIdSchema),
|
|
2017
2087
|
/** Which account each project uses, keyed by the project's realpath'd ROOT.
|
|
2018
2088
|
*
|
|
2019
2089
|
* Served here rather than on `GET /api/v1/projects` because it is stored beside the accounts it
|
|
2020
2090
|
* names (`~/.cezar/agent-accounts.json`) — one file, so deleting an account and scrubbing every
|
|
2021
2091
|
* reference to it is one atomic write, and neither can be dropped by a cezar version that never
|
|
2022
2092
|
* heard of accounts. Empty in hosted mode, where the whole family is withheld. */
|
|
2023
|
-
selections:
|
|
2093
|
+
selections: z16.record(z16.string(), agentAccountSelectionSchema),
|
|
2024
2094
|
/** The machine-wide fallback account per provider, used by any repo that has chosen none. */
|
|
2025
2095
|
defaults: agentAccountSelectionSchema
|
|
2026
2096
|
});
|
|
2027
|
-
var selectAgentProfileInputSchema =
|
|
2097
|
+
var selectAgentProfileInputSchema = z16.object({
|
|
2028
2098
|
/**
|
|
2029
2099
|
* Registry slug, or the reserved `default` boot alias. Resolved to a root server-side.
|
|
2030
2100
|
*
|
|
@@ -2032,108 +2102,108 @@ var selectAgentProfileInputSchema = z15.object({
|
|
|
2032
2102
|
* chosen nothing uses, so a second login is set up once rather than per checkout. A repo's own
|
|
2033
2103
|
* choice always wins over it, which is what keeps this a default and not an override.
|
|
2034
2104
|
*/
|
|
2035
|
-
projectId:
|
|
2105
|
+
projectId: z16.string().min(1).max(64).nullable(),
|
|
2036
2106
|
provider: providerIdSchema,
|
|
2037
|
-
profileId:
|
|
2107
|
+
profileId: z16.string().max(64).nullable()
|
|
2038
2108
|
});
|
|
2039
|
-
var agentProfileSelectionsResponseSchema =
|
|
2040
|
-
selections:
|
|
2109
|
+
var agentProfileSelectionsResponseSchema = z16.object({
|
|
2110
|
+
selections: z16.record(z16.string(), agentAccountSelectionSchema),
|
|
2041
2111
|
/** The machine-wide fallback, for repos with no selection of their own. */
|
|
2042
2112
|
defaults: agentAccountSelectionSchema
|
|
2043
2113
|
});
|
|
2044
|
-
var agentAccountStatusResponseSchema =
|
|
2045
|
-
var agentAccountDetailsResponseSchema =
|
|
2046
|
-
available:
|
|
2047
|
-
reason:
|
|
2048
|
-
fields:
|
|
2114
|
+
var agentAccountStatusResponseSchema = z16.object({ status: providerStatusSchema });
|
|
2115
|
+
var agentAccountDetailsResponseSchema = z16.object({
|
|
2116
|
+
available: z16.boolean(),
|
|
2117
|
+
reason: z16.string().optional(),
|
|
2118
|
+
fields: z16.array(z16.object({ label: z16.string(), value: z16.string() }))
|
|
2049
2119
|
});
|
|
2050
|
-
var openAgentAccountFileInputSchema =
|
|
2051
|
-
file:
|
|
2052
|
-
target:
|
|
2120
|
+
var openAgentAccountFileInputSchema = z16.object({
|
|
2121
|
+
file: z16.string().min(1).max(200),
|
|
2122
|
+
target: z16.string().min(1).max(64).optional()
|
|
2053
2123
|
});
|
|
2054
|
-
var openAgentAccountFileResponseSchema =
|
|
2055
|
-
opened:
|
|
2056
|
-
path:
|
|
2124
|
+
var openAgentAccountFileResponseSchema = z16.object({
|
|
2125
|
+
opened: z16.literal(true),
|
|
2126
|
+
path: z16.string()
|
|
2057
2127
|
});
|
|
2058
|
-
var createAgentProfileInputSchema =
|
|
2128
|
+
var createAgentProfileInputSchema = z16.object({
|
|
2059
2129
|
provider: providerIdSchema,
|
|
2060
|
-
label:
|
|
2130
|
+
label: z16.string().trim().max(200).optional(),
|
|
2061
2131
|
/** Stored as written; validated absolute after `~` expansion, server-side. */
|
|
2062
|
-
configDir:
|
|
2132
|
+
configDir: z16.string().trim().min(1).max(4096)
|
|
2063
2133
|
});
|
|
2064
|
-
var agentProfileResponseSchema =
|
|
2065
|
-
var updateAgentProfileInputSchema =
|
|
2066
|
-
label:
|
|
2067
|
-
configDir:
|
|
2134
|
+
var agentProfileResponseSchema = z16.object({ profile: agentProfileSchema });
|
|
2135
|
+
var updateAgentProfileInputSchema = z16.object({
|
|
2136
|
+
label: z16.string().trim().max(200).optional(),
|
|
2137
|
+
configDir: z16.string().trim().min(1).max(4096).optional()
|
|
2068
2138
|
});
|
|
2069
|
-
var removeAgentProfileResponseSchema =
|
|
2070
|
-
removed:
|
|
2071
|
-
id:
|
|
2139
|
+
var removeAgentProfileResponseSchema = z16.object({
|
|
2140
|
+
removed: z16.literal(true),
|
|
2141
|
+
id: z16.string()
|
|
2072
2142
|
});
|
|
2073
2143
|
|
|
2074
2144
|
// ../contract/src/automations.ts
|
|
2075
|
-
import { z as
|
|
2076
|
-
var automationEventSchema =
|
|
2145
|
+
import { z as z17 } from "zod";
|
|
2146
|
+
var automationEventSchema = z17.enum([
|
|
2077
2147
|
"pull_request.opened",
|
|
2078
2148
|
"issue.opened",
|
|
2079
2149
|
"issue.labeled",
|
|
2080
2150
|
"issue.unlabeled"
|
|
2081
2151
|
]);
|
|
2082
|
-
var automationFiltersSchema =
|
|
2083
|
-
authors:
|
|
2084
|
-
assignees:
|
|
2085
|
-
allLabels:
|
|
2086
|
-
anyLabels:
|
|
2087
|
-
excludeLabels:
|
|
2152
|
+
var automationFiltersSchema = z17.object({
|
|
2153
|
+
authors: z17.array(z17.string()).optional(),
|
|
2154
|
+
assignees: z17.array(z17.string()).optional(),
|
|
2155
|
+
allLabels: z17.array(z17.string()).optional(),
|
|
2156
|
+
anyLabels: z17.array(z17.string()).optional(),
|
|
2157
|
+
excludeLabels: z17.array(z17.string()).optional(),
|
|
2088
2158
|
/** Required for the two label events — the server rejects a definition without it. */
|
|
2089
|
-
changedLabels:
|
|
2090
|
-
lookbackDays:
|
|
2091
|
-
maxRecords:
|
|
2159
|
+
changedLabels: z17.array(z17.string()).optional(),
|
|
2160
|
+
lookbackDays: z17.number(),
|
|
2161
|
+
maxRecords: z17.number()
|
|
2092
2162
|
});
|
|
2093
2163
|
var automationTaskSchema = createRunInputBaseSchema.omit({ task: true, images: true, todoId: true, systemPrompt: true }).extend({
|
|
2094
2164
|
/** The prompt template. `{{github.number}}`, `{{github.title}}`, `{{github.url}}` and
|
|
2095
2165
|
* `{{github.labels}}` are substituted per match; GitHub content is appended as untrusted
|
|
2096
2166
|
* context, never interpolated into instructions. */
|
|
2097
|
-
prompt:
|
|
2098
|
-
variants:
|
|
2099
|
-
systemPrompt:
|
|
2167
|
+
prompt: z17.string(),
|
|
2168
|
+
variants: z17.union([z17.literal(1), z17.literal(2), z17.literal(3)]).optional(),
|
|
2169
|
+
systemPrompt: z17.string().optional()
|
|
2100
2170
|
});
|
|
2101
|
-
var automationDefinitionSchema =
|
|
2102
|
-
id:
|
|
2171
|
+
var automationDefinitionSchema = z17.object({
|
|
2172
|
+
id: z17.string(),
|
|
2103
2173
|
/** Bumped on every edit; a PUT must echo the revision it read (optimistic concurrency). */
|
|
2104
|
-
revision:
|
|
2105
|
-
name:
|
|
2106
|
-
description:
|
|
2174
|
+
revision: z17.number(),
|
|
2175
|
+
name: z17.string(),
|
|
2176
|
+
description: z17.string().optional(),
|
|
2107
2177
|
/** Always present: the storage schema defaults it to `false`, so a definition is created
|
|
2108
2178
|
* PAUSED and enabling it is a separate, baseline-establishing act. */
|
|
2109
|
-
enabled:
|
|
2110
|
-
events:
|
|
2111
|
-
intervalSeconds:
|
|
2179
|
+
enabled: z17.boolean(),
|
|
2180
|
+
events: z17.array(automationEventSchema),
|
|
2181
|
+
intervalSeconds: z17.number(),
|
|
2112
2182
|
filters: automationFiltersSchema,
|
|
2113
2183
|
task: automationTaskSchema,
|
|
2114
|
-
createdAt:
|
|
2115
|
-
updatedAt:
|
|
2184
|
+
createdAt: z17.string(),
|
|
2185
|
+
updatedAt: z17.string()
|
|
2116
2186
|
});
|
|
2117
|
-
var automationCursorSchema =
|
|
2118
|
-
timestamp:
|
|
2119
|
-
tieBreaker:
|
|
2187
|
+
var automationCursorSchema = z17.object({
|
|
2188
|
+
timestamp: z17.string(),
|
|
2189
|
+
tieBreaker: z17.string().optional()
|
|
2120
2190
|
});
|
|
2121
|
-
var automationRuntimeStateSchema =
|
|
2191
|
+
var automationRuntimeStateSchema = z17.object({
|
|
2122
2192
|
/** The definition revision this state belongs to; a bumped revision re-baselines. */
|
|
2123
|
-
revision:
|
|
2193
|
+
revision: z17.number().optional(),
|
|
2124
2194
|
/** Enabling establishes a CURRENT-TIME baseline: records older than this never launch. */
|
|
2125
|
-
baselineAt:
|
|
2195
|
+
baselineAt: z17.string().optional(),
|
|
2126
2196
|
cursor: automationCursorSchema.optional(),
|
|
2127
|
-
frozenHighWatermark: automationCursorSchema.extend({ tieBreaker:
|
|
2128
|
-
backlogAfter: automationCursorSchema.extend({ tieBreaker:
|
|
2129
|
-
nextCheckAt:
|
|
2130
|
-
lastSuccessAt:
|
|
2197
|
+
frozenHighWatermark: automationCursorSchema.extend({ tieBreaker: z17.string() }).optional(),
|
|
2198
|
+
backlogAfter: automationCursorSchema.extend({ tieBreaker: z17.string() }).optional(),
|
|
2199
|
+
nextCheckAt: z17.string().optional(),
|
|
2200
|
+
lastSuccessAt: z17.string().optional(),
|
|
2131
2201
|
/** Per-query GitHub ETags, so an unchanged page costs no rate-limit budget. */
|
|
2132
|
-
etags:
|
|
2133
|
-
backoffUntil:
|
|
2134
|
-
consecutiveFailures:
|
|
2202
|
+
etags: z17.record(z17.string(), z17.string()).optional(),
|
|
2203
|
+
backoffUntil: z17.string().optional(),
|
|
2204
|
+
consecutiveFailures: z17.number().optional()
|
|
2135
2205
|
});
|
|
2136
|
-
var automationLogResultSchema =
|
|
2206
|
+
var automationLogResultSchema = z17.enum([
|
|
2137
2207
|
"launched",
|
|
2138
2208
|
"no-match",
|
|
2139
2209
|
"duplicate",
|
|
@@ -2142,80 +2212,82 @@ var automationLogResultSchema = z16.enum([
|
|
|
2142
2212
|
"baseline",
|
|
2143
2213
|
"preview"
|
|
2144
2214
|
]);
|
|
2145
|
-
var automationLogRecordSchema =
|
|
2146
|
-
seq:
|
|
2147
|
-
ts:
|
|
2148
|
-
automationId:
|
|
2149
|
-
revision:
|
|
2215
|
+
var automationLogRecordSchema = z17.object({
|
|
2216
|
+
seq: z17.number(),
|
|
2217
|
+
ts: z17.string(),
|
|
2218
|
+
automationId: z17.string(),
|
|
2219
|
+
revision: z17.number(),
|
|
2150
2220
|
event: automationEventSchema.optional(),
|
|
2151
2221
|
result: automationLogResultSchema,
|
|
2152
|
-
reason:
|
|
2153
|
-
durationMs:
|
|
2154
|
-
receiptId:
|
|
2155
|
-
runId:
|
|
2156
|
-
githubNumber:
|
|
2157
|
-
githubTitle:
|
|
2158
|
-
githubUrl:
|
|
2159
|
-
rateLimit:
|
|
2160
|
-
bucket:
|
|
2161
|
-
remaining:
|
|
2162
|
-
resetAt:
|
|
2222
|
+
reason: z17.string().optional(),
|
|
2223
|
+
durationMs: z17.number().optional(),
|
|
2224
|
+
receiptId: z17.string().optional(),
|
|
2225
|
+
runId: z17.string().optional(),
|
|
2226
|
+
githubNumber: z17.number().optional(),
|
|
2227
|
+
githubTitle: z17.string().optional(),
|
|
2228
|
+
githubUrl: z17.string().optional(),
|
|
2229
|
+
rateLimit: z17.object({
|
|
2230
|
+
bucket: z17.enum(["core", "search"]),
|
|
2231
|
+
remaining: z17.number().optional(),
|
|
2232
|
+
resetAt: z17.string().optional()
|
|
2163
2233
|
}).optional()
|
|
2164
2234
|
});
|
|
2165
|
-
var automationCountsSchema =
|
|
2166
|
-
matches:
|
|
2167
|
-
launched:
|
|
2168
|
-
duplicates:
|
|
2169
|
-
errors:
|
|
2235
|
+
var automationCountsSchema = z17.object({
|
|
2236
|
+
matches: z17.number(),
|
|
2237
|
+
launched: z17.number(),
|
|
2238
|
+
duplicates: z17.number(),
|
|
2239
|
+
errors: z17.number()
|
|
2170
2240
|
});
|
|
2171
2241
|
var automationListEntrySchema = automationDefinitionSchema.extend({
|
|
2172
2242
|
state: automationRuntimeStateSchema.optional(),
|
|
2173
2243
|
latestLog: automationLogRecordSchema.optional(),
|
|
2174
2244
|
counts: automationCountsSchema
|
|
2175
2245
|
});
|
|
2176
|
-
var automationsResponseSchema =
|
|
2177
|
-
available:
|
|
2178
|
-
reason:
|
|
2179
|
-
scheduler:
|
|
2180
|
-
state:
|
|
2181
|
-
nextDue:
|
|
2246
|
+
var automationsResponseSchema = z17.object({
|
|
2247
|
+
available: z17.boolean(),
|
|
2248
|
+
reason: z17.string().optional(),
|
|
2249
|
+
scheduler: z17.object({
|
|
2250
|
+
state: z17.enum(["scheduled", "idle"]),
|
|
2251
|
+
nextDue: z17.string().optional()
|
|
2182
2252
|
}),
|
|
2183
|
-
automations:
|
|
2253
|
+
automations: z17.array(automationListEntrySchema)
|
|
2184
2254
|
});
|
|
2185
|
-
var automationResponseSchema =
|
|
2186
|
-
var automationDetailResponseSchema =
|
|
2255
|
+
var automationResponseSchema = z17.object({ automation: automationDefinitionSchema });
|
|
2256
|
+
var automationDetailResponseSchema = z17.object({
|
|
2187
2257
|
automation: automationDefinitionSchema,
|
|
2188
2258
|
state: automationRuntimeStateSchema.optional(),
|
|
2189
2259
|
latestLog: automationLogRecordSchema.optional()
|
|
2190
2260
|
});
|
|
2191
|
-
var automationCheckSchema =
|
|
2192
|
-
id:
|
|
2193
|
-
automationId:
|
|
2194
|
-
mode:
|
|
2195
|
-
status:
|
|
2196
|
-
createdAt:
|
|
2197
|
-
completedAt:
|
|
2198
|
-
matches:
|
|
2199
|
-
truncated:
|
|
2200
|
-
error:
|
|
2201
|
-
});
|
|
2202
|
-
var automationCheckQueuedResponseSchema =
|
|
2203
|
-
var automationLogResponseSchema =
|
|
2204
|
-
records:
|
|
2205
|
-
});
|
|
2206
|
-
var automationRetryResponseSchema =
|
|
2207
|
-
receiptId:
|
|
2208
|
-
runId:
|
|
2209
|
-
});
|
|
2210
|
-
var createAutomationInputSchema = automationDefinitionSchema.omit({ id: true, revision: true, createdAt: true, updatedAt: true, enabled: true }).extend({ enable:
|
|
2261
|
+
var automationCheckSchema = z17.object({
|
|
2262
|
+
id: z17.string(),
|
|
2263
|
+
automationId: z17.string(),
|
|
2264
|
+
mode: z17.enum(["preview", "execute"]),
|
|
2265
|
+
status: z17.enum(["queued", "running", "complete", "error"]),
|
|
2266
|
+
createdAt: z17.string(),
|
|
2267
|
+
completedAt: z17.string().optional(),
|
|
2268
|
+
matches: z17.number().optional(),
|
|
2269
|
+
truncated: z17.boolean().optional(),
|
|
2270
|
+
error: z17.string().optional()
|
|
2271
|
+
});
|
|
2272
|
+
var automationCheckQueuedResponseSchema = z17.object({ checkId: z17.string() });
|
|
2273
|
+
var automationLogResponseSchema = z17.object({
|
|
2274
|
+
records: z17.array(automationLogRecordSchema)
|
|
2275
|
+
});
|
|
2276
|
+
var automationRetryResponseSchema = z17.object({
|
|
2277
|
+
receiptId: z17.string(),
|
|
2278
|
+
runId: z17.string()
|
|
2279
|
+
});
|
|
2280
|
+
var createAutomationInputSchema = automationDefinitionSchema.omit({ id: true, revision: true, createdAt: true, updatedAt: true, enabled: true }).extend({ enable: z17.boolean().optional() });
|
|
2211
2281
|
var updateAutomationInputSchema = createAutomationInputSchema.omit({ enable: true }).extend({
|
|
2212
|
-
enabled:
|
|
2213
|
-
expectedRevision:
|
|
2282
|
+
enabled: z17.boolean().optional(),
|
|
2283
|
+
expectedRevision: z17.number()
|
|
2214
2284
|
});
|
|
2215
|
-
var automationCheckInputSchema =
|
|
2216
|
-
mode:
|
|
2285
|
+
var automationCheckInputSchema = z17.object({
|
|
2286
|
+
mode: z17.enum(["preview", "execute"])
|
|
2217
2287
|
});
|
|
2218
2288
|
export {
|
|
2289
|
+
CI_WAIT_LIMITATION,
|
|
2290
|
+
CI_WAIT_RECEIPT_INSTRUCTION,
|
|
2219
2291
|
DEFAULT_AGENT_ACCOUNT_ID,
|
|
2220
2292
|
EFFORT_LEVELS,
|
|
2221
2293
|
FILE_ATTACHMENT_MEDIA_TYPES,
|
|
@@ -2278,6 +2350,15 @@ export {
|
|
|
2278
2350
|
changesPayloadSchema,
|
|
2279
2351
|
checkoutProgressEventSchema,
|
|
2280
2352
|
checkoutProjectInputSchema,
|
|
2353
|
+
ciPrIdentitySchema,
|
|
2354
|
+
ciPrUrlSchema,
|
|
2355
|
+
ciWaitErrorCodeSchema,
|
|
2356
|
+
ciWaitErrorSchema,
|
|
2357
|
+
ciWaitOutcomeSchema,
|
|
2358
|
+
ciWaitReceiptSchema,
|
|
2359
|
+
ciWaitRequestSchema,
|
|
2360
|
+
ciWaitResultSchema,
|
|
2361
|
+
ciWaitSchema,
|
|
2281
2362
|
configResponseSchema,
|
|
2282
2363
|
continuationMessageSchema,
|
|
2283
2364
|
continueResponseSchema,
|