{
  "topic": "desktop-runtime",
  "reviewMethod": "Static source and contract review at pinned commits after Local File wire v5 / path-free refresh; 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": "Desktop session 与 Server session 明确配对，不能互换授权。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "GLOSSARY.md",
          "line": 1361,
          "endLine": 1367,
          "symbol": "Dual session identity"
        }
      ]
    },
    {
      "statement": "PluginHost 在 Main 内管理投影和回执；普通文件操作属 Local File V4 架构族（Protocol v3 下不再有独立的 Local File wire 版本号）：账本在 Agent，本机执行与附件组装在 Main。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/plugin-host/plugin-host.ts",
          "line": 934,
          "endLine": 964,
          "symbol": "listProjections"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/shared/interaction-kernel-state.ts",
          "line": 11,
          "endLine": 41,
          "symbol": "INTERACTION_STATUSES"
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/local-files-v4/capability.ts",
          "line": 12,
          "endLine": 19,
          "symbol": "assembleLocalFileV4Capability"
        }
      ]
    },
    {
      "statement": "Main 不再有独立的文本 V2 启动/观察路径（register-runtime-v2-ipc 已删除）；提交与观察统一为 RuntimeWorkIpcCoordinator 一条 Work 路径。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/agent-loop/register-runtime-work-ipc.ts",
          "line": 485,
          "endLine": 510,
          "symbol": "submitSubmission"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/work/run-work-admission.ts",
          "line": 30,
          "endLine": 71,
          "symbol": "bindAdmittedWork"
        }
      ]
    },
    {
      "statement": "Gateway 426 硬门族：chat POST 头 X-AIDA-Protocol 有值且不等于 3，或没带头却携带本机执行载荷，返回 DESKTOP_UPGRADE_REQUIRED（旧 desktop_protocol_version_required 已删；ADR-0093 起无头且无本机载荷的请求不再 426）；chat POST 的 Runtime 提交门接受缺省/空值（无 policy）、runtime-work-v1（无 policy），以及 runtime-work-skill-v2 且携带合法 skillExecutionPolicy；其他非空头为 RUNTIME_EXECUTION_PROTOCOL_UNSUPPORTED，头与 policy 不匹配为 RUNTIME_WORK_SKILL_POLICY_MISMATCH，均返回 426。原 Work binding 仍是 runtime-work-v1；取消提交、补充材料等路由单独判定，见协议地图。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/gateway/chat-routes.ts",
          "line": 326,
          "endLine": 364,
          "symbol": "DESKTOP_UPGRADE_REQUIRED_BODY"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/tool-client/src/types/runtime-work-identity.ts",
          "line": 4,
          "endLine": 13,
          "symbol": "RUNTIME_WORK_PROTOCOL"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/gateway/request-schemas.ts",
          "line": 93,
          "endLine": 110,
          "symbol": "LOCAL_EXECUTION_CHAT_BODY_FIELDS"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/gateway/chat-work-admission.ts",
          "line": 15,
          "endLine": 24,
          "symbol": "runtimeWorkSubmissionProtocol"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/gateway/chat-routes.ts",
          "line": 531,
          "endLine": 535,
          "symbol": "submissionProtocol"
        }
      ]
    },
    {
      "statement": "Interaction API 中间件在 Aida-Interaction-Protocol-Version 不被接受时返回 426 interaction_protocol_upgrade_required；Local Execution Recovery GET /pending 的版本头现与 DESKTOP_PROTOCOL_VERSION（3）绑定，不匹配返回 426 DESKTOP_UPGRADE_REQUIRED。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/gateway/api-conversation-interactions.ts",
          "line": 369,
          "endLine": 399,
          "symbol": "interaction_protocol_upgrade_required"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/gateway/api-durable-local-execution-recovery.ts",
          "line": 78,
          "endLine": 84,
          "symbol": "DESKTOP_UPGRADE_REQUIRED_BODY"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/shared/durable-local-execution.ts",
          "line": 20,
          "endLine": 26,
          "symbol": "LOCAL_EXECUTION_RECOVERY_PROTOCOL_VERSION"
        }
      ]
    },
    {
      "statement": "Desktop 侧 shared/generated/protocol-version.ts 由 Agent tool-client 生成（DESKTOP_PROTOCOL_VERSION=3），ADR-0087 D3 规定版本 3 蕴含全部旧 feature token、服务端对非 3 版本返回 426 DESKTOP_UPGRADE_REQUIRED、Desktop 映射到升级提示且不做容错解码；pending-read 恢复客户端把 426 映射为 PENDING_LOCAL_READ_PROTOCOL_UPGRADE_REQUIRED。",
      "status": "verified",
      "limit": "升级提示的具体 UI 渲染路径未逐条核对；未运行 Desktop Electron / E2E。",
      "sources": [
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/shared/generated/protocol-version.ts",
          "line": 1,
          "endLine": 8,
          "symbol": "DESKTOP_PROTOCOL_VERSION"
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "docs/adr/0087-local-capability-convergence-and-protocol-v3.md",
          "line": 30,
          "endLine": 32,
          "symbol": "DESKTOP_PROTOCOL_VERSION = 3"
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/auth/aida-api-client.ts",
          "line": 2299,
          "endLine": 2304,
          "symbol": "PENDING_LOCAL_READ_PROTOCOL_UPGRADE_REQUIRED"
        }
      ]
    },
    {
      "statement": "DesktopExecutionDirectory 登记 desktop_execution_devices 与 online lease；continuation_context.remoteDesktop 绑定远程执行目标。真机远程验收未核。",
      "status": "conditional",
      "limit": "未在真机跑远程登记/租赁/跨设备执行。",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/local/desktop-execution-directory.ts",
          "line": 107,
          "endLine": 134,
          "symbol": "DesktopExecutionDirectory"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/local/desktop-execution-directory.ts",
          "line": 269,
          "endLine": 297,
          "symbol": "desktop_device_registered"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/migrations/188_desktop_execution_devices.sql",
          "line": 1,
          "endLine": 30,
          "symbol": "desktop_execution_devices"
        }
      ]
    },
    {
      "statement": "Mermaid D01 信任边界：安装信任与资源授权分开：按相应源码表达责任、调用或状态；区分类、接口、依赖、合同与概念视图。",
      "status": "verified",
      "limit": "静态源码复核，不证明真实浏览器布局、所有 producer 迁移或生产部署；持久性只按实现保证。",
      "sources": [
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/installed-capability-authorization.ts",
          "line": 39,
          "endLine": 97
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/main.ts",
          "line": 1660,
          "endLine": 1700
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/main.ts",
          "line": 2676,
          "endLine": 2715
        }
      ]
    },
    {
      "statement": "Mermaid D02 持久提交与 unknown：实际 phase 的局部状态图：按相应源码表达责任、调用或状态；区分类、接口、依赖、合同与概念视图。",
      "status": "verified",
      "limit": "静态源码复核，不证明真实浏览器布局、所有 producer 迁移或生产部署；持久性只按实现保证。",
      "sources": [
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/agent-loop/runtime-work-delivery-store.ts",
          "line": 59,
          "endLine": 70
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/agent-loop/runtime-work-delivery.ts",
          "line": 75,
          "endLine": 119
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/agent-loop/runtime-work-delivery-store.ts",
          "line": 154,
          "endLine": 228
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/agent-loop/runtime-work-delivery-store.ts",
          "line": 547,
          "endLine": 589
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/agent-loop/runtime-work-delivery.ts",
          "line": 375,
          "endLine": 428
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/agent-loop/runtime-work-delivery.ts",
          "line": 122,
          "endLine": 274
        }
      ]
    },
    {
      "statement": "Mermaid D03 Desktop executor：租约与 inbox，不是第二个模型循环：按相应源码表达责任、调用或状态；区分类、接口、依赖、合同与概念视图。",
      "status": "verified",
      "limit": "静态源码复核，不证明真实浏览器布局、所有 producer 迁移或生产部署；持久性只按实现保证。",
      "sources": [
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/agent-loop/desktop-execution-host.ts",
          "line": 40,
          "endLine": 100
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/agent-loop/desktop-execution-host.ts",
          "line": 106,
          "endLine": 273
        }
      ]
    },
    {
      "statement": "Mermaid D04 Plugin 条件产物：Worker 声明不能代替 Main 事实：按相应源码表达责任、调用或状态；区分类、接口、依赖、合同与概念视图。",
      "status": "verified",
      "limit": "静态源码复核，不证明真实浏览器布局、所有 producer 迁移或生产部署；持久性只按实现保证。",
      "sources": [
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/agent-loop/runtime-work-skill-delivery.ts",
          "line": 35,
          "endLine": 159
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/plugin-host/plugin-runtime.ts",
          "line": 184,
          "endLine": 370
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/plugin-host/plugin-capabilities.ts",
          "line": 470,
          "endLine": 542
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/plugin-host/plugin-capabilities.ts",
          "line": 625,
          "endLine": 641
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/shared/generated/plugin-v2/semantics.mjs",
          "line": 168,
          "endLine": 217
        }
      ]
    },
    {
      "statement": "Mermaid D05 本地写入结果与回执交付：恢复不等于再次写盘：按相应源码表达责任、调用或状态；区分类、接口、依赖、合同与概念视图。",
      "status": "verified",
      "limit": "静态源码复核，不证明真实浏览器布局、所有 producer 迁移或生产部署；持久性只按实现保证。",
      "sources": [
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/local-files-v4/coordinator.ts",
          "line": 114,
          "endLine": 164
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/local-files-v4/coordinator.ts",
          "line": 275,
          "endLine": 392
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/local-files-v4/coordinator.ts",
          "line": 409,
          "endLine": 469
        }
      ]
    },
    {
      "statement": "Mermaid D06 自动安装策略：ready 与 installed 分开：按相应源码表达责任、调用或状态；区分类、接口、依赖、合同与概念视图。",
      "status": "verified",
      "limit": "静态源码复核，不证明真实浏览器布局、所有 producer 迁移或生产部署；持久性只按实现保证。",
      "sources": [
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/update/automatic-update-installation.ts",
          "line": 12,
          "endLine": 42
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/update/automatic-update-installation.ts",
          "line": 138,
          "endLine": 222
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/update/automatic-update-installation.ts",
          "line": 250,
          "endLine": 336
        }
      ]
    },
    {
      "statement": "Mermaid D07 UML：提交协调器、Store 与传输接口：按相应源码表达责任、调用或状态；区分类、接口、依赖、合同与概念视图。",
      "status": "verified",
      "limit": "静态源码复核，不证明真实浏览器布局、所有 producer 迁移或生产部署；持久性只按实现保证。",
      "sources": [
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/agent-loop/runtime-work-delivery.ts",
          "line": 22,
          "endLine": 73
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/agent-loop/runtime-work-delivery-store.ts",
          "line": 59,
          "endLine": 103
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/agent-loop/runtime-work-delivery-store.ts",
          "line": 406,
          "endLine": 513
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/agent-loop/runtime-work-delivery-store.ts",
          "line": 515,
          "endLine": 557
        }
      ]
    },
    {
      "statement": "Mermaid D08 Stop 时序：先绑定原目标，unknown 只核对：按相应源码表达责任、调用或状态；区分类、接口、依赖、合同与概念视图。",
      "status": "verified",
      "limit": "静态源码复核，不证明真实浏览器布局、所有 producer 迁移或生产部署；持久性只按实现保证。",
      "sources": [
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/agent-loop/runtime-work-delivery.ts",
          "line": 122,
          "endLine": 220
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/agent-loop/runtime-work-delivery.ts",
          "line": 222,
          "endLine": 274
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/agent-loop/runtime-work-delivery.ts",
          "line": 277,
          "endLine": 313
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/agent-loop/runtime-work-delivery-store.ts",
          "line": 154,
          "endLine": 172
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/agent-loop/runtime-work-delivery-store.ts",
          "line": 515,
          "endLine": 557
        }
      ]
    },
    {
      "statement": "Mermaid D09 文件时序：artifact 引用物化为调用内只读副本：按相应源码表达责任、调用或状态；区分类、接口、依赖、合同与概念视图。",
      "status": "verified",
      "limit": "静态源码复核，不证明真实浏览器布局、所有 producer 迁移或生产部署；持久性只按实现保证。",
      "sources": [
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/plugin-host/plugin-capabilities.ts",
          "line": 216,
          "endLine": 273
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/plugin-host/plugin-capabilities.ts",
          "line": 287,
          "endLine": 320
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/plugin-host/plugin-capabilities.ts",
          "line": 360,
          "endLine": 415
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/plugin-host/plugin-capabilities.ts",
          "line": 625,
          "endLine": 641
        }
      ]
    },
    {
      "statement": "STA-210：Desktop 有界私有异常落盘（desktop-error-journal）；本机诊断，不替代服务端审计。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/diagnostics/desktop-error-journal.ts",
          "line": 24,
          "endLine": 64,
          "symbol": "DesktopErrorJournal"
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "docs/reference/desktop-error-journal.md",
          "line": 1,
          "endLine": 40,
          "symbol": "STA-210"
        }
      ]
    }
  ]
}
