@vpxa/aikit 0.1.254 → 0.1.256

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.
@@ -419,15 +419,23 @@ declare class FileCache {
419
419
  }
420
420
  //#endregion
421
421
  //#region packages/tools/src/compact.d.ts
422
- interface CompactOptions {
423
- /** The text to compress (at least one of text/path/ref required) */
424
- text?: string;
425
- /** File path to read server-side — avoids read_file round-trip (at least one of text/path/ref required) */
426
- path?: string;
427
- /** Cached reversible ref from compact/digest/search/find/knowledge output. */
428
- ref?: string;
429
- /** The focus query — what are we trying to understand? Required unless ref is provided. */
422
+ type CompactInputOptions = {
423
+ /** The text to compress. */text: string; /** The focus query — what are we trying to understand? */
424
+ query: string;
425
+ path?: never;
426
+ ref?: never;
427
+ } | {
428
+ /** File path to read server-side — avoids read_file round-trip. */path: string; /** The focus query — what are we trying to understand? */
429
+ query: string;
430
+ text?: never;
431
+ ref?: never;
432
+ } | {
433
+ /** Cached reversible ref from compact/digest/search/find/knowledge output. */ref: string; /** Optional focus query when re-compacting a cached artifact. */
430
434
  query?: string;
435
+ text?: never;
436
+ path?: never;
437
+ };
438
+ interface CompactSharedOptions {
431
439
  /** Target output size in characters (default: 3000) */
432
440
  maxChars?: number;
433
441
  /** Token budget — when set, overrides maxChars (approx 4 chars per token) */
@@ -447,6 +455,7 @@ interface CompactOptions {
447
455
  */
448
456
  mode?: 'full' | 'delta';
449
457
  }
458
+ type CompactOptions = CompactInputOptions & CompactSharedOptions;
450
459
  interface CompactResult {
451
460
  /** The compressed text */
452
461
  text: string;