feat(FN-3755): add shared state snapshots for mesh sync and harden autostas
Adds shared state snapshots for mesh sync (FN-3451) along with 143-line mesh route registration, unifies agent action gating classifications (FN-3742), and patches the merger engine with two autostash fixes (capture stderr with AI fallback and TOCTOU race defense). Also ships a new quick-capture fea Fusion-Task-Id: FN-3755
This commit is contained in:
@@ -2192,8 +2192,8 @@ export class AgentStore extends EventEmitter {
|
||||
getAgentRunSnapshot(limit?: number): AgentRunSnapshot {
|
||||
const normalizedLimit = typeof limit === "number" && Number.isFinite(limit) && limit > 0 ? Math.floor(limit) : undefined;
|
||||
const query = normalizedLimit
|
||||
? "SELECT data FROM agentRuns ORDER BY startedAt DESC LIMIT ?"
|
||||
: "SELECT data FROM agentRuns ORDER BY startedAt ASC";
|
||||
? "SELECT data FROM agentRuns ORDER BY startedAt DESC, rowid DESC LIMIT ?"
|
||||
: "SELECT data FROM agentRuns ORDER BY startedAt ASC, rowid ASC";
|
||||
const rows = normalizedLimit
|
||||
? (this.db.prepare(query).all(normalizedLimit) as Array<{ data: string }>)
|
||||
: (this.db.prepare(query).all() as Array<{ data: string }>);
|
||||
|
||||
Reference in New Issue
Block a user