




















@@ -1,83 +1,77 @@
1-export const EXEC_TOOL_DISPLAY_SUMMARY = "Run shell commands that start now.";
2-export const PROCESS_TOOL_DISPLAY_SUMMARY = "Inspect and control running exec sessions.";
3-export const CRON_TOOL_DISPLAY_SUMMARY = "Schedule cron jobs, reminders, and wake events.";
4-export const SESSIONS_LIST_TOOL_DISPLAY_SUMMARY =
5-"List visible sessions with mailbox filters and optional previews.";
6-export const SESSIONS_HISTORY_TOOL_DISPLAY_SUMMARY =
7-"Read sanitized message history for a visible session.";
8-export const SESSIONS_SEND_TOOL_DISPLAY_SUMMARY =
9-"Send a message to another visible session or configured agent.";
10-export const SESSIONS_SPAWN_TOOL_DISPLAY_SUMMARY = "Spawn sub-agent or ACP sessions.";
11-export const SESSIONS_SPAWN_SUBAGENT_TOOL_DISPLAY_SUMMARY = "Spawn sub-agent sessions.";
12-export const SESSION_STATUS_TOOL_DISPLAY_SUMMARY = "Show session status, usage, and model state.";
13-export const UPDATE_PLAN_TOOL_DISPLAY_SUMMARY = "Track a short structured work plan.";
1+export const EXEC_TOOL_DISPLAY_SUMMARY = "Run shell now.";
2+export const PROCESS_TOOL_DISPLAY_SUMMARY = "Inspect/control exec sessions.";
3+export const CRON_TOOL_DISPLAY_SUMMARY = "Schedule reminders, cron, wake events.";
4+export const SESSIONS_LIST_TOOL_DISPLAY_SUMMARY = "List visible sessions; filters/previews.";
5+export const SESSIONS_HISTORY_TOOL_DISPLAY_SUMMARY = "Read sanitized session history.";
6+export const SESSIONS_SEND_TOOL_DISPLAY_SUMMARY = "Message session or configured agent.";
7+export const SESSIONS_SPAWN_TOOL_DISPLAY_SUMMARY = "Spawn subagent or ACP session.";
8+export const SESSIONS_SPAWN_SUBAGENT_TOOL_DISPLAY_SUMMARY = "Spawn subagent session.";
9+export const SESSION_STATUS_TOOL_DISPLAY_SUMMARY = "Show session status/model/usage.";
10+export const UPDATE_PLAN_TOOL_DISPLAY_SUMMARY = "Track short work plan.";
14111512export function describeSessionsListTool(): string {
1613return [
17-"List visible sessions with optional filters for kind, label, agentId, search, recent activity, derived titles, and last-message previews.",
18-"Use this to discover a target session before calling sessions_history or sessions_send.",
14+"List visible sessions; filter by kind, label, agentId, search, activity.",
15+"Use before sessions_history or sessions_send target selection.",
1916].join(" ");
2017}
21182219export function describeSessionsHistoryTool(): string {
2320return [
24-"Fetch sanitized message history for a visible session.",
25-"Supports limits and optional tool messages; use this to inspect another session before replying, debugging, or resuming work.",
21+"Fetch sanitized history for visible session.",
22+"Use before replying, debugging, resuming; supports limits/tool messages.",
2623].join(" ");
2724}
28252926export function describeSessionsSendTool(): string {
3027return [
31-"Send a message into another visible session by sessionKey or label, or to a configured agent by agentId.",
32-"Thread-scoped chat sessions are rejected; target the parent channel session for inter-agent coordination.",
33-"Missing configured agent main sessions are created before send; waits for the target run and returns the updated assistant reply when available.",
28+"Send message to visible session by sessionKey/label, or configured agent by agentId.",
29+"Thread-scoped chats rejected; target parent channel session.",
30+"Creates missing configured-agent main session; waits for reply when available.",
3431].join(" ");
3532}
36333734export function describeSessionsSpawnTool(options?: {
3835acpAvailable?: boolean;
3936threadAvailable?: boolean;
4037}): string {
38+const runtimeDescription =
39+options?.acpAvailable === false
40+ ? 'Spawn clean child session; default `runtime="subagent"`.'
41+ : 'Spawn clean child session; default `runtime="subagent"`; set `runtime="acp"` explicitly for ACP.';
4142const baseDescription = [
42-'Spawn a clean isolated session by default with `runtime="subagent"` or `runtime="acp"`.',
43+runtimeDescription,
4344options?.threadAvailable
44- ? '`mode="run"` is one-shot and `mode="session"` is persistent and thread-bound.'
45- : '`mode="run"` is one-shot background work.',
46-"Subagents inherit the parent workspace directory automatically.",
47-"Native subagents receive the delegated task in their first visible `[Subagent Task]` message.",
48-'For native subagents only, set `context="fork"` when the child needs the current transcript context; otherwise omit it or use `context="isolated"`.',
49-"Use this when the work should happen in a fresh child session instead of the current one.",
45+ ? '`mode="run"` one-shot; `mode="session"` persistent/thread-bound.'
46+ : '`mode="run"` one-shot background work.',
47+"Subagents inherit parent workspace.",
48+"Native subagents get task in first visible `[Subagent Task]` message.",
49+'Native only: `context="fork"` only when child needs current transcript; else omit or `isolated`.',
50+"Use for fresh child-session work.",
5051];
5152if (options?.acpAvailable === false) {
52-return baseDescription
53-.map((line) =>
54-line.replace(
55-' with `runtime="subagent"` or `runtime="acp"`',
56-" with the native subagent runtime",
57-),
58-)
59-.join(" ");
53+return baseDescription.join(" ");
6054}
6155return [
6256 ...baseDescription.slice(0, 3),
63-'`runtime="acp"` is for external ACP harness ids such as codex, claude, gemini, or opencode, or agents configured with `agents.list[].runtime.type="acp"`.',
57+'`runtime="acp"` for ACP harness ids: codex, claude, gemini, opencode, or agent ACP runtime config.',
6458 ...baseDescription.slice(3),
6559].join(" ");
6660}
67616862export function describeSessionStatusTool(): string {
6963return [
70-"Show a /status-equivalent session status card for the current or another visible session, including usage, time, cost when available, and linked background task context.",
71-'Use `sessionKey="current"` for the current session; do not use UI/client labels such as `openclaw-tui` as session keys.',
72-"Optional `model` sets a per-session model override; `model=default` resets overrides.",
73-"Use this for questions like what model is active or how a session is configured.",
64+"Show /status-like card for current/visible session: model, usage, time, cost, tasks.",
65+'Use `sessionKey="current"` for current session; UI labels like `openclaw-tui` are not keys.',
66+"`model` sets session override; `model=default` resets.",
67+"Use for active model/session config questions.",
7468].join(" ");
7569}
76707771export function describeUpdatePlanTool(): string {
7872return [
79-"Update the current structured work plan for this run.",
80-"Use this for non-trivial multi-step work so the plan stays current while execution continues.",
81-"Keep steps short, mark at most one step as `in_progress`, and skip this tool for simple one-step tasks.",
73+"Update current run plan.",
74+"Use for non-trivial multi-step work; keep plan current while executing.",
75+"Short steps; max one `in_progress`; skip for simple one-step work.",
8276].join(" ");
8377}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。