vibes-diy 12.3.0 → 12.3.2
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 +197 -181
- package/cli/cmd-evento.js +2 -1
- package/cli/cmd-evento.js.map +1 -1
- package/cli/cmd-request-dispatch.test.d.ts +1 -0
- package/cli/cmd-request-dispatch.test.js +67 -0
- package/cli/cmd-request-dispatch.test.js.map +1 -0
- 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/app/chips-cmd.d.ts +50 -0
- package/cli/cmds/app/chips-cmd.js +145 -0
- package/cli/cmds/app/chips-cmd.js.map +1 -0
- package/cli/cmds/app/chips-render.test.d.ts +1 -0
- package/cli/cmds/app/chips-render.test.js +30 -0
- package/cli/cmds/app/chips-render.test.js.map +1 -0
- package/cli/cmds/app/index.d.ts +33 -0
- package/cli/cmds/app/index.js +4 -1
- package/cli/cmds/app/index.js.map +1 -1
- 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 +48 -13
- 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 +57 -32
- package/cli/cmds/push-from-dir.js.map +1 -1
- package/cli/cmds/push-from-dir.test.js +245 -24
- package/cli/cmds/push-from-dir.test.js.map +1 -1
- package/cli/main.js +13 -1
- package/cli/main.js.map +1 -1
- package/package.json +8 -8
package/cli/cmd-evento.d.ts
CHANGED
|
@@ -16,146 +16,97 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
16
16
|
type: "core-cli.res-device-id-register";
|
|
17
17
|
output: string;
|
|
18
18
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
19
|
-
type: "vibes-diy.cli.
|
|
19
|
+
type: "vibes-diy.cli.system";
|
|
20
20
|
}, {
|
|
21
|
-
type: "vibes-diy.cli.res-
|
|
22
|
-
|
|
23
|
-
name: string;
|
|
24
|
-
description: string;
|
|
25
|
-
}[];
|
|
26
|
-
} | {
|
|
27
|
-
type: "vibes-diy.cli.res-skill-content";
|
|
28
|
-
name: string;
|
|
29
|
-
content: string;
|
|
21
|
+
type: "vibes-diy.cli.res-system";
|
|
22
|
+
systemPrompt: string;
|
|
30
23
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
31
|
-
type: "vibes-diy.cli.
|
|
32
|
-
|
|
24
|
+
type: "vibes-diy.cli.db.list";
|
|
25
|
+
apiUrl: string;
|
|
33
26
|
appSlug: string;
|
|
34
27
|
ownerHandle: string;
|
|
35
|
-
apiUrl: string;
|
|
36
|
-
mimeType: string;
|
|
37
|
-
verifyFetch: boolean;
|
|
38
28
|
}, {
|
|
39
|
-
type: "vibes-diy.cli.res
|
|
40
|
-
|
|
41
|
-
getURL: string;
|
|
42
|
-
size: number;
|
|
43
|
-
uploadId: string;
|
|
44
|
-
verified?: boolean | undefined;
|
|
29
|
+
type: "vibes-diy.cli.db.list-res";
|
|
30
|
+
dbNames: string[];
|
|
45
31
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
46
|
-
type: "vibes-diy.cli.db.
|
|
32
|
+
type: "vibes-diy.cli.db.query";
|
|
47
33
|
apiUrl: string;
|
|
48
34
|
appSlug: string;
|
|
49
35
|
ownerHandle: string;
|
|
50
36
|
dbName: string;
|
|
51
|
-
|
|
52
|
-
|
|
37
|
+
field: string;
|
|
38
|
+
key: string;
|
|
39
|
+
prefix: string;
|
|
40
|
+
range: string;
|
|
41
|
+
limit: number;
|
|
42
|
+
descending: boolean;
|
|
53
43
|
}, {
|
|
54
|
-
type: "vibes-diy.cli.db.
|
|
55
|
-
|
|
56
|
-
|
|
44
|
+
type: "vibes-diy.cli.db.query-res";
|
|
45
|
+
docs: {
|
|
46
|
+
[x: string]: unknown;
|
|
47
|
+
}[];
|
|
57
48
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
58
|
-
type: "vibes-diy.cli.
|
|
49
|
+
type: "vibes-diy.cli.codegen-log";
|
|
59
50
|
appSlug: string;
|
|
60
|
-
prompt: string;
|
|
61
51
|
ownerHandle: string;
|
|
62
|
-
|
|
63
|
-
verbose: boolean;
|
|
64
|
-
dir: string;
|
|
52
|
+
chatId?: string | undefined;
|
|
65
53
|
apiUrl: string;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
54
|
+
response?: boolean | undefined;
|
|
55
|
+
raw?: boolean | undefined;
|
|
56
|
+
files?: boolean | undefined;
|
|
57
|
+
jsonl?: boolean | undefined;
|
|
58
|
+
user?: boolean | undefined;
|
|
59
|
+
promptId?: string | undefined;
|
|
71
60
|
}, {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
mode: "dev" | "production";
|
|
75
|
-
fsId: string;
|
|
76
|
-
type: "vibes.diy.res-ensure-app-slug";
|
|
77
|
-
env: Record<string, string>;
|
|
78
|
-
fileSystem: {
|
|
79
|
-
fileName: string;
|
|
80
|
-
mimeType: string;
|
|
81
|
-
assetId: string;
|
|
82
|
-
assetURI: string;
|
|
83
|
-
transform?: {
|
|
84
|
-
type: "jsx-to-js";
|
|
85
|
-
transformedAssetId: string;
|
|
86
|
-
} | {
|
|
87
|
-
type: "imports";
|
|
88
|
-
importMapAssetId: string;
|
|
89
|
-
} | {
|
|
90
|
-
type: "import-map";
|
|
91
|
-
fromAssetIds: string[];
|
|
92
|
-
} | {
|
|
93
|
-
type: "transformed";
|
|
94
|
-
action: "jsx-to-js";
|
|
95
|
-
transformedAssetId: string;
|
|
96
|
-
} | {
|
|
97
|
-
type: "tailwind-css";
|
|
98
|
-
} | undefined;
|
|
99
|
-
entryPoint?: boolean | undefined;
|
|
100
|
-
size: number;
|
|
101
|
-
}[];
|
|
102
|
-
} | {
|
|
103
|
-
type: "vibes.diy.res-error";
|
|
104
|
-
error: {
|
|
105
|
-
message: string;
|
|
106
|
-
code: "require-login";
|
|
107
|
-
};
|
|
108
|
-
} | {
|
|
109
|
-
type: "vibes.diy.res-error";
|
|
110
|
-
error: {
|
|
111
|
-
message: string;
|
|
112
|
-
code: "user-slug-invalid";
|
|
113
|
-
};
|
|
114
|
-
} | {
|
|
115
|
-
type: "vibes.diy.res-error";
|
|
116
|
-
error: {
|
|
117
|
-
message: string;
|
|
118
|
-
code: "app-slug-invalid";
|
|
119
|
-
};
|
|
120
|
-
} | {
|
|
121
|
-
type: "vibes.diy.res-error";
|
|
122
|
-
error: {
|
|
123
|
-
message: string;
|
|
124
|
-
code: "handle-required";
|
|
125
|
-
};
|
|
61
|
+
type: "vibes-diy.cli.res-codegen-log-response";
|
|
62
|
+
output: string;
|
|
126
63
|
} | {
|
|
127
|
-
type: "vibes
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
64
|
+
type: "vibes-diy.cli.res-codegen-log-list";
|
|
65
|
+
items: {
|
|
66
|
+
chatId: string;
|
|
67
|
+
appSlug: string;
|
|
68
|
+
ownerHandle: string;
|
|
69
|
+
created: string;
|
|
70
|
+
}[];
|
|
132
71
|
} | {
|
|
133
|
-
type: "vibes-diy.cli.res-
|
|
134
|
-
|
|
72
|
+
type: "vibes-diy.cli.res-codegen-log-detail";
|
|
73
|
+
chatId: string;
|
|
135
74
|
ownerHandle: string;
|
|
136
|
-
|
|
137
|
-
|
|
75
|
+
appSlug: string;
|
|
76
|
+
prompts: {
|
|
77
|
+
prompt: string;
|
|
78
|
+
fsId: string;
|
|
79
|
+
created: string;
|
|
80
|
+
}[];
|
|
138
81
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
139
|
-
type: "vibes-diy.cli.
|
|
82
|
+
type: "vibes-diy.cli.list";
|
|
83
|
+
apiUrl: string;
|
|
84
|
+
}, {
|
|
85
|
+
type: "vibes-diy.cli.res-list";
|
|
86
|
+
items: {
|
|
87
|
+
ownerHandle: string;
|
|
88
|
+
appSlug: string;
|
|
89
|
+
updated: string;
|
|
90
|
+
title?: string | undefined;
|
|
91
|
+
icon?: {
|
|
92
|
+
cid: string;
|
|
93
|
+
mime: string;
|
|
94
|
+
} | undefined;
|
|
95
|
+
pinnedAt?: string | undefined;
|
|
96
|
+
unpublishedAt?: string | undefined;
|
|
97
|
+
}[];
|
|
98
|
+
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
99
|
+
type: "vibes-diy.cli.app-rearm";
|
|
140
100
|
appSlug: string;
|
|
141
101
|
ownerHandle: string;
|
|
142
102
|
apiUrl: string;
|
|
143
103
|
}, {
|
|
144
|
-
type: "vibes-diy.cli.res-app-
|
|
104
|
+
type: "vibes-diy.cli.res-app-rearm";
|
|
145
105
|
appSlug: string;
|
|
146
106
|
ownerHandle: string;
|
|
147
107
|
state: "dead" | "healthy" | "overdue" | "running" | "unscheduled";
|
|
148
108
|
intervalMs: number | null;
|
|
149
|
-
armedAt: string | null;
|
|
150
|
-
lastAttemptAt: string | null;
|
|
151
|
-
lastRunAt: string | null;
|
|
152
|
-
lastErrorAt: string | null;
|
|
153
|
-
lastError: string | null;
|
|
154
|
-
attempt: number;
|
|
155
109
|
nextAlarmAt: string | null;
|
|
156
|
-
graceMs: number;
|
|
157
|
-
overdueMs: number;
|
|
158
|
-
healed: boolean;
|
|
159
110
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
160
111
|
type: "vibes-diy.cli.set-unpublish";
|
|
161
112
|
appSlug: string;
|
|
@@ -305,6 +256,18 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
305
256
|
})[];
|
|
306
257
|
updated: string;
|
|
307
258
|
created: string;
|
|
259
|
+
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
260
|
+
type: "vibes-diy.cli.skills";
|
|
261
|
+
}, {
|
|
262
|
+
type: "vibes-diy.cli.res-skills-list";
|
|
263
|
+
skills: {
|
|
264
|
+
name: string;
|
|
265
|
+
description: string;
|
|
266
|
+
}[];
|
|
267
|
+
} | {
|
|
268
|
+
type: "vibes-diy.cli.res-skill-content";
|
|
269
|
+
name: string;
|
|
270
|
+
content: string;
|
|
308
271
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
309
272
|
type: "use-vibes.cli.themes";
|
|
310
273
|
}, {
|
|
@@ -317,20 +280,16 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
317
280
|
type: "use-vibes.cli.res-theme-content";
|
|
318
281
|
slug: string;
|
|
319
282
|
content: string;
|
|
320
|
-
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
321
|
-
type: "vibes-diy.cli.system";
|
|
322
|
-
}, {
|
|
323
|
-
type: "vibes-diy.cli.res-system";
|
|
324
|
-
systemPrompt: string;
|
|
325
283
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
326
284
|
type: "vibes-diy.cli.push";
|
|
327
285
|
mode: string;
|
|
328
286
|
appSlug: string;
|
|
329
287
|
ownerHandle: string;
|
|
330
|
-
|
|
331
|
-
publicAccess?: boolean | undefined;
|
|
288
|
+
access?: string | undefined;
|
|
332
289
|
privateMode?: boolean | undefined;
|
|
290
|
+
noAccessFn?: boolean | undefined;
|
|
333
291
|
message?: string | undefined;
|
|
292
|
+
apiKey?: string | undefined;
|
|
334
293
|
apiUrl: string;
|
|
335
294
|
idleTimeoutMs?: number | undefined;
|
|
336
295
|
}, {
|
|
@@ -404,12 +363,28 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
404
363
|
ownerHandle?: string | undefined;
|
|
405
364
|
defaultHandleSet?: boolean | undefined;
|
|
406
365
|
suggestions: string[];
|
|
366
|
+
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
367
|
+
type: "vibes-diy.cli.put-asset";
|
|
368
|
+
file: string;
|
|
369
|
+
appSlug: string;
|
|
370
|
+
ownerHandle: string;
|
|
371
|
+
apiUrl: string;
|
|
372
|
+
mimeType: string;
|
|
373
|
+
verifyFetch: boolean;
|
|
374
|
+
}, {
|
|
375
|
+
type: "vibes-diy.cli.res-put-asset";
|
|
376
|
+
cid: string;
|
|
377
|
+
getURL: string;
|
|
378
|
+
size: number;
|
|
379
|
+
uploadId: string;
|
|
380
|
+
verified?: boolean | undefined;
|
|
407
381
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
408
382
|
type: "vibes-diy.cli.generate";
|
|
409
383
|
prompt: string;
|
|
410
384
|
appSlug: string;
|
|
411
385
|
ownerHandle: string;
|
|
412
386
|
instantJoin?: boolean | undefined;
|
|
387
|
+
noAccessFn?: boolean | undefined;
|
|
413
388
|
verbose: boolean;
|
|
414
389
|
apiUrl: string;
|
|
415
390
|
dryRun: boolean;
|
|
@@ -507,55 +482,86 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
507
482
|
appSlug?: string | undefined;
|
|
508
483
|
output: string;
|
|
509
484
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
510
|
-
type: "vibes-diy.cli.
|
|
485
|
+
type: "vibes-diy.cli.edit";
|
|
511
486
|
appSlug: string;
|
|
487
|
+
prompt: string;
|
|
512
488
|
ownerHandle: string;
|
|
513
|
-
|
|
489
|
+
instantJoin?: boolean | undefined;
|
|
490
|
+
verbose: boolean;
|
|
491
|
+
dir: string;
|
|
514
492
|
apiUrl: string;
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
promptId?: string | undefined;
|
|
493
|
+
dryRun: boolean;
|
|
494
|
+
transcript: boolean;
|
|
495
|
+
focusPath?: string | undefined;
|
|
496
|
+
model?: string | undefined;
|
|
497
|
+
apiKey?: string | undefined;
|
|
521
498
|
}, {
|
|
522
|
-
type: "vibes-diy.cli.res-codegen-log-list";
|
|
523
|
-
items: {
|
|
524
|
-
chatId: string;
|
|
525
|
-
appSlug: string;
|
|
526
|
-
ownerHandle: string;
|
|
527
|
-
created: string;
|
|
528
|
-
}[];
|
|
529
|
-
} | {
|
|
530
|
-
type: "vibes-diy.cli.res-codegen-log-detail";
|
|
531
|
-
chatId: string;
|
|
532
|
-
ownerHandle: string;
|
|
533
499
|
appSlug: string;
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
500
|
+
ownerHandle: string;
|
|
501
|
+
mode: "dev" | "production";
|
|
502
|
+
fsId: string;
|
|
503
|
+
type: "vibes.diy.res-ensure-app-slug";
|
|
504
|
+
env: Record<string, string>;
|
|
505
|
+
fileSystem: {
|
|
506
|
+
fileName: string;
|
|
507
|
+
mimeType: string;
|
|
508
|
+
assetId: string;
|
|
509
|
+
assetURI: string;
|
|
510
|
+
transform?: {
|
|
511
|
+
type: "jsx-to-js";
|
|
512
|
+
transformedAssetId: string;
|
|
513
|
+
} | {
|
|
514
|
+
type: "imports";
|
|
515
|
+
importMapAssetId: string;
|
|
516
|
+
} | {
|
|
517
|
+
type: "import-map";
|
|
518
|
+
fromAssetIds: string[];
|
|
519
|
+
} | {
|
|
520
|
+
type: "transformed";
|
|
521
|
+
action: "jsx-to-js";
|
|
522
|
+
transformedAssetId: string;
|
|
523
|
+
} | {
|
|
524
|
+
type: "tailwind-css";
|
|
555
525
|
} | undefined;
|
|
556
|
-
|
|
557
|
-
|
|
526
|
+
entryPoint?: boolean | undefined;
|
|
527
|
+
size: number;
|
|
558
528
|
}[];
|
|
529
|
+
} | {
|
|
530
|
+
type: "vibes.diy.res-error";
|
|
531
|
+
error: {
|
|
532
|
+
message: string;
|
|
533
|
+
code: "require-login";
|
|
534
|
+
};
|
|
535
|
+
} | {
|
|
536
|
+
type: "vibes.diy.res-error";
|
|
537
|
+
error: {
|
|
538
|
+
message: string;
|
|
539
|
+
code: "user-slug-invalid";
|
|
540
|
+
};
|
|
541
|
+
} | {
|
|
542
|
+
type: "vibes.diy.res-error";
|
|
543
|
+
error: {
|
|
544
|
+
message: string;
|
|
545
|
+
code: "app-slug-invalid";
|
|
546
|
+
};
|
|
547
|
+
} | {
|
|
548
|
+
type: "vibes.diy.res-error";
|
|
549
|
+
error: {
|
|
550
|
+
message: string;
|
|
551
|
+
code: "handle-required";
|
|
552
|
+
};
|
|
553
|
+
} | {
|
|
554
|
+
type: "vibes.diy.res-error";
|
|
555
|
+
error: {
|
|
556
|
+
message: string;
|
|
557
|
+
code: "max-app-slugs-reached";
|
|
558
|
+
};
|
|
559
|
+
} | {
|
|
560
|
+
type: "vibes-diy.cli.res-edit";
|
|
561
|
+
appSlug: string;
|
|
562
|
+
ownerHandle: string;
|
|
563
|
+
url: string;
|
|
564
|
+
directory: string;
|
|
559
565
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
560
566
|
type: "vibes-diy.cli.pull";
|
|
561
567
|
appSlug: string;
|
|
@@ -590,17 +596,26 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
590
596
|
published: boolean;
|
|
591
597
|
}[];
|
|
592
598
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
593
|
-
type: "vibes-diy.cli.app-
|
|
599
|
+
type: "vibes-diy.cli.app-status";
|
|
594
600
|
appSlug: string;
|
|
595
601
|
ownerHandle: string;
|
|
596
602
|
apiUrl: string;
|
|
597
603
|
}, {
|
|
598
|
-
type: "vibes-diy.cli.res-app-
|
|
604
|
+
type: "vibes-diy.cli.res-app-status";
|
|
599
605
|
appSlug: string;
|
|
600
606
|
ownerHandle: string;
|
|
601
607
|
state: "dead" | "healthy" | "overdue" | "running" | "unscheduled";
|
|
602
608
|
intervalMs: number | null;
|
|
609
|
+
armedAt: string | null;
|
|
610
|
+
lastAttemptAt: string | null;
|
|
611
|
+
lastRunAt: string | null;
|
|
612
|
+
lastErrorAt: string | null;
|
|
613
|
+
lastError: string | null;
|
|
614
|
+
attempt: number;
|
|
603
615
|
nextAlarmAt: string | null;
|
|
616
|
+
graceMs: number;
|
|
617
|
+
overdueMs: number;
|
|
618
|
+
healed: boolean;
|
|
604
619
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
605
620
|
type: "vibes-diy.cli.app-logs";
|
|
606
621
|
appSlug: string;
|
|
@@ -628,6 +643,20 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
628
643
|
priorFsId: string | null;
|
|
629
644
|
nextCursor: string | null;
|
|
630
645
|
tail: boolean;
|
|
646
|
+
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
647
|
+
type: "vibes-diy.cli.app-chips";
|
|
648
|
+
appSlug: string;
|
|
649
|
+
ownerHandle: string;
|
|
650
|
+
apiUrl: string;
|
|
651
|
+
chips: string[];
|
|
652
|
+
fsId: string;
|
|
653
|
+
}, {
|
|
654
|
+
type: "vibes-diy.cli.res-app-chips";
|
|
655
|
+
appSlug: string;
|
|
656
|
+
ownerHandle: string;
|
|
657
|
+
fsId: string;
|
|
658
|
+
releaseSeq: number;
|
|
659
|
+
chips: string[];
|
|
631
660
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
632
661
|
type: "vibes-diy.cli.secrets";
|
|
633
662
|
apiUrl: string;
|
|
@@ -680,14 +709,6 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
680
709
|
updated: string;
|
|
681
710
|
created?: string | undefined;
|
|
682
711
|
}[];
|
|
683
|
-
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
684
|
-
type: "vibes-diy.cli.db.list";
|
|
685
|
-
apiUrl: string;
|
|
686
|
-
appSlug: string;
|
|
687
|
-
ownerHandle: string;
|
|
688
|
-
}, {
|
|
689
|
-
type: "vibes-diy.cli.db.list-res";
|
|
690
|
-
dbNames: string[];
|
|
691
712
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
692
713
|
type: "vibes-diy.cli.db.get";
|
|
693
714
|
apiUrl: string;
|
|
@@ -714,22 +735,17 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
714
735
|
id: string;
|
|
715
736
|
ok: true;
|
|
716
737
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
717
|
-
type: "vibes-diy.cli.db.
|
|
738
|
+
type: "vibes-diy.cli.db.del";
|
|
718
739
|
apiUrl: string;
|
|
719
740
|
appSlug: string;
|
|
720
741
|
ownerHandle: string;
|
|
721
742
|
dbName: string;
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
prefix: string;
|
|
725
|
-
range: string;
|
|
726
|
-
limit: number;
|
|
727
|
-
descending: boolean;
|
|
743
|
+
docId: string;
|
|
744
|
+
admin: boolean;
|
|
728
745
|
}, {
|
|
729
|
-
type: "vibes-diy.cli.db.
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
}[];
|
|
746
|
+
type: "vibes-diy.cli.db.del-res";
|
|
747
|
+
id: string;
|
|
748
|
+
ok: true;
|
|
733
749
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
734
750
|
type: "vibes-diy.cli.db.subscribe";
|
|
735
751
|
apiUrl: string;
|
package/cli/cmd-evento.js
CHANGED
|
@@ -13,7 +13,7 @@ import { editEvento } from "./cmds/edit-cmd.js";
|
|
|
13
13
|
import { listEvento } from "./cmds/list-cmd.js";
|
|
14
14
|
import { pullEvento } from "./cmds/pull-cmd.js";
|
|
15
15
|
import { versionsEvento } from "./cmds/versions-cmd.js";
|
|
16
|
-
import { appStatusEvento, appRearmEvento, appLogsEvento } from "./cmds/app/index.js";
|
|
16
|
+
import { appStatusEvento, appRearmEvento, appLogsEvento, appChipsEvento } from "./cmds/app/index.js";
|
|
17
17
|
import { setUnpublishEvento, publishEvento } from "./cmds/unpublish-cmd.js";
|
|
18
18
|
import { secretsEvento } from "./cmds/secrets/secrets-cmd.js";
|
|
19
19
|
import { recommendEvento } from "./cmds/recommend/recommend-cmd.js";
|
|
@@ -40,6 +40,7 @@ export function cliEventoHandlers() {
|
|
|
40
40
|
appStatusEvento,
|
|
41
41
|
appRearmEvento,
|
|
42
42
|
appLogsEvento,
|
|
43
|
+
appChipsEvento,
|
|
43
44
|
setUnpublishEvento,
|
|
44
45
|
publishEvento,
|
|
45
46
|
secretsEvento,
|
package/cli/cmd-evento.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmd-evento.js","sourceRoot":"","sources":["../../jsr/cli/cmd-evento.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB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AChB,UAAU;QACV,UAAU;QACV,UAAU;QACV,cAAc;QACd,eAAe;QACf,cAAc;QACd,aAAa;QACb,cAAc;QACd,kBAAkB;QAClB,aAAa;QACb,aAAa;QACb,eAAe;QACf,eAAe;QACf,sBAAsB;QACtB,YAAY;QACZ,WAAW;QACX,WAAW;QACX,WAAW;QACX,aAAa;QACb,iBAAiB;KAClB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,WAAW;IACzB,OAAO,eAAe,CAAC,iBAAiB,EAAE,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { ensureSuperThis } from "@vibes.diy/identity";
|
|
3
|
+
import { runSafely, subcommands } from "cmd-ts";
|
|
4
|
+
import { isErr } from "cmd-ts/dist/cjs/Result.js";
|
|
5
|
+
import { createCliStream } from "./cli-kit.js";
|
|
6
|
+
import { defaultCliOutput } from "./cli-ctx.js";
|
|
7
|
+
import { cliEventoHandlers } from "./cmd-evento.js";
|
|
8
|
+
import { pushCmd } from "./cmds/push-cmd.js";
|
|
9
|
+
import { pullCmd } from "./cmds/pull-cmd.js";
|
|
10
|
+
import { editCmd } from "./cmds/edit-cmd.js";
|
|
11
|
+
import { generateCmd } from "./cmds/generate-cmd.js";
|
|
12
|
+
import { listCmd } from "./cmds/list-cmd.js";
|
|
13
|
+
import { publishCmd } from "./cmds/unpublish-cmd.js";
|
|
14
|
+
function makeCtx() {
|
|
15
|
+
return {
|
|
16
|
+
sthis: ensureSuperThis(),
|
|
17
|
+
cliStream: createCliStream(),
|
|
18
|
+
output: defaultCliOutput,
|
|
19
|
+
exitCode: 0,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
async function enqueuedRequest(cmdName, cmd, argv) {
|
|
23
|
+
const ctx = makeCtx();
|
|
24
|
+
const cmds = { [cmdName]: cmd(ctx) };
|
|
25
|
+
const rs = await runSafely(subcommands({ name: "vibes-diy cli", description: "test", version: "0.0.0", cmds }), argv);
|
|
26
|
+
if (isErr(rs))
|
|
27
|
+
throw new Error(`argv did not parse for '${cmdName}': ${argv.join(" ")}`);
|
|
28
|
+
const reader = ctx.cliStream.stream.getReader();
|
|
29
|
+
const first = await reader.read();
|
|
30
|
+
if (first.done)
|
|
31
|
+
throw new Error(`'${cmdName}' enqueued no request`);
|
|
32
|
+
return first.value.result;
|
|
33
|
+
}
|
|
34
|
+
function claimingHandlers(request) {
|
|
35
|
+
return Promise.all(cliEventoHandlers().map(async (h) => {
|
|
36
|
+
if (!h.validate)
|
|
37
|
+
return "";
|
|
38
|
+
const r = await h.validate({ enRequest: request });
|
|
39
|
+
return r.isOk() && r.Ok().IsSome() ? h.hash : "";
|
|
40
|
+
})).then((hashes) => hashes.filter((h) => h !== ""));
|
|
41
|
+
}
|
|
42
|
+
const cases = [
|
|
43
|
+
{ name: "push", cmd: pushCmd, argv: ["push"], hash: "vibes-diy.cli.push" },
|
|
44
|
+
{ name: "pull", cmd: pullCmd, argv: ["pull", "someone/app"], hash: "vibes-diy.cli.pull" },
|
|
45
|
+
{ name: "edit", cmd: editCmd, argv: ["edit", "some-app", "change the title"], hash: "vibes-diy.cli.edit" },
|
|
46
|
+
{ name: "generate", cmd: generateCmd, argv: ["generate", "a todo app"], hash: "vibes-diy.cli.generate" },
|
|
47
|
+
{ name: "list", cmd: listCmd, argv: ["list"], hash: "vibes-diy.cli.list" },
|
|
48
|
+
{ name: "publish", cmd: publishCmd, argv: ["publish", "someone/app"], hash: "vibes-diy.cli.publish" },
|
|
49
|
+
];
|
|
50
|
+
describe("argv → request → handler (the #4812 silent-no-op seam)", () => {
|
|
51
|
+
for (const c of cases) {
|
|
52
|
+
it(`\`${c.argv.join(" ")}\` enqueues a request its own handler accepts`, async () => {
|
|
53
|
+
const request = await enqueuedRequest(c.name, c.cmd, c.argv);
|
|
54
|
+
expect(await claimingHandlers(request)).toEqual([c.hash]);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
it("never spreads an unset optional flag as an explicit undefined", async () => {
|
|
58
|
+
for (const c of cases) {
|
|
59
|
+
const request = (await enqueuedRequest(c.name, c.cmd, c.argv));
|
|
60
|
+
const undef = Object.entries(request)
|
|
61
|
+
.filter(([, v]) => v === undefined)
|
|
62
|
+
.map(([k]) => k);
|
|
63
|
+
expect({ cmd: c.name, undef }).toEqual({ cmd: c.name, undef: [] });
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
//# sourceMappingURL=cmd-request-dispatch.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cmd-request-dispatch.test.js","sourceRoot":"","sources":["../../jsr/cli/cmd-request-dispatch.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAgBrD,SAAS,OAAO;IACd,OAAO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edSlotInput, 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>>;
|