@credal/actions 0.2.222 → 0.2.224

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.
Files changed (41) hide show
  1. package/dist/actions/actionMapper.js +66 -1
  2. package/dist/actions/autogen/templates.d.ts +9 -0
  3. package/dist/actions/autogen/templates.js +920 -0
  4. package/dist/actions/autogen/types.d.ts +893 -1
  5. package/dist/actions/autogen/types.js +353 -0
  6. package/dist/actions/groups.js +3 -31
  7. package/dist/actions/providers/microsoft/getSharepointItem.d.ts +3 -0
  8. package/dist/actions/providers/microsoft/getSharepointItem.js +61 -0
  9. package/dist/actions/providers/microsoft/listSharepointFolder.d.ts +3 -0
  10. package/dist/actions/providers/microsoft/listSharepointFolder.js +92 -0
  11. package/dist/actions/providers/microsoft/readSharepointContent.d.ts +3 -0
  12. package/dist/actions/providers/microsoft/readSharepointContent.js +157 -0
  13. package/dist/actions/providers/microsoft/searchSharepoint.d.ts +3 -0
  14. package/dist/actions/providers/microsoft/searchSharepoint.js +147 -0
  15. package/dist/actions/providers/microsoft/sharepointUtils.d.ts +56 -0
  16. package/dist/actions/providers/microsoft/sharepointUtils.js +153 -0
  17. package/dist/actions/providers/microsoft/utils.d.ts +1 -0
  18. package/dist/actions/providers/microsoft/utils.js +1 -0
  19. package/dist/actions/providers/servicenow/getChangeRequests.d.ts +3 -0
  20. package/dist/actions/providers/servicenow/getChangeRequests.js +56 -0
  21. package/dist/actions/providers/servicenow/getIncidents.d.ts +3 -0
  22. package/dist/actions/providers/servicenow/getIncidents.js +58 -0
  23. package/dist/actions/providers/servicenow/getRecordsByQuery.d.ts +3 -0
  24. package/dist/actions/providers/servicenow/getRecordsByQuery.js +42 -0
  25. package/dist/actions/providers/servicenow/getSCTasks.d.ts +3 -0
  26. package/dist/actions/providers/servicenow/getSCTasks.js +53 -0
  27. package/dist/actions/providers/servicenow/getVIPTickets.d.ts +3 -0
  28. package/dist/actions/providers/servicenow/getVIPTickets.js +61 -0
  29. package/dist/actions/providers/servicenow/utils/tableQuery.d.ts +22 -0
  30. package/dist/actions/providers/servicenow/utils/tableQuery.js +62 -0
  31. package/package.json +1 -1
  32. package/dist/actions/providers/credal/callCopilot.d.ts +0 -3
  33. package/dist/actions/providers/credal/callCopilot.js +0 -36
  34. package/dist/actions/providers/math/index.d.ts +0 -1
  35. package/dist/actions/providers/math/index.js +0 -37
  36. package/dist/actions/providers/salesforce/getSalesforceRecordByQuery.d.ts +0 -3
  37. package/dist/actions/providers/salesforce/getSalesforceRecordByQuery.js +0 -43
  38. package/dist/actions/providers/slack/index.d.ts +0 -1
  39. package/dist/actions/providers/slack/index.js +0 -37
  40. package/dist/actions/providers/slack/listConversations.d.ts +0 -3
  41. package/dist/actions/providers/slack/listConversations.js +0 -41
@@ -37,6 +37,7 @@ export var ProviderName;
37
37
  ProviderName["LINEAR"] = "linear";
38
38
  ProviderName["HUBSPOT"] = "hubspot";
39
39
  ProviderName["SMARTSHEET"] = "smartsheet";
40
+ ProviderName["SERVICENOW"] = "servicenow";
40
41
  ProviderName["BOXUSER"] = "boxUser";
41
42
  })(ProviderName || (ProviderName = {}));
42
43
  export var ActionName;
@@ -152,6 +153,10 @@ export var ActionName;
152
153
  ActionName["MESSAGETEAMSCHAT"] = "messageTeamsChat";
153
154
  ActionName["MESSAGETEAMSCHANNEL"] = "messageTeamsChannel";
154
155
  ActionName["GETDOCUMENT"] = "getDocument";
156
+ ActionName["GETSHAREPOINTITEM"] = "getSharepointItem";
157
+ ActionName["LISTSHAREPOINTFOLDER"] = "listSharepointFolder";
158
+ ActionName["READSHAREPOINTCONTENT"] = "readSharepointContent";
159
+ ActionName["SEARCHSHAREPOINT"] = "searchSharepoint";
155
160
  ActionName["CREATEORUPDATEFILE"] = "createOrUpdateFile";
156
161
  ActionName["CREATEBRANCH"] = "createBranch";
157
162
  ActionName["CREATEPULLREQUEST"] = "createPullRequest";
@@ -183,6 +188,11 @@ export var ActionName;
183
188
  ActionName["GETSHEETROWS"] = "getSheetRows";
184
189
  ActionName["ADDROWTOSHEET"] = "addRowToSheet";
185
190
  ActionName["UPDATEROW"] = "updateRow";
191
+ ActionName["GETRECORDSBYQUERY"] = "getRecordsByQuery";
192
+ ActionName["GETINCIDENTS"] = "getIncidents";
193
+ ActionName["GETCHANGEREQUESTS"] = "getChangeRequests";
194
+ ActionName["GETSCTASKS"] = "getSCTasks";
195
+ ActionName["GETVIPTICKETS"] = "getVIPTickets";
186
196
  })(ActionName || (ActionName = {}));
