stratagate-dsh 0.2.92 → 0.2.93

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/plugin.js CHANGED
@@ -6201,7 +6201,7 @@ var StrataGate = class _StrataGate {
6201
6201
  import { readFileSync } from "node:fs";
6202
6202
  import { createRequire } from "node:module";
6203
6203
  var nodeRequire = createRequire(import.meta.url);
6204
- var RUNTIME_PACKAGES = [
6204
+ var CORE_RUNTIME_PACKAGES = [
6205
6205
  "@deepseek-ai/cordis",
6206
6206
  "@deepseek-ai/dsh-agent-default-model",
6207
6207
  "@deepseek-ai/dsh-client-ui-conversation",
@@ -6213,6 +6213,12 @@ var RUNTIME_PACKAGES = [
6213
6213
  "@deepseek-ai/dsh-tools",
6214
6214
  "@deepseek-ai/schemastery"
6215
6215
  ];
6216
+ var SESSION_FORMAT_PACKAGES = [
6217
+ "@deepseek-ai/dsh-session-format",
6218
+ "@deepseek-ai/dsh-session-format-catalog",
6219
+ "@deepseek-ai/dsh-session-format-v0-to-v1"
6220
+ ];
6221
+ var RUNTIME_PACKAGES = [...CORE_RUNTIME_PACKAGES, ...SESSION_FORMAT_PACKAGES];
6216
6222
  var SUPPORTED_RUNTIME_FAMILIES = [
6217
6223
  {
6218
6224
  cli: "0.1.2-rc.1",
@@ -6291,8 +6297,15 @@ var SUPPORTED_RUNTIME_FAMILIES = [
6291
6297
  }
6292
6298
  ];
6293
6299
  var STRATAGATE_MESSAGE_SOURCE_KIND = "plugin:stratagate-memory";
6300
+ function isDsh020Version(version) {
6301
+ const match = /^0\.2\.0(?:-([0-9A-Za-z.-]+))?(?:\+([0-9A-Za-z.-]+))?$/.exec(version);
6302
+ if (!match) return false;
6303
+ const prerelease = match[1]?.split(".") ?? [];
6304
+ const build = match[2]?.split(".") ?? [];
6305
+ return [...prerelease, ...build].every((part) => part.length > 0) && prerelease.every((part) => !/^\d+$/.test(part) || part === "0" || !part.startsWith("0"));
6306
+ }
6294
6307
  function buildDshMessageSource(version, form) {
6295
- const source = /^0\.1\.7(?:-|$)/.test(version) ? { kind: STRATAGATE_MESSAGE_SOURCE_KIND } : { kind: "plugin", plugin: "stratagate-memory" };
6308
+ const source = /^0\.1\.7(?:-|$)/.test(version) || isDsh020Version(version) ? { kind: STRATAGATE_MESSAGE_SOURCE_KIND } : { kind: "plugin", plugin: "stratagate-memory" };
6296
6309
  return form ? { ...source, form } : source;
6297
6310
  }
6298
6311
  function installedVersion(packageName) {
@@ -6323,16 +6336,17 @@ function isCompatiblePatch(version, major, minor, minimumPatch) {
6323
6336
  return !!match && Number(match[1]) === major && Number(match[2]) === minor && Number(match[3]) >= minimumPatch;
6324
6337
  }
6325
6338
  function classifyDshRuntime(packageVersions) {
6326
- const family = SUPPORTED_RUNTIME_FAMILIES.find(({ versions }) => RUNTIME_PACKAGES.every((name2) => packageVersions[name2] === versions[name2]));
6339
+ const family = SUPPORTED_RUNTIME_FAMILIES.find(({ versions }) => CORE_RUNTIME_PACKAGES.every((name2) => packageVersions[name2] === versions[name2]));
6327
6340
  if (family) return { cliVersion: family.cli, packageVersions };
6328
6341
  const dshVersion = packageVersions["@deepseek-ai/dsh-session"];
6329
- const sameDshFamily = RUNTIME_PACKAGES.filter((name2) => name2.startsWith("@deepseek-ai/dsh-")).every((name2) => packageVersions[name2] === dshVersion);
6330
- if ((/^0\.1\.7-rc\.[1-9]\d*$/.test(dshVersion) || dshVersion === "0.1.7") && sameDshFamily && isCompatiblePatch(packageVersions["@deepseek-ai/cordis"], 4, 0, 4) && isCompatiblePatch(packageVersions["@deepseek-ai/schemastery"], 3, 18, 4)) {
6342
+ const sameDshFamily = CORE_RUNTIME_PACKAGES.filter((name2) => name2.startsWith("@deepseek-ai/dsh-")).every((name2) => packageVersions[name2] === dshVersion);
6343
+ const sameSessionFormatFamily = !isDsh020Version(dshVersion) || SESSION_FORMAT_PACKAGES.every((name2) => packageVersions[name2] === dshVersion);
6344
+ if ((/^0\.1\.7-rc\.[1-9]\d*$/.test(dshVersion) || dshVersion === "0.1.7" || isDsh020Version(dshVersion)) && sameDshFamily && sameSessionFormatFamily && isCompatiblePatch(packageVersions["@deepseek-ai/cordis"], 4, 0, 4) && isCompatiblePatch(packageVersions["@deepseek-ai/schemastery"], 3, 18, 4)) {
6331
6345
  return { cliVersion: dshVersion, packageVersions };
6332
6346
  }
6333
6347
  const found = RUNTIME_PACKAGES.map((name2) => `${name2}@${packageVersions[name2]}`).join(", ");
6334
6348
  throw new Error(
6335
- `StrataGate cannot start because this DSH profile resolves an unsupported or mixed core runtime. Resolved: ${found}. Supported hosts are @deepseek-ai/dsh@0.1.2-rc.1 (internal DSH packages 0.1.2-rc.1) and @deepseek-ai/dsh@0.1.5-rc.1 (its real dependency tree uses internal DSH packages 0.1.5-rc.2), and @deepseek-ai/dsh@0.1.6-alpha.1 (internal DSH packages 0.1.6-alpha.1), and the coherent DSH 0.1.7 family from rc.1 through the 0.1.7 release (Cordis 4.0.x from 4.0.4, Schemastery 3.18.x from 3.18.4). Reinstall or update stratagate-dsh through \`dsh plugin --profile <name> add <package>\` so the host supplies its peers.`
6349
+ `StrataGate cannot start because this DSH profile resolves an unsupported or mixed core runtime. Resolved: ${found}. Supported hosts are @deepseek-ai/dsh@0.1.2-rc.1 (internal DSH packages 0.1.2-rc.1) and @deepseek-ai/dsh@0.1.5-rc.1 (its real dependency tree uses internal DSH packages 0.1.5-rc.2), and @deepseek-ai/dsh@0.1.6-alpha.1 (internal DSH packages 0.1.6-alpha.1), and the coherent DSH 0.1.7 family from rc.1 through the 0.1.7 release, and the complete DSH 0.2.0 family (all alpha, beta, rc, and stable versions; >=0.2.0-0 <0.2.1-0) (Cordis 4.0.x from 4.0.4, Schemastery 3.18.x from 3.18.4). Reinstall or update stratagate-dsh through \`dsh plugin --profile <name> add <package>\` so the host supplies its peers.`
6336
6350
  );
6337
6351
  }
6338
6352
  function assertCompatibleDshRuntime() {