@elnora-ai/cli 2.2.1 → 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.
- package/README.md +1 -0
- package/dist/cli.js +707 -380
- 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.
|
|
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,10 +66,23 @@ 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
|
-
|
|
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",
|
|
74
|
+
// Folders (closure-table Knowledge Base — the `folder`/`folder_move` paths are shared with the
|
|
75
|
+
// legacy controller; the KB read/mutation verbs are distinguished by HTTP method at the call site)
|
|
70
76
|
folder: "/folders/{id}",
|
|
71
77
|
folder_move: "/folders/{id}/move",
|
|
72
78
|
folders_files: "/folders/files",
|
|
79
|
+
folder_roots: "/folders/roots",
|
|
80
|
+
folder_children: "/folders/{id}/children",
|
|
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",
|
|
73
86
|
// Organizations
|
|
74
87
|
organizations: "/organizations",
|
|
75
88
|
organization: "/organizations/{id}",
|
|
@@ -81,6 +94,7 @@ var init_config = __esm({
|
|
|
81
94
|
organization_set_default: "/organizations/{id}/set-default",
|
|
82
95
|
organizations_all: "/organizations/all",
|
|
83
96
|
org_files: "/organizations/{orgId}/files",
|
|
97
|
+
org_member_directory: "/organizations/{orgId}/members/directory",
|
|
84
98
|
// Organization invitations
|
|
85
99
|
org_invitations: "/organizations/{orgId}/invitations",
|
|
86
100
|
org_invitation: "/organizations/{orgId}/invitations/{invId}",
|
|
@@ -3734,18 +3748,44 @@ var filesList = {
|
|
|
3734
3748
|
}
|
|
3735
3749
|
};
|
|
3736
3750
|
|
|
3737
|
-
// src/commands/files/
|
|
3751
|
+
// src/commands/files/move.ts
|
|
3738
3752
|
import { z as z34 } from "zod";
|
|
3739
3753
|
var inputSchema32 = z34.object({
|
|
3740
|
-
fileId: z34.string().uuid().describe("File ID"),
|
|
3741
|
-
|
|
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")
|
|
3742
3782
|
});
|
|
3743
3783
|
var filesPromote = {
|
|
3744
3784
|
name: "files.promote",
|
|
3745
3785
|
group: "files",
|
|
3746
3786
|
description: "Promote a file to a new visibility level",
|
|
3747
|
-
inputSchema:
|
|
3748
|
-
outputSchema:
|
|
3787
|
+
inputSchema: inputSchema33,
|
|
3788
|
+
outputSchema: z35.any(),
|
|
3749
3789
|
async execute(input, ctx) {
|
|
3750
3790
|
return ctx.client.post(
|
|
3751
3791
|
"file_promote",
|
|
@@ -3762,17 +3802,17 @@ var filesPromote = {
|
|
|
3762
3802
|
};
|
|
3763
3803
|
|
|
3764
3804
|
// src/commands/files/restore.ts
|
|
3765
|
-
import { z as
|
|
3766
|
-
var
|
|
3767
|
-
fileId:
|
|
3768
|
-
versionId:
|
|
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")
|
|
3769
3809
|
});
|
|
3770
3810
|
var filesRestore = {
|
|
3771
3811
|
name: "files.restore",
|
|
3772
3812
|
group: "files",
|
|
3773
3813
|
description: "Restore a file to a specific version",
|
|
3774
|
-
inputSchema:
|
|
3775
|
-
outputSchema:
|
|
3814
|
+
inputSchema: inputSchema34,
|
|
3815
|
+
outputSchema: z36.any(),
|
|
3776
3816
|
async execute(input, ctx) {
|
|
3777
3817
|
return ctx.client.post("file_version_restore", void 0, {
|
|
3778
3818
|
pathParams: { id: input.fileId, vid: input.versionId }
|
|
@@ -3785,18 +3825,18 @@ var filesRestore = {
|
|
|
3785
3825
|
};
|
|
3786
3826
|
|
|
3787
3827
|
// src/commands/files/search-content.ts
|
|
3788
|
-
import { z as
|
|
3789
|
-
var
|
|
3790
|
-
query:
|
|
3791
|
-
project:
|
|
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"),
|
|
3792
3832
|
...paginationInput
|
|
3793
3833
|
});
|
|
3794
3834
|
var filesSearchContent = {
|
|
3795
3835
|
name: "files.searchContent",
|
|
3796
3836
|
group: "files",
|
|
3797
3837
|
description: "Search file content across projects",
|
|
3798
|
-
inputSchema:
|
|
3799
|
-
outputSchema:
|
|
3838
|
+
inputSchema: inputSchema35,
|
|
3839
|
+
outputSchema: z37.any(),
|
|
3800
3840
|
annotations: { readOnlyHint: true },
|
|
3801
3841
|
async execute(input, ctx) {
|
|
3802
3842
|
const queryParams = {
|
|
@@ -3813,20 +3853,97 @@ var filesSearchContent = {
|
|
|
3813
3853
|
}
|
|
3814
3854
|
};
|
|
3815
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
|
+
|
|
3816
3933
|
// src/commands/files/update.ts
|
|
3817
3934
|
init_errors();
|
|
3818
|
-
import { z as
|
|
3819
|
-
var
|
|
3820
|
-
fileId:
|
|
3821
|
-
name:
|
|
3822
|
-
folder:
|
|
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")
|
|
3823
3940
|
});
|
|
3824
3941
|
var filesUpdate = {
|
|
3825
3942
|
name: "files.update",
|
|
3826
3943
|
group: "files",
|
|
3827
3944
|
description: "Update a file's metadata",
|
|
3828
|
-
inputSchema:
|
|
3829
|
-
outputSchema:
|
|
3945
|
+
inputSchema: inputSchema39,
|
|
3946
|
+
outputSchema: z41.any(),
|
|
3830
3947
|
annotations: { idempotentHint: true },
|
|
3831
3948
|
async execute(input, ctx) {
|
|
3832
3949
|
const { fileId, ...fields } = input;
|
|
@@ -3853,19 +3970,19 @@ var filesUpdate = {
|
|
|
3853
3970
|
init_client();
|
|
3854
3971
|
import { readFileSync as readFileSync6, statSync as statSync3 } from "node:fs";
|
|
3855
3972
|
import { basename } from "node:path";
|
|
3856
|
-
import { z as
|
|
3857
|
-
var
|
|
3858
|
-
project:
|
|
3859
|
-
filePath:
|
|
3860
|
-
fileName:
|
|
3861
|
-
contentType:
|
|
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")
|
|
3862
3979
|
});
|
|
3863
3980
|
var filesUpload = {
|
|
3864
3981
|
name: "files.upload",
|
|
3865
3982
|
group: "files",
|
|
3866
3983
|
description: "Upload a file to a project (three-stage: presign, PUT, confirm)",
|
|
3867
|
-
inputSchema:
|
|
3868
|
-
outputSchema:
|
|
3984
|
+
inputSchema: inputSchema40,
|
|
3985
|
+
outputSchema: z42.any(),
|
|
3869
3986
|
async execute(input, ctx) {
|
|
3870
3987
|
const fileBuffer = readFileSync6(input.filePath);
|
|
3871
3988
|
const fileName = input.fileName ?? basename(input.filePath);
|
|
@@ -3900,18 +4017,18 @@ init_client();
|
|
|
3900
4017
|
init_errors();
|
|
3901
4018
|
import { readFileSync as readFileSync7, statSync as statSync4 } from "node:fs";
|
|
3902
4019
|
import { basename as basename2 } from "node:path";
|
|
3903
|
-
import { z as
|
|
3904
|
-
var
|
|
3905
|
-
project:
|
|
3906
|
-
filePaths:
|
|
3907
|
-
folder:
|
|
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")
|
|
3908
4025
|
});
|
|
3909
4026
|
var filesUploadBatch = {
|
|
3910
4027
|
name: "files.uploadBatch",
|
|
3911
4028
|
group: "files",
|
|
3912
4029
|
description: "Upload multiple files to a project (max 50)",
|
|
3913
|
-
inputSchema:
|
|
3914
|
-
outputSchema:
|
|
4030
|
+
inputSchema: inputSchema41,
|
|
4031
|
+
outputSchema: z43.any(),
|
|
3915
4032
|
async execute(input, ctx) {
|
|
3916
4033
|
const paths = input.filePaths.split(",").map((p) => p.trim()).filter(Boolean);
|
|
3917
4034
|
if (paths.length === 0) {
|
|
@@ -3969,17 +4086,17 @@ var filesUploadBatch = {
|
|
|
3969
4086
|
};
|
|
3970
4087
|
|
|
3971
4088
|
// src/commands/files/version-content.ts
|
|
3972
|
-
import { z as
|
|
3973
|
-
var
|
|
3974
|
-
fileId:
|
|
3975
|
-
versionId:
|
|
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")
|
|
3976
4093
|
});
|
|
3977
4094
|
var filesVersionContent = {
|
|
3978
4095
|
name: "files.versionContent",
|
|
3979
4096
|
group: "files",
|
|
3980
4097
|
description: "Get the raw content of a specific file version",
|
|
3981
|
-
inputSchema:
|
|
3982
|
-
outputSchema:
|
|
4098
|
+
inputSchema: inputSchema42,
|
|
4099
|
+
outputSchema: z44.any(),
|
|
3983
4100
|
annotations: { readOnlyHint: true },
|
|
3984
4101
|
async execute(input, ctx) {
|
|
3985
4102
|
return ctx.client.get("file_version_content", {
|
|
@@ -3993,17 +4110,17 @@ var filesVersionContent = {
|
|
|
3993
4110
|
};
|
|
3994
4111
|
|
|
3995
4112
|
// src/commands/files/versions.ts
|
|
3996
|
-
import { z as
|
|
3997
|
-
var
|
|
3998
|
-
fileId:
|
|
4113
|
+
import { z as z45 } from "zod";
|
|
4114
|
+
var inputSchema43 = z45.object({
|
|
4115
|
+
fileId: z45.string().uuid().describe("File ID"),
|
|
3999
4116
|
...paginationInput
|
|
4000
4117
|
});
|
|
4001
4118
|
var filesVersions = {
|
|
4002
4119
|
name: "files.versions",
|
|
4003
4120
|
group: "files",
|
|
4004
4121
|
description: "List versions of a file",
|
|
4005
|
-
inputSchema:
|
|
4006
|
-
outputSchema:
|
|
4122
|
+
inputSchema: inputSchema43,
|
|
4123
|
+
outputSchema: z45.any(),
|
|
4007
4124
|
annotations: { readOnlyHint: true },
|
|
4008
4125
|
async execute(input, ctx) {
|
|
4009
4126
|
return ctx.client.get("file_versions", {
|
|
@@ -4018,17 +4135,17 @@ var filesVersions = {
|
|
|
4018
4135
|
};
|
|
4019
4136
|
|
|
4020
4137
|
// src/commands/files/working-copy.ts
|
|
4021
|
-
import { z as
|
|
4022
|
-
var
|
|
4023
|
-
fileId:
|
|
4024
|
-
task:
|
|
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")
|
|
4025
4142
|
});
|
|
4026
4143
|
var filesWorkingCopy = {
|
|
4027
4144
|
name: "files.workingCopy",
|
|
4028
4145
|
group: "files",
|
|
4029
4146
|
description: "Create a working copy of a file",
|
|
4030
|
-
inputSchema:
|
|
4031
|
-
outputSchema:
|
|
4147
|
+
inputSchema: inputSchema44,
|
|
4148
|
+
outputSchema: z46.any(),
|
|
4032
4149
|
async execute(input, ctx) {
|
|
4033
4150
|
const body = {};
|
|
4034
4151
|
if (input.task !== void 0) body.taskId = input.task;
|
|
@@ -4063,21 +4180,25 @@ function registerFileCommands() {
|
|
|
4063
4180
|
filesFork,
|
|
4064
4181
|
filesWorkingCopy,
|
|
4065
4182
|
filesCommit,
|
|
4066
|
-
filesSearchContent
|
|
4183
|
+
filesSearchContent,
|
|
4184
|
+
filesMove,
|
|
4185
|
+
filesShare,
|
|
4186
|
+
filesUnshare,
|
|
4187
|
+
filesShares
|
|
4067
4188
|
];
|
|
4068
4189
|
}
|
|
4069
4190
|
|
|
4070
4191
|
// src/commands/flags/get.ts
|
|
4071
|
-
import { z as
|
|
4072
|
-
var
|
|
4073
|
-
key:
|
|
4192
|
+
import { z as z47 } from "zod";
|
|
4193
|
+
var inputSchema45 = z47.object({
|
|
4194
|
+
key: z47.string().min(1).describe("Feature flag key")
|
|
4074
4195
|
});
|
|
4075
4196
|
var flagsGet = {
|
|
4076
4197
|
name: "flags.get",
|
|
4077
4198
|
group: "flags",
|
|
4078
4199
|
description: "Get a feature flag by key",
|
|
4079
|
-
inputSchema:
|
|
4080
|
-
outputSchema:
|
|
4200
|
+
inputSchema: inputSchema45,
|
|
4201
|
+
outputSchema: z47.any(),
|
|
4081
4202
|
annotations: { readOnlyHint: true },
|
|
4082
4203
|
async execute(input, ctx) {
|
|
4083
4204
|
return ctx.client.get("feature_flag", {
|
|
@@ -4091,14 +4212,14 @@ var flagsGet = {
|
|
|
4091
4212
|
};
|
|
4092
4213
|
|
|
4093
4214
|
// src/commands/flags/list.ts
|
|
4094
|
-
import { z as
|
|
4095
|
-
var
|
|
4215
|
+
import { z as z48 } from "zod";
|
|
4216
|
+
var inputSchema46 = z48.object({});
|
|
4096
4217
|
var flagsList = {
|
|
4097
4218
|
name: "flags.list",
|
|
4098
4219
|
group: "flags",
|
|
4099
4220
|
description: "List all feature flags",
|
|
4100
|
-
inputSchema:
|
|
4101
|
-
outputSchema:
|
|
4221
|
+
inputSchema: inputSchema46,
|
|
4222
|
+
outputSchema: z48.any(),
|
|
4102
4223
|
annotations: { readOnlyHint: true },
|
|
4103
4224
|
async execute(_input, ctx) {
|
|
4104
4225
|
return ctx.client.get("feature_flags");
|
|
@@ -4110,18 +4231,18 @@ var flagsList = {
|
|
|
4110
4231
|
};
|
|
4111
4232
|
|
|
4112
4233
|
// src/commands/flags/set.ts
|
|
4113
|
-
import { z as
|
|
4114
|
-
var
|
|
4115
|
-
key:
|
|
4116
|
-
value:
|
|
4117
|
-
yes:
|
|
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")
|
|
4118
4239
|
});
|
|
4119
4240
|
var flagsSet = {
|
|
4120
4241
|
name: "flags.set",
|
|
4121
4242
|
group: "flags",
|
|
4122
4243
|
description: "Set a feature flag value",
|
|
4123
|
-
inputSchema:
|
|
4124
|
-
outputSchema:
|
|
4244
|
+
inputSchema: inputSchema47,
|
|
4245
|
+
outputSchema: z49.any(),
|
|
4125
4246
|
async execute(input, ctx) {
|
|
4126
4247
|
if (!input.yes) {
|
|
4127
4248
|
const confirmed = await confirmDestructive(`Set feature flag "${input.key}" to ${input.value}? [y/N] `);
|
|
@@ -4149,19 +4270,42 @@ function registerFlagCommands() {
|
|
|
4149
4270
|
return [flagsList, flagsGet, flagsSet];
|
|
4150
4271
|
}
|
|
4151
4272
|
|
|
4273
|
+
// src/commands/folders/children.ts
|
|
4274
|
+
import { z as z50 } from "zod";
|
|
4275
|
+
var inputSchema48 = z50.object({
|
|
4276
|
+
folderId: z50.string().uuid().describe("Folder ID")
|
|
4277
|
+
});
|
|
4278
|
+
var foldersChildren = {
|
|
4279
|
+
name: "folders.children",
|
|
4280
|
+
group: "folders",
|
|
4281
|
+
description: "List the child folders of a Knowledge Base folder",
|
|
4282
|
+
inputSchema: inputSchema48,
|
|
4283
|
+
outputSchema: z50.any(),
|
|
4284
|
+
annotations: { readOnlyHint: true },
|
|
4285
|
+
async execute(input, ctx) {
|
|
4286
|
+
return ctx.client.get("folder_children", {
|
|
4287
|
+
pathParams: { id: input.folderId }
|
|
4288
|
+
});
|
|
4289
|
+
},
|
|
4290
|
+
formatOutput(output, format) {
|
|
4291
|
+
if (format === "compact") return output.id ?? JSON.stringify(output);
|
|
4292
|
+
return JSON.stringify(output, null, 2);
|
|
4293
|
+
}
|
|
4294
|
+
};
|
|
4295
|
+
|
|
4152
4296
|
// src/commands/folders/create.ts
|
|
4153
|
-
import { z as
|
|
4154
|
-
var
|
|
4155
|
-
projectId:
|
|
4156
|
-
name:
|
|
4157
|
-
parentId:
|
|
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")
|
|
4158
4302
|
});
|
|
4159
4303
|
var foldersCreate = {
|
|
4160
4304
|
name: "folders.create",
|
|
4161
4305
|
group: "folders",
|
|
4162
4306
|
description: "Create a new folder in a project",
|
|
4163
|
-
inputSchema:
|
|
4164
|
-
outputSchema:
|
|
4307
|
+
inputSchema: inputSchema49,
|
|
4308
|
+
outputSchema: z51.any(),
|
|
4165
4309
|
async execute(input, ctx) {
|
|
4166
4310
|
const body = { name: input.name };
|
|
4167
4311
|
if (input.parentId) body.parentId = input.parentId;
|
|
@@ -4176,16 +4320,16 @@ var foldersCreate = {
|
|
|
4176
4320
|
};
|
|
4177
4321
|
|
|
4178
4322
|
// src/commands/folders/delete.ts
|
|
4179
|
-
import { z as
|
|
4180
|
-
var
|
|
4181
|
-
folderId:
|
|
4323
|
+
import { z as z52 } from "zod";
|
|
4324
|
+
var inputSchema50 = z52.object({
|
|
4325
|
+
folderId: z52.string().uuid().describe("Folder ID to delete")
|
|
4182
4326
|
});
|
|
4183
4327
|
var foldersDelete = {
|
|
4184
4328
|
name: "folders.delete",
|
|
4185
4329
|
group: "folders",
|
|
4186
4330
|
description: "Delete a folder",
|
|
4187
|
-
inputSchema:
|
|
4188
|
-
outputSchema:
|
|
4331
|
+
inputSchema: inputSchema50,
|
|
4332
|
+
outputSchema: z52.any(),
|
|
4189
4333
|
annotations: { destructiveHint: true },
|
|
4190
4334
|
async execute(input, ctx) {
|
|
4191
4335
|
await ctx.client.del("folder", {
|
|
@@ -4199,17 +4343,65 @@ var foldersDelete = {
|
|
|
4199
4343
|
}
|
|
4200
4344
|
};
|
|
4201
4345
|
|
|
4346
|
+
// src/commands/folders/files.ts
|
|
4347
|
+
import { z as z53 } from "zod";
|
|
4348
|
+
var inputSchema51 = z53.object({
|
|
4349
|
+
folderId: z53.string().uuid().describe("Folder ID"),
|
|
4350
|
+
...paginationInput
|
|
4351
|
+
});
|
|
4352
|
+
var foldersFiles = {
|
|
4353
|
+
name: "folders.files",
|
|
4354
|
+
group: "folders",
|
|
4355
|
+
description: "List files placed directly in a Knowledge Base folder",
|
|
4356
|
+
inputSchema: inputSchema51,
|
|
4357
|
+
outputSchema: z53.any(),
|
|
4358
|
+
annotations: { readOnlyHint: true },
|
|
4359
|
+
async execute(input, ctx) {
|
|
4360
|
+
return ctx.client.get("folder_files", {
|
|
4361
|
+
pathParams: { id: input.folderId },
|
|
4362
|
+
queryParams: { page: input.page, pageSize: input.pageSize }
|
|
4363
|
+
});
|
|
4364
|
+
},
|
|
4365
|
+
formatOutput(output, format) {
|
|
4366
|
+
if (format === "compact") return output.id ?? JSON.stringify(output);
|
|
4367
|
+
return JSON.stringify(output, null, 2);
|
|
4368
|
+
}
|
|
4369
|
+
};
|
|
4370
|
+
|
|
4371
|
+
// src/commands/folders/get.ts
|
|
4372
|
+
import { z as z54 } from "zod";
|
|
4373
|
+
var inputSchema52 = z54.object({
|
|
4374
|
+
folderId: z54.string().uuid().describe("Folder ID")
|
|
4375
|
+
});
|
|
4376
|
+
var foldersGet = {
|
|
4377
|
+
name: "folders.get",
|
|
4378
|
+
group: "folders",
|
|
4379
|
+
description: "Get a Knowledge Base folder's details and breadcrumb path",
|
|
4380
|
+
inputSchema: inputSchema52,
|
|
4381
|
+
outputSchema: z54.any(),
|
|
4382
|
+
annotations: { readOnlyHint: true },
|
|
4383
|
+
async execute(input, ctx) {
|
|
4384
|
+
return ctx.client.get("folder", {
|
|
4385
|
+
pathParams: { id: input.folderId }
|
|
4386
|
+
});
|
|
4387
|
+
},
|
|
4388
|
+
formatOutput(output, format) {
|
|
4389
|
+
if (format === "compact") return output.id ?? JSON.stringify(output);
|
|
4390
|
+
return JSON.stringify(output, null, 2);
|
|
4391
|
+
}
|
|
4392
|
+
};
|
|
4393
|
+
|
|
4202
4394
|
// src/commands/folders/list.ts
|
|
4203
|
-
import { z as
|
|
4204
|
-
var
|
|
4205
|
-
projectId:
|
|
4395
|
+
import { z as z55 } from "zod";
|
|
4396
|
+
var inputSchema53 = z55.object({
|
|
4397
|
+
projectId: z55.string().uuid().describe("Project ID")
|
|
4206
4398
|
});
|
|
4207
4399
|
var foldersList = {
|
|
4208
4400
|
name: "folders.list",
|
|
4209
4401
|
group: "folders",
|
|
4210
4402
|
description: "List folders in a project",
|
|
4211
|
-
inputSchema:
|
|
4212
|
-
outputSchema:
|
|
4403
|
+
inputSchema: inputSchema53,
|
|
4404
|
+
outputSchema: z55.any(),
|
|
4213
4405
|
annotations: { readOnlyHint: true },
|
|
4214
4406
|
async execute(input, ctx) {
|
|
4215
4407
|
return ctx.client.get("project_folders", {
|
|
@@ -4224,18 +4416,18 @@ var foldersList = {
|
|
|
4224
4416
|
|
|
4225
4417
|
// src/commands/folders/move.ts
|
|
4226
4418
|
init_errors();
|
|
4227
|
-
import { z as
|
|
4419
|
+
import { z as z56 } from "zod";
|
|
4228
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;
|
|
4229
|
-
var
|
|
4230
|
-
folderId:
|
|
4231
|
-
parentId:
|
|
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")
|
|
4232
4424
|
});
|
|
4233
4425
|
var foldersMove = {
|
|
4234
4426
|
name: "folders.move",
|
|
4235
4427
|
group: "folders",
|
|
4236
4428
|
description: "Move a folder to a new parent (or to root)",
|
|
4237
|
-
inputSchema:
|
|
4238
|
-
outputSchema:
|
|
4429
|
+
inputSchema: inputSchema54,
|
|
4430
|
+
outputSchema: z56.any(),
|
|
4239
4431
|
async execute(input, ctx) {
|
|
4240
4432
|
let parentValue;
|
|
4241
4433
|
if (input.parentId === "root") {
|
|
@@ -4263,17 +4455,17 @@ var foldersMove = {
|
|
|
4263
4455
|
};
|
|
4264
4456
|
|
|
4265
4457
|
// src/commands/folders/rename.ts
|
|
4266
|
-
import { z as
|
|
4267
|
-
var
|
|
4268
|
-
folderId:
|
|
4269
|
-
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")
|
|
4270
4462
|
});
|
|
4271
4463
|
var foldersRename = {
|
|
4272
4464
|
name: "folders.rename",
|
|
4273
4465
|
group: "folders",
|
|
4274
4466
|
description: "Rename a folder",
|
|
4275
|
-
inputSchema:
|
|
4276
|
-
outputSchema:
|
|
4467
|
+
inputSchema: inputSchema55,
|
|
4468
|
+
outputSchema: z57.any(),
|
|
4277
4469
|
annotations: { idempotentHint: true },
|
|
4278
4470
|
async execute(input, ctx) {
|
|
4279
4471
|
return ctx.client.put(
|
|
@@ -4290,17 +4482,126 @@ var foldersRename = {
|
|
|
4290
4482
|
}
|
|
4291
4483
|
};
|
|
4292
4484
|
|
|
4485
|
+
// src/commands/folders/roots.ts
|
|
4486
|
+
import { z as z58 } from "zod";
|
|
4487
|
+
var inputSchema56 = z58.object({});
|
|
4488
|
+
var foldersRoots = {
|
|
4489
|
+
name: "folders.roots",
|
|
4490
|
+
group: "folders",
|
|
4491
|
+
description: "List the top-level Knowledge Base folders you can access",
|
|
4492
|
+
inputSchema: inputSchema56,
|
|
4493
|
+
outputSchema: z58.any(),
|
|
4494
|
+
annotations: { readOnlyHint: true },
|
|
4495
|
+
async execute(_input, ctx) {
|
|
4496
|
+
return ctx.client.get("folder_roots");
|
|
4497
|
+
},
|
|
4498
|
+
formatOutput(output, format) {
|
|
4499
|
+
if (format === "compact") return output.id ?? JSON.stringify(output);
|
|
4500
|
+
return JSON.stringify(output, null, 2);
|
|
4501
|
+
}
|
|
4502
|
+
};
|
|
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
|
+
|
|
4293
4581
|
// src/commands/folders/index.ts
|
|
4294
4582
|
function registerFolderCommands() {
|
|
4295
|
-
return [
|
|
4583
|
+
return [
|
|
4584
|
+
foldersRoots,
|
|
4585
|
+
foldersChildren,
|
|
4586
|
+
foldersGet,
|
|
4587
|
+
foldersFiles,
|
|
4588
|
+
foldersList,
|
|
4589
|
+
foldersCreate,
|
|
4590
|
+
foldersRename,
|
|
4591
|
+
foldersMove,
|
|
4592
|
+
foldersDelete,
|
|
4593
|
+
foldersShare,
|
|
4594
|
+
foldersUnshare,
|
|
4595
|
+
foldersShares
|
|
4596
|
+
];
|
|
4296
4597
|
}
|
|
4297
4598
|
|
|
4298
4599
|
// src/commands/health.ts
|
|
4299
|
-
import { z as
|
|
4300
|
-
var healthInput =
|
|
4301
|
-
var healthOutput =
|
|
4302
|
-
status:
|
|
4303
|
-
timestamp:
|
|
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()
|
|
4304
4605
|
});
|
|
4305
4606
|
var healthCheck = {
|
|
4306
4607
|
name: "health.check",
|
|
@@ -4330,18 +4631,18 @@ var healthCheck = {
|
|
|
4330
4631
|
};
|
|
4331
4632
|
|
|
4332
4633
|
// src/commands/library/create-folder.ts
|
|
4333
|
-
import { z as
|
|
4334
|
-
var
|
|
4335
|
-
orgId:
|
|
4336
|
-
name:
|
|
4337
|
-
parent:
|
|
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")
|
|
4338
4639
|
});
|
|
4339
4640
|
var libraryCreateFolder = {
|
|
4340
4641
|
name: "library.createFolder",
|
|
4341
4642
|
group: "library",
|
|
4342
4643
|
description: "Create a folder in the organization library",
|
|
4343
|
-
inputSchema:
|
|
4344
|
-
outputSchema:
|
|
4644
|
+
inputSchema: inputSchema60,
|
|
4645
|
+
outputSchema: z63.any(),
|
|
4345
4646
|
async execute(input, ctx) {
|
|
4346
4647
|
const body = { name: input.name };
|
|
4347
4648
|
if (input.parent) body.parentId = input.parent;
|
|
@@ -4356,17 +4657,17 @@ var libraryCreateFolder = {
|
|
|
4356
4657
|
};
|
|
4357
4658
|
|
|
4358
4659
|
// src/commands/library/delete-folder.ts
|
|
4359
|
-
import { z as
|
|
4360
|
-
var
|
|
4361
|
-
orgId:
|
|
4362
|
-
folderId:
|
|
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")
|
|
4363
4664
|
});
|
|
4364
4665
|
var libraryDeleteFolder = {
|
|
4365
4666
|
name: "library.deleteFolder",
|
|
4366
4667
|
group: "library",
|
|
4367
4668
|
description: "Delete a folder from the organization library",
|
|
4368
|
-
inputSchema:
|
|
4369
|
-
outputSchema:
|
|
4669
|
+
inputSchema: inputSchema61,
|
|
4670
|
+
outputSchema: z64.any(),
|
|
4370
4671
|
annotations: { destructiveHint: true },
|
|
4371
4672
|
async execute(input, ctx) {
|
|
4372
4673
|
await ctx.client.del("library_folder", {
|
|
@@ -4381,17 +4682,17 @@ var libraryDeleteFolder = {
|
|
|
4381
4682
|
};
|
|
4382
4683
|
|
|
4383
4684
|
// src/commands/library/files.ts
|
|
4384
|
-
import { z as
|
|
4385
|
-
var
|
|
4386
|
-
orgId:
|
|
4685
|
+
import { z as z65 } from "zod";
|
|
4686
|
+
var inputSchema62 = z65.object({
|
|
4687
|
+
orgId: z65.string().uuid().describe("Organization ID"),
|
|
4387
4688
|
...paginationInput
|
|
4388
4689
|
});
|
|
4389
4690
|
var libraryFiles = {
|
|
4390
4691
|
name: "library.files",
|
|
4391
4692
|
group: "library",
|
|
4392
4693
|
description: "List files in the organization library",
|
|
4393
|
-
inputSchema:
|
|
4394
|
-
outputSchema:
|
|
4694
|
+
inputSchema: inputSchema62,
|
|
4695
|
+
outputSchema: z65.any(),
|
|
4395
4696
|
annotations: { readOnlyHint: true },
|
|
4396
4697
|
async execute(input, ctx) {
|
|
4397
4698
|
return ctx.client.get("library_files", {
|
|
@@ -4406,16 +4707,16 @@ var libraryFiles = {
|
|
|
4406
4707
|
};
|
|
4407
4708
|
|
|
4408
4709
|
// src/commands/library/folders.ts
|
|
4409
|
-
import { z as
|
|
4410
|
-
var
|
|
4411
|
-
orgId:
|
|
4710
|
+
import { z as z66 } from "zod";
|
|
4711
|
+
var inputSchema63 = z66.object({
|
|
4712
|
+
orgId: z66.string().uuid().describe("Organization ID")
|
|
4412
4713
|
});
|
|
4413
4714
|
var libraryFolders = {
|
|
4414
4715
|
name: "library.folders",
|
|
4415
4716
|
group: "library",
|
|
4416
4717
|
description: "List folders in the organization library",
|
|
4417
|
-
inputSchema:
|
|
4418
|
-
outputSchema:
|
|
4718
|
+
inputSchema: inputSchema63,
|
|
4719
|
+
outputSchema: z66.any(),
|
|
4419
4720
|
annotations: { readOnlyHint: true },
|
|
4420
4721
|
async execute(input, ctx) {
|
|
4421
4722
|
return ctx.client.get("library_folders", {
|
|
@@ -4429,18 +4730,18 @@ var libraryFolders = {
|
|
|
4429
4730
|
};
|
|
4430
4731
|
|
|
4431
4732
|
// src/commands/library/rename-folder.ts
|
|
4432
|
-
import { z as
|
|
4433
|
-
var
|
|
4434
|
-
orgId:
|
|
4435
|
-
folderId:
|
|
4436
|
-
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")
|
|
4437
4738
|
});
|
|
4438
4739
|
var libraryRenameFolder = {
|
|
4439
4740
|
name: "library.renameFolder",
|
|
4440
4741
|
group: "library",
|
|
4441
4742
|
description: "Rename a folder in the organization library",
|
|
4442
|
-
inputSchema:
|
|
4443
|
-
outputSchema:
|
|
4743
|
+
inputSchema: inputSchema64,
|
|
4744
|
+
outputSchema: z67.any(),
|
|
4444
4745
|
async execute(input, ctx) {
|
|
4445
4746
|
return ctx.client.put(
|
|
4446
4747
|
"library_folder",
|
|
@@ -4462,16 +4763,16 @@ function registerLibraryCommands() {
|
|
|
4462
4763
|
}
|
|
4463
4764
|
|
|
4464
4765
|
// src/commands/orgs/accept-invite.ts
|
|
4465
|
-
import { z as
|
|
4466
|
-
var
|
|
4467
|
-
token:
|
|
4766
|
+
import { z as z68 } from "zod";
|
|
4767
|
+
var inputSchema65 = z68.object({
|
|
4768
|
+
token: z68.string().min(1).describe("Invitation token")
|
|
4468
4769
|
});
|
|
4469
4770
|
var orgsAcceptInvite = {
|
|
4470
4771
|
name: "orgs.acceptInvite",
|
|
4471
4772
|
group: "orgs",
|
|
4472
4773
|
description: "Accept an organization invitation by token",
|
|
4473
|
-
inputSchema:
|
|
4474
|
-
outputSchema:
|
|
4774
|
+
inputSchema: inputSchema65,
|
|
4775
|
+
outputSchema: z68.any(),
|
|
4475
4776
|
async execute(input, ctx) {
|
|
4476
4777
|
return ctx.client.post("invitation_accept", void 0, {
|
|
4477
4778
|
pathParams: { token: input.token }
|
|
@@ -4484,16 +4785,16 @@ var orgsAcceptInvite = {
|
|
|
4484
4785
|
};
|
|
4485
4786
|
|
|
4486
4787
|
// src/commands/orgs/billing.ts
|
|
4487
|
-
import { z as
|
|
4488
|
-
var
|
|
4489
|
-
orgId:
|
|
4788
|
+
import { z as z69 } from "zod";
|
|
4789
|
+
var inputSchema66 = z69.object({
|
|
4790
|
+
orgId: z69.string().uuid().describe("Organization ID")
|
|
4490
4791
|
});
|
|
4491
4792
|
var orgsBilling = {
|
|
4492
4793
|
name: "orgs.billing",
|
|
4493
4794
|
group: "orgs",
|
|
4494
4795
|
description: "Get billing status for an organization",
|
|
4495
|
-
inputSchema:
|
|
4496
|
-
outputSchema:
|
|
4796
|
+
inputSchema: inputSchema66,
|
|
4797
|
+
outputSchema: z69.any(),
|
|
4497
4798
|
annotations: { readOnlyHint: true },
|
|
4498
4799
|
async execute(input, ctx) {
|
|
4499
4800
|
return ctx.client.get("organization_billing", {
|
|
@@ -4507,17 +4808,17 @@ var orgsBilling = {
|
|
|
4507
4808
|
};
|
|
4508
4809
|
|
|
4509
4810
|
// src/commands/orgs/cancel-invite.ts
|
|
4510
|
-
import { z as
|
|
4511
|
-
var
|
|
4512
|
-
orgId:
|
|
4513
|
-
invitationId:
|
|
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")
|
|
4514
4815
|
});
|
|
4515
4816
|
var orgsCancelInvite = {
|
|
4516
4817
|
name: "orgs.cancelInvite",
|
|
4517
4818
|
group: "orgs",
|
|
4518
4819
|
description: "Cancel a pending organization invitation",
|
|
4519
|
-
inputSchema:
|
|
4520
|
-
outputSchema:
|
|
4820
|
+
inputSchema: inputSchema67,
|
|
4821
|
+
outputSchema: z70.any(),
|
|
4521
4822
|
annotations: { destructiveHint: true },
|
|
4522
4823
|
async execute(input, ctx) {
|
|
4523
4824
|
await ctx.client.del("org_invitation", {
|
|
@@ -4532,17 +4833,17 @@ var orgsCancelInvite = {
|
|
|
4532
4833
|
};
|
|
4533
4834
|
|
|
4534
4835
|
// src/commands/orgs/create.ts
|
|
4535
|
-
import { z as
|
|
4536
|
-
var
|
|
4537
|
-
name:
|
|
4538
|
-
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")
|
|
4539
4840
|
});
|
|
4540
4841
|
var orgsCreate = {
|
|
4541
4842
|
name: "orgs.create",
|
|
4542
4843
|
group: "orgs",
|
|
4543
4844
|
description: "Create a new organization",
|
|
4544
|
-
inputSchema:
|
|
4545
|
-
outputSchema:
|
|
4845
|
+
inputSchema: inputSchema68,
|
|
4846
|
+
outputSchema: z71.any(),
|
|
4546
4847
|
async execute(input, ctx) {
|
|
4547
4848
|
return ctx.client.post("organizations", input);
|
|
4548
4849
|
},
|
|
@@ -4553,17 +4854,17 @@ var orgsCreate = {
|
|
|
4553
4854
|
};
|
|
4554
4855
|
|
|
4555
4856
|
// src/commands/orgs/delete.ts
|
|
4556
|
-
import { z as
|
|
4557
|
-
var
|
|
4558
|
-
orgId:
|
|
4559
|
-
yes:
|
|
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")
|
|
4560
4861
|
});
|
|
4561
4862
|
var orgsDelete = {
|
|
4562
4863
|
name: "orgs.delete",
|
|
4563
4864
|
group: "orgs",
|
|
4564
4865
|
description: "Delete an organization",
|
|
4565
|
-
inputSchema:
|
|
4566
|
-
outputSchema:
|
|
4866
|
+
inputSchema: inputSchema69,
|
|
4867
|
+
outputSchema: z72.any(),
|
|
4567
4868
|
annotations: { destructiveHint: true },
|
|
4568
4869
|
async execute(input, ctx) {
|
|
4569
4870
|
if (!input.yes) {
|
|
@@ -4583,18 +4884,43 @@ var orgsDelete = {
|
|
|
4583
4884
|
}
|
|
4584
4885
|
};
|
|
4585
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
|
+
|
|
4586
4912
|
// src/commands/orgs/files.ts
|
|
4587
|
-
import { z as
|
|
4588
|
-
var
|
|
4589
|
-
orgId:
|
|
4913
|
+
import { z as z74 } from "zod";
|
|
4914
|
+
var inputSchema71 = z74.object({
|
|
4915
|
+
orgId: z74.string().uuid().describe("Organization ID"),
|
|
4590
4916
|
...paginationInput
|
|
4591
4917
|
});
|
|
4592
4918
|
var orgsFiles = {
|
|
4593
4919
|
name: "orgs.files",
|
|
4594
4920
|
group: "orgs",
|
|
4595
4921
|
description: "List files belonging to an organization",
|
|
4596
|
-
inputSchema:
|
|
4597
|
-
outputSchema:
|
|
4922
|
+
inputSchema: inputSchema71,
|
|
4923
|
+
outputSchema: z74.any(),
|
|
4598
4924
|
annotations: { readOnlyHint: true },
|
|
4599
4925
|
async execute(input, ctx) {
|
|
4600
4926
|
return ctx.client.get("org_files", {
|
|
@@ -4609,16 +4935,16 @@ var orgsFiles = {
|
|
|
4609
4935
|
};
|
|
4610
4936
|
|
|
4611
4937
|
// src/commands/orgs/get.ts
|
|
4612
|
-
import { z as
|
|
4613
|
-
var
|
|
4614
|
-
orgId:
|
|
4938
|
+
import { z as z75 } from "zod";
|
|
4939
|
+
var inputSchema72 = z75.object({
|
|
4940
|
+
orgId: z75.string().uuid().describe("Organization ID")
|
|
4615
4941
|
});
|
|
4616
4942
|
var orgsGet = {
|
|
4617
4943
|
name: "orgs.get",
|
|
4618
4944
|
group: "orgs",
|
|
4619
4945
|
description: "Get details of a specific organization",
|
|
4620
|
-
inputSchema:
|
|
4621
|
-
outputSchema:
|
|
4946
|
+
inputSchema: inputSchema72,
|
|
4947
|
+
outputSchema: z75.any(),
|
|
4622
4948
|
async execute(input, ctx) {
|
|
4623
4949
|
return ctx.client.get("organization", {
|
|
4624
4950
|
pathParams: { id: input.orgId }
|
|
@@ -4631,16 +4957,16 @@ var orgsGet = {
|
|
|
4631
4957
|
};
|
|
4632
4958
|
|
|
4633
4959
|
// src/commands/orgs/invitation-info.ts
|
|
4634
|
-
import { z as
|
|
4635
|
-
var
|
|
4636
|
-
token:
|
|
4960
|
+
import { z as z76 } from "zod";
|
|
4961
|
+
var inputSchema73 = z76.object({
|
|
4962
|
+
token: z76.string().min(1).describe("Invitation token")
|
|
4637
4963
|
});
|
|
4638
4964
|
var orgsInvitationInfo = {
|
|
4639
4965
|
name: "orgs.invitationInfo",
|
|
4640
4966
|
group: "orgs",
|
|
4641
4967
|
description: "Get information about an invitation by token",
|
|
4642
|
-
inputSchema:
|
|
4643
|
-
outputSchema:
|
|
4968
|
+
inputSchema: inputSchema73,
|
|
4969
|
+
outputSchema: z76.any(),
|
|
4644
4970
|
annotations: { readOnlyHint: true },
|
|
4645
4971
|
async execute(input, ctx) {
|
|
4646
4972
|
return ctx.client.get("invitation_info", {
|
|
@@ -4654,16 +4980,16 @@ var orgsInvitationInfo = {
|
|
|
4654
4980
|
};
|
|
4655
4981
|
|
|
4656
4982
|
// src/commands/orgs/invitations.ts
|
|
4657
|
-
import { z as
|
|
4658
|
-
var
|
|
4659
|
-
orgId:
|
|
4983
|
+
import { z as z77 } from "zod";
|
|
4984
|
+
var inputSchema74 = z77.object({
|
|
4985
|
+
orgId: z77.string().uuid().describe("Organization ID")
|
|
4660
4986
|
});
|
|
4661
4987
|
var orgsInvitations = {
|
|
4662
4988
|
name: "orgs.invitations",
|
|
4663
4989
|
group: "orgs",
|
|
4664
4990
|
description: "List pending invitations for an organization",
|
|
4665
|
-
inputSchema:
|
|
4666
|
-
outputSchema:
|
|
4991
|
+
inputSchema: inputSchema74,
|
|
4992
|
+
outputSchema: z77.any(),
|
|
4667
4993
|
annotations: { readOnlyHint: true },
|
|
4668
4994
|
async execute(input, ctx) {
|
|
4669
4995
|
return ctx.client.get("org_invitations", {
|
|
@@ -4677,18 +5003,18 @@ var orgsInvitations = {
|
|
|
4677
5003
|
};
|
|
4678
5004
|
|
|
4679
5005
|
// src/commands/orgs/invite.ts
|
|
4680
|
-
import { z as
|
|
4681
|
-
var
|
|
4682
|
-
orgId:
|
|
4683
|
-
email:
|
|
4684
|
-
role:
|
|
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)")
|
|
4685
5011
|
});
|
|
4686
5012
|
var orgsInvite = {
|
|
4687
5013
|
name: "orgs.invite",
|
|
4688
5014
|
group: "orgs",
|
|
4689
5015
|
description: "Invite a user to an organization by email",
|
|
4690
|
-
inputSchema:
|
|
4691
|
-
outputSchema:
|
|
5016
|
+
inputSchema: inputSchema75,
|
|
5017
|
+
outputSchema: z78.any(),
|
|
4692
5018
|
annotations: { idempotentHint: true },
|
|
4693
5019
|
async execute(input, ctx) {
|
|
4694
5020
|
const existing = await ctx.client.get("org_invitations", {
|
|
@@ -4716,14 +5042,14 @@ var orgsInvite = {
|
|
|
4716
5042
|
};
|
|
4717
5043
|
|
|
4718
5044
|
// src/commands/orgs/list.ts
|
|
4719
|
-
import { z as
|
|
4720
|
-
var
|
|
5045
|
+
import { z as z79 } from "zod";
|
|
5046
|
+
var inputSchema76 = z79.object({});
|
|
4721
5047
|
var orgsList = {
|
|
4722
5048
|
name: "orgs.list",
|
|
4723
5049
|
group: "orgs",
|
|
4724
5050
|
description: "List all organizations the current user belongs to",
|
|
4725
|
-
inputSchema:
|
|
4726
|
-
outputSchema:
|
|
5051
|
+
inputSchema: inputSchema76,
|
|
5052
|
+
outputSchema: z79.any(),
|
|
4727
5053
|
annotations: { readOnlyHint: true },
|
|
4728
5054
|
async execute(_input, ctx) {
|
|
4729
5055
|
return ctx.client.get("organizations");
|
|
@@ -4735,14 +5061,14 @@ var orgsList = {
|
|
|
4735
5061
|
};
|
|
4736
5062
|
|
|
4737
5063
|
// src/commands/orgs/list-all.ts
|
|
4738
|
-
import { z as
|
|
4739
|
-
var
|
|
5064
|
+
import { z as z80 } from "zod";
|
|
5065
|
+
var inputSchema77 = z80.object({});
|
|
4740
5066
|
var orgsListAll = {
|
|
4741
5067
|
name: "orgs.listAll",
|
|
4742
5068
|
group: "orgs",
|
|
4743
5069
|
description: "List all organizations (admin)",
|
|
4744
|
-
inputSchema:
|
|
4745
|
-
outputSchema:
|
|
5070
|
+
inputSchema: inputSchema77,
|
|
5071
|
+
outputSchema: z80.any(),
|
|
4746
5072
|
annotations: { readOnlyHint: true, internal: true },
|
|
4747
5073
|
async execute(_input, ctx) {
|
|
4748
5074
|
return ctx.client.get("organizations_all");
|
|
@@ -4754,16 +5080,16 @@ var orgsListAll = {
|
|
|
4754
5080
|
};
|
|
4755
5081
|
|
|
4756
5082
|
// src/commands/orgs/members.ts
|
|
4757
|
-
import { z as
|
|
4758
|
-
var
|
|
4759
|
-
orgId:
|
|
5083
|
+
import { z as z81 } from "zod";
|
|
5084
|
+
var inputSchema78 = z81.object({
|
|
5085
|
+
orgId: z81.string().uuid().describe("Organization ID")
|
|
4760
5086
|
});
|
|
4761
5087
|
var orgsMembers = {
|
|
4762
5088
|
name: "orgs.members",
|
|
4763
5089
|
group: "orgs",
|
|
4764
5090
|
description: "List members of an organization",
|
|
4765
|
-
inputSchema:
|
|
4766
|
-
outputSchema:
|
|
5091
|
+
inputSchema: inputSchema78,
|
|
5092
|
+
outputSchema: z81.any(),
|
|
4767
5093
|
annotations: { readOnlyHint: true },
|
|
4768
5094
|
async execute(input, ctx) {
|
|
4769
5095
|
return ctx.client.get("organization_members", {
|
|
@@ -4777,17 +5103,17 @@ var orgsMembers = {
|
|
|
4777
5103
|
};
|
|
4778
5104
|
|
|
4779
5105
|
// src/commands/orgs/remove-member.ts
|
|
4780
|
-
import { z as
|
|
4781
|
-
var
|
|
4782
|
-
orgId:
|
|
4783
|
-
membershipId:
|
|
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")
|
|
4784
5110
|
});
|
|
4785
5111
|
var orgsRemoveMember = {
|
|
4786
5112
|
name: "orgs.removeMember",
|
|
4787
5113
|
group: "orgs",
|
|
4788
5114
|
description: "Remove a member from an organization",
|
|
4789
|
-
inputSchema:
|
|
4790
|
-
outputSchema:
|
|
5115
|
+
inputSchema: inputSchema79,
|
|
5116
|
+
outputSchema: z82.any(),
|
|
4791
5117
|
annotations: { destructiveHint: true },
|
|
4792
5118
|
async execute(input, ctx) {
|
|
4793
5119
|
await ctx.client.del("organization_member", {
|
|
@@ -4802,17 +5128,17 @@ var orgsRemoveMember = {
|
|
|
4802
5128
|
};
|
|
4803
5129
|
|
|
4804
5130
|
// src/commands/orgs/resend-invite.ts
|
|
4805
|
-
import { z as
|
|
4806
|
-
var
|
|
4807
|
-
orgId:
|
|
4808
|
-
invitationId:
|
|
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")
|
|
4809
5135
|
});
|
|
4810
5136
|
var orgsResendInvite = {
|
|
4811
5137
|
name: "orgs.resendInvite",
|
|
4812
5138
|
group: "orgs",
|
|
4813
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.",
|
|
4814
|
-
inputSchema:
|
|
4815
|
-
outputSchema:
|
|
5140
|
+
inputSchema: inputSchema80,
|
|
5141
|
+
outputSchema: z83.any(),
|
|
4816
5142
|
annotations: { idempotentHint: true },
|
|
4817
5143
|
async execute(input, ctx) {
|
|
4818
5144
|
return ctx.client.post(
|
|
@@ -4828,16 +5154,16 @@ var orgsResendInvite = {
|
|
|
4828
5154
|
};
|
|
4829
5155
|
|
|
4830
5156
|
// src/commands/orgs/set-default.ts
|
|
4831
|
-
import { z as
|
|
4832
|
-
var
|
|
4833
|
-
orgId:
|
|
5157
|
+
import { z as z84 } from "zod";
|
|
5158
|
+
var inputSchema81 = z84.object({
|
|
5159
|
+
orgId: z84.string().uuid().describe("Organization ID to set as default")
|
|
4834
5160
|
});
|
|
4835
5161
|
var orgsSetDefault = {
|
|
4836
5162
|
name: "orgs.setDefault",
|
|
4837
5163
|
group: "orgs",
|
|
4838
5164
|
description: "Set an organization as the default",
|
|
4839
|
-
inputSchema:
|
|
4840
|
-
outputSchema:
|
|
5165
|
+
inputSchema: inputSchema81,
|
|
5166
|
+
outputSchema: z84.any(),
|
|
4841
5167
|
annotations: { idempotentHint: true },
|
|
4842
5168
|
async execute(input, ctx) {
|
|
4843
5169
|
return ctx.client.put("organization_set_default", void 0, {
|
|
@@ -4851,17 +5177,17 @@ var orgsSetDefault = {
|
|
|
4851
5177
|
};
|
|
4852
5178
|
|
|
4853
5179
|
// src/commands/orgs/set-stripe.ts
|
|
4854
|
-
import { z as
|
|
4855
|
-
var
|
|
4856
|
-
orgId:
|
|
4857
|
-
stripeCustomerId:
|
|
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)")
|
|
4858
5184
|
});
|
|
4859
5185
|
var orgsSetStripe = {
|
|
4860
5186
|
name: "orgs.setStripe",
|
|
4861
5187
|
group: "orgs",
|
|
4862
5188
|
description: "Set the Stripe customer ID for an organization",
|
|
4863
|
-
inputSchema:
|
|
4864
|
-
outputSchema:
|
|
5189
|
+
inputSchema: inputSchema82,
|
|
5190
|
+
outputSchema: z85.any(),
|
|
4865
5191
|
annotations: { idempotentHint: true },
|
|
4866
5192
|
async execute(input, ctx) {
|
|
4867
5193
|
return ctx.client.put(
|
|
@@ -4878,18 +5204,18 @@ var orgsSetStripe = {
|
|
|
4878
5204
|
|
|
4879
5205
|
// src/commands/orgs/update.ts
|
|
4880
5206
|
init_errors();
|
|
4881
|
-
import { z as
|
|
4882
|
-
var
|
|
4883
|
-
orgId:
|
|
4884
|
-
name:
|
|
4885
|
-
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")
|
|
4886
5212
|
});
|
|
4887
5213
|
var orgsUpdate = {
|
|
4888
5214
|
name: "orgs.update",
|
|
4889
5215
|
group: "orgs",
|
|
4890
5216
|
description: "Update an existing organization",
|
|
4891
|
-
inputSchema:
|
|
4892
|
-
outputSchema:
|
|
5217
|
+
inputSchema: inputSchema83,
|
|
5218
|
+
outputSchema: z86.any(),
|
|
4893
5219
|
annotations: { idempotentHint: true },
|
|
4894
5220
|
async execute(input, ctx) {
|
|
4895
5221
|
const { orgId, ...fields } = input;
|
|
@@ -4910,18 +5236,18 @@ var orgsUpdate = {
|
|
|
4910
5236
|
};
|
|
4911
5237
|
|
|
4912
5238
|
// src/commands/orgs/update-role.ts
|
|
4913
|
-
import { z as
|
|
4914
|
-
var
|
|
4915
|
-
orgId:
|
|
4916
|
-
membershipId:
|
|
4917
|
-
role:
|
|
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")
|
|
4918
5244
|
});
|
|
4919
5245
|
var orgsUpdateRole = {
|
|
4920
5246
|
name: "orgs.updateRole",
|
|
4921
5247
|
group: "orgs",
|
|
4922
5248
|
description: "Update an organization member's role",
|
|
4923
|
-
inputSchema:
|
|
4924
|
-
outputSchema:
|
|
5249
|
+
inputSchema: inputSchema84,
|
|
5250
|
+
outputSchema: z87.any(),
|
|
4925
5251
|
annotations: { idempotentHint: true },
|
|
4926
5252
|
async execute(input, ctx) {
|
|
4927
5253
|
return ctx.client.put(
|
|
@@ -4957,23 +5283,24 @@ function registerOrgCommands() {
|
|
|
4957
5283
|
orgsInvitationInfo,
|
|
4958
5284
|
orgsAcceptInvite,
|
|
4959
5285
|
orgsFiles,
|
|
4960
|
-
orgsListAll
|
|
5286
|
+
orgsListAll,
|
|
5287
|
+
orgsDirectory
|
|
4961
5288
|
];
|
|
4962
5289
|
}
|
|
4963
5290
|
|
|
4964
5291
|
// src/commands/projects/add-member.ts
|
|
4965
|
-
import { z as
|
|
4966
|
-
var
|
|
4967
|
-
projectId:
|
|
4968
|
-
userId:
|
|
4969
|
-
role:
|
|
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)")
|
|
4970
5297
|
});
|
|
4971
5298
|
var projectsAddMember = {
|
|
4972
5299
|
name: "projects.addMember",
|
|
4973
5300
|
group: "projects",
|
|
4974
5301
|
description: "Add a member to a project",
|
|
4975
|
-
inputSchema:
|
|
4976
|
-
outputSchema:
|
|
5302
|
+
inputSchema: inputSchema85,
|
|
5303
|
+
outputSchema: z88.any(),
|
|
4977
5304
|
async execute(input, ctx) {
|
|
4978
5305
|
return ctx.client.post(
|
|
4979
5306
|
"project_members",
|
|
@@ -4988,16 +5315,16 @@ var projectsAddMember = {
|
|
|
4988
5315
|
};
|
|
4989
5316
|
|
|
4990
5317
|
// src/commands/projects/archive.ts
|
|
4991
|
-
import { z as
|
|
4992
|
-
var
|
|
4993
|
-
projectId:
|
|
5318
|
+
import { z as z89 } from "zod";
|
|
5319
|
+
var inputSchema86 = z89.object({
|
|
5320
|
+
projectId: z89.string().uuid().describe("Project ID to archive")
|
|
4994
5321
|
});
|
|
4995
5322
|
var projectsArchive = {
|
|
4996
5323
|
name: "projects.archive",
|
|
4997
5324
|
group: "projects",
|
|
4998
5325
|
description: "Archive (delete) a project",
|
|
4999
|
-
inputSchema:
|
|
5000
|
-
outputSchema:
|
|
5326
|
+
inputSchema: inputSchema86,
|
|
5327
|
+
outputSchema: z89.any(),
|
|
5001
5328
|
annotations: { destructiveHint: true },
|
|
5002
5329
|
async execute(input, ctx) {
|
|
5003
5330
|
await ctx.client.del("project", {
|
|
@@ -5012,18 +5339,18 @@ var projectsArchive = {
|
|
|
5012
5339
|
};
|
|
5013
5340
|
|
|
5014
5341
|
// src/commands/projects/create.ts
|
|
5015
|
-
import { z as
|
|
5016
|
-
var
|
|
5017
|
-
name:
|
|
5018
|
-
description:
|
|
5019
|
-
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")
|
|
5020
5347
|
});
|
|
5021
5348
|
var projectsCreate = {
|
|
5022
5349
|
name: "projects.create",
|
|
5023
5350
|
group: "projects",
|
|
5024
5351
|
description: "Create a new project",
|
|
5025
|
-
inputSchema:
|
|
5026
|
-
outputSchema:
|
|
5352
|
+
inputSchema: inputSchema87,
|
|
5353
|
+
outputSchema: z90.any(),
|
|
5027
5354
|
async execute(input, ctx) {
|
|
5028
5355
|
return ctx.client.post("projects", input);
|
|
5029
5356
|
},
|
|
@@ -5034,16 +5361,16 @@ var projectsCreate = {
|
|
|
5034
5361
|
};
|
|
5035
5362
|
|
|
5036
5363
|
// src/commands/projects/get.ts
|
|
5037
|
-
import { z as
|
|
5038
|
-
var
|
|
5039
|
-
projectId:
|
|
5364
|
+
import { z as z91 } from "zod";
|
|
5365
|
+
var inputSchema88 = z91.object({
|
|
5366
|
+
projectId: z91.string().uuid().describe("Project ID")
|
|
5040
5367
|
});
|
|
5041
5368
|
var projectsGet = {
|
|
5042
5369
|
name: "projects.get",
|
|
5043
5370
|
group: "projects",
|
|
5044
5371
|
description: "Get details of a specific project",
|
|
5045
|
-
inputSchema:
|
|
5046
|
-
outputSchema:
|
|
5372
|
+
inputSchema: inputSchema88,
|
|
5373
|
+
outputSchema: z91.any(),
|
|
5047
5374
|
annotations: { readOnlyHint: true },
|
|
5048
5375
|
async execute(input, ctx) {
|
|
5049
5376
|
return ctx.client.get("project", {
|
|
@@ -5057,16 +5384,16 @@ var projectsGet = {
|
|
|
5057
5384
|
};
|
|
5058
5385
|
|
|
5059
5386
|
// src/commands/projects/leave.ts
|
|
5060
|
-
import { z as
|
|
5061
|
-
var
|
|
5062
|
-
projectId:
|
|
5387
|
+
import { z as z92 } from "zod";
|
|
5388
|
+
var inputSchema89 = z92.object({
|
|
5389
|
+
projectId: z92.string().uuid().describe("Project ID to leave")
|
|
5063
5390
|
});
|
|
5064
5391
|
var projectsLeave = {
|
|
5065
5392
|
name: "projects.leave",
|
|
5066
5393
|
group: "projects",
|
|
5067
5394
|
description: "Leave a project",
|
|
5068
|
-
inputSchema:
|
|
5069
|
-
outputSchema:
|
|
5395
|
+
inputSchema: inputSchema89,
|
|
5396
|
+
outputSchema: z92.any(),
|
|
5070
5397
|
annotations: { destructiveHint: true },
|
|
5071
5398
|
async execute(input, ctx) {
|
|
5072
5399
|
return ctx.client.post("project_leave", void 0, {
|
|
@@ -5080,16 +5407,16 @@ var projectsLeave = {
|
|
|
5080
5407
|
};
|
|
5081
5408
|
|
|
5082
5409
|
// src/commands/projects/list.ts
|
|
5083
|
-
import { z as
|
|
5084
|
-
var
|
|
5410
|
+
import { z as z93 } from "zod";
|
|
5411
|
+
var inputSchema90 = z93.object({
|
|
5085
5412
|
...paginationInput
|
|
5086
5413
|
});
|
|
5087
5414
|
var projectsList = {
|
|
5088
5415
|
name: "projects.list",
|
|
5089
5416
|
group: "projects",
|
|
5090
5417
|
description: "List all projects accessible to the current user",
|
|
5091
|
-
inputSchema:
|
|
5092
|
-
outputSchema:
|
|
5418
|
+
inputSchema: inputSchema90,
|
|
5419
|
+
outputSchema: z93.any(),
|
|
5093
5420
|
annotations: { readOnlyHint: true },
|
|
5094
5421
|
async execute(input, ctx) {
|
|
5095
5422
|
return ctx.client.get("projects", {
|
|
@@ -5103,16 +5430,16 @@ var projectsList = {
|
|
|
5103
5430
|
};
|
|
5104
5431
|
|
|
5105
5432
|
// src/commands/projects/members.ts
|
|
5106
|
-
import { z as
|
|
5107
|
-
var
|
|
5108
|
-
projectId:
|
|
5433
|
+
import { z as z94 } from "zod";
|
|
5434
|
+
var inputSchema91 = z94.object({
|
|
5435
|
+
projectId: z94.string().uuid().describe("Project ID")
|
|
5109
5436
|
});
|
|
5110
5437
|
var projectsMembers = {
|
|
5111
5438
|
name: "projects.members",
|
|
5112
5439
|
group: "projects",
|
|
5113
5440
|
description: "List members of a project",
|
|
5114
|
-
inputSchema:
|
|
5115
|
-
outputSchema:
|
|
5441
|
+
inputSchema: inputSchema91,
|
|
5442
|
+
outputSchema: z94.any(),
|
|
5116
5443
|
annotations: { readOnlyHint: true },
|
|
5117
5444
|
async execute(input, ctx) {
|
|
5118
5445
|
return ctx.client.get("project_members", {
|
|
@@ -5126,17 +5453,17 @@ var projectsMembers = {
|
|
|
5126
5453
|
};
|
|
5127
5454
|
|
|
5128
5455
|
// src/commands/projects/remove-member.ts
|
|
5129
|
-
import { z as
|
|
5130
|
-
var
|
|
5131
|
-
projectId:
|
|
5132
|
-
userId:
|
|
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")
|
|
5133
5460
|
});
|
|
5134
5461
|
var projectsRemoveMember = {
|
|
5135
5462
|
name: "projects.removeMember",
|
|
5136
5463
|
group: "projects",
|
|
5137
5464
|
description: "Remove a member from a project",
|
|
5138
|
-
inputSchema:
|
|
5139
|
-
outputSchema:
|
|
5465
|
+
inputSchema: inputSchema92,
|
|
5466
|
+
outputSchema: z95.any(),
|
|
5140
5467
|
annotations: { destructiveHint: true },
|
|
5141
5468
|
async execute(input, ctx) {
|
|
5142
5469
|
await ctx.client.del("project_member", {
|
|
@@ -5152,19 +5479,19 @@ var projectsRemoveMember = {
|
|
|
5152
5479
|
|
|
5153
5480
|
// src/commands/projects/update.ts
|
|
5154
5481
|
init_errors();
|
|
5155
|
-
import { z as
|
|
5156
|
-
var
|
|
5157
|
-
projectId:
|
|
5158
|
-
name:
|
|
5159
|
-
description:
|
|
5160
|
-
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")
|
|
5161
5488
|
});
|
|
5162
5489
|
var projectsUpdate = {
|
|
5163
5490
|
name: "projects.update",
|
|
5164
5491
|
group: "projects",
|
|
5165
5492
|
description: "Update an existing project",
|
|
5166
|
-
inputSchema:
|
|
5167
|
-
outputSchema:
|
|
5493
|
+
inputSchema: inputSchema93,
|
|
5494
|
+
outputSchema: z96.any(),
|
|
5168
5495
|
annotations: { idempotentHint: true },
|
|
5169
5496
|
async execute(input, ctx) {
|
|
5170
5497
|
const { projectId, ...fields } = input;
|
|
@@ -5185,18 +5512,18 @@ var projectsUpdate = {
|
|
|
5185
5512
|
};
|
|
5186
5513
|
|
|
5187
5514
|
// src/commands/projects/update-role.ts
|
|
5188
|
-
import { z as
|
|
5189
|
-
var
|
|
5190
|
-
projectId:
|
|
5191
|
-
userId:
|
|
5192
|
-
role:
|
|
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")
|
|
5193
5520
|
});
|
|
5194
5521
|
var projectsUpdateRole = {
|
|
5195
5522
|
name: "projects.updateRole",
|
|
5196
5523
|
group: "projects",
|
|
5197
5524
|
description: "Update a project member's role",
|
|
5198
|
-
inputSchema:
|
|
5199
|
-
outputSchema:
|
|
5525
|
+
inputSchema: inputSchema94,
|
|
5526
|
+
outputSchema: z97.any(),
|
|
5200
5527
|
annotations: { idempotentHint: true },
|
|
5201
5528
|
async execute(input, ctx) {
|
|
5202
5529
|
return ctx.client.put(
|
|
@@ -5228,19 +5555,19 @@ function registerProjectCommands() {
|
|
|
5228
5555
|
}
|
|
5229
5556
|
|
|
5230
5557
|
// src/commands/protocols/generate.ts
|
|
5231
|
-
import { z as
|
|
5232
|
-
var
|
|
5233
|
-
description:
|
|
5234
|
-
title:
|
|
5235
|
-
project:
|
|
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")
|
|
5236
5563
|
});
|
|
5237
5564
|
var protocolsGenerate = {
|
|
5238
5565
|
name: "protocols.generate",
|
|
5239
5566
|
group: "protocols",
|
|
5240
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.",
|
|
5241
5568
|
stdinField: "description",
|
|
5242
|
-
inputSchema:
|
|
5243
|
-
outputSchema:
|
|
5569
|
+
inputSchema: inputSchema95,
|
|
5570
|
+
outputSchema: z98.any(),
|
|
5244
5571
|
annotations: { mcpScopes: ["tasks:write", "messages:write"] },
|
|
5245
5572
|
async execute(input, ctx) {
|
|
5246
5573
|
const body = { title: input.title || input.description.slice(0, 100) };
|
|
@@ -5274,9 +5601,9 @@ function registerProtocolCommands() {
|
|
|
5274
5601
|
}
|
|
5275
5602
|
|
|
5276
5603
|
// src/commands/search/all.ts
|
|
5277
|
-
import { z as
|
|
5278
|
-
var
|
|
5279
|
-
query:
|
|
5604
|
+
import { z as z99 } from "zod";
|
|
5605
|
+
var inputSchema96 = z99.object({
|
|
5606
|
+
query: z99.string().min(1).describe("Search query"),
|
|
5280
5607
|
...paginationInput
|
|
5281
5608
|
});
|
|
5282
5609
|
var searchAll = {
|
|
@@ -5284,8 +5611,8 @@ var searchAll = {
|
|
|
5284
5611
|
group: "search",
|
|
5285
5612
|
description: "Search across all entities",
|
|
5286
5613
|
stdinField: "query",
|
|
5287
|
-
inputSchema:
|
|
5288
|
-
outputSchema:
|
|
5614
|
+
inputSchema: inputSchema96,
|
|
5615
|
+
outputSchema: z99.any(),
|
|
5289
5616
|
annotations: { readOnlyHint: true },
|
|
5290
5617
|
async execute(input, ctx) {
|
|
5291
5618
|
return ctx.client.get("search_all", {
|
|
@@ -5299,10 +5626,10 @@ var searchAll = {
|
|
|
5299
5626
|
};
|
|
5300
5627
|
|
|
5301
5628
|
// src/commands/search/file-content.ts
|
|
5302
|
-
import { z as
|
|
5303
|
-
var
|
|
5304
|
-
query:
|
|
5305
|
-
projectId:
|
|
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"),
|
|
5306
5633
|
...paginationInput
|
|
5307
5634
|
});
|
|
5308
5635
|
var searchFileContent = {
|
|
@@ -5310,8 +5637,8 @@ var searchFileContent = {
|
|
|
5310
5637
|
group: "search",
|
|
5311
5638
|
description: "Search within file contents",
|
|
5312
5639
|
stdinField: "query",
|
|
5313
|
-
inputSchema:
|
|
5314
|
-
outputSchema:
|
|
5640
|
+
inputSchema: inputSchema97,
|
|
5641
|
+
outputSchema: z100.any(),
|
|
5315
5642
|
annotations: { readOnlyHint: true },
|
|
5316
5643
|
async execute(input, ctx) {
|
|
5317
5644
|
const queryParams = {
|
|
@@ -5329,9 +5656,9 @@ var searchFileContent = {
|
|
|
5329
5656
|
};
|
|
5330
5657
|
|
|
5331
5658
|
// src/commands/search/files.ts
|
|
5332
|
-
import { z as
|
|
5333
|
-
var
|
|
5334
|
-
query:
|
|
5659
|
+
import { z as z101 } from "zod";
|
|
5660
|
+
var inputSchema98 = z101.object({
|
|
5661
|
+
query: z101.string().min(1).describe("Search query"),
|
|
5335
5662
|
...paginationInput
|
|
5336
5663
|
});
|
|
5337
5664
|
var searchFiles = {
|
|
@@ -5339,8 +5666,8 @@ var searchFiles = {
|
|
|
5339
5666
|
group: "search",
|
|
5340
5667
|
description: "Search files by query",
|
|
5341
5668
|
stdinField: "query",
|
|
5342
|
-
inputSchema:
|
|
5343
|
-
outputSchema:
|
|
5669
|
+
inputSchema: inputSchema98,
|
|
5670
|
+
outputSchema: z101.any(),
|
|
5344
5671
|
annotations: { readOnlyHint: true },
|
|
5345
5672
|
async execute(input, ctx) {
|
|
5346
5673
|
return ctx.client.get("search_files", {
|
|
@@ -5354,9 +5681,9 @@ var searchFiles = {
|
|
|
5354
5681
|
};
|
|
5355
5682
|
|
|
5356
5683
|
// src/commands/search/tasks.ts
|
|
5357
|
-
import { z as
|
|
5358
|
-
var
|
|
5359
|
-
query:
|
|
5684
|
+
import { z as z102 } from "zod";
|
|
5685
|
+
var inputSchema99 = z102.object({
|
|
5686
|
+
query: z102.string().min(1).describe("Search query"),
|
|
5360
5687
|
...paginationInput
|
|
5361
5688
|
});
|
|
5362
5689
|
var searchTasks = {
|
|
@@ -5364,8 +5691,8 @@ var searchTasks = {
|
|
|
5364
5691
|
group: "search",
|
|
5365
5692
|
description: "Search tasks by query",
|
|
5366
5693
|
stdinField: "query",
|
|
5367
|
-
inputSchema:
|
|
5368
|
-
outputSchema:
|
|
5694
|
+
inputSchema: inputSchema99,
|
|
5695
|
+
outputSchema: z102.any(),
|
|
5369
5696
|
annotations: { readOnlyHint: true },
|
|
5370
5697
|
async execute(input, ctx) {
|
|
5371
5698
|
return ctx.client.get("search_tasks", {
|
|
@@ -5384,16 +5711,16 @@ function registerSearchCommands() {
|
|
|
5384
5711
|
}
|
|
5385
5712
|
|
|
5386
5713
|
// src/commands/tasks/archive.ts
|
|
5387
|
-
import { z as
|
|
5388
|
-
var
|
|
5389
|
-
taskId:
|
|
5714
|
+
import { z as z103 } from "zod";
|
|
5715
|
+
var inputSchema100 = z103.object({
|
|
5716
|
+
taskId: z103.string().uuid().describe("Task ID to archive")
|
|
5390
5717
|
});
|
|
5391
5718
|
var tasksArchive = {
|
|
5392
5719
|
name: "tasks.archive",
|
|
5393
5720
|
group: "tasks",
|
|
5394
5721
|
description: "Archive (delete) a task",
|
|
5395
|
-
inputSchema:
|
|
5396
|
-
outputSchema:
|
|
5722
|
+
inputSchema: inputSchema100,
|
|
5723
|
+
outputSchema: z103.any(),
|
|
5397
5724
|
annotations: { destructiveHint: true },
|
|
5398
5725
|
async execute(input, ctx) {
|
|
5399
5726
|
await ctx.client.del("task", {
|
|
@@ -5408,7 +5735,7 @@ var tasksArchive = {
|
|
|
5408
5735
|
};
|
|
5409
5736
|
|
|
5410
5737
|
// src/commands/tasks/create.ts
|
|
5411
|
-
import { z as
|
|
5738
|
+
import { z as z104 } from "zod";
|
|
5412
5739
|
|
|
5413
5740
|
// src/lib/poll.ts
|
|
5414
5741
|
init_errors();
|
|
@@ -5614,20 +5941,20 @@ ${this.useColor ? pc5.yellow("Stream timed out.") : "Stream timed out."}
|
|
|
5614
5941
|
};
|
|
5615
5942
|
|
|
5616
5943
|
// src/commands/tasks/create.ts
|
|
5617
|
-
var
|
|
5618
|
-
project:
|
|
5619
|
-
title:
|
|
5620
|
-
message:
|
|
5621
|
-
wait:
|
|
5622
|
-
stream:
|
|
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)")
|
|
5623
5950
|
});
|
|
5624
5951
|
var tasksCreate = {
|
|
5625
5952
|
name: "tasks.create",
|
|
5626
5953
|
group: "tasks",
|
|
5627
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.",
|
|
5628
5955
|
stdinField: "message",
|
|
5629
|
-
inputSchema:
|
|
5630
|
-
outputSchema:
|
|
5956
|
+
inputSchema: inputSchema101,
|
|
5957
|
+
outputSchema: z104.any(),
|
|
5631
5958
|
async execute(input, ctx) {
|
|
5632
5959
|
const result = await ctx.client.post("tasks", {
|
|
5633
5960
|
// projectId is optional (ELN-880 Phase C): when omitted the backend creates the
|
|
@@ -5679,16 +6006,16 @@ var tasksCreate = {
|
|
|
5679
6006
|
};
|
|
5680
6007
|
|
|
5681
6008
|
// src/commands/tasks/get.ts
|
|
5682
|
-
import { z as
|
|
5683
|
-
var
|
|
5684
|
-
taskId:
|
|
6009
|
+
import { z as z105 } from "zod";
|
|
6010
|
+
var inputSchema102 = z105.object({
|
|
6011
|
+
taskId: z105.string().uuid().describe("Task ID")
|
|
5685
6012
|
});
|
|
5686
6013
|
var tasksGet = {
|
|
5687
6014
|
name: "tasks.get",
|
|
5688
6015
|
group: "tasks",
|
|
5689
6016
|
description: "Get details of a specific task",
|
|
5690
|
-
inputSchema:
|
|
5691
|
-
outputSchema:
|
|
6017
|
+
inputSchema: inputSchema102,
|
|
6018
|
+
outputSchema: z105.any(),
|
|
5692
6019
|
annotations: { readOnlyHint: true },
|
|
5693
6020
|
async execute(input, ctx) {
|
|
5694
6021
|
return ctx.client.get("task", {
|
|
@@ -5702,17 +6029,17 @@ var tasksGet = {
|
|
|
5702
6029
|
};
|
|
5703
6030
|
|
|
5704
6031
|
// src/commands/tasks/list.ts
|
|
5705
|
-
import { z as
|
|
5706
|
-
var
|
|
5707
|
-
project:
|
|
6032
|
+
import { z as z106 } from "zod";
|
|
6033
|
+
var inputSchema103 = z106.object({
|
|
6034
|
+
project: z106.string().uuid().optional().describe("Project ID to filter by"),
|
|
5708
6035
|
...paginationInput
|
|
5709
6036
|
});
|
|
5710
6037
|
var tasksList = {
|
|
5711
6038
|
name: "tasks.list",
|
|
5712
6039
|
group: "tasks",
|
|
5713
6040
|
description: "List tasks, optionally filtered by project",
|
|
5714
|
-
inputSchema:
|
|
5715
|
-
outputSchema:
|
|
6041
|
+
inputSchema: inputSchema103,
|
|
6042
|
+
outputSchema: z106.any(),
|
|
5716
6043
|
annotations: { readOnlyHint: true },
|
|
5717
6044
|
async execute(input, ctx) {
|
|
5718
6045
|
if (input.project) {
|
|
@@ -5732,18 +6059,18 @@ var tasksList = {
|
|
|
5732
6059
|
};
|
|
5733
6060
|
|
|
5734
6061
|
// src/commands/tasks/messages.ts
|
|
5735
|
-
import { z as
|
|
5736
|
-
var
|
|
5737
|
-
taskId:
|
|
5738
|
-
cursor:
|
|
5739
|
-
limit:
|
|
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")
|
|
5740
6067
|
});
|
|
5741
6068
|
var tasksMessages = {
|
|
5742
6069
|
name: "tasks.messages",
|
|
5743
6070
|
group: "tasks",
|
|
5744
6071
|
description: "List messages for a task",
|
|
5745
|
-
inputSchema:
|
|
5746
|
-
outputSchema:
|
|
6072
|
+
inputSchema: inputSchema104,
|
|
6073
|
+
outputSchema: z107.any(),
|
|
5747
6074
|
annotations: { readOnlyHint: true },
|
|
5748
6075
|
async execute(input, ctx) {
|
|
5749
6076
|
const queryParams = { limit: input.limit };
|
|
@@ -5762,23 +6089,23 @@ var tasksMessages = {
|
|
|
5762
6089
|
};
|
|
5763
6090
|
|
|
5764
6091
|
// src/commands/tasks/send.ts
|
|
5765
|
-
import { z as
|
|
6092
|
+
import { z as z108 } from "zod";
|
|
5766
6093
|
init_profiles();
|
|
5767
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;
|
|
5768
|
-
var
|
|
5769
|
-
taskId:
|
|
5770
|
-
message:
|
|
5771
|
-
fileRefs:
|
|
5772
|
-
wait:
|
|
5773
|
-
stream:
|
|
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)")
|
|
5774
6101
|
});
|
|
5775
6102
|
var tasksSend = {
|
|
5776
6103
|
name: "tasks.send",
|
|
5777
6104
|
group: "tasks",
|
|
5778
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.",
|
|
5779
6106
|
stdinField: "message",
|
|
5780
|
-
inputSchema:
|
|
5781
|
-
outputSchema:
|
|
6107
|
+
inputSchema: inputSchema105,
|
|
6108
|
+
outputSchema: z108.any(),
|
|
5782
6109
|
async execute(input, ctx) {
|
|
5783
6110
|
let referencedFileIds;
|
|
5784
6111
|
if (input.fileRefs) {
|
|
@@ -5835,18 +6162,18 @@ var tasksSend = {
|
|
|
5835
6162
|
|
|
5836
6163
|
// src/commands/tasks/update.ts
|
|
5837
6164
|
init_errors();
|
|
5838
|
-
import { z as
|
|
5839
|
-
var
|
|
5840
|
-
taskId:
|
|
5841
|
-
title:
|
|
5842
|
-
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")
|
|
5843
6170
|
});
|
|
5844
6171
|
var tasksUpdate = {
|
|
5845
6172
|
name: "tasks.update",
|
|
5846
6173
|
group: "tasks",
|
|
5847
6174
|
description: "Update an existing task",
|
|
5848
|
-
inputSchema:
|
|
5849
|
-
outputSchema:
|
|
6175
|
+
inputSchema: inputSchema106,
|
|
6176
|
+
outputSchema: z109.any(),
|
|
5850
6177
|
annotations: { idempotentHint: true },
|
|
5851
6178
|
async execute(input, ctx) {
|
|
5852
6179
|
const { taskId, ...fields } = input;
|