Files
reverse-engineering-anything/src/application/sqlite/SqliteDatabaseCapability.test.ts
T
YsopwnableandY0UW1SH aeee5074d1 feat(sqlite): inspect offline snapshots with selective evidence (#2271)
Add offline SQLite database/WAL inspection through the shared CLI/MCP.

Use compact inventory, selected-table schema, exact ordered columns and
bounded row samples while preserving source identity and lossless values.
Retain completed Evidence through late cancellation and private-root cleanup
failures, bound concurrent inspections, and recheck journal validity after
acquisition. Reuse prepared CI runtime artifacts across supported Node lines.

Co-authored-by: Y0UW1SH <29498139+Y0UW1SH@users.noreply.github.com>
Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
2026-10-12 18:33:23 +00:00

32 lines
1.0 KiB
TypeScript

import { expect, it } from "vitest";
import { expandProviderCapabilities } from "../../contracts/toolOutputSchemaPrimitives.js";
import { providerCapabilitySets } from "../binary/BinarySessionStatus.js";
import { sqliteDatabaseCapability } from "./SqliteDatabaseCapability.js";
it.each([
["22.23.1", false],
["24.11.0", false],
["24.14.9", false],
["24.15.0", true],
["25.1.0", false],
["26.0.0", true],
["24.15.0-rc.1", false],
["invalid", false],
])(
"reports SQLite inspection availability on Node %s as %s",
(version, available) => {
const [capability] = expandProviderCapabilities(
providerCapabilitySets([sqliteDatabaseCapability(version)]),
);
expect(capability).toMatchObject({
operation: "inspect_sqlite_database",
available,
reason: available
? null
: expect.stringContaining("Node.js 24.x >=24.15 or 26+"),
availability_code: available ? null : "unsupported_version",
limitations: [expect.stringContaining("DatabaseSync.limits")],
});
},
);