@aria-cli/cli 1.0.14

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 (283) hide show
  1. package/bin/aria-dev.js +15 -0
  2. package/bin/aria.js +366 -0
  3. package/bin/install-owner-lease.d.ts +8 -0
  4. package/bin/install-owner-lease.js +53 -0
  5. package/dist/.aria-build-stamp.json +4 -0
  6. package/dist/attached-local-control-client.d.ts +90 -0
  7. package/dist/bootstrap-local-control-client.d.ts +1 -0
  8. package/dist/capability-aware-method-proxy.d.ts +1 -0
  9. package/dist/cli-context.d.ts +31 -0
  10. package/dist/commands/arions.d.ts +14 -0
  11. package/dist/commands/auth.d.ts +27 -0
  12. package/dist/commands/daemon.d.ts +31 -0
  13. package/dist/commands/definitions.d.ts +19 -0
  14. package/dist/commands/index.d.ts +13 -0
  15. package/dist/commands/login-handler.d.ts +108 -0
  16. package/dist/commands/logout-handler.d.ts +24 -0
  17. package/dist/commands/memory-handlers.d.ts +15 -0
  18. package/dist/commands/pairing.d.ts +2 -0
  19. package/dist/commands/peer-message-handler.d.ts +7 -0
  20. package/dist/commands/runtime-cutover-reset-command.d.ts +2 -0
  21. package/dist/commands/runtime-cutover-reset.d.ts +26 -0
  22. package/dist/commands/terminal-setup.d.ts +3 -0
  23. package/dist/config/aria-config.d.ts +50 -0
  24. package/dist/config/index.d.ts +4 -0
  25. package/dist/config/loader.d.ts +17 -0
  26. package/dist/config.d.ts +53 -0
  27. package/dist/daemon-info.d.ts +17 -0
  28. package/dist/ensure-daemon.d.ts +21 -0
  29. package/dist/event-loop-watchdog.d.ts +31 -0
  30. package/dist/headless/auth-orchestrator.d.ts +19 -0
  31. package/dist/headless/auth-service.d.ts +15 -0
  32. package/dist/headless/bootstrap-fast-path.d.ts +12 -0
  33. package/dist/headless/call-command.d.ts +8 -0
  34. package/dist/headless/daemon-service.d.ts +14 -0
  35. package/dist/headless/hook-actions.d.ts +40 -0
  36. package/dist/headless/hook-service.d.ts +8 -0
  37. package/dist/headless/kernel-services.d.ts +8 -0
  38. package/dist/headless/kernel.d.ts +118 -0
  39. package/dist/headless/operations/arion.d.ts +3 -0
  40. package/dist/headless/operations/auth.d.ts +4 -0
  41. package/dist/headless/operations/client.d.ts +2 -0
  42. package/dist/headless/operations/config.d.ts +3 -0
  43. package/dist/headless/operations/daemon.d.ts +3 -0
  44. package/dist/headless/operations/hook.d.ts +3 -0
  45. package/dist/headless/operations/index.d.ts +10 -0
  46. package/dist/headless/operations/memory.d.ts +3 -0
  47. package/dist/headless/operations/message.d.ts +2 -0
  48. package/dist/headless/operations/model.d.ts +3 -0
  49. package/dist/headless/operations/peer.d.ts +2 -0
  50. package/dist/headless/operations/run.d.ts +3 -0
  51. package/dist/headless/operations/session.d.ts +74 -0
  52. package/dist/headless/operations/subscription.d.ts +2 -0
  53. package/dist/headless/operations/system.d.ts +3 -0
  54. package/dist/headless/operations/utils.d.ts +5 -0
  55. package/dist/headless/run-orchestrator.d.ts +38 -0
  56. package/dist/headless/stdio-server.d.ts +4 -0
  57. package/dist/history/SessionHistory.d.ts +200 -0
  58. package/dist/history/conversation-message.d.ts +181 -0
  59. package/dist/history/index.d.ts +8 -0
  60. package/dist/history/jsonl-replay.d.ts +38 -0
  61. package/dist/history/repair-tool-pairing.d.ts +14 -0
  62. package/dist/history/turn-accumulator.d.ts +85 -0
  63. package/dist/index.d.ts +6 -0
  64. package/dist/index.js +505 -0
  65. package/dist/ink-repl.d.ts +32 -0
  66. package/dist/local-control-bootstrap.d.ts +5 -0
  67. package/dist/local-control-client.d.ts +1 -0
  68. package/dist/local-control-error-reporting.d.ts +6 -0
  69. package/dist/local-control-http-client.d.ts +9 -0
  70. package/dist/network-security.d.ts +7 -0
  71. package/dist/networking-server.d.ts +28 -0
  72. package/dist/peer-identity.d.ts +3 -0
  73. package/dist/polling-subscription.d.ts +7 -0
  74. package/dist/relaunch.d.ts +55 -0
  75. package/dist/release-notes.d.ts +11 -0
  76. package/dist/repl-cleanup.d.ts +20 -0
  77. package/dist/selectable-client.d.ts +7 -0
  78. package/dist/selectable-peer.d.ts +12 -0
  79. package/dist/session.d.ts +103 -0
  80. package/dist/slash-commands.d.ts +34 -0
  81. package/dist/sounds.d.ts +31 -0
  82. package/dist/ui/App.d.ts +288 -0
  83. package/dist/ui/components/AnthropicMethodPicker.d.ts +9 -0
  84. package/dist/ui/components/ArionPrompt.d.ts +8 -0
  85. package/dist/ui/components/AutocompleteDropdown.d.ts +9 -0
  86. package/dist/ui/components/AutonomySelector.d.ts +12 -0
  87. package/dist/ui/components/Banner.d.ts +9 -0
  88. package/dist/ui/components/ConversationHistory.d.ts +59 -0
  89. package/dist/ui/components/CopilotDeviceLoginFlow.d.ts +15 -0
  90. package/dist/ui/components/CopilotSourcePicker.d.ts +13 -0
  91. package/dist/ui/components/Cost.d.ts +8 -0
  92. package/dist/ui/components/CustomSelect/option-map.d.ts +15 -0
  93. package/dist/ui/components/CustomSelect/select-option.d.ts +20 -0
  94. package/dist/ui/components/CustomSelect/select.d.ts +55 -0
  95. package/dist/ui/components/CustomSelect/use-select-state.d.ts +99 -0
  96. package/dist/ui/components/CustomSelect/use-select.d.ts +14 -0
  97. package/dist/ui/components/ErrorDisplay.d.ts +26 -0
  98. package/dist/ui/components/FallbackToolUseRejectedMessage.d.ts +2 -0
  99. package/dist/ui/components/FileEditToolUpdatedMessage.d.ts +9 -0
  100. package/dist/ui/components/HandoffMarker.d.ts +17 -0
  101. package/dist/ui/components/HighlightedCode.d.ts +7 -0
  102. package/dist/ui/components/InputArea.d.ts +17 -0
  103. package/dist/ui/components/Message.d.ts +16 -0
  104. package/dist/ui/components/OAuthLoginFlow.d.ts +25 -0
  105. package/dist/ui/components/OutputTruncation.d.ts +16 -0
  106. package/dist/ui/components/PermissionPrompt.d.ts +22 -0
  107. package/dist/ui/components/PipelineTimingPanel.d.ts +13 -0
  108. package/dist/ui/components/ProviderMethodPicker.d.ts +16 -0
  109. package/dist/ui/components/ProviderPicker.d.ts +15 -0
  110. package/dist/ui/components/RenderItemView.d.ts +18 -0
  111. package/dist/ui/components/Spinner.d.ts +3 -0
  112. package/dist/ui/components/StatusBar.d.ts +78 -0
  113. package/dist/ui/components/StreamingIndicator.d.ts +11 -0
  114. package/dist/ui/components/StructuredDiff.d.ts +20 -0
  115. package/dist/ui/components/TextInputOverlay.d.ts +9 -0
  116. package/dist/ui/components/ThinkingBlock.d.ts +53 -0
  117. package/dist/ui/components/ToolCost.d.ts +8 -0
  118. package/dist/ui/components/ToolExecution.d.ts +13 -0
  119. package/dist/ui/components/ToolHeader.d.ts +10 -0
  120. package/dist/ui/components/ToolRenderLayoutContext.d.ts +10 -0
  121. package/dist/ui/components/ToolResultWrapper.d.ts +6 -0
  122. package/dist/ui/components/ToolUseLoader.d.ts +10 -0
  123. package/dist/ui/components/TraceWaterfall.d.ts +56 -0
  124. package/dist/ui/components/index.d.ts +29 -0
  125. package/dist/ui/components/messages/AssistantTextMessage.d.ts +13 -0
  126. package/dist/ui/components/messages/UserImageMessage.d.ts +8 -0
  127. package/dist/ui/components/messages/UserTextMessage.d.ts +13 -0
  128. package/dist/ui/components/overlays/ArionSelector.d.ts +18 -0
  129. package/dist/ui/components/overlays/ClientSelector.d.ts +7 -0
  130. package/dist/ui/components/overlays/CommandPalette.d.ts +14 -0
  131. package/dist/ui/components/overlays/InviteShareOverlay.d.ts +7 -0
  132. package/dist/ui/components/overlays/JoinInviteOverlay.d.ts +6 -0
  133. package/dist/ui/components/overlays/MemoryBrowser.d.ts +17 -0
  134. package/dist/ui/components/overlays/MessageSelector.d.ts +20 -0
  135. package/dist/ui/components/overlays/ModelSelector.d.ts +17 -0
  136. package/dist/ui/components/overlays/PairRequestOverlay.d.ts +19 -0
  137. package/dist/ui/components/overlays/PeerSelector.d.ts +14 -0
  138. package/dist/ui/components/overlays/SessionSelector.d.ts +11 -0
  139. package/dist/ui/components/overlays/ThemeSelector.d.ts +22 -0
  140. package/dist/ui/components/overlays/index.d.ts +13 -0
  141. package/dist/ui/components/permissions/BashPermissionRequest/BashPermissionRequest.d.ts +9 -0
  142. package/dist/ui/components/permissions/FallbackPermissionRequest.d.ts +9 -0
  143. package/dist/ui/components/permissions/FileEditPermissionRequest/FileEditPermissionRequest.d.ts +9 -0
  144. package/dist/ui/components/permissions/FileEditPermissionRequest/FileEditToolDiff.d.ts +11 -0
  145. package/dist/ui/components/permissions/FileWritePermissionRequest/FileWritePermissionRequest.d.ts +9 -0
  146. package/dist/ui/components/permissions/FileWritePermissionRequest/FileWriteToolDiff.d.ts +9 -0
  147. package/dist/ui/components/permissions/FilesystemPermissionRequest/FilesystemPermissionRequest.d.ts +5 -0
  148. package/dist/ui/components/permissions/PermissionRequest.d.ts +52 -0
  149. package/dist/ui/components/permissions/PermissionRequestTitle.d.ts +13 -0
  150. package/dist/ui/components/permissions/hooks.d.ts +10 -0
  151. package/dist/ui/components/permissions/toolUseOptions.d.ts +10 -0
  152. package/dist/ui/components/permissions/utils.d.ts +6 -0
  153. package/dist/ui/components/text-input/Cursor.d.ts +58 -0
  154. package/dist/ui/components/text-input/TextInput.d.ts +98 -0
  155. package/dist/ui/components/text-input/imagePaste.d.ts +2 -0
  156. package/dist/ui/components/text-input/index.d.ts +6 -0
  157. package/dist/ui/components/text-input/useDoublePress.d.ts +2 -0
  158. package/dist/ui/components/text-input/useTextInput.d.ts +34 -0
  159. package/dist/ui/components/tool-types.d.ts +28 -0
  160. package/dist/ui/constants/figures.d.ts +1 -0
  161. package/dist/ui/constants/index.d.ts +1 -0
  162. package/dist/ui/display-mode.d.ts +62 -0
  163. package/dist/ui/display-policy.d.ts +3 -0
  164. package/dist/ui/hooks/index.d.ts +4 -0
  165. package/dist/ui/hooks/useCommandAutocomplete.d.ts +28 -0
  166. package/dist/ui/hooks/useDoublePress.d.ts +13 -0
  167. package/dist/ui/hooks/useIndicatorState.d.ts +3 -0
  168. package/dist/ui/hooks/useInterval.d.ts +6 -0
  169. package/dist/ui/hooks/useKeyboardShortcuts.d.ts +17 -0
  170. package/dist/ui/hooks/usePeerMessages.d.ts +26 -0
  171. package/dist/ui/hooks/useTerminalSize.d.ts +6 -0
  172. package/dist/ui/hooks/useUnifiedMessages.d.ts +83 -0
  173. package/dist/ui/indicator-state.d.ts +46 -0
  174. package/dist/ui/markdown/highlight.d.ts +8 -0
  175. package/dist/ui/markdown/index.d.ts +16 -0
  176. package/dist/ui/markdown/tokenizer.d.ts +17 -0
  177. package/dist/ui/render-item.d.ts +70 -0
  178. package/dist/ui/screens/REPL.d.ts +288 -0
  179. package/dist/ui/status-line.d.ts +32 -0
  180. package/dist/ui/theme/index.d.ts +8 -0
  181. package/dist/ui/theme/themes/claude-dark-daltonized.d.ts +2 -0
  182. package/dist/ui/theme/themes/claude-dark.d.ts +2 -0
  183. package/dist/ui/theme/themes/claude-light-daltonized.d.ts +2 -0
  184. package/dist/ui/theme/themes/claude-light.d.ts +2 -0
  185. package/dist/ui/theme/themes/dark-accessible.d.ts +2 -0
  186. package/dist/ui/theme/themes/dark.d.ts +2 -0
  187. package/dist/ui/theme/themes/light-accessible.d.ts +2 -0
  188. package/dist/ui/theme/themes/light.d.ts +2 -0
  189. package/dist/ui/theme/types.d.ts +51 -0
  190. package/dist/ui/theme.d.ts +51 -0
  191. package/dist/ui/to-render-items.d.ts +7 -0
  192. package/dist/ui/tools/AgentTool/index.d.ts +8 -0
  193. package/dist/ui/tools/ArchitectTool/index.d.ts +10 -0
  194. package/dist/ui/tools/AskUserTool/index.d.ts +19 -0
  195. package/dist/ui/tools/BashTool/BashToolResultMessage.d.ts +13 -0
  196. package/dist/ui/tools/BashTool/OutputLine.d.ts +6 -0
  197. package/dist/ui/tools/BashTool/index.d.ts +8 -0
  198. package/dist/ui/tools/BrowseTool/index.d.ts +20 -0
  199. package/dist/ui/tools/BrowserTool/index.d.ts +25 -0
  200. package/dist/ui/tools/CbmTool/index.d.ts +81 -0
  201. package/dist/ui/tools/CheckDelegationTool/index.d.ts +23 -0
  202. package/dist/ui/tools/CheckMessagesTool/index.d.ts +8 -0
  203. package/dist/ui/tools/CreateQuipTool/index.d.ts +10 -0
  204. package/dist/ui/tools/CreateSkillTool/index.d.ts +13 -0
  205. package/dist/ui/tools/CreateToolTool/index.d.ts +10 -0
  206. package/dist/ui/tools/DelegateRemoteTool/index.d.ts +22 -0
  207. package/dist/ui/tools/DeployTool/index.d.ts +24 -0
  208. package/dist/ui/tools/FffTool/index.d.ts +17 -0
  209. package/dist/ui/tools/FileEditTool/index.d.ts +10 -0
  210. package/dist/ui/tools/FileReadTool/index.d.ts +10 -0
  211. package/dist/ui/tools/FileWriteTool/index.d.ts +10 -0
  212. package/dist/ui/tools/FrgTool/index.d.ts +17 -0
  213. package/dist/ui/tools/GetThreadTool/index.d.ts +10 -0
  214. package/dist/ui/tools/GlobTool/index.d.ts +11 -0
  215. package/dist/ui/tools/GrepTool/index.d.ts +12 -0
  216. package/dist/ui/tools/HatchArionTool/index.d.ts +20 -0
  217. package/dist/ui/tools/LearnSkillTool/index.d.ts +13 -0
  218. package/dist/ui/tools/LearnTool/index.d.ts +15 -0
  219. package/dist/ui/tools/LearnToolTool/index.d.ts +14 -0
  220. package/dist/ui/tools/ListClientsTool/index.d.ts +10 -0
  221. package/dist/ui/tools/LspTool/index.d.ts +11 -0
  222. package/dist/ui/tools/MCPTool/index.d.ts +11 -0
  223. package/dist/ui/tools/ManageNetworkTool/index.d.ts +28 -0
  224. package/dist/ui/tools/MemoryReadTool/index.d.ts +8 -0
  225. package/dist/ui/tools/MemoryWriteTool/index.d.ts +6 -0
  226. package/dist/ui/tools/NotebookEditTool/index.d.ts +19 -0
  227. package/dist/ui/tools/NotebookReadTool/index.d.ts +12 -0
  228. package/dist/ui/tools/OutlookReadTool/index.d.ts +10 -0
  229. package/dist/ui/tools/OutlookReplyTool/index.d.ts +10 -0
  230. package/dist/ui/tools/OutlookSendTool/index.d.ts +10 -0
  231. package/dist/ui/tools/PauseDelegationTool/index.d.ts +20 -0
  232. package/dist/ui/tools/ProbeTool/index.d.ts +26 -0
  233. package/dist/ui/tools/ProcessTool/index.d.ts +29 -0
  234. package/dist/ui/tools/QuestListTool/index.d.ts +24 -0
  235. package/dist/ui/tools/QuestReportTool/index.d.ts +27 -0
  236. package/dist/ui/tools/QuestUpdateTool/index.d.ts +24 -0
  237. package/dist/ui/tools/QuipCommentTool/index.d.ts +23 -0
  238. package/dist/ui/tools/QuipReadTool/index.d.ts +26 -0
  239. package/dist/ui/tools/RestArionTool/index.d.ts +19 -0
  240. package/dist/ui/tools/RestartTool/index.d.ts +20 -0
  241. package/dist/ui/tools/ResumeDelegationTool/index.d.ts +21 -0
  242. package/dist/ui/tools/RetireArionTool/index.d.ts +19 -0
  243. package/dist/ui/tools/RgTool/index.d.ts +44 -0
  244. package/dist/ui/tools/SearchKnowledgeTool/index.d.ts +31 -0
  245. package/dist/ui/tools/SearchMessagesTool/index.d.ts +10 -0
  246. package/dist/ui/tools/SelfDiagnoseTool/index.d.ts +11 -0
  247. package/dist/ui/tools/SendMessageTool/index.d.ts +8 -0
  248. package/dist/ui/tools/SerenaTool/index.d.ts +18 -0
  249. package/dist/ui/tools/SessionHistoryTool/index.d.ts +32 -0
  250. package/dist/ui/tools/SgTool/index.d.ts +8 -0
  251. package/dist/ui/tools/SlackReactTool/index.d.ts +10 -0
  252. package/dist/ui/tools/SlackReadTool/index.d.ts +10 -0
  253. package/dist/ui/tools/SlackSendTool/index.d.ts +10 -0
  254. package/dist/ui/tools/SpawnWorkerTool/index.d.ts +18 -0
  255. package/dist/ui/tools/StickerRequestTool/index.d.ts +6 -0
  256. package/dist/ui/tools/ThinkTool/index.d.ts +8 -0
  257. package/dist/ui/tools/UgTool/index.d.ts +47 -0
  258. package/dist/ui/tools/UseSkillTool/index.d.ts +17 -0
  259. package/dist/ui/tools/WakeArionTool/index.d.ts +19 -0
  260. package/dist/ui/tools/WebFetchTool/index.d.ts +20 -0
  261. package/dist/ui/tools/WebSearchTool/index.d.ts +21 -0
  262. package/dist/ui/tools/lsTool/index.d.ts +12 -0
  263. package/dist/ui/tools/registry.d.ts +15 -0
  264. package/dist/ui/tools/tool-renderer.d.ts +24 -0
  265. package/dist/ui/tools/truncation.d.ts +6 -0
  266. package/dist/ui/types/anthropic.d.ts +19 -0
  267. package/dist/ui/types/index.d.ts +3 -0
  268. package/dist/ui/types/message.d.ts +19 -0
  269. package/dist/ui/types/tool.d.ts +17 -0
  270. package/dist/ui/utils/array.d.ts +1 -0
  271. package/dist/ui/utils/cursor.d.ts +28 -0
  272. package/dist/ui/utils/diff.d.ts +24 -0
  273. package/dist/ui/utils/format.d.ts +3 -0
  274. package/dist/ui/utils/fuzzy.d.ts +11 -0
  275. package/dist/ui/utils/index.d.ts +9 -0
  276. package/dist/ui/utils/keys.d.ts +6 -0
  277. package/dist/ui/utils/patch.d.ts +8 -0
  278. package/dist/ui/utils/risk.d.ts +14 -0
  279. package/dist/ui/utils/terminal-image.d.ts +18 -0
  280. package/dist/ui/utils/validation.d.ts +8 -0
  281. package/dist/ui/verb-pairs.d.ts +20 -0
  282. package/dist/ui.d.ts +70 -0
  283. package/package.json +76 -0
