@tarquinen/opencode-dcp 1.1.2-beta.0 → 1.1.2
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.
- package/README.md +26 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -16
- package/dist/index.js.map +1 -1
- package/dist/lib/config.d.ts +7 -1
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +65 -6
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/hooks.d.ts.map +1 -1
- package/dist/lib/hooks.js +2 -1
- package/dist/lib/hooks.js.map +1 -1
- package/dist/lib/messages/prune.d.ts.map +1 -1
- package/dist/lib/messages/prune.js +51 -37
- package/dist/lib/messages/prune.js.map +1 -1
- package/dist/lib/messages/utils.d.ts +0 -1
- package/dist/lib/messages/utils.d.ts.map +1 -1
- package/dist/lib/messages/utils.js +14 -27
- package/dist/lib/messages/utils.js.map +1 -1
- package/dist/lib/shared-utils.d.ts +0 -1
- package/dist/lib/shared-utils.d.ts.map +1 -1
- package/dist/lib/shared-utils.js +0 -9
- package/dist/lib/shared-utils.js.map +1 -1
- package/dist/lib/state/state.d.ts.map +1 -1
- package/dist/lib/state/state.js +0 -2
- package/dist/lib/state/state.js.map +1 -1
- package/dist/lib/state/types.d.ts +0 -1
- package/dist/lib/state/types.d.ts.map +1 -1
- package/dist/lib/strategies/index.d.ts +1 -0
- package/dist/lib/strategies/index.d.ts.map +1 -1
- package/dist/lib/strategies/index.js +1 -0
- package/dist/lib/strategies/index.js.map +1 -1
- package/dist/lib/strategies/purge-errors.d.ts +13 -0
- package/dist/lib/strategies/purge-errors.d.ts.map +1 -0
- package/dist/lib/strategies/purge-errors.js +54 -0
- package/dist/lib/strategies/purge-errors.js.map +1 -0
- package/dist/lib/strategies/tools.d.ts.map +1 -1
- package/dist/lib/strategies/tools.js +3 -6
- package/dist/lib/strategies/tools.js.map +1 -1
- package/dist/lib/ui/notification.d.ts +2 -3
- package/dist/lib/ui/notification.d.ts.map +1 -1
- package/dist/lib/ui/notification.js +13 -36
- package/dist/lib/ui/notification.js.map +1 -1
- package/dist/lib/ui/utils.d.ts +2 -0
- package/dist/lib/ui/utils.d.ts.map +1 -1
- package/dist/lib/ui/utils.js +14 -0
- package/dist/lib/ui/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/lib/prompts/assistant/nudge/nudge-both.txt +0 -10
- package/dist/lib/prompts/assistant/nudge/nudge-discard.txt +0 -9
- package/dist/lib/prompts/assistant/nudge/nudge-extract.txt +0 -9
- package/dist/lib/prompts/assistant/system/system-prompt-both.txt +0 -44
- package/dist/lib/prompts/assistant/system/system-prompt-discard.txt +0 -36
- package/dist/lib/prompts/assistant/system/system-prompt-extract.txt +0 -36
|
@@ -1,44 +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 an assistant 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: "Is this output clearly noise or irrelevant?"
|
|
13
|
-
- **Yes** → `discard` (pure cleanup, no preservation)
|
|
14
|
-
- **No** → `extract` (default - preserves key findings)
|
|
15
|
-
|
|
16
|
-
Common scenarios:
|
|
17
|
-
- Task complete, no valuable context → `discard`
|
|
18
|
-
- Task complete, insights worth remembering → `extract`
|
|
19
|
-
- Noise, irrelevant, or superseded outputs → `discard`
|
|
20
|
-
- Valuable context needed later but raw output too large → `extract`
|
|
21
|
-
|
|
22
|
-
PRUNE METHODICALLY - BATCH YOUR ACTIONS
|
|
23
|
-
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.
|
|
24
|
-
|
|
25
|
-
You WILL evaluate pruning when ANY of these are true:
|
|
26
|
-
- Task or sub-task is complete
|
|
27
|
-
- You are about to start a new phase of work
|
|
28
|
-
- Write or edit operations are complete (pruning removes the large input content)
|
|
29
|
-
|
|
30
|
-
You MUST NOT prune when:
|
|
31
|
-
- The tool output will be needed for upcoming implementation work
|
|
32
|
-
- The output contains files or context you'll need to reference when making edits
|
|
33
|
-
|
|
34
|
-
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.
|
|
35
|
-
|
|
36
|
-
NOTES
|
|
37
|
-
When in doubt, keep it. Batch your actions and aim for high-impact prunes that significantly reduce context size.
|
|
38
|
-
FAILURE TO PRUNE will result in context leakage and DEGRADED PERFORMANCES.
|
|
39
|
-
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>.
|
|
40
|
-
|
|
41
|
-
If you see a user message containing only `[internal: context sync - no response needed]`, this is an internal system marker used for context injection - it is NOT user input. Do not acknowledge it, do not respond to it, and do not mention it. Simply continue with your current task or wait for actual user input.
|
|
42
|
-
|
|
43
|
-
</instruction>
|
|
44
|
-
</system-reminder>
|
|
@@ -1,36 +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 an assistant 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
|
-
If you see a user message containing only `[internal: context sync - no response needed]`, this is an internal system marker used for context injection - it is NOT user input. Do not acknowledge it, do not respond to it, and do not mention it. Simply continue with your current task or wait for actual user input.
|
|
34
|
-
|
|
35
|
-
</instruction>
|
|
36
|
-
</system-reminder>
|
|
@@ -1,36 +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 an assistant 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
|
-
If you see a user message containing only `[internal: context sync - no response needed]`, this is an internal system marker used for context injection - it is NOT user input. Do not acknowledge it, do not respond to it, and do not mention it. Simply continue with your current task or wait for actual user input.
|
|
34
|
-
|
|
35
|
-
</instruction>
|
|
36
|
-
</system-reminder>
|