187
197
  export const AuthParamsSchema = z.object({
188
198
  authToken: z.string().optional(),
@@ -4311,6 +4321,131 @@ export const microsoftGetDocumentOutputSchema = z.object({
4311
4321
  content: z.string().describe("The content of the document").optional(),
4312
4322
  error: z.string().describe("The error that occurred if the document was not successfully retrieved").optional(),
4313
4323
  });
4324
+ export const microsoftGetSharepointItemParamsSchema = z.object({
4325
+ url: z.string().describe("The SharePoint or OneDrive URL to resolve (file, folder, site, or page link)"),
4326
+ });
4327
+ export const microsoftGetSharepointItemOutputSchema = z.object({
4328
+ success: z.boolean().describe("Whether the URL was resolved successfully"),
4329
+ item: z
4330
+ .object({
4331
+ itemType: z.string().describe("One of: file | folder | site | page").optional(),
4332
+ name: z.string().describe("The name of the item").optional(),
4333
+ webUrl: z.string().describe("The web URL of the item").optional(),
4334
+ driveId: z.string().describe("The ID of the drive containing the item (files and folders)").optional(),
4335
+ itemId: z
4336
+ .string()
4337
+ .describe("The ID of the item within its drive (for pages this is the site page ID)")
4338
+ .optional(),
4339
+ siteId: z.string().describe("The ID of the SharePoint site (sites, pages, and site-hosted items)").optional(),
4340
+ mimeType: z.string().describe("The MIME type of the file").optional(),
4341
+ sizeBytes: z.coerce.number().describe("The size of the file in bytes").optional(),
4342
+ drives: z
4343
+ .array(z.object({
4344
+ driveId: z.string().describe("The ID of the document library drive").optional(),
4345
+ name: z.string().describe("The name of the document library").optional(),
4346
+ webUrl: z
4347
+ .string()
4348
+ .describe("The web URL of the document library (usable as a searchSharepoint scopeUrl)")
4349
+ .optional(),
4350
+ }))
4351
+ .describe("For sites — the document libraries in the site")
4352
+ .optional(),
4353
+ })
4354
+ .describe("The resolved item")
4355
+ .optional(),
4356
+ error: z.string().describe("The error that occurred if the URL was not resolved").optional(),
4357
+ });
4358
+ export const microsoftListSharepointFolderParamsSchema = z.object({
4359
+ url: z.string().describe("The URL of the folder (or site) to list. Provide either this or driveItem.").optional(),
4360
+ driveItem: z
4361
+ .object({
4362
+ driveId: z.string().describe("The ID of the drive containing the folder"),
4363
+ itemId: z.string().describe("The ID of the folder to list"),
4364
+ })
4365
+ .describe("The exact folder to list, as returned by getSharepointItem. Provide either this or url.")
4366
+ .optional(),
4367
+ recursive: z.boolean().describe("Whether to recursively enumerate subfolders (default false)").optional(),
4368
+ maxItems: z.coerce.number().describe("Maximum number of items to return (default 200)").optional(),
4369
+ });
4370
+ export const microsoftListSharepointFolderOutputSchema = z.object({
4371
+ success: z.boolean().describe("Whether the folder was listed successfully"),
4372
+ items: z
4373
+ .array(z.object({
4374
+ itemId: z.string().describe("The ID of the item"),
4375
+ driveId: z.string().describe("The ID of the drive containing the item").optional(),
4376
+ name: z.string().describe("The name of the item"),
4377
+ itemType: z.string().describe("One of: file | folder"),
4378
+ mimeType: z.string().describe("The MIME type of the file").optional(),
4379
+ sizeBytes: z.coerce.number().describe("The size of the file in bytes").optional(),
4380
+ webUrl: z.string().describe("The web URL of the item").optional(),
4381
+ lastModified: z.string().describe("The last modified timestamp of the item").optional(),
4382
+ }))
4383
+ .describe("The items in the folder")
4384
+ .optional(),
4385
+ truncated: z.boolean().describe("True if enumeration stopped at maxItems before listing everything").optional(),
4386
+ error: z.string().describe("The error that occurred if the folder was not listed").optional(),
4387
+ });
4388
+ export const microsoftReadSharepointContentParamsSchema = z.object({
4389
+ url: z
4390
+ .string()
4391
+ .describe("The URL of the file or page to read. Provide either this or driveItem; when both are given, driveItem takes precedence and the url is ignored.")
4392
+ .optional(),
4393
+ driveItem: z
4394
+ .object({
4395
+ driveId: z.string().describe("The ID of the drive containing the file"),
4396
+ itemId: z.string().describe("The ID of the file to read"),
4397
+ })
4398
+ .describe("The exact file to read, as returned by getSharepointItem. Provide either this or url.")
4399
+ .optional(),
4400
+ charLimit: z.coerce.number().describe("The character limit for the returned content (soft truncation)").optional(),
4401
+ fileSizeLimit: z.coerce
4402
+ .number()
4403
+ .describe("Max file size (in MB) to retrieve content from (default of 50MB)")
4404
+ .optional(),
4405
+ });
4406
+ export const microsoftReadSharepointContentOutputSchema = z.object({
4407
+ success: z.boolean().describe("Whether the content was retrieved successfully"),
4408
+ results: z
4409
+ .array(z.object({
4410
+ name: z.string().describe("The name of the file or page"),
4411
+ url: z.string().describe("The URL of the file or page"),
4412
+ contents: z
4413
+ .object({
4414
+ content: z.string().describe("The text content of the file or page").optional(),
4415
+ fileName: z.string().describe("The name of the file or page").optional(),
4416
+ fileLength: z.coerce.number().describe("The length of the content prior to truncating").optional(),
4417
+ })
4418
+ .describe("The contents of the file or page"),
4419
+ }))
4420
+ .describe("The results of the content read")
4421
+ .optional(),
4422
+ error: z.string().describe("Error message if content retrieval failed").optional(),
4423
+ });
4424
+ export const microsoftSearchSharepointParamsSchema = z.object({
4425
+ query: z.string().describe("The text to search for"),
4426
+ scopeUrl: z
4427
+ .string()
4428
+ .describe("A site, folder, or document library URL to restrict results to (optional — omit to search everything the user can access)")
4429
+ .optional(),
4430
+ limit: z.coerce.number().describe("Maximum number of results to return (default 25)").optional(),
4431
+ });
4432
+ export const microsoftSearchSharepointOutputSchema = z.object({
4433
+ success: z.boolean().describe("Whether the search completed successfully"),
4434
+ files: z
4435
+ .array(z.object({
4436
+ itemId: z.string().describe("The ID of the file"),
4437
+ driveId: z.string().describe("The ID of the drive containing the file").optional(),
4438
+ name: z.string().describe("The name of the file"),
4439
+ mimeType: z.string().describe("The MIME type of the file").optional(),
4440
+ webUrl: z.string().describe("The web URL of the file").optional(),
4441
+ snippet: z.string().describe("A text snippet summarizing the match").optional(),
4442
+ lastModified: z.string().describe("The last modified timestamp of the file").optional(),
4443
+ }))
4444
+ .describe("The files matching the search query")
4445
+ .optional(),
4446
+ truncated: z.boolean().describe("True if more results were available than the limit allowed").optional(),
4447
+ error: z.string().describe("The error that occurred if the search failed").optional(),
4448
+ });
4314
4449
  export const githubCreateOrUpdateFileParamsSchema = z.object({
4315
4450
  repositoryOwner: z.string().describe("The owner of the repository, this is a GitHub username"),
4316
4451
  repositoryName: z.string().describe("The name of the repository"),
@@ -5552,3 +5687,221 @@ export const smartsheetUpdateRowOutputSchema = z.object({
5552
5687
  error: z.string().describe("Error message if the operation failed").optional(),
5553
5688
  rowId: z.string().describe("The ID of the updated row").optional(),
5554
5689
  });
5690
+ export const servicenowGetRecordsByQueryParamsSchema = z.object({
5691
+ tableName: z
5692
+ .string()
5693
+ .describe("The ServiceNow table to query (e.g. incident, change_request, sc_request, sys_user, kb_knowledge)"),
5694
+ query: z
5695
+ .string()
5696
+ .describe('ServiceNow encoded query string (sysparm_query) — NOT SQL, JQL, or natural language. Conditions are joined with ^ for AND and ^OR for OR, with no spaces around the ^. Format examples: field=value, field!=value, field>value, fieldLIKEvalue, fieldISEMPTY. Sort with ^ORDERBY<field> (ascending) or ^ORDERBYDESC<field> (descending). Example: "active=true^priority=1^ORDERBYDESCsys_created_on" means active records with priority 1, sorted by most recently created first. If omitted, records are returned unfiltered up to the limit.\n')
5697
+ .optional(),
5698
+ fields: z
5699
+ .array(z.string())
5700
+ .describe("Field names to return for each record (sysparm_fields). All fields are returned if omitted.")
5701
+ .optional(),
5702
+ limit: z.coerce.number().describe("Maximum number of records to return (defaults to 25)").optional(),
5703
+ offset: z.coerce.number().describe("Number of records to skip, for pagination (defaults to 0)").optional(),
5704
+ includeDisplayValues: z
5705
+ .boolean()
5706
+ .describe('If false (default), each field is returned as a plain scalar value (e.g. active: true, priority: "1"). If true, every field is instead returned as an object {value: "<raw value>", display_value: "<human-readable value>"} — useful for reference fields like assigned_to, where value is a sys_id and display_value is the user\'s name.\n')
5707
+ .optional(),
5708
+ });
5709
+ export const servicenowGetRecordsByQueryOutputSchema = z.object({
5710
+ success: z.boolean().describe("Whether the query was successful"),
5711
+ records: z.array(z.object({}).catchall(z.any())).describe("The records matching the query").optional(),
5712
+ error: z.string().describe("Error message if the query failed").optional(),
5713
+ });
5714
+ export const servicenowGetIncidentsParamsSchema = z.object({
5715
+ query: z
5716
+ .string()
5717
+ .describe('Optional additional ServiceNow encoded query (sysparm_query) ANDed onto the base incident lookup — NOT SQL, JQL, or natural language. Conditions are joined with ^ for AND and ^OR for OR, with no spaces around the ^. Example: "priority=1^state!=7" for open, priority-1 incidents. Leave empty to return all incidents up to the limit.\n')
5718
+ .optional(),
5719
+ additionalFields: z
5720
+ .array(z.string())
5721
+ .describe('Extra ServiceNow field technical names to fetch for instance-specific/custom fields not covered by the standard output (e.g. a custom "Program Office" field). Values are returned per record under extraFields, keyed by the field name given here.\n')
5722
+ .optional(),
5723
+ limit: z.coerce.number().describe("Maximum number of incidents to return (defaults to 25)").optional(),
5724
+ offset: z.coerce.number().describe("Number of records to skip, for pagination (defaults to 0)").optional(),
5725
+ });
5726
+ export const servicenowGetIncidentsOutputSchema = z.object({
5727
+ success: z.boolean().describe("Whether the query was successful"),
5728
+ records: z
5729
+ .array(z.object({
5730
+ number: z.string().describe("The incident ticket number (e.g. INC0010023)").optional(),
5731
+ caller: z.string().describe("The name of the person who reported the incident").optional(),
5732
+ assignee: z.string().describe("The name of the person assigned to the incident").optional(),
5733
+ assignmentGroup: z.string().describe("The name of the group assigned to the incident").optional(),
5734
+ shortDescription: z.string().describe("The short description of the incident").optional(),
5735
+ description: z.string().describe("The full description of the incident").optional(),
5736
+ state: z.string().describe("The current state of the incident").optional(),
5737
+ incidentState: z
5738
+ .string()
5739
+ .describe("The current incident-specific state (legacy field on some instances; may be absent)")
5740
+ .optional(),
5741
+ priority: z.string().describe("The priority of the incident").optional(),
5742
+ impact: z.string().describe("The impact of the incident").optional(),
5743
+ urgency: z.string().describe("The urgency of the incident").optional(),
5744
+ openedAt: z.string().describe("The date and time the incident was opened").optional(),
5745
+ updatedAt: z.string().describe("The date and time the incident was last updated").optional(),
5746
+ closedAt: z
5747
+ .string()
5748
+ .describe("The date and time the incident was closed or completed, if applicable")
5749
+ .optional(),
5750
+ workNotes: z.string().describe("Internal work notes on the incident").optional(),
5751
+ comments: z.string().describe("Additional (customer-visible) comments on the incident").optional(),
5752
+ timeToClosureMinutes: z.coerce
5753
+ .number()
5754
+ .describe("Minutes elapsed from opening to final closure, calculated from openedAt and closedAt")
5755
+ .optional(),
5756
+ extraFields: z
5757
+ .object({})
5758
+ .catchall(z.any())
5759
+ .describe("Values for any fields requested via the additionalFields parameter, keyed by field name")
5760
+ .optional(),
5761
+ }))
5762
+ .describe("The incident records matching the query")
5763
+ .optional(),
5764
+ error: z.string().describe("Error message if the query failed").optional(),
5765
+ });
5766
+ export const servicenowGetChangeRequestsParamsSchema = z.object({
5767
+ query: z
5768
+ .string()
5769
+ .describe('Optional additional ServiceNow encoded query (sysparm_query) ANDed onto the base change request lookup — NOT SQL, JQL, or natural language. Conditions are joined with ^ for AND and ^OR for OR, with no spaces around the ^. Example: "priority=1^state!=3" for open, priority-1 change requests. Leave empty to return all change requests up to the limit.\n')
5770
+ .optional(),
5771
+ additionalFields: z
5772
+ .array(z.string())
5773
+ .describe('Extra ServiceNow field technical names to fetch for instance-specific/custom fields not covered by the standard output (e.g. a custom "Program Office" field). Values are returned per record under extraFields, keyed by the field name given here.\n')
5774
+ .optional(),
5775
+ limit: z.coerce.number().describe("Maximum number of change requests to return (defaults to 25)").optional(),
5776
+ offset: z.coerce.number().describe("Number of records to skip, for pagination (defaults to 0)").optional(),
5777
+ });
5778
+ export const servicenowGetChangeRequestsOutputSchema = z.object({
5779
+ success: z.boolean().describe("Whether the query was successful"),
5780
+ records: z
5781
+ .array(z.object({
5782
+ number: z.string().describe("The change request number (e.g. CHG0010023)").optional(),
5783
+ requestor: z.string().describe("The name of the person who requested the change").optional(),
5784
+ assignee: z.string().describe("The name of the person assigned to the change request").optional(),
5785
+ assignmentGroup: z.string().describe("The name of the group assigned to the change request").optional(),
5786
+ shortDescription: z.string().describe("The short description of the change request").optional(),
5787
+ description: z.string().describe("The full description of the change request").optional(),
5788
+ state: z.string().describe("The current state of the change request").optional(),
5789
+ priority: z.string().describe("The priority of the change request").optional(),
5790
+ impact: z.string().describe("The impact of the change request").optional(),
5791
+ urgency: z.string().describe("The urgency of the change request").optional(),
5792
+ openedAt: z.string().describe("The date and time the change request was opened").optional(),
5793
+ updatedAt: z.string().describe("The date and time the change request was last updated").optional(),
5794
+ closedAt: z
5795
+ .string()
5796
+ .describe("The date and time the change request was closed or completed, if applicable")
5797
+ .optional(),
5798
+ workNotes: z.string().describe("Internal work notes on the change request").optional(),
5799
+ comments: z.string().describe("Additional (customer-visible) comments on the change request").optional(),
5800
+ timeToClosureMinutes: z.coerce
5801
+ .number()
5802
+ .describe("Minutes elapsed from opening to final closure, calculated from openedAt and closedAt")
5803
+ .optional(),
5804
+ extraFields: z
5805
+ .object({})
5806
+ .catchall(z.any())
5807
+ .describe("Values for any fields requested via the additionalFields parameter, keyed by field name")
5808
+ .optional(),
5809
+ }))
5810
+ .describe("The change request records matching the query")
5811
+ .optional(),
5812
+ error: z.string().describe("Error message if the query failed").optional(),
5813
+ });
5814
+ export const servicenowGetSCTasksParamsSchema = z.object({
5815
+ query: z
5816
+ .string()
5817
+ .describe('Optional additional ServiceNow encoded query (sysparm_query) ANDed onto the base SCTASK lookup — NOT SQL, JQL, or natural language. Conditions are joined with ^ for AND and ^OR for OR, with no spaces around the ^. Example: "priority=1^state!=3" for open, priority-1 SCTASKs. Leave empty to return all SCTASKs up to the limit.\n')
5818
+ .optional(),
5819
+ additionalFields: z
5820
+ .array(z.string())
5821
+ .describe('Extra ServiceNow field technical names to fetch for instance-specific/custom fields not covered by the standard output (e.g. a custom "Program Office" field). Values are returned per record under extraFields, keyed by the field name given here.\n')
5822
+ .optional(),
5823
+ limit: z.coerce.number().describe("Maximum number of SCTASKs to return (defaults to 25)").optional(),
5824
+ offset: z.coerce.number().describe("Number of records to skip, for pagination (defaults to 0)").optional(),
5825
+ });
5826
+ export const servicenowGetSCTasksOutputSchema = z.object({
5827
+ success: z.boolean().describe("Whether the query was successful"),
5828
+ records: z
5829
+ .array(z.object({
5830
+ number: z.string().describe("The SCTASK ticket number (e.g. SCTASK0010023)").optional(),
5831
+ ritmNumber: z
5832
+ .string()
5833
+ .describe("The number of the parent Requested Item (RITM) this SCTASK belongs to")
5834
+ .optional(),
5835
+ assignee: z.string().describe("The name of the person assigned to the SCTASK").optional(),
5836
+ assignmentGroup: z.string().describe("The name of the group assigned to the SCTASK").optional(),
5837
+ shortDescription: z.string().describe("The short description of the SCTASK").optional(),
5838
+ description: z.string().describe("The full description of the SCTASK").optional(),
5839
+ state: z.string().describe("The current state of the SCTASK").optional(),
5840
+ priority: z.string().describe("The priority of the SCTASK").optional(),
5841
+ openedAt: z.string().describe("The date and time the SCTASK was opened").optional(),
5842
+ updatedAt: z.string().describe("The date and time the SCTASK was last updated").optional(),
5843
+ closedAt: z.string().describe("The date and time the SCTASK was closed or completed, if applicable").optional(),
5844
+ workNotes: z.string().describe("Internal work notes on the SCTASK").optional(),
5845
+ comments: z.string().describe("Additional (customer-visible) comments on the SCTASK").optional(),
5846
+ timeToClosureMinutes: z.coerce
5847
+ .number()
5848
+ .describe("Minutes elapsed from opening to final closure, calculated from openedAt and closedAt")
5849
+ .optional(),
5850
+ extraFields: z
5851
+ .object({})
5852
+ .catchall(z.any())
5853
+ .describe("Values for any fields requested via the additionalFields parameter, keyed by field name")
5854
+ .optional(),
5855
+ }))
5856
+ .describe("The SCTASK records matching the query")
5857
+ .optional(),
5858
+ error: z.string().describe("Error message if the query failed").optional(),
5859
+ });
5860
+ export const servicenowGetVIPTicketsParamsSchema = z.object({
5861
+ ticketType: z.enum(["incident", "sc_task"]).describe("Which kind of ticket to look up VIP records for"),
5862
+ query: z
5863
+ .string()
5864
+ .describe('Optional additional ServiceNow encoded query (sysparm_query) ANDed onto the base VIP lookup — NOT SQL, JQL, or natural language. Conditions are joined with ^ for AND and ^OR for OR, with no spaces around the ^. Example: "priority=1" to further narrow to priority-1 VIP tickets. Leave empty to return all VIP tickets of the given type up to the limit.\n')
5865
+ .optional(),
5866
+ additionalFields: z
5867
+ .array(z.string())
5868
+ .describe('Extra ServiceNow field technical names to fetch for instance-specific/custom fields not covered by the standard output (e.g. a custom "Program Office" field). Values are returned per record under extraFields, keyed by the field name given here.\n')
5869
+ .optional(),
5870
+ limit: z.coerce.number().describe("Maximum number of VIP tickets to return (defaults to 25)").optional(),
5871
+ offset: z.coerce.number().describe("Number of records to skip, for pagination (defaults to 0)").optional(),
5872
+ });
5873
+ export const servicenowGetVIPTicketsOutputSchema = z.object({
5874
+ success: z.boolean().describe("Whether the query was successful"),
5875
+ records: z
5876
+ .array(z.object({
5877
+ ticketType: z.string().describe("Whether this record is an incident or a SCTASK").optional(),
5878
+ number: z.string().describe("The ticket number").optional(),
5879
+ ritmNumber: z
5880
+ .string()
5881
+ .describe("The number of the parent Requested Item (RITM), if this is a SCTASK")
5882
+ .optional(),
5883
+ vipUser: z.string().describe("The name of the VIP caller or requester associated with this ticket").optional(),
5884
+ assignee: z.string().describe("The name of the person assigned to the ticket").optional(),
5885
+ assignmentGroup: z.string().describe("The name of the group assigned to the ticket").optional(),
5886
+ shortDescription: z.string().describe("The short description of the ticket").optional(),
5887
+ description: z.string().describe("The full description of the ticket").optional(),
5888
+ state: z.string().describe("The current state of the ticket").optional(),
5889
+ openedAt: z.string().describe("The date and time the ticket was opened").optional(),
5890
+ updatedAt: z.string().describe("The date and time the ticket was last updated").optional(),
5891
+ closedAt: z.string().describe("The date and time the ticket was closed or completed, if applicable").optional(),
5892
+ workNotes: z.string().describe("Internal work notes on the ticket").optional(),
5893
+ comments: z.string().describe("Additional (customer-visible) comments on the ticket").optional(),
5894
+ timeToClosureMinutes: z.coerce
5895
+ .number()
5896
+ .describe("Minutes elapsed from opening to final closure, calculated from openedAt and closedAt")
5897
+ .optional(),
5898
+ extraFields: z
5899
+ .object({})
5900
+ .catchall(z.any())
5901
+ .describe("Values for any fields requested via the additionalFields parameter, keyed by field name")
5902
+ .optional(),
5903
+ }))
5904
+ .describe("The VIP ticket records matching the query")
5905
+ .optional(),
5906
+ error: z.string().describe("Error message if the query failed").optional(),
5907
+ });
@@ -1,4 +1,4 @@
1
- import { genericFillTemplateDefinition, confluenceOverwritePageDefinition, googlemapsValidateAddressDefinition, mathAddDefinition, mongoInsertMongoDocDefinition, slackSendMessageDefinition, slackGetChannelMessagesDefinition, slackCreateChannelDefinition, slackArchiveChannelDefinition, snowflakeGetRowByFieldValueDefinition, zendeskCreateZendeskTicketDefinition, zendeskListZendeskTicketsDefinition, zendeskGetTicketDetailsDefinition, zendeskUpdateTicketStatusDefinition, zendeskAddCommentToTicketDefinition, zendeskAssignTicketDefinition, openstreetmapGetLatitudeLongitudeFromLocationDefinition, nwsGetForecastForLocationDefinition, jiraAssignJiraTicketDefinition, jiraCommentJiraTicketDefinition, jiraCreateJiraTicketDefinition, jiraGetJiraTicketDetailsDefinition, jiraGetJiraTicketHistoryDefinition, jiraUpdateJiraTicketDetailsDefinition, jiraUpdateJiraTicketStatusDefinition, jiraGetServiceDesksDefinition, jiraCreateServiceDeskRequestDefinition, googlemapsNearbysearchRestaurantsDefinition, firecrawlScrapeUrlDefinition, resendSendEmailDefinition, linkedinCreateShareLinkedinPostUrlDefinition, googleOauthCreateNewGoogleDocDefinition, xCreateShareXPostUrlDefinition, firecrawlScrapeTweetDataWithNitterDefinition, finnhubSymbolLookupDefinition, finnhubGetBasicFinancialsDefinition, confluenceFetchPageContentDefinition, snowflakeRunSnowflakeQueryDefinition, lookerEnableUserByEmailDefinition, googleOauthUpdateDocDefinition, googleOauthScheduleCalendarMeetingDefinition, googleOauthListCalendarsDefinition, googleOauthListCalendarEventsDefinition, googleOauthUpdateCalendarEventDefinition, googleOauthDeleteCalendarEventDefinition, googleOauthCreateSpreadsheetDefinition, googleOauthUpdateSpreadsheetDefinition, googleOauthCreatePresentationDefinition, googleOauthUpdatePresentationDefinition, googleOauthSearchDriveByKeywordsDefinition, googlemailSearchGmailMessagesDefinition, googlemailListGmailThreadsDefinition, googleOauthListGroupsDefinition, googleOauthGetGroupDefinition, googleOauthListGroupMembersDefinition, googleOauthHasGroupMemberDefinition, googleOauthAddGroupMemberDefinition, googleOauthDeleteGroupMemberDefinition, salesforceUpdateRecordDefinition, salesforceCreateCaseDefinition, salesforceGenerateSalesReportDefinition, salesforceGetRecordDefinition, salesforceGetSalesforceRecordsByQueryDefinition, microsoftMessageTeamsChatDefinition, microsoftMessageTeamsChannelDefinition, asanaCommentTaskDefinition, asanaCreateTaskDefinition, asanaUpdateTaskDefinition, asanaSearchTasksDefinition, githubCreateOrUpdateFileDefinition, githubCreateBranchDefinition, githubCreatePullRequestDefinition, microsoftUpdateSpreadsheetDefinition, microsoftUpdateDocumentDefinition, microsoftCreateDocumentDefinition, microsoftGetDocumentDefinition, salesforceFetchSalesforceSchemaByObjectDefinition, firecrawlDeepResearchDefinition, jiraGetJiraIssuesByQueryDefinition, githubListPullRequestsDefinition, salesforceCreateRecordDefinition, ashbyCreateNoteDefinition, ashbyGetCandidateInfoDefinition, ashbyListCandidatesDefinition, ashbyListCandidateNotesDefinition, ashbySearchCandidatesDefinition, ashbyCreateCandidateDefinition, ashbyUpdateCandidateDefinition, ashbyAddCandidateToProjectDefinition, bingGetTopNSearchResultUrlsDefinition, gongGetGongTranscriptsDefinition, kandjiGetFVRecoveryKeyForDeviceDefinition, asanaListAsanaTasksByProjectDefinition, notionSearchByTitleDefinition, asanaGetTasksDetailsDefinition, jamfGetJamfComputerInventoryDefinition, jamfGetJamfFileVaultRecoveryKeyDefinition, oktaListOktaUsersDefinition, oktaGetOktaUserDefinition, oktaListOktaUserGroupsDefinition, oktaListOktaGroupsDefinition, oktaGetOktaGroupDefinition, oktaListOktaGroupMembersDefinition, oktaRemoveUserFromGroupDefinition, oktaAddUserToGroupDefinition, oktaResetPasswordDefinition, oktaResetMFADefinition, oktaListMFADefinition, jamfGetJamfUserComputerIdDefinition, jamfLockJamfComputerByIdDefinition, oktaTriggerOktaWorkflowDefinition, jiraOrgAssignJiraTicketDefinition, jiraOrgCreateJiraTicketDefinition, jiraOrgCommentJiraTicketDefinition, jiraOrgGetJiraTicketDetailsDefinition, jiraOrgGetJiraTicketHistoryDefinition, jiraOrgUpdateJiraTicketDetailsDefinition, jiraOrgUpdateJiraTicketStatusDefinition, jiraOrgGetJiraIssuesByQueryDefinition, googleOauthGetDriveFileContentByIdDefinition, googleOauthSearchDriveByQueryDefinition, } from "./autogen/templates.js";
1
+ import { genericFillTemplateDefinition, confluenceOverwritePageDefinition, googlemapsValidateAddressDefinition, mathAddDefinition, mongoInsertMongoDocDefinition, slackSendMessageDefinition, slackGetChannelMessagesDefinition, snowflakeGetRowByFieldValueDefinition, zendeskCreateZendeskTicketDefinition, zendeskListZendeskTicketsDefinition, zendeskGetTicketDetailsDefinition, zendeskUpdateTicketStatusDefinition, zendeskAddCommentToTicketDefinition, zendeskAssignTicketDefinition, openstreetmapGetLatitudeLongitudeFromLocationDefinition, nwsGetForecastForLocationDefinition, jiraAssignJiraTicketDefinition, jiraCommentJiraTicketDefinition, jiraCreateJiraTicketDefinition, jiraGetJiraTicketDetailsDefinition, jiraGetJiraTicketHistoryDefinition, jiraUpdateJiraTicketDetailsDefinition, jiraUpdateJiraTicketStatusDefinition, googlemapsNearbysearchRestaurantsDefinition, firecrawlScrapeUrlDefinition, resendSendEmailDefinition, linkedinCreateShareLinkedinPostUrlDefinition, googleOauthCreateNewGoogleDocDefinition, xCreateShareXPostUrlDefinition, firecrawlScrapeTweetDataWithNitterDefinition, finnhubSymbolLookupDefinition, finnhubGetBasicFinancialsDefinition, confluenceFetchPageContentDefinition, snowflakeRunSnowflakeQueryDefinition, lookerEnableUserByEmailDefinition, googleOauthUpdateDocDefinition, googleOauthScheduleCalendarMeetingDefinition, googleOauthListCalendarsDefinition, googleOauthListCalendarEventsDefinition, googleOauthUpdateCalendarEventDefinition, googleOauthDeleteCalendarEventDefinition, googleOauthCreateSpreadsheetDefinition, googleOauthUpdateSpreadsheetDefinition, googleOauthCreatePresentationDefinition, googleOauthUpdatePresentationDefinition, googleOauthSearchDriveByKeywordsDefinition, googlemailSearchGmailMessagesDefinition, googlemailListGmailThreadsDefinition, googleOauthListGroupsDefinition, googleOauthGetGroupDefinition, googleOauthListGroupMembersDefinition, googleOauthHasGroupMemberDefinition, googleOauthAddGroupMemberDefinition, googleOauthDeleteGroupMemberDefinition, salesforceUpdateRecordDefinition, salesforceCreateCaseDefinition, salesforceGenerateSalesReportDefinition, salesforceGetRecordDefinition, salesforceGetSalesforceRecordsByQueryDefinition, microsoftMessageTeamsChatDefinition, microsoftMessageTeamsChannelDefinition, asanaCommentTaskDefinition, asanaCreateTaskDefinition, asanaUpdateTaskDefinition, asanaSearchTasksDefinition, githubCreateOrUpdateFileDefinition, githubCreateBranchDefinition, githubCreatePullRequestDefinition, microsoftUpdateSpreadsheetDefinition, microsoftUpdateDocumentDefinition, microsoftCreateDocumentDefinition, microsoftGetDocumentDefinition, salesforceFetchSalesforceSchemaByObjectDefinition, firecrawlDeepResearchDefinition, jiraGetJiraIssuesByQueryDefinition, githubListPullRequestsDefinition, salesforceCreateRecordDefinition, ashbyCreateNoteDefinition, ashbyGetCandidateInfoDefinition, ashbyListCandidatesDefinition, ashbyListCandidateNotesDefinition, ashbySearchCandidatesDefinition, ashbyCreateCandidateDefinition, ashbyUpdateCandidateDefinition, ashbyAddCandidateToProjectDefinition, bingGetTopNSearchResultUrlsDefinition, gongGetGongTranscriptsDefinition, kandjiGetFVRecoveryKeyForDeviceDefinition, asanaListAsanaTasksByProjectDefinition, notionSearchByTitleDefinition, asanaGetTasksDetailsDefinition, jamfGetJamfComputerInventoryDefinition, jamfGetJamfFileVaultRecoveryKeyDefinition, oktaListOktaUsersDefinition, oktaGetOktaUserDefinition, oktaListOktaUserGroupsDefinition, oktaListOktaGroupsDefinition, oktaGetOktaGroupDefinition, oktaListOktaGroupMembersDefinition, oktaRemoveUserFromGroupDefinition, oktaAddUserToGroupDefinition, oktaResetPasswordDefinition, oktaResetMFADefinition, oktaListMFADefinition, } from "./autogen/templates.js";
2
2
  export const ACTION_GROUPS = {
3
3
  GENERIC: {
4
4
  description: "Generic utility actions",
@@ -17,12 +17,7 @@ export const ACTION_GROUPS = {
17
17
  },
18
18
  SLACK_LIST_CONVERSATIONS: {
19
19
  description: "Actions for interacting with Slack",
20
- actions: [
21
- slackSendMessageDefinition,
22
- slackGetChannelMessagesDefinition,
23
- slackCreateChannelDefinition,
24
- slackArchiveChannelDefinition,
25
- ],
20
+ actions: [slackSendMessageDefinition, slackGetChannelMessagesDefinition],
26
21
  },
27
22
  CONFLUENCE: {
28
23
  description: "Action for interacting with Confluence",
@@ -46,8 +41,6 @@ export const ACTION_GROUPS = {
46
41
  googleOauthCreatePresentationDefinition,
47
42
  googleOauthUpdatePresentationDefinition,
48
43
  googleOauthSearchDriveByKeywordsDefinition,
49
- googleOauthSearchDriveByQueryDefinition,
50
- googleOauthGetDriveFileContentByIdDefinition,
51
44
  ],
52
45
  },
53
46
  GOOGLE_CALENDAR: {
@@ -102,21 +95,6 @@ export const ACTION_GROUPS = {
102
95
  jiraUpdateJiraTicketDetailsDefinition,
103
96
  jiraUpdateJiraTicketStatusDefinition,
104
97
  jiraGetJiraIssuesByQueryDefinition,
105
- jiraGetServiceDesksDefinition,
106
- jiraCreateServiceDeskRequestDefinition,
107
- ],
108
- },
109
- JIRA_ORG_ACTIONS: {
110
- description: "Action for interacting with Jira tickets",
111
- actions: [
112
- jiraOrgAssignJiraTicketDefinition,
113
- jiraOrgCreateJiraTicketDefinition,
114
- jiraOrgCommentJiraTicketDefinition,
115
- jiraOrgGetJiraTicketDetailsDefinition,
116
- jiraOrgGetJiraTicketHistoryDefinition,
117
- jiraOrgUpdateJiraTicketDetailsDefinition,
118
- jiraOrgUpdateJiraTicketStatusDefinition,
119
- jiraOrgGetJiraIssuesByQueryDefinition,
120
98
  ],
121
99
  },
122
100
  OPENSTREETMAP_GET_LATITUDE_LONGITUDE_FROM_LOCATION: {
@@ -153,12 +131,7 @@ export const ACTION_GROUPS = {
153
131
  },
154
132
  JAMF: {
155
133
  description: "Actions for interacting with Jamf",
156
- actions: [
157
- jamfGetJamfComputerInventoryDefinition,
158
- jamfGetJamfFileVaultRecoveryKeyDefinition,
159
- jamfGetJamfUserComputerIdDefinition,
160
- jamfLockJamfComputerByIdDefinition,
161
- ],
134
+ actions: [jamfGetJamfComputerInventoryDefinition, jamfGetJamfFileVaultRecoveryKeyDefinition],
162
135
  },
163
136
  LOOKER: {
164
137
  description: "Actions for interacting with Looker",
@@ -242,7 +215,6 @@ export const ACTION_GROUPS = {
242
215
  oktaResetPasswordDefinition,
243
216
  oktaResetMFADefinition,
244
217
  oktaListMFADefinition,
245
- oktaTriggerOktaWorkflowDefinition,
246
218
  ],
247
219
  },
248
220
  };
@@ -0,0 +1,3 @@
1
+ import type { microsoftGetSharepointItemFunction } from "../../autogen/types.js";
2
+ declare const getSharepointItem: microsoftGetSharepointItemFunction;
3
+ export default getSharepointItem;
@@ -0,0 +1,61 @@
1
+ import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
2
+ import { axiosClient } from "../../util/axiosClient.js";
3
+ import { MICROSOFT_GRAPH_API_URL } from "./utils.js";
4
+ import { resolveItemFromUrl } from "./sharepointUtils.js";
5
+ const getSharepointItem = async ({ params, authParams, }) => {
6
+ if (!authParams.authToken) {
7
+ return { success: false, error: MISSING_AUTH_TOKEN };
8
+ }
9
+ try {
10
+ const resolved = await resolveItemFromUrl(authParams.authToken, params.url);
11
+ if (resolved.itemType === "site") {
12
+ const drivesResponse = await axiosClient.get(`${MICROSOFT_GRAPH_API_URL}/sites/${resolved.siteId}/drives`, {
13
+ headers: { Authorization: `Bearer ${authParams.authToken}` },
14
+ });
15
+ const drives = drivesResponse.data.value ?? [];
16
+ return {
17
+ success: true,
18
+ item: {
19
+ itemType: "site",
20
+ siteId: resolved.siteId,
21
+ name: resolved.name,
22
+ webUrl: resolved.webUrl,
23
+ drives: drives.map(drive => ({ driveId: drive.id, name: drive.name, webUrl: drive.webUrl })),
24
+ },
25
+ };
26
+ }
27
+ if (resolved.itemType === "page") {
28
+ return {
29
+ success: true,
30
+ item: {
31
+ itemType: "page",
32
+ siteId: resolved.siteId,
33
+ itemId: resolved.pageId,
34
+ name: resolved.name,
35
+ webUrl: resolved.webUrl,
36
+ },
37
+ };
38
+ }
39
+ return {
40
+ success: true,
41
+ item: {
42
+ itemType: resolved.itemType,
43
+ name: resolved.name,
44
+ webUrl: resolved.webUrl,
45
+ driveId: resolved.driveId,
46
+ itemId: resolved.itemId,
47
+ siteId: resolved.siteId,
48
+ mimeType: resolved.mimeType,
49
+ sizeBytes: resolved.sizeBytes,
50
+ },
51
+ };
52
+ }
53
+ catch (error) {
54
+ console.error("Error resolving SharePoint item from URL", error);
55
+ return {
56
+ success: false,
57
+ error: error instanceof Error ? error.message : "Unknown error",
58
+ };
59
+ }
60
+ };
61
+ export default getSharepointItem;
@@ -0,0 +1,3 @@
1
+ import type { microsoftListSharepointFolderFunction } from "../../autogen/types.js";
2
+ declare const listSharepointFolder: microsoftListSharepointFolderFunction;
3
+ export default listSharepointFolder;
@@ -0,0 +1,92 @@
1
+ import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
2
+ import { axiosClient } from "../../util/axiosClient.js";
3
+ import { MICROSOFT_GRAPH_API_URL } from "./utils.js";
4
+ import { resolveItemFromUrl } from "./sharepointUtils.js";
5
+ const DEFAULT_MAX_ITEMS = 200;
6
+ const PAGE_SIZE = 200;
7
+ function buildChildrenUrl(driveId, itemId) {
8
+ const base = itemId === "root"
9
+ ? `${MICROSOFT_GRAPH_API_URL}/drives/${driveId}/root/children`
10
+ : `${MICROSOFT_GRAPH_API_URL}/drives/${driveId}/items/${itemId}/children`;
11
+ return `${base}?$top=${PAGE_SIZE}`;
12
+ }
13
+ /**
14
+ * Resolve a pasted URL to the folder to enumerate. Throws when the URL points at
15
+ * something that cannot be listed (file, page); the action's catch maps the message
16
+ * onto the error output.
17
+ */
18
+ async function resolveRootFolderFromUrl(authToken, url, headers) {
19
+ const resolved = await resolveItemFromUrl(authToken, url);
20
+ if (resolved.itemType === "file") {
21
+ throw new Error("The URL points to a file, not a folder. Use readSharepointContent instead.");
22
+ }
23
+ if (resolved.itemType === "page") {
24
+ throw new Error("The URL points to a site page, not a folder. Use readSharepointContent instead.");
25
+ }
26
+ if (resolved.itemType === "site") {
27
+ // A site URL lists the root of the site's default document library
28
+ const driveResponse = await axiosClient.get(`${MICROSOFT_GRAPH_API_URL}/sites/${resolved.siteId}/drive`, {
29
+ headers,
30
+ });
31
+ return { driveId: driveResponse.data.id, itemId: "root" };
32
+ }
33
+ return { driveId: resolved.driveId, itemId: resolved.itemId };
34
+ }
35
+ const listSharepointFolder = async ({ params, authParams, }) => {
36
+ if (!authParams.authToken) {
37
+ return { success: false, error: MISSING_AUTH_TOKEN };
38
+ }
39
+ const { url, driveItem, recursive = false } = params;
40
+ if (params.maxItems != null && (!Number.isFinite(params.maxItems) || params.maxItems <= 0)) {
41
+ return { success: false, error: "maxItems must be a positive number" };
42
+ }
43
+ const maxItems = params.maxItems ?? DEFAULT_MAX_ITEMS;
44
+ if (!url && !driveItem) {
45
+ return { success: false, error: "Either url or driveItem must be provided" };
46
+ }
47
+ const headers = { Authorization: `Bearer ${authParams.authToken}` };
48
+ try {
49
+ const rootFolder = driveItem ?? (await resolveRootFolderFromUrl(authParams.authToken, url, headers));
50
+ const items = [];
51
+ let truncated = false;
52
+ const queue = [rootFolder];
53
+ outer: while (queue.length > 0) {
54
+ const folder = queue.shift();
55
+ let nextUrl = buildChildrenUrl(folder.driveId, folder.itemId);
56
+ while (nextUrl) {
57
+ const response = await axiosClient.get(nextUrl, { headers });
58
+ const children = response.data.value ?? [];
59
+ for (const child of children) {
60
+ if (items.length >= maxItems) {
61
+ truncated = true;
62
+ break outer;
63
+ }
64
+ const childDriveId = child.parentReference?.driveId ?? folder.driveId;
65
+ items.push({
66
+ itemId: child.id ?? "",
67
+ driveId: childDriveId,
68
+ name: child.name ?? "",
69
+ itemType: child.folder ? "folder" : "file",
70
+ mimeType: child.file?.mimeType,
71
+ sizeBytes: child.size,
72
+ webUrl: child.webUrl,
73
+ lastModified: child.lastModifiedDateTime,
74
+ });
75
+ if (recursive && child.folder && child.id) {
76
+ queue.push({ driveId: childDriveId, itemId: child.id });
77
+ }
78
+ }
79
+ nextUrl = response.data["@odata.nextLink"];
80
+ }
81
+ }
82
+ return { success: true, items, truncated };
83
+ }
84
+ catch (error) {
85
+ console.error("Error listing SharePoint folder", error);
86
+ return {
87
+ success: false,
88
+ error: error instanceof Error ? error.message : "Unknown error",
89
+ };
90
+ }
91
+ };
92
+ export default listSharepointFolder;
@@ -0,0 +1,3 @@
1
+ import type { microsoftReadSharepointContentFunction } from "../../autogen/types.js";
2
+ declare const readSharepointContent: microsoftReadSharepointContentFunction;
3
+ export default readSharepointContent;