[#810][CODE] 签名 package/套件安装路径收口到 useExtensions 并接引擎重扫 - #822
Merged
Conversation
三个 Hub 安装入口(runPackageAction / installBundle / confirmPackageAuthz)此前各自 直连 extIpc.installCatalog,**一个都不调 refreshEngine()**;而组件的注入面只在引擎实例 构造时装载 ⇒ placebo 安装:账本翻了、盘上有了、界面说「已安装」,用户下一条消息里什么 都没有。Phase 3 在本地导入那条线上修过同一个洞(G20),签名 package 这条线从来没修过。 - use-extensions 新增 installCatalogIntent:scope 钉死 global、成功后刷账本 + refreshEngine() 只接一次、dispose 失败挂 reloadPending; - 三个入口改走 ext.installCatalogIntent,并把 reloadPending 如实呈现成「要重载」 (复用既有 alpha.ext.addedPendingReload,无新词条、无新视觉); - 新闸 package-install-engine-reload:三个动作全部经真实 DOM 点击驱动,证明进入同一个 useExtensions 方法;落盘那趟重扫 +1、authorize 臂不重扫;出站计数相等堵住「既走收口 又另外直连」。 Fixes #810 Refs #699 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
jinjunnn
force-pushed
the
feat/810-renderer-engine-reload
branch
from
August 3, 2026 09:36
ac3e3a2 to
9978522
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
大白话
装完让引擎当场重扫。
三个签名 package / 套件的安装入口(
runPackageAction/installBundle/confirmPackageAuthz)此前各自直连
extIpc.installCatalog,一个都不调refreshEngine();而组件的注入面只在引擎实例构造时装载 ⇒ placebo 安装:账本翻了、盘上有了、界面说「已安装」,用户下一条消息里什么都没有。
Phase 3 在本地导入那条线上修过同一个洞(G20),签名 package 这条线从来没修过。
这与插件无关:Bundle 里的 MCP / agent / skill 组件同样需要重扫。
改了什么
use-extensions.ts新增installCatalogIntent(intent)—— 签名 package / 套件安装的唯一出站点:scope钉死global(ADR-030,此前三个调用点各写一遍同一个字面量)、成功后刷账本、refreshEngine()在这一层接一次、dispose 失败在成功臂挂reloadPending。!ok一个字不折叠原样上抛(stage: "authorize"/package两条臂调用方都要读);authorize 不是一次安装,那条路径上不刷新、不重扫。
ext.installCatalogIntent,extension-hub.tsx里installCatalog(调用归零。reloadPending如实呈现成「要重载」,复用既有词条alpha.ext.addedPendingReload—— 无新词条、无新视觉、不走 design-loop。
package-install-engine-reload(子进程宿主 +test-component/*.cases.ts主判据),已登记进
scripts/gate-files.tsv。判据(R1 审计 F13:必须驱动三个生产 Hub 动作本身)
三个动作全部经真实 DOM 点击触发(卡片按钮 / 确认屏按钮 / 能力授权框按钮),被替身的只有进程边界
(引擎 HTTP 客户端、
globalThis.fetch);main 侧走真registerExtIpcHandlers、真 admission、真事务、真账本、真 legacy planner。收口方法上挂一条真包装(真函数值先存 const 再
mock.module),于是「新写了 helper 而 Hub 仍旧直连
extIpc」的实现在这里计数为 0 ⇒ 红。三条绕过各实施了一次,逐条给原始输出:
refreshEngine()2 pass / 3 fail(②③④ 红)runPackageAction改回直连extIpc3 pass / 2 fail(①⑤ 红)confirmPackageAuthz改回直连extIpc3 pass / 2 fail(②⑤ 红)installBundle改回直连extIpc2 pass / 3 fail(③④⑤ 红)installBundle的 reload-pending 呈现(改说「已添加」)4 pass / 1 fail(④ 红)另加一条出站计数相等(到达 IPC 的
installCatalog次数 = 经过收口方法的次数),把「既走收口方法、又另外直连一次」也堵死。
范围变更:§5 第 5 类(授权披露)已移出本票
owner 裁决回滚
opencode-pluginprofile,engine:plugin/engine:config两个 host capability 随之回滚 ⇒ 本 PR 不含任何关于它们的断言,授权披露这一面不在本票范围内。本 PR 的范围收窄成
「安装路径收口 + 引擎重扫」一件事,与被回滚的 profile 零依赖(夹具用的是 Phase 1/2 的
package-mixed-bundle:agent root + skill leaf + mcp-remote leaf)。本地门(真实输出)
与 base(
alpha@5ef04016)的差:ui-mac3794 → 3795 pass / 262 → 263 files(+1 = 本票的闸门宿主),0 fail;ext133/0/10不变;contracts-consumer54/0/5不变;闸门登记 +1。Fixes #810
Refs #699
🤖 Generated with Claude Code