vibes-diy 14.3.459 → 14.3.461

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.
@@ -2,80 +2,100 @@ import { isCmdProgress, sendMsg, sendProgress, type CmdProgress, type CmdTSMsg,
2
2
  export type { CmdTSMsg, WrapCmdTSMsg, CmdProgress };
3
3
  export { isCmdProgress, sendMsg, sendProgress };
4
4
  export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
5
- type: "vibes-diy.cli.skills";
5
+ type: "use-vibes.cli.themes";
6
6
  }, {
7
- type: "vibes-diy.cli.res-skills-list";
8
- skills: {
7
+ type: "use-vibes.cli.res-themes-list";
8
+ themes: {
9
+ slug: string;
9
10
  name: string;
10
- description: string;
11
11
  }[];
12
12
  } | {
13
- type: "vibes-diy.cli.res-skill-content";
14
- name: string;
13
+ type: "use-vibes.cli.res-theme-content";
14
+ slug: string;
15
15
  content: string;
16
16
  }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
17
- type: "vibes-diy.cli.claim-handle";
17
+ type: "vibes-diy.cli.pull";
18
+ appSlug: string;
19
+ ownerHandle: string;
20
+ dir: string;
18
21
  apiUrl: string;
19
- ownerHandle?: string | undefined;
20
- noDefault?: boolean | undefined;
22
+ fsId?: string | undefined;
23
+ published: boolean;
24
+ draft: boolean;
25
+ version?: string | undefined;
21
26
  }, {
22
- type: "vibes-diy.cli.res-claim-handle";
23
- op: "claim" | "suggest";
24
- ownerHandle?: string | undefined;
25
- defaultHandleSet?: boolean | undefined;
26
- defaultSkipped?: boolean | undefined;
27
- suggestions: string[];
27
+ type: "vibes-diy.cli.res-pull";
28
+ appSlug: string;
29
+ ownerHandle: string;
30
+ directory: string;
31
+ files: {
32
+ name: string;
33
+ size: number;
34
+ }[];
28
35
  }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
29
- type: "vibes-diy.cli.image";
36
+ type: "vibes-diy.cli.db.subscribe";
30
37
  apiUrl: string;
31
- prompt: string;
38
+ appSlug: string;
32
39
  ownerHandle: string;
33
- photo: string;
34
- vibe: string;
35
- db: string;
36
- doc: string;
37
- out: string;
38
- json: boolean;
40
+ dbName: string;
41
+ }, never> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
42
+ type: "vibes-diy.cli.codegen-log";
43
+ appSlug: string;
44
+ ownerHandle: string;
45
+ chatId?: string | undefined;
46
+ apiUrl: string;
47
+ response?: boolean | undefined;
48
+ raw?: boolean | undefined;
49
+ files?: boolean | undefined;
50
+ jsonl?: boolean | undefined;
51
+ user?: boolean | undefined;
52
+ promptId?: string | undefined;
39
53
  }, {
40
- type: "vibes-diy.cli.res-image";
41
- path: string;
42
- receipt: {
43
- ok: true;
44
- picture: {
45
- url: string;
46
- mimeType: string;
47
- name: string;
48
- size: number;
49
- ownerHandle: string;
50
- appSlug: string;
51
- dbName: string;
52
- docId: string;
53
- };
54
- link?: string | undefined;
55
- made: {
56
- prompt: string;
57
- model: string;
58
- };
59
- };
54
+ type: "vibes-diy.cli.res-codegen-log-response";
55
+ output: string;
56
+ } | {
57
+ type: "vibes-diy.cli.res-codegen-log-list";
58
+ items: {
59
+ chatId: string;
60
+ appSlug: string;
61
+ ownerHandle: string;
62
+ created: string;
63
+ }[];
64
+ } | {
65
+ type: "vibes-diy.cli.res-codegen-log-detail";
66
+ chatId: string;
67
+ ownerHandle: string;
68
+ appSlug: string;
69
+ prompts: {
70
+ prompt: string;
71
+ fsId: string;
72
+ created: string;
73
+ }[];
60
74
  }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
61
- type: "vibes-diy.cli.generate";
62
- prompt: string;
75
+ type: "vibes-diy.cli.edit";
63
76
  appSlug: string;
77
+ prompt: string;
64
78
  ownerHandle: string;
65
79
  instantJoin?: boolean | undefined;
66
- noAccessFn?: boolean | undefined;
67
- privateMode?: boolean | undefined;
68
80
  verbose: boolean;
81
+ dir: string;
69
82
  apiUrl: string;
83
+ dryRun: boolean;
84
+ transcript: boolean;
85
+ directBuild?: boolean | undefined;
70
86
  focusPath?: string | undefined;
71
87
  model?: string | undefined;
