@elnora-ai/cli 2.3.0 → 2.4.0

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 (3) hide show
  1. package/README.md +1 -0
  2. package/dist/cli.js +621 -398
  3. package/package.json +5 -5
package/dist/cli.js CHANGED
@@ -30,7 +30,7 @@ var VERSION, PRODUCTION_BASE_URL, BASE_URL, AI_SERVER_URL, PRODUCTION_MCP_URL, M
30
30
  var init_config = __esm({
31
31
  "src/lib/config.ts"() {
32
32
  "use strict";
33
- VERSION = true ? "2.3.0" : process.env.npm_package_version ?? "0.0.0-dev";
33
+ VERSION = true ? "2.4.0" : process.env.npm_package_version ?? "0.0.0-dev";
34
34
  PRODUCTION_BASE_URL = "https://platform.elnora.ai/api/v1";
35
35
  BASE_URL = process.env.ELNORA_API_URL ?? PRODUCTION_BASE_URL;
36
36
  AI_SERVER_URL = process.env.ELNORA_AI_SERVER_URL ?? "https://platform.elnora.ai/ai-server";
@@ -66,6 +66,11 @@ var init_config = __esm({
66
66
  file_working_copy: "/files/{id}/working-copy",
67
67
  file_commit: "/files/{id}/commit",
68
68
  file_upload_batch: "/files/upload/batch",
69
+ file_move: "/files/{id}/move",
70
+ // Per-file sharing (KB Access V2)
71
+ file_share: "/files/{id}/share",
72
+ file_share_ace: "/files/{id}/share/{aceId}",
73
+ file_shares: "/files/{id}/shares",
69
74
  // Folders (closure-table Knowledge Base — the `folder`/`folder_move` paths are shared with the
70
75
  // legacy controller; the KB read/mutation verbs are distinguished by HTTP method at the call site)
71
76
  folder: "/folders/{id}",
@@ -74,6 +79,10 @@ var init_config = __esm({
74
79
  folder_roots: "/folders/roots",
75
80
  folder_children: "/folders/{id}/children",
76
81
  folder_files: "/folders/{id}/files",
82
+ // Per-folder sharing (KB Access V2)
83
+ folder_share: "/folders/{id}/share",
84
+ folder_share_ace: "/folders/{id}/share/{aceId}",
85
+ folder_shares: "/folders/{id}/shares",
77
86
  // Organizations
78
87
  organizations: "/organizations",
79
88
  organization: "/organizations/{id}",
@@ -85,6 +94,7 @@ var init_config = __esm({
85
94
  organization_set_default: "/organizations/{id}/set-default",
86
95
  organizations_all: "/organizations/all",
87
96
  org_files: "/organizations/{orgId}/files",
97
+ org_member_directory: "/organizations/{orgId}/members/directory",
88
98
  // Organization invitations
89
99
  org_invitations: "/organizations/{orgId}/invitations",
90
100
  org_invitation: "/organizations/{orgId}/invitations/{invId}",
@@ -3738,18 +3748,44 @@ var filesList = {
3738
3748
  }
3739
3749
  };
3740
3750
 
3741
- // src/commands/files/promote.ts
3751
+ // src/commands/files/move.ts
3742
3752
  import { z as z34 } from "zod";
3743
3753
  var inputSchema32 = z34.object({
3744
- fileId: z34.string().uuid().describe("File ID"),
3745
- visibility: z34.string().min(1).describe("Visibility level")
3754
+ fileId: z34.string().uuid().describe("File ID to move"),
3755
+ parentFolderId: z34.string().uuid().describe("Destination Knowledge Base folder ID")
3756
+ });
3757
+ var filesMove = {
3758
+ name: "files.move",
3759
+ group: "files",
3760
+ description: "Move a file to a different Knowledge Base folder",
3761
+ inputSchema: inputSchema32,
3762
+ outputSchema: z34.any(),
3763
+ annotations: { idempotentHint: true },
3764
+ async execute(input, ctx) {
3765
+ return ctx.client.patch(
3766
+ "file_move",
3767
+ { parentFolderId: input.parentFolderId },
3768
+ { pathParams: { id: input.fileId } }
3769
+ );
3770
+ },
3771
+ formatOutput(output, format) {
3772
+ if (format === "compact") return output.id ?? JSON.stringify(output);
3773
+ return JSON.stringify(output, null, 2);
3774
+ }
3775
+ };
3776
+
3777
+ // src/commands/files/promote.ts
3778
+ import { z as z35 } from "zod";
3779
+ var inputSchema33 = z35.object({
3780
+ fileId: z35.string().uuid().describe("File ID"),
3781
+ visibility: z35.string().min(1).describe("Visibility level")
3746
3782
  });
3747
3783
  var filesPromote = {
3748
3784
  name: "files.promote",
3749
3785
  group: "files",
3750
3786
  description: "Promote a file to a new visibility level",
3751
- inputSchema: inputSchema32,
3752
- outputSchema: z34.any(),
3787
+ inputSchema: inputSchema33,
3788
+ outputSchema: z35.any(),
3753
3789
  async execute(input, ctx) {
3754
3790
  return ctx.client.post(
3755
3791
  "file_promote",
@@ -3766,17 +3802,17 @@ var filesPromote = {
3766
3802
  };
3767
3803
 
3768
3804
  // src/commands/files/restore.ts
3769
- import { z as z35 } from "zod";
3770
- var inputSchema33 = z35.object({
3771
- fileId: z35.string().uuid().describe("File ID"),
3772
- versionId: z35.string().uuid().describe("Version ID to restore")
3805
+ import { z as z36 } from "zod";
3806
+ var inputSchema34 = z36.object({
3807
+ fileId: z36.string().uuid().describe("File ID"),
3808
+ versionId: z36.string().uuid().describe("Version ID to restore")
3773
3809
  });
3774
3810
  var filesRestore = {
3775
3811
  name: "files.restore",
3776
3812
  group: "files",
3777
3813
  description: "Restore a file to a specific version",
3778
- inputSchema: inputSchema33,
3779
- outputSchema: z35.any(),
3814
+ inputSchema: inputSchema34,
3815
+ outputSchema: z36.any(),
3780
3816
  async execute(input, ctx) {
3781
3817
  return ctx.client.post("file_version_restore", void 0, {
3782
3818
  pathParams: { id: input.fileId, vid: input.versionId }
@@ -3789,18 +3825,18 @@ var filesRestore = {
3789
3825
  };
3790
3826
 
3791
3827
  // src/commands/files/search-content.ts
3792
- import { z as z36 } from "zod";
3793
- var inputSchema34 = z36.object({
3794
- query: z36.string().min(1).describe("Search query"),
3795
- project: z36.string().uuid().optional().describe("Project ID to scope search"),
3828
+ import { z as z37 } from "zod";
3829
+ var inputSchema35 = z37.object({
3830
+ query: z37.string().min(1).describe("Search query"),
3831
+ project: z37.string().uuid().optional().describe("Project ID to scope search"),
3796
3832
  ...paginationInput
3797
3833
  });
3798
3834
  var filesSearchContent = {
3799
3835
  name: "files.searchContent",
3800
3836
  group: "files",
3801
3837
  description: "Search file content across projects",
3802
- inputSchema: inputSchema34,
3803
- outputSchema: z36.any(),
3838
+ inputSchema: inputSchema35,
3839
+ outputSchema: z37.any(),
3804
3840
  annotations: { readOnlyHint: true },
3805
3841
  async execute(input, ctx) {
3806
3842
  const queryParams = {
@@ -3817,20 +3853,97 @@ var filesSearchContent = {
3817
3853
  }
3818
3854
  };
3819
3855
 
3856
+ // src/commands/files/share.ts
3857
+ init_errors();
3858
+ import { z as z38 } from "zod";
3859
+ var inputSchema36 = z38.object({
3860
+ fileId: z38.string().uuid().describe("File ID to share"),
3861
+ userId: z38.number().int().positive().optional().describe("User ID to share with (omit when using --org-wide)"),
3862
+ orgWide: z38.boolean().default(false).describe("Share with everyone in the organization"),
3863
+ role: z38.enum(["viewer", "editor", "admin"]).default("editor").describe("Access role to grant")
3864
+ });
3865
+ var filesShare = {
3866
+ name: "files.share",
3867
+ group: "files",
3868
+ description: "Share a file with a user or the whole organization (default role: editor)",
3869
+ inputSchema: inputSchema36,
3870
+ outputSchema: z38.any(),
3871
+ async execute(input, ctx) {
3872
+ if (input.orgWide === (input.userId !== void 0)) {
3873
+ throw new ValidationError(
3874
+ "Specify exactly one recipient.",
3875
+ "Pass either --user-id <id> or --org-wide (not both, and not neither)."
3876
+ );
3877
+ }
3878
+ const body = input.orgWide ? { isOrgWide: true, role: input.role } : { userId: input.userId, role: input.role };
3879
+ return ctx.client.post("file_share", body, { pathParams: { id: input.fileId } });
3880
+ },
3881
+ formatOutput(output, format) {
3882
+ if (format === "compact") return output.id ?? JSON.stringify(output);
3883
+ return JSON.stringify(output, null, 2);
3884
+ }
3885
+ };
3886
+
3887
+ // src/commands/files/shares.ts
3888
+ import { z as z39 } from "zod";
3889
+ var inputSchema37 = z39.object({
3890
+ fileId: z39.string().uuid().describe("File ID")
3891
+ });
3892
+ var filesShares = {
3893
+ name: "files.shares",
3894
+ group: "files",
3895
+ description: "List the current shares on a file",
3896
+ inputSchema: inputSchema37,
3897
+ outputSchema: z39.any(),
3898
+ annotations: { readOnlyHint: true },
3899
+ async execute(input, ctx) {
3900
+ return ctx.client.get("file_shares", { pathParams: { id: input.fileId } });
3901
+ },
3902
+ formatOutput(output, format) {
3903
+ if (format === "compact") return output.id ?? JSON.stringify(output);
3904
+ return JSON.stringify(output, null, 2);
3905
+ }
3906
+ };
3907
+
3908
+ // src/commands/files/unshare.ts
3909
+ import { z as z40 } from "zod";
3910
+ var inputSchema38 = z40.object({
3911
+ fileId: z40.string().uuid().describe("File ID"),
3912
+ aceId: z40.string().uuid().describe("Share (ACE) ID to revoke")
3913
+ });
3914
+ var filesUnshare = {
3915
+ name: "files.unshare",
3916
+ group: "files",
3917
+ description: "Revoke a file share by its ACE id",
3918
+ inputSchema: inputSchema38,
3919
+ outputSchema: z40.any(),
3920
+ annotations: { destructiveHint: true, idempotentHint: true },
3921
+ async execute(input, ctx) {
3922
+ await ctx.client.del("file_share_ace", {
3923
+ pathParams: { id: input.fileId, aceId: input.aceId }
3924
+ });
3925
+ return { revoked: true, fileId: input.fileId, aceId: input.aceId };
3926
+ },
3927
+ formatOutput(output, format) {
3928
+ if (format === "compact") return output.aceId ?? JSON.stringify(output);
3929
+ return JSON.stringify(output, null, 2);
3930
+ }
3931
+ };
3932
+
3820
3933
  // src/commands/files/update.ts
3821
3934
  init_errors();
3822
- import { z as z37 } from "zod";
3823
- var inputSchema35 = z37.object({
3824
- fileId: z37.string().uuid().describe("File ID"),
3825
- name: z37.string().min(1).optional().describe("New file name"),
3826
- folder: z37.string().uuid().optional().describe("New folder ID")
3935
+ import { z as z41 } from "zod";
3936
+ var inputSchema39 = z41.object({
3937
+ fileId: z41.string().uuid().describe("File ID"),
3938
+ name: z41.string().min(1).optional().describe("New file name"),
3939
+ folder: z41.string().uuid().optional().describe("New folder ID")
3827
3940
  });
3828
3941
  var filesUpdate = {
3829
3942
  name: "files.update",
3830
3943
  group: "files",
3831
3944
  description: "Update a file's metadata",
3832
- inputSchema: inputSchema35,
3833
- outputSchema: z37.any(),
3945
+ inputSchema: inputSchema39,
3946
+ outputSchema: z41.any(),
3834
3947
  annotations: { idempotentHint: true },
3835
3948
  async execute(input, ctx) {
3836
3949
  const { fileId, ...fields } = input;
@@ -3857,19 +3970,19 @@ var filesUpdate = {
3857
3970
  init_client();
3858
3971
  import { readFileSync as readFileSync6, statSync as statSync3 } from "node:fs";
3859
3972
  import { basename } from "node:path";
3860
- import { z as z38 } from "zod";
3861
- var inputSchema36 = z38.object({
3862
- project: z38.string().uuid().optional().describe("Project ID (optional; defaults to your workspace)"),
3863
- filePath: z38.string().min(1).describe("Local file path to upload"),
3864
- fileName: z38.string().optional().describe("Override file name"),
3865
- contentType: z38.string().optional().describe("MIME content type")
3973
+ import { z as z42 } from "zod";
3974
+ var inputSchema40 = z42.object({
3975
+ project: z42.string().uuid().optional().describe("Project ID (optional; defaults to your workspace)"),
3976
+ filePath: z42.string().min(1).describe("Local file path to upload"),
3977
+ fileName: z42.string().optional().describe("Override file name"),
3978
+ contentType: z42.string().optional().describe("MIME content type")
3866
3979
  });
3867
3980
  var filesUpload = {
3868
3981
  name: "files.upload",
3869
3982
  group: "files",
3870
3983
  description: "Upload a file to a project (three-stage: presign, PUT, confirm)",
3871
- inputSchema: inputSchema36,
3872
- outputSchema: z38.any(),
3984
+ inputSchema: inputSchema40,
3985
+ outputSchema: z42.any(),
3873
3986
  async execute(input, ctx) {
3874
3987
  const fileBuffer = readFileSync6(input.filePath);
3875
3988
  const fileName = input.fileName ?? basename(input.filePath);
@@ -3904,18 +4017,18 @@ init_client();
3904
4017
  init_errors();
3905
4018
  import { readFileSync as readFileSync7, statSync as statSync4 } from "node:fs";
3906
4019
  import { basename as basename2 } from "node:path";
3907
- import { z as z39 } from "zod";
3908
- var inputSchema37 = z39.object({
3909
- project: z39.string().uuid().optional().describe("Project ID (optional; defaults to your workspace)"),
3910
- filePaths: z39.string().min(1).describe("Comma-separated local file paths to upload"),
3911
- folder: z39.string().uuid().optional().describe("Folder ID")
4020
+ import { z as z43 } from "zod";
4021
+ var inputSchema41 = z43.object({
4022
+ project: z43.string().uuid().optional().describe("Project ID (optional; defaults to your workspace)"),
4023
+ filePaths: z43.string().min(1).describe("Comma-separated local file paths to upload"),
4024
+ folder: z43.string().uuid().optional().describe("Folder ID")
3912
4025
  });
3913
4026
  var filesUploadBatch = {
3914
4027
  name: "files.uploadBatch",
3915
4028
  group: "files",
3916
4029
  description: "Upload multiple files to a project (max 50)",
3917
- inputSchema: inputSchema37,
3918
- outputSchema: z39.any(),
4030
+ inputSchema: inputSchema41,
4031
+ outputSchema: z43.any(),
3919
4032
  async execute(input, ctx) {
3920
4033
  const paths = input.filePaths.split(",").map((p) => p.trim()).filter(Boolean);
3921
4034
  if (paths.length === 0) {
@@ -3973,17 +4086,17 @@ var filesUploadBatch = {
3973
4086
  };
3974
4087
 
3975
4088
  // src/commands/files/version-content.ts
3976
- import { z as z40 } from "zod";
3977
- var inputSchema38 = z40.object({
3978
- fileId: z40.string().uuid().describe("File ID"),
3979
- versionId: z40.string().uuid().describe("Version ID")
4089
+ import { z as z44 } from "zod";
4090
+ var inputSchema42 = z44.object({
4091
+ fileId: z44.string().uuid().describe("File ID"),
4092
+ versionId: z44.string().uuid().describe("Version ID")
3980
4093
  });
3981
4094
  var filesVersionContent = {
3982
4095
  name: "files.versionContent",
3983
4096
  group: "files",
3984
4097
  description: "Get the raw content of a specific file version",
3985
- inputSchema: inputSchema38,
3986
- outputSchema: z40.any(),
4098
+ inputSchema: inputSchema42,
4099
+ outputSchema: z44.any(),
3987
4100
  annotations: { readOnlyHint: true },
3988
4101
  async execute(input, ctx) {
3989
4102
  return ctx.client.get("file_version_content", {
@@ -3997,17 +4110,17 @@ var filesVersionContent = {
3997
4110
  };
3998
4111
 
3999
4112
  // src/commands/files/versions.ts
4000
- import { z as z41 } from "zod";
4001
- var inputSchema39 = z41.object({
4002
- fileId: z41.string().uuid().describe("File ID"),
4113
+ import { z as z45 } from "zod";
4114
+ var inputSchema43 = z45.object({
4115
+ fileId: z45.string().uuid().describe("File ID"),
4003
4116
  ...paginationInput
4004
4117
  });
4005
4118
  var filesVersions = {
4006
4119
  name: "files.versions",
4007
4120
  group: "files",
4008
4121
  description: "List versions of a file",
4009
- inputSchema: inputSchema39,
4010
- outputSchema: z41.any(),
4122
+ inputSchema: inputSchema43,
4123
+ outputSchema: z45.any(),
4011
4124
  annotations: { readOnlyHint: true },
4012
4125
  async execute(input, ctx) {
4013
4126
  return ctx.client.get("file_versions", {
@@ -4022,17 +4135,17 @@ var filesVersions = {
4022
4135
  };
4023
4136
 
4024
4137
  // src/commands/files/working-copy.ts
4025
- import { z as z42 } from "zod";
4026
- var inputSchema40 = z42.object({
4027
- fileId: z42.string().uuid().describe("File ID"),
4028
- task: z42.string().uuid().optional().describe("Task ID")
4138
+ import { z as z46 } from "zod";
4139
+ var inputSchema44 = z46.object({
4140
+ fileId: z46.string().uuid().describe("File ID"),
4141
+ task: z46.string().uuid().optional().describe("Task ID")
4029
4142
  });
4030
4143
  var filesWorkingCopy = {
4031
4144
  name: "files.workingCopy",
4032
4145
  group: "files",
4033
4146
  description: "Create a working copy of a file",
4034
- inputSchema: inputSchema40,
4035
- outputSchema: z42.any(),
4147
+ inputSchema: inputSchema44,
4148
+ outputSchema: z46.any(),
4036
4149
  async execute(input, ctx) {
4037
4150
  const body = {};
4038
4151
  if (input.task !== void 0) body.taskId = input.task;
@@ -4067,21 +4180,25 @@ function registerFileCommands() {
4067
4180
  filesFork,
4068
4181
  filesWorkingCopy,
4069
4182
  filesCommit,
4070
- filesSearchContent
4183
+ filesSearchContent,
4184
+ filesMove,
4185
+ filesShare,
4186
+ filesUnshare,
4187
+ filesShares
4071
4188
  ];
4072
4189
  }
4073
4190
 
4074
4191
  // src/commands/flags/get.ts
4075
- import { z as z43 } from "zod";
4076
- var inputSchema41 = z43.object({
4077
- key: z43.string().min(1).describe("Feature flag key")
4192
+ import { z as z47 } from "zod";
4193
+ var inputSchema45 = z47.object({
4194
+ key: z47.string().min(1).describe("Feature flag key")
4078
4195
  });
4079
4196
  var flagsGet = {
4080
4197
  name: "flags.get",
4081
4198
  group: "flags",
4082
4199
  description: "Get a feature flag by key",
4083
- inputSchema: inputSchema41,
4084
- outputSchema: z43.any(),
4200
+ inputSchema: inputSchema45,
4201
+ outputSchema: z47.any(),
4085
4202
  annotations: { readOnlyHint: true },
4086
4203
  async execute(input, ctx) {
4087
4204
  return ctx.client.get("feature_flag", {
@@ -4095,14 +4212,14 @@ var flagsGet = {
4095
4212
  };
4096
4213
 
4097
4214
  // src/commands/flags/list.ts
4098
- import { z as z44 } from "zod";
4099
- var inputSchema42 = z44.object({});
4215
+ import { z as z48 } from "zod";
4216
+ var inputSchema46 = z48.object({});
4100
4217
  var flagsList = {
4101
4218
  name: "flags.list",
4102
4219
  group: "flags",
4103
4220
  description: "List all feature flags",
4104
- inputSchema: inputSchema42,
4105
- outputSchema: z44.any(),
4221
+ inputSchema: inputSchema46,
4222
+ outputSchema: z48.any(),
4106
4223
  annotations: { readOnlyHint: true },
4107
4224
  async execute(_input, ctx) {
4108
4225
  return ctx.client.get("feature_flags");
@@ -4114,18 +4231,18 @@ var flagsList = {
4114
4231
  };
4115
4232
 
4116
4233
  // src/commands/flags/set.ts
4117
- import { z as z45 } from "zod";
4118
- var inputSchema43 = z45.object({
4119
- key: z45.string().min(1).describe("Feature flag key"),
4120
- value: z45.enum(["true", "false"]).describe("Feature flag value"),
4121
- yes: z45.boolean().optional().default(false).describe("Skip confirmation prompt")
4234
+ import { z as z49 } from "zod";
4235
+ var inputSchema47 = z49.object({
4236
+ key: z49.string().min(1).describe("Feature flag key"),
4237
+ value: z49.enum(["true", "false"]).describe("Feature flag value"),
4238
+ yes: z49.boolean().optional().default(false).describe("Skip confirmation prompt")
4122
4239
  });
4123
4240
  var flagsSet = {
4124
4241
  name: "flags.set",
4125
4242
  group: "flags",
4126
4243
  description: "Set a feature flag value",
4127
- inputSchema: inputSchema43,
4128
- outputSchema: z45.any(),
4244
+ inputSchema: inputSchema47,
4245
+ outputSchema: z49.any(),
4129
4246
  async execute(input, ctx) {
4130
4247
  if (!input.yes) {
4131
4248
  const confirmed = await confirmDestructive(`Set feature flag "${input.key}" to ${input.value}? [y/N] `);
@@ -4154,16 +4271,16 @@ function registerFlagCommands() {
4154
4271
  }
4155
4272
 
4156
4273
  // src/commands/folders/children.ts
4157
- import { z as z46 } from "zod";
4158
- var inputSchema44 = z46.object({
4159
- folderId: z46.string().uuid().describe("Folder ID")
4274
+ import { z as z50 } from "zod";
4275
+ var inputSchema48 = z50.object({
4276
+ folderId: z50.string().uuid().describe("Folder ID")
4160
4277
  });
4161
4278
  var foldersChildren = {
4162
4279
  name: "folders.children",
4163
4280
  group: "folders",
4164
4281
  description: "List the child folders of a Knowledge Base folder",
4165
- inputSchema: inputSchema44,
4166
- outputSchema: z46.any(),
4282
+ inputSchema: inputSchema48,
4283
+ outputSchema: z50.any(),
4167
4284
  annotations: { readOnlyHint: true },
4168
4285
  async execute(input, ctx) {
4169
4286
  return ctx.client.get("folder_children", {
@@ -4177,18 +4294,18 @@ var foldersChildren = {
4177
4294
  };
4178
4295
 
4179
4296
  // src/commands/folders/create.ts
4180
- import { z as z47 } from "zod";
4181
- var inputSchema45 = z47.object({
4182
- projectId: z47.string().uuid().describe("Project ID"),
4183
- name: z47.string().min(1).describe("Folder name"),
4184
- parentId: z47.string().uuid().optional().describe("Parent folder ID")
4297
+ import { z as z51 } from "zod";
4298
+ var inputSchema49 = z51.object({
4299
+ projectId: z51.string().uuid().describe("Project ID"),
4300
+ name: z51.string().min(1).describe("Folder name"),
4301
+ parentId: z51.string().uuid().optional().describe("Parent folder ID")
4185
4302
  });
4186
4303
  var foldersCreate = {
4187
4304
  name: "folders.create",
4188
4305
  group: "folders",
4189
4306
  description: "Create a new folder in a project",
4190
- inputSchema: inputSchema45,
4191
- outputSchema: z47.any(),
4307
+ inputSchema: inputSchema49,
4308
+ outputSchema: z51.any(),
4192
4309
  async execute(input, ctx) {
4193
4310
  const body = { name: input.name };
4194
4311
  if (input.parentId) body.parentId = input.parentId;
@@ -4203,16 +4320,16 @@ var foldersCreate = {
4203
4320
  };
4204
4321
 
4205
4322
  // src/commands/folders/delete.ts
4206
- import { z as z48 } from "zod";
4207
- var inputSchema46 = z48.object({
4208
- folderId: z48.string().uuid().describe("Folder ID to delete")
4323
+ import { z as z52 } from "zod";
4324
+ var inputSchema50 = z52.object({
4325
+ folderId: z52.string().uuid().describe("Folder ID to delete")
4209
4326
  });
4210
4327
  var foldersDelete = {
4211
4328
  name: "folders.delete",
4212
4329
  group: "folders",
4213
4330
  description: "Delete a folder",
4214
- inputSchema: inputSchema46,
4215
- outputSchema: z48.any(),
4331
+ inputSchema: inputSchema50,
4332
+ outputSchema: z52.any(),
4216
4333
  annotations: { destructiveHint: true },
4217
4334
  async execute(input, ctx) {
4218
4335
  await ctx.client.del("folder", {
@@ -4227,17 +4344,17 @@ var foldersDelete = {
4227
4344
  };
4228
4345
 
4229
4346
  // src/commands/folders/files.ts
4230
- import { z as z49 } from "zod";
4231
- var inputSchema47 = z49.object({
4232
- folderId: z49.string().uuid().describe("Folder ID"),
4347
+ import { z as z53 } from "zod";
4348
+ var inputSchema51 = z53.object({
4349
+ folderId: z53.string().uuid().describe("Folder ID"),
4233
4350
  ...paginationInput
4234
4351
  });
4235
4352
  var foldersFiles = {
4236
4353
  name: "folders.files",
4237
4354
  group: "folders",
4238
4355
  description: "List files placed directly in a Knowledge Base folder",
4239
- inputSchema: inputSchema47,
4240
- outputSchema: z49.any(),
4356
+ inputSchema: inputSchema51,
4357
+ outputSchema: z53.any(),
4241
4358
  annotations: { readOnlyHint: true },
4242
4359
  async execute(input, ctx) {
4243
4360
  return ctx.client.get("folder_files", {
@@ -4252,16 +4369,16 @@ var foldersFiles = {
4252
4369
  };
4253
4370
 
4254
4371
  // src/commands/folders/get.ts
4255
- import { z as z50 } from "zod";
4256
- var inputSchema48 = z50.object({
4257
- folderId: z50.string().uuid().describe("Folder ID")
4372
+ import { z as z54 } from "zod";
4373
+ var inputSchema52 = z54.object({
4374
+ folderId: z54.string().uuid().describe("Folder ID")
4258
4375
  });
4259
4376
  var foldersGet = {
4260
4377
  name: "folders.get",
4261
4378
  group: "folders",
4262
4379
  description: "Get a Knowledge Base folder's details and breadcrumb path",
4263
- inputSchema: inputSchema48,
4264
- outputSchema: z50.any(),
4380
+ inputSchema: inputSchema52,
4381
+ outputSchema: z54.any(),
4265
4382
  annotations: { readOnlyHint: true },
4266
4383
  async execute(input, ctx) {
4267
4384
  return ctx.client.get("folder", {
@@ -4275,16 +4392,16 @@ var foldersGet = {
4275
4392
  };
4276
4393
 
4277
4394
  // src/commands/folders/list.ts
4278
- import { z as z51 } from "zod";
4279
- var inputSchema49 = z51.object({
4280
- projectId: z51.string().uuid().describe("Project ID")
4395
+ import { z as z55 } from "zod";
4396
+ var inputSchema53 = z55.object({
4397
+ projectId: z55.string().uuid().describe("Project ID")
4281
4398
  });
4282
4399
  var foldersList = {
4283
4400
  name: "folders.list",
4284
4401
  group: "folders",
4285
4402
  description: "List folders in a project",
4286
- inputSchema: inputSchema49,
4287
- outputSchema: z51.any(),
4403
+ inputSchema: inputSchema53,
4404
+ outputSchema: z55.any(),
4288
4405
  annotations: { readOnlyHint: true },
4289
4406
  async execute(input, ctx) {
4290
4407
  return ctx.client.get("project_folders", {
@@ -4299,18 +4416,18 @@ var foldersList = {
4299
4416
 
4300
4417
  // src/commands/folders/move.ts
4301
4418
  init_errors();
4302
- import { z as z52 } from "zod";
4419
+ import { z as z56 } from "zod";
4303
4420
  var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
4304
- var inputSchema50 = z52.object({
4305
- folderId: z52.string().uuid().describe("Folder ID to move"),
4306
- parentId: z52.string().min(1).describe("Target parent folder ID, or 'root' to move to project root")
4421
+ var inputSchema54 = z56.object({
4422
+ folderId: z56.string().uuid().describe("Folder ID to move"),
4423
+ parentId: z56.string().min(1).describe("Target parent folder ID, or 'root' to move to project root")
4307
4424
  });
4308
4425
  var foldersMove = {
4309
4426
  name: "folders.move",
4310
4427
  group: "folders",
4311
4428
  description: "Move a folder to a new parent (or to root)",
4312
- inputSchema: inputSchema50,
4313
- outputSchema: z52.any(),
4429
+ inputSchema: inputSchema54,
4430
+ outputSchema: z56.any(),
4314
4431
  async execute(input, ctx) {
4315
4432
  let parentValue;
4316
4433
  if (input.parentId === "root") {
@@ -4338,17 +4455,17 @@ var foldersMove = {
4338
4455
  };
4339
4456
 
4340
4457
  // src/commands/folders/rename.ts
4341
- import { z as z53 } from "zod";
4342
- var inputSchema51 = z53.object({
4343
- folderId: z53.string().uuid().describe("Folder ID"),
4344
- name: z53.string().min(1).describe("New folder name")
4458
+ import { z as z57 } from "zod";
4459
+ var inputSchema55 = z57.object({
4460
+ folderId: z57.string().uuid().describe("Folder ID"),
4461
+ name: z57.string().min(1).describe("New folder name")
4345
4462
  });
4346
4463
  var foldersRename = {
4347
4464
  name: "folders.rename",
4348
4465
  group: "folders",
4349
4466
  description: "Rename a folder",
4350
- inputSchema: inputSchema51,
4351
- outputSchema: z53.any(),
4467
+ inputSchema: inputSchema55,
4468
+ outputSchema: z57.any(),
4352
4469
  annotations: { idempotentHint: true },
4353
4470
  async execute(input, ctx) {
4354
4471
  return ctx.client.put(
@@ -4366,14 +4483,14 @@ var foldersRename = {
4366
4483
  };
4367
4484
 
4368
4485
  // src/commands/folders/roots.ts
4369
- import { z as z54 } from "zod";
4370
- var inputSchema52 = z54.object({});
4486
+ import { z as z58 } from "zod";
4487
+ var inputSchema56 = z58.object({});
4371
4488
  var foldersRoots = {
4372
4489
  name: "folders.roots",
4373
4490
  group: "folders",
4374
4491
  description: "List the top-level Knowledge Base folders you can access",
4375
- inputSchema: inputSchema52,
4376
- outputSchema: z54.any(),
4492
+ inputSchema: inputSchema56,
4493
+ outputSchema: z58.any(),
4377
4494
  annotations: { readOnlyHint: true },
4378
4495
  async execute(_input, ctx) {
4379
4496
  return ctx.client.get("folder_roots");
@@ -4384,6 +4501,83 @@ var foldersRoots = {
4384
4501
  }
4385
4502
  };
4386
4503
 
4504
+ // src/commands/folders/share.ts
4505
+ init_errors();
4506
+ import { z as z59 } from "zod";
4507
+ var inputSchema57 = z59.object({
4508
+ folderId: z59.string().uuid().describe("Folder ID to share"),
4509
+ userId: z59.number().int().positive().optional().describe("User ID to share with (omit when using --org-wide)"),
4510
+ orgWide: z59.boolean().default(false).describe("Share with everyone in the organization"),
4511
+ role: z59.enum(["viewer", "editor", "admin"]).default("editor").describe("Access role to grant")
4512
+ });
4513
+ var foldersShare = {
4514
+ name: "folders.share",
4515
+ group: "folders",
4516
+ description: "Share a folder with a user or the whole organization (default role: editor)",
4517
+ inputSchema: inputSchema57,
4518
+ outputSchema: z59.any(),
4519
+ async execute(input, ctx) {
4520
+ if (input.orgWide === (input.userId !== void 0)) {
4521
+ throw new ValidationError(
4522
+ "Specify exactly one recipient.",
4523
+ "Pass either --user-id <id> or --org-wide (not both, and not neither)."
4524
+ );
4525
+ }
4526
+ const body = input.orgWide ? { isOrgWide: true, role: input.role } : { userId: input.userId, role: input.role };
4527
+ return ctx.client.post("folder_share", body, { pathParams: { id: input.folderId } });
4528
+ },
4529
+ formatOutput(output, format) {
4530
+ if (format === "compact") return output.id ?? JSON.stringify(output);
4531
+ return JSON.stringify(output, null, 2);
4532
+ }
4533
+ };
4534
+
4535
+ // src/commands/folders/shares.ts
4536
+ import { z as z60 } from "zod";
4537
+ var inputSchema58 = z60.object({
4538
+ folderId: z60.string().uuid().describe("Folder ID")
4539
+ });
4540
+ var foldersShares = {
4541
+ name: "folders.shares",
4542
+ group: "folders",
4543
+ description: "List the current shares on a folder",
4544
+ inputSchema: inputSchema58,
4545
+ outputSchema: z60.any(),
4546
+ annotations: { readOnlyHint: true },
4547
+ async execute(input, ctx) {
4548
+ return ctx.client.get("folder_shares", { pathParams: { id: input.folderId } });
4549
+ },
4550
+ formatOutput(output, format) {
4551
+ if (format === "compact") return output.id ?? JSON.stringify(output);
4552
+ return JSON.stringify(output, null, 2);
4553
+ }
4554
+ };
4555
+
4556
+ // src/commands/folders/unshare.ts
4557
+ import { z as z61 } from "zod";
4558
+ var inputSchema59 = z61.object({
4559
+ folderId: z61.string().uuid().describe("Folder ID"),
4560
+ aceId: z61.string().uuid().describe("Share (ACE) ID to revoke")
4561
+ });
4562
+ var foldersUnshare = {
4563
+ name: "folders.unshare",
4564
+ group: "folders",
4565
+ description: "Revoke a folder share by its ACE id",
4566
+ inputSchema: inputSchema59,
4567
+ outputSchema: z61.any(),
4568
+ annotations: { destructiveHint: true, idempotentHint: true },
4569
+ async execute(input, ctx) {
4570
+ await ctx.client.del("folder_share_ace", {
4571
+ pathParams: { id: input.folderId, aceId: input.aceId }
4572
+ });
4573
+ return { revoked: true, folderId: input.folderId, aceId: input.aceId };
4574
+ },
4575
+ formatOutput(output, format) {
4576
+ if (format === "compact") return output.aceId ?? JSON.stringify(output);
4577
+ return JSON.stringify(output, null, 2);
4578
+ }
4579
+ };
4580
+
4387
4581
  // src/commands/folders/index.ts
4388
4582
  function registerFolderCommands() {
4389
4583
  return [
@@ -4395,16 +4589,19 @@ function registerFolderCommands() {
4395
4589
  foldersCreate,
4396
4590
  foldersRename,
4397
4591
  foldersMove,
4398
- foldersDelete
4592
+ foldersDelete,
4593
+ foldersShare,
4594
+ foldersUnshare,
4595
+ foldersShares
4399
4596
  ];
4400
4597
  }
4401
4598
 
4402
4599
  // src/commands/health.ts
4403
- import { z as z55 } from "zod";
4404
- var healthInput = z55.object({});
4405
- var healthOutput = z55.object({
4406
- status: z55.string(),
4407
- timestamp: z55.string()
4600
+ import { z as z62 } from "zod";
4601
+ var healthInput = z62.object({});
4602
+ var healthOutput = z62.object({
4603
+ status: z62.string(),
4604
+ timestamp: z62.string()
4408
4605
  });
4409
4606
  var healthCheck = {
4410
4607
  name: "health.check",
@@ -4434,18 +4631,18 @@ var healthCheck = {
4434
4631
  };
4435
4632
 
4436
4633
  // src/commands/library/create-folder.ts
4437
- import { z as z56 } from "zod";
4438
- var inputSchema53 = z56.object({
4439
- orgId: z56.string().uuid().describe("Organization ID"),
4440
- name: z56.string().min(1).describe("Folder name"),
4441
- parent: z56.string().uuid().optional().describe("Parent folder ID")
4634
+ import { z as z63 } from "zod";
4635
+ var inputSchema60 = z63.object({
4636
+ orgId: z63.string().uuid().describe("Organization ID"),
4637
+ name: z63.string().min(1).describe("Folder name"),
4638
+ parent: z63.string().uuid().optional().describe("Parent folder ID")
4442
4639
  });
4443
4640
  var libraryCreateFolder = {
4444
4641
  name: "library.createFolder",
4445
4642
  group: "library",
4446
4643
  description: "Create a folder in the organization library",
4447
- inputSchema: inputSchema53,
4448
- outputSchema: z56.any(),
4644
+ inputSchema: inputSchema60,
4645
+ outputSchema: z63.any(),
4449
4646
  async execute(input, ctx) {
4450
4647
  const body = { name: input.name };
4451
4648
  if (input.parent) body.parentId = input.parent;
@@ -4460,17 +4657,17 @@ var libraryCreateFolder = {
4460
4657
  };
4461
4658
 
4462
4659
  // src/commands/library/delete-folder.ts
4463
- import { z as z57 } from "zod";
4464
- var inputSchema54 = z57.object({
4465
- orgId: z57.string().uuid().describe("Organization ID"),
4466
- folderId: z57.string().uuid().describe("Folder ID to delete")
4660
+ import { z as z64 } from "zod";
4661
+ var inputSchema61 = z64.object({
4662
+ orgId: z64.string().uuid().describe("Organization ID"),
4663
+ folderId: z64.string().uuid().describe("Folder ID to delete")
4467
4664
  });
4468
4665
  var libraryDeleteFolder = {
4469
4666
  name: "library.deleteFolder",
4470
4667
  group: "library",
4471
4668
  description: "Delete a folder from the organization library",
4472
- inputSchema: inputSchema54,
4473
- outputSchema: z57.any(),
4669
+ inputSchema: inputSchema61,
4670
+ outputSchema: z64.any(),
4474
4671
  annotations: { destructiveHint: true },
4475
4672
  async execute(input, ctx) {
4476
4673
  await ctx.client.del("library_folder", {
@@ -4485,17 +4682,17 @@ var libraryDeleteFolder = {
4485
4682
  };
4486
4683
 
4487
4684
  // src/commands/library/files.ts
4488
- import { z as z58 } from "zod";
4489
- var inputSchema55 = z58.object({
4490
- orgId: z58.string().uuid().describe("Organization ID"),
4685
+ import { z as z65 } from "zod";
4686
+ var inputSchema62 = z65.object({
4687
+ orgId: z65.string().uuid().describe("Organization ID"),
4491
4688
  ...paginationInput
4492
4689
  });
4493
4690
  var libraryFiles = {
4494
4691
  name: "library.files",
4495
4692
  group: "library",
4496
4693
  description: "List files in the organization library",
4497
- inputSchema: inputSchema55,
4498
- outputSchema: z58.any(),
4694
+ inputSchema: inputSchema62,
4695
+ outputSchema: z65.any(),
4499
4696
  annotations: { readOnlyHint: true },
4500
4697
  async execute(input, ctx) {
4501
4698
  return ctx.client.get("library_files", {
@@ -4510,16 +4707,16 @@ var libraryFiles = {
4510
4707
  };
4511
4708
 
4512
4709
  // src/commands/library/folders.ts
4513
- import { z as z59 } from "zod";
4514
- var inputSchema56 = z59.object({
4515
- orgId: z59.string().uuid().describe("Organization ID")
4710
+ import { z as z66 } from "zod";
4711
+ var inputSchema63 = z66.object({
4712
+ orgId: z66.string().uuid().describe("Organization ID")
4516
4713
  });
4517
4714
  var libraryFolders = {
4518
4715
  name: "library.folders",
4519
4716
  group: "library",
4520
4717
  description: "List folders in the organization library",
4521
- inputSchema: inputSchema56,
4522
- outputSchema: z59.any(),
4718
+ inputSchema: inputSchema63,
4719
+ outputSchema: z66.any(),
4523
4720
  annotations: { readOnlyHint: true },
4524
4721
  async execute(input, ctx) {
4525
4722
  return ctx.client.get("library_folders", {
@@ -4533,18 +4730,18 @@ var libraryFolders = {
4533
4730
  };
4534
4731
 
4535
4732
  // src/commands/library/rename-folder.ts
4536
- import { z as z60 } from "zod";
4537
- var inputSchema57 = z60.object({
4538
- orgId: z60.string().uuid().describe("Organization ID"),
4539
- folderId: z60.string().uuid().describe("Folder ID to rename"),
4540
- name: z60.string().min(1).describe("New folder name")
4733
+ import { z as z67 } from "zod";
4734
+ var inputSchema64 = z67.object({
4735
+ orgId: z67.string().uuid().describe("Organization ID"),
4736
+ folderId: z67.string().uuid().describe("Folder ID to rename"),
4737
+ name: z67.string().min(1).describe("New folder name")
4541
4738
  });
4542
4739
  var libraryRenameFolder = {
4543
4740
  name: "library.renameFolder",
4544
4741
  group: "library",
4545
4742
  description: "Rename a folder in the organization library",
4546
- inputSchema: inputSchema57,
4547
- outputSchema: z60.any(),
4743
+ inputSchema: inputSchema64,
4744
+ outputSchema: z67.any(),
4548
4745
  async execute(input, ctx) {
4549
4746
  return ctx.client.put(
4550
4747
  "library_folder",
@@ -4566,16 +4763,16 @@ function registerLibraryCommands() {
4566
4763
  }
4567
4764
 
4568
4765
  // src/commands/orgs/accept-invite.ts
4569
- import { z as z61 } from "zod";
4570
- var inputSchema58 = z61.object({
4571
- token: z61.string().min(1).describe("Invitation token")
4766
+ import { z as z68 } from "zod";
4767
+ var inputSchema65 = z68.object({
4768
+ token: z68.string().min(1).describe("Invitation token")
4572
4769
  });
4573
4770
  var orgsAcceptInvite = {
4574
4771
  name: "orgs.acceptInvite",
4575
4772
  group: "orgs",
4576
4773
  description: "Accept an organization invitation by token",
4577
- inputSchema: inputSchema58,
4578
- outputSchema: z61.any(),
4774
+ inputSchema: inputSchema65,
4775
+ outputSchema: z68.any(),
4579
4776
  async execute(input, ctx) {
4580
4777
  return ctx.client.post("invitation_accept", void 0, {
4581
4778
  pathParams: { token: input.token }
@@ -4588,16 +4785,16 @@ var orgsAcceptInvite = {
4588
4785
  };
4589
4786
 
4590
4787
  // src/commands/orgs/billing.ts
4591
- import { z as z62 } from "zod";
4592
- var inputSchema59 = z62.object({
4593
- orgId: z62.string().uuid().describe("Organization ID")
4788
+ import { z as z69 } from "zod";
4789
+ var inputSchema66 = z69.object({
4790
+ orgId: z69.string().uuid().describe("Organization ID")
4594
4791
  });
4595
4792
  var orgsBilling = {
4596
4793
  name: "orgs.billing",
4597
4794
  group: "orgs",
4598
4795
  description: "Get billing status for an organization",
4599
- inputSchema: inputSchema59,
4600
- outputSchema: z62.any(),
4796
+ inputSchema: inputSchema66,
4797
+ outputSchema: z69.any(),
4601
4798
  annotations: { readOnlyHint: true },
4602
4799
  async execute(input, ctx) {
4603
4800
  return ctx.client.get("organization_billing", {
@@ -4611,17 +4808,17 @@ var orgsBilling = {
4611
4808
  };
4612
4809
 
4613
4810
  // src/commands/orgs/cancel-invite.ts
4614
- import { z as z63 } from "zod";
4615
- var inputSchema60 = z63.object({
4616
- orgId: z63.string().uuid().describe("Organization ID"),
4617
- invitationId: z63.string().uuid().describe("Invitation ID to cancel")
4811
+ import { z as z70 } from "zod";
4812
+ var inputSchema67 = z70.object({
4813
+ orgId: z70.string().uuid().describe("Organization ID"),
4814
+ invitationId: z70.string().uuid().describe("Invitation ID to cancel")
4618
4815
  });
4619
4816
  var orgsCancelInvite = {
4620
4817
  name: "orgs.cancelInvite",
4621
4818
  group: "orgs",
4622
4819
  description: "Cancel a pending organization invitation",
4623
- inputSchema: inputSchema60,
4624
- outputSchema: z63.any(),
4820
+ inputSchema: inputSchema67,
4821
+ outputSchema: z70.any(),
4625
4822
  annotations: { destructiveHint: true },
4626
4823
  async execute(input, ctx) {
4627
4824
  await ctx.client.del("org_invitation", {
@@ -4636,17 +4833,17 @@ var orgsCancelInvite = {
4636
4833
  };
4637
4834
 
4638
4835
  // src/commands/orgs/create.ts
4639
- import { z as z64 } from "zod";
4640
- var inputSchema61 = z64.object({
4641
- name: z64.string().min(1).describe("Organization name"),
4642
- description: z64.string().optional().describe("Organization description")
4836
+ import { z as z71 } from "zod";
4837
+ var inputSchema68 = z71.object({
4838
+ name: z71.string().min(1).describe("Organization name"),
4839
+ description: z71.string().optional().describe("Organization description")
4643
4840
  });
4644
4841
  var orgsCreate = {
4645
4842
  name: "orgs.create",
4646
4843
  group: "orgs",
4647
4844
  description: "Create a new organization",
4648
- inputSchema: inputSchema61,
4649
- outputSchema: z64.any(),
4845
+ inputSchema: inputSchema68,
4846
+ outputSchema: z71.any(),
4650
4847
  async execute(input, ctx) {
4651
4848
  return ctx.client.post("organizations", input);
4652
4849
  },
@@ -4657,17 +4854,17 @@ var orgsCreate = {
4657
4854
  };
4658
4855
 
4659
4856
  // src/commands/orgs/delete.ts
4660
- import { z as z65 } from "zod";
4661
- var inputSchema62 = z65.object({
4662
- orgId: z65.string().uuid().describe("Organization ID to delete"),
4663
- yes: z65.boolean().optional().default(false).describe("Skip confirmation prompt")
4857
+ import { z as z72 } from "zod";
4858
+ var inputSchema69 = z72.object({
4859
+ orgId: z72.string().uuid().describe("Organization ID to delete"),
4860
+ yes: z72.boolean().optional().default(false).describe("Skip confirmation prompt")
4664
4861
  });
4665
4862
  var orgsDelete = {
4666
4863
  name: "orgs.delete",
4667
4864
  group: "orgs",
4668
4865
  description: "Delete an organization",
4669
- inputSchema: inputSchema62,
4670
- outputSchema: z65.any(),
4866
+ inputSchema: inputSchema69,
4867
+ outputSchema: z72.any(),
4671
4868
  annotations: { destructiveHint: true },
4672
4869
  async execute(input, ctx) {
4673
4870
  if (!input.yes) {
@@ -4687,18 +4884,43 @@ var orgsDelete = {
4687
4884
  }
4688
4885
  };
4689
4886
 
4887
+ // src/commands/orgs/directory.ts
4888
+ import { z as z73 } from "zod";
4889
+ var inputSchema70 = z73.object({
4890
+ orgId: z73.string().uuid().describe("Organization ID"),
4891
+ query: z73.string().min(2).describe("Name or email substring to match (minimum 2 characters)")
4892
+ });
4893
+ var orgsDirectory = {
4894
+ name: "orgs.directory",
4895
+ group: "orgs",
4896
+ description: "Search organization members by name or email (Share-modal typeahead)",
4897
+ inputSchema: inputSchema70,
4898
+ outputSchema: z73.any(),
4899
+ annotations: { readOnlyHint: true },
4900
+ async execute(input, ctx) {
4901
+ return ctx.client.get("org_member_directory", {
4902
+ pathParams: { orgId: input.orgId },
4903
+ queryParams: { q: input.query }
4904
+ });
4905
+ },
4906
+ formatOutput(output, format) {
4907
+ if (format === "compact") return output.id ?? JSON.stringify(output);
4908
+ return JSON.stringify(output, null, 2);
4909
+ }
4910
+ };
4911
+
4690
4912
  // src/commands/orgs/files.ts
4691
- import { z as z66 } from "zod";
4692
- var inputSchema63 = z66.object({
4693
- orgId: z66.string().uuid().describe("Organization ID"),
4913
+ import { z as z74 } from "zod";
4914
+ var inputSchema71 = z74.object({
4915
+ orgId: z74.string().uuid().describe("Organization ID"),
4694
4916
  ...paginationInput
4695
4917
  });
4696
4918
  var orgsFiles = {
4697
4919
  name: "orgs.files",
4698
4920
  group: "orgs",
4699
4921
  description: "List files belonging to an organization",
4700
- inputSchema: inputSchema63,
4701
- outputSchema: z66.any(),
4922
+ inputSchema: inputSchema71,
4923
+ outputSchema: z74.any(),
4702
4924
  annotations: { readOnlyHint: true },
4703
4925
  async execute(input, ctx) {
4704
4926
  return ctx.client.get("org_files", {
@@ -4713,16 +4935,16 @@ var orgsFiles = {
4713
4935
  };
4714
4936
 
4715
4937
  // src/commands/orgs/get.ts
4716
- import { z as z67 } from "zod";
4717
- var inputSchema64 = z67.object({
4718
- orgId: z67.string().uuid().describe("Organization ID")
4938
+ import { z as z75 } from "zod";
4939
+ var inputSchema72 = z75.object({
4940
+ orgId: z75.string().uuid().describe("Organization ID")
4719
4941
  });
4720
4942
  var orgsGet = {
4721
4943
  name: "orgs.get",
4722
4944
  group: "orgs",
4723
4945
  description: "Get details of a specific organization",
4724
- inputSchema: inputSchema64,
4725
- outputSchema: z67.any(),
4946
+ inputSchema: inputSchema72,
4947
+ outputSchema: z75.any(),
4726
4948
  async execute(input, ctx) {
4727
4949
  return ctx.client.get("organization", {
4728
4950
  pathParams: { id: input.orgId }
@@ -4735,16 +4957,16 @@ var orgsGet = {
4735
4957
  };
4736
4958
 
4737
4959
  // src/commands/orgs/invitation-info.ts
4738
- import { z as z68 } from "zod";
4739
- var inputSchema65 = z68.object({
4740
- token: z68.string().min(1).describe("Invitation token")
4960
+ import { z as z76 } from "zod";
4961
+ var inputSchema73 = z76.object({
4962
+ token: z76.string().min(1).describe("Invitation token")
4741
4963
  });
4742
4964
  var orgsInvitationInfo = {
4743
4965
  name: "orgs.invitationInfo",
4744
4966
  group: "orgs",
4745
4967
  description: "Get information about an invitation by token",
4746
- inputSchema: inputSchema65,
4747
- outputSchema: z68.any(),
4968
+ inputSchema: inputSchema73,
4969
+ outputSchema: z76.any(),
4748
4970
  annotations: { readOnlyHint: true },
4749
4971
  async execute(input, ctx) {
4750
4972
  return ctx.client.get("invitation_info", {
@@ -4758,16 +4980,16 @@ var orgsInvitationInfo = {
4758
4980
  };
4759
4981
 
4760
4982
  // src/commands/orgs/invitations.ts
4761
- import { z as z69 } from "zod";
4762
- var inputSchema66 = z69.object({
4763
- orgId: z69.string().uuid().describe("Organization ID")
4983
+ import { z as z77 } from "zod";
4984
+ var inputSchema74 = z77.object({
4985
+ orgId: z77.string().uuid().describe("Organization ID")
4764
4986
  });
4765
4987
  var orgsInvitations = {
4766
4988
  name: "orgs.invitations",
4767
4989
  group: "orgs",
4768
4990
  description: "List pending invitations for an organization",
4769
- inputSchema: inputSchema66,
4770
- outputSchema: z69.any(),
4991
+ inputSchema: inputSchema74,
4992
+ outputSchema: z77.any(),
4771
4993
  annotations: { readOnlyHint: true },
4772
4994
  async execute(input, ctx) {
4773
4995
  return ctx.client.get("org_invitations", {
@@ -4781,18 +5003,18 @@ var orgsInvitations = {
4781
5003
  };
4782
5004
 
4783
5005
  // src/commands/orgs/invite.ts
4784
- import { z as z70 } from "zod";
4785
- var inputSchema67 = z70.object({
4786
- orgId: z70.string().uuid().describe("Organization ID"),
4787
- email: z70.string().email().describe("Email address to invite"),
4788
- role: z70.string().optional().default("Member").describe("Role to assign (default: Member)")
5006
+ import { z as z78 } from "zod";
5007
+ var inputSchema75 = z78.object({
5008
+ orgId: z78.string().uuid().describe("Organization ID"),
5009
+ email: z78.string().email().describe("Email address to invite"),
5010
+ role: z78.string().optional().default("Member").describe("Role to assign (default: Member)")
4789
5011
  });
4790
5012
  var orgsInvite = {
4791
5013
  name: "orgs.invite",
4792
5014
  group: "orgs",
4793
5015
  description: "Invite a user to an organization by email",
4794
- inputSchema: inputSchema67,
4795
- outputSchema: z70.any(),
5016
+ inputSchema: inputSchema75,
5017
+ outputSchema: z78.any(),
4796
5018
  annotations: { idempotentHint: true },
4797
5019
  async execute(input, ctx) {
4798
5020
  const existing = await ctx.client.get("org_invitations", {
@@ -4820,14 +5042,14 @@ var orgsInvite = {
4820
5042
  };
4821
5043
 
4822
5044
  // src/commands/orgs/list.ts
4823
- import { z as z71 } from "zod";
4824
- var inputSchema68 = z71.object({});
5045
+ import { z as z79 } from "zod";
5046
+ var inputSchema76 = z79.object({});
4825
5047
  var orgsList = {
4826
5048
  name: "orgs.list",
4827
5049
  group: "orgs",
4828
5050
  description: "List all organizations the current user belongs to",
4829
- inputSchema: inputSchema68,
4830
- outputSchema: z71.any(),
5051
+ inputSchema: inputSchema76,
5052
+ outputSchema: z79.any(),
4831
5053
  annotations: { readOnlyHint: true },
4832
5054
  async execute(_input, ctx) {
4833
5055
  return ctx.client.get("organizations");
@@ -4839,14 +5061,14 @@ var orgsList = {
4839
5061
  };
4840
5062
 
4841
5063
  // src/commands/orgs/list-all.ts
4842
- import { z as z72 } from "zod";
4843
- var inputSchema69 = z72.object({});
5064
+ import { z as z80 } from "zod";
5065
+ var inputSchema77 = z80.object({});
4844
5066
  var orgsListAll = {
4845
5067
  name: "orgs.listAll",
4846
5068
  group: "orgs",
4847
5069
  description: "List all organizations (admin)",
4848
- inputSchema: inputSchema69,
4849
- outputSchema: z72.any(),
5070
+ inputSchema: inputSchema77,
5071
+ outputSchema: z80.any(),
4850
5072
  annotations: { readOnlyHint: true, internal: true },
4851
5073
  async execute(_input, ctx) {
4852
5074
  return ctx.client.get("organizations_all");
@@ -4858,16 +5080,16 @@ var orgsListAll = {
4858
5080
  };
4859
5081
 
4860
5082
  // src/commands/orgs/members.ts
4861
- import { z as z73 } from "zod";
4862
- var inputSchema70 = z73.object({
4863
- orgId: z73.string().uuid().describe("Organization ID")
5083
+ import { z as z81 } from "zod";
5084
+ var inputSchema78 = z81.object({
5085
+ orgId: z81.string().uuid().describe("Organization ID")
4864
5086
  });
4865
5087
  var orgsMembers = {
4866
5088
  name: "orgs.members",
4867
5089
  group: "orgs",
4868
5090
  description: "List members of an organization",
4869
- inputSchema: inputSchema70,
4870
- outputSchema: z73.any(),
5091
+ inputSchema: inputSchema78,
5092
+ outputSchema: z81.any(),
4871
5093
  annotations: { readOnlyHint: true },
4872
5094
  async execute(input, ctx) {
4873
5095
  return ctx.client.get("organization_members", {
@@ -4881,17 +5103,17 @@ var orgsMembers = {
4881
5103
  };
4882
5104
 
4883
5105
  // src/commands/orgs/remove-member.ts
4884
- import { z as z74 } from "zod";
4885
- var inputSchema71 = z74.object({
4886
- orgId: z74.string().uuid().describe("Organization ID"),
4887
- membershipId: z74.string().uuid().describe("Membership ID of the member to remove")
5106
+ import { z as z82 } from "zod";
5107
+ var inputSchema79 = z82.object({
5108
+ orgId: z82.string().uuid().describe("Organization ID"),
5109
+ membershipId: z82.string().uuid().describe("Membership ID of the member to remove")
4888
5110
  });
4889
5111
  var orgsRemoveMember = {
4890
5112
  name: "orgs.removeMember",
4891
5113
  group: "orgs",
4892
5114
  description: "Remove a member from an organization",
4893
- inputSchema: inputSchema71,
4894
- outputSchema: z74.any(),
5115
+ inputSchema: inputSchema79,
5116
+ outputSchema: z82.any(),
4895
5117
  annotations: { destructiveHint: true },
4896
5118
  async execute(input, ctx) {
4897
5119
  await ctx.client.del("organization_member", {
@@ -4906,17 +5128,17 @@ var orgsRemoveMember = {
4906
5128
  };
4907
5129
 
4908
5130
  // src/commands/orgs/resend-invite.ts
4909
- import { z as z75 } from "zod";
4910
- var inputSchema72 = z75.object({
4911
- orgId: z75.string().uuid().describe("Organization ID"),
4912
- invitationId: z75.string().uuid().describe("Invitation ID to resend")
5131
+ import { z as z83 } from "zod";
5132
+ var inputSchema80 = z83.object({
5133
+ orgId: z83.string().uuid().describe("Organization ID"),
5134
+ invitationId: z83.string().uuid().describe("Invitation ID to resend")
4913
5135
  });
4914
5136
  var orgsResendInvite = {
4915
5137
  name: "orgs.resendInvite",
4916
5138
  group: "orgs",
4917
5139
  description: "Resend an organization invitation email. Regenerates the token and extends the expiry by 7 days. Works on both pending and expired invitations, preserves the invitation ID.",
4918
- inputSchema: inputSchema72,
4919
- outputSchema: z75.any(),
5140
+ inputSchema: inputSchema80,
5141
+ outputSchema: z83.any(),
4920
5142
  annotations: { idempotentHint: true },
4921
5143
  async execute(input, ctx) {
4922
5144
  return ctx.client.post(
@@ -4932,16 +5154,16 @@ var orgsResendInvite = {
4932
5154
  };
4933
5155
 
4934
5156
  // src/commands/orgs/set-default.ts
4935
- import { z as z76 } from "zod";
4936
- var inputSchema73 = z76.object({
4937
- orgId: z76.string().uuid().describe("Organization ID to set as default")
5157
+ import { z as z84 } from "zod";
5158
+ var inputSchema81 = z84.object({
5159
+ orgId: z84.string().uuid().describe("Organization ID to set as default")
4938
5160
  });
4939
5161
  var orgsSetDefault = {
4940
5162
  name: "orgs.setDefault",
4941
5163
  group: "orgs",
4942
5164
  description: "Set an organization as the default",
4943
- inputSchema: inputSchema73,
4944
- outputSchema: z76.any(),
5165
+ inputSchema: inputSchema81,
5166
+ outputSchema: z84.any(),
4945
5167
  annotations: { idempotentHint: true },
4946
5168
  async execute(input, ctx) {
4947
5169
  return ctx.client.put("organization_set_default", void 0, {
@@ -4955,17 +5177,17 @@ var orgsSetDefault = {
4955
5177
  };
4956
5178
 
4957
5179
  // src/commands/orgs/set-stripe.ts
4958
- import { z as z77 } from "zod";
4959
- var inputSchema74 = z77.object({
4960
- orgId: z77.string().uuid().describe("Organization ID"),
4961
- stripeCustomerId: z77.string().min(1).describe("Stripe customer ID (e.g. cus_xxx)")
5180
+ import { z as z85 } from "zod";
5181
+ var inputSchema82 = z85.object({
5182
+ orgId: z85.string().uuid().describe("Organization ID"),
5183
+ stripeCustomerId: z85.string().min(1).describe("Stripe customer ID (e.g. cus_xxx)")
4962
5184
  });
4963
5185
  var orgsSetStripe = {
4964
5186
  name: "orgs.setStripe",
4965
5187
  group: "orgs",
4966
5188
  description: "Set the Stripe customer ID for an organization",
4967
- inputSchema: inputSchema74,
4968
- outputSchema: z77.any(),
5189
+ inputSchema: inputSchema82,
5190
+ outputSchema: z85.any(),
4969
5191
  annotations: { idempotentHint: true },
4970
5192
  async execute(input, ctx) {
4971
5193
  return ctx.client.put(
@@ -4982,18 +5204,18 @@ var orgsSetStripe = {
4982
5204
 
4983
5205
  // src/commands/orgs/update.ts
4984
5206
  init_errors();
4985
- import { z as z78 } from "zod";
4986
- var inputSchema75 = z78.object({
4987
- orgId: z78.string().uuid().describe("Organization ID"),
4988
- name: z78.string().min(1).optional().describe("New organization name"),
4989
- description: z78.string().optional().describe("New organization description")
5207
+ import { z as z86 } from "zod";
5208
+ var inputSchema83 = z86.object({
5209
+ orgId: z86.string().uuid().describe("Organization ID"),
5210
+ name: z86.string().min(1).optional().describe("New organization name"),
5211
+ description: z86.string().optional().describe("New organization description")
4990
5212
  });
4991
5213
  var orgsUpdate = {
4992
5214
  name: "orgs.update",
4993
5215
  group: "orgs",
4994
5216
  description: "Update an existing organization",
4995
- inputSchema: inputSchema75,
4996
- outputSchema: z78.any(),
5217
+ inputSchema: inputSchema83,
5218
+ outputSchema: z86.any(),
4997
5219
  annotations: { idempotentHint: true },
4998
5220
  async execute(input, ctx) {
4999
5221
  const { orgId, ...fields } = input;
@@ -5014,18 +5236,18 @@ var orgsUpdate = {
5014
5236
  };
5015
5237
 
5016
5238
  // src/commands/orgs/update-role.ts
5017
- import { z as z79 } from "zod";
5018
- var inputSchema76 = z79.object({
5019
- orgId: z79.string().uuid().describe("Organization ID"),
5020
- membershipId: z79.string().uuid().describe("Membership ID of the member"),
5021
- role: z79.string().min(1).describe("New role to assign")
5239
+ import { z as z87 } from "zod";
5240
+ var inputSchema84 = z87.object({
5241
+ orgId: z87.string().uuid().describe("Organization ID"),
5242
+ membershipId: z87.string().uuid().describe("Membership ID of the member"),
5243
+ role: z87.string().min(1).describe("New role to assign")
5022
5244
  });
5023
5245
  var orgsUpdateRole = {
5024
5246
  name: "orgs.updateRole",
5025
5247
  group: "orgs",
5026
5248
  description: "Update an organization member's role",
5027
- inputSchema: inputSchema76,
5028
- outputSchema: z79.any(),
5249
+ inputSchema: inputSchema84,
5250
+ outputSchema: z87.any(),
5029
5251
  annotations: { idempotentHint: true },
5030
5252
  async execute(input, ctx) {
5031
5253
  return ctx.client.put(
@@ -5061,23 +5283,24 @@ function registerOrgCommands() {
5061
5283
  orgsInvitationInfo,
5062
5284
  orgsAcceptInvite,
5063
5285
  orgsFiles,
5064
- orgsListAll
5286
+ orgsListAll,
5287
+ orgsDirectory
5065
5288
  ];
5066
5289
  }
5067
5290
 
5068
5291
  // src/commands/projects/add-member.ts
5069
- import { z as z80 } from "zod";
5070
- var inputSchema77 = z80.object({
5071
- projectId: z80.string().uuid().describe("Project ID"),
5072
- userId: z80.string().uuid().describe("User ID to add"),
5073
- role: z80.string().default("Member").describe("Role to assign (default: Member)")
5292
+ import { z as z88 } from "zod";
5293
+ var inputSchema85 = z88.object({
5294
+ projectId: z88.string().uuid().describe("Project ID"),
5295
+ userId: z88.string().uuid().describe("User ID to add"),
5296
+ role: z88.string().default("Member").describe("Role to assign (default: Member)")
5074
5297
  });
5075
5298
  var projectsAddMember = {
5076
5299
  name: "projects.addMember",
5077
5300
  group: "projects",
5078
5301
  description: "Add a member to a project",
5079
- inputSchema: inputSchema77,
5080
- outputSchema: z80.any(),
5302
+ inputSchema: inputSchema85,
5303
+ outputSchema: z88.any(),
5081
5304
  async execute(input, ctx) {
5082
5305
  return ctx.client.post(
5083
5306
  "project_members",
@@ -5092,16 +5315,16 @@ var projectsAddMember = {
5092
5315
  };
5093
5316
 
5094
5317
  // src/commands/projects/archive.ts
5095
- import { z as z81 } from "zod";
5096
- var inputSchema78 = z81.object({
5097
- projectId: z81.string().uuid().describe("Project ID to archive")
5318
+ import { z as z89 } from "zod";
5319
+ var inputSchema86 = z89.object({
5320
+ projectId: z89.string().uuid().describe("Project ID to archive")
5098
5321
  });
5099
5322
  var projectsArchive = {
5100
5323
  name: "projects.archive",
5101
5324
  group: "projects",
5102
5325
  description: "Archive (delete) a project",
5103
- inputSchema: inputSchema78,
5104
- outputSchema: z81.any(),
5326
+ inputSchema: inputSchema86,
5327
+ outputSchema: z89.any(),
5105
5328
  annotations: { destructiveHint: true },
5106
5329
  async execute(input, ctx) {
5107
5330
  await ctx.client.del("project", {
@@ -5116,18 +5339,18 @@ var projectsArchive = {
5116
5339
  };
5117
5340
 
5118
5341
  // src/commands/projects/create.ts
5119
- import { z as z82 } from "zod";
5120
- var inputSchema79 = z82.object({
5121
- name: z82.string().min(1).describe("Project name"),
5122
- description: z82.string().optional().describe("Project description"),
5123
- icon: z82.string().optional().describe("Project icon")
5342
+ import { z as z90 } from "zod";
5343
+ var inputSchema87 = z90.object({
5344
+ name: z90.string().min(1).describe("Project name"),
5345
+ description: z90.string().optional().describe("Project description"),
5346
+ icon: z90.string().optional().describe("Project icon")
5124
5347
  });
5125
5348
  var projectsCreate = {
5126
5349
  name: "projects.create",
5127
5350
  group: "projects",
5128
5351
  description: "Create a new project",
5129
- inputSchema: inputSchema79,
5130
- outputSchema: z82.any(),
5352
+ inputSchema: inputSchema87,
5353
+ outputSchema: z90.any(),
5131
5354
  async execute(input, ctx) {
5132
5355
  return ctx.client.post("projects", input);
5133
5356
  },
@@ -5138,16 +5361,16 @@ var projectsCreate = {
5138
5361
  };
5139
5362
 
5140
5363
  // src/commands/projects/get.ts
5141
- import { z as z83 } from "zod";
5142
- var inputSchema80 = z83.object({
5143
- projectId: z83.string().uuid().describe("Project ID")
5364
+ import { z as z91 } from "zod";
5365
+ var inputSchema88 = z91.object({
5366
+ projectId: z91.string().uuid().describe("Project ID")
5144
5367
  });
5145
5368
  var projectsGet = {
5146
5369
  name: "projects.get",
5147
5370
  group: "projects",
5148
5371
  description: "Get details of a specific project",
5149
- inputSchema: inputSchema80,
5150
- outputSchema: z83.any(),
5372
+ inputSchema: inputSchema88,
5373
+ outputSchema: z91.any(),
5151
5374
  annotations: { readOnlyHint: true },
5152
5375
  async execute(input, ctx) {
5153
5376
  return ctx.client.get("project", {
@@ -5161,16 +5384,16 @@ var projectsGet = {
5161
5384
  };
5162
5385
 
5163
5386
  // src/commands/projects/leave.ts
5164
- import { z as z84 } from "zod";
5165
- var inputSchema81 = z84.object({
5166
- projectId: z84.string().uuid().describe("Project ID to leave")
5387
+ import { z as z92 } from "zod";
5388
+ var inputSchema89 = z92.object({
5389
+ projectId: z92.string().uuid().describe("Project ID to leave")
5167
5390
  });
5168
5391
  var projectsLeave = {
5169
5392
  name: "projects.leave",
5170
5393
  group: "projects",
5171
5394
  description: "Leave a project",
5172
- inputSchema: inputSchema81,
5173
- outputSchema: z84.any(),
5395
+ inputSchema: inputSchema89,
5396
+ outputSchema: z92.any(),
5174
5397
  annotations: { destructiveHint: true },
5175
5398
  async execute(input, ctx) {
5176
5399
  return ctx.client.post("project_leave", void 0, {
@@ -5184,16 +5407,16 @@ var projectsLeave = {
5184
5407
  };
5185
5408
 
5186
5409
  // src/commands/projects/list.ts
5187
- import { z as z85 } from "zod";
5188
- var inputSchema82 = z85.object({
5410
+ import { z as z93 } from "zod";
5411
+ var inputSchema90 = z93.object({
5189
5412
  ...paginationInput
5190
5413
  });
5191
5414
  var projectsList = {
5192
5415
  name: "projects.list",
5193
5416
  group: "projects",
5194
5417
  description: "List all projects accessible to the current user",
5195
- inputSchema: inputSchema82,
5196
- outputSchema: z85.any(),
5418
+ inputSchema: inputSchema90,
5419
+ outputSchema: z93.any(),
5197
5420
  annotations: { readOnlyHint: true },
5198
5421
  async execute(input, ctx) {
5199
5422
  return ctx.client.get("projects", {
@@ -5207,16 +5430,16 @@ var projectsList = {
5207
5430
  };
5208
5431
 
5209
5432
  // src/commands/projects/members.ts
5210
- import { z as z86 } from "zod";
5211
- var inputSchema83 = z86.object({
5212
- projectId: z86.string().uuid().describe("Project ID")
5433
+ import { z as z94 } from "zod";
5434
+ var inputSchema91 = z94.object({
5435
+ projectId: z94.string().uuid().describe("Project ID")
5213
5436
  });
5214
5437
  var projectsMembers = {
5215
5438
  name: "projects.members",
5216
5439
  group: "projects",
5217
5440
  description: "List members of a project",
5218
- inputSchema: inputSchema83,
5219
- outputSchema: z86.any(),
5441
+ inputSchema: inputSchema91,
5442
+ outputSchema: z94.any(),
5220
5443
  annotations: { readOnlyHint: true },
5221
5444
  async execute(input, ctx) {
5222
5445
  return ctx.client.get("project_members", {
@@ -5230,17 +5453,17 @@ var projectsMembers = {
5230
5453
  };
5231
5454
 
5232
5455
  // src/commands/projects/remove-member.ts
5233
- import { z as z87 } from "zod";
5234
- var inputSchema84 = z87.object({
5235
- projectId: z87.string().uuid().describe("Project ID"),
5236
- userId: z87.string().uuid().describe("User ID to remove")
5456
+ import { z as z95 } from "zod";
5457
+ var inputSchema92 = z95.object({
5458
+ projectId: z95.string().uuid().describe("Project ID"),
5459
+ userId: z95.string().uuid().describe("User ID to remove")
5237
5460
  });
5238
5461
  var projectsRemoveMember = {
5239
5462
  name: "projects.removeMember",
5240
5463
  group: "projects",
5241
5464
  description: "Remove a member from a project",
5242
- inputSchema: inputSchema84,
5243
- outputSchema: z87.any(),
5465
+ inputSchema: inputSchema92,
5466
+ outputSchema: z95.any(),
5244
5467
  annotations: { destructiveHint: true },
5245
5468
  async execute(input, ctx) {
5246
5469
  await ctx.client.del("project_member", {
@@ -5256,19 +5479,19 @@ var projectsRemoveMember = {
5256
5479
 
5257
5480
  // src/commands/projects/update.ts
5258
5481
  init_errors();
5259
- import { z as z88 } from "zod";
5260
- var inputSchema85 = z88.object({
5261
- projectId: z88.string().uuid().describe("Project ID"),
5262
- name: z88.string().min(1).optional().describe("New project name"),
5263
- description: z88.string().optional().describe("New project description"),
5264
- icon: z88.string().optional().describe("New project icon")
5482
+ import { z as z96 } from "zod";
5483
+ var inputSchema93 = z96.object({
5484
+ projectId: z96.string().uuid().describe("Project ID"),
5485
+ name: z96.string().min(1).optional().describe("New project name"),
5486
+ description: z96.string().optional().describe("New project description"),
5487
+ icon: z96.string().optional().describe("New project icon")
5265
5488
  });
5266
5489
  var projectsUpdate = {
5267
5490
  name: "projects.update",
5268
5491
  group: "projects",
5269
5492
  description: "Update an existing project",
5270
- inputSchema: inputSchema85,
5271
- outputSchema: z88.any(),
5493
+ inputSchema: inputSchema93,
5494
+ outputSchema: z96.any(),
5272
5495
  annotations: { idempotentHint: true },
5273
5496
  async execute(input, ctx) {
5274
5497
  const { projectId, ...fields } = input;
@@ -5289,18 +5512,18 @@ var projectsUpdate = {
5289
5512
  };
5290
5513
 
5291
5514
  // src/commands/projects/update-role.ts
5292
- import { z as z89 } from "zod";
5293
- var inputSchema86 = z89.object({
5294
- projectId: z89.string().uuid().describe("Project ID"),
5295
- userId: z89.string().uuid().describe("User ID of the member"),
5296
- role: z89.string().min(1).describe("New role to assign")
5515
+ import { z as z97 } from "zod";
5516
+ var inputSchema94 = z97.object({
5517
+ projectId: z97.string().uuid().describe("Project ID"),
5518
+ userId: z97.string().uuid().describe("User ID of the member"),
5519
+ role: z97.string().min(1).describe("New role to assign")
5297
5520
  });
5298
5521
  var projectsUpdateRole = {
5299
5522
  name: "projects.updateRole",
5300
5523
  group: "projects",
5301
5524
  description: "Update a project member's role",
5302
- inputSchema: inputSchema86,
5303
- outputSchema: z89.any(),
5525
+ inputSchema: inputSchema94,
5526
+ outputSchema: z97.any(),
5304
5527
  annotations: { idempotentHint: true },
5305
5528
  async execute(input, ctx) {
5306
5529
  return ctx.client.put(
@@ -5332,19 +5555,19 @@ function registerProjectCommands() {
5332
5555
  }
5333
5556
 
5334
5557
  // src/commands/protocols/generate.ts
5335
- import { z as z90 } from "zod";
5336
- var inputSchema87 = z90.object({
5337
- description: z90.string().min(10).max(5e3).describe("Protocol description"),
5338
- title: z90.string().max(200).optional().describe("Task title (defaults to first 100 chars of description)"),
5339
- project: z90.string().uuid().optional().describe("Project UUID to associate with")
5558
+ import { z as z98 } from "zod";
5559
+ var inputSchema95 = z98.object({
5560
+ description: z98.string().min(10).max(5e3).describe("Protocol description"),
5561
+ title: z98.string().max(200).optional().describe("Task title (defaults to first 100 chars of description)"),
5562
+ project: z98.string().uuid().optional().describe("Project UUID to associate with")
5340
5563
  });
5341
5564
  var protocolsGenerate = {
5342
5565
  name: "protocols.generate",
5343
5566
  group: "protocols",
5344
5567
  description: "Generate a bioprotocol \u2014 creates a task and sends the description in one call. Returns the task and the queued user message, NOT the AI response; the agent processes asynchronously. To get the generated protocol, poll elnora_tasks_messages with the returned task id every 5-10s until the last message has role 'assistant' with metadata.status 'completed'. Timeout after 5 min.",
5345
5568
  stdinField: "description",
5346
- inputSchema: inputSchema87,
5347
- outputSchema: z90.any(),
5569
+ inputSchema: inputSchema95,
5570
+ outputSchema: z98.any(),
5348
5571
  annotations: { mcpScopes: ["tasks:write", "messages:write"] },
5349
5572
  async execute(input, ctx) {
5350
5573
  const body = { title: input.title || input.description.slice(0, 100) };
@@ -5378,9 +5601,9 @@ function registerProtocolCommands() {
5378
5601
  }
5379
5602
 
5380
5603
  // src/commands/search/all.ts
5381
- import { z as z91 } from "zod";
5382
- var inputSchema88 = z91.object({
5383
- query: z91.string().min(1).describe("Search query"),
5604
+ import { z as z99 } from "zod";
5605
+ var inputSchema96 = z99.object({
5606
+ query: z99.string().min(1).describe("Search query"),
5384
5607
  ...paginationInput
5385
5608
  });
5386
5609
  var searchAll = {
@@ -5388,8 +5611,8 @@ var searchAll = {
5388
5611
  group: "search",
5389
5612
  description: "Search across all entities",
5390
5613
  stdinField: "query",
5391
- inputSchema: inputSchema88,
5392
- outputSchema: z91.any(),
5614
+ inputSchema: inputSchema96,
5615
+ outputSchema: z99.any(),
5393
5616
  annotations: { readOnlyHint: true },
5394
5617
  async execute(input, ctx) {
5395
5618
  return ctx.client.get("search_all", {
@@ -5403,10 +5626,10 @@ var searchAll = {
5403
5626
  };
5404
5627
 
5405
5628
  // src/commands/search/file-content.ts
5406
- import { z as z92 } from "zod";
5407
- var inputSchema89 = z92.object({
5408
- query: z92.string().min(1).describe("Search query"),
5409
- projectId: z92.string().uuid().optional().describe("Filter by project ID"),
5629
+ import { z as z100 } from "zod";
5630
+ var inputSchema97 = z100.object({
5631
+ query: z100.string().min(1).describe("Search query"),
5632
+ projectId: z100.string().uuid().optional().describe("Filter by project ID"),
5410
5633
  ...paginationInput
5411
5634
  });
5412
5635
  var searchFileContent = {
@@ -5414,8 +5637,8 @@ var searchFileContent = {
5414
5637
  group: "search",
5415
5638
  description: "Search within file contents",
5416
5639
  stdinField: "query",
5417
- inputSchema: inputSchema89,
5418
- outputSchema: z92.any(),
5640
+ inputSchema: inputSchema97,
5641
+ outputSchema: z100.any(),
5419
5642
  annotations: { readOnlyHint: true },
5420
5643
  async execute(input, ctx) {
5421
5644
  const queryParams = {
@@ -5433,9 +5656,9 @@ var searchFileContent = {
5433
5656
  };
5434
5657
 
5435
5658
  // src/commands/search/files.ts
5436
- import { z as z93 } from "zod";
5437
- var inputSchema90 = z93.object({
5438
- query: z93.string().min(1).describe("Search query"),
5659
+ import { z as z101 } from "zod";
5660
+ var inputSchema98 = z101.object({
5661
+ query: z101.string().min(1).describe("Search query"),
5439
5662
  ...paginationInput
5440
5663
  });
5441
5664
  var searchFiles = {
@@ -5443,8 +5666,8 @@ var searchFiles = {
5443
5666
  group: "search",
5444
5667
  description: "Search files by query",
5445
5668
  stdinField: "query",
5446
- inputSchema: inputSchema90,
5447
- outputSchema: z93.any(),
5669
+ inputSchema: inputSchema98,
5670
+ outputSchema: z101.any(),
5448
5671
  annotations: { readOnlyHint: true },
5449
5672
  async execute(input, ctx) {
5450
5673
  return ctx.client.get("search_files", {
@@ -5458,9 +5681,9 @@ var searchFiles = {
5458
5681
  };
5459
5682
 
5460
5683
  // src/commands/search/tasks.ts
5461
- import { z as z94 } from "zod";
5462
- var inputSchema91 = z94.object({
5463
- query: z94.string().min(1).describe("Search query"),
5684
+ import { z as z102 } from "zod";
5685
+ var inputSchema99 = z102.object({
5686
+ query: z102.string().min(1).describe("Search query"),
5464
5687
  ...paginationInput
5465
5688
  });
5466
5689
  var searchTasks = {
@@ -5468,8 +5691,8 @@ var searchTasks = {
5468
5691
  group: "search",
5469
5692
  description: "Search tasks by query",
5470
5693
  stdinField: "query",
5471
- inputSchema: inputSchema91,
5472
- outputSchema: z94.any(),
5694
+ inputSchema: inputSchema99,
5695
+ outputSchema: z102.any(),
5473
5696
  annotations: { readOnlyHint: true },
5474
5697
  async execute(input, ctx) {
5475
5698
  return ctx.client.get("search_tasks", {
@@ -5488,16 +5711,16 @@ function registerSearchCommands() {
5488
5711
  }
5489
5712
 
5490
5713
  // src/commands/tasks/archive.ts
5491
- import { z as z95 } from "zod";
5492
- var inputSchema92 = z95.object({
5493
- taskId: z95.string().uuid().describe("Task ID to archive")
5714
+ import { z as z103 } from "zod";
5715
+ var inputSchema100 = z103.object({
5716
+ taskId: z103.string().uuid().describe("Task ID to archive")
5494
5717
  });
5495
5718
  var tasksArchive = {
5496
5719
  name: "tasks.archive",
5497
5720
  group: "tasks",
5498
5721
  description: "Archive (delete) a task",
5499
- inputSchema: inputSchema92,
5500
- outputSchema: z95.any(),
5722
+ inputSchema: inputSchema100,
5723
+ outputSchema: z103.any(),
5501
5724
  annotations: { destructiveHint: true },
5502
5725
  async execute(input, ctx) {
5503
5726
  await ctx.client.del("task", {
@@ -5512,7 +5735,7 @@ var tasksArchive = {
5512
5735
  };
5513
5736
 
5514
5737
  // src/commands/tasks/create.ts
5515
- import { z as z96 } from "zod";
5738
+ import { z as z104 } from "zod";
5516
5739
 
5517
5740
  // src/lib/poll.ts
5518
5741
  init_errors();
@@ -5718,20 +5941,20 @@ ${this.useColor ? pc5.yellow("Stream timed out.") : "Stream timed out."}
5718
5941
  };
5719
5942
 
5720
5943
  // src/commands/tasks/create.ts
5721
- var inputSchema93 = z96.object({
5722
- project: z96.string().uuid().optional().describe("Project ID (optional; defaults to your workspace)"),
5723
- title: z96.string().optional().describe("Task title"),
5724
- message: z96.string().optional().describe("Initial message"),
5725
- wait: z96.boolean().default(false).describe("Wait for agent response (polling)"),
5726
- stream: z96.boolean().default(false).describe("Stream agent response in real-time (SSE)")
5944
+ var inputSchema101 = z104.object({
5945
+ project: z104.string().uuid().optional().describe("Project ID (optional; defaults to your workspace)"),
5946
+ title: z104.string().optional().describe("Task title"),
5947
+ message: z104.string().optional().describe("Initial message"),
5948
+ wait: z104.boolean().default(false).describe("Wait for agent response (polling)"),
5949
+ stream: z104.boolean().default(false).describe("Stream agent response in real-time (SSE)")
5727
5950
  });
5728
5951
  var tasksCreate = {
5729
5952
  name: "tasks.create",
5730
5953
  group: "tasks",
5731
5954
  description: "Create a new task in a project. If a message is provided it is queued, but the AI response is NOT returned \u2014 the agent processes asynchronously. Poll elnora_tasks_messages every 5-10s until the last message has role 'assistant' with metadata.status 'completed'. Timeout after 5 min.",
5732
5955
  stdinField: "message",
5733
- inputSchema: inputSchema93,
5734
- outputSchema: z96.any(),
5956
+ inputSchema: inputSchema101,
5957
+ outputSchema: z104.any(),
5735
5958
  async execute(input, ctx) {
5736
5959
  const result = await ctx.client.post("tasks", {
5737
5960
  // projectId is optional (ELN-880 Phase C): when omitted the backend creates the
@@ -5783,16 +6006,16 @@ var tasksCreate = {
5783
6006
  };
5784
6007
 
5785
6008
  // src/commands/tasks/get.ts
5786
- import { z as z97 } from "zod";
5787
- var inputSchema94 = z97.object({
5788
- taskId: z97.string().uuid().describe("Task ID")
6009
+ import { z as z105 } from "zod";
6010
+ var inputSchema102 = z105.object({
6011
+ taskId: z105.string().uuid().describe("Task ID")
5789
6012
  });
5790
6013
  var tasksGet = {
5791
6014
  name: "tasks.get",
5792
6015
  group: "tasks",
5793
6016
  description: "Get details of a specific task",
5794
- inputSchema: inputSchema94,
5795
- outputSchema: z97.any(),
6017
+ inputSchema: inputSchema102,
6018
+ outputSchema: z105.any(),
5796
6019
  annotations: { readOnlyHint: true },
5797
6020
  async execute(input, ctx) {
5798
6021
  return ctx.client.get("task", {
@@ -5806,17 +6029,17 @@ var tasksGet = {
5806
6029
  };
5807
6030
 
5808
6031
  // src/commands/tasks/list.ts
5809
- import { z as z98 } from "zod";
5810
- var inputSchema95 = z98.object({
5811
- project: z98.string().uuid().optional().describe("Project ID to filter by"),
6032
+ import { z as z106 } from "zod";
6033
+ var inputSchema103 = z106.object({
6034
+ project: z106.string().uuid().optional().describe("Project ID to filter by"),
5812
6035
  ...paginationInput
5813
6036
  });
5814
6037
  var tasksList = {
5815
6038
  name: "tasks.list",
5816
6039
  group: "tasks",
5817
6040
  description: "List tasks, optionally filtered by project",
5818
- inputSchema: inputSchema95,
5819
- outputSchema: z98.any(),
6041
+ inputSchema: inputSchema103,
6042
+ outputSchema: z106.any(),
5820
6043
  annotations: { readOnlyHint: true },
5821
6044
  async execute(input, ctx) {
5822
6045
  if (input.project) {
@@ -5836,18 +6059,18 @@ var tasksList = {
5836
6059
  };
5837
6060
 
5838
6061
  // src/commands/tasks/messages.ts
5839
- import { z as z99 } from "zod";
5840
- var inputSchema96 = z99.object({
5841
- taskId: z99.string().uuid().describe("Task ID"),
5842
- cursor: z99.string().optional().describe("Pagination cursor"),
5843
- limit: z99.number().int().min(1).max(100).default(50).describe("Results per page")
6062
+ import { z as z107 } from "zod";
6063
+ var inputSchema104 = z107.object({
6064
+ taskId: z107.string().uuid().describe("Task ID"),
6065
+ cursor: z107.string().optional().describe("Pagination cursor"),
6066
+ limit: z107.number().int().min(1).max(100).default(50).describe("Results per page")
5844
6067
  });
5845
6068
  var tasksMessages = {
5846
6069
  name: "tasks.messages",
5847
6070
  group: "tasks",
5848
6071
  description: "List messages for a task",
5849
- inputSchema: inputSchema96,
5850
- outputSchema: z99.any(),
6072
+ inputSchema: inputSchema104,
6073
+ outputSchema: z107.any(),
5851
6074
  annotations: { readOnlyHint: true },
5852
6075
  async execute(input, ctx) {
5853
6076
  const queryParams = { limit: input.limit };
@@ -5866,23 +6089,23 @@ var tasksMessages = {
5866
6089
  };
5867
6090
 
5868
6091
  // src/commands/tasks/send.ts
5869
- import { z as z100 } from "zod";
6092
+ import { z as z108 } from "zod";
5870
6093
  init_profiles();
5871
6094
  var UUID_RE2 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
5872
- var inputSchema97 = z100.object({
5873
- taskId: z100.string().uuid().describe("Task ID"),
5874
- message: z100.string().min(1).describe("Message content"),
5875
- fileRefs: z100.string().optional().describe("Comma-separated file reference UUIDs"),
5876
- wait: z100.boolean().default(false).describe("Wait for agent response (polling)"),
5877
- stream: z100.boolean().default(false).describe("Stream agent response in real-time (SSE)")
6095
+ var inputSchema105 = z108.object({
6096
+ taskId: z108.string().uuid().describe("Task ID"),
6097
+ message: z108.string().min(1).describe("Message content"),
6098
+ fileRefs: z108.string().optional().describe("Comma-separated file reference UUIDs"),
6099
+ wait: z108.boolean().default(false).describe("Wait for agent response (polling)"),
6100
+ stream: z108.boolean().default(false).describe("Stream agent response in real-time (SSE)")
5878
6101
  });
5879
6102
  var tasksSend = {
5880
6103
  name: "tasks.send",
5881
6104
  group: "tasks",
5882
6105
  description: "Send a message to a task. Returns the created user message immediately \u2014 the agent processes asynchronously. To get the AI response, poll elnora_tasks_messages until the last message has role 'assistant' with metadata.status 'completed'. Poll every 5-10s, timeout after 5 min.",
5883
6106
  stdinField: "message",
5884
- inputSchema: inputSchema97,
5885
- outputSchema: z100.any(),
6107
+ inputSchema: inputSchema105,
6108
+ outputSchema: z108.any(),
5886
6109
  async execute(input, ctx) {
5887
6110
  let referencedFileIds;
5888
6111
  if (input.fileRefs) {
@@ -5939,18 +6162,18 @@ var tasksSend = {
5939
6162
 
5940
6163
  // src/commands/tasks/update.ts
5941
6164
  init_errors();
5942
- import { z as z101 } from "zod";
5943
- var inputSchema98 = z101.object({
5944
- taskId: z101.string().uuid().describe("Task ID"),
5945
- title: z101.string().min(1).optional().describe("New task title"),
5946
- status: z101.string().optional().describe("New task status")
6165
+ import { z as z109 } from "zod";
6166
+ var inputSchema106 = z109.object({
6167
+ taskId: z109.string().uuid().describe("Task ID"),
6168
+ title: z109.string().min(1).optional().describe("New task title"),
6169
+ status: z109.string().optional().describe("New task status")
5947
6170
  });
5948
6171
  var tasksUpdate = {
5949
6172
  name: "tasks.update",
5950
6173
  group: "tasks",
5951
6174
  description: "Update an existing task",
5952
- inputSchema: inputSchema98,
5953
- outputSchema: z101.any(),
6175
+ inputSchema: inputSchema106,
6176
+ outputSchema: z109.any(),
5954
6177
  annotations: { idempotentHint: true },
5955
6178
  async execute(input, ctx) {
5956
6179
  const { taskId, ...fields } = input;