import { type ProjectSteeringPaths } from "../project/steering-mutation.js"; import type { RuntimeGetProjectFileOptions, RuntimeProjectFile, RuntimeProjectFileListItem, RuntimeProjectFilesApiOptions } from "./project-files-client.js"; import { type SkillOperationBudget } from "../../skill/operation-budget.js"; import type { SkillDocumentParserProvider } from "../../extensions/parser/skill-document-parser.js"; /** Context for runtime project skill. */ export type RuntimeProjectSkillContext = { projectId?: string | null; authToken: string; branchId?: string | null; /** * Per-run map of skill id to its discovered SKILL.md source path (from the * owner-aware catalog). When present for an id, the loader resolves the * skill and its references at that real path instead of probing * `{skillsPath}/{skillId}/...` — required for colocated skills whose * namespaced ids (e.g. `researcher--cite`) do not correspond to a * `skills/{id}/` directory. */ skillSourcePaths?: Readonly>; }; /** Shared resource budget supplied by the outer runtime tool call. */ export type RuntimeProjectSkillOperationOptions = { budget?: SkillOperationBudget; }; /** Public API contract for runtime loaded project skill. */ export type RuntimeLoadedProjectSkill = { instructions: string; references: string[]; }; /** Public API contract for runtime project skill loader logger. */ export type RuntimeProjectSkillLoaderLogger = { warn?: (message: string, metadata?: Record) => void; }; /** Options accepted by runtime project skill loader. */ export type RuntimeProjectSkillLoaderOptions = { getProjectFile: (options: RuntimeGetProjectFileOptions & { signal?: AbortSignal; }) => Promise; getProjectFiles: (options: RuntimeProjectFilesApiOptions & { signal?: AbortSignal; }) => Promise; steeringPaths?: Pick; isAccessDeniedError?: (error: unknown) => boolean; logger?: RuntimeProjectSkillLoaderLogger; skillDocumentParserProvider?: SkillDocumentParserProvider; }; /** Public API contract for runtime project skill loader. */ export type RuntimeProjectSkillLoader = { listProjectSkillReferences: (context: RuntimeProjectSkillContext, skillId: string, operation?: RuntimeProjectSkillOperationOptions) => Promise; loadProjectSkill: (context: RuntimeProjectSkillContext, skillId: string, operation?: RuntimeProjectSkillOperationOptions) => Promise; loadProjectSkillReference: (context: RuntimeProjectSkillContext, skillId: string, normalizedFile: string, operation?: RuntimeProjectSkillOperationOptions) => Promise; }; /** Create runtime project skill loader. */ export declare function createRuntimeProjectSkillLoader(options: RuntimeProjectSkillLoaderOptions): RuntimeProjectSkillLoader; //# sourceMappingURL=project-skill-loader.d.ts.map