import type { AppBlueprintSpec, SpecPointer } from '../app-config/spec';
import type { FeatureModuleSpec, FeatureRef } from '../features';
import type { OwnerShipMeta } from '../ownership';
/** Kind of example - determines how it's presented in catalogs */
export type ExampleKind = 'template' | 'workflow' | 'integration' | 'knowledge' | 'blueprint' | 'ui' | 'script' | 'library';
export declare const ExampleKindEnum: {
    readonly Template: "template";
    readonly Workflow: "workflow";
    readonly Integration: "integration";
    readonly Knowledge: "knowledge";
    readonly Blueprint: "blueprint";
    readonly UI: "ui";
    readonly Script: "script";
    readonly Library: "library";
};
/** Visibility level for examples */
export type ExampleVisibility = 'public' | 'internal' | 'experimental';
export declare const ExampleVisibilityEnum: {
    readonly Public: "public";
    readonly Internal: "internal";
    readonly Experimental: "experimental";
};
/** Sandbox modes supported by examples */
export type ExampleSandboxMode = 'playground' | 'specs' | 'builder' | 'markdown' | 'evolution';
export declare const ExampleSandboxModeEnum: {
    readonly Playground: "playground";
    readonly Specs: "specs";
    readonly Builder: "builder";
    readonly Markdown: "markdown";
    readonly Evolution: "evolution";
};
/** Documentation references for the example */
export interface ExampleDocumentation {
    /** Root documentation block ID */
    rootDocId?: string;
    /** Goal/purpose documentation */
    goalDocId?: string;
    /** Usage/quickstart documentation */
    usageDocId?: string;
    /** API/reference documentation */
    referenceDocId?: string;
    /** Constraints/limitations documentation */
    constraintsDocId?: string;
}
/** Surface support configuration for sandbox */
export interface ExampleSandboxSupport {
    enabled: boolean;
    modes: readonly ExampleSandboxMode[];
}
/** Surface support configuration for Studio */
export interface ExampleStudioSupport {
    enabled: boolean;
    /** If true, Studio can create a real project from this example via API. */
    installable: boolean;
}
/** Surface support configuration for MCP */
export interface ExampleMcpSupport {
    enabled: boolean;
}
/** Surface support configuration - where the example can be used */
export interface ExampleSurfaces {
    /** Available as a template for new projects */
    templates: boolean;
    /** Sandbox/playground support */
    sandbox: ExampleSandboxSupport;
    /** ContractSpec Studio support */
    studio: ExampleStudioSupport;
    /** MCP (Model Context Protocol) support */
    mcp: ExampleMcpSupport;
}
/** Package entrypoints for the example - maps to package.json exports */
export interface ExampleEntrypoints {
    /** Package name in the workspace (e.g., @contractspec/example.saas-boilerplate) */
    packageName: string;
    /** Feature module entrypoint (e.g., ./saas-boilerplate.feature) */
    feature?: string;
    /** Blueprint entrypoint (e.g., ./blueprint) */
    blueprint?: string;
    /** Presentations entrypoint (e.g., ./presentations) */
    presentations?: string;
    /** Contracts/operations entrypoint (e.g., ./contracts) */
    contracts?: string;
    /** Handlers entrypoint (e.g., ./handlers) */
    handlers?: string;
    /** UI components entrypoint (e.g., ./ui) */
    ui?: string;
    /** Documentation entrypoint (e.g., ./docs) */
    docs?: string;
}
/**
 * Example metadata extending OwnerShipMeta.
 * Provides standard spec identification plus example-specific fields.
 */
export interface ExampleMeta extends OwnerShipMeta {
    /** Example kind for categorization */
    kind: ExampleKind;
    /** Visibility level */
    visibility: ExampleVisibility;
    /** Short marketing summary (distinct from technical description) */
    summary?: string;
}
/**
 * ExampleSpec - Complete specification for a ContractSpec example.
 *
 * Integrates with AppBlueprintSpec for app configuration and
 * FeatureModuleSpec for feature definitions.
 *
 * @example
 * ```typescript
 * const example: ExampleSpec = {
 *   meta: {
 *     key: 'saas-boilerplate',
 *     version: '1.0.0',
 *     title: 'SaaS Boilerplate',
 *     description: 'Multi-tenant SaaS foundation.',
 *     kind: 'template',
 *     visibility: 'public',
 *     stability: 'experimental',
 *     owners: ['@saas-team'],
 *     tags: ['saas', 'multi-tenant'],
 *   },
 *   surfaces: {
 *     templates: true,
 *     sandbox: { enabled: true, modes: ['playground', 'specs'] },
 *     studio: { enabled: true, installable: true },
 *     mcp: { enabled: true },
 *   },
 *   entrypoints: {
 *     packageName: '@contractspec/example.saas-boilerplate',
 *     feature: './saas-boilerplate.feature',
 *   },
 * };
 * ```
 */
export interface ExampleSpec {
    /** Example metadata (identification, ownership, categorization) */
    meta: ExampleMeta;
    /** Documentation references */
    docs?: ExampleDocumentation;
    /** Surface support configuration */
    surfaces: ExampleSurfaces;
    /** Package entrypoints */
    entrypoints: ExampleEntrypoints;
    /**
     * Inline or referenced AppBlueprintSpec.
     * Use SpecPointer for external reference to a registered blueprint.
     */
    blueprint?: AppBlueprintSpec | SpecPointer;
    /**
     * Features included in this example.
     * Can be inline FeatureModuleSpec objects or FeatureRef references.
     */
    features?: (FeatureModuleSpec | FeatureRef)[];
}
/** Check if a blueprint reference is a SpecPointer (external reference) */
export declare function isSpecPointer(ref: AppBlueprintSpec | SpecPointer | undefined): ref is SpecPointer;
/** Check if a feature reference is a FeatureRef (external reference) */
export declare function isFeatureRef(ref: FeatureModuleSpec | FeatureRef): ref is FeatureRef;
/** Check if a value is a valid ExampleKind */
export declare function isExampleKind(value: unknown): value is ExampleKind;
/** Check if a value is a valid ExampleVisibility */
export declare function isExampleVisibility(value: unknown): value is ExampleVisibility;