@@ -0,0 +1,3 @@
1
+ import type { RenderItem } from "./render-item.js";
2
+ import type { DisplayMode } from "./display-mode.js";
3
+ export declare function applyDisplayPolicy(items: RenderItem[], mode: DisplayMode): RenderItem[];
@@ -0,0 +1,4 @@
1
+ export { useKeyboardShortcuts } from "./useKeyboardShortcuts.js";
2
+ export { useDoublePress } from "./useDoublePress.js";
3
+ export { useCommandAutocomplete, type CommandDefinition, type Suggestion, } from "./useCommandAutocomplete.js";
4
+ export { useTerminalSize } from "./useTerminalSize.js";
@@ -0,0 +1,28 @@
1
+ export interface CommandDefinition {
2
+ name: string;
3
+ args: string[];
4
+ description: string;
5
+ requiresArgs: boolean;
6
+ }
7
+ export interface Suggestion {
8
+ command: string;
9
+ args: string[];
10
+ description: string;
11
+ score: number;
12
+ }
13
+ interface UseCommandAutocompleteOptions {
14
+ commands: CommandDefinition[];
15
+ maxSuggestions?: number;
16
+ isActive?: boolean;
17
+ }
18
+ interface UseCommandAutocompleteResult {
19
+ suggestions: Suggestion[];
20
+ selectedIndex: number;
21
+ isOpen: boolean;
22
+ selectNext: () => void;
23
+ selectPrev: () => void;
24
+ complete: () => string | null;
25
+ close: () => void;
26
+ }
27
+ export declare function useCommandAutocomplete(input: string, { commands, maxSuggestions, isActive }: UseCommandAutocompleteOptions): UseCommandAutocompleteResult;
28
+ export {};
@@ -0,0 +1,13 @@
1
+ interface DoublePressOptions {
2
+ /** Time window for double press in ms */
3
+ timeout?: number;
4
+ /** Callback for first press */
5
+ onFirstPress?: () => void;
6
+ /** Callback for second press (within timeout) */
7
+ onDoublePress: () => void;
8
+ }
9
+ /**
10
+ * Hook to detect double key presses (e.g., Ctrl+C twice to exit)
11
+ */
12
+ export declare function useDoublePress({ timeout, onFirstPress, onDoublePress, }: DoublePressOptions): () => void;
13
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { ObservabilityContext } from "@aria-cli/aria/runner/observability-context.js";
2
+ import { type IndicatorState } from "../indicator-state.js";
3
+ export declare function useIndicatorState(obsCtx: ObservabilityContext | null, isStreaming: boolean): IndicatorState;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A custom hook that runs a callback at a specified interval.
3
+ * The interval is cleared when the component unmounts.
4
+ * The interval is also cleared and restarted if the delay changes.
5
+ */
6
+ export declare function useInterval(callback: () => void, delay: number): void;
@@ -0,0 +1,17 @@
1
+ import { Cursor } from '../utils/cursor.js';
2
+ interface KeyboardShortcutsConfig {
3
+ cursor: Cursor;
4
+ setCursor: (cursor: Cursor) => void;
5
+ history?: {
6
+ items: string[];
7
+ index: number;
8
+ setIndex: (index: number) => void;
9
+ };
10
+ onExit?: () => void;
11
+ isActive?: boolean;
12
+ }
13
+ /**
14
+ * Hook providing Emacs-style keyboard shortcuts
15
+ */
16
+ export declare function useKeyboardShortcuts({ cursor, setCursor, history, onExit, isActive, }: KeyboardShortcutsConfig): void;
17
+ export {};
@@ -0,0 +1,26 @@
1
+ /**
2
+ * React hook that subscribes to incoming peer messages from two sources:
3
+ *
4
+ * 1. Daemon watchInbox — WireGuard peer messages via streaming socket
5
+ * 2. .comms/inbox/ file watcher — agent fleet messages via filesystem
6
+ *
7
+ * Both sources merge into a single PeerMessageItem[] for the Static zone.
8
+ */
9
+ import type { PeerMessageItem } from "../render-item.js";
10
+ interface WatchInboxOptions {
11
+ runtimeSocket: string | null;
12
+ commsInboxDir?: string | null;
13
+ clientId?: string | null;
14
+ clientAuthToken?: string | null;
15
+ /**
16
+ * Callback to resolve fresh credentials when existing ones are stale.
17
+ * Called on initial connect and after each stale-lease rejection.
18
+ * Returns null if credentials cannot be refreshed (session expired).
19
+ */
20
+ resolveCredentials?: () => Promise<{
21
+ clientId: string;
22
+ clientAuthToken: string;
23
+ } | null>;
24
+ }
25
+ export declare function usePeerMessages(options: WatchInboxOptions): PeerMessageItem[];
26
+ export {};
@@ -0,0 +1,6 @@
1
+ type TerminalSize = {
2
+ columns: number;
3
+ rows: number;
4
+ };
5
+ export declare function useTerminalSize(): TerminalSize;
6
+ export {};
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Unified message state — single array + streaming cursor.
3
+ *
4
+ * Replaces the dual messages/previewMessages state machine that caused
5
+ * preview-committed race conditions (text cutoff, ghost preview, abort freeze).
6
+ *
7
+ * Invariant: `isStreaming === (streamCursor !== null)` — derived, never separate state.
8
+ *
9
+ * Generic over item type T (defaults to RenderItem for rendering, but can be
10
+ * used with ConversationMessage for state management in ink-repl).
11
+ */
12
+ import { type SetStateAction } from "react";
13
+ import type { RenderItem } from "../render-item.js";
14
+ export interface TurnState<T = RenderItem> {
15
+ /** Single flat array of ALL items (history + streaming). */
16
+ items: T[];
17
+ /**
18
+ * Index of the first streaming item. `null` = idle (all items committed).
19
+ * - items[0..streamCursor-1] → committed (Static zone / terminal scrollback)
20
+ * - items[streamCursor..] → streaming (Live zone / cursor position)
21
+ */
22
+ streamCursor: number | null;
23
+ }
24
+ /** Begin a new streaming turn. Sets cursor to end of current items. */
25
+ interface StartTurnAction {
26
+ type: "START_TURN";
27
+ }
28
+ /** Replace streaming zone with fresh snapshot (progressive render). */
29
+ interface UpdateStreamAction<T> {
30
+ type: "UPDATE_STREAM";
31
+ snapshot: T[];
32
+ }
33
+ /** Commit flushed items and advance cursor past them (turn boundary). */
34
+ interface CommitTurnAction<T> {
35
+ type: "COMMIT_TURN";
36
+ flushed: T[];
37
+ }
38
+ /** End streaming — all items become committed. */
39
+ interface EndTurnAction {
40
+ type: "END_TURN";
41
+ }
42
+ /** Append committed items (user message, error, peer message — non-streaming). */
43
+ interface AppendCommittedAction<T> {
44
+ type: "APPEND_COMMITTED";
45
+ items: T[];
46
+ }
47
+ /** Reset all state (session change, clear). */
48
+ interface ResetAction<T> {
49
+ type: "RESET";
50
+ items?: T[];
51
+ }
52
+ /** Discard streaming items and end streaming (abort/error/cancel). */
53
+ interface DiscardStreamingAction {
54
+ type: "DISCARD_STREAMING";
55
+ }
56
+ /** Apply a functional update to committed items (compat with setState updater). */
57
+ interface FunctionalUpdateAction<T> {
58
+ type: "FUNCTIONAL_UPDATE";
59
+ updater: (committed: T[]) => T[];
60
+ }
61
+ /** Atomically commit flushed items AND end streaming (single dispatch, no race). */
62
+ interface CommitAndEndAction<T> {
63
+ type: "COMMIT_AND_END";
64
+ flushed: T[];
65
+ }
66
+ export type TurnAction<T = RenderItem> = StartTurnAction | UpdateStreamAction<T> | CommitTurnAction<T> | EndTurnAction | AppendCommittedAction<T> | ResetAction<T> | DiscardStreamingAction | FunctionalUpdateAction<T> | CommitAndEndAction<T>;
67
+ export declare function turnReducer<T = RenderItem>(state: TurnState<T>, action: TurnAction<T>): TurnState<T>;
68
+ export interface UnifiedMessageState<T = RenderItem> {
69
+ /** All items (committed + streaming). */
70
+ items: T[];
71
+ /** Committed items for Ink's Static zone. */
72
+ committedItems: T[];
73
+ /** Streaming items for the Live zone. */
74
+ streamingItems: T[];
75
+ /** Whether a streaming turn is active. Derived from streamCursor. */
76
+ isStreaming: boolean;
77
+ /** Dispatch an action to update state. */
78
+ dispatch: React.Dispatch<TurnAction<T>>;
79
+ /** Drop-in replacement for useState setter — routes through the reducer. */
80
+ setItems: (action: SetStateAction<T[]>) => void;
81
+ }
82
+ export declare function useUnifiedMessages<T = RenderItem>(initialItems?: T[]): UnifiedMessageState<T>;
83
+ export {};
@@ -0,0 +1,46 @@
1
+ import type { VerbPair } from "./verb-pairs.js";
2
+ export type { VerbPair };
3
+ export type IndicatorState = {
4
+ kind: "idle";
5
+ } | {
6
+ kind: "thinking";
7
+ verb: VerbPair;
8
+ startedAt: number;
9
+ } | {
10
+ kind: "composing";
11
+ verb: VerbPair;
12
+ thoughtForSeconds?: number;
13
+ } | {
14
+ kind: "tool_running";
15
+ tools: Map<string, string>;
16
+ };
17
+ export type IndicatorEvent = {
18
+ type: "STREAM_START";
19
+ verb: VerbPair;
20
+ } | {
21
+ type: "STREAM_END";
22
+ } | {
23
+ type: "THINKING_START";
24
+ verb: VerbPair;
25
+ startedAt: number;
26
+ } | {
27
+ type: "THINKING_END";
28
+ verb: VerbPair;
29
+ durationSeconds: number;
30
+ } | {
31
+ type: "TOOL_START";
32
+ callId: string;
33
+ displayName: string;
34
+ } | {
35
+ type: "TOOL_END";
36
+ callId: string;
37
+ verb: VerbPair;
38
+ };
39
+ export declare const initialState: IndicatorState;
40
+ /**
41
+ * Pure state machine transition function.
42
+ * All randomness (verb selection, timestamps) must be computed by the caller
43
+ * and passed in the event payload. This keeps the reducer deterministic and
44
+ * safe for React StrictMode double-invocation.
45
+ */
46
+ export declare function transition(state: IndicatorState, event: IndicatorEvent): IndicatorState;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Highlight code with syntax coloring
3
+ */
4
+ export declare function highlightCode(code: string, language: string): string;
5
+ /**
6
+ * Check if a language is supported for highlighting
7
+ */
8
+ export declare function isLanguageSupported(language: string): boolean;
@@ -0,0 +1,16 @@
1
+ type MathRendererMode = "fast" | "katex";
2
+ type ColorWordMode = "auto" | "always" | "never";
3
+ type RenderMode = "final" | "streaming";
4
+ export interface RenderOptions {
5
+ width?: number;
6
+ listDepth?: number;
7
+ mathRenderer?: MathRendererMode;
8
+ colorWordMode?: ColorWordMode;
9
+ mode?: RenderMode;
10
+ }
11
+ /**
12
+ * Render markdown string to terminal-formatted string
13
+ */
14
+ export declare function applyMarkdown(markdown: string, options?: RenderOptions): string;
15
+ export { tokenize } from "./tokenizer.js";
16
+ export { highlightCode, isLanguageSupported } from "./highlight.js";
@@ -0,0 +1,17 @@
1
+ import { type Token, type Tokens } from 'marked';
2
+ export type MarkdownToken = Token;
3
+ export type { Tokens };
4
+ /**
5
+ * Tokenize markdown string into AST tokens
6
+ */
7
+ export declare function tokenize(markdown: string): MarkdownToken[];
8
+ /**
9
+ * Check if token is a specific type
10
+ */
11
+ export declare function isTokenType<T extends Token['type']>(token: Token, type: T): token is Extract<Token, {
12
+ type: T;
13
+ }>;
14
+ /**
15
+ * Get inline tokens from a token (for nested parsing)
16
+ */
17
+ export declare function getInlineTokens(token: Token): Token[];
@@ -0,0 +1,70 @@
1
+ /** Flat render model for the ARIA CLI rendering pipeline.
2
+ * Replaces the nested DisplayMessage + ContentBlock[] model.
3
+ * Each item has `committed` for Static/Live split. */
4
+ export interface UserMessageItem {
5
+ kind: "user-message";
6
+ id: string;
7
+ text: string;
8
+ userName: string;
9
+ committed: boolean;
10
+ }
11
+ export interface UserImageItem {
12
+ kind: "user-image";
13
+ id: string;
14
+ dataUri: string;
15
+ userName: string;
16
+ committed: boolean;
17
+ }
18
+ export interface AssistantTextItem {
19
+ kind: "assistant-text";
20
+ id: string;
21
+ text: string;
22
+ arion?: {
23
+ name: string;
24
+ emoji: string;
25
+ color: string;
26
+ };
27
+ committed: boolean;
28
+ }
29
+ export interface ThinkingItem {
30
+ kind: "thinking";
31
+ id: string;
32
+ content: string;
33
+ durationSec?: number;
34
+ arion?: {
35
+ name: string;
36
+ emoji: string;
37
+ color: string;
38
+ };
39
+ committed: boolean;
40
+ }
41
+ export interface ToolExecutionItem {
42
+ kind: "tool-execution";
43
+ id: string;
44
+ toolName: string;
45
+ input: unknown;
46
+ output: unknown;
47
+ status: "pending" | "running" | "complete" | "error";
48
+ error?: string;
49
+ durationMs?: number;
50
+ usage?: {
51
+ inputTokens: number;
52
+ outputTokens: number;
53
+ };
54
+ committed: boolean;
55
+ }
56
+ export interface ErrorItem {
57
+ kind: "error";
58
+ id: string;
59
+ message: string;
60
+ suggestion?: string;
61
+ committed: boolean;
62
+ }
63
+ export interface HandoffItem {
64
+ kind: "handoff";
65
+ id: string;
66
+ target: string;
67
+ direction: "incoming" | "outgoing";
68
+ committed: boolean;
69
+ }
70
+ export type RenderItem = UserMessageItem | UserImageItem | AssistantTextItem | ThinkingItem | ToolExecutionItem | ErrorItem | HandoffItem;
@@ -0,0 +1,288 @@
1
+ /**
2
+ * REPL screen — top-level orchestrator for the ARIA terminal UI.
3
+ *
4
+ * This module bridges ARIA's runner-event-driven architecture with
5
+ * rendering components. It delegates to the
6
+ * existing App component for layout and message rendering, while
7
+ * adding the forked permission UI for tool approval flows.
8
+ *
9
+ * Architecture:
10
+ * ink-repl.tsx (runner integration, session mgmt, config)
11
+ * → REPL.tsx (this file — permission UI bridge)
12
+ * → App.tsx (layout, overlays, hotkeys, message rendering)
13
+ * → toRenderItems → applyDisplayPolicy → RenderItemView → ToolExecution
14
+ * → per-tool renderers (tools/tool-renderer.ts defines the interface)
15
+ *
16
+ * Per-tool renderers (tools/registry.ts) provide display name, args, and result rendering.
17
+ * tool-renderer.ts defines the canonical ToolRenderer interface.
18
+ */
19
+ import React from "react";
20
+ import { type ArionSelectorMode } from "../App.js";
21
+ import type { ArionSession } from "../../session.js";
22
+ import type { ObservabilityContext, PipelineTimingReport } from "@aria-cli/aria";
23
+ import type { DisplayMode, DisplayConfig } from "../display-mode.js";
24
+ import type { ArionOption, BrowsableMemory, CopilotSourcePickerOption, MemoryBrowserMode, ModelOption, StatusBarMetrics, ThemeSelection, PairRequestInfo } from "../components/index.js";
25
+ import type { ProviderOption } from "../components/ProviderPicker.js";
26
+ import type { ProviderMethodOption } from "../components/ProviderMethodPicker.js";
27
+ import type { ConversationMessage, SessionSummary } from "../../history/index.js";
28
+ import type { TraceWaterfallSpan } from "../components/TraceWaterfall.js";
29
+ import type { EffortLevel } from "@aria-cli/types";
30
+ import type { SelectableClient } from "../../selectable-client.js";
31
+ import type { SelectablePeer } from "../../selectable-peer.js";
32
+ export { TOOL_RENDERERS, type ToolRenderer } from "../tools/registry.js";
33
+ type AnthropicMethodOption = ProviderMethodOption & {
34
+ description: string;
35
+ method: "subscription" | "console" | "bedrock" | "claude-cli" | "setup-token" | "api-key" | "env-key";
36
+ };
37
+ type OpenAIMethodOption = ProviderMethodOption & {
38
+ description: string;
39
+ method: "env-key" | "profile" | "codex-import" | "api-key";
40
+ };
41
+ type GoogleMethodOption = ProviderMethodOption & {
42
+ description: string;
43
+ method: "env-key" | "profile" | "gemini-import" | "api-key" | "oauth";
44
+ };
45
+ export interface REPLProps {
46
+ session: ArionSession;
47
+ model: string;
48
+ /** Max context window tokens for the current model */
49
+ maxContextTokens?: number;
50
+ banner: React.ReactNode;
51
+ messages: ConversationMessage[];
52
+ previewMessages: ConversationMessage[];
53
+ isStreaming: boolean;
54
+ queuedMessage?: string | null;
55
+ onCancelQueuedMessage?: () => void;
56
+ responseTime?: number;
57
+ commands: Array<{
58
+ name: string;
59
+ description: string;
60
+ }>;
61
+ arions: ArionOption[];
62
+ models: ModelOption[];
63
+ memories: BrowsableMemory[];
64
+ memoryBrowserMode: MemoryBrowserMode;
65
+ isLoadingMemories: boolean;
66
+ userName: string | null;
67
+ memoryCount: number;
68
+ metrics: StatusBarMetrics;
69
+ displayMode: DisplayMode;
70
+ displayConfig: DisplayConfig;
71
+ showThinking: boolean;
72
+ showCosts: boolean;
73
+ showTraces: boolean;
74
+ pipelineTiming?: PipelineTimingReport;
75
+ spans: TraceWaterfallSpan[];
76
+ activeArion?: string;
77
+ sessions: SessionSummary[];
78
+ inputHistory: string[];
79
+ obsCtx: ObservabilityContext | null;
80
+ approvalRequest: {
81
+ id: number;
82
+ toolName: string;
83
+ input: unknown;
84
+ riskLevel: "low" | "moderate" | "high";
85
+ issues?: string[];
86
+ resolve: (approved: boolean) => void;
87
+ } | null;
88
+ effortLevel?: EffortLevel;
89
+ showAutonomySelector: boolean;
90
+ autonomyLevel: "minimal" | "balanced" | "high" | "full";
91
+ onSubmit: (input: string) => void | Promise<void>;
92
+ onCommand: (cmd: string, args?: string) => Promise<void>;
93
+ onSelectArion: (name: string, mode: ArionSelectorMode) => Promise<void>;
94
+ onSelectModel: (name: string, effort: EffortLevel) => Promise<void>;
95
+ onSelectMemory: (memory: BrowsableMemory) => Promise<void>;
96
+ onOpenMemoryBrowser: (mode: MemoryBrowserMode) => Promise<void>;
97
+ onSelectSession: (sessionId: string) => Promise<void>;
98
+ onLoadSessions: () => void;
99
+ onSearchSessions: (query: string) => void;
100
+ onLoadMoreSessions: (direction: "next" | "prev") => void;
101
+ /** Bumps to force remount of App's <Static> transcript renderer */
102
+ staticRenderEpoch?: number;
103
+ openSessionOverlaySignal?: number;
104
+ openThemeOverlaySignal?: number;
105
+ inviteShare?: {
106
+ inviteToken: string;
107
+ inviteLabel?: string;
108
+ expiresAt?: string | null;
109
+ } | null;
110
+ onInviteShareClose?: () => void;
111
+ openJoinInviteOverlaySignal?: number;
112
+ onJoinInviteSubmit?: (inviteToken: string) => Promise<void> | void;
113
+ onJoinInviteCancel?: () => void;
114
+ joinInviteError?: string | null;
115
+ onSelectTheme?: (theme: ThemeSelection) => void;
116
+ onToggleThinking: () => void;
117
+ onToggleCosts: () => void;
118
+ onToggleTraces: () => void;
119
+ onCycleDisplayMode: () => void;
120
+ onSaveInput?: (input: string) => void;
121
+ onCancel: () => void;
122
+ onApprovalChoice: (approved: boolean) => void;
123
+ onAutonomySelect: (level: "minimal" | "balanced" | "high" | "full") => void;
124
+ onAutonomyCancel: () => void;
125
+ /** Callback to cycle autonomy level (Shift+Tab) */
126
+ onCycleAutonomy: () => void;
127
+ /** Callback to cycle effort level (Ctrl+E) */
128
+ onCycleEffort?: () => void;
129
+ /** Provider list for the login picker (null = hidden) */
130
+ loginPickerProviders: ProviderOption[] | null;
131
+ /** Callback when user selects a provider in the login picker */
132
+ onLoginProviderSelect: (provider: ProviderOption) => void;
133
+ /** Callback when user cancels the login picker */
134
+ onLoginPickerCancel: () => void;
135
+ /** Copilot source options picker (null = hidden) */
136
+ copilotSourceOptions: CopilotSourcePickerOption[] | null;
137
+ /** Callback when user selects a Copilot source */
138
+ onCopilotSourceSelect: (option: CopilotSourcePickerOption) => void;
139
+ /** Callback when user cancels Copilot source picker */
140
+ onCopilotSourceCancel: () => void;
141
+ /** Provider ID for the active OAuth login flow (null = hidden) */
142
+ oauthProvider: string | null;
143
+ /** Prebuilt authorize URL for kernel-driven OAuth login */
144
+ oauthAuthorizeUrl?: string | null;
145
+ /** Expected callback state for localhost OAuth callback flows */
146
+ oauthExpectedState?: string | null;
147
+ /** Callback when OAuth login flow completes (success or failure) */
148
+ onOAuthComplete: (result: {
149
+ success: boolean;
150
+ message: string;
151
+ }) => void;
152
+ /** Callback when kernel-driven OAuth login captures an authorization code */
153
+ onOAuthCodeSubmit?: (code: string) => Promise<void> | void;
154
+ /** Callback when user cancels the OAuth login flow */
155
+ onOAuthCancel: () => void;
156
+ /** Provider ID for active GitHub Copilot device flow (null = hidden) */
157
+ copilotDeviceProvider: string | null;
158
+ /** Optional profile label for active GitHub Copilot device flow */
159
+ copilotDeviceProfileLabel: string | null;
160
+ /** Verification URL for a kernel-driven GitHub Copilot device flow */
161
+ copilotDeviceVerificationUri?: string | null;
162
+ /** User code for a kernel-driven GitHub Copilot device flow */
163
+ copilotDeviceUserCode?: string | null;
164
+ /** Callback when GitHub Copilot device flow completes */
165
+ onCopilotDeviceComplete: (result: {
166
+ success: boolean;
167
+ message: string;
168
+ }) => void;
169
+ /** Callback when the user confirms a kernel-driven GitHub Copilot device flow */
170
+ onCopilotDeviceApprove?: () => Promise<void> | void;
171
+ /** Callback when user cancels GitHub Copilot device flow */
172
+ onCopilotDeviceCancel: () => void;
173
+ /** Anthropic method picker options (null = hidden) */
174
+ anthropicMethodOptions: AnthropicMethodOption[] | null;
175
+ /** Callback when user selects an Anthropic method */
176
+ onAnthropicMethodSelect: (option: AnthropicMethodOption) => void;
177
+ /** Callback when user cancels Anthropic method picker */
178
+ onAnthropicMethodCancel: () => void;
179
+ /** Show API key text input overlay */
180
+ anthropicKeyInputVisible: boolean;
181
+ /** Callback when user submits an API key */
182
+ onAnthropicKeySubmit: (apiKey: string) => void;
183
+ /** Callback when user cancels API key input */
184
+ onAnthropicKeyCancel: () => void;
185
+ /** Show setup-token text input overlay */
186
+ anthropicSetupTokenVisible: boolean;
187
+ /** Callback when user submits a setup token */
188
+ onAnthropicSetupTokenSubmit: (token: string) => void;
189
+ /** Callback when user cancels setup token input */
190
+ onAnthropicSetupTokenCancel: () => void;
191
+ /** OpenAI method picker options (null = hidden) */
192
+ openaiMethodOptions: OpenAIMethodOption[] | null;
193
+ /** Callback when user selects an OpenAI method */
194
+ onOpenAIMethodSelect: (option: OpenAIMethodOption) => void;
195
+ /** Callback when user cancels OpenAI method picker */
196
+ onOpenAIMethodCancel: () => void;
197
+ /** Show OpenAI API key text input overlay */
198
+ openaiKeyInputVisible: boolean;
199
+ /** Callback when user submits an OpenAI API key */
200
+ onOpenAIKeySubmit: (apiKey: string) => void;
201
+ /** Callback when user cancels OpenAI key input */
202
+ onOpenAIKeyCancel: () => void;
203
+ /** Google method picker options (null = hidden) */
204
+ googleMethodOptions: GoogleMethodOption[] | null;
205
+ /** Callback when user selects a Google method */
206
+ onGoogleMethodSelect: (option: GoogleMethodOption) => void;
207
+ /** Callback when user cancels Google method picker */
208
+ onGoogleMethodCancel: () => void;
209
+ /** Show Google API key text input overlay */
210
+ googleKeyInputVisible: boolean;
211
+ /** Callback when user submits a Google API key */
212
+ onGoogleKeySubmit: (apiKey: string) => void;
213
+ /** Callback when user cancels Google key input */
214
+ onGoogleKeyCancel: () => void;
215
+ /** Generic auth selection overlay options */
216
+ authInteractionOptions: ProviderMethodOption[] | null;
217
+ /** Generic auth selection overlay title */
218
+ authInteractionTitle: string | null;
219
+ /** Callback when user selects a generic auth option */
220
+ onAuthInteractionSelect: (optionId: string) => void;
221
+ /** Callback when user cancels the generic auth selection */
222
+ onAuthInteractionCancel: () => void;
223
+ /** Generic auth input overlay */
224
+ authInteractionInput: {
225
+ title: string;
226
+ hint?: string;
227
+ } | null;
228
+ /** Callback when user submits a generic auth value */
229
+ onAuthInteractionInputSubmit: (value: string) => void;
230
+ /** Callback when user cancels the generic auth input */
231
+ onAuthInteractionInputCancel: () => void;
232
+ /** Nearby peers discovered via mDNS */
233
+ nearbyPeers?: SelectablePeer[];
234
+ /** Same-home attached clients discovered from the runtime */
235
+ localClients?: SelectableClient[];
236
+ /** Callback when user selects a peer to connect to */
237
+ onSelectPeer?: (peer: SelectablePeer) => void;
238
+ /** Callback when user selects a same-home client */
239
+ onSelectClient?: (client: SelectableClient) => void;
240
+ /** Callback when user cancels peer selection */
241
+ onPeerCancel?: () => void;
242
+ /** Callback when user cancels client selection */
243
+ onClientsCancel?: () => void;
244
+ /** Incrementing signal to request opening peers overlay */
245
+ openPeersOverlaySignal?: number;
246
+ /** Incrementing signal to request opening clients overlay */
247
+ openClientsOverlaySignal?: number;
248
+ /** Incoming pair request from another peer */
249
+ incomingPairRequest?: PairRequestInfo | null;
250
+ /** Callback when user accepts a pair request */
251
+ onAcceptPairRequest?: () => void;
252
+ /** Callback when user rejects a pair request */
253
+ onRejectPairRequest?: () => void;
254
+ /** Callback to cancel in-flight pairing long-poll */
255
+ onCancelPairing?: () => void;
256
+ /** Signal to open the message-edit overlay (increment to trigger) */
257
+ openMessageEditOverlaySignal?: number;
258
+ /** All messages from the current session for the message-edit overlay */
259
+ editableMessages?: import("../components/overlays/MessageSelector.js").MessageSelectorEntry[];
260
+ /** Called when user selects a message to edit (messageIndex, messageText) */
261
+ onEditMessage?: (messageIndex: number, messageText: string) => void;
262
+ /** Prefill text to load into the input box (e.g., after edit-message selection) */
263
+ prefillInput?: string;
264
+ /** Called after the prefill has been consumed */
265
+ onPrefillConsumed?: () => void;
266
+ /** Number of unread mesh messages (0 = hidden) */
267
+ meshMessageCount?: number;
268
+ /** Path to daemon's runtime socket for real-time message subscription */
269
+ runtimeSocket?: string | null;
270
+ /** Attached client ID for subscribeDirectClientInbox */
271
+ clientId?: string | null;
272
+ /** Attached client auth token for subscribeDirectClientInbox */
273
+ clientAuthToken?: string | null;
274
+ /** Resolve fresh credentials when existing ones are stale (daemon restarted) */
275
+ resolveCredentials?: () => Promise<{
276
+ clientId: string;
277
+ clientAuthToken: string;
278
+ } | null>;
279
+ }
280
+ /**
281
+ * REPL — the top-level screen component.
282
+ *
283
+ * Wraps App with the forked permission UI. When a tool approval
284
+ * request arrives (from ink-repl's onApprovalNeeded callback), this
285
+ * component renders the PermissionRequest overlay
286
+ * instead of ARIA's basic PermissionPrompt.
287
+ */
288
+ export declare function REPL(props: REPLProps): React.ReactNode;