/** * Source resolution: classifies input via parseInputPattern, then routes * each pattern type to the appropriate resolution logic. * * For URL and SCP patterns, resolution iterates configured sources and * matches by hostname + provider parse. For other patterns, resolution * handles them directly. * * @experimental This API is unstable and may change without notice. * @packageDocumentation */ import type * as FileSystem from "effect/FileSystem"; import type * as HttpClient from "effect/unstable/http/HttpClient"; import type * as Path from "effect/Path"; import * as Effect from "effect/Effect"; import * as Option from "effect/Option"; import { type AppError } from "../app-error/index.js"; import type { InputParseResult, ShorthandInput, Source } from "../sources/index.js"; import { type Handle } from "../extensions/handle.js"; import type { ExtensionName, ExtensionType, ExtensionTypePlural } from "../extensions/index.js"; import { WorkspaceMutations } from "../workspace/index.js"; /** * Route a URL input by iterating configured sources and matching by * hostname + provider parse. First successful match wins. */ export declare const routeUrlInput: (url: URL, input: string) => Effect.Effect; /** * Route an SCP address by iterating configured sources and matching by * hostname + provider parse. First successful match wins. */ export declare const routeScpInput: (scp: { readonly user: string; readonly host: string; readonly path: string; }, input: string) => Effect.Effect; /** * Route shorthand input (github:owner/repo, ghe:owner/repo, etc.). * * Known source-type prefixes dispatch directly to the provider's shorthand * parser. Config-name prefixes look up the config and parse using its source * type's shorthand parser. */ export declare const resolveShorthandInputSource: (parseResult: InputParseResult) => Effect.Effect; /** Route NameInput through the complete desired extension graph. */ export declare const routeNameInput: (name: string, _input: string, expectedType?: ExtensionType) => Effect.Effect; /** Route RegistryPatternInput: find matching registry config and intersect with params. */ export declare const routeRegistryInput: (pattern: { readonly sourceName: string; readonly type: Option.Option; readonly owner: Handle; readonly name: Option.Option; }, _input: string) => Effect.Effect<{ type: "registry"; name: string; location: URL; owner: Option.Option>; }, AppError, WorkspaceMutations>; export declare const resolveSlashInputSource: (pattern: { readonly first: string; readonly second: string; readonly third: Option.Option; }, input: string) => Effect.Effect; /** * Resolve a source string into a fully resolved `Source`. * * Classifies the input via `parseInputPattern`, then routes each pattern * type to the appropriate resolution logic. For URL and SCP patterns, * resolution iterates configured sources and matches by hostname + provider * parse. For other patterns, resolution handles them directly. * * @experimental This API is unstable and may change without notice. * @param input - The source string to resolve * @returns Effect containing a resolved `Source` or `AppError` */ export declare const resolveSource: (input: string, options?: { readonly expectedType?: ExtensionType; }) => Effect.Effect; //# sourceMappingURL=resolve-source.d.ts.map