@sema-agent/core 7.72.0 → 7.73.0

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 (256) hide show
  1. package/CHANGELOG.md +319 -0
  2. package/dist/agents/inherited-tool-pool.d.ts +26 -1
  3. package/dist/agents/inherited-tool-pool.js +46 -2
  4. package/dist/agents/parked-resume-drive.d.ts +10 -0
  5. package/dist/agents/parked-resume-drive.js +9 -0
  6. package/dist/agents/retain-ledger.d.ts +3 -0
  7. package/dist/agents/send-message-tool.js +1 -0
  8. package/dist/agents/send-user-message-tool.d.ts +12 -0
  9. package/dist/agents/send-user-message-tool.js +67 -0
  10. package/dist/agents/subagent-steps.d.ts +9 -0
  11. package/dist/agents/subagent-steps.js +38 -0
  12. package/dist/agents/subagent.d.ts +2 -0
  13. package/dist/agents/subagent.js +43 -12
  14. package/dist/agents/verify.js +23 -8
  15. package/dist/agents/yield-adoption.js +3 -1
  16. package/dist/brain/anthropic.js +14 -9
  17. package/dist/brain/open-responses.js +4 -5
  18. package/dist/brain/openai.js +30 -23
  19. package/dist/brain/stream-engine.js +159 -151
  20. package/dist/core/actions-digest.d.ts +43 -0
  21. package/dist/core/actions-digest.js +22 -0
  22. package/dist/core/allow-entry.js +3 -3
  23. package/dist/core/auto-mode.d.ts +7 -9
  24. package/dist/core/auto-mode.js +114 -8
  25. package/dist/core/checkpoint-features.d.ts +3 -2
  26. package/dist/core/checkpoint-features.js +1 -1
  27. package/dist/core/checkpoint-rekey.d.ts +1 -1
  28. package/dist/core/checkpoint-rekey.js +6 -1
  29. package/dist/core/checkpoint-requirements.d.ts +23 -3
  30. package/dist/core/checkpoint-requirements.js +5 -1
  31. package/dist/core/checkpoint-row-verdict.js +7 -1
  32. package/dist/core/checkpoint-store.d.ts +24 -2
  33. package/dist/core/checkpoint-store.js +1 -0
  34. package/dist/core/child-clamp-seats.d.ts +15 -0
  35. package/dist/core/child-clamp-seats.js +15 -0
  36. package/dist/core/delegation-frames.d.ts +1 -0
  37. package/dist/core/delegation-frames.js +1 -1
  38. package/dist/core/engine-capabilities.d.ts +5 -1
  39. package/dist/core/engine-capabilities.js +1 -1
  40. package/dist/core/engine-notice.d.ts +30 -22
  41. package/dist/core/engine-version.js +1 -1
  42. package/dist/core/entries-not-applied.d.ts +19 -7
  43. package/dist/core/entries-not-applied.js +33 -1
  44. package/dist/core/governance-codes.d.ts +7 -1
  45. package/dist/core/governance-codes.js +13 -5
  46. package/dist/core/hooks.d.ts +3 -0
  47. package/dist/core/hooks.js +1 -0
  48. package/dist/core/host-instance.d.ts +23 -0
  49. package/dist/core/host-instance.js +69 -0
  50. package/dist/core/instruction-preview.d.ts +63 -0
  51. package/dist/core/instruction-preview.js +406 -0
  52. package/dist/core/leg-budget.d.ts +26 -0
  53. package/dist/core/leg-budget.js +9 -0
  54. package/dist/core/leg-identity.d.ts +51 -1
  55. package/dist/core/leg-identity.js +45 -2
  56. package/dist/core/manager-launch-check.d.ts +48 -0
  57. package/dist/core/manager-launch-check.js +64 -0
  58. package/dist/core/mcp-call-meta.d.ts +2 -2
  59. package/dist/core/mcp-injection-drop.d.ts +20 -10
  60. package/dist/core/mcp-injection-drop.js +9 -3
  61. package/dist/core/mcp-server-spec.d.ts +2 -1
  62. package/dist/core/member-outcome.d.ts +3 -2
  63. package/dist/core/member-outcome.js +1 -1
  64. package/dist/core/memory-engine/deletion-record.d.ts +46 -0
  65. package/dist/core/memory-engine/deletion-record.js +96 -0
  66. package/dist/core/memory-engine/engine.js +24 -16
  67. package/dist/core/memory-engine/file-backend.js +7 -5
  68. package/dist/core/memory-engine/projection-ledger.d.ts +1 -1
  69. package/dist/core/memory-engine/projection-ledger.js +1 -1
  70. package/dist/core/memory-engine/scope-contract.d.ts +18 -13
  71. package/dist/core/memory-engine/scope-contract.js +18 -18
  72. package/dist/core/memory-engine/sync-client.js +26 -6
  73. package/dist/core/memory-engine/sync.d.ts +20 -2
  74. package/dist/core/memory-engine/sync.js +18 -17
  75. package/dist/core/mode-policy.d.ts +21 -6
  76. package/dist/core/mode-policy.js +15 -6
  77. package/dist/core/own-property-receipt.js +11 -4
  78. package/dist/core/parent-spec-seat.d.ts +13 -11
  79. package/dist/core/parent-spec-seat.js +13 -9
  80. package/dist/core/peer-seat.js +3 -3
  81. package/dist/core/peer-task-store.d.ts +365 -0
  82. package/dist/core/peer-task-store.js +682 -0
  83. package/dist/core/permission-rule-consent.js +6 -11
  84. package/dist/core/permission-rule-model.d.ts +27 -0
  85. package/dist/core/permission-rule-model.js +33 -5
  86. package/dist/core/permission-rule-provider.d.ts +35 -33
  87. package/dist/core/permission-rule-provider.js +38 -295
  88. package/dist/core/permission-rule-store.d.ts +181 -8
  89. package/dist/core/permission-rule-store.js +420 -17
  90. package/dist/core/permission-rule-sync.js +15 -1
  91. package/dist/core/project-seat.d.ts +55 -0
  92. package/dist/core/project-seat.js +96 -0
  93. package/dist/core/protocol-http-auth.d.ts +3 -2
  94. package/dist/core/protocol-http-auth.js +26 -18
  95. package/dist/core/remote-env.d.ts +4 -4
  96. package/dist/core/retired-keys.js +1 -0
  97. package/dist/core/rule-offer-read.d.ts +1 -1
  98. package/dist/core/rule-offer-read.js +32 -4
  99. package/dist/core/run-ledger-seat.d.ts +66 -0
  100. package/dist/core/run-ledger-seat.js +70 -0
  101. package/dist/core/run-ledger.d.ts +332 -0
  102. package/dist/core/run-ledger.js +550 -0
  103. package/dist/core/runner/checkpoint-scope.d.ts +13 -3
  104. package/dist/core/runner/checkpoint-scope.js +12 -4
  105. package/dist/core/runner/construction-doors.js +6 -0
  106. package/dist/core/runner/contracts.d.ts +21 -5
  107. package/dist/core/runner/delegation-owner.d.ts +30 -0
  108. package/dist/core/runner/delegation-owner.js +20 -4
  109. package/dist/core/runner/finish-reason-seat.js +4 -2
  110. package/dist/core/runner/leg-frame.js +3 -0
  111. package/dist/core/runner/nested-memory-lane.d.ts +22 -5
  112. package/dist/core/runner/nested-memory-lane.js +91 -30
  113. package/dist/core/runner/person-path-rows.d.ts +21 -16
  114. package/dist/core/runner/person-path-rows.js +80 -15
  115. package/dist/core/runner/prepare-caps-and-workflow.js +98 -88
  116. package/dist/core/runner/prepare-config-doors.d.ts +1 -0
  117. package/dist/core/runner/prepare-config-doors.js +5 -3
  118. package/dist/core/runner/prepare-context-lane.js +1 -0
  119. package/dist/core/runner/prepare-delegation-surface.d.ts +3 -0
  120. package/dist/core/runner/prepare-delegation-surface.js +6 -0
  121. package/dist/core/runner/prepare-execution-env.d.ts +3 -3
  122. package/dist/core/runner/prepare-hands-readface.d.ts +5 -2
  123. package/dist/core/runner/prepare-hands-readface.js +12 -1
  124. package/dist/core/runner/prepare-inherited-gate.d.ts +6 -3
  125. package/dist/core/runner/prepare-inherited-gate.js +13 -5
  126. package/dist/core/runner/prepare-run-refs.d.ts +1 -1
  127. package/dist/core/runner/prepare-run-refs.js +3 -2
  128. package/dist/core/runner/prepare-suspend-saga.d.ts +6 -2
  129. package/dist/core/runner/prepare-suspend-saga.js +4 -2
  130. package/dist/core/runner/prepare-task.js +36 -27
  131. package/dist/core/runner/prepare-turn-wiring.d.ts +4 -3
  132. package/dist/core/runner/prepare-turn-wiring.js +2 -1
  133. package/dist/core/runner/prepare-wiring-manifest.d.ts +3 -1
  134. package/dist/core/runner/prepare-wiring-manifest.js +5 -2
  135. package/dist/core/runner/resume-apply.js +11 -5
  136. package/dist/core/runner/resume-review-outcome.d.ts +3 -0
  137. package/dist/core/runner/resume-review-outcome.js +24 -1
  138. package/dist/core/runner/run-harness-handlers.js +3 -0
  139. package/dist/core/runner/run-identity-wiring.js +3 -2
  140. package/dist/core/runner/run-leg.js +3 -0
  141. package/dist/core/runner/run-notification-lane.js +20 -1
  142. package/dist/core/runner/run-settle-and-teardown.js +21 -12
  143. package/dist/core/runner/run-stop-and-final-verify.js +6 -0
  144. package/dist/core/runner/run-telemetry-and-budget-seats.js +1 -1
  145. package/dist/core/runner/runtask.d.ts +6 -2
  146. package/dist/core/runner/runtask.js +21 -9
  147. package/dist/core/runner/shell-env-withheld.d.ts +3 -2
  148. package/dist/core/runner/shell-env-withheld.js +1 -2
  149. package/dist/core/runner/stop-tail-notice.d.ts +10 -2
  150. package/dist/core/runner/stop-tail-notice.js +9 -2
  151. package/dist/core/runner/stream-settle-backstop.d.ts +1 -0
  152. package/dist/core/runner/stream-settle-backstop.js +1 -0
  153. package/dist/core/runner/task-start-doors.js +6 -3
  154. package/dist/core/runner/terminal-account.d.ts +6 -1
  155. package/dist/core/runner/terminal-account.js +16 -1
  156. package/dist/core/runner/unreadable-person-rows.d.ts +2 -1
  157. package/dist/core/runner-deps.d.ts +13 -10
  158. package/dist/core/secret-env.d.ts +53 -37
  159. package/dist/core/secret-env.js +44 -47
  160. package/dist/core/session-checkout.d.ts +3 -0
  161. package/dist/core/session-checkout.js +1 -0
  162. package/dist/core/session-store.d.ts +12 -6
  163. package/dist/core/session-store.js +26 -6
  164. package/dist/core/session.d.ts +31 -8
  165. package/dist/core/store-contracts/checkpoint-store-contract.js +10 -0
  166. package/dist/core/store-contracts/peer-task-store-contract.d.ts +21 -0
  167. package/dist/core/store-contracts/peer-task-store-contract.js +516 -0
  168. package/dist/core/store-contracts/session-store-contract.d.ts +15 -2
  169. package/dist/core/store-contracts/session-store-contract.js +87 -3
  170. package/dist/core/store-contracts/workflow-journal-store-contract.d.ts +19 -1
  171. package/dist/core/store-contracts/workflow-journal-store-contract.js +89 -1
  172. package/dist/core/task-event.d.ts +10 -3
  173. package/dist/core/task-notification.d.ts +96 -10
  174. package/dist/core/task-notification.js +129 -5
  175. package/dist/core/task-registry-shared.d.ts +12 -1
  176. package/dist/core/task-registry-shared.js +3 -1
  177. package/dist/core/task-registry-workflow.d.ts +1 -1
  178. package/dist/core/task-registry-workflow.js +9 -1
  179. package/dist/core/task-registry.d.ts +39 -2
  180. package/dist/core/task-registry.js +76 -12
  181. package/dist/core/task-result.d.ts +13 -0
  182. package/dist/core/task-spec-members.d.ts +3 -1
  183. package/dist/core/task-spec-members.js +11 -3
  184. package/dist/core/task-spec.d.ts +48 -22
  185. package/dist/core/tool-catalog-entries.js +2 -0
  186. package/dist/core/tool-mount-facts.d.ts +1 -1
  187. package/dist/core/tool-mount-facts.js +1 -0
  188. package/dist/core/tool-mount-plan.d.ts +3 -1
  189. package/dist/core/tool-mount-plan.js +6 -0
  190. package/dist/core/tool-mount-static.d.ts +1 -1
  191. package/dist/core/tool-mount-static.js +4 -2
  192. package/dist/core/tool-result-store.d.ts +19 -2
  193. package/dist/core/tool-result-store.js +51 -2
  194. package/dist/core/tool-spec.d.ts +9 -2
  195. package/dist/core/user-attachment.d.ts +5 -1
  196. package/dist/core/user-attachment.js +14 -7
  197. package/dist/core/wiring-manifest.d.ts +26 -20
  198. package/dist/core/wiring-manifest.js +7 -3
  199. package/dist/core/workflow-journal-store.d.ts +53 -10
  200. package/dist/core/workflow-journal-store.js +27 -4
  201. package/dist/core/workflow-run-store-contract.js +16 -0
  202. package/dist/core/workflow-run-store.d.ts +9 -7
  203. package/dist/core/workflow-run-store.js +4 -1
  204. package/dist/engine/execution-env/node-execution-env.js +3 -1
  205. package/dist/engine/harness/types.d.ts +24 -1
  206. package/dist/engine/harness/types.js +10 -0
  207. package/dist/engine/llm/types.d.ts +5 -7
  208. package/dist/engine/lsp/node-lsp-manager.js +2 -1
  209. package/dist/engine/session/import-validate.js +6 -1
  210. package/dist/engine/session/session.d.ts +15 -2
  211. package/dist/engine/session/session.js +34 -4
  212. package/dist/index.d.ts +18 -7
  213. package/dist/index.js +13 -4
  214. package/dist/orchestration/run-workflow-tool.js +40 -32
  215. package/dist/orchestration/workflow-park-adoption.d.ts +51 -12
  216. package/dist/orchestration/workflow-park-adoption.js +47 -12
  217. package/dist/orchestration/workflow-stop.d.ts +128 -0
  218. package/dist/orchestration/workflow-stop.js +156 -0
  219. package/dist/orchestration/workflow.d.ts +30 -6
  220. package/dist/orchestration/workflow.js +117 -55
  221. package/dist/prompts/manager-recipe.d.ts +18 -0
  222. package/dist/prompts/manager-recipe.js +24 -0
  223. package/dist/stores/file/permission-rule-store.d.ts +3 -1
  224. package/dist/stores/file/permission-rule-store.js +0 -1
  225. package/dist/stores/file/workflow-journal-store.d.ts +16 -3
  226. package/dist/stores/file/workflow-journal-store.js +93 -5
  227. package/dist/stores/file/workflow-run-store.d.ts +1 -1
  228. package/dist/tools/fs/file-write-check.js +9 -3
  229. package/dist/tools/fs/index.d.ts +8 -7
  230. package/dist/tools/fs/index.js +4 -4
  231. package/dist/tools/fs/read-deny-home.d.ts +1 -1
  232. package/dist/tools/fs/read-deny-home.js +5 -5
  233. package/dist/tools/fs/read-deny.d.ts +33 -8
  234. package/dist/tools/fs/read-deny.js +114 -25
  235. package/dist/tools/fs/safety.d.ts +4 -1
  236. package/dist/tools/fs/safety.js +4 -2
  237. package/dist/tools/fs/shell-read-check.d.ts +9 -2
  238. package/dist/tools/fs/shell-read-check.js +96 -14
  239. package/dist/tools/fs/shell-read-establish.d.ts +9 -0
  240. package/dist/tools/fs/shell-read-establish.js +21 -11
  241. package/dist/tools/fs/shell-read-judge.d.ts +13 -1
  242. package/dist/tools/fs/shell-read-judge.js +26 -7
  243. package/dist/tools/fs/shell-read-plan.d.ts +5 -0
  244. package/dist/tools/fs/shell-read-write-targets.js +17 -9
  245. package/package.json +2 -2
  246. package/test/export-surface.snapshot.json +131 -1
  247. package/wire-changes/answers/core-stores-sql@7.73.0.json +28 -0
  248. package/wire-changes/answers/core@7.73.0.json +216 -0
  249. package/wire-changes/answers/mods-kernel@7.73.0.json +7 -0
  250. package/wire-changes/answers/primitives@7.73.0.json +12 -0
  251. package/wire-changes/answers/wiki-gate@7.73.0.json +7 -0
  252. package/wire-changes/core-stores-sql@7.73.0.json +326 -0
  253. package/wire-changes/core@7.73.0.json +6480 -0
  254. package/wire-changes/mods-kernel@7.73.0.json +147 -0
  255. package/wire-changes/primitives@7.73.0.json +227 -0
  256. package/wire-changes/wiki-gate@7.73.0.json +145 -0
