feat: add async SQLite on Node 24 and improve messaging diagnostics (#520)

Move database work off the main thread on Node.js 24 and improve message handling and runtime diagnostics.

Preserve migration, restart, and concurrency coverage with the async SQLite driver.
This commit is contained in:
MliKiowa authored and GitHub committed 2026-10-13 10:12:47 +08:00
1 parent 20f48d11ec
commit c7428363cb
170 files changed
+7748 -3913

No files matched your search

+19
View File
@@ -101,6 +101,25 @@ describe('callTool — docs tools (no client needed)', () => {
});
describe('callTool — query_action (read)', () => {
it.each([null, [], 'invalid', 42, false].map((params) => ({ params })))(
'rejects invalid params without invoking the client ($params)',
async ({ params }) => {
let called = false;
const client = fakeClient(() => {
called = true;
return { status: 'ok', retcode: 0, data: null };
});
const res = await callTool(
'query_action',
{ action: 'get_status', params },
{ mode: 'read', client },
);
expect(res.isError).toBe(true);
expect(text(res)).toContain('params');
expect(called).toBe(false);
},
);
it('executes a read-only action and passes the envelope through', async () => {
const res = await callTool(
'query_action',