billion-context-omp 0.1.7 → 0.1.9
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.md +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/auto-compress.d.ts +4 -0
- package/dist/index.js +665 -78
- package/dist/index.js.map +1 -1
- package/dist/messages.d.ts +1 -1
- package/dist/runtime.d.ts +4 -0
- package/dist/user-config.d.ts +11 -1
- package/package.json +3 -2
package/dist/messages.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SessionEntry, SessionMessageEntry } from "@oh-my-pi/pi-coding-agent";
|
|
2
|
-
import type
|
|
2
|
+
import { type CoreMessage } from "acp-kernel";
|
|
3
3
|
type AgentMessage = SessionMessageEntry["message"];
|
|
4
4
|
export type { AgentMessage };
|
|
5
5
|
export declare function entriesToCoreMessages(entries: SessionEntry[]): CoreMessage[];
|
package/dist/runtime.d.ts
CHANGED
|
@@ -22,6 +22,10 @@ export interface AcpRuntime {
|
|
|
22
22
|
coreMessages: CoreMessage[];
|
|
23
23
|
}>;
|
|
24
24
|
commitFoldState(ctx: ExtensionContext, state: CompressionState, toolCallId?: string): void;
|
|
25
|
+
/** Track the per-session streak of consecutively REJECTED compress calls.
|
|
26
|
+
* `ok=false` increments and returns the new streak; `ok=true` resets to 0.
|
|
27
|
+
* A re-fold (rewritten stream prefix) drops the slot and starts at 0. */
|
|
28
|
+
noteCompressOutcome(ctx: ExtensionContext, ok: boolean): number;
|
|
25
29
|
forgetSession(sid: string): void;
|
|
26
30
|
/** Rebuild blocks from the persisted session view at session_start so /acp
|
|
27
31
|
* and acp_status show them BEFORE the first LLM call of a resumed session.
|
package/dist/user-config.d.ts
CHANGED
|
@@ -13,13 +13,23 @@ export interface UserAcpConfig {
|
|
|
13
13
|
compress?: CompressConfig;
|
|
14
14
|
displayUsage?: "merged" | "separate";
|
|
15
15
|
prompts?: Partial<Prompts>;
|
|
16
|
+
/** Acknowledge the risks of user-supplied compression prompts (system-prompt
|
|
17
|
+
* injection surface). Only honored from the GLOBAL config — a project-local
|
|
18
|
+
* acp-omp.json under agent control cannot pre-acknowledge its own risk gate. */
|
|
19
|
+
acknowledgePromptsRisk?: boolean;
|
|
16
20
|
/** Model for /compact summaries, as "provider:modelId" (e.g.
|
|
17
21
|
* "zhipuai:glm-5.2"). Shortcut for compress.compressModel — normalized
|
|
18
22
|
* into the nested path at load time. */
|
|
19
23
|
compressModel?: string;
|
|
20
24
|
}
|
|
21
25
|
/** Read global + project acp-omp.json, project overrides global. Returns {} on any
|
|
22
|
-
* error (missing file, bad JSON) — never throws.
|
|
26
|
+
* error (missing file, bad JSON) — never throws.
|
|
27
|
+
*
|
|
28
|
+
* `prompts` / `acknowledgePromptsRisk` are accepted from the GLOBAL config
|
|
29
|
+
* only (issue #32): a repo under agent control can ship a project-local
|
|
30
|
+
* .omp/acp-omp.json, and letting it inject arbitrary system-prompt text
|
|
31
|
+
* every turn is a prompt-injection surface. Project-local files may tune
|
|
32
|
+
* everything else (thresholds, models, timeouts) but not the prompts. */
|
|
23
33
|
export declare function loadUserConfig(cwd: string): Promise<UserAcpConfig>;
|
|
24
34
|
/** Merge user config onto an adapter config: user config wins for the keys it
|
|
25
35
|
* sets. Used at session_start to apply runtime-discovered config. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "billion-context-omp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "One billion, not one million. Model-driven context management for the oh-my-pi (omp) coding agent.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -68,8 +68,9 @@
|
|
|
68
68
|
"@oh-my-pi/pi-coding-agent": "17.3.2",
|
|
69
69
|
"@oh-my-pi/pi-utils": "17.3.2",
|
|
70
70
|
"@types/node": "^26.1.2",
|
|
71
|
-
"acp-kernel": "0.0.
|
|
71
|
+
"acp-kernel": "0.0.24",
|
|
72
72
|
"billion-context-kit": "0.2.0",
|
|
73
|
+
"bun-types": "^1.3.14",
|
|
73
74
|
"tsup": "^8.5.1",
|
|
74
75
|
"tsx": "^4.23.1",
|
|
75
76
|
"typescript": "^7.0.2"
|