MCPcopy
hub / github.com/coder/mux / enterHookPhase

Method enterHookPhase

src/node/services/initStateManager.ts:223–238  ·  view source on GitHub ↗

* Signal that the .mux/init hook is starting. * This marks the transition from runtime provisioning to hook execution so * waitForInit() can start the 5-minute timeout at the right time.

(workspaceId: string)

Source from the content-addressed store, hash-verified

221 * waitForInit() can start the 5-minute timeout at the right time.
222 */
223 enterHookPhase(workspaceId: string): void {
224 const state = this.store.getState(workspaceId);
225 if (state?.status !== "running") {
226 return;
227 }
228
229 if ((state.phase ?? "runtime_setup") === "init_hook") {
230 return;
231 }
232
233 state.phase = "init_hook";
234 state.hookStartTime = Date.now();
235
236 const promiseEntry = this.initPromises.get(workspaceId);
237 promiseEntry?.resolveHookPhase();
238 }
239
240 /**
241 * Append output line from init hook.

Callers

nothing calls this directly

Calls 2

getStateMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected