Skip to content

Feat/claude agent conversation fixes#154

Closed
ethink2026 wants to merge 6 commits into
mainfrom
feat/claude-agent-conversation-fixes
Closed

Feat/claude agent conversation fixes#154
ethink2026 wants to merge 6 commits into
mainfrom
feat/claude-agent-conversation-fixes

Conversation

@ethink2026

Copy link
Copy Markdown
Collaborator

Closes #

变更概览

本次 PR 包含 6 个模块的改动,共 33 个文件,+4082/-1206 行。

1. feat(agent): workspace 级模型策略 (model_policy)
- workspaces 表新增 model_policy 字段 (all | routes_only)
- list_available_models() 支持按 policy 过滤,routes_only 时仅显示网关路由别名
- 创建/编辑 workspace 弹窗增加模型策略选择器(仅管理员可见)
- 创建时若选 routes_only 且无可用路由别名,阻止创建

2. refactor(agent): 路由更名为 /agent
- /coding-agent → /agent,API /api/v1/coding-agent/options → /api/v1/agent/options
- 删除已废弃的 AgentEntryPage.tsx 和 AgentsPanel.tsx
- DispatchPanel、EnterpriseConsole、LandingPage 同步更新路由引用
- 工作台标题改为「Agent 工作台」

3. feat(auth): 账号 + 密码登录
- 新增 staff-login 接口,bcrypt 密码哈希
- Staff session token 支持,require_admin 兼容 staff session
- 前端登录页改造,支持账号密码登录
- useAdminToken 增加 staff token 管理

4. feat(skills): 技能管理统一
- skills 表新增 source_type 字段 (enterprise/user)
- 新增 SkillsManagementPage 统一技能管理页面
- account_skills API 增加 workspace-skills 扫描接口
- SkillTab 组件简化

5. feat(mcp): MCP 服务管理 + 角色系统 + 后台菜单重构
- 新建 mcp_registry.py:MCP 服务注册表、workspace 权限策略、角色体系
- 三层权限:直接绑定 workspace > 角色继承
- 新建 McpPanel.tsx:MCP 服务管理(直接绑定 + 角色配置双 tab)
- 新建 RolePanel.tsx:独立智能体角色管理页
- 移除 Agent 工作台输入区 MCP 手动选择器,改为运行时自动注入
- 后台菜单重构为二级分组:首页 | 智能体中心 | 能力中心 | 模型管理 | 企业管理

6. refactor(workspace): 简化目录结构
- workspace 物理目录从 base/{owner_id}/{ws_id} 简化为 base/{ws_id}
- root_path 存储 workspace_id 替代绝对路径



新增文件

| 文件                                  | 说明                       |
|---------------------------------------|----------------------------|
| backend/infra/mcp_registry.py         | MCP 服务注册表 + 角色 CRUD |
| backend/api/routers/mcp_services.py   | MCP 服务 + 角色 API        |
| frontend/src/components/McpPanel.tsx  | MCP 管理面板               |
| frontend/src/components/RolePanel.tsx | 角色管理面板               |
| docs/plans/REQUIREMENTS_POOL.md       | 需求池                     |

Hermes Agent added 6 commits June 15, 2026 11:39
…ibility

- Add model_policy column to workspaces table (all | routes_only, default all for existing)
- list_available_models(policy) filters by policy; routes_only hides upstream models
- GET /coding-agent/options accepts workspace_id, respects workspace policy
- POST/PATCH workspace validates routes_only requires >=1 enabled route alias
- Frontend: create/edit workspace modals show model_policy radio (admin only)
- Frontend: workspace options API call includes workspace_id for policy filtering
…ated AgentEntryPage

- Frontend: /coding-agent → /agent, /coding-agent/workspaces/:id → /agent/workspaces/:id
- Backend: /api/v1/coding-agent/options → /api/v1/agent/options
- Remove deprecated AgentEntryPage.tsx and AgentsPanel.tsx (replaced by workspace system)
- Update DispatchPanel, EnterpriseConsole tab mapping to use new routes
- Rename workspace title to 'Agent 工作台'
- Add login_name and password_hash to gateway_accounts table
- Implement staff-login endpoint with bcrypt password verification
- Staff session creates token for console API access
- require_admin supports staff session in addition to API keys
- Frontend: staff login UI, token management, session helpers
- Simplify GatewayAccountsPanel, remove SetupAgentRequest
- Add clearConsoleSession and isAdmin to auth hooks
- Add source_type column to skills table (enterprise/user)
- Skill market API supports source_type filter
- account_skills API adds workspace-skills scan endpoint
- New SkillsManagementPage for unified skill assignment
- Simplify SkillTab component
- Extract GatewayApiKey type to AccountKeyTable
…cture

- New mcp_registry.py: MCP service catalog + workspace/role policies
- New mcp_services API: CRUD for MCP services, policies, roles
- New McpPanel.tsx: MCP management with direct-binding + role tabs
- New RolePanel.tsx: standalone agent role management (/console/roles)
- Auto-inject MCP from workspace policy (remove manual MCP selector)
- Admin menu restructured: 4 expandable groups + standalone Home
- Groups: 智能体中心, 能力中心, 模型管理, 企业管理
- REQUIREMENTS_POOL updated with REQ-005 (MCP) and REQ-006 (Skills)
…rectory

- Flatten workspace dir: base/owner_id/ws_id → base/ws_id
- Store workspace_id as root_path instead of absolute path
@ethink2026 ethink2026 closed this Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant