@credal/actions 0.2.182 → 0.2.184

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.
@@ -36,6 +36,132 @@ export var ProviderName;
36
36
  ProviderName["LINEAR"] = "linear";
37
37
  ProviderName["HUBSPOT"] = "hubspot";
38
38
  })(ProviderName || (ProviderName = {}));
39
+ export var ActionName;
40
+ (function (ActionName) {
41
+ ActionName["FILLTEMPLATE"] = "fillTemplate";
42
+ ActionName["PERPLEXITYDEEPRESEARCH"] = "perplexityDeepResearch";
43
+ ActionName["COMMENTTASK"] = "commentTask";
44
+ ActionName["LISTASANATASKSBYPROJECT"] = "listAsanaTasksByProject";
45
+ ActionName["CREATETASK"] = "createTask";
46
+ ActionName["UPDATETASK"] = "updateTask";
47
+ ActionName["SEARCHTASKS"] = "searchTasks";
48
+ ActionName["GETTASKSDETAILS"] = "getTasksDetails";
49
+ ActionName["SENDDMFROMBOT"] = "sendDmFromBot";
50
+ ActionName["CREATECHANNEL"] = "createChannel";
51
+ ActionName["SENDMESSAGE"] = "sendMessage";
52
+ ActionName["GETCHANNELMESSAGES"] = "getChannelMessages";
53
+ ActionName["GETCHANNELMEMBERS"] = "getChannelMembers";
54
+ ActionName["SEARCHSLACK"] = "searchSlack";
55
+ ActionName["ADD"] = "add";
56
+ ActionName["OVERWRITEPAGE"] = "overwritePage";
57
+ ActionName["FETCHPAGECONTENT"] = "fetchPageContent";
58
+ ActionName["ASSIGNJIRATICKET"] = "assignJiraTicket";
59
+ ActionName["PUBLICCOMMENTONSERVICEDESKREQUEST"] = "publicCommentOnServiceDeskRequest";
60
+ ActionName["COMMENTJIRATICKET"] = "commentJiraTicket";
61
+ ActionName["CREATEJIRATICKET"] = "createJiraTicket";
62
+ ActionName["CREATESERVICEDESKREQUEST"] = "createServiceDeskRequest";
63
+ ActionName["GETJIRATICKETDETAILS"] = "getJiraTicketDetails";
64
+ ActionName["GETJIRATICKETHISTORY"] = "getJiraTicketHistory";
65
+ ActionName["UPDATEJIRATICKETDETAILS"] = "updateJiraTicketDetails";
66
+ ActionName["UPDATEJIRATICKETSTATUS"] = "updateJiraTicketStatus";
67
+ ActionName["GETJIRAISSUESBYQUERY"] = "getJiraIssuesByQuery";
68
+ ActionName["VALIDATEADDRESS"] = "validateAddress";
69
+ ActionName["NEARBYSEARCHRESTAURANTS"] = "nearbysearchRestaurants";
70
+ ActionName["GETTOPNSEARCHRESULTURLS"] = "getTopNSearchResultUrls";
71
+ ActionName["CREATEZENDESKTICKET"] = "createZendeskTicket";
72
+ ActionName["LISTZENDESKTICKETS"] = "listZendeskTickets";
73
+ ActionName["GETTICKETDETAILS"] = "getTicketDetails";
74
+ ActionName["UPDATETICKETSTATUS"] = "updateTicketStatus";
75
+ ActionName["ADDCOMMENTTOTICKET"] = "addCommentToTicket";
76
+ ActionName["ASSIGNTICKET"] = "assignTicket";
77
+ ActionName["SEARCHZENDESKBYQUERY"] = "searchZendeskByQuery";
78
+ ActionName["CREATESHARELINKEDINPOSTURL"] = "createShareLinkedinPostUrl";
79
+ ActionName["CREATESHAREXPOSTURL"] = "createShareXPostUrl";
80
+ ActionName["INSERTMONGODOC"] = "insertMongoDoc";
81
+ ActionName["GETROWBYFIELDVALUE"] = "getRowByFieldValue";
82
+ ActionName["RUNSNOWFLAKEQUERY"] = "runSnowflakeQuery";
83
+ ActionName["GETLATITUDELONGITUDEFROMLOCATION"] = "getLatitudeLongitudeFromLocation";
84
+ ActionName["GETFORECASTFORLOCATION"] = "getForecastForLocation";
85
+ ActionName["DEEPRESEARCH"] = "deepResearch";
86
+ ActionName["SCRAPEURL"] = "scrapeUrl";
87
+ ActionName["SEARCHANDSCRAPE"] = "searchAndScrape";
88
+ ActionName["SCRAPETWEETDATAWITHNITTER"] = "scrapeTweetDataWithNitter";
89
+ ActionName["SENDEMAIL"] = "sendEmail";
90
+ ActionName["SENDEMAILHTML"] = "sendEmailHtml";
91
+ ActionName["CREATENEWGOOGLEDOC"] = "createNewGoogleDoc";
92
+ ActionName["UPDATEDOC"] = "updateDoc";
93
+ ActionName["SCHEDULECALENDARMEETING"] = "scheduleCalendarMeeting";
94
+ ActionName["LISTCALENDARS"] = "listCalendars";
95
+ ActionName["LISTCALENDAREVENTS"] = "listCalendarEvents";
96
+ ActionName["UPDATECALENDAREVENT"] = "updateCalendarEvent";
97
+ ActionName["EDITAGOOGLECALENDAREVENT"] = "editAGoogleCalendarEvent";
98
+ ActionName["DELETECALENDAREVENT"] = "deleteCalendarEvent";
99
+ ActionName["CREATESPREADSHEET"] = "createSpreadsheet";
100
+ ActionName["UPDATESPREADSHEET"] = "updateSpreadsheet";
101
+ ActionName["APPENDROWSTOSPREADSHEET"] = "appendRowsToSpreadsheet";
102
+ ActionName["CREATEPRESENTATION"] = "createPresentation";
103
+ ActionName["UPDATEPRESENTATION"] = "updatePresentation";
104
+ ActionName["GETPRESENTATION"] = "getPresentation";
105
+ ActionName["SEARCHDRIVEBYKEYWORDS"] = "searchDriveByKeywords";
106
+ ActionName["SEARCHDRIVEBYQUERY"] = "searchDriveByQuery";
107
+ ActionName["SEARCHDRIVEBYKEYWORDSANDGETFILECONTENT"] = "searchDriveByKeywordsAndGetFileContent";
108
+ ActionName["SEARCHDRIVEBYQUERYANDGETFILECONTENT"] = "searchDriveByQueryAndGetFileContent";
109
+ ActionName["GETDRIVEFILECONTENTBYID"] = "getDriveFileContentById";
110
+ ActionName["LISTGROUPS"] = "listGroups";
111
+ ActionName["GETGROUP"] = "getGroup";
112
+ ActionName["LISTGROUPMEMBERS"] = "listGroupMembers";
113
+ ActionName["HASGROUPMEMBER"] = "hasGroupMember";
114
+ ActionName["ADDGROUPMEMBER"] = "addGroupMember";
115
+ ActionName["DELETEGROUPMEMBER"] = "deleteGroupMember";
116
+ ActionName["QUERYGOOGLEBIGQUERY"] = "queryGoogleBigQuery";
117
+ ActionName["SEARCHGMAILMESSAGES"] = "searchGmailMessages";
118
+ ActionName["LISTGMAILTHREADS"] = "listGmailThreads";
119
+ ActionName["SENDGMAIL"] = "sendGmail";
120
+ ActionName["CUSTOMSEARCH"] = "customSearch";
121
+ ActionName["GETOKTAUSERBYNAME"] = "getOktaUserByName";
122
+ ActionName["SYMBOLLOOKUP"] = "symbolLookup";
123
+ ActionName["GETBASICFINANCIALS"] = "getBasicFinancials";
124
+ ActionName["ENABLEUSERBYEMAIL"] = "enableUserByEmail";
125
+ ActionName["UPDATERECORD"] = "updateRecord";
126
+ ActionName["CREATERECORD"] = "createRecord";
127
+ ActionName["CREATECASE"] = "createCase";
128
+ ActionName["GENERATESALESREPORT"] = "generateSalesReport";
129
+ ActionName["SEARCHALLSALESFORCERECORDS"] = "searchAllSalesforceRecords";
130
+ ActionName["SEARCHSALESFORCERECORDS"] = "searchSalesforceRecords";
131
+ ActionName["GETSALESFORCERECORDSBYQUERY"] = "getSalesforceRecordsByQuery";
132
+ ActionName["GETRECORD"] = "getRecord";
133
+ ActionName["CREATEDOCUMENT"] = "createDocument";
134
+ ActionName["UPDATEDOCUMENT"] = "updateDocument";
135
+ ActionName["MESSAGETEAMSCHAT"] = "messageTeamsChat";
136
+ ActionName["MESSAGETEAMSCHANNEL"] = "messageTeamsChannel";
137
+ ActionName["GETDOCUMENT"] = "getDocument";
138
+ ActionName["CREATEORUPDATEFILE"] = "createOrUpdateFile";
139
+ ActionName["CREATEBRANCH"] = "createBranch";
140
+ ActionName["CREATEPULLREQUEST"] = "createPullRequest";
141
+ ActionName["LISTPULLREQUESTS"] = "listPullRequests";
142
+ ActionName["GETPULLREQUESTDETAILS"] = "getPullRequestDetails";
143
+ ActionName["GETFILECONTENT"] = "getFileContent";
144
+ ActionName["LISTDIRECTORY"] = "listDirectory";
145
+ ActionName["SEARCHORGANIZATION"] = "searchOrganization";
146
+ ActionName["GETBRANCH"] = "getBranch";
147
+ ActionName["LISTCOMMITS"] = "listCommits";
148
+ ActionName["SEARCHBYTITLE"] = "searchByTitle";
149
+ ActionName["SEARCHGROUP"] = "searchGroup";
150
+ ActionName["GETMERGEREQUEST"] = "getMergeRequest";
151
+ ActionName["GETISSUES"] = "getIssues";
152
+ ActionName["GETISSUEDETAILS"] = "getIssueDetails";
153
+ ActionName["GETPROJECTS"] = "getProjects";
154
+ ActionName["GETPROJECTDETAILS"] = "getProjectDetails";
155
+ ActionName["GETTEAMDETAILS"] = "getTeamDetails";
156
+ ActionName["GETTEAMS"] = "getTeams";
157
+ ActionName["GETCONTACTS"] = "getContacts";
158
+ ActionName["GETCONTACTDETAILS"] = "getContactDetails";
159
+ ActionName["GETCOMPANIES"] = "getCompanies";
160
+ ActionName["GETCOMPANYDETAILS"] = "getCompanyDetails";
161
+ ActionName["GETDEALS"] = "getDeals";
162
+ ActionName["GETDEALDETAILS"] = "getDealDetails";
163
+ ActionName["GETTICKETS"] = "getTickets";
164
+ })(ActionName || (ActionName = {}));
39
165
  export const AuthParamsSchema = z.object({
40
166
  authToken: z.string().optional(),
41
167
  baseUrl: z.string().optional(),
@@ -392,6 +518,60 @@ export const slackUserSearchSlackOutputSchema = z.object({
392
518
  })
393
519
  .describe("The current user who's running the search"),
394
520
  });
