@mondaydotcomorg/agent-toolkit 2.2.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/core/index.d.ts +26 -3
- package/dist/cjs/core/index.js +25 -18
- package/dist/cjs/core/index.js.map +1 -1
- package/dist/cjs/mcp/index.d.ts +134 -6
- package/dist/cjs/mcp/index.js +26 -18
- package/dist/cjs/mcp/index.js.map +1 -1
- package/dist/cjs/openai/index.d.ts +5 -0
- package/dist/cjs/openai/index.js +25 -18
- package/dist/cjs/openai/index.js.map +1 -1
- package/dist/esm/core/index.d.ts +26 -3
- package/dist/esm/core/index.js +25 -18
- package/dist/esm/core/index.js.map +1 -1
- package/dist/esm/mcp/index.d.ts +134 -6
- package/dist/esm/mcp/index.js +26 -18
- package/dist/esm/mcp/index.js.map +1 -1
- package/dist/esm/openai/index.d.ts +5 -0
- package/dist/esm/openai/index.js +25 -18
- package/dist/esm/openai/index.js.map +1 -1
- package/package.json +5 -2
package/dist/cjs/core/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ZodRawShape, z, ZodTypeAny } from 'zod';
|
|
2
|
+
import { ToolAnnotations } from '@modelcontextprotocol/sdk/types';
|
|
2
3
|
import { ApiClient, ApiClientConfig } from '@mondaydotcomorg/api';
|
|
3
4
|
|
|
4
5
|
interface Executable<Input, Output> {
|
|
@@ -18,6 +19,9 @@ declare enum ToolType {
|
|
|
18
19
|
interface Tool<Input extends ZodRawShape | undefined, Output extends Record<string, unknown> = never> extends Executable<ToolInputType<Input>, ToolOutputType<Output>> {
|
|
19
20
|
name: string;
|
|
20
21
|
type: ToolType;
|
|
22
|
+
annotations: ToolAnnotations;
|
|
23
|
+
/** Whether the tool is enabled by default. Defaults to true if not specified. */
|
|
24
|
+
enabledByDefault?: boolean;
|
|
21
25
|
getDescription(): string;
|
|
22
26
|
getInputSchema(): Input;
|
|
23
27
|
}
|
|
@@ -25,16 +29,34 @@ interface Tool<Input extends ZodRawShape | undefined, Output extends Record<stri
|
|
|
25
29
|
type MondayApiToolContext = {
|
|
26
30
|
boardId?: number;
|
|
27
31
|
};
|
|
28
|
-
type BaseMondayApiToolConstructor = new (api: ApiClient) => BaseMondayApiTool<any>;
|
|
32
|
+
type BaseMondayApiToolConstructor = new (api: ApiClient, token?: string) => BaseMondayApiTool<any>;
|
|
29
33
|
declare abstract class BaseMondayApiTool<Input extends ZodRawShape | undefined, Output extends Record<string, unknown> = never> implements Tool<Input, Output> {
|
|
30
34
|
protected readonly mondayApi: ApiClient;
|
|
35
|
+
protected readonly apiToken?: string | undefined;
|
|
31
36
|
protected readonly context?: MondayApiToolContext | undefined;
|
|
32
37
|
abstract name: string;
|
|
33
38
|
abstract type: ToolType;
|
|
34
|
-
|
|
39
|
+
abstract annotations: ToolAnnotations;
|
|
40
|
+
enabledByDefault?: boolean;
|
|
41
|
+
constructor(mondayApi: ApiClient, apiToken?: string | undefined, context?: MondayApiToolContext | undefined);
|
|
35
42
|
abstract getDescription(): string;
|
|
36
43
|
abstract getInputSchema(): Input;
|
|
37
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Public execute method that automatically tracks execution
|
|
46
|
+
*/
|
|
47
|
+
execute(input?: ToolInputType<Input>): Promise<ToolOutputType<Output>>;
|
|
48
|
+
/**
|
|
49
|
+
* Abstract method that subclasses should implement for their actual logic
|
|
50
|
+
*/
|
|
51
|
+
protected abstract executeInternal(input?: ToolInputType<Input>): Promise<ToolOutputType<Output>>;
|
|
52
|
+
/**
|
|
53
|
+
* Tracks tool execution with timing and error information
|
|
54
|
+
* @param toolName - The name of the tool being executed
|
|
55
|
+
* @param executionTimeInMs - The time taken to execute the tool in milliseconds
|
|
56
|
+
* @param isError - Whether the execution resulted in an error
|
|
57
|
+
* @param params - The parameters passed to the tool
|
|
58
|
+
*/
|
|
59
|
+
private trackToolExecution;
|
|
38
60
|
}
|
|
39
61
|
|
|
40
62
|
declare const allMondayAppsTools: (new (...args: any[]) => Tool<any, any>)[];
|
|
@@ -53,6 +75,7 @@ type ToolsConfiguration = {
|
|
|
53
75
|
readOnlyMode?: boolean;
|
|
54
76
|
mode?: ToolMode;
|
|
55
77
|
enableDynamicApiTools?: boolean | 'only';
|
|
78
|
+
enableToolManager?: boolean;
|
|
56
79
|
};
|
|
57
80
|
type MondayAgentToolkitConfig = {
|
|
58
81
|
mondayApiToken: ApiClientConfig['token'];
|