import * as react_jsx_runtime from 'react/jsx-runtime';
import { UsersPageViewProps, DataSource, RolesPageViewProps, WorkflowsPageViewProps } from '@datatechsolutions/shared-domain/common';
import { AgentModel, AgentTool, AgentRule, WorkflowRun, ModelProviderType } from '../../astrlabe/contracts.js';
import { A as AgentWithPrompts } from '../../index-CnCY-b5V.js';
import { AgentPrompt } from '@datatechsolutions/shared-domain/ports/workflow';
import { R as RuleFormValue, E as ExecutionTimelineLabels } from '../../rule-form-BYJzyork.js';
import { D as DatasourceFormData, A as AnalyticsSummary, R as RunTimelineEntry, M as ModelProviderConnection } from '../../workflow-api-client-uLICOanv.js';
export { a as DIALECT_CATEGORIES, b as DatasourceFormModal, c as DatasourceFormModalProps, d as DatasourceModal, e as DatasourceModalProps, f as findCategory, g as findDialect } from '../../workflow-api-client-uLICOanv.js';
import { ReactNode } from 'react';
import { PlatformRoleDefinition } from '../rbac.js';
import { SecretSummary } from '../windsock-admin-client.js';
import '../../index-BoebbJ44.js';
import '@datatechsolutions/shared-domain';

declare function UsersPageView({ labels, users, onCreateUser, onUpdateRole }: UsersPageViewProps): react_jsx_runtime.JSX.Element;

type AgentsModelsLabels = {
    title: string;
    subtitle: string;
    provider: string;
    enabled: string;
    disabled: string;
    empty: string;
    searchPlaceholder?: string;
};
type Props$9 = {
    labels: AgentsModelsLabels;
    models: AgentModel[];
    loading: boolean;
};
declare function AgentsModelsPageView({ labels, models, loading }: Props$9): react_jsx_runtime.JSX.Element;

type AgentConfigFormInput = {
    agentId?: string;
    name: string;
    role?: string;
    description?: string;
    avatar?: string;
    modelId: string;
    connectionId?: string;
    framework?: string;
    systemPrompt: string;
    userPrompt?: string;
    maxTokens: number;
    temperature: number;
    topP?: number;
    topK?: number;
    difficulty?: string;
    tags?: string[];
    outputSchema?: string;
};
type AgentsConfigLabels = {
    title: string;
    subtitle: string;
    addAgent: string;
    createTitle: string;
    editTitle: string;
    name: string;
    model: string;
    systemPrompt: string;
    maxTokens: number | string;
    temperature: string;
    outputSchema: string;
    outputSchemaPlaceholder: string;
    save: string;
    delete: string;
    edit: string;
    deleteConfirm: string;
    activeVersion: string;
    empty: string;
    searchPlaceholder?: string;
};
type Props$8 = {
    labels: AgentsConfigLabels;
    agents: AgentWithPrompts[];
    models: AgentModel[];
    loading: boolean;
    onCreate: (input: AgentConfigFormInput) => void;
    onUpdate: (agentId: string, input: AgentConfigFormInput) => void;
    onDelete: (agent: AgentWithPrompts) => void;
};
declare function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpdate, onDelete }: Props$8): react_jsx_runtime.JSX.Element;

type PromptFormInput = {
    agentId: string;
    locale: string;
    prompt: string;
    systemPrompt?: string;
    userTemplate?: string;
    isActive: boolean;
    reason?: string;
};
type AgentsPromptsLabels = {
    title: string;
    subtitle: string;
    addPrompt: string;
    createTitle: string;
    editTitle: string;
    agent: string;
    locale: string;
    version: string;
    isActive: string;
    prompt: string;
    systemPrompt: string;
    userTemplate: string;
    reason: string;
    save: string;
    delete: string;
    activate: string;
    deleteConfirm: string;
    empty: string;
    searchPlaceholder?: string;
};
type Props$7 = {
    labels: AgentsPromptsLabels;
    agents: AgentWithPrompts[];
    prompts: AgentPrompt[];
    loading: boolean;
    onCreate: (input: PromptFormInput) => void;
    onActivate: (prompt: AgentPrompt) => void;
    onDelete: (prompt: AgentPrompt) => void;
};
declare function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onActivate, onDelete }: Props$7): react_jsx_runtime.JSX.Element;

