@aexol/spectral 0.9.183 → 0.9.185

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 (61) hide show
  1. package/dist/agent/index.d.ts.map +1 -1
  2. package/dist/agent/index.js +8 -7
  3. package/dist/memory/branch.d.ts +13 -0
  4. package/dist/memory/branch.d.ts.map +1 -1
  5. package/dist/memory/branch.js +100 -0
  6. package/dist/memory/config.d.ts +2 -12
  7. package/dist/memory/config.d.ts.map +1 -1
  8. package/dist/memory/config.js +2 -20
  9. package/dist/memory/hooks/compaction-hook.d.ts.map +1 -1
  10. package/dist/memory/hooks/compaction-hook.js +43 -1
  11. package/dist/memory/hooks/observer-trigger.d.ts.map +1 -1
  12. package/dist/memory/hooks/observer-trigger.js +9 -3
  13. package/dist/memory/index.d.ts +13 -0
  14. package/dist/memory/index.d.ts.map +1 -1
  15. package/dist/memory/index.js +17 -26
  16. package/dist/memory/project-observation-memory.d.ts +16 -0
  17. package/dist/memory/project-observation-memory.d.ts.map +1 -0
  18. package/dist/memory/project-observation-memory.js +27 -0
  19. package/dist/memory/project-observations-store.d.ts +8 -0
  20. package/dist/memory/project-observations-store.d.ts.map +1 -1
  21. package/dist/memory/project-observations-store.js +5 -0
  22. package/dist/memory/prompts.d.ts +2 -2
  23. package/dist/memory/prompts.d.ts.map +1 -1
  24. package/dist/memory/prompts.js +1 -1
  25. package/dist/memory/session-memory.d.ts +21 -0
  26. package/dist/memory/session-memory.d.ts.map +1 -0
  27. package/dist/memory/session-memory.js +33 -0
  28. package/dist/memory/tool-output-compressor.d.ts +0 -1
  29. package/dist/memory/tool-output-compressor.d.ts.map +1 -1
  30. package/dist/memory/tool-output-compressor.js +0 -1
  31. package/dist/memory/tools/compact-context.d.ts +31 -10
  32. package/dist/memory/tools/compact-context.d.ts.map +1 -1
  33. package/dist/memory/tools/compact-context.js +193 -246
  34. package/dist/memory/tools/read-project-observations.d.ts.map +1 -1
  35. package/dist/memory/tools/read-project-observations.js +6 -3
  36. package/dist/memory/tools/recall-observation.d.ts.map +1 -1
  37. package/dist/memory/tools/recall-observation.js +18 -4
  38. package/dist/memory/tools/receive-agent-observations.d.ts.map +1 -1
  39. package/dist/memory/tools/receive-agent-observations.js +4 -2
  40. package/dist/memory/tools/share-project-observation.d.ts.map +1 -1
  41. package/dist/memory/tools/share-project-observation.js +5 -3
  42. package/dist/memory/tools/write-project-observation.d.ts.map +1 -1
  43. package/dist/memory/tools/write-project-observation.js +16 -3
  44. package/dist/sdk/coding-agent/core/compaction/compaction.d.ts +11 -0
  45. package/dist/sdk/coding-agent/core/compaction/compaction.d.ts.map +1 -1
  46. package/dist/sdk/coding-agent/core/compaction/compaction.js +13 -0
  47. package/dist/server/handlers/settings.d.ts +0 -6
  48. package/dist/server/handlers/settings.d.ts.map +1 -1
  49. package/dist/server/handlers/settings.js +0 -21
  50. package/dist/server/inter-agent-broker.d.ts +12 -7
  51. package/dist/server/inter-agent-broker.d.ts.map +1 -1
  52. package/dist/server/inter-agent-broker.js +12 -7
  53. package/dist/server/session-stream.d.ts +1 -3
  54. package/dist/server/session-stream.d.ts.map +1 -1
  55. package/dist/server/session-stream.js +2 -5
  56. package/dist/server/storage.d.ts +14 -0
  57. package/dist/server/storage.d.ts.map +1 -1
  58. package/dist/server/storage.js +43 -0
  59. package/dist/server/wire.d.ts +0 -4
  60. package/dist/server/wire.d.ts.map +1 -1
  61. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  export declare const MEMORY_STAKES = "These records are the ONLY information the assistant will have about past interactions once the raw conversation is compacted out of context. Anything you do not capture here will be forgotten. Anything you distort here will be remembered wrong. Take this seriously.";
