/** * Constants for `conditionType: 'llm_agent'` rule configuration. * * The `llm_agent` rule is composed of two parts: * - **Prompt** — the user-facing Skill entity (`/api/v1/llm/prompts`). * Owned by the Skills page. The rule references it via * `trigger.sourceConfig.promptName`. * - **Rule** — the `ContentRule` (owned by the Fixed Rules editor). * Carries trigger mode, read-only MCP `queryTools` allowlist, * `executionParams.llmEval` knobs (`maxIterations` / `budgetUsd`), * and the `executionType`/`executionParams` shape (single action or * action chain — same shape the fixed-rule builder emits). * * Reference: `risk-rules-api-guide.md` §7.B (LLM evaluator behaviour), * §7.B Sample 7B.5 (canonical llm_agent payload), §8.B (rule editor knobs). */ /** The full read-only MCP tool set the evaluator accepts. The dashboard * only ever offers these — the engine rejects anything else with * `tool '…' is not available (read-only)`. */ export declare const LLM_QUERY_TOOL: { readonly CONTENT_QUERY: "content_query"; readonly CONTENT_GET: "content_get"; readonly EXECUTE_REPORT: "execute_report"; readonly GET_SCHEMA: "get_schema"; readonly LIST_CTS: "list_cts"; readonly CH_QUERY: "ch_query"; }; /** Read-only MCP tool union — derived from {@link LLM_QUERY_TOOL}. */ export type LlmQueryTool = (typeof LLM_QUERY_TOOL)[keyof typeof LLM_QUERY_TOOL]; /** Human-labelled option for the queryTools multi-select. */ export interface LlmQueryToolOption { label: string; value: LlmQueryTool; /** Short hint shown under the label — explains what the tool does. */ hint: string; } /** All {@link LlmQueryTool} options in the canonical order. */ export declare const LLM_QUERY_TOOL_OPTIONS: readonly LlmQueryToolOption[]; /** The minimum allowlist the engine recommends for scan-mode rules. */ export declare const DEFAULT_LLM_QUERY_TOOLS: readonly LlmQueryTool[]; /** Per-rule LLM-eval knobs. Bounds are enforced by * `eaera_cms/core/rules/llm_evaluator.py`: `maxIterations` defaults to 5 * and is hard-capped at 20; `budgetUsd` defaults to 1.0 and is enforced * before every LLM call; `maxTokens` caps the per-completion token output * (no temperature — the backend does not accept it). */ export declare const LLM_EVAL_BOUNDS: { readonly maxIterations: { readonly min: 1; readonly default: 5; readonly max: 20; }; readonly budgetUsd: { readonly min: 0; readonly default: 1; }; readonly maxTokens: { readonly min: 1; readonly default: 1024; readonly max: 32000; }; }; /** Shape of `executionParams.llmEval` — the engine reads both fields at * `LLMConditionEvaluator.run_iteration()` time. */ export interface LlmEval { maxIterations: number; budgetUsd: number; /** Max tokens per completion. */ maxTokens?: number; } /** Read `executionParams.llmEval` from a stored rule, with defaults. */ export declare const llmEvalOf: (executionParams: Record | null | undefined) => LlmEval; /** Read `trigger.sourceConfig.queryTools` from a stored trigger. * * ⚠️ **Advisory only.** The dashboard persists the per-rule allowlist * here, but `LLMConditionEvaluator` (`eaera-cms/core/rules/llm_evaluator.py`) * uses its own hardcoded `_readonly_tool_names()` set today — the per-rule * value is NOT yet honoured by the engine. The UI shows the checkbox grid * and persists the choice so it's ready for the day the backend wires it * through; until then, restricting this list has no runtime effect on the * agent. Do not promise the user otherwise in the UI copy. */ export declare const queryToolsOf: (trigger: Record | null | undefined) => LlmQueryTool[]; /** Read `trigger.sourceConfig.promptName` from a stored trigger. */ export declare const promptNameOf: (trigger: Record | null | undefined) => string; //# sourceMappingURL=llm-rule.constant.d.ts.map