/** * Claude chat turns on the shared subscription core: the bearer resolver * for the Anthropic transport. Everything else the worker uses (placement, * request custody, health) is the provider-neutral runtime bound to * `SUBSCRIPTION_CORE_CLAUDE`, which stays unregistered until the Claude * cutover (design 5.3, C3): every entry point fails closed before then. * * The snapshot carries the whole decoded credential (the transport needs * the bearer and the account identity it sends with each request) and the * refresh generation it came from, which fences every quota observation * and refusal made with it. */ import type { Settings } from "@opengeni/config"; import type { Database } from "./database.js"; import type { SubscriptionCoreProvider } from "./subscription-core/provider.js"; import type { SubscriptionCoreLeaseRef, SubscriptionCoreRefreshDeps, SubscriptionCoreTurnIdentity } from "./subscription-core/turns.js"; import { type SubscriptionCoreClaudeCredential } from "./subscription-core-claude-adapter.js"; /** * A Claude turn's core lease TTL: the five minutes the legacy Claude lease * used (C1a kept it; owned here since the legacy pool's deletion, C4). */ export declare const SUBSCRIPTION_CORE_CLAUDE_LEASE_TTL_MS: number; /** The Anthropic transport's credential snapshot, plus the credential version it came from. */ export type SubscriptionCoreClaudeTokenSnapshot = { credential: SubscriptionCoreClaudeCredential; /** The connection's refresh generation. */ credentialVersion: number; }; export declare function buildSubscriptionCoreClaudeTokenResolver(db: Database, settings: Settings, identity: SubscriptionCoreTurnIdentity, lease: SubscriptionCoreLeaseRef, deps?: SubscriptionCoreRefreshDeps & { provider?: SubscriptionCoreProvider; }): { getToken: () => Promise; refresh: () => Promise; };