@tarquinen/opencode-dcp 1.1.0-beta.3 → 1.1.1-beta.1
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/dist/lib/messages/prune.d.ts.map +1 -1
- package/dist/lib/messages/prune.js +2 -2
- package/dist/lib/messages/prune.js.map +1 -1
- package/dist/lib/prompts/discard-tool-spec.txt +11 -26
- package/dist/lib/prompts/extract-tool-spec.txt +18 -50
- package/dist/lib/prompts/system/system-prompt-both.txt +5 -4
- package/dist/lib/prompts/system/system-prompt-discard.txt +2 -0
- package/dist/lib/prompts/system/system-prompt-extract.txt +2 -0
- package/dist/lib/strategies/tools.js +5 -5
- package/dist/lib/strategies/tools.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prune.d.ts","sourceRoot":"","sources":["../../../lib/messages/prune.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"prune.d.ts","sourceRoot":"","sources":["../../../lib/messages/prune.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AA+F7C,eAAO,MAAM,sBAAsB,GAC/B,OAAO,YAAY,EACnB,QAAQ,YAAY,EACpB,QAAQ,MAAM,EACd,UAAU,SAAS,EAAE,KACtB,IA6FF,CAAA;AAED,eAAO,MAAM,KAAK,GACd,OAAO,YAAY,EACnB,QAAQ,MAAM,EACd,QAAQ,YAAY,EACpB,UAAU,SAAS,EAAE,KACtB,IAGF,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { loadPrompt } from "../prompt";
|
|
2
2
|
import { extractParameterKey, buildToolIdList } from "./utils";
|
|
3
3
|
import { getLastAssistantMessage, getLastUserMessage, isMessageCompacted } from "../shared-utils";
|
|
4
|
-
const PRUNED_TOOL_INPUT_REPLACEMENT = "[
|
|
4
|
+
const PRUNED_TOOL_INPUT_REPLACEMENT = "[content removed to save context, this is not what was written to the file, but a placeholder]";
|
|
5
5
|
const PRUNED_TOOL_OUTPUT_REPLACEMENT = "[Output removed to save context - information superseded or no longer needed]";
|
|
6
6
|
const getNudgeString = (config) => {
|
|
7
7
|
const discardEnabled = config.tools.discard.enabled;
|
|
@@ -42,7 +42,7 @@ const SYNTHETIC_MESSAGE_ID = "msg_01234567890123456789012345";
|
|
|
42
42
|
const SYNTHETIC_PART_ID = "prt_01234567890123456789012345";
|
|
43
43
|
const SYNTHETIC_USER_MESSAGE_ID = "msg_01234567890123456789012346";
|
|
44
44
|
const SYNTHETIC_USER_PART_ID = "prt_01234567890123456789012346";
|
|
45
|
-
const REASONING_MODEL_USER_MESSAGE_CONTENT = "
|
|
45
|
+
const REASONING_MODEL_USER_MESSAGE_CONTENT = "[internal: context sync - no response needed]";
|
|
46
46
|
const buildPrunableToolsList = (state, config, logger, messages) => {
|
|
47
47
|
const lines = [];
|
|
48
48
|
const toolIdList = buildToolIdList(state, messages, logger);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prune.js","sourceRoot":"","sources":["../../../lib/messages/prune.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAGjG,MAAM,6BAA6B,
|
|
1
|
+
{"version":3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C7C,SAAQ;YACZ,CAAC;YACD,6CAA6C;YAC7C,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;gBAChD,SAAQ;YACZ,CAAC;YACD,sDAAsD;YACtD,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;gBACrE,SAAQ;YACZ,CAAC;YAED,yEAAyE;YACzE,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,KAAK,SAAS,EAAE,CAAC;gBACnE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,6BAA6B,CAAA;YAC5D,CAAC;YACD,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;gBACvB,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,KAAK,SAAS,EAAE,CAAC;oBAC5C,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,GAAG,6BAA6B,CAAA;gBAC9D,CAAC;gBACD,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,KAAK,SAAS,EAAE,CAAC;oBAC5C,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,GAAG,6BAA6B,CAAA;gBAC9D,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;AACL,CAAC,CAAA"}
|
|
@@ -3,34 +3,29 @@ Discards tool outputs from context to manage conversation size and reduce noise.
|
|
|
3
3
|
## IMPORTANT: The Prunable List
|
|
4
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
5
|
|
|
6
|
-
**Note:** For `write` and `edit` tools, discarding removes the input content (the code being written/edited) while preserving the output confirmation. This is useful after completing a file modification when you no longer need the raw content in context.
|
|
7
|
-
|
|
8
6
|
## When to Use This Tool
|
|
9
7
|
|
|
10
|
-
Use `discard` for removing tool
|
|
11
|
-
|
|
12
|
-
### 1. Task Completion (Clean Up)
|
|
13
|
-
**When:** You have successfully completed a specific unit of work (e.g., fixed a bug, wrote a file, answered a question).
|
|
14
|
-
**Action:** Discard the tools used for that task with reason `completion`.
|
|
8
|
+
Use `discard` for removing tool content that is no longer needed
|
|
15
9
|
|
|
16
|
-
|
|
17
|
-
**
|
|
18
|
-
**Action:** Discard these specific tool outputs immediately with reason `noise`.
|
|
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.
|
|
19
12
|
|
|
20
13
|
## When NOT to Use This Tool
|
|
21
14
|
|
|
22
|
-
- **If
|
|
23
|
-
- **If you'll need the output later:** Don't discard files you plan to edit
|
|
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.
|
|
24
17
|
|
|
25
18
|
## Best Practices
|
|
26
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.
|
|
27
20
|
- **Think ahead:** Before discarding, ask: "Will I need this output for an upcoming task?" If yes, keep it.
|
|
28
21
|
|
|
29
22
|
## Format
|
|
30
|
-
The `ids` parameter is an array where the first element is the reason, followed by numeric IDs:
|
|
31
|
-
`ids: ["reason", "id1", "id2", ...]`
|
|
32
23
|
|
|
33
|
-
|
|
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
|
|
34
29
|
|
|
35
30
|
<example_noise>
|
|
36
31
|
Assistant: [Reads 'wrong_file.ts']
|
|
@@ -40,17 +35,7 @@ This file isn't relevant to the auth system. I'll remove it to clear the context
|
|
|
40
35
|
|
|
41
36
|
<example_completion>
|
|
42
37
|
Assistant: [Runs tests, they pass]
|
|
43
|
-
The tests passed. I'll clean up now.
|
|
38
|
+
The tests passed and I don't need to preserve any details. I'll clean up now.
|
|
44
39
|
[Uses discard with ids: ["completion", "20", "21"]]
|
|
45
40
|
</example_completion>
|
|
46
41
|
|
|
47
|
-
<example_keep>
|
|
48
|
-
Assistant: [Reads 'auth.ts' to understand the login flow]
|
|
49
|
-
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 discarding.
|
|
50
|
-
</example_keep>
|
|
51
|
-
|
|
52
|
-
<example_edit_completion>
|
|
53
|
-
Assistant: [Edits 'auth.ts' to add validation]
|
|
54
|
-
The edit was successful. I no longer need the raw edit content in context.
|
|
55
|
-
[Uses discard with ids: ["completion", "15"]]
|
|
56
|
-
</example_edit_completion>
|
|
@@ -7,70 +7,38 @@ A `<prunable-tools>` list is provided to you showing available tool outputs you
|
|
|
7
7
|
|
|
8
8
|
Use `extract` when you have gathered useful information that you want to **preserve in distilled form** before removing the raw outputs:
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
**
|
|
12
|
-
**Action:** Extract with distillation scaled to the value of the content. High-value insights require comprehensive capture; routine completions can use lighter distillation.
|
|
13
|
-
|
|
14
|
-
### 2. Knowledge Preservation
|
|
15
|
-
**When:** You have read files, run commands, or gathered context that contains valuable information you'll need to reference later, but the full raw output is too large to keep.
|
|
16
|
-
**Action:** Convert raw data into distilled knowledge. This allows you to remove large outputs (like full file reads) while keeping only the specific parts you need (like a single function signature or constant).
|
|
17
|
-
|
|
18
|
-
## CRITICAL: Distillation Requirements
|
|
19
|
-
|
|
20
|
-
You MUST provide distilled findings in the `distillation` parameter. This is not optional.
|
|
21
|
-
|
|
22
|
-
- **Comprehensive Capture:** Distillation is not just a summary. It must be a high-fidelity representation of the technical details. If you read a file, the distillation should include function signatures, specific logic flows, constant values, and any constraints or edge cases discovered.
|
|
23
|
-
- **Task-Relevant Verbosity:** Be as verbose as necessary to ensure that the "distilled" version is a complete substitute for the raw output for the task at hand. If you will need to reference a specific algorithm or interface later, include it in its entirety within the distillation.
|
|
24
|
-
- **Extract Per-ID:** When extracting from multiple tools, your `distillation` object MUST contain a corresponding entry for EVERY ID being extracted. You must capture high-fidelity findings for each tool individually to ensure no signal is lost.
|
|
25
|
-
- **Structure:** Map EVERY `ID` from the `ids` array to its specific distilled findings.
|
|
26
|
-
Example: `{ "20": { ... }, "21": { ... } }`
|
|
27
|
-
- Capture all relevant details (function names, logic, constraints) to ensure no signal is lost.
|
|
28
|
-
- Prioritize information that is essential for the immediate next steps of your plan.
|
|
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.
|
|
29
12
|
|
|
30
13
|
## When NOT to Use This Tool
|
|
31
14
|
|
|
32
|
-
- **If you need precise syntax:** If you'll
|
|
33
|
-
- **If uncertain:** Prefer keeping over re-fetching.
|
|
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
|
+
|
|
34
18
|
|
|
35
19
|
## Best Practices
|
|
36
|
-
- **Technical Fidelity:** Ensure that types, parameters, and return values are preserved if they are relevant to upcoming implementation steps.
|
|
37
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.
|
|
38
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.
|
|
39
22
|
|
|
40
23
|
## Format
|
|
41
|
-
The `ids` parameter is an array of numeric IDs as strings:
|
|
42
|
-
`ids: ["id1", "id2", ...]`
|
|
43
24
|
|
|
44
|
-
|
|
45
|
-
`distillation
|
|
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.
|
|
46
29
|
|
|
47
30
|
## Example
|
|
48
31
|
|
|
49
32
|
<example_extraction>
|
|
50
|
-
Assistant: [Reads service
|
|
51
|
-
I'll preserve the
|
|
52
|
-
[Uses extract with
|
|
53
|
-
"10"
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"logic": "The validateToken function first checks the local cache before calling the external OIDC provider. It uses a 5-minute TTL for cached tokens.",
|
|
60
|
-
"dependencies": ["import { cache } from '../utils/cache'", "import { oidc } from '../config'"],
|
|
61
|
-
"constraints": "Tokens must be at least 128 chars long. hashPassword uses bcrypt with 12 rounds."
|
|
62
|
-
},
|
|
63
|
-
"11": {
|
|
64
|
-
"file": "src/types/user.ts",
|
|
65
|
-
"interface": "interface User { id: string; email: string; permissions: ('read' | 'write' | 'admin')[]; status: 'active' | 'suspended'; }",
|
|
66
|
-
"context": "The permissions array is strictly typed and used by the RBAC middleware."
|
|
67
|
-
},
|
|
68
|
-
"12": {
|
|
69
|
-
"file": "config/default.json",
|
|
70
|
-
"values": { "PORT": 3000, "RETRY_STRATEGY": "exponential", "MAX_ATTEMPTS": 5 },
|
|
71
|
-
"impact": "The retry strategy affects all outgoing HTTP clients in the core module."
|
|
72
|
-
}
|
|
73
|
-
}]
|
|
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
|
+
]
|
|
74
42
|
</example_extraction>
|
|
75
43
|
|
|
76
44
|
<example_keep>
|
|
@@ -9,10 +9,9 @@ TWO TOOLS FOR CONTEXT MANAGEMENT
|
|
|
9
9
|
- `extract`: Extract key findings into distilled knowledge before removing raw outputs. Use when you need to preserve information.
|
|
10
10
|
|
|
11
11
|
CHOOSING THE RIGHT TOOL
|
|
12
|
-
Ask: "
|
|
13
|
-
- **
|
|
14
|
-
- **
|
|
15
|
-
- **Uncertain** → `extract` (safer, preserves signal)
|
|
12
|
+
Ask: "Is this output clearly noise or irrelevant?"
|
|
13
|
+
- **Yes** → `discard` (pure cleanup, no preservation)
|
|
14
|
+
- **No** → `extract` (default - preserves key findings)
|
|
16
15
|
|
|
17
16
|
Common scenarios:
|
|
18
17
|
- Task complete, no valuable context → `discard`
|
|
@@ -39,5 +38,7 @@ When in doubt, keep it. Batch your actions and aim for high-impact prunes that s
|
|
|
39
38
|
FAILURE TO PRUNE will result in context leakage and DEGRADED PERFORMANCES.
|
|
40
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>.
|
|
41
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
|
+
|
|
42
43
|
</instruction>
|
|
43
44
|
</system-reminder>
|
|
@@ -30,5 +30,7 @@ When in doubt, keep it. Batch your actions and aim for high-impact discards that
|
|
|
30
30
|
FAILURE TO DISCARD will result in context leakage and DEGRADED PERFORMANCES.
|
|
31
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
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
|
+
|
|
33
35
|
</instruction>
|
|
34
36
|
</system-reminder>
|
|
@@ -30,5 +30,7 @@ When in doubt, keep it. Batch your actions and aim for high-impact extractions t
|
|
|
30
30
|
FAILURE TO EXTRACT will result in context leakage and DEGRADED PERFORMANCES.
|
|
31
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
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
|
+
|
|
33
35
|
</instruction>
|
|
34
36
|
</system-reminder>
|
|
@@ -13,7 +13,7 @@ async function executePruneOperation(ctx, toolCtx, ids, reason, toolName, distil
|
|
|
13
13
|
const { client, state, logger, config, workingDirectory } = ctx;
|
|
14
14
|
const sessionId = toolCtx.sessionID;
|
|
15
15
|
logger.info(`${toolName} tool invoked`);
|
|
16
|
-
logger.info(JSON.stringify({ ids, reason }));
|
|
16
|
+
logger.info(JSON.stringify(reason ? { ids, reason } : { ids }));
|
|
17
17
|
if (!ids || ids.length === 0) {
|
|
18
18
|
logger.debug(`${toolName} tool called but ids is empty or undefined`);
|
|
19
19
|
return `No IDs provided. Check the <prunable-tools> list for available IDs to ${toolName.toLowerCase()}.`;
|
|
@@ -109,13 +109,13 @@ export function createExtractTool(ctx) {
|
|
|
109
109
|
.array(tool.schema.string())
|
|
110
110
|
.describe("Numeric IDs as strings to extract from the <prunable-tools> list"),
|
|
111
111
|
distillation: tool.schema
|
|
112
|
-
.
|
|
113
|
-
.describe("REQUIRED.
|
|
112
|
+
.array(tool.schema.string())
|
|
113
|
+
.describe("REQUIRED. Array of strings, one per ID (positional: distillation[0] is for ids[0], etc.)"),
|
|
114
114
|
},
|
|
115
115
|
async execute(args, toolCtx) {
|
|
116
|
-
if (!args.distillation ||
|
|
116
|
+
if (!args.distillation || args.distillation.length === 0) {
|
|
117
117
|
ctx.logger.debug("Extract tool called without distillation: " + JSON.stringify(args));
|
|
118
|
-
return
|
|
118
|
+
return "Missing distillation. You must provide a distillation string for each ID.";
|
|
119
119
|
}
|
|
120
120
|
// Log the distillation for debugging/analysis
|
|
121
121
|
ctx.logger.info("Distillation data received:");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../lib/strategies/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAG1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAEH,uBAAuB,EACvB,4BAA4B,GAC/B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAEhE,MAAM,wBAAwB,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAA;AAChE,MAAM,wBAAwB,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAA;AAUhE,+CAA+C;AAC/C,KAAK,UAAU,qBAAqB,CAChC,GAAqB,EACrB,OAA8B,EAC9B,GAAa,EACb,MAAmB,EACnB,QAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../lib/strategies/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAG1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAEH,uBAAuB,EACvB,4BA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,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;YAE3D,OAAO,qBAAqB,CACxB,GAAG,EACH,OAAO,EACP,IAAI,CAAC,GAAG,EACR,eAA8B,EAC9B,SAAS,EACT,IAAI,CAAC,YAAY,CACpB,CAAA;QACL,CAAC;KACJ,CAAC,CAAA;AACN,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@tarquinen/opencode-dcp",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.1-beta.1",
|
|
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",
|