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.
- package/README.en.md +2 -2
- package/README.md +2 -2
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/session-events.d.ts +18 -11
- package/package.json +1 -1
package/dist/session-events.d.ts
CHANGED
|
@@ -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
|
|
5
|
-
* `snapshotEvents()` / `eventAt(seq)` methods
|
|
6
|
-
* `events
|
|
7
|
-
*
|
|
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
|
|
10
|
-
* - `
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
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
|
-
/**
|
|
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