declare const TOOL_TYPES: readonly ["http", "function", "database_query", "code_execution", "api_call"];
type ToolType = (typeof TOOL_TYPES)[number];
type ToolParameter = {
    name: string;
    type: 'string' | 'number' | 'boolean' | 'array' | 'object';
    description: string;
    required: boolean;
};
/**
 * Canonical form payload the page emits. The page wrapper turns this
 * into the backend POST/PATCH bodies — parameters go through
 * `parametersToJsonSchema` to produce `inputSchema`, and `handlerConfig`
 * stays as-is.
 */
type ToolDefinitionFormInput = {
    agentToolId?: string;
    name: string;
    description?: string;
    toolType: ToolType;
    parameters: ToolParameter[];
    handlerConfig: Record<string, unknown>;
    enabled: boolean;
    icon?: string;
};
type AgentsToolDefinitionsLabels = {
    title: string;
    subtitle: string;
    addTool: string;
    createTitle: string;
    editTitle: string;
    name: string;
    description: string;
    category: string;
    enabled: string;
    disabled: string;
    icon: string;
    save: string;
    delete: string;
    edit: string;
    deleteConfirm: string;
    empty: string;
    searchPlaceholder?: string;
};
type Props$6 = {
    labels: AgentsToolDefinitionsLabels;
    tools: AgentTool[];
    loading: boolean;
    onCreate: (input: ToolDefinitionFormInput) => void;
    onUpdate: (toolId: string, input: ToolDefinitionFormInput) => void;
    onDelete: (tool: AgentTool) => void;
};
declare function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpdate, onDelete }: Props$6): react_jsx_runtime.JSX.Element;
/**
 * Build a JSON Schema object from the parameter list. Mirrors the
 * format the backend validator (`validate_input_schema`) expects —
 * `{ type: 'object', properties, required }`.
 */
declare function parametersToJsonSchema(params: ToolParameter[]): Record<string, unknown>;
/**
 * Inverse of `parametersToJsonSchema` — hydrate the editor UI from an
 * existing schema so the Edit flow shows what was stored.
 */
declare function jsonSchemaToParameters(schema: unknown): ToolParameter[];

type RulesLabels = {
    title: string;
    subtitle: string;
    addRule: string;
    createTitle: string;
    editTitle: string;
    save: string;
    delete: string;
    edit: string;
    deleteConfirm: string;
    empty: string;
    enabled: string;
    disabled: string;
    order: string;
    searchPlaceholder?: string;
};
type Props$5 = {
    labels: RulesLabels;
    rules: AgentRule[];
    loading: boolean;
    onCreate: (input: RuleFormValue) => void;
    onUpdate: (ruleId: string, input: RuleFormValue) => void;
    onDelete: (rule: AgentRule) => void;
};
declare function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete }: Props$5): react_jsx_runtime.JSX.Element;

type Labels = Record<string, string>;
type DatasourcesPageViewProps = {
    labels: Labels;
    datasources?: DataSource[];
    useSampleData?: boolean;
    onCreate?: (data: DatasourceFormData) => void;
};
declare function DatasourcesPageView({ labels, datasources: externalDatasources, useSampleData, onCreate, }: DatasourcesPageViewProps): react_jsx_runtime.JSX.Element;