package/dist/index.d.ts CHANGED
@@ -160,7 +160,7 @@ export { withRetry } from "./core/with-retry.js";
160
160
  export type { RetryPolicy, RetryResult } from "./core/with-retry.js";
161
161
  export type { RemoteExecutionEnv, WorkspaceHandle, SnapshotId, SessionToken, OutputChunk, ExecStreamOptions, RemoteConnectConfig, VmLifecycleOptions, SecretRef, RemoteExecutionErrorCode, ExecutionEnvFactory, ExecutionEnvFactoryContext, ExecutionEnvPurpose, PlacementTarget, RepositoryWorkspace, WorkspaceSyncReason, WorkspaceSyncOptions, WorkspaceSyncAnswer, } from "./core/remote-env.js";
162
162
  export { addWorktree, judgeManagedTree, pruneWorktrees, WORKTREE_PARENT, type AddWorktreeOptions, type ManagedTreeVerdict, type TreeKeptReason, } from "./core/git-worktree-env.js";
163
- export { listOrphanSessionTrees, probeWorktreeCapability, releaseOrphanSessionTree, releaseSessionCheckout, WORKTREE_INCAPABLE_REASONS, type OrphanSessionTree, type ReleasedTree, type WorkspaceDeclaration, type WorkspaceSourceDeclaration, type WorktreeCapability, type WorktreeIncapableReason, } from "./core/session-checkout.js";
163
+ export { listOrphanSessionTrees, probeWorktreeCapability, readSessionCheckout, releaseOrphanSessionTree, releaseSessionCheckout, WORKTREE_INCAPABLE_REASONS, type OrphanSessionTree, type ReleasedTree, type SessionCheckoutRead, type SessionCheckoutRecord, type WorkspaceDeclaration, type WorkspaceSourceDeclaration, type WorktreeCapability, type WorktreeIncapableReason, } from "./core/session-checkout.js";
164
164
  export { runExecGate } from "./core/exec-gate.js";
165
165
  export type { ExecStep, ExecStepResult, ExecGateResult, ExecGateOptions } from "./core/exec-gate.js";
166
166
  export { sanitizeUntrustedText, delimitUntrusted, inlineUntrusted, isMintableProbeReason } from "./core/untrusted-text.js";
@@ -244,7 +244,7 @@ export { DEFAULT_SUBAGENT_TOOL_NAME } from "./agents/subagent.js";
244
244
  export { renderTaskNotificationXml, RESUPPLIED_FRAME_PREAMBLE, taskNotificationDedupKey, isDelegatedAgentTerminal, isTerminalTaskNotification, TASK_NOTIFICATION_TERMINAL_STATUSES, // the terminal words that predicate reads, as a value: a host's own terminal check reads these, never a second list
245
245
  type TaskNotificationTerminalStatus, SystemInjectionQueue, type TaskNotificationPayload, type TaskNotificationStatus, type ExternalNotificationInput, type SystemInjection, type SystemInjectionPriority, type NotificationInjectionOutcome, // the injector's outcome words (`parked_durably` = the session's durable box took the frame)
246
246
  NOTIFICATION_INJECTION_OUTCOMES, // …and their value half + guard, so a host wiring its own uplink validates a reported outcome without duplicating the vocabulary
247
- isNotificationInjectionOutcome, SYSTEM_INJECTION_PRIORITIES, isSystemInjectionPriority, steerPriorityOf, injectionLaneOf, type UserInputLane, AGENT_MESSAGE_TAG, renderAgentMessageFrame, type SemaProvenance, HANDBACK_STATES, type HandbackState, COMPACTION_KINDS, type CompactionKind, DISCARDED_DELIVERY_PATHS, handbackStateOf, terminalFrameFacets, parksInSessionBox, } from "./core/task-notification.js";
247
+ isNotificationInjectionOutcome, SYSTEM_INJECTION_PRIORITIES, isSystemInjectionPriority, steerPriorityOf, injectionLaneOf, type UserInputLane, AGENT_MESSAGE_TAG, renderAgentMessageFrame, type SemaProvenance, HANDBACK_STATES, type HandbackState, COMPACTION_KINDS, type CompactionKind, DISCARDED_DELIVERY_PATHS, PEER_TASK_FOLLOW_UPS, PEER_TASK_CANCEL_STATES, PEER_TASK_CLOCK_STATES, PEER_TASK_REMINDER_TARGETS, PEER_TASK_REMINDER_DISPOSITIONS, PEER_TASK_REMINDER_ROUTES, type PeerTaskNotification, type PeerTaskReminderFacet, type PeerTaskFollowUps, type PeerTaskCancelState, type PeerTaskClockState, type PeerTaskReminderTarget, type PeerTaskReminderDisposition, type PeerTaskReminderRoute, handbackStateOf, terminalFrameFacets, parksInSessionBox, } from "./core/task-notification.js";
248
248
  export { TOOL_FAMILIES, TOOL_MOUNT_TAGS, TOOL_APPROVAL_CARDS, TOOL_PATH_ACCESSES, TOOL_PATH_BASES, TOOL_PATH_ABSENCES, TOOL_WIRE_NAME_MAX_CHARS, TOOL_CONTRACT_MAX_CHARS, TOOL_CARD_ID_MAX_CHARS, TOOL_KEY_MAX_CHARS, TOOL_KEYS_MAX, RENDER_HINT_MAX_CHARS, RENDER_HINT_ACTIVITY_MAX_CHARS, RENDER_HINT_MAX_LIST, type ToolFamily, type ToolMountTag, type ToolApprovalCard, type ToolPathAccess, type ToolPathBase, type ToolPathAbsence, type ToolPathTarget, type ToolCallPathTarget, type ToolRosterPathTarget, pathTargetSlotOnly, type ToolHostTarget, type ToolRuleFace, type ToolRenderHints, type ToolFaceDeclaration, type ToolCatalogEntry, } from "./core/tool-face.js";
249
249
  export { describeToolCatalog, catalogEntriesNamed, catalogToolNames, catalogRuleFaceOf, pathTargetOf, pathTargetValue, protectivePathTargetOf, declaredPathTargetOf, BARE_REQUEST_CODE, isProtectedWrite, isDeclaredWrite, fileOpAccessOf, type ToolCallLike, pathConfinableWriteToolNames, persistenceCapableToolNames, persistenceCandidateToolNames, rosterCanPersistMemory, type PersistenceProbeTool, type PersistenceFacts, pathTargetingToolNames, compactableToolNames, budgetExemptToolNames, handBandEffects, engineCardTypes, HANDS_BAND_TAGS, MOUNT_TAG_IN_HANDS_BAND, } from "./core/tool-registry.js";
250
250
  export { ToolRosterEntry, ToolRoster, ToolRosterDelta, ToolRosterRenderHints, ROSTER_SOURCES, type RosterSource, type ToolIdentity, toolIdentityOf, ROSTER_APPROVAL_BINDING, type RosterApprovalBinding, toolDeclarationDigestOf, mintCapabilityId, diffToolRoster, ruleFacesFromRoster, toolCallFaceOf, rosterToolName, ruleNamesOf, inputKeysOf, ruleFaceOfInstance, rosterMemberBoundProblem, TOOL_ROSTER_MAX_ENTRIES, type RosterBoundMembers, type RosterBoundCode, ToolRosterDeltaSeat, } from "./core/tool-roster.js";
