@sema-agent/core
Version:
Stateless, task-oriented AI agent core
22 lines (21 loc) • 1.6 kB
TypeScript
import type { TaskListStore } from "../../tools/task-list.js";
import { type CorruptReadInfo } from "./corrupt-read-sink.js";
export declare function createFileTaskListStore(root: string, opts?: {
/**
* The DATA ROOT whose adoption marker gates construction (design/183 I6). Most of the file family
* takes the data root and derives `join(root, "<family>")` itself; this factory is one of the TWO
* faces that instead take a caller-chosen directory (the other being
* `FileDurableRulePartitionProvider`, which takes a rule bucket) — here, the document's own
* directory. So when a deployment hands in a SUBDIRECTORY the I6 check would look for the marker
* inside that subdirectory, find nothing, and pass unconditionally: a gate that is always open
* (backlog #136⑦). Supply the data root here and the gate reads the anchor the root-taking faces
* read. Absent ⇒ the directory argument doubles as the anchor, which is exact when it IS the data
* root (the conventional wiring) and is the previous behavior otherwise; the adoption freeze note
* on `adoptLocalDataRoot` lists that default among the seams it does not cover.
*/
dataRoot?: string;
/** Disclosure sink for a task-list document that is present but cannot be read as one: it fires WITH the
* refusal and is the only carrier of the file's location (the refusal's message names none). Never fires on
* plain absence. Swallow-guarded: a throwing sink cannot change the refusal. */
onCorruptRead?: (info: CorruptReadInfo) => void;
}): TaskListStore;