@hearsay-tools/squawk 0.18.0-pr4174.8067 → 0.18.0-pr4178.8069

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.
Files changed (133) hide show
  1. package/dist/contract/conversations.d.ts +0 -2
  2. package/dist/contract/delegation.d.ts +0 -57
  3. package/dist/contract/index.js +144 -187
  4. package/dist/contract/run-predicates.d.ts +0 -9
  5. package/dist/contract/usage-limit-hold.d.ts +0 -7
  6. package/dist/contract/waits.d.ts +2 -2
  7. package/dist/delegation/cli.js +4 -8
  8. package/dist/delegation/cli.js.map +1 -1
  9. package/dist/delegation/conversation-send.js +4 -15
  10. package/dist/delegation/conversation-send.js.map +1 -1
  11. package/dist/delegation/conversations.js +0 -6
  12. package/dist/delegation/conversations.js.map +1 -1
  13. package/dist/delegation/execution-identity.d.ts +9 -53
  14. package/dist/delegation/execution-identity.js +9 -165
  15. package/dist/delegation/execution-identity.js.map +1 -1
  16. package/dist/delegation/park-notice.d.ts +3 -29
  17. package/dist/delegation/park-notice.js +4 -32
  18. package/dist/delegation/park-notice.js.map +1 -1
  19. package/dist/delegation/provision.js +3 -3
  20. package/dist/delegation/provision.js.map +1 -1
  21. package/dist/delegation/routes.d.ts +0 -19
  22. package/dist/delegation/service.d.ts +0 -5
  23. package/dist/delegation/service.js +14 -93
  24. package/dist/delegation/service.js.map +1 -1
  25. package/dist/delegation/transport.d.ts +4 -23
  26. package/dist/delegation/worker-executions.d.ts +0 -2
  27. package/dist/delegation/worker-executions.js +1 -5
  28. package/dist/delegation/worker-executions.js.map +1 -1
  29. package/dist/runs/ports.d.ts +0 -2
  30. package/dist/server/provider-action-gate.d.ts +0 -8
  31. package/dist/server/provider-action-gate.js +2 -19
  32. package/dist/server/provider-action-gate.js.map +1 -1
  33. package/dist/server/run-accounts.d.ts +3 -4
  34. package/dist/server/run-accounts.js +5 -20
  35. package/dist/server/run-accounts.js.map +1 -1
  36. package/dist/server/runner-install-routes.d.ts +10 -10
  37. package/dist/server/server.d.ts +58 -72
  38. package/dist/server/server.js +9 -3
  39. package/dist/server/server.js.map +1 -1
  40. package/dist/workflows/continuation-admission.d.ts +0 -7
  41. package/dist/workflows/continuation-admission.js +8 -21
  42. package/dist/workflows/continuation-admission.js.map +1 -1
  43. package/dist/workflows/input-acknowledgement.d.ts +24 -24
  44. package/dist/workflows/run/continuation-acceptance.d.ts +1 -5
  45. package/dist/workflows/run/continuation-acceptance.js +29 -94
  46. package/dist/workflows/run/continuation-acceptance.js.map +1 -1
  47. package/dist/workflows/run/launch-read-resolver.d.ts +0 -6
  48. package/dist/workflows/run/launch-read-resolver.js +2 -13
  49. package/dist/workflows/run/launch-read-resolver.js.map +1 -1
  50. package/dist/workflows/run/run-settlement.js +0 -6
  51. package/dist/workflows/run/run-settlement.js.map +1 -1
  52. package/dist/workflows/run/worker-questions.d.ts +0 -4
  53. package/dist/workflows/run/worker-questions.js +8 -42
  54. package/dist/workflows/run/worker-questions.js.map +1 -1
  55. package/dist/workflows/step-kind-ids.d.ts +9 -0
  56. package/dist/workflows/step-kind-ids.js +10 -0
  57. package/dist/workflows/step-kind-ids.js.map +1 -0
  58. package/dist/workflows/wait-kind-ids.d.ts +11 -0
  59. package/dist/workflows/wait-kind-ids.js +34 -0
  60. package/dist/workflows/wait-kind-ids.js.map +1 -0
  61. package/package.json +4 -4
  62. package/web/dist/assets/{accounts-section-BkKQ8sVH.js → accounts-section-D3P_Z-Nu.js} +1 -1
  63. package/web/dist/assets/{activity-motion-D80Uv4-Z.js → activity-motion-BW-0k8s7.js} +1 -1
  64. package/web/dist/assets/{activity-route-DVT8IWTR.js → activity-route-Bpgblioe.js} +1 -1
  65. package/web/dist/assets/{agent-config-section-BbwkJunW.js → agent-config-section-Cj3w7UIn.js} +1 -1
  66. package/web/dist/assets/{agent-defaults-section-BLNTIZT_.js → agent-defaults-section-BJ4poe9c.js} +1 -1
  67. package/web/dist/assets/{appearance-B6YBsmTo.js → appearance-BUsUTPF0.js} +1 -1
  68. package/web/dist/assets/{archive-on-merge-field-Bx1bEmI8.js → archive-on-merge-field-D_kgBFNv.js} +1 -1
  69. package/web/dist/assets/attention-lvUYNNvV.js +1 -0
  70. package/web/dist/assets/{automation-format-BsnXeUET.js → automation-format-1lHzRTbq.js} +1 -1
  71. package/web/dist/assets/automations-route-CZaUrmDs.js +1 -0
  72. package/web/dist/assets/{cez-idle-Crszm9Ts.js → cez-idle-BY3rjM_y.js} +1 -1
  73. package/web/dist/assets/{commit-diff-panel-DKUnniap.js → commit-diff-panel-xwLW6Ydr.js} +1 -1
  74. package/web/dist/assets/{diff-DUbLBjbg.js → diff-BB8SoL-s.js} +2 -2
  75. package/web/dist/assets/{diff-view-D_bjQyDl.js → diff-view-O8lx1ztb.js} +1 -1
  76. package/web/dist/assets/{file-preview-glEH09z8.js → file-preview-BS6M2tBo.js} +1 -1
  77. package/web/dist/assets/{folder-browser-G_9ZgDjg.js → folder-browser-Dsqz0Z1z.js} +1 -1
  78. package/web/dist/assets/{git-toolbar-CTsmGICA.js → git-toolbar-DoPFA36c.js} +1 -1
  79. package/web/dist/assets/{github-BqW9PaQO.js → github-Bjy3WBvf.js} +1 -1
  80. package/web/dist/assets/{global-activity-route-BP_Z7HNc.js → global-activity-route-BXBZKz_9.js} +1 -1
  81. package/web/dist/assets/index-CmadQXcg.js +21 -0
  82. package/web/dist/assets/{label-BWld23ke.js → label-CZp8t0zE.js} +1 -1
  83. package/web/dist/assets/live-protocol-D9ji1YCl.js +64 -0
  84. package/web/dist/assets/{markdown-CT65TA_B.js → markdown-KHcncamw.js} +1 -1
  85. package/web/dist/assets/{notifications-section-DuSzYLwP.js → notifications-section-DD21Sd79.js} +1 -1
  86. package/web/dist/assets/{open-in-menu-D03osLGE.js → open-in-menu-DdKs6X5r.js} +1 -1
  87. package/web/dist/assets/{preview-pane-connected-DHmgDHId.js → preview-pane-connected-BvTZv2SQ.js} +1 -1
  88. package/web/dist/assets/{project-location-BM-6wMI3.js → project-location-B3LBvkz2.js} +1 -1
  89. package/web/dist/assets/{project-router-DtTvMbeA.js → project-router-CIKODSHW.js} +1 -1
  90. package/web/dist/assets/project-scope-context-D1bpJixc.js +4 -0
  91. package/web/dist/assets/{projects-section-Dr0xJWTm.js → projects-section-C0k8kyb-.js} +1 -1
  92. package/web/dist/assets/{prompt-templates-section-COKMgKMw.js → prompt-templates-section-DNkosCni.js} +1 -1
  93. package/web/dist/assets/queries-dHXhD3Hc.js +1 -0
  94. package/web/dist/assets/{reference-chip-DTKtEtWv.js → reference-chip-BWViAFIN.js} +1 -1
  95. package/web/dist/assets/{remote-settings-notice-BV_sPAXc.js → remote-settings-notice-DPCENbhz.js} +1 -1
  96. package/web/dist/assets/{repo-git-BgXC4opq.js → repo-git-jKOnO3ba.js} +1 -1
  97. package/web/dist/assets/{report-reader-CtHvvSln.js → report-reader-DXYiKNcg.js} +1 -1
  98. package/web/dist/assets/{reports-CdbDUzkK.js → reports-DEE0bHNv.js} +1 -1
  99. package/web/dist/assets/{resources-section-C8KZ4hre.js → resources-section-lqXgYTrv.js} +1 -1
  100. package/web/dist/assets/{run-header-RQYKdIMw.js → run-header-CXlUbvDO.js} +1 -1
  101. package/web/dist/assets/runners-CGQjSsir.js +1 -0
  102. package/web/dist/assets/{settings-agent-picker-3uuSf9LK.js → settings-agent-picker-BRvZn4kM.js} +1 -1
  103. package/web/dist/assets/{settings-shell-DnYRfclU.js → settings-shell-DTtd-vIa.js} +1 -1
  104. package/web/dist/assets/{sidebar-section-CCg4QGtg.js → sidebar-section-BFW4ZfBR.js} +1 -1
  105. package/web/dist/assets/{skills-L01dfEnP.js → skills-AImMlT1T.js} +1 -1
  106. package/web/dist/assets/{tab-link-Dl5Mmavw.js → tab-link-CM6SDBtV.js} +1 -1
  107. package/web/dist/assets/{task-changes-DWPWp6ZV.js → task-changes-01Z_ppIw.js} +1 -1
  108. package/web/dist/assets/{task-commits-D576LERH.js → task-commits-DRNIum3J.js} +1 -1
  109. package/web/dist/assets/{task-files-1EjplVVb.js → task-files-Crz7Fo3C.js} +1 -1
  110. package/web/dist/assets/{task-github-item-BubKlTej.js → task-github-item-psG2V47c.js} +1 -1
  111. package/web/dist/assets/task-groups-DF0XoB6U.js +1 -0
  112. package/web/dist/assets/task-thread-Bqg91ZVZ.js +9 -0
  113. package/web/dist/assets/{tasks-table-DTNcYbbN.js → tasks-table-DHTEGteC.js} +1 -1
  114. package/web/dist/assets/{thread-state-BiS8rKQ-.js → thread-state-BWJ2YyXo.js} +1 -1
  115. package/web/dist/assets/{use-hand-to-agent-state-BFx3SZia.js → use-hand-to-agent-state-DNROQerR.js} +1 -1
  116. package/web/dist/assets/{useInfiniteQuery-BnyaEFle.js → useInfiniteQuery-qJeCNhM7.js} +1 -1
  117. package/web/dist/assets/useQuery-C3CQhXsT.js +1 -0
  118. package/web/dist/assets/{workflows-DbuTPPz7.js → workflows-Cx9lgrEo.js} +1 -1
  119. package/web/dist/assets/{workspace-tools-DPnEZoDL.js → workspace-tools-CVitt3kE.js} +1 -1
  120. package/web/dist/assets/{worktrees-section-Vr8s9cio.js → worktrees-section-DxUg4l9n.js} +1 -1
  121. package/web/dist/assets/{ws-Bal5BUy2.js → ws-BisMp6U5.js} +1 -1
  122. package/web/dist/index.html +17 -17
  123. package/web/dist/live-worker.js +1 -1
  124. package/web/dist/assets/attention-otQlgfRj.js +0 -1
  125. package/web/dist/assets/automations-route-BOcGwfd4.js +0 -1
  126. package/web/dist/assets/index-DXIRYobS.js +0 -21
  127. package/web/dist/assets/live-protocol-BXzu6cSE.js +0 -64
  128. package/web/dist/assets/project-scope-context-Dgq8_2JZ.js +0 -4
  129. package/web/dist/assets/queries-yuG-mM6_.js +0 -1
  130. package/web/dist/assets/runners-CDw7wLfd.js +0 -1
  131. package/web/dist/assets/task-groups-D4RYW5I_.js +0 -1
  132. package/web/dist/assets/task-thread-yWACZZAo.js +0 -9
  133. package/web/dist/assets/useQuery-BUslvRIM.js +0 -1
