billion-context-omp 0.2.9 → 0.3.1

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/runtime.d.ts CHANGED
@@ -44,6 +44,10 @@ export interface AcpRuntime {
44
44
  * `ok=false` increments and returns the new streak; `ok=true` resets to 0.
45
45
  * A re-fold (rewritten stream prefix) drops the slot and starts at 0. */
46
46
  noteCompressOutcome(ctx: ExtensionContext, ok: boolean): number;
47
+ /** Current consecutive-reject streak in the space the session's CURRENT
48
+ * mode folds in (issue #104: the nudge must not demand compression while
49
+ * compress calls are being rejected in a row). */
50
+ rejectStreakFor(ctx: ExtensionContext): number;
47
51
  forgetSession(sid: string): void;
48
52
  /** Rebuild blocks from the persisted session at session_start so /acp and
49
53
  * acp_status show them BEFORE the first LLM call of a resumed session.
@@ -3,3 +3,18 @@ export declare function hostVersionAtLeast(min: readonly [number, number, number
3
3
  export declare function resolveTransformMode(adapter: Pick<AdapterConfig, "transformMode">, model: {
4
4
  api?: string;
5
5
  } | undefined, hostVersion?: string): "context" | "provider";
6
+ export interface ProviderDeliveryWarning {
7
+ key: string;
8
+ reason: string;
9
+ message: string;
10
+ }
11
+ /** An explicit transformMode "provider" is an escape hatch for patched hosts
12
+ * — but on stock hosts some APIs silently deliver NOTHING: before 17.3.8 the
13
+ * host drops the before_provider_request replacement on openai-completions /
14
+ * bedrock / cursor (upstream can1357/oh-my-pi#8717, issue #83), and bedrock /
15
+ * cursor bodies still have no codec path even on newer hosts. The unset
16
+ * default already avoids all of this; only an explicit override can land
17
+ * here, so surface why instead of failing silently (ework issue #3). */
18
+ export declare function providerDeliveryWarning(adapter: Pick<AdapterConfig, "transformMode">, model: {
19
+ api?: string;
20
+ } | undefined, hostVersion?: string): ProviderDeliveryWarning | undefined;
package/dist/update.d.ts CHANGED
@@ -1,2 +1,21 @@
1
1
  export declare function findNpmRoot(extDir: string): string | undefined;
2
+ export type NpmRunner = (args: string[], cwd: string) => Promise<{
3
+ code: number;
4
+ stdout: string;
5
+ stderr: string;
6
+ }>;
7
+ export type NodeRunner = (args: string[]) => Promise<{
8
+ code: number;
9
+ stdout: string;
10
+ stderr: string;
11
+ }>;
12
+ export declare function setRunNpmForTest(impl: NpmRunner | undefined): void;
13
+ export declare function setRunNodeForTest(impl: NodeRunner | undefined): void;
14
+ export type InstallOutcome = "ok" | "failed" | "rolled-back";
15
+ /**
16
+ * npmDirOverride exists only for tests: the test process is not installed
17
+ * under a node_modules tree, so the real discovery walk can never reach a
18
+ * fixture. Production callers pass nothing and discovery runs as usual.
19
+ */
20
+ export declare function autoInstallLatest(latest: string, npmDirOverride?: string): Promise<InstallOutcome>;
2
21
  export declare function checkForUpdate(autoUpdate: boolean, notify?: (msg: string) => void): Promise<void>;
@@ -22,6 +22,13 @@ export type Representability = {
22
22
  * the rebuild. Unrepresentable payloads must fail the transform OPEN —
23
23
  * pass through untouched rather than lose content (issue #3 review). */
24
24
  export declare function payloadRepresentable(payload: unknown, fmt: ProviderWireFormat): Representability;
25
+ /** Restore openai wire fields the kernel codec cannot carry (issue #105).
26
+ * omp's buildParams emits assistant tool-call messages with content "" (a
27
+ * null trips strict/proxy implementations) and replays encrypted reasoning
28
+ * as reasoning_details keyed to the tool call ids. The codec rebuild drops
29
+ * the details and flips "" back to null; this pass re-attaches both so the
30
+ * post-surgery body keeps the host's wire contract. */
31
+ export declare function restoreOpenaiWireFidelity(originalMessages: unknown[], rebuilt: unknown[]): unknown[];
25
32
  export type WireTagRenderScope = {
26
33
  config: Config;
27
34
  tokenCount: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "billion-context-omp",
3
- "version": "0.2.9",
3
+ "version": "0.3.1",
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,7 +68,7 @@
68
68
  "@oh-my-pi/pi-coding-agent": "17.3.8",
69
69
  "@oh-my-pi/pi-utils": "17.3.8",
70
70
  "@types/node": "^26.1.2",
71
- "acp-kernel": "0.0.31",
71
+ "acp-kernel": "0.0.32",
72
72
  "billion-context-kit": "0.2.0",
73
73
  "bun-types": "^1.3.14",
74
74
  "tsup": "^8.5.1",