@sema-agent/core
Version:
Stateless, task-oriented AI agent core
12 lines (11 loc) • 702 B
JavaScript
import { deliverEngineNotice } from "../engine-notice.js";
import { announceDigest } from "./announce-once-ledger.js";
import { fileLeftAsIsNotice, restoreLeftAsIsNote } from "./file-history-restore.js";
export function tellLeftAsIs(input) {
const note = restoreLeftAsIsNote(input.restored, input.target);
if (note !== undefined)
input.rewindNotes.push(note);
for (const f of input.restored.leftAsIs ?? []) {
input.onceLedger.oncePerSession(announceDigest("rewind.file_left_as_is", `${input.scope}\n${f.class}\n${f.path}`), () => deliverEngineNotice(input.onNotice, fileLeftAsIsNotice({ sessionId: input.sessionId, path: f.path, place: f.place, class: f.class })));
}
}