stratagate-dsh 0.2.71 → 0.2.72
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/CHANGELOG.md +11 -0
- package/README.md +324 -213
- package/README.zh-CN.md +326 -213
- package/dist/client.js +3 -3
- package/dist/plugin.js +42 -11
- package/dist/plugin.js.map +1 -1
- package/docs/DSH.md +4 -2
- package/docs/DSH.zh-CN.md +4 -2
- package/docs/assets/41fc676096d0a13337a1c03aaf8f499b.png +0 -0
- package/docs/assets/aaed14b0b43a76334008117f6ca104af.png +0 -0
- package/docs/assets/cecc9d191a4b9bf22a479623e2ebdc1d.png +0 -0
- package/docs/assets/fc07e5b6e1cc07c115faa773a2718aa9.png +0 -0
- package/package.json +25 -24
package/dist/plugin.js
CHANGED
|
@@ -5667,6 +5667,20 @@ var SUPPORTED_RUNTIME_FAMILIES = [
|
|
|
5667
5667
|
"@deepseek-ai/dsh-tools": "0.1.5-rc.2",
|
|
5668
5668
|
"@deepseek-ai/schemastery": "3.18.2"
|
|
5669
5669
|
}
|
|
5670
|
+
},
|
|
5671
|
+
{
|
|
5672
|
+
cli: "0.1.6-alpha.1",
|
|
5673
|
+
versions: {
|
|
5674
|
+
"@deepseek-ai/cordis": "4.0.2",
|
|
5675
|
+
"@deepseek-ai/dsh-agent-default-model": "0.1.6-alpha.1",
|
|
5676
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.1.6-alpha.1",
|
|
5677
|
+
"@deepseek-ai/dsh-llm": "0.1.6-alpha.1",
|
|
5678
|
+
"@deepseek-ai/dsh-session": "0.1.6-alpha.1",
|
|
5679
|
+
"@deepseek-ai/dsh-settings": "0.1.6-alpha.1",
|
|
5680
|
+
"@deepseek-ai/dsh-system-prompt": "0.1.6-alpha.1",
|
|
5681
|
+
"@deepseek-ai/dsh-tools": "0.1.6-alpha.1",
|
|
5682
|
+
"@deepseek-ai/schemastery": "3.18.2"
|
|
5683
|
+
}
|
|
5670
5684
|
}
|
|
5671
5685
|
];
|
|
5672
5686
|
function installedVersion(packageName) {
|
|
@@ -5689,7 +5703,7 @@ function classifyDshRuntime(packageVersions) {
|
|
|
5689
5703
|
if (family) return { cliVersion: family.cli, packageVersions };
|
|
5690
5704
|
const found = RUNTIME_PACKAGES.map((name2) => `${name2}@${packageVersions[name2]}`).join(", ");
|
|
5691
5705
|
throw new Error(
|
|
5692
|
-
`StrataGate cannot start because this DSH profile resolves an unsupported or mixed core runtime. Resolved: ${found}. Supported tested 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). Reinstall or update stratagate-dsh through \`dsh plugin --profile <name> add <package>\` so the host supplies its peers.`
|
|
5706
|
+
`StrataGate cannot start because this DSH profile resolves an unsupported or mixed core runtime. Resolved: ${found}. Supported tested 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). Reinstall or update stratagate-dsh through \`dsh plugin --profile <name> add <package>\` so the host supplies its peers.`
|
|
5693
5707
|
);
|
|
5694
5708
|
}
|
|
5695
5709
|
function assertCompatibleDshRuntime() {
|
|
@@ -8597,15 +8611,32 @@ async function memories(runtime, url) {
|
|
|
8597
8611
|
const offset = numeric(url.searchParams.get("offset"), 0, 0, Number.MAX_SAFE_INTEGER);
|
|
8598
8612
|
const limit = numeric(url.searchParams.get("limit"), 100, 1, 200);
|
|
8599
8613
|
let values;
|
|
8600
|
-
if (kind === "events")
|
|
8601
|
-
const
|
|
8602
|
-
|
|
8603
|
-
|
|
8604
|
-
|
|
8605
|
-
|
|
8606
|
-
|
|
8607
|
-
|
|
8608
|
-
|
|
8614
|
+
if (kind === "events") {
|
|
8615
|
+
const timeline = url.searchParams.get("timeline") === "true";
|
|
8616
|
+
const timeFilter = url.searchParams.get("time")?.trim() ?? "";
|
|
8617
|
+
const participant = url.searchParams.get("participant")?.trim() ?? "";
|
|
8618
|
+
const eventType = url.searchParams.get("eventType")?.trim() ?? "";
|
|
8619
|
+
const eventStatus = url.searchParams.get("eventStatus")?.trim() ?? "";
|
|
8620
|
+
const now = /* @__PURE__ */ new Date();
|
|
8621
|
+
const weekAgo = now.getTime() - 7 * 864e5;
|
|
8622
|
+
const occurrence = (event) => {
|
|
8623
|
+
const happened = event.temporal.happenedStart ?? event.temporal.happenedEnd;
|
|
8624
|
+
return { value: happened ?? event.temporal.mentionedAt ?? event.createdAt, known: Boolean(happened) };
|
|
8625
|
+
};
|
|
8626
|
+
values = [...snapshot.events].sort((left, right) => occurrence(right).value.localeCompare(occurrence(left).value)).filter((event) => !timeline || event.status !== "forgotten" && event.status !== "archived").filter((event) => !eventType || event.temporal.eventType === eventType).filter((event) => !eventStatus || event.temporal.status === eventStatus).filter((event) => !participant || (event.temporal.participantNodeIds ?? []).includes(participant)).filter((event) => {
|
|
8627
|
+
if (!timeFilter) return true;
|
|
8628
|
+
const info = occurrence(event);
|
|
8629
|
+
if (timeFilter === "unknown") return !info.known;
|
|
8630
|
+
const time = Date.parse(info.value);
|
|
8631
|
+
if (timeFilter === "today") return Number.isFinite(time) && new Date(time).toDateString() === now.toDateString();
|
|
8632
|
+
if (timeFilter === "week") return Number.isFinite(time) && time >= weekAgo;
|
|
8633
|
+
return true;
|
|
8634
|
+
}).map((event) => ({
|
|
8635
|
+
...eventSummary(event, snapshot),
|
|
8636
|
+
relatedNodes: snapshot.graphNodes.filter(({ id }) => (event.temporal.participantNodeIds ?? []).includes(id)).map(({ id, name: name2, type, aliases }) => ({ id, name: name2, type, aliases })),
|
|
8637
|
+
relatedElements: snapshot.elements.filter(({ sourceEventIds }) => sourceEventIds.includes(event.id)).map(({ id, name: name2 }) => ({ id, name: name2 }))
|
|
8638
|
+
}));
|
|
8639
|
+
} else if (kind === "graph") {
|
|
8609
8640
|
const eventMap = new Map(snapshot.events.map((event) => [event.id, event]));
|
|
8610
8641
|
return {
|
|
8611
8642
|
namespace,
|
|
@@ -9355,7 +9386,7 @@ async function apply(ctx, config) {
|
|
|
9355
9386
|
throw new Error(`StrataGate could not safely migrate legacy citation events: ${detail}`);
|
|
9356
9387
|
}
|
|
9357
9388
|
if (legacyMigration.migrated > 0) {
|
|
9358
|
-
ctx.logger.info(`stratagate-memory prepared ${legacyMigration.migrated} legacy Session generation(s) for DSH
|
|
9389
|
+
ctx.logger.info(`stratagate-memory prepared ${legacyMigration.migrated} legacy Session generation(s) for DSH ${compatibility.cliVersion}`);
|
|
9359
9390
|
}
|
|
9360
9391
|
await mkdir2(dirname3(resolved.database), { recursive: true });
|
|
9361
9392
|
const models = new DshModelBridge(ctx, resolved);
|