MCPcopy Index your code
hub / github.com/callstack/agent-device / release

Method release

src/cloud-webdriver/runtime.ts:274–289  ·  view source on GitHub ↗
(lease: DeviceLease)

Source from the content-addressed store, hash-verified

272 }
273
274 private async release(lease: DeviceLease): Promise<Record<string, unknown> | undefined> {
275 if (lease.leaseProvider !== this.provider) return undefined;
276 const session = this.sessionsByLeaseId.get(lease.leaseId);
277 if (!session) return undefined;
278 this.sessionsByLeaseId.delete(lease.leaseId);
279 this.releasedProviderSessionIdsByLeaseId.set(lease.leaseId, session.providerSessionId);
280 const close = await this.closeSession(session);
281 const artifacts = await this.safeListArtifacts(session);
282 return {
283 provider: this.provider,
284 providerSessionId: session.providerSessionId,
285 ...close.cleanup,
286 ...(close.warnings.length > 0 ? { warnings: close.warnings } : {}),
287 ...(artifacts ? { cloudArtifacts: artifacts } : {}),
288 };
289 }
290
291 private async listCloudArtifacts(
292 query: CloudArtifactsQuery,

Calls 5

closeSessionMethod · 0.95
safeListArtifactsMethod · 0.95
getMethod · 0.80
deleteMethod · 0.80
setMethod · 0.80

Tested by 1