@credal/actions 0.2.126 → 0.2.128
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/actions/autogen/templates.js +903 -581
- package/dist/actions/autogen/types.d.ts +860 -944
- package/dist/actions/autogen/types.js +362 -212
- package/dist/actions/providers/firecrawl/scrapeUrl.js +11 -4
- package/dist/actions/providers/github/getFileContent.js +13 -5
- package/dist/actions/providers/github/listDirectory.js +12 -11
- package/dist/actions/providers/github/listPullRequests.js +58 -30
- package/dist/actions/providers/github/searchOrganization.d.ts +1 -1
- package/dist/actions/providers/github/searchOrganization.js +26 -4
- package/dist/actions/providers/gitlab/getFileContent.js +15 -6
- package/dist/actions/providers/gitlab/listDirectory.js +10 -6
- package/dist/actions/providers/gitlab/searchGroup.js +84 -55
- package/dist/actions/providers/google-oauth/getDriveFileContentById.js +10 -1
- package/dist/actions/providers/google-oauth/searchDriveByKeywordsAndGetFileContent.js +12 -4
- package/dist/actions/providers/google-oauth/searchDriveByQueryAndGetFileContent.js +2 -1
- package/dist/actions/providers/jira/createJiraTicket.js +11 -3
- package/dist/actions/providers/jira/getJiraIssuesByQuery.js +9 -7
- package/dist/actions/providers/jira/getJiraTicketDetails.js +8 -1
- package/dist/actions/providers/jira/updateJiraTicketDetails.js +11 -2
- package/dist/actions/providers/jira/updateServiceDeskRequest.d.ts +3 -0
- package/dist/actions/providers/jira/updateServiceDeskRequest.js +72 -0
- package/dist/actions/providers/jira/utils.d.ts +1 -0
- package/dist/actions/providers/jira/utils.js +40 -0
- package/dist/actions/providers/salesforce/getSalesforceRecordsByQuery.js +10 -3
- package/dist/actions/providers/salesforce/searchSalesforceRecords.js +9 -7
- package/dist/actions/providers/slackUser/searchSlack.js +8 -1
- package/package.json +1 -1
- package/dist/actions/groups.d.ts +0 -6
- package/dist/actions/groups.js +0 -248
- package/dist/actions/providers/credal/callCopilot.d.ts +0 -3
- package/dist/actions/providers/credal/callCopilot.js +0 -36
- package/dist/actions/providers/math/index.d.ts +0 -1
- package/dist/actions/providers/math/index.js +0 -37
- package/dist/actions/providers/salesforce/getSalesforceRecordByQuery.d.ts +0 -3
- package/dist/actions/providers/salesforce/getSalesforceRecordByQuery.js +0 -43
- package/dist/actions/providers/slack/archiveChannel.d.ts +0 -3
- package/dist/actions/providers/slack/archiveChannel.js +0 -35
- package/dist/actions/providers/slack/index.d.ts +0 -1
- package/dist/actions/providers/slack/index.js +0 -37
- package/dist/actions/providers/slack/listConversations.d.ts +0 -3
- package/dist/actions/providers/slack/listConversations.js +0 -41
|
@@ -299,24 +299,28 @@ export const slackUserSearchSlackOutputSchema = z.object({
|
|
|
299
299
|
query: z.string().describe("The exact query string sent to Slack’s search API after resolving inputs."),
|
|
300
300
|
results: z
|
|
301
301
|
.array(z.object({
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
.string()
|
|
309
|
-
.describe("
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
302
|
+
name: z.string().describe("The name of the result"),
|
|
303
|
+
url: z.string().describe("The URL of the result"),
|
|
304
|
+
contents: z.object({
|
|
305
|
+
channelId: z.string().describe("Slack channel/conversation ID (C…/G…/D… or name)."),
|
|
306
|
+
ts: z.string().describe("Slack message timestamp of the hit (or thread root when hydrated as thread)."),
|
|
307
|
+
text: z.string().describe("Message text of the anchor (hit or thread root).").optional(),
|
|
308
|
+
userEmail: z.string().describe("User email of the anchor message’s author (if available).").optional(),
|
|
309
|
+
userName: z.string().describe("User name of the anchor message’s author (if available).").optional(),
|
|
310
|
+
permalink: z
|
|
311
|
+
.string()
|
|
312
|
+
.describe("A Slack permalink to the anchor (message or thread root), if resolvable.")
|
|
313
|
+
.optional(),
|
|
314
|
+
context: z
|
|
315
|
+
.array(z.object({
|
|
316
|
+
ts: z.string().describe("Timestamp of the contextual message."),
|
|
317
|
+
text: z.string().describe("Text of the contextual message.").optional(),
|
|
318
|
+
userEmail: z.string().describe("Author user email of the contextual message.").optional(),
|
|
319
|
+
userName: z.string().describe("Author user name of the contextual message.").optional(),
|
|
320
|
+
}))
|
|
321
|
+
.describe("When a hit is in a thread, this is the full thread (root first). Otherwise, a small surrounding context window (~3 before, 5 after).")
|
|
322
|
+
.optional(),
|
|
323
|
+
}),
|
|
320
324
|
}))
|
|
321
325
|
.describe("Hydrated search results (threads or small context windows), sorted by ts desc."),
|
|
322
326
|
});
|
|
@@ -387,6 +391,7 @@ export const jiraCreateJiraTicketParamsSchema = z.object({
|
|
|
387
391
|
issueType: z.string().describe("The issue type of the new ticket. Should be Epic, Story, Task, Bug, Sub-task, etc."),
|
|
388
392
|
reporter: z.string().describe("The reporter for the new ticket creation").optional(),
|
|
389
393
|
assignee: z.string().describe("The assignee for the new ticket creation").optional(),
|
|
394
|
+
requestTypeId: z.string().describe("The request type ID for Jira Service Management tickets").optional(),
|
|
390
395
|
customFields: z
|
|
391
396
|
.object({})
|
|
392
397
|
.catchall(z.any())
|
|
@@ -451,7 +456,14 @@ export const jiraGetJiraTicketDetailsParamsSchema = z.object({
|
|
|
451
456
|
export const jiraGetJiraTicketDetailsOutputSchema = z.object({
|
|
452
457
|
success: z.boolean().describe("Whether the status was updated successfully"),
|
|
453
458
|
error: z.string().describe("The error that occurred if the retrieval was unsuccessful").optional(),
|
|
454
|
-
|
|
459
|
+
results: z
|
|
460
|
+
.array(z.object({
|
|
461
|
+
name: z.string().describe("The name of the result"),
|
|
462
|
+
url: z.string().describe("The URL of the result"),
|
|
463
|
+
contents: z.object({}).catchall(z.any()).describe("The data of the Jira ticket"),
|
|
464
|
+
}))
|
|
465
|
+
.describe("The results of the Jira ticket")
|
|
466
|
+
.optional(),
|
|
455
467
|
});
|
|
456
468
|
export const jiraGetJiraTicketHistoryParamsSchema = z.object({
|
|
457
469
|
projectKey: z.string().describe("The key for the project"),
|
|
@@ -468,6 +480,7 @@ export const jiraUpdateJiraTicketDetailsParamsSchema = z.object({
|
|
|
468
480
|
summary: z.string().describe("The updated summary").optional(),
|
|
469
481
|
description: z.string().describe("The updated description").optional(),
|
|
470
482
|
issueType: z.string().describe("The updated issue type").optional(),
|
|
483
|
+
requestTypeId: z.string().describe("The request type ID for Jira Service Management tickets").optional(),
|
|
471
484
|
customFields: z
|
|
472
485
|
.object({})
|
|
473
486
|
.catchall(z.any())
|
|
@@ -493,10 +506,12 @@ export const jiraGetJiraIssuesByQueryParamsSchema = z.object({
|
|
|
493
506
|
});
|
|
494
507
|
export const jiraGetJiraIssuesByQueryOutputSchema = z.object({
|
|
495
508
|
success: z.boolean().describe("Whether the records were successfully retrieved"),
|
|
496
|
-
|
|
497
|
-
.object({
|
|
498
|
-
|
|
499
|
-
|
|
509
|
+
results: z
|
|
510
|
+
.array(z.object({
|
|
511
|
+
name: z.string().describe("The name of the result"),
|
|
512
|
+
url: z.string().describe("The URL of the result"),
|
|
513
|
+
contents: z
|
|
514
|
+
.object({
|
|
500
515
|
id: z.string().describe("Internal Jira issue ID"),
|
|
501
516
|
key: z.string().describe("Human-readable issue key (e.g. SSPR-123)"),
|
|
502
517
|
summary: z.string().describe("Summary of the issue"),
|
|
@@ -516,11 +531,10 @@ export const jiraGetJiraIssuesByQueryOutputSchema = z.object({
|
|
|
516
531
|
updated: z.string().datetime({ offset: true }),
|
|
517
532
|
resolution: z.string().nullable().optional(),
|
|
518
533
|
dueDate: z.string().date().nullable().optional(),
|
|
519
|
-
})
|
|
520
|
-
.describe("The
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
.describe("The result object containing issues")
|
|
534
|
+
})
|
|
535
|
+
.describe("The result object containing issues"),
|
|
536
|
+
}))
|
|
537
|
+
.describe("The results of the Jira issues")
|
|
524
538
|
.optional(),
|
|
525
539
|
error: z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
|
|
526
540
|
});
|
|
@@ -563,6 +577,7 @@ export const jiraOrgCreateJiraTicketParamsSchema = z.object({
|
|
|
563
577
|
issueType: z.string().describe("The issue type of the new ticket. Should be Epic, Story, Task, Bug, Sub-task, etc."),
|
|
564
578
|
reporter: z.string().describe("The reporter for the new ticket creation").optional(),
|
|
565
579
|
assignee: z.string().describe("The assignee for the new ticket creation").optional(),
|
|
580
|
+
requestTypeId: z.string().describe("The request type ID for Jira Service Management tickets").optional(),
|
|
566
581
|
customFields: z
|
|
567
582
|
.object({})
|
|
568
583
|
.catchall(z.any())
|
|
@@ -627,7 +642,14 @@ export const jiraOrgGetJiraTicketDetailsParamsSchema = z.object({
|
|
|
627
642
|
export const jiraOrgGetJiraTicketDetailsOutputSchema = z.object({
|
|
628
643
|
success: z.boolean().describe("Whether the status was updated successfully"),
|
|
629
644
|
error: z.string().describe("The error that occurred if the retrieval was unsuccessful").optional(),
|
|
630
|
-
|
|
645
|
+
results: z
|
|
646
|
+
.array(z.object({
|
|
647
|
+
name: z.string().describe("The name of the result"),
|
|
648
|
+
url: z.string().describe("The URL of the result"),
|
|
649
|
+
contents: z.object({}).catchall(z.any()).describe("The data of the Jira ticket"),
|
|
650
|
+
}))
|
|
651
|
+
.describe("The results of the Jira ticket")
|
|
652
|
+
.optional(),
|
|
631
653
|
});
|
|
632
654
|
export const jiraOrgGetJiraTicketHistoryParamsSchema = z.object({
|
|
633
655
|
projectKey: z.string().describe("The key for the project"),
|
|
@@ -644,6 +666,7 @@ export const jiraOrgUpdateJiraTicketDetailsParamsSchema = z.object({
|
|
|
644
666
|
summary: z.string().describe("The updated summary").optional(),
|
|
645
667
|
description: z.string().describe("The updated description").optional(),
|
|
646
668
|
issueType: z.string().describe("The updated issue type").optional(),
|
|
669
|
+
requestTypeId: z.string().describe("The request type ID for Jira Service Management tickets").optional(),
|
|
647
670
|
customFields: z
|
|
648
671
|
.object({})
|
|
649
672
|
.catchall(z.any())
|
|
@@ -669,10 +692,12 @@ export const jiraOrgGetJiraIssuesByQueryParamsSchema = z.object({
|
|
|
669
692
|
});
|
|
670
693
|
export const jiraOrgGetJiraIssuesByQueryOutputSchema = z.object({
|
|
671
694
|
success: z.boolean().describe("Whether the records were successfully retrieved"),
|
|
672
|
-
|
|
673
|
-
.object({
|
|
674
|
-
|
|
675
|
-
|
|
695
|
+
results: z
|
|
696
|
+
.array(z.object({
|
|
697
|
+
name: z.string().describe("The name of the result"),
|
|
698
|
+
url: z.string().describe("The URL of the result"),
|
|
699
|
+
contents: z
|
|
700
|
+
.object({
|
|
676
701
|
id: z.string().describe("Internal Jira issue ID"),
|
|
677
702
|
key: z.string().describe("Human-readable issue key (e.g. SSPR-123)"),
|
|
678
703
|
summary: z.string().describe("Summary of the issue"),
|
|
@@ -692,11 +717,10 @@ export const jiraOrgGetJiraIssuesByQueryOutputSchema = z.object({
|
|
|
692
717
|
updated: z.string().datetime({ offset: true }),
|
|
693
718
|
resolution: z.string().nullable().optional(),
|
|
694
719
|
dueDate: z.string().date().nullable().optional(),
|
|
695
|
-
})
|
|
696
|
-
.describe("The
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
.describe("The result object containing issues")
|
|
720
|
+
})
|
|
721
|
+
.describe("The result object containing issues"),
|
|
722
|
+
}))
|
|
723
|
+
.describe("The results of the Jira issues")
|
|
700
724
|
.optional(),
|
|
701
725
|
error: z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
|
|
702
726
|
});
|
|
@@ -988,7 +1012,18 @@ export const firecrawlScrapeUrlParamsSchema = z.object({
|
|
|
988
1012
|
.describe("Array of formats to return")
|
|
989
1013
|
.optional(),
|
|
990
1014
|
});
|
|
991
|
-
export const firecrawlScrapeUrlOutputSchema = z.object({
|
|
1015
|
+
export const firecrawlScrapeUrlOutputSchema = z.object({
|
|
1016
|
+
success: z.boolean().describe("Whether the operation was successful"),
|
|
1017
|
+
error: z.string().describe("Error message if the operation failed").optional(),
|
|
1018
|
+
results: z
|
|
1019
|
+
.array(z.object({
|
|
1020
|
+
name: z.string().describe("The name of the result"),
|
|
1021
|
+
url: z.string().describe("The URL of the result"),
|
|
1022
|
+
contents: z.string().describe("The content of the URL"),
|
|
1023
|
+
}))
|
|
1024
|
+
.describe("The results of the scrape")
|
|
1025
|
+
.optional(),
|
|
1026
|
+
});
|
|
992
1027
|
export const firecrawlSearchAndScrapeParamsSchema = z.object({
|
|
993
1028
|
query: z.string().describe("The query to search for"),
|
|
994
1029
|
count: z.number().describe("The number of results to return. Default is 5.").optional(),
|
|
@@ -2720,13 +2755,19 @@ export const googleOauthSearchDriveByKeywordsAndGetFileContentParamsSchema = z.o
|
|
|
2720
2755
|
});
|
|
2721
2756
|
export const googleOauthSearchDriveByKeywordsAndGetFileContentOutputSchema = z.object({
|
|
2722
2757
|
success: z.boolean().describe("Whether the search was successful"),
|
|
2723
|
-
|
|
2758
|
+
results: z
|
|
2724
2759
|
.array(z.object({
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2760
|
+
name: z.string().describe("The name of the file"),
|
|
2761
|
+
url: z.string().describe("The URL of the file"),
|
|
2762
|
+
contents: z
|
|
2763
|
+
.object({
|
|
2764
|
+
id: z.string().describe("The file ID"),
|
|
2765
|
+
name: z.string().describe("The file name"),
|
|
2766
|
+
mimeType: z.string().describe("The MIME type of the file"),
|
|
2767
|
+
url: z.string().describe("The web link to view the file"),
|
|
2768
|
+
content: z.string().describe("The data returned from the file, subject to fileSizeLimit").optional(),
|
|
2769
|
+
})
|
|
2770
|
+
.describe("The contents of the file"),
|
|
2730
2771
|
}))
|
|
2731
2772
|
.describe("List of files matching the search")
|
|
2732
2773
|
.optional(),
|
|
@@ -2767,9 +2808,20 @@ export const googleOauthGetDriveFileContentByIdParamsSchema = z.object({
|
|
|
2767
2808
|
});
|
|
2768
2809
|
export const googleOauthGetDriveFileContentByIdOutputSchema = z.object({
|
|
2769
2810
|
success: z.boolean().describe("Whether the file content was retrieved successfully"),
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2811
|
+
results: z
|
|
2812
|
+
.array(z.object({
|
|
2813
|
+
name: z.string().describe("The name of the file"),
|
|
2814
|
+
url: z.string().describe("The URL of the file"),
|
|
2815
|
+
contents: z
|
|
2816
|
+
.object({
|
|
2817
|
+
content: z.string().describe("The content of the file").optional(),
|
|
2818
|
+
fileName: z.string().describe("The name of the file").optional(),
|
|
2819
|
+
fileLength: z.number().describe("The length of the file content prior to truncating").optional(),
|
|
2820
|
+
})
|
|
2821
|
+
.describe("The contents of the file"),
|
|
2822
|
+
}))
|
|
2823
|
+
.describe("The results of the file content")
|
|
2824
|
+
.optional(),
|
|
2773
2825
|
error: z.string().describe("Error message if file content retrieval failed").optional(),
|
|
2774
2826
|
});
|
|
2775
2827
|
export const googleOauthListGroupsParamsSchema = z.object({
|
|
@@ -3550,17 +3602,24 @@ export const salesforceSearchSalesforceRecordsParamsSchema = z.object({
|
|
|
3550
3602
|
});
|
|
3551
3603
|
export const salesforceSearchSalesforceRecordsOutputSchema = z.object({
|
|
3552
3604
|
success: z.boolean().describe("Whether the records were successfully retrieved"),
|
|
3553
|
-
|
|
3605
|
+
results: z
|
|
3554
3606
|
.array(z
|
|
3555
3607
|
.object({
|
|
3556
|
-
|
|
3557
|
-
|
|
3608
|
+
name: z.string().describe("The name of the record").optional(),
|
|
3609
|
+
url: z.string().describe("The URL of the record").optional(),
|
|
3610
|
+
contents: z
|
|
3558
3611
|
.object({
|
|
3559
|
-
|
|
3560
|
-
|
|
3612
|
+
id: z.string().describe("The Salesforce record ID").optional(),
|
|
3613
|
+
attributes: z
|
|
3614
|
+
.object({
|
|
3615
|
+
type: z.string().describe("The Salesforce object type"),
|
|
3616
|
+
url: z.string().describe("The Salesforce record URL"),
|
|
3617
|
+
})
|
|
3618
|
+
.catchall(z.any())
|
|
3619
|
+
.describe("Metadata about the Salesforce record")
|
|
3620
|
+
.optional(),
|
|
3561
3621
|
})
|
|
3562
|
-
.
|
|
3563
|
-
.describe("Metadata about the Salesforce record")
|
|
3622
|
+
.describe("The contents of the record")
|
|
3564
3623
|
.optional(),
|
|
3565
3624
|
})
|
|
3566
3625
|
.describe("A record from Salesforce"))
|
|
@@ -3574,10 +3633,7 @@ export const salesforceGetSalesforceRecordsByQueryParamsSchema = z.object({
|
|
|
3574
3633
|
});
|
|
3575
3634
|
export const salesforceGetSalesforceRecordsByQueryOutputSchema = z.object({
|
|
3576
3635
|
success: z.boolean().describe("Whether the records were successfully retrieved"),
|
|
3577
|
-
|
|
3578
|
-
.array(z.record(z.string()).describe("A record from Salesforce"))
|
|
3579
|
-
.describe("The retrieved records")
|
|
3580
|
-
.optional(),
|
|
3636
|
+
results: z.array(z.any()).describe("Array of standardized results objects").optional(),
|
|
3581
3637
|
error: z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
|
|
3582
3638
|
});
|
|
3583
3639
|
export const salesforceGetRecordParamsSchema = z.object({
|
|
@@ -3706,20 +3762,31 @@ export const githubListPullRequestsParamsSchema = z.object({
|
|
|
3706
3762
|
state: z.string().describe("The state of the pull requests to list (e.g., open, closed)").optional(),
|
|
3707
3763
|
});
|
|
3708
3764
|
export const githubListPullRequestsOutputSchema = z.object({
|
|
3709
|
-
|
|
3765
|
+
success: z.boolean().describe("Whether the operation was successful"),
|
|
3766
|
+
error: z.string().describe("The error that occurred if the operation was not successful").optional(),
|
|
3767
|
+
results: z
|
|
3710
3768
|
.array(z.object({
|
|
3711
|
-
|
|
3712
|
-
title: z.string().describe("The title of the pull request").optional(),
|
|
3713
|
-
state: z.string().describe("The state of the pull request (e.g., open, closed)").optional(),
|
|
3769
|
+
name: z.string().describe("The title of the pull request").optional(),
|
|
3714
3770
|
url: z.string().describe("The URL of the pull request").optional(),
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3771
|
+
contents: z
|
|
3772
|
+
.object({
|
|
3773
|
+
number: z.number().describe("The number of the pull request").optional(),
|
|
3774
|
+
title: z.string().describe("The title of the pull request").optional(),
|
|
3775
|
+
state: z.string().describe("The state of the pull request (e.g., open, closed)").optional(),
|
|
3776
|
+
url: z.string().describe("The URL of the pull request").optional(),
|
|
3777
|
+
createdAt: z.string().describe("The date and time when the pull request was created").optional(),
|
|
3778
|
+
updatedAt: z.string().describe("The date and time when the pull request was last updated").optional(),
|
|
3779
|
+
user: z
|
|
3780
|
+
.object({
|
|
3781
|
+
login: z.string().describe("The username of the user who created the pull request").optional(),
|
|
3782
|
+
})
|
|
3783
|
+
.optional(),
|
|
3784
|
+
description: z.string().describe("The description of the pull request").optional(),
|
|
3785
|
+
})
|
|
3719
3786
|
.optional(),
|
|
3720
|
-
description: z.string().describe("The description of the pull request").optional(),
|
|
3721
3787
|
}))
|
|
3722
|
-
.describe("A list of pull requests in the repository")
|
|
3788
|
+
.describe("A list of pull requests in the repository")
|
|
3789
|
+
.optional(),
|
|
3723
3790
|
});
|
|
3724
3791
|
export const githubGetPullRequestDetailsParamsSchema = z.object({
|
|
3725
3792
|
repositoryOwner: z.string().describe("The owner of the repository"),
|
|
@@ -3823,10 +3890,21 @@ export const githubGetFileContentParamsSchema = z.object({
|
|
|
3823
3890
|
export const githubGetFileContentOutputSchema = z.object({
|
|
3824
3891
|
success: z.boolean().describe("Whether the operation was successful"),
|
|
3825
3892
|
error: z.string().describe("The error that occurred if the operation was not successful").optional(),
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3893
|
+
results: z
|
|
3894
|
+
.array(z.object({
|
|
3895
|
+
name: z.string().describe("The name of the file").optional(),
|
|
3896
|
+
url: z.string().describe("The URL of the file in the Github UI").optional(),
|
|
3897
|
+
contents: z
|
|
3898
|
+
.object({
|
|
3899
|
+
content: z.string().describe("The decoded file content as a string").optional(),
|
|
3900
|
+
size: z.number().describe("The size of the file in bytes").optional(),
|
|
3901
|
+
name: z.string().describe("The name of the file").optional(),
|
|
3902
|
+
htmlUrl: z.string().describe("The URL of the file in the Github UI").optional(),
|
|
3903
|
+
})
|
|
3904
|
+
.optional(),
|
|
3905
|
+
}))
|
|
3906
|
+
.describe("A list of Github files")
|
|
3907
|
+
.optional(),
|
|
3830
3908
|
});
|
|
3831
3909
|
export const githubListDirectoryParamsSchema = z.object({
|
|
3832
3910
|
organization: z.string().describe("The organization that owns the repository"),
|
|
@@ -3836,13 +3914,17 @@ export const githubListDirectoryParamsSchema = z.object({
|
|
|
3836
3914
|
export const githubListDirectoryOutputSchema = z.object({
|
|
3837
3915
|
success: z.boolean().describe("Whether the operation was successful"),
|
|
3838
3916
|
error: z.string().describe("Error message if the operation failed").optional(),
|
|
3839
|
-
|
|
3917
|
+
results: z
|
|
3840
3918
|
.array(z.object({
|
|
3841
3919
|
name: z.string().describe("The name of the file"),
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3920
|
+
url: z.string().describe("The URL of the file in the Github UI"),
|
|
3921
|
+
contents: z
|
|
3922
|
+
.object({
|
|
3923
|
+
path: z.string().describe("The path of the file"),
|
|
3924
|
+
type: z.string().describe("The type of the file"),
|
|
3925
|
+
size: z.number().describe("The size of the file in bytes"),
|
|
3926
|
+
})
|
|
3927
|
+
.describe("The contents of the file"),
|
|
3846
3928
|
}))
|
|
3847
3929
|
.describe("Array of directory contents")
|
|
3848
3930
|
.optional(),
|
|
@@ -3917,63 +3999,89 @@ export const githubSearchOrganizationParamsSchema = z.object({
|
|
|
3917
3999
|
repository: z.string().describe("The repository to search for data in").optional(),
|
|
3918
4000
|
});
|
|
3919
4001
|
export const githubSearchOrganizationOutputSchema = z.object({
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
path: z.string().describe("The path of the file that had a match"),
|
|
3924
|
-
sha: z.string().describe("The SHA of the commit that had a match"),
|
|
3925
|
-
url: z.string().describe("The URL of the file that had a match"),
|
|
3926
|
-
score: z.number().describe("The similarity score of the match"),
|
|
3927
|
-
textMatches: z
|
|
3928
|
-
.array(z.object({
|
|
3929
|
-
object_url: z.string().describe("The URL of the object that had a match").optional(),
|
|
3930
|
-
object_type: z.string().describe("The type of the object that had a match").optional(),
|
|
3931
|
-
fragment: z.string().describe("The fragment of the text that had a match").optional(),
|
|
3932
|
-
matches: z
|
|
3933
|
-
.array(z.object({
|
|
3934
|
-
text: z.string().describe("The text that had a match").optional(),
|
|
3935
|
-
indices: z.array(z.number()).describe("The indices of the text that had a match").optional(),
|
|
3936
|
-
}))
|
|
3937
|
-
.describe("A list of matches that match the query"),
|
|
3938
|
-
}))
|
|
3939
|
-
.describe("A list of text matches that match the query"),
|
|
3940
|
-
}))
|
|
3941
|
-
.describe("A list of code results that match the query"),
|
|
3942
|
-
commits: z
|
|
3943
|
-
.array(z.object({
|
|
3944
|
-
sha: z.string().describe("The SHA of the commit that had a match"),
|
|
3945
|
-
url: z.string().describe("The URL of the commit that had a match"),
|
|
3946
|
-
commit: z
|
|
3947
|
-
.object({
|
|
3948
|
-
author: z.object({
|
|
3949
|
-
name: z.string().describe("The name of the author"),
|
|
3950
|
-
email: z.string().describe("The email of the author"),
|
|
3951
|
-
date: z.string().describe("The date of the commit"),
|
|
3952
|
-
}),
|
|
3953
|
-
message: z.string().describe("The message of the commit"),
|
|
3954
|
-
})
|
|
3955
|
-
.optional(),
|
|
3956
|
-
}))
|
|
3957
|
-
.describe("A list of commits that match the query"),
|
|
3958
|
-
issuesAndPullRequests: z
|
|
4002
|
+
success: z.boolean().describe("Whether the operation was successful"),
|
|
4003
|
+
error: z.string().describe("Error message if the operation failed").optional(),
|
|
4004
|
+
results: z
|
|
3959
4005
|
.array(z.object({
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
4006
|
+
name: z.string().describe("The name of the result (file name, commit SHA, or issue/PR title)"),
|
|
4007
|
+
url: z.string().describe("The URL of the result"),
|
|
4008
|
+
type: z.enum(["code", "commit", "issueOrPullRequest"]).describe("The type of the result"),
|
|
4009
|
+
content: z.any().superRefine((x, ctx) => {
|
|
4010
|
+
const schemas = [
|
|
4011
|
+
z
|
|
4012
|
+
.object({
|
|
4013
|
+
name: z.string().describe("The name of the file that had a match"),
|
|
4014
|
+
path: z.string().describe("The path of the file that had a match"),
|
|
4015
|
+
sha: z.string().describe("The SHA of the commit that had a match"),
|
|
4016
|
+
url: z.string().describe("The URL of the file that had a match"),
|
|
4017
|
+
score: z.number().describe("The similarity score of the match"),
|
|
4018
|
+
textMatches: z
|
|
4019
|
+
.array(z.object({
|
|
4020
|
+
object_url: z.string().describe("The URL of the object that had a match").optional(),
|
|
4021
|
+
object_type: z.string().describe("The type of the object that had a match").optional(),
|
|
4022
|
+
fragment: z.string().describe("The fragment of the text that had a match").optional(),
|
|
4023
|
+
matches: z
|
|
4024
|
+
.array(z.object({
|
|
4025
|
+
text: z.string().describe("The text that had a match").optional(),
|
|
4026
|
+
indices: z
|
|
4027
|
+
.array(z.number())
|
|
4028
|
+
.describe("The indices of the text that had a match")
|
|
4029
|
+
.optional(),
|
|
4030
|
+
}))
|
|
4031
|
+
.describe("A list of matches that match the query"),
|
|
4032
|
+
}))
|
|
4033
|
+
.describe("A list of text matches that match the query"),
|
|
4034
|
+
})
|
|
4035
|
+
.describe("Code result content"),
|
|
4036
|
+
z
|
|
4037
|
+
.object({
|
|
4038
|
+
sha: z.string().describe("The SHA of the commit that had a match"),
|
|
4039
|
+
url: z.string().describe("The URL of the commit that had a match"),
|
|
4040
|
+
commit: z
|
|
4041
|
+
.object({
|
|
4042
|
+
author: z.object({
|
|
4043
|
+
name: z.string().describe("The name of the author"),
|
|
4044
|
+
email: z.string().describe("The email of the author"),
|
|
4045
|
+
date: z.string().describe("The date of the commit"),
|
|
4046
|
+
}),
|
|
4047
|
+
message: z.string().describe("The message of the commit"),
|
|
4048
|
+
})
|
|
4049
|
+
.optional(),
|
|
4050
|
+
})
|
|
4051
|
+
.describe("Commit result content"),
|
|
4052
|
+
z
|
|
4053
|
+
.object({
|
|
4054
|
+
number: z.number().describe("The number of the issue or pull request").optional(),
|
|
4055
|
+
title: z.string().describe("The title of the issue or pull request"),
|
|
4056
|
+
html_url: z.string().describe("The URL of the issue or pull request").optional(),
|
|
4057
|
+
state: z.enum(["open", "closed"]).describe("The state of the issue or pull request"),
|
|
4058
|
+
isPullRequest: z.boolean().describe("Whether the issue or pull request is a pull request").optional(),
|
|
4059
|
+
body: z.string().describe("The body of the issue or pull request").optional(),
|
|
4060
|
+
score: z.number().describe("The score of the issue or pull request").optional(),
|
|
4061
|
+
files: z
|
|
4062
|
+
.array(z.object({
|
|
4063
|
+
filename: z.string().describe("The filename of the file"),
|
|
4064
|
+
status: z.string().describe("The status of the file"),
|
|
4065
|
+
patch: z.string().describe("The patch of the file").optional(),
|
|
4066
|
+
}))
|
|
4067
|
+
.describe("A list of files that match the query")
|
|
4068
|
+
.optional(),
|
|
4069
|
+
})
|
|
4070
|
+
.describe("Issue or pull request result content"),
|
|
4071
|
+
];
|
|
4072
|
+
const errors = schemas.reduce((errors, schema) => (result => (result.error ? [...errors, result.error] : errors))(schema.safeParse(x)), []);
|
|
4073
|
+
if (schemas.length - errors.length !== 1) {
|
|
4074
|
+
ctx.addIssue({
|
|
4075
|
+
path: ctx.path,
|
|
4076
|
+
code: "invalid_union",
|
|
4077
|
+
unionErrors: errors,
|
|
4078
|
+
message: "Invalid input: Should pass single schema",
|
|
4079
|
+
});
|
|
4080
|
+
}
|
|
4081
|
+
}),
|
|
3975
4082
|
}))
|
|
3976
|
-
.describe("
|
|
4083
|
+
.describe("Array of search results")
|
|
4084
|
+
.optional(),
|
|
3977
4085
|
});
|
|
3978
4086
|
export const githubGetBranchParamsSchema = z.object({
|
|
3979
4087
|
repositoryOwner: z.string().describe("The owner of the repository"),
|
|
@@ -4187,78 +4295,99 @@ export const gitlabSearchGroupParamsSchema = z.object({
|
|
|
4187
4295
|
project: z.string().describe("The name of the project to search in").optional(),
|
|
4188
4296
|
});
|
|
4189
4297
|
export const gitlabSearchGroupOutputSchema = z.object({
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
.object({
|
|
4194
|
-
id: z.number().describe("The ID of the merge request"),
|
|
4195
|
-
iid: z.number().describe("The internal ID of the merge request"),
|
|
4196
|
-
project_id: z.number().describe("The ID of the project the merge request belongs to"),
|
|
4197
|
-
title: z.string().describe("The title of the merge request"),
|
|
4198
|
-
web_url: z.string().describe("The URL of the merge request"),
|
|
4199
|
-
description: z.string().describe("The description of the merge request").optional(),
|
|
4200
|
-
author: z
|
|
4201
|
-
.object({ name: z.string().describe("The name of the author").optional() })
|
|
4202
|
-
.describe("The author of the merge request")
|
|
4203
|
-
.optional(),
|
|
4204
|
-
merged_at: z.string().describe("The date and time the merge request was merged").optional(),
|
|
4205
|
-
})
|
|
4206
|
-
.describe("The metadata of the merge request"),
|
|
4207
|
-
diffs: z
|
|
4208
|
-
.array(z.object({
|
|
4209
|
-
old_path: z.string().describe("The old path of the diff"),
|
|
4210
|
-
new_path: z.string().describe("The new path of the diff"),
|
|
4211
|
-
diff: z.string().describe("The contents of the diff"),
|
|
4212
|
-
new_file: z.boolean().describe("Whether the diff is a new file"),
|
|
4213
|
-
renamed_file: z.boolean().describe("Whether the diff is a renamed file"),
|
|
4214
|
-
deleted_file: z.boolean().describe("Whether the diff is a deleted file"),
|
|
4215
|
-
too_large: z.boolean().describe("Whether the diff is too large").optional(),
|
|
4216
|
-
}))
|
|
4217
|
-
.describe("A list of diffs that match the query"),
|
|
4218
|
-
}))
|
|
4219
|
-
.describe("A list of merge requests that match the query"),
|
|
4220
|
-
blobs: z
|
|
4221
|
-
.array(z.object({
|
|
4222
|
-
metadata: z.object({
|
|
4223
|
-
path: z.string().describe("The path of the blob"),
|
|
4224
|
-
basename: z.string().describe("The basename of the blob"),
|
|
4225
|
-
data: z.string().describe("The data of the blob"),
|
|
4226
|
-
project_id: z.number().describe("The ID of the project the blob belongs to"),
|
|
4227
|
-
ref: z.string().describe("The ref of the blob"),
|
|
4228
|
-
startline: z.number().describe("The start line of the blob"),
|
|
4229
|
-
filename: z.string().describe("The filename of the blob"),
|
|
4230
|
-
web_url: z.string().describe("The URL of the blob"),
|
|
4231
|
-
}),
|
|
4232
|
-
matchedMergeRequests: z
|
|
4233
|
-
.array(z.object({
|
|
4234
|
-
title: z.string().describe("The title of the merge request"),
|
|
4235
|
-
web_url: z.string().describe("The URL of the merge request"),
|
|
4236
|
-
author: z.object({}).catchall(z.any()).describe("The author of the merge request").optional(),
|
|
4237
|
-
merged_at: z.string().describe("The date and time the merge request was merged").optional(),
|
|
4238
|
-
}))
|
|
4239
|
-
.describe("A list of merge requests that match the blob")
|
|
4240
|
-
.optional(),
|
|
4241
|
-
}))
|
|
4242
|
-
.describe("A list of blobs that match the query"),
|
|
4243
|
-
commits: z
|
|
4298
|
+
success: z.boolean().describe("Whether the search operation was successful"),
|
|
4299
|
+
error: z.string().describe("Error message if the search operation failed").optional(),
|
|
4300
|
+
results: z
|
|
4244
4301
|
.array(z.object({
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4302
|
+
name: z.string().describe("The name/title of the search result"),
|
|
4303
|
+
url: z.string().describe("The URL to view the result in GitLab"),
|
|
4304
|
+
type: z.enum(["mergeRequest", "blob", "commit"]).describe("The type of search result"),
|
|
4305
|
+
contents: z.any().superRefine((x, ctx) => {
|
|
4306
|
+
const schemas = [
|
|
4307
|
+
z
|
|
4308
|
+
.object({
|
|
4309
|
+
metadata: z
|
|
4310
|
+
.object({
|
|
4311
|
+
id: z.number().describe("The ID of the merge request"),
|
|
4312
|
+
iid: z.number().describe("The internal ID of the merge request"),
|
|
4313
|
+
project_id: z.number().describe("The ID of the project the merge request belongs to"),
|
|
4314
|
+
title: z.string().describe("The title of the merge request"),
|
|
4315
|
+
web_url: z.string().describe("The URL of the merge request"),
|
|
4316
|
+
description: z.string().describe("The description of the merge request").optional(),
|
|
4317
|
+
author: z
|
|
4318
|
+
.object({ name: z.string().describe("The name of the author").optional() })
|
|
4319
|
+
.describe("The author of the merge request")
|
|
4320
|
+
.optional(),
|
|
4321
|
+
merged_at: z.string().describe("The date and time the merge request was merged").optional(),
|
|
4322
|
+
})
|
|
4323
|
+
.describe("The metadata of the merge request"),
|
|
4324
|
+
diffs: z
|
|
4325
|
+
.array(z.object({
|
|
4326
|
+
old_path: z.string().describe("The old path of the diff"),
|
|
4327
|
+
new_path: z.string().describe("The new path of the diff"),
|
|
4328
|
+
diff: z.string().describe("The contents of the diff"),
|
|
4329
|
+
new_file: z.boolean().describe("Whether the diff is a new file"),
|
|
4330
|
+
renamed_file: z.boolean().describe("Whether the diff is a renamed file"),
|
|
4331
|
+
deleted_file: z.boolean().describe("Whether the diff is a deleted file"),
|
|
4332
|
+
too_large: z.boolean().describe("Whether the diff is too large").optional(),
|
|
4333
|
+
}))
|
|
4334
|
+
.describe("A list of diffs that match the query"),
|
|
4335
|
+
})
|
|
4336
|
+
.describe("Merge request contents"),
|
|
4337
|
+
z
|
|
4338
|
+
.object({
|
|
4339
|
+
metadata: z.object({
|
|
4340
|
+
path: z.string().describe("The path of the blob"),
|
|
4341
|
+
basename: z.string().describe("The basename of the blob"),
|
|
4342
|
+
data: z.string().describe("The data of the blob"),
|
|
4343
|
+
project_id: z.number().describe("The ID of the project the blob belongs to"),
|
|
4344
|
+
ref: z.string().describe("The ref of the blob"),
|
|
4345
|
+
startline: z.number().describe("The start line of the blob"),
|
|
4346
|
+
filename: z.string().describe("The filename of the blob"),
|
|
4347
|
+
web_url: z.string().describe("The URL of the blob"),
|
|
4348
|
+
}),
|
|
4349
|
+
matchedMergeRequests: z
|
|
4350
|
+
.array(z.object({
|
|
4351
|
+
title: z.string().describe("The title of the merge request"),
|
|
4352
|
+
web_url: z.string().describe("The URL of the merge request"),
|
|
4353
|
+
author: z.object({}).catchall(z.any()).describe("The author of the merge request").optional(),
|
|
4354
|
+
merged_at: z.string().describe("The date and time the merge request was merged").optional(),
|
|
4355
|
+
}))
|
|
4356
|
+
.describe("A list of merge requests that match the blob"),
|
|
4357
|
+
})
|
|
4358
|
+
.describe("Blob contents"),
|
|
4359
|
+
z
|
|
4360
|
+
.object({
|
|
4361
|
+
sha: z.string().describe("The commit SHA"),
|
|
4362
|
+
web_url: z.string().describe("The URL to view the commit in GitLab"),
|
|
4363
|
+
message: z.string().describe("The full commit message"),
|
|
4364
|
+
author: z.object({
|
|
4365
|
+
name: z.string().describe("The name of the commit author"),
|
|
4366
|
+
email: z.string().describe("The email of the commit author"),
|
|
4367
|
+
}),
|
|
4368
|
+
created_at: z.string().describe("The date/time the commit was created"),
|
|
4369
|
+
files: z
|
|
4370
|
+
.array(z.object({
|
|
4371
|
+
old_path: z.string().describe("The old path of the file"),
|
|
4372
|
+
new_path: z.string().describe("The new path of the file"),
|
|
4373
|
+
diff: z.string().describe("The diff contents for the file"),
|
|
4374
|
+
}))
|
|
4375
|
+
.describe("A list of files changed in the commit"),
|
|
4376
|
+
})
|
|
4377
|
+
.describe("Commit contents"),
|
|
4378
|
+
];
|
|
4379
|
+
const errors = schemas.reduce((errors, schema) => (result => (result.error ? [...errors, result.error] : errors))(schema.safeParse(x)), []);
|
|
4380
|
+
if (schemas.length - errors.length !== 1) {
|
|
4381
|
+
ctx.addIssue({
|
|
4382
|
+
path: ctx.path,
|
|
4383
|
+
code: "invalid_union",
|
|
4384
|
+
unionErrors: errors,
|
|
4385
|
+
message: "Invalid input: Should pass single schema",
|
|
4386
|
+
});
|
|
4387
|
+
}
|
|
4251
4388
|
}),
|
|
4252
|
-
created_at: z.string().describe("The date/time the commit was created"),
|
|
4253
|
-
files: z
|
|
4254
|
-
.array(z.object({
|
|
4255
|
-
old_path: z.string().describe("The old path of the file"),
|
|
4256
|
-
new_path: z.string().describe("The new path of the file"),
|
|
4257
|
-
diff: z.string().describe("The diff contents for the file"),
|
|
4258
|
-
}))
|
|
4259
|
-
.describe("A list of files changed in the commit"),
|
|
4260
4389
|
}))
|
|
4261
|
-
.describe("A list of
|
|
4390
|
+
.describe("A list of search results that match the query")
|
|
4262
4391
|
.optional(),
|
|
4263
4392
|
});
|
|
4264
4393
|
export const gitlabGetFileContentParamsSchema = z.object({
|
|
@@ -4272,10 +4401,19 @@ export const gitlabGetFileContentParamsSchema = z.object({
|
|
|
4272
4401
|
export const gitlabGetFileContentOutputSchema = z.object({
|
|
4273
4402
|
success: z.boolean().describe("Whether the operation was successful"),
|
|
4274
4403
|
error: z.string().describe("The error that occurred if the operation was not successful").optional(),
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4404
|
+
results: z
|
|
4405
|
+
.array(z.object({
|
|
4406
|
+
name: z.string().describe("The name of the file"),
|
|
4407
|
+
url: z.string().describe("The url of the file"),
|
|
4408
|
+
contents: z.object({
|
|
4409
|
+
content: z.string().describe("The decoded file content as a string"),
|
|
4410
|
+
size: z.number().describe("The size of the file in bytes"),
|
|
4411
|
+
name: z.string().describe("The name of the file"),
|
|
4412
|
+
htmlUrl: z.string().describe("The URL of the file in the GitLab UI"),
|
|
4413
|
+
}),
|
|
4414
|
+
}))
|
|
4415
|
+
.describe("The results of the file content")
|
|
4416
|
+
.optional(),
|
|
4279
4417
|
});
|
|
4280
4418
|
export const gitlabListDirectoryParamsSchema = z.object({
|
|
4281
4419
|
group: z.string().describe('The group or namespace that owns the project (e.g., "my-group" or "org/subgroup")'),
|
|
@@ -4284,15 +4422,27 @@ export const gitlabListDirectoryParamsSchema = z.object({
|
|
|
4284
4422
|
ref: z.string().describe('The branch, tag, or commit (defaults to "main")').optional(),
|
|
4285
4423
|
});
|
|
4286
4424
|
export const gitlabListDirectoryOutputSchema = z.object({
|
|
4287
|
-
|
|
4425
|
+
success: z.boolean().describe("Whether the operation was successful"),
|
|
4426
|
+
error: z.string().describe("Error message if the operation failed").optional(),
|
|
4427
|
+
results: z
|
|
4288
4428
|
.array(z.object({
|
|
4289
4429
|
name: z.string().describe("The name of the file or directory"),
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4430
|
+
url: z.string().describe("The URL of the file or directory"),
|
|
4431
|
+
contents: z
|
|
4432
|
+
.object({
|
|
4433
|
+
name: z.string().describe("The name of the file or directory"),
|
|
4434
|
+
path: z.string().describe("The path of the file or directory"),
|
|
4435
|
+
type: z.string().describe('The type of the entry (either "blob" for file or "tree" for directory)'),
|
|
4436
|
+
size: z
|
|
4437
|
+
.number()
|
|
4438
|
+
.describe("The size of the file in bytes (only for blobs; omitted or 0 for trees)")
|
|
4439
|
+
.optional(),
|
|
4440
|
+
htmlUrl: z.string().describe("The URL of the file or folder in the GitLab UI"),
|
|
4441
|
+
})
|
|
4442
|
+
.describe("The contents of the directory"),
|
|
4294
4443
|
}))
|
|
4295
|
-
.describe("Array of directory contents")
|
|
4444
|
+
.describe("Array of directory contents")
|
|
4445
|
+
.optional(),
|
|
4296
4446
|
});
|
|
4297
4447
|
export const linearGetIssuesParamsSchema = z.object({
|
|
4298
4448
|
query: z.string().describe("Optional query string to filter issues").optional(),
|