type DashboardLabels = {
    title: string;
    subtitle: string;
    totalRuns: string;
    successRate: string;
    avgDuration: string;
    runsByStatus: string;
    perWorkflow: string;
    noData: string;
    runs: string;
};
type Props$4 = {
    labels: DashboardLabels;
    summary: AnalyticsSummary | null;
    loading: boolean;
    /**
     * App-branded logo node rendered in the dashboard hero. Each app passes
     * its own logo (typically a pair of light/dark <img> tags toggled via
     * Tailwind `dark:` classes) so this view stays brand-agnostic.
     */
    appLogo: ReactNode;
};
/**
 * Platform dashboard — a centered hero with the app's logo + subtitle.
 * Metrics and workflow tables live on dedicated pages (Analytics /
 * Workflow Runs); this view intentionally renders only the landing chrome.
 *
 * `summary` and `loading` are kept on the prop type so the page that
 * mounts this view doesn't have to change, but we intentionally don't
 * render them here.
 */
declare function DashboardPageView({ labels, appLogo }: Props$4): react_jsx_runtime.JSX.Element;

type AgentsIndexLabels = {
    title: string;
    subtitle: string;
    configTitle: string;
    configSubtitle: string;
    toolDefinitionsTitle: string;
    toolDefinitionsSubtitle: string;
    modelsTitle: string;
    modelsSubtitle: string;
    promptsTitle: string;
    promptsSubtitle: string;
    searchPlaceholder?: string;
};
declare function AgentsIndexPageView({ labels }: {
    labels: AgentsIndexLabels;
}): react_jsx_runtime.JSX.Element;

type RolesPageViewExtraProps = {
    /**
     * App-defined role definitions, e.g. `{ admin: { id, label, description }, ... }`.
     * Each app passes the output of its own `createPlatformRbac()` call.
     */
    roleDefinitions: Record<string, PlatformRoleDefinition<string>>;
    /**
     * Display options surfaced in the role-assignment modal select. Each
     * entry is `{ value: roleId, label: localizedLabel }`.
     */
    roleOptions: Array<{
        value: string;
        label: string;
    }>;
};
declare function RolesPageView({ labels, users, onAssignRole, roleDefinitions, roleOptions, }: RolesPageViewProps & RolesPageViewExtraProps): react_jsx_runtime.JSX.Element;

declare function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublish }: WorkflowsPageViewProps): react_jsx_runtime.JSX.Element;

type WorkflowRunsLabels = {
    title: string;
    subtitle: string;
    status: string;
    duration: string;
    triggeredBy: string;
    startedAt: string;
    cancel: string;
    replay: string;
    view: string;
    statusPending: string;
    statusRunning: string;
    statusCompleted: string;
    statusFailed: string;
    statusCancelled: string;
    filterAll: string;
    filterStatus: string;
    empty: string;
    timeline?: string;
    searchPlaceholder?: string;
};
type Props$3 = {
    labels: WorkflowRunsLabels;
    runs: WorkflowRun[];
    loading: boolean;
    onCancel: (run: WorkflowRun) => void;
    onReplay: (run: WorkflowRun) => void;
    onView?: (run: WorkflowRun) => void;
    onViewTimeline?: (run: WorkflowRun) => void;
};
declare function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onView, onViewTimeline }: Props$3): react_jsx_runtime.JSX.Element;

type RunTimelineLabels = ExecutionTimelineLabels & {
    title: string;
    subtitle: string;
};
type Props$2 = {
    labels: RunTimelineLabels;
    entries: RunTimelineEntry[];
    loading: boolean;
    runId: string;
};
/**
 * Astrlabe-shaped wrapper around the shared `ExecutionTimelinePanel`
 * (#68). Adds the page chrome (HeroSection + management page wrapper) so
 * the runs page renders consistently with the rest of the platform.
 * Other apps (kori-erp) can drop `ExecutionTimelinePanel` directly
 * inside their own card layouts without taking on this page wrapper.
 */
declare function RunTimelinePageView({ labels, entries, loading, runId }: Props$2): react_jsx_runtime.JSX.Element;

