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)
This commit is contained in:
@@ -61,8 +61,19 @@ export const createEvidenceToolHandler =
|
||||
const result = await logToolExecution(logger, name, () =>
|
||||
operation(input, { signal: context.mcpReq.signal }),
|
||||
);
|
||||
if (!result.ok)
|
||||
if (!result.ok) {
|
||||
const partial = result.error.partialObservation;
|
||||
if (partial !== undefined && "evidence_id" in partial) {
|
||||
const recorded = recordEvidence?.(partial);
|
||||
if (recorded !== undefined)
|
||||
return server.delivery.toRecordedPartialErrorToolResult(
|
||||
result.error,
|
||||
partial.evidence_id,
|
||||
recorded,
|
||||
);
|
||||
}
|
||||
return server.delivery.toCallToolResult(result, contract);
|
||||
}
|
||||
const recorded = recordEvidence?.(result.value);
|
||||
return server.delivery.toEvidenceToolResult(
|
||||
result.value,
|
||||
|
||||
Reference in New Issue
Block a user