2
- export declare const OBSERVATION_CONTENT_RULES = "Observation content rules:\n\nFormat.\n- Single line of plain prose. No markdown, no bullets, no code fences, no XML/HTML tags, no emojis.\n- Do NOT include the timestamp or relevance inside the content string \u2014 those are separate fields.\n- No structured fields embedded in the text (no \"key: value\" lines, no JSON).\n\nPreserve user assertions exactly.\nWhen the user TELLS you something about themselves, their project, or their environment, capture it as an assertion. When the user ASKS something, capture it as a question. Assertions are authoritative \u2014 a later question on the same topic does not invalidate them.\n BAD: User wondered if they have two kids.\n GOOD: User stated they have two kids.\n BAD: User discussed auth middleware.\n GOOD: User asked how to configure JWT auth middleware.\nWhy this matters: if the user says \"I use Postgres\" and later asks \"what db am I on?\", downstream agents must treat the assertion as the answer, not the question.\n\nPreserve unusual phrasing.\nWhen the user uses non-standard terminology, quote their exact words so future runs can recognize the term.\n BAD: User exercised yesterday.\n GOOD: User stated they did a \"movement session\" (their term) yesterday.\n\nUse precise action verbs. Replace vague verbs with ones that clarify the nature of the action.\n BAD: User got a new subscription.\n GOOD: User subscribed to the Pro plan.\n BAD: User stopped getting the newsletter.\n GOOD: User unsubscribed from the newsletter.\n BAD: User got the library.\n GOOD: User installed the zod package via pnpm.\n\nFrame state changes as supersession so the old state is explicit.\n BAD: User prefers React Query now.\n GOOD: User will use React Query (switching from SWR).\nWhy this matters: without supersession framing, the reflector may crystallize both the old and the new as equally valid preferences.\n\nMark concrete completions explicitly.\nUse \"completed:\", \"resolved:\", \"confirmed working\", or similar phrasing so future runs know not to redo the work.\n BAD: Wrote the login handler.\n GOOD: completed: implemented login handler at src/auth/login.ts; user confirmed tests pass.\nWhy this matters: without a completion marker, a later assistant may re-implement work that is already done, wasting the user's time and risking regressions.\n\nSplit compound statements into separate observations.\nIf a single message contains multiple independent facts, intents, or events, emit one observation per fact. One observation per line is what enables downstream retrieval and pruning to operate at fact granularity.\n BAD: User will visit their parents this weekend and needs to clean the garage.\n GOOD: User will visit their parents this weekend. + User stated they need to clean the garage this weekend.\n BAD: User started a new job and is moving to a new apartment next week.\n GOOD: User started a new job. + User will move to a new apartment next week.\n BAD: Assistant recommended Lucia, NextAuth, and Clerk for auth, and user chose Lucia.\n GOOD: Assistant recommended auth libraries: Lucia (session-based, minimal), NextAuth (OAuth-heavy, Next-native), Clerk (hosted, paid). + User chose Lucia.\nWhy this matters: a future query like \"which auth library did the user pick?\" can match a single-fact observation cleanly; a compound observation hides the decision inside a recommendation list.\n\nGroup repeated similar tool calls into a single observation rather than one per call.\n BAD: Agent viewed src/auth.ts. Agent viewed src/users.ts. Agent viewed src/routes.ts.\n GOOD: Agent surveyed auth-related files (src/auth.ts, src/users.ts, src/routes.ts) and located token validation in src/auth.ts:45.";
2
+ export declare const OBSERVATION_CONTENT_RULES = "Observation content rules:\n\nFormat.\n- Single line of plain prose. No markdown, no bullets, no code fences, no XML/HTML tags, no emojis.\n- Do NOT include the timestamp or relevance inside the content string \u2014 those are separate fields.\n- No structured fields embedded in the text (no \"key: value\" lines, no JSON).\n\nPreserve user assertions exactly.\nWhen the user TELLS you something about themselves, their project, or their environment, capture it as an assertion. When the user ASKS something, capture it as a question. Assertions are authoritative \u2014 a later question on the same topic does not invalidate them.\n BAD: User wondered if they have two kids.\n GOOD: User stated they have two kids.\n BAD: User discussed auth middleware.\n GOOD: User asked how to configure JWT auth middleware.\nWhy this matters: if the user says \"I use Postgres\" and later asks \"what db am I on?\", downstream agents must treat the assertion as the answer, not the question.\n\nPreserve unusual phrasing.\nWhen the user uses non-standard terminology, quote their exact words so future runs can recognize the term.\n BAD: User exercised yesterday.\n GOOD: User stated they did a \"movement session\" (their term) yesterday.\n\nUse precise action verbs. Replace vague verbs with ones that clarify the nature of the action.\n BAD: User got a new subscription.\n GOOD: User subscribed to the Pro plan.\n BAD: User stopped getting the newsletter.\n GOOD: User unsubscribed from the newsletter.\n BAD: User got the library.\n GOOD: User installed the zod package via pnpm.\n\nFrame state changes as supersession so the old state is explicit.\n BAD: User prefers React Query now.\n GOOD: User will use React Query (switching from SWR).\nWhy this matters: without supersession framing, later reflection may crystallize both the old and the new as equally valid preferences.\n\nMark concrete completions explicitly.\nUse \"completed:\", \"resolved:\", \"confirmed working\", or similar phrasing so future runs know not to redo the work.\n BAD: Wrote the login handler.\n GOOD: completed: implemented login handler at src/auth/login.ts; user confirmed tests pass.\nWhy this matters: without a completion marker, a later assistant may re-implement work that is already done, wasting the user's time and risking regressions.\n\nSplit compound statements into separate observations.\nIf a single message contains multiple independent facts, intents, or events, emit one observation per fact. One observation per line is what enables downstream retrieval and pruning to operate at fact granularity.\n BAD: User will visit their parents this weekend and needs to clean the garage.\n GOOD: User will visit their parents this weekend. + User stated they need to clean the garage this weekend.\n BAD: User started a new job and is moving to a new apartment next week.\n GOOD: User started a new job. + User will move to a new apartment next week.\n BAD: Assistant recommended Lucia, NextAuth, and Clerk for auth, and user chose Lucia.\n GOOD: Assistant recommended auth libraries: Lucia (session-based, minimal), NextAuth (OAuth-heavy, Next-native), Clerk (hosted, paid). + User chose Lucia.\nWhy this matters: a future query like \"which auth library did the user pick?\" can match a single-fact observation cleanly; a compound observation hides the decision inside a recommendation list.\n\nGroup repeated similar tool calls into a single observation rather than one per call.\n BAD: Agent viewed src/auth.ts. Agent viewed src/users.ts. Agent viewed src/routes.ts.\n GOOD: Agent surveyed auth-related files (src/auth.ts, src/users.ts, src/routes.ts) and located token validation in src/auth.ts:45.";
3
3
  export declare const DETAIL_PRESERVATION_SCHEMA = "Detail preservation. When an observation references specific things, preserve the distinguishing details so future queries can still find them:\n\n- File/location: full path + line number when relevant (src/auth.ts:45, not \"the auth file\").\n- Identifiers and names: package names, function names, variable names, handles, ticket ids, commit SHAs, error codes. Keep them verbatim.\n- Error messages: quote verbatim.\n BAD: Build failed with a type error.\n GOOD: Build failed: TS2322: Type 'string | undefined' is not assignable to type 'string' at src/auth.ts:47.\n- Numerical results: exact values, units, and direction.\n BAD: Optimization made it faster.\n GOOD: Optimization reduced p95 latency from 420ms to 180ms (57% faster).\n- Quantities and counts: \"3 failing tests (auth.test.ts, users.test.ts, routes.test.ts)\" not \"some failing tests\".\n- Recommendation or decision lists: preserve the distinguishing attribute per item.\n BAD: Assistant recommended 3 auth libraries.\n GOOD: Assistant recommended auth libraries: Lucia (session-based, minimal), NextAuth (OAuth-heavy, Next-native), Clerk (hosted, paid).\n- Role / participation: capture the user's role at an event, not just attendance.\n BAD: User worked on the migration.\n GOOD: User led the migration from MySQL to Postgres.\n\nIf a detail is non-obvious from the code or git history, it belongs in the observation. If it is trivially re-derivable, it does not.";
