UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

14 lines (13 loc) • 357 B
import { eachRedactionMarkerSpan } from "@sema-agent/primitives"; export function notRecordedMark(why) { return `[not recorded: ${why}]`; } export function markSafeCut(s, at) { for (const [start, end] of eachRedactionMarkerSpan(s)) { if (start >= at) break; if (at < end) return start; } return at; }