dsh-github-copilot 0.4.0 → 0.4.2-alpha.2

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 CHANGED
@@ -148,6 +148,14 @@ Alpha.25 admits native `subagent/descriptor` v3, already v3 in the retained rc.1
148
148
  - The canonical compatibility credential record key is `llm-pi-ai/github-copilot`; additional account records are limited to the approved #297 contract above.
149
149
  - OAuth credential payloads stay Host-only. Client Remote methods may expose status, notices, and errors only.
150
150
  - Refresh must run through pi-ai `Models.getAuth()` and DSH `credentials.modifyRecord()`.
151
+ - A plugin-owned native refresh may retain only already-dispatched HTTP streams
152
+ when account, entitlements and public OAuth-derived endpoint agree, its exact
153
+ returned object passes through the serialized store, and one synchronous
154
+ notification plus exact commit readback qualify that write. Invalidate all
155
+ reusable metadata/prepared proof immediately. Unknown, duplicate, delayed,
156
+ failed or external/Core-only changes revoke work; never use a refresh timing
157
+ window, unchanged bytes alone, old proof for a new request or a hidden retry.
158
+ See `docs/copilot-accounts.md` (#385).
151
159
  - Copilot OAuth grant writes must rebuild only pi-ai's documented provider fields as a fresh plain JSON object; unrelated extension values never reach DSH credential storage.
152
160
  - Settings changes are path-level. Never replace the whole `llm-pi-ai` section or unrelated provider profiles.
153
161
  - Sign-out deletes only the active Copilot credential record and keeps other records, the selector and route settings. A missing selected noncanonical slot fails explicitly; only an explicit eligible Add or Switch recovers it, never automatic canonical fallback.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.2-alpha.1 (publication blocked: immutable tag metadata)
4
+
5
+ - Persist bounded daily Auto allocation aggregates in the existing profile-isolated local diagnostics storage domain. The Auto collection switch is independent and default-off; enabling it does not enable account/Checking or compaction collection.
6
+ - Retain only fixed policy/model/category/demand/assessment/high-cost/continuity dimensions and bounded opportunity, expected-share, selected and no-fit counts. Cap Auto strata at 1,024 and retain for 14 days under the existing snapshot-size limit; expose restart, eviction, drop, truncation and saturation evidence.
7
+ - Preserve turn routing and Host-lifetime explanations when observation is disabled or fails. No Session/turn IDs, conversation data, upload, automatic tuning or execution/quality/billing inference is added.
8
+ - Add collector, UI, Remote codec and storage-gateway regression coverage; synthetic tests do not establish live Desktop activation or Auto performance.
9
+
10
+ ## 0.4.2-alpha.2 (prepared)
11
+
12
+ - Carry forward the default-off local Auto allocation observations from the unpublished `0.4.2-alpha.1` candidate.
13
+ - Accept the repository's `(prepared)` changelog heading in the release preflight and verify exactly one version section before publishing.
14
+
15
+ ## 0.4.1
16
+
17
+ - Upgrade from 0.4.0: fix normal plugin-owned same-account native OAuth refresh aborting concurrent already-dispatched managed HTTP streams with `COPILOT_PREVIEW_CREDENTIAL_CHANGED`.
18
+ - Qualify unchanged account, entitlements and official OAuth-derived endpoint through an exact single serialized credential notification and commit result. Immediately invalidate reusable metadata/prepared proof; subsequent requests resolve fresh native auth and metadata without redirecting a frozen account or replaying the user query.
19
+ - Keep unknown/external/Core-only notifications, duplicate/delayed/failed writes, revocation, cancellation and disposal fail-closed. Provider rejection remains an ordinary native error; this is not blanket invisible recovery or a new retry owner.
20
+ - Synthetic native-adapter and credential-store regressions establish this scope, not attribution of any particular live incident. Retain 0.4.0's original immutable tag/archive; use the new stable patch. No installation, restart or live settings mutation is included.
21
+
22
+ ## 0.4.0
23
+
24
+ - First stable release, retaining official DSH / Windows Desktop 0.2.0-rc.2 support and plugin-only boundaries.
25
+ - Synchronize bilingual configuration documentation and synthetic built-Client screenshots. The same-account refresh interruption described above is corrected in 0.4.1.
26
+
3
27
  ## 0.4.0-alpha.134 (prepared)
4
28
 
5
29
  - Automatically omit temperature only for the authenticated official rc.2 Auto reviewer root calling an account-proven managed Responses route. Ordinary concurrent Chat and other tool listeners retain their sampling; no opt-in or settings migration is required.
package/README.md CHANGED
@@ -8,7 +8,9 @@
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
- **First stable release: [`0.4.0`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.0). Supported host: official DSH / Windows Desktop `0.2.0-rc.2`.** The stable version is also published on npm's `latest` dist-tag; prereleases remain on their channel tags. Stability-channel promotion does not expand the qualified host baseline or prove live account, model, search or Desktop health. Earlier DSH pins are historical evidence, not supported installation targets. Published, installed in a profile and loaded by a running Host are separate states.
11
+ **Stable release: [`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1); prepared prerelease: `0.4.2-alpha.2`.** `0.4.2-alpha.1` was not published: its release preflight failed, and its immutable tag will not be reused. Supported host: official DSH / Windows Desktop `0.2.0-rc.2`. The stable version is also published on npm's `latest` dist-tag; prereleases remain on their channel tags. Stability-channel promotion does not expand the qualified host baseline or prove live account, model, search or Desktop health. Earlier DSH pins are historical evidence, not supported installation targets. Published, installed in a profile and loaded by a running Host are separate states.
12
+
13
+ **Upgrade from 0.4.0:** that first stable release can interrupt concurrent managed requests with `COPILOT_PREVIEW_CREDENTIAL_CHANGED` during normal same-account native OAuth renewal. In 0.4.1, a proven plugin-owned refresh with unchanged account, endpoint and entitlements preserves already-dispatched HTTP streams; subsequent requests use freshly validated auth and metadata. Unknown/external credential notifications, revocation, cancellation and provider rejections remain explicit—not a promise of invisible recovery or automatic retry. See [the refresh boundary](./docs/copilot-accounts.md#native-oauth-refresh-and-dispatched-requests-385).
12
14
 
13
15
  ## What you can do
14
16
 
@@ -21,25 +23,33 @@ policy, not a price/quality ranking or proven savings.
21
23
 
22
24
  The existing turn selection dialog exposes **Auto allocation observations**:
23
25
  local retained opportunities, expected shares and actual selections for this
24
- Session, with a read-only JSON export. No automatic upload or durable history
25
- is added; restart/eviction loses evidence. `autoAllocationEvidence: false`
26
- stops future candidate capture without changing routing; previously retained
27
- observations remain until disposal/eviction/restart. The auxiliary classifier
26
+ Session, with a read-only JSON export. This view remains Host-lifetime only.
27
+ For durable evaluation, default-off **Local diagnostics** also retains daily
28
+ aggregates by policy/model/category, demand and assessment source, high-cost
29
+ and continuity state, expected/actual selections and no-fit decisions for 14
30
+ days. Enable it independently through the plugin detail settings page; this
31
+ does not enable account/Checking or compaction collection. No Session/turn IDs,
32
+ conversation content, execution/outcome claims, automatic tuning or upload.
33
+ `autoAllocationEvidence: false` stops future candidate evidence in the
34
+ turn-selection view without changing routing. The auxiliary classifier
28
35
  prefers unmarked eligible Lightweight models separately. Advisor calls are not
29
- implemented. See [requirements](./docs/auto-high-cost.md) and the
36
+ implemented. See [requirements](./docs/auto-high-cost.md),
37
+ [local diagnostics](./docs/plugin-diagnostics.md) and the
30
38
  [required iteration review](./docs/evidence-driven-iteration.md).
31
39
 
32
40
  The [local diagnostics pilot](./docs/plugin-diagnostics.md) records bounded
33
- account/Checking and compaction aggregates, **default off**. After installing
41
+ account/Checking, compaction and Auto allocation aggregates, **default off**. After installing
34
42
  and loading the published build, open the plugin detail settings page →
35
43
  **Local diagnostics → Read status → Enable local collection**. This enables
36
- local persistence, not uploads or scheduled analysis. The package also has an
37
- explicit offline analyzer for a caller-selected persisted unit or reviewed
38
- aggregate view; it writes only to a new local report file and never scans,
39
- uploads or changes collection. Pause preserves evidence; Clear requires
40
- separate confirmation. Client/Host populations, uncovered paths and
41
- reporting/storage gaps remain explicit. Descriptive counts are not reconstructed
42
- history, failure rates or proof of an improvement.
44
+ local account/Checking and compaction persistence, not uploads or scheduled
45
+ analysis. Enable **Auto allocation observation** separately to collect only
46
+ Auto allocation aggregates. The package also has an explicit offline analyzer
47
+ for a caller-selected persisted unit or reviewed aggregate view; it writes only
48
+ to a new local report file and never scans, uploads or changes collection. Pause
49
+ preserves evidence; Clear requires separate confirmation. Client/Host
50
+ populations, uncovered paths and reporting/storage gaps remain explicit.
51
+ Descriptive counts are not reconstructed history, failure rates or proof of an
52
+ improvement.
43
53
 
44
54
  To analyze an explicitly qualified file from a built package or source checkout:
45
55
 
@@ -90,10 +100,10 @@ Supply any launcher patches with repeated `--patch /absolute/file`. Require `sup
90
100
  For a **standalone named profile**:
91
101
 
92
102
  ```sh
93
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0/dsh-github-copilot-0.4.0.tgz
103
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.2/dsh-github-copilot-0.4.2-alpha.2.tgz
94
104
  ```
95
105
 
96
- For **Desktop**, its native package manager accepts the exact stable npm spec `dsh-github-copilot@0.4.0`; stable versions publish on npm's `latest` dist-tag. The official rc.2 **Desktop-bundled CLI** also supports reserved-profile plugin management; a global/generic `dsh` shim is not equivalent. Qualify the installed entry before use. See [Desktop CLI qualification](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2) and the distinct [standalone offline procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles). Neither path authorizes registry-policy bypass, peer patches or configuration deletion.
106
+ For **Desktop**, its native package manager accepts an exact npm spec, for example `dsh-github-copilot@0.4.2-alpha.2`; stable versions publish on npm's `latest` dist-tag and prereleases on their channel tags. The official rc.2 **Desktop-bundled CLI** also supports reserved-profile plugin management; a global/generic `dsh` shim is not equivalent. Qualify the installed entry before use. See [Desktop CLI qualification](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2) and the distinct [standalone offline procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles). Neither path authorizes registry-policy bypass, peer patches or configuration deletion.
97
107
 
98
108
  After an approved reload/restart:
99
109
 
@@ -269,14 +279,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
269
279
  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.
270
280
 
271
281
  ```sh
272
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0/dsh-github-copilot-0.4.0.tgz
273
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0/SHA256SUMS
282
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.2/dsh-github-copilot-0.4.2-alpha.2.tgz
283
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.2/SHA256SUMS
274
284
  sha256sum --check SHA256SUMS
275
285
  ```
276
286
 
277
287
  ```powershell
278
288
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
279
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
289
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.2.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
280
290
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
281
291
  ```
282
292
 
package/README.zh.md CHANGED
@@ -8,7 +8,9 @@
8
8
 
9
9
  为 DSH 提供 GitHub Copilot 账号模型发现、上下文 Auto 选模和 hosted search。插件复用 DSH 公开的原生适配器,保留 profile 全局默认账号,并支持 Session 后续 turn 指定独立账号;不修改 Core,也不维护第二套模型目录。
10
10
 
11
- **首个稳定版:[`0.4.0`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.0)。支持宿主:官方 DSH / Windows Desktop `0.2.0-rc.2`。** 稳定版也发布到 npm 的 `latest` dist-tag;预发布版本仍使用各自渠道 tag。稳定渠道不扩大已验证的宿主基线,也不证明实时账号、模型、搜索或 Desktop 健康状态。较早 DSH pin 仅是历史证据,不是当前安装目标。已发布、已安装到 profile、已被运行中的 Host 加载,是三个不同状态。
11
+ **稳定版:[`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1);待发布预览版:`0.4.2-alpha.2`。** `0.4.2-alpha.1` 的发布预检失败,因此未发布;其不可变 tag 不会复用。支持宿主:官方 DSH / Windows Desktop `0.2.0-rc.2`。稳定版也发布到 npm 的 `latest` dist-tag;预发布版本仍使用各自渠道 tag。稳定渠道不扩大已验证的宿主基线,也不证明实时账号、模型、搜索或 Desktop 健康状态。较早 DSH pin 仅是历史证据,不是当前安装目标。已发布、已安装到 profile、已被运行中的 Host 加载,是三个不同状态。
12
+
13
+ **从 0.4.0 升级:**首个正式版在同账号正常原生 OAuth 刷新时,可能以 `COPILOT_PREVIEW_CREDENTIAL_CHANGED` 中止并行托管请求。0.4.1 仅在插件拥有的原生刷新被精确验证,且账号、端点与权限连续时,保留已发出的 HTTP 流;后续请求重新验证认证与模型元数据。未知/外部凭据通知、撤销、取消与供应商拒绝仍明确报错,不承诺所有刷新无感,也不自动重试。参见[刷新边界](./docs/copilot-accounts.md#native-oauth-refresh-and-dispatched-requests-385)。
12
14
 
13
15
  ## 你可以做什么
14
16
 
@@ -18,19 +20,24 @@
18
20
  标记不改变手动选择或已接纳的 turn。这是路由政策,不是价格/质量排名,也不证明节省费用。
19
21
 
20
22
  现有 turn 选择说明内提供 **Auto allocation observations**,显示当前 Session
21
- 保留的候选机会、预期份额与实际选择,并提供只读 JSON 导出。不自动上传,也不写入持久
22
- 历史;重启或淘汰会丢失观察。设置 `autoAllocationEvidence: false` 可停止后续候选
23
- 记录,不改变路由;此前观察保留至销毁、淘汰或重启。辅助分类器独立优先使用未标记的
24
- 合格 Lightweight 模型。顾问求助尚未实现。参见[完整需求](./docs/auto-high-cost.md)
23
+ 保留的候选机会、预期份额与实际选择,并提供只读 JSON 导出;此视图仍仅在 Host
24
+ 生命周期内保留。为了持久评估,默认关闭的 **Local diagnostics** 还会按策略/模型/类别、
25
+ 需求与评估来源、高成本/连续性状态汇总预期/实际选择及 no-fit 决策,保留 14 天。
26
+ 可在插件详情设置页单独启用,不会因此采集账号/Checking 或压缩汇总。不记录
27
+ Session/turn ID、对话内容,也不推断执行/结果,不自动调参或上传。
28
+ `autoAllocationEvidence: false` 会停止 turn 选择视图的后续候选证据,但不改变路由。
29
+ 辅助分类器独立优先使用未标记的合格 Lightweight 模型。顾问求助尚未实现。参见
30
+ [完整需求](./docs/auto-high-cost.md)、[本地诊断](./docs/plugin-diagnostics.md)
25
31
  与[强制迭代评审流程](./docs/evidence-driven-iteration.md)。
26
32
 
27
- [本地诊断试点](./docs/plugin-diagnostics.md)记录有界的账号/Checking 与压缩
33
+ [本地诊断试点](./docs/plugin-diagnostics.md)记录有界的账号/Checking、压缩与 Auto 分配
28
34
  汇总,**默认关闭**。安装并加载已发布版本后,进入插件详情设置页 →
29
35
  **Local diagnostics → Read status → Enable local collection**,开启本地持久化;
30
- 不上传,不启用定时分析。包内另提供显式离线分析器,只处理调用者指定的持久化单元
31
- 或经审阅的聚合视图,并且只新建本地报告文件;不会扫描、上传或更改采集设置。
32
- 暂停保留证据,清除需单独确认。Client/Host 分开统计,未覆盖路径、报告丢失与存储
33
- 故障明确显示。描述性计数不是历史重建、错误率,也不表示优化效果已被验证。
36
+ 仅用于账号/Checking 与压缩汇总,不上传或启用每日分析。另行启用
37
+ **Auto allocation observation** 才会单独收集 Auto 分配汇总。包内另提供显式离线分析器,
38
+ 只处理调用者指定的持久化单元或经审阅的聚合视图,并且只新建本地报告文件;不会扫描、
39
+ 上传或更改采集设置。暂停保留证据,清除需单独确认。Client/Host 分开统计,未覆盖路径、
40
+ 报告丢失与存储故障明确显示。描述性计数不是历史重建、错误率,也不表示优化效果已被验证。
34
41
 
35
42
  在已构建的包或源码 checkout 内,显式分析已核验的文件:
36
43
 
@@ -81,10 +88,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
81
88
  **独立具名 profile**:
82
89
 
83
90
  ```sh
84
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0/dsh-github-copilot-0.4.0.tgz
91
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.2/dsh-github-copilot-0.4.2-alpha.2.tgz
85
92
  ```
86
93
 
87
- **Desktop** 原生包管理器接受精确稳定版 npm spec `dsh-github-copilot@0.4.0`;稳定版发布到 npm `latest` dist-tag。官方 rc.2 **Desktop 随附的专属 CLI**也支持管理保留 profile;全局/普通 `dsh` shim 不等价。使用前核验实际安装入口,参见[Desktop CLI 核验](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2)及独立的[具名 profile 离线流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)。两种路径都不授权绕过包源政策、修改 peer 或删除配置。
94
+ **Desktop** 原生包管理器接受精确 npm spec,例如 `dsh-github-copilot@0.4.2-alpha.2`;稳定版发布到 npm `latest` dist-tag,预发布版使用对应渠道 tag。官方 rc.2 **Desktop 随附的专属 CLI**也支持管理保留 profile;全局/普通 `dsh` shim 不等价。使用前核验实际安装入口,参见[Desktop CLI 核验](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2)及独立的[具名 profile 离线流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)。两种路径都不授权绕过包源政策、修改 peer 或删除配置。
88
95
 
89
96
  经批准 reload/restart 后:
90
97
 
@@ -260,14 +267,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
260
267
  GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。
261
268
 
262
269
  ```sh
263
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0/dsh-github-copilot-0.4.0.tgz
264
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0/SHA256SUMS
270
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.2/dsh-github-copilot-0.4.2-alpha.2.tgz
271
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.2/SHA256SUMS
265
272
  sha256sum --check SHA256SUMS
266
273
  ```
267
274
 
268
275
  ```powershell
269
276
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
270
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
277
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.2.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
271
278
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
272
279
  ```
273
280
 
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "package": {
10
10
  "name": "dsh-github-copilot",
11
- "version": "0.4.0"
11
+ "version": "0.4.2-alpha.2"
12
12
  },
13
13
  "evidence": {
14
14
  "kind": "source-and-synthetic-test-inventory",
@@ -90,14 +90,26 @@ and eligibility windows. No-fit decisions have no fitting-pool distribution.
90
90
  Report category, assessment source, switching/continuity and marking state at
91
91
  decision time, never reconstructed from today's settings.
92
92
 
93
- Initial monitoring may be bounded Host-lifetime evidence. State its window,
94
- retained sample count, eviction and restart limits. Missing history is unknown,
95
- not zero usage or success. A session-local snapshot is not account-wide traffic.
96
- Persistent monitoring requires a separately reviewed public storage seam,
97
- retention/clearing and explicit scope; do not write custom Core history events.
98
- `autoAllocationEvidence: false` stops future candidate captures without changing
99
- selection; older retained observations expire through the normal bounded
100
- store lifecycle. The read-only export performs no automatic file writes/upload.
93
+ The turn-selection dialog continues to expose bounded Host-lifetime evidence.
94
+ Separately, default-off Local diagnostics persists daily profile-local
95
+ allocation aggregates in the reviewed public storage domain when collection is
96
+ enabled. It records plugin/policy version, target/selected category,
97
+ demand/assessment source, model, high-cost/continuity flags, weight,
98
+ opportunities, conditional expected selections, actual selections and no-fit
99
+ counts. Retain at most 1,024 strata for 14 days under the shared 2 MiB snapshot
100
+ limit; expose restart, expiration, drops and truncation. There are no
101
+ Session/turn IDs, prompt/content, execution or task-outcome records, custom
102
+ Core history events, automatic uploads or tuning. The shared Local diagnostics
103
+ switch controls account/Checking and compaction aggregates; Auto allocation
104
+ collection has its own hidden volatile, default-off setting and can be enabled
105
+ without collecting those other populations. Missing history is unknown, not
106
+ zero usage or success, and selection remains distinct from execution, quality
107
+ and billing.
108
+
109
+ `autoAllocationEvidence: false` stops future Host-lifetime candidate captures
110
+ without changing selection; it does not disable the separately controlled
111
+ persistent Local diagnostics aggregates. The read-only exports perform no
112
+ automatic file writes/upload.
101
113
 
102
114
  No prompt, answer, tool content, replay, credential, account name or raw Session
103
115
  ID belongs in an aggregate review. Keep evidence local; no automatic upload.
@@ -10,6 +10,39 @@ separate evidence.
10
10
 
11
11
  ## Requirements
12
12
 
13
+ ### Native OAuth refresh and dispatched requests (#385)
14
+
15
+ In 0.4.0, every matching credential notification aborts managed wires, including
16
+ normal native refresh by another same-account request. Upgrade to 0.4.1 for the
17
+ narrow plugin-owned refresh exception. This is synthetic regression evidence,
18
+ not attribution of a particular live error to refresh.
19
+
20
+ Only a genuine native refresh through the plugin's public credential-store bridge
21
+ may qualify: normalized account grant, model entitlements and official
22
+ OAuth-derived endpoint must remain unchanged. Its exact returned object is
23
+ consumed once inside the serialized `modifyRecord` callback. Exactly one
24
+ synchronous record notification and matching returned committed grant confirm
25
+ the write. No refresh-wide timing flag or unchanged-token heuristic is used.
26
+ Failed, duplicated, delayed, unknown or externally produced notifications remain
27
+ revocation; Core's separately owned canonical adapter has no provenance seam
28
+ through this bridge and remains fail-closed.
29
+
30
+ The exception retains only HTTP streams already dispatched through the native
31
+ adapter's public Fetch seam, including concurrent streams for the same frozen
32
+ account. Metadata, prepared leases, search/recovery proof and retry snapshots are
33
+ still invalidated immediately. A new step/request must resolve fresh native auth
34
+ and validate current account metadata. An old prepared request cannot dispatch
35
+ after renewal; an already-dispatched request cannot use its old lease to make a
36
+ second physical HTTP attempt after renewal. Core retains retry/transaction
37
+ ownership; this plugin adds no resend or automatic retry. Account default changes
38
+ do not redirect frozen requests; each account's record remains isolated.
39
+
40
+ Account/endpoint/permission replacement, record removal, read/commit failure,
41
+ caller cancellation and disposal still revoke. Supplier expired-token rejection
42
+ and network failures can still terminate the original request; preserving a local
43
+ stream does not prove supplier acceptance. Identity/quota presentation caches
44
+ continue to invalidate on every notification, not reuse old credentials.
45
+
13
46
  ### Selector switching and account-bound turns (#344)
14
47
 
15
48
  A global switch changes only the selector. Explicit record-bound request leases
@@ -49,6 +49,11 @@ Verification already built/prepacked. Recovery downloads the original uploaded
49
49
  archive, verifies tag/source, size/digests, SHA-256/SHA-512 and build equality,
50
50
  and never repacks/overwrites immutable bytes. Release assets include
51
51
  `SHA256SUMS`; npm receives that same archive with lifecycle scripts disabled.
52
+ When the tagged package declares `releaseNotes: "CHANGELOG.md"`, publication
53
+ uses only the exact matching version section from that tracked checkout.
54
+ Reconciliation requires the identical body; older tags without that declaration
55
+ retain their original `Release v<version>.` body. A warning must never be added
56
+ to an old Release in a way that breaks its immutable provenance checks.
52
57
 
53
58
  Only registry E404 establishes absence. Auth, TLS, malformed metadata and network
54
59
  failures stop delivery. Existing exact versions require matching SRI and a
@@ -60,7 +65,10 @@ A missing/older tag needs review, not a hidden dist-tag write.
60
65
  SemVer ordering prevents downgrades. Missing older releases are not published
61
66
  when their channel already points newer; reconciling existing older bytes never
62
67
  lowers the pointer. Report GitHub tag/commit/assets/SHA-256 and npm version/SRI
63
- separately. One channel succeeding is partial delivery.
68
+ separately. A stable release may advance `latest` from a prerelease only when
69
+ that pointer names a prerelease of the exact same SemVer core version; other
70
+ cross-channel pointers and newer versions still fail closed. One channel
71
+ succeeding is partial delivery.
64
72
  [Read-only reconciliation](./npm-publication-readback.md).
65
73
 
66
74
  ## Installation preflight still applies
@@ -1,4 +1,4 @@
1
- # Local diagnostics: account and compaction pilot
1
+ # Local diagnostics: account, compaction and Auto allocation
2
2
 
3
3
  Roadmap: [#347](https://github.com/cloga/dsh-github-copilot/issues/347).
4
4
  Phase 0: [#354](https://github.com/cloga/dsh-github-copilot/issues/354).
@@ -23,8 +23,23 @@ collection **and bounded local aggregate persistence**, not exports or uploads.
23
23
  The normal installation does not change this default-off setting.
24
24
 
25
25
  Use the plugin normally: account selection, Identity/Checking and compaction
26
- will contribute independent Client/Host populations. **Read status** returns a
27
- strict aggregate snapshot; **Review aggregate-only JSON → Prepare current JSON**
26
+ will contribute independent Client/Host populations. Auto model allocation has a
27
+ separate **Enable Auto allocation observation** control and its own hidden,
28
+ volatile `github-copilot.autoAllocationDiagnosticsEnabled` path-level CAS.
29
+ It can be enabled without collecting the other diagnostics. Auto decisions
30
+ contribute daily, profile-local allocation aggregates to the same storage
31
+ domain while this switch is enabled. These contain plugin/policy version, model
32
+ ID, target and selected category, task-demand/assessment-source strata,
33
+ high-cost/continuity flags, effective weight, candidate opportunities,
34
+ conditional expected selections, actual selections and no-fit counts. They do
35
+ not contain Session/turn identifiers, prompts, outcomes, execution or billing
36
+ attribution. Aggregate rows are capped at 1,024, retained for 14 days and
37
+ included in the existing 2 MiB snapshot limit; expired, dropped, truncated,
38
+ saturated and restart evidence remains explicit. There is no per-turn export,
39
+ automatic tuning or upload. The two controls can be paused independently;
40
+ **Clear local aggregates** clears both diagnostics populations.
41
+
42
+ **Read status** returns a strict aggregate snapshot; **Review aggregate-only JSON → Prepare current JSON**
28
43
  prepares a read-only copy for explicit review/sharing, never a download or upload.
29
44
  The coding session does not automatically gain access to the running Host.
30
45
  Pause preserves retained evidence and closes active observations as interrupted.
package/lib/client.js CHANGED
@@ -1811,7 +1811,7 @@ window.__ModuleLoader__.load({
1811
1811
  };
1812
1812
  //#endregion
1813
1813
  //#region node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/versions.js
1814
- const version$2 = {
1814
+ const version$3 = {
1815
1815
  major: 4,
1816
1816
  minor: 6,
1817
1817
  patch: 5
@@ -1823,7 +1823,7 @@ window.__ModuleLoader__.load({
1823
1823
  inst ?? (inst = {});
1824
1824
  inst._zod.def = def;
1825
1825
  inst._zod.bag = inst._zod.bag || {};
1826
- inst._zod.version = version$2;
1826
+ inst._zod.version = version$3;
1827
1827
  const defChecks = inst._zod.def.checks;
1828
1828
  const checks = inst._zod.traits.has("$ZodCheck") ? [inst, ...defChecks ?? []] : defChecks?.length ? [...defChecks] : [];
1829
1829
  for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst);
@@ -6521,6 +6521,81 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6521
6521
  }))
6522
6522
  };
6523
6523
  //#endregion
6524
+ //#region lib/types/auto-allocation-diagnostics.js
6525
+ const AUTO_ALLOCATION_DIAGNOSTIC_MAX_ROWS = 1024;
6526
+ const dayMs = 864e5;
6527
+ const integer$1 = number().int().min(0).max(Number.MAX_SAFE_INTEGER);
6528
+ const version$2 = string().max(64).regex(/^\d+\.\d+\.\d+(?:-[a-zA-Z0-9.-]+)?$/);
6529
+ const allocationRow = object({
6530
+ day: integer$1.multipleOf(dayMs),
6531
+ version: version$2,
6532
+ policyVersion: string().min(1).max(64),
6533
+ modelId: string().min(1).max(512),
6534
+ targetCategory: _enum([
6535
+ "powerful",
6536
+ "versatile",
6537
+ "lightweight"
6538
+ ]),
6539
+ category: _enum([
6540
+ "powerful",
6541
+ "versatile",
6542
+ "lightweight",
6543
+ "unknown"
6544
+ ]),
6545
+ demand: _enum([
6546
+ "simple",
6547
+ "routine",
6548
+ "complex",
6549
+ "unknown"
6550
+ ]),
6551
+ assessmentSource: _enum(["local", "semantic"]),
6552
+ method: _enum(["weighted-distribution", "only-candidate"]),
6553
+ fallback: boolean(),
6554
+ highCost: boolean(),
6555
+ previous: boolean(),
6556
+ weight: number().positive().max(1.5),
6557
+ opportunities: integer$1.min(1),
6558
+ expectedSelections: number().finite().nonnegative().max(Number.MAX_SAFE_INTEGER),
6559
+ selections: integer$1
6560
+ }).strict();
6561
+ const noFitRow = object({
6562
+ day: integer$1.multipleOf(dayMs),
6563
+ version: version$2,
6564
+ policyVersion: string().min(1).max(64),
6565
+ targetCategory: _enum([
6566
+ "powerful",
6567
+ "versatile",
6568
+ "lightweight"
6569
+ ]),
6570
+ category: _enum([
6571
+ "powerful",
6572
+ "versatile",
6573
+ "lightweight",
6574
+ "unknown"
6575
+ ]),
6576
+ demand: _enum([
6577
+ "simple",
6578
+ "routine",
6579
+ "complex",
6580
+ "unknown"
6581
+ ]),
6582
+ assessmentSource: _enum(["local", "semantic"]),
6583
+ decisions: integer$1.min(1)
6584
+ }).strict();
6585
+ const AutoAllocationDiagnosticsSchema = object({
6586
+ status: _enum(["observed", "not-collected"]),
6587
+ rows: array(allocationRow).max(AUTO_ALLOCATION_DIAGNOSTIC_MAX_ROWS),
6588
+ noFitRows: array(noFitRow).max(AUTO_ALLOCATION_DIAGNOSTIC_MAX_ROWS),
6589
+ observationStart: integer$1.nullable(),
6590
+ observationEnd: integer$1.nullable(),
6591
+ completeHistory: literal(false),
6592
+ rowsTruncated: boolean(),
6593
+ dropped: integer$1,
6594
+ expired: integer$1,
6595
+ saturated: integer$1,
6596
+ restarts: integer$1
6597
+ }).strict().refine((value) => JSON.stringify(value).length <= 15e5, "Auto allocation diagnostic capacity exceeded").refine((value) => value.rows.length + value.noFitRows.length <= AUTO_ALLOCATION_DIAGNOSTIC_MAX_ROWS, "Auto allocation row capacity exceeded").refine(({ observationStart, observationEnd }) => observationStart === null ? observationEnd === null : observationEnd !== null && observationEnd >= observationStart, "Auto allocation observation window is inconsistent");
6598
+ //#endregion
6524
6599
  //#region lib/types/diagnostics-types.js
6525
6600
  const DIAGNOSTICS_OPERATIONS = [
6526
6601
  "account-global-switch",
@@ -6627,6 +6702,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6627
6702
  epoch: integer,
6628
6703
  updatedAt: integer,
6629
6704
  rows: array(DiagnosticsRowSchema).max(DIAGNOSTICS_MAX_ROWS),
6705
+ autoAllocation: AutoAllocationDiagnosticsSchema.optional(),
6630
6706
  pending: array(DiagnosticsPendingSchema).max(128),
6631
6707
  dropped: integer,
6632
6708
  clientDropped: integer,
@@ -6637,6 +6713,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6637
6713
  }).strict().refine((value) => value.pending.reduce((sum, row) => sum + row.count, 0) <= 128, "Diagnostics pending capacity exceeded").refine((value) => JSON.stringify(value).length <= DIAGNOSTICS_MAX_BYTES, "Diagnostics capacity exceeded");
6638
6714
  const DiagnosticsViewSchema = object({
6639
6715
  enabled: boolean(),
6716
+ autoAllocationEnabled: boolean(),
6640
6717
  state: _enum([
6641
6718
  "loading",
6642
6719
  "ready",
@@ -6728,6 +6805,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6728
6805
  codec: strictRemoteCodec("dsh-github-copilot#DiagnosticsEnabled", boolean())
6729
6806
  }]
6730
6807
  },
6808
+ {
6809
+ method: "setAutoAllocationEnabled",
6810
+ parameters: [{
6811
+ name: "enabled",
6812
+ wire: "enabled",
6813
+ source: "json",
6814
+ codec: strictRemoteCodec("dsh-github-copilot#AutoAllocationDiagnosticsEnabled", boolean())
6815
+ }]
6816
+ },
6731
6817
  {
6732
6818
  method: "recordClient",
6733
6819
  parameters: [{
@@ -6988,7 +7074,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6988
7074
  };
6989
7075
  //#endregion
6990
7076
  //#region package.json
6991
- var version = "0.4.0";
7077
+ var version = "0.4.2-alpha.2";
6992
7078
  //#endregion
6993
7079
  //#region lib/types/diagnostics-client.js
6994
7080
  let owner;
@@ -7217,6 +7303,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7217
7303
  };
7218
7304
  }, [remote]);
7219
7305
  const rows = view?.snapshot.rows ?? [];
7306
+ const auto = view?.snapshot.autoAllocation;
7307
+ const autoOpportunities = auto?.rows.reduce((sum, row) => sum + row.opportunities, 0) ?? 0;
7308
+ const autoExpected = auto?.rows.reduce((sum, row) => sum + row.expectedSelections, 0) ?? 0;
7309
+ const autoSelections = auto?.rows.reduce((sum, row) => sum + row.selections, 0) ?? 0;
7310
+ const autoNoFit = auto?.noFitRows.reduce((sum, row) => sum + row.decisions, 0) ?? 0;
7311
+ const autoWindow = auto === void 0 || auto.observationStart === null || auto.observationEnd === null ? "No retained observation window" : `${new Date(auto.observationStart).toISOString().slice(0, 10)} – ${new Date(auto.observationEnd).toISOString().slice(0, 10)} UTC`;
7220
7312
  const populations = [...new Set(rows.filter((row) => row.operation !== "collection").map((row) => `${row.layer}/${row.operation}`))];
7221
7313
  const count = (metrics, population) => rows.filter((row) => metrics.includes(row.metric) && `${row.layer}/${row.operation}` === population).reduce((sum, row) => sum + row.count, 0);
7222
7314
  const control = (label, action, disabled = false) => (0, react.createElement)("button", {
@@ -7236,7 +7328,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7236
7328
  } }, "Account, Checking and compaction counts stay in this profile. No identities, conversation content or raw errors. No upload, scheduled analysis or automatic repair."), (0, react.createElement)("p", {
7237
7329
  role: "status",
7238
7330
  style: { margin: 0 }
7239
- }, !remote ? "Diagnostics controls are unavailable in this connection." : !view ? busy ? "Reading local collection status…" : "Collection status is unknown." : `${view.enabled ? view.state === "ready" ? "Collection enabled" : "Collection configured on; not collecting" : "Collection paused"} · Storage ${view.state}` + (view.diagnostic === "none" ? "" : ` · ${view.diagnostic}`) + (view.dirty ? " · Not all observations are persisted yet" : "")), failed ? (0, react.createElement)("p", {
7331
+ }, !remote ? "Diagnostics controls are unavailable in this connection." : !view ? busy ? "Reading local collection status…" : "Collection status is unknown." : `${view.enabled ? view.state === "ready" ? "Collection enabled" : "Collection configured on; not collecting" : "Collection paused"} · Storage ${view.state}` + (view.diagnostic === "none" ? "" : ` · ${view.diagnostic}`) + (view.dirty ? " · Not all observations are persisted yet" : "")), view ? (0, react.createElement)("p", {
7332
+ role: "status",
7333
+ style: { margin: 0 }
7334
+ }, `Auto allocation observation ${view.autoAllocationEnabled ? view.state === "ready" ? "enabled" : "configured on; not collecting" : "paused"}.`) : null, (0, react.createElement)("p", { style: {
7335
+ margin: 0,
7336
+ lineHeight: 1.5,
7337
+ maxWidth: "70ch"
7338
+ } }, "Auto allocation observation has its own opt-in switch below. It stores daily aggregate candidate opportunities, conditional expected selections, actual selected counts and no-fit decisions. It does not retain individual turns or infer execution, quality, billing or task success."), failed ? (0, react.createElement)("p", {
7240
7339
  role: "alert",
7241
7340
  style: { margin: 0 }
7242
7341
  }, "Could not confirm the operation. Read status before retrying; no write is automatically replayed.") : null, clientDiagnosticsReportingFailed() ? (0, react.createElement)("p", {
@@ -7250,10 +7349,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7250
7349
  run((value) => value.get());
7251
7350
  }, !remote), control(view?.enabled ? "Pause collection" : "Enable local collection", () => {
7252
7351
  run((value) => value.setEnabled(!view?.enabled));
7253
- }, !remote || !view || !view.enabled && view.state !== "ready"), control("Clear local aggregates", () => setConfirmClear(true), !remote || !view || view.state !== "ready")), confirmClear ? (0, react.createElement)("div", {
7352
+ }, !remote || !view || !view.enabled && view.state !== "ready"), control(view?.autoAllocationEnabled ? "Pause Auto allocation observation" : "Enable Auto allocation observation", () => {
7353
+ run((value) => value.setAutoAllocationEnabled(!view?.autoAllocationEnabled));
7354
+ }, !remote || !view || !view.autoAllocationEnabled && view.state !== "ready"), control("Clear local aggregates", () => setConfirmClear(true), !remote || !view || view.state !== "ready")), confirmClear ? (0, react.createElement)("div", {
7254
7355
  role: "group",
7255
7356
  "aria-label": "Confirm clearing local diagnostics"
7256
- }, (0, react.createElement)("p", null, "Delete collected aggregates only? Collection keeps its current enabled/paused setting. This does not clear account settings or conversation history."), control("Confirm clear", () => {
7357
+ }, (0, react.createElement)("p", null, "Delete collected aggregates only? Both collection controls keep their current enabled/paused settings. This does not clear account settings or conversation history."), control("Confirm clear", () => {
7257
7358
  setConfirmClear(false);
7258
7359
  run((value) => value.clear());
7259
7360
  }), control("Cancel", () => setConfirmClear(false))) : null, view && populations.length ? (0, react.createElement)("div", { style: {
@@ -7296,7 +7397,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7296
7397
  "revoked",
7297
7398
  "environment-fault",
7298
7399
  "unknown"
7299
- ], population))))))) : null, view && !populations.length ? (0, react.createElement)("p", null, "No retained operation observations. This is not evidence of zero failures.") : null, view ? (0, react.createElement)("p", { style: {
7400
+ ], population))))))) : null, view && !populations.length ? (0, react.createElement)("p", null, "No retained operation observations. This is not evidence of zero failures.") : null, auto ? (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Auto allocation aggregates"), (0, react.createElement)("p", { style: { margin: 0 } }, `${view?.autoAllocationEnabled ? "Collection enabled" : "Collection paused"} · ${auto.status === "observed" ? "Observed" : "Not collected"} · ${autoWindow} · ${auto.rows.length} retained strata · ${autoNoFit} no-fit decisions · ${auto.dropped} dropped candidate rows · ${auto.expired} expired strata · ${auto.restarts} observed restarts · ${auto.saturated} counter saturations · ${auto.rowsTruncated ? "row limit reached" : "row limit not reached"}. Complete history: no.`), auto.rows.length ? (0, react.createElement)("p", { style: { margin: 0 } }, `Across these retained strata: ${autoOpportunities} candidate opportunities, ${autoExpected.toFixed(3)} expected selections and ${autoSelections} actual selections. Cohorts differ; use the JSON rows to compare matching policy/model/category/continuity strata.`) : null, (0, react.createElement)("p", { style: { margin: 0 } }, "Retention: 14 days. Rows contain model IDs and aggregate counts only; no Session/turn IDs, conversation content, upload or automatic tuning. Expired counts are strata, not removed decisions.")) : null, view ? (0, react.createElement)("p", { style: {
7300
7401
  margin: 0,
7301
7402
  fontSize: 12,
7302
7403
  lineHeight: "18px"