UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

37 lines (36 loc) • 2.34 kB
import { predictMountedToolNames } from "./tool-registry.js"; const vector = (id, active, absent = [], extra = []) => { const predicted = new Set(predictMountedToolNames(new Set(active))); for (const a of absent) predicted.delete(a.name); for (const e of extra) predicted.add(e.name); return { id, active, absent, extra, expected: [...predicted].sort() }; }; const OFFLOAD_READER = { name: "ReadToolResult", why: "the offload store is wired by default (the deployment threshold), an `optional` seat every vector carries" }; export const TOOL_CONFORMANCE_VECTORS = [ vector("bare", ["always"], [], [OFFLOAD_READER]), vector("hands-full", ["always", "hands", "backgroundTasks", "delegation"], [ { name: "SendMessage", why: "needs the runner self seat (a direct prepare has none)" }, { name: "AgentTranscript", why: "needs the runner self seat (a direct prepare has none)" }, { name: "ListAgents", why: "mounts with the delegation face only under a runner self seat (a direct prepare has none)" }, ], [OFFLOAD_READER]), vector("hands-readonly", ["always", "hands"], [ { name: "Edit", why: "the read-only band mounts the read half only" }, { name: "Write", why: "the read-only band mounts the read half only" }, { name: "NotebookEdit", why: "the read-only band mounts the read half only" }, { name: "TaskOutput", why: "the background-shell pair mounts on the full shell only" }, { name: "TaskStop", why: "the background-shell pair mounts on the full shell only" }, { name: "EnterWorktree", why: "the worktree pair needs the tracked cwd the full shell owns" }, { name: "ExitWorktree", why: "the worktree pair needs the tracked cwd the full shell owns" }, ], [OFFLOAD_READER]), vector("plan-mode", ["always", "optional"], [ { name: "LSP", why: "needs a wired LSP manager" }, { name: "Artifact", why: "needs a wired artifact host" }, { name: "Skill", why: "needs a skills listing" }, { name: "StructuredOutput", why: "needs an output schema" }, { name: "ToolSearch", why: "needs a deferred tool" }, { name: "RefreshMcpTools", why: "needs a declared MCP server" }, { name: "EnterPlanMode", why: "needs a checkpoint store beside plan mode" }, ]), ];