/** * Core types for source parsing and identification. * * @experimental This API is unstable and may change without notice. * @packageDocumentation */ import type * as Option from "effect/Option"; import * as Schema from "effect/Schema"; import type { ExtensionName, ExtensionType } from "../extensions/common.js"; import type { Handle } from "../extensions/handle.js"; import type { RegistryEndpoint } from "../extensions/registry-endpoint.js"; /** * Source type discriminator for extension origins. * * - `"git"` - Generic git repository source * - `"registry"` - Package registry source * - `"local"` - Local filesystem path source * - `"inline"` - Inline workspace configuration * - `"workspace"` - Intrinsic source in the selected scope's managed extension tree * * @experimental */ export declare const SourceTypeSchema: Schema.Literals; /** * Inferred type for SourceTypeSchema. * * @experimental This API is unstable and may change without notice. */ export type SourceType = Schema.Schema.Type; /** * Ref type discriminator for extension ref hosting categories. * * - `"git-hosted"` - Git-based sources, including the built-in forges * - `"registry"` - Package registry source * - `"local"` - Local filesystem path source * - `"workspace"` - Intrinsic managed workspace package * * @experimental This API is unstable and may change without notice. */ export declare const RefTypeSchema: Schema.Literals; /** * Inferred type for RefTypeSchema. * * @experimental This API is unstable and may change without notice. */ export type RefType = Schema.Schema.Type; /** Full immutable Git object IDs; width identifies the repository object format. */ export declare const GitSha1ObjectIdSchema: Schema.String; export declare const GitSha256ObjectIdSchema: Schema.String; export declare const GitObjectIdSchema: Schema.Union; export declare const SourceRefSchema: Schema.NonEmptyString; export declare const SourceNamespaceSchema: Schema.NonEmptyString; export declare const SourceSubPathSchema: Schema.NonEmptyString; /** @experimental */ /** Self-describing — the git URL lives in SourceParams. @experimental */ export interface GitSourceHost { readonly type: "git"; } /** * Registry source host with its canonical endpoint. * @experimental */ export interface RegistrySourceHost { readonly type: "registry"; readonly name: string; readonly location: RegistryEndpoint; } /** Self-describing — the filesystem path lives in SourceParams. @experimental */ export interface LocalSourceHost { readonly type: "local"; } /** Self-describing — inline transport details live in SourceParams. @experimental */ export interface InlineSourceHost { readonly type: "inline"; } /** Intrinsic managed-tree source whose scope is bound by its settings document. @experimental */ export interface WorkspaceSourceHost { readonly type: "workspace"; } /** @experimental */ export interface HttpSourceHost { readonly type: "http"; } export type SourceHost = HttpSourceHost | GitSourceHost | RegistrySourceHost | LocalSourceHost | InlineSourceHost | WorkspaceSourceHost; /** @experimental */ export interface GitSourceParams { readonly type: "git"; readonly url: URL; readonly ref: Option.Option; readonly subPath: Option.Option; } /** @experimental */ export interface RegistrySourceParams { readonly type: "registry"; readonly sourceName?: string | undefined; readonly owner: Option.Option; } /** @experimental */ export interface LocalSourceParams { readonly type: "local"; readonly path: string; } /** @experimental */ export interface InlineSourceParams { readonly type: "inline"; readonly command: Option.Option; readonly args: ReadonlyArray; readonly url: Option.Option; readonly headers: Readonly>; } /** @experimental */ export interface WorkspaceSourceParams { readonly type: "workspace"; readonly owner: Handle; readonly extensionType: ExtensionType; readonly name: ExtensionName; } /** @experimental */ export interface HttpSourceParams { readonly type: "http"; readonly url: URL; readonly kind: "skill-md" | "archive" | "index"; readonly entry?: string; } export type HttpSource = HttpSourceHost & HttpSourceParams; export type SourceParams = HttpSourceParams | GitSourceParams | RegistrySourceParams | LocalSourceParams | InlineSourceParams | WorkspaceSourceParams; /** @experimental */ export type InlineSource = InlineSourceHost & InlineSourceParams; /** @experimental */ export type GitSource = GitSourceHost & GitSourceParams; /** @experimental */ export type RegistrySource = RegistrySourceHost & RegistrySourceParams; /** @experimental */ export type LocalSource = LocalSourceHost & LocalSourceParams; /** @experimental */ export type WorkspaceSource = WorkspaceSourceHost & WorkspaceSourceParams; /** @experimental */ export type Source = HttpSource | GitSource | RegistrySource | LocalSource | WorkspaceSource; /** All git-based sources. Hosted-provider syntax expands to this source. @experimental */ export type GitBasedSource = GitSource; /** Sources that require host configuration from settings. @experimental */ export type ConfiguredSourceHost = RegistrySourceHost; /** Sources that are self-describing (no settings config needed). @experimental */ export type SelfDescribingSourceHost = GitSourceHost | LocalSourceHost | HttpSourceHost; //# sourceMappingURL=types.d.ts.map