MCPcopy Create free account
hub / github.com/tiann/hapi / handoffSessionToLocal

Method handoffSessionToLocal

cli/src/api/api.ts:241–254  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

239 }
240
241 async handoffSessionToLocal(sessionId: string): Promise<void> {
242 const response = await axios.post(
243 `${configuration.apiUrl}/cli/sessions/${encodeURIComponent(sessionId)}/handoff-local`,
244 {},
245 {
246 headers: this.authHeaders(),
247 timeout: 60_000
248 }
249 )
250 const parsed = LocalHandoffResponseSchema.safeParse(response.data)
251 if (!parsed.success || !parsed.data.ok) {
252 throw apiValidationError('Invalid /cli/sessions/:id/handoff-local response', response)
253 }
254 }
255
256 sessionSyncClient(session: Session): ApiSessionClient {
257 return new ApiSessionClient(this.token, session)

Callers 1

resume.tsFile · 0.45

Calls 2

authHeadersMethod · 0.95
apiValidationErrorFunction · 0.90

Tested by

no test coverage detected