@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
@@ -1,10 +1,10 @@
1
- import type { AgentMessage } from "@sayknow-cli/agent-core";
1
+ import { type AgentMessage } from "@sayknow-cli/agent-core";
2
2
  import type { ImageContent, Message, MessageAttribution, ServiceTier, TextContent } from "@sayknow-cli/ai";
3
3
  import type { TtsrInjectionRecord } from "../export/ttsr";
4
4
  import { ArtifactManager } from "./artifacts";
5
5
  import { type BlobPutResult, BlobStore } from "./blob-store";
6
6
  import { type BashExecutionMessage, type CustomMessage, type FileMentionMessage, type HookMessage, type PythonExecutionMessage } from "./messages";
7
- import type { SessionStorage } from "./session-storage";
7
+ import type { SessionStorage, SessionStorageStat, VerifiedSessionDeleteResult, VerifiedSessionDeleteTarget } from "./session-storage";
8
8
  export declare const CURRENT_SESSION_VERSION = 3;
9
9
  export interface SessionHeader {
10
10
  type: "session";
@@ -73,6 +73,13 @@ export interface SessionMessageEntry extends SessionEntryBase {
73
73
  * metadata (not a message field) so strict message types stay intact. */
74
74
  evictedContent?: EvictedContentMarker;
75
75
  }
76
+ export declare function associateSessionMessageEntryId(message: AgentMessage, entryId: string): void;
77
+ export declare function getSessionMessageEntryId(message: AgentMessage): string | undefined;
78
+ export declare function associateSessionMessageObservationId(message: AgentMessage, observationId: string): string;
79
+ export declare function getSessionMessageObservationId(message: AgentMessage): string | undefined;
80
+ export declare function associateSessionMessageViewportAnchorId(message: AgentMessage, anchorId: string): void;
81
+ export declare function getSessionMessageViewportAnchorId(message: AgentMessage): string | undefined;
82
+ export declare function transferSessionMessageIdentity(source: AgentMessage[], target: AgentMessage[]): void;
76
83
  export interface ThinkingLevelChangeEntry extends SessionEntryBase {
77
84
  type: "thinking_level_change";
78
85
  thinkingLevel?: string | null;
@@ -230,6 +237,40 @@ export interface SessionContext {
230
237
  /** Mode-specific data from the last mode_change entry */
231
238
  modeData?: Record<string, unknown>;
232
239
  }
240
+ /** Immutable fingerprint captured during read-only resume inspection. */
241
+ export interface ResumeSessionIdentity {
242
+ canonicalPath: string;
243
+ sessionId: string;
244
+ dev: bigint;
245
+ ino: bigint;
246
+ size: number;
247
+ mtimeMs: number;
248
+ mtimeNs: bigint;
249
+ sha256: string;
250
+ }
251
+ export interface ResumeTailResumable {
252
+ kind: "resumable";
253
+ identity: ResumeSessionIdentity;
254
+ }
255
+ export interface ResumeTailTerminal {
256
+ kind: "terminal";
257
+ identity: ResumeSessionIdentity;
258
+ }
259
+ export interface ResumeTailError {
260
+ kind: "error";
261
+ reason: "missing" | "malformed" | "unstable" | "read-failed";
262
+ }
263
+ export type ResumeTailInspection = ResumeTailResumable | ResumeTailTerminal | ResumeTailError;
264
+ export interface StrictSessionOpenSuccess {
265
+ kind: "opened";
266
+ manager: SessionManager;
267
+ }
268
+ export interface StrictSessionOpenFailure {
269
+ kind: "error";
270
+ reason: ResumeTailError["reason"] | "identity-mismatch";
271
+ }
272
+ /** Result of opening an inspected session without create-or-rewrite fallback. */
273
+ export type StrictSessionOpenResult = StrictSessionOpenSuccess | StrictSessionOpenFailure;
233
274
  export interface SessionInfo {
234
275
  path: string;
235
276
  id: string;
@@ -246,6 +287,47 @@ export interface SessionInfo {
246
287
  firstMessage: string;
247
288
  allMessagesText: string;
248
289
  }
290
+ /** Kind of failure surfaced by strict scoped inventory. Any failure grants zero authority. */
291
+ export type StrictInventoryFailureKind = "root" | "scan" | "lstat" | "read" | "parse" | "stat" | "header" | "cwd" | "containment" | "identity";
292
+ /** Sanitized strict-inventory failure. Never carries raw file content. */
293
+ export interface StrictInventoryFailure {
294
+ kind: StrictInventoryFailureKind;
295
+ message: string;
296
+ path?: string;
297
+ }
298
+ /** One exact-identity candidate suitable for ACP authorization binding. */
299
+ export interface StrictInventoryCandidate {
300
+ /** Canonical absolute transcript path. */
301
+ path: string;
302
+ /** Session id parsed from the header. */
303
+ id: string;
304
+ /** Canonical cwd parsed from the header. */
305
+ cwd: string;
306
+ /** Descriptor-bound transcript identity (dev, ino, ...). */
307
+ identity: SessionStorageStat;
308
+ }
309
+ /**
310
+ * Strict inventory result. `complete` carries the full validated candidate set;
311
+ * `failure` carries every sanitized failure and grants zero page/cursor/authority.
312
+ * A failure result is never reduced to a partial candidate set.
313
+ */
314
+ export type StrictInventoryResult = {
315
+ kind: "complete";
316
+ candidates: StrictInventoryCandidate[];
317
+ } | {
318
+ kind: "failure";
319
+ failures: StrictInventoryFailure[];
320
+ };
321
+ /** Certainty-aware close outcome for strict ACP disposal. */
322
+ export type SessionManagerCloseOutcome = {
323
+ kind: "closed";
324
+ } | {
325
+ kind: "close_failed_retryable";
326
+ error: Error;
327
+ } | {
328
+ kind: "close_unknown";
329
+ error: Error;
330
+ };
249
331
  export type ReadonlySessionManager = Pick<SessionManager, "getCwd" | "getSessionDir" | "getSessionId" | "getSessionFile" | "getSessionName" | "getArtifactsDir" | "getArtifactManager" | "allocateArtifactPath" | "saveArtifact" | "getArtifactPath" | "getLeafId" | "getLeafEntry" | "getEntry" | "getLabel" | "getBranch" | "getHeader" | "getEntries" | "getTree" | "getUsageStatistics" | "putBlob">;
250
332
  /** Exported for testing */
251
333
  export declare function migrateSessionEntries(entries: FileEntry[]): void;
@@ -257,7 +339,7 @@ export declare function getLatestCompactionEntry(entries: SessionEntry[]): Compa
257
339
  * If leafId is provided, walks from that entry to root.
258
340
  * Handles compaction and branch summaries along the path.
259
341
  */
260
- export declare function buildSessionContext(entries: SessionEntry[], leafId?: string | null, byId?: Map<string, SessionEntry>): SessionContext;
342
+ export declare function buildSessionContext(entries: SessionEntry[], leafId?: string | null, byId?: Map<string, SessionEntry>, sessionIdentityNamespace?: string): SessionContext;
261
343
  /** Exported for testing */
262
344
  export declare function loadEntriesFromFile(filePath: string, storage?: SessionStorage): Promise<FileEntry[]>;
263
345
  declare class RecentSessionInfo {
@@ -386,6 +468,15 @@ export declare class SessionManager {
386
468
  flush(): Promise<void>;
387
469
  /** Close the persistent writer after flushing all pending data. */
388
470
  close(): Promise<void>;
471
+ /** Flush while open, then strictly close; retryable close skips the invalid second flush. */
472
+ flushAndCloseStrict(): Promise<SessionManagerCloseOutcome>;
473
+ /**
474
+ * Strictly flush and close the persist writer, returning the certainty-aware close
475
+ * outcome without manufacturing success. The existing {@link close} path is
476
+ * preserved for best-effort callers; this seam lets strict ACP disposal prove
477
+ * writer closure before any destructive operation.
478
+ */
479
+ closeStrict(): Promise<SessionManagerCloseOutcome>;
389
480
  getCwd(): string;
390
481
  /** Get usage statistics across all assistant messages in the session. */
391
482
  getUsageStatistics(): UsageStatistics;
@@ -515,7 +606,7 @@ export declare class SessionManager {
515
606
  * @param attribution Who initiated this message for billing/attribution semantics
516
607
  * @returns Entry id
517
608
  */
518
- appendCustomMessageEntry<T = unknown>(customType: string, content: string | (TextContent | ImageContent)[], display: boolean, details?: T, attribution?: MessageAttribution): string;
609
+ appendCustomMessageEntry<T = unknown>(customType: string, content: string | (TextContent | ImageContent)[], display: boolean, details?: T, attribution?: MessageAttribution, observationId?: string): string;
519
610
  /**
520
611
  * Append an MCP tool selection entry recording the discovery-selected MCP tools.
521
612
  * @param selectedToolNames MCP tool names selected for this branch
@@ -639,6 +730,18 @@ export declare class SessionManager {
639
730
  * @param sessionDir Optional session directory for /new or /branch. If omitted, derives from file's parent.
640
731
  */
641
732
  static open(filePath: string, sessionDir?: string, storage?: SessionStorage): Promise<SessionManager>;
733
+ /**
734
+ * List sessions for the resume picker without recovery or other maintenance writes.
735
+ */
736
+ static listForResumePickerReadOnly(cwd: string, sessionDir?: string, storage?: SessionStorage): Promise<SessionInfo[]>;
737
+ /** Inspect a selected session without acquiring write-capable ownership. */
738
+ static inspectSessionTailReadOnly(filePath: string, storage?: SessionStorage): Promise<ResumeTailInspection>;
739
+ /**
740
+ * Main startup code MUST retain the consented inspection identity and branch on
741
+ * the returned discriminant; an error result never creates, rewrites, or adopts
742
+ * the selected path. Breadcrumb ownership begins only after `kind: "opened"`.
743
+ */
744
+ static openExistingStrict(identity: ResumeSessionIdentity, sessionDir?: string, storage?: SessionStorage): Promise<StrictSessionOpenResult>;
642
745
  /**
643
746
  * Continue the most recent session, or create new if none.
644
747
  * @param cwd Working directory
@@ -657,5 +760,22 @@ export declare class SessionManager {
657
760
  * List all sessions across all project directories.
658
761
  */
659
762
  static listAll(storage?: SessionStorage): Promise<SessionInfo[]>;
763
+ /**
764
+ * Strict raw scoped inventory for ACP authorization. Enumerates the scoped
765
+ * session directory without suppressing any root/scan/lstat/read/parse/stat/
766
+ * header/cwd/containment/identity failure. A failure result carries every
767
+ * sanitized failure and grants zero authority — it is never reduced to a
768
+ * partial candidate set. Display/global {@link list} behavior is unaffected.
769
+ */
770
+ static inventorySessionsStrict(cwd: string, options?: {
771
+ sessionDir?: string;
772
+ storage?: SessionStorage;
773
+ }): StrictInventoryResult;
774
+ /**
775
+ * Propagate the storage-layer verified hard delete bound to exact identity evidence.
776
+ * Never performs ID lookup or first-match selection; the caller supplies the exact
777
+ * authorization target captured from a complete strict inventory.
778
+ */
779
+ deleteSessionVerified(target: VerifiedSessionDeleteTarget): Promise<VerifiedSessionDeleteResult>;
660
780
  }
661
781
  export {};
@@ -1,7 +1,53 @@
1
1
  export interface SessionStorageStat {
2
+ dev: bigint;
3
+ ino: bigint;
2
4
  size: number;
3
5
  mtimeMs: number;
6
+ mtimeNs: bigint;
4
7
  mtime: Date;
8
+ isFile: boolean;
9
+ }
10
+ /** Exact bytes and identity captured from one opened regular-file descriptor. */
11
+ export interface SessionStorageSnapshot {
12
+ bytes: Uint8Array;
13
+ stat: SessionStorageStat;
14
+ }
15
+ /**
16
+ * Four-state writer close lifecycle. Only a successful underlying close confirms
17
+ * `closed`. A failure certified to have happened BEFORE the OS close was dispatched
18
+ * is `close_failed_retryable` (ownership of the numeric fd is still proven, so a
19
+ * later retry/finalizer close is safe). Any exception from an actually dispatched
20
+ * close call is terminal `close_unknown`: the numeric fd cannot be safely retried
21
+ * or finalizer-closed, and the writer blocks strict deletion.
22
+ */
23
+ export type SessionStorageWriterCloseState = "open" | "close_failed_retryable" | "close_unknown" | "closed";
24
+ /**
25
+ * Thrown by a {@link SessionStorageWriterCloseAdapter} to certify that a close
26
+ * failure occurred BEFORE the real OS close (`fs.closeSync`-equivalent) was ever
27
+ * dispatched. Because no OS close ran, the numeric fd is still owned and a retry
28
+ * is safe. Any other thrown value is treated as a dispatched close failure
29
+ * (`close_unknown`) and forbids retry/finalizer close of that fd.
30
+ */
31
+ export declare class SessionStorageWriterRetryableCloseError extends Error {
32
+ readonly name = "SessionStorageWriterRetryableCloseError";
33
+ constructor(message?: string, options?: ErrorOptions);
34
+ }
35
+ /**
36
+ * Injectable dispatcher for the numeric-fd OS close. The default implementation
37
+ * calls `fs.closeSync(fd)`. Tests inject adapters that throw
38
+ * {@link SessionStorageWriterRetryableCloseError} to certify a pre-dispatch
39
+ * failure, or that call the real close and throw to simulate a dispatched
40
+ * failure (`close_unknown`).
41
+ */
42
+ export interface SessionStorageWriterCloseAdapter {
43
+ close(fd: number): void;
44
+ }
45
+ /** Options for opening a {@link SessionStorageWriter}. */
46
+ export interface SessionStorageWriterOpenOptions {
47
+ flags?: "a" | "w";
48
+ onError?: (err: Error) => void;
49
+ /** Injectable OS-close dispatcher; defaults to `fs.closeSync`. */
50
+ closeAdapter?: SessionStorageWriterCloseAdapter;
5
51
  }
6
52
  export interface SessionStorageWriter {
7
53
  writeLine(line: string): Promise<void>;
@@ -16,15 +62,35 @@ export interface SessionStorageWriter {
16
62
  flush(): Promise<void>;
17
63
  fsync(): Promise<void>;
18
64
  close(): Promise<void>;
65
+ /**
66
+ * Synchronously close the underlying descriptor. The certainty-aware close
67
+ * state is updated synchronously and any close failure throws before this
68
+ * returns, so sync callers (atomic rewrite) can observe a close failure
69
+ * before proceeding to rename. Mirrors {@link close} semantics exactly.
70
+ */
71
+ closeSync(): void;
19
72
  getError(): Error | undefined;
73
+ /** Current certainty-aware close lifecycle state. */
74
+ getCloseState(): SessionStorageWriterCloseState;
75
+ /** Stored error for non-success close states (`close_failed_retryable`/`close_unknown`). */
76
+ getCloseError(): Error | undefined;
20
77
  }
21
78
  export interface SessionStorage {
22
79
  ensureDirSync(dir: string): void;
23
80
  existsSync(path: string): boolean;
24
81
  writeTextSync(path: string, content: string): void;
25
82
  readTextSync(path: string): string;
83
+ /** Exact on-disk bytes for strict read-only session inspection. */
84
+ readBytesSync?(path: string): Uint8Array;
85
+ /** Exact bytes and descriptor-bound identity captured from one opened regular file. */
86
+ readSnapshotSync?(path: string): SessionStorageSnapshot;
26
87
  statSync(path: string): SessionStorageStat;
27
88
  listFilesSync(dir: string, pattern: string): string[];
89
+ /**
90
+ * Strict directory scan that never suppresses scan/root errors. Used by strict
91
+ * authorization inventory; the forgiving {@link listFilesSync} stays display-only.
92
+ */
93
+ listFilesStrictSync?(dir: string, pattern: string): string[];
28
94
  exists(path: string): Promise<boolean>;
29
95
  readText(path: string): Promise<string>;
30
96
  readTextPrefix(path: string, maxBytes: number): Promise<string>;
@@ -34,18 +100,90 @@ export interface SessionStorage {
34
100
  unlink(path: string): Promise<void>;
35
101
  unlinkSync(path: string): void;
36
102
  deleteSessionWithArtifacts(sessionPath: string): Promise<void>;
37
- openWriter(path: string, options?: {
38
- flags?: "a" | "w";
39
- onError?: (err: Error) => void;
40
- }): SessionStorageWriter;
103
+ /**
104
+ * Verified hard delete bound to exact identity evidence. Removes the verified
105
+ * artifact directory first, revalidates, and unlinks the transcript last. Returns
106
+ * typed partial-cleanup evidence for exact-identity retry; never returns success
107
+ * for a partial deletion.
108
+ */
109
+ deleteSessionVerified?(target: VerifiedSessionDeleteTarget): Promise<VerifiedSessionDeleteResult>;
110
+ openWriter(path: string, options?: SessionStorageWriterOpenOptions): SessionStorageWriter;
41
111
  }
112
+ /** Exact (dev, ino) identity fields used for ACP authorization binding. */
113
+ export interface SessionStorageFileIdentity {
114
+ dev: bigint;
115
+ ino: bigint;
116
+ }
117
+ /** Kind of verification failure surfaced by {@link deleteSessionVerified}. */
118
+ export type VerifiedDeleteFailureKind = "containment" | "symlink" | "stat" | "identity" | "header" | "cwd" | "artifacts";
119
+ /**
120
+ * Thrown by {@link deleteSessionVerified} when canonical containment, transcript
121
+ * non-symlink/identity, header id/cwd, parent identity, or artifact identity
122
+ * verification fails. These are visible, sanitized failures: they never mutate
123
+ * the transcript or artifacts and grant zero authority.
124
+ */
125
+ export declare class SessionDeleteVerificationError extends Error {
126
+ readonly kind: VerifiedDeleteFailureKind;
127
+ constructor(kind: VerifiedDeleteFailureKind, message: string, options?: ErrorOptions);
128
+ }
129
+ /**
130
+ * Exact identity evidence a verified hard delete binds to. All fields are captured
131
+ * at authorization time; delete revalidates each one before any mutation. Retry
132
+ * after a partial cleanup supplies the recorded artifact identity via
133
+ * {@link expectedArtifactsIdentity}.
134
+ */
135
+ export interface VerifiedSessionDeleteTarget {
136
+ /** Canonical sessions root; the transcript must be contained within it. */
137
+ sessionsRoot: string;
138
+ /** Canonical transcript path (absolute `*.jsonl`). */
139
+ transcriptPath: string;
140
+ /** Expected session id parsed from the header. */
141
+ sessionId: string;
142
+ /** Expected canonical cwd parsed from the header. */
143
+ cwd: string;
144
+ /** Expected transcript file `(dev, ino)` captured at authorization. */
145
+ transcriptIdentity: SessionStorageFileIdentity;
146
+ /**
147
+ * For retry after an `artifacts` `cleanup_pending`: the recorded artifact
148
+ * directory identity to re-accept. A replacement/different artifact directory
149
+ * fails closed. Omit on first attempt or to accept recorded absence.
150
+ */
151
+ expectedArtifactsIdentity?: SessionStorageFileIdentity;
152
+ }
153
+ /**
154
+ * Outcome of a verified hard delete. Artifact removal happens first; only after
155
+ * revalidation is the transcript unlinked last. A partial deletion returns
156
+ * `cleanup_pending` with exact evidence for same-connection retry — never
157
+ * `deleted` and never `{}`.
158
+ */
159
+ export type VerifiedSessionDeleteResult = {
160
+ kind: "deleted";
161
+ } | {
162
+ kind: "cleanup_pending";
163
+ phase: "artifacts";
164
+ error: Error;
165
+ /** Artifact directory identity at failure time; undefined when absent. */
166
+ artifactsIdentity: SessionStorageFileIdentity | undefined;
167
+ /** Transcript identity (unchanged) for retry binding. */
168
+ transcriptIdentity: SessionStorageFileIdentity;
169
+ } | {
170
+ kind: "cleanup_pending";
171
+ phase: "transcript";
172
+ error: Error;
173
+ /** Transcript identity at failure time for retry binding. */
174
+ transcriptIdentity: SessionStorageFileIdentity;
175
+ };
42
176
  export declare class FileSessionStorage implements SessionStorage {
177
+ #private;
43
178
  ensureDirSync(dir: string): void;
44
179
  existsSync(path: string): boolean;
45
180
  writeTextSync(fpath: string, content: string): void;
46
181
  readTextSync(fpath: string): string;
182
+ readBytesSync(fpath: string): Uint8Array;
183
+ readSnapshotSync(fpath: string): SessionStorageSnapshot;
47
184
  statSync(path: string): SessionStorageStat;
48
185
  listFilesSync(dir: string, pattern: string): string[];
186
+ listFilesStrictSync(dir: string, pattern: string): string[];
49
187
  exists(path: string): Promise<boolean>;
50
188
  readText(path: string): Promise<string>;
51
189
  readTextPrefix(path: string, maxBytes: number): Promise<string>;
@@ -54,15 +192,18 @@ export declare class FileSessionStorage implements SessionStorage {
54
192
  renameSync(path: string, nextPath: string): void;
55
193
  unlink(path: string): Promise<void>;
56
194
  unlinkSync(path: string): void;
57
- openWriter(path: string, options?: {
58
- flags?: "a" | "w";
59
- onError?: (err: Error) => void;
60
- }): SessionStorageWriter;
195
+ openWriter(path: string, options?: SessionStorageWriterOpenOptions): SessionStorageWriter;
61
196
  /**
62
197
  * Delete a session file and its artifacts directory.
63
198
  * Artifacts are stored in a sibling directory with the same name minus .jsonl extension.
64
199
  */
65
200
  deleteSessionWithArtifacts(sessionPath: string): Promise<void>;
201
+ /**
202
+ * Verified hard delete bound to exact identity evidence. Artifact directory first,
203
+ * revalidate, transcript last. Partial deletion returns typed cleanup_pending
204
+ * evidence; identity/symlink/containment/header/cwd mismatch throws.
205
+ */
206
+ deleteSessionVerified(target: VerifiedSessionDeleteTarget): Promise<VerifiedSessionDeleteResult>;
66
207
  }
67
208
  export declare class MemorySessionStorage implements SessionStorage {
68
209
  #private;
@@ -70,8 +211,11 @@ export declare class MemorySessionStorage implements SessionStorage {
70
211
  existsSync(path: string): boolean;
71
212
  writeTextSync(path: string, content: string): void;
72
213
  readTextSync(path: string): string;
214
+ readBytesSync(path: string): Uint8Array;
215
+ readSnapshotSync(path: string): SessionStorageSnapshot;
73
216
  statSync(path: string): SessionStorageStat;
74
217
  listFilesSync(dir: string, pattern: string): string[];
218
+ listFilesStrictSync(dir: string, pattern: string): string[];
75
219
  exists(path: string): Promise<boolean>;
76
220
  readText(path: string): Promise<string>;
77
221
  readTextPrefix(path: string, maxBytes: number): Promise<string>;
@@ -80,9 +224,7 @@ export declare class MemorySessionStorage implements SessionStorage {
80
224
  renameSync(path: string, nextPath: string): void;
81
225
  unlink(path: string): Promise<void>;
82
226
  unlinkSync(path: string): void;
83
- deleteSessionWithArtifacts(_sessionPath: string): Promise<void>;
84
- openWriter(path: string, options?: {
85
- flags?: "a" | "w";
86
- onError?: (err: Error) => void;
87
- }): SessionStorageWriter;
227
+ deleteSessionWithArtifacts(sessionPath: string): Promise<void>;
228
+ deleteSessionVerified(target: VerifiedSessionDeleteTarget): Promise<VerifiedSessionDeleteResult>;
229
+ openWriter(path: string, options?: SessionStorageWriterOpenOptions): SessionStorageWriter;
88
230
  }
@@ -45,7 +45,7 @@ export interface CredentialAutoImportOptions {
45
45
  trigger: CredentialAutoImportTrigger;
46
46
  sourceLabel?: CredentialAutoImportSourceLabel;
47
47
  }
48
- export declare function runExternalCredentialAutoImport({ authStorage, discover, discoveryOptions }: CredentialAutoImportOptions): Promise<CredentialAutoImportResult>;
48
+ export declare function runExternalCredentialAutoImport({ authStorage, discover, discoveryOptions, }: CredentialAutoImportOptions): Promise<CredentialAutoImportResult>;
49
49
  export declare function buildCredentialAutoImportNotice(result: Pick<CredentialAutoImportResult, "imported">): string | undefined;
50
50
  export declare function formatCredentialAutoImportResult(result: CredentialAutoImportResult): string[];
51
51
  export interface CredentialImportMarkerStore {
@@ -60,4 +60,4 @@ export interface StartupCredentialAutoImportOptions {
60
60
  agentDir?: string;
61
61
  markerStore?: CredentialImportMarkerStore;
62
62
  }
63
- export declare function runStartupCredentialAutoImportIfNeeded({ authStorage: activeAuthStorage, modelRegistry: activeModelRegistry, discover, version, agentDir, markerStore }: StartupCredentialAutoImportOptions): Promise<string | undefined>;
63
+ export declare function runStartupCredentialAutoImportIfNeeded({ authStorage: activeAuthStorage, modelRegistry: activeModelRegistry, discover, version, agentDir, markerStore, }: StartupCredentialAutoImportOptions): Promise<string | undefined>;
@@ -1,7 +1,23 @@
1
1
  import { postmortem } from "@sayknow-cli/utils";
2
+ /** Managed tmux owner provenance propagated only to the launched child process. */
3
+ export declare const SKC_TMUX_OWNER_GENERATION_ENV = "SKC_TMUX_OWNER_GENERATION";
4
+ export declare const SKC_TMUX_OWNER_STATE_DIR_ENV = "SKC_TMUX_OWNER_STATE_DIR";
5
+ export declare const SKC_TMUX_OWNER_SERVER_KEY_ENV = "SKC_TMUX_OWNER_SERVER_KEY";
2
6
  export declare const SKC_COORDINATOR_SESSION_STATE_FILE_ENV = "SKC_COORDINATOR_SESSION_STATE_FILE";
3
7
  export declare const SKC_COORDINATOR_SESSION_ID_ENV = "SKC_COORDINATOR_SESSION_ID";
4
8
  export declare const SKC_COORDINATOR_SESSION_BRANCH_ENV = "SKC_COORDINATOR_SESSION_BRANCH";
9
+ export declare const SKC_COORDINATOR_SESSION_LAUNCH_ID_ENV = "SKC_COORDINATOR_SESSION_LAUNCH_ID";
10
+ export declare const SKC_COORDINATOR_SESSION_READINESS_FILE_ENV = "SKC_COORDINATOR_SESSION_READINESS_FILE";
11
+ export type RuntimeInputReadyMarker = Readonly<{
12
+ schema_version: 1;
13
+ session_id: string;
14
+ launch_id: string;
15
+ state: "ready_for_input";
16
+ event: "interactive_input_ready";
17
+ source: "skc_interactive_runtime";
18
+ ready_for_input: true;
19
+ created_at: string;
20
+ }>;
5
21
  export type RuntimeState = "ready_for_input" | "running" | "needs_user_input" | "completed" | "errored";
6
22
  /** Test-only counters for runtime sidecar hot-path assertions. */
7
23
  export declare const __sessionStateSidecarPerfCounters: {
@@ -12,19 +28,33 @@ interface RuntimeStateEvent {
12
28
  type: string;
13
29
  messages?: unknown[];
14
30
  }
15
- interface RuntimeStateContext {
31
+ export interface OwnerTerminalContext {
32
+ generation: string;
33
+ stateDir: string;
34
+ socketKey: string;
35
+ scope?: string | null;
36
+ ownerPid?: number | null;
37
+ ownerName?: string | null;
38
+ operatorDispatchId?: string | null;
39
+ }
40
+ export interface RuntimeStateContext {
16
41
  sessionId: string;
17
42
  cwd: string;
18
43
  sessionFile?: string | null;
19
44
  branch?: string | null;
45
+ /** Public-safe owner metadata used to persist the canonical terminal verdict. */
46
+ ownerTerminal?: OwnerTerminalContext | null;
47
+ /** Internal fail-closed marker set only when managed owner metadata is malformed or missing. */
48
+ ownerTerminalMetadataInvalid?: boolean;
20
49
  }
21
50
  export type TerminalRuntimeStateStatus = {
22
51
  terminal: true;
23
52
  state: "completed" | "errored";
24
53
  } | {
25
54
  terminal: false;
26
- reason: "missing_state_file" | "invalid_json" | "session_id_mismatch" | "cwd_mismatch" | "session_file_mismatch" | "non_terminal_state";
55
+ reason: "missing_state_file" | "invalid_json" | "invalid_state_marker" | "session_id_mismatch" | "cwd_mismatch" | "session_file_mismatch" | "non_terminal_state";
27
56
  };
57
+ export declare function persistCoordinatorRuntimeInputReady(): Promise<RuntimeInputReadyMarker | null>;
28
58
  export declare function readTerminalRuntimeStateMarker(input: {
29
59
  stateFile?: string | null;
30
60
  sessionId?: string | null;
@@ -34,6 +64,7 @@ export declare function readTerminalRuntimeStateMarker(input: {
34
64
  export declare function stateForEvent(event: RuntimeStateEvent): RuntimeState | null;
35
65
  export declare function eventAffectsCoordinatorRuntimeState(event: RuntimeStateEvent): boolean;
36
66
  export declare function persistCoordinatorRuntimeStateFromEvent(event: RuntimeStateEvent, context: RuntimeStateContext): Promise<void>;
37
- export declare function persistCoordinatorRuntimeStateFromPostmortem(reason: postmortem.Reason, context: RuntimeStateContext): void;
67
+ export declare function ownerTerminalContextFromEnvironment(): OwnerTerminalContext | "invalid" | null;
68
+ export declare function persistCoordinatorRuntimeStateFromPostmortem(reason: postmortem.Reason, context: RuntimeStateContext): Promise<void>;
38
69
  export declare function registerCoordinatorRuntimeStateFinalizer(context: RuntimeStateContext): () => void;
39
70
  export {};
@@ -11,13 +11,13 @@ export declare const WorkflowStateReceiptSchema: z.ZodObject<{
11
11
  skill: z.ZodEnum<{
12
12
  "deep-interview": "deep-interview";
13
13
  ralplan: "ralplan";
14
- team: "team";
15
14
  ultragoal: "ultragoal";
15
+ team: "team";
16
16
  }>;
17
17
  owner: z.ZodEnum<{
18
- "skc-hook": "skc-hook";
19
- "skc-runtime": "skc-runtime";
20
18
  "skc-state-cli": "skc-state-cli";
19
+ "skc-runtime": "skc-runtime";
20
+ "skc-hook": "skc-hook";
21
21
  }>;
22
22
  command: z.ZodString;
23
23
  state_path: z.ZodString;
@@ -54,13 +54,13 @@ export declare const WorkflowStateEnvelopeSchema: z.ZodObject<{
54
54
  skill: z.ZodEnum<{
55
55
  "deep-interview": "deep-interview";
56
56
  ralplan: "ralplan";
57
- team: "team";
58
57
  ultragoal: "ultragoal";
58
+ team: "team";
59
59
  }>;
60
60
  owner: z.ZodEnum<{
61
- "skc-hook": "skc-hook";
62
- "skc-runtime": "skc-runtime";
63
61
  "skc-state-cli": "skc-state-cli";
62
+ "skc-runtime": "skc-runtime";
63
+ "skc-hook": "skc-hook";
64
64
  }>;
65
65
  command: z.ZodString;
66
66
  state_path: z.ZodString;
@@ -95,13 +95,13 @@ export declare const RequiredWorkflowStateReceiptSchema: z.ZodObject<{
95
95
  skill: z.ZodEnum<{
96
96
  "deep-interview": "deep-interview";
97
97
  ralplan: "ralplan";
98
- team: "team";
99
98
  ultragoal: "ultragoal";
99
+ team: "team";
100
100
  }>;
101
101
  owner: z.ZodEnum<{
102
- "skc-hook": "skc-hook";
103
- "skc-runtime": "skc-runtime";
104
102
  "skc-state-cli": "skc-state-cli";
103
+ "skc-runtime": "skc-runtime";
104
+ "skc-hook": "skc-hook";
105
105
  }>;
106
106
  command: z.ZodString;
107
107
  state_path: z.ZodString;
@@ -128,8 +128,8 @@ export declare const RequiredOnWriteEnvelopeSchema: z.ZodObject<{
128
128
  skill: z.ZodEnum<{
129
129
  "deep-interview": "deep-interview";
130
130
  ralplan: "ralplan";
131
- team: "team";
132
131
  ultragoal: "ultragoal";
132
+ team: "team";
133
133
  }>;
134
134
  version: z.ZodLiteral<2>;
135
135
  updated_at: z.ZodString;
@@ -140,13 +140,13 @@ export declare const RequiredOnWriteEnvelopeSchema: z.ZodObject<{
140
140
  skill: z.ZodEnum<{
141
141
  "deep-interview": "deep-interview";
142
142
  ralplan: "ralplan";
143
- team: "team";
144
143
  ultragoal: "ultragoal";
144
+ team: "team";
145
145
  }>;
146
146
  owner: z.ZodEnum<{
147
- "skc-hook": "skc-hook";
148
- "skc-runtime": "skc-runtime";
149
147
  "skc-state-cli": "skc-state-cli";
148
+ "skc-runtime": "skc-runtime";
149
+ "skc-hook": "skc-hook";
150
150
  }>;
151
151
  command: z.ZodString;
152
152
  state_path: z.ZodString;
@@ -198,13 +198,13 @@ export declare const SkillActiveEntrySchema: z.ZodObject<{
198
198
  skill: z.ZodEnum<{
199
199
  "deep-interview": "deep-interview";
200
200
  ralplan: "ralplan";
201
- team: "team";
202
201
  ultragoal: "ultragoal";
202
+ team: "team";
203
203
  }>;
204
204
  owner: z.ZodEnum<{
205
- "skc-hook": "skc-hook";
206
- "skc-runtime": "skc-runtime";
207
205
  "skc-state-cli": "skc-state-cli";
206
+ "skc-runtime": "skc-runtime";
207
+ "skc-hook": "skc-hook";
208
208
  }>;
209
209
  command: z.ZodString;
210
210
  state_path: z.ZodString;
@@ -259,13 +259,13 @@ export declare const SkillActiveStateSchema: z.ZodObject<{
259
259
  skill: z.ZodEnum<{
260
260
  "deep-interview": "deep-interview";
261
261
  ralplan: "ralplan";
262
- team: "team";
263
262
  ultragoal: "ultragoal";
263
+ team: "team";
264
264
  }>;
265
265
  owner: z.ZodEnum<{
266
- "skc-hook": "skc-hook";
267
- "skc-runtime": "skc-runtime";
268
266
  "skc-state-cli": "skc-state-cli";
267
+ "skc-runtime": "skc-runtime";
268
+ "skc-hook": "skc-hook";
269
269
  }>;
270
270
  command: z.ZodString;
271
271
  state_path: z.ZodString;
@@ -12,6 +12,8 @@ export declare const SKC_TMUX_BRANCH_SLUG_OPTION = "@skc-branch-slug";
12
12
  export declare const SKC_TMUX_PROJECT_OPTION = "@skc-project";
13
13
  export declare const SKC_TMUX_SESSION_ID_OPTION = "@skc-session-id";
14
14
  export declare const SKC_TMUX_SESSION_STATE_FILE_OPTION = "@skc-session-state-file";
15
+ export declare const SKC_TMUX_OWNER_GENERATION_OPTION = "@skc-owner-generation";
16
+ export declare const SKC_TMUX_OWNER_SERVER_KEY_OPTION = "@skc-owner-server-key";
15
17
  export declare const SKC_TMUX_VERSION_OPTION = "@skc-version";
16
18
  export declare const SKC_PSMUX_PROFILE_FORCE_ENV = "SKC_PSMUX_PROFILE_FORCE";
17
19
  export interface SkcTmuxProfileCommand {
@@ -89,6 +91,8 @@ export declare function buildSkcTmuxRequiredProfileCommands(target: string, meta
89
91
  project?: string | null;
90
92
  sessionId?: string | null;
91
93
  sessionStateFile?: string | null;
94
+ ownerGeneration?: string | null;
95
+ ownerServerKey?: string | null;
92
96
  version?: string | null;
93
97
  }): SkcTmuxProfileCommand[];
94
98
  export declare function buildSkcTmuxProfileCommands(target: string, env?: NodeJS.ProcessEnv, metadata?: {
@@ -97,6 +101,8 @@ export declare function buildSkcTmuxProfileCommands(target: string, env?: NodeJS
97
101
  project?: string | null;
98
102
  sessionId?: string | null;
99
103
  sessionStateFile?: string | null;
104
+ ownerGeneration?: string | null;
105
+ ownerServerKey?: string | null;
100
106
  version?: string | null;
101
107
  }, opts?: {
102
108
  platform?: NodeJS.Platform;
@@ -0,0 +1,5 @@
1
+ /** Matches the sole argv shape allowed to enter the owner-isolation JSON-line protocol. */
2
+ export declare function isTmuxOwnerIsolationCliArgv(argv: readonly string[]): boolean;
3
+ /** Reads exactly one bounded JSON line and writes exactly one JSON response line. */
4
+ export declare function runTmuxOwnerIsolationCli(stdin: string): Promise<string>;
5
+ export declare function runTmuxOwnerIsolationCliFromStdin(): Promise<void>;