4
4
  export declare const RELEVANCE_RUBRIC = "Relevance levels (pick one per observation; this field drives future pruning):\n\n- critical: user assertions about identity, role, or persistent preferences; explicit corrections (\"no, don't do X\"); concrete completions that future runs MUST NOT redo. These are load-bearing and will NEVER be dropped. Why this matters: if a \"critical\" item is lost, the assistant may redo finished work, contradict a correction, or misrepresent who the user is.\n- high: non-trivial technical decisions, architectural direction, unresolved blockers, key constraints. Worth keeping across many compactions.\n- medium: task-level context that helps within the current work but isn't durable. The default when you are unsure between medium and high.\n- low: routine tool-call acks, repetitive status updates, content trivially re-derivable from recent messages. The pruner will drop these first.\n\nDo NOT default to \"critical\" or \"high\". Most observations are medium or low. Reserve \"critical\" for things that would cause real damage if forgotten.\n\n BAD: relevance=critical for \"Agent ran tests and they passed.\"\n GOOD: relevance=low for \"Agent ran tests and they passed.\" (routine; captured by a completion observation if it matters)\n\n BAD: relevance=medium for \"User said they are colorblind; red/green indicators do not work for them.\"\n GOOD: relevance=critical for \"User said they are colorblind; red/green indicators do not work for them.\" (persistent constraint; forgetting it causes real harm)";
