import type { PluginManifestV2, PluginMarkdownBlockConfigSchema, PluginPermission, Sha256Digest } from "./manifest-types.js";
export declare const PLUGIN_VALIDATION_CODES: readonly ["manifest.not-object", "manifest.unknown-field", "manifest.missing-field", "manifest.invalid-version", "manifest.invalid-id", "manifest.invalid-string", "manifest.size-limit", "manifest.invalid-semver", "manifest.invalid-api-range", "manifest.invalid-runtime", "manifest.invalid-platform", "manifest.duplicate-platform", "manifest.invalid-permission", "manifest.duplicate-permission", "manifest.incoherent-permission", "manifest.invalid-entry", "manifest.forbidden-entry", "manifest.invalid-path-list", "manifest.duplicate-path", "manifest.invalid-integrity", "manifest.integrity-path-mismatch", "manifest.invalid-contributes", "manifest.invalid-contribution", "manifest.invalid-markdown-block", "manifest.invalid-editor-extension", "manifest.invalid-note-action", "manifest.invalid-file-viewer", "manifest.unsupported-editor-extension-runtime", "manifest.invalid-editor-extension-build", "manifest.unsupported-markdown-block-runtime", "manifest.duplicate-contribution-id", "manifest.invalid-settings", "manifest.duplicate-setting", "manifest.too-many-secrets", "manifest.invalid-network", "manifest.duplicate-network-id", "manifest.invalid-job", "manifest.too-many-jobs", "manifest.duplicate-plugin-id", "package.invalid-payload", "package.undeclared-file", "package.missing-file", "package.duplicate-file", "package.symlink", "package.escape", "package.invalid-digest", "package.size-limit"];
export type PluginValidationCode = typeof PLUGIN_VALIDATION_CODES[number];
export interface PluginValidationIssue {
    readonly code: PluginValidationCode;
    readonly path: string;
    readonly message: string;
}
export type PluginManifestValidationResult = {
    readonly ok: true;
    readonly manifest: PluginManifestV2;
} | {
    readonly ok: false;
    readonly issues: readonly PluginValidationIssue[];
};
export declare function canonicalizePluginId(value: unknown): string | null;
export declare function isCanonicalPluginId(value: unknown): value is string;
export declare function canonicalizePluginLocalId(value: unknown): string | null;
export declare function isCanonicalPluginLocalId(value: unknown): value is string;
export declare function isCanonicalPluginIdentity(value: unknown): value is string;
export declare function canonicalizePluginPath(value: unknown): string | null;
export declare function isCanonicalPluginPath(value: unknown): value is string;
export declare function isSha256Digest(value: unknown): value is Sha256Digest;
export declare function getGlobalContributionId(pluginId: string, localId: string): string | null;
export type PluginMarkdownBlockConfigValidation = {
    readonly ok: true;
    readonly config: Readonly<Record<string, string | number | boolean>>;
} | {
    readonly ok: false;
    readonly code: "invalid-config" | "size-limit";
    readonly message: string;
};
/**
 * Validate one sidecar-delivered config against an already admitted manifest
 * schema. The returned value is a fresh frozen clone; renderers never receive
 * the mutable sidecar object.
 */
export declare function validatePluginMarkdownBlockConfig(schema: PluginMarkdownBlockConfigSchema, value: unknown): PluginMarkdownBlockConfigValidation;
export declare function canonicalizeHttpsOrigin(value: unknown): string | null;
export declare function isCanonicalHttpsOrigin(value: unknown): value is string;
export declare function validatePluginManifestV2(value: unknown): PluginManifestValidationResult;
export declare function isPluginManifestV2(value: unknown): value is PluginManifestV2;
export declare class PluginManifestError extends Error {
    readonly issues: readonly PluginValidationIssue[];
    constructor(issues: readonly PluginValidationIssue[]);
}
export declare function parsePluginManifestV2(value: unknown): PluginManifestV2;
export declare function validatePluginManifestSet(values: readonly unknown[]): readonly PluginManifestValidationResult[];
export declare function manifestPermissions(value: PluginManifestV2): readonly PluginPermission[];
