@tarquinen/opencode-dcp 0.1.1 → 0.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 +16 -5
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +6 -3
- package/dist/lib/config.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,16 +61,27 @@ No configuration required! The plugin works out of the box with:
|
|
|
61
61
|
- Automatic background optimization
|
|
62
62
|
- Smart AI-powered analysis
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
### Debug Logging (Optional)
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
To enable debug logging, set the `OPENCODE_DCP_DEBUG` environment variable:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Enable debug logging for one session
|
|
70
|
+
OPENCODE_DCP_DEBUG=true oc
|
|
71
|
+
|
|
72
|
+
# Or export it to enable for all sessions
|
|
73
|
+
export OPENCODE_DCP_DEBUG=true
|
|
74
|
+
oc
|
|
70
75
|
```
|
|
71
76
|
|
|
72
77
|
Debug logs will be written to `~/.config/opencode/logs/dynamic-context-pruning/YYYY-MM-DD.log`.
|
|
73
78
|
|
|
79
|
+
You can watch logs in real-time:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
tail -f ~/.config/opencode/logs/dynamic-context-pruning/$(date +%Y-%m-%d).log
|
|
83
|
+
```
|
|
84
|
+
|
|
74
85
|
## Architecture
|
|
75
86
|
|
|
76
87
|
- **Janitor**: Background process that analyzes sessions using opencode/big-pickle model
|
package/dist/lib/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../lib/config.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,OAAO,CAAA;CACjB;AAMD,wBAAgB,SAAS,IAAI,YAAY,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../lib/config.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,OAAO,CAAA;CACjB;AAMD,wBAAgB,SAAS,IAAI,YAAY,CAOxC"}
|
package/dist/lib/config.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
const defaultConfig = {
|
|
2
|
-
debug:
|
|
2
|
+
debug: false // Default to false, can be enabled via environment variable
|
|
3
3
|
};
|
|
4
4
|
export function getConfig() {
|
|
5
|
-
//
|
|
6
|
-
|
|
5
|
+
// Check for environment variable
|
|
6
|
+
const debugEnv = process.env.OPENCODE_DCP_DEBUG;
|
|
7
|
+
return {
|
|
8
|
+
debug: debugEnv === 'true' || debugEnv === '1' || defaultConfig.debug
|
|
9
|
+
};
|
|
7
10
|
}
|
|
8
11
|
//# sourceMappingURL=config.js.map
|
package/dist/lib/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../lib/config.ts"],"names":[],"mappings":"AAKA,MAAM,aAAa,GAAiB;IAChC,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../lib/config.ts"],"names":[],"mappings":"AAKA,MAAM,aAAa,GAAiB;IAChC,KAAK,EAAE,KAAK,CAAC,4DAA4D;CAC5E,CAAA;AAED,MAAM,UAAU,SAAS;IACrB,iCAAiC;IACjC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAA;IAE/C,OAAO;QACH,KAAK,EAAE,QAAQ,KAAK,MAAM,IAAI,QAAQ,KAAK,GAAG,IAAI,aAAa,CAAC,KAAK;KACxE,CAAA;AACL,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": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
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",
|