You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
PTC 模式:希望为工具 SDK 提供精简模式(输出类型 / 描述可降级)
背景
0.2.1-rc.4;agent preset 默认ptc。ToolArgsMap/ToolOutputMap)获取参数名、必填、类型、描述与返回类型。工具少时这个设计很顺。实测数据(单实例,时点快照)
ToolArgsMapToolOutputMap单工具示例(参数块字符数):
task_board_create4,060、task_board_list3,385、comfyui_run2,559、agent_teams_create_task2,449、de_prompts2,333。这些大多是低频工具;近两周里task_board_create9 次、task_board_list20 次、agent_teams多数为 0 次。关闭两个插件后(
ego-browser35 个工具、web-ui-ssh6 个工具),系统段从 52.3K 降到约 42.7K,进一步说明工具面是主要变量。希望的能力(均为 opt-in,不改默认行为)
ptc.sdk.outputTypes: "full" | "summary" | "none"(默认full)summary:保留顶层字段名/类型,嵌套结构折叠为Record<string, JsonValue>或注释;none:输出JsonValue/unknown,并在 SDK 里注明“返回结构以实际结果为准”。ptc.sdk.docs: "full" | "compact"(默认full)compact保留首句 + 枚举/格式/大小限制/默认值,去掉叙述、示例与重复协议说明。ptc.sdk.maxChars预算——超出时优先压缩零调用工具。取舍说明
typed tool returns是有意设计(仓库.agents/notes/implemented/feature/2026-07-20-ptc-typed-tool-returns.md),所以不建议默认删输出类型;建议 opt-in,summary档保留顶层类型,尽量减少“模型猜返回结构”。docs: compact也有收益(本实例参数块 147K 字符,压缩 20–30% 约 3–5K token)。环境与统计方法
0.2.1-rc.4(app.asar 内@deepseek-ai/dsh-tools),macOS。request/header的 system 段,按字符数 / 4 估算 token(非精确 tokenizer,仅用于量级比较)。0.2.2未做代码级比对(本机网络访问 npm/GitHub 受阻),上述数据均来自0.2.1-rc.4。附:工具族分布(参数块字符数,不含 ego)
All reactions