Files
reverse-engineering-anything/src/application/WorkflowAnalysisProfile.ts
T
N0zoM1z0andgensokyo-dev 3dced80300 fix(native): locate recovered call inputs without parameter bindings
Group exact input indices with caller Evidence after complete parameter examination; preserve budget uncertainty and advance the trace workflow profile.

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-11 18:24:58 +08:00

45 lines
1.6 KiB
TypeScript

import type { AnalysisOperation } from "./AnalysisProvider.js";
import {
createAnalysisProfile,
type AnalysisProfileCommitment,
} from "../domain/analysisProfile.js";
import { REA_WORKFLOW_PROVIDER } from "../domain/investigationProviders.js";
/** Commit a workflow result to its upstream profile and applicable semantic revision. */
export const workflowAnalysisProfile = (
upstream: AnalysisProfileCommitment,
operation?: AnalysisOperation,
): AnalysisProfileCommitment =>
createAnalysisProfile(
REA_WORKFLOW_PROVIDER,
workflowAnalysisProfileParameters(upstream, operation),
);
/** The owned profile shape, with null allowed when estimating its envelope. */
export const workflowAnalysisProfileParameters = (
upstream: AnalysisProfileCommitment | null,
operation?: AnalysisOperation,
) => ({
upstream_analysis_profile: upstream,
source_limitations: "provider-operation-caveats-v1",
...(operation === "trace_native_values"
? {
value_flow_limitations: "provider-attributed-v1",
value_flow_absence: "recorded-versus-unavailable-v1",
}
: {}),
...(operation === "binary_overview"
? { workflow_revision: 5 }
: operation === "batch_decompile"
? { workflow_revision: 4 }
: operation === "trace_feature"
? { workflow_revision: 9 }
: operation === "get_call_graph"
? { workflow_revision: 3 }
: operation === "trace_native_values"
? { workflow_revision: 3 }
: operation === "trace_call_path"
? { workflow_revision: 2 }
: { workflow_revision: 1 }),
});