Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.1.0-alpha.5.dsh.0.2.1.rc.3 (prepared)

- Replace the stale rc.2 Desktop lifecycle heading with version-neutral guidance. Recommend a full exit and restart only when the native plugin manager reports `restart-required`; do not repeatedly toggle an Off plugin when the manager reports only pending service dependencies.
- Keep historical rc.2 Desktop observations distinct from current rc.3 synthetic Loader evidence, and synchronize the English/Chinese README and user-visible copy regressions (#453).
- Prepare same-Core alpha.5 metadata only. The rc.3 release mapping remains pending; no tag, GitHub Release, npm publication, profile installation or Desktop restart is included.

## 0.1.0-alpha.4.dsh.0.2.1.rc.3 (prepared)

- Carry forward bounded Responses replay refusal diagnostics from retired draft #218 under #446: fixed reasons, zero-based input positions, allowlisted type/status and field-presence booleans through the existing native `INVALID_REQUEST` surface. No IDs, summaries, tool data, unknown values or encrypted bytes enter diagnostics.
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

GitHub Copilot account discovery, contextual Auto routing and hosted search for DSH. The plugin reuses DSH's published native adapter, retaining a profile-wide account default with independent Session next-turn choices; it does not patch Core or maintain a second model catalog.

**Historical stable release: [`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1); pending DSH rc.3 update: `0.1.0-alpha.4.dsh.0.2.1.rc.3`.** DSH `0.2.1-rc.3` is a prerelease. This plugin line is a compatibility candidate, not a production Core upgrade recommendation; Desktop artifacts/signatures are unverified. Each exact DSH Core version starts an independent plugin sequence at `0.1.0-alpha.1.dsh.<Core>`; same-Core fixes increment `alpha.N`. The suffix normalizes Core `0.2.1-rc.3` to `dsh.0.2.1.rc.3`, but compatibility is validated against explicit metadata, not guessed from the name. Existing published versions/tags remain unchanged. Published, installed and loaded states remain separate.
**Historical stable release: [`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1); prepared, unreleased DSH rc.3 metadata candidate: `0.1.0-alpha.5.dsh.0.2.1.rc.3`.** This PR prepares version metadata only; the alpha.5 GitHub Release and npm package have not been published. Do not use the alpha.5 install commands until both publication channels are verified. DSH `0.2.1-rc.3` is a prerelease. This plugin line is a compatibility candidate, not a production Core upgrade recommendation; Desktop artifacts/signatures are unverified. Each exact DSH Core version starts an independent plugin sequence at `0.1.0-alpha.1.dsh.<Core>`; same-Core fixes increment `alpha.N`. The suffix normalizes Core `0.2.1-rc.3` to `dsh.0.2.1.rc.3`, but compatibility is validated against explicit metadata, not guessed from the name. Existing published versions/tags remain unchanged. Published, installed and loaded states remain separate.

Select by **exact Core**, never global SemVer maximum or npm `latest`/`alpha`.
The read-only `node scripts/select-core-release.mjs 0.2.0-rc.2` command checks
Expand Down Expand Up @@ -171,7 +171,7 @@ separately.
For a **standalone named profile**:

```sh
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.4.dsh.0.2.1.rc.3/dsh-github-copilot-0.1.0-alpha.4.dsh.0.2.1.rc.3.tgz
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.5.dsh.0.2.1.rc.3/dsh-github-copilot-0.1.0-alpha.5.dsh.0.2.1.rc.3.tgz
```

The command above is a prepared-release example, usable only after publication and required CI qualification; it requires official DSH prerelease `0.2.1-rc.3`. **Do not install this candidate into production Desktop profiles.** Desktop artifacts/signatures and profile peer composition remain unverified; retain the existing compatible plugin on rc.2. The [historical rc.2 bundled-CLI qualification](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2) does not qualify rc.3, and a generic/global `dsh` shim is not equivalent. No installation or restart is authorized.
Expand All @@ -198,7 +198,7 @@ Saved account names can load without activating the account. Names are cached fo

Account-management metadata and identity reads have a fifteen-second Client deadline instead of indefinite Checking. An initial read failure offers metadata-only **Retry**; late results are ignored. This does not cancel Host work, retry automatically or unlock an unresolved account mutation.

**Desktop lifecycle:** the current rc.3 public-Loader fixture preserves active Web consumers on a single-step add, but staged add and remove/re-add can leave the global `web` service unavailable and dependent account integration inactive. No feature-equivalent plugin-only recovery API is currently available; [issue #371](https://github.com/cloga/dsh-github-copilot/issues/371) remains open. An in-place upgrade without native HMR is explicitly `restart-required`; honor that manager result. The synthetic fixture does not justify repeated toggles or a restart when the manager has not requested one. See the [rc.3 lifecycle evidence](./docs/web-lifecycle-rc2.md).
**Desktop lifecycle:** the current rc.3 public-Loader fixture preserves active Web consumers on a single-step add, but staged add and remove/re-add can leave the global `web` service unavailable and dependent account integration inactive. No feature-equivalent plugin-only recovery API is currently available; [issue #371](https://github.com/cloga/dsh-github-copilot/issues/371) remains open. An in-place upgrade without native HMR is explicitly `restart-required`; honor that manager result. The synthetic fixture does not justify repeated toggles or a restart when the manager has not requested one. The card's **Desktop plugin lifecycle** note is general guidance, not detection of your Desktop version or a restart requirement. See [Desktop guidance and version-scoped lifecycle evidence](./docs/web-lifecycle-rc2.md#desktop-guidance); the rc.2 filename is retained for link stability, not current-host identification.

## Auto and model preferences

Expand Down Expand Up @@ -387,14 +387,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
GitHub Releases and npm distribute the same original verified tarball. Pin a version; verify Release SHA-256 or npm `dist.integrity`. Never repack an immutable release or move/reuse its tag.

```sh
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.4.dsh.0.2.1.rc.3/dsh-github-copilot-0.1.0-alpha.4.dsh.0.2.1.rc.3.tgz
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.4.dsh.0.2.1.rc.3/SHA256SUMS
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.5.dsh.0.2.1.rc.3/dsh-github-copilot-0.1.0-alpha.5.dsh.0.2.1.rc.3.tgz
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.5.dsh.0.2.1.rc.3/SHA256SUMS
sha256sum --check SHA256SUMS
```

```powershell
$expected = (Get-Content .\SHA256SUMS).Split()[0]
$actual = (Get-FileHash .\dsh-github-copilot-0.1.0-alpha.4.dsh.0.2.1.rc.3.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
$actual = (Get-FileHash .\dsh-github-copilot-0.1.0-alpha.5.dsh.0.2.1.rc.3.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
```

Expand Down
12 changes: 6 additions & 6 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

为 DSH 提供 GitHub Copilot 账号模型发现、上下文 Auto 选模和 hosted search。插件复用 DSH 公开的原生适配器,保留 profile 全局默认账号,并支持 Session 后续 turn 指定独立账号;不修改 Core,也不维护第二套模型目录。

**历史稳定版:[`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1);DSH rc.3 更新候选:`0.1.0-alpha.4.dsh.0.2.1.rc.3`。** DSH `0.2.1-rc.3` 是预发布版本。本插件线是兼容性候选,不是生产 Core 升级建议;Desktop 制品/签名尚未核验。每个精确 DSH Core 版本都从独立插件序列 `0.1.0-alpha.1.dsh.<Core>` 开始;同一 Core 内修复递增 `alpha.N`。后缀将 Core `0.2.1-rc.3` 规范化为 `dsh.0.2.1.rc.3`,但兼容性仍须核对明确元数据,不能只猜版本名。既有已发布版本和 tag 不变。已发布、已安装、已加载仍是不同状态。
**历史稳定版:[`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1);已准备但未发布的 DSH rc.3 元数据候选:`0.1.0-alpha.5.dsh.0.2.1.rc.3`。** 本 PR 仅准备版本元数据;alpha.5 的 GitHub Release 和 npm 包尚未发布。两种发布渠道核验完成前,请勿使用 alpha.5 安装命令。DSH `0.2.1-rc.3` 是预发布版本。本插件线是兼容性候选,不是生产 Core 升级建议;Desktop 制品/签名尚未核验。每个精确 DSH Core 版本都从独立插件序列 `0.1.0-alpha.1.dsh.<Core>` 开始;同一 Core 内修复递增 `alpha.N`。后缀将 Core `0.2.1-rc.3` 规范化为 `dsh.0.2.1.rc.3`,但兼容性仍须核对明确元数据,不能只猜版本名。既有已发布版本和 tag 不变。已发布、已安装、已加载仍是不同状态。

按**精确 Core**选版本,不按全局 SemVer 最大值或 npm `latest`/`alpha`。
只读命令 `node scripts/select-core-release.mjs 0.2.0-rc.2` 先读取
Expand Down Expand Up @@ -143,7 +143,7 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
**独立具名 profile**:

```sh
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.4.dsh.0.2.1.rc.3/dsh-github-copilot-0.1.0-alpha.4.dsh.0.2.1.rc.3.tgz
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.5.dsh.0.2.1.rc.3/dsh-github-copilot-0.1.0-alpha.5.dsh.0.2.1.rc.3.tgz
```

上面的命令是准备发布的示例,仅在发布且所需 CI 通过后可用;目标是官方 DSH 预发布版 `0.2.1-rc.3`。**不要把此候选安装到生产 Desktop profile。** Desktop 制品/签名及 profile peer 组合仍未核验;rc.2 应保留现有兼容插件。[历史 rc.2 随附 CLI 核验](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2)不代表 rc.3 验收;全局/普通 `dsh` shim 不等价。本次不授权安装或重启。
Expand All @@ -170,7 +170,7 @@ Desktop 原生包管理器和已核验的随附 CLI 都有 profile 边界。

账号管理的元数据和身份读取使用 15 秒 Client 展示期限,避免无限 Checking。首次读取失败提供只读元数据**重试**;迟到结果不会覆盖新状态。不取消 Host 工作、不自动重试,也不会解锁尚未完成的账号修改操作。

**Desktop 生命周期:**当前 rc.3 公共 Loader 测试中,单步添加可保留正在使用的 Web 消费者;但分阶段添加或移除后重新添加,可能导致全局 `web` 服务不可用及依赖它的账号集成无法启动。目前没有功能等价的插件侧恢复 API;[#371](https://github.com/cloga/dsh-github-copilot/issues/371) 仍保持开放。没有原生 HMR 时,原生管理器会明确返回 `restart-required`;应遵循该结果。合成测试本身不构成反复切换或重启的依据。参见 [rc.3 生命周期证据](./docs/web-lifecycle-rc2.md)。
**Desktop 生命周期:**当前 rc.3 公共 Loader 测试中,单步添加可保留正在使用的 Web 消费者;但分阶段添加或移除后重新添加,可能导致全局 `web` 服务不可用及依赖它的账号集成无法启动。目前没有功能等价的插件侧恢复 API;[#371](https://github.com/cloga/dsh-github-copilot/issues/371) 仍保持开放。没有原生 HMR 时,原生管理器会明确返回 `restart-required`;应遵循该结果。合成测试本身不构成反复切换或重启的依据。卡片中的 **Desktop 插件生命周期**仅为通用指导,不检测当前 Desktop 版本或是否需要重启。参见 [Desktop 指导与按版本区分的生命周期证据](./docs/web-lifecycle-rc2.md#desktop-guidance);保留 rc.2 文件名是为了链接稳定,不代表当前宿主版本。

## Auto 与模型偏好

Expand Down Expand Up @@ -354,14 +354,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。

```sh
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.4.dsh.0.2.1.rc.3/dsh-github-copilot-0.1.0-alpha.4.dsh.0.2.1.rc.3.tgz
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.4.dsh.0.2.1.rc.3/SHA256SUMS
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.5.dsh.0.2.1.rc.3/dsh-github-copilot-0.1.0-alpha.5.dsh.0.2.1.rc.3.tgz
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.5.dsh.0.2.1.rc.3/SHA256SUMS
sha256sum --check SHA256SUMS
```

```powershell
$expected = (Get-Content .\SHA256SUMS).Split()[0]
$actual = (Get-FileHash .\dsh-github-copilot-0.1.0-alpha.4.dsh.0.2.1.rc.3.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
$actual = (Get-FileHash .\dsh-github-copilot-0.1.0-alpha.5.dsh.0.2.1.rc.3.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
```

Expand Down
4 changes: 2 additions & 2 deletions deployment-baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
},
"package": {
"name": "dsh-github-copilot",
"version": "0.1.0-alpha.4.dsh.0.2.1.rc.3"
"version": "0.1.0-alpha.5.dsh.0.2.1.rc.3"
},
"releaseLines": [
{ "core": "0.2.0-rc.2", "version": "0.4.2-alpha.15", "status": "published" },
{ "core": "0.2.1-alpha.4", "version": "0.4.2-alpha.16", "status": "published" },
{ "core": "0.2.1-alpha.5", "version": "0.1.0-alpha.2.dsh.0.2.1.alpha.5", "status": "published" },
{ "core": "0.2.1-rc.3", "version": "0.1.0-alpha.4.dsh.0.2.1.rc.3", "status": "pending" }
{ "core": "0.2.1-rc.3", "version": "0.1.0-alpha.5.dsh.0.2.1.rc.3", "status": "pending" }
],
"evidence": {
"kind": "source-and-synthetic-test-inventory",
Expand Down
8 changes: 8 additions & 0 deletions docs/web-lifecycle-rc2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

This keeps the existing rc.2 documentation path for link stability, but updates its contents to the repository's current supported Core, DSH `0.2.1-rc.3`. It exercises the exact published Loader/Web packages and plugin bundle through public APIs. The synthetic fixture makes no network calls and removes its temporary files and Loader fibers. It does not exercise the native Desktop package manager or claim the observed account-status incident was caused by any one internal transition. Earlier rc.2 findings are historical; the rc.3 test results below are authoritative for the current plugin line.

## Desktop guidance

The Web search card uses the version-neutral heading **Desktop plugin lifecycle**. This is general guidance: it does not detect the installed Desktop version or whether a restart is required.

If the native plugin manager explicitly reports `restart-required` after a plugin change, fully exit Desktop (including its tray/background process) and launch it again. This is not a blanket instruction to restart after every disable, removal or upgrade, and it does not promise that a restart fixes every activation error.

If the plugin is already **Off** and the manager shows only pending entries waiting for a service, do not repeatedly toggle it as a recovery attempt. The rc.2 disable observation below is historical context, not a diagnosis of the current host; the rc.3 synthetic transitions are separately scoped evidence. Other activation errors and mixed diagnostics require their own investigation.

## Reproduce

From the repository root, after the normal build:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dsh-github-copilot",
"description": "DSH companion for GitHub Copilot sign-in, account-aware model profiles, tool compatibility, and provider-hosted search.",
"version": "0.1.0-alpha.4.dsh.0.2.1.rc.3",
"version": "0.1.0-alpha.5.dsh.0.2.1.rc.3",
"releaseNotes": "CHANGELOG.md",
"publishConfig": {
"access": "public",
Expand Down
4 changes: 2 additions & 2 deletions src/web-search-routing-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,9 @@ export function WebSearchRoutingCard(props: SearchRoutingCardProps): ReactElemen
'data-copilot-native-ui': true, 'aria-busy': loading || saving !== undefined },
createElement('style', null, nativeSettingsCss),
createElement('div', { role: 'note', style: lifecycleNoticeStyle, 'data-dsh-web-search-lifecycle-notice': true },
createElement('strong', { style: { fontWeight: 500 } }, 'Desktop 0.2.0-rc.2 lifecycle note / Desktop 0.2.0-rc.2 生命周期提示'),
createElement('strong', { style: { fontWeight: 500 } }, 'Desktop plugin lifecycle / Desktop 插件生命周期'),
createElement('span', { style: { opacity: 0.85 } },
'After disabling, removing, or upgrading this plugin, fully exit and restart Desktop to complete Web service recomposition. If the native manager shows only pending entries waiting for a service and this plugin is Off, restart instead of toggling it repeatedly. / 停用、移除或升级本插件后,请完全退出并重新启动 Desktop,以完成 Web 服务重编排。若原生管理器仅显示等待某项服务的 pending 条目且本插件已为 Off,请直接重启,不要反复切换。'),
'If the plugin manager reports restart-required after a plugin change, fully exit and restart Desktop. If this plugin is Off and the manager shows only pending entries waiting for a service, do not toggle it repeatedly. This note does not detect your Desktop version or a restart requirement. / 插件变更后,若插件管理器提示 restart-required,请完全退出并重新启动 Desktop。若本插件已为 Off 且管理器仅显示等待某项服务的 pending 条目,请勿反复切换。本提示不检测 Desktop 版本或是否需要重启。'),
),
restartRequired ? createElement('div', { role: 'alert', style: restartBannerStyle, 'data-dsh-web-search-restart-banner': true },
createElement('strong', { style: { fontWeight: 500 } }, 'Restart required to complete update / 检测到更新,请重启 Desktop 完成生效'),
Expand Down
32 changes: 32 additions & 0 deletions tests/scripts/web-lifecycle-copy.test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import assert from 'node:assert/strict'
import { readFile } from 'node:fs/promises'
import { test } from 'node:test'

const source = await readFile(new URL('../../src/web-search-routing-card.ts', import.meta.url), 'utf8')
const notice = source.slice(source.indexOf("createElement('div', { role: 'note', style: lifecycleNoticeStyle"),
source.indexOf("restartRequired ? createElement"))

test('lifecycle notice is version-neutral, conditional guidance rather than runtime detection', () => {
assert.ok(notice.length > 0)
assert.match(notice, /Desktop plugin lifecycle \/ Desktop 插件生命周期/)
assert.match(notice, /If the plugin manager reports restart-required/)
assert.match(notice, /fully exit and restart Desktop/)
assert.match(notice, /do not toggle it repeatedly/)
assert.match(notice, /This note does not detect your Desktop version or a restart requirement/)
assert.match(notice, /若插件管理器提示 restart-required/)
assert.match(notice, /请完全退出并重新启动 Desktop/)
assert.match(notice, /本提示不检测 Desktop 版本或是否需要重启/)
assert.doesNotMatch(notice, /Desktop \d|After disabling, removing, or upgrading this plugin/)
})

test('README guidance links retain the stable evidence path and separate historical observations', async () => {
for (const name of ['README.md', 'README.zh.md']) {
const readme = await readFile(new URL(`../../${name}`, import.meta.url), 'utf8')
assert.match(readme, /\.\/docs\/web-lifecycle-rc2\.md#desktop-guidance/)
}
const evidence = await readFile(new URL('../../docs/web-lifecycle-rc2.md', import.meta.url), 'utf8')
assert.match(evidence, /## Desktop guidance/)
assert.match(evidence, /## Historical rc\.2 Desktop disable observation/)
assert.match(evidence, /does not detect the installed Desktop version/)
assert.match(evidence, /not a blanket instruction to restart after every disable, removal or upgrade/)
})
Loading
Loading