abel533
|
b98675f643
|
feat: Server Mode with WebSocket direct connect (Phase 3A)
- DirectConnectServer: lifecycle management, auth token, port config
- DirectConnectWebSocketHandler: WebSocket handler with session management
- ServerSession: per-connection AgentLoop with permission forwarding
- ServerMessage: 7-type JSON protocol (user/assistant/result/control/interrupt/keep_alive/error)
- ServerModeAutoConfiguration: conditional Spring config with @EnableWebSocket
- WebSocketServerConfig: endpoint registration and container settings
- ClaudeCodeApplication: --server flag detection, web-application-type override
- ClaudeCodeRunner: skip TUI in server mode, block on shutdown signal
- pom.xml: added spring-boot-starter-websocket dependency
Server mode: --server [--server-port=12321] [--server-token=xxx]
Env vars: CLAUDE_CODE_SERVER_MODE, CLAUDE_CODE_SERVER_PORT, CLAUDE_CODE_SERVER_TOKEN
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
1 month ago |
liuzh
|
d67f41358d
|
feat: Phase1 项目骨架 - Maven项目结构、核心AgentLoop、6个工具、命令系统、控制台渲染、REPL会话
实现内容:
- pom.xml: JDK25 + Spring AI 2.0.0-M4 + JLine3 + Picocli
- core/AgentLoop: 基于ChatModel的显式工具循环(非ChatClient)
- tool/: Tool接口 + ToolRegistry + ToolCallbackAdapter(适配Spring AI)
- tool/impl/: BashTool, FileReadTool, FileWriteTool, FileEditTool, GlobTool, GrepTool
- command/: SlashCommand接口 + CommandRegistry + /help, /clear, /exit
- console/: AnsiStyle, BannerPrinter, ToolStatusRenderer, ThinkingRenderer, SpinnerAnimation, MarkdownRenderer
- context/: SystemPromptBuilder, ClaudeMdLoader(多级CLAUDE.md加载)
- repl/ReplSession: REPL主循环(Scanner降级方案)
- config/AppConfig: Spring Bean装配
- application.yml: Anthropic/OpenAI双模型配置
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
1 month ago |