/** * Pre-constructed CRUD tools for model-visible retrievable and RAG-record management. * * @module @nhtio/adk/batteries/tools/retrievables * * @remarks * Pre-constructed CRUD tools that expose the ADK's {@link @nhtio/adk!Retrievable} surface to the * model. Each tool delegates to the corresponding callback on the active * {@link @nhtio/adk!DispatchContext} (`fetchRetrievables`, `storeRetrievable`, `mutateRetrievable`, * `deleteRetrievable`) — the persistence layer is whatever the consumer wired into the * runner. * * Retrievables are RAG records and carry an explicit `trustTier` that drives the LLM * battery's rendering envelope. Exposing these CRUD tools to the model is a deliberate * deployer decision; the trust tier the model declares when creating or updating a record * is honoured verbatim by the persistence layer. The deployer is responsible for choosing * whether to register all four tools, only the read-only `list_retrievables`, or any subset * thereof — that registration choice is exactly the trust boundary documented in the * Retrievable battery contract. * * Output is JSON for every tool so consumers can parse the result without re-tokenising — * the artifact constructor is set to {@link @nhtio/adk!SpooledJsonArtifact}. * * Tools: * - {@link listRetrievablesTool} — read-only list of every retrievable currently held by * the context. * - {@link storeRetrievableTool} — create a new retrievable record (auto-generates `id` / * `createdAt` / `updatedAt` unless explicit values are supplied). * - {@link updateRetrievableTool} — replace an existing retrievable by `id`. Bumps * `updatedAt`. * - {@link deleteRetrievableTool} — remove a retrievable by `id`. */ import { SpooledJsonArtifact, Tool } from "../../../common"; /** * List every retrievable record currently held by the active execution context. * * @remarks * Delegates to `ctx.fetchRetrievables()`. Returns a JSON-encoded array of retrievable records * (id, content, trustTier, source, kind, score, createdAt, updatedAt). */ export declare const listRetrievablesTool: Tool>; /** * Create a new {@link @nhtio/adk!Retrievable} record and persist it via the context's `storeRetrievable` * callback. * * @remarks * When `id` is omitted, a UUID v6 is generated. When `createdAt` / `updatedAt` are omitted, * the current time is used. The model must declare `trustTier` explicitly — there is no * default; the choice is consciously the model's, exposed by the deployer's decision to * register this tool. */ export declare const storeRetrievableTool: Tool>; /** * Replace an existing {@link @nhtio/adk!Retrievable} by `id`. * * @remarks * The model supplies `id` plus any subset of `content` / `trustTier` / `source` / `kind` / * `score`; omitted fields retain their prior values. `updatedAt` is always bumped; * `createdAt` is preserved. Returns an error when no retrievable with the supplied `id` is * found. */ export declare const updateRetrievableTool: Tool>; /** * Remove an existing {@link @nhtio/adk!Retrievable} by `id`. * * @remarks * Delegates to `ctx.deleteRetrievable(id)`. Returns `{ ok: true, id }` on success regardless * of whether a retrievable was actually present — `deleteRetrievable` is idempotent at the * ADK level. */ export declare const deleteRetrievableTool: Tool>; /** * Convenience tuple of every retrievable CRUD tool. Spread into a {@link @nhtio/adk!ToolRegistry} to * register the entire category at once. */ export declare const retrievableTools: readonly [ Tool>, Tool>, Tool>, Tool> ];