ai-whisper 0.4.2 → 0.4.4

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 (171) hide show
  1. package/dist/.tsbuildinfo +1 -0
  2. package/dist/bin/broker-daemon.d.ts +3 -0
  3. package/dist/bin/broker-daemon.d.ts.map +1 -0
  4. package/dist/bin/companion-agent.d.ts +3 -0
  5. package/dist/bin/companion-agent.d.ts.map +1 -0
  6. package/dist/bin/relay-monitor.d.ts +3 -0
  7. package/dist/bin/relay-monitor.d.ts.map +1 -0
  8. package/dist/bin/whisper.d.ts +3 -0
  9. package/dist/bin/whisper.d.ts.map +1 -0
  10. package/dist/bin/whisper.js +182 -100
  11. package/dist/commands/collab/dashboard.d.ts +18 -0
  12. package/dist/commands/collab/dashboard.d.ts.map +1 -0
  13. package/dist/commands/collab/inspect.d.ts +23 -0
  14. package/dist/commands/collab/inspect.d.ts.map +1 -0
  15. package/dist/commands/collab/mount.d.ts +54 -0
  16. package/dist/commands/collab/mount.d.ts.map +1 -0
  17. package/dist/commands/collab/reconnect.d.ts +44 -0
  18. package/dist/commands/collab/reconnect.d.ts.map +1 -0
  19. package/dist/commands/collab/recover.d.ts +33 -0
  20. package/dist/commands/collab/recover.d.ts.map +1 -0
  21. package/dist/commands/collab/relay-monitor.d.ts +21 -0
  22. package/dist/commands/collab/relay-monitor.d.ts.map +1 -0
  23. package/dist/commands/collab/start.d.ts +53 -0
  24. package/dist/commands/collab/start.d.ts.map +1 -0
  25. package/dist/commands/collab/status.d.ts +6 -0
  26. package/dist/commands/collab/status.d.ts.map +1 -0
  27. package/dist/commands/collab/stop.d.ts +13 -0
  28. package/dist/commands/collab/stop.d.ts.map +1 -0
  29. package/dist/commands/collab/tell.d.ts +26 -0
  30. package/dist/commands/collab/tell.d.ts.map +1 -0
  31. package/dist/commands/skill/install.d.ts +12 -0
  32. package/dist/commands/skill/install.d.ts.map +1 -0
  33. package/dist/commands/workflow/cancel.d.ts +14 -0
  34. package/dist/commands/workflow/cancel.d.ts.map +1 -0
  35. package/dist/commands/workflow/inspect.d.ts +40 -0
  36. package/dist/commands/workflow/inspect.d.ts.map +1 -0
  37. package/dist/commands/workflow/list.d.ts +27 -0
  38. package/dist/commands/workflow/list.d.ts.map +1 -0
  39. package/dist/commands/workflow/pause.d.ts +14 -0
  40. package/dist/commands/workflow/pause.d.ts.map +1 -0
  41. package/dist/commands/workflow/resume.d.ts +17 -0
  42. package/dist/commands/workflow/resume.d.ts.map +1 -0
  43. package/dist/commands/workflow/start.d.ts +60 -0
  44. package/dist/commands/workflow/start.d.ts.map +1 -0
  45. package/dist/commands/workflow/types.d.ts +2 -0
  46. package/dist/commands/workflow/types.d.ts.map +1 -0
  47. package/dist/create-cli.d.ts +4 -0
  48. package/dist/create-cli.d.ts.map +1 -0
  49. package/dist/index.d.ts +5 -0
  50. package/dist/index.d.ts.map +1 -0
  51. package/dist/runtime/action-inference.d.ts +3 -0
  52. package/dist/runtime/action-inference.d.ts.map +1 -0
  53. package/dist/runtime/artifact-input.d.ts +2 -0
  54. package/dist/runtime/artifact-input.d.ts.map +1 -0
  55. package/dist/runtime/assistant-turn-capture.d.ts +14 -0
  56. package/dist/runtime/assistant-turn-capture.d.ts.map +1 -0
  57. package/dist/runtime/bracketed-paste-detector.d.ts +16 -0
  58. package/dist/runtime/bracketed-paste-detector.d.ts.map +1 -0
  59. package/dist/runtime/broker-artifact-service.d.ts +48 -0
  60. package/dist/runtime/broker-artifact-service.d.ts.map +1 -0
  61. package/dist/runtime/broker-connect.d.ts +9 -0
  62. package/dist/runtime/broker-connect.d.ts.map +1 -0
  63. package/dist/runtime/broker-daemon.d.ts +25 -0
  64. package/dist/runtime/broker-daemon.d.ts.map +1 -0
  65. package/dist/runtime/busy-indicator.d.ts +11 -0
  66. package/dist/runtime/busy-indicator.d.ts.map +1 -0
  67. package/dist/runtime/capture-handback-text.d.ts +39 -0
  68. package/dist/runtime/capture-handback-text.d.ts.map +1 -0
  69. package/dist/runtime/clipboard-change-count.d.ts +12 -0
  70. package/dist/runtime/clipboard-change-count.d.ts.map +1 -0
  71. package/dist/runtime/clipboard-handback-capture.d.ts +13 -0
  72. package/dist/runtime/clipboard-handback-capture.d.ts.map +1 -0
  73. package/dist/runtime/collab-resolver.d.ts +36 -0
  74. package/dist/runtime/collab-resolver.d.ts.map +1 -0
  75. package/dist/runtime/companion-agent-loop.d.ts +13 -0
  76. package/dist/runtime/companion-agent-loop.d.ts.map +1 -0
  77. package/dist/runtime/context-injector.d.ts +20 -0
  78. package/dist/runtime/context-injector.d.ts.map +1 -0
  79. package/dist/runtime/context-policy.d.ts +3 -0
  80. package/dist/runtime/context-policy.d.ts.map +1 -0
  81. package/dist/runtime/current-tty.d.ts +2 -0
  82. package/dist/runtime/current-tty.d.ts.map +1 -0
  83. package/dist/runtime/dashboard-glyph.d.ts +12 -0
  84. package/dist/runtime/dashboard-glyph.d.ts.map +1 -0
  85. package/dist/runtime/dashboard-state.d.ts +182 -0
  86. package/dist/runtime/dashboard-state.d.ts.map +1 -0
  87. package/dist/runtime/dashboard-view.d.ts +34 -0
  88. package/dist/runtime/dashboard-view.d.ts.map +1 -0
  89. package/dist/runtime/dashboard.d.ts +46 -0
  90. package/dist/runtime/dashboard.d.ts.map +1 -0
  91. package/dist/runtime/evaluator-config.d.ts +21 -0
  92. package/dist/runtime/evaluator-config.d.ts.map +1 -0
  93. package/dist/runtime/evaluator-observer.d.ts +8 -0
  94. package/dist/runtime/evaluator-observer.d.ts.map +1 -0
  95. package/dist/runtime/id-factory.d.ts +5 -0
  96. package/dist/runtime/id-factory.d.ts.map +1 -0
  97. package/dist/runtime/launcher.d.ts +39 -0
  98. package/dist/runtime/launcher.d.ts.map +1 -0
  99. package/dist/runtime/live-session-broker-executor.d.ts +8 -0
  100. package/dist/runtime/live-session-broker-executor.d.ts.map +1 -0
  101. package/dist/runtime/live-session.d.ts +25 -0
  102. package/dist/runtime/live-session.d.ts.map +1 -0
  103. package/dist/runtime/load-dot-env.d.ts +6 -0
  104. package/dist/runtime/load-dot-env.d.ts.map +1 -0
  105. package/dist/runtime/local-multiline-composer.d.ts +23 -0
  106. package/dist/runtime/local-multiline-composer.d.ts.map +1 -0
  107. package/dist/runtime/mount-session-main.d.ts +44 -0
  108. package/dist/runtime/mount-session-main.d.ts.map +1 -0
  109. package/dist/runtime/mounted-turn-owned-relay.d.ts +160 -0
  110. package/dist/runtime/mounted-turn-owned-relay.d.ts.map +1 -0
  111. package/dist/runtime/on-demand-processing.d.ts +23 -0
  112. package/dist/runtime/on-demand-processing.d.ts.map +1 -0
  113. package/dist/runtime/operator-inspect-captures.d.ts +6 -0
  114. package/dist/runtime/operator-inspect-captures.d.ts.map +1 -0
  115. package/dist/runtime/operator-inspect-verdicts.d.ts +6 -0
  116. package/dist/runtime/operator-inspect-verdicts.d.ts.map +1 -0
  117. package/dist/runtime/operator-inspect.d.ts +137 -0
  118. package/dist/runtime/operator-inspect.d.ts.map +1 -0
  119. package/dist/runtime/paths.d.ts +2 -0
  120. package/dist/runtime/paths.d.ts.map +1 -0
  121. package/dist/runtime/port-allocator.d.ts +7 -0
  122. package/dist/runtime/port-allocator.d.ts.map +1 -0
  123. package/dist/runtime/port-utils.d.ts +3 -0
  124. package/dist/runtime/port-utils.d.ts.map +1 -0
  125. package/dist/runtime/process-start-time.d.ts +7 -0
  126. package/dist/runtime/process-start-time.d.ts.map +1 -0
  127. package/dist/runtime/provider-submit-strategy.d.ts +13 -0
  128. package/dist/runtime/provider-submit-strategy.d.ts.map +1 -0
  129. package/dist/runtime/providers.d.ts +17 -0
  130. package/dist/runtime/providers.d.ts.map +1 -0
  131. package/dist/runtime/record-evaluator-status.d.ts +9 -0
  132. package/dist/runtime/record-evaluator-status.d.ts.map +1 -0
  133. package/dist/runtime/recovery-guard.d.ts +12 -0
  134. package/dist/runtime/recovery-guard.d.ts.map +1 -0
  135. package/dist/runtime/relay-directive.d.ts +4 -0
  136. package/dist/runtime/relay-directive.d.ts.map +1 -0
  137. package/dist/runtime/relay-line-buffer.d.ts +22 -0
  138. package/dist/runtime/relay-line-buffer.d.ts.map +1 -0
  139. package/dist/runtime/relay-monitor.d.ts +26 -0
  140. package/dist/runtime/relay-monitor.d.ts.map +1 -0
  141. package/dist/runtime/relay-orchestrator-evaluator.d.ts +160 -0
  142. package/dist/runtime/relay-orchestrator-evaluator.d.ts.map +1 -0
  143. package/dist/runtime/relay-orchestrator.d.ts +116 -0
  144. package/dist/runtime/relay-orchestrator.d.ts.map +1 -0
  145. package/dist/runtime/relay-pane-writer.d.ts +28 -0
  146. package/dist/runtime/relay-pane-writer.d.ts.map +1 -0
  147. package/dist/runtime/relay-service.d.ts +76 -0
  148. package/dist/runtime/relay-service.d.ts.map +1 -0
  149. package/dist/runtime/relay-view-input.d.ts +17 -0
  150. package/dist/runtime/relay-view-input.d.ts.map +1 -0
  151. package/dist/runtime/relay-view-state.d.ts +86 -0
  152. package/dist/runtime/relay-view-state.d.ts.map +1 -0
  153. package/dist/runtime/relay-view.d.ts +16 -0
  154. package/dist/runtime/relay-view.d.ts.map +1 -0
  155. package/dist/runtime/reply-wait.d.ts +21 -0
  156. package/dist/runtime/reply-wait.d.ts.map +1 -0
  157. package/dist/runtime/runtime-debug-log.d.ts +7 -0
  158. package/dist/runtime/runtime-debug-log.d.ts.map +1 -0
  159. package/dist/runtime/state-root.d.ts +3 -0
  160. package/dist/runtime/state-root.d.ts.map +1 -0
  161. package/dist/runtime/terminal-input-normalizer.d.ts +11 -0
  162. package/dist/runtime/terminal-input-normalizer.d.ts.map +1 -0
  163. package/dist/runtime/theme.d.ts +15 -0
  164. package/dist/runtime/theme.d.ts.map +1 -0
  165. package/dist/runtime/version-check.d.ts +17 -0
  166. package/dist/runtime/version-check.d.ts.map +1 -0
  167. package/dist/runtime/wait-for-broker-ready.d.ts +13 -0
  168. package/dist/runtime/wait-for-broker-ready.d.ts.map +1 -0
  169. package/dist/runtime/workspace-id.d.ts +3 -0
  170. package/dist/runtime/workspace-id.d.ts.map +1 -0
  171. package/package.json +3 -3
