@sparkelf/dsh-knowledge-base 0.6.16 → 0.6.17

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.
Files changed (3) hide show
  1. package/lib/client.js +653 -653
  2. package/lib/index.js +3 -18
  3. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -16869,24 +16869,9 @@ async function resolveMemoryContext(input) {
16869
16869
  const personalMemoryRoot = input.personalMemoryRoot?.trim() ?? "";
16870
16870
  if (!paused && personalMemoryRoot !== "") entries.push(...await resolvePersonalMemoryEntries(personalMemoryRoot, bindingIds, bindingContent));
16871
16871
  entries.sort(compareEntries);
16872
- const selected = [];
16872
+ const selected = entries;
16873
16873
  const dropped = [];
16874
- let charCount = 0;
16875
- for (const entry of entries) {
16876
- if (!(entry.nonOverridable || entry.authority === "redline") && charCount + entry.chars > maxChars) {
16877
- dropped.push({
16878
- graphId: entry.graphId,
16879
- sourceType: entry.sourceType,
16880
- sourceId: entry.sourceId,
16881
- mode: entry.mode,
16882
- chars: entry.chars,
16883
- reason: "budget"
16884
- });
16885
- continue;
16886
- }
16887
- selected.push(entry);
16888
- charCount += entry.chars;
16889
- }
16874
+ const charCount = selected.reduce((total, entry) => total + entry.chars, 0);
16890
16875
  const redlineCount = selected.filter((entry) => entry.nonOverridable).length;
16891
16876
  const personalCount = selected.filter((entry) => entry.mode === "personal").length;
16892
16877
  const sharedCount = selected.filter((entry) => entry.mode === "shared").length;
@@ -16907,7 +16892,7 @@ function renderMemoryContextMarkdown(result) {
16907
16892
  const lines = [
16908
16893
  `# Memory context (${result.userId})`,
16909
16894
  "",
16910
- `- entries: ${result.entries.length}; chars: ${result.charCount}/${result.maxChars}; redlines: ${result.redlineCount}; personal: ${result.personalCount}; shared: ${result.sharedCount}`
16895
+ `- entries: ${result.entries.length}; chars: ${result.charCount}; redlines: ${result.redlineCount}; personal: ${result.personalCount}; shared: ${result.sharedCount}`
16911
16896
  ];
16912
16897
  if (result.systemPolicy !== "") lines.push(`- ${result.systemPolicy}`);
16913
16898
  for (const entry of result.entries) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sparkelf/dsh-knowledge-base",
3
- "version": "0.6.16",
3
+ "version": "0.6.17",
4
4
  "description": "DataOps-backed knowledge base for DeepSeek Harness: a left-sidebar destination, Settings configuration, and index tooling over a mounted NAS view.",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",