@lexwdex-org/opencode-dcp 3.4.4 → 3.4.5

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":"utils.d.ts","sourceRoot":"","sources":["../../../../lib/messages/inject/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAMhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEzD,OAAO,EACH,KAAK,sBAAsB,EAG9B,MAAM,aAAa,CAAA;AAapB,MAAM,WAAW,oBAAoB;IACjC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;CAC9B;AAED,MAAM,WAAW,qBAAqB;IAClC,OAAO,EAAE,SAAS,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;CAChB;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAE/D;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAExE;AAED,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,SAAS,EAAE,GAAG,qBAAqB,GAAG,IAAI,CAU7F;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAYpF;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,SAAS,EAAE,GAAG,oBAAoB,CAcxE;AA+CD,wBAAgB,mBAAmB,CAC/B,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,YAAY,EACnB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,QAAQ,EAAE,SAAS,EAAE;;;EA0Bx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YAAY,CAAC,QAAQ,EAAE,SAAS,EAAE,GAAG,oBAAoB,CAcxE;AA+CD,wBAAgB,mBAAmB,CAC/B,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,YAAY,EACnB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,QAAQ,EAAE,SAAS,EAAE;;;EA0BxB;AAED,wBAAgB,SAAS,CACrB,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,EAC7B,eAAe,EAAE,MAAM,EACvB,kBAAkB,EAAE,MAAM,EAC1B,QAAQ,EAAE,SAAS,EAAE,EACrB,QAAQ,EAAE,MAAM,GACjB,OAAO,CAsBT;AA2ID,wBAAgB,mBAAmB,CAC/B,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,SAAS,EAAE,EACrB,OAAO,EAAE,cAAc,EACvB,qBAAqB,CAAC,EAAE,sBAAsB,GAC/C,IAAI,CAoDN"}
@@ -1,5 +1,6 @@
1
- import type { SessionState } from "../../state";
1
+ import type { SessionState, WithParts } from "../../state";
2
2
  export declare function buildCompressedBlockGuidance(state: SessionState): string;
3
+ export declare function buildAvailableMessageIdGuidance(state: SessionState, messages: WithParts[]): string;
3
4
  export declare function renderMessagePriorityGuidance(priorityLabel: string, refs: string[]): string;
4
5
  export declare function appendGuidanceToDcpTag(nudgeText: string, guidance: string): string;
5
6
  //# sourceMappingURL=nudge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nudge.d.ts","sourceRoot":"","sources":["../../../../lib/prompts/extensions/nudge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAaxE;AAED,wBAAgB,6BAA6B,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAW3F;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAelF"}
