fix(analysis): resolve procedure identities and preserve literal queries

This commit is contained in:
morluto
2026-10-09 02:42:39 +08:00
parent f2e22e13a6
commit d830cb79b3
9 changed files with 117 additions and 116 deletions
+7 -3
View File
@@ -19,7 +19,11 @@ export const enhancedInputSchemas = {
.default([]),
}),
get_call_graph: z.strictObject({
address: z.string().describe("A provider-normalized procedure address"),
address: z
.string()
.describe(
"A procedure symbol or address to resolve to its canonical entry",
),
direction: z.enum(["forward", "backward"]).default("forward"),
}),
analyze_swift_types: z.strictObject({
@@ -44,10 +48,10 @@ export const enhancedInputSchemas = {
}),
trace_feature: traceLiteralInputSchema,
trace_call_path: z.strictObject({
start: z.string().describe("A provider-normalized procedure address"),
start: z.string().describe("A starting procedure symbol or address"),
goal: z
.string()
.describe("An optional provider-normalized destination address")
.describe("An optional destination procedure symbol or address")
.optional(),
direction: z.enum(["forward", "backward"]).default("forward"),
}),
+3 -3
View File
@@ -49,7 +49,7 @@ export const ENHANCED_TOOL_CONTRACTS = [
),
enhanced(
"get_call_graph",
"Traverse the bound provider's caller or callee relationships from one symbol or address until the reachable graph is exhausted. Every node has an ok/error status and failures use safe typed projections; unresolved indirect calls may be missing and results are not a whole-program CFG.",
"Resolve one symbol or address to its canonical procedure entry, then traverse the bound provider's caller or callee relationships until the reachable graph is exhausted. Every node uses a canonical address and has an ok/error status; failures use safe typed projections. Unresolved indirect calls may be missing and results are not a whole-program CFG.",
enhancedInputSchemas.get_call_graph,
),
enhanced(
@@ -70,12 +70,12 @@ export const ENHANCED_TOOL_CONTRACTS = [
...FUNCTION_WORKFLOW_TOOL_CONTRACTS,
enhanced(
"trace_feature",
"Trace a literal feature query through every matching string and procedure, their xrefs, and truthful containing-procedure resolution. Returns observations, operation count, and residual unknowns without inferring reference kinds.",
"Trace the complete literal query, preserving spaces, through every matching string and procedure, their xrefs, and truthful containing-procedure resolution. Returns observations, operation count, and residual unknowns without inferring reference kinds.",
enhancedInputSchemas.trace_feature,
),
enhanced(
"trace_call_path",
"Trace direct callers or callees from one exact procedure address until the graph is exhausted or the optional goal is reached. Returns visited nodes, direct-call edges, a shortest traversal path, provider failures, and residual unknowns; unresolved indirect calls remain unknown.",
"Resolve start and optional goal symbols or addresses to canonical procedure entries, then trace direct callers or callees until the graph is exhausted or the goal is reached. Results use canonical addresses; Evidence preserves supplied selectors. Returns visited nodes, direct-call edges, a shortest traversal path, provider failures, and residual unknowns; unresolved indirect calls remain unknown.",
enhancedInputSchemas.trace_call_path,
),
enhanced(