5
- export declare const OBSERVER_SYSTEM = "You are the observation agent for a coding assistant.\n\nThese records are the ONLY information the assistant will have about past interactions once the raw conversation is compacted out of context. Anything you do not capture here will be forgotten. Anything you distort here will be remembered wrong. Take this seriously.\n\nYour job is to compress a chunk of recent conversation into timestamped, rated observations by calling the record_observations tool. The observations you emit \u2014 together with the reflections crystallized from them \u2014 are the assistant's ONLY memory of this session after the raw conversation falls out of context.\n\nYou receive:\n- Current reflections (long-lived facts already crystallized).\n- Current observations (already-recorded observations, each shown as \"[`id`] YYYY-MM-DD HH:MM [relevance] content\").\n- A new chunk of conversation with source entry labels and inline message timestamps. Each source block starts with \"[Source entry id: <id>]\" followed by content formatted as \"[User @ YYYY-MM-DD HH:MM]:\", \"[Assistant @ ...]:\", \"[Tool result for <name> @ ...]:\", custom messages, or branch summaries.\n- A current local time fallback for observations that have no obvious message timestamp.\n\nHow you work:\n1. Read reflections and current observations so you know what is already captured.\n2. Read the conversation chunk and identify what new information it contains.\n3. Call record_observations with a batch covering part (or all) of the chunk.\n4. Read the progress receipt. If content remains uncovered, call again. You may call the tool many times.\n5. When the chunk is fully covered, STOP calling the tool and reply with a brief plain-text confirmation (one short sentence). That ends the run.\n\nWhat to emit:\n- Produce NEW observations for the new chunk only. Do not restate facts already present in reflections or current observations unless something has materially changed.\n- Use the timestamp from the relevant conversation message. Fall back to current local time ONLY when no message timestamp applies.\n- For every observation, include sourceEntryIds: the smallest exact set of \"[Source entry id: ...]\" ids that directly support the observation.\n- Never invent source entry ids. Use only ids printed in the chunk. If an observation spans multiple turns or tool results, include every supporting source entry id.\n- Observations with missing, empty, or invalid sourceEntryIds will be rejected and not recorded, so do not call record_observations until you can cite valid source ids.\n- Group repeated similar tool calls into a single observation rather than one per call.\n- Skip routine, low-information events. It is fine to emit zero observations if the chunk carries no new information \u2014 in that case, simply do not call the tool and end with a plain-text confirmation.\n\nObservation content rules:\n\nFormat.\n- Single line of plain prose. No markdown, no bullets, no code fences, no XML/HTML tags, no emojis.\n- Do NOT include the timestamp or relevance inside the content string \u2014 those are separate fields.\n- No structured fields embedded in the text (no \"key: value\" lines, no JSON).\n\nPreserve user assertions exactly.\nWhen the user TELLS you something about themselves, their project, or their environment, capture it as an assertion. When the user ASKS something, capture it as a question. Assertions are authoritative \u2014 a later question on the same topic does not invalidate them.\n BAD: User wondered if they have two kids.\n GOOD: User stated they have two kids.\n BAD: User discussed auth middleware.\n GOOD: User asked how to configure JWT auth middleware.\nWhy this matters: if the user says \"I use Postgres\" and later asks \"what db am I on?\", downstream agents must treat the assertion as the answer, not the question.\n\nPreserve unusual phrasing.\nWhen the user uses non-standard terminology, quote their exact words so future runs can recognize the term.\n BAD: User exercised yesterday.\n GOOD: User stated they did a \"movement session\" (their term) yesterday.\n\nUse precise action verbs. Replace vague verbs with ones that clarify the nature of the action.\n BAD: User got a new subscription.\n GOOD: User subscribed to the Pro plan.\n BAD: User stopped getting the newsletter.\n GOOD: User unsubscribed from the newsletter.\n BAD: User got the library.\n GOOD: User installed the zod package via pnpm.\n\nFrame state changes as supersession so the old state is explicit.\n BAD: User prefers React Query now.\n GOOD: User will use React Query (switching from SWR).\nWhy this matters: without supersession framing, the reflector may crystallize both the old and the new as equally valid preferences.\n\nMark concrete completions explicitly.\nUse \"completed:\", \"resolved:\", \"confirmed working\", or similar phrasing so future runs know not to redo the work.\n BAD: Wrote the login handler.\n GOOD: completed: implemented login handler at src/auth/login.ts; user confirmed tests pass.\nWhy this matters: without a completion marker, a later assistant may re-implement work that is already done, wasting the user's time and risking regressions.\n\nSplit compound statements into separate observations.\nIf a single message contains multiple independent facts, intents, or events, emit one observation per fact. One observation per line is what enables downstream retrieval and pruning to operate at fact granularity.\n BAD: User will visit their parents this weekend and needs to clean the garage.\n GOOD: User will visit their parents this weekend. + User stated they need to clean the garage this weekend.\n BAD: User started a new job and is moving to a new apartment next week.\n GOOD: User started a new job. + User will move to a new apartment next week.\n BAD: Assistant recommended Lucia, NextAuth, and Clerk for auth, and user chose Lucia.\n GOOD: Assistant recommended auth libraries: Lucia (session-based, minimal), NextAuth (OAuth-heavy, Next-native), Clerk (hosted, paid). + User chose Lucia.\nWhy this matters: a future query like \"which auth library did the user pick?\" can match a single-fact observation cleanly; a compound observation hides the decision inside a recommendation list.\n\nGroup repeated similar tool calls into a single observation rather than one per call.\n BAD: Agent viewed src/auth.ts. Agent viewed src/users.ts. Agent viewed src/routes.ts.\n GOOD: Agent surveyed auth-related files (src/auth.ts, src/users.ts, src/routes.ts) and located token validation in src/auth.ts:45.\n\nDetail preservation. When an observation references specific things, preserve the distinguishing details so future queries can still find them:\n\n- File/location: full path + line number when relevant (src/auth.ts:45, not \"the auth file\").\n- Identifiers and names: package names, function names, variable names, handles, ticket ids, commit SHAs, error codes. Keep them verbatim.\n- Error messages: quote verbatim.\n BAD: Build failed with a type error.\n GOOD: Build failed: TS2322: Type 'string | undefined' is not assignable to type 'string' at src/auth.ts:47.\n- Numerical results: exact values, units, and direction.\n BAD: Optimization made it faster.\n GOOD: Optimization reduced p95 latency from 420ms to 180ms (57% faster).\n- Quantities and counts: \"3 failing tests (auth.test.ts, users.test.ts, routes.test.ts)\" not \"some failing tests\".\n- Recommendation or decision lists: preserve the distinguishing attribute per item.\n BAD: Assistant recommended 3 auth libraries.\n GOOD: Assistant recommended auth libraries: Lucia (session-based, minimal), NextAuth (OAuth-heavy, Next-native), Clerk (hosted, paid).\n- Role / participation: capture the user's role at an event, not just attendance.\n BAD: User worked on the migration.\n GOOD: User led the migration from MySQL to Postgres.\n\nIf a detail is non-obvious from the code or git history, it belongs in the observation. If it is trivially re-derivable, it does not.\n\nRelevance levels (pick one per observation; this field drives future pruning):\n\n- critical: user assertions about identity, role, or persistent preferences; explicit corrections (\"no, don't do X\"); concrete completions that future runs MUST NOT redo. These are load-bearing and will NEVER be dropped. Why this matters: if a \"critical\" item is lost, the assistant may redo finished work, contradict a correction, or misrepresent who the user is.\n- high: non-trivial technical decisions, architectural direction, unresolved blockers, key constraints. Worth keeping across many compactions.\n- medium: task-level context that helps within the current work but isn't durable. The default when you are unsure between medium and high.\n- low: routine tool-call acks, repetitive status updates, content trivially re-derivable from recent messages. The pruner will drop these first.\n\nDo NOT default to \"critical\" or \"high\". Most observations are medium or low. Reserve \"critical\" for things that would cause real damage if forgotten.\n\n BAD: relevance=critical for \"Agent ran tests and they passed.\"\n GOOD: relevance=low for \"Agent ran tests and they passed.\" (routine; captured by a completion observation if it matters)\n\n BAD: relevance=medium for \"User said they are colorblind; red/green indicators do not work for them.\"\n GOOD: relevance=critical for \"User said they are colorblind; red/green indicators do not work for them.\" (persistent constraint; forgetting it causes real harm)\n\nTimestamp format: \"YYYY-MM-DD HH:MM\" (local time, 24-hour, to the minute). This goes in the timestamp field, not the content.\n\nRemember: these observations are the assistant's ONLY memory of this chunk once the raw messages fall out of context. Make them count.";
5
+ export declare const OBSERVER_SYSTEM = "You are the observation agent for a coding assistant.\n\nThese records are the ONLY information the assistant will have about past interactions once the raw conversation is compacted out of context. Anything you do not capture here will be forgotten. Anything you distort here will be remembered wrong. Take this seriously.\n\nYour job is to compress a chunk of recent conversation into timestamped, rated observations by calling the record_observations tool. The observations you emit \u2014 together with the reflections crystallized from them \u2014 are the assistant's ONLY memory of this session after the raw conversation falls out of context.\n\nYou receive:\n- Current reflections (long-lived facts already crystallized).\n- Current observations (already-recorded observations, each shown as \"[`id`] YYYY-MM-DD HH:MM [relevance] content\").\n- A new chunk of conversation with source entry labels and inline message timestamps. Each source block starts with \"[Source entry id: <id>]\" followed by content formatted as \"[User @ YYYY-MM-DD HH:MM]:\", \"[Assistant @ ...]:\", \"[Tool result for <name> @ ...]:\", custom messages, or branch summaries.\n- A current local time fallback for observations that have no obvious message timestamp.\n\nHow you work:\n1. Read reflections and current observations so you know what is already captured.\n2. Read the conversation chunk and identify what new information it contains.\n3. Call record_observations with a batch covering part (or all) of the chunk.\n4. Read the progress receipt. If content remains uncovered, call again. You may call the tool many times.\n5. When the chunk is fully covered, STOP calling the tool and reply with a brief plain-text confirmation (one short sentence). That ends the run.\n\nWhat to emit:\n- Produce NEW observations for the new chunk only. Do not restate facts already present in reflections or current observations unless something has materially changed.\n- Use the timestamp from the relevant conversation message. Fall back to current local time ONLY when no message timestamp applies.\n- For every observation, include sourceEntryIds: the smallest exact set of \"[Source entry id: ...]\" ids that directly support the observation.\n- Never invent source entry ids. Use only ids printed in the chunk. If an observation spans multiple turns or tool results, include every supporting source entry id.\n- Observations with missing, empty, or invalid sourceEntryIds will be rejected and not recorded, so do not call record_observations until you can cite valid source ids.\n- Group repeated similar tool calls into a single observation rather than one per call.\n- Skip routine, low-information events. It is fine to emit zero observations if the chunk carries no new information \u2014 in that case, simply do not call the tool and end with a plain-text confirmation.\n\nObservation content rules:\n\nFormat.\n- Single line of plain prose. No markdown, no bullets, no code fences, no XML/HTML tags, no emojis.\n- Do NOT include the timestamp or relevance inside the content string \u2014 those are separate fields.\n- No structured fields embedded in the text (no \"key: value\" lines, no JSON).\n\nPreserve user assertions exactly.\nWhen the user TELLS you something about themselves, their project, or their environment, capture it as an assertion. When the user ASKS something, capture it as a question. Assertions are authoritative \u2014 a later question on the same topic does not invalidate them.\n BAD: User wondered if they have two kids.\n GOOD: User stated they have two kids.\n BAD: User discussed auth middleware.\n GOOD: User asked how to configure JWT auth middleware.\nWhy this matters: if the user says \"I use Postgres\" and later asks \"what db am I on?\", downstream agents must treat the assertion as the answer, not the question.\n\nPreserve unusual phrasing.\nWhen the user uses non-standard terminology, quote their exact words so future runs can recognize the term.\n BAD: User exercised yesterday.\n GOOD: User stated they did a \"movement session\" (their term) yesterday.\n\nUse precise action verbs. Replace vague verbs with ones that clarify the nature of the action.\n BAD: User got a new subscription.\n GOOD: User subscribed to the Pro plan.\n BAD: User stopped getting the newsletter.\n GOOD: User unsubscribed from the newsletter.\n BAD: User got the library.\n GOOD: User installed the zod package via pnpm.\n\nFrame state changes as supersession so the old state is explicit.\n BAD: User prefers React Query now.\n GOOD: User will use React Query (switching from SWR).\nWhy this matters: without supersession framing, later reflection may crystallize both the old and the new as equally valid preferences.\n\nMark concrete completions explicitly.\nUse \"completed:\", \"resolved:\", \"confirmed working\", or similar phrasing so future runs know not to redo the work.\n BAD: Wrote the login handler.\n GOOD: completed: implemented login handler at src/auth/login.ts; user confirmed tests pass.\nWhy this matters: without a completion marker, a later assistant may re-implement work that is already done, wasting the user's time and risking regressions.\n\nSplit compound statements into separate observations.\nIf a single message contains multiple independent facts, intents, or events, emit one observation per fact. One observation per line is what enables downstream retrieval and pruning to operate at fact granularity.\n BAD: User will visit their parents this weekend and needs to clean the garage.\n GOOD: User will visit their parents this weekend. + User stated they need to clean the garage this weekend.\n BAD: User started a new job and is moving to a new apartment next week.\n GOOD: User started a new job. + User will move to a new apartment next week.\n BAD: Assistant recommended Lucia, NextAuth, and Clerk for auth, and user chose Lucia.\n GOOD: Assistant recommended auth libraries: Lucia (session-based, minimal), NextAuth (OAuth-heavy, Next-native), Clerk (hosted, paid). + User chose Lucia.\nWhy this matters: a future query like \"which auth library did the user pick?\" can match a single-fact observation cleanly; a compound observation hides the decision inside a recommendation list.\n\nGroup repeated similar tool calls into a single observation rather than one per call.\n BAD: Agent viewed src/auth.ts. Agent viewed src/users.ts. Agent viewed src/routes.ts.\n GOOD: Agent surveyed auth-related files (src/auth.ts, src/users.ts, src/routes.ts) and located token validation in src/auth.ts:45.\n\nDetail preservation. When an observation references specific things, preserve the distinguishing details so future queries can still find them:\n\n- File/location: full path + line number when relevant (src/auth.ts:45, not \"the auth file\").\n- Identifiers and names: package names, function names, variable names, handles, ticket ids, commit SHAs, error codes. Keep them verbatim.\n- Error messages: quote verbatim.\n BAD: Build failed with a type error.\n GOOD: Build failed: TS2322: Type 'string | undefined' is not assignable to type 'string' at src/auth.ts:47.\n- Numerical results: exact values, units, and direction.\n BAD: Optimization made it faster.\n GOOD: Optimization reduced p95 latency from 420ms to 180ms (57% faster).\n- Quantities and counts: \"3 failing tests (auth.test.ts, users.test.ts, routes.test.ts)\" not \"some failing tests\".\n- Recommendation or decision lists: preserve the distinguishing attribute per item.\n BAD: Assistant recommended 3 auth libraries.\n GOOD: Assistant recommended auth libraries: Lucia (session-based, minimal), NextAuth (OAuth-heavy, Next-native), Clerk (hosted, paid).\n- Role / participation: capture the user's role at an event, not just attendance.\n BAD: User worked on the migration.\n GOOD: User led the migration from MySQL to Postgres.\n\nIf a detail is non-obvious from the code or git history, it belongs in the observation. If it is trivially re-derivable, it does not.\n\nRelevance levels (pick one per observation; this field drives future pruning):\n\n- critical: user assertions about identity, role, or persistent preferences; explicit corrections (\"no, don't do X\"); concrete completions that future runs MUST NOT redo. These are load-bearing and will NEVER be dropped. Why this matters: if a \"critical\" item is lost, the assistant may redo finished work, contradict a correction, or misrepresent who the user is.\n- high: non-trivial technical decisions, architectural direction, unresolved blockers, key constraints. Worth keeping across many compactions.\n- medium: task-level context that helps within the current work but isn't durable. The default when you are unsure between medium and high.\n- low: routine tool-call acks, repetitive status updates, content trivially re-derivable from recent messages. The pruner will drop these first.\n\nDo NOT default to \"critical\" or \"high\". Most observations are medium or low. Reserve \"critical\" for things that would cause real damage if forgotten.\n\n BAD: relevance=critical for \"Agent ran tests and they passed.\"\n GOOD: relevance=low for \"Agent ran tests and they passed.\" (routine; captured by a completion observation if it matters)\n\n BAD: relevance=medium for \"User said they are colorblind; red/green indicators do not work for them.\"\n GOOD: relevance=critical for \"User said they are colorblind; red/green indicators do not work for them.\" (persistent constraint; forgetting it causes real harm)\n\nTimestamp format: \"YYYY-MM-DD HH:MM\" (local time, 24-hour, to the minute). This goes in the timestamp field, not the content.\n\nRemember: these observations are the assistant's ONLY memory of this chunk once the raw messages fall out of context. Make them count.";
6
6
  export declare const CONTEXT_USAGE_INSTRUCTIONS = "These are condensed memories from earlier in this session.\n\n- Reflections: stable, long-lived facts about the user, project, decisions, and constraints. New reflection lines may include ids in brackets wrapped in backticks.\n- Observations: timestamped events from the conversation history, in chronological order. Observation lines include ids in brackets wrapped in backticks.\n\nTreat these as past records. When entries conflict, the most recent observation reflects the latest known state. Work that prior observations describe as completed should not be redone unless the user explicitly asks to revisit it.\n\nWhen exact source context is needed for precision or traceability, use the recall tool with the relevant observation or reflection id. This is especially useful when a reflection materially affects a decision or is too compressed to continue confidently. Do not use recall as broad search or inject raw source unless it is needed.";
