@spotpatch/shared 1.9.0 → 1.11.0

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 (41) hide show
  1. package/dist/chunk-2LVIH7OA.js +75 -0
  2. package/dist/chunk-2LVIH7OA.js.map +1 -0
  3. package/dist/chunk-JGOIBOFI.js +34 -0
  4. package/dist/chunk-JGOIBOFI.js.map +1 -0
  5. package/dist/chunk-JU5HIWX7.js +431 -0
  6. package/dist/chunk-JU5HIWX7.js.map +1 -0
  7. package/dist/{chunk-K2UAPG7T.js → chunk-RK46Y7LD.js} +2 -23
  8. package/dist/chunk-RK46Y7LD.js.map +1 -0
  9. package/dist/{data-flow-runtime-zwbvImvl.d.cts → data-flow-runtime-BiouPr1G.d.cts} +2 -16
  10. package/dist/{data-flow-runtime-zwbvImvl.d.ts → data-flow-runtime-oKZOBYAB.d.ts} +2 -16
  11. package/dist/data-flow-runtime.cjs +11 -1
  12. package/dist/data-flow-runtime.cjs.map +1 -1
  13. package/dist/data-flow-runtime.d.cts +2 -1
  14. package/dist/data-flow-runtime.d.ts +2 -1
  15. package/dist/data-flow-runtime.js +4 -2
  16. package/dist/endpoints-GedF44M2.d.cts +26 -0
  17. package/dist/endpoints-GedF44M2.d.ts +26 -0
  18. package/dist/external-agent-control-BB-oicmw.d.cts +547 -0
  19. package/dist/external-agent-control-BB-oicmw.d.ts +547 -0
  20. package/dist/external-agent-node.cjs +692 -0
  21. package/dist/external-agent-node.cjs.map +1 -0
  22. package/dist/external-agent-node.d.cts +556 -0
  23. package/dist/external-agent-node.d.ts +556 -0
  24. package/dist/external-agent-node.js +210 -0
  25. package/dist/external-agent-node.js.map +1 -0
  26. package/dist/external-handoff--lT9XQEw.d.cts +720 -0
  27. package/dist/external-handoff--lT9XQEw.d.ts +720 -0
  28. package/dist/external-handoff-browser.cjs +324 -0
  29. package/dist/external-handoff-browser.cjs.map +1 -0
  30. package/dist/external-handoff-browser.d.cts +58 -0
  31. package/dist/external-handoff-browser.d.ts +58 -0
  32. package/dist/external-handoff-browser.js +198 -0
  33. package/dist/external-handoff-browser.js.map +1 -0
  34. package/dist/index.cjs +664 -129
  35. package/dist/index.cjs.map +1 -1
  36. package/dist/index.d.cts +164 -128
  37. package/dist/index.d.ts +164 -128
  38. package/dist/index.js +354 -267
  39. package/dist/index.js.map +1 -1
  40. package/package.json +28 -2
  41. package/dist/chunk-K2UAPG7T.js.map +0 -1
