@spotpatch/shared 1.8.0 → 1.10.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.
- package/dist/chunk-2LVIH7OA.js +75 -0
- package/dist/chunk-2LVIH7OA.js.map +1 -0
- package/dist/chunk-MOGITGPP.js +431 -0
- package/dist/chunk-MOGITGPP.js.map +1 -0
- package/dist/chunk-RK46Y7LD.js +34 -0
- package/dist/chunk-RK46Y7LD.js.map +1 -0
- package/dist/chunk-ZCG3DLSW.js +28 -0
- package/dist/chunk-ZCG3DLSW.js.map +1 -0
- package/dist/data-flow-runtime-BMm3F-eV.d.cts +658 -0
- package/dist/data-flow-runtime-Dp-xznQW.d.ts +658 -0
- package/dist/data-flow-runtime.cjs +78 -0
- package/dist/data-flow-runtime.cjs.map +1 -0
- package/dist/data-flow-runtime.d.cts +3 -0
- package/dist/data-flow-runtime.d.ts +3 -0
- package/dist/data-flow-runtime.js +13 -0
- package/dist/data-flow-runtime.js.map +1 -0
- package/dist/endpoints-BT-Bl1WS.d.cts +20 -0
- package/dist/endpoints-BT-Bl1WS.d.ts +20 -0
- package/dist/external-agent-node.cjs +692 -0
- package/dist/external-agent-node.cjs.map +1 -0
- package/dist/external-agent-node.d.cts +556 -0
- package/dist/external-agent-node.d.ts +556 -0
- package/dist/external-agent-node.js +210 -0
- package/dist/external-agent-node.js.map +1 -0
- package/dist/external-handoff-CWoooqhp.d.cts +720 -0
- package/dist/external-handoff-CWoooqhp.d.ts +720 -0
- package/dist/external-handoff-browser.cjs +163 -0
- package/dist/external-handoff-browser.cjs.map +1 -0
- package/dist/external-handoff-browser.d.cts +32 -0
- package/dist/external-handoff-browser.d.ts +32 -0
- package/dist/external-handoff-browser.js +58 -0
- package/dist/external-handoff-browser.js.map +1 -0
- package/dist/index.cjs +938 -154
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +212 -110
- package/dist/index.d.ts +212 -110
- package/dist/index.js +616 -302
- package/dist/index.js.map +1 -1
- package/package.json +45 -2
|
@@ -0,0 +1,720 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
interface ContextBudget {
|
|
4
|
+
readonly totalCharacters: number;
|
|
5
|
+
readonly domCharacters: number;
|
|
6
|
+
readonly cssCharacters: number;
|
|
7
|
+
readonly codeCharacters: number;
|
|
8
|
+
readonly maxCodeLines: number;
|
|
9
|
+
readonly maxComponentDepth: number;
|
|
10
|
+
}
|
|
11
|
+
interface CodeContext {
|
|
12
|
+
readonly relativePath: string;
|
|
13
|
+
readonly language: "tsx" | "jsx";
|
|
14
|
+
readonly startLine: number;
|
|
15
|
+
readonly endLine: number;
|
|
16
|
+
readonly excerpt: string;
|
|
17
|
+
readonly boundary: "component" | "nearby-lines";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
type SourceConfidence = "exact" | "probable" | "approximate" | "unknown";
|
|
21
|
+
type SourceOrigin = "jsx-host" | "react-fiber" | "dom-ancestor" | "none";
|
|
22
|
+
interface SourceRef {
|
|
23
|
+
readonly fileId?: string;
|
|
24
|
+
readonly relativePath?: string;
|
|
25
|
+
readonly line?: number;
|
|
26
|
+
readonly column?: number;
|
|
27
|
+
readonly origin: SourceOrigin;
|
|
28
|
+
readonly confidence: SourceConfidence;
|
|
29
|
+
}
|
|
30
|
+
interface ReactContext {
|
|
31
|
+
readonly supported: boolean;
|
|
32
|
+
readonly version?: string;
|
|
33
|
+
readonly componentName?: string;
|
|
34
|
+
readonly componentSourceId?: string;
|
|
35
|
+
readonly sourceVersion?: string;
|
|
36
|
+
readonly componentStack: readonly string[];
|
|
37
|
+
readonly source?: SourceRef;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface MatchedStyleRule {
|
|
41
|
+
readonly selector: string;
|
|
42
|
+
readonly declarations: string;
|
|
43
|
+
readonly source?: string;
|
|
44
|
+
readonly media?: string;
|
|
45
|
+
}
|
|
46
|
+
interface StyleContext {
|
|
47
|
+
readonly classNames: readonly string[];
|
|
48
|
+
readonly inlineStyle?: string;
|
|
49
|
+
readonly matchedRules: readonly MatchedStyleRule[];
|
|
50
|
+
readonly computed: Readonly<Record<string, string>>;
|
|
51
|
+
readonly warnings: readonly string[];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface PageContext {
|
|
55
|
+
readonly url: string;
|
|
56
|
+
readonly pathname: string;
|
|
57
|
+
readonly title: string;
|
|
58
|
+
readonly viewportWidth: number;
|
|
59
|
+
readonly viewportHeight: number;
|
|
60
|
+
readonly devicePixelRatio: number;
|
|
61
|
+
}
|
|
62
|
+
interface ElementContext {
|
|
63
|
+
readonly tagName: string;
|
|
64
|
+
readonly selector: string;
|
|
65
|
+
readonly sanitizedHtml: string;
|
|
66
|
+
readonly textPreview?: string;
|
|
67
|
+
readonly role?: string;
|
|
68
|
+
readonly rect: Readonly<{
|
|
69
|
+
x: number;
|
|
70
|
+
y: number;
|
|
71
|
+
width: number;
|
|
72
|
+
height: number;
|
|
73
|
+
}>;
|
|
74
|
+
}
|
|
75
|
+
/** Protocol hard limit. Runtime configuration may choose a smaller limit. */
|
|
76
|
+
declare const MAX_ANNOTATION_TARGETS = 20;
|
|
77
|
+
/** Each target owns its requested change; the UI enforces the same bound. */
|
|
78
|
+
declare const MAX_TARGET_INSTRUCTION_CHARACTERS = 2000;
|
|
79
|
+
/** Keeps the complete, atomic user intent within the prompt and request budgets. */
|
|
80
|
+
declare const MAX_ANNOTATION_INSTRUCTION_CHARACTERS = 4000;
|
|
81
|
+
declare const SPOTPATCH_LOCALES: readonly ["en-US", "zh-CN"];
|
|
82
|
+
type SpotPatchLocale = (typeof SPOTPATCH_LOCALES)[number];
|
|
83
|
+
declare const SPOTPATCH_LOCALE_PREFERENCES: readonly ["auto", "en-US", "zh-CN"];
|
|
84
|
+
type SpotPatchLocalePreference = (typeof SPOTPATCH_LOCALE_PREFERENCES)[number];
|
|
85
|
+
interface SpotTargetContext {
|
|
86
|
+
readonly instruction: string;
|
|
87
|
+
readonly page?: Readonly<PageContext>;
|
|
88
|
+
readonly source: SourceRef;
|
|
89
|
+
readonly react: ReactContext;
|
|
90
|
+
readonly element: ElementContext;
|
|
91
|
+
readonly styles: StyleContext;
|
|
92
|
+
readonly code?: CodeContext;
|
|
93
|
+
readonly warnings: readonly string[];
|
|
94
|
+
}
|
|
95
|
+
interface SpotAnnotation {
|
|
96
|
+
readonly schemaVersion: 3;
|
|
97
|
+
readonly id: string;
|
|
98
|
+
readonly locale: SpotPatchLocale;
|
|
99
|
+
readonly page: Readonly<PageContext>;
|
|
100
|
+
readonly targets: readonly SpotTargetContext[];
|
|
101
|
+
readonly createdAt: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
declare const EXTERNAL_HANDOFF_SNAPSHOT_SCHEMA_VERSION: 1;
|
|
105
|
+
declare const EXTERNAL_HANDOFF_BROKER_PROTOCOL_VERSION: 2;
|
|
106
|
+
declare const EXTERNAL_HANDOFF_STATES: readonly ["available", "expired", "superseded"];
|
|
107
|
+
declare const EXTERNAL_HANDOFF_FRAMEWORKS: readonly ["vite", "next"];
|
|
108
|
+
declare const EXTERNAL_HANDOFF_ACTIVE_ADAPTER_KINDS: readonly ["claude-channel", "codex-app-server"];
|
|
109
|
+
declare const EXTERNAL_HANDOFF_ACTIVE_ADAPTER_STATES: readonly ["ready", "busy", "blocked"];
|
|
110
|
+
declare const EXTERNAL_HANDOFF_DISPATCH_PHASES: readonly ["queued", "dispatching", "dispatched", "working", "completed", "failed", "delivery-unknown"];
|
|
111
|
+
declare const EXTERNAL_HANDOFF_REPORTABLE_DISPATCH_PHASES: readonly ["dispatching", "dispatched", "working", "completed", "failed", "delivery-unknown"];
|
|
112
|
+
declare const EXTERNAL_HANDOFF_LIMITS: Readonly<{
|
|
113
|
+
readonly maximumSnapshotBytes: number;
|
|
114
|
+
readonly maximumPublishBodyBytes: number;
|
|
115
|
+
readonly maximumBrokerRequestBytes: number;
|
|
116
|
+
readonly maximumDescriptorBytes: number;
|
|
117
|
+
readonly maximumHistorySummaries: 8;
|
|
118
|
+
readonly maximumConnectorReceipts: 64;
|
|
119
|
+
readonly handoffTtlMs: number;
|
|
120
|
+
readonly defaultWaitMs: 20000;
|
|
121
|
+
readonly maximumWaitMs: 25000;
|
|
122
|
+
readonly maximumWaiters: 8;
|
|
123
|
+
readonly maximumDescriptorsPerScan: 32;
|
|
124
|
+
readonly maximumProjectAncestors: 64;
|
|
125
|
+
readonly maximumBrokerHeaderBytes: number;
|
|
126
|
+
readonly maximumBrokerSockets: 32;
|
|
127
|
+
readonly brokerDiscoveryTimeoutMs: 750;
|
|
128
|
+
readonly brokerRequestTimeoutMs: 2000;
|
|
129
|
+
readonly brokerWaitGraceMs: 2000;
|
|
130
|
+
readonly maximumSetupConfigBytes: number;
|
|
131
|
+
readonly maximumRequestIdRecords: 16;
|
|
132
|
+
readonly requestIdTtlMs: number;
|
|
133
|
+
readonly activeHeartbeatIntervalMs: 3000;
|
|
134
|
+
readonly activeLeaseDurationMs: 10000;
|
|
135
|
+
readonly activeTransportWriteTimeoutMs: 5000;
|
|
136
|
+
readonly activeDispatchTimeoutMs: number;
|
|
137
|
+
readonly activeStatusPollMs: 1000;
|
|
138
|
+
}>;
|
|
139
|
+
type ExternalHandoffState = (typeof EXTERNAL_HANDOFF_STATES)[number];
|
|
140
|
+
type ExternalHandoffFramework = (typeof EXTERNAL_HANDOFF_FRAMEWORKS)[number];
|
|
141
|
+
type ExternalHandoffActiveAdapterKind = (typeof EXTERNAL_HANDOFF_ACTIVE_ADAPTER_KINDS)[number];
|
|
142
|
+
type ExternalHandoffActiveAdapterState = (typeof EXTERNAL_HANDOFF_ACTIVE_ADAPTER_STATES)[number];
|
|
143
|
+
type ExternalHandoffDispatchPhase = (typeof EXTERNAL_HANDOFF_DISPATCH_PHASES)[number];
|
|
144
|
+
type ExternalHandoffReportableDispatchPhase = (typeof EXTERNAL_HANDOFF_REPORTABLE_DISPATCH_PHASES)[number];
|
|
145
|
+
|
|
146
|
+
declare const externalHandoffReportableDispatchPhaseSchema: z.ZodEnum<{
|
|
147
|
+
completed: "completed";
|
|
148
|
+
failed: "failed";
|
|
149
|
+
dispatching: "dispatching";
|
|
150
|
+
dispatched: "dispatched";
|
|
151
|
+
working: "working";
|
|
152
|
+
"delivery-unknown": "delivery-unknown";
|
|
153
|
+
}>;
|
|
154
|
+
declare const externalHandoffSummarySchema: z.ZodObject<{
|
|
155
|
+
sessionId: z.ZodString;
|
|
156
|
+
framework: z.ZodEnum<{
|
|
157
|
+
vite: "vite";
|
|
158
|
+
next: "next";
|
|
159
|
+
}>;
|
|
160
|
+
revision: z.ZodNumber;
|
|
161
|
+
cursor: z.ZodString;
|
|
162
|
+
targetCount: z.ZodNumber;
|
|
163
|
+
page: z.ZodObject<{
|
|
164
|
+
origin: z.ZodString;
|
|
165
|
+
pathname: z.ZodString;
|
|
166
|
+
}, z.core.$strict>;
|
|
167
|
+
publishedAt: z.ZodISODateTime;
|
|
168
|
+
expiresAt: z.ZodISODateTime;
|
|
169
|
+
state: z.ZodEnum<{
|
|
170
|
+
available: "available";
|
|
171
|
+
expired: "expired";
|
|
172
|
+
superseded: "superseded";
|
|
173
|
+
}>;
|
|
174
|
+
pickupCount: z.ZodNumber;
|
|
175
|
+
pickedUpAt: z.ZodOptional<z.ZodISODateTime>;
|
|
176
|
+
}, z.core.$strict>;
|
|
177
|
+
declare const externalHandoffSnapshotSchema: z.ZodObject<{
|
|
178
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
179
|
+
cursor: z.ZodString;
|
|
180
|
+
session: z.ZodObject<{
|
|
181
|
+
id: z.ZodString;
|
|
182
|
+
framework: z.ZodEnum<{
|
|
183
|
+
vite: "vite";
|
|
184
|
+
next: "next";
|
|
185
|
+
}>;
|
|
186
|
+
}, z.core.$strict>;
|
|
187
|
+
revision: z.ZodNumber;
|
|
188
|
+
publishedAt: z.ZodISODateTime;
|
|
189
|
+
expiresAt: z.ZodISODateTime;
|
|
190
|
+
annotation: z.ZodObject<{
|
|
191
|
+
schemaVersion: z.ZodLiteral<3>;
|
|
192
|
+
id: z.ZodString;
|
|
193
|
+
locale: z.ZodEnum<{
|
|
194
|
+
"en-US": "en-US";
|
|
195
|
+
"zh-CN": "zh-CN";
|
|
196
|
+
}>;
|
|
197
|
+
page: z.ZodObject<{
|
|
198
|
+
url: z.ZodString;
|
|
199
|
+
pathname: z.ZodString;
|
|
200
|
+
title: z.ZodString;
|
|
201
|
+
viewportWidth: z.ZodNumber;
|
|
202
|
+
viewportHeight: z.ZodNumber;
|
|
203
|
+
devicePixelRatio: z.ZodNumber;
|
|
204
|
+
}, z.core.$strict>;
|
|
205
|
+
targets: z.ZodArray<z.ZodObject<{
|
|
206
|
+
instruction: z.ZodString;
|
|
207
|
+
page: z.ZodOptional<z.ZodObject<{
|
|
208
|
+
url: z.ZodString;
|
|
209
|
+
pathname: z.ZodString;
|
|
210
|
+
title: z.ZodString;
|
|
211
|
+
viewportWidth: z.ZodNumber;
|
|
212
|
+
viewportHeight: z.ZodNumber;
|
|
213
|
+
devicePixelRatio: z.ZodNumber;
|
|
214
|
+
}, z.core.$strict>>;
|
|
215
|
+
source: z.ZodObject<{
|
|
216
|
+
fileId: z.ZodOptional<z.ZodString>;
|
|
217
|
+
relativePath: z.ZodOptional<z.ZodString>;
|
|
218
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
219
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
220
|
+
origin: z.ZodEnum<{
|
|
221
|
+
"jsx-host": "jsx-host";
|
|
222
|
+
"react-fiber": "react-fiber";
|
|
223
|
+
"dom-ancestor": "dom-ancestor";
|
|
224
|
+
none: "none";
|
|
225
|
+
}>;
|
|
226
|
+
confidence: z.ZodEnum<{
|
|
227
|
+
exact: "exact";
|
|
228
|
+
probable: "probable";
|
|
229
|
+
approximate: "approximate";
|
|
230
|
+
unknown: "unknown";
|
|
231
|
+
}>;
|
|
232
|
+
}, z.core.$strict>;
|
|
233
|
+
react: z.ZodObject<{
|
|
234
|
+
supported: z.ZodBoolean;
|
|
235
|
+
version: z.ZodOptional<z.ZodString>;
|
|
236
|
+
componentName: z.ZodOptional<z.ZodString>;
|
|
237
|
+
componentSourceId: z.ZodOptional<z.ZodString>;
|
|
238
|
+
sourceVersion: z.ZodOptional<z.ZodString>;
|
|
239
|
+
componentStack: z.ZodArray<z.ZodString>;
|
|
240
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
241
|
+
fileId: z.ZodOptional<z.ZodString>;
|
|
242
|
+
relativePath: z.ZodOptional<z.ZodString>;
|
|
243
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
244
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
245
|
+
origin: z.ZodEnum<{
|
|
246
|
+
"jsx-host": "jsx-host";
|
|
247
|
+
"react-fiber": "react-fiber";
|
|
248
|
+
"dom-ancestor": "dom-ancestor";
|
|
249
|
+
none: "none";
|
|
250
|
+
}>;
|
|
251
|
+
confidence: z.ZodEnum<{
|
|
252
|
+
exact: "exact";
|
|
253
|
+
probable: "probable";
|
|
254
|
+
approximate: "approximate";
|
|
255
|
+
unknown: "unknown";
|
|
256
|
+
}>;
|
|
257
|
+
}, z.core.$strict>>;
|
|
258
|
+
}, z.core.$strict>;
|
|
259
|
+
element: z.ZodObject<{
|
|
260
|
+
tagName: z.ZodString;
|
|
261
|
+
selector: z.ZodString;
|
|
262
|
+
sanitizedHtml: z.ZodString;
|
|
263
|
+
textPreview: z.ZodOptional<z.ZodString>;
|
|
264
|
+
role: z.ZodOptional<z.ZodString>;
|
|
265
|
+
rect: z.ZodObject<{
|
|
266
|
+
x: z.ZodNumber;
|
|
267
|
+
y: z.ZodNumber;
|
|
268
|
+
width: z.ZodNumber;
|
|
269
|
+
height: z.ZodNumber;
|
|
270
|
+
}, z.core.$strict>;
|
|
271
|
+
}, z.core.$strict>;
|
|
272
|
+
styles: z.ZodObject<{
|
|
273
|
+
classNames: z.ZodArray<z.ZodString>;
|
|
274
|
+
inlineStyle: z.ZodOptional<z.ZodString>;
|
|
275
|
+
matchedRules: z.ZodArray<z.ZodObject<{
|
|
276
|
+
selector: z.ZodString;
|
|
277
|
+
declarations: z.ZodString;
|
|
278
|
+
source: z.ZodOptional<z.ZodString>;
|
|
279
|
+
media: z.ZodOptional<z.ZodString>;
|
|
280
|
+
}, z.core.$strict>>;
|
|
281
|
+
computed: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
282
|
+
warnings: z.ZodArray<z.ZodString>;
|
|
283
|
+
}, z.core.$strict>;
|
|
284
|
+
code: z.ZodOptional<z.ZodObject<{
|
|
285
|
+
relativePath: z.ZodString;
|
|
286
|
+
language: z.ZodEnum<{
|
|
287
|
+
tsx: "tsx";
|
|
288
|
+
jsx: "jsx";
|
|
289
|
+
}>;
|
|
290
|
+
startLine: z.ZodNumber;
|
|
291
|
+
endLine: z.ZodNumber;
|
|
292
|
+
excerpt: z.ZodString;
|
|
293
|
+
boundary: z.ZodEnum<{
|
|
294
|
+
component: "component";
|
|
295
|
+
"nearby-lines": "nearby-lines";
|
|
296
|
+
}>;
|
|
297
|
+
}, z.core.$strict>>;
|
|
298
|
+
warnings: z.ZodArray<z.ZodString>;
|
|
299
|
+
}, z.core.$strict>>;
|
|
300
|
+
createdAt: z.ZodISODateTime;
|
|
301
|
+
}, z.core.$strict>;
|
|
302
|
+
}, z.core.$strict>;
|
|
303
|
+
declare const activeAdapterSummarySchema: z.ZodObject<{
|
|
304
|
+
kind: z.ZodEnum<{
|
|
305
|
+
"claude-channel": "claude-channel";
|
|
306
|
+
"codex-app-server": "codex-app-server";
|
|
307
|
+
}>;
|
|
308
|
+
state: z.ZodEnum<{
|
|
309
|
+
ready: "ready";
|
|
310
|
+
blocked: "blocked";
|
|
311
|
+
busy: "busy";
|
|
312
|
+
}>;
|
|
313
|
+
canDispatch: z.ZodBoolean;
|
|
314
|
+
connectedAt: z.ZodISODateTime;
|
|
315
|
+
updatedAt: z.ZodISODateTime;
|
|
316
|
+
}, z.core.$strict>;
|
|
317
|
+
declare const dispatchSummarySchema: z.ZodObject<{
|
|
318
|
+
adapterKind: z.ZodEnum<{
|
|
319
|
+
"claude-channel": "claude-channel";
|
|
320
|
+
"codex-app-server": "codex-app-server";
|
|
321
|
+
}>;
|
|
322
|
+
revision: z.ZodNumber;
|
|
323
|
+
phase: z.ZodEnum<{
|
|
324
|
+
queued: "queued";
|
|
325
|
+
completed: "completed";
|
|
326
|
+
failed: "failed";
|
|
327
|
+
dispatching: "dispatching";
|
|
328
|
+
dispatched: "dispatched";
|
|
329
|
+
working: "working";
|
|
330
|
+
"delivery-unknown": "delivery-unknown";
|
|
331
|
+
}>;
|
|
332
|
+
updatedAt: z.ZodISODateTime;
|
|
333
|
+
}, z.core.$strict>;
|
|
334
|
+
declare const externalHandoffCapabilityRequestSchema: z.ZodObject<{}, z.core.$strict>;
|
|
335
|
+
declare const externalHandoffPublishRequestSchema: z.ZodObject<{
|
|
336
|
+
requestId: z.ZodString;
|
|
337
|
+
annotation: z.ZodObject<{
|
|
338
|
+
schemaVersion: z.ZodLiteral<3>;
|
|
339
|
+
id: z.ZodString;
|
|
340
|
+
locale: z.ZodEnum<{
|
|
341
|
+
"en-US": "en-US";
|
|
342
|
+
"zh-CN": "zh-CN";
|
|
343
|
+
}>;
|
|
344
|
+
page: z.ZodObject<{
|
|
345
|
+
url: z.ZodString;
|
|
346
|
+
pathname: z.ZodString;
|
|
347
|
+
title: z.ZodString;
|
|
348
|
+
viewportWidth: z.ZodNumber;
|
|
349
|
+
viewportHeight: z.ZodNumber;
|
|
350
|
+
devicePixelRatio: z.ZodNumber;
|
|
351
|
+
}, z.core.$strict>;
|
|
352
|
+
targets: z.ZodArray<z.ZodObject<{
|
|
353
|
+
instruction: z.ZodString;
|
|
354
|
+
page: z.ZodOptional<z.ZodObject<{
|
|
355
|
+
url: z.ZodString;
|
|
356
|
+
pathname: z.ZodString;
|
|
357
|
+
title: z.ZodString;
|
|
358
|
+
viewportWidth: z.ZodNumber;
|
|
359
|
+
viewportHeight: z.ZodNumber;
|
|
360
|
+
devicePixelRatio: z.ZodNumber;
|
|
361
|
+
}, z.core.$strict>>;
|
|
362
|
+
source: z.ZodObject<{
|
|
363
|
+
fileId: z.ZodOptional<z.ZodString>;
|
|
364
|
+
relativePath: z.ZodOptional<z.ZodString>;
|
|
365
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
366
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
367
|
+
origin: z.ZodEnum<{
|
|
368
|
+
"jsx-host": "jsx-host";
|
|
369
|
+
"react-fiber": "react-fiber";
|
|
370
|
+
"dom-ancestor": "dom-ancestor";
|
|
371
|
+
none: "none";
|
|
372
|
+
}>;
|
|
373
|
+
confidence: z.ZodEnum<{
|
|
374
|
+
exact: "exact";
|
|
375
|
+
probable: "probable";
|
|
376
|
+
approximate: "approximate";
|
|
377
|
+
unknown: "unknown";
|
|
378
|
+
}>;
|
|
379
|
+
}, z.core.$strict>;
|
|
380
|
+
react: z.ZodObject<{
|
|
381
|
+
supported: z.ZodBoolean;
|
|
382
|
+
version: z.ZodOptional<z.ZodString>;
|
|
383
|
+
componentName: z.ZodOptional<z.ZodString>;
|
|
384
|
+
componentSourceId: z.ZodOptional<z.ZodString>;
|
|
385
|
+
sourceVersion: z.ZodOptional<z.ZodString>;
|
|
386
|
+
componentStack: z.ZodArray<z.ZodString>;
|
|
387
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
388
|
+
fileId: z.ZodOptional<z.ZodString>;
|
|
389
|
+
relativePath: z.ZodOptional<z.ZodString>;
|
|
390
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
391
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
392
|
+
origin: z.ZodEnum<{
|
|
393
|
+
"jsx-host": "jsx-host";
|
|
394
|
+
"react-fiber": "react-fiber";
|
|
395
|
+
"dom-ancestor": "dom-ancestor";
|
|
396
|
+
none: "none";
|
|
397
|
+
}>;
|
|
398
|
+
confidence: z.ZodEnum<{
|
|
399
|
+
exact: "exact";
|
|
400
|
+
probable: "probable";
|
|
401
|
+
approximate: "approximate";
|
|
402
|
+
unknown: "unknown";
|
|
403
|
+
}>;
|
|
404
|
+
}, z.core.$strict>>;
|
|
405
|
+
}, z.core.$strict>;
|
|
406
|
+
element: z.ZodObject<{
|
|
407
|
+
tagName: z.ZodString;
|
|
408
|
+
selector: z.ZodString;
|
|
409
|
+
sanitizedHtml: z.ZodString;
|
|
410
|
+
textPreview: z.ZodOptional<z.ZodString>;
|
|
411
|
+
role: z.ZodOptional<z.ZodString>;
|
|
412
|
+
rect: z.ZodObject<{
|
|
413
|
+
x: z.ZodNumber;
|
|
414
|
+
y: z.ZodNumber;
|
|
415
|
+
width: z.ZodNumber;
|
|
416
|
+
height: z.ZodNumber;
|
|
417
|
+
}, z.core.$strict>;
|
|
418
|
+
}, z.core.$strict>;
|
|
419
|
+
styles: z.ZodObject<{
|
|
420
|
+
classNames: z.ZodArray<z.ZodString>;
|
|
421
|
+
inlineStyle: z.ZodOptional<z.ZodString>;
|
|
422
|
+
matchedRules: z.ZodArray<z.ZodObject<{
|
|
423
|
+
selector: z.ZodString;
|
|
424
|
+
declarations: z.ZodString;
|
|
425
|
+
source: z.ZodOptional<z.ZodString>;
|
|
426
|
+
media: z.ZodOptional<z.ZodString>;
|
|
427
|
+
}, z.core.$strict>>;
|
|
428
|
+
computed: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
429
|
+
warnings: z.ZodArray<z.ZodString>;
|
|
430
|
+
}, z.core.$strict>;
|
|
431
|
+
code: z.ZodOptional<z.ZodObject<{
|
|
432
|
+
relativePath: z.ZodString;
|
|
433
|
+
language: z.ZodEnum<{
|
|
434
|
+
tsx: "tsx";
|
|
435
|
+
jsx: "jsx";
|
|
436
|
+
}>;
|
|
437
|
+
startLine: z.ZodNumber;
|
|
438
|
+
endLine: z.ZodNumber;
|
|
439
|
+
excerpt: z.ZodString;
|
|
440
|
+
boundary: z.ZodEnum<{
|
|
441
|
+
component: "component";
|
|
442
|
+
"nearby-lines": "nearby-lines";
|
|
443
|
+
}>;
|
|
444
|
+
}, z.core.$strict>>;
|
|
445
|
+
warnings: z.ZodArray<z.ZodString>;
|
|
446
|
+
}, z.core.$strict>>;
|
|
447
|
+
createdAt: z.ZodISODateTime;
|
|
448
|
+
}, z.core.$strict>;
|
|
449
|
+
}, z.core.$strict>;
|
|
450
|
+
declare const externalHandoffStatusRequestSchema: z.ZodObject<{
|
|
451
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
452
|
+
}, z.core.$strict>;
|
|
453
|
+
declare const externalHandoffResolveDeliveryRequestSchema: z.ZodObject<{
|
|
454
|
+
cursor: z.ZodString;
|
|
455
|
+
confirmation: z.ZodLiteral<"workspace-reviewed">;
|
|
456
|
+
}, z.core.$strict>;
|
|
457
|
+
declare const externalHandoffCapabilitySchema: z.ZodObject<{
|
|
458
|
+
enabled: z.ZodLiteral<true>;
|
|
459
|
+
brokerReady: z.ZodBoolean;
|
|
460
|
+
activeWaitCount: z.ZodNumber;
|
|
461
|
+
snapshotSchemaVersion: z.ZodLiteral<1>;
|
|
462
|
+
brokerProtocolVersion: z.ZodLiteral<2>;
|
|
463
|
+
activeAdapter: z.ZodNullable<z.ZodObject<{
|
|
464
|
+
kind: z.ZodEnum<{
|
|
465
|
+
"claude-channel": "claude-channel";
|
|
466
|
+
"codex-app-server": "codex-app-server";
|
|
467
|
+
}>;
|
|
468
|
+
state: z.ZodEnum<{
|
|
469
|
+
ready: "ready";
|
|
470
|
+
blocked: "blocked";
|
|
471
|
+
busy: "busy";
|
|
472
|
+
}>;
|
|
473
|
+
canDispatch: z.ZodBoolean;
|
|
474
|
+
connectedAt: z.ZodISODateTime;
|
|
475
|
+
updatedAt: z.ZodISODateTime;
|
|
476
|
+
}, z.core.$strict>>;
|
|
477
|
+
dispatch: z.ZodNullable<z.ZodObject<{
|
|
478
|
+
adapterKind: z.ZodEnum<{
|
|
479
|
+
"claude-channel": "claude-channel";
|
|
480
|
+
"codex-app-server": "codex-app-server";
|
|
481
|
+
}>;
|
|
482
|
+
revision: z.ZodNumber;
|
|
483
|
+
phase: z.ZodEnum<{
|
|
484
|
+
queued: "queued";
|
|
485
|
+
completed: "completed";
|
|
486
|
+
failed: "failed";
|
|
487
|
+
dispatching: "dispatching";
|
|
488
|
+
dispatched: "dispatched";
|
|
489
|
+
working: "working";
|
|
490
|
+
"delivery-unknown": "delivery-unknown";
|
|
491
|
+
}>;
|
|
492
|
+
updatedAt: z.ZodISODateTime;
|
|
493
|
+
}, z.core.$strict>>;
|
|
494
|
+
}, z.core.$strict>;
|
|
495
|
+
declare const externalHandoffPublishDeliverySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
496
|
+
mode: z.ZodLiteral<"inbox">;
|
|
497
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
498
|
+
mode: z.ZodLiteral<"active">;
|
|
499
|
+
adapter: z.ZodObject<{
|
|
500
|
+
kind: z.ZodEnum<{
|
|
501
|
+
"claude-channel": "claude-channel";
|
|
502
|
+
"codex-app-server": "codex-app-server";
|
|
503
|
+
}>;
|
|
504
|
+
state: z.ZodEnum<{
|
|
505
|
+
ready: "ready";
|
|
506
|
+
blocked: "blocked";
|
|
507
|
+
busy: "busy";
|
|
508
|
+
}>;
|
|
509
|
+
canDispatch: z.ZodBoolean;
|
|
510
|
+
connectedAt: z.ZodISODateTime;
|
|
511
|
+
updatedAt: z.ZodISODateTime;
|
|
512
|
+
}, z.core.$strict>;
|
|
513
|
+
dispatch: z.ZodObject<{
|
|
514
|
+
adapterKind: z.ZodEnum<{
|
|
515
|
+
"claude-channel": "claude-channel";
|
|
516
|
+
"codex-app-server": "codex-app-server";
|
|
517
|
+
}>;
|
|
518
|
+
revision: z.ZodNumber;
|
|
519
|
+
phase: z.ZodEnum<{
|
|
520
|
+
queued: "queued";
|
|
521
|
+
completed: "completed";
|
|
522
|
+
failed: "failed";
|
|
523
|
+
dispatching: "dispatching";
|
|
524
|
+
dispatched: "dispatched";
|
|
525
|
+
working: "working";
|
|
526
|
+
"delivery-unknown": "delivery-unknown";
|
|
527
|
+
}>;
|
|
528
|
+
updatedAt: z.ZodISODateTime;
|
|
529
|
+
}, z.core.$strict>;
|
|
530
|
+
}, z.core.$strict>], "mode">;
|
|
531
|
+
declare const externalHandoffPublishResultSchema: z.ZodObject<{
|
|
532
|
+
handoff: z.ZodObject<{
|
|
533
|
+
sessionId: z.ZodString;
|
|
534
|
+
framework: z.ZodEnum<{
|
|
535
|
+
vite: "vite";
|
|
536
|
+
next: "next";
|
|
537
|
+
}>;
|
|
538
|
+
revision: z.ZodNumber;
|
|
539
|
+
cursor: z.ZodString;
|
|
540
|
+
targetCount: z.ZodNumber;
|
|
541
|
+
page: z.ZodObject<{
|
|
542
|
+
origin: z.ZodString;
|
|
543
|
+
pathname: z.ZodString;
|
|
544
|
+
}, z.core.$strict>;
|
|
545
|
+
publishedAt: z.ZodISODateTime;
|
|
546
|
+
expiresAt: z.ZodISODateTime;
|
|
547
|
+
state: z.ZodEnum<{
|
|
548
|
+
available: "available";
|
|
549
|
+
expired: "expired";
|
|
550
|
+
superseded: "superseded";
|
|
551
|
+
}>;
|
|
552
|
+
pickupCount: z.ZodNumber;
|
|
553
|
+
pickedUpAt: z.ZodOptional<z.ZodISODateTime>;
|
|
554
|
+
}, z.core.$strict>;
|
|
555
|
+
delivery: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
556
|
+
mode: z.ZodLiteral<"inbox">;
|
|
557
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
558
|
+
mode: z.ZodLiteral<"active">;
|
|
559
|
+
adapter: z.ZodObject<{
|
|
560
|
+
kind: z.ZodEnum<{
|
|
561
|
+
"claude-channel": "claude-channel";
|
|
562
|
+
"codex-app-server": "codex-app-server";
|
|
563
|
+
}>;
|
|
564
|
+
state: z.ZodEnum<{
|
|
565
|
+
ready: "ready";
|
|
566
|
+
blocked: "blocked";
|
|
567
|
+
busy: "busy";
|
|
568
|
+
}>;
|
|
569
|
+
canDispatch: z.ZodBoolean;
|
|
570
|
+
connectedAt: z.ZodISODateTime;
|
|
571
|
+
updatedAt: z.ZodISODateTime;
|
|
572
|
+
}, z.core.$strict>;
|
|
573
|
+
dispatch: z.ZodObject<{
|
|
574
|
+
adapterKind: z.ZodEnum<{
|
|
575
|
+
"claude-channel": "claude-channel";
|
|
576
|
+
"codex-app-server": "codex-app-server";
|
|
577
|
+
}>;
|
|
578
|
+
revision: z.ZodNumber;
|
|
579
|
+
phase: z.ZodEnum<{
|
|
580
|
+
queued: "queued";
|
|
581
|
+
completed: "completed";
|
|
582
|
+
failed: "failed";
|
|
583
|
+
dispatching: "dispatching";
|
|
584
|
+
dispatched: "dispatched";
|
|
585
|
+
working: "working";
|
|
586
|
+
"delivery-unknown": "delivery-unknown";
|
|
587
|
+
}>;
|
|
588
|
+
updatedAt: z.ZodISODateTime;
|
|
589
|
+
}, z.core.$strict>;
|
|
590
|
+
}, z.core.$strict>], "mode">;
|
|
591
|
+
replayed: z.ZodBoolean;
|
|
592
|
+
}, z.core.$strict>;
|
|
593
|
+
declare const externalHandoffStatusResultSchema: z.ZodObject<{
|
|
594
|
+
handoff: z.ZodObject<{
|
|
595
|
+
sessionId: z.ZodString;
|
|
596
|
+
framework: z.ZodEnum<{
|
|
597
|
+
vite: "vite";
|
|
598
|
+
next: "next";
|
|
599
|
+
}>;
|
|
600
|
+
revision: z.ZodNumber;
|
|
601
|
+
cursor: z.ZodString;
|
|
602
|
+
targetCount: z.ZodNumber;
|
|
603
|
+
page: z.ZodObject<{
|
|
604
|
+
origin: z.ZodString;
|
|
605
|
+
pathname: z.ZodString;
|
|
606
|
+
}, z.core.$strict>;
|
|
607
|
+
publishedAt: z.ZodISODateTime;
|
|
608
|
+
expiresAt: z.ZodISODateTime;
|
|
609
|
+
state: z.ZodEnum<{
|
|
610
|
+
available: "available";
|
|
611
|
+
expired: "expired";
|
|
612
|
+
superseded: "superseded";
|
|
613
|
+
}>;
|
|
614
|
+
pickupCount: z.ZodNumber;
|
|
615
|
+
pickedUpAt: z.ZodOptional<z.ZodISODateTime>;
|
|
616
|
+
}, z.core.$strict>;
|
|
617
|
+
activeAdapter: z.ZodNullable<z.ZodObject<{
|
|
618
|
+
kind: z.ZodEnum<{
|
|
619
|
+
"claude-channel": "claude-channel";
|
|
620
|
+
"codex-app-server": "codex-app-server";
|
|
621
|
+
}>;
|
|
622
|
+
state: z.ZodEnum<{
|
|
623
|
+
ready: "ready";
|
|
624
|
+
blocked: "blocked";
|
|
625
|
+
busy: "busy";
|
|
626
|
+
}>;
|
|
627
|
+
canDispatch: z.ZodBoolean;
|
|
628
|
+
connectedAt: z.ZodISODateTime;
|
|
629
|
+
updatedAt: z.ZodISODateTime;
|
|
630
|
+
}, z.core.$strict>>;
|
|
631
|
+
dispatch: z.ZodNullable<z.ZodObject<{
|
|
632
|
+
adapterKind: z.ZodEnum<{
|
|
633
|
+
"claude-channel": "claude-channel";
|
|
634
|
+
"codex-app-server": "codex-app-server";
|
|
635
|
+
}>;
|
|
636
|
+
revision: z.ZodNumber;
|
|
637
|
+
phase: z.ZodEnum<{
|
|
638
|
+
queued: "queued";
|
|
639
|
+
completed: "completed";
|
|
640
|
+
failed: "failed";
|
|
641
|
+
dispatching: "dispatching";
|
|
642
|
+
dispatched: "dispatched";
|
|
643
|
+
working: "working";
|
|
644
|
+
"delivery-unknown": "delivery-unknown";
|
|
645
|
+
}>;
|
|
646
|
+
updatedAt: z.ZodISODateTime;
|
|
647
|
+
}, z.core.$strict>>;
|
|
648
|
+
}, z.core.$strict>;
|
|
649
|
+
interface ExternalHandoffSummary {
|
|
650
|
+
readonly sessionId: string;
|
|
651
|
+
readonly framework: ExternalHandoffFramework;
|
|
652
|
+
readonly revision: number;
|
|
653
|
+
readonly cursor: string;
|
|
654
|
+
readonly targetCount: number;
|
|
655
|
+
readonly page: Readonly<{
|
|
656
|
+
origin: string;
|
|
657
|
+
pathname: string;
|
|
658
|
+
}>;
|
|
659
|
+
readonly publishedAt: string;
|
|
660
|
+
readonly expiresAt: string;
|
|
661
|
+
readonly state: ExternalHandoffState;
|
|
662
|
+
readonly pickupCount: number;
|
|
663
|
+
readonly pickedUpAt?: string | undefined;
|
|
664
|
+
}
|
|
665
|
+
interface ExternalHandoffSnapshot {
|
|
666
|
+
readonly schemaVersion: typeof EXTERNAL_HANDOFF_SNAPSHOT_SCHEMA_VERSION;
|
|
667
|
+
readonly cursor: string;
|
|
668
|
+
readonly session: Readonly<{
|
|
669
|
+
id: string;
|
|
670
|
+
framework: ExternalHandoffFramework;
|
|
671
|
+
}>;
|
|
672
|
+
readonly revision: number;
|
|
673
|
+
readonly publishedAt: string;
|
|
674
|
+
readonly expiresAt: string;
|
|
675
|
+
readonly annotation: SpotAnnotation;
|
|
676
|
+
}
|
|
677
|
+
interface ActiveAdapterSummary {
|
|
678
|
+
readonly kind: ExternalHandoffActiveAdapterKind;
|
|
679
|
+
readonly state: ExternalHandoffActiveAdapterState;
|
|
680
|
+
readonly canDispatch: boolean;
|
|
681
|
+
readonly connectedAt: string;
|
|
682
|
+
readonly updatedAt: string;
|
|
683
|
+
}
|
|
684
|
+
interface DispatchSummary {
|
|
685
|
+
readonly adapterKind: ExternalHandoffActiveAdapterKind;
|
|
686
|
+
readonly revision: number;
|
|
687
|
+
readonly phase: ExternalHandoffDispatchPhase;
|
|
688
|
+
readonly updatedAt: string;
|
|
689
|
+
}
|
|
690
|
+
type ExternalHandoffPublishDelivery = Readonly<{
|
|
691
|
+
mode: "inbox";
|
|
692
|
+
}> | Readonly<{
|
|
693
|
+
mode: "active";
|
|
694
|
+
adapter: ActiveAdapterSummary;
|
|
695
|
+
dispatch: DispatchSummary;
|
|
696
|
+
}>;
|
|
697
|
+
interface ExternalHandoffPublishResult {
|
|
698
|
+
readonly handoff: ExternalHandoffSummary;
|
|
699
|
+
readonly delivery: ExternalHandoffPublishDelivery;
|
|
700
|
+
readonly replayed: boolean;
|
|
701
|
+
}
|
|
702
|
+
interface ExternalHandoffStatusResult {
|
|
703
|
+
readonly handoff: ExternalHandoffSummary;
|
|
704
|
+
readonly activeAdapter: ActiveAdapterSummary | null;
|
|
705
|
+
readonly dispatch: DispatchSummary | null;
|
|
706
|
+
}
|
|
707
|
+
interface ExternalHandoffCapability {
|
|
708
|
+
readonly enabled: true;
|
|
709
|
+
readonly brokerReady: boolean;
|
|
710
|
+
readonly activeWaitCount: number;
|
|
711
|
+
readonly snapshotSchemaVersion: typeof EXTERNAL_HANDOFF_SNAPSHOT_SCHEMA_VERSION;
|
|
712
|
+
readonly brokerProtocolVersion: typeof EXTERNAL_HANDOFF_BROKER_PROTOCOL_VERSION;
|
|
713
|
+
readonly activeAdapter: ActiveAdapterSummary | null;
|
|
714
|
+
readonly dispatch: DispatchSummary | null;
|
|
715
|
+
}
|
|
716
|
+
type ExternalHandoffPublishRequest = z.infer<typeof externalHandoffPublishRequestSchema>;
|
|
717
|
+
type ExternalHandoffStatusRequest = z.infer<typeof externalHandoffStatusRequestSchema>;
|
|
718
|
+
type ExternalHandoffResolveDeliveryRequest = z.infer<typeof externalHandoffResolveDeliveryRequestSchema>;
|
|
719
|
+
|
|
720
|
+
export { externalHandoffResolveDeliveryRequestSchema as $, type ActiveAdapterSummary as A, type ElementContext as B, type ContextBudget as C, type DispatchSummary as D, EXTERNAL_HANDOFF_LIMITS as E, MAX_ANNOTATION_TARGETS as F, MAX_TARGET_INSTRUCTION_CHARACTERS as G, type MatchedStyleRule as H, SPOTPATCH_LOCALES as I, type SourceConfidence as J, type SourceOrigin as K, type SourceRef as L, MAX_ANNOTATION_INSTRUCTION_CHARACTERS as M, type SpotPatchLocalePreference as N, type SpotTargetContext as O, type PageContext as P, type StyleContext as Q, type ReactContext as R, type SpotAnnotation as S, activeAdapterSummarySchema as T, dispatchSummarySchema as U, externalHandoffCapabilityRequestSchema as V, externalHandoffCapabilitySchema as W, externalHandoffPublishDeliverySchema as X, externalHandoffPublishRequestSchema as Y, externalHandoffPublishResultSchema as Z, externalHandoffReportableDispatchPhaseSchema as _, type ExternalHandoffSnapshot as a, externalHandoffSnapshotSchema as a0, externalHandoffStatusRequestSchema as a1, externalHandoffStatusResultSchema as a2, externalHandoffSummarySchema as a3, EXTERNAL_HANDOFF_ACTIVE_ADAPTER_KINDS as b, EXTERNAL_HANDOFF_ACTIVE_ADAPTER_STATES as c, EXTERNAL_HANDOFF_BROKER_PROTOCOL_VERSION as d, EXTERNAL_HANDOFF_DISPATCH_PHASES as e, EXTERNAL_HANDOFF_FRAMEWORKS as f, EXTERNAL_HANDOFF_REPORTABLE_DISPATCH_PHASES as g, EXTERNAL_HANDOFF_SNAPSHOT_SCHEMA_VERSION as h, EXTERNAL_HANDOFF_STATES as i, type ExternalHandoffActiveAdapterKind as j, type ExternalHandoffActiveAdapterState as k, type ExternalHandoffCapability as l, type ExternalHandoffDispatchPhase as m, type ExternalHandoffFramework as n, type ExternalHandoffPublishDelivery as o, type ExternalHandoffPublishRequest as p, type ExternalHandoffPublishResult as q, type ExternalHandoffReportableDispatchPhase as r, type ExternalHandoffResolveDeliveryRequest as s, type ExternalHandoffState as t, type ExternalHandoffStatusRequest as u, type ExternalHandoffStatusResult as v, type ExternalHandoffSummary as w, type SpotPatchLocale as x, SPOTPATCH_LOCALE_PREFERENCES as y, type CodeContext as z };
|