dsh-github-copilot 0.1.0-alpha.3.dsh.0.2.1.rc.3 → 0.1.0-alpha.4.dsh.0.2.1.rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +68 -4
- package/CHANGELOG.md +6 -0
- package/README.md +16 -5
- package/README.zh.md +13 -5
- package/deployment-baseline.json +2 -2
- package/docs/model-compatibility-acceptance.md +16 -0
- package/lib/client.js +1 -1
- package/lib/index.js +71 -11
- package/lib/types/responses-replay-compat.d.ts +21 -1
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -22,7 +22,7 @@ This repository follows a **plugin-only** policy: implement fixes in `dsh-github
|
|
|
22
22
|
2. Read this file, then `node scripts/agent.mjs describe --json`. `agent-contract.json` maps each task to its owning files, focused tests, risks and approval boundaries; package scripts and release URLs are derived from current metadata.
|
|
23
23
|
3. Run `node scripts/agent.mjs doctor --json` before install. It is a dependency-free, read-only repository preflight: exit 0 means preflight passed, 1 means prerequisites missing, 2 means invalid arguments/metadata. Build presence is not build freshness, and no live DSH or credential readiness is claimed.
|
|
24
24
|
4. Choose a task with `node scripts/agent.mjs plan models --json` (or authorization/search/client/compatibility/tooling/release). Output is an unexecuted argv plan, never implicit permission to run destructive operations.
|
|
25
|
-
5. Use Node 24 LTS for development and the exact pnpm version in `package.json`; the runtime dependency floor is Node 22.19.0.
|
|
25
|
+
5. Use Node 24 LTS for development and the exact pnpm version in `package.json`; the runtime dependency floor is Node 22.19.0. Select the execution environment and task explicitly with `node scripts/agent.mjs guard`. Local auxiliary checks are limited to the guarded dependency-free script tests; dependency installation and full verification belong to GitHub Actions. Do not retry local dependency restoration, change registries, or treat local reports/idle sessions as CI evidence. The guard applies only to operations routed through it; it cannot prevent direct shell bypass.
|
|
26
26
|
6. Create/reuse a tracking issue and feature branch, implement a regression first, run the full gate, inspect the diff, and open a PR. For requested delivery, merge after required review/CI and branch protection without a separate approval prompt, unless the user limits scope. Important updates continue through the release-delivery rule below. Live-profile install and worktree checkout still require explicit user approval.
|
|
27
27
|
|
|
28
28
|
Use native DSH tools for goals, background jobs and scoped subagents. Use local Git and the GitHub REST API for delivery; no external orchestration daemon, roster or `vcs_*` tool is required. Do not assume a model provider's identity is the assisting agent.
|
|
@@ -317,6 +317,60 @@ Desktop plugin upgrades do not necessarily reconcile profile-local copies of Hos
|
|
|
317
317
|
|
|
318
318
|
## Mechanical verification
|
|
319
319
|
|
|
320
|
+
When a task explicitly requires post-upgrade Desktop/UI acceptance, use acceptance
|
|
321
|
+
contract/report schema 2 described in `docs/agent-acceptance.md`. Exact-head CI
|
|
322
|
+
and installed-on-disk evidence cannot replace live behavior or the public loaded
|
|
323
|
+
plugin version. Attempt safe authorized checks on an already-running Desktop;
|
|
324
|
+
unreliable local npm is not a reason to skip them. Use existing computer-use
|
|
325
|
+
tools, never shell activation or a repository script as an App controller.
|
|
326
|
+
Begin with current app discovery, not a historical "already open" claim. If not
|
|
327
|
+
running, start only with explicit launch authorization via controlled `start_app`
|
|
328
|
+
using the exact approved target; then verify discovery and fresh UI, not merely
|
|
329
|
+
the launch receipt. Do not start an already-running app again. A welcome screen
|
|
330
|
+
is not automatically an auth blocker: inspect an official safe skip first. DSH's
|
|
331
|
+
Add API Key -> Set up later path does not submit/store a key or authenticate;
|
|
332
|
+
use it only when actually exposed, within tool permission rules. Never infer
|
|
333
|
+
Copilot account invalidity from welcome UI or bypass real authentication/warnings.
|
|
334
|
+
Welcome dismissal may replace the window: rediscover app/window and read its fresh
|
|
335
|
+
tree before acting, rather than retrying a stale window on an empty immediate diff.
|
|
336
|
+
Honor user-input interruption: reread UI before retrying the same permitted action.
|
|
337
|
+
Before handoff, freshly discover the current app and inspect the target panel or
|
|
338
|
+
workspace, reporting the observation time only; past success does not establish
|
|
339
|
+
current running state or guarantee the app remains running later.
|
|
340
|
+
An action receipt or empty immediate diff is not a navigation failure: obtain
|
|
341
|
+
a fresh post-action `get_window_state` observation first. Keep one attempt per
|
|
342
|
+
supported navigation method, at most two different methods, then report precise
|
|
343
|
+
`automation-blocked` and request the named panel once. User absence or an
|
|
344
|
+
unanswered request never grants permission or proves the panel opened.
|
|
345
|
+
App unavailable, restart/install, account/OAuth/paid actions outside explicit
|
|
346
|
+
permission stay blocked. Do not repeat exhausted methods on ordinary continuation.
|
|
347
|
+
Record only fixed action/outcome codes, numeric times and version/source facts;
|
|
348
|
+
never upload identities, credentials or conversation content. Unknown loaded
|
|
349
|
+
version permits qualified observations only, not a version-specific fix claim.
|
|
350
|
+
For formal upgrade acceptance, prefer the published exact-version GitHub Release
|
|
351
|
+
asset canonical URL, never a local source directory, build, link or worktree.
|
|
352
|
+
A downloaded official tgz is a verified GitHub cache, not a local build; use it
|
|
353
|
+
only as a documented fallback when native URL delivery is unavailable/rejected.
|
|
354
|
+
Record exact source URL/version, archive and Release SHA-256, numeric observation
|
|
355
|
+
time and fixed fallback reason separately. Matching hashes do not grant install
|
|
356
|
+
or restart permission or prove the resulting runtime loaded. The consistency
|
|
357
|
+
checker never downloads/installs or independently authenticates this provenance.
|
|
358
|
+
Missing/not-run/blocked/error/timeout mandatory evidence cannot pass acceptance; even a
|
|
359
|
+
consistent complete report is not trusted proof of execution or automatic closure.
|
|
360
|
+
Keep required-check completeness separate from issue disposition. Controlled
|
|
361
|
+
regressions can exercise timers, never-resolving requests, late results and
|
|
362
|
+
simulated disconnects; production Desktop fault injection is different. Do not
|
|
363
|
+
disconnect networking, alter proxies/accounts or trigger paid requests to fill
|
|
364
|
+
coverage without specific permission. After a specific defect is fixed, relevant
|
|
365
|
+
controlled regressions/exact CI pass, release/install/load premises are met and
|
|
366
|
+
normal live checks do not reproduce it, explicit user risk acceptance may close
|
|
367
|
+
with "fixed/not reproduced; untested faults listed; reopen on recurrence".
|
|
368
|
+
Do not claim the original root cause or production fault coverage was proven.
|
|
369
|
+
Lack of safe/non-destructive production injection alone is not an indefinite
|
|
370
|
+
closure blocker. Known failures/reproduction, critical safety gaps and mandatory
|
|
371
|
+
requirements remain blockers; residual-risk disposition cannot relabel them
|
|
372
|
+
passed or authorize automatic issue closure.
|
|
373
|
+
|
|
320
374
|
For the opt-in task acceptance pilot, define observable requirements before
|
|
321
375
|
implementation and validate the clean candidate with
|
|
322
376
|
`node scripts/agent.mjs accept --contract CONTRACT_FILE --report REPORT_FILE`.
|
|
@@ -327,10 +381,20 @@ live diagnostics automatically. Failed, blocked and not-run requirements cannot
|
|
|
327
381
|
pass; new commits require new evidence. Existing review/CI/release gates remain
|
|
328
382
|
authoritative. This tooling does not activate agents or access live profiles.
|
|
329
383
|
|
|
330
|
-
|
|
384
|
+
Choose a bounded local auxiliary check or authoritative remote evidence explicitly
|
|
385
|
+
with `node scripts/agent.mjs guard --task TASK_ID --environment local-auxiliary
|
|
386
|
+
--operation scripts-test` or `--environment github-actions-evidence
|
|
387
|
+
--operation ci-evidence --head FULL_COMMIT_SHA`. The dependency-free scripts
|
|
388
|
+
tests are the only guarded local verification here. Do not run dependency
|
|
389
|
+
installation/recovery locally; full install, build, types, integration and
|
|
390
|
+
package verification use the existing GitHub Actions workflow. See
|
|
391
|
+
[environment and CI evidence guardrails](./docs/environment-evidence-guardrails.md).
|
|
392
|
+
The guard covers only operations invoked through this entry point and is not a
|
|
393
|
+
shell sandbox.
|
|
394
|
+
|
|
395
|
+
The full gate and package commands, run by the existing CI workflow, are:
|
|
331
396
|
|
|
332
397
|
```sh
|
|
333
|
-
pnpm install --frozen-lockfile
|
|
334
398
|
pnpm verify
|
|
335
399
|
pnpm pack --pack-destination artifacts
|
|
336
400
|
```
|
|
@@ -339,7 +403,7 @@ Then run `pnpm verify:tarball -- artifacts/dsh-github-copilot-<package-version>.
|
|
|
339
403
|
|
|
340
404
|
`pnpm verify` checks the Agent contract, source and local test types, baseline markers, a clean build, Vitest tests, Node tooling tests, and real built Host import/Client-loader/Remote smoke. `tests/fixtures` are intentionally excluded from local test typecheck because they import source from a separate pinned Core checkout. The checked-in code must pass; never suppress compiler errors or weaken a test to get a green report.
|
|
341
405
|
|
|
342
|
-
If
|
|
406
|
+
If a historical/approved local installation attempt is blocked solely by an enterprise registry or network policy while GitHub Actions can obtain unchanged pinned packages from an authorized official registry, record it as **local validation blocked**, not passed. Do not repeat dependency recovery, switch sources, or expand permissions. A PR may proceed with that limitation disclosed; the complete required GitHub CI matrix, including install, tests, build and package checks, is authoritative before merge. Never weaken or skip CI, substitute dependencies, bypass organizational restrictions, claim unrun local gates succeeded, or tag/release a revision whose required CI is not green. If CI has the same failure, resolve it through approved infrastructure rather than bypassing it.
|
|
343
407
|
|
|
344
408
|
The release CI matrix targets only exact official `0.2.1-rc.3` on Windows and Linux; earlier pins are not support gates. It runs the unchanged tagged-source runtime fixture, optional native Chat fixture, exact published-artifact adapter fixture and all 28 native reviewer regressions without skips. This is a required gate, not evidence that an unexecuted qualification passed. `verify:upstream` is static seam-marker evidence. `verify:controlled-core` exclusively installs a temporary config fixture, refuses an existing target, and removes only its own file; it is not full plugin activation. Published-artifact synthetic adapter fixtures do not prove live provider transport. The release job must wait for the complete reusable CI matrix on the tagged revision, then verify its own packed bytes before publishing.
|
|
345
409
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.4.dsh.0.2.1.rc.3 (prepared)
|
|
4
|
+
|
|
5
|
+
- 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.
|
|
6
|
+
- Exercise current pinned pi-ai 1.1.0 synthetic two-turn summary-only rejection and terminal encryption backfill, preserving original history, exact opaque bytes and `call_id` pairing. Retain existing replay acceptance, account isolation, consent and cancellation ownership; no new retry, history deletion or model switch.
|
|
7
|
+
- Prepare the next same-Core candidate metadata for required PR validation only. No tag, merge, publication, profile installation, restart or live model call is authorized.
|
|
8
|
+
|
|
3
9
|
## 0.1.0-alpha.3.dsh.0.2.1.rc.3 (prepared)
|
|
4
10
|
|
|
5
11
|
- Explain projected-image admission failures through the standard native error path with bounded model, projected/allowed MIME, projected role/position and current build details (#426). Retain the existing fail-closed gate, explicit account restrictions and native projection ownership.
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
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.
|
|
10
10
|
|
|
11
|
-
**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.
|
|
11
|
+
**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.
|
|
12
12
|
|
|
13
13
|
Select by **exact Core**, never global SemVer maximum or npm `latest`/`alpha`.
|
|
14
14
|
The read-only `node scripts/select-core-release.mjs 0.2.0-rc.2` command checks
|
|
@@ -25,6 +25,8 @@ maintenance is promised. See [release selection](./docs/npm-distribution.md#exac
|
|
|
25
25
|
|
|
26
26
|
**Compaction planning:** alpha.15 fixes byte counts being compared with token budgets in the separately selected recovery engine. Planning now uses the public native token meter, preserving complete tool relations and final native admission. Truly oversized balanced units still fail explicitly; this is not history repair or guaranteed recovery. See [compaction recovery](./docs/manual-compaction-recovery.md).
|
|
27
27
|
|
|
28
|
+
**Responses replay refusal:** a locally rejected incomplete, reference-only, summary-only reasoning item, or previous-response reference now adds a bounded structural reason to the native `INVALID_REQUEST`: fixed reason code, zero-based input index when applicable, allowlisted type/status, and field-presence booleans only. The rejected request is not dispatched and history remains unchanged; IDs, summaries, tool data, unknown fields, and encrypted bytes are never included in diagnostics. Valid encrypted replay bytes and `call_id` pairing remain intact. This diagnosis does not recover or rewrite old history.
|
|
29
|
+
|
|
28
30
|
**Historical DSH alpha.5 adaptation:** exact public APIs used pi-ai `1.1.0`, the official
|
|
29
31
|
Cordis/schemastery peers and storage-domain's Zod `4.4.3`. The
|
|
30
32
|
[fixed-target official-first review](https://github.com/cloga/dsh-github-copilot/blob/main/docs/official-first-021-alpha5.md)
|
|
@@ -157,10 +159,19 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
157
159
|
|
|
158
160
|
Supply any launcher patches with repeated `--patch /absolute/file`. Require `supported: true`: the install command does not automatically run this preflight. Unsupported/custom Web composition and `NONEMPTY_DISPOSABLE_PROFILE_ROOT` are stop conditions. Preserve a nonempty root and review whether public composition reconstructs it before any separately approved normalization; never assume it can be cleared. Check effective shared-peer resolution so stale profile-local packages do not shadow Desktop's official peers.
|
|
159
161
|
|
|
162
|
+
Install the exact, checksum-verified release archive shown below; do not use a
|
|
163
|
+
checkout directory as a release package. `pnpm add <directory>` creates a
|
|
164
|
+
`link:` development dependency and does not install that directory's production
|
|
165
|
+
dependencies. For development, install the checkout's dependencies before
|
|
166
|
+
linking it and keep the checkout available at the linked path. A package manager
|
|
167
|
+
showing **Installed** confirms its profile record, not that runtime dependencies
|
|
168
|
+
resolved or that the plugin loaded; verify the exact DSH/profile startup result
|
|
169
|
+
separately.
|
|
170
|
+
|
|
160
171
|
For a **standalone named profile**:
|
|
161
172
|
|
|
162
173
|
```sh
|
|
163
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.
|
|
174
|
+
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
|
|
164
175
|
```
|
|
165
176
|
|
|
166
177
|
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.
|
|
@@ -376,14 +387,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
|
|
|
376
387
|
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.
|
|
377
388
|
|
|
378
389
|
```sh
|
|
379
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.
|
|
380
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.
|
|
390
|
+
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
|
|
391
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.4.dsh.0.2.1.rc.3/SHA256SUMS
|
|
381
392
|
sha256sum --check SHA256SUMS
|
|
382
393
|
```
|
|
383
394
|
|
|
384
395
|
```powershell
|
|
385
396
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
386
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.1.0-alpha.
|
|
397
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.1.0-alpha.4.dsh.0.2.1.rc.3.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
387
398
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
388
399
|
```
|
|
389
400
|
|
package/README.zh.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
为 DSH 提供 GitHub Copilot 账号模型发现、上下文 Auto 选模和 hosted search。插件复用 DSH 公开的原生适配器,保留 profile 全局默认账号,并支持 Session 后续 turn 指定独立账号;不修改 Core,也不维护第二套模型目录。
|
|
10
10
|
|
|
11
|
-
**历史稳定版:[`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1);DSH rc.3 更新候选:`0.1.0-alpha.
|
|
11
|
+
**历史稳定版:[`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 不变。已发布、已安装、已加载仍是不同状态。
|
|
12
12
|
|
|
13
13
|
按**精确 Core**选版本,不按全局 SemVer 最大值或 npm `latest`/`alpha`。
|
|
14
14
|
只读命令 `node scripts/select-core-release.mjs 0.2.0-rc.2` 先读取
|
|
@@ -23,6 +23,8 @@ Core alpha.4 对应 alpha.16,alpha.5 保留其历史线,rc.3 对应当前待
|
|
|
23
23
|
|
|
24
24
|
**压缩规划:**alpha.15 修复独立选择的恢复引擎将字节数与 token 预算直接比较的问题,改用公开的原生 token meter,保留完整工具关系和最终原生准入。真正超大的配对历史单元仍明确失败;这不是历史修复,也不保证恢复成功。参见[压缩恢复](./docs/manual-compaction-recovery.md)。
|
|
25
25
|
|
|
26
|
+
**Responses replay 拒绝诊断:**本地拒绝不完整、仅引用、只有摘要的 reasoning 条目或 previous-response 引用时,原生 `INVALID_REQUEST` 会附带有界结构原因:固定原因码、适用时从零开始的输入位置、白名单 type/status,以及字段存在性布尔值。被拒绝的请求不会发出,历史保持不变;诊断不会包含 ID、摘要、工具数据、未知字段或加密 bytes。有效加密 replay bytes 和 `call_id` 配对保持原样。此诊断不会恢复或改写旧历史。
|
|
27
|
+
|
|
26
28
|
**历史 DSH alpha.5 适配:**公开 API 对齐 pi-ai `1.1.0`、官方 Cordis/schemastery peer,
|
|
27
29
|
以及 storage-domain 的 Zod `4.4.3`。
|
|
28
30
|
[固定目标的 official-first 调研](https://github.com/cloga/dsh-github-copilot/blob/main/docs/official-first-021-alpha5.md)
|
|
@@ -132,10 +134,16 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
132
134
|
|
|
133
135
|
启动 patch 用重复的 `--patch /absolute/file` 提供。必须得到 `supported: true`;安装器不会自动执行此预检。不支持的/自定义 Web 组合及 `NONEMPTY_DISPOSABLE_PROFILE_ROOT` 均须停止。先保全非空 root,并核对公开组合能否完整重建,再另行批准规范化;不能默认清空。检查实际共享 peer 解析,避免旧 profile-local 包遮蔽官方 Desktop peer。
|
|
134
136
|
|
|
137
|
+
请安装下方的精确版本、checksum 已核验的发布归档;不要把 checkout
|
|
138
|
+
目录当作发布包。`pnpm add <directory>` 会创建 `link:` 开发依赖,不会替该
|
|
139
|
+
目录安装生产依赖。开发时应先安装 checkout 的依赖再建立链接,并确保链接目标持续可用。
|
|
140
|
+
包管理器显示 **Installed** 只表示 profile 记录已接受,不代表运行依赖已解析或插件已成功加载;
|
|
141
|
+
还应单独核对目标 DSH/profile 的启动结果。
|
|
142
|
+
|
|
135
143
|
**独立具名 profile**:
|
|
136
144
|
|
|
137
145
|
```sh
|
|
138
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.
|
|
146
|
+
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
|
|
139
147
|
```
|
|
140
148
|
|
|
141
149
|
上面的命令是准备发布的示例,仅在发布且所需 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 不等价。本次不授权安装或重启。
|
|
@@ -346,14 +354,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
|
|
|
346
354
|
GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。
|
|
347
355
|
|
|
348
356
|
```sh
|
|
349
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.
|
|
350
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.
|
|
357
|
+
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
|
|
358
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.4.dsh.0.2.1.rc.3/SHA256SUMS
|
|
351
359
|
sha256sum --check SHA256SUMS
|
|
352
360
|
```
|
|
353
361
|
|
|
354
362
|
```powershell
|
|
355
363
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
356
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.1.0-alpha.
|
|
364
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.1.0-alpha.4.dsh.0.2.1.rc.3.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
357
365
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
358
366
|
```
|
|
359
367
|
|
package/deployment-baseline.json
CHANGED
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
},
|
|
9
9
|
"package": {
|
|
10
10
|
"name": "dsh-github-copilot",
|
|
11
|
-
"version": "0.1.0-alpha.
|
|
11
|
+
"version": "0.1.0-alpha.4.dsh.0.2.1.rc.3"
|
|
12
12
|
},
|
|
13
13
|
"releaseLines": [
|
|
14
14
|
{ "core": "0.2.0-rc.2", "version": "0.4.2-alpha.15", "status": "published" },
|
|
15
15
|
{ "core": "0.2.1-alpha.4", "version": "0.4.2-alpha.16", "status": "published" },
|
|
16
16
|
{ "core": "0.2.1-alpha.5", "version": "0.1.0-alpha.2.dsh.0.2.1.alpha.5", "status": "published" },
|
|
17
|
-
{ "core": "0.2.1-rc.3", "version": "0.1.0-alpha.
|
|
17
|
+
{ "core": "0.2.1-rc.3", "version": "0.1.0-alpha.4.dsh.0.2.1.rc.3", "status": "pending" }
|
|
18
18
|
],
|
|
19
19
|
"evidence": {
|
|
20
20
|
"kind": "source-and-synthetic-test-inventory",
|
|
@@ -78,6 +78,22 @@ empty summary/content, no encrypted content and no unknown fields. Durable
|
|
|
78
78
|
history, public summaries, opaque bytes, nested IDs, phase and `call_id` pairing
|
|
79
79
|
stay unchanged.
|
|
80
80
|
|
|
81
|
+
The locked SDK/Core synthetic regressions require a summary-only reasoning
|
|
82
|
+
item from an SSE response to be rejected on the following turn before a second
|
|
83
|
+
Responses request is dispatched, while the prior assistant history remains
|
|
84
|
+
byte-for-byte unchanged. The accepted replay control requires opaque encrypted
|
|
85
|
+
bytes and paired `call_id` values to survive normalization unchanged. These
|
|
86
|
+
fixtures must pass against the current lockfile before acceptance; their presence
|
|
87
|
+
alone does not prove execution or live provider acceptance.
|
|
88
|
+
|
|
89
|
+
When this plugin rejects a replay shape locally, the existing native
|
|
90
|
+
`INVALID_REQUEST` message may include a bounded structure diagnosis: a fixed
|
|
91
|
+
reason code, zero-based input position, allowlisted item type/status and
|
|
92
|
+
booleans indicating whether selected fields exist. It never includes field
|
|
93
|
+
values, IDs, summaries, arguments, results, unknown discriminators or opaque
|
|
94
|
+
bytes. This identifies the structural refusal, not a specific supplier-rejected
|
|
95
|
+
item, and does not alter the history or authorize another replay shape.
|
|
96
|
+
|
|
81
97
|
The source-checkout follow-up for #279 adds bounded structure evidence to an
|
|
82
98
|
exact verified scope rejection: total items, direct ID fields, reference items,
|
|
83
99
|
encrypted reasoning items, unrecognized items, `previous_response_id`/`store`
|
package/lib/client.js
CHANGED
|
@@ -6338,7 +6338,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6338
6338
|
};
|
|
6339
6339
|
//#endregion
|
|
6340
6340
|
//#region package.json
|
|
6341
|
-
var version = "0.1.0-alpha.
|
|
6341
|
+
var version = "0.1.0-alpha.4.dsh.0.2.1.rc.3";
|
|
6342
6342
|
//#endregion
|
|
6343
6343
|
//#region lib/types/diagnostics-client.js
|
|
6344
6344
|
let owner;
|
package/lib/index.js
CHANGED
|
@@ -582,7 +582,7 @@ const result$1 = strictRemoteCodec("dsh-github-copilot#DiagnosticsView", Diagnos
|
|
|
582
582
|
var package_default = {
|
|
583
583
|
name: "dsh-github-copilot",
|
|
584
584
|
description: "DSH companion for GitHub Copilot sign-in, account-aware model profiles, tool compatibility, and provider-hosted search.",
|
|
585
|
-
version: "0.1.0-alpha.
|
|
585
|
+
version: "0.1.0-alpha.4.dsh.0.2.1.rc.3",
|
|
586
586
|
releaseNotes: "CHANGELOG.md",
|
|
587
587
|
publishConfig: {
|
|
588
588
|
"access": "public",
|
|
@@ -4068,6 +4068,56 @@ function requestBodyEvidence(body, protocol) {
|
|
|
4068
4068
|
}
|
|
4069
4069
|
//#endregion
|
|
4070
4070
|
//#region lib/types/responses-replay-compat.js
|
|
4071
|
+
const safeItemTypes = /* @__PURE__ */ new Set([
|
|
4072
|
+
"message",
|
|
4073
|
+
"reasoning",
|
|
4074
|
+
"function_call",
|
|
4075
|
+
"function_call_output",
|
|
4076
|
+
"item_reference"
|
|
4077
|
+
]);
|
|
4078
|
+
const safeItemStatuses = /* @__PURE__ */ new Set([
|
|
4079
|
+
"completed",
|
|
4080
|
+
"in_progress",
|
|
4081
|
+
"incomplete",
|
|
4082
|
+
"failed",
|
|
4083
|
+
"cancelled"
|
|
4084
|
+
]);
|
|
4085
|
+
function safeField(value, key) {
|
|
4086
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
4087
|
+
return descriptor === void 0 ? { present: false } : "value" in descriptor ? {
|
|
4088
|
+
present: true,
|
|
4089
|
+
value: descriptor.value
|
|
4090
|
+
} : { present: true };
|
|
4091
|
+
}
|
|
4092
|
+
function replayStructure(reason, inputIndex, item, hasPreviousResponseId = false) {
|
|
4093
|
+
const type = item === void 0 ? void 0 : safeField(item, "type");
|
|
4094
|
+
const status = item === void 0 ? void 0 : safeField(item, "status");
|
|
4095
|
+
const itemType = type?.present && typeof type.value === "string" && safeItemTypes.has(type.value) ? type.value : "unknown";
|
|
4096
|
+
const itemStatus = status?.present && typeof status.value === "string" && safeItemStatuses.has(status.value) ? status.value : status?.present ? "unknown" : "absent";
|
|
4097
|
+
return {
|
|
4098
|
+
reason,
|
|
4099
|
+
...inputIndex === void 0 ? {} : { inputIndex },
|
|
4100
|
+
...item === void 0 ? {} : {
|
|
4101
|
+
itemType,
|
|
4102
|
+
itemStatus
|
|
4103
|
+
},
|
|
4104
|
+
hasId: item === void 0 ? false : safeField(item, "id").present,
|
|
4105
|
+
hasType: item === void 0 ? false : safeField(item, "type").present,
|
|
4106
|
+
hasStatus: item === void 0 ? false : safeField(item, "status").present,
|
|
4107
|
+
hasRole: item === void 0 ? false : safeField(item, "role").present,
|
|
4108
|
+
hasEncryptedContent: item === void 0 ? false : safeField(item, "encrypted_content").present,
|
|
4109
|
+
hasSummary: item === void 0 ? false : safeField(item, "summary").present,
|
|
4110
|
+
hasContent: item === void 0 ? false : safeField(item, "content").present,
|
|
4111
|
+
hasCallId: item === void 0 ? false : safeField(item, "call_id").present,
|
|
4112
|
+
hasName: item === void 0 ? false : safeField(item, "name").present,
|
|
4113
|
+
hasArguments: item === void 0 ? false : safeField(item, "arguments").present,
|
|
4114
|
+
hasOutput: item === void 0 ? false : safeField(item, "output").present,
|
|
4115
|
+
hasPreviousResponseId
|
|
4116
|
+
};
|
|
4117
|
+
}
|
|
4118
|
+
function formatReplayStructure(structure) {
|
|
4119
|
+
return `Replay structure: reason=${structure.reason}; inputIndex=${structure.inputIndex ?? "unavailable"}; itemType=${structure.itemType ?? "unavailable"}; itemStatus=${structure.itemStatus ?? "unavailable"}; hasId=${structure.hasId}; hasType=${structure.hasType}; hasStatus=${structure.hasStatus}; hasRole=${structure.hasRole}; hasEncryptedContent=${structure.hasEncryptedContent}; hasSummary=${structure.hasSummary}; hasContent=${structure.hasContent}; hasCallId=${structure.hasCallId}; hasName=${structure.hasName}; hasArguments=${structure.hasArguments}; hasOutput=${structure.hasOutput}; hasPreviousResponseId=${structure.hasPreviousResponseId}.`;
|
|
4120
|
+
}
|
|
4071
4121
|
const replayDiagnostics = {
|
|
4072
4122
|
"scope-mismatch": "COPILOT_RESPONSES_REPLAY_SCOPE_MISMATCH: Copilot rejected history tied to another account or connection. Review Replay recovery options, or start a new conversation. Recovery requires consent; stored history is unchanged.",
|
|
4073
4123
|
unsupported: "COPILOT_RESPONSES_REPLAY_UNSUPPORTED: Copilot Responses input cannot be replayed safely without connection-scoped references.",
|
|
@@ -4076,9 +4126,12 @@ const replayDiagnostics = {
|
|
|
4076
4126
|
/** Fixed diagnostics and bounded counts only; never retain request or replay content. */
|
|
4077
4127
|
var CopilotResponsesReplayError = class extends Error {
|
|
4078
4128
|
dispatchEvidence;
|
|
4079
|
-
|
|
4080
|
-
|
|
4129
|
+
structureEvidence;
|
|
4130
|
+
constructor(reason = "unsupported", dispatch, structure) {
|
|
4131
|
+
const structureEvidence = structure === void 0 ? void 0 : formatReplayStructure(structure);
|
|
4132
|
+
super(`${replayDiagnostics[reason]}${structureEvidence === void 0 ? "" : ` ${structureEvidence}`}`);
|
|
4081
4133
|
if (reason === "scope-mismatch" && dispatch !== void 0) this.dispatchEvidence = replayDispatchEvidence(dispatch);
|
|
4134
|
+
if (structureEvidence !== void 0) this.structureEvidence = structureEvidence;
|
|
4082
4135
|
this.name = "CopilotResponsesReplayError";
|
|
4083
4136
|
}
|
|
4084
4137
|
};
|
|
@@ -4133,14 +4186,16 @@ function emptyReasoningShell(item) {
|
|
|
4133
4186
|
"encrypted_content"
|
|
4134
4187
|
].includes(key));
|
|
4135
4188
|
}
|
|
4136
|
-
function normalizeItem(item) {
|
|
4189
|
+
function normalizeItem(item, inputIndex) {
|
|
4137
4190
|
if (!isRecord$1(item)) throw new CopilotResponsesReplayError("invalid-payload");
|
|
4138
|
-
|
|
4191
|
+
const itemType = item.type;
|
|
4192
|
+
if (itemType === "item_reference") throw new CopilotResponsesReplayError("unsupported", void 0, replayStructure("ITEM_REFERENCE_ONLY", inputIndex, item));
|
|
4139
4193
|
if (emptyReasoningShell(item)) return void 0;
|
|
4140
|
-
if ((
|
|
4194
|
+
if ((itemType === "message" || itemType === void 0) && (item.role === "user" || item.role === "system" || item.role === "developer")) return item;
|
|
4141
4195
|
if (!Object.hasOwn(item, "id") || item.id === void 0) return item;
|
|
4142
4196
|
if (!nonemptyString(item.id)) throw new CopilotResponsesReplayError("invalid-payload");
|
|
4143
|
-
|
|
4197
|
+
const itemStatus = item.status;
|
|
4198
|
+
if (!((itemStatus === void 0 || itemStatus === "completed") && (itemType === "message" && item.role === "assistant" && Array.isArray(item.content) || itemType === "function_call" && nonemptyString(item.call_id) && nonemptyString(item.name) && typeof item.arguments === "string" || itemType === "reasoning" && nonemptyString(item.encrypted_content)))) throw new CopilotResponsesReplayError("unsupported", void 0, replayStructure(itemStatus !== void 0 && itemStatus !== "completed" ? "INCOMPLETE_ITEM" : itemType === "reasoning" && !nonemptyString(item.encrypted_content) ? "REASONING_WITHOUT_ENCRYPTED_CONTENT" : "INCOMPLETE_ITEM", inputIndex, item));
|
|
4144
4199
|
const normalized = { ...item };
|
|
4145
4200
|
delete normalized.id;
|
|
4146
4201
|
return normalized;
|
|
@@ -4149,12 +4204,17 @@ function normalizeItem(item) {
|
|
|
4149
4204
|
function normalizeCopilotResponsesPayload(payload) {
|
|
4150
4205
|
try {
|
|
4151
4206
|
if (!isRecord$1(payload) || typeof payload.input !== "string" && !Array.isArray(payload.input)) throw new CopilotResponsesReplayError("invalid-payload");
|
|
4152
|
-
|
|
4207
|
+
const previousResponseId = payload.previous_response_id;
|
|
4208
|
+
if (previousResponseId !== void 0 && previousResponseId !== null && previousResponseId !== "") {
|
|
4209
|
+
if (typeof previousResponseId === "string") throw new CopilotResponsesReplayError("unsupported", void 0, replayStructure("PREVIOUS_RESPONSE_REFERENCE", void 0, void 0, true));
|
|
4210
|
+
throw new CopilotResponsesReplayError("invalid-payload");
|
|
4211
|
+
}
|
|
4153
4212
|
if (typeof payload.input === "string") return payload;
|
|
4154
4213
|
let changed = false;
|
|
4155
4214
|
const input = [];
|
|
4156
|
-
for (
|
|
4157
|
-
const
|
|
4215
|
+
for (let index = 0; index < payload.input.length; index++) {
|
|
4216
|
+
const item = payload.input[index];
|
|
4217
|
+
const normalized = normalizeItem(item, index);
|
|
4158
4218
|
changed ||= normalized !== item;
|
|
4159
4219
|
if (normalized !== void 0) input.push(normalized);
|
|
4160
4220
|
}
|
|
@@ -4226,7 +4286,7 @@ var ResponsesRetryReplay = class {
|
|
|
4226
4286
|
"reasoning",
|
|
4227
4287
|
"message",
|
|
4228
4288
|
"function_call"
|
|
4229
|
-
].includes(String(original.type)) || normalizeItem(original) === original) throw error;
|
|
4289
|
+
].includes(String(original.type)) || normalizeItem(original, index) === original) throw error;
|
|
4230
4290
|
if (item.type === "item_reference") {
|
|
4231
4291
|
if (Object.keys(item).length !== 2) throw error;
|
|
4232
4292
|
} else if (item.type !== original.type || Object.keys(item).length >= Object.keys(original).length || Object.entries(item).some(([key, value]) => !Object.hasOwn(original, key) || cacheBytes(value) !== cacheBytes(original[key]))) throw error;
|
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
type ReplayFailure = 'scope-mismatch' | 'unsupported' | 'invalid-payload';
|
|
2
|
+
type ReplayStructureReason = 'REASONING_WITHOUT_ENCRYPTED_CONTENT' | 'INCOMPLETE_ITEM' | 'ITEM_REFERENCE_ONLY' | 'PREVIOUS_RESPONSE_REFERENCE';
|
|
3
|
+
interface ReplayStructure {
|
|
4
|
+
readonly reason: ReplayStructureReason;
|
|
5
|
+
readonly inputIndex?: number;
|
|
6
|
+
readonly itemType?: string;
|
|
7
|
+
readonly itemStatus?: string;
|
|
8
|
+
readonly hasId: boolean;
|
|
9
|
+
readonly hasType: boolean;
|
|
10
|
+
readonly hasStatus: boolean;
|
|
11
|
+
readonly hasRole: boolean;
|
|
12
|
+
readonly hasEncryptedContent: boolean;
|
|
13
|
+
readonly hasSummary: boolean;
|
|
14
|
+
readonly hasContent: boolean;
|
|
15
|
+
readonly hasCallId: boolean;
|
|
16
|
+
readonly hasName: boolean;
|
|
17
|
+
readonly hasArguments: boolean;
|
|
18
|
+
readonly hasOutput: boolean;
|
|
19
|
+
readonly hasPreviousResponseId: boolean;
|
|
20
|
+
}
|
|
2
21
|
interface ReplayDispatch {
|
|
3
22
|
readonly body?: string;
|
|
4
23
|
readonly sessionHeader?: boolean;
|
|
@@ -7,7 +26,8 @@ interface ReplayDispatch {
|
|
|
7
26
|
/** Fixed diagnostics and bounded counts only; never retain request or replay content. */
|
|
8
27
|
export declare class CopilotResponsesReplayError extends Error {
|
|
9
28
|
readonly dispatchEvidence?: string;
|
|
10
|
-
|
|
29
|
+
readonly structureEvidence?: string;
|
|
30
|
+
constructor(reason?: ReplayFailure, dispatch?: ReplayDispatch, structure?: ReplayStructure);
|
|
11
31
|
}
|
|
12
32
|
/** Normalize only the outgoing managed Responses payload, never stored history/context. */
|
|
13
33
|
export declare function normalizeCopilotResponsesPayload(payload: unknown): unknown;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-github-copilot",
|
|
3
3
|
"description": "DSH companion for GitHub Copilot sign-in, account-aware model profiles, tool compatibility, and provider-hosted search.",
|
|
4
|
-
"version": "0.1.0-alpha.
|
|
4
|
+
"version": "0.1.0-alpha.4.dsh.0.2.1.rc.3",
|
|
5
5
|
"releaseNotes": "CHANGELOG.md",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public",
|