@@ -0,0 +1,556 @@
1
+ import { z } from 'zod';
2
+ import { E as EXTERNAL_HANDOFF_LIMITS, A as ActiveAdapterSummary, D as DispatchSummary, a as ExternalHandoffSnapshot } from './external-handoff--lT9XQEw.cjs';
3
+
4
+ declare const SPOTPATCH_BRIDGE_TOKEN_HEADER: "X-SpotPatch-Bridge-Token";
5
+ declare const SPOTPATCH_BRIDGE_PATHS: Readonly<{
6
+ status: "/bridge/v1/status";
7
+ current: "/bridge/v1/handoff/current";
8
+ wait: "/bridge/v1/handoff/wait";
9
+ ack: "/bridge/v1/handoff/ack";
10
+ activeClaim: "/bridge/v1/active/claim";
11
+ activeHeartbeat: "/bridge/v1/active/heartbeat";
12
+ activeReport: "/bridge/v1/active/report";
13
+ activeRelease: "/bridge/v1/active/release";
14
+ }>;
15
+ declare const EXTERNAL_HANDOFF_PROJECT_KEY_SALT: "spotpatch-external-agent-project-v1";
16
+ declare const externalHandoffDescriptorSchema: z.ZodObject<{
17
+ schemaVersion: z.ZodLiteral<1>;
18
+ brokerProtocolVersion: z.ZodLiteral<2>;
19
+ projectKey: z.ZodString;
20
+ sessionId: z.ZodString;
21
+ framework: z.ZodEnum<{
22
+ vite: "vite";
23
+ next: "next";
24
+ }>;
25
+ endpoint: z.ZodURL;
26
+ bridgeToken: z.ZodString;
27
+ pid: z.ZodNumber;
28
+ createdAt: z.ZodISODateTime;
29
+ }, z.core.$strict>;
30
+ declare const bridgeStatusRequestSchema: z.ZodObject<{}, z.core.$strict>;
31
+ declare const bridgeCurrentRequestSchema: z.ZodObject<{
32
+ cursor: z.ZodOptional<z.ZodString>;
33
+ }, z.core.$strict>;
34
+ declare const bridgeWaitRequestSchema: z.ZodObject<{
35
+ afterCursor: z.ZodOptional<z.ZodString>;
36
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
37
+ }, z.core.$strict>;
38
+ declare const bridgeAckRequestSchema: z.ZodObject<{
39
+ cursor: z.ZodString;
40
+ connectorInstanceId: z.ZodString;
41
+ }, z.core.$strict>;
42
+ declare const bridgeActiveClaimRequestSchema: z.ZodObject<{
43
+ adapterKind: z.ZodEnum<{
44
+ "claude-channel": "claude-channel";
45
+ "codex-app-server": "codex-app-server";
46
+ }>;
47
+ connectorInstanceId: z.ZodString;
48
+ }, z.core.$strict>;
49
+ declare const bridgeActiveHeartbeatRequestSchema: z.ZodObject<{
50
+ leaseToken: z.ZodString;
51
+ }, z.core.$strict>;
52
+ declare const bridgeActiveReportRequestSchema: z.ZodObject<{
53
+ leaseToken: z.ZodString;
54
+ cursor: z.ZodString;
55
+ phase: z.ZodEnum<{
56
+ dispatching: "dispatching";
57
+ dispatched: "dispatched";
58
+ working: "working";
59
+ completed: "completed";
60
+ failed: "failed";
61
+ "delivery-unknown": "delivery-unknown";
62
+ }>;
63
+ }, z.core.$strict>;
64
+ declare const bridgeActiveReleaseRequestSchema: z.ZodObject<{
65
+ leaseToken: z.ZodString;
66
+ }, z.core.$strict>;
67
+ declare const bridgeStatusSchema: z.ZodObject<{
68
+ brokerProtocolVersion: z.ZodLiteral<2>;
69
+ projectKey: z.ZodString;
70
+ sessionId: z.ZodString;
71
+ framework: z.ZodEnum<{
72
+ vite: "vite";
73
+ next: "next";
74
+ }>;
75
+ current: z.ZodNullable<z.ZodObject<{
76
+ sessionId: z.ZodString;
77
+ framework: z.ZodEnum<{
78
+ vite: "vite";
79
+ next: "next";
80
+ }>;
81
+ revision: z.ZodNumber;
82
+ cursor: z.ZodString;
83
+ targetCount: z.ZodNumber;
84
+ page: z.ZodObject<{
85
+ origin: z.ZodString;
86
+ pathname: z.ZodString;
87
+ }, z.core.$strict>;
88
+ publishedAt: z.ZodISODateTime;
89
+ expiresAt: z.ZodISODateTime;
90
+ state: z.ZodEnum<{
91
+ available: "available";
92
+ expired: "expired";
93
+ superseded: "superseded";
94
+ }>;
95
+ pickupCount: z.ZodNumber;
96
+ pickedUpAt: z.ZodOptional<z.ZodISODateTime>;
97
+ }, z.core.$strict>>;
98
+ }, z.core.$strict>;
99
+ declare const bridgeCurrentResultSchema: z.ZodObject<{
100
+ outcome: z.ZodLiteral<"handoff">;
101
+ snapshot: z.ZodObject<{
102
+ schemaVersion: z.ZodLiteral<1>;
103
+ cursor: z.ZodString;
104
+ session: z.ZodObject<{
105
+ id: z.ZodString;
106
+ framework: z.ZodEnum<{
107
+ vite: "vite";
108
+ next: "next";
109
+ }>;
110
+ }, z.core.$strict>;
111
+ revision: z.ZodNumber;
112
+ publishedAt: z.ZodISODateTime;
113
+ expiresAt: z.ZodISODateTime;
114
+ annotation: z.ZodObject<{
115
+ schemaVersion: z.ZodLiteral<3>;
116
+ id: z.ZodString;
117
+ locale: z.ZodEnum<{
118
+ "en-US": "en-US";
119
+ "zh-CN": "zh-CN";
120
+ }>;
121
+ page: z.ZodObject<{
122
+ url: z.ZodString;
123
+ pathname: z.ZodString;
124
+ title: z.ZodString;
125
+ viewportWidth: z.ZodNumber;
126
+ viewportHeight: z.ZodNumber;
127
+ devicePixelRatio: z.ZodNumber;
128
+ }, z.core.$strict>;
129
+ targets: z.ZodArray<z.ZodObject<{
130
+ instruction: z.ZodString;
131
+ page: z.ZodOptional<z.ZodObject<{
132
+ url: z.ZodString;
133
+ pathname: z.ZodString;
134
+ title: z.ZodString;
135
+ viewportWidth: z.ZodNumber;
136
+ viewportHeight: z.ZodNumber;
137
+ devicePixelRatio: z.ZodNumber;
138
+ }, z.core.$strict>>;
139
+ source: z.ZodObject<{
140
+ fileId: z.ZodOptional<z.ZodString>;
141
+ relativePath: z.ZodOptional<z.ZodString>;
142
+ line: z.ZodOptional<z.ZodNumber>;
143
+ column: z.ZodOptional<z.ZodNumber>;
144
+ origin: z.ZodEnum<{
145
+ "jsx-host": "jsx-host";
146
+ "react-fiber": "react-fiber";
147
+ "dom-ancestor": "dom-ancestor";
148
+ none: "none";
149
+ }>;
150
+ confidence: z.ZodEnum<{
151
+ exact: "exact";
152
+ probable: "probable";
153
+ approximate: "approximate";
154
+ unknown: "unknown";
155
+ }>;
156
+ }, z.core.$strict>;
157
+ react: z.ZodObject<{
158
+ supported: z.ZodBoolean;
159
+ version: z.ZodOptional<z.ZodString>;
160
+ componentName: z.ZodOptional<z.ZodString>;
161
+ componentSourceId: z.ZodOptional<z.ZodString>;
162
+ sourceVersion: z.ZodOptional<z.ZodString>;
163
+ componentStack: z.ZodArray<z.ZodString>;
164
+ source: z.ZodOptional<z.ZodObject<{
165
+ fileId: z.ZodOptional<z.ZodString>;
166
+ relativePath: z.ZodOptional<z.ZodString>;
167
+ line: z.ZodOptional<z.ZodNumber>;
168
+ column: z.ZodOptional<z.ZodNumber>;
169
+ origin: z.ZodEnum<{
170
+ "jsx-host": "jsx-host";
171
+ "react-fiber": "react-fiber";
172
+ "dom-ancestor": "dom-ancestor";
173
+ none: "none";
174
+ }>;
175
+ confidence: z.ZodEnum<{
176
+ exact: "exact";
177
+ probable: "probable";
178
+ approximate: "approximate";
179
+ unknown: "unknown";
180
+ }>;
181
+ }, z.core.$strict>>;
182
+ }, z.core.$strict>;
183
+ element: z.ZodObject<{
184
+ tagName: z.ZodString;
185
+ selector: z.ZodString;
186
+ sanitizedHtml: z.ZodString;
187
+ textPreview: z.ZodOptional<z.ZodString>;
188
+ role: z.ZodOptional<z.ZodString>;
189
+ rect: z.ZodObject<{
190
+ x: z.ZodNumber;
191
+ y: z.ZodNumber;
192
+ width: z.ZodNumber;
193
+ height: z.ZodNumber;
194
+ }, z.core.$strict>;
195
+ }, z.core.$strict>;
196
+ styles: z.ZodObject<{
197
+ classNames: z.ZodArray<z.ZodString>;
198
+ inlineStyle: z.ZodOptional<z.ZodString>;
199
+ matchedRules: z.ZodArray<z.ZodObject<{
200
+ selector: z.ZodString;
201
+ declarations: z.ZodString;
202
+ source: z.ZodOptional<z.ZodString>;
203
+ media: z.ZodOptional<z.ZodString>;
204
+ }, z.core.$strict>>;
205
+ computed: z.ZodRecord<z.ZodString, z.ZodString>;
206
+ warnings: z.ZodArray<z.ZodString>;
207
+ }, z.core.$strict>;
208
+ code: z.ZodOptional<z.ZodObject<{
209
+ relativePath: z.ZodString;
210
+ language: z.ZodEnum<{
211
+ tsx: "tsx";
212
+ jsx: "jsx";
213
+ }>;
214
+ startLine: z.ZodNumber;
215
+ endLine: z.ZodNumber;
216
+ excerpt: z.ZodString;
217
+ boundary: z.ZodEnum<{
218
+ component: "component";
219
+ "nearby-lines": "nearby-lines";
220
+ }>;
221
+ }, z.core.$strict>>;
222
+ warnings: z.ZodArray<z.ZodString>;
223
+ }, z.core.$strict>>;
224
+ createdAt: z.ZodISODateTime;
225
+ }, z.core.$strict>;
226
+ }, z.core.$strict>;
227
+ }, z.core.$strict>;
228
+ declare const bridgeWaitResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
229
+ outcome: z.ZodLiteral<"handoff">;
230
+ snapshot: z.ZodObject<{
231
+ schemaVersion: z.ZodLiteral<1>;
232
+ cursor: z.ZodString;
233
+ session: z.ZodObject<{
234
+ id: z.ZodString;
235
+ framework: z.ZodEnum<{
236
+ vite: "vite";
237
+ next: "next";
238
+ }>;
239
+ }, z.core.$strict>;
240
+ revision: z.ZodNumber;
241
+ publishedAt: z.ZodISODateTime;
242
+ expiresAt: z.ZodISODateTime;
243
+ annotation: z.ZodObject<{
244
+ schemaVersion: z.ZodLiteral<3>;
245
+ id: z.ZodString;
246
+ locale: z.ZodEnum<{
247
+ "en-US": "en-US";
248
+ "zh-CN": "zh-CN";
249
+ }>;
250
+ page: z.ZodObject<{
251
+ url: z.ZodString;
252
+ pathname: z.ZodString;
253
+ title: z.ZodString;
254
+ viewportWidth: z.ZodNumber;
255
+ viewportHeight: z.ZodNumber;
256
+ devicePixelRatio: z.ZodNumber;
257
+ }, z.core.$strict>;
258
+ targets: z.ZodArray<z.ZodObject<{
259
+ instruction: z.ZodString;
260
+ page: z.ZodOptional<z.ZodObject<{
261
+ url: z.ZodString;
262
+ pathname: z.ZodString;
263
+ title: z.ZodString;
264
+ viewportWidth: z.ZodNumber;
265
+ viewportHeight: z.ZodNumber;
266
+ devicePixelRatio: z.ZodNumber;
267
+ }, z.core.$strict>>;
268
+ source: z.ZodObject<{
269
+ fileId: z.ZodOptional<z.ZodString>;
270
+ relativePath: z.ZodOptional<z.ZodString>;
271
+ line: z.ZodOptional<z.ZodNumber>;
272
+ column: z.ZodOptional<z.ZodNumber>;
273
+ origin: z.ZodEnum<{
274
+ "jsx-host": "jsx-host";
275
+ "react-fiber": "react-fiber";
276
+ "dom-ancestor": "dom-ancestor";
277
+ none: "none";
278
+ }>;
279
+ confidence: z.ZodEnum<{
280
+ exact: "exact";
281
+ probable: "probable";
282
+ approximate: "approximate";
283
+ unknown: "unknown";
284
+ }>;
285
+ }, z.core.$strict>;
286
+ react: z.ZodObject<{
287
+ supported: z.ZodBoolean;
288
+ version: z.ZodOptional<z.ZodString>;
289
+ componentName: z.ZodOptional<z.ZodString>;
290
+ componentSourceId: z.ZodOptional<z.ZodString>;
291
+ sourceVersion: z.ZodOptional<z.ZodString>;
292
+ componentStack: z.ZodArray<z.ZodString>;
293
+ source: z.ZodOptional<z.ZodObject<{
294
+ fileId: z.ZodOptional<z.ZodString>;
295
+ relativePath: z.ZodOptional<z.ZodString>;
296
+ line: z.ZodOptional<z.ZodNumber>;
297
+ column: z.ZodOptional<z.ZodNumber>;
298
+ origin: z.ZodEnum<{
299
+ "jsx-host": "jsx-host";
300
+ "react-fiber": "react-fiber";
301
+ "dom-ancestor": "dom-ancestor";
302
+ none: "none";
303
+ }>;
304
+ confidence: z.ZodEnum<{
305
+ exact: "exact";
306
+ probable: "probable";
307
+ approximate: "approximate";
308
+ unknown: "unknown";
309
+ }>;
310
+ }, z.core.$strict>>;
311
+ }, z.core.$strict>;
312
+ element: z.ZodObject<{
313
+ tagName: z.ZodString;
314
+ selector: z.ZodString;
315
+ sanitizedHtml: z.ZodString;
316
+ textPreview: z.ZodOptional<z.ZodString>;
317
+ role: z.ZodOptional<z.ZodString>;
318
+ rect: z.ZodObject<{
319
+ x: z.ZodNumber;
320
+ y: z.ZodNumber;
321
+ width: z.ZodNumber;
322
+ height: z.ZodNumber;
323
+ }, z.core.$strict>;
324
+ }, z.core.$strict>;
325
+ styles: z.ZodObject<{
326
+ classNames: z.ZodArray<z.ZodString>;
327
+ inlineStyle: z.ZodOptional<z.ZodString>;
328
+ matchedRules: z.ZodArray<z.ZodObject<{
329
+ selector: z.ZodString;
330
+ declarations: z.ZodString;
331
+ source: z.ZodOptional<z.ZodString>;
332
+ media: z.ZodOptional<z.ZodString>;
333
+ }, z.core.$strict>>;
334
+ computed: z.ZodRecord<z.ZodString, z.ZodString>;
335
+ warnings: z.ZodArray<z.ZodString>;
336
+ }, z.core.$strict>;
337
+ code: z.ZodOptional<z.ZodObject<{
338
+ relativePath: z.ZodString;
339
+ language: z.ZodEnum<{
340
+ tsx: "tsx";
341
+ jsx: "jsx";
342
+ }>;
343
+ startLine: z.ZodNumber;
344
+ endLine: z.ZodNumber;
345
+ excerpt: z.ZodString;
346
+ boundary: z.ZodEnum<{
347
+ component: "component";
348
+ "nearby-lines": "nearby-lines";
349
+ }>;
350
+ }, z.core.$strict>>;
351
+ warnings: z.ZodArray<z.ZodString>;
352
+ }, z.core.$strict>>;
353
+ createdAt: z.ZodISODateTime;
354
+ }, z.core.$strict>;
355
+ }, z.core.$strict>;
356
+ }, z.core.$strict>, z.ZodObject<{
357
+ outcome: z.ZodLiteral<"timeout">;
358
+ }, z.core.$strict>], "outcome">;
359
+ declare const bridgeAckResultSchema: z.ZodObject<{
360
+ summary: z.ZodObject<{
361
+ sessionId: z.ZodString;
362
+ framework: z.ZodEnum<{
363
+ vite: "vite";
364
+ next: "next";
365
+ }>;
366
+ revision: z.ZodNumber;
367
+ cursor: z.ZodString;
368
+ targetCount: z.ZodNumber;
369
+ page: z.ZodObject<{
370
+ origin: z.ZodString;
371
+ pathname: z.ZodString;
372
+ }, z.core.$strict>;
373
+ publishedAt: z.ZodISODateTime;
374
+ expiresAt: z.ZodISODateTime;
375
+ state: z.ZodEnum<{
376
+ available: "available";
377
+ expired: "expired";
378
+ superseded: "superseded";
379
+ }>;
380
+ pickupCount: z.ZodNumber;
381
+ pickedUpAt: z.ZodOptional<z.ZodISODateTime>;
382
+ }, z.core.$strict>;
383
+ }, z.core.$strict>;
384
+ declare const bridgeActiveClaimResultSchema: z.ZodObject<{
385
+ leaseToken: z.ZodString;
386
+ heartbeatIntervalMs: z.ZodLiteral<3000>;
387
+ baselineCursor: z.ZodNullable<z.ZodString>;
388
+ activeAdapter: z.ZodObject<{
389
+ kind: z.ZodEnum<{
390
+ "claude-channel": "claude-channel";
391
+ "codex-app-server": "codex-app-server";
392
+ }>;
393
+ state: z.ZodEnum<{
394
+ ready: "ready";
395
+ busy: "busy";
396
+ blocked: "blocked";
397
+ }>;
398
+ canDispatch: z.ZodBoolean;
399
+ connectedAt: z.ZodISODateTime;
400
+ updatedAt: z.ZodISODateTime;
401
+ }, z.core.$strict>;
402
+ }, z.core.$strict>;
403
+ declare const bridgeActiveStateResultSchema: z.ZodObject<{
404
+ activeAdapter: z.ZodNullable<z.ZodObject<{
405
+ kind: z.ZodEnum<{
406
+ "claude-channel": "claude-channel";
407
+ "codex-app-server": "codex-app-server";
408
+ }>;
409
+ state: z.ZodEnum<{
410
+ ready: "ready";
411
+ busy: "busy";
412
+ blocked: "blocked";
413
+ }>;
414
+ canDispatch: z.ZodBoolean;
415
+ connectedAt: z.ZodISODateTime;
416
+ updatedAt: z.ZodISODateTime;
417
+ }, z.core.$strict>>;
418
+ dispatch: z.ZodNullable<z.ZodObject<{
419
+ adapterKind: z.ZodEnum<{
420
+ "claude-channel": "claude-channel";
421
+ "codex-app-server": "codex-app-server";
422
+ }>;
423
+ revision: z.ZodNumber;
424
+ phase: z.ZodEnum<{
425
+ dispatching: "dispatching";
426
+ dispatched: "dispatched";
427
+ working: "working";
428
+ completed: "completed";
429
+ failed: "failed";
430
+ "delivery-unknown": "delivery-unknown";
431
+ queued: "queued";
432
+ }>;
433
+ updatedAt: z.ZodISODateTime;
434
+ }, z.core.$strict>>;
435
+ }, z.core.$strict>;
436
+ declare const bridgeActiveHeartbeatResultSchema: z.ZodObject<{
437
+ activeAdapter: z.ZodNullable<z.ZodObject<{
438
+ kind: z.ZodEnum<{
439
+ "claude-channel": "claude-channel";
440
+ "codex-app-server": "codex-app-server";
441
+ }>;
442
+ state: z.ZodEnum<{
443
+ ready: "ready";
444
+ busy: "busy";
445
+ blocked: "blocked";
446
+ }>;
447
+ canDispatch: z.ZodBoolean;
448
+ connectedAt: z.ZodISODateTime;
449
+ updatedAt: z.ZodISODateTime;
450
+ }, z.core.$strict>>;
451
+ dispatch: z.ZodNullable<z.ZodObject<{
452
+ adapterKind: z.ZodEnum<{
453
+ "claude-channel": "claude-channel";
454
+ "codex-app-server": "codex-app-server";
455
+ }>;
456
+ revision: z.ZodNumber;
457
+ phase: z.ZodEnum<{
458
+ dispatching: "dispatching";
459
+ dispatched: "dispatched";
460
+ working: "working";
461
+ completed: "completed";
462
+ failed: "failed";
463
+ "delivery-unknown": "delivery-unknown";
464
+ queued: "queued";
465
+ }>;
466
+ updatedAt: z.ZodISODateTime;
467
+ }, z.core.$strict>>;
468
+ }, z.core.$strict>;
469
+ declare const bridgeActiveReportResultSchema: z.ZodObject<{
470
+ activeAdapter: z.ZodNullable<z.ZodObject<{
471
+ kind: z.ZodEnum<{
472
+ "claude-channel": "claude-channel";
473
+ "codex-app-server": "codex-app-server";
474
+ }>;
475
+ state: z.ZodEnum<{
476
+ ready: "ready";
477
+ busy: "busy";
478
+ blocked: "blocked";
479
+ }>;
480
+ canDispatch: z.ZodBoolean;
481
+ connectedAt: z.ZodISODateTime;
482
+ updatedAt: z.ZodISODateTime;
483
+ }, z.core.$strict>>;
484
+ dispatch: z.ZodNullable<z.ZodObject<{
485
+ adapterKind: z.ZodEnum<{
486
+ "claude-channel": "claude-channel";
487
+ "codex-app-server": "codex-app-server";
488
+ }>;
489
+ revision: z.ZodNumber;
490
+ phase: z.ZodEnum<{
491
+ dispatching: "dispatching";
492
+ dispatched: "dispatched";
493
+ working: "working";
494
+ completed: "completed";
495
+ failed: "failed";
496
+ "delivery-unknown": "delivery-unknown";
497
+ queued: "queued";
498
+ }>;
499
+ updatedAt: z.ZodISODateTime;
500
+ }, z.core.$strict>>;
501
+ }, z.core.$strict>;
502
+ declare const bridgeActiveReleaseResultSchema: z.ZodObject<{
503
+ activeAdapter: z.ZodNullable<z.ZodObject<{
504
+ kind: z.ZodEnum<{
505
+ "claude-channel": "claude-channel";
506
+ "codex-app-server": "codex-app-server";
507
+ }>;
508
+ state: z.ZodEnum<{
509
+ ready: "ready";
510
+ busy: "busy";
511
+ blocked: "blocked";
512
+ }>;
513
+ canDispatch: z.ZodBoolean;
514
+ connectedAt: z.ZodISODateTime;
515
+ updatedAt: z.ZodISODateTime;
516
+ }, z.core.$strict>>;
517
+ dispatch: z.ZodNullable<z.ZodObject<{
518
+ adapterKind: z.ZodEnum<{
519
+ "claude-channel": "claude-channel";
520
+ "codex-app-server": "codex-app-server";
521
+ }>;
522
+ revision: z.ZodNumber;
523
+ phase: z.ZodEnum<{
524
+ dispatching: "dispatching";
525
+ dispatched: "dispatched";
526
+ working: "working";
527
+ completed: "completed";
528
+ failed: "failed";
529
+ "delivery-unknown": "delivery-unknown";
530
+ queued: "queued";
531
+ }>;
532
+ updatedAt: z.ZodISODateTime;
533
+ }, z.core.$strict>>;
534
+ }, z.core.$strict>;
535
+ type ExternalHandoffDescriptor = z.infer<typeof externalHandoffDescriptorSchema>;
536
+ type BridgeStatus = z.infer<typeof bridgeStatusSchema>;
537
+ type BridgeWaitResult = Readonly<{
538
+ outcome: "handoff";
539
+ snapshot: ExternalHandoffSnapshot;
540
+ }> | Readonly<{
541
+ outcome: "timeout";
542
+ }>;
543
+ interface BridgeActiveClaimResult {
544
+ readonly leaseToken: string;
545
+ readonly heartbeatIntervalMs: typeof EXTERNAL_HANDOFF_LIMITS.activeHeartbeatIntervalMs;
546
+ readonly baselineCursor: string | null;
547
+ readonly activeAdapter: ActiveAdapterSummary;
548
+ }
549
+ interface BridgeActiveStateResult {
550
+ readonly activeAdapter: ActiveAdapterSummary | null;
551
+ readonly dispatch: DispatchSummary | null;
552
+ }
553
+ declare function resolveExternalHandoffRuntimeDirectory(create: boolean): Promise<string>;
554
+ declare function computeExternalHandoffProjectKey(root: string): Promise<string>;
555
+
556
+ export { type BridgeActiveClaimResult, type BridgeActiveStateResult, type BridgeStatus, type BridgeWaitResult, EXTERNAL_HANDOFF_PROJECT_KEY_SALT, type ExternalHandoffDescriptor, SPOTPATCH_BRIDGE_PATHS, SPOTPATCH_BRIDGE_TOKEN_HEADER, bridgeAckRequestSchema, bridgeAckResultSchema, bridgeActiveClaimRequestSchema, bridgeActiveClaimResultSchema, bridgeActiveHeartbeatRequestSchema, bridgeActiveHeartbeatResultSchema, bridgeActiveReleaseRequestSchema, bridgeActiveReleaseResultSchema, bridgeActiveReportRequestSchema, bridgeActiveReportResultSchema, bridgeActiveStateResultSchema, bridgeCurrentRequestSchema, bridgeCurrentResultSchema, bridgeStatusRequestSchema, bridgeStatusSchema, bridgeWaitRequestSchema, bridgeWaitResultSchema, computeExternalHandoffProjectKey, externalHandoffDescriptorSchema, resolveExternalHandoffRuntimeDirectory };