@rynfar/meridian 1.73.0 → 1.74.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/README.md +119 -107
- package/assets/banner.svg +18 -43
- package/assets/how-it-works.svg +40 -86
- package/assets/providers/README.md +10 -0
- package/assets/providers/antigravity.png +0 -0
- package/assets/providers/claude.png +0 -0
- package/dist/antigravity-clients/opencode.js +173 -0
- package/dist/antigravity-clients/pi.js +21 -0
- package/dist/antigravitySetup-35pd5xqn.js +191 -0
- package/dist/{cli-p5zbk952.js → cli-fveyj34s.js} +18644 -7047
- package/dist/{cli-p9ca4p13.js → cli-wbsmhxcx.js} +12 -3
- package/dist/cli.js +68 -30
- package/dist/{pluginPage-3kxsrdpj.js → pluginPage-pp72d2j8.js} +1 -1
- package/dist/{profilePage-etxqg3vn.js → profilePage-vs319rvf.js} +1 -1
- package/dist/proxy/auth.d.ts +2 -0
- package/dist/proxy/auth.d.ts.map +1 -1
- package/dist/proxy/backends/antigravity.d.ts +8 -0
- package/dist/proxy/backends/antigravity.d.ts.map +1 -0
- package/dist/proxy/backends/antigravityAttachments.d.ts +16 -0
- package/dist/proxy/backends/antigravityAttachments.d.ts.map +1 -0
- package/dist/proxy/backends/antigravityGrammar.d.ts +12 -0
- package/dist/proxy/backends/antigravityGrammar.d.ts.map +1 -0
- package/dist/proxy/backends/antigravityJobs.d.ts +19 -0
- package/dist/proxy/backends/antigravityJobs.d.ts.map +1 -0
- package/dist/proxy/backends/antigravityMedia.d.ts +9 -0
- package/dist/proxy/backends/antigravityMedia.d.ts.map +1 -0
- package/dist/proxy/backends/antigravityNative.d.ts +8 -0
- package/dist/proxy/backends/antigravityNative.d.ts.map +1 -0
- package/dist/proxy/backends/antigravityOpenai.d.ts +9 -0
- package/dist/proxy/backends/antigravityOpenai.d.ts.map +1 -0
- package/dist/proxy/backends/antigravityOpenaiMedia.d.ts +9 -0
- package/dist/proxy/backends/antigravityOpenaiMedia.d.ts.map +1 -0
- package/dist/proxy/backends/antigravityPlugins.d.ts +41 -0
- package/dist/proxy/backends/antigravityPlugins.d.ts.map +1 -0
- package/dist/proxy/backends/antigravityProbe.d.ts +16 -0
- package/dist/proxy/backends/antigravityProbe.d.ts.map +1 -0
- package/dist/proxy/backends/antigravityProcess.d.ts +4 -0
- package/dist/proxy/backends/antigravityProcess.d.ts.map +1 -0
- package/dist/proxy/backends/antigravityProtocol.d.ts +582 -0
- package/dist/proxy/backends/antigravityProtocol.d.ts.map +1 -0
- package/dist/proxy/backends/antigravityReplay.d.ts +41 -0
- package/dist/proxy/backends/antigravityReplay.d.ts.map +1 -0
- package/dist/proxy/backends/antigravityResponses.d.ts +35 -0
- package/dist/proxy/backends/antigravityResponses.d.ts.map +1 -0
- package/dist/proxy/backends/antigravityRuntime.d.ts +189 -0
- package/dist/proxy/backends/antigravityRuntime.d.ts.map +1 -0
- package/dist/proxy/backends/antigravitySchema.d.ts +10 -0
- package/dist/proxy/backends/antigravitySchema.d.ts.map +1 -0
- package/dist/proxy/backends/antigravitySessions.d.ts +28 -0
- package/dist/proxy/backends/antigravitySessions.d.ts.map +1 -0
- package/dist/proxy/backends/antigravityState.d.ts +22 -0
- package/dist/proxy/backends/antigravityState.d.ts.map +1 -0
- package/dist/proxy/backends/antigravityStops.d.ts +10 -0
- package/dist/proxy/backends/antigravityStops.d.ts.map +1 -0
- package/dist/proxy/backends/antigravityTokens.d.ts +14 -0
- package/dist/proxy/backends/antigravityTokens.d.ts.map +1 -0
- package/dist/proxy/backends/antigravityUrl.d.ts +7 -0
- package/dist/proxy/backends/antigravityUrl.d.ts.map +1 -0
- package/dist/proxy/backends/providerStatus.d.ts +15 -0
- package/dist/proxy/backends/providerStatus.d.ts.map +1 -0
- package/dist/proxy/openai.d.ts +2 -0
- package/dist/proxy/openai.d.ts.map +1 -1
- package/dist/proxy/server.d.ts.map +1 -1
- package/dist/proxy/types.d.ts +32 -0
- package/dist/proxy/types.d.ts.map +1 -1
- package/dist/server.js +2 -2
- package/dist/telemetry/profileBar.d.ts +3 -3
- package/dist/telemetry/profileBar.d.ts.map +1 -1
- package/dist/telemetry/providerPage.d.ts +2 -0
- package/dist/telemetry/providerPage.d.ts.map +1 -0
- package/dist/telemetry/providerSetup.d.ts +5 -0
- package/dist/telemetry/providerSetup.d.ts.map +1 -0
- package/dist/telemetry/providerView.d.ts +45 -0
- package/dist/telemetry/providerView.d.ts.map +1 -0
- package/dist/telemetry/settingsPage.d.ts +1 -1
- package/dist/telemetry/settingsPage.d.ts.map +1 -1
- package/package.json +11 -4
|
@@ -0,0 +1,582 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare class AntigravityError extends Error {
|
|
3
|
+
readonly status: number;
|
|
4
|
+
readonly type: string;
|
|
5
|
+
readonly retryAfter: number | undefined;
|
|
6
|
+
constructor(message: string, status?: number, type?: string, retryAfter?: number | undefined);
|
|
7
|
+
}
|
|
8
|
+
/** Preserve actionable account failures without retrying a potentially executed tool. */
|
|
9
|
+
export declare function classifyAgFailure(message: string): AntigravityError;
|
|
10
|
+
declare const callBlock: z.ZodObject<{
|
|
11
|
+
type: z.ZodLiteral<"tool_use">;
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
declare const resultBlock: z.ZodObject<{
|
|
17
|
+
type: z.ZodLiteral<"tool_result">;
|
|
18
|
+
tool_use_id: z.ZodString;
|
|
19
|
+
content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
20
|
+
type: z.ZodLiteral<"text">;
|
|
21
|
+
text: z.ZodString;
|
|
22
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
23
|
+
type: z.ZodLiteral<"image">;
|
|
24
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
25
|
+
type: z.ZodLiteral<"url">;
|
|
26
|
+
url: z.ZodURL;
|
|
27
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
28
|
+
type: z.ZodLiteral<"base64">;
|
|
29
|
+
media_type: z.ZodEnum<{
|
|
30
|
+
"image/png": "image/png";
|
|
31
|
+
"image/jpeg": "image/jpeg";
|
|
32
|
+
"image/gif": "image/gif";
|
|
33
|
+
"image/webp": "image/webp";
|
|
34
|
+
}>;
|
|
35
|
+
data: z.ZodString;
|
|
36
|
+
}, z.core.$strict>]>;
|
|
37
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
38
|
+
type: z.ZodLiteral<"document">;
|
|
39
|
+
title: z.ZodOptional<z.ZodString>;
|
|
40
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
41
|
+
type: z.ZodLiteral<"text">;
|
|
42
|
+
media_type: z.ZodLiteral<"text/plain">;
|
|
43
|
+
data: z.ZodString;
|
|
44
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
45
|
+
type: z.ZodLiteral<"base64">;
|
|
46
|
+
media_type: z.ZodEnum<{
|
|
47
|
+
"text/plain": "text/plain";
|
|
48
|
+
"application/pdf": "application/pdf";
|
|
49
|
+
}>;
|
|
50
|
+
data: z.ZodString;
|
|
51
|
+
}, z.core.$strict>], "type">;
|
|
52
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
53
|
+
type: z.ZodLiteral<"audio">;
|
|
54
|
+
source: z.ZodObject<{
|
|
55
|
+
type: z.ZodLiteral<"base64">;
|
|
56
|
+
media_type: z.ZodEnum<{
|
|
57
|
+
"audio/wav": "audio/wav";
|
|
58
|
+
"audio/mpeg": "audio/mpeg";
|
|
59
|
+
"audio/mp4": "audio/mp4";
|
|
60
|
+
"audio/ogg": "audio/ogg";
|
|
61
|
+
"audio/flac": "audio/flac";
|
|
62
|
+
}>;
|
|
63
|
+
data: z.ZodString;
|
|
64
|
+
}, z.core.$strict>;
|
|
65
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
66
|
+
type: z.ZodLiteral<"video">;
|
|
67
|
+
source: z.ZodObject<{
|
|
68
|
+
type: z.ZodLiteral<"base64">;
|
|
69
|
+
media_type: z.ZodEnum<{
|
|
70
|
+
"video/mp4": "video/mp4";
|
|
71
|
+
"video/webm": "video/webm";
|
|
72
|
+
"video/quicktime": "video/quicktime";
|
|
73
|
+
}>;
|
|
74
|
+
data: z.ZodString;
|
|
75
|
+
}, z.core.$strict>;
|
|
76
|
+
}, z.core.$strict>], "type">>]>>;
|
|
77
|
+
is_error: z.ZodOptional<z.ZodBoolean>;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
declare const block: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
80
|
+
type: z.ZodLiteral<"text">;
|
|
81
|
+
text: z.ZodString;
|
|
82
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
83
|
+
type: z.ZodLiteral<"image">;
|
|
84
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
85
|
+
type: z.ZodLiteral<"url">;
|
|
86
|
+
url: z.ZodURL;
|
|
87
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
88
|
+
type: z.ZodLiteral<"base64">;
|
|
89
|
+
media_type: z.ZodEnum<{
|
|
90
|
+
"image/png": "image/png";
|
|
91
|
+
"image/jpeg": "image/jpeg";
|
|
92
|
+
"image/gif": "image/gif";
|
|
93
|
+
"image/webp": "image/webp";
|
|
94
|
+
}>;
|
|
95
|
+
data: z.ZodString;
|
|
96
|
+
}, z.core.$strict>]>;
|
|
97
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
98
|
+
type: z.ZodLiteral<"document">;
|
|
99
|
+
title: z.ZodOptional<z.ZodString>;
|
|
100
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
101
|
+
type: z.ZodLiteral<"text">;
|
|
102
|
+
media_type: z.ZodLiteral<"text/plain">;
|
|
103
|
+
data: z.ZodString;
|
|
104
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
105
|
+
type: z.ZodLiteral<"base64">;
|
|
106
|
+
media_type: z.ZodEnum<{
|
|
107
|
+
"text/plain": "text/plain";
|
|
108
|
+
"application/pdf": "application/pdf";
|
|
109
|
+
}>;
|
|
110
|
+
data: z.ZodString;
|
|
111
|
+
}, z.core.$strict>], "type">;
|
|
112
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
113
|
+
type: z.ZodLiteral<"audio">;
|
|
114
|
+
source: z.ZodObject<{
|
|
115
|
+
type: z.ZodLiteral<"base64">;
|
|
116
|
+
media_type: z.ZodEnum<{
|
|
117
|
+
"audio/wav": "audio/wav";
|
|
118
|
+
"audio/mpeg": "audio/mpeg";
|
|
119
|
+
"audio/mp4": "audio/mp4";
|
|
120
|
+
"audio/ogg": "audio/ogg";
|
|
121
|
+
"audio/flac": "audio/flac";
|
|
122
|
+
}>;
|
|
123
|
+
data: z.ZodString;
|
|
124
|
+
}, z.core.$strict>;
|
|
125
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
126
|
+
type: z.ZodLiteral<"video">;
|
|
127
|
+
source: z.ZodObject<{
|
|
128
|
+
type: z.ZodLiteral<"base64">;
|
|
129
|
+
media_type: z.ZodEnum<{
|
|
130
|
+
"video/mp4": "video/mp4";
|
|
131
|
+
"video/webm": "video/webm";
|
|
132
|
+
"video/quicktime": "video/quicktime";
|
|
133
|
+
}>;
|
|
134
|
+
data: z.ZodString;
|
|
135
|
+
}, z.core.$strict>;
|
|
136
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
137
|
+
type: z.ZodLiteral<"tool_use">;
|
|
138
|
+
id: z.ZodString;
|
|
139
|
+
name: z.ZodString;
|
|
140
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
141
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
142
|
+
type: z.ZodLiteral<"tool_result">;
|
|
143
|
+
tool_use_id: z.ZodString;
|
|
144
|
+
content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
145
|
+
type: z.ZodLiteral<"text">;
|
|
146
|
+
text: z.ZodString;
|
|
147
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
148
|
+
type: z.ZodLiteral<"image">;
|
|
149
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
150
|
+
type: z.ZodLiteral<"url">;
|
|
151
|
+
url: z.ZodURL;
|
|
152
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
153
|
+
type: z.ZodLiteral<"base64">;
|
|
154
|
+
media_type: z.ZodEnum<{
|
|
155
|
+
"image/png": "image/png";
|
|
156
|
+
"image/jpeg": "image/jpeg";
|
|
157
|
+
"image/gif": "image/gif";
|
|
158
|
+
"image/webp": "image/webp";
|
|
159
|
+
}>;
|
|
160
|
+
data: z.ZodString;
|
|
161
|
+
}, z.core.$strict>]>;
|
|
162
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
163
|
+
type: z.ZodLiteral<"document">;
|
|
164
|
+
title: z.ZodOptional<z.ZodString>;
|
|
165
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
166
|
+
type: z.ZodLiteral<"text">;
|
|
167
|
+
media_type: z.ZodLiteral<"text/plain">;
|
|
168
|
+
data: z.ZodString;
|
|
169
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
170
|
+
type: z.ZodLiteral<"base64">;
|
|
171
|
+
media_type: z.ZodEnum<{
|
|
172
|
+
"text/plain": "text/plain";
|
|
173
|
+
"application/pdf": "application/pdf";
|
|
174
|
+
}>;
|
|
175
|
+
data: z.ZodString;
|
|
176
|
+
}, z.core.$strict>], "type">;
|
|
177
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
178
|
+
type: z.ZodLiteral<"audio">;
|
|
179
|
+
source: z.ZodObject<{
|
|
180
|
+
type: z.ZodLiteral<"base64">;
|
|
181
|
+
media_type: z.ZodEnum<{
|
|
182
|
+
"audio/wav": "audio/wav";
|
|
183
|
+
"audio/mpeg": "audio/mpeg";
|
|
184
|
+
"audio/mp4": "audio/mp4";
|
|
185
|
+
"audio/ogg": "audio/ogg";
|
|
186
|
+
"audio/flac": "audio/flac";
|
|
187
|
+
}>;
|
|
188
|
+
data: z.ZodString;
|
|
189
|
+
}, z.core.$strict>;
|
|
190
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
191
|
+
type: z.ZodLiteral<"video">;
|
|
192
|
+
source: z.ZodObject<{
|
|
193
|
+
type: z.ZodLiteral<"base64">;
|
|
194
|
+
media_type: z.ZodEnum<{
|
|
195
|
+
"video/mp4": "video/mp4";
|
|
196
|
+
"video/webm": "video/webm";
|
|
197
|
+
"video/quicktime": "video/quicktime";
|
|
198
|
+
}>;
|
|
199
|
+
data: z.ZodString;
|
|
200
|
+
}, z.core.$strict>;
|
|
201
|
+
}, z.core.$strict>], "type">>]>>;
|
|
202
|
+
is_error: z.ZodOptional<z.ZodBoolean>;
|
|
203
|
+
}, z.core.$strip>], "type">;
|
|
204
|
+
declare const message: z.ZodObject<{
|
|
205
|
+
role: z.ZodEnum<{
|
|
206
|
+
user: "user";
|
|
207
|
+
assistant: "assistant";
|
|
208
|
+
}>;
|
|
209
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
210
|
+
type: z.ZodLiteral<"text">;
|
|
211
|
+
text: z.ZodString;
|
|
212
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
213
|
+
type: z.ZodLiteral<"image">;
|
|
214
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
215
|
+
type: z.ZodLiteral<"url">;
|
|
216
|
+
url: z.ZodURL;
|
|
217
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
218
|
+
type: z.ZodLiteral<"base64">;
|
|
219
|
+
media_type: z.ZodEnum<{
|
|
220
|
+
"image/png": "image/png";
|
|
221
|
+
"image/jpeg": "image/jpeg";
|
|
222
|
+
"image/gif": "image/gif";
|
|
223
|
+
"image/webp": "image/webp";
|
|
224
|
+
}>;
|
|
225
|
+
data: z.ZodString;
|
|
226
|
+
}, z.core.$strict>]>;
|
|
227
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
228
|
+
type: z.ZodLiteral<"document">;
|
|
229
|
+
title: z.ZodOptional<z.ZodString>;
|
|
230
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
231
|
+
type: z.ZodLiteral<"text">;
|
|
232
|
+
media_type: z.ZodLiteral<"text/plain">;
|
|
233
|
+
data: z.ZodString;
|
|
234
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
235
|
+
type: z.ZodLiteral<"base64">;
|
|
236
|
+
media_type: z.ZodEnum<{
|
|
237
|
+
"text/plain": "text/plain";
|
|
238
|
+
"application/pdf": "application/pdf";
|
|
239
|
+
}>;
|
|
240
|
+
data: z.ZodString;
|
|
241
|
+
}, z.core.$strict>], "type">;
|
|
242
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
243
|
+
type: z.ZodLiteral<"audio">;
|
|
244
|
+
source: z.ZodObject<{
|
|
245
|
+
type: z.ZodLiteral<"base64">;
|
|
246
|
+
media_type: z.ZodEnum<{
|
|
247
|
+
"audio/wav": "audio/wav";
|
|
248
|
+
"audio/mpeg": "audio/mpeg";
|
|
249
|
+
"audio/mp4": "audio/mp4";
|
|
250
|
+
"audio/ogg": "audio/ogg";
|
|
251
|
+
"audio/flac": "audio/flac";
|
|
252
|
+
}>;
|
|
253
|
+
data: z.ZodString;
|
|
254
|
+
}, z.core.$strict>;
|
|
255
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
256
|
+
type: z.ZodLiteral<"video">;
|
|
257
|
+
source: z.ZodObject<{
|
|
258
|
+
type: z.ZodLiteral<"base64">;
|
|
259
|
+
media_type: z.ZodEnum<{
|
|
260
|
+
"video/mp4": "video/mp4";
|
|
261
|
+
"video/webm": "video/webm";
|
|
262
|
+
"video/quicktime": "video/quicktime";
|
|
263
|
+
}>;
|
|
264
|
+
data: z.ZodString;
|
|
265
|
+
}, z.core.$strict>;
|
|
266
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
267
|
+
type: z.ZodLiteral<"tool_use">;
|
|
268
|
+
id: z.ZodString;
|
|
269
|
+
name: z.ZodString;
|
|
270
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
271
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
272
|
+
type: z.ZodLiteral<"tool_result">;
|
|
273
|
+
tool_use_id: z.ZodString;
|
|
274
|
+
content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
275
|
+
type: z.ZodLiteral<"text">;
|
|
276
|
+
text: z.ZodString;
|
|
277
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
278
|
+
type: z.ZodLiteral<"image">;
|
|
279
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
280
|
+
type: z.ZodLiteral<"url">;
|
|
281
|
+
url: z.ZodURL;
|
|
282
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
283
|
+
type: z.ZodLiteral<"base64">;
|
|
284
|
+
media_type: z.ZodEnum<{
|
|
285
|
+
"image/png": "image/png";
|
|
286
|
+
"image/jpeg": "image/jpeg";
|
|
287
|
+
"image/gif": "image/gif";
|
|
288
|
+
"image/webp": "image/webp";
|
|
289
|
+
}>;
|
|
290
|
+
data: z.ZodString;
|
|
291
|
+
}, z.core.$strict>]>;
|
|
292
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
293
|
+
type: z.ZodLiteral<"document">;
|
|
294
|
+
title: z.ZodOptional<z.ZodString>;
|
|
295
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
296
|
+
type: z.ZodLiteral<"text">;
|
|
297
|
+
media_type: z.ZodLiteral<"text/plain">;
|
|
298
|
+
data: z.ZodString;
|
|
299
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
300
|
+
type: z.ZodLiteral<"base64">;
|
|
301
|
+
media_type: z.ZodEnum<{
|
|
302
|
+
"text/plain": "text/plain";
|
|
303
|
+
"application/pdf": "application/pdf";
|
|
304
|
+
}>;
|
|
305
|
+
data: z.ZodString;
|
|
306
|
+
}, z.core.$strict>], "type">;
|
|
307
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
308
|
+
type: z.ZodLiteral<"audio">;
|
|
309
|
+
source: z.ZodObject<{
|
|
310
|
+
type: z.ZodLiteral<"base64">;
|
|
311
|
+
media_type: z.ZodEnum<{
|
|
312
|
+
"audio/wav": "audio/wav";
|
|
313
|
+
"audio/mpeg": "audio/mpeg";
|
|
314
|
+
"audio/mp4": "audio/mp4";
|
|
315
|
+
"audio/ogg": "audio/ogg";
|
|
316
|
+
"audio/flac": "audio/flac";
|
|
317
|
+
}>;
|
|
318
|
+
data: z.ZodString;
|
|
319
|
+
}, z.core.$strict>;
|
|
320
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
321
|
+
type: z.ZodLiteral<"video">;
|
|
322
|
+
source: z.ZodObject<{
|
|
323
|
+
type: z.ZodLiteral<"base64">;
|
|
324
|
+
media_type: z.ZodEnum<{
|
|
325
|
+
"video/mp4": "video/mp4";
|
|
326
|
+
"video/webm": "video/webm";
|
|
327
|
+
"video/quicktime": "video/quicktime";
|
|
328
|
+
}>;
|
|
329
|
+
data: z.ZodString;
|
|
330
|
+
}, z.core.$strict>;
|
|
331
|
+
}, z.core.$strict>], "type">>]>>;
|
|
332
|
+
is_error: z.ZodOptional<z.ZodBoolean>;
|
|
333
|
+
}, z.core.$strip>], "type">>]>;
|
|
334
|
+
}, z.core.$strip>;
|
|
335
|
+
declare const schema: z.ZodObject<{
|
|
336
|
+
meridian_tool_grammars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
337
|
+
syntax: z.ZodEnum<{
|
|
338
|
+
lark: "lark";
|
|
339
|
+
regex: "regex";
|
|
340
|
+
}>;
|
|
341
|
+
definition: z.ZodString;
|
|
342
|
+
}, z.core.$strict>>>;
|
|
343
|
+
meridian_session_key: z.ZodOptional<z.ZodString>;
|
|
344
|
+
model: z.ZodString;
|
|
345
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
346
|
+
role: z.ZodEnum<{
|
|
347
|
+
user: "user";
|
|
348
|
+
assistant: "assistant";
|
|
349
|
+
}>;
|
|
350
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
351
|
+
type: z.ZodLiteral<"text">;
|
|
352
|
+
text: z.ZodString;
|
|
353
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
354
|
+
type: z.ZodLiteral<"image">;
|
|
355
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
356
|
+
type: z.ZodLiteral<"url">;
|
|
357
|
+
url: z.ZodURL;
|
|
358
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
359
|
+
type: z.ZodLiteral<"base64">;
|
|
360
|
+
media_type: z.ZodEnum<{
|
|
361
|
+
"image/png": "image/png";
|
|
362
|
+
"image/jpeg": "image/jpeg";
|
|
363
|
+
"image/gif": "image/gif";
|
|
364
|
+
"image/webp": "image/webp";
|
|
365
|
+
}>;
|
|
366
|
+
data: z.ZodString;
|
|
367
|
+
}, z.core.$strict>]>;
|
|
368
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
369
|
+
type: z.ZodLiteral<"document">;
|
|
370
|
+
title: z.ZodOptional<z.ZodString>;
|
|
371
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
372
|
+
type: z.ZodLiteral<"text">;
|
|
373
|
+
media_type: z.ZodLiteral<"text/plain">;
|
|
374
|
+
data: z.ZodString;
|
|
375
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
376
|
+
type: z.ZodLiteral<"base64">;
|
|
377
|
+
media_type: z.ZodEnum<{
|
|
378
|
+
"text/plain": "text/plain";
|
|
379
|
+
"application/pdf": "application/pdf";
|
|
380
|
+
}>;
|
|
381
|
+
data: z.ZodString;
|
|
382
|
+
}, z.core.$strict>], "type">;
|
|
383
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
384
|
+
type: z.ZodLiteral<"audio">;
|
|
385
|
+
source: z.ZodObject<{
|
|
386
|
+
type: z.ZodLiteral<"base64">;
|
|
387
|
+
media_type: z.ZodEnum<{
|
|
388
|
+
"audio/wav": "audio/wav";
|
|
389
|
+
"audio/mpeg": "audio/mpeg";
|
|
390
|
+
"audio/mp4": "audio/mp4";
|
|
391
|
+
"audio/ogg": "audio/ogg";
|
|
392
|
+
"audio/flac": "audio/flac";
|
|
393
|
+
}>;
|
|
394
|
+
data: z.ZodString;
|
|
395
|
+
}, z.core.$strict>;
|
|
396
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
397
|
+
type: z.ZodLiteral<"video">;
|
|
398
|
+
source: z.ZodObject<{
|
|
399
|
+
type: z.ZodLiteral<"base64">;
|
|
400
|
+
media_type: z.ZodEnum<{
|
|
401
|
+
"video/mp4": "video/mp4";
|
|
402
|
+
"video/webm": "video/webm";
|
|
403
|
+
"video/quicktime": "video/quicktime";
|
|
404
|
+
}>;
|
|
405
|
+
data: z.ZodString;
|
|
406
|
+
}, z.core.$strict>;
|
|
407
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
408
|
+
type: z.ZodLiteral<"tool_use">;
|
|
409
|
+
id: z.ZodString;
|
|
410
|
+
name: z.ZodString;
|
|
411
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
412
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
413
|
+
type: z.ZodLiteral<"tool_result">;
|
|
414
|
+
tool_use_id: z.ZodString;
|
|
415
|
+
content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
416
|
+
type: z.ZodLiteral<"text">;
|
|
417
|
+
text: z.ZodString;
|
|
418
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
419
|
+
type: z.ZodLiteral<"image">;
|
|
420
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
421
|
+
type: z.ZodLiteral<"url">;
|
|
422
|
+
url: z.ZodURL;
|
|
423
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
424
|
+
type: z.ZodLiteral<"base64">;
|
|
425
|
+
media_type: z.ZodEnum<{
|
|
426
|
+
"image/png": "image/png";
|
|
427
|
+
"image/jpeg": "image/jpeg";
|
|
428
|
+
"image/gif": "image/gif";
|
|
429
|
+
"image/webp": "image/webp";
|
|
430
|
+
}>;
|
|
431
|
+
data: z.ZodString;
|
|
432
|
+
}, z.core.$strict>]>;
|
|
433
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
434
|
+
type: z.ZodLiteral<"document">;
|
|
435
|
+
title: z.ZodOptional<z.ZodString>;
|
|
436
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
437
|
+
type: z.ZodLiteral<"text">;
|
|
438
|
+
media_type: z.ZodLiteral<"text/plain">;
|
|
439
|
+
data: z.ZodString;
|
|
440
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
441
|
+
type: z.ZodLiteral<"base64">;
|
|
442
|
+
media_type: z.ZodEnum<{
|
|
443
|
+
"text/plain": "text/plain";
|
|
444
|
+
"application/pdf": "application/pdf";
|
|
445
|
+
}>;
|
|
446
|
+
data: z.ZodString;
|
|
447
|
+
}, z.core.$strict>], "type">;
|
|
448
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
449
|
+
type: z.ZodLiteral<"audio">;
|
|
450
|
+
source: z.ZodObject<{
|
|
451
|
+
type: z.ZodLiteral<"base64">;
|
|
452
|
+
media_type: z.ZodEnum<{
|
|
453
|
+
"audio/wav": "audio/wav";
|
|
454
|
+
"audio/mpeg": "audio/mpeg";
|
|
455
|
+
"audio/mp4": "audio/mp4";
|
|
456
|
+
"audio/ogg": "audio/ogg";
|
|
457
|
+
"audio/flac": "audio/flac";
|
|
458
|
+
}>;
|
|
459
|
+
data: z.ZodString;
|
|
460
|
+
}, z.core.$strict>;
|
|
461
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
462
|
+
type: z.ZodLiteral<"video">;
|
|
463
|
+
source: z.ZodObject<{
|
|
464
|
+
type: z.ZodLiteral<"base64">;
|
|
465
|
+
media_type: z.ZodEnum<{
|
|
466
|
+
"video/mp4": "video/mp4";
|
|
467
|
+
"video/webm": "video/webm";
|
|
468
|
+
"video/quicktime": "video/quicktime";
|
|
469
|
+
}>;
|
|
470
|
+
data: z.ZodString;
|
|
471
|
+
}, z.core.$strict>;
|
|
472
|
+
}, z.core.$strict>], "type">>]>>;
|
|
473
|
+
is_error: z.ZodOptional<z.ZodBoolean>;
|
|
474
|
+
}, z.core.$strip>], "type">>]>;
|
|
475
|
+
}, z.core.$strip>>;
|
|
476
|
+
system: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
|
|
477
|
+
type: z.ZodLiteral<"text">;
|
|
478
|
+
text: z.ZodString;
|
|
479
|
+
}, z.core.$strip>>]>>;
|
|
480
|
+
tools: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
481
|
+
name: z.ZodString;
|
|
482
|
+
description: z.ZodOptional<z.ZodString>;
|
|
483
|
+
input_schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
484
|
+
}, z.core.$strip>>>;
|
|
485
|
+
stream: z.ZodDefault<z.ZodBoolean>;
|
|
486
|
+
max_tokens: z.ZodOptional<z.ZodNumber>;
|
|
487
|
+
tool_choice: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
488
|
+
type: z.ZodEnum<{
|
|
489
|
+
any: "any";
|
|
490
|
+
auto: "auto";
|
|
491
|
+
}>;
|
|
492
|
+
disable_parallel_tool_use: z.ZodOptional<z.ZodBoolean>;
|
|
493
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
494
|
+
type: z.ZodLiteral<"none">;
|
|
495
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
496
|
+
type: z.ZodLiteral<"tool">;
|
|
497
|
+
name: z.ZodString;
|
|
498
|
+
disable_parallel_tool_use: z.ZodOptional<z.ZodBoolean>;
|
|
499
|
+
}, z.core.$strict>], "type">>;
|
|
500
|
+
thinking: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
501
|
+
type: z.ZodLiteral<"disabled">;
|
|
502
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
503
|
+
type: z.ZodLiteral<"enabled">;
|
|
504
|
+
budget_tokens: z.ZodNumber;
|
|
505
|
+
display: z.ZodOptional<z.ZodEnum<{
|
|
506
|
+
summarized: "summarized";
|
|
507
|
+
omitted: "omitted";
|
|
508
|
+
}>>;
|
|
509
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
510
|
+
type: z.ZodLiteral<"adaptive">;
|
|
511
|
+
display: z.ZodOptional<z.ZodEnum<{
|
|
512
|
+
summarized: "summarized";
|
|
513
|
+
omitted: "omitted";
|
|
514
|
+
}>>;
|
|
515
|
+
}, z.core.$strip>], "type">>;
|
|
516
|
+
output_config: z.ZodOptional<z.ZodObject<{
|
|
517
|
+
effort: z.ZodOptional<z.ZodEnum<{
|
|
518
|
+
low: "low";
|
|
519
|
+
medium: "medium";
|
|
520
|
+
high: "high";
|
|
521
|
+
}>>;
|
|
522
|
+
format: z.ZodOptional<z.ZodObject<{
|
|
523
|
+
type: z.ZodLiteral<"json_schema">;
|
|
524
|
+
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
525
|
+
}, z.core.$strict>>;
|
|
526
|
+
}, z.core.$strict>>;
|
|
527
|
+
output_format: z.ZodOptional<z.ZodObject<{
|
|
528
|
+
type: z.ZodLiteral<"json_schema">;
|
|
529
|
+
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
530
|
+
}, z.core.$strict>>;
|
|
531
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
532
|
+
top_p: z.ZodOptional<z.ZodNumber>;
|
|
533
|
+
top_k: z.ZodOptional<z.ZodNumber>;
|
|
534
|
+
stop_sequences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
535
|
+
}, z.core.$loose>;
|
|
536
|
+
export type AgRequest = z.infer<typeof schema>;
|
|
537
|
+
export type AgMessage = z.infer<typeof message>;
|
|
538
|
+
export type AgBlock = z.infer<typeof block>;
|
|
539
|
+
export type AgCall = z.infer<typeof callBlock>;
|
|
540
|
+
export type AgResult = z.infer<typeof resultBlock>;
|
|
541
|
+
export declare function parseAgRequest(value: unknown, adaptThinkingBudgets?: boolean): AgRequest;
|
|
542
|
+
export declare function blocks(message: AgMessage): AgBlock[];
|
|
543
|
+
export declare function stable(value: unknown): string;
|
|
544
|
+
export declare function historyKey(messages: AgMessage[]): string;
|
|
545
|
+
export declare function contractKey(request: AgRequest): string;
|
|
546
|
+
/** Client plugins may refresh instructions/tool definitions, but cannot retarget a pending execution. */
|
|
547
|
+
export declare function sameAgExecutionContract(previous: AgRequest, next: AgRequest): boolean;
|
|
548
|
+
export declare function hasAgImages(messages: AgMessage[]): boolean;
|
|
549
|
+
export declare function availableAgTools(request: AgRequest): AgRequest["tools"];
|
|
550
|
+
export declare function parallelAgTool(request: AgRequest): AgRequest["tools"][number] | undefined;
|
|
551
|
+
export declare function forcedAgTool(request: AgRequest): boolean;
|
|
552
|
+
export declare function toolChoiceInstruction(request: AgRequest): string;
|
|
553
|
+
export declare function renderAgPrompt(request: AgRequest, nativeTools?: string[]): string;
|
|
554
|
+
export type AgEvent = {
|
|
555
|
+
kind: "text";
|
|
556
|
+
text: string;
|
|
557
|
+
} | {
|
|
558
|
+
kind: "tool";
|
|
559
|
+
call: AgCall;
|
|
560
|
+
} | {
|
|
561
|
+
kind: "usage";
|
|
562
|
+
input: number;
|
|
563
|
+
output: number;
|
|
564
|
+
cache: number;
|
|
565
|
+
} | {
|
|
566
|
+
kind: "end";
|
|
567
|
+
} | {
|
|
568
|
+
kind: "error";
|
|
569
|
+
error: Error;
|
|
570
|
+
};
|
|
571
|
+
/** Single consumer, bounded upstream buffering; tools stay pending between HTTP responses. */
|
|
572
|
+
export declare class AgEventQueue {
|
|
573
|
+
private items;
|
|
574
|
+
private waiter?;
|
|
575
|
+
private failure?;
|
|
576
|
+
push(event: AgEvent): void;
|
|
577
|
+
fail(error: Error): void;
|
|
578
|
+
takeQueuedTools(): AgCall[];
|
|
579
|
+
next(): Promise<AgEvent>;
|
|
580
|
+
}
|
|
581
|
+
export {};
|
|
582
|
+
//# sourceMappingURL=antigravityProtocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"antigravityProtocol.d.ts","sourceRoot":"","sources":["../../../src/proxy/backends/antigravityProtocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,qBAAa,gBAAiB,SAAQ,KAAK;IACZ,QAAQ,CAAC,MAAM;IAAQ,QAAQ,CAAC,IAAI;IAA4B,QAAQ,CAAC,UAAU;gBAApG,OAAO,EAAE,MAAM,EAAW,MAAM,SAAM,EAAW,IAAI,SAA0B,EAAW,UAAU,qBAAuD;CACxK;AAED,yFAAyF;AACzF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,CASnE;AAaD,QAAA,MAAM,SAAS;;;;;iBAAwH,CAAA;AACvI,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGf,CAAA;AACF,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAAuH,CAAA;AAClI,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
1
|
+
import { type AgRequest, type AgCall } from './antigravityProtocol';
|
|
2
|
+
import type { AgState } from './antigravityState';
|
|
3
|
+
export interface AgCompletedAnswer {
|
|
4
|
+
id: string;
|
|
5
|
+
type: string;
|
|
6
|
+
role: string;
|
|
7
|
+
model: string;
|
|
8
|
+
content: Array<{
|
|
9
|
+
type: 'text';
|
|
10
|
+
text: string;
|
|
11
|
+
} | AgCall>;
|
|
12
|
+
stop_reason: string;
|
|
13
|
+
stop_sequence: string | null;
|
|
14
|
+
usage: {
|
|
15
|
+
input_tokens: number;
|
|
16
|
+
output_tokens: number;
|
|
17
|
+
cache_read_input_tokens: number;
|
|
18
|
+
cache_creation_input_tokens: number;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export declare function agRequestId(request: AgRequest, headers: Headers): string | undefined;
|
|
22
|
+
/** One budget covers implicit completed-result answers and explicitly identified requests. */
|
|
23
|
+
export declare class AgCompletedAnswers {
|
|
24
|
+
private readonly state?;
|
|
25
|
+
private draining?;
|
|
26
|
+
private readonly store;
|
|
27
|
+
private readonly active;
|
|
28
|
+
constructor(state?: AgState | undefined);
|
|
29
|
+
private fingerprint;
|
|
30
|
+
private key;
|
|
31
|
+
eligible(request: AgRequest): boolean;
|
|
32
|
+
wait(request: AgRequest, scope: string, requestId: string | undefined, signal: AbortSignal): Promise<void>;
|
|
33
|
+
drain(): Promise<void>;
|
|
34
|
+
claim(request: AgRequest, scope: string, requestId?: string): () => void;
|
|
35
|
+
get(request: AgRequest, scope: string, requestId?: string): AgCompletedAnswer | undefined;
|
|
36
|
+
put(request: AgRequest, scope: string, answer: AgCompletedAnswer, requestId?: string): void;
|
|
37
|
+
clear(): void;
|
|
38
|
+
}
|
|
39
|
+
/** Reconstruct protocol events lazily, without retaining a second response buffer. */
|
|
40
|
+
export declare function replayAgAnswer(answer: AgCompletedAnswer, stream: boolean, headers: Record<string, string>): Response;
|
|
41
|
+
//# sourceMappingURL=antigravityReplay.d.ts.map
|
|
@@ -0,0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AAM,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,WAAW;IAmBhG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAKtB,KAAK,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,IAAI;IA2BxE,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAQzF,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,SAAS,CAAC,EAAE,MAAM;IASpF,KAAK;CACN;AAED,sFAAsF;AACtF,wBAAgB,cAAc,CAAC,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,QAAQ,CAuBpH"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { AgResponseEvent } from './antigravityJobs';
|
|
2
|
+
import type { AgState } from './antigravityState';
|
|
3
|
+
/** Local Responses compatibility state, separate from native CLI conversation ownership. */
|
|
4
|
+
export declare class AgResponseStore {
|
|
5
|
+
private readonly limits;
|
|
6
|
+
private readonly now;
|
|
7
|
+
private readonly state?;
|
|
8
|
+
private readonly kind;
|
|
9
|
+
private readonly entries;
|
|
10
|
+
private bytes;
|
|
11
|
+
constructor(limits?: {
|
|
12
|
+
entries: number;
|
|
13
|
+
bytes: number;
|
|
14
|
+
entryBytes: number;
|
|
15
|
+
ttlMs: number;
|
|
16
|
+
}, now?: () => number, state?: AgState | undefined, kind?: string);
|
|
17
|
+
private trim;
|
|
18
|
+
private remove;
|
|
19
|
+
private prune;
|
|
20
|
+
put(id: string, scope: string, input: unknown[], response: Record<string, unknown>, events?: AgResponseEvent[], durable?: boolean): void;
|
|
21
|
+
get(id: string, scope: string): {
|
|
22
|
+
input: unknown[];
|
|
23
|
+
response: Record<string, unknown>;
|
|
24
|
+
events?: AgResponseEvent[];
|
|
25
|
+
};
|
|
26
|
+
delete(id: string, scope: string): {
|
|
27
|
+
id: string;
|
|
28
|
+
object: string;
|
|
29
|
+
deleted: boolean;
|
|
30
|
+
};
|
|
31
|
+
clear(): void;
|
|
32
|
+
}
|
|
33
|
+
/** Match auth header precedence; never retain raw credentials in the response store. */
|
|
34
|
+
export declare function agResponseScope(headers: Headers): string;
|
|
35
|
+
//# sourceMappingURL=antigravityResponses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"antigravityResponses.d.ts","sourceRoot":"","sources":["../../../src/proxy/backends/antigravityResponses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAIjD,4FAA4F;AAC5F,qBAAa,eAAe;IAGd,OAAO,CAAC,QAAQ,CAAC,MAAM;IAAgG,OAAO,CAAC,QAAQ,CAAC,GAAG;IAAa,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC;IAAW,OAAO,CAAC,QAAQ,CAAC,IAAI;IAF3N,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsF;IAC9G,OAAO,CAAC,KAAK,CAAI;gBACY,MAAM;;;;;KAA8F,EAAmB,GAAG,eAAW,EAAmB,KAAK,CAAC,EAAE,OAAO,YAAA,EAAmB,IAAI,SAAc;IAWzO,OAAO,CAAC,IAAI;IAIZ,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,KAAK;IAGb,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,EAAE,eAAe,EAAE,EAAE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