{
  "topic": "plugin-v2-host-runtime",
  "reviewMethod": "Static source and contract review at pinned commits; no product runtime tests or production inspection. Latest review: 2026-10-29 GitHub default-branch pinned snapshot; cited-file blob comparison and changed-range semantic review, not deployment verification.",
  "claims": [
    {
      "statement": "Host 从允许、支持且非调试的 Bundle 生成投影，执行回执经过 PluginCallJournal。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/plugin-host/plugin-host.ts",
          "line": 934,
          "endLine": 964,
          "symbol": "listProjections"
        }
      ]
    },
    {
      "statement": "协议、Worker MCP、Host 能力代理和包身份遵循同一 V2 合同。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-plugins",
          "commit": "a33ce3733365db48413a4b97a0f4f65066856175",
          "path": "docs/plugin-v2-contract.md",
          "line": 1,
          "endLine": 121
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/plugin-host/plugin-host.ts",
          "line": 96,
          "endLine": 127,
          "symbol": "export class PluginHost"
        }
      ]
    },
    {
      "statement": "可信 Worker 是普通用户进程，能力代理不是恶意代码的 OS 沙箱。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/plugin-host/plugin-host.ts",
          "line": 96,
          "endLine": 127,
          "symbol": "export class PluginHost"
        }
      ]
    },
    {
      "statement": "SDK 取消/超时迟到回执：Host 已取消或超时后，handler 返回带 executionState 的失败 ToolResult 仍作为该调用回执送达（保留部分结果与已提交 artifact，_meta.aida.executionState 透传）；其他迟到返回仍为取消/超时错误。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-plugins",
          "commit": "a33ce3733365db48413a4b97a0f4f65066856175",
          "path": "packages/sdk-js/src/server.mjs",
          "line": 177,
          "endLine": 217,
          "symbol": "executionState"
        },
        {
          "repo": "aida-plugins",
          "commit": "a33ce3733365db48413a4b97a0f4f65066856175",
          "path": "docs/plugin-v2-contract.md",
          "line": 123,
          "endLine": 123,
          "symbol": "executionState"
        }
      ]
    },
    {
      "statement": "Desktop Plugin runtime 对 conditionalArtifactOutput 独立校验：声明、Worker 返回 ArtifactRefs 与 Main lease 的 committedArtifacts 必须完整对应；produced 的 IDs 无重复且精确覆盖，非 produced 为零产物。派发后非 read effect 无法确认 completed 时可返回 unknown，校验失败不等于无副作用。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/plugin-host/plugin-runtime.ts",
          "line": 299,
          "endLine": 339,
          "symbol": "assertConditionalArtifactResult"
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/plugin-host/plugin-call-lease.ts",
          "line": 13,
          "endLine": 16,
          "symbol": "committedArtifacts"
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/shared/generated/plugin-v2/semantics.mjs",
          "line": 168,
          "endLine": 217,
          "symbol": "assertConditionalArtifactResult"
        }
      ],
      "limit": "静态代码核验；未执行 Plugin/native/Electron 验收。"
    },
    {
      "statement": "PluginCallJournal.settle 在 !dispatched 分支落盘失败时显式抛出 PLUGIN_CALL_JOURNAL_UNAVAILABLE（不返回未持久化 failed 回执）；assertPluginPythonPathBudget 在 Windows 下预检 MAX_PATH 260 预算并以 PluginPreparationError 早失败；plugin-connection-target.ts 收口连接 URL 规范化并在已配置连接时复用已批准 HTTP origin。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/plugin-host/plugin-call-journal.ts",
          "line": 580,
          "endLine": 626,
          "symbol": "PLUGIN_CALL_JOURNAL_UNAVAILABLE"
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/plugin-host/plugin-python-path-budget.ts",
          "line": 10,
          "endLine": 35,
          "symbol": "assertPluginPythonPathBudget"
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/plugin-host/plugin-connection-target.ts",
          "line": 72,
          "endLine": 115,
          "symbol": "canonicalBaseUrl"
        }
      ]
    }
  ]
}
