MCPcopy Create free account
hub / github.com/anomalyco/opencode / deviceTokenClient

Function deviceTokenClient

packages/opencode/test/account/service.test.ts:64–69  ·  view source on GitHub ↗
(body: unknown, status = 400)

Source from the content-addressed store, hash-verified

62 })
63
64const deviceTokenClient = (body: unknown, status = 400) =>
65 HttpClient.make((req) =>
66 Effect.succeed(
67 req.url === "https://one.example.com/auth/device/token" ? json(req, body, status) : json(req, {}, 404),
68 ),
69 )
70
71const poll = (body: unknown, status = 400) =>
72 Account.Service.use((s) => s.poll(login())).pipe(Effect.provide(live(deviceTokenClient(body, status))))

Callers 1

pollFunction · 0.85

Calls 2

jsonFunction · 0.70
makeMethod · 0.45

Tested by

no test coverage detected