@credal/actions 0.2.127 → 0.2.129
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 +909 -584
- package/dist/actions/autogen/types.d.ts +865 -938
- package/dist/actions/autogen/types.js +365 -212
- package/dist/actions/groups.d.ts +6 -0
- package/dist/actions/groups.js +261 -0
- package/dist/actions/providers/confluence/updatePage.d.ts +3 -0
- package/dist/actions/providers/confluence/updatePage.js +47 -0
- package/dist/actions/providers/credal/callCopilot.d.ts +3 -0
- package/dist/actions/providers/credal/callCopilot.js +36 -0
- 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/jamf/types.d.ts +8 -0
- package/dist/actions/providers/jamf/types.js +7 -0
- package/dist/actions/providers/jira/getJiraIssuesByQuery.js +9 -7
- package/dist/actions/providers/jira/getJiraTicketDetails.js +8 -1
- package/dist/actions/providers/math/index.d.ts +1 -0
- package/dist/actions/providers/math/index.js +37 -0
- package/dist/actions/providers/salesforce/getSalesforceRecordsByQuery.js +10 -3
- package/dist/actions/providers/salesforce/searchSalesforceRecords.js +9 -7
- package/dist/actions/providers/slack/archiveChannel.d.ts +3 -0
- package/dist/actions/providers/slack/archiveChannel.js +42 -0
- package/dist/actions/providers/slack/index.d.ts +1 -0
- package/dist/actions/providers/slack/index.js +37 -0
- package/dist/actions/providers/slack/listConversations.d.ts +3 -0
- package/dist/actions/providers/slack/listConversations.js +41 -0
- package/dist/actions/providers/slackUser/searchSlack.js +81 -8
- package/package.json +1 -1
- package/dist/actions/providers/jira/updateServiceDeskRequest.d.ts +0 -3
- package/dist/actions/providers/jira/updateServiceDeskRequest.js +0 -72
|
@@ -299,26 +299,37 @@ 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."),
|
|
326
|
+
currentUser: z
|
|
327
|
+
.object({
|
|
328
|
+
userId: z.string().describe("The ID of the current user"),
|
|
329
|
+
userName: z.string().describe("The name of the current user").optional(),
|
|
330
|
+
userEmail: z.string().describe("The email of the current user").optional(),
|
|
331
|
+
})
|
|
332
|
+
.describe("The current user who's running the search"),
|
|
322
333
|
});
|
|
323
334
|
export const mathAddParamsSchema = z.object({
|
|
324
335
|
a: z.number().describe("The first number to add"),
|
|
@@ -452,7 +463,14 @@ export const jiraGetJiraTicketDetailsParamsSchema = z.object({
|
|
|
452
463
|
export const jiraGetJiraTicketDetailsOutputSchema = z.object({
|
|
453
464
|
success: z.boolean().describe("Whether the status was updated successfully"),
|
|
454
465
|
error: z.string().describe("The error that occurred if the retrieval was unsuccessful").optional(),
|
|
455
|
-
|
|
466
|
+
results: z
|
|
467
|
+
.array(z.object({
|
|
468
|
+
name: z.string().describe("The name of the result"),
|
|
469
|
+
url: z.string().describe("The URL of the result"),
|
|
470
|
+
contents: z.object({}).catchall(z.any()).describe("The data of the Jira ticket"),
|
|
471
|
+
}))
|
|
472
|
+
.describe("The results of the Jira ticket")
|
|
473
|
+
.optional(),
|
|
456
474
|
});
|
|
457
475
|
export const jiraGetJiraTicketHistoryParamsSchema = z.object({
|
|
458
476
|
projectKey: z.string().describe("The key for the project"),
|
|
@@ -495,10 +513,12 @@ export const jiraGetJiraIssuesByQueryParamsSchema = z.object({
|
|
|
495
513
|
});
|
|
496
514
|
export const jiraGetJiraIssuesByQueryOutputSchema = z.object({
|
|
497
515
|
success: z.boolean().describe("Whether the records were successfully retrieved"),
|
|
498
|
-
|
|
499
|
-
.object({
|
|
500
|
-
|
|
501
|
-
|
|
516
|
+
results: z
|
|
517
|
+
.array(z.object({
|
|
518
|
+
name: z.string().describe("The name of the result"),
|
|
519
|
+
url: z.string().describe("The URL of the result"),
|
|
520
|
+
contents: z
|
|
521
|
+
.object({
|
|
502
522
|
id: z.string().describe("Internal Jira issue ID"),
|
|
503
523
|
key: z.string().describe("Human-readable issue key (e.g. SSPR-123)"),
|
|
504
524
|
summary: z.string().describe("Summary of the issue"),
|
|
@@ -518,11 +538,10 @@ export const jiraGetJiraIssuesByQueryOutputSchema = z.object({
|
|
|
518
538
|
updated: z.string().datetime({ offset: true }),
|
|
519
539
|
resolution: z.string().nullable().optional(),
|
|
520
540
|
dueDate: z.string().date().nullable().optional(),
|
|
521
|
-
})
|
|
522
|
-
.describe("The
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
.describe("The result object containing issues")
|
|
541
|
+
})
|
|
542
|
+
.describe("The result object containing issues"),
|
|
543
|
+
}))
|
|
544
|
+
.describe("The results of the Jira issues")
|
|
526
545
|
.optional(),
|
|
527
546
|
error: z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
|
|
528
547
|
});
|
|
@@ -630,7 +649,14 @@ export const jiraOrgGetJiraTicketDetailsParamsSchema = z.object({
|
|
|
630
649
|
export const jiraOrgGetJiraTicketDetailsOutputSchema = z.object({
|
|
631
650
|
success: z.boolean().describe("Whether the status was updated successfully"),
|
|
632
651
|
error: z.string().describe("The error that occurred if the retrieval was unsuccessful").optional(),
|
|
633
|
-
|
|
652
|
+
results: z
|
|
653
|
+
.array(z.object({
|
|
654
|
+
name: z.string().describe("The name of the result"),
|
|
655
|
+
url: z.string().describe("The URL of the result"),
|
|
656
|
+
contents: z.object({}).catchall(z.any()).describe("The data of the Jira ticket"),
|
|
657
|
+
}))
|
|
658
|
+
.describe("The results of the Jira ticket")
|
|
659
|
+
.optional(),
|
|
634
660
|
});
|
|
635
661
|
export const jiraOrgGetJiraTicketHistoryParamsSchema = z.object({
|
|
636
662
|
projectKey: z.string().describe("The key for the project"),
|
|
@@ -673,10 +699,12 @@ export const jiraOrgGetJiraIssuesByQueryParamsSchema = z.object({
|
|
|
673
699
|
});
|
|
674
700
|
export const jiraOrgGetJiraIssuesByQueryOutputSchema = z.object({
|
|
675
701
|
success: z.boolean().describe("Whether the records were successfully retrieved"),
|
|
676
|
-
|
|
677
|
-
.object({
|
|
678
|
-
|
|
679
|
-
|
|
702
|
+
results: z
|
|
703
|
+
.array(z.object({
|
|
704
|
+
name: z.string().describe("The name of the result"),
|
|
705
|
+
url: z.string().describe("The URL of the result"),
|
|
706
|
+
contents: z
|
|
707
|
+
.object({
|
|
680
708
|
id: z.string().describe("Internal Jira issue ID"),
|
|
681
709
|
key: z.string().describe("Human-readable issue key (e.g. SSPR-123)"),
|
|
682
710
|
summary: z.string().describe("Summary of the issue"),
|
|
@@ -696,11 +724,10 @@ export const jiraOrgGetJiraIssuesByQueryOutputSchema = z.object({
|
|
|
696
724
|
updated: z.string().datetime({ offset: true }),
|
|
697
725
|
resolution: z.string().nullable().optional(),
|
|
698
726
|
dueDate: z.string().date().nullable().optional(),
|
|
699
|
-
})
|
|
700
|
-
.describe("The
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
.describe("The result object containing issues")
|
|
727
|
+
})
|
|
728
|
+
.describe("The result object containing issues"),
|
|
729
|
+
}))
|
|
730
|
+
.describe("The results of the Jira issues")
|
|
704
731
|
.optional(),
|
|
705
732
|
error: z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
|
|
706
733
|
});
|
|
@@ -992,7 +1019,18 @@ export const firecrawlScrapeUrlParamsSchema = z.object({
|
|
|
992
1019
|
.describe("Array of formats to return")
|
|
993
1020
|
.optional(),
|
|
994
1021
|
});
|
|
995
|
-
export const firecrawlScrapeUrlOutputSchema = z.object({
|
|
1022
|
+
export const firecrawlScrapeUrlOutputSchema = z.object({
|
|
1023
|
+
success: z.boolean().describe("Whether the operation was successful"),
|
|
1024
|
+
error: z.string().describe("Error message if the operation failed").optional(),
|
|
1025
|
+
results: z
|
|
1026
|
+
.array(z.object({
|
|
1027
|
+
name: z.string().describe("The name of the result"),
|
|
1028
|
+
url: z.string().describe("The URL of the result"),
|
|
1029
|
+
contents: z.string().describe("The content of the URL"),
|
|
1030
|
+
}))
|
|
1031
|
+
.describe("The results of the scrape")
|
|
1032
|
+
.optional(),
|
|
1033
|
+
});
|
|
996
1034
|
export const firecrawlSearchAndScrapeParamsSchema = z.object({
|
|
997
1035
|
query: z.string().describe("The query to search for"),
|
|
998
1036
|
count: z.number().describe("The number of results to return. Default is 5.").optional(),
|
|
@@ -2724,13 +2762,19 @@ export const googleOauthSearchDriveByKeywordsAndGetFileContentParamsSchema = z.o
|
|
|
2724
2762
|
});
|
|
2725
2763
|
export const googleOauthSearchDriveByKeywordsAndGetFileContentOutputSchema = z.object({
|
|
2726
2764
|
success: z.boolean().describe("Whether the search was successful"),
|
|
2727
|
-
|
|
2765
|
+
results: z
|
|
2728
2766
|
.array(z.object({
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2767
|
+
name: z.string().describe("The name of the file"),
|
|
2768
|
+
url: z.string().describe("The URL of the file"),
|
|
2769
|
+
contents: z
|
|
2770
|
+
.object({
|
|
2771
|
+
id: z.string().describe("The file ID"),
|
|
2772
|
+
name: z.string().describe("The file name"),
|
|
2773
|
+
mimeType: z.string().describe("The MIME type of the file"),
|
|
2774
|
+
url: z.string().describe("The web link to view the file"),
|
|
2775
|
+
content: z.string().describe("The data returned from the file, subject to fileSizeLimit").optional(),
|
|
2776
|
+
})
|
|
2777
|
+
.describe("The contents of the file"),
|
|
2734
2778
|
}))
|
|
2735
2779
|
.describe("List of files matching the search")
|
|
2736
2780
|
.optional(),
|
|
@@ -2771,9 +2815,20 @@ export const googleOauthGetDriveFileContentByIdParamsSchema = z.object({
|
|
|
2771
2815
|
});
|
|
2772
2816
|
export const googleOauthGetDriveFileContentByIdOutputSchema = z.object({
|
|
2773
2817
|
success: z.boolean().describe("Whether the file content was retrieved successfully"),
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2818
|
+
results: z
|
|
2819
|
+
.array(z.object({
|
|
2820
|
+
name: z.string().describe("The name of the file"),
|
|
2821
|
+
url: z.string().describe("The URL of the file"),
|
|
2822
|
+
contents: z
|
|
2823
|
+
.object({
|
|
2824
|
+
content: z.string().describe("The content of the file").optional(),
|
|
2825
|
+
fileName: z.string().describe("The name of the file").optional(),
|
|
2826
|
+
fileLength: z.number().describe("The length of the file content prior to truncating").optional(),
|
|
2827
|
+
})
|
|
2828
|
+
.describe("The contents of the file"),
|
|
2829
|
+
}))
|
|
2830
|
+
.describe("The results of the file content")
|
|
2831
|
+
.optional(),
|
|
2777
2832
|
error: z.string().describe("Error message if file content retrieval failed").optional(),
|
|
2778
2833
|
});
|
|
2779
2834
|
export const googleOauthListGroupsParamsSchema = z.object({
|
|
@@ -3554,17 +3609,24 @@ export const salesforceSearchSalesforceRecordsParamsSchema = z.object({
|
|
|
3554
3609
|
});
|
|
3555
3610
|
export const salesforceSearchSalesforceRecordsOutputSchema = z.object({
|
|
3556
3611
|
success: z.boolean().describe("Whether the records were successfully retrieved"),
|
|
3557
|
-
|
|
3612
|
+
results: z
|
|
3558
3613
|
.array(z
|
|
3559
3614
|
.object({
|
|
3560
|
-
|
|
3561
|
-
|
|
3615
|
+
name: z.string().describe("The name of the record").optional(),
|
|
3616
|
+
url: z.string().describe("The URL of the record").optional(),
|
|
3617
|
+
contents: z
|
|
3562
3618
|
.object({
|
|
3563
|
-
|
|
3564
|
-
|
|
3619
|
+
id: z.string().describe("The Salesforce record ID").optional(),
|
|
3620
|
+
attributes: z
|
|
3621
|
+
.object({
|
|
3622
|
+
type: z.string().describe("The Salesforce object type"),
|
|
3623
|
+
url: z.string().describe("The Salesforce record URL"),
|
|
3624
|
+
})
|
|
3625
|
+
.catchall(z.any())
|
|
3626
|
+
.describe("Metadata about the Salesforce record")
|
|
3627
|
+
.optional(),
|
|
3565
3628
|
})
|
|
3566
|
-
.
|
|
3567
|
-
.describe("Metadata about the Salesforce record")
|
|
3629
|
+
.describe("The contents of the record")
|
|
3568
3630
|
.optional(),
|
|
3569
3631
|
})
|
|
3570
3632
|
.describe("A record from Salesforce"))
|
|
@@ -3578,10 +3640,7 @@ export const salesforceGetSalesforceRecordsByQueryParamsSchema = z.object({
|
|
|
3578
3640
|
});
|
|
3579
3641
|
export const salesforceGetSalesforceRecordsByQueryOutputSchema = z.object({
|
|
3580
3642
|
success: z.boolean().describe("Whether the records were successfully retrieved"),
|
|
3581
|
-
|
|
3582
|
-
.array(z.record(z.string()).describe("A record from Salesforce"))
|
|
3583
|
-
.describe("The retrieved records")
|
|
3584
|
-
.optional(),
|
|
3643
|
+
results: z.array(z.any()).describe("Array of standardized results objects").optional(),
|
|
3585
3644
|
error: z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
|
|
3586
3645
|
});
|
|
3587
3646
|
export const salesforceGetRecordParamsSchema = z.object({
|
|
@@ -3710,20 +3769,31 @@ export const githubListPullRequestsParamsSchema = z.object({
|
|
|
3710
3769
|
state: z.string().describe("The state of the pull requests to list (e.g., open, closed)").optional(),
|
|
3711
3770
|
});
|
|
3712
3771
|
export const githubListPullRequestsOutputSchema = z.object({
|
|
3713
|
-
|
|
3772
|
+
success: z.boolean().describe("Whether the operation was successful"),
|
|
3773
|
+
error: z.string().describe("The error that occurred if the operation was not successful").optional(),
|
|
3774
|
+
results: z
|
|
3714
3775
|
.array(z.object({
|
|
3715
|
-
|
|
3716
|
-
title: z.string().describe("The title of the pull request").optional(),
|
|
3717
|
-
state: z.string().describe("The state of the pull request (e.g., open, closed)").optional(),
|
|
3776
|
+
name: z.string().describe("The title of the pull request").optional(),
|
|
3718
3777
|
url: z.string().describe("The URL of the pull request").optional(),
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3778
|
+
contents: z
|
|
3779
|
+
.object({
|
|
3780
|
+
number: z.number().describe("The number of the pull request").optional(),
|
|
3781
|
+
title: z.string().describe("The title of the pull request").optional(),
|
|
3782
|
+
state: z.string().describe("The state of the pull request (e.g., open, closed)").optional(),
|
|
3783
|
+
url: z.string().describe("The URL of the pull request").optional(),
|
|
3784
|
+
createdAt: z.string().describe("The date and time when the pull request was created").optional(),
|
|
3785
|
+
updatedAt: z.string().describe("The date and time when the pull request was last updated").optional(),
|
|
3786
|
+
user: z
|
|
3787
|
+
.object({
|
|
3788
|
+
login: z.string().describe("The username of the user who created the pull request").optional(),
|
|
3789
|
+
})
|
|
3790
|
+
.optional(),
|
|
3791
|
+
description: z.string().describe("The description of the pull request").optional(),
|
|
3792
|
+
})
|
|
3723
3793
|
.optional(),
|
|
3724
|
-
description: z.string().describe("The description of the pull request").optional(),
|
|
3725
3794
|
}))
|
|
3726
|
-
.describe("A list of pull requests in the repository")
|
|
3795
|
+
.describe("A list of pull requests in the repository")
|
|
3796
|
+
.optional(),
|
|
3727
3797
|
});
|
|
3728
3798
|
export const githubGetPullRequestDetailsParamsSchema = z.object({
|
|
3729
3799
|
repositoryOwner: z.string().describe("The owner of the repository"),
|
|
@@ -3827,10 +3897,21 @@ export const githubGetFileContentParamsSchema = z.object({
|
|
|
3827
3897
|
export const githubGetFileContentOutputSchema = z.object({
|
|
3828
3898
|
success: z.boolean().describe("Whether the operation was successful"),
|
|
3829
3899
|
error: z.string().describe("The error that occurred if the operation was not successful").optional(),
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3900
|
+
results: z
|
|
3901
|
+
.array(z.object({
|
|
3902
|
+
name: z.string().describe("The name of the file").optional(),
|
|
3903
|
+
url: z.string().describe("The URL of the file in the Github UI").optional(),
|
|
3904
|
+
contents: z
|
|
3905
|
+
.object({
|
|
3906
|
+
content: z.string().describe("The decoded file content as a string").optional(),
|
|
3907
|
+
size: z.number().describe("The size of the file in bytes").optional(),
|
|
3908
|
+
name: z.string().describe("The name of the file").optional(),
|
|
3909
|
+
htmlUrl: z.string().describe("The URL of the file in the Github UI").optional(),
|
|
3910
|
+
})
|
|
3911
|
+
.optional(),
|
|
3912
|
+
}))
|
|
3913
|
+
.describe("A list of Github files")
|
|
3914
|
+
.optional(),
|
|
3834
3915
|
});
|
|
3835
3916
|
export const githubListDirectoryParamsSchema = z.object({
|
|
3836
3917
|
organization: z.string().describe("The organization that owns the repository"),
|
|
@@ -3840,13 +3921,17 @@ export const githubListDirectoryParamsSchema = z.object({
|
|
|
3840
3921
|
export const githubListDirectoryOutputSchema = z.object({
|
|
3841
3922
|
success: z.boolean().describe("Whether the operation was successful"),
|
|
3842
3923
|
error: z.string().describe("Error message if the operation failed").optional(),
|
|
3843
|
-
|
|
3924
|
+
results: z
|
|
3844
3925
|
.array(z.object({
|
|
3845
3926
|
name: z.string().describe("The name of the file"),
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3927
|
+
url: z.string().describe("The URL of the file in the Github UI"),
|
|
3928
|
+
contents: z
|
|
3929
|
+
.object({
|
|
3930
|
+
path: z.string().describe("The path of the file"),
|
|
3931
|
+
type: z.string().describe("The type of the file"),
|
|
3932
|
+
size: z.number().describe("The size of the file in bytes"),
|
|
3933
|
+
})
|
|
3934
|
+
.describe("The contents of the file"),
|
|
3850
3935
|
}))
|
|
3851
3936
|
.describe("Array of directory contents")
|
|
3852
3937
|
.optional(),
|
|
@@ -3921,63 +4006,89 @@ export const githubSearchOrganizationParamsSchema = z.object({
|
|
|
3921
4006
|
repository: z.string().describe("The repository to search for data in").optional(),
|
|
3922
4007
|
});
|
|
3923
4008
|
export const githubSearchOrganizationOutputSchema = z.object({
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
path: z.string().describe("The path of the file that had a match"),
|
|
3928
|
-
sha: z.string().describe("The SHA of the commit that had a match"),
|
|
3929
|
-
url: z.string().describe("The URL of the file that had a match"),
|
|
3930
|
-
score: z.number().describe("The similarity score of the match"),
|
|
3931
|
-
textMatches: z
|
|
3932
|
-
.array(z.object({
|
|
3933
|
-
object_url: z.string().describe("The URL of the object that had a match").optional(),
|
|
3934
|
-
object_type: z.string().describe("The type of the object that had a match").optional(),
|
|
3935
|
-
fragment: z.string().describe("The fragment of the text that had a match").optional(),
|
|
3936
|
-
matches: z
|
|
3937
|
-
.array(z.object({
|
|
3938
|
-
text: z.string().describe("The text that had a match").optional(),
|
|
3939
|
-
indices: z.array(z.number()).describe("The indices of the text that had a match").optional(),
|
|
3940
|
-
}))
|
|
3941
|
-
.describe("A list of matches that match the query"),
|
|
3942
|
-
}))
|
|
3943
|
-
.describe("A list of text matches that match the query"),
|
|
3944
|
-
}))
|
|
3945
|
-
.describe("A list of code results that match the query"),
|
|
3946
|
-
commits: z
|
|
3947
|
-
.array(z.object({
|
|
3948
|
-
sha: z.string().describe("The SHA of the commit that had a match"),
|
|
3949
|
-
url: z.string().describe("The URL of the commit that had a match"),
|
|
3950
|
-
commit: z
|
|
3951
|
-
.object({
|
|
3952
|
-
author: z.object({
|
|
3953
|
-
name: z.string().describe("The name of the author"),
|
|
3954
|
-
email: z.string().describe("The email of the author"),
|
|
3955
|
-
date: z.string().describe("The date of the commit"),
|
|
3956
|
-
}),
|
|
3957
|
-
message: z.string().describe("The message of the commit"),
|
|
3958
|
-
})
|
|
3959
|
-
.optional(),
|
|
3960
|
-
}))
|
|
3961
|
-
.describe("A list of commits that match the query"),
|
|
3962
|
-
issuesAndPullRequests: z
|
|
4009
|
+
success: z.boolean().describe("Whether the operation was successful"),
|
|
4010
|
+
error: z.string().describe("Error message if the operation failed").optional(),
|
|
4011
|
+
results: z
|
|
3963
4012
|
.array(z.object({
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
4013
|
+
name: z.string().describe("The name of the result (file name, commit SHA, or issue/PR title)"),
|
|
4014
|
+
url: z.string().describe("The URL of the result"),
|
|
4015
|
+
type: z.enum(["code", "commit", "issueOrPullRequest"]).describe("The type of the result"),
|
|
4016
|
+
content: z.any().superRefine((x, ctx) => {
|
|
4017
|
+
const schemas = [
|
|
4018
|
+
z
|
|
4019
|
+
.object({
|
|
4020
|
+
name: z.string().describe("The name of the file that had a match"),
|
|
4021
|
+
path: z.string().describe("The path of the file that had a match"),
|
|
4022
|
+
sha: z.string().describe("The SHA of the commit that had a match"),
|
|
4023
|
+
url: z.string().describe("The URL of the file that had a match"),
|
|
4024
|
+
score: z.number().describe("The similarity score of the match"),
|
|
4025
|
+
textMatches: z
|
|
4026
|
+
.array(z.object({
|
|
4027
|
+
object_url: z.string().describe("The URL of the object that had a match").optional(),
|
|
4028
|
+
object_type: z.string().describe("The type of the object that had a match").optional(),
|
|
4029
|
+
fragment: z.string().describe("The fragment of the text that had a match").optional(),
|
|
4030
|
+
matches: z
|
|
4031
|
+
.array(z.object({
|
|
4032
|
+
text: z.string().describe("The text that had a match").optional(),
|
|
4033
|
+
indices: z
|
|
4034
|
+
.array(z.number())
|
|
4035
|
+
.describe("The indices of the text that had a match")
|
|
4036
|
+
.optional(),
|
|
4037
|
+
}))
|
|
4038
|
+
.describe("A list of matches that match the query"),
|
|
4039
|
+
}))
|
|
4040
|
+
.describe("A list of text matches that match the query"),
|
|
4041
|
+
})
|
|
4042
|
+
.describe("Code result content"),
|
|
4043
|
+
z
|
|
4044
|
+
.object({
|
|
4045
|
+
sha: z.string().describe("The SHA of the commit that had a match"),
|
|
4046
|
+
url: z.string().describe("The URL of the commit that had a match"),
|
|
4047
|
+
commit: z
|
|
4048
|
+
.object({
|
|
4049
|
+
author: z.object({
|
|
4050
|
+
name: z.string().describe("The name of the author"),
|
|
4051
|
+
email: z.string().describe("The email of the author"),
|
|
4052
|
+
date: z.string().describe("The date of the commit"),
|
|
4053
|
+
}),
|
|
4054
|
+
message: z.string().describe("The message of the commit"),
|
|
4055
|
+
})
|
|
4056
|
+
.optional(),
|
|
4057
|
+
})
|
|
4058
|
+
.describe("Commit result content"),
|
|
4059
|
+
z
|
|
4060
|
+
.object({
|
|
4061
|
+
number: z.number().describe("The number of the issue or pull request").optional(),
|
|
4062
|
+
title: z.string().describe("The title of the issue or pull request"),
|
|
4063
|
+
html_url: z.string().describe("The URL of the issue or pull request").optional(),
|
|
4064
|
+
state: z.enum(["open", "closed"]).describe("The state of the issue or pull request"),
|
|
4065
|
+
isPullRequest: z.boolean().describe("Whether the issue or pull request is a pull request").optional(),
|
|
4066
|
+
body: z.string().describe("The body of the issue or pull request").optional(),
|
|
4067
|
+
score: z.number().describe("The score of the issue or pull request").optional(),
|
|
4068
|
+
files: z
|
|
4069
|
+
.array(z.object({
|
|
4070
|
+
filename: z.string().describe("The filename of the file"),
|
|
4071
|
+
status: z.string().describe("The status of the file"),
|
|
4072
|
+
patch: z.string().describe("The patch of the file").optional(),
|
|
4073
|
+
}))
|
|
4074
|
+
.describe("A list of files that match the query")
|
|
4075
|
+
.optional(),
|
|
4076
|
+
})
|
|
4077
|
+
.describe("Issue or pull request result content"),
|
|
4078
|
+
];
|
|
4079
|
+
const errors = schemas.reduce((errors, schema) => (result => (result.error ? [...errors, result.error] : errors))(schema.safeParse(x)), []);
|
|
4080
|
+
if (schemas.length - errors.length !== 1) {
|
|
4081
|
+
ctx.addIssue({
|
|
4082
|
+
path: ctx.path,
|
|
4083
|
+
code: "invalid_union",
|
|
4084
|
+
unionErrors: errors,
|
|
4085
|
+
message: "Invalid input: Should pass single schema",
|
|
4086
|
+
});
|
|
4087
|
+
}
|
|
4088
|
+
}),
|
|
3979
4089
|
}))
|
|
3980
|
-
.describe("
|
|
4090
|
+
.describe("Array of search results")
|
|
4091
|
+
.optional(),
|
|
3981
4092
|
});
|
|
3982
4093
|
export const githubGetBranchParamsSchema = z.object({
|
|
3983
4094
|
repositoryOwner: z.string().describe("The owner of the repository"),
|
|
@@ -4191,78 +4302,99 @@ export const gitlabSearchGroupParamsSchema = z.object({
|
|
|
4191
4302
|
project: z.string().describe("The name of the project to search in").optional(),
|
|
4192
4303
|
});
|
|
4193
4304
|
export const gitlabSearchGroupOutputSchema = z.object({
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
.object({
|
|
4198
|
-
id: z.number().describe("The ID of the merge request"),
|
|
4199
|
-
iid: z.number().describe("The internal ID of the merge request"),
|
|
4200
|
-
project_id: z.number().describe("The ID of the project the merge request belongs to"),
|
|
4201
|
-
title: z.string().describe("The title of the merge request"),
|
|
4202
|
-
web_url: z.string().describe("The URL of the merge request"),
|
|
4203
|
-
description: z.string().describe("The description of the merge request").optional(),
|
|
4204
|
-
author: z
|
|
4205
|
-
.object({ name: z.string().describe("The name of the author").optional() })
|
|
4206
|
-
.describe("The author of the merge request")
|
|
4207
|
-
.optional(),
|
|
4208
|
-
merged_at: z.string().describe("The date and time the merge request was merged").optional(),
|
|
4209
|
-
})
|
|
4210
|
-
.describe("The metadata of the merge request"),
|
|
4211
|
-
diffs: z
|
|
4212
|
-
.array(z.object({
|
|
4213
|
-
old_path: z.string().describe("The old path of the diff"),
|
|
4214
|
-
new_path: z.string().describe("The new path of the diff"),
|
|
4215
|
-
diff: z.string().describe("The contents of the diff"),
|
|
4216
|
-
new_file: z.boolean().describe("Whether the diff is a new file"),
|
|
4217
|
-
renamed_file: z.boolean().describe("Whether the diff is a renamed file"),
|
|
4218
|
-
deleted_file: z.boolean().describe("Whether the diff is a deleted file"),
|
|
4219
|
-
too_large: z.boolean().describe("Whether the diff is too large").optional(),
|
|
4220
|
-
}))
|
|
4221
|
-
.describe("A list of diffs that match the query"),
|
|
4222
|
-
}))
|
|
4223
|
-
.describe("A list of merge requests that match the query"),
|
|
4224
|
-
blobs: z
|
|
4225
|
-
.array(z.object({
|
|
4226
|
-
metadata: z.object({
|
|
4227
|
-
path: z.string().describe("The path of the blob"),
|
|
4228
|
-
basename: z.string().describe("The basename of the blob"),
|
|
4229
|
-
data: z.string().describe("The data of the blob"),
|
|
4230
|
-
project_id: z.number().describe("The ID of the project the blob belongs to"),
|
|
4231
|
-
ref: z.string().describe("The ref of the blob"),
|
|
4232
|
-
startline: z.number().describe("The start line of the blob"),
|
|
4233
|
-
filename: z.string().describe("The filename of the blob"),
|
|
4234
|
-
web_url: z.string().describe("The URL of the blob"),
|
|
4235
|
-
}),
|
|
4236
|
-
matchedMergeRequests: z
|
|
4237
|
-
.array(z.object({
|
|
4238
|
-
title: z.string().describe("The title of the merge request"),
|
|
4239
|
-
web_url: z.string().describe("The URL of the merge request"),
|
|
4240
|
-
author: z.object({}).catchall(z.any()).describe("The author of the merge request").optional(),
|
|
4241
|
-
merged_at: z.string().describe("The date and time the merge request was merged").optional(),
|
|
4242
|
-
}))
|
|
4243
|
-
.describe("A list of merge requests that match the blob")
|
|
4244
|
-
.optional(),
|
|
4245
|
-
}))
|
|
4246
|
-
.describe("A list of blobs that match the query"),
|
|
4247
|
-
commits: z
|
|
4305
|
+
success: z.boolean().describe("Whether the search operation was successful"),
|
|
4306
|
+
error: z.string().describe("Error message if the search operation failed").optional(),
|
|
4307
|
+
results: z
|
|
4248
4308
|
.array(z.object({
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4309
|
+
name: z.string().describe("The name/title of the search result"),
|
|
4310
|
+
url: z.string().describe("The URL to view the result in GitLab"),
|
|
4311
|
+
type: z.enum(["mergeRequest", "blob", "commit"]).describe("The type of search result"),
|
|
4312
|
+
contents: z.any().superRefine((x, ctx) => {
|
|
4313
|
+
const schemas = [
|
|
4314
|
+
z
|
|
4315
|
+
.object({
|
|
4316
|
+
metadata: z
|
|
4317
|
+
.object({
|
|
4318
|
+
id: z.number().describe("The ID of the merge request"),
|
|
4319
|
+
iid: z.number().describe("The internal ID of the merge request"),
|
|
4320
|
+
project_id: z.number().describe("The ID of the project the merge request belongs to"),
|
|
4321
|
+
title: z.string().describe("The title of the merge request"),
|
|
4322
|
+
web_url: z.string().describe("The URL of the merge request"),
|
|
4323
|
+
description: z.string().describe("The description of the merge request").optional(),
|
|
4324
|
+
author: z
|
|
4325
|
+
.object({ name: z.string().describe("The name of the author").optional() })
|
|
4326
|
+
.describe("The author of the merge request")
|
|
4327
|
+
.optional(),
|
|
4328
|
+
merged_at: z.string().describe("The date and time the merge request was merged").optional(),
|
|
4329
|
+
})
|
|
4330
|
+
.describe("The metadata of the merge request"),
|
|
4331
|
+
diffs: z
|
|
4332
|
+
.array(z.object({
|
|
4333
|
+
old_path: z.string().describe("The old path of the diff"),
|
|
4334
|
+
new_path: z.string().describe("The new path of the diff"),
|
|
4335
|
+
diff: z.string().describe("The contents of the diff"),
|
|
4336
|
+
new_file: z.boolean().describe("Whether the diff is a new file"),
|
|
4337
|
+
renamed_file: z.boolean().describe("Whether the diff is a renamed file"),
|
|
4338
|
+
deleted_file: z.boolean().describe("Whether the diff is a deleted file"),
|
|
4339
|
+
too_large: z.boolean().describe("Whether the diff is too large").optional(),
|
|
4340
|
+
}))
|
|
4341
|
+
.describe("A list of diffs that match the query"),
|
|
4342
|
+
})
|
|
4343
|
+
.describe("Merge request contents"),
|
|
4344
|
+
z
|
|
4345
|
+
.object({
|
|
4346
|
+
metadata: z.object({
|
|
4347
|
+
path: z.string().describe("The path of the blob"),
|
|
4348
|
+
basename: z.string().describe("The basename of the blob"),
|
|
4349
|
+
data: z.string().describe("The data of the blob"),
|
|
4350
|
+
project_id: z.number().describe("The ID of the project the blob belongs to"),
|
|
4351
|
+
ref: z.string().describe("The ref of the blob"),
|
|
4352
|
+
startline: z.number().describe("The start line of the blob"),
|
|
4353
|
+
filename: z.string().describe("The filename of the blob"),
|
|
4354
|
+
web_url: z.string().describe("The URL of the blob"),
|
|
4355
|
+
}),
|
|
4356
|
+
matchedMergeRequests: z
|
|
4357
|
+
.array(z.object({
|
|
4358
|
+
title: z.string().describe("The title of the merge request"),
|
|
4359
|
+
web_url: z.string().describe("The URL of the merge request"),
|
|
4360
|
+
author: z.object({}).catchall(z.any()).describe("The author of the merge request").optional(),
|
|
4361
|
+
merged_at: z.string().describe("The date and time the merge request was merged").optional(),
|
|
4362
|
+
}))
|
|
4363
|
+
.describe("A list of merge requests that match the blob"),
|
|
4364
|
+
})
|
|
4365
|
+
.describe("Blob contents"),
|
|
4366
|
+
z
|
|
4367
|
+
.object({
|
|
4368
|
+
sha: z.string().describe("The commit SHA"),
|
|
4369
|
+
web_url: z.string().describe("The URL to view the commit in GitLab"),
|
|
4370
|
+
message: z.string().describe("The full commit message"),
|
|
4371
|
+
author: z.object({
|
|
4372
|
+
name: z.string().describe("The name of the commit author"),
|
|
4373
|
+
email: z.string().describe("The email of the commit author"),
|
|
4374
|
+
}),
|
|
4375
|
+
created_at: z.string().describe("The date/time the commit was created"),
|
|
4376
|
+
files: z
|
|
4377
|
+
.array(z.object({
|
|
4378
|
+
old_path: z.string().describe("The old path of the file"),
|
|
4379
|
+
new_path: z.string().describe("The new path of the file"),
|
|
4380
|
+
diff: z.string().describe("The diff contents for the file"),
|
|
4381
|
+
}))
|
|
4382
|
+
.describe("A list of files changed in the commit"),
|
|
4383
|
+
})
|
|
4384
|
+
.describe("Commit contents"),
|
|
4385
|
+
];
|
|
4386
|
+
const errors = schemas.reduce((errors, schema) => (result => (result.error ? [...errors, result.error] : errors))(schema.safeParse(x)), []);
|
|
4387
|
+
if (schemas.length - errors.length !== 1) {
|
|
4388
|
+
ctx.addIssue({
|
|
4389
|
+
path: ctx.path,
|
|
4390
|
+
code: "invalid_union",
|
|
4391
|
+
unionErrors: errors,
|
|
4392
|
+
message: "Invalid input: Should pass single schema",
|
|
4393
|
+
});
|
|
4394
|
+
}
|
|
4255
4395
|
}),
|
|
4256
|
-
created_at: z.string().describe("The date/time the commit was created"),
|
|
4257
|
-
files: z
|
|
4258
|
-
.array(z.object({
|
|
4259
|
-
old_path: z.string().describe("The old path of the file"),
|
|
4260
|
-
new_path: z.string().describe("The new path of the file"),
|
|
4261
|
-
diff: z.string().describe("The diff contents for the file"),
|
|
4262
|
-
}))
|
|
4263
|
-
.describe("A list of files changed in the commit"),
|
|
4264
4396
|
}))
|
|
4265
|
-
.describe("A list of
|
|
4397
|
+
.describe("A list of search results that match the query")
|
|
4266
4398
|
.optional(),
|
|
4267
4399
|
});
|
|
4268
4400
|
export const gitlabGetFileContentParamsSchema = z.object({
|
|
@@ -4276,10 +4408,19 @@ export const gitlabGetFileContentParamsSchema = z.object({
|
|
|
4276
4408
|
export const gitlabGetFileContentOutputSchema = z.object({
|
|
4277
4409
|
success: z.boolean().describe("Whether the operation was successful"),
|
|
4278
4410
|
error: z.string().describe("The error that occurred if the operation was not successful").optional(),
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4411
|
+
results: z
|
|
4412
|
+
.array(z.object({
|
|
4413
|
+
name: z.string().describe("The name of the file"),
|
|
4414
|
+
url: z.string().describe("The url of the file"),
|
|
4415
|
+
contents: z.object({
|
|
4416
|
+
content: z.string().describe("The decoded file content as a string"),
|
|
4417
|
+
size: z.number().describe("The size of the file in bytes"),
|
|
4418
|
+
name: z.string().describe("The name of the file"),
|
|
4419
|
+
htmlUrl: z.string().describe("The URL of the file in the GitLab UI"),
|
|
4420
|
+
}),
|
|
4421
|
+
}))
|
|
4422
|
+
.describe("The results of the file content")
|
|
4423
|
+
.optional(),
|
|
4283
4424
|
});
|
|
4284
4425
|
export const gitlabListDirectoryParamsSchema = z.object({
|
|
4285
4426
|
group: z.string().describe('The group or namespace that owns the project (e.g., "my-group" or "org/subgroup")'),
|
|
@@ -4288,15 +4429,27 @@ export const gitlabListDirectoryParamsSchema = z.object({
|
|
|
4288
4429
|
ref: z.string().describe('The branch, tag, or commit (defaults to "main")').optional(),
|
|
4289
4430
|
});
|
|
4290
4431
|
export const gitlabListDirectoryOutputSchema = z.object({
|
|
4291
|
-
|
|
4432
|
+
success: z.boolean().describe("Whether the operation was successful"),
|
|
4433
|
+
error: z.string().describe("Error message if the operation failed").optional(),
|
|
4434
|
+
results: z
|
|
4292
4435
|
.array(z.object({
|
|
4293
4436
|
name: z.string().describe("The name of the file or directory"),
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4437
|
+
url: z.string().describe("The URL of the file or directory"),
|
|
4438
|
+
contents: z
|
|
4439
|
+
.object({
|
|
4440
|
+
name: z.string().describe("The name of the file or directory"),
|
|
4441
|
+
path: z.string().describe("The path of the file or directory"),
|
|
4442
|
+
type: z.string().describe('The type of the entry (either "blob" for file or "tree" for directory)'),
|
|
4443
|
+
size: z
|
|
4444
|
+
.number()
|
|
4445
|
+
.describe("The size of the file in bytes (only for blobs; omitted or 0 for trees)")
|
|
4446
|
+
.optional(),
|
|
4447
|
+
htmlUrl: z.string().describe("The URL of the file or folder in the GitLab UI"),
|
|
4448
|
+
})
|
|
4449
|
+
.describe("The contents of the directory"),
|
|
4298
4450
|
}))
|
|
4299
|
-
.describe("Array of directory contents")
|
|
4451
|
+
.describe("Array of directory contents")
|
|
4452
|
+
.optional(),
|
|
4300
4453
|
});
|
|
4301
4454
|
export const linearGetIssuesParamsSchema = z.object({
|
|
4302
4455
|
query: z.string().describe("Optional query string to filter issues").optional(),
|