@inkeep/agents-work-apps 0.68.3 → 0.69.0
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/github/mcp/auth.d.ts +2 -2
- package/dist/github/mcp/index.d.ts +2 -2
- 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/services/events/utils.d.ts +1 -1
- package/dist/slack/services/link-prompt.d.ts +2 -2
- package/dist/slack/services/resume-intent.js +9 -4
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as hono0 from "hono";
|
|
2
2
|
|
|
3
3
|
//#region src/github/mcp/auth.d.ts
|
|
4
|
-
declare const githubMcpAuth: () =>
|
|
4
|
+
declare const githubMcpAuth: () => 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_types3 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_types3.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_types8 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_types8.BlankEnv, hono_types8.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_types4 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_types4.BlankEnv, hono_types4.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_types6 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_types6.BlankEnv, hono_types6.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 hono2 from "hono";
|
|
2
2
|
|
|
3
3
|
//#region src/slack/mcp/auth.d.ts
|
|
4
|
-
declare const slackMcpAuth: () =>
|
|
4
|
+
declare const slackMcpAuth: () => hono2.MiddlewareHandler<{
|
|
5
5
|
Variables: {
|
|
6
6
|
toolId: string;
|
|
7
7
|
tenantId: string;
|
|
@@ -10,9 +10,9 @@ import { AgentOption } from "../modals.js";
|
|
|
10
10
|
*/
|
|
11
11
|
declare function findCachedUserMapping(tenantId: string, slackUserId: string, teamId: string, clientId?: string): Promise<{
|
|
12
12
|
slackUserId: string;
|
|
13
|
+
id: string;
|
|
13
14
|
createdAt: string;
|
|
14
15
|
updatedAt: string;
|
|
15
|
-
id: string;
|
|
16
16
|
tenantId: string;
|
|
17
17
|
clientId: string;
|
|
18
18
|
slackTeamId: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SlackLinkIntent } from "@inkeep/agents-core";
|
|
2
|
-
import * as
|
|
2
|
+
import * as slack_block_builder7 from "slack-block-builder";
|
|
3
3
|
|
|
4
4
|
//#region src/slack/services/link-prompt.d.ts
|
|
5
5
|
type LinkPromptResult = {
|
|
@@ -22,6 +22,6 @@ interface ResolveLinkActionParams {
|
|
|
22
22
|
intent?: SlackLinkIntent;
|
|
23
23
|
}
|
|
24
24
|
declare function resolveUnlinkedUserAction(params: ResolveLinkActionParams): Promise<LinkPromptResult>;
|
|
25
|
-
declare function buildLinkPromptMessage(result: LinkPromptResult): Readonly<
|
|
25
|
+
declare function buildLinkPromptMessage(result: LinkPromptResult): Readonly<slack_block_builder7.SlackMessageDto>;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { LinkPromptResult, ResolveLinkActionParams, buildLinkPromptMessage, resolveUnlinkedUserAction };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { env } from "../../env.js";
|
|
2
2
|
import { getLogger } from "../../logger.js";
|
|
3
3
|
import { findWorkspaceConnectionByTeamId } from "./nango.js";
|
|
4
|
-
import { formatChannelContext, formatSlackQuery, generateSlackConversationId, sendResponseUrlMessage } from "./events/utils.js";
|
|
4
|
+
import { formatChannelContext, formatSlackQuery, generateSlackConversationId, getThreadContext, sendResponseUrlMessage } from "./events/utils.js";
|
|
5
5
|
import { resolveEffectiveAgent } from "./agent-resolution.js";
|
|
6
6
|
import { createContextBlock } from "./blocks/index.js";
|
|
7
7
|
import { getSlackChannelInfo, getSlackClient, getSlackUserInfo } from "./client.js";
|
|
@@ -99,14 +99,16 @@ async function resumeMention(intent, slackClient, tokenCtx, teamId, tenantId) {
|
|
|
99
99
|
await postErrorToChannel(slackClient, intent.channelId, slackUserId, void 0, "We couldn't resume your question due to a technical issue. Please try mentioning @Inkeep again.");
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
|
-
const
|
|
102
|
+
const isInThread = Boolean(intent.threadTs && intent.threadTs !== intent.messageTs);
|
|
103
|
+
const [agentConfig, channelInfo, userInfo, threadContext] = await Promise.all([
|
|
103
104
|
resolveEffectiveAgent({
|
|
104
105
|
tenantId,
|
|
105
106
|
teamId,
|
|
106
107
|
channelId: intent.channelId
|
|
107
108
|
}),
|
|
108
109
|
getSlackChannelInfo(slackClient, intent.channelId),
|
|
109
|
-
getSlackUserInfo(slackClient, slackUserId)
|
|
110
|
+
getSlackUserInfo(slackClient, slackUserId),
|
|
111
|
+
isInThread && intent.threadTs ? getThreadContext(slackClient, intent.channelId, intent.threadTs) : Promise.resolve("")
|
|
110
112
|
]);
|
|
111
113
|
const channelContext = formatChannelContext(channelInfo);
|
|
112
114
|
const userName = userInfo?.displayName || "User";
|
|
@@ -114,6 +116,7 @@ async function resumeMention(intent, slackClient, tokenCtx, teamId, tenantId) {
|
|
|
114
116
|
text: intent.question,
|
|
115
117
|
channelContext,
|
|
116
118
|
userName,
|
|
119
|
+
threadContext: threadContext || void 0,
|
|
117
120
|
messageTs: intent.messageTs || replyThreadTs,
|
|
118
121
|
senderTimezone: userInfo?.tz ?? void 0
|
|
119
122
|
});
|
|
@@ -160,12 +163,14 @@ async function resumeDirectMessage(intent, slackClient, tokenCtx, teamId) {
|
|
|
160
163
|
await postErrorToChannel(slackClient, intent.channelId, slackUserId);
|
|
161
164
|
return;
|
|
162
165
|
}
|
|
163
|
-
const
|
|
166
|
+
const isInThread = Boolean(intent.threadTs && intent.threadTs !== intent.messageTs);
|
|
167
|
+
const [userInfo, threadContext] = await Promise.all([getSlackUserInfo(slackClient, slackUserId), isInThread && intent.threadTs ? getThreadContext(slackClient, intent.channelId, intent.threadTs) : Promise.resolve("")]);
|
|
164
168
|
const userName = userInfo?.displayName || "User";
|
|
165
169
|
const formattedQuestion = formatSlackQuery({
|
|
166
170
|
text: intent.question,
|
|
167
171
|
channelContext: "a Slack direct message",
|
|
168
172
|
userName,
|
|
173
|
+
threadContext: threadContext || void 0,
|
|
169
174
|
messageTs: intent.messageTs || void 0,
|
|
170
175
|
senderTimezone: userInfo?.tz ?? void 0
|
|
171
176
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-work-apps",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.69.0",
|
|
4
4
|
"description": "First party integrations for Inkeep Agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"minimatch": "^10.2.1",
|
|
36
36
|
"oxfmt": "^0.42.0",
|
|
37
37
|
"slack-block-builder": "^2.8.0",
|
|
38
|
-
"@inkeep/agents-core": "0.
|
|
38
|
+
"@inkeep/agents-core": "0.69.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@hono/zod-openapi": "^1.1.5",
|