@kosuke-ai/kosuke 1.0.91 → 1.0.93

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/generated/commands/crons/delete--personal.js +1 -1
  3. package/dist/generated/commands/crons/delete.js +1 -1
  4. package/dist/generated/commands/crons/{artifacts-list--personal.js → files-list--personal.js} +5 -5
  5. package/dist/generated/commands/crons/{artifacts-list.js → files-list.js} +5 -5
  6. package/dist/generated/commands/crons/runs-cancel.js +1 -1
  7. package/dist/generated/commands/crons/{runs-artifacts-get--personal.js → runs-files-get--personal.js} +4 -4
  8. package/dist/generated/commands/crons/{runs-artifacts-get.js → runs-files-get.js} +4 -4
  9. package/dist/generated/commands/crons/{runs-artifacts-list--personal.js → runs-files-list--personal.js} +3 -3
  10. package/dist/generated/commands/crons/{runs-artifacts-list.js → runs-files-list.js} +3 -3
  11. package/dist/generated/commands/crons/runs-get--personal.js +1 -1
  12. package/dist/generated/commands/deploys/queue-resume.js +2 -3
  13. package/dist/generated/commands/deploys/queue-send.js +2 -3
  14. package/dist/generated/commands/deploys/queue-steer.js +2 -3
  15. package/dist/generated/commands/deploys/queue-update.js +2 -3
  16. package/dist/generated/commands/deploys/start.js +2 -3
  17. package/dist/generated/commands/files/delete--personal.js +1 -1
  18. package/dist/generated/commands/files/delete.js +1 -1
  19. package/dist/generated/commands/files/move--personal.js +1 -1
  20. package/dist/generated/commands/files/move.js +1 -1
  21. package/dist/generated/commands/index.js +209 -209
  22. package/dist/generated/commands/preview/{shared-artifacts-get.js → shared-files-get.js} +4 -5
  23. package/dist/generated/commands/projects/env-vars-create.js +2 -3
  24. package/dist/generated/commands/projects/env-vars-delete.js +2 -3
  25. package/dist/generated/commands/projects/services-create.js +2 -3
  26. package/dist/generated/commands/projects/services-delete.js +2 -3
  27. package/dist/generated/commands/projects/services-update.js +2 -3
  28. package/dist/generated/commands/projects/settings-changes-list.js +20 -0
  29. package/dist/generated/commands/projects/settings-get.js +1 -1
  30. package/dist/generated/commands/projects/settings-set.js +2 -3
  31. package/dist/generated/commands/projects/settings-update.js +2 -3
  32. package/dist/generated/commands/prototypes/create.js +2 -2
  33. package/dist/generated/commands/sessions/{artifacts-create.js → files-attach.js} +5 -5
  34. package/dist/generated/commands/sessions/files-get.js +5 -12
  35. package/dist/generated/commands/sessions/files-list.js +2 -2
  36. package/dist/generated/commands/sessions/sandbox-files-get.js +28 -0
  37. package/dist/generated/commands/sessions/{artifacts-list.js → sandbox-files-list.js} +3 -3
  38. package/dist/generated/commands/sessions/{files-set.js → sandbox-files-set.js} +1 -1
  39. package/openapi.json +1084 -230
  40. package/package.json +4 -4
  41. package/dist/generated/commands/sessions/artifacts-get.js +0 -21
  42. package/dist/generated/commands/workspaces/artifacts-search.js +0 -27