type CreateConnectionInput = {
    providerSlug: string;
    name: string;
    region?: string;
    endpoint?: string;
    credentialRef?: string;
    apiKeyRef?: string;
    modelFilter?: string[];
    config?: Record<string, unknown>;
};
type UpdateConnectionInput = Partial<Omit<CreateConnectionInput, 'providerSlug'>> & {
    enabled?: boolean;
};
type ConnectionFormValue = {
    providerSlug: ModelProviderType;
    name: string;
    region: string;
    endpoint: string;
    /** Plaintext — only present when the user is entering a NEW key. On
     *  save we push this to `/organizations/{id}/secrets` and replace
     *  with the returned UUID before calling the connections API. */
    apiKey: string;
    /** Vault secret UUID — displayed as "••• (set)" in the UI. */
    credentialRef: string;
    modelFilter: string;
    configJson: string;
};
type ConnectionsLabels = {
    title: string;
    subtitle: string;
    add: string;
    createTitle: string;
    editTitle: string;
    save: string;
    delete: string;
    edit: string;
    enable: string;
    disable: string;
    deleteConfirm: string;
    empty: string;
    searchPlaceholder?: string;
};
type CreateSecret = (name: string, value: string) => Promise<{
    id: string;
}>;
type Props$1 = {
    labels: ConnectionsLabels;
    connections: ModelProviderConnection[];
    loading: boolean;
    onCreate: (input: CreateConnectionInput) => Promise<void>;
    onUpdate: (id: string, input: UpdateConnectionInput) => Promise<void>;
    onDelete: (connection: ModelProviderConnection) => Promise<void>;
    /** Takes a secret name + plaintext value, stores it in the vault and
     *  returns the UUID the connections API should reference. */
    onCreateSecret: CreateSecret;
    /**
     * Prefix for auto-generated secret names when the user enters a new
     * API key. Final shape is `${prefix}-${providerSlug}-${timestamp}`.
     * Defaults to `'platform'` so consumers that don't override land on a
     * sensible namespace.
     */
    secretNamePrefix?: string;
};
declare function ConnectionsPageView({ labels, connections, loading, onCreate, onUpdate, onDelete, onCreateSecret, secretNamePrefix, }: Props$1): react_jsx_runtime.JSX.Element;

type CredentialFormInput = {
    name: string;
    value: string;
    secretType: string;
    description?: string;
};
type CredentialsPageViewLabels = {
    title: string;
    subtitle: string;
    addCredential: string;
    createTitle: string;
    name: string;
    namePlaceholder: string;
    value: string;
    valuePlaceholder: string;
    type: string;
    typeGeneric: string;
    typeApiKey: string;
    typeOAuth: string;
    typePassword: string;
    description: string;
    descriptionPlaceholder: string;
    save: string;
    rotate: string;
    disable: string;
    disableConfirm: string;
    expiresAt: string;
    createdAt: string;
    neverExpires: string;
    empty: string;
    searchPlaceholder?: string;
};
type Props = {
    labels: CredentialsPageViewLabels;
    credentials: SecretSummary[];
    loading: boolean;
    onCreate: (input: CredentialFormInput) => void;
    onRotate: (secret: SecretSummary, newValue: string) => void;
    onDisable: (secret: SecretSummary) => void;
};
declare function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate, onDisable }: Props): react_jsx_runtime.JSX.Element;

/**
 * All copy the workspace renders. Caller-supplied so the consuming app
 * stays in control of its i18n catalog. Every key must be supplied — no
 * silent fallbacks — so we catch missing translations at type-check time.
 */
