@lmzhen/dsh-evolution-commands 0.43.1 → 0.44.0
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/index.js +30 -0
- package/locale/de.json +6 -0
- package/locale/en.json +6 -0
- package/locale/es.json +6 -0
- package/locale/fr.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/pt.json +6 -0
- package/locale/ru.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +9 -7
package/lib/index.js
CHANGED
|
@@ -329,8 +329,38 @@ function hostRuntimeVersion() {
|
|
|
329
329
|
if (typeof parsed.version === "string" && parsed.version !== "") return parsed.version;
|
|
330
330
|
} catch {}
|
|
331
331
|
}
|
|
332
|
+
/**
|
|
333
|
+
* The family's bundle names, read from the profile's own two manifests.
|
|
334
|
+
*
|
|
335
|
+
* `pluginManager.listBundles()` resolves plugin metadata for EVERY bundle on every call (~10 module
|
|
336
|
+
* resolutions each; 108 packages on an ordinary profile) and nothing caches it — measured 19 s per
|
|
337
|
+
* diagnostics read, and the same uncached call is what makes the plugin inventory take a minute. The
|
|
338
|
+
* doctor needs only the family's names, and `readBundles()` starts from exactly these two files, so
|
|
339
|
+
* read them directly. `undefined` means "cannot answer here", never "no bundles installed".
|
|
340
|
+
* @param ctx - the host context.
|
|
341
|
+
* @returns the family bundle names, or undefined when the profile context is unavailable.
|
|
342
|
+
*/
|
|
343
|
+
function familyBundlesFromProfile(ctx) {
|
|
344
|
+
const profile = ctx.profileContext;
|
|
345
|
+
if (typeof profile?.dir !== "string" || typeof profile?.installAnchor !== "string") return void 0;
|
|
346
|
+
try {
|
|
347
|
+
const manifest = JSON.parse(readFileSync(join(profile.dir, "package.json"), "utf8"));
|
|
348
|
+
const selected = (manifest.dsh?.profile?.bundles ?? []).filter((name) => typeof name === "string");
|
|
349
|
+
const installation = JSON.parse(readFileSync(profile.installAnchor, "utf8"));
|
|
350
|
+
const names = [
|
|
351
|
+
...selected,
|
|
352
|
+
...Object.keys(manifest.dependencies ?? {}),
|
|
353
|
+
...Object.keys(installation.dependencies ?? {})
|
|
354
|
+
];
|
|
355
|
+
return [...new Set(names)].filter((name) => name.includes("dsh-evolution-"));
|
|
356
|
+
} catch {
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
332
360
|
/** The family bundles the platform reports (soft probe: a host without the manager answers []). */
|
|
333
361
|
async function installedFamilyBundles(ctx) {
|
|
362
|
+
const fromProfile = familyBundlesFromProfile(ctx);
|
|
363
|
+
if (fromProfile !== void 0) return fromProfile;
|
|
334
364
|
const listed = await ctx.get("pluginManager")?.listBundles?.();
|
|
335
365
|
if (!Array.isArray(listed)) return [];
|
|
336
366
|
const names = [];
|
package/locale/de.json
ADDED
package/locale/en.json
ADDED
package/locale/es.json
ADDED
package/locale/fr.json
ADDED
package/locale/ja.json
ADDED
package/locale/pt.json
ADDED
package/locale/ru.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-commands",
|
|
3
3
|
"description": "Human commands for the evolution family (/evolution pending|curator|maintain|doctor) (community build)",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.44.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -18,22 +18,24 @@
|
|
|
18
18
|
"types": "./lib/types/index.d.ts",
|
|
19
19
|
"default": "./lib/index.js"
|
|
20
20
|
},
|
|
21
|
-
"./package.json": "./package.json"
|
|
21
|
+
"./package.json": "./package.json",
|
|
22
|
+
"./locale/*.json": "./locale/*.json"
|
|
22
23
|
},
|
|
23
24
|
"files": [
|
|
25
|
+
"locale/*.json",
|
|
24
26
|
"lib/*.js",
|
|
25
27
|
"lib/types/**/*.d.ts"
|
|
26
28
|
],
|
|
27
29
|
"license": "MIT",
|
|
28
30
|
"dependencies": {
|
|
29
31
|
"@deepseek-ai/schemastery": "^3.18.5",
|
|
30
|
-
"@lmzhen/dsh-evolution-approval": "^0.
|
|
31
|
-
"@lmzhen/dsh-evolution-core": "^0.
|
|
32
|
-
"@lmzhen/dsh-evolution-maintenance": "^0.
|
|
33
|
-
"@lmzhen/dsh-evolution-state-storage": "^0.
|
|
32
|
+
"@lmzhen/dsh-evolution-approval": "^0.44.0",
|
|
33
|
+
"@lmzhen/dsh-evolution-core": "^0.44.0",
|
|
34
|
+
"@lmzhen/dsh-evolution-maintenance": "^0.44.0",
|
|
35
|
+
"@lmzhen/dsh-evolution-state-storage": "^0.44.0"
|
|
34
36
|
},
|
|
35
37
|
"optionalDependencies": {
|
|
36
|
-
"@lmzhen/dsh-evolution-agent-preset": "^0.
|
|
38
|
+
"@lmzhen/dsh-evolution-agent-preset": "^0.44.0"
|
|
37
39
|
},
|
|
38
40
|
"peerDependencies": {
|
|
39
41
|
"@deepseek-ai/cordis": "^4.0.5",
|