sim 2.2.12-preview.226.2 → 2.2.12-preview.228.1

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/dist/index.js CHANGED
@@ -8205,6 +8205,7 @@ function formatClientInfo(info) {
8205
8205
  var INTERNAL_AUTH_KINDS = new Set([
8206
8206
  "internal_jwt",
8207
8207
  "delegated",
8208
+ "resource_delegated",
8208
8209
  "organization_delegated",
8209
8210
  "system"
8210
8211
  ]);
@@ -9539,6 +9540,25 @@ var V2_OPERATIONS = {
9539
9540
  }
9540
9541
  }
9541
9542
  },
9543
+ abortProjectFileUpload: {
9544
+ method: "DELETE",
9545
+ path: "/api/v2/projects/[projectId]/files/uploads/[uploadId]",
9546
+ pathParams: ["projectId", "uploadId"],
9547
+ pathParamDocs: {
9548
+ projectId: "Project identifier.",
9549
+ uploadId: "Upload session identifier within the Project."
9550
+ },
9551
+ responseMode: "json",
9552
+ summary: "Abort Project file upload",
9553
+ workspaceKeyUnsupported: true,
9554
+ headers: {
9555
+ "upload-token": {
9556
+ kind: "string",
9557
+ required: true,
9558
+ describe: "Signed upload control token returned when the upload session was created."
9559
+ }
9560
+ }
9561
+ },
9542
9562
  activateWorkflowVersion: {
9543
9563
  method: "POST",
9544
9564
  path: "/api/v2/workflows/[workflowId]/versions/[version]/activate",
@@ -9691,6 +9711,23 @@ var V2_OPERATIONS = {
9691
9711
  }
9692
9712
  }
9693
9713
  },
9714
+ archiveProjectFileItems: {
9715
+ method: "POST",
9716
+ path: "/api/v2/projects/[projectId]/files/archive",
9717
+ pathParams: ["projectId"],
9718
+ pathParamDocs: { projectId: "Project identifier." },
9719
+ responseMode: "json",
9720
+ summary: "Archive Project File Items",
9721
+ workspaceKeyUnsupported: true,
9722
+ body: {
9723
+ fileIds: { kind: "array", default: [], describe: "Identifiers of the files to archive." },
9724
+ folderIds: {
9725
+ kind: "array",
9726
+ default: [],
9727
+ describe: "Identifiers of folders to archive recursively, including their files and descendants."
9728
+ }
9729
+ }
9730
+ },
9694
9731
  bulkAddPermissionGroupMembers: {
9695
9732
  method: "POST",
9696
9733
  path: "/api/v2/organizations/[organizationId]/permission-groups/[groupId]/members/bulk",
@@ -10065,6 +10102,25 @@ var V2_OPERATIONS = {
10065
10102
  }
10066
10103
  }
10067
10104
  },
10105
+ completeProjectFileUpload: {
10106
+ method: "POST",
10107
+ path: "/api/v2/projects/[projectId]/files/uploads/[uploadId]/complete",
10108
+ pathParams: ["projectId", "uploadId"],
10109
+ pathParamDocs: {
10110
+ projectId: "Project identifier.",
10111
+ uploadId: "Upload session identifier within the Project."
10112
+ },
10113
+ responseMode: "json",
10114
+ summary: "Complete Project file upload",
10115
+ workspaceKeyUnsupported: true,
10116
+ headers: {
10117
+ "upload-token": {
10118
+ kind: "string",
10119
+ required: true,
10120
+ describe: "Signed upload control token returned when the upload session was created."
10121
+ }
10122
+ }
10123
+ },
10068
10124
  completeTableImport: {
10069
10125
  method: "POST",
10070
10126
  path: "/api/v2/tables/imports/[importId]/complete",
@@ -10570,6 +10626,79 @@ var V2_OPERATIONS = {
10570
10626
  }
10571
10627
  }
10572
10628
  },
