UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

27 lines (26 loc) • 1.37 kB
/** * The frozen task-start copies of the caller's tool-face control arrays: the selector's own layer (`allow` / `exclude`) and * the disclosure lists. The driver compiles the selector from them once the leg's delegation facts are known. */ export interface ToolFaceLists { allow: readonly string[] | undefined; exclude: readonly string[] | undefined; defer: readonly string[] | undefined; alwaysLoad: readonly string[] | undefined; restoreGated: readonly string[] | true | undefined; } /** The spec members the reader reads — each `unknown`, because the reader is the screen. */ export interface ToolFaceListsSpec { readonly allowTools?: unknown; readonly excludeTools?: unknown; readonly deferTools?: unknown; readonly alwaysLoadTools?: unknown; readonly restoreGatedTools?: unknown; readonly excludeAllTools?: unknown; } /** * Read the five tool-face lists: the restore selector first (its own refusal, `config.tool_model_gate_invalid`), then the four * name lists in the order `allowTools`, `excludeTools`, `deferTools`, `alwaysLoadTools` (`config.tool_face_control`), then the * whole-face switch (the same code, the arm `not_a_boolean`), and the snapshot. Every list is one frozen copy, shared by reference with every reader. */ export declare function readToolFaceLists(spec: ToolFaceListsSpec): ToolFaceLists;