import type { McpComposition } from '../../agent-adapter/types.js'; import type { ResolvedProfileConfig } from '../agents/profile-manager.js'; export type IdentityJsonValue = null | boolean | number | string | IdentityJsonValue[] | { [key: string]: IdentityJsonValue; }; export interface ModelExecutionIdentityInput { backend: ResolvedProfileConfig['backend']; requestedModel: string; modelAliasPolicy: IdentityJsonValue; providerProtocol: string | null; configuredRouteBaseHost: string | null; claudeCliVersion: string | null; /** Backend-neutral CLI identity; `claudeCliVersion` keeps its Claude-only meaning so every * hash frozen before the neutral pair existed stays reproducible from its own inputs. */ cliName: ResolvedProfileConfig['backend'] | null; cliVersion: string | null; reasoningEffort: string | null; fallbackEmpty: true; } export interface PluginDirIdentityInput { path: string; content_sha256: string; } export interface SkillIdentityInput { name: string; content_sha256: string; } export interface RoleToolSurfaceInput { systemPromptSha256: string; directiveSha256: string; tools: string[]; pluginDirs: PluginDirIdentityInput[]; skills: SkillIdentityInput[]; mcpComposition: McpComposition; hookPolicy: IdentityJsonValue; benchmarkPolicyGuard?: IdentityJsonValue; } export interface BundleManifestInput { runConfig: IdentityJsonValue; limits: IdentityJsonValue; resolvedPaths: IdentityJsonValue; adapterHashes: IdentityJsonValue; harnessHashes: IdentityJsonValue; modelExecutionIdentityHash: string; roleToolSurfaceHash: string; } export interface FrozenIdentity { modelExecutionIdentityHash: string; roleToolSurfaceHash: string; bundleManifestHash: string; } export declare class IdentityProfileFallbackError extends Error { readonly reason: "identity_profile_has_fallbacks"; constructor(); } export interface FrozenIdentityInput { resolvedProfile: ResolvedProfileConfig; modelExecution: Omit; roleToolSurface: RoleToolSurfaceInput; bundleManifest: Omit; } export declare function canonicalJsonSha256(value: unknown): string; export declare function resolvedRouteHost(profile: ResolvedProfileConfig): string | null; export declare function computeModelExecutionIdentityHash(input: ModelExecutionIdentityInput): string; export declare function computeRoleToolSurfaceHash(input: RoleToolSurfaceInput): string; export declare function computeBundleManifestHash(input: BundleManifestInput): string; export declare function freezeIdentity(input: FrozenIdentityInput): FrozenIdentity;