@inkeep/agents-work-apps 0.0.0-dev-20260223221253 → 0.0.0-dev-20260224024810

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.
@@ -1,7 +1,7 @@
1
- import * as hono1 from "hono";
1
+ import * as hono0 from "hono";
2
2
 
3
3
  //#region src/github/mcp/auth.d.ts
4
- declare const githubMcpAuth: () => hono1.MiddlewareHandler<{
4
+ declare const githubMcpAuth: () => hono0.MiddlewareHandler<{
5
5
  Variables: {
6
6
  toolId: string;
7
7
  };
@@ -1,11 +1,11 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types7 from "hono/types";
2
+ import * as hono_types9 from "hono/types";
3
3
 
4
4
  //#region src/github/mcp/index.d.ts
5
5
  declare const app: Hono<{
6
6
  Variables: {
7
7
  toolId: string;
8
8
  };
9
- }, hono_types7.BlankSchema, "/">;
9
+ }, hono_types9.BlankSchema, "/">;
10
10
  //#endregion
11
11
  export { app as default };
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types8 from "hono/types";
2
+ import * as hono_types3 from "hono/types";
3
3
 
4
4
  //#region src/github/routes/setup.d.ts
5
- declare const app: Hono<hono_types8.BlankEnv, hono_types8.BlankSchema, "/">;
5
+ declare const app: Hono<hono_types3.BlankEnv, hono_types3.BlankSchema, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types3 from "hono/types";
2
+ import * as hono_types7 from "hono/types";
3
3
 
4
4
  //#region src/github/routes/tokenExchange.d.ts
5
- declare const app: Hono<hono_types3.BlankEnv, hono_types3.BlankSchema, "/">;
5
+ declare const app: Hono<hono_types7.BlankEnv, hono_types7.BlankSchema, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -193,6 +193,7 @@ async function streamAgentResponse(params) {
193
193
  });
194
194
  const pendingApprovalMessages = [];
195
195
  const toolCallIdToName = /* @__PURE__ */ new Map();
196
+ const toolCallIdToInput = /* @__PURE__ */ new Map();
196
197
  const toolErrors = [];
197
198
  const citations = [];
198
199
  const summaryLabels = [];
@@ -221,9 +222,9 @@ async function streamAgentResponse(params) {
221
222
  continue;
222
223
  }
223
224
  if (data.type === "tool-approval-request" && conversationId) {
224
- const toolName = data.toolName || "Tool";
225
225
  const toolCallId = data.toolCallId;
226
- const input = data.input;
226
+ const toolName = toolCallIdToName.get(toolCallId) || "Tool";
227
+ const input = toolCallIdToInput.get(toolCallId);
227
228
  const buttonValue = {
228
229
  toolCallId,
229
230
  conversationId,
@@ -260,6 +261,7 @@ async function streamAgentResponse(params) {
260
261
  }
261
262
  if (data.type === "tool-input-available" && data.toolCallId && data.toolName) {
262
263
  toolCallIdToName.set(String(data.toolCallId), String(data.toolName));
264
+ if (data.input && typeof data.input === "object") toolCallIdToInput.set(String(data.toolCallId), data.input);
263
265
  continue;
264
266
  }
265
267
  if (data.type === "tool-output-denied" && data.toolCallId) {
@@ -383,6 +385,10 @@ async function streamAgentResponse(params) {
383
385
  const stopBlocks = [];
384
386
  for (const { toolName, errorText } of toolErrors) stopBlocks.push(buildToolOutputErrorBlock(toolName, errorText));
385
387
  if (summaryLabels.length > 0) stopBlocks.push(buildSummaryBreadcrumbBlock(summaryLabels));
388
+ if (citations.length > 0) {
389
+ const citationBlocks = buildCitationsBlock(citations);
390
+ stopBlocks.push(...citationBlocks);
391
+ }
386
392
  stopBlocks.push(createContextBlock({ agentName }));
387
393
  try {
388
394
  await withTimeout(streamer.stop({ blocks: stopBlocks.slice(0, 50) }), CHATSTREAM_OP_TIMEOUT_MS, "streamer.stop");
@@ -395,15 +401,6 @@ async function streamAgentResponse(params) {
395
401
  responseLength: fullText.length
396
402
  }, "Failed to finalize chatStream — content was already delivered");
397
403
  }
398
- if (citations.length > 0) {
399
- const citationBlocks = buildCitationsBlock(citations);
400
- if (citationBlocks.length > 0) await slackClient.chat.postMessage({
401
- channel,
402
- thread_ts: threadTs,
403
- text: "📚 Sources",
404
- blocks: citationBlocks
405
- }).catch((e) => logger.warn({ error: e }, "Failed to post citations"));
406
- }
407
404
  if (thinkingMessageTs) try {
408
405
  await slackClient.chat.delete({
409
406
  channel,
@@ -8,12 +8,12 @@ import { AgentOption } from "../modals.js";
8
8
  * Called on every @mention and /inkeep command — caching avoids redundant DB queries.
9
9
  */
10
10
  declare function findCachedUserMapping(tenantId: string, slackUserId: string, teamId: string, clientId?: string): Promise<{
11
- slackUserId: string;
11
+ id: string;
12
12
  createdAt: string;
13
13
  updatedAt: string;
14
- id: string;
15
14
  tenantId: string;
16
15
  clientId: string;
16
+ slackUserId: string;
17
17
  slackTeamId: string;
18
18
  slackEnterpriseId: string | null;
19
19
  inkeepUserId: string;
@@ -29,7 +29,7 @@ function buildAgentSelectorModal(params) {
29
29
  const agentOptions = agents.length > 0 ? agents.map((agent) => ({
30
30
  text: {
31
31
  type: "plain_text",
32
- text: agent.name || agent.id,
32
+ text: agent.name ? `${agent.name} (${agent.id})` : agent.id,
33
33
  emoji: true
34
34
  },
35
35
  value: JSON.stringify({
@@ -234,7 +234,7 @@ function buildMessageShortcutModal(params) {
234
234
  const agentOptions = agents.length > 0 ? agents.map((agent) => ({
235
235
  text: {
236
236
  type: "plain_text",
237
- text: agent.name || agent.id,
237
+ text: agent.name ? `${agent.name} (${agent.id})` : agent.id,
238
238
  emoji: true
239
239
  },
240
240
  value: JSON.stringify({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-work-apps",
3
- "version": "0.0.0-dev-20260223221253",
3
+ "version": "0.0.0-dev-20260224024810",
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.1.1",
35
35
  "slack-block-builder": "^2.8.0",
36
- "@inkeep/agents-core": "0.0.0-dev-20260223221253"
36
+ "@inkeep/agents-core": "0.0.0-dev-20260224024810"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@hono/zod-openapi": "^1.1.5",