import { ApiReference, ProtocolCatalog, ProtocolRequirement, ProtocolSupport, VersionRange } from "@dsh-std/core"; //#region src/index.d.ts declare const COMMUNITY_V015_MANIFEST_VERSION = "0.15"; declare const COMPONENT_API_VERSION = "manifest.dsh/internal/v1alpha1"; declare const COMMUNITY_PERMISSION_API_VERSION = "community.dsh/v1alpha1"; declare const COMMUNITY_PERMISSION_KIND = "Permission"; interface CommunityContractReference extends ApiReference { readonly optional?: boolean; readonly fallback?: string; } interface CommunityPermissionRequest { readonly name: string; readonly scope: string; readonly reason?: string; } interface CommunityCommandContribution { readonly id: string; readonly title: string; readonly description?: string; } type CommunitySubscription = string | (ApiReference & { readonly scope?: string; }); interface CommunityPluginManifestV015 { /** Draft schema identifier. It is not fetched while loading the plugin. */ readonly $schema: string; readonly manifestVersion: typeof COMMUNITY_V015_MANIFEST_VERSION; readonly id: string; readonly name: string; readonly version: string; readonly facets: { readonly host: { readonly entry: string; readonly apiVersion: string; }; }; readonly requires: { readonly contracts: readonly CommunityContractReference[]; readonly services?: readonly never[]; }; readonly permissions: readonly CommunityPermissionRequest[]; readonly contributes: { readonly commands: readonly CommunityCommandContribution[]; readonly panels?: readonly never[]; } & Readonly>; readonly subscriptions: readonly CommunitySubscription[]; readonly license?: string; readonly source?: { readonly repository: string; readonly revision?: string; }; readonly artifact?: { readonly digest: string; readonly algorithm: 'sha256'; readonly path: string; }; readonly compat?: { readonly hosts?: readonly string[]; }; readonly overrides?: readonly { readonly target: string; readonly kind: 'patch' | 'native' | 'build'; readonly description?: string; }[]; } type PluginManifest = CommunityPluginManifestV015; interface ComponentRelationships { readonly depends?: Readonly>; readonly recommends?: Readonly>; readonly conflicts?: Readonly>; readonly breaks?: Readonly>; } interface ActivationObject extends ApiReference { readonly spec: Spec; } interface ExtensionMetadata { readonly name: string; readonly labels?: Readonly>; } interface ManifestExtension extends ApiReference { readonly metadata: ExtensionMetadata; readonly spec: Spec; } interface PermissionRequest extends ApiReference { readonly action: string; readonly optional?: boolean; readonly reason?: string; readonly spec?: Spec; } interface ComponentFacet { readonly name: string; readonly activation?: ActivationObject; readonly protocols?: { readonly requires?: readonly ProtocolRequirement[]; readonly supports?: readonly ProtocolSupport[]; }; readonly extensions?: readonly ManifestExtension[]; readonly permissions?: readonly PermissionRequest[]; } interface ComponentManifest { /** Host-internal projection. Portable packages publish PluginManifest instead. */ readonly apiVersion: typeof COMPONENT_API_VERSION; readonly kind: 'Component'; readonly metadata: { readonly name: string; readonly version: string; readonly displayName?: string; }; readonly spec: { readonly facets: readonly ComponentFacet[]; readonly relationships?: ComponentRelationships; }; } interface FacetIdentity { readonly component: string; readonly version: string; readonly facet: string; } interface ManifestObjectDefinition extends ApiReference { validateSpec(spec: unknown): Spec; /** Extension-owned identity validation. Activation definitions leave this undefined. */ validateMetadata?(metadata: ExtensionMetadata): void; } interface ManifestValidationIssue { readonly code: 'unknown-protocol' | 'unknown-activation' | 'unknown-extension' | 'invalid-activation' | 'invalid-extension'; readonly severity: 'error' | 'warning'; readonly path: string; readonly message: string; } interface ManifestValidationReport { readonly apiVersion: 'manifest.dsh/report/v1alpha1'; readonly validator: { readonly name: string; readonly version: string; }; readonly source: string; readonly digest: string; readonly manifest: { readonly name: string; readonly version: string; }; readonly compatible: boolean; readonly issues: readonly ManifestValidationIssue[]; } declare class ManifestDefinitionCatalog { readonly validator: Readonly<{ name: "@dsh-std/manifest"; version: "0.1.0"; }>; private readonly activations; private readonly extensions; constructor(validator?: Readonly<{ name: "@dsh-std/manifest"; version: "0.1.0"; }>); registerActivation(definition: ManifestObjectDefinition): () => void; registerExtension(definition: ManifestObjectDefinition): () => void; activation(reference: ApiReference): ManifestObjectDefinition | undefined; extension(reference: ApiReference): ManifestObjectDefinition | undefined; validate(manifestValue: ComponentManifest, protocols?: ProtocolCatalog, options?: { readonly source?: string; readonly digest?: string; }): ManifestValidationReport; } interface ParseManifestOptions { readonly source?: string; } /** Parse the package-root dsh-plugin.json without executing plugin code or fetching a schema. */ declare function parseManifest(source: string, options?: ParseManifestOptions): PluginManifest; declare function defineManifest(manifest: T): T; declare function validateManifest(value: unknown): asserts value is PluginManifest; /** Validate a host-internal Component/Facet projection. */ declare function defineComponentManifest(manifest: T): T; declare function validateComponentManifest(value: unknown): asserts value is ComponentManifest; /** Project a supported package manifest version into the common host composition model. */ declare function projectManifest(manifestValue: PluginManifest): ComponentManifest; declare function facetIdentity(manifest: ComponentManifest, facet: ComponentFacet): FacetIdentity; declare function facetKey(identity: FacetIdentity): string; declare function findFacet(manifest: ComponentManifest, name: string): ComponentFacet | undefined; //#endregion export { ActivationObject, COMMUNITY_PERMISSION_API_VERSION, COMMUNITY_PERMISSION_KIND, COMMUNITY_V015_MANIFEST_VERSION, COMPONENT_API_VERSION, CommunityCommandContribution, CommunityContractReference, CommunityPermissionRequest, CommunityPluginManifestV015, CommunitySubscription, ComponentFacet, ComponentManifest, ComponentRelationships, ExtensionMetadata, FacetIdentity, ManifestDefinitionCatalog, ManifestExtension, ManifestObjectDefinition, ManifestValidationIssue, ManifestValidationReport, ParseManifestOptions, PermissionRequest, PluginManifest, defineComponentManifest, defineManifest, facetIdentity, facetKey, findFacet, parseManifest, projectManifest, validateComponentManifest, validateManifest }; //# sourceMappingURL=index.d.ts.map