MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / handleStatus

Function handleStatus

src/cli/commands/daemon.ts:121–151  ·  view source on GitHub ↗
(
  client: DaemonClient,
  workspaceRoot: string,
  workspaceKey: string,
)

Source from the content-addressed store, hash-verified

119}
120
121async function handleStatus(
122 client: DaemonClient,
123 workspaceRoot: string,
124 workspaceKey: string,
125): Promise<void> {
126 try {
127 const status = await client.status();
128 writeLine('Daemon Status: Running');
129 writeLine(` PID: ${status.pid}`);
130 writeLine(` Workspace: ${status.workspaceRoot ?? workspaceRoot}`);
131 writeLine(` Socket: ${status.socketPath}`);
132 if (status.logPath) {
133 writeLine(` Logs: ${status.logPath}`);
134 }
135 writeLine(` Started: ${status.startedAt}`);
136 writeLine(` Tools: ${status.toolCount}`);
137 writeLine(` Workflows: ${status.enabledWorkflows.join(', ') || '(default)'}`);
138 } catch (err) {
139 if (err instanceof Error && err.message.includes('not running')) {
140 writeLine('Daemon Status: Not running');
141 writeLine(` Workspace: ${workspaceRoot}`);
142 const entry = readDaemonRegistryEntry(workspaceKey);
143 if (entry?.logPath) {
144 writeLine(` Logs: ${entry.logPath}`);
145 }
146 } else {
147 console.error('Error:', err instanceof Error ? err.message : String(err));
148 process.exitCode = 1;
149 }
150 }
151}
152
153async function handleStop(client: DaemonClient): Promise<void> {
154 try {

Callers 1

registerDaemonCommandsFunction · 0.85

Calls 3

readDaemonRegistryEntryFunction · 0.90
statusMethod · 0.80
writeLineFunction · 0.70

Tested by

no test coverage detected