/**
 * Default loopback ports for the launcher-managed processes. The bridge keeps
 * its established port (47839); the bundled frontend gets a dedicated neighbor
 * (47838) rather than the common dev port 3000, so it does not collide with a
 * developer's own Next server. Both are loopback-only.
 */
export const DEFAULT_BRIDGE_PORT = 47_839;
export const DEFAULT_WEB_PORT = 47_838;
export const LOOPBACK_HOST = "127.0.0.1";
/**
 * The scope set the launcher mints for a normal local-first session. It covers
 * every always-needed feature surface (reads, runs, run-intents, permissions,
 * provider-auth, repository, forge) but deliberately OMITS the two
 * explicit-opt-in, high-sensitivity scopes — debug:reveal and remote:control —
 * which are granted only by an explicit user action, never by default.
 */
export const LAUNCHER_BASELINE_SCOPES = Object.freeze([
    "bridge:read",
    "bridge:review",
    "runs:write",
    "runs:cancel",
    "runs:retry",
    "run-intents:create",
    "run-intents:prompt",
    "permissions:reply",
    "permissions:manage",
    "permissions:evaluate",
    "provider-auth:read",
    "provider-auth:write",
    "repository:read",
    "repository:write",
    "forge:read",
    "forge:write",
]);
/** Filenames the launcher persists under the app data dir. */
export const LAUNCHER_FILES = Object.freeze({
    /** Durable bridge capability token (0600). */
    bridgeToken: "launcher-bridge-token",
    /** Stable install identity JSON (workspaceId/userSessionId/deviceId, 0600). */
    identity: "launcher-identity.json",
    /** Daemon pidfile JSON (pid/version/port/startedAt). */
    pidfile: "launcher-daemon.json",
    /** Exclusive start lock. */
    startLock: "launcher-start.lock",
    /** Combined daemon log. */
    log: "launcher-daemon.log",
});
