@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.
- package/bin/aria-dev.js +15 -0
- package/bin/aria.js +366 -0
- package/bin/install-owner-lease.d.ts +8 -0
- package/bin/install-owner-lease.js +53 -0
- package/dist/.aria-build-stamp.json +4 -0
- package/dist/attached-local-control-client.d.ts +90 -0
- package/dist/bootstrap-local-control-client.d.ts +1 -0
- package/dist/capability-aware-method-proxy.d.ts +1 -0
- package/dist/cli-context.d.ts +31 -0
- package/dist/commands/arions.d.ts +14 -0
- package/dist/commands/auth.d.ts +27 -0
- package/dist/commands/daemon.d.ts +31 -0
- package/dist/commands/definitions.d.ts +19 -0
- package/dist/commands/index.d.ts +13 -0
- package/dist/commands/login-handler.d.ts +108 -0
- package/dist/commands/logout-handler.d.ts +24 -0
- package/dist/commands/memory-handlers.d.ts +15 -0
- package/dist/commands/pairing.d.ts +2 -0
- package/dist/commands/peer-message-handler.d.ts +7 -0
- package/dist/commands/runtime-cutover-reset-command.d.ts +2 -0
- package/dist/commands/runtime-cutover-reset.d.ts +26 -0
- package/dist/commands/terminal-setup.d.ts +3 -0
- package/dist/config/aria-config.d.ts +50 -0
- package/dist/config/index.d.ts +4 -0
- package/dist/config/loader.d.ts +17 -0
- package/dist/config.d.ts +53 -0
- package/dist/daemon-info.d.ts +17 -0
- package/dist/ensure-daemon.d.ts +21 -0
- package/dist/event-loop-watchdog.d.ts +31 -0
- package/dist/headless/auth-orchestrator.d.ts +19 -0
- package/dist/headless/auth-service.d.ts +15 -0
- package/dist/headless/bootstrap-fast-path.d.ts +12 -0
- package/dist/headless/call-command.d.ts +8 -0
- package/dist/headless/daemon-service.d.ts +14 -0
- package/dist/headless/hook-actions.d.ts +40 -0
- package/dist/headless/hook-service.d.ts +8 -0
- package/dist/headless/kernel-services.d.ts +8 -0
- package/dist/headless/kernel.d.ts +118 -0
- package/dist/headless/operations/arion.d.ts +3 -0
- package/dist/headless/operations/auth.d.ts +4 -0
- package/dist/headless/operations/client.d.ts +2 -0
- package/dist/headless/operations/config.d.ts +3 -0
- package/dist/headless/operations/daemon.d.ts +3 -0
- package/dist/headless/operations/hook.d.ts +3 -0
- package/dist/headless/operations/index.d.ts +10 -0
- package/dist/headless/operations/memory.d.ts +3 -0
- package/dist/headless/operations/message.d.ts +2 -0
- package/dist/headless/operations/model.d.ts +3 -0
- package/dist/headless/operations/peer.d.ts +2 -0
- package/dist/headless/operations/run.d.ts +3 -0
- package/dist/headless/operations/session.d.ts +74 -0
- package/dist/headless/operations/subscription.d.ts +2 -0
- package/dist/headless/operations/system.d.ts +3 -0
- package/dist/headless/operations/utils.d.ts +5 -0
- package/dist/headless/run-orchestrator.d.ts +38 -0
- package/dist/headless/stdio-server.d.ts +4 -0
- package/dist/history/SessionHistory.d.ts +200 -0
- package/dist/history/conversation-message.d.ts +181 -0
- package/dist/history/index.d.ts +8 -0
- package/dist/history/jsonl-replay.d.ts +38 -0
- package/dist/history/repair-tool-pairing.d.ts +14 -0
- package/dist/history/turn-accumulator.d.ts +85 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +505 -0
- package/dist/ink-repl.d.ts +32 -0
- package/dist/local-control-bootstrap.d.ts +5 -0
- package/dist/local-control-client.d.ts +1 -0
- package/dist/local-control-error-reporting.d.ts +6 -0
- package/dist/local-control-http-client.d.ts +9 -0
- package/dist/network-security.d.ts +7 -0
- package/dist/networking-server.d.ts +28 -0
- package/dist/peer-identity.d.ts +3 -0
- package/dist/polling-subscription.d.ts +7 -0
- package/dist/relaunch.d.ts +55 -0
- package/dist/release-notes.d.ts +11 -0
- package/dist/repl-cleanup.d.ts +20 -0
- package/dist/selectable-client.d.ts +7 -0
- package/dist/selectable-peer.d.ts +12 -0
- package/dist/session.d.ts +103 -0
- package/dist/slash-commands.d.ts +34 -0
- package/dist/sounds.d.ts +31 -0
- package/dist/ui/App.d.ts +288 -0
- package/dist/ui/components/AnthropicMethodPicker.d.ts +9 -0
- package/dist/ui/components/ArionPrompt.d.ts +8 -0
- package/dist/ui/components/AutocompleteDropdown.d.ts +9 -0
- package/dist/ui/components/AutonomySelector.d.ts +12 -0
- package/dist/ui/components/Banner.d.ts +9 -0
- package/dist/ui/components/ConversationHistory.d.ts +59 -0
- package/dist/ui/components/CopilotDeviceLoginFlow.d.ts +15 -0
- package/dist/ui/components/CopilotSourcePicker.d.ts +13 -0
- package/dist/ui/components/Cost.d.ts +8 -0
- package/dist/ui/components/CustomSelect/option-map.d.ts +15 -0
- package/dist/ui/components/CustomSelect/select-option.d.ts +20 -0
- package/dist/ui/components/CustomSelect/select.d.ts +55 -0
- package/dist/ui/components/CustomSelect/use-select-state.d.ts +99 -0
- package/dist/ui/components/CustomSelect/use-select.d.ts +14 -0
- package/dist/ui/components/ErrorDisplay.d.ts +26 -0
- package/dist/ui/components/FallbackToolUseRejectedMessage.d.ts +2 -0
- package/dist/ui/components/FileEditToolUpdatedMessage.d.ts +9 -0
- package/dist/ui/components/HandoffMarker.d.ts +17 -0
- package/dist/ui/components/HighlightedCode.d.ts +7 -0
- package/dist/ui/components/InputArea.d.ts +17 -0
- package/dist/ui/components/Message.d.ts +16 -0
- package/dist/ui/components/OAuthLoginFlow.d.ts +25 -0
- package/dist/ui/components/OutputTruncation.d.ts +16 -0
- package/dist/ui/components/PermissionPrompt.d.ts +22 -0
- package/dist/ui/components/PipelineTimingPanel.d.ts +13 -0
- package/dist/ui/components/ProviderMethodPicker.d.ts +16 -0
- package/dist/ui/components/ProviderPicker.d.ts +15 -0
- package/dist/ui/components/RenderItemView.d.ts +18 -0
- package/dist/ui/components/Spinner.d.ts +3 -0
- package/dist/ui/components/StatusBar.d.ts +78 -0
- package/dist/ui/components/StreamingIndicator.d.ts +11 -0
- package/dist/ui/components/StructuredDiff.d.ts +20 -0
- package/dist/ui/components/TextInputOverlay.d.ts +9 -0
- package/dist/ui/components/ThinkingBlock.d.ts +53 -0
- package/dist/ui/components/ToolCost.d.ts +8 -0
- package/dist/ui/components/ToolExecution.d.ts +13 -0
- package/dist/ui/components/ToolHeader.d.ts +10 -0
- package/dist/ui/components/ToolRenderLayoutContext.d.ts +10 -0
- package/dist/ui/components/ToolResultWrapper.d.ts +6 -0
- package/dist/ui/components/ToolUseLoader.d.ts +10 -0
- package/dist/ui/components/TraceWaterfall.d.ts +56 -0
- package/dist/ui/components/index.d.ts +29 -0
- package/dist/ui/components/messages/AssistantTextMessage.d.ts +13 -0
- package/dist/ui/components/messages/UserImageMessage.d.ts +8 -0
- package/dist/ui/components/messages/UserTextMessage.d.ts +13 -0
- package/dist/ui/components/overlays/ArionSelector.d.ts +18 -0
- package/dist/ui/components/overlays/ClientSelector.d.ts +7 -0
- package/dist/ui/components/overlays/CommandPalette.d.ts +14 -0
- package/dist/ui/components/overlays/InviteShareOverlay.d.ts +7 -0
- package/dist/ui/components/overlays/JoinInviteOverlay.d.ts +6 -0
- package/dist/ui/components/overlays/MemoryBrowser.d.ts +17 -0
- package/dist/ui/components/overlays/MessageSelector.d.ts +20 -0
- package/dist/ui/components/overlays/ModelSelector.d.ts +17 -0
- package/dist/ui/components/overlays/PairRequestOverlay.d.ts +19 -0
- package/dist/ui/components/overlays/PeerSelector.d.ts +14 -0
- package/dist/ui/components/overlays/SessionSelector.d.ts +11 -0
- package/dist/ui/components/overlays/ThemeSelector.d.ts +22 -0
- package/dist/ui/components/overlays/index.d.ts +13 -0
- package/dist/ui/components/permissions/BashPermissionRequest/BashPermissionRequest.d.ts +9 -0
- package/dist/ui/components/permissions/FallbackPermissionRequest.d.ts +9 -0
- package/dist/ui/components/permissions/FileEditPermissionRequest/FileEditPermissionRequest.d.ts +9 -0
- package/dist/ui/components/permissions/FileEditPermissionRequest/FileEditToolDiff.d.ts +11 -0
- package/dist/ui/components/permissions/FileWritePermissionRequest/FileWritePermissionRequest.d.ts +9 -0
- package/dist/ui/components/permissions/FileWritePermissionRequest/FileWriteToolDiff.d.ts +9 -0
- package/dist/ui/components/permissions/FilesystemPermissionRequest/FilesystemPermissionRequest.d.ts +5 -0
- package/dist/ui/components/permissions/PermissionRequest.d.ts +52 -0
- package/dist/ui/components/permissions/PermissionRequestTitle.d.ts +13 -0
- package/dist/ui/components/permissions/hooks.d.ts +10 -0
- package/dist/ui/components/permissions/toolUseOptions.d.ts +10 -0
- package/dist/ui/components/permissions/utils.d.ts +6 -0
- package/dist/ui/components/text-input/Cursor.d.ts +58 -0
- package/dist/ui/components/text-input/TextInput.d.ts +98 -0
- package/dist/ui/components/text-input/imagePaste.d.ts +2 -0
- package/dist/ui/components/text-input/index.d.ts +6 -0
- package/dist/ui/components/text-input/useDoublePress.d.ts +2 -0
- package/dist/ui/components/text-input/useTextInput.d.ts +34 -0
- package/dist/ui/components/tool-types.d.ts +28 -0
- package/dist/ui/constants/figures.d.ts +1 -0
- package/dist/ui/constants/index.d.ts +1 -0
- package/dist/ui/display-mode.d.ts +62 -0
- package/dist/ui/display-policy.d.ts +3 -0
- package/dist/ui/hooks/index.d.ts +4 -0
- package/dist/ui/hooks/useCommandAutocomplete.d.ts +28 -0
- package/dist/ui/hooks/useDoublePress.d.ts +13 -0
- package/dist/ui/hooks/useIndicatorState.d.ts +3 -0
- package/dist/ui/hooks/useInterval.d.ts +6 -0
- package/dist/ui/hooks/useKeyboardShortcuts.d.ts +17 -0
- package/dist/ui/hooks/usePeerMessages.d.ts +26 -0
- package/dist/ui/hooks/useTerminalSize.d.ts +6 -0
- package/dist/ui/hooks/useUnifiedMessages.d.ts +83 -0
- package/dist/ui/indicator-state.d.ts +46 -0
- package/dist/ui/markdown/highlight.d.ts +8 -0
- package/dist/ui/markdown/index.d.ts +16 -0
- package/dist/ui/markdown/tokenizer.d.ts +17 -0
- package/dist/ui/render-item.d.ts +70 -0
- package/dist/ui/screens/REPL.d.ts +288 -0
- package/dist/ui/status-line.d.ts +32 -0
- package/dist/ui/theme/index.d.ts +8 -0
- package/dist/ui/theme/themes/claude-dark-daltonized.d.ts +2 -0
- package/dist/ui/theme/themes/claude-dark.d.ts +2 -0
- package/dist/ui/theme/themes/claude-light-daltonized.d.ts +2 -0
- package/dist/ui/theme/themes/claude-light.d.ts +2 -0
- package/dist/ui/theme/themes/dark-accessible.d.ts +2 -0
- package/dist/ui/theme/themes/dark.d.ts +2 -0
- package/dist/ui/theme/themes/light-accessible.d.ts +2 -0
- package/dist/ui/theme/themes/light.d.ts +2 -0
- package/dist/ui/theme/types.d.ts +51 -0
- package/dist/ui/theme.d.ts +51 -0
- package/dist/ui/to-render-items.d.ts +7 -0
- package/dist/ui/tools/AgentTool/index.d.ts +8 -0
- package/dist/ui/tools/ArchitectTool/index.d.ts +10 -0
- package/dist/ui/tools/AskUserTool/index.d.ts +19 -0
- package/dist/ui/tools/BashTool/BashToolResultMessage.d.ts +13 -0
- package/dist/ui/tools/BashTool/OutputLine.d.ts +6 -0
- package/dist/ui/tools/BashTool/index.d.ts +8 -0
- package/dist/ui/tools/BrowseTool/index.d.ts +20 -0
- package/dist/ui/tools/BrowserTool/index.d.ts +25 -0
- package/dist/ui/tools/CbmTool/index.d.ts +81 -0
- package/dist/ui/tools/CheckDelegationTool/index.d.ts +23 -0
- package/dist/ui/tools/CheckMessagesTool/index.d.ts +8 -0
- package/dist/ui/tools/CreateQuipTool/index.d.ts +10 -0
- package/dist/ui/tools/CreateSkillTool/index.d.ts +13 -0
- package/dist/ui/tools/CreateToolTool/index.d.ts +10 -0
- package/dist/ui/tools/DelegateRemoteTool/index.d.ts +22 -0
- package/dist/ui/tools/DeployTool/index.d.ts +24 -0
- package/dist/ui/tools/FffTool/index.d.ts +17 -0
- package/dist/ui/tools/FileEditTool/index.d.ts +10 -0
- package/dist/ui/tools/FileReadTool/index.d.ts +10 -0
- package/dist/ui/tools/FileWriteTool/index.d.ts +10 -0
- package/dist/ui/tools/FrgTool/index.d.ts +17 -0
- package/dist/ui/tools/GetThreadTool/index.d.ts +10 -0
- package/dist/ui/tools/GlobTool/index.d.ts +11 -0
- package/dist/ui/tools/GrepTool/index.d.ts +12 -0
- package/dist/ui/tools/HatchArionTool/index.d.ts +20 -0
- package/dist/ui/tools/LearnSkillTool/index.d.ts +13 -0
- package/dist/ui/tools/LearnTool/index.d.ts +15 -0
- package/dist/ui/tools/LearnToolTool/index.d.ts +14 -0
- package/dist/ui/tools/ListClientsTool/index.d.ts +10 -0
- package/dist/ui/tools/LspTool/index.d.ts +11 -0
- package/dist/ui/tools/MCPTool/index.d.ts +11 -0
- package/dist/ui/tools/ManageNetworkTool/index.d.ts +28 -0
- package/dist/ui/tools/MemoryReadTool/index.d.ts +8 -0
- package/dist/ui/tools/MemoryWriteTool/index.d.ts +6 -0
- package/dist/ui/tools/NotebookEditTool/index.d.ts +19 -0
- package/dist/ui/tools/NotebookReadTool/index.d.ts +12 -0
- package/dist/ui/tools/OutlookReadTool/index.d.ts +10 -0
- package/dist/ui/tools/OutlookReplyTool/index.d.ts +10 -0
- package/dist/ui/tools/OutlookSendTool/index.d.ts +10 -0
- package/dist/ui/tools/PauseDelegationTool/index.d.ts +20 -0
- package/dist/ui/tools/ProbeTool/index.d.ts +26 -0
- package/dist/ui/tools/ProcessTool/index.d.ts +29 -0
- package/dist/ui/tools/QuestListTool/index.d.ts +24 -0
- package/dist/ui/tools/QuestReportTool/index.d.ts +27 -0
- package/dist/ui/tools/QuestUpdateTool/index.d.ts +24 -0
- package/dist/ui/tools/QuipCommentTool/index.d.ts +23 -0
- package/dist/ui/tools/QuipReadTool/index.d.ts +26 -0
- package/dist/ui/tools/RestArionTool/index.d.ts +19 -0
- package/dist/ui/tools/RestartTool/index.d.ts +20 -0
- package/dist/ui/tools/ResumeDelegationTool/index.d.ts +21 -0
- package/dist/ui/tools/RetireArionTool/index.d.ts +19 -0
- package/dist/ui/tools/RgTool/index.d.ts +44 -0
- package/dist/ui/tools/SearchKnowledgeTool/index.d.ts +31 -0
- package/dist/ui/tools/SearchMessagesTool/index.d.ts +10 -0
- package/dist/ui/tools/SelfDiagnoseTool/index.d.ts +11 -0
- package/dist/ui/tools/SendMessageTool/index.d.ts +8 -0
- package/dist/ui/tools/SerenaTool/index.d.ts +18 -0
- package/dist/ui/tools/SessionHistoryTool/index.d.ts +32 -0
- package/dist/ui/tools/SgTool/index.d.ts +8 -0
- package/dist/ui/tools/SlackReactTool/index.d.ts +10 -0
- package/dist/ui/tools/SlackReadTool/index.d.ts +10 -0
- package/dist/ui/tools/SlackSendTool/index.d.ts +10 -0
- package/dist/ui/tools/SpawnWorkerTool/index.d.ts +18 -0
- package/dist/ui/tools/StickerRequestTool/index.d.ts +6 -0
- package/dist/ui/tools/ThinkTool/index.d.ts +8 -0
- package/dist/ui/tools/UgTool/index.d.ts +47 -0
- package/dist/ui/tools/UseSkillTool/index.d.ts +17 -0
- package/dist/ui/tools/WakeArionTool/index.d.ts +19 -0
- package/dist/ui/tools/WebFetchTool/index.d.ts +20 -0
- package/dist/ui/tools/WebSearchTool/index.d.ts +21 -0
- package/dist/ui/tools/lsTool/index.d.ts +12 -0
- package/dist/ui/tools/registry.d.ts +15 -0
- package/dist/ui/tools/tool-renderer.d.ts +24 -0
- package/dist/ui/tools/truncation.d.ts +6 -0
- package/dist/ui/types/anthropic.d.ts +19 -0
- package/dist/ui/types/index.d.ts +3 -0
- package/dist/ui/types/message.d.ts +19 -0
- package/dist/ui/types/tool.d.ts +17 -0
- package/dist/ui/utils/array.d.ts +1 -0
- package/dist/ui/utils/cursor.d.ts +28 -0
- package/dist/ui/utils/diff.d.ts +24 -0
- package/dist/ui/utils/format.d.ts +3 -0
- package/dist/ui/utils/fuzzy.d.ts +11 -0
- package/dist/ui/utils/index.d.ts +9 -0
- package/dist/ui/utils/keys.d.ts +6 -0
- package/dist/ui/utils/patch.d.ts +8 -0
- package/dist/ui/utils/risk.d.ts +14 -0
- package/dist/ui/utils/terminal-image.d.ts +18 -0
- package/dist/ui/utils/validation.d.ts +8 -0
- package/dist/ui/verb-pairs.d.ts +20 -0
- package/dist/ui.d.ts +70 -0
- package/package.json +76 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ink-based REPL for ARIA CLI
|
|
3
|
+
* Modern React-based UI using Ink
|
|
4
|
+
*/
|
|
5
|
+
import { ArionSession } from "./session.js";
|
|
6
|
+
import type { ArionManager } from "@aria-cli/aria";
|
|
7
|
+
import { type AttachedLocalControlClient } from "./local-control-client.js";
|
|
8
|
+
/** Minimal interface for the legacy Aria parameter until full AgentRunner migration */
|
|
9
|
+
interface AriaCompat {
|
|
10
|
+
components: {
|
|
11
|
+
memoria: IMemoria;
|
|
12
|
+
};
|
|
13
|
+
recallUserName(): Promise<string | null>;
|
|
14
|
+
shutdown(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
import { type ToolRegistry } from "@aria-cli/tools";
|
|
17
|
+
import type { AuthResolver } from "@aria-cli/auth";
|
|
18
|
+
import type { ModelRouter } from "@aria-cli/models";
|
|
19
|
+
import { getCliModels, type CredentialHints } from "@aria-cli/models";
|
|
20
|
+
import { type IMemoria } from "@aria-cli/types";
|
|
21
|
+
import { type SessionHistory } from "./history/index.js";
|
|
22
|
+
import type { CliContext } from "./cli-context.js";
|
|
23
|
+
import type { ToolCall } from "@aria-cli/types";
|
|
24
|
+
type ToolResult = {
|
|
25
|
+
id: string;
|
|
26
|
+
result: string;
|
|
27
|
+
isError: boolean;
|
|
28
|
+
};
|
|
29
|
+
type CliModelDefinition = ReturnType<typeof getCliModels>[number];
|
|
30
|
+
export declare function executeToolCallsInOrder(toolCalls: ToolCall[], registry: ToolRegistry, executeSingleTool: (toolCall: ToolCall) => Promise<ToolResult>): Promise<ToolResult[]>;
|
|
31
|
+
export declare function startInkRepl(session: ArionSession, manager: ArionManager, router: ModelRouter, aria: AriaCompat, attachedLocalControl: AttachedLocalControlClient, cliContext?: CliContext, inputHistory?: string[], onSaveInput?: (input: string) => void, sessionHistory?: SessionHistory, initialMessage?: string, cachedUserName?: string | null, resumeSessionId?: string, initialAvailableModels?: readonly CliModelDefinition[], refreshAvailableModels?: (force?: boolean) => Promise<readonly CliModelDefinition[]>, credentialHints?: CredentialHints, authResolver?: AuthResolver): Promise<void>;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { NodeId, RuntimeBootstrapRecord } from "@aria-cli/tools";
|
|
2
|
+
export type RuntimeBootstrapSource = RuntimeBootstrapRecord | (() => RuntimeBootstrapRecord | Promise<RuntimeBootstrapRecord>);
|
|
3
|
+
export declare function selectBootstrapTlsIdentity(bootstrap: RuntimeBootstrapRecord): string;
|
|
4
|
+
export declare function assertAttachableRuntimeBootstrap(expectedNodeId: NodeId, bootstrap: RuntimeBootstrapRecord): RuntimeBootstrapRecord;
|
|
5
|
+
export declare function loadControlReadyRuntimeBootstrap(bootstrapSource: RuntimeBootstrapSource): Promise<RuntimeBootstrapRecord>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { attachExistingLocalControlClient, attachLocalControlClient, createResilientAttachedClient, requestRuntimeSocketLease, resolveLocalControlClient, resolveLocalControlClientSync, type AttachedLocalControlClient, type ResilientAttachedClient, } from "./attached-local-control-client.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { LocalControlApi } from "@aria-cli/server/runtime/local-control-api";
|
|
2
|
+
import { type RuntimeBootstrapSource } from "./local-control-bootstrap.js";
|
|
3
|
+
export declare function createLocalControlClient(options: {
|
|
4
|
+
bootstrap: RuntimeBootstrapSource;
|
|
5
|
+
pollIntervalMs?: number;
|
|
6
|
+
attachedClientId?: string;
|
|
7
|
+
attachedClientAuthToken?: string;
|
|
8
|
+
}): LocalControlApi;
|
|
9
|
+
export { assertAttachableRuntimeBootstrap, type RuntimeBootstrapSource, } from "./local-control-bootstrap.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type PrincipalFingerprint, type SigningPublicKey, type TlsCaFingerprint } from "@aria-cli/tools/network-runtime";
|
|
2
|
+
export declare function isLocalCoordinationHost(hostname: string): boolean;
|
|
3
|
+
export declare function parseAndValidateCoordinationUrl(rawUrl: string): URL;
|
|
4
|
+
export declare function normalizeTlsCaFingerprintId(fingerprint: TlsCaFingerprint): string;
|
|
5
|
+
export declare function trustedCaPathForFingerprint(ariaDir: string, fingerprint: TlsCaFingerprint): string;
|
|
6
|
+
export declare function signingKeyFingerprintHex(signingPublicKeyB64: SigningPublicKey): PrincipalFingerprint;
|
|
7
|
+
export declare function assertResponderIdentityMatchesExpectedFingerprint(expectedFingerprint: PrincipalFingerprint | undefined, responderSigningPublicKeyB64: SigningPublicKey): void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI adapter over the real server-owned NodeRuntime.
|
|
3
|
+
*
|
|
4
|
+
* Machine-local attach/start semantics now route through the server-owned
|
|
5
|
+
* HostSupervisor. This file is only the CLI adapter layer.
|
|
6
|
+
*/
|
|
7
|
+
import type { MemoriaFactory } from "@aria-cli/aria";
|
|
8
|
+
import type { AuthResolver } from "@aria-cli/auth";
|
|
9
|
+
import type { ModelRouter } from "@aria-cli/models";
|
|
10
|
+
import { type HostSupervisorAttachment, type NodeRuntimeOptions, type NodeRuntimeMailbox, type HostSupervisorAttachInput } from "@aria-cli/server";
|
|
11
|
+
import type { NetworkManagerRef } from "@aria-cli/tools";
|
|
12
|
+
/** Minimal Mailbox interface for tunnel↔Mailbox wiring */
|
|
13
|
+
export type MailboxLike = NodeRuntimeMailbox;
|
|
14
|
+
export interface EnsureNetworkingServerOptions extends Omit<HostSupervisorAttachInput, "clientKind"> {
|
|
15
|
+
memoriaFactory?: MemoriaFactory;
|
|
16
|
+
router?: ModelRouter;
|
|
17
|
+
authResolver?: AuthResolver;
|
|
18
|
+
networkManager?: NetworkManagerRef;
|
|
19
|
+
port?: number;
|
|
20
|
+
mailboxRef?: NodeRuntimeOptions["mailboxRef"];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Start the ARIA networking server — shared between interactive and daemon modes.
|
|
24
|
+
* Returns null if this arion is already running (caller should use client mode).
|
|
25
|
+
*/
|
|
26
|
+
export declare function ensureNetworkingServer(opts: EnsureNetworkingServerOptions): Promise<(HostSupervisorAttachment["runtime"] & {
|
|
27
|
+
cleanup: () => Promise<void>;
|
|
28
|
+
}) | null>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SelectablePeer } from "./selectable-peer.js";
|
|
2
|
+
export declare function discoveredPeerIdentityKey(peer: SelectablePeer): string;
|
|
3
|
+
export declare function mergeDiscoveredPeersByIdentity(preferredPeers: readonly SelectablePeer[], additionalPeers: readonly SelectablePeer[]): SelectablePeer[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function createPollingSubscription<T>(loadOnce: () => Promise<T[]>, options?: {
|
|
2
|
+
pollIntervalMs: number;
|
|
3
|
+
initialAfterCreatedAt?: number;
|
|
4
|
+
getIdentityKey?: (item: T) => string | undefined;
|
|
5
|
+
getCursor?: (item: T) => number | undefined;
|
|
6
|
+
getVersionKey?: (item: T) => string | number;
|
|
7
|
+
}): AsyncIterable<T>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @aria/cli - Relaunch / self-restart infrastructure
|
|
3
|
+
*
|
|
4
|
+
* Implements the parent-child supervisor pattern (inspired by gemini-cli):
|
|
5
|
+
*
|
|
6
|
+
* Parent process (supervisor)
|
|
7
|
+
* └─ spawns child with ARIA_NO_RELAUNCH=true, stdio: inherit
|
|
8
|
+
* └─ loops: if child exits with RELAUNCH_EXIT_CODE → respawn
|
|
9
|
+
* └─ otherwise: propagate exit code and exit
|
|
10
|
+
*
|
|
11
|
+
* Child process (actual ARIA)
|
|
12
|
+
* └─ runs the Ink REPL normally
|
|
13
|
+
* └─ on restart: requestRelaunch() → process.exit(RELAUNCH_EXIT_CODE)
|
|
14
|
+
* └─ supervisor catches it and respawns
|
|
15
|
+
*
|
|
16
|
+
* This replaces the fragile "detached spawn + kill self" approach
|
|
17
|
+
* with a reliable supervisor loop that inherits the terminal properly.
|
|
18
|
+
*/
|
|
19
|
+
export { NO_RELAUNCH_ENV, RELAUNCH_EXIT_CODE, RESUME_ARION_ENV, RESUME_SESSION_ENV, RESTART_KIND_ENV, } from "@aria-cli/types";
|
|
20
|
+
export interface RelaunchMarker {
|
|
21
|
+
sessionId: string | null;
|
|
22
|
+
arionName: string;
|
|
23
|
+
pid: number;
|
|
24
|
+
timestamp: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function writeRelaunchMarker(marker: RelaunchMarker): void;
|
|
27
|
+
export declare function readRelaunchMarker(pid?: number): RelaunchMarker | null;
|
|
28
|
+
export declare function clearRelaunchMarker(pid?: number): void;
|
|
29
|
+
export interface SuperviseOptions {
|
|
30
|
+
beforeSpawn?: () => void | Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
export declare function setPendingResumeSessionId(sessionId: string | null | undefined): void;
|
|
33
|
+
export declare function getPendingResumeSessionId(): string | null;
|
|
34
|
+
export declare function setPendingArionName(name: string): void;
|
|
35
|
+
export declare function getPendingArionName(): string;
|
|
36
|
+
/**
|
|
37
|
+
* Rebuild workspace before relaunch (dev workflow).
|
|
38
|
+
*
|
|
39
|
+
* This is best-effort and only runs when a pnpm workspace root is detected.
|
|
40
|
+
*/
|
|
41
|
+
export declare function rebuildWorkspaceIfPresent(startDir?: string): Promise<{
|
|
42
|
+
attempted: boolean;
|
|
43
|
+
root?: string;
|
|
44
|
+
durationMs?: number;
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* Returns true if we are already running inside a supervised child process.
|
|
48
|
+
*/
|
|
49
|
+
export declare function isChildProcess(): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Trigger a relaunch from the child process.
|
|
52
|
+
* Simply exits with the magic code — the parent supervisor handles the rest.
|
|
53
|
+
*/
|
|
54
|
+
export declare function requestRelaunch(reason?: string, resumeSessionId?: string | null): Promise<never>;
|
|
55
|
+
export declare function supervise(scriptPath: string, scriptArgs: string[], nodeArgs?: string[], options?: SuperviseOptions): Promise<never>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Release notes shown in the TUI startup banner.
|
|
3
|
+
* Update this file each release to keep "What's New" accurate.
|
|
4
|
+
*
|
|
5
|
+
* Guidelines:
|
|
6
|
+
* - Only user-facing features — no bug fixes, refactors, or internals
|
|
7
|
+
* - Lead with the verb / action the user can take
|
|
8
|
+
* - Keep it to 4-5 items max
|
|
9
|
+
*/
|
|
10
|
+
export declare const CLI_VERSION: string;
|
|
11
|
+
export declare const WHATS_NEW: string[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface ReplCleanupResources {
|
|
2
|
+
release?: () => void | Promise<void>;
|
|
3
|
+
sessionHistory?: {
|
|
4
|
+
close?: () => void;
|
|
5
|
+
} | null;
|
|
6
|
+
pool?: {
|
|
7
|
+
closeAll?: () => Promise<void>;
|
|
8
|
+
} | null;
|
|
9
|
+
aria?: {
|
|
10
|
+
shutdown?: () => Promise<void>;
|
|
11
|
+
} | null;
|
|
12
|
+
warn?: (message: string) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Run REPL work and ALWAYS release process-pinning resources on exit.
|
|
16
|
+
*
|
|
17
|
+
* This protects /exit from hanging due to open SQLite handles or background
|
|
18
|
+
* worker timers behind Memoria instances.
|
|
19
|
+
*/
|
|
20
|
+
export declare function withReplCleanup<T>(run: () => Promise<T>, getResources: () => ReplCleanupResources): Promise<T>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { NodeId, PrincipalFingerprint, TlsCaFingerprint } from "@aria-cli/tools";
|
|
2
|
+
export interface SelectablePeer {
|
|
3
|
+
displayNameSnapshot: string;
|
|
4
|
+
nodeId: NodeId;
|
|
5
|
+
host?: string;
|
|
6
|
+
port?: number;
|
|
7
|
+
principalFingerprint?: PrincipalFingerprint;
|
|
8
|
+
version: string;
|
|
9
|
+
tlsCaFingerprint?: TlsCaFingerprint;
|
|
10
|
+
transport?: "lan" | "wan";
|
|
11
|
+
status?: "discovered" | "connected";
|
|
12
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Arion Session Manager
|
|
3
|
+
* Manages the primary arion, active arions, and shared conversation history.
|
|
4
|
+
*/
|
|
5
|
+
import type { Arion, ArionManager, MemoriaLike, ContributionType } from "@aria-cli/aria";
|
|
6
|
+
import type { IMemoria, ToolCall } from "@aria-cli/types";
|
|
7
|
+
import { Room, type ModelRouterLike } from "@aria-cli/aria";
|
|
8
|
+
export interface RespondingArion {
|
|
9
|
+
arion: Arion;
|
|
10
|
+
isAddressed: boolean;
|
|
11
|
+
assessment?: {
|
|
12
|
+
confidence: number;
|
|
13
|
+
contributionType: ContributionType;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface Message {
|
|
17
|
+
role: "user" | "assistant" | "system" | "tool";
|
|
18
|
+
content: string;
|
|
19
|
+
arion?: string;
|
|
20
|
+
toolCallId?: string;
|
|
21
|
+
toolCalls?: ToolCall[];
|
|
22
|
+
}
|
|
23
|
+
export interface SessionConfig {
|
|
24
|
+
manager: ArionManager;
|
|
25
|
+
router: ModelRouterLike;
|
|
26
|
+
memoria?: MemoriaLike;
|
|
27
|
+
onArionRest?: (arion: Arion) => Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
export declare class ArionSession {
|
|
30
|
+
private room;
|
|
31
|
+
private history;
|
|
32
|
+
private manager;
|
|
33
|
+
readonly router: ModelRouterLike;
|
|
34
|
+
private memoria?;
|
|
35
|
+
private contributionGate;
|
|
36
|
+
private initialized;
|
|
37
|
+
constructor(config: SessionConfig);
|
|
38
|
+
/**
|
|
39
|
+
* Initialize the session with the default or specified arion as primary.
|
|
40
|
+
*/
|
|
41
|
+
initialize(activeArionName?: string): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Switch to a different arion as primary.
|
|
44
|
+
* Wakes resting arions automatically.
|
|
45
|
+
*/
|
|
46
|
+
become(name: string): Promise<Arion>;
|
|
47
|
+
/**
|
|
48
|
+
* Activate an arion (add to room without making primary).
|
|
49
|
+
* Wakes resting arions automatically.
|
|
50
|
+
*/
|
|
51
|
+
activate(name: string): Promise<Arion>;
|
|
52
|
+
/**
|
|
53
|
+
* Dismiss an arion from the room (send to rest).
|
|
54
|
+
* Cannot dismiss the primary arion.
|
|
55
|
+
*/
|
|
56
|
+
dismiss(name: string): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Get the current primary arion.
|
|
59
|
+
*/
|
|
60
|
+
getPrimary(): Arion | null;
|
|
61
|
+
/**
|
|
62
|
+
* Get the backing room instance for handoff-aware RunSession wiring.
|
|
63
|
+
*/
|
|
64
|
+
getRoom(): Room;
|
|
65
|
+
/**
|
|
66
|
+
* Get all active arions in the room.
|
|
67
|
+
*/
|
|
68
|
+
getActiveArions(): Arion[];
|
|
69
|
+
/**
|
|
70
|
+
* Check if an arion is currently active in the room.
|
|
71
|
+
*/
|
|
72
|
+
isActive(name: string): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Add a message to the conversation history.
|
|
75
|
+
*/
|
|
76
|
+
addToHistory(message: Message): void;
|
|
77
|
+
/**
|
|
78
|
+
* Get a copy of the conversation history.
|
|
79
|
+
*/
|
|
80
|
+
getHistory(): Message[];
|
|
81
|
+
/**
|
|
82
|
+
* Clear the conversation history.
|
|
83
|
+
*/
|
|
84
|
+
clearHistory(): void;
|
|
85
|
+
/**
|
|
86
|
+
* Parse a message for @mentions and dismissals.
|
|
87
|
+
*/
|
|
88
|
+
parseMessage(input: string): import("@aria-cli/aria").ParsedMessage;
|
|
89
|
+
/**
|
|
90
|
+
* Determine which arions should respond to a message.
|
|
91
|
+
* Includes addressed arions and evaluates volunteers from other active arions.
|
|
92
|
+
* Returns assessment info for volunteers to display contribution type.
|
|
93
|
+
*/
|
|
94
|
+
getRespondingArions(input: string, addressedArions: Arion[], previousResponses: Array<{
|
|
95
|
+
arion: string;
|
|
96
|
+
content: string;
|
|
97
|
+
}>): Promise<RespondingArion[]>;
|
|
98
|
+
/**
|
|
99
|
+
* Get the Memoria instance for a specific arion.
|
|
100
|
+
* Returns null if arion has no Memoria configured.
|
|
101
|
+
*/
|
|
102
|
+
getArionMemoria(arion: Arion): Promise<IMemoria | null>;
|
|
103
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slash command parsing utilities.
|
|
3
|
+
*
|
|
4
|
+
* Pure functions for extracting command names and arguments from
|
|
5
|
+
* user input like "/remember my note" or "/help".
|
|
6
|
+
*
|
|
7
|
+
* These are intentionally kept separate from React components
|
|
8
|
+
* so they can be easily tested and reused.
|
|
9
|
+
*/
|
|
10
|
+
export interface SlashCommand {
|
|
11
|
+
/** The command name (without the leading slash) */
|
|
12
|
+
command: string;
|
|
13
|
+
/** The arguments after the command name, trimmed */
|
|
14
|
+
args: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Parse a slash command from user input.
|
|
18
|
+
* Returns null if the input is not a slash command.
|
|
19
|
+
*
|
|
20
|
+
* Examples:
|
|
21
|
+
* "/remember my note" -> { command: "remember", args: "my note" }
|
|
22
|
+
* "/help" -> { command: "help", args: "" }
|
|
23
|
+
* "hello world" -> null
|
|
24
|
+
* "" -> null
|
|
25
|
+
*/
|
|
26
|
+
export declare function parseSlashCommand(input: string): SlashCommand | null;
|
|
27
|
+
/** List of built-in slash commands recognized by handleCommand */
|
|
28
|
+
export declare const BUILTIN_COMMANDS: readonly ["help", "arions", "exit", "hatch", "remember", "recall", "recall_knowledge", "send", "model", "become", "rest", "wake", "memories", "forget", "clear", "autonomy", "resume", "fork", "restart", "login", "logout", "terminal-setup", "theme", "invite", "join"];
|
|
29
|
+
export type BuiltinCommandName = (typeof BUILTIN_COMMANDS)[number];
|
|
30
|
+
export declare function canonicalizeBuiltinCommand(command: string): BuiltinCommandName | null;
|
|
31
|
+
/**
|
|
32
|
+
* Check whether a parsed command name is a known built-in command.
|
|
33
|
+
*/
|
|
34
|
+
export declare function isBuiltinCommand(command: string): command is BuiltinCommandName;
|
package/dist/sounds.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Warcraft II sound notifications for ARIA.
|
|
3
|
+
*
|
|
4
|
+
* Maps RunEvent lifecycle events to thematic Warcraft II sounds.
|
|
5
|
+
* Always on — no opt-in, no opt-out.
|
|
6
|
+
*
|
|
7
|
+
* Sound files live in `.comms/sounds/wav/` (repo root).
|
|
8
|
+
* Uses macOS `afplay` for non-blocking playback.
|
|
9
|
+
*/
|
|
10
|
+
/** Minimal event shape — accepts both RunEvent and RuntimeRunEvent without tight coupling. */
|
|
11
|
+
interface SoundEvent {
|
|
12
|
+
type: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
input?: unknown;
|
|
15
|
+
result?: unknown;
|
|
16
|
+
}
|
|
17
|
+
export declare function setEnabled(value: boolean): void;
|
|
18
|
+
export declare function isEnabled(): boolean;
|
|
19
|
+
/** Call once when the CLI session starts. "Ready to work!" */
|
|
20
|
+
export declare function onSessionStart(): void;
|
|
21
|
+
/** Call once when the CLI session ends. */
|
|
22
|
+
export declare function onSessionEnd(): void;
|
|
23
|
+
/** Call when the user submits a prompt. Plays annoyance escalation. */
|
|
24
|
+
export declare function onPromptSubmit(): void;
|
|
25
|
+
/** Call when the runner finishes responding. Plays completion sound. */
|
|
26
|
+
export declare function onResponseComplete(): void;
|
|
27
|
+
/** Call for every RunEvent during streaming. Handles tool sounds. */
|
|
28
|
+
export declare function onRunEvent(event: SoundEvent): void;
|
|
29
|
+
/** Check if sounds are available (WAV directory found). */
|
|
30
|
+
export declare function isSoundAvailable(): boolean;
|
|
31
|
+
export {};
|