billion-context-omp 0.1.6 → 0.1.7

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/tokens.d.ts CHANGED
@@ -1,11 +1,24 @@
1
1
  import { type CoreMessage } from "acp-kernel";
2
2
  export declare function estimateTextTokens(text: string): number;
3
+ /** Union of message ids covered by ACTIVE compression blocks. Messages in
4
+ * this set are already pruned from the sent view — token estimates for the
5
+ * sent view skip them (their summary mass is counted by the kernel
6
+ * breakdown as `summaries`). */
3
7
  export declare function collectCoveredMessageIds(state: {
4
8
  blocks: {
5
9
  active: boolean;
6
10
  effectiveMessageIds: string[];
7
11
  }[];
8
12
  }): Set<string>;
13
+ /** Estimate the SENT-VIEW token mass (chars/4, CJK-aware) of a core-message
14
+ * projection: skips compress tool-calls and messages already covered by
15
+ * active blocks. This is the same estimation scale as the kernel's
16
+ * contextBreakdown, so its output can feed nudge decisions and panel lines
17
+ * without scale mixing. The host footer's session-tree accounting
18
+ * (provider-anchored, includes compressed originals, never shrinks) is a
19
+ * DIFFERENT scale and must never drive emergency arbitration for the sent
20
+ * view — a 180K-context model with a 366K tree reads as "204%" here while
21
+ * the real sent view is ~5%. */
9
22
  export declare function estimateTokens(messages: CoreMessage[], coveredIds?: Set<string>): number;
10
23
  export declare function lastUserMessageId(entries: {
11
24
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "billion-context-omp",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
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",
@@ -69,7 +69,7 @@
69
69
  "@oh-my-pi/pi-utils": "17.3.2",
70
70
  "@types/node": "^26.1.2",
71
71
  "acp-kernel": "0.0.23",
72
- "billion-context-kit": "0.1.1",
72
+ "billion-context-kit": "0.2.0",
73
73
  "tsup": "^8.5.1",
74
74
  "tsx": "^4.23.1",
75
75
  "typescript": "^7.0.2"