@kosuke-ai/kosuke 1.0.81 → 1.0.82
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/CHANGELOG.md +7 -0
- package/dist/generated/commands/index.js +124 -118
- package/dist/generated/commands/projects/batch-merging-members-delete.js +7 -0
- package/dist/generated/commands/prototypes/create.js +32 -0
- package/dist/generated/commands/sensei/reels-activity-list.js +1 -1
- package/dist/generated/commands/sensei/reels-later-holds-create.js +43 -0
- package/dist/generated/commands/sensei/reels-later-holds-delete.js +29 -0
- package/dist/generated/commands/sensei/reels-later-holds-list.js +17 -0
- package/dist/generated/commands/sensei/widgets-get.js +1 -1
- package/dist/runtime/arguments.js +2 -0
- package/dist/runtime/attach.js +6 -12
- package/dist/runtime/option-parsers.js +14 -0
- package/dist/runtime/prototype-create.js +47 -0
- package/dist/runtime/prototype-styles-scope.js +342 -0
- package/dist/runtime/prototype-styles.js +166 -0
- package/dist/runtime/prototype-visual-browser.js +87 -0
- package/dist/runtime/prototype-visual-check.js +388 -0
- package/dist/runtime/prototype-visual-preview.js +159 -0
- package/dist/runtime/prototype-visual-scripts.js +174 -0
- package/openapi.json +228 -2
- package/package.json +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.82
|
|
4
|
+
|
|
5
|
+
- Later now follows you across devices: a card put off on the phone, desktop or Watch stays put off on the others. The CLI adds `kosuke sensei reels later list|create|release`.
|
|
6
|
+
- `kosuke prototypes create` builds the prototype's styles from the project's own Tailwind entry and compares its baseline state with the real screen before it saves.
|
|
7
|
+
- Sensei's Reels is now called Deck on the web, desktop, iPhone, Apple Watch, widgets, Siri and Shortcuts; links with `view=reels` keep working.
|
|
8
|
+
- Add `--summary` to `kosuke projects batch-merging members delete`: the plain reason a member reads on the task card.
|
|
9
|
+
|
|
3
10
|
## 1.0.81
|
|
4
11
|
|
|
5
12
|
- Add --values false to `kosuke projects settings get`, which reads environment variable names without their values.
|
|
@@ -218,124 +218,127 @@ import { operation as o216 } from './sensei/messages-reply.js';
|
|
|
218
218
|
import { operation as o217 } from './sensei/messages-send.js';
|
|
219
219
|
import { operation as o218 } from './sensei/notifications-mark-read.js';
|
|
220
220
|
import { operation as o219 } from './sensei/reels-activity-list.js';
|
|
221
|
-
import { operation as o220 } from './sensei/
|
|
222
|
-
import { operation as o221 } from './sensei/
|
|
223
|
-
import { operation as o222 } from './sensei/
|
|
224
|
-
import { operation as o223 } from './sensei/
|
|
225
|
-
import { operation as o224 } from './sensei/
|
|
226
|
-
import { operation as o225 } from './sensei/
|
|
227
|
-
import { operation as o226 } from './sensei/
|
|
228
|
-
import { operation as o227 } from './sensei/threads-
|
|
229
|
-
import { operation as o228 } from './sensei/threads-
|
|
230
|
-
import { operation as o229 } from './sensei/threads-
|
|
231
|
-
import { operation as o230 } from './sensei/
|
|
232
|
-
import { operation as o231 } from './sensei/
|
|
233
|
-
import { operation as o232 } from './sensei/
|
|
234
|
-
import { operation as o233 } from './sensei/
|
|
235
|
-
import { operation as o234 } from './sensei/
|
|
236
|
-
import { operation as o235 } from './sensei/
|
|
237
|
-
import { operation as o236 } from './
|
|
238
|
-
import { operation as o237 } from './
|
|
239
|
-
import { operation as o238 } from './
|
|
240
|
-
import { operation as o239 } from './sessions/
|
|
241
|
-
import { operation as o240 } from './sessions/create.js';
|
|
242
|
-
import { operation as o241 } from './sessions/
|
|
243
|
-
import { operation as o242 } from './sessions/
|
|
244
|
-
import { operation as o243 } from './sessions/
|
|
245
|
-
import { operation as o244 } from './sessions/
|
|
246
|
-
import { operation as o245 } from './sessions/
|
|
247
|
-
import { operation as o246 } from './sessions/
|
|
248
|
-
import { operation as o247 } from './sessions/
|
|
249
|
-
import { operation as o248 } from './sessions/diff-comments-
|
|
250
|
-
import { operation as o249 } from './sessions/diff-
|
|
251
|
-
import { operation as o250 } from './sessions/diff-
|
|
252
|
-
import { operation as o251 } from './sessions/diff-
|
|
253
|
-
import { operation as o252 } from './sessions/
|
|
254
|
-
import { operation as o253 } from './sessions/files-
|
|
255
|
-
import { operation as o254 } from './sessions/
|
|
256
|
-
import { operation as o255 } from './sessions/
|
|
257
|
-
import { operation as o256 } from './sessions/get.js';
|
|
258
|
-
import { operation as o257 } from './sessions/
|
|
259
|
-
import { operation as o258 } from './sessions/
|
|
260
|
-
import { operation as o259 } from './sessions/
|
|
261
|
-
import { operation as o260 } from './sessions/
|
|
262
|
-
import { operation as o261 } from './sessions/
|
|
263
|
-
import { operation as o262 } from './sessions/
|
|
264
|
-
import { operation as o263 } from './sessions/
|
|
265
|
-
import { operation as o264 } from './sessions/
|
|
266
|
-
import { operation as o265 } from './sessions/list.js';
|
|
267
|
-
import { operation as o266 } from './sessions/
|
|
268
|
-
import { operation as o267 } from './sessions/
|
|
269
|
-
import { operation as o268 } from './sessions/
|
|
270
|
-
import { operation as o269 } from './sessions/
|
|
271
|
-
import { operation as o270 } from './sessions/
|
|
272
|
-
import { operation as o271 } from './sessions/
|
|
273
|
-
import { operation as o272 } from './sessions/
|
|
274
|
-
import { operation as o273 } from './sessions/
|
|
275
|
-
import { operation as o274 } from './sessions/qa-runs-
|
|
276
|
-
import { operation as o275 } from './sessions/qa-runs-
|
|
277
|
-
import { operation as o276 } from './sessions/qa-runs-
|
|
278
|
-
import { operation as o277 } from './sessions/qa-
|
|
279
|
-
import { operation as o278 } from './sessions/
|
|
280
|
-
import { operation as o279 } from './sessions/
|
|
281
|
-
import { operation as o280 } from './sessions/
|
|
282
|
-
import { operation as o281 } from './sessions/queue-
|
|
283
|
-
import { operation as o282 } from './sessions/queue-
|
|
284
|
-
import { operation as o283 } from './sessions/queue-
|
|
285
|
-
import { operation as o284 } from './sessions/queue-
|
|
286
|
-
import { operation as o285 } from './sessions/
|
|
287
|
-
import { operation as o286 } from './sessions/
|
|
288
|
-
import { operation as o287 } from './sessions/
|
|
289
|
-
import { operation as o288 } from './sessions/
|
|
290
|
-
import { operation as o289 } from './sessions/
|
|
291
|
-
import { operation as o290 } from './sessions/
|
|
292
|
-
import { operation as o291 } from './sessions/
|
|
293
|
-
import { operation as o292 } from './
|
|
294
|
-
import { operation as o293 } from './
|
|
295
|
-
import { operation as o294 } from './
|
|
296
|
-
import { operation as o295 } from './skills/
|
|
297
|
-
import { operation as o296 } from './skills/
|
|
298
|
-
import { operation as o297 } from './skills/
|
|
299
|
-
import { operation as o298 } from './skills/
|
|
300
|
-
import { operation as o299 } from './skills/
|
|
301
|
-
import { operation as o300 } from './skills/
|
|
302
|
-
import { operation as o301 } from './skills/
|
|
303
|
-
import { operation as o302 } from './
|
|
304
|
-
import { operation as o303 } from './
|
|
305
|
-
import { operation as o304 } from './
|
|
306
|
-
import { operation as o305 } from './tasks/
|
|
307
|
-
import { operation as o306 } from './tasks/
|
|
308
|
-
import { operation as o307 } from './tasks/
|
|
309
|
-
import { operation as o308 } from './tasks/
|
|
310
|
-
import { operation as o309 } from './tasks/
|
|
311
|
-
import { operation as o310 } from './tasks/
|
|
312
|
-
import { operation as o311 } from './tasks/list
|
|
313
|
-
import { operation as o312 } from './tasks/
|
|
314
|
-
import { operation as o313 } from './tasks/
|
|
315
|
-
import { operation as o314 } from './tasks/
|
|
316
|
-
import { operation as o315 } from './tasks/
|
|
317
|
-
import { operation as o316 } from './tasks/
|
|
318
|
-
import { operation as o317 } from './tasks/
|
|
319
|
-
import { operation as o318 } from './tasks/
|
|
320
|
-
import { operation as o319 } from './
|
|
321
|
-
import { operation as o320 } from './
|
|
322
|
-
import { operation as o321 } from './
|
|
323
|
-
import { operation as o322 } from './user/
|
|
324
|
-
import { operation as o323 } from './user/
|
|
325
|
-
import { operation as o324 } from './user/
|
|
326
|
-
import { operation as o325 } from './user/
|
|
327
|
-
import { operation as o326 } from './user/
|
|
328
|
-
import { operation as o327 } from './
|
|
329
|
-
import { operation as o328 } from './
|
|
330
|
-
import { operation as o329 } from './
|
|
331
|
-
import { operation as o330 } from './workspaces/
|
|
332
|
-
import { operation as o331 } from './workspaces/
|
|
333
|
-
import { operation as o332 } from './workspaces/
|
|
334
|
-
import { operation as o333 } from './workspaces/
|
|
335
|
-
import { operation as o334 } from './workspaces/
|
|
336
|
-
import { operation as o335 } from './workspaces/
|
|
337
|
-
import { operation as o336 } from './workspaces/
|
|
338
|
-
import { operation as o337 } from './workspaces/
|
|
221
|
+
import { operation as o220 } from './sensei/reels-later-holds-create.js';
|
|
222
|
+
import { operation as o221 } from './sensei/reels-later-holds-delete.js';
|
|
223
|
+
import { operation as o222 } from './sensei/reels-later-holds-list.js';
|
|
224
|
+
import { operation as o223 } from './sensei/repository-cards-create.js';
|
|
225
|
+
import { operation as o224 } from './sensei/sessions-assessments-create.js';
|
|
226
|
+
import { operation as o225 } from './sensei/sessions-facts-get.js';
|
|
227
|
+
import { operation as o226 } from './sensei/suggestions-create.js';
|
|
228
|
+
import { operation as o227 } from './sensei/threads-close.js';
|
|
229
|
+
import { operation as o228 } from './sensei/threads-create.js';
|
|
230
|
+
import { operation as o229 } from './sensei/threads-get.js';
|
|
231
|
+
import { operation as o230 } from './sensei/threads-list.js';
|
|
232
|
+
import { operation as o231 } from './sensei/threads-move.js';
|
|
233
|
+
import { operation as o232 } from './sensei/threads-split.js';
|
|
234
|
+
import { operation as o233 } from './sensei/tickets-merge.js';
|
|
235
|
+
import { operation as o234 } from './sensei/watch-reads-finish.js';
|
|
236
|
+
import { operation as o235 } from './sensei/widgets-get.js';
|
|
237
|
+
import { operation as o236 } from './sensei/writing-get.js';
|
|
238
|
+
import { operation as o237 } from './sensei/writing-set.js';
|
|
239
|
+
import { operation as o238 } from './sensei/writing-samples-create.js';
|
|
240
|
+
import { operation as o239 } from './sessions/app-stack-start.js';
|
|
241
|
+
import { operation as o240 } from './sessions/artifacts-create.js';
|
|
242
|
+
import { operation as o241 } from './sessions/artifacts-get.js';
|
|
243
|
+
import { operation as o242 } from './sessions/artifacts-list.js';
|
|
244
|
+
import { operation as o243 } from './sessions/create.js';
|
|
245
|
+
import { operation as o244 } from './sessions/delete.js';
|
|
246
|
+
import { operation as o245 } from './sessions/desktop-control-set.js';
|
|
247
|
+
import { operation as o246 } from './sessions/desktop-get.js';
|
|
248
|
+
import { operation as o247 } from './sessions/desktop-start.js';
|
|
249
|
+
import { operation as o248 } from './sessions/diff-comments-create.js';
|
|
250
|
+
import { operation as o249 } from './sessions/diff-comments-delete.js';
|
|
251
|
+
import { operation as o250 } from './sessions/diff-comments-list.js';
|
|
252
|
+
import { operation as o251 } from './sessions/diff-comments-update.js';
|
|
253
|
+
import { operation as o252 } from './sessions/diff-commits-list.js';
|
|
254
|
+
import { operation as o253 } from './sessions/diff-files-list.js';
|
|
255
|
+
import { operation as o254 } from './sessions/diff-patch-get.js';
|
|
256
|
+
import { operation as o255 } from './sessions/env-sync.js';
|
|
257
|
+
import { operation as o256 } from './sessions/files-get.js';
|
|
258
|
+
import { operation as o257 } from './sessions/files-list.js';
|
|
259
|
+
import { operation as o258 } from './sessions/files-set.js';
|
|
260
|
+
import { operation as o259 } from './sessions/get.js';
|
|
261
|
+
import { operation as o260 } from './sessions/git-state-get.js';
|
|
262
|
+
import { operation as o261 } from './sessions/go-ahead-delete.js';
|
|
263
|
+
import { operation as o262 } from './sessions/go-ahead-set.js';
|
|
264
|
+
import { operation as o263 } from './sessions/jobs-cancel.js';
|
|
265
|
+
import { operation as o264 } from './sessions/jobs-get.js';
|
|
266
|
+
import { operation as o265 } from './sessions/jobs-list.js';
|
|
267
|
+
import { operation as o266 } from './sessions/labels-set.js';
|
|
268
|
+
import { operation as o267 } from './sessions/labels-update.js';
|
|
269
|
+
import { operation as o268 } from './sessions/list.js';
|
|
270
|
+
import { operation as o269 } from './sessions/list--all.js';
|
|
271
|
+
import { operation as o270 } from './sessions/mark-read.js';
|
|
272
|
+
import { operation as o271 } from './sessions/messages-get.js';
|
|
273
|
+
import { operation as o272 } from './sessions/messages-list.js';
|
|
274
|
+
import { operation as o273 } from './sessions/prompt-update.js';
|
|
275
|
+
import { operation as o274 } from './sessions/qa-runs-finish.js';
|
|
276
|
+
import { operation as o275 } from './sessions/qa-runs-fixes-create.js';
|
|
277
|
+
import { operation as o276 } from './sessions/qa-runs-get.js';
|
|
278
|
+
import { operation as o277 } from './sessions/qa-runs-results-create.js';
|
|
279
|
+
import { operation as o278 } from './sessions/qa-runs-start.js';
|
|
280
|
+
import { operation as o279 } from './sessions/qa-runs-stop.js';
|
|
281
|
+
import { operation as o280 } from './sessions/qa-set.js';
|
|
282
|
+
import { operation as o281 } from './sessions/queue-delete.js';
|
|
283
|
+
import { operation as o282 } from './sessions/queue-list.js';
|
|
284
|
+
import { operation as o283 } from './sessions/queue-move.js';
|
|
285
|
+
import { operation as o284 } from './sessions/queue-resume.js';
|
|
286
|
+
import { operation as o285 } from './sessions/queue-send.js';
|
|
287
|
+
import { operation as o286 } from './sessions/queue-steer.js';
|
|
288
|
+
import { operation as o287 } from './sessions/queue-update.js';
|
|
289
|
+
import { operation as o288 } from './sessions/review-set.js';
|
|
290
|
+
import { operation as o289 } from './sessions/runtime-commands-run.js';
|
|
291
|
+
import { operation as o290 } from './sessions/search.js';
|
|
292
|
+
import { operation as o291 } from './sessions/send.js';
|
|
293
|
+
import { operation as o292 } from './sessions/start.js';
|
|
294
|
+
import { operation as o293 } from './sessions/steer.js';
|
|
295
|
+
import { operation as o294 } from './sessions/update.js';
|
|
296
|
+
import { operation as o295 } from './skills/create.js';
|
|
297
|
+
import { operation as o296 } from './skills/create--personal.js';
|
|
298
|
+
import { operation as o297 } from './skills/delete.js';
|
|
299
|
+
import { operation as o298 } from './skills/delete--personal.js';
|
|
300
|
+
import { operation as o299 } from './skills/get.js';
|
|
301
|
+
import { operation as o300 } from './skills/get--personal.js';
|
|
302
|
+
import { operation as o301 } from './skills/list.js';
|
|
303
|
+
import { operation as o302 } from './skills/list--personal.js';
|
|
304
|
+
import { operation as o303 } from './skills/update.js';
|
|
305
|
+
import { operation as o304 } from './skills/update--personal.js';
|
|
306
|
+
import { operation as o305 } from './tasks/create.js';
|
|
307
|
+
import { operation as o306 } from './tasks/create--personal.js';
|
|
308
|
+
import { operation as o307 } from './tasks/delete.js';
|
|
309
|
+
import { operation as o308 } from './tasks/delete--personal.js';
|
|
310
|
+
import { operation as o309 } from './tasks/get.js';
|
|
311
|
+
import { operation as o310 } from './tasks/get--personal.js';
|
|
312
|
+
import { operation as o311 } from './tasks/labels-list.js';
|
|
313
|
+
import { operation as o312 } from './tasks/list.js';
|
|
314
|
+
import { operation as o313 } from './tasks/list--all.js';
|
|
315
|
+
import { operation as o314 } from './tasks/list--personal.js';
|
|
316
|
+
import { operation as o315 } from './tasks/move.js';
|
|
317
|
+
import { operation as o316 } from './tasks/move--personal.js';
|
|
318
|
+
import { operation as o317 } from './tasks/project-set.js';
|
|
319
|
+
import { operation as o318 } from './tasks/start.js';
|
|
320
|
+
import { operation as o319 } from './tasks/start--personal.js';
|
|
321
|
+
import { operation as o320 } from './tasks/update.js';
|
|
322
|
+
import { operation as o321 } from './tasks/update--personal.js';
|
|
323
|
+
import { operation as o322 } from './user/api-keys-delete.js';
|
|
324
|
+
import { operation as o323 } from './user/personal-space-get.js';
|
|
325
|
+
import { operation as o324 } from './user/profile-get.js';
|
|
326
|
+
import { operation as o325 } from './user/push-devices-create.js';
|
|
327
|
+
import { operation as o326 } from './user/push-devices-delete.js';
|
|
328
|
+
import { operation as o327 } from './user/settings-get.js';
|
|
329
|
+
import { operation as o328 } from './user/settings-update.js';
|
|
330
|
+
import { operation as o329 } from './user/usage-get.js';
|
|
331
|
+
import { operation as o330 } from './workspaces/artifacts-search.js';
|
|
332
|
+
import { operation as o331 } from './workspaces/credits-get.js';
|
|
333
|
+
import { operation as o332 } from './workspaces/get.js';
|
|
334
|
+
import { operation as o333 } from './workspaces/list.js';
|
|
335
|
+
import { operation as o334 } from './workspaces/members-list.js';
|
|
336
|
+
import { operation as o335 } from './workspaces/members-list--all.js';
|
|
337
|
+
import { operation as o336 } from './workspaces/sandbox-limit-get.js';
|
|
338
|
+
import { operation as o337 } from './workspaces/sandboxes-stop.js';
|
|
339
|
+
import { operation as o338 } from './workspaces/timezone-set.js';
|
|
340
|
+
import { operation as o339 } from './workspaces/usage-breakdown-get.js';
|
|
341
|
+
import { operation as o340 } from './workspaces/usage-get.js';
|
|
339
342
|
export const operations = [
|
|
340
343
|
o0,
|
|
341
344
|
o1,
|
|
@@ -675,4 +678,7 @@ export const operations = [
|
|
|
675
678
|
o335,
|
|
676
679
|
o336,
|
|
677
680
|
o337,
|
|
681
|
+
o338,
|
|
682
|
+
o339,
|
|
683
|
+
o340,
|
|
678
684
|
];
|
|
@@ -27,6 +27,13 @@ export const operation = {
|
|
|
27
27
|
"kind": "string",
|
|
28
28
|
"required": true,
|
|
29
29
|
"description": "What failed, with the evidence its task needs to fix it."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "summary",
|
|
33
|
+
"flag": "summary",
|
|
34
|
+
"kind": "string",
|
|
35
|
+
"required": false,
|
|
36
|
+
"description": "What its member reads on the task card, in one or two plain sentences: why it was left out, who handles it, and whether the member must act."
|
|
30
37
|
}
|
|
31
38
|
],
|
|
32
39
|
"required": true
|
|
@@ -55,6 +55,38 @@ export const operation = {
|
|
|
55
55
|
"kind": "string",
|
|
56
56
|
"required": false,
|
|
57
57
|
"description": "Files, one page only: refuse to replace a file that is no longer this version."
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "generatedStyles",
|
|
61
|
+
"flag": "generated-styles",
|
|
62
|
+
"kind": "string",
|
|
63
|
+
"required": false,
|
|
64
|
+
"description": "Filled by the CLI: the CSS it built from the project's own Tailwind entry for the class names content.js uses, scoped to the canvas. Absent: the styles are hand written."
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "visualCheck",
|
|
68
|
+
"flag": "visual-check",
|
|
69
|
+
"kind": "string",
|
|
70
|
+
"required": false,
|
|
71
|
+
"description": "Filled by the CLI: its comparison of the baseline state with the real screen, as JSON. Absent: not compared."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "visualCheckReason",
|
|
75
|
+
"flag": "visual-check-reason",
|
|
76
|
+
"kind": "string",
|
|
77
|
+
"required": false,
|
|
78
|
+
"description": "Why the baseline state may differ from the real screen by more than 3%; stored with the version and shown on its card."
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "dryRun",
|
|
82
|
+
"flag": "dry-run",
|
|
83
|
+
"kind": "string",
|
|
84
|
+
"required": false,
|
|
85
|
+
"description": "Filled by the CLI: true renders and checks the page and answers its HTML, saving nothing.",
|
|
86
|
+
"choices": [
|
|
87
|
+
"true",
|
|
88
|
+
"false"
|
|
89
|
+
]
|
|
58
90
|
}
|
|
59
91
|
],
|
|
60
92
|
"attachments": {
|
|
@@ -7,7 +7,7 @@ export const operation = {
|
|
|
7
7
|
"activity",
|
|
8
8
|
"list"
|
|
9
9
|
],
|
|
10
|
-
"summary": "Read stored activity versions for your
|
|
10
|
+
"summary": "Read stored activity versions for your Deck cards and Backlog tickets.",
|
|
11
11
|
"pathParams": [],
|
|
12
12
|
"query": [],
|
|
13
13
|
"body": null,
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export const operation = {
|
|
2
|
+
"method": "post",
|
|
3
|
+
"path": "/api/sensei/reels/later/holds",
|
|
4
|
+
"command": [
|
|
5
|
+
"sensei",
|
|
6
|
+
"reels",
|
|
7
|
+
"later-holds",
|
|
8
|
+
"create"
|
|
9
|
+
],
|
|
10
|
+
"summary": "Put an open Deck card off with Later for 30 minutes, on every device, at the revision you saw. A card already put off answers with its hold. Refused with CARD_CHANGED when the card moved past that revision.",
|
|
11
|
+
"pathParams": [],
|
|
12
|
+
"query": [],
|
|
13
|
+
"body": {
|
|
14
|
+
"fields": [
|
|
15
|
+
{
|
|
16
|
+
"name": "cardId",
|
|
17
|
+
"flag": "card-id",
|
|
18
|
+
"kind": "string",
|
|
19
|
+
"required": true,
|
|
20
|
+
"description": "The card to put off."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "revision",
|
|
24
|
+
"flag": "revision",
|
|
25
|
+
"kind": "integer",
|
|
26
|
+
"required": true,
|
|
27
|
+
"description": "The card revision you saw."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "carried",
|
|
31
|
+
"flag": "carried",
|
|
32
|
+
"kind": "json",
|
|
33
|
+
"required": false,
|
|
34
|
+
"description": "A hold this browser kept before Later was stored on the server: it keeps its own end and activity version, and is dropped when either has passed.",
|
|
35
|
+
"shape": "{heldAt: string, until: string, activityVersion: string}"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"required": true
|
|
39
|
+
},
|
|
40
|
+
"multipart": null,
|
|
41
|
+
"attachments": false,
|
|
42
|
+
"anonymous": false
|
|
43
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const operation = {
|
|
2
|
+
"method": "post",
|
|
3
|
+
"path": "/api/sensei/reels/later/holds/release",
|
|
4
|
+
"command": [
|
|
5
|
+
"sensei",
|
|
6
|
+
"reels",
|
|
7
|
+
"later-holds",
|
|
8
|
+
"delete"
|
|
9
|
+
],
|
|
10
|
+
"summary": "Bring Deck cards back from Later now, on every device. Each names the claim you read, so a card put off again since stays put off.",
|
|
11
|
+
"pathParams": [],
|
|
12
|
+
"query": [],
|
|
13
|
+
"body": {
|
|
14
|
+
"fields": [
|
|
15
|
+
{
|
|
16
|
+
"name": "holds",
|
|
17
|
+
"flag": "holds",
|
|
18
|
+
"kind": "json",
|
|
19
|
+
"required": true,
|
|
20
|
+
"description": "The holds to end, each by card id and the claim you read.",
|
|
21
|
+
"shape": "{id: string, claim: string}[] (max 200)"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"required": true
|
|
25
|
+
},
|
|
26
|
+
"multipart": null,
|
|
27
|
+
"attachments": false,
|
|
28
|
+
"anonymous": false
|
|
29
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const operation = {
|
|
2
|
+
"method": "get",
|
|
3
|
+
"path": "/api/sensei/reels/later/holds",
|
|
4
|
+
"command": [
|
|
5
|
+
"sensei",
|
|
6
|
+
"reels",
|
|
7
|
+
"later-holds",
|
|
8
|
+
"list"
|
|
9
|
+
],
|
|
10
|
+
"summary": "List the Deck cards you put off with Later that still wait: each comes back 30 minutes after it was put off, or sooner when its activity changes or it closes.",
|
|
11
|
+
"pathParams": [],
|
|
12
|
+
"query": [],
|
|
13
|
+
"body": null,
|
|
14
|
+
"multipart": null,
|
|
15
|
+
"attachments": false,
|
|
16
|
+
"anonymous": false
|
|
17
|
+
};
|
|
@@ -6,7 +6,7 @@ export const operation = {
|
|
|
6
6
|
"widgets",
|
|
7
7
|
"get"
|
|
8
8
|
],
|
|
9
|
-
"summary": "Read your open Sensei Card count and the first four cards in
|
|
9
|
+
"summary": "Read your open Sensei Card count and the first four cards in Deck order for widgets.",
|
|
10
10
|
"pathParams": [],
|
|
11
11
|
"query": [],
|
|
12
12
|
"body": null,
|
|
@@ -31,6 +31,8 @@ export const CLI_ONLY_FLAGS = {
|
|
|
31
31
|
'crons list': ['--all'],
|
|
32
32
|
'activity list': ['--all'],
|
|
33
33
|
'sensei threads list': ['--all'],
|
|
34
|
+
// Read by `./prototype-create.ts` before it sends; a flag with `<value>` takes one.
|
|
35
|
+
'prototypes create': ['--project-dir <path>', '--preview-url <url>', '--skip-visual-check'],
|
|
34
36
|
};
|
|
35
37
|
export const SESSION_ID_FLAG = 'session-id';
|
|
36
38
|
function fieldsOf(form) {
|
package/dist/runtime/attach.js
CHANGED
|
@@ -3,11 +3,13 @@ import { Argument, Command, InvalidArgumentError, Option } from 'commander';
|
|
|
3
3
|
import { addsSessionIdFlag, CLI_ONLY_FLAGS, omitsProject, SESSION_ID_FLAG, sessionIdField, } from './arguments.js';
|
|
4
4
|
import { setAfterHelp, setOptionShape, shortSummary, usageError } from './help.js';
|
|
5
5
|
import { buildRequest, execute, readWholeBody, UsageError } from './invoke.js';
|
|
6
|
+
import { collect, jsonParser } from './option-parsers.js';
|
|
6
7
|
import { withMemberTimeZone } from './member-time-zone.js';
|
|
7
8
|
import { isOwnerRepo, ownerRepoParser } from './owner-repo.js';
|
|
8
9
|
import { PERSONAL_SPACE_PARAM } from './personal-space.js';
|
|
9
10
|
import { refusedBeforeSending } from './prototype-check.js';
|
|
10
11
|
import { personalSpaceId } from './personal-space-id.js';
|
|
12
|
+
import { PROTOTYPE_CREATE_HELP, prepareOperationInput } from './prototype-create.js';
|
|
11
13
|
import { threadView, TOOLS_FLAG_HELP } from './thread-text.js';
|
|
12
14
|
import { fieldsOf, formLabel, formUsage, leafShape, pathParamsFor, PERSONAL, scopeOf, selectForm, } from './variants.js';
|
|
13
15
|
/**
|
|
@@ -117,7 +119,9 @@ const ALL_FLAG_HELP = 'Every row, as a list prints now. Scripts pass it to stay
|
|
|
117
119
|
function addCliOnlyOptions(leaf, operation) {
|
|
118
120
|
const command = operation.command.join(' ');
|
|
119
121
|
for (const flag of CLI_ONLY_FLAGS[command] ?? []) {
|
|
120
|
-
leaf.addOption(new Option(flag, VIEWS[command]?.flags[flag] ??
|
|
122
|
+
leaf.addOption(new Option(flag, VIEWS[command]?.flags[flag] ??
|
|
123
|
+
PROTOTYPE_CREATE_HELP[flag] ??
|
|
124
|
+
(flag === '--all' ? ALL_FLAG_HELP : '')));
|
|
121
125
|
}
|
|
122
126
|
}
|
|
123
127
|
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
@@ -314,6 +318,7 @@ function attachForms(root, forms, runtime, reachable) {
|
|
|
314
318
|
}
|
|
315
319
|
/** Build, send and print; a usage error is commander's, so it prints as one. */
|
|
316
320
|
async function run(leaf, runtime, operation, input, options = {}) {
|
|
321
|
+
input = await prepareOperationInput(runtime, operation, input, options);
|
|
317
322
|
let request;
|
|
318
323
|
try {
|
|
319
324
|
request = buildRequest(operation, input);
|
|
@@ -515,17 +520,6 @@ function readFieldFile(path) {
|
|
|
515
520
|
throw new UsageError(`Could not read ${path}: ${error instanceof Error ? error.message : String(error)}`);
|
|
516
521
|
}
|
|
517
522
|
}
|
|
518
|
-
function jsonParser(raw) {
|
|
519
|
-
try {
|
|
520
|
-
return JSON.parse(raw);
|
|
521
|
-
}
|
|
522
|
-
catch {
|
|
523
|
-
throw new InvalidArgumentError('Expected JSON.');
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
function collect(value, previous) {
|
|
527
|
-
return [...(previous ?? []), value];
|
|
528
|
-
}
|
|
529
523
|
/**
|
|
530
524
|
* commander stores `--exclude-archived` as `excludeArchived`.
|
|
531
525
|
* @internal
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InvalidArgumentError } from 'commander';
|
|
2
|
+
/** A JSON flag's value, or commander's usage error. */
|
|
3
|
+
export function jsonParser(raw) {
|
|
4
|
+
try {
|
|
5
|
+
return JSON.parse(raw);
|
|
6
|
+
}
|
|
7
|
+
catch {
|
|
8
|
+
throw new InvalidArgumentError('Expected JSON.');
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
/** A repeated flag's values, in the order given. */
|
|
12
|
+
export function collect(value, previous) {
|
|
13
|
+
return [...(previous ?? []), value];
|
|
14
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { buildPrototypeStyles } from './prototype-styles.js';
|
|
2
|
+
import { runVisualCheck } from './prototype-visual-check.js';
|
|
3
|
+
/** The command this prepares; every other command passes through unchanged. */
|
|
4
|
+
const COMMAND = 'prototypes create';
|
|
5
|
+
/** The help of its CLI-only flags (`CLI_ONLY_FLAGS` in `./arguments.ts`), read here and never sent. */
|
|
6
|
+
export const PROTOTYPE_CREATE_HELP = {
|
|
7
|
+
'--project-dir <path>': "The project's clone, whose Tailwind entry the styles are built from. Default: the nearest folder up from here with a package.json that depends on tailwindcss.",
|
|
8
|
+
'--preview-url <url>': "The running app's address the baseline state is compared with. Default: this session's app preview.",
|
|
9
|
+
'--skip-visual-check': 'Skip the comparison with the real screen; the save says not compared.',
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Before `kosuke prototypes create` sends its three files, where the project's clone is:
|
|
13
|
+
* 1. builds CSS from the project's own Tailwind entry for the class names content.js uses, and
|
|
14
|
+
* sends it as `generatedStyles` (`./prototype-styles.ts`);
|
|
15
|
+
* 2. when prototype.json declares a `baseline` and a browser and the app preview are reachable,
|
|
16
|
+
* renders the page without saving it (`dryRun`), screenshots its baseline state and the real
|
|
17
|
+
* screen at the same width and theme, and sends the result as `visualCheck`
|
|
18
|
+
* (`./prototype-visual-check.ts`).
|
|
19
|
+
* Notices go to stderr; the answer stays the server's.
|
|
20
|
+
*/
|
|
21
|
+
export async function prepareOperationInput(runtime, operation, input, options) {
|
|
22
|
+
if (operation.command.join(' ') !== COMMAND || input.wholeBody !== undefined)
|
|
23
|
+
return input;
|
|
24
|
+
const styles = await buildPrototypeStyles({
|
|
25
|
+
attachments: input.attachments,
|
|
26
|
+
projectDir: typeof options.projectDir === 'string' ? options.projectDir : undefined,
|
|
27
|
+
});
|
|
28
|
+
if (styles.notice)
|
|
29
|
+
runtime.notice?.(styles.notice);
|
|
30
|
+
let fields = { ...input.fields };
|
|
31
|
+
if (styles.css)
|
|
32
|
+
fields.generatedStyles = styles.css;
|
|
33
|
+
// A dry run saves nothing, so it publishes no comparison picture either.
|
|
34
|
+
if (options.skipVisualCheck !== true && fields.dryRun !== 'true') {
|
|
35
|
+
const check = await runVisualCheck({
|
|
36
|
+
runtime,
|
|
37
|
+
operation,
|
|
38
|
+
input: { ...input, fields },
|
|
39
|
+
previewUrl: typeof options.previewUrl === 'string' ? options.previewUrl : undefined,
|
|
40
|
+
});
|
|
41
|
+
if (check.notice)
|
|
42
|
+
runtime.notice?.(check.notice);
|
|
43
|
+
if (check.result)
|
|
44
|
+
fields = { ...fields, visualCheck: JSON.stringify(check.result) };
|
|
45
|
+
}
|
|
46
|
+
return { ...input, fields };
|
|
47
|
+
}
|