@deepseek-ai/dsh-host-plugin-inventory 0.2.1-rc.5 → 0.2.2-alpha.3

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.i18n.yaml CHANGED
@@ -24,8 +24,8 @@
24
24
  en: dfc89b14d4c0d21e
25
25
  zh: 062b233951ed157b
26
26
  /deepseek-ai-dsh-host-plugin-inventory/use-this-package/what-you-can-and-cannot-do-with-it:
27
- en: 387f87777eef7ec5
28
- zh: badcd90c8840f870
27
+ en: 0243819e8404c74a
28
+ zh: 05dab926c0ecff34
29
29
  /deepseek-ai-dsh-host-plugin-inventory/understand-the-implementation:
30
30
  en: 42b15ac6321706aa
31
31
  zh: 4ed0861911abaf5d
package/README.md CHANGED
@@ -41,6 +41,8 @@ With a roster composed, `agentPresets` carries one group per preset in roster or
41
41
 
42
42
  The inventory is a snapshot for display and diagnostics: a client can render the roster, flag failed entries, and detect changes by comparing snapshots. It cannot enable, disable, add, or remove plugins, and it carries no history — a fiber that already failed and was removed is absent. Because the service reads the Loader on every call, the answer always reflects the current composition rather than a cached view.
43
43
 
44
+ Failed entries include the current startup diagnostic read from their Cordis fiber. Recovery removes it; inventory reads do not wait for loading entries or retain a separate error cache.
45
+
44
46
  -----
45
47
 
46
48
  <a id="understand-the-implementation"></a>
package/README.zh.md CHANGED
@@ -41,6 +41,8 @@ Loader 行与预设行可以携带可选的 `meta`,其中包含标题、描述
41
41
 
42
42
  该清单是供展示与诊断的快照:客户端可以渲染名单、标出失败条目,并通过比较快照检测变化。它不能启用、停用、添加或移除插件,也不携带历史——已经失败并被移除的 fiber 缺席。由于服务每次调用都读取 Loader,答案总是反映当前组合,而不是缓存视图。
43
43
 
44
+ 失败条目包含从 Cordis fiber 读取的当前启动诊断。恢复后移除该诊断;清单查询不等待仍在加载的条目,也不另存错误缓存。
45
+
44
46
  -----
45
47
 
46
48
  <a id="understand-the-implementation"></a>
package/lib/index.js CHANGED
@@ -125,11 +125,20 @@ async function readPluginInventory(ctx) {
125
125
  if (entry.options.group) continue;
126
126
  const base = entry.parent.tree.ctx.baseUrl;
127
127
  const meta = base === void 0 ? void 0 : packages?.metaOf(entry.options.name, base);
128
+ const fiber = entry.fiber;
129
+ const fiberPhase = fiber === void 0 ? null : FIBER_PHASE[fiber.state];
130
+ let diagnostic;
131
+ if (fiber !== void 0 && fiberPhase === "failed") try {
132
+ await fiber.await();
133
+ } catch (error) {
134
+ diagnostic = error instanceof Error ? error.message : String(error);
135
+ }
128
136
  entries.push({
129
137
  entryId: pluginEntryId(entry.id),
130
138
  moduleName: entry.options.name,
131
139
  enabled: !entry.disabled,
132
- fiberPhase: entry.fiber === void 0 ? null : FIBER_PHASE[entry.fiber.state],
140
+ fiberPhase,
141
+ ...diagnostic === void 0 ? {} : { diagnostic },
133
142
  ...meta === void 0 ? {} : { meta }
134
143
  });
135
144
  }
@@ -20,7 +20,8 @@ const _deepseek_ai_dsh_host_plugin_inventory_pluginInventory_list_result$schema
20
20
  'error': z.string().readonly().optional().describe('Unmodified local metadata diagnostic; the plugin remains manageable.'),
21
21
  }).readonly().optional().describe('Local package display metadata, independent of whether the entry is enabled.'),
22
22
  'enabled': z.boolean().readonly().describe('Effective Loader enablement, including disabled ancestor groups.'),
23
- 'fiberPhase': z.union([z.literal(null), z.literal("failed"), z.literal("pending"), z.literal("active"), z.literal("loading"), z.literal("unloading")]).readonly(),
23
+ 'fiberPhase': z.union([z.literal(null), z.literal("failed"), z.literal("active"), z.literal("pending"), z.literal("loading"), z.literal("unloading")]).readonly(),
24
+ 'diagnostic': z.string().readonly().optional().describe('Current startup failure message; absent when this entry has no failed fiber.'),
24
25
  })).readonly(),
