@vibes.diy/api-svc 2.5.19 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -239,6 +239,68 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
239
239
  error?: string | undefined;
240
240
  settings: {
241
241
  entries: ({
242
+ type: "active.db-acl";
243
+ dbName: string;
244
+ acl: {
245
+ read?: ("editors" | "members" | "readers" | "submitters")[] | undefined;
246
+ write?: ("editors" | "members" | "readers" | "submitters")[] | undefined;
247
+ delete?: ("editors" | "members" | "readers" | "submitters")[] | undefined;
248
+ };
249
+ } | {
250
+ type: "app.public.access";
251
+ enable: boolean;
252
+ tick?: {
253
+ count: number;
254
+ last: Date;
255
+ } | undefined;
256
+ } | {
257
+ type: "app.acl.active.request";
258
+ role: "viewer";
259
+ state: "pending";
260
+ request: {
261
+ key: string;
262
+ provider: "clerk" | "github" | "google";
263
+ msg?: string | undefined;
264
+ userId: string;
265
+ created: Date;
266
+ };
267
+ } | {
268
+ type: "app.acl.active.request";
269
+ role: "editor" | "submitter" | "viewer";
270
+ state: "approved";
271
+ request: {
272
+ key: string;
273
+ provider: "clerk" | "github" | "google";
274
+ msg?: string | undefined;
275
+ userId: string;
276
+ created: Date;
277
+ };
278
+ tick: {
279
+ count: number;
280
+ last: Date;
281
+ };
282
+ grant: {
283
+ ownerId: string;
284
+ key?: string | undefined;
285
+ on: Date;
286
+ };
287
+ } | {
288
+ type: "app.acl.active.request";
289
+ role: "editor" | "submitter" | "viewer";
290
+ state: "rejected";
291
+ request: {
292
+ key: string;
293
+ provider: "clerk" | "github" | "google";
294
+ msg?: string | undefined;
295
+ userId: string;
296
+ created: Date;
297
+ };
298
+ grant: {
299
+ ownerId: string;
300
+ key?: string | undefined;
301
+ on: Date;
302
+ };
303
+ } | {
242
304
  type: "app.acl.active.invite";
243
305
  role: "editor";
244
306
  state: "pending";
@@ -324,60 +386,6 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
324
386
  count: number;
325
387
  last: Date;
326
388
  };
327
- } | {
328
- type: "app.acl.active.request";
329
- role: "viewer";
330
- state: "pending";
331
- request: {
332
- key: string;
333
- provider: "clerk" | "github" | "google";
334
- msg?: string | undefined;
335
- userId: string;
336
- created: Date;
337
- };
338
- } | {
339
- type: "app.acl.active.request";
340
- role: "editor" | "submitter" | "viewer";
341
- state: "approved";
342
- request: {
343
- key: string;
344
- provider: "clerk" | "github" | "google";
345
- msg?: string | undefined;
346
- userId: string;
347
- created: Date;
348
- };
349
- tick: {
350
- count: number;
351
- last: Date;
352
- };
353
- grant: {
354
- ownerId: string;
355
- key?: string | undefined;
356
- on: Date;
357
- };
358
- } | {
359
- type: "app.acl.active.request";
360
- role: "editor" | "submitter" | "viewer";
361
- state: "rejected";
362
- request: {
363
- key: string;
364
- provider: "clerk" | "github" | "google";
365
- msg?: string | undefined;
366
- userId: string;
367
- created: Date;
368
- };
369
- grant: {
370
- ownerId: string;
371
- key?: string | undefined;
372
- on: Date;
373
- };
374
- } | {
375
- type: "app.public.access";
376
- enable: boolean;
377
- tick?: {
378
- count: number;
379
- last: Date;
380
- } | undefined;
381
389
  } | {
382
390
  type: "app.request";
383
391
  enable: boolean;
@@ -425,14 +433,14 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
425
433
  name: string;
426
434
  description: string;
427
435
  featured?: boolean | undefined;
428
- preSelected?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
429
- fallbackFor?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
430
- supports?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
436
+ preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
437
+ fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
438
+ supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
431
439
  imageInput?: boolean | undefined;
432
440
  };
433
441
  apiKey?: string | undefined;
434
442
  };
