/** Stable error code for an unverified successful project-navigation result. */ export declare const PROJECT_CONTEXT_SWITCH_UNCONFIRMED_ERROR_CODE = "PROJECT_CONTEXT_SWITCH_UNCONFIRMED"; /** Stable model-visible message for an unverified project-navigation result. */ export declare const PROJECT_CONTEXT_SWITCH_UNCONFIRMED_MESSAGE = "Project navigation returned an identity that could not be verified; the active project was not changed."; /** Stable validation message for an unsafe public project reference. */ export declare const INVALID_AGENT_PROJECT_REFERENCE_MESSAGE = "Project reference must be a trimmed non-empty bounded identifier without control characters"; /** Stable validation message for an unverified project-reference resolution. */ export declare const UNCONFIRMED_AGENT_PROJECT_IDENTITY_MESSAGE = "Project reference resolver returned an unconfirmed project identity"; /** Context for mutable agent project. */ export interface MutableAgentProjectContext { projectId: string; projectSlug?: string; branchId?: string | null; runtimeTargetKind?: "main_branch" | "environment" | "preview_branch" | null; runtimeTargetEnvironmentId?: string | null; availableSkillIds?: string[]; skillSelectorPolicy?: import("../../skill/selector.js").ResolvedSkillSelectorPolicy; /** Per-run skill id -> discovered SKILL.md source path (owner-aware catalog). */ skillSourcePaths?: Readonly>; } /** Apply agent project context change helper. */ export declare function applyAgentProjectContextChange(context: MutableAgentProjectContext, projectId: string, projectSlug?: string): boolean; /** Confirmed project identity returned by a successful project-navigation tool. */ export interface ConfirmedAgentProjectContextSwitch { projectId: string; projectSlug?: string; } /** Normalize a public project ID-or-slug reference without changing its identity. */ export declare function normalizeAgentProjectReference(value: unknown): string | null; /** * Validate and normalize one project identity at an untrusted boundary. * * Project IDs are opaque canonical values and therefore must already be * trimmed. Optional slugs may be whitespace-padded by upstream JSON and are * normalized exactly once before the canonical slug policy is applied. */ export declare function normalizeAgentProjectIdentity(projectId: unknown, rawProjectSlug?: unknown): ConfirmedAgentProjectContextSwitch | null; /** * Validate one resolved identity and prove that it names the requested * canonical project ID or normalized slug. */ export declare function getConfirmedAgentProjectIdentity(input: { projectId: unknown; projectSlug?: unknown; requestedProjectReference?: string; }): ConfirmedAgentProjectContextSwitch | null; /** * Confirm the own-data `{ projectId, slug }` shape returned by a hosted * project-reference resolver without invoking accessors on untrusted output. */ export declare function getConfirmedResolvedAgentProjectIdentity(resolution: unknown, requestedProjectReference: string): ConfirmedAgentProjectContextSwitch | null; /** Tool error returned when claimed navigation success cannot be safely confirmed. */ export interface UnconfirmedAgentProjectContextSwitchResult { success: false; isError: true; error: "tool_error"; code: typeof PROJECT_CONTEXT_SWITCH_UNCONFIRMED_ERROR_CODE; message: typeof PROJECT_CONTEXT_SWITCH_UNCONFIRMED_MESSAGE; structuredContent: { success: false; error: "tool_error"; code: typeof PROJECT_CONTEXT_SWITCH_UNCONFIRMED_ERROR_CODE; message: typeof PROJECT_CONTEXT_SWITCH_UNCONFIRMED_MESSAGE; }; } /** Create a stable fail-closed tool result for an unverified navigation success. */ export declare function createUnconfirmedProjectContextSwitchResult(): UnconfirmedAgentProjectContextSwitchResult; /** * Return the complete confirmed project identity from a successful navigation * result. A missing or blank slug is represented as absent so callers can * explicitly clear any prior project slug. */ export declare function getConfirmedProjectContextSwitch(result: unknown, requestedProjectReference?: string): ConfirmedAgentProjectContextSwitch | null; /** * Whether a non-error navigation result explicitly claims success. * * Callers use this to distinguish an ordinary upstream failure (which must be * preserved verbatim) from claimed success with an identity that failed the * confirmation boundary. */ export declare function isClaimedSuccessfulProjectContextSwitchResult(result: unknown): boolean; /** Return only the confirmed project id for legacy callers. */ export declare function getConfirmedProjectContextSwitchId(result: unknown, requestedProjectReference?: string): string | null; //# sourceMappingURL=context.d.ts.map