521
+ export const slackUserSearchSlackRTSParamsSchema = z.object({
522
+ query: z
523
+ .string()
524
+ .describe('The search query string (e.g., "What is project gizmo?", "mobile UX revamp"). You can use any Slack filters directly in the query string.'),
525
+ channelTypes: z
526
+ .array(z.enum(["public_channel", "private_channel", "mpim", "im"]))
527
+ .describe("Filter by channel types to search. If not specified, searches all channel types the user has access to.")
528
+ .optional(),
529
+ contentTypes: z
530
+ .array(z.enum(["messages", "files", "channels"]))
531
+ .describe("Filter by content types to include in search results.")
532
+ .default(["messages", "files", "channels"]),
533
+ includeBots: z.boolean().describe("Whether to include bot messages in search results.").default(false),
534
+ includeContextMessages: z
535
+ .boolean()
536
+ .describe("Whether to include contextual messages in search results.")
537
+ .default(false),
538
+ limit: z.number().gte(1).lte(20).describe("Maximum number of results per page (max 20).").default(20),
539
+ before: z
540
+ .string()
541
+ .describe("Optional UNIX timestamp filter. If present, filters for results before this date.")
542
+ .optional(),
543
+ after: z
544
+ .string()
545
+ .describe("Optional UNIX timestamp filter. If present, filters for results after this date.")
546
+ .optional(),
547
+ });
548
+ export const slackUserSearchSlackRTSOutputSchema = z.object({
549
+ ok: z.boolean().describe("Whether the request was successful."),
550
+ results: z
551
+ .object({
552
+ messages: z
553
+ .array(z.object({
554
+ author_user_id: z.string().describe("User ID of the message author."),
555
+ team_id: z.string().describe("Team/workspace ID where the message was posted."),
556
+ channel_id: z.string().describe("Channel ID where the message was posted."),
557
+ message_ts: z.string().describe("Message timestamp."),
558
+ content: z.string().describe("The message content/text."),
559
+ is_author_bot: z.boolean().describe("Whether the message author is a bot."),
560
+ permalink: z.string().describe("Permalink URL to the message in Slack.").optional(),
561
+ }))
562
+ .describe("Array of message results matching the search query.")
563
+ .optional(),
564
+ files: z
565
+ .array(z.object({
566
+ file_id: z.string().describe("File ID.").optional(),
567
+ title: z.string().describe("File title.").optional(),
568
+ permalink: z.string().describe("Permalink URL to the file in Slack.").optional(),
569
+ }))
570
+ .describe("Array of file results matching the search query (if files content type was requested).")
571
+ .optional(),
572
+ })
573
+ .describe("Search results containing messages and/or files."),
574
+ });
395
575
  export const mathAddParamsSchema = z.object({
396
576
  a: z.number().describe("The first number to add"),
397
577
  b: z.number().describe("The second number to add"),
@@ -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, googleOauthSearchDriveByQueryAndGetFileContentDefinition, githubGetFileContentDefinition, githubListDirectoryDefinition, } from "./autogen/templates.js";
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";
2
2
  export const ACTION_GROUPS = {
3
3
  GENERIC: {
4
4
  description: "Generic utility actions",
@@ -47,7 +47,6 @@ export const ACTION_GROUPS = {
47
47
  googleOauthUpdatePresentationDefinition,
48
48
  googleOauthSearchDriveByKeywordsDefinition,
49
49
  googleOauthSearchDriveByQueryDefinition,
50
- googleOauthSearchDriveByQueryAndGetFileContentDefinition,
51
50
  googleOauthGetDriveFileContentByIdDefinition,
52
51
  ],
53
52
  },
@@ -199,8 +198,6 @@ export const ACTION_GROUPS = {
199
198
  githubCreateBranchDefinition,
200
199
  githubCreatePullRequestDefinition,
201
200
  githubListPullRequestsDefinition,
202
- githubGetFileContentDefinition,
203
- githubListDirectoryDefinition,
204
201
  ],
205
202
  },
206
203
  ASHBY: {
@@ -178,6 +178,15 @@ function generateTypes(_a) {
178
178
  })),
