import { z } from 'zod';

/**
 * User permission level schema
 */
declare const UserPermissionLevelSchema: z.ZodEnum<["anchor", "trusted", "public"]>;
type UserPermissionLevel = z.infer<typeof UserPermissionLevelSchema>;
declare const entityActionPolicyConfigSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
    create: z.ZodOptional<z.ZodEnum<["never", "anchor", "trusted", "public"]>>;
    update: z.ZodOptional<z.ZodEnum<["never", "anchor", "trusted", "public"]>>;
    delete: z.ZodOptional<z.ZodEnum<["never", "anchor", "trusted", "public"]>>;
    extract: z.ZodOptional<z.ZodEnum<["never", "anchor", "trusted", "public"]>>;
    publish: z.ZodOptional<z.ZodEnum<["never", "anchor", "trusted", "public"]>>;
}, "strict", z.ZodTypeAny, {
    create?: "anchor" | "trusted" | "public" | "never" | undefined;
    update?: "anchor" | "trusted" | "public" | "never" | undefined;
    delete?: "anchor" | "trusted" | "public" | "never" | undefined;
    extract?: "anchor" | "trusted" | "public" | "never" | undefined;
    publish?: "anchor" | "trusted" | "public" | "never" | undefined;
}, {
    create?: "anchor" | "trusted" | "public" | "never" | undefined;
    update?: "anchor" | "trusted" | "public" | "never" | undefined;
    delete?: "anchor" | "trusted" | "public" | "never" | undefined;
    extract?: "anchor" | "trusted" | "public" | "never" | undefined;
    publish?: "anchor" | "trusted" | "public" | "never" | undefined;
}>>;
type EntityActionPolicyConfig = z.infer<typeof entityActionPolicyConfigSchema>;
/**
 * Generic interface for items with visibility
 */
interface WithVisibility {
    visibility?: UserPermissionLevel;
}
/**
 * Permission rule for pattern-based permission matching
 */
interface PermissionRule {
    pattern: string;
    level: UserPermissionLevel;
}
/**
 * Configuration for the permission system
 */
interface PermissionConfig {
    anchors?: string[];
    trusted?: string[];
    rules?: PermissionRule[];
    entityActions?: EntityActionPolicyConfig;
}

/**
 * Best-effort extension metadata carried across public DTO boundaries.
 *
 * Individual keys are not stable public API. When a metadata value becomes a
 * documented contract, hoist it to a typed top-level field on the owning DTO
 * schema and keep this bag only as optional extension data.
 */
declare const ExtensionMetadataSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;

declare const MessageResponseSchema: z.ZodUnion<[z.ZodObject<{
    success: z.ZodBoolean;
    data: z.ZodOptional<z.ZodUnknown>;
    error: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    success: boolean;
    data?: unknown;
    error?: string | undefined;
}, {
    success: boolean;
    data?: unknown;
    error?: string | undefined;
}>, z.ZodObject<{
    noop: z.ZodLiteral<true>;
}, "strip", z.ZodTypeAny, {
    noop: true;
}, {
    noop: true;
}>]>;
type MessageResponse<T = unknown> = ({
    success: boolean;
    error?: string | undefined;
} & {
    data?: T | undefined;
}) | {
    noop: true;
};
declare const BaseMessageSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    type: z.ZodString;
    source: z.ZodString;
    target: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, "strip", z.ZodTypeAny, {
    type: string;
    id: string;
    timestamp: string;
    source: string;
    target?: string | undefined;
    metadata?: Record<string, unknown> | undefined;
}, {
    type: string;
    id: string;
    timestamp: string;
    source: string;
    target?: string | undefined;
    metadata?: Record<string, unknown> | undefined;
}>;
type BaseMessage = z.infer<typeof BaseMessageSchema>;
type MessageWithPayload<T = unknown> = BaseMessage & {
    payload: T;
};
interface MessageSendOptions {
    target?: string;
    metadata?: z.infer<typeof ExtensionMetadataSchema>;
    broadcast?: boolean;
}
interface MessageSendRequest<T = unknown> extends MessageSendOptions {
    type: string;
    payload: T;
}
type MessageSender<T = unknown, R = unknown> = (request: MessageSendRequest<T>) => Promise<MessageResponse<R>>;
interface MessageContext {
    userId?: string;
    channelId?: string;
    messageId?: string;
    timestamp?: string;
    interfaceType?: string;
    userPermissionLevel?: UserPermissionLevel;
    threadId?: string;
}

