Capability 与 Plugin
tip 2026-09-22:官方货架为 attendance-tally / salary-smartcalc / aida-cli;独立
plugins/caidao已移除。PluginHost 仍在 Desktop Main。普通 Skill 受理与业务任务受理已拆分。
路由与插件
插件如何成为本轮工具
插件协议与不可变包来自 Plugins 仓;Desktop Host 发现可用包并产生投影。Agent 将投影转换为 RawToolDef,让本轮编排知道有哪些工具以及如何委派。当前官方源包含考勤核算(attendance-tally)、薪资智算(salary-smartcalc)与 aida-cli(独立 plugins/caidao 目录已退役);任务内显式选用指令由 resolveExplicitPluginTask 解析,失败时不得静默退回内置能力。
Capability 路由回答本轮选择什么能力,执行宿主分派回答工具在哪里执行。PluginHost 位于 Desktop,不能因为 Agent 持有工具投影就把 Worker 移进服务端 Runtime 边界。
Plugin V2 能力广告 vs Local File capability
两条栈 并行叠放、不合并语义:
- Local File:
LocalFileV4Coordinator.handshakeFields()只产出localFileCapability(assembleLocalFileV4Capability)与desktopExecutorInstanceId;enterprise-adapter.attachLocalFileV4Capabilities写入localExecutor.capabilities。Desktop 协议 v3(钉点 Desktop8eecd12081db)起不再广告localFileProtocolVersions或local-files-v5capability 字符串,Agent 也不再谈判版本:有合法localFileCapability就准入 V4(localFileV4Admitted)。 - Plugin V2:
PluginHost+PluginCapabilities管 manifestcapabilities(如file-input/artifact-output/plugin-data)、Host API 租约与文件 grant。聊天体上的pluginTools由preparePluginTools另字段挂上,与localExecutor/localFilesV4/assembleSubmittedLocalFileAttachments并列(enterprise-adapter组装 chat input)。 - 借用底座 ≠ 合并广告:
PluginCapabilities.grantFile复用LocalFileV4Host.registerSelectedFile做权威句柄,但这是执行期委托;不会把 Local File 的localFileCapability与插件 manifest capabilities 合成同一广告对象(插件侧文件授权类型现名PluginFileGrant)。
钉点:Desktop 8eecd12081dbb5c725c1be3754dfaae7b845aa31;Plugins a33ce3733365836eefc25ab2dbf55a71d4164f61;Agent e2adc9a3c325a258a88d68103de87e6630a3b676。
相关:agent-config-pipeline(agents 配置如何接到本主题能力面)。
aida-cli 与 SDK(钉点 Plugins a33ce3733365)
aida-cli 插件 0.3.13(0.3.8 起的合同不变),pinned CLI 为 npm 正式发布 aida-cli@0.1.1(vendor/aida-cli-release.json 为 aida-cli-npm-release,记录 integrity/sha256 与上游源码提交),不再使用本地构建的 phase1.1 tgz。快照产物遵守 Host effect 合同:effect: read 的 cli_execute_read 不再接受 resultArtifact;批量只读 cli_execute_read_batch 声明为 local-write(内部仍只允许只读命令),查询结果经 writeSnapshotArtifact 落为 JSON Artifact,模型只看摘要。Python SDK aida-plugin 为 2.3.0(attendance-tally 已依赖);packages/sdk-js 仍为 2.0.0。0.3.10 起 provider 不再把对象/数组参数 JSON.stringify 成字符串,结构化值原样交给 aida-cli Host 命令,数组与对象请求体保持原结构(JSON 文件仍须用 {fileRef})。
aida-plugins 仓职责
- 提供:插件协议、SDK(Python
aida-plugin、packages/sdk-js)与不可变插件包;官方货架为 attendance-tally / salary-smartcalc / aida-cli。 - 不持有:服务端任务状态。包由 Desktop Main 的 PluginHost 加载并投影成工具;调用账本 PluginCallJournal 在 Desktop,回执由 Agent
parseBoundPluginReply校验。详见vertical-plugin-mount。
证据与范围
-
aida-plugins·docs/plugin-v2-contract.mdL1–44 ·a33ce3733365 -
aida-plugins·plugins/aida-cli/runtime/provider.mjsL98–113 ·options[key] = value·a33ce3733365 -
aida-plugins·plugins/aida-cli/plugin.jsonL6 ·0.3.13·a33ce3733365 -
aida-desktop·apps/desktop/electron/plugin-host/plugin-host.tsL659–689 ·listProjections·4346d79eb364 -
aida-agent·packages/agent/src/gateway/delegated-desktop-capabilities.tsL57–87 ·buildPluginToolRuntime·e2adc9a3c325 -
aida-agent·packages/agent/src/gateway/orchestrator-runtime.ts·prepareExecution·e2adc9a3c325 -
aida-agent·packages/agent/src/execution-host/router.tsL50–80 ·ExecutionHostRouter·e2adc9a3c325 -
aida-desktop·apps/desktop/electron/plugin-host/plugin-host.tsL1–59 ·4346d79eb364 -
aida-plugins·README.mdL11–51 ·salary-smartcalc·a33ce3733365 -
aida-plugins·plugins/aida-cli/plugin.jsonL1–23 ·aida.caidao·a33ce3733365 -
aida-agent·packages/agent/src/runtime/local/plugin-task.tsL17–47 ·resolveExplicitPluginTask·e2adc9a3c325 -
aida-desktop·apps/desktop/electron/plugin-host/plugin-host.tsL195–199 ·PluginHost·4346d79eb364 -
aida-desktop·apps/desktop/electron/plugin-host/plugin-capabilities.tsL26–56 ·PluginCapabilities·4346d79eb364 -
aida-desktop·apps/desktop/electron/local-files-v4/coordinator.tsL99–122 ·handshakeFields·4346d79eb364 -
aida-desktop·apps/desktop/electron/agent-loop/enterprise-adapter.tsL48–85 ·attachLocalFileV4Capabilities·4346d79eb364 -
aida-desktop·apps/desktop/electron/agent-loop/enterprise-adapter.tsL92–95 ·pluginTools·4346d79eb364
结论来自固定版本的静态源码与合同阅读;实现存在、默认开关和生产启用分别判断。本站代码证据面板列出声明状态与具体限制。
aida-plugins·plugins/aida-cli/runtime/provider.mjsL148–149 ·CLI_RESULT_ARTIFACT_INVALID·a33ce3733365aida-plugins·plugins/aida-cli/tools.jsonL211–214 ·local-write·a33ce3733365aida-plugins·python/aida_plugin/pyproject.tomlL7–7 ·2.3.0·a33ce3733365
Computer Use 与通用邮箱插件(钉点 d220086aa495)
aida.computer-use:协议computer-observe/computer-control与computer.*工具;八种窗口操作;空文本协议层拒绝;targets 仅darwin-arm64/darwin-x64/win32-x64(不含 linux-x64)。见视图computer-use。aida.mail(取代旧aida.mail-archive):保留mail_status、list_folders、search_messages,新增read_message(POST /:connectionId/message限长纯文本正文与附件清单)与save_attachment(POST /:connectionId/attachment下载经createArtifact/commitArtifact提交为任务 Artifact);删除目录归档批任务(协议移除directory-output/directory-batch/manual-batch能力)、自带 UI 与授权/断开工具,账号绑定交由 Desktop 内置aida-session邮箱连接;不发信/移动/删除/自动同步。- 证据:
aida-plugins·plugins/computer-use/plugin.jsonL3 ·aida.computer-use·a33ce3733365;aida-plugins·plugins/mail/plugin.jsonL1–23 ·aida.mail·a33ce3733365;aida-plugins·plugins/mail/runtime/provider.mjsL126–159 ·saveAttachment·a33ce3733365;aida-plugins·packages/protocol/schema/protocol.schema.json(computer-observe)·d220086aa495
Agent 与 Local Workbench 最新增量(2026-11-03)
-
条件产物(2026-10-29):普通已选 Skill 的条件产物候选来自原 Skill 与 Plugin 工具声明交集;模型只能提议候选和引用用户原话,受理时冻结完整 producer、scope、attachmentId/selectedFileId 及独立原文件读取要求。旧 Work 不据新模型解释回填此目标;此合同不扩大插件或文件授权。
-
本地工作台 Plugin 调用身份合同(STA-221):
plugin-local-execution.ts定义enterprise_agent与local_workbench双 owner 合同及executionDigest;DesktopcreateLocalPluginProvider将不可变 Bundle 工具与原生视图接入 Local Workbench。 -
精确成功读取后消费待执行步骤与受限只读旁问:
plugin-next-action.ts沿用冻结插件定义校验实际参数与回执身份,仅在精确成功读取后消费continuation/nextAction义务(缺参或写操作不释放义务);bindPluginSideQuery在原插件任务awaiting_user待审阅时允许绑定原 Work 封存身份的受限只读咨询,不丢失原审阅卡与只读详情义务。 -
aida-agent·packages/agent/src/routing/conditional-artifact-contract.tsL111–173 ·7f2e519936b5 -
aida-agent·packages/tool-client/src/types/plugin-local-execution.tsL1–76 ·pluginLocalExecutionDigest·7f2e519936b5 -
aida-agent·packages/agent/src/orchestrator/plugin-next-action.tsL15–55 ·PendingPluginToolCall·7f2e519936b5 -
aida-agent·packages/agent/src/gateway/plugin-side-query.tsL24–55 ·bindPluginSideQuery·7f2e519936b5