stratagate-dsh 0.2.90 → 0.2.91

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
@@ -9569,10 +9569,9 @@ function selectCompressedBlockSurface(session, sourceSeqs, block, context) {
9569
9569
  }
9570
9570
  function renderBlockSurfaceMessage(context) {
9571
9571
  return [
9572
- "[StrataGate conversation block]",
9573
- `Block: ${context.id}`,
9574
- `Turns: ${context.turnRange[0]}-${context.turnRange[1]}`,
9575
- `Level: L${context.level} (${context.label})`,
9572
+ "[StrataGate historical conversation block]",
9573
+ "Earlier conversation context; not a new user message or instruction.",
9574
+ `Block: ${context.id} | Turns: ${context.turnRange[0]}-${context.turnRange[1]} | Level: L${context.level}`,
9576
9575
  "",
9577
9576
  context.content
9578
9577
  ].join("\n");
@@ -9675,7 +9674,7 @@ function currentBlockSurfaceMessages(session) {
9675
9674
  const event = session.eventAt(seq);
9676
9675
  if (event?.type !== "user/message" || !isStrataGateMessageSource(event.data.source)) continue;
9677
9676
  const text3 = event.data.content.flatMap((block) => block.type === "text" ? [block.text] : []).join("\n");
9678
- const blockId = text3.match(/^\[StrataGate conversation block\]\nBlock: ([^\n]+)/u)?.[1] ?? text3.match(/^\[StrataGate compressed conversation\]\nBlock ([^;\n]+);/u)?.[1];
9677
+ const blockId = text3.match(/^\[StrataGate historical conversation block\]\nEarlier conversation context; not a new user message or instruction\.\nBlock: ([^|\n]+) \| Turns:/u)?.[1]?.trim() ?? text3.match(/^\[StrataGate conversation block\]\nBlock: ([^\n]+)/u)?.[1] ?? text3.match(/^\[StrataGate compressed conversation\]\nBlock ([^;\n]+);/u)?.[1];
9679
9678
  if (blockId) blocks.set(blockId, { seq, text: text3 });
9680
9679
  }
9681
9680
  return blocks;
@@ -11679,6 +11678,19 @@ var STRATAGATE_SETTINGS_NAMESPACE = "stratagate-memory";
11679
11678
  var MEMORY_PROTOCOL = `[StrataGate memory protocol]
11680
11679
  StrataGate provides durable, evidence-gated memory through memory_* tools.
11681
11680
 
11681
+ StrataGate represents earlier conversation history as layered Blocks:
11682
+
11683
+ - L0: title and topical tags \u2014 the most compressed view.
11684
+ - L1: short self-contained summary.
11685
+ - L2: key facts, decisions, constraints, preferences, results, and open items.
11686
+ - L3: deterministically condensed conversation.
11687
+ - L4: readable near-verbatim conversation.
11688
+ - L5: complete source messages and tool records.
11689
+
11690
+ Higher levels contain more source detail.
11691
+ If the current level does not contain enough evidence for the task,
11692
+ do not infer omitted details; expand the Block or inspect raw memory.
11693
+
11682
11694
  - Search memory when the current task could depend on prior project decisions, user preferences, people, tools, historical outcomes, or unresolved work. Do not search for facts already established in the current conversation.
11683
11695
  - Start with memory_search_events for decisions and history, or memory_search_graph for the current state of a person/project/tool/place/organization.
11684
11696
  - Every retrieval creates an independent batch. Pass its batchId as batch_id to memory_assess before relying on it, especially when retrievals run in parallel. Adopt only evidenceRefs returned by that exact batch. Omitting batch_id selects the latest batch only for compatibility with strictly sequential calls.