dsh-github-copilot 0.4.2-alpha.7 → 0.4.2-alpha.8

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
@@ -59,6 +59,16 @@ unrecorded and separate from new cohorts. Count decisions by selected/no-fit cou
59
59
  not repeated candidate opportunities. Never change assessment policy, deadline or
60
60
  context safety merely to populate diagnostics; retain the shared storage/row bounds.
61
61
 
62
+ Credential-change observations (#402) use the existing independent request
63
+ consent: at most 128 fixed notification/commit rows and pending handles for 24
64
+ hours within the shared 2 MiB cap. Derive reasons only from existing refresh
65
+ checks, never new credential reads. No grant/record/identity/endpoint values or
66
+ hashes; random change IDs join verdict phases only. Live-wire counts are not
67
+ unique requests, retries or execution proof. Unknown source and missing legacy
68
+ evidence stay unknown. Preserve #385 qualification/revocation; clear, pause,
69
+ expiry and disposal fence later callbacks. Each diagnostic population, including
70
+ Auto, is independently collapsed by default; opening it never enables collection.
71
+
62
72
  ## Session-policy compaction replay consent (#349, #352)
63
73
 
64
74
  `/copilot-compact visible-history` explicitly authorizes one lossy managed Responses
package/CHANGELOG.md CHANGED
@@ -1,6 +1,19 @@
1
1
  # Changelog
2
2
 
3
- ## 0.4.2-alpha.7 (prepared)
3
+ ## 0.4.2-alpha.8 (prepared)
4
+
5
+ - Keep every Local diagnostics population independently collapsed by default,
6
+ including Auto. Compact summaries retain status/counts, while collection,
7
+ scope and JSON controls remain separate. Opening a group does not collect data.
8
+ - Extend the independently consented request scope with bounded, content-free
9
+ credential-change qualification and commit evidence: fixed reasons and live
10
+ managed-wire populations only, with random operation IDs, 24-hour retention,
11
+ explicit loss/reopen uncertainty and pause/clear/disposal fences.
12
+ - Preserve the exact native-refresh exception and all unknown-change revocation,
13
+ transport, retry and Usage behavior. Unknown notification source stays unknown;
14
+ no credentials, identities, history or old incidents are reconstructed.
15
+
16
+ ## 0.4.2-alpha.7
4
17
 
5
18
  - Raise the auxiliary Auto task-assessment default total budget from eight to
6
19
  thirty seconds as a user-approved trial, with a native editable
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
- **Stable release: [`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1); prepared prerelease: `0.4.2-alpha.7`.** `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.
11
+ **Stable release: [`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1); prepared prerelease: `0.4.2-alpha.8`.** `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
12
 
13
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).
14
14
 
@@ -49,6 +49,12 @@ for 24 hours, with model, JSON/wire byte counts, timings, HTTP status and termin
49
49
  categories. No bodies, headers, credentials or Session/turn IDs are collected.
50
50
  Local body-write completion does not prove supplier receipt; these diagnostics
51
51
  do not fix timeouts or alter retry/Usage behavior.
52
+ All diagnostic groups, including Auto, are independently collapsed by default
53
+ inside the Local diagnostics region. Request consent also covers up to 128
54
+ credential-change notification/commit observations for 24 hours: fixed
55
+ qualification reasons and live-wire counts only. Unknown source remains unknown;
56
+ no past incident or account/Session attribution is reconstructed. See
57
+ [credential-change evidence](./docs/plugin-diagnostics.md#credential-change-decisions-402).
52
58
  Large JSON bodies up to 32 MiB can receive bounded, cooperative composition
53
59
  counts without a full payload parse; the approximately 20.4 MiB class no longer
54
60
  necessarily hits the old 16 MiB diagnostic blind spot. Time/work/cancellation
@@ -120,10 +126,10 @@ Supply any launcher patches with repeated `--patch /absolute/file`. Require `sup
120
126
  For a **standalone named profile**:
121
127
 
122
128
  ```sh
123
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.7/dsh-github-copilot-0.4.2-alpha.7.tgz
129
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.8/dsh-github-copilot-0.4.2-alpha.8.tgz
124
130
  ```
125
131
 
126
- For **Desktop**, its native package manager accepts an exact npm spec, for example `dsh-github-copilot@0.4.2-alpha.7`; 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.
132
+ For **Desktop**, its native package manager accepts an exact npm spec, for example `dsh-github-copilot@0.4.2-alpha.8`; 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.
127
133
 
128
134
  After an approved reload/restart:
129
135
 
@@ -303,14 +309,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
303
309
  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.
304
310
 
305
311
  ```sh
306
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.7/dsh-github-copilot-0.4.2-alpha.7.tgz
307
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.7/SHA256SUMS
312
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.8/dsh-github-copilot-0.4.2-alpha.8.tgz
313
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.8/SHA256SUMS
308
314
  sha256sum --check SHA256SUMS
309
315
  ```
310
316
 
311
317
  ```powershell
312
318
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
313
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.7.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
319
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.8.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
314
320
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
315
321
  ```
316
322
 
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);待发布预览版:`0.4.2-alpha.7`。** `0.4.2-alpha.1` 的发布预检失败,因此未发布;其不可变 tag 不会复用。支持宿主:官方 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.8`。** `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
12
 
13
13
  **从 0.4.0 升级:**首个正式版在同账号正常原生 OAuth 刷新时,可能以 `COPILOT_PREVIEW_CREDENTIAL_CHANGED` 中止并行托管请求。0.4.1 仅在插件拥有的原生刷新被精确验证,且账号、端点与权限连续时,保留已发出的 HTTP 流;后续请求重新验证认证与模型元数据。未知/外部凭据通知、撤销、取消与供应商拒绝仍明确报错,不承诺所有刷新无感,也不自动重试。参见[刷新边界](./docs/copilot-accounts.md#native-oauth-refresh-and-dispatched-requests-385)。
14
14
 
@@ -42,6 +42,10 @@ Session/turn ID、对话内容,也不推断执行/结果,不自动调参
42
42
  不完整解析 payload 对象图;约 20.4 MiB 的请求不再必然落入旧 16 MiB 诊断盲区。
43
43
  耗时/工作量/取消限制仍明确可见,已结束的记录可能在之后读取时才补齐计数。
44
44
  不自动启用 gzip、截断历史或增加重试,参见[请求观测](./docs/plugin-diagnostics.md#content-free-physical-request-observations-392)。
45
+ Local diagnostics 区域内各诊断组均默认独立折叠,Auto 也只按需展开。
46
+ 请求观测同意范围还包含最多 128 条凭据变更通知/提交观测,保留 24 小时:
47
+ 仅记录固定资格判定原因码和活动请求计数。未知来源仍是未知,不还原过去故障,
48
+ 也不推断账号或 Session 归属,参见[凭据变更证据](./docs/plugin-diagnostics.md#credential-change-decisions-402)。
45
49
  包内另提供显式离线分析器,
46
50
  只处理调用者指定的持久化单元或经审阅的聚合视图,并且只新建本地报告文件;不会扫描、
47
51
  上传或更改采集设置。暂停保留证据,清除需单独确认。Client/Host 分开统计,未覆盖路径、
@@ -102,10 +106,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
102
106
  **独立具名 profile**:
103
107
 
104
108
  ```sh
105
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.7/dsh-github-copilot-0.4.2-alpha.7.tgz
109
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.8/dsh-github-copilot-0.4.2-alpha.8.tgz
106
110
  ```
107
111
 
108
- **Desktop** 原生包管理器接受精确 npm spec,例如 `dsh-github-copilot@0.4.2-alpha.7`;稳定版发布到 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 或删除配置。
112
+ **Desktop** 原生包管理器接受精确 npm spec,例如 `dsh-github-copilot@0.4.2-alpha.8`;稳定版发布到 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 或删除配置。
109
113
 
110
114
  经批准 reload/restart 后:
111
115
 
@@ -285,14 +289,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
285
289
  GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。
286
290
 
287
291
  ```sh
288
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.7/dsh-github-copilot-0.4.2-alpha.7.tgz
289
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.7/SHA256SUMS
292
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.8/dsh-github-copilot-0.4.2-alpha.8.tgz
293
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.8/SHA256SUMS
290
294
  sha256sum --check SHA256SUMS
291
295
  ```
292
296
 
293
297
  ```powershell
294
298
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
295
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.7.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
299
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.8.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
296
300
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
297
301
  ```
298
302
 
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "package": {
10
10
  "name": "dsh-github-copilot",
11
- "version": "0.4.2-alpha.7"
11
+ "version": "0.4.2-alpha.8"
12
12
  },
13
13
  "evidence": {
14
14
  "kind": "source-and-synthetic-test-inventory",
@@ -298,6 +298,8 @@
298
298
  {"file": "src/diagnostics-collector.ts", "marker": "noteClientGaps"},
299
299
  {"file": "src/auto-allocation-diagnostics.ts", "marker": "assessmentOutcome: assessmentOutcome.optional()"},
300
300
  {"file": "src/request-diagnostics.ts", "marker": "REQUEST_DIAGNOSTICS_MAX_ROWS = 128"},
301
+ {"file": "src/request-diagnostics.ts", "marker": "CredentialChangeSchema"},
302
+ {"file": "src/diagnostics-collector.ts", "marker": "beginCredentialChange"},
301
303
  {"file": "src/request-body-composition.ts", "marker": "bytes: 32 * 1024 * 1024"},
302
304
  {"file": "src/request-body-composition.ts", "marker": "concurrent: 4"},
303
305
  {"file": "src/request-diagnostics.ts", "marker": "REQUEST_DIAGNOSTICS_RETENTION_MS = 24 * 60 * 60 * 1000"},
@@ -313,6 +315,8 @@
313
315
  {"file": "tests/auto-allocation-diagnostics.spec.ts", "name": "separates assessment outcomes without changing model opportunities or exposing errors"},
314
316
  {"file": "tests/auto-allocation-diagnostics.spec.ts", "name": "keeps legacy reasons unrecorded and captures no-fit and successful assessment outcomes"},
315
317
  {"file": "tests/request-diagnostics.spec.ts", "name": "requires independent consent, captures status/timing and never infers upload or retry count"},
318
+ {"file": "tests/request-diagnostics.spec.ts", "name": "bounds credential evidence under request consent and fences late commit updates"},
319
+ {"file": "tests/diagnostics-card.spec.ts", "name": "keeps every diagnostic population collapsed independently without changing collection"},
316
320
  {"file": "tests/request-body-composition.spec.ts", "name": "partitions a 20.4 MiB request without parsing its payload object graph"},
317
321
  {"file": "tests/preview-transport-failures.spec.ts", "name": "does not wait for large-request composition before native success and updates the exact settled row"},
318
322
  {"file": "tests/request-diagnostics.spec.ts", "name": "updates only its own retained record after native settlement, never across clear/pause/eviction"},
@@ -17,6 +17,12 @@ normal native refresh by another same-account request. Upgrade to 0.4.1 for the
17
17
  narrow plugin-owned refresh exception. This is synthetic regression evidence,
18
18
  not attribution of a particular live error to refresh.
19
19
 
20
+ Separately enabled request diagnostics may now record fixed qualification,
21
+ notification and commit reasons plus bounded live-wire populations; see
22
+ [credential-change decisions](./plugin-diagnostics.md#credential-change-decisions-402).
23
+ Unknown notification source stays unknown. This observes the existing exception,
24
+ not a broader permission to preserve requests or a reconstruction of past failures.
25
+
20
26
  Only a genuine native refresh through the plugin's public credential-store bridge
21
27
  may qualify: normalized account grant, model entitlements and official
22
28
  OAuth-derived endpoint must remain unchanged. Its exact returned object is
@@ -22,13 +22,19 @@ through native path-level Settings CAS and confirm readback. This enables
22
22
  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
- The page opens with the daily Auto allocation table: UTC date, policy, model,
25
+ The dedicated Local diagnostics region opens with independently collapsed
26
+ **Auto allocation observations**, **Physical request observations**,
27
+ **Credential change observations**, and **Account and compaction observations**.
28
+ Summaries retain compact status/count information; expanding a group neither
29
+ enables collection nor performs another status/request call. The Auto group contains
30
+ the daily table: UTC date, policy, model,
26
31
  decision cohort, opportunities, expected selections, selected counts and no-fit
27
32
  decisions. Compare expected and selected counts only within matching cohorts;
28
33
  these aggregates do not establish execution, quality or billing. Account and
29
34
  compaction summaries, collection controls, and detailed data-scope/limits/JSON
30
- guidance are in collapsed disclosures. If a status read fails, expand Collection
31
- controls to find **Read status**; no failed operation is automatically replayed.
35
+ guidance are in collapsed disclosures. A failed operation remains visible outside
36
+ the collapsed controls; expand Collection controls to find **Read status**.
37
+ No failed operation is automatically replayed.
32
38
  Clearing aggregates still requires its separate confirmation.
33
39
 
34
40
  Use the plugin normally: account selection, Identity/Checking and compaction
@@ -64,6 +70,38 @@ readback. Existing aggregate consent never enables request observations.
64
70
  **Clear local diagnostics** clears all three populations, including request
65
71
  observations, without changing the three enabled/paused controls.
66
72
 
73
+ ### Credential-change decisions (#402)
74
+
75
+ The request-observation consent also covers up to 128 content-free credential
76
+ notification/commit observations for 24 hours within the shared 2 MiB cap.
77
+ This user-requested extension does not add a fourth collection switch or
78
+ automatically enable an existing disabled control. It adds no credential reads:
79
+ fixed reasons are derived only from the refresh checks already required by the
80
+ native credential-store bridge. Reasons distinguish qualified refresh, unknown
81
+ source, account/endpoint/entitlement mismatch, expired result, auth mismatch,
82
+ duplicate notification, missing notification, commit mismatch, failed write and
83
+ conflicting write. Not every failure produces a notification; absent evidence
84
+ does not establish a successful refresh.
85
+
86
+ Each observation counts live managed wires that are preparing, dispatched or
87
+ already aborted and records which wires the existing decision preserves or
88
+ revokes. A qualified notification is provisional; a matching commit observation
89
+ is required to confirm its write. Counts are snapshots, not unique requests,
90
+ Session/turn attribution, native retry counts, supplier receipt or eventual
91
+ success. A random change ID joins at most one notification and one commit;
92
+ it does not join physical request rows or identify an account. Unknown source
93
+ does not prove an external/Core writer. Missing legacy fields remain **not
94
+ recorded**, never reconstructed from today's settings or a historical error.
95
+
96
+ Pending handles are capped at 128; clear/pause/expiry/teardown fence later
97
+ callbacks. Saved pending counts become interrupted-on-reopen without fabricated
98
+ commit rows. No grant values, record keys, identities/hashes, endpoints, raw
99
+ errors or conversation data enter storage/Remotes. The #385 qualification and
100
+ native cancellation/retry behavior are unchanged. Capture failures emit only
101
+ `COPILOT_CREDENTIAL_DIAGNOSTICS_CAPTURE_FAILED`; they do not reject business work.
102
+ The aggregate-only offline analyzer validates but does not analyze these rows,
103
+ retaining its `request-observations-not-analyzed` gap.
104
+
67
105
  **Read status** returns a strict snapshot; **Review aggregate-only JSON → Prepare current JSON**
68
106
  prepares a read-only copy for explicit review/sharing, never a download or upload.
69
107
  When retained request observations exist, the disclosure is instead named
package/lib/client.js CHANGED
@@ -6653,6 +6653,32 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6653
6653
  requestCount: integer$1
6654
6654
  }).strict()
6655
6655
  ]);
6656
+ const CredentialChangeReasonSchema = _enum([
6657
+ "qualified",
6658
+ "unknown-source",
6659
+ "account-changed",
6660
+ "endpoint-changed",
6661
+ "entitlements-changed",
6662
+ "expired",
6663
+ "auth-mismatch",
6664
+ "duplicate-notification",
6665
+ "missing-notification",
6666
+ "commit-mismatch",
6667
+ "write-failed",
6668
+ "write-conflict"
6669
+ ]);
6670
+ const CredentialChangeSchema = object({
6671
+ changeId: string().uuid(),
6672
+ observedAt: integer$1,
6673
+ version: string().max(64).regex(/^\d+\.\d+\.\d+(?:-[a-zA-Z0-9.-]+)?$/),
6674
+ phase: _enum(["notification", "commit"]),
6675
+ reason: CredentialChangeReasonSchema,
6676
+ preparing: integer$1,
6677
+ dispatched: integer$1,
6678
+ alreadyAborted: integer$1,
6679
+ preserved: integer$1,
6680
+ revoked: integer$1
6681
+ }).strict();
6656
6682
  const RequestDiagnosticsSchema = object({
6657
6683
  rows: array(object({
6658
6684
  streamId: string().uuid(),
@@ -6698,7 +6724,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6698
6724
  dropped: integer$1,
6699
6725
  evicted: integer$1,
6700
6726
  pending: integer$1.max(128).optional(),
6701
- interruptedOnReopen: integer$1.optional()
6727
+ interruptedOnReopen: integer$1.optional(),
6728
+ credentialChanges: object({
6729
+ rows: array(CredentialChangeSchema).max(128),
6730
+ dropped: integer$1,
6731
+ evicted: integer$1,
6732
+ pending: integer$1.max(128).optional(),
6733
+ interruptedOnReopen: integer$1.optional()
6734
+ }).strict().optional()
6702
6735
  }).strict();
6703
6736
  //#endregion
6704
6737
  //#region lib/types/diagnostics-types.js
@@ -7190,7 +7223,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7190
7223
  };
7191
7224
  //#endregion
7192
7225
  //#region package.json
7193
- var version = "0.4.2-alpha.7";
7226
+ var version = "0.4.2-alpha.8";
7194
7227
  //#endregion
7195
7228
  //#region lib/types/diagnostics-client.js
7196
7229
  let owner;
@@ -7420,6 +7453,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7420
7453
  }, [remote]);
7421
7454
  const rows = view?.snapshot.rows ?? [];
7422
7455
  const requests = view?.snapshot.requests;
7456
+ const credentials = requests?.credentialChanges;
7423
7457
  const auto = view?.snapshot.autoAllocation;
7424
7458
  const autoOpportunities = auto?.rows.reduce((sum, row) => sum + row.opportunities, 0) ?? 0;
7425
7459
  const autoExpected = auto?.rows.reduce((sum, row) => sum + row.expectedSelections, 0) ?? 0;
@@ -7481,12 +7515,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7481
7515
  return (0, react.createElement)("section", {
7482
7516
  "aria-label": "Local diagnostics",
7483
7517
  "data-copilot-native-ui": true,
7518
+ "data-copilot-diagnostics": true,
7484
7519
  style: section
7485
- }, (0, react.createElement)("style", null, nativeSettingsCss), (0, react.createElement)("h3", { style: nativeHeadingStyle }, "Local diagnostics"), (0, react.createElement)("div", { style: {
7486
- display: "grid",
7487
- gap: 8,
7488
- minWidth: 0
7489
- } }, (0, react.createElement)("h4", { style: nativeHeadingStyle }, "Auto allocation observations"), (0, react.createElement)("p", {
7520
+ }, (0, react.createElement)("style", null, nativeSettingsCss + "\n[data-copilot-diagnostics] details { min-width: 0; }"), (0, react.createElement)("h3", { style: nativeHeadingStyle }, "Local diagnostics"), (0, react.createElement)("p", { style: {
7521
+ ...nativeCaptionStyle,
7522
+ margin: 0
7523
+ } }, "Expand a diagnostic group to inspect its evidence. Collection controls are independent; opening a group does not enable collection."), failed ? (0, react.createElement)("p", {
7524
+ role: "alert",
7525
+ style: { margin: 0 }
7526
+ }, "Could not confirm the operation. Read status before retrying; no write is automatically replayed.") : null, (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Auto allocation observations", (0, react.createElement)("span", { style: {
7527
+ ...nativeCaptionStyle,
7528
+ marginInlineStart: 8
7529
+ } }, !view ? "Status unknown" : `${view.autoAllocationEnabled ? "Enabled" : "Paused"} · ${auto ? `${autoRows.length} retained strata` : "Evidence unavailable"}`)), (0, react.createElement)("p", {
7490
7530
  role: "status",
7491
7531
  style: { margin: 0 }
7492
7532
  }, !view ? busy ? "Reading observation status…" : "Observation status is unknown." : `${view.autoAllocationEnabled ? view.state === "ready" ? "Enabled" : "Enabled · storage unavailable" : "Paused"} · ${auto === void 0 ? "Auto observations unavailable in this snapshot" : auto.status === "observed" ? "Data observed" : view.state === "ready" ? "No observations collected" : "Observation status unavailable"}` + (view.dirty ? " · Latest changes not fully persisted" : "")), auto ? (0, react.createElement)("p", { style: { margin: 0 } }, `${autoWindow} · ${auto.rows.length + auto.noFitRows.length} retained strata · ${auto.rowsTruncated ? "row limit reached" : "row limit not reached"}` + (auto.dropped ? ` · ${auto.dropped} dropped` : "") + (auto.expired ? ` · ${auto.expired} expired` : "") + (auto.restarts ? ` · ${auto.restarts} restarts observed` : "") + (auto.saturated ? ` · ${auto.saturated} counters saturated` : "")) : null, autoRows.length ? (0, react.createElement)("div", { style: {
@@ -7546,7 +7586,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7546
7586
  } }, row.noFit ?? "—")))))) : null, auto?.status === "observed" && autoRows.length === 0 ? (0, react.createElement)("p", { style: { margin: 0 } }, "No retained strata in this snapshot; this does not mean there were no decisions.") : !auto ? (0, react.createElement)("p", { style: { margin: 0 } }, "Auto allocation aggregates are unavailable in this snapshot.") : view && auto.status !== "observed" && view.state !== "ready" ? (0, react.createElement)("p", { style: { margin: 0 } }, "Storage is not ready; retained Auto observation status is unknown.") : view && auto.status !== "observed" ? (0, react.createElement)("p", { style: { margin: 0 } }, "No retained observations yet.") : null, autoRows.length ? (0, react.createElement)("p", { style: {
7547
7587
  ...nativeCaptionStyle,
7548
7588
  margin: 0
7549
- } }, `${autoOpportunities} candidate opportunities · ${autoExpected.toFixed(3)} expected selections · ${autoSelections} actual selections · ${autoNoFit} no-fit decisions. Compare expected and selected counts only within matching cohorts; these are not execution, quality or billing evidence. Assessment outcomes explain classification only, not the supplier root cause. Legacy reasons are not recorded; sum Selected or No-fit, not candidate opportunities, when counting decisions by outcome.`) : null), view ? (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Physical request observations"), (0, react.createElement)("p", { style: { margin: 0 } }, requests ? `${requests.rows.length} retained requests · ${requests.pending ?? 0} sampled pending · ${requests.dropped} dropped · ${requests.evicted} expired/evicted · ${requests.interruptedOnReopen ?? 0} interrupted on reopen` : "No retained request observations. This does not establish zero failures or enabled collection."), (0, react.createElement)("p", { style: {
7589
+ } }, `${autoOpportunities} candidate opportunities · ${autoExpected.toFixed(3)} expected selections · ${autoSelections} actual selections · ${autoNoFit} no-fit decisions. Compare expected and selected counts only within matching cohorts; these are not execution, quality or billing evidence. Assessment outcomes explain classification only, not the supplier root cause. Legacy reasons are not recorded; sum Selected or No-fit, not candidate opportunities, when counting decisions by outcome.`) : null), view ? (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Physical request observations", (0, react.createElement)("span", { style: {
7590
+ ...nativeCaptionStyle,
7591
+ marginInlineStart: 8
7592
+ } }, `${view.requestEnabled === void 0 ? "Status unknown" : view.requestEnabled ? "Enabled" : "Paused"} · ${requests?.rows.length ?? 0} retained`)), (0, react.createElement)("p", { style: { margin: 0 } }, requests ? `${requests.rows.length} retained requests · ${requests.pending ?? 0} sampled pending · ${requests.dropped} dropped · ${requests.evicted} expired/evicted · ${requests.interruptedOnReopen ?? 0} interrupted on reopen` : "No retained request observations. This does not establish zero failures or enabled collection."), (0, react.createElement)("p", { style: {
7550
7593
  ...nativeCaptionStyle,
7551
7594
  margin: 0
7552
7595
  } }, "Managed native adapter dispatches only. Local body-write completion is not supplier receipt. Stream-done is a native terminal observation, not tool execution or billing success. No Core retry count or Session/turn attribution is inferred."), requests?.rows.length ? (0, react.createElement)("div", { style: {
@@ -7585,7 +7628,46 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7585
7628
  } }, row.model), (0, react.createElement)("td", { style: {
7586
7629
  padding: 6,
7587
7630
  overflowWrap: "anywhere"
7588
- } }, `${row.outcome} / ${row.reason}`), (0, react.createElement)("td", { style: { padding: 6 } }, row.httpStatus ?? "—"), (0, react.createElement)("td", { style: { padding: 6 } }, `${row.composition.totalBytes ?? "unknown"} / ${row.wireBytes ?? "unknown"} (${row.encoding}; composition ${row.composition.state})`), (0, react.createElement)("td", { style: { padding: 6 } }, `${row.responseHeadersMs ?? "unknown"} / ${row.upload?.state === "observed" ? row.upload.bodyWriteCompleteMs ?? "unknown" : "unknown"}`)))))) : null) : null, view && populations.length ? (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Account and compaction observations"), (0, react.createElement)("div", { style: {
7631
+ } }, `${row.outcome} / ${row.reason}`), (0, react.createElement)("td", { style: { padding: 6 } }, row.httpStatus ?? "—"), (0, react.createElement)("td", { style: { padding: 6 } }, `${row.composition.totalBytes ?? "unknown"} / ${row.wireBytes ?? "unknown"} (${row.encoding}; composition ${row.composition.state})`), (0, react.createElement)("td", { style: { padding: 6 } }, `${row.responseHeadersMs ?? "unknown"} / ${row.upload?.state === "observed" ? row.upload.bodyWriteCompleteMs ?? "unknown" : "unknown"}`)))))) : null) : null, view ? (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Credential change observations", (0, react.createElement)("span", { style: {
7632
+ ...nativeCaptionStyle,
7633
+ marginInlineStart: 8
7634
+ } }, credentials ? `${credentials.rows.length} retained` : "Not recorded")), (0, react.createElement)("p", { style: {
7635
+ ...nativeCaptionStyle,
7636
+ margin: 0
7637
+ } }, "Uses the independent request-observation consent. Fixed qualification and commit reasons only; no credentials, account or Session identifiers. Unknown source does not identify an external writer. Counts describe live managed wires at each observation, not native retries or successful completion."), credentials ? (0, react.createElement)("p", { style: { margin: 0 } }, `${credentials.dropped} dropped · ${credentials.evicted} expired/evicted · ${credentials.pending ?? 0} sampled pending · ${credentials.interruptedOnReopen ?? 0} interrupted on reopen. Matching random change IDs join notification and commit observations only; no historical incident is reconstructed.`) : (0, react.createElement)("p", { style: { margin: 0 } }, "Credential-change evidence was not recorded in this snapshot. This does not establish zero changes or failures."), credentials?.rows.length ? (0, react.createElement)("div", { style: {
7638
+ overflowX: "auto",
7639
+ minWidth: 0
7640
+ } }, (0, react.createElement)("table", { style: {
7641
+ width: "100%",
7642
+ borderCollapse: "collapse",
7643
+ textAlign: "left",
7644
+ font: "inherit"
7645
+ } }, (0, react.createElement)("caption", { style: {
7646
+ ...nativeCaptionStyle,
7647
+ textAlign: "left",
7648
+ marginBottom: 8
7649
+ } }, "Latest retained credential-change decisions"), (0, react.createElement)("thead", null, (0, react.createElement)("tr", null, ...[
7650
+ "Time (UTC)",
7651
+ "Change ID",
7652
+ "Phase / reason",
7653
+ "Preparing / dispatched",
7654
+ "Preserved / revoked",
7655
+ "Already aborted"
7656
+ ].map((label) => (0, react.createElement)("th", {
7657
+ key: label,
7658
+ scope: "col",
7659
+ style: {
7660
+ padding: 6,
7661
+ font: "inherit",
7662
+ fontWeight: 500
7663
+ }
7664
+ }, label)))), (0, react.createElement)("tbody", null, ...credentials.rows.slice().sort((left, right) => right.observedAt - left.observedAt).map((row, index) => (0, react.createElement)("tr", { key: `${row.changeId}/${row.phase}/${index}` }, (0, react.createElement)("td", { style: {
7665
+ padding: 6,
7666
+ whiteSpace: "nowrap"
7667
+ } }, new Date(row.observedAt).toISOString()), (0, react.createElement)("td", { style: {
7668
+ padding: 6,
7669
+ overflowWrap: "anywhere"
7670
+ } }, row.changeId), (0, react.createElement)("td", { style: { padding: 6 } }, `${row.phase} / ${row.reason}`), (0, react.createElement)("td", { style: { padding: 6 } }, `${row.preparing} / ${row.dispatched}`), (0, react.createElement)("td", { style: { padding: 6 } }, `${row.preserved} / ${row.revoked}`), (0, react.createElement)("td", { style: { padding: 6 } }, row.alreadyAborted)))))) : null) : null, view && populations.length ? (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Account and compaction observations"), (0, react.createElement)("div", { style: {
7589
7671
  overflowX: "auto",
7590
7672
  minWidth: 0
7591
7673
  } }, (0, react.createElement)("table", { style: {
@@ -7638,13 +7720,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7638
7720
  ], population)))))))) : null, view && !populations.length ? (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Account and compaction observations"), (0, react.createElement)("p", null, "No retained operation observations. This is not evidence of zero failures.")) : null, (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Collection controls"), (0, react.createElement)("p", { style: { margin: 0 } }, view?.requestEnabled === void 0 ? "Request observations unavailable in this snapshot." : `Request observations ${view.requestEnabled ? "enabled" : "paused"}. ${requests?.rows.length ?? 0} retained physical requests; ${requests?.dropped ?? 0} dropped; ${requests?.evicted ?? 0} expired/evicted.`), (0, react.createElement)("p", { style: {
7639
7721
  ...nativeCaptionStyle,
7640
7722
  margin: 0
7641
- } }, "Separate opt-in: retain at most 128 content-free physical requests for 24 hours. Includes model, payload byte counts, transport timing, HTTP status and terminal categories, not bodies, credentials, URLs, headers or Session/turn IDs. Random stream IDs correlate native SDK dispatches only; dispatch index is not a Core retry count."), (0, react.createElement)("p", {
7723
+ } }, "Separate opt-in: retain at most 128 content-free physical requests and 128 credential-change observations for 24 hours within the shared storage cap. Includes model, payload byte counts, transport timing, HTTP status, terminal categories and fixed credential qualification reasons, not bodies, credentials, URLs, headers or Session/turn IDs. Random stream IDs correlate native SDK dispatches only; dispatch index is not a Core retry count."), (0, react.createElement)("p", {
7642
7724
  role: "status",
7643
7725
  style: { margin: 0 }
7644
- }, !remote ? "Diagnostics controls are unavailable in this connection." : !view ? busy ? "Reading local collection status…" : "Collection status is unknown." : `${view.enabled ? view.state === "ready" ? "Local collection enabled" : "Local collection configured on; storage not ready" : "Local collection paused"} · Storage ${view.state}` + (view.diagnostic === "none" ? "" : ` · ${view.diagnostic}`) + (view.dirty ? " · Not all observations are persisted yet" : "")), failed ? (0, react.createElement)("p", {
7645
- role: "alert",
7646
- style: { margin: 0 }
7647
- }, "Could not confirm the operation. Read status before retrying; no write is automatically replayed.") : null, clientDiagnosticsReportingFailed() ? (0, react.createElement)("p", {
7726
+ }, !remote ? "Diagnostics controls are unavailable in this connection." : !view ? busy ? "Reading local collection status…" : "Collection status is unknown." : `${view.enabled ? view.state === "ready" ? "Local collection enabled" : "Local collection configured on; storage not ready" : "Local collection paused"} · Storage ${view.state}` + (view.diagnostic === "none" ? "" : ` · ${view.diagnostic}`) + (view.dirty ? " · Not all observations are persisted yet" : "")), clientDiagnosticsReportingFailed() ? (0, react.createElement)("p", {
7648
7727
  role: "alert",
7649
7728
  style: { margin: 0 }
7650
7729
  }, "Some Client observations could not be confirmed. Client counts are incomplete; Host counts are separate.") : null, (0, react.createElement)("div", { style: {