MCPcopy Index your code
hub / github.com/codeaashu/claude-code / stopWork

Function stopWork

src/bridge/bridgeApi.ts:273–299  ·  view source on GitHub ↗
(
      environmentId: string,
      workId: string,
      force: boolean,
    )

Source from the content-addressed store, hash-verified

271 },
272
273 async stopWork(
274 environmentId: string,
275 workId: string,
276 force: boolean,
277 ): Promise<void> {
278 validateBridgeId(environmentId, 'environmentId')
279 validateBridgeId(workId, 'workId')
280
281 debug(`[bridge:api] POST .../work/${workId}/stop force=${force}`)
282
283 const response = await withOAuthRetry(
284 (token: string) =>
285 axios.post(
286 `${deps.baseUrl}/v1/environments/${environmentId}/work/${workId}/stop`,
287 { force },
288 {
289 headers: getHeaders(token),
290 timeout: 10_000,
291 validateStatus: s => s < 500,
292 },
293 ),
294 'StopWork',
295 )
296
297 handleErrorStatus(response.status, response.data, 'StopWork')
298 debug(`[bridge:api] POST .../work/${workId}/stop -> ${response.status}`)
299 },
300
301 async deregisterEnvironment(environmentId: string): Promise<void> {
302 validateBridgeId(environmentId, 'environmentId')

Callers

nothing calls this directly

Calls 6

validateBridgeIdFunction · 0.85
withOAuthRetryFunction · 0.85
getHeadersFunction · 0.85
handleErrorStatusFunction · 0.85
postMethod · 0.80
debugFunction · 0.70

Tested by

no test coverage detected