billion-context-dsh 0.2.10 → 0.2.12
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 +41 -12
- package/README.md +40 -12
- package/cordis.patch.yml +29 -8
- package/dist/commands.d.ts +1 -1
- package/dist/index.js +20 -4
- package/dist/index.js.map +1 -1
- package/dist/tools.d.ts +9 -0
- package/dist/window.d.ts +9 -1
- package/package.json +3 -2
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
|
|
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.
|
|
3
|
+
"version": "0.2.12",
|
|
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,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
50
|
-
"@deepseek-ai/dsh-compaction": "^0.1.0-rc.6"
|
|
50
|
+
"@deepseek-ai/dsh-compaction": "^0.1.0-rc.6 || ^0.1.1-rc.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"acp-kernel": "0.0.29",
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"@deepseek-ai/dsh-tools": "0.1.0-rc.6",
|
|
63
63
|
"@deepseek-ai/schemastery": "3.18.1",
|
|
64
64
|
"@types/node": "^26.1.2",
|
|
65
|
+
"semver": "^7.7.1",
|
|
65
66
|
"tsup": "^8.5.1",
|
|
66
67
|
"tsx": "^4.23.1",
|
|
67
68
|
"typescript": "^7.0.2"
|