billion-context-dsh 0.2.14 → 0.2.16
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 +4 -4
- package/README.md +4 -4
- package/dist/index.d.ts +14 -8
- package/dist/index.js +26 -5
- package/dist/index.js.map +1 -1
- package/dist/window.d.ts +18 -2
- package/package.json +1 -1
package/dist/window.d.ts
CHANGED
|
@@ -17,8 +17,13 @@ export interface AcpWindow {
|
|
|
17
17
|
/** Effective context window in tokens. */
|
|
18
18
|
readonly limit: number;
|
|
19
19
|
/** Where the limit came from. */
|
|
20
|
-
readonly source: 'explicit' | 'auto' | 'default';
|
|
21
|
-
/**
|
|
20
|
+
readonly source: 'explicit' | 'auto' | 'projection' | 'default';
|
|
21
|
+
/**
|
|
22
|
+
* Route the window was resolved for. 'auto' reports the probed route;
|
|
23
|
+
* 'projection' returns also set it, mirroring agent.options — which can be
|
|
24
|
+
* stale after a mid-session model switch (inert today: windowSourceLabel
|
|
25
|
+
* never reads these fields for the projection source).
|
|
26
|
+
*/
|
|
22
27
|
readonly provider?: string;
|
|
23
28
|
readonly model?: string;
|
|
24
29
|
/**
|
|
@@ -32,6 +37,17 @@ export interface AcpWindow {
|
|
|
32
37
|
}
|
|
33
38
|
/** Human label for an AcpWindow's source (used by /acp status). */
|
|
34
39
|
export declare function windowSourceLabel(window: AcpWindow): string;
|
|
40
|
+
/**
|
|
41
|
+
* Read the live context window from the host session projection
|
|
42
|
+
* (`contextPressure.contextWindow` — the newest recorded route capacity).
|
|
43
|
+
* This tracks the session's CURRENT route: after a mid-session model switch
|
|
44
|
+
* `agent.options.provider/model` stays a stale snapshot, so probing THAT route
|
|
45
|
+
* yields the previous model's window (a 1M-window session read as ~96K →
|
|
46
|
+
* false EMERGENCY nudges at 300%+ usage). The projection is refreshed by the
|
|
47
|
+
* host on every request, so it follows the real model without any config.
|
|
48
|
+
* Returns null when the host exposes no projection or disclosed no window.
|
|
49
|
+
*/
|
|
50
|
+
export declare function projectedContextWindow(agent: Agent): number | null;
|
|
35
51
|
/**
|
|
36
52
|
* Probe the model's real context window. Returns null when the host provides
|
|
37
53
|
* no llm service, the adapter discloses no window, or the probe throws —
|
package/package.json
CHANGED