repoburg 1.3.180 → 1.3.181

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 (24) hide show
  1. package/backend/dist/src/llm-orchestration/action-handlers/html-final.handler.js +4 -2
  2. package/backend/dist/src/llm-orchestration/action-handlers/html-final.handler.js.map +1 -1
  3. package/backend/dist/src/seeding/data/context-snippets/compress-with-summary.d.ts +2 -2
  4. package/backend/dist/src/seeding/data/context-snippets/compress-with-summary.js +295 -46
  5. package/backend/dist/src/seeding/data/context-snippets/compress-with-summary.js.map +1 -1
  6. package/backend/dist/src/seeding/sub-agent-seeding.service.js +1 -1
  7. package/backend/dist/src/seeding/sub-agent-seeding.service.js.map +1 -1
  8. package/backend/dist/src/seeding/system-prompt-seeding.service.js +5 -1
  9. package/backend/dist/src/seeding/system-prompt-seeding.service.js.map +1 -1
  10. package/backend/dist/src/seeding/tool-hook-seeding.service.js +2 -10
  11. package/backend/dist/src/seeding/tool-hook-seeding.service.js.map +1 -1
  12. package/backend/dist/src/tool-hooks/tool-hooks.service.js +1 -7
  13. package/backend/dist/src/tool-hooks/tool-hooks.service.js.map +1 -1
  14. package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
  15. package/package.json +1 -1
  16. package/backend/dist/src/seeding/data/sub-agents/session-compressor.d.ts +0 -7
  17. package/backend/dist/src/seeding/data/sub-agents/session-compressor.js +0 -11
  18. package/backend/dist/src/seeding/data/sub-agents/session-compressor.js.map +0 -1
  19. package/backend/dist/src/seeding/data/system-prompts/session-compressor-agent.d.ts +0 -4
  20. package/backend/dist/src/seeding/data/system-prompts/session-compressor-agent.js +0 -11
  21. package/backend/dist/src/seeding/data/system-prompts/session-compressor-agent.js.map +0 -1
  22. package/backend/dist/src/seeding/data/tool-hooks/session-compression-hook.d.ts +0 -2
  23. package/backend/dist/src/seeding/data/tool-hooks/session-compression-hook.js +0 -53
  24. package/backend/dist/src/seeding/data/tool-hooks/session-compression-hook.js.map +0 -1