@@ -271,7 +271,7 @@ export { approvalObjectOf, judgeApprovalObject, APPROVAL_STATION_MEMBERS, APPROV
271
271
  export { type ToolCallIdentity } from "./core/fs-write-gate-policy.js";
272
272
  export { type RuleFaceView, catalogRuleFaceView } from "./core/permission-rules.js";
273
273
  export { DURABLE_HISTORY_NAMES } from "./engine/compaction/utils.js";
274
- export { describeStaticWiring, deriveWiringManifest, deriveAskEffective, resolveDeclaredDurability, resolveSubagentTranscriptTier, type SubagentTranscriptTier, resolveAskSeamForm, resolveQuestionSeam, countElicitOptIns, AUTO_MODE_ARM_REASONS, type AutoModeArmReason, type AutoModeArmFact, type WiringManifest, type WiringManifestMcpEntry, type WiringManifestA2aEntry, LSP_LANES, type LspLane, HANDS_UNMOUNTED_REASONS, type HandsUnmountedReason, EXECUTION_ENV_SEATS, type ExecutionEnvSeat, DEPLOYMENT_ASK_SEAT_FORMS, type DeploymentAskSeatForm, type InteractionSeats, type WiringFacts, type WiringLegKind, ASK_SEAM_FORMS, type AskSeamForm, APPROVAL_REACH, type ApprovalReach, isApprovalReach, ASK_EFFECTIVE_VALUES, type AskEffective, type QuestionChannelState, type SeamProvenance, PARK_LANE_REASONS, type ParkLaneReason, SUSPEND_LANE_REASONS, type SuspendLaneReason, type ManifestDurability, type StaticWiringDeps, type StaticWiringSpec, } from "./core/wiring-manifest.js";
274
+ export { describeStaticWiring, deriveWiringManifest, deriveAskEffective, resolveDeclaredDurability, resolveSubagentTranscriptTier, type SubagentTranscriptTier, resolveAskSeamForm, resolveQuestionSeam, countElicitOptIns, AUTO_MODE_ARM_REASONS, type AutoModeArmReason, type AutoModeArmFact, type WiringManifest, type WiringManifestMcpEntry, type WiringManifestA2aEntry, LSP_LANES, type LspLane, HANDS_UNMOUNTED_REASONS, type HandsUnmountedReason, EXECUTION_ENV_SEATS, type ExecutionEnvSeat, DEPLOYMENT_ASK_SEAT_FORMS, type DeploymentAskSeatForm, type InteractionSeats, type WiringFacts, type WiringLegKind, type WiringLegInstance, type HostInstanceDeclaration, ASK_SEAM_FORMS, type AskSeamForm, APPROVAL_REACH, type ApprovalReach, isApprovalReach, ASK_EFFECTIVE_VALUES, type AskEffective, type QuestionChannelState, type SeamProvenance, PARK_LANE_REASONS, type ParkLaneReason, SUSPEND_LANE_REASONS, type SuspendLaneReason, type ManifestDurability, type StaticWiringDeps, type StaticWiringSpec, } from "./core/wiring-manifest.js";
275
275
  export { RUN_ORIGINS, type RunOrigin, isRunOrigin } from "./core/run-origin.js";
276
276
  export { INPUT_AUTHORS, type InputAuthor, isInputAuthor, type InputWindow } from "./core/input-author.js";
277
277
  export { USER_ROW_ORIGINS, type UserRowOrigin, type UserRowSource, isUserRowOrigin, userRowSourceOf } from "./core/user-row-origin.js";
@@ -283,7 +283,8 @@ export { projectHumanInput, buildHumanInputEvent, type HumanInputSource, type Hu
283
283
  export { USER_ATTACHMENT_SEAT, USER_ATTACHMENT_KINDS, USER_ATTACHMENT_SUPPLIES, USER_ATTACHMENT_OUTCOMES, USER_ATTACHMENTS_MAX, USER_ATTACHMENT_LABEL_MAX, USER_ATTACHMENT_INVALID_REASONS, type UserAttachmentInvalidReason, type UserAttachmentRefusalDetail, type UserAttachmentFieldRef, type UserAttachmentDeclaration, } from "./core/user-attachment.js";
284
284
  export { NESTED_MEMORY_LANE, INSTRUCTIONS_WITHHELD_REASONS, type InstructionsWithheldReason } from "./core/runner/nested-memory-lane.js";
285
285
  export type { HumanInputAttachment } from "./core/types.js";
286
- export { TaskRegistry, defaultTaskRegistry, createTaskStopTool, type SemaTaskType, SEMA_TASK_TYPES, SEMA_TASK_HANDLE_PREFIXES, type SemaTaskStatus, type SemaTaskHandle, type ParkedClaimTicket, type BackgroundYieldReport, type BackgroundYieldOptions, type BackgroundUnyieldableReason, type BackgroundYieldLane, PARKED_CLAIM_ROLLBACKS, type ParkedClaimRollback, type TaskAccess, type TaskListRow, type UnifiedTaskOutput, type TaskRetrievalStatus, type StopSource, type RegisterMonitorInput, type MonitorTimers, MONITOR_BATCH_WINDOW_MS, MONITOR_DEFAULT_TIMEOUT_MS, MONITOR_MAX_TIMEOUT_MS, MONITOR_MAX_BATCHES_PER_MINUTE, canAccessWorkflowRun, DURABLE_AGENT_HANDLE_RE, engineAgentName, chosenAgentName, type BackgroundShellHardKillReceipt, } from "./core/task-registry.js";
286
+ export { TaskRegistry, defaultTaskRegistry, createTaskStopTool, type SemaTaskType, SEMA_TASK_TYPES, SEMA_TASK_HANDLE_PREFIXES, PEER_TASK_HANDLE_RE, // strict peer_task handle shape (^p[0-9a-f]{16}$), derived from SEMA_TASK_HANDLE_PREFIXES
287
+ type SemaTaskStatus, type SemaTaskHandle, type ParkedClaimTicket, type BackgroundYieldReport, type BackgroundYieldOptions, type BackgroundUnyieldableReason, type BackgroundYieldLane, PARKED_CLAIM_ROLLBACKS, type ParkedClaimRollback, type TaskAccess, type TaskListRow, type UnifiedTaskOutput, type TaskRetrievalStatus, type StopSource, type RegisterMonitorInput, type MonitorTimers, MONITOR_BATCH_WINDOW_MS, MONITOR_DEFAULT_TIMEOUT_MS, MONITOR_MAX_TIMEOUT_MS, MONITOR_MAX_BATCHES_PER_MINUTE, canAccessWorkflowRun, DURABLE_AGENT_HANDLE_RE, engineAgentName, chosenAgentName, type BackgroundShellHardKillReceipt, } from "./core/task-registry.js";
287
288
  export { InMemoryMailboxStore, type MailboxStore, type MailboxMessage, type MailboxLease, MailboxStoreError, type MailboxStoreErrorCode, MAILBOX_TOMBSTONED_RECIPIENT_CODE, type MailboxAppendMessage, type MailboxPeerMeta, type MailboxPeerFromMode, type MailboxPeerRecordKind, type MailboxPeerNoticeMeta, type MailboxPeerNoticeState, MAILBOX_PEER_NOTICE_STATES, MAILBOX_PEER_FROM_MODES, MAILBOX_PEER_RECORD_KINDS, MAILBOX_INVALID_PEER_META_CODE, MAILBOX_CROSS_PROCESS_UNSAFE_CODE, readMailboxPeerMeta, mailboxCrossProcessMountVerdict, sessionBoxMountVerdict, type MailboxCrossProcessVerdict, mailboxRecipientLifecycleOf, type MailboxRecipientTombstone, MAILBOX_INVALID_RECORD_ID_CODE, MAILBOX_DUPLICATE_RECORD_ID_CODE, MAILBOX_RECORD_ID_MAX_CHARS, MAILBOX_REPLAY_FACETS, type MailboxReplayFacet, readMailboxRecordId, readMailboxAppend, judgeMailboxAppendById, MAILBOX_MESSAGE_ROW_SHAPE, MAILBOX_ROW_MALFORMED_CODE, mailboxReadablePrefix, type MailboxReadablePrefix, MAILBOX_CONSUMED_ID_WINDOW, type MailboxConsumedRecord, mailboxReplayDigests, type MailboxAckResult, type MailboxDecision, type MailboxDecisionOutcome, MAILBOX_DECISIONS, MAILBOX_INVALID_DECISION_MOVE_CODE, MAILBOX_INVALID_LEASE_OWNER_CODE, assertMailboxLeaseOwner, isMailboxDecision, isMailboxDecisionFinal, isMailboxDecisionDeliverable, mailboxDecisionEdgeAllowed, mailboxDecisionMoveFenced, assertMailboxDecisionMove, moveMailboxDecision, readStoredMailboxDecision, } from "./core/mailbox-store.js";
288
289
  export { FileMailboxStore, type FileMailboxStoreOptions } from "./stores/file/mailbox-store.js";
289
290
  export { createFileTaskListStore } from "./stores/file/task-list-store.js";
@@ -362,7 +363,7 @@ wildcardMatch, isCoveringRuleName, ruleNameCovers, type PermissionRule, type Par
362
363
  * and nothing more. Removal is exported without ceremony, because narrowing on a user's behalf is
363
364
  * allowed and widening is not.
364
365
  */
365
- export { RULE_BEHAVIORS, RULE_BEHAVIOR_PRECEDENCE, RULE_BEHAVIORS_BY_PRECEDENCE, isRuleBehavior, readRowBehavior, adjudicatePersistedRules, adjudicatePersistedPathRules, adjudicatePersistedToolRules, ruleReachesProgramRun, programRunReachOf, PROGRAM_RUN_REACHES, type ProgramRunReachOutcome, pathRuleReachOf, ruleBasesNeeded, PATH_RULE_BASES, PATH_RULE_BASE_LABEL, ruleToolGrammarOf, COMMAND_RULE_TOOL, READ_RULE_TOOL, type PathRuleBase, type PathRuleBases, type RuleBehavior, type PersistedRuleVerdict, parseRuleText, formatRuleText, ruleAdmitsCommand, findAdmittingRule, suggestRulesForCommand, scopeCoversCwd, pathWithinRoot, isRuleLive, renderUntrustedCommandText, stripFormatCharacters, UNCOVERED_SEGMENT_REASON_BASELINE, RULE_OFFERS_ABSENCE_BASELINE, type UncoveredSegmentDetail, PERSISTED_RULE_MATCHES, RULE_OFFER_KINDS, RULE_OFFER_BATCH_MEMBER_KINDS, UNCOVERED_SEGMENT_REASONS, EDITED_RULE_BREADTH_WARNING_CODES, RULE_ADD_ORIGINS, type EditedRuleBreadthWarning, directoryRuleAdmits, BARE_INTERPRETER_NAMES, MAX_RULE_TEXT_CHARS, type PersistedRule, type RuleTombstone, type RuleScope, type RuleDot, type RuleAdd, type RuleAddOrigin, type RuleOffer, type RuleOfferBatchMember, type SegmentRuleSuggestion, type SegmentCoverage, type RuleReject, type RuleRejectCode, type ParsedRule, type PersistedRuleTool, type PersistedRuleMatch, } from "./core/permission-rule-model.js";
366
+ export { RULE_BEHAVIORS, RULE_BEHAVIOR_PRECEDENCE, RULE_BEHAVIORS_BY_PRECEDENCE, isRuleBehavior, readRowBehavior, adjudicatePersistedRules, adjudicatePersistedPathRules, adjudicatePersistedToolRules, ruleReachesProgramRun, programRunReachOf, PROGRAM_RUN_REACHES, type ProgramRunReachOutcome, pathRuleReachOf, ruleBasesNeeded, PATH_RULE_BASES, PATH_RULE_BASE_LABEL, ruleToolGrammarOf, COMMAND_RULE_TOOL, READ_RULE_TOOL, type PathRuleBase, type PathRuleBases, type RuleBehavior, type PersistedRuleVerdict, parseRuleText, formatRuleText, ruleAdmitsCommand, findAdmittingRule, suggestRulesForCommand, scopeCoversCwd, pathWithinRoot, isRuleLive, renderUntrustedCommandText, stripFormatCharacters, UNCOVERED_SEGMENT_REASON_BASELINE, RULE_OFFERS_ABSENCE_BASELINE, type UncoveredSegmentDetail, PERSISTED_RULE_MATCHES, RULE_OFFER_KINDS, RULE_OFFER_BATCH_MEMBER_KINDS, UNCOVERED_SEGMENT_REASONS, EDITED_RULE_BREADTH_WARNING_CODES, RULE_ADD_ORIGINS, type EditedRuleBreadthWarning, directoryRuleAdmits, BARE_INTERPRETER_NAMES, MAX_RULE_TEXT_CHARS, type PersistedRule, type RuleTombstone, type RuleScope, type RuleDot, type RuleAdd, type RuleAddOrigin, type RuleOffer, type RuleOfferBatchMember, type SegmentRuleSuggestion, RULE_OFFER_CAUTIONS, type RuleOfferCaution, type SegmentCoverage, type RuleReject, type RuleRejectCode, type ParsedRule, type PersistedRuleTool, type PersistedRuleMatch, } from "./core/permission-rule-model.js";
366
367
  export { removePersistedRule, addPersistedRule, applyTombstones, sameScope, sameRuleIdentity, isValidConsentScope, isValidDurableScope, InMemoryDurableRulePartition, EMPTY_DURABLE_RULE_PARTITION, type DurableRulePartition, type DurableRulePartitionProvider, type RuleWriteOutcome, type StoredRules, type RemoveResult, type AddResult, type PutResult, joinRuleStates, applySyncJoin, type RuleSyncJoinBase, screenRuleSyncState, collectBelowFrontier, ruleSyncVector, joinFrontiers, dotAtOrBelowFrontier, type RuleSyncState, type RuleSyncFrontier, type RuleSyncDrop, type RuleSyncLandingReport, type QuarantinedRuleAdd, PERMISSION_RULE_WRITER, writerOf, foldDelta, addDotsOf, assertDeleteDeltaCarriesNoAdd, assertRedemptionNotQuarantined, assertWriteDeltaScopeDurable, PERMISSION_RULES_LATER_GRAMMAR_CODE, PERMISSION_RULES_DAMAGED_BUCKET_CODE, PERMISSION_RULES_UNREADABLE_BUCKET_CODE, type PermissionRuleWriter, type WritableDurableRulePartition, type RuleWriteDelta, type RuleAddDelta, type RuleTightenAddDelta, type RuleDeleteDelta, type RuleSyncJoinDelta, type RawRuleSyncState, type RedemptionAuthorization, } from "./core/permission-rule-store.js";
367
368
  export { readRuleOwner, sameRuleOwner, type RuleOwner, RULE_OWNER_KINDS, } from "./core/rule-owner.js";
368
369
  export { judgePrincipalName, principalNameOf, whiteSpaceAtEdgesOf, PRINCIPAL_NAME_MAX_CHARS, PRINCIPAL_NAME_MAX_BYTES, PRINCIPAL_NAME_REFUSALS, type PrincipalNameRefusal, type PrincipalNameVerdict, } from "./core/principal-name.js";
@@ -406,6 +407,8 @@ export { resolveMemoryScopeStore, type MemoryScopeStore, type MemoryScopeStoreIn
406
407
  export { classifyScopePlanes, memoryScopePlaneOf, scopePlanesOf, type ScopePlanes } from "./core/memory-engine/dual-root.js";
407
408
  export { createMemoryDeployment, type MemoryDeployment, type MemoryDeploymentInput, type MemoryDeploymentStore, type DeploymentSessionMemoryStatus, } from "./core/memory-engine/memory-deployment.js";
408
409
  export { reanchorMemoryStoreRoot, type StoreRootReanchor } from "./core/memory-engine/layout.js";
410
+ export { deletionRecordOf, memoryDeletionRecords, type DeletionRecord } from "./core/memory-engine/deletion-record.js";
411
+ export type { MemorySyncDeletions } from "./core/memory-engine/sync.js";
409
412
  export { admittingLandings, cutPerLanding, LandingsNeedAdmission, MAX_LANDING_ADMISSION_ROUNDS, requireLandingsAdmitted, type AdmitLandings, type LandingCut, type PatchLanding, type PatchShare, } from "./core/memory-engine/landing-admission.js";
410
413
  export { NON_GOVERNANCE_MEMORY_CODES } from "./core/governance-codes.js";
411
414
  export { SHARED_MEMORY_READ_CAP_BYTES, SHARED_MEMORY_LIST_PAGE_SIZE, SharedMemoryStoreError, type SharedMemoryStoreProvider, type SharedMemoryStoreReader, type SharedMemoryPagedList, type SharedMemoryStoreInfo, type SharedMemoryDocumentEntry, type SharedMemorySnapshot, type SharedMemoryRequestContext, type MemoryListDetails, type MemoryReadDetails, } from "./core/shared-memory/types.js";
@@ -470,6 +473,7 @@ export { workflowTreeIdStampOf, type WorkflowTreeIdStamp } from "./orchestration
470
473
  export { readWorkflowRunTree, workflowRunTreeOfOne, type WorkflowRunTree } from "./orchestration/workflow-park-adoption.js";
471
474
  export { workflowParkHolderOf, type WorkflowParkHolder } from "./orchestration/workflow-types.js";
472
475
  export { WORKFLOW_AGENT_STOP_ANSWERS, type WorkflowAgentStopAnswer, type WorkflowAgentStopReceipt } from "./orchestration/workflow-types.js";
476
+ export { WORKFLOW_RUN_STOP_ANSWERS, type WorkflowRunStopAnswer, type WorkflowRunStopReceipt } from "./orchestration/workflow-stop.js";
473
477
  export { type WorkflowParkWait, type WorkflowParkCardState } from "./orchestration/workflow-types.js";
474
478
  export { workflowParkWaitOf, readWorkflowParkWaits, type WorkflowParkWaitSeats } from "./orchestration/workflow-park-adoption.js";
475
479
  export { WORKFLOW_PARK_UNUSED_REASONS, type WorkflowParkUnusedReason } from "./orchestration/workflow-park-adoption.js";
@@ -485,7 +489,7 @@ export { checkpointStoreContract } from "./core/store-contracts/checkpoint-store
485
489
  export { sessionRepoContract } from "./core/store-contracts/session-repo-contract.js";
486
490
  export { toolResultStoreContract } from "./core/store-contracts/tool-result-store-contract.js";
487
491
  export { fileHistoryStoreContract } from "./core/store-contracts/file-history-store-contract.js";
488
- export { workflowJournalStoreContract } from "./core/store-contracts/workflow-journal-store-contract.js";
492
+ export { workflowJournalStoreContract, type WorkflowJournalStoreContractHooks } from "./core/store-contracts/workflow-journal-store-contract.js";
489
493
  export { sessionPolicyStoreContract } from "./core/store-contracts/session-policy-store-contract.js";
490
494
  export { sessionDeletionCascadeContract } from "./core/store-contracts/session-deletion-cascade-contract.js";
491
495
  export { permissionRuleSyncContract, type PermissionRuleSyncContractHooks } from "./core/store-contracts/permission-rule-sync-contract.js";
@@ -503,7 +507,7 @@ export { REMOVAL_LIVENESS_WORDS, type RemovalLiveness, RULE_REFUSAL_CODES, type
503
507
  export { normalizeReadRootCandidate, READ_ROOT_CANDIDATE_DIR_MAX } from "./core/read-root-candidate.js";
504
508
  export { FileBackgroundAgentStore, type FileBackgroundAgentStoreOptions } from "./stores/file/background-agent-store.js";
505
509
  export { A2A_TASK_STATES, type A2ATaskState, A2A_SEMA_EXTENSIONS, A2A_SEMA_REFUSAL_CODES, type A2ARefusalClass, A2A_SEMA_SKILL_ID_KEY, A2A_SEMA_WAITING_ON_KEY, A2A_WAITING_ON_KINDS, type A2AWaitingOnKind, type A2AWaitingOn, A2A_STATE_CLASSES, type A2AStateClass, A2A_WAITING_FOR, type A2AWaitingFor, type A2AStateClassRow, A2A_STATE_TABLE, type A2AWireStatus, a2aWireStatusOf, a2aStateClassOfRecord, type A2APeerStateReading, readA2APeerState, } from "./core/a2a-task-state.js";
506
- export { type WorkflowJournalStore, type WorkflowJournalEntry, InMemoryWorkflowJournalStore, callKeyOrdinal, JOURNAL_OVERSIZE_ERROR_CODE, WorkflowJournalOversizeError, assertJournalEntryFits, readWorkflowJournalEntry, type WorkflowJournalEntryReading, WorkflowJournalIncompatibleError, JOURNAL_INCOMPATIBLE_ERROR_CODE, type WorkflowLaunchRecord, type WorkflowLaunchFace, readWorkflowLaunchRecord, launchRecordToKeepOrThrow, assertLaunchRecordFits, sameLaunchRecord, WorkflowLaunchConflictError, WORKFLOW_LAUNCH_CONFLICT_CODE, WorkflowLaunchUnreadableError, WORKFLOW_LAUNCH_UNREADABLE_CODE, } from "./core/workflow-journal-store.js";
510
+ export { type WorkflowJournalStore, type WorkflowJournalEntry, type StopResumeClaimArgs, type StopResumeClaimAnswer, InMemoryWorkflowJournalStore, callKeyOrdinal, JOURNAL_OVERSIZE_ERROR_CODE, WorkflowJournalOversizeError, assertJournalEntryFits, readWorkflowJournalEntry, type WorkflowJournalEntryReading, WorkflowJournalIncompatibleError, JOURNAL_INCOMPATIBLE_ERROR_CODE, type WorkflowLaunchRecord, type WorkflowLaunchFace, readWorkflowLaunchRecord, launchRecordToKeepOrThrow, assertLaunchRecordFits, sameLaunchRecord, WorkflowLaunchConflictError, WORKFLOW_LAUNCH_CONFLICT_CODE, WorkflowLaunchUnreadableError, WORKFLOW_LAUNCH_UNREADABLE_CODE, } from "./core/workflow-journal-store.js";
507
511
  export { untrustedEgressForHuman, redactHostLeaks, redactSecrets, boundedRedactedSummary } from "./core/untrusted-egress.js";
508
512
  export { REDACTION_MARKS, isRedactionMark, eachRedactionMarkerSpan, redactionMarkerSpans, type RedactionMark, type RedactionMarkName, } from "@sema-agent/primitives";
509
513
  export type { Egress, EgressTier } from "./core/untrusted-egress.js";
@@ -578,6 +582,11 @@ export type { AssistantMessage, AssistantMessageEvent, CompleteSimpleFn, Context
578
582
  export type { AgentDefinition, BeforeWriteHook, BeforeWriteRequest, BeforeWriteResult, TrackFileEditHook, TrackEditRequest, TrackEditResult, FileEditedHook, FileEditedNotice, HandsBandOptions, Brain, RouteJudgmentDispatch, BrainStatus, BrainStatusPhase, BrainRetryErrClass, ImageInput, UserAttachment, McpElicitRequest, McpElicitResponse, McpServerSpec, A2aServerSpec, OnElicit, Model, ModelRef, RunnerDeps, ResumePreflightInfo, ResumePreflightVerdict, EngineNotice, RuntimeCaps, BackgroundChildEvent, ContinuationEndedBy, DelegationLifecycleEvent, SkillSpec, TaskEvent, ExtensionRequester, RewriteAuthor, ToolInputRewrite, TaskEventIdentity, ToolActivity, TaskLimits, StaleToolResultOffloadOptions, TaskResult, TerminalCause, PausedCause, EffectiveMemoryScopes, RemoteEnvFailureNote, RefusedAsk, VerdictRefusal, RefusedToolCall, RefusedToolCalls, TaskSpec, DurableApprovalOptIn, InstructionFamilyDeclaration, ShellGateDoctrine, TaskStatus, TaskStream, CompactOutcome, ThinkingLevel, ToolExecuteContext, ToolReturn, ToolSpec, ToolInputVerdict, ToolInputValidationContext, ReversibilityVerdict, ReadRootGrantCandidate, ToolEffect, ToolContentOrigin, WorkflowGovernanceBaseline, DelegationTaskType, } from "./core/types.js";
579
583
  export { CONTINUATION_ENDED_BY } from "./core/delegation-frames.js";
580
584
  export { MEMBER_OUTCOMES, MEMBER_KINDS, MEMBER_COVERAGES, RUN_END_CAUSES, REFUSALS_LISTED, isMemberOutcomeWord, isRunEndCause, isMemberOutcome, isMemberCoverage, memberOutcomeOf, memberRefusalsOf, memberCoverageOf, memberLedgerOf, memberOutcomeText, memberRefusalsText, type MemberOutcome, type MemberOutcomeWord, type MemberKind, type MemberCoverage, type RunEndCause, type MemberRefusals, type MemberFacts, type MemberLedger, type MemberLedgerRow, type Listed, } from "./core/member-outcome.js";
585
+ export { RUN_LEDGER_VERSION, RUN_LEDGER_WIRE_KEY, RUN_LEDGER_CHECKS, runLedgerHeadline, type RunLedger, type RunLedgerRow, type RunLedgerCheck, type RunLedgerClaim, type RunLedgerReport, type RunLedgerVerdict, type RunLedgerTrigger, } from "./core/run-ledger.js";
586
+ export { subagentActionsLine, type SubagentActions } from "./core/actions-digest.js";
587
+ export { MANAGER_LAUNCH_ITEMS, managerLaunchCheck, managerLaunchCheckSentence, type ManagerLaunchCheck, type ManagerLaunchFacts, type ManagerLaunchItem, type ManagerLaunchState } from "./core/manager-launch-check.js";
588
+ export { MANAGER_RECIPE, MANAGER_DUTIES_ADDENDUM, managerWorkerDefinition } from "./prompts/manager-recipe.js";
589
+ export { SEND_USER_MESSAGE_TOOL_NAME } from "./agents/send-user-message-tool.js";
581
590
  export { agentOutcomeOf } from "./core/background-agent-store.js";
582
591
  export { Type } from "typebox";
583
592
  export type { TSchema, Static } from "typebox";
@@ -620,3 +629,5 @@ export { sessionLogMarkOf } from "./engine/session/storage-base.js";
620
629
  export { readRowExpectationMember } from "./core/runner/session-verb-doors.js";
621
630
  export { delegationOwnerSeat, type DelegationOwnerSeat, type DelegationOwnerReading } from "./core/runner/delegation-owner.js";
622
631
  export { CHECKPOINT_LIST_LIMITS, readCheckpointOverdueQuery, readCheckpointSessionQuery, readCheckpointDeleteGuard, checkpointDeadlinePassed, checkpointOverdueAt, checkpointRunSessionOf, storedCheckpointRowRefusal, checkpointRowUnreadable, isCheckpointRowUnreadable, deleteGuardAdmits, selectOverduePage, selectSessionPage, type CheckpointFacet, type CheckpointPage, type CheckpointOverdueQuery, type CheckpointOverdueCursor, type CheckpointOverdueQueryReading, type CheckpointSessionQuery, type CheckpointSessionCursor, type CheckpointSessionQueryReading, type CheckpointRowRead, type CheckpointDeleteGuard, } from "./core/checkpoint-queries.js";
632
+ export { EXTERNAL_INCLUDE_POST_APPROVAL_BLOCKS, type ExternalIncludePostApprovalBlock, type InstructionIncludedEntry, type InstructionWithheldEntry, type WiringInstructions, type InstructionPreviewResult, } from "./core/instruction-preview.js";
633
+ export { screenProjectSeat, type ProjectSeat, type ProjectSeatScreen } from "./core/project-seat.js";
package/dist/index.js CHANGED
@@ -129,7 +129,7 @@ export { confineShellStart } from "./core/shell-confinement.js";
129
129
  export { RemoteExecutionError, hasDestroy, isRemoteExecutionEnv, isSuspendable, isIsolated, canonicalPathIsAuthoritative, pathsAreHostLocal, keepsReadFloor, providesCommandSandbox, missingRestoreSurface, isRetryableRemoteErrorCode, RETRYABLE_REMOTE_ERROR_CODES, EXECUTION_ENV_PURPOSES, ENV_PURPOSE_UNSUPPORTED, WORKSPACE_SYNC_REASONS, hasWorkspaceSync, } from "./core/remote-env.js";
130
130
  export { withRetry } from "./core/with-retry.js";
131
131
  export { addWorktree, judgeManagedTree, pruneWorktrees, WORKTREE_PARENT, } from "./core/git-worktree-env.js";
132
- export { listOrphanSessionTrees, probeWorktreeCapability, releaseOrphanSessionTree, releaseSessionCheckout, WORKTREE_INCAPABLE_REASONS, } from "./core/session-checkout.js";
132
+ export { listOrphanSessionTrees, probeWorktreeCapability, readSessionCheckout, releaseOrphanSessionTree, releaseSessionCheckout, WORKTREE_INCAPABLE_REASONS, } from "./core/session-checkout.js";
133
133
  export { runExecGate } from "./core/exec-gate.js";
134
134
  export { sanitizeUntrustedText, delimitUntrusted, inlineUntrusted, isMintableProbeReason } from "./core/untrusted-text.js";
135
135
  export { callerKey, callerText } from "./core/caller-text.js";
@@ -190,7 +190,7 @@ export { judgePolicyEntryName } from "./core/tool-name-aliases.js";
190
190
  export { retiredNameView } from "./core/tool-name-aliases.js";
191
191
  export { retiredToolNameAccount } from "./core/retired-host-table-account.js";
192
192
  export { DEFAULT_SUBAGENT_TOOL_NAME } from "./agents/subagent.js";
193
- export { renderTaskNotificationXml, RESUPPLIED_FRAME_PREAMBLE, taskNotificationDedupKey, isDelegatedAgentTerminal, isTerminalTaskNotification, TASK_NOTIFICATION_TERMINAL_STATUSES, SystemInjectionQueue, NOTIFICATION_INJECTION_OUTCOMES, isNotificationInjectionOutcome, SYSTEM_INJECTION_PRIORITIES, isSystemInjectionPriority, steerPriorityOf, injectionLaneOf, AGENT_MESSAGE_TAG, renderAgentMessageFrame, HANDBACK_STATES, COMPACTION_KINDS, DISCARDED_DELIVERY_PATHS, handbackStateOf, terminalFrameFacets, parksInSessionBox, } from "./core/task-notification.js";
193
+ export { renderTaskNotificationXml, RESUPPLIED_FRAME_PREAMBLE, taskNotificationDedupKey, isDelegatedAgentTerminal, isTerminalTaskNotification, TASK_NOTIFICATION_TERMINAL_STATUSES, SystemInjectionQueue, NOTIFICATION_INJECTION_OUTCOMES, isNotificationInjectionOutcome, SYSTEM_INJECTION_PRIORITIES, isSystemInjectionPriority, steerPriorityOf, injectionLaneOf, AGENT_MESSAGE_TAG, renderAgentMessageFrame, HANDBACK_STATES, COMPACTION_KINDS, DISCARDED_DELIVERY_PATHS, PEER_TASK_FOLLOW_UPS, PEER_TASK_CANCEL_STATES, PEER_TASK_CLOCK_STATES, PEER_TASK_REMINDER_TARGETS, PEER_TASK_REMINDER_DISPOSITIONS, PEER_TASK_REMINDER_ROUTES, handbackStateOf, terminalFrameFacets, parksInSessionBox, } from "./core/task-notification.js";
194
194
  export { TOOL_FAMILIES, TOOL_MOUNT_TAGS, TOOL_APPROVAL_CARDS, TOOL_PATH_ACCESSES, TOOL_PATH_BASES, TOOL_PATH_ABSENCES, TOOL_WIRE_NAME_MAX_CHARS, TOOL_CONTRACT_MAX_CHARS, TOOL_CARD_ID_MAX_CHARS, TOOL_KEY_MAX_CHARS, TOOL_KEYS_MAX, RENDER_HINT_MAX_CHARS, RENDER_HINT_ACTIVITY_MAX_CHARS, RENDER_HINT_MAX_LIST, pathTargetSlotOnly, } from "./core/tool-face.js";
195
195
  export { describeToolCatalog, catalogEntriesNamed, catalogToolNames, catalogRuleFaceOf, pathTargetOf, pathTargetValue, protectivePathTargetOf, declaredPathTargetOf, BARE_REQUEST_CODE, isProtectedWrite, isDeclaredWrite, fileOpAccessOf, pathConfinableWriteToolNames, persistenceCapableToolNames, persistenceCandidateToolNames, rosterCanPersistMemory, pathTargetingToolNames, compactableToolNames, budgetExemptToolNames, handBandEffects, engineCardTypes, HANDS_BAND_TAGS, MOUNT_TAG_IN_HANDS_BAND, } from "./core/tool-registry.js";
196
196
  export { ToolRosterEntry, ToolRoster, ToolRosterDelta, ToolRosterRenderHints, ROSTER_SOURCES, toolIdentityOf, ROSTER_APPROVAL_BINDING, toolDeclarationDigestOf, mintCapabilityId, diffToolRoster, ruleFacesFromRoster, toolCallFaceOf, rosterToolName, ruleNamesOf, inputKeysOf, ruleFaceOfInstance, rosterMemberBoundProblem, TOOL_ROSTER_MAX_ENTRIES, ToolRosterDeltaSeat, } from "./core/tool-roster.js";
@@ -226,7 +226,7 @@ export { resolveDeclaredFidelity } from "./core/checkpoint-store.js";
226
226
  export { projectHumanInput, buildHumanInputEvent, } from "./core/human-input-projection.js";
227
227
  export { USER_ATTACHMENT_SEAT, USER_ATTACHMENT_KINDS, USER_ATTACHMENT_SUPPLIES, USER_ATTACHMENT_OUTCOMES, USER_ATTACHMENTS_MAX, USER_ATTACHMENT_LABEL_MAX, USER_ATTACHMENT_INVALID_REASONS, } from "./core/user-attachment.js";
228
228
  export { NESTED_MEMORY_LANE, INSTRUCTIONS_WITHHELD_REASONS } from "./core/runner/nested-memory-lane.js";
229
- export { TaskRegistry, defaultTaskRegistry, createTaskStopTool, SEMA_TASK_TYPES, SEMA_TASK_HANDLE_PREFIXES, PARKED_CLAIM_ROLLBACKS, MONITOR_BATCH_WINDOW_MS, MONITOR_DEFAULT_TIMEOUT_MS, MONITOR_MAX_TIMEOUT_MS, MONITOR_MAX_BATCHES_PER_MINUTE, canAccessWorkflowRun, DURABLE_AGENT_HANDLE_RE, engineAgentName, chosenAgentName, } from "./core/task-registry.js";
229
+ export { TaskRegistry, defaultTaskRegistry, createTaskStopTool, SEMA_TASK_TYPES, SEMA_TASK_HANDLE_PREFIXES, PEER_TASK_HANDLE_RE, PARKED_CLAIM_ROLLBACKS, MONITOR_BATCH_WINDOW_MS, MONITOR_DEFAULT_TIMEOUT_MS, MONITOR_MAX_TIMEOUT_MS, MONITOR_MAX_BATCHES_PER_MINUTE, canAccessWorkflowRun, DURABLE_AGENT_HANDLE_RE, engineAgentName, chosenAgentName, } from "./core/task-registry.js";
230
230
  export { InMemoryMailboxStore, MailboxStoreError, MAILBOX_TOMBSTONED_RECIPIENT_CODE, MAILBOX_PEER_NOTICE_STATES, MAILBOX_PEER_FROM_MODES, MAILBOX_PEER_RECORD_KINDS, MAILBOX_INVALID_PEER_META_CODE, MAILBOX_CROSS_PROCESS_UNSAFE_CODE, readMailboxPeerMeta, mailboxCrossProcessMountVerdict, sessionBoxMountVerdict, mailboxRecipientLifecycleOf, MAILBOX_INVALID_RECORD_ID_CODE, MAILBOX_DUPLICATE_RECORD_ID_CODE, MAILBOX_RECORD_ID_MAX_CHARS, MAILBOX_REPLAY_FACETS, readMailboxRecordId, readMailboxAppend, judgeMailboxAppendById, MAILBOX_MESSAGE_ROW_SHAPE, MAILBOX_ROW_MALFORMED_CODE, mailboxReadablePrefix, MAILBOX_CONSUMED_ID_WINDOW, mailboxReplayDigests, MAILBOX_DECISIONS, MAILBOX_INVALID_DECISION_MOVE_CODE, MAILBOX_INVALID_LEASE_OWNER_CODE, assertMailboxLeaseOwner, isMailboxDecision, isMailboxDecisionFinal, isMailboxDecisionDeliverable, mailboxDecisionEdgeAllowed, mailboxDecisionMoveFenced, assertMailboxDecisionMove, moveMailboxDecision, readStoredMailboxDecision, } from "./core/mailbox-store.js";
231
231
  export { FileMailboxStore } from "./stores/file/mailbox-store.js";
232
232
  export { createFileTaskListStore } from "./stores/file/task-list-store.js";
@@ -275,7 +275,7 @@ export { AUTO_MODE_BASE_PROMPT, AUTO_MODE_PERMISSIONS_EXTERNAL } from "./core/au
275
275
  export { AUTO_MODE_ARMING_RECIPE_VERSION, autoModeArmingRecipeOf, sanitizeAutoModeArmingRecipe, foldAutoModeArming, } from "./core/auto-mode-arming.js";
276
276
  export { rebuildAutoModeDecider, } from "./core/auto-mode-rebuild.js";
277
277
  export { createPermissionRulePolicy, validatePermissionRules, skipsUnreadableRule, toolPolicySkippedRules, parsePermissionRule, formatPermissionRule, wildcardMatch, isCoveringRuleName, ruleNameCovers, } from "./core/permission-rules.js";
278
- export { RULE_BEHAVIORS, RULE_BEHAVIOR_PRECEDENCE, RULE_BEHAVIORS_BY_PRECEDENCE, isRuleBehavior, readRowBehavior, adjudicatePersistedRules, adjudicatePersistedPathRules, adjudicatePersistedToolRules, ruleReachesProgramRun, programRunReachOf, PROGRAM_RUN_REACHES, pathRuleReachOf, ruleBasesNeeded, PATH_RULE_BASES, PATH_RULE_BASE_LABEL, ruleToolGrammarOf, COMMAND_RULE_TOOL, READ_RULE_TOOL, parseRuleText, formatRuleText, ruleAdmitsCommand, findAdmittingRule, suggestRulesForCommand, scopeCoversCwd, pathWithinRoot, isRuleLive, renderUntrustedCommandText, stripFormatCharacters, UNCOVERED_SEGMENT_REASON_BASELINE, RULE_OFFERS_ABSENCE_BASELINE, PERSISTED_RULE_MATCHES, RULE_OFFER_KINDS, RULE_OFFER_BATCH_MEMBER_KINDS, UNCOVERED_SEGMENT_REASONS, EDITED_RULE_BREADTH_WARNING_CODES, RULE_ADD_ORIGINS, directoryRuleAdmits, BARE_INTERPRETER_NAMES, MAX_RULE_TEXT_CHARS, } from "./core/permission-rule-model.js";
278
+ export { RULE_BEHAVIORS, RULE_BEHAVIOR_PRECEDENCE, RULE_BEHAVIORS_BY_PRECEDENCE, isRuleBehavior, readRowBehavior, adjudicatePersistedRules, adjudicatePersistedPathRules, adjudicatePersistedToolRules, ruleReachesProgramRun, programRunReachOf, PROGRAM_RUN_REACHES, pathRuleReachOf, ruleBasesNeeded, PATH_RULE_BASES, PATH_RULE_BASE_LABEL, ruleToolGrammarOf, COMMAND_RULE_TOOL, READ_RULE_TOOL, parseRuleText, formatRuleText, ruleAdmitsCommand, findAdmittingRule, suggestRulesForCommand, scopeCoversCwd, pathWithinRoot, isRuleLive, renderUntrustedCommandText, stripFormatCharacters, UNCOVERED_SEGMENT_REASON_BASELINE, RULE_OFFERS_ABSENCE_BASELINE, PERSISTED_RULE_MATCHES, RULE_OFFER_KINDS, RULE_OFFER_BATCH_MEMBER_KINDS, UNCOVERED_SEGMENT_REASONS, EDITED_RULE_BREADTH_WARNING_CODES, RULE_ADD_ORIGINS, directoryRuleAdmits, BARE_INTERPRETER_NAMES, MAX_RULE_TEXT_CHARS, RULE_OFFER_CAUTIONS, } from "./core/permission-rule-model.js";
279
279
  export { removePersistedRule, addPersistedRule, applyTombstones, sameScope, sameRuleIdentity, isValidConsentScope, isValidDurableScope, InMemoryDurableRulePartition, EMPTY_DURABLE_RULE_PARTITION, joinRuleStates, applySyncJoin, screenRuleSyncState, collectBelowFrontier, ruleSyncVector, joinFrontiers, dotAtOrBelowFrontier, PERMISSION_RULE_WRITER, writerOf, foldDelta, addDotsOf, assertDeleteDeltaCarriesNoAdd, assertRedemptionNotQuarantined, assertWriteDeltaScopeDurable, PERMISSION_RULES_LATER_GRAMMAR_CODE, PERMISSION_RULES_DAMAGED_BUCKET_CODE, PERMISSION_RULES_UNREADABLE_BUCKET_CODE, } from "./core/permission-rule-store.js";
280
280
  export { readRuleOwner, sameRuleOwner, RULE_OWNER_KINDS, } from "./core/rule-owner.js";
281
281
  export { judgePrincipalName, principalNameOf, whiteSpaceAtEdgesOf, PRINCIPAL_NAME_MAX_CHARS, PRINCIPAL_NAME_MAX_BYTES, PRINCIPAL_NAME_REFUSALS, } from "./core/principal-name.js";
@@ -315,6 +315,7 @@ export { resolveMemoryScopeStore } from "./core/memory-engine/dual-root.js";
315
315
  export { classifyScopePlanes, memoryScopePlaneOf, scopePlanesOf } from "./core/memory-engine/dual-root.js";
316
316
  export { createMemoryDeployment, } from "./core/memory-engine/memory-deployment.js";
317
317
  export { reanchorMemoryStoreRoot } from "./core/memory-engine/layout.js";
318
+ export { deletionRecordOf, memoryDeletionRecords } from "./core/memory-engine/deletion-record.js";
318
319
  export { admittingLandings, cutPerLanding, LandingsNeedAdmission, MAX_LANDING_ADMISSION_ROUNDS, requireLandingsAdmitted, } from "./core/memory-engine/landing-admission.js";
319
320
  export { NON_GOVERNANCE_MEMORY_CODES } from "./core/governance-codes.js";
320
321
  export { SHARED_MEMORY_READ_CAP_BYTES, SHARED_MEMORY_LIST_PAGE_SIZE, SharedMemoryStoreError, } from "./core/shared-memory/types.js";
@@ -375,6 +376,7 @@ export { workflowTreeIdStampOf } from "./orchestration/workflow-tree-id.js";
375
376
  export { readWorkflowRunTree, workflowRunTreeOfOne } from "./orchestration/workflow-park-adoption.js";
376
377
  export { workflowParkHolderOf } from "./orchestration/workflow-types.js";
377
378
  export { WORKFLOW_AGENT_STOP_ANSWERS } from "./orchestration/workflow-types.js";
379
+ export { WORKFLOW_RUN_STOP_ANSWERS } from "./orchestration/workflow-stop.js";
378
380
  export {} from "./orchestration/workflow-types.js";
379
381
  export { workflowParkWaitOf, readWorkflowParkWaits } from "./orchestration/workflow-park-adoption.js";
380
382
  export { WORKFLOW_PARK_UNUSED_REASONS } from "./orchestration/workflow-park-adoption.js";
@@ -473,6 +475,11 @@ export {} from "./brain/timeout.js";
473
475
  export { createAssistantMessageEventStream } from "./internal/llm.js";
474
476
  export { CONTINUATION_ENDED_BY } from "./core/delegation-frames.js";
475
477
  export { MEMBER_OUTCOMES, MEMBER_KINDS, MEMBER_COVERAGES, RUN_END_CAUSES, REFUSALS_LISTED, isMemberOutcomeWord, isRunEndCause, isMemberOutcome, isMemberCoverage, memberOutcomeOf, memberRefusalsOf, memberCoverageOf, memberLedgerOf, memberOutcomeText, memberRefusalsText, } from "./core/member-outcome.js";
478
+ export { RUN_LEDGER_VERSION, RUN_LEDGER_WIRE_KEY, RUN_LEDGER_CHECKS, runLedgerHeadline, } from "./core/run-ledger.js";
479
+ export { subagentActionsLine } from "./core/actions-digest.js";
480
+ export { MANAGER_LAUNCH_ITEMS, managerLaunchCheck, managerLaunchCheckSentence } from "./core/manager-launch-check.js";
481
+ export { MANAGER_RECIPE, MANAGER_DUTIES_ADDENDUM, managerWorkerDefinition } from "./prompts/manager-recipe.js";
482
+ export { SEND_USER_MESSAGE_TOOL_NAME } from "./agents/send-user-message-tool.js";
476
483
  export { agentOutcomeOf } from "./core/background-agent-store.js";
477
484
  export { Type } from "typebox";
478
485
  export { explainPromptAssembly, describeCatalog } from "./prompt-assembly/explain.js";
@@ -506,3 +513,5 @@ export { sessionLogMarkOf } from "./engine/session/storage-base.js";
506
513
  export { readRowExpectationMember } from "./core/runner/session-verb-doors.js";
507
514
  export { delegationOwnerSeat } from "./core/runner/delegation-owner.js";
508
515
  export { CHECKPOINT_LIST_LIMITS, readCheckpointOverdueQuery, readCheckpointSessionQuery, readCheckpointDeleteGuard, checkpointDeadlinePassed, checkpointOverdueAt, checkpointRunSessionOf, storedCheckpointRowRefusal, checkpointRowUnreadable, isCheckpointRowUnreadable, deleteGuardAdmits, selectOverduePage, selectSessionPage, } from "./core/checkpoint-queries.js";
516
+ export { EXTERNAL_INCLUDE_POST_APPROVAL_BLOCKS, } from "./core/instruction-preview.js";
517
+ export { screenProjectSeat } from "./core/project-seat.js";
@@ -10,9 +10,10 @@ import { foreignLine } from "../core/protocol-http-auth.js";
10
10
  import { withDelegationProvenance } from "../core/tool-policy.js";
11
11
  import { LAUNCH_RECEIPT_OWN_WORDS_CLAUSE, launchReceiptNoQuoteClause } from "../agents/launch-receipt-contract.js";
12
12
  import { createHash, randomUUID } from "node:crypto";
13
- import { startWorkflow, WORKFLOW_STORE_WAIT_BOUND_MS, takeWorkflowResumeClaim, releaseWorkflowResumeClaim } from "./workflow.js";
13
+ import { startWorkflow, WORKFLOW_STORE_WAIT_BOUND_MS, takeWorkflowResumeClaims, releaseWorkflowResumeClaims } from "./workflow.js";
14
+ import { workflowStopOf } from "./workflow-stop.js";
14
15
  import { assertJournalStoreGivesClaimsBack, journalKeepsLaunches } from "../core/workflow-journal-store.js";
15
- import { boundedStoreRead, createWorkflowParkAdopter, otherWaitingLine, readWorkflowRunTree, readWorkflowRunTreeWithin, registerWorkflowParkAdopter, workflowLineForkReason, workflowLineTailOf, workflowTreeOverBoundSentence } from "./workflow-park-adoption.js";
16
+ import { boundedStoreRead, createWorkflowParkAdopter, otherWaitingLine, readWorkflowRunTree, readWorkflowRunTreeWithin, registerWorkflowParkAdopter, sameClaimKeys, workflowClaimKeysOf, workflowLineForkReason, workflowLineTailOf, workflowTreeOverBoundSentence } from "./workflow-park-adoption.js";
16
17
  import { settledRunOf } from "../core/workflow-settled-run.js";
17
18
  import { WORKFLOW_AGENT_PARKED_ERROR_CODE, WORKFLOW_STEP_ASKED_AGAIN, firstFailedAgentCodeOf, parkedAgentsOf, workflowMembersOf, workflowParkHolderOf } from "./workflow-types.js";
18
19
  import { memberLedgerClause, memberRefusalsText } from "../core/member-outcome.js";
@@ -140,7 +141,7 @@ function workflowUsageBlock(run) {
140
141
  ...(run.endedAt !== undefined ? { duration_ms: run.endedAt - run.startedAt } : {}),
141
142
  };
142
143
  }
143
- function workflowDiagnostics(runId, journalRef, resumeMiss, record, held) {
144
+ function workflowDiagnostics(runId, journalRef, resumeMiss, record, held, stoppedBy) {
144
145
  const journalTeach = journalRef === undefined
145
146
  ? ""
146
147
  : journalRef.includes("://")
@@ -152,10 +153,13 @@ function workflowDiagnostics(runId, journalRef, resumeMiss, record, held) {
152
153
  return ((record ?? "") +
153
154
  journalTeach +
154
155
  resumeMissTeach +
155
- (held !== undefined
156
- ? ` ${heldStepSentence(held)}.`
157
- : ` To continue after editing the script: re-invoke with resumeFromRunId: "${runId}" (completed agents replay from the journal; only new/changed calls run).`)).trimStart();
156
+ (stoppedBy !== undefined
157
+ ? ` ${workflowStoppedSentence(stoppedBy)}.`
158
+ : held !== undefined
159
+ ? ` ${heldStepSentence(held)}.`
160
+ : ` To continue after editing the script: re-invoke with resumeFromRunId: "${runId}" (completed agents replay from the journal; only new/changed calls run).`)).trimStart();
158
161
  }
162
+ const workflowStoppedSentence = (stoppedBy) => `The workflow was stopped (by ${JSON.stringify(boundedRedactedSummary(stoppedBy, 64))}): no run of it starts another step, so resuming it (resumeFromRunId) is refused — to run the work again, start the workflow again`;
159
163
  const heldStepSentence = (held) => held.holder !== undefined
160
164
  ? `The parked step still belongs to run "${held.holder}": with a person's decision on its card, that run continues from the step; ` +
161
165
  `if the card is no longer waiting (expired, removed, or decided elsewhere), a resume of "${held.holder}" records the step as failed and its script continues`
@@ -188,8 +192,8 @@ const SCRIPT_ERROR_CODES = new Set([
188
192
  "workflow.result_too_large",
189
193
  "workflow.budget_exceeded",
190
194
  ]);
191
- function failureSummary(err, runId, run, held) {
192
- return withUnusedDecisions(failureSummaryOf(err, runId, run, held), run);
195
+ function failureSummary(err, runId, run, held, stoppedBy) {
196
+ return withUnusedDecisions(failureSummaryOf(err, runId, run, held, stoppedBy), run);
193
197
  }
194
198
  const RESUME_REFUSAL_CODES = new Set(["workflow.parked_call_changed", "workflow.park_truth_unreadable", "workflow.park_binding_broken", "workflow.park_requires_run_store"]);
195
199
  function withUnusedDecisions(summary, run) {
@@ -221,7 +225,7 @@ function continuedBeforeSentence(run) {
221
225
  const ended = `${before.status}${before.errorCode !== undefined ? ` (${before.errorCode})` : ""}`;
222
226
  return ` — run "${boundedRedactedSummary(run.resume.fromRunId, 80)}" had already been continued as run "${boundedRedactedSummary(before.runId, 80)}", which ended ${ended}; this run continued from that earlier point, so the steps after it that had not completed there ran again here`;
223
227
  }
224
- function failureSummaryOf(err, runId, run, held) {
228
+ function failureSummaryOf(err, runId, run, held, stoppedBy) {
225
229
  const codeWord = readMember(err, "code");
226
230
  const thrownCode = typeof codeWord === "string" && codeWord !== WORKFLOW_AGENT_PARKED_ERROR_CODE ? codeWord : undefined;
227
231
  const code = run !== undefined ? run.errorCode : thrownCode;
@@ -244,11 +248,13 @@ function failureSummaryOf(err, runId, run, held) {
244
248
  (runId ? `; the diagnostics below name its record (the parked agent's row reads status "parked")` : "") +
245
249
  `; do not re-issue the same call — once a person decides the approval, the decision continues this run from the parked call; you do not resume it, and if it cannot be continued you are told then`);
246
250
  }
247
- const guide = held !== undefined
248
- ? `; which agents failed is in the diagnostics below. ${heldStepSentence(held)}`
249
- : runId
250
- ? `; which agents failed is in the diagnostics below; after fixing, re-invoke with resumeFromRunId: "${runId}" (completed agents replay from the journal)`
251
- : "";
251
+ const guide = stoppedBy !== undefined
252
+ ? `; ${workflowStoppedSentence(stoppedBy)}`
253
+ : held !== undefined
254
+ ? `; which agents failed is in the diagnostics below. ${heldStepSentence(held)}`
255
+ : runId
256
+ ? `; which agents failed is in the diagnostics below; after fixing, re-invoke with resumeFromRunId: "${runId}" (completed agents replay from the journal)`
257
+ : "";
252
258
  const scriptWords = code && SCRIPT_ERROR_CODES.has(code) ? readMember(err, "message") : undefined;
253
259
  if (code && typeof scriptWords === "string") {
254
260
  const msg = egressText("same-principal", scriptWords);
@@ -332,11 +338,11 @@ function claimWithin(p, late) {
332
338
  });
333
339
  });
334
340
  }
335
- async function takeToolResumeClaim(journal, args, what, runId, reportStoreFault) {
341
+ async function takeToolResumeClaim(journal, args, what, runId, reportStoreFault, carriesDecision = false) {
336
342
  const who = what === "record" ? "record of a person's answer" : what;
337
343
  let verdict;
338
344
  try {
339
- verdict = await claimWithin(takeWorkflowResumeClaim(journal, args), (late) => void (late.granted ? releaseWorkflowResumeClaim(journal, args, late.fallback) : undefined));
345
+ verdict = await claimWithin(takeWorkflowResumeClaims(journal, args.keys, args.newRunId, args.scope, carriesDecision), (late) => void (late.granted ? releaseWorkflowResumeClaims(journal, args.keys, args.newRunId, args.scope, late.fallback) : undefined));
340
346
  }
341
347
  catch (err) {
342
348
  reportStoreFault?.(`the ${who}'s resume claim on workflow run ${JSON.stringify(runId)} could not be taken`, err);
@@ -936,14 +942,14 @@ async function mountRunWorkflowTool(d) {
936
942
  return `an approval card of workflow run "${inlineUntrusted(target, 64)}"'s workflow could not be read — not started; resume again once the checkpoint store answers`;
937
943
  if (line.kind === "waiting")
938
944
  return notContinuedRefusalOf(namedResume, "waiting_elsewhere", { waiting: line.lines, decisionIds: heldDecisionIds });
939
- return { root: line.root, target };
945
+ return { keys: workflowClaimKeysOf(tree).keys, target };
940
946
  };
941
947
  const firstLine = await modelLineRefusal();
942
948
  if (typeof firstLine === "string")
943
949
  return structuredError(firstLine);
944
950
  if (firstLine !== undefined)
945
951
  resumeFromRunId = firstLine.target;
946
- const claimKey = continuation !== undefined ? continuation.claimKey : firstLine?.root;
952
+ const claimKeys = continuation !== undefined ? continuation.claimKeys : firstLine?.keys;
947
953
  let sourceLaunch = continuation?.launch;
948
954
  if (continuation === undefined && resumeFromRunId !== undefined && journalKeepsLaunches(d.journalStore)) {
949
955
  const scope = runScope;
@@ -982,17 +988,17 @@ async function mountRunWorkflowTool(d) {
982
988
  let continuationDecisions = continuation?.decisions;
983
989
  const releaseContinuationClaim = () => {
984
990
  if (continuationClaim !== undefined && d.journalStore !== undefined)
985
- void releaseWorkflowResumeClaim(d.journalStore, continuationClaim.args, continuationClaim.fallback);
991
+ void releaseWorkflowResumeClaims(d.journalStore, continuationClaim.args.keys, continuationClaim.args.newRunId, continuationClaim.args.scope, continuationClaim.fallback);
986
992
  };
987
- if (resumeFromRunId !== undefined && claimKey !== undefined && d.journalStore !== undefined && launchRunId !== undefined) {
993
+ if (resumeFromRunId !== undefined && claimKeys !== undefined && d.journalStore !== undefined && launchRunId !== undefined) {
988
994
  const journal = d.journalStore;
989
- const args = { sourceRunId: claimKey, newRunId: launchRunId, scope: resumeScope };
990
- const taken = await takeToolResumeClaim(journal, args, continuation !== undefined ? "continuation" : "resume", resumeFromRunId, reportStoreFault);
995
+ const args = { keys: claimKeys, newRunId: launchRunId, scope: resumeScope };
996
+ const taken = await takeToolResumeClaim(journal, args, continuation !== undefined ? "continuation" : "resume", resumeFromRunId, reportStoreFault, continuation !== undefined || heldDecisionIds.length > 0);
991
997
  if ("refused" in taken)
992
998
  return structuredError(taken.refused);
993
999
  if ("held" in taken) {
994
1000
  if (continuation === undefined)
995
- return structuredError(notContinuedRefusalOf(namedResume ?? resumeFromRunId, "continuing_elsewhere", { ...taken.held, decisionIds: heldDecisionIds }));
1001
+ return structuredError(notContinuedRefusalOf(namedResume ?? resumeFromRunId, taken.held.stoppedBy !== undefined ? "workflow_stopped" : "continuing_elsewhere", { ...taken.held, decisionIds: heldDecisionIds }));
996
1002
  continuation.onClaimHeld(taken.held);
997
1003
  return structuredError("another run already holds this run's resume claim — not started");
998
1004
  }
@@ -1005,7 +1011,7 @@ async function mountRunWorkflowTool(d) {
1005
1011
  catch {
1006
1012
  again = `the records of workflow run "${inlineUntrusted(resumeFromRunId, 64)}"'s workflow could not be read — not started`;
1007
1013
  }
1008
- if (again !== undefined && typeof again !== "string" && (again.root !== claimKey || again.target !== resumeFromRunId)) {
1014
+ if (again !== undefined && typeof again !== "string" && (!sameClaimKeys(again.keys, claimKeys) || again.target !== resumeFromRunId)) {
1009
1015
  again = `the records of workflow run "${inlineUntrusted(namedResume ?? "", 64)}"'s workflow changed while this call took its resume claim (a run of it was continued, removed or created again meanwhile) — not started; call again to continue from what they say now`;
1010
1016
  }
1011
1017
  if (typeof again === "string") {
@@ -1114,7 +1120,7 @@ async function mountRunWorkflowTool(d) {
1114
1120
  workflowDepth: d.workflowDepth,
1115
1121
  launchingTool: tool,
1116
1122
  ...((ctx.toolSelector?.layers ?? d.parentToolCeiling) !== undefined ? { toolCeiling: (ctx.toolSelector?.layers ?? d.parentToolCeiling) } : {}),
1117
- ...(continuationClaim !== undefined ? { resumeClaimKey: continuationClaim.args.sourceRunId } : {}),
1123
+ ...(continuationClaim !== undefined && continuationClaim.args.keys[0] !== undefined ? { resumeClaimKey: continuationClaim.args.keys[0] } : {}),
1118
1124
  ...(namedResume !== undefined && resumeFromRunId !== namedResume ? { resumeAsked: namedResume } : {}),
1119
1125
  });
1120
1126
  }
@@ -1135,6 +1141,7 @@ async function mountRunWorkflowTool(d) {
1135
1141
  description: meta.name ?? meta.description,
1136
1142
  toolUseId: ctx.toolCallId,
1137
1143
  ...(taskOwner !== undefined ? { owner: taskOwner } : {}),
1144
+ ...(sourceTaskId !== undefined && sourceTaskId !== (ctx.sessionId ?? d.originatingSessionId) ? { parentTaskId: sourceTaskId } : {}),
1138
1145
  scope: runScope,
1139
1146
  ...(d.originatingSessionId !== undefined ? { originatingSessionId: d.originatingSessionId } : {}),
1140
1147
  ...occupantStamp(rootOccupantSeat(ctx.rootSessionId ?? d.rootSessionId ?? d.originatingSessionId, ctx, d)),
@@ -1201,7 +1208,7 @@ async function mountRunWorkflowTool(d) {
1201
1208
  summary: completionSummary(meta.name, res.run) + continuedBeforeSentence(res.run),
1202
1209
  result: boundedRedactedSummary(res.result, 4000),
1203
1210
  usage: workflowUsageBlock(res.run),
1204
- diagnostics: workflowDiagnostics(runId, journalLocatorOf(runId, res.run.scope), res.run.resume?.journalEntries === 0, recordOf(res.run)),
1211
+ diagnostics: workflowDiagnostics(runId, journalLocatorOf(runId, res.run.scope), res.run.resume?.journalEntries === 0, recordOf(res.run), undefined, workflowStopOf(handle)),
1205
1212
  completionId: res.run.completionId,
1206
1213
  members: workflowMembersOf(res.run),
1207
1214
  }), async (err) => {
@@ -1213,11 +1220,12 @@ async function mountRunWorkflowTool(d) {
1213
1220
  const failedRun = settledRunOf(handle.done);
1214
1221
  const record = failedRun !== undefined ? recordOf(failedRun) : workflowRecordPickupOf(undefined).line;
1215
1222
  const held = await heldStepOf(failedRun, d.store);
1216
- const summary = failureSummary(err, runId, failedRun, held) + continuedBeforeSentence(failedRun);
1223
+ const stoppedBy = workflowStopOf(handle);
1224
+ const summary = failureSummary(err, runId, failedRun, held, stoppedBy) + continuedBeforeSentence(failedRun);
1217
1225
  const settleId = failedRun?.completionId;
1218
1226
  parts = {
1219
1227
  summary,
1220
- diagnostics: workflowDiagnostics(runId, undefined, undefined, record, held),
1228
+ diagnostics: workflowDiagnostics(runId, undefined, undefined, record, held, stoppedBy),
1221
1229
  ...(settleId !== undefined ? { completionId: settleId } : {}),
1222
1230
  ...(failedRun !== undefined ? { members: workflowMembersOf(failedRun) } : {}),
1223
1231
  ...((code) => (code !== undefined ? { errorCode: code } : {}))(failedRun === undefined ? undefined : workflowNotifiedCodeOf(failedRun)),
@@ -1278,12 +1286,12 @@ async function mountRunWorkflowTool(d) {
1278
1286
  return { refused: launchRefusalText(details?.content) };
1279
1287
  return { runId: details.details.workflowRunId };
1280
1288
  },
1281
- underClaim: async (claimKey, scope, body) => {
1289
+ underClaim: async (claimKeys, scope, body) => {
1282
1290
  const journal = d.journalStore;
1283
1291
  if (journal === undefined)
1284
1292
  return { refused: "no journal store holds this workflow's resume claim" };
1285
- const args = { sourceRunId: claimKey, newRunId: answerRecordClaimHolder(), scope };
1286
- const taken = await takeToolResumeClaim(journal, args, "record", claimKey, reportStoreFault);
1293
+ const args = { keys: claimKeys, newRunId: answerRecordClaimHolder(), scope };
1294
+ const taken = await takeToolResumeClaim(journal, args, "record", claimKeys[0] ?? "", reportStoreFault);
1287
1295
  if ("refused" in taken)
1288
1296
  return { refused: taken.refused };
1289
1297
  if ("held" in taken)
@@ -1292,7 +1300,7 @@ async function mountRunWorkflowTool(d) {
1292
1300
  return { value: await body() };
1293
1301
  }
1294
1302
  finally {
1295
- void releaseWorkflowResumeClaim(journal, args, taken.granted.fallback);
1303
+ void releaseWorkflowResumeClaims(journal, args.keys, args.newRunId, args.scope, taken.granted.fallback);
1296
1304
  }
1297
1305
  },
1298
1306
  waitBoundMs: WORKFLOW_STORE_WAIT_BOUND_MS,
@@ -15,7 +15,7 @@ export interface WorkflowParkDecision {
15
15
  readonly inheritedGate?: InheritedGate;
16
16
  }
17
17
  /** Why a decision did not continue its run — the closed set `workflow.parked_decision_unused` carries as `detail.reason`. */
18
- export declare const WORKFLOW_PARK_UNUSED_REASONS: readonly ["workflow_not_mounted", "entry_unreadable", "record_unreadable", "not_holder", "not_pending", "decision_spent", "launch_unrecorded", "launch_unreadable", "host_changed", "denied", "ask_unanswerable", "call_changed", "launch_refused", "continuing_elsewhere", "card_unresumable", "waiting_elsewhere", "run_not_ended"];
18
+ export declare const WORKFLOW_PARK_UNUSED_REASONS: readonly ["workflow_not_mounted", "entry_unreadable", "record_unreadable", "not_holder", "not_pending", "decision_spent", "launch_unrecorded", "launch_unreadable", "host_changed", "denied", "ask_unanswerable", "call_changed", "launch_refused", "continuing_elsewhere", "card_unresumable", "waiting_elsewhere", "run_not_ended", "workflow_stopped"];
19
19
  export type WorkflowParkUnusedReason = (typeof WORKFLOW_PARK_UNUSED_REASONS)[number];
20
20
  /** What is left to do with a decision a reason answers (#5208): `deliverable` — the same decision stays usable, and a later hand-over of
21
21
  * it is judged again; `decide_again` — only a person's new decision for the card continues the run (this one is spent, or — kept —
@@ -110,6 +110,9 @@ export declare const WORKFLOW_PARK_UNUSED_REASON_CLASS: {
110
110
  readonly run_not_ended: {
111
111
  readonly kept: "deliverable";
112
112
  };
113
+ readonly workflow_stopped: {
114
+ readonly kept: "withdraw";
115
+ };
113
116
  };
114
117
  /** The class of an answer `reason` gave, as {@link WORKFLOW_PARK_UNUSED_REASON_CLASS} reads it — a lookup and nothing else: the row's
115
118
  * `spent` class when `spent` is `true`, its `kept` class when it is `false`. Undefined — no guess, never the other arm — for a word
@@ -218,6 +221,9 @@ export type WorkflowParkAdoption = {
218
221
  /** `continuing_elsewhere`: the store answered a remaining time for the claim that does not read — no instant is named, and
219
222
  * the sentence says so. Absent otherwise. */
220
223
  readonly claimLapseUnreadable?: true;
224
+ /** `workflow_stopped`: who stopped the workflow, as the journal store reports its stop (`ResumeClaimAnswer.stopped.by`). Not on
225
+ * the notice; the sentence reads it. */
226
+ readonly stoppedBy?: string;
221
227
  /** `waiting_elsewhere`: the lines of the workflow that wait and hold this run off — each line's head run and what it waits
222
228
  * on ({@link WorkflowWaitingLine}). The notice's detail carries their runs as `holder` (the run, or every run when more
223
229
  * than one line waits, as for a fork); a host finds each card by the holder law. */
@@ -260,10 +266,11 @@ export type WorkflowParkAdoption = {
260
266
  readonly why?: string;
261
267
  };
262
268
  /** What a refused resume claim tells of its hold: the run it is held for and when the store's expiry frees it, each when the
263
- * store said — the members `continuing_elsewhere` carries. */
269
+ * store said — the members `continuing_elsewhere` carries; or, for a workflow that was stopped, who stopped it (`stoppedBy`, the
270
+ * member `workflow_stopped` carries: a stop holds the claim for good, for no run). */
264
271
  export type WorkflowClaimHeld = Pick<Extract<WorkflowParkAdoption, {
265
272
  kind: "unused";
266
- }>, "claimExpiresAt" | "claimLapseUnreadable" | "heldForAnswer"> & {
273
+ }>, "claimExpiresAt" | "claimLapseUnreadable" | "heldForAnswer" | "stoppedBy"> & {
267
274
  readonly holder?: string;
268
275
  };
269
276
  /** What the remaining time a refused resume claim's answer carries tells ({@link claimRemainingOf}): `unsaid` — the store
@@ -290,10 +297,14 @@ export declare function claimRemainingOf(answer: {
290
297
  export declare function answerRecordClaimHolder(): string;
291
298
  export declare function isAnswerRecordClaimHolder(holder: string | undefined): boolean;
292
299
  /** The hold a refused claim's verdict tells ({@link WorkflowClaimHeld}), its remaining time as {@link claimRemainingOf} read it; a
293
- * holder that records a person's answer is no run, and is told as that ({@link isAnswerRecordClaimHolder}: `heldForAnswer`). */
300
+ * holder that records a person's answer is no run, and is told as that ({@link isAnswerRecordClaimHolder}: `heldForAnswer`); a
301
+ * stop the store reports (`stopped`) is told as that alone — it is no run's hold and never lapses. */
294
302
  export declare function claimHeldOf(verdict: {
295
303
  readonly holder?: string;
296
304
  readonly lapse?: WorkflowClaimLapse;
305
+ readonly stopped?: {
306
+ readonly by: string;
307
+ };
297
308
  }): WorkflowClaimHeld;
298
309
  /** The words a refusal says, in brackets, of a claim whose store answered a remaining time that does not read. */
299
310
  export declare const CLAIM_REMAINING_UNREADABLE_NOTE = "the journal store answered a remaining time for the claim that does not read, so no time is named";
@@ -348,8 +359,8 @@ export interface WorkflowContinuation {
348
359
  readonly decisionId: string;
349
360
  readonly inheritedGate?: InheritedGate;
350
361
  }>;
351
- /** The root of `fromRunId`'s tree ({@link workflowTreeOf}) — what the workflow's resume claim is keyed by. */
352
- readonly claimKey: string;
362
+ /** The keys the workflow's resume claim is taken under ({@link workflowClaimKeysOf} of `fromRunId`'s tree): its root first. */
363
+ readonly claimKeys: readonly string[];
353
364
  }
354
365
  /** The seats the Workflow tool's closure hands its adopter. Every seat that reads the call's context reads the one the leg
355
366
  * hands (`WorkflowParkAdoptionLeg.ctxOf`): the context a model's own call of this leg is run with, so the continuation's
@@ -383,10 +394,11 @@ export interface WorkflowParkAdopterSeats {
383
394
  } | {
384
395
  readonly superseded: true;
385
396
  }>;
386
- /** Hold the workflow's resume claim — keyed by `claimKey` (its tree's root) in `scope`, taken as the launch takes it, no run
387
- * started under it — while `body` runs, and give it back once `body` has settled: `value`, what `body` answered; `claimHeld`,
388
- * the claim another run holds (as the store told it); `refused`, a store that threw or did not answer in time (`body` not run). */
389
- readonly underClaim: <T>(claimKey: string, scope: string, body: () => Promise<T>) => Promise<{
397
+ /** Hold the workflow's resume claim — under `claimKeys` ({@link workflowClaimKeysOf}) in `scope`, taken as the launch takes it, no
398
+ * run started under it — while `body` runs, and give it back once `body` has settled: `value`, what `body` answered; `claimHeld`,
399
+ * the claim another run holds or a stop (as the store told it); `refused`, a store that threw or did not answer in time (`body`
400
+ * not run). */
401
+ readonly underClaim: <T>(claimKeys: readonly string[], scope: string, body: () => Promise<T>) => Promise<{
390
402
  readonly value: T;
391
403
  } | {
392
404
  readonly claimHeld: WorkflowClaimHeld;
@@ -481,6 +493,9 @@ declare const WORKFLOW_RUN_TREE: unique symbol;
481
493
  export interface WorkflowRunTree {
482
494
  readonly root: WorkflowRun;
483
495
  readonly records: readonly WorkflowRun[];
496
+ /** The id the root names as its source when the reader found a record under it that is another creation (the source was removed and
497
+ * the id used again): that id now names another workflow's run. */
498
+ readonly sourceRecreated?: string;
484
499
  readonly [WORKFLOW_RUN_TREE]: true;
485
500
  }
486
501
  /**
@@ -492,6 +507,30 @@ export interface WorkflowRunTree {
492
507
  * judging whether a card is still waited on, reads the whole tree: {@link readWorkflowRunTree}.
493
508
  */
494
509
  export declare function workflowRunTreeOfOne(run: WorkflowRun): WorkflowRunTree;
510
+ /**
511
+ * The names a workflow's tree answers to on the journal store's claim table (#5156): the keys its resume claim is taken under and a stop
512
+ * writes its tombstone on — the tree's root first, then the tree id the root records when it is another id (a root whose own edge up
513
+ * does not hold: its source was removed). A root that names no source is its own tree id (one key). A root that names a source it does
514
+ * not reach and records no tree id (an older engine's record, its line broken) has no tree id: `fragment`, and the root alone is its
515
+ * key — a stop of it stops that part of the workflow only. So is a tree id that the reader found used again by another workflow's run
516
+ * (`sourceRecreated`): that id is the other workflow's key now. Every reader that takes, re-takes or stops the claim reads it here.
517
+ */
518
+ export declare function workflowClaimKeysOf(tree: WorkflowRunTree): {
519
+ readonly keys: readonly string[];
520
+ readonly fragment: boolean;
521
+ };
522
+ /** The one judgment of whether a park a run's record names binds a checkpoint row — read by a resume's admission before it acts on the
523
+ * row and by a stop before it withdraws the card: why it does not (the record names no token or no session for it; the store answered a
524
+ * row under another token; the row belongs to another session), or `undefined` when it binds. Without `row`, the key alone is judged. */
525
+ export declare function parkBindingFault(key: {
526
+ readonly token: string;
527
+ readonly sessionId: string;
528
+ }, row?: {
529
+ readonly token: string;
530
+ readonly sessionId: string;
531
+ }): string | undefined;
532
+ /** Whether two key lists ({@link workflowClaimKeysOf}) name the same keys in the same order. */
533
+ export declare function sameClaimKeys(a: readonly string[], b: readonly string[]): boolean;
495
534
  /** The record of `id` in `tree`, if it is one of its runs. */
496
535
  export declare function workflowRunInTree(tree: WorkflowRunTree, id: string): WorkflowRun | undefined;
497
536
  /** The runs of `tree` below `id` (its successors, theirs, …), in the order the tree holds them. */
@@ -638,9 +677,9 @@ export declare function workflowParkUnusedSentence(o: Extract<WorkflowParkAdopti
638
677
  }>): string;
639
678
  /** The refusal of a model's `Workflow({ resumeFromRunId })` call for a run that is not continued: the reason's own sentence (the
640
679
  * engine's continuation tells the person the same one), with the decision half only when the call carried decisions. */
641
- export declare function notContinuedRefusalOf(runId: string, reason: "launch_unreadable" | "waiting_elsewhere" | "continuing_elsewhere", more?: Pick<Extract<WorkflowParkAdoption, {
680
+ export declare function notContinuedRefusalOf(runId: string, reason: "launch_unreadable" | "waiting_elsewhere" | "continuing_elsewhere" | "workflow_stopped", more?: Pick<Extract<WorkflowParkAdoption, {
642
681
  kind: "unused";
643
- }>, "code" | "holder" | "waiting" | "claimExpiresAt" | "claimLapseUnreadable" | "heldForAnswer"> & {
682
+ }>, "code" | "holder" | "waiting" | "claimExpiresAt" | "claimLapseUnreadable" | "heldForAnswer" | "stoppedBy"> & {
644
683
  readonly decisionIds?: readonly string[];
645
684
  }): string;
646
685
  /** Why a run of a tree past {@link WORKFLOW_TREE_RUNS_MAX} is not continued, and the way out — one wording for the model's own