dsh-plugin-om 0.0.43 → 0.0.45

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/dist/index.mjs CHANGED
@@ -4,6 +4,7 @@ import { scopeOf } from "@deepseek-ai/dsh-scope";
4
4
  import { SessionId, SessionSeq } from "@deepseek-ai/dsh-session";
5
5
  import { renderPrompt } from "@deepseek-ai/dsh-system-prompt";
6
6
  import { SUBAGENT_DESCRIPTOR_VERSION } from "@deepseek-ai/dsh-subagent";
7
+ import Schema from "@deepseek-ai/schemastery";
7
8
  import { copyFileSync, existsSync, mkdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
8
9
  import { homedir } from "node:os";
9
10
  import path from "node:path";
@@ -89,7 +90,7 @@ function isPluginOwnedSource(source) {
89
90
  function makeLogger(ctx, debug) {
90
91
  return {
91
92
  step(message) {
92
- if (debug) ctx.logger.debug(`${PLUGIN_LABEL}: ${message}`);
93
+ if (typeof debug === "function" ? debug() : debug) ctx.logger.debug(`${PLUGIN_LABEL}: ${message}`);
93
94
  },
94
95
  info(message) {
95
96
  ctx.logger.info(`${PLUGIN_LABEL}: ${message}`);
@@ -272,35 +273,101 @@ async function recordCompressionSession(ctx, parentSession, options) {
272
273
  origin: "subagent",
273
274
  delegationDepth: (header.delegationDepth ?? 0) + 1
274
275
  } });
276
+ const label = compressionRecordLabel(options.phase, options.stats.rounds.length, options.success);
275
277
  child.append("subagent/descriptor", {
276
278
  version: SUBAGENT_DESCRIPTOR_VERSION,
277
279
  mode: "one-shot",
278
280
  provider: COMPACTION_LOG_PROVIDER,
279
- label: compressionRecordLabel(options.phase, options.stats.rounds.length, options.success)
281
+ label
280
282
  });
283
+ child.append("turn/start", { turn: 1 });
281
284
  let step = 0;
282
- for (const message of options.messages) {
285
+ const executed = new Set(options.messages.filter((message) => message.role === "tool").map((message) => message.toolCallId));
286
+ let pending = [];
287
+ const closeStep = () => {
288
+ if (step === 0) return;
289
+ for (const call of pending) {
290
+ if (executed.has(call.id)) continue;
291
+ const repair = createToolResultMessage({
292
+ callId: call.id,
293
+ content: [{
294
+ type: "text",
295
+ text: "压缩循环未执行此工具调用"
296
+ }],
297
+ isError: true
298
+ });
299
+ child.append("tool/result", {
300
+ turn: 1,
301
+ step,
302
+ message: {
303
+ ...repair,
304
+ id: `forked-tool-result-${call.id}-${uuid()}`
305
+ },
306
+ error: {
307
+ name: "ToolNotStartedError",
308
+ code: "TOOL_NOT_STARTED"
309
+ }
310
+ }, { surfaceOp: "append" });
311
+ }
312
+ child.append("step/end", {
313
+ turn: 1,
314
+ step
315
+ });
316
+ pending = [];
317
+ };
318
+ for (const message of options.messages) if (message.role === "assistant") {
319
+ closeStep();
283
320
  step += 1;
284
- if (message.role === "assistant") child.append("assistant/message", {
285
- turn: 0,
321
+ child.append("step/start", {
322
+ turn: 1,
323
+ step
324
+ });
325
+ child.append("assistant/message", {
326
+ turn: 1,
286
327
  step,
287
328
  message,
288
329
  stream: []
289
330
  }, { surfaceOp: "append" });
290
- else if (message.role === "tool") child.append("tool/result", {
291
- turn: 0,
292
- step,
293
- message
294
- }, { surfaceOp: "append" });
295
- else child.append("user/message", message, { surfaceOp: "append" });
296
- }
331
+ pending = message.content.filter((block) => block.type === "tool-call");
332
+ for (const call of pending) {
333
+ if (!executed.has(call.id)) continue;
334
+ child.append("tool/call", {
335
+ turn: 1,
336
+ step,
337
+ callId: call.id,
338
+ name: call.name,
339
+ arguments: call.arguments
340
+ });
341
+ }
342
+ } else if (message.role === "tool") child.append("tool/result", {
343
+ turn: 1,
344
+ step,
345
+ message
346
+ }, { surfaceOp: "append" });
347
+ else child.append("user/message", message, { surfaceOp: "append" });
348
+ closeStep();
297
349
  child.append("user/message", makeStatsMessage(formatCompressionStats(options.phase, options.success, options.stats)), { surfaceOp: "append" });
350
+ child.append("turn/end", {
351
+ turn: 1,
352
+ reason: { kind: "completed" }
353
+ });
354
+ const persistence = ctx.get("sessionPersistence");
355
+ if (persistence === void 0) throw new Error("宿主未提供 sessionPersistence 服务");
356
+ const write = await persistence.create(child.header);
298
357
  try {
299
- await ctx.sessions.flush(child);
300
- } catch (error) {
301
- const message = error instanceof Error ? error.message : String(error);
302
- logger.warn(`压缩会话记录子会话 flush 失败(子会话 ${child.id} 已创建): ${message}`);
358
+ await write.append(child.snapshotEvents());
359
+ await write.flush();
360
+ } finally {
361
+ await write.close();
303
362
  }
363
+ parentSession.append("subagent/catalog", {
364
+ version: 0,
365
+ childId: child.id,
366
+ childCreatedAt: child.header.createdAt,
367
+ mode: "one-shot",
368
+ label
369
+ });
370
+ await ctx.sessions.flush(parentSession);
304
371
  return child.id;
305
372
  } catch (error) {
306
373
  const message = error instanceof Error ? error.message : String(error);
@@ -7792,8 +7859,8 @@ function askUserQuestionText(session, cm) {
7792
7859
  }
7793
7860
  /**
7794
7861
  * 观察视图:被压缩区间(表层 seq 集合)内的完整消息投影为条目——
7795
- * user → 原文(图片等非文本块为注释)、sys → 空条目、assistant/toolcall → 原文渲染,
7796
- * reasoning 作为参考条目置于其所属 assistant 条目之前(每条 assistant 消息输出一次;
7862
+ * user → 原文(图片等非文本块为注释)、sys → 空条目(手动加载的 skill 为 skill 条目)、
7863
+ * assistant/toolcall → 原文渲染,reasoning 作为参考条目置于其所属 assistant 条目之前(每条 assistant 消息输出一次;
7797
7864
  * skipReasoning 时省略)。
7798
7865
  * 要求区间为区间内完整消息的首尾 index。
7799
7866
  */
@@ -7814,6 +7881,23 @@ function buildObserveView(session, seqs, options = {}) {
7814
7881
  for (const cm of indexCompleteMessages(session)) {
7815
7882
  if (!cm.seqs.every((seq) => shadowed.has(seq))) continue;
7816
7883
  if (cm.type === "sys") {
7884
+ const seq = cm.seqs[0];
7885
+ const event = seq === void 0 ? void 0 : session.snapshotEvents()[seq];
7886
+ const source = event?.type === "user/message" ? event.data.source : void 0;
7887
+ if (cm.kind === "skill-invocation" && source?.kind === "skill-invocation" && typeof source.name === "string") {
7888
+ const text = renderCompleteMessage(session, cm);
7889
+ if (text.trim() !== "") {
7890
+ entries.push({
7891
+ kind: "assistant",
7892
+ lo: cm.index,
7893
+ hi: cm.index,
7894
+ text,
7895
+ toolName: SKILL_TOOL_NAME,
7896
+ skillName: source.name
7897
+ });
7898
+ continue;
7899
+ }
7900
+ }
7817
7901
  entries.push({
7818
7902
  kind: "sys",
7819
7903
  lo: cm.index,
@@ -8677,7 +8761,7 @@ function buildCompressionPrompt(skipReasoning) {
8677
8761
  "- 摘要粒度越往后越细:靠近末尾(最近)的消息保留更多细节,开头(较早)的消息简写。",
8678
8762
  "- <history> 条目正文以 CDATA 包裹(空的 <sys> 条目为自闭合空元素,无正文),CDATA 内为逐字原样内容。",
8679
8763
  "- 工具调用条目为 <assistant index=\"N\" type=\"toolcall\" tool-name=\"…\" callId=\"…\">,内含 <tool-args>(调用参数 JSON)与 <tool-result>(工具返回内容)两个 CDATA 子元素。",
8680
- "- 加载的 skill 以 <skill_content name=\"…\" index=\"N\"> 条目呈现,内含 <skill_resources> 与 <skill_instructions> 两段,内文为其工具返回内容,属于关键信息。仅在你明确判断该 skill 与后续任务无关时,压缩它;如果该 skill 与后续任务相关,或者你无法判断,不要压缩,**保持原文**。",
8764
+ "- 加载的 skill 以 <skill_content name=\"…\" index=\"N\"> 条目呈现,内含 <skill_resources> 与 <skill_instructions> 两段,内文为加载的 skill 内容,属于关键信息。仅在你明确判断该 skill 与后续任务无关时,压缩它;如果该 skill 与后续任务相关,或者你无法判断,不要压缩,**保持原文**。",
8681
8765
  "- ask_user_question 工具调用(向用户的提问)以 <ask-user-question index=\"N\"> 条目呈现,CDATA 内为逐题成对的 q:(问题文本)与 a:(用户回答)行,未作答的题记为 a:(未回答),属于关键信息。仅在你明确判断该提问与后续任务无关时,压缩它;如果该提问与后续任务相关,或者你无法判断,不要压缩,**保持原文**。",
8682
8766
  "- 未压缩的条目将原样保留;宁可保留也不要强行压缩不确定的内容。",
8683
8767
  "- 全部完成后调用 completeCompression 结束;不要输出与工具调用无关的文本。"
@@ -9830,21 +9914,23 @@ function ensureModelSmallFiles(modelDir, bundledDir = BUNDLED_MODEL_DIR) {
9830
9914
  }
9831
9915
  /** 单批最大文本数(避免单次推理过大)。 */
9832
9916
  const BATCH_SIZE = 32;
9833
- /** 懒加载中的 pipeline 单例(null = 尚未加载/已重置)。 */
9834
- let pipelinePromise = null;
9835
- /**
9836
- * 获取(或加载)嵌入函数。首次调用动态 import transformers 并加载本地模型,
9837
- * 之后复用同一 pipeline。失败时抛出可读错误(调用方自行降级)。
9838
- */
9917
+ /** 各模型目录的单飞加载缓存。 */
9918
+ const pipelines = /* @__PURE__ */ new Map();
9919
+ /** 懒加载 transformers 模块,跨模型目录并发初始化共享同一个导入。 */
9920
+ let transformersPromise;
9921
+ /** 获取模型目录对应的嵌入函数,同目录单飞,失败允许再次加载。 */
9839
9922
  function getEmbedder(modelDir = BUNDLED_MODEL_DIR) {
9840
- if (pipelinePromise !== null) return pipelinePromise;
9841
- pipelinePromise = (async () => {
9842
- ensureModelSmallFiles(modelDir);
9843
- const { env, pipeline } = await import("@huggingface/transformers");
9844
- env.localModelPath = `${path.dirname(modelDir)}${path.sep}`;
9845
- env.allowLocalModels = true;
9846
- env.allowRemoteModels = false;
9847
- const extractor = await pipeline("feature-extraction", EMBEDDING_MODEL_ID, { dtype: "q8" });
9923
+ const directory = path.resolve(modelDir);
9924
+ const existing = pipelines.get(directory);
9925
+ if (existing) return existing;
9926
+ const loading = (async () => {
9927
+ ensureModelSmallFiles(directory);
9928
+ if (!transformersPromise) transformersPromise = import("@huggingface/transformers");
9929
+ const { pipeline } = await transformersPromise;
9930
+ const extractor = await pipeline("feature-extraction", directory, {
9931
+ dtype: "q8",
9932
+ local_files_only: true
9933
+ });
9848
9934
  return async (texts) => {
9849
9935
  const vectors = [];
9850
9936
  for (let i = 0; i < texts.length; i += BATCH_SIZE) {
@@ -9864,7 +9950,11 @@ function getEmbedder(modelDir = BUNDLED_MODEL_DIR) {
9864
9950
  return vectors;
9865
9951
  };
9866
9952
  })();
9867
- return pipelinePromise;
9953
+ pipelines.set(directory, loading);
9954
+ loading.catch(() => {
9955
+ if (pipelines.get(directory) === loading) pipelines.delete(directory);
9956
+ });
9957
+ return loading;
9868
9958
  }
9869
9959
  /** 每个 modelDir 的在途下载任务(单飞:并发查询只发起一次下载)。 */
9870
9960
  const inflightDownloads = /* @__PURE__ */ new Map();
@@ -9909,9 +9999,9 @@ function cosineSimilarity(a, b) {
9909
9999
  //#endregion
9910
10000
  //#region src/config.ts
9911
10001
  /**
9912
- * 插件配置:默认值与合并。
9913
- * 导出 PluginConfig / DEFAULT_CONFIG / resolveConfig;宽松校验——未知键忽略、
9914
- * 非法值回退默认值,配置错误不影响插件加载。
10002
+ * 插件配置:宿主 Config 严格校验、volatile 引用读取与兼容 YAML 的宽松合并。
10003
+ * 导出 Config / PluginConfig / DEFAULT_CONFIG / currentConfig / resolveConfig;
10004
+ * 旧输入在 resolveConfig 中未知键忽略、非法值回退默认值。
9915
10005
  */
9916
10006
  /** 默认配置(冻结对象,resolveConfig 合并的基底;debug 缺省值在解析时按 NODE_ENV 判定)。 */
9917
10007
  const DEFAULT_CONFIG = Object.freeze({
@@ -9930,6 +10020,33 @@ const DEFAULT_CONFIG = Object.freeze({
9930
10020
  compressModel: void 0,
9931
10021
  compressReasoningEffort: void 0
9932
10022
  });
10023
+ /** 宿主保存时严格校验,所有字段均为稳定 volatile 引用,运行时由 Loader 原地提交。 */
10024
+ const Config = Schema.object({
10025
+ observeThresholdTokens: Schema.number().step(1).default(DEFAULT_CONFIG.observeThresholdTokens).volatile(),
10026
+ reflectThresholdTokens: Schema.number().step(1).default(DEFAULT_CONFIG.reflectThresholdTokens).volatile(),
10027
+ compressMaxTokens: Schema.number().step(1).volatile(),
10028
+ rateLimitWaitMs: Schema.number().step(1).default(DEFAULT_CONFIG.rateLimitWaitMs).volatile(),
10029
+ tailMessageCount: Schema.number().step(1).default(DEFAULT_CONFIG.tailMessageCount).volatile(),
10030
+ compressSkipReasoning: Schema.boolean().default(DEFAULT_CONFIG.compressSkipReasoning).volatile(),
10031
+ omEnabled: Schema.boolean().default(DEFAULT_CONFIG.omEnabled).volatile(),
10032
+ debug: Schema.boolean().default(process.env.NODE_ENV !== "production").volatile(),
10033
+ recallEnabled: Schema.boolean().default(DEFAULT_CONFIG.recallEnabled).volatile(),
10034
+ semanticRecallEnabled: Schema.boolean().default(DEFAULT_CONFIG.semanticRecallEnabled).volatile(),
10035
+ modelDir: Schema.string().default(DEFAULT_CONFIG.modelDir).volatile(),
10036
+ compressProvider: Schema.string().volatile(),
10037
+ compressModel: Schema.string().volatile(),
10038
+ compressReasoningEffort: Schema.string().volatile()
10039
+ }).default({});
10040
+ /** 解析宿主 volatile 引用中的当前值,也兼容直接传入的原始配置对象。 */
10041
+ function currentConfig(config) {
10042
+ if (!isRecord(config)) return resolveConfig(config);
10043
+ const values = {};
10044
+ for (const key of Object.keys(DEFAULT_CONFIG)) {
10045
+ const value = config[key];
10046
+ values[key] = isRecord(value) && typeof value.get === "function" ? value.get() : value;
10047
+ }
10048
+ return resolveConfig(values);
10049
+ }
9933
10050
  /** 数值键校验参数表:键名 + [是否必须为整数]。 */
9934
10051
  const NUMBER_KEYS = [
9935
10052
  ["observeThresholdTokens", true],
@@ -10443,16 +10560,6 @@ function buildSemanticRecallTool(options) {
10443
10560
  }
10444
10561
  //#endregion
10445
10562
  //#region src/index.ts
10446
- /**
10447
- * dsh-plugin-om 入口(tsdown 打包入口):导出 name / inject / apply。
10448
- * apply 注册 recall / recall-semantic 工具,并接线 agent/pre-step 自动压缩
10449
- * (先反思后观察,仅主会话生效)。压缩走工具驱动的压缩循环(模型经 getHistory /
10450
- * compressHistory / completeCompression 工具完成,见 compress-loop.ts);最终失败
10451
- * (连续无工具调用 / 请求级错误)时拒绝本 step 中断当前 turn(signal 中止除外),
10452
- * 主会话日志记录失败原因与诊断子会话 sessionId(完整循环会话由 compaction-log.ts
10453
- * 落盘为子会话)。压缩与检索的实现见 compress.ts / compress-loop.ts /
10454
- * compaction-log.ts / recall.ts / semantic-recall.ts。
10455
- */
10456
10563
  /** 插件名(Loader 识别入口的稳定标识)。 */
10457
10564
  const name = "dsh-plugin-om";
10458
10565
  /** 插件注入的服务依赖(tools/llm/tokenMeter/sessions),由宿主按序注入。 */
@@ -10464,20 +10571,41 @@ const inject = [
10464
10571
  ];
10465
10572
  /** 插件激活入口:解析配置、注册工具、接线 pre-step 自动压缩。 */
10466
10573
  function apply(ctx, config) {
10467
- const resolved = resolveConfig(config);
10468
- const logger = makeLogger(ctx, resolved.debug);
10574
+ const resolved = currentConfig(config);
10575
+ const logger = makeLogger(ctx, () => currentConfig(config).debug);
10469
10576
  logger.step(`apply 启动:observeThresholdTokens=${String(resolved.observeThresholdTokens)} reflectThresholdTokens=${String(resolved.reflectThresholdTokens)} compressMaxTokens=${resolved.compressMaxTokens === void 0 ? "未设置" : String(resolved.compressMaxTokens)} tailMessageCount=${String(resolved.tailMessageCount)} omEnabled=${String(resolved.omEnabled)} debug=${String(resolved.debug)} compressProvider=${resolved.compressProvider ?? "跟随会话路由"} compressModel=${resolved.compressModel ?? "跟随会话路由"} compressReasoningEffort=${resolved.compressReasoningEffort ?? "模型默认"}`);
10470
- if (resolved.recallEnabled) ctx.tools.register(buildRecallTool(() => ctx.get("toolResultPruner")));
10471
- if (resolved.semanticRecallEnabled) {
10472
- const warnModel = (message) => ctx.logger.warn(`dsh-plugin-om: ${message}`);
10473
- const logModel = (message) => logger.info(message);
10474
- ensureModelReady(resolved.modelDir, warnModel, void 0, logModel);
10475
- ctx.tools.register(buildSemanticRecallTool({
10476
- getPruner: () => ctx.get("toolResultPruner"),
10477
- modelStatus: () => ensureModelReady(resolved.modelDir, warnModel, void 0, logModel),
10478
- embedder: (texts) => getEmbedder(resolved.modelDir).then((embed) => embed(texts))
10479
- }));
10577
+ const warnModel = (message) => ctx.logger.warn(`dsh-plugin-om: ${message}`);
10578
+ const logModel = (message) => logger.info(message);
10579
+ let disposeRecall;
10580
+ let disposeSemantic;
10581
+ let modelDir = resolved.modelDir;
10582
+ let semanticEnabled = false;
10583
+ /** 保持实际注册列表与当前配置一致;仅首次启用或更换目录时启动后台预热。 */
10584
+ function syncTools() {
10585
+ const next = currentConfig(config);
10586
+ if (next.recallEnabled && !disposeRecall) disposeRecall = ctx.tools.register(buildRecallTool(() => ctx.get("toolResultPruner")));
10587
+ else if (!next.recallEnabled && disposeRecall) {
10588
+ disposeRecall();
10589
+ disposeRecall = void 0;
10590
+ }
10591
+ if (disposeSemantic && (!next.semanticRecallEnabled || next.modelDir !== modelDir)) {
10592
+ disposeSemantic();
10593
+ disposeSemantic = void 0;
10594
+ }
10595
+ if (next.semanticRecallEnabled && !disposeSemantic) {
10596
+ const directory = next.modelDir;
10597
+ disposeSemantic = ctx.tools.register(buildSemanticRecallTool({
10598
+ getPruner: () => ctx.get("toolResultPruner"),
10599
+ modelStatus: () => ensureModelReady(directory, warnModel, void 0, logModel),
10600
+ embedder: (texts) => getEmbedder(directory).then((embed) => embed(texts))
10601
+ }));
10602
+ }
10603
+ if (next.semanticRecallEnabled && (!semanticEnabled || next.modelDir !== modelDir)) ensureModelReady(next.modelDir, warnModel, void 0, logModel);
10604
+ modelDir = next.modelDir;
10605
+ semanticEnabled = next.semanticRecallEnabled;
10480
10606
  }
10607
+ syncTools();
10608
+ ctx.on("loader/volatile-update", () => syncTools());
10481
10609
  ctx.on("agent/pre-step", async ({ agent, signal }, next) => {
10482
10610
  let outcome = { failed: false };
10483
10611
  try {
@@ -10485,7 +10613,7 @@ function apply(ctx, config) {
10485
10613
  else if (!isMainSession(agent.session)) logger.step("subagent 会话,跳过压缩(仅主会话生效)");
10486
10614
  else {
10487
10615
  logger.step(`pre-step 触发压缩(会话 ${agent.session.id})`);
10488
- outcome = await maybeCompress(ctx, agent, resolved, signal);
10616
+ outcome = await maybeCompress(ctx, agent, currentConfig(config), signal);
10489
10617
  }
10490
10618
  } catch (error) {
10491
10619
  logger.warn(`pre-step 处理失败: ${error instanceof Error ? error.message : String(error)}`);
@@ -10499,4 +10627,4 @@ function apply(ctx, config) {
10499
10627
  });
10500
10628
  }
10501
10629
  //#endregion
10502
- export { apply, inject, name };
10630
+ export { Config, apply, inject, name };
package/dist/logger.d.ts CHANGED
@@ -9,5 +9,5 @@ export type PluginLogger = {
9
9
  warn(message: string): void;
10
10
  };
11
11
  /** 构建插件日志门面:统一加 PLUGIN_LABEL 前缀,step 按 debug 开关过滤。 */
12
- export declare function makeLogger(ctx: Context, debug: boolean): PluginLogger;
12
+ export declare function makeLogger(ctx: Context, debug: boolean | (() => boolean)): PluginLogger;
13
13
  //# sourceMappingURL=logger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,6CAA6C;AAC7C,MAAM,MAAM,YAAY,GAAG;IACzB,4BAA4B;IAC5B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,kBAAkB;IAClB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,mBAAmB;IACnB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,CAAC;AAEF,sDAAsD;AACtD,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,YAAY,CAYrE"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,6CAA6C;AAC7C,MAAM,MAAM,YAAY,GAAG;IACzB,4BAA4B;IAC5B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,kBAAkB;IAClB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,mBAAmB;IACnB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,CAAC;AAEF,sDAAsD;AACtD,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,CAAC,MAAM,OAAO,CAAC,GAAG,YAAY,CAavF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-om",
3
- "version": "0.0.43",
3
+ "version": "0.0.45",
4
4
  "type": "module",
5
5
  "main": "./dist/index.mjs",
6
6
  "module": "./dist/index.mjs",
@@ -39,7 +39,9 @@
39
39
  "client": {
40
40
  "inject": [
41
41
  "@deepseek-ai/dsh-client-locale",
42
- "@deepseek-ai/dsh-client-ui-conversation"
42
+ "@deepseek-ai/dsh-client-ui-conversation",
43
+ "@deepseek-ai/dsh-client-ui-settings",
44
+ "@deepseek-ai/dsh-client-ui-plugin-manager"
43
45
  ],
44
46
  "platform": "web"
45
47
  }
@@ -65,38 +67,74 @@
65
67
  "devDependencies": {
66
68
  "@biomejs/biome": "^2.5.8",
67
69
  "@deepseek-ai/cordis": "^4.0.4",
68
- "@deepseek-ai/dsh-agent": "^0.1.7-rc.2",
69
- "@deepseek-ai/dsh-attachment": "^0.1.7-rc.2",
70
- "@deepseek-ai/dsh-client-locale": "^0.1.7-rc.2",
71
- "@deepseek-ai/dsh-client-ui-chat": "^0.1.7-rc.2",
72
- "@deepseek-ai/dsh-client-ui-conversation": "^0.1.7-rc.2",
73
- "@deepseek-ai/dsh-client-ui-primitives": "^0.1.7-rc.2",
74
- "@deepseek-ai/dsh-client-ui-renderer": "^0.1.7-rc.2",
75
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.7-rc.2",
76
- "@deepseek-ai/dsh-compaction": "^0.1.7-rc.2",
77
- "@deepseek-ai/dsh-compaction-tool-result-pruner": "^0.1.7-rc.2",
78
- "@deepseek-ai/dsh-invariants": "^0.1.7-rc.2",
79
- "@deepseek-ai/dsh-llm": "^0.1.7-rc.2",
80
- "@deepseek-ai/dsh-scope": "^0.1.7-rc.2",
81
- "@deepseek-ai/dsh-session": "^0.1.7-rc.2",
82
- "@deepseek-ai/dsh-session-format-v3-to-v4": "^0.1.7-rc.2",
83
- "@deepseek-ai/dsh-session-projection": "0.1.7-rc.2",
84
- "@deepseek-ai/dsh-subagent": "^0.1.7-rc.2",
85
- "@deepseek-ai/dsh-system-prompt": "^0.1.7-rc.2",
86
- "@deepseek-ai/dsh-token-meter": "^0.1.7-rc.2",
87
- "@deepseek-ai/dsh-tools": "^0.1.7-rc.2",
88
- "@deepseek-ai/dsh-user-approval": "^0.1.7-rc.2",
70
+ "@deepseek-ai/cordis-plugin-loader": "1.0.5",
71
+ "@deepseek-ai/dsh-agent": "0.2.0-rc.2",
72
+ "@deepseek-ai/dsh-agent-loop": "0.2.0-rc.2",
73
+ "@deepseek-ai/dsh-attachment": "0.2.0-rc.2",
74
+ "@deepseek-ai/dsh-attachment-local": "0.2.0-rc.2",
75
+ "@deepseek-ai/dsh-client-locale": "0.2.0-rc.2",
76
+ "@deepseek-ai/dsh-client-store": "0.2.0-rc.2",
77
+ "@deepseek-ai/dsh-client-ui-chat": "0.2.0-rc.2",
78
+ "@deepseek-ai/dsh-client-ui-conversation": "0.2.0-rc.2",
79
+ "@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.0-rc.2",
80
+ "@deepseek-ai/dsh-client-ui-primitives": "0.2.0-rc.2",
81
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.0-rc.2",
82
+ "@deepseek-ai/dsh-client-ui-settings": "0.2.0-rc.2",
83
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.2",
84
+ "@deepseek-ai/dsh-compaction": "0.2.0-rc.2",
85
+ "@deepseek-ai/dsh-compaction-tool-result-pruner": "0.2.0-rc.2",
86
+ "@deepseek-ai/dsh-invariants": "0.2.0-rc.2",
87
+ "@deepseek-ai/dsh-llm": "0.2.0-rc.2",
88
+ "@deepseek-ai/dsh-scope": "0.2.0-rc.2",
89
+ "@deepseek-ai/dsh-session": "0.2.0-rc.2",
90
+ "@deepseek-ai/dsh-session-format-v3-to-v4": "0.2.0-rc.2",
91
+ "@deepseek-ai/dsh-session-log-export": "0.2.0-rc.2",
92
+ "@deepseek-ai/dsh-session-persistence": "0.2.0-rc.2",
93
+ "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.0-rc.2",
94
+ "@deepseek-ai/dsh-session-projection": "0.2.0-rc.2",
95
+ "@deepseek-ai/dsh-session-query": "0.2.0-rc.2",
96
+ "@deepseek-ai/dsh-session-query-sqlite": "0.2.0-rc.2",
97
+ "@deepseek-ai/dsh-subagent": "0.2.0-rc.2",
98
+ "@deepseek-ai/dsh-system-prompt": "0.2.0-rc.2",
99
+ "@deepseek-ai/dsh-token-meter": "0.2.0-rc.2",
100
+ "@deepseek-ai/dsh-tools": "0.2.0-rc.2",
101
+ "@deepseek-ai/dsh-user-approval": "0.2.0-rc.2",
102
+ "@deepseek-ai/dsh-util-code-language": "0.2.0-rc.2",
103
+ "@deepseek-ai/dsh-util-workspace-path": "0.2.0-rc.2",
104
+ "@shikijs/langs": "^4.4.3",
89
105
  "@types/node": "^22.20.0",
90
106
  "@types/react": "~18.3.1",
91
107
  "@types/react-dom": "~18.3.0",
108
+ "anser": "^2.3.5",
109
+ "clsx": "^2.1.1",
110
+ "diff": "^9.0.0",
111
+ "fflate": "0.8.2",
112
+ "immer": "^10.2.0",
113
+ "jsdom": "^26.1.0",
114
+ "katex": "^0.16.47",
115
+ "mdast-util-from-markdown": "^2.0.3",
116
+ "mdast-util-gfm": "^3.1.0",
117
+ "mdast-util-math": "^3.0.0",
118
+ "micromark-core-commonmark": "^2.0.4",
119
+ "micromark-extension-gfm": "^3.0.0",
120
+ "micromark-extension-math": "^3.1.0",
121
+ "micromark-factory-space": "^2.1.0",
122
+ "micromark-util-character": "^2.1.1",
123
+ "micromark-util-classify-character": "^2.0.1",
124
+ "micromark-util-sanitize-uri": "^2.0.1",
125
+ "micromark-util-symbol": "^2.0.1",
92
126
  "react": "^18.2.0",
93
127
  "react-dom": "^18.2.0",
128
+ "shiki": "^4.4.3",
129
+ "simple-icons": "16.31.0",
94
130
  "tsdown": "^0.22.14",
95
131
  "typescript": "^6.0.3",
96
132
  "vitest": "^4.1.10",
97
- "zod": "4.4.3"
133
+ "zod": "4.4.3",
134
+ "zustand": "~4.4.7"
98
135
  },
99
136
  "dependencies": {
137
+ "@deepseek-ai/schemastery": "3.18.4",
100
138
  "@huggingface/transformers": "4.2.0",
101
139
  "@xmldom/xmldom": "0.9.11"
102
140
  }