@lmzhen/dsh-evolution-commands 0.43.2-rc.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 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
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Befehle",
4
+ "description": "Ergänzt /evolution-Befehle für Freigaben, Aufräumen, Prüfen, Zusammenführen und Diagnose."
5
+ }
6
+ }
package/locale/en.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Commands",
4
+ "description": "Adds /evolution commands for approvals, cleanup, checks, merges and diagnostics."
5
+ }
6
+ }
package/locale/es.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Comandos",
4
+ "description": "Añade comandos /evolution para aprobar, limpiar, comprobar, hacer merge y diagnosticar."
5
+ }
6
+ }
package/locale/fr.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Commandes",
4
+ "description": "Ajoute les commandes /evolution pour approuver, nettoyer, vérifier, fusionner et diagnostiquer."
5
+ }
6
+ }
package/locale/ja.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "コマンド",
4
+ "description": "承認待ち、整理、点検、マージ、診断を /evolution コマンドで扱える。"
5
+ }
6
+ }
package/locale/pt.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Comandos",
4
+ "description": "Adiciona comandos /evolution para aprovações, limpeza, verificações, merges e diagnóstico."
5
+ }
6
+ }
package/locale/ru.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Команды",
4
+ "description": "Добавляет команды /evolution для одобрений, уборки, проверок, объединения и диагностики."
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "命令",
4
+ "description": "加上 /evolution 系列命令,审批、整理、检查、合并、诊断都能用。"
5
+ }
6
+ }
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.43.2-rc.1",
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.43.2-rc.1",
31
- "@lmzhen/dsh-evolution-core": "^0.43.2-rc.1",
32
- "@lmzhen/dsh-evolution-maintenance": "^0.43.2-rc.1",
33
- "@lmzhen/dsh-evolution-state-storage": "^0.43.2-rc.1"
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.43.2-rc.1"
38
+ "@lmzhen/dsh-evolution-agent-preset": "^0.44.0"
37
39
  },
38
40
  "peerDependencies": {
39
41
  "@deepseek-ai/cordis": "^4.0.5",