@mondaydotcomorg/agent-toolkit 2.29.15 → 2.31.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 +2 -0
- package/dist/cjs/core/index.js +1 -1
- package/dist/cjs/core/index.js.map +1 -1
- package/dist/cjs/mcp/index.d.ts +2 -0
- package/dist/cjs/mcp/index.js +95 -95
- package/dist/cjs/mcp/index.js.map +1 -1
- package/dist/cjs/openai/index.d.ts +2 -0
- package/dist/cjs/openai/index.js +95 -95
- package/dist/cjs/openai/index.js.map +1 -1
- package/dist/esm/core/index.d.ts +2 -0
- package/dist/esm/core/index.js +1 -1
- package/dist/esm/core/index.js.map +1 -1
- package/dist/esm/mcp/index.d.ts +2 -0
- package/dist/esm/mcp/index.js +95 -95
- package/dist/esm/mcp/index.js.map +1 -1
- package/dist/esm/openai/index.d.ts +2 -0
- package/dist/esm/openai/index.js +95 -95
- package/dist/esm/openai/index.js.map +1 -1
- package/package.json +2 -2
package/dist/cjs/core/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ interface Tool<Input extends ZodRawShape | undefined, Output extends Record<stri
|
|
|
28
28
|
|
|
29
29
|
type MondayApiToolContext = {
|
|
30
30
|
boardId?: number;
|
|
31
|
+
apiVersion?: string;
|
|
31
32
|
agentType?: string;
|
|
32
33
|
agentClientName?: string;
|
|
33
34
|
clientRedirectUris?: string[];
|
|
@@ -137,6 +138,7 @@ type ToolsConfiguration = {
|
|
|
137
138
|
type MondayAgentToolkitConfig = {
|
|
138
139
|
mondayApiToken: ApiClientConfig['token'];
|
|
139
140
|
mondayApiVersion?: ApiClientConfig['apiVersion'];
|
|
141
|
+
mondayApiEndpoint?: ApiClientConfig['endpoint'];
|
|
140
142
|
mondayApiRequestConfig?: ApiClientConfig['requestConfig'];
|
|
141
143
|
toolsConfiguration?: ToolsConfiguration;
|
|
142
144
|
context?: MondayApiToolContext;
|
package/dist/cjs/core/index.js
CHANGED
|
@@ -362,7 +362,7 @@
|
|
|
362
362
|
name
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
|
-
`,j_={query:f.z.string().describe("Custom GraphQL query/mutation. you need to provide the full query / mutation"),variables:f.z.string().describe("JSON string containing the variables for the GraphQL operation")};class V_ extends Hu{constructor(e,a,t){super(e,a,t),this.name="all_monday_api",this.type=exports.ToolType.ALL_API,this.annotations=Gu({title:"Run Query or Mutation on any monday.com API",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Execute any monday.com API operation by generating GraphQL queries and mutations dynamically. Make sure you ask only for the fields you need and nothing more. When providing the query/mutation - use get_graphql_schema and get_type_details tools first to understand the schema before crafting your query."}getInputSchema(){return j_}async loadSchema(e){if(V_.schemaCache[e])return V_.schemaCache[e];try{const a=await this.mondayApi.rawRequest(k_),{data:t}=a,n=Jg(t);return V_.schemaCache[e]=n,n}catch(e){throw new Error(`Failed to load GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`)}}async validateOperation(e,a){var t;return Kg(await this.loadSchema(a),new qf(e,t).parseDocument()).map((e=>e.message))}async executeInternal(e){const{query:a,variables:t}=e;try{let e={};try{e=JSON.parse(t)}catch(e){return{content:`Error parsing variables: ${e instanceof Error?e.message:"Unknown error"}`}}const n=
|
|
365
|
+
`,j_={query:f.z.string().describe("Custom GraphQL query/mutation. you need to provide the full query / mutation"),variables:f.z.string().describe("JSON string containing the variables for the GraphQL operation")};class V_ extends Hu{constructor(e,a,t){super(e,a,t),this.name="all_monday_api",this.type=exports.ToolType.ALL_API,this.annotations=Gu({title:"Run Query or Mutation on any monday.com API",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1})}getDescription(){return"Execute any monday.com API operation by generating GraphQL queries and mutations dynamically. Make sure you ask only for the fields you need and nothing more. When providing the query/mutation - use get_graphql_schema and get_type_details tools first to understand the schema before crafting your query."}getInputSchema(){return j_}async loadSchema(e){if(V_.schemaCache[e])return V_.schemaCache[e];try{const a=await this.mondayApi.rawRequest(k_),{data:t}=a,n=Jg(t);return V_.schemaCache[e]=n,n}catch(e){throw new Error(`Failed to load GraphQL schema: ${e instanceof Error?e.message:"Unknown error"}`)}}async validateOperation(e,a){var t;return Kg(await this.loadSchema(a),new qf(e,t).parseDocument()).map((e=>e.message))}async executeInternal(e){const{query:a,variables:t}=e;try{let e={};try{e=JSON.parse(t)}catch(e){return{content:`Error parsing variables: ${e instanceof Error?e.message:"Unknown error"}`}}const n=await this.validateOperation(a,this.context?.apiVersion??"2026-01");if(n.length>0)return{content:n.join(", ")};const i=await this.mondayApi.request(a,e);return{content:JSON.stringify(i)}}catch(e){const a=e instanceof Error?e.message:"Unknown error";if(e instanceof Error&&"response"in e){const a=e;if(a.response?.errors)return{content:a.response.errors.map((e=>e.message)).join(", ")}}return{content:a}}}}V_.schemaCache={};const U_={itemId:f.z.number().describe("The ID of the item to be updated"),columnValues:f.z.string().describe('A string containing the new column values for the item following this structure: {\\"column_id\\": \\"value\\",... you can change multiple columns at once, note that for status column you must use nested value with \'label\' as a key and for date column use \'date\' as key} - example: "{\\"text_column_id\\":\\"New text\\", \\"status_column_id\\":{\\"label\\":\\"Done\\"}, \\"date_column_id\\":{\\"date\\":\\"2023-05-25\\"}, \\"phone_id\\":\\"123-456-7890\\", \\"email_id\\":\\"test@example.com\\"}"')},B_={boardId:f.z.number().describe("The ID of the board that contains the item to be updated"),...U_};class M_ extends Hu{constructor(){super(...arguments),this.name="change_item_column_values",this.type=exports.ToolType.WRITE,this.annotations=Gu({title:"Change Item Column Values",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0})}getDescription(){return"Change the column values of an item in a monday.com board"}getInputSchema(){return this.context?.boardId?U_:B_}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),itemId:e.itemId.toString(),columnValues:e.columnValues},t=await this.mondayApi.request(I_,a);return{content:`Item ${t.change_multiple_column_values?.id} successfully updated with the new column values`}}}const q_={boardName:f.z.string().describe("The name of the board to create"),boardKind:f.z.nativeEnum(hb).default(hb.Public).describe("The kind of board to create"),boardDescription:f.z.string().optional().describe("The description of the board to create"),workspaceId:f.z.string().optional().describe("The ID of the workspace to create the board in")};const z_=__`
|
|
366
366
|
fragment QuestionBasic on FormQuestion {
|
|
367
367
|
id
|
|
368
368
|
type
|