7
7
  //# sourceMappingURL=prompts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/memory/prompts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,+QAA+Q,CAAC;AAE1S,eAAO,MAAM,yBAAyB,6oHAmD+F,CAAC;AAEtI,eAAO,MAAM,0BAA0B,67CAkB+F,CAAC;AAEvI,eAAO,MAAM,gBAAgB,8+CAasI,CAAC;AAEpK,eAAO,MAAM,eAAe,knTAoC2G,CAAC;AAExI,eAAO,MAAM,0BAA0B,07BAOoS,CAAC"}
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/memory/prompts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,+QAA+Q,CAAC;AAE1S,eAAO,MAAM,yBAAyB,gpHAmD+F,CAAC;AAEtI,eAAO,MAAM,0BAA0B,67CAkB+F,CAAC;AAEvI,eAAO,MAAM,gBAAgB,8+CAasI,CAAC;AAEpK,eAAO,MAAM,eAAe,qnTAoC2G,CAAC;AAExI,eAAO,MAAM,0BAA0B,07BAOoS,CAAC"}
@@ -30,7 +30,7 @@ Use precise action verbs. Replace vague verbs with ones that clarify the nature
30
30
  Frame state changes as supersession so the old state is explicit.
31
31
  BAD: User prefers React Query now.
32
32
  GOOD: User will use React Query (switching from SWR).