10629
+ createProjectFile: {
10630
+ method: "POST",
10631
+ path: "/api/v2/projects/[projectId]/files",
10632
+ pathParams: ["projectId"],
10633
+ pathParamDocs: { projectId: "Project identifier." },
10634
+ responseMode: "json",
10635
+ summary: "Create Project File",
10636
+ workspaceKeyUnsupported: true,
10637
+ body: {
10638
+ name: {
10639
+ kind: "string",
10640
+ required: true,
10641
+ describe: "File name, including its extension. Path separators and dot segments are rejected."
10642
+ },
10643
+ contentType: {
10644
+ kind: "string",
10645
+ describe: "MIME type. When omitted, it is inferred from the file extension."
10646
+ },
10647
+ content: {
10648
+ kind: "string",
10649
+ default: "",
10650
+ describe: "Initial file content. Omit or send an empty string for a zero-byte file. The complete JSON request is capped at 70 MiB, including UTF-8 encoding, escaping, base64, and the envelope. The decoded-file limit is 50 MiB. Use an upload session for larger payloads."
10651
+ },
10652
+ encoding: {
10653
+ kind: "enum",
10654
+ values: ["utf-8", "base64"],
10655
+ default: "utf-8",
10656
+ describe: "Encoding of the content field."
10657
+ },
10658
+ folderPath: {
10659
+ kind: "string",
10660
+ describe: "Canonical containing-folder path. Omit for the Project root."
10661
+ }
10662
+ }
10663
+ },
10664
+ createProjectFileFolder: {
10665
+ method: "POST",
10666
+ path: "/api/v2/projects/[projectId]/files/folders",
10667
+ pathParams: ["projectId"],
10668
+ pathParamDocs: { projectId: "Project identifier." },
10669
+ responseMode: "json",
10670
+ summary: "Create Project file folder",
10671
+ workspaceKeyUnsupported: true,
10672
+ body: {
10673
+ name: { kind: "string", required: true, describe: "Name for the new folder." },
10674
+ parentId: {
10675
+ kind: "string",
10676
+ describe: "Parent folder identifier; omit or use null for the root."
10677
+ }
10678
+ }
10679
+ },
10680
+ createProjectFileUpload: {
10681
+ method: "POST",
10682
+ path: "/api/v2/projects/[projectId]/files/uploads",
10683
+ pathParams: ["projectId"],
10684
+ pathParamDocs: { projectId: "Project identifier." },
10685
+ responseMode: "json",
10686
+ summary: "Create Project file upload",
10687
+ workspaceKeyUnsupported: true,
10688
+ body: {
10689
+ name: { kind: "string", required: true, describe: "File name, including its extension." },
10690
+ contentType: { kind: "string", required: true, describe: "MIME type of the uploaded file." },
10691
+ size: { kind: "integer", required: true, describe: "Exact file size in bytes." },
10692
+ folderPath: {
10693
+ kind: "string",
10694
+ describe: "Canonical destination folder path. Specify either folderId or folderPath, not both."
10695
+ },
10696
+ folderId: {
10697
+ kind: "string",
10698
+ describe: "Destination folder identifier; omit or use null for the Project root."
10699
+ }
10700
+ }
10701
+ },
10573
10702
  createSandbox: {
10574
10703
  method: "POST",
10575
10704
  path: "/api/v2/sandboxes",
@@ -11196,6 +11325,19 @@ var V2_OPERATIONS = {
11196
11325
  summary: "Delete permission group",
11197
11326
  workspaceKeyUnsupported: true
11198
11327
  },
11328
+ deleteProjectFileVersion: {
11329
+ method: "DELETE",
11330
+ path: "/api/v2/projects/[projectId]/files/[fileId]/versions/[version]",
11331
+ pathParams: ["projectId", "fileId", "version"],
11332
+ pathParamDocs: {
11333
+ projectId: "Project identifier.",
11334
+ fileId: "File identifier within the Project.",
11335
+ version: "Version number."
11336
+ },
11337
+ responseMode: "json",
11338
+ summary: "Delete Project File Version",
11339
+ workspaceKeyUnsupported: true
11340
+ },
11199
11341
  deleteSandbox: {
11200
11342
  method: "DELETE",
11201
11343
  path: "/api/v2/sandboxes/[sandboxId]",
@@ -12253,6 +12395,76 @@ var V2_OPERATIONS = {
12253
12395
  summary: "Get permission group",
12254
12396
  workspaceKeyUnsupported: true
12255
12397
  },
12398
+ getProjectFileMetadata: {
12399
+ method: "GET",
12400
+ path: "/api/v2/projects/[projectId]/files/[fileId]/metadata",
12401
+ pathParams: ["projectId", "fileId"],
12402
+ pathParamDocs: {
12403
+ projectId: "Project identifier.",
12404
+ fileId: "File identifier within the Project."
12405
+ },
12406
+ responseMode: "json",
12407
+ summary: "Get Project File Metadata",
12408
+ workspaceKeyUnsupported: true
12409
+ },
12410
+ getProjectFileUpload: {
12411
+ method: "GET",
12412
+ path: "/api/v2/projects/[projectId]/files/uploads/[uploadId]",
12413
+ pathParams: ["projectId", "uploadId"],
12414
+ pathParamDocs: {
12415
+ projectId: "Project identifier.",
12416
+ uploadId: "Upload session identifier within the Project."
12417
+ },
12418
+ responseMode: "json",
12419
+ summary: "Get Project file upload",
12420
+ workspaceKeyUnsupported: true,
12421
+ headers: {
12422
+ "upload-token": {
12423
+ kind: "string",
12424
+ required: true,
12425
+ describe: "Signed upload control token returned when the upload session was created."
12426
+ }
12427
+ }
12428
+ },
12429
+ getProjectFileUploadPartUrls: {
12430
+ method: "POST",
12431
+ path: "/api/v2/projects/[projectId]/files/uploads/[uploadId]/parts",
12432
+ pathParams: ["projectId", "uploadId"],
12433
+ pathParamDocs: {
12434
+ projectId: "Project identifier.",
12435
+ uploadId: "Upload session identifier within the Project."
12436
+ },
12437
+ responseMode: "json",
12438
+ summary: "Get Project file upload part URLs",
12439
+ workspaceKeyUnsupported: true,
12440
+ body: {
12441
+ partNumbers: {
12442
+ kind: "array",
12443
+ required: true,
12444
+ describe: "Multipart part numbers for which signed URLs should be created."
12445
+ }
12446
+ },
12447
+ headers: {
12448
+ "upload-token": {
12449
+ kind: "string",
12450
+ required: true,
12451
+ describe: "Signed upload control token returned when the upload session was created."
12452
+ }
12453
+ }
12454
+ },
12455
+ getProjectFileVersion: {
12456
+ method: "GET",
12457
+ path: "/api/v2/projects/[projectId]/files/[fileId]/versions/[version]",
12458
+ pathParams: ["projectId", "fileId", "version"],
12459
+ pathParamDocs: {
12460
+ projectId: "Project identifier.",
12461
+ fileId: "File identifier within the Project.",
12462
+ version: "Version number."
12463
+ },
12464
+ responseMode: "json",
12465
+ summary: "Get Project File Version",
12466
+ workspaceKeyUnsupported: true
12467
+ },
12256
12468
  getRowEnrichment: {
12257
12469
  method: "GET",
12258
12470
  path: "/api/v2/tables/[tableId]/rows/[rowId]/enrichment/[groupId]",
@@ -14261,6 +14473,122 @@ var V2_OPERATIONS = {
14261
14473
  }
14262
14474
  }
14263
14475
  },
14476
+ listProjectFileFolders: {
14477
+ method: "GET",
14478
+ path: "/api/v2/projects/[projectId]/files/folders",
14479
+ pathParams: ["projectId"],
14480
+ pathParamDocs: { projectId: "Project identifier." },
14481
+ responseMode: "json",
14482
+ summary: "List Project file folders",
14483
+ workspaceKeyUnsupported: true,
14484
+ query: {
14485
+ scope: {
14486
+ kind: "enum",
14487
+ values: ["active", "archived", "all"],
14488
+ default: "active",
14489
+ describe: "Folder lifecycle scope."
14490
+ }
14491
+ }
14492
+ },
14493
+ listProjectFiles: {
14494
+ method: "GET",
14495
+ path: "/api/v2/projects/[projectId]/files",
14496
+ pathParams: ["projectId"],
14497
+ pathParamDocs: { projectId: "Project identifier." },
14498
+ responseMode: "json",
14499
+ summary: "List Project Files",
14500
+ workspaceKeyUnsupported: true,
14501
+ query: {
14502
+ folderPath: {
14503
+ kind: "string",
14504
+ describe: "Restrict files to this folder, including subfolders when `recursive` is true. Unknown folder paths contribute no matches."
14505
+ },
14506
+ recursive: {
14507
+ kind: "enum",
14508
+ values: [
14509
+ "true",
14510
+ "1",
14511
+ "yes",
14512
+ "on",
14513
+ "y",
14514
+ "enabled",
14515
+ "false",
14516
+ "0",
14517
+ "no",
14518
+ "off",
14519
+ "n",
14520
+ "disabled"
14521
+ ],
14522
+ describe: "Include subfolders in the folder filter. Defaults to true when searching and false otherwise. Ignored without a folder filter."
14523
+ },
14524
+ scope: {
14525
+ kind: "enum",
14526
+ values: ["active", "archived"],
14527
+ default: "active",
14528
+ describe: "Which lifecycle set to list: `active` (default) for live files, `archived` for files a delete soft-deleted. `folderPath` resolves against active folders only, so pairing it with `scope=archived` returns an empty page when the containing folder was archived too."
14529
+ },
14530
+ search: {
14531
+ kind: "string",
14532
+ describe: "Case-insensitive substring match against the file name."
14533
+ },
14534
+ sortBy: {
14535
+ kind: "enum",
14536
+ values: ["name", "size", "uploadedAt", "updatedAt"],
14537
+ default: "uploadedAt",
14538
+ describe: "Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`."
14539
+ },
14540
+ sortOrder: {
14541
+ kind: "enum",
14542
+ values: ["asc", "desc"],
14543
+ default: "asc",
14544
+ describe: "Sort direction."
14545
+ },
14546
+ limit: {
14547
+ kind: "integer",
14548
+ default: 100,
14549
+ describe: "Maximum files per page. Must be a whole number from 1 to 1000. Defaults to 100."
14550
+ },
14551
+ cursor: {
14552
+ kind: "string",
14553
+ describe: "Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor."
14554
+ }
14555
+ }
14556
+ },
14557
+ listProjectFileVersions: {
14558
+ method: "GET",
14559
+ path: "/api/v2/projects/[projectId]/files/[fileId]/versions",
14560
+ pathParams: ["projectId", "fileId"],
14561
+ pathParamDocs: {
14562
+ projectId: "Project identifier.",
14563
+ fileId: "File identifier within the Project."
14564
+ },
14565
+ responseMode: "json",
14566
+ summary: "List Project File Versions",
14567
+ workspaceKeyUnsupported: true,
14568
+ query: {
14569
+ sortBy: {
14570
+ kind: "enum",
14571
+ values: ["version"],
14572
+ default: "version",
14573
+ describe: "Field used to sort the result."
14574
+ },
14575
+ sortOrder: {
14576
+ kind: "enum",
14577
+ values: ["asc", "desc"],
14578
+ default: "desc",
14579
+ describe: "Sort direction."
14580
+ },
14581
+ limit: {
14582
+ kind: "integer",
14583
+ default: 50,
14584
+ describe: "Maximum versions to return per page. Must be a whole number from 1 to 100. Defaults to 50."
14585
+ },
14586
+ cursor: {
14587
+ kind: "string",
14588
+ describe: "Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor."
14589
+ }
14590
+ }
14591
+ },
14264
14592
  listSandboxes: {
14265
14593
  method: "GET",
14266
14594
  path: "/api/v2/sandboxes",
@@ -15134,6 +15462,27 @@ var V2_OPERATIONS = {
15134
15462
  }
15135
15463
  }
15136
15464
  },