@@ -43,11 +43,11 @@ let HtmlFinalHandler = class HtmlFinalHandler {
43
43
  getDefinition() {
44
44
  const example = this.generateExample({
45
45
  tool_name: this.toolName,
46
- html: '<!DOCTYPE html>\n<html>\n<head>\n<style>\n table { border-collapse: collapse; width: 100%; }\n th, td { border: 1px solid #ddd; padding: 8px; }\n th { background-color: #f2f2f2; }\n</style>\n</head>\n<body>\n <h1>Analysis Report</h1>\n <table>\n <tr><th>Metric</th><th>Value</th></tr>\n <tr><td>Files</td><td>42</td></tr>\n </table>\n</body>\n</html>',
46
+ html: '<!DOCTYPE html>\n<html>\n<head>\n<style>\n :root { --bg:#faf9f7; --fg:#3c3c3c; --amber:#d97706; --border:#e8e6e1; }\n * { box-sizing:border-box; margin:0; }\n body { font-family:Inter,system-ui,sans-serif; font-variant-numeric:tabular-nums; background:var(--bg); color:var(--fg); padding:16px; }\n h1 { font-size:18px; font-weight:600; margin-bottom:12px; }\n table { width:100%; border-collapse:collapse; }\n th,td { border:1px solid var(--border); padding:8px; text-align:left; }\n th { background:var(--amber); color:#fff; font-weight:500; }\n tr:nth-child(even) td { background:#f5f3ef; }\n</style>\n</head>\n<body>\n <h1>Analysis Report</h1>\n <table>\n <tr><th>Metric</th><th>Value</th></tr>\n <tr><td>Files</td><td>42</td></tr>\n </table>\n</body>\n</html>',
47
47
  });
48
48
  const selectionsExample = this.generateExample({
49
49
  tool_name: this.toolName,
50
- html: '<!DOCTYPE html>\n<html>\n<head>\n<style>\n body { font-family: sans-serif; padding: 1rem; }\n .option { padding: 0.5rem; margin: 0.5rem 0; border: 1px solid #ccc; border-radius: 4px; }\n</style>\n</head>\n<body>\n <h2>Choose your approach</h2>\n <div class="option">REST API</div>\n <div class="option">GraphQL</div>\n</body>\n</html>',
50
+ html: '<!DOCTYPE html>\n<html>\n<head>\n<style>\n :root { --bg:#faf9f7; --fg:#3c3c3c; --amber:#d97706; --border:#e8e6e1; }\n * { box-sizing:border-box; margin:0; }\n body { font-family:Inter,system-ui,sans-serif; font-variant-numeric:tabular-nums; background:var(--bg); color:var(--fg); padding:16px; }\n h2 { font-size:16px; font-weight:600; margin-bottom:12px; }\n .opt { padding:12px; margin-bottom:8px; border:1px solid var(--border); border-radius:4px; box-shadow:inset 0 1px 2px rgba(0,0,0,0.04); transition:all 150ms ease-out; cursor:pointer; }\n .opt:hover { border-color:var(--amber); color:var(--amber); }\n</style>\n</head>\n<body>\n <h2>Choose your approach</h2>\n <div class="opt">REST API</div>\n <div class="opt">GraphQL</div>\n</body>\n</html>',
51
51
  selections: '[{"question":"Which approach?","selections":["REST API","GraphQL","gRPC"]}]',
52
52
  });
53
53
  const definition = `
@@ -58,6 +58,8 @@ let HtmlFinalHandler = class HtmlFinalHandler {
58
58
  - "html": (string, required) A complete HTML document (including <!DOCTYPE html>, <html>, <head>, <body>). Rendered in a sandboxed iframe. You may include <style> and <script> tags.
59
59
  - "selections": (string, optional) JSON array of selection groups. Each group is {"question":"...","selections":["a","b","c"]}. The user will see clickable buttons for each selection below the HTML content. Use this when you need the user to make a choice before continuing.
60
60
 
61
+ Design Language: Always generate light mode by default — use a Linear/Raycast-inspired warm-tinted light theme with light backgrounds and dark text. Single amber accent (#d97706). Depth via hairline borders (1px solid #e8e6e1) and inset shadows — no drop shadows. 4px grid spacing. Inter font with tabular numerals. 150ms ease-out transitions. Always inline all CSS in a <style> tag. Only use a dark color scheme if the user explicitly requests dark mode in their message.
62
+
61
63
  <example>
62
64
  ${example}
63
65
  </example>
@@ -1 +1 @@
1
- {"version":3,"file":"html-final.handler.js","sourceRoot":"","sources":["../../../../src/llm-orchestration/action-handlers/html-final.handler.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAO5C,mEAA6D;AAC7D,yDAAiD;AACjD,qDAA2C;AAC3C,uCAAmD;AACnD,uEAAmE;AAG5D,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAAtB;QACI,aAAQ,GAAG,YAAY,CAAC;IAgHnC,CAAC;IA9GC,WAAW;QACT,OAA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rC;YACD,aAAa,EAAE;gBACb,MAAM,EAAE,kCAAkC;gBAC1C,aAAa,EAAE,EAAE;aAClB;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AAnHY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;GACA,gBAAgB,CAmH5B"}
@@ -1,3 +1,3 @@
1
1
  export declare const handle = "compress-with-summary";
2
- export declare const description = "Compress session context by replacing individual messages with self-contained summaries";
3
- export declare const template_content = "Compress the session context using summary replacement. The user's prompt below defines the compression policy. Follow these instructions and any additional guidance from the user's prompt (which overrides/customizes the defaults).\n\n## Process\n\n1. Call `get_messages` to see all non-discarded messages with `short_id` and `est_tokens` per message.\n2. Review the messages and identify individual messages that can be replaced by concise, self-contained summaries.\n3. Call `replace_message_groups` once with a batch of replacement objects.\n4. **Do NOT call `final` in the same turn** as `replace_message_groups`. A follow-up turn will start automatically so you can observe the compressed history.\n5. After the follow-up, reassess the user's semantic rules. Either:\n - Call `replace_message_groups` again if additional compression is useful, OR\n - Call `final` when the compression policy has been satisfied.\n\n## Message Selection\n\n- Select **individual messages** by their `short_id` \u2014 any active (non-discarded) message can be selected.\n- There are **no group or contiguity requirements**. You can pick any set of messages.\n- Pass the selected `short_id`s as a comma-separated list in `message_ids`.\n- The same message cannot be selected in more than one replacement in the same batch.\n\n## Summary Position\n\n- `summary_position` (optional) is the `short_id` of the message after which the summary should appear in the timeline.\n- If omitted, defaults to the first message in `message_ids`.\n- **`summary_position` must be one of the `message_ids`** in that replacement (when provided).\n- The summary takes the position of that message (which is being discarded).\n\n## replace_message_groups Format\n\n```json\n{\n \"replacements\": \"[{\\\"message_ids\\\":\\\"a1b90,b2c01,c2d31\\\",\\\"summary_position\\\":\\\"a1b90\\\",\\\"summary\\\":\\\"...\\\",\\\"reason\\\":\\\"...\\\"},{\\\"message_ids\\\":\\\"e3f42\\\",\\\"summary_position\\\":\\\"e3f42\\\",\\\"summary\\\":\\\"...\\\",\\\"reason\\\":\\\"...\\\"}]\"\n}\n```\n\n- `message_ids`: comma-separated short_ids of individual messages to replace\n- `summary_position`: short_id of the message after which the summary should be placed (optional; must be one of message_ids; defaults to first message in message_ids)\n- `summary`: self-contained summary text (will replace the original messages in context)\n- `reason`: why this replacement is useful\n\nPrefer one batch with multiple replacement objects when possible.\n\n## Summary Requirements\n\n- **Self-contained**: each summary must stand on its own \u2014 the original messages will disappear from active context.\n- **Absorb older summaries**: when including an older summary in a newer one, the newer summary must absorb all relevant facts from the older one. The older summary will no longer be sent to the provider.\n- **Never reference an older summary** that will disappear \u2014 restate its content within the newer summary.\n\n## Default Semantic Guidance\n\nThe user's prompt below may override or customize these defaults:\n\n- Preserve architectural decisions, file paths, rejected alternatives, validation results, and unresolved work.\n- Summarize exploratory tool output (request_context, run_command, execute_code) aggressively.\n- Preserve code changes (create_file, overwrite_file, quick_edit, delete_file) \u2014 describe what was done and the current file state.\n- Do not summarize the current/ongoing group.\n- Do not include the first conversation group in a summary (it anchors the session).\n- Preserve the most recent completed group verbatim if it contains active context.\n- Combine old messages that concern the same feature into a single summary.\n- Stop when no additional semantically useful compression remains under these rules.\n\n## What Not to Do\n\n- Do NOT use `discard_messages` for this workflow \u2014 use `replace_message_groups`.\n- Do NOT set a numeric token target or floor. The compression goal is the user's semantic policy, not a token budget.\n- Do NOT call `final` in the same turn as `replace_message_groups`.\n\n## User-Defined Policy\n\nAny additional text provided by the user in this prompt overrides or customizes the defaults above. Apply the user's specific instructions.";
2
+ export declare const description = "Compress session context by replacing individual messages with structured, loss-aware summaries";
3
+ export declare const template_content = "# Session Context Compression via Summary Replacement\n\nCompress the active session context by replacing old messages with structured, loss-aware summaries. The goal is not merely to reduce tokens; it is to preserve enough state for another agent to continue the work without repeating rejected approaches, inventing completed work, or losing critical constraints.\n\n## Core Safety Principle\n\nA summary is not a transcript and must not be treated as repository, filesystem, tool, or runtime ground truth.\n\nWhen a future task depends on current code, files, external state, test results, or tool output, inspect the authoritative source again. Use summaries only to preserve decisions, constraints, history, and known state.\n\n## Process\n\n1. Call `get_messages` to retrieve all active messages, including each message's `short_id` and `est_tokens`.\n\n2. Identify old, completed message groups that can be compressed safely.\n\n3. Before replacing anything, reconstruct the semantic state of each selected group:\n\n * user intent,\n * confirmed facts,\n * decisions,\n * rejected approaches,\n * files or components affected,\n * validation actually performed,\n * unresolved work,\n * uncertainty.\n\n4. Call `replace_message_groups` once with a batch of replacement objects.\n\n5. Do not call `final` in the same turn as `replace_message_groups`.\n\n6. In the automatically started follow-up turn:\n\n * inspect the resulting active context,\n * check for contradictions, duplicated state, missing constraints, and unresolved tasks,\n * perform another replacement pass only when it is clearly useful,\n * otherwise call `final`.\n\n## Message Selection Rules\n\n* Select messages by `short_id`.\n* Messages do not need to be contiguous.\n* Do not include the same message in multiple replacements within one batch.\n* Combine messages only when they belong to the same logical task, decision chain, or feature.\n* Do not combine unrelated topics merely because they are old.\n* Do not summarize an active or unresolved group unless all required continuation state can be preserved reliably.\n* Do not summarize the first conversation group; it anchors the session.\n* Preserve the most recent completed group verbatim when it is likely to remain active context.\n* Recency alone does not determine relevance. Preserve older messages when they contain active constraints or architectural decisions.\n\n## Group Boundary Detection\n\nTreat messages as belonging to the same logical group when they concern the same:\n\n* user goal,\n* feature,\n* bug,\n* file set,\n* architectural decision,\n* investigation,\n* implementation attempt,\n* validation cycle.\n\nA new group usually begins when the user changes goals, starts a separate task, or explicitly closes or redirects the previous task.\n\nWhen group boundaries are ambiguous, prefer not to compress the messages.\n\n## Required Summary Structure\n\nEvery replacement summary must be self-contained and use the following structure where applicable:\n\n### Goal\n\nWhat the user was trying to accomplish.\n\n### Confirmed Facts\n\nFacts directly established by the user, inspected files, successful tool results, or verified runtime output.\n\nDo not place assumptions or proposed ideas here.\n\n### User Constraints\n\nRequirements, preferences, prohibitions, compatibility requirements, and non-negotiable instructions from the user.\n\nPreserve exact constraints even when they appeared much earlier in the conversation.\n\n### Decisions\n\nDecisions that were explicitly accepted or implemented.\n\nDistinguish between:\n\n* proposed,\n* accepted,\n* implemented.\n\nDo not describe a proposal as a completed decision.\n\n### Rejected Approaches\n\nApproaches that were attempted, considered, or proposed but rejected.\n\nInclude the reason for rejection when known. This section is mandatory when rejected alternatives exist.\n\n### Current Code or File State\n\nList relevant:\n\n* file paths,\n* functions,\n* classes,\n* endpoints,\n* schemas,\n* branches,\n* commands,\n* configuration keys.\n\nDescribe only changes that were actually applied.\n\nDo not claim that a file changed when the conversation only discussed a possible change.\n\n### Validation Performed\n\nRecord only validation that actually occurred, such as:\n\n* tests run,\n* build result,\n* lint result,\n* command output,\n* manual verification,\n* observed runtime behavior.\n\nUse explicit wording:\n\n* \"Test X passed.\"\n* \"Build was not run.\"\n* \"The proposed fix was not validated.\"\n* \"Command failed with error Y.\"\n\nNever convert planned validation into completed validation.\n\n### Unresolved Work\n\nList open bugs, unanswered questions, missing validation, pending implementation, and expected next steps.\n\n### Uncertainty\n\nClearly label inferred, stale, incomplete, or potentially outdated information.\n\n## Summary Requirements\n\nEach summary must:\n\n* stand on its own after the original messages disappear,\n* preserve causal and temporal ordering,\n* distinguish earlier ideas from later superseding decisions,\n* preserve important negative information,\n* preserve unresolved work,\n* preserve exact file paths and identifiers when they matter,\n* avoid copying secrets or unnecessary sensitive values,\n* avoid unsupported claims,\n* avoid vague phrases such as \"fixed,\" \"handled,\" or \"updated\" without explaining what changed and how it was validated.\n\n## Temporal Ordering\n\nWhen a group contains changing decisions, summarize the sequence explicitly.\n\nExample:\n\n1. Migration-based solution was initially proposed.\n2. The user rejected migrations due to backward-compatibility requirements.\n3. A runtime fallback approach was selected.\n4. The fallback was implemented but not tested in production.\n\nDo not collapse this into:\n\n\"Several schema solutions were considered.\"\n\n## Old Summary Absorption\n\nWhen replacing a previous summary together with newer messages:\n\n* restate all still-relevant information from the older summary,\n* incorporate newer decisions and corrections,\n* remove information that was explicitly superseded,\n* preserve the fact that an older approach was rejected,\n* do not merely summarize the previous summary.\n\nRepeated compression must not gradually erase constraints, rejected approaches, file paths, validation results, or unresolved work.\n\nPrefer leaving an existing summary untouched when recompressing it would materially increase semantic-loss risk.\n\n## Tool Output Compression\n\nExploratory tool output may be compressed aggressively, but preserve:\n\n* exact error messages when needed for debugging,\n* error codes,\n* relevant stack frames,\n* package and runtime versions,\n* failing test names,\n* migration identifiers,\n* command names and arguments,\n* observed versus expected behavior,\n* final validation result.\n\nDo not replace a detailed failure with a vague statement such as:\n\n\"Build failed because of a type error.\"\n\nPrefer:\n\n\"`pnpm build` failed in `src/auth/session.ts:84` with TS2322 because `Session | null` was assigned to `Session`. No fix was applied.\"\n\n## Code and File State\n\nNatural-language summaries must never become the sole source of truth for current code state.\n\nPreserve what was changed, but instruct future agents to reopen relevant files before editing.\n\nWhen applicable, include:\n\n\"Current repository state must be verified before continuing because later changes may have occurred outside this summary.\"\n\n## Security and Sensitive Data\n\nDo not copy the following into summaries unless strictly necessary:\n\n* passwords,\n* API keys,\n* authentication tokens,\n* session cookies,\n* private keys,\n* one-time codes,\n* unnecessary personal information.\n\nReplace sensitive values with descriptions such as:\n\n* `[credential omitted]`\n* `[internal URL omitted]`\n* `[token omitted]`\n\nPreserve only the fact that a credential or protected resource was involved when that fact matters to continuation.\n\n## Contradiction Check\n\nBefore calling `replace_message_groups`, verify that the proposed summary does not:\n\n* conflict with messages that will remain active,\n* preserve an outdated decision as current,\n* claim unverified work is complete,\n* omit a user prohibition,\n* duplicate another active summary,\n* place events in the wrong order.\n\nIf a contradiction cannot be resolved confidently, do not compress that group.\n\n## Replacement Format\n\n```json\n{\n \"replacements\": \"[{\\\"message_ids\\\":\\\"a1b90,b2c01,c2d31\\\",\\\"summary_position\\\":\\\"a1b90\\\",\\\"summary\\\":\\\"...\\\",\\\"reason\\\":\\\"...\\\"}]\"\n}\n```\n\n### Fields\n\n* `message_ids`: comma-separated `short_id` values to replace.\n* `summary_position`: one of the included `message_ids`; defaults to the first selected message.\n* `summary`: structured, self-contained replacement summary.\n* `reason`: why this replacement is semantically safe and useful.\n\n## Replacement Quality Standard\n\nA replacement is acceptable only when a new agent can answer all of these questions from the summary:\n\n1. What was the user trying to achieve?\n2. What facts were actually confirmed?\n3. What constraints must not be violated?\n4. What was decided?\n5. What was rejected, and why?\n6. What changed in code or files?\n7. What validation actually ran?\n8. What remains unresolved?\n9. What information is uncertain?\n10. What authoritative state must be reread before continuing?\n\nIf any important answer is missing, keep the original messages active or improve the summary before replacement.\n\n## What Not to Do\n\n* Do not use `discard_messages`.\n* Do not optimize toward a numeric token target.\n* Do not summarize messages solely because they are large.\n* Do not combine unrelated tasks.\n* Do not summarize the current ongoing group.\n* Do not claim proposed work was implemented.\n* Do not claim tests passed unless they were run successfully.\n* Do not omit rejected approaches.\n* Do not remove important user constraints because they are old.\n* Do not repeatedly recompress summaries when semantic loss outweighs token savings.\n* Do not call `final` in the same turn as `replace_message_groups`.\n\n## Stop Condition\n\nStop compressing when every remaining candidate falls into at least one of these categories:\n\n* active or unresolved work,\n* first conversation group,\n* recent context likely to be used next,\n* critical user constraint,\n* architectural decision requiring original detail,\n* tool output whose exact content is still needed,\n* summary that would lose meaningful information if compressed again,\n* messages whose logical group boundary is uncertain.\n\nAt that point, call `final`.";
@@ -2,74 +2,323 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.template_content = exports.description = exports.handle = void 0;
4
4
  exports.handle = 'compress-with-summary';
5
- exports.description = 'Compress session context by replacing individual messages with self-contained summaries';
6
- exports.template_content = `Compress the session context using summary replacement. The user's prompt below defines the compression policy. Follow these instructions and any additional guidance from the user's prompt (which overrides/customizes the defaults).
5
+ exports.description = 'Compress session context by replacing individual messages with structured, loss-aware summaries';
6
+ exports.template_content = `# Session Context Compression via Summary Replacement
7
+
8
+ Compress the active session context by replacing old messages with structured, loss-aware summaries. The goal is not merely to reduce tokens; it is to preserve enough state for another agent to continue the work without repeating rejected approaches, inventing completed work, or losing critical constraints.
9
+
10
+ ## Core Safety Principle
11
+
12
+ A summary is not a transcript and must not be treated as repository, filesystem, tool, or runtime ground truth.
13
+
14
+ When a future task depends on current code, files, external state, test results, or tool output, inspect the authoritative source again. Use summaries only to preserve decisions, constraints, history, and known state.
7
15
 
8
16
  ## Process
9
17
 
10
- 1. Call \`get_messages\` to see all non-discarded messages with \`short_id\` and \`est_tokens\` per message.
11
- 2. Review the messages and identify individual messages that can be replaced by concise, self-contained summaries.
12
- 3. Call \`replace_message_groups\` once with a batch of replacement objects.
13
- 4. **Do NOT call \`final\` in the same turn** as \`replace_message_groups\`. A follow-up turn will start automatically so you can observe the compressed history.
14
- 5. After the follow-up, reassess the user's semantic rules. Either:
15
- - Call \`replace_message_groups\` again if additional compression is useful, OR
16
- - Call \`final\` when the compression policy has been satisfied.
18
+ 1. Call \`get_messages\` to retrieve all active messages, including each message's \`short_id\` and \`est_tokens\`.
19
+
20
+ 2. Identify old, completed message groups that can be compressed safely.
21
+
22
+ 3. Before replacing anything, reconstruct the semantic state of each selected group:
23
+
24
+ * user intent,
25
+ * confirmed facts,
26
+ * decisions,
27
+ * rejected approaches,
28
+ * files or components affected,
29
+ * validation actually performed,
30
+ * unresolved work,
31
+ * uncertainty.
32
+
33
+ 4. Call \`replace_message_groups\` once with a batch of replacement objects.
34
+
35
+ 5. Do not call \`final\` in the same turn as \`replace_message_groups\`.
36
+
37
+ 6. In the automatically started follow-up turn:
38
+
39
+ * inspect the resulting active context,
40
+ * check for contradictions, duplicated state, missing constraints, and unresolved tasks,
41
+ * perform another replacement pass only when it is clearly useful,
42
+ * otherwise call \`final\`.
43
+
44
+ ## Message Selection Rules
45
+
46
+ * Select messages by \`short_id\`.
47
+ * Messages do not need to be contiguous.
48
+ * Do not include the same message in multiple replacements within one batch.
49
+ * Combine messages only when they belong to the same logical task, decision chain, or feature.
50
+ * Do not combine unrelated topics merely because they are old.
51
+ * Do not summarize an active or unresolved group unless all required continuation state can be preserved reliably.
52
+ * Do not summarize the first conversation group; it anchors the session.
53
+ * Preserve the most recent completed group verbatim when it is likely to remain active context.
54
+ * Recency alone does not determine relevance. Preserve older messages when they contain active constraints or architectural decisions.
55
+
56
+ ## Group Boundary Detection
57
+
58
+ Treat messages as belonging to the same logical group when they concern the same:
59
+
60
+ * user goal,
61
+ * feature,
62
+ * bug,
63
+ * file set,
64
+ * architectural decision,
65
+ * investigation,
66
+ * implementation attempt,
67
+ * validation cycle.
68
+
69
+ A new group usually begins when the user changes goals, starts a separate task, or explicitly closes or redirects the previous task.
70
+
71
+ When group boundaries are ambiguous, prefer not to compress the messages.
72
+
73
+ ## Required Summary Structure
74
+
75
+ Every replacement summary must be self-contained and use the following structure where applicable:
76
+
77
+ ### Goal
78
+
79
+ What the user was trying to accomplish.
80
+
81
+ ### Confirmed Facts
82
+
83
+ Facts directly established by the user, inspected files, successful tool results, or verified runtime output.
84
+
85
+ Do not place assumptions or proposed ideas here.
86
+
87
+ ### User Constraints
88
+
89
+ Requirements, preferences, prohibitions, compatibility requirements, and non-negotiable instructions from the user.
90
+
91
+ Preserve exact constraints even when they appeared much earlier in the conversation.
92
+
93
+ ### Decisions
94
+
95
+ Decisions that were explicitly accepted or implemented.
96
+
97
+ Distinguish between:
98
+
99
+ * proposed,
100
+ * accepted,
101
+ * implemented.
102
+
103
+ Do not describe a proposal as a completed decision.
104
+
105
+ ### Rejected Approaches
106
+
107
+ Approaches that were attempted, considered, or proposed but rejected.
108
+
109
+ Include the reason for rejection when known. This section is mandatory when rejected alternatives exist.
110
+
111
+ ### Current Code or File State
112
+
113
+ List relevant:
114
+
115
+ * file paths,
116
+ * functions,
117
+ * classes,
118
+ * endpoints,
119
+ * schemas,
120
+ * branches,
121
+ * commands,
122
+ * configuration keys.
123
+
124
+ Describe only changes that were actually applied.
125
+
126
+ Do not claim that a file changed when the conversation only discussed a possible change.
127
+
128
+ ### Validation Performed
129
+
130
+ Record only validation that actually occurred, such as:
131
+
132
+ * tests run,
133
+ * build result,
134
+ * lint result,
135
+ * command output,
136
+ * manual verification,
137
+ * observed runtime behavior.
17
138
 
18
- ## Message Selection
139
+ Use explicit wording:
19
140
 
20
- - Select **individual messages** by their \`short_id\` — any active (non-discarded) message can be selected.
21
- - There are **no group or contiguity requirements**. You can pick any set of messages.
22
- - Pass the selected \`short_id\`s as a comma-separated list in \`message_ids\`.
23
- - The same message cannot be selected in more than one replacement in the same batch.
141
+ * "Test X passed."
142
+ * "Build was not run."
143
+ * "The proposed fix was not validated."
144
+ * "Command failed with error Y."
24
145
 
25
- ## Summary Position
146
+ Never convert planned validation into completed validation.
26
147
 
27
- - \`summary_position\` (optional) is the \`short_id\` of the message after which the summary should appear in the timeline.
28
- - If omitted, defaults to the first message in \`message_ids\`.
29
- - **\`summary_position\` must be one of the \`message_ids\`** in that replacement (when provided).
30
- - The summary takes the position of that message (which is being discarded).
148
+ ### Unresolved Work
31
149
 
32
- ## replace_message_groups Format
150
+ List open bugs, unanswered questions, missing validation, pending implementation, and expected next steps.
151
+
152
+ ### Uncertainty
153
+
154
+ Clearly label inferred, stale, incomplete, or potentially outdated information.
155
+
156
+ ## Summary Requirements
157
+
158
+ Each summary must:
159
+
160
+ * stand on its own after the original messages disappear,
161
+ * preserve causal and temporal ordering,
162
+ * distinguish earlier ideas from later superseding decisions,
163
+ * preserve important negative information,
164
+ * preserve unresolved work,
165
+ * preserve exact file paths and identifiers when they matter,
166
+ * avoid copying secrets or unnecessary sensitive values,
167
+ * avoid unsupported claims,
168
+ * avoid vague phrases such as "fixed," "handled," or "updated" without explaining what changed and how it was validated.
169
+
170
+ ## Temporal Ordering
171
+
172
+ When a group contains changing decisions, summarize the sequence explicitly.
173
+
174
+ Example:
175
+
176
+ 1. Migration-based solution was initially proposed.
177
+ 2. The user rejected migrations due to backward-compatibility requirements.
178
+ 3. A runtime fallback approach was selected.
179
+ 4. The fallback was implemented but not tested in production.
180
+
181
+ Do not collapse this into:
182
+
183
+ "Several schema solutions were considered."
184
+
185
+ ## Old Summary Absorption
186
+
187
+ When replacing a previous summary together with newer messages:
188
+
189
+ * restate all still-relevant information from the older summary,
190
+ * incorporate newer decisions and corrections,
191
+ * remove information that was explicitly superseded,
192
+ * preserve the fact that an older approach was rejected,
193
+ * do not merely summarize the previous summary.
194
+
195
+ Repeated compression must not gradually erase constraints, rejected approaches, file paths, validation results, or unresolved work.
196
+
197
+ Prefer leaving an existing summary untouched when recompressing it would materially increase semantic-loss risk.
198
+
199
+ ## Tool Output Compression
200
+
201
+ Exploratory tool output may be compressed aggressively, but preserve:
202
+
203
+ * exact error messages when needed for debugging,
204
+ * error codes,
205
+ * relevant stack frames,
206
+ * package and runtime versions,
207
+ * failing test names,
208
+ * migration identifiers,
209
+ * command names and arguments,
210
+ * observed versus expected behavior,
211
+ * final validation result.
212
+
213
+ Do not replace a detailed failure with a vague statement such as:
214
+
215
+ "Build failed because of a type error."
216
+
217
+ Prefer:
218
+
219
+ "\`pnpm build\` failed in \`src/auth/session.ts:84\` with TS2322 because \`Session | null\` was assigned to \`Session\`. No fix was applied."
220
+
221
+ ## Code and File State
222
+
223
+ Natural-language summaries must never become the sole source of truth for current code state.
224
+
225
+ Preserve what was changed, but instruct future agents to reopen relevant files before editing.
226
+
227
+ When applicable, include:
228
+
229
+ "Current repository state must be verified before continuing because later changes may have occurred outside this summary."
230
+
231
+ ## Security and Sensitive Data
232
+
233
+ Do not copy the following into summaries unless strictly necessary:
234
+
235
+ * passwords,
236
+ * API keys,
237
+ * authentication tokens,
238
+ * session cookies,
239
+ * private keys,
240
+ * one-time codes,
241
+ * unnecessary personal information.
242
+
243
+ Replace sensitive values with descriptions such as:
244
+
245
+ * \`[credential omitted]\`
246
+ * \`[internal URL omitted]\`
247
+ * \`[token omitted]\`
248
+
249
+ Preserve only the fact that a credential or protected resource was involved when that fact matters to continuation.
250
+
251
+ ## Contradiction Check
252
+
253
+ Before calling \`replace_message_groups\`, verify that the proposed summary does not:
254
+
255
+ * conflict with messages that will remain active,
256
+ * preserve an outdated decision as current,
257
+ * claim unverified work is complete,
258
+ * omit a user prohibition,
259
+ * duplicate another active summary,
260
+ * place events in the wrong order.
261
+
262
+ If a contradiction cannot be resolved confidently, do not compress that group.
263
+
264
+ ## Replacement Format
33
265
 
34
266
  \`\`\`json
35
267
  {
36
- "replacements": "[{\\"message_ids\\":\\"a1b90,b2c01,c2d31\\",\\"summary_position\\":\\"a1b90\\",\\"summary\\":\\"...\\",\\"reason\\":\\"...\\"},{\\"message_ids\\":\\"e3f42\\",\\"summary_position\\":\\"e3f42\\",\\"summary\\":\\"...\\",\\"reason\\":\\"...\\"}]"
268
+ "replacements": "[{\\"message_ids\\":\\"a1b90,b2c01,c2d31\\",\\"summary_position\\":\\"a1b90\\",\\"summary\\":\\"...\\",\\"reason\\":\\"...\\"}]"
37
269
  }
38
270
  \`\`\`
39
271
 
40
- - \`message_ids\`: comma-separated short_ids of individual messages to replace
41
- - \`summary_position\`: short_id of the message after which the summary should be placed (optional; must be one of message_ids; defaults to first message in message_ids)
42
- - \`summary\`: self-contained summary text (will replace the original messages in context)
43
- - \`reason\`: why this replacement is useful
44
-
45
- Prefer one batch with multiple replacement objects when possible.
272
+ ### Fields
46
273
 
47
- ## Summary Requirements
274
+ * \`message_ids\`: comma-separated \`short_id\` values to replace.
275
+ * \`summary_position\`: one of the included \`message_ids\`; defaults to the first selected message.
276
+ * \`summary\`: structured, self-contained replacement summary.
277
+ * \`reason\`: why this replacement is semantically safe and useful.
48
278
 
49
- - **Self-contained**: each summary must stand on its own — the original messages will disappear from active context.
50
- - **Absorb older summaries**: when including an older summary in a newer one, the newer summary must absorb all relevant facts from the older one. The older summary will no longer be sent to the provider.
51
- - **Never reference an older summary** that will disappear — restate its content within the newer summary.
279
+ ## Replacement Quality Standard
52
280
 
53
- ## Default Semantic Guidance
281
+ A replacement is acceptable only when a new agent can answer all of these questions from the summary:
54
282
 
55
- The user's prompt below may override or customize these defaults:
283
+ 1. What was the user trying to achieve?
284
+ 2. What facts were actually confirmed?
285
+ 3. What constraints must not be violated?
286
+ 4. What was decided?
287
+ 5. What was rejected, and why?
288
+ 6. What changed in code or files?
289
+ 7. What validation actually ran?
290
+ 8. What remains unresolved?
291
+ 9. What information is uncertain?
292
+ 10. What authoritative state must be reread before continuing?
56
293
 
57
- - Preserve architectural decisions, file paths, rejected alternatives, validation results, and unresolved work.
58
- - Summarize exploratory tool output (request_context, run_command, execute_code) aggressively.
59
- - Preserve code changes (create_file, overwrite_file, quick_edit, delete_file) — describe what was done and the current file state.
60
- - Do not summarize the current/ongoing group.
61
- - Do not include the first conversation group in a summary (it anchors the session).
62
- - Preserve the most recent completed group verbatim if it contains active context.
63
- - Combine old messages that concern the same feature into a single summary.
64
- - Stop when no additional semantically useful compression remains under these rules.
294
+ If any important answer is missing, keep the original messages active or improve the summary before replacement.
65
295
 
66
296
  ## What Not to Do
67
297
 
68
- - Do NOT use \`discard_messages\` for this workflow — use \`replace_message_groups\`.
69
- - Do NOT set a numeric token target or floor. The compression goal is the user's semantic policy, not a token budget.
70
- - Do NOT call \`final\` in the same turn as \`replace_message_groups\`.
298
+ * Do not use \`discard_messages\`.
299
+ * Do not optimize toward a numeric token target.
300
+ * Do not summarize messages solely because they are large.
301
+ * Do not combine unrelated tasks.
302
+ * Do not summarize the current ongoing group.
303
+ * Do not claim proposed work was implemented.
304
+ * Do not claim tests passed unless they were run successfully.
305
+ * Do not omit rejected approaches.
306
+ * Do not remove important user constraints because they are old.
307
+ * Do not repeatedly recompress summaries when semantic loss outweighs token savings.
308
+ * Do not call \`final\` in the same turn as \`replace_message_groups\`.
309
+
310
+ ## Stop Condition
311
+
312
+ Stop compressing when every remaining candidate falls into at least one of these categories:
71
313
 
72
- ## User-Defined Policy
314
+ * active or unresolved work,
315
+ * first conversation group,
316
+ * recent context likely to be used next,
317
+ * critical user constraint,
318
+ * architectural decision requiring original detail,
319
+ * tool output whose exact content is still needed,
320
+ * summary that would lose meaningful information if compressed again,
321
+ * messages whose logical group boundary is uncertain.
73
322
 
74
- Any additional text provided by the user in this prompt overrides or customizes the defaults above. Apply the user's specific instructions.`;
323
+ At that point, call \`final\`.`;
75
324
  //# sourceMappingURL=compress-with-summary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"compress-with-summary.js","sourceRoot":"","sources":["../../../../../src/seeding/data/context-snippets/compress-with-summary.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAAG,uBAAuB,CAAC;AACjC,QAAA,WAAW,GACtB,yFAAyF,CAAC;AAC/E,QAAA,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4IAoE4G,CAAC"}
1
+ {"version":3,"file":"compress-with-summary.js","sourceRoot":"","sources":["../../../../../src/seeding/data/context-snippets/compress-with-summary.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAAG,uBAAuB,CAAC;AACjC,QAAA,WAAW,GACtB,iGAAiG,CAAC;AACvF,QAAA,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BA6TD,CAAC"}
@@ -30,7 +30,7 @@ let SubAgentSeedingService = SubAgentSeedingService_1 = class SubAgentSeedingSer
30
30
  this.logger = new common_1.Logger(SubAgentSeedingService_1.name);
31
31
  }
32
32
  async seed() {
33
- const deprecatedBuiltinKeys = ['config-manager'];
33
+ const deprecatedBuiltinKeys = ['config-manager', 'session-compressor'];
34
34
  for (const deprecatedKey of deprecatedBuiltinKeys) {
35
35
  const deprecatedAgent = await this.subAgentRepository.findOne({
36
36
  where: { builtin_key: deprecatedKey, is_builtin: true },
@@ -1 +1 @@
1
- {"version":3,"file":"sub-agent-seeding.service.js","sourceRoot":"","sources":["../../../src/seeding/sub-agent-seeding.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,6CAAmD;AACnD,qCAAqC;AACrC,qEAA0D;AAC1D,qFAAgF;AAChF,8FAAyF;AACzF,6BAA6B;AAC7B,+BAA4B;AAGrB,IAAM,sBAAsB,8BAA5B,MAAM,sBAAsB;IAGjC,YAEE,kBAAyD,EACxC,oBAA0C,EAC1C,uBAAgD;QAFhD,uBAAkB,GAAlB,kBAAkB,CAAsB;QACxC,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,4BAAuB,GAAvB,uBAAuB,CAAyB;QANlD,WAAM,GAAG,IAAI,eAAM,CAAC,wBAAsB,CAAC,IAAI,CAAC,CAAC;IAO/D,CAAC;IAEJ,KAAK,CAAC,IAAI;QAER,MAAM,qBAAqB,GAAG,CAAC,gBAAgB,CAAC,CAAC;QACjD,KAAK,MAAM,aAAa,IAAI,qBAAqB,EAAE,CAAC;YAClD,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC;gBAC5D,KAAK,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,IAAI,EAAE;aACxD,CAAC,CAAC;YACH,IAAI,eAAe,EAAE,CAAC;gBACpB,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;gBACtD,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,yCAAyC,eAAe,CAAC,IAAI,mBAAmB,aAAa,IAAI,CAClG,CAAC;YACJ,CAAC;QACH,CAAC;QAED,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC;YACxD,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;SAC3B,CAAC,CAAC;QACH,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAoB,CAAC;QACrD,cAAc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GAAG,uBAAuB,CAAC,EAAE,CAAC;4BAC5D,CAAC;wBACH,CAAC;wBAGD,MAAM,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC;4BAC9C,IAAI;4BACJ,WAAW,EAAE,WAAW,IAAI,IAAI;4BAChC,gBAAgB;4BAChB,mBAAmB;4BACnB,4BAA4B;4BAC5B,aAAa,EAAE,aAAa,IAAI,IAAI;4BACpC,QAAQ,EAAE,QAAQ,IAAI,IAAI;4BAC1B,SAAS,EAAE,SAAS,KAAK,KAAK;4BAC9B,UAAU,EAAE,IAAI;4BAChB,WAAW,EAAE,UAAU;yBACxB,CAAC,CAAC;wBAEH,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;wBAC7C,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,uBAAuB,IAAI,WAAW,CAAC,CAAC;oBAC1D,CAAC;gBACH,CAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,iCAAiC,QAAQ,EAAE,EAC3C,KAAK,CAAC,KAAK,CACZ,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAA;AA/MY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,0BAAgB,EAAC,2BAAQ,CAAC,CAAA;qCACU,oBAAU;QACR,6CAAoB;QACjB,mDAAuB;GAPxD,sBAAsB,CA+MlC"}
@@ -24,7 +24,11 @@ let SystemPromptSeedingService = SystemPromptSeedingService_1 = class SystemProm
24
24
  const existingPrompts = await this.systemPromptsService.findAllRaw();
25
25
  const existingPromptsMap = new Map();
26
26
  existingPrompts.forEach((p) => existingPromptsMap.set(p.prompt_name, p));
27
- const deprecatedBuiltinKeys = ['master-agent', 'config-manager-agent'];
27
+ const deprecatedBuiltinKeys = [
28
+ 'master-agent',
29
+ 'config-manager-agent',
30
+ 'session-compressor-agent',
31
+ ];
28
32
  for (const deprecatedKey of deprecatedBuiltinKeys) {
29
33
  const deprecatedPrompt = await this.systemPromptsService.findByBuiltinKey(deprecatedKey);
30
34
  if (deprecatedPrompt && deprecatedPrompt.is_builtin) {
@@ -1 +1 @@
1
- {"version":3,"file":"system-prompt-seeding.service.js","sourceRoot":"","sources":["../../../src/seeding/system-prompt-seeding.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,qFAAgF;AAChF,6BAA6B;AAC7B,+BAA4B;AAIrB,IAAM,0BAA0B,kCAAhC,MAAM,0BAA0B;IAGrC,YAA6B,oBAA0C;QAA1C,yBAAoB,GAApB,oBAAoB,CAAsB;QAFtD,WAAM,GAAG,IAAI,eAAM,CAAC,4BAA0B,CAAC,IAAI,CAAC,CAAC;IAEI,CAAC;IAE3E,KAAK,CAAC,IAAI;QACR,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,UAAU,EAAE,CAAC;QACrE,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAwB,CAAC;QAC3D,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC;QAGzE,MAAM,qBAAqB,GAAG,CAAC,cAAc,EAAE,sBAAsB,CAAC,CAAC;QACvE,KAAK,MAAM,aAAa,IAAI,qBAAqB,EAAE,CAAC;YAClD,MAAM,gBAAgB,GACpB,MAAM,IAAI,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;YAClE,IAAI,gBAAgB,IAAI,gBAAgB,CAAC,UAAU,EAAE,CAAC;gBACpD,MAAM,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;gBAC5D,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,sCAAsC,gBAAgB,CAAC,WAAW,m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ACZ,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAA;AA1GY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,mBAAU,GAAE;qCAIwC,6CAAoB;GAH5D,0BAA0B,CA0GtC"}
1
+ {"version":3,"file":"system-prompt-seeding.service.js","sourceRoot":"","sources":["../../../src/seeding/system-prompt-seeding.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,qFAAgF;AAChF,6BAA6B;AAC7B,+BAA4B;AAIrB,IAAM,0BAA0B,kCAAhC,MAAM,0BAA0B;IAGrC,YAA6B,oBAA0C;QAA1C,yBAAoB,GAApB,oBAAoB,CAAsB;QAFtD,WAAM,GAAG,IAAI,eAAM,CAAC,4BAA0B,CAAC,IAAI,CAAC,CAAC;IAEI,CAAC;IAE3E,KAAK,CAAC,IAAI;QACR,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,UAAU,EAAE,CAAC;QACrE,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAwB,CAAC;QAC3D,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC;QAGzE,MAAM,qBAAqB,GAAG;YAC5B,cAAc;YACd,sBAAsB;YACtB,0BAA0B;SAC3B,CAAC;QACF,KAAK,MAAM,aAAa,IAAI,qBAAqB,EAAE,CAAC;YAClD,MAAM,gBAAgB,GACpB,MAAM,IAAI,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;YAClE,IAAI,gBAAgB,IAAI,gBAAgB,CAAC,UAAU,EAAE,CAAC;gBACpD,MAAM,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;gBAC5D,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,sCAAsC,gBAAgB,CAAC,WAAW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,CACZ,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAA;AA9GY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,mBAAU,GAAE;qCAIwC,6CAAoB;GAH5D,0BAA0B,CA8GtC"}
@@ -33,17 +33,9 @@ let ToolHookSeedingService = ToolHookSeedingService_1 = class ToolHookSeedingSer
33
33
  },
34
34
  });
35
35
  if (existing) {
36
- this.logger.log(`Session compression hook config already exists (id: ${existing.id}). Skipping seed.`);
37
- return;
36
+ await this.toolHookRepository.remove(existing);
37
+ this.logger.log(`Removed deprecated session compression hook config (id: ${existing.id}).`);
38
38
  }
39
- const hook = this.toolHookRepository.create({
40
- tool_name: '*',
41
- timing: 'after',
42
- script_filename: scriptFilename,
43
- is_active: true,
44
- });
45
- await this.toolHookRepository.save(hook);
46
- this.logger.log(`Seeded session compression hook config (id: ${hook.id}): tool_name="*", timing="after", script="${scriptFilename}"`);
47
39
  }
48
40
  };
49
41
  exports.ToolHookSeedingService = ToolHookSeedingService;
@@ -1 +1 @@
1
- {"version":3,"file":"tool-hook-seeding.service.js","sourceRoot":"","sources":["../../../src/seeding/tool-hook-seeding.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,6CAAmD;AACnD,qCAAqC;AACrC,oDAA4C;AAQrC,IAAM,sBAAsB,8BAA5B,MAAM,sBAAsB;IAGjC,YAEE,kBAAyD;QAAxC,uBAAkB,GAAlB,kBAAkB,CAAsB;QAJ1C,WAAM,GAAG,IAAI,eAAM,CAAC,wBAAsB,CAAC,IAAI,CAAC,CAAC;IAK/D,CAAC;IAEJ,KAAK,CAAC,IAAI;QACR,MAAM,cAAc,GAAG,6BAA6B,CAAC;QAGrD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC;YACrD,KAAK,EAAE;gBACL,SAAS,EAAE,GAAG;gBACd,MAAM,EAAE,OAAO;gBACf,eAAe,EAAE,cAAc;aAChC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BACf,eAAe,EAAE,cAAc;aAChC;SACF,CAAC,CAAC;QAEH,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC/C,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,2DAA2D,QAAQ,CAAC,EAAE,IAAI,CAC3E,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AA1BY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,0BAAgB,EAAC,wBAAQ,CAAC,CAAA;qCACU,oBAAU;GALtC,sBAAsB,CA0BlC"}
@@ -24,7 +24,6 @@ const path = require("path");
24
24
  const readmeData = require("../seeding/data/tool-hooks/readme");
25
25
  const exampleHookData = require("../seeding/data/tool-hooks/example-hook");
26
26
  const eslintHookData = require("../seeding/data/tool-hooks/eslint-hook");
27
- const sessionCompressionHookData = require("../seeding/data/tool-hooks/session-compression-hook");
28
27
  let ToolHooksService = ToolHooksService_1 = class ToolHooksService {
29
28
  constructor(toolHooksRepository, hookRuntime) {
30
29
  this.toolHooksRepository = toolHooksRepository;
@@ -44,12 +43,7 @@ let ToolHooksService = ToolHooksService_1 = class ToolHooksService {
44
43
  }
45
44
  }
46
45
  async createExampleFiles() {
47
- const hooksToSeed = [
48
- readmeData,
49
- exampleHookData,
50
- eslintHookData,
51
- sessionCompressionHookData,
52
- ];
46
+ const hooksToSeed = [readmeData, exampleHookData, eslintHookData];
53
47
  for (const hook of hooksToSeed) {
54
48
  const filePath = path.join(this.hooksDir, hook.filename);
55
49
  try {