vibes-diy 12.3.1 → 12.3.3
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 +241 -227
- 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/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/push-cmd.js +9 -2
- package/cli/cmds/push-cmd.js.map +1 -1
- package/cli/cmds/push-from-dir.js +4 -2
- package/cli/cmds/push-from-dir.js.map +1 -1
- package/cli/cmds/push-from-dir.test.js +43 -0
- 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
|
@@ -2,6 +2,137 @@ 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: "core-cli.device-id-register";
|
|
6
|
+
commonName: string;
|
|
7
|
+
organization: string;
|
|
8
|
+
locality: string;
|
|
9
|
+
state: string;
|
|
10
|
+
country: string;
|
|
11
|
+
caUrl: string;
|
|
12
|
+
port: string;
|
|
13
|
+
timeout: string;
|
|
14
|
+
forceRenew: boolean;
|
|
15
|
+
}, {
|
|
16
|
+
type: "core-cli.res-device-id-register";
|
|
17
|
+
output: string;
|
|
18
|
+
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
19
|
+
type: "vibes-diy.cli.system";
|
|
20
|
+
}, {
|
|
21
|
+
type: "vibes-diy.cli.res-system";
|
|
22
|
+
systemPrompt: string;
|
|
23
|
+
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
24
|
+
type: "vibes-diy.cli.db.list";
|
|
25
|
+
apiUrl: string;
|
|
26
|
+
appSlug: string;
|
|
27
|
+
ownerHandle: string;
|
|
28
|
+
}, {
|
|
29
|
+
type: "vibes-diy.cli.db.list-res";
|
|
30
|
+
dbNames: string[];
|
|
31
|
+
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
32
|
+
type: "vibes-diy.cli.db.query";
|
|
33
|
+
apiUrl: string;
|
|
34
|
+
appSlug: string;
|
|
35
|
+
ownerHandle: string;
|
|
36
|
+
dbName: string;
|
|
37
|
+
field: string;
|
|
38
|
+
key: string;
|
|
39
|
+
prefix: string;
|
|
40
|
+
range: string;
|
|
41
|
+
limit: number;
|
|
42
|
+
descending: boolean;
|
|
43
|
+
}, {
|
|
44
|
+
type: "vibes-diy.cli.db.query-res";
|
|
45
|
+
docs: {
|
|
46
|
+
[x: string]: unknown;
|
|
47
|
+
}[];
|
|
48
|
+
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
49
|
+
type: "vibes-diy.cli.codegen-log";
|
|
50
|
+
appSlug: string;
|
|
51
|
+
ownerHandle: string;
|
|
52
|
+
chatId?: string | undefined;
|
|
53
|
+
apiUrl: string;
|
|
54
|
+
response?: boolean | undefined;
|
|
55
|
+
raw?: boolean | undefined;
|
|
56
|
+
files?: boolean | undefined;
|
|
57
|
+
jsonl?: boolean | undefined;
|
|
58
|
+
user?: boolean | undefined;
|
|
59
|
+
promptId?: string | undefined;
|
|
60
|
+
}, {
|
|
61
|
+
type: "vibes-diy.cli.res-codegen-log-response";
|
|
62
|
+
output: string;
|
|
63
|
+
} | {
|
|
64
|
+
type: "vibes-diy.cli.res-codegen-log-list";
|
|
65
|
+
items: {
|
|
66
|
+
chatId: string;
|
|
67
|
+
appSlug: string;
|
|
68
|
+
ownerHandle: string;
|
|
69
|
+
created: string;
|
|
70
|
+
}[];
|
|
71
|
+
} | {
|
|
72
|
+
type: "vibes-diy.cli.res-codegen-log-detail";
|
|
73
|
+
chatId: string;
|
|
74
|
+
ownerHandle: string;
|
|
75
|
+
appSlug: string;
|
|
76
|
+
prompts: {
|
|
77
|
+
prompt: string;
|
|
78
|
+
fsId: string;
|
|
79
|
+
created: string;
|
|
80
|
+
}[];
|
|
81
|
+
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
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";
|
|
100
|
+
appSlug: string;
|
|
101
|
+
ownerHandle: string;
|
|
102
|
+
apiUrl: string;
|
|
103
|
+
}, {
|
|
104
|
+
type: "vibes-diy.cli.res-app-rearm";
|
|
105
|
+
appSlug: string;
|
|
106
|
+
ownerHandle: string;
|
|
107
|
+
state: "dead" | "healthy" | "overdue" | "running" | "unscheduled";
|
|
108
|
+
intervalMs: number | null;
|
|
109
|
+
nextAlarmAt: string | null;
|
|
110
|
+
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
111
|
+
type: "vibes-diy.cli.set-unpublish";
|
|
112
|
+
appSlug: string;
|
|
113
|
+
ownerHandle: string;
|
|
114
|
+
unpublish: boolean;
|
|
115
|
+
apiUrl: string;
|
|
116
|
+
}, {
|
|
117
|
+
type: "vibes-diy.cli.res-set-unpublish";
|
|
118
|
+
appSlug: string;
|
|
119
|
+
ownerHandle: string;
|
|
120
|
+
unpublishedAt: string;
|
|
121
|
+
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
122
|
+
type: "vibes-diy.cli.publish";
|
|
123
|
+
appSlug: string;
|
|
124
|
+
ownerHandle: string;
|
|
125
|
+
fsId?: string | undefined;
|
|
126
|
+
apiUrl: string;
|
|
127
|
+
}, {
|
|
128
|
+
type: "vibes-diy.cli.res-publish";
|
|
129
|
+
appSlug: string;
|
|
130
|
+
ownerHandle: string;
|
|
131
|
+
fsId: string;
|
|
132
|
+
releaseSeq: number;
|
|
133
|
+
released: boolean;
|
|
134
|
+
restored: boolean;
|
|
135
|
+
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
5
136
|
type: "vibes-diy.cli.user-settings";
|
|
6
137
|
apiUrl: string;
|
|
7
138
|
setDefaultHandle?: string | undefined;
|
|
@@ -125,6 +256,18 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
125
256
|
})[];
|
|
126
257
|
updated: string;
|
|
127
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;
|
|
128
271
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
129
272
|
type: "use-vibes.cli.themes";
|
|
130
273
|
}, {
|
|
@@ -138,48 +281,18 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
138
281
|
slug: string;
|
|
139
282
|
content: string;
|
|
140
283
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
141
|
-
type: "vibes-diy.cli.
|
|
142
|
-
|
|
143
|
-
ownerHandle?: string | undefined;
|
|
144
|
-
}, {
|
|
145
|
-
type: "vibes-diy.cli.res-claim-handle";
|
|
146
|
-
op: "claim" | "suggest";
|
|
147
|
-
ownerHandle?: string | undefined;
|
|
148
|
-
defaultHandleSet?: boolean | undefined;
|
|
149
|
-
suggestions: string[];
|
|
150
|
-
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
151
|
-
type: "vibes-diy.cli.db.del";
|
|
152
|
-
apiUrl: string;
|
|
153
|
-
appSlug: string;
|
|
154
|
-
ownerHandle: string;
|
|
155
|
-
dbName: string;
|
|
156
|
-
docId: string;
|
|
157
|
-
admin: boolean;
|
|
158
|
-
}, {
|
|
159
|
-
type: "vibes-diy.cli.db.del-res";
|
|
160
|
-
id: string;
|
|
161
|
-
ok: true;
|
|
162
|
-
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
163
|
-
type: "vibes-diy.cli.edit";
|
|
284
|
+
type: "vibes-diy.cli.push";
|
|
285
|
+
mode: string;
|
|
164
286
|
appSlug: string;
|
|
165
|
-
prompt: string;
|
|
166
287
|
ownerHandle: string;
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
dryRun: boolean;
|
|
172
|
-
transcript: boolean;
|
|
173
|
-
focusPath?: string | undefined;
|
|
174
|
-
model?: string | undefined;
|
|
288
|
+
access?: string | undefined;
|
|
289
|
+
privateMode?: boolean | undefined;
|
|
290
|
+
noAccessFn?: boolean | undefined;
|
|
291
|
+
message?: string | undefined;
|
|
175
292
|
apiKey?: string | undefined;
|
|
293
|
+
apiUrl: string;
|
|
294
|
+
idleTimeoutMs?: number | undefined;
|
|
176
295
|
}, {
|
|
177
|
-
type: "vibes-diy.cli.res-edit";
|
|
178
|
-
appSlug: string;
|
|
179
|
-
ownerHandle: string;
|
|
180
|
-
url: string;
|
|
181
|
-
directory: string;
|
|
182
|
-
} | {
|
|
183
296
|
appSlug: string;
|
|
184
297
|
ownerHandle: string;
|
|
185
298
|
mode: "dev" | "production";
|
|
@@ -232,89 +345,53 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
232
345
|
type: "vibes.diy.res-error";
|
|
233
346
|
error: {
|
|
234
347
|
message: string;
|
|
235
|
-
code: "
|
|
348
|
+
code: "handle-required";
|
|
236
349
|
};
|
|
237
350
|
} | {
|
|
238
351
|
type: "vibes.diy.res-error";
|
|
239
352
|
error: {
|
|
240
353
|
message: string;
|
|
241
|
-
code: "
|
|
354
|
+
code: "max-app-slugs-reached";
|
|
242
355
|
};
|
|
243
356
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
244
|
-
type: "vibes-diy.cli.
|
|
245
|
-
appSlug: string;
|
|
246
|
-
ownerHandle: string;
|
|
247
|
-
apiUrl: string;
|
|
248
|
-
}, {
|
|
249
|
-
type: "vibes-diy.cli.res-app-status";
|
|
250
|
-
appSlug: string;
|
|
251
|
-
ownerHandle: string;
|
|
252
|
-
state: "dead" | "healthy" | "overdue" | "running" | "unscheduled";
|
|
253
|
-
intervalMs: number | null;
|
|
254
|
-
armedAt: string | null;
|
|
255
|
-
lastAttemptAt: string | null;
|
|
256
|
-
lastRunAt: string | null;
|
|
257
|
-
lastErrorAt: string | null;
|
|
258
|
-
lastError: string | null;
|
|
259
|
-
attempt: number;
|
|
260
|
-
nextAlarmAt: string | null;
|
|
261
|
-
graceMs: number;
|
|
262
|
-
overdueMs: number;
|
|
263
|
-
healed: boolean;
|
|
264
|
-
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
265
|
-
type: "vibes-diy.cli.set-unpublish";
|
|
266
|
-
appSlug: string;
|
|
267
|
-
ownerHandle: string;
|
|
268
|
-
unpublish: boolean;
|
|
357
|
+
type: "vibes-diy.cli.claim-handle";
|
|
269
358
|
apiUrl: string;
|
|
359
|
+
ownerHandle?: string | undefined;
|
|
270
360
|
}, {
|
|
271
|
-
type: "vibes-diy.cli.res-
|
|
272
|
-
|
|
273
|
-
ownerHandle
|
|
274
|
-
|
|
361
|
+
type: "vibes-diy.cli.res-claim-handle";
|
|
362
|
+
op: "claim" | "suggest";
|
|
363
|
+
ownerHandle?: string | undefined;
|
|
364
|
+
defaultHandleSet?: boolean | undefined;
|
|
365
|
+
suggestions: string[];
|
|
275
366
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
276
|
-
type: "vibes-diy.cli.
|
|
367
|
+
type: "vibes-diy.cli.put-asset";
|
|
368
|
+
file: string;
|
|
277
369
|
appSlug: string;
|
|
278
370
|
ownerHandle: string;
|
|
279
|
-
fsId?: string | undefined;
|
|
280
371
|
apiUrl: string;
|
|
372
|
+
mimeType: string;
|
|
373
|
+
verifyFetch: boolean;
|
|
281
374
|
}, {
|
|
282
|
-
type: "vibes-diy.cli.res-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
restored: boolean;
|
|
289
|
-
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
290
|
-
type: "vibes-diy.cli.skills";
|
|
291
|
-
}, {
|
|
292
|
-
type: "vibes-diy.cli.res-skills-list";
|
|
293
|
-
skills: {
|
|
294
|
-
name: string;
|
|
295
|
-
description: string;
|
|
296
|
-
}[];
|
|
297
|
-
} | {
|
|
298
|
-
type: "vibes-diy.cli.res-skill-content";
|
|
299
|
-
name: string;
|
|
300
|
-
content: string;
|
|
301
|
-
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
302
|
-
type: "vibes-diy.cli.system";
|
|
303
|
-
}, {
|
|
304
|
-
type: "vibes-diy.cli.res-system";
|
|
305
|
-
systemPrompt: string;
|
|
375
|
+
type: "vibes-diy.cli.res-put-asset";
|
|
376
|
+
cid: string;
|
|
377
|
+
getURL: string;
|
|
378
|
+
size: number;
|
|
379
|
+
uploadId: string;
|
|
380
|
+
verified?: boolean | undefined;
|
|
306
381
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
307
|
-
type: "vibes-diy.cli.
|
|
308
|
-
|
|
382
|
+
type: "vibes-diy.cli.generate";
|
|
383
|
+
prompt: string;
|
|
309
384
|
appSlug: string;
|
|
310
385
|
ownerHandle: string;
|
|
311
|
-
|
|
312
|
-
privateMode?: boolean | undefined;
|
|
386
|
+
instantJoin?: boolean | undefined;
|
|
313
387
|
noAccessFn?: boolean | undefined;
|
|
314
|
-
|
|
315
|
-
apiKey?: string | undefined;
|
|
388
|
+
verbose: boolean;
|
|
316
389
|
apiUrl: string;
|
|
317
|
-
|
|
390
|
+
dryRun: boolean;
|
|
391
|
+
transcript: boolean;
|
|
392
|
+
focusPath?: string | undefined;
|
|
393
|
+
model?: string | undefined;
|
|
394
|
+
apiKey?: string | undefined;
|
|
318
395
|
}, {
|
|
319
396
|
appSlug: string;
|
|
320
397
|
ownerHandle: string;
|
|
@@ -368,37 +445,50 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
368
445
|
type: "vibes.diy.res-error";
|
|
369
446
|
error: {
|
|
370
447
|
message: string;
|
|
371
|
-
code: "
|
|
448
|
+
code: "handle-required";
|
|
372
449
|
};
|
|
373
450
|
} | {
|
|
374
451
|
type: "vibes.diy.res-error";
|
|
375
452
|
error: {
|
|
376
453
|
message: string;
|
|
377
|
-
code: "
|
|
454
|
+
code: "max-app-slugs-reached";
|
|
378
455
|
};
|
|
456
|
+
} | {
|
|
457
|
+
type: "vibes-diy.cli.res-generate";
|
|
458
|
+
appSlug: string;
|
|
459
|
+
ownerHandle: string;
|
|
460
|
+
url: string;
|
|
461
|
+
directory: string;
|
|
462
|
+
dryRun?: boolean | undefined;
|
|
379
463
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
380
|
-
type: "vibes-diy.cli.
|
|
381
|
-
file: string;
|
|
464
|
+
type: "vibes-diy.cli.app-chats";
|
|
382
465
|
appSlug: string;
|
|
383
466
|
ownerHandle: string;
|
|
467
|
+
chatId?: string | undefined;
|
|
384
468
|
apiUrl: string;
|
|
385
|
-
mimeType: string;
|
|
386
|
-
verifyFetch: boolean;
|
|
387
469
|
}, {
|
|
388
|
-
type: "vibes-diy.cli.res-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
470
|
+
type: "vibes-diy.cli.res-app-chats-list";
|
|
471
|
+
items: {
|
|
472
|
+
chatId: string;
|
|
473
|
+
appSlug: string;
|
|
474
|
+
ownerHandle: string;
|
|
475
|
+
created: string;
|
|
476
|
+
userHandle?: string | undefined;
|
|
477
|
+
}[];
|
|
478
|
+
} | {
|
|
479
|
+
type: "vibes-diy.cli.res-app-chats-detail";
|
|
480
|
+
chatId: string;
|
|
481
|
+
ownerHandle?: string | undefined;
|
|
482
|
+
appSlug?: string | undefined;
|
|
483
|
+
output: string;
|
|
394
484
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
395
|
-
type: "vibes-diy.cli.
|
|
396
|
-
prompt: string;
|
|
485
|
+
type: "vibes-diy.cli.edit";
|
|
397
486
|
appSlug: string;
|
|
487
|
+
prompt: string;
|
|
398
488
|
ownerHandle: string;
|
|
399
489
|
instantJoin?: boolean | undefined;
|
|
400
|
-
noAccessFn?: boolean | undefined;
|
|
401
490
|
verbose: boolean;
|
|
491
|
+
dir: string;
|
|
402
492
|
apiUrl: string;
|
|
403
493
|
dryRun: boolean;
|
|
404
494
|
transcript: boolean;
|
|
@@ -458,92 +548,20 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
458
548
|
type: "vibes.diy.res-error";
|
|
459
549
|
error: {
|
|
460
550
|
message: string;
|
|
461
|
-
code: "
|
|
551
|
+
code: "handle-required";
|
|
462
552
|
};
|
|
463
553
|
} | {
|
|
464
554
|
type: "vibes.diy.res-error";
|
|
465
555
|
error: {
|
|
466
556
|
message: string;
|
|
467
|
-
code: "
|
|
557
|
+
code: "max-app-slugs-reached";
|
|
468
558
|
};
|
|
469
559
|
} | {
|
|
470
|
-
type: "vibes-diy.cli.res-
|
|
560
|
+
type: "vibes-diy.cli.res-edit";
|
|
471
561
|
appSlug: string;
|
|
472
562
|
ownerHandle: string;
|
|
473
563
|
url: string;
|
|
474
564
|
directory: string;
|
|
475
|
-
dryRun?: boolean | undefined;
|
|
476
|
-
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
477
|
-
type: "vibes-diy.cli.app-chats";
|
|
478
|
-
appSlug: string;
|
|
479
|
-
ownerHandle: string;
|
|
480
|
-
chatId?: string | undefined;
|
|
481
|
-
apiUrl: string;
|
|
482
|
-
}, {
|
|
483
|
-
type: "vibes-diy.cli.res-app-chats-list";
|
|
484
|
-
items: {
|
|
485
|
-
chatId: string;
|
|
486
|
-
appSlug: string;
|
|
487
|
-
ownerHandle: string;
|
|
488
|
-
created: string;
|
|
489
|
-
userHandle?: string | undefined;
|
|
490
|
-
}[];
|
|
491
|
-
} | {
|
|
492
|
-
type: "vibes-diy.cli.res-app-chats-detail";
|
|
493
|
-
chatId: string;
|
|
494
|
-
ownerHandle?: string | undefined;
|
|
495
|
-
appSlug?: string | undefined;
|
|
496
|
-
output: string;
|
|
497
|
-
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
498
|
-
type: "vibes-diy.cli.codegen-log";
|
|
499
|
-
appSlug: string;
|
|
500
|
-
ownerHandle: string;
|
|
501
|
-
chatId?: string | undefined;
|
|
502
|
-
apiUrl: string;
|
|
503
|
-
response?: boolean | undefined;
|
|
504
|
-
raw?: boolean | undefined;
|
|
505
|
-
files?: boolean | undefined;
|
|
506
|
-
jsonl?: boolean | undefined;
|
|
507
|
-
user?: boolean | undefined;
|
|
508
|
-
promptId?: string | undefined;
|
|
509
|
-
}, {
|
|
510
|
-
type: "vibes-diy.cli.res-codegen-log-list";
|
|
511
|
-
items: {
|
|
512
|
-
chatId: string;
|
|
513
|
-
appSlug: string;
|
|
514
|
-
ownerHandle: string;
|
|
515
|
-
created: string;
|
|
516
|
-
}[];
|
|
517
|
-
} | {
|
|
518
|
-
type: "vibes-diy.cli.res-codegen-log-detail";
|
|
519
|
-
chatId: string;
|
|
520
|
-
ownerHandle: string;
|
|
521
|
-
appSlug: string;
|
|
522
|
-
prompts: {
|
|
523
|
-
prompt: string;
|
|
524
|
-
fsId: string;
|
|
525
|
-
created: string;
|
|
526
|
-
}[];
|
|
527
|
-
} | {
|
|
528
|
-
type: "vibes-diy.cli.res-codegen-log-response";
|
|
529
|
-
output: string;
|
|
530
|
-
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
531
|
-
type: "vibes-diy.cli.list";
|
|
532
|
-
apiUrl: string;
|
|
533
|
-
}, {
|
|
534
|
-
type: "vibes-diy.cli.res-list";
|
|
535
|
-
items: {
|
|
536
|
-
ownerHandle: string;
|
|
537
|
-
appSlug: string;
|
|
538
|
-
updated: string;
|
|
539
|
-
title?: string | undefined;
|
|
540
|
-
icon?: {
|
|
541
|
-
cid: string;
|
|
542
|
-
mime: string;
|
|
543
|
-
} | undefined;
|
|
544
|
-
pinnedAt?: string | undefined;
|
|
545
|
-
unpublishedAt?: string | undefined;
|
|
546
|
-
}[];
|
|
547
565
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
548
566
|
type: "vibes-diy.cli.pull";
|
|
549
567
|
appSlug: string;
|
|
@@ -578,17 +596,26 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
578
596
|
published: boolean;
|
|
579
597
|
}[];
|
|
580
598
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
581
|
-
type: "vibes-diy.cli.app-
|
|
599
|
+
type: "vibes-diy.cli.app-status";
|
|
582
600
|
appSlug: string;
|
|
583
601
|
ownerHandle: string;
|
|
584
602
|
apiUrl: string;
|
|
585
603
|
}, {
|
|
586
|
-
type: "vibes-diy.cli.res-app-
|
|
604
|
+
type: "vibes-diy.cli.res-app-status";
|
|
587
605
|
appSlug: string;
|
|
588
606
|
ownerHandle: string;
|
|
589
607
|
state: "dead" | "healthy" | "overdue" | "running" | "unscheduled";
|
|
590
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;
|
|
591
615
|
nextAlarmAt: string | null;
|
|
616
|
+
graceMs: number;
|
|
617
|
+
overdueMs: number;
|
|
618
|
+
healed: boolean;
|
|
592
619
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
593
620
|
type: "vibes-diy.cli.app-logs";
|
|
594
621
|
appSlug: string;
|
|
@@ -616,6 +643,20 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
616
643
|
priorFsId: string | null;
|
|
617
644
|
nextCursor: string | null;
|
|
618
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[];
|
|
619
660
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
620
661
|
type: "vibes-diy.cli.secrets";
|
|
621
662
|
apiUrl: string;
|
|
@@ -668,28 +709,6 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
668
709
|
updated: string;
|
|
669
710
|
created?: string | undefined;
|
|
670
711
|
}[];
|
|
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;
|
|
685
|
-
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
686
|
-
type: "vibes-diy.cli.db.list";
|
|
687
|
-
apiUrl: string;
|
|
688
|
-
appSlug: string;
|
|
689
|
-
ownerHandle: string;
|
|
690
|
-
}, {
|
|
691
|
-
type: "vibes-diy.cli.db.list-res";
|
|
692
|
-
dbNames: string[];
|
|
693
712
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
694
713
|
type: "vibes-diy.cli.db.get";
|
|
695
714
|
apiUrl: string;
|
|
@@ -716,22 +735,17 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
716
735
|
id: string;
|
|
717
736
|
ok: true;
|
|
718
737
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
719
|
-
type: "vibes-diy.cli.db.
|
|
738
|
+
type: "vibes-diy.cli.db.del";
|
|
720
739
|
apiUrl: string;
|
|
721
740
|
appSlug: string;
|
|
722
741
|
ownerHandle: string;
|
|
723
742
|
dbName: string;
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
prefix: string;
|
|
727
|
-
range: string;
|
|
728
|
-
limit: number;
|
|
729
|
-
descending: boolean;
|
|
743
|
+
docId: string;
|
|
744
|
+
admin: boolean;
|
|
730
745
|
}, {
|
|
731
|
-
type: "vibes-diy.cli.db.
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
}[];
|
|
746
|
+
type: "vibes-diy.cli.db.del-res";
|
|
747
|
+
id: string;
|
|
748
|
+
ok: true;
|
|
735
749
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
736
750
|
type: "vibes-diy.cli.db.subscribe";
|
|
737
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,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC3H,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"cmd-evento.js","sourceRoot":"","sources":["../../jsr/cli/cmd-evento.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC3H,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrG,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACL,aAAa,EACb,eAAe,EACf,OAAO,EACP,YAAY,GAIb,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;AAOhD,MAAM,UAAU,iBAAiB;IAC/B,OAAO;QACL,kBAAkB;QAClB,YAAY;QACZ,YAAY;QACZ,YAAY;QACZ,UAAU;QACV,iBAAiB;QACjB,cAAc;QACd,cAAc;QACd,cAAc;QACd,gBAAgB;QAChB,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
|