15465
+ moveProjectFileItems: {
15466
+ method: "POST",
15467
+ path: "/api/v2/projects/[projectId]/files/move",
15468
+ pathParams: ["projectId"],
15469
+ pathParamDocs: { projectId: "Project identifier." },
15470
+ responseMode: "json",
15471
+ summary: "Move Project File Items",
15472
+ workspaceKeyUnsupported: true,
15473
+ body: {
15474
+ fileIds: { kind: "array", default: [], describe: "Identifiers of the files to move." },
15475
+ folderIds: {
15476
+ kind: "array",
15477
+ default: [],
15478
+ describe: "Identifiers of folders to move with their contents."
15479
+ },
15480
+ targetFolderPath: {
15481
+ kind: "string",
15482
+ describe: "Existing destination folder path within the Project. Omit to move items to the Project root."
15483
+ }
15484
+ }
15485
+ },
15137
15486
  moveTables: {
15138
15487
  method: "POST",
15139
15488
  path: "/api/v2/tables/move",
@@ -15506,6 +15855,31 @@ var V2_OPERATIONS = {
15506
15855
  }
15507
15856
  }
15508
15857
  },
15858
+ readProjectFileContent: {
15859
+ method: "GET",
15860
+ path: "/api/v2/projects/[projectId]/files/[fileId]/content",
15861
+ pathParams: ["projectId", "fileId"],
15862
+ pathParamDocs: {
15863
+ projectId: "Project identifier.",
15864
+ fileId: "File identifier within the Project."
15865
+ },
15866
+ responseMode: "binary",
15867
+ summary: "Read Project File Source",
15868
+ workspaceKeyUnsupported: true
15869
+ },
15870
+ readProjectFileVersionContent: {
15871
+ method: "GET",
15872
+ path: "/api/v2/projects/[projectId]/files/[fileId]/versions/[version]/content",
15873
+ pathParams: ["projectId", "fileId", "version"],
15874
+ pathParamDocs: {
15875
+ projectId: "Project identifier.",
15876
+ fileId: "File identifier within the Project.",
15877
+ version: "Version number."
15878
+ },
15879
+ responseMode: "binary",
15880
+ summary: "Read Project File Version Content",
15881
+ workspaceKeyUnsupported: true
15882
+ },
15509
15883
  relocateFileFolder: {
15510
15884
  method: "PATCH",
15511
15885
  path: "/api/v2/files/folders",
@@ -15638,6 +16012,21 @@ var V2_OPERATIONS = {
15638
16012
  name: { kind: "string", required: true, describe: "New file name, including its extension." }
15639
16013
  }
15640
16014
  },
16015
+ renameProjectFile: {
16016
+ method: "PATCH",
16017
+ path: "/api/v2/projects/[projectId]/files/[fileId]",
16018
+ pathParams: ["projectId", "fileId"],
16019
+ pathParamDocs: {
16020
+ projectId: "Project identifier.",
16021
+ fileId: "File identifier within the Project."
16022
+ },
16023
+ responseMode: "json",
16024
+ summary: "Rename Project File",
16025
+ workspaceKeyUnsupported: true,
16026
+ body: {
16027
+ name: { kind: "string", required: true, describe: "New file name, including its extension." }
16028
+ }
16029
+ },
15641
16030
  replaceWorkflowChatDeployment: {
15642
16031
  method: "PUT",
15643
16032
  path: "/api/v2/workflows/[workflowId]/deployments/chat",
@@ -15848,6 +16237,32 @@ var V2_OPERATIONS = {
15848
16237
  }
15849
16238
  }
15850
16239
  },