435
- usage: "chat";
443
+ usage: "chat" | "codegen";
436
444
  } | {
437
445
  type: "active.model";
438
446
  param: {
@@ -441,14 +449,14 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
441
449
  name: string;
442
450
  description: string;
443
451
  featured?: boolean | undefined;
444
- preSelected?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
445
- fallbackFor?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
446
- supports?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
452
+ preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
453
+ fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
454
+ supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
447
455
  imageInput?: boolean | undefined;
448
456
  };
449
457
  apiKey?: string | undefined;
450
458
  };
451
- usage: "app";
459
+ usage: "app" | "runtime";
452
460
  } | {
453
461
  type: "active.model";
454
462
  param: {
@@ -457,9 +465,9 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
457
465
  name: string;
458
466
  description: string;
459
467
  featured?: boolean | undefined;
460
- preSelected?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
461
- fallbackFor?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
462
- supports?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
468
+ preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
469
+ fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
470
+ supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
463
471
  imageInput?: boolean | undefined;
464
472
  };
465
473
  apiKey?: string | undefined;
@@ -471,14 +479,6 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
471
479
  key: string;
472
480
  value: string;
473
481
  }[];
474
- } | {
475
- type: "active.db-acl";
476
- dbName: string;
477
- acl: {
478
- read?: ("editors" | "members" | "readers" | "submitters")[] | undefined;
479
- write?: ("editors" | "members" | "readers" | "submitters")[] | undefined;
480
- delete?: ("editors" | "members" | "readers" | "submitters")[] | undefined;
481
- };
482
482
  })[];
