mirror of
https://github.com/morluto/rea
synced 2026-10-26 06:16:17 -04:00
24 lines
909 B
TypeScript
24 lines
909 B
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, {
|
|
upstream_analysis_profile: upstream,
|
|
source_limitations: "provider-operation-caveats-v1",
|
|
...(operation === "binary_overview"
|
|
? { workflow_revision: 4 }
|
|
: operation === "batch_decompile" ||
|
|
operation === "get_call_graph" ||
|
|
operation === "trace_feature"
|
|
? { workflow_revision: 3 }
|
|
: { workflow_revision: 1 }),
|
|
});
|