@@ -314,8 +314,6 @@ export declare const conversationSendRequestSchema: z.ZodObject<{
314
314
  text: z.ZodString;
315
315
  timeoutSeconds: z.ZodDefault<z.ZodNumber>;
316
316
  resume: z.ZodOptional<z.ZodBoolean>;
317
- model: z.ZodOptional<z.ZodString>;
318
- effort: z.ZodOptional<z.ZodString>;
319
317
  }, z.core.$strict>;
320
318
  export type ConversationSendRequest = z.infer<typeof conversationSendRequestSchema>;
321
319
  /** Effect of this call, independent of the stored delivery receipt and request outcome.
@@ -1251,16 +1251,6 @@ export declare const workerWaitRequestSchema: z.ZodObject<{
1251
1251
  }>>;
1252
1252
  }, z.core.$strict>;
1253
1253
  export type WorkerWaitRequest = z.infer<typeof workerWaitRequestSchema>;
1254
- export declare const workerHoldSchema: z.ZodObject<{
1255
- reason: z.ZodEnum<{
1256
- "provider-error": "provider-error";
1257
- "usage-limit": "usage-limit";
1258
- }>;
1259
- resumeAt: z.ZodISODateTime;
1260
- attempts: z.ZodOptional<z.ZodNumber>;
1261
- error: z.ZodOptional<z.ZodString>;
1262
- }, z.core.$strict>;
1263
- export type WorkerHold = z.infer<typeof workerHoldSchema>;
1264
1254
  export declare const workerInspectionSchema: z.ZodObject<{
1265
1255
  workerId: z.ZodUUID;
1266
1256
  settled: z.ZodBoolean;
@@ -1293,16 +1283,6 @@ export declare const workerInspectionSchema: z.ZodObject<{
1293
1283
  }, z.core.$strict>], "kind">;
1294
1284
  backend: z.ZodOptional<z.ZodString>;
1295
1285
  model: z.ZodOptional<z.ZodString>;
1296
- effort: z.ZodOptional<z.ZodString>;
1297
- hold: z.ZodOptional<z.ZodObject<{
1298
- reason: z.ZodEnum<{
1299
- "provider-error": "provider-error";
1300
- "usage-limit": "usage-limit";
1301
- }>;
1302
- resumeAt: z.ZodISODateTime;
1303
- attempts: z.ZodOptional<z.ZodNumber>;
1304
- error: z.ZodOptional<z.ZodString>;
1305
- }, z.core.$strict>>;
1306
1286
  inputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
1307
1287
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
1308
1288
  kind: z.ZodLiteral<"baseline-file">;
@@ -1488,15 +1468,6 @@ export declare const workerListEntrySchema: z.ZodObject<{
1488
1468
  hostRunId: z.ZodUUID;
1489
1469
  baselineSha: z.ZodString;
1490
1470
  }, z.core.$strict>], "kind">;
1491
- hold: z.ZodOptional<z.ZodObject<{
1492
- reason: z.ZodEnum<{
1493
- "provider-error": "provider-error";
1494
- "usage-limit": "usage-limit";
1495
- }>;
1496
- resumeAt: z.ZodISODateTime;
1497
- attempts: z.ZodOptional<z.ZodNumber>;
1498
- error: z.ZodOptional<z.ZodString>;
1499
- }, z.core.$strict>>;
1500
1471
  destroy: z.ZodOptional<z.ZodObject<{
1501
1472
  requestedAt: z.ZodISODateTime;
1502
1473
  phase: z.ZodEnum<{
@@ -1552,15 +1523,6 @@ export declare const workerListResultSchema: z.ZodObject<{
1552
1523
  hostRunId: z.ZodUUID;
1553
1524
  baselineSha: z.ZodString;
1554
1525
  }, z.core.$strict>], "kind">;
1555
- hold: z.ZodOptional<z.ZodObject<{
1556
- reason: z.ZodEnum<{
1557
- "provider-error": "provider-error";
1558
- "usage-limit": "usage-limit";
1559
- }>;
1560
- resumeAt: z.ZodISODateTime;
1561
- attempts: z.ZodOptional<z.ZodNumber>;
1562
- error: z.ZodOptional<z.ZodString>;
1563
- }, z.core.$strict>>;
1564
1526
  destroy: z.ZodOptional<z.ZodObject<{
1565
1527
  requestedAt: z.ZodISODateTime;
1566
1528
  phase: z.ZodEnum<{
@@ -1623,15 +1585,6 @@ export declare const workerListPageSchema: z.ZodObject<{
1623
1585
  hostRunId: z.ZodUUID;
1624
1586
  baselineSha: z.ZodString;
1625
1587
  }, z.core.$strict>], "kind">;
1626
- hold: z.ZodOptional<z.ZodObject<{
1627
- reason: z.ZodEnum<{
1628
- "provider-error": "provider-error";
1629
- "usage-limit": "usage-limit";
1630
- }>;
1631
- resumeAt: z.ZodISODateTime;
1632
- attempts: z.ZodOptional<z.ZodNumber>;
1633
- error: z.ZodOptional<z.ZodString>;
1634
- }, z.core.$strict>>;
1635
1588
  destroy: z.ZodOptional<z.ZodObject<{
1636
1589
  requestedAt: z.ZodISODateTime;
1637
1590
  phase: z.ZodEnum<{
@@ -1771,16 +1724,6 @@ export declare const runRelationshipsSchema: z.ZodObject<{
1771
1724
  }, z.core.$strict>], "kind">;
1772
1725
  backend: z.ZodOptional<z.ZodString>;
1773
1726
  model: z.ZodOptional<z.ZodString>;
1774
- effort: z.ZodOptional<z.ZodString>;
1775
- hold: z.ZodOptional<z.ZodObject<{
1776
- reason: z.ZodEnum<{
1777
- "provider-error": "provider-error";
1778
- "usage-limit": "usage-limit";
1779
- }>;
1780
- resumeAt: z.ZodISODateTime;
1781
- attempts: z.ZodOptional<z.ZodNumber>;
1782
- error: z.ZodOptional<z.ZodString>;
1783
- }, z.core.$strict>>;
1784
1727
  inputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
1785
1728
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
1786
1729
  kind: z.ZodLiteral<"baseline-file">;
@@ -1,8 +1,8 @@
1
1
  // ../contract/src/events.ts
2
- import { z as z6 } from "zod";
2
+ import { z as z5 } from "zod";
3
3
 
4
4
  // ../contract/src/conversations.ts
5
- import { z as z3 } from "zod";
5
+ import { z as z2 } from "zod";
6
6
 
7
7
  // ../contract/src/ask-schema.ts
8
8
  import { z } from "zod";
@@ -35,50 +35,38 @@ var askRequestSchema = z.object({
35
35
  })
36
36
  }).strict();
37
37
 
38
- // ../contract/src/effort.ts
39
- import { z as z2 } from "zod";
40
- var EFFORT_LEVELS = ["low", "medium", "high", "xhigh", "max"];
41
- var effortLevelSchema = z2.enum(EFFORT_LEVELS);
42
- var effortFieldSchema = z2.string().max(32).optional();
43
- function parseEffort(value) {
44
- const trimmed = value?.trim().toLowerCase();
45
- if (!trimmed || trimmed === "auto") return void 0;
46
- const parsed = effortLevelSchema.safeParse(trimmed);
47
- return parsed.success ? parsed.data : void 0;
48
- }
49
-
50
38
  // ../contract/src/conversations.ts
51
- var conversationRelationshipSchema = z3.enum(["family", "peer"]);
52
- var conversationAttributionSchema = z3.object({
53
- senderRunId: z3.uuid(),
54
- recipientRunId: z3.uuid(),
55
- kind: z3.enum(["request", "progress", "follow-up", "reply"]),
56
- requestId: z3.uuid().optional(),
39
+ var conversationRelationshipSchema = z2.enum(["family", "peer"]);
40
+ var conversationAttributionSchema = z2.object({
41
+ senderRunId: z2.uuid(),
42
+ recipientRunId: z2.uuid(),
43
+ kind: z2.enum(["request", "progress", "follow-up", "reply"]),
44
+ requestId: z2.uuid().optional(),
57
45
  relationship: conversationRelationshipSchema.optional()
58
46
  }).strict();
59
47
  var conversationMessageSchema = conversationAttributionSchema.extend({
60
- id: z3.uuid(),
61
- text: z3.string().min(1).max(1e5),
62
- createdAt: z3.iso.datetime(),
63
- deadline: z3.iso.datetime().optional(),
64
- requestHash: z3.string().regex(/^[0-9a-f]{64}$/),
65
- state: z3.enum(["accepted", "continuation-required", "destroyed", "late"]),
48
+ id: z2.uuid(),
49
+ text: z2.string().min(1).max(1e5),
50
+ createdAt: z2.iso.datetime(),
51
+ deadline: z2.iso.datetime().optional(),
52
+ requestHash: z2.string().regex(/^[0-9a-f]{64}$/),
53
+ state: z2.enum(["accepted", "continuation-required", "destroyed", "late"]),
66
54
  /** A parent-authorized new execution; retained on exact message retries. */