/** Section definition schema for site routes. */
declare const SectionDefinitionSchema: z.ZodObject<{
    id: z.ZodString;
    template: z.ZodString;
    content: z.ZodOptional<z.ZodUnknown>;
    dataQuery: z.ZodOptional<z.ZodObject<{
        entityType: z.ZodOptional<z.ZodString>;
        template: z.ZodOptional<z.ZodString>;
        query: z.ZodOptional<z.ZodObject<{
            id: z.ZodOptional<z.ZodString>;
            limit: z.ZodOptional<z.ZodNumber>;
            offset: z.ZodOptional<z.ZodNumber>;
        }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
            id: z.ZodOptional<z.ZodString>;
            limit: z.ZodOptional<z.ZodNumber>;
            offset: z.ZodOptional<z.ZodNumber>;
        }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
            id: z.ZodOptional<z.ZodString>;
            limit: z.ZodOptional<z.ZodNumber>;
            offset: z.ZodOptional<z.ZodNumber>;
        }, z.ZodTypeAny, "passthrough">>>;
    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
        entityType: z.ZodOptional<z.ZodString>;
        template: z.ZodOptional<z.ZodString>;
        query: z.ZodOptional<z.ZodObject<{
            id: z.ZodOptional<z.ZodString>;
            limit: z.ZodOptional<z.ZodNumber>;
            offset: z.ZodOptional<z.ZodNumber>;
        }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
            id: z.ZodOptional<z.ZodString>;
            limit: z.ZodOptional<z.ZodNumber>;
            offset: z.ZodOptional<z.ZodNumber>;
        }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
            id: z.ZodOptional<z.ZodString>;
            limit: z.ZodOptional<z.ZodNumber>;
            offset: z.ZodOptional<z.ZodNumber>;
        }, z.ZodTypeAny, "passthrough">>>;
    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
        entityType: z.ZodOptional<z.ZodString>;
        template: z.ZodOptional<z.ZodString>;
        query: z.ZodOptional<z.ZodObject<{
            id: z.ZodOptional<z.ZodString>;
            limit: z.ZodOptional<z.ZodNumber>;
            offset: z.ZodOptional<z.ZodNumber>;
        }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
            id: z.ZodOptional<z.ZodString>;
            limit: z.ZodOptional<z.ZodNumber>;
            offset: z.ZodOptional<z.ZodNumber>;
        }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
            id: z.ZodOptional<z.ZodString>;
            limit: z.ZodOptional<z.ZodNumber>;
            offset: z.ZodOptional<z.ZodNumber>;
        }, z.ZodTypeAny, "passthrough">>>;
    }, z.ZodTypeAny, "passthrough">>>;
    order: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
    id: string;
    template: string;
    content?: unknown;
    dataQuery?: z.objectOutputType<{
        entityType: z.ZodOptional<z.ZodString>;
        template: z.ZodOptional<z.ZodString>;
        query: z.ZodOptional<z.ZodObject<{
            id: z.ZodOptional<z.ZodString>;
            limit: z.ZodOptional<z.ZodNumber>;
            offset: z.ZodOptional<z.ZodNumber>;
        }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
            id: z.ZodOptional<z.ZodString>;
            limit: z.ZodOptional<z.ZodNumber>;
            offset: z.ZodOptional<z.ZodNumber>;
        }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
            id: z.ZodOptional<z.ZodString>;
            limit: z.ZodOptional<z.ZodNumber>;
            offset: z.ZodOptional<z.ZodNumber>;
        }, z.ZodTypeAny, "passthrough">>>;
    }, z.ZodTypeAny, "passthrough"> | undefined;
    order?: number | undefined;
}, {
    id: string;
    template: string;
    content?: unknown;
    dataQuery?: z.objectInputType<{
        entityType: z.ZodOptional<z.ZodString>;
        template: z.ZodOptional<z.ZodString>;
        query: z.ZodOptional<z.ZodObject<{
            id: z.ZodOptional<z.ZodString>;
            limit: z.ZodOptional<z.ZodNumber>;
            offset: z.ZodOptional<z.ZodNumber>;
        }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
            id: z.ZodOptional<z.ZodString>;
            limit: z.ZodOptional<z.ZodNumber>;
            offset: z.ZodOptional<z.ZodNumber>;
        }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
            id: z.ZodOptional<z.ZodString>;
            limit: z.ZodOptional<z.ZodNumber>;
            offset: z.ZodOptional<z.ZodNumber>;
        }, z.ZodTypeAny, "passthrough">>>;
    }, z.ZodTypeAny, "passthrough"> | undefined;
    order?: number | undefined;
}>;
/** Navigation slot types. */
declare const NavigationSlots: readonly ["primary", "secondary"];
type NavigationSlot = (typeof NavigationSlots)[number];
/** Display and behavior metadata for an entity type. */
interface EntityDisplayEntry {
    label: string;
    pluralName?: string;
    /** Layout name for this entity type's generated routes (defaults to "default") */
    layout?: string;
    /** Enable pagination for list pages */
    paginate?: boolean;
    /** Items per page (default: 10) */
    pageSize?: number;
    navigation?: {
        show?: boolean;
        slot?: NavigationSlot;
        priority?: number;
    };
}
/** Route definition schema. */
declare const RouteDefinitionSchema: z.ZodObject<{
    id: z.ZodString;
    path: z.ZodString;
    title: z.ZodDefault<z.ZodString>;
    /** Bare display label without any page-suffix. Used for visual headings on list pages. */
    pageLabel: z.ZodOptional<z.ZodString>;
    description: z.ZodDefault<z.ZodString>;
    sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        template: z.ZodString;
        content: z.ZodOptional<z.ZodUnknown>;
        dataQuery: z.ZodOptional<z.ZodObject<{
            entityType: z.ZodOptional<z.ZodString>;
            template: z.ZodOptional<z.ZodString>;
            query: z.ZodOptional<z.ZodObject<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
            entityType: z.ZodOptional<z.ZodString>;
            template: z.ZodOptional<z.ZodString>;
            query: z.ZodOptional<z.ZodObject<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
            entityType: z.ZodOptional<z.ZodString>;
            template: z.ZodOptional<z.ZodString>;
            query: z.ZodOptional<z.ZodObject<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough">>>;
        order: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        id: string;
        template: string;
        content?: unknown;
        dataQuery?: z.objectOutputType<{
            entityType: z.ZodOptional<z.ZodString>;
            template: z.ZodOptional<z.ZodString>;
            query: z.ZodOptional<z.ZodObject<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough"> | undefined;
        order?: number | undefined;
    }, {
        id: string;
        template: string;
        content?: unknown;
        dataQuery?: z.objectInputType<{
            entityType: z.ZodOptional<z.ZodString>;
            template: z.ZodOptional<z.ZodString>;
            query: z.ZodOptional<z.ZodObject<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough"> | undefined;
        order?: number | undefined;
    }>, "many">>;
    layout: z.ZodDefault<z.ZodString>;
    fullscreen: z.ZodOptional<z.ZodBoolean>;
    pluginId: z.ZodOptional<z.ZodString>;
    sourceEntityType: z.ZodOptional<z.ZodString>;
    external: z.ZodOptional<z.ZodBoolean>;
    navigation: z.ZodOptional<z.ZodObject<{
        show: z.ZodDefault<z.ZodBoolean>;
        label: z.ZodOptional<z.ZodString>;
        slot: z.ZodDefault<z.ZodEnum<["primary", "secondary"]>>;
        priority: z.ZodDefault<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        show: boolean;
        slot: "primary" | "secondary";
        priority: number;
        label?: string | undefined;
    }, {
        show?: boolean | undefined;
        label?: string | undefined;
        slot?: "primary" | "secondary" | undefined;
        priority?: number | undefined;
    }>>;
}, "strip", z.ZodTypeAny, {
    id: string;
    path: string;
    title: string;
    description: string;
    sections: {
        id: string;
        template: string;
        content?: unknown;
        dataQuery?: z.objectOutputType<{
            entityType: z.ZodOptional<z.ZodString>;
            template: z.ZodOptional<z.ZodString>;
            query: z.ZodOptional<z.ZodObject<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough"> | undefined;
        order?: number | undefined;
    }[];
    layout: string;
    pageLabel?: string | undefined;
    fullscreen?: boolean | undefined;
    pluginId?: string | undefined;
    sourceEntityType?: string | undefined;
    external?: boolean | undefined;
    navigation?: {
        show: boolean;
        slot: "primary" | "secondary";
        priority: number;
        label?: string | undefined;
    } | undefined;
}, {
    id: string;
    path: string;
    title?: string | undefined;
    pageLabel?: string | undefined;
    description?: string | undefined;
    sections?: {
        id: string;
        template: string;
        content?: unknown;
        dataQuery?: z.objectInputType<{
            entityType: z.ZodOptional<z.ZodString>;
            template: z.ZodOptional<z.ZodString>;
            query: z.ZodOptional<z.ZodObject<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                id: z.ZodOptional<z.ZodString>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough"> | undefined;
        order?: number | undefined;
    }[] | undefined;
    layout?: string | undefined;
    fullscreen?: boolean | undefined;
    pluginId?: string | undefined;
    sourceEntityType?: string | undefined;
    external?: boolean | undefined;
    navigation?: {
        show?: boolean | undefined;
        label?: string | undefined;
        slot?: "primary" | "secondary" | undefined;
        priority?: number | undefined;
    } | undefined;
}>;
type SectionDefinition = z.infer<typeof SectionDefinitionSchema>;
type RouteDefinition = z.infer<typeof RouteDefinitionSchema>;
type RouteDefinitionInput = z.input<typeof RouteDefinitionSchema>;
/** Message payload schemas for route operations. */
declare const RegisterRoutesPayloadSchema: z.ZodObject<{
    routes: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        path: z.ZodString;
        title: z.ZodDefault<z.ZodString>;
        /** Bare display label without any page-suffix. Used for visual headings on list pages. */
        pageLabel: z.ZodOptional<z.ZodString>;
        description: z.ZodDefault<z.ZodString>;
        sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            template: z.ZodString;
            content: z.ZodOptional<z.ZodUnknown>;
            dataQuery: z.ZodOptional<z.ZodObject<{
                entityType: z.ZodOptional<z.ZodString>;
                template: z.ZodOptional<z.ZodString>;
                query: z.ZodOptional<z.ZodObject<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                entityType: z.ZodOptional<z.ZodString>;
                template: z.ZodOptional<z.ZodString>;
                query: z.ZodOptional<z.ZodObject<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                entityType: z.ZodOptional<z.ZodString>;
                template: z.ZodOptional<z.ZodString>;
                query: z.ZodOptional<z.ZodObject<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">>>;
            order: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            id: string;
            template: string;
            content?: unknown;
            dataQuery?: z.objectOutputType<{
                entityType: z.ZodOptional<z.ZodString>;
                template: z.ZodOptional<z.ZodString>;
                query: z.ZodOptional<z.ZodObject<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough"> | undefined;
            order?: number | undefined;
        }, {
            id: string;
            template: string;
            content?: unknown;
            dataQuery?: z.objectInputType<{
                entityType: z.ZodOptional<z.ZodString>;
                template: z.ZodOptional<z.ZodString>;
                query: z.ZodOptional<z.ZodObject<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough"> | undefined;
            order?: number | undefined;
        }>, "many">>;
        layout: z.ZodDefault<z.ZodString>;
        fullscreen: z.ZodOptional<z.ZodBoolean>;
        pluginId: z.ZodOptional<z.ZodString>;
        sourceEntityType: z.ZodOptional<z.ZodString>;
        external: z.ZodOptional<z.ZodBoolean>;
        navigation: z.ZodOptional<z.ZodObject<{
            show: z.ZodDefault<z.ZodBoolean>;
            label: z.ZodOptional<z.ZodString>;
            slot: z.ZodDefault<z.ZodEnum<["primary", "secondary"]>>;
            priority: z.ZodDefault<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            show: boolean;
            slot: "primary" | "secondary";
            priority: number;
            label?: string | undefined;
        }, {
            show?: boolean | undefined;
            label?: string | undefined;
            slot?: "primary" | "secondary" | undefined;
            priority?: number | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        id: string;
        path: string;
        title: string;
        description: string;
        sections: {
            id: string;
            template: string;
            content?: unknown;
            dataQuery?: z.objectOutputType<{
                entityType: z.ZodOptional<z.ZodString>;
                template: z.ZodOptional<z.ZodString>;
                query: z.ZodOptional<z.ZodObject<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough"> | undefined;
            order?: number | undefined;
        }[];
        layout: string;
        pageLabel?: string | undefined;
        fullscreen?: boolean | undefined;
        pluginId?: string | undefined;
        sourceEntityType?: string | undefined;
        external?: boolean | undefined;
        navigation?: {
            show: boolean;
            slot: "primary" | "secondary";
            priority: number;
            label?: string | undefined;
        } | undefined;
    }, {
        id: string;
        path: string;
        title?: string | undefined;
        pageLabel?: string | undefined;
        description?: string | undefined;
        sections?: {
            id: string;
            template: string;
            content?: unknown;
            dataQuery?: z.objectInputType<{
                entityType: z.ZodOptional<z.ZodString>;
                template: z.ZodOptional<z.ZodString>;
                query: z.ZodOptional<z.ZodObject<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough"> | undefined;
            order?: number | undefined;
        }[] | undefined;
        layout?: string | undefined;
        fullscreen?: boolean | undefined;
        pluginId?: string | undefined;
        sourceEntityType?: string | undefined;
        external?: boolean | undefined;
        navigation?: {
            show?: boolean | undefined;
            label?: string | undefined;
            slot?: "primary" | "secondary" | undefined;
            priority?: number | undefined;
        } | undefined;
    }>, "many">;
    pluginId: z.ZodString;
}, "strip", z.ZodTypeAny, {
    pluginId: string;
    routes: {
        id: string;
        path: string;
        title: string;
        description: string;
        sections: {
            id: string;
            template: string;
            content?: unknown;
            dataQuery?: z.objectOutputType<{
                entityType: z.ZodOptional<z.ZodString>;
                template: z.ZodOptional<z.ZodString>;
                query: z.ZodOptional<z.ZodObject<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough"> | undefined;
            order?: number | undefined;
        }[];
        layout: string;
        pageLabel?: string | undefined;
        fullscreen?: boolean | undefined;
        pluginId?: string | undefined;
        sourceEntityType?: string | undefined;
        external?: boolean | undefined;
        navigation?: {
            show: boolean;
            slot: "primary" | "secondary";
            priority: number;
            label?: string | undefined;
        } | undefined;
    }[];
}, {
    pluginId: string;
    routes: {
        id: string;
        path: string;
        title?: string | undefined;
        pageLabel?: string | undefined;
        description?: string | undefined;
        sections?: {
            id: string;
            template: string;
            content?: unknown;
            dataQuery?: z.objectInputType<{
                entityType: z.ZodOptional<z.ZodString>;
                template: z.ZodOptional<z.ZodString>;
                query: z.ZodOptional<z.ZodObject<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    id: z.ZodOptional<z.ZodString>;
                    limit: z.ZodOptional<z.ZodNumber>;
                    offset: z.ZodOptional<z.ZodNumber>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough"> | undefined;
            order?: number | undefined;
        }[] | undefined;
        layout?: string | undefined;
        fullscreen?: boolean | undefined;
        pluginId?: string | undefined;
        sourceEntityType?: string | undefined;
        external?: boolean | undefined;
        navigation?: {
            show?: boolean | undefined;
            label?: string | undefined;
            slot?: "primary" | "secondary" | undefined;
            priority?: number | undefined;
        } | undefined;
    }[];
}>;
declare const UnregisterRoutesPayloadSchema: z.ZodObject<{
    paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    pluginId: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    pluginId?: string | undefined;
    paths?: string[] | undefined;
}, {
    pluginId?: string | undefined;
    paths?: string[] | undefined;
}>;
declare const ListRoutesPayloadSchema: z.ZodObject<{
    pluginId: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    pluginId?: string | undefined;
}, {
    pluginId?: string | undefined;
}>;
declare const GetRoutePayloadSchema: z.ZodObject<{
    path: z.ZodString;
}, "strip", z.ZodTypeAny, {
    path: string;
}, {
    path: string;
}>;
/** Navigation item shape for extracted navigation data. */
declare const NavigationItemSchema: z.ZodObject<{
    label: z.ZodString;
    href: z.ZodString;
    priority: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    label: string;
    priority: number;
    href: string;
}, {
    label: string;
    priority: number;
    href: string;
}>;
type NavigationItem = z.infer<typeof NavigationItemSchema>;

declare const apiRouteDefinitionSchema: z.ZodObject<{
    /** Path suffix (prefixed with /api/{pluginId}) */
    path: z.ZodString;
    /** HTTP method */
    method: z.ZodDefault<z.ZodEnum<["GET", "POST", "PUT", "DELETE"]>>;
    /** Tool to invoke (without plugin prefix) */
    tool: z.ZodString;
    /** Allow unauthenticated access */
    public: z.ZodDefault<z.ZodBoolean>;
    /** Redirect URL on success (for form submissions) */
    successRedirect: z.ZodOptional<z.ZodString>;
    /** Redirect URL on error (for form submissions) */
    errorRedirect: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    path: string;
    method: "GET" | "POST" | "PUT" | "DELETE";
    tool: string;
    public: boolean;
    successRedirect?: string | undefined;
    errorRedirect?: string | undefined;
}, {
    path: string;
    tool: string;
    method?: "GET" | "POST" | "PUT" | "DELETE" | undefined;
    public?: boolean | undefined;
    successRedirect?: string | undefined;
    errorRedirect?: string | undefined;
}>;
type ApiRouteDefinition = z.infer<typeof apiRouteDefinitionSchema>;
/**
 * A registered API route with full path and plugin context
 * Returned by Shell.getPluginApiRoutes()
 */
interface RegisteredApiRoute {
    /** The plugin that registered this route */
    pluginId: string;
    /** Full path including /api/{pluginId} prefix */
    fullPath: string;
    /** The original route definition */
    definition: ApiRouteDefinition;
}

declare const WebRouteMethods: readonly ["GET", "POST", "PUT", "DELETE", "OPTIONS"];
type WebRouteMethod = (typeof WebRouteMethods)[number];
type WebRouteHandler = (request: Request) => Response | Promise<Response>;
interface WebRouteDefinition {
    /** Absolute mounted path (e.g. "/cms" or "/cms-config") */
    path: string;
    /** HTTP method */
    method?: WebRouteMethod;
    /** Allow unauthenticated access */
    public?: boolean;
    /** Request handler */
    handler: WebRouteHandler;
}
interface RegisteredWebRoute {
    /** The plugin that registered this route */
    pluginId: string;
    /** The mounted path */
    fullPath: string;
    /** The original route definition */
    definition: WebRouteDefinition;
}

/**
 * Daemon health status schema
 */
declare const DaemonHealthSchema: z.ZodObject<{
    status: z.ZodEnum<["healthy", "warning", "error", "unknown"]>;
    message: z.ZodOptional<z.ZodString>;
    lastCheck: z.ZodOptional<z.ZodDate>;
    details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, "strip", z.ZodTypeAny, {
    status: "unknown" | "healthy" | "warning" | "error";
    message?: string | undefined;
    lastCheck?: Date | undefined;
    details?: Record<string, unknown> | undefined;
}, {
    status: "unknown" | "healthy" | "warning" | "error";
    message?: string | undefined;
    lastCheck?: Date | undefined;
    details?: Record<string, unknown> | undefined;
}>;
type DaemonHealth = z.infer<typeof DaemonHealthSchema>;
/**
 * Daemon status info schema for validation
 */
declare const DaemonStatusInfoSchema: z.ZodObject<{
    name: z.ZodString;
    pluginId: z.ZodString;
    status: z.ZodString;
    health: z.ZodOptional<z.ZodObject<{
        status: z.ZodEnum<["healthy", "warning", "error", "unknown"]>;
        message: z.ZodOptional<z.ZodString>;
        lastCheck: z.ZodOptional<z.ZodDate>;
        details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, "strip", z.ZodTypeAny, {
        status: "unknown" | "healthy" | "warning" | "error";
        message?: string | undefined;
        lastCheck?: Date | undefined;
        details?: Record<string, unknown> | undefined;
    }, {
        status: "unknown" | "healthy" | "warning" | "error";
        message?: string | undefined;
        lastCheck?: Date | undefined;
        details?: Record<string, unknown> | undefined;
    }>>;
}, "strip", z.ZodTypeAny, {
    status: string;
    name: string;
    pluginId: string;
    health?: {
        status: "unknown" | "healthy" | "warning" | "error";
        message?: string | undefined;
        lastCheck?: Date | undefined;
        details?: Record<string, unknown> | undefined;
    } | undefined;
}, {
    status: string;
    name: string;
    pluginId: string;
    health?: {
        status: "unknown" | "healthy" | "warning" | "error";
        message?: string | undefined;
        lastCheck?: Date | undefined;
        details?: Record<string, unknown> | undefined;
    } | undefined;
}>;
type DaemonStatusInfo = z.infer<typeof DaemonStatusInfoSchema>;
/**
 * Daemon interface for long-running interface processes
 */
interface Daemon {
    /**
     * Start the daemon - called when plugin is initialized
     */
    start: () => Promise<void>;
    /**
     * Stop the daemon - called when plugin is unloaded/shutdown
     */
    stop: () => Promise<void>;
    /**
     * Optional health check - called periodically to monitor daemon health
     */
    healthCheck?: () => Promise<DaemonHealth>;
}
/**
 * Information about a registered daemon
 */
interface DaemonInfo {
    name: string;
    daemon: Daemon;
    pluginId: string;
    status: "stopped" | "starting" | "running" | "stopping" | "error";
    health?: DaemonHealth;
    error?: Error;
    startedAt?: Date;
    stoppedAt?: Date;
}

export { BaseMessageSchema, GetRoutePayloadSchema, ListRoutesPayloadSchema, MessageResponseSchema, NavigationSlots, RegisterRoutesPayloadSchema, RouteDefinitionSchema, UnregisterRoutesPayloadSchema, UserPermissionLevelSchema };
export type { ApiRouteDefinition, BaseMessage, Daemon, DaemonHealth, DaemonInfo, DaemonStatusInfo, EntityDisplayEntry, MessageContext, MessageResponse, MessageSendOptions, MessageSender, MessageWithPayload, NavigationItem, NavigationSlot, PermissionConfig, PermissionRule, RegisteredApiRoute, RegisteredWebRoute, RouteDefinition, RouteDefinitionInput, SectionDefinition, UserPermissionLevel, WebRouteDefinition, WebRouteHandler, WebRouteMethod, WithVisibility };
