/** * Kern v2 Specification * * The LLM-native language. Swiss-engineered. * Designed by 3 AIs through forge + tribunal + brainstorm. * * Foundation: indent-based, semantic names, key=value props * Styles: shorthand blocks in {} with CSS escape hatch * Meta: theme nodes ($ref), pseudo-selectors (:press, :hover) * Targets: Next.js, React+Tailwind, React Native, Express */ export declare const KERN_VERSION = "4.1.0"; export declare const IR_GRAMMAR = "\ndocument = node+\nnode = indent type (SP prop)* (SP style)? (SP themeref)* NL child*\nchild = node\nindent = \" \"*\ntype = ident\nprop = ident \"=\" value\nvalue = quoted | bare\nquoted = '\"' [^\"]* '\"'\nbare = [^\\s{$]+\nstyle = \"{\" spair (\",\" spair)* \"}\"\nspair = sident \":\" svalue | \":\" pseudo \":\" sident \":\" svalue\npseudo = \"press\" | \"hover\" | \"active\" | \"focus\"\nsident = shorthand | ident\nsvalue = [^,}]+\nthemeref = \"$\" ident\nident = [A-Za-z_][A-Za-z0-9_-]*\nSP = \" \"+\nNL = \"\\n\" | EOF\n"; export declare const NODE_TYPES: readonly ["screen", "page", "row", "col", "card", "grid", "scroll", "text", "image", "progress", "divider", "codeblock", "section", "form", "button", "input", "textarea", "slider", "toggle", "modal", "list", "item", "tabs", "tab", "header", "link", "theme", "doc", "decorator", "server", "route", "middleware", "handler", "schema", "stream", "spawn", "timer", "on", "env", "websocket", "params", "auth", "validate", "respond", "trigger", "cli", "command", "arg", "flag", "import", "extern", "island", "separator", "table", "thead", "tbody", "tr", "th", "td", "scoreboard", "metric", "spinner", "box", "gradient", "state", "animation", "repl", "guard", "parallel", "dispatch", "then", "each", "let", "assign", "local", "comment", "return", "throw", "do", "continue", "break", "if", "while", "for", "with", "layout", "loading", "metadata", "generateMetadata", "notFound", "redirect", "fetch", "type", "interface", "field", "fn", "const", "destructure", "binding", "element", "mapLit", "mapEntry", "setLit", "setItem", "enum", "member", "union", "variant", "indexer", "overload", "service", "class", "method", "getter", "setter", "singleton", "constructor", "signal", "cleanup", "machine", "transition", "error", "module", "export", "use", "from", "config", "store", "test", "describe", "it", "event", "hook", "provider", "effect", "logic", "memo", "callback", "ref", "context", "prop", "returns", "render", "input-area", "output-area", "text-input", "select-input", "multi-select", "confirm-input", "password-input", "status-message", "alert", "ordered-list", "unordered-list", "focus", "app-exit", "static-log", "newline", "layout-row", "layout-col", "layout-stack", "spacer", "screen-embed", "alternate-screen", "scroll-box", "model", "column", "relation", "repository", "dependency", "inject", "cache", "entry", "invalidate", "conditional", "else", "elseif", "component", "select", "option", "group", "icon", "svg", "template", "slot", "body", "derive", "fmt", "cell", "set", "async", "try", "step", "catch", "finally", "filter", "find", "some", "every", "findIndex", "reduce", "map", "flatMap", "flat", "slice", "at", "clamp", "firstTruthy", "coalesce", "firstDefined", "objectMerge", "objectOmit", "objectPick", "objectKeys", "objectValues", "objectEntries", "sort", "reverse", "join", "includes", "indexOf", "lastIndexOf", "concat", "forEach", "compact", "pluck", "unique", "uniqueBy", "groupBy", "partition", "indexBy", "countBy", "chunk", "zip", "range", "take", "drop", "min", "max", "minBy", "maxBy", "sum", "sumBy", "avg", "intersect", "findLast", "findLastIndex", "transform", "action", "actionRegistry", "assume", "invariant", "branch", "path", "resolve", "candidate", "discriminator", "collect", "count", "fanout", "emit", "pattern", "apply", "expect", "recover", "strategy", "reason", "evidence", "needs", "rule", "message", "mcp", "tool", "resource", "prompt", "param", "description", "sampling", "elicitation", "retrieve", "corpus", "source", "chunking", "embed", "vectorStore", "ragIndex", "retriever", "rag", "ragRetrieve", "grounding", "ragEval", "ragCase", "ragAssert", "ragAnswerContract", "answerSpan", "expression-v1"]; export type IRNodeType = (typeof NODE_TYPES)[number]; import { type KernRuntime } from './runtime.js'; /** Register an evolved node type (called at startup from .kern/evolved/). */ export declare function registerEvolvedType(keyword: string): void; /** Unregister an evolved node type (for rollback/testing). */ export declare function unregisterEvolvedType(keyword: string): void; /** Check if a type is a known node type (core or evolved). */ export declare function isKnownNodeType(type: string, runtime?: KernRuntime): boolean; /** Get all dynamically registered evolved types (defensive copy). */ export declare function getEvolvedTypes(): ReadonlySet; /** Clear all dynamic types (for test isolation). */ export declare function clearEvolvedTypes(): void; /** Names reserved for built-ins that are not yet implemented as NODE_TYPES. * Held to prevent evolved-node conflicts before native support lands. */ export declare const RESERVED_FUTURE_NAMES: readonly string[]; /** Reserved keywords — evolved nodes cannot use these. */ export declare const KERN_RESERVED: ReadonlySet; export declare const STYLE_SHORTHANDS: Record; export declare const VALUE_SHORTHANDS: Record;