
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="edc47eb2-9cc9-5afe-b6a0-895dd1918340")}catch(e){}}();
export const KANBAN_HOOK_TASK_ID_ENV = "KANBAN_HOOK_TASK_ID";
export const KANBAN_HOOK_WORKSPACE_ID_ENV = "KANBAN_HOOK_WORKSPACE_ID";
function requireTrimmedEnv(env, key) {
    const value = env[key]?.trim();
    if (!value) {
        throw new Error(`Missing required environment variable: ${key}`);
    }
    return value;
}
export function createHookRuntimeEnv(context) {
    return {
        [KANBAN_HOOK_TASK_ID_ENV]: context.taskId,
        [KANBAN_HOOK_WORKSPACE_ID_ENV]: context.workspaceId,
    };
}
export function parseHookRuntimeContextFromEnv(env = process.env) {
    const taskId = requireTrimmedEnv(env, KANBAN_HOOK_TASK_ID_ENV);
    const workspaceId = requireTrimmedEnv(env, KANBAN_HOOK_WORKSPACE_ID_ENV);
    return {
        taskId,
        workspaceId,
    };
}
//# sourceMappingURL=hook-runtime-context.js.map
//# debugId=edc47eb2-9cc9-5afe-b6a0-895dd1918340
