@kosuke-ai/kosuke 1.0.76 → 1.0.78
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 +10 -0
- package/dist/generated/commands/activity/list.js +1 -1
- package/dist/generated/commands/index.js +141 -137
- package/dist/generated/commands/sensei/cards-reply-recovery-run.js +29 -0
- package/dist/generated/commands/tasks/create--personal.js +16 -0
- package/dist/generated/commands/tasks/create.js +16 -0
- package/dist/generated/commands/tasks/project-set.js +38 -0
- package/dist/runtime/attach.js +4 -19
- package/dist/runtime/owner-repo.js +20 -0
- package/dist/runtime/prototype-check.js +220 -0
- package/openapi.json +185 -2
- package/package.json +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.78
|
|
4
|
+
|
|
5
|
+
- `kosuke prototypes create` runs the prototype's script before upload and refuses a state its `show` entry cannot reach, listing each in `details.issues`.
|
|
6
|
+
- `kosuke tasks create` takes --labels, a JSON array of the Session Labels a task filed with --hint-project starts with.
|
|
7
|
+
- Add `kosuke sensei cards reply-recovery run`, which reads back a card reply whose approval Turn ended with its outcome unknown and finishes it under the original approval.
|
|
8
|
+
|
|
9
|
+
## 1.0.77
|
|
10
|
+
|
|
11
|
+
- Add `kosuke tasks project set <workspaceId> <taskId> --project-id <projectId>`, which moves a Todo task and its Backlog session to another deployed repository of the same workspace in place, keeping its IDs, Assignee, description, messages, attachments and labels, and starting nothing.
|
|
12
|
+
|
|
3
13
|
## 1.0.76
|
|
4
14
|
|
|
5
15
|
- `kosuke github repositories list` takes --limit, --cursor and --q to page and search; without them it still lists every repository.
|
|
@@ -48,7 +48,7 @@ export const operation = {
|
|
|
48
48
|
"flag": "kind",
|
|
49
49
|
"kind": "string",
|
|
50
50
|
"required": false,
|
|
51
|
-
"description": "Comma-separated kinds (job_awaiting_response, pr_checks_failed, pr_checks_passed, main_checks_failed, main_checks_passed, pr_merged, branch_behind, cron_run_succeeded, cron_run_failed, deployed, recovery_deploy_started, workspace_device_disconnected, session_started, session_message_sent, session_archived, session_deleted, session_assigned, session_status_changed, session_priority_changed, cron_created, cron_updated, cron_deleted, member_invited, member_removed, member_role_changed, integration_custom_tool_saved, integration_custom_tool_enabled, integration_custom_tool_disabled, integration_custom_tool_deleted, integration_custom_tool_restored), or 'change' for every Change and 'action' for every Member Action."
|
|
51
|
+
"description": "Comma-separated kinds (job_awaiting_response, pr_checks_failed, pr_checks_passed, main_checks_failed, main_checks_passed, pr_merged, branch_behind, cron_run_succeeded, cron_run_failed, deployed, recovery_deploy_started, workspace_device_disconnected, session_started, session_message_sent, session_archived, session_deleted, session_assigned, session_status_changed, session_priority_changed, session_moved, cron_created, cron_updated, cron_deleted, member_invited, member_removed, member_role_changed, integration_custom_tool_saved, integration_custom_tool_enabled, integration_custom_tool_disabled, integration_custom_tool_deleted, integration_custom_tool_restored), or 'change' for every Change and 'action' for every Member Action."
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
"name": "limit",
|
|
@@ -197,143 +197,145 @@ import { operation as o195 } from './sensei/cards-close.js';
|
|
|
197
197
|
import { operation as o196 } from './sensei/cards-list.js';
|
|
198
198
|
import { operation as o197 } from './sensei/cards-mark-read.js';
|
|
199
199
|
import { operation as o198 } from './sensei/cards-reply.js';
|
|
200
|
-
import { operation as o199 } from './sensei/cards-
|
|
201
|
-
import { operation as o200 } from './sensei/
|
|
202
|
-
import { operation as o201 } from './sensei/
|
|
203
|
-
import { operation as o202 } from './sensei/
|
|
204
|
-
import { operation as o203 } from './sensei/delegates-
|
|
205
|
-
import { operation as o204 } from './sensei/delegates-
|
|
206
|
-
import { operation as o205 } from './sensei/delegates-
|
|
207
|
-
import { operation as o206 } from './sensei/delegates-
|
|
208
|
-
import { operation as o207 } from './sensei/
|
|
209
|
-
import { operation as o208 } from './sensei/
|
|
210
|
-
import { operation as o209 } from './sensei/device-requests-
|
|
211
|
-
import { operation as o210 } from './sensei/
|
|
212
|
-
import { operation as o211 } from './sensei/
|
|
213
|
-
import { operation as o212 } from './sensei/memory-
|
|
214
|
-
import { operation as o213 } from './sensei/
|
|
215
|
-
import { operation as o214 } from './sensei/
|
|
216
|
-
import { operation as o215 } from './sensei/messages-
|
|
217
|
-
import { operation as o216 } from './sensei/messages-
|
|
218
|
-
import { operation as o217 } from './sensei/
|
|
219
|
-
import { operation as o218 } from './sensei/
|
|
220
|
-
import { operation as o219 } from './sensei/
|
|
221
|
-
import { operation as o220 } from './sensei/
|
|
222
|
-
import { operation as o221 } from './sensei/sessions-
|
|
223
|
-
import { operation as o222 } from './sensei/
|
|
224
|
-
import { operation as o223 } from './sensei/
|
|
225
|
-
import { operation as o224 } from './sensei/threads-
|
|
226
|
-
import { operation as o225 } from './sensei/threads-
|
|
227
|
-
import { operation as o226 } from './sensei/threads-
|
|
228
|
-
import { operation as o227 } from './sensei/threads-
|
|
229
|
-
import { operation as o228 } from './sensei/threads-
|
|
230
|
-
import { operation as o229 } from './sensei/
|
|
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/writing-
|
|
235
|
-
import { operation as o234 } from './sensei/writing-
|
|
236
|
-
import { operation as o235 } from './
|
|
237
|
-
import { operation as o236 } from './sessions/
|
|
238
|
-
import { operation as o237 } from './sessions/artifacts-
|
|
239
|
-
import { operation as o238 } from './sessions/artifacts-
|
|
240
|
-
import { operation as o239 } from './sessions/
|
|
241
|
-
import { operation as o240 } from './sessions/
|
|
242
|
-
import { operation as o241 } from './sessions/
|
|
243
|
-
import { operation as o242 } from './sessions/desktop-
|
|
244
|
-
import { operation as o243 } from './sessions/desktop-
|
|
245
|
-
import { operation as o244 } from './sessions/
|
|
246
|
-
import { operation as o245 } from './sessions/diff-comments-
|
|
247
|
-
import { operation as o246 } from './sessions/diff-comments-
|
|
248
|
-
import { operation as o247 } from './sessions/diff-comments-
|
|
249
|
-
import { operation as o248 } from './sessions/diff-
|
|
250
|
-
import { operation as o249 } from './sessions/diff-
|
|
251
|
-
import { operation as o250 } from './sessions/diff-
|
|
252
|
-
import { operation as o251 } from './sessions/
|
|
253
|
-
import { operation as o252 } from './sessions/
|
|
254
|
-
import { operation as o253 } from './sessions/files-
|
|
255
|
-
import { operation as o254 } from './sessions/files-
|
|
256
|
-
import { operation as o255 } from './sessions/
|
|
257
|
-
import { operation as o256 } from './sessions/
|
|
258
|
-
import { operation as o257 } from './sessions/
|
|
259
|
-
import { operation as o258 } from './sessions/go-ahead-
|
|
260
|
-
import { operation as o259 } from './sessions/
|
|
261
|
-
import { operation as o260 } from './sessions/jobs-
|
|
262
|
-
import { operation as o261 } from './sessions/jobs-
|
|
263
|
-
import { operation as o262 } from './sessions/
|
|
264
|
-
import { operation as o263 } from './sessions/labels-
|
|
265
|
-
import { operation as o264 } from './sessions/
|
|
266
|
-
import { operation as o265 } from './sessions/list
|
|
267
|
-
import { operation as o266 } from './sessions/
|
|
268
|
-
import { operation as o267 } from './sessions/
|
|
269
|
-
import { operation as o268 } from './sessions/messages-
|
|
270
|
-
import { operation as o269 } from './sessions/
|
|
271
|
-
import { operation as o270 } from './sessions/
|
|
272
|
-
import { operation as o271 } from './sessions/qa-runs-
|
|
273
|
-
import { operation as o272 } from './sessions/qa-runs-
|
|
274
|
-
import { operation as o273 } from './sessions/qa-runs-
|
|
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-
|
|
278
|
-
import { operation as o277 } from './sessions/
|
|
279
|
-
import { operation as o278 } from './sessions/queue-
|
|
280
|
-
import { operation as o279 } from './sessions/queue-
|
|
281
|
-
import { operation as o280 } from './sessions/queue-
|
|
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/
|
|
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 './
|
|
293
|
-
import { operation as o292 } from './skills/create
|
|
294
|
-
import { operation as o293 } from './skills/
|
|
295
|
-
import { operation as o294 } from './skills/delete
|
|
296
|
-
import { operation as o295 } from './skills/
|
|
297
|
-
import { operation as o296 } from './skills/get
|
|
298
|
-
import { operation as o297 } from './skills/
|
|
299
|
-
import { operation as o298 } from './skills/list
|
|
300
|
-
import { operation as o299 } from './skills/
|
|
301
|
-
import { operation as o300 } from './skills/update
|
|
302
|
-
import { operation as o301 } from './
|
|
303
|
-
import { operation as o302 } from './tasks/create
|
|
304
|
-
import { operation as o303 } from './tasks/
|
|
305
|
-
import { operation as o304 } from './tasks/delete
|
|
306
|
-
import { operation as o305 } from './tasks/
|
|
307
|
-
import { operation as o306 } from './tasks/get
|
|
308
|
-
import { operation as o307 } from './tasks/
|
|
309
|
-
import { operation as o308 } from './tasks/list.js';
|
|
310
|
-
import { operation as o309 } from './tasks/list
|
|
311
|
-
import { operation as o310 } from './tasks/list--
|
|
312
|
-
import { operation as o311 } from './tasks/
|
|
313
|
-
import { operation as o312 } from './tasks/move
|
|
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 './
|
|
319
|
-
import { operation as o318 } from './
|
|
320
|
-
import { operation as o319 } from './user/
|
|
321
|
-
import { operation as o320 } from './user/
|
|
322
|
-
import { operation as o321 } from './user/
|
|
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 './
|
|
327
|
-
import { operation as o326 } from './
|
|
328
|
-
import { operation as o327 } from './workspaces/
|
|
329
|
-
import { operation as o328 } from './workspaces/
|
|
330
|
-
import { operation as o329 } from './workspaces/
|
|
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/
|
|
200
|
+
import { operation as o199 } from './sensei/cards-reply-recovery-run.js';
|
|
201
|
+
import { operation as o200 } from './sensei/cards-set.js';
|
|
202
|
+
import { operation as o201 } from './sensei/chat-get.js';
|
|
203
|
+
import { operation as o202 } from './sensei/connect-buttons-create.js';
|
|
204
|
+
import { operation as o203 } from './sensei/delegates-get.js';
|
|
205
|
+
import { operation as o204 } from './sensei/delegates-list.js';
|
|
206
|
+
import { operation as o205 } from './sensei/delegates-notes-create.js';
|
|
207
|
+
import { operation as o206 } from './sensei/delegates-start.js';
|
|
208
|
+
import { operation as o207 } from './sensei/delegates-stop.js';
|
|
209
|
+
import { operation as o208 } from './sensei/describe-cards-create.js';
|
|
210
|
+
import { operation as o209 } from './sensei/device-requests-list.js';
|
|
211
|
+
import { operation as o210 } from './sensei/device-requests-update.js';
|
|
212
|
+
import { operation as o211 } from './sensei/fyi-move.js';
|
|
213
|
+
import { operation as o212 } from './sensei/memory-get.js';
|
|
214
|
+
import { operation as o213 } from './sensei/memory-set.js';
|
|
215
|
+
import { operation as o214 } from './sensei/merge-rule-set.js';
|
|
216
|
+
import { operation as o215 } from './sensei/messages-move.js';
|
|
217
|
+
import { operation as o216 } from './sensei/messages-reply.js';
|
|
218
|
+
import { operation as o217 } from './sensei/messages-send.js';
|
|
219
|
+
import { operation as o218 } from './sensei/notifications-mark-read.js';
|
|
220
|
+
import { operation as o219 } from './sensei/reels-activity-list.js';
|
|
221
|
+
import { operation as o220 } from './sensei/repository-cards-create.js';
|
|
222
|
+
import { operation as o221 } from './sensei/sessions-assessments-create.js';
|
|
223
|
+
import { operation as o222 } from './sensei/sessions-facts-get.js';
|
|
224
|
+
import { operation as o223 } from './sensei/suggestions-create.js';
|
|
225
|
+
import { operation as o224 } from './sensei/threads-close.js';
|
|
226
|
+
import { operation as o225 } from './sensei/threads-create.js';
|
|
227
|
+
import { operation as o226 } from './sensei/threads-get.js';
|
|
228
|
+
import { operation as o227 } from './sensei/threads-list.js';
|
|
229
|
+
import { operation as o228 } from './sensei/threads-move.js';
|
|
230
|
+
import { operation as o229 } from './sensei/threads-split.js';
|
|
231
|
+
import { operation as o230 } from './sensei/tickets-merge.js';
|
|
232
|
+
import { operation as o231 } from './sensei/watch-reads-finish.js';
|
|
233
|
+
import { operation as o232 } from './sensei/widgets-get.js';
|
|
234
|
+
import { operation as o233 } from './sensei/writing-get.js';
|
|
235
|
+
import { operation as o234 } from './sensei/writing-set.js';
|
|
236
|
+
import { operation as o235 } from './sensei/writing-samples-create.js';
|
|
237
|
+
import { operation as o236 } from './sessions/app-stack-start.js';
|
|
238
|
+
import { operation as o237 } from './sessions/artifacts-create.js';
|
|
239
|
+
import { operation as o238 } from './sessions/artifacts-get.js';
|
|
240
|
+
import { operation as o239 } from './sessions/artifacts-list.js';
|
|
241
|
+
import { operation as o240 } from './sessions/create.js';
|
|
242
|
+
import { operation as o241 } from './sessions/delete.js';
|
|
243
|
+
import { operation as o242 } from './sessions/desktop-control-set.js';
|
|
244
|
+
import { operation as o243 } from './sessions/desktop-get.js';
|
|
245
|
+
import { operation as o244 } from './sessions/desktop-start.js';
|
|
246
|
+
import { operation as o245 } from './sessions/diff-comments-create.js';
|
|
247
|
+
import { operation as o246 } from './sessions/diff-comments-delete.js';
|
|
248
|
+
import { operation as o247 } from './sessions/diff-comments-list.js';
|
|
249
|
+
import { operation as o248 } from './sessions/diff-comments-update.js';
|
|
250
|
+
import { operation as o249 } from './sessions/diff-commits-list.js';
|
|
251
|
+
import { operation as o250 } from './sessions/diff-files-list.js';
|
|
252
|
+
import { operation as o251 } from './sessions/diff-patch-get.js';
|
|
253
|
+
import { operation as o252 } from './sessions/env-sync.js';
|
|
254
|
+
import { operation as o253 } from './sessions/files-get.js';
|
|
255
|
+
import { operation as o254 } from './sessions/files-list.js';
|
|
256
|
+
import { operation as o255 } from './sessions/files-set.js';
|
|
257
|
+
import { operation as o256 } from './sessions/get.js';
|
|
258
|
+
import { operation as o257 } from './sessions/git-state-get.js';
|
|
259
|
+
import { operation as o258 } from './sessions/go-ahead-delete.js';
|
|
260
|
+
import { operation as o259 } from './sessions/go-ahead-set.js';
|
|
261
|
+
import { operation as o260 } from './sessions/jobs-cancel.js';
|
|
262
|
+
import { operation as o261 } from './sessions/jobs-get.js';
|
|
263
|
+
import { operation as o262 } from './sessions/jobs-list.js';
|
|
264
|
+
import { operation as o263 } from './sessions/labels-set.js';
|
|
265
|
+
import { operation as o264 } from './sessions/labels-update.js';
|
|
266
|
+
import { operation as o265 } from './sessions/list.js';
|
|
267
|
+
import { operation as o266 } from './sessions/list--all.js';
|
|
268
|
+
import { operation as o267 } from './sessions/mark-read.js';
|
|
269
|
+
import { operation as o268 } from './sessions/messages-get.js';
|
|
270
|
+
import { operation as o269 } from './sessions/messages-list.js';
|
|
271
|
+
import { operation as o270 } from './sessions/prompt-update.js';
|
|
272
|
+
import { operation as o271 } from './sessions/qa-runs-finish.js';
|
|
273
|
+
import { operation as o272 } from './sessions/qa-runs-fixes-create.js';
|
|
274
|
+
import { operation as o273 } from './sessions/qa-runs-get.js';
|
|
275
|
+
import { operation as o274 } from './sessions/qa-runs-results-create.js';
|
|
276
|
+
import { operation as o275 } from './sessions/qa-runs-start.js';
|
|
277
|
+
import { operation as o276 } from './sessions/qa-runs-stop.js';
|
|
278
|
+
import { operation as o277 } from './sessions/qa-set.js';
|
|
279
|
+
import { operation as o278 } from './sessions/queue-delete.js';
|
|
280
|
+
import { operation as o279 } from './sessions/queue-list.js';
|
|
281
|
+
import { operation as o280 } from './sessions/queue-move.js';
|
|
282
|
+
import { operation as o281 } from './sessions/queue-resume.js';
|
|
283
|
+
import { operation as o282 } from './sessions/queue-send.js';
|
|
284
|
+
import { operation as o283 } from './sessions/queue-steer.js';
|
|
285
|
+
import { operation as o284 } from './sessions/queue-update.js';
|
|
286
|
+
import { operation as o285 } from './sessions/review-set.js';
|
|
287
|
+
import { operation as o286 } from './sessions/runtime-commands-run.js';
|
|
288
|
+
import { operation as o287 } from './sessions/search.js';
|
|
289
|
+
import { operation as o288 } from './sessions/send.js';
|
|
290
|
+
import { operation as o289 } from './sessions/start.js';
|
|
291
|
+
import { operation as o290 } from './sessions/steer.js';
|
|
292
|
+
import { operation as o291 } from './sessions/update.js';
|
|
293
|
+
import { operation as o292 } from './skills/create.js';
|
|
294
|
+
import { operation as o293 } from './skills/create--personal.js';
|
|
295
|
+
import { operation as o294 } from './skills/delete.js';
|
|
296
|
+
import { operation as o295 } from './skills/delete--personal.js';
|
|
297
|
+
import { operation as o296 } from './skills/get.js';
|
|
298
|
+
import { operation as o297 } from './skills/get--personal.js';
|
|
299
|
+
import { operation as o298 } from './skills/list.js';
|
|
300
|
+
import { operation as o299 } from './skills/list--personal.js';
|
|
301
|
+
import { operation as o300 } from './skills/update.js';
|
|
302
|
+
import { operation as o301 } from './skills/update--personal.js';
|
|
303
|
+
import { operation as o302 } from './tasks/create.js';
|
|
304
|
+
import { operation as o303 } from './tasks/create--personal.js';
|
|
305
|
+
import { operation as o304 } from './tasks/delete.js';
|
|
306
|
+
import { operation as o305 } from './tasks/delete--personal.js';
|
|
307
|
+
import { operation as o306 } from './tasks/get.js';
|
|
308
|
+
import { operation as o307 } from './tasks/get--personal.js';
|
|
309
|
+
import { operation as o308 } from './tasks/labels-list.js';
|
|
310
|
+
import { operation as o309 } from './tasks/list.js';
|
|
311
|
+
import { operation as o310 } from './tasks/list--all.js';
|
|
312
|
+
import { operation as o311 } from './tasks/list--personal.js';
|
|
313
|
+
import { operation as o312 } from './tasks/move.js';
|
|
314
|
+
import { operation as o313 } from './tasks/move--personal.js';
|
|
315
|
+
import { operation as o314 } from './tasks/project-set.js';
|
|
316
|
+
import { operation as o315 } from './tasks/start.js';
|
|
317
|
+
import { operation as o316 } from './tasks/start--personal.js';
|
|
318
|
+
import { operation as o317 } from './tasks/update.js';
|
|
319
|
+
import { operation as o318 } from './tasks/update--personal.js';
|
|
320
|
+
import { operation as o319 } from './user/api-keys-delete.js';
|
|
321
|
+
import { operation as o320 } from './user/personal-space-get.js';
|
|
322
|
+
import { operation as o321 } from './user/profile-get.js';
|
|
323
|
+
import { operation as o322 } from './user/push-devices-create.js';
|
|
324
|
+
import { operation as o323 } from './user/push-devices-delete.js';
|
|
325
|
+
import { operation as o324 } from './user/settings-get.js';
|
|
326
|
+
import { operation as o325 } from './user/settings-update.js';
|
|
327
|
+
import { operation as o326 } from './user/usage-get.js';
|
|
328
|
+
import { operation as o327 } from './workspaces/artifacts-search.js';
|
|
329
|
+
import { operation as o328 } from './workspaces/credits-get.js';
|
|
330
|
+
import { operation as o329 } from './workspaces/get.js';
|
|
331
|
+
import { operation as o330 } from './workspaces/list.js';
|
|
332
|
+
import { operation as o331 } from './workspaces/members-list.js';
|
|
333
|
+
import { operation as o332 } from './workspaces/members-list--all.js';
|
|
334
|
+
import { operation as o333 } from './workspaces/sandbox-limit-get.js';
|
|
335
|
+
import { operation as o334 } from './workspaces/sandboxes-stop.js';
|
|
336
|
+
import { operation as o335 } from './workspaces/timezone-set.js';
|
|
337
|
+
import { operation as o336 } from './workspaces/usage-breakdown-get.js';
|
|
338
|
+
import { operation as o337 } from './workspaces/usage-get.js';
|
|
337
339
|
export const operations = [
|
|
338
340
|
o0,
|
|
339
341
|
o1,
|
|
@@ -671,4 +673,6 @@ export const operations = [
|
|
|
671
673
|
o333,
|
|
672
674
|
o334,
|
|
673
675
|
o335,
|
|
676
|
+
o336,
|
|
677
|
+
o337,
|
|
674
678
|
];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const operation = {
|
|
2
|
+
"method": "post",
|
|
3
|
+
"path": "/api/sensei/cards/recover-reply",
|
|
4
|
+
"command": [
|
|
5
|
+
"sensei",
|
|
6
|
+
"cards",
|
|
7
|
+
"reply-recovery",
|
|
8
|
+
"run"
|
|
9
|
+
],
|
|
10
|
+
"summary": "Read back the reply an ended approval Turn left unknown, under its original approval and key: record a found send, and send only when the read back proves nothing went",
|
|
11
|
+
"pathParams": [],
|
|
12
|
+
"query": [],
|
|
13
|
+
"body": {
|
|
14
|
+
"fields": [
|
|
15
|
+
{
|
|
16
|
+
"name": "card",
|
|
17
|
+
"flag": "card",
|
|
18
|
+
"kind": "string",
|
|
19
|
+
"required": true,
|
|
20
|
+
"description": "The approved card whose reply has an unknown outcome"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"required": true
|
|
24
|
+
},
|
|
25
|
+
"multipart": null,
|
|
26
|
+
"attachments": false,
|
|
27
|
+
"anonymous": false,
|
|
28
|
+
"agents": "all"
|
|
29
|
+
};
|
|
@@ -124,6 +124,14 @@ export const operation = {
|
|
|
124
124
|
"kind": "string",
|
|
125
125
|
"required": false
|
|
126
126
|
},
|
|
127
|
+
{
|
|
128
|
+
"name": "labels",
|
|
129
|
+
"flag": "labels",
|
|
130
|
+
"kind": "json",
|
|
131
|
+
"required": false,
|
|
132
|
+
"description": "JSON array of up to 20 Session Labels the task's session starts with, stored lowercase. A new name joins the project's labels. Requires hintProjectId.",
|
|
133
|
+
"shape": "string[] (max 20)"
|
|
134
|
+
},
|
|
127
135
|
{
|
|
128
136
|
"name": "status",
|
|
129
137
|
"flag": "status",
|
|
@@ -261,6 +269,14 @@ export const operation = {
|
|
|
261
269
|
"kind": "string",
|
|
262
270
|
"required": false
|
|
263
271
|
},
|
|
272
|
+
{
|
|
273
|
+
"name": "labels",
|
|
274
|
+
"flag": "labels",
|
|
275
|
+
"kind": "json",
|
|
276
|
+
"required": false,
|
|
277
|
+
"description": "JSON array of up to 20 Session Labels the task's session starts with, stored lowercase. A new name joins the project's labels. Requires hintProjectId.",
|
|
278
|
+
"shape": "string[] (max 20)"
|
|
279
|
+
},
|
|
264
280
|
{
|
|
265
281
|
"name": "status",
|
|
266
282
|
"flag": "status",
|
|
@@ -122,6 +122,14 @@ export const operation = {
|
|
|
122
122
|
"kind": "string",
|
|
123
123
|
"required": false
|
|
124
124
|
},
|
|
125
|
+
{
|
|
126
|
+
"name": "labels",
|
|
127
|
+
"flag": "labels",
|
|
128
|
+
"kind": "json",
|
|
129
|
+
"required": false,
|
|
130
|
+
"description": "JSON array of up to 20 Session Labels the task's session starts with, stored lowercase. A new name joins the project's labels. Requires hintProjectId.",
|
|
131
|
+
"shape": "string[] (max 20)"
|
|
132
|
+
},
|
|
125
133
|
{
|
|
126
134
|
"name": "status",
|
|
127
135
|
"flag": "status",
|
|
@@ -259,6 +267,14 @@ export const operation = {
|
|
|
259
267
|
"kind": "string",
|
|
260
268
|
"required": false
|
|
261
269
|
},
|
|
270
|
+
{
|
|
271
|
+
"name": "labels",
|
|
272
|
+
"flag": "labels",
|
|
273
|
+
"kind": "json",
|
|
274
|
+
"required": false,
|
|
275
|
+
"description": "JSON array of up to 20 Session Labels the task's session starts with, stored lowercase. A new name joins the project's labels. Requires hintProjectId.",
|
|
276
|
+
"shape": "string[] (max 20)"
|
|
277
|
+
},
|
|
262
278
|
{
|
|
263
279
|
"name": "status",
|
|
264
280
|
"flag": "status",
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export const operation = {
|
|
2
|
+
"method": "post",
|
|
3
|
+
"path": "/api/organizations/{workspaceId}/tasks/{taskId}/transfer",
|
|
4
|
+
"command": [
|
|
5
|
+
"tasks",
|
|
6
|
+
"project",
|
|
7
|
+
"set"
|
|
8
|
+
],
|
|
9
|
+
"summary": "Move a Todo task and its Backlog session to another deployed repository of the same workspace, in place: same IDs, Assignee, description, messages, attachments and labels; nothing starts. Members and Sensei only, with access to both repositories. Only when the member asks. The same repository again succeeds with the task; a started task, or one with a branch, sandbox or pull request, answers 409 TASK_CONFLICT; a repository not deployed answers 409 TASK_INVALID_PROJECT, one out of reach 404.",
|
|
10
|
+
"pathParams": [
|
|
11
|
+
"workspaceId",
|
|
12
|
+
"taskId"
|
|
13
|
+
],
|
|
14
|
+
"query": [],
|
|
15
|
+
"body": {
|
|
16
|
+
"fields": [
|
|
17
|
+
{
|
|
18
|
+
"name": "projectId",
|
|
19
|
+
"flag": "project-id",
|
|
20
|
+
"kind": "string",
|
|
21
|
+
"required": true,
|
|
22
|
+
"description": "The deployed repository of the same workspace the Todo task and its Backlog session move to, in place. Nothing starts."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "ifRevision",
|
|
26
|
+
"flag": "if-revision",
|
|
27
|
+
"kind": "string",
|
|
28
|
+
"required": false,
|
|
29
|
+
"description": "The task updatedAt `tasks get` printed (not descriptionRevision); a task changed or moved since answers 409 TASK_CONFLICT. A retry to the repository it already moved to succeeds."
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"required": true
|
|
33
|
+
},
|
|
34
|
+
"multipart": null,
|
|
35
|
+
"attachments": false,
|
|
36
|
+
"anonymous": false,
|
|
37
|
+
"agents": "all"
|
|
38
|
+
};
|
package/dist/runtime/attach.js
CHANGED
|
@@ -4,7 +4,9 @@ import { addsSessionIdFlag, CLI_ONLY_FLAGS, omitsProject, SESSION_ID_FLAG, sessi
|
|
|
4
4
|
import { setAfterHelp, setOptionShape, shortSummary, usageError } from './help.js';
|
|
5
5
|
import { buildRequest, execute, readWholeBody, UsageError } from './invoke.js';
|
|
6
6
|
import { withMemberTimeZone } from './member-time-zone.js';
|
|
7
|
+
import { isOwnerRepo, ownerRepoParser } from './owner-repo.js';
|
|
7
8
|
import { PERSONAL_SPACE_PARAM } from './personal-space.js';
|
|
9
|
+
import { refusedBeforeSending } from './prototype-check.js';
|
|
8
10
|
import { personalSpaceId } from './personal-space-id.js';
|
|
9
11
|
import { threadView, TOOLS_FLAG_HELP } from './thread-text.js';
|
|
10
12
|
import { fieldsOf, formLabel, formUsage, leafShape, pathParamsFor, PERSONAL, scopeOf, selectForm, } from './variants.js';
|
|
@@ -321,6 +323,8 @@ async function run(leaf, runtime, operation, input, options = {}) {
|
|
|
321
323
|
leaf.error(error.message);
|
|
322
324
|
throw error;
|
|
323
325
|
}
|
|
326
|
+
if (refusedBeforeSending(runtime, operation, input))
|
|
327
|
+
return;
|
|
324
328
|
request = await withMemberTimeZone(runtime, operation, input, request);
|
|
325
329
|
const client = runtime.client({
|
|
326
330
|
anonymous: operation.anonymous,
|
|
@@ -432,25 +436,6 @@ function optionFor(field) {
|
|
|
432
436
|
option.argParser(isOwnerRepo(field) ? ownerRepoParser : jsonParser);
|
|
433
437
|
return option;
|
|
434
438
|
}
|
|
435
|
-
/** A repository field: `{owner, name}` on the wire, `owner/repo` on the command line too. */
|
|
436
|
-
function isOwnerRepo(field) {
|
|
437
|
-
if (field.kind !== 'json' || field.repeated)
|
|
438
|
-
return false;
|
|
439
|
-
return (field.name === 'repository' ||
|
|
440
|
-
(typeof field.shape === 'string' && /^\{owner: string, name: string[,}]/.test(field.shape)));
|
|
441
|
-
}
|
|
442
|
-
const OWNER_REPO = /^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)$/;
|
|
443
|
-
function ownerRepoParser(raw) {
|
|
444
|
-
const match = OWNER_REPO.exec(raw);
|
|
445
|
-
if (match)
|
|
446
|
-
return { owner: match[1], name: match[2] };
|
|
447
|
-
try {
|
|
448
|
-
return JSON.parse(raw);
|
|
449
|
-
}
|
|
450
|
-
catch {
|
|
451
|
-
throw new InvalidArgumentError('Expected owner/repo or JSON.');
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
439
|
/**
|
|
455
440
|
* One value per flag, collected into the array the wire takes. `choices` is
|
|
456
441
|
* set for the help text and then overridden, because its own parser keeps
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { InvalidArgumentError } from 'commander';
|
|
2
|
+
/** A repository field: `{owner, name}` on the wire, `owner/repo` on the command line too. */
|
|
3
|
+
export function isOwnerRepo(field) {
|
|
4
|
+
if (field.kind !== 'json' || field.repeated)
|
|
5
|
+
return false;
|
|
6
|
+
return (field.name === 'repository' ||
|
|
7
|
+
(typeof field.shape === 'string' && /^\{owner: string, name: string[,}]/.test(field.shape)));
|
|
8
|
+
}
|
|
9
|
+
const OWNER_REPO = /^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)$/;
|
|
10
|
+
export function ownerRepoParser(raw) {
|
|
11
|
+
const match = OWNER_REPO.exec(raw);
|
|
12
|
+
if (match)
|
|
13
|
+
return { owner: match[1], name: match[2] };
|
|
14
|
+
try {
|
|
15
|
+
return JSON.parse(raw);
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
throw new InvalidArgumentError('Expected owner/repo or JSON.');
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { spawnSync } from 'node:child_process';
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
import { extname } from 'node:path';
|
|
4
|
+
/**
|
|
5
|
+
* The step check `kosuke prototypes create` runs before it uploads: it runs the prototype's own
|
|
6
|
+
* content.js here, in the sandbox, and never on the platform. For each declared state, in each
|
|
7
|
+
* Variant it shows, it seeds the model as the page does, applies the state's `show` entry and asks
|
|
8
|
+
* `state()` which state is on screen; a state that cannot be shown, or shows another, is an issue.
|
|
9
|
+
* The context below mirrors the shell's `ctx` in src/lib/prototypes/template.html, with scheduled
|
|
10
|
+
* work held as the shell holds it while it shows a state. `view` is not run: there is no page.
|
|
11
|
+
*
|
|
12
|
+
* The script runs in a child Node process, never in the CLI's own: under the permission model
|
|
13
|
+
* (no file system, no child processes, no workers or addons), with an empty environment, so no
|
|
14
|
+
* credential, and killed at a deadline the CLI holds, so neither a loop nor a crash reaches it.
|
|
15
|
+
*/
|
|
16
|
+
/** Long enough for any honest seed and show, short enough that a loop cannot hang the CLI. */
|
|
17
|
+
const TIME_LIMIT_MS = 5000;
|
|
18
|
+
/** The child's whole life, its start included; past it the CLI kills it. */
|
|
19
|
+
const DEADLINE_MS = 15_000;
|
|
20
|
+
const record = (value) => value && typeof value === 'object' && !Array.isArray(value) ? value : {};
|
|
21
|
+
const strings = (value) => Array.isArray(value) ? value.filter((item) => typeof item === 'string') : [];
|
|
22
|
+
/** Every state and Variant to show, read leniently: what is malformed the platform refuses. */
|
|
23
|
+
function checksOf(config) {
|
|
24
|
+
const declared = Array.isArray(config.variants)
|
|
25
|
+
? config.variants.map((variant) => record(variant).id).filter((id) => typeof id === 'string')
|
|
26
|
+
: ['a'];
|
|
27
|
+
const flows = Array.isArray(config.flows) ? config.flows.map(record) : [];
|
|
28
|
+
const checks = [];
|
|
29
|
+
for (const state of Array.isArray(config.states) ? config.states.map(record) : []) {
|
|
30
|
+
const flow = flows.find((candidate) => candidate.id === state.flow);
|
|
31
|
+
if (!flow || typeof state.id !== 'string')
|
|
32
|
+
continue;
|
|
33
|
+
const conditions = strings(flow.conditions);
|
|
34
|
+
const condition = typeof state.condition === 'string' ? state.condition : conditions[0];
|
|
35
|
+
const flowVariants = flow.variants === undefined ? declared : strings(flow.variants);
|
|
36
|
+
const variants = typeof state.variant === 'string' ? [state.variant] : flowVariants;
|
|
37
|
+
for (const variant of variants)
|
|
38
|
+
checks.push({
|
|
39
|
+
id: state.id,
|
|
40
|
+
flow: String(flow.id),
|
|
41
|
+
flowLabel: typeof flow.label === 'string' ? flow.label : String(flow.id),
|
|
42
|
+
variant,
|
|
43
|
+
condition: condition ?? '',
|
|
44
|
+
step: condition === conditions[0],
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return checks;
|
|
48
|
+
}
|
|
49
|
+
// The page's globals the content may call, made inside the context.
|
|
50
|
+
const PRELUDE = `globalThis.__definitions = [];
|
|
51
|
+
globalThis.definePrototype = (definition) => { __definitions.push(definition); };
|
|
52
|
+
globalThis.console = { log() {}, info() {}, warn() {}, error() {}, debug() {} };
|
|
53
|
+
globalThis.window = globalThis;
|
|
54
|
+
globalThis.self = globalThis;`;
|
|
55
|
+
// Runs inside the context, so the time limit covers the content's own calls too.
|
|
56
|
+
const HARNESS = `(() => {
|
|
57
|
+
const checks = JSON.parse(__checks);
|
|
58
|
+
const definition = __definitions[0];
|
|
59
|
+
if (__definitions.length === 0) return JSON.stringify({ load: 'content.js never calls definePrototype' });
|
|
60
|
+
if (__definitions.length > 1) return JSON.stringify({ load: 'content.js calls definePrototype more than once' });
|
|
61
|
+
const escape = (value) => String(value).replace(/[&<>"']/g, (char) => ({'&': '&', '<': '<', '>': '>', '"': '"', "'": '''})[char]);
|
|
62
|
+
const RAW = Symbol('pt-raw');
|
|
63
|
+
const raw = (value) => value != null && value[RAW] !== undefined ? value : Object.defineProperty({[RAW]: String(value)}, 'toString', {value() { return this[RAW]; }});
|
|
64
|
+
const interpolate = (value) => value == null || value === false ? '' : Array.isArray(value) ? value.map(interpolate).join('') : value[RAW] !== undefined ? value[RAW] : escape(value);
|
|
65
|
+
const html = (strings, ...values) => raw(strings.reduce((out, part, index) => out + part + (index < values.length ? interpolate(values[index]) : ''), ''));
|
|
66
|
+
const message = (error) => error && error.message ? String(error.message) : String(error);
|
|
67
|
+
return JSON.stringify({ results: checks.map((check) => {
|
|
68
|
+
let overlay = null, pending = 0;
|
|
69
|
+
const ctx = {
|
|
70
|
+
html, raw, escape,
|
|
71
|
+
flow: check.flow, variant: check.variant, condition: check.condition,
|
|
72
|
+
get overlay() { return overlay; },
|
|
73
|
+
get pending() { return pending > 0; },
|
|
74
|
+
open(id) { overlay = String(id); },
|
|
75
|
+
close() { overlay = null; },
|
|
76
|
+
dismiss() { pending = 0; overlay = null; },
|
|
77
|
+
later() {},
|
|
78
|
+
wait() { pending++; },
|
|
79
|
+
cancelWork() { pending = 0; },
|
|
80
|
+
focus() {},
|
|
81
|
+
};
|
|
82
|
+
let model;
|
|
83
|
+
try { model = definition.seed(ctx); } catch (error) { return { error: 'seed threw: ' + message(error) }; }
|
|
84
|
+
const show = definition.show && definition.show[check.id];
|
|
85
|
+
if (typeof show === 'function') {
|
|
86
|
+
try { const next = show(model, ctx); if (next && typeof next === 'object') model = next; }
|
|
87
|
+
catch (error) { return { show: true, error: 'its show threw: ' + message(error) }; }
|
|
88
|
+
}
|
|
89
|
+
try { return { show: typeof show === 'function', reported: String(definition.state(model, ctx)) }; }
|
|
90
|
+
catch (error) { return { show: typeof show === 'function', error: 'state() threw: ' + message(error) }; }
|
|
91
|
+
}) });
|
|
92
|
+
})()`;
|
|
93
|
+
// The child: reads the checks and the script on stdin, answers JSON on stdout. Browser globals a
|
|
94
|
+
// page has come from the child's realm, which holds nothing worth reaching.
|
|
95
|
+
const CHILD = `'use strict';
|
|
96
|
+
const vm = require('node:vm');
|
|
97
|
+
const { checks, script } = JSON.parse(require('node:fs').readFileSync(0, 'utf8'));
|
|
98
|
+
const browser = ['URL', 'URLSearchParams', 'TextEncoder', 'TextDecoder', 'atob', 'btoa', 'structuredClone', 'crypto', 'performance', 'queueMicrotask', 'AbortController', 'Event', 'EventTarget'];
|
|
99
|
+
const context = vm.createContext(Object.fromEntries(browser.filter((name) => name in globalThis).map((name) => [name, globalThis[name]])));
|
|
100
|
+
context.__checks = JSON.stringify(checks);
|
|
101
|
+
let output;
|
|
102
|
+
try {
|
|
103
|
+
vm.runInContext(${JSON.stringify(PRELUDE)}, context, { timeout: ${TIME_LIMIT_MS}, filename: 'step-check' });
|
|
104
|
+
vm.runInContext(script, context, { timeout: ${TIME_LIMIT_MS}, filename: 'content.js' });
|
|
105
|
+
output = vm.runInContext(${JSON.stringify(HARNESS)}, context, { timeout: ${TIME_LIMIT_MS}, filename: 'step-check' });
|
|
106
|
+
} catch (error) {
|
|
107
|
+
let text;
|
|
108
|
+
try { text = String(error && error.message !== undefined ? error.message : error); } catch { text = 'it threw'; }
|
|
109
|
+
output = JSON.stringify({ load: 'content.js could not run for the step check: ' + text.slice(0, 300) });
|
|
110
|
+
}
|
|
111
|
+
process.stdout.write(String(output));`;
|
|
112
|
+
/**
|
|
113
|
+
* The issues of one prototype's script, empty when every state shows as declared.
|
|
114
|
+
* @internal
|
|
115
|
+
*/
|
|
116
|
+
export function prototypeStepIssues(configText, script) {
|
|
117
|
+
let config;
|
|
118
|
+
try {
|
|
119
|
+
config = record(JSON.parse(configText));
|
|
120
|
+
}
|
|
121
|
+
catch {
|
|
122
|
+
return [];
|
|
123
|
+
}
|
|
124
|
+
const checks = checksOf(config);
|
|
125
|
+
if (checks.length === 0)
|
|
126
|
+
return [];
|
|
127
|
+
const child = spawnSync(process.execPath, ['--permission', '--max-old-space-size=256', '-e', CHILD], {
|
|
128
|
+
input: JSON.stringify({ checks, script }),
|
|
129
|
+
env: {},
|
|
130
|
+
encoding: 'utf8',
|
|
131
|
+
timeout: DEADLINE_MS,
|
|
132
|
+
killSignal: 'SIGKILL',
|
|
133
|
+
maxBuffer: 8 * 1024 * 1024,
|
|
134
|
+
windowsHide: true,
|
|
135
|
+
});
|
|
136
|
+
let output = null;
|
|
137
|
+
try {
|
|
138
|
+
if (child.status === 0)
|
|
139
|
+
output = JSON.parse(child.stdout);
|
|
140
|
+
}
|
|
141
|
+
catch {
|
|
142
|
+
output = null;
|
|
143
|
+
}
|
|
144
|
+
if (!output) {
|
|
145
|
+
if (child.error && child.error.code === 'ETIMEDOUT')
|
|
146
|
+
return [`content.js did not finish the step check within ${DEADLINE_MS / 1000} s`];
|
|
147
|
+
const reason = child.stderr
|
|
148
|
+
?.trim()
|
|
149
|
+
.split('\n')
|
|
150
|
+
.find((line) => /Error|error/.test(line));
|
|
151
|
+
return [`content.js crashed the step check${reason ? `: ${reason.trim().slice(0, 300)}` : ''}`];
|
|
152
|
+
}
|
|
153
|
+
if (output.load)
|
|
154
|
+
return [output.load];
|
|
155
|
+
const issues = [];
|
|
156
|
+
(output.results ?? []).forEach((result, index) => {
|
|
157
|
+
const check = checks[index];
|
|
158
|
+
if (!check)
|
|
159
|
+
return;
|
|
160
|
+
const where = (check.step ? `step "${check.id}"` : `condition state "${check.id}" (${check.condition})`) +
|
|
161
|
+
` of flow "${check.flowLabel}"` +
|
|
162
|
+
(declaredVariants(config) > 1 ? `, Variant ${check.variant}` : '');
|
|
163
|
+
if (result.error)
|
|
164
|
+
issues.push(`${where}: ${result.error}`);
|
|
165
|
+
else if (result.reported !== check.id)
|
|
166
|
+
issues.push(result.show
|
|
167
|
+
? `${where}: after its show entry, state() reports "${result.reported}"`
|
|
168
|
+
: `${where}: it has no show entry, and from a fresh seed state() reports "${result.reported}"; add show["${check.id}"]`);
|
|
169
|
+
});
|
|
170
|
+
return issues;
|
|
171
|
+
}
|
|
172
|
+
const declaredVariants = (config) => Array.isArray(config.variants) ? config.variants.length : 1;
|
|
173
|
+
/**
|
|
174
|
+
* The check on the files a `prototypes create` call attaches, told apart by extension as the
|
|
175
|
+
* platform tells them; null when they are not one .json and one .js the CLI can read, which the
|
|
176
|
+
* platform then refuses on its own terms.
|
|
177
|
+
*/
|
|
178
|
+
function attachedPrototypeIssues(paths) {
|
|
179
|
+
const json = paths.filter((path) => extname(path).toLowerCase() === '.json');
|
|
180
|
+
const js = paths.filter((path) => extname(path).toLowerCase() === '.js');
|
|
181
|
+
const [config, script] = [json[0], js[0]];
|
|
182
|
+
if (json.length !== 1 || js.length !== 1 || !config || !script)
|
|
183
|
+
return null;
|
|
184
|
+
try {
|
|
185
|
+
return prototypeStepIssues(readFileSync(config, 'utf8'), readFileSync(script, 'utf8'));
|
|
186
|
+
}
|
|
187
|
+
catch {
|
|
188
|
+
return null;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* The refusal `prototypes create` answers before it uploads, in the shape of the platform's own,
|
|
193
|
+
* so a caller reads either the same way; null when the step check finds nothing.
|
|
194
|
+
*/
|
|
195
|
+
function prototypeRefusal(input) {
|
|
196
|
+
const issues = attachedPrototypeIssues(input.attachments);
|
|
197
|
+
if (!issues?.length)
|
|
198
|
+
return null;
|
|
199
|
+
return {
|
|
200
|
+
ok: false,
|
|
201
|
+
status: 422,
|
|
202
|
+
body: {
|
|
203
|
+
error: 'The prototype failed its step check',
|
|
204
|
+
code: 'PROTOTYPE_INVALID',
|
|
205
|
+
details: { issues },
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* The checks a command runs on its own machine before it sends anything: true when one refused
|
|
211
|
+
* and printed its refusal. Only `prototypes create` has one, the step check.
|
|
212
|
+
*/
|
|
213
|
+
export function refusedBeforeSending(runtime, operation, input) {
|
|
214
|
+
if (operation.command.join(' ') !== 'prototypes create')
|
|
215
|
+
return false;
|
|
216
|
+
const refusal = prototypeRefusal(input);
|
|
217
|
+
if (refusal)
|
|
218
|
+
runtime.output(refusal);
|
|
219
|
+
return refusal !== null;
|
|
220
|
+
}
|
package/openapi.json
CHANGED
|
@@ -77,9 +77,9 @@
|
|
|
77
77
|
"name": "kind",
|
|
78
78
|
"in": "query",
|
|
79
79
|
"required": false,
|
|
80
|
-
"description": "Comma-separated kinds (job_awaiting_response, pr_checks_failed, pr_checks_passed, main_checks_failed, main_checks_passed, pr_merged, branch_behind, cron_run_succeeded, cron_run_failed, deployed, recovery_deploy_started, workspace_device_disconnected, session_started, session_message_sent, session_archived, session_deleted, session_assigned, session_status_changed, session_priority_changed, cron_created, cron_updated, cron_deleted, member_invited, member_removed, member_role_changed, integration_custom_tool_saved, integration_custom_tool_enabled, integration_custom_tool_disabled, integration_custom_tool_deleted, integration_custom_tool_restored), or 'change' for every Change and 'action' for every Member Action.",
|
|
80
|
+
"description": "Comma-separated kinds (job_awaiting_response, pr_checks_failed, pr_checks_passed, main_checks_failed, main_checks_passed, pr_merged, branch_behind, cron_run_succeeded, cron_run_failed, deployed, recovery_deploy_started, workspace_device_disconnected, session_started, session_message_sent, session_archived, session_deleted, session_assigned, session_status_changed, session_priority_changed, session_moved, cron_created, cron_updated, cron_deleted, member_invited, member_removed, member_role_changed, integration_custom_tool_saved, integration_custom_tool_enabled, integration_custom_tool_disabled, integration_custom_tool_deleted, integration_custom_tool_restored), or 'change' for every Change and 'action' for every Member Action.",
|
|
81
81
|
"schema": {
|
|
82
|
-
"description": "Comma-separated kinds (job_awaiting_response, pr_checks_failed, pr_checks_passed, main_checks_failed, main_checks_passed, pr_merged, branch_behind, cron_run_succeeded, cron_run_failed, deployed, recovery_deploy_started, workspace_device_disconnected, session_started, session_message_sent, session_archived, session_deleted, session_assigned, session_status_changed, session_priority_changed, cron_created, cron_updated, cron_deleted, member_invited, member_removed, member_role_changed, integration_custom_tool_saved, integration_custom_tool_enabled, integration_custom_tool_disabled, integration_custom_tool_deleted, integration_custom_tool_restored), or 'change' for every Change and 'action' for every Member Action.",
|
|
82
|
+
"description": "Comma-separated kinds (job_awaiting_response, pr_checks_failed, pr_checks_passed, main_checks_failed, main_checks_passed, pr_merged, branch_behind, cron_run_succeeded, cron_run_failed, deployed, recovery_deploy_started, workspace_device_disconnected, session_started, session_message_sent, session_archived, session_deleted, session_assigned, session_status_changed, session_priority_changed, session_moved, cron_created, cron_updated, cron_deleted, member_invited, member_removed, member_role_changed, integration_custom_tool_saved, integration_custom_tool_enabled, integration_custom_tool_disabled, integration_custom_tool_deleted, integration_custom_tool_restored), or 'change' for every Change and 'action' for every Member Action.",
|
|
83
83
|
"type": "string"
|
|
84
84
|
}
|
|
85
85
|
},
|
|
@@ -8648,6 +8648,17 @@
|
|
|
8648
8648
|
"format": "uuid",
|
|
8649
8649
|
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
8650
8650
|
},
|
|
8651
|
+
"labels": {
|
|
8652
|
+
"description": "JSON array of up to 20 Session Labels the task's session starts with, stored lowercase. A new name joins the project's labels. Requires hintProjectId.",
|
|
8653
|
+
"maxItems": 20,
|
|
8654
|
+
"type": "array",
|
|
8655
|
+
"items": {
|
|
8656
|
+
"type": "string",
|
|
8657
|
+
"minLength": 1,
|
|
8658
|
+
"maxLength": 50,
|
|
8659
|
+
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
|
|
8660
|
+
}
|
|
8661
|
+
},
|
|
8651
8662
|
"status": {
|
|
8652
8663
|
"type": "string",
|
|
8653
8664
|
"enum": ["todo", "in_progress", "done"]
|
|
@@ -8756,6 +8767,17 @@
|
|
|
8756
8767
|
"format": "uuid",
|
|
8757
8768
|
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
8758
8769
|
},
|
|
8770
|
+
"labels": {
|
|
8771
|
+
"description": "JSON array of up to 20 Session Labels the task's session starts with, stored lowercase. A new name joins the project's labels. Requires hintProjectId.",
|
|
8772
|
+
"maxItems": 20,
|
|
8773
|
+
"type": "array",
|
|
8774
|
+
"items": {
|
|
8775
|
+
"type": "string",
|
|
8776
|
+
"minLength": 1,
|
|
8777
|
+
"maxLength": 50,
|
|
8778
|
+
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
|
|
8779
|
+
}
|
|
8780
|
+
},
|
|
8759
8781
|
"status": {
|
|
8760
8782
|
"type": "string",
|
|
8761
8783
|
"enum": ["todo", "in_progress", "done"]
|
|
@@ -8844,6 +8866,17 @@
|
|
|
8844
8866
|
"format": "uuid",
|
|
8845
8867
|
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
8846
8868
|
},
|
|
8869
|
+
"labels": {
|
|
8870
|
+
"description": "JSON array of up to 20 Session Labels the task's session starts with, stored lowercase. A new name joins the project's labels. Requires hintProjectId.",
|
|
8871
|
+
"maxItems": 20,
|
|
8872
|
+
"type": "array",
|
|
8873
|
+
"items": {
|
|
8874
|
+
"type": "string",
|
|
8875
|
+
"minLength": 1,
|
|
8876
|
+
"maxLength": 50,
|
|
8877
|
+
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
|
|
8878
|
+
}
|
|
8879
|
+
},
|
|
8847
8880
|
"status": {
|
|
8848
8881
|
"type": "string",
|
|
8849
8882
|
"enum": ["todo", "in_progress", "done"]
|
|
@@ -9427,6 +9460,93 @@
|
|
|
9427
9460
|
}
|
|
9428
9461
|
}
|
|
9429
9462
|
},
|
|
9463
|
+
"/api/organizations/{workspaceId}/tasks/{taskId}/transfer": {
|
|
9464
|
+
"post": {
|
|
9465
|
+
"operationId": "tasksProjectSet",
|
|
9466
|
+
"summary": "Move a Todo task and its Backlog session to another deployed repository of the same workspace, in place: same IDs, Assignee, description, messages, attachments and labels; nothing starts. Members and Sensei only, with access to both repositories. Only when the member asks. The same repository again succeeds with the task; a started task, or one with a branch, sandbox or pull request, answers 409 TASK_CONFLICT; a repository not deployed answers 409 TASK_INVALID_PROJECT, one out of reach 404.",
|
|
9467
|
+
"tags": ["tasks"],
|
|
9468
|
+
"x-kosuke-command": ["tasks", "project", "set"],
|
|
9469
|
+
"x-kosuke-sandbox-token": true,
|
|
9470
|
+
"x-kosuke-cron-token": true,
|
|
9471
|
+
"x-kosuke-sensei-token": true,
|
|
9472
|
+
"parameters": [
|
|
9473
|
+
{
|
|
9474
|
+
"name": "workspaceId",
|
|
9475
|
+
"in": "path",
|
|
9476
|
+
"required": true,
|
|
9477
|
+
"schema": {
|
|
9478
|
+
"type": "string",
|
|
9479
|
+
"minLength": 1
|
|
9480
|
+
}
|
|
9481
|
+
},
|
|
9482
|
+
{
|
|
9483
|
+
"name": "taskId",
|
|
9484
|
+
"in": "path",
|
|
9485
|
+
"required": true,
|
|
9486
|
+
"schema": {
|
|
9487
|
+
"type": "string",
|
|
9488
|
+
"format": "uuid",
|
|
9489
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
9490
|
+
}
|
|
9491
|
+
}
|
|
9492
|
+
],
|
|
9493
|
+
"requestBody": {
|
|
9494
|
+
"required": true,
|
|
9495
|
+
"content": {
|
|
9496
|
+
"application/json": {
|
|
9497
|
+
"schema": {
|
|
9498
|
+
"type": "object",
|
|
9499
|
+
"properties": {
|
|
9500
|
+
"projectId": {
|
|
9501
|
+
"type": "string",
|
|
9502
|
+
"format": "uuid",
|
|
9503
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
9504
|
+
"description": "The deployed repository of the same workspace the Todo task and its Backlog session move to, in place. Nothing starts."
|
|
9505
|
+
},
|
|
9506
|
+
"ifRevision": {
|
|
9507
|
+
"description": "The task updatedAt `tasks get` printed (not descriptionRevision); a task changed or moved since answers 409 TASK_CONFLICT. A retry to the repository it already moved to succeeds.",
|
|
9508
|
+
"type": "string"
|
|
9509
|
+
}
|
|
9510
|
+
},
|
|
9511
|
+
"required": ["projectId"]
|
|
9512
|
+
}
|
|
9513
|
+
}
|
|
9514
|
+
}
|
|
9515
|
+
},
|
|
9516
|
+
"responses": {
|
|
9517
|
+
"2XX": {
|
|
9518
|
+
"description": "Success envelope",
|
|
9519
|
+
"content": {
|
|
9520
|
+
"application/json": {
|
|
9521
|
+
"schema": {
|
|
9522
|
+
"$ref": "#/components/schemas/ApiSuccess"
|
|
9523
|
+
}
|
|
9524
|
+
}
|
|
9525
|
+
}
|
|
9526
|
+
},
|
|
9527
|
+
"4XX": {
|
|
9528
|
+
"description": "Error envelope",
|
|
9529
|
+
"content": {
|
|
9530
|
+
"application/json": {
|
|
9531
|
+
"schema": {
|
|
9532
|
+
"$ref": "#/components/schemas/ApiError"
|
|
9533
|
+
}
|
|
9534
|
+
}
|
|
9535
|
+
}
|
|
9536
|
+
},
|
|
9537
|
+
"5XX": {
|
|
9538
|
+
"description": "Error envelope",
|
|
9539
|
+
"content": {
|
|
9540
|
+
"application/json": {
|
|
9541
|
+
"schema": {
|
|
9542
|
+
"$ref": "#/components/schemas/ApiError"
|
|
9543
|
+
}
|
|
9544
|
+
}
|
|
9545
|
+
}
|
|
9546
|
+
}
|
|
9547
|
+
}
|
|
9548
|
+
}
|
|
9549
|
+
},
|
|
9430
9550
|
"/api/organizations/{workspaceId}/timezone": {
|
|
9431
9551
|
"put": {
|
|
9432
9552
|
"operationId": "workspacesTimezoneSet",
|
|
@@ -22896,6 +23016,69 @@
|
|
|
22896
23016
|
}
|
|
22897
23017
|
}
|
|
22898
23018
|
},
|
|
23019
|
+
"/api/sensei/cards/recover-reply": {
|
|
23020
|
+
"post": {
|
|
23021
|
+
"operationId": "senseiCardsReplyRecoveryRun",
|
|
23022
|
+
"summary": "Read back the reply an ended approval Turn left unknown, under its original approval and key: record a found send, and send only when the read back proves nothing went",
|
|
23023
|
+
"tags": ["sensei"],
|
|
23024
|
+
"x-kosuke-command": ["sensei", "cards", "reply-recovery", "run"],
|
|
23025
|
+
"x-kosuke-sandbox-token": true,
|
|
23026
|
+
"x-kosuke-cron-token": true,
|
|
23027
|
+
"x-kosuke-sensei-token": true,
|
|
23028
|
+
"requestBody": {
|
|
23029
|
+
"required": true,
|
|
23030
|
+
"content": {
|
|
23031
|
+
"application/json": {
|
|
23032
|
+
"schema": {
|
|
23033
|
+
"type": "object",
|
|
23034
|
+
"properties": {
|
|
23035
|
+
"card": {
|
|
23036
|
+
"type": "string",
|
|
23037
|
+
"format": "uuid",
|
|
23038
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
23039
|
+
"description": "The approved card whose reply has an unknown outcome"
|
|
23040
|
+
}
|
|
23041
|
+
},
|
|
23042
|
+
"required": ["card"],
|
|
23043
|
+
"additionalProperties": false
|
|
23044
|
+
}
|
|
23045
|
+
}
|
|
23046
|
+
}
|
|
23047
|
+
},
|
|
23048
|
+
"responses": {
|
|
23049
|
+
"2XX": {
|
|
23050
|
+
"description": "Success envelope",
|
|
23051
|
+
"content": {
|
|
23052
|
+
"application/json": {
|
|
23053
|
+
"schema": {
|
|
23054
|
+
"$ref": "#/components/schemas/ApiSuccess"
|
|
23055
|
+
}
|
|
23056
|
+
}
|
|
23057
|
+
}
|
|
23058
|
+
},
|
|
23059
|
+
"4XX": {
|
|
23060
|
+
"description": "Error envelope",
|
|
23061
|
+
"content": {
|
|
23062
|
+
"application/json": {
|
|
23063
|
+
"schema": {
|
|
23064
|
+
"$ref": "#/components/schemas/ApiError"
|
|
23065
|
+
}
|
|
23066
|
+
}
|
|
23067
|
+
}
|
|
23068
|
+
},
|
|
23069
|
+
"5XX": {
|
|
23070
|
+
"description": "Error envelope",
|
|
23071
|
+
"content": {
|
|
23072
|
+
"application/json": {
|
|
23073
|
+
"schema": {
|
|
23074
|
+
"$ref": "#/components/schemas/ApiError"
|
|
23075
|
+
}
|
|
23076
|
+
}
|
|
23077
|
+
}
|
|
23078
|
+
}
|
|
23079
|
+
}
|
|
23080
|
+
}
|
|
23081
|
+
},
|
|
22899
23082
|
"/api/sensei/cards/send-reply": {
|
|
22900
23083
|
"post": {
|
|
22901
23084
|
"operationId": "senseiCardsReply",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kosuke-ai/kosuke",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.78",
|
|
4
4
|
"description": "Sensei platform CLI. The client customers install to drive app.kosuke.ai from their own machine.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -43,10 +43,12 @@
|
|
|
43
43
|
"minimatch": "^11.0.1"
|
|
44
44
|
},
|
|
45
45
|
"kosukeRelease": {
|
|
46
|
-
"sourceCommit": "
|
|
47
|
-
"sourceIdentity": "
|
|
46
|
+
"sourceCommit": "10d7d2d89598d7793a9f5617ff0881635824f9f5",
|
|
47
|
+
"sourceIdentity": "867df149e97e1eaae7664b7592b36b82ec1a9d007129e0ad5e1929c489b7e7e0",
|
|
48
48
|
"fragments": [
|
|
49
|
-
"
|
|
49
|
+
"prototype-step-check-pb7noo.json",
|
|
50
|
+
"task-create-labels-yu73lp.json",
|
|
51
|
+
"sensei-recover-reply-76uipp.json"
|
|
50
52
|
]
|
|
51
53
|
}
|
|
52
54
|
}
|