UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

19 lines (18 loc) • 2.46 kB
import { assertNoRetiredKeys, assertNoRetiredToolPolicyKeys, RETIRED_HOOKS_REPLACEMENT } from "../retired-keys.js"; const RETIRED_RUNNER_DEPS_KEYS = { hooks: RETIRED_HOOKS_REPLACEMENT, legacyRewindBoundaryProbe: "the rewind refusal always names both possibilities (never existed / retired whole-tree era); a deployment that holds that era's table answers the question on its own surface", peerAdmission: "the peer lane's knob table is `RunnerDeps.peerLane` (the same fields: admission gate, delivery budgets, listing window)", builtinWorkflows: "the engine ships no built-in named workflows — the Workflow tool's `{name}` resolves only `RunnerDeps.workflowScriptStore`; register any named workflow there", graderEnvFactory: "the grader env reaches the repair loop as `RepairLoopConfig.graderEnv`, minted by the trusted control plane (`assertOracleIsolation` / `GraderEnv` unchanged)", "hands.readCyberReminder": "a Read result carries only the reminders about that read (an empty file, an offset past the end, a file already in context) — no standing content-safety tail, so there is nothing to switch; a deployment that wants that sentence states it in its own `appendSystemPrompt`", promptProvider: "a deployment changes prompt text through overlays: register a `prompt.compose` handler on `RunnerDeps.mods` answering `{ overlays }` (role base `replace`, a brand line `add` to the role band, a behavior or scenario `add`, a core-behavior `replace` / `append` / `drop`), choose the role base per task with `TaskSpec.promptRole`, and dispose of an MCP server's instructions with a `prompt.section` registration answering `{ text }` / `{ text: null }`", memorySessionIncarnation: "the occupant behind a session id is a cell of the session row now — `SessionMetadata.incarnation` on the metadata `Session.getMetadata()` returns (forks also `forkedFromIncarnation`), with `SessionStore.incarnationOf` for by-id readers; put the token the old seat answered on your sessions instead. A deployment that drops the seat without surfacing the cell loses the axis: records bind by session id alone", }; export function assertNoRetiredRunnerDeps(deps) { assertNoRetiredKeys(deps, RETIRED_RUNNER_DEPS_KEYS, "RunnerDeps"); } export function assertNoRetiredInheritedConstraints(internals) { for (const constraint of internals?.inheritedGate?.parentConstraints ?? []) assertNoRetiredToolPolicyKeys(constraint.policy); }