feat(core,web,cli): add file tools and per-tool call descriptions (#62)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -81,7 +81,7 @@ packages/
|
||||
│ ├── engine/context-engine.ts # ReAct loop orchestration: turn lifecycle, approvals, carry-over, reconnect, compaction
|
||||
│ ├── omnimessage/ # types.ts protocol types · builders.ts constructors · aggregate.ts partial aggregation
|
||||
│ ├── llm/ # generative-model.ts AgentHub adapter · tool-call-ids.ts id uniqueness
|
||||
│ ├── environment/ # environment.ts execution close-out · tools/ registry, 6 builtin tools, background sessions
|
||||
│ ├── environment/ # environment.ts execution close-out · tools/ registry, 9 builtin tools, background sessions
|
||||
│ ├── state/ # paths · default-config · project-config · model-catalog
|
||||
│ │ # agent-state (Skill install, prompt assembly) · agent-vault · builtin-agents
|
||||
│ ├── trace/ # writer.ts append-only JSONL · resume.ts replay-based recovery
|
||||
|
||||
@@ -81,7 +81,7 @@ packages/
|
||||
│ ├── engine/context-engine.ts # ReAct 循环编排:轮生命周期、审批、补发、重连、压缩
|
||||
│ ├── omnimessage/ # types.ts 协议类型 · builders.ts 构造函数 · aggregate.ts 分片聚合
|
||||
│ ├── llm/ # generative-model.ts AgentHub 适配 · tool-call-ids.ts id 唯一化
|
||||
│ ├── environment/ # environment.ts 执行与收尾 · tools/ 注册表、6 个内置工具、后台会话
|
||||
│ ├── environment/ # environment.ts 执行与收尾 · tools/ 注册表、9 个内置工具、后台会话
|
||||
│ ├── state/ # paths · default-config · project-config · model-catalog
|
||||
│ │ # agent-state(Skill 安装、提示词装配)· agent-vault · builtin-agents
|
||||
│ ├── trace/ # writer.ts 追加式 JSONL · resume.ts 回放恢复
|
||||
|
||||
@@ -101,7 +101,7 @@ Edit this file via the CLI (`penguin config model …`) or the Web Models page
|
||||
| `compaction.max_session_turns` | `-1` | Cumulative Session turn threshold (`-1` = unlimited) |
|
||||
| `compaction.mode` | `summarize` | `summarize` / `discard` |
|
||||
| `compaction.prompt` | built-in template | Prompt used for summarize compaction |
|
||||
| `tools.builtin` | full default toolset when omitted | Tool entries: `name` / `description` / `parameters` / `permission` (`r` or `rw`) / `forModel` / `timeoutMs` / `maxOutputLength`; once written it replaces the default list wholesale |
|
||||
| `tools.builtin` | full default toolset when omitted | Tool entries: `name` / `description` / `parameters` / `permission` (`r` or `rw`) / `forModel` / `timeoutMs` / `maxOutputLength` / `call_description` (per-tool toggle for the `description` call argument, required while on; missing = kept); once written it replaces the default list wholesale |
|
||||
| `tools.mcpServers` | `[]` | MCP Server configuration (`name` + `config`); reserved for the MCP adapter layer |
|
||||
|
||||
Tool permissions and approval semantics are covered in [Tools & Approval](/tools).
|
||||
|
||||
@@ -101,7 +101,7 @@ output = 0.857143
|
||||
| `compaction.max_session_turns` | `-1` | Session 累计轮数阈值(`-1` 不限制) |
|
||||
| `compaction.mode` | `summarize` | `summarize` / `discard` |
|
||||
| `compaction.prompt` | 内置模板 | summarize 压缩使用的 Prompt |
|
||||
| `tools.builtin` | 缺省时为完整默认工具集 | 工具条目:`name` / `description` / `parameters` / `permission`(`r` 或 `rw`)/ `forModel` / `timeoutMs` / `maxOutputLength`;一旦写出即整体替换默认列表 |
|
||||
| `tools.builtin` | 缺省时为完整默认工具集 | 工具条目:`name` / `description` / `parameters` / `permission`(`r` 或 `rw`)/ `forModel` / `timeoutMs` / `maxOutputLength` / `call_description`(条目级开关:控制 `description` 调用参数,开启时为必填,缺省保留);一旦写出即整体替换默认列表 |
|
||||
| `tools.mcpServers` | `[]` | MCP Server 配置(`name` + `config`),预留给 MCP 适配层 |
|
||||
|
||||
工具权限与审批语义见[工具与审批](/tools)。
|
||||
|
||||
@@ -32,7 +32,7 @@ One install gives you four layers that share a single data directory and a singl
|
||||
|
||||
These principles run through every component; the design pages keep coming back to them:
|
||||
|
||||
- **A minimal toolset**: the shell is the universal interface — file reads, writes and edits all go through `exec_command`. See [Tools & Approval](/tools).
|
||||
- **A minimal toolset**: dedicated file tools (`read_file` / `edit_file` / `write_file`) for precise reading and editing, with the shell (`exec_command`) as the general-purpose fallback for everything else. See [Tools & Approval](/tools).
|
||||
- **Agents are editable data**: prompts, Skills and config are editable files on disk, not hardcoded constants — what you can see, an Agent can improve. See the [Configuration Reference](/configuration).
|
||||
- **Everything observable**: every request, tool call and approval decision is appended to the [Trace](/sessions-and-traces); a Session restores fully from it.
|
||||
- **Errors converge into messages**: model and tool failures never throw — they become messages the model can react to. See [The Agent Loop](/agent-loop).
|
||||
|
||||
@@ -32,7 +32,7 @@ PenguinHarness 的能力围绕三个递进的概念展开——消息协议、SD
|
||||
|
||||
这些原则贯穿所有组件,后续每一页设计文档都会反复引用:
|
||||
|
||||
- **极简工具集**:shell 是通用接口,文件读写与命令执行统一经 `exec_command` 完成,见[工具与审批](/tools)。
|
||||
- **极简工具集**:专门的文件工具(`read_file` / `edit_file` / `write_file`)负责精确读写,shell(`exec_command`)作为通用兜底接口负责其余一切,见[工具与审批](/tools)。
|
||||
- **Agent 是可编辑的数据**:Prompt、Skill、配置都是磁盘上的可编辑文件,而非硬编码——你能看到的,Agent 就能改进,见[配置参考](/configuration)。
|
||||
- **全量可观测**:每一次请求、工具调用与审批决策都以追加方式写入 [Trace](/sessions-and-traces),Session 可从 Trace 完整恢复。
|
||||
- **错误收敛为消息**:模型与工具的错误不抛异常,而是变成模型可以继续处理的消息,见 [Agent 运行循环](/agent-loop)。
|
||||
|
||||
@@ -36,7 +36,7 @@ Parsing is tolerant: only `key: value` scalar lines inside the first `---` block
|
||||
|
||||
## Progressive loading
|
||||
|
||||
Skills follow an "index first, body on demand" design: the system prompt injects only each installed Skill's metadata (name + description) through the `{{SKILL_METADATA}}` placeholder, and instructs the model to read the matching `SKILL.md` in full via the shell before following it. There is no dedicated skill tool — reading the body is just one `exec_command` call (see [Tools & Approval](/tools)).
|
||||
Skills follow an "index first, body on demand" design: the system prompt injects only each installed Skill's metadata (name + description) through the `{{SKILL_METADATA}}` placeholder, and instructs the model to read the matching `SKILL.md` in full via the shell before following it. There is no dedicated skill tool — reading the body is just one `read_file` or shell call (see [Tools & Approval](/tools)).
|
||||
|
||||
Chat can also pin skills explicitly: the message then starts with a `<use_skills>` block listing the skill names.
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ updated: 2026-07-17
|
||||
|
||||
## 渐进式加载
|
||||
|
||||
Skill 采用「先索引、后正文」的设计:系统 Prompt 经 `{{SKILL_METADATA}}` 占位符只注入每个已安装 Skill 的元数据(name + description),并指示模型在任务匹配某个 Skill 时,先用 Shell 完整读取对应的 `SKILL.md`,再遵循执行。系统不设专门的 Skill 工具,读取正文就是一次 `exec_command` 调用(见 [工具与审批](/tools))。
|
||||
Skill 采用「先索引、后正文」的设计:系统 Prompt 经 `{{SKILL_METADATA}}` 占位符只注入每个已安装 Skill 的元数据(name + description),并指示模型在任务匹配某个 Skill 时,先用 Shell 完整读取对应的 `SKILL.md`,再遵循执行。系统不设专门的 Skill 工具,读取正文就是一次 `read_file` 或 Shell 调用(见 [工具与审批](/tools))。
|
||||
|
||||
对话中也可以显式指定 Skill:此时消息以 `<use_skills>` 块开头,列出要使用的 Skill 名。
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ description: The deliberately minimal built-in toolset, its execution contract w
|
||||
|
||||
## Design
|
||||
|
||||
PenguinHarness ships a deliberately minimal built-in toolset: the shell is the universal interface, and reading, writing and editing files all go through `exec_command` — there are no separate file tools. Fewer tools mean fewer schema tokens and fewer wrong calls.
|
||||
PenguinHarness ships a deliberately minimal built-in toolset: dedicated file tools (`read_file` / `edit_file` / `write_file`) cover precise reading and editing — line-numbered output and exact-string replacement beat quoting `sed` one-liners — while the shell (`exec_command`) remains the general-purpose fallback for everything else: running programs, searching, installing dependencies. Every tool that remains earns its schema tokens.
|
||||
|
||||
## Execution contract
|
||||
|
||||
@@ -58,20 +58,30 @@ Each tool is described by one `ToolDefinitionConfig`:
|
||||
| `forModel` | `"vision"` / `"text-only"`: selected by the Session model's class; omitted = available to all models |
|
||||
| `timeoutMs` | Per-call timeout (ms), default 120000; `<=0` disables |
|
||||
| `maxOutputLength` | Output length cap (characters); `<=0` disables |
|
||||
| `call_description` | Per-tool toggle for the `description` call argument declared in `parameters` (required while on); missing = kept, `false` filters it and its `required` entry out of the schema at assembly |
|
||||
|
||||
## Built-in tools
|
||||
|
||||
There are 6 built-in tools (assembled via `packages/core/src/environment/tools/registry.ts`):
|
||||
There are 9 built-in tools (assembled via `packages/core/src/environment/tools/registry.ts`):
|
||||
|
||||
| Tool | Permission | Timeout (ms) | Purpose |
|
||||
| --- | --- | --- | --- |
|
||||
| `exec_command` | rw | 120000 | Run a shell command in the Workspace via `bash -lc`, streaming stdout/stderr |
|
||||
| `input_command` | rw | 130000 | Drive a running command by `process_id`: write stdin, send Ctrl-C, poll output |
|
||||
| `read_file` | r | 30000 | Read a text file as a line-numbered (`cat -n`) window, paged by offset/limit |
|
||||
| `edit_file` | rw | 30000 | Exact-string replacement in an existing file, echoing a verification snippet |
|
||||
| `write_file` | rw | 30000 | Create or overwrite a whole file, creating parent directories as needed |
|
||||
| `run_subagent` | rw | 600000 | Delegate a self-contained subtask to a child Agent in the same Workspace |
|
||||
| `input_subagent` | rw | 600000 | Poll a background subagent, or send a follow-up prompt once it is idle |
|
||||
| `read_image` | r | 60000 | Read an image and return it as image content (vision models) |
|
||||
| `describe_image` | r | 90000 | Have the configured `vision_model` read the image and answer in text (text-only models) |
|
||||
|
||||
Note that an existing agent's persisted `tools.builtin` list is frozen as written (the settings UI edits rows but adds none): agents created before this toolset do not pick up the file tools automatically — hand-edit the agent's `system_config.yaml` and add the new entries (copy them from the default definitions in `packages/core/src/state/default-config.ts`) to adopt them.
|
||||
|
||||
### Call descriptions
|
||||
|
||||
The command/subagent tools (`exec_command`, `input_command`, `run_subagent`, `input_subagent`) take a `description` argument: one model-written sentence about what the call is doing, shown by the CLI and Web UI while the call runs. The argument is declared as a normal `description` property in each entry's `parameters` in `system_config.yaml` (tool schemas live entirely in the editable config), and it is **required** there — a tool that offers the argument always gets one, so the frontends can pick a call's display form from the schema instead of guessing while the arguments stream; the model is also asked to emit it first. The per-entry `call_description` field toggles the whole thing — missing = kept, `call_description: false` filters the property (and its `required` entry) out of the schema at assembly time (in-memory only, the YAML is never rewritten). The file tools don't take it — their `file_path` argument is self-describing.
|
||||
|
||||
### Command sessions
|
||||
|
||||
`exec_command` waits in the foreground first; if the command outruns `yield_time_ms` it moves to the background and the call returns the output so far plus a `process_id`, driven from then on by `input_command`:
|
||||
@@ -94,6 +104,7 @@ Both tools' arguments (explicit keys):
|
||||
cmd: string; // required: the shell command to run
|
||||
workdir?: string; // working directory; defaults to the Workspace root, relative paths resolve against it
|
||||
yield_time_ms?: number; // foreground wait; default 60000, minimum 250, capped below the tool timeout
|
||||
description: string; // required while call_description is on: one sentence shown to the user while the call runs, emitted first
|
||||
}
|
||||
|
||||
// input_command
|
||||
@@ -101,6 +112,40 @@ Both tools' arguments (explicit keys):
|
||||
process_id: string; // required: the command-session id returned by exec_command
|
||||
chars?: string; // characters for stdin; send "\u0003" alone to deliver Ctrl-C; empty = poll only
|
||||
yield_time_ms?: number; // wait; defaults 250 for writes, 5000 for empty polls
|
||||
description: string; // required while call_description is on
|
||||
}
|
||||
```
|
||||
|
||||
### File tools
|
||||
|
||||
`read_file` / `edit_file` / `write_file` run with the user's full permissions, same as the shell tool; relative paths resolve against the Workspace and absolute paths are allowed. They are non-streaming (a single final output) and never throw — failures come back as explanatory text with `stop_reason: failed`.
|
||||
|
||||
```ts
|
||||
// read_file — cat -n style output (line number, tab, content); overlong single lines are
|
||||
// truncated, and binary content (NUL bytes) is rejected with advice to use shell/image tools.
|
||||
{
|
||||
file_path: string; // required: absolute, or relative to the Workspace
|
||||
offset?: number; // 1-based line to start from; default 1
|
||||
limit?: number; // max lines returned; default 2000 — a trailing note points at the continuation
|
||||
}
|
||||
|
||||
// edit_file — the file must exist; old_string must occur exactly once (or set replace_all);
|
||||
// success echoes "Replaced N occurrence(s)" plus a git-style unified diff of the changed
|
||||
// regions (one hunk per site, nearby sites merged; replace_all storms are capped at a few
|
||||
// hunks plus an "…and N more replacements" note).
|
||||
{
|
||||
file_path: string; // required
|
||||
old_string: string; // required: exact text to replace, including whitespace/indentation
|
||||
new_string: string; // required: must differ from old_string
|
||||
replace_all?: boolean; // replace every occurrence; default false
|
||||
}
|
||||
|
||||
// write_file — creates parent directories as needed; reports "Created" vs "Overwrote" with
|
||||
// lines/bytes. An overwrite also shows a small unified diff against the previous content,
|
||||
// or a one-line +X/−Y summary when the change is large.
|
||||
{
|
||||
file_path: string; // required
|
||||
content: string; // required: full file content; an empty string creates an empty file
|
||||
}
|
||||
```
|
||||
|
||||
@@ -115,6 +160,7 @@ Both tools' arguments (explicit keys):
|
||||
agent_id?: string; // the child Agent; defaults to the current Agent
|
||||
model_id?: string; // the child Session's model; inherits the parent Session's model when omitted
|
||||
yield_time_ms?: number; // foreground wait; default 300000
|
||||
description: string; // required while call_description is on
|
||||
}
|
||||
|
||||
// input_subagent
|
||||
@@ -122,6 +168,7 @@ Both tools' arguments (explicit keys):
|
||||
subagent_id: string; // required: the background Subagent id returned by run_subagent
|
||||
prompt?: string; // follow-up task, accepted only while the child Session is idle; empty = poll only
|
||||
yield_time_ms?: number; // wait; defaults 300000 with a prompt, 10000 for empty polls
|
||||
description: string; // required while call_description is on
|
||||
}
|
||||
```
|
||||
|
||||
@@ -182,6 +229,9 @@ tools:
|
||||
- name: exec_command
|
||||
description: Run a shell command in the workspace.
|
||||
permission: rw
|
||||
# Optional per-tool toggle: false filters the `description` call argument
|
||||
# (declared in parameters.properties) out of the schema (missing = kept).
|
||||
call_description: false
|
||||
timeoutMs: 120000
|
||||
maxOutputLength: 16000
|
||||
# parameters: the complete JSON Schema is required (see the default definition
|
||||
|
||||
@@ -5,7 +5,7 @@ description: 极简内置工具集的设计与执行契约、Environment 统一
|
||||
|
||||
## 设计取向
|
||||
|
||||
PenguinHarness 刻意维持一个极小的内置工具集:Shell 是通用接口,文件的读取、写入、编辑全部经由 `exec_command` 完成,不设专门的文件工具。工具越少,注入的 schema 越少,Token 开销越小,模型误调用的概率也越低。
|
||||
PenguinHarness 刻意维持一个极小的内置工具集:文件的精确读取与编辑交给专门的文件工具(`read_file` / `edit_file` / `write_file`)——带行号的输出与精确字符串替换比拼 `sed` 命令更可靠;Shell(`exec_command`)仍是通用兜底接口,负责运行程序、搜索、装依赖等其余一切。保留下来的每个工具都对得起它占用的 schema Token。
|
||||
|
||||
## 执行契约
|
||||
|
||||
@@ -58,20 +58,30 @@ interface ToolResult {
|
||||
| `forModel` | `"vision"` / `"text-only"`:按 Session 模型类别装配;缺省对所有模型可用 |
|
||||
| `timeoutMs` | 单次调用超时(ms),默认 120000;`<=0` 关闭 |
|
||||
| `maxOutputLength` | 输出长度上限(字符);`<=0` 关闭 |
|
||||
| `call_description` | 条目级开关:控制 `parameters` 中声明的 `description` 调用参数(开启时为必填);缺省保留,`false` 时装配阶段将其连同 `required` 项从 schema 滤除 |
|
||||
|
||||
## 内置工具
|
||||
|
||||
共 6 个内置工具(装配入口 `packages/core/src/environment/tools/registry.ts`):
|
||||
共 9 个内置工具(装配入口 `packages/core/src/environment/tools/registry.ts`):
|
||||
|
||||
| 工具 | 权限 | 超时(ms) | 用途 |
|
||||
| --- | --- | --- | --- |
|
||||
| `exec_command` | rw | 120000 | 在 Workspace 内以 `bash -lc` 运行命令,流式返回 stdout/stderr |
|
||||
| `input_command` | rw | 130000 | 按 `process_id` 驱动运行中的命令:写 stdin、发 Ctrl-C、轮询输出 |
|
||||
| `read_file` | r | 30000 | 按 `cat -n` 风格带行号读取文本文件,以 offset/limit 分页 |
|
||||
| `edit_file` | rw | 30000 | 对既有文件做精确字符串替换,回显校验片段 |
|
||||
| `write_file` | rw | 30000 | 新建或整体覆写文件,按需创建父目录 |
|
||||
| `run_subagent` | rw | 600000 | 把自包含子任务委派给同 Workspace 的子 Agent |
|
||||
| `input_subagent` | rw | 600000 | 轮询后台 Subagent,或在其空闲时追加后续 Prompt |
|
||||
| `read_image` | r | 60000 | 读取图片并作为图像内容返回(vision 模型) |
|
||||
| `describe_image` | r | 90000 | 由 `vision_model` 代读图片并返回文字回答(text-only 模型) |
|
||||
|
||||
注意:既有 Agent 已落盘的 `tools.builtin` 列表按原样冻结(设置页只能编辑行、不能增行):本工具集之前创建的 Agent 不会自动获得文件工具——需手工编辑该 Agent 的 `system_config.yaml`,把新条目补进去(可从 `packages/core/src/state/default-config.ts` 的默认定义复制)。
|
||||
|
||||
### 调用描述
|
||||
|
||||
命令 / Subagent 类工具(`exec_command`、`input_command`、`run_subagent`、`input_subagent`)带 `description` 参数:由模型写一句"本次调用在做什么",CLI 与 Web 在调用运行期间展示给用户。该参数作为普通的 `description` 属性直接写在各条目的 `parameters` 中(工具 schema 完全存于可编辑配置),并且是**必填**的——提供该参数的工具每次调用都会带上它,前端据 schema 即可确定这次调用的展示形态,无需在参数流式过程中猜测;同时要求模型最先输出它。整个参数由条目级 `call_description` 字段控制——缺省保留,写 `call_description: false` 时装配阶段将该属性连同其 `required` 项一起从 schema 中滤除(仅内存内,不改写 YAML)。文件工具不带此参数——其 `file_path` 参数本身已说明用途。
|
||||
|
||||
### 命令会话
|
||||
|
||||
`exec_command` 先在前台等待;命令超过 `yield_time_ms` 仍未结束时转入后台,返回已有输出和一个 `process_id`,之后用 `input_command` 驱动:
|
||||
@@ -93,6 +103,7 @@ exec_command(cmd)
|
||||
cmd: string; // 必填:要执行的 shell 命令
|
||||
workdir?: string; // 工作目录;缺省为 Workspace 根,相对路径按其解析
|
||||
yield_time_ms?: number; // 前台等待时长;默认 60000,最小 250,上限受工具超时约束
|
||||
description: string; // 开关开启时必填:一句话说明,最先输出,调用运行期间展示给用户
|
||||
}
|
||||
|
||||
// input_command
|
||||
@@ -100,6 +111,39 @@ exec_command(cmd)
|
||||
process_id: string; // 必填:exec_command 返回的命令会话 id
|
||||
chars?: string; // 写入 stdin 的字符;单独发送 "\u0003" 传递 Ctrl-C;缺省仅轮询
|
||||
yield_time_ms?: number; // 等待时长;有写入默认 250,空轮询默认 5000
|
||||
description: string; // 开关开启时必填
|
||||
}
|
||||
```
|
||||
|
||||
### 文件工具
|
||||
|
||||
`read_file` / `edit_file` / `write_file` 与 Shell 工具一样以用户完整权限运行:相对路径按 Workspace 解析,也接受绝对路径。三者均为非流式(一次性输出最终结果),从不抛异常——失败以解释性文本收尾,`stop_reason` 为 `failed`。
|
||||
|
||||
```ts
|
||||
// read_file — cat -n 风格输出(行号、制表符、内容);超长单行会被截断,
|
||||
// 含 NUL 字节的二进制内容被拒绝并提示改用 Shell / 图像工具。
|
||||
{
|
||||
file_path: string; // 必填:绝对路径,或相对 Workspace 的路径
|
||||
offset?: number; // 起始行号(1 起);默认 1
|
||||
limit?: number; // 最多返回的行数;默认 2000——未读完时尾部注记提示续读
|
||||
}
|
||||
|
||||
// edit_file — 文件必须已存在;old_string 必须恰好出现一次(或设 replace_all);
|
||||
// 成功时回显 "Replaced N occurrence(s)" 及改动区域的 git 风格 unified diff
|
||||
// (每个替换点一个 hunk,相邻替换点合并;replace_all 大量命中时截断为少量 hunk
|
||||
// 并附 "…and N more replacements" 注记)。
|
||||
{
|
||||
file_path: string; // 必填
|
||||
old_string: string; // 必填:要替换的原文,须与文件内容(含空白/缩进)完全一致
|
||||
new_string: string; // 必填:替换文本,须与 old_string 不同
|
||||
replace_all?: boolean; // 替换全部出现处;默认 false
|
||||
}
|
||||
|
||||
// write_file — 按需创建父目录;报告 "Created" 或 "Overwrote" 及行数/字节数。
|
||||
// 覆写时还会附上与旧内容的小型 unified diff;改动过大时改为一行 +X/−Y 摘要。
|
||||
{
|
||||
file_path: string; // 必填
|
||||
content: string; // 必填:完整文件内容;空字符串创建空文件
|
||||
}
|
||||
```
|
||||
|
||||
@@ -114,6 +158,7 @@ exec_command(cmd)
|
||||
agent_id?: string; // 子 Agent;缺省复用当前 Agent
|
||||
model_id?: string; // 子 Session 模型;缺省继承父 Session 的模型
|
||||
yield_time_ms?: number; // 前台等待时长;默认 300000
|
||||
description: string; // 开关开启时必填
|
||||
}
|
||||
|
||||
// input_subagent
|
||||
@@ -121,6 +166,7 @@ exec_command(cmd)
|
||||
subagent_id: string; // 必填:run_subagent 返回的后台 Subagent id
|
||||
prompt?: string; // 追加任务,仅在子 Session 空闲时接受;缺省仅轮询
|
||||
yield_time_ms?: number; // 等待时长;有追加默认 300000,空轮询默认 10000
|
||||
description: string; // 开关开启时必填
|
||||
}
|
||||
```
|
||||
|
||||
@@ -180,6 +226,9 @@ tools:
|
||||
- name: exec_command
|
||||
description: Run a shell command in the workspace.
|
||||
permission: rw
|
||||
# 可选的条目级开关:false 时从 schema 滤除 parameters.properties 里声明的
|
||||
# description 调用参数(缺省保留)。
|
||||
call_description: false
|
||||
timeoutMs: 120000
|
||||
maxOutputLength: 16000
|
||||
# parameters: 必须携带完整 JSON Schema(默认定义见
|
||||
|
||||
@@ -64,7 +64,7 @@ The list page creates and deletes Agents; clicking through opens the `/agents/:a
|
||||
| Overview | Basic info, export / import of Agent State snapshots, and restoring the default configuration (overwrites customizations, keeping only name/description) |
|
||||
| Prompt | AGENTS.md and system_prompt |
|
||||
| Runtime | Runtime parameters such as max_turns, model.*, compaction.* |
|
||||
| Tools | Built-in tool table and MCP server JSON configuration |
|
||||
| Tools | Built-in tool table (incl. per-tool call_description switches) and MCP server JSON configuration |
|
||||
| Vault | Environment-variable entries with masked values |
|
||||
| Schedule | Scheduled tasks (TOML-defined): create, edit, toggle, delete |
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ penguin web
|
||||
| Overview | 基本信息、Agent State 快照的导出 / 导入,以及还原为默认配置(覆盖自定义内容,仅保留名称与描述) |
|
||||
| Prompt | AGENTS.md 与 system_prompt |
|
||||
| Runtime | max_turns、model.*、compaction.* 等运行参数 |
|
||||
| Tools | 内置工具表格与 MCP Server 的 JSON 配置 |
|
||||
| Tools | 内置工具表格(含条目级 call_description 开关)与 MCP Server 的 JSON 配置 |
|
||||
| Vault | 环境变量条目,值以掩码显示 |
|
||||
| Schedule | 定时任务(TOML 定义):创建、编辑、启停、删除 |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user