@roll-agent/core 0.18.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.txt +112 -0
- package/dist/cli/chat/banner.d.ts +13 -0
- package/dist/cli/chat/banner.js +1 -1
- package/dist/cli/chat/ink/app.d.ts +4 -1
- package/dist/cli/chat/ink/app.js +1 -1
- package/dist/cli/chat/ink/banner-view.d.ts +15 -0
- package/dist/cli/chat/ink/banner-view.js +1 -0
- package/dist/cli/chat/ink/commands.d.ts +4 -12
- package/dist/cli/chat/ink/commands.js +1 -1
- package/dist/cli/chat/ink/history-from-messages.js +1 -1
- package/dist/cli/chat/ink/history-item.js +1 -1
- package/dist/cli/chat/ink/input-history.d.ts +2 -0
- package/dist/cli/chat/ink/input-history.js +1 -0
- package/dist/cli/chat/ink/line-buffer.d.ts +2 -0
- package/dist/cli/chat/ink/line-buffer.js +1 -1
- package/dist/cli/chat/ink/live-region.d.ts +2 -0
- package/dist/cli/chat/ink/live-region.js +1 -1
- package/dist/cli/chat/ink/reasoning-block.d.ts +4 -0
- package/dist/cli/chat/ink/reasoning-block.js +1 -0
- package/dist/cli/chat/ink/run-ink-repl.js +1 -1
- package/dist/cli/chat/ink/spinner.d.ts +3 -1
- package/dist/cli/chat/ink/spinner.js +1 -1
- package/dist/cli/chat/ink/state.d.ts +26 -3
- package/dist/cli/chat/ink/state.js +1 -1
- package/dist/cli/chat/ink/text-prompt.d.ts +3 -1
- package/dist/cli/chat/ink/text-prompt.js +1 -1
- package/dist/cli/chat/ink/turn-activity.d.ts +19 -0
- package/dist/cli/chat/ink/turn-activity.js +1 -0
- package/dist/cli/chat/ink/turn-status-line.d.ts +14 -0
- package/dist/cli/chat/ink/turn-status-line.js +1 -0
- package/dist/cli/chat/ink/use-session.js +1 -1
- package/dist/cli/commands/chat.d.ts +28 -0
- package/dist/cli/commands/chat.js +1 -1
- package/dist/cli/commands/config-explain.js +1 -1
- package/dist/cli/commands/config-setup.js +1 -1
- package/dist/cli/commands/config.js +1 -1
- package/dist/cli/commands/doctor.js +1 -1
- package/dist/cli/commands/ui.d.ts +30 -0
- package/dist/cli/commands/ui.js +1 -0
- package/dist/cli/index.js +1 -1
- package/dist/cli/utils/chat-renderer.js +1 -1
- package/dist/cli/utils/current-cli-shim.d.ts +14 -0
- package/dist/cli/utils/current-cli-shim.js +1 -0
- package/dist/cli/utils/debug-format.d.ts +4 -0
- package/dist/cli/utils/debug-format.js +1 -0
- package/dist/config/application-service.d.ts +90 -0
- package/dist/config/application-service.js +1 -0
- package/dist/config/catalog.d.ts +76 -0
- package/dist/config/catalog.js +1 -0
- package/dist/config/defaults.d.ts +4 -3
- package/dist/config/defaults.js +1 -1
- package/dist/config/document-store.d.ts +70 -0
- package/dist/config/document-store.js +1 -0
- package/dist/config/guidance.d.ts +571 -0
- package/dist/config/guidance.js +1 -0
- package/dist/config/index.d.ts +6 -0
- package/dist/config/index.js +1 -1
- package/dist/config/key-codec.d.ts +24 -3
- package/dist/config/key-codec.js +1 -1
- package/dist/config/migration.js +1 -1
- package/dist/config/schema.d.ts +52 -7
- package/dist/config/schema.js +1 -1
- package/dist/config/secret-policy.d.ts +20 -0
- package/dist/config/secret-policy.js +1 -0
- package/dist/llm/providers.d.ts +8 -4
- package/dist/llm/providers.js +1 -1
- package/dist/registry/agent-lifecycle.d.ts +97 -0
- package/dist/registry/agent-lifecycle.js +1 -0
- package/dist/registry/discovery.js +1 -1
- package/dist/registry/install.js +1 -1
- package/dist/registry/process-identity.d.ts +14 -0
- package/dist/registry/process-identity.js +1 -0
- package/dist/registry/process-manager.d.ts +28 -7
- package/dist/registry/process-manager.js +1 -1
- package/dist/registry/store.js +1 -1
- package/dist/skills/invocation.d.ts +27 -0
- package/dist/skills/invocation.js +1 -0
- package/dist/types/agent.d.ts +6 -0
- package/dist/types/agent.js +1 -1
- package/dist/types/chat.d.ts +3 -0
- package/dist/ui/config-controller.d.ts +15 -0
- package/dist/ui/config-controller.js +1 -0
- package/dist/ui/contracts.d.ts +49 -0
- package/dist/ui/contracts.js +1 -0
- package/dist/ui/index.d.ts +8 -0
- package/dist/ui/index.js +1 -0
- package/dist/ui/runtime-controller.d.ts +38 -0
- package/dist/ui/runtime-controller.js +1 -0
- package/dist/ui/server.d.ts +21 -0
- package/dist/ui/server.js +1 -0
- package/dist/ui/static-assets.d.ts +2 -0
- package/dist/ui/static-assets.js +1 -0
- package/dist/ui-assets/assets/app.css +1 -0
- package/dist/ui-assets/assets/app.js +53 -0
- package/dist/ui-assets/assets/roll-mark-wXIkY5y0.svg +5 -0
- package/dist/ui-assets/index.html +17 -0
- package/package.json +16 -8
- package/dist/cli/commands/config-guidance.d.ts +0 -148
- package/dist/cli/commands/config-guidance.js +0 -1
|
@@ -0,0 +1,571 @@
|
|
|
1
|
+
import type { AgentEnvDeclaration, AgentSkillEnvDeclarations } from "../types/agent.ts";
|
|
2
|
+
export declare const INSTALL_SCENARIOS: readonly ["default-network", "china-dev", "private-registry", "advanced"];
|
|
3
|
+
export type InstallScenario = (typeof INSTALL_SCENARIOS)[number];
|
|
4
|
+
export interface ConfigGuidanceEntry {
|
|
5
|
+
readonly path: string;
|
|
6
|
+
readonly title: string;
|
|
7
|
+
readonly purpose: string;
|
|
8
|
+
readonly defaultBehavior?: string;
|
|
9
|
+
readonly example?: string;
|
|
10
|
+
readonly setupCommand?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const CONFIG_GUIDANCE_ENTRIES: readonly [{
|
|
13
|
+
readonly path: "llm";
|
|
14
|
+
readonly title: "LLM 与模型";
|
|
15
|
+
readonly purpose: "集中设置 Roll 默认使用的模型提供商、模型名称和各 Provider 连接信息。";
|
|
16
|
+
readonly defaultBehavior: "默认使用内置的 Anthropic Provider 与默认模型;实际调用仍需要可用的认证信息。";
|
|
17
|
+
readonly example: `llm:
|
|
18
|
+
default-provider: ${string}
|
|
19
|
+
default-model: ${string}
|
|
20
|
+
providers: {}`;
|
|
21
|
+
readonly setupCommand: "roll config setup llm";
|
|
22
|
+
}, {
|
|
23
|
+
readonly path: "llm.default-provider";
|
|
24
|
+
readonly title: "默认 LLM 提供商";
|
|
25
|
+
readonly purpose: "选择 `roll ask`、`roll run` 的 MCP sampling,以及未单独覆盖时 `roll chat` 使用的模型提供商。";
|
|
26
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${string}\`\u3002`;
|
|
27
|
+
readonly example: `llm:
|
|
28
|
+
default-provider: ${string}`;
|
|
29
|
+
readonly setupCommand: "roll config setup llm";
|
|
30
|
+
}, {
|
|
31
|
+
readonly path: "llm.default-model";
|
|
32
|
+
readonly title: "默认 LLM 模型";
|
|
33
|
+
readonly purpose: "指定 Ask 的默认路由与 sampling 模型、Run 的 sampling 模型,以及 Chat 未单独覆盖时的模型。";
|
|
34
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${string}\`\u3002`;
|
|
35
|
+
readonly example: `llm:
|
|
36
|
+
default-model: ${string}`;
|
|
37
|
+
readonly setupCommand: "roll config setup llm";
|
|
38
|
+
}, {
|
|
39
|
+
readonly path: "llm.providers";
|
|
40
|
+
readonly title: "LLM Provider 配置";
|
|
41
|
+
readonly purpose: "按 Provider 名称保存认证密钥和可选的自定义 API 地址。";
|
|
42
|
+
readonly defaultBehavior: "默认没有 Provider 连接条目;只需添加实际会使用的 Provider。";
|
|
43
|
+
readonly example: string;
|
|
44
|
+
readonly setupCommand: "roll config setup llm";
|
|
45
|
+
}, {
|
|
46
|
+
readonly path: "llm.providers.<provider>";
|
|
47
|
+
readonly title: "单个 LLM Provider";
|
|
48
|
+
readonly purpose: "配置一个由名称标识的模型服务连接,例如 `anthropic`、`openai` 或兼容网关。";
|
|
49
|
+
readonly defaultBehavior: "新增条目后必须提供 API 密钥;API 地址可留空并使用 Provider 默认值。";
|
|
50
|
+
readonly example: string;
|
|
51
|
+
readonly setupCommand: "roll config setup llm";
|
|
52
|
+
}, {
|
|
53
|
+
readonly path: "llm.providers.<provider>.api-key";
|
|
54
|
+
readonly title: "Provider API 密钥";
|
|
55
|
+
readonly purpose: string;
|
|
56
|
+
readonly defaultBehavior: "无默认值;新增 provider 配置后必须填写,否则配置校验失败。";
|
|
57
|
+
readonly example: string;
|
|
58
|
+
readonly setupCommand: "roll config setup llm";
|
|
59
|
+
}, {
|
|
60
|
+
readonly path: "llm.providers.<provider>.base-url";
|
|
61
|
+
readonly title: "Provider API 地址";
|
|
62
|
+
readonly purpose: "把指定 provider 指向代理、兼容网关或私有部署的 API 根地址。";
|
|
63
|
+
readonly defaultBehavior: "不配置时使用各 provider 的内置地址;Qwen 使用 DashScope OpenAI 兼容地址。";
|
|
64
|
+
readonly example: "llm:\n providers:\n openai:\n base-url: https://api.openai.com/v1";
|
|
65
|
+
readonly setupCommand: "roll config setup llm";
|
|
66
|
+
}, {
|
|
67
|
+
readonly path: "ask";
|
|
68
|
+
readonly title: "Ask 智能路由";
|
|
69
|
+
readonly purpose: "只覆盖 `roll ask` 的路由模型和低置信度确认阈值。";
|
|
70
|
+
readonly defaultBehavior: "不设置覆盖时沿用全局 LLM 模型与内置确认阈值。";
|
|
71
|
+
readonly example: "ask:\n confirm-threshold: 0.5";
|
|
72
|
+
}, {
|
|
73
|
+
readonly path: "ask.llm-model";
|
|
74
|
+
readonly title: "Ask 路由模型";
|
|
75
|
+
readonly purpose: "仅为 `roll ask` 的意图路由和参数提取指定模型,不改变 `roll chat` 模型。";
|
|
76
|
+
readonly defaultBehavior: "不配置时使用 `llm.default-model`。";
|
|
77
|
+
readonly example: "ask:\n llm-model: gpt-5.4-mini";
|
|
78
|
+
}, {
|
|
79
|
+
readonly path: "ask.confirm-threshold";
|
|
80
|
+
readonly title: "Ask 执行阈值";
|
|
81
|
+
readonly purpose: "路由置信度低于此值时停止自动执行,并返回需要确认的结果。";
|
|
82
|
+
readonly defaultBehavior: "不配置时使用内置阈值 `0.5`。";
|
|
83
|
+
readonly example: "ask:\n confirm-threshold: 0.5";
|
|
84
|
+
}, {
|
|
85
|
+
readonly path: "runtime";
|
|
86
|
+
readonly title: "Chat 运行时";
|
|
87
|
+
readonly purpose: "控制 `roll chat` 的模型、单轮限制、审批、上下文压缩和 Shell 工具。";
|
|
88
|
+
readonly defaultBehavior: "所有子项都有安全默认值;只有需要覆盖默认行为时才写入配置。";
|
|
89
|
+
readonly example: `runtime:
|
|
90
|
+
max-steps: ${number}
|
|
91
|
+
turn-timeout-ms: ${number}`;
|
|
92
|
+
}, {
|
|
93
|
+
readonly path: "runtime.provider";
|
|
94
|
+
readonly title: "Chat 模型提供商";
|
|
95
|
+
readonly purpose: "仅覆盖 `roll chat` 使用的模型提供商,便于让 Ask 与 Chat 使用不同服务。";
|
|
96
|
+
readonly defaultBehavior: "不配置时使用 `llm.default-provider`。";
|
|
97
|
+
readonly example: "runtime:\n provider: openai";
|
|
98
|
+
}, {
|
|
99
|
+
readonly path: "runtime.model";
|
|
100
|
+
readonly title: "Chat 模型";
|
|
101
|
+
readonly purpose: "仅覆盖 `roll chat` 的主模型;子 Agent 的 sampling 也复用该模型。";
|
|
102
|
+
readonly defaultBehavior: "不配置时使用 `llm.default-model`。";
|
|
103
|
+
readonly example: "runtime:\n model: gpt-5.5";
|
|
104
|
+
}, {
|
|
105
|
+
readonly path: "runtime.max-steps";
|
|
106
|
+
readonly title: "单轮最大步骤数";
|
|
107
|
+
readonly purpose: "限制 `roll chat` 单轮中模型继续推理和调用工具的最大步骤数。";
|
|
108
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${number}\`\uFF1B\u8FBE\u5230\u4E0A\u9650\u540E\u672C\u8F6E\u505C\u6B62\u7EE7\u7EED\u8C03\u7528\u5DE5\u5177\u3002`;
|
|
109
|
+
readonly example: `runtime:
|
|
110
|
+
max-steps: ${number}`;
|
|
111
|
+
}, {
|
|
112
|
+
readonly path: "runtime.turn-timeout-ms";
|
|
113
|
+
readonly title: "单轮超时时间";
|
|
114
|
+
readonly purpose: "限制 `roll chat` 一整轮从开始到结束可占用的总时间,单位毫秒。";
|
|
115
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${number}\`\uFF0C\u5373 5 \u5206\u949F\u3002`;
|
|
116
|
+
readonly example: `runtime:
|
|
117
|
+
turn-timeout-ms: ${number}`;
|
|
118
|
+
}, {
|
|
119
|
+
readonly path: "runtime.threads-dir";
|
|
120
|
+
readonly title: "会话存储目录";
|
|
121
|
+
readonly purpose: "保存 `roll chat` 会话元数据和消息记录,供会话恢复与列表命令读取。";
|
|
122
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${string}\`\uFF1B\u52A0\u8F7D\u65F6\u4F1A\u5C55\u5F00 \`~/\`\u3002`;
|
|
123
|
+
readonly example: `runtime:
|
|
124
|
+
threads-dir: ${string}`;
|
|
125
|
+
}, {
|
|
126
|
+
readonly path: "runtime.context-window";
|
|
127
|
+
readonly title: "上下文窗口";
|
|
128
|
+
readonly purpose: "手动声明当前 Chat 模型的上下文 token 容量,用于计算自动压缩触发点。";
|
|
129
|
+
readonly defaultBehavior: "不配置时按模型名查询内置容量表;无法识别时不按占用比例触发压缩。";
|
|
130
|
+
readonly example: "runtime:\n context-window: 200000";
|
|
131
|
+
}, {
|
|
132
|
+
readonly path: "runtime.thinking-level";
|
|
133
|
+
readonly title: "推理强度";
|
|
134
|
+
readonly purpose: "控制 Chat 与 MCP sampling 的推理强度;可选 `off`、`low`、`medium`、`high`。";
|
|
135
|
+
readonly defaultBehavior: "默认值为 `off`;具体预算由 provider 适配层映射。" | "默认值为 `low`;具体预算由 provider 适配层映射。" | "默认值为 `medium`;具体预算由 provider 适配层映射。" | "默认值为 `high`;具体预算由 provider 适配层映射。";
|
|
136
|
+
readonly example: "runtime:\n thinking-level: off" | "runtime:\n thinking-level: low" | "runtime:\n thinking-level: medium" | "runtime:\n thinking-level: high";
|
|
137
|
+
}, {
|
|
138
|
+
readonly path: "runtime.approval";
|
|
139
|
+
readonly title: "工具审批";
|
|
140
|
+
readonly purpose: "控制 Chat 调用工具时的默认授权方式,并允许按工具精确覆盖。";
|
|
141
|
+
readonly defaultBehavior: string;
|
|
142
|
+
readonly example: "runtime:\n approval:\n default: auto\n overrides: {}" | "runtime:\n approval:\n default: guarded\n overrides: {}" | "runtime:\n approval:\n default: deny\n overrides: {}";
|
|
143
|
+
}, {
|
|
144
|
+
readonly path: "runtime.approval.default";
|
|
145
|
+
readonly title: "工具默认审批策略";
|
|
146
|
+
readonly purpose: "决定 `roll chat` 未被单独覆盖的工具如何审批:`guarded` 按风险判断,`auto` 放行非破坏性操作,`deny` 拒绝。";
|
|
147
|
+
readonly defaultBehavior: "默认值为 `auto`。此配置不影响 `roll ask`。" | "默认值为 `guarded`。此配置不影响 `roll ask`。" | "默认值为 `deny`。此配置不影响 `roll ask`。";
|
|
148
|
+
readonly example: "runtime:\n approval:\n default: auto" | "runtime:\n approval:\n default: guarded" | "runtime:\n approval:\n default: deny";
|
|
149
|
+
}, {
|
|
150
|
+
readonly path: "runtime.approval.overrides";
|
|
151
|
+
readonly title: "单个工具审批规则";
|
|
152
|
+
readonly purpose: "按完整 `agentName.toolName` 为特定工具设置例外规则。";
|
|
153
|
+
readonly defaultBehavior: "默认为空;未命中的工具回退到 `runtime.approval.default`。";
|
|
154
|
+
readonly example: "runtime:\n approval:\n overrides:\n browser-use-agent.zhipin_send_prepared_reply: confirm\n browser-use-agent.browser_status: auto";
|
|
155
|
+
}, {
|
|
156
|
+
readonly path: "runtime.approval.overrides.<tool>";
|
|
157
|
+
readonly title: "单个工具审批策略";
|
|
158
|
+
readonly purpose: "为一个完整 `agentName.toolName` 选择 `auto`、`confirm` 或 `deny`。";
|
|
159
|
+
readonly defaultBehavior: "不配置该工具时回退到 `runtime.approval.default`。";
|
|
160
|
+
readonly example: "runtime:\n approval:\n overrides:\n browser-use-agent.browser_status: auto";
|
|
161
|
+
}, {
|
|
162
|
+
readonly path: "runtime.compaction";
|
|
163
|
+
readonly title: "上下文压缩";
|
|
164
|
+
readonly purpose: "在长对话接近模型上下文容量时,控制何时压缩以及保留多少近期内容。";
|
|
165
|
+
readonly defaultBehavior: "默认开启摘要压缩,并保留近期轮次与 token 预算。";
|
|
166
|
+
readonly example: "runtime:\n compaction:\n enabled: true\n strategy: summarize" | "runtime:\n compaction:\n enabled: true\n strategy: truncate";
|
|
167
|
+
}, {
|
|
168
|
+
readonly path: "runtime.compaction.enabled";
|
|
169
|
+
readonly title: "自动压缩上下文";
|
|
170
|
+
readonly purpose: "允许 Chat 在上下文接近容量或收到上下文超限错误时压缩早期消息。";
|
|
171
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${string}\`\u3002`;
|
|
172
|
+
readonly example: `runtime:
|
|
173
|
+
compaction:
|
|
174
|
+
enabled: ${string}`;
|
|
175
|
+
}, {
|
|
176
|
+
readonly path: "runtime.compaction.strategy";
|
|
177
|
+
readonly title: "上下文压缩策略";
|
|
178
|
+
readonly purpose: "选择 `summarize` 生成交接摘要,或用 `truncate` 直接移除较早消息。";
|
|
179
|
+
readonly defaultBehavior: "默认值为 `summarize`;结构化输出无效或过长时退回 `truncate`,Provider、网络或超时错误则保留原上下文。" | "默认值为 `truncate`;结构化输出无效或过长时退回 `truncate`,Provider、网络或超时错误则保留原上下文。";
|
|
180
|
+
readonly example: "runtime:\n compaction:\n strategy: summarize" | "runtime:\n compaction:\n strategy: truncate";
|
|
181
|
+
}, {
|
|
182
|
+
readonly path: "runtime.compaction.timeout-ms";
|
|
183
|
+
readonly title: "压缩模型超时";
|
|
184
|
+
readonly purpose: "限制结构化 Checkpoint 模型请求的总等待时间,不包含本地证据整理和持久化。";
|
|
185
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${string}\` \u6BEB\u79D2\uFF1B\u8D85\u65F6\u4FDD\u6301\u539F\u4E0A\u4E0B\u6587\uFF0C\u4E0D\u81EA\u52A8\u622A\u65AD\u3002`;
|
|
186
|
+
readonly example: `runtime:
|
|
187
|
+
compaction:
|
|
188
|
+
timeout-ms: ${string}`;
|
|
189
|
+
}, {
|
|
190
|
+
readonly path: "runtime.compaction.thinking-level";
|
|
191
|
+
readonly title: "压缩推理强度";
|
|
192
|
+
readonly purpose: "覆盖结构化 Checkpoint 生成的推理强度;使用 AI SDK 的统一 reasoning 语义映射到当前 Provider。";
|
|
193
|
+
readonly defaultBehavior: "默认不单独设置并继承 `runtime.thinking-level`;Qwen 结构化输出仍会强制关闭 thinking,不支持关闭推理的模型会在调用前报错。";
|
|
194
|
+
readonly example: "runtime:\n compaction:\n thinking-level: high";
|
|
195
|
+
}, {
|
|
196
|
+
readonly path: "runtime.compaction.max-output-tokens";
|
|
197
|
+
readonly title: "压缩输出 Token 上限";
|
|
198
|
+
readonly purpose: "限制结构化 Checkpoint 请求的 AI SDK 输出 token 预算。";
|
|
199
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${string}\`\uFF1BProvider \u7684 reasoning token \u4E5F\u53EF\u80FD\u5360\u7528\u8BE5\u9884\u7B97\u3002`;
|
|
200
|
+
readonly example: `runtime:
|
|
201
|
+
compaction:
|
|
202
|
+
max-output-tokens: ${string}`;
|
|
203
|
+
}, {
|
|
204
|
+
readonly path: "runtime.compaction.threshold";
|
|
205
|
+
readonly title: "自动压缩触发比例";
|
|
206
|
+
readonly purpose: "当最近一次输入 token 占上下文窗口的比例达到此值时,在下一轮前压缩。";
|
|
207
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${number}\`\u3002`;
|
|
208
|
+
readonly example: `runtime:
|
|
209
|
+
compaction:
|
|
210
|
+
threshold: ${number}`;
|
|
211
|
+
}, {
|
|
212
|
+
readonly path: "runtime.compaction.keep-recent-turns";
|
|
213
|
+
readonly title: "保留最近对话轮数";
|
|
214
|
+
readonly purpose: "压缩时至少保留最近的用户对话轮,避免当前任务细节过早进入摘要。";
|
|
215
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${number}\` \u8F6E\u3002`;
|
|
216
|
+
readonly example: `runtime:
|
|
217
|
+
compaction:
|
|
218
|
+
keep-recent-turns: ${number}`;
|
|
219
|
+
}, {
|
|
220
|
+
readonly path: "runtime.compaction.keep-recent-tokens";
|
|
221
|
+
readonly title: "保留最近 Token 预算";
|
|
222
|
+
readonly purpose: "压缩时用于保留近期完整对话的近似 token 预算,并与保留轮数共同取更保守边界。";
|
|
223
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${number}\`\u3002`;
|
|
224
|
+
readonly example: `runtime:
|
|
225
|
+
compaction:
|
|
226
|
+
keep-recent-tokens: ${number}`;
|
|
227
|
+
}, {
|
|
228
|
+
readonly path: "runtime.shell";
|
|
229
|
+
readonly title: "Shell 工具";
|
|
230
|
+
readonly purpose: "控制 Chat 是否可执行本地命令,以及一次性命令和后台会话的安全限制。";
|
|
231
|
+
readonly defaultBehavior: "默认关闭;开启后仍受工具审批策略、超时和输出上限约束。";
|
|
232
|
+
readonly example: "runtime:\n shell:\n enabled: true";
|
|
233
|
+
readonly setupCommand: "roll config setup shell";
|
|
234
|
+
}, {
|
|
235
|
+
readonly path: "runtime.shell.enabled";
|
|
236
|
+
readonly title: "Chat 内建 shell 工具";
|
|
237
|
+
readonly purpose: "在 `roll chat` 中注册命令工具:macOS/Linux 使用 `roll__bash`,Windows 使用 `roll__powershell`。";
|
|
238
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${string}\`\uFF08\u5173\u95ED\uFF09\uFF1BWindows \u8FD8\u9700\u8981 PowerShell 7+\u3002`;
|
|
239
|
+
readonly example: "runtime:\n shell:\n enabled: true";
|
|
240
|
+
readonly setupCommand: "roll config setup shell";
|
|
241
|
+
}, {
|
|
242
|
+
readonly path: "runtime.shell.auto-approve-safe";
|
|
243
|
+
readonly title: "只读命令免确认";
|
|
244
|
+
readonly purpose: "让 POSIX shell 中已识别的安全只读命令免确认;危险或无法识别的命令仍需审批。";
|
|
245
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${string}\`\uFF1BWindows PowerShell \u547D\u4EE4\u76EE\u524D\u4ECD\u6309\u672A\u77E5\u64CD\u4F5C\u5904\u7406\u3002`;
|
|
246
|
+
readonly example: "runtime:\n shell:\n enabled: true\n auto-approve-safe: false";
|
|
247
|
+
readonly setupCommand: "roll config setup shell";
|
|
248
|
+
}, {
|
|
249
|
+
readonly path: "runtime.shell.default-timeout-ms";
|
|
250
|
+
readonly title: "Shell 默认超时时间";
|
|
251
|
+
readonly purpose: "为未显式传入超时的一次性 shell 命令设置执行上限,单位毫秒。";
|
|
252
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${number}\`\uFF1B\u8FD8\u4F1A\u53D7\u6700\u5927\u8D85\u65F6\u548C\u5355\u8F6E\u8D85\u65F6\u9650\u5236\u3002`;
|
|
253
|
+
readonly example: `runtime:
|
|
254
|
+
shell:
|
|
255
|
+
default-timeout-ms: ${number}`;
|
|
256
|
+
readonly setupCommand: "roll config setup shell";
|
|
257
|
+
}, {
|
|
258
|
+
readonly path: "runtime.shell.max-timeout-ms";
|
|
259
|
+
readonly title: "Shell 最大超时时间";
|
|
260
|
+
readonly purpose: "限制模型为一次性 shell 命令请求的最长执行时间,单位毫秒。";
|
|
261
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${number}\`\uFF1B\u5B9E\u9645\u65F6\u9650\u4ECD\u4E0D\u4F1A\u8D85\u8FC7\u5355\u8F6E\u8D85\u65F6\u3002`;
|
|
262
|
+
readonly example: `runtime:
|
|
263
|
+
shell:
|
|
264
|
+
max-timeout-ms: ${number}`;
|
|
265
|
+
readonly setupCommand: "roll config setup shell";
|
|
266
|
+
}, {
|
|
267
|
+
readonly path: "runtime.shell.max-capture-bytes";
|
|
268
|
+
readonly title: "Shell 输出捕获上限";
|
|
269
|
+
readonly purpose: "限制 shell 标准输出与错误输出的内存捕获量,并限制后台会话输出缓冲区。";
|
|
270
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${number}\` \u5B57\u8282\u3002`;
|
|
271
|
+
readonly example: `runtime:
|
|
272
|
+
shell:
|
|
273
|
+
max-capture-bytes: ${number}`;
|
|
274
|
+
readonly setupCommand: "roll config setup shell";
|
|
275
|
+
}, {
|
|
276
|
+
readonly path: "runtime.shell.max-model-output-chars";
|
|
277
|
+
readonly title: "Shell 模型输出上限";
|
|
278
|
+
readonly purpose: "限制一次性 shell 工具返回给模型的 stdout 与 stderr 总字符数。";
|
|
279
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${number}\` \u4E2A\u5B57\u7B26\uFF1B\u8D85\u51FA\u90E8\u5206\u4F1A\u622A\u65AD\u5E76\u6807\u8BB0\u3002`;
|
|
280
|
+
readonly example: `runtime:
|
|
281
|
+
shell:
|
|
282
|
+
max-model-output-chars: ${number}`;
|
|
283
|
+
readonly setupCommand: "roll config setup shell";
|
|
284
|
+
}, {
|
|
285
|
+
readonly path: "runtime.shell.session";
|
|
286
|
+
readonly title: "后台命令会话";
|
|
287
|
+
readonly purpose: "让长命令跨 Chat 轮次继续运行,并通过轮询读取增量输出和退出状态。";
|
|
288
|
+
readonly defaultBehavior: "默认关闭;必须同时开启 Shell 工具,且会话随当前 Chat 进程退出。";
|
|
289
|
+
readonly example: "runtime:\n shell:\n enabled: true\n session:\n enabled: true";
|
|
290
|
+
readonly setupCommand: "roll config setup shell";
|
|
291
|
+
}, {
|
|
292
|
+
readonly path: "runtime.shell.session.enabled";
|
|
293
|
+
readonly title: "Chat 会话式长命令执行";
|
|
294
|
+
readonly purpose: "在 macOS/Linux 与 Windows PowerShell 7+ 中注册 `roll__exec_command`、`roll__exec_poll`、`roll__exec_list`,让长命令在后台跨轮运行。";
|
|
295
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${string}\`\uFF08\u5173\u95ED\uFF09\uFF1B\u4EC5\u957F\u9A7B Chat \u6A21\u5F0F\u53EF\u7528\u4E14\u9700\u5F00\u542F \`runtime.shell.enabled\`\uFF0C\`--server\` \u8FD8\u9700\u663E\u5F0F\u653E\u884C \`roll.exec_command\`\u3002`;
|
|
296
|
+
readonly example: "runtime:\n shell:\n enabled: true\n session:\n enabled: true\n approval:\n overrides:\n roll.exec_command: auto";
|
|
297
|
+
readonly setupCommand: "roll config setup shell";
|
|
298
|
+
}, {
|
|
299
|
+
readonly path: "runtime.shell.session.max-sessions";
|
|
300
|
+
readonly title: "后台命令会话上限";
|
|
301
|
+
readonly purpose: "限制同一 `roll chat` 进程中可保留的运行中或待领取结果的后台命令会话数。";
|
|
302
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${number}\` \u4E2A\u4F1A\u8BDD\u3002`;
|
|
303
|
+
readonly example: `runtime:
|
|
304
|
+
shell:
|
|
305
|
+
session:
|
|
306
|
+
max-sessions: ${number}`;
|
|
307
|
+
readonly setupCommand: "roll config setup shell";
|
|
308
|
+
}, {
|
|
309
|
+
readonly path: "runtime.shell.session.default-yield-ms";
|
|
310
|
+
readonly title: "后台命令默认等待时间";
|
|
311
|
+
readonly purpose: "设置 `exec_command` 首次返回前以及后续轮询通常等待的时间,单位毫秒。";
|
|
312
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${number}\`\uFF1B\u8C03\u7528\u65B9\u4ECD\u53EF\u5728\u5DE5\u5177\u53C2\u6570\u4E2D\u8986\u76D6\u3002`;
|
|
313
|
+
readonly example: `runtime:
|
|
314
|
+
shell:
|
|
315
|
+
session:
|
|
316
|
+
default-yield-ms: ${number}`;
|
|
317
|
+
readonly setupCommand: "roll config setup shell";
|
|
318
|
+
}, {
|
|
319
|
+
readonly path: "runtime.shell.session.max-output-tokens";
|
|
320
|
+
readonly title: "后台命令单次输出上限";
|
|
321
|
+
readonly purpose: "限制 `exec_command` / `exec_poll` 每次返回给模型的新输出量,以近似 token 数计。";
|
|
322
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${number}\`\uFF1B\u8FD0\u884C\u4E2D\u7684\u4F1A\u8BDD\u4E0D\u4F1A\u56E0\u8F93\u51FA\u622A\u65AD\u800C\u505C\u6B62\u3002`;
|
|
323
|
+
readonly example: `runtime:
|
|
324
|
+
shell:
|
|
325
|
+
session:
|
|
326
|
+
max-output-tokens: ${number}`;
|
|
327
|
+
readonly setupCommand: "roll config setup shell";
|
|
328
|
+
}, {
|
|
329
|
+
readonly path: "skills";
|
|
330
|
+
readonly title: "Skills 发现";
|
|
331
|
+
readonly purpose: "补充 `roll chat` 自动发现范围之外的 Skill 目录。";
|
|
332
|
+
readonly defaultBehavior: "标准项目级、用户级和已注册 Agent Skills 始终自动发现。";
|
|
333
|
+
readonly example: "skills:\n dirs: []";
|
|
334
|
+
}, {
|
|
335
|
+
readonly path: "skills.dirs";
|
|
336
|
+
readonly title: "Chat 额外 skill 目录";
|
|
337
|
+
readonly purpose: "`roll chat` 会自动发现项目级、用户级和已注册 Agent 的 Skill。这里只填写标准范围之外的额外目录,例如团队共享目录;目录可以直接包含 `SKILL.md`,也可以包含多个 Skill 子目录。";
|
|
338
|
+
readonly defaultBehavior: "默认为空;`<项目>/.agents/skills`、`~/.agents/skills`,以及通过 `npx skills add` 安装到标准位置的 Skill 都会自动发现,无需重复填写。";
|
|
339
|
+
readonly example: "skills:\n dirs:\n - ./openclaw-roll-core-skill-template";
|
|
340
|
+
}, {
|
|
341
|
+
readonly path: "skills.dirs.<item>";
|
|
342
|
+
readonly title: "额外 Skill 目录路径";
|
|
343
|
+
readonly purpose: "添加一个额外搜索目录;它可以直接含 `SKILL.md`,也可以包含多个 skill 子目录。";
|
|
344
|
+
readonly defaultBehavior: "默认没有额外目录;项目级、用户级和已注册 Agent 的 skills 仍会自动发现。";
|
|
345
|
+
readonly example: "skills:\n dirs:\n - ./skills/team-shared";
|
|
346
|
+
}, {
|
|
347
|
+
readonly path: "agents";
|
|
348
|
+
readonly title: "Agent 管理";
|
|
349
|
+
readonly purpose: "设置 Roll 的 Agent 数据目录,并为子 Agent 声明额外环境变量。";
|
|
350
|
+
readonly defaultBehavior: "使用默认数据目录;未写入的环境变量继续从 Roll 进程环境继承。";
|
|
351
|
+
readonly example: `agents:
|
|
352
|
+
data-dir: ${string}`;
|
|
353
|
+
}, {
|
|
354
|
+
readonly path: "agents.data-dir";
|
|
355
|
+
readonly title: "Agent 数据目录";
|
|
356
|
+
readonly purpose: "保存已注册 Agent、PID、日志和 runtime sidecar 等 Roll 管理数据。";
|
|
357
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${string}\`\uFF1B\u52A0\u8F7D\u65F6\u4F1A\u5C55\u5F00 \`~/\`\u3002`;
|
|
358
|
+
readonly example: `agents:
|
|
359
|
+
data-dir: ${string}`;
|
|
360
|
+
}, {
|
|
361
|
+
readonly path: "agents.env";
|
|
362
|
+
readonly title: "其他 Agent 环境变量";
|
|
363
|
+
readonly purpose: "为未在独立 Agent 页面中展示的 Agent 或自定义变量提供通用键值配置入口。";
|
|
364
|
+
readonly defaultBehavior: "默认没有额外注入;已声明的注册 Agent 优先在各自页面配置。";
|
|
365
|
+
readonly example: "agents:\n env:\n custom-agent:\n FEATURE_FLAG: enabled";
|
|
366
|
+
readonly setupCommand: "roll config setup agent <agent-name>";
|
|
367
|
+
}, {
|
|
368
|
+
readonly path: "agents.env.<agent-name>";
|
|
369
|
+
readonly title: "Agent 环境变量组";
|
|
370
|
+
readonly purpose: "按 Agent 名称组织需要注入子进程的环境变量。";
|
|
371
|
+
readonly defaultBehavior: "默认没有额外注入;子进程仍继承当前 Roll 进程环境。";
|
|
372
|
+
readonly example: "agents:\n env:\n browser-use-agent:\n REPLY_AUTHORITY_URL: https://example.com";
|
|
373
|
+
readonly setupCommand: "roll config setup agent <agent-name>";
|
|
374
|
+
}, {
|
|
375
|
+
readonly path: "agents.env.<agent-name>.<variable>";
|
|
376
|
+
readonly title: "Agent 环境变量";
|
|
377
|
+
readonly purpose: "为一个 Agent 注入单个字符串环境变量;同名值会覆盖父进程继承值。";
|
|
378
|
+
readonly defaultBehavior: "不配置时沿用 Roll 进程中的同名环境变量;core-managed Agent 需重启后生效。";
|
|
379
|
+
readonly example: "agents:\n env:\n browser-use-agent:\n REPLY_AUTHORITY_URL: https://example.com";
|
|
380
|
+
readonly setupCommand: "roll config setup agent <agent-name>";
|
|
381
|
+
}, {
|
|
382
|
+
readonly path: "install";
|
|
383
|
+
readonly title: "安装与更新";
|
|
384
|
+
readonly purpose: "控制 Agent 安装和 Roll 更新时使用的 npm 软件源、重试、缓存与超时。";
|
|
385
|
+
readonly defaultBehavior: "默认使用 npm 自身的软件源,并采用 Roll 的安全网络默认值。";
|
|
386
|
+
readonly example: `install:
|
|
387
|
+
fetch-retries: ${number}
|
|
388
|
+
prefer-offline: false`;
|
|
389
|
+
readonly setupCommand: "roll config setup install";
|
|
390
|
+
}, {
|
|
391
|
+
readonly path: "install.registry";
|
|
392
|
+
readonly title: "npm Registry 地址";
|
|
393
|
+
readonly purpose: "指定 `roll agent install` 与 `roll update` 查询和安装 npm 包时使用的软件源。";
|
|
394
|
+
readonly defaultBehavior: "不配置时使用 npm 自身默认源;Roll 不做隐式镜像 fallback。";
|
|
395
|
+
readonly example: "install:\n registry: https://registry.npmmirror.com";
|
|
396
|
+
readonly setupCommand: "roll config setup install";
|
|
397
|
+
}, {
|
|
398
|
+
readonly path: "install.fetch-retries";
|
|
399
|
+
readonly title: "安装下载重试次数";
|
|
400
|
+
readonly purpose: "设置 npm `--fetch-retries`,同时作为 Roll 安装网络操作的整体重试次数。";
|
|
401
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${number}\` \u6B21\u3002`;
|
|
402
|
+
readonly example: `install:
|
|
403
|
+
fetch-retries: ${number}`;
|
|
404
|
+
readonly setupCommand: "roll config setup install";
|
|
405
|
+
}, {
|
|
406
|
+
readonly path: "install.prefer-offline";
|
|
407
|
+
readonly title: "优先使用本地缓存";
|
|
408
|
+
readonly purpose: "决定 npm 安装时是否附加 `--prefer-offline`,优先复用本地缓存元数据。";
|
|
409
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${string}\`\uFF0C\u4F18\u5148\u83B7\u53D6\u65B0\u9C9C\u5143\u6570\u636E\u3002`;
|
|
410
|
+
readonly example: `install:
|
|
411
|
+
prefer-offline: ${string}`;
|
|
412
|
+
readonly setupCommand: "roll config setup install";
|
|
413
|
+
}, {
|
|
414
|
+
readonly path: "install.network-timeout-ms";
|
|
415
|
+
readonly title: "安装网络超时时间";
|
|
416
|
+
readonly purpose: "限制单次 npm install 命令的等待时间,单位毫秒。";
|
|
417
|
+
readonly defaultBehavior: `\u9ED8\u8BA4\u503C\u4E3A \`${number}\`\uFF0C\u5373 120 \u79D2\u3002`;
|
|
418
|
+
readonly example: `install:
|
|
419
|
+
network-timeout-ms: ${number}`;
|
|
420
|
+
readonly setupCommand: "roll config setup install";
|
|
421
|
+
}, {
|
|
422
|
+
readonly path: "browser";
|
|
423
|
+
readonly title: "浏览器实例";
|
|
424
|
+
readonly purpose: "管理 browser-use-agent 可以连接或启动的浏览器实例及默认选择。";
|
|
425
|
+
readonly defaultBehavior: "未声明实例时继续使用 legacy 单实例环境变量配置。";
|
|
426
|
+
readonly example: "browser:\n instances: {}";
|
|
427
|
+
}, {
|
|
428
|
+
readonly path: "browser.default-instance";
|
|
429
|
+
readonly title: "默认浏览器实例";
|
|
430
|
+
readonly purpose: "指定工具未传 `browserInstance` 时优先选择的已声明实例。";
|
|
431
|
+
readonly defaultBehavior: "不配置且只有一个实例时自动选择;有多个实例时必须由调用方指定。";
|
|
432
|
+
readonly example: "browser:\n default-instance: boss-a";
|
|
433
|
+
}, {
|
|
434
|
+
readonly path: "browser.instances";
|
|
435
|
+
readonly title: "浏览器实例声明";
|
|
436
|
+
readonly purpose: "声明 browser-use-agent 可使用的浏览器 profile、CDP 端口、会话目录和业务归因信息。";
|
|
437
|
+
readonly defaultBehavior: "不配置时 browser-use-agent 使用 legacy 单实例环境变量路径。";
|
|
438
|
+
readonly example: "browser:\n instances:\n boss-a:\n platform: zhipin\n mode: managed-cdp\n cdp-port: 9222\n user-data-dir: ~/.roll-agent/browser/boss-a";
|
|
439
|
+
}, {
|
|
440
|
+
readonly path: "browser.instances.<instance>";
|
|
441
|
+
readonly title: "单个浏览器实例";
|
|
442
|
+
readonly purpose: "用一个稳定名称描述浏览器连接方式、Profile、窗口和业务归属。";
|
|
443
|
+
readonly defaultBehavior: "默认使用本地托管 Chrome;仍必须为每个实例设置独占 Profile 目录和 CDP 端口。";
|
|
444
|
+
readonly example: "browser:\n instances:\n boss-a:\n mode: managed-cdp\n cdp-port: 9222\n user-data-dir: ~/.roll-agent/browser/boss-a";
|
|
445
|
+
}, {
|
|
446
|
+
readonly path: "browser.instances.<instance>.platform";
|
|
447
|
+
readonly title: "业务平台";
|
|
448
|
+
readonly purpose: "标记该浏览器实例属于 BOSS 直聘(`zhipin`)还是鱼泡(`yupao`),用于平台匹配校验。";
|
|
449
|
+
readonly defaultBehavior: "不配置时实例不限定业务平台,平台专用工具不会做实例平台冲突校验。";
|
|
450
|
+
readonly example: "browser:\n instances:\n boss-a:\n platform: zhipin";
|
|
451
|
+
}, {
|
|
452
|
+
readonly path: "browser.instances.<instance>.mode";
|
|
453
|
+
readonly title: "浏览器连接模式";
|
|
454
|
+
readonly purpose: "选择本地托管浏览器、远程 CDP,或连接用户已启动浏览器会话。";
|
|
455
|
+
readonly defaultBehavior: "默认值为 `managed-cdp`。";
|
|
456
|
+
readonly example: "browser:\n instances:\n boss-a:\n mode: managed-cdp";
|
|
457
|
+
}, {
|
|
458
|
+
readonly path: "browser.instances.<instance>.headless";
|
|
459
|
+
readonly title: "无头运行";
|
|
460
|
+
readonly purpose: "控制 `managed-cdp` 启动的浏览器是否隐藏窗口;其他连接模式不使用此项。";
|
|
461
|
+
readonly defaultBehavior: "不配置时继承 browser-use-agent 全局设置,默认显示浏览器窗口。";
|
|
462
|
+
readonly example: "browser:\n instances:\n boss-a:\n headless: false";
|
|
463
|
+
}, {
|
|
464
|
+
readonly path: "browser.instances.<instance>.cdp-url";
|
|
465
|
+
readonly title: "CDP 连接地址";
|
|
466
|
+
readonly purpose: "提供 `remote-cdp` 或 `existing-session` 模式要连接的 HTTP(S) / WebSocket CDP 地址。";
|
|
467
|
+
readonly defaultBehavior: "这两种模式下无默认值且必须填写;`managed-cdp` 使用 host 与 port 生成地址。";
|
|
468
|
+
readonly example: "browser:\n instances:\n chrome-open:\n mode: existing-session\n cdp-url: http://127.0.0.1:9222";
|
|
469
|
+
}, {
|
|
470
|
+
readonly path: "browser.instances.<instance>.cdp-host";
|
|
471
|
+
readonly title: "本地 CDP 主机";
|
|
472
|
+
readonly purpose: "指定 `managed-cdp` 启动后用于健康检查和连接的 CDP 主机地址。";
|
|
473
|
+
readonly defaultBehavior: "默认值为 `127.0.0.1`;远程与已有会话模式不使用此项。";
|
|
474
|
+
readonly example: "browser:\n instances:\n boss-a:\n cdp-host: 127.0.0.1";
|
|
475
|
+
}, {
|
|
476
|
+
readonly path: "browser.instances.<instance>.cdp-port";
|
|
477
|
+
readonly title: "本地 CDP 端口";
|
|
478
|
+
readonly purpose: "指定 `managed-cdp` 浏览器的远程调试端口;每个实例必须使用不同端口。";
|
|
479
|
+
readonly defaultBehavior: "`managed-cdp` 实例无默认值且必须填写;其他模式不使用此项。";
|
|
480
|
+
readonly example: "browser:\n instances:\n boss-a:\n cdp-port: 9222";
|
|
481
|
+
}, {
|
|
482
|
+
readonly path: "browser.instances.<instance>.channel";
|
|
483
|
+
readonly title: "浏览器类型";
|
|
484
|
+
readonly purpose: "选择 `managed-cdp` 启动系统 Chrome、Playwright Chromium 或 Microsoft Edge。";
|
|
485
|
+
readonly defaultBehavior: "默认值为 `chrome`;配置 `executable-path` 后此项会被忽略。";
|
|
486
|
+
readonly example: "browser:\n instances:\n boss-a:\n channel: chrome";
|
|
487
|
+
}, {
|
|
488
|
+
readonly path: "browser.instances.<instance>.executable-path";
|
|
489
|
+
readonly title: "浏览器程序路径";
|
|
490
|
+
readonly purpose: "为 `managed-cdp` 指定浏览器可执行文件,适合非标准安装位置或定制版本。";
|
|
491
|
+
readonly defaultBehavior: "不配置时按 `channel` 查找系统浏览器;配置后优先使用此路径。";
|
|
492
|
+
readonly example: "browser:\n instances:\n boss-a:\n executable-path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome";
|
|
493
|
+
}, {
|
|
494
|
+
readonly path: "browser.instances.<instance>.user-data-dir";
|
|
495
|
+
readonly title: "浏览器 Profile 目录";
|
|
496
|
+
readonly purpose: "为实例声明独占的 Profile 目录;`managed-cdp` 在此保存登录态,状态检查也会检查其可写性。";
|
|
497
|
+
readonly defaultBehavior: "无默认值;每个已声明实例都必须填写。";
|
|
498
|
+
readonly example: "browser:\n instances:\n boss-a:\n user-data-dir: ~/.roll-agent/browser/boss-a";
|
|
499
|
+
}, {
|
|
500
|
+
readonly path: "browser.instances.<instance>.sessions-dir";
|
|
501
|
+
readonly title: "浏览器会话目录";
|
|
502
|
+
readonly purpose: "保存 Roll 的页面会话快照,与浏览器自身的 Profile 数据分开存放。";
|
|
503
|
+
readonly defaultBehavior: "不配置时使用 `~/.roll-agent/browser/sessions/<instance-id>`。";
|
|
504
|
+
readonly example: "browser:\n instances:\n boss-a:\n sessions-dir: ~/.roll-agent/browser/sessions/boss-a";
|
|
505
|
+
}, {
|
|
506
|
+
readonly path: "browser.instances.<instance>.args";
|
|
507
|
+
readonly title: "浏览器启动参数列表";
|
|
508
|
+
readonly purpose: "仅为本地托管浏览器追加确有必要的命令行开关。";
|
|
509
|
+
readonly defaultBehavior: "默认使用 browser-use-agent 内置启动参数,不追加自定义值。";
|
|
510
|
+
readonly example: "browser:\n instances:\n boss-a:\n args:\n - --lang=zh-CN";
|
|
511
|
+
}, {
|
|
512
|
+
readonly path: "browser.instances.<instance>.args.<item>";
|
|
513
|
+
readonly title: "浏览器启动参数";
|
|
514
|
+
readonly purpose: "向 `managed-cdp` 浏览器追加一个命令行参数;仅添加确实需要的开关。";
|
|
515
|
+
readonly defaultBehavior: "默认不追加自定义参数;远程与已有会话模式不使用此项。";
|
|
516
|
+
readonly example: "browser:\n instances:\n boss-a:\n args:\n - --lang=zh-CN";
|
|
517
|
+
}, {
|
|
518
|
+
readonly path: "browser.instances.<instance>.profile-name";
|
|
519
|
+
readonly title: "浏览器 Profile 名称";
|
|
520
|
+
readonly purpose: "设置托管 Chrome 窗口显示的 Profile 名称,帮助区分多个业务账号。";
|
|
521
|
+
readonly defaultBehavior: "不配置时使用浏览器实例 ID。";
|
|
522
|
+
readonly example: "browser:\n instances:\n boss-a:\n profile-name: BOSS 主账号";
|
|
523
|
+
}, {
|
|
524
|
+
readonly path: "browser.instances.<instance>.profile-color";
|
|
525
|
+
readonly title: "浏览器 Profile 颜色";
|
|
526
|
+
readonly purpose: "用六位十六进制颜色标记托管 Chrome Profile,帮助肉眼区分多个窗口。";
|
|
527
|
+
readonly defaultBehavior: "不配置时按实例顺序自动分配不同颜色。";
|
|
528
|
+
readonly example: "browser:\n instances:\n boss-a:\n profile-color: \"#2563EB\"";
|
|
529
|
+
}, {
|
|
530
|
+
readonly path: "browser.instances.<instance>.window-bounds";
|
|
531
|
+
readonly title: "窗口位置与大小";
|
|
532
|
+
readonly purpose: "可选地固定托管浏览器窗口的屏幕位置和尺寸。";
|
|
533
|
+
readonly defaultBehavior: "整组留空时,多实例可视模式会自动排布窗口。";
|
|
534
|
+
readonly example: "browser:\n instances:\n boss-a:\n window-bounds:\n x: 0\n y: 0\n width: 960\n height: 900";
|
|
535
|
+
}, {
|
|
536
|
+
readonly path: "browser.instances.<instance>.window-bounds.x";
|
|
537
|
+
readonly title: "窗口横向位置";
|
|
538
|
+
readonly purpose: "设置托管浏览器窗口左上角距主屏左侧的像素数。";
|
|
539
|
+
readonly defaultBehavior: "整个 `window-bounds` 未设置时,多实例可视模式会自动排布;否则交由系统决定。";
|
|
540
|
+
readonly example: "browser:\n instances:\n boss-a:\n window-bounds:\n x: 0";
|
|
541
|
+
}, {
|
|
542
|
+
readonly path: "browser.instances.<instance>.window-bounds.y";
|
|
543
|
+
readonly title: "窗口纵向位置";
|
|
544
|
+
readonly purpose: "设置托管浏览器窗口左上角距主屏顶部的像素数。";
|
|
545
|
+
readonly defaultBehavior: "整个 `window-bounds` 未设置时,多实例可视模式会自动排布;否则交由系统决定。";
|
|
546
|
+
readonly example: "browser:\n instances:\n boss-a:\n window-bounds:\n y: 0";
|
|
547
|
+
}, {
|
|
548
|
+
readonly path: "browser.instances.<instance>.window-bounds.width";
|
|
549
|
+
readonly title: "窗口宽度";
|
|
550
|
+
readonly purpose: "设置托管浏览器窗口宽度,单位像素,必须大于 0。";
|
|
551
|
+
readonly defaultBehavior: "整个 `window-bounds` 未设置时,多实例可视模式会自动排布;否则交由系统决定。";
|
|
552
|
+
readonly example: "browser:\n instances:\n boss-a:\n window-bounds:\n width: 960";
|
|
553
|
+
}, {
|
|
554
|
+
readonly path: "browser.instances.<instance>.window-bounds.height";
|
|
555
|
+
readonly title: "窗口高度";
|
|
556
|
+
readonly purpose: "设置托管浏览器窗口高度,单位像素,必须大于 0。";
|
|
557
|
+
readonly defaultBehavior: "整个 `window-bounds` 未设置时,多实例可视模式会自动排布;否则交由系统决定。";
|
|
558
|
+
readonly example: "browser:\n instances:\n boss-a:\n window-bounds:\n height: 900";
|
|
559
|
+
}, {
|
|
560
|
+
readonly path: "browser.instances.<instance>.tracking-agent-id";
|
|
561
|
+
readonly title: "招聘事件 Agent ID";
|
|
562
|
+
readonly purpose: "为该浏览器实例上报的招聘事件指定归因 Agent ID。";
|
|
563
|
+
readonly defaultBehavior: "不配置时回退到 `RECRUITMENT_EVENTS_DEFAULT_AGENT_ID`;两者都没有时状态标记为未配置。";
|
|
564
|
+
readonly example: "browser:\n instances:\n boss-a:\n tracking-agent-id: zhipin-boss-a";
|
|
565
|
+
}];
|
|
566
|
+
export declare function listConfigGuidanceEntries(): readonly ConfigGuidanceEntry[];
|
|
567
|
+
export declare function findConfigGuidance(path: string): ConfigGuidanceEntry | undefined;
|
|
568
|
+
export declare function flattenAgentEnvDeclarations(declarations: AgentSkillEnvDeclarations | undefined): ReadonlyArray<AgentEnvDeclaration & {
|
|
569
|
+
readonly required: boolean;
|
|
570
|
+
}>;
|
|
571
|
+
export declare function isSecretEnvDeclaration(declaration: AgentEnvDeclaration): boolean;
|