// The home sidebar agent panel is not backed by a real task card.
// We mint a synthetic home agent session id so the existing task-scoped
// runtime APIs can manage its chat and terminal lifecycle without creating
// a worktree-backed task. Home sidebar sessions are intentionally ephemeral,
// so callers should create a fresh id per in-memory sidebar session instead of
// deriving one that survives a browser refresh.

!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]="ea985954-3020-5078-b22a-0507e970b8b9")}catch(e){}}();
const HOME_AGENT_SESSION_NAMESPACE = "__home_agent__";
export const HOME_AGENT_SESSION_PREFIX = `${HOME_AGENT_SESSION_NAMESPACE}:`;
function createHomeAgentSessionNonce() {
    if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
        return crypto.randomUUID().replaceAll("-", "");
    }
    return `${Date.now().toString(36)}${Math.random().toString(36).slice(2, 10)}`;
}
export function createHomeAgentSessionId(workspaceId, agentId) {
    return `${HOME_AGENT_SESSION_PREFIX}${workspaceId}:${agentId}:${createHomeAgentSessionNonce()}`;
}
export function isHomeAgentSessionId(sessionId) {
    return sessionId.startsWith(HOME_AGENT_SESSION_PREFIX);
}
export function isHomeAgentSessionIdForWorkspace(sessionId, workspaceId) {
    return sessionId.startsWith(`${HOME_AGENT_SESSION_PREFIX}${workspaceId}:`);
}
//# sourceMappingURL=home-agent-session.js.map
//# debugId=ea985954-3020-5078-b22a-0507e970b8b9