483
483
  entry: {
484
484
  settings: {
@@ -491,28 +491,28 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
491
491
  cid: string;
492
492
  mime: string;
493
493
  } | undefined;
494
- app?: {
494
+ runtime?: {
495
495
  model?: {
496
496
  id: string;
497
497
  name: string;
498
498
  description: string;
499
499
  featured?: boolean | undefined;
500
- preSelected?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
501
- fallbackFor?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
502
- supports?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
500
+ preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
501
+ fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
502
+ supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
503
503
  imageInput?: boolean | undefined;
504
504
  } | undefined;
505
505
  apiKey?: string | undefined;
506
506
  } | undefined;
507
- chat?: {
507
+ codegen?: {
508
508
  model?: {
509
509
  id: string;
510
510
  name: string;
511
511
  description: string;
512
512
  featured?: boolean | undefined;
513
- preSelected?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
514
- fallbackFor?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
515
- supports?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
513
+ preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
514
+ fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
515
+ supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
516
516
  imageInput?: boolean | undefined;
517
517
  } | undefined;
518
518
  apiKey?: string | undefined;
@@ -523,9 +523,9 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
523
523
  name: string;
524
524
  description: string;
525
525
  featured?: boolean | undefined;
526
- preSelected?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
527
- fallbackFor?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
528
- supports?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
526
+ preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
527
+ fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
528
+ supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
529
529
  imageInput?: boolean | undefined;
530
530
  } | undefined;
531
531
  apiKey?: string | undefined;
@@ -591,6 +591,13 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
591
591
  token: string;
592
592
  };
593
593
  settings: ({
594
+ type: "profile";
595
+ avatarCid?: string | undefined;
596
+ displayName?: string | undefined;
597
+ } | {
598
+ type: "defaultHandle";
599
+ ownerHandle: string;
600
+ } | {
594
601
  type: "sharing";
595
602
  grants: {
596
603
  grant: "allow" | "deny";
@@ -600,28 +607,28 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
600
607
  }[];
601
608
  } | {
602
609
  type: "modelDefaults";
603
- chat?: {
610
+ codegen?: {
604
611
  model?: {
605
612
  id: string;
606
613
  name: string;
607
614
  description: string;
608
615
  featured?: boolean | undefined;
609
- preSelected?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
610
- fallbackFor?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
611
- supports?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
616
+ preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
617
+ fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
618
+ supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
612
619
  imageInput?: boolean | undefined;
613
620
  } | undefined;
614
621
  apiKey?: string | undefined;
615
622
  } | undefined;
616
- app?: {
623
+ runtime?: {
617
624
  model?: {
618
625
  id: string;
619
626
  name: string;
620
627
  description: string;
621
628
  featured?: boolean | undefined;
622
- preSelected?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
623
- fallbackFor?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
624
- supports?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
629
+ preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
630
+ fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
631
+ supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
625
632
  imageInput?: boolean | undefined;
626
633
  } | undefined;
627
634
  apiKey?: string | undefined;
@@ -632,20 +639,39 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
632
639
  name: string;
633
640
  description: string;
634
641
  featured?: boolean | undefined;
635
- preSelected?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
636
- fallbackFor?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
637
- supports?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
642
+ preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
643
+ fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
644
+ supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
645
+ imageInput?: boolean | undefined;
646
+ } | undefined;
647
+ apiKey?: string | undefined;
648
+ } | undefined;
649
+ chat?: {
650
+ model?: {
651
+ id: string;
652
+ name: string;
653
+ description: string;
654
+ featured?: boolean | undefined;
655
+ preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
656
+ fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
657
+ supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
658
+ imageInput?: boolean | undefined;
659
+ } | undefined;
660
+ apiKey?: string | undefined;
661
+ } | undefined;
662
+ app?: {
663
+ model?: {
664
+ id: string;
665
+ name: string;
666
+ description: string;
667
+ featured?: boolean | undefined;
668
+ preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
669
+ fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
670
+ supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
638
671
  imageInput?: boolean | undefined;
639
672
  } | undefined;
640
673
  apiKey?: string | undefined;
641
674
  } | undefined;
642
- } | {
643
- type: "defaultHandle";
644
- ownerHandle: string;
645
- } | {
646
- type: "profile";
647
- avatarCid?: string | undefined;
648
- displayName?: string | undefined;
649
675
  } | {
650
676
  type: "notifications";
651
677
  buildComplete?: boolean | undefined;
@@ -662,6 +688,13 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
662
688
  type: "vibes.diy.res-ensure-user-settings";
663
689
  userId: string;
664
690
  settings: ({
691
+ type: "profile";
692
+ avatarCid?: string | undefined;
693
+ displayName?: string | undefined;
694
+ } | {
695
+ type: "defaultHandle";
696
+ ownerHandle: string;
697
+ } | {
665
698
  type: "sharing";
666
699
  grants: {
667
700
  grant: "allow" | "deny";
@@ -671,28 +704,28 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
671
704
  }[];
672
705
  } | {
673
706
  type: "modelDefaults";
674
- chat?: {
707
+ codegen?: {
675
708
  model?: {
676
709
  id: string;
677
710
  name: string;
678
711
  description: string;
679
712
  featured?: boolean | undefined;
680
- preSelected?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
681
- fallbackFor?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
682
- supports?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
713
+ preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
714
+ fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
715
+ supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
683
716
  imageInput?: boolean | undefined;
684
717
  } | undefined;
685
718
  apiKey?: string | undefined;
686
719
  } | undefined;
687
- app?: {
720
+ runtime?: {
688
721
  model?: {
689
722
  id: string;
690
723
  name: string;
691
724
  description: string;
692
725
  featured?: boolean | undefined;
693
- preSelected?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
694
- fallbackFor?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
695
- supports?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
726
+ preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
727
+ fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
728
+ supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
696
729
  imageInput?: boolean | undefined;
697
730
  } | undefined;
698
731
  apiKey?: string | undefined;
@@ -703,20 +736,39 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
703
736
  name: string;
704
737
  description: string;
705
738
  featured?: boolean | undefined;
706
- preSelected?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
707
- fallbackFor?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
708
- supports?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
739
+ preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
740
+ fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
741
+ supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
742
+ imageInput?: boolean | undefined;
743
+ } | undefined;
744
+ apiKey?: string | undefined;
745
+ } | undefined;
746
+ chat?: {
747
+ model?: {
748
+ id: string;
749
+ name: string;
750
+ description: string;
751
+ featured?: boolean | undefined;
752
+ preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
753
+ fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
754
+ supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
755
+ imageInput?: boolean | undefined;
756
+ } | undefined;
757
+ apiKey?: string | undefined;
758
+ } | undefined;
759
+ app?: {
760
+ model?: {
761
+ id: string;
762
+ name: string;
763
+ description: string;
764
+ featured?: boolean | undefined;
765
+ preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
766
+ fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
767
+ supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
709
768
  imageInput?: boolean | undefined;
710
769
  } | undefined;
711
770
  apiKey?: string | undefined;
712
771
  } | undefined;
713
- } | {
714
- type: "defaultHandle";
715
- ownerHandle: string;
716
- } | {
717
- type: "profile";
718
- avatarCid?: string | undefined;
719
- displayName?: string | undefined;
720
772
  } | {
721
773
  type: "notifications";
722
774
  buildComplete?: boolean | undefined;
@@ -811,9 +863,9 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
811
863
  name: string;
812
864
  description: string;
813
865
  featured?: boolean | undefined;
814
- preSelected?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
815
- fallbackFor?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
816
- supports?: ("app" | "chat" | "img" | "img-edit")[] | undefined;
866
+ preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
867
+ fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
868
+ supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
817
869
  imageInput?: boolean | undefined;
818
870
  }[];
819
871
  } | import("@vibes.diy/api-types").VibesDiyError>, import("@adviser/cement").EventoHandler<{
@@ -2895,12 +2947,6 @@ export declare const chatHandlers: readonly [import("@adviser/cement").EventoHan
2895
2947
  refId: string;
2896
2948
  })[];
2897
2949
  }>, {
2898
- type: "vibes.diy.res-error";
2899
- error: {
2900
- message: string;
2901
- code: "max-app-slugs-reached";
2902
- };
2903
- } | {
2904
2950
  appSlug: string;
2905
2951
  ownerHandle: string;
2906
2952
  mode: "dev" | "production";
@@ -2947,6 +2993,12 @@ export declare const chatHandlers: readonly [import("@adviser/cement").EventoHan
2947
2993
  message: string;
2948
2994
  code: "app-slug-invalid";
2949
2995
  };
2996
+ } | {
2997
+ type: "vibes.diy.res-error";
2998
+ error: {
2999
+ message: string;
3000
+ code: "max-app-slugs-reached";
3001
+ };
2950
3002
  } | import("@vibes.diy/api-types").VibesDiyError>, import("@adviser/cement").EventoHandler<{
2951
3003
  type: "MessageEvent";
2952
3004
  event: {
@@ -2983,13 +3035,13 @@ export declare const chatHandlers: readonly [import("@adviser/cement").EventoHan
2983
3035
  chatId?: string | undefined;
2984
3036
  prompt?: string | undefined;
2985
3037
  dryRun?: boolean | undefined;
2986
- mode: "app" | "chat" | "fs-set" | "fs-update" | "img";
3038
+ mode: "app" | "chat" | "codegen" | "fs-set" | "fs-update" | "img" | "runtime";
2987
3039
  }>, {
2988
3040
  type: "vibes.diy.res-open-chat";
2989
3041
  appSlug: string;
2990
3042
  ownerHandle: string;
2991
3043
  chatId: string;
2992
- mode: "app" | "chat" | "fs-set" | "fs-update" | "img";
3044
+ mode: "app" | "chat" | "codegen" | "fs-set" | "fs-update" | "img" | "runtime";
2993
3045
  } | import("@vibes.diy/api-types").VibesDiyError>, import("@adviser/cement").EventoHandler<{
2994
3046
  type: "MessageEvent";
2995
3047
  event: {
@@ -3017,7 +3069,7 @@ export declare const chatHandlers: readonly [import("@adviser/cement").EventoHan
3017
3069
  };
3018
3070
  }, import("@vibes.diy/api-types").MsgBase<{
3019
3071
  type: "vibes.diy.req-prompt-chat-section";
3020
- mode: "chat";
3072
+ mode: "chat" | "codegen";
3021
3073
  auth: {
3022
3074
  type: "clerk" | "device-id" | "ucan";
3023
3075
  token: string;
@@ -3108,7 +3160,7 @@ export declare const chatHandlers: readonly [import("@adviser/cement").EventoHan
3108
3160
  focusPath?: string | undefined;
3109
3161
  } | {
3110
3162
  type: "vibes.diy.req-prompt-chat-section";
3111
- mode: "app";
3163
+ mode: "app" | "runtime";
3112
3164
  auth: {
3113
3165
  type: "clerk" | "device-id" | "ucan";
3114
3166
  token: string;
@@ -3486,13 +3538,13 @@ export declare const imgGenAppSessionStopgapHandlers: readonly [import("@adviser
3486
3538
  chatId?: string | undefined;
3487
3539
  prompt?: string | undefined;
3488
3540
  dryRun?: boolean | undefined;
3489
- mode: "app" | "chat" | "fs-set" | "fs-update" | "img";
3541
+ mode: "app" | "chat" | "codegen" | "fs-set" | "fs-update" | "img" | "runtime";
3490
3542
  }>, {
3491
3543
  type: "vibes.diy.res-open-chat";
3492
3544
  appSlug: string;
3493
3545
  ownerHandle: string;
3494
3546
  chatId: string;
3495
- mode: "app" | "chat" | "fs-set" | "fs-update" | "img";
3547
+ mode: "app" | "chat" | "codegen" | "fs-set" | "fs-update" | "img" | "runtime";
3496
3548
  } | import("@vibes.diy/api-types").VibesDiyError>, import("@adviser/cement").EventoHandler<{
3497
3549
  type: "MessageEvent";
3498
3550
  event: {
@@ -3520,7 +3572,7 @@ export declare const imgGenAppSessionStopgapHandlers: readonly [import("@adviser
3520
3572
  };
3521
3573
  }, import("@vibes.diy/api-types").MsgBase<{
3522
3574
  type: "vibes.diy.req-prompt-chat-section";
3523
- mode: "chat";
3575
+ mode: "chat" | "codegen";
3524
3576
  auth: {
3525
3577
  type: "clerk" | "device-id" | "ucan";
3526
3578
  token: string;
@@ -3611,7 +3663,7 @@ export declare const imgGenAppSessionStopgapHandlers: readonly [import("@adviser
3611
3663
  focusPath?: string | undefined;
3612
3664
  } | {
3613
3665
  type: "vibes.diy.req-prompt-chat-section";
3614
- mode: "app";
3666
+ mode: "app" | "runtime";
3615
3667
  auth: {
3616
3668
  type: "clerk" | "device-id" | "ucan";
3617
3669
  token: string;
package/index.d.ts CHANGED
@@ -23,3 +23,4 @@ export * from "./public/convert-image-evt.js";
23
23
  export * from "./public/access-function.js";
24
24
  export * from "./public/normalize-channels.js";
25
25
  export * from "./public/seq-allocation.js";
26
+ export * from "./public/app-seq-allocation.js";
package/index.js CHANGED
@@ -23,4 +23,5 @@ export * from "./public/convert-image-evt.js";
23
23
  export * from "./public/access-function.js";
24
24
  export * from "./public/normalize-channels.js";
25
25
  export * from "./public/seq-allocation.js";
26
+ export * from "./public/app-seq-allocation.js";
26
27
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../jsr/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,cAAc,iBAAiB,CAAC;AAChC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../jsr/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,cAAc,iBAAiB,CAAC;AAChC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC"}
@@ -2,8 +2,8 @@ import { Result } from "@adviser/cement";
2
2
  import { AIParams } from "@vibes.diy/api-types";
3
3
  import { VibesApiSQLCtx } from "../types.js";
4
4
  export interface ModelDefaults {
5
- chat: AIParams;
6
- app: AIParams;
5
+ codegen: AIParams;
6
+ runtime: AIParams;
7
7
  img: AIParams;
8
8
  "img-edit"?: AIParams;
9
9
  }
@@ -1,5 +1,5 @@
1
1
  import { Result, exception2Result } from "@adviser/cement";
2
- import { ActiveEntry, isActiveModelSettingApp, isActiveModelSettingChat, isActiveModelSettingImg, isUserSettingModelDefaults, userSettingItem, parseArrayWarning, } from "@vibes.diy/api-types";
2
+ import { ActiveEntry, isActiveModelSettingRuntime, isActiveModelSettingCodegen, isActiveModelSettingImg, isUserSettingModelDefaults, userSettingItem, parseArrayWarning, } from "@vibes.diy/api-types";
3
3
  import { ensureLogger } from "@vibes.diy/identity";
4
4
  import { eq, and } from "drizzle-orm/sql/expressions";
5
5
  import { loadModels } from "../public/list-models.js";
@@ -8,7 +8,7 @@ async function loadPreSelectedDefaults(ctx) {
8
8
  if (rModels.isErr())
9
9
  return Result.Err(rModels);
10
10
  const models = rModels.Ok().models;
11
- const requiredUsages = ["chat", "app", "img"];
11
+ const requiredUsages = ["codegen", "runtime", "img"];
12
12
  const defaults = {};
13
13
  for (const usage of requiredUsages) {
14
14
  const found = models.find((m) => m.preSelected?.includes(usage));
@@ -54,10 +54,12 @@ export async function getModelDefaults(ctx, { appSlug, ownerHandle }) {
54
54
  }
55
55
  const modelDefaults = userSettings.find(isUserSettingModelDefaults);
56
56
  if (modelDefaults) {
57
- if (modelDefaults.chat?.model)
58
- result.chat = modelDefaults.chat;
59
- if (modelDefaults.app?.model)
60
- result.app = modelDefaults.app;
57
+ const codegen = modelDefaults.codegen ?? modelDefaults.chat;
58
+ const runtime = modelDefaults.runtime ?? modelDefaults.app;
59
+ if (codegen?.model)
60
+ result.codegen = codegen;
61
+ if (runtime?.model)
62
+ result.runtime = runtime;
61
63
  if (modelDefaults.img?.model)
62
64
  result.img = modelDefaults.img;
63
65
  }
@@ -80,10 +82,10 @@ export async function getModelDefaults(ctx, { appSlug, ownerHandle }) {
80
82
  ensureLogger(ctx.sthis, "getModelDefaults").Warn().Any({ parseErrors: appSettingsWarning }).Msg("skip");
81
83
  }
82
84
  for (const e of appSettings) {
83
- if (isActiveModelSettingChat(e))
84
- result.chat = e.param;
85
- else if (isActiveModelSettingApp(e))
86
- result.app = e.param;
85
+ if (isActiveModelSettingCodegen(e))
86
+ result.codegen = e.param;
87
+ else if (isActiveModelSettingRuntime(e))
88
+ result.runtime = e.param;
87
89
  else if (isActiveModelSettingImg(e))
88
90
  result.img = e.param;
89
91
  }