@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
16 lines • 1.05 kB
TypeScript
import type { Api, Model } from "@earendil-works/pi-ai";
import type { PromptCacheSettings } from "./settings-manager.ts";
/** Headroom subtracted from the model's prompt-cache TTL, so a wait never straddles cache expiry. */
export declare const DEFAULT_PROMPT_CACHE_SAFETY_BUFFER_SECONDS = 30;
/** Advisory out-of-process mirror of the resolved budget; absent means "no budget". */
export declare const PROMPT_CACHE_SAFE_WAIT_ENV = "PI_PROMPT_CACHE_SAFE_WAIT_SECONDS";
/**
* Longest a tool may block in the foreground without risking prompt-cache
* expiry: the active model's cache TTL minus a safety buffer.
*
* `undefined` means "no cache-derived budget" — the TTL is unknown, caching is
* off, the feature is disabled, or the buffer swallows the whole TTL. Callers
* treat that as today's unbounded behavior.
*/
export declare function resolvePromptCacheSafeWaitSeconds(model: Model<Api> | undefined, settings: PromptCacheSettings | undefined, env: NodeJS.ProcessEnv): number | undefined;
//# sourceMappingURL=prompt-cache-budget.d.ts.map