72
88
  builderModel?: string | undefined;
73
89
  apiKey?: string | undefined;
74
- variety?: string | undefined;
75
- record?: string | undefined;
76
- style?: string | undefined;
77
- fastPass?: boolean | undefined;
78
90
  }, {
91
+ type: "vibes-diy.cli.res-edit";
92
+ appSlug: string;
93
+ ownerHandle: string;
94
+ url: string;
95
+ directory: string;
96
+ restyled?: boolean | undefined;
97
+ fsId?: string | undefined;
98
+ } | {
79
99
  appSlug: string;
80
100
  ownerHandle: string;
81
101
  mode: "dev" | "production";
@@ -163,45 +183,6 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
163
183
  message: string;
164
184
  code: "auto-enhance-off";
165
185
  };
166
- } | {
167
- type: "vibes-diy.cli.res-generate";
168
- appSlug: string;
169
- ownerHandle: string;
170
- url: string;
171
- directory: string;
172
- release?: "not-visible" | "published" | "version-locked" | undefined;
173
- turns?: number | undefined;
174
- publish?: "kept-private-no-access-fn" | "private" | "published" | undefined;
175
- posture?: "gated" | "open" | "private" | undefined;
176
- }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
177
- type: "vibes-diy.cli.db.query";
178
- apiUrl: string;
179
- appSlug: string;
180
- ownerHandle: string;
181
- dbName: string;
182
- field: string;
183
- key: string;
184
- prefix: string;
185
- range: string;
186
- limit: number;
187
- descending: boolean;
188
- admin: boolean;
189
- actingHandle: string;
190
- }, {
191
- type: "vibes-diy.cli.db.query-res";
192
- docs: {
193
- [x: string]: unknown;
194
- }[];
195
- }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
196
- type: "vibes-diy.cli.whoami";
197
- apiUrl: string;
198
- }, {
199
- type: "vibes-diy.cli.res-whoami";
200
- authenticated: boolean;
201
- userId?: string | undefined;
202
- defaultHandle?: string | undefined;
203
- handles: string[];
204
- detail?: string | undefined;
205
186
  }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
206
187
  type: "vibes-diy.cli.versions";
207
188
  appSlug: string;
@@ -648,16 +629,16 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
648
629
  updated: string;
649
630
  created: string;
650
631
  }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
651
- type: "use-vibes.cli.themes";
632
+ type: "vibes-diy.cli.skills";
652
633
  }, {
653
- type: "use-vibes.cli.res-themes-list";
654
- themes: {
655
- slug: string;
634
+ type: "vibes-diy.cli.res-skills-list";
635
+ skills: {
656
636
  name: string;
637
+ description: string;
657
638
  }[];
658
639
  } | {
659
- type: "use-vibes.cli.res-theme-content";
660
- slug: string;
640
+ type: "vibes-diy.cli.res-skill-content";
641
+ name: string;
661
642
  content: string;
662
643
  }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
663
644
  type: "vibes-diy.cli.variety";
@@ -800,6 +781,18 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
800
781
  carried?: string[] | undefined;
801
782
  skippedPresent?: string[] | undefined;
802
783
  chatId?: string | undefined;
784
+ }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
785
+ type: "vibes-diy.cli.claim-handle";
786
+ apiUrl: string;
787
+ ownerHandle?: string | undefined;
788
+ noDefault?: boolean | undefined;
789
+ }, {
790
+ type: "vibes-diy.cli.res-claim-handle";
791
+ op: "claim" | "suggest";
792
+ ownerHandle?: string | undefined;
793
+ defaultHandleSet?: boolean | undefined;
794
+ defaultSkipped?: boolean | undefined;
795
+ suggestions: string[];
803
796
  }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
804
797
  type: "vibes-diy.cli.agent";
805
798
  apiUrl: string;
@@ -824,6 +817,38 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
824
817
  reactions?: string[] | undefined;
825
818
  error?: string | undefined;
826
819
  credits?: number | undefined;
820
+ }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
821
+ type: "vibes-diy.cli.image";
822
+ apiUrl: string;
823
+ prompt: string;
824
+ ownerHandle: string;
825
+ photo: string;
826
+ vibe: string;
827
+ db: string;
828
+ doc: string;
829
+ out: string;
830
+ json: boolean;
831
+ }, {
832
+ type: "vibes-diy.cli.res-image";
833
+ path: string;
834
+ receipt: {
835
+ ok: true;
836
+ picture: {
837
+ url: string;
838
+ mimeType: string;
839
+ name: string;
840
+ size: number;
841
+ ownerHandle: string;
842
+ appSlug: string;
843
+ dbName: string;
844
+ docId: string;
845
+ };
846
+ link?: string | undefined;
847
+ made: {
848
+ prompt: string;
849
+ model: string;
850
+ };
851
+ };
827
852
  }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
