stratagate-dsh 0.2.83 → 0.2.84

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
@@ -5755,12 +5755,26 @@ var STRUCTURED_FIELDS = {
5755
5755
  var STRING_ARRAY = { type: "array", items: { type: "string" } };
5756
5756
  var OPEN_OBJECT = { type: "object", additionalProperties: true };
5757
5757
  var SUMMARIZER_PARAMETERS = {
5758
- l0Title: { type: "string", required: true },
5759
- l0Tags: { ...STRING_ARRAY, required: true },
5760
- l1Summary: { type: "string", required: true },
5761
- l2Keypoints: { ...STRING_ARRAY, required: true },
5762
- shouldExtract: { type: "boolean", required: true }
5758
+ l0Title: { type: "string", description: "L0: a short phrase naming the Block's central subject for quick recognition; do not turn it into a sentence-length summary.", required: true },
5759
+ l0Tags: { ...STRING_ARRAY, description: "L0: a few distinctive topical labels (usually 2-5) for rapid recognition of the Block, such as named people, projects, organizations, tools, technical topics, or specific task concepts; omit generic labels such as discussion, conversation, problem, or task.", required: true },
5760
+ l1Summary: { type: "string", description: "L1: a compact, self-contained overview of what happened across the Block, its conclusions or results, significant state changes, and key unresolved work; richer than L0 but still quick to read.", required: true },
5761
+ l2Keypoints: { ...STRING_ARRAY, description: "L2: specific, self-contained points needed to recover context later. Make each point mostly atomic: one decision, constraint, preference, fact, result, failure reason, or open item. Add detail beyond L1 without splitting or repeating its sentences.", required: true },
5762
+ shouldExtract: { type: "boolean", description: "High-recall pre-screen for Event extraction, not the final Event decision. True when this Block clearly contains or may reasonably contain a long-term Event; when uncertain, use true so the Event Extractor can decide. False only when it clearly lacks lasting value, such as greetings, repeated confirmations, or disposable process noise. Mere presence of a fact is not sufficient.", required: true }
5763
5763
  };
5764
+ var SUMMARIZER_SYSTEM_PROMPT = `You are the Block Summarizer in StrataGate's memory pipeline. Compress one sealed conversation Block, typically about six turns, from the supplied provenance-preserving derivation messages into L0-L2 layered memory and decide whether it warrants later Event extraction. You are a background model, not the main Agent; you have no other conversation context. L5 retains the complete original source, while L3/L4 are produced separately. Your L0-L2 may later replace detailed chat in the Agent's context, so preserve what future work needs without inventing missing context.
5765
+
5766
+ L0 -> L1 -> L2 are progressively higher-resolution views of the same history, not three independent or repetitive summaries:
5767
+ - L0: l0Title is a short subject phrase for rapid recognition, ideally under about 60 characters; l0Tags are a few distinctive topical labels for rapid recognition, usually 2-5. Prefer named people, projects, organizations, tools, technical topics, and specific task concepts. Avoid generic tags such as discussion, conversation, problem, or task.
5768
+ - L1: l1Summary is a compact, self-contained overview of the whole Block: what happened, conclusions or results, meaningful state changes, and key unresolved work. Usually 1-3 sentences; do not retell the conversation turn by turn.
5769
+ - L2: l2Keypoints retain concrete details needed to resume work. Usually 3-8 concise points when there is enough substance, fewer for a thin Block. Each point should stand alone and express mainly one decision, constraint, preference, fact, result, significant failure reason, or open item. Be more specific than L1; do not merely split L1 into repeated sentences.
5770
+
5771
+ Prioritize important decisions, constraints, user preferences, final outcomes, significant failure causes, and unresolved work; then task-relevant process details. Omit repetition, greetings, and disposable execution noise. Do not discard a constraint or conclusion that would change how later work is understood just to shorten the output.
5772
+
5773
+ Keep provenance and uncertainty. Distinguish what the user stated or decided, what the assistant only proposed or suspected, and what a tool actually observed. Do not promote an assistant hypothesis or a recollection of older memory into a verified fact or new outcome. Preserve uncertainty about timing, causes, status, results, and relationships. Ordinary user/assistant text is retained, but large tool arguments or results may be compacted; use only retained tool names, evidence summaries, and excerpts, and never guess omitted payload details.
5774
+
5775
+ shouldExtract is a high-recall pre-screen, not the final Event decision. If it is false, Event extraction is skipped entirely; if true, the Event Extractor makes the final evidence-based decision. Set true when this Block clearly contains or may reasonably contain a long-term Event, such as a decision, stable preference, material project change, meaningful task result, important failure and possible cause, future-useful fact, or open item worth tracking. When uncertain whether a plausible candidate has lasting value, choose true and let the Event Extractor decide. Set false only when the Block clearly lacks such value, for example greetings, repeated confirmations, or disposable execution noise. Do not set true merely because some fact appears; an unsupported assistant suggestion or recap of older memory alone does not establish a new Event candidate.
5776
+
5777
+ Call stratagate_summarize_block exactly once with l0Title, l0Tags, l1Summary, l2Keypoints, and shouldExtract. Do not return the summary as ordinary text.`;
5764
5778
  var EVENT_ITEM = {
5765
5779
  type: "object",
5766
5780
  additionalProperties: false,
@@ -5890,7 +5904,7 @@ var PROFILE_MAINTENANCE_PARAMETERS = Object.fromEntries(
5890
5904
  var STRUCTURED_TOOLS = {
5891
5905
  summarizer: {
5892
5906
  name: "stratagate_summarize_block",
5893
- description: "Submit the completed durable summary for the supplied conversation block.",
5907
+ description: "Submit the L0-L2 layered compression of one sealed StrataGate conversation Block and decide whether it should proceed to Event extraction.",
5894
5908
  parameters: SUMMARIZER_PARAMETERS
5895
5909
  },
5896
5910
  extractor: {
@@ -6029,7 +6043,7 @@ var DshModelBridge = class {
6029
6043
  summarizer = async (messages) => {
6030
6044
  const raw = object(await this.callStructured(
6031
6045
  "summarizer",
6032
- `You compress agent conversations into durable memory blocks. Read the supplied provenance-preserving derivation messages and call ${STRUCTURED_TOOLS.summarizer.name} exactly once with l0Title, l0Tags, l1Summary, l2Keypoints, and shouldExtract. Preserve decisions, constraints, preferences, outcomes, and unresolved work. Tool code and oversized tool payloads may be marked compacted; use the retained tool names, evidence summaries, and excerpts without inventing omitted details. shouldExtract is true only when durable events or facts exist. Do not return the summary as text.`,
6046
+ SUMMARIZER_SYSTEM_PROMPT,
6033
6047
  { messages: buildMemoryDerivationMessages(messages) }
6034
6048
  ));
6035
6049
  return {