π File detail
utils/swarm/constants.ts
π§© .tsπ 34 linesπΎ 1,334 bytesπ text
β Back to All Filesπ― Use case
This file lives under βutils/β, which covers cross-cutting helpers (shell, tempfiles, settings, messages, process input, β¦). On the API surface it exposes TEAM_LEAD_NAME, SWARM_SESSION_NAME, SWARM_VIEW_WINDOW_NAME, TMUX_COMMAND, and HIDDEN_SESSION_NAME (and more) β mainly types, interfaces, or factory objects.
Generated from folder role, exports, dependency roots, and inline comments β not hand-reviewed for every path.
π§ Inline summary
export const TEAM_LEAD_NAME = 'team-lead' export const SWARM_SESSION_NAME = 'claude-swarm' export const SWARM_VIEW_WINDOW_NAME = 'swarm-view' export const TMUX_COMMAND = 'tmux' export const HIDDEN_SESSION_NAME = 'claude-hidden'
π€ Exports (heuristic)
TEAM_LEAD_NAMESWARM_SESSION_NAMESWARM_VIEW_WINDOW_NAMETMUX_COMMANDHIDDEN_SESSION_NAMEgetSwarmSocketNameTEAMMATE_COMMAND_ENV_VARTEAMMATE_COLOR_ENV_VARPLAN_MODE_REQUIRED_ENV_VAR
π₯οΈ Source preview
export const TEAM_LEAD_NAME = 'team-lead'
export const SWARM_SESSION_NAME = 'claude-swarm'
export const SWARM_VIEW_WINDOW_NAME = 'swarm-view'
export const TMUX_COMMAND = 'tmux'
export const HIDDEN_SESSION_NAME = 'claude-hidden'
/**
* Gets the socket name for external swarm sessions (when user is not in tmux).
* Uses a separate socket to isolate swarm operations from user's tmux sessions.
* Includes PID to ensure multiple Claude instances don't conflict.
*/
export function getSwarmSocketName(): string {
return `claude-swarm-${process.pid}`
}
/**
* Environment variable to override the command used to spawn teammate instances.
* If not set, defaults to process.execPath (the current Claude binary).
* This allows customization for different environments or testing.
*/
export const TEAMMATE_COMMAND_ENV_VAR = 'CLAUDE_CODE_TEAMMATE_COMMAND'
/**
* Environment variable set on spawned teammates to indicate their assigned color.
* Used for colored output and pane identification.
*/
export const TEAMMATE_COLOR_ENV_VAR = 'CLAUDE_CODE_AGENT_COLOR'
/**
* Environment variable set on spawned teammates to require plan mode before implementation.
* When set to 'true', teammates must enter plan mode and get approval before writing code.
*/
export const PLAN_MODE_REQUIRED_ENV_VAR = 'CLAUDE_CODE_PLAN_MODE_REQUIRED'