dsh-github-copilot 0.4.2-alpha.2 → 0.4.2-alpha.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/CHANGELOG.md +7 -1
- package/README.md +12 -7
- package/README.zh.md +10 -7
- package/deployment-baseline.json +1 -1
- package/docs/plugin-diagnostics.md +9 -0
- package/lib/client.js +148 -47
- package/lib/client.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/types/native-settings-style.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.2-alpha.3 (prepared)
|
|
4
|
+
|
|
5
|
+
- Put daily Auto allocation aggregate rows in the primary Local diagnostics view, with UTC date, policy, model, decision cohort, opportunities, expected selections, selected counts and no-fit decisions. Keep cohorts distinct and state that these counts do not prove execution, quality or billing.
|
|
6
|
+
- Move account/Checking and compaction tables, collection controls, and data-scope/limits/JSON guidance into collapsed disclosures. Preserve status retry access, independent default-off switches and separately confirmed clear behavior.
|
|
7
|
+
- Match disclosure summaries and aggregate tables to native settings typography. Update bilingual usage guidance and add focused component regressions; no collection, CAS, storage, privacy or routing policy changes.
|
|
8
|
+
|
|
3
9
|
## 0.4.2-alpha.1 (publication blocked: immutable tag metadata)
|
|
4
10
|
|
|
5
11
|
- 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.
|
|
@@ -7,7 +13,7 @@
|
|
|
7
13
|
- 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
14
|
- Add collector, UI, Remote codec and storage-gateway regression coverage; synthetic tests do not establish live Desktop activation or Auto performance.
|
|
9
15
|
|
|
10
|
-
## 0.4.2-alpha.2 (
|
|
16
|
+
## 0.4.2-alpha.2 (published)
|
|
11
17
|
|
|
12
18
|
- Carry forward the default-off local Auto allocation observations from the unpublished `0.4.2-alpha.1` candidate.
|
|
13
19
|
- Accept the repository's `(prepared)` changelog heading in the release preflight and verify exactly one version section before publishing.
|
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.
|
|
11
|
+
**Stable release: [`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1); prepared prerelease: `0.4.2-alpha.3`.** `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,7 +49,12 @@ to a new local report file and never scans, uploads or changes collection. Pause
|
|
|
49
49
|
preserves evidence; Clear requires separate confirmation. Client/Host
|
|
50
50
|
populations, uncovered paths and reporting/storage gaps remain explicit.
|
|
51
51
|
Descriptive counts are not reconstructed history, failure rates or proof of an
|
|
52
|
-
improvement.
|
|
52
|
+
improvement. The diagnostics page opens on a daily Auto allocation table by UTC
|
|
53
|
+
date, policy, model and cohort, with opportunities, expected selections, selected
|
|
54
|
+
counts and no-fit decisions. Compare expected and selected counts only within
|
|
55
|
+
matching cohorts. Account/Checking and compaction reports, collection controls,
|
|
56
|
+
and detailed scope, limits and JSON are in collapsed disclosures; clearing still
|
|
57
|
+
requires separate confirmation.
|
|
53
58
|
|
|
54
59
|
To analyze an explicitly qualified file from a built package or source checkout:
|
|
55
60
|
|
|
@@ -100,10 +105,10 @@ Supply any launcher patches with repeated `--patch /absolute/file`. Require `sup
|
|
|
100
105
|
For a **standalone named profile**:
|
|
101
106
|
|
|
102
107
|
```sh
|
|
103
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
108
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.3/dsh-github-copilot-0.4.2-alpha.3.tgz
|
|
104
109
|
```
|
|
105
110
|
|
|
106
|
-
For **Desktop**, its native package manager accepts an exact npm spec, for example `dsh-github-copilot@0.4.2-alpha.
|
|
111
|
+
For **Desktop**, its native package manager accepts an exact npm spec, for example `dsh-github-copilot@0.4.2-alpha.3`; 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.
|
|
107
112
|
|
|
108
113
|
After an approved reload/restart:
|
|
109
114
|
|
|
@@ -279,14 +284,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
|
|
|
279
284
|
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.
|
|
280
285
|
|
|
281
286
|
```sh
|
|
282
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
283
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
287
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.3/dsh-github-copilot-0.4.2-alpha.3.tgz
|
|
288
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.3/SHA256SUMS
|
|
284
289
|
sha256sum --check SHA256SUMS
|
|
285
290
|
```
|
|
286
291
|
|
|
287
292
|
```powershell
|
|
288
293
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
289
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.
|
|
294
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.3.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
290
295
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
291
296
|
```
|
|
292
297
|
|
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.
|
|
11
|
+
**稳定版:[`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1);待发布预览版:`0.4.2-alpha.3`。** `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
|
|
|
@@ -37,7 +37,10 @@ Session/turn ID、对话内容,也不推断执行/结果,不自动调参
|
|
|
37
37
|
**Auto allocation observation** 才会单独收集 Auto 分配汇总。包内另提供显式离线分析器,
|
|
38
38
|
只处理调用者指定的持久化单元或经审阅的聚合视图,并且只新建本地报告文件;不会扫描、
|
|
39
39
|
上传或更改采集设置。暂停保留证据,清除需单独确认。Client/Host 分开统计,未覆盖路径、
|
|
40
|
-
|
|
40
|
+
报告丢失与存储故障明确显示。描述性计数不是历史重建、错误率,也不表示优化效果已被验证。诊断页默认显示按 UTC 日期、
|
|
41
|
+
策略、模型和 cohort 划分的 Auto 分配每日汇总表,包含候选机会、预期选择、实际选择及
|
|
42
|
+
no-fit 决策;只能在匹配 cohort 内比较预期与实际选择。账号/Checking 和压缩报告、采集控制、
|
|
43
|
+
详细范围/限制/JSON 位于折叠区;清除仍需单独确认。
|
|
41
44
|
|
|
42
45
|
在已构建的包或源码 checkout 内,显式分析已核验的文件:
|
|
43
46
|
|
|
@@ -88,10 +91,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
88
91
|
**独立具名 profile**:
|
|
89
92
|
|
|
90
93
|
```sh
|
|
91
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
94
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.3/dsh-github-copilot-0.4.2-alpha.3.tgz
|
|
92
95
|
```
|
|
93
96
|
|
|
94
|
-
**Desktop** 原生包管理器接受精确 npm spec,例如 `dsh-github-copilot@0.4.2-alpha.
|
|
97
|
+
**Desktop** 原生包管理器接受精确 npm spec,例如 `dsh-github-copilot@0.4.2-alpha.3`;稳定版发布到 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 或删除配置。
|
|
95
98
|
|
|
96
99
|
经批准 reload/restart 后:
|
|
97
100
|
|
|
@@ -267,14 +270,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
|
|
|
267
270
|
GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。
|
|
268
271
|
|
|
269
272
|
```sh
|
|
270
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
271
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
273
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.3/dsh-github-copilot-0.4.2-alpha.3.tgz
|
|
274
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.3/SHA256SUMS
|
|
272
275
|
sha256sum --check SHA256SUMS
|
|
273
276
|
```
|
|
274
277
|
|
|
275
278
|
```powershell
|
|
276
279
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
277
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.
|
|
280
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.3.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
278
281
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
279
282
|
```
|
|
280
283
|
|
package/deployment-baseline.json
CHANGED
|
@@ -22,6 +22,15 @@ 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,
|
|
26
|
+
decision cohort, opportunities, expected selections, selected counts and no-fit
|
|
27
|
+
decisions. Compare expected and selected counts only within matching cohorts;
|
|
28
|
+
these aggregates do not establish execution, quality or billing. Account and
|
|
29
|
+
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.
|
|
32
|
+
Clearing aggregates still requires its separate confirmation.
|
|
33
|
+
|
|
25
34
|
Use the plugin normally: account selection, Identity/Checking and compaction
|
|
26
35
|
will contribute independent Client/Host populations. Auto model allocation has a
|
|
27
36
|
separate **Enable Auto allocation observation** control and its own hidden,
|
package/lib/client.js
CHANGED
|
@@ -444,7 +444,7 @@ window.__ModuleLoader__.load({
|
|
|
444
444
|
[data-copilot-native-ui] summary {
|
|
445
445
|
width: fit-content; max-width: 100%; padding: 2px 4px; margin-left: -4px;
|
|
446
446
|
border-radius: var(--dsw-radius-sm, 8px); cursor: pointer;
|
|
447
|
-
font
|
|
447
|
+
font: inherit; font-weight: 500;
|
|
448
448
|
color: var(--dsw-alias-label-secondary, GrayText); list-style: none;
|
|
449
449
|
}
|
|
450
450
|
[data-copilot-native-ui] summary::-webkit-details-marker { display: none; }
|
|
@@ -7074,7 +7074,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7074
7074
|
};
|
|
7075
7075
|
//#endregion
|
|
7076
7076
|
//#region package.json
|
|
7077
|
-
var version = "0.4.2-alpha.
|
|
7077
|
+
var version = "0.4.2-alpha.3";
|
|
7078
7078
|
//#endregion
|
|
7079
7079
|
//#region lib/types/diagnostics-client.js
|
|
7080
7080
|
let owner;
|
|
@@ -7309,6 +7309,48 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7309
7309
|
const autoSelections = auto?.rows.reduce((sum, row) => sum + row.selections, 0) ?? 0;
|
|
7310
7310
|
const autoNoFit = auto?.noFitRows.reduce((sum, row) => sum + row.decisions, 0) ?? 0;
|
|
7311
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`;
|
|
7312
|
+
const autoRows = auto ? [...auto.rows.map((row) => ({
|
|
7313
|
+
key: JSON.stringify([
|
|
7314
|
+
row.day,
|
|
7315
|
+
row.version,
|
|
7316
|
+
row.policyVersion,
|
|
7317
|
+
row.modelId,
|
|
7318
|
+
row.targetCategory,
|
|
7319
|
+
row.category,
|
|
7320
|
+
row.demand,
|
|
7321
|
+
row.assessmentSource,
|
|
7322
|
+
row.method,
|
|
7323
|
+
row.fallback,
|
|
7324
|
+
row.highCost,
|
|
7325
|
+
row.previous
|
|
7326
|
+
]),
|
|
7327
|
+
day: row.day,
|
|
7328
|
+
policy: row.policyVersion,
|
|
7329
|
+
model: row.modelId,
|
|
7330
|
+
cohort: `${row.targetCategory} → ${row.category} · ${row.demand} · ${row.assessmentSource} · ${row.method}` + (row.fallback ? " · fallback" : "") + (row.highCost ? " · high-cost" : "") + (row.previous ? " · continuity" : ""),
|
|
7331
|
+
opportunities: row.opportunities,
|
|
7332
|
+
expected: row.expectedSelections,
|
|
7333
|
+
selected: row.selections,
|
|
7334
|
+
noFit: null
|
|
7335
|
+
})), ...auto.noFitRows.map((row) => ({
|
|
7336
|
+
key: JSON.stringify([
|
|
7337
|
+
row.day,
|
|
7338
|
+
row.version,
|
|
7339
|
+
row.policyVersion,
|
|
7340
|
+
row.targetCategory,
|
|
7341
|
+
row.category,
|
|
7342
|
+
row.demand,
|
|
7343
|
+
row.assessmentSource
|
|
7344
|
+
]),
|
|
7345
|
+
day: row.day,
|
|
7346
|
+
policy: row.policyVersion,
|
|
7347
|
+
model: "—",
|
|
7348
|
+
cohort: `${row.targetCategory} → ${row.category} · ${row.demand} · ${row.assessmentSource} · no fit`,
|
|
7349
|
+
opportunities: null,
|
|
7350
|
+
expected: null,
|
|
7351
|
+
selected: null,
|
|
7352
|
+
noFit: row.decisions
|
|
7353
|
+
}))].sort((left, right) => right.day - left.day || left.policy.localeCompare(right.policy) || left.model.localeCompare(right.model)) : [];
|
|
7312
7354
|
const populations = [...new Set(rows.filter((row) => row.operation !== "collection").map((row) => `${row.layer}/${row.operation}`))];
|
|
7313
7355
|
const count = (metrics, population) => rows.filter((row) => metrics.includes(row.metric) && `${row.layer}/${row.operation}` === population).reduce((sum, row) => sum + row.count, 0);
|
|
7314
7356
|
const control = (label, action, disabled = false) => (0, react.createElement)("button", {
|
|
@@ -7321,53 +7363,83 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7321
7363
|
"aria-label": "Local diagnostics",
|
|
7322
7364
|
"data-copilot-native-ui": true,
|
|
7323
7365
|
style: section
|
|
7324
|
-
}, (0, react.createElement)("style", null, nativeSettingsCss), (0, react.createElement)("h3", { style: nativeHeadingStyle }, "Local diagnostics"), (0, react.createElement)("
|
|
7325
|
-
|
|
7326
|
-
|
|
7327
|
-
|
|
7328
|
-
} },
|
|
7329
|
-
role: "status",
|
|
7330
|
-
style: { margin: 0 }
|
|
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", {
|
|
7366
|
+
}, (0, react.createElement)("style", null, nativeSettingsCss), (0, react.createElement)("h3", { style: nativeHeadingStyle }, "Local diagnostics"), (0, react.createElement)("div", { style: {
|
|
7367
|
+
display: "grid",
|
|
7368
|
+
gap: 8,
|
|
7369
|
+
minWidth: 0
|
|
7370
|
+
} }, (0, react.createElement)("h4", { style: nativeHeadingStyle }, "Auto allocation observations"), (0, react.createElement)("p", {
|
|
7332
7371
|
role: "status",
|
|
7333
7372
|
style: { margin: 0 }
|
|
7334
|
-
},
|
|
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", {
|
|
7339
|
-
role: "alert",
|
|
7340
|
-
style: { margin: 0 }
|
|
7341
|
-
}, "Could not confirm the operation. Read status before retrying; no write is automatically replayed.") : null, clientDiagnosticsReportingFailed() ? (0, react.createElement)("p", {
|
|
7342
|
-
role: "alert",
|
|
7343
|
-
style: { margin: 0 }
|
|
7344
|
-
}, "Some Client observations could not be confirmed. Client counts are incomplete; Host counts are separate.") : null, (0, react.createElement)("div", { style: {
|
|
7345
|
-
display: "flex",
|
|
7346
|
-
flexWrap: "wrap",
|
|
7347
|
-
gap: 8
|
|
7348
|
-
} }, control("Read status", () => {
|
|
7349
|
-
run((value) => value.get());
|
|
7350
|
-
}, !remote), control(view?.enabled ? "Pause collection" : "Enable local collection", () => {
|
|
7351
|
-
run((value) => value.setEnabled(!view?.enabled));
|
|
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", {
|
|
7355
|
-
role: "group",
|
|
7356
|
-
"aria-label": "Confirm clearing local diagnostics"
|
|
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", () => {
|
|
7358
|
-
setConfirmClear(false);
|
|
7359
|
-
run((value) => value.clear());
|
|
7360
|
-
}), control("Cancel", () => setConfirmClear(false))) : null, view && populations.length ? (0, react.createElement)("div", { style: {
|
|
7373
|
+
}, !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: {
|
|
7361
7374
|
overflowX: "auto",
|
|
7362
7375
|
minWidth: 0
|
|
7363
7376
|
} }, (0, react.createElement)("table", { style: {
|
|
7364
7377
|
width: "100%",
|
|
7365
7378
|
borderCollapse: "collapse",
|
|
7366
|
-
textAlign: "left"
|
|
7379
|
+
textAlign: "left",
|
|
7380
|
+
font: "inherit"
|
|
7367
7381
|
} }, (0, react.createElement)("caption", { style: {
|
|
7382
|
+
...nativeCaptionStyle,
|
|
7368
7383
|
textAlign: "left",
|
|
7369
7384
|
marginBottom: 8
|
|
7370
|
-
} }, "
|
|
7385
|
+
} }, "Daily aggregates by matching policy, model and decision cohort"), (0, react.createElement)("thead", null, (0, react.createElement)("tr", null, ...[
|
|
7386
|
+
"Date (UTC)",
|
|
7387
|
+
"Policy",
|
|
7388
|
+
"Model",
|
|
7389
|
+
"Cohort",
|
|
7390
|
+
"Opportunities",
|
|
7391
|
+
"Expected",
|
|
7392
|
+
"Selected",
|
|
7393
|
+
"No-fit"
|
|
7394
|
+
].map((label) => (0, react.createElement)("th", {
|
|
7395
|
+
key: label,
|
|
7396
|
+
scope: "col",
|
|
7397
|
+
style: {
|
|
7398
|
+
padding: 6,
|
|
7399
|
+
font: "inherit",
|
|
7400
|
+
fontWeight: 500,
|
|
7401
|
+
textAlign: label === "Cohort" || label === "Model" ? "left" : "right"
|
|
7402
|
+
}
|
|
7403
|
+
}, label)))), (0, react.createElement)("tbody", null, ...autoRows.map((row) => (0, react.createElement)("tr", { key: row.key }, (0, react.createElement)("td", { style: {
|
|
7404
|
+
padding: 6,
|
|
7405
|
+
whiteSpace: "nowrap"
|
|
7406
|
+
} }, new Date(row.day).toISOString().slice(0, 10)), (0, react.createElement)("td", { style: {
|
|
7407
|
+
padding: 6,
|
|
7408
|
+
overflowWrap: "anywhere"
|
|
7409
|
+
} }, row.policy), (0, react.createElement)("td", { style: {
|
|
7410
|
+
padding: 6,
|
|
7411
|
+
overflowWrap: "anywhere"
|
|
7412
|
+
} }, row.model), (0, react.createElement)("td", { style: {
|
|
7413
|
+
padding: 6,
|
|
7414
|
+
minWidth: 220
|
|
7415
|
+
} }, row.cohort), (0, react.createElement)("td", { style: {
|
|
7416
|
+
padding: 6,
|
|
7417
|
+
textAlign: "right"
|
|
7418
|
+
} }, row.opportunities ?? "—"), (0, react.createElement)("td", { style: {
|
|
7419
|
+
padding: 6,
|
|
7420
|
+
textAlign: "right"
|
|
7421
|
+
} }, row.expected === null ? "—" : row.expected.toFixed(3)), (0, react.createElement)("td", { style: {
|
|
7422
|
+
padding: 6,
|
|
7423
|
+
textAlign: "right"
|
|
7424
|
+
} }, row.selected ?? "—"), (0, react.createElement)("td", { style: {
|
|
7425
|
+
padding: 6,
|
|
7426
|
+
textAlign: "right"
|
|
7427
|
+
} }, 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: {
|
|
7428
|
+
...nativeCaptionStyle,
|
|
7429
|
+
margin: 0
|
|
7430
|
+
} }, `${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.`) : null), view && populations.length ? (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Account and compaction observations"), (0, react.createElement)("div", { style: {
|
|
7431
|
+
overflowX: "auto",
|
|
7432
|
+
minWidth: 0
|
|
7433
|
+
} }, (0, react.createElement)("table", { style: {
|
|
7434
|
+
width: "100%",
|
|
7435
|
+
borderCollapse: "collapse",
|
|
7436
|
+
textAlign: "left",
|
|
7437
|
+
font: "inherit"
|
|
7438
|
+
} }, (0, react.createElement)("caption", { style: {
|
|
7439
|
+
...nativeCaptionStyle,
|
|
7440
|
+
textAlign: "left",
|
|
7441
|
+
marginBottom: 8
|
|
7442
|
+
} }, "Independent Client and Host populations"), (0, react.createElement)("thead", null, (0, react.createElement)("tr", null, ...[
|
|
7371
7443
|
"Population",
|
|
7372
7444
|
"Started",
|
|
7373
7445
|
"Success",
|
|
@@ -7378,10 +7450,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7378
7450
|
].map((label) => (0, react.createElement)("th", {
|
|
7379
7451
|
key: label,
|
|
7380
7452
|
scope: "col",
|
|
7381
|
-
style: {
|
|
7453
|
+
style: {
|
|
7454
|
+
padding: 6,
|
|
7455
|
+
font: "inherit",
|
|
7456
|
+
fontWeight: 500
|
|
7457
|
+
}
|
|
7382
7458
|
}, label)))), (0, react.createElement)("tbody", null, ...populations.map((population) => (0, react.createElement)("tr", { key: population }, (0, react.createElement)("th", {
|
|
7383
7459
|
scope: "row",
|
|
7384
|
-
style: {
|
|
7460
|
+
style: {
|
|
7461
|
+
padding: 6,
|
|
7462
|
+
font: "inherit",
|
|
7463
|
+
fontWeight: 500
|
|
7464
|
+
}
|
|
7385
7465
|
}, population), ...[
|
|
7386
7466
|
"started",
|
|
7387
7467
|
"success",
|
|
@@ -7397,11 +7477,32 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7397
7477
|
"revoked",
|
|
7398
7478
|
"environment-fault",
|
|
7399
7479
|
"unknown"
|
|
7400
|
-
], population))))))) : null, view && !populations.length ? (0, react.createElement)("
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7480
|
+
], 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", {
|
|
7481
|
+
role: "status",
|
|
7482
|
+
style: { margin: 0 }
|
|
7483
|
+
}, !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", {
|
|
7484
|
+
role: "alert",
|
|
7485
|
+
style: { margin: 0 }
|
|
7486
|
+
}, "Could not confirm the operation. Read status before retrying; no write is automatically replayed.") : null, clientDiagnosticsReportingFailed() ? (0, react.createElement)("p", {
|
|
7487
|
+
role: "alert",
|
|
7488
|
+
style: { margin: 0 }
|
|
7489
|
+
}, "Some Client observations could not be confirmed. Client counts are incomplete; Host counts are separate.") : null, (0, react.createElement)("div", { style: {
|
|
7490
|
+
display: "flex",
|
|
7491
|
+
flexWrap: "wrap",
|
|
7492
|
+
gap: 8
|
|
7493
|
+
} }, control("Read status", () => {
|
|
7494
|
+
run((value) => value.get());
|
|
7495
|
+
}, !remote), control(view?.enabled ? "Pause collection" : "Enable local collection", () => {
|
|
7496
|
+
run((value) => value.setEnabled(!view?.enabled));
|
|
7497
|
+
}, !remote || !view || !view.enabled && view.state !== "ready"), control(view?.autoAllocationEnabled ? "Pause Auto allocation observation" : "Enable Auto allocation observation", () => {
|
|
7498
|
+
run((value) => value.setAutoAllocationEnabled(!view?.autoAllocationEnabled));
|
|
7499
|
+
}, !remote || !view || !view.autoAllocationEnabled && view.state !== "ready"), control("Clear local aggregates", () => setConfirmClear(true), !remote || !view || view.state !== "ready")), confirmClear ? (0, react.createElement)("div", {
|
|
7500
|
+
role: "group",
|
|
7501
|
+
"aria-label": "Confirm clearing local diagnostics"
|
|
7502
|
+
}, (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", () => {
|
|
7503
|
+
setConfirmClear(false);
|
|
7504
|
+
run((value) => value.clear());
|
|
7505
|
+
}), control("Cancel", () => setConfirmClear(false))) : null), view ? (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Data scope, limits and JSON"), (0, react.createElement)("p", { style: { margin: 0 } }, "Observations stay in this profile for 14 days. Auto rows contain policy/model/cohort dimensions and aggregate counts only; no Session or turn IDs, conversation content, upload or automatic tuning. Expired counts are strata, not removed decisions."), (0, react.createElement)("p", { style: { margin: 0 } }, `Host pending: ${view.snapshot.pending.reduce((sum, row) => sum + row.count, 0)}. Host dropped: ${view.snapshot.dropped}; Client dropped: ${view.snapshot.clientDropped}; Client unconfirmed: ${view.snapshot.clientUnconfirmed}; evicted/expired: ${view.snapshot.evicted}; saturated: ${view.snapshot.saturated}. At most 4,096 aggregate rows and 2 MiB. Client pending samples are periodic observations, not a live outstanding count. Other settled includes policy rejection, revocation, environment faults and unknown/no-checkpoint results. Stock/custom-engine physical summaries, native recovery opt-out, OAuth, quota and unwrapped RPCs are not covered.`), (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Review aggregate-only JSON"), (0, react.createElement)("p", { style: { margin: 0 } }, "Review before sharing. This includes build versions, hour windows and fixed diagnostic counts, never account or Session identifiers."), control("Prepare current JSON", () => setExported(true)), exported ? (0, react.createElement)("textarea", {
|
|
7405
7506
|
"aria-label": "Local diagnostics aggregate JSON",
|
|
7406
7507
|
readOnly: true,
|
|
7407
7508
|
value: JSON.stringify(view, null, 2),
|
|
@@ -7411,7 +7512,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7411
7512
|
boxSizing: "border-box",
|
|
7412
7513
|
font: "inherit"
|
|
7413
7514
|
}
|
|
7414
|
-
}) : null) : null);
|
|
7515
|
+
}) : null)) : null);
|
|
7415
7516
|
}
|
|
7416
7517
|
//#endregion
|
|
7417
7518
|
//#region lib/types/reasoning-presentation.js
|