25
26
  'agentPresets': z.array(z.object({
26
27
  'id': z.string().readonly().describe('Stable preset id.'),
@@ -42,7 +43,7 @@ const _deepseek_ai_dsh_host_plugin_inventory_pluginInventory_list_result$schema
42
43
  }).readonly().optional().describe('Local package display metadata, independent of whether the preset is mounted.'),
43
44
  'enabled': z.union([z.literal(false), z.literal(true), z.literal("conditional")]).readonly().describe('Effective enablement, including disabled ancestor groups. `\'conditional\'` marks a `!!js` disabled expression on a composition no session has mounted, which only a Loader context can decide.'),
44
45
  'condition': z.string().readonly().optional().describe('The row\'s own `!!js` disabled expression, when it carries one.'),
45
- 'fiberPhase': z.union([z.literal(null), z.literal("failed"), z.literal("pending"), z.literal("active"), z.literal("loading"), z.literal("unloading")]).readonly().describe('Root-fiber phase when the composition is live; null otherwise.'),
46
+ 'fiberPhase': z.union([z.literal(null), z.literal("failed"), z.literal("active"), z.literal("pending"), z.literal("loading"), z.literal("unloading")]).readonly().describe('Root-fiber phase when the composition is live; null otherwise.'),
46
47
  })).readonly().describe('Plugin rows in composition order; empty when the preset is broken.'),
47
48
  })).readonly().optional().describe('Per-preset compositions, present only when an agent-preset roster is composed in this deployment.'),
48
49
  }))
@@ -20,7 +20,8 @@ const _deepseek_ai_dsh_host_plugin_inventory_pluginInventory_list_result$schema
20
20
  'error': z.string().readonly().optional().describe('Unmodified local metadata diagnostic; the plugin remains manageable.'),
21
21
  }).readonly().optional().describe('Local package display metadata, independent of whether the entry is enabled.'),
22
22
  'enabled': z.boolean().readonly().describe('Effective Loader enablement, including disabled ancestor groups.'),
23
- 'fiberPhase': z.union([z.literal(null), z.literal("failed"), z.literal("pending"), z.literal("active"), z.literal("loading"), z.literal("unloading")]).readonly(),
23
+ 'fiberPhase': z.union([z.literal(null), z.literal("failed"), z.literal("active"), z.literal("pending"), z.literal("loading"), z.literal("unloading")]).readonly(),
24
+ 'diagnostic': z.string().readonly().optional().describe('Current startup failure message; absent when this entry has no failed fiber.'),
24
25
  })).readonly(),
25
26
  'agentPresets': z.array(z.object({
26
27
  'id': z.string().readonly().describe('Stable preset id.'),
@@ -42,7 +43,7 @@ const _deepseek_ai_dsh_host_plugin_inventory_pluginInventory_list_result$schema
42
43
  }).readonly().optional().describe('Local package display metadata, independent of whether the preset is mounted.'),
43
44
  'enabled': z.union([z.literal(false), z.literal(true), z.literal("conditional")]).readonly().describe('Effective enablement, including disabled ancestor groups. `\'conditional\'` marks a `!!js` disabled expression on a composition no session has mounted, which only a Loader context can decide.'),
44
45
  'condition': z.string().readonly().optional().describe('The row\'s own `!!js` disabled expression, when it carries one.'),
45
- 'fiberPhase': z.union([z.literal(null), z.literal("failed"), z.literal("pending"), z.literal("active"), z.literal("loading"), z.literal("unloading")]).readonly().describe('Root-fiber phase when the composition is live; null otherwise.'),
46
+ 'fiberPhase': z.union([z.literal(null), z.literal("failed"), z.literal("active"), z.literal("pending"), z.literal("loading"), z.literal("unloading")]).readonly().describe('Root-fiber phase when the composition is live; null otherwise.'),
46
47
  })).readonly().describe('Plugin rows in composition order; empty when the preset is broken.'),
47
48
  })).readonly().optional().describe('Per-preset compositions, present only when an agent-preset roster is composed in this deployment.'),
48
49
  }))
@@ -108,11 +108,23 @@ export async function readPluginInventory(ctx) {
108
108
  continue;
109
109
  const base = entry.parent.tree.ctx.baseUrl;
110
110
  const meta = base === undefined ? undefined : packages?.metaOf(entry.options.name, base);
111
+ const fiber = entry.fiber;
112
+ const fiberPhase = fiber === undefined ? null : FIBER_PHASE[fiber.state];
113
+ let diagnostic;
114
+ if (fiber !== undefined && fiberPhase === 'failed') {
115
+ try {
116
+ await fiber.await();
117
+ }
118
+ catch (error) {
119
+ diagnostic = error instanceof Error ? error.message : String(error);
120
+ }
121
+ }
111
122
  entries.push({
112
123
  entryId: pluginEntryId(entry.id),
113
124
  moduleName: entry.options.name,
114
125
  enabled: !entry.disabled,
115
- fiberPhase: entry.fiber === undefined ? null : FIBER_PHASE[entry.fiber.state],
126
+ fiberPhase,
127
+ ...diagnostic === undefined ? {} : { diagnostic },
116
128
  ...meta === undefined ? {} : { meta },
117
129
  });
118
130
  }
