@aria-cli/cli 1.0.19 → 1.0.37
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/README.md +32 -46
- package/bin/aria.mjs +5718 -0
- package/package.json +33 -51
- package/bin/aria-dev.js +0 -2
- package/bin/aria.js +0 -14
- package/bin/install-owner-lease.d.ts +0 -8
- package/bin/install-owner-lease.js +0 -1
- package/dist/.aria-build-stamp.json +0 -4
- package/dist/attached-local-control-client.d.ts +0 -90
- package/dist/bootstrap-local-control-client.d.ts +0 -1
- package/dist/capability-aware-method-proxy.d.ts +0 -1
- package/dist/cli-context.d.ts +0 -31
- package/dist/cli-context.js +0 -1
- package/dist/commands/arions.d.ts +0 -14
- package/dist/commands/auth.d.ts +0 -27
- package/dist/commands/daemon.d.ts +0 -31
- package/dist/commands/definitions.d.ts +0 -19
- package/dist/commands/index.d.ts +0 -13
- package/dist/commands/index.js +0 -356
- package/dist/commands/login-handler.d.ts +0 -108
- package/dist/commands/logout-handler.d.ts +0 -24
- package/dist/commands/memory-handlers.d.ts +0 -15
- package/dist/commands/pairing.d.ts +0 -2
- package/dist/commands/peer-message-handler.d.ts +0 -7
- package/dist/commands/runtime-cutover-reset-command.d.ts +0 -2
- package/dist/commands/runtime-cutover-reset.d.ts +0 -26
- package/dist/commands/terminal-setup.d.ts +0 -3
- package/dist/config/aria-config.d.ts +0 -50
- package/dist/config/index.d.ts +0 -4
- package/dist/config/loader.d.ts +0 -17
- package/dist/config.d.ts +0 -53
- package/dist/config.js +0 -1
- package/dist/daemon-info.d.ts +0 -17
- package/dist/ensure-daemon.d.ts +0 -21
- package/dist/ensure-daemon.js +0 -4
- package/dist/event-loop-watchdog.d.ts +0 -31
- package/dist/headless/auth-orchestrator.d.ts +0 -19
- package/dist/headless/auth-service.d.ts +0 -15
- package/dist/headless/bootstrap-fast-path.d.ts +0 -12
- package/dist/headless/call-command.d.ts +0 -8
- package/dist/headless/daemon-service.d.ts +0 -14
- package/dist/headless/hook-actions.d.ts +0 -40
- package/dist/headless/hook-service.d.ts +0 -8
- package/dist/headless/kernel-services.d.ts +0 -8
- package/dist/headless/kernel.d.ts +0 -118
- package/dist/headless/operations/arion.d.ts +0 -3
- package/dist/headless/operations/auth.d.ts +0 -4
- package/dist/headless/operations/client.d.ts +0 -2
- package/dist/headless/operations/config.d.ts +0 -3
- package/dist/headless/operations/daemon.d.ts +0 -3
- package/dist/headless/operations/hook.d.ts +0 -3
- package/dist/headless/operations/index.d.ts +0 -10
- package/dist/headless/operations/memory.d.ts +0 -3
- package/dist/headless/operations/message.d.ts +0 -2
- package/dist/headless/operations/model.d.ts +0 -3
- package/dist/headless/operations/peer.d.ts +0 -2
- package/dist/headless/operations/run.d.ts +0 -3
- package/dist/headless/operations/session.d.ts +0 -74
- package/dist/headless/operations/subscription.d.ts +0 -2
- package/dist/headless/operations/system.d.ts +0 -3
- package/dist/headless/operations/utils.d.ts +0 -5
- package/dist/headless/run-orchestrator.d.ts +0 -38
- package/dist/headless/stdio-server.d.ts +0 -4
- package/dist/history/SessionHistory.d.ts +0 -200
- package/dist/history/conversation-message.d.ts +0 -181
- package/dist/history/index.d.ts +0 -8
- package/dist/history/index.js +0 -321
- package/dist/history/jsonl-replay.d.ts +0 -38
- package/dist/history/repair-tool-pairing.d.ts +0 -14
- package/dist/history/turn-accumulator.d.ts +0 -85
- package/dist/index.d.ts +0 -6
- package/dist/index.js +0 -503
- package/dist/ink-repl.d.ts +0 -32
- package/dist/ink-repl.js +0 -491
- package/dist/local-control-bootstrap.d.ts +0 -5
- package/dist/local-control-client.d.ts +0 -1
- package/dist/local-control-client.js +0 -4
- package/dist/local-control-error-reporting.d.ts +0 -6
- package/dist/local-control-http-client.d.ts +0 -9
- package/dist/network-security.d.ts +0 -7
- package/dist/networking-server.d.ts +0 -28
- package/dist/peer-identity.d.ts +0 -3
- package/dist/polling-subscription.d.ts +0 -7
- package/dist/relaunch.d.ts +0 -55
- package/dist/release-notes.d.ts +0 -11
- package/dist/repl-cleanup.d.ts +0 -20
- package/dist/repl-cleanup.js +0 -1
- package/dist/selectable-client.d.ts +0 -7
- package/dist/selectable-peer.d.ts +0 -12
- package/dist/session.d.ts +0 -103
- package/dist/session.js +0 -1
- package/dist/slash-commands.d.ts +0 -34
- package/dist/sounds.d.ts +0 -31
- package/dist/ui/App.d.ts +0 -288
- package/dist/ui/components/AnthropicMethodPicker.d.ts +0 -9
- package/dist/ui/components/ArionPrompt.d.ts +0 -8
- package/dist/ui/components/AutocompleteDropdown.d.ts +0 -9
- package/dist/ui/components/AutonomySelector.d.ts +0 -12
- package/dist/ui/components/Banner.d.ts +0 -9
- package/dist/ui/components/ConversationHistory.d.ts +0 -59
- package/dist/ui/components/CopilotDeviceLoginFlow.d.ts +0 -15
- package/dist/ui/components/CopilotSourcePicker.d.ts +0 -13
- package/dist/ui/components/Cost.d.ts +0 -8
- package/dist/ui/components/CustomSelect/option-map.d.ts +0 -15
- package/dist/ui/components/CustomSelect/select-option.d.ts +0 -20
- package/dist/ui/components/CustomSelect/select.d.ts +0 -55
- package/dist/ui/components/CustomSelect/use-select-state.d.ts +0 -99
- package/dist/ui/components/CustomSelect/use-select.d.ts +0 -14
- package/dist/ui/components/ErrorDisplay.d.ts +0 -26
- package/dist/ui/components/FallbackToolUseRejectedMessage.d.ts +0 -2
- package/dist/ui/components/FileEditToolUpdatedMessage.d.ts +0 -9
- package/dist/ui/components/HandoffMarker.d.ts +0 -17
- package/dist/ui/components/HighlightedCode.d.ts +0 -7
- package/dist/ui/components/InputArea.d.ts +0 -17
- package/dist/ui/components/Message.d.ts +0 -16
- package/dist/ui/components/OAuthLoginFlow.d.ts +0 -25
- package/dist/ui/components/OutputTruncation.d.ts +0 -16
- package/dist/ui/components/PermissionPrompt.d.ts +0 -22
- package/dist/ui/components/PipelineTimingPanel.d.ts +0 -13
- package/dist/ui/components/ProviderMethodPicker.d.ts +0 -16
- package/dist/ui/components/ProviderPicker.d.ts +0 -15
- package/dist/ui/components/RenderItemView.d.ts +0 -18
- package/dist/ui/components/Spinner.d.ts +0 -3
- package/dist/ui/components/StatusBar.d.ts +0 -78
- package/dist/ui/components/StreamingIndicator.d.ts +0 -11
- package/dist/ui/components/StructuredDiff.d.ts +0 -20
- package/dist/ui/components/TextInputOverlay.d.ts +0 -9
- package/dist/ui/components/ThinkingBlock.d.ts +0 -53
- package/dist/ui/components/ToolCost.d.ts +0 -8
- package/dist/ui/components/ToolExecution.d.ts +0 -13
- package/dist/ui/components/ToolHeader.d.ts +0 -10
- package/dist/ui/components/ToolRenderLayoutContext.d.ts +0 -10
- package/dist/ui/components/ToolResultWrapper.d.ts +0 -6
- package/dist/ui/components/ToolUseLoader.d.ts +0 -10
- package/dist/ui/components/TraceWaterfall.d.ts +0 -56
- package/dist/ui/components/index.d.ts +0 -29
- package/dist/ui/components/messages/AssistantTextMessage.d.ts +0 -13
- package/dist/ui/components/messages/UserImageMessage.d.ts +0 -8
- package/dist/ui/components/messages/UserTextMessage.d.ts +0 -13
- package/dist/ui/components/overlays/ArionSelector.d.ts +0 -18
- package/dist/ui/components/overlays/ClientSelector.d.ts +0 -7
- package/dist/ui/components/overlays/CommandPalette.d.ts +0 -14
- package/dist/ui/components/overlays/InviteShareOverlay.d.ts +0 -7
- package/dist/ui/components/overlays/JoinInviteOverlay.d.ts +0 -6
- package/dist/ui/components/overlays/MemoryBrowser.d.ts +0 -17
- package/dist/ui/components/overlays/MessageSelector.d.ts +0 -20
- package/dist/ui/components/overlays/ModelSelector.d.ts +0 -17
- package/dist/ui/components/overlays/PairRequestOverlay.d.ts +0 -19
- package/dist/ui/components/overlays/PeerSelector.d.ts +0 -14
- package/dist/ui/components/overlays/SessionSelector.d.ts +0 -11
- package/dist/ui/components/overlays/ThemeSelector.d.ts +0 -22
- package/dist/ui/components/overlays/index.d.ts +0 -13
- package/dist/ui/components/permissions/BashPermissionRequest/BashPermissionRequest.d.ts +0 -9
- package/dist/ui/components/permissions/FallbackPermissionRequest.d.ts +0 -9
- package/dist/ui/components/permissions/FileEditPermissionRequest/FileEditPermissionRequest.d.ts +0 -9
- package/dist/ui/components/permissions/FileEditPermissionRequest/FileEditToolDiff.d.ts +0 -11
- package/dist/ui/components/permissions/FileWritePermissionRequest/FileWritePermissionRequest.d.ts +0 -9
- package/dist/ui/components/permissions/FileWritePermissionRequest/FileWriteToolDiff.d.ts +0 -9
- package/dist/ui/components/permissions/FilesystemPermissionRequest/FilesystemPermissionRequest.d.ts +0 -5
- package/dist/ui/components/permissions/PermissionRequest.d.ts +0 -52
- package/dist/ui/components/permissions/PermissionRequestTitle.d.ts +0 -13
- package/dist/ui/components/permissions/hooks.d.ts +0 -10
- package/dist/ui/components/permissions/toolUseOptions.d.ts +0 -10
- package/dist/ui/components/permissions/utils.d.ts +0 -6
- package/dist/ui/components/text-input/Cursor.d.ts +0 -58
- package/dist/ui/components/text-input/TextInput.d.ts +0 -98
- package/dist/ui/components/text-input/imagePaste.d.ts +0 -2
- package/dist/ui/components/text-input/index.d.ts +0 -6
- package/dist/ui/components/text-input/useDoublePress.d.ts +0 -2
- package/dist/ui/components/text-input/useTextInput.d.ts +0 -34
- package/dist/ui/components/tool-types.d.ts +0 -28
- package/dist/ui/constants/figures.d.ts +0 -1
- package/dist/ui/constants/index.d.ts +0 -1
- package/dist/ui/display-mode.d.ts +0 -62
- package/dist/ui/display-policy.d.ts +0 -3
- package/dist/ui/hooks/index.d.ts +0 -4
- package/dist/ui/hooks/useCommandAutocomplete.d.ts +0 -28
- package/dist/ui/hooks/useDoublePress.d.ts +0 -13
- package/dist/ui/hooks/useIndicatorState.d.ts +0 -3
- package/dist/ui/hooks/useInterval.d.ts +0 -6
- package/dist/ui/hooks/useKeyboardShortcuts.d.ts +0 -17
- package/dist/ui/hooks/usePeerMessages.d.ts +0 -26
- package/dist/ui/hooks/useTerminalSize.d.ts +0 -6
- package/dist/ui/hooks/useUnifiedMessages.d.ts +0 -83
- package/dist/ui/indicator-state.d.ts +0 -46
- package/dist/ui/markdown/highlight.d.ts +0 -8
- package/dist/ui/markdown/index.d.ts +0 -16
- package/dist/ui/markdown/tokenizer.d.ts +0 -17
- package/dist/ui/render-item.d.ts +0 -70
- package/dist/ui/screens/REPL.d.ts +0 -288
- package/dist/ui/status-line.d.ts +0 -32
- package/dist/ui/theme/index.d.ts +0 -8
- package/dist/ui/theme/themes/claude-dark-daltonized.d.ts +0 -2
- package/dist/ui/theme/themes/claude-dark.d.ts +0 -2
- package/dist/ui/theme/themes/claude-light-daltonized.d.ts +0 -2
- package/dist/ui/theme/themes/claude-light.d.ts +0 -2
- package/dist/ui/theme/themes/dark-accessible.d.ts +0 -2
- package/dist/ui/theme/themes/dark.d.ts +0 -2
- package/dist/ui/theme/themes/light-accessible.d.ts +0 -2
- package/dist/ui/theme/themes/light.d.ts +0 -2
- package/dist/ui/theme/types.d.ts +0 -51
- package/dist/ui/theme.d.ts +0 -51
- package/dist/ui/to-render-items.d.ts +0 -7
- package/dist/ui/tools/AgentTool/index.d.ts +0 -8
- package/dist/ui/tools/ArchitectTool/index.d.ts +0 -10
- package/dist/ui/tools/AskUserTool/index.d.ts +0 -19
- package/dist/ui/tools/BashTool/BashToolResultMessage.d.ts +0 -13
- package/dist/ui/tools/BashTool/OutputLine.d.ts +0 -6
- package/dist/ui/tools/BashTool/index.d.ts +0 -8
- package/dist/ui/tools/BrowseTool/index.d.ts +0 -20
- package/dist/ui/tools/BrowserTool/index.d.ts +0 -25
- package/dist/ui/tools/CbmTool/index.d.ts +0 -81
- package/dist/ui/tools/CheckDelegationTool/index.d.ts +0 -23
- package/dist/ui/tools/CheckMessagesTool/index.d.ts +0 -8
- package/dist/ui/tools/CreateQuipTool/index.d.ts +0 -10
- package/dist/ui/tools/CreateSkillTool/index.d.ts +0 -13
- package/dist/ui/tools/CreateToolTool/index.d.ts +0 -10
- package/dist/ui/tools/DelegateRemoteTool/index.d.ts +0 -22
- package/dist/ui/tools/DeployTool/index.d.ts +0 -24
- package/dist/ui/tools/FffTool/index.d.ts +0 -17
- package/dist/ui/tools/FileEditTool/index.d.ts +0 -10
- package/dist/ui/tools/FileReadTool/index.d.ts +0 -10
- package/dist/ui/tools/FileWriteTool/index.d.ts +0 -10
- package/dist/ui/tools/FrgTool/index.d.ts +0 -17
- package/dist/ui/tools/GetThreadTool/index.d.ts +0 -10
- package/dist/ui/tools/GlobTool/index.d.ts +0 -11
- package/dist/ui/tools/GrepTool/index.d.ts +0 -12
- package/dist/ui/tools/HatchArionTool/index.d.ts +0 -20
- package/dist/ui/tools/LearnSkillTool/index.d.ts +0 -13
- package/dist/ui/tools/LearnTool/index.d.ts +0 -15
- package/dist/ui/tools/LearnToolTool/index.d.ts +0 -14
- package/dist/ui/tools/ListClientsTool/index.d.ts +0 -10
- package/dist/ui/tools/LspTool/index.d.ts +0 -11
- package/dist/ui/tools/MCPTool/index.d.ts +0 -11
- package/dist/ui/tools/ManageNetworkTool/index.d.ts +0 -28
- package/dist/ui/tools/MemoryReadTool/index.d.ts +0 -8
- package/dist/ui/tools/MemoryWriteTool/index.d.ts +0 -6
- package/dist/ui/tools/NotebookEditTool/index.d.ts +0 -19
- package/dist/ui/tools/NotebookReadTool/index.d.ts +0 -12
- package/dist/ui/tools/OutlookReadTool/index.d.ts +0 -10
- package/dist/ui/tools/OutlookReplyTool/index.d.ts +0 -10
- package/dist/ui/tools/OutlookSendTool/index.d.ts +0 -10
- package/dist/ui/tools/PauseDelegationTool/index.d.ts +0 -20
- package/dist/ui/tools/ProbeTool/index.d.ts +0 -26
- package/dist/ui/tools/ProcessTool/index.d.ts +0 -29
- package/dist/ui/tools/QuestListTool/index.d.ts +0 -24
- package/dist/ui/tools/QuestReportTool/index.d.ts +0 -27
- package/dist/ui/tools/QuestUpdateTool/index.d.ts +0 -24
- package/dist/ui/tools/QuipCommentTool/index.d.ts +0 -23
- package/dist/ui/tools/QuipReadTool/index.d.ts +0 -26
- package/dist/ui/tools/RestArionTool/index.d.ts +0 -19
- package/dist/ui/tools/RestartTool/index.d.ts +0 -20
- package/dist/ui/tools/ResumeDelegationTool/index.d.ts +0 -21
- package/dist/ui/tools/RetireArionTool/index.d.ts +0 -19
- package/dist/ui/tools/RgTool/index.d.ts +0 -44
- package/dist/ui/tools/SearchKnowledgeTool/index.d.ts +0 -31
- package/dist/ui/tools/SearchMessagesTool/index.d.ts +0 -10
- package/dist/ui/tools/SelfDiagnoseTool/index.d.ts +0 -11
- package/dist/ui/tools/SendMessageTool/index.d.ts +0 -8
- package/dist/ui/tools/SerenaTool/index.d.ts +0 -18
- package/dist/ui/tools/SessionHistoryTool/index.d.ts +0 -32
- package/dist/ui/tools/SgTool/index.d.ts +0 -8
- package/dist/ui/tools/SlackReactTool/index.d.ts +0 -10
- package/dist/ui/tools/SlackReadTool/index.d.ts +0 -10
- package/dist/ui/tools/SlackSendTool/index.d.ts +0 -10
- package/dist/ui/tools/SpawnWorkerTool/index.d.ts +0 -18
- package/dist/ui/tools/StickerRequestTool/index.d.ts +0 -6
- package/dist/ui/tools/ThinkTool/index.d.ts +0 -8
- package/dist/ui/tools/UgTool/index.d.ts +0 -47
- package/dist/ui/tools/UseSkillTool/index.d.ts +0 -17
- package/dist/ui/tools/WakeArionTool/index.d.ts +0 -19
- package/dist/ui/tools/WebFetchTool/index.d.ts +0 -20
- package/dist/ui/tools/WebSearchTool/index.d.ts +0 -21
- package/dist/ui/tools/lsTool/index.d.ts +0 -12
- package/dist/ui/tools/registry.d.ts +0 -15
- package/dist/ui/tools/tool-renderer.d.ts +0 -24
- package/dist/ui/tools/truncation.d.ts +0 -6
- package/dist/ui/types/anthropic.d.ts +0 -19
- package/dist/ui/types/index.d.ts +0 -3
- package/dist/ui/types/message.d.ts +0 -19
- package/dist/ui/types/tool.d.ts +0 -17
- package/dist/ui/utils/array.d.ts +0 -1
- package/dist/ui/utils/cursor.d.ts +0 -28
- package/dist/ui/utils/diff.d.ts +0 -24
- package/dist/ui/utils/format.d.ts +0 -3
- package/dist/ui/utils/fuzzy.d.ts +0 -11
- package/dist/ui/utils/index.d.ts +0 -9
- package/dist/ui/utils/keys.d.ts +0 -6
- package/dist/ui/utils/patch.d.ts +0 -8
- package/dist/ui/utils/risk.d.ts +0 -14
- package/dist/ui/utils/terminal-image.d.ts +0 -18
- package/dist/ui/utils/validation.d.ts +0 -8
- package/dist/ui/verb-pairs.d.ts +0 -20
- package/dist/ui.d.ts +0 -70
|
@@ -1,5 +0,0 @@
|
|
|
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>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { attachExistingLocalControlClient, attachLocalControlClient, createResilientAttachedClient, requestRuntimeSocketLease, resolveLocalControlClient, resolveLocalControlClientSync, type AttachedLocalControlClient, type ResilientAttachedClient, } from "./attached-local-control-client.js";
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{createRequire as QR}from"node:module";var _R=Object.defineProperty;var wR=(R)=>R;function zR(R,B){this[R]=wR.bind(null,B)}var E=(R,B)=>{for(var $ in B)_R(R,$,{get:B[$],enumerable:!0,configurable:!0,set:zR.bind(B,$)})};var A=(R,B)=>()=>(R&&(B=R(R=0)),B);var M=QR(import.meta.url);var ZR={};E(ZR,{saveConfig:()=>j,loadConfig:()=>YR,loadAndMigrateConfig:()=>g,getConfigPath:()=>I,getAriaDir:()=>D});import*as V from"fs";import*as m from"os";import{getModelById as UR,getModelByShortName as XR,isValidTier as C}from"@aria-cli/models";import{log as T}from"@aria-cli/types";function D(){if(process.env.ARIA_HOME)return process.env.ARIA_HOME;return`${process.env.HOME||m.homedir()}/.aria`}function I(){return`${D()}/config.json`}function g(){try{let R=I();if(V.existsSync(R)){let B=JSON.parse(V.readFileSync(R,"utf-8"));try{if(B.defaultModel&&!B.preferredTier){let U=UR(B.defaultModel)||XR(B.defaultModel);if(!U)T.warn(`Unknown model "${B.defaultModel}" migrated to balanced tier (Sonnet 4.5)`);let X=U?.tier||"balanced";B.preferredTier=C(X)?X:"balanced",delete B.defaultModel,j(B)}if(B.preferredTier!==void 0&&!C(B.preferredTier))T.warn(`Invalid tier "${B.preferredTier}" corrected to balanced tier`),B.preferredTier="balanced",j(B);let $=!1;if(!B.awsRegion&&process.env.AWS_REGION)B.awsRegion=process.env.AWS_REGION,$=!0;if(!B.awsProfile&&process.env.AWS_PROFILE)B.awsProfile=process.env.AWS_PROFILE,$=!0;if($)j(B)}catch($){T.warn("Config migration failed, using config as-is:",$ instanceof Error?$.message:$)}return B}}catch(R){T.warn("[Config] Failed to load config file:",R)}return{}}function j(R){let B=D();if(!V.existsSync(B))V.mkdirSync(B,{recursive:!0});V.writeFileSync(I(),JSON.stringify(R,null,2),"utf-8")}var YR;var d=A(()=>{YR=g});import{RuntimeBootstrapRecordSchema as vR}from"@aria-cli/tools";function yR(R){return R==="control_ready"||R==="network_ready"||R==="mesh_ready"}function c(R,B){if(B.nodeId!==R)throw Error(`[local-control-client] Runtime bootstrap node mismatch for ${R}: received ${B.nodeId}`);if(!yR(B.phase))throw Error(`[local-control-client] Runtime bootstrap for ${R} is not attachable (phase=${B.phase})`);return B}var a=()=>{};async function FR(){let R=D();if(u?.ariaDir===R)return u.handler;let{CentralErrorHandler:B}=await import("@aria-cli/aria/error-handler"),$=new B({ariaDir:R});return u={ariaDir:R,handler:$},$}async function l(R,B){await(await FR()).report(R,{workingDir:process.cwd(),providerState:{lastProvider:"trusted-local-control",lastModel:B.endpoint,...typeof B.responseStatus==="number"?{lastStatusCode:B.responseStatus}:{}},configSnapshot:{transport:B.transport,endpoint:B.endpoint,...typeof B.responseStatus==="number"?{responseStatus:B.responseStatus}:{},payload:B.payload}})}var u;var p=A(()=>{d()});var SR={};E(SR,{resolveLocalControlClientSync:()=>f,resolveLocalControlClient:()=>v,requestRuntimeSocketLease:()=>L,createResilientAttachedClient:()=>S,attachLocalControlClient:()=>k,attachExistingLocalControlClient:()=>h});import*as t from"node:net";import{appendFileSync as GR,mkdirSync as bR}from"node:fs";import{join as o}from"node:path";import{randomUUID as JR}from"node:crypto";import{createRuntimeSocketAttachedLocalControlClient as e,createRuntimeSocketLocalControlClient as VR,createTrustedRuntimeError as WR,AttachedClientLeaseGrantSchema as qR,LocalControlSocketAttachClientRequestSchema as OR,LocalControlSocketAttachClientResponseSchema as PR,LocalControlSocketRequestSchema as AR,LocalControlSocketResponseSchema as DR}from"@aria-cli/tools";async function RR(R){await new Promise((B)=>setTimeout(B,Math.max(R,0)))}function TR(){return i??=import("@aria-cli/server/runtime/host-supervisor"),i}function jR(){return s??=import("@aria-cli/server/runtime/node-metadata"),s}function HR(){return n??=import("@aria-cli/server/runtime/node-store"),n}async function BR(R){let{resolveOrCreateNode:B}=await jR();return B({ariaHome:R})}async function H(R,B){let{NodeStore:$}=await HR(),U=new $({ariaHome:R});try{return U.readRuntimeOwnerRecord(B)}finally{U.close()}}function x(R){if(!(R instanceof Error))return!1;let B=R.message;return B.includes("connect ENOENT")||B.includes("ECONNREFUSED")||B.includes("Missing runtime owner record")||B.includes("not attachable")||B.includes("not control-ready")}async function K(R){let B=await H(R.ariaHome,R.nodeId);if(!B)throw Error(`[local-control-client] Missing runtime owner record for node ${R.nodeId}`);let $=LR({runtimeSocket:B.runtimeSocket,pollIntervalMs:R.pollIntervalMs}),U=c(R.nodeId,await $.getRuntimeBootstrap()),X,Q,_;if(R.clientKind)_=await S({runtimeSocket:B.runtimeSocket,clientKind:R.clientKind,logDir:o(R.ariaHome,"logs")}),X=_.getClientId(),Q=_.getClientAuthToken();let z=null;return{nodeId:R.nodeId,runtimeId:U.runtimeId,port:U.controlEndpoint.port,ownership:R.ownership,...X?{attachedClientId:X}:{},...Q?{attachedClientAuthToken:Q}:{},control:_?_.api:$,release:async(Z)=>{if(z)return z;return z=(async()=>{let b=_;_=void 0,X=void 0,Q=void 0,await b?.release().catch(()=>{}),await R.release(Z)})(),z}}}async function L(R,B){let $=AR.parse({id:JR(),method:"attachClient",payload:B});return new Promise((U,X)=>{let Q=t.createConnection(R),_="",z=!1,Z=!1,b,q=new Promise((O)=>{b=O}),J=()=>{if(Z)return;if(Z=!0,b?.(),!z)z=!0,X(Error("Local control socket closed before establishing an attached-client lease"))};Q.setEncoding("utf8"),Q.once("connect",()=>{Q.write(`${JSON.stringify($)}
|
|
2
|
-
`)}),Q.once("error",(O)=>{if(!z){z=!0,X(O);return}J()}),Q.once("end",J),Q.once("close",J),Q.on("data",async(O)=>{_+=O;let N=_.indexOf(`
|
|
3
|
-
`);if(N===-1||z)return;try{let w=DR.parse(JSON.parse(_.slice(0,N)));if(w.id!==$.id){z=!0,Q.destroy(),X(Error("Local control socket response ID mismatch"));return}if(!w.ok){let F=WR(w.error,w.diagnostic);await l(F,{endpoint:"attachClient",responseStatus:null,payload:w,transport:"runtime_socket_attach"}),z=!0,Q.destroy(),X(F);return}let y=qR.parse(PR.parse(w.payload));z=!0,U({clientId:y.clientId,clientAuthToken:y.clientAuthToken,release:async()=>{if(!Z)Q.destroy();await q}})}catch(w){z=!0,Q.destroy(),X(w)}})})}async function h(R){let B=await BR(R.ariaHome);if(!await H(R.ariaHome,B.nodeId))return null;let $=Date.now()+KR;while(Date.now()<$)try{return await K({ariaHome:R.ariaHome,nodeId:B.nodeId,ownership:"reattached",release:async()=>{},pollIntervalMs:R.pollIntervalMs,clientKind:R.clientKind})}catch(U){if(!x(U))throw U;if(!await H(R.ariaHome,B.nodeId))return null;await RR(MR)}return null}function LR(R){if(R.auth)return e({runtimeSocket:R.runtimeSocket,pollIntervalMs:R.pollIntervalMs,auth:R.auth});return VR(R)}async function k(R){let B=async(_,z)=>{let Z=R.pollIntervalMs??100,b=Date.now()+Math.max(Z*20,2000),q=null;while(Date.now()<b){if(R.signal?.aborted)throw Error(`[local-control-client] Attach-only client ${z} aborted while waiting for a live runtime owner on node ${_}`);try{if(!await H(R.ariaHome,_))q=Error(`[local-control-client] No live runtime owner available for attach-only client ${z} on node ${_}`);else return await K({ariaHome:R.ariaHome,nodeId:_,ownership:"reattached",release:async()=>{},pollIntervalMs:R.pollIntervalMs,clientKind:z})}catch(J){if(!x(J))throw J;q=J}await RR(Z)}throw q??Error(`[local-control-client] No live runtime owner available for attach-only client ${z} on node ${_}`)},{getHostSupervisor:$,HostSupervisorSplitBrainError:U}=await TR(),X=$(),Q;try{Q=await X.attach({ariaHome:R.ariaHome,arionName:R.arionName,clientKind:R.clientKind,memoriaFactory:R.memoriaFactory,router:R.router,authResolver:R.authResolver,runSessionConfig:R.runSessionConfig,mcpServers:R.mcpServers,daemonSafetyPolicy:R.daemonSafetyPolicy,autonomousIntervalMs:R.autonomousIntervalMs,signal:R.signal,silent:R.silent,runtimeLifecycle:R.runtimeLifecycle,port:R.port})}catch(_){if(_ instanceof U)return K({ariaHome:R.ariaHome,nodeId:_.nodeId,ownership:"reattached",release:async()=>{},pollIntervalMs:R.pollIntervalMs,clientKind:R.clientKind});throw _}try{return await Q.runtime.waitForInitialDiscovery(),await K({ariaHome:R.ariaHome,nodeId:Q.nodeId,ownership:Q.ownership,pollIntervalMs:R.pollIntervalMs,clientKind:R.clientKind,release:(_)=>Q.release(_)})}catch(_){throw await Q.release(),_}}async function v(R){let B=await BR(R.ariaHome);try{return(await K({ariaHome:R.ariaHome,nodeId:B.nodeId,ownership:"reattached",release:async()=>{},pollIntervalMs:R.pollIntervalMs})).control}catch($){if(x($))return null;throw $}}function f(R){return null}function P(R){if(!(R instanceof Error))return!1;let B=R.message;if(B.includes("attached-local-client-only"))return!0;if(B.includes("ECONNRESET"))return!0;if(B.includes("ECONNREFUSED"))return!0;if(B.includes("EPIPE"))return!0;if(B.includes("connect ENOENT"))return!0;if(B.includes("socket hang up"))return!0;if(B.includes("closed before"))return!0;return!1}function r(R){if(R<=0)return Promise.resolve();return new Promise((B)=>{setTimeout(B,R).unref?.()})}async function S(R){let{runtimeSocket:B,clientKind:$="local-api"}=R,U=!1,X,Q,_=null,z=null,Z=(w)=>{if(!R.logDir)return;try{bR(R.logDir,{recursive:!0}),GR(o(R.logDir,"reattach.jsonl"),JSON.stringify({ts:new Date().toISOString(),pid:process.pid,...w})+`
|
|
4
|
-
`)}catch{}};async function b(){if(z)await z().catch(()=>{}),z=null;let w=await L(B,OR.parse({clientKind:$,lease:!0,pid:process.pid,displayName:R.displayName}));X=w.clientId,Q=w.clientAuthToken,z=()=>w.release(),_=e({runtimeSocket:B,auth:{clientId:w.clientId,clientAuthToken:w.clientAuthToken}}),Z({event:"lease_acquired",clientId:w.clientId})}await b();async function q(w,y){if(U)throw Error("ResilientAttachedClient has been released");try{return await y(_)}catch(F){if(!P(F))throw F;Z({event:"reattach_start",method:w,error:F.message});for(let Y=0;Y<W.length;Y++){if(U)throw Error("ResilientAttachedClient has been released");await r(W[Y]??0);try{await b();let G=await y(_);return Z({event:"reattach_success",method:w,attempt:Y}),G}catch(G){if(Z({event:"reattach_retry_failed",method:w,attempt:Y,error:G.message,willRetry:P(G)&&Y<W.length-1}),!P(G)||Y===W.length-1)throw G}}throw F}}async function*J(w,y){if(U)throw Error("ResilientAttachedClient has been released");try{yield*y(_);return}catch(F){if(!P(F))throw F;Z({event:"reattach_stream_start",method:w,error:F.message});for(let Y=0;Y<W.length;Y++){if(U)throw Error("ResilientAttachedClient has been released");await r(W[Y]??0);try{await b(),yield*y(_),Z({event:"reattach_stream_success",method:w,attempt:Y});return}catch(G){if(Z({event:"reattach_stream_retry_failed",method:w,attempt:Y,error:G.message,willRetry:P(G)&&Y<W.length-1}),!P(G)||Y===W.length-1)throw G}}}}let O=new Set(["streamRun","subscribeRuntimeEvents","subscribeInbox","subscribePeers","subscribeDirectClientInbox"]);return{api:new Proxy({},{get(w,y){if(y==="then"||y==="catch"||y==="finally")return;if(O.has(y))return(...F)=>J(y,(Y)=>Y[y](...F));return(...F)=>q(y,(Y)=>Y[y](...F))}}),getClientId:()=>X,getClientAuthToken:()=>Q,release:async()=>{U=!0;let w=Error("release() caller").stack;if(z)await z().catch(()=>{}),z=null;Z({event:"released",clientId:X,releaseStack:w})}}}var KR=1e4,MR=250,i,s,n,W;var $R=A(()=>{a();p();W=[0,250,500,1000]});var NR={};E(NR,{resolveLocalControlClientSync:()=>f,resolveLocalControlClient:()=>v,requestRuntimeSocketLease:()=>L,createResilientAttachedClient:()=>S,attachLocalControlClient:()=>k,attachExistingLocalControlClient:()=>h});var ER=A(()=>{$R()});ER();export{f as resolveLocalControlClientSync,v as resolveLocalControlClient,L as requestRuntimeSocketLease,S as createResilientAttachedClient,k as attachLocalControlClient,h as attachExistingLocalControlClient};
|
|
@@ -1,9 +0,0 @@
|
|
|
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";
|
|
@@ -1,7 +0,0 @@
|
|
|
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;
|
|
@@ -1,28 +0,0 @@
|
|
|
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>;
|
package/dist/peer-identity.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
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[];
|
|
@@ -1,7 +0,0 @@
|
|
|
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>;
|
package/dist/relaunch.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
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>;
|
package/dist/release-notes.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
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 = "1.0.19";
|
|
11
|
-
export declare const WHATS_NEW: string[];
|
package/dist/repl-cleanup.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
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>;
|
package/dist/repl-cleanup.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as K}from"node:module";var G=Object.defineProperty;var I=(j)=>j;function J(j,q){this[j]=I.bind(null,q)}var M=(j,q)=>{for(var z in q)G(j,z,{get:q[z],enumerable:!0,configurable:!0,set:J.bind(q,z)})};var N=(j,q)=>()=>(j&&(q=j(j=0)),q);var P=K(import.meta.url);function L(j){console.warn(j)}function B(j){return j instanceof Error?j.message:String(j)}async function S(j,q){try{return await j()}finally{let{release:z,sessionHistory:C,pool:D,aria:F,warn:A=L}=q();try{await z?.()}catch(v){A(`[aria] Local-control cleanup failed: ${B(v)}`)}try{C?.close?.()}catch(v){A(`[aria] SessionHistory cleanup failed: ${B(v)}`)}try{await D?.closeAll?.()}catch(v){A(`[aria] Memoria pool cleanup failed: ${B(v)}`)}try{await F?.shutdown?.()}catch(v){A(`[aria] Fallback aria shutdown failed: ${B(v)}`)}}}export{S as withReplCleanup};
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
}
|
package/dist/session.d.ts
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
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
|
-
}
|
package/dist/session.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as O}from"node:module";var J=Object.defineProperty;var K=(j)=>j;function L(j,q){this[j]=K.bind(null,q)}var V=(j,q)=>{for(var x in q)J(j,x,{get:q[x],enumerable:!0,configurable:!0,set:L.bind(q,x)})};var W=(j,q)=>()=>(j&&(q=j(j=0)),q);var Y=O(import.meta.url);import{log as P}from"@aria-cli/types";import{Room as Q,parseMessage as S,ContributionGate as T}from"@aria-cli/aria";class U{room;history=[];manager;router;memoria;contributionGate;initialized=!1;constructor(j){this.manager=j.manager,this.router=j.router,this.memoria=j.memoria,this.contributionGate=new T(j.router),this.room=new Q({onRest:async(q)=>{if(await this.manager.rest(q.name),j.onArionRest)await j.onArionRest(q)}})}async initialize(j){if(this.initialized)return;let q=await this.manager.list(),x=j?q.find((z)=>z.name.toLowerCase()===j.toLowerCase()):q.find((z)=>z.isDefault);if(x)if(x.status==="resting"){await this.manager.wake(x.name);let z=await this.manager.get(x.name);if(z)this.room.setPrimary(z)}else this.room.setPrimary(x);this.initialized=!0}async become(j){let q=await this.manager.get(j);if(!q)throw Error(`Arion not found: ${j}`);if(q.status==="retired")throw Error(`Cannot become retired arion: ${j}`);if(q.status==="resting"){if(await this.manager.wake(j),q=await this.manager.get(j),!q)throw Error(`Arion not found after wake: ${j}`)}return this.room.setPrimary(q),q}async activate(j){let q=await this.manager.get(j);if(!q)throw Error(`Arion not found: ${j}`);if(q.status==="resting"){if(await this.manager.wake(j),q=await this.manager.get(j),!q)throw Error(`Arion not found after wake: ${j}`)}return this.room.enter(q),q}async dismiss(j){let q=this.room.get(j);if(q&&q!==this.room.getPrimary())await this.room.exit(q)}getPrimary(){return this.room.getPrimary()}getRoom(){return this.room}getActiveArions(){return this.room.getActive()}isActive(j){return this.room.isInRoom(j)}addToHistory(j){this.history.push(j)}getHistory(){return[...this.history]}clearHistory(){this.history=[]}parseMessage(j){return S(j)}async getRespondingArions(j,q,x){let z=Date.now(),F=q.map((D)=>({arion:D,isAddressed:!0})),E=this.room.getActive().filter((D)=>!q.some((B)=>B.name===D.name));if(E.length>0){let D=await this.contributionGate.evaluateAll(E,{message:j,previousResponses:x,conversationHistory:this.history.map((B)=>({role:B.role,content:B.content}))},{maxVolunteers:2});for(let{arion:B,assessment:I}of D)F.push({arion:B,isAddressed:!1,assessment:{confidence:I.confidence,contributionType:I.contributionType||"addition"}})}let H=Date.now()-z;if(H>100||E.length>0)P.debug(`[cli.responding_arions] ${H}ms — evaluated ${E.length} non-addressed arions, ${F.length-q.length} volunteered`);return F}async getArionMemoria(j){return this.manager.getMemoria(j)}}export{U as ArionSession};
|
package/dist/slash-commands.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
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 {};
|