@dev4s/opencode-dcp 0.1.1 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../lib/config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEtD,MAAM,WAAW,aAAa;IAC1B,OAAO,EAAE,OAAO,CAAA;IAChB,cAAc,EAAE,MAAM,EAAE,CAAA;CAC3B;AAED,MAAM,WAAW,MAAM;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,cAAc,EAAE,MAAM,EAAE,CAAA;CAC3B;AAED,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,gBAAgB,EAAE,OAAO,CAAA;CAC5B;AAED,MAAM,WAAW,YAAY;IACzB,YAAY,EAAE,OAAO,CAAA;IACrB,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,EAAE,MAAM,EAAE,CAAA;CAC3B;AAED,MAAM,WAAW,KAAK;IAClB,QAAQ,EAAE,YAAY,CAAA;IACtB,OAAO,EAAE,WAAW,CAAA;IACpB,OAAO,EAAE,WAAW,CAAA;CACvB;AAED,MAAM,WAAW,eAAe;IAC5B,OAAO,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,EAAE,MAAM,EAAE,CAAA;CAC3B;AAED,MAAM,WAAW,cAAc;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;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,MAAM,CAAA;IACtB,cAAc,EAAE,MAAM,EAAE,CAAA;CAC3B;AAED,MAAM,WAAW,KAAK;IAClB,QAAQ,EAAE,YAAY,CAAA;IACtB,OAAO,EAAE,WAAW,CAAA;IACpB,OAAO,EAAE,WAAW,CAAA;CACvB;AAED,MAAM,WAAW,eAAe;IAC5B,OAAO,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,EAAE,MAAM,EAAE,CAAA;CAC3B;AAED,MAAM,WAAW,cAAc;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,YAAY;IACzB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,OAAO,CAAA;IACd,iBAAiB,EAAE,KAAK,GAAG,SAAS,GAAG,UAAU,CAAA;IACjD,cAAc,EAAE,cAAc,CAAA;IAC9B,KAAK,EAAE,KAAK,CAAA;IACZ,UAAU,EAAE;QACR,aAAa,EAAE,aAAa,CAAA;QAC5B,eAAe,EAAE,eAAe,CAAA;QAChC,WAAW,EAAE,WAAW,CAAA;QACxB,MAAM,EAAE,MAAM,CAAA;KACjB,CAAA;CACJ;AAKD,eAAO,MAAM,iBAAiB,aAuC5B,CAAA;AAgBF,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,EAAE,CAG9E;AAmmBD,wBAAgB,SAAS,CAAC,GAAG,EAAE,WAAW,GAAG,YAAY,CAkHxD"}
@@ -341,6 +341,8 @@ const defaultConfig = {
341
341
  const GLOBAL_CONFIG_DIR = join(homedir(), ".config", "opencode");
342
342
  const GLOBAL_CONFIG_PATH_JSONC = join(GLOBAL_CONFIG_DIR, "dcp.jsonc");
343
343
  const GLOBAL_CONFIG_PATH_JSON = join(GLOBAL_CONFIG_DIR, "dcp.json");
344
+ // Module-level config cache to avoid repeated file I/O on startup
345
+ let cachedConfig = null;
344
346
  function findOpencodeDir(startDir) {
345
347
  let current = startDir;
346
348
  while (current !== "/") {
@@ -398,73 +400,73 @@ function createDefaultConfig() {
398
400
  if (!existsSync(GLOBAL_CONFIG_DIR)) {
399
401
  mkdirSync(GLOBAL_CONFIG_DIR, { recursive: true });
400
402
  }
401
- const configContent = `{
402
- // Enable or disable the plugin
403
- "enabled": true,
404
- // Enable debug logging to ~/.config/opencode/logs/dcp/
405
- "debug": false,
406
- // Notification display: "off", "minimal", or "detailed"
407
- "pruneNotification": "detailed",
408
- // Protect from pruning for <turns> message turns
409
- "turnProtection": {
410
- "enabled": false,
411
- "turns": 4
412
- },
413
- // LLM-driven context pruning tools
414
- "tools": {
415
- // Shared settings for all prune tools
416
- "settings": {
417
- // Nudge the LLM to use prune tools (every <nudgeFrequency> tool results)
418
- "nudgeEnabled": true,
419
- "nudgeFrequency": 10,
420
- // Additional tools to protect from pruning
421
- "protectedTools": []
422
- },
423
- // Removes tool content from context without preservation (for completed tasks or noise)
424
- "discard": {
425
- "enabled": true
426
- },
427
- // Distills key findings into preserved knowledge before removing raw content
428
- "extract": {
429
- "enabled": true,
430
- // Show distillation content as an ignored message notification
431
- "showDistillation": false
432
- }
433
- },
434
- // Automatic pruning strategies
435
- "strategies": {
436
- // Remove duplicate tool calls (same tool with same arguments)
437
- "deduplication": {
438
- "enabled": true,
439
- // Additional tools to protect from pruning
440
- "protectedTools": []
441
- },
442
- // Prune write tool inputs when the file has been subsequently read
443
- "supersedeWrites": {
444
- "enabled": true
445
- },
446
- // Prune tool inputs for errored tools after X turns
447
- "purgeErrors": {
448
- "enabled": true,
449
- // Number of turns before errored tool inputs are pruned
450
- "turns": 4,
451
- // Additional tools to protect from pruning
452
- "protectedTools": []
453
- },
454
- // (Legacy) Run an LLM to analyze what tool calls are no longer relevant on idle
455
- "onIdle": {
456
- "enabled": false,
457
- // Additional tools to protect from pruning
458
- "protectedTools": [],
459
- // Override model for analysis (format: "provider/model")
460
- // "model": "anthropic/claude-haiku-4-5",
461
- // Show toast notifications when model selection fails
462
- "showModelErrorToasts": true,
463
- // When true, fallback models are not permitted
464
- "strictModelSelection": false
465
- }
466
- }
467
- }
403
+ const configContent = `{
404
+ // Enable or disable the plugin
405
+ "enabled": true,
406
+ // Enable debug logging to ~/.config/opencode/logs/dcp/
407
+ "debug": false,
408
+ // Notification display: "off", "minimal", or "detailed"
409
+ "pruneNotification": "detailed",
410
+ // Protect from pruning for <turns> message turns
411
+ "turnProtection": {
412
+ "enabled": false,
413
+ "turns": 4
414
+ },
415
+ // LLM-driven context pruning tools
416
+ "tools": {
417
+ // Shared settings for all prune tools
418
+ "settings": {
419
+ // Nudge the LLM to use prune tools (every <nudgeFrequency> tool results)
420
+ "nudgeEnabled": true,
421
+ "nudgeFrequency": 10,
422
+ // Additional tools to protect from pruning
423
+ "protectedTools": []
424
+ },
425
+ // Removes tool content from context without preservation (for completed tasks or noise)
426
+ "discard": {
427
+ "enabled": true
428
+ },
429
+ // Distills key findings into preserved knowledge before removing raw content
430
+ "extract": {
431
+ "enabled": true,
432
+ // Show distillation content as an ignored message notification
433
+ "showDistillation": false
434
+ }
435
+ },
436
+ // Automatic pruning strategies
437
+ "strategies": {
438
+ // Remove duplicate tool calls (same tool with same arguments)
439
+ "deduplication": {
440
+ "enabled": true,
441
+ // Additional tools to protect from pruning
442
+ "protectedTools": []
443
+ },
444
+ // Prune write tool inputs when the file has been subsequently read
445
+ "supersedeWrites": {
446
+ "enabled": true
447
+ },
448
+ // Prune tool inputs for errored tools after X turns
449
+ "purgeErrors": {
450
+ "enabled": true,
451
+ // Number of turns before errored tool inputs are pruned
452
+ "turns": 4,
453
+ // Additional tools to protect from pruning
454
+ "protectedTools": []
455
+ },
456
+ // (Legacy) Run an LLM to analyze what tool calls are no longer relevant on idle
457
+ "onIdle": {
458
+ "enabled": false,
459
+ // Additional tools to protect from pruning
460
+ "protectedTools": [],
461
+ // Override model for analysis (format: "provider/model")
462
+ // "model": "anthropic/claude-haiku-4-5",
463
+ // Show toast notifications when model selection fails
464
+ "showModelErrorToasts": true,
465
+ // When true, fallback models are not permitted
466
+ "strictModelSelection": false
467
+ }
468
+ }
469
+ }
468
470
  `;
469
471
  writeFileSync(GLOBAL_CONFIG_PATH_JSONC, configContent, "utf-8");
470
472
  }
@@ -583,6 +585,10 @@ function deepCloneConfig(config) {
583
585
  };
584
586
  }
585
587
  export function getConfig(ctx) {
588
+ // Return cached config if available (avoids repeated file I/O)
589
+ if (cachedConfig) {
590
+ return deepCloneConfig(cachedConfig);
591
+ }
586
592
  let config = deepCloneConfig(defaultConfig);
587
593
  const configPaths = getConfigPaths(ctx);
588
594
  // Load and merge global config
@@ -691,6 +697,8 @@ export function getConfig(ctx) {
691
697
  };
692
698
  }
693
699
  }
694
- return config;
700
+ // Cache the config for subsequent calls
701
+ cachedConfig = config;
702
+ return deepCloneConfig(config);
695
703
  }
696
704
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../lib/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAA;AACjF,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAkEpC,MAAM,uBAAuB,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,CAAA;AAEhG,uDAAuD;AACvD,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IACrC,iBAAiB;IACjB,SAAS;IACT,OAAO;IACP,kBAAkB,EAAE,kDAAkD;IACtE,mBAAmB;IACnB,gBAAgB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AM,CAAC,iBAAiB;gBAC5E,cAAc,EAAE;oBACZ,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,IAAI,MAAM,CAAC,cAAc,CAAC,OAAO;oBAC7E,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,IAAI,MAAM,CAAC,cAAc,CAAC,KAAK;iBAC1E;gBACD,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,KAAY,CAAC;gBACzD,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,UAAiB,CAAC;aAChF,CAAA;QACL,CAAC;IACL,CAAC;IAED,wCAAwC;IACxC,YAAY,GAAG,MAAM,CAAA;IACrB,OAAO,eAAe,CAAC,MAAM,CAAC,CAAA;AAClC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../lib/prompt.ts"],"names":[],"mappings":"AAGA,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAS9E;AA2HD,wBAAgB,mBAAmB,CAC/B,mBAAmB,EAAE,MAAM,EAAE,EAC7B,QAAQ,EAAE,GAAG,EAAE,EACf,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAC3B,oBAAoB,CAAC,EAAE,MAAM,EAAE,GAChC,MAAM,CAQR"}
1
+ {"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../lib/prompt.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAY9E;AA2HD,wBAAgB,mBAAmB,CAC/B,mBAAmB,EAAE,MAAM,EAAE,EAC7B,QAAQ,EAAE,GAAG,EAAE,EACf,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAC3B,oBAAoB,CAAC,EAAE,MAAM,EAAE,GAChC,MAAM,CAQR"}
@@ -1,14 +1,16 @@
1
- import { readFileSync } from "fs";
2
- import { join } from "path";
1
+ import { PROMPTS } from "./prompts/generated";
3
2
  export function loadPrompt(name, vars) {
4
- const filePath = join(__dirname, "prompts", `${name}.txt`);
5
- let content = readFileSync(filePath, "utf8").trim();
3
+ const content = PROMPTS[name];
4
+ if (!content) {
5
+ throw new Error(`Prompt not found: ${name}. Run 'npm run generate-prompts' to regenerate.`);
6
+ }
7
+ let result = content;
6
8
  if (vars) {
7
9
  for (const [key, value] of Object.entries(vars)) {
8
- content = content.replace(new RegExp(`\\{\\{${key}\\}\\}`, "g"), value);
10
+ result = result.replace(new RegExp(`\\{\\{${key}\\}\\}`, "g"), value);
9
11
  }
10
12
  }
11
- return content;
13
+ return result;
12
14
  }
13
15
  function minimizeMessages(messages, alreadyPrunedIds, protectedToolCallIds) {
14
16
  const prunedIdsSet = alreadyPrunedIds
@@ -1 +1 @@
1
- {"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../lib/prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,IAA6B;IAClE,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,IAAI,MAAM,CAAC,CAAA;IAC1D,IAAI,OAAO,GAAG,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE,CAAA;IACnD,IAAI,IAAI,EAAE,CAAC;QACP,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YAC9C,OAAO,GAAG,OAAO,CAAC,OAA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oBAAoB,CAAC,CAAA;IAC5F,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAErF,OAAO,UAAU,CAAC,kBAAkB,EAAE;QAClC,uBAAuB,EAAE,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC;QACvD,eAAe,EAAE,YAAY;KAChC,CAAC,CAAA;AACN,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Auto-generated file - DO NOT EDIT
3
+ * Generated by scripts/generate-prompts.js
4
+ * Contains all prompt templates bundled at build time
5
+ */
6
+ export declare const PROMPTS: Record<string, string>;
7
+ //# sourceMappingURL=generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated.d.ts","sourceRoot":"","sources":["../../../lib/prompts/generated.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA8S1C,CAAA"}
@@ -0,0 +1,309 @@
1
+ /**
2
+ * Auto-generated file - DO NOT EDIT
3
+ * Generated by scripts/generate-prompts.js
4
+ * Contains all prompt templates bundled at build time
5
+ */
6
+ export const PROMPTS = {
7
+ "discard-tool-spec": `Discards tool outputs from context to manage conversation size and reduce noise.
8
+
9
+ ## IMPORTANT: The Prunable List
10
+ A \`<prunable-tools>\` list is provided to you showing available tool outputs you can discard when there are tools available for pruning. Each line has the format \`ID: tool, parameter\` (e.g., \`20: read, /path/to/file.ts\`). You MUST only use numeric IDs that appear in this list to select which tools to discard.
11
+
12
+ ## When to Use This Tool
13
+
14
+ Use \`discard\` for removing tool content that is no longer needed
15
+
16
+ - **Noise:** Irrelevant, unhelpful, or superseded outputs that provide no value.
17
+ - **Task Completion:** Work is complete and there's no valuable information worth preserving.
18
+
19
+ ## When NOT to Use This Tool
20
+
21
+ - **If the output contains useful information:** Use \`extract\` instead to preserve key findings.
22
+ - **If you'll need the output later:** Don't discard files you plan to edit or context you'll need for implementation.
23
+
24
+ ## Best Practices
25
+ - **Strategic Batching:** Don't discard single small tool outputs (like short bash commands) unless they are pure noise. Wait until you have several items to perform high-impact discards.
26
+ - **Think ahead:** Before discarding, ask: "Will I need this output for an upcoming task?" If yes, keep it.
27
+
28
+ ## Format
29
+
30
+ - \`ids\`: Array where the first element is the reason, followed by numeric IDs from the \`<prunable-tools>\` list
31
+
32
+ Reasons: \`noise\` | \`completion\`
33
+
34
+ ## Example
35
+
36
+ <example_noise>
37
+ Assistant: [Reads 'wrong_file.ts']
38
+ This file isn't relevant to the auth system. I'll remove it to clear the context.
39
+ [Uses discard with ids: ["noise", "5"]]
40
+ </example_noise>
41
+
42
+ <example_completion>
43
+ Assistant: [Runs tests, they pass]
44
+ The tests passed and I don't need to preserve any details. I'll clean up now.
45
+ [Uses discard with ids: ["completion", "20", "21"]]
46
+ </example_completion>`,
47
+ "extract-tool-spec": `Extracts key findings from tool outputs into distilled knowledge, then removes the raw outputs from context.
48
+
49
+ ## IMPORTANT: The Prunable List
50
+ A \`<prunable-tools>\` list is provided to you showing available tool outputs you can extract from when there are tools available for pruning. Each line has the format \`ID: tool, parameter\` (e.g., \`20: read, /path/to/file.ts\`). You MUST only use numeric IDs that appear in this list to select which tools to extract.
51
+
52
+ ## When to Use This Tool
53
+
54
+ Use \`extract\` when you have gathered useful information that you want to **preserve in distilled form** before removing the raw outputs:
55
+
56
+ - **Task Completion:** You completed a unit of work and want to preserve key findings.
57
+ - **Knowledge Preservation:** You have context that contains valuable information, but also a lot of unnecessary detail - you only need to preserve some specifics.
58
+
59
+ ## When NOT to Use This Tool
60
+
61
+ - **If you need precise syntax:** If you'll edit a file or grep for exact strings, keep the raw output.
62
+ - **If uncertain:** Prefer keeping over re-fetching.
63
+
64
+
65
+ ## Best Practices
66
+ - **Strategic Batching:** Wait until you have several items or a few large outputs to extract, rather than doing tiny, frequent extractions. Aim for high-impact extractions that significantly reduce context size.
67
+ - **Think ahead:** Before extracting, ask: "Will I need the raw output for an upcoming task?" If you researched a file you'll later edit, do NOT extract it.
68
+
69
+ ## Format
70
+
71
+ - \`ids\`: Array of numeric IDs as strings from the \`<prunable-tools>\` list
72
+ - \`distillation\`: Array of strings, one per ID (positional: distillation[0] is for ids[0], etc.)
73
+
74
+ Each distillation string should capture the essential information you need to preserve - function signatures, logic, constraints, values, etc. Be as detailed as needed for your task.
75
+
76
+ ## Example
77
+
78
+ <example_extraction>
79
+ Assistant: [Reads auth service and user types]
80
+ I'll preserve the key details before extracting.
81
+ [Uses extract with:
82
+ ids: ["10", "11"],
83
+ distillation: [
84
+ "auth.ts: validateToken(token: string) -> User|null checks cache first (5min TTL) then OIDC. hashPassword uses bcrypt 12 rounds. Tokens must be 128+ chars.",
85
+ "user.ts: interface User { id: string; email: string; permissions: ('read'|'write'|'admin')[]; status: 'active'|'suspended' }"
86
+ ]
87
+ ]
88
+ </example_extraction>
89
+
90
+ <example_keep>
91
+ Assistant: [Reads 'auth.ts' to understand the login flow]
92
+ I've understood the auth flow. I'll need to modify this file to add the new validation, so I'm keeping this read in context rather than extracting.
93
+ </example_keep>`,
94
+ "on-idle-analysis": `You are a conversation analyzer that identifies obsolete tool outputs in a coding session.
95
+
96
+ Your task: Analyze the session history and identify tool call IDs whose outputs are NO LONGER RELEVANT to the current conversation context.
97
+
98
+ Guidelines for identifying obsolete tool calls:
99
+ 1. Exploratory reads that didn't lead to actual edits or meaningful discussion AND were not explicitly requested to be retained
100
+ 2. Tool outputs from debugging/fixing an error that has now been resolved
101
+ 3. Failed or incorrect tool attempts that were immediately corrected (e.g., reading a file from the wrong path, then reading from the correct path)
102
+
103
+ DO NOT prune:
104
+ - Tool calls whose outputs are actively being discussed
105
+ - Tool calls that produced errors still being debugged
106
+ - Tool calls that are the MOST RECENT activity in the conversation (these may be intended for future use)
107
+
108
+ IMPORTANT: Available tool call IDs for analysis: {{available_tool_call_ids}}
109
+
110
+ The session history below may contain tool calls with IDs not in the available list above, these cannot be pruned. These are either:
111
+ 1. Protected tools (marked with toolCallID "<protected>")
112
+ 2. Already-pruned tools (marked with toolCallID "<already-pruned>")
113
+
114
+ ONLY return IDs from the available list above.
115
+
116
+ Session history (each tool call has a "toolCallID" field):
117
+ {{session_history}}
118
+
119
+ You MUST respond with valid JSON matching this exact schema:
120
+ {
121
+ "pruned_tool_call_ids": ["id1", "id2", ...],
122
+ "reasoning": "explanation of why these IDs were selected"
123
+ }`,
124
+ "user/nudge/nudge-both": `<instruction name=context_management_required>
125
+ **CRITICAL CONTEXT WARNING:** Your context window is filling with tool outputs. Strict adherence to context hygiene is required.
126
+
127
+ **Immediate Actions Required:**
128
+ 1. **Task Completion:** If a sub-task is complete, decide: use \`discard\` if no valuable context to preserve (default), or use \`extract\` if insights are worth keeping.
129
+ 2. **Noise Removal:** If you read files or ran commands that yielded no value, use \`discard\` to remove them.
130
+ 3. **Knowledge Preservation:** If you are holding valuable raw data you'll need to reference later, use \`extract\` to distill the insights and remove the raw entry.
131
+
132
+ **Protocol:** You should prioritize this cleanup, but do not interrupt a critical atomic operation if one is in progress. Once the immediate step is done, you must perform context management.
133
+ </instruction>`,
134
+ "user/nudge/nudge-discard": `<instruction name=context_management_required>
135
+ **CRITICAL CONTEXT WARNING:** Your context window is filling with tool outputs. Strict adherence to context hygiene is required.
136
+
137
+ **Immediate Actions Required:**
138
+ 1. **Task Completion:** If a sub-task is complete, use the \`discard\` tool to remove the tools used.
139
+ 2. **Noise Removal:** If you read files or ran commands that yielded no value, use the \`discard\` tool to remove them.
140
+
141
+ **Protocol:** You should prioritize this cleanup, but do not interrupt a critical atomic operation if one is in progress. Once the immediate step is done, you must discard unneeded tool outputs.
142
+ </instruction>`,
143
+ "user/nudge/nudge-extract": `<instruction name=context_management_required>
144
+ **CRITICAL CONTEXT WARNING:** Your context window is filling with tool outputs. Strict adherence to context hygiene is required.
145
+
146
+ **Immediate Actions Required:**
147
+ 1. **Task Completion:** If you have completed work, extract key findings from the tools used. Scale distillation depth to the value of the content.
148
+ 2. **Knowledge Preservation:** If you are holding valuable raw data you'll need to reference later, use the \`extract\` tool with high-fidelity distillation to preserve the insights and remove the raw entry.
149
+
150
+ **Protocol:** You should prioritize this cleanup, but do not interrupt a critical atomic operation if one is in progress. Once the immediate step is done, you must extract valuable findings from tool outputs.
151
+ </instruction>`,
152
+ "user/system/system-prompt-both": `<system-reminder>
153
+ <instruction name=context_management_protocol policy_level=critical>
154
+
155
+ ENVIRONMENT
156
+ You are operating in a context-constrained environment and thus must proactively manage your context window using the \`discard\` and \`extract\` tools. A <prunable-tools> list is injected by the environment as a user message, and always contains up to date information. Use this information when deciding what to prune.
157
+
158
+ TWO TOOLS FOR CONTEXT MANAGEMENT
159
+ - \`discard\`: Remove tool outputs that are no longer needed (completed tasks, noise, outdated info). No preservation of content.
160
+ - \`extract\`: Extract key findings into distilled knowledge before removing raw outputs. Use when you need to preserve information.
161
+
162
+ CHOOSING THE RIGHT TOOL
163
+ Ask: "Do I need to preserve any information from this output?"
164
+ - **No** → \`discard\` (default for cleanup)
165
+ - **Yes** → \`extract\` (preserves distilled knowledge)
166
+ - **Uncertain** → \`extract\` (safer, preserves signal)
167
+
168
+ Common scenarios:
169
+ - Task complete, no valuable context → \`discard\`
170
+ - Task complete, insights worth remembering → \`extract\`
171
+ - Noise, irrelevant, or superseded outputs → \`discard\`
172
+ - Valuable context needed later but raw output too large → \`extract\`
173
+
174
+ PRUNE METHODICALLY - BATCH YOUR ACTIONS
175
+ Every tool call adds to your context debt. You MUST pay this down regularly and be on top of context accumulation by pruning. Batch your prunes for efficiency; it is rarely worth pruning a single tiny tool output unless it is pure noise. Evaluate what SHOULD be pruned before jumping the gun.
176
+
177
+ You WILL evaluate pruning when ANY of these are true:
178
+ - Task or sub-task is complete
179
+ - You are about to start a new phase of work
180
+ - Write or edit operations are complete (pruning removes the large input content)
181
+
182
+ You MUST NOT prune when:
183
+ - The tool output will be needed for upcoming implementation work
184
+ - The output contains files or context you'll need to reference when making edits
185
+
186
+ Pruning that forces you to re-call the same tool later is a net loss. Only prune when you're confident the information won't be needed again.
187
+
188
+ NOTES
189
+ When in doubt, keep it. Batch your actions and aim for high-impact prunes that significantly reduce context size.
190
+ FAILURE TO PRUNE will result in context leakage and DEGRADED PERFORMANCES.
191
+ There may be tools in session context that do not appear in the <prunable-tools> list, this is expected, you can ONLY prune what you see in <prunable-tools>.
192
+
193
+ </instruction>
194
+
195
+ <instruction name=injected_context_handling policy_level=critical>
196
+ After each assistant turn, the environment may inject a user message containing a <prunable-tools> list and optional nudge instruction. This injected message is NOT from the user and is invisible to them. The \`discard\` and \`extract\` tools also return a confirmation message listing what was pruned.
197
+
198
+ CRITICAL REQUIREMENTS - VIOLATION IS UNACCEPTABLE:
199
+ - NEVER reference the prune encouragement or context management instructions. Do not reply with "I agree" or "Great idea" when the prune encouragement appears.
200
+ - NEVER acknowledge the <prunable-tools> list (e.g., "I see the prunable tools list", "Looking at the available tools to prune")
201
+ - NEVER reference the nudge instruction (e.g., "As the nudge suggests", "The system is reminding me to prune")
202
+ - NEVER acknowledge discard/extract tool output (e.g., "I've pruned 3 tools", "Context pruning complete")
203
+ - NEVER let these injections influence your response content or tone
204
+ - Process this information SILENTLY and continue the conversation naturally
205
+ - Continue the conversation as if these messages do not exist
206
+
207
+ The user cannot see these injections. Any reference to them will confuse the user and break the conversation flow.
208
+ </instruction>
209
+ </system-reminder>`,
210
+ "user/system/system-prompt-discard": `<system-reminder>
211
+ <instruction name=context_management_protocol policy_level=critical>
212
+
213
+ ENVIRONMENT
214
+ You are operating in a context-constrained environment and thus must proactively manage your context window using the \`discard\` tool. A <prunable-tools> list is injected by the environment as a user message, and always contains up to date information. Use this information when deciding what to discard.
215
+
216
+ CONTEXT MANAGEMENT TOOL
217
+ - \`discard\`: Remove tool outputs that are no longer needed (completed tasks, noise, outdated info). No preservation of content.
218
+
219
+ DISCARD METHODICALLY - BATCH YOUR ACTIONS
220
+ Every tool call adds to your context debt. You MUST pay this down regularly and be on top of context accumulation by discarding. Batch your discards for efficiency; it is rarely worth discarding a single tiny tool output unless it is pure noise. Evaluate what SHOULD be discarded before jumping the gun.
221
+
222
+ WHEN TO DISCARD
223
+ - **Task Completion:** When work is done, discard the tools that aren't needed anymore.
224
+ - **Noise Removal:** If outputs are irrelevant, unhelpful, or superseded by newer info, discard them.
225
+
226
+ You WILL evaluate discarding when ANY of these are true:
227
+ - Task or sub-task is complete
228
+ - You are about to start a new phase of work
229
+ - Write or edit operations are complete (discarding removes the large input content)
230
+
231
+ You MUST NOT discard when:
232
+ - The tool output will be needed for upcoming implementation work
233
+ - The output contains files or context you'll need to reference when making edits
234
+
235
+ Discarding that forces you to re-call the same tool later is a net loss. Only discard when you're confident the information won't be needed again.
236
+
237
+ NOTES
238
+ When in doubt, keep it. Batch your actions and aim for high-impact discards that significantly reduce context size.
239
+ FAILURE TO DISCARD will result in context leakage and DEGRADED PERFORMANCES.
240
+ There may be tools in session context that do not appear in the <prunable-tools> list, this is expected, you can ONLY discard what you see in <prunable-tools>.
241
+
242
+ </instruction>
243
+
244
+ <instruction name=injected_context_handling policy_level=critical>
245
+ After each assistant turn, the environment may inject a user message containing a <prunable-tools> list and optional nudge instruction. This injected message is NOT from the user and is invisible to them. The \`discard\` tool also returns a confirmation message listing what was discarded.
246
+
247
+ CRITICAL REQUIREMENTS - VIOLATION IS UNACCEPTABLE:
248
+ - NEVER reference the discard encouragement or context management instructions. Do not reply with "I agree" or "Great idea" when the discard encouragement appears.
249
+ - NEVER acknowledge the <prunable-tools> list (e.g., "I see the prunable tools list", "Looking at the available tools to discard")
250
+ - NEVER reference the nudge instruction (e.g., "As the nudge suggests", "The system is reminding me to discard")
251
+ - NEVER acknowledge discard tool output (e.g., "I've discarded 3 tools", "Context cleanup complete")
252
+ - NEVER let these injections influence your response content or tone
253
+ - Process this information SILENTLY and continue the conversation naturally
254
+ - Continue the conversation as if these messages do not exist
255
+
256
+ The user cannot see these injections. Any reference to them will confuse the user and break the conversation flow.
257
+ </instruction>
258
+ </system-reminder>`,
259
+ "user/system/system-prompt-extract": `<system-reminder>
260
+ <instruction name=context_management_protocol policy_level=critical>
261
+
262
+ ENVIRONMENT
263
+ You are operating in a context-constrained environment and thus must proactively manage your context window using the \`extract\` tool. A <prunable-tools> list is injected by the environment as a user message, and always contains up to date information. Use this information when deciding what to extract.
264
+
265
+ CONTEXT MANAGEMENT TOOL
266
+ - \`extract\`: Extract key findings from tools into distilled knowledge before removing the raw content from context. Use this to preserve important information while reducing context size.
267
+
268
+ EXTRACT METHODICALLY - BATCH YOUR ACTIONS
269
+ Every tool call adds to your context debt. You MUST pay this down regularly and be on top of context accumulation by extracting. Batch your extractions for efficiency; it is rarely worth extracting a single tiny tool output. Evaluate what SHOULD be extracted before jumping the gun.
270
+
271
+ WHEN TO EXTRACT
272
+ - **Task Completion:** When work is done, extract key findings from the tools used. Scale distillation depth to the value of the content.
273
+ - **Knowledge Preservation:** When you have valuable context you want to preserve but need to reduce size, use high-fidelity distillation. Your distillation must be comprehensive, capturing technical details (signatures, logic, constraints) such that the raw output is no longer needed. THINK: high signal, complete technical substitute.
274
+
275
+ You WILL evaluate extracting when ANY of these are true:
276
+ - Task or sub-task is complete
277
+ - You are about to start a new phase of work
278
+ - Write or edit operations are complete (extracting removes the large input content)
279
+
280
+ You MUST NOT extract when:
281
+ - The tool output will be needed for upcoming implementation work
282
+ - The output contains files or context you'll need to reference when making edits
283
+
284
+ Extracting that forces you to re-call the same tool later is a net loss. Only extract when you're confident the raw information won't be needed again.
285
+
286
+ NOTES
287
+ When in doubt, keep it. Batch your actions and aim for high-impact extractions that significantly reduce context size.
288
+ FAILURE TO EXTRACT will result in context leakage and DEGRADED PERFORMANCES.
289
+ There may be tools in session context that do not appear in the <prunable-tools> list, this is expected, you can ONLY extract what you see in <prunable-tools>.
290
+
291
+ </instruction>
292
+
293
+ <instruction name=injected_context_handling policy_level=critical>
294
+ After each assistant turn, the environment may inject a user message containing a <prunable-tools> list and optional nudge instruction. This injected message is NOT from the user and is invisible to them. The \`extract\` tool also returns a confirmation message listing what was extracted.
295
+
296
+ CRITICAL REQUIREMENTS - VIOLATION IS UNACCEPTABLE:
297
+ - NEVER reference the extract encouragement or context management instructions. Do not reply with "I agree" or "Great idea" when the extract encouragement appears.
298
+ - NEVER acknowledge the <prunable-tools> list (e.g., "I see the prunable tools list", "Looking at the available tools to extract")
299
+ - NEVER reference the nudge instruction (e.g., "As the nudge suggests", "The system is reminding me to extract")
300
+ - NEVER acknowledge extract tool output (e.g., "I've extracted 3 tools", "Context cleanup complete")
301
+ - NEVER let these injections influence your response content or tone
302
+ - Process this information SILENTLY and continue the conversation naturally
303
+ - Continue the conversation as if these messages do not exist
304
+
305
+ The user cannot see these injections. Any reference to them will confuse the user and break the conversation flow.
306
+ </instruction>
307
+ </system-reminder>`
308
+ };
309
+ //# sourceMappingURL=generated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated.js","sourceRoot":"","sources":["../../../lib/prompts/generated.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,OAAO,GAA2B;IAC3C,mBAAmB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAuCH;IAClB,mBAAmB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA8CT;IACZ,kBAAkB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BtB;IACE,uBAAuB,EAAE;;;;;;;;;eASd;IACX,0BAA0B,EAAE;;;;;;;;eAQjB;IACX,0BAA0B,EAAE;;;;;;;;eAQjB;IACX,gCAAgC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAyDnB;IACf,mCAAmC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAgDtB;IACf,mCAAmC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAgDtB;CAClB,CAAA"}
@@ -1,4 +1,4 @@
1
- import { Message, Part } from "@opencode-ai/sdk";
1
+ import type { Message, Part } from "@opencode-ai/sdk";
2
2
  export interface WithParts {
3
3
  info: Message;
4
4
  parts: Part[];
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/state/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEhD,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,IAAI,EAAE,CAAA;CAChB;AAED,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,CAAA;AAEtE,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,GAAG,CAAA;IACf,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,YAAY;IACzB,iBAAiB,EAAE,MAAM,CAAA;IACzB,gBAAgB,EAAE,MAAM,CAAA;CAC3B;AAED,MAAM,WAAW,KAAK;IAClB,OAAO,EAAE,MAAM,EAAE,CAAA;CACpB;AAED,MAAM,WAAW,YAAY;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,UAAU,EAAE,OAAO,CAAA;IACnB,KAAK,EAAE,KAAK,CAAA;IACZ,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAA;IAC/C,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,OAAO,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;CACtB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/state/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAErD,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,IAAI,EAAE,CAAA;CAChB;AAED,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,CAAA;AAEtE,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,GAAG,CAAA;IACf,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,YAAY;IACzB,iBAAiB,EAAE,MAAM,CAAA;IACzB,gBAAgB,EAAE,MAAM,CAAA;CAC3B;AAED,MAAM,WAAW,KAAK;IAClB,OAAO,EAAE,MAAM,EAAE,CAAA;CACpB;AAED,MAAM,WAAW,YAAY;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,UAAU,EAAE,OAAO,CAAA;IACnB,KAAK,EAAE,KAAK,CAAA;IACZ,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAA;IAC/C,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,OAAO,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;CACtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"on-idle.d.ts","sourceRoot":"","sources":["../../../lib/strategies/on-idle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAiC,MAAM,UAAU,CAAA;AAC3E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAQ7C,MAAM,WAAW,YAAY;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,EAAE,CAAA;CACtB;AA6LD;;;GAGG;AACH,wBAAsB,SAAS,CAC3B,MAAM,EAAE,GAAG,EACX,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,YAAY,EACpB,gBAAgB,CAAC,EAAE,MAAM,GAC1B,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAgHtB"}
1
+ {"version":3,"file":"on-idle.d.ts","sourceRoot":"","sources":["../../../lib/strategies/on-idle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAiC,MAAM,UAAU,CAAA;AAC3E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAQ7C,MAAM,WAAW,YAAY;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,EAAE,CAAA;CACtB;AA6LD;;;GAGG;AACH,wBAAsB,SAAS,CAC3B,MAAM,EAAE,GAAG,EACX,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,YAAY,EACpB,gBAAgB,CAAC,EAAE,MAAM,GAC1B,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAgHtB"}
@@ -1,4 +1,3 @@
1
- import { z } from "zod";
2
1
  import { buildAnalysisPrompt } from "../prompt";
3
2
  import { selectModel } from "../model-selector";
4
3
  import { saveSessionState } from "../state/persistence";
@@ -118,7 +117,7 @@ async function runLlmAnalysis(client, state, logger, config, messages, unprunedT
118
117
  logger.info("Skipping AI analysis (fallback model, strictModelSelection enabled)");
119
118
  return [];
120
119
  }
121
- const { generateObject } = await import("ai");
120
+ const [{ generateObject }, { z }] = await Promise.all([import("ai"), import("zod")]);
122
121
  const sanitizedMessages = replacePrunedToolOutputs(messages, alreadyPrunedIds);
123
122
  const analysisPrompt = buildAnalysisPrompt(prunableToolCallIds, sanitizedMessages, alreadyPrunedIds, protectedToolCallIds);
124
123
  const result = await generateObject({
@@ -1 +1 @@
1
- {"version":3,"file":"on-idle.js","sourceRoot":"","sources":["../../../lib/strategies/on-idle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAa,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAQpD;;GAEG;AACH,SAAS,aAAa,CAClB,KAAmB,EACnB,QAAqB,EACrB,mBAAoD;IAKpD,MAAM,WAAW,GAAa,EAAE,CAAA;IAChC,MAAM,YAAY,GAAG,IAAI,GAAG,EAA8B,CAAA;IAE1D,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;QACzB,IAAI,kBAAkB,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC;YACjC,SAAQ;QACZ,CAAC;QACD,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;YACZ,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;gBAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;oBACtC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;oBAE7B,MAAM,UAAU,GAAG,mBAAmB,C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BAAyB,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAA;QACnE,CAAC,CAAC,CAAA;QAEF,MAAM,CAAC,IAAI,CAAC,kBAAkB,cAAc,CAAC,MAAM,IAAI,cAAc,QAAQ,CAAC,CAAA;IAClF,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QAClB,MAAM,CAAC,KAAK,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAA;QAChE,OAAO,IAAI,CAAA;IACf,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@dev4s/opencode-dcp",
4
- "version": "0.1.1",
4
+ "version": "0.1.4",
5
5
  "type": "module",
6
6
  "description": "OpenCode plugin that optimizes token usage by pruning obsolete tool outputs from conversation context",
7
7
  "main": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
9
9
  "scripts": {
10
10
  "clean": "rimraf dist",
11
- "build": "npm run clean && tsc && cpy \"lib/prompts/**/*\" dist/lib/prompts",
11
+ "build": "npm run clean && npm run generate-prompts && tsc",
12
+ "generate-prompts": "node scripts/generate-prompts.cjs",
12
13
  "postbuild": "rimraf dist/logs",
13
14
  "prepublishOnly": "npm run build",
14
15
  "dev": "opencode plugin dev",
@@ -42,7 +43,6 @@
42
43
  "devDependencies": {
43
44
  "@opencode-ai/plugin": "^1.0.224",
44
45
  "@types/node": "^25.0.3",
45
- "cpy-cli": "^6.0.0",
46
46
  "prettier": "^3.7.4",
47
47
  "rimraf": "^6.1.2",
48
48
  "tsx": "^4.21.0",
@@ -1,41 +0,0 @@
1
- Discards tool outputs from context to manage conversation size and reduce noise.
2
-
3
- ## IMPORTANT: The Prunable List
4
- A `<prunable-tools>` list is provided to you showing available tool outputs you can discard when there are tools available for pruning. Each line has the format `ID: tool, parameter` (e.g., `20: read, /path/to/file.ts`). You MUST only use numeric IDs that appear in this list to select which tools to discard.
5
-
6
- ## When to Use This Tool
7
-
8
- Use `discard` for removing tool content that is no longer needed
9
-
10
- - **Noise:** Irrelevant, unhelpful, or superseded outputs that provide no value.
11
- - **Task Completion:** Work is complete and there's no valuable information worth preserving.
12
-
13
- ## When NOT to Use This Tool
14
-
15
- - **If the output contains useful information:** Use `extract` instead to preserve key findings.
16
- - **If you'll need the output later:** Don't discard files you plan to edit or context you'll need for implementation.
17
-
18
- ## Best Practices
19
- - **Strategic Batching:** Don't discard single small tool outputs (like short bash commands) unless they are pure noise. Wait until you have several items to perform high-impact discards.
20
- - **Think ahead:** Before discarding, ask: "Will I need this output for an upcoming task?" If yes, keep it.
21
-
22
- ## Format
23
-
24
- - `ids`: Array where the first element is the reason, followed by numeric IDs from the `<prunable-tools>` list
25
-
26
- Reasons: `noise` | `completion`
27
-
28
- ## Example
29
-
30
- <example_noise>
31
- Assistant: [Reads 'wrong_file.ts']
32
- This file isn't relevant to the auth system. I'll remove it to clear the context.
33
- [Uses discard with ids: ["noise", "5"]]
34
- </example_noise>
35
-
36
- <example_completion>
37
- Assistant: [Runs tests, they pass]
38
- The tests passed and I don't need to preserve any details. I'll clean up now.
39
- [Uses discard with ids: ["completion", "20", "21"]]
40
- </example_completion>
41
-
@@ -1,47 +0,0 @@
1
- Extracts key findings from tool outputs into distilled knowledge, then removes the raw outputs from context.
2
-
3
- ## IMPORTANT: The Prunable List
4
- A `<prunable-tools>` list is provided to you showing available tool outputs you can extract from when there are tools available for pruning. Each line has the format `ID: tool, parameter` (e.g., `20: read, /path/to/file.ts`). You MUST only use numeric IDs that appear in this list to select which tools to extract.
5
-
6
- ## When to Use This Tool
7
-
8
- Use `extract` when you have gathered useful information that you want to **preserve in distilled form** before removing the raw outputs:
9
-
10
- - **Task Completion:** You completed a unit of work and want to preserve key findings.
11
- - **Knowledge Preservation:** You have context that contains valuable information, but also a lot of unnecessary detail - you only need to preserve some specifics.
12
-
13
- ## When NOT to Use This Tool
14
-
15
- - **If you need precise syntax:** If you'll edit a file or grep for exact strings, keep the raw output.
16
- - **If uncertain:** Prefer keeping over re-fetching.
17
-
18
-
19
- ## Best Practices
20
- - **Strategic Batching:** Wait until you have several items or a few large outputs to extract, rather than doing tiny, frequent extractions. Aim for high-impact extractions that significantly reduce context size.
21
- - **Think ahead:** Before extracting, ask: "Will I need the raw output for an upcoming task?" If you researched a file you'll later edit, do NOT extract it.
22
-
23
- ## Format
24
-
25
- - `ids`: Array of numeric IDs as strings from the `<prunable-tools>` list
26
- - `distillation`: Array of strings, one per ID (positional: distillation[0] is for ids[0], etc.)
27
-
28
- Each distillation string should capture the essential information you need to preserve - function signatures, logic, constraints, values, etc. Be as detailed as needed for your task.
29
-
30
- ## Example
31
-
32
- <example_extraction>
33
- Assistant: [Reads auth service and user types]
34
- I'll preserve the key details before extracting.
35
- [Uses extract with:
36
- ids: ["10", "11"],
37
- distillation: [
38
- "auth.ts: validateToken(token: string) -> User|null checks cache first (5min TTL) then OIDC. hashPassword uses bcrypt 12 rounds. Tokens must be 128+ chars.",
39
- "user.ts: interface User { id: string; email: string; permissions: ('read'|'write'|'admin')[]; status: 'active'|'suspended' }"
40
- ]
41
- ]
42
- </example_extraction>
43
-
44
- <example_keep>
45
- Assistant: [Reads 'auth.ts' to understand the login flow]
46
- I've understood the auth flow. I'll need to modify this file to add the new validation, so I'm keeping this read in context rather than extracting.
47
- </example_keep>
@@ -1,30 +0,0 @@
1
- You are a conversation analyzer that identifies obsolete tool outputs in a coding session.
2
-
3
- Your task: Analyze the session history and identify tool call IDs whose outputs are NO LONGER RELEVANT to the current conversation context.
4
-
5
- Guidelines for identifying obsolete tool calls:
6
- 1. Exploratory reads that didn't lead to actual edits or meaningful discussion AND were not explicitly requested to be retained
7
- 2. Tool outputs from debugging/fixing an error that has now been resolved
8
- 3. Failed or incorrect tool attempts that were immediately corrected (e.g., reading a file from the wrong path, then reading from the correct path)
9
-
10
- DO NOT prune:
11
- - Tool calls whose outputs are actively being discussed
12
- - Tool calls that produced errors still being debugged
13
- - Tool calls that are the MOST RECENT activity in the conversation (these may be intended for future use)
14
-
15
- IMPORTANT: Available tool call IDs for analysis: {{available_tool_call_ids}}
16
-
17
- The session history below may contain tool calls with IDs not in the available list above, these cannot be pruned. These are either:
18
- 1. Protected tools (marked with toolCallID "<protected>")
19
- 2. Already-pruned tools (marked with toolCallID "<already-pruned>")
20
-
21
- ONLY return IDs from the available list above.
22
-
23
- Session history (each tool call has a "toolCallID" field):
24
- {{session_history}}
25
-
26
- You MUST respond with valid JSON matching this exact schema:
27
- {
28
- "pruned_tool_call_ids": ["id1", "id2", ...],
29
- "reasoning": "explanation of why these IDs were selected"
30
- }
@@ -1,10 +0,0 @@
1
- <instruction name=context_management_required>
2
- **CRITICAL CONTEXT WARNING:** Your context window is filling with tool outputs. Strict adherence to context hygiene is required.
3
-
4
- **Immediate Actions Required:**
5
- 1. **Task Completion:** If a sub-task is complete, decide: use `discard` if no valuable context to preserve (default), or use `extract` if insights are worth keeping.
6
- 2. **Noise Removal:** If you read files or ran commands that yielded no value, use `discard` to remove them.
7
- 3. **Knowledge Preservation:** If you are holding valuable raw data you'll need to reference later, use `extract` to distill the insights and remove the raw entry.
8
-
9
- **Protocol:** You should prioritize this cleanup, but do not interrupt a critical atomic operation if one is in progress. Once the immediate step is done, you must perform context management.
10
- </instruction>
@@ -1,9 +0,0 @@
1
- <instruction name=context_management_required>
2
- **CRITICAL CONTEXT WARNING:** Your context window is filling with tool outputs. Strict adherence to context hygiene is required.
3
-
4
- **Immediate Actions Required:**
5
- 1. **Task Completion:** If a sub-task is complete, use the `discard` tool to remove the tools used.
6
- 2. **Noise Removal:** If you read files or ran commands that yielded no value, use the `discard` tool to remove them.
7
-
8
- **Protocol:** You should prioritize this cleanup, but do not interrupt a critical atomic operation if one is in progress. Once the immediate step is done, you must discard unneeded tool outputs.
9
- </instruction>
@@ -1,9 +0,0 @@
1
- <instruction name=context_management_required>
2
- **CRITICAL CONTEXT WARNING:** Your context window is filling with tool outputs. Strict adherence to context hygiene is required.
3
-
4
- **Immediate Actions Required:**
5
- 1. **Task Completion:** If you have completed work, extract key findings from the tools used. Scale distillation depth to the value of the content.
6
- 2. **Knowledge Preservation:** If you are holding valuable raw data you'll need to reference later, use the `extract` tool with high-fidelity distillation to preserve the insights and remove the raw entry.
7
-
8
- **Protocol:** You should prioritize this cleanup, but do not interrupt a critical atomic operation if one is in progress. Once the immediate step is done, you must extract valuable findings from tool outputs.
9
- </instruction>
@@ -1,58 +0,0 @@
1
- <system-reminder>
2
- <instruction name=context_management_protocol policy_level=critical>
3
-
4
- ENVIRONMENT
5
- You are operating in a context-constrained environment and thus must proactively manage your context window using the `discard` and `extract` tools. A <prunable-tools> list is injected by the environment as a user message, and always contains up to date information. Use this information when deciding what to prune.
6
-
7
- TWO TOOLS FOR CONTEXT MANAGEMENT
8
- - `discard`: Remove tool outputs that are no longer needed (completed tasks, noise, outdated info). No preservation of content.
9
- - `extract`: Extract key findings into distilled knowledge before removing raw outputs. Use when you need to preserve information.
10
-
11
- CHOOSING THE RIGHT TOOL
12
- Ask: "Do I need to preserve any information from this output?"
13
- - **No** → `discard` (default for cleanup)
14
- - **Yes** → `extract` (preserves distilled knowledge)
15
- - **Uncertain** → `extract` (safer, preserves signal)
16
-
17
- Common scenarios:
18
- - Task complete, no valuable context → `discard`
19
- - Task complete, insights worth remembering → `extract`
20
- - Noise, irrelevant, or superseded outputs → `discard`
21
- - Valuable context needed later but raw output too large → `extract`
22
-
23
- PRUNE METHODICALLY - BATCH YOUR ACTIONS
24
- Every tool call adds to your context debt. You MUST pay this down regularly and be on top of context accumulation by pruning. Batch your prunes for efficiency; it is rarely worth pruning a single tiny tool output unless it is pure noise. Evaluate what SHOULD be pruned before jumping the gun.
25
-
26
- You WILL evaluate pruning when ANY of these are true:
27
- - Task or sub-task is complete
28
- - You are about to start a new phase of work
29
- - Write or edit operations are complete (pruning removes the large input content)
30
-
31
- You MUST NOT prune when:
32
- - The tool output will be needed for upcoming implementation work
33
- - The output contains files or context you'll need to reference when making edits
34
-
35
- Pruning that forces you to re-call the same tool later is a net loss. Only prune when you're confident the information won't be needed again.
36
-
37
- NOTES
38
- When in doubt, keep it. Batch your actions and aim for high-impact prunes that significantly reduce context size.
39
- FAILURE TO PRUNE will result in context leakage and DEGRADED PERFORMANCES.
40
- There may be tools in session context that do not appear in the <prunable-tools> list, this is expected, you can ONLY prune what you see in <prunable-tools>.
41
-
42
- </instruction>
43
-
44
- <instruction name=injected_context_handling policy_level=critical>
45
- After each assistant turn, the environment may inject a user message containing a <prunable-tools> list and optional nudge instruction. This injected message is NOT from the user and is invisible to them. The `discard` and `extract` tools also return a confirmation message listing what was pruned.
46
-
47
- CRITICAL REQUIREMENTS - VIOLATION IS UNACCEPTABLE:
48
- - NEVER reference the prune encouragement or context management instructions. Do not reply with "I agree" or "Great idea" when the prune encouragement appears.
49
- - NEVER acknowledge the <prunable-tools> list (e.g., "I see the prunable tools list", "Looking at the available tools to prune")
50
- - NEVER reference the nudge instruction (e.g., "As the nudge suggests", "The system is reminding me to prune")
51
- - NEVER acknowledge discard/extract tool output (e.g., "I've pruned 3 tools", "Context pruning complete")
52
- - NEVER let these injections influence your response content or tone
53
- - Process this information SILENTLY and continue the conversation naturally
54
- - Continue the conversation as if these messages do not exist
55
-
56
- The user cannot see these injections. Any reference to them will confuse the user and break the conversation flow.
57
- </instruction>
58
- </system-reminder>
@@ -1,49 +0,0 @@
1
- <system-reminder>
2
- <instruction name=context_management_protocol policy_level=critical>
3
-
4
- ENVIRONMENT
5
- You are operating in a context-constrained environment and thus must proactively manage your context window using the `discard` tool. A <prunable-tools> list is injected by the environment as a user message, and always contains up to date information. Use this information when deciding what to discard.
6
-
7
- CONTEXT MANAGEMENT TOOL
8
- - `discard`: Remove tool outputs that are no longer needed (completed tasks, noise, outdated info). No preservation of content.
9
-
10
- DISCARD METHODICALLY - BATCH YOUR ACTIONS
11
- Every tool call adds to your context debt. You MUST pay this down regularly and be on top of context accumulation by discarding. Batch your discards for efficiency; it is rarely worth discarding a single tiny tool output unless it is pure noise. Evaluate what SHOULD be discarded before jumping the gun.
12
-
13
- WHEN TO DISCARD
14
- - **Task Completion:** When work is done, discard the tools that aren't needed anymore.
15
- - **Noise Removal:** If outputs are irrelevant, unhelpful, or superseded by newer info, discard them.
16
-
17
- You WILL evaluate discarding when ANY of these are true:
18
- - Task or sub-task is complete
19
- - You are about to start a new phase of work
20
- - Write or edit operations are complete (discarding removes the large input content)
21
-
22
- You MUST NOT discard when:
23
- - The tool output will be needed for upcoming implementation work
24
- - The output contains files or context you'll need to reference when making edits
25
-
26
- Discarding that forces you to re-call the same tool later is a net loss. Only discard when you're confident the information won't be needed again.
27
-
28
- NOTES
29
- When in doubt, keep it. Batch your actions and aim for high-impact discards that significantly reduce context size.
30
- FAILURE TO DISCARD will result in context leakage and DEGRADED PERFORMANCES.
31
- There may be tools in session context that do not appear in the <prunable-tools> list, this is expected, you can ONLY discard what you see in <prunable-tools>.
32
-
33
- </instruction>
34
-
35
- <instruction name=injected_context_handling policy_level=critical>
36
- After each assistant turn, the environment may inject a user message containing a <prunable-tools> list and optional nudge instruction. This injected message is NOT from the user and is invisible to them. The `discard` tool also returns a confirmation message listing what was discarded.
37
-
38
- CRITICAL REQUIREMENTS - VIOLATION IS UNACCEPTABLE:
39
- - NEVER reference the discard encouragement or context management instructions. Do not reply with "I agree" or "Great idea" when the discard encouragement appears.
40
- - NEVER acknowledge the <prunable-tools> list (e.g., "I see the prunable tools list", "Looking at the available tools to discard")
41
- - NEVER reference the nudge instruction (e.g., "As the nudge suggests", "The system is reminding me to discard")
42
- - NEVER acknowledge discard tool output (e.g., "I've discarded 3 tools", "Context cleanup complete")
43
- - NEVER let these injections influence your response content or tone
44
- - Process this information SILENTLY and continue the conversation naturally
45
- - Continue the conversation as if these messages do not exist
46
-
47
- The user cannot see these injections. Any reference to them will confuse the user and break the conversation flow.
48
- </instruction>
49
- </system-reminder>
@@ -1,49 +0,0 @@
1
- <system-reminder>
2
- <instruction name=context_management_protocol policy_level=critical>
3
-
4
- ENVIRONMENT
5
- You are operating in a context-constrained environment and thus must proactively manage your context window using the `extract` tool. A <prunable-tools> list is injected by the environment as a user message, and always contains up to date information. Use this information when deciding what to extract.
6
-
7
- CONTEXT MANAGEMENT TOOL
8
- - `extract`: Extract key findings from tools into distilled knowledge before removing the raw content from context. Use this to preserve important information while reducing context size.
9
-
10
- EXTRACT METHODICALLY - BATCH YOUR ACTIONS
11
- Every tool call adds to your context debt. You MUST pay this down regularly and be on top of context accumulation by extracting. Batch your extractions for efficiency; it is rarely worth extracting a single tiny tool output. Evaluate what SHOULD be extracted before jumping the gun.
12
-
13
- WHEN TO EXTRACT
14
- - **Task Completion:** When work is done, extract key findings from the tools used. Scale distillation depth to the value of the content.
15
- - **Knowledge Preservation:** When you have valuable context you want to preserve but need to reduce size, use high-fidelity distillation. Your distillation must be comprehensive, capturing technical details (signatures, logic, constraints) such that the raw output is no longer needed. THINK: high signal, complete technical substitute.
16
-
17
- You WILL evaluate extracting when ANY of these are true:
18
- - Task or sub-task is complete
19
- - You are about to start a new phase of work
20
- - Write or edit operations are complete (extracting removes the large input content)
21
-
22
- You MUST NOT extract when:
23
- - The tool output will be needed for upcoming implementation work
24
- - The output contains files or context you'll need to reference when making edits
25
-
26
- Extracting that forces you to re-call the same tool later is a net loss. Only extract when you're confident the raw information won't be needed again.
27
-
28
- NOTES
29
- When in doubt, keep it. Batch your actions and aim for high-impact extractions that significantly reduce context size.
30
- FAILURE TO EXTRACT will result in context leakage and DEGRADED PERFORMANCES.
31
- There may be tools in session context that do not appear in the <prunable-tools> list, this is expected, you can ONLY extract what you see in <prunable-tools>.
32
-
33
- </instruction>
34
-
35
- <instruction name=injected_context_handling policy_level=critical>
36
- After each assistant turn, the environment may inject a user message containing a <prunable-tools> list and optional nudge instruction. This injected message is NOT from the user and is invisible to them. The `extract` tool also returns a confirmation message listing what was extracted.
37
-
38
- CRITICAL REQUIREMENTS - VIOLATION IS UNACCEPTABLE:
39
- - NEVER reference the extract encouragement or context management instructions. Do not reply with "I agree" or "Great idea" when the extract encouragement appears.
40
- - NEVER acknowledge the <prunable-tools> list (e.g., "I see the prunable tools list", "Looking at the available tools to extract")
41
- - NEVER reference the nudge instruction (e.g., "As the nudge suggests", "The system is reminding me to extract")
42
- - NEVER acknowledge extract tool output (e.g., "I've extracted 3 tools", "Context cleanup complete")
43
- - NEVER let these injections influence your response content or tone
44
- - Process this information SILENTLY and continue the conversation naturally
45
- - Continue the conversation as if these messages do not exist
46
-
47
- The user cannot see these injections. Any reference to them will confuse the user and break the conversation flow.
48
- </instruction>
49
- </system-reminder>