diff --git a/openspec/changes/add-dsh-native-plugin/design.md b/openspec/changes/add-dsh-native-plugin/design.md index 9f2c5ac93..d915f30ec 100644 --- a/openspec/changes/add-dsh-native-plugin/design.md +++ b/openspec/changes/add-dsh-native-plugin/design.md @@ -25,6 +25,8 @@ SkillHub 仍负责技能发布、版本和服务端规则;本插件只提供 D ### 2. 匿名访问单一实例 +从 `0.2.1` 起,Host 配置 Schema 在缺少 `registryUrl` 时使用 `https://skill.xfyun.cn`;显式空串或仅空白仍断开,已有自定义来源保留。初始化和读取配置本身不访问网络;Client 不另设回退来源。 + Host 对指定 SkillHub 发起无 Token、无 Cookie 的请求;不读取或复用 CLI 凭证。不做 Device Flow、API Token、账号状态或凭证持久化。 地址变化取消旧查询、使旧安装计划失效,旧响应不得进入新实例的列表。网络失败保留查询并提供重试。 匿名可见不等于匿名可下载;安装前重新 resolve。需要身份或被拒绝时提示“此来源或技能暂不支持匿名访问”,当前版本不提供登录补救入口。 diff --git a/openspec/changes/add-dsh-native-plugin/interface-design.md b/openspec/changes/add-dsh-native-plugin/interface-design.md index af20a832f..d33cab137 100644 --- a/openspec/changes/add-dsh-native-plugin/interface-design.md +++ b/openspec/changes/add-dsh-native-plugin/interface-design.md @@ -62,6 +62,7 @@ interface SkillHubPluginConfig { } ``` +- `registryUrl` 从 `0.2.1` 起缺省为 `https://skill.xfyun.cn`;显式空串或仅空白断开,自定义来源保留。不继承 CLI 地址或凭证。 - `details` 常驻,不在开关中;广场“浏览技能/已安装”也常驻。 - 默认 `auto`,已有适配且匿名能力已确认才显示可选 Tab;未知期间不闪现成功内容。 - `hide`:无条件隐藏且不发起该模块的数据请求。适合 SaaS 未上线评论的情况。 @@ -84,7 +85,7 @@ interface SkillHubPluginConfig { } ``` -该示例适合未上线评论的实例;版本和安全审核仍按匿名能力判断。开源实例想展示评论可把 reviews 改为 auto,不需要更换插件包。若必须让用户看到某模块不可访问的原因,可选 show,但不获得额外权限。registryUrl 需配置为实际实例地址。 +该示例适合未上线评论的实例;版本和安全审核仍按匿名能力判断。开源实例想展示评论可把 reviews 改为 auto,不需要更换插件包。若必须让用户看到某模块不可访问的原因,可选 show,但不获得额外权限。省略 registryUrl 使用正式默认实例;自建实例显式配置实际地址,空地址断开。 ## 4. 插件 Client ↔ Host 服务 diff --git a/openspec/changes/add-dsh-native-plugin/registry-api-contract.md b/openspec/changes/add-dsh-native-plugin/registry-api-contract.md index 49ac58446..052db5f5c 100644 --- a/openspec/changes/add-dsh-native-plugin/registry-api-contract.md +++ b/openspec/changes/add-dsh-native-plugin/registry-api-contract.md @@ -68,22 +68,22 @@ | 评论与安全审核 | 可选读取,保留服务端访问限制 | 未上线评论可配置 hide;匿名审核拒绝属于受支持的可选状态,不开放权限来使测试变绿 | | 配置与网关 | 实例差异独立核验 | 验证 Registry 基础路径、匿名 GET、下载跳转及限流;插件 Host 发起 HTTP 请求,不将浏览器 CORS 放开作为默认同步项 | -同步时应保存实际 SaaS 变更提交与部署版本;目前没有 SaaS 变更集或部署验收记录。完成同步清单不等于完成 SaaS 接入。OpenAPI 描述修正的完成范围见 §4.1,生成类型尚未同步时不能只复制旧生成文件。 +同步时应保存实际 SaaS 变更提交与部署版本;本轮对 `https://skill.xfyun.cn` 的公开 npm `0.2.0` 插件消费验收见 [验证摘要](verification.md);不据此推定 SaaS 内部变更集、Pod 或镜像状态已核对。完成同步清单不等于完成 SaaS 接入。OpenAPI 描述修正的完成范围见 §4.1,生成类型尚未同步时不能只复制旧生成文件。 ### 3.3 能力验证状态 下表引用现有验收记录,不表示这些实例当前在线,也不表示当前工作树已经部署。 -| 能力 | 开源本地预览实例 | SaaS 测试实例 | +| 能力 | 开源本地预览实例 | SaaS 正式实例 `https://skill.xfyun.cn` | | --- | --- | --- | -| 匿名搜索、精确版本解析、元数据 | 通过 | 未验证 | -| 新增消费的广场分页、排序、统计 | 现有开源 Controller/DTO/匿名策略已核对;本轮插件适配与宿主夹具验证独立记录 | 未验证;缺失分页路由可使用受限搜索 | -| 固定版本 SKILL.md 原始内容 | 通过 | 未验证 | -| 完整归档与 fingerprint | 通过 | 未验证 | -| 版本历史 | 通过 | 未验证 | -| 评论 | 通过 | 未验证;未上线时可隐藏 | -| 安全审核 | HTTP 401,按匿名拒绝处理;未验证公开审核报告结构 | 未验证,不假设匿名可读 | -| DSH 安装带资源技能 | 已有项目级安装及资源核验记录 | 未验证 | +| 匿名搜索、精确版本解析、元数据 | 通过 | 公开 npm 0.2.0 真实 DSH 通过 | +| 新增消费的广场分页、排序、统计 | 现有开源 Controller/DTO/匿名策略已核对;本轮插件适配与宿主夹具验证独立记录 | 正式目录浏览通过;排序和所有统计尚不作全量声明 | +| 固定版本 SKILL.md 原始内容 | 通过 | 公开 npm 0.2.0 真实 DSH 通过 | +| 完整归档与 fingerprint | 通过 | 公开 npm 0.2.0 真实 DSH 通过 | +| 版本历史 | 通过 | 公开 npm 0.2.0 真实 DSH 通过 | +| 评论 | 通过 | HTTP 404,保留 unknown/可隐藏,不声称支持评论 | +| 安全审核 | HTTP 401,按匿名拒绝处理;未验证公开审核报告结构 | HTTP 401,按匿名拒绝处理 | +| DSH 安装带资源技能 | 已有项目级安装及资源核验记录 | 固定旧版项目安装、7 文件/指纹、库存、搜索标记及 DSH 发现通过 | | 模型实际使用技能 | 未完成验收 | 未验证 | 开源接口证据:[匿名契约报告](verification.md)。资源技能安装证据:[安装结果](verification.md)、[文件核验](verification.md)。服务端模拟测试证据:[Controller 契约报告](verification.md),不得代替目标实例验收。 diff --git a/openspec/changes/add-dsh-native-plugin/release-guide.md b/openspec/changes/add-dsh-native-plugin/release-guide.md index 9687384da..ac75fd93a 100644 --- a/openspec/changes/add-dsh-native-plugin/release-guide.md +++ b/openspec/changes/add-dsh-native-plugin/release-guide.md @@ -73,7 +73,7 @@ npm pack --ignore-scripts --pack-destination /absolute/path/to/candidate-output ### 2.3 隔离环境验证 -本次 `0.2.0` 交付固定 DSH `0.2.0-rc.2`、Node `>=24.2.0 <25`。Cordis、Loader、Include、Timer 须为已验证的完整组合:`4.0.4 / 1.0.5 / 1.0.9 / 1.1.6` 或 `4.0.5 / 1.0.6 / 1.0.10 / 1.1.7`,不得交叉混装;以实际 Host 解析结果为准。已发布 `0.1.0` 尚不包含后一组合支持及历史回执修复,`0.1.1` 起包含这些修复,`0.2.0` 延续此兼容基线;发布前使用本次 tarball 验证。在独立测试账户或容器中准备 Web Profile、工作区和测试技能,连接测试 Registry。仅隔离 Profile/DSH home 不足以隔离共享 inventory。 +本次 `0.2.1` 交付固定 DSH `0.2.0-rc.2`、Node `>=24.2.0 <25`。Cordis、Loader、Include、Timer 须为已验证的完整组合:`4.0.4 / 1.0.5 / 1.0.9 / 1.1.6` 或 `4.0.5 / 1.0.6 / 1.0.10 / 1.1.7`,不得交叉混装;以实际 Host 解析结果为准。已发布 `0.1.0` 尚不包含后一组合支持及历史回执修复,`0.1.1` 起包含这些修复,`0.2.0` 延续此兼容基线;发布前使用本次 tarball 验证。在独立测试账户或容器中准备 Web Profile、工作区和测试技能,连接测试 Registry。仅隔离 Profile/DSH home 不足以隔离共享 inventory。 首次创建测试 Web Profile,然后安装本地候选包: @@ -158,7 +158,7 @@ SaaS 使用其现有流水线部署;公共接口契约、测试数据规则与 ### 4.1 独立发布流程 -插件使用独立版本,tag 前缀固定为 `dsh-v`(本次为 `dsh-v0.2.0`),不复用 CLI 的 `cli-v*` 发布流程。专用工作流为 `.github/workflows/release-dsh-plugin.yml`;发布前仍须确认 npm 包名、兼容基线及候选包验收,本次交付为 `0.2.0`,manifest 已显式设为 `private: false`;默认 Registry 为空。正式发布仍以最终提交、候选验收和审批结果为准。 +插件使用独立版本,tag 前缀固定为 `dsh-v`(本次为 `dsh-v0.2.1`),不复用 CLI 的 `cli-v*` 发布流程。专用工作流为 `.github/workflows/release-dsh-plugin.yml`;发布前仍须确认 npm 包名、兼容基线及候选包验收,本次交付为 `0.2.1`,manifest 已显式设为 `private: false`;缺省 Registry 为 `https://skill.xfyun.cn`,显式空串/空白仍断开,已有自定义来源保留。发布前分别验证缺省、断开和自定义配置,以及正式域名的固定版本安装、状态识别和本地管理。正式发布仍以最终提交、候选验收和审批结果为准。 发布流程依次完成:校验版本 → 测试与构建 → 生成并检查 tarball → 隔离 DSH 候选验收 → 发布审批 → 发布 npm → 校验已发布包。当前工作流自动执行版本校验、测试与构建、包检查、上传及完整性校验;隔离 DSH 的 UI、真实模型和平台验收需在发布审批前另行完成,CI 矩阵成功不等同于这些验收通过。工作流使用仓库的 `NPM_TOKEN` 发布凭证,源码及 npm 包不包含凭证;配置了环境保护规则时还须完成对应审批。 @@ -181,7 +181,7 @@ SaaS 使用其现有流水线部署;公共接口契约、测试数据规则与 ### 4.3 发布说明 -`0.2.0` 的变更说明见 [release-notes.md](release-notes.md)。正式版本发布前按最终候选及验收结果更新,不沿用开发版本的支持声明。 +`0.2.1` 的变更说明见 [release-notes.md](release-notes.md)。正式版本发布前按最终候选及验收结果更新,不沿用开发版本的支持声明。 每个版本包含: diff --git a/openspec/changes/add-dsh-native-plugin/release-notes.md b/openspec/changes/add-dsh-native-plugin/release-notes.md index 3b5eabb6b..aa435de8b 100644 --- a/openspec/changes/add-dsh-native-plugin/release-notes.md +++ b/openspec/changes/add-dsh-native-plugin/release-notes.md @@ -2,11 +2,19 @@ ## 版本与交付状态 -本次交付版本为 `@astron-team/skillhub-dsh@0.2.0`,对应独立标签 `dsh-v0.2.0`。本节描述待发布版本;npm 上传、公开包完整性及发布后验收须分别确认。已发布的 `0.1.0` 和 `0.1.1` 保持不变。 +本次交付版本为 `@astron-team/skillhub-dsh@0.2.1`,对应独立标签 `dsh-v0.2.1`。本节描述待发布版本;npm 上传、公开包完整性及发布后验收须分别确认。已发布的 `0.1.0`、`0.1.1` 和 `0.2.0` 保持不变。 -DSH 基线仍为 `0.2.0-rc.2`,Node 为 `>=24.2.0 <25`,沿用下述两组完整 Cordis 组合。新增能力已通过 Linux Host、真实浏览器和真实模型验收;本版的 Windows/macOS 原生 Host CI 结果需以最终发布提交为准。个人电脑桌面客户端、其他 DSH 发行版和 SaaS 实例未在本轮验收。 +DSH 基线仍为 `0.2.0-rc.2`,Node 为 `>=24.2.0 <25`,沿用下述两组完整 Cordis 组合。`0.2.0` 搜索安装状态已通过 Linux Host、真实浏览器和真实模型验收;本轮正式 SaaS 基线测试使用已发布 `0.2.0`,不调用模型。`0.2.1` 候选及平台 CI 结果以本轮实际验收为准,个人电脑桌面客户端和其他 DSH 发行版仍未验收。 -## 0.2.0 新增能力 +## 0.2.1 默认正式来源 + +- 未提供 `registryUrl` 时默认连接 `https://skill.xfyun.cn`;显式空串或仅空白仍断开,已有自定义实例继续使用原地址。 +- 默认值仅由 Host 配置 Schema 决定,不增加 Client 回退逻辑,不读取 CLI 配置或凭证;读取配置本身不发网络请求。 +- 已发布的 npm `0.2.0` 已在隔离 DSH 中连接正式来源完成固定旧版本安装、文件和指纹核验、安装状态识别与 DSH 发现。`0.2.1` 候选和公开包验收单独记录,不以旧版结果替代。 +- 日期格式等无法可靠排序的非 SemVer 版本继续按 `unknown-order` 阻断自动升级;固定版本首次安装通过不代表日期版本升级通过。本轮未调整版本比较或升级政策。 +- 评论接口返回 404 时按可选能力缺失/未知处理,安全审核返回 401 时按匿名拒绝处理;不新增登录或开放权限。本轮不调用模型。 + +## 0.2.0 已发布能力 - **搜索展示安装状态**:技能中心卡片与对话搜索结果按 Registry 来源、命名空间和技能标识匹配受管理安装记录,展示已安装版本及当前用户/当前可信项目范围。不把其他项目或其他来源的同名技能当作当前来源安装。 - **异常与未知状态**:区分文件缺失、元数据异常和无法核验,避免把读取失败当成未安装。没有当前来源记录不代表 DSH 中不存在手工或其他来源安装,也不代表实际启用状态。 @@ -44,7 +52,7 @@ DSH 基线仍为 `0.2.0-rc.2`,Node 为 `>=24.2.0 <25`,沿用下述两组完 ## 接口与配置 -配置字段为 `registryUrl`、`detailTabs.versions`、`detailTabs.securityAudit`、`detailTabs.reviews`。地址禁止包含凭证、查询参数或片段;默认留空,不预设公开实例;空值表示未配置。配置页“已配置”仅指保存状态,不表示连通成功。 +配置字段为 `registryUrl`、`detailTabs.versions`、`detailTabs.securityAudit`、`detailTabs.reviews`。地址禁止包含凭证、查询参数或片段;`0.2.1` 起缺省为 `https://skill.xfyun.cn`;显式空串或仅空白表示断开,自定义地址保留。配置页“已配置”仅指保存状态,不表示连通成功。 复用匿名目录、标签、搜索、resolve、元信息、固定版本说明/下载、版本及评论接口,没有新增服务端文件安装任务。安全审核保留匿名访问限制,不将无法读取显示为通过。SaaS 需同步实际路径、字段、公开策略和测试,不能用开源实例验收代替 SaaS 验收。详见 [Registry 契约](registry-api-contract.md) 和 [接口设计](interface-design.md)。 diff --git a/openspec/changes/add-dsh-native-plugin/specs/dsh-registry-connection/spec.md b/openspec/changes/add-dsh-native-plugin/specs/dsh-registry-connection/spec.md index 66e0d7c4b..2dc8a4f8b 100644 --- a/openspec/changes/add-dsh-native-plugin/specs/dsh-registry-connection/spec.md +++ b/openspec/changes/add-dsh-native-plugin/specs/dsh-registry-connection/spec.md @@ -1,5 +1,20 @@ ## ADDED Requirements +### Requirement: Official default with explicit source control +The plugin SHALL default an omitted registryUrl to https://skill.xfyun.cn using its Host configuration schema. An explicitly empty or whitespace-only value SHALL disconnect without fallback. Existing custom addresses SHALL remain selected. The plugin SHALL NOT inherit CLI source configuration or credentials, and initialization or reading source configuration alone SHALL NOT initiate Registry requests. + +#### Scenario: First installation or empty configuration object +- **WHEN** the plugin starts without configuration or with an empty configuration object +- **THEN** the selected Registry is https://skill.xfyun.cn and requests begin only through existing explicit read or user interface flows + +#### Scenario: Explicitly disconnected installation +- **WHEN** a new or existing configuration contains an empty or whitespace-only registryUrl +- **THEN** the source remains unconfigured and search is refused without contacting the official default + +#### Scenario: Existing custom source +- **WHEN** an existing configuration contains a custom Registry address +- **THEN** that source is preserved through upgrade with existing URL normalization and source-isolation behavior + ### Requirement: One anonymous Registry source The plugin SHALL connect to one configured SkillHub Registry using anonymous requests and SHALL NOT implement login, Token configuration, or credential reuse in this release. diff --git a/openspec/changes/add-dsh-native-plugin/tasks.md b/openspec/changes/add-dsh-native-plugin/tasks.md index e05664688..a366b6d41 100644 --- a/openspec/changes/add-dsh-native-plugin/tasks.md +++ b/openspec/changes/add-dsh-native-plugin/tasks.md @@ -224,3 +224,11 @@ - [x] 28.4 提供 SaaS Agent 交接 Prompt,区分服务端 HTTP 适配与本机安装状态识别,列出必需/可选接口及独立部署验收要求。 - [x] 28.5 候选包在隔离 Linux DSH 0.2.0-rc.2 中完成真实工具搜索、双范围安装、外源及异常状态检查、页面安装/升级/卸载后标记刷新、来源切换和重启历史重放;8 个阶段快照及 9 项宿主页面检查通过。探针说明见集成测试 README;SaaS、Windows/macOS Host 验收尚未执行。 - [x] 28.6 使用真实 astron-code-latest 完成搜索识别、明确项目安装及重新搜索复查,3 轮对话、6 次模型请求通过;跨项目记录未泄漏,真实安装文件和资源已核对,完整模型对话保留并经浏览器核验。仍使用本地市场数据,不扩大为真实 SaaS 或线上技能执行验收。 + + +## 29. 0.2.1 默认正式 Registry + +- [x] 29.1 使用公开 npm 0.2.0 对正式域名执行真实 DSH 固定版本安装,核验文件、fingerprint、inventory、搜索安装状态和 DSH 发现;9 项浏览器检查及真实卸载后的库存/搜索清空与发现消失通过,日期版升级按 unknown-order 阻断且文件不变。本轮不调用模型。 +- [x] 29.2 Host Schema 缺省为正式域名,保留显式空白断开和自定义来源;同步双语文档及连接契约。 +- [x] 29.3 配置边界测试、完整插件检查(299 项测试)、OpenSpec 校验及 0.2.1 干净候选默认来源验收通过(74 个文件一致、3 项浏览器检查);已有显式来源从 0.2.0 升级后的 11 个技能文件、metadata、inventory、历史会话逐字节保留及状态识别通过;空白保存后重启仍断开通过,自定义来源保存与重启保留以及页面连接测试通过。 +- [ ] 29.4 完成 PR、六组 CI、专用 npm 发布及公开 0.2.1 包核对和安装验收;保留既有技能与对话。 diff --git a/openspec/changes/add-dsh-native-plugin/verification.md b/openspec/changes/add-dsh-native-plugin/verification.md index 0930d8392..2fd9b9dc4 100644 --- a/openspec/changes/add-dsh-native-plugin/verification.md +++ b/openspec/changes/add-dsh-native-plugin/verification.md @@ -2,7 +2,19 @@ ## 1. 当前结论 -`@astron-team/skillhub-dsh@0.1.1` 已发布到 [npm](https://www.npmjs.com/package/@astron-team/skillhub-dsh),`latest` 指向 `0.1.1`。版本修复普通新装的 Cordis 依赖组合识别,以及 Host 重启后历史安装回执的当前库存核验和导航;默认 Registry 仍为空,DSH 主基线仍为 `0.2.0-rc.2`。 +`0.2.0` 已经通过 [PR #977](https://github.com/iflytek/skillhub/pull/977) 合并并发布。本轮准备 `0.2.1`,仅调整缺省来源为 `https://skill.xfyun.cn`;候选、CI、npm 发布与公开包验收各自记录,尚未完成的项目不视为通过。 + +2026-10-19 使用公开 npm `0.2.0` 的真实 Linux DSH 插件连接 `https://skill.xfyun.cn`,连接测试、目录、搜索、Markdown 和版本选择通过;选择 `global/scientella@20260724.052402` 实际安装到隔离项目,7 个文件及归档 fingerprint 一致,inventory 来源与目标正确,再搜索显示项目已安装旧版,DSH 发现成功。评论接口 404 按可选能力处理,安全审核 401 按匿名拒绝处理。本轮未调用模型,不据此声明技能实际执行或生产 Pod 已核验。该技能使用日期格式的非 SemVer 版本,版本比较返回 `blocked/unknown-order`,按既有策略不提供升级入口;不得把固定版本安装通过写成升级通过。升级阻断前后文件保持不变;真实卸载后 DSH 发现消失,inventory 与重新搜索的安装记录清空。公开 `0.2.0` 的正式来源基线共 9 项浏览器检查通过,无页面脚本异常。 + +`0.2.1` 本地构建、typecheck、lint、299 项测试(7158 次断言)及 OpenSpec 严格校验通过;配置测试覆盖缺省、空对象、显式空串/空白、自定义来源与初始化零网络请求。该结果不代替候选或公开包的真实 DSH 验收。 + +`0.2.1` 候选已通过官方安装器装入干净隔离 Profile,归档 SHA-256 为 `c80a9608d739e26d3ddeef42791e05645106e22895bf6039c3c4d493b539bc1a`,74 个交付文件逐字节一致。安装 patch 未设置 `registryUrl`,真实 Host 的 `getContext` 返回 `configured=true` 和正式域名;插件设置页默认输入与测试连接、目录与标签搜索、`scientella` Markdown 共 3 项浏览器检查通过。已有显式来源的升级保留通过:先用公开 `0.2.0` 安装 `scientella@20261017.164831`,再升级到 `0.2.1` 候选;11 个技能文件、metadata、inventory 及历史会话压缩文件逐字节保留,原 journal 为 completed,新搜索显示项目最新版本 present,DSH 发现正常,74 个候选文件再次核对一致。另在插件设置中显式保存空白后,真实 Host 返回 `configured=false`;重启后仍保留空白并保持断开。自定义来源保存、重启及页面连接测试也已通过;公开 `0.2.1` 包仍待发布后核验。 + +候选配置持久化实机补充:在真实设置页保存空地址后重启,输入仍为空且 Host `configured=false`;保存自定义本地 Registry 后重启,地址与 `configured=true` 保留,页面测试连接成功。测试后恢复正式来源以供预览。上述操作不修改已发布包,也不代替公开 `0.2.1` 的发布后核验。 + +### 0.1.1 历史结论 + +`@astron-team/skillhub-dsh@0.1.1` 已发布到 [npm](https://www.npmjs.com/package/@astron-team/skillhub-dsh),该版发布时 `latest` 指向 `0.1.1`。版本修复普通新装的 Cordis 依赖组合识别,以及 Host 重启后历史安装回执的当前库存核验和导航;默认 Registry 仍为空,DSH 主基线仍为 `0.2.0-rc.2`。 公开包已在全新、未设置 Cordis overrides 的隔离 Profile 中安装,并通过 15 项页面及重启验收。测试连接本地契约模拟市场,不调用模型;该结果不代表真实 Java 服务端、SaaS、其他 DSH 版本或个人电脑桌面客户端验收。三平台原生 Host CI 与 Linux 浏览器验收分别记录。 @@ -112,4 +124,4 @@ - 真实 DSH 页面完成 9 项检查:历史快照展示、当前市场状态、精确范围卸载后刷新、历史不随卸载变化、已安装旧版与市场新版区分、切换 Registry 后隔离并恢复、重启后的历史读取、重启后的市场状态、升级后版本刷新;没有浏览器运行错误。 - 可复现的包外 Host 探针与限制见 [实机探针说明](../../../plugins/dsh/test/integration/README.md#搜索结果中的本地安装状态)。原始报告和截图保留在仓库外。上述宿主及页面用例未调用模型,市场内容为本地 HTTP 夹具,不代表真实 SaaS 或线上市场验收;未重新验证该新增能力在 Windows/macOS Host 上的行为。 - 另在同一候选包上使用真实 `astron-code-latest` 完成 3 轮对话、6 次模型请求,真实调用搜索 → 项目安装 → 再搜索。首次正确识别已有用户级 `meeting/meeting-notes@1.3.0`,没有将其他项目的 `demo/document-helper` 记录归入新项目;实际安装后,重新搜索正确识别新增项目级 `demo/document-helper@1.3.0`。安装操作完成,元数据及资源文件核验通过,DSH 已发现技能;模型回复、工具结果和完整对话均持久保存,未手工构造模型消息。浏览器核对了首次/复查卡片与当前广场状态,未重放写入。模型测试仍使用本地模拟市场,不能据此声明 SaaS 或真实线上技能执行效果已验收。 -- 本次未提交、推送、发布 npm 或修改已发布包。正式发布仍需经过相应 PR、CI 与发布流程。 +- 上述为 `0.2.0` 发布前的功能验收;其后已合并 PR #977 并发布 `0.2.0`,不修改已发布包。 diff --git a/plugins/dsh/README.en.md b/plugins/dsh/README.en.md index d3f375396..360c0fad8 100644 --- a/plugins/dsh/README.en.md +++ b/plugins/dsh/README.en.md @@ -6,7 +6,9 @@ A native DSH plugin for anonymous skill browsing, conversation search and instal Version `0.2.0` adds source-aware installation status to catalog cards and conversation results, including recorded versions, user/project scopes and abnormal records. Conversation status is a query-time snapshot. No matching record does not exclude manual or other-source installations, and file presence does not prove DSH activation. Matching uses Registry source, namespace and slug; a same-named directory from another source is not claimed. -This version uses the independent `dsh-v0.2.0` release tag and retains the DSH dependency compatibility and historical receipt fixes from `0.1.1`. Until npm publication and public-package verification finish, validate this version using its built tarball. +Version `0.2.1` defaults to `https://skill.xfyun.cn` when `registryUrl` is omitted. An explicit empty or whitespace-only value still disconnects; existing custom addresses are preserved. CLI defaults and credentials are not inherited. + +This version uses the independent `dsh-v0.2.1` release tag and retains the DSH dependency compatibility and historical receipt fixes from `0.1.1`. Until npm publication and public-package verification finish, validate this version using its built tarball. ## Requirements and validation scope @@ -18,7 +20,7 @@ This version uses the independent `dsh-v0.2.0` release tag and retains the DSH d | Build package manager | Bun `1.3.13`, using frozen lockfiles | | UI | Chinese, DSH light/dark themes and narrow layouts | | Verified environments | Linux DSH Host/browser integration; Windows browser UI and interactions against a real Host | -| Pending validation | Real macOS Host/client; other DSH releases; SaaS instances | +| Pending validation | Real macOS Host/client; other DSH releases; real model execution of SaaS skills | Windows browser acceptance does not establish complete native Windows Host filesystem support. CI results do not replace desktop, model, or target-instance acceptance. See the repository's [compatibility design](../../openspec/changes/add-dsh-native-plugin/compatibility-design.md) and [acceptance criteria](../../openspec/changes/add-dsh-native-plugin/acceptance.md). @@ -56,14 +58,14 @@ Published `0.1.0` still requires the original Cordis `4.0.4` baseline and does n ## Install from npm -After `0.2.0` is published on npm, use these commands to install it. Check DSH, Node and a complete Cordis combination listed above, stop the target Web Profile Host, then install the exact version. Before publication, use the local candidate instructions below: +After `0.2.1` is published on npm, use these commands to install it. Check DSH, Node and a complete Cordis combination listed above, stop the target Web Profile Host, then install the exact version. Before publication, use the local candidate instructions below: ```sh -dsh plugin --profile skillhub-test add @astron-team/skillhub-dsh@0.2.0 --ignore-scripts +dsh plugin --profile skillhub-test add @astron-team/skillhub-dsh@0.2.1 --ignore-scripts dsh --profile skillhub-test --host 127.0.0.1 --port 0 --no-open ``` -Replace `skillhub-test` with the intended Web Profile; initial creation is documented below. The plugin has no default Registry URL: enter a source in plugin settings, test it and save it. Before publication, use a local candidate; failure to fetch an unpublished npm version does not indicate a plugin loading error. +Replace `skillhub-test` with the intended Web Profile; initial creation is documented below. When `registryUrl` is omitted, the plugin uses `https://skill.xfyun.cn`. To use a self-hosted instance, change, test and save the source in plugin settings. Explicitly saving an empty address disconnects. Before publication, use a local candidate; failure to fetch an unpublished npm version does not indicate a plugin loading error. ## Install a local candidate @@ -101,7 +103,7 @@ Open DSH **Plugins → @astron-team/skillhub-dsh → SkillHub 设置**. | Field | Meaning | | --- | --- | -| `registryUrl` | Registry base URL; empty means no default external source is contacted | +| `registryUrl` | Registry base URL; defaults to `https://skill.xfyun.cn` when omitted; explicit empty/whitespace disconnects without fallback; custom values are preserved | | `detailTabs.versions` | Version history visibility | | `detailTabs.securityAudit` | Security audit visibility | | `detailTabs.reviews` | Read-only review visibility | @@ -162,7 +164,7 @@ dsh plugin --profile skillhub-test remove @astron-team/skillhub-dsh ## Server synchronization and independent release -The plugin Host calls anonymous Registry HTTP APIs; local file transactions stay on the Host. SaaS does not need a new API that controls user filesystems. Define and verify contracts in open source first, then synchronize missing routes, fields, anonymous policy and tests to SaaS. SaaS acceptance remains pending. See the [Registry contract](../../openspec/changes/add-dsh-native-plugin/registry-api-contract.md). +The plugin Host calls anonymous Registry HTTP APIs; local file transactions stay on the Host. SaaS does not need a new API that controls user filesystems. Define and verify contracts in open source first, then synchronize missing routes, fields, anonymous policy and tests to SaaS. Public npm `0.2.0` has verified catalog, search, documentation, version selection and fixed-version project installation against `https://skill.xfyun.cn`, including files/fingerprint, inventory and DSH discovery. This candidate and its public package require separate acceptance. Non-SemVer versions with no reliable ordering, including date-based versions, remain blocked from automatic upgrades; no executable upgrade action is offered. Verified first-time fixed-version installation remains available. Real model execution of SaaS skills is unverified. See the [Registry contract](../../openspec/changes/add-dsh-native-plugin/registry-api-contract.md). The plugin uses independent `dsh-v` tags. `check-dsh-plugin.yml` runs normal clean-install checks on Linux/macOS/Windows × Node 24.2.0/current Node 24, plus an isolated retained-Cordis baseline regression. `release-dsh-plugin.yml` is manual and defaults to candidate-only operation. Publishing requires an approved version, publishable manifest, candidate acceptance and explicit release authorization; configured environment protection rules must also be satisfied. Version updates are explicit commits; npm publication uses the dedicated workflow after release authorization. diff --git a/plugins/dsh/README.md b/plugins/dsh/README.md index 048622817..43a6a989f 100644 --- a/plugins/dsh/README.md +++ b/plugins/dsh/README.md @@ -6,7 +6,9 @@ SkillHub 的 DSH 原生插件。在 DSH 侧栏打开 **技能中心**,匿名 `0.2.0` 新增来源可核验的搜索安装状态:广场卡片和对话工具可识别当前来源的受管理安装版本、用户/项目范围及异常记录;对话保留查询时快照。未发现本来源记录不代表其他市场或手工安装不存在,文件存在也不代表 DSH 已启用该技能。按来源、命名空间和技能标识匹配;不按同名目录认领其他来源技能。 -本版使用独立发布标签 `dsh-v0.2.0`,保留 `0.1.1` 的 DSH 依赖兼容性与历史安装回执修复。npm 发布及公开包验收完成前,使用本版本构建的 tarball 验证。 +`0.2.1` 缺省连接 `https://skill.xfyun.cn`;显式空串或仅空白仍表示断开,已有自定义地址保留。插件不继承 CLI 的默认地址或凭证。 + +本版使用独立发布标签 `dsh-v0.2.1`,保留 `0.1.1` 的 DSH 依赖兼容性与历史安装回执修复。npm 发布及公开包验收完成前,使用本版本构建的 tarball 验证。 ## 环境与验证范围 @@ -18,7 +20,7 @@ SkillHub 的 DSH 原生插件。在 DSH 侧栏打开 **技能中心**,匿名 | 开发包管理器 | Bun `1.3.13`,按锁文件安装 | | 当前 UI | 中文;支持 DSH 深浅主题和窄屏 | | 已验证环境 | Linux DSH Host 与浏览器集成;Windows 浏览器访问真实 Host 的界面和交互 | -| 待验证范围 | macOS 真实 Host/客户端;其他 DSH 发行版;SaaS 实例接入 | +| 待验证范围 | macOS 真实 Host/客户端;其他 DSH 发行版;SaaS 技能的真实模型执行 | Windows 浏览器验证不等于 Windows 原生 Host 的全部文件操作已经验证。CI 的平台矩阵也不替代真实桌面、模型及目标实例验收。完整支持边界见仓库内的 [兼容设计](../../openspec/changes/add-dsh-native-plugin/compatibility-design.md) 和 [验收标准](../../openspec/changes/add-dsh-native-plugin/acceptance.md)。 @@ -56,14 +58,14 @@ npm pack --ignore-scripts --pack-destination /absolute/path/to/candidate-output ## 从 npm 安装 -`0.2.0` 在 npm 发布完成后,使用以下命令安装。先确认 DSH、Node 和上表完整 Cordis 组合满足要求,停止目标 Web Profile 的 Host,然后安装精确版本。发布完成前使用下一节的本地候选包: +`0.2.1` 在 npm 发布完成后,使用以下命令安装。先确认 DSH、Node 和上表完整 Cordis 组合满足要求,停止目标 Web Profile 的 Host,然后安装精确版本。发布完成前使用下一节的本地候选包: ```sh -dsh plugin --profile skillhub-test add @astron-team/skillhub-dsh@0.2.0 --ignore-scripts +dsh plugin --profile skillhub-test add @astron-team/skillhub-dsh@0.2.1 --ignore-scripts dsh --profile skillhub-test --host 127.0.0.1 --port 0 --no-open ``` -`skillhub-test` 替换为实际 Web Profile;首次创建方法见下一节。插件默认没有 Registry 地址,首次使用需在插件设置中填写来源并测试、保存。发布前请使用本地候选包验收,不要将未发布版本的 npm 安装失败当成插件加载失败。 +`skillhub-test` 替换为实际 Web Profile;首次创建方法见下一节。未配置 `registryUrl` 时默认使用 `https://skill.xfyun.cn`。如需自建实例,在插件设置中修改来源并测试、保存;显式保存空地址可断开。发布前请使用本地候选包验收,不要将未发布版本的 npm 安装失败当成插件加载失败。 ## 安装本地候选包 @@ -101,7 +103,7 @@ Loader entry ID 为 `astron-skillhub`;`skillhub` 是 Host/Remote 服务名。 | 字段 | 行为 | | --- | --- | -| `registryUrl` | Registry 基础地址;留空时不请求默认外部实例 | +| `registryUrl` | Registry 基础地址;缺省为 `https://skill.xfyun.cn`;显式空串或仅空白断开,不回退;自定义值保留 | | `detailTabs.versions` | 版本历史显示策略 | | `detailTabs.securityAudit` | 安全审核显示策略 | | `detailTabs.reviews` | 只读评论显示策略 | @@ -162,7 +164,7 @@ dsh plugin --profile skillhub-test remove @astron-team/skillhub-dsh ## 服务端同步与发布 -插件 Host 调用匿名 Registry HTTP API;本地安装事务在 Host 内完成,不需要 SaaS 新增操作用户文件系统的安装接口。开源先定义和验证契约,再将缺失的路径、字段、匿名策略和测试同步到 SaaS。当前未声明 SaaS 已通过验收。详细要求见 [Registry 契约](../../openspec/changes/add-dsh-native-plugin/registry-api-contract.md)。 +插件 Host 调用匿名 Registry HTTP API;本地安装事务在 Host 内完成,不需要 SaaS 新增操作用户文件系统的安装接口。开源先定义和验证契约,再将缺失的路径、字段、匿名策略和测试同步到 SaaS。公开 npm `0.2.0` 已对 `https://skill.xfyun.cn` 完成目录、搜索、文档、版本选择和固定版本项目安装及文件/指纹、库存、DSH 发现核验;本版候选和公开包须独立验收。日期格式等无法可靠排序的非 SemVer 版本继续阻断自动升级,不显示可执行升级入口;这不影响已验证的固定版本首次安装。SaaS 技能的真实模型执行尚未验收。详细要求见 [Registry 契约](../../openspec/changes/add-dsh-native-plugin/registry-api-contract.md)。 插件独立使用 `dsh-v` tag,不复用 CLI 或服务镜像发布。`check-dsh-plugin.yml` 配置 Linux/macOS/Windows × Node 24.2.0/当前 Node 24 的普通干净安装检查,并额外保留旧 Cordis 组合的隔离 Host 回归;`release-dsh-plugin.yml` 手动触发,默认只产出候选包。发布需正式版本、可发布 manifest、候选验收及明确发布授权;配置了环境保护规则时还须完成相应审批。版本更新需显式提交,npm 发布需明确授权后运行专用工作流。 diff --git a/plugins/dsh/package.json b/plugins/dsh/package.json index bb2ebea62..dc8ba404d 100644 --- a/plugins/dsh/package.json +++ b/plugins/dsh/package.json @@ -1,6 +1,6 @@ { "name": "@astron-team/skillhub-dsh", - "version": "0.2.0", + "version": "0.2.1", "private": false, "type": "module", "license": "Apache-2.0", diff --git a/plugins/dsh/src/host/config.ts b/plugins/dsh/src/host/config.ts index 77d65ff61..2a03bc58e 100644 --- a/plugins/dsh/src/host/config.ts +++ b/plugins/dsh/src/host/config.ts @@ -1,7 +1,7 @@ import Schema from '@deepseek-ai/schemastery'; export const Config = Schema.object({ - registryUrl: Schema.string().default('').description('SkillHub Registry base URL; empty leaves the source unconfigured.'), + registryUrl: Schema.string().default('https://skill.xfyun.cn').description('SkillHub Registry base URL; defaults to https://skill.xfyun.cn; an explicit empty value disconnects the source.'), detailTabs: Schema.object({ versions: Schema.union(['auto', 'show', 'hide']).default('auto'), securityAudit: Schema.union(['auto', 'show', 'hide']).default('auto'), diff --git a/plugins/dsh/test/catalog-service.test.ts b/plugins/dsh/test/catalog-service.test.ts index d35e1a30c..c11952aeb 100644 --- a/plugins/dsh/test/catalog-service.test.ts +++ b/plugins/dsh/test/catalog-service.test.ts @@ -1,9 +1,40 @@ -import { describe, expect, test } from 'bun:test'; +import { describe, expect, spyOn, test } from 'bun:test'; import { Context } from '@deepseek-ai/cordis'; import SkillHubService from '@astron-team/skillhub-dsh'; +import { Config } from '../src/host/config.ts'; import type { TabMode } from '../src/host/types.ts'; describe('native catalog service', () => { + test.each([undefined, {}])('missing Registry uses the official default without fetching (%j)', async configuration => { + const fetchSpy = spyOn(globalThis, 'fetch').mockImplementation(Object.assign( + () => { throw new Error('Unexpected network request.'); }, { preconnect: fetch.preconnect })); + const ctx = new Context(); + const fiber = ctx.plugin(SkillHubService, configuration); + try { + await fiber; + expect(Config(configuration).get()).toMatchObject({ registryUrl: 'https://skill.xfyun.cn' }); + expect(ctx.skillhub.getContext()).toMatchObject({ + configured: true, registryUrl: 'https://skill.xfyun.cn', + detailTabs: { versions: 'auto', securityAudit: 'auto', reviews: 'auto' }, + }); + expect(fetchSpy).not.toHaveBeenCalled(); + } finally { await fiber.dispose(); fetchSpy.mockRestore(); } + }); + + test('explicit custom Registry survives schema resolution and Host initialization without fetching', async () => { + const fetchSpy = spyOn(globalThis, 'fetch').mockImplementation(Object.assign( + () => { throw new Error('Unexpected network request.'); }, { preconnect: fetch.preconnect })); + const registryUrl = 'https://registry.example/team'; + const ctx = new Context(); + const fiber = ctx.plugin(SkillHubService, { registryUrl }); + try { + await fiber; + expect(Config({ registryUrl }).get().registryUrl).toBe(registryUrl); + expect(ctx.skillhub.getContext()).toMatchObject({ configured: true, registryUrl }); + expect(fetchSpy).not.toHaveBeenCalled(); + } finally { await fiber.dispose(); fetchSpy.mockRestore(); } + }); + test('detail pins both requests to the selected version and does not expose download addresses', async () => { const paths: string[] = []; const server = Bun.serve({ hostname: '127.0.0.1', port: 0, fetch(request) { @@ -122,9 +153,9 @@ describe('native catalog service', () => { } finally { await fiber.dispose(); } }); - test('unconfigured source has explicit defaults and refuses search', async () => { + test.each(['', ' '])('explicit blank source %j disconnects and refuses search', async registryUrl => { const ctx = new Context(); - const fiber = ctx.plugin(SkillHubService); + const fiber = ctx.plugin(SkillHubService, { registryUrl }); await fiber; try { const context = ctx.skillhub.getContext();