@@ -0,0 +1,13 @@
1
+ export interface CollabStopOpts {
2
+ cwd: string;
3
+ collabIdOverride?: string;
4
+ now: () => string;
5
+ signalProcess: (pid: number, signal: "SIGTERM" | "SIGKILL") => void;
6
+ /**
7
+ * Runs a shell command for tmux/terminal teardown. Injectable for tests;
8
+ * defaults to a best-effort `execSync` wrapper that swallows failures.
9
+ */
10
+ execCommand?: (cmd: string) => void;
11
+ }
12
+ export declare function runCollabStop(input: CollabStopOpts): void;
13
+ //# sourceMappingURL=stop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stop.d.ts","sourceRoot":"","sources":["../../../src/commands/collab/stop.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,cAAc;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,GAAG,EAAE,MAAM,MAAM,CAAC;IAClB,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,SAAS,KAAK,IAAI,CAAC;IACpE;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAuBD,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAoGzD"}
@@ -0,0 +1,26 @@
1
+ import type { CompanionProvider, WorkItem } from "@ai-whisper/shared";
2
+ export declare function runCollabTell(input: {
3
+ cwd: string;
4
+ target: "codex" | "claude";
5
+ instruction: string;
6
+ explicitAction?: WorkItem["requestedAction"];
7
+ artifactPaths: string[];
8
+ threadTitle?: string;
9
+ providerOverride?: CompanionProvider;
10
+ now: string;
11
+ collabIdOverride?: string;
12
+ }): Promise<{
13
+ kind: "answer" | "review" | "clarification" | "failure";
14
+ version: 1;
15
+ threadId: string;
16
+ collabId: string;
17
+ createdAt: string;
18
+ workItemId: string;
19
+ turnIndex: number;
20
+ artifactManifestIds: string[];
21
+ replyId: string;
22
+ sourceSessionId: string;
23
+ content: string;
24
+ transitionIntent: "in_progress" | "awaiting_user" | "completed" | "failed" | null;
25
+ } | null>;
26
+ //# sourceMappingURL=tell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tell.d.ts","sourceRoot":"","sources":["../../../src/commands/collab/tell.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAQtE,wBAAsB,aAAa,CAAC,KAAK,EAAE;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IAC7C,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B;;;;;;;;;;;;;UAiEA"}
@@ -0,0 +1,12 @@
1
+ export type SkillInstallTarget = "claude" | "codex" | "all";
2
+ export interface SkillInstallInput {
3
+ target: SkillInstallTarget;
4
+ force?: boolean;
5
+ fakeHome?: string;
6
+ bundledSkillsDir?: string;
7
+ }
8
+ export interface SkillInstallResult {
9
+ installedAt: string[];
10
+ }
11
+ export declare function runSkillInstall(input: SkillInstallInput): Promise<SkillInstallResult>;
12
+ //# sourceMappingURL=install.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/commands/skill/install.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;AAE5D,MAAM,WAAW,iBAAiB;IACjC,MAAM,EAAE,kBAAkB,CAAC;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAkB;IAClC,WAAW,EAAE,MAAM,EAAE,CAAC;CACtB;AAiBD,wBAAsB,eAAe,CACpC,KAAK,EAAE,iBAAiB,GACtB,OAAO,CAAC,kBAAkB,CAAC,CAuD7B"}
@@ -0,0 +1,14 @@
1
+ export interface WorkflowCancelDeps {
2
+ broker: {
3
+ control: {
4
+ cancelWorkflow: (input: {
5
+ workflowId: string;
6
+ now: string;
7
+ }) => void;
8
+ };
9
+ };
10
+ workflowId: string;
11
+ now: string;
12
+ }
13
+ export declare function runWorkflowCancel(deps: WorkflowCancelDeps): Promise<void>;
14
+ //# sourceMappingURL=cancel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel.d.ts","sourceRoot":"","sources":["../../../src/commands/workflow/cancel.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IAClC,MAAM,EAAE;QACP,OAAO,EAAE;YACR,cAAc,EAAE,CAAC,KAAK,EAAE;gBAAE,UAAU,EAAE,MAAM,CAAC;gBAAC,GAAG,EAAE,MAAM,CAAA;aAAE,KAAK,IAAI,CAAC;SACrE,CAAC;KACF,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;CACZ;AAKD,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/E"}
@@ -0,0 +1,40 @@
1
+ export type WorkflowPhaseOutcome = "done" | "escalated" | "superseded";
2
+ export type WorkflowPhaseRunRecord = {
3
+ phaseRunId: string;
4
+ workflowId: string;
5
+ phaseIndex: number;
6
+ phaseName: string;
7
+ chainId: string;
8
+ startedAt: string;
9
+ endedAt: string | null;
10
+ outcome: WorkflowPhaseOutcome | null;
11
+ };
12
+ export type WorkflowStatus = "running" | "paused" | "halted" | "done" | "canceled";
13
+ export type WorkflowRecord = {
14
+ workflowId: string;
15
+ collabId: string;
16
+ workflowType: string;
17
+ name: string | null;
18
+ specPath: string;
19
+ roleBindings: Record<string, "claude" | "codex">;
20
+ status: WorkflowStatus;
21
+ currentPhaseIndex: number;
22
+ haltReason: string | null;
23
+ workflowContext: Record<string, unknown>;
24
+ createdAt: string;
25
+ updatedAt: string;
26
+ };
27
+ export interface WorkflowInspectDeps {
28
+ broker: {
29
+ control: {
30
+ getWorkflow: (workflowId: string) => WorkflowRecord | null;
31
+ getWorkflowPhaseRuns: (workflowId: string) => WorkflowPhaseRunRecord[];
32
+ };
33
+ };
34
+ workflowId: string;
35
+ }
36
+ export declare function runWorkflowInspect(deps: WorkflowInspectDeps): Promise<{
37
+ workflow: WorkflowRecord;
38
+ phaseRuns: WorkflowPhaseRunRecord[];
39
+ }>;
40
+ //# sourceMappingURL=inspect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../../src/commands/workflow/inspect.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,WAAW,GAAG,YAAY,CAAC;AAEvE,MAAM,MAAM,sBAAsB,GAAG;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,oBAAoB,GAAG,IAAI,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AAEnF,MAAM,MAAM,cAAc,GAAG;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,CAAC;IACjD,MAAM,EAAE,cAAc,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,WAAW,mBAAmB;IACnC,MAAM,EAAE;QACP,OAAO,EAAE;YACR,WAAW,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,cAAc,GAAG,IAAI,CAAC;YAC3D,oBAAoB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,sBAAsB,EAAE,CAAC;SACvE,CAAC;KACF,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;CACnB;AAGD,wBAAsB,kBAAkB,CACvC,IAAI,EAAE,mBAAmB,GACvB,OAAO,CAAC;IAAE,QAAQ,EAAE,cAAc,CAAC;IAAC,SAAS,EAAE,sBAAsB,EAAE,CAAA;CAAE,CAAC,CAO5E"}
@@ -0,0 +1,27 @@
1
+ export type WorkflowStatus = "running" | "paused" | "halted" | "done" | "canceled";
2
+ export type WorkflowRecord = {
3
+ workflowId: string;
4
+ collabId: string;
5
+ workflowType: string;
6
+ name: string | null;
7
+ specPath: string;
8
+ roleBindings: Record<string, "claude" | "codex">;
9
+ status: WorkflowStatus;
10
+ currentPhaseIndex: number;
11
+ haltReason: string | null;
12
+ workflowContext: Record<string, unknown>;
13
+ createdAt: string;
14
+ updatedAt: string;
15
+ };
16
+ export interface WorkflowListDeps {
17
+ broker: {
18
+ control: {
19
+ listWorkflows: (filter: {
20
+ collabId?: string;
21
+ }) => WorkflowRecord[];
22
+ };
23
+ };
24
+ collabId?: string;
25
+ }
26
+ export declare function runWorkflowList(deps: WorkflowListDeps): WorkflowRecord[];
27
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/workflow/list.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AAEnF,MAAM,MAAM,cAAc,GAAG;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,CAAC;IACjD,MAAM,EAAE,cAAc,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAChC,MAAM,EAAE;QACP,OAAO,EAAE;YACR,aAAa,EAAE,CAAC,MAAM,EAAE;gBAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;aAAE,KAAK,cAAc,EAAE,CAAC;SACnE,CAAC;KACF,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,gBAAgB,GAAG,cAAc,EAAE,CAMxE"}
@@ -0,0 +1,14 @@
1
+ export interface WorkflowPauseDeps {
2
+ broker: {
3
+ control: {
4
+ pauseWorkflow: (input: {
5
+ workflowId: string;
6
+ now: string;
7
+ }) => void;
8
+ };
9
+ };
10
+ workflowId: string;
11
+ now: string;
12
+ }
13
+ export declare function runWorkflowPause(deps: WorkflowPauseDeps): Promise<void>;
14
+ //# sourceMappingURL=pause.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pause.d.ts","sourceRoot":"","sources":["../../../src/commands/workflow/pause.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IACjC,MAAM,EAAE;QACP,OAAO,EAAE;YACR,aAAa,EAAE,CAAC,KAAK,EAAE;gBAAE,UAAU,EAAE,MAAM,CAAC;gBAAC,GAAG,EAAE,MAAM,CAAA;aAAE,KAAK,IAAI,CAAC;SACpE,CAAC;KACF,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;CACZ;AAKD,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAE7E"}
@@ -0,0 +1,17 @@
1
+ export interface WorkflowResumeDeps {
2
+ broker: {
3
+ control: {
4
+ resumeWorkflow: (input: {
5
+ workflowId: string;
6
+ now: string;
7
+ message?: string;
8
+ }) => void;
9
+ };
10
+ };
11
+ workflowId: string;
12
+ now: string;
13
+ /** Optional operator note delivered to the agents on resume (paused workflows). */
14
+ message?: string;
15
+ }
16
+ export declare function runWorkflowResume(deps: WorkflowResumeDeps): Promise<void>;
17
+ //# sourceMappingURL=resume.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resume.d.ts","sourceRoot":"","sources":["../../../src/commands/workflow/resume.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IAClC,MAAM,EAAE;QACP,OAAO,EAAE;YACR,cAAc,EAAE,CAAC,KAAK,EAAE;gBACvB,UAAU,EAAE,MAAM,CAAC;gBACnB,GAAG,EAAE,MAAM,CAAC;gBACZ,OAAO,CAAC,EAAE,MAAM,CAAC;aACjB,KAAK,IAAI,CAAC;SACX,CAAC;KACF,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAKD,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAM/E"}
@@ -0,0 +1,60 @@
1
+ import type Database from "better-sqlite3";
2
+ export interface WorkflowStartDeps {
3
+ broker: {
4
+ db: Database.Database;
5
+ control: {
6
+ createWorkflow: (input: {
7
+ collabId: string;
8
+ workflowType: string;
9
+ name?: string;
10
+ specPath: string;
11
+ roleBindings: {
12
+ implementer: "claude" | "codex";
13
+ reviewer: "claude" | "codex";
14
+ };
15
+ now: string;
16
+ }) => {
17
+ workflowId: string;
18
+ };
19
+ };
20
+ };
21
+ collabId: string;
22
+ workflowType: string;
23
+ specPath: string;
24
+ implementer?: "claude" | "codex";
25
+ reviewer?: "claude" | "codex";
26
+ /** The agent that triggered this run (from AI_WHISPER_AGENT); null when unknown. */
27
+ callerAgent?: "claude" | "codex" | null;
28
+ name?: string;
29
+ now: string;
30
+ }
31
+ export declare function runWorkflowStart(deps: WorkflowStartDeps): Promise<{
32
+ workflowId: string;
33
+ roleWarning?: string;
34
+ }>;
35
+ type Agent = "claude" | "codex";
36
+ /**
37
+ * Resolve which agent implements and which reviews, by precedence:
38
+ * 1. explicit flags (either present → explicit; the missing side is filled
39
+ * as the opposite agent; both naming the same agent is rejected)
40
+ * 2. caller-derived (the triggering agent implements; the other reviews)
41
+ * 3. definition default + a warning that no caller was detected
42
+ */
43
+ export declare function resolveRoleBindings(input: {
44
+ explicitImplementer?: Agent | undefined;
45
+ explicitReviewer?: Agent | undefined;
46
+ callerAgent?: Agent | null | undefined;
47
+ def?: {
48
+ defaultImplementer?: Agent;
49
+ defaultReviewer?: Agent;
50
+ } | undefined;
51
+ }): {
52
+ implementer: Agent;
53
+ reviewer: Agent;
54
+ source: "explicit" | "caller" | "default";
55
+ warning?: string;
56
+ };
57
+ /** Validate an `AI_WHISPER_AGENT` value; anything but the two known agents is null. */
58
+ export declare function parseCallerAgent(raw: string | undefined): Agent | null;
59
+ export {};
60
+ //# sourceMappingURL=start.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../../src/commands/workflow/start.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAS3C,MAAM,WAAW,iBAAiB;IACjC,MAAM,EAAE;QACP,EAAE,EAAE,QAAQ,CAAC,QAAQ,CAAC;QACtB,OAAO,EAAE;YACR,cAAc,EAAE,CAAC,KAAK,EAAE;gBACvB,QAAQ,EAAE,MAAM,CAAC;gBACjB,YAAY,EAAE,MAAM,CAAC;gBACrB,IAAI,CAAC,EAAE,MAAM,CAAC;gBACd,QAAQ,EAAE,MAAM,CAAC;gBACjB,YAAY,EAAE;oBAAE,WAAW,EAAE,QAAQ,GAAG,OAAO,CAAC;oBAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAA;iBAAE,CAAC;gBAChF,GAAG,EAAE,MAAM,CAAC;aACZ,KAAK;gBAAE,UAAU,EAAE,MAAM,CAAA;aAAE,CAAC;SAC7B,CAAC;KACF,CAAC;IACF,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IACjC,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC9B,oFAAoF;IACpF,WAAW,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,IAAI,CAAC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACZ;AAGD,wBAAsB,gBAAgB,CACrC,IAAI,EAAE,iBAAiB,GACrB,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAoDvD;AAED,KAAK,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;AAIhC;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IAC1C,mBAAmB,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;IACxC,gBAAgB,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;IACrC,WAAW,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,GAAG,CAAC,EAAE;QAAE,kBAAkB,CAAC,EAAE,KAAK,CAAC;QAAC,eAAe,CAAC,EAAE,KAAK,CAAA;KAAE,GAAG,SAAS,CAAC;CAC1E,GAAG;IAAE,WAAW,EAAE,KAAK,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAkCvG;AAED,uFAAuF;AACvF,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,KAAK,GAAG,IAAI,CAEtE"}
@@ -0,0 +1,2 @@
1
+ export declare function runWorkflowTypes(): Promise<string[]>;
2
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/commands/workflow/types.ts"],"names":[],"mappings":"AAGA,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAE1D"}
@@ -0,0 +1,4 @@
1
+ import { Command } from "commander";
2
+ export declare function resolveCliVersion(): string;
3
+ export declare function createCli(): Command;
4
+ //# sourceMappingURL=create-cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-cli.d.ts","sourceRoot":"","sources":["../src/create-cli.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AA4D5C,wBAAgB,iBAAiB,IAAI,MAAM,CAa1C;AAED,wBAAgB,SAAS,IAAI,OAAO,CAyfnC"}
@@ -0,0 +1,5 @@
1
+ export declare const cliPackage: {
2
+ readonly name: "ai-whisper";
3
+ };
4
+ export { createCli } from "./create-cli.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;CAEb,CAAC;AAEX,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { WorkItem } from "@ai-whisper/shared";
2
+ export declare function inferRequestedAction(instruction: string): WorkItem["requestedAction"];
3
+ //# sourceMappingURL=action-inference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-inference.d.ts","sourceRoot":"","sources":["../../src/runtime/action-inference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,wBAAgB,oBAAoB,CACnC,WAAW,EAAE,MAAM,GACjB,QAAQ,CAAC,iBAAiB,CAAC,CAS7B"}
@@ -0,0 +1,2 @@
1
+ export declare function normalizeArtifactPaths(workspaceRoot: string, artifactPaths: string[]): string[];
2
+ //# sourceMappingURL=artifact-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact-input.d.ts","sourceRoot":"","sources":["../../src/runtime/artifact-input.ts"],"names":[],"mappings":"AAEA,wBAAgB,sBAAsB,CACrC,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,MAAM,EAAE,GACrB,MAAM,EAAE,CAEV"}
@@ -0,0 +1,14 @@
1
+ export declare function createAssistantTurnCapture(): {
2
+ reset(): void;
3
+ recordProviderOutput(chunk: string): void;
4
+ finishAssistantTurn(): void;
5
+ hasVisibleAssistantTurn(): boolean;
6
+ extractLatestAssistantTurn(): {
7
+ confidence: "low";
8
+ text: null;
9
+ } | {
10
+ confidence: "high";
11
+ text: string;
12
+ };
13
+ };
14
+ //# sourceMappingURL=assistant-turn-capture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assistant-turn-capture.d.ts","sourceRoot":"","sources":["../../src/runtime/assistant-turn-capture.ts"],"names":[],"mappings":"AAAA,wBAAgB,0BAA0B;;gCA6BZ,MAAM;;;;;;;;;;EAmBnC"}
@@ -0,0 +1,16 @@
1
+ export interface BracketedPasteDetector {
2
+ /** Feed a chunk of provider PTY output. Tracks the latest paste-mode toggle. */
3
+ observe(data: string): void;
4
+ /** True when codex currently has bracketed-paste mode enabled. */
5
+ readonly enabled: boolean;
6
+ }
7
+ /**
8
+ * Observes codex PTY output for the bracketed-paste mode toggle. Codex emits
9
+ * `ESC[?2004h` when its composer is active/ready (paste mode on) and `ESC[?2004l`
10
+ * when not. `enabled` therefore doubles as a capability signal (does codex
11
+ * support bracketed paste?) and a readiness signal (is the composer focused?).
12
+ * If codex ever stops emitting the enable sequence, `enabled` stays false and
13
+ * callers fall back to the keystream submit strategy — no code change required.
14
+ */
15
+ export declare function createBracketedPasteDetector(): BracketedPasteDetector;
16
+ //# sourceMappingURL=bracketed-paste-detector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bracketed-paste-detector.d.ts","sourceRoot":"","sources":["../../src/runtime/bracketed-paste-detector.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,sBAAsB;IACtC,gFAAgF;IAChF,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,IAAI,sBAAsB,CAarE"}
@@ -0,0 +1,48 @@
1
+ import type { BrokerArtifactHandle } from "@ai-whisper/shared";
2
+ type AttemptResult = "timed_out" | "invalid_reply" | "submit_failed" | "replied";
3
+ export declare class BrokerArtifactService {
4
+ private readonly tempRoot;
5
+ constructor(tempRoot: string);
6
+ createArtifact(input: {
7
+ workItemId: string;
8
+ collabId: string;
9
+ threadId: string;
10
+ requestedAction: string;
11
+ instruction: string;
12
+ provider: string;
13
+ sessionId: string;
14
+ now: string;
15
+ }): BrokerArtifactHandle;
16
+ recordAttemptStart(input: {
17
+ artifactHandle: BrokerArtifactHandle;
18
+ attemptNumber: number;
19
+ executionMode: "one_shot";
20
+ promptSummary: string;
21
+ startedAt: string;
22
+ }): void;
23
+ recordAttemptResult(input: {
24
+ artifactHandle: BrokerArtifactHandle;
25
+ attemptNumber: number;
26
+ result: AttemptResult;
27
+ endedAt: string;
28
+ outputTail?: string;
29
+ }): void;
30
+ recordReplied(input: {
31
+ artifactHandle: BrokerArtifactHandle;
32
+ at: string;
33
+ }): void;
34
+ recordConsumed(input: {
35
+ artifactHandle: BrokerArtifactHandle;
36
+ at: string;
37
+ }): void;
38
+ recordFailed(input: {
39
+ artifactHandle: BrokerArtifactHandle;
40
+ state: "timed_out" | "invalid_reply" | "submit_failed";
41
+ at: string;
42
+ }): void;
43
+ sweep(): void;
44
+ private transitionState;
45
+ }
46
+ export declare function createBrokerArtifactService(): BrokerArtifactService;
47
+ export {};
48
+ //# sourceMappingURL=broker-artifact-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"broker-artifact-service.d.ts","sourceRoot":"","sources":["../../src/runtime/broker-artifact-service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAe/D,KAAK,aAAa,GAAG,WAAW,GAAG,eAAe,GAAG,eAAe,GAAG,SAAS,CAAC;AA4FjF,qBAAa,qBAAqB;IACjC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;gBAEtB,QAAQ,EAAE,MAAM;IAI5B,cAAc,CAAC,KAAK,EAAE;QACrB,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,eAAe,EAAE,MAAM,CAAC;QACxB,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,GAAG,EAAE,MAAM,CAAC;KACZ,GAAG,oBAAoB;IA8CxB,kBAAkB,CAAC,KAAK,EAAE;QACzB,cAAc,EAAE,oBAAoB,CAAC;QACrC,aAAa,EAAE,MAAM,CAAC;QACtB,aAAa,EAAE,UAAU,CAAC;QAC1B,aAAa,EAAE,MAAM,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;KAClB,GAAG,IAAI;IAaR,mBAAmB,CAAC,KAAK,EAAE;QAC1B,cAAc,EAAE,oBAAoB,CAAC;QACrC,aAAa,EAAE,MAAM,CAAC;QACtB,MAAM,EAAE,aAAa,CAAC;QACtB,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,IAAI;IAgBR,aAAa,CAAC,KAAK,EAAE;QAAE,cAAc,EAAE,oBAAoB,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAIhF,cAAc,CAAC,KAAK,EAAE;QAAE,cAAc,EAAE,oBAAoB,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAIjF,YAAY,CAAC,KAAK,EAAE;QACnB,cAAc,EAAE,oBAAoB,CAAC;QACrC,KAAK,EAAE,WAAW,GAAG,eAAe,GAAG,eAAe,CAAC;QACvD,EAAE,EAAE,MAAM,CAAC;KACX,GAAG,IAAI;IAIR,KAAK,IAAI,IAAI;IAmCb,OAAO,CAAC,eAAe;CAYvB;AAMD,wBAAgB,2BAA2B,IAAI,qBAAqB,CAEnE"}
@@ -0,0 +1,9 @@
1
+ import type { BrokerRuntime } from "@ai-whisper/broker";
2
+ export declare function connectToWorkspaceBroker(input: {
3
+ cwd: string;
4
+ collabIdOverride?: string;
5
+ }): Promise<{
6
+ broker: BrokerRuntime;
7
+ collabId: string;
8
+ }>;
9
+ //# sourceMappingURL=broker-connect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"broker-connect.d.ts","sourceRoot":"","sources":["../../src/runtime/broker-connect.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKxD,wBAAsB,wBAAwB,CAC7C,KAAK,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAE,GAC/C,OAAO,CAAC;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CA6CtD"}
@@ -0,0 +1,25 @@
1
+ export declare function assessBrokerDaemon(input: {
2
+ host: string;
3
+ port: number;
4
+ pid: number;
5
+ fetchImpl?: typeof fetch;
6
+ killImpl?: typeof process.kill;
7
+ }): Promise<{
8
+ readonly pidAlive: boolean;
9
+ readonly httpReachable: boolean;
10
+ readonly ok: boolean;
11
+ }>;
12
+ export declare function resolveBrokerDaemonLaunch(metaUrl?: string): {
13
+ command: string;
14
+ args: string[];
15
+ };
16
+ /**
17
+ * Build the env the broker daemon child is spawned with. `AI_WHISPER_COLLAB_ID`
18
+ * is the single source of truth for the daemon's collab identity — it is read
19
+ * by `bin/broker-daemon.ts` (for the PID self-write) and by
20
+ * `create-broker-runtime.ts` (to start the heartbeat thread). Keep that key
21
+ * name in sync across all three sites.
22
+ */
23
+ export declare function buildBrokerDaemonEnv(sqlitePath: string, host: string, port: number, collabId: string): NodeJS.ProcessEnv;
24
+ export declare function spawnBrokerDaemon(sqlitePath: string, host: string, port: number, collabId: string): number;
25
+ //# sourceMappingURL=broker-daemon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"broker-daemon.d.ts","sourceRoot":"","sources":["../../src/runtime/broker-daemon.ts"],"names":[],"mappings":"AAYA,wBAAsB,kBAAkB,CAAC,KAAK,EAAE;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,OAAO,CAAC,IAAI,CAAC;CAC/B;;;;GAwBA;AAED,wBAAgB,yBAAyB,CAAC,OAAO,GAAE,MAAwB,GAAG;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;CACf,CA2BA;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CACnC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACd,MAAM,CAAC,UAAU,CAQnB;AAED,wBAAgB,iBAAiB,CAChC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACd,MAAM,CASR"}
@@ -0,0 +1,11 @@
1
+ export declare function createBusyIndicator(input: {
2
+ write: (data: string) => void;
3
+ }): {
4
+ isBusy(): boolean;
5
+ show(params: {
6
+ senderAgent: string;
7
+ instruction: string;
8
+ }): void;
9
+ hide(): void;
10
+ };
11
+ //# sourceMappingURL=busy-indicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"busy-indicator.d.ts","sourceRoot":"","sources":["../../src/runtime/busy-indicator.ts"],"names":[],"mappings":"AAIA,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IAC1C,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B;;iBAuBc;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE;;EAsB1D"}
@@ -0,0 +1,39 @@
1
+ import type Database from "better-sqlite3";
2
+ import { type LeaseOptions } from "@ai-whisper/broker";
3
+ export type CaptureHandbackStatus = "captured" | "degraded_pty_only";
4
+ export interface CaptureHandbackResult {
5
+ status: CaptureHandbackStatus;
6
+ /** Captured clipboard text on success; null when degraded to PTY-only. */
7
+ text: string | null;
8
+ /** True when changeCount flagged a foreign write during the held window. */
9
+ interferenceDetected: boolean;
10
+ }
11
+ export interface CaptureHandbackInput {
12
+ db: Database.Database;
13
+ collabId: string;
14
+ pid: number;
15
+ /** This collab's PTY turn text, used by the interference content check. */
16
+ turnText: string;
17
+ /** Runs one /copy injection + clipboard read; returns text or null. */
18
+ runCapture: () => Promise<string | null>;
19
+ /** Reads NSPasteboard.changeCount, or null when the helper is unavailable. */
20
+ readChangeCount: () => Promise<number | null>;
21
+ leaseOptions?: LeaseOptions;
22
+ /** Bounded poll-acquire. */
23
+ acquireMaxWaitMs?: number;
24
+ acquireBackoffMs?: number;
25
+ /** Interference re-capture bound (default 2). */
26
+ recaptureAttempts?: number;
27
+ recaptureBackoffMs?: number;
28
+ sleep?: (ms: number) => Promise<void>;
29
+ }
30
+ /**
31
+ * Lease-wrapped clipboard capture. Acquires the host-global capture lease (or
32
+ * degrades to PTY-only on timeout — never a racy read), snapshots changeCount
33
+ * (C0), runs the capture, re-reads changeCount (Cn). Cn-C0 == 1 ⇒ clean accept.
34
+ * Cn-C0 > 1 ⇒ interference ladder (re-capture → content-accept → PTY-only).
35
+ * Releases in finally. When readChangeCount yields null the ownership check is
36
+ * skipped and the capture is accepted on the lease alone.
37
+ */
38
+ export declare function captureHandbackText(input: CaptureHandbackInput): Promise<CaptureHandbackResult>;
39
+ //# sourceMappingURL=capture-handback-text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture-handback-text.d.ts","sourceRoot":"","sources":["../../src/runtime/capture-handback-text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAGN,KAAK,YAAY,EACjB,MAAM,oBAAoB,CAAC;AAM5B,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,mBAAmB,CAAC;AAErE,MAAM,WAAW,qBAAqB;IACrC,MAAM,EAAE,qBAAqB,CAAC;IAC9B,0EAA0E;IAC1E,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,4EAA4E;IAC5E,oBAAoB,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,oBAAoB;IACpC,EAAE,EAAE,QAAQ,CAAC,QAAQ,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,UAAU,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACzC,8EAA8E;IAC9E,eAAe,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC9C,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,4BAA4B;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iDAAiD;IACjD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC;AAiBD;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACxC,KAAK,EAAE,oBAAoB,GACzB,OAAO,CAAC,qBAAqB,CAAC,CA8EhC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Factory for the changeCount reader. Injectable `platform` and `runHelper`
3
+ * make it deterministically testable. Returns a reader that yields the current
4
+ * NSPasteboard changeCount, or `null` when unavailable (non-darwin, helper
5
+ * missing, helper error, or non-numeric output) — the caller then SKIPS the
6
+ * ownership check rather than blocking capture.
7
+ */
8
+ export declare function makeChangeCountReader(deps?: {
9
+ platform?: NodeJS.Platform;
10
+ runHelper?: () => Promise<string>;
11
+ }): () => Promise<number | null>;
12
+ //# sourceMappingURL=clipboard-change-count.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipboard-change-count.d.ts","sourceRoot":"","sources":["../../src/runtime/clipboard-change-count.ts"],"names":[],"mappings":"AAmBA;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,CAAC,EAAE;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;CAClC,GAAG,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAsB/B"}
@@ -0,0 +1,13 @@
1
+ export declare function captureClipboardHandback(input: {
2
+ triggerCopy(): void | Promise<void>;
3
+ /** Called once if clipboard has not changed after the initial trigger delay.
4
+ * Use this to dismiss a picker or confirm a secondary prompt (e.g. Claude Code's /copy picker). */
5
+ confirmPicker?: () => void | Promise<void>;
6
+ readClipboard?: () => Promise<string>;
7
+ sleep?: (ms: number) => Promise<void>;
8
+ attempts?: number;
9
+ delayMs?: number;
10
+ /** Delay before first poll; also the window given to confirmPicker to fire. Defaults to delayMs. */
11
+ triggerDelayMs?: number;
12
+ }): Promise<string | null>;
13
+ //# sourceMappingURL=clipboard-handback-capture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipboard-handback-capture.d.ts","sourceRoot":"","sources":["../../src/runtime/clipboard-handback-capture.ts"],"names":[],"mappings":"AAkBA,wBAAsB,wBAAwB,CAAC,KAAK,EAAE;IACrD,WAAW,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC;wGACoG;IACpG,aAAa,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oGAAoG;IACpG,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAuCzB"}
@@ -0,0 +1,36 @@
1
+ import type Database from "better-sqlite3";
2
+ import { type SessionAttachmentRecord } from "@ai-whisper/broker";
3
+ export type ResolverErrorKind = "NoCollabFoundForCwd" | "CollabAlreadyStopped" | "NoLiveDaemonForCollab" | "WorkspaceUnreadable";
4
+ export declare class CollabResolverError extends Error {
5
+ readonly kind: ResolverErrorKind;
6
+ constructor(kind: ResolverErrorKind, message: string);
7
+ }
8
+ export interface ResolvedCollab {
9
+ collabId: string;
10
+ workspaceId: string | null;
11
+ workspaceRoot: string;
12
+ daemon: {
13
+ host: string;
14
+ port: number;
15
+ pid: number;
16
+ } | null;
17
+ launch: {
18
+ mode: "tmux" | "terminals" | "none";
19
+ tmuxSession?: string;
20
+ };
21
+ recovery: {
22
+ state: "normal" | "recovery_required" | "recovered";
23
+ idleAfterRecovery: boolean;
24
+ recoveredAt: string | null;
25
+ };
26
+ status: "active" | "stopped";
27
+ attachments: SessionAttachmentRecord[];
28
+ }
29
+ export declare function resolveCollab(opts: {
30
+ db: Database.Database;
31
+ cwd: string;
32
+ collabIdOverride?: string;
33
+ requireActive?: boolean;
34
+ requireDaemon?: boolean;
35
+ }): ResolvedCollab;
36
+ //# sourceMappingURL=collab-resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collab-resolver.d.ts","sourceRoot":"","sources":["../../src/runtime/collab-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAIN,KAAK,uBAAuB,EAC5B,MAAM,oBAAoB,CAAC;AAG5B,MAAM,MAAM,iBAAiB,GAC1B,qBAAqB,GACrB,sBAAsB,GACtB,uBAAuB,GACvB,qBAAqB,CAAC;AAEzB,qBAAa,mBAAoB,SAAQ,KAAK;aACjB,IAAI,EAAE,iBAAiB;gBAAvB,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM;CAIpE;AAED,MAAM,WAAW,cAAc;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC3D,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtE,QAAQ,EAAE;QACT,KAAK,EAAE,QAAQ,GAAG,mBAAmB,GAAG,WAAW,CAAC;QACpD,iBAAiB,EAAE,OAAO,CAAC;QAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;KAC3B,CAAC;IACF,MAAM,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC7B,WAAW,EAAE,uBAAuB,EAAE,CAAC;CACvC;AAWD,wBAAgB,aAAa,CAAC,IAAI,EAAE;IACnC,EAAE,EAAE,QAAQ,CAAC,QAAQ,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB,GAAG,cAAc,CAgEjB"}
@@ -0,0 +1,13 @@
1
+ import type { BrokerRuntime } from "@ai-whisper/broker";
2
+ import type { CompanionProvider, InteractiveSessionController } from "@ai-whisper/shared";
3
+ import type { createRelayPaneWriter } from "./relay-pane-writer.js";
4
+ export declare function runCompanionAgentLoop(input: {
5
+ broker: BrokerRuntime;
6
+ collabId: string;
7
+ sessionId: string;
8
+ provider: CompanionProvider;
9
+ interactiveSession: InteractiveSessionController;
10
+ relayPaneWriter: ReturnType<typeof createRelayPaneWriter>;
11
+ pollIntervalMs?: number;
12
+ }): Promise<() => Promise<void>>;
13
+ //# sourceMappingURL=companion-agent-loop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"companion-agent-loop.d.ts","sourceRoot":"","sources":["../../src/runtime/companion-agent-loop.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EACX,iBAAiB,EACjB,4BAA4B,EAC5B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAMpE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC5C,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,kBAAkB,EAAE,4BAA4B,CAAC;IACjD,eAAe,EAAE,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;IAC1D,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB,GAAG,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAyE/B"}