From 3f94c985ef8455d1b9954bdf7e680304a2f2bba5 Mon Sep 17 00:00:00 2001 From: Lan_zhijiang Date: Sat, 21 Nov 2026 01:37:22 +0900 Subject: [PATCH 01/11] =?UTF-8?q?docs(extensions):=20=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E7=94=B1=E5=8F=91=E5=B8=83=E8=80=85=E4=BB=93=E5=BA=93=E6=8F=90?= =?UTF-8?q?=E4=BE=9B=E7=9A=84=E6=8F=92=E4=BB=B6=E5=88=86=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 10-prd/behavior/rules-and-invariants.md | 4 +++ 20-product-tdd/cross-unit-contracts.md | 8 ++--- .../extension-documentation-hosting.md | 8 +++++ .../extension-release-and-installation.md | 33 +++++++++++++++---- 4 files changed, 41 insertions(+), 12 deletions(-) diff --git a/10-prd/behavior/rules-and-invariants.md b/10-prd/behavior/rules-and-invariants.md index 2b058ba..a224789 100644 --- a/10-prd/behavior/rules-and-invariants.md +++ b/10-prd/behavior/rules-and-invariants.md @@ -30,6 +30,10 @@ - violation impact: extensions could bypass durable product contracts. - linked claim(s): collect external information into reusable units; expose info-base information for retrieval and downstream use +## 自部署者可以从发布者仓库添加插件 + +部署者可通过发布者仓库发现并安装支持的插件。First-party 与社区插件使用相同的安装路径。用户决定各 Peer 的精确版本,并可在插件发布者提供的仓库中查看对应版本的说明。 + ## Resolver interpretation and storage retrieval remain distinct - rationale: resolver interpretation may combine hydrated block content with local relations, while storage only turns the block's opaque pointer into actual bytes. diff --git a/20-product-tdd/cross-unit-contracts.md b/20-product-tdd/cross-unit-contracts.md index 985f861..47c4534 100644 --- a/20-product-tdd/cross-unit-contracts.md +++ b/20-product-tdd/cross-unit-contracts.md @@ -27,15 +27,11 @@ Record durable data and behavior contracts that span more than one unit reposito ## Extension State Contract -[Extension 分发发布与 Peer 参与契约](extension-release-and-installation.md)拥有独立原生发布坐标、部署共享业务状态、Peer 精确安装选择,以及启用意图和实际运行的区别。插件拥有业务与数据兼容,各 Unit 分别拥有构建发布流程和宿主执行边界。 +[Extension 分发发布与 Peer 参与契约](extension-release-and-installation.md)拥有仓库发行的发现与读取、独立原生发布坐标、部署共享业务状态和 Peer 精确安装选择。插件拥有业务与数据兼容,各 Unit 分别拥有构建发布流程和宿主执行边界。 ## Extension Documentation Hosting Contract -- Author-built static documentation, exact native Release identity and historical scope compatibility, conditional whole-site - corrections, snapshot-origin isolation, and consumer discovery follow the - [Extension Documentation Hosting Contract](extension-documentation-hosting.md). -- Registry owns hosting and executable API details; authors own site content and structure. - Documentation does not become an installable Distribution or alter Host lifecycle authority. +[Extension 用户文档契约](extension-documentation-hosting.md)规定由发布者维护的仓库入口、发行版本链接和迁移期 Registry 文档的读取。 ## Twitter 归档信息与接入契约 diff --git a/20-product-tdd/extension-documentation-hosting.md b/20-product-tdd/extension-documentation-hosting.md index 02d403c..5dadf4f 100644 --- a/20-product-tdd/extension-documentation-hosting.md +++ b/20-product-tdd/extension-documentation-hosting.md @@ -1,5 +1,13 @@ # Extension Documentation Hosting +## 仓库用户文档 + +插件发布者维护其源码目录下的 `docs/user/`。源码目录由[仓库发行描述](extension-release-and-installation.md#从发布者仓库发现和安装)定位。App 打开所选发行 tag 对应提交中的该目录。目录缺失表示该发行未提供用户文档。 + +同一插件的通用说明由其维护者写入一个 producer 的 `docs/user/`,其他分发引用该原文,并补充各自的操作说明。First-party 现有的 Python 和 MF 共通说明由 `impl-py` 维护。面向当前读者的订正可发布到仓库默认分支,精确版本链接继续指向发行时的内容。 + +以下托管与更新规则适用于迁移期仍由 Registry 提供的文档。仓库发行使用上面的用户文档入口。 + ## Purpose And Ownership This contract defines how Extension authors, Registry, developer tooling, and consuming Hosts diff --git a/20-product-tdd/extension-release-and-installation.md b/20-product-tdd/extension-release-and-installation.md index ca2900e..07135b9 100644 --- a/20-product-tdd/extension-release-and-installation.md +++ b/20-product-tdd/extension-release-and-installation.md @@ -1,6 +1,6 @@ # Extension 分发发布与 Peer 参与契约 -Extension 发布者、Registry、开发工具和宿主共同消费本契约。Registry 拥有原生产物及发布生命周期的可执行协议;宿主拥有原生加载和运行生命周期;插件拥有业务、持久数据与协作兼容。本契约通过新版 Registry、宿主及数据库协议共同交付,不能将某一 Unit 的单独升级视为部署已经完成切换。 +Extension 的发布者通过自己的仓库交付发行。仓库的 Release 是该次公开发行的来源,部署保存各 Peer 的安装选择,宿主负责原生加载,插件负责业务和数据兼容。GitHub 是首个适用的代码托管平台。现有 Registry 发行按下文的迁移规则继续提供。 ## 插件身份与原生发布 @@ -10,17 +10,36 @@ Extension 发布者、Registry、开发工具和宿主共同消费本契约。Re 各 producer 只构建本仓维护的原生产物,原生依赖仍通过各自包工具消费。发布候选固定本分发的源码、元数据和产物身份;重试使用保存的原候选,不以当前分支的新构建覆盖同一个坐标。宿主 SDK 条件、Python Project/Version 和 MF manifest 等格式约束由相应 Unit 校验,不成为跨分发业务兼容声明。 -prepare、upload、publish 一次针对一个 Native Release。只有它自己的全部原生对象齐备时才可公开,检查与提交之间改变产物身份或关联必须重新验证。发布 Python 不等待 MF,发布 MF 不等待 Python。已发布的坐标及产物身份不可覆盖;相同请求可幂等重试,冲突需要新版本。文档不使缺少可执行产物的分发成为可安装版本。 +一次发布只交付一个 Native Release。生产者在全部原生对象就绪后公开 Release。公开后的坐标和产物固定,产物变更使用新版本。Python 与 MF 各自完成发布。 -共享参与协议中的 Distribution 是开放的非空字符串,不枚举语言、打包方式或现有宿主。各宿主报告自己支持的格式,并在实际加载边界校验;一个新宿主不需要修改共享数据库的格式白名单。Registry 只对自己能交付的产物提供安装能力。 +共享参与协议中的 Distribution 是开放的非空字符串。各宿主报告自己支持的格式,并在实际加载边界校验。仓库独立分发首先覆盖 `python` 和 `module_federation`。 Extension 不拥有独立共享数据表。资料使用 Block/Relation/Storage,共享配置与业务状态使用已有 Extension config/state;仅本机需要的草稿、队列和运行状态保存在本机。 +## 从发布者仓库发现和安装 + +App 可按仓库 Topic `inkcre-extension` 发现候选,也接受部署者直接提供的仓库地址。选定仓库后,从其公开 Releases 查找发行。Git tag 使用 `inkcre-ext////v`,给出插件逻辑名、原生分发和精确版本。同一仓库可发布多个插件和分发类型。App 选择版本时按逻辑名与分发筛选。 + +每个 Release 附带一个 `inkcre-release.json`。其中 `schema_version` 为整数 `1`,`source_path` 指向插件源码的仓库相对目录,单插件位于仓库根时填 `.`。`host_sdk` 和 `host_sdk_version` 是取自原生包的 SDK 名称和兼容范围。发布工具从现有生产者元数据和实际构建生成 tag 与描述文件。消费者从 tag 读取坐标和源码提交,从 Release 读取附件。 + +| 分发 | 生产者发布内容 | 宿主读取 | +| --- | --- | --- | +| `python` | 该发行的原生 wheel,作为 Release 附件 | 从附件选取兼容的 wheel,按附件摘要核对下载,并用 wheel 的原生元数据校验插件身份、版本和入口 | +| `module_federation` | 完整的 MF 资源树作为 Release 归档,同时将同样的资源树发布到该版本的静态地址 | 从描述文件中的绝对 URL `manifest_url` 加载 manifest 及其资源,静态地址支持 Web App 跨源访问和正确的内容类型 | + +用户选定来源后,安装选择保存可定位该仓库与精确发行的引用。恢复时直接使用该引用,已具备对应产物时可在本机恢复。精确版本无法取得时,向用户报告该版本的错误。浏览发现和检查更新按需触发。 + +### First-party 发布 + +`InKCre/impl-py` 和 `InKCre/impl-ts` 分别在现有仓库为各自维护的 Python 与 MF 分发发布。插件仍以 `inkcre/` 表达共享业务身份,App 按这个名字把两个仓库的发行显示在同一个插件入口。宿主沿用各自分发的版本和兼容范围。 + +以 Mail 为例,Python `0.4.0` 和 MF `0.4.4` 分别生成 `inkcre-ext/inkcre/mail/python/v0.4.0` 和 `inkcre-ext/inkcre/mail/module_federation/v0.4.4`。版本列表直接来自两个仓库的公开 Releases,普通 App 或 SDK 发行按 tag 前缀区分。 + ## 随签名应用交付的原生分发 `swift_bundled` 表示宿主签名应用携带的原生分发。producer manifest 定义 Extension Name、分发格式和精确版本,由模块资源与签名应用一起交付。宿主只运行实际携带的模块,不下载动态代码、不替换精确选择;需要其他版本时明确要求更新应用。其产物供应链是签名应用,不把不存在的 Registry 发布或原生热加载能力作为已完成事实。 -此分发仍有真实启停生命周期和 Peer 参与记录;应用关闭只停止实际运行,不撤回共享启用意图。未配置数据库时可离线使用扩展。首次加入与重连须区分:首次事务内创建缺失的参与,冲突则读已有值;加入或明确启用成功后,重连不重建已移除记录、不重放离线开关。用户在线明确启用可以重新创建本 Peer 的缺失参与;离线操作只改变本机运行并显示共享意图尚未更新。共享写入前复核参与选择和启用意图。Python/MF 原生产物继续按各自 Registry 发布流程交付。 +此分发仍有真实启停生命周期和 Peer 参与记录;应用关闭只停止实际运行,不撤回共享启用意图。未配置数据库时可离线使用扩展。首次加入与重连须区分:首次事务内创建缺失的参与,冲突则读已有值;加入或明确启用成功后,重连不重建已移除记录、不重放离线开关。用户在线明确启用可以重新创建本 Peer 的缺失参与;离线操作只改变本机运行并显示共享意图尚未更新。共享写入前复核参与选择和启用意图。 ## 部署共享状态与 Peer 参与 @@ -59,7 +78,9 @@ Extension 不拥有独立共享数据表。资料使用 Block/Relation/Stora ## 历史坐标与协议迁移 -Registry v2 提供独立原生分发读写。v1 只读取历史统一坐标,不将两个独立新版本拼成一个旧 Release;旧发布写入明确要求升级。历史原生产物、URL、摘要和来源可继续复用,但公开读取必须遵守对应原生发布的当前封禁与撤回状态。历史入口不能绕过新发布生命周期限制。 +Registry v2 继续提供独立原生发行。v1 只读取历史统一坐标,旧写入要求升级。Registry 提供的原有产物、URL 与文档继续遵守其撤回规则。 + +仓库直连发行由发布者和所用托管平台管理公开、撤回和文件可用性。现有精确选择在同一产物可经仓库来源恢复时迁移,内含旧静态地址的 MF 发行可继续使用旧入口,直到用户选择能从新来源运行的版本。旧入口在依赖它的安装完成过渡后退出。 迁移保留旧部署身份、配置和业务状态,以及可恢复的旧安装快照。旧启用成员转为各 Peer 的参与记录,保留原精确版本及意图。缺少原生格式证据时保留待解析的旧引用,旧全局配置 schema 仅留在快照,不能被赋予未知分发的来源;新版实际宿主识别并条件更新后,才填写有来源的 schema。不得猜测格式或自动改为最新版本。原版本不存在对应分发时明确待修复,不静默选另一个版本。没有记录的停用参与历史不能补造。 @@ -67,6 +88,6 @@ Registry v2 提供独立原生分发读写。v1 只读取历史统一坐标, ## 验收边界 -发布验收观察每种分发独立发布、缺少自身产物时保持不可公开、候选重试和提交身份一致,以及历史公开读取遵守封禁。部署验收包含精确旧版本迁移、未知分发延迟解析和非空业务 state 保留。 +以同一 first-party 插件的 Python 与 MF 为例,验证各发布者可独立交付,App 能从仓库发现或用仓库地址安装。安装和冷恢复应按记录的来源与精确版本取得产物,MF 验证实际界面和异步资源。迁移用已有 pin 验证原产物及业务数据可恢复。 完整运行验收从实际 Web 应用安装入口进入目标 Peer 的启用、运行、停用和刷新恢复。一个 Peer 升级不能改变另一个同种分发 Peer 的选择;睡眠恢复、离线待应用和 Python 环境更新后的新进程也属于验收。插件案例需覆盖已有内容读取与按需执行、设置 UI 的先行运行以及共享业务数据延续。仅构建、独立 import 或调用 MF 容器不能代替实际入口验收。 From 9b4d894d5014467497235992374bd0ee969003e8 Mon Sep 17 00:00:00 2001 From: Lan_zhijiang Date: Sat, 21 Nov 2026 01:44:16 +0900 Subject: [PATCH 02/11] =?UTF-8?q?docs(extensions):=20=E8=AE=A9=E5=AE=BF?= =?UTF-8?q?=E4=B8=BB=E4=BB=8E=20Release=20=E6=AD=A3=E6=96=87=E8=AF=BB?= =?UTF-8?q?=E5=8F=96=E5=8F=91=E8=A1=8C=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 20-product-tdd/extension-release-and-installation.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/20-product-tdd/extension-release-and-installation.md b/20-product-tdd/extension-release-and-installation.md index 07135b9..fc3ed01 100644 --- a/20-product-tdd/extension-release-and-installation.md +++ b/20-product-tdd/extension-release-and-installation.md @@ -20,7 +20,15 @@ Extension 不拥有独立共享数据表。资料使用 Block/Relation/Stora App 可按仓库 Topic `inkcre-extension` 发现候选,也接受部署者直接提供的仓库地址。选定仓库后,从其公开 Releases 查找发行。Git tag 使用 `inkcre-ext////v`,给出插件逻辑名、原生分发和精确版本。同一仓库可发布多个插件和分发类型。App 选择版本时按逻辑名与分发筛选。 -每个 Release 附带一个 `inkcre-release.json`。其中 `schema_version` 为整数 `1`,`source_path` 指向插件源码的仓库相对目录,单插件位于仓库根时填 `.`。`host_sdk` 和 `host_sdk_version` 是取自原生包的 SDK 名称和兼容范围。发布工具从现有生产者元数据和实际构建生成 tag 与描述文件。消费者从 tag 读取坐标和源码提交,从 Release 读取附件。 +GitHub Release 正文含一个机器可读的 `inkcre-release` HTML 注释。发布工具从现有生产者元数据和实际构建生成 tag 与注释里的 JSON。宿主直接读取 Releases API 返回的正文。坐标和源码提交来自 tag,产物来自 Release 附件。 + +```text + +``` + +`source_path` 是源码的仓库相对目录,仓库根用 `.`。`host_sdk` 和 `host_sdk_version` 是原生包声明的 SDK 名称和兼容范围。MF 发行还包含下表的 `manifest_url`。 | 分发 | 生产者发布内容 | 宿主读取 | | --- | --- | --- | From c43d267f696df6fde964ea994b9947aadb4db743 Mon Sep 17 00:00:00 2001 From: Lan_zhijiang Date: Sat, 21 Nov 2026 18:13:06 +0800 Subject: [PATCH 03/11] =?UTF-8?q?docs(extensions):=20=E6=98=8E=E7=A1=AE?= =?UTF-8?q?=E5=8F=91=E8=A1=8C=E4=B8=8E=E9=9D=99=E6=80=81=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E7=94=B1=E5=90=84=E5=8F=91=E5=B8=83=E8=80=85=E8=87=AA=E4=B8=BB?= =?UTF-8?q?=E6=89=98=E7=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 20-product-tdd/extension-release-and-installation.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/20-product-tdd/extension-release-and-installation.md b/20-product-tdd/extension-release-and-installation.md index fc3ed01..20119ea 100644 --- a/20-product-tdd/extension-release-and-installation.md +++ b/20-product-tdd/extension-release-and-installation.md @@ -35,6 +35,8 @@ GitHub Release 正文含一个机器可读的 `inkcre-release` HTML 注释。发 | `python` | 该发行的原生 wheel,作为 Release 附件 | 从附件选取兼容的 wheel,按附件摘要核对下载,并用 wheel 的原生元数据校验插件身份、版本和入口 | | `module_federation` | 完整的 MF 资源树作为 Release 归档,同时将同样的资源树发布到该版本的静态地址 | 从描述文件中的绝对 URL `manifest_url` 加载 manifest 及其资源,静态地址支持 Web App 跨源访问和正确的内容类型 | +每个发布者在自己的仓库控制发行,由该 Release 声明该版本的 `manifest_url`。发布者可用自己的静态站,或者选择能从其仓库提供静态资源的托管服务。宿主直接读取声明的地址,安装无需在 InKCre 的服务注册或上传内容。Release 归档可供部署者自行镜像。 + 用户选定来源后,安装选择保存可定位该仓库与精确发行的引用。恢复时直接使用该引用,已具备对应产物时可在本机恢复。精确版本无法取得时,向用户报告该版本的错误。浏览发现和检查更新按需触发。 ### First-party 发布 From af889e57e89a45870280410744aff9570f6a29ae Mon Sep 17 00:00:00 2001 From: Lan_zhijiang Date: Sat, 21 Nov 2026 20:40:05 +0800 Subject: [PATCH 04/11] =?UTF-8?q?docs(extensions):=20=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=90=8C=E4=B8=80=20MF=20=E5=8F=91=E8=A1=8C=E7=9A=84=E4=B8=A4?= =?UTF-8?q?=E7=A7=8D=E4=BA=A4=E4=BB=98=E5=BD=A2=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 20-product-tdd/extension-release-and-installation.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/20-product-tdd/extension-release-and-installation.md b/20-product-tdd/extension-release-and-installation.md index 20119ea..abbe937 100644 --- a/20-product-tdd/extension-release-and-installation.md +++ b/20-product-tdd/extension-release-and-installation.md @@ -28,14 +28,17 @@ GitHub Release 正文含一个机器可读的 `inkcre-release` HTML 注释。发 --> ``` -`source_path` 是源码的仓库相对目录,仓库根用 `.`。`host_sdk` 和 `host_sdk_version` 是原生包声明的 SDK 名称和兼容范围。MF 发行还包含下表的 `manifest_url`。 +`source_path` 是源码的仓库相对目录,仓库根用 `.`。`host_sdk` 和 `host_sdk_version` 是原生包声明的 SDK 名称和兼容范围。MF 发行选择下表的一种形式。多文件使用 `manifest_url`,单脚本使用 `script`。同一发行坐标只有一种形式,新形式通过新版本发布。 | 分发 | 生产者发布内容 | 宿主读取 | | --- | --- | --- | | `python` | 该发行的原生 wheel,作为 Release 附件 | 从附件选取兼容的 wheel,按附件摘要核对下载,并用 wheel 的原生元数据校验插件身份、版本和入口 | -| `module_federation` | 完整的 MF 资源树作为 Release 归档,同时将同样的资源树发布到该版本的静态地址 | 从描述文件中的绝对 URL `manifest_url` 加载 manifest 及其资源,静态地址支持 Web App 跨源访问和正确的内容类型 | +| `module_federation` 多文件 | Release 归档保存完整的 MF 资源树,同一资源树发布到该版本的静态地址 | 通过绝对 URL `manifest_url` 跨源读取 manifest,按需加载入口和其他资源 | +| `module_federation` 单脚本 | 自包含的经典 JS 脚本作为 Release 附件 | 按 `script.asset_name` 从该 Release 的附件中定位脚本,通过普通脚本加载并读取 `script.global_name` 对应的 MF 容器 | -每个发布者在自己的仓库控制发行,由该 Release 声明该版本的 `manifest_url`。发布者可用自己的静态站,或者选择能从其仓库提供静态资源的托管服务。宿主直接读取声明的地址,安装无需在 InKCre 的服务注册或上传内容。Release 归档可供部署者自行镜像。 +多文件发行的静态地址要为 manifest 和资源提供正确的内容类型与跨域响应。单脚本的 `asset_name` 是该 Release 中唯一匹配的 `.js` 附件名,`global_name` 是此脚本注册的 JavaScript 标识符,须在发布者、插件名和精确版本之间保持唯一。脚本通过 MF `get` 与 `init` 提供插件和共享依赖接口,其构建资源随这一份附件交付。两种形式都遵循同一 SDK 兼容检查。 + +每个发布者在自己的仓库控制发行。多文件发行可以使用发布者自己的静态站,也可以由发布工具安排从同一仓库提供文件。部署者可用 Release 归档自行镜像。单脚本由发布者的 Release 直接分发。宿主读取发布者声明的发行,安装无需向 InKCre 服务注册。 用户选定来源后,安装选择保存可定位该仓库与精确发行的引用。恢复时直接使用该引用,已具备对应产物时可在本机恢复。精确版本无法取得时,向用户报告该版本的错误。浏览发现和检查更新按需触发。 From ad95f48ba9c217f652c1b214c383c6bd8c06b717 Mon Sep 17 00:00:00 2001 From: Lan_zhijiang Date: Sat, 21 Nov 2026 20:46:40 +0800 Subject: [PATCH 05/11] =?UTF-8?q?docs(extensions):=20=E6=8F=90=E4=BE=9B?= =?UTF-8?q?=E4=B8=A4=E7=A7=8D=20Web=20=E5=88=86=E5=8F=91=E7=9A=84=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E6=95=99=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/.vitepress/config.mts | 1 + .../content/en/developer/ecosystem/index.md | 12 +-- .../ecosystem/publish-web-extension.md | 97 +++++++++++++++++++ 3 files changed, 104 insertions(+), 6 deletions(-) create mode 100644 website/content/en/developer/ecosystem/publish-web-extension.md diff --git a/website/.vitepress/config.mts b/website/.vitepress/config.mts index eb32937..0d25cc1 100644 --- a/website/.vitepress/config.mts +++ b/website/.vitepress/config.mts @@ -123,6 +123,7 @@ export default defineConfig({ items: [ { text: 'Build on InKCre', link: '/developer/ecosystem/' }, { text: 'Build a Source Extension', link: '/developer/ecosystem/source-extension' }, + { text: 'Publish a Web Extension', link: '/developer/ecosystem/publish-web-extension' }, ], }, { diff --git a/website/content/en/developer/ecosystem/index.md b/website/content/en/developer/ecosystem/index.md index e1d4e0d..46e8ba9 100644 --- a/website/content/en/developer/ecosystem/index.md +++ b/website/content/en/developer/ecosystem/index.md @@ -11,6 +11,7 @@ to contribute it to the Core repository. Start with the boundary your integratio | Goal | Integration path | | -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | | Collect from a service InKCre does not support yet | [Build a Source Extension](/developer/ecosystem/source-extension) | +| Ship a browser Extension from your own repository | [Publish a Web Extension](/developer/ecosystem/publish-web-extension) | | Use existing information from ChatGPT | [Connect the MCP Sink](/guide/sinks/chatgpt) | | Build a new runtime around the shared info-base | Read the [Peer architecture](/developer/architecture); this requires the admitted database protocol, not arbitrary SQL access | | Change InKCre's own runtime or product behavior | Follow [Contributing](/developer/contributing) | @@ -22,10 +23,9 @@ derives use-facing meaning from stored content and required context. A Sink expo another tool. An Extension packages one or more capabilities for a compatible Host; not every integration needs all three or a custom browser interface. -The Python path uses a native wheel, the `inkcre.core.extensions` entry point, and an exact Registry -Release. A Peer selects its own Distribution/version and records its enabled intent. An online Host -then activates the Extension best-effort; users do not maintain a second durable running flag. -Browser code is a separate distribution, not automatically produced by a Python wheel. +A Peer selects an exact Extension distribution and version and records whether it should be enabled. +Python uses a wheel with an `inkcre.core.extensions` entry point. Browser Extensions have their own +Module Federation builds and can publish either a manifest with separate assets or a single script. The Source tutorial targets **Core Host SDK 0.3.x**. Its Python programming interfaces currently import Core modules; they are not an independent, universally stable Source SDK. The Extension @@ -40,7 +40,7 @@ fixtures during development, with its own database and credentials. Package identity, Host compatibility, dependencies, and immutable releases are part of delivering a usable integration. Keep your own package, tests, release history, and user setup guide in your -repository. A public Registry requires a namespace and publishing authorization; a private -development preview does not grant those rights. +repository. You can publish a Web Extension through GitHub Releases using your repository token. If +you use a Registry for distribution, its operator grants namespace and publishing access. Continue with [Build a Source Extension](/developer/ecosystem/source-extension). diff --git a/website/content/en/developer/ecosystem/publish-web-extension.md b/website/content/en/developer/ecosystem/publish-web-extension.md new file mode 100644 index 0000000..06c3373 --- /dev/null +++ b/website/content/en/developer/ecosystem/publish-web-extension.md @@ -0,0 +1,97 @@ +--- +title: Publish a Web Extension +description: Package a Module Federation Extension and publish it from your GitHub repository. +--- + +# Publish a Web Extension + +The Web App installs Module Federation Extensions from your public GitHub repository. Each version +records its build and SDK requirements in one GitHub Release. Add the `inkcre-extension` repository +topic for discovery, and keep setup instructions in `docs/user/` beside the Extension's +`package.json`. Users can also install by entering the repository URL. + +## Choose a release format + +| Format | Use it when | What gets published | +| ---------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `manifest` | The Extension has multiple assets or benefits from loading resources on demand. | A ZIP in the Release and a manifest at an exact, browser-readable static URL. The publishing tool serves the files from your repository using jsDelivr. | +| `script` | The Extension fits in one modest download, including styles and other build assets. | One classic JavaScript attachment in the Release. The Web App loads that attachment directly. | + +Choose one format per version. To switch formats, publish a new version. A publisher with its own +static origin can use the `manifest_url` path in the +[release contract](https://github.com/InKCre/docs/blob/main/20-product-tdd/extension-release-and-installation.md). + +## Build and publish + +Use the Extension's normal build to produce a directory containing `mf-manifest.json`, its remote +entry and the runtime files they reference. The +[Mail Vite configuration](https://github.com/InKCre/impl-ts/blob/main/extensions/mail/vite.config.ts) +shows a build with the root `.` exposure and shared Host SDK. Declare the identity and SDK range in +the same `package.json` used by the build: + +```json +{ + "name": "my-notes-extension", + "version": "0.1.0", + "inkcre": { + "name": "yourname/notes", + "module_federation": { "host_sdk_version": ">=0.4.2 <0.5.0" } + } +} +``` + +Save a workflow in `.github/workflows/publish-extension.yml`. The example uses npm for the build. +Keep the install and build commands you use in your own repository if they differ. + +```yaml +name: Publish Web Extension +on: workflow_dispatch +permissions: + contents: write +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: actions/setup-node@v7 + with: + node-version: 22 + cache: npm + - run: npm ci + - run: npm run build + - uses: InKCre/impl-ts/.github/actions/publish-extension@a672aae934652d2cfbb3a77aa27e218c2813a123 + with: + package: package.json + artifact-directory: dist/web + format: manifest + token: ${{ github.token }} +``` + +Set `format: script` for the single-attachment route. The workflow uses your repository token to +publish to that same repository. The tool derives the version and Release tag from `package.json`, +binds the Release to the source commit, and uses that commit to locate `docs/user/`. Run the +workflow on the commit that you want to publish. + +## Check a build locally + +Run the publish tool in preparation mode to inspect the attachment and Release description without a +publishing token. Clone the tool once, check out the same ref used by the workflow, and install its +locked dependencies. + +```sh +git clone https://github.com/InKCre/impl-ts.git ../inkcre-publisher +git -C ../inkcre-publisher checkout a672aae934652d2cfbb3a77aa27e218c2813a123 +npm ci --prefix ../inkcre-publisher/.github/actions/publish-extension --ignore-scripts +node ../inkcre-publisher/.github/actions/publish-extension/cli.mjs \ + --repository yourname/notes-extension --package package.json \ + --artifact-directory dist/web --format script --prepare-only --output /tmp/notes-release +``` + +Run the command from your Extension's checked-out repository. Use a fresh output directory and +change `--format` to `manifest` to inspect the ZIP and static tree instead. For script releases, the +whole attachment is downloaded before the Web App can start the Extension. Choose `manifest` if the +script output is large or the build needs separately fetched assets. + +After publishing, open **Extensions → Browse GitHub repositories**, enter your repository URL and +choose the exact Web release. Install it, enable it, and reopen the app to verify that it loads the +same version. From e92781a9588b8b09bfc1ab23524b0f14dcb64201 Mon Sep 17 00:00:00 2001 From: Lan_zhijiang Date: Sat, 21 Nov 2026 20:47:54 +0800 Subject: [PATCH 06/11] =?UTF-8?q?docs(extensions):=20=E5=9C=A8=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E7=9B=AE=E5=BD=95=E5=AE=89=E8=A3=85=E9=94=81=E5=AE=9A?= =?UTF-8?q?=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/content/en/developer/ecosystem/publish-web-extension.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/content/en/developer/ecosystem/publish-web-extension.md b/website/content/en/developer/ecosystem/publish-web-extension.md index 06c3373..14a8e44 100644 --- a/website/content/en/developer/ecosystem/publish-web-extension.md +++ b/website/content/en/developer/ecosystem/publish-web-extension.md @@ -81,7 +81,7 @@ locked dependencies. ```sh git clone https://github.com/InKCre/impl-ts.git ../inkcre-publisher git -C ../inkcre-publisher checkout a672aae934652d2cfbb3a77aa27e218c2813a123 -npm ci --prefix ../inkcre-publisher/.github/actions/publish-extension --ignore-scripts +(cd ../inkcre-publisher/.github/actions/publish-extension && npm ci --ignore-scripts) node ../inkcre-publisher/.github/actions/publish-extension/cli.mjs \ --repository yourname/notes-extension --package package.json \ --artifact-directory dist/web --format script --prepare-only --output /tmp/notes-release From adb4759c00265552a30a4fd33e6ab1b3f22c4954 Mon Sep 17 00:00:00 2001 From: Lan_zhijiang Date: Sat, 21 Nov 2026 20:57:53 +0800 Subject: [PATCH 07/11] =?UTF-8?q?docs(extensions):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E5=B7=A5=E5=85=B7=E7=A4=BA=E4=BE=8B=E5=8F=8A?= =?UTF-8?q?=E5=8D=95=E8=84=9A=E6=9C=AC=E9=80=82=E7=94=A8=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - CI 与本地命令引用可重现的工具提交。 - 记录适合切换到多文件发行的构建用法。 --- .../en/developer/ecosystem/publish-web-extension.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/website/content/en/developer/ecosystem/publish-web-extension.md b/website/content/en/developer/ecosystem/publish-web-extension.md index 14a8e44..49f44b4 100644 --- a/website/content/en/developer/ecosystem/publish-web-extension.md +++ b/website/content/en/developer/ecosystem/publish-web-extension.md @@ -59,7 +59,7 @@ jobs: cache: npm - run: npm ci - run: npm run build - - uses: InKCre/impl-ts/.github/actions/publish-extension@a672aae934652d2cfbb3a77aa27e218c2813a123 + - uses: InKCre/impl-ts/.github/actions/publish-extension@a903fe36f6342908eaaaae43e65fb3f4c0acebbe with: package: package.json artifact-directory: dist/web @@ -80,7 +80,7 @@ locked dependencies. ```sh git clone https://github.com/InKCre/impl-ts.git ../inkcre-publisher -git -C ../inkcre-publisher checkout a672aae934652d2cfbb3a77aa27e218c2813a123 +git -C ../inkcre-publisher checkout a903fe36f6342908eaaaae43e65fb3f4c0acebbe (cd ../inkcre-publisher/.github/actions/publish-extension && npm ci --ignore-scripts) node ../inkcre-publisher/.github/actions/publish-extension/cli.mjs \ --repository yourname/notes-extension --package package.json \ @@ -88,9 +88,10 @@ node ../inkcre-publisher/.github/actions/publish-extension/cli.mjs \ ``` Run the command from your Extension's checked-out repository. Use a fresh output directory and -change `--format` to `manifest` to inspect the ZIP and static tree instead. For script releases, the -whole attachment is downloaded before the Web App can start the Extension. Choose `manifest` if the -script output is large or the build needs separately fetched assets. +change `--format` to `manifest` to inspect the ZIP and static tree instead. Script mode bundles the +Vite ESM remote and inlines its CSS, images, and fonts. The Web App downloads the whole attachment +before it starts the Extension. Choose `manifest` for large bundles or builds that require nested +remotes, CSS `@import`, or dynamic imports whose paths are only known at runtime. After publishing, open **Extensions → Browse GitHub repositories**, enter your repository URL and choose the exact Web release. Install it, enable it, and reopen the app to verify that it loads the From d17bbe5f3ebc5e5f5e4baf6182ee2ff04bbcf52d Mon Sep 17 00:00:00 2001 From: Lan_zhijiang Date: Mon, 23 Nov 2026 20:22:22 +0800 Subject: [PATCH 08/11] =?UTF-8?q?docs(extensions):=20=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E4=BB=93=E5=BA=93=E5=8F=91=E7=8E=B0=E5=92=8C=E9=85=8D=E5=A5=97?= =?UTF-8?q?=E5=88=86=E5=8F=91=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 用统一 Topic 或仓库地址发现所有发布者。 - 配套 Python 仓库由精确 Web Release 声明。 --- 20-product-tdd/extension-release-and-installation.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/20-product-tdd/extension-release-and-installation.md b/20-product-tdd/extension-release-and-installation.md index abbe937..89ef1cd 100644 --- a/20-product-tdd/extension-release-and-installation.md +++ b/20-product-tdd/extension-release-and-installation.md @@ -18,7 +18,7 @@ Extension 不拥有独立共享数据表。资料使用 Block/Relation/Stora ## 从发布者仓库发现和安装 -App 可按仓库 Topic `inkcre-extension` 发现候选,也接受部署者直接提供的仓库地址。选定仓库后,从其公开 Releases 查找发行。Git tag 使用 `inkcre-ext////v`,给出插件逻辑名、原生分发和精确版本。同一仓库可发布多个插件和分发类型。App 选择版本时按逻辑名与分发筛选。 +所有发布者通过仓库 Topic `inkcre-extension` 参加同一个发现入口。App 也接受部署者直接提供的仓库地址。选定仓库后,从其公开 Releases 查找发行。Git tag 使用 `inkcre-ext////v`,给出插件逻辑名、原生分发和精确版本。同一仓库可发布多个插件和分发类型。App 选择版本时按逻辑名与分发筛选。 GitHub Release 正文含一个机器可读的 `inkcre-release` HTML 注释。发布工具从现有生产者元数据和实际构建生成 tag 与注释里的 JSON。宿主直接读取 Releases API 返回的正文。坐标和源码提交来自 tag,产物来自 Release 附件。 @@ -40,11 +40,13 @@ GitHub Release 正文含一个机器可读的 `inkcre-release` HTML 注释。发 每个发布者在自己的仓库控制发行。多文件发行可以使用发布者自己的静态站,也可以由发布工具安排从同一仓库提供文件。部署者可用 Release 归档自行镜像。单脚本由发布者的 Release 直接分发。宿主读取发布者声明的发行,安装无需向 InKCre 服务注册。 +Web 发行的设置流程如需为同一 Extension 安装 Python 分发,默认读取该 Web 发行所属仓库。Python 分发由另一仓库发布时,Web Release 正文可使用 `python_repository` 指定 `https://github.com//`。设置从已选 Web Release 读取这个地址,查找逻辑名相同的公开 Python 发行。缺少匹配发行时报告仓库和插件名。来源仍为旧 Registry 的 Web 选择继续使用原设置路径。 + 用户选定来源后,安装选择保存可定位该仓库与精确发行的引用。恢复时直接使用该引用,已具备对应产物时可在本机恢复。精确版本无法取得时,向用户报告该版本的错误。浏览发现和检查更新按需触发。 ### First-party 发布 -`InKCre/impl-py` 和 `InKCre/impl-ts` 分别在现有仓库为各自维护的 Python 与 MF 分发发布。插件仍以 `inkcre/` 表达共享业务身份,App 按这个名字把两个仓库的发行显示在同一个插件入口。宿主沿用各自分发的版本和兼容范围。 +`InKCre/impl-py` 和 `InKCre/impl-ts` 分别在现有仓库发布各自维护的 Python 与 MF 分发。两个仓库都使用 `inkcre-extension` Topic。插件仍以 `inkcre/` 表达共享业务身份,安装到各 Peer 的分发共用以此名字标识的插件条目。宿主沿用各自分发的版本和兼容范围。 以 Mail 为例,Python `0.4.0` 和 MF `0.4.4` 分别生成 `inkcre-ext/inkcre/mail/python/v0.4.0` 和 `inkcre-ext/inkcre/mail/module_federation/v0.4.4`。版本列表直接来自两个仓库的公开 Releases,普通 App 或 SDK 发行按 tag 前缀区分。 From 2d039a6e7a70dcc1dfeab2f6c07b4724da2ddb39 Mon Sep 17 00:00:00 2001 From: Lan_zhijiang Date: Mon, 23 Nov 2026 20:25:03 +0800 Subject: [PATCH 09/11] =?UTF-8?q?docs(extensions):=20=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=E5=BC=82=E4=BB=93=20Python=20=E9=85=8D=E5=A5=97=E5=8F=91?= =?UTF-8?q?=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新可复制的工作流和本地工具版本。 - 说明同仓默认规则及 Python 首发顺序。 --- .../en/developer/ecosystem/publish-web-extension.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/website/content/en/developer/ecosystem/publish-web-extension.md b/website/content/en/developer/ecosystem/publish-web-extension.md index 49f44b4..5ac46cc 100644 --- a/website/content/en/developer/ecosystem/publish-web-extension.md +++ b/website/content/en/developer/ecosystem/publish-web-extension.md @@ -40,6 +40,11 @@ the same `package.json` used by the build: } ``` +If setup installs the matching Python Distribution from another repository, set +`inkcre.module_federation.python_repository` to that repository's public GitHub URL. Publish a +compatible Python release before users run setup. When both Distributions live in your Web +repository, leave the field out. + Save a workflow in `.github/workflows/publish-extension.yml`. The example uses npm for the build. Keep the install and build commands you use in your own repository if they differ. @@ -59,7 +64,7 @@ jobs: cache: npm - run: npm ci - run: npm run build - - uses: InKCre/impl-ts/.github/actions/publish-extension@a903fe36f6342908eaaaae43e65fb3f4c0acebbe + - uses: InKCre/impl-ts/.github/actions/publish-extension@76f8b0738d9f0c481e4c6861946bf85f06ea8582 with: package: package.json artifact-directory: dist/web @@ -80,7 +85,7 @@ locked dependencies. ```sh git clone https://github.com/InKCre/impl-ts.git ../inkcre-publisher -git -C ../inkcre-publisher checkout a903fe36f6342908eaaaae43e65fb3f4c0acebbe +git -C ../inkcre-publisher checkout 76f8b0738d9f0c481e4c6861946bf85f06ea8582 (cd ../inkcre-publisher/.github/actions/publish-extension && npm ci --ignore-scripts) node ../inkcre-publisher/.github/actions/publish-extension/cli.mjs \ --repository yourname/notes-extension --package package.json \ From 878ee99aa82c0f98be4465c0e89cb926b769a2ae Mon Sep 17 00:00:00 2001 From: Lan_zhijiang Date: Mon, 23 Nov 2026 21:11:54 +0800 Subject: [PATCH 10/11] =?UTF-8?q?docs(extensions):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E9=87=8D=E8=AF=95=E5=B7=A5=E5=85=B7=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../content/en/developer/ecosystem/publish-web-extension.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/content/en/developer/ecosystem/publish-web-extension.md b/website/content/en/developer/ecosystem/publish-web-extension.md index 5ac46cc..82a1ade 100644 --- a/website/content/en/developer/ecosystem/publish-web-extension.md +++ b/website/content/en/developer/ecosystem/publish-web-extension.md @@ -64,7 +64,7 @@ jobs: cache: npm - run: npm ci - run: npm run build - - uses: InKCre/impl-ts/.github/actions/publish-extension@76f8b0738d9f0c481e4c6861946bf85f06ea8582 + - uses: InKCre/impl-ts/.github/actions/publish-extension@902535ee6ef39d642b9a6cb6892b98a29c59e952 with: package: package.json artifact-directory: dist/web @@ -85,7 +85,7 @@ locked dependencies. ```sh git clone https://github.com/InKCre/impl-ts.git ../inkcre-publisher -git -C ../inkcre-publisher checkout 76f8b0738d9f0c481e4c6861946bf85f06ea8582 +git -C ../inkcre-publisher checkout 902535ee6ef39d642b9a6cb6892b98a29c59e952 (cd ../inkcre-publisher/.github/actions/publish-extension && npm ci --ignore-scripts) node ../inkcre-publisher/.github/actions/publish-extension/cli.mjs \ --repository yourname/notes-extension --package package.json \ From 403ad1a47cb5f84727ab3c6d1cd5cf6796ae9262 Mon Sep 17 00:00:00 2001 From: Lan_zhijiang Date: Tue, 1 Dec 2026 23:48:37 +0800 Subject: [PATCH 11/11] =?UTF-8?q?docs(extensions):=20=E7=BA=A6=E5=AE=9A?= =?UTF-8?q?=E5=8D=95=E8=A1=A8=E4=B8=8E=20Peer=20=E7=8B=AC=E7=AB=8B?= =?UTF-8?q?=E9=80=89=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 明确共享插件记录、并发修改和迁移规则 - 纳入休眠恢复与版本回退约束 --- 20-product-tdd/extension-release-and-installation.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/20-product-tdd/extension-release-and-installation.md b/20-product-tdd/extension-release-and-installation.md index 89ef1cd..5a02d57 100644 --- a/20-product-tdd/extension-release-and-installation.md +++ b/20-product-tdd/extension-release-and-installation.md @@ -58,7 +58,9 @@ Web 发行的设置流程如需为同一 Extension 安装 Python 分发,默认 ## 部署共享状态与 Peer 参与 -部署中一个插件只有一个逻辑身份及其共享配置、业务状态。安装选择属于 `Peer × Extension`:该 Peer 选择一种宿主支持的 Distribution 及精确版本,并保存自己的启用意图。数据库保存这些持久事实;运行端报告实际加载的分发、版本和运行结果。 +部署中一个插件只有一个逻辑身份。所有 Peer 从 `inkcre.extensions` 的同一行读取插件配置、业务状态和安装选择。这是插件持久配置的唯一表。该行的 `installations` 对象按 Peer UUID 索引,每项保存所选分发、版本、可选的 GitHub 仓库来源、启用意图和来自所选发行的配置 schema。两个使用同一分发的 Peer 可以长期各用自己选的版本。运行端报告实际加载的分发、版本和运行结果。 + +数据库通过 `patch_extension_installation` 原子修改指定 Peer 的安装选择,并在同一次写入中比较调用者预期的选择。两个 Peer 的操作能够同时生效。停用保留原选择,移除才删除选择。过期操作不覆盖较新的决定。显式删除 Peer 时清理其安装选择,删除插件前须先移除其所有选择。 | 事实 | 含义 | | --- | --- | @@ -79,6 +81,8 @@ Web 发行的设置流程如需为同一 Extension 安装 Python 分发,默认 插件拥有共享配置、业务 state、Source 配置及游标、Job 参数、持久图类型和调用协议的兼容。原生发布版本只是安装坐标,不能替代这些业务契约。独立 Peer 选择允许不同版本同时参与;插件应保持必要的读写兼容,或提供明确的业务升级流程,不通过清空正常数据完成包版本变更。 +若所选旧发行仍可取得且宿主支持,可以重新选择。业务数据的回退能力由插件说明,包括新版已完成的数据变更需要怎样处理。 + 配置 schema 标明产生它的精确分发来源,为选定运行端提供编辑和输入验证信息;配置数据仍属于部署。最后启动的实例不覆盖唯一的全局 schema 权威,平台不合并多份 schema 或推断所有版本都理解新配置。插件在自己接受和执行业务输入时维护对应契约。 共享业务 state 的写入对已准入原生和 PostgREST Peer 保持同一协议能力,不以当前实现位于 Core 为由建立独占写角色。合法数据形状和身份不可修改仍由协议约束,匿名调用不获此权限;插件自己的原子更新和并发保护不能被整对象覆盖替代。业务 state 可以含凭据,通用安装管理响应不因写权对等而展示其内容。 @@ -91,15 +95,17 @@ Web 发行的设置流程如需为同一 Extension 安装 Python 分发,默认 离线 Peer 只能接收待应用选择,不能被宣称已停止旧实例或已运行新版。租约过期不证明进程停止。Python 等宿主若安装会修改共享原生依赖环境,应暂停该 Peer 的执行,安装后从新进程启动;只停目标插件不足以证明其他已加载依赖安全。应用失败应报告失败或待处理,不能假定自动恢复旧环境或撤销插件已经执行的业务迁移。具体进程、打包和恢复操作留在宿主本地文档。 +发现和检查更新由用户操作触发。关闭自动续租后,插件安装选择在休眠期间仍可保存;宿主在下一次正常启动时应用。空闲时不为发现、更新或应用版本定时唤醒其他 Peer 或 Registry。 + ## 历史坐标与协议迁移 Registry v2 继续提供独立原生发行。v1 只读取历史统一坐标,旧写入要求升级。Registry 提供的原有产物、URL 与文档继续遵守其撤回规则。 仓库直连发行由发布者和所用托管平台管理公开、撤回和文件可用性。现有精确选择在同一产物可经仓库来源恢复时迁移,内含旧静态地址的 MF 发行可继续使用旧入口,直到用户选择能从新来源运行的版本。旧入口在依赖它的安装完成过渡后退出。 -迁移保留旧部署身份、配置和业务状态,以及可恢复的旧安装快照。旧启用成员转为各 Peer 的参与记录,保留原精确版本及意图。缺少原生格式证据时保留待解析的旧引用,旧全局配置 schema 仅留在快照,不能被赋予未知分发的来源;新版实际宿主识别并条件更新后,才填写有来源的 schema。不得猜测格式或自动改为最新版本。原版本不存在对应分发时明确待修复,不静默选另一个版本。没有记录的停用参与历史不能补造。 +切换到单表时,把旧参与表中的每个选择迁入同名插件的 `installations`,保留原 Peer、类型、来源、版本、启用意图和有来源的 schema。历史待解析及停用记录也逐项保留。迁移保留所有原插件行、配置和业务状态,以及可恢复的历史快照。缺少原生格式证据的历史选择由宿主识别并条件更新。没有可用的原版产物时报告待修复,保留所选版本。 -新版 Extension 管理与数据库协议共同改变旧全局版本语义。切换需要新版消费者和明确的旧写入退出,不能维护两份可写版本权威。暂停活跃旧运行端、迁移数据库并启动新版宿主后,睡眠旧 Peer 返回也必须先升级;协议 revision 改变本身不停止进程。具体 schema、guard、切换和恢复步骤由数据库与宿主 owner 验证并记录。 +单表协议修订标识为 `extension-installations-v1`。暂停活跃旧运行端、迁移数据库并移除旧参与表,再启动新版消费者。睡眠旧 Peer 返回时须先升级;协议 revision 改变本身不停止进程。具体 schema、切换与恢复步骤由数据库与宿主 owner 验证并记录。 ## 验收边界