dsh-agy-link 0.6.30 → 0.6.31
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 +10 -0
- package/dist/index.js +38 -25
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.31 (2026-11-16)
|
|
4
|
+
|
|
5
|
+
### English
|
|
6
|
+
|
|
7
|
+
- **Refactor(host): extract the effort-unsupported persistence into its own store (5-day review).** `createEffortUnsupportedStore()` now owns the file path, the filter/dedupe rules, the picker notification and the live-reload invariant; the composition factory only wires it in. `src/host/services.ts` drops from 599 to 576 lines, giving the three modules that sat on the 600-line ceiling real headroom again. **No behaviour change** — the existing `HostServices` surface and `test/services.test.ts` contract are unchanged, and the new module has its own filesystem-level tests (filtering, invalid/missing file, live reload, dedupe, persistence failure). Architecture/budget gates stay at 215 modules, 0 cycles, 0 violations.
|
|
8
|
+
|
|
9
|
+
### 中文
|
|
10
|
+
|
|
11
|
+
- **重构(host):把 effort-unsupported 持久化拆成独立 store(5 天全面 review)。** `createEffortUnsupportedStore()` 统一持有文件路径、过滤/去重规则、picker 广播与即时重载不变式;组合工厂只负责装配。`src/host/services.ts` 从 599 行降到 576 行,让三处贴在 600 行上限的模块重新有了余量。**行为零变化**:`HostServices` 对外形状与 `test/services.test.ts` 契约保持不变,新模块自带文件系统级测试(过滤、缺失/非法文件、外部修改即时生效、去重、写盘失败)。架构/预算门禁仍为 215 模块、0 环、0 违规。
|
|
12
|
+
|
|
3
13
|
## 0.6.30 (2026-11-16)
|
|
4
14
|
|
|
5
15
|
### English
|
package/dist/index.js
CHANGED
|
@@ -39116,6 +39116,35 @@ var QuotaService = class {
|
|
|
39116
39116
|
}
|
|
39117
39117
|
};
|
|
39118
39118
|
//#endregion
|
|
39119
|
+
//#region src/host/effort-unsupported-store.ts
|
|
39120
|
+
function createEffortUnsupportedStore(deps) {
|
|
39121
|
+
const path = () => join(deps.stateDir(), "effort-unsupported.json");
|
|
39122
|
+
const read = () => {
|
|
39123
|
+
try {
|
|
39124
|
+
const raw = existsSync(path()) ? JSON.parse(readFileSync(path(), "utf8")) : [];
|
|
39125
|
+
return Array.isArray(raw) ? raw.filter((m) => typeof m === "string" && m.trim() !== "") : [];
|
|
39126
|
+
} catch {
|
|
39127
|
+
return [];
|
|
39128
|
+
}
|
|
39129
|
+
};
|
|
39130
|
+
const remember = (model) => {
|
|
39131
|
+
const known = read();
|
|
39132
|
+
if (known.some((m) => m.trim().toLowerCase() === model.trim().toLowerCase())) return;
|
|
39133
|
+
const next = [...known, model];
|
|
39134
|
+
try {
|
|
39135
|
+
mkdirSync(deps.stateDir(), { recursive: true });
|
|
39136
|
+
writeFileSync(path(), JSON.stringify(next, null, 2), "utf8");
|
|
39137
|
+
} catch (e) {
|
|
39138
|
+
deps.log?.("failed to persist the effort-unsupported list: " + String(e));
|
|
39139
|
+
}
|
|
39140
|
+
deps.notifyPicker();
|
|
39141
|
+
};
|
|
39142
|
+
return {
|
|
39143
|
+
read,
|
|
39144
|
+
remember
|
|
39145
|
+
};
|
|
39146
|
+
}
|
|
39147
|
+
//#endregion
|
|
39119
39148
|
//#region src/features/warmup/policy.ts
|
|
39120
39149
|
/** Canonical model route resolution for upstream Google Cloud Code PA endpoints. */
|
|
39121
39150
|
function toCanonicalWarmupModel(model) {
|
|
@@ -39673,27 +39702,11 @@ function createHostServices(ctx, entryConfig = {}) {
|
|
|
39673
39702
|
cfg: getConfig(),
|
|
39674
39703
|
telemetryFlags: true
|
|
39675
39704
|
});
|
|
39676
|
-
const
|
|
39677
|
-
|
|
39678
|
-
|
|
39679
|
-
|
|
39680
|
-
|
|
39681
|
-
} catch {
|
|
39682
|
-
return [];
|
|
39683
|
-
}
|
|
39684
|
-
};
|
|
39685
|
-
const rememberEffortUnsupported = (model) => {
|
|
39686
|
-
const known = readEffortUnsupported();
|
|
39687
|
-
if (known.some((m) => m.trim().toLowerCase() === model.trim().toLowerCase())) return;
|
|
39688
|
-
const next = [...known, model];
|
|
39689
|
-
try {
|
|
39690
|
-
mkdirSync(stateDir(), { recursive: true });
|
|
39691
|
-
writeFileSync(effortUnsupportedPath(), JSON.stringify(next, null, 2), "utf8");
|
|
39692
|
-
} catch (e) {
|
|
39693
|
-
log("failed to persist the effort-unsupported list: " + String(e));
|
|
39694
|
-
}
|
|
39695
|
-
notifyPicker();
|
|
39696
|
-
};
|
|
39705
|
+
const effortStore = createEffortUnsupportedStore({
|
|
39706
|
+
stateDir,
|
|
39707
|
+
notifyPicker,
|
|
39708
|
+
log
|
|
39709
|
+
});
|
|
39697
39710
|
/** The DSH session's own workspace (agy runs there, per the translation spec). */
|
|
39698
39711
|
const sessionWorkspace = (sessionId) => {
|
|
39699
39712
|
return ctx.get("sessions")?.get(sessionId)?.header?.cwd;
|
|
@@ -39782,8 +39795,8 @@ function createHostServices(ctx, entryConfig = {}) {
|
|
|
39782
39795
|
log,
|
|
39783
39796
|
runs,
|
|
39784
39797
|
getMediaBaseUrl: () => webServerPort.current ? `http://127.0.0.1:${webServerPort.current}/plugins/agy-link/media` : null,
|
|
39785
|
-
effortUnsupported: () =>
|
|
39786
|
-
onEffortUnsupported: (model) =>
|
|
39798
|
+
effortUnsupported: () => effortStore.read(),
|
|
39799
|
+
onEffortUnsupported: (model) => effortStore.remember(model),
|
|
39787
39800
|
sessionCwd: (sessionId) => sessionWorkspace(sessionId),
|
|
39788
39801
|
sessionGoal: (sessionId) => {
|
|
39789
39802
|
try {
|
|
@@ -40025,8 +40038,8 @@ function createHostServices(ctx, entryConfig = {}) {
|
|
|
40025
40038
|
adapter,
|
|
40026
40039
|
translation,
|
|
40027
40040
|
setOverride,
|
|
40028
|
-
readEffortUnsupported,
|
|
40029
|
-
rememberEffortUnsupported,
|
|
40041
|
+
readEffortUnsupported: effortStore.read,
|
|
40042
|
+
rememberEffortUnsupported: effortStore.remember,
|
|
40030
40043
|
sessionsSvc,
|
|
40031
40044
|
sessionAuto,
|
|
40032
40045
|
get lastRun() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-agy-link",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.31",
|
|
4
4
|
"description": "Google Antigravity (agy CLI) models for DeepSeek Harness — stream Gemini/Claude/GPT-OSS subscriptions into DSH with thinking, tool activity, token usage and in-GUI Google OAuth login.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|