179
179
  })
180
180
  .setIsExported(true);
181
+ typesFile
182
+ .addEnum({
183
+ name: "ActionName",
184
+ members: Array.from(new Set(Object.values(parsedConfig.actions).flatMap(provider => Object.keys(provider)))).map(actionName => ({
185
+ name: actionName.toUpperCase().replace(/-/g, "_"),
186
+ value: actionName,
187
+ })),
188
+ })
189
+ .setIsExported(true);
181
190
  // Add imports
182
191
  templatesFile.addImportDeclaration({
183
192
  moduleSpecifier: "../../actions/parse",
@@ -0,0 +1,3 @@
1
+ import type { credalCallCopilotFunction } from "../../autogen/types";
2
+ declare const callCopilot: credalCallCopilotFunction;
3
+ export default callCopilot;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const sdk_1 = require("@credal/sdk");
13
+ const callCopilot = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
14
+ var _b;
15
+ const requestBody = {
16
+ agentId: params.agentId,
17
+ query: params.query,
18
+ userEmail: params.userEmail,
19
+ };
20
+ const baseUrl = (_b = authParams.baseUrl) !== null && _b !== void 0 ? _b : "https://app.credal.ai/api";
21
+ const client = new sdk_1.CredalClient({ environment: baseUrl, apiKey: authParams.apiKey });
22
+ const response = yield client.copilots.sendMessage({
23
+ agentId: requestBody.agentId,
24
+ message: requestBody.query,
25
+ userEmail: requestBody.userEmail,
26
+ });
27
+ return {
28
+ response: response.sendChatResult.type === "ai_response_result"
29
+ ? response.sendChatResult.response.message
30
+ : "Error getting response",
31
+ referencedSources: response.sendChatResult.type === "ai_response_result" ? response.sendChatResult.referencedSources : [],
32
+ sourcesInDataContext: response.sendChatResult.type === "ai_response_result" ? response.sendChatResult.sourcesInDataContext : [],
33
+ webSearchResults: response.sendChatResult.type === "ai_response_result" ? response.sendChatResult.webSearchResults : [],
34
+ };
35
+ });
36
+ exports.default = callCopilot;
@@ -0,0 +1 @@
1
+ export * as add from "./add";
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.add = void 0;
37
+ exports.add = __importStar(require("./add"));
@@ -0,0 +1,3 @@
1
+ import { salesforceGetSalesforceRecordsByQueryFunction } from "../../autogen/types";
2
+ declare const getSalesforceRecordByQuery: salesforceGetSalesforceRecordsByQueryFunction;
3
+ export default getSalesforceRecordByQuery;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const axiosClient_1 = require("../../util/axiosClient");
13
+ const getSalesforceRecordByQuery = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
14
+ const { authToken, baseUrl } = authParams;
15
+ const { query, limit } = params;
16
+ if (!authToken || !baseUrl) {
17
+ return {
18
+ success: false,
19
+ error: "authToken and baseUrl are required for Salesforce API",
20
+ };
21
+ }
22
+ // The API limits the maximum number of records returned to 2000, the limit lets the user set a smaller custom limit
23
+ const url = `${baseUrl}/services/data/v56.0/query/?q=${encodeURIComponent(query + " LIMIT " + (limit != undefined && limit <= 2000 ? limit : 2000))}`;
24
+ try {
25
+ const response = yield axiosClient_1.axiosClient.get(url, {
26
+ headers: {
27
+ Authorization: `Bearer ${authToken}`,
28
+ },
29
+ });
30
+ return {
31
+ success: true,
32
+ records: response.data,
33
+ };
34
+ }
35
+ catch (error) {
36
+ console.error("Error retrieving Salesforce record:", error);
37
+ return {
38
+ success: false,
39
+ error: error instanceof Error ? error.message : "An unknown error occurred",
40
+ };
41
+ }
42
+ });
43
+ exports.default = getSalesforceRecordByQuery;
@@ -9,21 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { WebClient } from "@slack/web-api";
11
11
  import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