package/openapi.json CHANGED
@@ -4932,7 +4932,8 @@
4932
4932
  "/api/organizations/{workspaceId}/artifacts/search": {
4933
4933
  "get": {
4934
4934
  "operationId": "workspacesArtifactsSearch",
4935
- "summary": "Search the Artifacts of a workspace by title, across its Chat Sessions and its Cron Runs. Rows only, each naming the session or run it was written in; read one with `sessions artifacts get` or `crons runs artifacts get`.",
4935
+ "summary": "Spotlight and the command palette now find these through Files search. Search the files agents wrote in a workspace by title, across its Chat Sessions and its Cron Runs.",
4936
+ "deprecated": true,
4936
4937
  "tags": ["workspaces"],
4937
4938
  "x-kosuke-command": ["workspaces", "artifacts", "search"],
4938
4939
  "x-kosuke-sandbox-token": true,
@@ -5462,7 +5463,7 @@
5462
5463
  },
5463
5464
  "delete": {
5464
5465
  "operationId": "cronsDelete",
5465
- "summary": "Delete a cron with its runs, their transcripts and their Artifacts. The sessions its runs filed stay. The creator or a workspace admin only.",
5466
+ "summary": "Delete a cron with its runs and their transcripts. Their files and the sessions its runs filed stay. The creator or a workspace admin only.",
5466
5467
  "tags": ["crons"],
5467
5468
  "x-kosuke-command": ["crons", "delete"],
5468
5469
  "x-kosuke-sandbox-token": true,
@@ -5526,7 +5527,8 @@
5526
5527
  "/api/organizations/{workspaceId}/crons/{cronId}/artifacts": {
5527
5528
  "get": {
5528
5529
  "operationId": "cronsArtifactsList",
5529
- "summary": "List the Artifacts a cron's runs published, across all of its runs, most recently changed first: each one's title, kind and version, with the run and the project it came from, and the total the filters keep. One row per Artifact: the same slug published by two runs is two rows. Rows only: a body or a file url comes from crons runs artifacts get, with the row's runId. The project and kind filters each take several values and keep an Artifact matching any of them.",
5530
+ "summary": "Use `crons files list`. List the files of the four kinds a cron's runs wrote, across all of its runs.",
5531
+ "deprecated": true,
5530
5532
  "tags": ["crons"],
5531
5533
  "x-kosuke-command": ["crons", "artifacts", "list"],
5532
5534
  "x-kosuke-sandbox-token": true,
@@ -5556,9 +5558,128 @@
5556
5558
  "name": "projectId",
5557
5559
  "in": "query",
5558
5560
  "required": false,
5559
- "description": "Only the Artifacts of runs in these projects.",
5561
+ "description": "Only the files of runs in these projects.",
5562
+ "schema": {
5563
+ "description": "Only the files of runs in these projects.",
5564
+ "x-kosuke-flag": "project",
5565
+ "type": "array",
5566
+ "items": {
5567
+ "type": "string",
5568
+ "format": "uuid",
5569
+ "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)$"
5570
+ }
5571
+ }
5572
+ },
5573
+ {
5574
+ "name": "kind",
5575
+ "in": "query",
5576
+ "required": false,
5577
+ "description": "Only the files of these kinds.",
5578
+ "schema": {
5579
+ "description": "Only the files of these kinds.",
5580
+ "x-kosuke-flag": "kind",
5581
+ "type": "array",
5582
+ "items": {
5583
+ "type": "string",
5584
+ "enum": ["markdown", "html", "image", "video"]
5585
+ }
5586
+ }
5587
+ },
5588
+ {
5589
+ "name": "page",
5590
+ "in": "query",
5591
+ "required": false,
5592
+ "description": "1-based. Default 1.",
5593
+ "schema": {
5594
+ "description": "1-based. Default 1.",
5595
+ "type": "integer",
5596
+ "minimum": 1,
5597
+ "maximum": 9007199254740991
5598
+ }
5599
+ },
5600
+ {
5601
+ "name": "pageSize",
5602
+ "in": "query",
5603
+ "required": false,
5604
+ "description": "Default 25. Values above 100 are clamped, not rejected.",
5605
+ "schema": {
5606
+ "description": "Default 25. Values above 100 are clamped, not rejected.",
5607
+ "type": "integer",
5608
+ "minimum": 1,
5609
+ "maximum": 9007199254740991
5610
+ }
5611
+ }
5612
+ ],
5613
+ "responses": {
5614
+ "2XX": {
5615
+ "description": "Success envelope",
5616
+ "content": {
5617
+ "application/json": {
5618
+ "schema": {
5619
+ "$ref": "#/components/schemas/ApiSuccess"
5620
+ }
5621
+ }
5622
+ }
5623
+ },
5624
+ "4XX": {
5625
+ "description": "Error envelope",
5626
+ "content": {
5627
+ "application/json": {
5628
+ "schema": {
5629
+ "$ref": "#/components/schemas/ApiError"
5630
+ }
5631
+ }
5632
+ }
5633
+ },
5634
+ "5XX": {
5635
+ "description": "Error envelope",
5636
+ "content": {
5637
+ "application/json": {
5638
+ "schema": {
5639
+ "$ref": "#/components/schemas/ApiError"
5640
+ }
5641
+ }
5642
+ }
5643
+ }
5644
+ }
5645
+ }
5646
+ },
5647
+ "/api/organizations/{workspaceId}/crons/{cronId}/files": {
5648
+ "get": {
5649
+ "operationId": "cronsFilesList",
5650
+ "summary": "List the files a cron's runs wrote, across all of its runs, most recently changed first: each one's title, kind and version, with the run and the project it came from, and the total the filters keep. One row per file: the same name written by two runs is two rows. Rows only: a body or a file url comes from crons runs files get, with the row's runId. The project and kind filters each take several values and keep a file matching any of them.",
5651
+ "tags": ["crons"],
5652
+ "x-kosuke-command": ["crons", "files", "list"],
5653
+ "x-kosuke-sandbox-token": true,
5654
+ "x-kosuke-cron-token": true,
5655
+ "x-kosuke-sensei-token": true,
5656
+ "parameters": [
5657
+ {
5658
+ "name": "workspaceId",
5659
+ "in": "path",
5660
+ "required": true,
5661
+ "schema": {
5662
+ "type": "string",
5663
+ "minLength": 1
5664
+ }
5665
+ },
5666
+ {
5667
+ "name": "cronId",
5668
+ "in": "path",
5669
+ "required": true,
5670
+ "schema": {
5671
+ "type": "string",
5672
+ "format": "uuid",
5673
+ "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)$"
5674
+ }
5675
+ },
5676
+ {
5677
+ "name": "projectId",
5678
+ "in": "query",
5679
+ "required": false,
5680
+ "description": "Only the files of runs in these projects.",
5560
5681
  "schema": {
5561
- "description": "Only the Artifacts of runs in these projects.",
5682
+ "description": "Only the files of runs in these projects.",
5562
5683
  "x-kosuke-flag": "project",
5563
5684
  "type": "array",
5564
5685
  "items": {
@@ -5572,9 +5693,9 @@
5572
5693
  "name": "kind",
5573
5694
  "in": "query",
5574
5695
  "required": false,
5575
- "description": "Only the Artifacts of these kinds.",
5696
+ "description": "Only the files of these kinds.",
5576
5697
  "schema": {
5577
- "description": "Only the Artifacts of these kinds.",
5698
+ "description": "Only the files of these kinds.",
5578
5699
  "x-kosuke-flag": "kind",
5579
5700
  "type": "array",
5580
5701
  "items": {
@@ -5929,7 +6050,8 @@
5929
6050
  "/api/organizations/{workspaceId}/crons/{cronId}/runs/{runId}/artifacts": {
5930
6051
  "get": {
5931
6052
  "operationId": "cronsRunsArtifactsList",
5932
- "summary": "List the Artifacts a run of a cron published, most recently changed first. Rows only: a body or a file url comes from reading one.",
6053
+ "summary": "Use `crons runs files list`. List a run's files of the four kinds an agent writes.",
6054
+ "deprecated": true,
5933
6055
  "tags": ["crons"],
5934
6056
  "x-kosuke-command": ["crons", "runs", "artifacts", "list"],
5935
6057
  "x-kosuke-sandbox-token": true,
@@ -6003,7 +6125,8 @@
6003
6125
  "/api/organizations/{workspaceId}/crons/{cronId}/runs/{runId}/artifacts/{artifactId}": {
6004
6126
  "get": {
6005
6127
  "operationId": "cronsRunsArtifactsGet",
6006
- "summary": "Read one Artifact of a run of a cron, by its id or its slug: a markdown or html one carries its body, an image or a video a presigned url, its media type and its size.",
6128
+ "summary": "Use `crons runs files get`. Read one file of a run by its id or its name: a deleted one, or one of another kind, is not found.",
6129
+ "deprecated": true,
6007
6130
  "tags": ["crons"],
6008
6131
  "x-kosuke-command": ["crons", "runs", "artifacts", "get"],
6009
6132
  "x-kosuke-sandbox-token": true,
@@ -6043,11 +6166,11 @@
6043
6166
  "name": "artifactId",
6044
6167
  "in": "path",
6045
6168
  "required": true,
6046
- "description": "The artifact id, or its slug.",
6169
+ "description": "The id, or the name its agent writes it under.",
6047
6170
  "schema": {
6048
6171
  "type": "string",
6049
6172
  "minLength": 1,
6050
- "description": "The artifact id, or its slug."
6173
+ "description": "The id, or the name its agent writes it under."
6051
6174
  }
6052
6175
  }
6053
6176
  ],
@@ -6088,7 +6211,7 @@
6088
6211
  "/api/organizations/{workspaceId}/crons/{cronId}/runs/{runId}/cancel": {
6089
6212
  "post": {
6090
6213
  "operationId": "cronsRunsCancel",
6091
- "summary": "Stop a run of a cron that is still going, the way Stop on its page does. The run ends cancelled; the Artifacts it stored and the sessions it filed stay, and its sandbox is removed. The creator or a workspace admin only.",
6214
+ "summary": "Stop a run of a cron that is still going, the way Stop on its page does. The run ends cancelled; the files it stored and the sessions it filed stay, and its sandbox is removed. The creator or a workspace admin only.",
6092
6215
  "tags": ["crons"],
6093
6216
  "x-kosuke-command": ["crons", "runs", "cancel"],
6094
6217
  "x-kosuke-sandbox-token": true,
@@ -6159,12 +6282,12 @@
6159
6282
  }
6160
6283
  }
6161
6284
  },
6162
- "/api/organizations/{workspaceId}/crons/{cronId}/runs/{runId}/messages": {
6285
+ "/api/organizations/{workspaceId}/crons/{cronId}/runs/{runId}/files": {
6163
6286
  "get": {
6164
- "operationId": "cronsRunsMessagesList",
6165
- "summary": "Read the Cron Agent's transcript of one run of a cron: the prompt it was given, then everything it did, with the run's status.",
6287
+ "operationId": "cronsRunsFilesList",
6288
+ "summary": "List the files a run of a cron wrote, most recently changed first, a deleted one as a row that says who deleted it. Rows only: a body or a file url comes from reading one.",
6166
6289
  "tags": ["crons"],
6167
- "x-kosuke-command": ["crons", "runs", "messages", "list"],
6290
+ "x-kosuke-command": ["crons", "runs", "files", "list"],
6168
6291
  "x-kosuke-sandbox-token": true,
6169
6292
  "x-kosuke-cron-token": true,
6170
6293
  "x-kosuke-sensei-token": true,
@@ -6233,12 +6356,12 @@
6233
6356
  }
6234
6357
  }
6235
6358
  },
6236
- "/api/organizations/{workspaceId}/files": {
6359
+ "/api/organizations/{workspaceId}/crons/{cronId}/runs/{runId}/files/{fileId}": {
6237
6360
  "get": {
6238
- "operationId": "filesList",
6239
- "summary": "List a workspace folder by id or path, with its breadcrumb and items, folders first. Omit folder for the root.",
6240
- "tags": ["files"],
6241
- "x-kosuke-command": ["files", "list"],
6361
+ "operationId": "cronsRunsFilesGet",
6362
+ "summary": "Read one file of a run of a cron, by its id or its name: a Markdown or HTML file carries its body, any other a presigned url, its media type and its size. A deleted one says who deleted it and holds no content.",
6363
+ "tags": ["crons"],
6364
+ "x-kosuke-command": ["crons", "runs", "files", "get"],
6242
6365
  "x-kosuke-sandbox-token": true,
6243
6366
  "x-kosuke-cron-token": true,
6244
6367
  "x-kosuke-sensei-token": true,
@@ -6253,11 +6376,34 @@
6253
6376
  }
6254
6377
  },
6255
6378
  {
6256
- "name": "folder",
6257
- "in": "query",
6258
- "required": false,
6379
+ "name": "cronId",
6380
+ "in": "path",
6381
+ "required": true,
6259
6382
  "schema": {
6260
- "type": "string"
6383
+ "type": "string",
6384
+ "format": "uuid",
6385
+ "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)$"
6386
+ }
6387
+ },
6388
+ {
6389
+ "name": "runId",
6390
+ "in": "path",
6391
+ "required": true,
6392
+ "schema": {
6393
+ "type": "string",
6394
+ "format": "uuid",
6395
+ "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)$"
6396
+ }
6397
+ },
6398
+ {
6399
+ "name": "fileId",
6400
+ "in": "path",
6401
+ "required": true,
6402
+ "description": "The file's id, the name its agent writes it under, or that name with its extension, such as `review` or `review.md`.",
6403
+ "schema": {
6404
+ "type": "string",
6405
+ "minLength": 1,
6406
+ "description": "The file's id, the name its agent writes it under, or that name with its extension, such as `review` or `review.md`."
6261
6407
  }
6262
6408
  }
6263
6409
  ],
@@ -6293,15 +6439,14 @@
6293
6439
  }
6294
6440
  }
6295
6441
  }
6296
- },
6297
- "post": {
6298
- "operationId": "filesSet",
6299
- "summary": "Put a file by path, creating parent folders and replacing an existing file. Send text or exactly one attachment, at most 25 MiB. ifVersion refuses a stale replace. Alternatively provide name and parentId (null for the root).",
6300
- "tags": ["files"],
6301
- "x-kosuke-command": ["files", "set"],
6302
- "x-kosuke-attachments": true,
6303
- "x-kosuke-attachment-max-files": 20,
6304
- "x-kosuke-attachment-max-bytes": 26214400,
6442
+ }
6443
+ },
6444
+ "/api/organizations/{workspaceId}/crons/{cronId}/runs/{runId}/messages": {
6445
+ "get": {
6446
+ "operationId": "cronsRunsMessagesList",
6447
+ "summary": "Read the Cron Agent's transcript of one run of a cron: the prompt it was given, then everything it did, with the run's status.",
6448
+ "tags": ["crons"],
6449
+ "x-kosuke-command": ["crons", "runs", "messages", "list"],
6305
6450
  "x-kosuke-sandbox-token": true,
6306
6451
  "x-kosuke-cron-token": true,
6307
6452
  "x-kosuke-sensei-token": true,
@@ -6314,68 +6459,205 @@
6314
6459
  "type": "string",
6315
6460
  "minLength": 1
6316
6461
  }
6462
+ },
6463
+ {
6464
+ "name": "cronId",
6465
+ "in": "path",
6466
+ "required": true,
6467
+ "schema": {
6468
+ "type": "string",
6469
+ "format": "uuid",
6470
+ "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)$"
6471
+ }
6472
+ },
6473
+ {
6474
+ "name": "runId",
6475
+ "in": "path",
6476
+ "required": true,
6477
+ "schema": {
6478
+ "type": "string",
6479
+ "format": "uuid",
6480
+ "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)$"
6481
+ }
6317
6482
  }
6318
6483
  ],
6319
- "requestBody": {
6320
- "required": true,
6321
- "content": {
6322
- "application/json": {
6323
- "schema": {
6324
- "type": "object",
6325
- "properties": {
6326
- "path": {
6327
- "type": "string",
6328
- "minLength": 1
6329
- },
6330
- "parentId": {
6331
- "anyOf": [
6332
- {
6333
- "type": "string",
6334
- "format": "uuid",
6335
- "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)$"
6336
- },
6337
- {
6338
- "type": "null"
6339
- }
6340
- ]
6341
- },
6342
- "name": {
6343
- "type": "string",
6344
- "minLength": 1,
6345
- "maxLength": 255
6346
- },
6347
- "text": {
6348
- "type": "string",
6349
- "minLength": 1
6350
- },
6351
- "mediaType": {
6352
- "type": "string"
6353
- },
6354
- "ifVersion": {
6355
- "type": "integer",
6356
- "minimum": 1,
6357
- "maximum": 9007199254740991
6358
- }
6484
+ "responses": {
6485
+ "2XX": {
6486
+ "description": "Success envelope",
6487
+ "content": {
6488
+ "application/json": {
6489
+ "schema": {
6490
+ "$ref": "#/components/schemas/ApiSuccess"
6359
6491
  }
6360
6492
  }
6361
- },
6362
- "multipart/form-data": {
6363
- "schema": {
6364
- "type": "object",
6365
- "properties": {
6366
- "path": {
6367
- "type": "string"
6368
- },
6369
- "parentId": {
6370
- "type": "string"
6371
- },
6372
- "name": {
6373
- "type": "string"
6374
- },
6375
- "mediaType": {
6376
- "type": "string"
6377
- },
6378
- "ifVersion": {
6493
+ }
6494
+ },
6495
+ "4XX": {
6496
+ "description": "Error envelope",
6497
+ "content": {
6498
+ "application/json": {
6499
+ "schema": {
6500
+ "$ref": "#/components/schemas/ApiError"
6501
+ }
6502
+ }
6503
+ }
6504
+ },
6505
+ "5XX": {
6506
+ "description": "Error envelope",
6507
+ "content": {
6508
+ "application/json": {
6509
+ "schema": {
6510
+ "$ref": "#/components/schemas/ApiError"
6511
+ }
6512
+ }
6513
+ }
6514
+ }
6515
+ }
6516
+ }
6517
+ },
6518
+ "/api/organizations/{workspaceId}/files": {
6519
+ "get": {
6520
+ "operationId": "filesList",
6521
+ "summary": "List a workspace folder by id or path, with its breadcrumb and items, folders first. Omit folder for the root.",
6522
+ "tags": ["files"],
6523
+ "x-kosuke-command": ["files", "list"],
6524
+ "x-kosuke-sandbox-token": true,
6525
+ "x-kosuke-cron-token": true,
6526
+ "x-kosuke-sensei-token": true,
6527
+ "parameters": [
6528
+ {
6529
+ "name": "workspaceId",
6530
+ "in": "path",
6531
+ "required": true,
6532
+ "schema": {
6533
+ "type": "string",
6534
+ "minLength": 1
6535
+ }
6536
+ },
6537
+ {
6538
+ "name": "folder",
6539
+ "in": "query",
6540
+ "required": false,
6541
+ "schema": {
6542
+ "type": "string"
6543
+ }
6544
+ }
6545
+ ],
6546
+ "responses": {
6547
+ "2XX": {
6548
+ "description": "Success envelope",
6549
+ "content": {
6550
+ "application/json": {
6551
+ "schema": {
6552
+ "$ref": "#/components/schemas/ApiSuccess"
6553
+ }
6554
+ }
6555
+ }
6556
+ },
6557
+ "4XX": {
6558
+ "description": "Error envelope",
6559
+ "content": {
6560
+ "application/json": {
6561
+ "schema": {
6562
+ "$ref": "#/components/schemas/ApiError"
6563
+ }
6564
+ }
6565
+ }
6566
+ },
6567
+ "5XX": {
6568
+ "description": "Error envelope",
6569
+ "content": {
6570
+ "application/json": {
6571
+ "schema": {
6572
+ "$ref": "#/components/schemas/ApiError"
6573
+ }
6574
+ }
6575
+ }
6576
+ }
6577
+ }
6578
+ },
6579
+ "post": {
6580
+ "operationId": "filesSet",
6581
+ "summary": "Put a file by path, creating parent folders and replacing an existing file. Send text or exactly one attachment, at most 25 MiB. ifVersion refuses a stale replace. Alternatively provide name and parentId (null for the root).",
6582
+ "tags": ["files"],
6583
+ "x-kosuke-command": ["files", "set"],
6584
+ "x-kosuke-attachments": true,
6585
+ "x-kosuke-attachment-max-files": 20,
6586
+ "x-kosuke-attachment-max-bytes": 26214400,
6587
+ "x-kosuke-sandbox-token": true,
6588
+ "x-kosuke-cron-token": true,
6589
+ "x-kosuke-sensei-token": true,
6590
+ "parameters": [
6591
+ {
6592
+ "name": "workspaceId",
6593
+ "in": "path",
6594
+ "required": true,
6595
+ "schema": {
6596
+ "type": "string",
6597
+ "minLength": 1
6598
+ }
6599
+ }
6600
+ ],
6601
+ "requestBody": {
6602
+ "required": true,
6603
+ "content": {
6604
+ "application/json": {
6605
+ "schema": {
6606
+ "type": "object",
6607
+ "properties": {
6608
+ "path": {
6609
+ "type": "string",
6610
+ "minLength": 1
6611
+ },
6612
+ "parentId": {
6613
+ "anyOf": [
6614
+ {
6615
+ "type": "string",
6616
+ "format": "uuid",
6617
+ "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)$"
6618
+ },
6619
+ {
6620
+ "type": "null"
6621
+ }
6622
+ ]
6623
+ },
6624
+ "name": {
6625
+ "type": "string",
6626
+ "minLength": 1,
6627
+ "maxLength": 255
6628
+ },
6629
+ "text": {
6630
+ "type": "string",
6631
+ "minLength": 1
6632
+ },
6633
+ "mediaType": {
6634
+ "type": "string"
6635
+ },
6636
+ "ifVersion": {
6637
+ "type": "integer",
6638
+ "minimum": 1,
6639
+ "maximum": 9007199254740991
6640
+ }
6641
+ }
6642
+ }
6643
+ },
6644
+ "multipart/form-data": {
6645
+ "schema": {
6646
+ "type": "object",
6647
+ "properties": {
6648
+ "path": {
6649
+ "type": "string"
6650
+ },
6651
+ "parentId": {
6652
+ "type": "string"
6653
+ },
6654
+ "name": {
6655
+ "type": "string"
6656
+ },
6657
+ "mediaType": {
6658
+ "type": "string"
6659
+ },
6660
+ "ifVersion": {
6379
6661
  "type": "string"
6380
6662
  }
6381
6663
  }
@@ -6482,7 +6764,7 @@
6482
6764
  },
6483
6765
  "patch": {
6484
6766
  "operationId": "filesMove",
6485
- "summary": "Rename a workspace item with name, move it with parentId (null for the root), or both. Name clashes and moving a folder into its descendants are refused.",
6767
+ "summary": "Rename a workspace item with name, move it with parentId (null for the root), or both. Name clashes and moving a folder into its descendants are refused. Folders Kosuke keeps and locked files refuse with 403.",
6486
6768
  "tags": ["files"],
6487
6769
  "x-kosuke-command": ["files", "move"],
6488
6770
  "x-kosuke-sandbox-token": true,
@@ -6573,7 +6855,7 @@
6573
6855
  },
6574
6856
  "delete": {
6575
6857
  "operationId": "filesDelete",
6576
- "summary": "Delete a workspace file, or a folder and every item inside it. Agents cannot delete Files.",
6858
+ "summary": "Delete a workspace file, or a folder and every item inside it. Agents cannot delete Files. Folders Kosuke keeps and locked files refuse with 403.",
6577
6859
  "tags": ["files"],
6578
6860
  "x-kosuke-command": ["files", "delete"],
6579
6861
  "x-kosuke-sandbox-token": true,
@@ -12162,7 +12444,8 @@
12162
12444
  "/api/projects/{projectId}/chat-sessions/{sessionId}/artifacts": {
12163
12445
  "get": {
12164
12446
  "operationId": "sessionsArtifactsList",
12165
- "summary": "List the session's artifacts, most recently changed first. Rows only: a body or a file url comes from reading one.",
12447
+ "summary": "Use `sessions files list`. List the session's files of the four kinds an agent writes.",
12448
+ "deprecated": true,
12166
12449
  "tags": ["sessions"],
12167
12450
  "x-kosuke-command": ["sessions", "artifacts", "list"],
12168
12451
  "x-kosuke-sandbox-token": true,
@@ -12225,7 +12508,8 @@
12225
12508
  },
12226
12509
  "post": {
12227
12510
  "operationId": "sessionsArtifactsCreate",
12228
- "summary": "Copy a file of the project's workspace Files, or each file directly in a folder, onto a Backlog session as its own artifacts. Markdown, HTML, images and videos only; a slug the session already has gets a new version.",
12511
+ "summary": "Use `sessions files attach`. Point a Backlog session at a file of the project's Files, or at each file directly in a folder. Answers with one ref per file.",
12512
+ "deprecated": true,
12229
12513
  "tags": ["sessions"],
12230
12514
  "x-kosuke-command": ["sessions", "artifacts", "create"],
12231
12515
  "x-kosuke-sandbox-token": true,
@@ -12263,7 +12547,7 @@
12263
12547
  "file": {
12264
12548
  "type": "string",
12265
12549
  "minLength": 1,
12266
- "description": "A path in the Files of the project's workspace, such as prototypes/board/a-columns.html. A folder copies each file directly in it."
12550
+ "description": "A path in the Files of the project's workspace, such as prototypes/board/a-columns.html. A folder attaches each file directly in it."
12267
12551
  }
12268
12552
  },
12269
12553
  "required": ["file"]
@@ -12308,7 +12592,8 @@
12308
12592
  "/api/projects/{projectId}/chat-sessions/{sessionId}/artifacts/{artifactId}": {
12309
12593
  "get": {
12310
12594
  "operationId": "sessionsArtifactsGet",
12311
- "summary": "Read one artifact of the session, by its id or its slug, such as `testing-checklist`, `qa-report` or `review`: a markdown or html one carries its body, an image or a video a presigned url, its media type and its size.",
12595
+ "summary": "Use `sessions files get`. Read one file of the session by its id or its name: a deleted one, or one of another kind, is not found.",
12596
+ "deprecated": true,
12312
12597
  "tags": ["sessions"],
12313
12598
  "x-kosuke-command": ["sessions", "artifacts", "get"],
12314
12599
  "x-kosuke-sandbox-token": true,
@@ -12339,11 +12624,11 @@
12339
12624
  "name": "artifactId",
12340
12625
  "in": "path",
12341
12626
  "required": true,
12342
- "description": "The artifact id, or its slug.",
12627
+ "description": "The id, or the name its agent writes it under.",
12343
12628
  "schema": {
12344
12629
  "type": "string",
12345
12630
  "minLength": 1,
12346
- "description": "The artifact id, or its slug."
12631
+ "description": "The id, or the name its agent writes it under."
12347
12632
  }
12348
12633
  }
12349
12634
  ],
@@ -12657,12 +12942,12 @@
12657
12942
  }
12658
12943
  }
12659
12944
  },
12660
- "/api/projects/{projectId}/chat-sessions/{sessionId}/go-ahead": {
12661
- "put": {
12662
- "operationId": "sessionsGoAheadSet",
12663
- "summary": "Give the session's pull request the go-ahead to merge, as the session's member, on one head: goAheadSha, goAheadBy and goAheadAt. A draft pull request is first marked ready for review on GitHub as the member; when GitHub refuses, nothing is saved (503). The project's Merge agent (the merge train, or Batch merging when it is on) is woken and merges it only at that head. Members and their Sensei only.",
12945
+ "/api/projects/{projectId}/chat-sessions/{sessionId}/files": {
12946
+ "get": {
12947
+ "operationId": "sessionsFilesList",
12948
+ "summary": "List the session's files: what its agent wrote, most recently changed first, a deleted one as a row that says who deleted it, then the files its ticket points at. Rows only: a body or a file url comes from reading one.",
12664
12949
  "tags": ["sessions"],
12665
- "x-kosuke-command": ["sessions", "go-ahead", "set"],
12950
+ "x-kosuke-command": ["sessions", "files", "list"],
12666
12951
  "x-kosuke-sandbox-token": true,
12667
12952
  "x-kosuke-cron-token": true,
12668
12953
  "x-kosuke-sensei-token": true,
@@ -12688,23 +12973,6 @@
12688
12973
  }
12689
12974
  }
12690
12975
  ],
12691
- "requestBody": {
12692
- "required": true,
12693
- "content": {
12694
- "application/json": {
12695
- "schema": {
12696
- "type": "object",
12697
- "properties": {
12698
- "sha": {
12699
- "description": "The head commit the go-ahead is given on. Defaults to the head the session last read from GitHub.",
12700
- "type": "string",
12701
- "pattern": "^[0-9a-f]{40}$"
12702
- }
12703
- }
12704
- }
12705
- }
12706
- }
12707
- },
12708
12976
  "responses": {
12709
12977
  "2XX": {
12710
12978
  "description": "Success envelope",
@@ -12737,14 +13005,12 @@
12737
13005
  }
12738
13006
  }
12739
13007
  }
12740
- }
12741
- },
12742
- "/api/projects/{projectId}/chat-sessions/{sessionId}/go-ahead/clear": {
13008
+ },
12743
13009
  "post": {
12744
- "operationId": "sessionsGoAheadDelete",
12745
- "summary": "Take the session's go-ahead away, so neither the Merge agent nor a Batch merges its pull request until it is given again. The callers of `sessions go-ahead set`.",
13010
+ "operationId": "sessionsFilesAttach",
13011
+ "summary": "Point a Backlog session at a file of the project's Files, or at each file directly in a folder, without copying it: its agent reads the current version when it starts. Markdown, HTML, images and videos only. The batch is refused whole on another type, on a file this session's own agent wrote, and on a name that clashes with another of the session's attached files.",
12746
13012
  "tags": ["sessions"],
12747
- "x-kosuke-command": ["sessions", "go-ahead", "delete"],
13013
+ "x-kosuke-command": ["sessions", "files", "attach"],
12748
13014
  "x-kosuke-sandbox-token": true,
12749
13015
  "x-kosuke-cron-token": true,
12750
13016
  "x-kosuke-sensei-token": true,
@@ -12770,6 +13036,24 @@
12770
13036
  }
12771
13037
  }
12772
13038
  ],
13039
+ "requestBody": {
13040
+ "required": true,
13041
+ "content": {
13042
+ "application/json": {
13043
+ "schema": {
13044
+ "type": "object",
13045
+ "properties": {
13046
+ "file": {
13047
+ "type": "string",
13048
+ "minLength": 1,
13049
+ "description": "A path in the Files of the project's workspace, or in your Personal Files for a personal space, such as prototypes/board/a-columns.html. A folder attaches each file directly in it."
13050
+ }
13051
+ },
13052
+ "required": ["file"]
13053
+ }
13054
+ }
13055
+ }
13056
+ },
12773
13057
  "responses": {
12774
13058
  "2XX": {
12775
13059
  "description": "Success envelope",
@@ -12804,12 +13088,12 @@
12804
13088
  }
12805
13089
  }
12806
13090
  },
12807
- "/api/projects/{projectId}/chat-sessions/{sessionId}/jobs/chat": {
13091
+ "/api/projects/{projectId}/chat-sessions/{sessionId}/files/{fileId}": {
12808
13092
  "get": {
12809
- "operationId": "sessionsJobsList",
12810
- "summary": "List a chat session's jobs, one per Turn, newest first: each one's status, error and timestamps, with the total in meta.pagination.",
13093
+ "operationId": "sessionsFilesGet",
13094
+ "summary": "Read one file of the session, by its id or its name, such as `testing-checklist`, `qa-report.html` or `review`: a Markdown or HTML file carries its body, any other a presigned url, its media type and its size. A deleted one says who deleted it and holds no content.",
12811
13095
  "tags": ["sessions"],
12812
- "x-kosuke-command": ["sessions", "jobs", "list"],
13096
+ "x-kosuke-command": ["sessions", "files", "get"],
12813
13097
  "x-kosuke-sandbox-token": true,
12814
13098
  "x-kosuke-cron-token": true,
12815
13099
  "x-kosuke-sensei-token": true,
@@ -12835,27 +13119,14 @@
12835
13119
  }
12836
13120
  },
12837
13121
  {
12838
- "name": "page",
12839
- "in": "query",
12840
- "required": false,
12841
- "description": "1-based. Default 1.",
12842
- "schema": {
12843
- "description": "1-based. Default 1.",
12844
- "type": "integer",
12845
- "minimum": 1,
12846
- "maximum": 9007199254740991
12847
- }
12848
- },
12849
- {
12850
- "name": "pageSize",
12851
- "in": "query",
12852
- "required": false,
12853
- "description": "Default 25. Values above 100 are clamped, not rejected.",
13122
+ "name": "fileId",
13123
+ "in": "path",
13124
+ "required": true,
13125
+ "description": "The file's id, the name its agent writes it under, or that name with its extension, such as `review` or `review.md`.",
12854
13126
  "schema": {
12855
- "description": "Default 25. Values above 100 are clamped, not rejected.",
12856
- "type": "integer",
12857
- "minimum": 1,
12858
- "maximum": 9007199254740991
13127
+ "type": "string",
13128
+ "minLength": 1,
13129
+ "description": "The file's id, the name its agent writes it under, or that name with its extension, such as `review` or `review.md`."
12859
13130
  }
12860
13131
  }
12861
13132
  ],
@@ -12891,11 +13162,247 @@
12891
13162
  }
12892
13163
  }
12893
13164
  }
12894
- },
12895
- "post": {
12896
- "operationId": "sessionsSend",
12897
- "summary": "Send a message: starts a turn, or waits Up next while one is running. To steer the running turn with it, steer the Queued Message it becomes. Attachments ride along as multipart. Use it over steer only for attachments, a message that runs a skill, or text over 10,000 characters. From Sensei, /kosuke:sync-branch is refused with 409 SYNC_OWNED_BY_MERGE_AGENT when the project is on Batch merging, or on the merge train and the pull request has the go-ahead, unless a member started the Turn: the merge agent syncs those.",
12898
- "tags": ["sessions"],
13165
+ }
13166
+ },
13167
+ "/api/projects/{projectId}/chat-sessions/{sessionId}/go-ahead": {
13168
+ "put": {
13169
+ "operationId": "sessionsGoAheadSet",
13170
+ "summary": "Give the session's pull request the go-ahead to merge, as the session's member, on one head: goAheadSha, goAheadBy and goAheadAt. A draft pull request is first marked ready for review on GitHub as the member; when GitHub refuses, nothing is saved (503). The project's Merge agent (the merge train, or Batch merging when it is on) is woken and merges it only at that head. Members and their Sensei only.",
13171
+ "tags": ["sessions"],
13172
+ "x-kosuke-command": ["sessions", "go-ahead", "set"],
13173
+ "x-kosuke-sandbox-token": true,
13174
+ "x-kosuke-cron-token": true,
13175
+ "x-kosuke-sensei-token": true,
13176
+ "parameters": [
13177
+ {
13178
+ "name": "projectId",
13179
+ "in": "path",
13180
+ "required": true,
13181
+ "schema": {
13182
+ "type": "string",
13183
+ "format": "uuid",
13184
+ "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)$"
13185
+ }
13186
+ },
13187
+ {
13188
+ "name": "sessionId",
13189
+ "in": "path",
13190
+ "required": true,
13191
+ "schema": {
13192
+ "type": "string",
13193
+ "format": "uuid",
13194
+ "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)$"
13195
+ }
13196
+ }
13197
+ ],
13198
+ "requestBody": {
13199
+ "required": true,
13200
+ "content": {
13201
+ "application/json": {
13202
+ "schema": {
13203
+ "type": "object",
13204
+ "properties": {
13205
+ "sha": {
13206
+ "description": "The head commit the go-ahead is given on. Defaults to the head the session last read from GitHub.",
13207
+ "type": "string",
13208
+ "pattern": "^[0-9a-f]{40}$"
13209
+ }
13210
+ }
13211
+ }
13212
+ }
13213
+ }
13214
+ },
13215
+ "responses": {
13216
+ "2XX": {
13217
+ "description": "Success envelope",
13218
+ "content": {
13219
+ "application/json": {
13220
+ "schema": {
13221
+ "$ref": "#/components/schemas/ApiSuccess"
13222
+ }
13223
+ }
13224
+ }
13225
+ },
13226
+ "4XX": {
13227
+ "description": "Error envelope",
13228
+ "content": {
13229
+ "application/json": {
13230
+ "schema": {
13231
+ "$ref": "#/components/schemas/ApiError"
13232
+ }
13233
+ }
13234
+ }
13235
+ },
13236
+ "5XX": {
13237
+ "description": "Error envelope",
13238
+ "content": {
13239
+ "application/json": {
13240
+ "schema": {
13241
+ "$ref": "#/components/schemas/ApiError"
13242
+ }
13243
+ }
13244
+ }
13245
+ }
13246
+ }
13247
+ }
13248
+ },
13249
+ "/api/projects/{projectId}/chat-sessions/{sessionId}/go-ahead/clear": {
13250
+ "post": {
13251
+ "operationId": "sessionsGoAheadDelete",
13252
+ "summary": "Take the session's go-ahead away, so neither the Merge agent nor a Batch merges its pull request until it is given again. The callers of `sessions go-ahead set`.",
13253
+ "tags": ["sessions"],
13254
+ "x-kosuke-command": ["sessions", "go-ahead", "delete"],
13255
+ "x-kosuke-sandbox-token": true,
13256
+ "x-kosuke-cron-token": true,
13257
+ "x-kosuke-sensei-token": true,
13258
+ "parameters": [
13259
+ {
13260
+ "name": "projectId",
13261
+ "in": "path",
13262
+ "required": true,
13263
+ "schema": {
13264
+ "type": "string",
13265
+ "format": "uuid",
13266
+ "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)$"
13267
+ }
13268
+ },
13269
+ {
13270
+ "name": "sessionId",
13271
+ "in": "path",
13272
+ "required": true,
13273
+ "schema": {
13274
+ "type": "string",
13275
+ "format": "uuid",
13276
+ "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)$"
13277
+ }
13278
+ }
13279
+ ],
13280
+ "responses": {
13281
+ "2XX": {
13282
+ "description": "Success envelope",
13283
+ "content": {
13284
+ "application/json": {
13285
+ "schema": {
13286
+ "$ref": "#/components/schemas/ApiSuccess"
13287
+ }
13288
+ }
13289
+ }
13290
+ },
13291
+ "4XX": {
13292
+ "description": "Error envelope",
13293
+ "content": {
13294
+ "application/json": {
13295
+ "schema": {
13296
+ "$ref": "#/components/schemas/ApiError"
13297
+ }
13298
+ }
13299
+ }
13300
+ },
13301
+ "5XX": {
13302
+ "description": "Error envelope",
13303
+ "content": {
13304
+ "application/json": {
13305
+ "schema": {
13306
+ "$ref": "#/components/schemas/ApiError"
13307
+ }
13308
+ }
13309
+ }
13310
+ }
13311
+ }
13312
+ }
13313
+ },
13314
+ "/api/projects/{projectId}/chat-sessions/{sessionId}/jobs/chat": {
13315
+ "get": {
13316
+ "operationId": "sessionsJobsList",
13317
+ "summary": "List a chat session's jobs, one per Turn, newest first: each one's status, error and timestamps, with the total in meta.pagination.",
13318
+ "tags": ["sessions"],
13319
+ "x-kosuke-command": ["sessions", "jobs", "list"],
13320
+ "x-kosuke-sandbox-token": true,
13321
+ "x-kosuke-cron-token": true,
13322
+ "x-kosuke-sensei-token": true,
13323
+ "parameters": [
13324
+ {
13325
+ "name": "projectId",
13326
+ "in": "path",
13327
+ "required": true,
13328
+ "schema": {
13329
+ "type": "string",
13330
+ "format": "uuid",
13331
+ "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)$"
13332
+ }
13333
+ },
13334
+ {
13335
+ "name": "sessionId",
13336
+ "in": "path",
13337
+ "required": true,
13338
+ "schema": {
13339
+ "type": "string",
13340
+ "format": "uuid",
13341
+ "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)$"
13342
+ }
13343
+ },
13344
+ {
13345
+ "name": "page",
13346
+ "in": "query",
13347
+ "required": false,
13348
+ "description": "1-based. Default 1.",
13349
+ "schema": {
13350
+ "description": "1-based. Default 1.",
13351
+ "type": "integer",
13352
+ "minimum": 1,
13353
+ "maximum": 9007199254740991
13354
+ }
13355
+ },
13356
+ {
13357
+ "name": "pageSize",
13358
+ "in": "query",
13359
+ "required": false,
13360
+ "description": "Default 25. Values above 100 are clamped, not rejected.",
13361
+ "schema": {
13362
+ "description": "Default 25. Values above 100 are clamped, not rejected.",
13363
+ "type": "integer",
13364
+ "minimum": 1,
13365
+ "maximum": 9007199254740991
13366
+ }
13367
+ }
13368
+ ],
13369
+ "responses": {
13370
+ "2XX": {
13371
+ "description": "Success envelope",
13372
+ "content": {
13373
+ "application/json": {
13374
+ "schema": {
13375
+ "$ref": "#/components/schemas/ApiSuccess"
13376
+ }
13377
+ }
13378
+ }
13379
+ },
13380
+ "4XX": {
13381
+ "description": "Error envelope",
13382
+ "content": {
13383
+ "application/json": {
13384
+ "schema": {
13385
+ "$ref": "#/components/schemas/ApiError"
13386
+ }
13387
+ }
13388
+ }
13389
+ },
13390
+ "5XX": {
13391
+ "description": "Error envelope",
13392
+ "content": {
13393
+ "application/json": {
13394
+ "schema": {
13395
+ "$ref": "#/components/schemas/ApiError"
13396
+ }
13397
+ }
13398
+ }
13399
+ }
13400
+ }
13401
+ },
13402
+ "post": {
13403
+ "operationId": "sessionsSend",
13404
+ "summary": "Send a message: starts a turn, or waits Up next while one is running. To steer the running turn with it, steer the Queued Message it becomes. Attachments ride along as multipart. Use it over steer only for attachments, a message that runs a skill, or text over 10,000 characters. From Sensei, /kosuke:sync-branch is refused with 409 SYNC_OWNED_BY_MERGE_AGENT when the project is on Batch merging, or on the merge train and the pull request has the go-ahead, unless a member started the Turn: the merge agent syncs those.",
13405
+ "tags": ["sessions"],
12899
13406
  "x-kosuke-command": ["sessions", "send"],
12900
13407
  "x-kosuke-attachments": true,
12901
13408
  "x-kosuke-attachment-max-files": 20,
@@ -14380,10 +14887,10 @@
14380
14887
  },
14381
14888
  "/api/projects/{projectId}/chat-sessions/{sessionId}/preview/files": {
14382
14889
  "get": {
14383
- "operationId": "sessionsFilesList",
14890
+ "operationId": "sessionsSandboxFilesList",
14384
14891
  "summary": "List the files in the session's sandbox. Empty when the sandbox is not running.",
14385
14892
  "tags": ["sessions"],
14386
- "x-kosuke-command": ["sessions", "files", "list"],
14893
+ "x-kosuke-command": ["sessions", "sandbox-files", "list"],
14387
14894
  "x-kosuke-sandbox-token": true,
14388
14895
  "x-kosuke-cron-token": true,
14389
14896
  "x-kosuke-sensei-token": true,
@@ -14445,10 +14952,10 @@
14445
14952
  },
14446
14953
  "/api/projects/{projectId}/chat-sessions/{sessionId}/preview/files/content": {
14447
14954
  "get": {
14448
- "operationId": "sessionsFilesGet",
14955
+ "operationId": "sessionsSandboxFilesGet",
14449
14956
  "summary": "Read one file from the session's sandbox.",
14450
14957
  "tags": ["sessions"],
14451
- "x-kosuke-command": ["sessions", "files", "get"],
14958
+ "x-kosuke-command": ["sessions", "sandbox-files", "get"],
14452
14959
  "x-kosuke-sandbox-token": true,
14453
14960
  "x-kosuke-cron-token": true,
14454
14961
  "x-kosuke-sensei-token": true,
@@ -14519,10 +15026,10 @@
14519
15026
  }
14520
15027
  },
14521
15028
  "put": {
14522
- "operationId": "sessionsFilesSet",
15029
+ "operationId": "sessionsSandboxFilesSet",
14523
15030
  "summary": "Write one file in the session's sandbox. Refused while a turn is running, and for binary content.",
14524
15031
  "tags": ["sessions"],
14525
- "x-kosuke-command": ["sessions", "files", "set"],
15032
+ "x-kosuke-command": ["sessions", "sandbox-files", "set"],
14526
15033
  "x-kosuke-sandbox-token": true,
14527
15034
  "x-kosuke-cron-token": true,
14528
15035
  "x-kosuke-sensei-token": true,
@@ -18526,7 +19033,7 @@
18526
19033
  "/api/projects/{projectId}/settings": {
18527
19034
  "get": {
18528
19035
  "operationId": "projectsSettingsGet",
18529
- "summary": "Read the project settings: setup commands, services, environment and sandbox size. --values false leaves every environment variable value empty: their names only.",
19036
+ "summary": "Read the project settings: setup commands, services, environment and sandbox size. Every project member reads them. --values false leaves every environment variable value empty: their names only. canEdit says whether the caller may change them.",
18530
19037
  "tags": ["projects"],
18531
19038
  "x-kosuke-command": ["projects", "settings", "get"],
18532
19039
  "x-kosuke-sandbox-token": true,
@@ -18588,12 +19095,9 @@
18588
19095
  },
18589
19096
  "patch": {
18590
19097
  "operationId": "projectsSettingsUpdate",
18591
- "summary": "Change setup commands, branches, working directory, sandbox tier, the Project QA Guide or deviceWritePaths, the device folders a Chat Session may write. A sandbox cannot change the guide, and only a member's own API key or browser session changes deviceWritePaths.",
19098
+ "summary": "Change setup commands, branches, working directory, sandbox tier, the Project QA Guide or deviceWritePaths, the device folders a Chat Session may write. Only a workspace admin, in the browser, changes setup commands, branches, working directory or sandbox tier: an API key or a connected app gets 403 until keys carry a project settings scope, and so does every agent token. Any member changes the QA Guide, and only a member's own API key or browser session changes deviceWritePaths. Each change is recorded in Change history.",
18592
19099
  "tags": ["projects"],
18593
19100
  "x-kosuke-command": ["projects", "settings", "update"],
18594
- "x-kosuke-sandbox-token": true,
18595
- "x-kosuke-cron-token": true,
18596
- "x-kosuke-sensei-token": true,
18597
19101
  "parameters": [
18598
19102
  {
18599
19103
  "name": "projectId",
@@ -18757,16 +19261,13 @@
18757
19261
  "/api/projects/{projectId}/settings/agentic-deploy": {
18758
19262
  "post": {
18759
19263
  "operationId": "deploysStart",
18760
- "summary": "Start a deploy (empty JSON body) or continue the current one with userResponse. While the deploy agent works, the message waits Up next; while the sandbox builds, it joins the agent's first turn as instructions. Attachments ride along as multipart, where the message is called content.",
19264
+ "summary": "Start a deploy (empty JSON body) or continue the current one with userResponse. While the deploy agent works, the message waits Up next; while the sandbox builds, it joins the agent's first turn as instructions. Attachments ride along as multipart, where the message is called content. Only a workspace admin, in the browser: an API key, a connected app and every agent token get 403. A started deploy is recorded in Change history.",
18761
19265
  "tags": ["deploys"],
18762
19266
  "x-kosuke-command": ["deploys", "start"],
18763
19267
  "x-kosuke-attachments": true,
18764
19268
  "x-kosuke-attachment-max-files": 20,
18765
19269
  "x-kosuke-attachment-max-bytes": 10485760,
18766
19270
  "x-kosuke-attachment-upload-path": "/api/projects/{projectId}/attachments",
18767
- "x-kosuke-sandbox-token": true,
18768
- "x-kosuke-cron-token": true,
18769
- "x-kosuke-sensei-token": true,
18770
19271
  "parameters": [
18771
19272
  {
18772
19273
  "name": "projectId",
@@ -19045,16 +19546,13 @@
19045
19546
  "/api/projects/{projectId}/settings/agentic-deploy/queue/{queuedMessageId}": {
19046
19547
  "patch": {
19047
19548
  "operationId": "deploysQueueUpdate",
19048
- "summary": "Save an edit to your own queued Deploy Chat message, keeping its place in Up next. New files ride along as multipart.",
19549
+ "summary": "Save an edit to your own queued Deploy Chat message, keeping its place in Up next. New files ride along as multipart. Only a workspace admin, in the browser: an API key, a connected app and every agent token get 403.",
19049
19550
  "tags": ["deploys"],
19050
19551
  "x-kosuke-command": ["deploys", "queue", "update"],
19051
19552
  "x-kosuke-attachments": true,
19052
19553
  "x-kosuke-attachment-max-files": 20,
19053
19554
  "x-kosuke-attachment-max-bytes": 10485760,
19054
19555
  "x-kosuke-attachment-upload-path": "/api/projects/{projectId}/attachments",
19055
- "x-kosuke-sandbox-token": true,
19056
- "x-kosuke-cron-token": true,
19057
- "x-kosuke-sensei-token": true,
19058
19556
  "parameters": [
19059
19557
  {
19060
19558
  "name": "projectId",
@@ -19301,12 +19799,9 @@
19301
19799
  "/api/projects/{projectId}/settings/agentic-deploy/queue/{queuedMessageId}/send": {
19302
19800
  "post": {
19303
19801
  "operationId": "deploysQueueSend",
19304
- "summary": "Send your own queued Deploy Chat message now, ahead of the rest of Up next. Only while the deploy agent is idle; it resumes a paused Up next.",
19802
+ "summary": "Send your own queued Deploy Chat message now, ahead of the rest of Up next. Only while the deploy agent is idle; it resumes a paused Up next. Only a workspace admin, in the browser: an API key, a connected app and every agent token get 403.",
19305
19803
  "tags": ["deploys"],
19306
19804
  "x-kosuke-command": ["deploys", "queue", "send"],
19307
- "x-kosuke-sandbox-token": true,
19308
- "x-kosuke-cron-token": true,
19309
- "x-kosuke-sensei-token": true,
19310
19805
  "parameters": [
19311
19806
  {
19312
19807
  "name": "projectId",
@@ -19366,12 +19861,9 @@
19366
19861
  "/api/projects/{projectId}/settings/agentic-deploy/queue/{queuedMessageId}/steer": {
19367
19862
  "post": {
19368
19863
  "operationId": "deploysQueueSteer",
19369
- "summary": "Send your own queued Deploy Chat message into the running deploy agent Turn as a steer, on any deploy model whose runtime takes one; the message stays queued when nothing can take it.",
19864
+ "summary": "Send your own queued Deploy Chat message into the running deploy agent Turn as a steer, on any deploy model whose runtime takes one; the message stays queued when nothing can take it. Only a workspace admin, in the browser: an API key, a connected app and every agent token get 403.",
19370
19865
  "tags": ["deploys"],
19371
19866
  "x-kosuke-command": ["deploys", "queue", "steer"],
19372
- "x-kosuke-sandbox-token": true,
19373
- "x-kosuke-cron-token": true,
19374
- "x-kosuke-sensei-token": true,
19375
19867
  "parameters": [
19376
19868
  {
19377
19869
  "name": "projectId",
@@ -19431,12 +19923,9 @@
19431
19923
  "/api/projects/{projectId}/settings/agentic-deploy/queue/resume": {
19432
19924
  "post": {
19433
19925
  "operationId": "deploysQueueResume",
19434
- "summary": "Resume the Deploy Chat's paused Up next. Its top message is sent as soon as the deploy is idle.",
19926
+ "summary": "Resume the Deploy Chat's paused Up next. Its top message is sent as soon as the deploy is idle. Only a workspace admin, in the browser: an API key, a connected app and every agent token get 403.",
19435
19927
  "tags": ["deploys"],
19436
19928
  "x-kosuke-command": ["deploys", "queue", "resume"],
19437
- "x-kosuke-sandbox-token": true,
19438
- "x-kosuke-cron-token": true,
19439
- "x-kosuke-sensei-token": true,
19440
19929
  "parameters": [
19441
19930
  {
19442
19931
  "name": "projectId",
@@ -19486,12 +19975,9 @@
19486
19975
  "/api/projects/{projectId}/settings/env-vars": {
19487
19976
  "post": {
19488
19977
  "operationId": "projectsEnvVarsCreate",
19489
- "summary": "Add environment variables. The body is a JSON array of { key, value, isSecret? }.",
19978
+ "summary": "Add environment variables. The body is a JSON array of { key, value, isSecret? }. Only a workspace admin, in the browser: an API key, a connected app and every agent token get 403. Each one is recorded in Change history, its value masked. A loader or shell name (NODE_OPTIONS, LD_PRELOAD, PATH, GIT_*, and the like) reaches the app only, never Kosuke's agents.",
19490
19979
  "tags": ["projects"],
19491
19980
  "x-kosuke-command": ["projects", "env-vars", "create"],
19492
- "x-kosuke-sandbox-token": true,
19493
- "x-kosuke-cron-token": true,
19494
- "x-kosuke-sensei-token": true,
19495
19981
  "parameters": [
19496
19982
  {
19497
19983
  "name": "projectId",
@@ -19571,12 +20057,9 @@
19571
20057
  },
19572
20058
  "delete": {
19573
20059
  "operationId": "projectsEnvVarsDelete",
19574
- "summary": "Remove environment variables. The body is a JSON array of variable ids.",
20060
+ "summary": "Remove environment variables. The body is a JSON array of variable ids. Only a workspace admin, in the browser: an API key, a connected app and every agent token get 403. Each removal is recorded in Change history.",
19575
20061
  "tags": ["projects"],
19576
20062
  "x-kosuke-command": ["projects", "env-vars", "delete"],
19577
- "x-kosuke-sandbox-token": true,
19578
- "x-kosuke-cron-token": true,
19579
- "x-kosuke-sensei-token": true,
19580
20063
  "parameters": [
19581
20064
  {
19582
20065
  "name": "projectId",
@@ -19639,15 +20122,67 @@
19639
20122
  }
19640
20123
  }
19641
20124
  },
20125
+ "/api/projects/{projectId}/settings/history": {
20126
+ "get": {
20127
+ "operationId": "projectsSettingsChangesList",
20128
+ "summary": "Read the project's Change history, newest first: each change to its setup, services, environment and deploys that went through, with who made it, how (browser, API key, connected app, Sensei or the deploy agent) and when. A member's restart of the main preview lists as the Recovery Deploy it starts. Every project member reads it. An environment variable's value is never kept: only whether it was set and secret.",
20129
+ "tags": ["projects"],
20130
+ "x-kosuke-command": ["projects", "settings", "changes", "list"],
20131
+ "x-kosuke-sandbox-token": true,
20132
+ "x-kosuke-cron-token": true,
20133
+ "x-kosuke-sensei-token": true,
20134
+ "parameters": [
20135
+ {
20136
+ "name": "projectId",
20137
+ "in": "path",
20138
+ "required": true,
20139
+ "schema": {
20140
+ "type": "string",
20141
+ "format": "uuid",
20142
+ "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)$"
20143
+ }
20144
+ }
20145
+ ],
20146
+ "responses": {
20147
+ "2XX": {
20148
+ "description": "Success envelope",
20149
+ "content": {
20150
+ "application/json": {
20151
+ "schema": {
20152
+ "$ref": "#/components/schemas/ApiSuccess"
20153
+ }
20154
+ }
20155
+ }
20156
+ },
20157
+ "4XX": {
20158
+ "description": "Error envelope",
20159
+ "content": {
20160
+ "application/json": {
20161
+ "schema": {
20162
+ "$ref": "#/components/schemas/ApiError"
20163
+ }
20164
+ }
20165
+ }
20166
+ },
20167
+ "5XX": {
20168
+ "description": "Error envelope",
20169
+ "content": {
20170
+ "application/json": {
20171
+ "schema": {
20172
+ "$ref": "#/components/schemas/ApiError"
20173
+ }
20174
+ }
20175
+ }
20176
+ }
20177
+ }
20178
+ }
20179
+ },
19642
20180
  "/api/projects/{projectId}/settings/import": {
19643
20181
  "post": {
19644
20182
  "operationId": "projectsSettingsSet",
19645
- "summary": "Replace the services and environment from a kosuke.config.json document. Cross-service rules (unique ports, after references, one preview endpoint) are checked by the handler, not by the schema.",
20183
+ "summary": "Replace the services and environment from a kosuke.config.json document. Cross-service rules (unique ports, after references, one preview endpoint) are checked by the handler, not by the schema. Only a workspace admin, in the browser: an API key, a connected app and every agent token get 403. Recorded in Change history.",
19646
20184
  "tags": ["projects"],
19647
20185
  "x-kosuke-command": ["projects", "settings", "set"],
19648
- "x-kosuke-sandbox-token": true,
19649
- "x-kosuke-cron-token": true,
19650
- "x-kosuke-sensei-token": true,
19651
20186
  "parameters": [
19652
20187
  {
19653
20188
  "name": "projectId",
@@ -20118,12 +20653,9 @@
20118
20653
  },
20119
20654
  "post": {
20120
20655
  "operationId": "projectsServicesCreate",
20121
- "summary": "Add a service. A port already used by another service is rejected by the handler.",
20656
+ "summary": "Add a service. A port already used by another service is rejected by the handler. Only a workspace admin, in the browser: an API key, a connected app and every agent token get 403. Recorded in Change history.",
20122
20657
  "tags": ["projects"],
20123
20658
  "x-kosuke-command": ["projects", "services", "create"],
20124
- "x-kosuke-sandbox-token": true,
20125
- "x-kosuke-cron-token": true,
20126
- "x-kosuke-sensei-token": true,
20127
20659
  "parameters": [
20128
20660
  {
20129
20661
  "name": "projectId",
@@ -20278,12 +20810,9 @@
20278
20810
  "/api/projects/{projectId}/settings/services/{serviceId}": {
20279
20811
  "patch": {
20280
20812
  "operationId": "projectsServicesUpdate",
20281
- "summary": "Change one service. Every field is optional; only the ones sent change.",
20813
+ "summary": "Change one service. Every field is optional; only the ones sent change. Only a workspace admin, in the browser: an API key, a connected app and every agent token get 403. Recorded in Change history.",
20282
20814
  "tags": ["projects"],
20283
20815
  "x-kosuke-command": ["projects", "services", "update"],
20284
- "x-kosuke-sandbox-token": true,
20285
- "x-kosuke-cron-token": true,
20286
- "x-kosuke-sensei-token": true,
20287
20816
  "parameters": [
20288
20817
  {
20289
20818
  "name": "projectId",
@@ -20432,12 +20961,9 @@
20432
20961
  },
20433
20962
  "delete": {
20434
20963
  "operationId": "projectsServicesDelete",
20435
- "summary": "Remove one service.",
20964
+ "summary": "Remove one service. Only a workspace admin, in the browser: an API key, a connected app and every agent token get 403. Recorded in Change history.",
20436
20965
  "tags": ["projects"],
20437
20966
  "x-kosuke-command": ["projects", "services", "delete"],
20438
- "x-kosuke-sandbox-token": true,
20439
- "x-kosuke-cron-token": true,
20440
- "x-kosuke-sensei-token": true,
20441
20967
  "parameters": [
20442
20968
  {
20443
20969
  "name": "projectId",
@@ -20683,7 +21209,7 @@
20683
21209
  "/api/prototypes/render": {
20684
21210
  "post": {
20685
21211
  "operationId": "prototypesCreate",
20686
- "summary": "Render a prototype from its prototype.json, content.css and content.js, attached as three files, and save it to a Chat Session's artifacts (projectId and sessionId) or a workspace's Files (workspaceId). A failed check answers 422 with the issues in details and saves nothing. A session token saves only to its own session, Sensei only to Files.",
21212
+ "summary": "Render a prototype from its prototype.json, content.css and content.js, attached as three files, and save it to a Chat Session's files (projectId and sessionId) or a workspace's Files (workspaceId). A failed check answers 422 with the issues in details and saves nothing. A session token saves only to its own session, Sensei only to Files.",
20687
21213
  "tags": ["prototypes"],
20688
21214
  "x-kosuke-command": ["prototypes", "create"],
20689
21215
  "x-kosuke-attachments": true,
@@ -20700,7 +21226,7 @@
20700
21226
  "properties": {
20701
21227
  "name": {
20702
21228
  "type": "string",
20703
- "description": "The page name: prototype- and two to five lowercase hyphenated words for a session (its artifact slug), two to five words for Files (prototypes/<name>.html)."
21229
+ "description": "The page name: prototype- and two to five lowercase hyphenated words for a session (its file name), two to five words for Files (prototypes/<name>.html)."
20704
21230
  },
20705
21231
  "variants": {
20706
21232
  "description": "one (default): one page, with a Variant control when there are several. per-variant: one page per Variant, <name>-<letter>-<words> in a session, prototypes/<name>/<letter>-<words>.html in Files.",
@@ -26207,7 +26733,8 @@
26207
26733
  "/api/shared-previews/{slug}/artifacts/{artifactId}": {
26208
26734
  "get": {
26209
26735
  "operationId": "previewSharedArtifactsGet",
26210
- "summary": "Read one artifact behind a public share link, by its id or its slug. No credential needed.",
26736
+ "summary": "Use `preview shared-files get`. Read one file behind a public share link, by its id or its name. No credential needed.",
26737
+ "deprecated": true,
26211
26738
  "tags": ["preview"],
26212
26739
  "x-kosuke-command": ["preview", "shared", "artifacts", "get"],
26213
26740
  "parameters": [
@@ -26225,11 +26752,75 @@
26225
26752
  "name": "artifactId",
26226
26753
  "in": "path",
26227
26754
  "required": true,
26228
- "description": "The artifact id, or its slug.",
26755
+ "description": "The id, or the name its agent writes it under.",
26756
+ "schema": {
26757
+ "type": "string",
26758
+ "minLength": 1,
26759
+ "description": "The id, or the name its agent writes it under."
26760
+ }
26761
+ }
26762
+ ],
26763
+ "responses": {
26764
+ "2XX": {
26765
+ "description": "Success envelope",
26766
+ "content": {
26767
+ "application/json": {
26768
+ "schema": {
26769
+ "$ref": "#/components/schemas/ApiSuccess"
26770
+ }
26771
+ }
26772
+ }
26773
+ },
26774
+ "4XX": {
26775
+ "description": "Error envelope",
26776
+ "content": {
26777
+ "application/json": {
26778
+ "schema": {
26779
+ "$ref": "#/components/schemas/ApiError"
26780
+ }
26781
+ }
26782
+ }
26783
+ },
26784
+ "5XX": {
26785
+ "description": "Error envelope",
26786
+ "content": {
26787
+ "application/json": {
26788
+ "schema": {
26789
+ "$ref": "#/components/schemas/ApiError"
26790
+ }
26791
+ }
26792
+ }
26793
+ }
26794
+ },
26795
+ "security": []
26796
+ }
26797
+ },
26798
+ "/api/shared-previews/{slug}/files/{fileId}": {
26799
+ "get": {
26800
+ "operationId": "previewSharedFilesGet",
26801
+ "summary": "Read one file behind a public share link, by its id or its name. No credential needed.",
26802
+ "tags": ["preview"],
26803
+ "x-kosuke-command": ["preview", "shared-files", "get"],
26804
+ "parameters": [
26805
+ {
26806
+ "name": "slug",
26807
+ "in": "path",
26808
+ "required": true,
26809
+ "schema": {
26810
+ "type": "string",
26811
+ "minLength": 1,
26812
+ "maxLength": 64
26813
+ }
26814
+ },
26815
+ {
26816
+ "name": "fileId",
26817
+ "in": "path",
26818
+ "required": true,
26819
+ "description": "The file's id, the name its agent writes it under, or that name with its extension, such as `review` or `review.md`.",
26229
26820
  "schema": {
26230
26821
  "type": "string",
26231
26822
  "minLength": 1,
26232
- "description": "The artifact id, or its slug."
26823
+ "description": "The file's id, the name its agent writes it under, or that name with its extension, such as `review` or `review.md`."
26233
26824
  }
26234
26825
  }
26235
26826
  ],
@@ -26887,7 +27478,7 @@
26887
27478
  },
26888
27479
  "delete": {
26889
27480
  "operationId": "cronsDeletePersonal",
26890
- "summary": "Delete one of your Personal Crons with its runs, their transcripts and their Artifacts. A run still going is stopped first. Only you can, in the app or with your API key: a sandbox, a Cron Run, Sensei and a Connected App cannot. To keep it, pause it with enabled=false instead.",
27481
+ "summary": "Delete one of your Personal Crons with its runs and their transcripts. Their files stay in Personal Files. A run still going is stopped first. Only you can, in the app or with your API key: a sandbox, a Cron Run, Sensei and a Connected App cannot. To keep it, pause it with enabled=false instead.",
26891
27482
  "tags": ["crons"],
26892
27483
  "x-kosuke-command": ["crons", "delete"],
26893
27484
  "x-kosuke-variant": {
@@ -26942,7 +27533,8 @@
26942
27533
  "/api/user/crons/{cronId}/artifacts": {
26943
27534
  "get": {
26944
27535
  "operationId": "cronsArtifactsListPersonal",
26945
- "summary": "List the Artifacts a cron's runs published, across all of its runs, most recently changed first: each one's title, kind and version, with the run and the project it came from, and the total the filters keep. One row per Artifact: the same slug published by two runs is two rows. Rows only: a body or a file url comes from crons runs artifacts get, with the row's runId. The project and kind filters each take several values and keep an Artifact matching any of them.",
27536
+ "summary": "Use `crons files list`. List the files of the four kinds a cron's runs wrote, across all of its runs.",
27537
+ "deprecated": true,
26946
27538
  "tags": ["crons"],
26947
27539
  "x-kosuke-command": ["crons", "artifacts", "list"],
26948
27540
  "x-kosuke-variant": {
@@ -26966,9 +27558,122 @@
26966
27558
  "name": "projectId",
26967
27559
  "in": "query",
26968
27560
  "required": false,
26969
- "description": "Only the Artifacts of runs in these projects.",
27561
+ "description": "Only the files of runs in these projects.",
27562
+ "schema": {
27563
+ "description": "Only the files of runs in these projects.",
27564
+ "x-kosuke-flag": "project",
27565
+ "type": "array",
27566
+ "items": {
27567
+ "type": "string",
27568
+ "format": "uuid",
27569
+ "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)$"
27570
+ }
27571
+ }
27572
+ },
27573
+ {
27574
+ "name": "kind",
27575
+ "in": "query",
27576
+ "required": false,
27577
+ "description": "Only the files of these kinds.",
27578
+ "schema": {
27579
+ "description": "Only the files of these kinds.",
27580
+ "x-kosuke-flag": "kind",
27581
+ "type": "array",
27582
+ "items": {
27583
+ "type": "string",
27584
+ "enum": ["markdown", "html", "image", "video"]
27585
+ }
27586
+ }
27587
+ },
27588
+ {
27589
+ "name": "page",
27590
+ "in": "query",
27591
+ "required": false,
27592
+ "description": "1-based. Default 1.",
27593
+ "schema": {
27594
+ "description": "1-based. Default 1.",
27595
+ "type": "integer",
27596
+ "minimum": 1,
27597
+ "maximum": 9007199254740991
27598
+ }
27599
+ },
27600
+ {
27601
+ "name": "pageSize",
27602
+ "in": "query",
27603
+ "required": false,
27604
+ "description": "Default 25. Values above 100 are clamped, not rejected.",
27605
+ "schema": {
27606
+ "description": "Default 25. Values above 100 are clamped, not rejected.",
27607
+ "type": "integer",
27608
+ "minimum": 1,
27609
+ "maximum": 9007199254740991
27610
+ }
27611
+ }
27612
+ ],
27613
+ "responses": {
27614
+ "2XX": {
27615
+ "description": "Success envelope",
27616
+ "content": {
27617
+ "application/json": {
27618
+ "schema": {
27619
+ "$ref": "#/components/schemas/ApiSuccess"
27620
+ }
27621
+ }
27622
+ }
27623
+ },
27624
+ "4XX": {
27625
+ "description": "Error envelope",
27626
+ "content": {
27627
+ "application/json": {
27628
+ "schema": {
27629
+ "$ref": "#/components/schemas/ApiError"
27630
+ }
27631
+ }
27632
+ }
27633
+ },
27634
+ "5XX": {
27635
+ "description": "Error envelope",
27636
+ "content": {
27637
+ "application/json": {
27638
+ "schema": {
27639
+ "$ref": "#/components/schemas/ApiError"
27640
+ }
27641
+ }
27642
+ }
27643
+ }
27644
+ }
27645
+ }
27646
+ },
27647
+ "/api/user/crons/{cronId}/files": {
27648
+ "get": {
27649
+ "operationId": "cronsFilesListPersonal",
27650
+ "summary": "List the files a cron's runs wrote, across all of its runs, most recently changed first: each one's title, kind and version, with the run and the project it came from, and the total the filters keep. One row per file: the same name written by two runs is two rows. Rows only: a body or a file url comes from crons runs files get, with the row's runId. The project and kind filters each take several values and keep a file matching any of them.",
27651
+ "tags": ["crons"],
27652
+ "x-kosuke-command": ["crons", "files", "list"],
27653
+ "x-kosuke-variant": {
27654
+ "scope": "personal"
27655
+ },
27656
+ "x-kosuke-sandbox-token": true,
27657
+ "x-kosuke-cron-token": true,
27658
+ "x-kosuke-sensei-token": true,
27659
+ "parameters": [
27660
+ {
27661
+ "name": "cronId",
27662
+ "in": "path",
27663
+ "required": true,
27664
+ "schema": {
27665
+ "type": "string",
27666
+ "format": "uuid",
27667
+ "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)$"
27668
+ }
27669
+ },
27670
+ {
27671
+ "name": "projectId",
27672
+ "in": "query",
27673
+ "required": false,
27674
+ "description": "Only the files of runs in these projects.",
26970
27675
  "schema": {
26971
- "description": "Only the Artifacts of runs in these projects.",
27676
+ "description": "Only the files of runs in these projects.",
26972
27677
  "x-kosuke-flag": "project",
26973
27678
  "type": "array",
26974
27679
  "items": {
@@ -26982,9 +27687,9 @@
26982
27687
  "name": "kind",
26983
27688
  "in": "query",
26984
27689
  "required": false,
26985
- "description": "Only the Artifacts of these kinds.",
27690
+ "description": "Only the files of these kinds.",
26986
27691
  "schema": {
26987
- "description": "Only the Artifacts of these kinds.",
27692
+ "description": "Only the files of these kinds.",
26988
27693
  "x-kosuke-flag": "kind",
26989
27694
  "type": "array",
26990
27695
  "items": {
@@ -27210,7 +27915,7 @@
27210
27915
  "/api/user/crons/{cronId}/runs/{runId}": {
27211
27916
  "get": {
27212
27917
  "operationId": "cronsRunsGetPersonal",
27213
- "summary": "Read one Personal Cron run: its kind, status, Model, report, repositories and filed sessions. A sandbox run has its Cron Agent transcript and Artifacts and threadId null. A thread run names the Sensei Thread holding its Turn.",
27918
+ "summary": "Read one Personal Cron run: its kind, status, Model, report, repositories and filed sessions. A sandbox run has its Cron Agent transcript and files and threadId null. A thread run names the Sensei Thread holding its Turn.",
27214
27919
  "tags": ["crons"],
27215
27920
  "x-kosuke-command": ["crons", "runs", "get"],
27216
27921
  "x-kosuke-variant": {
@@ -27278,7 +27983,8 @@
27278
27983
  "/api/user/crons/{cronId}/runs/{runId}/artifacts": {
27279
27984
  "get": {
27280
27985
  "operationId": "cronsRunsArtifactsListPersonal",
27281
- "summary": "List the Artifacts a run of a cron published, most recently changed first. Rows only: a body or a file url comes from reading one.",
27986
+ "summary": "Use `crons runs files list`. List a run's files of the four kinds an agent writes.",
27987
+ "deprecated": true,
27282
27988
  "tags": ["crons"],
27283
27989
  "x-kosuke-command": ["crons", "runs", "artifacts", "list"],
27284
27990
  "x-kosuke-variant": {
@@ -27346,7 +28052,8 @@
27346
28052
  "/api/user/crons/{cronId}/runs/{runId}/artifacts/{artifactId}": {
27347
28053
  "get": {
27348
28054
  "operationId": "cronsRunsArtifactsGetPersonal",
27349
- "summary": "Read one Artifact of a run of a cron, by its id or its slug: a markdown or html one carries its body, an image or a video a presigned url, its media type and its size.",
28055
+ "summary": "Use `crons runs files get`. Read one file of a run by its id or its name: a deleted one, or one of another kind, is not found.",
28056
+ "deprecated": true,
27350
28057
  "tags": ["crons"],
27351
28058
  "x-kosuke-command": ["crons", "runs", "artifacts", "get"],
27352
28059
  "x-kosuke-variant": {
@@ -27380,11 +28087,158 @@
27380
28087
  "name": "artifactId",
27381
28088
  "in": "path",
27382
28089
  "required": true,
27383
- "description": "The artifact id, or its slug.",
28090
+ "description": "The id, or the name its agent writes it under.",
28091
+ "schema": {
28092
+ "type": "string",
28093
+ "minLength": 1,
28094
+ "description": "The id, or the name its agent writes it under."
28095
+ }
28096
+ }
28097
+ ],
28098
+ "responses": {
28099
+ "2XX": {
28100
+ "description": "Success envelope",
28101
+ "content": {
28102
+ "application/json": {
28103
+ "schema": {
28104
+ "$ref": "#/components/schemas/ApiSuccess"
28105
+ }
28106
+ }
28107
+ }
28108
+ },
28109
+ "4XX": {
28110
+ "description": "Error envelope",
28111
+ "content": {
28112
+ "application/json": {
28113
+ "schema": {
28114
+ "$ref": "#/components/schemas/ApiError"
28115
+ }
28116
+ }
28117
+ }
28118
+ },
28119
+ "5XX": {
28120
+ "description": "Error envelope",
28121
+ "content": {
28122
+ "application/json": {
28123
+ "schema": {
28124
+ "$ref": "#/components/schemas/ApiError"
28125
+ }
28126
+ }
28127
+ }
28128
+ }
28129
+ }
28130
+ }
28131
+ },
28132
+ "/api/user/crons/{cronId}/runs/{runId}/files": {
28133
+ "get": {
28134
+ "operationId": "cronsRunsFilesListPersonal",
28135
+ "summary": "List the files a run of a cron wrote, most recently changed first, a deleted one as a row that says who deleted it. Rows only: a body or a file url comes from reading one.",
28136
+ "tags": ["crons"],
28137
+ "x-kosuke-command": ["crons", "runs", "files", "list"],
28138
+ "x-kosuke-variant": {
28139
+ "scope": "personal"
28140
+ },
28141
+ "x-kosuke-sandbox-token": true,
28142
+ "x-kosuke-cron-token": true,
28143
+ "x-kosuke-sensei-token": true,
28144
+ "parameters": [
28145
+ {
28146
+ "name": "cronId",
28147
+ "in": "path",
28148
+ "required": true,
28149
+ "schema": {
28150
+ "type": "string",
28151
+ "format": "uuid",
28152
+ "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)$"
28153
+ }
28154
+ },
28155
+ {
28156
+ "name": "runId",
28157
+ "in": "path",
28158
+ "required": true,
28159
+ "schema": {
28160
+ "type": "string",
28161
+ "format": "uuid",
28162
+ "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)$"
28163
+ }
28164
+ }
28165
+ ],
28166
+ "responses": {
28167
+ "2XX": {
28168
+ "description": "Success envelope",
28169
+ "content": {
28170
+ "application/json": {
28171
+ "schema": {
28172
+ "$ref": "#/components/schemas/ApiSuccess"
28173
+ }
28174
+ }
28175
+ }
28176
+ },
28177
+ "4XX": {
28178
+ "description": "Error envelope",
28179
+ "content": {
28180
+ "application/json": {
28181
+ "schema": {
28182
+ "$ref": "#/components/schemas/ApiError"
28183
+ }
28184
+ }
28185
+ }
28186
+ },
28187
+ "5XX": {
28188
+ "description": "Error envelope",
28189
+ "content": {
28190
+ "application/json": {
28191
+ "schema": {
28192
+ "$ref": "#/components/schemas/ApiError"
28193
+ }
28194
+ }
28195
+ }
28196
+ }
28197
+ }
28198
+ }
28199
+ },
28200
+ "/api/user/crons/{cronId}/runs/{runId}/files/{fileId}": {
28201
+ "get": {
28202
+ "operationId": "cronsRunsFilesGetPersonal",
28203
+ "summary": "Read one file of a run of a cron, by its id or its name: a Markdown or HTML file carries its body, any other a presigned url, its media type and its size. A deleted one says who deleted it and holds no content.",
28204
+ "tags": ["crons"],
28205
+ "x-kosuke-command": ["crons", "runs", "files", "get"],
28206
+ "x-kosuke-variant": {
28207
+ "scope": "personal"
28208
+ },
28209
+ "x-kosuke-sandbox-token": true,
28210
+ "x-kosuke-cron-token": true,
28211
+ "x-kosuke-sensei-token": true,
28212
+ "parameters": [
28213
+ {
28214
+ "name": "cronId",
28215
+ "in": "path",
28216
+ "required": true,
28217
+ "schema": {
28218
+ "type": "string",
28219
+ "format": "uuid",
28220
+ "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)$"
28221
+ }
28222
+ },
28223
+ {
28224
+ "name": "runId",
28225
+ "in": "path",
28226
+ "required": true,
28227
+ "schema": {
28228
+ "type": "string",
28229
+ "format": "uuid",
28230
+ "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)$"
28231
+ }
28232
+ },
28233
+ {
28234
+ "name": "fileId",
28235
+ "in": "path",
28236
+ "required": true,
28237
+ "description": "The file's id, the name its agent writes it under, or that name with its extension, such as `review` or `review.md`.",
27384
28238
  "schema": {
27385
28239
  "type": "string",
27386
28240
  "minLength": 1,
27387
- "description": "The artifact id, or its slug."
28241
+ "description": "The file's id, the name its agent writes it under, or that name with its extension, such as `review` or `review.md`."
27388
28242
  }
27389
28243
  }
27390
28244
  ],
@@ -27659,7 +28513,7 @@
27659
28513
  },
27660
28514
  "patch": {
27661
28515
  "operationId": "filesMovePersonal",
27662
- "summary": "Rename an item of your personal Files with name, move it with parentId (null for the root), or both. Name clashes and moving a folder into its descendants are refused.",
28516
+ "summary": "Rename an item of your personal Files with name, move it with parentId (null for the root), or both. Name clashes and moving a folder into its descendants are refused. Folders Kosuke keeps and locked files refuse with 403.",
27663
28517
  "tags": ["files"],
27664
28518
  "x-kosuke-command": ["files", "move"],
27665
28519
  "x-kosuke-variant": {
@@ -27744,7 +28598,7 @@
27744
28598
  },
27745
28599
  "delete": {
27746
28600
  "operationId": "filesDeletePersonal",
27747
- "summary": "Delete a file of your personal Files, or a folder and every item inside it. Agents cannot delete Files.",
28601
+ "summary": "Delete a file of your personal Files, or a folder and every item inside it. Agents cannot delete Files. Folders Kosuke keeps and locked files refuse with 403.",
27748
28602
  "tags": ["files"],
27749
28603
  "x-kosuke-command": ["files", "delete"],
27750
28604
  "x-kosuke-variant": {