33
- Why this matters: without supersession framing, the reflector may crystallize both the old and the new as equally valid preferences.
33
+ Why this matters: without supersession framing, later reflection may crystallize both the old and the new as equally valid preferences.
34
34
 
35
35
  Mark concrete completions explicitly.
36
36
  Use "completed:", "resolved:", "confirmed working", or similar phrasing so future runs know not to redo the work.
@@ -0,0 +1,21 @@
1
+ import type { ExtensionAPI } from "../sdk/coding-agent/index.js";
2
+ import { Runtime } from "./runtime.js";
3
+ /**
4
+ * Session/branch memory layer.
5
+ *
6
+ * This layer owns the branch-scoped observational-memory pipeline:
7
+ * - the observer (`observer.ts` via `observer-trigger.ts`) extracts
8
+ * observations from new conversation turns;
9
+ * - the deterministic pruner (`deterministic-pruner.ts` via
10
+ * `compaction-hook.ts`) drops low-value observations at compaction time;
11
+ * - the summary render path (`compaction.ts`) produces the compacted memory
12
+ * that is persisted into `session_memory_snapshots`;
13
+ * - the snapshot persistence hooks (`compaction-hook.ts`,
14
+ * `compaction-trigger.ts`, `observer-trigger.ts`) keep that session memory
15
+ * alive across compactions.
16
+ *
17
+ * It is intentionally separate from `project-observation-memory.ts`, which
18
+ * owns the per-machine + per-cwd, cross-session project observation store.
19
+ */
20
+ export declare function registerSessionMemory(ext: ExtensionAPI, runtime: Runtime): void;
21
+ //# sourceMappingURL=session-memory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-memory.d.ts","sourceRoot":"","sources":["../../src/memory/session-memory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAMjE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAIvC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAS/E"}
@@ -0,0 +1,33 @@
1
+ import { registerStatusCommand } from "./commands/status.js";
2
+ import { registerViewCommand } from "./commands/view.js";
3
+ import { registerCompactionHook } from "./hooks/compaction-hook.js";
4
+ import { registerCompactionTrigger } from "./hooks/compaction-trigger.js";
5
+ import { registerObserverTrigger } from "./hooks/observer-trigger.js";
6
+ import { registerToolOutputCompressor } from "./tool-output-compressor.js";
7
+ import { registerCompactContextTool } from "./tools/compact-context.js";
8
+ /**
9
+ * Session/branch memory layer.
10
+ *
11
+ * This layer owns the branch-scoped observational-memory pipeline:
12
+ * - the observer (`observer.ts` via `observer-trigger.ts`) extracts
13
+ * observations from new conversation turns;
14
+ * - the deterministic pruner (`deterministic-pruner.ts` via
15
+ * `compaction-hook.ts`) drops low-value observations at compaction time;
16
+ * - the summary render path (`compaction.ts`) produces the compacted memory
17
+ * that is persisted into `session_memory_snapshots`;
18
+ * - the snapshot persistence hooks (`compaction-hook.ts`,
19
+ * `compaction-trigger.ts`, `observer-trigger.ts`) keep that session memory
20
+ * alive across compactions.
21
+ *
22
+ * It is intentionally separate from `project-observation-memory.ts`, which
23
+ * owns the per-machine + per-cwd, cross-session project observation store.
24
+ */
25
+ export function registerSessionMemory(ext, runtime) {
26
+ registerObserverTrigger(ext, runtime);
27
+ registerCompactContextTool(ext, runtime);
28
+ registerCompactionTrigger(ext, runtime);
29
+ registerCompactionHook(ext, runtime);
30
+ registerToolOutputCompressor(ext, runtime);
31
+ registerStatusCommand(ext, runtime);
32
+ registerViewCommand(ext, runtime);
33
+ }
@@ -5,7 +5,6 @@
5
5
  * This is complementary to the conversation-level compaction pipeline:
