23.2 配置类型系统详解
23.2.1 核心类型概览(src/config/types.ts)
src/config/types.ts)模块化拆分
// src/config/types.ts
export * from "./types.agent-defaults.js";
export * from "./types.agents.js";
export * from "./types.approvals.js";
export * from "./types.auth.js";
export * from "./types.base.js";
export * from "./types.browser.js";
export * from "./types.channels.js";
export * from "./types.discord.js";
// ... 共 30+ 个子模块
export * from "./types.memory.js";OpenClawConfig 的顶层结构
键
类型模块
描述
23.2.2 Agent 配置(types.agents.ts / types.agent-defaults.ts)
types.agents.ts / types.agent-defaults.ts)双层配置结构
AgentConfig 关键字段
默认配置中的精细控制
23.2.3 通道配置(types.channels.ts / types.discord.ts / types.telegram.ts 等)
types.channels.ts / types.discord.ts / types.telegram.ts 等)通道
类型文件
关键配置项
23.2.4 安全配置(types.sandbox.ts / types.auth.ts)
types.sandbox.ts / types.auth.ts)沙箱配置
认证配置
23.2.5 模型配置(types.models.ts)
types.models.ts)API 标识
对应服务
23.2.6 工具/技能/钩子配置(types.tools.ts / types.skills.ts / types.hooks.ts)
types.tools.ts / types.skills.ts / types.hooks.ts)工具配置
技能配置
钩子配置
本节小结
Last updated