billion-context-dsh 0.2.17 → 0.2.18

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.
@@ -11,7 +11,7 @@
11
11
  * @module billion-context-pi-dsh/messages
12
12
  */
13
13
  import type { CoreMessage } from 'acp-kernel';
14
- import type { SessionEvent } from '@deepseek-ai/dsh-session';
14
+ import type { Session, SessionEvent } from '@deepseek-ai/dsh-session';
15
15
  /**
16
16
  * Extract plain text from a DSH content block array or string.
17
17
  *
@@ -54,7 +54,7 @@ export declare function projectEvent(event: SessionEvent, toolNames?: ReadonlyMa
54
54
  /** Project a session's message events into CoreMessage[] in log order. */
55
55
  export declare function eventsToCoreMessages(events: readonly SessionEvent[], toolNames?: ReadonlyMap<string, string>): CoreMessage[];
56
56
  /** The surface-visible message events of a session, in model-visible order. */
57
- export declare function surfaceEventsOf(session: import('@deepseek-ai/dsh-session').Session): SessionEvent[];
57
+ export declare function surfaceEventsOf(session: Session): SessionEvent[];
58
58
  /**
59
59
  * ALL message-type events in log order — the visible surface PLUS everything
60
60
  * shadowed by compression. The ACP kernel deactivates any block whose consumed
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Cross-version session event access.
3
+ *
4
+ * DSH `0.1.2-alpha` replaced the public `Session.events` getter with explicit
5
+ * `snapshotEvents()` / `eventAt(seq)` methods; rc.6 / 0.1.1-rc.x still expose
6
+ * `events`. Both shapes are feature-detected here so a single build runs on
7
+ * either seam (the engine's peer range keeps `^0.1.0-rc.6 || ^0.1.1-rc.1`).
8
+ *
9
+ * Semantics match on both sides:
10
+ * - `events` (rc.6) and `snapshotEvents()` (0.1.2-alpha) both return the
11
+ * current full log as a stable, cached snapshot (reused until the next
12
+ * append), with `seq === array index`.
13
+ * - indexed reads map to `events[seq]` / `eventAt(seq)` with the same
14
+ * `undefined`-when-absent contract.
15
+ * @module billion-context-dsh/session-events
16
+ */
17
+ import type { Session, SessionEvent } from '@deepseek-ai/dsh-session';
18
+ /** All events of a session in log order (seq == array index). */
19
+ export declare function sessionEventsOf(session: Session): readonly SessionEvent[];
20
+ /** The event at one exact seq, or undefined when the log has no such seq. */
21
+ export declare function eventAtOf(session: Session, seq: number): SessionEvent | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "billion-context-dsh",
3
- "version": "0.2.17",
3
+ "version": "0.2.18",
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",
@@ -47,7 +47,10 @@
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@deepseek-ai/cordis": "^4.0.1",
50
- "@deepseek-ai/dsh-compaction": "^0.1.0-rc.6 || ^0.1.1-rc.1"
50
+ "@deepseek-ai/dsh-compaction": "^0.1.0-rc.6 || ^0.1.1-rc.1 || ^0.1.2-alpha.4",
51
+ "@deepseek-ai/dsh-session": "^0.1.0-rc.6 || ^0.1.1-rc.1 || ^0.1.2-alpha.4",
52
+ "@deepseek-ai/dsh-llm": "^0.1.0-rc.6 || ^0.1.1-rc.1 || ^0.1.2-alpha.4",
53
+ "@deepseek-ai/dsh-tools": "^0.1.0-rc.6 || ^0.1.1-rc.1 || ^0.1.2-alpha.4"
51
54
  },
52
55
  "devDependencies": {
53
56
  "acp-kernel": "0.0.29",