dsh-manual-compact-plugin 0.2.3 → 0.2.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.
- package/lib/index.js +5 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import { mkdir, appendFile } from 'node:fs/promises'
|
|
|
17
17
|
import os from 'node:os'
|
|
18
18
|
|
|
19
19
|
const name = 'dsh-manual-compact-plugin'
|
|
20
|
-
const inject = ['settings', 'agents']
|
|
20
|
+
const inject = ['settings', 'agents', 'compaction']
|
|
21
21
|
const NS = 'manual-compact'
|
|
22
22
|
|
|
23
23
|
/** Composition-row configuration (also the settings schema). */
|
|
@@ -192,7 +192,10 @@ function apply(ctx, config) {
|
|
|
192
192
|
let lastHandledNonce = null
|
|
193
193
|
let handling = null
|
|
194
194
|
const controllers = new Map() // sessionId -> AbortController
|
|
195
|
-
// Capture the compaction seam at activation
|
|
195
|
+
// Capture the compaction seam at activation. Declared as a hard dependency
|
|
196
|
+
// (inject: ['compaction']) so Cordis only activates this plugin once the
|
|
197
|
+
// compaction provider is live — mirroring /compact's contract. Fall back to
|
|
198
|
+
// a request-time ctx lookup and the agent ctx if it is ever absent.
|
|
196
199
|
const compactionAtApply = (typeof ctx.get === 'function') ? ctx.get('compaction') : undefined
|
|
197
200
|
|
|
198
201
|
const handle = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-manual-compact-plugin",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Manual context compaction for DeepSeek Harness: keep the latest N conversation items with stop or batch mode and a per-session compaction archive — embedded in the context meter popup when the meter panel slot exists, or a composer button otherwise.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|