67
- resumed: z3.literal(true).optional(),
68
- instruction: z3.string().max(2048).optional(),
55
+ resumed: z2.literal(true).optional(),
56
+ instruction: z2.string().max(2048).optional(),
69
57
  /** A worker's question routed to its parent (#505): answered only by a reply naming it. */
70
58
  question: askRequestSchema.optional()
71
59
  });
72
- var requestOutcomeSchema = z3.object({
73
- requestId: z3.uuid(),
60
+ var requestOutcomeSchema = z2.object({
61
+ requestId: z2.uuid(),
74
62
  /** `deleted`: a peer recipient's record was deleted while the request was open. */
75
- status: z3.enum(["replied", "replied-late", "completed-without-reply", "failed", "cancelled", "destroyed", "timed-out", "sender-closed", "human-fallback", "deleted"]),
76
- observedAt: z3.iso.datetime(),
77
- replyId: z3.uuid().optional()
63
+ status: z2.enum(["replied", "replied-late", "completed-without-reply", "failed", "cancelled", "destroyed", "timed-out", "sender-closed", "human-fallback", "deleted"]),
64
+ observedAt: z2.iso.datetime(),
65
+ replyId: z2.uuid().optional()
78
66
  }).strict();
79
- var conversationStateSchema = z3.object({ messages: z3.array(conversationMessageSchema).max(1024), outcomes: z3.array(requestOutcomeSchema).max(1024) }).strict();
67
+ var conversationStateSchema = z2.object({ messages: z2.array(conversationMessageSchema).max(1024), outcomes: z2.array(requestOutcomeSchema).max(1024) }).strict();
80
68
  var CURSOR = /^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z)~([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/i;
81
- var conversationCursorSchema = z3.string().max(128).regex(CURSOR, "Not a history cursor; pass nextBefore from an earlier page");
69
+ var conversationCursorSchema = z2.string().max(128).regex(CURSOR, "Not a history cursor; pass nextBefore from an earlier page");
82
70
  function encodeConversationCursor(message2) {
83
71
  return `${message2.createdAt}~${message2.id}`;
84
72
  }
@@ -89,182 +77,180 @@ function decodeConversationCursor(cursor) {
89
77
  }
90
78
  var CONVERSATION_PAGE_MESSAGES = 1024;
91
79
  var conversationInspectResultSchema = conversationStateSchema.extend({
92
- hint: z3.string().optional(),
80
+ hint: z2.string().optional(),
93
81
  /** Present when older messages exist: pass it as `before` to read the page before this one. */
94
82
  nextBefore: conversationCursorSchema.optional()
95
83
  });
96
- var inboxReserveResultSchema = z3.object({
97
- messages: z3.array(conversationMessageSchema).max(32),
98
- outcomes: z3.array(requestOutcomeSchema).max(32),
99
- receiptId: z3.uuid().optional(),
100
- expiresAt: z3.iso.datetime().optional()
84
+ var inboxReserveResultSchema = z2.object({
85
+ messages: z2.array(conversationMessageSchema).max(32),
86
+ outcomes: z2.array(requestOutcomeSchema).max(32),
87
+ receiptId: z2.uuid().optional(),
88
+ expiresAt: z2.iso.datetime().optional()
101
89
  }).strict().refine(
102
90
  (value) => value.messages.length > 0 ? value.receiptId !== void 0 && value.expiresAt !== void 0 : value.receiptId === void 0 && value.expiresAt === void 0,
103
91
  { message: "A nonempty inbox batch requires a receipt and expiry" }
104
92
  );
105
- var inboxReceiptRequestSchema = z3.object({ receiptId: z3.uuid() }).strict();
106
- var inboxReceiptResultSchema = z3.object({
107
- receiptId: z3.uuid(),
108
- status: z3.enum(["acknowledged", "already-acknowledged", "released"])
93
+ var inboxReceiptRequestSchema = z2.object({ receiptId: z2.uuid() }).strict();
94
+ var inboxReceiptResultSchema = z2.object({
95
+ receiptId: z2.uuid(),
96
+ status: z2.enum(["acknowledged", "already-acknowledged", "released"])
109
97
  }).strict();
110
98
  var MAX_RESUME_REQUEST_SECONDS = 86400;
111
99
  var MAX_CONVERSATION_REQUEST_SECONDS = 7200;
112
100
  var DEFAULT_CONVERSATION_REQUEST_SECONDS = 600;
113
- var conversationSendRequestSchema = z3.object({
114
- id: z3.uuid(),
115
- recipientRunId: z3.uuid(),
101
+ var conversationSendRequestSchema = z2.object({
102
+ id: z2.uuid(),
103
+ recipientRunId: z2.uuid(),
116
104
  kind: conversationAttributionSchema.shape.kind,
117
- requestId: z3.uuid().optional(),
118
- text: z3.string().min(1).max(1e5).refine((text) => text.trim().length > 0),
119
- timeoutSeconds: z3.number().int().min(1).max(MAX_RESUME_REQUEST_SECONDS).default(DEFAULT_CONVERSATION_REQUEST_SECONDS),
120
- resume: z3.boolean().optional(),
121
- model: z3.string().trim().min(1).max(512).optional(),
122
- effort: effortFieldSchema
123
- }).strict().refine((value) => value.timeoutSeconds <= MAX_CONVERSATION_REQUEST_SECONDS || value.resume === true && value.kind === "request", { path: ["timeoutSeconds"], message: "Only --resume requests accept deadlines above 7200 seconds (maximum 86400)" }).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" }).refine((value) => value.resume === true || value.model === void 0 && value.effort === void 0, { message: "--model and --effort require --resume" });
124
- var conversationSendEffectSchema = z3.enum(["applied", "unchanged", "refused", "unknown"]);
125
- var conversationSendResultSchema = z3.object({ message: conversationMessageSchema, delivery: z3.enum(["queued", "delivered", "consumed", "not-delivered"]), outcome: requestOutcomeSchema.optional(), effect: conversationSendEffectSchema.optional() }).strict();
126
- var conversationInspectRequestSchema = z3.object({ recipientRunId: z3.uuid(), before: conversationCursorSchema.optional() }).strict();
127
- var conversationCancelRequestSchema = z3.object({ requestId: z3.uuid() }).strict();
128
- var requestWaitRequestSchema = z3.object({
129
- requestIds: z3.array(z3.uuid()).min(1).max(32).refine((ids) => new Set(ids).size === ids.length),
130
- mode: z3.enum(["one", "any", "all"]).optional(),
131
- timeoutSeconds: z3.number().int().min(1).max(7200).default(600)
105
+ requestId: z2.uuid().optional(),
106
+ text: z2.string().min(1).max(1e5).refine((text) => text.trim().length > 0),
107
+ timeoutSeconds: z2.number().int().min(1).max(MAX_RESUME_REQUEST_SECONDS).default(DEFAULT_CONVERSATION_REQUEST_SECONDS),
108
+ resume: z2.boolean().optional()
109
+ }).strict().refine((value) => value.timeoutSeconds <= MAX_CONVERSATION_REQUEST_SECONDS || value.resume === true && value.kind === "request", { path: ["timeoutSeconds"], message: "Only --resume requests accept deadlines above 7200 seconds (maximum 86400)" }).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" });
110
+ var conversationSendEffectSchema = z2.enum(["applied", "unchanged", "refused", "unknown"]);
111
+ var conversationSendResultSchema = z2.object({ message: conversationMessageSchema, delivery: z2.enum(["queued", "delivered", "consumed", "not-delivered"]), outcome: requestOutcomeSchema.optional(), effect: conversationSendEffectSchema.optional() }).strict();
112
+ var conversationInspectRequestSchema = z2.object({ recipientRunId: z2.uuid(), before: conversationCursorSchema.optional() }).strict();
113
+ var conversationCancelRequestSchema = z2.object({ requestId: z2.uuid() }).strict();
114
+ var requestWaitRequestSchema = z2.object({
115
+ requestIds: z2.array(z2.uuid()).min(1).max(32).refine((ids) => new Set(ids).size === ids.length),
116
+ mode: z2.enum(["one", "any", "all"]).optional(),
117
+ timeoutSeconds: z2.number().int().min(1).max(7200).default(600)
132
118
  }).strict().refine((value) => value.mode !== "one" || value.requestIds.length === 1, { message: "one requires exactly one request" });
133
119
 
134
120
  // ../contract/src/agent-input.ts
135
- import { z as z4 } from "zod";
136
- var inboxClaimSchema = z4.object({
137
- receiptId: z4.uuid(),
138
- generation: z4.uuid(),
139
- expiresAt: z4.iso.datetime(),
140
- acknowledgedAt: z4.iso.datetime().optional(),
121
+ import { z as z3 } from "zod";
122
+ var inboxClaimSchema = z3.object({
123
+ receiptId: z3.uuid(),
124
+ generation: z3.uuid(),
125
+ expiresAt: z3.iso.datetime(),
126
+ acknowledgedAt: z3.iso.datetime().optional(),
141
127
  /** Optional on read for receipts persisted before member manifests existed. */
142
- memberIds: z4.array(z4.uuid()).min(1).max(32).refine((ids) => new Set(ids).size === ids.length).optional()
128
+ memberIds: z3.array(z3.uuid()).min(1).max(32).refine((ids) => new Set(ids).size === ids.length).optional()
143
129
  }).strict();
144
- var agentInputSchema = z4.object({
130
+ var agentInputSchema = z3.object({
145
131
  conversation: conversationAttributionSchema.optional(),
146
- id: z4.uuid(),
147
- source: z4.enum(["agent", "lifecycle"]),
148
- parentRunId: z4.uuid(),
149
- text: z4.string().min(1).max(1e5),
150
- createdAt: z4.iso.datetime(),
151
- deliveredAt: z4.iso.datetime().optional(),
132
+ id: z3.uuid(),
133
+ source: z3.enum(["agent", "lifecycle"]),
134
+ parentRunId: z3.uuid(),
135
+ text: z3.string().min(1).max(1e5),
136
+ createdAt: z3.iso.datetime(),
137
+ deliveredAt: z3.iso.datetime().optional(),
152
138
  /** The model received it, when the harness can show that (#505). Absent on
153
139
  * unobservable backends and on records written before #505. */
154
- consumedAt: z4.iso.datetime().optional(),
140
+ consumedAt: z3.iso.datetime().optional(),
155
141
  /** Accepted by a harness that reports reading, and not read yet. A restart replays
156
142
  * such input; records written before #505 never carry it, so nothing historical replays. */
157
- awaitingRead: z4.literal(true).optional(),
143
+ awaitingRead: z3.literal(true).optional(),
158
144
  inboxClaim: inboxClaimSchema.optional(),
159
145
  /** A completion refusal Squawk queued for a closed session (hearsay-tools/cezarion#1301): its
160
146
  * delivery is the nudge's turn, bounded by the nudge's reply bound, and a session that closes
161
147
  * before it is a failed delivery. `undelivered-question` is Squawk's answer to a worker question
162
148
  * that could not reach its live parent (hearsay-tools/cezarion#2410). Absent on every other input
163
149
  * and on records written before. */
164
- purpose: z4.enum(["completion-refusal", "undelivered-question"]).optional(),
150
+ purpose: z3.enum(["completion-refusal", "undelivered-question"]).optional(),
165
151
  /** A peer message's own hash and request deadline (hearsay-tools/cezarion#1990): the sender's
166
152
  * ledger can be deleted before the recipient reads it. Absent on family and lifecycle inputs. */
167
- requestHash: z4.string().regex(/^[0-9a-f]{64}$/).optional(),
168
- deadline: z4.iso.datetime().optional()
153
+ requestHash: z3.string().regex(/^[0-9a-f]{64}$/).optional(),
154
+ deadline: z3.iso.datetime().optional()
169
155
  }).strict();
170
156
 
171
157
  // ../contract/src/worker-outcome.ts
172
- import { z as z5 } from "zod";
173
- var workerOutcomeSchema = z5.object({
174
- workerId: z5.uuid(),
175
- status: z5.enum(["review", "done", "failed", "cancelled"]),
176
- observedAt: z5.iso.datetime(),
177
- summary: z5.string().max(4e3).optional(),
178
- revision: z5.number().int().nonnegative().optional()
158
+ import { z as z4 } from "zod";
159
+ var workerOutcomeSchema = z4.object({
160
+ workerId: z4.uuid(),
161
+ status: z4.enum(["review", "done", "failed", "cancelled"]),
162
+ observedAt: z4.iso.datetime(),
163
+ summary: z4.string().max(4e3).optional(),
164
+ revision: z4.number().int().nonnegative().optional()
179
165
  }).strict();
180
- var workerWaitModeSchema = z5.enum(["one", "any", "all"]);
166
+ var workerWaitModeSchema = z4.enum(["one", "any", "all"]);
181
167
 
182
168
  // ../contract/src/events.ts
183
- var runEventSchema = z6.looseObject({
184
- seq: z6.number(),
185
- ts: z6.string(),
186
- stepId: z6.string().optional(),
187
- type: z6.string()
188
- });
189
- var conversationMessageEventSchema = runEventSchema.extend({ type: z6.literal("conversation-message"), message: conversationMessageSchema, delivery: z6.enum(["queued", "delivered", "consumed", "not-delivered"]), deliveredAt: z6.iso.datetime().optional(), consumedAt: z6.iso.datetime().optional() });
190
- var requestOutcomeEventSchema = runEventSchema.extend({ type: z6.literal("request-outcome"), outcome: requestOutcomeSchema });
169
+ var runEventSchema = z5.looseObject({
170
+ seq: z5.number(),
171
+ ts: z5.string(),
172
+ stepId: z5.string().optional(),
173
+ type: z5.string()
174
+ });
175
+ var conversationMessageEventSchema = runEventSchema.extend({ type: z5.literal("conversation-message"), message: conversationMessageSchema, delivery: z5.enum(["queued", "delivered", "consumed", "not-delivered"]), deliveredAt: z5.iso.datetime().optional(), consumedAt: z5.iso.datetime().optional() });
176
+ var requestOutcomeEventSchema = runEventSchema.extend({ type: z5.literal("request-outcome"), outcome: requestOutcomeSchema });
191
177
  var agentInputEventSchema = runEventSchema.extend({
192
- type: z6.literal("agent-input"),
178
+ type: z5.literal("agent-input"),
193
179
  input: agentInputSchema
194
180
  });
195
181
  var humanInputDeliveredEventSchema = runEventSchema.extend({
196
- type: z6.literal("human-input-delivered"),
197
- askSeq: z6.number().int().nonnegative(),
182
+ type: z5.literal("human-input-delivered"),
183
+ askSeq: z5.number().int().nonnegative(),
198
184
  /** Who answered: absent (records before #505) or `human` is a person; `parent` is the
199
185
  * owning parent's reply to a routed worker question; `cezar` is Squawk's notice that the question
200
186
  * could not reach a live parent (hearsay-tools/cezarion#2410). */
201
- source: z6.enum(["human", "parent", "cezar"]).optional()
187
+ source: z5.enum(["human", "parent", "cezar"]).optional()
202
188
  });
203
189
  var humanAskClosedEventSchema = runEventSchema.extend({
204
- type: z6.literal("human-ask-closed"),
205
- askSeq: z6.number().int().nonnegative(),
206
- reason: z6.enum(["finish", "superseded", "parent-stopped", "worker-stopped", "undeliverable"])
190
+ type: z5.literal("human-ask-closed"),
191
+ askSeq: z5.number().int().nonnegative(),
192
+ reason: z5.enum(["finish", "superseded", "parent-stopped", "worker-stopped", "undeliverable"])
207
193
  });
208
194
  var workerQuestionRoutedEventSchema = runEventSchema.extend({
209
- type: z6.literal("worker-question-routed"),
210
- askSeq: z6.number().int().nonnegative(),
211
- messageId: z6.uuid(),
212
- parentRunId: z6.uuid()
195
+ type: z5.literal("worker-question-routed"),
196
+ askSeq: z5.number().int().nonnegative(),
197
+ messageId: z5.uuid(),
198
+ parentRunId: z5.uuid()
213
199
  });
214
200
  var workerQuestionFallbackEventSchema = runEventSchema.extend({
215
- type: z6.literal("worker-question-fallback"),
216
- askSeq: z6.number().int().nonnegative(),
217
- reason: z6.string().min(1).max(200)
201
+ type: z5.literal("worker-question-fallback"),
202
+ askSeq: z5.number().int().nonnegative(),
203
+ reason: z5.string().min(1).max(200)
218
204
  });
219
205
  var workerQuestionUndeliveredEventSchema = runEventSchema.extend({
220
- type: z6.literal("worker-question-undelivered"),
221
- askSeq: z6.number().int().nonnegative(),
222
- reason: z6.string().min(1).max(200)
206
+ type: z5.literal("worker-question-undelivered"),
207
+ askSeq: z5.number().int().nonnegative(),
208
+ reason: z5.string().min(1).max(200)
223
209
  });
224
210
  var workerOutcomeEventSchema = runEventSchema.extend({
225
- type: z6.literal("worker-outcome"),
211
+ type: z5.literal("worker-outcome"),
226
212
  outcome: workerOutcomeSchema
227
213
  });
228
214
  var RUN_HISTORY_PAGE_ITEMS = 100;
229
- var runIdParamSchema = z6.object({
230
- id: z6.string().min(1).max(128).regex(/^[A-Za-z0-9._-]+$/)
215
+ var runIdParamSchema = z5.object({
216
+ id: z5.string().min(1).max(128).regex(/^[A-Za-z0-9._-]+$/)
231
217
  });
232
- var runHistoryCursorSchema = z6.string().min(1).max(2048);
233
- var runHistoryQuerySchema = z6.object({
218
+ var runHistoryCursorSchema = z5.string().min(1).max(2048);
219
+ var runHistoryQuerySchema = z5.object({
234
220
  cursor: runHistoryCursorSchema.optional()
235
221
  });
236
- var runEventsQuerySchema = z6.object({
222
+ var runEventsQuerySchema = z5.object({
237
223
  cursor: runHistoryCursorSchema.optional(),
238
- afterSeq: z6.coerce.number().int().nonnegative().optional()
239
- });
240
- var runHistoryEventSchema = z6.object({
241
- seq: z6.number(),
242
- ts: z6.string(),
243
- stepId: z6.string().optional(),
244
- type: z6.string()
245
- }).catchall(z6.any());
246
- var runHistoryPageSchema = z6.object({
247
- events: z6.array(runHistoryEventSchema),
248
- itemCount: z6.number().int().min(0).max(RUN_HISTORY_PAGE_ITEMS),
224
+ afterSeq: z5.coerce.number().int().nonnegative().optional()
225
+ });
226
+ var runHistoryEventSchema = z5.object({
227
+ seq: z5.number(),
228
+ ts: z5.string(),
229
+ stepId: z5.string().optional(),
230
+ type: z5.string()
231
+ }).catchall(z5.any());
232
+ var runHistoryPageSchema = z5.object({
233
+ events: z5.array(runHistoryEventSchema),
234
+ itemCount: z5.number().int().min(0).max(RUN_HISTORY_PAGE_ITEMS),
249
235
  olderCursor: runHistoryCursorSchema.optional(),
250
236
  newerCursor: runHistoryCursorSchema.optional(),
251
237
  liveCursor: runHistoryCursorSchema,
252
- asOfSeq: z6.number().int().nonnegative(),
253
- hasOlder: z6.boolean()
254
- });
255
- var runHistoryContextSchema = z6.object({
256
- contextEvents: z6.array(runHistoryEventSchema),
257
- asOfSeq: z6.number().int().nonnegative()
258
- });
259
- var checkoutProgressEventSchema = z6.object({
260
- checkoutId: z6.string().optional(),
261
- name: z6.string(),
262
- phase: z6.enum(["cloning", "done", "error"]),
263
- line: z6.string().optional(),
264
- error: z6.string().optional(),
238
+ asOfSeq: z5.number().int().nonnegative(),
239
+ hasOlder: z5.boolean()
240
+ });
241
+ var runHistoryContextSchema = z5.object({
242
+ contextEvents: z5.array(runHistoryEventSchema),
243
+ asOfSeq: z5.number().int().nonnegative()
244
+ });
245
+ var checkoutProgressEventSchema = z5.object({
246
+ checkoutId: z5.string().optional(),
247
+ name: z5.string(),
248
+ phase: z5.enum(["cloning", "done", "error"]),
249
+ line: z5.string().optional(),
250
+ error: z5.string().optional(),
265
251
  /** On `done` only: the project was created and registered, but a later step did not finish
266
252
  * (new-project flow, spec 2026-10-15-create-new-project). Names what exists and how to finish. */
267
- warning: z6.string().optional()
253
+ warning: z5.string().optional()
268
254
  });
269
255
 
270
256
  // ../contract/src/ask.ts
@@ -314,6 +300,18 @@ function askCardOf(ask) {
314
300
  // ../contract/src/delegation.ts
315
301
  import { z as z10 } from "zod";
316
302
 
303
+ // ../contract/src/effort.ts
304
+ import { z as z6 } from "zod";
305
+ var EFFORT_LEVELS = ["low", "medium", "high", "xhigh", "max"];
306
+ var effortLevelSchema = z6.enum(EFFORT_LEVELS);
307
+ var effortFieldSchema = z6.string().max(32).optional();
308
+ function parseEffort(value) {
309
+ const trimmed = value?.trim().toLowerCase();
310
+ if (!trimmed || trimmed === "auto") return void 0;
311
+ const parsed = effortLevelSchema.safeParse(trimmed);
312
+ return parsed.success ? parsed.data : void 0;
313
+ }
314
+
317
315
  // ../contract/src/run-status.ts
318
316
  import { z as z7 } from "zod";
319
317
  var runStatusSchema = z7.enum([
@@ -708,12 +706,6 @@ var workerWaitRequestSchema = z10.object({
708
706
  timeoutSeconds: z10.number().int().min(1).max(7200).default(600),
709
707
  mode: workerWaitModeSchema.optional()
710
708
  }).strict().refine((request) => request.mode !== "one" || request.workerIds.length === 1, { message: "one mode requires exactly one worker" });
711
- var workerHoldSchema = z10.object({
712
- reason: z10.enum(["usage-limit", "provider-error"]),
713
- resumeAt: z10.iso.datetime(),
714
- attempts: z10.number().int().min(0).optional(),
715
- error: z10.string().max(2e3).optional()
716
- }).strict();
717
709
  var workerInspectionSchema = z10.object({
718
710
  workerId: z10.uuid(),
719
711
  settled: z10.boolean(),
@@ -726,8 +718,6 @@ var workerInspectionSchema = z10.object({
726
718
  workspace: workerWorkspaceSchema,
727
719
  backend: workerBackendSchema.optional(),
728
720
  model: z10.string().max(512).optional(),
729
- effort: effortFieldSchema,
730
- hold: workerHoldSchema.optional(),
731
721
  inputs: z10.array(workerInputSchema).max(32).optional(),
732
722
  wait: workerWaitSchema.optional(),
733
723
  /** The parent's deadline-less completion wait on this worker (hearsay-tools/cezarion#1301). */
@@ -744,7 +734,6 @@ var workerListEntrySchema = workerInspectionSchema.pick({
744
734
  supervisorRunId: true,
745
735
  status: true,
746
736
  workspace: true,
747
- hold: true,
748
737
  destroy: true
749
738
  }).extend({
750
739
  revision: z10.number().int().nonnegative(),
@@ -1578,15 +1567,6 @@ var ciWaitReceiptSchema = ciPrIdentitySchema.extend({
1578
1567
  function isUsageLimitHold(run) {
1579
1568
  return run.status === "waiting" && run.autoResumeAt !== void 0;
1580
1569
  }
1581
- function usageLimitHoldOf(run) {
1582
- if (!isUsageLimitHold(run)) return void 0;
1583
- return {
1584
- reason: run.autoResumeReason ?? "usage-limit",
1585
- resumeAt: run.autoResumeAt,
1586
- ...run.autoResumeAttempts === void 0 ? {} : { attempts: run.autoResumeAttempts },
1587
- ...run.error === void 0 ? {} : { error: run.error.slice(0, 2e3) }
1588
- };
1589
- }
1590
1570
 
1591
1571
  // ../contract/src/wait-limits.ts
1592
1572
  var WAIT_LIMIT = 16;
@@ -4819,26 +4799,6 @@ function latestSession(run) {
4819
4799
  const step = removedRunnerStepAfter(run.steps, latest?.sessionId) ? void 0 : latest;
4820
4800
  return { sessionId: step?.sessionId, backend: sessionRunner(step, run), profileId: step?.profileId };
4821
4801
  }
4822
- function isAgentWorkflowStep(step) {
4823
- return step.command === void 0 && step.kind !== "plugin";
4824
- }
4825
- function workerContinuationStepId(run) {
4826
- const cursorId = run.workflowCursor?.mode === "resume" ? run.workflowCursor.stepId : void 0;
4827
- if (cursorId && run.steps.find((step) => step.id === cursorId)?.status === "failed") return cursorId;
4828
- const session = latestSessionStep(run.steps);
4829
- if (!session) return void 0;
4830
- if (session.synthetic === "continuation" && session.continuesStepId !== void 0) return session.continuesStepId;
4831
- return run.steps.find((step) => step.sessionId === session.sessionId)?.id ?? session.id;
4832
- }
4833
- function workerContinuationStep(run, untouched = false) {
4834
- if (run.delegation?.role !== "worker") return void 0;
4835
- const steps = run.workflowDef?.steps;
4836
- if (!steps?.length) return void 0;
4837
- if (untouched) return steps.find(isAgentWorkflowStep);
4838
- const targetId = workerContinuationStepId(run);
4839
- const targeted = targetId ? steps.find((step) => step.id === targetId && isAgentWorkflowStep(step)) : void 0;
4840
- return targeted ?? [...steps].reverse().find(isAgentWorkflowStep);
4841
- }
4842
4802
  var LIVE_STATUSES = /* @__PURE__ */ new Set(["queued", "running", "waiting"]);
4843
4803
  function isLiveStatus(status) {
4844
4804
  return LIVE_STATUSES.has(status);
@@ -6877,7 +6837,6 @@ export {
6877
6837
  updateProjectInputSchema,
6878
6838
  updateProjectResponseSchema,
6879
6839
  updateProjectWebhookInputSchema,
6880
- usageLimitHoldOf,
6881
6840
  userMcpListingSchema,
6882
6841
  utcMinute,
6883
6842
  waitErrorCodeSchema,
@@ -6901,7 +6860,6 @@ export {
6901
6860
  workerCompletionWaitSchema,
6902
6861
  workerContextReferenceSchema,
6903
6862
  workerContextSchema,
6904
- workerContinuationStep,
6905
6863
  workerCreationReceiptSchema,
6906
6864
  workerDestroyRequestSchema,
6907
6865
  workerDestroyResultSchema,
@@ -6911,7 +6869,6 @@ export {
6911
6869
  workerDestroyWorkSchema,
6912
6870
  workerDiffSchema,
6913
6871
  workerEmptyRequestSchema,
6914
- workerHoldSchema,
6915
6872
  workerIdsSchema,
6916
6873
  workerInputRecipeSchema,
6917
6874
  workerInputSchema,
@@ -32,15 +32,6 @@ export declare function latestSession(run: {
32
32
  backend: NonNullable<RunRecord['runner']>;
33
33
  profileId: string | undefined;
34
34
  };
35
- type WorkerContinuationRun = Partial<Pick<RunRecord, 'delegation' | 'workflowDef' | 'workflowCursor'>> & {
36
- steps: readonly Pick<StepState, 'id' | 'sessionId' | 'startedAt' | 'continuesStepId' | 'synthetic' | 'status'>[];
37
- };
38
- type WorkflowStepEntry = NonNullable<RunRecord['workflowDef']>['steps'][number];
39
- /**
40
- * The workflow agent step an owned worker's Continue extends: the first agent step when untouched,
41
- * else the resumed cursor step, else the step owning the latest session, else the last agent step.
42
- */
43
- export declare function workerContinuationStep(run: WorkerContinuationRun, untouched?: boolean): WorkflowStepEntry | undefined;
44
35
  /** Status-only live predicate: queued, running or waiting. */
45
36
  export declare function isLiveStatus(status: string): boolean;
46
37
  type OwnershipInput = Pick<RunRecord, 'status'> & Partial<Pick<RunRecord, 'autoResumeAt'>>;
@@ -13,10 +13,3 @@ import type { RunRecord } from './runs.ts';
13
13
  export declare function isUsageLimitHold<T extends Partial<Pick<RunRecord, 'status' | 'autoResumeAt'>>>(run: T): run is T & {
14
14
  autoResumeAt: string;
15
15
  };
16
- /** Structured hold details when a run is on a usage-limit or provider-error hold; undefined otherwise. */
17
- export declare function usageLimitHoldOf(run: Partial<Pick<RunRecord, 'status' | 'autoResumeAt' | 'autoResumeReason' | 'autoResumeAttempts' | 'error'>>): {
18
- reason: 'usage-limit' | 'provider-error';
19
- resumeAt: string;
20
- attempts?: number;
21
- error?: string;
22
- } | undefined;
@@ -1,10 +1,10 @@
1
1
  import { z } from 'zod';
2
2
  import type { PeerWaitView, WorkerCompletionWait, WorkerWait } from './delegation.ts';
3
3
  import type { RunRecord } from './runs.ts';
4
- import { isUsageLimitHold, usageLimitHoldOf } from './usage-limit-hold.ts';
4
+ import { isUsageLimitHold } from './usage-limit-hold.ts';
5
5
  import { WAIT_LIMIT, LAST_WAITS_LIMIT, TIMER_MIN_SECONDS, TIMER_MAX_SECONDS, PROCESS_TIMEOUT_DEFAULT_SECONDS, PROCESS_TIMEOUT_MAX_SECONDS, PROCESS_EXIT_FILE_MAX, PEER_WAIT_DEFAULT_SECONDS, PEER_WAIT_MAX_SECONDS, SUBAGENT_WAIT_DEADLINE_SECONDS, SUBAGENT_WAIT_GRACE_SECONDS, SUBAGENT_WAIT_CHILD_LIMIT, WAIT_MESSAGE_MAX, NOTE_MAX, PID_MIN } from './wait-limits.ts';
6
6
  export { withRootLedger, requestsToPeers, workerWaitTargets, computeWaitingOn, asksHuman, asksQuestion, hasResolvedWait, resolveWaitingOn, type WaitingOnInput, type WorkerWaitTarget, } from './waiting-on.ts';
7
- export { isUsageLimitHold, usageLimitHoldOf, WAIT_LIMIT, LAST_WAITS_LIMIT, TIMER_MIN_SECONDS, TIMER_MAX_SECONDS, PROCESS_TIMEOUT_DEFAULT_SECONDS, PROCESS_TIMEOUT_MAX_SECONDS, PROCESS_EXIT_FILE_MAX, PEER_WAIT_DEFAULT_SECONDS, PEER_WAIT_MAX_SECONDS, SUBAGENT_WAIT_DEADLINE_SECONDS, SUBAGENT_WAIT_GRACE_SECONDS, SUBAGENT_WAIT_CHILD_LIMIT, WAIT_MESSAGE_MAX, NOTE_MAX, PID_MIN, };
7
+ export { isUsageLimitHold, WAIT_LIMIT, LAST_WAITS_LIMIT, TIMER_MIN_SECONDS, TIMER_MAX_SECONDS, PROCESS_TIMEOUT_DEFAULT_SECONDS, PROCESS_TIMEOUT_MAX_SECONDS, PROCESS_EXIT_FILE_MAX, PEER_WAIT_DEFAULT_SECONDS, PEER_WAIT_MAX_SECONDS, SUBAGENT_WAIT_DEADLINE_SECONDS, SUBAGENT_WAIT_GRACE_SECONDS, SUBAGENT_WAIT_CHILD_LIMIT, WAIT_MESSAGE_MAX, NOTE_MAX, PID_MIN, };
8
8
  /** `open` → `resolved` (its event fired or its deadline passed) → `delivered`, or `cancelled`. */
9
9
  export declare const waitPhaseSchema: z.ZodEnum<{
10
10
  cancelled: "cancelled";