vibes-diy 12.3.0 → 12.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/cmd-evento.d.ts +183 -181
- package/cli/cmds/access-wizard.d.ts +39 -0
- package/cli/cmds/access-wizard.js +58 -0
- package/cli/cmds/access-wizard.js.map +1 -0
- package/cli/cmds/access-wizard.test.d.ts +1 -0
- package/cli/cmds/access-wizard.test.js +112 -0
- package/cli/cmds/access-wizard.test.js.map +1 -0
- package/cli/cmds/generate-cmd.d.ts +3 -0
- package/cli/cmds/generate-cmd.js +6 -0
- package/cli/cmds/generate-cmd.js.map +1 -1
- package/cli/cmds/generate-cmd.test.js +3 -0
- package/cli/cmds/generate-cmd.test.js.map +1 -1
- package/cli/cmds/generate-core.d.ts +1 -0
- package/cli/cmds/generate-core.js +3 -0
- package/cli/cmds/generate-core.js.map +1 -1
- package/cli/cmds/generate-core.test.js +6 -0
- package/cli/cmds/generate-core.test.js.map +1 -1
- package/cli/cmds/push-access-flags.test.d.ts +1 -0
- package/cli/cmds/push-access-flags.test.js +51 -0
- package/cli/cmds/push-access-flags.test.js.map +1 -0
- package/cli/cmds/push-cmd.d.ts +12 -7
- package/cli/cmds/push-cmd.js +39 -11
- package/cli/cmds/push-cmd.js.map +1 -1
- package/cli/cmds/push-from-dir.d.ts +11 -25
- package/cli/cmds/push-from-dir.js +55 -32
- package/cli/cmds/push-from-dir.js.map +1 -1
- package/cli/cmds/push-from-dir.test.js +202 -24
- package/cli/cmds/push-from-dir.test.js.map +1 -1
- package/package.json +8 -8
package/cli/cmd-evento.d.ts
CHANGED
|
@@ -2,46 +2,151 @@ 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: "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
locality: string;
|
|
9
|
-
state: string;
|
|
10
|
-
country: string;
|
|
11
|
-
caUrl: string;
|
|
12
|
-
port: string;
|
|
13
|
-
timeout: string;
|
|
14
|
-
forceRenew: boolean;
|
|
5
|
+
type: "vibes-diy.cli.user-settings";
|
|
6
|
+
apiUrl: string;
|
|
7
|
+
setDefaultHandle?: string | undefined;
|
|
15
8
|
}, {
|
|
16
|
-
type: "
|
|
17
|
-
|
|
9
|
+
type: "vibes.diy.res-ensure-user-settings";
|
|
10
|
+
userId: string;
|
|
11
|
+
settings: ({
|
|
12
|
+
type: "sharing";
|
|
13
|
+
grants: {
|
|
14
|
+
grant: "allow" | "deny";
|
|
15
|
+
appSlug: string;
|
|
16
|
+
ownerHandle: string;
|
|
17
|
+
dbName: string;
|
|
18
|
+
}[];
|
|
19
|
+
} | {
|
|
20
|
+
type: "modelDefaults";
|
|
21
|
+
codegen?: {
|
|
22
|
+
model?: {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
description: string;
|
|
26
|
+
featured?: boolean | undefined;
|
|
27
|
+
preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
28
|
+
fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
29
|
+
supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
30
|
+
imageInput?: boolean | undefined;
|
|
31
|
+
} | undefined;
|
|
32
|
+
apiKey?: string | undefined;
|
|
33
|
+
} | undefined;
|
|
34
|
+
runtime?: {
|
|
35
|
+
model?: {
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
description: string;
|
|
39
|
+
featured?: boolean | undefined;
|
|
40
|
+
preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
41
|
+
fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
42
|
+
supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
43
|
+
imageInput?: boolean | undefined;
|
|
44
|
+
} | undefined;
|
|
45
|
+
apiKey?: string | undefined;
|
|
46
|
+
} | undefined;
|
|
47
|
+
img?: {
|
|
48
|
+
model?: {
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
description: string;
|
|
52
|
+
featured?: boolean | undefined;
|
|
53
|
+
preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
54
|
+
fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
55
|
+
supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
56
|
+
imageInput?: boolean | undefined;
|
|
57
|
+
} | undefined;
|
|
58
|
+
apiKey?: string | undefined;
|
|
59
|
+
} | undefined;
|
|
60
|
+
chat?: {
|
|
61
|
+
model?: {
|
|
62
|
+
id: string;
|
|
63
|
+
name: string;
|
|
64
|
+
description: string;
|
|
65
|
+
featured?: boolean | undefined;
|
|
66
|
+
preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
67
|
+
fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
68
|
+
supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
69
|
+
imageInput?: boolean | undefined;
|
|
70
|
+
} | undefined;
|
|
71
|
+
apiKey?: string | undefined;
|
|
72
|
+
} | undefined;
|
|
73
|
+
app?: {
|
|
74
|
+
model?: {
|
|
75
|
+
id: string;
|
|
76
|
+
name: string;
|
|
77
|
+
description: string;
|
|
78
|
+
featured?: boolean | undefined;
|
|
79
|
+
preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
80
|
+
fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
81
|
+
supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
82
|
+
imageInput?: boolean | undefined;
|
|
83
|
+
} | undefined;
|
|
84
|
+
apiKey?: string | undefined;
|
|
85
|
+
} | undefined;
|
|
86
|
+
} | {
|
|
87
|
+
type: "defaultHandle";
|
|
88
|
+
ownerHandle: string;
|
|
89
|
+
} | {
|
|
90
|
+
type: "profile";
|
|
91
|
+
avatarCid?: string | undefined;
|
|
92
|
+
displayName?: string | undefined;
|
|
93
|
+
} | {
|
|
94
|
+
type: "notifications";
|
|
95
|
+
buildComplete?: boolean | undefined;
|
|
96
|
+
buildFailed?: boolean | undefined;
|
|
97
|
+
vibePublished?: boolean | undefined;
|
|
98
|
+
commentPosted?: boolean | undefined;
|
|
99
|
+
requestApproved?: boolean | undefined;
|
|
100
|
+
requestRevoked?: boolean | undefined;
|
|
101
|
+
vibeRemixed?: boolean | undefined;
|
|
102
|
+
dmReceived?: boolean | undefined;
|
|
103
|
+
memberJoined?: boolean | undefined;
|
|
104
|
+
accessRequested?: boolean | undefined;
|
|
105
|
+
emailDigest?: boolean | undefined;
|
|
106
|
+
followRequest?: boolean | undefined;
|
|
107
|
+
followerAdded?: boolean | undefined;
|
|
108
|
+
followApproved?: boolean | undefined;
|
|
109
|
+
appMessage?: boolean | undefined;
|
|
110
|
+
} | {
|
|
111
|
+
type: "egressStatus";
|
|
112
|
+
status: "blessed" | "blocked";
|
|
113
|
+
updatedAt: string;
|
|
114
|
+
setBy?: string | undefined;
|
|
115
|
+
} | {
|
|
116
|
+
type: "contactEmail";
|
|
117
|
+
email: string;
|
|
118
|
+
updatedAt: string;
|
|
119
|
+
} | {
|
|
120
|
+
type: "onboarding";
|
|
121
|
+
completedAt: string;
|
|
122
|
+
} | {
|
|
123
|
+
type: "defaultHandle";
|
|
124
|
+
ownerHandle: string;
|
|
125
|
+
})[];
|
|
126
|
+
updated: string;
|
|
127
|
+
created: string;
|
|
18
128
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
19
|
-
type: "vibes
|
|
129
|
+
type: "use-vibes.cli.themes";
|
|
20
130
|
}, {
|
|
21
|
-
type: "vibes
|
|
22
|
-
|
|
131
|
+
type: "use-vibes.cli.res-themes-list";
|
|
132
|
+
themes: {
|
|
133
|
+
slug: string;
|
|
23
134
|
name: string;
|
|
24
|
-
description: string;
|
|
25
135
|
}[];
|
|
26
136
|
} | {
|
|
27
|
-
type: "vibes
|
|
28
|
-
|
|
137
|
+
type: "use-vibes.cli.res-theme-content";
|
|
138
|
+
slug: string;
|
|
29
139
|
content: string;
|
|
30
140
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
31
|
-
type: "vibes-diy.cli.
|
|
32
|
-
file: string;
|
|
33
|
-
appSlug: string;
|
|
34
|
-
ownerHandle: string;
|
|
141
|
+
type: "vibes-diy.cli.claim-handle";
|
|
35
142
|
apiUrl: string;
|
|
36
|
-
|
|
37
|
-
verifyFetch: boolean;
|
|
143
|
+
ownerHandle?: string | undefined;
|
|
38
144
|
}, {
|
|
39
|
-
type: "vibes-diy.cli.res-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
verified?: boolean | undefined;
|
|
145
|
+
type: "vibes-diy.cli.res-claim-handle";
|
|
146
|
+
op: "claim" | "suggest";
|
|
147
|
+
ownerHandle?: string | undefined;
|
|
148
|
+
defaultHandleSet?: boolean | undefined;
|
|
149
|
+
suggestions: string[];
|
|
45
150
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
46
151
|
type: "vibes-diy.cli.db.del";
|
|
47
152
|
apiUrl: string;
|
|
@@ -69,6 +174,12 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
69
174
|
model?: string | undefined;
|
|
70
175
|
apiKey?: string | undefined;
|
|
71
176
|
}, {
|
|
177
|
+
type: "vibes-diy.cli.res-edit";
|
|
178
|
+
appSlug: string;
|
|
179
|
+
ownerHandle: string;
|
|
180
|
+
url: string;
|
|
181
|
+
directory: string;
|
|
182
|
+
} | {
|
|
72
183
|
appSlug: string;
|
|
73
184
|
ownerHandle: string;
|
|
74
185
|
mode: "dev" | "production";
|
|
@@ -121,20 +232,14 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
121
232
|
type: "vibes.diy.res-error";
|
|
122
233
|
error: {
|
|
123
234
|
message: string;
|
|
124
|
-
code: "
|
|
235
|
+
code: "max-app-slugs-reached";
|
|
125
236
|
};
|
|
126
237
|
} | {
|
|
127
238
|
type: "vibes.diy.res-error";
|
|
128
239
|
error: {
|
|
129
240
|
message: string;
|
|
130
|
-
code: "
|
|
241
|
+
code: "handle-required";
|
|
131
242
|
};
|
|
132
|
-
} | {
|
|
133
|
-
type: "vibes-diy.cli.res-edit";
|
|
134
|
-
appSlug: string;
|
|
135
|
-
ownerHandle: string;
|
|
136
|
-
url: string;
|
|
137
|
-
directory: string;
|
|
138
243
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
139
244
|
type: "vibes-diy.cli.app-status";
|
|
140
245
|
appSlug: string;
|
|
@@ -182,140 +287,16 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
182
287
|
released: boolean;
|
|
183
288
|
restored: boolean;
|
|
184
289
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
185
|
-
type: "vibes-diy.cli.
|
|
186
|
-
apiUrl: string;
|
|
187
|
-
setDefaultHandle?: string | undefined;
|
|
188
|
-
}, {
|
|
189
|
-
type: "vibes.diy.res-ensure-user-settings";
|
|
190
|
-
userId: string;
|
|
191
|
-
settings: ({
|
|
192
|
-
type: "sharing";
|
|
193
|
-
grants: {
|
|
194
|
-
grant: "allow" | "deny";
|
|
195
|
-
appSlug: string;
|
|
196
|
-
ownerHandle: string;
|
|
197
|
-
dbName: string;
|
|
198
|
-
}[];
|
|
199
|
-
} | {
|
|
200
|
-
type: "modelDefaults";
|
|
201
|
-
codegen?: {
|
|
202
|
-
model?: {
|
|
203
|
-
id: string;
|
|
204
|
-
name: string;
|
|
205
|
-
description: string;
|
|
206
|
-
featured?: boolean | undefined;
|
|
207
|
-
preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
208
|
-
fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
209
|
-
supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
210
|
-
imageInput?: boolean | undefined;
|
|
211
|
-
} | undefined;
|
|
212
|
-
apiKey?: string | undefined;
|
|
213
|
-
} | undefined;
|
|
214
|
-
runtime?: {
|
|
215
|
-
model?: {
|
|
216
|
-
id: string;
|
|
217
|
-
name: string;
|
|
218
|
-
description: string;
|
|
219
|
-
featured?: boolean | undefined;
|
|
220
|
-
preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
221
|
-
fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
222
|
-
supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
223
|
-
imageInput?: boolean | undefined;
|
|
224
|
-
} | undefined;
|
|
225
|
-
apiKey?: string | undefined;
|
|
226
|
-
} | undefined;
|
|
227
|
-
img?: {
|
|
228
|
-
model?: {
|
|
229
|
-
id: string;
|
|
230
|
-
name: string;
|
|
231
|
-
description: string;
|
|
232
|
-
featured?: boolean | undefined;
|
|
233
|
-
preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
234
|
-
fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
235
|
-
supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
236
|
-
imageInput?: boolean | undefined;
|
|
237
|
-
} | undefined;
|
|
238
|
-
apiKey?: string | undefined;
|
|
239
|
-
} | undefined;
|
|
240
|
-
chat?: {
|
|
241
|
-
model?: {
|
|
242
|
-
id: string;
|
|
243
|
-
name: string;
|
|
244
|
-
description: string;
|
|
245
|
-
featured?: boolean | undefined;
|
|
246
|
-
preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
247
|
-
fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
248
|
-
supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
249
|
-
imageInput?: boolean | undefined;
|
|
250
|
-
} | undefined;
|
|
251
|
-
apiKey?: string | undefined;
|
|
252
|
-
} | undefined;
|
|
253
|
-
app?: {
|
|
254
|
-
model?: {
|
|
255
|
-
id: string;
|
|
256
|
-
name: string;
|
|
257
|
-
description: string;
|
|
258
|
-
featured?: boolean | undefined;
|
|
259
|
-
preSelected?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
260
|
-
fallbackFor?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
261
|
-
supports?: ("app" | "chat" | "codegen" | "img" | "img-edit" | "runtime")[] | undefined;
|
|
262
|
-
imageInput?: boolean | undefined;
|
|
263
|
-
} | undefined;
|
|
264
|
-
apiKey?: string | undefined;
|
|
265
|
-
} | undefined;
|
|
266
|
-
} | {
|
|
267
|
-
type: "defaultHandle";
|
|
268
|
-
ownerHandle: string;
|
|
269
|
-
} | {
|
|
270
|
-
type: "profile";
|
|
271
|
-
avatarCid?: string | undefined;
|
|
272
|
-
displayName?: string | undefined;
|
|
273
|
-
} | {
|
|
274
|
-
type: "notifications";
|
|
275
|
-
buildComplete?: boolean | undefined;
|
|
276
|
-
buildFailed?: boolean | undefined;
|
|
277
|
-
vibePublished?: boolean | undefined;
|
|
278
|
-
commentPosted?: boolean | undefined;
|
|
279
|
-
requestApproved?: boolean | undefined;
|
|
280
|
-
requestRevoked?: boolean | undefined;
|
|
281
|
-
vibeRemixed?: boolean | undefined;
|
|
282
|
-
dmReceived?: boolean | undefined;
|
|
283
|
-
memberJoined?: boolean | undefined;
|
|
284
|
-
accessRequested?: boolean | undefined;
|
|
285
|
-
emailDigest?: boolean | undefined;
|
|
286
|
-
followRequest?: boolean | undefined;
|
|
287
|
-
followerAdded?: boolean | undefined;
|
|
288
|
-
followApproved?: boolean | undefined;
|
|
289
|
-
appMessage?: boolean | undefined;
|
|
290
|
-
} | {
|
|
291
|
-
type: "egressStatus";
|
|
292
|
-
status: "blessed" | "blocked";
|
|
293
|
-
updatedAt: string;
|
|
294
|
-
setBy?: string | undefined;
|
|
295
|
-
} | {
|
|
296
|
-
type: "contactEmail";
|
|
297
|
-
email: string;
|
|
298
|
-
updatedAt: string;
|
|
299
|
-
} | {
|
|
300
|
-
type: "onboarding";
|
|
301
|
-
completedAt: string;
|
|
302
|
-
} | {
|
|
303
|
-
type: "defaultHandle";
|
|
304
|
-
ownerHandle: string;
|
|
305
|
-
})[];
|
|
306
|
-
updated: string;
|
|
307
|
-
created: string;
|
|
308
|
-
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
309
|
-
type: "use-vibes.cli.themes";
|
|
290
|
+
type: "vibes-diy.cli.skills";
|
|
310
291
|
}, {
|
|
311
|
-
type: "
|
|
312
|
-
|
|
313
|
-
slug: string;
|
|
292
|
+
type: "vibes-diy.cli.res-skills-list";
|
|
293
|
+
skills: {
|
|
314
294
|
name: string;
|
|
295
|
+
description: string;
|
|
315
296
|
}[];
|
|
316
297
|
} | {
|
|
317
|
-
type: "
|
|
318
|
-
|
|
298
|
+
type: "vibes-diy.cli.res-skill-content";
|
|
299
|
+
name: string;
|
|
319
300
|
content: string;
|
|
320
301
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
321
302
|
type: "vibes-diy.cli.system";
|
|
@@ -327,10 +308,11 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
327
308
|
mode: string;
|
|
328
309
|
appSlug: string;
|
|
329
310
|
ownerHandle: string;
|
|
330
|
-
|
|
331
|
-
publicAccess?: boolean | undefined;
|
|
311
|
+
access?: string | undefined;
|
|
332
312
|
privateMode?: boolean | undefined;
|
|
313
|
+
noAccessFn?: boolean | undefined;
|
|
333
314
|
message?: string | undefined;
|
|
315
|
+
apiKey?: string | undefined;
|
|
334
316
|
apiUrl: string;
|
|
335
317
|
idleTimeoutMs?: number | undefined;
|
|
336
318
|
}, {
|
|
@@ -386,30 +368,36 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
386
368
|
type: "vibes.diy.res-error";
|
|
387
369
|
error: {
|
|
388
370
|
message: string;
|
|
389
|
-
code: "
|
|
371
|
+
code: "max-app-slugs-reached";
|
|
390
372
|
};
|
|
391
373
|
} | {
|
|
392
374
|
type: "vibes.diy.res-error";
|
|
393
375
|
error: {
|
|
394
376
|
message: string;
|
|
395
|
-
code: "
|
|
377
|
+
code: "handle-required";
|
|
396
378
|
};
|
|
397
379
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
398
|
-
type: "vibes-diy.cli.
|
|
380
|
+
type: "vibes-diy.cli.put-asset";
|
|
381
|
+
file: string;
|
|
382
|
+
appSlug: string;
|
|
383
|
+
ownerHandle: string;
|
|
399
384
|
apiUrl: string;
|
|
400
|
-
|
|
385
|
+
mimeType: string;
|
|
386
|
+
verifyFetch: boolean;
|
|
401
387
|
}, {
|
|
402
|
-
type: "vibes-diy.cli.res-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
388
|
+
type: "vibes-diy.cli.res-put-asset";
|
|
389
|
+
cid: string;
|
|
390
|
+
getURL: string;
|
|
391
|
+
size: number;
|
|
392
|
+
uploadId: string;
|
|
393
|
+
verified?: boolean | undefined;
|
|
407
394
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
408
395
|
type: "vibes-diy.cli.generate";
|
|
409
396
|
prompt: string;
|
|
410
397
|
appSlug: string;
|
|
411
398
|
ownerHandle: string;
|
|
412
399
|
instantJoin?: boolean | undefined;
|
|
400
|
+
noAccessFn?: boolean | undefined;
|
|
413
401
|
verbose: boolean;
|
|
414
402
|
apiUrl: string;
|
|
415
403
|
dryRun: boolean;
|
|
@@ -470,13 +458,13 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
470
458
|
type: "vibes.diy.res-error";
|
|
471
459
|
error: {
|
|
472
460
|
message: string;
|
|
473
|
-
code: "
|
|
461
|
+
code: "max-app-slugs-reached";
|
|
474
462
|
};
|
|
475
463
|
} | {
|
|
476
464
|
type: "vibes.diy.res-error";
|
|
477
465
|
error: {
|
|
478
466
|
message: string;
|
|
479
|
-
code: "
|
|
467
|
+
code: "handle-required";
|
|
480
468
|
};
|
|
481
469
|
} | {
|
|
482
470
|
type: "vibes-diy.cli.res-generate";
|
|
@@ -680,6 +668,20 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
680
668
|
updated: string;
|
|
681
669
|
created?: string | undefined;
|
|
682
670
|
}[];
|
|
671
|
+
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
672
|
+
type: "core-cli.device-id-register";
|
|
673
|
+
commonName: string;
|
|
674
|
+
organization: string;
|
|
675
|
+
locality: string;
|
|
676
|
+
state: string;
|
|
677
|
+
country: string;
|
|
678
|
+
caUrl: string;
|
|
679
|
+
port: string;
|
|
680
|
+
timeout: string;
|
|
681
|
+
forceRenew: boolean;
|
|
682
|
+
}, {
|
|
683
|
+
type: "core-cli.res-device-id-register";
|
|
684
|
+
output: string;
|
|
683
685
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
684
686
|
type: "vibes-diy.cli.db.list";
|
|
685
687
|
apiUrl: string;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Result } from "@adviser/cement";
|
|
2
|
+
import { accessFnProposesAnonymousWrites } from "@vibes.diy/api-types";
|
|
3
|
+
import type { SelectedSlotInput, VibeFile } from "@vibes.diy/api-types";
|
|
4
|
+
import type { LLMRequest } from "@vibes.diy/call-ai-v2";
|
|
5
|
+
export declare const CLI_ACCESS_WIZARD_PROMPT = "Set up data access control rules before opening this app to everyone with the link.";
|
|
6
|
+
export declare const ACCESS_FN_FILENAME = "access.js";
|
|
7
|
+
export interface AccessWizardChat {
|
|
8
|
+
readonly sectionStream: ReadableStream<unknown>;
|
|
9
|
+
prompt(req: LLMRequest, opts?: {
|
|
10
|
+
variant?: "access-wizard" | "upgrade-backend" | "discuss" | "work";
|
|
11
|
+
apiKey?: string;
|
|
12
|
+
selected?: SelectedSlotInput;
|
|
13
|
+
}): Promise<Result<{
|
|
14
|
+
promptId: string;
|
|
15
|
+
}, unknown>>;
|
|
16
|
+
close(force?: boolean): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export interface AccessWizardApi {
|
|
19
|
+
openChat(req: {
|
|
20
|
+
ownerHandle?: string;
|
|
21
|
+
appSlug: string;
|
|
22
|
+
mode: "codegen";
|
|
23
|
+
}): Promise<Result<AccessWizardChat, unknown>>;
|
|
24
|
+
}
|
|
25
|
+
export interface RunAccessWizardArgs {
|
|
26
|
+
readonly api: AccessWizardApi;
|
|
27
|
+
readonly ownerHandle: string;
|
|
28
|
+
readonly appSlug: string;
|
|
29
|
+
readonly files: readonly VibeFile[];
|
|
30
|
+
readonly apiKey?: string;
|
|
31
|
+
readonly note: (level: "info" | "warn", message: string) => void | Promise<void>;
|
|
32
|
+
}
|
|
33
|
+
export interface AccessWizardResult {
|
|
34
|
+
readonly source: string;
|
|
35
|
+
readonly files: Readonly<Record<string, string>>;
|
|
36
|
+
readonly declaresAnonymous: boolean;
|
|
37
|
+
}
|
|
38
|
+
export declare const declaresAllowAnonymous: typeof accessFnProposesAnonymousWrites;
|
|
39
|
+
export declare function runAccessWizard(args: RunAccessWizardArgs): Promise<Result<AccessWizardResult>>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Result } from "@adviser/cement";
|
|
2
|
+
import { accessFnProposesAnonymousWrites, isSectionEvent } from "@vibes.diy/api-types";
|
|
3
|
+
import { resolveSectionStream } from "./resolve-section-stream.js";
|
|
4
|
+
export const CLI_ACCESS_WIZARD_PROMPT = "Set up data access control rules before opening this app to everyone with the link.";
|
|
5
|
+
export const ACCESS_FN_FILENAME = "access.js";
|
|
6
|
+
export const declaresAllowAnonymous = accessFnProposesAnonymousWrites;
|
|
7
|
+
export async function runAccessWizard(args) {
|
|
8
|
+
await args.note("info", "No access.js found — running the access wizard before going public (this is a codegen turn).");
|
|
9
|
+
const rChat = await args.api.openChat({ ownerHandle: args.ownerHandle, appSlug: args.appSlug, mode: "codegen" });
|
|
10
|
+
if (rChat.isErr()) {
|
|
11
|
+
return Result.Err(`Access wizard failed to open a chat: ${JSON.stringify(rChat.Err())}`);
|
|
12
|
+
}
|
|
13
|
+
const chat = rChat.Ok();
|
|
14
|
+
const draft = {
|
|
15
|
+
kind: "draft",
|
|
16
|
+
files: args.files.flatMap((f) => "content" in f && typeof f.content === "string"
|
|
17
|
+
? [{ type: "code-block", lang: langOf(f.filename), filename: f.filename, content: f.content }]
|
|
18
|
+
: []),
|
|
19
|
+
};
|
|
20
|
+
const rPrompt = await chat.prompt({ messages: [{ role: "user", content: [{ type: "text", text: CLI_ACCESS_WIZARD_PROMPT }] }] }, { variant: "access-wizard", selected: draft, ...(args.apiKey === undefined ? {} : { apiKey: args.apiKey }) });
|
|
21
|
+
if (rPrompt.isErr()) {
|
|
22
|
+
await chat.close();
|
|
23
|
+
return Result.Err(`Access wizard turn was refused: ${JSON.stringify(rPrompt.Err())}`);
|
|
24
|
+
}
|
|
25
|
+
const sectionOnly = chat.sectionStream.pipeThrough(new TransformStream({
|
|
26
|
+
transform(msg, controller) {
|
|
27
|
+
if (isSectionEvent(msg))
|
|
28
|
+
controller.enqueue(msg);
|
|
29
|
+
},
|
|
30
|
+
}));
|
|
31
|
+
const rResolved = await resolveSectionStream({
|
|
32
|
+
sectionStream: sectionOnly,
|
|
33
|
+
streamId: rPrompt.Ok().promptId,
|
|
34
|
+
seed: new Map(args.files.flatMap((f) => "content" in f && typeof f.content === "string" ? [[stripLeadingSlash(f.filename), f.content]] : [])),
|
|
35
|
+
});
|
|
36
|
+
await chat.close();
|
|
37
|
+
if (rResolved.isErr()) {
|
|
38
|
+
return Result.Err(`Access wizard stream failed: ${rResolved.Err().message}`);
|
|
39
|
+
}
|
|
40
|
+
const files = rResolved.Ok().files;
|
|
41
|
+
const source = files[ACCESS_FN_FILENAME];
|
|
42
|
+
if (source === undefined || source.trim() === "") {
|
|
43
|
+
return Result.Err("Access wizard finished without writing an access.js. Nothing was published — re-run the push, or pass --no-access-fn to publish without data access rules.");
|
|
44
|
+
}
|
|
45
|
+
const declaresAnonymous = declaresAllowAnonymous(source);
|
|
46
|
+
await args.note("info", declaresAnonymous
|
|
47
|
+
? "Access wizard wrote access.js (anonymous submissions declared — publishing with anonymous writes admitted)."
|
|
48
|
+
: "Access wizard wrote access.js.");
|
|
49
|
+
return Result.Ok({ source, files, declaresAnonymous });
|
|
50
|
+
}
|
|
51
|
+
function stripLeadingSlash(path) {
|
|
52
|
+
return path.startsWith("/") ? path.slice(1) : path;
|
|
53
|
+
}
|
|
54
|
+
function langOf(filename) {
|
|
55
|
+
const dot = filename.lastIndexOf(".");
|
|
56
|
+
return dot === -1 ? "js" : filename.slice(dot + 1).toLowerCase();
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=access-wizard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"access-wizard.js","sourceRoot":"","sources":["../../../jsr/c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