@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
package/package.json
CHANGED
|
@@ -1,78 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aria-cli/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.37",
|
|
4
|
+
"description": "ARIA - Adaptive Reasoning Intelligence Agent",
|
|
4
5
|
"type": "module",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
6
|
"bin": {
|
|
8
|
-
"aria": "
|
|
7
|
+
"aria": "bin/aria.mjs"
|
|
9
8
|
},
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"scripts": {
|
|
17
|
-
"test": "vitest run --config vitest.config.ts",
|
|
18
|
-
"test:list": "tsx tests/print-default-test-lane.ts",
|
|
19
|
-
"test:watch": "vitest --config vitest.config.ts",
|
|
20
|
-
"test:integration": "vitest run --config vitest.integration.config.ts",
|
|
21
|
-
"test:native": "vitest run --config vitest.native.config.ts",
|
|
22
|
-
"test:e2e": "vitest run --config vitest.e2e.config.ts",
|
|
23
|
-
"test:e2e:watch": "vitest --config vitest.e2e.config.ts",
|
|
24
|
-
"test:e2e:mocked": "vitest run --config vitest.e2e.config.ts --testNamePattern='mocked|error|rejects|handles|prevents'",
|
|
25
|
-
"test:real": "vitest run --config vitest.real.config.ts",
|
|
26
|
-
"test:lanes": "tsx tests/print-test-lane-manifest.ts",
|
|
27
|
-
"test:parity": "node ../../scripts/run-cli-parity-tests.mjs",
|
|
28
|
-
"start": "node dist/index.js",
|
|
29
|
-
"dev": "node --import tsx bin/aria-dev.js",
|
|
30
|
-
"dev:repl": "node --import tsx bin/aria-dev.js"
|
|
9
|
+
"main": "bin/aria.mjs",
|
|
10
|
+
"files": [
|
|
11
|
+
"bin/aria.mjs"
|
|
12
|
+
],
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=20.0.0"
|
|
31
15
|
},
|
|
32
16
|
"dependencies": {
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"@aria-cli/server": "1.0.19",
|
|
39
|
-
"@aria-cli/tools": "1.0.19",
|
|
40
|
-
"@aria-cli/types": "1.0.19",
|
|
41
|
-
"@aria-cli/wireguard": "1.0.19",
|
|
17
|
+
"@anthropic-ai/sdk": "^0.78.0",
|
|
18
|
+
"@fastify/cors": "^11.0.1",
|
|
19
|
+
"@fastify/websocket": "^11.2.0",
|
|
20
|
+
"@google/genai": "^1.42.0",
|
|
21
|
+
"@mozilla/readability": "^0.6.0",
|
|
42
22
|
"better-sqlite3": "^12.6.2",
|
|
23
|
+
"bonjour-service": "^1.3.0",
|
|
43
24
|
"chalk": "^5.6.2",
|
|
44
25
|
"cli-highlight": "^2.1.11",
|
|
45
26
|
"color-name": "^2.1.0",
|
|
46
27
|
"commander": "^14.0.3",
|
|
47
28
|
"diff": "^8.0.3",
|
|
29
|
+
"eventemitter3": "^5.0.4",
|
|
30
|
+
"fast-glob": "^3.3.3",
|
|
31
|
+
"fastify": "^5.3.2",
|
|
48
32
|
"gradient-string": "^3.0.0",
|
|
33
|
+
"gray-matter": "^4.0.3",
|
|
34
|
+
"highlight.js": "^11.11.1",
|
|
49
35
|
"ink": "npm:@jrichman/ink@^6.4.11",
|
|
50
36
|
"ink-spinner": "^5.0.0",
|
|
51
37
|
"katex": "^0.16.33",
|
|
52
38
|
"marked": "^17.0.3",
|
|
53
39
|
"marked-terminal": "^7.3.0",
|
|
40
|
+
"nanoid": "^5.1.6",
|
|
41
|
+
"openai": "^6.25.0",
|
|
42
|
+
"proper-lockfile": "^4.1.2",
|
|
54
43
|
"react": "^19.2.4",
|
|
44
|
+
"sqlite-vec": "0.1.7-alpha.2",
|
|
55
45
|
"string-width": "^8.2.0",
|
|
46
|
+
"turndown": "^7.2.2",
|
|
47
|
+
"ulid": "^3.0.2",
|
|
48
|
+
"undici": "^7.22.0",
|
|
49
|
+
"uuid": "^13.0.0",
|
|
56
50
|
"wrap-ansi": "^10.0.0",
|
|
57
51
|
"yaml": "^2.8.2",
|
|
58
52
|
"zod": "^4.3.6"
|
|
59
53
|
},
|
|
60
|
-
"
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
63
|
-
"@
|
|
64
|
-
"@types/react": "^19.2.14",
|
|
65
|
-
"ink-testing-library": "^4.0.0",
|
|
66
|
-
"typescript": "^5.9.3",
|
|
67
|
-
"vitest": "^4.0.18"
|
|
54
|
+
"optionalDependencies": {
|
|
55
|
+
"@aria-cli/fastripgrep": "1.0.37",
|
|
56
|
+
"@aria-cli/wireguard": "1.0.37",
|
|
57
|
+
"@aria-cli/search": "1.0.37"
|
|
68
58
|
},
|
|
69
|
-
"
|
|
70
|
-
"dist/",
|
|
71
|
-
"bin/",
|
|
72
|
-
"!**/*.map",
|
|
73
|
-
"!**/*.tsbuildinfo"
|
|
74
|
-
],
|
|
75
|
-
"engines": {
|
|
76
|
-
"node": ">=20.0.0"
|
|
77
|
-
}
|
|
59
|
+
"license": "MIT"
|
|
78
60
|
}
|
package/bin/aria-dev.js
DELETED
package/bin/aria.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";import{writeFileSync as F,appendFileSync as U,mkdirSync as z}from"node:fs";import{join as y}from"node:path";import{homedir as L}from"node:os";import{createHash as J}from"node:crypto";import{RESTART_KIND_ENV as V,RESUME_SESSION_ENV as A}from"@aria-cli/types";import"../dist/repl-cleanup.js";import{installOwnerLease as W}from"./install-owner-lease.js";function $(o,s){try{const i=y(L(),".aria","crash-reports");z(i,{recursive:!0});const p=process.env[A]||"unknown",m=process.memoryUsage(),u={timestamp:new Date().toISOString(),sessionId:p,type:o,error:{message:s?.message??String(s),stack:s?.stack??void 0,name:s?.name??void 0},process:{pid:process.pid,heapUsedMb:Math.round(m.heapUsed/1024/1024*100)/100,rssMb:Math.round(m.rss/1024/1024*100)/100,uptime:Math.round(process.uptime())}};F(y(i,"latest.json"),JSON.stringify(u,null,2));const e=y(L(),".aria"),c=y(e,"error-events.jsonl"),S=s?.stack?.split(`
|
|
3
|
-
`)[1]?.trim()??"",x=Math.floor(Date.now()/1e4),R=J("sha256").update(`${s?.message??""}|${S}|${x}`).digest("hex").slice(0,12),v=[];let n=s?.cause;const f=new Set;for(;n instanceof Error&&!f.has(n);)f.add(n),v.push(`${n.name}: ${n.message}`),n=n.cause;const w=[];if(s?.stack)for(const M of s.stack.split(`
|
|
4
|
-
`)){const l=M.match(/\((?:file:\/\/)?([^:)]+):\d+:\d+\)/);l?.[1]?.includes("packages/")&&!l[1].includes("node_modules")&&w.push(l[1])}const k={id:`crash-${R}`,timestamp:u.timestamp,severity:0,category:"crash",domain:"cli",name:s?.name??"UnknownError",message:s?.message??String(s),code:s?.code??void 0,stackTrace:s?.stack,causeChain:v,recoverable:!1,state:{environment:{nodeVersion:process.version,platform:process.platform},processInfo:u.process},relatedFiles:w,relatedErrors:[],status:"new"};U(c,JSON.stringify(k)+`
|
|
5
|
-
`,"utf-8")}catch{}}process.on("uncaughtException",(o,s)=>{$("uncaughtException",o),process.stderr.write(`[aria] FATAL uncaughtException (origin: ${s}):
|
|
6
|
-
`),process.stderr.write(`${o?.stack??o}
|
|
7
|
-
`),process.exit(1)}),process.on("unhandledRejection",o=>{$("unhandledRejection",o),process.stderr.write(`[aria] FATAL unhandledRejection:
|
|
8
|
-
`),process.stderr.write(`${o?.stack??o}
|
|
9
|
-
`),process.exit(1)}),W();const a=process.argv.slice(2);if(a[0]==="-v"||a[0]==="--version")import("../dist/commands/index.js").then(({program:o})=>o.parseAsync(process.argv)).catch(o=>{process.stderr.write(`Error: ${o.message}
|
|
10
|
-
`),process.exitCode=1});else{const o=["daemon","auth","arions","headless","call","pairing","runtime-cutover-reset","--help","-h"],s=a.length>0&&(o.includes(a[0])||a[0].startsWith("--"));let i=null,p=!1;const m=[];for(let e=0;e<a.length;e++)(a[e]==="-r"||a[e]==="--resume")&&!s?(e+1>=a.length&&(process.stderr.write(`Error: -r/--resume requires a session ID
|
|
11
|
-
`),process.exit(2)),i=a[++e]):(a[e]==="-c"||a[e]==="--continue")&&!s?p=!0:m.push(a[e]);i&&p&&(process.stderr.write(`Error: -r/--resume and -c/--continue are mutually exclusive
|
|
12
|
-
`),process.exit(2)),!i&&!p&&process.env[A]&&(i=process.env[A],delete process.env[A],delete process.env[V]);const u=!s&&m.length>0?m.join(" "):void 0;s?import("../dist/commands/index.js").then(({program:e})=>{e.parseAsync(process.argv).catch(c=>{console.error("Error:",c.message),process.exit(1)})}):process.execArgv.some(e=>e.includes("max-old-space-size"))?Promise.resolve().then(async()=>{const{createCliContext:e}=await import("../dist/cli-context.js"),{getAriaDir:c}=await import("../dist/config.js"),{ensureDaemon:S}=await import("../dist/ensure-daemon.js"),x=c(),R=e(),[{attachExistingLocalControlClient:v},{startInkRepl:n},{ArionManager:f,ArionStorage:w},{Memoria:k},{ArionSession:M},{SessionHistory:l}]=await Promise.all([import("../dist/local-control-client.js"),import("../dist/ink-repl.js"),import("@aria-cli/aria"),import("@aria-cli/memoria"),import("../dist/session.js"),import("../dist/history/index.js")]),r=await R;await S(r);const D=await v({ariaHome:x,clientKind:"tui"}),P=process.env.ARIA_MEMORY_PATH||`${r.ariaDir}/arions/ARIA/memory.db`,d=new k({path:P,router:r.router});d.initialize().catch(t=>{console.debug(`[aria] Memoria background init failed (will retry on use): ${t?.message??t}`)});const N={components:{memoria:d},async recallUserName(){try{const t=d.storage?.getDatabase?.();if(!t)return null;const h=t.prepare("SELECT value FROM config WHERE key = 'user_profile'").get();return h?.value?JSON.parse(h.value).name??null:null}catch{return null}},async shutdown(){await d.close()}},T=new w(r.ariaDir),E=new f(T,r.memoriaFactory);if(await E.initialize(),E.setRouter(r.router),!D)throw new Error("[aria] Attached REPL requires an existing local-control runtime");const b=r.config.activeArion?.trim()||"ARIA",_=l.resolvePerArionPath(r.ariaDir,b);l.migrateJsonlLogs(r.ariaDir,b);const g=new l(_),j=g.getInputHistory(100),C=t=>g.addInputHistory(t);let I;if(i){const t=g.findSessionByPrefix(i);t||(process.stderr.write(`Error: No session found matching "${i}"
|
|
13
|
-
`),process.exit(2)),I=t}else if(p){const t=g.listSessions(1);t.length===0&&(process.stderr.write(`Error: No recent sessions to continue
|
|
14
|
-
`),process.exit(2)),I=t[0].id}const O=new M({manager:E,router:r.router,memoria:N.components.memoria,onArionRest:async()=>{}});await O.initialize(r.config.activeArion);let H=null;try{const t=d.storage?.getDatabase?.();if(t){const h=t.prepare("SELECT value FROM config WHERE key = 'user_profile'").get();h?.value&&(H=JSON.parse(h.value).name??null)}}catch{}await n(O,E,r.router,N,D,r,j,C,g,u,H,I,r.availableModels,r.refreshAvailableModels,r.credentialHints,r.authResolver)}).catch(e=>{$("ink-repl-rejected",e),console.error("Error starting Ink REPL:",e.message),process.exit(1)}):(process.on("SIGINT",()=>{}),import("node:child_process").then(({spawn:e})=>{e(process.execPath,["--max-old-space-size=8192",...process.execArgv,process.argv[1],...process.argv.slice(2)],{stdio:"inherit"}).on("close",c=>process.exit(c??1))}))}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const u=1e3;export function installOwnerLease({env:a=process.env,processRef:e=process,pollMs:f=1e3,onOwnerGone:c}={}){const o=a.ARIA_HARNESS_OWNER_PID;if(!o)return()=>{};const t=Number.parseInt(o,10);if(!Number.isFinite(t)||t<=0)throw new Error(`ARIA_HARNESS_OWNER_PID must be a positive integer, got: ${o}`);let r=!1;const s=setInterval(()=>{if(!r)try{e.kill(t,0)}catch(n){const l=n&&typeof n=="object"&&"code"in n?n.code:void 0;if(l&&l!=="ESRCH")return;if(r=!0,clearInterval(s),c){c(t);return}e.kill(e.pid,"SIGTERM")}},f);s.unref?.();const i=()=>{r||(r=!0,clearInterval(s))};return e.once("exit",i),i}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import type { MemoriaFactory, RunSessionConfig, DaemonSafetyPolicy } from "@aria-cli/aria";
|
|
2
|
-
import type { AuthResolver } from "@aria-cli/auth";
|
|
3
|
-
import type { ModelRouter } from "@aria-cli/models";
|
|
4
|
-
import { type ClientId, type NodeId, type RuntimeId } from "@aria-cli/tools";
|
|
5
|
-
import type { HostClientKind } from "@aria-cli/server/runtime/host-supervisor";
|
|
6
|
-
import type { AttachedLocalControlApi, LocalControlApi } from "@aria-cli/server/runtime/local-control-api";
|
|
7
|
-
export interface AttachedLocalControlClient {
|
|
8
|
-
nodeId: NodeId;
|
|
9
|
-
runtimeId: RuntimeId;
|
|
10
|
-
port: number;
|
|
11
|
-
ownership: "started" | "reattached";
|
|
12
|
-
attachedClientId?: string;
|
|
13
|
-
attachedClientAuthToken?: string;
|
|
14
|
-
control: AttachedLocalControlApi;
|
|
15
|
-
release(options?: {
|
|
16
|
-
preserveRuntime?: boolean;
|
|
17
|
-
}): Promise<void>;
|
|
18
|
-
}
|
|
19
|
-
export declare function requestRuntimeSocketLease(runtimeSocket: string, payload: unknown): Promise<{
|
|
20
|
-
clientId: ClientId;
|
|
21
|
-
clientAuthToken: string;
|
|
22
|
-
release(): Promise<void>;
|
|
23
|
-
}>;
|
|
24
|
-
export declare function attachExistingLocalControlClient(options: {
|
|
25
|
-
ariaHome: string;
|
|
26
|
-
clientKind: HostClientKind;
|
|
27
|
-
pollIntervalMs?: number;
|
|
28
|
-
}): Promise<AttachedLocalControlClient | null>;
|
|
29
|
-
export declare function attachLocalControlClient(options: {
|
|
30
|
-
ariaHome: string;
|
|
31
|
-
arionName: string;
|
|
32
|
-
clientKind: HostClientKind;
|
|
33
|
-
runtimeLifecycle?: "scoped" | "persistent";
|
|
34
|
-
memoriaFactory?: MemoriaFactory;
|
|
35
|
-
router?: ModelRouter;
|
|
36
|
-
authResolver?: AuthResolver;
|
|
37
|
-
runSessionConfig?: RunSessionConfig;
|
|
38
|
-
mcpServers?: import("@aria-cli/tools").MCPServerConfig[];
|
|
39
|
-
daemonSafetyPolicy?: DaemonSafetyPolicy;
|
|
40
|
-
autonomousIntervalMs?: number;
|
|
41
|
-
signal?: AbortSignal;
|
|
42
|
-
silent?: boolean;
|
|
43
|
-
port?: number;
|
|
44
|
-
pollIntervalMs?: number;
|
|
45
|
-
}): Promise<AttachedLocalControlClient>;
|
|
46
|
-
export declare function resolveLocalControlClient(options: {
|
|
47
|
-
ariaHome: string;
|
|
48
|
-
pollIntervalMs?: number;
|
|
49
|
-
}): Promise<LocalControlApi | null>;
|
|
50
|
-
export declare function resolveLocalControlClientSync(options: {
|
|
51
|
-
ariaHome: string;
|
|
52
|
-
pollIntervalMs?: number;
|
|
53
|
-
[key: string]: unknown;
|
|
54
|
-
}): LocalControlApi | null;
|
|
55
|
-
export interface ResilientAttachedClientOptions {
|
|
56
|
-
/** Path to the daemon's Unix socket */
|
|
57
|
-
runtimeSocket: string;
|
|
58
|
-
/** Client kind for the lease request */
|
|
59
|
-
clientKind?: string;
|
|
60
|
-
/** Display name for this client (e.g. arion name) */
|
|
61
|
-
displayName?: string;
|
|
62
|
-
/** Path to write diagnostic logs (e.g. ~/.aria/logs) */
|
|
63
|
-
logDir?: string;
|
|
64
|
-
}
|
|
65
|
-
export interface ResilientAttachedClient {
|
|
66
|
-
/** The self-healing API proxy. Survives daemon restarts transparently. */
|
|
67
|
-
api: AttachedLocalControlApi;
|
|
68
|
-
/** Current client ID (changes on reattach) */
|
|
69
|
-
getClientId(): string | undefined;
|
|
70
|
-
/** Current auth token (changes on reattach) */
|
|
71
|
-
getClientAuthToken(): string | undefined;
|
|
72
|
-
/** Release the lease and stop reconnection */
|
|
73
|
-
release(): Promise<void>;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Creates a self-healing AttachedLocalControlApi that survives daemon restarts.
|
|
77
|
-
*
|
|
78
|
-
* This is the ONLY correct way to get a long-lived client to the daemon.
|
|
79
|
-
* It fuses lease acquisition, auth credential management, stale-lease
|
|
80
|
-
* reattach with exponential backoff, and diagnostic logging into a single
|
|
81
|
-
* object. Callers get an API that "just works" — they never touch leases,
|
|
82
|
-
* auth tokens, or retry logic.
|
|
83
|
-
*
|
|
84
|
-
* On any call failure (stale lease, ECONNRESET, EPIPE, etc.):
|
|
85
|
-
* 1. Acquires a fresh lease from the daemon
|
|
86
|
-
* 2. Rebuilds the inner client with new credentials
|
|
87
|
-
* 3. Retries the call (up to 4 attempts with exponential backoff)
|
|
88
|
-
* 4. Logs every step to logDir/reattach.jsonl
|
|
89
|
-
*/
|
|
90
|
-
export declare function createResilientAttachedClient(options: ResilientAttachedClientOptions): Promise<ResilientAttachedClient>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { assertAttachableRuntimeBootstrap, createLocalControlClient, type RuntimeBootstrapSource, } from "./local-control-http-client.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function createCapabilityAwareMethodProxy<T extends object>(getTarget: () => T | null | undefined): T;
|
package/dist/cli-context.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared CLI bootstrap context used by all CLI entry points (REPL, daemon, headless).
|
|
3
|
-
*
|
|
4
|
-
* Eliminates the duplicated config → env vars → router → pool pattern that
|
|
5
|
-
* previously appeared in every CLI command.
|
|
6
|
-
*/
|
|
7
|
-
import { ModelDiscovery, type ModelRouter } from "@aria-cli/models";
|
|
8
|
-
import type { CredentialHints, ReadonlyModelDefinition } from "@aria-cli/models";
|
|
9
|
-
import { createRuntimeAuthContext } from "@aria-cli/auth";
|
|
10
|
-
import { MemoriaPool } from "@aria-cli/aria";
|
|
11
|
-
import { loadConfig } from "./config.js";
|
|
12
|
-
import { loadAriaConfig } from "./config/index.js";
|
|
13
|
-
export interface CliContext {
|
|
14
|
-
config: ReturnType<typeof loadConfig>;
|
|
15
|
-
router: ModelRouter;
|
|
16
|
-
pool: InstanceType<typeof MemoriaPool>;
|
|
17
|
-
memoriaFactory: ReturnType<InstanceType<typeof MemoriaPool>["toFactory"]>;
|
|
18
|
-
ariaDir: string;
|
|
19
|
-
projectConfig: Awaited<ReturnType<typeof loadAriaConfig>>;
|
|
20
|
-
discovery: InstanceType<typeof ModelDiscovery>;
|
|
21
|
-
availableModels: ReadonlyModelDefinition[];
|
|
22
|
-
refreshAvailableModels: (force?: boolean) => Promise<ReadonlyModelDefinition[]>;
|
|
23
|
-
credentialHints: CredentialHints;
|
|
24
|
-
authResolver: ReturnType<typeof createRuntimeAuthContext>["authResolver"];
|
|
25
|
-
}
|
|
26
|
-
export interface CliContextOptions {
|
|
27
|
-
cwd?: string;
|
|
28
|
-
startupMode?: "interactive" | "daemon";
|
|
29
|
-
skipDiscoveryRefresh?: boolean;
|
|
30
|
-
}
|
|
31
|
-
export declare function createCliContext(opts?: CliContextOptions): Promise<CliContext>;
|
package/dist/cli-context.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as r}from"node:module";var s=Object.defineProperty;var a=(x)=>x;function o(x,q){this[x]=a.bind(null,q)}var i=(x,q)=>{for(var J in q)s(x,J,{get:q[J],enumerable:!0,configurable:!0,set:o.bind(q,J)})};var k=(x,q)=>()=>(x&&(q=x(x=0)),q);var hq=r(import.meta.url);var xq={};i(xq,{saveConfig:()=>G,loadConfig:()=>A,loadAndMigrateConfig:()=>m,getConfigPath:()=>I,getAriaDir:()=>H});import*as Z from"fs";import*as O from"os";import{getModelById as e,getModelByShortName as qq,isValidTier as h}from"@aria-cli/models";import{log as Y}from"@aria-cli/types";function H(){if(process.env.ARIA_HOME)return process.env.ARIA_HOME;return`${process.env.HOME||O.homedir()}/.aria`}function I(){return`${H()}/config.json`}function m(){try{let x=I();if(Z.existsSync(x)){let q=JSON.parse(Z.readFileSync(x,"utf-8"));try{if(q.defaultModel&&!q.preferredTier){let z=e(q.defaultModel)||qq(q.defaultModel);if(!z)Y.warn(`Unknown model "${q.defaultModel}" migrated to balanced tier (Sonnet 4.5)`);let Q=z?.tier||"balanced";q.preferredTier=h(Q)?Q:"balanced",delete q.defaultModel,G(q)}if(q.preferredTier!==void 0&&!h(q.preferredTier))Y.warn(`Invalid tier "${q.preferredTier}" corrected to balanced tier`),q.preferredTier="balanced",G(q);let J=!1;if(!q.awsRegion&&process.env.AWS_REGION)q.awsRegion=process.env.AWS_REGION,J=!0;if(!q.awsProfile&&process.env.AWS_PROFILE)q.awsProfile=process.env.AWS_PROFILE,J=!0;if(J)G(q)}catch(J){Y.warn("Config migration failed, using config as-is:",J instanceof Error?J.message:J)}return q}}catch(x){Y.warn("[Config] Failed to load config file:",x)}return{}}function G(x){let q=H();if(!Z.existsSync(q))Z.mkdirSync(q,{recursive:!0});Z.writeFileSync(I(),JSON.stringify(x,null,2),"utf-8")}var A;var P=k(()=>{A=m});import{readFile as zq}from"fs/promises";import{join as E}from"path";import{homedir as Jq}from"os";async function M(x){try{let q=await zq(x,"utf-8"),J=JSON.parse(q);if(J.mcp?.servers){for(let z of J.mcp.servers)if(z.env){for(let[Q,K]of Object.entries(z.env))if(typeof K==="string"&&K.startsWith("${")&&K.endsWith("}")){let $=K.slice(2,-1);z.env[Q]=process.env[$]||""}}}if(J.mcp?.servers)for(let z of J.mcp.servers){if(!z.name||typeof z.name!=="string")throw Error('Invalid MCP server config: missing "name" field');if(!z.transport)throw Error(`MCP server "${z.name}": missing "transport" field`);if(z.transport&&!["stdio","sse"].includes(z.transport))throw Error(`MCP server "${z.name}": unknown transport "${z.transport}"`);if(z.transport==="stdio"&&!z.command)throw Error(`MCP server "${z.name}": stdio transport requires "command" field`);if(z.transport==="sse"&&!z.url)throw Error(`MCP server "${z.name}": sse transport requires "url" field`)}return J}catch(q){if(q.code==="ENOENT")return null;throw q}}function D(x,q){let J=x.mcp?.servers||[],z=q.mcp?.servers||[],Q=new Set(z.map((K)=>K.name));return{mcp:{servers:[...J.filter((K)=>!Q.has(K.name)),...z]}}}async function b(x){let q={...Kq},J=E(Jq(),".aria","config.json"),z=await M(J);if(z)q=D(q,z);if(x){let Q=E(x,"aria.config.json"),K=await M(Q);if(K)q=D(q,K)}return q}var Kq;var p=k(()=>{Kq={mcp:{servers:[]}}});function uq(x){let q=L.indexOf(x);return L[(q+1)%L.length]}function wq(x,q){let J=F[x],z={};if(q.showThinking!==J.showThinking)z.showThinking=q.showThinking;if(q.showCosts!==J.showCosts)z.showCosts=q.showCosts;if(q.showToolArgs!==J.showToolArgs)z.showToolArgs=q.showToolArgs;if(q.toolOutput!==J.toolOutput)z.toolOutput=q.toolOutput;if(q.showTraces!==J.showTraces)z.showTraces=q.showTraces;if(q.showPipelineTiming!==J.showPipelineTiming)z.showPipelineTiming=q.showPipelineTiming;if(q.showStatusBar!==J.showStatusBar)z.showStatusBar=q.showStatusBar;return z}function vq(x,q){return{...F[x],...q??{}}}var F,L;var u=k(()=>{F={minimal:{showThinking:!1,showCosts:!1,showToolArgs:!1,toolOutput:"hidden",showTraces:!1,showPipelineTiming:!1,showStatusBar:!1},standard:{showThinking:!0,showCosts:!0,showToolArgs:!0,toolOutput:"standard",showTraces:!1,showPipelineTiming:!1,showStatusBar:!0},debug:{showThinking:!0,showCosts:!0,showToolArgs:!0,toolOutput:"expanded",showTraces:!0,showPipelineTiming:!0,showStatusBar:!0}},L=["minimal","standard","debug"]});import{readFileSync as Qq}from"fs";import{join as Wq}from"path";import{homedir as Zq}from"os";import{parse as $q}from"yaml";import{log as Xq}from"@aria-cli/types";function Gq(){return{display:{...F.standard,...kq},persistence:{...Hq}}}function Uq(x){return typeof x==="string"&&Vq.has(x)}function Bq(x){return typeof x==="string"&&Fq.has(x)}function Yq(x){return typeof x==="string"&&Nq.has(x)}function X(x){return typeof x==="boolean"}function T(x){return typeof x==="number"&&Number.isInteger(x)&&x>0}function bq(x){return typeof x==="number"&&Number.isInteger(x)&&x>=0}function jq(x){try{let q=Qq(x,"utf-8"),J=$q(q);if(J===null||J===void 0||typeof J!=="object")return null;return J}catch(q){if(q.code==="ENOENT")return null;throw q}}function Iq(x){let q={};if(Uq(x.mode))q.mode=x.mode;if(Yq(x.theme))q.theme=x.theme;if(X(x.thinking))q.showThinking=x.thinking;if(X(x.costs))q.showCosts=x.costs;if(X(x.toolArgs))q.showToolArgs=x.toolArgs;if(Bq(x.toolOutput))q.toolOutput=x.toolOutput;if(X(x.traces))q.showTraces=x.traces;if(X(x.pipelineTiming))q.showPipelineTiming=x.pipelineTiming;if(X(x.statusBar))q.showStatusBar=x.statusBar;if(X(x.syntaxHighlighting))q.syntaxHighlighting=x.syntaxHighlighting;if(T(x.maxToolOutputLines))q.maxToolOutputLines=x.maxToolOutputLines;if(bq(x.maxThinkingPreview))q.maxThinkingPreview=x.maxThinkingPreview;return q}function Aq(x){let q={};if(X(x.jsonlEnabled))q.jsonlEnabled=x.jsonlEnabled;if(T(x.jsonlRetentionDays)||x.jsonlRetentionDays===1/0)q.jsonlRetentionDays=x.jsonlRetentionDays;if(T(x.jsonlMaxSizeMb)||x.jsonlMaxSizeMb===1/0)q.jsonlMaxSizeMb=x.jsonlMaxSizeMb;if(x.otelEndpoint===null)q.otelEndpoint=null;else if(typeof x.otelEndpoint==="string"&&x.otelEndpoint.length>0)q.otelEndpoint=x.otelEndpoint;return q}function w(x,q,J){return{...x,...q?y(q):{},...J?y(J):{}}}function Lq(x){let q=Gq(),J=x??Wq(Zq(),".aria","config.yaml"),z;try{z=jq(J)}catch(U){return Xq.warn(`[AriaConfig] Failed to parse ${J}: ${U.message}. Using defaults.`),q}if(z===null)return q;let Q=typeof z.display==="object"&&z.display!==null?z.display:{},K=Iq(Q),$=K.mode??q.display.mode,_=F[$],W=w(_,K),N=typeof z.persistence==="object"&&z.persistence!==null?z.persistence:{},V=Aq(N);return{display:{...W,mode:$,theme:K.theme,syntaxHighlighting:K.syntaxHighlighting??q.display.syntaxHighlighting,maxToolOutputLines:K.maxToolOutputLines??q.display.maxToolOutputLines,maxThinkingPreview:K.maxThinkingPreview??q.display.maxThinkingPreview},persistence:{...q.persistence,...y(V)}}}function y(x){let q={};for(let[J,z]of Object.entries(x))if(z!==void 0)q[J]=z;return q}var Hq,kq,Vq,Fq,Nq;var v=k(()=>{u();Hq={jsonlEnabled:!0,jsonlRetentionDays:1/0,jsonlMaxSizeMb:1/0,otelEndpoint:null},kq={mode:"standard",syntaxHighlighting:!0,maxToolOutputLines:5,maxThinkingPreview:80};Vq=new Set(["minimal","standard","debug"]),Fq=new Set(["hidden","collapsed","standard","expanded"]),Nq=new Set(["dark","light","dark-accessible","light-accessible","claude-dark","claude-light","claude-dark-daltonized","claude-light-daltonized"])});var f=k(()=>{p();v()});import{createRuntimeDefaultRouter as Tq,getCliModels as j,ModelDiscovery as yq}from"@aria-cli/models";import{createRuntimeAuthContext as _q}from"@aria-cli/auth";import{MemoriaPool as Cq}from"@aria-cli/aria";async function Jx(x){let q=A(),J=await b(x?.cwd??process.cwd()),z=x?.startupMode??"interactive",Q=q.awsRegion||process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION,K=q.awsProfile||process.env.AWS_PROFILE,$=!1;if(!q.awsRegion&&process.env.AWS_REGION)q.awsRegion=process.env.AWS_REGION,$=!0;if(!q.awsProfile&&process.env.AWS_PROFILE)q.awsProfile=process.env.AWS_PROFILE,$=!0;if($)G(q);if(Q&&!process.env.AWS_REGION)process.env.AWS_REGION=Q;if(K&&!process.env.AWS_PROFILE)process.env.AWS_PROFILE=K;let W=_q({ariaHome:H(),...Q||K?{bedrock:{awsRegion:Q,awsProfile:K}}:{}}).authResolver,N=await Tq({ariaHome:H(),authResolver:W,...Q||K?{bedrock:{awsRegion:Q,awsProfile:K}}:{}}),V=H(),U=new Cq(V,N),C=z!=="daemon"?await W.resolve("anthropic"):null,R=z!=="daemon"?await W.resolve("openai"):null,S=z!=="daemon"?await W.resolve("google"):null,c=z!=="daemon"?await W.resolve("github-copilot"):null,B=new yq({authResolver:W,googleApiKey:S?.apiKey||q.googleApiKey,anthropicApiKey:C?.apiKey||q.anthropicApiKey,openaiApiKey:R?.apiKey,awsRegion:Q,awsProfile:K,cacheDir:V}),d=z==="daemon"?j():j(B.getCachedModels()),g=async(t)=>{if(z==="daemon")return j();let l=t?await B.refresh(!0):await B.getCachedOrRefresh();return j(l)},n={availableProviders:[...Q?["bedrock","bedrock-converse"]:[],...C?.apiKey?["anthropic"]:[],...R?.apiKey?["openai"]:[],...c?.apiKey?["github-copilot"]:[],...S?.apiKey?["google"]:[]]};return{config:q,router:N,pool:U,memoriaFactory:U.toFactory(),ariaDir:V,projectConfig:J,discovery:B,availableModels:d,refreshAvailableModels:g,credentialHints:n,authResolver:W}}var Rq=k(()=>{P();f()});Rq();export{Jx as createCliContext};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Arions command - Manage Arion personas
|
|
3
|
-
*
|
|
4
|
-
* Subcommands:
|
|
5
|
-
* - list: List all Arions with status
|
|
6
|
-
* - hatch: Create a new Arion
|
|
7
|
-
* - become: Switch to an Arion
|
|
8
|
-
* - retire: Retire an Arion
|
|
9
|
-
*/
|
|
10
|
-
import { Command } from "commander";
|
|
11
|
-
/**
|
|
12
|
-
* Create the arions command group
|
|
13
|
-
*/
|
|
14
|
-
export declare function createArionsCommand(): Command;
|
package/dist/commands/auth.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Auth command - Manage auth profiles for multi-provider authentication
|
|
3
|
-
*
|
|
4
|
-
* Subcommands:
|
|
5
|
-
* - status: Show all auth profiles and their health
|
|
6
|
-
* - add: Add an API key for a provider
|
|
7
|
-
* - remove: Remove an auth profile
|
|
8
|
-
*/
|
|
9
|
-
import { Command } from "commander";
|
|
10
|
-
/**
|
|
11
|
-
* Show all auth profiles, their type, health, and expiry.
|
|
12
|
-
*/
|
|
13
|
-
export declare function authStatusCommand(): Promise<void>;
|
|
14
|
-
/**
|
|
15
|
-
* Interactively add an API key for a provider.
|
|
16
|
-
*/
|
|
17
|
-
export declare function authAddCommand(opts: {
|
|
18
|
-
provider: string;
|
|
19
|
-
}): Promise<void>;
|
|
20
|
-
/**
|
|
21
|
-
* Remove an auth profile by ID.
|
|
22
|
-
*/
|
|
23
|
-
export declare function authRemoveCommand(profileId: string): Promise<void>;
|
|
24
|
-
/**
|
|
25
|
-
* Create the auth command group with status, add, and remove subcommands.
|
|
26
|
-
*/
|
|
27
|
-
export declare function createAuthCommand(): Command;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Daemon command - monitor-style projection over the shared daemon service.
|
|
3
|
-
*
|
|
4
|
-
* The CLI wrapper only parses options, starts/stops the daemon via the
|
|
5
|
-
* canonical `daemon.*` service, prints human status lines, and stays resident
|
|
6
|
-
* until interrupted. It must not own runtime bootstrap semantics directly.
|
|
7
|
-
*/
|
|
8
|
-
import type { DaemonSafetyPolicy } from "@aria-cli/aria";
|
|
9
|
-
export interface DaemonCliOptions {
|
|
10
|
-
arion?: string;
|
|
11
|
-
port?: string;
|
|
12
|
-
intervalMs?: string;
|
|
13
|
-
allowedToolCategories?: string;
|
|
14
|
-
allowedShellCommands?: string;
|
|
15
|
-
maxWriteOpsPerMinute?: string;
|
|
16
|
-
maxGitPushesPerHour?: string;
|
|
17
|
-
}
|
|
18
|
-
interface DaemonOptions {
|
|
19
|
-
arion?: string;
|
|
20
|
-
port: number;
|
|
21
|
-
intervalMs: number;
|
|
22
|
-
allowedToolCategories?: string[];
|
|
23
|
-
allowedShellCommands?: string[];
|
|
24
|
-
maxWriteOpsPerMinute?: number;
|
|
25
|
-
maxGitPushesPerHour?: number;
|
|
26
|
-
}
|
|
27
|
-
export declare function buildSafetyPolicy(options: DaemonOptions): DaemonSafetyPolicy;
|
|
28
|
-
export declare function runDaemonFromCli(options?: DaemonCliOptions): Promise<void>;
|
|
29
|
-
export declare function stopDaemonFromCli(): Promise<void>;
|
|
30
|
-
export declare function restartDaemonFromCli(options?: DaemonCliOptions): Promise<void>;
|
|
31
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Command definitions for the CLI
|
|
3
|
-
*/
|
|
4
|
-
export interface CommandDef {
|
|
5
|
-
name: string;
|
|
6
|
-
description: string;
|
|
7
|
-
usage?: string;
|
|
8
|
-
args?: string[];
|
|
9
|
-
requiresArgs?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare const COMMANDS: CommandDef[];
|
|
12
|
-
/**
|
|
13
|
-
* Get a command by name
|
|
14
|
-
*/
|
|
15
|
-
export declare function getCommand(name: string): CommandDef | undefined;
|
|
16
|
-
/**
|
|
17
|
-
* Filter commands by prefix
|
|
18
|
-
*/
|
|
19
|
-
export declare function filterCommands(prefix: string): CommandDef[];
|
package/dist/commands/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ARIA CLI Commands - Command infrastructure using Commander.js
|
|
3
|
-
*/
|
|
4
|
-
import { Command } from "commander";
|
|
5
|
-
export declare const program: Command;
|
|
6
|
-
export { createArionsCommand } from "./arions.js";
|
|
7
|
-
export { createAuthCommand } from "./auth.js";
|
|
8
|
-
export { createHeadlessCallCommand } from "../headless/call-command.js";
|
|
9
|
-
export { runDaemonFromCli } from "./daemon.js";
|
|
10
|
-
export { createPairingCommand } from "./pairing.js";
|
|
11
|
-
export { createRuntimeCutoverResetCommand } from "./runtime-cutover-reset-command.js";
|
|
12
|
-
export { startHeadlessStdioServer } from "../headless/stdio-server.js";
|
|
13
|
-
export { runtimeCutoverResetCommand } from "./runtime-cutover-reset.js";
|