@sayknow-cli/coding-agent 0.3.12 → 0.3.15

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 (248) hide show
  1. package/dist/types/autoresearch/tools/init-experiment.d.ts +1 -1
  2. package/dist/types/autoresearch/tools/log-experiment.d.ts +2 -2
  3. package/dist/types/cli/classify-install-target.d.ts +0 -10
  4. package/dist/types/cli/daemon-cli.d.ts +2 -0
  5. package/dist/types/cli/initial-message.d.ts +1 -1
  6. package/dist/types/cli/malloc-env-guard.d.ts +65 -0
  7. package/dist/types/cli/malloc-env-guard.test.d.ts +1 -0
  8. package/dist/types/cli/notify-cli.d.ts +3 -1
  9. package/dist/types/cli/session-picker.d.ts +4 -3
  10. package/dist/types/cli/update-cli.d.ts +22 -3
  11. package/dist/types/cli.d.ts +5 -0
  12. package/dist/types/commands/daemon.d.ts +6 -2
  13. package/dist/types/commands/launch.d.ts +1 -0
  14. package/dist/types/commands/notify.d.ts +6 -0
  15. package/dist/types/commands/web-search.d.ts +1 -1
  16. package/dist/types/commit/agentic/tools/propose-changelog.d.ts +4 -4
  17. package/dist/types/commit/agentic/tools/propose-commit.d.ts +9 -9
  18. package/dist/types/commit/agentic/tools/schemas.d.ts +9 -9
  19. package/dist/types/commit/agentic/tools/split-commit.d.ts +9 -9
  20. package/dist/types/commit/analysis/conventional.d.ts +1 -1
  21. package/dist/types/commit/analysis/summary.d.ts +1 -1
  22. package/dist/types/commit/changelog/generate.d.ts +3 -3
  23. package/dist/types/commit/changelog/index.d.ts +2 -2
  24. package/dist/types/commit/map-reduce/map-phase.d.ts +1 -1
  25. package/dist/types/commit/map-reduce/reduce-phase.d.ts +1 -1
  26. package/dist/types/commit/shared-llm.d.ts +9 -9
  27. package/dist/types/config/keybindings.d.ts +134 -129
  28. package/dist/types/config/model-profile-activation.d.ts +1 -0
  29. package/dist/types/config/model-registry.d.ts +35 -35
  30. package/dist/types/config/models-config-schema.d.ts +111 -111
  31. package/dist/types/config/settings-schema.d.ts +56 -16
  32. package/dist/types/config/settings.d.ts +2 -0
  33. package/dist/types/coordinator/contract.d.ts +1 -1
  34. package/dist/types/coordinator-mcp/model-preset.d.ts +45 -0
  35. package/dist/types/coordinator-mcp/policy.d.ts +3 -0
  36. package/dist/types/coordinator-mcp/server.d.ts +79 -6
  37. package/dist/types/coordinator-mcp/session-reaper.d.ts +53 -0
  38. package/dist/types/daemon/control-types.d.ts +10 -0
  39. package/dist/types/daemon/operator-contract.d.ts +47 -0
  40. package/dist/types/defaults/skc/extensions/grok-cli-vendor/src/models/catalog.d.ts +4 -0
  41. package/dist/types/defaults/skc/extensions/grok-cli-vendor/src/shared/errors.d.ts +12 -12
  42. package/dist/types/discovery/helpers.d.ts +1 -1
  43. package/dist/types/discovery/substitute-plugin-root.d.ts +0 -4
  44. package/dist/types/edit/modes/patch.d.ts +2 -2
  45. package/dist/types/extensibility/extensions/types.d.ts +3 -1
  46. package/dist/types/goals/tools/goal-tool.d.ts +6 -6
  47. package/dist/types/i18n/messages/en.d.ts +8 -8
  48. package/dist/types/internal-urls/local-protocol.d.ts +13 -9
  49. package/dist/types/lsp/index.d.ts +9 -9
  50. package/dist/types/lsp/types.d.ts +9 -9
  51. package/dist/types/main.d.ts +66 -2
  52. package/dist/types/modes/acp/acp-agent.d.ts +19 -2
  53. package/dist/types/modes/acp/acp-mode.d.ts +12 -0
  54. package/dist/types/modes/components/assistant-message.d.ts +1 -1
  55. package/dist/types/modes/components/custom-editor.d.ts +2 -0
  56. package/dist/types/modes/components/hook-selector.d.ts +5 -0
  57. package/dist/types/modes/components/irc-sidebar.d.ts +32 -0
  58. package/dist/types/modes/components/pet-selector.d.ts +11 -0
  59. package/dist/types/modes/components/sayknow-pet-widget.d.ts +59 -0
  60. package/dist/types/modes/components/session-selector.d.ts +22 -9
  61. package/dist/types/modes/components/settings-selector.d.ts +2 -0
  62. package/dist/types/modes/components/status-line/types.d.ts +1 -1
  63. package/dist/types/modes/components/status-line.d.ts +0 -10
  64. package/dist/types/modes/components/tool-execution.d.ts +1 -0
  65. package/dist/types/modes/components/user-message.d.ts +2 -1
  66. package/dist/types/modes/controllers/event-controller.d.ts +4 -0
  67. package/dist/types/modes/controllers/selector-controller.d.ts +1 -0
  68. package/dist/types/modes/interactive-mode.d.ts +24 -2
  69. package/dist/types/modes/irc-observation-ledger.d.ts +22 -0
  70. package/dist/types/modes/print-mode.d.ts +3 -4
  71. package/dist/types/modes/rpc/rpc-client.d.ts +7 -1
  72. package/dist/types/modes/rpc/rpc-mode.d.ts +2 -1
  73. package/dist/types/modes/rpc/rpc-types.d.ts +17 -1
  74. package/dist/types/modes/shared/agent-wire/deep-interview-gate.d.ts +8 -0
  75. package/dist/types/modes/shared/agent-wire/unattended-run-controller.d.ts +5 -0
  76. package/dist/types/modes/shared/agent-wire/unattended-session.d.ts +45 -0
  77. package/dist/types/modes/shared/agent-wire/workflow-gate-broker.d.ts +42 -2
  78. package/dist/types/modes/theme/defaults/index.d.ts +568 -568
  79. package/dist/types/modes/types.d.ts +28 -2
  80. package/dist/types/modes/utils/abort-message.d.ts +1 -1
  81. package/dist/types/modes/utils/context-usage.d.ts +4 -19
  82. package/dist/types/modes/utils/irc-message.d.ts +38 -0
  83. package/dist/types/modes/utils/ui-helpers.d.ts +13 -4
  84. package/dist/types/notifications/config.d.ts +34 -0
  85. package/dist/types/notifications/daemon-paths.d.ts +7 -0
  86. package/dist/types/notifications/index.d.ts +27 -0
  87. package/dist/types/notifications/lifecycle-control-runtime.d.ts +12 -4
  88. package/dist/types/notifications/notification-service.d.ts +144 -0
  89. package/dist/types/notifications/rate-limit-pool.d.ts +27 -9
  90. package/dist/types/notifications/telegram-daemon-control.d.ts +6 -0
  91. package/dist/types/notifications/telegram-daemon.d.ts +130 -3
  92. package/dist/types/notifications/telegram-reference.d.ts +19 -2
  93. package/dist/types/notifications/topic-registry.d.ts +24 -4
  94. package/dist/types/registry/agent-registry.d.ts +2 -0
  95. package/dist/types/rlm/index.d.ts +1 -1
  96. package/dist/types/sdk.d.ts +2 -0
  97. package/dist/types/secrets/obfuscator.d.ts +1 -1
  98. package/dist/types/session/agent-session.d.ts +40 -3
  99. package/dist/types/session/cache-economics.d.ts +79 -0
  100. package/dist/types/session/context-estimation.d.ts +31 -0
  101. package/dist/types/session/provider-safety-stop.d.ts +5 -0
  102. package/dist/types/session/session-manager.d.ts +124 -4
  103. package/dist/types/session/session-storage.d.ts +155 -13
  104. package/dist/types/setup/credential-auto-import.d.ts +2 -2
  105. package/dist/types/skc-runtime/session-state-sidecar.d.ts +34 -3
  106. package/dist/types/skc-runtime/state-schema.d.ts +19 -19
  107. package/dist/types/skc-runtime/tmux-common.d.ts +6 -0
  108. package/dist/types/skc-runtime/tmux-owner-isolation-cli.d.ts +5 -0
  109. package/dist/types/skc-runtime/tmux-owner-isolation.d.ts +309 -0
  110. package/dist/types/skc-runtime/tmux-sessions.d.ts +49 -17
  111. package/dist/types/task/agents.d.ts +2 -2
  112. package/dist/types/task/executor.d.ts +3 -0
  113. package/dist/types/task/receipt.d.ts +3 -1
  114. package/dist/types/task/types.d.ts +35 -27
  115. package/dist/types/tools/ask-answer-registry.d.ts +5 -0
  116. package/dist/types/tools/bash.d.ts +1 -1
  117. package/dist/types/tools/browser/tab-supervisor.d.ts +6 -0
  118. package/dist/types/tools/browser.d.ts +28 -28
  119. package/dist/types/tools/computer.d.ts +20 -20
  120. package/dist/types/tools/cron.d.ts +2 -2
  121. package/dist/types/tools/debug.d.ts +40 -40
  122. package/dist/types/tools/gh.d.ts +10 -10
  123. package/dist/types/tools/image-gen.d.ts +2 -2
  124. package/dist/types/tools/index.d.ts +58 -6
  125. package/dist/types/tools/monitor.d.ts +6 -6
  126. package/dist/types/tools/skill-discovery.d.ts +4 -4
  127. package/dist/types/tools/subagent.d.ts +12 -12
  128. package/dist/types/tools/telegram-send.d.ts +7 -0
  129. package/dist/types/tools/todo-write.d.ts +8 -8
  130. package/dist/types/utils/external-editor.d.ts +2 -0
  131. package/dist/types/web/insane/bridge.d.ts +9 -9
  132. package/dist/types/web/search/index.d.ts +4 -4
  133. package/package.json +8 -8
  134. package/scripts/g004-tmux-smoke.ts +196 -36
  135. package/src/cli/daemon-cli.ts +19 -29
  136. package/src/cli/malloc-env-guard.test.ts +104 -0
  137. package/src/cli/malloc-env-guard.ts +149 -0
  138. package/src/cli/notify-cli.ts +78 -14
  139. package/src/cli/session-picker.ts +23 -40
  140. package/src/cli/update-cli.ts +56 -37
  141. package/src/cli.ts +51 -10
  142. package/src/commands/daemon.ts +19 -5
  143. package/src/commands/harness.ts +515 -47
  144. package/src/commands/launch.ts +11 -3
  145. package/src/commands/notify.ts +5 -1
  146. package/src/commands/session.ts +6 -1
  147. package/src/config/keybindings.ts +5 -0
  148. package/src/config/model-profile-activation.ts +1 -1
  149. package/src/config/model-profiles.ts +14 -14
  150. package/src/config/settings-schema.ts +41 -1
  151. package/src/config/settings.ts +96 -45
  152. package/src/coordinator/contract.ts +1 -0
  153. package/src/coordinator-mcp/model-preset.ts +100 -0
  154. package/src/coordinator-mcp/policy.ts +30 -0
  155. package/src/coordinator-mcp/server.ts +2958 -430
  156. package/src/coordinator-mcp/session-reaper.ts +129 -0
  157. package/src/daemon/control-types.ts +11 -0
  158. package/src/daemon/operator-contract.ts +121 -0
  159. package/src/defaults/skc/extensions/grok-cli-vendor/src/models/catalog.ts +57 -17
  160. package/src/defaults/skc/extensions/grok-cli-vendor/src/payload/sanitize.ts +15 -2
  161. package/src/defaults/skc/extensions/grok-cli-vendor/src/provider/register.ts +5 -1
  162. package/src/extensibility/extensions/runner.ts +1 -1
  163. package/src/extensibility/extensions/types.ts +3 -1
  164. package/src/internal-urls/docs-index.generated.ts +10 -9
  165. package/src/internal-urls/local-protocol.ts +29 -10
  166. package/src/main.ts +301 -80
  167. package/src/modes/acp/acp-agent.ts +730 -100
  168. package/src/modes/acp/acp-mode.ts +29 -2
  169. package/src/modes/components/assistant-message.ts +32 -3
  170. package/src/modes/components/bash-execution.ts +43 -13
  171. package/src/modes/components/custom-editor.ts +5 -0
  172. package/src/modes/components/footer.ts +3 -3
  173. package/src/modes/components/hook-selector.ts +12 -0
  174. package/src/modes/components/irc-sidebar.ts +206 -0
  175. package/src/modes/components/pet-selector.ts +55 -0
  176. package/src/modes/components/sayknow-pet-widget.ts +360 -0
  177. package/src/modes/components/session-selector.ts +222 -221
  178. package/src/modes/components/settings-selector.ts +10 -0
  179. package/src/modes/components/status-line/segments.ts +14 -7
  180. package/src/modes/components/status-line/types.ts +1 -1
  181. package/src/modes/components/status-line.ts +4 -171
  182. package/src/modes/components/tool-execution.ts +47 -6
  183. package/src/modes/components/user-message.ts +26 -9
  184. package/src/modes/controllers/command-controller.ts +28 -2
  185. package/src/modes/controllers/event-controller.ts +159 -36
  186. package/src/modes/controllers/extension-ui-controller.ts +37 -18
  187. package/src/modes/controllers/input-controller.ts +8 -2
  188. package/src/modes/controllers/selector-controller.ts +62 -15
  189. package/src/modes/interactive-mode.ts +199 -7
  190. package/src/modes/irc-observation-ledger.ts +127 -0
  191. package/src/modes/print-mode.ts +228 -92
  192. package/src/modes/rpc/rpc-client.ts +58 -1
  193. package/src/modes/rpc/rpc-mode.ts +286 -85
  194. package/src/modes/rpc/rpc-types.ts +15 -1
  195. package/src/modes/shared/agent-wire/command-dispatch.ts +33 -1
  196. package/src/modes/shared/agent-wire/command-validation.ts +10 -0
  197. package/src/modes/shared/agent-wire/deep-interview-gate.ts +45 -2
  198. package/src/modes/shared/agent-wire/scopes.ts +1 -0
  199. package/src/modes/shared/agent-wire/unattended-session.ts +288 -1
  200. package/src/modes/shared/agent-wire/workflow-gate-broker.ts +130 -20
  201. package/src/modes/types.ts +34 -2
  202. package/src/modes/utils/context-usage.ts +56 -92
  203. package/src/modes/utils/hotkeys-markdown.ts +1 -0
  204. package/src/modes/utils/irc-message.ts +138 -0
  205. package/src/modes/utils/ui-helpers.ts +216 -50
  206. package/src/notifications/config.ts +44 -0
  207. package/src/notifications/daemon-paths.ts +8 -0
  208. package/src/notifications/index.ts +535 -75
  209. package/src/notifications/lifecycle-control-runtime.ts +930 -77
  210. package/src/notifications/notification-service.ts +710 -0
  211. package/src/notifications/rate-limit-pool.ts +46 -12
  212. package/src/notifications/telegram-daemon-control.ts +27 -2
  213. package/src/notifications/telegram-daemon.ts +635 -94
  214. package/src/notifications/telegram-reference.ts +73 -13
  215. package/src/notifications/topic-registry.ts +86 -9
  216. package/src/prompts/system/irc-peer-roster.md +1 -0
  217. package/src/prompts/system/subagent-system-prompt.md +1 -0
  218. package/src/prompts/system/system-prompt.md +1 -0
  219. package/src/prompts/tools/irc.md +1 -1
  220. package/src/registry/agent-registry.ts +3 -0
  221. package/src/sdk.ts +52 -1
  222. package/src/secrets/obfuscator.ts +4 -2
  223. package/src/session/agent-session.ts +670 -217
  224. package/src/session/cache-economics.ts +275 -0
  225. package/src/session/context-estimation.ts +91 -0
  226. package/src/session/provider-safety-stop.ts +9 -0
  227. package/src/session/session-dump-format.ts +6 -0
  228. package/src/session/session-manager.ts +809 -39
  229. package/src/session/session-storage.ts +582 -38
  230. package/src/skc-runtime/session-state-sidecar.ts +756 -135
  231. package/src/skc-runtime/tmux-common.ts +26 -7
  232. package/src/skc-runtime/tmux-gc.ts +52 -9
  233. package/src/skc-runtime/tmux-owner-isolation-cli.ts +185 -0
  234. package/src/skc-runtime/tmux-owner-isolation.ts +2060 -0
  235. package/src/skc-runtime/tmux-sessions.ts +871 -68
  236. package/src/slash-commands/builtin-registry.ts +153 -9
  237. package/src/slash-commands/helpers/context-report.ts +26 -4
  238. package/src/task/executor.ts +12 -3
  239. package/src/task/index.ts +8 -0
  240. package/src/task/receipt.ts +7 -2
  241. package/src/task/types.ts +26 -0
  242. package/src/tools/ask-answer-registry.ts +25 -0
  243. package/src/tools/browser/tab-supervisor.ts +63 -6
  244. package/src/tools/browser.ts +8 -3
  245. package/src/tools/index.ts +81 -6
  246. package/src/tools/sqlite-reader.ts +8 -4
  247. package/src/tui/output-block.ts +18 -6
  248. package/src/utils/external-editor.ts +6 -1