type AgentsWorkspaceLabels = {
    title: string;
    subtitle: string;
    addAgent: string;
    searchPlaceholder: string;
    empty: string;
    emptyMessage: string;
    noSelection: string;
    noSelectionMessage: string;
    generalTab: string;
    promptTab: string;
    toolsTab: string;
    modelTab: string;
    generalSection: string;
    name: string;
    description: string;
    role: string;
    rolePlaceholder: string;
    status: string;
    statusDraft: string;
    statusActive: string;
    statusArchived: string;
    maxTokens: string;
    temperature: string;
    save: string;
    saving: string;
    deleteAgent: string;
    deleteConfirm: string;
    promptSection: string;
    promptCurrent: string;
    promptVersions: string;
    promptVersionsEmpty: string;
    addPrompt: string;
    activate: string;
    activated: string;
    promptLocale: string;
    promptIsActive: string;
    promptText: string;
    promptReason: string;
    promptSystemPrompt: string;
    promptUserTemplate: string;
    toolsSection: string;
    toolsAttached: string;
    toolsAvailable: string;
    toolsEmpty: string;
    attachTool: string;
    detachTool: string;
    modelSection: string;
    model: string;
    connection: string;
    connectionEmpty: string;
    modelEmpty: string;
    createAgentTitle: string;
    createAgentEyebrow?: string;
    presetTitle?: string;
    presetSubtitle?: string;
    presetCustom?: string;
    presetCustomHint?: string;
    identitySection?: string;
    identitySubtitle?: string;
    avatarLabel?: string;
    namePlaceholder?: string;
    behaviorSection?: string;
    behaviorSubtitle?: string;
    promptPlaceholder?: string;
    connectionLabel?: string;
    connectionPickPrompt?: string;
    connectionInline?: string;
    frameworkLabel?: string;
    frameworkAnthropic?: string;
    frameworkLangChain?: string;
    frameworkCrewAI?: string;
    frameworkGoogleADK?: string;
    frameworkOpenAI?: string;
    userPromptLabel?: string;
    userPromptPlaceholder?: string;
    topPLabel?: string;
    topKLabel?: string;
    metadataSection?: string;
    metadataSubtitle?: string;
    difficultyLabel?: string;
    difficultyBeginner?: string;
    difficultyIntermediate?: string;
    difficultyAdvanced?: string;
    difficultyExpert?: string;
    tagsLabel?: string;
    tagsPlaceholder?: string;
    outputSchemaLabel?: string;
    outputSchemaPlaceholder?: string;
    descriptionLabel?: string;
    descriptionPlaceholder?: string;
};
type AgentsWorkspacePageViewProps = {
    labels: AgentsWorkspaceLabels;
    agents: AgentWithPrompts[];
    models: AgentModel[];
    tools: AgentTool[];
    connections: ModelProviderConnection[];
    loading?: boolean;
    /**
     * Per-agent prompt rows (system-prompt history). The page itself does
     * not own loading them — the caller resolves them per agent and feeds
     * the slice corresponding to the currently selected agent via this
     * map keyed by agentId. The view falls back to `[]` for unknown ids.
     */
    promptsByAgent?: Record<string, AgentPrompt[]>;
    onSelectAgent?: (agentId: string | null) => void;
    /**
     * Fires when the user clicks "New agent". The host page navigates to
     * the standalone `/agents/new` wizard — the workspace itself no
     * longer owns the create flow.
     */
    onNewAgent: () => void;
    onUpdateAgent: (id: string, input: AgentConfigFormInput) => Promise<void>;
    onDeleteAgent: (id: string) => Promise<void>;
    onCreatePrompt: (agentId: string, input: PromptFormInput) => Promise<void>;
    onActivatePrompt: (agentId: string, promptId: string) => Promise<void>;
    onAttachTool: (agentId: string, toolId: string) => Promise<void>;
    onDetachTool: (agentId: string, toolId: string) => Promise<void>;
    onUpdateModel: (agentId: string, modelId: string, connectionId: string) => Promise<void>;
};
declare function AgentsWorkspacePageView({ labels, agents, models, tools, connections, loading, promptsByAgent, onSelectAgent, onNewAgent, onUpdateAgent, onDeleteAgent, onCreatePrompt, onActivatePrompt, onAttachTool, onDetachTool, onUpdateModel, }: AgentsWorkspacePageViewProps): react_jsx_runtime.JSX.Element;

