@benz-ai-x/dsh-research-graph 0.2.1-alpha.2.1 → 0.2.1-rc.1

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.md CHANGED
@@ -43,7 +43,7 @@ flowchart LR
43
43
  </a>
44
44
  </p>
45
45
 
46
- Version 0.2.1-alpha.2.1 with demo data. Click the image for the full-resolution screenshot.
46
+ Version 0.2.1-rc.1 with demo data. Click the image for the full-resolution screenshot.
47
47
 
48
48
  <a id="features"></a>
49
49
  <a id="what-it-adds"></a>
@@ -66,8 +66,8 @@ Version 0.2.1-alpha.2.1 with demo data. Click the image for the full-resolution
66
66
 
67
67
  | Item | Details |
68
68
  | --- | --- |
69
- | Plugin release | [0.2.1-alpha.2.1](https://github.com/benz-ai-x/dsh-research-graph/releases/tag/v0.2.1-alpha.2.1), npm `next` |
70
- | Required Host | **DSH 0.2.1-alpha.2 · Web**, Node.js `^22.19.0 \|\| >=24.0.0` |
69
+ | Plugin release | [0.2.1-rc.1](https://github.com/benz-ai-x/dsh-research-graph/releases/tag/v0.2.1-rc.1), npm `next` |
70
+ | Required Host | **DSH 0.2.1-rc.1 · Web**, Node.js `^22.19.0 \|\| >=24.0.0` |
71
71
  | Data | Research records live on the DSH Host; working positions stay in the browser and Topic arrangements require explicit saving |
72
72
  | Model calls | Browsing, manual capture, and export make no model call; AI generation and new discussions use models on demand |
73
73
  | Agent capabilities | DSH provides models, tools, presets, and agent execution; this plugin includes no preset or Agent Team launcher. [Details](docs/user-guide.md#dsh-and-agent-presets) |
@@ -77,10 +77,10 @@ Version 0.2.1-alpha.2.1 with demo data. Click the image for the full-resolution
77
77
 
78
78
  ## Quick start
79
79
 
80
- Requires **DSH 0.2.1-alpha.2**, with both `dsh` and `pnpm` on your `PATH`. Stop any running `dsh web`, then run:
80
+ Requires **DSH 0.2.1-rc.1**, with both `dsh` and `pnpm` on your `PATH`. Stop any running `dsh web`, then run:
81
81
 
82
82
  ```sh
83
- dsh plugin --profile web add @benz-ai-x/dsh-research-graph@0.2.1-alpha.2.1
83
+ dsh plugin --profile web add @benz-ai-x/dsh-research-graph@0.2.1-rc.1
84
84
  dsh web
85
85
  ```
86
86
 
@@ -94,7 +94,9 @@ Every npm release of the current package name, with its required DSH Host (taken
94
94
 
95
95
  | Plugin release | Required DSH | Notes |
96
96
  | --- | --- | --- |
97
- | `0.2.1-alpha.2.1` | `0.2.1-alpha.2` | Current release (Merge model selection and rename fix), npm `next` |
97
+ | `0.2.1-rc.1` | `0.2.1-rc.1` | Current release (compatibility adaptation), npm `next` |
98
+ | `0.2.1-alpha.5` | `0.2.1-alpha.5` | |
99
+ | `0.2.1-alpha.2.1` | `0.2.1-alpha.2` | Merge model selection and rename fix |
98
100
  | `0.2.1-alpha.2` | `0.2.1-alpha.2` | |
99
101
  | `0.2.1-alpha.1` | `0.2.1-alpha.1` | |
100
102
  | `0.2.0-rc.2.1` | `0.2.0-rc.2` | Same-line revision (workbench design refresh) |
@@ -117,4 +119,4 @@ Releases up to `0.1.5-rc.1` were also published under the previous package name
117
119
 
118
120
  ## Docs and support
119
121
 
120
- [User guide](docs/user-guide.md) · [Troubleshooting](docs/user-guide.md#troubleshooting) · [Development and release](docs/development.md) · [Release acceptance](docs/reviews/release-0.2.1-alpha.2.1.md) · [Report an issue](https://github.com/benz-ai-x/dsh-research-graph/issues)
122
+ [User guide](docs/user-guide.md) · [Troubleshooting](docs/user-guide.md#troubleshooting) · [Development and release](docs/development.md) · [Release acceptance](docs/reviews/release-0.2.1-rc.1.md) · [Report an issue](https://github.com/benz-ai-x/dsh-research-graph/issues)
package/README.zh.md CHANGED
@@ -43,7 +43,7 @@ flowchart LR
43
43
  </a>
44
44
  </p>
45
45
 
46
- 0.2.1-alpha.2.1 的真实界面(演示数据),点击图片查看高清原图。
46
+ 0.2.1-rc.1 的真实界面(演示数据),点击图片查看高清原图。
47
47
 
48
48
  <a id="核心能力"></a>
49
49
 
@@ -65,8 +65,8 @@ flowchart LR
65
65
 
66
66
  | 项目 | 说明 |
67
67
  | --- | --- |
68
- | 当前插件 | [0.2.1-alpha.2.1](https://github.com/benz-ai-x/dsh-research-graph/releases/tag/v0.2.1-alpha.2.1),npm `next` |
69
- | 适配宿主 | **DSH 0.2.1-alpha.2 · Web**,Node.js `^22.19.0 \|\| >=24.0.0` |
68
+ | 当前插件 | [0.2.1-rc.1](https://github.com/benz-ai-x/dsh-research-graph/releases/tag/v0.2.1-rc.1),npm `next` |
69
+ | 适配宿主 | **DSH 0.2.1-rc.1 · Web**,Node.js `^22.19.0 \|\| >=24.0.0` |
70
70
  | 数据保存 | 研究数据保存在 DSH Host;工作位置保存在浏览器,主题排列需显式保存 |
71
71
  | 模型调用 | 浏览、手工留卡、导出不调用模型;AI 生成与新讨论按需调用 |
72
72
  | Agent 能力 | 模型、工具、预设与 Agent 执行由 DSH 提供;插件不内置预设或 Agent Team 启动器。[详细说明](docs/user-guide.zh.md#dsh-与-agent-预设) |
@@ -76,10 +76,10 @@ flowchart LR
76
76
 
77
77
  ## 快速开始
78
78
 
79
- 需要 **DSH 0.2.1-alpha.2**,并确保 `dsh`、`pnpm` 均在 `PATH` 中。如有正在运行的 `dsh web`,先停止,再执行:
79
+ 需要 **DSH 0.2.1-rc.1**,并确保 `dsh`、`pnpm` 均在 `PATH` 中。如有正在运行的 `dsh web`,先停止,再执行:
80
80
 
81
81
  ```sh
82
- dsh plugin --profile web add @benz-ai-x/dsh-research-graph@0.2.1-alpha.2.1
82
+ dsh plugin --profile web add @benz-ai-x/dsh-research-graph@0.2.1-rc.1
83
83
  dsh web
84
84
  ```
85
85
 
@@ -93,7 +93,9 @@ dsh web
93
93
 
94
94
  | 插件版本 | 要求的 DSH | 备注 |
95
95
  | --- | --- | --- |
96
- | `0.2.1-alpha.2.1` | `0.2.1-alpha.2` | 当前版本(汇聚模型选择与改名修复),npm `next` |
96
+ | `0.2.1-rc.1` | `0.2.1-rc.1` | 当前版本(兼容性适配),npm `next` |
97
+ | `0.2.1-alpha.5` | `0.2.1-alpha.5` | |
98
+ | `0.2.1-alpha.2.1` | `0.2.1-alpha.2` | 汇聚模型选择与改名修复 |
97
99
  | `0.2.1-alpha.2` | `0.2.1-alpha.2` | |
98
100
  | `0.2.1-alpha.1` | `0.2.1-alpha.1` | |
99
101
  | `0.2.0-rc.2.1` | `0.2.0-rc.2` | 同线修订(工作台设计刷新) |
@@ -116,4 +118,4 @@ dsh web
116
118
 
117
119
  ## 文档与支持
118
120
 
119
- [使用指南](docs/user-guide.zh.md) · [故障排查](docs/user-guide.zh.md#故障排查) · [开发与发布](docs/development.zh.md) · [发布验收](docs/reviews/release-0.2.1-alpha.2.1.md) · [问题反馈](https://github.com/benz-ai-x/dsh-research-graph/issues)
121
+ [使用指南](docs/user-guide.zh.md) · [故障排查](docs/user-guide.zh.md#故障排查) · [开发与发布](docs/development.zh.md) · [发布验收](docs/reviews/release-0.2.1-rc.1.md) · [问题反馈](https://github.com/benz-ai-x/dsh-research-graph/issues)
package/lib/client.js CHANGED
@@ -120,9 +120,9 @@ window.__ModuleLoader__.load({
120
120
  /** Published package identity shown in the Graph header tooltip. */
121
121
  const SESSION_GRAPH_PACKAGE_NAME = "@benz-ai-x/dsh-research-graph";
122
122
  /** Package version from package.json at build time. */
123
- const SESSION_GRAPH_VERSION = "0.2.1-alpha.2.1";
123
+ const SESSION_GRAPH_VERSION = "0.2.1-rc.1";
124
124
  /** Content-derived identifier for the exact local browser build. */
125
- const SESSION_GRAPH_BUILD_ID = "local-2116f713";
125
+ const SESSION_GRAPH_BUILD_ID = "local-7592b188";
126
126
  /** Compact user-visible version badge. */
127
127
  const SESSION_GRAPH_BUILD_LABEL = `Research Graph v${SESSION_GRAPH_VERSION} · ${SESSION_GRAPH_BUILD_ID}`;
128
128
  /** Complete native-tooltip text for the version badge. */
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as TypertProtocol from "@deepseek-ai/dsh-typert-protocol";
2
- import { Remote, TypertRemoteService, remoteErrorOf } from "@deepseek-ai/dsh-typert-protocol";
2
+ import { Remote, TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
3
3
  import z from "@deepseek-ai/schemastery";
4
4
  import { BlockAssembler, createUserMessage } from "@deepseek-ai/dsh-llm";
5
5
  import { z as z$1 } from "zod";
@@ -3954,20 +3954,29 @@ let HistoryBranchService = (() => {
3954
3954
  if (cwd === void 0) throw new Error("Branch target has no working directory");
3955
3955
  const workspaces = this.ctx.workspaceRegistry.list();
3956
3956
  const workspace = workspaces.find((item) => item.path === cwd && item.sessionIds.includes(record.sessionId)) ?? workspaces.find((item) => item.path === seed.header.cwd);
3957
- try {
3958
- await this.ctx.sessionController.create({
3959
- sessionId: record.targetSessionId,
3960
- ...workspace === void 0 ? { cwd } : { workspaceId: workspace.id }
3957
+ if (this.ctx.agents.get(record.targetSessionId) === void 0) {
3958
+ const { provider, model } = this.ctx.agentDefaultModel.currentSelection();
3959
+ await this.ctx.agents.resume({
3960
+ resumeSessionId: record.targetSessionId,
3961
+ agentOptions: {
3962
+ provider,
3963
+ model
3964
+ }
3961
3965
  });
3966
+ }
3967
+ if (workspace !== void 0 && !workspace.sessionIds.includes(record.targetSessionId)) try {
3968
+ await workspace.attachSession(record.targetSessionId);
3962
3969
  } catch (error) {
3963
- const failure = remoteErrorOf(error);
3964
- if (failure?.code === "session/workspace-attach-failed" && workspace !== void 0 && failure.details?.sessionId === record.targetSessionId && failure.details.workspaceId === workspace.id) stored = {
3965
- ...stored,
3966
- record: {
3967
- ...stored.record,
3968
- stage: "created"
3969
- }
3970
- };
3970
+ if (stored.record.stage === "prepared") {
3971
+ stored = {
3972
+ ...stored,
3973
+ record: {
3974
+ ...stored.record,
3975
+ stage: "created"
3976
+ }
3977
+ };
3978
+ await table.put(operationId, stored);
3979
+ }
3971
3980
  throw error;
3972
3981
  }
3973
3982
  if (stored.record.stage === "prepared") {
@@ -4598,7 +4607,9 @@ async function apply(ctx, config = {}) {
4598
4607
  "sessionPersistence",
4599
4608
  "sessionGraphTopics",
4600
4609
  "workspaceRegistry",
4601
- "sessionQuery"
4610
+ "sessionQuery",
4611
+ "agents",
4612
+ "agentDefaultModel"
4602
4613
  ], async (branchCtx) => {
4603
4614
  const domain = await branchCtx.storageDomain.open(HISTORY_BRANCH_DOMAIN);
4604
4615
  try {
@@ -1988,7 +1988,7 @@ var Service = class Service {
1988
1988
  }
1989
1989
  };
1990
1990
  //#endregion
1991
- //#region node_modules/.pnpm/@deepseek-ai+dsh-brand@0.2.1-alpha.2_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-brand/lib/index.js
1991
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-brand@0.2.1-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-brand/lib/index.js
1992
1992
  /**
1993
1993
  * Duplicate-install-safe nominal primitive helpers.
1994
1994
  *
@@ -2019,7 +2019,7 @@ function brandNumber(value) {
2019
2019
  return value;
2020
2020
  }
2021
2021
  //#endregion
2022
- //#region node_modules/.pnpm/@deepseek-ai+dsh-util-values@0.2.1-alpha.2_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-util-values/lib/index.js
2022
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-util-values@0.2.1-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-util-values/lib/index.js
2023
2023
  /**
2024
2024
  * Lazily scanned view of one JSON object's top-level fields, built from text
2025
2025
  * that may still be streaming or from an already parsed object. Nothing is
@@ -2872,7 +2872,7 @@ function deepFreeze(value) {
2872
2872
  return value;
2873
2873
  }
2874
2874
  //#endregion
2875
- //#region node_modules/.pnpm/@deepseek-ai+dsh-typert-protocol@0.2.1-alpha.2_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-typert-protocol/lib/index.js
2875
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-typert-protocol@0.2.1-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-typert-protocol/lib/index.js
2876
2876
  /** The one Remote failure class shared by owners, the Gateway, and consumers. */
2877
2877
  /**
2878
2878
  * One Remote call failure: a real Error carrying its stable code and typed
@@ -2922,7 +2922,7 @@ const REMOTE_METHOD_DESCRIPTOR = "@deepseek-ai/dsh-typert-protocol/remote-method
2922
2922
  * a Host composition to read it.
2923
2923
  * @param service - owning Service instance, normally `this`.
2924
2924
  * @param serviceKey - exact Cordis service key.
2925
- * @param options - optional distinct wire namespace.
2925
+ * @param options - optional wire namespace.
2926
2926
  * @returns a frozen, inspectable binding with no compiler-injected metadata.
2927
2927
  */
2928
2928
  function bindTypertRemote(service, serviceKey, options = {}) {
@@ -2930,7 +2930,7 @@ function bindTypertRemote(service, serviceKey, options = {}) {
2930
2930
  const namespace = options.namespace ?? serviceKey;
2931
2931
  validateName("namespace", namespace);
2932
2932
  const ctx = Reflect.get(service, "ctx");
2933
- if (ctx instanceof Context) provideInvocationAccessor(ctx);
2933
+ if (Context.is(ctx)) provideInvocationAccessor(ctx);
2934
2934
  return Object.freeze({
2935
2935
  service,
2936
2936
  serviceKey,
@@ -2945,7 +2945,7 @@ var TypertRemoteService = class extends Service {
2945
2945
  * Register the Service and bind the same key to Typert Gateway.
2946
2946
  * @param ctx - owning Cordis Context.
2947
2947
  * @param serviceKey - exact Cordis service key and default wire namespace.
2948
- * @param options - optional distinct wire namespace.
2948
+ * @param options - optional wire namespace.
2949
2949
  */
2950
2950
  constructor(ctx, serviceKey, options = {}) {
2951
2951
  super(ctx, serviceKey);
@@ -2965,21 +2965,42 @@ function provideInvocationAccessor(ctx) {
2965
2965
  function Remote(methodExportOrOptions, context) {
2966
2966
  if (typeof methodExportOrOptions === "string") {
2967
2967
  validateName("Remote export name", methodExportOrOptions);
2968
- return remoteDecorator({ kind: "direct" }, void 0, methodExportOrOptions);
2969
- }
2970
- if (typeof methodExportOrOptions === "object") {
2971
- if (remoteOptionMode(methodExportOrOptions) !== "stream" || Reflect.ownKeys(methodExportOrOptions).length !== 1) throw new TypeError("typert-protocol: Remote options must contain exactly mode: \"stream\"");
2972
- return remoteDecorator({ kind: "direct" }, "stream");
2968
+ return remoteDecorator({ kind: "direct" }, { exportName: methodExportOrOptions });
2973
2969
  }
2970
+ if (typeof methodExportOrOptions === "object") return remoteDecorator({ kind: "direct" }, markerOptions(methodExportOrOptions, REMOTE_OPTION_KEYS, "Remote options require name, mode: \"stream\", or resources"));
2974
2971
  if (context === void 0) throw new TypeError("typert-protocol: Remote decorator context is missing");
2975
2972
  addMarkerInitializer(context, { kind: "direct" });
2976
2973
  }
2977
- function remoteOptionMode(options) {
2978
- return Reflect.get(options, "mode");
2974
+ const REMOTE_OPTION_KEYS = /* @__PURE__ */ new Set([
2975
+ "name",
2976
+ "mode",
2977
+ "resources"
2978
+ ]);
2979
+ /** Validate one decorator options object against its accepted keys and select the marker fields. */
2980
+ function markerOptions(options, accepted, requirement) {
2981
+ const keys = Reflect.ownKeys(options);
2982
+ if (keys.length === 0 || keys.some((key) => typeof key !== "string" || !accepted.has(key)) || Object.hasOwn(options, "mode") && options.mode !== "stream") throw new TypeError(`typert-protocol: ${requirement}`);
2983
+ const { mode, name, resources } = options;
2984
+ if (name !== void 0) validateName("Remote export name", name);
2985
+ return {
2986
+ ...mode === void 0 ? {} : { mode },
2987
+ ...name === void 0 ? {} : { exportName: name },
2988
+ ...resources === void 0 ? {} : { resources: resourceReaders(resources) }
2989
+ };
2990
+ }
2991
+ /** Freeze declared readers into the marker record; a misdeclared reader fails at decoration. */
2992
+ function resourceReaders(resources) {
2993
+ const readers = {};
2994
+ for (const [kind, reader] of Object.entries(resources)) {
2995
+ if (typeof reader !== "function") throw new TypeError(`typert-protocol: Remote resource reader "${kind}" must be a function`);
2996
+ readers[kind] = reader;
2997
+ }
2998
+ if (Object.keys(readers).length === 0) throw new TypeError("typert-protocol: Remote resources require at least one reader");
2999
+ return Object.freeze(readers);
2979
3000
  }
2980
- function remoteDecorator(invocation, mode, exportName) {
3001
+ function remoteDecorator(invocation, options = {}) {
2981
3002
  return function(_method, context) {
2982
- addMarkerInitializer(context, invocation, mode, exportName);
3003
+ addMarkerInitializer(context, invocation, options);
2983
3004
  };
2984
3005
  }
2985
3006
  function readRemoteMethodDescriptor(prototype) {
@@ -2993,26 +3014,27 @@ function readRemoteMethodDescriptor(prototype) {
2993
3014
  if (!Array.isArray(methods)) throw new TypeError("typert-protocol: Remote method descriptor methods must be an array");
2994
3015
  return descriptor;
2995
3016
  }
2996
- function addMarkerInitializer(context, invocation, mode, exportName) {
3017
+ function addMarkerInitializer(context, invocation, options = {}) {
2997
3018
  if (context.private || context.static || typeof context.name !== "string") throw new TypeError("typert-protocol: Remote decorators require a public instance method with a string name");
2998
3019
  const method = context.name;
2999
3020
  context.addInitializer(function() {
3000
3021
  const prototype = Object.getPrototypeOf(this);
3001
3022
  if (prototype === null) throw new TypeError(`typert-protocol: cannot mark Remote method "${method}" on an object without a prototype`);
3002
- mark(prototype, method, invocation, mode, exportName);
3023
+ mark(prototype, method, invocation, options);
3003
3024
  });
3004
3025
  }
3005
- function mark(prototype, method, invocation, mode, exportName) {
3026
+ function mark(prototype, method, invocation, { mode, exportName, resources }) {
3006
3027
  const descriptor = readRemoteMethodDescriptor(prototype);
3007
3028
  const marker = Object.freeze({
3008
3029
  method,
3009
3030
  ...exportName === void 0 || exportName === method ? {} : { exportName },
3010
3031
  ...mode === void 0 ? {} : { mode },
3011
- invocation: Object.freeze(invocation)
3032
+ invocation: Object.freeze(invocation),
3033
+ ...resources === void 0 ? {} : { resources }
3012
3034
  });
3013
3035
  const current = descriptor?.methods.find((candidate) => candidate.method === method);
3014
3036
  if (current !== void 0) {
3015
- if (current.exportName === marker.exportName && current.mode === marker.mode && sameInvocation(current.invocation, invocation)) return;
3037
+ if (current.exportName === marker.exportName && current.mode === marker.mode && current.resources === marker.resources && sameInvocation(current.invocation, invocation)) return;
3016
3038
  throw new Error(`typert-protocol: Remote method "${method}" has conflicting invocation markers`);
3017
3039
  }
3018
3040
  Object.defineProperty(prototype, REMOTE_METHOD_DESCRIPTOR, {
@@ -3032,7 +3054,7 @@ function validateName(subject, value) {
3032
3054
  if (!isTypertRemoteSegment(value)) throw new TypeError(`typert-protocol: ${subject} must contain only RPC endpoint segment characters`);
3033
3055
  }
3034
3056
  //#endregion
3035
- //#region node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.6-alpha.1/node_modules/@deepseek-ai/cosmokit/lib/index.js
3057
+ //#region node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.6/node_modules/@deepseek-ai/cosmokit/lib/index.js
3036
3058
  /** Return true when a value is `null` or `undefined`. */
3037
3059
  function isNullable(value) {
3038
3060
  return value === null || value === void 0;
@@ -3286,7 +3308,7 @@ var Time;
3286
3308
  Time.template = template;
3287
3309
  })(Time || (Time = {}));
3288
3310
  //#endregion
3289
- //#region node_modules/.pnpm/@deepseek-ai+schemastery@3.18.5-alpha.1/node_modules/@deepseek-ai/schemastery/lib/index.mjs
3311
+ //#region node_modules/.pnpm/@deepseek-ai+schemastery@3.18.5/node_modules/@deepseek-ai/schemastery/lib/index.mjs
3290
3312
  const kSchema = Symbol.for("schemastery");
3291
3313
  const kValidationError = Symbol.for("ValidationError");
3292
3314
  globalThis.__schemastery_index__ ??= 0;
@@ -3919,11 +3941,11 @@ defineMethod("transform", [
3919
3941
  "preserve"
3920
3942
  ], ({ inner }, isInner) => inner.toString(isInner));
3921
3943
  //#endregion
3922
- //#region node_modules/.pnpm/@deepseek-ai+dsh-timeout@0.2.1-alpha.2_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-timeout/lib/index.js
3944
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-timeout@0.2.1-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-timeout/lib/index.js
3923
3945
  /** Largest delay Node schedules without clamping it to one millisecond. */
3924
3946
  const MAX_TIMER_DELAY_MS = 2147483647;
3925
3947
  //#endregion
3926
- //#region node_modules/.pnpm/@deepseek-ai+dsh-llm@0.2.1-alpha.2_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-llm/lib/index.js
3948
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-llm@0.2.1-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-llm/lib/index.js
3927
3949
  /**
3928
3950
  * Detach and deep-freeze a message whose identity already exists.
3929
3951
  * @param message - complete message, including its stable identity.
@@ -4734,10 +4756,7 @@ var LlmError = class extends HarnessError {
4734
4756
  if (entry.provider.length === 0 || entry.displayName.length === 0 || entry.settingsNs.length === 0) throw new LlmError("configurable providers need a non-empty provider, displayName, and settingsNs", "INVALID_DIRECTORY");
4735
4757
  if (entry.settingsPath.some((segment) => segment.length === 0)) throw new LlmError(`configurable provider "${entry.provider}" has an empty settingsPath segment`, "INVALID_DIRECTORY");
4736
4758
  if (this.directory.has(entry.provider) && !own.has(entry.provider) || detached.some((seen) => seen.provider === entry.provider)) throw new LlmError(`configurable provider "${entry.provider}" is already declared`, "DUPLICATE_DIRECTORY");
4737
- detached.push({
4738
- ...entry,
4739
- settingsPath: [...entry.settingsPath]
4740
- });
4759
+ detached.push(detachDirectoryEntry(entry));
4741
4760
  }
4742
4761
  for (const entry of held) this.directory.delete(entry.provider);
4743
4762
  for (const entry of detached) this.directory.set(entry.provider, entry);
@@ -4766,10 +4785,7 @@ var LlmError = class extends HarnessError {
4766
4785
  * @returns detached directory entries in declaration order.
4767
4786
  */
4768
4787
  listConfigurableProviders() {
4769
- return [...this.directory.values()].map((entry) => ({
4770
- ...entry,
4771
- settingsPath: [...entry.settingsPath]
4772
- }));
4788
+ return [...this.directory.values()].map(detachDirectoryEntry);
4773
4789
  }
4774
4790
  /**
4775
4791
  * Offer to interrogate provider endpoints on behalf of the settings
@@ -4861,6 +4877,16 @@ var LlmError = class extends HarnessError {
4861
4877
  return this.adapters.get(provider)?.adapter.imageRequestPricing(provider, model);
4862
4878
  }
4863
4879
  /**
4880
+ * Resolve the image projection for an exact registered model route.
4881
+ * @param provider - registered provider route.
4882
+ * @param model - exact model id.
4883
+ * @param image - normalized image reference.
4884
+ * @returns dimensions and byte target used by the adapter's request serializer.
4885
+ */
4886
+ imageRequestTarget(provider, model, image) {
4887
+ return this.registration(provider).adapter.imageRequestTarget(provider, model, image);
4888
+ }
4889
+ /**
4864
4890
  * Resolve the exact text one durable file occurrence contributes to every
4865
4891
  * provider request in the current execution environment.
4866
4892
  * @param ref - durable verbatim file reference from model history.
@@ -5209,8 +5235,21 @@ function adapterFailureChunk(error, signal) {
5209
5235
  }
5210
5236
  };
5211
5237
  }
5238
+ /** Copy a directory entry, including its arrays, so neither side can mutate the other's copy. */
5239
+ function detachDirectoryEntry(entry) {
5240
+ const { nativeAuth } = entry;
5241
+ return {
5242
+ ...entry,
5243
+ settingsPath: [...entry.settingsPath],
5244
+ ...entry.baseURLEnv === void 0 ? {} : { baseURLEnv: [...entry.baseURLEnv] },
5245
+ ...nativeAuth === void 0 ? {} : { nativeAuth: {
5246
+ ...nativeAuth,
5247
+ env: [...nativeAuth.env]
5248
+ } }
5249
+ };
5250
+ }
5212
5251
  //#endregion
5213
- //#region node_modules/.pnpm/@deepseek-ai+dsh-session@0.2.1-alpha.2_@deepseek-ai+cordis@4.0.2_@deepseek-ai+dsh-scope_febda4d379fd78a25b91ab05dd3d58eb/node_modules/@deepseek-ai/dsh-session/lib/index.js
5252
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-session@0.2.1-rc.1_@deepseek-ai+cordis@4.0.2_@deepseek-ai+dsh-scope@0._f8a1c4a77a4d81ea25127aac376ec831/node_modules/@deepseek-ai/dsh-session/lib/index.js
5214
5253
  /**
5215
5254
  * Brand a string as a {@link SessionId}.
5216
5255
  * @param id - the raw session id string.
@@ -5280,6 +5319,8 @@ const KNOWN_SESSION_EVENT_TYPES = /* @__PURE__ */ new Set([
5280
5319
  "hook/invoked",
5281
5320
  "hook/result",
5282
5321
  "image/offload",
5322
+ "job/registered",
5323
+ "job/settled",
5283
5324
  "llm/retry",
5284
5325
  "llm/retry-started",
5285
5326
  "model/selection",
@@ -6399,7 +6440,7 @@ var Session = class Session {
6399
6440
  }
6400
6441
  };
6401
6442
  //#endregion
6402
- //#region node_modules/.pnpm/@deepseek-ai+dsh-session-format@0.2.1-alpha.2_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-session-format/lib/index.js
6443
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-session-format@0.2.1-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-session-format/lib/index.js
6403
6444
  /** Error raised when a durable Session artifact cannot be restored or migrated losslessly. */
6404
6445
  var SessionFormatError = class extends Error {
6405
6446
  name = "SessionFormatError";
@@ -6851,7 +6892,7 @@ function malformed(targetVersion, error, storedVersion) {
6851
6892
  });
6852
6893
  }
6853
6894
  //#endregion
6854
- //#region node_modules/.pnpm/@deepseek-ai+dsh-compaction-image-offload@0.2.1-alpha.2_0bbad2ef708d682212bf8a709a995828/node_modules/@deepseek-ai/dsh-compaction-image-offload/lib/types/project-message.js
6895
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-compaction-image-offload@0.2.1-rc.1_19ee508bc353b72acd55304c85498dde/node_modules/@deepseek-ai/dsh-compaction-image-offload/lib/types/project-message.js
6855
6896
  /** Immutable application of the image occurrences recorded by image/offload. */
6856
6897
  /**
6857
6898
  * Project selected image occurrences to immutable offloaded blocks.
@@ -6891,7 +6932,7 @@ function offloadMessageImages(message, indexes) {
6891
6932
  });
6892
6933
  }
6893
6934
  //#endregion
6894
- //#region node_modules/.pnpm/@deepseek-ai+dsh-compaction-image-offload@0.2.1-alpha.2_0bbad2ef708d682212bf8a709a995828/node_modules/@deepseek-ai/dsh-compaction-image-offload/lib/types/projection.js
6935
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-compaction-image-offload@0.2.1-rc.1_19ee508bc353b72acd55304c85498dde/node_modules/@deepseek-ai/dsh-compaction-image-offload/lib/types/projection.js
6895
6936
  /** Browser-safe durable image selection declaration and pure replay definition. */
6896
6937
  /** Whether a durable value is a JSON object. */
6897
6938
  function isRecord(value) {
@@ -6928,7 +6969,7 @@ const imageOffloadProjection = {
6928
6969
  }
6929
6970
  };
6930
6971
  //#endregion
6931
- //#region node_modules/.pnpm/@deepseek-ai+dsh-session-format-v0-to-v1@0.2.1-alpha.2_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-session-format-v0-to-v1/lib/index.js
6972
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-session-format-v0-to-v1@0.2.1-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-session-format-v0-to-v1/lib/index.js
6932
6973
  /**
6933
6974
  * Freeze one exact released payload-member disposition for adjacent format validators.
6934
6975
  * @param required - members that must be present.
@@ -9428,7 +9469,7 @@ function assertCurrentSurfaceSpan(surface, data, type) {
9428
9469
  if (expected.length !== seqs.length || expected.some((seq, index) => seq !== seqs[index])) throw new SessionFormatError(`${type} shadowedSeqs do not name an exact current surface span`);
9429
9470
  }
9430
9471
  //#endregion
9431
- //#region node_modules/.pnpm/@deepseek-ai+dsh-session-format-v1-to-v2@0.2.1-alpha.2_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-session-format-v1-to-v2/lib/index.js
9472
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-session-format-v1-to-v2@0.2.1-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-session-format-v1-to-v2/lib/index.js
9432
9473
  const retained = Object.fromEntries(Object.entries(RELEASED_V0_EVENT_DISPOSITIONS).filter(([type]) => type !== "assistant/chunk" && type !== "assistant/message" && type !== "session-log-deepseek/delivery-accepted" && type !== "session/end-seed"));
9433
9474
  /** Exact top-level event and payload-member inventory frozen for released v2. */
9434
9475
  const RELEASED_V2_EVENT_DISPOSITIONS = Object.freeze({
@@ -10252,7 +10293,7 @@ function refusal(message) {
10252
10293
  return new SessionFormatUnsupportedMigrationError(message);
10253
10294
  }
10254
10295
  //#endregion
10255
- //#region node_modules/.pnpm/@deepseek-ai+dsh-session-format-v2-to-v3@0.2.1-alpha.2_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-session-format-v2-to-v3/lib/index.js
10296
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-session-format-v2-to-v3@0.2.1-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-session-format-v2-to-v3/lib/index.js
10256
10297
  /** Audited V2 migration admission and V3 payload validation, independent of installed core Session types. */
10257
10298
  /** Audited surface event names; all other admitted events are log-only. */
10258
10299
  const SURFACE_TYPES$1 = /* @__PURE__ */ new Set([
@@ -11106,7 +11147,7 @@ function renameMessageSource(message) {
11106
11147
  };
11107
11148
  }
11108
11149
  //#endregion
11109
- //#region node_modules/.pnpm/@deepseek-ai+dsh-session-format-v3-to-v4@0.2.1-alpha.2_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/lib/index.js
11150
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-session-format-v3-to-v4@0.2.1-rc.1_@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/lib/index.js
11110
11151
  /** Released V3 plugin-source conversion and declared message traversal. */
11111
11152
  /**
11112
11153
  * Visit only messages carried by first-party event payloads.
@@ -12086,7 +12127,7 @@ const sessionFormatV3ToV4 = defineSessionFormatMigration({
12086
12127
  validateTargetHeader: assertReleasedV4Header
12087
12128
  });
12088
12129
  //#endregion
12089
- //#region node_modules/.pnpm/@deepseek-ai+dsh-session-format-catalog@0.2.1-alpha.2_0bbad2ef708d682212bf8a709a995828/node_modules/@deepseek-ai/dsh-session-format-catalog/lib/index.js
12130
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-session-format-catalog@0.2.1-rc.1_19ee508bc353b72acd55304c85498dde/node_modules/@deepseek-ai/dsh-session-format-catalog/lib/index.js
12090
12131
  /** Pure first-party message interpreters for detached current-format replay, including browser readers. */
12091
12132
  /** Installed interpretation definitions; recovery listeners are mounted separately by their owning plugins. */
12092
12133
  const currentSessionMessageProjections = [imageOffloadProjection];
package/package.json CHANGED
@@ -21,7 +21,7 @@
21
21
  "typescript",
22
22
  "react"
23
23
  ],
24
- "version": "0.2.1-alpha.2.1",
24
+ "version": "0.2.1-rc.1",
25
25
  "type": "module",
26
26
  "main": "lib/index.js",
27
27
  "types": "lib/types/index.d.ts",
@@ -89,20 +89,20 @@
89
89
  }
90
90
  },
91
91
  "dependencies": {
92
- "@deepseek-ai/dsh-typert-protocol": "0.2.1-alpha.2",
93
- "@deepseek-ai/schemastery": "~3.18.5-alpha.1",
92
+ "@deepseek-ai/dsh-typert-protocol": "0.2.1-rc.1",
93
+ "@deepseek-ai/schemastery": "~3.18.5",
94
94
  "clsx": "^2.1.1",
95
95
  "zod": "4.4.3"
96
96
  },
97
97
  "peerDependencies": {
98
98
  "@deepseek-ai/cordis": "^4.0.2",
99
- "@deepseek-ai/dsh-llm": "0.2.1-alpha.2"
99
+ "@deepseek-ai/dsh-llm": "0.2.1-rc.1"
100
100
  },
101
101
  "devDependencies": {
102
102
  "@deepseek-ai/cordis": "^4.0.2",
103
- "@deepseek-ai/dsh-attachment": "0.2.1-alpha.2",
104
- "@deepseek-ai/dsh-llm": "0.2.1-alpha.2",
105
- "@deepseek-ai/dsh-session-format-catalog": "0.2.1-alpha.2",
103
+ "@deepseek-ai/dsh-attachment": "0.2.1-rc.1",
104
+ "@deepseek-ai/dsh-llm": "0.2.1-rc.1",
105
+ "@deepseek-ai/dsh-session-format-catalog": "0.2.1-rc.1",
106
106
  "@testing-library/react": "^16.3.2",
107
107
  "@types/node": "^22.20.0",
108
108
  "@types/react": "~18.3.1",