6
6
  * - Compressor: compresses raw tool output (pre-context)
7
7
  * - Compaction: summarizes + prunes conversation history (post-context)
8
- * - Unified compaction: narrative summary + observation extraction (at compaction boundary)
9
8
  *
10
9
  * Strategies (mirroring RTK's four-pronged approach):
11
10
  *
@@ -1 +1 @@
1
- {"version":3,"file":"tool-output-compressor.d.ts","sourceRoot":"","sources":["../../src/memory/tool-output-compressor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAEX,gBAAgB,EAIhB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAGN,KAAK,0BAA0B,EAC/B,MAAM,+CAA+C,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAO5C,MAAM,MAAM,gBAAgB,GAAG,0BAA0B,CAAC;AAE1D,eAAO,MAAM,yBAAyB,EAAE,gBAEvC,CAAC;AAgsBF,MAAM,WAAW,gBAAgB;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,8BAA8B;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAA;KAAE,CAAC,CA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,EACjB,OAAO,EAAE,OAAO,GACd,IAAI,CAkCN"}
@@ -5,7 +5,6 @@
5
5
  * This is complementary to the conversation-level compaction pipeline:
6
6
  * - Compressor: compresses raw tool output (pre-context)
7
7
  * - Compaction: summarizes + prunes conversation history (post-context)
8
- * - Unified compaction: narrative summary + observation extraction (at compaction boundary)
9
8
  *
10
9
  * Strategies (mirroring RTK's four-pronged approach):
11
10
  *
@@ -2,18 +2,39 @@ import type { AgentMessage } from "../../sdk/agent-core/index.js";
2
2
  import { type CompactionPolicy } from "../../sdk/coding-agent/core/compaction/index.js";
3
3
  import { type ExtensionAPI } from "../../sdk/coding-agent/index.js";
4
4
  import type { Runtime } from "../runtime.js";
5
- import { type Config } from "../config.js";
6
5
  export declare const COMPACT_CONTEXT_TOOL_NAME = "compact_context";
7
- /**
8
- * Creates an invocation-local provider payload hook for isolated agent loops.
9
- * The values are snapshotted at invocation start; no Runtime, SessionManager, or
10
- * extension state is retained by the returned hook.
11
- */
12
- export declare function createIsolatedDcpNudgePayloadHook(options?: {
13
- config?: Pick<Config, "dcpInRunNudgeIterationThreshold" | "dcpInRunNudgeFrequency">;
14
- policy?: CompactionPolicy;
15
- }): NonNullable<import("../../sdk/ai/index.js").SimpleStreamOptions["onPayload"]>;
6
+ export interface AutoPruneFrozen {
7
+ /** Session identity used to invalidate the frozen cut after branch/session switches. */
8
+ branchId: string;
9
+ /** First kept entry id the byte-stable cut point from the original prune. */
10
+ anchorEntryId: string;
11
+ /** Deterministic DCP-lite summary generated at the original prune. */
12
+ summary: string;
13
+ /** Number of provider messages covered by the original frozen boundary. */
14
+ frozenAtBoundaryEnd: number;
15
+ /** Raw token estimate at the moment the cut was frozen. */
16
+ rawTokensAtFreeze: number;
17
+ /** Original tokensBefore for the frozen compaction summary message. */
18
+ tokensBefore: number;
19
+ /** Original compaction timestamp for the frozen compaction summary message. */
20
+ timestamp: string;
21
+ /** Stable AgentMessage references for the frozen leading boundary. */
22
+ leadingMessageRefs: readonly AgentMessage[];
23
+ }
16
24
  /** Request-time DCP adapter for isolated loops: it borrows only pure policy helpers. */
17
25
  export declare function buildIsolatedRequestTimePrunedMessages(currentMessages: AgentMessage[], policy?: CompactionPolicy, keepRecentTokens?: number): AgentMessage[];
26
+ export interface IsolatedRequestTimePruneResult {
27
+ messages: AgentMessage[];
28
+ frozen: AutoPruneFrozen | null;
29
+ }
30
+ /**
31
+ * Stateful per-run variant of {@link buildIsolatedRequestTimePrunedMessages}.
32
+ *
33
+ * The subagent loop owns the returned `frozen` value across provider requests.
34
+ * On the first prune we freeze the deterministic summary + cut, then reuse that
35
+ * exact prefix until the leading message references change (which can only
36
+ * happen at the end of the isolated run).
37
+ */
38
+ export declare function buildIsolatedRequestTimePrunedMessagesResult(currentMessages: AgentMessage[], policy?: CompactionPolicy, keepRecentTokens?: number, frozen?: AutoPruneFrozen | null): IsolatedRequestTimePruneResult;
18
39
  export declare function registerCompactContextTool(ext: ExtensionAPI, runtime: Runtime): void;
19
40
  //# sourceMappingURL=compact-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"compact-context.d.ts","sourceRoot":"","sources":["../../../src/memory/tools/compact-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAUN,KAAK,gBAAgB,EACrB,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAc,KAAK,YAAY,EAAyB,MAAM,iCAAiC,CAAC;AAKvG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAY,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAErD,eAAO,MAAM,yBAAyB,oBAAoB,CAAC;AAkP3D;;;;GAIG;AACH,wBAAgB,iCAAiC,CAAC,OAAO,GAAE;IAC1D,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,iCAAiC,GAAG,wBAAwB,CAAC,CAAC;IACpF,MAAM,CAAC,EAAE,gBAAgB,CAAC;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