@aria-cli/cli 1.0.54 → 1.0.55
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.
- package/bin/aria.mjs +671 -802
- package/dist/.tsbuildinfo +1 -0
- package/dist/attached-local-control-client.js +826 -0
- package/dist/attached-local-control-client.js.map +1 -0
- package/dist/bootstrap-local-control-client.js +2 -0
- package/dist/bootstrap-local-control-client.js.map +1 -0
- package/dist/capability-aware-method-proxy.js +42 -0
- package/dist/capability-aware-method-proxy.js.map +1 -0
- package/dist/cli-context.js +160 -0
- package/dist/cli-context.js.map +1 -0
- package/dist/commands/arions.js +174 -0
- package/dist/commands/arions.js.map +1 -0
- package/dist/commands/auth.js +123 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/daemon.js +367 -0
- package/dist/commands/daemon.js.map +1 -0
- package/dist/commands/definitions.js +176 -0
- package/dist/commands/definitions.js.map +1 -0
- package/dist/commands/index.js +80 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/login-handler.js +1108 -0
- package/dist/commands/login-handler.js.map +1 -0
- package/dist/commands/logout-handler.js +92 -0
- package/dist/commands/logout-handler.js.map +1 -0
- package/dist/commands/memory-handlers.js +89 -0
- package/dist/commands/memory-handlers.js.map +1 -0
- package/dist/commands/pairing.js +60 -0
- package/dist/commands/pairing.js.map +1 -0
- package/dist/commands/runtime-cutover-reset-command.js +12 -0
- package/dist/commands/runtime-cutover-reset-command.js.map +1 -0
- package/dist/commands/runtime-cutover-reset.js +265 -0
- package/dist/commands/runtime-cutover-reset.js.map +1 -0
- package/dist/commands/terminal-setup.js +84 -0
- package/dist/commands/terminal-setup.js.map +1 -0
- package/dist/config/aria-config.js +238 -0
- package/dist/config/aria-config.js.map +1 -0
- package/dist/config/index.js +3 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/loader.js +97 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config.js +142 -0
- package/dist/config.js.map +1 -0
- package/dist/daemon-info.js +10 -0
- package/dist/daemon-info.js.map +1 -0
- package/dist/ensure-daemon.js +128 -0
- package/dist/ensure-daemon.js.map +1 -0
- package/dist/entrypoints/command-mode.js +5 -0
- package/dist/entrypoints/command-mode.js.map +1 -0
- package/dist/entrypoints/daemon.js +50 -0
- package/dist/entrypoints/daemon.js.map +1 -0
- package/dist/entrypoints/headless-stdio.js +25 -0
- package/dist/entrypoints/headless-stdio.js.map +1 -0
- package/dist/entrypoints/interactive.d.ts.map +1 -0
- package/dist/entrypoints/interactive.js +80 -0
- package/dist/entrypoints/interactive.js.map +1 -0
- package/dist/event-loop-watchdog.js +73 -0
- package/dist/event-loop-watchdog.js.map +1 -0
- package/dist/headless/auth-orchestrator.js +508 -0
- package/dist/headless/auth-orchestrator.js.map +1 -0
- package/dist/headless/auth-service.js +43 -0
- package/dist/headless/auth-service.js.map +1 -0
- package/dist/headless/bootstrap-fast-path.js +112 -0
- package/dist/headless/bootstrap-fast-path.js.map +1 -0
- package/dist/headless/call-command.js +143 -0
- package/dist/headless/call-command.js.map +1 -0
- package/dist/headless/daemon-service.js +318 -0
- package/dist/headless/daemon-service.js.map +1 -0
- package/dist/headless/hook-actions.js +235 -0
- package/dist/headless/hook-actions.js.map +1 -0
- package/dist/headless/hook-service.js +42 -0
- package/dist/headless/hook-service.js.map +1 -0
- package/dist/headless/kernel-services.js +216 -0
- package/dist/headless/kernel-services.js.map +1 -0
- package/dist/headless/kernel.js +785 -0
- package/dist/headless/kernel.js.map +1 -0
- package/dist/headless/operations/arion.js +119 -0
- package/dist/headless/operations/arion.js.map +1 -0
- package/dist/headless/operations/auth.js +45 -0
- package/dist/headless/operations/auth.js.map +1 -0
- package/dist/headless/operations/client.js +31 -0
- package/dist/headless/operations/client.js.map +1 -0
- package/dist/headless/operations/config.js +69 -0
- package/dist/headless/operations/config.js.map +1 -0
- package/dist/headless/operations/daemon.js +47 -0
- package/dist/headless/operations/daemon.js.map +1 -0
- package/dist/headless/operations/hook.js +56 -0
- package/dist/headless/operations/hook.js.map +1 -0
- package/dist/headless/operations/index.js +11 -0
- package/dist/headless/operations/index.js.map +1 -0
- package/dist/headless/operations/memory.js +102 -0
- package/dist/headless/operations/memory.js.map +1 -0
- package/dist/headless/operations/message.js +279 -0
- package/dist/headless/operations/message.js.map +1 -0
- package/dist/headless/operations/model.js +100 -0
- package/dist/headless/operations/model.js.map +1 -0
- package/dist/headless/operations/peer.js +56 -0
- package/dist/headless/operations/peer.js.map +1 -0
- package/dist/headless/operations/run.js +24 -0
- package/dist/headless/operations/run.js.map +1 -0
- package/dist/headless/operations/session.js +90 -0
- package/dist/headless/operations/session.js.map +1 -0
- package/dist/headless/operations/system.js +19 -0
- package/dist/headless/operations/system.js.map +1 -0
- package/dist/headless/operations/utils.js +35 -0
- package/dist/headless/operations/utils.js.map +1 -0
- package/dist/headless/run-orchestrator.js +703 -0
- package/dist/headless/run-orchestrator.js.map +1 -0
- package/dist/headless/stdio-server.js +439 -0
- package/dist/headless/stdio-server.js.map +1 -0
- package/dist/history/SessionHistory.js +8 -0
- package/dist/history/SessionHistory.js.map +1 -0
- package/dist/history/SessionHistoryClient.js +186 -0
- package/dist/history/SessionHistoryClient.js.map +1 -0
- package/dist/history/conversation-message.js +112 -0
- package/dist/history/conversation-message.js.map +1 -0
- package/dist/history/index.js +8 -0
- package/dist/history/index.js.map +1 -0
- package/dist/history/jsonl-replay.js +154 -0
- package/dist/history/jsonl-replay.js.map +1 -0
- package/dist/history/repair-tool-pairing.js +84 -0
- package/dist/history/repair-tool-pairing.js.map +1 -0
- package/dist/history/stall-phase-bridge.js +11 -0
- package/dist/history/stall-phase-bridge.js.map +1 -0
- package/dist/history/turn-accumulator.js +427 -0
- package/dist/history/turn-accumulator.js.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/ink-repl.d.ts.map +1 -0
- package/dist/ink-repl.js +4183 -0
- package/dist/ink-repl.js.map +1 -0
- package/dist/local-control-bootstrap.js +26 -0
- package/dist/local-control-bootstrap.js.map +1 -0
- package/dist/local-control-client.js +2 -0
- package/dist/local-control-client.js.map +1 -0
- package/dist/local-control-error-reporting.js +34 -0
- package/dist/local-control-error-reporting.js.map +1 -0
- package/dist/local-control-http-client.js +362 -0
- package/dist/local-control-http-client.js.map +1 -0
- package/dist/local-control-lazy-wrapper.js +363 -0
- package/dist/local-control-lazy-wrapper.js.map +1 -0
- package/dist/local-control-manager.js +146 -0
- package/dist/local-control-manager.js.map +1 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +62 -0
- package/dist/main.js.map +1 -0
- package/dist/network-security.js +62 -0
- package/dist/network-security.js.map +1 -0
- package/dist/networking-server.js +38 -0
- package/dist/networking-server.js.map +1 -0
- package/dist/peer-identity.js +23 -0
- package/dist/peer-identity.js.map +1 -0
- package/dist/polling-subscription.js +34 -0
- package/dist/polling-subscription.js.map +1 -0
- package/dist/relaunch.d.ts +63 -0
- package/dist/relaunch.d.ts.map +1 -0
- package/dist/relaunch.js +617 -0
- package/dist/relaunch.js.map +1 -0
- package/dist/release-notes.js +35 -0
- package/dist/release-notes.js.map +1 -0
- package/dist/repl-cleanup.js +47 -0
- package/dist/repl-cleanup.js.map +1 -0
- package/dist/runtime/configure-bun-sqlite.js +3 -0
- package/dist/runtime/configure-bun-sqlite.js.map +1 -0
- package/dist/runtime/crash-handlers.js +111 -0
- package/dist/runtime/crash-handlers.js.map +1 -0
- package/dist/runtime/interactive-invocation.js +39 -0
- package/dist/runtime/interactive-invocation.js.map +1 -0
- package/dist/runtime/internal-mode.js +14 -0
- package/dist/runtime/internal-mode.js.map +1 -0
- package/dist/runtime/launch-spec.js +64 -0
- package/dist/runtime/launch-spec.js.map +1 -0
- package/dist/runtime/owner-lease.js +44 -0
- package/dist/runtime/owner-lease.js.map +1 -0
- package/dist/runtime/public-mode.js +20 -0
- package/dist/runtime/public-mode.js.map +1 -0
- package/dist/runtime/run-internal-mode.d.ts.map +1 -0
- package/dist/runtime/run-internal-mode.js +18 -0
- package/dist/runtime/run-internal-mode.js.map +1 -0
- package/dist/runtime/runtime-kind.js +32 -0
- package/dist/runtime/runtime-kind.js.map +1 -0
- package/dist/runtime/spawn-aria.js +38 -0
- package/dist/runtime/spawn-aria.js.map +1 -0
- package/dist/selectable-client.js +2 -0
- package/dist/selectable-client.js.map +1 -0
- package/dist/selectable-peer.js +2 -0
- package/dist/selectable-peer.js.map +1 -0
- package/dist/session.js +203 -0
- package/dist/session.js.map +1 -0
- package/dist/slash-commands.js +80 -0
- package/dist/slash-commands.js.map +1 -0
- package/dist/sounds.js +210 -0
- package/dist/sounds.js.map +1 -0
- package/dist/ui/App.js +526 -0
- package/dist/ui/App.js.map +1 -0
- package/dist/ui/components/AnthropicMethodPicker.js +6 -0
- package/dist/ui/components/AnthropicMethodPicker.js.map +1 -0
- package/dist/ui/components/ArionPrompt.js +15 -0
- package/dist/ui/components/ArionPrompt.js.map +1 -0
- package/dist/ui/components/AutocompleteDropdown.js +23 -0
- package/dist/ui/components/AutocompleteDropdown.js.map +1 -0
- package/dist/ui/components/AutonomySelector.js +55 -0
- package/dist/ui/components/AutonomySelector.js.map +1 -0
- package/dist/ui/components/Banner.js +98 -0
- package/dist/ui/components/Banner.js.map +1 -0
- package/dist/ui/components/ConversationHistory.js +175 -0
- package/dist/ui/components/ConversationHistory.js.map +1 -0
- package/dist/ui/components/CopilotDeviceLoginFlow.js +88 -0
- package/dist/ui/components/CopilotDeviceLoginFlow.js.map +1 -0
- package/dist/ui/components/CopilotSourcePicker.js +50 -0
- package/dist/ui/components/CopilotSourcePicker.js.map +1 -0
- package/dist/ui/components/Cost.js +10 -0
- package/dist/ui/components/Cost.js.map +1 -0
- package/dist/ui/components/CustomSelect/option-map.js +30 -0
- package/dist/ui/components/CustomSelect/option-map.js.map +1 -0
- package/dist/ui/components/CustomSelect/select-option.js +13 -0
- package/dist/ui/components/CustomSelect/select-option.js.map +1 -0
- package/dist/ui/components/CustomSelect/select.js +42 -0
- package/dist/ui/components/CustomSelect/select.js.map +1 -0
- package/dist/ui/components/CustomSelect/use-select-state.js +179 -0
- package/dist/ui/components/CustomSelect/use-select-state.js.map +1 -0
- package/dist/ui/components/CustomSelect/use-select.js +15 -0
- package/dist/ui/components/CustomSelect/use-select.js.map +1 -0
- package/dist/ui/components/ErrorDisplay.js +35 -0
- package/dist/ui/components/ErrorDisplay.js.map +1 -0
- package/dist/ui/components/FallbackToolUseRejectedMessage.js +7 -0
- package/dist/ui/components/FallbackToolUseRejectedMessage.js.map +1 -0
- package/dist/ui/components/FileEditToolUpdatedMessage.js +57 -0
- package/dist/ui/components/FileEditToolUpdatedMessage.js.map +1 -0
- package/dist/ui/components/HandoffMarker.js +18 -0
- package/dist/ui/components/HandoffMarker.js.map +1 -0
- package/dist/ui/components/HighlightedCode.js +21 -0
- package/dist/ui/components/HighlightedCode.js.map +1 -0
- package/dist/ui/components/InputArea.js +187 -0
- package/dist/ui/components/InputArea.js.map +1 -0
- package/dist/ui/components/Message.js +25 -0
- package/dist/ui/components/Message.js.map +1 -0
- package/dist/ui/components/OAuthLoginFlow.js +113 -0
- package/dist/ui/components/OAuthLoginFlow.js.map +1 -0
- package/dist/ui/components/OutputTruncation.js +35 -0
- package/dist/ui/components/OutputTruncation.js.map +1 -0
- package/dist/ui/components/PermissionPrompt.js +79 -0
- package/dist/ui/components/PermissionPrompt.js.map +1 -0
- package/dist/ui/components/PipelineTimingPanel.js +15 -0
- package/dist/ui/components/PipelineTimingPanel.js.map +1 -0
- package/dist/ui/components/ProviderMethodPicker.js +61 -0
- package/dist/ui/components/ProviderMethodPicker.js.map +1 -0
- package/dist/ui/components/ProviderPicker.js +63 -0
- package/dist/ui/components/ProviderPicker.js.map +1 -0
- package/dist/ui/components/RenderItemView.js +71 -0
- package/dist/ui/components/RenderItemView.js.map +1 -0
- package/dist/ui/components/Spinner.js +46 -0
- package/dist/ui/components/Spinner.js.map +1 -0
- package/dist/ui/components/StatusBar.js +95 -0
- package/dist/ui/components/StatusBar.js.map +1 -0
- package/dist/ui/components/StreamingIndicator.js +55 -0
- package/dist/ui/components/StreamingIndicator.js.map +1 -0
- package/dist/ui/components/StructuredDiff.js +168 -0
- package/dist/ui/components/StructuredDiff.js.map +1 -0
- package/dist/ui/components/TextInputOverlay.js +43 -0
- package/dist/ui/components/TextInputOverlay.js.map +1 -0
- package/dist/ui/components/ThinkingBlock.js +82 -0
- package/dist/ui/components/ThinkingBlock.js.map +1 -0
- package/dist/ui/components/ToolCost.js +17 -0
- package/dist/ui/components/ToolCost.js.map +1 -0
- package/dist/ui/components/ToolExecution.js +61 -0
- package/dist/ui/components/ToolExecution.js.map +1 -0
- package/dist/ui/components/ToolHeader.js +51 -0
- package/dist/ui/components/ToolHeader.js.map +1 -0
- package/dist/ui/components/ToolRenderLayoutContext.js +14 -0
- package/dist/ui/components/ToolRenderLayoutContext.js.map +1 -0
- package/dist/ui/components/ToolResultWrapper.js +6 -0
- package/dist/ui/components/ToolResultWrapper.js.map +1 -0
- package/dist/ui/components/ToolUseLoader.js +35 -0
- package/dist/ui/components/ToolUseLoader.js.map +1 -0
- package/dist/ui/components/TraceWaterfall.js +91 -0
- package/dist/ui/components/TraceWaterfall.js.map +1 -0
- package/dist/ui/components/index.js +33 -0
- package/dist/ui/components/index.js.map +1 -0
- package/dist/ui/components/messages/AssistantTextMessage.js +25 -0
- package/dist/ui/components/messages/AssistantTextMessage.js.map +1 -0
- package/dist/ui/components/messages/UserImageMessage.js +12 -0
- package/dist/ui/components/messages/UserImageMessage.js.map +1 -0
- package/dist/ui/components/messages/UserTextMessage.js +12 -0
- package/dist/ui/components/messages/UserTextMessage.js.map +1 -0
- package/dist/ui/components/overlays/ArionSelector.js +68 -0
- package/dist/ui/components/overlays/ArionSelector.js.map +1 -0
- package/dist/ui/components/overlays/ClientSelector.js +62 -0
- package/dist/ui/components/overlays/ClientSelector.js.map +1 -0
- package/dist/ui/components/overlays/CommandPalette.js +67 -0
- package/dist/ui/components/overlays/CommandPalette.js.map +1 -0
- package/dist/ui/components/overlays/DaemonControl.js +87 -0
- package/dist/ui/components/overlays/DaemonControl.js.map +1 -0
- package/dist/ui/components/overlays/InviteShareOverlay.js +15 -0
- package/dist/ui/components/overlays/InviteShareOverlay.js.map +1 -0
- package/dist/ui/components/overlays/JoinInviteOverlay.js +32 -0
- package/dist/ui/components/overlays/JoinInviteOverlay.js.map +1 -0
- package/dist/ui/components/overlays/MemoryBrowser.js +100 -0
- package/dist/ui/components/overlays/MemoryBrowser.js.map +1 -0
- package/dist/ui/components/overlays/MessageSelector.js +123 -0
- package/dist/ui/components/overlays/MessageSelector.js.map +1 -0
- package/dist/ui/components/overlays/ModelSelector.js +211 -0
- package/dist/ui/components/overlays/ModelSelector.js.map +1 -0
- package/dist/ui/components/overlays/PairRequestOverlay.js +42 -0
- package/dist/ui/components/overlays/PairRequestOverlay.js.map +1 -0
- package/dist/ui/components/overlays/PeerSelector.js +84 -0
- package/dist/ui/components/overlays/PeerSelector.js.map +1 -0
- package/dist/ui/components/overlays/SessionSelector.js +102 -0
- package/dist/ui/components/overlays/SessionSelector.js.map +1 -0
- package/dist/ui/components/overlays/SoundSelector.js +86 -0
- package/dist/ui/components/overlays/SoundSelector.js.map +1 -0
- package/dist/ui/components/overlays/ThemeSelector.js +139 -0
- package/dist/ui/components/overlays/ThemeSelector.js.map +1 -0
- package/dist/ui/components/overlays/index.js +15 -0
- package/dist/ui/components/overlays/index.js.map +1 -0
- package/dist/ui/components/permissions/BashPermissionRequest/BashPermissionRequest.js +53 -0
- package/dist/ui/components/permissions/BashPermissionRequest/BashPermissionRequest.js.map +1 -0
- package/dist/ui/components/permissions/FallbackPermissionRequest.js +56 -0
- package/dist/ui/components/permissions/FallbackPermissionRequest.js.map +1 -0
- package/dist/ui/components/permissions/FileEditPermissionRequest/FileEditPermissionRequest.js +76 -0
- package/dist/ui/components/permissions/FileEditPermissionRequest/FileEditPermissionRequest.js.map +1 -0
- package/dist/ui/components/permissions/FileEditPermissionRequest/FileEditToolDiff.js +18 -0
- package/dist/ui/components/permissions/FileEditPermissionRequest/FileEditToolDiff.js.map +1 -0
- package/dist/ui/components/permissions/FileWritePermissionRequest/FileWritePermissionRequest.js +64 -0
- package/dist/ui/components/permissions/FileWritePermissionRequest/FileWritePermissionRequest.js.map +1 -0
- package/dist/ui/components/permissions/FileWritePermissionRequest/FileWriteToolDiff.js +26 -0
- package/dist/ui/components/permissions/FileWritePermissionRequest/FileWriteToolDiff.js.map +1 -0
- package/dist/ui/components/permissions/FilesystemPermissionRequest/FilesystemPermissionRequest.js +141 -0
- package/dist/ui/components/permissions/FilesystemPermissionRequest/FilesystemPermissionRequest.js.map +1 -0
- package/dist/ui/components/permissions/PermissionRequest.js +70 -0
- package/dist/ui/components/permissions/PermissionRequest.js.map +1 -0
- package/dist/ui/components/permissions/PermissionRequestTitle.js +41 -0
- package/dist/ui/components/permissions/PermissionRequestTitle.js.map +1 -0
- package/dist/ui/components/permissions/hooks.js +10 -0
- package/dist/ui/components/permissions/hooks.js.map +1 -0
- package/dist/ui/components/permissions/toolUseOptions.js +68 -0
- package/dist/ui/components/permissions/toolUseOptions.js.map +1 -0
- package/dist/ui/components/permissions/utils.js +10 -0
- package/dist/ui/components/permissions/utils.js.map +1 -0
- package/dist/ui/components/text-input/Cursor.js +326 -0
- package/dist/ui/components/text-input/Cursor.js.map +1 -0
- package/dist/ui/components/text-input/TextInput.js +231 -0
- package/dist/ui/components/text-input/TextInput.js.map +1 -0
- package/dist/ui/components/text-input/imagePaste.js +28 -0
- package/dist/ui/components/text-input/imagePaste.js.map +1 -0
- package/dist/ui/components/text-input/index.js +6 -0
- package/dist/ui/components/text-input/index.js.map +1 -0
- package/dist/ui/components/text-input/useDoublePress.js +30 -0
- package/dist/ui/components/text-input/useDoublePress.js.map +1 -0
- package/dist/ui/components/text-input/useTextInput.js +245 -0
- package/dist/ui/components/text-input/useTextInput.js.map +1 -0
- package/dist/ui/components/tool-types.js +9 -0
- package/dist/ui/components/tool-types.js.map +1 -0
- package/dist/ui/constants/figures.js +4 -0
- package/dist/ui/constants/figures.js.map +1 -0
- package/dist/ui/constants/index.js +3 -0
- package/dist/ui/constants/index.js.map +1 -0
- package/dist/ui/display-mode.js +93 -0
- package/dist/ui/display-mode.js.map +1 -0
- package/dist/ui/display-policy.js +19 -0
- package/dist/ui/display-policy.js.map +1 -0
- package/dist/ui/hooks/index.js +6 -0
- package/dist/ui/hooks/index.js.map +1 -0
- package/dist/ui/hooks/useCommandAutocomplete.js +93 -0
- package/dist/ui/hooks/useCommandAutocomplete.js.map +1 -0
- package/dist/ui/hooks/useDoublePress.js +37 -0
- package/dist/ui/hooks/useDoublePress.js.map +1 -0
- package/dist/ui/hooks/useIndicatorState.js +55 -0
- package/dist/ui/hooks/useIndicatorState.js.map +1 -0
- package/dist/ui/hooks/useInterval.js +23 -0
- package/dist/ui/hooks/useInterval.js.map +1 -0
- package/dist/ui/hooks/useKeyboardShortcuts.js +127 -0
- package/dist/ui/hooks/useKeyboardShortcuts.js.map +1 -0
- package/dist/ui/hooks/useTerminalSize.js +55 -0
- package/dist/ui/hooks/useTerminalSize.js.map +1 -0
- package/dist/ui/hooks/useUnifiedMessages.js +117 -0
- package/dist/ui/hooks/useUnifiedMessages.js.map +1 -0
- package/dist/ui/indicator-state.js +44 -0
- package/dist/ui/indicator-state.js.map +1 -0
- package/dist/ui/markdown/highlight.js +44 -0
- package/dist/ui/markdown/highlight.js.map +1 -0
- package/dist/ui/markdown/index.js +1460 -0
- package/dist/ui/markdown/index.js.map +1 -0
- package/dist/ui/markdown/tokenizer.js +24 -0
- package/dist/ui/markdown/tokenizer.js.map +1 -0
- package/dist/ui/render-item.js +5 -0
- package/dist/ui/render-item.js.map +1 -0
- package/dist/ui/screens/REPL.js +119 -0
- package/dist/ui/screens/REPL.js.map +1 -0
- package/dist/ui/screens/approval-lifecycle.js +38 -0
- package/dist/ui/screens/approval-lifecycle.js.map +1 -0
- package/dist/ui/status-line.js +72 -0
- package/dist/ui/status-line.js.map +1 -0
- package/dist/ui/theme/index.js +51 -0
- package/dist/ui/theme/index.js.map +1 -0
- package/dist/ui/theme/themes/claude-dark-daltonized.js +51 -0
- package/dist/ui/theme/themes/claude-dark-daltonized.js.map +1 -0
- package/dist/ui/theme/themes/claude-dark.js +50 -0
- package/dist/ui/theme/themes/claude-dark.js.map +1 -0
- package/dist/ui/theme/themes/claude-light-daltonized.js +51 -0
- package/dist/ui/theme/themes/claude-light-daltonized.js.map +1 -0
- package/dist/ui/theme/themes/claude-light.js +50 -0
- package/dist/ui/theme/themes/claude-light.js.map +1 -0
- package/dist/ui/theme/themes/dark-accessible.js +18 -0
- package/dist/ui/theme/themes/dark-accessible.js.map +1 -0
- package/dist/ui/theme/themes/dark.js +49 -0
- package/dist/ui/theme/themes/dark.js.map +1 -0
- package/dist/ui/theme/themes/light-accessible.js +18 -0
- package/dist/ui/theme/themes/light-accessible.js.map +1 -0
- package/dist/ui/theme/themes/light.js +49 -0
- package/dist/ui/theme/themes/light.js.map +1 -0
- package/dist/ui/theme/types.js +3 -0
- package/dist/ui/theme/types.js.map +1 -0
- package/dist/ui/theme.js +142 -0
- package/dist/ui/theme.js.map +1 -0
- package/dist/ui/to-render-items.js +145 -0
- package/dist/ui/to-render-items.js.map +1 -0
- package/dist/ui/tools/AgentTool/index.js +30 -0
- package/dist/ui/tools/AgentTool/index.js.map +1 -0
- package/dist/ui/tools/ArchitectTool/index.js +31 -0
- package/dist/ui/tools/ArchitectTool/index.js.map +1 -0
- package/dist/ui/tools/AskUserTool/index.js +46 -0
- package/dist/ui/tools/AskUserTool/index.js.map +1 -0
- package/dist/ui/tools/BashTool/BashToolResultMessage.js +11 -0
- package/dist/ui/tools/BashTool/BashToolResultMessage.js.map +1 -0
- package/dist/ui/tools/BashTool/OutputLine.js +21 -0
- package/dist/ui/tools/BashTool/OutputLine.js.map +1 -0
- package/dist/ui/tools/BashTool/index.js +91 -0
- package/dist/ui/tools/BashTool/index.js.map +1 -0
- package/dist/ui/tools/BrowseTool/index.js +43 -0
- package/dist/ui/tools/BrowseTool/index.js.map +1 -0
- package/dist/ui/tools/BrowserTool/index.js +47 -0
- package/dist/ui/tools/BrowserTool/index.js.map +1 -0
- package/dist/ui/tools/CbmTool/index.js +188 -0
- package/dist/ui/tools/CbmTool/index.js.map +1 -0
- package/dist/ui/tools/CheckDelegationTool/index.js +46 -0
- package/dist/ui/tools/CheckDelegationTool/index.js.map +1 -0
- package/dist/ui/tools/CheckMessagesTool/index.js +85 -0
- package/dist/ui/tools/CheckMessagesTool/index.js.map +1 -0
- package/dist/ui/tools/CreateQuipTool/index.js +30 -0
- package/dist/ui/tools/CreateQuipTool/index.js.map +1 -0
- package/dist/ui/tools/CreateSkillTool/index.js +22 -0
- package/dist/ui/tools/CreateSkillTool/index.js.map +1 -0
- package/dist/ui/tools/CreateToolTool/index.js +31 -0
- package/dist/ui/tools/CreateToolTool/index.js.map +1 -0
- package/dist/ui/tools/DelegateRemoteTool/index.js +42 -0
- package/dist/ui/tools/DelegateRemoteTool/index.js.map +1 -0
- package/dist/ui/tools/DeployTool/index.js +47 -0
- package/dist/ui/tools/DeployTool/index.js.map +1 -0
- package/dist/ui/tools/FffTool/index.js +103 -0
- package/dist/ui/tools/FffTool/index.js.map +1 -0
- package/dist/ui/tools/FileEditTool/index.js +67 -0
- package/dist/ui/tools/FileEditTool/index.js.map +1 -0
- package/dist/ui/tools/FileReadTool/index.js +68 -0
- package/dist/ui/tools/FileReadTool/index.js.map +1 -0
- package/dist/ui/tools/FileWriteTool/index.js +61 -0
- package/dist/ui/tools/FileWriteTool/index.js.map +1 -0
- package/dist/ui/tools/ForkTool/index.js +47 -0
- package/dist/ui/tools/ForkTool/index.js.map +1 -0
- package/dist/ui/tools/FrgTool/index.js +96 -0
- package/dist/ui/tools/FrgTool/index.js.map +1 -0
- package/dist/ui/tools/GetThreadTool/index.js +39 -0
- package/dist/ui/tools/GetThreadTool/index.js.map +1 -0
- package/dist/ui/tools/GlobTool/index.js +50 -0
- package/dist/ui/tools/GlobTool/index.js.map +1 -0
- package/dist/ui/tools/GrepTool/index.js +84 -0
- package/dist/ui/tools/GrepTool/index.js.map +1 -0
- package/dist/ui/tools/HatchArionTool/index.js +36 -0
- package/dist/ui/tools/HatchArionTool/index.js.map +1 -0
- package/dist/ui/tools/LearnSkillTool/index.js +22 -0
- package/dist/ui/tools/LearnSkillTool/index.js.map +1 -0
- package/dist/ui/tools/LearnTool/index.js +43 -0
- package/dist/ui/tools/LearnTool/index.js.map +1 -0
- package/dist/ui/tools/LearnToolTool/index.js +22 -0
- package/dist/ui/tools/LearnToolTool/index.js.map +1 -0
- package/dist/ui/tools/ListClientsTool/index.js +39 -0
- package/dist/ui/tools/ListClientsTool/index.js.map +1 -0
- package/dist/ui/tools/LspTool/index.js +261 -0
- package/dist/ui/tools/LspTool/index.js.map +1 -0
- package/dist/ui/tools/MCPTool/index.js +33 -0
- package/dist/ui/tools/MCPTool/index.js.map +1 -0
- package/dist/ui/tools/ManageNetworkTool/index.js +53 -0
- package/dist/ui/tools/ManageNetworkTool/index.js.map +1 -0
- package/dist/ui/tools/MemoryReadTool/index.js +64 -0
- package/dist/ui/tools/MemoryReadTool/index.js.map +1 -0
- package/dist/ui/tools/MemoryWriteTool/index.js +20 -0
- package/dist/ui/tools/MemoryWriteTool/index.js.map +1 -0
- package/dist/ui/tools/NotebookEditTool/index.js +33 -0
- package/dist/ui/tools/NotebookEditTool/index.js.map +1 -0
- package/dist/ui/tools/NotebookReadTool/index.js +25 -0
- package/dist/ui/tools/NotebookReadTool/index.js.map +1 -0
- package/dist/ui/tools/OutlookReadTool/index.js +66 -0
- package/dist/ui/tools/OutlookReadTool/index.js.map +1 -0
- package/dist/ui/tools/OutlookReplyTool/index.js +49 -0
- package/dist/ui/tools/OutlookReplyTool/index.js.map +1 -0
- package/dist/ui/tools/OutlookSendTool/index.js +49 -0
- package/dist/ui/tools/OutlookSendTool/index.js.map +1 -0
- package/dist/ui/tools/PauseDelegationTool/index.js +35 -0
- package/dist/ui/tools/PauseDelegationTool/index.js.map +1 -0
- package/dist/ui/tools/ProbeTool/index.js +121 -0
- package/dist/ui/tools/ProbeTool/index.js.map +1 -0
- package/dist/ui/tools/ProcessTool/index.js +66 -0
- package/dist/ui/tools/ProcessTool/index.js.map +1 -0
- package/dist/ui/tools/QuestListTool/index.js +46 -0
- package/dist/ui/tools/QuestListTool/index.js.map +1 -0
- package/dist/ui/tools/QuestReportTool/index.js +49 -0
- package/dist/ui/tools/QuestReportTool/index.js.map +1 -0
- package/dist/ui/tools/QuestUpdateTool/index.js +87 -0
- package/dist/ui/tools/QuestUpdateTool/index.js.map +1 -0
- package/dist/ui/tools/QuipCommentTool/index.js +69 -0
- package/dist/ui/tools/QuipCommentTool/index.js.map +1 -0
- package/dist/ui/tools/QuipReadTool/index.js +71 -0
- package/dist/ui/tools/QuipReadTool/index.js.map +1 -0
- package/dist/ui/tools/RestArionTool/index.js +32 -0
- package/dist/ui/tools/RestArionTool/index.js.map +1 -0
- package/dist/ui/tools/RestartTool/index.js +35 -0
- package/dist/ui/tools/RestartTool/index.js.map +1 -0
- package/dist/ui/tools/ResumeDelegationTool/index.js +35 -0
- package/dist/ui/tools/ResumeDelegationTool/index.js.map +1 -0
- package/dist/ui/tools/RetireArionTool/index.js +32 -0
- package/dist/ui/tools/RetireArionTool/index.js.map +1 -0
- package/dist/ui/tools/RgTool/index.js +73 -0
- package/dist/ui/tools/RgTool/index.js.map +1 -0
- package/dist/ui/tools/SearchKnowledgeTool/index.js +43 -0
- package/dist/ui/tools/SearchKnowledgeTool/index.js.map +1 -0
- package/dist/ui/tools/SearchMessagesTool/index.js +43 -0
- package/dist/ui/tools/SearchMessagesTool/index.js.map +1 -0
- package/dist/ui/tools/SelfDiagnoseTool/index.js +61 -0
- package/dist/ui/tools/SelfDiagnoseTool/index.js.map +1 -0
- package/dist/ui/tools/SendMessageTool/index.js +45 -0
- package/dist/ui/tools/SendMessageTool/index.js.map +1 -0
- package/dist/ui/tools/SerenaTool/index.js +124 -0
- package/dist/ui/tools/SerenaTool/index.js.map +1 -0
- package/dist/ui/tools/SessionHistoryTool/index.js +52 -0
- package/dist/ui/tools/SessionHistoryTool/index.js.map +1 -0
- package/dist/ui/tools/SgTool/index.js +80 -0
- package/dist/ui/tools/SgTool/index.js.map +1 -0
- package/dist/ui/tools/SlackReactTool/index.js +41 -0
- package/dist/ui/tools/SlackReactTool/index.js.map +1 -0
- package/dist/ui/tools/SlackReadTool/index.js +48 -0
- package/dist/ui/tools/SlackReadTool/index.js.map +1 -0
- package/dist/ui/tools/SlackSendTool/index.js +45 -0
- package/dist/ui/tools/SlackSendTool/index.js.map +1 -0
- package/dist/ui/tools/SpawnWorkerTool/index.js +33 -0
- package/dist/ui/tools/SpawnWorkerTool/index.js.map +1 -0
- package/dist/ui/tools/StickerRequestTool/index.js +19 -0
- package/dist/ui/tools/StickerRequestTool/index.js.map +1 -0
- package/dist/ui/tools/ThinkTool/index.js +17 -0
- package/dist/ui/tools/ThinkTool/index.js.map +1 -0
- package/dist/ui/tools/UgTool/index.js +108 -0
- package/dist/ui/tools/UgTool/index.js.map +1 -0
- package/dist/ui/tools/UseSkillTool/index.js +22 -0
- package/dist/ui/tools/UseSkillTool/index.js.map +1 -0
- package/dist/ui/tools/WakeArionTool/index.js +32 -0
- package/dist/ui/tools/WakeArionTool/index.js.map +1 -0
- package/dist/ui/tools/WebFetchTool/index.js +56 -0
- package/dist/ui/tools/WebFetchTool/index.js.map +1 -0
- package/dist/ui/tools/WebSearchTool/index.js +44 -0
- package/dist/ui/tools/WebSearchTool/index.js.map +1 -0
- package/dist/ui/tools/lsTool/index.js +58 -0
- package/dist/ui/tools/lsTool/index.js.map +1 -0
- package/dist/ui/tools/registry.js +197 -0
- package/dist/ui/tools/registry.js.map +1 -0
- package/dist/ui/tools/tool-renderer.js +11 -0
- package/dist/ui/tools/tool-renderer.js.map +1 -0
- package/dist/ui/tools/truncation.js +35 -0
- package/dist/ui/tools/truncation.js.map +1 -0
- package/dist/ui/types/anthropic.js +4 -0
- package/dist/ui/types/anthropic.js.map +1 -0
- package/dist/ui/types/index.js +2 -0
- package/dist/ui/types/index.js.map +1 -0
- package/dist/ui/types/message.js +3 -0
- package/dist/ui/types/message.js.map +1 -0
- package/dist/ui/types/tool.js +4 -0
- package/dist/ui/types/tool.js.map +1 -0
- package/dist/ui/utils/array.js +4 -0
- package/dist/ui/utils/array.js.map +1 -0
- package/dist/ui/utils/cursor.js +131 -0
- package/dist/ui/utils/cursor.js.map +1 -0
- package/dist/ui/utils/diff.js +120 -0
- package/dist/ui/utils/diff.js.map +1 -0
- package/dist/ui/utils/format.js +42 -0
- package/dist/ui/utils/format.js.map +1 -0
- package/dist/ui/utils/fuzzy.js +59 -0
- package/dist/ui/utils/fuzzy.js.map +1 -0
- package/dist/ui/utils/index.js +11 -0
- package/dist/ui/utils/index.js.map +1 -0
- package/dist/ui/utils/keys.js +8 -0
- package/dist/ui/utils/keys.js.map +1 -0
- package/dist/ui/utils/patch.js +17 -0
- package/dist/ui/utils/patch.js.map +1 -0
- package/dist/ui/utils/risk.js +114 -0
- package/dist/ui/utils/risk.js.map +1 -0
- package/dist/ui/utils/terminal-image.js +70 -0
- package/dist/ui/utils/terminal-image.js.map +1 -0
- package/dist/ui/utils/validation.js +48 -0
- package/dist/ui/utils/validation.js.map +1 -0
- package/dist/ui/verb-pairs.js +248 -0
- package/dist/ui/verb-pairs.js.map +1 -0
- package/dist/ui.js +131 -0
- package/dist/ui.js.map +1 -0
- package/package.json +73 -14
- package/src/entrypoints/command-mode.ts +5 -0
- package/src/entrypoints/daemon.ts +54 -0
- package/src/entrypoints/headless-stdio.ts +27 -0
- package/src/entrypoints/interactive.ts +112 -0
- package/src/main.ts +72 -0
- package/src/runtime/configure-bun-sqlite.ts +3 -0
- package/src/runtime/crash-handlers.ts +128 -0
- package/src/runtime/interactive-invocation.test.ts +42 -0
- package/src/runtime/interactive-invocation.ts +51 -0
- package/src/runtime/internal-mode.test.ts +19 -0
- package/src/runtime/internal-mode.ts +24 -0
- package/src/runtime/launch-spec.test.ts +26 -0
- package/src/runtime/launch-spec.ts +84 -0
- package/src/runtime/owner-lease.ts +52 -0
- package/src/runtime/public-mode.test.ts +18 -0
- package/src/runtime/public-mode.ts +19 -0
- package/src/runtime/run-internal-mode.ts +19 -0
- package/src/runtime/runtime-kind.test.ts +23 -0
- package/src/runtime/runtime-kind.ts +41 -0
- package/src/runtime/spawn-aria.ts +62 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { FallbackToolUseRejectedMessage } from "../../components/FallbackToolUseRejectedMessage.js";
|
|
4
|
+
import { getTheme } from "../../theme/index.js";
|
|
5
|
+
import { safeFallbackText } from "../truncation.js";
|
|
6
|
+
function truncateText(text, maxLen = 40) {
|
|
7
|
+
return text.length > maxLen ? text.slice(0, maxLen - 1) + "…" : text;
|
|
8
|
+
}
|
|
9
|
+
export const QuipCommentToolRenderers = {
|
|
10
|
+
displayName() {
|
|
11
|
+
return "Quip Comment";
|
|
12
|
+
},
|
|
13
|
+
renderInput(input, { verbose } = {}) {
|
|
14
|
+
const threadId = input.threadId ? truncateText(String(input.threadId), 30) : "";
|
|
15
|
+
const content = input.content ? truncateText(String(input.content), 40) : "";
|
|
16
|
+
const parts = [];
|
|
17
|
+
if (threadId) {
|
|
18
|
+
parts.push(`thread: ${threadId}`);
|
|
19
|
+
}
|
|
20
|
+
if (content) {
|
|
21
|
+
parts.push(`"${content}"`);
|
|
22
|
+
}
|
|
23
|
+
return (_jsx(Box, { flexDirection: "row", children: _jsx(Text, { children: parts.length > 0 ? parts.join(" ") : "Posting comment..." }) }));
|
|
24
|
+
},
|
|
25
|
+
renderRejection() {
|
|
26
|
+
return _jsx(FallbackToolUseRejectedMessage, {});
|
|
27
|
+
},
|
|
28
|
+
renderOutput(output, { verbose } = {}) {
|
|
29
|
+
const theme = getTheme();
|
|
30
|
+
// Handle null/undefined
|
|
31
|
+
if (output == null) {
|
|
32
|
+
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { color: theme.colors.textMuted, children: "(No response)" }) }));
|
|
33
|
+
}
|
|
34
|
+
// Handle plain string
|
|
35
|
+
if (typeof output === "string") {
|
|
36
|
+
// If it looks like a success message, color it green
|
|
37
|
+
if (output.toLowerCase().includes("posted") || output.toLowerCase().includes("success")) {
|
|
38
|
+
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { color: theme.colors.success, children: safeFallbackText(output) }) }));
|
|
39
|
+
}
|
|
40
|
+
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { children: safeFallbackText(output) }) }));
|
|
41
|
+
}
|
|
42
|
+
const obj = output;
|
|
43
|
+
// Handle error case: { success: false, message: "..." }
|
|
44
|
+
if (obj.success === false) {
|
|
45
|
+
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { color: theme.colors.error, children: String(obj.message ?? "Error posting comment") }) }));
|
|
46
|
+
}
|
|
47
|
+
// Handle success case
|
|
48
|
+
if (obj.success === true) {
|
|
49
|
+
const message = obj.message ?? "Comment posted";
|
|
50
|
+
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { color: theme.colors.success, children: message }) }));
|
|
51
|
+
}
|
|
52
|
+
// Generic message display
|
|
53
|
+
if (obj.message) {
|
|
54
|
+
// If message suggests success, color it green
|
|
55
|
+
if (String(obj.message).toLowerCase().includes("posted")) {
|
|
56
|
+
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { color: theme.colors.success, children: String(obj.message) }) }));
|
|
57
|
+
}
|
|
58
|
+
// If message suggests error, color it red
|
|
59
|
+
if (String(obj.message).toLowerCase().includes("error") ||
|
|
60
|
+
String(obj.message).toLowerCase().includes("failed")) {
|
|
61
|
+
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { color: theme.colors.error, children: String(obj.message) }) }));
|
|
62
|
+
}
|
|
63
|
+
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { children: String(obj.message) }) }));
|
|
64
|
+
}
|
|
65
|
+
// Last resort
|
|
66
|
+
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { color: theme.colors.textMuted, children: "(Comment posted)" }) }));
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/tools/QuipCommentTool/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAgBpD,SAAS,YAAY,CAAC,IAAY,EAAE,MAAM,GAAG,EAAE;IAC7C,OAAO,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;AACvE,CAAC;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAiB;IACpD,WAAW;QACT,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,WAAW,CAAC,KAAuB,EAAE,EAAE,OAAO,KAA4B,EAAE;QAC1E,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAChF,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,C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AC,WAAW,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;gBACnD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,EACpD,CAAC;gBACD,OAAO,CACL,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,YACzB,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,YAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,GAAQ,GACzD,CACP,CAAC;YACJ,CAAC;YACD,OAAO,CACL,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,YACzB,KAAC,IAAI,cAAE,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,GAAQ,GAC9B,CACP,CAAC;QACJ,CAAC;QAED,cAAc;QACd,OAAO,CACL,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,YACzB,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,iCAAyB,GACxD,CACP,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { FallbackToolUseRejectedMessage } from "../../components/FallbackToolUseRejectedMessage.js";
|
|
4
|
+
import { getTheme } from "../../theme/index.js";
|
|
5
|
+
import { safeFallbackText } from "../truncation.js";
|
|
6
|
+
function truncateText(text, maxLen = 60) {
|
|
7
|
+
return text.length > maxLen ? text.slice(0, maxLen - 1) + "…" : text;
|
|
8
|
+
}
|
|
9
|
+
export const QuipReadToolRenderers = {
|
|
10
|
+
displayName() {
|
|
11
|
+
return "Quip";
|
|
12
|
+
},
|
|
13
|
+
renderInput(input, { verbose } = {}) {
|
|
14
|
+
const action = String(input.action ?? "read");
|
|
15
|
+
const query = input.query ? truncateText(String(input.query)) : "";
|
|
16
|
+
const threadId = input.threadId ? truncateText(String(input.threadId)) : "";
|
|
17
|
+
const parts = [action];
|
|
18
|
+
if (query) {
|
|
19
|
+
parts.push(`query: ${query}`);
|
|
20
|
+
}
|
|
21
|
+
else if (threadId) {
|
|
22
|
+
parts.push(`threadId: ${threadId}`);
|
|
23
|
+
}
|
|
24
|
+
return (_jsx(Box, { flexDirection: "row", children: _jsx(Text, { children: parts.join(", ") }) }));
|
|
25
|
+
},
|
|
26
|
+
renderRejection() {
|
|
27
|
+
return _jsx(FallbackToolUseRejectedMessage, {});
|
|
28
|
+
},
|
|
29
|
+
renderOutput(output, { verbose } = {}) {
|
|
30
|
+
const theme = getTheme();
|
|
31
|
+
// Handle null/undefined
|
|
32
|
+
if (output == null) {
|
|
33
|
+
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { color: theme.colors.textMuted, children: "(No content)" }) }));
|
|
34
|
+
}
|
|
35
|
+
// Handle plain string
|
|
36
|
+
if (typeof output === "string") {
|
|
37
|
+
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { children: safeFallbackText(output) }) }));
|
|
38
|
+
}
|
|
39
|
+
const obj = output;
|
|
40
|
+
// Handle error case: { success: false, message: "..." }
|
|
41
|
+
if (obj.success === false) {
|
|
42
|
+
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { color: theme.colors.error, children: String(obj.message ?? "Error reading Quip document") }) }));
|
|
43
|
+
}
|
|
44
|
+
// Handle success case with document data
|
|
45
|
+
if (obj.success === true) {
|
|
46
|
+
const data = obj.data;
|
|
47
|
+
// If we have output text content
|
|
48
|
+
if (data?.output && typeof data.output === "string") {
|
|
49
|
+
const outputLines = data.output.split("\n");
|
|
50
|
+
const previewLines = outputLines.slice(0, 2);
|
|
51
|
+
const preview = previewLines.join("\n");
|
|
52
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { flexDirection: "row", children: _jsx(Text, { color: theme.colors.textMuted, dimColor: true, children: truncateText(preview, 80) }) }), outputLines.length > 2 && (_jsx(Box, { flexDirection: "row", paddingLeft: 0, children: _jsxs(Text, { color: theme.colors.textMuted, children: ["... (", outputLines.length - 2, " more lines)"] }) }))] }));
|
|
53
|
+
}
|
|
54
|
+
// Fallback to message if no output
|
|
55
|
+
if (obj.message) {
|
|
56
|
+
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { children: String(obj.message) }) }));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
// Handle create_quip_document response: "Document created" message
|
|
60
|
+
if (typeof obj.message === "string" && obj.message.toLowerCase().includes("created")) {
|
|
61
|
+
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { color: theme.colors.success, children: obj.message }) }));
|
|
62
|
+
}
|
|
63
|
+
// Fallback: generic message display
|
|
64
|
+
if (obj.message) {
|
|
65
|
+
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { children: String(obj.message) }) }));
|
|
66
|
+
}
|
|
67
|
+
// Last resort
|
|
68
|
+
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { color: theme.colors.textMuted, children: "(No response)" }) }));
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/tools/QuipReadTool/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAmBpD,SAAS,YAAY,CAAC,IAAY,EAAE,MAAM,GAAG,EAAE;IAC7C,OAAO,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,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8BAAsB,GACrD,CACP,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { FallbackToolUseRejectedMessage } from "../../components/FallbackToolUseRejectedMessage.js";
|
|
4
|
+
import { getTheme } from "../../theme/index.js";
|
|
5
|
+
export const RestArionToolRenderers = {
|
|
6
|
+
displayName() {
|
|
7
|
+
return "Rest Arion";
|
|
8
|
+
},
|
|
9
|
+
renderInput(input, _opts) {
|
|
10
|
+
if (input.name) {
|
|
11
|
+
return `${input.name}`;
|
|
12
|
+
}
|
|
13
|
+
return Object.entries(input)
|
|
14
|
+
.map(([key, value]) => `${key}: ${JSON.stringify(value)}`)
|
|
15
|
+
.join(", ");
|
|
16
|
+
},
|
|
17
|
+
renderRejection() {
|
|
18
|
+
return _jsx(FallbackToolUseRejectedMessage, {});
|
|
19
|
+
},
|
|
20
|
+
renderOutput(output, _opts) {
|
|
21
|
+
const theme = getTheme();
|
|
22
|
+
// Handle undefined/null output (ARIA may return undefined)
|
|
23
|
+
if (output == null) {
|
|
24
|
+
return (_jsx(Box, { justifyContent: "space-between", overflowX: "hidden", width: "100%", children: _jsx(Box, { flexDirection: "row", children: _jsx(Text, { color: theme.colors.textMuted, children: "Arion is now resting" }) }) }));
|
|
25
|
+
}
|
|
26
|
+
const message = typeof output === "string"
|
|
27
|
+
? output
|
|
28
|
+
: output.message || `${output.name || "Arion"} is now resting`;
|
|
29
|
+
return (_jsx(Box, { justifyContent: "space-between", overflowX: "hidden", width: "100%", children: _jsx(Box, { flexDirection: "row", children: _jsx(Text, { color: theme.colors.textMuted, children: message }) }) }));
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/tools/RestArionTool/index.tsx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I,IAAI,OAAO,iBAAiB,CAAC;QAEnE,OAAO,CACL,KAAC,GAAG,IAAC,cAAc,EAAC,eAAe,EAAC,SAAS,EAAC,QAAQ,EAAC,KAAK,EAAC,MAAM,YACjE,KAAC,GAAG,IAAC,aAAa,EAAC,KAAK,YACtB,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,YAAG,OAAO,GAAQ,GACjD,GACF,CACP,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { FallbackToolUseRejectedMessage } from "../../components/FallbackToolUseRejectedMessage.js";
|
|
4
|
+
import { getTheme } from "../../theme/index.js";
|
|
5
|
+
import { safeFallbackText } from "../truncation.js";
|
|
6
|
+
export const RestartToolRenderers = {
|
|
7
|
+
displayName() {
|
|
8
|
+
return "Restart";
|
|
9
|
+
},
|
|
10
|
+
renderInput(input, _opts = {}) {
|
|
11
|
+
if (input.reason) {
|
|
12
|
+
return input.reason;
|
|
13
|
+
}
|
|
14
|
+
return Object.entries(input)
|
|
15
|
+
.map(([key, value]) => `${key}: ${JSON.stringify(value)}`)
|
|
16
|
+
.join(", ");
|
|
17
|
+
},
|
|
18
|
+
renderRejection() {
|
|
19
|
+
return _jsx(FallbackToolUseRejectedMessage, {});
|
|
20
|
+
},
|
|
21
|
+
renderOutput(output, _opts = {}) {
|
|
22
|
+
const theme = getTheme();
|
|
23
|
+
if (!output) {
|
|
24
|
+
return (_jsx(Box, { justifyContent: "space-between", overflowX: "hidden", width: "100%", children: _jsx(Box, { flexDirection: "row", children: _jsx(Text, { color: theme.colors.textMuted, children: "(No content)" }) }) }));
|
|
25
|
+
}
|
|
26
|
+
if (typeof output === "string") {
|
|
27
|
+
return (_jsx(Box, { justifyContent: "space-between", overflowX: "hidden", width: "100%", children: _jsx(Box, { flexDirection: "row", children: _jsx(Text, { children: safeFallbackText(output) }) }) }));
|
|
28
|
+
}
|
|
29
|
+
if (output.error) {
|
|
30
|
+
return (_jsx(Box, { justifyContent: "space-between", overflowX: "hidden", width: "100%", children: _jsx(Box, { flexDirection: "row", children: _jsx(Text, { color: theme.colors.error, children: output.error }) }) }));
|
|
31
|
+
}
|
|
32
|
+
return (_jsx(Box, { justifyContent: "space-between", overflowX: "hidden", width: "100%", children: _jsx(Box, { flexDirection: "row", children: _jsx(Text, { color: theme.colors.warning, children: "Restarting..." }) }) }));
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/tools/RestartTool/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAapD,MAAM,CAAC,MAAM,oBAAoB,GAAiB;IAChD,WAAW;QACT,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,WAAW,CAAC,KAAmB,EAAE,QAA+B,EAAE;QAChE,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;YACjB,OAAO,KAAK,CAAC,MAAM,CAAC;QACtB,CAAC;QACD,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;aACzB,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;aACzD,IAAI,CAAC,IAAI,CAAC,CAAC;IAChB,CAAC;IACD,eAAe;QACb,OAAO,KAAC,8BAA8B,KAAG,CAAC;IAC5C,CA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;CACF,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { FallbackToolUseRejectedMessage } from "../../components/FallbackToolUseRejectedMessage.js";
|
|
4
|
+
import { getTheme } from "../../theme/index.js";
|
|
5
|
+
import { safeFallbackText } from "../truncation.js";
|
|
6
|
+
export const ResumeDelegationToolRenderers = {
|
|
7
|
+
displayName() {
|
|
8
|
+
return "Resume";
|
|
9
|
+
},
|
|
10
|
+
renderInput(input, _opts = {}) {
|
|
11
|
+
if (input.id) {
|
|
12
|
+
return input.id;
|
|
13
|
+
}
|
|
14
|
+
return Object.entries(input)
|
|
15
|
+
.map(([key, value]) => `${key}: ${JSON.stringify(value)}`)
|
|
16
|
+
.join(", ");
|
|
17
|
+
},
|
|
18
|
+
renderRejection() {
|
|
19
|
+
return _jsx(FallbackToolUseRejectedMessage, {});
|
|
20
|
+
},
|
|
21
|
+
renderOutput(output, _opts = {}) {
|
|
22
|
+
const theme = getTheme();
|
|
23
|
+
if (!output) {
|
|
24
|
+
return (_jsx(Box, { justifyContent: "space-between", overflowX: "hidden", width: "100%", children: _jsx(Box, { flexDirection: "row", children: _jsx(Text, { color: theme.colors.textMuted, children: "(No content)" }) }) }));
|
|
25
|
+
}
|
|
26
|
+
if (typeof output === "string") {
|
|
27
|
+
return (_jsx(Box, { justifyContent: "space-between", overflowX: "hidden", width: "100%", children: _jsx(Box, { flexDirection: "row", children: _jsx(Text, { children: safeFallbackText(output) }) }) }));
|
|
28
|
+
}
|
|
29
|
+
if (output.error) {
|
|
30
|
+
return (_jsx(Box, { justifyContent: "space-between", overflowX: "hidden", width: "100%", children: _jsx(Box, { flexDirection: "row", children: _jsx(Text, { color: theme.colors.error, children: output.error }) }) }));
|
|
31
|
+
}
|
|
32
|
+
return (_jsx(Box, { justifyContent: "space-between", overflowX: "hidden", width: "100%", children: _jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: theme.colors.success, children: "Resumed" }), output.quest_id && (_jsxs(_Fragment, { children: [_jsx(Text, { children: " " }), _jsx(Text, { color: theme.colors.textMuted, children: output.quest_id })] }))] }) }));
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/tools/ResumeDelegationTool/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAcpD,MAAM,CAAC,MAAM,6BAA6B,GAAiB;IACzD,WAAW;QACT,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,WAAW,CAAC,KAA4B,EAAE,QAA+B,EAAE;QACzE,IAAI,KAAK,CAAC,EAAE,EAAE,CAAC;YACb,OAAO,KAAK,CAAC,EAAE,CAAC;QAClB,CAAC;QACD,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;aACzB,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;aACzD,IAAI,CAAC,IAAI,CAAC,CAAC;IAChB,CAAC;IACD,eAAe;QACb,OAAO,KAAC,8BAA8B,KAAG,CAAC;IAC5C,CAAC;IACD,YAAY,CAAC,MAA8C,EAAE,QAA+B,EAAE;QAC5F,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;QAEzB,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,CACL,KAAC,GAAG,IAAC,cA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,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { FallbackToolUseRejectedMessage } from "../../components/FallbackToolUseRejectedMessage.js";
|
|
4
|
+
import { getTheme } from "../../theme/index.js";
|
|
5
|
+
export const RetireArionToolRenderers = {
|
|
6
|
+
displayName() {
|
|
7
|
+
return "Retire Arion";
|
|
8
|
+
},
|
|
9
|
+
renderInput(input, _opts) {
|
|
10
|
+
if (input.name) {
|
|
11
|
+
return `${input.name}`;
|
|
12
|
+
}
|
|
13
|
+
return Object.entries(input)
|
|
14
|
+
.map(([key, value]) => `${key}: ${JSON.stringify(value)}`)
|
|
15
|
+
.join(", ");
|
|
16
|
+
},
|
|
17
|
+
renderRejection() {
|
|
18
|
+
return _jsx(FallbackToolUseRejectedMessage, {});
|
|
19
|
+
},
|
|
20
|
+
renderOutput(output, _opts) {
|
|
21
|
+
const theme = getTheme();
|
|
22
|
+
// Handle undefined/null output (ARIA may return undefined)
|
|
23
|
+
if (output == null) {
|
|
24
|
+
return (_jsx(Box, { justifyContent: "space-between", overflowX: "hidden", width: "100%", children: _jsx(Box, { flexDirection: "row", children: _jsx(Text, { color: theme.colors.warning, children: "Arion has been retired" }) }) }));
|
|
25
|
+
}
|
|
26
|
+
const message = typeof output === "string"
|
|
27
|
+
? output
|
|
28
|
+
: output.message || `${output.name || "Arion"} has been retired`;
|
|
29
|
+
return (_jsx(Box, { justifyContent: "space-between", overflowX: "hidden", width: "100%", children: _jsx(Box, { flexDirection: "row", children: _jsx(Text, { color: theme.colors.warning, children: message }) }) }));
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/tools/RetireArionTool/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAA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E,OAAO,CACL,KAAC,GAAG,IAAC,cAAc,EAAC,eAAe,EAAC,SAAS,EAAC,QAAQ,EAAC,KAAK,EAAC,MAAM,YACjE,KAAC,GAAG,IAAC,aAAa,EAAC,KAAK,YACtB,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,YAAG,OAAO,GAAQ,GAC/C,GACF,CACP,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { relative } from "path";
|
|
4
|
+
import { FallbackToolUseRejectedMessage } from "../../components/FallbackToolUseRejectedMessage.js";
|
|
5
|
+
import { getTheme } from "../../theme/index.js";
|
|
6
|
+
function isCountOutput(output) {
|
|
7
|
+
return "counts" in output && Array.isArray(output.counts);
|
|
8
|
+
}
|
|
9
|
+
function buildCommandPreview(input) {
|
|
10
|
+
const parts = [];
|
|
11
|
+
// Add pattern in quotes
|
|
12
|
+
parts.push(`"${input.pattern}"`);
|
|
13
|
+
// Add file_type if present
|
|
14
|
+
if (input.file_type) {
|
|
15
|
+
parts.push(`-t ${input.file_type}`);
|
|
16
|
+
}
|
|
17
|
+
// Add path if present
|
|
18
|
+
if (input.path) {
|
|
19
|
+
parts.push(input.path);
|
|
20
|
+
}
|
|
21
|
+
return parts.join(" ");
|
|
22
|
+
}
|
|
23
|
+
export const RgToolRenderers = {
|
|
24
|
+
displayName() {
|
|
25
|
+
return "Ripgrep";
|
|
26
|
+
},
|
|
27
|
+
renderInput(input, { verbose } = {}) {
|
|
28
|
+
const commandPreview = buildCommandPreview(input);
|
|
29
|
+
const extra = verbose && input.extra_args && input.extra_args.length > 0
|
|
30
|
+
? ` [${input.extra_args.join(" ")}]`
|
|
31
|
+
: "";
|
|
32
|
+
return `${commandPreview}${extra}`;
|
|
33
|
+
},
|
|
34
|
+
renderRejection() {
|
|
35
|
+
return _jsx(FallbackToolUseRejectedMessage, {});
|
|
36
|
+
},
|
|
37
|
+
renderOutput(output) {
|
|
38
|
+
const theme = getTheme();
|
|
39
|
+
// Guard: handle unexpected output shapes gracefully
|
|
40
|
+
if (!output || typeof output !== "object") {
|
|
41
|
+
return _jsx(Text, { color: theme.colors.textMuted, children: String(output ?? "No result") });
|
|
42
|
+
}
|
|
43
|
+
if (!("counts" in output) && !("matches" in output)) {
|
|
44
|
+
const msg = output.message;
|
|
45
|
+
return (_jsx(Text, { color: theme.colors.textMuted, children: typeof msg === "string" ? msg : "Search complete" }));
|
|
46
|
+
}
|
|
47
|
+
// Handle count mode
|
|
48
|
+
if (isCountOutput(output)) {
|
|
49
|
+
const { counts, total } = output;
|
|
50
|
+
const displayCount = Math.min(5, counts.length);
|
|
51
|
+
const remaining = counts.length - displayCount;
|
|
52
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { bold: true, children: total }), _jsx(Text, { children: " matches across " }), _jsx(Text, { bold: true, children: counts.length }), _jsx(Text, { children: " files" })] }), counts.slice(0, displayCount).map((result, i) => (_jsx(Box, { paddingLeft: 2, children: _jsxs(Text, { color: theme.colors.textMuted, children: [relative(process.cwd(), result.file), ": ", result.count] }) }, i))), remaining > 0 && (_jsx(Box, { paddingLeft: 2, children: _jsxs(Text, { color: theme.colors.textMuted, children: ["+", remaining, " more files"] }) }))] }));
|
|
53
|
+
}
|
|
54
|
+
// Handle normal mode
|
|
55
|
+
const { matches } = output;
|
|
56
|
+
if (matches.length === 0) {
|
|
57
|
+
return (_jsx(Box, { children: _jsx(Text, { color: theme.colors.textMuted, children: "No matches found" }) }));
|
|
58
|
+
}
|
|
59
|
+
// Group matches by file
|
|
60
|
+
const fileMap = new Map();
|
|
61
|
+
for (const match of matches) {
|
|
62
|
+
if (!fileMap.has(match.file)) {
|
|
63
|
+
fileMap.set(match.file, []);
|
|
64
|
+
}
|
|
65
|
+
fileMap.get(match.file).push(match);
|
|
66
|
+
}
|
|
67
|
+
const filesWithMatches = Array.from(fileMap.entries());
|
|
68
|
+
const displayFileCount = Math.min(3, filesWithMatches.length);
|
|
69
|
+
const remainingFiles = filesWithMatches.length - displayFileCount;
|
|
70
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { bold: true, children: matches.length }), _jsx(Text, { children: " matches in " }), _jsx(Text, { bold: true, children: filesWithMatches.length }), _jsx(Text, { children: " files" })] }), filesWithMatches.slice(0, displayFileCount).map(([file, fileMatches], i) => (_jsx(Box, { paddingLeft: 2, children: _jsxs(Text, { color: theme.colors.textMuted, children: [relative(process.cwd(), file), ": ", fileMatches.length] }) }, i))), remainingFiles > 0 && (_jsx(Box, { paddingLeft: 2, children: _jsxs(Text, { color: theme.colors.textMuted, children: ["+", remainingFiles, " more files"] }) }))] }));
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/tools/RgTool/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AA2ChD,SAAS,aAAa,CAAC,MAAgB;IACrC,OAAO,QAAQ,IAAI,MAAM,IAAI,KAAK,CAAC,OAAO,CAAE,MAAwB,CAAC,MAAM,CAAC,CAAC;AAC/E,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAc;IACzC,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,wBAAwB;IACxB,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,OAAO,GAAG,CAAC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B,CAAC,MAAM,GAAQ,EAC3C,KAAC,IAAI,yBAAc,IACf,EACL,gBAAgB,CAAC,KAAK,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAC3E,KAAC,GAAG,IAAS,WAAW,EAAE,CAAC,YACzB,MAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,aAChC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,QAAI,WAAW,CAAC,MAAM,IAC/C,IAHC,CAAC,CAIL,CACP,CAAC,EACD,cAAc,GAAG,CAAC,IAAI,CACrB,KAAC,GAAG,IAAC,WAAW,EAAE,CAAC,YACjB,MAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,kBAAI,cAAc,mBAAmB,GACpE,CACP,IACG,CACP,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { FallbackToolUseRejectedMessage } from "../../components/FallbackToolUseRejectedMessage.js";
|
|
4
|
+
import { getTheme } from "../../theme/index.js";
|
|
5
|
+
export const SearchKnowledgeToolRenderers = {
|
|
6
|
+
displayName() {
|
|
7
|
+
return "Search";
|
|
8
|
+
},
|
|
9
|
+
renderInput(input, { verbose }) {
|
|
10
|
+
const query = input.query;
|
|
11
|
+
if (!query) {
|
|
12
|
+
return Object.entries(input)
|
|
13
|
+
.filter(([, v]) => v !== undefined)
|
|
14
|
+
.map(([k, v]) => `${k}: ${JSON.stringify(v)}`)
|
|
15
|
+
.join(", ");
|
|
16
|
+
}
|
|
17
|
+
const parts = [`"${query}"`];
|
|
18
|
+
if (verbose && input.sources?.length) {
|
|
19
|
+
parts.push(`sources: [${input.sources.join(", ")}]`);
|
|
20
|
+
}
|
|
21
|
+
return parts.join(" ");
|
|
22
|
+
},
|
|
23
|
+
renderRejection() {
|
|
24
|
+
return _jsx(FallbackToolUseRejectedMessage, {});
|
|
25
|
+
},
|
|
26
|
+
renderOutput(output) {
|
|
27
|
+
const theme = getTheme();
|
|
28
|
+
if (!output || typeof output === "string") {
|
|
29
|
+
const text = typeof output === "string" ? output : "(No results)";
|
|
30
|
+
return (_jsx(Box, { flexDirection: "row", width: "100%", children: _jsx(Text, { color: theme.colors.textMuted, children: text }) }));
|
|
31
|
+
}
|
|
32
|
+
const results = output.results ?? [];
|
|
33
|
+
const platform = output.platform;
|
|
34
|
+
const timedOutMatch = results.length === 0 ? null : null; // no extra info needed
|
|
35
|
+
const sourceGroups = new Map();
|
|
36
|
+
for (const r of results) {
|
|
37
|
+
sourceGroups.set(r.source, (sourceGroups.get(r.source) ?? 0) + 1);
|
|
38
|
+
}
|
|
39
|
+
const sourceSummary = [...sourceGroups.entries()].map(([s, n]) => `${n} ${s}`).join(", ");
|
|
40
|
+
return (_jsx(Box, { flexDirection: "column", children: _jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { children: "Found " }), _jsxs(Text, { bold: true, children: [results.length, " "] }), _jsx(Text, { children: results.length === 1 ? "result" : "results" }), platform && (_jsxs(Text, { color: theme.colors.textMuted, children: [" ", "on ", platform.os, "/", platform.arch] })), sourceSummary && results.length > 0 && (_jsxs(Text, { color: theme.colors.textMuted, children: [" (", sourceSummary, ")"] }))] }) }));
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/tools/SearchKnowledgeTool/index.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAo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AE,KAAK,CAAC,MAAM,CAAC,SAAS,aAChC,GAAG,SACA,QAAQ,CAAC,EAAE,OAAG,QAAQ,CAAC,IAAI,IAC1B,CACR,EACA,aAAa,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CACtC,MAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,mBAAK,aAAa,SAAS,CAC/D,IACG,GACF,CACP,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { FallbackToolUseRejectedMessage } from "../../components/FallbackToolUseRejectedMessage.js";
|
|
4
|
+
import { getTheme } from "../../theme/index.js";
|
|
5
|
+
export const SearchMessagesToolRenderers = {
|
|
6
|
+
displayName() {
|
|
7
|
+
return "Search Messages";
|
|
8
|
+
},
|
|
9
|
+
renderInput(input, { verbose } = {}) {
|
|
10
|
+
const query = String(input?.query ?? "");
|
|
11
|
+
return query ? `"${query}"` : "Search messages";
|
|
12
|
+
},
|
|
13
|
+
renderRejection() {
|
|
14
|
+
return _jsx(FallbackToolUseRejectedMessage, {});
|
|
15
|
+
},
|
|
16
|
+
renderOutput(output, { verbose } = {}) {
|
|
17
|
+
const theme = getTheme();
|
|
18
|
+
if (output == null) {
|
|
19
|
+
return _jsx(Text, { color: theme.colors.textMuted, children: "No results" });
|
|
20
|
+
}
|
|
21
|
+
const obj = (output ?? {});
|
|
22
|
+
// Extract messages/results from output.data
|
|
23
|
+
const data = (obj.data ?? obj);
|
|
24
|
+
const results = Array.isArray(data.messages)
|
|
25
|
+
? data.messages
|
|
26
|
+
: Array.isArray(data.results)
|
|
27
|
+
? data.results
|
|
28
|
+
: [];
|
|
29
|
+
if (!results || results.length === 0) {
|
|
30
|
+
return _jsx(Text, { color: theme.colors.textMuted, children: "No results" });
|
|
31
|
+
}
|
|
32
|
+
const count = results.length;
|
|
33
|
+
const previewCount = Math.min(3, results.length);
|
|
34
|
+
const previews = results.slice(0, previewCount);
|
|
35
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { children: [count, " result", count !== 1 ? "s" : ""] }), previews.length > 0 && (_jsx(Box, { flexDirection: "column", marginTop: 1, paddingLeft: 2, children: previews.map((msg, idx) => {
|
|
36
|
+
const from = String(msg.from ?? msg.sender ?? "Unknown");
|
|
37
|
+
const content = String(msg.content ?? msg.text ?? "");
|
|
38
|
+
const truncated = content.length > 40 ? content.substring(0, 40) + "…" : content;
|
|
39
|
+
return (_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { bold: true, children: from }), _jsx(Text, { children: " " }), _jsx(Text, { color: theme.colors.textMuted, children: truncated })] }, idx));
|
|
40
|
+
}) })), results.length > previewCount && (_jsx(Box, { marginTop: 1, paddingLeft: 2, children: _jsxs(Text, { color: theme.colors.textMuted, children: ["... and ", results.length - previewCount, " more"] }) }))] }));
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/tools/SearchMessagesTool/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,MAAM,CAAC,MAAM,2BAA2B,GAAiB;IACvD,WAAW;QACT,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IACD,WAAW,CAAC,KAA8B,EAAE,EAAE,OAAO,KAA4B,EAAE;QACjF,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QACzC,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,KA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_jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { FallbackToolUseRejectedMessage } from "../../components/FallbackToolUseRejectedMessage.js";
|
|
4
|
+
import { getTheme } from "../../theme/index.js";
|
|
5
|
+
const MAX_DIAG_ITEMS = 20;
|
|
6
|
+
function formatUptime(s) {
|
|
7
|
+
if (s < 60)
|
|
8
|
+
return `${s}s`;
|
|
9
|
+
if (s < 3600)
|
|
10
|
+
return `${Math.floor(s / 60)}m`;
|
|
11
|
+
if (s < 86400)
|
|
12
|
+
return `${Math.floor(s / 3600)}h ${Math.floor((s % 3600) / 60)}m`;
|
|
13
|
+
return `${Math.floor(s / 86400)}d`;
|
|
14
|
+
}
|
|
15
|
+
export const SelfDiagnoseToolRenderers = {
|
|
16
|
+
displayName() {
|
|
17
|
+
return "Self Diagnose";
|
|
18
|
+
},
|
|
19
|
+
renderInput(input) {
|
|
20
|
+
const parts = [];
|
|
21
|
+
if (input.focus)
|
|
22
|
+
parts.push(`focus: ${input.focus}`);
|
|
23
|
+
if (input.sections?.length)
|
|
24
|
+
parts.push(`${input.sections.length} sections`);
|
|
25
|
+
else
|
|
26
|
+
parts.push("all sections");
|
|
27
|
+
return parts.join(", ");
|
|
28
|
+
},
|
|
29
|
+
renderRejection() {
|
|
30
|
+
return _jsx(FallbackToolUseRejectedMessage, {});
|
|
31
|
+
},
|
|
32
|
+
renderOutput(output, { verbose }) {
|
|
33
|
+
if (!output || typeof output !== "object")
|
|
34
|
+
return null;
|
|
35
|
+
const result = output;
|
|
36
|
+
const meta = result._meta;
|
|
37
|
+
const theme = getTheme();
|
|
38
|
+
if (!verbose) {
|
|
39
|
+
const parts = [];
|
|
40
|
+
if (meta)
|
|
41
|
+
parts.push(`${meta.sections_returned.length}/6 sections · ${meta.elapsed_ms}ms`);
|
|
42
|
+
if (meta?.errors.length)
|
|
43
|
+
parts.push(`${meta.errors.length} errors`);
|
|
44
|
+
const hasIssues = (result.errors && result.errors.length > 0) ||
|
|
45
|
+
(result.crashes && result.crashes.length > 0) ||
|
|
46
|
+
(result.runtime && (result.runtime.socket_dirs > 100 || result.runtime.relaunch_pending));
|
|
47
|
+
return (_jsx(Text, { color: hasIssues ? theme.colors.warning : theme.colors.success, children: parts.join(" · ") || "done" }));
|
|
48
|
+
}
|
|
49
|
+
// Verbose mode — section by section
|
|
50
|
+
return (_jsxs(Box, { flexDirection: "column", children: [result.runtime && (_jsxs(Box, { paddingLeft: 2, flexDirection: "column", children: [_jsx(Text, { bold: true, children: "runtime" }), _jsx(Box, { paddingLeft: 2, children: _jsxs(Text, { children: ["PID ", result.runtime.pid, " \u00B7 up ", formatUptime(result.runtime.uptime_s), " \u00B7 heap", " ", result.runtime.heap_mb, "MB \u00B7 RSS ", result.runtime.rss_mb, "MB"] }) }), (result.runtime.socket_dirs > 100 || result.runtime.relaunch_pending) && (_jsxs(Box, { paddingLeft: 2, children: [result.runtime.socket_dirs > 100 && (_jsxs(Text, { color: theme.colors.error, children: ["\u26A0 socket leak: ", result.runtime.socket_dirs, " dirs in sock/"] })), result.runtime.relaunch_pending && (_jsx(Text, { color: theme.colors.error, children: "\u26A0 stuck restart pending" }))] }))] })), result.errors !== undefined && (_jsxs(Box, { paddingLeft: 2, flexDirection: "column", children: [_jsx(Text, { bold: true, color: result.errors && result.errors.length > 0
|
|
51
|
+
? theme.colors.error
|
|
52
|
+
: theme.colors.success, children: "errors" }), _jsx(Box, { paddingLeft: 2, flexDirection: "column", children: result.errors && result.errors.length > 0 ? (_jsxs(_Fragment, { children: [result.errors.slice(0, MAX_DIAG_ITEMS).map((e, i) => (_jsxs(Text, { color: theme.colors.error, children: ["[", e.source, "] ", e.timestamp ? e.timestamp.slice(11, 19) : "?", " ", e.severity, " ", e.category, ": ", e.message.slice(0, 80)] }, i))), result.errors.length > MAX_DIAG_ITEMS && (_jsxs(Text, { dimColor: true, children: ["\u2026 (+", result.errors.length - MAX_DIAG_ITEMS, " more)"] }))] })) : (_jsx(Text, { color: theme.colors.success, children: "none" })) })] })), result.crashes !== undefined && (_jsxs(Box, { paddingLeft: 2, flexDirection: "column", children: [_jsx(Text, { bold: true, color: result.crashes && result.crashes.length > 0
|
|
53
|
+
? theme.colors.error
|
|
54
|
+
: theme.colors.success, children: "crashes" }), _jsx(Box, { paddingLeft: 2, flexDirection: "column", children: result.crashes && result.crashes.length > 0 ? (_jsxs(_Fragment, { children: [result.crashes.slice(0, MAX_DIAG_ITEMS).map((c, i) => (_jsxs(Text, { color: theme.colors.error, children: [c.file, " ", c.timestamp ? c.timestamp.slice(0, 19) : "", " ", c.error_message ?? ""] }, i))), result.crashes.length > MAX_DIAG_ITEMS && (_jsxs(Text, { dimColor: true, children: ["\u2026 (+", result.crashes.length - MAX_DIAG_ITEMS, " more)"] }))] })) : (_jsx(Text, { color: theme.colors.success, children: "none" })) })] })), result.databases && (_jsxs(Box, { paddingLeft: 2, flexDirection: "column", children: [_jsx(Text, { bold: true, children: "databases" }), _jsx(Box, { paddingLeft: 2, flexDirection: "column", children: result.databases.slice(0, MAX_DIAG_ITEMS).map((db, i) => {
|
|
55
|
+
const walWarn = db.wal_mb && parseFloat(db.wal_mb) > 1;
|
|
56
|
+
return (_jsxs(Text, { color: walWarn ? theme.colors.warning : undefined, children: [db.name, ": ", db.size_mb, "MB", db.wal_mb ? ` (WAL ${db.wal_mb}MB${walWarn ? " ⚠" : ""})` : "", db.schema_version !== undefined ? ` schema:v${db.schema_version}` : ""] }, i));
|
|
57
|
+
}) })] })), result.daemon && result.daemon.length > 0 && (_jsxs(Box, { paddingLeft: 2, flexDirection: "column", children: [_jsx(Text, { bold: true, children: "daemon" }), _jsx(Box, { paddingLeft: 2, flexDirection: "column", children: result.daemon.map((d, i) => (_jsxs(Text, { children: [d.source, ": ", d.entries.length, " entries"] }, i))) })] })), result.network && (_jsxs(Box, { paddingLeft: 2, flexDirection: "column", children: [_jsx(Text, { bold: true, children: "network" }), _jsxs(Box, { paddingLeft: 2, flexDirection: "column", children: [_jsxs(Text, { children: ["node: ", result.network.display_name ?? "unknown", " \u00B7 port", " ", result.network.listen_port ?? "?", " \u00B7 endpoint", " ", result.network.external_endpoint ?? "none"] }), _jsxs(Text, { children: ["peers: ", result.network.peer_count, " \u00B7 TLS:", " ", result.network.tls_certs_present ? "✓" : "✗", " \u00B7 trusted CAs:", " ", result.network.trusted_cas] }), result.network.peers.length > 0 &&
|
|
58
|
+
result.network.peers.slice(0, MAX_DIAG_ITEMS).map((p, i) => (_jsxs(Text, { color: p.status === "connected" ? theme.colors.success : theme.colors.warning, children: [p.name || p.node_id.slice(0, 8), ": ", p.status] }, i))), result.network.recent_diagnostics.length > 0 && (_jsxs(Text, { dimColor: true, children: [result.network.recent_diagnostics.length, " recent diagnostic events"] }))] })] })), meta?.errors && meta.errors.length > 0 && (_jsxs(Box, { paddingLeft: 2, flexDirection: "column", children: [_jsx(Text, { bold: true, color: theme.colors.error, children: "collection errors" }), meta.errors.slice(0, MAX_DIAG_ITEMS).map((err, i) => (_jsx(Box, { paddingLeft: 2, children: _jsx(Text, { color: theme.colors.error, children: err }) }, i))), meta.errors.length > MAX_DIAG_ITEMS && (_jsxs(Text, { dimColor: true, children: ["\u2026 (+", meta.errors.length - MAX_DIAG_ITEMS, " more)"] }))] }))] }));
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/tools/SelfDiagnoseTool/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,MAAM,cAAc,GAAG,EAAE,CAAC;AAiE1B,SAAS,YAAY,CAAC,CAAS;IAC7B,IAA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