dsh-github-copilot 0.4.1 → 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/CHANGELOG.md +12 -0
- package/README.md +27 -19
- package/README.zh.md +20 -15
- package/deployment-baseline.json +1 -1
- package/docs/auto-high-cost.md +20 -8
- package/docs/plugin-diagnostics.md +18 -3
- package/lib/client.js +108 -7
- package/lib/client.js.map +1 -1
- package/lib/diagnostics-analysis.js +1 -1
- package/lib/diagnostics-types-Bl3QCfR0.js +509 -0
- package/lib/index.js +102 -111
- package/lib/manual-compaction-recovery.js +1 -1
- package/lib/remote.js +86 -0
- package/lib/routed-web.js +1 -1
- package/lib/types/auto-allocation-diagnostics.d.ts +102 -0
- package/lib/types/compaction-continuation.d.ts +1 -1
- package/lib/types/config.d.ts +6 -2
- package/lib/types/context-evidence.d.ts +4 -4
- package/lib/types/diagnostics-analysis.d.ts +1 -1
- package/lib/types/diagnostics-collector.d.ts +5 -0
- package/lib/types/diagnostics-host.d.ts +42 -1
- package/lib/types/diagnostics-remote.d.ts +6 -5
- package/lib/types/diagnostics-types.d.ts +174 -15
- package/lib/types/session-continuation-types.d.ts +2 -2
- package/lib/types/turn-selection.d.ts +3 -1
- package/package.json +2 -2
- package/lib/diagnostics-types-FVf6zjob.js +0 -182
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
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
|
+
|
|
3
15
|
## 0.4.1
|
|
4
16
|
|
|
5
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`.
|
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). Supported host: official DSH / Windows Desktop `0.2.0-rc.2
|
|
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
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
|
|
|
@@ -23,25 +23,33 @@ policy, not a price/quality ranking or proven savings.
|
|
|
23
23
|
|
|
24
24
|
The existing turn selection dialog exposes **Auto allocation observations**:
|
|
25
25
|
local retained opportunities, expected shares and actual selections for this
|
|
26
|
-
Session, with a read-only JSON export.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
30
35
|
prefers unmarked eligible Lightweight models separately. Advisor calls are not
|
|
31
|
-
implemented. See [requirements](./docs/auto-high-cost.md)
|
|
36
|
+
implemented. See [requirements](./docs/auto-high-cost.md),
|
|
37
|
+
[local diagnostics](./docs/plugin-diagnostics.md) and the
|
|
32
38
|
[required iteration review](./docs/evidence-driven-iteration.md).
|
|
33
39
|
|
|
34
40
|
The [local diagnostics pilot](./docs/plugin-diagnostics.md) records bounded
|
|
35
|
-
account/Checking and
|
|
41
|
+
account/Checking, compaction and Auto allocation aggregates, **default off**. After installing
|
|
36
42
|
and loading the published build, open the plugin detail settings page →
|
|
37
43
|
**Local diagnostics → Read status → Enable local collection**. This enables
|
|
38
|
-
local persistence, not uploads or scheduled
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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.
|
|
45
53
|
|
|
46
54
|
To analyze an explicitly qualified file from a built package or source checkout:
|
|
47
55
|
|
|
@@ -92,10 +100,10 @@ Supply any launcher patches with repeated `--patch /absolute/file`. Require `sup
|
|
|
92
100
|
For a **standalone named profile**:
|
|
93
101
|
|
|
94
102
|
```sh
|
|
95
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.
|
|
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
|
|
96
104
|
```
|
|
97
105
|
|
|
98
|
-
For **Desktop**, its native package manager accepts
|
|
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.
|
|
99
107
|
|
|
100
108
|
After an approved reload/restart:
|
|
101
109
|
|
|
@@ -271,14 +279,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
|
|
|
271
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.
|
|
272
280
|
|
|
273
281
|
```sh
|
|
274
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.
|
|
275
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.
|
|
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
|
|
276
284
|
sha256sum --check SHA256SUMS
|
|
277
285
|
```
|
|
278
286
|
|
|
279
287
|
```powershell
|
|
280
288
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
281
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.
|
|
289
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.2.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
282
290
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
283
291
|
```
|
|
284
292
|
|
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)
|
|
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
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
|
|
|
@@ -20,19 +20,24 @@
|
|
|
20
20
|
标记不改变手动选择或已接纳的 turn。这是路由政策,不是价格/质量排名,也不证明节省费用。
|
|
21
21
|
|
|
22
22
|
现有 turn 选择说明内提供 **Auto allocation observations**,显示当前 Session
|
|
23
|
-
保留的候选机会、预期份额与实际选择,并提供只读 JSON
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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)
|
|
27
31
|
与[强制迭代评审流程](./docs/evidence-driven-iteration.md)。
|
|
28
32
|
|
|
29
|
-
[本地诊断试点](./docs/plugin-diagnostics.md)记录有界的账号/Checking
|
|
33
|
+
[本地诊断试点](./docs/plugin-diagnostics.md)记录有界的账号/Checking、压缩与 Auto 分配
|
|
30
34
|
汇总,**默认关闭**。安装并加载已发布版本后,进入插件详情设置页 →
|
|
31
35
|
**Local diagnostics → Read status → Enable local collection**,开启本地持久化;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
仅用于账号/Checking 与压缩汇总,不上传或启用每日分析。另行启用
|
|
37
|
+
**Auto allocation observation** 才会单独收集 Auto 分配汇总。包内另提供显式离线分析器,
|
|
38
|
+
只处理调用者指定的持久化单元或经审阅的聚合视图,并且只新建本地报告文件;不会扫描、
|
|
39
|
+
上传或更改采集设置。暂停保留证据,清除需单独确认。Client/Host 分开统计,未覆盖路径、
|
|
40
|
+
报告丢失与存储故障明确显示。描述性计数不是历史重建、错误率,也不表示优化效果已被验证。
|
|
36
41
|
|
|
37
42
|
在已构建的包或源码 checkout 内,显式分析已核验的文件:
|
|
38
43
|
|
|
@@ -83,10 +88,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
83
88
|
**独立具名 profile**:
|
|
84
89
|
|
|
85
90
|
```sh
|
|
86
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.
|
|
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
|
|
87
92
|
```
|
|
88
93
|
|
|
89
|
-
**Desktop**
|
|
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 或删除配置。
|
|
90
95
|
|
|
91
96
|
经批准 reload/restart 后:
|
|
92
97
|
|
|
@@ -262,14 +267,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
|
|
|
262
267
|
GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。
|
|
263
268
|
|
|
264
269
|
```sh
|
|
265
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.
|
|
266
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.
|
|
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
|
|
267
272
|
sha256sum --check SHA256SUMS
|
|
268
273
|
```
|
|
269
274
|
|
|
270
275
|
```powershell
|
|
271
276
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
272
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.
|
|
277
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.2.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
273
278
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
274
279
|
```
|
|
275
280
|
|
package/deployment-baseline.json
CHANGED
package/docs/auto-high-cost.md
CHANGED
|
@@ -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
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Local diagnostics: account and
|
|
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.
|
|
27
|
-
|
|
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$
|
|
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$
|
|
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.
|
|
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" : "")),
|
|
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(
|
|
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?
|
|
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"
|