billion-context-pi 0.1.73 → 0.1.74-pr.208.300

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.
@@ -0,0 +1,10 @@
1
+ import { Type } from "typebox";
2
+ import type { ToolDefinition } from "@earendil-works/pi-coding-agent";
3
+ import type { AcpRuntime } from "./runtime.js";
4
+ import { type ToolPromptOverrides } from "./surface.js";
5
+ declare const AbsorbParams: Type.TObject<{
6
+ ref: Type.TString;
7
+ summary: Type.TString;
8
+ }>;
9
+ export declare function makeAbsorbTool(runtime: AcpRuntime, name?: string, overrides?: ToolPromptOverrides): ToolDefinition<typeof AbsorbParams>;
10
+ export {};
@@ -24,6 +24,7 @@ export declare function makeCompressTool(runtime: AcpRuntime, overrides?: ToolPr
24
24
  type RangeEntry = Static<typeof RangeSpec>;
25
25
  export declare function normalizeRanges(args: CompressArgs): RangeEntry[] | string;
26
26
  export declare function tailRepair(s: string): string | undefined;
27
+ export declare function arrayWrapRepair(s: string): string | undefined;
27
28
  /** Panel block count, or -1 for non-panels. Accepts BOTH the legacy
28
29
  * "… B blocks)" form (0-block runs; historical transcripts replayed by
29
30
  * index/floor-stale) and the #376 "… blocks: b3=m00044–m00097*, …" form. */
package/dist/config.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type Config, type Prompts } from "acp-kernel";
1
+ import { type AbsorbConfig, type Config, type Prompts } from "acp-kernel";
2
2
  import type { CompressReasoningConfig } from "./reasoning-drop.js";
3
3
  import type { DegenerationGuardConfig } from "./degeneration.js";
4
4
  import type { ThrottleRetryConfig } from "./throttle-retry.js";
@@ -239,6 +239,14 @@ export interface AdapterConfig {
239
239
  delegate?: boolean | DelegateConfig;
240
240
  /** Compression tuning. */
241
241
  compress?: CompressConfig;
242
+ /** Instant tool-result absorption (#14): when enabled, large tool results
243
+ * get a forced `[ACP absorb]` suffix demanding an immediate
244
+ * `absorb({ ref, summary })` distill, and the original tool-call + result
245
+ * pair is hidden from later turns (the absorb call is the durable record).
246
+ * For small-context setups where waiting for a nudge starves the model of
247
+ * working room. Accepts a boolean shorthand (`true` enables with kernel
248
+ * defaults) or an AbsorbSettings object. Default: disabled. */
249
+ absorb?: boolean | AbsorbSettings;
242
250
  /** Provider token-throttle (Bedrock "Too many tokens, please wait before
243
251
  * trying again.") auto-retry. Accepts a boolean shorthand (`false`
244
252
  * disables) or a ThrottleRetryConfig object. Default: enabled, 10 retries,
@@ -347,5 +355,17 @@ export declare function mergeCompress(global?: CompressSettings, provider?: Comp
347
355
  * at any level. The Pi adapter keys providers by name (ctx.model.provider),
348
356
  * not URL — it never sees the upstream URL the way the proxy does. */
349
357
  export declare function resolveCompress(compress: CompressConfig | undefined, provider: string | undefined, modelId: string | undefined): CompressSettings;
358
+ /** Instant tool-result absorption settings (see AdapterConfig.absorb). */
359
+ export interface AbsorbSettings {
360
+ enabled?: boolean;
361
+ toolName?: string;
362
+ minToolTokens?: number;
363
+ contextThresholdPct?: number | string;
364
+ excludeTools?: string[];
365
+ }
366
+ /** Resolve the absorb shorthand/object into kernel-ready settings. Kernel
367
+ * defaults (DEFAULT_ABSORB_CONFIG) fill anything the user leaves unset; the
368
+ * boolean shorthand enables with all defaults. Default: off. */
369
+ export declare function resolveAbsorb(adapter: AdapterConfig): AbsorbConfig;
350
370
  export declare function resolveConfig(adapter: AdapterConfig, liveContextLimit: number, provider?: string, modelId?: string): Config;
351
371
  export declare function parsePercent(v: number | string): number;