@sema-agent/core
Version:
Stateless, task-oriented AI agent core
31 lines (30 loc) • 1.77 kB
TypeScript
import type { ExecutionEnv } from "../internal/harness-types.js";
import { type ReadDenyMatcher } from "../tools/fs/read-deny.js";
import type { RunnerDeps } from "./runner-deps.js";
import type { TaskSpec } from "./task-spec.js";
import type { ToolPolicy } from "./tool-policy.js";
/** The sentence of the question: the target, the row, and why a person is asked. */
export declare function releasedRowWriteQuestion(target: string, row: string): string;
/**
* The layer for one leg: absent when its request released no row. `released` are the rows the request released; `readDeny` the
* leg's own read table (which still holds them: only the Read tool's table leaves them out).
*/
export declare function createReleasedReadRowWritePolicy(opts: {
readonly env: ExecutionEnv;
readonly released: readonly string[];
readonly readDeny: Pick<ReadDenyMatcher, "matchPath" | "matchTarget">;
readonly rootPath: string;
}): ToolPolicy | undefined;
/**
* The leg's layers of this policy — none when its request released no row or the leg has no read table (no hands: no Read tool
* reads the file there) — and, on a leg that released rows, the leg's one notice naming them (`config.read_deny_request_excluded`;
* the wiring manifest keeps reporting the deployment's own tiers). The request's names were judged against the grant at its door.
*/
export declare function releasedReadRowWriteLayers(input: {
readonly env: ExecutionEnv;
readonly deps: Pick<RunnerDeps, "readDenyBuiltinRequestExcludable" | "onNotice">;
readonly spec: Pick<TaskSpec, "readDenyBuiltinExclude">;
readonly readDeny: Pick<ReadDenyMatcher, "matchPath" | "matchTarget"> | undefined;
readonly rootPath: string;
readonly sessionId: string;
}): ToolPolicy[];