@sema-agent/core
Version:
Stateless, task-oriented AI agent core
21 lines (20 loc) • 1.2 kB
TypeScript
import { type MailboxStore } from "../../core/mailbox-store.js";
/** CC's path-component sanitize rule (README §一 Jeo/UJt): non-alphanumerics → "-", lowercased. */
export declare function sanitizeCcAgentName(name: string): string;
export interface CcFileMailboxStoreOptions {
/** The team directory (`…/teams/<team>`) — `inboxes/` lives directly inside. */
teamDir: string;
/** handle → member display name (deployment wires the roster). Miss ⇒ the handle itself. */
agentNameOf?: (handle: string) => string | undefined;
/** Clock seam for tests. */
now?: () => number;
/** RB-482 #24 (baggage class-4 ruling): the corrupt/unreadable-inbox tolerance stays (CC posture — a bad
* box reads empty, a write then re-establishes it) but is no longer SILENT: an IO failure or
* corrupt document was indistinguishable from "no mail", and a later append started from the
* fabricated empty state with no signal. Never fires on plain ENOENT. Swallow-guarded. */
onCorruptRead?: (info: {
path: string;
reason: string;
}) => void;
}
export declare function createCcFileMailboxStore(opts: CcFileMailboxStoreOptions): MailboxStore;