fix(cli): add list filtering/pagination, fix double-close in container ncl

- genericList now accepts column filters (--flag value) and LIMIT (default 200)
- Remove early inDb.close() in container pollResponse to avoid double-close
- Document filtering and --limit in cli.instructions.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
gavrielc
2026-05-08 21:02:23 +03:00
parent ed571d1f66
commit 6caad0757a
3 changed files with 18 additions and 6 deletions

View File

@@ -102,8 +102,6 @@ function pollResponse(requestId: string, timeoutMs: number): ResponseFrame | nul
.get(`%"requestId":"${requestId}"%`) as { id: string; content: string } | null;
if (row) {
inDb.close();
// Mark as completed via processing_ack so agent-runner skips it
const outDb = new Database(OUTBOUND_DB);
outDb.exec('PRAGMA journal_mode = DELETE');
@@ -119,7 +117,7 @@ function pollResponse(requestId: string, timeoutMs: number): ResponseFrame | nul
return parsed.frame as ResponseFrame;
}
} finally {
try { inDb.close(); } catch {}
inDb.close();
}
Bun.sleepSync(500);