billion-context-dsh 0.2.22 → 0.2.23

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.
@@ -1,21 +1,28 @@
1
1
  /**
2
2
  * Cross-version session event access.
3
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`).
4
+ * History: DSH `0.1.2-alpha` replaced the public `Session.events` getter with
5
+ * explicit `snapshotEvents()` / `eventAt(seq)` methods (only rc.6 /
6
+ * 0.1.1-rc.x had `events`). Both shapes are feature-detected here; since the
7
+ * peer floor moved to the 0.1.5 line (`>=0.1.5-alpha.1 <0.1.6-0`, issue #136),
8
+ * every supported seam exposes the method pair — dsh-session 0.1.5 has no
9
+ * public `.events` getter — so the `events` fallback is defensive robustness
10
+ * for foreign or stub handles, not a supported-host path.
8
11
  *
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.
12
+ * Semantics:
13
+ * - `snapshotEvents()` returns the current full log as a stable, cached
14
+ * snapshot (reused until the next append), with `seq === array index`.
15
+ * - indexed reads map to `eventAt(seq)` (or `events[seq]` on the legacy
16
+ * shape) with the same `undefined`-when-absent contract.
15
17
  * @module billion-context-dsh/session-events
16
18
  */
17
19
  import type { Session, SessionEvent } from '@deepseek-ai/dsh-session';
18
20
  /** All events of a session in log order (seq == array index). */
19
21
  export declare function sessionEventsOf(session: Session): readonly SessionEvent[];
20
- /** The event at one exact seq, or undefined when the log has no such seq. */
22
+ /**
23
+ * The event at one exact seq, or undefined when the log has no such seq.
24
+ * Falls back through `sessionEventsOf` (snapshotEvents → events) so a
25
+ * snapshot-only handle stays readable; yields undefined, never throws,
26
+ * when a handle exposes neither read method.
27
+ */
21
28
  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.22",
3
+ "version": "0.2.23",
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",