type AgentNewWizardLabels = {
    pageTitle: string;
    wizardStepCounter: string;
    wizardBack: string;
    wizardNext: string;
    wizardCancel: string;
    wizardCreate: string;
    wizardCancelConfirm: string;
    wizardStep1Title: string;
    wizardStep1Subtitle: string;
    wizardStep2Title: string;
    wizardStep2Subtitle: string;
    wizardStep3Title: string;
    wizardStep3Subtitle: string;
    wizardStep4Title: string;
    wizardStep4Subtitle: string;
    wizardStep5Title: string;
    wizardStep5Subtitle: string;
    wizardReviewTitle: string;
    wizardReviewEdit: string;
    presetTitle: string;
    presetSubtitle: string;
    presetCustom: string;
    presetCustomHint: string;
    identitySection: string;
    identitySubtitle: string;
    avatarLabel: string;
    namePlaceholder: string;
    behaviorSection: string;
    behaviorSubtitle: string;
    promptPlaceholder: string;
    connectionLabel: string;
    connectionPickPrompt: string;
    connectionInline: string;
    frameworkLabel: string;
    frameworkAnthropic: string;
    frameworkLangChain: string;
    frameworkCrewAI: string;
    frameworkGoogleADK: string;
    frameworkOpenAI: string;
    userPromptLabel: string;
    userPromptPlaceholder: string;
    topPLabel: string;
    topKLabel: string;
    metadataSection: string;
    metadataSubtitle: string;
    difficultyLabel: string;
    difficultyBeginner: string;
    difficultyIntermediate: string;
    difficultyAdvanced: string;
    difficultyExpert: string;
    tagsLabel: string;
    tagsPlaceholder: string;
    outputSchemaLabel: string;
    outputSchemaPlaceholder: string;
    descriptionLabel: string;
    descriptionPlaceholder: string;
    name: string;
    role: string;
    rolePlaceholder: string;
    modelSection: string;
    model: string;
    modelEmpty: string;
    temperature: string;
    maxTokens: string;
    promptSystemPrompt: string;
};
type AgentNewWizardPageViewProps = {
    labels: AgentNewWizardLabels;
    models: AgentModel[];
    connections: ModelProviderConnection[];
    /** Available tools — not edited here but accepted so callers can stay consistent. */
    tools?: AgentTool[];
    /** Reads `?step=N` so refresh restores the active step; defaults to 1. */
    initialStep?: number;
    /** Fires when the user navigates between steps so the host can update the URL. */
    onStepChange?: (step: number) => void;
    /** Called when the user submits the final form. */
    onSubmit: (input: AgentConfigFormInput) => Promise<void>;
    /** Called when the user clicks Cancel (after the host's confirm dialog runs). */
    onCancel: () => void;
};
declare function AgentNewWizardPageView({ labels, models, connections, initialStep, onStepChange, onSubmit, onCancel, }: AgentNewWizardPageViewProps): react_jsx_runtime.JSX.Element;

export { type AgentConfigFormInput, type AgentNewWizardLabels, AgentNewWizardPageView, type AgentNewWizardPageViewProps, type AgentsConfigLabels, AgentsConfigPageView, type AgentsIndexLabels, AgentsIndexPageView, type AgentsModelsLabels, AgentsModelsPageView, type AgentsPromptsLabels, AgentsPromptsPageView, type AgentsToolDefinitionsLabels, AgentsToolDefinitionsPageView, type AgentsWorkspaceLabels, AgentsWorkspacePageView, type AgentsWorkspacePageViewProps, type ConnectionFormValue, type ConnectionsLabels, ConnectionsPageView, type CreateConnectionInput, type CredentialFormInput, CredentialsPageView, type CredentialsPageViewLabels, type DashboardLabels, DashboardPageView, DatasourceFormData, DatasourcesPageView, type DatasourcesPageViewProps, type PromptFormInput, RolesPageView, type RolesPageViewExtraProps, RuleFormValue, type RulesLabels, RulesPageView, type RunTimelineLabels, RunTimelinePageView, TOOL_TYPES, type ToolDefinitionFormInput, type ToolParameter, type ToolType, type UpdateConnectionInput, UsersPageView, type WorkflowRunsLabels, WorkflowRunsPageView, WorkflowsPageView, jsonSchemaToParameters, parametersToJsonSchema };
