import type { McpComposition } from '../../agent-adapter/types.js'; import type { ResolvedProfileConfig } from '../agents/profile-manager.js'; import { type IdentityJsonValue } from '../agent-run/identity.js'; import { ARM_RESOLUTION_SCHEMA_VERSION } from './arm-schema.js'; import { type CredentialCapabilityState, type FailureStderr, type ResolvedTrialPolicy } from './resolved-policy.js'; export { PolicyCompilationError } from './resolved-policy.js'; export interface CredentialCapabilityProjection { id: string; state: CredentialCapabilityState; key: { runner_or_backend: string; provider: string; protocol: string; credential_kind: string; proxy_adapter_version: string; }; } export interface ResolvedRoleAsset { system_prompt_path: string; directive_path: string; tools: string[]; plugin_dirs: string[]; mcp_composition: McpComposition; mcp_config_paths: string[]; disable_hooks: true; } export interface ArmResolution { schema_version: typeof ARM_RESOLUTION_SCHEMA_VERSION; arm: unknown; arm_path: string; trial_id: string; root_run_id: string; task: { task_id: string; image_ref: string; image_digest: string; }; profile_name: string; paid_run: boolean; credential_capabilities: CredentialCapabilityProjection[]; credential: { upstream_base_url: string; route_identity_host: string; proxy_base_url: string; dummy_token_ref: string; }; cli_artifact: { path: string; version: string; }; model_alias_policy: IdentityJsonValue; roles: Record; thread_templates: Record; thread_agents: Record; artifact_inventory_spec: IdentityJsonValue; expected_asset_hashes?: Record; pi_benchmark_capability_proven?: boolean; } export interface PolicyCompilerDependencies { wall_clock_ms(): number; monotonic_ns(): bigint; resolve_profile(name: string): ResolvedProfileConfig; read_file?(file: string): Buffer; stderr?: FailureStderr; } export declare function compileResolvedTrialPolicy(input: ArmResolution, deps: PolicyCompilerDependencies): ResolvedTrialPolicy; export declare function rejectPolicyReresolution(kind: string, name: string, stderr?: FailureStderr): never; export declare function projectAgentRunConfig(policy: ResolvedTrialPolicy, slot: string, baseDirectory?: string): IdentityJsonValue;