refactor: centralize main session key resolution
This commit is contained in:
@@ -19,6 +19,7 @@ import {
|
||||
isCacheEnabled,
|
||||
resolveCacheTtlMs,
|
||||
} from "./cache-utils.js";
|
||||
import { loadConfig } from "./config.js";
|
||||
import { resolveStateDir } from "./paths.js";
|
||||
|
||||
// ============================================================================
|
||||
@@ -232,6 +233,10 @@ export function resolveMainSessionKey(cfg?: {
|
||||
return buildAgentMainSessionKey({ agentId, mainKey });
|
||||
}
|
||||
|
||||
export function resolveMainSessionKeyFromConfig(): string {
|
||||
return resolveMainSessionKey(loadConfig());
|
||||
}
|
||||
|
||||
export { resolveAgentIdFromSessionKey };
|
||||
|
||||
export function resolveAgentMainSessionKey(params: {
|
||||
|
||||
Reference in New Issue
Block a user