828
853
  type: "vibes-diy.cli.put-asset";
829
854
  file: string;
@@ -840,75 +865,23 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
840
865
  uploadId: string;
841
866
  verified?: boolean | undefined;
842
867
  }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
843
- type: "vibes-diy.cli.app-chats";
844
- appSlug: string;
845
- ownerHandle: string;
846
- chatId?: string | undefined;
847
- apiUrl: string;
848
- }, {
849
- type: "vibes-diy.cli.res-app-chats-list";
850
- items: {
851
- chatId: string;
852
- appSlug: string;
853
- ownerHandle: string;
854
- created: string;
855
- userHandle?: string | undefined;
856
- }[];
857
- } | {
858
- type: "vibes-diy.cli.res-app-chats-detail";
859
- chatId: string;
860
- ownerHandle?: string | undefined;
861
- appSlug?: string | undefined;
862
- output: string;
863
- }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
864
- type: "vibes-diy.cli.codegen-log";
865
- appSlug: string;
866
- ownerHandle: string;
867
- chatId?: string | undefined;
868
- apiUrl: string;
869
- response?: boolean | undefined;
870
- raw?: boolean | undefined;
871
- files?: boolean | undefined;
872
- jsonl?: boolean | undefined;
873
- user?: boolean | undefined;
874
- promptId?: string | undefined;
875
- }, {
876
- type: "vibes-diy.cli.res-codegen-log-list";
877
- items: {
878
- chatId: string;
879
- appSlug: string;
880
- ownerHandle: string;
881
- created: string;
882
- }[];
883
- } | {
884
- type: "vibes-diy.cli.res-codegen-log-detail";
885
- chatId: string;
886
- ownerHandle: string;
887
- appSlug: string;
888
- prompts: {
889
- prompt: string;
890
- fsId: string;
891
- created: string;
892
- }[];
893
- } | {
894
- type: "vibes-diy.cli.res-codegen-log-response";
895
- output: string;
896
- }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
897
- type: "vibes-diy.cli.edit";
898
- appSlug: string;
868
+ type: "vibes-diy.cli.generate";
899
869
  prompt: string;
870
+ appSlug: string;
900
871
  ownerHandle: string;
901
872
  instantJoin?: boolean | undefined;
873
+ noAccessFn?: boolean | undefined;
874
+ privateMode?: boolean | undefined;
902
875
  verbose: boolean;
903
- dir: string;
904
876
  apiUrl: string;
905
- dryRun: boolean;
906
- transcript: boolean;
907
- directBuild?: boolean | undefined;
908
877
  focusPath?: string | undefined;
909
878
  model?: string | undefined;
910
879
  builderModel?: string | undefined;
911
880
  apiKey?: string | undefined;
881
+ variety?: string | undefined;
882
+ record?: string | undefined;
883
+ style?: string | undefined;
884
+ fastPass?: boolean | undefined;
912
885
  }, {
913
886
  appSlug: string;
914
887
  ownerHandle: string;
@@ -998,13 +971,36 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
998
971
  code: "auto-enhance-off";
999
972
  };
1000
973
  } | {
1001
- type: "vibes-diy.cli.res-edit";
974
+ type: "vibes-diy.cli.res-generate";
1002
975
  appSlug: string;
1003
976
  ownerHandle: string;
1004
977
  url: string;
1005
978
  directory: string;
1006
- restyled?: boolean | undefined;
1007
- fsId?: string | undefined;
979
+ release?: "not-visible" | "published" | "version-locked" | undefined;
980
+ turns?: number | undefined;
981
+ publish?: "kept-private-no-access-fn" | "private" | "published" | undefined;
982
+ posture?: "gated" | "open" | "private" | undefined;
983
+ }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
984
+ type: "vibes-diy.cli.app-chats";
985
+ appSlug: string;
986
+ ownerHandle: string;
987
+ chatId?: string | undefined;
988
+ apiUrl: string;
989
+ }, {
990
+ type: "vibes-diy.cli.res-app-chats-list";
991
+ items: {
992
+ chatId: string;
993
+ appSlug: string;
994
+ ownerHandle: string;
995
+ created: string;
996
+ userHandle?: string | undefined;
997
+ }[];
998
+ } | {
999
+ type: "vibes-diy.cli.res-app-chats-detail";
1000
+ chatId: string;
1001
+ ownerHandle?: string | undefined;
1002
+ appSlug?: string | undefined;
1003
+ output: string;
1008
1004
  }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
1009
1005
  type: "vibes-diy.cli.list";
1010
1006
  apiUrl: string;
@@ -1050,24 +1046,15 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
1050
1046
  ms?: number | undefined;
