@inkeep/agents-work-apps 0.0.0-dev-20260309145022 → 0.0.0-dev-20260309160207
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/env.d.ts +2 -2
- package/dist/github/mcp/index.d.ts +2 -2
- package/dist/github/mcp/schemas.d.ts +1 -1
- package/dist/github/routes/setup.d.ts +2 -2
- package/dist/github/routes/tokenExchange.d.ts +2 -2
- package/dist/github/routes/webhooks.d.ts +2 -2
- package/dist/slack/mcp/auth.d.ts +2 -2
- package/dist/slack/mcp/index.d.ts +2 -2
- package/dist/slack/mcp/index.js +76 -2
- package/dist/slack/mcp/utils.d.ts +7 -1
- package/dist/slack/mcp/utils.js +26 -1
- package/dist/slack/services/client.d.ts +48 -1
- package/dist/slack/services/client.js +66 -1
- package/dist/slack/services/events/utils.d.ts +1 -1
- package/dist/slack/services/index.d.ts +2 -2
- package/dist/slack/services/index.js +2 -2
- package/package.json +2 -2
package/dist/env.d.ts
CHANGED
|
@@ -14,11 +14,11 @@ declare const envSchema: z.ZodObject<{
|
|
|
14
14
|
pentest: "pentest";
|
|
15
15
|
}>>;
|
|
16
16
|
LOG_LEVEL: z.ZodDefault<z.ZodEnum<{
|
|
17
|
-
error: "error";
|
|
18
17
|
trace: "trace";
|
|
19
18
|
debug: "debug";
|
|
20
19
|
info: "info";
|
|
21
20
|
warn: "warn";
|
|
21
|
+
error: "error";
|
|
22
22
|
}>>;
|
|
23
23
|
INKEEP_AGENTS_RUN_DATABASE_URL: z.ZodOptional<z.ZodString>;
|
|
24
24
|
INKEEP_AGENTS_MANAGE_UI_URL: z.ZodOptional<z.ZodString>;
|
|
@@ -45,7 +45,7 @@ declare const envSchema: z.ZodObject<{
|
|
|
45
45
|
declare const env: {
|
|
46
46
|
NODE_ENV: "development" | "production" | "test";
|
|
47
47
|
ENVIRONMENT: "development" | "production" | "test" | "pentest";
|
|
48
|
-
LOG_LEVEL: "
|
|
48
|
+
LOG_LEVEL: "trace" | "debug" | "info" | "warn" | "error";
|
|
49
49
|
INKEEP_AGENTS_RUN_DATABASE_URL?: string | undefined;
|
|
50
50
|
INKEEP_AGENTS_MANAGE_UI_URL?: string | undefined;
|
|
51
51
|
GITHUB_APP_ID?: string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono_types6 from "hono/types";
|
|
3
3
|
|
|
4
4
|
//#region src/github/mcp/index.d.ts
|
|
5
5
|
declare const app: Hono<{
|
|
@@ -8,6 +8,6 @@ declare const app: Hono<{
|
|
|
8
8
|
tenantId: string;
|
|
9
9
|
projectId: string;
|
|
10
10
|
};
|
|
11
|
-
},
|
|
11
|
+
}, hono_types6.BlankSchema, "/">;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { app as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono_types0 from "hono/types";
|
|
3
3
|
|
|
4
4
|
//#region src/github/routes/setup.d.ts
|
|
5
|
-
declare const app: Hono<
|
|
5
|
+
declare const app: Hono<hono_types0.BlankEnv, hono_types0.BlankSchema, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono_types1 from "hono/types";
|
|
3
3
|
|
|
4
4
|
//#region src/github/routes/tokenExchange.d.ts
|
|
5
|
-
declare const app: Hono<
|
|
5
|
+
declare const app: Hono<hono_types1.BlankEnv, hono_types1.BlankSchema, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono_types3 from "hono/types";
|
|
3
3
|
|
|
4
4
|
//#region src/github/routes/webhooks.d.ts
|
|
5
5
|
interface WebhookVerificationResult {
|
|
@@ -7,6 +7,6 @@ interface WebhookVerificationResult {
|
|
|
7
7
|
error?: string;
|
|
8
8
|
}
|
|
9
9
|
declare function verifyWebhookSignature(payload: string, signature: string | undefined, secret: string): WebhookVerificationResult;
|
|
10
|
-
declare const app: Hono<
|
|
10
|
+
declare const app: Hono<hono_types3.BlankEnv, hono_types3.BlankSchema, "/">;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { WebhookVerificationResult, app as default, verifyWebhookSignature };
|
package/dist/slack/mcp/auth.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as hono0 from "hono";
|
|
2
2
|
|
|
3
3
|
//#region src/slack/mcp/auth.d.ts
|
|
4
|
-
declare const slackMcpAuth: () =>
|
|
4
|
+
declare const slackMcpAuth: () => hono0.MiddlewareHandler<{
|
|
5
5
|
Variables: {
|
|
6
6
|
toolId: string;
|
|
7
7
|
tenantId: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono_types5 from "hono/types";
|
|
3
3
|
|
|
4
4
|
//#region src/slack/mcp/index.d.ts
|
|
5
5
|
interface ChannelInfo {
|
|
@@ -18,6 +18,6 @@ declare const app: Hono<{
|
|
|
18
18
|
tenantId: string;
|
|
19
19
|
projectId: string;
|
|
20
20
|
};
|
|
21
|
-
},
|
|
21
|
+
}, hono_types5.BlankSchema, "/">;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { ChannelInfo, app as default, pruneStaleChannelIds };
|
package/dist/slack/mcp/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getLogger } from "../../logger.js";
|
|
2
2
|
import runDbClient_default from "../../db/runDbClient.js";
|
|
3
|
-
import { getBotMemberChannels, getSlackClient, openDmConversation, postMessage, postMessageInThread } from "../services/client.js";
|
|
3
|
+
import { getBotMemberChannels, getSlackClient, getSlackUserByEmail, getSlackUserInfo, getSlackUsers, openDmConversation, postMessage, postMessageInThread } from "../services/client.js";
|
|
4
4
|
import { slackMcpAuth } from "./auth.js";
|
|
5
|
-
import { resolveChannelId, resolveWorkspaceToken, validateChannelAccess } from "./utils.js";
|
|
5
|
+
import { resolveChannelId, resolveWorkspaceToken, searchUsersByName, validateChannelAccess } from "./utils.js";
|
|
6
6
|
import { z } from "@hono/zod-openapi";
|
|
7
7
|
import { getSlackMcpToolAccessConfig, updateSlackMcpToolAccessChannelIds } from "@inkeep/agents-core";
|
|
8
8
|
import { Hono } from "hono";
|
|
@@ -136,6 +136,80 @@ const getServer = async (scope) => {
|
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
138
|
});
|
|
139
|
+
server.tool("get-slack-user", "Look up a Slack user by their user ID, email address, or name. Provide exactly one parameter. User ID and email return an exact match; name returns up to 5 ranked matches. If necessary, please clarify with the user when you receive multiple results.", {
|
|
140
|
+
user_id: z.string().optional().describe("Slack user ID (e.g., U1234567890). Returns an exact match."),
|
|
141
|
+
email: z.string().optional().describe("Email address (e.g., jane@company.com). Returns an exact match."),
|
|
142
|
+
name: z.string().optional().describe("Display name, real name, or username to search for (e.g., \"Jane Smith\"). Returns up to 5 ranked matches.")
|
|
143
|
+
}, async ({ user_id, email, name }) => {
|
|
144
|
+
try {
|
|
145
|
+
const providedCount = [
|
|
146
|
+
user_id,
|
|
147
|
+
email,
|
|
148
|
+
name
|
|
149
|
+
].filter(Boolean).length;
|
|
150
|
+
if (providedCount === 0) return {
|
|
151
|
+
content: [{
|
|
152
|
+
type: "text",
|
|
153
|
+
text: "Error: Provide at least one of user_id, email, or name."
|
|
154
|
+
}],
|
|
155
|
+
isError: true
|
|
156
|
+
};
|
|
157
|
+
if (providedCount > 1) return {
|
|
158
|
+
content: [{
|
|
159
|
+
type: "text",
|
|
160
|
+
text: "Error: Provide exactly one of user_id, email, or name."
|
|
161
|
+
}],
|
|
162
|
+
isError: true
|
|
163
|
+
};
|
|
164
|
+
if (user_id) {
|
|
165
|
+
const user = await getSlackUserInfo(client, user_id);
|
|
166
|
+
if (!user) return { content: [{
|
|
167
|
+
type: "text",
|
|
168
|
+
text: `No user found with ID: ${user_id}`
|
|
169
|
+
}] };
|
|
170
|
+
return { content: [{
|
|
171
|
+
type: "text",
|
|
172
|
+
text: JSON.stringify(user)
|
|
173
|
+
}] };
|
|
174
|
+
}
|
|
175
|
+
if (email) {
|
|
176
|
+
const user = await getSlackUserByEmail(client, email);
|
|
177
|
+
if (!user) return { content: [{
|
|
178
|
+
type: "text",
|
|
179
|
+
text: `No user found with email: ${email}`
|
|
180
|
+
}] };
|
|
181
|
+
return { content: [{
|
|
182
|
+
type: "text",
|
|
183
|
+
text: JSON.stringify(user)
|
|
184
|
+
}] };
|
|
185
|
+
}
|
|
186
|
+
const scored = searchUsersByName(await getSlackUsers(client), name ?? "");
|
|
187
|
+
if (scored.length === 0) return { content: [{
|
|
188
|
+
type: "text",
|
|
189
|
+
text: `No users found matching name: "${name}"`
|
|
190
|
+
}] };
|
|
191
|
+
return { content: [{
|
|
192
|
+
type: "text",
|
|
193
|
+
text: JSON.stringify(scored)
|
|
194
|
+
}] };
|
|
195
|
+
} catch (error) {
|
|
196
|
+
const message = error instanceof Error ? error.message : "Unknown error";
|
|
197
|
+
logger.error({
|
|
198
|
+
error,
|
|
199
|
+
toolId: scope.toolId,
|
|
200
|
+
user_id,
|
|
201
|
+
email,
|
|
202
|
+
name
|
|
203
|
+
}, "Failed to look up Slack user via MCP");
|
|
204
|
+
return {
|
|
205
|
+
content: [{
|
|
206
|
+
type: "text",
|
|
207
|
+
text: `Error looking up user: ${message}`
|
|
208
|
+
}],
|
|
209
|
+
isError: true
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
});
|
|
139
213
|
return server;
|
|
140
214
|
};
|
|
141
215
|
const app = new Hono();
|
|
@@ -4,9 +4,15 @@ import { WebClient } from "@slack/web-api";
|
|
|
4
4
|
//#region src/slack/mcp/utils.d.ts
|
|
5
5
|
declare function resolveChannelId(client: WebClient, channelInput: string): Promise<string>;
|
|
6
6
|
declare function resolveWorkspaceToken(tenantId: string): Promise<string>;
|
|
7
|
+
interface UserWithNameFields {
|
|
8
|
+
realName?: string;
|
|
9
|
+
displayName?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
}
|
|
12
|
+
declare function searchUsersByName<T extends UserWithNameFields>(users: T[], query: string, maxResults?: number): T[];
|
|
7
13
|
declare function validateChannelAccess(channelId: string, config: SlackMcpToolAccessConfig): {
|
|
8
14
|
allowed: boolean;
|
|
9
15
|
reason?: string;
|
|
10
16
|
};
|
|
11
17
|
//#endregion
|
|
12
|
-
export { resolveChannelId, resolveWorkspaceToken, validateChannelAccess };
|
|
18
|
+
export { resolveChannelId, resolveWorkspaceToken, searchUsersByName, validateChannelAccess };
|
package/dist/slack/mcp/utils.js
CHANGED
|
@@ -38,6 +38,31 @@ async function resolveWorkspaceToken(tenantId) {
|
|
|
38
38
|
if (!botToken) throw new Error(`Failed to retrieve bot token for workspace ${workspace.slackTeamId}`);
|
|
39
39
|
return botToken;
|
|
40
40
|
}
|
|
41
|
+
function searchUsersByName(users, query, maxResults = 5) {
|
|
42
|
+
const needle = query.trim().toLowerCase();
|
|
43
|
+
if (!needle) return [];
|
|
44
|
+
return users.map((user) => {
|
|
45
|
+
const fields = [
|
|
46
|
+
user.realName,
|
|
47
|
+
user.displayName,
|
|
48
|
+
user.name
|
|
49
|
+
].filter(Boolean);
|
|
50
|
+
let bestScore = 0;
|
|
51
|
+
for (const field of fields) {
|
|
52
|
+
const lower = field.toLowerCase();
|
|
53
|
+
if (lower === needle) {
|
|
54
|
+
bestScore = 3;
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
if (lower.startsWith(needle)) bestScore = Math.max(bestScore, 2);
|
|
58
|
+
else if (lower.includes(needle)) bestScore = Math.max(bestScore, 1);
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
user,
|
|
62
|
+
score: bestScore
|
|
63
|
+
};
|
|
64
|
+
}).filter((entry) => entry.score > 0).sort((a, b) => b.score - a.score).slice(0, maxResults).map((entry) => entry.user);
|
|
65
|
+
}
|
|
41
66
|
function validateChannelAccess(channelId, config) {
|
|
42
67
|
if (channelId.startsWith("D")) {
|
|
43
68
|
if (!config.dmEnabled) return {
|
|
@@ -55,4 +80,4 @@ function validateChannelAccess(channelId, config) {
|
|
|
55
80
|
}
|
|
56
81
|
|
|
57
82
|
//#endregion
|
|
58
|
-
export { resolveChannelId, resolveWorkspaceToken, validateChannelAccess };
|
|
83
|
+
export { resolveChannelId, resolveWorkspaceToken, searchUsersByName, validateChannelAccess };
|
|
@@ -32,6 +32,53 @@ declare function getSlackUserInfo(client: WebClient, userId: string): Promise<{
|
|
|
32
32
|
tz: string | undefined;
|
|
33
33
|
tzOffset: number | undefined;
|
|
34
34
|
} | null>;
|
|
35
|
+
/**
|
|
36
|
+
* Look up a Slack user by email address.
|
|
37
|
+
*
|
|
38
|
+
* @param client - Authenticated Slack WebClient
|
|
39
|
+
* @param email - Email address to look up
|
|
40
|
+
* @returns User profile object, or null if not found
|
|
41
|
+
*/
|
|
42
|
+
declare function getSlackUserByEmail(client: WebClient, email: string): Promise<{
|
|
43
|
+
id: string | undefined;
|
|
44
|
+
name: string | undefined;
|
|
45
|
+
realName: string | undefined;
|
|
46
|
+
displayName: string | undefined;
|
|
47
|
+
email: string | undefined;
|
|
48
|
+
isAdmin: boolean | undefined;
|
|
49
|
+
isOwner: boolean | undefined;
|
|
50
|
+
avatar: string | undefined;
|
|
51
|
+
tz: string | undefined;
|
|
52
|
+
tzOffset: number | undefined;
|
|
53
|
+
} | null>;
|
|
54
|
+
/**
|
|
55
|
+
* List all members of a Slack workspace.
|
|
56
|
+
*
|
|
57
|
+
* Automatically paginates through results. Excludes deleted users and bots by default.
|
|
58
|
+
*
|
|
59
|
+
* @param client - Authenticated Slack WebClient
|
|
60
|
+
* @param options - Optional filters
|
|
61
|
+
* @param options.includeDeleted - Include deactivated users (default: false)
|
|
62
|
+
* @param options.includeBots - Include bot users (default: false)
|
|
63
|
+
* @param options.limit - Maximum number of users to return
|
|
64
|
+
* @returns Array of user profile objects
|
|
65
|
+
*/
|
|
66
|
+
declare function getSlackUsers(client: WebClient, options?: {
|
|
67
|
+
includeDeleted?: boolean;
|
|
68
|
+
includeBots?: boolean;
|
|
69
|
+
limit?: number;
|
|
70
|
+
}): Promise<{
|
|
71
|
+
id: string | undefined;
|
|
72
|
+
name: string | undefined;
|
|
73
|
+
realName: string | undefined;
|
|
74
|
+
displayName: string | undefined;
|
|
75
|
+
email: string | undefined;
|
|
76
|
+
isAdmin: boolean | undefined;
|
|
77
|
+
isOwner: boolean | undefined;
|
|
78
|
+
avatar: string | undefined;
|
|
79
|
+
tz: string | undefined;
|
|
80
|
+
tzOffset: number | undefined;
|
|
81
|
+
}[]>;
|
|
35
82
|
/**
|
|
36
83
|
* Fetch workspace (team) information from Slack.
|
|
37
84
|
*
|
|
@@ -162,4 +209,4 @@ declare function validateBotChannelMembership(client: WebClient, channelIds: str
|
|
|
162
209
|
*/
|
|
163
210
|
declare function revokeSlackToken(token: string): Promise<boolean>;
|
|
164
211
|
//#endregion
|
|
165
|
-
export { checkUserIsChannelMember, getBotMemberChannels, getSlackChannelInfo, getSlackChannels, getSlackClient, getSlackTeamInfo, getSlackUserInfo, openDmConversation, postMessage, postMessageInThread, revokeSlackToken, validateBotChannelMembership };
|
|
212
|
+
export { checkUserIsChannelMember, getBotMemberChannels, getSlackChannelInfo, getSlackChannels, getSlackClient, getSlackTeamInfo, getSlackUserByEmail, getSlackUserInfo, getSlackUsers, openDmConversation, postMessage, postMessageInThread, revokeSlackToken, validateBotChannelMembership };
|
|
@@ -63,6 +63,71 @@ async function getSlackUserInfo(client, userId) {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
|
+
* Look up a Slack user by email address.
|
|
67
|
+
*
|
|
68
|
+
* @param client - Authenticated Slack WebClient
|
|
69
|
+
* @param email - Email address to look up
|
|
70
|
+
* @returns User profile object, or null if not found
|
|
71
|
+
*/
|
|
72
|
+
async function getSlackUserByEmail(client, email) {
|
|
73
|
+
const result = await client.users.lookupByEmail({ email });
|
|
74
|
+
if (result.ok && result.user) return {
|
|
75
|
+
id: result.user.id,
|
|
76
|
+
name: result.user.name,
|
|
77
|
+
realName: result.user.real_name,
|
|
78
|
+
displayName: result.user.profile?.display_name,
|
|
79
|
+
email: result.user.profile?.email,
|
|
80
|
+
isAdmin: result.user.is_admin,
|
|
81
|
+
isOwner: result.user.is_owner,
|
|
82
|
+
avatar: result.user.profile?.image_72,
|
|
83
|
+
tz: result.user.tz,
|
|
84
|
+
tzOffset: result.user.tz_offset
|
|
85
|
+
};
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* List all members of a Slack workspace.
|
|
90
|
+
*
|
|
91
|
+
* Automatically paginates through results. Excludes deleted users and bots by default.
|
|
92
|
+
*
|
|
93
|
+
* @param client - Authenticated Slack WebClient
|
|
94
|
+
* @param options - Optional filters
|
|
95
|
+
* @param options.includeDeleted - Include deactivated users (default: false)
|
|
96
|
+
* @param options.includeBots - Include bot users (default: false)
|
|
97
|
+
* @param options.limit - Maximum number of users to return
|
|
98
|
+
* @returns Array of user profile objects
|
|
99
|
+
*/
|
|
100
|
+
async function getSlackUsers(client, options = {}) {
|
|
101
|
+
const { includeDeleted = false, includeBots = false, limit } = options;
|
|
102
|
+
return (await paginateSlack({
|
|
103
|
+
fetchPage: (cursor) => client.users.list({
|
|
104
|
+
limit: 200,
|
|
105
|
+
cursor
|
|
106
|
+
}),
|
|
107
|
+
extractItems: (result) => {
|
|
108
|
+
if (!result.ok) throw new Error(`Slack API error during user listing: ${result.error}`);
|
|
109
|
+
return result.members ?? [];
|
|
110
|
+
},
|
|
111
|
+
getNextCursor: (result) => result.response_metadata?.next_cursor || void 0,
|
|
112
|
+
limit
|
|
113
|
+
})).filter((user) => {
|
|
114
|
+
if (!includeDeleted && user.deleted) return false;
|
|
115
|
+
if (!includeBots && (user.is_bot || user.id === "USLACKBOT")) return false;
|
|
116
|
+
return true;
|
|
117
|
+
}).map((user) => ({
|
|
118
|
+
id: user.id,
|
|
119
|
+
name: user.name,
|
|
120
|
+
realName: user.real_name,
|
|
121
|
+
displayName: user.profile?.display_name,
|
|
122
|
+
email: user.profile?.email,
|
|
123
|
+
isAdmin: user.is_admin,
|
|
124
|
+
isOwner: user.is_owner,
|
|
125
|
+
avatar: user.profile?.image_72,
|
|
126
|
+
tz: user.tz,
|
|
127
|
+
tzOffset: user.tz_offset
|
|
128
|
+
}));
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
66
131
|
* Fetch workspace (team) information from Slack.
|
|
67
132
|
*
|
|
68
133
|
* @param client - Authenticated Slack WebClient
|
|
@@ -332,4 +397,4 @@ async function revokeSlackToken(token) {
|
|
|
332
397
|
}
|
|
333
398
|
|
|
334
399
|
//#endregion
|
|
335
|
-
export { checkUserIsChannelMember, getBotMemberChannels, getSlackChannelInfo, getSlackChannels, getSlackClient, getSlackTeamInfo, getSlackUserInfo, openDmConversation, postMessage, postMessageInThread, revokeSlackToken, validateBotChannelMembership };
|
|
400
|
+
export { checkUserIsChannelMember, getBotMemberChannels, getSlackChannelInfo, getSlackChannels, getSlackClient, getSlackTeamInfo, getSlackUserByEmail, getSlackUserInfo, getSlackUsers, openDmConversation, postMessage, postMessageInThread, revokeSlackToken, validateBotChannelMembership };
|
|
@@ -12,9 +12,9 @@ declare function findCachedUserMapping(tenantId: string, slackUserId: string, te
|
|
|
12
12
|
id: string;
|
|
13
13
|
createdAt: string;
|
|
14
14
|
updatedAt: string;
|
|
15
|
-
slackUserId: string;
|
|
16
15
|
tenantId: string;
|
|
17
16
|
clientId: string;
|
|
17
|
+
slackUserId: string;
|
|
18
18
|
slackTeamId: string;
|
|
19
19
|
slackEnterpriseId: string | null;
|
|
20
20
|
inkeepUserId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AgentResolutionParams, ResolvedAgentConfig, getAgentConfigSources, lookupAgentName, lookupProjectName, resolveEffectiveAgent } from "./agent-resolution.js";
|
|
2
2
|
import { AgentConfigSources, ContextBlockParams, ToolApprovalButtonValue, ToolApprovalButtonValueSchema, buildCitationsBlock, buildDataArtifactBlocks, buildDataComponentBlocks, buildSummaryBreadcrumbBlock, buildToolApprovalBlocks, buildToolApprovalDoneBlocks, buildToolApprovalExpiredBlocks, buildToolOutputErrorBlock, createAlreadyLinkedMessage, createContextBlock, createContextBlockFromText, createCreateInkeepAccountMessage, createErrorMessage, createNotLinkedMessage, createSmartLinkMessage, createStatusMessage, createUnlinkSuccessMessage, createUpdatedHelpMessage } from "./blocks/index.js";
|
|
3
|
-
import { checkUserIsChannelMember, getBotMemberChannels, getSlackChannelInfo, getSlackChannels, getSlackClient, getSlackTeamInfo, getSlackUserInfo, openDmConversation, postMessage, postMessageInThread, revokeSlackToken, validateBotChannelMembership } from "./client.js";
|
|
3
|
+
import { checkUserIsChannelMember, getBotMemberChannels, getSlackChannelInfo, getSlackChannels, getSlackClient, getSlackTeamInfo, getSlackUserByEmail, getSlackUserInfo, getSlackUsers, openDmConversation, postMessage, postMessageInThread, revokeSlackToken, validateBotChannelMembership } from "./client.js";
|
|
4
4
|
import { DefaultAgentConfig, SlackWorkspaceConnection, WorkspaceInstallData, clearWorkspaceConnectionCache, computeWorkspaceConnectionId, createConnectSession, deleteWorkspaceInstallation, findWorkspaceConnectionByTeamId, getConnectionAccessToken, getSlackIntegrationId, getSlackNango, getWorkspaceDefaultAgent, getWorkspaceDefaultAgentFromNango, listWorkspaceInstallations, setWorkspaceDefaultAgent, storeWorkspaceInstallation, updateConnectionMetadata } from "./nango.js";
|
|
5
5
|
import { SlackCommandPayload, SlackCommandResponse } from "./types.js";
|
|
6
6
|
import { handleAgentPickerCommand, handleCommand, handleHelpCommand, handleLinkCommand, handleQuestionCommand, handleStatusCommand, handleUnlinkCommand } from "./commands/index.js";
|
|
@@ -15,4 +15,4 @@ import { handleModalSubmission } from "./events/modal-submission.js";
|
|
|
15
15
|
import "./events/index.js";
|
|
16
16
|
import { parseSlackCommandBody, parseSlackEventBody, verifySlackRequest } from "./security.js";
|
|
17
17
|
import { getBotTokenForTeam, setBotTokenForTeam } from "./workspace-tokens.js";
|
|
18
|
-
export { AgentConfigSources, AgentOption, AgentResolutionParams, BuildAgentSelectorModalParams, BuildMessageShortcutModalParams, ContextBlockParams, DefaultAgentConfig, InlineSelectorMetadata, ModalMetadata, PublicExecutionParams, ResolvedAgentConfig, SlackCommandPayload, SlackCommandResponse, SlackErrorType, SlackWorkspaceConnection, StreamResult, ToolApprovalButtonValue, ToolApprovalButtonValueSchema, WorkspaceInstallData, buildAgentSelectorModal, buildCitationsBlock, buildDataArtifactBlocks, buildDataComponentBlocks, buildMessageShortcutModal, buildSummaryBreadcrumbBlock, buildToolApprovalBlocks, buildToolApprovalDoneBlocks, buildToolApprovalExpiredBlocks, buildToolOutputErrorBlock, checkIfBotThread, checkUserIsChannelMember, classifyError, clearWorkspaceConnectionCache, computeWorkspaceConnectionId, createAlreadyLinkedMessage, createConnectSession, createContextBlock, createContextBlockFromText, createCreateInkeepAccountMessage, createErrorMessage, createNotLinkedMessage, createSmartLinkMessage, createStatusMessage, createUnlinkSuccessMessage, createUpdatedHelpMessage, deleteWorkspaceInstallation, executeAgentPublicly, extractApiErrorMessage, fetchAgentsForProject, fetchProjectsForTenant, findCachedUserMapping, findWorkspaceConnectionByTeamId, generateSlackConversationId, getAgentConfigSources, getBotMemberChannels, getBotTokenForTeam, getChannelAgentConfig, getConnectionAccessToken, getSlackChannelInfo, getSlackChannels, getSlackClient, getSlackIntegrationId, getSlackNango, getSlackTeamInfo, getSlackUserInfo, getThreadContext, getUserFriendlyErrorMessage, getWorkspaceDefaultAgent, getWorkspaceDefaultAgentFromNango, handleAgentPickerCommand, handleAppMention, handleCommand, handleDirectMessage, handleHelpCommand, handleLinkCommand, handleMessageShortcut, handleModalSubmission, handleOpenAgentSelectorModal, handleQuestionCommand, handleStatusCommand, handleToolApproval, handleUnlinkCommand, listWorkspaceInstallations, lookupAgentName, lookupProjectName, markdownToMrkdwn, openDmConversation, parseSlackCommandBody, parseSlackEventBody, postMessage, postMessageInThread, resolveEffectiveAgent, revokeSlackToken, sendResponseUrlMessage, setBotTokenForTeam, setWorkspaceDefaultAgent, storeWorkspaceInstallation, streamAgentResponse, updateConnectionMetadata, validateBotChannelMembership, verifySlackRequest };
|
|
18
|
+
export { AgentConfigSources, AgentOption, AgentResolutionParams, BuildAgentSelectorModalParams, BuildMessageShortcutModalParams, ContextBlockParams, DefaultAgentConfig, InlineSelectorMetadata, ModalMetadata, PublicExecutionParams, ResolvedAgentConfig, SlackCommandPayload, SlackCommandResponse, SlackErrorType, SlackWorkspaceConnection, StreamResult, ToolApprovalButtonValue, ToolApprovalButtonValueSchema, WorkspaceInstallData, buildAgentSelectorModal, buildCitationsBlock, buildDataArtifactBlocks, buildDataComponentBlocks, buildMessageShortcutModal, buildSummaryBreadcrumbBlock, buildToolApprovalBlocks, buildToolApprovalDoneBlocks, buildToolApprovalExpiredBlocks, buildToolOutputErrorBlock, checkIfBotThread, checkUserIsChannelMember, classifyError, clearWorkspaceConnectionCache, computeWorkspaceConnectionId, createAlreadyLinkedMessage, createConnectSession, createContextBlock, createContextBlockFromText, createCreateInkeepAccountMessage, createErrorMessage, createNotLinkedMessage, createSmartLinkMessage, createStatusMessage, createUnlinkSuccessMessage, createUpdatedHelpMessage, deleteWorkspaceInstallation, executeAgentPublicly, extractApiErrorMessage, fetchAgentsForProject, fetchProjectsForTenant, findCachedUserMapping, findWorkspaceConnectionByTeamId, generateSlackConversationId, getAgentConfigSources, getBotMemberChannels, getBotTokenForTeam, getChannelAgentConfig, getConnectionAccessToken, getSlackChannelInfo, getSlackChannels, getSlackClient, getSlackIntegrationId, getSlackNango, getSlackTeamInfo, getSlackUserByEmail, getSlackUserInfo, getSlackUsers, getThreadContext, getUserFriendlyErrorMessage, getWorkspaceDefaultAgent, getWorkspaceDefaultAgentFromNango, handleAgentPickerCommand, handleAppMention, handleCommand, handleDirectMessage, handleHelpCommand, handleLinkCommand, handleMessageShortcut, handleModalSubmission, handleOpenAgentSelectorModal, handleQuestionCommand, handleStatusCommand, handleToolApproval, handleUnlinkCommand, listWorkspaceInstallations, lookupAgentName, lookupProjectName, markdownToMrkdwn, openDmConversation, parseSlackCommandBody, parseSlackEventBody, postMessage, postMessageInThread, resolveEffectiveAgent, revokeSlackToken, sendResponseUrlMessage, setBotTokenForTeam, setWorkspaceDefaultAgent, storeWorkspaceInstallation, streamAgentResponse, updateConnectionMetadata, validateBotChannelMembership, verifySlackRequest };
|
|
@@ -2,7 +2,7 @@ import { clearWorkspaceConnectionCache, computeWorkspaceConnectionId, createConn
|
|
|
2
2
|
import { SlackErrorType, checkIfBotThread, classifyError, extractApiErrorMessage, fetchAgentsForProject, fetchProjectsForTenant, findCachedUserMapping, generateSlackConversationId, getChannelAgentConfig, getThreadContext, getUserFriendlyErrorMessage, markdownToMrkdwn, sendResponseUrlMessage } from "./events/utils.js";
|
|
3
3
|
import { getAgentConfigSources, lookupAgentName, lookupProjectName, resolveEffectiveAgent } from "./agent-resolution.js";
|
|
4
4
|
import { ToolApprovalButtonValueSchema, buildCitationsBlock, buildDataArtifactBlocks, buildDataComponentBlocks, buildSummaryBreadcrumbBlock, buildToolApprovalBlocks, buildToolApprovalDoneBlocks, buildToolApprovalExpiredBlocks, buildToolOutputErrorBlock, createAlreadyLinkedMessage, createContextBlock, createContextBlockFromText, createCreateInkeepAccountMessage, createErrorMessage, createNotLinkedMessage, createSmartLinkMessage, createStatusMessage, createUnlinkSuccessMessage, createUpdatedHelpMessage } from "./blocks/index.js";
|
|
5
|
-
import { checkUserIsChannelMember, getBotMemberChannels, getSlackChannelInfo, getSlackChannels, getSlackClient, getSlackTeamInfo, getSlackUserInfo, openDmConversation, postMessage, postMessageInThread, revokeSlackToken, validateBotChannelMembership } from "./client.js";
|
|
5
|
+
import { checkUserIsChannelMember, getBotMemberChannels, getSlackChannelInfo, getSlackChannels, getSlackClient, getSlackTeamInfo, getSlackUserByEmail, getSlackUserInfo, getSlackUsers, openDmConversation, postMessage, postMessageInThread, revokeSlackToken, validateBotChannelMembership } from "./client.js";
|
|
6
6
|
import { streamAgentResponse } from "./events/streaming.js";
|
|
7
7
|
import { executeAgentPublicly } from "./events/execution.js";
|
|
8
8
|
import { buildAgentSelectorModal, buildMessageShortcutModal } from "./modals.js";
|
|
@@ -15,4 +15,4 @@ import "./events/index.js";
|
|
|
15
15
|
import { parseSlackCommandBody, parseSlackEventBody, verifySlackRequest } from "./security.js";
|
|
16
16
|
import { getBotTokenForTeam, setBotTokenForTeam } from "./workspace-tokens.js";
|
|
17
17
|
|
|
18
|
-
export { SlackErrorType, ToolApprovalButtonValueSchema, buildAgentSelectorModal, buildCitationsBlock, buildDataArtifactBlocks, buildDataComponentBlocks, buildMessageShortcutModal, buildSummaryBreadcrumbBlock, buildToolApprovalBlocks, buildToolApprovalDoneBlocks, buildToolApprovalExpiredBlocks, buildToolOutputErrorBlock, checkIfBotThread, checkUserIsChannelMember, classifyError, clearWorkspaceConnectionCache, computeWorkspaceConnectionId, createAlreadyLinkedMessage, createConnectSession, createContextBlock, createContextBlockFromText, createCreateInkeepAccountMessage, createErrorMessage, createNotLinkedMessage, createSmartLinkMessage, createStatusMessage, createUnlinkSuccessMessage, createUpdatedHelpMessage, deleteWorkspaceInstallation, executeAgentPublicly, extractApiErrorMessage, fetchAgentsForProject, fetchProjectsForTenant, findCachedUserMapping, findWorkspaceConnectionByTeamId, generateSlackConversationId, getAgentConfigSources, getBotMemberChannels, getBotTokenForTeam, getChannelAgentConfig, getConnectionAccessToken, getSlackChannelInfo, getSlackChannels, getSlackClient, getSlackIntegrationId, getSlackNango, getSlackTeamInfo, getSlackUserInfo, getThreadContext, getUserFriendlyErrorMessage, getWorkspaceDefaultAgent, getWorkspaceDefaultAgentFromNango, handleAgentPickerCommand, handleAppMention, handleCommand, handleDirectMessage, handleHelpCommand, handleLinkCommand, handleMessageShortcut, handleModalSubmission, handleOpenAgentSelectorModal, handleQuestionCommand, handleStatusCommand, handleToolApproval, handleUnlinkCommand, listWorkspaceInstallations, lookupAgentName, lookupProjectName, markdownToMrkdwn, openDmConversation, parseSlackCommandBody, parseSlackEventBody, postMessage, postMessageInThread, resolveEffectiveAgent, revokeSlackToken, sendResponseUrlMessage, setBotTokenForTeam, setWorkspaceDefaultAgent, storeWorkspaceInstallation, streamAgentResponse, updateConnectionMetadata, validateBotChannelMembership, verifySlackRequest };
|
|
18
|
+
export { SlackErrorType, ToolApprovalButtonValueSchema, buildAgentSelectorModal, buildCitationsBlock, buildDataArtifactBlocks, buildDataComponentBlocks, buildMessageShortcutModal, buildSummaryBreadcrumbBlock, buildToolApprovalBlocks, buildToolApprovalDoneBlocks, buildToolApprovalExpiredBlocks, buildToolOutputErrorBlock, checkIfBotThread, checkUserIsChannelMember, classifyError, clearWorkspaceConnectionCache, computeWorkspaceConnectionId, createAlreadyLinkedMessage, createConnectSession, createContextBlock, createContextBlockFromText, createCreateInkeepAccountMessage, createErrorMessage, createNotLinkedMessage, createSmartLinkMessage, createStatusMessage, createUnlinkSuccessMessage, createUpdatedHelpMessage, deleteWorkspaceInstallation, executeAgentPublicly, extractApiErrorMessage, fetchAgentsForProject, fetchProjectsForTenant, findCachedUserMapping, findWorkspaceConnectionByTeamId, generateSlackConversationId, getAgentConfigSources, getBotMemberChannels, getBotTokenForTeam, getChannelAgentConfig, getConnectionAccessToken, getSlackChannelInfo, getSlackChannels, getSlackClient, getSlackIntegrationId, getSlackNango, getSlackTeamInfo, getSlackUserByEmail, getSlackUserInfo, getSlackUsers, getThreadContext, getUserFriendlyErrorMessage, getWorkspaceDefaultAgent, getWorkspaceDefaultAgentFromNango, handleAgentPickerCommand, handleAppMention, handleCommand, handleDirectMessage, handleHelpCommand, handleLinkCommand, handleMessageShortcut, handleModalSubmission, handleOpenAgentSelectorModal, handleQuestionCommand, handleStatusCommand, handleToolApproval, handleUnlinkCommand, listWorkspaceInstallations, lookupAgentName, lookupProjectName, markdownToMrkdwn, openDmConversation, parseSlackCommandBody, parseSlackEventBody, postMessage, postMessageInThread, resolveEffectiveAgent, revokeSlackToken, sendResponseUrlMessage, setBotTokenForTeam, setWorkspaceDefaultAgent, storeWorkspaceInstallation, streamAgentResponse, updateConnectionMetadata, validateBotChannelMembership, verifySlackRequest };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-work-apps",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260309160207",
|
|
4
4
|
"description": "First party integrations for Inkeep Agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"jose": "^6.1.0",
|
|
34
34
|
"minimatch": "^10.2.1",
|
|
35
35
|
"slack-block-builder": "^2.8.0",
|
|
36
|
-
"@inkeep/agents-core": "0.0.0-dev-
|
|
36
|
+
"@inkeep/agents-core": "0.0.0-dev-20260309160207"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@hono/zod-openapi": "^1.1.5",
|