/**
 * Standard Library Types
 *
 * Common types and interfaces for the Orbital Standard Library.
 * Extends the core operator system with std-prefixed modules.
 *
 * @packageDocumentation
 */
/**
 * Operator categories for the core expression language.
 */
declare const OPERATOR_CATEGORIES: readonly ["arithmetic", "comparison", "logic", "control", "effect", "collection", "std-math", "std-str", "std-array", "std-object", "std-validate", "std-time", "std-format", "std-async", "std-nn", "std-tensor", "std-train", "std-prob", "std-os", "std-agent", "std-composition", "ml-arch", "ml-effect", "ml-tensor", "ml-graph", "ml-contract", "ml-data"];
type OperatorCategory = (typeof OPERATOR_CATEGORIES)[number];
/**
 * Basic return types for core operators.
 */
type BasicReturnType = 'number' | 'boolean' | 'string' | 'any' | 'void' | 'array';
/**
 * Base metadata for an operator.
 */
interface OperatorMeta {
    /** Operator category */
    category: OperatorCategory;
    /** Minimum number of arguments */
    minArity: number;
    /** Maximum number of arguments (null = unlimited) */
    maxArity: number | null;
    /** Human-readable description */
    description: string;
    /** Whether this operator has side effects (only valid in effect context) */
    hasSideEffects: boolean;
    /** Return type hint - basic types for core operators, extended types for std modules */
    returnType: string;
}
/**
 * Standard library module names.
 * Each module provides a set of operators prefixed with the module name.
 * E.g., 'math' provides 'math/abs', 'math/clamp', etc.
 */
declare const STD_MODULES: readonly ["core", "math", "str", "array", "object", "time", "validate", "format", "async", "nn", "tensor", "train", "prob", "os", "agent", "graph", "contract", "data", "composition"];
type StdModule = (typeof STD_MODULES)[number];
/**
 * Standard library operator categories.
 * These extend the core categories for more granular classification.
 */
declare const STD_OPERATOR_CATEGORIES: readonly ["std-math", "std-str", "std-array", "std-object", "std-time", "std-validate", "std-format", "std-async", "std-nn", "std-tensor", "std-train", "std-prob", "std-os", "std-agent", "std-composition", "ml-arch", "ml-effect", "ml-tensor", "ml-graph", "ml-contract", "ml-data"];
type StdOperatorCategory = (typeof STD_OPERATOR_CATEGORIES)[number];
/**
 * Structured parameter type reference (Schema v2).
 *
 * A plain string (e.g. `'number'`, `'string'`) is still accepted for
 * backward compatibility with simple primitives. Richer shapes let effect
 * operators declare literal unions, UI slots, event keys, and entity refs
 * so compilers, LLM prompt generators, and validators can reason about the
 * argument shape without string heuristics.
 */
type OperatorTypeRef = string | {
    kind: 'union';
    of: OperatorTypeRef[];
} | {
    kind: 'literal';
    value: string | number | boolean;
} | {
    kind: 'array';
    of: OperatorTypeRef;
} | {
    kind: 'object';
    fields: Record<string, OperatorTypeRef>;
    open?: boolean;
} | {
    kind: 'entity';
    collection?: string;
} | {
    kind: 'entityRef';
} | {
    kind: 'eventKey';
    scope?: 'internal' | 'external';
} | {
    kind: 'uiSlot';
} | {
    kind: 'patternType';
} | {
    kind: 'binding';
    shape?: OperatorTypeRef;
} | {
    kind: 'sexpr';
};
/**
 * Effect-specific metadata (Schema v2).
 * Populated only when `hasSideEffects: true`. Describes what the effect
 * produces back onto the runtime bus or state tree so consumers (Rust
 * validator, LLM skill gen, verify) can trace downstream reactions.
 */
interface OperatorEffectMeta {
    kind: 'emit' | 'persist' | 'fetch' | 'ref' | 'render-ui' | 'navigate' | 'notify' | 'spawn' | 'despawn' | 'set' | 'call-service' | 'log' | 'custom';
    /** What the effect puts onto the bus / state when it resolves. */
    produces?: OperatorTypeRef;
    /** Effect-specific config keys and their declared types. */
    config?: Record<string, OperatorTypeRef>;
}
/**
 * Extended operator metadata for std library operators.
 * Adds parameter descriptions and examples.
 */
interface StdOperatorMeta extends OperatorMeta {
    /** The std module this operator belongs to */
    module: StdModule;
    /** Parameter names and descriptions */
    params?: {
        name: string;
        type: OperatorTypeRef;
        description: string;
        optional?: boolean;
        defaultValue?: unknown;
    }[];
    /** Example usage */
    example?: string;
    /** Whether this operator accepts a lambda expression argument */
    acceptsLambda?: boolean;
    /** Position of the lambda argument (0-indexed) */
    lambdaArgPosition?: number;
    /** Compile-time operator (resolved during .lolo lowering, not at runtime) */
    compileTime?: boolean;
    /** Schema v2: structured metadata for effect operators */
    effect?: OperatorEffectMeta;
}
/**
 * Type guard to check if an operator category is a std category.
 */
declare function isStdCategory(category: string): category is StdOperatorCategory;
/**
 * Get the module name from a std operator name.
 * E.g., 'math/clamp' -> 'math'
 */
declare function getModuleFromOperator(operator: string): StdModule | null;
/**
 * Get the function name from a std operator.
 * E.g., 'math/clamp' -> 'clamp'
 */
declare function getFunctionFromOperator(operator: string): string | null;
/**
 * Check if an operator name is a std library operator.
 * Std library operators are prefixed with their module name (e.g., 'math/', 'str/').
 */
declare function isStdOperator(operator: string): boolean;
/**
 * Create a std operator name from module and function name.
 * E.g., ('math', 'clamp') -> 'math/clamp'
 */
declare function makeStdOperator(module: StdModule, fn: string): string;

export { type BasicReturnType as B, type OperatorMeta as O, type StdOperatorMeta as S, type StdModule as a, OPERATOR_CATEGORIES as b, type OperatorCategory as c, type OperatorEffectMeta as d, type OperatorTypeRef as e, STD_MODULES as f, STD_OPERATOR_CATEGORIES as g, type StdOperatorCategory as h, getFunctionFromOperator as i, getModuleFromOperator as j, isStdCategory as k, isStdOperator as l, makeStdOperator as m };
