UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

16 lines (15 loc) • 1.23 kB
/** * THE reading of `TaskSpec.skills` — the one place the caller's skill objects are read. The config doors call it before any * resource (a resume before its claim) and hand its copy on as the leg's `skills`; the disclosure block and the `Skill` tool read * that copy through `normalizeSkills` (synthetic-tools.ts), its sorted view. */ import type { SkillSpec } from "../agent-definition.js"; /** * Total, and once: a value that is not a list, an entry that is not an object, a `name` / `description` / `content` that is not a * string, or `files` that is not a list of `{ path, content }` strings refuses by name (`config.invalid_argument`, `detail.field` = * the member's path); `baseDir` by its own reader ({@link skillBaseDirOf}, `config.skill_base_dir_invalid`). Every entry is * screened, a later duplicate of a name included. Each field is read ONCE, BY NAME (an inherited or non-enumerable list counts; * a rest copy would drop it). What it returns is plain data in declaration order, first of a name: every member and attachment * copied, the two tables read ({@link readSkillTable}: a non-list is one entry that reads as nothing). */ export declare function readSkillsSeat(skills: unknown): SkillSpec[];