@@ -0,0 +1,309 @@
1
+ /**
2
+ * Provenance and lifecycle primitives for tmux-resident SKC owners.
3
+ * This module intentionally accepts and stores only opaque identifiers and
4
+ * process/cgroup metadata; it never reads panes, prompts, environment, or logs.
5
+ */
6
+ export declare const TMUX_OWNER_ISOLATION_SCHEMA_VERSION = 1;
7
+ export declare const TMUX_OWNER_ISOLATION_MAX_LINE_BYTES: number;
8
+ export declare const TMUX_OWNER_ISOLATION_MAX_DIAGNOSTIC_CHARS = 512;
9
+ export declare function tmuxOwnerIsolationBootstrapArgv(): string[];
10
+ export type CgroupClassification = "not_applicable" | "safe" | "unsafe_service" | "unverifiable";
11
+ export type ServerState = "absent" | "safe" | "unsafe" | "unverifiable";
12
+ export type PlanErrorCode = "scope_unavailable" | "server_unsafe" | "server_unverifiable" | "server_race" | "scope_bootstrap_failed";
13
+ export type ExpectedTerminalResult = "owner_term_then_session_cleanup";
14
+ export type TerminalSignal = "SIGTERM" | "SIGHUP" | "SIGINT" | "SIGKILL" | "EXIT" | "MANUAL" | "UNKNOWN";
15
+ export type VerdictClassification = "expected_operator_shutdown" | "unexpected_owner_loss" | "non_operator_cleanup";
16
+ export type TerminalObserver = "sidecar" | "raw_monitor";
17
+ export interface CgroupInfo {
18
+ classification: CgroupClassification;
19
+ scope?: string;
20
+ diagnostic?: string;
21
+ }
22
+ /** Classify only public cgroup path metadata; malformed Linux data fails closed. */
23
+ export declare function classifyCgroup(input: {
24
+ platform: NodeJS.Platform;
25
+ cgroupText?: string | null;
26
+ }): CgroupInfo;
27
+ export declare function ownerProcessStartTime(platform: NodeJS.Platform, stat: string | null): string | null;
28
+ export interface TmuxServerProof {
29
+ state: ServerState;
30
+ pid?: number;
31
+ startTime?: string;
32
+ cgroup?: CgroupInfo;
33
+ sessionNames?: string[];
34
+ }
35
+ export interface PlanRequest {
36
+ schema_version: 1;
37
+ op: "plan";
38
+ platform: NodeJS.Platform;
39
+ session_id: string;
40
+ owner_generation: string;
41
+ cwd: string;
42
+ state_dir: string;
43
+ socket_key: string;
44
+ tmux_argv: string[];
45
+ baseline: OwnerGenerationBaseline;
46
+ }
47
+ export interface PublishGenerationRequest {
48
+ schema_version: 1;
49
+ op: "publish_generation";
50
+ session_id: string;
51
+ owner_generation: string;
52
+ state_dir: string;
53
+ baseline: OwnerGenerationBaseline;
54
+ }
55
+ export interface PublishGenerationResult {
56
+ schema_version: 1;
57
+ ok: true;
58
+ code: "generation_published";
59
+ generation: string;
60
+ }
61
+ export interface AttemptCapability {
62
+ token: string;
63
+ session_name: string;
64
+ socket_key: string;
65
+ server_absent_before: boolean;
66
+ baseline: OwnerGenerationBaseline;
67
+ expires_at: string;
68
+ }
69
+ export interface DirectExecution {
70
+ mode: "direct";
71
+ argv: string[];
72
+ attempt_session: string;
73
+ server_key: string;
74
+ server_absent_before: boolean;
75
+ server_pid?: number;
76
+ server_start_time?: string;
77
+ }
78
+ export interface ScopedExecution {
79
+ mode: "scoped";
80
+ argv: string[];
81
+ stdin_line: string;
82
+ expected_scope: string;
83
+ attempt: AttemptCapability;
84
+ attempt_session: string;
85
+ server_key: string;
86
+ server_absent_before: true;
87
+ }
88
+ export type PlanExecution = DirectExecution | ScopedExecution;
89
+ export interface PlanSuccess {
90
+ schema_version: 1;
91
+ ok: true;
92
+ code: "not_required" | "unsafe_scope_required";
93
+ execution: PlanExecution;
94
+ classification: CgroupInfo;
95
+ server_state: ServerState;
96
+ }
97
+ export interface TmuxOwnerIsolationExecutionSuccess {
98
+ ok: true;
99
+ code: "executed";
100
+ execution: PlanExecution;
101
+ server: TmuxServerProof;
102
+ server_key: string;
103
+ server_pid: number;
104
+ server_start_time: string;
105
+ server_session: string;
106
+ native_session_id?: string;
107
+ }
108
+ export interface PlanFailure {
109
+ schema_version: 1;
110
+ ok: false;
111
+ code: PlanErrorCode;
112
+ diagnostic: string;
113
+ }
114
+ export type PlanResponse = PlanSuccess | PlanFailure;
115
+ export interface OwnerIsolationProbe {
116
+ readCallerCgroup(): Promise<string | null>;
117
+ probeServer(socketKey: string, tmuxArgv?: string[]): Promise<TmuxServerProof>;
118
+ }
119
+ /** Synchronous probe boundary for managed launch paths. */
120
+ export interface OwnerIsolationProbeSync {
121
+ readCallerCgroup(): string | null;
122
+ probeServer(socketKey: string): TmuxServerProof;
123
+ recordAttempt(input: {
124
+ stateDir: string;
125
+ sessionId: string;
126
+ generation: string;
127
+ attempt: AttemptCapability;
128
+ }): void;
129
+ }
130
+ export interface TmuxOwnerIsolationExecutionFailure {
131
+ ok: false;
132
+ code: PlanErrorCode;
133
+ diagnostic: string;
134
+ }
135
+ export type TmuxOwnerIsolationExecutionResult = TmuxOwnerIsolationExecutionSuccess | TmuxOwnerIsolationExecutionFailure;
136
+ /** Synchronous spawn boundary; callers pass argv and scoped stdin unchanged. */
137
+ export interface TmuxOwnerIsolationExecutionDependencies {
138
+ socketKey: string;
139
+ spawn(argv: string[], stdinLine?: string): {
140
+ exitCode: number | null;
141
+ stdout?: string;
142
+ };
143
+ probeServer(socketKey: string): TmuxServerProof;
144
+ /** Reads the published owner generation immediately around direct execution. */
145
+ isCurrentGeneration?(): boolean;
146
+ cleanupSpawned?(input: {
147
+ execution: DirectExecution;
148
+ nativeSessionId: string;
149
+ server: TmuxServerProof;
150
+ }): void;
151
+ }
152
+ export declare function isExactScopedBootstrapSuccessReceipt(stdout: string): boolean;
153
+ /**
154
+ * Synchronous equivalent of the target-server truth table for managed callers.
155
+ * Attempt persistence is injected so a caller can use its existing atomic state writer.
156
+ */
157
+ export declare function planTmuxOwnerIsolationSync(request: PlanRequest, probe: OwnerIsolationProbeSync): PlanResponse;
158
+ /**
159
+ * Runs one planned argv exactly and re-proves the target server before callers
160
+ * perform profile, attach, or cleanup operations.
161
+ */
162
+ export declare function executeTmuxOwnerIsolationPlanSync(plan: PlanResponse, deps: TmuxOwnerIsolationExecutionDependencies): TmuxOwnerIsolationExecutionResult;
163
+ /** Implements the target-server truth table before any tmux operation. */
164
+ export declare function planTmuxOwnerIsolation(request: PlanRequest, probe: OwnerIsolationProbe): Promise<PlanResponse>;
165
+ export interface BootstrapRequest {
166
+ schema_version: 1;
167
+ op: "bootstrap";
168
+ session_id: string;
169
+ owner_generation: string;
170
+ state_dir: string;
171
+ socket_key: string;
172
+ expected_scope: string;
173
+ tmux_argv: string[];
174
+ attempt: AttemptCapability;
175
+ }
176
+ export interface BootstrapResult {
177
+ schema_version: 1;
178
+ ok: boolean;
179
+ code: "bootstrapped" | "scope_bootstrap_failed";
180
+ native_session_id?: string;
181
+ server_pid?: number;
182
+ server_start_time?: string;
183
+ session_name?: string;
184
+ diagnostic?: string;
185
+ }
186
+ export interface BootstrapDependencies {
187
+ readSelfCgroup(): Promise<string | null>;
188
+ spawn(argv: string[]): {
189
+ exitCode: number | null;
190
+ stdout?: string;
191
+ };
192
+ probeServer(socketKey: string, tmuxControlArgv?: string[]): Promise<TmuxServerProof>;
193
+ }
194
+ /** Self-proves the scope and synchronously invokes the exact supplied argv. */
195
+ export declare function bootstrapTmuxOwnerIsolation(request: BootstrapRequest, deps: BootstrapDependencies): Promise<BootstrapResult>;
196
+ export interface OwnerIntent {
197
+ schema_version: 1;
198
+ intent_id: string;
199
+ generation: string;
200
+ session_id: string;
201
+ server_key: string;
202
+ expected_terminal: {
203
+ signal: "SIGTERM";
204
+ result: ExpectedTerminalResult;
205
+ };
206
+ dispatch_id: string;
207
+ created_at: string;
208
+ expires_at: string;
209
+ state: "pending";
210
+ }
211
+ export interface OwnerVerdict {
212
+ schema_version: 1;
213
+ generation: string;
214
+ session_id: string;
215
+ server_key: string;
216
+ observed_at: string;
217
+ signal: TerminalSignal;
218
+ exit_code: number | null;
219
+ result: string;
220
+ observer: TerminalObserver;
221
+ classification: VerdictClassification;
222
+ reason: string;
223
+ intent_id?: string;
224
+ dedupe_key: string;
225
+ }
226
+ export interface OwnerIncident {
227
+ schema_version: 1;
228
+ generation: string;
229
+ session_id: string;
230
+ dedupe_key: string;
231
+ created_at: string;
232
+ classification: "unexpected_owner_loss";
233
+ }
234
+ export interface ObserveTerminalRequest {
235
+ schema_version: 1;
236
+ op: "observe_terminal";
237
+ session_id: string;
238
+ owner_generation: string;
239
+ state_dir: string;
240
+ socket_key: string;
241
+ observer: TerminalObserver;
242
+ observed_at: string;
243
+ signal: TerminalSignal;
244
+ exit_code: number | null;
245
+ exit_kind: string;
246
+ reason: string;
247
+ operator_dispatch_id?: string;
248
+ }
249
+ export interface LifecyclePaths {
250
+ root: string;
251
+ generation: string;
252
+ generationFile: string;
253
+ generationMarkerFile: string;
254
+ intentFile: string;
255
+ verdictFile: string;
256
+ verdictAliasFile: string;
257
+ incidentFile: string;
258
+ lockDatabaseFile: string;
259
+ journalFile: string;
260
+ }
261
+ export declare function lifecyclePaths(stateDir: string, sessionId: string, generation: string): LifecyclePaths;
262
+ export declare function replaceOwnerGeneration(stateDir: string, sessionId: string, generation?: string, expectedBaseline?: OwnerGenerationBaseline): Promise<string>;
263
+ export type OwnerGenerationBaseline = {
264
+ state: "absent";
265
+ } | {
266
+ state: "current";
267
+ schema_version: 1;
268
+ generation: string;
269
+ session_id: string;
270
+ published_at: string;
271
+ };
272
+ export declare function captureOwnerGenerationBaseline(stateDir: string, sessionId: string): Promise<OwnerGenerationBaseline>;
273
+ /** Captures the full immutable generation record for a planned owner launch. */
274
+ export declare function captureOwnerGenerationBaselineSync(stateDir: string, sessionId: string): OwnerGenerationBaseline;
275
+ export declare function isOwnerGenerationBaselineCurrentSync(stateDir: string, sessionId: string, baseline: OwnerGenerationBaseline): boolean;
276
+ /** Synchronous publication for managed launch paths, serialized by a SQLite write transaction. */
277
+ export declare function replaceOwnerGenerationSync(stateDir: string, sessionId: string, generation: string, expectedBaseline: OwnerGenerationBaseline): string;
278
+ /** Publishes a raw-owner generation through the canonical SQLite-serialized CAS path. */
279
+ export declare function publishOwnerGenerationSync(request: PublishGenerationRequest): PublishGenerationResult;
280
+ export declare function createOwnerIntent(stateDir: string, input: Omit<OwnerIntent, "schema_version" | "intent_id" | "state">): Promise<OwnerIntent>;
281
+ /** Publish exactly one terminal verdict. Existing valid verdicts always win. */
282
+ export declare function observeOwnerTerminal(request: ObserveTerminalRequest): Promise<OwnerVerdict>;
283
+ /** Strictly validate the persisted authorization, optionally against its terminal observation. */
284
+ export declare function isValidOwnerIntent(intent: unknown, request?: ObserveTerminalRequest): intent is OwnerIntent;
285
+ /** Accept only real UTC timestamps in the canonical evidence serialization. */
286
+ export declare function isCanonicalUtcTimestamp(value: unknown): value is string;
287
+ /** Strictly validate a complete persisted verdict, optionally against its observation. */
288
+ export declare function isValidOwnerVerdict(verdict: unknown, request?: ObserveTerminalRequest): verdict is OwnerVerdict;
289
+ export interface ExactOwnerCloseRequest {
290
+ stateDir: string;
291
+ sessionId: string;
292
+ generation: string;
293
+ serverKey: string;
294
+ pid: number;
295
+ startTime: string;
296
+ dispatchId: string;
297
+ createdAt: string;
298
+ expiresAt: string;
299
+ }
300
+ export interface ExactOwnerCloseDependencies {
301
+ readStartTime(pid: number): Promise<string | null>;
302
+ sendSigterm(pid: number): Promise<void>;
303
+ waitForVerdict(): Promise<OwnerVerdict | null>;
304
+ cleanupSession(): Promise<void>;
305
+ }
306
+ /** Authorizes only an exact, start-time-validated SIGTERM before compatibility cleanup. */
307
+ export declare function closeExactTmuxOwner(request: ExactOwnerCloseRequest, deps: ExactOwnerCloseDependencies): Promise<OwnerVerdict>;
308
+ export declare function parseOwnerIsolationRequest(line: string): PlanRequest | BootstrapRequest | PublishGenerationRequest | ObserveTerminalRequest | null;
309
+ export declare function serializeOwnerIsolationResponse(response: PlanResponse | BootstrapResult | PublishGenerationResult | OwnerVerdict): string;
@@ -1,3 +1,4 @@
1
+ import { type OwnerIsolationProbeSync, type PlanResponse, type TmuxOwnerIsolationExecutionDependencies, type TmuxOwnerIsolationExecutionResult } from "./tmux-owner-isolation";
1
2
  export interface SkcTmuxSessionStatus {
2
3
  name: string;
3
4
  attached: boolean;
@@ -11,6 +12,8 @@ export interface SkcTmuxSessionStatus {
11
12
  sessionId?: string;
12
13
  sessionStateFile?: string;
13
14
  version?: string;
15
+ ownerGeneration?: string;
16
+ nativeSessionId?: string;
14
17
  panePids: number[];
15
18
  profile?: string;
16
19
  }
@@ -22,6 +25,8 @@ export interface SkcTmuxSessionTagsForGc {
22
25
  sessionId?: string;
23
26
  sessionStateFile?: string;
24
27
  version?: string;
28
+ ownerGeneration?: string;
29
+ nativeSessionId?: string;
25
30
  createdAt?: string;
26
31
  attached?: boolean;
27
32
  panePids?: number[];
@@ -30,6 +35,44 @@ export interface SkcTmuxSessionsForGc {
30
35
  tagged: SkcTmuxSessionStatus[];
31
36
  untagged: SkcTmuxSessionStatus[];
32
37
  }
38
+ export interface ProvenTmuxSessionIdentity {
39
+ nativeSessionId: string;
40
+ serverPid: number;
41
+ serverStartTime: string;
42
+ }
43
+ export interface ExpectedSkcTmuxSessionIdentity {
44
+ nativeSessionId: string;
45
+ ownerGeneration: string;
46
+ sessionId: string;
47
+ sessionStateFile: string;
48
+ project: string;
49
+ createdAt: string;
50
+ }
51
+ export interface ExactOwnerIdentity {
52
+ sessionId: string;
53
+ stateDir: string;
54
+ socketKey: string;
55
+ generation: string;
56
+ pid: number;
57
+ startTime: string;
58
+ }
59
+ export interface ForceCloseOwnerDependencies {
60
+ resolveOwner(sessionName: string, env: NodeJS.ProcessEnv): Promise<ExactOwnerIdentity>;
61
+ signalTerm(pid: number): void;
62
+ readProcessStartTime(pid: number): Promise<string | null>;
63
+ cleanupSession(sessionTarget: string, env: NodeJS.ProcessEnv): void;
64
+ now(): Date;
65
+ sleep(ms: number): Promise<void>;
66
+ listPanePids(sessionName: string, env: NodeJS.ProcessEnv): number[];
67
+ }
68
+ export type CreateOwnerIsolationTestDependencies = {
69
+ probe?: Partial<OwnerIsolationProbeSync>;
70
+ execute?: (plan: PlanResponse, deps: TmuxOwnerIsolationExecutionDependencies) => TmuxOwnerIsolationExecutionResult;
71
+ };
72
+ /** @internal Test-only seam; production create always uses live fail-closed probes. */
73
+ export declare function __setCreateOwnerIsolationForTests(dependencies: CreateOwnerIsolationTestDependencies | null): void;
74
+ /** @internal Test-only seam; production mutations always use live fail-closed proofs. */
75
+ export declare function __setMutationServerProofForTests(dependency: ((tmuxCommand: string, env: NodeJS.ProcessEnv) => unknown) | null): void;
33
76
  export declare function listSkcTmuxSessions(env?: NodeJS.ProcessEnv): SkcTmuxSessionStatus[];
34
77
  /** @internal */
35
78
  export declare function listTmuxSessionsForGc(env?: NodeJS.ProcessEnv): SkcTmuxSessionsForGc;
@@ -38,25 +81,14 @@ export declare function findSkcTmuxSessionByName(sessionName: string, env?: Node
38
81
  export declare function findSkcTmuxSessionByScope(project: string, branch: string | null | undefined, env?: NodeJS.ProcessEnv): SkcTmuxSessionStatus | undefined;
39
82
  export declare function statusSkcTmuxSession(sessionName: string, env?: NodeJS.ProcessEnv): SkcTmuxSessionStatus;
40
83
  export declare function createSkcTmuxSession(env?: NodeJS.ProcessEnv): SkcTmuxSessionStatus;
84
+ /** Proves a managed reusable name still resolves to one immutable session on one server. */
85
+ export declare function proveSkcTmuxSessionMutationTarget(sessionName: string, env?: NodeJS.ProcessEnv): ProvenTmuxSessionIdentity;
41
86
  /** @internal */
42
87
  export declare function readTmuxSessionTagsForGc(sessionName: string, env?: NodeJS.ProcessEnv): SkcTmuxSessionTagsForGc;
43
- export declare function removeSkcTmuxSession(sessionName: string, env?: NodeJS.ProcessEnv): SkcTmuxSessionStatus;
88
+ export declare function removeSkcTmuxSession(sessionName: string, env?: NodeJS.ProcessEnv, expectedIdentity?: ExpectedSkcTmuxSessionIdentity): SkcTmuxSessionStatus;
44
89
  /**
45
- * Force-close a SKC-managed tmux session, even if a live pane is attached.
46
- *
47
- * This is the lifecycle-control counterpart to {@link removeSkcTmuxSession}: it
48
- * intentionally does NOT refuse live/attached panes (hard-kill is the contract),
49
- * but it keeps every safety check so it can only ever kill a genuinely
50
- * SKC-managed session:
51
- * - re-reads the exact tmux profile immediately before kill (never a non-SKC
52
- * session, even one that collides by name);
53
- * - when `expectedSessionId` is given, requires the `@skc-session-id` tag match;
54
- * - when `expectedStateFile` is given, requires the `@skc-session-state-file`
55
- * tag match.
56
- *
57
- * Returns the prior status (for audit). Throws a tagged error otherwise:
58
- * `skc_tmux_session_not_found`, `skc_tmux_session_not_managed`,
59
- * `skc_tmux_session_id_mismatch`, or `skc_tmux_session_state_file_mismatch`.
90
+ * Requests an exact tagged owner shutdown. Session cleanup is compatibility-only
91
+ * and follows a validated SIGTERM verdict; it never authorizes the close.
60
92
  */
61
- export declare function forceCloseSkcTmuxSession(sessionName: string, env?: NodeJS.ProcessEnv, expectedSessionId?: string, expectedStateFile?: string): SkcTmuxSessionStatus;
93
+ export declare function forceCloseSkcTmuxSession(sessionName: string, env?: NodeJS.ProcessEnv, expectedSessionId?: string, expectedStateFile?: string, deps?: Partial<ForceCloseOwnerDependencies>): Promise<SkcTmuxSessionStatus>;
62
94
  export declare function attachSkcTmuxSession(sessionName: string, env?: NodeJS.ProcessEnv): never;
@@ -1,7 +1,7 @@
1
1
  import type { AgentDefinition, AgentSource } from "./types";
2
2
  export declare class AgentParsingError extends Error {
3
- readonly source?: unknown;
4
- constructor(error: Error, source?: unknown);
3
+ readonly source?: unknown | undefined;
4
+ constructor(error: Error, source?: unknown | undefined);
5
5
  toString(): string;
6
6
  }
7
7
  /**
@@ -11,6 +11,7 @@ import { Settings } from "../config/settings";
11
11
  import { type Skill } from "../extensibility/skills";
12
12
  import type { HindsightSessionState } from "../hindsight/state";
13
13
  import type { LocalProtocolOptions } from "../internal-urls";
14
+ import { AgentRegistry } from "../registry/agent-registry";
14
15
  import type { ForkContextSeed } from "../session/agent-session";
15
16
  import type { ArtifactManager } from "../session/artifacts";
16
17
  import type { AuthStorage } from "../session/auth-storage";
@@ -61,6 +62,8 @@ export interface ExecutorOptions {
61
62
  authStorage?: AuthStorage;
62
63
  modelRegistry?: ModelRegistry;
63
64
  settings?: Settings;
65
+ /** Parent session's registry; shared by child sessions for IRC routing and roster visibility. */
66
+ agentRegistry?: AgentRegistry;
64
67
  /**
65
68
  * Live service-tier intent of the parent session (`AgentSession.serviceTier`),
66
69
  * used as the inherited tier when `task.serviceTier === "inherit"`. Passing the
@@ -1,4 +1,4 @@
1
- import type { SingleResult, TaskToolDetails } from "./types";
1
+ import { type SingleResult, type TaskToolDetails } from "./types";
2
2
  export interface TaskRoi {
3
3
  tokens: number;
4
4
  contextTokens?: number;
@@ -31,6 +31,7 @@ export interface TaskResultReceipt {
31
31
  modelSubstitutionWarning?: SingleResult["modelSubstitutionWarning"];
32
32
  usage?: SingleResult["usage"];
33
33
  cost?: number;
34
+ usageCostBreakdownComplete?: true;
34
35
  branchName?: string;
35
36
  retryFailure?: {
36
37
  attempt: number;
@@ -77,6 +78,7 @@ export interface RawTaskToolDetails {
77
78
  results: SingleResult[];
78
79
  totalDurationMs: number;
79
80
  usage?: TaskToolDetails["usage"];
81
+ usageCostBreakdownComplete?: TaskToolDetails["usageCostBreakdownComplete"];
80
82
  async?: TaskToolDetails["async"];
81
83
  forkContextClonedTokens?: number;
82
84
  roiSummary?: TaskToolDetails["roiSummary"];
@@ -46,11 +46,11 @@ export declare const taskItemSchema: z.ZodObject<{
46
46
  description: z.ZodString;
47
47
  assignment: z.ZodString;
48
48
  inheritContext: z.ZodOptional<z.ZodEnum<{
49
- bounded: "bounded";
50
- full: "full";
51
- "last-turn": "last-turn";
52
49
  none: "none";
53
50
  receipt: "receipt";
51
+ "last-turn": "last-turn";
52
+ bounded: "bounded";
53
+ full: "full";
54
54
  }>>;
55
55
  }, z.core.$strip>;
56
56
  export type TaskItem = z.infer<typeof taskItemSchema>;
@@ -61,11 +61,11 @@ export declare const taskSchema: z.ZodObject<{
61
61
  description: z.ZodString;
62
62
  assignment: z.ZodString;
63
63
  inheritContext: z.ZodOptional<z.ZodEnum<{
64
- bounded: "bounded";
65
- full: "full";
66
- "last-turn": "last-turn";
67
64
  none: "none";
68
65
  receipt: "receipt";
66
+ "last-turn": "last-turn";
67
+ bounded: "bounded";
68
+ full: "full";
69
69
  }>>;
70
70
  }, z.core.$strip>>;
71
71
  spawnPlan: z.ZodOptional<z.ZodObject<{
@@ -83,11 +83,11 @@ export declare const taskSchemaNoIsolation: z.ZodObject<{
83
83
  description: z.ZodString;
84
84
  assignment: z.ZodString;
85
85
  inheritContext: z.ZodOptional<z.ZodEnum<{
86
- bounded: "bounded";
87
- full: "full";
88
- "last-turn": "last-turn";
89
86
  none: "none";
90
87
  receipt: "receipt";
88
+ "last-turn": "last-turn";
89
+ bounded: "bounded";
90
+ full: "full";
91
91
  }>>;
92
92
  }, z.core.$strip>>;
93
93
  spawnPlan: z.ZodOptional<z.ZodObject<{
@@ -105,11 +105,11 @@ declare const ALL_TASK_SCHEMAS: readonly [z.ZodObject<{
105
105
  description: z.ZodString;
106
106
  assignment: z.ZodString;
107
107
  inheritContext: z.ZodOptional<z.ZodEnum<{
108
- bounded: "bounded";
109
- full: "full";
110
- "last-turn": "last-turn";
111
108
  none: "none";
112
109
  receipt: "receipt";
110
+ "last-turn": "last-turn";
111
+ bounded: "bounded";
112
+ full: "full";
113
113
  }>>;
114
114
  }, z.core.$strip>>;
115
115
  spawnPlan: z.ZodOptional<z.ZodObject<{
@@ -126,11 +126,11 @@ declare const ALL_TASK_SCHEMAS: readonly [z.ZodObject<{
126
126
  description: z.ZodString;
127
127
  assignment: z.ZodString;
128
128
  inheritContext: z.ZodOptional<z.ZodEnum<{
129
- bounded: "bounded";
130
- full: "full";
131
- "last-turn": "last-turn";
132
129
  none: "none";
133
130
  receipt: "receipt";
131
+ "last-turn": "last-turn";
132
+ bounded: "bounded";
133
+ full: "full";
134
134
  }>>;
135
135
  }, z.core.$strip>>;
136
136
  spawnPlan: z.ZodOptional<z.ZodObject<{
@@ -147,11 +147,11 @@ declare const ALL_TASK_SCHEMAS: readonly [z.ZodObject<{
147
147
  description: z.ZodString;
148
148
  assignment: z.ZodString;
149
149
  inheritContext: z.ZodOptional<z.ZodEnum<{
150
- bounded: "bounded";
151
- full: "full";
152
- "last-turn": "last-turn";
153
150
  none: "none";
154
151
  receipt: "receipt";
152
+ "last-turn": "last-turn";
153
+ bounded: "bounded";
154
+ full: "full";
155
155
  }>>;
156
156
  }, z.core.$strip>>;
157
157
  spawnPlan: z.ZodOptional<z.ZodObject<{
@@ -168,11 +168,11 @@ declare const ALL_TASK_SCHEMAS: readonly [z.ZodObject<{
168
168
  description: z.ZodString;
169
169
  assignment: z.ZodString;
170
170
  inheritContext: z.ZodOptional<z.ZodEnum<{
171
- bounded: "bounded";
172
- full: "full";
173
- "last-turn": "last-turn";
174
171
  none: "none";
175
172
  receipt: "receipt";
173
+ "last-turn": "last-turn";
174
+ bounded: "bounded";
175
+ full: "full";
176
176
  }>>;
177
177
  }, z.core.$strip>>;
178
178
  spawnPlan: z.ZodOptional<z.ZodObject<{
@@ -189,11 +189,11 @@ declare const ALL_TASK_SCHEMAS: readonly [z.ZodObject<{
189
189
  description: z.ZodString;
190
190
  assignment: z.ZodString;
191
191
  inheritContext: z.ZodOptional<z.ZodEnum<{
192
- bounded: "bounded";
193
- full: "full";
194
- "last-turn": "last-turn";
195
192
  none: "none";
196
193
  receipt: "receipt";
194
+ "last-turn": "last-turn";
195
+ bounded: "bounded";
196
+ full: "full";
197
197
  }>>;
198
198
  }, z.core.$strip>>;
199
199
  spawnPlan: z.ZodOptional<z.ZodObject<{
@@ -210,11 +210,11 @@ declare const ALL_TASK_SCHEMAS: readonly [z.ZodObject<{
210
210
  description: z.ZodString;
211
211
  assignment: z.ZodString;
212
212
  inheritContext: z.ZodOptional<z.ZodEnum<{
213
- bounded: "bounded";
214
- full: "full";
215
- "last-turn": "last-turn";
216
213
  none: "none";
217
214
  receipt: "receipt";
215
+ "last-turn": "last-turn";
216
+ bounded: "bounded";
217
+ full: "full";
218
218
  }>>;
219
219
  }, z.core.$strip>>;
220
220
  spawnPlan: z.ZodOptional<z.ZodObject<{
@@ -387,6 +387,8 @@ export interface SingleResult {
387
387
  paused?: boolean;
388
388
  /** Aggregated usage from the subprocess, accumulated incrementally from message_end events. */
389
389
  usage?: Usage;
390
+ /** True only when every usage-contributing assistant supplied a complete, non-negative raw cost breakdown. */
391
+ usageCostBreakdownComplete?: true;
390
392
  /** Output path for the task result */
391
393
  outputPath?: string;
392
394
  /** Patch path for isolated worktree output */
@@ -430,6 +432,10 @@ export interface SingleResult {
430
432
  reasons: string[];
431
433
  };
432
434
  }
435
+ /** True only for complete, factual five-bucket cost accounting. */
436
+ export declare function hasCompleteUsageCostBreakdown(usage: unknown): boolean;
437
+ /** True only when every usage-contributing result has explicit, complete cost provenance. */
438
+ export declare function hasCompleteAggregateUsageCostBreakdown(results: readonly Pick<SingleResult, "usage" | "usageCostBreakdownComplete">[]): boolean;
433
439
  /** Tool details for TUI rendering */
434
440
  export interface TaskToolDetails {
435
441
  projectAgentsDir: string | null;
@@ -437,6 +443,8 @@ export interface TaskToolDetails {
437
443
  totalDurationMs: number;
438
444
  /** Aggregated usage across all subagents. */
439
445
  usage?: Usage;
446
+ /** True only when every usage-contributing subagent supplied a complete raw cost breakdown. */
447
+ usageCostBreakdownComplete?: true;
440
448
  /** Aggregate cloned tokens copied into fork-context seeds across subagents. */
441
449
  forkContextClonedTokens?: number;
442
450
  roiSummary?: {
@@ -6,8 +6,13 @@
6
6
  * through the extension/runner/controller wiring. A session has at most one
7
7
  * source; registering returns a disposer.
8
8
  */
9
+ import type { WorkflowGateEmitter } from "../modes/shared/agent-wire/unattended-session";
9
10
  import type { AskAnswerSource } from "./index";
10
11
  /** Register `source` for `sessionId`. Returns a disposer that clears it. */
11
12
  export declare function registerAskAnswerSource(sessionId: string, source: AskAnswerSource): () => void;
12
13
  /** The answer source for `sessionId`, if one is registered. */
13
14
  export declare function getAskAnswerSource(sessionId: string): AskAnswerSource | undefined;
15
+ /** Publish a session's current workflow-gate emitter after mode initialization. */
16
+ export declare function notifyWorkflowGateEmitterChanged(sessionId: string, emitter: WorkflowGateEmitter | undefined): void;
17
+ /** Observe workflow-gate emitter installation even when it occurs after session_start. */
18
+ export declare function registerWorkflowGateEmitterListener(sessionId: string, listener: (emitter: WorkflowGateEmitter | undefined) => void): () => void;
@@ -86,7 +86,7 @@ export declare class BashTool implements AgentTool<BashToolSchema, BashToolDetai
86
86
  label: string;
87
87
  commandCwd: string;
88
88
  }>;
89
- execute(_toolCallId: string, { command: rawCommand, env: rawEnv, timeout: rawTimeout, cwd, async: asyncRequested, pty }: BashToolInput, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback<BashToolDetails>, ctx?: AgentToolContext): Promise<AgentToolResult<BashToolDetails>>;
89
+ execute(_toolCallId: string, { command: rawCommand, env: rawEnv, timeout: rawTimeout, cwd, async: asyncRequested, pty, }: BashToolInput, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback<BashToolDetails>, ctx?: AgentToolContext): Promise<AgentToolResult<BashToolDetails>>;
90
90
  }
91
91
  export interface BashRenderArgs {
92
92
  command?: string;
@@ -60,6 +60,12 @@ export interface RunInTabOptions {
60
60
  }
61
61
  export interface ReleaseTabOptions {
62
62
  kill?: boolean;
63
+ /**
64
+ * Absolute end-to-end deadline (`Date.now()`-based, ms) for the whole teardown chain.
65
+ * Shared across a `releaseAllTabs` loop so close/close-all honors ONE aggregate budget.
66
+ * Omitted (the GC/session-teardown callers) keeps the original unbounded behavior.
67
+ */
68
+ deadlineAt?: number;
63
69
  }
64
70
  export declare function getTab(name: string): TabSession | undefined;
65
71
  /** Read-only, GC-facing projection of a live tab. Never exposes the mutable `tabs` map. */