Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Merge remote-tracking branch 'origin/gbra133-pr2b' into capy/one-shot-cli-writes
garrytan722fdd35c73e
diff --cc src/core/config-snapshot.tsindex 70ef9256d8,8a36263e6f..5df912f0a9--- a/src/core/config-snapshot.ts+++ b/src/core/config-snapshot.ts@@@ -122,8 -121,10 +124,10 @@@ export async function withRequestConfig* `withRequestConfigSnapshot` does, all from the same snapshot; `close()`* ends it, so later reads, and work a run left behind, read live.*/- export function openRequestConfigSnapshot(engine: BulkConfigReader, seed?: Record<string, string>): { run<T>(fn: () => Promise<T>): Promise<T>; close(): void } {- const held: RequestSnapshot = { engine, open: true, rows: seed ? Promise.resolve(new Map(Object.entries(seed))) : null };+ export interface RequestConfigSnapshot { run<T>(fn: () => Promise<T>): Promise<T>; close(): void }+-export function openRequestConfigSnapshot(engine: BulkConfigReader): RequestConfigSnapshot {- const held: RequestSnapshot = { engine, open: true, rows: null, reads: new Map() };++export function openRequestConfigSnapshot(engine: BulkConfigReader, seed?: Record<string, string>): RequestConfigSnapshot {++ const held: RequestSnapshot = { engine, open: true, rows: seed ? Promise.resolve(new Map(Object.entries(seed))) : null, reads: new Map() };return {run: fn => activeSnapshot(engine) ? fn() : requestSnapshot.run({ held, live: false }, fn),close: () => { held.open = false; },