/** * CostContext — resolved from the VERIFIED caller identity (spec §2), NEVER * from the request body. It is the financial attribution key ("who consumed / * who pays") that BR-47 rolls cost_events by (spec §5). */ import type { VerifiedPrincipal } from '../personal-passthrough/caller-auth.js'; import type { CallerAuthRequestContext } from './caller-auth.js'; import type { LaunchRoutingContract } from '@sentropic/llm-mesh'; export interface CostContextResolver { resolve(principal: VerifiedPrincipal, context: CallerAuthRequestContext): Promise | CostContext | undefined; } export interface CostContext { /** Gateway-owned durable session/request linkage supplied by trusted auth. */ readonly gatewaySessionRef?: string; readonly gatewayReceiptId?: string; readonly gatewayClientSessionRef?: string; readonly launchRoutingContract?: LaunchRoutingContract; readonly tenantId: string; readonly workspaceId?: string; readonly principalId: string; /** Stable account-ownership scope resolved by caller auth, when distinct from tenant+principal. */ readonly ownerScopeRef?: string; /** Origin surface of the call (e.g. `chat-server`, `api-tools`, `layer-c`). */ readonly source: string; readonly correlationId: string; /** The code site that issued the call, for observability. */ readonly callSite?: string; /** BR-47 budget scope this spend rolls into. */ readonly budgetScope?: string; } //# sourceMappingURL=cost-context.d.ts.map