@aiwayds/dsh-model-sync 0.5.0 → 0.6.1
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/README.md +13 -10
- package/README.zh-CN.md +14 -9
- package/cordis.patch.yml +5 -4
- package/icon.svg +6 -0
- package/lib/builtin-catalog-snapshot.d.ts +9 -0
- package/lib/builtin-catalog-snapshot.js +2 -2
- package/lib/builtin-catalog-snapshot.js.map +1 -1
- package/lib/index.d.ts +149 -1
- package/lib/index.js +146 -42
- package/lib/index.js.map +1 -1
- package/lib/legacy-import.d.ts +72 -0
- package/lib/legacy-import.js +241 -0
- package/lib/legacy-import.js.map +1 -0
- package/lib/provider-native.d.ts +124 -0
- package/lib/provider-native.js +202 -0
- package/lib/provider-native.js.map +1 -0
- package/lib/route-credential.d.ts +2 -1
- package/lib/route-credential.js.map +1 -1
- package/lib/translate.d.ts +8 -0
- package/lib/translate.js.map +1 -1
- package/lib/writer.d.ts +2 -1
- package/lib/writer.js.map +1 -1
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +27 -24
- package/src/builtin-catalog-snapshot.ts +11 -2
- package/src/index.ts +196 -54
- package/src/legacy-import.ts +284 -0
- package/src/provider-native.ts +293 -0
- package/src/route-credential.ts +2 -1
- package/src/translate.ts +8 -0
- package/src/writer.ts +2 -1
package/lib/translate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translate.js","sourceRoot":"","sources":["../src/translate.ts"],"names":[],"mappings":"AAAA,oFAAoF;AAwFpF,8EAA8E;AAC9E,mCAAmC;AACnC,8EAA8E;AAE9E,sEAAsE;AACtE,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAA;AAC1E,CAAC;AAED,6EAA6E;AAC7E,MAAM,eAAe,GAAG,IAAI,GA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AAQ,CAAC,GAAG;gBAAE,QAAQ,CAAC,GAAG,GAAG,KAAK,CAAA;YACvC,IAAI,CAAC,QAAQ,CAAC,IAAI;gBAAE,QAAQ,CAAC,IAAI,GAAG,MAAM,CAAA;YAC1C,IAAI,CAAC,QAAQ,CAAC,GAAG;gBAAE,QAAQ,CAAC,GAAG,GAAG,KAAK,CAAA;QACzC,CAAC;QACD,OAAO,QAAQ,CAAA;IACjB,CAAC;IACD,8CAA8C;IAC9C,MAAM,IAAI,GAAkC,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,CAAA;IACxE,IAAI,KAAK;QAAE,IAAI,CAAC,GAAG,GAAG,KAAK,CAAA;IAC3B,OAAO,IAAI,CAAA;AACb,CAAC"}
|
package/lib/writer.d.ts
CHANGED
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
* stored ones (a re-added key is the user's latest intent).
|
|
30
30
|
* - Revision conflict retry: catch SETTINGS_CONFLICT, re-read, re-translate,
|
|
31
31
|
* re-write once
|
|
32
|
-
* - Never touches
|
|
32
|
+
* - Never touches the settings document directly (settings.yaml up to
|
|
33
|
+
* dsh 0.1.6, the profile patch on 0.1.7+) — only through settings.mutate
|
|
33
34
|
* - Store read failure: when the models-store read fails (corrupt JSON,
|
|
34
35
|
* EACCES, …) AND settings carries no overrides key, skip the round with
|
|
35
36
|
* reason 'store-unavailable' and leave settings.models untouched — the
|
package/lib/writer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writer.js","sourceRoot":"","sources":["../src/writer.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"writer.js","sourceRoot":"","sources":["../src/writer.ts"],"names":[],"mappings":"AAAA,sFAAsF;AA8GtF,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,2DAA2D;AAC3D,MAAM,iBAAiB,GAAG,mBAAmB,CAAA;AAE7C,8EAA8E;AAC9E,kCAAkC;AAClC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
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "dsh plugin: keep llm-pi-ai provider routes' model lists in step with the pi.dev gateway, written through the official settings seam",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
8
|
+
"icon": "./icon.svg",
|
|
8
9
|
"license": "MIT",
|
|
9
10
|
"keywords": [
|
|
10
11
|
"dsh",
|
|
@@ -25,23 +26,25 @@
|
|
|
25
26
|
"files": [
|
|
26
27
|
"lib",
|
|
27
28
|
"cordis.patch.yml",
|
|
28
|
-
"src"
|
|
29
|
+
"src",
|
|
30
|
+
"icon.svg",
|
|
31
|
+
"locale/*.json"
|
|
29
32
|
],
|
|
30
33
|
"scripts": {
|
|
31
34
|
"build": "tsc -p tsconfig.json",
|
|
32
35
|
"check": "tsc --noEmit -p tsconfig.json",
|
|
33
36
|
"pretest": "tsc -p tsconfig.json",
|
|
34
|
-
"test": "node --test test/live-catalog.test.mjs test/diff.test.mjs test/translate.test.mjs test/writer.test.mjs test/writer-overrides.test.mjs test/remote-catalog.test.mjs test/serviceability.test.mjs test/command.test.mjs test/real-cordis.test.mjs test/route-credential.test.mjs",
|
|
37
|
+
"test": "node --test test/live-catalog.test.mjs test/diff.test.mjs test/translate.test.mjs test/writer.test.mjs test/writer-overrides.test.mjs test/remote-catalog.test.mjs test/provider-native.test.mjs test/serviceability.test.mjs test/command.test.mjs test/real-cordis.test.mjs test/route-credential.test.mjs test/legacy-import.test.mjs",
|
|
35
38
|
"smoke": "node scripts/smoke-boot.mjs"
|
|
36
39
|
},
|
|
37
40
|
"dependencies": {},
|
|
38
41
|
"peerDependencies": {
|
|
39
42
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
40
|
-
"@deepseek-ai/dsh-commands": ">=0.1.
|
|
41
|
-
"@deepseek-ai/dsh-credentials": ">=0.1.
|
|
42
|
-
"@deepseek-ai/dsh-launch-environment": ">=0.1.
|
|
43
|
-
"@deepseek-ai/dsh-settings": ">=0.1.
|
|
44
|
-
"@deepseek-ai/schemastery": "^3.18.
|
|
43
|
+
"@deepseek-ai/dsh-commands": ">=0.1.7-rc.1",
|
|
44
|
+
"@deepseek-ai/dsh-credentials": ">=0.1.7-rc.1",
|
|
45
|
+
"@deepseek-ai/dsh-launch-environment": ">=0.1.7-rc.1",
|
|
46
|
+
"@deepseek-ai/dsh-settings": ">=0.1.7-rc.1",
|
|
47
|
+
"@deepseek-ai/schemastery": "^3.18.4"
|
|
45
48
|
},
|
|
46
49
|
"peerDependenciesMeta": {
|
|
47
50
|
"@deepseek-ai/cordis": {
|
|
@@ -65,20 +68,20 @@
|
|
|
65
68
|
},
|
|
66
69
|
"devDependencies": {
|
|
67
70
|
"@types/node": "^24.0.0",
|
|
68
|
-
"@deepseek-ai/cordis": "4.0.
|
|
69
|
-
"@deepseek-ai/dsh-agent": "0.1.
|
|
70
|
-
"@deepseek-ai/dsh-attachment": "0.1.
|
|
71
|
-
"@deepseek-ai/dsh-brand": "0.1.
|
|
72
|
-
"@deepseek-ai/dsh-commands": "0.1.
|
|
73
|
-
"@deepseek-ai/dsh-credentials": "0.1.
|
|
74
|
-
"@deepseek-ai/dsh-invariants": "0.1.
|
|
75
|
-
"@deepseek-ai/dsh-launch-environment": "0.1.
|
|
76
|
-
"@deepseek-ai/dsh-llm": "0.1.
|
|
77
|
-
"@deepseek-ai/dsh-scope": "0.1.
|
|
78
|
-
"@deepseek-ai/dsh-session": "0.1.
|
|
79
|
-
"@deepseek-ai/dsh-settings": "0.1.
|
|
80
|
-
"@deepseek-ai/dsh-typert-protocol": "0.1.
|
|
81
|
-
"@deepseek-ai/schemastery": "3.18.
|
|
71
|
+
"@deepseek-ai/cordis": "4.0.4",
|
|
72
|
+
"@deepseek-ai/dsh-agent": "0.1.7-rc.1",
|
|
73
|
+
"@deepseek-ai/dsh-attachment": "0.1.7-rc.1",
|
|
74
|
+
"@deepseek-ai/dsh-brand": "0.1.7-rc.1",
|
|
75
|
+
"@deepseek-ai/dsh-commands": "0.1.7-rc.1",
|
|
76
|
+
"@deepseek-ai/dsh-credentials": "0.1.7-rc.1",
|
|
77
|
+
"@deepseek-ai/dsh-invariants": "0.1.7-rc.1",
|
|
78
|
+
"@deepseek-ai/dsh-launch-environment": "0.1.7-rc.1",
|
|
79
|
+
"@deepseek-ai/dsh-llm": "0.1.7-rc.1",
|
|
80
|
+
"@deepseek-ai/dsh-scope": "0.1.7-rc.1",
|
|
81
|
+
"@deepseek-ai/dsh-session": "0.1.7-rc.1",
|
|
82
|
+
"@deepseek-ai/dsh-settings": "0.1.7-rc.1",
|
|
83
|
+
"@deepseek-ai/dsh-typert-protocol": "0.1.7-rc.1",
|
|
84
|
+
"@deepseek-ai/schemastery": "3.18.4",
|
|
82
85
|
"typescript": "^5.9.0"
|
|
83
86
|
},
|
|
84
87
|
"dsh": {
|
|
@@ -92,8 +95,8 @@
|
|
|
92
95
|
},
|
|
93
96
|
"pnpm": {
|
|
94
97
|
"overrides": {
|
|
95
|
-
"@deepseek-ai/dsh-system-prompt": "0.1.
|
|
96
|
-
"@deepseek-ai/dsh-session-projection": "0.1.
|
|
98
|
+
"@deepseek-ai/dsh-system-prompt": "0.1.7-rc.1",
|
|
99
|
+
"@deepseek-ai/dsh-session-projection": "0.1.7-rc.1"
|
|
97
100
|
}
|
|
98
101
|
}
|
|
99
102
|
}
|
|
@@ -9,6 +9,15 @@
|
|
|
9
9
|
*
|
|
10
10
|
* To regenerate: run `node scripts/generate-builtin-snapshot.mjs --generate`
|
|
11
11
|
*
|
|
12
|
+
* Entries marked `deprecated: true` are ids the official default model list
|
|
13
|
+
* dropped (dsh 0.1.7-rc.1 removed deepseek-v4-flash /
|
|
14
|
+
* deepseek-v4-flash-vision-exp; DeepSeek renamed deepseek-v4-flash →
|
|
15
|
+
* deepseek-flash on its own listing). The data is retained for historical
|
|
16
|
+
* user configurations: keepBuiltinOnly emission skips deprecated ids
|
|
17
|
+
* unless keepDeprecatedBuiltin opts back in. Marks and entries survive
|
|
18
|
+
* regeneration — this script re-adds them even when the installed catalog
|
|
19
|
+
* no longer lists the id.
|
|
20
|
+
*
|
|
12
21
|
* @module dsh-model-sync/builtin-catalog-snapshot
|
|
13
22
|
*/
|
|
14
23
|
|
|
@@ -27,8 +36,8 @@ export const BUILTIN_CATALOG_SNAPSHOT: BuiltinCatalogSnapshotMap = {
|
|
|
27
36
|
{ id: 'MiniMax-M3', api: 'anthropic-messages', maxTokens: 512000 }
|
|
28
37
|
],
|
|
29
38
|
'opencode-go': [
|
|
30
|
-
{ id: 'deepseek-v4-flash', api: 'openai-completions', maxTokens: 384000 },
|
|
31
|
-
{ id: 'deepseek-v4-flash-vision-exp', api: 'openai-completions', maxTokens: 384000 },
|
|
39
|
+
{ id: 'deepseek-v4-flash', api: 'openai-completions', maxTokens: 384000, deprecated: true },
|
|
40
|
+
{ id: 'deepseek-v4-flash-vision-exp', api: 'openai-completions', maxTokens: 384000, deprecated: true },
|
|
32
41
|
{ id: 'deepseek-v4-pro', api: 'openai-completions', maxTokens: 384000 },
|
|
33
42
|
{ id: 'glm-5.1', api: 'openai-completions', maxTokens: 32768 },
|
|
34
43
|
{ id: 'glm-5.2', api: 'openai-completions', maxTokens: 131072 },
|
package/src/index.ts
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Supports two write modes:
|
|
8
8
|
* - 'settings' (default): self-contained fetch → translate → settings.mutate
|
|
9
|
-
* pipeline that writes
|
|
9
|
+
* pipeline that writes through the host settings service (zero patch
|
|
10
|
+
* required; settings.yaml up to dsh 0.1.6, the profile patch on 0.1.7+)
|
|
10
11
|
* - 'overlay' (legacy): uses the patched dsh-llm-pi-ai's piAiCatalog.refresh()
|
|
11
12
|
* to overlay pi.dev entries in memory (requires patch)
|
|
12
13
|
*
|
|
@@ -35,6 +36,7 @@ import {
|
|
|
35
36
|
type SettingsModelProfile,
|
|
36
37
|
type TranslateOptions,
|
|
37
38
|
type DropWarning,
|
|
39
|
+
type BuiltinModelData,
|
|
38
40
|
} from './translate.ts'
|
|
39
41
|
import {
|
|
40
42
|
syncToSettings,
|
|
@@ -45,60 +47,108 @@ import {
|
|
|
45
47
|
import { BUILTIN_CATALOG_SNAPSHOT } from './builtin-catalog-snapshot.ts'
|
|
46
48
|
import { refreshLiveCatalog, getLiveBuiltinCatalogForRoute } from './live-catalog.ts'
|
|
47
49
|
import { checkRouteCredential, type RouteCredentialContext } from './route-credential.ts'
|
|
50
|
+
import {
|
|
51
|
+
PROVIDER_NATIVE_ENDPOINTS,
|
|
52
|
+
fetchProviderNativeModels,
|
|
53
|
+
mergeProviderNativeEntries,
|
|
54
|
+
resolveRouteCredentialValue,
|
|
55
|
+
type NativeCredentialContext,
|
|
56
|
+
} from './provider-native.ts'
|
|
57
|
+
import {
|
|
58
|
+
runLegacySettingsImport,
|
|
59
|
+
resolveDshHome,
|
|
60
|
+
type LegacyImportLogger,
|
|
61
|
+
type SettingsUpdateSeam,
|
|
62
|
+
} from './legacy-import.ts'
|
|
48
63
|
|
|
49
64
|
export const name = 'dsh-model-sync'
|
|
50
65
|
|
|
51
66
|
/** The settings seam this plugin consumes (its own config namespace). */
|
|
52
67
|
export const inject = ['settings']
|
|
53
68
|
|
|
54
|
-
// dsh-settings 0.1.
|
|
55
|
-
//
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
|
|
69
|
+
// dsh-settings 0.1.7 rewrote the seam: the runtime register(ns, schema) call
|
|
70
|
+
// is gone, and a plugin's settings form is projected from its exported
|
|
71
|
+
// `Config` schema — the namespace IS the profile entry id. The bundle patch
|
|
72
|
+
// mounts this plugin under the stable id below, so `dsh-model-sync` is the
|
|
73
|
+
// namespace the settings UI (and the legacy settings.yaml import) address.
|
|
74
|
+
const OWN_ENTRY_ID = 'dsh-model-sync'
|
|
59
75
|
|
|
60
|
-
/**
|
|
61
|
-
|
|
76
|
+
/**
|
|
77
|
+
* The plugin's `Config` schema: the settings form the 0.1.7 host projects from
|
|
78
|
+
* the `dsh-model-sync` entry. Every field is user-adjustable and therefore
|
|
79
|
+
* `.volatile()` — volatile fields are the only ones the settings page can edit
|
|
80
|
+
* (and the only ones the legacy settings.yaml import accepts), and they hot-
|
|
81
|
+
* reload without remounting the plugin. Requires schemastery >= 3.18.4 (the
|
|
82
|
+
* version the dsh 0.1.7 wave ships), which provides `.volatile()`.
|
|
83
|
+
*/
|
|
84
|
+
export const Config = z.object({
|
|
62
85
|
/**
|
|
63
86
|
* Write mode: 'settings' (default, zero-patch settings.mutate pipeline) or
|
|
64
87
|
* 'overlay' (legacy, delegates to the patched adapter's piAiCatalog.refresh
|
|
65
88
|
* and requires the optional patch).
|
|
66
89
|
*/
|
|
67
|
-
writeMode: z.union(['settings', 'overlay']).default('settings'),
|
|
90
|
+
writeMode: z.union(['settings', 'overlay']).default('settings').volatile(),
|
|
68
91
|
/** Minutes between auto refreshes (default 240 = 4 hours); 0 = startup-only. */
|
|
69
|
-
intervalMinutes: z.number().step(1).min(0).default(240),
|
|
92
|
+
intervalMinutes: z.number().step(1).min(0).default(240).volatile(),
|
|
70
93
|
/** Delay before the first auto refresh, so the llm adapter is ready. */
|
|
71
|
-
startupDelaySeconds: z.number().step(1).min(0).default(5),
|
|
94
|
+
startupDelaySeconds: z.number().step(1).min(0).default(5).volatile(),
|
|
72
95
|
/** Abort budget for one forced refresh's network round. */
|
|
73
|
-
refreshTimeoutMs: z.number().step(1).min(1000).default(120000),
|
|
96
|
+
refreshTimeoutMs: z.number().step(1).min(1000).default(120000).volatile(),
|
|
74
97
|
/** Routes to manage (empty = all pi.dev routes). */
|
|
75
|
-
managedRoutes: z.array(z.string()).default([]),
|
|
98
|
+
managedRoutes: z.array(z.string()).default([]).volatile(),
|
|
76
99
|
/** Keep builtin-only models not in pi.dev (smooth migration). */
|
|
77
|
-
keepBuiltinOnly: z.boolean().default(true),
|
|
100
|
+
keepBuiltinOnly: z.boolean().default(true).volatile(),
|
|
78
101
|
/** Drop unserviceable entries (true) or abort the entire route (false). */
|
|
79
|
-
dropUnserviceable: z.boolean().default(true),
|
|
102
|
+
dropUnserviceable: z.boolean().default(true).volatile(),
|
|
103
|
+
/**
|
|
104
|
+
* Union each mapped route's first-party /models listing into the pi.dev
|
|
105
|
+
* result (additions only — see provider-native.ts). Default on: the native
|
|
106
|
+
* listing is the fresher source; pi.dev lags (measured 2026-09-22).
|
|
107
|
+
*/
|
|
108
|
+
providerNativeFetch: z.boolean().default(true).volatile(),
|
|
80
109
|
/** Notify on changes (logger + /model-sync report). */
|
|
81
|
-
syncNotify: z.boolean().default(false),
|
|
110
|
+
syncNotify: z.boolean().default(false).volatile(),
|
|
82
111
|
/**
|
|
83
112
|
* Force all models with a non-empty thinkingFormat to have max reasoning
|
|
84
113
|
* effort. Skips S2 gate's SRE check, ensures reasoningEfforts contains
|
|
85
114
|
* max, and forces compat.supportsReasoningEffort=true (S5 gate, openai-
|
|
86
115
|
* completions only). 400 risk is on the user.
|
|
87
116
|
*/
|
|
88
|
-
forceMaxReasoningEffort: z.boolean().default(false),
|
|
117
|
+
forceMaxReasoningEffort: z.boolean().default(false).volatile(),
|
|
118
|
+
/**
|
|
119
|
+
* keepBuiltinOnly may re-emit builtin ids the official default model list
|
|
120
|
+
* dropped (dsh 0.1.7 removed deepseek-v4-flash / deepseek-v4-flash-vision-
|
|
121
|
+
* exp). Those stay in the snapshot for historical user configurations but
|
|
122
|
+
* are excluded from the synced list unless this flag opts them back in —
|
|
123
|
+
* a re-emitted retired id is a model the 0.1.7 host no longer resolves.
|
|
124
|
+
*/
|
|
125
|
+
keepDeprecatedBuiltin: z.boolean().default(false).volatile(),
|
|
89
126
|
})
|
|
90
127
|
|
|
91
|
-
/**
|
|
128
|
+
/**
|
|
129
|
+
* A stable configuration reference — the protocol the 0.1.7 host hands the
|
|
130
|
+
* plugin for every volatile `Config` field (cosmokit's `Volatile<T>`, declared
|
|
131
|
+
* locally as a structural type so this module stays dependency-free). `get()`
|
|
132
|
+
* returns the current immutable snapshot; the host swaps the value in place on
|
|
133
|
+
* volatile-only edits, so reading per round is always fresh.
|
|
134
|
+
*/
|
|
135
|
+
interface VolatileRef<T> {
|
|
136
|
+
get(): T
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/** Typed view of the resolved `Config` value as delivered to apply(). */
|
|
92
140
|
interface ModelSyncConfigValue {
|
|
93
|
-
writeMode: '
|
|
94
|
-
intervalMinutes: number
|
|
95
|
-
startupDelaySeconds: number
|
|
96
|
-
refreshTimeoutMs: number
|
|
97
|
-
managedRoutes: string[]
|
|
98
|
-
keepBuiltinOnly: boolean
|
|
99
|
-
dropUnserviceable: boolean
|
|
100
|
-
syncNotify: boolean
|
|
101
|
-
forceMaxReasoningEffort: boolean
|
|
141
|
+
writeMode: VolatileRef<'settings' | 'overlay'>
|
|
142
|
+
intervalMinutes: VolatileRef<number>
|
|
143
|
+
startupDelaySeconds: VolatileRef<number>
|
|
144
|
+
refreshTimeoutMs: VolatileRef<number>
|
|
145
|
+
managedRoutes: VolatileRef<readonly string[]>
|
|
146
|
+
keepBuiltinOnly: VolatileRef<boolean>
|
|
147
|
+
dropUnserviceable: VolatileRef<boolean>
|
|
148
|
+
syncNotify: VolatileRef<boolean>
|
|
149
|
+
forceMaxReasoningEffort: VolatileRef<boolean>
|
|
150
|
+
providerNativeFetch: VolatileRef<boolean>
|
|
151
|
+
keepDeprecatedBuiltin: VolatileRef<boolean>
|
|
102
152
|
}
|
|
103
153
|
|
|
104
154
|
/** The llm seam as this plugin needs it (overlay mode). */
|
|
@@ -138,8 +188,12 @@ const DEFAULT_ROUTES = [
|
|
|
138
188
|
* runtime surface; subject to change without notice. */
|
|
139
189
|
export const DEFAULT_ROUTES_LIST = DEFAULT_ROUTES
|
|
140
190
|
|
|
141
|
-
export function apply(ctx: Context): void {
|
|
142
|
-
|
|
191
|
+
export async function apply(ctx: Context, config: ModelSyncConfigValue): Promise<void> {
|
|
192
|
+
// On dsh 0.1.7 the resolved Config arrives as apply()'s second argument:
|
|
193
|
+
// every volatile field is a stable reference (see VolatileRef), so the
|
|
194
|
+
// reads below are live views — no scope.get() and no scope.watch() (both
|
|
195
|
+
// removed from dsh-settings; the hot-reload notification moved to the
|
|
196
|
+
// settings/document-updated event, subscribed at the bottom of apply()).
|
|
143
197
|
|
|
144
198
|
// -----------------------------------------------------------------------
|
|
145
199
|
// Overlay mode sync (existing behavior)
|
|
@@ -180,7 +234,7 @@ export function apply(ctx: Context): void {
|
|
|
180
234
|
const before = await list()
|
|
181
235
|
const errors = await catalog.refresh({
|
|
182
236
|
force,
|
|
183
|
-
signal: AbortSignal.timeout(config.refreshTimeoutMs),
|
|
237
|
+
signal: AbortSignal.timeout(config.refreshTimeoutMs.get()),
|
|
184
238
|
})
|
|
185
239
|
const after = await list()
|
|
186
240
|
|
|
@@ -219,8 +273,9 @@ export function apply(ctx: Context): void {
|
|
|
219
273
|
const lines: string[] = []
|
|
220
274
|
|
|
221
275
|
// Determine routes to sync
|
|
222
|
-
const
|
|
223
|
-
|
|
276
|
+
const managedRoutes = config.managedRoutes.get()
|
|
277
|
+
const routes = managedRoutes.length > 0
|
|
278
|
+
? [...managedRoutes]
|
|
224
279
|
: DEFAULT_ROUTES
|
|
225
280
|
|
|
226
281
|
const gateDesc = settings?.describe().find((d) => d.ns === 'llm-pi-ai')
|
|
@@ -240,7 +295,7 @@ export function apply(ctx: Context): void {
|
|
|
240
295
|
}
|
|
241
296
|
|
|
242
297
|
// Fetch from pi.dev — pass force to bypass revalidation throttle (I-5)
|
|
243
|
-
const result = await fetchRemoteCatalog(route, config.refreshTimeoutMs, store, { force })
|
|
298
|
+
const result = await fetchRemoteCatalog(route, config.refreshTimeoutMs.get(), store, { force })
|
|
244
299
|
|
|
245
300
|
if (result.error !== undefined && result.entries.length === 0) {
|
|
246
301
|
lines.push(`${route}: fetch failed (${result.error}); keeping last-good`)
|
|
@@ -254,10 +309,10 @@ export function apply(ctx: Context): void {
|
|
|
254
309
|
|
|
255
310
|
// Translate
|
|
256
311
|
const translateOpts: TranslateOptions = {
|
|
257
|
-
keepBuiltinOnly: config.keepBuiltinOnly,
|
|
258
|
-
dropUnserviceable: config.dropUnserviceable,
|
|
312
|
+
keepBuiltinOnly: config.keepBuiltinOnly.get(),
|
|
313
|
+
dropUnserviceable: config.dropUnserviceable.get(),
|
|
259
314
|
dropWarnings: [],
|
|
260
|
-
forceMaxReasoningEffort: config.forceMaxReasoningEffort,
|
|
315
|
+
forceMaxReasoningEffort: config.forceMaxReasoningEffort.get(),
|
|
261
316
|
}
|
|
262
317
|
|
|
263
318
|
// For builtin catalog snapshot: we use a mock for now since we can't
|
|
@@ -265,13 +320,55 @@ export function apply(ctx: Context): void {
|
|
|
265
320
|
// base-matching classification. In a real deployment, this would come
|
|
266
321
|
// from the built-in snapshot file.
|
|
267
322
|
const builtinData = getBuiltinCatalogForRoute(route)
|
|
323
|
+
|
|
324
|
+
// Provider-native union: fold the route's first-party /models listing
|
|
325
|
+
// (the fresher source — pi.dev lags; measured 2026-09-22) into the
|
|
326
|
+
// pi.dev result. Additions only, capacities only where the listing
|
|
327
|
+
// states them; any failure degrades to the pi.dev list unchanged so a
|
|
328
|
+
// native hiccup can never lose models.
|
|
329
|
+
let entries = result.entries
|
|
330
|
+
if (config.providerNativeFetch.get() && PROVIDER_NATIVE_ENDPOINTS[route] !== undefined) {
|
|
331
|
+
const apiKey = await resolveRouteCredentialValue(
|
|
332
|
+
ctx as unknown as NativeCredentialContext,
|
|
333
|
+
gateDesc,
|
|
334
|
+
route,
|
|
335
|
+
)
|
|
336
|
+
if (apiKey === undefined) {
|
|
337
|
+
lines.push(`${route}: provider-native skipped — credential value unavailable`)
|
|
338
|
+
} else {
|
|
339
|
+
const native = await fetchProviderNativeModels(route, apiKey, config.refreshTimeoutMs.get())
|
|
340
|
+
if (native.ok) {
|
|
341
|
+
// Base-less synthesis needs the route's one addressable api;
|
|
342
|
+
// unknown or mixed-protocol routes skip synthesis wholesale.
|
|
343
|
+
const routeApis = [...new Set(builtinData.map((b) => b.api))]
|
|
344
|
+
const merged = mergeProviderNativeEntries(
|
|
345
|
+
entries,
|
|
346
|
+
native,
|
|
347
|
+
route,
|
|
348
|
+
routeApis.length === 1 ? routeApis[0] : undefined,
|
|
349
|
+
)
|
|
350
|
+
entries = merged.entries
|
|
351
|
+
if (merged.addedIds.length > 0) {
|
|
352
|
+
lines.push(
|
|
353
|
+
`${route}: provider-native added ${merged.addedIds.join(', ')} (${native.ids.length} ids from first-party listing)`,
|
|
354
|
+
)
|
|
355
|
+
}
|
|
356
|
+
if (merged.skippedReason !== undefined) {
|
|
357
|
+
lines.push(`${route}: provider-native ${merged.skippedReason}`)
|
|
358
|
+
}
|
|
359
|
+
} else {
|
|
360
|
+
lines.push(`${route}: provider-native ${native.error} — pi.dev list only`)
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
268
365
|
const builtinIds = new Set(builtinData.map((b) => b.id))
|
|
269
|
-
const builtinOnlyEntries =
|
|
270
|
-
? getBuiltinOnlyEntries(route,
|
|
366
|
+
const builtinOnlyEntries = translateOpts.keepBuiltinOnly
|
|
367
|
+
? getBuiltinOnlyEntries(route, entries, builtinData, config.keepDeprecatedBuiltin.get())
|
|
271
368
|
: undefined
|
|
272
369
|
|
|
273
370
|
const translated = translateEntries(
|
|
274
|
-
|
|
371
|
+
entries,
|
|
275
372
|
builtinIds,
|
|
276
373
|
builtinData,
|
|
277
374
|
route,
|
|
@@ -365,16 +462,19 @@ export function apply(ctx: Context): void {
|
|
|
365
462
|
// Unified syncNow
|
|
366
463
|
// -----------------------------------------------------------------------
|
|
367
464
|
const syncNow = async (force: boolean): Promise<string> => {
|
|
368
|
-
|
|
465
|
+
// Read the live refs up front; the volatile snapshots are fresh per call.
|
|
466
|
+
const writeMode = config.writeMode.get()
|
|
467
|
+
const managedRoutes = config.managedRoutes.get()
|
|
468
|
+
const routes = managedRoutes.length > 0 ? [...managedRoutes] : DEFAULT_ROUTES
|
|
369
469
|
|
|
370
470
|
// Prefer the host's live pi-ai catalog for this round; the frozen
|
|
371
471
|
// snapshot is only the no-host fallback. Without this, keepBuiltinOnly
|
|
372
472
|
// re-emits ids the host's catalog has already dropped. Awaiting keeps the
|
|
373
473
|
// `which`/`npm` probes off the host's event loop (they used to block every
|
|
374
474
|
// surface for ~0.2s per round).
|
|
375
|
-
await refreshLiveCatalog(
|
|
475
|
+
await refreshLiveCatalog(routes)
|
|
376
476
|
|
|
377
|
-
if (
|
|
477
|
+
if (writeMode === 'settings') {
|
|
378
478
|
return syncSettings(config, force)
|
|
379
479
|
}
|
|
380
480
|
|
|
@@ -416,16 +516,22 @@ export function apply(ctx: Context): void {
|
|
|
416
516
|
if (startupTimer !== undefined) clearTimeout(startupTimer)
|
|
417
517
|
})
|
|
418
518
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
519
|
+
// Volatile fields are stable references, so the initial arms read them once
|
|
520
|
+
// and the interval keeps working; the hot-reload notification arrives as a
|
|
521
|
+
// settings/document-updated event (the 0.1.7 replacement for scope.watch).
|
|
522
|
+
startupTimer = setTimeout(runAuto, Math.max(0, config.startupDelaySeconds.get() ?? 5) * 1000)
|
|
523
|
+
armInterval(config.intervalMinutes.get() ?? 240)
|
|
524
|
+
ctx.effect(() => ctx.on('settings/document-updated', (ns) => {
|
|
525
|
+
// Only this plugin's entry (the bundle-patch id) re-arms the timers; the
|
|
526
|
+
// handler is idempotent — the refs already carry the new values, so the
|
|
527
|
+
// next round reads them fresh. Never throws: an interval re-arm is two
|
|
528
|
+
// timer calls, and a throwing settings listener is a host-side incident.
|
|
529
|
+
if (ns !== OWN_ENTRY_ID) return
|
|
530
|
+
armInterval(config.intervalMinutes.get() ?? 0)
|
|
425
531
|
// Clear any pending startup timer before setting a new one
|
|
426
532
|
if (startupTimer !== undefined) clearTimeout(startupTimer)
|
|
427
533
|
startupTimer = setTimeout(runAuto, 1000)
|
|
428
|
-
})
|
|
534
|
+
}), 'dsh-model-sync: settings/document-updated')
|
|
429
535
|
|
|
430
536
|
// The modelSync service stays exposed for UIs that want direct access. The
|
|
431
537
|
// /model-sync command itself is registered by this plugin (below) through
|
|
@@ -465,6 +571,31 @@ export function apply(ctx: Context): void {
|
|
|
465
571
|
return commands.register(definition)
|
|
466
572
|
}, 'dsh-model-sync: /model-sync')
|
|
467
573
|
})
|
|
574
|
+
|
|
575
|
+
// One-time legacy settings import (0.1.5 → 0.1.7 upgrade path, see
|
|
576
|
+
// legacy-import.ts): recover the old `model-sync:` section for hosts where
|
|
577
|
+
// the 0.1.7 one-shot settings.yaml import never carried it over. Awaited
|
|
578
|
+
// as apply()'s LAST step — every registration above stays synchronous
|
|
579
|
+
// (fake-ctx tests keep working), while a real boot, whose loader awaits
|
|
580
|
+
// the fiber setup, settles the import before activation completes. Fully
|
|
581
|
+
// contained: any failure only warns and leaves the audit marker unwritten,
|
|
582
|
+
// so the next boot retries; activation never depends on this.
|
|
583
|
+
try {
|
|
584
|
+
await runLegacySettingsImport({
|
|
585
|
+
home: resolveDshHome(),
|
|
586
|
+
settings: ctx.settings as SettingsUpdateSeam,
|
|
587
|
+
logger: (ctx as unknown as { logger?: LegacyImportLogger }).logger,
|
|
588
|
+
// The volatile refs read fresh, and the update itself fires
|
|
589
|
+
// settings/document-updated for this entry — the timers armed above
|
|
590
|
+
// with the pre-import value re-arm to it without a restart.
|
|
591
|
+
getCurrent: (key) => {
|
|
592
|
+
const slot = (config as unknown as Record<string, unknown>)[key] as { get?: unknown } | undefined
|
|
593
|
+
return typeof slot?.get === 'function' ? slot.get() : slot
|
|
594
|
+
},
|
|
595
|
+
})
|
|
596
|
+
} catch (error) {
|
|
597
|
+
ctx.logger.warn('model-sync: legacy settings import failed (will retry next boot): %o', error)
|
|
598
|
+
}
|
|
468
599
|
}
|
|
469
600
|
|
|
470
601
|
// ---------------------------------------------------------------------------
|
|
@@ -479,7 +610,7 @@ export function apply(ctx: Context): void {
|
|
|
479
610
|
* gets the whole llm-pi-ai namespace rejected by the alpha line's strict
|
|
480
611
|
* registration.
|
|
481
612
|
*/
|
|
482
|
-
function getBuiltinCatalogForRoute(route: string):
|
|
613
|
+
function getBuiltinCatalogForRoute(route: string): BuiltinModelData[] {
|
|
483
614
|
return getLiveBuiltinCatalogForRoute(route) ?? BUILTIN_CATALOG_SNAPSHOT[route] ?? []
|
|
484
615
|
}
|
|
485
616
|
|
|
@@ -487,17 +618,28 @@ function getBuiltinCatalogForRoute(route: string): Array<{ id: string; api: stri
|
|
|
487
618
|
* Get entries from builtin catalog that are not in pi.dev (for keepBuiltinOnly).
|
|
488
619
|
* Returns minimal RemoteCatalogEntry-shaped objects — translateEntries only
|
|
489
620
|
* reads entry.id from these, emitting {id} profiles (I-3).
|
|
621
|
+
*
|
|
622
|
+
* Deprecated snapshot entries (the official default model list dropped them —
|
|
623
|
+
* dsh 0.1.7 removed deepseek-v4-flash / deepseek-v4-flash-vision-exp) are
|
|
624
|
+
* excluded unless `includeDeprecated` opts them back in: a re-emitted retired
|
|
625
|
+
* id is a model the 0.1.7 host no longer resolves. The data itself stays in
|
|
626
|
+
* the snapshot for historical user configurations.
|
|
627
|
+
*
|
|
628
|
+
* Exported for the test suite; not part of the public runtime surface.
|
|
490
629
|
*/
|
|
491
|
-
function getBuiltinOnlyEntries(
|
|
630
|
+
export function getBuiltinOnlyEntries(
|
|
492
631
|
route: string,
|
|
493
632
|
piDevEntries: RemoteCatalogEntry[],
|
|
494
|
-
|
|
633
|
+
builtinData: BuiltinModelData[],
|
|
634
|
+
includeDeprecated = false,
|
|
495
635
|
): RemoteCatalogEntry[] {
|
|
496
636
|
const piDevIds = new Set(piDevEntries.map((e) => e.id))
|
|
497
|
-
const builtinData = getBuiltinCatalogForRoute(route)
|
|
498
637
|
|
|
499
638
|
return builtinData
|
|
500
|
-
.filter((b) =>
|
|
639
|
+
.filter((b) =>
|
|
640
|
+
!piDevIds.has(b.id)
|
|
641
|
+
&& (includeDeprecated || b.deprecated !== true)
|
|
642
|
+
)
|
|
501
643
|
.map((b) => ({
|
|
502
644
|
id: b.id,
|
|
503
645
|
name: b.id,
|