/** One resolution path for API-selected content. Local drafts cannot shadow a published selection. */ import { type ProfileClient } from "./profile-client.js"; import type { ResolvedSkillProfile, ResolvedSkillSelection } from "../types/skill-selection.js"; import type { SkillBundleEntry } from "./skill-bundle.js"; import { type CachedSelectionProfile, type SelectionCacheOptions, type SkillSessionParentBinding, type SkillSessionReceipt } from "./selection-cache.js"; export interface SelectionResolverOptions extends SelectionCacheOptions { client?: ProfileClient; cached?: boolean; /** Explicit cached authority binding, checked even when no credential is read. */ authority?: string; workspaceId?: string; maxAgeMs?: number; projectDir?: string; sessionId?: string; /** A newly spawned subagent inherits the parent's pinned snapshot, never its dedup state. */ parentSessionId?: string; } export interface SyncSelectionProfileOptions extends SelectionCacheOptions { client?: ProfileClient; projectDir?: string; stationId?: string; check?: boolean; } export declare function syncSelectionProfile(profileId: string, options?: SyncSelectionProfileOptions): Promise<{ profile: ResolvedSkillProfile; receipt: CachedSelectionProfile | null; changed: boolean; downloaded: number; stationReported: boolean; }>; export interface ResolvedSelectionContext { receipt: CachedSelectionProfile; session: SkillSessionReceipt | null; sessionSnapshot: SkillSessionParentBinding | null; parentSnapshot?: SkillSessionParentBinding; inheritedLoaded?: string[]; client?: ProfileClient; } export declare function resolveSelectionContext(profileId: string, options?: SelectionResolverOptions): Promise; export declare function readSelectedEntries(selection: ResolvedSkillSelection, context: ResolvedSelectionContext, options?: SelectionResolverOptions): Promise; export declare function exactProfileSelection(spec: string, profile: ResolvedSkillProfile): ResolvedSkillSelection; export declare function loadSelectedSkill(spec: string, profileId: string, options?: SelectionResolverOptions & { file?: string; }): Promise<{ content: string; selection: ResolvedSkillSelection; receipt: { file: string; source: string; verifiedAt: string; authority: string; workspaceId: string; profileRevision: string; slug: string; version: string; bundleDigest: string; aliases?: string[]; triggers?: { keywords?: string[]; paths?: string[]; always?: boolean; }; }; }>; /** Pin the resolved profile metadata without copying a definition into the project. */ export declare function pinSelectedSkillVersion(spec: string, profileId: string, options: SelectionResolverOptions & { projectDir: string; }): Promise<{ selection: ResolvedSkillSelection; path: string; }>; export declare function selectedSkillRequirements(spec: string, profileId: string, options?: SelectionResolverOptions): Promise<{ selection: ResolvedSkillSelection; envVars: string[]; systemDeps: string[]; cliCommand: string | null; dependencies: Record; }>;