dsh-continual-evolve 0.10.2 → 0.10.4
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/lib/record-language.d.ts +8 -0
- package/lib/record-language.js +18 -1
- package/package.json +10 -10
package/lib/record-language.d.ts
CHANGED
|
@@ -39,6 +39,14 @@ export declare function detectLanguageFromText(text: string): RecordLanguage | u
|
|
|
39
39
|
* service. Fail-open by contract: a missing service, a throwing read, an
|
|
40
40
|
* async-shaped reply, or an unknown value all yield `undefined`.
|
|
41
41
|
*
|
|
42
|
+
* The service is resolved through `ctx.get("settings")` (the global registry),
|
|
43
|
+
* which sees services provided by sibling plugin entries. A direct
|
|
44
|
+
* `ctx.settings` walks only the caller's fiber ancestor chain and throws
|
|
45
|
+
* "cannot get property \"settings\" without inject" — the same failure mode
|
|
46
|
+
* documented in `goal.ts` — and a throw here would abort the whole snapshot
|
|
47
|
+
* gate, so the property access itself is guarded. Plain-object contexts
|
|
48
|
+
* (tests, non-Cordis hosts) fall back to the direct property.
|
|
49
|
+
*
|
|
42
50
|
* @param ctx Cordis context that may carry the host settings service.
|
|
43
51
|
* @returns The stored preference (`zh`/`en`, subtag-tolerant) or `undefined`.
|
|
44
52
|
*/
|
package/lib/record-language.js
CHANGED
|
@@ -44,13 +44,30 @@ export function detectLanguageFromText(text) {
|
|
|
44
44
|
* service. Fail-open by contract: a missing service, a throwing read, an
|
|
45
45
|
* async-shaped reply, or an unknown value all yield `undefined`.
|
|
46
46
|
*
|
|
47
|
+
* The service is resolved through `ctx.get("settings")` (the global registry),
|
|
48
|
+
* which sees services provided by sibling plugin entries. A direct
|
|
49
|
+
* `ctx.settings` walks only the caller's fiber ancestor chain and throws
|
|
50
|
+
* "cannot get property \"settings\" without inject" — the same failure mode
|
|
51
|
+
* documented in `goal.ts` — and a throw here would abort the whole snapshot
|
|
52
|
+
* gate, so the property access itself is guarded. Plain-object contexts
|
|
53
|
+
* (tests, non-Cordis hosts) fall back to the direct property.
|
|
54
|
+
*
|
|
47
55
|
* @param ctx Cordis context that may carry the host settings service.
|
|
48
56
|
* @returns The stored preference (`zh`/`en`, subtag-tolerant) or `undefined`.
|
|
49
57
|
*/
|
|
50
58
|
export function durableLocalePreference(ctx) {
|
|
51
59
|
if (typeof ctx !== "object" || ctx === null)
|
|
52
60
|
return undefined;
|
|
53
|
-
|
|
61
|
+
let settings;
|
|
62
|
+
try {
|
|
63
|
+
const get = ctx.get;
|
|
64
|
+
settings = typeof get === "function" ? get.call(ctx, "settings") : undefined;
|
|
65
|
+
if (settings === undefined)
|
|
66
|
+
settings = ctx.settings;
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
54
71
|
if (typeof settings !== "object" || settings === null)
|
|
55
72
|
return undefined;
|
|
56
73
|
const describe = settings.describe;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-continual-evolve",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.4",
|
|
4
4
|
"description": "Continual self-evolution plugin for DeepSeek Harness: versioned, auditable, rollback-safe harness state (prompt notes, memories, skills, subagent specs) refined from session trajectories.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -60,19 +60,19 @@
|
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
63
|
-
"@deepseek-ai/dsh-home-paths": "^0.1.0-rc.6 || ^0.1.7-rc.1",
|
|
64
|
-
"@deepseek-ai/dsh-llm": "^0.1.0-rc.6 || ^0.1.7-rc.1",
|
|
65
|
-
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6 || ^0.1.7-rc.1",
|
|
63
|
+
"@deepseek-ai/dsh-home-paths": "^0.1.0-rc.6 || ^0.1.7-rc.1 || ^0.2.0-rc.1",
|
|
64
|
+
"@deepseek-ai/dsh-llm": "^0.1.0-rc.6 || ^0.1.7-rc.1 || ^0.2.0-rc.1",
|
|
65
|
+
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6 || ^0.1.7-rc.1 || ^0.2.0-rc.1",
|
|
66
66
|
"@deepseek-ai/schemastery": "^3.18.1"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@deepseek-ai/cordis": "4.0.4",
|
|
70
|
-
"@deepseek-ai/dsh-agent": "0.
|
|
71
|
-
"@deepseek-ai/dsh-commands": "0.
|
|
72
|
-
"@deepseek-ai/dsh-home-paths": "0.
|
|
73
|
-
"@deepseek-ai/dsh-llm": "0.
|
|
74
|
-
"@deepseek-ai/dsh-tools": "0.
|
|
75
|
-
"@deepseek-ai/schemastery": "3.18.
|
|
70
|
+
"@deepseek-ai/dsh-agent": "0.2.0-rc.2",
|
|
71
|
+
"@deepseek-ai/dsh-commands": "0.2.0-rc.2",
|
|
72
|
+
"@deepseek-ai/dsh-home-paths": "0.2.0-rc.2",
|
|
73
|
+
"@deepseek-ai/dsh-llm": "0.2.0-rc.2",
|
|
74
|
+
"@deepseek-ai/dsh-tools": "0.2.0-rc.2",
|
|
75
|
+
"@deepseek-ai/schemastery": "3.18.4",
|
|
76
76
|
"@types/node": "^22.10.0",
|
|
77
77
|
"@vitest/coverage-v8": "^3.2.0",
|
|
78
78
|
"oxlint": "^0.16.0",
|