@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/esm/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/esm/core/index.js
CHANGED
|
@@ -362,7 +362,7 @@ import e from"util";import a,{Readable as t}from"stream";import n from"path";imp
|
|
|
362
362
|
name
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
|
-
`,x_={query:g.string().describe("Custom GraphQL query/mutation. you need to provide the full query / mutation"),variables:g.string().describe("JSON string containing the variables for the GraphQL operation")};class T_ extends Ou{constructor(e,a,t){super(e,a,t),this.name="all_monday_api",this.type=y.ALL_API,this.annotations=Du({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 x_}async loadSchema(e){if(T_.schemaCache[e])return T_.schemaCache[e];try{const a=await this.mondayApi.rawRequest(h_),{data:t}=a,n=$g(t);return T_.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 Cg(await this.loadSchema(a),new Nf(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
|
+
`,x_={query:g.string().describe("Custom GraphQL query/mutation. you need to provide the full query / mutation"),variables:g.string().describe("JSON string containing the variables for the GraphQL operation")};class T_ extends Ou{constructor(e,a,t){super(e,a,t),this.name="all_monday_api",this.type=y.ALL_API,this.annotations=Du({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 x_}async loadSchema(e){if(T_.schemaCache[e])return T_.schemaCache[e];try{const a=await this.mondayApi.rawRequest(h_),{data:t}=a,n=$g(t);return T_.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 Cg(await this.loadSchema(a),new Nf(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}}}}T_.schemaCache={};const E_={itemId:g.number().describe("The ID of the item to be updated"),columnValues:g.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\\"}"')},I_={boardId:g.number().describe("The ID of the board that contains the item to be updated"),...E_};class S_ extends Ou{constructor(){super(...arguments),this.name="change_item_column_values",this.type=y.WRITE,this.annotations=Du({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?E_:I_}async executeInternal(e){const a={boardId:(this.context?.boardId??e.boardId).toString(),itemId:e.itemId.toString(),columnValues:e.columnValues},t=await this.mondayApi.request(d_,a);return{content:`Item ${t.change_multiple_column_values?.id} successfully updated with the new column values`}}}const N_={boardName:g.string().describe("The name of the board to create"),boardKind:g.nativeEnum(Zg).default(Zg.Public).describe("The kind of board to create"),boardDescription:g.string().optional().describe("The description of the board to create"),workspaceId:g.string().optional().describe("The ID of the workspace to create the board in")};const A_=o_`
|
|
366
366
|
fragment QuestionBasic on FormQuestion {
|
|
367
367
|
id
|
|
368
368
|
type
|