import type { UpstreamInterceptor } from './types.js'; export declare const AGENT_SDK_PREFIX = "You are a Claude agent, built on Anthropic's Claude Agent SDK."; /** * Detect whether the request is a "main" request or a "subagent" request * by checking if any system text block starts with the AGENT_SDK_PREFIX. */ export declare function detectRequestType(system: any[]): 'main' | 'subagent'; /** * Inject a TTL value into a content block's cache_control object * if it has `cache_control.type === "ephemeral"` but no `ttl` field. */ export declare function injectTtl(block: any, ttlParam: string): any; /** * TTL Management interceptor. * * Injects TTL values onto all ephemeral cache_control markers * that don't already have a ttl field. Uses fixed values: * - main requests: "1h" * - subagent requests: "1h" (same, ready for future config split) * * Steps: * 1. URL guard via isAnthropicV1Messages * 2. Skip if body has no messages and system * 3. Detect request type from body.system * 4. Set TTL based on detected type * 5. Iterate over system blocks and message content blocks, injecting TTL * 6. Return modified upstream */ export declare const ttlManagement: UpstreamInterceptor; //# sourceMappingURL=ttl-management.d.ts.map