@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,174 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { useNavigate } from "react-router-dom";
|
|
3
|
+
import { Plus, Send } from "lucide-react";
|
|
4
|
+
import { Section, StatusDot } from "../components/Section";
|
|
5
|
+
import { Badge, Button, Empty, Loading, Switch } from "../components/ui";
|
|
6
|
+
import { Admin, Projects, Telegram } from "../lib/api";
|
|
7
|
+
import { useToast } from "../components/Toast";
|
|
8
|
+
import { useDaemonStatus } from "../hooks/useDaemonStatus";
|
|
9
|
+
import { useEngines } from "../hooks/useEngines";
|
|
10
|
+
import { useProjects } from "../hooks/useProjects";
|
|
11
|
+
import { useTelegramStatus, useTelegramChannels } from "../hooks/useTelegram";
|
|
12
|
+
import { TelegramChannelDialog } from "../components/TelegramChannelDialog";
|
|
13
|
+
import { TelegramSendDialog } from "../components/TelegramSendDialog";
|
|
14
|
+
import { TelegramContactsPanel } from "../components/settings/TelegramContactsPanel";
|
|
15
|
+
import { t } from "../i18n";
|
|
16
|
+
import type { TelegramChannel } from "../types/daemon";
|
|
17
|
+
|
|
18
|
+
export function ApxAdminScreen() {
|
|
19
|
+
const navigate = useNavigate();
|
|
20
|
+
const toast = useToast();
|
|
21
|
+
const { health, isUp } = useDaemonStatus();
|
|
22
|
+
const { projects, isLoading: projLoading, mutate: mutateProjects } = useProjects();
|
|
23
|
+
const { engines, isLoading: enginesLoading } = useEngines();
|
|
24
|
+
const { status: tgStatus, mutate: mutateTgStatus } = useTelegramStatus();
|
|
25
|
+
const { channels, isLoading: chanLoading, mutate: mutateChannels } = useTelegramChannels();
|
|
26
|
+
|
|
27
|
+
const [editing, setEditing] = useState<TelegramChannel | null>(null);
|
|
28
|
+
const [sendTarget, setSendTarget] = useState<TelegramChannel | null>(null);
|
|
29
|
+
|
|
30
|
+
const reload = async () => {
|
|
31
|
+
try { await Admin.reload(); toast.success(t("admin.reload_success")); }
|
|
32
|
+
catch (e) { toast.error((e as Error).message); }
|
|
33
|
+
};
|
|
34
|
+
const toggleTelegram = async () => {
|
|
35
|
+
try {
|
|
36
|
+
if (tgStatus?.enabled) { await Telegram.stop(); toast.info(t("admin.telegram_polling_stopped")); }
|
|
37
|
+
else { await Telegram.start(); toast.success(t("admin.telegram_polling_started")); }
|
|
38
|
+
mutateTgStatus();
|
|
39
|
+
} catch (e) { toast.error((e as Error).message); }
|
|
40
|
+
};
|
|
41
|
+
const removeChannel = async (name: string) => {
|
|
42
|
+
if (!confirm(t("telegram_channels.delete_confirm", { name }))) return;
|
|
43
|
+
try { await Telegram.channels.remove(name); toast.success(t("admin.telegram_channel_removed")); mutateChannels(); }
|
|
44
|
+
catch (e) { toast.error((e as Error).message); }
|
|
45
|
+
};
|
|
46
|
+
const removeProject = async (id: string, label: string) => {
|
|
47
|
+
if (!confirm(t("admin.unregister_confirm", { label }))) return;
|
|
48
|
+
try { await Projects.remove(id); toast.success(t("project.unregistered")); mutateProjects(); }
|
|
49
|
+
catch (e) { toast.error((e as Error).message); }
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<div className="mx-auto max-w-5xl space-y-6 p-6" data-testid="screen-admin">
|
|
54
|
+
<header className="flex items-end justify-between">
|
|
55
|
+
<div>
|
|
56
|
+
<h1 className="text-2xl font-bold tracking-tight">{t("admin.title")}</h1>
|
|
57
|
+
<p className="text-sm text-muted-fg">{t("admin.subtitle")}</p>
|
|
58
|
+
</div>
|
|
59
|
+
<div className="flex gap-2">
|
|
60
|
+
<Button size="sm" onClick={reload} title={t("daemon.reload_hint")}>{t("common.reload")} config</Button>
|
|
61
|
+
<Button size="sm" variant="primary" onClick={() => navigate("/?action=add-project")}>
|
|
62
|
+
<Plus size={14} /> {t("nav.project")}
|
|
63
|
+
</Button>
|
|
64
|
+
</div>
|
|
65
|
+
</header>
|
|
66
|
+
|
|
67
|
+
<Section title={t("daemon.version")}>
|
|
68
|
+
<div className="grid grid-cols-3 gap-3 text-sm">
|
|
69
|
+
<Stat label={t("daemon.version")} value={health?.version || "—"} />
|
|
70
|
+
<Stat label={t("daemon.uptime")} value={health ? `${health.uptime_s}s` : "—"} />
|
|
71
|
+
<Stat label={t("daemon.status")} value={isUp ? t("daemon.running") : t("daemon.down")} ok={isUp} />
|
|
72
|
+
</div>
|
|
73
|
+
</Section>
|
|
74
|
+
|
|
75
|
+
<Section title={t("admin.engines_title")} description={t("admin.engines_subtitle")}>
|
|
76
|
+
{enginesLoading && <Loading />}
|
|
77
|
+
<div className="flex flex-wrap gap-1.5">
|
|
78
|
+
{engines.map((id) => <Badge key={id} tone="info">{id}</Badge>)}
|
|
79
|
+
</div>
|
|
80
|
+
</Section>
|
|
81
|
+
|
|
82
|
+
<Section
|
|
83
|
+
title={t("admin.telegram_title")}
|
|
84
|
+
description={t("admin.telegram_subtitle")}
|
|
85
|
+
action={
|
|
86
|
+
<div className="flex items-center gap-2">
|
|
87
|
+
<Switch
|
|
88
|
+
checked={!!tgStatus?.enabled}
|
|
89
|
+
onChange={toggleTelegram}
|
|
90
|
+
label={tgStatus?.enabled ? t("admin.telegram_polling_on") : t("admin.telegram_polling_off")}
|
|
91
|
+
/>
|
|
92
|
+
<Button size="sm" onClick={() => setEditing({ name: "" })}>
|
|
93
|
+
<Plus size={14} /> {t("admin.telegram_add_channel")}
|
|
94
|
+
</Button>
|
|
95
|
+
</div>
|
|
96
|
+
}
|
|
97
|
+
>
|
|
98
|
+
{chanLoading && <Loading />}
|
|
99
|
+
{channels.length === 0 && <Empty>{t("common.none_yet")}</Empty>}
|
|
100
|
+
<ul className="space-y-2 text-sm">
|
|
101
|
+
{channels.map((c) => (
|
|
102
|
+
<li key={c.name} className="rounded-md border border-border bg-muted/30 px-3 py-2">
|
|
103
|
+
<div className="flex items-center justify-between gap-2">
|
|
104
|
+
<span className="font-medium">{c.name}</span>
|
|
105
|
+
<div className="flex items-center gap-2">
|
|
106
|
+
{c.project && <Badge tone="success">project = {c.project}</Badge>}
|
|
107
|
+
<Button size="sm" variant="ghost" onClick={() => setSendTarget(c)}>
|
|
108
|
+
<Send size={13} /> {t("admin.telegram_send_test")}
|
|
109
|
+
</Button>
|
|
110
|
+
<Button size="sm" variant="secondary" onClick={() => setEditing(c)}>{t("common.edit")}</Button>
|
|
111
|
+
<Button size="sm" variant="destructive" onClick={() => removeChannel(c.name)}>{t("common.delete")}</Button>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
<div className="mt-1 grid grid-cols-3 gap-2 text-xs text-muted-fg">
|
|
115
|
+
<span>chat_id: {c.chat_id || "—"}</span>
|
|
116
|
+
<span>route_to_agent: {c.route_to_agent || "default APX"}</span>
|
|
117
|
+
<span>engine: {c.respond_with_engine ? t("admin.engine_badge") : t("admin.engine_badge_no")}</span>
|
|
118
|
+
</div>
|
|
119
|
+
</li>
|
|
120
|
+
))}
|
|
121
|
+
</ul>
|
|
122
|
+
</Section>
|
|
123
|
+
|
|
124
|
+
<TelegramContactsPanel />
|
|
125
|
+
|
|
126
|
+
<Section title={t("admin.projects_title")} description={t("admin.projects_subtitle")}>
|
|
127
|
+
{projLoading && <Loading />}
|
|
128
|
+
<ul className="divide-y divide-border">
|
|
129
|
+
{projects.map((p) => (
|
|
130
|
+
<li key={p.id} className="flex items-center gap-3 py-2">
|
|
131
|
+
<span className="w-10 font-mono text-xs text-muted-fg">#{p.id}</span>
|
|
132
|
+
<button
|
|
133
|
+
type="button"
|
|
134
|
+
className="flex-1 text-left hover:underline"
|
|
135
|
+
onClick={() => navigate(`/p/${p.id}`)}
|
|
136
|
+
>
|
|
137
|
+
<span className="font-medium">{p.name || p.path.split("/").pop()}</span>
|
|
138
|
+
<span className="ml-2 text-xs text-muted-fg">{p.path}</span>
|
|
139
|
+
</button>
|
|
140
|
+
<Badge>{(p.agents ?? 0)} {t("admin.agents_badge")}</Badge>
|
|
141
|
+
{Number(p.id) !== 0 && (
|
|
142
|
+
<Button size="sm" variant="destructive" onClick={() => removeProject(String(p.id), p.name || p.path)}>
|
|
143
|
+
{t("admin.unregister")}
|
|
144
|
+
</Button>
|
|
145
|
+
)}
|
|
146
|
+
</li>
|
|
147
|
+
))}
|
|
148
|
+
</ul>
|
|
149
|
+
</Section>
|
|
150
|
+
|
|
151
|
+
<TelegramChannelDialog
|
|
152
|
+
channel={editing}
|
|
153
|
+
onClose={() => setEditing(null)}
|
|
154
|
+
onSaved={() => { setEditing(null); mutateChannels(); }}
|
|
155
|
+
/>
|
|
156
|
+
<TelegramSendDialog
|
|
157
|
+
channel={sendTarget}
|
|
158
|
+
onClose={() => setSendTarget(null)}
|
|
159
|
+
/>
|
|
160
|
+
</div>
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function Stat({ label, value, ok }: { label: string; value: string; ok?: boolean }) {
|
|
165
|
+
return (
|
|
166
|
+
<div className="rounded-md border border-border bg-muted/30 p-3">
|
|
167
|
+
<div className="text-xs uppercase tracking-wide text-muted-fg">{label}</div>
|
|
168
|
+
<div className="mt-1 flex items-center gap-2 text-base font-medium">
|
|
169
|
+
{ok !== undefined && <StatusDot ok={ok} />}
|
|
170
|
+
<span>{value}</span>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
);
|
|
174
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { KeyRound } from "lucide-react";
|
|
3
|
+
import { Button, Input, Field } from "../components/ui";
|
|
4
|
+
import { Pair, setToken, HttpError } from "../lib/api";
|
|
5
|
+
import { STORAGE } from "../constants";
|
|
6
|
+
import { t } from "../i18n";
|
|
7
|
+
|
|
8
|
+
// Shown when the panel is reachable but has no valid token — i.e. opened over
|
|
9
|
+
// the LAN or a tunnel where /admin/web-token (loopback-only) can't help. The
|
|
10
|
+
// browser plays the same role APX Deck does: the operator runs `apx pair` on
|
|
11
|
+
// the host and pastes the pairing code here to mint a per-client token.
|
|
12
|
+
export function PairingScreen({ onPaired }: { onPaired: () => void }) {
|
|
13
|
+
const [code, setCode] = useState("");
|
|
14
|
+
const [label, setLabel] = useState(defaultLabel());
|
|
15
|
+
const [busy, setBusy] = useState(false);
|
|
16
|
+
const [err, setErr] = useState<string | null>(null);
|
|
17
|
+
|
|
18
|
+
async function submit() {
|
|
19
|
+
const pairing_id = code.trim();
|
|
20
|
+
if (!pairing_id) { setErr(t("pairing.err_required")); return; }
|
|
21
|
+
setBusy(true);
|
|
22
|
+
setErr(null);
|
|
23
|
+
try {
|
|
24
|
+
const res = await Pair.confirm({ pairing_id, label: label.trim() || undefined });
|
|
25
|
+
setToken(res.token);
|
|
26
|
+
try { localStorage.setItem(STORAGE.token, res.token); } catch { /* quota */ }
|
|
27
|
+
onPaired();
|
|
28
|
+
} catch (e) {
|
|
29
|
+
setErr(messageFor(e));
|
|
30
|
+
setBusy(false);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<div className="flex min-h-[100dvh] w-full items-center justify-center overflow-y-auto bg-background p-4 text-foreground">
|
|
36
|
+
<div className="my-auto w-full max-w-md rounded-xl border border-border bg-card p-6 shadow-sm">
|
|
37
|
+
<div className="mb-4 flex items-center gap-3">
|
|
38
|
+
<div className="grid size-10 place-items-center rounded-lg bg-primary/10 text-primary">
|
|
39
|
+
<KeyRound size={20} />
|
|
40
|
+
</div>
|
|
41
|
+
<div>
|
|
42
|
+
<h1 className="text-base font-semibold">{t("pairing.title")}</h1>
|
|
43
|
+
<p className="text-xs text-muted-fg">{t("pairing.subtitle")}</p>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<ol className="mb-5 space-y-1.5 rounded-lg bg-muted/50 p-3 text-xs text-muted-fg">
|
|
48
|
+
<li className="font-medium text-foreground">{t("pairing.steps_title")}</li>
|
|
49
|
+
<li>1. {t("pairing.step_1")}</li>
|
|
50
|
+
<li>2. {t("pairing.step_2")}</li>
|
|
51
|
+
<li>3. {t("pairing.step_3")}</li>
|
|
52
|
+
</ol>
|
|
53
|
+
|
|
54
|
+
<form
|
|
55
|
+
className="space-y-3"
|
|
56
|
+
onSubmit={(e) => { e.preventDefault(); void submit(); }}
|
|
57
|
+
>
|
|
58
|
+
<Field label={t("pairing.code_label")}>
|
|
59
|
+
<Input
|
|
60
|
+
value={code}
|
|
61
|
+
onChange={(e) => setCode(e.target.value)}
|
|
62
|
+
placeholder={t("pairing.code_ph")}
|
|
63
|
+
spellCheck={false}
|
|
64
|
+
autoComplete="off"
|
|
65
|
+
/>
|
|
66
|
+
</Field>
|
|
67
|
+
<Field label={t("pairing.label_label")} hint={t("pairing.revoke_hint")}>
|
|
68
|
+
<Input
|
|
69
|
+
value={label}
|
|
70
|
+
onChange={(e) => setLabel(e.target.value)}
|
|
71
|
+
placeholder={t("pairing.label_ph")}
|
|
72
|
+
/>
|
|
73
|
+
</Field>
|
|
74
|
+
|
|
75
|
+
{err && (
|
|
76
|
+
<p className="rounded-md bg-destructive/10 px-3 py-2 text-xs text-destructive">{err}</p>
|
|
77
|
+
)}
|
|
78
|
+
|
|
79
|
+
<Button type="submit" variant="primary" size="md" loading={busy} className="w-full justify-center">
|
|
80
|
+
{busy ? t("pairing.linking") : t("pairing.submit")}
|
|
81
|
+
</Button>
|
|
82
|
+
</form>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function defaultLabel(): string {
|
|
89
|
+
const ua = navigator.userAgent;
|
|
90
|
+
if (/iPhone|iPad/.test(ua)) return "iPhone";
|
|
91
|
+
if (/Android/.test(ua)) return "Android";
|
|
92
|
+
if (/Mac/.test(ua)) return "Mac";
|
|
93
|
+
if (/Windows/.test(ua)) return "Windows PC";
|
|
94
|
+
if (/Linux/.test(ua)) return "Linux";
|
|
95
|
+
return "browser";
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function messageFor(e: unknown): string {
|
|
99
|
+
if (e instanceof HttpError) {
|
|
100
|
+
if (e.status === 410) return t("pairing.err_expired");
|
|
101
|
+
if (e.status === 404) return t("pairing.err_unknown");
|
|
102
|
+
if (e.status === 409) return t("pairing.err_unknown");
|
|
103
|
+
}
|
|
104
|
+
return t("pairing.err_generic");
|
|
105
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { useNavigate, useParams, Routes, Route, useLocation } from "react-router-dom";
|
|
3
|
+
import {
|
|
4
|
+
Bot, Heart, Zap, Puzzle, FolderKanban, Settings,
|
|
5
|
+
RefreshCw, MessagesSquare, Send,
|
|
6
|
+
LayoutDashboard, Boxes, Cpu, ScrollText, History, Brain,
|
|
7
|
+
} from "lucide-react";
|
|
8
|
+
import { Projects } from "../lib/api";
|
|
9
|
+
import { Button } from "../components/ui";
|
|
10
|
+
import { useToast } from "../components/Toast";
|
|
11
|
+
import { useNavCollapse, type TabSection } from "../components/common/TabNav";
|
|
12
|
+
import { TabLayout } from "../components/common/TabLayout";
|
|
13
|
+
import { useProject } from "../hooks/useProjects";
|
|
14
|
+
import { STORAGE } from "../constants";
|
|
15
|
+
import { t } from "../i18n";
|
|
16
|
+
import { Overview } from "./project/Overview";
|
|
17
|
+
import { WorkspacesTab } from "./base/WorkspacesTab";
|
|
18
|
+
import { LogsTab } from "./base/LogsTab";
|
|
19
|
+
import { ModelsTab } from "./base/ModelsTab";
|
|
20
|
+
import { AgentDefaultsTab } from "./base/AgentDefaultsTab";
|
|
21
|
+
import { SessionsTab } from "./base/SessionsTab";
|
|
22
|
+
import { GlobalTasksTab } from "./base/GlobalTasksTab";
|
|
23
|
+
import { ConfigTab } from "./project/ConfigTab";
|
|
24
|
+
import { AgentsTab } from "./project/AgentsTab";
|
|
25
|
+
import { RoutinesTab } from "./project/RoutinesTab";
|
|
26
|
+
import { TasksTab } from "./project/TasksTab";
|
|
27
|
+
import { McpsTab } from "./project/McpsTab";
|
|
28
|
+
import { ThreadsTab } from "./project/ThreadsTab";
|
|
29
|
+
import { ChatTab } from "./project/ChatTab";
|
|
30
|
+
import { TelegramTab } from "./project/TelegramTab";
|
|
31
|
+
import { MemoriesTab } from "./project/MemoriesTab";
|
|
32
|
+
import { AgentDetailScreen } from "./project/AgentDetailScreen";
|
|
33
|
+
|
|
34
|
+
type NavKey =
|
|
35
|
+
| "" | "chat" | "config" | "telegram"
|
|
36
|
+
| "agents" | "routines" | "tasks" | "mcps" | "threads" | "logs" | "memories";
|
|
37
|
+
|
|
38
|
+
export function ProjectScreen() {
|
|
39
|
+
const navigate = useNavigate();
|
|
40
|
+
const location = useLocation();
|
|
41
|
+
const toast = useToast();
|
|
42
|
+
const { pid = "" } = useParams();
|
|
43
|
+
const { project, mutate } = useProject(pid);
|
|
44
|
+
const { collapsed, toggle } = useNavCollapse(STORAGE.sidebarCollapsed + ".project");
|
|
45
|
+
|
|
46
|
+
const isBase = String(pid) === "0";
|
|
47
|
+
const sections: TabSection[] = useMemo(() => {
|
|
48
|
+
if (isBase) {
|
|
49
|
+
// Base = menú global / admin del daemon (distinto al de un proyecto).
|
|
50
|
+
return [
|
|
51
|
+
{
|
|
52
|
+
title: t("base.nav_general"),
|
|
53
|
+
items: [
|
|
54
|
+
{ key: "", label: "Dashboard", icon: LayoutDashboard },
|
|
55
|
+
{ key: "workspaces", label: t("base.workspaces_title"), icon: Boxes },
|
|
56
|
+
{ key: "models", label: t("settings.tabs.engines"), icon: Cpu },
|
|
57
|
+
{ key: "agent-defaults", label: t("base.defaults_title"), icon: Bot },
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
title: t("base.nav_activity"),
|
|
62
|
+
items: [
|
|
63
|
+
{ key: "chat", label: t("project.nav.chat"), icon: MessagesSquare },
|
|
64
|
+
{ key: "sessions", label: t("base.sessions_title"), icon: History },
|
|
65
|
+
{ key: "tasks", label: t("project.nav.tasks"), icon: Zap },
|
|
66
|
+
{ key: "logs", label: t("project.nav.logs"), icon: ScrollText },
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
title: t("base.nav_system"),
|
|
71
|
+
items: [
|
|
72
|
+
{ key: "agents", label: t("project.nav.agents"), icon: Bot },
|
|
73
|
+
{ key: "memories", label: t("project.nav.memories"), icon: Brain },
|
|
74
|
+
{ key: "routines", label: t("project.nav.routines"), icon: Heart },
|
|
75
|
+
{ key: "mcps", label: t("project.nav.mcps"), icon: Puzzle },
|
|
76
|
+
{ key: "config", label: t("project.nav.config"), icon: Settings },
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
];
|
|
80
|
+
}
|
|
81
|
+
return [
|
|
82
|
+
{
|
|
83
|
+
title: t("project.sections.workspace"),
|
|
84
|
+
items: [
|
|
85
|
+
{ key: "", label: t("project.nav.overview"), icon: FolderKanban },
|
|
86
|
+
{ key: "telegram", label: t("project.nav.telegram"), icon: Send },
|
|
87
|
+
{ key: "chat", label: t("project.nav.chat"), icon: MessagesSquare },
|
|
88
|
+
{ key: "threads", label: t("project.nav.threads"), icon: MessagesSquare },
|
|
89
|
+
{ key: "agents", label: t("project.nav.agents"), icon: Bot },
|
|
90
|
+
{ key: "memories", label: t("project.nav.memories"), icon: Brain },
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
title: t("project.sections.automation"),
|
|
95
|
+
items: [
|
|
96
|
+
{ key: "routines", label: t("project.nav.routines"), icon: Heart },
|
|
97
|
+
{ key: "tasks", label: t("project.nav.tasks"), icon: Zap },
|
|
98
|
+
{ key: "mcps", label: t("project.nav.mcps"), icon: Puzzle },
|
|
99
|
+
{ key: "logs", label: t("project.nav.logs"), icon: ScrollText },
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
title: t("project.sections.config"),
|
|
104
|
+
items: [
|
|
105
|
+
{ key: "config", label: t("project.nav.config"), icon: Settings },
|
|
106
|
+
],
|
|
107
|
+
},
|
|
108
|
+
];
|
|
109
|
+
}, [isBase]);
|
|
110
|
+
|
|
111
|
+
// First path segment after /p/:pid — so deep routes like agents/:slug still
|
|
112
|
+
// highlight the "agents" nav item.
|
|
113
|
+
const active = (location.pathname.replace(`/p/${pid}`, "").replace(/^\//, "").split("/")[0]) as NavKey;
|
|
114
|
+
|
|
115
|
+
if (!project) {
|
|
116
|
+
return <div className="p-8 text-muted-fg">{t("project.not_found", { pid })}</div>;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const rebuild = async () => {
|
|
120
|
+
try { await Projects.rebuild(pid); toast.success(t("project.rebuild_done")); }
|
|
121
|
+
catch (e) { toast.error((e as Error).message); }
|
|
122
|
+
};
|
|
123
|
+
const unregister = async () => {
|
|
124
|
+
const label = project.name || project.path;
|
|
125
|
+
if (!confirm(t("project.unregister_confirm", { label }))) return;
|
|
126
|
+
try { await Projects.remove(pid); toast.success(t("project.unregistered")); mutate(); navigate("/"); }
|
|
127
|
+
catch (e) { toast.error((e as Error).message); }
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const onTabChange = (key: string) => {
|
|
131
|
+
const url = key ? `/p/${pid}/${key}` : `/p/${pid}`;
|
|
132
|
+
navigate(url);
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const actions = Number(pid) !== 0 ? (
|
|
136
|
+
<>
|
|
137
|
+
<Button size="sm" variant="secondary" onClick={rebuild}>
|
|
138
|
+
<RefreshCw size={13} /> {t("project.rebuild")}
|
|
139
|
+
</Button>
|
|
140
|
+
<Button size="sm" variant="destructive" onClick={unregister}>
|
|
141
|
+
{t("admin.unregister")}
|
|
142
|
+
</Button>
|
|
143
|
+
</>
|
|
144
|
+
) : undefined;
|
|
145
|
+
|
|
146
|
+
return (
|
|
147
|
+
<TabLayout
|
|
148
|
+
sections={sections}
|
|
149
|
+
active={active}
|
|
150
|
+
onChange={onTabChange}
|
|
151
|
+
collapsed={collapsed}
|
|
152
|
+
onToggleCollapse={toggle}
|
|
153
|
+
actions={actions}
|
|
154
|
+
contentClassName="w-full space-y-6 p-6 pt-3"
|
|
155
|
+
testId={`project-tab-${active || "overview"}`}
|
|
156
|
+
>
|
|
157
|
+
<Routes>
|
|
158
|
+
<Route index element={<Overview pid={pid} />} />
|
|
159
|
+
<Route path="workspaces" element={<WorkspacesTab />} />
|
|
160
|
+
<Route path="models" element={<ModelsTab />} />
|
|
161
|
+
<Route path="agent-defaults" element={<AgentDefaultsTab />} />
|
|
162
|
+
<Route path="sessions" element={<SessionsTab />} />
|
|
163
|
+
<Route path="logs" element={<LogsTab pid={pid} />} />
|
|
164
|
+
<Route path="config" element={<ConfigTab pid={pid} />} />
|
|
165
|
+
<Route path="telegram" element={<TelegramTab pid={pid} />} />
|
|
166
|
+
<Route path="agents" element={<AgentsTab pid={pid} />} />
|
|
167
|
+
<Route path="agents/:slug" element={<AgentDetailScreen pid={pid} />} />
|
|
168
|
+
<Route path="memories" element={<MemoriesTab pid={pid} />} />
|
|
169
|
+
<Route path="routines" element={<RoutinesTab pid={pid} />} />
|
|
170
|
+
<Route path="tasks" element={isBase ? <GlobalTasksTab /> : <TasksTab pid={pid} />} />
|
|
171
|
+
<Route path="mcps" element={<McpsTab pid={pid} />} />
|
|
172
|
+
<Route path="threads" element={<ThreadsTab pid={pid} />} />
|
|
173
|
+
<Route path="chat" element={<ChatTab pid={pid} />} />
|
|
174
|
+
<Route path="*" element={<Overview pid={pid} />} />
|
|
175
|
+
</Routes>
|
|
176
|
+
</TabLayout>
|
|
177
|
+
);
|
|
178
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import { useLocation, useNavigate } from "react-router-dom";
|
|
3
|
+
import {
|
|
4
|
+
Bot, Cpu, Database, KeyRound, MessageCircle, Palette, ScrollText, Send, Smartphone, User,
|
|
5
|
+
} from "lucide-react";
|
|
6
|
+
import { useNavCollapse, type TabSection } from "../components/common/TabNav";
|
|
7
|
+
import { TabLayout } from "../components/common/TabLayout";
|
|
8
|
+
import { IdentityPanel } from "../components/settings/IdentityPanel";
|
|
9
|
+
import { SuperAgentPanel } from "../components/settings/SuperAgentPanel";
|
|
10
|
+
import { MemoryPanel } from "../components/settings/MemoryPanel";
|
|
11
|
+
import { ModelsTab } from "./base/ModelsTab";
|
|
12
|
+
import { TelegramSettingsTabs } from "../components/settings/TelegramSettingsTabs";
|
|
13
|
+
import { DevicesPanel } from "../components/settings/DevicesPanel";
|
|
14
|
+
import { AdvancedPanel } from "../components/settings/AdvancedPanel";
|
|
15
|
+
import { AppearancePanel } from "../components/settings/AppearancePanel";
|
|
16
|
+
import { STORAGE } from "../constants";
|
|
17
|
+
import { t } from "../i18n";
|
|
18
|
+
|
|
19
|
+
type TabKey =
|
|
20
|
+
| "identity" | "super_agent" | "engines" | "memory" | "telegram" | "devices" | "appearance" | "advanced";
|
|
21
|
+
|
|
22
|
+
const SECTIONS: TabSection[] = [
|
|
23
|
+
{
|
|
24
|
+
title: t("settings.account_section"),
|
|
25
|
+
items: [
|
|
26
|
+
{ key: "identity", label: t("settings.tabs.identity"), icon: User },
|
|
27
|
+
{ key: "appearance", label: t("settings.appearance"), icon: Palette },
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
title: t("settings.agents_section"),
|
|
32
|
+
items: [
|
|
33
|
+
{ key: "super_agent", label: t("settings.tabs.super_agent"), icon: Bot },
|
|
34
|
+
{ key: "engines", label: t("settings.tabs.engines"), icon: Cpu },
|
|
35
|
+
{ key: "memory", label: "Memoria (RAG)", icon: Database },
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
title: t("settings.channels_section"),
|
|
40
|
+
items: [
|
|
41
|
+
{ key: "telegram", label: t("settings.tabs.telegram"), icon: Send },
|
|
42
|
+
{ key: "devices", label: t("settings.tabs.devices"), icon: Smartphone },
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
title: t("settings.advanced_section"),
|
|
47
|
+
items: [
|
|
48
|
+
{ key: "advanced", label: t("settings.tabs.advanced"), icon: ScrollText },
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
// Tabs whose content (model router + provider grid, telegram tabs) benefits
|
|
54
|
+
// from a wider container; the rest keep the cosier 3xl reading width.
|
|
55
|
+
const WIDE_TABS = new Set<TabKey>(["engines", "telegram"]);
|
|
56
|
+
|
|
57
|
+
const PANELS: Record<TabKey, () => ReactElement> = {
|
|
58
|
+
identity: () => <IdentityPanel />,
|
|
59
|
+
super_agent: () => <SuperAgentPanel />,
|
|
60
|
+
engines: () => <ModelsTab />,
|
|
61
|
+
memory: () => <MemoryPanel />,
|
|
62
|
+
telegram: () => <TelegramSettingsTabs />,
|
|
63
|
+
devices: () => <DevicesPanel />,
|
|
64
|
+
appearance: () => <AppearancePanel />,
|
|
65
|
+
advanced: () => <AdvancedPanel />,
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export function SettingsScreen() {
|
|
69
|
+
const navigate = useNavigate();
|
|
70
|
+
const location = useLocation();
|
|
71
|
+
const active = tabFromPath(location.pathname);
|
|
72
|
+
const Panel = PANELS[active];
|
|
73
|
+
const { collapsed, toggle } = useNavCollapse(STORAGE.sidebarCollapsed + ".settings");
|
|
74
|
+
// Silence lint warnings about unused icons import.
|
|
75
|
+
void KeyRound; void MessageCircle;
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<TabLayout
|
|
79
|
+
sections={SECTIONS}
|
|
80
|
+
active={active}
|
|
81
|
+
onChange={(k) => navigate(k === "identity" ? "/settings" : `/settings/${pathFromTab(k as TabKey)}`)}
|
|
82
|
+
collapsed={collapsed}
|
|
83
|
+
onToggleCollapse={toggle}
|
|
84
|
+
contentClassName={`mx-auto w-full ${WIDE_TABS.has(active) ? "max-w-6xl" : "max-w-3xl"} space-y-6 p-6 pt-3`}
|
|
85
|
+
testId={`settings-tab-${active}`}
|
|
86
|
+
>
|
|
87
|
+
<Panel />
|
|
88
|
+
</TabLayout>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function tabFromPath(pathname: string): TabKey {
|
|
93
|
+
const raw = pathname.split("/").filter(Boolean)[1] || "identity";
|
|
94
|
+
switch (raw) {
|
|
95
|
+
case "super-agent": return "super_agent";
|
|
96
|
+
case "engines": return "engines";
|
|
97
|
+
case "memory": return "memory";
|
|
98
|
+
case "telegram": return "telegram";
|
|
99
|
+
case "devices": return "devices";
|
|
100
|
+
case "appearance": return "appearance";
|
|
101
|
+
case "config":
|
|
102
|
+
case "advanced": return "advanced";
|
|
103
|
+
default: return "identity";
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function pathFromTab(tab: TabKey): string {
|
|
108
|
+
if (tab === "super_agent") return "super-agent";
|
|
109
|
+
if (tab === "advanced") return "config";
|
|
110
|
+
return tab;
|
|
111
|
+
}
|