@loreai/core 0.21.0 → 0.22.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ltm.d.ts","sourceRoot":"","sources":["../../src/ltm.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAWF,wBAAgB,MAAM,CAAC,KAAK,EAAE;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,+FAA+F;IAC/F,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,8FAA8F;IAC9F,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,MAAM,CAkGT;AAED,wBAAgB,MAAM,CACpB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,QA4BjD;AAED,wBAAgB,MAAM,CAAC,EAAE,EAAE,MAAM,QAEhC;AAuCD;;;;;;;;GA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memory reflector. You are giv
8
8
  export declare function recursiveUser(distillations: Array<{
9
9
  observations: string;
10
10
  }>, previousMeta?: string): string;
11
- export declare const CURATOR_SYSTEM = "You are a long-term memory curator. Your job is to extract durable knowledge from a conversation that should persist across sessions.\n\nFocus ONLY on knowledge that helps a coding agent work effectively on THIS codebase:\n- Architectural decisions and their rationale (why something was built a certain way)\n- Non-obvious implementation patterns and conventions specific to the project\n- Recurring gotchas, constraints, or traps in the codebase\n- Environment/tooling setup details that affect development\n- Important relationships between components that aren't obvious from reading the code\n- User preferences and working style specific to how they use this project\n- Repeated user instructions \u2014 when the user says things like \"always\", \"never\",\n \"make sure to\", \"don't forget to\", these are high-value preference candidates.\n If you see instruction-like language, prioritize extracting it as a \"preference\" entry.\n These instructions represent how the user wants to work and should persist across sessions.\n\nDo NOT extract:\n- Task-specific details (file currently being edited, current bug being fixed)\n- Temporary state (current branch, in-progress work)\n- Information that will change frequently\n- Ecosystem descriptions, product announcements, or marketing content\n- Business strategy, roadmap, or organizational information\n- Information that's readily available in public documentation or READMEs\n- Knowledge about unrelated projects or repositories unless explicitly cross-project\n- Restatements of what the code obviously does (e.g. \"the auth module handles authentication\")\n\nBREVITY IS CRITICAL \u2014 each entry must be concise:\n- content MUST be under 150 words (~600 characters). Capture ONE specific actionable\n insight in 2-3 sentences. Prefer terse technical language.\n- Each \"gotcha\": one specific trap + its fix in 1-2 sentences\n- Each \"architecture\": one design decision and its key constraint\n- Focus on the actionable insight, not the full story behind it\n- If a pattern requires more detail, split into multiple focused entries (each under 150 words)\n- Omit code examples unless a single short snippet is essential\n- Never include full file contents, large diffs, or complete command outputs\n\nPREFER UPDATES OVER CREATES:\n- Before creating a new entry, always check if an existing entry covers the same system\n or component. Update the existing entry rather than creating a new one.\n- When updating, REPLACE the full content with a concise rewrite \u2014 do not append to\n the existing content or repeat what was already there.\n- If multiple existing entries cover the same system from different angles (e.g. different\n bugs in the same module), consolidate them: update one with merged insights, delete the\n rest. Fewer, denser entries are better than many scattered ones.\n\nCROSS-REFERENCES between entries:\n- When an entry relates to another entry, reference it with [[entry-uuid]] using the entry's ID\n from the existing entries list. This creates navigable links between entries.\n- Only reference entries you can see in the existing entries list \u2014 don't guess IDs.\n- Example: \"Uses the gradient system [[019c904b-791e-772a-ab2b-93ac892a960c]] for context management.\"\n\ncrossProject flag:\n- Default is true \u2014 most useful knowledge is worth sharing across projects\n- Set crossProject to false for things that are meaningless outside this specific repo (e.g. a config path, a project-local naming convention that conflicts with your usual style)\n\nConfidence values (0.0\u20131.0) \u2014 determines injection priority when budget is tight:\n- 1.0: Unconditional directive \u2014 user used \"NEVER\", \"ALWAYS\", \"from now on\", or similarly\n absolute language. These must always be respected regardless of context.\n- 0.9: Strong preference \u2014 explicit user preference (\"I prefer\", \"I want\", \"make sure to\",\n \"don't forget to\"). Clear intent but not absolute.\n- 0.8: Moderate preference \u2014 inferred from repeated user behavior or gentle correction across\n sessions. Not explicitly stated as a rule.\n- 0.6: Mild/contextual preference \u2014 may not apply universally. Observed once or context-dependent.\n- For non-preference categories (gotcha, pattern, architecture, decision), confidence reflects\n how well-established the knowledge is: 1.0 = verified/confirmed, 0.8 = high confidence,\n 0.6 = probable but unverified.\n- Default to 1.0 for preferences with strong directive language, 0.8 for other preferences.\n- Always set confidence on create ops \u2014 it determines injection priority.\n\nProduce a JSON array of operations:\n[\n {\n \"op\": \"create\",\n \"category\": \"decision\" | \"pattern\" | \"preference\" | \"architecture\" | \"gotcha\",\n \"title\": \"Short descriptive title\",\n \"content\": \"Concise knowledge entry \u2014 under 150 words\",\n \"scope\": \"project\" | \"global\",\n \"crossProject\": true,\n \"confidence\": 1.0\n },\n {\n \"op\": \"update\",\n \"id\": \"existing-entry-id\",\n \"content\": \"Updated content \u2014 under 150 words\",\n \"confidence\": 0.0-1.0\n },\n {\n \"op\": \"delete\",\n \"id\": \"existing-entry-id\",\n \"reason\": \"Why this is no longer relevant\"\n }\n]\n\nIf nothing warrants extraction, return an empty array: []\n\nOutput ONLY valid JSON. No markdown fences, no explanation, no preamble.";
11
+ export declare const CURATOR_SYSTEM = "You are a long-term memory curator. Your job is to extract durable knowledge from a conversation that should persist across sessions.\n\nFocus ONLY on knowledge that helps a coding agent work effectively on THIS codebase:\n- Architectural decisions and their rationale (why something was built a certain way)\n- Non-obvious implementation patterns and conventions specific to the project\n- Recurring gotchas, constraints, or traps in the codebase \u2014 always include WHY the\n wrong approach seems right, not just the trap and fix. Without this, a future session\n will re-propose the broken approach because it looks like a reasonable improvement.\n- Environment/tooling setup details that affect development\n- Important relationships between components that aren't obvious from reading the code\n- User preferences and working style specific to how they use this project\n- Repeated user instructions \u2014 when the user says things like \"always\", \"never\",\n \"make sure to\", \"don't forget to\", these are high-value preference candidates.\n If you see instruction-like language, prioritize extracting it as a \"preference\" entry.\n These instructions represent how the user wants to work and should persist across sessions.\n\nDo NOT extract:\n- Task-specific details (file currently being edited, current bug being fixed)\n- Temporary state (current branch, in-progress work)\n- Information that will change frequently\n- Ecosystem descriptions, product announcements, or marketing content\n- Business strategy, roadmap, or organizational information\n- Information that's readily available in public documentation or READMEs\n- Knowledge about unrelated projects or repositories unless explicitly cross-project\n- Restatements of what the code obviously does (e.g. \"the auth module handles authentication\")\n\nINCLUDE THE \"WHY\" \u2014 decisions and gotchas without rationale get undone:\n- Every \"decision\" MUST include the rejected alternative and why it was rejected.\n Format: \"Chose X over Y because Z.\" Without the rejected option, a future session\n will re-propose Y because it looks like a reasonable improvement.\n- Every \"gotcha\" MUST explain why the wrong approach seems correct, not just the trap\n and its fix. Format: \"Trap: X looks right because [reason]. Fix: Y, because [reason].\"\n- Any standard or rule without its rationale is vulnerable to being optimized away by\n a session that doesn't know what problem it was solving.\n\nBREVITY IS CRITICAL \u2014 each entry must be concise:\n- content MUST be under 150 words (~600 characters). Capture ONE specific actionable\n insight in 2-3 sentences. Prefer terse technical language.\n- Each \"gotcha\": one specific trap + WHY it looks right + its fix in 2-3 sentences\n- Each \"architecture\": one design decision and its key constraint\n- Focus on the actionable insight, not the full story behind it\n- If a pattern requires more detail, split into multiple focused entries (each under 150 words)\n- Omit code examples unless a single short snippet is essential\n- Never include full file contents, large diffs, or complete command outputs\n\nPREFER UPDATES OVER CREATES:\n- Before creating a new entry, always check if an existing entry covers the same system\n or component. Update the existing entry rather than creating a new one.\n- When updating, REPLACE the full content with a concise rewrite \u2014 do not append to\n the existing content or repeat what was already there.\n- If multiple existing entries cover the same system from different angles (e.g. different\n bugs in the same module), consolidate them: update one with merged insights, delete the\n rest. Fewer, denser entries are better than many scattered ones.\n\nCROSS-REFERENCES between entries:\n- When an entry relates to another entry, reference it with [[entry-uuid]] using the entry's ID\n from the existing entries list. This creates navigable links between entries.\n- Only reference entries you can see in the existing entries list \u2014 don't guess IDs.\n- Example: \"Uses the gradient system [[019c904b-791e-772a-ab2b-93ac892a960c]] for context management.\"\n\ncrossProject flag:\n- Default is true \u2014 most useful knowledge is worth sharing across projects\n- Set crossProject to false for things that are meaningless outside this specific repo (e.g. a config path, a project-local naming convention that conflicts with your usual style)\n\nConfidence values (0.0\u20131.0) \u2014 determines injection priority when budget is tight:\n- 1.0: Unconditional directive \u2014 user used \"NEVER\", \"ALWAYS\", \"from now on\", or similarly\n absolute language. These must always be respected regardless of context.\n- 0.9: Strong preference \u2014 explicit user preference (\"I prefer\", \"I want\", \"make sure to\",\n \"don't forget to\"). Clear intent but not absolute.\n- 0.8: Moderate preference \u2014 inferred from repeated user behavior or gentle correction across\n sessions. Not explicitly stated as a rule.\n- 0.6: Mild/contextual preference \u2014 may not apply universally. Observed once or context-dependent.\n- For non-preference categories (gotcha, pattern, architecture, decision), confidence reflects\n how well-established the knowledge is: 1.0 = verified/confirmed, 0.8 = high confidence,\n 0.6 = probable but unverified.\n- Default to 1.0 for preferences with strong directive language, 0.8 for other preferences.\n- Always set confidence on create ops \u2014 it determines injection priority.\n\nProduce a JSON array of operations:\n[\n {\n \"op\": \"create\",\n \"category\": \"decision\" | \"pattern\" | \"preference\" | \"architecture\" | \"gotcha\",\n \"title\": \"Short descriptive title\",\n \"content\": \"Concise knowledge entry \u2014 under 150 words\",\n \"scope\": \"project\" | \"global\",\n \"crossProject\": true,\n \"confidence\": 1.0\n },\n {\n \"op\": \"update\",\n \"id\": \"existing-entry-id\",\n \"content\": \"Updated content \u2014 under 150 words\",\n \"confidence\": 0.0-1.0\n },\n {\n \"op\": \"delete\",\n \"id\": \"existing-entry-id\",\n \"reason\": \"Why this is no longer relevant\"\n }\n]\n\nIf nothing warrants extraction, return an empty array: []\n\nOutput ONLY valid JSON. No markdown fences, no explanation, no preamble.";
12
12
  export declare function curatorUser(input: {
13
13
  messages: string;
14
14
  existing: Array<{
@@ -1 +1 @@
1
- {"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/prompt.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,mBAAmB,s1OAmHhB,CAAC;AAEjB,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACtC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,MAAM,CAaT;AAUD,eAAO,MAAM,gBAAgB,mkGAsC2C,CAAC;AAEzE,wBAAgB,aAAa,CAC3B,aAAa,EAAE,KAAK,CAAC;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC,EAC9C,YAAY,CAAC,EAAE,MAAM,GACpB,MAAM,CAoBR;AAED,eAAO,MAAM,cAAc,60KA6F8C,CAAC;AAE1E,wBAAgB,WAAW,CAAC,KAAK,EAAE;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC;QACd,EAAE,EAAE,MAAM,CAAC;QACX,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;CACJ,GAAG,MAAM,CAuBT;AAED;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,uoDA0B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CAAA;CAAE,CAAC,EACpE,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAwCR;AAMD,eAAO,MAAM,sBAAsB,ggBASwE,CAAC"}
package/dist/node/db.d.ts CHANGED
@@ -74,8 +74,9 @@ export declare function setLastImportAt(projectPath: string, timestamp: number):
74
74
  */
75
75
  export declare function loadForceMinLayer(sessionID: string): number;
76
76
  /**
77
- * Persist forceMinLayer for a session. Deletes the row when layer is 0
78
- * (consumed) to avoid unbounded growth.
77
+ * Persist forceMinLayer for a session. Resets to 0 when consumed.
78
+ * Uses INSERT OR IGNORE + UPDATE to preserve sibling columns
79
+ * (cost, gradient, tracking) that other writers depend on.
79
80
  */
80
81
  export declare function saveForceMinLayer(sessionID: string, layer: number): void;
81
82
  /** Persisted cost snapshot for a session. */
@@ -1 +1 @@
1
- {"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../src/db.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAMtC;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAMvE;AA8iBD,4DAA4D;AAC5D,wBAAgB,MAAM,IAAI,MAAM,CAI/B;AAID,wBAAgB,EAAE,IAAI,QAAQ,CA8C7B;AAsHD;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,IAAI,CAoCN;AAED,wBAAgB,KAAK,SAKpB;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAgFpG;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAW1D;AAED;;;;GAIG;AACH,wBAAgB,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M,GAAG,MAAM,GAAG,IAAI,CAKhD;AAED,oCAAoC;AACpC,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAMtD;AAMD,8DAA8D;AAC9D,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKlD;AAED,qCAAqC;AACrC,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAMxD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAMtC"}
@@ -1050,13 +1050,11 @@ function loadForceMinLayer(sessionID) {
1050
1050
  return row?.force_min_layer ?? 0;
1051
1051
  }
1052
1052
  function saveForceMinLayer(sessionID, layer) {
1053
- if (layer === 0) {
1054
- db().query("DELETE FROM session_state WHERE session_id = ?").run(sessionID);
1055
- } else {
1056
- db().query(
1057
- "INSERT OR REPLACE INTO session_state (session_id, force_min_layer, updated_at) VALUES (?, ?, ?)"
1058
- ).run(sessionID, layer, Date.now());
1059
- }
1053
+ const now = Date.now();
1054
+ db().query(
1055
+ "INSERT OR IGNORE INTO session_state (session_id, force_min_layer, updated_at) VALUES (?, 0, ?)"
1056
+ ).run(sessionID, now);
1057
+ db().query("UPDATE session_state SET force_min_layer = ?, updated_at = ? WHERE session_id = ?").run(layer, now, sessionID);
1060
1058
  }
1061
1059
  function saveSessionCosts(sessionID, costs) {
1062
1060
  db().query(
@@ -12279,7 +12277,9 @@ var CURATOR_SYSTEM = `You are a long-term memory curator. Your job is to extract
12279
12277
  Focus ONLY on knowledge that helps a coding agent work effectively on THIS codebase:
12280
12278
  - Architectural decisions and their rationale (why something was built a certain way)
12281
12279
  - Non-obvious implementation patterns and conventions specific to the project
12282
- - Recurring gotchas, constraints, or traps in the codebase
12280
+ - Recurring gotchas, constraints, or traps in the codebase \u2014 always include WHY the
12281
+ wrong approach seems right, not just the trap and fix. Without this, a future session
12282
+ will re-propose the broken approach because it looks like a reasonable improvement.
12283
12283
  - Environment/tooling setup details that affect development
12284
12284
  - Important relationships between components that aren't obvious from reading the code
12285
12285
  - User preferences and working style specific to how they use this project
@@ -12298,10 +12298,19 @@ Do NOT extract:
12298
12298
  - Knowledge about unrelated projects or repositories unless explicitly cross-project
12299
12299
  - Restatements of what the code obviously does (e.g. "the auth module handles authentication")
12300
12300
 
12301
+ INCLUDE THE "WHY" \u2014 decisions and gotchas without rationale get undone:
12302
+ - Every "decision" MUST include the rejected alternative and why it was rejected.
12303
+ Format: "Chose X over Y because Z." Without the rejected option, a future session
12304
+ will re-propose Y because it looks like a reasonable improvement.
12305
+ - Every "gotcha" MUST explain why the wrong approach seems correct, not just the trap
12306
+ and its fix. Format: "Trap: X looks right because [reason]. Fix: Y, because [reason]."
12307
+ - Any standard or rule without its rationale is vulnerable to being optimized away by
12308
+ a session that doesn't know what problem it was solving.
12309
+
12301
12310
  BREVITY IS CRITICAL \u2014 each entry must be concise:
12302
12311
  - content MUST be under 150 words (~600 characters). Capture ONE specific actionable
12303
12312
  insight in 2-3 sentences. Prefer terse technical language.
12304
- - Each "gotcha": one specific trap + its fix in 1-2 sentences
12313
+ - Each "gotcha": one specific trap + WHY it looks right + its fix in 2-3 sentences
12305
12314
  - Each "architecture": one design decision and its key constraint
12306
12315
  - Focus on the actionable insight, not the full story behind it
12307
12316
  - If a pattern requires more detail, split into multiple focused entries (each under 150 words)
@@ -28692,10 +28701,24 @@ async function forSession(projectPath2, sessionID, maxTokens, options) {
28692
28701
  const allScored = [...scoredProject, ...scoredCross];
28693
28702
  allScored.sort((a, b) => b.score - a.score);
28694
28703
  const HEADER_OVERHEAD_TOKENS = 15;
28704
+ const ARCH_BUDGET_FRACTION = 0.2;
28695
28705
  let used = HEADER_OVERHEAD_TOKENS;
28696
28706
  const result = [];
28707
+ const packedIds = /* @__PURE__ */ new Set();
28708
+ const archBudget = Math.floor(maxTokens * ARCH_BUDGET_FRACTION);
28709
+ const archEntries = allScored.filter((s) => s.entry.category === "architecture");
28710
+ archEntries.sort((a, b) => b.score - a.score);
28711
+ for (const { entry } of archEntries) {
28712
+ if (used >= archBudget + HEADER_OVERHEAD_TOKENS) break;
28713
+ const cost = estimateTokens3(entry.title + entry.content) + 10;
28714
+ if (used + cost > maxTokens) continue;
28715
+ result.push(entry);
28716
+ packedIds.add(entry.id);
28717
+ used += cost;
28718
+ }
28697
28719
  for (const { entry } of allScored) {
28698
28720
  if (used >= maxTokens) break;
28721
+ if (packedIds.has(entry.id)) continue;
28699
28722
  const cost = estimateTokens3(entry.title + entry.content) + 10;
28700
28723
  if (used + cost > maxTokens) continue;
28701
28724
  result.push(entry);