feat(evidence): discover retained records without full payloads (#1682)
* feat(evidence): discover retained records without full payloads * fix(evidence): guide oversized results to retained discovery * style(tests): format retained discovery recovery assertion
This commit is contained in:
@@ -159,7 +159,7 @@ export const SESSION_TOOL_CONTRACTS = [
|
||||
),
|
||||
session(
|
||||
"get_evidence_bundle",
|
||||
"Return every Evidence record and residual unknown currently retained by this session as one inline bundle for direct inspection or follow-up workflows.",
|
||||
"Return every retained Evidence record and residual unknown as a complete canonical bundle by default. detail=summary discovers retained records without copying or transferring their payloads; optionally filter by exact Evidence ID, operation, target SHA-256, analysis-profile digest or canonical native procedure address. Metadata distinguishes complete record retention from native value-flow truncation or unavailable/unknown coverage. Use a discovered evidence_id with inspect_analysis_view without restarting a provider. Filters apply only to summary delivery.",
|
||||
getEvidenceBundleInputSchema,
|
||||
),
|
||||
session(
|
||||
|
||||
@@ -6,9 +6,13 @@ import { localPathStringSchema } from "../domain/localPath.js";
|
||||
import { processTraceSpecificationSchema } from "../domain/process/processTraceSpecification.js";
|
||||
import { evidenceSchema } from "../domain/evidence.js";
|
||||
import { prefixedDigestSchema } from "./../domain/digests.js";
|
||||
import { evidenceRecordFiltersSchema } from "../domain/evidenceRecordSummary.js";
|
||||
|
||||
/** Return the current canonical Evidence bundle inline. */
|
||||
export const getEvidenceBundleInputSchema = z.strictObject({});
|
||||
/** Complete retained Evidence, or selected discovery metadata without payloads. */
|
||||
export const getEvidenceBundleInputSchema = z.strictObject({
|
||||
detail: z.enum(["complete", "summary"]).default("complete"),
|
||||
filters: evidenceRecordFiltersSchema.optional(),
|
||||
});
|
||||
|
||||
/** Optional document selection for volatile navigation context. */
|
||||
export const navigationContextInputSchema = z.strictObject({
|
||||
|
||||
@@ -53,6 +53,10 @@ export const TOOL_EXAMPLE_OVERRIDES: Readonly<
|
||||
trace_native_ui_action: { action: "buildTapped:" },
|
||||
open_binary: { path: "/tmp/fixture" },
|
||||
export_evidence_bundle: { path: "/tmp/evidence.json" },
|
||||
get_evidence_bundle: {
|
||||
detail: "summary",
|
||||
filters: { operation: "analyze_function", procedure_address: "0x1000" },
|
||||
},
|
||||
inspect_address_context: { address: "0x1000" },
|
||||
import_evidence_bundle: { path: "/tmp/evidence.json" },
|
||||
capture_process_scenario: {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { evidenceBundleSummarySchema } from "../domain/evidenceRecordSummary.js";
|
||||
import { BINARY_ARCHITECTURES } from "../domain/binaryTargetTypes.js";
|
||||
import { nativeFunctionAnnotationsSchema } from "../domain/native/nativeFunctionAnnotations.js";
|
||||
import { nativeLoadImageSchema } from "../domain/native/nativeLoadImage.js";
|
||||
@@ -470,7 +471,9 @@ export const sessionOutputSchemas = {
|
||||
unknowns: z.number().int().min(0),
|
||||
}),
|
||||
),
|
||||
get_evidence_bundle: lifecycleResultOf(evidenceBundleSchema),
|
||||
get_evidence_bundle: lifecycleResultOf(
|
||||
z.union([evidenceBundleSchema, evidenceBundleSummarySchema]),
|
||||
),
|
||||
get_navigation_context: lifecycleResultOf(
|
||||
z.object({
|
||||
document: z.string(),
|
||||
|
||||
Reference in New Issue
Block a user