export const SEAT_SCHEMA_VERSION = 1;
export const SEATS_HOME_REL = "seats";
export const SEAT_STATE_REL = ".local/state/overdeck/seats";
export const SEAT_TRUSTED_CONFIG_DIR = "trusted-config";
export const SEAT_GIT_EMAIL_DOMAIN = "overdeck.invalid";
export const SEAT_BINDING_REL = ".local/state/overdeck/seat-bindings";
export const SEAT_ACCOUNTS_REL = ".claudex-accounts";
export const SEAT_GUARD_REL = ".local/share/overdeck/seat-guard/current/bin";
export const SEAT_SLICE = "agent-seat.slice";
export const SEAT_UNIT_PREFIX = "agent-seat-";
export const SEAT_UNIT_SUFFIX = ".scope";
export const SEAT_PROXY_VERSION = "0.1.22";
export const SEAT_PROXY_BASE = "/var/lib/overdeck/seat-proxy";
export const SEAT_PROXY_USER = "overdeck-seat-proxy";
export const SEAT_IMPLEMENTER_USER_PREFIX = "ods-";
export const SEAT_IMPLEMENTER_RUNTIME_BASE = "/var/lib/overdeck/seat-runtime";
export const SEAT_NETNS_DIR = "/var/run/netns";
export const SEAT_PROXY_UNIT_TEMPLATE = "overdeck-seat-proxy@.service";
export const SEAT_MODEL_SOURCE = "claudex-seat-launch";
export const SEAT_UNSUPPORTED_BOUNDARY =
  "unsupported-security-boundary: remote seats accept only GPT-backed models (sol, terra, luna, gpt-*)";

export const SEAT_MODEL_ALIASES = {
  sol: "gpt-5.6-sol",
  terra: "gpt-5.6-terra",
  luna: "gpt-5.6-luna",
};

export const SEAT_NATIVE_ALIASES = {
  fable: "claude-fable-5",
  opus: "claude-opus-5",
  sonnet: "claude-sonnet-5",
};

export const SEAT_ACCOUNT_ALLOWLIST = [
  "account_identity.json",
  ".claude.json",
];

export const SEAT_SCOPE_PROPERTIES = {
  OOMPolicy: "kill",
  MemoryMax: "12G",
  MemorySwapMax: "1G",
  CPUQuota: "400%",
  CPUWeight: "1",
  TasksMax: "256",
};

export const SEAT_MODEL_ENV_KEYS = [
  "ANTHROPIC_MODEL",
  "ANTHROPIC_SMALL_FAST_MODEL",
  "ANTHROPIC_DEFAULT_OPUS_MODEL",
  "ANTHROPIC_DEFAULT_OPUS_MODEL_NAME",
  "ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION",
  "ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES",
  "ANTHROPIC_DEFAULT_SONNET_MODEL",
  "ANTHROPIC_DEFAULT_SONNET_MODEL_NAME",
  "ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION",
  "ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIES",
  "ANTHROPIC_DEFAULT_HAIKU_MODEL",
  "ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME",
  "ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION",
  "ANTHROPIC_DEFAULT_HAIKU_MODEL_SUPPORTED_CAPABILITIES",
  "ANTHROPIC_DEFAULT_FABLE_MODEL",
  "ANTHROPIC_DEFAULT_FABLE_MODEL_NAME",
  "ANTHROPIC_DEFAULT_FABLE_MODEL_DESCRIPTION",
  "ANTHROPIC_DEFAULT_FABLE_MODEL_SUPPORTED_CAPABILITIES",
  "CLAUDE_CODE_SUBAGENT_MODEL",
  "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY",
  "CCP_CONFIG_DIR",
  "CCP_BIND_ADDRESS",
  "CCP_CODEX_MODEL",
  "CCP_CODEX_SERVICE_TIER",
  "OPENAI_API_KEY",
  "ANTHROPIC_API_KEY",
  "ANTHROPIC_AUTH_TOKEN",
];

export const SEAT_ORCHESTRATION_ENV_KEYS = [
  "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY",
];

export const SEAT_PROXY_PORT_BASE = 47000;
export const SEAT_PROXY_PORT_SPAN = 10000;
export const SEAT_PROXY_HEALTH_INTERVAL_SEC = 0.2;
export const SEAT_PROXY_HEALTH_TIMEOUT_SEC = 30;

export const SEAT_LAUNCHER_BIN = "/usr/local/bin/overdeck-seat-launcher";
export const SEAT_STARTUP_STATUS_FILE = "startup.status";
export const SEAT_SCOPE_ENTRY_BIN = "/usr/local/bin/overdeck-seat-scope-entry";
export const SEAT_SCOPE_ENTRY_MODULE = "/usr/local/lib/overdeck/seat_scope_entry.py";
export const SEAT_SCOPE_ENTRY_MANIFEST = "/usr/local/lib/overdeck/seat-scope-entry.manifest.json";
export const SEAT_SCOPE_ENTRY_SUDOERS = "/etc/sudoers.d/overdeck-seat-scope-entry";
export const SEAT_IMPLEMENTER_EXEC_BIN = "/usr/local/bin/overdeck-seat-implementer-exec";
export const SEAT_IMPLEMENTER_EXEC_MODULE = "/usr/local/lib/overdeck/seat_implementer_exec.py";
export const SEAT_TMUX_MEDIATOR_BIN = "/usr/local/bin/overdeck-seat-tmux-mediator";
export const SEAT_TMUX_MEDIATOR_MODULE = "/usr/local/lib/overdeck/seat_tmux_mediator.py";
export const SEAT_CONTROL_BASE = "/var/lib/overdeck/seat-control";
export const SEAT_CONTROL_BASE_MODE = "0711";
export const SEAT_CONTROL_NETNS_INODE = "netns-inode";
export const SEAT_CONTROL_NETNS_INODE_MODE = "0644";
export const SEAT_IMPLEMENTER_IDENTITY_MODULE = "/usr/local/lib/overdeck/seat_implementer_identity.py";
export const SEAT_COMMON_MODULE = "/usr/local/lib/overdeck/seat_common.py";

/** Regular-file shebang entrypoints under ~/.claude/bin required executable for seat provisioning. */
export const SEAT_PROVISION_SHEBANG_ENTRYPOINTS = Object.freeze([
  "overdeck-seat-scope-entry",
  "overdeck-seat-implementer-exec",
  "overdeck-seat-tmux-mediator",
  "overdeck-seat-proxy-validate",
  "install-seat-guard",
  "install-headless-guard",
]);