12
- import { getSlackChannels } from "./helpers.js";
13
12
  const archiveChannel = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
14
13
  if (!authParams.authToken) {
15
14
  throw new Error(MISSING_AUTH_TOKEN);
16
15
  }
17
16
  try {
18
17
  const client = new WebClient(authParams.authToken);
19
- const { channelName } = params;
20
- const allChannels = yield getSlackChannels(client);
21
- const channel = allChannels.find(channel => channel.name == channelName);
22
- if (!channel || !channel.id) {
23
- throw Error(`Channel with name ${channelName} not found`);
24
- }
25
- yield client.conversations.join({ channel: channel.id });
26
- const result = yield client.conversations.archive({ channel: channel.id });
18
+ const { channelId } = params;
19
+ const result = yield client.conversations.archive({ channel: channelId });
27
20
  if (!result.ok) {
28
21
  return {
29
22
  success: false,
@@ -0,0 +1 @@
1
+ export * as listConversations from "./listConversations";
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.listConversations = void 0;
37
+ exports.listConversations = __importStar(require("./listConversations"));
@@ -0,0 +1,3 @@
1
+ import type { slackListConversationsFunction } from "../../autogen/types";
2
+ declare const slackListConversations: slackListConversationsFunction;
3
+ export default slackListConversations;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const web_api_1 = require("@slack/web-api");
13
+ const helpers_1 = require("./helpers");
14
+ const slackListConversations = (_a) => __awaiter(void 0, [_a], void 0, function* ({ authParams, }) {
15
+ const client = new web_api_1.WebClient(authParams.authToken);
16
+ try {
17
+ const allChannels = yield (0, helpers_1.getSlackChannels)(client);
18
+ const filteredChannels = [];
19
+ for (const channel of allChannels) {
20
+ if (channel.name && channel.topic && channel.topic.value && channel.purpose && channel.purpose.value) {
21
+ const purpose = channel.purpose.value;
22
+ const topic = channel.topic.value;
23
+ const name = channel.name;
24
+ filteredChannels.push(Object.assign(Object.assign({}, channel), { purpose, topic, name }));
25
+ }
26
+ }
27
+ return {
28
+ channels: filteredChannels,
29
+ };
30
+ }
31
+ catch (error) {
32
+ if (error instanceof Error) {
33
+ // Enhance error with more context
34
+ throw new Error(`Failed to list Slack conversations: ${error.message}`);
35
+ }
36
+ else {
37
+ throw error;
38
+ }
39
+ }
40
+ });
41
+ exports.default = slackListConversations;
@@ -0,0 +1,3 @@
1
+ import { type slackUserSearchSlackRTSFunction } from "../../autogen/types.js";
2
+ declare const searchSlackRTS: slackUserSearchSlackRTSFunction;
3
+ export default searchSlackRTS;
@@ -0,0 +1,66 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { WebClient } from "@slack/web-api";
11
+ import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
12
+ /* ===================== MAIN EXPORT ===================== */
13
+ const searchSlackRTS = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
14
+ var _b, _c;
15
+ if (!authParams.authToken)
16
+ throw new Error(MISSING_AUTH_TOKEN);
17
+ const client = new WebClient(authParams.authToken);
18
+ const { query, channelTypes, contentTypes = ["messages", "files", "channels"], includeBots = false, limit = 20, includeContextMessages = true, before, after, } = params;
19
+ // Build the request parameters for assistant.search.context
20
+ const requestParams = {
21
+ query,
22
+ };
23
+ // Add optional parameters if provided
24
+ if (channelTypes && channelTypes.length > 0) {
25
+ requestParams.channel_types = channelTypes;
26
+ }
27
+ if (contentTypes && contentTypes.length > 0) {
28
+ requestParams.content_types = contentTypes;
29
+ }
30
+ if (includeBots !== undefined) {
31
+ requestParams.include_bots = includeBots;
32
+ }
33
+ if (limit) {
34
+ requestParams.limit = Math.min(limit, 20); // API max is 20, not handling pagination yet
35
+ }
36
+ if (includeContextMessages !== undefined) {
37
+ requestParams.include_context_messages = includeContextMessages;
38
+ }
39
+ if (before) {
40
+ requestParams.before = before;
41
+ }
42
+ if (after) {
43
+ requestParams.after = after;
44
+ }
45
+ try {
46
+ // Call the assistant.search.context API
47
+ const response = (yield client.apiCall("assistant.search.context", requestParams));
48
+ if (!response.ok) {
49
+ throw new Error(`Slack API error: ${response.error || "Unknown error"}`);
50
+ }
51
+ // Return the response in the expected format
52
+ return {
53
+ ok: response.ok,
54
+ results: {
55
+ messages: ((_b = response.results) === null || _b === void 0 ? void 0 : _b.messages) || [],
56
+ files: ((_c = response.results) === null || _c === void 0 ? void 0 : _c.files) || [],
57
+ },
58
+ };
59
+ }
60
+ catch (error) {
61
+ // Handle errors gracefully
62
+ const errorMessage = error instanceof Error ? error.message : "Unknown error occurred";
63
+ throw new Error(`Failed to search Slack using RTS API: ${errorMessage}`);
64
+ }
65
+ });
66
+ export default searchSlackRTS;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credal/actions",
3
- "version": "0.2.182",
3
+ "version": "0.2.184",
4
4
  "type": "module",
5
5
  "description": "AI Actions by Credal AI",
6
6
  "sideEffects": false,
@@ -1,3 +0,0 @@
1
- import type { githubSearchRepositoryFunction } from "../../autogen/types.js";
2
- declare const searchRepository: githubSearchRepositoryFunction;
3
- export default searchRepository;