katu-core 0.1.0

Core traits and types for the Katu AI Agent framework
Documentation

katu-core

职责

定义 Katu AI Agent 框架的核心 trait 与类型。 零外部 katu 依赖,是整个系统的"接口契约"层。

对外接口

  • types — newtype ID 与基础枚举 (SessionId, MessageId, Role, FinishReason...)
  • error — 全局错误类型 (Error, ProviderErrorKind, AuthErrorKind, Result)
  • usage — token 用量与费用类型 (Usage, Cost)
  • message — 对话消息类型 (Message, ContentBlock, AssistantBlock...)
  • generation — LLM 生成参数 (GenerationOptions)
  • event — LLM 流式事件 (StreamEvent, ToolResultValue)
  • agent_event — Agent 语义层事件 (AgentEvent, AgentEventKind, AgentFinishReason...)
  • tool — 工具类型与执行契约 (Tool, ToolDefinition, ToolOutput, ToolCallContext...)
  • agent — Agent 定义数据模型 (AgentDefinition, AgentRole, ToolFilter...)
  • hook — Hook 系统类型与执行契约 (Hook, HookEvent, HookInput, HookOutput, HookRegistry...)
  • permission — 权限系统类型与规则引擎 (PermissionRule, Ruleset, PermissionDecision, PermissionMode...)