@steuerboard/mcp 0.0.7 → 0.1.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 +11 -23
- package/bin/mcp-server.js +892 -326
- package/bin/mcp-server.js.map +61 -49
- package/esm/src/funcs/adminClientsCreateClient.d.ts +1 -1
- package/esm/src/funcs/adminClientsCreateClient.d.ts.map +1 -1
- package/esm/src/funcs/adminClientsCreateClient.js +6 -8
- package/esm/src/funcs/adminClientsCreateClient.js.map +1 -1
- package/esm/src/funcs/adminClientsGetClient.js +4 -6
- package/esm/src/funcs/adminClientsGetClient.js.map +1 -1
- package/esm/src/funcs/adminClientsListClients.js +3 -5
- package/esm/src/funcs/adminClientsListClients.js.map +1 -1
- package/esm/src/funcs/{authGetV1Me.d.ts → authMe.d.ts} +3 -3
- package/esm/src/funcs/authMe.d.ts.map +1 -0
- package/esm/src/funcs/{authGetV1Me.js → authMe.js} +5 -5
- package/esm/src/funcs/authMe.js.map +1 -0
- package/esm/src/funcs/filesCreateFile.js +31 -33
- package/esm/src/funcs/filesCreateFile.js.map +1 -1
- package/esm/src/funcs/filesDeleteFile.js +4 -6
- package/esm/src/funcs/filesDeleteFile.js.map +1 -1
- package/esm/src/funcs/filesGetFile.js +4 -4
- package/esm/src/funcs/filesGetFile.js.map +1 -1
- package/esm/src/funcs/filesListFiles.js +3 -5
- package/esm/src/funcs/filesListFiles.js.map +1 -1
- package/esm/src/funcs/filesUpdateFile.js +4 -4
- package/esm/src/funcs/filesUpdateFile.js.map +1 -1
- package/esm/src/funcs/{healthCheckGetV1.d.ts → healthIndex.d.ts} +3 -3
- package/esm/src/funcs/{authGetV1Me.d.ts.map → healthIndex.d.ts.map} +1 -1
- package/esm/src/funcs/{healthCheckGetV1.js → healthIndex.js} +5 -5
- package/esm/src/funcs/healthIndex.js.map +1 -0
- package/esm/src/funcs/{healthCheckGetV1Ping.d.ts → healthPing.d.ts} +3 -3
- package/esm/src/funcs/healthPing.d.ts.map +1 -0
- package/esm/src/funcs/{healthCheckGetV1Ping.js → healthPing.js} +5 -5
- package/esm/src/funcs/healthPing.js.map +1 -0
- package/esm/src/funcs/tasksCreateTask.js +5 -1
- package/esm/src/funcs/tasksCreateTask.js.map +1 -1
- package/esm/src/funcs/tasksDeleteTask.js +8 -4
- package/esm/src/funcs/tasksDeleteTask.js.map +1 -1
- package/esm/src/funcs/tasksGetTask.js +8 -4
- package/esm/src/funcs/tasksGetTask.js.map +1 -1
- package/esm/src/funcs/tasksListTasks.d.ts +1 -1
- package/esm/src/funcs/tasksListTasks.d.ts.map +1 -1
- package/esm/src/funcs/tasksListTasks.js +14 -8
- package/esm/src/funcs/tasksListTasks.js.map +1 -1
- package/esm/src/funcs/tasksUpdateTask.js +5 -1
- package/esm/src/funcs/tasksUpdateTask.js.map +1 -1
- package/esm/src/funcs/workspacesCreateWorkspace.d.ts +16 -0
- package/esm/src/funcs/workspacesCreateWorkspace.d.ts.map +1 -0
- package/esm/src/funcs/workspacesCreateWorkspace.js +92 -0
- package/esm/src/funcs/workspacesCreateWorkspace.js.map +1 -0
- package/esm/src/funcs/workspacesGetWorkspace.js +4 -6
- package/esm/src/funcs/workspacesGetWorkspace.js.map +1 -1
- package/esm/src/funcs/workspacesListWorkspaces.js +4 -4
- package/esm/src/funcs/workspacesListWorkspaces.js.map +1 -1
- package/esm/src/lib/config.d.ts +3 -3
- package/esm/src/lib/config.d.ts.map +1 -1
- package/esm/src/lib/config.js +4 -6
- package/esm/src/lib/config.js.map +1 -1
- package/esm/src/mcp-server/mcp-server.js +1 -1
- package/esm/src/mcp-server/mcp-server.js.map +1 -1
- package/esm/src/mcp-server/server.d.ts.map +1 -1
- package/esm/src/mcp-server/server.js +22 -19
- package/esm/src/mcp-server/server.js.map +1 -1
- package/esm/src/mcp-server/tools/adminClientsCreateClient.d.ts +1 -1
- package/esm/src/mcp-server/tools/adminClientsCreateClient.js +1 -1
- package/esm/src/mcp-server/tools/adminClientsCreateClient.js.map +1 -1
- package/esm/src/mcp-server/tools/authMe.d.ts +3 -0
- package/esm/src/mcp-server/tools/authMe.d.ts.map +1 -0
- package/esm/src/mcp-server/tools/{healthCheckGetV1.js → authMe.js} +6 -6
- package/esm/src/mcp-server/tools/authMe.js.map +1 -0
- package/esm/src/mcp-server/tools/healthIndex.d.ts +3 -0
- package/esm/src/mcp-server/tools/healthIndex.d.ts.map +1 -0
- package/esm/src/mcp-server/tools/{authGetV1Me.js → healthIndex.js} +6 -6
- package/esm/src/mcp-server/tools/healthIndex.js.map +1 -0
- package/esm/src/mcp-server/tools/healthPing.d.ts +3 -0
- package/esm/src/mcp-server/tools/healthPing.d.ts.map +1 -0
- package/esm/src/mcp-server/tools/{healthCheckGetV1Ping.js → healthPing.js} +5 -5
- package/esm/src/mcp-server/tools/healthPing.js.map +1 -0
- package/esm/src/mcp-server/tools/tasksListTasks.d.ts +1 -1
- package/esm/src/mcp-server/tools/tasksListTasks.js +1 -1
- package/esm/src/mcp-server/tools/tasksListTasks.js.map +1 -1
- package/esm/src/mcp-server/tools/workspacesCreateWorkspace.d.ts +7 -0
- package/esm/src/mcp-server/tools/workspacesCreateWorkspace.d.ts.map +1 -0
- package/esm/src/mcp-server/tools/workspacesCreateWorkspace.js +28 -0
- package/esm/src/mcp-server/tools/workspacesCreateWorkspace.js.map +1 -0
- package/esm/src/models/autherror.d.ts +13 -0
- package/esm/src/models/autherror.d.ts.map +1 -0
- package/esm/src/models/autherror.js +17 -0
- package/esm/src/models/autherror.js.map +1 -0
- package/esm/src/models/badrequest.d.ts +13 -0
- package/esm/src/models/badrequest.d.ts.map +1 -0
- package/esm/src/models/badrequest.js +17 -0
- package/esm/src/models/badrequest.js.map +1 -0
- package/esm/src/models/client.d.ts +3 -3
- package/esm/src/models/client.d.ts.map +1 -1
- package/esm/src/models/client.js +2 -2
- package/esm/src/models/client.js.map +1 -1
- package/esm/src/models/clientcreate.d.ts +3 -3
- package/esm/src/models/clientcreate.d.ts.map +1 -1
- package/esm/src/models/clientcreate.js +2 -2
- package/esm/src/models/clientcreate.js.map +1 -1
- package/esm/src/models/createclientop.d.ts +19 -8
- package/esm/src/models/createclientop.d.ts.map +1 -1
- package/esm/src/models/createclientop.js +17 -4
- package/esm/src/models/createclientop.js.map +1 -1
- package/esm/src/models/createfileop.d.ts +29 -9
- package/esm/src/models/createfileop.d.ts.map +1 -1
- package/esm/src/models/createfileop.js +29 -5
- package/esm/src/models/createfileop.js.map +1 -1
- package/esm/src/models/createtaskop.d.ts +25 -4
- package/esm/src/models/createtaskop.d.ts.map +1 -1
- package/esm/src/models/createtaskop.js +22 -3
- package/esm/src/models/createtaskop.js.map +1 -1
- package/esm/src/models/createworkspaceop.d.ts +59 -0
- package/esm/src/models/createworkspaceop.d.ts.map +1 -0
- package/esm/src/models/createworkspaceop.js +57 -0
- package/esm/src/models/createworkspaceop.js.map +1 -0
- package/esm/src/models/deletefileop.d.ts +19 -12
- package/esm/src/models/deletefileop.d.ts.map +1 -1
- package/esm/src/models/deletefileop.js +20 -7
- package/esm/src/models/deletefileop.js.map +1 -1
- package/esm/src/models/deletetaskop.d.ts +20 -4
- package/esm/src/models/deletetaskop.d.ts.map +1 -1
- package/esm/src/models/deletetaskop.js +21 -3
- package/esm/src/models/deletetaskop.js.map +1 -1
- package/esm/src/models/getclientop.d.ts +17 -12
- package/esm/src/models/getclientop.d.ts.map +1 -1
- package/esm/src/models/getclientop.js +18 -7
- package/esm/src/models/getclientop.js.map +1 -1
- package/esm/src/models/getfileop.d.ts +21 -8
- package/esm/src/models/getfileop.d.ts.map +1 -1
- package/esm/src/models/getfileop.js +19 -4
- package/esm/src/models/getfileop.js.map +1 -1
- package/esm/src/models/gettaskop.d.ts +20 -4
- package/esm/src/models/gettaskop.d.ts.map +1 -1
- package/esm/src/models/gettaskop.js +21 -3
- package/esm/src/models/gettaskop.js.map +1 -1
- package/esm/src/models/getworkspaceop.d.ts +19 -12
- package/esm/src/models/getworkspaceop.d.ts.map +1 -1
- package/esm/src/models/getworkspaceop.js +20 -7
- package/esm/src/models/getworkspaceop.js.map +1 -1
- package/esm/src/models/indexop.d.ts +18 -0
- package/esm/src/models/indexop.d.ts.map +1 -0
- package/esm/src/models/indexop.js +16 -0
- package/esm/src/models/indexop.js.map +1 -0
- package/esm/src/models/listclientsop.d.ts +27 -25
- package/esm/src/models/listclientsop.d.ts.map +1 -1
- package/esm/src/models/listclientsop.js +25 -17
- package/esm/src/models/listclientsop.js.map +1 -1
- package/esm/src/models/listfilesop.d.ts +20 -16
- package/esm/src/models/listfilesop.d.ts.map +1 -1
- package/esm/src/models/listfilesop.js +21 -12
- package/esm/src/models/listfilesop.js.map +1 -1
- package/esm/src/models/listtasksop.d.ts +33 -8
- package/esm/src/models/listtasksop.d.ts.map +1 -1
- package/esm/src/models/listtasksop.js +41 -8
- package/esm/src/models/listtasksop.js.map +1 -1
- package/esm/src/models/listworkspacesop.d.ts +20 -16
- package/esm/src/models/listworkspacesop.d.ts.map +1 -1
- package/esm/src/models/listworkspacesop.js +21 -11
- package/esm/src/models/listworkspacesop.js.map +1 -1
- package/esm/src/models/meop.d.ts +41 -0
- package/esm/src/models/meop.d.ts.map +1 -0
- package/esm/src/models/meop.js +38 -0
- package/esm/src/models/meop.js.map +1 -0
- package/esm/src/models/notfound.d.ts +13 -0
- package/esm/src/models/notfound.d.ts.map +1 -0
- package/esm/src/models/notfound.js +18 -0
- package/esm/src/models/notfound.js.map +1 -0
- package/esm/src/models/paginatedclients.d.ts +9 -0
- package/esm/src/models/paginatedclients.d.ts.map +1 -0
- package/esm/src/models/paginatedclients.js +11 -0
- package/esm/src/models/paginatedclients.js.map +1 -0
- package/esm/src/models/paginatedfiles.d.ts +9 -0
- package/esm/src/models/paginatedfiles.d.ts.map +1 -0
- package/esm/src/models/paginatedfiles.js +11 -0
- package/esm/src/models/paginatedfiles.js.map +1 -0
- package/esm/src/models/paginatedtasks.d.ts +9 -0
- package/esm/src/models/paginatedtasks.d.ts.map +1 -0
- package/esm/src/models/paginatedtasks.js +11 -0
- package/esm/src/models/paginatedtasks.js.map +1 -0
- package/esm/src/models/paginatedworkspaces.d.ts +9 -0
- package/esm/src/models/paginatedworkspaces.d.ts.map +1 -0
- package/esm/src/models/paginatedworkspaces.js +11 -0
- package/esm/src/models/paginatedworkspaces.js.map +1 -0
- package/esm/src/models/pingop.d.ts +18 -0
- package/esm/src/models/pingop.d.ts.map +1 -0
- package/esm/src/models/pingop.js +16 -0
- package/esm/src/models/pingop.js.map +1 -0
- package/esm/src/models/ratelimit.d.ts +13 -0
- package/esm/src/models/ratelimit.d.ts.map +1 -0
- package/esm/src/models/ratelimit.js +17 -0
- package/esm/src/models/ratelimit.js.map +1 -0
- package/esm/src/models/updatefileop.d.ts +22 -9
- package/esm/src/models/updatefileop.d.ts.map +1 -1
- package/esm/src/models/updatefileop.js +20 -5
- package/esm/src/models/updatefileop.js.map +1 -1
- package/esm/src/models/updatetaskop.d.ts +20 -4
- package/esm/src/models/updatetaskop.d.ts.map +1 -1
- package/esm/src/models/updatetaskop.js +21 -3
- package/esm/src/models/updatetaskop.js.map +1 -1
- package/esm/src/models/workspacecreate.d.ts +6 -0
- package/esm/src/models/workspacecreate.d.ts.map +1 -0
- package/esm/src/models/workspacecreate.js +8 -0
- package/esm/src/models/workspacecreate.js.map +1 -0
- package/manifest.json +8 -4
- package/package.json +1 -1
- package/src/funcs/adminClientsCreateClient.ts +10 -9
- package/src/funcs/adminClientsGetClient.ts +6 -5
- package/src/funcs/adminClientsListClients.ts +6 -5
- package/src/funcs/{authGetV1Me.ts → authMe.ts} +11 -10
- package/src/funcs/filesCreateFile.ts +41 -39
- package/src/funcs/filesDeleteFile.ts +7 -5
- package/src/funcs/filesGetFile.ts +7 -3
- package/src/funcs/filesListFiles.ts +7 -5
- package/src/funcs/filesUpdateFile.ts +7 -3
- package/src/funcs/{healthCheckGetV1.ts → healthIndex.ts} +9 -7
- package/src/funcs/{healthCheckGetV1Ping.ts → healthPing.ts} +9 -10
- package/src/funcs/tasksCreateTask.ts +10 -1
- package/src/funcs/tasksDeleteTask.ts +11 -2
- package/src/funcs/tasksGetTask.ts +11 -2
- package/src/funcs/tasksListTasks.ts +20 -9
- package/src/funcs/tasksUpdateTask.ts +10 -1
- package/src/funcs/workspacesCreateWorkspace.ts +175 -0
- package/src/funcs/workspacesGetWorkspace.ts +7 -5
- package/src/funcs/workspacesListWorkspaces.ts +8 -4
- package/src/lib/config.ts +41 -43
- package/src/mcp-server/mcp-server.ts +10 -10
- package/src/mcp-server/server.ts +77 -72
- package/src/mcp-server/tools/adminClientsCreateClient.ts +1 -1
- package/src/mcp-server/tools/{authGetV1Me.ts → authMe.ts} +4 -4
- package/src/mcp-server/tools/{healthCheckGetV1.ts → healthIndex.ts} +4 -4
- package/src/mcp-server/tools/{healthCheckGetV1Ping.ts → healthPing.ts} +4 -4
- package/src/mcp-server/tools/tasksListTasks.ts +1 -1
- package/src/mcp-server/tools/workspacesCreateWorkspace.ts +37 -0
- package/src/models/autherror.ts +32 -0
- package/src/models/badrequest.ts +35 -0
- package/src/models/client.ts +4 -4
- package/src/models/clientcreate.ts +6 -4
- package/src/models/createclientop.ts +44 -20
- package/src/models/createfileop.ts +78 -26
- package/src/models/createtaskop.ts +59 -10
- package/src/models/createworkspaceop.ts +158 -0
- package/src/models/deletefileop.ts +41 -30
- package/src/models/deletetaskop.ts +43 -10
- package/src/models/getclientop.ts +38 -30
- package/src/models/getfileop.ts +47 -20
- package/src/models/gettaskop.ts +43 -10
- package/src/models/getworkspaceop.ts +41 -30
- package/src/models/indexop.ts +39 -0
- package/src/models/listclientsop.ts +56 -47
- package/src/models/listfilesop.ts +42 -34
- package/src/models/listtasksop.ts +72 -14
- package/src/models/listworkspacesop.ts +45 -35
- package/src/models/meop.ts +96 -0
- package/src/models/notfound.ts +32 -0
- package/src/models/paginatedclients.ts +18 -0
- package/src/models/paginatedfiles.ts +18 -0
- package/src/models/paginatedtasks.ts +18 -0
- package/src/models/paginatedworkspaces.ts +21 -0
- package/src/models/pingop.ts +39 -0
- package/src/models/ratelimit.ts +32 -0
- package/src/models/updatefileop.ts +49 -22
- package/src/models/updatetaskop.ts +41 -7
- package/src/models/workspacecreate.ts +15 -0
- package/esm/src/funcs/authGetV1Me.js.map +0 -1
- package/esm/src/funcs/healthCheckGetV1.d.ts.map +0 -1
- package/esm/src/funcs/healthCheckGetV1.js.map +0 -1
- package/esm/src/funcs/healthCheckGetV1Ping.d.ts.map +0 -1
- package/esm/src/funcs/healthCheckGetV1Ping.js.map +0 -1
- package/esm/src/mcp-server/tools/authGetV1Me.d.ts +0 -3
- package/esm/src/mcp-server/tools/authGetV1Me.d.ts.map +0 -1
- package/esm/src/mcp-server/tools/authGetV1Me.js.map +0 -1
- package/esm/src/mcp-server/tools/healthCheckGetV1.d.ts +0 -3
- package/esm/src/mcp-server/tools/healthCheckGetV1.d.ts.map +0 -1
- package/esm/src/mcp-server/tools/healthCheckGetV1.js.map +0 -1
- package/esm/src/mcp-server/tools/healthCheckGetV1Ping.d.ts +0 -3
- package/esm/src/mcp-server/tools/healthCheckGetV1Ping.d.ts.map +0 -1
- package/esm/src/mcp-server/tools/healthCheckGetV1Ping.js.map +0 -1
- package/esm/src/models/getv1meop.d.ts +0 -22
- package/esm/src/models/getv1meop.d.ts.map +0 -1
- package/esm/src/models/getv1meop.js +0 -20
- package/esm/src/models/getv1meop.js.map +0 -1
- package/esm/src/models/getv1op.d.ts +0 -16
- package/esm/src/models/getv1op.d.ts.map +0 -1
- package/esm/src/models/getv1op.js +0 -14
- package/esm/src/models/getv1op.js.map +0 -1
- package/esm/src/models/getv1pingop.d.ts +0 -16
- package/esm/src/models/getv1pingop.d.ts.map +0 -1
- package/esm/src/models/getv1pingop.js +0 -14
- package/esm/src/models/getv1pingop.js.map +0 -1
- package/src/models/getv1meop.ts +0 -50
- package/src/models/getv1op.ts +0 -36
- package/src/models/getv1pingop.ts +0 -36
package/src/mcp-server/server.ts
CHANGED
|
@@ -8,102 +8,107 @@ import { SDKOptions } from "../lib/config.js";
|
|
|
8
8
|
import type { ConsoleLogger } from "./console-logger.js";
|
|
9
9
|
import { createRegisterPrompt } from "./prompts.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
createRegisterResource,
|
|
12
|
+
createRegisterResourceTemplate,
|
|
13
13
|
} from "./resources.js";
|
|
14
14
|
import { MCPScope } from "./scopes.js";
|
|
15
15
|
import { createRegisterTool } from "./tools.js";
|
|
16
16
|
import { tool$adminClientsCreateClient } from "./tools/adminClientsCreateClient.js";
|
|
17
17
|
import { tool$adminClientsGetClient } from "./tools/adminClientsGetClient.js";
|
|
18
18
|
import { tool$adminClientsListClients } from "./tools/adminClientsListClients.js";
|
|
19
|
-
import { tool$
|
|
19
|
+
import { tool$authMe } from "./tools/authMe.js";
|
|
20
20
|
import { tool$filesCreateFile } from "./tools/filesCreateFile.js";
|
|
21
21
|
import { tool$filesDeleteFile } from "./tools/filesDeleteFile.js";
|
|
22
22
|
import { tool$filesGetFile } from "./tools/filesGetFile.js";
|
|
23
23
|
import { tool$filesListFiles } from "./tools/filesListFiles.js";
|
|
24
24
|
import { tool$filesUpdateFile } from "./tools/filesUpdateFile.js";
|
|
25
|
-
import { tool$
|
|
26
|
-
import { tool$
|
|
25
|
+
import { tool$healthIndex } from "./tools/healthIndex.js";
|
|
26
|
+
import { tool$healthPing } from "./tools/healthPing.js";
|
|
27
27
|
import { tool$tasksCreateTask } from "./tools/tasksCreateTask.js";
|
|
28
28
|
import { tool$tasksDeleteTask } from "./tools/tasksDeleteTask.js";
|
|
29
29
|
import { tool$tasksGetTask } from "./tools/tasksGetTask.js";
|
|
30
30
|
import { tool$tasksListTasks } from "./tools/tasksListTasks.js";
|
|
31
31
|
import { tool$tasksUpdateTask } from "./tools/tasksUpdateTask.js";
|
|
32
|
+
import { tool$workspacesCreateWorkspace } from "./tools/workspacesCreateWorkspace.js";
|
|
32
33
|
import { tool$workspacesGetWorkspace } from "./tools/workspacesGetWorkspace.js";
|
|
33
34
|
import { tool$workspacesListWorkspaces } from "./tools/workspacesListWorkspaces.js";
|
|
34
35
|
|
|
35
36
|
export function createMCPServer(deps: {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
logger: ConsoleLogger;
|
|
38
|
+
allowedTools?: string[] | undefined;
|
|
39
|
+
scopes?: MCPScope[] | undefined;
|
|
40
|
+
getSDK?: () => SteuerboardCore;
|
|
41
|
+
serverURL?: string | undefined;
|
|
42
|
+
security?: SDKOptions["security"] | undefined;
|
|
43
|
+
serverIdx?: SDKOptions["serverIdx"] | undefined;
|
|
43
44
|
}) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
const server = new McpServer({
|
|
46
|
+
name: "Steuerboard",
|
|
47
|
+
version: "0.1.0",
|
|
48
|
+
});
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
50
|
+
const getClient =
|
|
51
|
+
deps.getSDK ||
|
|
52
|
+
(() =>
|
|
53
|
+
new SteuerboardCore({
|
|
54
|
+
security: deps.security,
|
|
55
|
+
serverURL: deps.serverURL,
|
|
56
|
+
serverIdx: deps.serverIdx,
|
|
57
|
+
debugLogger:
|
|
58
|
+
deps.logger.level === "debug"
|
|
59
|
+
? {
|
|
60
|
+
log: (...args) => console.log(...args),
|
|
61
|
+
group: (...args) => console.group(...args),
|
|
62
|
+
groupEnd: (...args) => console.groupEnd(...args),
|
|
63
|
+
}
|
|
64
|
+
: undefined,
|
|
65
|
+
}));
|
|
62
66
|
|
|
63
|
-
|
|
67
|
+
const scopes = new Set(deps.scopes);
|
|
64
68
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
69
|
+
const allowedTools = deps.allowedTools && new Set(deps.allowedTools);
|
|
70
|
+
const tool = createRegisterTool(
|
|
71
|
+
deps.logger,
|
|
72
|
+
server,
|
|
73
|
+
getClient,
|
|
74
|
+
scopes,
|
|
75
|
+
allowedTools,
|
|
76
|
+
);
|
|
77
|
+
const resource = createRegisterResource(
|
|
78
|
+
deps.logger,
|
|
79
|
+
server,
|
|
80
|
+
getClient,
|
|
81
|
+
scopes,
|
|
82
|
+
);
|
|
83
|
+
const resourceTemplate = createRegisterResourceTemplate(
|
|
84
|
+
deps.logger,
|
|
85
|
+
server,
|
|
86
|
+
getClient,
|
|
87
|
+
scopes,
|
|
88
|
+
);
|
|
89
|
+
const prompt = createRegisterPrompt(deps.logger, server, getClient, scopes);
|
|
90
|
+
const register = { tool, resource, resourceTemplate, prompt };
|
|
91
|
+
void register; // suppress unused warnings
|
|
88
92
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
93
|
+
tool(tool$healthIndex);
|
|
94
|
+
tool(tool$healthPing);
|
|
95
|
+
tool(tool$authMe);
|
|
96
|
+
tool(tool$adminClientsListClients);
|
|
97
|
+
tool(tool$adminClientsCreateClient);
|
|
98
|
+
tool(tool$adminClientsGetClient);
|
|
99
|
+
tool(tool$workspacesListWorkspaces);
|
|
100
|
+
tool(tool$workspacesCreateWorkspace);
|
|
101
|
+
tool(tool$workspacesGetWorkspace);
|
|
102
|
+
tool(tool$filesListFiles);
|
|
103
|
+
tool(tool$filesCreateFile);
|
|
104
|
+
tool(tool$filesGetFile);
|
|
105
|
+
tool(tool$filesUpdateFile);
|
|
106
|
+
tool(tool$filesDeleteFile);
|
|
107
|
+
tool(tool$tasksListTasks);
|
|
108
|
+
tool(tool$tasksCreateTask);
|
|
109
|
+
tool(tool$tasksGetTask);
|
|
110
|
+
tool(tool$tasksUpdateTask);
|
|
111
|
+
tool(tool$tasksDeleteTask);
|
|
107
112
|
|
|
108
|
-
|
|
113
|
+
return server;
|
|
109
114
|
}
|
|
@@ -7,7 +7,7 @@ import { ClientCreate$zodSchema } from "../../models/clientcreate.js";
|
|
|
7
7
|
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
8
|
|
|
9
9
|
const args = {
|
|
10
|
-
request: ClientCreate$zodSchema
|
|
10
|
+
request: ClientCreate$zodSchema,
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export const tool$adminClientsCreateClient: ToolDefinition<typeof args> = {
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { authMe } from "../../funcs/authMe.js";
|
|
6
6
|
import { formatResult, ToolDefinition } from "../tools.js";
|
|
7
7
|
|
|
8
|
-
export const tool$
|
|
9
|
-
name: "auth-
|
|
8
|
+
export const tool$authMe: ToolDefinition = {
|
|
9
|
+
name: "auth-me",
|
|
10
10
|
description: `Me`,
|
|
11
11
|
tool: async (client, ctx) => {
|
|
12
|
-
const [result, apiCall] = await
|
|
12
|
+
const [result, apiCall] = await authMe(
|
|
13
13
|
client,
|
|
14
14
|
{ fetchOptions: { signal: ctx.signal } },
|
|
15
15
|
).$inspect();
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { healthIndex } from "../../funcs/healthIndex.js";
|
|
6
6
|
import { formatResult, ToolDefinition } from "../tools.js";
|
|
7
7
|
|
|
8
|
-
export const tool$
|
|
9
|
-
name: "health-
|
|
8
|
+
export const tool$healthIndex: ToolDefinition = {
|
|
9
|
+
name: "health-index",
|
|
10
10
|
description: `Index`,
|
|
11
11
|
tool: async (client, ctx) => {
|
|
12
|
-
const [result, apiCall] = await
|
|
12
|
+
const [result, apiCall] = await healthIndex(
|
|
13
13
|
client,
|
|
14
14
|
{ fetchOptions: { signal: ctx.signal } },
|
|
15
15
|
).$inspect();
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { healthPing } from "../../funcs/healthPing.js";
|
|
6
6
|
import { formatResult, ToolDefinition } from "../tools.js";
|
|
7
7
|
|
|
8
|
-
export const tool$
|
|
9
|
-
name: "health-
|
|
8
|
+
export const tool$healthPing: ToolDefinition = {
|
|
9
|
+
name: "health-ping",
|
|
10
10
|
description: `Ping Pong`,
|
|
11
11
|
tool: async (client, ctx) => {
|
|
12
|
-
const [result, apiCall] = await
|
|
12
|
+
const [result, apiCall] = await healthPing(
|
|
13
13
|
client,
|
|
14
14
|
{ fetchOptions: { signal: ctx.signal } },
|
|
15
15
|
).$inspect();
|
|
@@ -7,7 +7,7 @@ import { ListTasksRequest$zodSchema } from "../../models/listtasksop.js";
|
|
|
7
7
|
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
8
|
|
|
9
9
|
const args = {
|
|
10
|
-
request: ListTasksRequest$zodSchema
|
|
10
|
+
request: ListTasksRequest$zodSchema,
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export const tool$tasksListTasks: ToolDefinition<typeof args> = {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { workspacesCreateWorkspace } from "../../funcs/workspacesCreateWorkspace.js";
|
|
6
|
+
import { CreateWorkspaceRequest$zodSchema } from "../../models/createworkspaceop.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: CreateWorkspaceRequest$zodSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$workspacesCreateWorkspace: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "workspaces-create-workspace",
|
|
15
|
+
description: `Create a workspace
|
|
16
|
+
|
|
17
|
+
Creates a new workspace and returns the created workspace object.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await workspacesCreateWorkspace(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const value = result.value;
|
|
34
|
+
|
|
35
|
+
return formatResult(value, apiCall);
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export const AuthErrorType$zodSchema = z.enum([
|
|
8
|
+
"auth_error",
|
|
9
|
+
]);
|
|
10
|
+
|
|
11
|
+
export type AuthErrorType = z.infer<typeof AuthErrorType$zodSchema>;
|
|
12
|
+
|
|
13
|
+
export const AuthErrorCode$zodSchema = z.enum([
|
|
14
|
+
"unauthorized",
|
|
15
|
+
]);
|
|
16
|
+
|
|
17
|
+
export type AuthErrorCode = z.infer<typeof AuthErrorCode$zodSchema>;
|
|
18
|
+
|
|
19
|
+
export type AuthError = {
|
|
20
|
+
status_code: number;
|
|
21
|
+
type: AuthErrorType;
|
|
22
|
+
code: AuthErrorCode;
|
|
23
|
+
message: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const AuthError$zodSchema: z.ZodType<AuthError, z.ZodTypeDef, unknown> =
|
|
27
|
+
z.object({
|
|
28
|
+
code: AuthErrorCode$zodSchema,
|
|
29
|
+
message: z.string(),
|
|
30
|
+
status_code: z.number(),
|
|
31
|
+
type: AuthErrorType$zodSchema,
|
|
32
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export const BadRequestType$zodSchema = z.enum([
|
|
8
|
+
"bad_request",
|
|
9
|
+
]);
|
|
10
|
+
|
|
11
|
+
export type BadRequestType = z.infer<typeof BadRequestType$zodSchema>;
|
|
12
|
+
|
|
13
|
+
export const BadRequestCode$zodSchema = z.enum([
|
|
14
|
+
"missing_client_id",
|
|
15
|
+
]);
|
|
16
|
+
|
|
17
|
+
export type BadRequestCode = z.infer<typeof BadRequestCode$zodSchema>;
|
|
18
|
+
|
|
19
|
+
export type BadRequest = {
|
|
20
|
+
status_code: number;
|
|
21
|
+
type: BadRequestType;
|
|
22
|
+
code: BadRequestCode;
|
|
23
|
+
message: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const BadRequest$zodSchema: z.ZodType<
|
|
27
|
+
BadRequest,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
code: BadRequestCode$zodSchema,
|
|
32
|
+
message: z.string(),
|
|
33
|
+
status_code: z.number(),
|
|
34
|
+
type: BadRequestType$zodSchema,
|
|
35
|
+
});
|
package/src/models/client.ts
CHANGED
|
@@ -7,7 +7,7 @@ import * as z from "zod";
|
|
|
7
7
|
/**
|
|
8
8
|
* The type of the client. 'natural_person' for individuals, 'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and 'individual_enterprise' for sole proprietorships.
|
|
9
9
|
*/
|
|
10
|
-
export const
|
|
10
|
+
export const ClientClientType$zodSchema = z.enum([
|
|
11
11
|
"natural_person",
|
|
12
12
|
"individual_enterprise",
|
|
13
13
|
"legal_person",
|
|
@@ -15,13 +15,13 @@ export const ClientType$zodSchema = z.enum([
|
|
|
15
15
|
"The type of the client. 'natural_person' for individuals, 'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and 'individual_enterprise' for sole proprietorships.",
|
|
16
16
|
);
|
|
17
17
|
|
|
18
|
-
export type
|
|
18
|
+
export type ClientClientType = z.infer<typeof ClientClientType$zodSchema>;
|
|
19
19
|
|
|
20
20
|
export type Client = {
|
|
21
21
|
id: string;
|
|
22
22
|
name: string;
|
|
23
23
|
slug: string;
|
|
24
|
-
type:
|
|
24
|
+
type: ClientClientType;
|
|
25
25
|
customId: string | null;
|
|
26
26
|
legalName: string | null;
|
|
27
27
|
archivedAt: string | null;
|
|
@@ -40,6 +40,6 @@ export const Client$zodSchema: z.ZodType<Client, z.ZodTypeDef, unknown> = z
|
|
|
40
40
|
legalName: z.string().nullable(),
|
|
41
41
|
name: z.string(),
|
|
42
42
|
slug: z.string(),
|
|
43
|
-
type:
|
|
43
|
+
type: ClientClientType$zodSchema,
|
|
44
44
|
updatedAt: z.string(),
|
|
45
45
|
});
|
|
@@ -7,7 +7,7 @@ import * as z from "zod";
|
|
|
7
7
|
/**
|
|
8
8
|
* The type of the client. 'natural_person' for individuals, 'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and 'individual_enterprise' for sole proprietorships.
|
|
9
9
|
*/
|
|
10
|
-
export const
|
|
10
|
+
export const ClientCreateClientType$zodSchema = z.enum([
|
|
11
11
|
"natural_person",
|
|
12
12
|
"individual_enterprise",
|
|
13
13
|
"legal_person",
|
|
@@ -15,7 +15,9 @@ export const ClientCreateType$zodSchema = z.enum([
|
|
|
15
15
|
"The type of the client. 'natural_person' for individuals, 'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and 'individual_enterprise' for sole proprietorships.",
|
|
16
16
|
);
|
|
17
17
|
|
|
18
|
-
export type
|
|
18
|
+
export type ClientCreateClientType = z.infer<
|
|
19
|
+
typeof ClientCreateClientType$zodSchema
|
|
20
|
+
>;
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
23
|
* The address of the client
|
|
@@ -39,7 +41,7 @@ export const Address$zodSchema: z.ZodType<Address, z.ZodTypeDef, unknown> = z
|
|
|
39
41
|
|
|
40
42
|
export type ClientCreate = {
|
|
41
43
|
name: string;
|
|
42
|
-
type:
|
|
44
|
+
type: ClientCreateClientType;
|
|
43
45
|
customId?: string | undefined;
|
|
44
46
|
address?: Address | undefined;
|
|
45
47
|
};
|
|
@@ -52,5 +54,5 @@ export const ClientCreate$zodSchema: z.ZodType<
|
|
|
52
54
|
address: z.lazy(() => Address$zodSchema).optional(),
|
|
53
55
|
customId: z.string().optional(),
|
|
54
56
|
name: z.string(),
|
|
55
|
-
type:
|
|
57
|
+
type: ClientCreateClientType$zodSchema,
|
|
56
58
|
});
|
|
@@ -3,22 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import { AuthError, AuthError$zodSchema } from "./autherror.js";
|
|
6
7
|
import { Client, Client$zodSchema } from "./client.js";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Rate limit exceeded. Slow down requests or retry after the time specified in the rate limit response headers
|
|
10
|
-
*/
|
|
11
|
-
export type CreateClientTooManyRequestsResponseBody = { message: string };
|
|
12
|
-
|
|
13
|
-
export const CreateClientTooManyRequestsResponseBody$zodSchema: z.ZodType<
|
|
14
|
-
CreateClientTooManyRequestsResponseBody,
|
|
15
|
-
z.ZodTypeDef,
|
|
16
|
-
unknown
|
|
17
|
-
> = z.object({
|
|
18
|
-
message: z.string(),
|
|
19
|
-
}).describe(
|
|
20
|
-
"Rate limit exceeded. Slow down requests or retry after the time specified in the rate limit response headers",
|
|
21
|
-
);
|
|
8
|
+
import { RateLimit, RateLimit$zodSchema } from "./ratelimit.js";
|
|
22
9
|
|
|
23
10
|
export type CreateClientPath = string | number;
|
|
24
11
|
|
|
@@ -81,17 +68,52 @@ export const CreateClientUnprocessableEntityResponseBody$zodSchema: z.ZodType<
|
|
|
81
68
|
success: z.boolean(),
|
|
82
69
|
}).describe("The validation error(s)");
|
|
83
70
|
|
|
71
|
+
export const CreateClientType$zodSchema = z.enum([
|
|
72
|
+
"auth_error",
|
|
73
|
+
]);
|
|
74
|
+
|
|
75
|
+
export type CreateClientType = z.infer<typeof CreateClientType$zodSchema>;
|
|
76
|
+
|
|
77
|
+
export const CreateClientCode$zodSchema = z.enum([
|
|
78
|
+
"missing_scope",
|
|
79
|
+
]);
|
|
80
|
+
|
|
81
|
+
export type CreateClientCode = z.infer<typeof CreateClientCode$zodSchema>;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Missing scope
|
|
85
|
+
*/
|
|
86
|
+
export type CreateClientForbiddenResponseBody = {
|
|
87
|
+
status_code: number;
|
|
88
|
+
type: CreateClientType;
|
|
89
|
+
code: CreateClientCode;
|
|
90
|
+
message: string;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export const CreateClientForbiddenResponseBody$zodSchema: z.ZodType<
|
|
94
|
+
CreateClientForbiddenResponseBody,
|
|
95
|
+
z.ZodTypeDef,
|
|
96
|
+
unknown
|
|
97
|
+
> = z.object({
|
|
98
|
+
code: CreateClientCode$zodSchema,
|
|
99
|
+
message: z.string(),
|
|
100
|
+
status_code: z.number(),
|
|
101
|
+
type: CreateClientType$zodSchema,
|
|
102
|
+
}).describe("Missing scope");
|
|
103
|
+
|
|
84
104
|
export type CreateClientResponse = {
|
|
85
105
|
ContentType: string;
|
|
86
106
|
StatusCode: number;
|
|
87
107
|
RawResponse: Response;
|
|
88
108
|
Client?: Client | undefined;
|
|
109
|
+
auth_error?: AuthError | undefined;
|
|
110
|
+
fourHundredAndThreeApplicationJsonObject?:
|
|
111
|
+
| CreateClientForbiddenResponseBody
|
|
112
|
+
| undefined;
|
|
89
113
|
fourHundredAndTwentyTwoApplicationJsonObject?:
|
|
90
114
|
| CreateClientUnprocessableEntityResponseBody
|
|
91
115
|
| undefined;
|
|
92
|
-
|
|
93
|
-
| CreateClientTooManyRequestsResponseBody
|
|
94
|
-
| undefined;
|
|
116
|
+
rate_limit?: RateLimit | undefined;
|
|
95
117
|
};
|
|
96
118
|
|
|
97
119
|
export const CreateClientResponse$zodSchema: z.ZodType<
|
|
@@ -103,10 +125,12 @@ export const CreateClientResponse$zodSchema: z.ZodType<
|
|
|
103
125
|
ContentType: z.string(),
|
|
104
126
|
RawResponse: z.instanceof(Response),
|
|
105
127
|
StatusCode: z.number().int(),
|
|
106
|
-
|
|
107
|
-
|
|
128
|
+
auth_error: AuthError$zodSchema.optional(),
|
|
129
|
+
fourHundredAndThreeApplicationJsonObject: z.lazy(() =>
|
|
130
|
+
CreateClientForbiddenResponseBody$zodSchema
|
|
108
131
|
).optional(),
|
|
109
132
|
fourHundredAndTwentyTwoApplicationJsonObject: z.lazy(() =>
|
|
110
133
|
CreateClientUnprocessableEntityResponseBody$zodSchema
|
|
111
134
|
).optional(),
|
|
135
|
+
rate_limit: RateLimit$zodSchema.optional(),
|
|
112
136
|
});
|