@miraland-labs/conduit-bridge 0.14.3 → 0.14.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/client.js +6 -2
  2. package/package.json +1 -1
package/dist/client.js CHANGED
@@ -40,11 +40,15 @@ export class ConduitClient {
40
40
  return data;
41
41
  }
42
42
  async claim(taskId, attemptId, extras) {
43
- const data = await this.request(`/runner/v1/tasks/${taskId}/claim`, { method: "POST", body: JSON.stringify({ attempt_id: attemptId, idempotency_key: `bridge:claim:${attemptId}` }) });
43
+ // The lease token is this machine's bearer credential for the attempt. The server stores only
44
+ // its hash, so the client mints it and re-sends the identical token if it ever retries the
45
+ // claim (the idempotency key is deterministic per attempt exactly so that replay works).
46
+ const leaseToken = `lease_${crypto.randomUUID()}${crypto.randomUUID()}`;
47
+ const data = await this.request(`/runner/v1/tasks/${taskId}/claim`, { method: "POST", body: JSON.stringify({ attempt_id: attemptId, lease_token: leaseToken, idempotency_key: `bridge:claim:${attemptId}` }) });
44
48
  const active = {
45
49
  taskId,
46
50
  attemptId,
47
- leaseToken: String(data.lease_token),
51
+ leaseToken,
48
52
  leaseExpiresAt: String(data.lease_expires_at),
49
53
  phase: "claimed",
50
54
  ...(extras?.driverId ? { driverId: extras.driverId } : {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miraland-labs/conduit-bridge",
3
- "version": "0.14.3",
3
+ "version": "0.14.4",
4
4
  "description": "Conduit Bridge CLI — join, connect, disconnect, multi-driver lanes, and run Claude Code / Codex / Cursor / OpenCode / Pi / Kiro / Antigravity agents for a Conduit organization",
5
5
  "type": "module",
6
6
  "bin": {