1051
1047
  } | undefined;
1052
1048
  }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
1053
- type: "vibes-diy.cli.pull";
1054
- appSlug: string;
1055
- ownerHandle: string;
1056
- dir: string;
1049
+ type: "vibes-diy.cli.whoami";
1057
1050
  apiUrl: string;
1058
- fsId?: string | undefined;
1059
- published: boolean;
1060
- draft: boolean;
1061
- version?: string | undefined;
1062
1051
  }, {
1063
- type: "vibes-diy.cli.res-pull";
1064
- appSlug: string;
1065
- ownerHandle: string;
1066
- directory: string;
1067
- files: {
1068
- name: string;
1069
- size: number;
1070
- }[];
1052
+ type: "vibes-diy.cli.res-whoami";
1053
+ authenticated: boolean;
1054
+ userId?: string | undefined;
1055
+ defaultHandle?: string | undefined;
1056
+ handles: string[];
1057
+ detail?: string | undefined;
1071
1058
  }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
1072
1059
  type: "vibes-diy.cli.run";
1073
1060
  apiUrl: string;
@@ -1777,12 +1764,25 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
1777
1764
  id: string;
1778
1765
  ok: true;
1779
1766
  }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
1780
- type: "vibes-diy.cli.db.subscribe";
1767
+ type: "vibes-diy.cli.db.query";
1781
1768
  apiUrl: string;
1782
1769
  appSlug: string;
1783
1770
  ownerHandle: string;
1784
1771
  dbName: string;
1785
- }, never> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
1772
+ field: string;
1773
+ key: string;
1774
+ prefix: string;
1775
+ range: string;
1776
+ limit: number;
1777
+ descending: boolean;
1778
+ admin: boolean;
1779
+ actingHandle: string;
1780
+ }, {
1781
+ type: "vibes-diy.cli.db.query-res";
1782
+ docs: {
1783
+ [x: string]: unknown;
1784
+ }[];
1785
+ }> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
1786
1786
  type: "vibes-diy.cli.db.seed";
1787
1787
  action: "add" | "remove";
1788
1788
  apiUrl: string;
@@ -57,6 +57,10 @@ export interface PushFromDirOptions {
57
57
  };
58
58
  fileSystem: VibeFile[];
59
59
  }) => Promise<Result<unknown>>;
60
+ getAppByFsId?: (req: {
61
+ ownerHandle: string;
62
+ appSlug: string;
63
+ }) => Promise<Result<unknown>>;
60
64
  listUserSlugAppSlug: (req: {
61
65
  ownerHandle?: string;
62
66
  appSlug?: string;
@@ -144,6 +144,17 @@ export function pushFromRefusalMessage(err, from) {
144
144
  }
145
145
  return undefined;
146
146
  }
147
+ async function servingFsId(api, at) {
148
+ if (api.getAppByFsId === undefined)
149
+ return undefined;
150
+ const r = await exception2Result(() => api.getAppByFsId?.({ ownerHandle: at.ownerHandle, appSlug: at.appSlug }) ?? Result.Ok(undefined));
151
+ if (r.isErr())
152
+ return undefined;
153
+ const res = r.Ok();
154
+ if (res?.type !== "vibes.diy.res-get-app-by-fsid" || res.error !== undefined)
155
+ return undefined;
156
+ return typeof res.fsId === "string" && res.fsId !== "" ? res.fsId : undefined;
157
+ }
147
158
  export const NEW_PUBLIC_APP_NOTICE = "Public: anyone with the link can open it. Use --access private to share it only with people you invite.";
148
159
  export async function pushFromDir(opts) {
149
160
  const evCtx = opts.ctx;
@@ -277,6 +288,13 @@ export async function pushFromDir(opts) {
277
288
  }
278
289
  for (const w of result.backendWarnings ?? [])
279
290
  await note("warn", `backend.js: ${w}`);
291
+ const live = opts.mode === "production" ? await servingFsId(opts.api, result) : undefined;
292
+ if (live !== undefined && live !== result.fsId) {
293
+ return Result.Err(`Pushed release ${result.fsId} to ${result.ownerHandle}/${result.appSlug}, but the release that serves is ${live}, ` +
294
+ `most likely from another push at the same moment. The server still attempted this push's access.js and backend.js bindings, ` +
295
+ `so the app's access rules and backend may have changed under the serving release. Push again to make this release the one that serves; ` +
296
+ `\`vibes-diy versions\` lists every release.`);
297
+ }
280
298
  await note("info", `Deployed: ${result.ownerHandle}/${result.appSlug}`);
281
299
  await note("info", `URL: ${publicUrl}`);
282
300
  if (result.appCreated === true && opts.mode === "production" && opts.posture === "open") {