UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

20 lines (19 loc) • 1.89 kB
import { type RetiredToolNameAccount } from "./retired-tool-name-account.js"; /** * The account of a restricting tool table the HOST owns and the engine never reads (`settings.permissions.neverAuto`): the entries of `table` that * name a tool the engine retired with NO successor — read by the same reader and asked the same question as the engine's own tables * (`compileAllowList` then `isRetiredLeftOut`: the name is retired with no `currentName`, and `roster` carries no other case of it) — in the same * sentence and the same detail shape as the engine's retired-name notice, or `undefined` when there is none. Pure: it * carries no code, no audience, no minter and no session — the host mints its own notice (the retired-name notice's code, minter the host) with * `sessionId` added to `detail`, and decides what its table does with the entries (the engine's tables leave them out and go on). `roster` = the * names the host knows are mounted (a tool mounted under a retired name is its own, not retired; a tool mounted under another case of it keeps the * entry refused, as it does in the engine); `source` names the table in the sentence and in each entry's `source`. A renamed name (it has a * successor), an unprefixed or unmintable one is NOT here: the host refuses those as the engine does. `deny` and `ask` read a name alike (both restrict). * A table that is no object, a `field` outside `deny` / `ask`, a `source` that is not a non-blank string and `entries` that are no list are refused * with a `TypeError` coded `config.invalid_argument` — no sentence is made from them; an entry that is no string reads as nothing. */ export declare function retiredToolNameAccount(table: { readonly field: "deny" | "ask"; readonly source: string; readonly entries: readonly string[]; }, roster?: ReadonlySet<string>): RetiredToolNameAccount | undefined;