import { URI } from "../../../../../base/common/uri.js"; import { Range } from "../../../../../editor/common/core/range.js"; export declare class PromptFileParser { constructor(); parse(uri: URI, content: string): ParsedPromptFile; } export declare class ParsedPromptFile { readonly uri: URI; readonly header?: PromptHeader | undefined; readonly body?: PromptBody | undefined; constructor(uri: URI, header?: PromptHeader | undefined, body?: PromptBody | undefined); } export interface ParseError { readonly message: string; readonly range: Range; readonly code: string; } export declare namespace PromptHeaderAttributes { const name = "name"; const description = "description"; const agent = "agent"; const mode = "mode"; const model = "model"; const applyTo = "applyTo"; const paths = "paths"; const tools = "tools"; const handOffs = "handoffs"; const advancedOptions = "advancedOptions"; const argumentHint = "argument-hint"; const excludeAgent = "excludeAgent"; const target = "target"; const infer = "infer"; const license = "license"; const compatibility = "compatibility"; const metadata = "metadata"; const agents = "agents"; const userInvokable = "user-invokable"; const userInvocable = "user-invocable"; const disableModelInvocation = "disable-model-invocation"; const hooks = "hooks"; } export declare class PromptHeader { readonly range: Range; readonly uri: URI; private readonly linesWithEOL; private _parsed; constructor(range: Range, uri: URI, linesWithEOL: string[]); private get _parsedHeader(); get attributes(): IHeaderAttribute[]; getAttribute(key: string): IHeaderAttribute | undefined; get errors(): ParseError[]; private getStringAttribute; get name(): string | undefined; get description(): string | undefined; get agent(): string | undefined; get model(): readonly string[] | undefined; get applyTo(): string | undefined; /** * Gets the 'paths' attribute from the header. * The `paths` field supports a list of glob patterns that scope the instruction * to specific files (used by Claude rules). Returns a string array or undefined. */ get paths(): readonly string[] | undefined; get argumentHint(): string | undefined; get target(): string | undefined; get infer(): boolean | undefined; get tools(): string[] | undefined; get handOffs(): IHandOff[] | undefined; private getStringArrayAttribute; private getStringOrStringArrayAttribute; get agents(): string[] | undefined; get userInvocable(): boolean | undefined; get disableModelInvocation(): boolean | undefined; /** * Gets the raw 'hooks' attribute value from the header. * Returns the YAML map value if present, or undefined. The caller is * responsible for converting this to `ChatRequestHooks` via * {@link parseSubagentHooksFromYaml}. */ get hooksRaw(): IMapValue | undefined; private getBooleanAttribute; } export interface IHandOff { readonly agent: string; readonly label: string; readonly prompt: string; readonly send?: boolean; readonly showContinueOn?: boolean; readonly model?: string; } export interface IHeaderAttribute { readonly range: Range; readonly key: string; readonly value: IValue; } export interface IScalarValue { readonly type: "scalar"; readonly value: string; readonly range: Range; readonly format: "single" | "double" | "none" | "literal" | "folded"; } export interface ISequenceValue { readonly type: "sequence"; readonly items: readonly IValue[]; readonly range: Range; } export interface IMapValue { readonly type: "map"; readonly properties: { key: IScalarValue; value: IValue; }[]; readonly range: Range; } export type IValue = IScalarValue | ISequenceValue | IMapValue; export declare class PromptBody { readonly range: Range; private readonly linesWithEOL; readonly uri: URI; private _parsed; constructor(range: Range, linesWithEOL: string[], uri: URI); get fileReferences(): readonly IBodyFileReference[]; get variableReferences(): readonly IBodyVariableReference[]; get offset(): number; private getParsedBody; getContent(): string; resolveFilePath(path: string): URI | undefined; } export interface IBodyFileReference { readonly content: string; readonly range: Range; readonly isMarkdownLink: boolean; } export interface IBodyVariableReference { readonly name: string; readonly range: Range; readonly offset: number; } /** * Parses a comma-separated list of values into an array of strings. * Values can be unquoted or quoted (single or double quotes). * * @param input A string containing comma-separated values * @returns An ISequenceValue containing the parsed values and their ranges */ export declare function parseCommaSeparatedList(stringValue: IScalarValue): ISequenceValue;