feat(a2ui): Implement A2UI backend with question handling and WebSocket support

- Added A2UITypes for defining question structures and answers.
- Created A2UIWebSocketHandler for managing WebSocket connections and message handling.
- Developed ask-question tool for interactive user questions via A2UI.
- Introduced platformUtils for platform detection and shell command handling.
- Centralized TypeScript types in index.ts for better organization.
- Implemented compatibility checks for hook templates based on platform requirements.
This commit is contained in:
catlog22
2026-01-31 15:27:12 +08:00
parent 4e009bb03a
commit 715ef12c92
163 changed files with 19495 additions and 715 deletions

View File

@@ -27,6 +27,12 @@ import {
McpManagerPage,
EndpointsPage,
InstallationsPage,
ExecutionMonitorPage,
HookManagerPage,
RulesManagerPage,
PromptHistoryPage,
ExplorerPage,
GraphExplorerPage,
} from '@/pages';
/**
@@ -75,6 +81,10 @@ const routes: RouteObject[] = [
path: 'orchestrator',
element: <OrchestratorPage />,
},
{
path: 'executions',
element: <ExecutionMonitorPage />,
},
{
path: 'loops',
element: <LoopMonitorPage />,
@@ -95,6 +105,10 @@ const routes: RouteObject[] = [
path: 'memory',
element: <MemoryPage />,
},
{
path: 'prompts',
element: <PromptHistoryPage />,
},
{
path: 'settings',
element: <SettingsPage />,
@@ -111,10 +125,26 @@ const routes: RouteObject[] = [
path: 'settings/installations',
element: <InstallationsPage />,
},
{
path: 'settings/rules',
element: <RulesManagerPage />,
},
{
path: 'help',
element: <HelpPage />,
},
{
path: 'hooks',
element: <HookManagerPage />,
},
{
path: 'explorer',
element: <ExplorerPage />,
},
{
path: 'graph',
element: <GraphExplorerPage />,
},
// Catch-all route for 404
{
path: '*',
@@ -143,16 +173,22 @@ export const ROUTES = {
PROJECT: '/project',
HISTORY: '/history',
ORCHESTRATOR: '/orchestrator',
EXECUTIONS: '/executions',
LOOPS: '/loops',
ISSUES: '/issues',
SKILLS: '/skills',
COMMANDS: '/commands',
MEMORY: '/memory',
PROMPT_HISTORY: '/prompts',
SETTINGS: '/settings',
HOOKS_MANAGER: '/hooks',
MCP_MANAGER: '/settings/mcp',
ENDPOINTS: '/settings/endpoints',
INSTALLATIONS: '/settings/installations',
SETTINGS_RULES: '/settings/rules',
HELP: '/help',
EXPLORER: '/explorer',
GRAPH: '/graph',
} as const;
export type RoutePath = (typeof ROUTES)[keyof typeof ROUTES];