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

Method listResumableSessions

cli/src/api/api.ts:210–224  ·  view source on GitHub ↗
(machineId?: string)

Source from the content-addressed store, hash-verified

208 }
209
210 async listResumableSessions(machineId?: string): Promise<ResumableSession[]> {
211 const qs = machineId ? `?machineId=${encodeURIComponent(machineId)}` : ''
212 const response = await axios.get(
213 `${configuration.apiUrl}/cli/sessions/resumable${qs}`,
214 {
215 headers: this.authHeaders(),
216 timeout: 60_000
217 }
218 )
219 const parsed = ResumableSessionsResponseSchema.safeParse(response.data)
220 if (!parsed.success) {
221 throw apiValidationError('Invalid /cli/sessions/resumable response', response)
222 }
223 return parsed.data.sessions
224 }
225
226 async getLocalResumeTarget(sessionId: string): Promise<LocalResumeTarget> {
227 const response = await axios.get(

Callers 1

resolveSessionIdFunction · 0.80

Calls 3

authHeadersMethod · 0.95
apiValidationErrorFunction · 0.90
getMethod · 0.80

Tested by

no test coverage detected