@agentprojectcontext/apx 1.25.0 → 1.27.1
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/package.json +42 -12
- package/skills/apx/SKILL.md +50 -119
- package/skills/apx-agency-agents/SKILL.md +141 -0
- package/skills/apx-agent/SKILL.md +100 -0
- package/skills/apx-mcp/SKILL.md +114 -0
- package/skills/apx-mcp-builder/SKILL.md +186 -0
- package/skills/apx-project/SKILL.md +100 -0
- package/skills/apx-routine/SKILL.md +138 -0
- package/skills/apx-runtime/SKILL.md +115 -0
- package/skills/apx-sessions/SKILL.md +281 -0
- package/skills/apx-skill-builder/SKILL.md +149 -0
- package/skills/apx-task/SKILL.md +95 -0
- package/skills/apx-telegram/SKILL.md +115 -0
- package/skills/apx-voice/SKILL.md +135 -0
- package/src/core/agent/constants.js +3 -0
- package/src/core/agent/ghost-guard.js +24 -0
- package/src/core/agent/index.js +35 -0
- package/src/core/agent/model-router.js +257 -0
- package/src/core/agent/prompt-builder.js +313 -0
- package/src/core/agent/prompts/channels/api.md +7 -0
- package/src/core/agent/prompts/channels/cli.md +6 -0
- package/src/core/agent/prompts/channels/code.md +20 -0
- package/src/core/agent/prompts/channels/deck.md +6 -0
- package/src/core/agent/prompts/channels/desktop.md +24 -0
- package/src/core/agent/prompts/channels/routine.md +9 -0
- package/src/core/agent/prompts/channels/telegram.md +9 -0
- package/src/core/agent/prompts/channels/terminal.md +16 -0
- package/src/core/agent/prompts/channels/web.md +7 -0
- package/src/core/agent/prompts/channels/web_sidebar.md +7 -0
- package/src/core/agent/prompts/modes/voice.md +4 -0
- package/src/core/agent/prompts/super-agent-base.md +42 -0
- package/src/core/agent/pseudo-tools.js +40 -0
- package/src/core/agent/retry.js +85 -0
- package/src/core/agent/run-agent.js +423 -0
- package/src/core/agent/self-memory.js +155 -0
- package/src/{daemon → core/agent}/tool-call-parser.js +83 -10
- package/src/core/agent/tools-overlap.js +66 -0
- package/src/core/apc-skill-sync.js +97 -0
- package/src/core/code-sessions-store.js +150 -0
- package/src/core/config.js +473 -11
- package/src/core/desktop/autostart.js +162 -0
- package/src/core/engines/_health.js +63 -0
- package/src/{daemon → core}/engines/anthropic.js +16 -0
- package/src/core/engines/gemini.js +168 -0
- package/src/core/engines/groq.js +8 -0
- package/src/{daemon → core}/engines/index.js +3 -1
- package/src/{daemon → core}/engines/mock.js +22 -0
- package/src/{daemon → core}/engines/ollama.js +35 -0
- package/src/core/engines/openai-compatible.js +145 -0
- package/src/core/engines/openai.js +8 -0
- package/src/core/engines/openrouter.js +8 -0
- package/src/core/git-baseline.js +147 -0
- package/src/core/identity.js +21 -0
- package/src/core/logging.js +1 -1
- package/src/core/mcp/index.js +14 -0
- package/src/{daemon/mcp-runner.js → core/mcp/runner.js} +18 -6
- package/src/core/mcp/sources.js +246 -0
- package/src/core/memory/active-threads.js +124 -0
- package/src/core/memory/broker.js +144 -0
- package/src/core/memory/compactor.js +186 -0
- package/src/core/memory/embed-engines/gemini.js +62 -0
- package/src/core/memory/embed-engines/index.js +148 -0
- package/src/core/memory/embed-engines/ollama.js +55 -0
- package/src/core/memory/embed-engines/openai.js +64 -0
- package/src/core/memory/embed-engines/tf.js +20 -0
- package/src/core/memory/embeddings.js +132 -0
- package/src/core/memory/index.js +161 -0
- package/src/core/memory/indexer.js +257 -0
- package/src/core/memory/store.js +231 -0
- package/src/core/messages-store.js +143 -25
- package/src/core/parser.js +78 -16
- package/src/core/scaffold.js +175 -79
- package/src/core/tasks-store.js +264 -0
- package/src/core/telegram-identity.js +126 -0
- package/src/core/tools/index.js +6 -0
- package/src/core/voice/engines/elevenlabs.js +96 -0
- package/src/core/voice/engines/gemini.js +148 -0
- package/src/core/voice/engines/index.js +144 -0
- package/src/core/voice/engines/mock.js +59 -0
- package/src/core/voice/engines/openai.js +82 -0
- package/src/core/voice/engines/piper.js +93 -0
- package/src/core/voice/index.js +3 -0
- package/src/core/voice/tts.js +89 -0
- package/src/{daemon → host/daemon}/apc-runtime-context.js +1 -1
- package/src/host/daemon/api/admin-config.js +159 -0
- package/src/host/daemon/api/admin.js +72 -0
- package/src/host/daemon/api/agents.js +284 -0
- package/src/host/daemon/api/artifacts.js +52 -0
- package/src/host/daemon/api/code.js +351 -0
- package/src/host/daemon/api/config.js +104 -0
- package/src/host/daemon/api/connections.js +42 -0
- package/src/host/daemon/api/conversations.js +161 -0
- package/src/host/daemon/api/deck.js +511 -0
- package/src/host/daemon/api/desktop.js +71 -0
- package/src/host/daemon/api/embeddings.js +65 -0
- package/src/host/daemon/api/engines.js +80 -0
- package/src/host/daemon/api/exec.js +193 -0
- package/src/host/daemon/api/health.js +10 -0
- package/src/host/daemon/api/identity.js +36 -0
- package/src/host/daemon/api/mcps.js +205 -0
- package/src/host/daemon/api/messages.js +83 -0
- package/src/host/daemon/api/pairing.js +194 -0
- package/src/host/daemon/api/plugins.js +19 -0
- package/src/host/daemon/api/projects.js +35 -0
- package/src/host/daemon/api/routines.js +84 -0
- package/src/host/daemon/api/run.js +55 -0
- package/src/host/daemon/api/runtimes.js +219 -0
- package/src/host/daemon/api/sessions-search.js +177 -0
- package/src/host/daemon/api/sessions.js +115 -0
- package/src/host/daemon/api/shared.js +217 -0
- package/src/host/daemon/api/super-agent.js +208 -0
- package/src/host/daemon/api/tasks.js +118 -0
- package/src/host/daemon/api/telegram.js +325 -0
- package/src/host/daemon/api/tools.js +21 -0
- package/src/host/daemon/api/top-level.js +131 -0
- package/src/host/daemon/api/transcribe.js +35 -0
- package/src/host/daemon/api/tts.js +44 -0
- package/src/host/daemon/api/voice.js +519 -0
- package/src/host/daemon/api/web.js +123 -0
- package/src/host/daemon/api.js +152 -0
- package/src/{daemon → host/daemon}/compact.js +1 -1
- package/src/{daemon → host/daemon}/db.js +19 -5
- package/src/{daemon/overlay-ws.js → host/daemon/desktop-ws.js} +7 -7
- package/src/host/daemon/engine-sessions.js +245 -0
- package/src/{daemon → host/daemon}/index.js +27 -10
- package/src/{daemon/plugins/overlay.js → host/daemon/plugins/desktop.js} +36 -28
- package/src/{daemon → host/daemon}/plugins/index.js +2 -2
- package/src/{daemon → host/daemon}/plugins/telegram.js +165 -33
- package/src/{daemon → host/daemon}/project-config.js +31 -7
- package/src/{daemon → host/daemon}/routines.js +27 -8
- package/src/{daemon → host/daemon}/skills-loader.js +4 -2
- package/src/{daemon → host/daemon}/smoke.js +9 -5
- package/src/{daemon → host/daemon}/super-agent-tools/helpers.js +1 -1
- package/src/host/daemon/super-agent-tools/index.js +157 -0
- package/src/{daemon → host/daemon}/super-agent-tools/registry-bridge.js +1 -1
- package/src/{daemon → host/daemon}/super-agent-tools/tools/add-project.js +2 -2
- package/src/{daemon → host/daemon}/super-agent-tools/tools/ask-questions.js +4 -0
- package/src/{daemon → host/daemon}/super-agent-tools/tools/call-agent.js +5 -2
- package/src/{daemon → host/daemon}/super-agent-tools/tools/call-runtime.js +117 -8
- package/src/host/daemon/super-agent-tools/tools/create-task.js +52 -0
- package/src/{daemon → host/daemon}/super-agent-tools/tools/import-agent.js +2 -3
- package/src/{daemon → host/daemon}/super-agent-tools/tools/list-agents.js +1 -1
- package/src/host/daemon/super-agent-tools/tools/list-tasks.js +52 -0
- package/src/{daemon → host/daemon}/super-agent-tools/tools/list-vault-agents.js +1 -1
- package/src/host/daemon/super-agent-tools/tools/read-self-memory.js +21 -0
- package/src/host/daemon/super-agent-tools/tools/remember.js +40 -0
- package/src/{daemon → host/daemon}/super-agent-tools/tools/search-messages.js +1 -1
- package/src/host/daemon/super-agent-tools/tools/search-sessions.js +134 -0
- package/src/{daemon → host/daemon}/super-agent-tools/tools/send-telegram.js +2 -2
- package/src/{daemon → host/daemon}/super-agent-tools/tools/set-identity.js +1 -1
- package/src/{daemon → host/daemon}/super-agent-tools/tools/set-permission-mode.js +1 -1
- package/src/{daemon → host/daemon}/super-agent-tools/tools/tail-messages.js +1 -1
- package/src/host/daemon/super-agent.js +129 -0
- package/src/host/daemon/token-store.js +118 -0
- package/src/host/daemon/tool-call-parser.js +2 -0
- package/src/{daemon → host/daemon}/transcription.js +1 -1
- package/src/{daemon → host/daemon}/wakeup.js +2 -2
- package/src/interfaces/cli/claude-permissions.js +33 -0
- package/src/{cli → interfaces/cli}/commands/agent.js +43 -8
- package/src/{cli → interfaces/cli}/commands/command.js +1 -1
- package/src/{cli → interfaces/cli}/commands/config.js +1 -1
- package/src/{cli → interfaces/cli}/commands/daemon.js +67 -0
- package/src/interfaces/cli/commands/desktop.js +335 -0
- package/src/interfaces/cli/commands/exec.js +92 -0
- package/src/{cli → interfaces/cli}/commands/identity.js +6 -63
- package/src/{cli → interfaces/cli}/commands/init.js +1 -1
- package/src/{cli → interfaces/cli}/commands/mcp.js +69 -10
- package/src/{cli → interfaces/cli}/commands/memory.js +2 -2
- package/src/interfaces/cli/commands/model.js +136 -0
- package/src/interfaces/cli/commands/pair.js +170 -0
- package/src/interfaces/cli/commands/project-config.js +131 -0
- package/src/{cli → interfaces/cli}/commands/project.js +1 -1
- package/src/{cli → interfaces/cli}/commands/search.js +1 -1
- package/src/interfaces/cli/commands/session.js +892 -0
- package/src/interfaces/cli/commands/sessions.js +997 -0
- package/src/{cli → interfaces/cli}/commands/setup.js +98 -4
- package/src/{cli → interfaces/cli}/commands/skills.js +117 -9
- package/src/{cli → interfaces/cli}/commands/status.js +9 -1
- package/src/{cli → interfaces/cli}/commands/sys.js +96 -17
- package/src/interfaces/cli/commands/task.js +179 -0
- package/src/interfaces/cli/commands/telegram.js +366 -0
- package/src/{cli → interfaces/cli}/commands/update.js +1 -1
- package/src/interfaces/cli/commands/voice.js +258 -0
- package/src/{cli → interfaces/cli}/http.js +6 -2
- package/src/{cli → interfaces/cli}/index.js +955 -63
- package/src/interfaces/cli/postinstall.js +34 -0
- package/src/interfaces/desktop/assets/app-icon-180.png +0 -0
- package/src/interfaces/desktop/assets/app-icon-32.png +0 -0
- package/src/interfaces/desktop/assets/app-icon.png +0 -0
- package/src/interfaces/desktop/assets/apx-logo.png +0 -0
- package/src/interfaces/desktop/assets/superagent.png +0 -0
- package/src/interfaces/desktop/assets/tray-icon.png +0 -0
- package/src/interfaces/desktop/index.html +18 -0
- package/src/interfaces/desktop/main.js +652 -0
- package/src/interfaces/desktop/preload.js +48 -0
- package/src/interfaces/desktop/renderer.js +1006 -0
- package/src/interfaces/desktop/style.css +400 -0
- package/src/{mcp → interfaces/mcp-server}/index.js +2 -2
- package/src/interfaces/tui/_shims/util-which.ts +53 -0
- package/src/{tui → interfaces/tui}/app.tsx +2 -2
- package/src/{tui → interfaces/tui}/component/prompt/index.tsx +4 -1
- package/src/{tui → interfaces/tui}/context/sdk-apx.tsx +84 -16
- package/src/interfaces/tui/context/sync-apx.tsx +398 -0
- package/src/interfaces/tui/routes/session/index.tsx +368 -0
- package/src/interfaces/tui/routes/session/message-actions.tsx +58 -0
- package/src/interfaces/tui/routes/session/sidebar-apx.tsx +114 -0
- package/src/{tui → interfaces/tui}/tsconfig.json +1 -0
- package/src/{tui → interfaces/tui}/util/clipboard.ts +1 -1
- package/src/interfaces/web/README.md +102 -0
- package/src/interfaces/web/coming-soon.html +65 -0
- package/src/interfaces/web/components.json +25 -0
- package/src/interfaces/web/dist/assets/index-BDUsA6L6.css +1 -0
- package/src/interfaces/web/dist/assets/index-CfWyjPBa.js +548 -0
- package/src/interfaces/web/dist/assets/index-CfWyjPBa.js.map +1 -0
- package/src/interfaces/web/dist/favicon/dark/android-chrome-192x192.png +0 -0
- package/src/interfaces/web/dist/favicon/dark/android-chrome-512x512.png +0 -0
- package/src/interfaces/web/dist/favicon/dark/apple-touch-icon.png +0 -0
- package/src/interfaces/web/dist/favicon/dark/favicon-16x16.png +0 -0
- package/src/interfaces/web/dist/favicon/dark/favicon-32x32.png +0 -0
- package/src/interfaces/web/dist/favicon/dark/favicon-48x48.png +0 -0
- package/src/interfaces/web/dist/favicon/dark/favicon.ico +0 -0
- package/src/interfaces/web/dist/favicon/dark/favicon.webp +0 -0
- package/src/interfaces/web/dist/favicon/dark/site.webmanifest +18 -0
- package/src/interfaces/web/dist/favicon/white/android-chrome-192x192.png +0 -0
- package/src/interfaces/web/dist/favicon/white/android-chrome-512x512.png +0 -0
- package/src/interfaces/web/dist/favicon/white/apple-touch-icon.png +0 -0
- package/src/interfaces/web/dist/favicon/white/favicon-16x16.png +0 -0
- package/src/interfaces/web/dist/favicon/white/favicon-32x32.png +0 -0
- package/src/interfaces/web/dist/favicon/white/favicon-48x48.png +0 -0
- package/src/interfaces/web/dist/favicon/white/favicon.ico +0 -0
- package/src/interfaces/web/dist/favicon/white/favicon.webp +0 -0
- package/src/interfaces/web/dist/favicon/white/site.webmanifest +18 -0
- package/src/interfaces/web/dist/index.html +27 -0
- package/src/interfaces/web/dist/logo/logo_dark.webp +0 -0
- package/src/interfaces/web/dist/logo/logo_only_dark.webp +0 -0
- package/src/interfaces/web/dist/logo/logo_only_white.webp +0 -0
- package/src/interfaces/web/dist/logo/logo_vertical_dark.webp +0 -0
- package/src/interfaces/web/dist/logo/logo_vertical_white.webp +0 -0
- package/src/interfaces/web/dist/logo/logo_white.webp +0 -0
- package/src/interfaces/web/dist/modules/superagent.png +0 -0
- package/src/interfaces/web/index.html +26 -0
- package/src/interfaces/web/package-lock.json +4253 -0
- package/src/interfaces/web/package.json +55 -0
- package/src/interfaces/web/playwright.config.ts +45 -0
- package/src/interfaces/web/pnpm-lock.yaml +2946 -0
- package/src/interfaces/web/public/favicon/dark/android-chrome-192x192.png +0 -0
- package/src/interfaces/web/public/favicon/dark/android-chrome-512x512.png +0 -0
- package/src/interfaces/web/public/favicon/dark/apple-touch-icon.png +0 -0
- package/src/interfaces/web/public/favicon/dark/favicon-16x16.png +0 -0
- package/src/interfaces/web/public/favicon/dark/favicon-32x32.png +0 -0
- package/src/interfaces/web/public/favicon/dark/favicon-48x48.png +0 -0
- package/src/interfaces/web/public/favicon/dark/favicon.ico +0 -0
- package/src/interfaces/web/public/favicon/dark/favicon.webp +0 -0
- package/src/interfaces/web/public/favicon/dark/site.webmanifest +18 -0
- package/src/interfaces/web/public/favicon/white/android-chrome-192x192.png +0 -0
- package/src/interfaces/web/public/favicon/white/android-chrome-512x512.png +0 -0
- package/src/interfaces/web/public/favicon/white/apple-touch-icon.png +0 -0
- package/src/interfaces/web/public/favicon/white/favicon-16x16.png +0 -0
- package/src/interfaces/web/public/favicon/white/favicon-32x32.png +0 -0
- package/src/interfaces/web/public/favicon/white/favicon-48x48.png +0 -0
- package/src/interfaces/web/public/favicon/white/favicon.ico +0 -0
- package/src/interfaces/web/public/favicon/white/favicon.webp +0 -0
- package/src/interfaces/web/public/favicon/white/site.webmanifest +18 -0
- package/src/interfaces/web/public/logo/logo_dark.webp +0 -0
- package/src/interfaces/web/public/logo/logo_only_dark.webp +0 -0
- package/src/interfaces/web/public/logo/logo_only_white.webp +0 -0
- package/src/interfaces/web/public/logo/logo_vertical_dark.webp +0 -0
- package/src/interfaces/web/public/logo/logo_vertical_white.webp +0 -0
- package/src/interfaces/web/public/logo/logo_white.webp +0 -0
- package/src/interfaces/web/public/modules/superagent.png +0 -0
- package/src/interfaces/web/src/App.tsx +199 -0
- package/src/interfaces/web/src/components/AddProjectDialog.tsx +121 -0
- package/src/interfaces/web/src/components/ModelCombobox.tsx +96 -0
- package/src/interfaces/web/src/components/RobyBubble.tsx +213 -0
- package/src/interfaces/web/src/components/Section.tsx +44 -0
- package/src/interfaces/web/src/components/TelegramChannelDialog.tsx +97 -0
- package/src/interfaces/web/src/components/TelegramSendDialog.tsx +48 -0
- package/src/interfaces/web/src/components/Toast.tsx +84 -0
- package/src/interfaces/web/src/components/UiSelect.tsx +74 -0
- package/src/interfaces/web/src/components/chat/Composer.tsx +43 -0
- package/src/interfaces/web/src/components/chat/ContextBar.tsx +111 -0
- package/src/interfaces/web/src/components/chat/MessageBubble.tsx +95 -0
- package/src/interfaces/web/src/components/chat/MessageList.tsx +35 -0
- package/src/interfaces/web/src/components/chat/ModelPicker.tsx +145 -0
- package/src/interfaces/web/src/components/chat/ToolCall.tsx +141 -0
- package/src/interfaces/web/src/components/code/CodeChangesTab.tsx +87 -0
- package/src/interfaces/web/src/components/code/CodeComposer.tsx +87 -0
- package/src/interfaces/web/src/components/code/CodeContextTab.tsx +83 -0
- package/src/interfaces/web/src/components/code/CodeProjectPicker.tsx +39 -0
- package/src/interfaces/web/src/components/code/CodeSessionList.tsx +97 -0
- package/src/interfaces/web/src/components/code/CodeSidePanel.tsx +44 -0
- package/src/interfaces/web/src/components/code/CodeToolTrail.tsx +29 -0
- package/src/interfaces/web/src/components/code/DiffView.tsx +67 -0
- package/src/interfaces/web/src/components/common/Qr.tsx +27 -0
- package/src/interfaces/web/src/components/common/TabLayout.tsx +46 -0
- package/src/interfaces/web/src/components/common/TabNav.tsx +113 -0
- package/src/interfaces/web/src/components/config/ConfigTabsEditor.tsx +202 -0
- package/src/interfaces/web/src/components/config/GlobalConfigEditor.tsx +42 -0
- package/src/interfaces/web/src/components/config/global-config-sections.ts +60 -0
- package/src/interfaces/web/src/components/config/project-config-sections.ts +58 -0
- package/src/interfaces/web/src/components/deck/DaemonCard.tsx +58 -0
- package/src/interfaces/web/src/components/deck/DesktopGroup.tsx +33 -0
- package/src/interfaces/web/src/components/deck/WidgetRow.tsx +100 -0
- package/src/interfaces/web/src/components/layout/Logo.tsx +59 -0
- package/src/interfaces/web/src/components/layout/ProjectAvatar.tsx +116 -0
- package/src/interfaces/web/src/components/layout/ProjectSidebar.tsx +151 -0
- package/src/interfaces/web/src/components/settings/AdvancedPanel.tsx +45 -0
- package/src/interfaces/web/src/components/settings/AppearancePanel.tsx +72 -0
- package/src/interfaces/web/src/components/settings/DefaultRouterCard.tsx +232 -0
- package/src/interfaces/web/src/components/settings/DevicesPanel.tsx +60 -0
- package/src/interfaces/web/src/components/settings/EnginesPanel.tsx +127 -0
- package/src/interfaces/web/src/components/settings/IdentityPanel.tsx +69 -0
- package/src/interfaces/web/src/components/settings/MemoryPanel.tsx +226 -0
- package/src/interfaces/web/src/components/settings/PairDeviceDialog.tsx +175 -0
- package/src/interfaces/web/src/components/settings/SuperAgentPanel.tsx +93 -0
- package/src/interfaces/web/src/components/settings/TelegramChannelsPanel.tsx +90 -0
- package/src/interfaces/web/src/components/settings/TelegramContactsPanel.tsx +101 -0
- package/src/interfaces/web/src/components/settings/TelegramGlobalPanel.tsx +100 -0
- package/src/interfaces/web/src/components/settings/TelegramRolesPanel.tsx +108 -0
- package/src/interfaces/web/src/components/settings/TelegramSettingsTabs.tsx +55 -0
- package/src/interfaces/web/src/components/settings/providers/ProviderCard.tsx +95 -0
- package/src/interfaces/web/src/components/settings/providers/ProviderModal.tsx +405 -0
- package/src/interfaces/web/src/components/settings/providers/typeStyles.ts +155 -0
- package/src/interfaces/web/src/components/settings/providers/types.ts +26 -0
- package/src/interfaces/web/src/components/ui/accordion.tsx +72 -0
- package/src/interfaces/web/src/components/ui/alert-dialog.tsx +187 -0
- package/src/interfaces/web/src/components/ui/alert.tsx +76 -0
- package/src/interfaces/web/src/components/ui/aspect-ratio.tsx +22 -0
- package/src/interfaces/web/src/components/ui/avatar.tsx +107 -0
- package/src/interfaces/web/src/components/ui/badge.tsx +52 -0
- package/src/interfaces/web/src/components/ui/breadcrumb.tsx +125 -0
- package/src/interfaces/web/src/components/ui/button-group.tsx +87 -0
- package/src/interfaces/web/src/components/ui/button.tsx +58 -0
- package/src/interfaces/web/src/components/ui/calendar.tsx +221 -0
- package/src/interfaces/web/src/components/ui/card.tsx +103 -0
- package/src/interfaces/web/src/components/ui/carousel.tsx +242 -0
- package/src/interfaces/web/src/components/ui/chart.tsx +371 -0
- package/src/interfaces/web/src/components/ui/chat-input.tsx +122 -0
- package/src/interfaces/web/src/components/ui/checkbox.tsx +29 -0
- package/src/interfaces/web/src/components/ui/collapsible.tsx +19 -0
- package/src/interfaces/web/src/components/ui/combobox.tsx +295 -0
- package/src/interfaces/web/src/components/ui/command.tsx +196 -0
- package/src/interfaces/web/src/components/ui/context-menu.tsx +271 -0
- package/src/interfaces/web/src/components/ui/dialog.tsx +158 -0
- package/src/interfaces/web/src/components/ui/direction.tsx +4 -0
- package/src/interfaces/web/src/components/ui/drawer.tsx +134 -0
- package/src/interfaces/web/src/components/ui/dropdown-menu.tsx +266 -0
- package/src/interfaces/web/src/components/ui/empty.tsx +104 -0
- package/src/interfaces/web/src/components/ui/field.tsx +236 -0
- package/src/interfaces/web/src/components/ui/hover-card.tsx +51 -0
- package/src/interfaces/web/src/components/ui/input-group.tsx +158 -0
- package/src/interfaces/web/src/components/ui/input-otp.tsx +85 -0
- package/src/interfaces/web/src/components/ui/input.tsx +20 -0
- package/src/interfaces/web/src/components/ui/item.tsx +201 -0
- package/src/interfaces/web/src/components/ui/kbd.tsx +26 -0
- package/src/interfaces/web/src/components/ui/label.tsx +20 -0
- package/src/interfaces/web/src/components/ui/menubar.tsx +280 -0
- package/src/interfaces/web/src/components/ui/native-select.tsx +61 -0
- package/src/interfaces/web/src/components/ui/navigation-menu.tsx +168 -0
- package/src/interfaces/web/src/components/ui/pagination.tsx +130 -0
- package/src/interfaces/web/src/components/ui/popover.tsx +88 -0
- package/src/interfaces/web/src/components/ui/progress.tsx +83 -0
- package/src/interfaces/web/src/components/ui/radio-group.tsx +36 -0
- package/src/interfaces/web/src/components/ui/resizable.tsx +50 -0
- package/src/interfaces/web/src/components/ui/scroll-area.tsx +53 -0
- package/src/interfaces/web/src/components/ui/select.tsx +201 -0
- package/src/interfaces/web/src/components/ui/separator.tsx +23 -0
- package/src/interfaces/web/src/components/ui/sheet.tsx +138 -0
- package/src/interfaces/web/src/components/ui/sidebar.tsx +723 -0
- package/src/interfaces/web/src/components/ui/skeleton.tsx +13 -0
- package/src/interfaces/web/src/components/ui/slider.tsx +52 -0
- package/src/interfaces/web/src/components/ui/sonner.tsx +49 -0
- package/src/interfaces/web/src/components/ui/spinner.tsx +10 -0
- package/src/interfaces/web/src/components/ui/switch.tsx +30 -0
- package/src/interfaces/web/src/components/ui/table.tsx +116 -0
- package/src/interfaces/web/src/components/ui/tabs.tsx +72 -0
- package/src/interfaces/web/src/components/ui/textarea.tsx +18 -0
- package/src/interfaces/web/src/components/ui/tip.tsx +21 -0
- package/src/interfaces/web/src/components/ui/toggle-group.tsx +87 -0
- package/src/interfaces/web/src/components/ui/toggle.tsx +45 -0
- package/src/interfaces/web/src/components/ui/tooltip.tsx +64 -0
- package/src/interfaces/web/src/components/ui.tsx +211 -0
- package/src/interfaces/web/src/components/voice/VoiceProviderList.tsx +197 -0
- package/src/interfaces/web/src/components/voice/VoiceProviderModal.tsx +213 -0
- package/src/interfaces/web/src/components/voice/VoiceSttCard.tsx +72 -0
- package/src/interfaces/web/src/components/voice/VoiceTestCard.tsx +112 -0
- package/src/interfaces/web/src/components/voice/useTtsPlayer.ts +59 -0
- package/src/interfaces/web/src/constants/index.ts +91 -0
- package/src/interfaces/web/src/hooks/use-mobile.ts +19 -0
- package/src/interfaces/web/src/hooks/useChat.ts +276 -0
- package/src/interfaces/web/src/hooks/useDaemonStatus.ts +12 -0
- package/src/interfaces/web/src/hooks/useDevices.ts +12 -0
- package/src/interfaces/web/src/hooks/useEngines.ts +10 -0
- package/src/interfaces/web/src/hooks/useGlobalConfig.ts +24 -0
- package/src/interfaces/web/src/hooks/useIdentity.ts +16 -0
- package/src/interfaces/web/src/hooks/useProjects.ts +27 -0
- package/src/interfaces/web/src/hooks/useTelegram.ts +35 -0
- package/src/interfaces/web/src/hooks/useTheme.tsx +57 -0
- package/src/interfaces/web/src/hooks/useTokenBootstrap.ts +122 -0
- package/src/interfaces/web/src/i18n/en.ts +767 -0
- package/src/interfaces/web/src/i18n/es.ts +770 -0
- package/src/interfaces/web/src/i18n/index.ts +86 -0
- package/src/interfaces/web/src/lib/api/admin.ts +30 -0
- package/src/interfaces/web/src/lib/api/agents.ts +46 -0
- package/src/interfaces/web/src/lib/api/code.ts +122 -0
- package/src/interfaces/web/src/lib/api/conversations.ts +16 -0
- package/src/interfaces/web/src/lib/api/deck.ts +106 -0
- package/src/interfaces/web/src/lib/api/desktop.ts +54 -0
- package/src/interfaces/web/src/lib/api/embeddings.ts +44 -0
- package/src/interfaces/web/src/lib/api/engines.ts +17 -0
- package/src/interfaces/web/src/lib/api/filesystem.ts +12 -0
- package/src/interfaces/web/src/lib/api/health.ts +6 -0
- package/src/interfaces/web/src/lib/api/identity.ts +7 -0
- package/src/interfaces/web/src/lib/api/mcps.ts +29 -0
- package/src/interfaces/web/src/lib/api/messages.ts +24 -0
- package/src/interfaces/web/src/lib/api/projects.ts +29 -0
- package/src/interfaces/web/src/lib/api/routines.ts +14 -0
- package/src/interfaces/web/src/lib/api/sessions.ts +16 -0
- package/src/interfaces/web/src/lib/api/super_agent.ts +29 -0
- package/src/interfaces/web/src/lib/api/tasks.ts +19 -0
- package/src/interfaces/web/src/lib/api/telegram.ts +57 -0
- package/src/interfaces/web/src/lib/api/tools.ts +13 -0
- package/src/interfaces/web/src/lib/api/voice.ts +169 -0
- package/src/interfaces/web/src/lib/api.ts +48 -0
- package/src/interfaces/web/src/lib/cn.ts +6 -0
- package/src/interfaces/web/src/lib/code-context.ts +83 -0
- package/src/interfaces/web/src/lib/config-values.ts +29 -0
- package/src/interfaces/web/src/lib/device.ts +10 -0
- package/src/interfaces/web/src/lib/http.ts +104 -0
- package/src/interfaces/web/src/lib/secrets.ts +15 -0
- package/src/interfaces/web/src/lib/utils.ts +6 -0
- package/src/interfaces/web/src/main.tsx +16 -0
- package/src/interfaces/web/src/screens/ApxAdminScreen.tsx +174 -0
- package/src/interfaces/web/src/screens/PairingScreen.tsx +105 -0
- package/src/interfaces/web/src/screens/ProjectScreen.tsx +178 -0
- package/src/interfaces/web/src/screens/SettingsScreen.tsx +111 -0
- package/src/interfaces/web/src/screens/base/AgentDefaultsTab.tsx +274 -0
- package/src/interfaces/web/src/screens/base/ComingSoon.tsx +16 -0
- package/src/interfaces/web/src/screens/base/GlobalTasksTab.tsx +53 -0
- package/src/interfaces/web/src/screens/base/LogsTab.tsx +188 -0
- package/src/interfaces/web/src/screens/base/ModelsTab.tsx +13 -0
- package/src/interfaces/web/src/screens/base/SessionsTab.tsx +58 -0
- package/src/interfaces/web/src/screens/base/WorkspacesTab.tsx +49 -0
- package/src/interfaces/web/src/screens/modules/CodeScreen.tsx +295 -0
- package/src/interfaces/web/src/screens/modules/DeckScreen.tsx +173 -0
- package/src/interfaces/web/src/screens/modules/DesktopScreen.tsx +304 -0
- package/src/interfaces/web/src/screens/modules/VoiceScreen.tsx +174 -0
- package/src/interfaces/web/src/screens/project/AgentBrainGraph.tsx +152 -0
- package/src/interfaces/web/src/screens/project/AgentDetailScreen.tsx +455 -0
- package/src/interfaces/web/src/screens/project/AgentsTab.tsx +364 -0
- package/src/interfaces/web/src/screens/project/ChatTab.tsx +198 -0
- package/src/interfaces/web/src/screens/project/ConfigTab.tsx +94 -0
- package/src/interfaces/web/src/screens/project/McpsTab.tsx +149 -0
- package/src/interfaces/web/src/screens/project/MemoriesTab.tsx +134 -0
- package/src/interfaces/web/src/screens/project/Overview.tsx +37 -0
- package/src/interfaces/web/src/screens/project/RoutinesTab.tsx +386 -0
- package/src/interfaces/web/src/screens/project/TasksTab.tsx +116 -0
- package/src/interfaces/web/src/screens/project/TelegramTab.tsx +126 -0
- package/src/interfaces/web/src/screens/project/ThreadsTab.tsx +100 -0
- package/src/interfaces/web/src/styles.css +128 -0
- package/src/interfaces/web/src/types/daemon.ts +289 -0
- package/src/interfaces/web/tailwind.config.js +53 -0
- package/src/interfaces/web/tsconfig.json +24 -0
- package/src/interfaces/web/vite.config.ts +50 -0
- package/src/cli/commands/exec.js +0 -56
- package/src/cli/commands/overlay.js +0 -253
- package/src/cli/commands/session.js +0 -395
- package/src/cli/commands/sessions.js +0 -517
- package/src/cli/commands/telegram.js +0 -77
- package/src/cli/postinstall.js +0 -75
- package/src/cli-ts/commands/agent.ts +0 -173
- package/src/cli-ts/commands/chat.ts +0 -119
- package/src/cli-ts/commands/daemon.ts +0 -112
- package/src/cli-ts/commands/exec.ts +0 -109
- package/src/cli-ts/commands/mcp.ts +0 -235
- package/src/cli-ts/commands/session.ts +0 -224
- package/src/cli-ts/commands/status.ts +0 -61
- package/src/cli-ts/http.ts +0 -36
- package/src/cli-ts/index.ts +0 -73
- package/src/cli-ts/ui.ts +0 -107
- package/src/daemon/api.js +0 -1558
- package/src/daemon/engines/gemini.js +0 -56
- package/src/daemon/engines/openai.js +0 -79
- package/src/daemon/mcp-sources.js +0 -114
- package/src/daemon/super-agent-tools/index.js +0 -84
- package/src/daemon/super-agent-tools.js +0 -1
- package/src/daemon/super-agent.js +0 -541
- package/src/overlay/index.html +0 -44
- package/src/overlay/main.js +0 -480
- package/src/overlay/preload.js +0 -34
- package/src/overlay/renderer.js +0 -371
- package/src/overlay/style.css +0 -250
- package/src/tui/context/sync-apx.tsx +0 -284
- package/src/tui/routes/session/index.tsx +0 -274
- package/src/tui/routes/session/sidebar-apx.tsx +0 -90
- /package/src/{daemon → core}/tools/browser.js +0 -0
- /package/src/{daemon → core}/tools/fetch.js +0 -0
- /package/src/{daemon → core}/tools/glob.js +0 -0
- /package/src/{daemon → core}/tools/grep.js +0 -0
- /package/src/{daemon → core}/tools/registry.js +0 -0
- /package/src/{daemon → core}/tools/search.js +0 -0
- /package/src/{daemon → host/daemon}/conversations.js +0 -0
- /package/src/{daemon → host/daemon}/env-detect.js +0 -0
- /package/src/{daemon → host/daemon}/runtimes/_spawn.js +0 -0
- /package/src/{daemon → host/daemon}/runtimes/aider.js +0 -0
- /package/src/{daemon → host/daemon}/runtimes/claude-code.js +0 -0
- /package/src/{daemon → host/daemon}/runtimes/codex.js +0 -0
- /package/src/{daemon → host/daemon}/runtimes/cursor-agent.js +0 -0
- /package/src/{daemon → host/daemon}/runtimes/gemini-cli.js +0 -0
- /package/src/{daemon → host/daemon}/runtimes/index.js +0 -0
- /package/src/{daemon → host/daemon}/runtimes/opencode.js +0 -0
- /package/src/{daemon → host/daemon}/runtimes/qwen-code.js +0 -0
- /package/src/{daemon → host/daemon}/super-agent-tools/tools/call-mcp.js +0 -0
- /package/src/{daemon → host/daemon}/super-agent-tools/tools/edit-file.js +0 -0
- /package/src/{daemon → host/daemon}/super-agent-tools/tools/list-files.js +0 -0
- /package/src/{daemon → host/daemon}/super-agent-tools/tools/list-mcps.js +0 -0
- /package/src/{daemon → host/daemon}/super-agent-tools/tools/list-projects.js +0 -0
- /package/src/{daemon → host/daemon}/super-agent-tools/tools/list-skills.js +0 -0
- /package/src/{daemon → host/daemon}/super-agent-tools/tools/load-skill.js +0 -0
- /package/src/{daemon → host/daemon}/super-agent-tools/tools/read-agent-memory.js +0 -0
- /package/src/{daemon → host/daemon}/super-agent-tools/tools/read-file.js +0 -0
- /package/src/{daemon → host/daemon}/super-agent-tools/tools/run-shell.js +0 -0
- /package/src/{daemon → host/daemon}/super-agent-tools/tools/search-files.js +0 -0
- /package/src/{daemon → host/daemon}/super-agent-tools/tools/transcribe-audio.js +0 -0
- /package/src/{daemon → host/daemon}/super-agent-tools/tools/write-file.js +0 -0
- /package/src/{daemon → host/daemon}/thinking.js +0 -0
- /package/src/{daemon → host/daemon}/whisper-server.py +0 -0
- /package/src/{daemon → host/daemon}/whisper-transcribe.py +0 -0
- /package/src/{cli → interfaces/cli}/commands/a2a.js +0 -0
- /package/src/{cli → interfaces/cli}/commands/artifact.js +0 -0
- /package/src/{cli → interfaces/cli}/commands/chat.js +0 -0
- /package/src/{cli → interfaces/cli}/commands/log.js +0 -0
- /package/src/{cli → interfaces/cli}/commands/messages.js +0 -0
- /package/src/{cli → interfaces/cli}/commands/plugins.js +0 -0
- /package/src/{cli → interfaces/cli}/commands/routine.js +0 -0
- /package/src/{cli → interfaces/cli}/commands/runtime.js +0 -0
- /package/src/{cli → interfaces/cli}/terminal-chat/renderer.js +0 -0
- /package/src/{overlay → interfaces/desktop}/package.json +0 -0
- /package/src/{tui → interfaces/tui}/_shims/cli-error.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/cli-logo.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/cli-ui.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/config-console-state.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/core-any.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/core-binary.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/core-flag.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/core-log.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/lsp-language.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/opencode-any.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/opencode-sdk-v2.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/plugin-tui.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/prompt-display.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/provider-provider.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/session-retry.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/session-schema.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/session-session.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/snapshot.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/tool-any.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/util-error.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/util-filesystem.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/util-format.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/util-iife.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/util-locale.ts +0 -0
- /package/src/{tui → interfaces/tui}/_shims/util-process.ts +0 -0
- /package/src/{tui → interfaces/tui}/asset/charge.wav +0 -0
- /package/src/{tui → interfaces/tui}/asset/pulse-a.wav +0 -0
- /package/src/{tui → interfaces/tui}/asset/pulse-b.wav +0 -0
- /package/src/{tui → interfaces/tui}/asset/pulse-c.wav +0 -0
- /package/src/{tui → interfaces/tui}/attach.ts +0 -0
- /package/src/{tui → interfaces/tui}/component/bg-pulse-render.ts +0 -0
- /package/src/{tui → interfaces/tui}/component/bg-pulse.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/border.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/dialog-agent.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/dialog-console-org.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/dialog-mcp.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/dialog-model.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/dialog-provider.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/dialog-retry-action.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/dialog-session-delete-failed.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/dialog-session-list.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/dialog-session-rename.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/dialog-skill.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/dialog-stash.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/dialog-status.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/dialog-tag.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/dialog-theme-list.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/dialog-variant.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/dialog-workspace-create.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/dialog-workspace-file-changes.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/dialog-workspace-unavailable.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/error-component.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/logo.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/plugin-route-missing.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/prompt/autocomplete.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/prompt/cwd.ts +0 -0
- /package/src/{tui → interfaces/tui}/component/prompt/frecency.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/prompt/history.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/prompt/part.ts +0 -0
- /package/src/{tui → interfaces/tui}/component/prompt/stash.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/prompt/traits.ts +0 -0
- /package/src/{tui → interfaces/tui}/component/spinner.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/startup-loading.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/todo-item.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/use-connected.tsx +0 -0
- /package/src/{tui → interfaces/tui}/component/workspace-label.tsx +0 -0
- /package/src/{tui → interfaces/tui}/config/cwd.ts +0 -0
- /package/src/{tui → interfaces/tui}/config/keybind.ts +0 -0
- /package/src/{tui → interfaces/tui}/config/tui-migrate.ts +0 -0
- /package/src/{tui → interfaces/tui}/config/tui-schema.ts +0 -0
- /package/src/{tui → interfaces/tui}/config/tui.ts +0 -0
- /package/src/{tui → interfaces/tui}/context/aggregate-failures.ts +0 -0
- /package/src/{tui → interfaces/tui}/context/args.tsx +0 -0
- /package/src/{tui → interfaces/tui}/context/command-palette.tsx +0 -0
- /package/src/{tui → interfaces/tui}/context/directory.ts +0 -0
- /package/src/{tui → interfaces/tui}/context/editor-zed.ts +0 -0
- /package/src/{tui → interfaces/tui}/context/editor.ts +0 -0
- /package/src/{tui → interfaces/tui}/context/event-apx.ts +0 -0
- /package/src/{tui → interfaces/tui}/context/event.ts +0 -0
- /package/src/{tui → interfaces/tui}/context/exit.tsx +0 -0
- /package/src/{tui → interfaces/tui}/context/helper.tsx +0 -0
- /package/src/{tui → interfaces/tui}/context/kv.tsx +0 -0
- /package/src/{tui → interfaces/tui}/context/local.tsx +0 -0
- /package/src/{tui → interfaces/tui}/context/path-format.tsx +0 -0
- /package/src/{tui → interfaces/tui}/context/project-apx.tsx +0 -0
- /package/src/{tui → interfaces/tui}/context/project.tsx +0 -0
- /package/src/{tui → interfaces/tui}/context/prompt.tsx +0 -0
- /package/src/{tui → interfaces/tui}/context/route.tsx +0 -0
- /package/src/{tui → interfaces/tui}/context/sdk.tsx +0 -0
- /package/src/{tui → interfaces/tui}/context/sync-v2.tsx +0 -0
- /package/src/{tui → interfaces/tui}/context/sync.tsx +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/aura.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/ayu.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/carbonfox.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/catppuccin-frappe.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/catppuccin-macchiato.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/catppuccin.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/cobalt2.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/cursor.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/dracula.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/everforest.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/flexoki.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/github.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/gruvbox.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/kanagawa.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/lucent-orng.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/material.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/matrix.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/mercury.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/monokai.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/nightowl.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/nord.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/one-dark.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/opencode.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/orng.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/osaka-jade.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/palenight.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/rosepine.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/solarized.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/synthwave84.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/tokyonight.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/vercel.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/vesper.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme/zenburn.json +0 -0
- /package/src/{tui → interfaces/tui}/context/theme.tsx +0 -0
- /package/src/{tui → interfaces/tui}/context/tui-config.tsx +0 -0
- /package/src/{tui → interfaces/tui}/event.ts +0 -0
- /package/src/{tui → interfaces/tui}/feature-plugins/home/footer.tsx +0 -0
- /package/src/{tui → interfaces/tui}/feature-plugins/home/tips-view.tsx +0 -0
- /package/src/{tui → interfaces/tui}/feature-plugins/home/tips.tsx +0 -0
- /package/src/{tui → interfaces/tui}/feature-plugins/sidebar/context.tsx +0 -0
- /package/src/{tui → interfaces/tui}/feature-plugins/sidebar/files.tsx +0 -0
- /package/src/{tui → interfaces/tui}/feature-plugins/sidebar/footer.tsx +0 -0
- /package/src/{tui → interfaces/tui}/feature-plugins/sidebar/lsp.tsx +0 -0
- /package/src/{tui → interfaces/tui}/feature-plugins/sidebar/mcp.tsx +0 -0
- /package/src/{tui → interfaces/tui}/feature-plugins/sidebar/todo.tsx +0 -0
- /package/src/{tui → interfaces/tui}/feature-plugins/system/plugins.tsx +0 -0
- /package/src/{tui → interfaces/tui}/feature-plugins/system/session-v2.tsx +0 -0
- /package/src/{tui → interfaces/tui}/feature-plugins/system/which-key.tsx +0 -0
- /package/src/{tui → interfaces/tui}/keymap.tsx +0 -0
- /package/src/{tui → interfaces/tui}/layer.ts +0 -0
- /package/src/{tui → interfaces/tui}/plugin/api.tsx +0 -0
- /package/src/{tui → interfaces/tui}/plugin/command-shim.ts +0 -0
- /package/src/{tui → interfaces/tui}/plugin/internal.ts +0 -0
- /package/src/{tui → interfaces/tui}/plugin/runtime.ts +0 -0
- /package/src/{tui → interfaces/tui}/plugin/slots.tsx +0 -0
- /package/src/{tui → interfaces/tui}/routes/home.tsx +0 -0
- /package/src/{tui → interfaces/tui}/routes/session/dialog-fork-from-timeline.tsx +0 -0
- /package/src/{tui → interfaces/tui}/routes/session/dialog-message.tsx +0 -0
- /package/src/{tui → interfaces/tui}/routes/session/dialog-subagent.tsx +0 -0
- /package/src/{tui → interfaces/tui}/routes/session/dialog-timeline.tsx +0 -0
- /package/src/{tui → interfaces/tui}/routes/session/footer.tsx +0 -0
- /package/src/{tui → interfaces/tui}/routes/session/permission.tsx +0 -0
- /package/src/{tui → interfaces/tui}/routes/session/question.tsx +0 -0
- /package/src/{tui → interfaces/tui}/routes/session/sidebar.tsx +0 -0
- /package/src/{tui → interfaces/tui}/routes/session/subagent-footer.tsx +0 -0
- /package/src/{tui → interfaces/tui}/run.ts +0 -0
- /package/src/{tui → interfaces/tui}/thread.ts +0 -0
- /package/src/{tui → interfaces/tui}/ui/dialog-alert.tsx +0 -0
- /package/src/{tui → interfaces/tui}/ui/dialog-confirm.tsx +0 -0
- /package/src/{tui → interfaces/tui}/ui/dialog-export-options.tsx +0 -0
- /package/src/{tui → interfaces/tui}/ui/dialog-help.tsx +0 -0
- /package/src/{tui → interfaces/tui}/ui/dialog-prompt.tsx +0 -0
- /package/src/{tui → interfaces/tui}/ui/dialog-select.tsx +0 -0
- /package/src/{tui → interfaces/tui}/ui/dialog.tsx +0 -0
- /package/src/{tui → interfaces/tui}/ui/link.tsx +0 -0
- /package/src/{tui → interfaces/tui}/ui/spinner.ts +0 -0
- /package/src/{tui → interfaces/tui}/ui/toast.tsx +0 -0
- /package/src/{tui → interfaces/tui}/util/editor.ts +0 -0
- /package/src/{tui → interfaces/tui}/util/model.ts +0 -0
- /package/src/{tui → interfaces/tui}/util/provider-origin.ts +0 -0
- /package/src/{tui → interfaces/tui}/util/revert-diff.ts +0 -0
- /package/src/{tui → interfaces/tui}/util/scroll.ts +0 -0
- /package/src/{tui → interfaces/tui}/util/selection.ts +0 -0
- /package/src/{tui → interfaces/tui}/util/signal.ts +0 -0
- /package/src/{tui → interfaces/tui}/util/sound.ts +0 -0
- /package/src/{tui → interfaces/tui}/util/transcript.ts +0 -0
- /package/src/{tui → interfaces/tui}/validate-session.ts +0 -0
- /package/src/{tui → interfaces/tui}/win32.ts +0 -0
- /package/src/{tui → interfaces/tui}/worker.ts +0 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// Discord-style rail avatar with smart initials.
|
|
2
|
+
//
|
|
3
|
+
// Single-word ("iacrmar") → big "I" + a "iacrm…" label below
|
|
4
|
+
// Multi-word ("panda project") → big "PP" (first letter of each)
|
|
5
|
+
// Single short ("apx", "ai") → big initial + label fits without ellipsis
|
|
6
|
+
//
|
|
7
|
+
// Each project gets a deterministic colour pulled from PROJECT_TONES so the
|
|
8
|
+
// rail is visually scannable even when names are similar.
|
|
9
|
+
import { PROJECT_TONES, type ProjectTone } from "../../constants";
|
|
10
|
+
import { cn } from "../../lib/cn";
|
|
11
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip";
|
|
12
|
+
|
|
13
|
+
interface Props {
|
|
14
|
+
label: string;
|
|
15
|
+
active?: boolean;
|
|
16
|
+
onClick?: () => void;
|
|
17
|
+
isAdd?: boolean;
|
|
18
|
+
isSettings?: boolean;
|
|
19
|
+
isDefault?: boolean;
|
|
20
|
+
icon?: React.ReactNode;
|
|
21
|
+
title?: string;
|
|
22
|
+
testId?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function ProjectAvatar({ label, active, onClick, isAdd, isSettings, isDefault, icon, title, testId }: Props) {
|
|
26
|
+
const text = label.trim() || "·";
|
|
27
|
+
const { initials, subLabel } = computeInitialsAndSub(text);
|
|
28
|
+
const tone: ProjectTone =
|
|
29
|
+
isAdd || isSettings ? "indigo" : pickTone(text);
|
|
30
|
+
const showSub = subLabel && !isAdd && !isSettings && !isDefault;
|
|
31
|
+
return (
|
|
32
|
+
<Tooltip>
|
|
33
|
+
<TooltipTrigger
|
|
34
|
+
render={
|
|
35
|
+
<button
|
|
36
|
+
type="button"
|
|
37
|
+
onClick={onClick}
|
|
38
|
+
data-testid={testId}
|
|
39
|
+
className="group relative flex w-full cursor-pointer flex-col items-center gap-1"
|
|
40
|
+
>
|
|
41
|
+
<span
|
|
42
|
+
className={cn(
|
|
43
|
+
"flex size-10 items-center justify-center rounded-xl text-sm font-bold transition-all",
|
|
44
|
+
active && "ring-2 ring-foreground ring-offset-2 ring-offset-card",
|
|
45
|
+
isAdd && "border border-dashed border-muted-fg/50 bg-transparent text-muted-fg hover:bg-accent/60 hover:text-foreground",
|
|
46
|
+
isSettings && "bg-muted text-muted-fg hover:bg-accent hover:text-foreground",
|
|
47
|
+
isDefault && "overflow-hidden bg-muted",
|
|
48
|
+
!isAdd && !isSettings && !isDefault && active && toneActive(tone),
|
|
49
|
+
!isAdd && !isSettings && !isDefault && !active && toneIdle(tone),
|
|
50
|
+
)}
|
|
51
|
+
>
|
|
52
|
+
{icon ?? initials}
|
|
53
|
+
</span>
|
|
54
|
+
{showSub && (
|
|
55
|
+
<span className="block max-w-[3.6rem] truncate text-[9px] leading-tight text-muted-fg group-hover:text-foreground">
|
|
56
|
+
{subLabel}
|
|
57
|
+
</span>
|
|
58
|
+
)}
|
|
59
|
+
</button>
|
|
60
|
+
}
|
|
61
|
+
/>
|
|
62
|
+
<TooltipContent side="right">{title || label}</TooltipContent>
|
|
63
|
+
</Tooltip>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** Public so list views can reuse the same rule (consistency). */
|
|
68
|
+
export function computeInitialsAndSub(name: string): { initials: string; subLabel: string | null } {
|
|
69
|
+
const cleaned = name.trim().replace(/[_\-.]+/g, " ").replace(/\s+/g, " ");
|
|
70
|
+
if (!cleaned) return { initials: "·", subLabel: null };
|
|
71
|
+
const words = cleaned.split(" ");
|
|
72
|
+
if (words.length >= 2) {
|
|
73
|
+
const ini = (words[0][0] + words[1][0]).toUpperCase();
|
|
74
|
+
return { initials: ini, subLabel: shortLabel(cleaned) };
|
|
75
|
+
}
|
|
76
|
+
const single = words[0];
|
|
77
|
+
if (single.length <= 4) {
|
|
78
|
+
// "apx", "iacr" — fits without ellipsis
|
|
79
|
+
return { initials: single[0].toUpperCase(), subLabel: single };
|
|
80
|
+
}
|
|
81
|
+
return { initials: single[0].toUpperCase(), subLabel: single.slice(0, 4) + "…" };
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function shortLabel(s: string): string {
|
|
85
|
+
return s.length > 6 ? s.slice(0, 5) + "…" : s;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** Hash a string into a stable tone from PROJECT_TONES. */
|
|
89
|
+
function pickTone(s: string): ProjectTone {
|
|
90
|
+
let h = 0;
|
|
91
|
+
for (let i = 0; i < s.length; i++) h = (h * 31 + s.charCodeAt(i)) | 0;
|
|
92
|
+
return PROJECT_TONES[Math.abs(h) % PROJECT_TONES.length];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const TONE_IDLE: Record<ProjectTone, string> = {
|
|
96
|
+
sky: "bg-sky-500/15 text-sky-300 hover:bg-sky-500/25",
|
|
97
|
+
violet: "bg-violet-500/15 text-violet-300 hover:bg-violet-500/25",
|
|
98
|
+
emerald: "bg-emerald-500/15 text-emerald-300 hover:bg-emerald-500/25",
|
|
99
|
+
amber: "bg-amber-500/15 text-amber-300 hover:bg-amber-500/25",
|
|
100
|
+
rose: "bg-rose-500/15 text-rose-300 hover:bg-rose-500/25",
|
|
101
|
+
indigo: "bg-indigo-500/15 text-indigo-300 hover:bg-indigo-500/25",
|
|
102
|
+
teal: "bg-teal-500/15 text-teal-300 hover:bg-teal-500/25",
|
|
103
|
+
fuchsia: "bg-fuchsia-500/15 text-fuchsia-300 hover:bg-fuchsia-500/25",
|
|
104
|
+
};
|
|
105
|
+
const TONE_ACTIVE: Record<ProjectTone, string> = {
|
|
106
|
+
sky: "bg-sky-500/30 text-sky-100",
|
|
107
|
+
violet: "bg-violet-500/30 text-violet-100",
|
|
108
|
+
emerald: "bg-emerald-500/30 text-emerald-100",
|
|
109
|
+
amber: "bg-amber-500/30 text-amber-100",
|
|
110
|
+
rose: "bg-rose-500/30 text-rose-100",
|
|
111
|
+
indigo: "bg-indigo-500/30 text-indigo-100",
|
|
112
|
+
teal: "bg-teal-500/30 text-teal-100",
|
|
113
|
+
fuchsia: "bg-fuchsia-500/30 text-fuchsia-100",
|
|
114
|
+
};
|
|
115
|
+
function toneIdle(t: ProjectTone) { return TONE_IDLE[t]; }
|
|
116
|
+
function toneActive(t: ProjectTone) { return TONE_ACTIVE[t]; }
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
// Discord-style left rail. Logo on top (APX admin), then Base, then the
|
|
2
|
+
// rail-level MODULES (Voice/Deck/Code) that sit alongside Base, then the
|
|
3
|
+
// projects column, finally add + settings. The default workspace (id=0) is
|
|
4
|
+
// pinned first.
|
|
5
|
+
import { useLocation } from "react-router-dom";
|
|
6
|
+
import { Plus, Settings, Mic, Monitor, LayoutGrid, Terminal, Bot, type LucideIcon } from "lucide-react";
|
|
7
|
+
import { Logo } from "./Logo";
|
|
8
|
+
import { ProjectAvatar } from "./ProjectAvatar";
|
|
9
|
+
import { Tip } from "../ui/tip";
|
|
10
|
+
import { useProjects } from "../../hooks/useProjects";
|
|
11
|
+
import { t } from "../../i18n";
|
|
12
|
+
|
|
13
|
+
interface Props {
|
|
14
|
+
onSelect: (href: string) => void;
|
|
15
|
+
onOpenRoby: () => void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface ModuleItem {
|
|
19
|
+
id: string;
|
|
20
|
+
label: string;
|
|
21
|
+
href: string;
|
|
22
|
+
icon: LucideIcon;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Rail-level modules: large surfaces (many views/menus) that deserve a
|
|
26
|
+
// top-level entry next to Base rather than living inside Settings.
|
|
27
|
+
function buildModules(): ModuleItem[] {
|
|
28
|
+
return [
|
|
29
|
+
{ id: "voice", label: t("nav.modules.voice"), href: "/m/voice", icon: Mic },
|
|
30
|
+
{ id: "desktop", label: t("nav.modules.desktop"), href: "/m/desktop", icon: Monitor },
|
|
31
|
+
{ id: "deck", label: t("nav.modules.deck"), href: "/m/deck", icon: LayoutGrid },
|
|
32
|
+
{ id: "code", label: t("nav.modules.code"), href: "/m/code", icon: Terminal },
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function ProjectSidebar({ onSelect, onOpenRoby }: Props) {
|
|
37
|
+
const { projects, isLoading } = useProjects();
|
|
38
|
+
const location = useLocation();
|
|
39
|
+
const MODULES = buildModules();
|
|
40
|
+
|
|
41
|
+
const isActive = (href: string) =>
|
|
42
|
+
location.pathname === href || location.pathname.startsWith(`${href}/`);
|
|
43
|
+
const base = projects.find((p) => String(p.id) === "0");
|
|
44
|
+
const rest = projects.filter((p) => String(p.id) !== "0");
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<aside className="flex h-full w-20 flex-col items-center gap-3 overflow-y-auto bg-transparent py-3">
|
|
48
|
+
<Tip content={t("nav.apx_admin")} side="right">
|
|
49
|
+
<button
|
|
50
|
+
type="button"
|
|
51
|
+
onClick={() => onSelect("/")}
|
|
52
|
+
data-testid="nav-home"
|
|
53
|
+
className="mb-2 cursor-pointer"
|
|
54
|
+
>
|
|
55
|
+
<Logo size={36} />
|
|
56
|
+
</button>
|
|
57
|
+
</Tip>
|
|
58
|
+
|
|
59
|
+
{isLoading && <div className="size-10 animate-pulse rounded-xl bg-muted" />}
|
|
60
|
+
|
|
61
|
+
{base && (
|
|
62
|
+
<ProjectAvatar
|
|
63
|
+
label={t("base.title")}
|
|
64
|
+
testId="project-avatar-0"
|
|
65
|
+
title={t("base.subtitle")}
|
|
66
|
+
active={isActive("/p/0")}
|
|
67
|
+
isDefault
|
|
68
|
+
icon={<img src="/modules/superagent.png" alt={t("base.title")} className="size-7 object-contain" draggable={false} />}
|
|
69
|
+
onClick={() => onSelect("/p/0")}
|
|
70
|
+
/>
|
|
71
|
+
)}
|
|
72
|
+
|
|
73
|
+
{/* Modules — rail-level surfaces alongside Base. */}
|
|
74
|
+
<div className="my-0.5 h-px w-8 rounded-full bg-border" />
|
|
75
|
+
{MODULES.map((m) => (
|
|
76
|
+
<ProjectAvatar
|
|
77
|
+
key={m.id}
|
|
78
|
+
label={m.label}
|
|
79
|
+
testId={`module-avatar-${m.id}`}
|
|
80
|
+
title={m.label}
|
|
81
|
+
active={isActive(m.href)}
|
|
82
|
+
icon={<m.icon size={18} />}
|
|
83
|
+
onClick={() => onSelect(m.href)}
|
|
84
|
+
/>
|
|
85
|
+
))}
|
|
86
|
+
|
|
87
|
+
{rest.length > 0 && <div className="my-0.5 h-px w-8 rounded-full bg-border" />}
|
|
88
|
+
{rest.map((p) => {
|
|
89
|
+
const label = p.name || p.path.split("/").pop() || String(p.id);
|
|
90
|
+
const href = `/p/${p.id}`;
|
|
91
|
+
return (
|
|
92
|
+
<ProjectAvatar
|
|
93
|
+
key={p.id}
|
|
94
|
+
label={label}
|
|
95
|
+
testId={`project-avatar-${p.id}`}
|
|
96
|
+
title={`${label} — ${p.path}`}
|
|
97
|
+
active={isActive(href)}
|
|
98
|
+
onClick={() => onSelect(href)}
|
|
99
|
+
/>
|
|
100
|
+
);
|
|
101
|
+
})}
|
|
102
|
+
|
|
103
|
+
<ProjectAvatar
|
|
104
|
+
label="Add"
|
|
105
|
+
isAdd
|
|
106
|
+
testId="nav-add-project"
|
|
107
|
+
icon={<Plus size={18} />}
|
|
108
|
+
active={false}
|
|
109
|
+
onClick={() => onSelect("/?action=add-project")}
|
|
110
|
+
title={t("nav.add_project")}
|
|
111
|
+
/>
|
|
112
|
+
|
|
113
|
+
<div className="flex-1" />
|
|
114
|
+
<ProjectAvatar
|
|
115
|
+
label="Settings"
|
|
116
|
+
isSettings
|
|
117
|
+
testId="nav-settings"
|
|
118
|
+
icon={<Settings size={16} />}
|
|
119
|
+
active={location.pathname === "/settings" || location.pathname.startsWith("/settings/")}
|
|
120
|
+
onClick={() => onSelect("/settings")}
|
|
121
|
+
title={t("nav.settings")}
|
|
122
|
+
/>
|
|
123
|
+
{/* Roby launcher — subtle (not a loud floating bubble), pinned under the
|
|
124
|
+
gear so it doesn't overlap the chat composer. */}
|
|
125
|
+
<Tip content={t("roby.talk")} side="right">
|
|
126
|
+
<button
|
|
127
|
+
type="button"
|
|
128
|
+
onClick={onOpenRoby}
|
|
129
|
+
data-testid="nav-roby"
|
|
130
|
+
aria-label={t("roby.talk")}
|
|
131
|
+
className="mt-1 flex size-10 items-center justify-center rounded-xl border border-border/60 bg-muted/30 text-muted-fg transition-colors hover:bg-accent hover:text-foreground"
|
|
132
|
+
>
|
|
133
|
+
<Bot size={18} />
|
|
134
|
+
</button>
|
|
135
|
+
</Tip>
|
|
136
|
+
</aside>
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Re-export for screens that still import projectKindLabel here.
|
|
141
|
+
export function projectKindLabel(kind?: string): string {
|
|
142
|
+
switch (kind) {
|
|
143
|
+
case "personal": return "Personal";
|
|
144
|
+
case "company": return "Company";
|
|
145
|
+
case "app": return "App";
|
|
146
|
+
case "software": return "Software";
|
|
147
|
+
case "default": return "Default";
|
|
148
|
+
case "other": return "Other";
|
|
149
|
+
default: return t("nav.project");
|
|
150
|
+
}
|
|
151
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Section, StatusDot } from "../Section";
|
|
2
|
+
import { Button } from "../ui";
|
|
3
|
+
import { useToast } from "../Toast";
|
|
4
|
+
import { useDaemonStatus } from "../../hooks/useDaemonStatus";
|
|
5
|
+
import { Admin } from "../../lib/api";
|
|
6
|
+
import { t } from "../../i18n";
|
|
7
|
+
import { GlobalConfigEditor } from "../config/GlobalConfigEditor";
|
|
8
|
+
|
|
9
|
+
export function AdvancedPanel() {
|
|
10
|
+
const toast = useToast();
|
|
11
|
+
const { health, isUp } = useDaemonStatus();
|
|
12
|
+
|
|
13
|
+
const reload = async () => {
|
|
14
|
+
try { await Admin.reload(); toast.success("Config recargada."); }
|
|
15
|
+
catch (e) { toast.error((e as Error).message); }
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<div className="space-y-6">
|
|
20
|
+
<Section
|
|
21
|
+
title={t("daemon.version")}
|
|
22
|
+
action={<Button size="sm" onClick={reload}>{t("common.reload")}</Button>}
|
|
23
|
+
>
|
|
24
|
+
<div className="grid grid-cols-3 gap-3 text-sm">
|
|
25
|
+
<Info label={t("daemon.version")} value={health?.version || "—"} />
|
|
26
|
+
<Info label={t("daemon.uptime")} value={health ? `${health.uptime_s}s` : "—"} />
|
|
27
|
+
<Info label={t("daemon.status")} value={isUp ? t("daemon.running") : t("daemon.down")} ok={isUp} />
|
|
28
|
+
</div>
|
|
29
|
+
</Section>
|
|
30
|
+
<GlobalConfigEditor />
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function Info({ label, value, ok }: { label: string; value: string; ok?: boolean }) {
|
|
36
|
+
return (
|
|
37
|
+
<div className="rounded-md border border-border bg-muted/30 p-3">
|
|
38
|
+
<div className="text-xs uppercase tracking-wide text-muted-fg">{label}</div>
|
|
39
|
+
<div className="mt-1 flex items-center gap-2 text-base font-medium">
|
|
40
|
+
{ok !== undefined && <StatusDot ok={ok} />}
|
|
41
|
+
<span>{value}</span>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { Section } from "../Section";
|
|
3
|
+
import { Button, Field, Input } from "../ui";
|
|
4
|
+
import { useTheme } from "../../hooks/useTheme";
|
|
5
|
+
import { useToast } from "../Toast";
|
|
6
|
+
import { getToken, setToken } from "../../lib/api";
|
|
7
|
+
import { STORAGE } from "../../constants";
|
|
8
|
+
import { t, setLocale, getLocale, LOCALES, type Locale } from "../../i18n";
|
|
9
|
+
|
|
10
|
+
export function AppearancePanel() {
|
|
11
|
+
const toast = useToast();
|
|
12
|
+
const { theme, set } = useTheme();
|
|
13
|
+
const [draftToken, setDraftToken] = useState("");
|
|
14
|
+
const [locale, setLocaleState] = useState<Locale>(getLocale());
|
|
15
|
+
|
|
16
|
+
const save = () => {
|
|
17
|
+
const v = draftToken.trim();
|
|
18
|
+
if (!v) return;
|
|
19
|
+
setToken(v);
|
|
20
|
+
try { localStorage.setItem(STORAGE.token, v); } catch { /* quota */ }
|
|
21
|
+
setDraftToken("");
|
|
22
|
+
toast.success(t("settings.token_saved"));
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const changeLocale = (l: Locale) => {
|
|
26
|
+
setLocale(l);
|
|
27
|
+
setLocaleState(l);
|
|
28
|
+
// Reload so all rendered strings pick up the new locale.
|
|
29
|
+
window.location.reload();
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div className="space-y-6">
|
|
34
|
+
<Section title={t("settings.appearance")}>
|
|
35
|
+
<div className="flex items-center gap-2">
|
|
36
|
+
<Button variant={theme === "light" ? "primary" : "secondary"} onClick={() => set("light")}>{t("settings.light_mode")}</Button>
|
|
37
|
+
<Button variant={theme === "dark" ? "primary" : "secondary"} onClick={() => set("dark")}>{t("settings.dark_mode")}</Button>
|
|
38
|
+
</div>
|
|
39
|
+
</Section>
|
|
40
|
+
|
|
41
|
+
<Section title={t("settings.language")}>
|
|
42
|
+
<div className="flex items-center gap-2">
|
|
43
|
+
{LOCALES.map((lo) => (
|
|
44
|
+
<Button
|
|
45
|
+
key={lo.value}
|
|
46
|
+
variant={locale === lo.value ? "primary" : "secondary"}
|
|
47
|
+
onClick={() => changeLocale(lo.value)}
|
|
48
|
+
>
|
|
49
|
+
{lo.label}
|
|
50
|
+
</Button>
|
|
51
|
+
))}
|
|
52
|
+
</div>
|
|
53
|
+
</Section>
|
|
54
|
+
|
|
55
|
+
<Section title={t("settings.token")} description={t("settings.token_sub")}>
|
|
56
|
+
<Field label="Bearer">
|
|
57
|
+
<Input
|
|
58
|
+
type="password"
|
|
59
|
+
placeholder={getToken() ? t("settings.token_active") : t("settings.token_paste")}
|
|
60
|
+
value={draftToken}
|
|
61
|
+
onChange={(e) => setDraftToken(e.target.value)}
|
|
62
|
+
className="font-mono"
|
|
63
|
+
onKeyDown={(e) => { if (e.key === "Enter") save(); }}
|
|
64
|
+
/>
|
|
65
|
+
</Field>
|
|
66
|
+
<div className="mt-2">
|
|
67
|
+
<Button variant="primary" onClick={save}>{t("common.save")}</Button>
|
|
68
|
+
</div>
|
|
69
|
+
</Section>
|
|
70
|
+
</div>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { useEffect, useMemo, useState } from "react";
|
|
2
|
+
import { AlertTriangle, ArrowRight, GitBranch, Pencil, Plus, Trash2 } from "lucide-react";
|
|
3
|
+
import { Section } from "../Section";
|
|
4
|
+
import { Badge, Button, Field, Loading } from "../ui";
|
|
5
|
+
import { UiSelect } from "../UiSelect";
|
|
6
|
+
import { ModelCombobox } from "../ModelCombobox";
|
|
7
|
+
import { useToast } from "../Toast";
|
|
8
|
+
import { useGlobalConfig, useSuperAgentConfig } from "../../hooks/useGlobalConfig";
|
|
9
|
+
import { ENGINE_ICONS, ENGINE_PRESETS, type EngineType } from "./providers/typeStyles";
|
|
10
|
+
|
|
11
|
+
interface ProviderInfo {
|
|
12
|
+
slug: string;
|
|
13
|
+
engine: EngineType;
|
|
14
|
+
default_model?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function splitRef(ref: string): { provider: string; model: string } {
|
|
18
|
+
const i = ref.indexOf(":");
|
|
19
|
+
if (i < 0) return { provider: ref, model: "" };
|
|
20
|
+
return { provider: ref.slice(0, i), model: ref.slice(i + 1) };
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Provider dropdown + editable model combobox. Serializes to "provider:model".
|
|
24
|
+
function ProviderModelPicker({
|
|
25
|
+
value,
|
|
26
|
+
onChange,
|
|
27
|
+
providers,
|
|
28
|
+
}: {
|
|
29
|
+
value: string;
|
|
30
|
+
onChange: (ref: string) => void;
|
|
31
|
+
providers: ProviderInfo[];
|
|
32
|
+
}) {
|
|
33
|
+
const { provider, model } = splitRef(value);
|
|
34
|
+
const current = providers.find((p) => p.slug === provider);
|
|
35
|
+
const providerInvalid = !!provider && !current;
|
|
36
|
+
|
|
37
|
+
const modelOptions = useMemo(() => {
|
|
38
|
+
const known = current ? ENGINE_PRESETS[current.engine]?.known_models || [] : [];
|
|
39
|
+
return Array.from(new Set([
|
|
40
|
+
...(current?.default_model ? [current.default_model] : []),
|
|
41
|
+
...known,
|
|
42
|
+
]));
|
|
43
|
+
}, [current]);
|
|
44
|
+
|
|
45
|
+
const setProvider = (slug: string) => {
|
|
46
|
+
const p = providers.find((x) => x.slug === slug);
|
|
47
|
+
const m = p?.default_model || ENGINE_PRESETS[p?.engine as EngineType]?.default_model || "";
|
|
48
|
+
onChange(m ? `${slug}:${m}` : `${slug}:`);
|
|
49
|
+
};
|
|
50
|
+
const setModel = (m: string) => onChange(`${provider}:${m}`);
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<div className="grid grid-cols-2 gap-2">
|
|
54
|
+
<UiSelect
|
|
55
|
+
value={provider}
|
|
56
|
+
onChange={setProvider}
|
|
57
|
+
placeholder={providerInvalid ? `⚠ ${provider} (no existe)` : "— proveedor —"}
|
|
58
|
+
options={providers.map((p) => ({ value: p.slug, label: p.slug, icon: ENGINE_ICONS[p.engine] }))}
|
|
59
|
+
/>
|
|
60
|
+
<ModelCombobox
|
|
61
|
+
value={model}
|
|
62
|
+
onChange={setModel}
|
|
63
|
+
options={modelOptions}
|
|
64
|
+
invalid={providerInvalid}
|
|
65
|
+
invalidHint={`El proveedor "${provider}" no está configurado.`}
|
|
66
|
+
/>
|
|
67
|
+
</div>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// General model router (no per-task cases): primary model + ordered fallback
|
|
72
|
+
// chain. Backed by super_agent.model + super_agent.model_fallback.models.
|
|
73
|
+
export function DefaultRouterCard() {
|
|
74
|
+
const toast = useToast();
|
|
75
|
+
const { superAgent, isLoading, mutate } = useSuperAgentConfig();
|
|
76
|
+
const { config, patch } = useGlobalConfig();
|
|
77
|
+
|
|
78
|
+
const [model, setModel] = useState("");
|
|
79
|
+
const [fallback, setFallback] = useState<string[]>([]);
|
|
80
|
+
const [newFallback, setNewFallback] = useState("");
|
|
81
|
+
const [editIdx, setEditIdx] = useState<number | null>(null);
|
|
82
|
+
const [busy, setBusy] = useState(false);
|
|
83
|
+
// Snapshot of the saved state, for dirty tracking.
|
|
84
|
+
const [saved, setSaved] = useState<{ model: string; fallback: string[] }>({ model: "", fallback: [] });
|
|
85
|
+
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
if (!superAgent) return;
|
|
88
|
+
const f = superAgent.model_fallback?.models || [];
|
|
89
|
+
const arr = Array.isArray(f) ? f : [];
|
|
90
|
+
setModel(superAgent.model || "");
|
|
91
|
+
setFallback(arr);
|
|
92
|
+
setSaved({ model: superAgent.model || "", fallback: arr });
|
|
93
|
+
}, [superAgent]);
|
|
94
|
+
|
|
95
|
+
const providers: ProviderInfo[] = useMemo(() => {
|
|
96
|
+
const engines = (config.engines || {}) as Record<string, { engine?: string; default_model?: string }>;
|
|
97
|
+
return Object.entries(engines).map(([slug, v]) => ({
|
|
98
|
+
slug,
|
|
99
|
+
engine: ((v?.engine as EngineType) || (slug as EngineType)),
|
|
100
|
+
default_model: v?.default_model || ENGINE_PRESETS[(v?.engine as EngineType) || (slug as EngineType)]?.default_model,
|
|
101
|
+
}));
|
|
102
|
+
}, [config.engines]);
|
|
103
|
+
|
|
104
|
+
const providerExists = (ref: string) => {
|
|
105
|
+
const { provider } = splitRef(ref);
|
|
106
|
+
return providers.some((p) => p.slug === provider);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
if (isLoading || !superAgent) return <Loading />;
|
|
110
|
+
|
|
111
|
+
const dirty = model !== saved.model || JSON.stringify(fallback) !== JSON.stringify(saved.fallback);
|
|
112
|
+
|
|
113
|
+
const submit = async () => {
|
|
114
|
+
setBusy(true);
|
|
115
|
+
try {
|
|
116
|
+
await patch({
|
|
117
|
+
"super_agent.model": model,
|
|
118
|
+
"super_agent.model_fallback.enabled": fallback.length > 0,
|
|
119
|
+
"super_agent.model_fallback.models": fallback,
|
|
120
|
+
});
|
|
121
|
+
toast.success("Router guardado.");
|
|
122
|
+
setSaved({ model, fallback });
|
|
123
|
+
mutate();
|
|
124
|
+
} catch (e) {
|
|
125
|
+
toast.error((e as Error).message);
|
|
126
|
+
} finally { setBusy(false); }
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const addFallback = () => {
|
|
130
|
+
const v = newFallback.trim().replace(/:$/, "");
|
|
131
|
+
if (!v || !v.includes(":") || fallback.includes(v)) return;
|
|
132
|
+
setFallback([...fallback, v]);
|
|
133
|
+
setNewFallback("");
|
|
134
|
+
};
|
|
135
|
+
const updateAt = (i: number, v: string) => {
|
|
136
|
+
const next = [...fallback];
|
|
137
|
+
next[i] = v;
|
|
138
|
+
setFallback(next);
|
|
139
|
+
};
|
|
140
|
+
const removeFallback = (i: number) => {
|
|
141
|
+
setFallback(fallback.filter((_, idx) => idx !== i));
|
|
142
|
+
if (editIdx === i) setEditIdx(null);
|
|
143
|
+
};
|
|
144
|
+
const moveFallback = (i: number, dir: -1 | 1) => {
|
|
145
|
+
const j = i + dir;
|
|
146
|
+
if (j < 0 || j >= fallback.length) return;
|
|
147
|
+
const next = [...fallback];
|
|
148
|
+
[next[i], next[j]] = [next[j], next[i]];
|
|
149
|
+
setFallback(next);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
return (
|
|
153
|
+
<Section
|
|
154
|
+
title="Router de modelos"
|
|
155
|
+
description="Un solo router general (sin casos por tarea). Elegí proveedor y modelo; si el activo falla, prueba la cadena de fallback en orden."
|
|
156
|
+
>
|
|
157
|
+
<div className="space-y-4">
|
|
158
|
+
{/* Resolution preview */}
|
|
159
|
+
<div className="flex flex-wrap items-center gap-2 rounded-lg border border-border bg-muted/20 p-3">
|
|
160
|
+
<Badge tone="success"><GitBranch size={11} /> default</Badge>
|
|
161
|
+
<span className={`font-mono text-xs ${!providerExists(model) && model ? "text-amber-400" : ""}`}>{model || "—"}</span>
|
|
162
|
+
{fallback.map((m) => (
|
|
163
|
+
<span key={m} className="flex items-center gap-2 text-muted-fg">
|
|
164
|
+
<ArrowRight size={12} />
|
|
165
|
+
<span className={`font-mono text-xs ${!providerExists(m) ? "text-amber-400" : ""}`}>{m}</span>
|
|
166
|
+
</span>
|
|
167
|
+
))}
|
|
168
|
+
</div>
|
|
169
|
+
|
|
170
|
+
{providers.length === 0 ? (
|
|
171
|
+
<p className="text-xs text-muted-fg">Agregá un proveedor abajo para poder elegir modelos.</p>
|
|
172
|
+
) : (
|
|
173
|
+
<Field label="Modelo activo (default)" hint="Proveedor + modelo. Se guarda como provider:model.">
|
|
174
|
+
<ProviderModelPicker value={model} onChange={setModel} providers={providers} />
|
|
175
|
+
</Field>
|
|
176
|
+
)}
|
|
177
|
+
|
|
178
|
+
<div className="rounded-lg border border-border bg-muted/20 p-3">
|
|
179
|
+
<div className="mb-2">
|
|
180
|
+
<div className="text-sm font-medium">Cadena de fallback</div>
|
|
181
|
+
<div className="text-xs text-muted-fg">Si el modelo activo falla, prueba estos en orden. Click en uno para editarlo.</div>
|
|
182
|
+
</div>
|
|
183
|
+
<ul className="mb-3 space-y-1">
|
|
184
|
+
{fallback.map((m, i) => {
|
|
185
|
+
const invalid = !providerExists(m);
|
|
186
|
+
const editing = editIdx === i;
|
|
187
|
+
return (
|
|
188
|
+
<li key={`${i}-${m}`} className="rounded-md bg-card px-2 py-1.5 text-xs">
|
|
189
|
+
<div className="flex items-center gap-2">
|
|
190
|
+
<span className="w-6 text-muted-fg">#{i + 1}</span>
|
|
191
|
+
{editing ? (
|
|
192
|
+
<div className="flex-1">
|
|
193
|
+
<ProviderModelPicker value={m} onChange={(v) => updateAt(i, v)} providers={providers} />
|
|
194
|
+
</div>
|
|
195
|
+
) : (
|
|
196
|
+
<button type="button" onClick={() => setEditIdx(i)} className="flex flex-1 items-center gap-1.5 text-left">
|
|
197
|
+
{invalid && <AlertTriangle size={12} className="text-amber-400" />}
|
|
198
|
+
<span className={`font-mono ${invalid ? "text-amber-400" : ""}`}>{m}</span>
|
|
199
|
+
</button>
|
|
200
|
+
)}
|
|
201
|
+
{editing ? (
|
|
202
|
+
<Button size="sm" variant="secondary" onClick={() => setEditIdx(null)}>listo</Button>
|
|
203
|
+
) : (
|
|
204
|
+
<Button size="sm" variant="ghost" onClick={() => setEditIdx(i)}><Pencil size={12} /></Button>
|
|
205
|
+
)}
|
|
206
|
+
<Button size="sm" variant="ghost" onClick={() => moveFallback(i, -1)} disabled={i === 0}>↑</Button>
|
|
207
|
+
<Button size="sm" variant="ghost" onClick={() => moveFallback(i, +1)} disabled={i === fallback.length - 1}>↓</Button>
|
|
208
|
+
<Button size="sm" variant="destructive" onClick={() => removeFallback(i)}><Trash2 size={12} /></Button>
|
|
209
|
+
</div>
|
|
210
|
+
</li>
|
|
211
|
+
);
|
|
212
|
+
})}
|
|
213
|
+
{fallback.length === 0 && <li className="text-xs text-muted-fg">Sin fallback configurado.</li>}
|
|
214
|
+
</ul>
|
|
215
|
+
{providers.length > 0 && (
|
|
216
|
+
<div className="space-y-2">
|
|
217
|
+
<div className="text-xs text-muted-fg">Agregar a la cadena</div>
|
|
218
|
+
<ProviderModelPicker value={newFallback} onChange={setNewFallback} providers={providers} />
|
|
219
|
+
<Button size="sm" variant="secondary" onClick={addFallback} disabled={!newFallback.includes(":") || newFallback.endsWith(":")}>
|
|
220
|
+
<Plus size={13} /> Agregar a la cadena
|
|
221
|
+
</Button>
|
|
222
|
+
</div>
|
|
223
|
+
)}
|
|
224
|
+
</div>
|
|
225
|
+
|
|
226
|
+
<Button variant="primary" loading={busy} disabled={!dirty} onClick={submit}>
|
|
227
|
+
{dirty ? "Guardar router" : "Guardado"}
|
|
228
|
+
</Button>
|
|
229
|
+
</div>
|
|
230
|
+
</Section>
|
|
231
|
+
);
|
|
232
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { QrCode } from "lucide-react";
|
|
3
|
+
import { Section } from "../Section";
|
|
4
|
+
import { Badge, Button, Empty, Loading } from "../ui";
|
|
5
|
+
import { useToast } from "../Toast";
|
|
6
|
+
import { useDevices } from "../../hooks/useDevices";
|
|
7
|
+
import { Pair } from "../../lib/api";
|
|
8
|
+
import { PairDeviceDialog } from "./PairDeviceDialog";
|
|
9
|
+
import { t } from "../../i18n";
|
|
10
|
+
|
|
11
|
+
export function DevicesPanel() {
|
|
12
|
+
const toast = useToast();
|
|
13
|
+
const { clients, isLoading, mutate } = useDevices();
|
|
14
|
+
const [pairOpen, setPairOpen] = useState(false);
|
|
15
|
+
|
|
16
|
+
const revoke = async (id: string) => {
|
|
17
|
+
if (!confirm(t("settings.devices_revoke_confirm", { id }))) return;
|
|
18
|
+
try {
|
|
19
|
+
await Pair.revoke(id);
|
|
20
|
+
toast.success("Cliente revocado.");
|
|
21
|
+
mutate();
|
|
22
|
+
} catch (e) {
|
|
23
|
+
toast.error((e as Error).message);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<Section
|
|
29
|
+
title={t("settings.devices")}
|
|
30
|
+
description={t("settings.devices_sub")}
|
|
31
|
+
action={
|
|
32
|
+
<Button size="sm" variant="primary" onClick={() => setPairOpen(true)}>
|
|
33
|
+
<QrCode size={14} /> {t("settings.devices_pair_btn")}
|
|
34
|
+
</Button>
|
|
35
|
+
}
|
|
36
|
+
>
|
|
37
|
+
{isLoading && <Loading />}
|
|
38
|
+
{!isLoading && clients.length === 0 && (
|
|
39
|
+
<Empty>{t("settings.devices_empty")}</Empty>
|
|
40
|
+
)}
|
|
41
|
+
{clients.length > 0 && (
|
|
42
|
+
<ul className="space-y-2 text-sm">
|
|
43
|
+
{clients.map((c) => (
|
|
44
|
+
<li key={c.id} className="flex items-center gap-3 rounded-md border border-border bg-muted/30 px-3 py-2">
|
|
45
|
+
<span className="font-medium">{c.label || c.id}</span>
|
|
46
|
+
<Badge tone={c.kind === "web" ? "info" : c.kind === "deck" ? "success" : "muted"}>{c.kind}</Badge>
|
|
47
|
+
<span className="font-mono text-xs text-muted-fg">…{c.token_suffix}</span>
|
|
48
|
+
<span className="ml-auto text-xs text-muted-fg">
|
|
49
|
+
visto: {c.last_seen ? new Date(c.last_seen).toLocaleString() : "nunca"}
|
|
50
|
+
</span>
|
|
51
|
+
<Button size="sm" variant="destructive" onClick={() => revoke(c.id)}>Revocar</Button>
|
|
52
|
+
</li>
|
|
53
|
+
))}
|
|
54
|
+
</ul>
|
|
55
|
+
)}
|
|
56
|
+
|
|
57
|
+
<PairDeviceDialog open={pairOpen} onClose={() => setPairOpen(false)} onPaired={() => mutate()} />
|
|
58
|
+
</Section>
|
|
59
|
+
);
|
|
60
|
+
}
|