1
+ {"version":3,"file":"nudge.d.ts","sourceRoot":"","sources":["../../../../lib/prompts/extensions/nudge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAI1D,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAaxE;AAED,wBAAgB,+BAA+B,CAC3C,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,SAAS,EAAE,GACtB,MAAM,CAkCR;AAED,wBAAgB,6BAA6B,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAW3F;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAelF"}
@@ -1,2 +1,2 @@
1
- export declare const SYSTEM = "\nYou run in a context-limited environment. Manage context actively to avoid accumulation and keep retrieval quality high.\n\nYour only context-management tool is `compress`. It replaces older conversation content with a technical summary you generate.\n\nHard constraints\n- Context management is done ONLY by calling `compress`. Never produce summaries in plain text.\n- NEVER output `<summary>` or `<analysis>` XML tags in text responses \u2014 they cause system errors.\n- If context needs compression, call `compress`. Do not write summaries inline.\n- Use Markdown headings (e.g. `## Analysis`, `## Summary`) to organize information. Never use XML tags.\n\n`` and `` are environment-injected metadata. Do not output them.\n\nWhen to compress\n\nHIGHEST-PRIORITY HARD TRIGGER \u2014 call `compress` immediately whenever the conversation TOPIC changes. Compress the previous topic's finished context into a summary.\n\nA topic change is an objective, low-judgment signal, not a subjective call. Any of these counts:\n\n- The user raises a task or question unrelated to the previous one\n- The focus shifts from one module/file/feature to another\n- The goal shifts from explore/research \u2192 implement, or implement \u2192 debug/verify\n- A distinct problem is resolved and you move to the next\n\nWhen any occurs, compress the finished range of the previous topic at once. Do not wait. This is the single most effective way to keep context clear.\n\nAlso compress (when a section genuinely closes even without a topic change):\n\n- Research is done and findings are settled\n- Implementation is complete and verified\n- Exploration is exhausted and patterns understood\n- Dead-end noise can be dropped without waiting for the whole section to close\n\nDo NOT compress when:\n\n- Raw context is still needed for editing or exact reference\n- The target work is actively in progress\n- You may need the exact code, error message, or file content in the next steps\n\nAsk yourself before compressing: _\"Is this section closed enough to be summary-only?\"_\n\nIf the answer is \"the topic switched, the old content is no longer needed\" \u2014 the answer is always yes.\n\nPeriodically assess the conversation's signal-to-noise ratio. Use `compress` deliberately and provide high-quality summaries. Prioritize stale content to maintain a high-signal context window.\n\nKeeping a sharp, high-quality context window for best performance is your responsibility.\n";
1
+ export declare const SYSTEM = "\nYou run in a context-limited environment. Manage context actively to avoid accumulation and keep retrieval quality high.\n\nYour only context-management tool is `compress`. It replaces older conversation content with a technical summary you generate.\n\nHard constraints\n- Context management is done ONLY by calling `compress`. Never produce summaries in plain text.\n- NEVER output `<summary>` or `<analysis>` XML tags in text responses \u2014 they cause system errors.\n- If context needs compression, call `compress`. Do not write summaries inline.\n- Use Markdown headings (e.g. `## Analysis`, `## Summary`) to organize information. Never use XML tags.\n\n`<dcp-message-id>` and `<dcp-system-reminder>` are environment-injected metadata. Do not output them.\n\nWhen to compress\n\nHIGHEST-PRIORITY HARD TRIGGER \u2014 call `compress` immediately whenever the conversation TOPIC changes. Compress the previous topic's finished context into a summary.\n\nA topic change is an objective, low-judgment signal, not a subjective call. Any of these counts:\n\n- The user raises a task or question unrelated to the previous one\n- The focus shifts from one module/file/feature to another\n- The goal shifts from explore/research \u2192 implement, or implement \u2192 debug/verify\n- A distinct problem is resolved and you move to the next\n\nWhen any occurs, compress the finished range of the previous topic at once. Do not wait. This is the single most effective way to keep context clear.\n\nAlso compress (when a section genuinely closes even without a topic change):\n\n- Research is done and findings are settled\n- Implementation is complete and verified\n- Exploration is exhausted and patterns understood\n- Dead-end noise can be dropped without waiting for the whole section to close\n\nDo NOT compress when:\n\n- Raw context is still needed for editing or exact reference\n- The target work is actively in progress\n- You may need the exact code, error message, or file content in the next steps\n\nAsk yourself before compressing: _\"Is this section closed enough to be summary-only?\"_\n\nIf the answer is \"the topic switched, the old content is no longer needed\" \u2014 the answer is always yes.\n\nPeriodically assess the conversation's signal-to-noise ratio. Use `compress` deliberately and provide high-quality summaries. Prioritize stale content to maintain a high-signal context window.\n\nKeeping a sharp, high-quality context window for best performance is your responsibility.\n";
2
2
  //# sourceMappingURL=system.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../lib/prompts/system.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,q6EA8ClB,CAAA"}
1
+ {"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../lib/prompts/system.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,08EA8ClB,CAAA"}
@@ -17,6 +17,6 @@ export declare function createPruneMessagesState(): PruneMessagesState;
17
17
  export declare function loadPruneMessagesState(persisted?: PersistedPruneMessagesState): PruneMessagesState;
18
18
  export declare function collectTurnNudgeAnchors(messages: WithParts[]): Set<string>;
19
19
  export declare function getActiveSummaryTokenUsage(state: SessionState): number;
20
- export declare function resetOnCompaction(state: SessionState): void;
20
+ export declare function resetOnCompaction(state: SessionState, messages?: WithParts[]): void;
21
21
  export {};
22
22
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../lib/state/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,YAAY,EACZ,SAAS,EACZ,MAAM,SAAS,CAAA;AAKhB,eAAO,MAAM,kBAAkB,GAAI,OAAO,YAAY,EAAE,KAAK,SAAS,KAAG,OAaxE,CAAA;AAED,UAAU,2BAA2B;IACjC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAA;I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AevF"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@lexwdex-org/opencode-dcp",
4
- "version": "3.4.4",
4
+ "version": "3.4.5",
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",