billion-context-dsh 0.2.4 → 0.2.6

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/nudge.d.ts CHANGED
@@ -40,6 +40,9 @@ export declare function resolveTokenCount(agent: Agent, coreMessages: CoreMessag
40
40
  * Render the compressible-range table as seq refs for the model.
41
41
  * Computed directly from the surface (not the kernel's ref map, which can
42
42
  * drift and hide large tool results) — see buildCompressibleSeqRanges.
43
+ * UPSTREAM: this self-computation is a labeled workaround for kernel
44
+ * ref-map drift after surface replacements (AGENTS.md rule 11) — drop it and
45
+ * use kernel compressibleRanges once the drift is fixed upstream.
43
46
  */
44
47
  export declare function rangeTable(session: import('@deepseek-ai/dsh-session').Session, prompts?: ResolvedPrompts): string;
45
48
  /**
package/dist/region.d.ts CHANGED
@@ -17,6 +17,8 @@ export interface AcpBlockLedgerEntry {
17
17
  /** The compaction transaction id (stable block identity). */
18
18
  readonly blockId: string;
19
19
  readonly summary: string;
20
+ /** The block's short label (kernel `CompressionBlock.topic`), when the compress request carried one. */
21
+ readonly topic?: string;
20
22
  readonly shadowedSeqs: readonly number[];
21
23
  readonly shadowedTokenCount: number;
22
24
  readonly start: number;
@@ -92,6 +94,8 @@ export interface CompactionTransactionInput {
92
94
  readonly shadowedTokenCount: number;
93
95
  readonly provider: string;
94
96
  readonly model: string;
97
+ /** Short block label (kernel `CompressionBlock.topic`) — persisted so a restarted engine rehydrates it. */
98
+ readonly topic?: string;
95
99
  /** Compression tier of this block (default 1). */
96
100
  readonly tier?: 1 | 2 | 3;
97
101
  /** The acp-kernel block id (`bN`) created by the kernel for this transaction. */
@@ -110,6 +114,8 @@ export interface CompactionTransactionInput {
110
114
  export interface AcpCompactionSummaryFields {
111
115
  /** Compression tier (1/2/3) — 1 = message range, 2 = distills tier-1, 3 = distills tier-2. */
112
116
  readonly tier?: 1 | 2 | 3;
117
+ /** Short block label (kernel `CompressionBlock.topic`) — the acp_status block title. */
118
+ readonly topic?: string;
113
119
  /** The acp-kernel block id (`bN`) created for this transaction. */
114
120
  readonly kernelBlockId?: string;
115
121
  /** Durable compaction ids of the blocks distilled into this one. */
@@ -142,6 +148,8 @@ export interface SeqCompressibleRange {
142
148
  readonly end: number;
143
149
  readonly count: number;
144
150
  readonly tokens: number;
151
+ /** Share of messages that are tool messages (tool-call or tool-result), 0-100 — kernel `toolPct` parity. */
152
+ readonly toolPct: number;
145
153
  }
146
154
  /**
147
155
  * Hide one successful `compress` tool's call/result pair after its tool/result
@@ -192,8 +200,11 @@ export declare function deferCompressPairHide(session: Session, callId: string,
192
200
  * kernel's ref map, which can drift after surface replacements in long
193
201
  * sessions and hide large tool results from the nudge range table. Skips the
194
202
  * recent protected tail, the last user message, and compaction checkpoints;
195
- * edges are then balanced through resolveSurfaceRange. Ranges are ordered by
196
- * size (largest reclaimed first).
203
+ * edges are then balanced through resolveSurfaceRange. Ranges are ordered
204
+ * oldest-first (stable across turns — matches the kernel's `oldest first`).
205
+ * UPSTREAM: this self-computation is a labeled workaround for kernel
206
+ * ref-map drift after surface replacements (AGENTS.md rule 11) — drop it and
207
+ * use kernel compressibleRanges once the drift is fixed upstream.
197
208
  */
198
209
  export declare function buildCompressibleSeqRanges(session: Session, opts?: {
199
210
  preserveRecent?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "billion-context-dsh",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "Active Context Pruning (ACP) for the DeepSeek Harness — model-driven context management as a CompactionEngine backend.",
5
5
  "keywords": [
6
6
  "deepseek",
@@ -43,16 +43,14 @@
43
43
  "scripts": {
44
44
  "typecheck": "tsc --noEmit",
45
45
  "build": "tsup && tsc --emitDeclarationOnly",
46
- "test": "node --import tsx --test tests/*.test.ts"
47
- },
48
- "dependencies": {
49
- "acp-kernel": "0.0.24"
46
+ "test": "node --import tsx --test tests/*.test.ts tests/kernel-upstream/*.test.ts"
50
47
  },
51
48
  "peerDependencies": {
52
49
  "@deepseek-ai/cordis": "^4.0.1",
53
50
  "@deepseek-ai/dsh-compaction": "^0.1.0-rc.6"
54
51
  },
55
52
  "devDependencies": {
53
+ "acp-kernel": "0.0.29",
56
54
  "@deepseek-ai/cordis": "4.0.1",
57
55
  "@deepseek-ai/dsh-agent": "0.1.0-rc.6",
58
56
  "@deepseek-ai/dsh-commands": "0.1.0-rc.6",