16240
+ restoreProjectFile: {
16241
+ method: "POST",
16242
+ path: "/api/v2/projects/[projectId]/files/[fileId]/restore",
16243
+ pathParams: ["projectId", "fileId"],
16244
+ pathParamDocs: {
16245
+ projectId: "Project identifier.",
16246
+ fileId: "File identifier within the Project."
16247
+ },
16248
+ responseMode: "json",
16249
+ summary: "Restore Project File",
16250
+ workspaceKeyUnsupported: true,
16251
+ body: {}
16252
+ },
16253
+ restoreProjectFileFolder: {
16254
+ method: "POST",
16255
+ path: "/api/v2/projects/[projectId]/files/folders/[folderId]/restore",
16256
+ pathParams: ["projectId", "folderId"],
16257
+ pathParamDocs: {
16258
+ projectId: "Project identifier.",
16259
+ folderId: "Folder identifier within the Project."
16260
+ },
16261
+ responseMode: "json",
16262
+ summary: "Restore Project file folder",
16263
+ workspaceKeyUnsupported: true,
16264
+ body: {}
16265
+ },
15851
16266
  restoreTable: {
15852
16267
  method: "POST",
15853
16268
  path: "/api/v2/tables/[tableId]/restore",
@@ -15924,6 +16339,29 @@ var V2_OPERATIONS = {
15924
16339
  }
15925
16340
  }
15926
16341
  },
16342
+ revertProjectFileVersion: {
16343
+ method: "POST",
16344
+ path: "/api/v2/projects/[projectId]/files/[fileId]/versions/[version]/revert",
16345
+ pathParams: ["projectId", "fileId", "version"],
16346
+ pathParamDocs: {
16347
+ projectId: "Project identifier.",
16348
+ fileId: "File identifier within the Project.",
16349
+ version: "Version number."
16350
+ },
16351
+ responseMode: "json",
16352
+ summary: "Revert Project File Version",
16353
+ workspaceKeyUnsupported: true,
16354
+ body: {
16355
+ expectedCurrentVersion: {
16356
+ kind: "integer",
16357
+ describe: "Revert only while this is still the current version; otherwise the request fails with `409`. Omit to revert whatever is current. Collaborative edits and repeated workflow writes that fold into the current version keep its number, so prefer `expectedRevision` to guard content."
16358
+ },
16359
+ expectedRevision: {
16360
+ kind: "string",
16361
+ describe: "Revert only while the file still holds the content this revision names, as returned by Get file metadata or an earlier write; otherwise the request fails with `409`. Unlike a version number, it also catches edits that folded into the current version."
16362
+ }
16363
+ }
16364
+ },
15927
16365
  revertWorkflowVersion: {
15928
16366
  method: "POST",
15929
16367
  path: "/api/v2/workflows/[workflowId]/versions/[version]/revert",
@@ -16934,6 +17372,55 @@ var V2_OPERATIONS = {
16934
17372
  }
16935
17373
  }
16936
17374
  },
