mirror of
https://github.com/morluto/rea.git
synced 2026-10-27 01:45:32 +00:00
69 lines
2.9 KiB
TypeScript
69 lines
2.9 KiB
TypeScript
import type { JsonValue } from "../domain/jsonValue.js";
|
|
import { UNKNOWN_CONTRACT_EXAMPLES } from "./unknownContractExamples.js";
|
|
import { ARTIFACT_COMPARISON_EXAMPLE } from "./artifactComparisonExample.js";
|
|
import { FUNCTION_COMPARISON_EXAMPLE } from "./functionComparisonExample.js";
|
|
import { INVESTIGATION_EXAMPLES } from "./investigationExamples.js";
|
|
import { REPLAY_MACHINE_RUN_EXAMPLE } from "./replayMachineExample.js";
|
|
|
|
/** Canonical examples for contracts whose required inputs have no defaults. */
|
|
export const TOOL_EXAMPLE_OVERRIDES: Readonly<
|
|
Record<string, Readonly<Record<string, JsonValue>>>
|
|
> = {
|
|
...UNKNOWN_CONTRACT_EXAMPLES,
|
|
...INVESTIGATION_EXAMPLES,
|
|
goto_address: { address: "0x1000" },
|
|
procedure_address: { procedure: "main" },
|
|
procedure_assembly: { procedure: "main" },
|
|
procedure_callees: { procedure: "main" },
|
|
procedure_callers: { procedure: "main" },
|
|
procedure_info: { procedure: "main" },
|
|
read_function_instructions: { procedure: "main" },
|
|
read_bytes: { address: "0x1000", length: 16 },
|
|
address_to_file_offset: { address: "0x1000" },
|
|
procedure_references: { procedure: "main" },
|
|
procedure_pseudo_code: { procedure: "main" },
|
|
resolve_containing_procedure: { address: "0x1000" },
|
|
search_procedures: { pattern: "main" },
|
|
search_strings: { pattern: "authorization failed" },
|
|
set_address_name: { address: "0x1000", name: "entry" },
|
|
set_addresses_names: { names: { "0x1000": "entry" } },
|
|
set_bookmark: { address: "0x1000" },
|
|
set_comment: { address: "0x1000", comment: "validated entry point" },
|
|
set_current_document: { document: "fixture" },
|
|
set_inline_comment: { address: "0x1000", comment: "calls parser" },
|
|
unset_bookmark: { address: "0x1000" },
|
|
get_call_graph: { address: "0x1000" },
|
|
find_xrefs_to_name: { name: "malloc" },
|
|
analyze_function: { procedure: "main" },
|
|
inspect_native_api: { procedure: "main" },
|
|
trace_feature: { query: "license" },
|
|
find_code_for_string: { query: "authorization failed" },
|
|
trace_call_path: { start: "0x1000", goal: "0x1100" },
|
|
open_binary: { path: "/tmp/fixture" },
|
|
export_evidence_bundle: { path: "/tmp/evidence.json" },
|
|
inspect_address_context: { address: "0x1000" },
|
|
import_evidence_bundle: { path: "evidence.json" },
|
|
capture_process_scenario: {
|
|
approved: true,
|
|
executable: "/usr/bin/true",
|
|
working_directory: "/tmp",
|
|
},
|
|
run_replay_machine: REPLAY_MACHINE_RUN_EXAMPLE,
|
|
compare_process_captures: {
|
|
left_evidence_id: `ev_${"0".repeat(64)}`,
|
|
right_evidence_id: `ev_${"1".repeat(64)}`,
|
|
},
|
|
compare_artifacts: {
|
|
left_evidence_id: ARTIFACT_COMPARISON_EXAMPLE.left.evidence_id,
|
|
right_evidence_id: ARTIFACT_COMPARISON_EXAMPLE.right.evidence_id,
|
|
},
|
|
compare_functions: {
|
|
left_evidence_id: FUNCTION_COMPARISON_EXAMPLE.left.evidence_id,
|
|
right_evidence_id: FUNCTION_COMPARISON_EXAMPLE.right.evidence_id,
|
|
},
|
|
compare_bundles: {
|
|
left_bundle_path: "/approved/left-evidence.json",
|
|
right_bundle_path: "/approved/right-evidence.json",
|
|
},
|
|
};
|