@base44-preview/platform 0.1.0-pr.319.cf89f7f → 0.2.0-pr.313.147bf84
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 +71 -124
- package/dist/client.d.ts +30 -0
- package/dist/client.js +32 -0
- package/dist/client.types.d.ts +10 -0
- package/dist/errors.d.ts +47 -0
- package/dist/errors.js +47 -0
- package/dist/errors.types.d.ts +98 -0
- package/dist/index.d.ts +8 -0
- package/dist/{client/index.js → index.js} +1 -1
- package/dist/modules/builder-protocol.d.ts +26 -0
- package/dist/modules/builder-protocol.js +56 -0
- package/dist/{client/modules → modules}/builder-socket.d.ts +10 -5
- package/dist/{client/modules → modules}/builder-socket.js +114 -87
- package/dist/{client/modules → modules}/builder-subscription.d.ts +2 -2
- package/dist/modules/builder.d.ts +3 -0
- package/dist/modules/builder.events.generated.d.ts +2194 -0
- package/dist/modules/builder.events.generated.js +3 -0
- package/dist/modules/builder.events.types.d.ts +77 -0
- package/dist/modules/builder.js +7 -0
- package/dist/modules/builder.types.d.ts +193 -0
- package/package.json +15 -22
- package/dist/client/client.d.ts +0 -9
- package/dist/client/client.js +0 -9
- package/dist/client/client.types.d.ts +0 -12
- package/dist/client/errors.d.ts +0 -10
- package/dist/client/errors.js +0 -10
- package/dist/client/errors.types.d.ts +0 -2
- package/dist/client/index.d.ts +0 -7
- package/dist/client/modules/builder-protocol.d.ts +0 -15
- package/dist/client/modules/builder-protocol.js +0 -34
- package/dist/client/modules/builder.d.ts +0 -4
- package/dist/client/modules/builder.events.types.d.ts +0 -368
- package/dist/client/modules/builder.js +0 -7
- package/dist/client/modules/builder.types.d.ts +0 -47
- package/dist/server/errors.d.ts +0 -15
- package/dist/server/errors.js +0 -18
- package/dist/server/errors.types.d.ts +0 -4
- package/dist/server/errors.types.js +0 -1
- package/dist/server/index.d.ts +0 -6
- package/dist/server/index.js +0 -3
- package/dist/server/modules/webhooks-signature.d.ts +0 -11
- package/dist/server/modules/webhooks-signature.js +0 -65
- package/dist/server/modules/webhooks.d.ts +0 -3
- package/dist/server/modules/webhooks.events.generated.d.ts +0 -174
- package/dist/server/modules/webhooks.events.generated.js +0 -3
- package/dist/server/modules/webhooks.js +0 -77
- package/dist/server/modules/webhooks.types.d.ts +0 -102
- package/dist/server/modules/webhooks.types.js +0 -1
- package/dist/server/server.d.ts +0 -3
- package/dist/server/server.js +0 -11
- package/dist/server/server.types.d.ts +0 -15
- package/dist/server/server.types.js +0 -1
- package/dist/shared/server-url.d.ts +0 -2
- package/dist/shared/server-url.js +0 -8
- /package/dist/{client/client.types.js → client.types.js} +0 -0
- /package/dist/{client/errors.types.js → errors.types.js} +0 -0
- /package/dist/{client/modules → modules}/builder-subscription.js +0 -0
- /package/dist/{client/modules → modules}/builder.events.types.js +0 -0
- /package/dist/{client/modules → modules}/builder.types.js +0 -0
|
@@ -0,0 +1,2194 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Join an app's room, once per app after every connect. An `app.snapshot` follows, then its live events. Refused with `room.access_denied` when the app is not on the session's allowlist, or past 30 joins a minute.
|
|
3
|
+
*/
|
|
4
|
+
export type JoinMessage = string;
|
|
5
|
+
/**
|
|
6
|
+
* Leave an app's room. Its events stop.
|
|
7
|
+
*/
|
|
8
|
+
export type LeaveMessage = string;
|
|
9
|
+
/**
|
|
10
|
+
* An entity access-rule change waiting for approval.
|
|
11
|
+
*/
|
|
12
|
+
export interface AccessRuleChangeDetails {
|
|
13
|
+
/**
|
|
14
|
+
* Entity whose access rules change.
|
|
15
|
+
*/
|
|
16
|
+
entity_name?: string;
|
|
17
|
+
/**
|
|
18
|
+
* How the access rules change.
|
|
19
|
+
*/
|
|
20
|
+
change_type?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Access operations whose rules change.
|
|
23
|
+
*/
|
|
24
|
+
changed_ops?: string[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The app's current status and its last 50 public messages, after every join. Replace the app's state with it.
|
|
28
|
+
*/
|
|
29
|
+
export interface AppSnapshotEvent {
|
|
30
|
+
/**
|
|
31
|
+
* The app the event belongs to, as `/apps/{app_id}`. It is `null` for `session.ended`, which concerns the whole session.
|
|
32
|
+
*/
|
|
33
|
+
room: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* The event's payload. Its fields depend on the event.
|
|
36
|
+
*/
|
|
37
|
+
data: Snapshot;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The app's current state, sent after every join. Replace what the viewer holds for the app with it.
|
|
41
|
+
*/
|
|
42
|
+
export interface Snapshot {
|
|
43
|
+
/**
|
|
44
|
+
* The app's build status, or `null` when none is recorded.
|
|
45
|
+
*/
|
|
46
|
+
status: StatusObject | null;
|
|
47
|
+
/**
|
|
48
|
+
* The last 50 messages visible to partners, oldest first.
|
|
49
|
+
*/
|
|
50
|
+
messages: Message[];
|
|
51
|
+
/**
|
|
52
|
+
* The main branch's prompt queue.
|
|
53
|
+
*/
|
|
54
|
+
queue: QueueState;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The app's current build status.
|
|
58
|
+
*/
|
|
59
|
+
export interface StatusObject {
|
|
60
|
+
/**
|
|
61
|
+
* Where the app is in its build lifecycle. Ready means idle with no build in progress, processing means the app is being generated or modified, and error means the last build failed. This tracks building, not publishing.
|
|
62
|
+
*/
|
|
63
|
+
state?: ("ready" | "processing" | "error") | null;
|
|
64
|
+
/**
|
|
65
|
+
* ID of the user message whose turn the status belongs to.
|
|
66
|
+
*/
|
|
67
|
+
turn_id?: string | null;
|
|
68
|
+
/**
|
|
69
|
+
* Time the status was last updated, as a UTC timestamp in ISO 8601 format.
|
|
70
|
+
*/
|
|
71
|
+
last_updated_date?: string | null;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* A public chat message. Replace the message with the same `id` as a whole.
|
|
75
|
+
*/
|
|
76
|
+
export interface Message {
|
|
77
|
+
/**
|
|
78
|
+
* ID of the message. An update carries the whole message again under the same ID.
|
|
79
|
+
*/
|
|
80
|
+
id?: string | null;
|
|
81
|
+
/**
|
|
82
|
+
* `user` for a message a person sent, `assistant` for the AI's reply. `system` messages are never sent.
|
|
83
|
+
*/
|
|
84
|
+
role?: ("user" | "assistant" | "system") | null;
|
|
85
|
+
/**
|
|
86
|
+
* Text of the message. Attachments and structured content are left out.
|
|
87
|
+
*/
|
|
88
|
+
content?: string | null;
|
|
89
|
+
/**
|
|
90
|
+
* The tool calls the AI made in this message, in order. Each is updated in place as it progresses.
|
|
91
|
+
*/
|
|
92
|
+
tool_calls?: (AskClarifyingQuestionsCall | AskPlanQuestionsCall | BashCall | CreateEntityRecordsCall | DeleteEntitiesCall | DeleteFileCall | EditRepoFileCall | ExecToolCall | FindReplaceCall | GenerateGameBackgroundCall | GenerateGameImageCall | GenerateImageCall | GeneratePrdCall | GenerateVideoCall | InstallNpmPackageCall | PreviewExecuteCodeCall | PreviewScreenshotCall | ReadOnlyExecToolCall | ReadRepoFileCall | RunShellCommandCall | SetSecretsCall | UpdateEntitiesCall | UpdatePlanCall | WriteFileCall | WriteRepoFileCall | OtherToolCall)[] | null;
|
|
93
|
+
/**
|
|
94
|
+
* ID of the checkpoint tied to the message. On a message a person sent it holds the app before the turn, on the AI's final reply the app after it. Absent when the turn made no checkpoint.
|
|
95
|
+
*/
|
|
96
|
+
checkpoint_id?: string | null;
|
|
97
|
+
/**
|
|
98
|
+
* When the message was created.
|
|
99
|
+
*/
|
|
100
|
+
metadata?: MessageMetadata | null;
|
|
101
|
+
/**
|
|
102
|
+
* Flags on the message, such as plan mode. Only the flags listed here are published.
|
|
103
|
+
*/
|
|
104
|
+
additional_message_params?: MessageParams | null;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* The AI asks the user questions before it goes on. The call waits until the user answers.
|
|
108
|
+
*/
|
|
109
|
+
export interface AskClarifyingQuestionsCall {
|
|
110
|
+
/**
|
|
111
|
+
* The tool that was called.
|
|
112
|
+
*/
|
|
113
|
+
name: "ask_clarifying_questions";
|
|
114
|
+
/**
|
|
115
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
116
|
+
*/
|
|
117
|
+
id?: string | null;
|
|
118
|
+
/**
|
|
119
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
120
|
+
*/
|
|
121
|
+
requires_user_input?: boolean | null;
|
|
122
|
+
/**
|
|
123
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
124
|
+
*/
|
|
125
|
+
auto_approved?: boolean | null;
|
|
126
|
+
/**
|
|
127
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
128
|
+
*/
|
|
129
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
130
|
+
/**
|
|
131
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
132
|
+
*/
|
|
133
|
+
mutation_applied?: boolean | null;
|
|
134
|
+
/**
|
|
135
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
136
|
+
*/
|
|
137
|
+
waiting_on?: WaitingOn | null;
|
|
138
|
+
/**
|
|
139
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
140
|
+
*/
|
|
141
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
142
|
+
/**
|
|
143
|
+
* What the AI asked the tool to do, narrowed to what this tool publishes.
|
|
144
|
+
*/
|
|
145
|
+
arguments?: QuestionArguments | null;
|
|
146
|
+
/**
|
|
147
|
+
* The user's answer to the call, once given, for tools that take one.
|
|
148
|
+
*/
|
|
149
|
+
user_input?: QuestionInput | null;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* What the call waits for. Render the widget by kind, not by tool name.
|
|
153
|
+
*/
|
|
154
|
+
export interface WaitingOn {
|
|
155
|
+
/**
|
|
156
|
+
* `choice`: pick among options. `input`: supply values. `approval`: approve or reject.
|
|
157
|
+
*/
|
|
158
|
+
kind?: "choice" | "input" | "approval";
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Waiting for approval: testing a backend function would delete records from an entity.
|
|
162
|
+
*/
|
|
163
|
+
export interface BackendFunctionEntityDeleteApproval {
|
|
164
|
+
/**
|
|
165
|
+
* The check that paused the call.
|
|
166
|
+
*/
|
|
167
|
+
guard: "backend_function_entity_delete";
|
|
168
|
+
/**
|
|
169
|
+
* Why the call needs approval, as the check explained it.
|
|
170
|
+
*/
|
|
171
|
+
reason?: string | null;
|
|
172
|
+
/**
|
|
173
|
+
* What the check found.
|
|
174
|
+
*/
|
|
175
|
+
details?: FunctionEntityDeleteDetails | null;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* A backend function test that would delete entity records.
|
|
179
|
+
*/
|
|
180
|
+
export interface FunctionEntityDeleteDetails {
|
|
181
|
+
/**
|
|
182
|
+
* Backend function under test.
|
|
183
|
+
*/
|
|
184
|
+
function_name?: string;
|
|
185
|
+
/**
|
|
186
|
+
* Entity method the function calls.
|
|
187
|
+
*/
|
|
188
|
+
method?: string;
|
|
189
|
+
/**
|
|
190
|
+
* The check could not verify the function's source.
|
|
191
|
+
*/
|
|
192
|
+
inspection_failed?: boolean;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Waiting for approval: the AI wants to run a shell command that needs a review first. The command itself is not published.
|
|
196
|
+
*/
|
|
197
|
+
export interface BashApproval {
|
|
198
|
+
/**
|
|
199
|
+
* The check that paused the call.
|
|
200
|
+
*/
|
|
201
|
+
guard: "bash_approval";
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Waiting for approval: the AI wants to change who can read or write an entity's records.
|
|
205
|
+
*/
|
|
206
|
+
export interface EntityRlsGuardApproval {
|
|
207
|
+
/**
|
|
208
|
+
* The check that paused the call.
|
|
209
|
+
*/
|
|
210
|
+
guard: "entity_rls_guard";
|
|
211
|
+
/**
|
|
212
|
+
* Why the call needs approval, as the check explained it.
|
|
213
|
+
*/
|
|
214
|
+
reason?: string | null;
|
|
215
|
+
/**
|
|
216
|
+
* What the check found.
|
|
217
|
+
*/
|
|
218
|
+
details?: AccessRuleChangeDetails | null;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Waiting for approval: the AI's code would update or delete records in an entity.
|
|
222
|
+
*/
|
|
223
|
+
export interface ExecToolEntityMutationApproval {
|
|
224
|
+
/**
|
|
225
|
+
* The check that paused the call.
|
|
226
|
+
*/
|
|
227
|
+
guard: "exec_tool_entity_mutation";
|
|
228
|
+
/**
|
|
229
|
+
* Why the call needs approval, as the check explained it.
|
|
230
|
+
*/
|
|
231
|
+
reason?: string | null;
|
|
232
|
+
/**
|
|
233
|
+
* What the check found.
|
|
234
|
+
*/
|
|
235
|
+
details?: EntityMutationDetails | null;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* What the entity change waiting for approval would do. Record data is never included.
|
|
239
|
+
*/
|
|
240
|
+
export interface EntityMutationDetails {
|
|
241
|
+
/**
|
|
242
|
+
* Entity method the code calls, such as `delete`.
|
|
243
|
+
*/
|
|
244
|
+
method?: string;
|
|
245
|
+
/**
|
|
246
|
+
* The agent's summary of what the code does.
|
|
247
|
+
*/
|
|
248
|
+
summary?: string;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Waiting for approval: the AI's code would write to a GitHub repository.
|
|
252
|
+
*/
|
|
253
|
+
export interface ExecToolGithubRepoWriteApproval {
|
|
254
|
+
/**
|
|
255
|
+
* The check that paused the call.
|
|
256
|
+
*/
|
|
257
|
+
guard: "exec_tool_github_repo_write";
|
|
258
|
+
/**
|
|
259
|
+
* Why the call needs approval, as the check explained it.
|
|
260
|
+
*/
|
|
261
|
+
reason?: string | null;
|
|
262
|
+
/**
|
|
263
|
+
* What the check found.
|
|
264
|
+
*/
|
|
265
|
+
details?: SummaryDetails | null;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* What the code waiting for approval would do.
|
|
269
|
+
*/
|
|
270
|
+
export interface SummaryDetails {
|
|
271
|
+
/**
|
|
272
|
+
* The agent's summary of what the code does.
|
|
273
|
+
*/
|
|
274
|
+
summary?: string;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Waiting for approval: the AI's code would invite someone to the app by email.
|
|
278
|
+
*/
|
|
279
|
+
export interface ExecToolInviteUserApproval {
|
|
280
|
+
/**
|
|
281
|
+
* The check that paused the call.
|
|
282
|
+
*/
|
|
283
|
+
guard: "exec_tool_invite_user";
|
|
284
|
+
/**
|
|
285
|
+
* Why the call needs approval, as the check explained it.
|
|
286
|
+
*/
|
|
287
|
+
reason?: string | null;
|
|
288
|
+
/**
|
|
289
|
+
* What the check found.
|
|
290
|
+
*/
|
|
291
|
+
details?: SummaryDetails | null;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Waiting for approval: the AI's code would send an email.
|
|
295
|
+
*/
|
|
296
|
+
export interface ExecToolSendEmailApproval {
|
|
297
|
+
/**
|
|
298
|
+
* The check that paused the call.
|
|
299
|
+
*/
|
|
300
|
+
guard: "exec_tool_send_email";
|
|
301
|
+
/**
|
|
302
|
+
* Why the call needs approval, as the check explained it.
|
|
303
|
+
*/
|
|
304
|
+
reason?: string | null;
|
|
305
|
+
/**
|
|
306
|
+
* What the check found.
|
|
307
|
+
*/
|
|
308
|
+
details?: SummaryDetails | null;
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Waiting for approval: the AI's code would send a text message.
|
|
312
|
+
*/
|
|
313
|
+
export interface ExecToolSendSmsApproval {
|
|
314
|
+
/**
|
|
315
|
+
* The check that paused the call.
|
|
316
|
+
*/
|
|
317
|
+
guard: "exec_tool_send_sms";
|
|
318
|
+
/**
|
|
319
|
+
* Why the call needs approval, as the check explained it.
|
|
320
|
+
*/
|
|
321
|
+
reason?: string | null;
|
|
322
|
+
/**
|
|
323
|
+
* What the check found.
|
|
324
|
+
*/
|
|
325
|
+
details?: SummaryDetails | null;
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Waiting for approval from a check that publishes only its name.
|
|
329
|
+
*/
|
|
330
|
+
export interface OtherApproval {
|
|
331
|
+
/**
|
|
332
|
+
* The check that paused the call.
|
|
333
|
+
*/
|
|
334
|
+
guard: string;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* The questions the builder asks.
|
|
338
|
+
*/
|
|
339
|
+
export interface QuestionArguments {
|
|
340
|
+
/**
|
|
341
|
+
* Questions presented to the user.
|
|
342
|
+
*/
|
|
343
|
+
questions?: Question[];
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* A question for the user. Image and HTML sources and private design context are never included.
|
|
347
|
+
*/
|
|
348
|
+
export interface Question {
|
|
349
|
+
/**
|
|
350
|
+
* Visible question text.
|
|
351
|
+
*/
|
|
352
|
+
question?: string;
|
|
353
|
+
/**
|
|
354
|
+
* Question category, such as `text`.
|
|
355
|
+
*/
|
|
356
|
+
type?: string;
|
|
357
|
+
/**
|
|
358
|
+
* Supporting text.
|
|
359
|
+
*/
|
|
360
|
+
description?: string;
|
|
361
|
+
/**
|
|
362
|
+
* More than one answer may be selected.
|
|
363
|
+
*/
|
|
364
|
+
multi_select?: boolean;
|
|
365
|
+
/**
|
|
366
|
+
* Plan section the question covers.
|
|
367
|
+
*/
|
|
368
|
+
covers?: string;
|
|
369
|
+
/**
|
|
370
|
+
* Selectable options. A bare string is its label.
|
|
371
|
+
*/
|
|
372
|
+
options?: (string | QuestionOption)[];
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* A selectable answer.
|
|
376
|
+
*/
|
|
377
|
+
export interface QuestionOption {
|
|
378
|
+
/**
|
|
379
|
+
* Visible option label.
|
|
380
|
+
*/
|
|
381
|
+
label?: string;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* The user's answers.
|
|
385
|
+
*/
|
|
386
|
+
export interface QuestionInput {
|
|
387
|
+
/**
|
|
388
|
+
* Answers supplied to the question card.
|
|
389
|
+
*/
|
|
390
|
+
answers?: QuestionAnswer[];
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* An answer to a question. Secret-form input is never included.
|
|
394
|
+
*/
|
|
395
|
+
export interface QuestionAnswer {
|
|
396
|
+
/**
|
|
397
|
+
* Zero-based question index.
|
|
398
|
+
*/
|
|
399
|
+
question_index?: number;
|
|
400
|
+
/**
|
|
401
|
+
* Label selected for a single-select question.
|
|
402
|
+
*/
|
|
403
|
+
selected_label?: string;
|
|
404
|
+
/**
|
|
405
|
+
* Labels selected for a multi-select question.
|
|
406
|
+
*/
|
|
407
|
+
selected_labels?: string[];
|
|
408
|
+
/**
|
|
409
|
+
* Free-text answer. Structural filtering does not redact prose.
|
|
410
|
+
*/
|
|
411
|
+
custom_text?: string;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* The AI asks the user questions that shape the plan, in plan mode. The call waits until the user answers.
|
|
415
|
+
*/
|
|
416
|
+
export interface AskPlanQuestionsCall {
|
|
417
|
+
/**
|
|
418
|
+
* The tool that was called.
|
|
419
|
+
*/
|
|
420
|
+
name: "ask_plan_questions";
|
|
421
|
+
/**
|
|
422
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
423
|
+
*/
|
|
424
|
+
id?: string | null;
|
|
425
|
+
/**
|
|
426
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
427
|
+
*/
|
|
428
|
+
requires_user_input?: boolean | null;
|
|
429
|
+
/**
|
|
430
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
431
|
+
*/
|
|
432
|
+
auto_approved?: boolean | null;
|
|
433
|
+
/**
|
|
434
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
435
|
+
*/
|
|
436
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
437
|
+
/**
|
|
438
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
439
|
+
*/
|
|
440
|
+
mutation_applied?: boolean | null;
|
|
441
|
+
/**
|
|
442
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
443
|
+
*/
|
|
444
|
+
waiting_on?: WaitingOn | null;
|
|
445
|
+
/**
|
|
446
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
447
|
+
*/
|
|
448
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
449
|
+
/**
|
|
450
|
+
* What the AI asked the tool to do, narrowed to what this tool publishes.
|
|
451
|
+
*/
|
|
452
|
+
arguments?: QuestionArguments | null;
|
|
453
|
+
/**
|
|
454
|
+
* The user's answer to the call, once given, for tools that take one.
|
|
455
|
+
*/
|
|
456
|
+
user_input?: QuestionInput | null;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* The AI runs a shell command in the app's sandbox.
|
|
460
|
+
*/
|
|
461
|
+
export interface BashCall {
|
|
462
|
+
/**
|
|
463
|
+
* The tool that was called.
|
|
464
|
+
*/
|
|
465
|
+
name: "bash";
|
|
466
|
+
/**
|
|
467
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
468
|
+
*/
|
|
469
|
+
id?: string | null;
|
|
470
|
+
/**
|
|
471
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
472
|
+
*/
|
|
473
|
+
requires_user_input?: boolean | null;
|
|
474
|
+
/**
|
|
475
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
476
|
+
*/
|
|
477
|
+
auto_approved?: boolean | null;
|
|
478
|
+
/**
|
|
479
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
480
|
+
*/
|
|
481
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
482
|
+
/**
|
|
483
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
484
|
+
*/
|
|
485
|
+
mutation_applied?: boolean | null;
|
|
486
|
+
/**
|
|
487
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
488
|
+
*/
|
|
489
|
+
waiting_on?: WaitingOn | null;
|
|
490
|
+
/**
|
|
491
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
492
|
+
*/
|
|
493
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
494
|
+
/**
|
|
495
|
+
* What the tool touched, for showing its progress. Never file contents or commands.
|
|
496
|
+
*/
|
|
497
|
+
display?: SummaryDisplay | null;
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* What a command or screenshot did.
|
|
501
|
+
*/
|
|
502
|
+
export interface SummaryDisplay {
|
|
503
|
+
/**
|
|
504
|
+
* Reviewed activity summary. Commands and output are never included.
|
|
505
|
+
*/
|
|
506
|
+
summary?: string;
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* The AI adds records to one of the app's entities.
|
|
510
|
+
*/
|
|
511
|
+
export interface CreateEntityRecordsCall {
|
|
512
|
+
/**
|
|
513
|
+
* The tool that was called.
|
|
514
|
+
*/
|
|
515
|
+
name: "create_entity_records";
|
|
516
|
+
/**
|
|
517
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
518
|
+
*/
|
|
519
|
+
id?: string | null;
|
|
520
|
+
/**
|
|
521
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
522
|
+
*/
|
|
523
|
+
requires_user_input?: boolean | null;
|
|
524
|
+
/**
|
|
525
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
526
|
+
*/
|
|
527
|
+
auto_approved?: boolean | null;
|
|
528
|
+
/**
|
|
529
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
530
|
+
*/
|
|
531
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
532
|
+
/**
|
|
533
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
534
|
+
*/
|
|
535
|
+
mutation_applied?: boolean | null;
|
|
536
|
+
/**
|
|
537
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
538
|
+
*/
|
|
539
|
+
waiting_on?: WaitingOn | null;
|
|
540
|
+
/**
|
|
541
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
542
|
+
*/
|
|
543
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
544
|
+
/**
|
|
545
|
+
* What the tool touched, for showing its progress. Never file contents or commands.
|
|
546
|
+
*/
|
|
547
|
+
display?: EntityRecordsDisplay | null;
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* The entity an operation added records to.
|
|
551
|
+
*/
|
|
552
|
+
export interface EntityRecordsDisplay {
|
|
553
|
+
/**
|
|
554
|
+
* Entity type. Records and query values are never included.
|
|
555
|
+
*/
|
|
556
|
+
entity_name?: string;
|
|
557
|
+
/**
|
|
558
|
+
* Number of records created.
|
|
559
|
+
*/
|
|
560
|
+
record_count?: number;
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* The AI deletes records from one of the app's entities.
|
|
564
|
+
*/
|
|
565
|
+
export interface DeleteEntitiesCall {
|
|
566
|
+
/**
|
|
567
|
+
* The tool that was called.
|
|
568
|
+
*/
|
|
569
|
+
name: "delete_entities";
|
|
570
|
+
/**
|
|
571
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
572
|
+
*/
|
|
573
|
+
id?: string | null;
|
|
574
|
+
/**
|
|
575
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
576
|
+
*/
|
|
577
|
+
requires_user_input?: boolean | null;
|
|
578
|
+
/**
|
|
579
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
580
|
+
*/
|
|
581
|
+
auto_approved?: boolean | null;
|
|
582
|
+
/**
|
|
583
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
584
|
+
*/
|
|
585
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
586
|
+
/**
|
|
587
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
588
|
+
*/
|
|
589
|
+
mutation_applied?: boolean | null;
|
|
590
|
+
/**
|
|
591
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
592
|
+
*/
|
|
593
|
+
waiting_on?: WaitingOn | null;
|
|
594
|
+
/**
|
|
595
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
596
|
+
*/
|
|
597
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
598
|
+
/**
|
|
599
|
+
* What the AI asked the tool to do, narrowed to what this tool publishes.
|
|
600
|
+
*/
|
|
601
|
+
arguments?: EntityChangeArguments | null;
|
|
602
|
+
/**
|
|
603
|
+
* What the tool touched, for showing its progress. Never file contents or commands.
|
|
604
|
+
*/
|
|
605
|
+
display?: EntityDisplay | null;
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* An entity update or delete. The entity is in `display.entity_name`.
|
|
609
|
+
*/
|
|
610
|
+
export interface EntityChangeArguments {
|
|
611
|
+
/**
|
|
612
|
+
* The agent's summary of the change. Queries and record values are never included.
|
|
613
|
+
*/
|
|
614
|
+
summary?: string;
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* The entity an entity operation touched.
|
|
618
|
+
*/
|
|
619
|
+
export interface EntityDisplay {
|
|
620
|
+
/**
|
|
621
|
+
* Entity type. Records and query values are never included.
|
|
622
|
+
*/
|
|
623
|
+
entity_name?: string;
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* The AI deletes a file from the app.
|
|
627
|
+
*/
|
|
628
|
+
export interface DeleteFileCall {
|
|
629
|
+
/**
|
|
630
|
+
* The tool that was called.
|
|
631
|
+
*/
|
|
632
|
+
name: "delete_file";
|
|
633
|
+
/**
|
|
634
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
635
|
+
*/
|
|
636
|
+
id?: string | null;
|
|
637
|
+
/**
|
|
638
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
639
|
+
*/
|
|
640
|
+
requires_user_input?: boolean | null;
|
|
641
|
+
/**
|
|
642
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
643
|
+
*/
|
|
644
|
+
auto_approved?: boolean | null;
|
|
645
|
+
/**
|
|
646
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
647
|
+
*/
|
|
648
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
649
|
+
/**
|
|
650
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
651
|
+
*/
|
|
652
|
+
mutation_applied?: boolean | null;
|
|
653
|
+
/**
|
|
654
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
655
|
+
*/
|
|
656
|
+
waiting_on?: WaitingOn | null;
|
|
657
|
+
/**
|
|
658
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
659
|
+
*/
|
|
660
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
661
|
+
/**
|
|
662
|
+
* What the tool touched, for showing its progress. Never file contents or commands.
|
|
663
|
+
*/
|
|
664
|
+
display?: FileDisplay | null;
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* The files a file operation touched.
|
|
668
|
+
*/
|
|
669
|
+
export interface FileDisplay {
|
|
670
|
+
/**
|
|
671
|
+
* Changed file paths. Source bodies and diffs are never included.
|
|
672
|
+
*/
|
|
673
|
+
file_paths?: string[];
|
|
674
|
+
/**
|
|
675
|
+
* A write intentionally used empty content.
|
|
676
|
+
*/
|
|
677
|
+
content_empty?: boolean;
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* The AI edits a file in the imported repository.
|
|
681
|
+
*/
|
|
682
|
+
export interface EditRepoFileCall {
|
|
683
|
+
/**
|
|
684
|
+
* The tool that was called.
|
|
685
|
+
*/
|
|
686
|
+
name: "edit_repo_file";
|
|
687
|
+
/**
|
|
688
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
689
|
+
*/
|
|
690
|
+
id?: string | null;
|
|
691
|
+
/**
|
|
692
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
693
|
+
*/
|
|
694
|
+
requires_user_input?: boolean | null;
|
|
695
|
+
/**
|
|
696
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
697
|
+
*/
|
|
698
|
+
auto_approved?: boolean | null;
|
|
699
|
+
/**
|
|
700
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
701
|
+
*/
|
|
702
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
703
|
+
/**
|
|
704
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
705
|
+
*/
|
|
706
|
+
mutation_applied?: boolean | null;
|
|
707
|
+
/**
|
|
708
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
709
|
+
*/
|
|
710
|
+
waiting_on?: WaitingOn | null;
|
|
711
|
+
/**
|
|
712
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
713
|
+
*/
|
|
714
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
715
|
+
/**
|
|
716
|
+
* What the tool touched, for showing its progress. Never file contents or commands.
|
|
717
|
+
*/
|
|
718
|
+
display?: FileDisplay | null;
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* The AI runs code against the app's data and integrations.
|
|
722
|
+
*/
|
|
723
|
+
export interface ExecToolCall {
|
|
724
|
+
/**
|
|
725
|
+
* The tool that was called.
|
|
726
|
+
*/
|
|
727
|
+
name: "exec_tool";
|
|
728
|
+
/**
|
|
729
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
730
|
+
*/
|
|
731
|
+
id?: string | null;
|
|
732
|
+
/**
|
|
733
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
734
|
+
*/
|
|
735
|
+
requires_user_input?: boolean | null;
|
|
736
|
+
/**
|
|
737
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
738
|
+
*/
|
|
739
|
+
auto_approved?: boolean | null;
|
|
740
|
+
/**
|
|
741
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
742
|
+
*/
|
|
743
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
744
|
+
/**
|
|
745
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
746
|
+
*/
|
|
747
|
+
mutation_applied?: boolean | null;
|
|
748
|
+
/**
|
|
749
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
750
|
+
*/
|
|
751
|
+
waiting_on?: WaitingOn | null;
|
|
752
|
+
/**
|
|
753
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
754
|
+
*/
|
|
755
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
756
|
+
/**
|
|
757
|
+
* What the tool touched, for showing its progress. Never file contents or commands.
|
|
758
|
+
*/
|
|
759
|
+
display?: ExecDisplay | null;
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* What a code execution did.
|
|
763
|
+
*/
|
|
764
|
+
export interface ExecDisplay {
|
|
765
|
+
/**
|
|
766
|
+
* Reviewed activity summary. Code and output are never included.
|
|
767
|
+
*/
|
|
768
|
+
summary?: string;
|
|
769
|
+
/**
|
|
770
|
+
* The code changed entity data, so refresh the preview.
|
|
771
|
+
*/
|
|
772
|
+
writes_entities?: boolean;
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* The AI edits files by replacing text in them.
|
|
776
|
+
*/
|
|
777
|
+
export interface FindReplaceCall {
|
|
778
|
+
/**
|
|
779
|
+
* The tool that was called.
|
|
780
|
+
*/
|
|
781
|
+
name: "find_replace";
|
|
782
|
+
/**
|
|
783
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
784
|
+
*/
|
|
785
|
+
id?: string | null;
|
|
786
|
+
/**
|
|
787
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
788
|
+
*/
|
|
789
|
+
requires_user_input?: boolean | null;
|
|
790
|
+
/**
|
|
791
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
792
|
+
*/
|
|
793
|
+
auto_approved?: boolean | null;
|
|
794
|
+
/**
|
|
795
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
796
|
+
*/
|
|
797
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
798
|
+
/**
|
|
799
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
800
|
+
*/
|
|
801
|
+
mutation_applied?: boolean | null;
|
|
802
|
+
/**
|
|
803
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
804
|
+
*/
|
|
805
|
+
waiting_on?: WaitingOn | null;
|
|
806
|
+
/**
|
|
807
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
808
|
+
*/
|
|
809
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
810
|
+
/**
|
|
811
|
+
* What the tool touched, for showing its progress. Never file contents or commands.
|
|
812
|
+
*/
|
|
813
|
+
display?: FileDisplay | null;
|
|
814
|
+
}
|
|
815
|
+
/**
|
|
816
|
+
* The AI generates a background image for a game. An `image.resolved` event follows when it is ready.
|
|
817
|
+
*/
|
|
818
|
+
export interface GenerateGameBackgroundCall {
|
|
819
|
+
/**
|
|
820
|
+
* The tool that was called.
|
|
821
|
+
*/
|
|
822
|
+
name: "generate_game_background";
|
|
823
|
+
/**
|
|
824
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
825
|
+
*/
|
|
826
|
+
id?: string | null;
|
|
827
|
+
/**
|
|
828
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
829
|
+
*/
|
|
830
|
+
requires_user_input?: boolean | null;
|
|
831
|
+
/**
|
|
832
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
833
|
+
*/
|
|
834
|
+
auto_approved?: boolean | null;
|
|
835
|
+
/**
|
|
836
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
837
|
+
*/
|
|
838
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
839
|
+
/**
|
|
840
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
841
|
+
*/
|
|
842
|
+
mutation_applied?: boolean | null;
|
|
843
|
+
/**
|
|
844
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
845
|
+
*/
|
|
846
|
+
waiting_on?: WaitingOn | null;
|
|
847
|
+
/**
|
|
848
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
849
|
+
*/
|
|
850
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
851
|
+
/**
|
|
852
|
+
* The tool's result, narrowed to what this tool publishes. Absent while the call waits for approval.
|
|
853
|
+
*/
|
|
854
|
+
results?: string | null;
|
|
855
|
+
}
|
|
856
|
+
/**
|
|
857
|
+
* The AI generates an image asset for a game. An `image.resolved` event follows when it is ready.
|
|
858
|
+
*/
|
|
859
|
+
export interface GenerateGameImageCall {
|
|
860
|
+
/**
|
|
861
|
+
* The tool that was called.
|
|
862
|
+
*/
|
|
863
|
+
name: "generate_game_image";
|
|
864
|
+
/**
|
|
865
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
866
|
+
*/
|
|
867
|
+
id?: string | null;
|
|
868
|
+
/**
|
|
869
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
870
|
+
*/
|
|
871
|
+
requires_user_input?: boolean | null;
|
|
872
|
+
/**
|
|
873
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
874
|
+
*/
|
|
875
|
+
auto_approved?: boolean | null;
|
|
876
|
+
/**
|
|
877
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
878
|
+
*/
|
|
879
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
880
|
+
/**
|
|
881
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
882
|
+
*/
|
|
883
|
+
mutation_applied?: boolean | null;
|
|
884
|
+
/**
|
|
885
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
886
|
+
*/
|
|
887
|
+
waiting_on?: WaitingOn | null;
|
|
888
|
+
/**
|
|
889
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
890
|
+
*/
|
|
891
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
892
|
+
/**
|
|
893
|
+
* What the AI asked the tool to do, narrowed to what this tool publishes.
|
|
894
|
+
*/
|
|
895
|
+
arguments?: GameImageArguments | null;
|
|
896
|
+
/**
|
|
897
|
+
* The tool's result, narrowed to what this tool publishes. Absent while the call waits for approval.
|
|
898
|
+
*/
|
|
899
|
+
results?: string | null;
|
|
900
|
+
}
|
|
901
|
+
/**
|
|
902
|
+
* What to generate.
|
|
903
|
+
*/
|
|
904
|
+
export interface GameImageArguments {
|
|
905
|
+
/**
|
|
906
|
+
* Requested aspect ratio, such as `1:1`.
|
|
907
|
+
*/
|
|
908
|
+
aspect_ratio?: string;
|
|
909
|
+
}
|
|
910
|
+
/**
|
|
911
|
+
* The AI generates an image for the app. An `image.resolved` event follows when it is ready.
|
|
912
|
+
*/
|
|
913
|
+
export interface GenerateImageCall {
|
|
914
|
+
/**
|
|
915
|
+
* The tool that was called.
|
|
916
|
+
*/
|
|
917
|
+
name: "generate_image";
|
|
918
|
+
/**
|
|
919
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
920
|
+
*/
|
|
921
|
+
id?: string | null;
|
|
922
|
+
/**
|
|
923
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
924
|
+
*/
|
|
925
|
+
requires_user_input?: boolean | null;
|
|
926
|
+
/**
|
|
927
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
928
|
+
*/
|
|
929
|
+
auto_approved?: boolean | null;
|
|
930
|
+
/**
|
|
931
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
932
|
+
*/
|
|
933
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
934
|
+
/**
|
|
935
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
936
|
+
*/
|
|
937
|
+
mutation_applied?: boolean | null;
|
|
938
|
+
/**
|
|
939
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
940
|
+
*/
|
|
941
|
+
waiting_on?: WaitingOn | null;
|
|
942
|
+
/**
|
|
943
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
944
|
+
*/
|
|
945
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
946
|
+
/**
|
|
947
|
+
* What the AI asked the tool to do, narrowed to what this tool publishes.
|
|
948
|
+
*/
|
|
949
|
+
arguments?: MediaArguments | null;
|
|
950
|
+
/**
|
|
951
|
+
* The tool's result, narrowed to what this tool publishes. Absent while the call waits for approval.
|
|
952
|
+
*/
|
|
953
|
+
results?: ImageResult | null;
|
|
954
|
+
}
|
|
955
|
+
/**
|
|
956
|
+
* What to generate.
|
|
957
|
+
*/
|
|
958
|
+
export interface MediaArguments {
|
|
959
|
+
/**
|
|
960
|
+
* Visible media label.
|
|
961
|
+
*/
|
|
962
|
+
label?: string;
|
|
963
|
+
/**
|
|
964
|
+
* Requested aspect ratio, such as `16:9`.
|
|
965
|
+
*/
|
|
966
|
+
aspect_ratio?: string;
|
|
967
|
+
}
|
|
968
|
+
/**
|
|
969
|
+
* The generated image's state.
|
|
970
|
+
*/
|
|
971
|
+
export interface ImageResult {
|
|
972
|
+
/**
|
|
973
|
+
* Placeholder URL, used to associate an `image.resolved` event with this tool.
|
|
974
|
+
*/
|
|
975
|
+
placeholder_url?: string;
|
|
976
|
+
/**
|
|
977
|
+
* Current generation status.
|
|
978
|
+
*/
|
|
979
|
+
status?: "pending" | "completed" | "failed";
|
|
980
|
+
/**
|
|
981
|
+
* Generated image URL, once available.
|
|
982
|
+
*/
|
|
983
|
+
image_url?: string | null;
|
|
984
|
+
}
|
|
985
|
+
/**
|
|
986
|
+
* The AI writes down the plan it settled with the user. In plan mode this call carries the plan itself.
|
|
987
|
+
*/
|
|
988
|
+
export interface GeneratePrdCall {
|
|
989
|
+
/**
|
|
990
|
+
* The tool that was called.
|
|
991
|
+
*/
|
|
992
|
+
name: "generate_prd";
|
|
993
|
+
/**
|
|
994
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
995
|
+
*/
|
|
996
|
+
id?: string | null;
|
|
997
|
+
/**
|
|
998
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
999
|
+
*/
|
|
1000
|
+
requires_user_input?: boolean | null;
|
|
1001
|
+
/**
|
|
1002
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
1003
|
+
*/
|
|
1004
|
+
auto_approved?: boolean | null;
|
|
1005
|
+
/**
|
|
1006
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
1007
|
+
*/
|
|
1008
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
1009
|
+
/**
|
|
1010
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
1011
|
+
*/
|
|
1012
|
+
mutation_applied?: boolean | null;
|
|
1013
|
+
/**
|
|
1014
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
1015
|
+
*/
|
|
1016
|
+
waiting_on?: WaitingOn | null;
|
|
1017
|
+
/**
|
|
1018
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
1019
|
+
*/
|
|
1020
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
1021
|
+
/**
|
|
1022
|
+
* What the AI asked the tool to do, narrowed to what this tool publishes.
|
|
1023
|
+
*/
|
|
1024
|
+
arguments?: PrdArguments | null;
|
|
1025
|
+
}
|
|
1026
|
+
/**
|
|
1027
|
+
* The user's own plan. In plan mode the message `content` beside it can be empty.
|
|
1028
|
+
*/
|
|
1029
|
+
export interface PrdArguments {
|
|
1030
|
+
/**
|
|
1031
|
+
* App or feature name.
|
|
1032
|
+
*/
|
|
1033
|
+
app_name?: string;
|
|
1034
|
+
/**
|
|
1035
|
+
* What is being built and why.
|
|
1036
|
+
*/
|
|
1037
|
+
intent_and_goal?: string;
|
|
1038
|
+
/**
|
|
1039
|
+
* Who uses it and their roles.
|
|
1040
|
+
*/
|
|
1041
|
+
audience_and_roles?: string;
|
|
1042
|
+
/**
|
|
1043
|
+
* End-to-end user flows.
|
|
1044
|
+
*/
|
|
1045
|
+
core_flows?: string[];
|
|
1046
|
+
/**
|
|
1047
|
+
* Specific technical requirements.
|
|
1048
|
+
*/
|
|
1049
|
+
technical_requirements?: string;
|
|
1050
|
+
/**
|
|
1051
|
+
* Design preferences.
|
|
1052
|
+
*/
|
|
1053
|
+
design_preferences?: string;
|
|
1054
|
+
/**
|
|
1055
|
+
* Build or plan declaration, when the builder asks for one.
|
|
1056
|
+
*/
|
|
1057
|
+
prd_type?: string;
|
|
1058
|
+
/**
|
|
1059
|
+
* Store platform settled in planning, for e-commerce plans.
|
|
1060
|
+
*/
|
|
1061
|
+
store_platform?: string;
|
|
1062
|
+
/**
|
|
1063
|
+
* Engine settled in planning, for game plans.
|
|
1064
|
+
*/
|
|
1065
|
+
game_engine?: string;
|
|
1066
|
+
}
|
|
1067
|
+
/**
|
|
1068
|
+
* The AI generates a video for the app.
|
|
1069
|
+
*/
|
|
1070
|
+
export interface GenerateVideoCall {
|
|
1071
|
+
/**
|
|
1072
|
+
* The tool that was called.
|
|
1073
|
+
*/
|
|
1074
|
+
name: "generate_video";
|
|
1075
|
+
/**
|
|
1076
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
1077
|
+
*/
|
|
1078
|
+
id?: string | null;
|
|
1079
|
+
/**
|
|
1080
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
1081
|
+
*/
|
|
1082
|
+
requires_user_input?: boolean | null;
|
|
1083
|
+
/**
|
|
1084
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
1085
|
+
*/
|
|
1086
|
+
auto_approved?: boolean | null;
|
|
1087
|
+
/**
|
|
1088
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
1089
|
+
*/
|
|
1090
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
1091
|
+
/**
|
|
1092
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
1093
|
+
*/
|
|
1094
|
+
mutation_applied?: boolean | null;
|
|
1095
|
+
/**
|
|
1096
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
1097
|
+
*/
|
|
1098
|
+
waiting_on?: WaitingOn | null;
|
|
1099
|
+
/**
|
|
1100
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
1101
|
+
*/
|
|
1102
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
1103
|
+
/**
|
|
1104
|
+
* What the AI asked the tool to do, narrowed to what this tool publishes.
|
|
1105
|
+
*/
|
|
1106
|
+
arguments?: MediaArguments | null;
|
|
1107
|
+
/**
|
|
1108
|
+
* The tool's result, narrowed to what this tool publishes. Absent while the call waits for approval.
|
|
1109
|
+
*/
|
|
1110
|
+
results?: string | null;
|
|
1111
|
+
}
|
|
1112
|
+
/**
|
|
1113
|
+
* The AI installs or removes npm packages in the app.
|
|
1114
|
+
*/
|
|
1115
|
+
export interface InstallNpmPackageCall {
|
|
1116
|
+
/**
|
|
1117
|
+
* The tool that was called.
|
|
1118
|
+
*/
|
|
1119
|
+
name: "install_npm_package";
|
|
1120
|
+
/**
|
|
1121
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
1122
|
+
*/
|
|
1123
|
+
id?: string | null;
|
|
1124
|
+
/**
|
|
1125
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
1126
|
+
*/
|
|
1127
|
+
requires_user_input?: boolean | null;
|
|
1128
|
+
/**
|
|
1129
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
1130
|
+
*/
|
|
1131
|
+
auto_approved?: boolean | null;
|
|
1132
|
+
/**
|
|
1133
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
1134
|
+
*/
|
|
1135
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
1136
|
+
/**
|
|
1137
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
1138
|
+
*/
|
|
1139
|
+
mutation_applied?: boolean | null;
|
|
1140
|
+
/**
|
|
1141
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
1142
|
+
*/
|
|
1143
|
+
waiting_on?: WaitingOn | null;
|
|
1144
|
+
/**
|
|
1145
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
1146
|
+
*/
|
|
1147
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
1148
|
+
/**
|
|
1149
|
+
* What the AI asked the tool to do, narrowed to what this tool publishes.
|
|
1150
|
+
*/
|
|
1151
|
+
arguments?: InstallPackageArguments | null;
|
|
1152
|
+
}
|
|
1153
|
+
/**
|
|
1154
|
+
* The package operations the builder runs.
|
|
1155
|
+
*/
|
|
1156
|
+
export interface InstallPackageArguments {
|
|
1157
|
+
/**
|
|
1158
|
+
* Requested package operations.
|
|
1159
|
+
*/
|
|
1160
|
+
packages?: PackageOperation[];
|
|
1161
|
+
}
|
|
1162
|
+
/**
|
|
1163
|
+
* A package operation. Versions and package-manager output are never included.
|
|
1164
|
+
*/
|
|
1165
|
+
export interface PackageOperation {
|
|
1166
|
+
/**
|
|
1167
|
+
* Package name.
|
|
1168
|
+
*/
|
|
1169
|
+
name?: string;
|
|
1170
|
+
/**
|
|
1171
|
+
* Requested operation, such as `install`.
|
|
1172
|
+
*/
|
|
1173
|
+
action?: string;
|
|
1174
|
+
}
|
|
1175
|
+
/**
|
|
1176
|
+
* The AI runs code inside the app preview to inspect it.
|
|
1177
|
+
*/
|
|
1178
|
+
export interface PreviewExecuteCodeCall {
|
|
1179
|
+
/**
|
|
1180
|
+
* The tool that was called.
|
|
1181
|
+
*/
|
|
1182
|
+
name: "preview_execute_code";
|
|
1183
|
+
/**
|
|
1184
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
1185
|
+
*/
|
|
1186
|
+
id?: string | null;
|
|
1187
|
+
/**
|
|
1188
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
1189
|
+
*/
|
|
1190
|
+
requires_user_input?: boolean | null;
|
|
1191
|
+
/**
|
|
1192
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
1193
|
+
*/
|
|
1194
|
+
auto_approved?: boolean | null;
|
|
1195
|
+
/**
|
|
1196
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
1197
|
+
*/
|
|
1198
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
1199
|
+
/**
|
|
1200
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
1201
|
+
*/
|
|
1202
|
+
mutation_applied?: boolean | null;
|
|
1203
|
+
/**
|
|
1204
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
1205
|
+
*/
|
|
1206
|
+
waiting_on?: WaitingOn | null;
|
|
1207
|
+
/**
|
|
1208
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
1209
|
+
*/
|
|
1210
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
1211
|
+
/**
|
|
1212
|
+
* What the tool touched, for showing its progress. Never file contents or commands.
|
|
1213
|
+
*/
|
|
1214
|
+
display?: ExecDisplay | null;
|
|
1215
|
+
}
|
|
1216
|
+
/**
|
|
1217
|
+
* The AI takes a screenshot of the app preview to check its work.
|
|
1218
|
+
*/
|
|
1219
|
+
export interface PreviewScreenshotCall {
|
|
1220
|
+
/**
|
|
1221
|
+
* The tool that was called.
|
|
1222
|
+
*/
|
|
1223
|
+
name: "preview_screenshot";
|
|
1224
|
+
/**
|
|
1225
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
1226
|
+
*/
|
|
1227
|
+
id?: string | null;
|
|
1228
|
+
/**
|
|
1229
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
1230
|
+
*/
|
|
1231
|
+
requires_user_input?: boolean | null;
|
|
1232
|
+
/**
|
|
1233
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
1234
|
+
*/
|
|
1235
|
+
auto_approved?: boolean | null;
|
|
1236
|
+
/**
|
|
1237
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
1238
|
+
*/
|
|
1239
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
1240
|
+
/**
|
|
1241
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
1242
|
+
*/
|
|
1243
|
+
mutation_applied?: boolean | null;
|
|
1244
|
+
/**
|
|
1245
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
1246
|
+
*/
|
|
1247
|
+
waiting_on?: WaitingOn | null;
|
|
1248
|
+
/**
|
|
1249
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
1250
|
+
*/
|
|
1251
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
1252
|
+
/**
|
|
1253
|
+
* What the tool touched, for showing its progress. Never file contents or commands.
|
|
1254
|
+
*/
|
|
1255
|
+
display?: SummaryDisplay | null;
|
|
1256
|
+
}
|
|
1257
|
+
/**
|
|
1258
|
+
* The AI runs code that only reads the app's data.
|
|
1259
|
+
*/
|
|
1260
|
+
export interface ReadOnlyExecToolCall {
|
|
1261
|
+
/**
|
|
1262
|
+
* The tool that was called.
|
|
1263
|
+
*/
|
|
1264
|
+
name: "read_only_exec_tool";
|
|
1265
|
+
/**
|
|
1266
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
1267
|
+
*/
|
|
1268
|
+
id?: string | null;
|
|
1269
|
+
/**
|
|
1270
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
1271
|
+
*/
|
|
1272
|
+
requires_user_input?: boolean | null;
|
|
1273
|
+
/**
|
|
1274
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
1275
|
+
*/
|
|
1276
|
+
auto_approved?: boolean | null;
|
|
1277
|
+
/**
|
|
1278
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
1279
|
+
*/
|
|
1280
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
1281
|
+
/**
|
|
1282
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
1283
|
+
*/
|
|
1284
|
+
mutation_applied?: boolean | null;
|
|
1285
|
+
/**
|
|
1286
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
1287
|
+
*/
|
|
1288
|
+
waiting_on?: WaitingOn | null;
|
|
1289
|
+
/**
|
|
1290
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
1291
|
+
*/
|
|
1292
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
1293
|
+
/**
|
|
1294
|
+
* What the tool touched, for showing its progress. Never file contents or commands.
|
|
1295
|
+
*/
|
|
1296
|
+
display?: ExecDisplay | null;
|
|
1297
|
+
}
|
|
1298
|
+
/**
|
|
1299
|
+
* The AI reads a file in the imported repository.
|
|
1300
|
+
*/
|
|
1301
|
+
export interface ReadRepoFileCall {
|
|
1302
|
+
/**
|
|
1303
|
+
* The tool that was called.
|
|
1304
|
+
*/
|
|
1305
|
+
name: "read_repo_file";
|
|
1306
|
+
/**
|
|
1307
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
1308
|
+
*/
|
|
1309
|
+
id?: string | null;
|
|
1310
|
+
/**
|
|
1311
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
1312
|
+
*/
|
|
1313
|
+
requires_user_input?: boolean | null;
|
|
1314
|
+
/**
|
|
1315
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
1316
|
+
*/
|
|
1317
|
+
auto_approved?: boolean | null;
|
|
1318
|
+
/**
|
|
1319
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
1320
|
+
*/
|
|
1321
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
1322
|
+
/**
|
|
1323
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
1324
|
+
*/
|
|
1325
|
+
mutation_applied?: boolean | null;
|
|
1326
|
+
/**
|
|
1327
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
1328
|
+
*/
|
|
1329
|
+
waiting_on?: WaitingOn | null;
|
|
1330
|
+
/**
|
|
1331
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
1332
|
+
*/
|
|
1333
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
1334
|
+
/**
|
|
1335
|
+
* What the tool touched, for showing its progress. Never file contents or commands.
|
|
1336
|
+
*/
|
|
1337
|
+
display?: FileDisplay | null;
|
|
1338
|
+
}
|
|
1339
|
+
/**
|
|
1340
|
+
* The AI runs a shell command in the imported repository's sandbox.
|
|
1341
|
+
*/
|
|
1342
|
+
export interface RunShellCommandCall {
|
|
1343
|
+
/**
|
|
1344
|
+
* The tool that was called.
|
|
1345
|
+
*/
|
|
1346
|
+
name: "run_shell_command";
|
|
1347
|
+
/**
|
|
1348
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
1349
|
+
*/
|
|
1350
|
+
id?: string | null;
|
|
1351
|
+
/**
|
|
1352
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
1353
|
+
*/
|
|
1354
|
+
requires_user_input?: boolean | null;
|
|
1355
|
+
/**
|
|
1356
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
1357
|
+
*/
|
|
1358
|
+
auto_approved?: boolean | null;
|
|
1359
|
+
/**
|
|
1360
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
1361
|
+
*/
|
|
1362
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
1363
|
+
/**
|
|
1364
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
1365
|
+
*/
|
|
1366
|
+
mutation_applied?: boolean | null;
|
|
1367
|
+
/**
|
|
1368
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
1369
|
+
*/
|
|
1370
|
+
waiting_on?: WaitingOn | null;
|
|
1371
|
+
/**
|
|
1372
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
1373
|
+
*/
|
|
1374
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
1375
|
+
/**
|
|
1376
|
+
* What the tool touched, for showing its progress. Never file contents or commands.
|
|
1377
|
+
*/
|
|
1378
|
+
display?: SummaryDisplay | null;
|
|
1379
|
+
}
|
|
1380
|
+
/**
|
|
1381
|
+
* The AI asks the user for secret values, such as API keys. The call waits until the user supplies them.
|
|
1382
|
+
*/
|
|
1383
|
+
export interface SetSecretsCall {
|
|
1384
|
+
/**
|
|
1385
|
+
* The tool that was called.
|
|
1386
|
+
*/
|
|
1387
|
+
name: "set_secrets";
|
|
1388
|
+
/**
|
|
1389
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
1390
|
+
*/
|
|
1391
|
+
id?: string | null;
|
|
1392
|
+
/**
|
|
1393
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
1394
|
+
*/
|
|
1395
|
+
requires_user_input?: boolean | null;
|
|
1396
|
+
/**
|
|
1397
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
1398
|
+
*/
|
|
1399
|
+
auto_approved?: boolean | null;
|
|
1400
|
+
/**
|
|
1401
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
1402
|
+
*/
|
|
1403
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
1404
|
+
/**
|
|
1405
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
1406
|
+
*/
|
|
1407
|
+
mutation_applied?: boolean | null;
|
|
1408
|
+
/**
|
|
1409
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
1410
|
+
*/
|
|
1411
|
+
waiting_on?: WaitingOn | null;
|
|
1412
|
+
/**
|
|
1413
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
1414
|
+
*/
|
|
1415
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
1416
|
+
/**
|
|
1417
|
+
* What the AI asked the tool to do, narrowed to what this tool publishes.
|
|
1418
|
+
*/
|
|
1419
|
+
arguments?: SetSecretsArguments | null;
|
|
1420
|
+
}
|
|
1421
|
+
/**
|
|
1422
|
+
* The secrets the builder asks for.
|
|
1423
|
+
*/
|
|
1424
|
+
export interface SetSecretsArguments {
|
|
1425
|
+
/**
|
|
1426
|
+
* Requested secrets.
|
|
1427
|
+
*/
|
|
1428
|
+
secrets_schema?: SecretField[];
|
|
1429
|
+
}
|
|
1430
|
+
/**
|
|
1431
|
+
* A requested secret. Its value is never sent over the socket.
|
|
1432
|
+
*/
|
|
1433
|
+
export interface SecretField {
|
|
1434
|
+
/**
|
|
1435
|
+
* Requested secret name.
|
|
1436
|
+
*/
|
|
1437
|
+
secretName?: string;
|
|
1438
|
+
/**
|
|
1439
|
+
* Where to obtain it.
|
|
1440
|
+
*/
|
|
1441
|
+
description?: string;
|
|
1442
|
+
}
|
|
1443
|
+
/**
|
|
1444
|
+
* The AI updates records in one of the app's entities.
|
|
1445
|
+
*/
|
|
1446
|
+
export interface UpdateEntitiesCall {
|
|
1447
|
+
/**
|
|
1448
|
+
* The tool that was called.
|
|
1449
|
+
*/
|
|
1450
|
+
name: "update_entities";
|
|
1451
|
+
/**
|
|
1452
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
1453
|
+
*/
|
|
1454
|
+
id?: string | null;
|
|
1455
|
+
/**
|
|
1456
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
1457
|
+
*/
|
|
1458
|
+
requires_user_input?: boolean | null;
|
|
1459
|
+
/**
|
|
1460
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
1461
|
+
*/
|
|
1462
|
+
auto_approved?: boolean | null;
|
|
1463
|
+
/**
|
|
1464
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
1465
|
+
*/
|
|
1466
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
1467
|
+
/**
|
|
1468
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
1469
|
+
*/
|
|
1470
|
+
mutation_applied?: boolean | null;
|
|
1471
|
+
/**
|
|
1472
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
1473
|
+
*/
|
|
1474
|
+
waiting_on?: WaitingOn | null;
|
|
1475
|
+
/**
|
|
1476
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
1477
|
+
*/
|
|
1478
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
1479
|
+
/**
|
|
1480
|
+
* What the AI asked the tool to do, narrowed to what this tool publishes.
|
|
1481
|
+
*/
|
|
1482
|
+
arguments?: EntityChangeArguments | null;
|
|
1483
|
+
/**
|
|
1484
|
+
* What the tool touched, for showing its progress. Never file contents or commands.
|
|
1485
|
+
*/
|
|
1486
|
+
display?: EntityDisplay | null;
|
|
1487
|
+
}
|
|
1488
|
+
/**
|
|
1489
|
+
* The AI adds settled points to the plan.
|
|
1490
|
+
*/
|
|
1491
|
+
export interface UpdatePlanCall {
|
|
1492
|
+
/**
|
|
1493
|
+
* The tool that was called.
|
|
1494
|
+
*/
|
|
1495
|
+
name: "update_plan";
|
|
1496
|
+
/**
|
|
1497
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
1498
|
+
*/
|
|
1499
|
+
id?: string | null;
|
|
1500
|
+
/**
|
|
1501
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
1502
|
+
*/
|
|
1503
|
+
requires_user_input?: boolean | null;
|
|
1504
|
+
/**
|
|
1505
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
1506
|
+
*/
|
|
1507
|
+
auto_approved?: boolean | null;
|
|
1508
|
+
/**
|
|
1509
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
1510
|
+
*/
|
|
1511
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
1512
|
+
/**
|
|
1513
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
1514
|
+
*/
|
|
1515
|
+
mutation_applied?: boolean | null;
|
|
1516
|
+
/**
|
|
1517
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
1518
|
+
*/
|
|
1519
|
+
waiting_on?: WaitingOn | null;
|
|
1520
|
+
/**
|
|
1521
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
1522
|
+
*/
|
|
1523
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
1524
|
+
/**
|
|
1525
|
+
* What the AI asked the tool to do, narrowed to what this tool publishes.
|
|
1526
|
+
*/
|
|
1527
|
+
arguments?: UpdatePlanArguments | null;
|
|
1528
|
+
}
|
|
1529
|
+
/**
|
|
1530
|
+
* Settled plan points.
|
|
1531
|
+
*/
|
|
1532
|
+
export interface UpdatePlanArguments {
|
|
1533
|
+
/**
|
|
1534
|
+
* Plan updates in their emitted order.
|
|
1535
|
+
*/
|
|
1536
|
+
updates?: PlanUpdate[];
|
|
1537
|
+
/**
|
|
1538
|
+
* Base plan sections the builder considers sufficiently specified.
|
|
1539
|
+
*/
|
|
1540
|
+
sections_with_enough?: string[];
|
|
1541
|
+
}
|
|
1542
|
+
/**
|
|
1543
|
+
* An add-only plan update.
|
|
1544
|
+
*/
|
|
1545
|
+
export interface PlanUpdate {
|
|
1546
|
+
/**
|
|
1547
|
+
* Update action.
|
|
1548
|
+
*/
|
|
1549
|
+
action?: string;
|
|
1550
|
+
/**
|
|
1551
|
+
* Plan section key.
|
|
1552
|
+
*/
|
|
1553
|
+
section?: string;
|
|
1554
|
+
/**
|
|
1555
|
+
* User-facing section label.
|
|
1556
|
+
*/
|
|
1557
|
+
section_label?: string;
|
|
1558
|
+
/**
|
|
1559
|
+
* Plan point.
|
|
1560
|
+
*/
|
|
1561
|
+
text?: string;
|
|
1562
|
+
}
|
|
1563
|
+
/**
|
|
1564
|
+
* The AI writes a file in the app.
|
|
1565
|
+
*/
|
|
1566
|
+
export interface WriteFileCall {
|
|
1567
|
+
/**
|
|
1568
|
+
* The tool that was called.
|
|
1569
|
+
*/
|
|
1570
|
+
name: "write_file";
|
|
1571
|
+
/**
|
|
1572
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
1573
|
+
*/
|
|
1574
|
+
id?: string | null;
|
|
1575
|
+
/**
|
|
1576
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
1577
|
+
*/
|
|
1578
|
+
requires_user_input?: boolean | null;
|
|
1579
|
+
/**
|
|
1580
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
1581
|
+
*/
|
|
1582
|
+
auto_approved?: boolean | null;
|
|
1583
|
+
/**
|
|
1584
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
1585
|
+
*/
|
|
1586
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
1587
|
+
/**
|
|
1588
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
1589
|
+
*/
|
|
1590
|
+
mutation_applied?: boolean | null;
|
|
1591
|
+
/**
|
|
1592
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
1593
|
+
*/
|
|
1594
|
+
waiting_on?: WaitingOn | null;
|
|
1595
|
+
/**
|
|
1596
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
1597
|
+
*/
|
|
1598
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
1599
|
+
/**
|
|
1600
|
+
* What the tool touched, for showing its progress. Never file contents or commands.
|
|
1601
|
+
*/
|
|
1602
|
+
display?: FileDisplay | null;
|
|
1603
|
+
}
|
|
1604
|
+
/**
|
|
1605
|
+
* The AI writes a file in the imported repository.
|
|
1606
|
+
*/
|
|
1607
|
+
export interface WriteRepoFileCall {
|
|
1608
|
+
/**
|
|
1609
|
+
* The tool that was called.
|
|
1610
|
+
*/
|
|
1611
|
+
name: "write_repo_file";
|
|
1612
|
+
/**
|
|
1613
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
1614
|
+
*/
|
|
1615
|
+
id?: string | null;
|
|
1616
|
+
/**
|
|
1617
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
1618
|
+
*/
|
|
1619
|
+
requires_user_input?: boolean | null;
|
|
1620
|
+
/**
|
|
1621
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
1622
|
+
*/
|
|
1623
|
+
auto_approved?: boolean | null;
|
|
1624
|
+
/**
|
|
1625
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
1626
|
+
*/
|
|
1627
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
1628
|
+
/**
|
|
1629
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
1630
|
+
*/
|
|
1631
|
+
mutation_applied?: boolean | null;
|
|
1632
|
+
/**
|
|
1633
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
1634
|
+
*/
|
|
1635
|
+
waiting_on?: WaitingOn | null;
|
|
1636
|
+
/**
|
|
1637
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
1638
|
+
*/
|
|
1639
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
1640
|
+
/**
|
|
1641
|
+
* What the tool touched, for showing its progress. Never file contents or commands.
|
|
1642
|
+
*/
|
|
1643
|
+
display?: FileDisplay | null;
|
|
1644
|
+
}
|
|
1645
|
+
/**
|
|
1646
|
+
* A call to any other tool. Only its name and progress are published.
|
|
1647
|
+
*/
|
|
1648
|
+
export interface OtherToolCall {
|
|
1649
|
+
/**
|
|
1650
|
+
* The tool that was called.
|
|
1651
|
+
*/
|
|
1652
|
+
name: string;
|
|
1653
|
+
/**
|
|
1654
|
+
* ID of the call. Every update to the call carries the same ID.
|
|
1655
|
+
*/
|
|
1656
|
+
id?: string | null;
|
|
1657
|
+
/**
|
|
1658
|
+
* `true` once the call has paused for the user's answer or approval. It stays `true` after the user answers, so read `status` to know whether the call is still waiting.
|
|
1659
|
+
*/
|
|
1660
|
+
requires_user_input?: boolean | null;
|
|
1661
|
+
/**
|
|
1662
|
+
* `true` when the call needed approval but ran at once because the app has Auto approve on. It never paused, and its result is real.
|
|
1663
|
+
*/
|
|
1664
|
+
auto_approved?: boolean | null;
|
|
1665
|
+
/**
|
|
1666
|
+
* `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, and `waiting_for_user_input` while it waits for the user's answer or approval.
|
|
1667
|
+
*/
|
|
1668
|
+
status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
|
|
1669
|
+
/**
|
|
1670
|
+
* Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
|
|
1671
|
+
*/
|
|
1672
|
+
mutation_applied?: boolean | null;
|
|
1673
|
+
/**
|
|
1674
|
+
* What kind of answer the call waits for, while `status` is `waiting_for_user_input`.
|
|
1675
|
+
*/
|
|
1676
|
+
waiting_on?: WaitingOn | null;
|
|
1677
|
+
/**
|
|
1678
|
+
* Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.
|
|
1679
|
+
*/
|
|
1680
|
+
approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
|
|
1681
|
+
}
|
|
1682
|
+
/**
|
|
1683
|
+
* Message timestamp, without author identity.
|
|
1684
|
+
*/
|
|
1685
|
+
export interface MessageMetadata {
|
|
1686
|
+
/**
|
|
1687
|
+
* Time the message was created, as a UTC timestamp in ISO 8601 format.
|
|
1688
|
+
*/
|
|
1689
|
+
created_date?: string | null;
|
|
1690
|
+
}
|
|
1691
|
+
/**
|
|
1692
|
+
* Scalar parameters a chat UI needs while a turn runs.
|
|
1693
|
+
*/
|
|
1694
|
+
export interface MessageParams {
|
|
1695
|
+
/**
|
|
1696
|
+
* Identifier the sending client attached, to match its optimistic message.
|
|
1697
|
+
*/
|
|
1698
|
+
client_creation_id?: string;
|
|
1699
|
+
/**
|
|
1700
|
+
* The message was sent in plan mode.
|
|
1701
|
+
*/
|
|
1702
|
+
plan_mode?: boolean;
|
|
1703
|
+
/**
|
|
1704
|
+
* The message approves a plan.
|
|
1705
|
+
*/
|
|
1706
|
+
plan_approved?: boolean;
|
|
1707
|
+
/**
|
|
1708
|
+
* The message expects no AI reply.
|
|
1709
|
+
*/
|
|
1710
|
+
skip_ai_response?: boolean;
|
|
1711
|
+
/**
|
|
1712
|
+
* System message category.
|
|
1713
|
+
*/
|
|
1714
|
+
system_message_type?: string;
|
|
1715
|
+
}
|
|
1716
|
+
/**
|
|
1717
|
+
* The prompts the builder runs next, in order.
|
|
1718
|
+
*/
|
|
1719
|
+
export interface QueueState {
|
|
1720
|
+
/**
|
|
1721
|
+
* Queued prompts, in the order they will run.
|
|
1722
|
+
*/
|
|
1723
|
+
items?: QueueItem[] | null;
|
|
1724
|
+
/**
|
|
1725
|
+
* Whether the queue is paused, so queued prompts wait. A person can pause it, and the builder pauses it while the AI waits for an answer.
|
|
1726
|
+
*/
|
|
1727
|
+
is_paused?: boolean | null;
|
|
1728
|
+
}
|
|
1729
|
+
/**
|
|
1730
|
+
* A prompt waiting in the queue.
|
|
1731
|
+
*/
|
|
1732
|
+
export interface QueueItem {
|
|
1733
|
+
/**
|
|
1734
|
+
* ID of the queued prompt.
|
|
1735
|
+
*/
|
|
1736
|
+
id?: string | null;
|
|
1737
|
+
/**
|
|
1738
|
+
* Text of the prompt.
|
|
1739
|
+
*/
|
|
1740
|
+
content?: string | null;
|
|
1741
|
+
/**
|
|
1742
|
+
* ID of the branch the prompt runs on, or `null` for the main branch.
|
|
1743
|
+
*/
|
|
1744
|
+
branch_id?: string | null;
|
|
1745
|
+
/**
|
|
1746
|
+
* Time the prompt was queued, as a UTC timestamp in ISO 8601 format.
|
|
1747
|
+
*/
|
|
1748
|
+
created_at?: string | null;
|
|
1749
|
+
}
|
|
1750
|
+
/**
|
|
1751
|
+
* The app's build status changed, because a turn started, finished or failed.
|
|
1752
|
+
*/
|
|
1753
|
+
export interface AppStatusChanged {
|
|
1754
|
+
/**
|
|
1755
|
+
* The new status, or `null` when the status was cleared.
|
|
1756
|
+
*/
|
|
1757
|
+
status: StatusObject | null;
|
|
1758
|
+
/**
|
|
1759
|
+
* ID of the branch the change belongs to. Omitted or `null` means the main branch.
|
|
1760
|
+
*/
|
|
1761
|
+
branch_id?: string | null;
|
|
1762
|
+
}
|
|
1763
|
+
/**
|
|
1764
|
+
* The builder started, finished or failed a turn. Null status clears it.
|
|
1765
|
+
*/
|
|
1766
|
+
export interface AppStatusChangedEvent {
|
|
1767
|
+
/**
|
|
1768
|
+
* The app the event belongs to, as `/apps/{app_id}`. It is `null` for `session.ended`, which concerns the whole session.
|
|
1769
|
+
*/
|
|
1770
|
+
room: string | null;
|
|
1771
|
+
/**
|
|
1772
|
+
* The event's payload. Its fields depend on the event.
|
|
1773
|
+
*/
|
|
1774
|
+
data: AppStatusChanged;
|
|
1775
|
+
}
|
|
1776
|
+
/**
|
|
1777
|
+
* Something changed outside the chat. Re-read it, because the event carries no content.
|
|
1778
|
+
*/
|
|
1779
|
+
export interface BranchChange {
|
|
1780
|
+
/**
|
|
1781
|
+
* ID of the branch the change belongs to. Omitted or `null` means the main branch.
|
|
1782
|
+
*/
|
|
1783
|
+
branch_id?: string | null;
|
|
1784
|
+
}
|
|
1785
|
+
/**
|
|
1786
|
+
* A branch was deleted.
|
|
1787
|
+
*/
|
|
1788
|
+
export interface BranchDeletedEvent {
|
|
1789
|
+
/**
|
|
1790
|
+
* The app the event belongs to, as `/apps/{app_id}`. It is `null` for `session.ended`, which concerns the whole session.
|
|
1791
|
+
*/
|
|
1792
|
+
room: string | null;
|
|
1793
|
+
/**
|
|
1794
|
+
* The event's payload. Its fields depend on the event.
|
|
1795
|
+
*/
|
|
1796
|
+
data: BranchChange;
|
|
1797
|
+
}
|
|
1798
|
+
/**
|
|
1799
|
+
* The conversation was rewritten (undo, restore, sync). Rejoin the room for a fresh snapshot.
|
|
1800
|
+
*/
|
|
1801
|
+
export interface ConversationChangedEvent {
|
|
1802
|
+
/**
|
|
1803
|
+
* The app the event belongs to, as `/apps/{app_id}`. It is `null` for `session.ended`, which concerns the whole session.
|
|
1804
|
+
*/
|
|
1805
|
+
room: string | null;
|
|
1806
|
+
/**
|
|
1807
|
+
* The event's payload. Its fields depend on the event.
|
|
1808
|
+
*/
|
|
1809
|
+
data: BranchChange;
|
|
1810
|
+
}
|
|
1811
|
+
/**
|
|
1812
|
+
* The app's files changed outside a chat turn.
|
|
1813
|
+
*/
|
|
1814
|
+
export interface FilesChangedEvent {
|
|
1815
|
+
/**
|
|
1816
|
+
* The app the event belongs to, as `/apps/{app_id}`. It is `null` for `session.ended`, which concerns the whole session.
|
|
1817
|
+
*/
|
|
1818
|
+
room: string | null;
|
|
1819
|
+
/**
|
|
1820
|
+
* The event's payload. Its fields depend on the event.
|
|
1821
|
+
*/
|
|
1822
|
+
data: BranchChange;
|
|
1823
|
+
}
|
|
1824
|
+
/**
|
|
1825
|
+
* A generated image finished or failed. Replace `placeholder_url` with `image_url` wherever the app shows it.
|
|
1826
|
+
*/
|
|
1827
|
+
export interface ImageResolved {
|
|
1828
|
+
/**
|
|
1829
|
+
* `pending` while the image generates, `completed` once `image_url` is ready, `failed` when generation failed.
|
|
1830
|
+
*/
|
|
1831
|
+
status?: ("pending" | "completed" | "failed") | null;
|
|
1832
|
+
/**
|
|
1833
|
+
* Placeholder URL the app shows while the image generates. Match it to find where the image appears.
|
|
1834
|
+
*/
|
|
1835
|
+
placeholder_url?: string | null;
|
|
1836
|
+
/**
|
|
1837
|
+
* URL of the finished image, or `null` while it is pending or after it failed.
|
|
1838
|
+
*/
|
|
1839
|
+
image_url?: string | null;
|
|
1840
|
+
}
|
|
1841
|
+
/**
|
|
1842
|
+
* A generated image finished or failed. Replace its `placeholder_url` wherever it appears.
|
|
1843
|
+
*/
|
|
1844
|
+
export interface ImageResolvedEvent {
|
|
1845
|
+
/**
|
|
1846
|
+
* The app the event belongs to, as `/apps/{app_id}`. It is `null` for `session.ended`, which concerns the whole session.
|
|
1847
|
+
*/
|
|
1848
|
+
room: string | null;
|
|
1849
|
+
/**
|
|
1850
|
+
* The event's payload. Its fields depend on the event.
|
|
1851
|
+
*/
|
|
1852
|
+
data: ImageResolved;
|
|
1853
|
+
}
|
|
1854
|
+
/**
|
|
1855
|
+
* A chat message was removed or hidden. Drop the message with `message_id`.
|
|
1856
|
+
*/
|
|
1857
|
+
export interface MessageRemoved {
|
|
1858
|
+
/**
|
|
1859
|
+
* ID of the removed message.
|
|
1860
|
+
*/
|
|
1861
|
+
message_id: string;
|
|
1862
|
+
/**
|
|
1863
|
+
* ID of the conversation the message belongs to. Each branch has its own conversation, so a viewer showing one branch can drop another branch's messages.
|
|
1864
|
+
*/
|
|
1865
|
+
conversation_id?: string | null;
|
|
1866
|
+
/**
|
|
1867
|
+
* ID of the branch the change belongs to. Omitted or `null` means the main branch.
|
|
1868
|
+
*/
|
|
1869
|
+
branch_id?: string | null;
|
|
1870
|
+
}
|
|
1871
|
+
/**
|
|
1872
|
+
* A chat message was removed or hidden. An `id` the viewer never saw is a no-op.
|
|
1873
|
+
*/
|
|
1874
|
+
export interface MessageRemovedEvent {
|
|
1875
|
+
/**
|
|
1876
|
+
* The app the event belongs to, as `/apps/{app_id}`. It is `null` for `session.ended`, which concerns the whole session.
|
|
1877
|
+
*/
|
|
1878
|
+
room: string | null;
|
|
1879
|
+
/**
|
|
1880
|
+
* The event's payload. Its fields depend on the event.
|
|
1881
|
+
*/
|
|
1882
|
+
data: MessageRemoved;
|
|
1883
|
+
}
|
|
1884
|
+
/**
|
|
1885
|
+
* A chat message was added or changed. Replace the message with the same `id`.
|
|
1886
|
+
*/
|
|
1887
|
+
export interface MessageUpdated {
|
|
1888
|
+
/**
|
|
1889
|
+
* The message in full, as it now reads.
|
|
1890
|
+
*/
|
|
1891
|
+
message: Message;
|
|
1892
|
+
/**
|
|
1893
|
+
* ID of the conversation the message belongs to. Each branch has its own conversation, so a viewer showing one branch can drop another branch's messages.
|
|
1894
|
+
*/
|
|
1895
|
+
conversation_id?: string | null;
|
|
1896
|
+
/**
|
|
1897
|
+
* ID of the branch the change belongs to. Omitted or `null` means the main branch.
|
|
1898
|
+
*/
|
|
1899
|
+
branch_id?: string | null;
|
|
1900
|
+
}
|
|
1901
|
+
/**
|
|
1902
|
+
* A chat message was added or replaced. Replace the message with the same `id`.
|
|
1903
|
+
*/
|
|
1904
|
+
export interface MessageUpdatedEvent {
|
|
1905
|
+
/**
|
|
1906
|
+
* The app the event belongs to, as `/apps/{app_id}`. It is `null` for `session.ended`, which concerns the whole session.
|
|
1907
|
+
*/
|
|
1908
|
+
room: string | null;
|
|
1909
|
+
/**
|
|
1910
|
+
* The event's payload. Its fields depend on the event.
|
|
1911
|
+
*/
|
|
1912
|
+
data: MessageUpdated;
|
|
1913
|
+
}
|
|
1914
|
+
/**
|
|
1915
|
+
* The app preview should show a page of the app, usually one the AI just built.
|
|
1916
|
+
*/
|
|
1917
|
+
export interface PreviewNavigationRequested {
|
|
1918
|
+
/**
|
|
1919
|
+
* Path of the page to show, relative to the app's root, such as `/settings`.
|
|
1920
|
+
*/
|
|
1921
|
+
path: string;
|
|
1922
|
+
/**
|
|
1923
|
+
* Navigate even when the user has moved away from the page.
|
|
1924
|
+
*/
|
|
1925
|
+
force: boolean;
|
|
1926
|
+
/**
|
|
1927
|
+
* ID of the branch the change belongs to. Omitted or `null` means the main branch.
|
|
1928
|
+
*/
|
|
1929
|
+
branch_id?: string | null;
|
|
1930
|
+
}
|
|
1931
|
+
/**
|
|
1932
|
+
* Show this page of the app in the preview.
|
|
1933
|
+
*/
|
|
1934
|
+
export interface PreviewNavigationRequestedEvent {
|
|
1935
|
+
/**
|
|
1936
|
+
* The app the event belongs to, as `/apps/{app_id}`. It is `null` for `session.ended`, which concerns the whole session.
|
|
1937
|
+
*/
|
|
1938
|
+
room: string | null;
|
|
1939
|
+
/**
|
|
1940
|
+
* The event's payload. Its fields depend on the event.
|
|
1941
|
+
*/
|
|
1942
|
+
data: PreviewNavigationRequested;
|
|
1943
|
+
}
|
|
1944
|
+
/**
|
|
1945
|
+
* The app preview should reload, because its files changed under it.
|
|
1946
|
+
*/
|
|
1947
|
+
export interface PreviewReloadRequested {
|
|
1948
|
+
/**
|
|
1949
|
+
* ID of the branch the change belongs to. Omitted or `null` means the main branch.
|
|
1950
|
+
*/
|
|
1951
|
+
branch_id?: string | null;
|
|
1952
|
+
}
|
|
1953
|
+
/**
|
|
1954
|
+
* Reload the app preview.
|
|
1955
|
+
*/
|
|
1956
|
+
export interface PreviewReloadRequestedEvent {
|
|
1957
|
+
/**
|
|
1958
|
+
* The app the event belongs to, as `/apps/{app_id}`. It is `null` for `session.ended`, which concerns the whole session.
|
|
1959
|
+
*/
|
|
1960
|
+
room: string | null;
|
|
1961
|
+
/**
|
|
1962
|
+
* The event's payload. Its fields depend on the event.
|
|
1963
|
+
*/
|
|
1964
|
+
data: PreviewReloadRequested;
|
|
1965
|
+
}
|
|
1966
|
+
/**
|
|
1967
|
+
* The imported app's pull request changed.
|
|
1968
|
+
*/
|
|
1969
|
+
export interface PullRequestChangedEvent {
|
|
1970
|
+
/**
|
|
1971
|
+
* The app the event belongs to, as `/apps/{app_id}`. It is `null` for `session.ended`, which concerns the whole session.
|
|
1972
|
+
*/
|
|
1973
|
+
room: string | null;
|
|
1974
|
+
/**
|
|
1975
|
+
* The event's payload. Its fields depend on the event.
|
|
1976
|
+
*/
|
|
1977
|
+
data: BranchChange;
|
|
1978
|
+
}
|
|
1979
|
+
/**
|
|
1980
|
+
* The whole prompt queue after a change. Replace the queue with it.
|
|
1981
|
+
*/
|
|
1982
|
+
export interface QueueUpdated {
|
|
1983
|
+
/**
|
|
1984
|
+
* Queued prompts, in the order they will run.
|
|
1985
|
+
*/
|
|
1986
|
+
items?: QueueItem[] | null;
|
|
1987
|
+
/**
|
|
1988
|
+
* Whether the queue is paused, so queued prompts wait. A person can pause it, and the builder pauses it while the AI waits for an answer.
|
|
1989
|
+
*/
|
|
1990
|
+
is_paused?: boolean | null;
|
|
1991
|
+
/**
|
|
1992
|
+
* ID of the queued prompt the builder just picked up to run. Absent when a prompt was added, removed or cleared.
|
|
1993
|
+
*/
|
|
1994
|
+
processed_item_id?: string | null;
|
|
1995
|
+
/**
|
|
1996
|
+
* ID of the branch the change belongs to. Omitted or `null` means the main branch.
|
|
1997
|
+
*/
|
|
1998
|
+
branch_id?: string | null;
|
|
1999
|
+
}
|
|
2000
|
+
/**
|
|
2001
|
+
* The whole prompt queue, after any change.
|
|
2002
|
+
*/
|
|
2003
|
+
export interface QueueUpdatedEvent {
|
|
2004
|
+
/**
|
|
2005
|
+
* The app the event belongs to, as `/apps/{app_id}`. It is `null` for `session.ended`, which concerns the whole session.
|
|
2006
|
+
*/
|
|
2007
|
+
room: string | null;
|
|
2008
|
+
/**
|
|
2009
|
+
* The event's payload. Its fields depend on the event.
|
|
2010
|
+
*/
|
|
2011
|
+
data: QueueUpdated;
|
|
2012
|
+
}
|
|
2013
|
+
/**
|
|
2014
|
+
* The imported app's repository changed.
|
|
2015
|
+
*/
|
|
2016
|
+
export interface RepositoryChangedEvent {
|
|
2017
|
+
/**
|
|
2018
|
+
* The app the event belongs to, as `/apps/{app_id}`. It is `null` for `session.ended`, which concerns the whole session.
|
|
2019
|
+
*/
|
|
2020
|
+
room: string | null;
|
|
2021
|
+
/**
|
|
2022
|
+
* The event's payload. Its fields depend on the event.
|
|
2023
|
+
*/
|
|
2024
|
+
data: BranchChange;
|
|
2025
|
+
}
|
|
2026
|
+
/**
|
|
2027
|
+
* A join was refused because the app is not on the session's allowlist, or the socket joins too often.
|
|
2028
|
+
*/
|
|
2029
|
+
export interface RoomAccessDeniedEvent {
|
|
2030
|
+
/**
|
|
2031
|
+
* The app the event belongs to, as `/apps/{app_id}`. It is `null` for `session.ended`, which concerns the whole session.
|
|
2032
|
+
*/
|
|
2033
|
+
room: string | null;
|
|
2034
|
+
/**
|
|
2035
|
+
* The event's payload. Its fields depend on the event.
|
|
2036
|
+
*/
|
|
2037
|
+
data: RoomNotice;
|
|
2038
|
+
}
|
|
2039
|
+
/**
|
|
2040
|
+
* An empty payload. The app concerned is the event's `room`.
|
|
2041
|
+
*/
|
|
2042
|
+
export interface RoomNotice {
|
|
2043
|
+
}
|
|
2044
|
+
/**
|
|
2045
|
+
* The app left the session's allowlist, or its workspace. Events for it stop. Do not rejoin.
|
|
2046
|
+
*/
|
|
2047
|
+
export interface RoomAccessRevokedEvent {
|
|
2048
|
+
/**
|
|
2049
|
+
* The app the event belongs to, as `/apps/{app_id}`. It is `null` for `session.ended`, which concerns the whole session.
|
|
2050
|
+
*/
|
|
2051
|
+
room: string | null;
|
|
2052
|
+
/**
|
|
2053
|
+
* The event's payload. Its fields depend on the event.
|
|
2054
|
+
*/
|
|
2055
|
+
data: RoomNotice;
|
|
2056
|
+
}
|
|
2057
|
+
/**
|
|
2058
|
+
* The join held but its snapshot failed. Live events still arrive. Rejoin later for a snapshot.
|
|
2059
|
+
*/
|
|
2060
|
+
export interface RoomSnapshotUnavailableEvent {
|
|
2061
|
+
/**
|
|
2062
|
+
* The app the event belongs to, as `/apps/{app_id}`. It is `null` for `session.ended`, which concerns the whole session.
|
|
2063
|
+
*/
|
|
2064
|
+
room: string | null;
|
|
2065
|
+
/**
|
|
2066
|
+
* The event's payload. Its fields depend on the event.
|
|
2067
|
+
*/
|
|
2068
|
+
data: RoomNotice;
|
|
2069
|
+
}
|
|
2070
|
+
/**
|
|
2071
|
+
* The session is over. The socket disconnects right after this event.
|
|
2072
|
+
*/
|
|
2073
|
+
export interface SessionEnded {
|
|
2074
|
+
/**
|
|
2075
|
+
* `expired`: ask the partner backend for a new session. `revoked`: the partner or an admin ended it, so do not reconnect. `replaced`: a newer socket took the session, so stop.
|
|
2076
|
+
*/
|
|
2077
|
+
reason: "expired" | "revoked" | "replaced";
|
|
2078
|
+
}
|
|
2079
|
+
/**
|
|
2080
|
+
* The session ended (expired, revoked, or taken by a newer socket). The socket disconnects next.
|
|
2081
|
+
*/
|
|
2082
|
+
export interface SessionEndedEvent {
|
|
2083
|
+
/**
|
|
2084
|
+
* The app the event belongs to, as `/apps/{app_id}`. It is `null` for `session.ended`, which concerns the whole session.
|
|
2085
|
+
*/
|
|
2086
|
+
room: string | null;
|
|
2087
|
+
/**
|
|
2088
|
+
* The event's payload. Its fields depend on the event.
|
|
2089
|
+
*/
|
|
2090
|
+
data: SessionEnded;
|
|
2091
|
+
}
|
|
2092
|
+
/**
|
|
2093
|
+
* How far a long-running task has got.
|
|
2094
|
+
*/
|
|
2095
|
+
export interface TaskProgress {
|
|
2096
|
+
/**
|
|
2097
|
+
* Items processed so far.
|
|
2098
|
+
*/
|
|
2099
|
+
current?: number | null;
|
|
2100
|
+
/**
|
|
2101
|
+
* Items to process in all.
|
|
2102
|
+
*/
|
|
2103
|
+
total?: number | null;
|
|
2104
|
+
/**
|
|
2105
|
+
* Share of the work done, from 0 to 100.
|
|
2106
|
+
*/
|
|
2107
|
+
percentage?: number | null;
|
|
2108
|
+
}
|
|
2109
|
+
/**
|
|
2110
|
+
* A long-running task, such as a data import, started, made progress, finished, failed or was cancelled.
|
|
2111
|
+
*/
|
|
2112
|
+
export interface TaskProgressed {
|
|
2113
|
+
/**
|
|
2114
|
+
* ID of the tool call that started the task.
|
|
2115
|
+
*/
|
|
2116
|
+
tool_call_id?: string | null;
|
|
2117
|
+
/**
|
|
2118
|
+
* ID of the message that holds that tool call.
|
|
2119
|
+
*/
|
|
2120
|
+
message_id?: string | null;
|
|
2121
|
+
/**
|
|
2122
|
+
* `task_started`, `task_progress`, `task_completed`, `task_failed` or `task_cancelled`.
|
|
2123
|
+
*/
|
|
2124
|
+
event_type?: ("task_started" | "task_progress" | "task_completed" | "task_failed" | "task_cancelled") | null;
|
|
2125
|
+
/**
|
|
2126
|
+
* Progress so far.
|
|
2127
|
+
*/
|
|
2128
|
+
progress?: TaskProgress | null;
|
|
2129
|
+
/**
|
|
2130
|
+
* ID of the branch the change belongs to. Omitted or `null` means the main branch.
|
|
2131
|
+
*/
|
|
2132
|
+
branch_id?: string | null;
|
|
2133
|
+
}
|
|
2134
|
+
/**
|
|
2135
|
+
* Progress of a long-running tool, by `tool_call_id`.
|
|
2136
|
+
*/
|
|
2137
|
+
export interface TaskProgressedEvent {
|
|
2138
|
+
/**
|
|
2139
|
+
* The app the event belongs to, as `/apps/{app_id}`. It is `null` for `session.ended`, which concerns the whole session.
|
|
2140
|
+
*/
|
|
2141
|
+
room: string | null;
|
|
2142
|
+
/**
|
|
2143
|
+
* The event's payload. Its fields depend on the event.
|
|
2144
|
+
*/
|
|
2145
|
+
data: TaskProgressed;
|
|
2146
|
+
}
|
|
2147
|
+
/** Every event the service sends, by name, mapped to its `data` payload. */
|
|
2148
|
+
export interface ServerEventMap {
|
|
2149
|
+
/** A chat message was added or replaced. Replace the message with the same `id`. */
|
|
2150
|
+
"message.updated": MessageUpdated;
|
|
2151
|
+
/** A chat message was removed or hidden. An `id` the viewer never saw is a no-op. */
|
|
2152
|
+
"message.removed": MessageRemoved;
|
|
2153
|
+
/** The builder started, finished or failed a turn. Null status clears it. */
|
|
2154
|
+
"app.status_changed": AppStatusChanged;
|
|
2155
|
+
/** Reload the app preview. */
|
|
2156
|
+
"preview.reload_requested": PreviewReloadRequested;
|
|
2157
|
+
/** Show this page of the app in the preview. */
|
|
2158
|
+
"preview.navigation_requested": PreviewNavigationRequested;
|
|
2159
|
+
/** The whole prompt queue, after any change. */
|
|
2160
|
+
"queue.updated": QueueUpdated;
|
|
2161
|
+
/** Progress of a long-running tool, by `tool_call_id`. */
|
|
2162
|
+
"task.progressed": TaskProgressed;
|
|
2163
|
+
/** A generated image finished or failed. Replace its `placeholder_url` wherever it appears. */
|
|
2164
|
+
"image.resolved": ImageResolved;
|
|
2165
|
+
/** The conversation was rewritten (undo, restore, sync). Rejoin the room for a fresh snapshot. */
|
|
2166
|
+
"conversation.changed": BranchChange;
|
|
2167
|
+
/** The app's files changed outside a chat turn. */
|
|
2168
|
+
"files.changed": BranchChange;
|
|
2169
|
+
/** A branch was deleted. */
|
|
2170
|
+
"branch.deleted": BranchChange;
|
|
2171
|
+
/** The imported app's repository changed. */
|
|
2172
|
+
"repository.changed": BranchChange;
|
|
2173
|
+
/** The imported app's pull request changed. */
|
|
2174
|
+
"pull_request.changed": BranchChange;
|
|
2175
|
+
/** The session ended (expired, revoked, or taken by a newer socket). The socket disconnects next. */
|
|
2176
|
+
"session.ended": SessionEnded;
|
|
2177
|
+
/** A join was refused because the app is not on the session's allowlist, or the socket joins too often. */
|
|
2178
|
+
"room.access_denied": RoomNotice;
|
|
2179
|
+
/** The app left the session's allowlist, or its workspace. Events for it stop. Do not rejoin. */
|
|
2180
|
+
"room.access_revoked": RoomNotice;
|
|
2181
|
+
/** The join held but its snapshot failed. Live events still arrive. Rejoin later for a snapshot. */
|
|
2182
|
+
"room.snapshot_unavailable": RoomNotice;
|
|
2183
|
+
/** The app's current status and its last 50 public messages, after every join. Replace the app's state with it. */
|
|
2184
|
+
"app.snapshot": Snapshot;
|
|
2185
|
+
}
|
|
2186
|
+
/** Every message a client sends, by name, mapped to its payload. */
|
|
2187
|
+
export interface ClientMessageMap {
|
|
2188
|
+
/** Join an app's room, once per app after every connect. An `app.snapshot` follows, then its live events. Refused with `room.access_denied` when the app is not on the session's allowlist, or past 30 joins a minute. */
|
|
2189
|
+
"join": JoinMessage;
|
|
2190
|
+
/** Leave an app's room. Its events stop. */
|
|
2191
|
+
"leave": LeaveMessage;
|
|
2192
|
+
}
|
|
2193
|
+
/** @internal */
|
|
2194
|
+
export declare const serverEventNames: readonly ["message.updated", "message.removed", "app.status_changed", "preview.reload_requested", "preview.navigation_requested", "queue.updated", "task.progressed", "image.resolved", "conversation.changed", "files.changed", "branch.deleted", "repository.changed", "pull_request.changed", "session.ended", "room.access_denied", "room.access_revoked", "room.snapshot_unavailable", "app.snapshot"];
|