"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ltGetWorkflowConfig = ltGetWorkflowConfig;
exports.ltGetProviderData = ltGetProviderData;
const ltconfig_1 = require("../../../modules/ltconfig");
/**
 * Get the resolved workflow configuration for a given workflow name.
 *
 * Bridges the deterministic workflow sandbox to the config system.
 * Activities run on the activity worker (outside the sandbox), so
 * they use the {@link ltConfig} singleton which maintains a 5-minute
 * TTL cache — most calls resolve from memory without hitting the DB.
 */
async function ltGetWorkflowConfig(workflowName) {
    return ltconfig_1.ltConfig.getResolvedConfig(workflowName);
}
/**
 * Get provider data for a workflow's consumers by looking up
 * completed sibling tasks that share the same origin_id.
 *
 * Uses the cached config to resolve the consumer list, then
 * queries the DB for matching completed task data.
 */
async function ltGetProviderData(input) {
    return ltconfig_1.ltConfig.getProviderData(input.workflowName, input.originId);
}
