function normalizeWorkflowStepScope(stack) {
    return (stack ?? []).map((entry) => ({
        workflow: entry.workflow,
        ...(entry.workflow_ref ? { workflow_ref: entry.workflow_ref } : {}),
        step: entry.step,
        kind: entry.kind,
    }));
}
export function buildWorkflowStepScopeKey(step, stack) {
    return JSON.stringify({
        step,
        stack: normalizeWorkflowStepScope(stack),
    });
}
//# sourceMappingURL=workflowStepScope.js.map