17375
+ updateProjectFileContent: {
17376
+ method: "PUT",
17377
+ path: "/api/v2/projects/[projectId]/files/[fileId]/content",
17378
+ pathParams: ["projectId", "fileId"],
17379
+ pathParamDocs: {
17380
+ projectId: "Project identifier.",
17381
+ fileId: "File identifier within the Project."
17382
+ },
17383
+ responseMode: "json",
17384
+ summary: "Replace Project File Content",
17385
+ workspaceKeyUnsupported: true,
17386
+ body: {
17387
+ content: {
17388
+ kind: "string",
17389
+ required: true,
17390
+ describe: "Complete replacement content for the file. The complete JSON request is capped at 70 MiB, including UTF-8 encoding, escaping, base64, and the envelope. The decoded-file limit is 50 MiB."
17391
+ },
17392
+ encoding: {
17393
+ kind: "enum",
17394
+ values: ["utf-8", "base64"],
17395
+ default: "utf-8",
17396
+ describe: "Encoding of the content field."
17397
+ },
17398
+ expectedRevision: {
17399
+ kind: "string",
17400
+ describe: "Revision from Get file metadata or an earlier write; the request is refused with `409` when the content moved on."
17401
+ }
17402
+ }
17403
+ },
17404
+ updateProjectFileFolder: {
17405
+ method: "PATCH",
17406
+ path: "/api/v2/projects/[projectId]/files/folders/[folderId]",
17407
+ pathParams: ["projectId", "folderId"],
17408
+ pathParamDocs: {
17409
+ projectId: "Project identifier.",
17410
+ folderId: "Folder identifier within the Project."
17411
+ },
17412
+ responseMode: "json",
17413
+ summary: "Update Project file folder",
17414
+ workspaceKeyUnsupported: true,
17415
+ body: {
17416
+ name: { kind: "string", describe: "New folder name; omit to leave unchanged." },
17417
+ parentId: {
17418
+ kind: "string",
17419
+ describe: "New parent folder identifier; null moves to the root, omission leaves the parent unchanged."
17420
+ },
17421
+ sortOrder: { kind: "integer", describe: "New manual position; omit to leave unchanged." }
17422
+ }
17423
+ },
16937
17424
  updateRowsByFilter: {
16938
17425
  method: "PATCH",
16939
17426
  path: "/api/v2/tables/[tableId]/rows",
@@ -18206,6 +18693,13 @@ var ACCESS_REQUEST_COLUMNS = [
18206
18693
  { header: "requester", path: "requester.email" },
18207
18694
  { header: "created", path: "createdAt", format: "timestamp" }
18208
18695
  ];
18696
+ var FILE_SHARE_FIELDS = [
18697
+ { header: "shared", path: "isActive", format: "bool" },
18698
+ { header: "URL", path: "url" },
18699
+ { header: "auth", path: "authType" },
18700
+ { header: "password set", path: "hasPassword", format: "bool" },
18701
+ { header: "allowed emails", path: "allowedEmails", format: "count" }
18702
+ ];
18209
18703
  var TABLE_NAME_HELP = "Identifier: letters, numbers, and underscores; cannot start with a number";
18210
18704
  var TABLE_FILTER_HELP = 'Predicate: {"all":[{"field":"status","op":"eq","value":"active"}]}; groups use all/any. Operators: eq, ne, gt, gte, lt, lte, in, nin, contains, ncontains, startsWith, endsWith, like, ilike, nlike, nilike, isEmpty, isNotEmpty, isNull, isNotNull';
18211
18705
  var TABLE_READ_FILTER_HELP = 'Condition: {"field":"status","op":"eq","value":"active"}. Groups: {"all":[{"field":"status","op":"eq","value":"active"}]} or {"any":[{"field":"status","op":"eq","value":"active"}]}; group entries may also be nested groups. Operators: eq, ne, gt, gte, lt, lte, in, nin, contains, ncontains, startsWith, endsWith, like, ilike, nlike, nilike, isEmpty, isNotEmpty, isNull, isNotNull';
@@ -18257,6 +18751,39 @@ var FOLDER_LIST_COLUMNS = [
18257
18751
  { header: "parent", path: "parentPath", format: "folder-path" },
18258
18752
  { header: "updated", path: "updatedAt", format: "timestamp" }
18259
18753
  ];
18754
+ var FILE_VERSION_COLUMNS = [
18755
+ { header: "version" },
18756
+ { header: "current", path: "isCurrent", format: "bool" },
18757
+ { header: "source" },
18758
+ { header: "size", format: "bytes" },
18759
+ { header: "authors", format: "people" },
18760
+ { header: "created", path: "createdAt", format: "timestamp" },
18761
+ { header: "superseded", path: "supersededAt", format: "timestamp" }
18762
+ ];
18763
+ var FILE_VERSION_FIELDS = [
18764
+ { header: "file", path: "fileId" },
18765
+ { header: "version" },
18766
+ { header: "current", path: "isCurrent", format: "bool" },
18767
+ { header: "source" },
18768
+ { header: "restored from", path: "restoredFromVersion" },
18769
+ { header: "size", format: "bytes" },
18770
+ { header: "type", path: "contentType" },
18771
+ { header: "authors", format: "people" },
18772
+ { header: "created", path: "createdAt", format: "timestamp" },
18773
+ { header: "updated", path: "updatedAt", format: "timestamp" },
18774
+ { header: "superseded", path: "supersededAt", format: "timestamp" }
18775
+ ];
18776
+ var FILE_REVERT_FIELDS = [
18777
+ { header: "reverted", format: "bool" },
18778
+ { header: "file", path: "file.id" },
18779
+ { header: "name", path: "file.name" },
18780
+ { header: "version", path: "version.version" },
18781
+ { header: "source", path: "version.source" },
18782
+ { header: "restored from", path: "version.restoredFromVersion" },
18783
+ { header: "size", path: "version.size", format: "bytes" },
18784
+ { header: "authors", path: "version.authors", format: "people" },
18785
+ { header: "created", path: "version.createdAt", format: "timestamp" }
18786
+ ];
18260
18787
  function moveResource(command, resource) {
18261
18788
  return {
18262
18789
  command,
@@ -18729,6 +19256,41 @@ var CLI_CONTRACT = {
18729
19256
  }
18730
19257
  }
18731
19258
  },
19259
+ renameProjectFile: { command: "projects files rename" },
19260
+ listProjectFileFolders: {
19261
+ command: "projects files folders list",
19262
+ columns: [{ header: "id" }, { header: "name" }, { header: "parent", path: "parentId" }]
19263
+ },
19264
+ createProjectFileFolder: { command: "projects files folders create" },
19265
+ updateProjectFileFolder: { command: "projects files folders update" },
19266
+ restoreProjectFileFolder: { command: "projects files folders restore" },
19267
+ moveProjectFileItems: {
19268
+ command: "projects files move",
19269
+ flags: {
19270
+ fileIds: { list: true },
19271
+ folderIds: { list: true },
19272
+ targetFolderPath: TARGET_FOLDER_PATH_FLAG
19273
+ }
19274
+ },
19275
+ archiveProjectFileItems: {
19276
+ command: "projects files archive",
19277
+ confirm: "This archives the selected Project files and folders, including folder contents.",
19278
+ flags: { fileIds: { list: true }, folderIds: { list: true } }
19279
+ },
19280
+ restoreProjectFile: { command: "projects files restore" },
19281
+ createProjectFile: {
19282
+ command: "projects files create",
19283
+ flags: { folderPath: FOLDER_PATH_FLAG }
19284
+ },
19285
+ updateProjectFileContent: {
19286
+ command: "projects files set-content",
19287
+ describe: "Replace a shared Project file’s contents",
19288
+ flags: { encoding: { choices: ["utf-8", "base64"], describe: "Content encoding" } }
19289
+ },
19290
+ readProjectFileContent: {
19291
+ command: "projects files source",
19292
+ describe: "Download the stored source bytes of a Project file"
19293
+ },
18732
19294
  createKnowledgeBase: { flags: { folderPath: FOLDER_PATH_FLAG } },
18733
19295
  updateKnowledgeBase: {
18734
19296
  variants: [moveResource("knowledge mv", "knowledge base")],
@@ -18856,6 +19418,26 @@ var CLI_CONTRACT = {
18856
19418
  { header: "uploaded", path: "uploadedAt", format: "timestamp" }
18857
19419
  ]
18858
19420
  },
19421
+ listProjectFiles: {
19422
+ command: "projects files list",
19423
+ flags: {
19424
+ folderPath: FOLDER_PATH_FLAG,
19425
+ recursive: { boolean: true, negatable: true }
19426
+ },
19427
+ columns: [
19428
+ { header: "id" },
19429
+ { header: "name" },
19430
+ FOLDER_COLUMN,
19431
+ { header: "size", format: "bytes" },
19432
+ { header: "type" },
19433
+ { header: "creator", path: "uploadedBy" },
19434
+ { header: "uploaded", path: "uploadedAt", format: "timestamp" }
19435
+ ]
19436
+ },
19437
+ getProjectFileMetadata: {
19438
+ command: "projects files describe",
19439
+ describe: "Show Project file metadata and ownership"
19440
+ },
18859
19441
  listTableRows: { expand: "data" },
18860
19442
  listKnowledgeBases: {
18861
19443
  flags: { folderPath: FOLDER_PATH_FLAG },
@@ -19387,32 +19969,12 @@ var CLI_CONTRACT = {
19387
19969
  listFileVersions: {
19388
19970
  command: "files versions list",
19389
19971
  describe: "List the recorded versions of a file",
19390
- columns: [
19391
- { header: "version" },
19392
- { header: "current", path: "isCurrent", format: "bool" },
19393
- { header: "source" },
19394
- { header: "size", format: "bytes" },
19395
- { header: "authors", format: "people" },
19396
- { header: "created", path: "createdAt", format: "timestamp" },
19397
- { header: "superseded", path: "supersededAt", format: "timestamp" }
19398
- ]
19972
+ columns: FILE_VERSION_COLUMNS
19399
19973
  },
19400
19974
  getFileVersion: {
19401
19975
  command: "files versions describe",
19402
19976
  describe: "Show the metadata of one version of a file",
19403
- fields: [
19404
- { header: "file", path: "fileId" },
19405
- { header: "version" },
19406
- { header: "current", path: "isCurrent", format: "bool" },
19407
- { header: "source" },
19408
- { header: "restored from", path: "restoredFromVersion" },
19409
- { header: "size", format: "bytes" },
19410
- { header: "type", path: "contentType" },
19411
- { header: "authors", format: "people" },
19412
- { header: "created", path: "createdAt", format: "timestamp" },
19413
- { header: "updated", path: "updatedAt", format: "timestamp" },
19414
- { header: "superseded", path: "supersededAt", format: "timestamp" }
19415
- ]
19977
+ fields: FILE_VERSION_FIELDS
19416
19978
  },
19417
19979
  readFileVersionText: {
19418
19980
  command: "files versions read",
@@ -19422,23 +19984,37 @@ var CLI_CONTRACT = {
19422
19984
  revertFileVersion: {
19423
19985
  command: "files versions revert",
19424
19986
  describe: "Make a previous version of a file current again",
19425
- fields: [
19426
- { header: "reverted", format: "bool" },
19427
- { header: "file", path: "file.id" },
19428
- { header: "name", path: "file.name" },
19429
- { header: "version", path: "version.version" },
19430
- { header: "source", path: "version.source" },
19431
- { header: "restored from", path: "version.restoredFromVersion" },
19432
- { header: "size", path: "version.size", format: "bytes" },
19433
- { header: "authors", path: "version.authors", format: "people" },
19434
- { header: "created", path: "version.createdAt", format: "timestamp" }
19435
- ]
19987
+ fields: FILE_REVERT_FIELDS
19436
19988
  },
19437
19989
  deleteFileVersion: {
19438
19990
  command: "files versions delete",
19439
19991
  describe: "Permanently delete a previous version of a file",
19440
19992
  confirm: "This permanently removes the version from history and schedules deletion of its stored content; storage cleanup may retry in the background."
19441
19993
  },
19994
+ listProjectFileVersions: {
19995
+ command: "projects files versions list",
19996
+ describe: "List the recorded versions of a shared Project file",
19997
+ columns: FILE_VERSION_COLUMNS
19998
+ },
19999
+ getProjectFileVersion: {
20000
+ command: "projects files versions describe",
20001
+ describe: "Show the metadata of one version of a shared Project file",
20002
+ fields: FILE_VERSION_FIELDS
20003
+ },
20004
+ readProjectFileVersionContent: {
20005
+ command: "projects files versions source",
20006
+ describe: "Download the stored source bytes of a Project file version"
20007
+ },
20008
+ revertProjectFileVersion: {
20009
+ command: "projects files versions revert",
20010
+ describe: "Make a previous version of a shared Project file current again",
20011
+ fields: FILE_REVERT_FIELDS
20012
+ },
20013
+ deleteProjectFileVersion: {
20014
+ command: "projects files versions delete",
20015
+ describe: "Permanently delete a previous version of a shared Project file",
20016
+ confirm: "This permanently deletes the version and its stored content."
20017
+ },
19442
20018
  restoreFileFolder: {
19443
20019
  command: "files folders restore",
19444
20020
  positionals: ["path"],
@@ -19527,13 +20103,7 @@ var CLI_CONTRACT = {
19527
20103
  getFileShare: {
19528
20104
  command: "files share get",
19529
20105
  describe: "Show a file’s share settings",
19530
- fields: [
19531
- { header: "shared", path: "isActive", format: "bool" },
19532
- { header: "URL", path: "url" },
19533
- { header: "auth", path: "authType" },
19534
- { header: "password set", path: "hasPassword", format: "bool" },
19535
- { header: "allowed emails", path: "allowedEmails", format: "count" }
19536
- ]
20106
+ fields: FILE_SHARE_FIELDS
19537
20107
  },
19538
20108
  upsertFileShare: {
19539
20109
  command: "files share set",
@@ -19541,13 +20111,7 @@ var CLI_CONTRACT = {
19541
20111
  flags: {
19542
20112
  allowedEmails: { list: true }
19543
20113
  },
19544
- fields: [
19545
- { header: "shared", path: "isActive", format: "bool" },
19546
- { header: "URL", path: "url" },
19547
- { header: "auth", path: "authType" },
19548
- { header: "password set", path: "hasPassword", format: "bool" },
19549
- { header: "allowed emails", path: "allowedEmails", format: "count" }
19550
- ]
20114
+ fields: FILE_SHARE_FIELDS
19551
20115
  },
19552
20116
  listFileFolders: {
19553
20117
  describe: "List folders",
@@ -19890,6 +20454,11 @@ var CLI_CONTRACT = {
19890
20454
  completeKnowledgeDocumentUpload: { hidden: true },
19891
20455
  abortKnowledgeDocumentUpload: { hidden: true },
19892
20456
  createFileUpload: { hidden: true },
20457
+ createProjectFileUpload: { hidden: true },
20458
+ getProjectFileUpload: { hidden: true },
20459
+ abortProjectFileUpload: { hidden: true },
20460
+ completeProjectFileUpload: { hidden: true },
20461
+ getProjectFileUploadPartUrls: { hidden: true },
19893
20462
  createFileUploadPartUrls: { hidden: true },
19894
20463
  completeFileUpload: { hidden: true },
19895
20464
  abortFileUpload: { hidden: true },
@@ -20824,6 +21393,7 @@ var COMPLETE_LIST_OPERATIONS = new Set([
20824
21393
  "listOrganizationMembers",
20825
21394
  "listOrganizationWorkspaces",
20826
21395
  "listFiles",
21396
+ "listProjectFiles",
20827
21397
  "listKnowledgeBases",
20828
21398
  "listKnowledgeConnectors",
20829
21399
  "listMcpServers",
@@ -21024,6 +21594,15 @@ var BULK_OUTCOME_CHECKS = {
21024
21594
  return null;
21025
21595
  return `Deleted nothing: none of the ${requested} requested ${requested === 1 ? "file was" : "files were"} deleted.`;
21026
21596
  },
21597
+ archiveProjectFileItems: (payload, body) => {
21598
+ const items = payload.deletedItems;
21599
+ if (countOf(items?.files) + countOf(items?.folders) > 0)
21600
+ return null;
21601
+ const requested = lengthOf(body?.fileIds) + lengthOf(body?.folderIds);
21602
+ if (requested === 0)
21603
+ return null;
21604
+ return `Archived nothing: none of the ${requested} requested ${requested === 1 ? "item was" : "items were"} archived.`;
21605
+ },
21027
21606
  addWorkspaceFilesToKnowledgeBase: (payload) => {
21028
21607
  if (lengthOf(payload.added) > 0)
21029
21608
  return null;
@@ -22108,17 +22687,17 @@ function isTerminalSafeContentType(contentType) {
22108
22687
  "image/svg+xml"
22109
22688
  ].includes(mediaType);
22110
22689
  }
22111
- async function downloadToOutput(connectDownload, operation, params, options) {
22690
+ async function downloadToOutput(connect, operation, pathParams, options, scope, requestInput = {}) {
22112
22691
  const target = options.outputFile;
22113
22692
  const writesToStdout = target === undefined || target === "-";
22114
22693
  if (writesToStdout && options.force) {
22115
22694
  throw new SimApiError("--force requires --output-file <path>", 0);
22116
22695
  }
22117
- const { client, profile } = connectDownload();
22118
- const workspaceId = client.requireWorkspace();
22696
+ const { client, profile } = connect();
22119
22697
  const response = await client.requestRaw(operation, {
22120
- params,
22121
- query: { workspaceId }
22698
+ params: pathParams,
22699
+ ...requestInput,
22700
+ ...scope === "workspace" ? { query: { workspaceId: client.requireWorkspace() } } : {}
22122
22701
  });
22123
22702
  if (!response.body) {
22124
22703
  throw new SimApiError("File content response was empty.", response.status);
@@ -22135,18 +22714,26 @@ async function downloadToOutput(connectDownload, operation, params, options) {
22135
22714
  }
22136
22715
  const savedTarget = await saveToFile(response.body, target, Boolean(options.force));
22137
22716
  printProtocolResult(profile.output, {
22138
- id: params.fileId,
22717
+ ...pathParams.fileId ? { id: pathParams.fileId } : {},
22139
22718
  path: savedTarget,
22140
22719
  status: "saved"
22141
22720
  });
22142
22721
  }
22143
22722
  function attachFileGet(files) {
22144
- const [get, connectGet] = apiCommand(files, "get", ["downloadFile"]);
22145
- get.argument("<fileId>", "File whose content to read").allowExcessArguments(false).description("Download a file’s content to stdout or a local file").option("-o, --output-file <path>", "Write content to a file instead of stdout").option("--force", "Overwrite --output-file if it already exists").action((fileId, options) => downloadToOutput(connectGet, "downloadFile", { fileId }, options));
22723
+ const [command, connect] = apiCommand(files, "get", ["downloadFile"]);
22724
+ command.argument("<fileId>", "File whose content to read").allowExcessArguments(false).description("Download a file’s content to stdout or a local file").option("-o, --output-file <path>", "Write content to a file instead of stdout").option("--force", "Overwrite --output-file if it already exists").action((fileId, options) => downloadToOutput(connect, "downloadFile", { fileId }, options, "workspace"));
22146
22725
  }
22147
22726
  function attachFileVersionDownload(versions) {
22148
- const [download, connectDownload] = apiCommand(versions, "download", ["downloadFileVersion"]);
22149
- download.argument("<fileId>", "File identifier.").argument("<version>", "Version number.").allowExcessArguments(false).description("Download the content of one version of a file").option("-o, --output-file <path>", "Write content to a file instead of stdout").option("--force", "Overwrite --output-file if it already exists").action((fileId, version, options) => downloadToOutput(connectDownload, "downloadFileVersion", { fileId, version }, options));
22727
+ const [command, connect] = apiCommand(versions, "download", ["downloadFileVersion"]);
22728
+ command.argument("<fileId>", "File identifier.").argument("<version>", "Version number.").allowExcessArguments(false).description("Download the content of one version of a file").option("-o, --output-file <path>", "Write content to a file instead of stdout").option("--force", "Overwrite --output-file if it already exists").action((fileId, version, options) => downloadToOutput(connect, "downloadFileVersion", { fileId, version }, options, "workspace"));
22729
+ }
22730
+ function attachProjectFileSource(files) {
22731
+ const [command, connect] = apiCommand(files, "source", ["readProjectFileContent"]);
22732
+ command.argument("<projectId>", "Project that owns the file").argument("<fileId>", "File whose stored source to read").allowExcessArguments(false).description(describeOperation(V2_OPERATIONS.readProjectFileContent, "Download a Project file’s stored source to stdout or a local file")).option("-o, --output-file <path>", "Write content to a file instead of stdout").option("--force", "Overwrite --output-file if it already exists").action((projectId, fileId, options) => downloadToOutput(connect, "readProjectFileContent", { projectId, fileId }, options, "owner"));
22733
+ }
22734
+ function attachProjectFileVersionSource(versions) {
22735
+ const [command, connect] = apiCommand(versions, "source", ["readProjectFileVersionContent"]);
22736
+ command.argument("<projectId>", "Project that owns the file").argument("<fileId>", "File identifier.").argument("<version>", "Version number.").allowExcessArguments(false).description(describeOperation(V2_OPERATIONS.readProjectFileVersionContent, "Download a Project file version’s stored source to stdout or a local file")).option("-o, --output-file <path>", "Write content to a file instead of stdout").option("--force", "Overwrite --output-file if it already exists").action((projectId, fileId, version, options) => downloadToOutput(connect, "readProjectFileVersionContent", { projectId, fileId, version }, options, "owner"));
22150
22737
  }
22151
22738
 
22152
22739
  // src/transfer/upload-session.ts
@@ -22274,7 +22861,7 @@ async function uploadParts(client, workspaceId, session, transfer, file) {
22274
22861
  }
22275
22862
  const signed = await client.request(session.operations.parts, {
22276
22863
  params: session.params,
22277
- query: { workspaceId },
22864
+ query: workspaceId ? { workspaceId } : undefined,
22278
22865
  headers: { "upload-token": session.uploadToken },
22279
22866
  body: { partNumbers }
22280
22867
  });
@@ -22323,7 +22910,7 @@ async function finishUploadSession(client, workspaceId, session, path) {
22323
22910
  await snapshot?.dispose().catch(() => {});
22324
22911
  const completed = await client.request(session.operations.complete, {
22325
22912
  params: session.params,
22326
- query: { workspaceId },
22913
+ query: workspaceId ? { workspaceId } : undefined,
22327
22914
  headers: { "upload-token": session.uploadToken }
22328
22915
  });
22329
22916
  return completed.data;
@@ -22333,7 +22920,7 @@ async function finishUploadSession(client, workspaceId, session, path) {
22333
22920
  const cleanupClient = profile ? client.over(new SimClient({ ...profile, signal: AbortSignal.timeout(5000) })) : client;
22334
22921
  await cleanupClient.request(session.operations.abort, {
22335
22922
  params: session.params,
22336
- query: { workspaceId },
22923
+ query: workspaceId ? { workspaceId } : undefined,
22337
22924
  headers: { "upload-token": session.uploadToken }
22338
22925
  }).catch(() => {
22339
22926
  return;
@@ -22346,43 +22933,51 @@ async function finishUploadSession(client, workspaceId, session, path) {
22346
22933
  }
22347
22934
 
22348
22935
  // src/commands/protocol/files-upload.ts
22349
- function attachFileUpload(files) {
22350
- const [upload, connectUpload] = apiCommand(files, "upload", [
22351
- "createFileUpload",
22352
- "createFileUploadPartUrls",
22353
- "completeFileUpload",
22354
- "abortFileUpload"
22355
- ]);
22356
- upload.argument("<path>", "Local file to upload").allowExcessArguments(false).description("Upload a file to the workspace").option("--folder <path>", "Folder path as shown in the app; defaults to the root folder").option("--name <name>", "Store it under a different name").action(async (path, options) => {
22357
- const { client, profile } = connectUpload();
22358
- const workspaceId = client.requireWorkspace();
22359
- const { name, size } = await localFile(path, options.name);
22360
- const created = await client.request("createFileUpload", {
22361
- body: {
22362
- workspaceId,
22363
- name,
22364
- contentType: contentTypeFor(name),
22365
- size,
22366
- ...options.folder !== undefined ? { folderPath: encodeFolderPath(options.folder) } : {}
22367
- }
22368
- });
22369
- const { session, uploadToken, transfer } = created.data;
22370
- const completed = await finishUploadSession(client, workspaceId, {
22371
- operations: {
22372
- parts: "createFileUploadPartUrls",
22373
- complete: "completeFileUpload",
22374
- abort: "abortFileUpload"
22375
- },
22376
- params: { uploadId: session.id },
22377
- uploadToken,
22378
- transfer,
22379
- size
22380
- }, path);
22381
- if (!completed.file) {
22382
- throw new Error(`File upload ${session.id} completed without a file`);
22936
+ var WORKSPACE_UPLOAD_OPERATIONS = [
22937
+ "createFileUpload",
22938
+ "createFileUploadPartUrls",
22939
+ "completeFileUpload",
22940
+ "abortFileUpload"
22941
+ ];
22942
+ var PROJECT_UPLOAD_OPERATIONS = [
22943
+ "createProjectFileUpload",
22944
+ "getProjectFileUploadPartUrls",
22945
+ "completeProjectFileUpload",
22946
+ "abortProjectFileUpload"
22947
+ ];
22948
+ async function uploadFile(connect, path, options, operations, projectId) {
22949
+ const { client, profile } = connect();
22950
+ const workspaceId = projectId ? undefined : client.requireWorkspace();
22951
+ const { name, size } = await localFile(path, options.name);
22952
+ const created = await client.request(operations[0], {
22953
+ params: projectId ? { projectId } : undefined,
22954
+ body: {
22955
+ ...workspaceId ? { workspaceId } : {},
22956
+ name,
22957
+ contentType: contentTypeFor(name),
22958
+ size,
22959
+ ...options.folder !== undefined ? { folderPath: encodeFolderPath(options.folder) } : {}
22383
22960
  }
22384
- printProtocolResult(profile.output, completed.file);
22385
22961
  });
22962
+ const { session, uploadToken, transfer } = created.data;
22963
+ const completed = await finishUploadSession(client, workspaceId, {
22964
+ operations: { parts: operations[1], complete: operations[2], abort: operations[3] },
22965
+ params: { uploadId: session.id, ...projectId ? { projectId } : {} },
22966
+ uploadToken,
22967
+ transfer,
22968
+ size
22969
+ }, path);
22970
+ if (!completed.file)
22971
+ throw new Error(`File upload ${session.id} completed without a file`);
22972
+ printProtocolResult(profile.output, completed.file);
22973
+ }
22974
+ function attachFileUpload(files) {
22975
+ const [upload, connect] = apiCommand(files, "upload", WORKSPACE_UPLOAD_OPERATIONS);
22976
+ upload.argument("<path>", "Local file to upload").allowExcessArguments(false).description("Upload a file to the workspace").option("--folder <path>", "Folder path as shown in the app; defaults to the root folder").option("--name <name>", "Store it under a different name").action((path, options) => uploadFile(connect, path, options, WORKSPACE_UPLOAD_OPERATIONS));
22977
+ }
22978
+ function attachProjectFileUpload(files) {
22979
+ const [upload, connect] = apiCommand(files, "upload", PROJECT_UPLOAD_OPERATIONS);
22980
+ upload.argument("<projectId>", "Project that will own the file").argument("<path>", "Local file to upload").allowExcessArguments(false).description("Upload a shared Project file").option("--folder <path>", "Folder path as shown in the app; defaults to the Project root").option("--name <name>", "Store it under a different name").action((projectId, path, options) => uploadFile(connect, path, options, PROJECT_UPLOAD_OPERATIONS, projectId));
22386
22981
  }
22387
22982
 
22388
22983
  // src/commands/protocol/knowledge-document-upload.ts
@@ -23572,6 +24167,10 @@ function group(program, name) {
23572
24167
  return created;
23573
24168
  }
23574
24169
  function attachProtocolCommands(program) {
24170
+ const projectFiles = group(group(program, "projects"), "files");
24171
+ attachProjectFileUpload(projectFiles);
24172
+ attachProjectFileSource(projectFiles);
24173
+ attachProjectFileVersionSource(group(projectFiles, "versions"));
23575
24174
  const files = group(program, "files");
23576
24175
  attachFileUpload(files);
23577
24176
  attachFileGet(files);
@@ -25171,6 +25770,7 @@ best match rather than repeating similar searches, then run
25171
25770
  \`<command> --help\` for its flags.
25172
25771
  === END AGENT COMMAND DISCOVERY ===
25173
25772
  `;
25773
+ var UNPUBLISHED_GROUPS = new Set(["projects"]);
25174
25774
  var ROOT_VALUE_FLAGS = new Set([
25175
25775
  "-P",
25176
25776
  "--profile",
@@ -25234,7 +25834,7 @@ function buildProgram(options = {}) {
25234
25834
  }
25235
25835
  program.addCommand(cliCommand());
25236
25836
  for (const command of buildGeneratedCommands()) {
25237
- program.addCommand(command);
25837
+ program.addCommand(command, { hidden: UNPUBLISHED_GROUPS.has(command.name()) });
25238
25838
  }
25239
25839
  attachCredentialCommands(program);
25240
25840
  attachProtocolCommands(program);