refactor(core,server): 统一模块职责并消除类型重复
- 统一 ToolStatus 类型(Core 导出,Server 引用) - 重命名 Server SessionManager 为 SessionMetadataManager - 扩展 Core PermissionContext 添加结构化字段 - 统一 Part 类型导出(Core 定义存储格式,Server 定义展示格式) - 简化 Message 格式(移除 MergedMessage,统一使用 Message) - 添加向后兼容的类型别名和 @deprecated 注释
This commit is contained in:
@@ -45,6 +45,8 @@ export type {
|
||||
Part,
|
||||
PartType,
|
||||
ToolPart,
|
||||
TextPart,
|
||||
ReasoningPart,
|
||||
ToolStatus,
|
||||
ToolState,
|
||||
TodoItem,
|
||||
@@ -57,11 +59,14 @@ export type { UserInput, ChatResult } from './types/index.js';
|
||||
// Permission
|
||||
export { getPermissionManager } from './permission/index.js';
|
||||
export type {
|
||||
PermissionType,
|
||||
PermissionContext,
|
||||
PermissionDecision,
|
||||
PermissionCheckResult,
|
||||
FilePermissionContext,
|
||||
FileOperation,
|
||||
GitPermissionContext,
|
||||
GitOperation,
|
||||
WebPermissionContext,
|
||||
} from './permission/index.js';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user