@slopus/happy-terminal 0.3.0-beta.13

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/LICENSE +21 -0
  2. package/LICENSE-CODEX +203 -0
  3. package/LICENSE-GROK-BUILD +204 -0
  4. package/LICENSE-HAPPY +21 -0
  5. package/README.md +60 -0
  6. package/THIRD-PARTY-NOTICES.md +34 -0
  7. package/dist/HappyTerminalUserError.d.ts +12 -0
  8. package/dist/app/AppTranscriptEntry.d.ts +33 -0
  9. package/dist/app/AppendOnlyStreamingRender.d.ts +12 -0
  10. package/dist/app/CodexFileDiff.d.ts +20 -0
  11. package/dist/app/CodexMcpToolCall.d.ts +25 -0
  12. package/dist/app/CodingAssistantAgentBackend.d.ts +81 -0
  13. package/dist/app/CodingAssistantApp.d.ts +128 -0
  14. package/dist/app/CompletedTurn.d.ts +11 -0
  15. package/dist/app/FileMentionAutocomplete.d.ts +30 -0
  16. package/dist/app/HappyTerminalProcessTerminal.d.ts +7 -0
  17. package/dist/app/NoticeChild.d.ts +4 -0
  18. package/dist/app/SecretMenuController.d.ts +31 -0
  19. package/dist/app/SelectionList.d.ts +24 -0
  20. package/dist/app/SessionDraftSync.d.ts +51 -0
  21. package/dist/app/StartupStatusApp.d.ts +34 -0
  22. package/dist/app/StartupStatusCardModel.d.ts +22 -0
  23. package/dist/app/TemporaryFullscreenController.d.ts +9 -0
  24. package/dist/app/TerminalColorLevel.d.ts +1 -0
  25. package/dist/app/TerminalOutputTrace.d.ts +12 -0
  26. package/dist/app/TerminalTheme.d.ts +11 -0
  27. package/dist/app/TranscriptEntryRenderCache.d.ts +10 -0
  28. package/dist/app/applyWorkflowRunUpdate.d.ts +2 -0
  29. package/dist/app/blendComposerBackground.d.ts +2 -0
  30. package/dist/app/boundedJsonStringify.d.ts +1 -0
  31. package/dist/app/calculateCacheHitPercent.d.ts +2 -0
  32. package/dist/app/codexDiffAnsi.d.ts +17 -0
  33. package/dist/app/compactCompletedTurnEntries.d.ts +2 -0
  34. package/dist/app/containsMarkdownTable.d.ts +1 -0
  35. package/dist/app/createAgentMarkdownTheme.d.ts +3 -0
  36. package/dist/app/createBackgroundTerminalViewer.d.ts +16 -0
  37. package/dist/app/createCompletedTurn.d.ts +6 -0
  38. package/dist/app/createEditorTheme.d.ts +3 -0
  39. package/dist/app/createFileMentionAutocompleteItems.d.ts +3 -0
  40. package/dist/app/createSecretInputPanel.d.ts +12 -0
  41. package/dist/app/createSelectionPanel.d.ts +14 -0
  42. package/dist/app/createSerialTaskQueue.d.ts +1 -0
  43. package/dist/app/createSessionPicker.d.ts +17 -0
  44. package/dist/app/createSlashCommands.d.ts +7 -0
  45. package/dist/app/createStopOnceHandler.d.ts +1 -0
  46. package/dist/app/createSubagentMonitor.d.ts +17 -0
  47. package/dist/app/createTerminalInputBurstHandler.d.ts +5 -0
  48. package/dist/app/createWorkflowMonitor.d.ts +15 -0
  49. package/dist/app/defaultTerminalTheme.d.ts +1 -0
  50. package/dist/app/describeModelChoice.d.ts +4 -0
  51. package/dist/app/describeProviderSignIn.d.ts +2 -0
  52. package/dist/app/describeReasoningLevel.d.ts +4 -0
  53. package/dist/app/detectCodexDiffLanguage.d.ts +1 -0
  54. package/dist/app/encodeModelChoice.d.ts +1 -0
  55. package/dist/app/endsAfterOpeningCodeFence.d.ts +1 -0
  56. package/dist/app/findFileMentionContext.d.ts +9 -0
  57. package/dist/app/findFileMentionPrefix.d.ts +5 -0
  58. package/dist/app/formatActivityElapsedTime.d.ts +1 -0
  59. package/dist/app/formatCodexMcpToolResult.d.ts +3 -0
  60. package/dist/app/formatCompactTokens.d.ts +1 -0
  61. package/dist/app/formatFileMention.d.ts +1 -0
  62. package/dist/app/formatProviderError.d.ts +6 -0
  63. package/dist/app/formatRelativeTime.d.ts +2 -0
  64. package/dist/app/formatResetDuration.d.ts +1 -0
  65. package/dist/app/formatSessionPickerEntry.d.ts +14 -0
  66. package/dist/app/formatSessionTokenStatus.d.ts +6 -0
  67. package/dist/app/formatSessionUsageSummary.d.ts +3 -0
  68. package/dist/app/formatStartupStatusUsageRemaining.d.ts +2 -0
  69. package/dist/app/formatStartupStatusUsageRows.d.ts +2 -0
  70. package/dist/app/formatSubagentToolCall.d.ts +10 -0
  71. package/dist/app/formatToolPermissionNotice.d.ts +3 -0
  72. package/dist/app/formatToolResultForDisplay.d.ts +2 -0
  73. package/dist/app/formatTurnUsageSummary.d.ts +2 -0
  74. package/dist/app/formatWorkUsageSummary.d.ts +14 -0
  75. package/dist/app/highlightAgentCode.d.ts +1 -0
  76. package/dist/app/highlightCodexDiffLine.d.ts +2 -0
  77. package/dist/app/highlightShellCommand.d.ts +1 -0
  78. package/dist/app/humanizeGoalStatus.d.ts +2 -0
  79. package/dist/app/humanizeMcpName.d.ts +1 -0
  80. package/dist/app/humanizePermissionMode.d.ts +2 -0
  81. package/dist/app/humanizePermissionReviewLevel.d.ts +2 -0
  82. package/dist/app/humanizeProviderId.d.ts +1 -0
  83. package/dist/app/humanizeReasoningLevel.d.ts +1 -0
  84. package/dist/app/humanizeSubagentStatus.d.ts +2 -0
  85. package/dist/app/humanizeToolName.d.ts +1 -0
  86. package/dist/app/humanizeWorkflowStatus.d.ts +2 -0
  87. package/dist/app/installResumeInstructions.d.ts +26 -0
  88. package/dist/app/installTerminalCrashCleanup.d.ts +26 -0
  89. package/dist/app/isLightTerminalBackground.d.ts +2 -0
  90. package/dist/app/layoutCodexFileDiff.d.ts +13 -0
  91. package/dist/app/looksLikeAuthenticationFailure.d.ts +5 -0
  92. package/dist/app/nearestXtermColorIndex.d.ts +2 -0
  93. package/dist/app/parseCodexMcpToolInvocation.d.ts +2 -0
  94. package/dist/app/parseSessionCommand.d.ts +6 -0
  95. package/dist/app/providerErrorResetAt.d.ts +2 -0
  96. package/dist/app/providerQuotaToStartupStatusUsage.d.ts +3 -0
  97. package/dist/app/readClipboardImage.d.ts +9 -0
  98. package/dist/app/renderActivityWave.d.ts +3 -0
  99. package/dist/app/renderAgentMarkdown.d.ts +8 -0
  100. package/dist/app/renderBackgroundTerminalCompletion.d.ts +1 -0
  101. package/dist/app/renderBackgroundTerminalInteraction.d.ts +2 -0
  102. package/dist/app/renderBackgroundTerminalSummary.d.ts +1 -0
  103. package/dist/app/renderChildRows.d.ts +13 -0
  104. package/dist/app/renderCodexDiffLine.d.ts +3 -0
  105. package/dist/app/renderCodexFileDiff.d.ts +7 -0
  106. package/dist/app/renderCodexMcpToolCall.d.ts +2 -0
  107. package/dist/app/renderCompletedTurnStats.d.ts +2 -0
  108. package/dist/app/renderExecCommand.d.ts +11 -0
  109. package/dist/app/renderExploration.d.ts +9 -0
  110. package/dist/app/renderFullscreenComponent.d.ts +8 -0
  111. package/dist/app/renderHappyTerminalBanner.d.ts +6 -0
  112. package/dist/app/renderHappyTerminalVersion.d.ts +1 -0
  113. package/dist/app/renderNoticeWithChildren.d.ts +7 -0
  114. package/dist/app/renderPendingSteeringMessages.d.ts +1 -0
  115. package/dist/app/renderStartupStatusCard.d.ts +7 -0
  116. package/dist/app/renderSubagentSummary.d.ts +6 -0
  117. package/dist/app/renderTurnCompletionSeparator.d.ts +1 -0
  118. package/dist/app/renderWorkflowSummary.d.ts +1 -0
  119. package/dist/app/resolveInputBackground.d.ts +3 -0
  120. package/dist/app/resolveStartupProviderQuota.d.ts +3 -0
  121. package/dist/app/resolveStartupSessionId.d.ts +18 -0
  122. package/dist/app/resolveTerminalColorLevel.d.ts +2 -0
  123. package/dist/app/resolveTerminalStyle.d.ts +1 -0
  124. package/dist/app/resolveTerminalTheme.d.ts +5 -0
  125. package/dist/app/runApp.d.ts +27 -0
  126. package/dist/app/runClipboardCommand.d.ts +8 -0
  127. package/dist/app/sanitizeTerminalText.d.ts +1 -0
  128. package/dist/app/shortenHomePath.d.ts +2 -0
  129. package/dist/app/sortSubagentsForDisplay.d.ts +2 -0
  130. package/dist/app/subagentElapsedMs.d.ts +2 -0
  131. package/dist/app/subagentLogMessageText.d.ts +2 -0
  132. package/dist/app/surfaceThemedLine.d.ts +3 -0
  133. package/dist/app/truncatePathToWidth.d.ts +1 -0
  134. package/dist/app/truncateTextForDisplay.d.ts +5 -0
  135. package/dist/app/truncateUtf8BytesForDisplay.d.ts +1 -0
  136. package/dist/app/upsertSubagentSummary.d.ts +2 -0
  137. package/dist/app/workflowDisplay.d.ts +2 -0
  138. package/dist/client/HappyAgentEventHub.d.ts +25 -0
  139. package/dist/client/RemoteAgent.d.ts +74 -0
  140. package/dist/client/RemoteAgentRunError.d.ts +4 -0
  141. package/dist/client/RemoteTerminalAttachment.d.ts +19 -0
  142. package/dist/client/RemoteTerminalClientReplica.d.ts +14 -0
  143. package/dist/client/ensureLocalProtocolServer.d.ts +10 -0
  144. package/dist/client/fetchProviderQuotas.d.ts +10 -0
  145. package/dist/client/index.d.ts +8 -0
  146. package/dist/client/loadAgentCatalog.d.ts +32 -0
  147. package/dist/config/createProjectConfigSecurityNotice.d.ts +10 -0
  148. package/dist/config/defaultConfig.d.ts +2 -0
  149. package/dist/config/getDefaultGlobalConfigPath.d.ts +1 -0
  150. package/dist/config/getDefaultLocalConfigPath.d.ts +1 -0
  151. package/dist/config/getDefaultRuntimeConfigPath.d.ts +1 -0
  152. package/dist/config/getHappyConfigDirectory.d.ts +1 -0
  153. package/dist/config/getHappyTerminalHome.d.ts +1 -0
  154. package/dist/config/index.d.ts +15 -0
  155. package/dist/config/loadConfig.d.ts +2 -0
  156. package/dist/config/mergeConfigValues.d.ts +2 -0
  157. package/dist/config/parseConfigToml.d.ts +7 -0
  158. package/dist/config/readConfigFile.d.ts +2 -0
  159. package/dist/config/readProjectConfigFile.d.ts +2 -0
  160. package/dist/config/resolveConfigPaths.d.ts +2 -0
  161. package/dist/config/runtimeConfigLock.d.ts +1 -0
  162. package/dist/config/types.d.ts +74 -0
  163. package/dist/config/updateRuntimeConfig.d.ts +2 -0
  164. package/dist/config/updateRuntimePreferences.d.ts +2 -0
  165. package/dist/config/withoutProjectMachineSettings.d.ts +7 -0
  166. package/dist/config/writeRuntimeConfig.d.ts +3 -0
  167. package/dist/config/writeRuntimeConfigDefaults.d.ts +2 -0
  168. package/dist/daemon/createUnixSocketFetch.d.ts +2 -0
  169. package/dist/daemon/daemonPid.d.ts +11 -0
  170. package/dist/daemon/ensureHappyAgentBinary.d.ts +15 -0
  171. package/dist/daemon/ensureLocalProtocolServer.d.ts +24 -0
  172. package/dist/daemon/getHappyDaemonPaths.d.ts +16 -0
  173. package/dist/daemon/happyAgentBinaryConfig.d.ts +15 -0
  174. package/dist/daemon/index.d.ts +5 -0
  175. package/dist/daemon/runDaemonCommand.d.ts +4 -0
  176. package/dist/debug/DebugLog.d.ts +11 -0
  177. package/dist/debug/closeNodeInspector.d.ts +1 -0
  178. package/dist/debug/createDebugJsonReplacer.d.ts +1 -0
  179. package/dist/debug/createRequestDebugDirectory.d.ts +1 -0
  180. package/dist/debug/getDebugRootDirectory.d.ts +1 -0
  181. package/dist/debug/getNodeInspectorUrl.d.ts +1 -0
  182. package/dist/debug/index.d.ts +8 -0
  183. package/dist/debug/openNodeInspector.d.ts +1 -0
  184. package/dist/debug/registerHappyTerminalDebugRoot.d.ts +5 -0
  185. package/dist/docs/DESIGN.md +2191 -0
  186. package/dist/docs/README.md +93 -0
  187. package/dist/docs/agents-and-collaboration.md +365 -0
  188. package/dist/docs/architecture.md +468 -0
  189. package/dist/docs/extending.md +561 -0
  190. package/dist/docs/happy.md +386 -0
  191. package/dist/docs/permissions-and-sandbox.md +342 -0
  192. package/dist/docs/workspaces.md +281 -0
  193. package/dist/errorToMessage.d.ts +1 -0
  194. package/dist/formatCliFailure.d.ts +10 -0
  195. package/dist/index.d.ts +3 -0
  196. package/dist/index.js +17151 -0
  197. package/dist/main.js +18946 -0
  198. package/dist/observability/daemonContext.d.ts +16 -0
  199. package/dist/observability/index.d.ts +1 -0
  200. package/dist/processes/BoundedOutputBuffer.d.ts +20 -0
  201. package/dist/processes/NativeProcessManager.d.ts +66 -0
  202. package/dist/processes/ProcessGroupReaper.d.ts +32 -0
  203. package/dist/processes/index.d.ts +7 -0
  204. package/dist/processes/isProcessRunning.d.ts +1 -0
  205. package/dist/processes/isTargetProcessAlive.d.ts +1 -0
  206. package/dist/processes/killProcessTree.d.ts +2 -0
  207. package/dist/processes/resolveSystemShell.d.ts +1 -0
  208. package/dist/processes/startProcessTransport.d.ts +33 -0
  209. package/dist/processes/types.d.ts +41 -0
  210. package/dist/processes/waitForProcessExit.d.ts +2 -0
  211. package/dist/protocol/AppletProtocol.d.ts +101 -0
  212. package/dist/protocol/Attachment.d.ts +96 -0
  213. package/dist/protocol/ClientProtocolTypes.d.ts +481 -0
  214. package/dist/protocol/DocumentProtocol.d.ts +109 -0
  215. package/dist/protocol/EventId.d.ts +1 -0
  216. package/dist/protocol/FolderProtocol.d.ts +236 -0
  217. package/dist/protocol/FolderSharingProtocol.d.ts +97 -0
  218. package/dist/protocol/GitHubPluginProtocol.d.ts +43 -0
  219. package/dist/protocol/GlobalSecurityProtocol.d.ts +7 -0
  220. package/dist/protocol/HappyCloudProtocol.d.ts +178 -0
  221. package/dist/protocol/InstallationProtocol.d.ts +80 -0
  222. package/dist/protocol/OnboardingProtocol.d.ts +47 -0
  223. package/dist/protocol/P2pCredentialProtocol.d.ts +273 -0
  224. package/dist/protocol/P2pIdentityProtocol.d.ts +8 -0
  225. package/dist/protocol/P2pPairingProtocol.d.ts +68 -0
  226. package/dist/protocol/P2pProtocol.d.ts +185 -0
  227. package/dist/protocol/PluginWireTypes.d.ts +81 -0
  228. package/dist/protocol/ProfileProtocol.d.ts +127 -0
  229. package/dist/protocol/ProjectFileProtocol.d.ts +63 -0
  230. package/dist/protocol/ProjectProtocol.d.ts +646 -0
  231. package/dist/protocol/ProtocolVersion.d.ts +8 -0
  232. package/dist/protocol/ServiceNotice.d.ts +175 -0
  233. package/dist/protocol/SessionProtocol.d.ts +1156 -0
  234. package/dist/protocol/SharingProtocol.d.ts +159 -0
  235. package/dist/protocol/SlotProtocol.d.ts +270 -0
  236. package/dist/protocol/TimelineProtocol.d.ts +88 -0
  237. package/dist/protocol/WorkletProtocol.d.ts +159 -0
  238. package/dist/protocol/createEventIdFactory.d.ts +7 -0
  239. package/dist/protocol/index.d.ts +34 -0
  240. package/dist/readPackageVersion.d.ts +1 -0
  241. package/dist/readPackageVersion.js +16 -0
  242. package/dist/reportCliFailure.d.ts +2 -0
  243. package/dist/runHappyTerminal.d.ts +6 -0
  244. package/dist/terminal/index.d.ts +2 -0
  245. package/dist/terminal/types.d.ts +39 -0
  246. package/dist/types.d.ts +6 -0
  247. package/dist/writeStderrSync.d.ts +5 -0
  248. package/package.json +97 -0
@@ -0,0 +1,81 @@
1
+ import type { AgentCompactionResult, AgentLoopEvent, AgentSnapshot, ContentBlock, GoalStatus, Message, Model, PermissionMode, ProviderError, SecretAttachmentScope, ServiceTier, SessionGoal, StopReason, UserMessage } from "../protocol/index.js";
2
+ import type { Context } from "@steve.kite/stdlib";
3
+ import type { AbortRunOptions, AbortRunResponse, GetSessionUsageResponse, ReadBackgroundProcessResponse, RunShellCommandResponse, SteerMessageResponse, SubmitContextMessageResponse, StopBackgroundProcessResponse } from "../protocol/index.js";
4
+ export interface CodingAssistantClientProvider {
5
+ id: string;
6
+ models: readonly Model[];
7
+ serviceTiers?: readonly ServiceTier[];
8
+ }
9
+ export interface AgentRunOptions {
10
+ clientSubmissionId?: string;
11
+ displayText?: string;
12
+ onEvent?: (event: AgentLoopEvent) => void | Promise<void>;
13
+ onMessage?: (message: Message) => void | Promise<void>;
14
+ signal?: AbortSignal;
15
+ }
16
+ export interface AgentRunResult {
17
+ contextMessages: readonly Message[];
18
+ debugDirectory?: string;
19
+ errorMessage?: string;
20
+ messages: readonly Message[];
21
+ providerError?: ProviderError;
22
+ providerId?: string;
23
+ requestedModelId?: string;
24
+ runId: string;
25
+ stopReason: StopReason;
26
+ }
27
+ export interface CodingAssistantModelChoice {
28
+ model: Model;
29
+ providerId: string;
30
+ }
31
+ export interface SteeringRunOptions extends AgentRunOptions {
32
+ clientSubmissionId?: string;
33
+ expectedRunId?: string;
34
+ }
35
+ export interface CodingAssistantAgentBackend {
36
+ readonly canChangeModel: boolean;
37
+ readonly confirmedServiceTier: ServiceTier | undefined;
38
+ readonly id: string;
39
+ readonly provider: CodingAssistantClientProvider;
40
+ readonly model: Model;
41
+ readonly modelChoices?: readonly CodingAssistantModelChoice[];
42
+ readonly permissionMode: PermissionMode;
43
+ /** Unsent composer text shared with the other clients on this session. */
44
+ readonly draft?: string;
45
+ /** When that draft was typed, which decides who wins between clients. */
46
+ readonly draftUpdatedAt?: number | undefined;
47
+ readonly goal?: SessionGoal | undefined;
48
+ readonly projectSecretIds?: readonly string[];
49
+ readonly secretIds?: readonly string[];
50
+ readonly sessionSecretIds?: readonly string[];
51
+ getUsage?(): Promise<GetSessionUsageResponse>;
52
+ readBackgroundProcess(sessionId: number, options?: {
53
+ waitMs?: number;
54
+ }): Promise<ReadBackgroundProcessResponse | undefined>;
55
+ abort?(options?: AbortRunOptions): Promise<AbortRunResponse>;
56
+ attachSecret?(secretId: string, scope?: SecretAttachmentScope): Promise<void>;
57
+ compact(ctx: Context, signal?: AbortSignal, onEvent?: AgentRunOptions["onEvent"]): Promise<AgentCompactionResult>;
58
+ changeGoalStatus?(status: GoalStatus): Promise<void>;
59
+ clearGoal?(): Promise<void>;
60
+ detachSecret?(secretId: string, scope?: SecretAttachmentScope): Promise<void>;
61
+ reset(): Promise<void>;
62
+ runShellCommand(command: string, options: {
63
+ commandId: string;
64
+ }): Promise<RunShellCommandResponse>;
65
+ rewind?(messageId: string): Promise<UserMessage>;
66
+ stopBackgroundProcesses(): Promise<number>;
67
+ stopBackgroundProcess(sessionId: number): Promise<StopBackgroundProcessResponse>;
68
+ send(ctx: Context, content: string | readonly ContentBlock[], options?: AgentRunOptions): Promise<AgentRunResult>;
69
+ sendContext?(text: string): Promise<SubmitContextMessageResponse>;
70
+ steer(content: string | readonly ContentBlock[], options?: SteeringRunOptions): Promise<void | SteerMessageResponse>;
71
+ setEffort(effort: string | undefined): void;
72
+ setModel(modelId: string, effort: string | undefined, providerId?: string): void | Promise<void>;
73
+ setServiceTier(serviceTier: ServiceTier | undefined): void | Promise<void>;
74
+ setPermissionMode(mode: PermissionMode): void | Promise<void>;
75
+ setDraft?(draft: string, options?: {
76
+ origin?: string;
77
+ updatedAt?: number;
78
+ }): Promise<void>;
79
+ setGoal?(objective: string): Promise<void>;
80
+ snapshot(): AgentSnapshot;
81
+ }
@@ -0,0 +1,128 @@
1
+ import type { Context } from "@steve.kite/stdlib";
2
+ import { type Component, type Focusable, type TUI } from "@earendil-works/pi-tui";
3
+ import { type AgentLoopEvent, type AgentSnapshot, type Message, type BashSessionActivity, type GetSessionUsageResponse, type ServiceTier, type Usage, type UserInputRequest, type UserInputResponse } from "../protocol/index.js";
4
+ import type { NativeProcessManager } from "../processes/index.js";
5
+ import type { FileSearchResult, EventId, McpServerSummary, PresenceSnapshot, SecretSummary, SessionEvent, SessionTask, SubagentSummary, WorkflowRun } from "../protocol/index.js";
6
+ import type { EnvironmentSecretRegistration, EnvironmentSecretUpdate, SecretAttachmentScope } from "../protocol/index.js";
7
+ import type { CodingAssistantAgentBackend } from "./CodingAssistantAgentBackend.js";
8
+ import { type ClipboardImage, type ReadClipboardImageOptions } from "./readClipboardImage.js";
9
+ import type { TerminalTheme } from "./TerminalTheme.js";
10
+ import type { StartupStatusCardModel } from "./StartupStatusCardModel.js";
11
+ export type AppExitReason = "exit" | "reload";
12
+ export interface CodingAssistantAppOptions {
13
+ engineVersion?: string;
14
+ activeAgentLabel?: string;
15
+ agent: CodingAssistantAgentBackend;
16
+ attachSecret?: (id: string, scope: SecretAttachmentScope) => void | Promise<void>;
17
+ cwd: string;
18
+ ctx: Context;
19
+ initialBackgroundProcesses?: readonly BashSessionActivity[];
20
+ initialUsage?: Usage;
21
+ initialMcpServers?: readonly McpServerSummary[];
22
+ /** Already persisted public API messages, oldest first. */
23
+ initialMessages?: readonly Message[];
24
+ initialNotices?: readonly {
25
+ text: string;
26
+ title: string;
27
+ }[];
28
+ initialSessionEvents?: readonly SessionEvent[];
29
+ initialSubagents?: readonly SubagentSummary[];
30
+ initialProjectSecretIds?: readonly string[];
31
+ initialSessionSecretIds?: readonly string[];
32
+ initialTasks?: readonly SessionTask[];
33
+ initialUsageEventId?: EventId;
34
+ initialWorkflowEventId?: EventId;
35
+ initialWorkflows?: readonly WorkflowRun[];
36
+ workflowsEnabled?: boolean;
37
+ initialUserInputs?: readonly UserInputRequest[];
38
+ listSecrets?: () => readonly SecretSummary[] | Promise<readonly SecretSummary[]>;
39
+ /** Where the user is, and how to switch it. Absent when the daemon does not report presence. */
40
+ presence?: {
41
+ get?: () => Promise<PresenceSnapshot>;
42
+ initial?: PresenceSnapshot;
43
+ set: (presenceId: string) => Promise<PresenceSnapshot>;
44
+ };
45
+ processManager: NativeProcessManager;
46
+ sessionBacked?: boolean;
47
+ tui: TUI;
48
+ idFactory?: () => string;
49
+ onDefaultModelChange?: (preference: DefaultModelPreference) => void | Promise<void>;
50
+ onTerminalFocusChange?: (focused: boolean) => void;
51
+ onUserActivity?: () => void;
52
+ onSettingsChange?: (settings: AppSettings) => void | Promise<void>;
53
+ onStopWorkflow?: (runId: string) => void | Promise<void>;
54
+ watchSubagentEvents?: (sessionId: string, signal: AbortSignal, onEvent: (event: SessionEvent) => void) => Promise<void>;
55
+ onExit?: () => void | Promise<void>;
56
+ respondUserInput?: (requestId: string, response: UserInputResponse) => void | Promise<void>;
57
+ now?: () => number;
58
+ readClipboardImage?: (options?: ReadClipboardImageOptions) => Promise<ClipboardImage | undefined>;
59
+ searchFiles?: (query: string) => Promise<readonly FileSearchResult[]>;
60
+ compactCompletedTurns?: boolean;
61
+ completionChime?: boolean;
62
+ registerSecret?: (registration: EnvironmentSecretRegistration) => SecretSummary | Promise<SecretSummary>;
63
+ unregisterSecret?: (id: string) => boolean | Promise<boolean>;
64
+ updateSecret?: (id: string, update: EnvironmentSecretUpdate) => SecretSummary | Promise<SecretSummary>;
65
+ detachSecret?: (id: string, scope: SecretAttachmentScope) => void | Promise<void>;
66
+ debugInfo?: AppDebugInfo;
67
+ showReasoning?: boolean;
68
+ showUsage?: boolean;
69
+ startupStatus?: StartupStatusCardModel;
70
+ version?: string;
71
+ theme?: TerminalTheme;
72
+ }
73
+ export interface AppDebugInfo {
74
+ daemonLogPath: string;
75
+ serverInspectorUrl?: string;
76
+ sessionId: string;
77
+ startInspectors: () => Promise<AppDebugInspectorUrls>;
78
+ stateDirectory: string;
79
+ tuiInspectorUrl?: string;
80
+ tuiStderrIsTTY: boolean;
81
+ }
82
+ interface AppDebugInspectorUrls {
83
+ serverInspectorUrl: string;
84
+ tuiInspectorUrl: string;
85
+ }
86
+ export interface DefaultModelPreference {
87
+ effort: string;
88
+ modelId: string;
89
+ providerId: string;
90
+ serviceTier: ServiceTier | null;
91
+ }
92
+ export interface AppSettings {
93
+ compactCompletedTurns: boolean;
94
+ completionChime: boolean;
95
+ showReasoning: boolean;
96
+ showUsage: boolean;
97
+ }
98
+ export declare class CodingAssistantApp implements Component, Focusable {
99
+ #private;
100
+ constructor(options: CodingAssistantAppOptions);
101
+ get focused(): boolean;
102
+ /** Adds a public API message delivered outside this app's active send call. */
103
+ applyMessage(message: Message): void;
104
+ /** Reconciles the TUI from an authoritative API snapshot after an event-stream gap. */
105
+ applyAgentSnapshot(snapshot: AgentSnapshot): void;
106
+ /** Applies a public API streaming or reset event delivered outside the active send call. */
107
+ applyAgentLoopEvent(event: AgentLoopEvent): void;
108
+ /** Opens a question received from the public agent event stream. */
109
+ applyUserInputRequest(request: UserInputRequest): void;
110
+ /** Clears a question after another client answered or canceled it. */
111
+ resolveUserInputRequest(requestId: string): void;
112
+ set focused(value: boolean);
113
+ start(options?: {
114
+ tuiAlreadyStarted?: boolean;
115
+ }): void;
116
+ stop(reason?: AppExitReason): Promise<void>;
117
+ waitForExit(): Promise<AppExitReason>;
118
+ applySessionEvent(event: SessionEvent): void;
119
+ waitForIdle(): Promise<void>;
120
+ handleInput(data: string): void;
121
+ invalidate(): void;
122
+ setTheme(theme: TerminalTheme): void;
123
+ /** Replace the footer's folded counters from the attributed subtree source of truth. */
124
+ applyUsageSummary(summary: GetSessionUsageResponse): void;
125
+ render(width: number): string[];
126
+ headerRenderCacheSizeForTesting(): number;
127
+ }
128
+ export {};
@@ -0,0 +1,11 @@
1
+ export interface CompletedTurnStats {
2
+ additions: number;
3
+ deletions: number;
4
+ elapsedMs: number;
5
+ fileCount: number;
6
+ toolCount: number;
7
+ }
8
+ export interface CompletedTurn {
9
+ hiddenEntryIds: readonly string[];
10
+ stats: CompletedTurnStats;
11
+ }
@@ -0,0 +1,30 @@
1
+ import { type AutocompleteItem } from "@earendil-works/pi-tui";
2
+ import type { FileSearchResult } from "../protocol/index.js";
3
+ import { type FileMentionContext } from "./findFileMentionContext.js";
4
+ export type SearchFilesForMention = (query: string) => Promise<readonly FileSearchResult[]>;
5
+ export interface FileMentionAutocompleteSnapshot {
6
+ context: FileMentionContext;
7
+ items: readonly AutocompleteItem[];
8
+ selectedIndex: number;
9
+ }
10
+ export declare class FileMentionAutocomplete {
11
+ #private;
12
+ constructor(searchFiles: SearchFilesForMention, onChange: () => void);
13
+ clear(): void;
14
+ dismiss(lines: readonly string[], cursor: {
15
+ line: number;
16
+ col: number;
17
+ }): void;
18
+ handleInput(data: string, lines: readonly string[], cursor: {
19
+ line: number;
20
+ col: number;
21
+ }, onComplete: (path: string, context: FileMentionContext) => void): boolean;
22
+ snapshot(lines: readonly string[], cursor: {
23
+ line: number;
24
+ col: number;
25
+ }): FileMentionAutocompleteSnapshot | undefined;
26
+ sync(lines: readonly string[], cursor: {
27
+ line: number;
28
+ col: number;
29
+ }): void;
30
+ }
@@ -0,0 +1,7 @@
1
+ import { ProcessTerminal } from "@earendil-works/pi-tui";
2
+ export declare class HappyTerminalProcessTerminal extends ProcessTerminal {
3
+ #private;
4
+ start(onInput: (data: string) => void, onResize: () => void): void;
5
+ write(data: string): void;
6
+ stop(): void;
7
+ }
@@ -0,0 +1,4 @@
1
+ export interface NoticeChild {
2
+ readonly label: string;
3
+ readonly reason: string;
4
+ }
@@ -0,0 +1,31 @@
1
+ import type { Component } from "@earendil-works/pi-tui";
2
+ import type { SecretSummary } from "../protocol/index.js";
3
+ import type { EnvironmentSecretRegistration, EnvironmentSecretUpdate, SecretAttachmentScope } from "../protocol/index.js";
4
+ import type { AppTranscriptEntry } from "./AppTranscriptEntry.js";
5
+ import type { TerminalTheme } from "./TerminalTheme.js";
6
+ type TranscriptEntryInput = Omit<AppTranscriptEntry, "id"> & {
7
+ id?: string;
8
+ };
9
+ export interface SecretMenuControllerOptions {
10
+ appendEntry: (entry: TranscriptEntryInput) => void;
11
+ attachSecret: ((id: string, scope: SecretAttachmentScope) => void | Promise<void>) | undefined;
12
+ closePanel: () => void;
13
+ detachSecret: ((id: string, scope: SecretAttachmentScope) => void | Promise<void>) | undefined;
14
+ initialProjectSecretIds: readonly string[] | undefined;
15
+ initialSessionSecretIds: readonly string[] | undefined;
16
+ listSecrets: (() => readonly SecretSummary[] | Promise<readonly SecretSummary[]>) | undefined;
17
+ registerSecret: ((registration: EnvironmentSecretRegistration) => SecretSummary | Promise<SecretSummary>) | undefined;
18
+ requestRender: () => void;
19
+ showPanel: (component: Component) => void;
20
+ theme: TerminalTheme;
21
+ unregisterSecret: ((id: string) => boolean | Promise<boolean>) | undefined;
22
+ updateSecret: ((id: string, update: EnvironmentSecretUpdate) => SecretSummary | Promise<SecretSummary>) | undefined;
23
+ }
24
+ export declare class SecretMenuController {
25
+ #private;
26
+ constructor(options: SecretMenuControllerOptions);
27
+ hide(): void;
28
+ open(): void;
29
+ updateAttachments(projectSecretIds: readonly string[], sessionSecretIds: readonly string[]): void;
30
+ }
31
+ export {};
@@ -0,0 +1,24 @@
1
+ import { type Component, type SelectItem } from "@earendil-works/pi-tui";
2
+ export interface SelectionListTheme {
3
+ description: (text: string) => string;
4
+ scrollInfo: (text: string) => string;
5
+ selectedText: (text: string) => string;
6
+ }
7
+ /**
8
+ * Wraps pi-tui's `SelectList` so an option keeps the words that make it
9
+ * distinguishable. Selection state, keybindings, and navigation stay with
10
+ * pi-tui; only the row layout is replaced, because pi-tui renders one
11
+ * truncated line per option and a long question option needs several.
12
+ */
13
+ export declare class SelectionList implements Component {
14
+ #private;
15
+ constructor(items: readonly SelectItem[], maxVisibleLines: number, theme: SelectionListTheme);
16
+ set onCancel(handler: () => void);
17
+ set onSelect(handler: (item: SelectItem) => void);
18
+ getSelectedItem(): SelectItem | undefined;
19
+ handleInput(data: string): void;
20
+ invalidate(): void;
21
+ setMaxVisibleLines(maxVisibleLines: number): void;
22
+ setSelectedIndex(index: number): void;
23
+ render(width: number): string[];
24
+ }
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Mirrors the composer draft between this terminal and every other client
3
+ * attached to the same session.
4
+ *
5
+ * Keystrokes are coalesced so typing produces one write per pause rather than
6
+ * one per character, and the writer's own echo is recognised by origin so an
7
+ * update never bounces back into the editor the user is typing in.
8
+ *
9
+ * Each edit is stamped when the user types it, and the newest message wins.
10
+ * Ordering by typing time rather than by arrival means a draft that was already
11
+ * on its way cannot overwrite a message someone typed after it.
12
+ */
13
+ export interface SessionDraftSyncOptions {
14
+ /** Identifies this client in the drafts it writes. */
15
+ origin: string;
16
+ /** Sends the draft to the daemon. Rejections are reported, never thrown. */
17
+ push: (draft: string, updatedAt: number) => Promise<void>;
18
+ /** Milliseconds of quiet typing before a draft is written. */
19
+ debounceMs?: number;
20
+ now?: () => number;
21
+ onError?: (error: unknown) => void;
22
+ setTimer?: (callback: () => void, delayMs: number) => NodeJS.Timeout;
23
+ clearTimer?: (timer: NodeJS.Timeout) => void;
24
+ }
25
+ export declare class SessionDraftSync {
26
+ #private;
27
+ constructor(options: SessionDraftSyncOptions & {
28
+ draft?: string;
29
+ draftUpdatedAt?: number;
30
+ });
31
+ /** The draft this client believes the daemon currently holds. */
32
+ get remote(): string;
33
+ /** Records the composer's current text and schedules a write if it changed. */
34
+ recordLocalText(text: string): void;
35
+ /**
36
+ * Applies a draft another client wrote. Returns the text the composer should
37
+ * show, or `undefined` when this client's own text should stand: either the
38
+ * update is our echo, or the user typed here more recently.
39
+ *
40
+ * A remote draft that is newer than an unsent local edit also discards that
41
+ * edit, so the losing text is not written back moments later.
42
+ */
43
+ applyRemoteDraft(draft: string, origin?: string, updatedAt?: number): string | undefined;
44
+ /** Writes any pending draft immediately and waits for it to land. */
45
+ flush(): Promise<void>;
46
+ /**
47
+ * Stops syncing. Later composer changes, including the teardown that clears
48
+ * the editor, no longer touch the stored draft.
49
+ */
50
+ dispose(): void;
51
+ }
@@ -0,0 +1,34 @@
1
+ import { type Component, type Focusable, type TUI } from "@earendil-works/pi-tui";
2
+ import type { AgentCatalogEntry } from "../client/index.js";
3
+ import type { TerminalTheme } from "./TerminalTheme.js";
4
+ export interface StartupStatusAppOptions {
5
+ cwd: string;
6
+ now?: () => number;
7
+ rows?: () => number;
8
+ tui: TUI;
9
+ version: string;
10
+ theme?: TerminalTheme;
11
+ }
12
+ export declare class StartupStatusApp implements Component, Focusable {
13
+ #private;
14
+ focused: boolean;
15
+ constructor(options: StartupStatusAppOptions);
16
+ invalidate(): void;
17
+ render(width: number): string[];
18
+ /**
19
+ * Lets the user pick a saved agent on the same startup screen the daemon status uses, so
20
+ * `happy resume` never drops out of the TUI into a numbered prompt. Resolves undefined when the
21
+ * user dismisses the picker.
22
+ */
23
+ selectSession(options: {
24
+ agents: readonly AgentCatalogEntry[];
25
+ confirmVerb: string;
26
+ showDirectory: boolean;
27
+ subtitle: string;
28
+ title: string;
29
+ }): Promise<string | undefined>;
30
+ handleInput(data: string): void;
31
+ setStatus(status: string): void;
32
+ start(): void;
33
+ stop(): void;
34
+ }
@@ -0,0 +1,22 @@
1
+ export interface StartupStatusCardUsageWindow {
2
+ capturedAt?: number;
3
+ percentLeft: number;
4
+ resetsIn?: string;
5
+ }
6
+ export interface StartupStatusCardUsage {
7
+ fiveHour?: StartupStatusCardUsageWindow;
8
+ weekly?: StartupStatusCardUsageWindow;
9
+ }
10
+ export interface StartupStatusCardModel {
11
+ access: string;
12
+ engineVersion?: string;
13
+ environment: string;
14
+ fast: boolean;
15
+ model: string;
16
+ provider: string;
17
+ reasoning: string;
18
+ session: "New session" | "Resumed";
19
+ usage?: StartupStatusCardUsage;
20
+ version: string;
21
+ workspace: string;
22
+ }
@@ -0,0 +1,9 @@
1
+ import { type TUI } from "@earendil-works/pi-tui";
2
+ export declare class TemporaryFullscreenController {
3
+ #private;
4
+ constructor(tui: TUI);
5
+ open(restoreWithFullRedraw?: boolean): void;
6
+ render(lines: readonly string[], width: number, height: number): void;
7
+ close(): void;
8
+ dispose(): void;
9
+ }
@@ -0,0 +1 @@
1
+ export type TerminalColorLevel = "ansi256" | "truecolor";
@@ -0,0 +1,12 @@
1
+ interface TerminalDimensions {
2
+ columns: number;
3
+ rows: number;
4
+ }
5
+ export declare class TerminalOutputTrace {
6
+ #private;
7
+ constructor(path?: string | undefined);
8
+ recordInput(data: string, dimensions: TerminalDimensions): void;
9
+ recordOutput(data: string, dimensions: TerminalDimensions): void;
10
+ recordResize(stage: "signal" | "settled", dimensions: TerminalDimensions): void;
11
+ }
12
+ export {};
@@ -0,0 +1,11 @@
1
+ export interface TerminalTheme {
2
+ accent: string;
3
+ brand: string;
4
+ error: string;
5
+ inputBackground: string;
6
+ isLight?: boolean;
7
+ primary: string;
8
+ secondary: string;
9
+ success: string;
10
+ warning: string;
11
+ }
@@ -0,0 +1,10 @@
1
+ import type { AppTranscriptEntry } from "./AppTranscriptEntry.js";
2
+ export declare class TranscriptEntryRenderCache {
3
+ #private;
4
+ render(entry: AppTranscriptEntry, options: {
5
+ dynamicState: string;
6
+ theme: object;
7
+ width: number;
8
+ }, renderEntry: () => readonly string[]): readonly string[];
9
+ clear(): void;
10
+ }
@@ -0,0 +1,2 @@
1
+ import type { WorkflowRun, WorkflowRunUpdate } from "../protocol/index.js";
2
+ export declare function applyWorkflowRunUpdate(workflows: readonly WorkflowRun[], update: WorkflowRunUpdate): readonly WorkflowRun[];
@@ -0,0 +1,2 @@
1
+ import type { RgbColor } from "@earendil-works/pi-tui";
2
+ export declare function blendComposerBackground(background: RgbColor): RgbColor;
@@ -0,0 +1 @@
1
+ export declare function boundedJsonStringify(value: unknown, maximumBytes: number): string;
@@ -0,0 +1,2 @@
1
+ import type { Usage } from "../protocol/index.js";
2
+ export declare function calculateCacheHitPercent(usage: Pick<Usage, "cacheRead" | "input">): number;
@@ -0,0 +1,17 @@
1
+ export declare const CODEX_DIFF_ANSI: {
2
+ readonly reset: "\u001B[0m";
3
+ readonly foregroundReset: "\u001B[39m";
4
+ readonly bold: "\u001B[1m";
5
+ readonly notBoldOrDim: "\u001B[22m";
6
+ readonly dim: "\u001B[2m";
7
+ readonly green: "\u001B[32m";
8
+ readonly red: "\u001B[31m";
9
+ readonly primary: "\u001B[38;2;205;214;244m";
10
+ readonly keyword: "\u001B[38;2;203;166;247m";
11
+ readonly function: "\u001B[38;2;137;180;250m";
12
+ readonly punctuation: "\u001B[38;2;147;153;178m";
13
+ readonly argument: "\u001B[38;2;235;160;172m";
14
+ readonly string: "\u001B[38;2;166;227;161m";
15
+ readonly comment: "\u001B[38;2;108;112;134m";
16
+ };
17
+ export declare function codexDiffBackground(index: number): string;
@@ -0,0 +1,2 @@
1
+ import type { AppTranscriptEntry } from "./AppTranscriptEntry.js";
2
+ export declare function compactCompletedTurnEntries(entries: readonly AppTranscriptEntry[]): AppTranscriptEntry[];
@@ -0,0 +1 @@
1
+ export declare function containsMarkdownTable(text: string): boolean;
@@ -0,0 +1,3 @@
1
+ import type { MarkdownTheme } from "@earendil-works/pi-tui";
2
+ import type { TerminalTheme } from "./TerminalTheme.js";
3
+ export declare function createAgentMarkdownTheme(theme: TerminalTheme): MarkdownTheme;
@@ -0,0 +1,16 @@
1
+ import { type Component } from "@earendil-works/pi-tui";
2
+ import type { BashSessionSnapshot } from "../protocol/index.js";
3
+ import type { TerminalTheme } from "./TerminalTheme.js";
4
+ export interface BackgroundTerminalViewer extends Component {
5
+ setError(message: string | undefined): void;
6
+ update(snapshot: BashSessionSnapshot): void;
7
+ }
8
+ export declare function createBackgroundTerminalViewer(options: {
9
+ command: string;
10
+ cwd: string;
11
+ height: () => number;
12
+ onCancel: () => void;
13
+ onRequestRender: () => void;
14
+ onStop: () => Promise<BashSessionSnapshot | undefined>;
15
+ theme?: TerminalTheme;
16
+ }): BackgroundTerminalViewer;
@@ -0,0 +1,6 @@
1
+ import type { AppTranscriptEntry } from "./AppTranscriptEntry.js";
2
+ import type { CompletedTurn } from "./CompletedTurn.js";
3
+ export declare function createCompletedTurn(entries: readonly AppTranscriptEntry[], elapsedMs: number): {
4
+ entry: AppTranscriptEntry;
5
+ turn: CompletedTurn;
6
+ } | undefined;
@@ -0,0 +1,3 @@
1
+ import type { EditorTheme } from "@earendil-works/pi-tui";
2
+ import type { TerminalTheme } from "./TerminalTheme.js";
3
+ export declare function createEditorTheme(theme: TerminalTheme): EditorTheme;
@@ -0,0 +1,3 @@
1
+ import type { AutocompleteItem } from "@earendil-works/pi-tui";
2
+ import type { FileSearchResult } from "../protocol/index.js";
3
+ export declare function createFileMentionAutocompleteItems(files: readonly FileSearchResult[]): AutocompleteItem[];
@@ -0,0 +1,12 @@
1
+ import { type Component } from "@earendil-works/pi-tui";
2
+ import type { TerminalTheme } from "./TerminalTheme.js";
3
+ export interface CreateSecretInputPanelOptions {
4
+ label: string;
5
+ masked?: boolean;
6
+ onCancel: () => void;
7
+ onSubmit: (value: string) => void;
8
+ subtitle: string;
9
+ theme?: TerminalTheme;
10
+ title: string;
11
+ }
12
+ export declare function createSecretInputPanel(options: CreateSecretInputPanelOptions): Component;
@@ -0,0 +1,14 @@
1
+ import { type Component, type SelectItem } from "@earendil-works/pi-tui";
2
+ import type { TerminalTheme } from "./TerminalTheme.js";
3
+ export interface CreateSelectionPanelOptions {
4
+ cancelDisabled?: boolean;
5
+ title: string;
6
+ subtitle: string;
7
+ items: readonly SelectItem[];
8
+ selectedValue?: string;
9
+ onSelect: (item: SelectItem) => void;
10
+ onCancel: () => void;
11
+ theme?: TerminalTheme;
12
+ }
13
+ export declare function createSelectionPanel(options: CreateSelectionPanelOptions): Component;
14
+ export declare function fitSelectionPanelToViewport(component: Component, width: number, height: number): void;
@@ -0,0 +1 @@
1
+ export declare function createSerialTaskQueue(): <T>(task: () => Promise<T>) => Promise<T>;
@@ -0,0 +1,17 @@
1
+ import { type Component } from "@earendil-works/pi-tui";
2
+ import type { AgentCatalogEntry } from "../client/index.js";
3
+ import type { TerminalTheme } from "./TerminalTheme.js";
4
+ export interface CreateSessionPickerOptions {
5
+ /** What Enter does to the highlighted session, such as "resume" or "fork". */
6
+ confirmVerb: string;
7
+ now?: () => number;
8
+ onCancel: () => void;
9
+ onSelect: (entry: AgentCatalogEntry) => void;
10
+ agents: readonly AgentCatalogEntry[];
11
+ showDirectory: boolean;
12
+ subtitle: string;
13
+ theme?: TerminalTheme;
14
+ title: string;
15
+ }
16
+ export declare function createSessionPicker(options: CreateSessionPickerOptions): Component;
17
+ export declare function fitSessionPickerToViewport(component: Component, width: number, height: number): void;
@@ -0,0 +1,7 @@
1
+ import type { AutocompleteItem } from "@earendil-works/pi-tui";
2
+ export interface SlashCommandItem extends AutocompleteItem {
3
+ aliases: readonly string[];
4
+ }
5
+ export declare function createSlashCommands(options?: {
6
+ workflowsEnabled?: boolean;
7
+ }): SlashCommandItem[];
@@ -0,0 +1 @@
1
+ export declare function createStopOnceHandler(stop: () => Promise<void> | void, onError: (error: unknown) => void): () => Promise<void>;
@@ -0,0 +1,17 @@
1
+ import { type Component } from "@earendil-works/pi-tui";
2
+ import type { SessionEvent, SubagentSummary } from "../protocol/index.js";
3
+ import type { TerminalTheme } from "./TerminalTheme.js";
4
+ export interface SubagentMonitor extends Component {
5
+ dispose(): void;
6
+ }
7
+ export interface CreateSubagentMonitorOptions {
8
+ getHeight(): number;
9
+ getSubagents(): readonly SubagentSummary[];
10
+ modelName(modelId: string): string;
11
+ now?: () => number;
12
+ onCancel(): void;
13
+ onRequestRender?(): void;
14
+ theme?: TerminalTheme;
15
+ watchSubagent(sessionId: string, signal: AbortSignal, onEvent: (event: SessionEvent) => void): Promise<void>;
16
+ }
17
+ export declare function createSubagentMonitor(options: CreateSubagentMonitorOptions): SubagentMonitor;