billion-context-dsh 0.2.9 → 0.2.11

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/prompts.d.ts CHANGED
@@ -28,7 +28,7 @@ export interface NudgePrompts {
28
28
  emergency: string;
29
29
  /** 指导行(HOW_TO_COMPRESS_RULES)。无占位符 */
30
30
  guidance: string;
31
- /** tier 蒸馏行。占位符:{tier} {count} {prevTier} {tokens} {seqs} */
31
+ /** tier 蒸馏行。占位符:{tier} {count} {prevTier} {tokens} {seqs} {firstSeq} {lastSeq} */
32
32
  tier: string;
33
33
  /** 上下文分解。占位符:{system} {tool} {summaries} {code} {text} */
34
34
  breakdown: string;
package/dist/tools.d.ts CHANGED
@@ -31,5 +31,14 @@ export interface ToolEnvironment extends KernelConfigInput {
31
31
  */
32
32
  readonly compressCallIdsToHide?: Set<string>;
33
33
  }
34
+ /**
35
+ * Resolve the effective context window for a tool or command run: probe the
36
+ * agent's real window via `windowFor` when provided, otherwise fall back to
37
+ * the environment's `modelContextLimit`. Shared by the compress and
38
+ * acp_status tool handlers and the `/acp` command so the resolution logic
39
+ * lives in exactly one place (issue #63 — the tools used the 128K fallback
40
+ * for pressure decisions even when auto-detection had found a larger window).
41
+ */
42
+ export declare function resolveEffectiveWindow(env: ToolEnvironment, agent: Agent): Promise<AcpWindow>;
34
43
  /** Build the four ACP model tools bound to one engine. */
35
44
  export declare function makeTools(env: ToolEnvironment): ToolDefinition[];
package/dist/window.d.ts CHANGED
@@ -21,8 +21,16 @@ export interface AcpWindow {
21
21
  /** Route the auto window was resolved for (auto source only). */
22
22
  readonly provider?: string;
23
23
  readonly model?: string;
24
+ /**
25
+ * True only when auto-detection was ATTEMPTED and failed (the probe threw or
26
+ * the model API disclosed no window), so the fallback limit is in use. Not
27
+ * set for explicit config, a successful probe, or disabled auto-detection —
28
+ * those must not look like a failure (issue #63: a misconfigured gateway
29
+ * silently fell back to 128K and produced false emergency nudges).
30
+ */
31
+ readonly probeFailed?: boolean;
24
32
  }
25
- /** Human label for an AcpWindow's source (used by acp_status). */
33
+ /** Human label for an AcpWindow's source (used by /acp status). */
26
34
  export declare function windowSourceLabel(window: AcpWindow): string;
27
35
  /**
28
36
  * Probe the model's real context window. Returns null when the host provides
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "billion-context-dsh",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
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",