@base44-preview/platform 0.0.0 → 0.1.0-pr.312.2ef55e3

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.
@@ -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
+ * Room.
32
+ */
33
+ room: string | null;
34
+ /**
35
+ * The `data` field.
36
+ */
37
+ data: Snapshot;
38
+ }
39
+ /**
40
+ * The `Snapshot` schema.
41
+ */
42
+ export interface Snapshot {
43
+ /**
44
+ * The `status` field.
45
+ */
46
+ status: StatusObject | null;
47
+ /**
48
+ * Messages.
49
+ */
50
+ messages: Message[];
51
+ /**
52
+ * The main branch's prompt queue.
53
+ */
54
+ queue: QueueState;
55
+ }
56
+ /**
57
+ * Public builder state, without error diagnostics or billing context.
58
+ */
59
+ export interface StatusObject {
60
+ /**
61
+ * State.
62
+ */
63
+ state?: ("ready" | "processing" | "error") | null;
64
+ /**
65
+ * Turn ID.
66
+ */
67
+ turn_id?: string | null;
68
+ /**
69
+ * Last updated date.
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.
79
+ */
80
+ id?: string | null;
81
+ /**
82
+ * Role.
83
+ */
84
+ role?: ("user" | "assistant" | "system") | null;
85
+ /**
86
+ * Content.
87
+ */
88
+ content?: string | null;
89
+ /**
90
+ * Tool calls.
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
+ * Checkpoint ID.
95
+ */
96
+ checkpoint_id?: string | null;
97
+ /**
98
+ * The `metadata` field.
99
+ */
100
+ metadata?: MessageMetadata | null;
101
+ /**
102
+ * Additional message params.
103
+ */
104
+ additional_message_params?: MessageParams | null;
105
+ }
106
+ /**
107
+ * A `ask_clarifying_questions` call.
108
+ */
109
+ export interface AskClarifyingQuestionsCall {
110
+ /**
111
+ * Name.
112
+ */
113
+ name: "ask_clarifying_questions";
114
+ /**
115
+ * Id.
116
+ */
117
+ id?: string | null;
118
+ /**
119
+ * Requires user input.
120
+ */
121
+ requires_user_input?: boolean | null;
122
+ /**
123
+ * Auto approved.
124
+ */
125
+ auto_approved?: boolean | null;
126
+ /**
127
+ * Status.
128
+ */
129
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
130
+ /**
131
+ * Mutation applied.
132
+ */
133
+ mutation_applied?: boolean | null;
134
+ /**
135
+ * What kind of answer a parked call waits for.
136
+ */
137
+ waiting_on?: WaitingOn | null;
138
+ /**
139
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
140
+ */
141
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
142
+ /**
143
+ * The `arguments` field.
144
+ */
145
+ arguments?: QuestionArguments | null;
146
+ /**
147
+ * The `user_input` field.
148
+ */
149
+ user_input?: QuestionInput | null;
150
+ }
151
+ /**
152
+ * What a parked 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
+ * Parked by the `backend_function_entity_delete` guard.
162
+ */
163
+ export interface BackendFunctionEntityDeleteApproval {
164
+ /**
165
+ * Guard.
166
+ */
167
+ guard: "backend_function_entity_delete";
168
+ /**
169
+ * Why the guard parked the call.
170
+ */
171
+ reason?: string | null;
172
+ /**
173
+ * The `details` field.
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 guard could not verify the function's source.
191
+ */
192
+ inspection_failed?: boolean;
193
+ }
194
+ /**
195
+ * Parked by the `bash_approval` guard.
196
+ */
197
+ export interface BashApproval {
198
+ /**
199
+ * Guard.
200
+ */
201
+ guard: "bash_approval";
202
+ }
203
+ /**
204
+ * Parked by the `entity_rls_guard` guard.
205
+ */
206
+ export interface EntityRlsGuardApproval {
207
+ /**
208
+ * Guard.
209
+ */
210
+ guard: "entity_rls_guard";
211
+ /**
212
+ * Why the guard parked the call.
213
+ */
214
+ reason?: string | null;
215
+ /**
216
+ * The `details` field.
217
+ */
218
+ details?: AccessRuleChangeDetails | null;
219
+ }
220
+ /**
221
+ * Parked by the `exec_tool_entity_mutation` guard.
222
+ */
223
+ export interface ExecToolEntityMutationApproval {
224
+ /**
225
+ * Guard.
226
+ */
227
+ guard: "exec_tool_entity_mutation";
228
+ /**
229
+ * Why the guard parked the call.
230
+ */
231
+ reason?: string | null;
232
+ /**
233
+ * The `details` field.
234
+ */
235
+ details?: EntityMutationDetails | null;
236
+ }
237
+ /**
238
+ * What a parked entity mutation 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
+ * Parked by the `exec_tool_github_repo_write` guard.
252
+ */
253
+ export interface ExecToolGithubRepoWriteApproval {
254
+ /**
255
+ * Guard.
256
+ */
257
+ guard: "exec_tool_github_repo_write";
258
+ /**
259
+ * Why the guard parked the call.
260
+ */
261
+ reason?: string | null;
262
+ /**
263
+ * The `details` field.
264
+ */
265
+ details?: SummaryDetails | null;
266
+ }
267
+ /**
268
+ * What a parked code execution 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
+ * Parked by the `exec_tool_invite_user` guard.
278
+ */
279
+ export interface ExecToolInviteUserApproval {
280
+ /**
281
+ * Guard.
282
+ */
283
+ guard: "exec_tool_invite_user";
284
+ /**
285
+ * Why the guard parked the call.
286
+ */
287
+ reason?: string | null;
288
+ /**
289
+ * The `details` field.
290
+ */
291
+ details?: SummaryDetails | null;
292
+ }
293
+ /**
294
+ * Parked by the `exec_tool_send_email` guard.
295
+ */
296
+ export interface ExecToolSendEmailApproval {
297
+ /**
298
+ * Guard.
299
+ */
300
+ guard: "exec_tool_send_email";
301
+ /**
302
+ * Why the guard parked the call.
303
+ */
304
+ reason?: string | null;
305
+ /**
306
+ * The `details` field.
307
+ */
308
+ details?: SummaryDetails | null;
309
+ }
310
+ /**
311
+ * Parked by the `exec_tool_send_sms` guard.
312
+ */
313
+ export interface ExecToolSendSmsApproval {
314
+ /**
315
+ * Guard.
316
+ */
317
+ guard: "exec_tool_send_sms";
318
+ /**
319
+ * Why the guard parked the call.
320
+ */
321
+ reason?: string | null;
322
+ /**
323
+ * The `details` field.
324
+ */
325
+ details?: SummaryDetails | null;
326
+ }
327
+ /**
328
+ * Parked by a guard that publishes only its name.
329
+ */
330
+ export interface OtherApproval {
331
+ /**
332
+ * Guard.
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
+ * A `ask_plan_questions` call.
415
+ */
416
+ export interface AskPlanQuestionsCall {
417
+ /**
418
+ * Name.
419
+ */
420
+ name: "ask_plan_questions";
421
+ /**
422
+ * Id.
423
+ */
424
+ id?: string | null;
425
+ /**
426
+ * Requires user input.
427
+ */
428
+ requires_user_input?: boolean | null;
429
+ /**
430
+ * Auto approved.
431
+ */
432
+ auto_approved?: boolean | null;
433
+ /**
434
+ * Status.
435
+ */
436
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
437
+ /**
438
+ * Mutation applied.
439
+ */
440
+ mutation_applied?: boolean | null;
441
+ /**
442
+ * What kind of answer a parked call waits for.
443
+ */
444
+ waiting_on?: WaitingOn | null;
445
+ /**
446
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
447
+ */
448
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
449
+ /**
450
+ * The `arguments` field.
451
+ */
452
+ arguments?: QuestionArguments | null;
453
+ /**
454
+ * The `user_input` field.
455
+ */
456
+ user_input?: QuestionInput | null;
457
+ }
458
+ /**
459
+ * A `bash` call.
460
+ */
461
+ export interface BashCall {
462
+ /**
463
+ * Name.
464
+ */
465
+ name: "bash";
466
+ /**
467
+ * Id.
468
+ */
469
+ id?: string | null;
470
+ /**
471
+ * Requires user input.
472
+ */
473
+ requires_user_input?: boolean | null;
474
+ /**
475
+ * Auto approved.
476
+ */
477
+ auto_approved?: boolean | null;
478
+ /**
479
+ * Status.
480
+ */
481
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
482
+ /**
483
+ * Mutation applied.
484
+ */
485
+ mutation_applied?: boolean | null;
486
+ /**
487
+ * What kind of answer a parked call waits for.
488
+ */
489
+ waiting_on?: WaitingOn | null;
490
+ /**
491
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
492
+ */
493
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
494
+ /**
495
+ * The `display` field.
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
+ * A `create_entity_records` call.
510
+ */
511
+ export interface CreateEntityRecordsCall {
512
+ /**
513
+ * Name.
514
+ */
515
+ name: "create_entity_records";
516
+ /**
517
+ * Id.
518
+ */
519
+ id?: string | null;
520
+ /**
521
+ * Requires user input.
522
+ */
523
+ requires_user_input?: boolean | null;
524
+ /**
525
+ * Auto approved.
526
+ */
527
+ auto_approved?: boolean | null;
528
+ /**
529
+ * Status.
530
+ */
531
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
532
+ /**
533
+ * Mutation applied.
534
+ */
535
+ mutation_applied?: boolean | null;
536
+ /**
537
+ * What kind of answer a parked call waits for.
538
+ */
539
+ waiting_on?: WaitingOn | null;
540
+ /**
541
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
542
+ */
543
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
544
+ /**
545
+ * The `display` field.
546
+ */
547
+ display?: EntityRecordsDisplay | null;
548
+ }
549
+ /**
550
+ * The `EntityRecordsDisplay` schema.
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
+ * A `delete_entities` call.
564
+ */
565
+ export interface DeleteEntitiesCall {
566
+ /**
567
+ * Name.
568
+ */
569
+ name: "delete_entities";
570
+ /**
571
+ * Id.
572
+ */
573
+ id?: string | null;
574
+ /**
575
+ * Requires user input.
576
+ */
577
+ requires_user_input?: boolean | null;
578
+ /**
579
+ * Auto approved.
580
+ */
581
+ auto_approved?: boolean | null;
582
+ /**
583
+ * Status.
584
+ */
585
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
586
+ /**
587
+ * Mutation applied.
588
+ */
589
+ mutation_applied?: boolean | null;
590
+ /**
591
+ * What kind of answer a parked call waits for.
592
+ */
593
+ waiting_on?: WaitingOn | null;
594
+ /**
595
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
596
+ */
597
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
598
+ /**
599
+ * The `arguments` field.
600
+ */
601
+ arguments?: EntityChangeArguments | null;
602
+ /**
603
+ * The `display` field.
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
+ * A `delete_file` call.
627
+ */
628
+ export interface DeleteFileCall {
629
+ /**
630
+ * Name.
631
+ */
632
+ name: "delete_file";
633
+ /**
634
+ * Id.
635
+ */
636
+ id?: string | null;
637
+ /**
638
+ * Requires user input.
639
+ */
640
+ requires_user_input?: boolean | null;
641
+ /**
642
+ * Auto approved.
643
+ */
644
+ auto_approved?: boolean | null;
645
+ /**
646
+ * Status.
647
+ */
648
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
649
+ /**
650
+ * Mutation applied.
651
+ */
652
+ mutation_applied?: boolean | null;
653
+ /**
654
+ * What kind of answer a parked call waits for.
655
+ */
656
+ waiting_on?: WaitingOn | null;
657
+ /**
658
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
659
+ */
660
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
661
+ /**
662
+ * The `display` field.
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
+ * A `edit_repo_file` call.
681
+ */
682
+ export interface EditRepoFileCall {
683
+ /**
684
+ * Name.
685
+ */
686
+ name: "edit_repo_file";
687
+ /**
688
+ * Id.
689
+ */
690
+ id?: string | null;
691
+ /**
692
+ * Requires user input.
693
+ */
694
+ requires_user_input?: boolean | null;
695
+ /**
696
+ * Auto approved.
697
+ */
698
+ auto_approved?: boolean | null;
699
+ /**
700
+ * Status.
701
+ */
702
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
703
+ /**
704
+ * Mutation applied.
705
+ */
706
+ mutation_applied?: boolean | null;
707
+ /**
708
+ * What kind of answer a parked call waits for.
709
+ */
710
+ waiting_on?: WaitingOn | null;
711
+ /**
712
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
713
+ */
714
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
715
+ /**
716
+ * The `display` field.
717
+ */
718
+ display?: FileDisplay | null;
719
+ }
720
+ /**
721
+ * A `exec_tool` call.
722
+ */
723
+ export interface ExecToolCall {
724
+ /**
725
+ * Name.
726
+ */
727
+ name: "exec_tool";
728
+ /**
729
+ * Id.
730
+ */
731
+ id?: string | null;
732
+ /**
733
+ * Requires user input.
734
+ */
735
+ requires_user_input?: boolean | null;
736
+ /**
737
+ * Auto approved.
738
+ */
739
+ auto_approved?: boolean | null;
740
+ /**
741
+ * Status.
742
+ */
743
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
744
+ /**
745
+ * Mutation applied.
746
+ */
747
+ mutation_applied?: boolean | null;
748
+ /**
749
+ * What kind of answer a parked call waits for.
750
+ */
751
+ waiting_on?: WaitingOn | null;
752
+ /**
753
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
754
+ */
755
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
756
+ /**
757
+ * The `display` field.
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: refresh the preview.
771
+ */
772
+ writes_entities?: boolean;
773
+ }
774
+ /**
775
+ * A `find_replace` call.
776
+ */
777
+ export interface FindReplaceCall {
778
+ /**
779
+ * Name.
780
+ */
781
+ name: "find_replace";
782
+ /**
783
+ * Id.
784
+ */
785
+ id?: string | null;
786
+ /**
787
+ * Requires user input.
788
+ */
789
+ requires_user_input?: boolean | null;
790
+ /**
791
+ * Auto approved.
792
+ */
793
+ auto_approved?: boolean | null;
794
+ /**
795
+ * Status.
796
+ */
797
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
798
+ /**
799
+ * Mutation applied.
800
+ */
801
+ mutation_applied?: boolean | null;
802
+ /**
803
+ * What kind of answer a parked call waits for.
804
+ */
805
+ waiting_on?: WaitingOn | null;
806
+ /**
807
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
808
+ */
809
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
810
+ /**
811
+ * The `display` field.
812
+ */
813
+ display?: FileDisplay | null;
814
+ }
815
+ /**
816
+ * A `generate_game_background` call.
817
+ */
818
+ export interface GenerateGameBackgroundCall {
819
+ /**
820
+ * Name.
821
+ */
822
+ name: "generate_game_background";
823
+ /**
824
+ * Id.
825
+ */
826
+ id?: string | null;
827
+ /**
828
+ * Requires user input.
829
+ */
830
+ requires_user_input?: boolean | null;
831
+ /**
832
+ * Auto approved.
833
+ */
834
+ auto_approved?: boolean | null;
835
+ /**
836
+ * Status.
837
+ */
838
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
839
+ /**
840
+ * Mutation applied.
841
+ */
842
+ mutation_applied?: boolean | null;
843
+ /**
844
+ * What kind of answer a parked call waits for.
845
+ */
846
+ waiting_on?: WaitingOn | null;
847
+ /**
848
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
849
+ */
850
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
851
+ /**
852
+ * Results.
853
+ */
854
+ results?: string | null;
855
+ }
856
+ /**
857
+ * A `generate_game_image` call.
858
+ */
859
+ export interface GenerateGameImageCall {
860
+ /**
861
+ * Name.
862
+ */
863
+ name: "generate_game_image";
864
+ /**
865
+ * Id.
866
+ */
867
+ id?: string | null;
868
+ /**
869
+ * Requires user input.
870
+ */
871
+ requires_user_input?: boolean | null;
872
+ /**
873
+ * Auto approved.
874
+ */
875
+ auto_approved?: boolean | null;
876
+ /**
877
+ * Status.
878
+ */
879
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
880
+ /**
881
+ * Mutation applied.
882
+ */
883
+ mutation_applied?: boolean | null;
884
+ /**
885
+ * What kind of answer a parked call waits for.
886
+ */
887
+ waiting_on?: WaitingOn | null;
888
+ /**
889
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
890
+ */
891
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
892
+ /**
893
+ * The `arguments` field.
894
+ */
895
+ arguments?: GameImageArguments | null;
896
+ /**
897
+ * Results.
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
+ * A `generate_image` call.
912
+ */
913
+ export interface GenerateImageCall {
914
+ /**
915
+ * Name.
916
+ */
917
+ name: "generate_image";
918
+ /**
919
+ * Id.
920
+ */
921
+ id?: string | null;
922
+ /**
923
+ * Requires user input.
924
+ */
925
+ requires_user_input?: boolean | null;
926
+ /**
927
+ * Auto approved.
928
+ */
929
+ auto_approved?: boolean | null;
930
+ /**
931
+ * Status.
932
+ */
933
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
934
+ /**
935
+ * Mutation applied.
936
+ */
937
+ mutation_applied?: boolean | null;
938
+ /**
939
+ * What kind of answer a parked call waits for.
940
+ */
941
+ waiting_on?: WaitingOn | null;
942
+ /**
943
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
944
+ */
945
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
946
+ /**
947
+ * The `arguments` field.
948
+ */
949
+ arguments?: MediaArguments | null;
950
+ /**
951
+ * The `results` field.
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
+ * A `generate_prd` call.
987
+ */
988
+ export interface GeneratePrdCall {
989
+ /**
990
+ * Name.
991
+ */
992
+ name: "generate_prd";
993
+ /**
994
+ * Id.
995
+ */
996
+ id?: string | null;
997
+ /**
998
+ * Requires user input.
999
+ */
1000
+ requires_user_input?: boolean | null;
1001
+ /**
1002
+ * Auto approved.
1003
+ */
1004
+ auto_approved?: boolean | null;
1005
+ /**
1006
+ * Status.
1007
+ */
1008
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
1009
+ /**
1010
+ * Mutation applied.
1011
+ */
1012
+ mutation_applied?: boolean | null;
1013
+ /**
1014
+ * What kind of answer a parked call waits for.
1015
+ */
1016
+ waiting_on?: WaitingOn | null;
1017
+ /**
1018
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
1019
+ */
1020
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
1021
+ /**
1022
+ * The `arguments` field.
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
+ * A `generate_video` call.
1069
+ */
1070
+ export interface GenerateVideoCall {
1071
+ /**
1072
+ * Name.
1073
+ */
1074
+ name: "generate_video";
1075
+ /**
1076
+ * Id.
1077
+ */
1078
+ id?: string | null;
1079
+ /**
1080
+ * Requires user input.
1081
+ */
1082
+ requires_user_input?: boolean | null;
1083
+ /**
1084
+ * Auto approved.
1085
+ */
1086
+ auto_approved?: boolean | null;
1087
+ /**
1088
+ * Status.
1089
+ */
1090
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
1091
+ /**
1092
+ * Mutation applied.
1093
+ */
1094
+ mutation_applied?: boolean | null;
1095
+ /**
1096
+ * What kind of answer a parked call waits for.
1097
+ */
1098
+ waiting_on?: WaitingOn | null;
1099
+ /**
1100
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
1101
+ */
1102
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
1103
+ /**
1104
+ * The `arguments` field.
1105
+ */
1106
+ arguments?: MediaArguments | null;
1107
+ /**
1108
+ * Results.
1109
+ */
1110
+ results?: string | null;
1111
+ }
1112
+ /**
1113
+ * A `install_npm_package` call.
1114
+ */
1115
+ export interface InstallNpmPackageCall {
1116
+ /**
1117
+ * Name.
1118
+ */
1119
+ name: "install_npm_package";
1120
+ /**
1121
+ * Id.
1122
+ */
1123
+ id?: string | null;
1124
+ /**
1125
+ * Requires user input.
1126
+ */
1127
+ requires_user_input?: boolean | null;
1128
+ /**
1129
+ * Auto approved.
1130
+ */
1131
+ auto_approved?: boolean | null;
1132
+ /**
1133
+ * Status.
1134
+ */
1135
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
1136
+ /**
1137
+ * Mutation applied.
1138
+ */
1139
+ mutation_applied?: boolean | null;
1140
+ /**
1141
+ * What kind of answer a parked call waits for.
1142
+ */
1143
+ waiting_on?: WaitingOn | null;
1144
+ /**
1145
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
1146
+ */
1147
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
1148
+ /**
1149
+ * The `arguments` field.
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
+ * A `preview_execute_code` call.
1177
+ */
1178
+ export interface PreviewExecuteCodeCall {
1179
+ /**
1180
+ * Name.
1181
+ */
1182
+ name: "preview_execute_code";
1183
+ /**
1184
+ * Id.
1185
+ */
1186
+ id?: string | null;
1187
+ /**
1188
+ * Requires user input.
1189
+ */
1190
+ requires_user_input?: boolean | null;
1191
+ /**
1192
+ * Auto approved.
1193
+ */
1194
+ auto_approved?: boolean | null;
1195
+ /**
1196
+ * Status.
1197
+ */
1198
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
1199
+ /**
1200
+ * Mutation applied.
1201
+ */
1202
+ mutation_applied?: boolean | null;
1203
+ /**
1204
+ * What kind of answer a parked call waits for.
1205
+ */
1206
+ waiting_on?: WaitingOn | null;
1207
+ /**
1208
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
1209
+ */
1210
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
1211
+ /**
1212
+ * The `display` field.
1213
+ */
1214
+ display?: ExecDisplay | null;
1215
+ }
1216
+ /**
1217
+ * A `preview_screenshot` call.
1218
+ */
1219
+ export interface PreviewScreenshotCall {
1220
+ /**
1221
+ * Name.
1222
+ */
1223
+ name: "preview_screenshot";
1224
+ /**
1225
+ * Id.
1226
+ */
1227
+ id?: string | null;
1228
+ /**
1229
+ * Requires user input.
1230
+ */
1231
+ requires_user_input?: boolean | null;
1232
+ /**
1233
+ * Auto approved.
1234
+ */
1235
+ auto_approved?: boolean | null;
1236
+ /**
1237
+ * Status.
1238
+ */
1239
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
1240
+ /**
1241
+ * Mutation applied.
1242
+ */
1243
+ mutation_applied?: boolean | null;
1244
+ /**
1245
+ * What kind of answer a parked call waits for.
1246
+ */
1247
+ waiting_on?: WaitingOn | null;
1248
+ /**
1249
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
1250
+ */
1251
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
1252
+ /**
1253
+ * The `display` field.
1254
+ */
1255
+ display?: SummaryDisplay | null;
1256
+ }
1257
+ /**
1258
+ * A `read_only_exec_tool` call.
1259
+ */
1260
+ export interface ReadOnlyExecToolCall {
1261
+ /**
1262
+ * Name.
1263
+ */
1264
+ name: "read_only_exec_tool";
1265
+ /**
1266
+ * Id.
1267
+ */
1268
+ id?: string | null;
1269
+ /**
1270
+ * Requires user input.
1271
+ */
1272
+ requires_user_input?: boolean | null;
1273
+ /**
1274
+ * Auto approved.
1275
+ */
1276
+ auto_approved?: boolean | null;
1277
+ /**
1278
+ * Status.
1279
+ */
1280
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
1281
+ /**
1282
+ * Mutation applied.
1283
+ */
1284
+ mutation_applied?: boolean | null;
1285
+ /**
1286
+ * What kind of answer a parked call waits for.
1287
+ */
1288
+ waiting_on?: WaitingOn | null;
1289
+ /**
1290
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
1291
+ */
1292
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
1293
+ /**
1294
+ * The `display` field.
1295
+ */
1296
+ display?: ExecDisplay | null;
1297
+ }
1298
+ /**
1299
+ * A `read_repo_file` call.
1300
+ */
1301
+ export interface ReadRepoFileCall {
1302
+ /**
1303
+ * Name.
1304
+ */
1305
+ name: "read_repo_file";
1306
+ /**
1307
+ * Id.
1308
+ */
1309
+ id?: string | null;
1310
+ /**
1311
+ * Requires user input.
1312
+ */
1313
+ requires_user_input?: boolean | null;
1314
+ /**
1315
+ * Auto approved.
1316
+ */
1317
+ auto_approved?: boolean | null;
1318
+ /**
1319
+ * Status.
1320
+ */
1321
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
1322
+ /**
1323
+ * Mutation applied.
1324
+ */
1325
+ mutation_applied?: boolean | null;
1326
+ /**
1327
+ * What kind of answer a parked call waits for.
1328
+ */
1329
+ waiting_on?: WaitingOn | null;
1330
+ /**
1331
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
1332
+ */
1333
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
1334
+ /**
1335
+ * The `display` field.
1336
+ */
1337
+ display?: FileDisplay | null;
1338
+ }
1339
+ /**
1340
+ * A `run_shell_command` call.
1341
+ */
1342
+ export interface RunShellCommandCall {
1343
+ /**
1344
+ * Name.
1345
+ */
1346
+ name: "run_shell_command";
1347
+ /**
1348
+ * Id.
1349
+ */
1350
+ id?: string | null;
1351
+ /**
1352
+ * Requires user input.
1353
+ */
1354
+ requires_user_input?: boolean | null;
1355
+ /**
1356
+ * Auto approved.
1357
+ */
1358
+ auto_approved?: boolean | null;
1359
+ /**
1360
+ * Status.
1361
+ */
1362
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
1363
+ /**
1364
+ * Mutation applied.
1365
+ */
1366
+ mutation_applied?: boolean | null;
1367
+ /**
1368
+ * What kind of answer a parked call waits for.
1369
+ */
1370
+ waiting_on?: WaitingOn | null;
1371
+ /**
1372
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
1373
+ */
1374
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
1375
+ /**
1376
+ * The `display` field.
1377
+ */
1378
+ display?: SummaryDisplay | null;
1379
+ }
1380
+ /**
1381
+ * A `set_secrets` call.
1382
+ */
1383
+ export interface SetSecretsCall {
1384
+ /**
1385
+ * Name.
1386
+ */
1387
+ name: "set_secrets";
1388
+ /**
1389
+ * Id.
1390
+ */
1391
+ id?: string | null;
1392
+ /**
1393
+ * Requires user input.
1394
+ */
1395
+ requires_user_input?: boolean | null;
1396
+ /**
1397
+ * Auto approved.
1398
+ */
1399
+ auto_approved?: boolean | null;
1400
+ /**
1401
+ * Status.
1402
+ */
1403
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
1404
+ /**
1405
+ * Mutation applied.
1406
+ */
1407
+ mutation_applied?: boolean | null;
1408
+ /**
1409
+ * What kind of answer a parked call waits for.
1410
+ */
1411
+ waiting_on?: WaitingOn | null;
1412
+ /**
1413
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
1414
+ */
1415
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
1416
+ /**
1417
+ * The `arguments` field.
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
+ * A `update_entities` call.
1445
+ */
1446
+ export interface UpdateEntitiesCall {
1447
+ /**
1448
+ * Name.
1449
+ */
1450
+ name: "update_entities";
1451
+ /**
1452
+ * Id.
1453
+ */
1454
+ id?: string | null;
1455
+ /**
1456
+ * Requires user input.
1457
+ */
1458
+ requires_user_input?: boolean | null;
1459
+ /**
1460
+ * Auto approved.
1461
+ */
1462
+ auto_approved?: boolean | null;
1463
+ /**
1464
+ * Status.
1465
+ */
1466
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
1467
+ /**
1468
+ * Mutation applied.
1469
+ */
1470
+ mutation_applied?: boolean | null;
1471
+ /**
1472
+ * What kind of answer a parked call waits for.
1473
+ */
1474
+ waiting_on?: WaitingOn | null;
1475
+ /**
1476
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
1477
+ */
1478
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
1479
+ /**
1480
+ * The `arguments` field.
1481
+ */
1482
+ arguments?: EntityChangeArguments | null;
1483
+ /**
1484
+ * The `display` field.
1485
+ */
1486
+ display?: EntityDisplay | null;
1487
+ }
1488
+ /**
1489
+ * A `update_plan` call.
1490
+ */
1491
+ export interface UpdatePlanCall {
1492
+ /**
1493
+ * Name.
1494
+ */
1495
+ name: "update_plan";
1496
+ /**
1497
+ * Id.
1498
+ */
1499
+ id?: string | null;
1500
+ /**
1501
+ * Requires user input.
1502
+ */
1503
+ requires_user_input?: boolean | null;
1504
+ /**
1505
+ * Auto approved.
1506
+ */
1507
+ auto_approved?: boolean | null;
1508
+ /**
1509
+ * Status.
1510
+ */
1511
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
1512
+ /**
1513
+ * Mutation applied.
1514
+ */
1515
+ mutation_applied?: boolean | null;
1516
+ /**
1517
+ * What kind of answer a parked call waits for.
1518
+ */
1519
+ waiting_on?: WaitingOn | null;
1520
+ /**
1521
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
1522
+ */
1523
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
1524
+ /**
1525
+ * The `arguments` field.
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
+ * A `write_file` call.
1565
+ */
1566
+ export interface WriteFileCall {
1567
+ /**
1568
+ * Name.
1569
+ */
1570
+ name: "write_file";
1571
+ /**
1572
+ * Id.
1573
+ */
1574
+ id?: string | null;
1575
+ /**
1576
+ * Requires user input.
1577
+ */
1578
+ requires_user_input?: boolean | null;
1579
+ /**
1580
+ * Auto approved.
1581
+ */
1582
+ auto_approved?: boolean | null;
1583
+ /**
1584
+ * Status.
1585
+ */
1586
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
1587
+ /**
1588
+ * Mutation applied.
1589
+ */
1590
+ mutation_applied?: boolean | null;
1591
+ /**
1592
+ * What kind of answer a parked call waits for.
1593
+ */
1594
+ waiting_on?: WaitingOn | null;
1595
+ /**
1596
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
1597
+ */
1598
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
1599
+ /**
1600
+ * The `display` field.
1601
+ */
1602
+ display?: FileDisplay | null;
1603
+ }
1604
+ /**
1605
+ * A `write_repo_file` call.
1606
+ */
1607
+ export interface WriteRepoFileCall {
1608
+ /**
1609
+ * Name.
1610
+ */
1611
+ name: "write_repo_file";
1612
+ /**
1613
+ * Id.
1614
+ */
1615
+ id?: string | null;
1616
+ /**
1617
+ * Requires user input.
1618
+ */
1619
+ requires_user_input?: boolean | null;
1620
+ /**
1621
+ * Auto approved.
1622
+ */
1623
+ auto_approved?: boolean | null;
1624
+ /**
1625
+ * Status.
1626
+ */
1627
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
1628
+ /**
1629
+ * Mutation applied.
1630
+ */
1631
+ mutation_applied?: boolean | null;
1632
+ /**
1633
+ * What kind of answer a parked call waits for.
1634
+ */
1635
+ waiting_on?: WaitingOn | null;
1636
+ /**
1637
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
1638
+ */
1639
+ approval?: (BackendFunctionEntityDeleteApproval | BashApproval | EntityRlsGuardApproval | ExecToolEntityMutationApproval | ExecToolGithubRepoWriteApproval | ExecToolInviteUserApproval | ExecToolSendEmailApproval | ExecToolSendSmsApproval | OtherApproval) | null;
1640
+ /**
1641
+ * The `display` field.
1642
+ */
1643
+ display?: FileDisplay | null;
1644
+ }
1645
+ /**
1646
+ * A call to a tool that publishes only its name and progress.
1647
+ */
1648
+ export interface OtherToolCall {
1649
+ /**
1650
+ * Name.
1651
+ */
1652
+ name: string;
1653
+ /**
1654
+ * Id.
1655
+ */
1656
+ id?: string | null;
1657
+ /**
1658
+ * Requires user input.
1659
+ */
1660
+ requires_user_input?: boolean | null;
1661
+ /**
1662
+ * Auto approved.
1663
+ */
1664
+ auto_approved?: boolean | null;
1665
+ /**
1666
+ * Status.
1667
+ */
1668
+ status?: ("running" | "success" | "error" | "stopped" | "waiting_for_user_input") | null;
1669
+ /**
1670
+ * Mutation applied.
1671
+ */
1672
+ mutation_applied?: boolean | null;
1673
+ /**
1674
+ * What kind of answer a parked call waits for.
1675
+ */
1676
+ waiting_on?: WaitingOn | null;
1677
+ /**
1678
+ * Why a safety guard parked the call: the guard, and its declared reason and details.
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
+ * Created date.
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 prompt queue: the prompts the builder runs next, in order.
1718
+ */
1719
+ export interface QueueState {
1720
+ /**
1721
+ * Items.
1722
+ */
1723
+ items?: QueueItem[] | null;
1724
+ /**
1725
+ * Is paused.
1726
+ */
1727
+ is_paused?: boolean | null;
1728
+ }
1729
+ /**
1730
+ * A prompt waiting in the queue.
1731
+ */
1732
+ export interface QueueItem {
1733
+ /**
1734
+ * Id.
1735
+ */
1736
+ id?: string | null;
1737
+ /**
1738
+ * Content.
1739
+ */
1740
+ content?: string | null;
1741
+ /**
1742
+ * Branch ID.
1743
+ */
1744
+ branch_id?: string | null;
1745
+ /**
1746
+ * Created at.
1747
+ */
1748
+ created_at?: string | null;
1749
+ }
1750
+ /**
1751
+ * The `AppStatusChanged` schema.
1752
+ */
1753
+ export interface AppStatusChanged {
1754
+ /**
1755
+ * The `status` field.
1756
+ */
1757
+ status: StatusObject | null;
1758
+ /**
1759
+ * Branch ID.
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
+ * Room.
1769
+ */
1770
+ room: string | null;
1771
+ /**
1772
+ * The `data` field.
1773
+ */
1774
+ data: AppStatusChanged;
1775
+ }
1776
+ /**
1777
+ * Re-read what changed; the event carries no content.
1778
+ */
1779
+ export interface BranchChange {
1780
+ /**
1781
+ * Branch ID.
1782
+ */
1783
+ branch_id?: string | null;
1784
+ }
1785
+ /**
1786
+ * A branch was deleted.
1787
+ */
1788
+ export interface BranchDeletedEvent {
1789
+ /**
1790
+ * Room.
1791
+ */
1792
+ room: string | null;
1793
+ /**
1794
+ * The `data` field.
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
+ * Room.
1804
+ */
1805
+ room: string | null;
1806
+ /**
1807
+ * The `data` field.
1808
+ */
1809
+ data: BranchChange;
1810
+ }
1811
+ /**
1812
+ * The app's files changed outside a chat turn.
1813
+ */
1814
+ export interface FilesChangedEvent {
1815
+ /**
1816
+ * Room.
1817
+ */
1818
+ room: string | null;
1819
+ /**
1820
+ * The `data` field.
1821
+ */
1822
+ data: BranchChange;
1823
+ }
1824
+ /**
1825
+ * The `ImageResolved` schema.
1826
+ */
1827
+ export interface ImageResolved {
1828
+ /**
1829
+ * Status.
1830
+ */
1831
+ status?: ("pending" | "completed" | "failed") | null;
1832
+ /**
1833
+ * Placeholder URL.
1834
+ */
1835
+ placeholder_url?: string | null;
1836
+ /**
1837
+ * Image URL.
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
+ * Room.
1847
+ */
1848
+ room: string | null;
1849
+ /**
1850
+ * The `data` field.
1851
+ */
1852
+ data: ImageResolved;
1853
+ }
1854
+ /**
1855
+ * The `MessageRemoved` schema.
1856
+ */
1857
+ export interface MessageRemoved {
1858
+ /**
1859
+ * Message ID.
1860
+ */
1861
+ message_id: string;
1862
+ /**
1863
+ * Conversation ID.
1864
+ */
1865
+ conversation_id?: string | null;
1866
+ /**
1867
+ * Branch ID.
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
+ * Room.
1877
+ */
1878
+ room: string | null;
1879
+ /**
1880
+ * The `data` field.
1881
+ */
1882
+ data: MessageRemoved;
1883
+ }
1884
+ /**
1885
+ * The `MessageUpdated` schema.
1886
+ */
1887
+ export interface MessageUpdated {
1888
+ /**
1889
+ * The `message` field.
1890
+ */
1891
+ message: Message;
1892
+ /**
1893
+ * Conversation ID.
1894
+ */
1895
+ conversation_id?: string | null;
1896
+ /**
1897
+ * Branch ID.
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
+ * Room.
1907
+ */
1908
+ room: string | null;
1909
+ /**
1910
+ * The `data` field.
1911
+ */
1912
+ data: MessageUpdated;
1913
+ }
1914
+ /**
1915
+ * The `PreviewNavigationRequested` schema.
1916
+ */
1917
+ export interface PreviewNavigationRequested {
1918
+ /**
1919
+ * Path.
1920
+ */
1921
+ path: string;
1922
+ /**
1923
+ * Navigate even when the user has moved away from the page.
1924
+ */
1925
+ force: boolean;
1926
+ /**
1927
+ * Branch ID.
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
+ * Room.
1937
+ */
1938
+ room: string | null;
1939
+ /**
1940
+ * The `data` field.
1941
+ */
1942
+ data: PreviewNavigationRequested;
1943
+ }
1944
+ /**
1945
+ * The `PreviewReloadRequested` schema.
1946
+ */
1947
+ export interface PreviewReloadRequested {
1948
+ /**
1949
+ * Branch ID.
1950
+ */
1951
+ branch_id?: string | null;
1952
+ }
1953
+ /**
1954
+ * Reload the app preview.
1955
+ */
1956
+ export interface PreviewReloadRequestedEvent {
1957
+ /**
1958
+ * Room.
1959
+ */
1960
+ room: string | null;
1961
+ /**
1962
+ * The `data` field.
1963
+ */
1964
+ data: PreviewReloadRequested;
1965
+ }
1966
+ /**
1967
+ * The imported app's pull request changed.
1968
+ */
1969
+ export interface PullRequestChangedEvent {
1970
+ /**
1971
+ * Room.
1972
+ */
1973
+ room: string | null;
1974
+ /**
1975
+ * The `data` field.
1976
+ */
1977
+ data: BranchChange;
1978
+ }
1979
+ /**
1980
+ * The `QueueUpdated` schema.
1981
+ */
1982
+ export interface QueueUpdated {
1983
+ /**
1984
+ * Items.
1985
+ */
1986
+ items?: QueueItem[] | null;
1987
+ /**
1988
+ * Is paused.
1989
+ */
1990
+ is_paused?: boolean | null;
1991
+ /**
1992
+ * Processed item ID.
1993
+ */
1994
+ processed_item_id?: string | null;
1995
+ /**
1996
+ * Branch ID.
1997
+ */
1998
+ branch_id?: string | null;
1999
+ }
2000
+ /**
2001
+ * The whole prompt queue, after any change.
2002
+ */
2003
+ export interface QueueUpdatedEvent {
2004
+ /**
2005
+ * Room.
2006
+ */
2007
+ room: string | null;
2008
+ /**
2009
+ * The `data` field.
2010
+ */
2011
+ data: QueueUpdated;
2012
+ }
2013
+ /**
2014
+ * The imported app's repository changed.
2015
+ */
2016
+ export interface RepositoryChangedEvent {
2017
+ /**
2018
+ * Room.
2019
+ */
2020
+ room: string | null;
2021
+ /**
2022
+ * The `data` field.
2023
+ */
2024
+ data: BranchChange;
2025
+ }
2026
+ /**
2027
+ * A join was refused: the app is not on the session's allowlist, or the socket joins too often.
2028
+ */
2029
+ export interface RoomAccessDeniedEvent {
2030
+ /**
2031
+ * Room.
2032
+ */
2033
+ room: string | null;
2034
+ /**
2035
+ * The `data` field.
2036
+ */
2037
+ data: RoomNotice;
2038
+ }
2039
+ /**
2040
+ * The app is named by 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
+ * Room.
2050
+ */
2051
+ room: string | null;
2052
+ /**
2053
+ * The `data` field.
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
+ * Room.
2063
+ */
2064
+ room: string | null;
2065
+ /**
2066
+ * The `data` field.
2067
+ */
2068
+ data: RoomNotice;
2069
+ }
2070
+ /**
2071
+ * The `SessionEnded` schema.
2072
+ */
2073
+ export interface SessionEnded {
2074
+ /**
2075
+ * `expired`: ask the partner backend for a new session. `revoked`: the partner or an admin ended it; don't reconnect. `replaced`: another tab took it; 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
+ * Room.
2085
+ */
2086
+ room: string | null;
2087
+ /**
2088
+ * The `data` field.
2089
+ */
2090
+ data: SessionEnded;
2091
+ }
2092
+ /**
2093
+ * The `TaskProgress` schema.
2094
+ */
2095
+ export interface TaskProgress {
2096
+ /**
2097
+ * Current.
2098
+ */
2099
+ current?: number | null;
2100
+ /**
2101
+ * Total.
2102
+ */
2103
+ total?: number | null;
2104
+ /**
2105
+ * Percentage.
2106
+ */
2107
+ percentage?: number | null;
2108
+ }
2109
+ /**
2110
+ * The `TaskProgressed` schema.
2111
+ */
2112
+ export interface TaskProgressed {
2113
+ /**
2114
+ * Tool call ID.
2115
+ */
2116
+ tool_call_id?: string | null;
2117
+ /**
2118
+ * Message ID.
2119
+ */
2120
+ message_id?: string | null;
2121
+ /**
2122
+ * Event type.
2123
+ */
2124
+ event_type?: string | null;
2125
+ /**
2126
+ * The `progress` field.
2127
+ */
2128
+ progress?: TaskProgress | null;
2129
+ /**
2130
+ * Branch ID.
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
+ * Room.
2140
+ */
2141
+ room: string | null;
2142
+ /**
2143
+ * The `data` field.
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: 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"];