@sema-agent/core
Version:
Stateless, task-oriented AI agent core
22 lines (21 loc) • 1.25 kB
TypeScript
/**
* design/177 — the two shared-memory tools (`memory_list` / `memory_read`) and their rendering.
*
* READ-ONLY BY STRUCTURE. Neither tool can write, and no sibling write tool exists: the model side's
* whole participation in write governance is relaying each store's `writable` bit. That is a structural
* guarantee, not a policy one, and it is the reason this face can be mounted under a read-only posture
* without any further narrowing.
*
* REFUSALS ARE VALUES. Every negative outcome is a structured result with a named machine reason —
* exceptions are reserved for genuine defects and for cancellation, which is re-thrown untouched so the
* engine's abort path stays the abort path.
*/
import type { ToolSpec } from "../types.js";
import { type SharedMemoryRequestContext, type SharedMemoryStoreProvider } from "./types.js";
/** What a mount hands the factory: the host's provider plus the trusted per-run identity. */
export interface SharedMemoryToolsOptions {
provider: SharedMemoryStoreProvider;
/** Filled by the engine from its own trusted state — never from model arguments. */
context: SharedMemoryRequestContext;
}
export declare function createSharedMemoryTools(opts: SharedMemoryToolsOptions): ToolSpec[];