@@ -14,6 +14,8 @@ export interface PluginInventoryEntry {
14
14
  /** Effective Loader enablement, including disabled ancestor groups. */
15
15
  readonly enabled: boolean;
16
16
  readonly fiberPhase: PluginFiberPhase;
17
+ /** Current startup failure message; absent when this entry has no failed fiber. */
18
+ readonly diagnostic?: string;
17
19
  }
18
20
  /** Effective enablement of one preset composition row. */
19
21
  export type PresetPluginEnablement = boolean | 'conditional';
package/locale/de.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Plugin-Manifestdienst",
4
+ "description": "Bietet eine schreibgeschützte Liste der aktuellen Plug-In-Einträge, des Aktivierungsstatus der Konfiguration und des Ausführungsstatus."
5
+ }
6
+ }
package/locale/es.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Servicio de manifiesto de complemento",
4
+ "description": "Proporciona una lista de solo lectura de las entradas de complementos actuales, el estado de habilitación de la configuración y el estado de ejecución."
5
+ }
6
+ }
package/locale/fr.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Service de manifeste de plugin",
4
+ "description": "Fournit une liste en lecture seule des entrées actuelles du plug-in, de l'état d'activation de la configuration et de l'état d'exécution."
5
+ }
6
+ }
package/locale/ja.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "プラグイン一覧サービス",
4
+ "description": "現在のプラグイン項目、設定上の有効状態、実行状態の読み取り専用一覧を提供します。"
5
+ }
6
+ }
package/locale/pt.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Serviço de manifesto de plug-in",
4
+ "description": "Fornece uma listagem somente leitura das entradas atuais do plug-in, do status de ativação da configuração e do status de execução."
5
+ }
6
+ }
package/locale/ru.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Служба манифеста плагина",
4
+ "description": "Предоставляет доступный только для чтения список текущих записей подключаемого модуля, состояние включения конфигурации и состояние работы."
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-host-plugin-inventory",
3
3
  "description": "Read-only Remote projection of current Cordis Loader plugin state",
4
- "version": "0.2.1-rc.5",
4
+ "version": "0.2.2-alpha.3",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -49,11 +49,11 @@
49
49
  "zod": "4.4.3"
50
50
  },
51
51
  "peerDependencies": {
52
- "@deepseek-ai/cordis-plugin-loader": "~1.0.6",
53
- "@deepseek-ai/dsh-agent-preset-registry": "0.2.1-rc.5",
54
- "@deepseek-ai/dsh-brand": "0.2.1-rc.5",
55
- "@deepseek-ai/dsh-typert-protocol": "0.2.1-rc.5",
56
- "@deepseek-ai/cordis": "~4.0.5"
52
+ "@deepseek-ai/cordis-plugin-loader": "~1.0.7-alpha.2",
53
+ "@deepseek-ai/dsh-agent-preset-registry": "0.2.2-alpha.3",
54
+ "@deepseek-ai/dsh-brand": "0.2.2-alpha.3",
55
+ "@deepseek-ai/dsh-typert-protocol": "0.2.2-alpha.3",
56
+ "@deepseek-ai/cordis": "~4.0.6-alpha.2"
57
57
  },
58
58
  "peerDependenciesMeta": {
59
59
  "@deepseek-ai/dsh-agent-preset-registry": {
@@ -61,12 +61,12 @@
61
61
  }
62
62
  },
63
63
  "devDependencies": {
64
- "@deepseek-ai/dsh-app-boot": "0.2.1-rc.5",
65
- "@deepseek-ai/dsh-package-manifest": "0.2.1-rc.5",
66
- "@deepseek-ai/cordis-plugin-loader": "~1.0.6",
67
- "@deepseek-ai/dsh-agent-preset-registry": "0.2.1-rc.5",
68
- "@deepseek-ai/dsh-brand": "0.2.1-rc.5",
69
- "@deepseek-ai/dsh-typert-protocol": "0.2.1-rc.5",
70
- "@deepseek-ai/cordis": "~4.0.5"
64
+ "@deepseek-ai/dsh-app-boot": "0.2.2-alpha.3",
65
+ "@deepseek-ai/dsh-package-manifest": "0.2.2-alpha.3",
66
+ "@deepseek-ai/cordis-plugin-loader": "~1.0.7-alpha.2",
67
+ "@deepseek-ai/dsh-agent-preset-registry": "0.2.2-alpha.3",
68
+ "@deepseek-ai/dsh-brand": "0.2.2-alpha.3",
69
+ "@deepseek-ai/dsh-typert-protocol": "0.2.2-alpha.3",
70
+ "@deepseek-ai/cordis": "~4.0.6-alpha.2"
71
71
  }
72
72
  }