@desplega.ai/agent-swarm 1.152.0 → 1.152.2

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.
Files changed (70) hide show
  1. package/README.md +3 -0
  2. package/dist/{acp-adapter-d05sg0q4.js → acp-adapter-pfeje2v5.js} +1 -1
  3. package/dist/{actions-4sc0v342.js → actions-0sttc7f5.js} +12 -12
  4. package/dist/{app-2d0v6kt6.js → app-p8teva95.js} +3 -3
  5. package/dist/{assistant-zs6wdnrf.js → assistant-r45jnsrt.js} +15 -15
  6. package/dist/{boot-reembed-vhh33520.js → boot-reembed-1qmybsd4.js} +4 -4
  7. package/dist/{boot-reembed-3dwdnnsr.js → boot-reembed-je26h5y7.js} +3 -3
  8. package/dist/{boot-scrub-logs-e1fnabcg.js → boot-scrub-logs-gte3h1mm.js} +2 -2
  9. package/dist/{claude-adapter-h58xqzzd.js → claude-adapter-csc1mzka.js} +3 -3
  10. package/dist/{claude-sdk-session-pbaczbgt.js → claude-sdk-session-fcd6f078.js} +3 -3
  11. package/dist/{cli-zdcdh02m.js → cli-2nnd56zt.js} +1 -1
  12. package/dist/{cli-awb59f08.js → cli-3bpzj8me.js} +2 -2
  13. package/dist/{cli-f1f9n77e.js → cli-4ahpr4sw.js} +1 -1
  14. package/dist/{cli-cs9z1hw3.js → cli-56h18ng2.js} +1 -1
  15. package/dist/{cli-5bqt4gwa.js → cli-b9dd0h3k.js} +2 -2
  16. package/dist/{cli-5p007m2q.js → cli-ckz5t2hb.js} +7 -7
  17. package/dist/{cli-p2hx1pxm.js → cli-fmy65jdn.js} +3 -3
  18. package/dist/{cli-fhdssm2v.js → cli-gphgnvpf.js} +2 -2
  19. package/dist/{cli-nd5s3m4y.js → cli-gpqcs935.js} +2 -2
  20. package/dist/{cli-wp7cejrg.js → cli-jbmc0r7r.js} +1 -1
  21. package/dist/{cli-evgy5w3y.js → cli-jew3jda5.js} +1 -1
  22. package/dist/{cli-4fqn2vpg.js → cli-jvy9qgjs.js} +12 -10
  23. package/dist/{cli-t1mykkng.js → cli-qd65dvr6.js} +8 -8
  24. package/dist/{cli-cwvey7n1.js → cli-qn042eh7.js} +8 -8
  25. package/dist/{cli-t6axtdcg.js → cli-r84ctdxn.js} +1 -1
  26. package/dist/{cli-6k2athpf.js → cli-wpv5rgg2.js} +2 -2
  27. package/dist/{cli-8fy9dmpv.js → cli-xw7vak96.js} +2 -2
  28. package/dist/{cli-87hdfyde.js → cli-xy1cchaf.js} +1 -1
  29. package/dist/{cli-72vksk1n.js → cli-z3wkng35.js} +18 -18
  30. package/dist/{cli-gacq5hg8.js → cli-zvgj5zg8.js} +1 -1
  31. package/dist/{cli-jh9txj4n.js → cli-zvkq5csn.js} +1 -1
  32. package/dist/cli.js +11 -11
  33. package/dist/{codex-adapter-v3cz462q.js → codex-adapter-fxmpsabw.js} +2 -2
  34. package/dist/{codex-session-runner-de1a5g5z.js → codex-session-runner-rr1e47ea.js} +2 -2
  35. package/dist/{commands-wfqqpn95.js → commands-0f5rxz51.js} +2 -2
  36. package/dist/{db-9zzv5y05.js → db-r3jxf3wy.js} +2 -2
  37. package/dist/{dispatcher-hfm1jbgx.js → dispatcher-06vph6q4.js} +11 -11
  38. package/dist/{handlers-wrrhsack.js → handlers-0hgtc910.js} +14 -14
  39. package/dist/{hook-9skye8zd.js → hook-9kvrv1er.js} +1 -1
  40. package/dist/{hook-fgjv62k5.js → hook-fbfhkat3.js} +2 -2
  41. package/dist/{http-7grttjfq.js → http-xbyx8k5j.js} +90 -29
  42. package/dist/{index-pfhzrh1d.js → index-gpfn1741.js} +3 -3
  43. package/dist/{index-29gxx9ar.js → index-jsw3aynb.js} +11 -11
  44. package/dist/{index-30pz2h9w.js → index-rnyahfn5.js} +11 -11
  45. package/dist/{index-4ek1df87.js → index-sgk50mbg.js} +12 -12
  46. package/dist/{index-myfwqqyq.js → index-tfsdxyv6.js} +7 -7
  47. package/dist/{keepalive-j75m2m7k.js → keepalive-s3xpr7sw.js} +4 -4
  48. package/dist/{lead-a1hpjt0a.js → lead-rq4n5r16.js} +15 -15
  49. package/dist/{maintenance-tngjzqdq.js → maintenance-f0atj1ab.js} +4 -4
  50. package/dist/{oauth-refresh-sweep-em1fn044.js → oauth-refresh-sweep-q0t3bxre.js} +3 -3
  51. package/dist/{onboard-fv7ezvwx.js → onboard-br5j1kch.js} +2 -2
  52. package/dist/{otel-impl-6vbb568y.js → otel-impl-vdqge2nt.js} +1 -1
  53. package/dist/{pricing-refresh-nmm949an.js → pricing-refresh-hb3691fd.js} +4 -4
  54. package/dist/{rbac-roles-0fz5qryx.js → rbac-roles-jh280k9g.js} +3 -3
  55. package/dist/{rbac-roles-xtp05syf.js → rbac-roles-t78xt39b.js} +2 -2
  56. package/dist/{render-v2-fpb8whme.js → render-v2-7p8r2ymg.js} +3 -3
  57. package/dist/{seed-pricing-zwa8bs3t.js → seed-pricing-hf889enh.js} +3 -3
  58. package/dist/{setup-3ybwbdpd.js → setup-w6mb03jv.js} +2 -2
  59. package/dist/{work-objects-rmayxcx7.js → work-objects-nt8gy1kj.js} +14 -14
  60. package/dist/{worker-rng4jhnh.js → worker-dwy617t0.js} +15 -15
  61. package/openapi.json +2 -2
  62. package/package.json +1 -1
  63. package/src/agentmail/inbound-archive.ts +71 -0
  64. package/src/agentmail/types.ts +2 -0
  65. package/src/http/webhooks.ts +13 -5
  66. package/src/slack/assistant.ts +10 -1
  67. package/src/slack/handlers.ts +10 -1
  68. package/src/slack/thread-buffer.ts +14 -3
  69. package/src/tests/agentmail-inbound-archive.test.ts +418 -0
  70. package/src/tests/slack-assistant.test.ts +134 -0
package/README.md CHANGED
@@ -14,6 +14,7 @@ agent-swarm.dev is an open-source operating system for AI work. A lead agent del
14
14
  - A lead agent that receives work from Slack, repositories, issue trackers, email, or the API
15
15
  - [Schema-validated task results](./MCP.md#send-task) for callers that need structured JSON output
16
16
  - [Deferred tasks](./MCP.md#defer-task) that wake when all or any watched tasks reach an outcome, or a deadline arrives
17
+ - [Inline tool-result images](https://docs.agent-swarm.dev/docs/ui#tool-result-images) in task logs, with previews that open at full size
17
18
  - [Dashboard file attachments](https://docs.agent-swarm.dev/docs/ui#file-attachments) by paste, drag-and-drop, or file picker
18
19
  - Workers in isolated Docker containers with development environments
19
20
  - Memory and identity that persist across sessions
@@ -100,6 +101,8 @@ Kubernetes: [install the OCI Helm chart](./charts/agent-swarm/README.md).
100
101
 
101
102
  Slack · GitHub · GitLab · Linear · Jira · AgentMail · WhatsApp (Kapso) · Composio · Sentry · Devin · [Serply search](https://docs.agent-swarm.dev/docs/integrations/serply). [Integration guides](https://docs.agent-swarm.dev/docs/integrations).
102
103
 
104
+ AgentMail archives verified inbound deliveries before acknowledging them and retains the archive for 30 days, including mail excluded from task routing. See the [contact inbox triage runbook](runbooks/contact-inbox-triage.md) for retention, coverage limits, and rollout instructions.
105
+
103
106
  ## Learn more
104
107
 
105
108
  - [Getting started](https://docs.agent-swarm.dev/docs/getting-started) · [Architecture](https://docs.agent-swarm.dev/docs/architecture/overview) · [Playbooks](https://docs.agent-swarm.dev/docs/playbooks) · [CLI](https://docs.agent-swarm.dev/docs/reference/cli) · [API reference](https://docs.agent-swarm.dev/docs/api-reference)
@@ -29,7 +29,7 @@ import {
29
29
  import {
30
30
  init_package,
31
31
  package_default
32
- } from "./cli-jh9txj4n.js";
32
+ } from "./cli-zvkq5csn.js";
33
33
  import {
34
34
  init_secret_scrubber,
35
35
  scrubSecrets
@@ -1,26 +1,26 @@
1
1
  import {
2
2
  resolveSlackUserId
3
- } from "./cli-awb59f08.js";
3
+ } from "./cli-3bpzj8me.js";
4
4
  import {
5
5
  createTaskWithSiblingAwareness
6
- } from "./cli-72vksk1n.js";
6
+ } from "./cli-z3wkng35.js";
7
7
  import"./cli-0z2v4nhw.js";
8
8
  import"./cli-4wppfkcm.js";
9
9
  import"./cli-e7d20cty.js";
10
10
  import"./cli-re8z5p8p.js";
11
11
  import"./cli-3dpj7atn.js";
12
- import"./cli-5bqt4gwa.js";
13
- import"./cli-t6axtdcg.js";
12
+ import"./cli-b9dd0h3k.js";
13
+ import"./cli-r84ctdxn.js";
14
14
  import"./cli-zfzznn7c.js";
15
- import"./cli-p2hx1pxm.js";
15
+ import"./cli-fmy65jdn.js";
16
16
  import"./cli-epan13p1.js";
17
17
  import"./cli-y89t4nca.js";
18
18
  import"./cli-f14fvzag.js";
19
19
  import"./cli-fad8m16k.js";
20
- import"./cli-cs9z1hw3.js";
21
- import"./cli-zdcdh02m.js";
20
+ import"./cli-56h18ng2.js";
21
+ import"./cli-2nnd56zt.js";
22
22
  import"./cli-bsakbbkm.js";
23
- import"./cli-nd5s3m4y.js";
23
+ import"./cli-gpqcs935.js";
24
24
  import"./cli-51tf7ac3.js";
25
25
  import {
26
26
  buildCancelledBlocks,
@@ -29,10 +29,10 @@ import {
29
29
  getAgentEmoji,
30
30
  getTaskLink,
31
31
  isSlackRenderV2Enabled
32
- } from "./cli-cwvey7n1.js";
32
+ } from "./cli-qn042eh7.js";
33
33
  import"./cli-q51yprfq.js";
34
34
  import"./cli-yatxqynm.js";
35
- import"./cli-evgy5w3y.js";
35
+ import"./cli-jew3jda5.js";
36
36
  import"./cli-fm4ytsdk.js";
37
37
  import"./cli-aehm1rbq.js";
38
38
  import"./cli-2658f6at.js";
@@ -45,7 +45,7 @@ import {
45
45
  init_context_key,
46
46
  init_db,
47
47
  slackContextKey
48
- } from "./cli-gacq5hg8.js";
48
+ } from "./cli-zvgj5zg8.js";
49
49
  import"./cli-ht5rs63n.js";
50
50
  import"./cli-z61ykvam.js";
51
51
  import"./cli-dv6cdjs2.js";
@@ -53,7 +53,7 @@ import"./cli-c2mk1kgf.js";
53
53
  import"./cli-ej6gbxfb.js";
54
54
  import"./cli-sd0mxa3c.js";
55
55
  import"./cli-w5e1d1vv.js";
56
- import"./cli-jh9txj4n.js";
56
+ import"./cli-zvkq5csn.js";
57
57
  import"./cli-r2ap2czm.js";
58
58
  import"./cli-pzxba7gw.js";
59
59
  import"./cli-f7kvq46p.js";
@@ -3,11 +3,11 @@ import {
3
3
  initSlackApp,
4
4
  startSlackApp,
5
5
  stopSlackApp
6
- } from "./cli-cwvey7n1.js";
6
+ } from "./cli-qn042eh7.js";
7
7
  import"./cli-q51yprfq.js";
8
8
  import"./cli-yatxqynm.js";
9
9
  import"./cli-2658f6at.js";
10
- import"./cli-gacq5hg8.js";
10
+ import"./cli-zvgj5zg8.js";
11
11
  import"./cli-ht5rs63n.js";
12
12
  import"./cli-z61ykvam.js";
13
13
  import"./cli-dv6cdjs2.js";
@@ -15,7 +15,7 @@ import"./cli-c2mk1kgf.js";
15
15
  import"./cli-ej6gbxfb.js";
16
16
  import"./cli-sd0mxa3c.js";
17
17
  import"./cli-w5e1d1vv.js";
18
- import"./cli-jh9txj4n.js";
18
+ import"./cli-zvkq5csn.js";
19
19
  import"./cli-r2ap2czm.js";
20
20
  import"./cli-pzxba7gw.js";
21
21
  import"./cli-zf8jjwex.js";
@@ -2,45 +2,45 @@ import {
2
2
  bufferThreadMessage,
3
3
  getBufferMessageCount,
4
4
  wasEventSeen
5
- } from "./cli-4fqn2vpg.js";
5
+ } from "./cli-jvy9qgjs.js";
6
6
  import {
7
7
  resolveSlackUserId,
8
8
  rewriteSlackMentions
9
- } from "./cli-awb59f08.js";
9
+ } from "./cli-3bpzj8me.js";
10
10
  import {
11
11
  buildEffectiveText,
12
12
  createSlackTaskWithFiles,
13
13
  fetchSlackFiles,
14
14
  hasOtherUserMention,
15
15
  notifySlackFileFailures
16
- } from "./cli-72vksk1n.js";
16
+ } from "./cli-z3wkng35.js";
17
17
  import"./cli-0z2v4nhw.js";
18
18
  import"./cli-4wppfkcm.js";
19
19
  import"./cli-e7d20cty.js";
20
20
  import"./cli-re8z5p8p.js";
21
21
  import"./cli-3dpj7atn.js";
22
- import"./cli-5bqt4gwa.js";
23
- import"./cli-t6axtdcg.js";
22
+ import"./cli-b9dd0h3k.js";
23
+ import"./cli-r84ctdxn.js";
24
24
  import"./cli-zfzznn7c.js";
25
- import"./cli-p2hx1pxm.js";
25
+ import"./cli-fmy65jdn.js";
26
26
  import"./cli-epan13p1.js";
27
27
  import"./cli-y89t4nca.js";
28
28
  import"./cli-f14fvzag.js";
29
29
  import"./cli-fad8m16k.js";
30
- import"./cli-cs9z1hw3.js";
31
- import"./cli-zdcdh02m.js";
30
+ import"./cli-56h18ng2.js";
31
+ import"./cli-2nnd56zt.js";
32
32
  import"./cli-bsakbbkm.js";
33
- import"./cli-nd5s3m4y.js";
33
+ import"./cli-gpqcs935.js";
34
34
  import"./cli-51tf7ac3.js";
35
35
  import {
36
36
  ackSlackMessage,
37
37
  ensureSlackThreadTree,
38
38
  isSlackRenderV2Enabled,
39
39
  require_dist
40
- } from "./cli-cwvey7n1.js";
40
+ } from "./cli-qn042eh7.js";
41
41
  import"./cli-q51yprfq.js";
42
42
  import"./cli-yatxqynm.js";
43
- import"./cli-evgy5w3y.js";
43
+ import"./cli-jew3jda5.js";
44
44
  import"./cli-fm4ytsdk.js";
45
45
  import"./cli-aehm1rbq.js";
46
46
  import"./cli-2658f6at.js";
@@ -53,7 +53,7 @@ import {
53
53
  init_db,
54
54
  reactionName,
55
55
  slackContextKey
56
- } from "./cli-gacq5hg8.js";
56
+ } from "./cli-zvgj5zg8.js";
57
57
  import"./cli-ht5rs63n.js";
58
58
  import {
59
59
  init_resolver,
@@ -67,7 +67,7 @@ import {
67
67
  } from "./cli-ej6gbxfb.js";
68
68
  import"./cli-sd0mxa3c.js";
69
69
  import"./cli-w5e1d1vv.js";
70
- import"./cli-jh9txj4n.js";
70
+ import"./cli-zvkq5csn.js";
71
71
  import"./cli-r2ap2czm.js";
72
72
  import"./cli-pzxba7gw.js";
73
73
  import"./cli-f7kvq46p.js";
@@ -166,7 +166,7 @@ function createAssistant() {
166
166
  }) : undefined;
167
167
  const workingAgent = await getAgentWorkingOnThread(channelId, threadTs);
168
168
  if (workingAgent && workingAgent.status !== "offline" && isAdditiveSlack()) {
169
- bufferThreadMessage(channelId, threadTs, messageText, userId, message.ts, files);
169
+ bufferThreadMessage(channelId, threadTs, messageText, userId, message.ts, files, cachedBotUserId ?? undefined);
170
170
  const count = getBufferMessageCount(`${channelId}:${threadTs}`);
171
171
  const event = count === 1 ? "accepted" : "buffered";
172
172
  await ackSlackMessage(client, channelId, message.ts, reactionName(event), event);
@@ -176,7 +176,7 @@ function createAssistant() {
176
176
  if (files?.length)
177
177
  await safeSetStatus("Downloading attachments...");
178
178
  const inbound = __using(__stack, await fetchSlackFiles(client, files), 1);
179
- const renderedMessageText = await rewriteSlackMentions(buildEffectiveText(messageText, inbound.files, inbound.failed));
179
+ const renderedMessageText = await rewriteSlackMentions(buildEffectiveText(messageText, inbound.files, inbound.failed), cachedBotUserId ?? undefined);
180
180
  if (workingAgent && workingAgent.status !== "offline") {
181
181
  const latestTask = await getMostRecentTaskInThread(channelId, threadTs);
182
182
  const { task: task2, unattached: unattached2 } = await createSlackTaskWithFiles(renderedMessageText, {
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  embedScript,
3
3
  embeddingProvider
4
- } from "./cli-nd5s3m4y.js";
5
- import"./cli-evgy5w3y.js";
4
+ } from "./cli-gpqcs935.js";
5
+ import"./cli-jew3jda5.js";
6
6
  import"./cli-fm4ytsdk.js";
7
7
  import"./cli-aehm1rbq.js";
8
8
  import"./cli-2658f6at.js";
9
9
  import {
10
10
  getDbClient,
11
11
  init_db
12
- } from "./cli-gacq5hg8.js";
12
+ } from "./cli-zvgj5zg8.js";
13
13
  import"./cli-ht5rs63n.js";
14
14
  import"./cli-z61ykvam.js";
15
15
  import"./cli-dv6cdjs2.js";
@@ -17,7 +17,7 @@ import"./cli-c2mk1kgf.js";
17
17
  import"./cli-ej6gbxfb.js";
18
18
  import"./cli-sd0mxa3c.js";
19
19
  import"./cli-w5e1d1vv.js";
20
- import"./cli-jh9txj4n.js";
20
+ import"./cli-zvkq5csn.js";
21
21
  import"./cli-r2ap2czm.js";
22
22
  import"./cli-zf8jjwex.js";
23
23
  import"./cli-bc05qbss.js";
@@ -3,14 +3,14 @@ import {
3
3
  getEmbeddingProvider,
4
4
  getMemoryStore,
5
5
  init_constants
6
- } from "./cli-evgy5w3y.js";
6
+ } from "./cli-jew3jda5.js";
7
7
  import"./cli-fm4ytsdk.js";
8
8
  import"./cli-aehm1rbq.js";
9
9
  import"./cli-2658f6at.js";
10
10
  import {
11
11
  getDbClient,
12
12
  init_db
13
- } from "./cli-gacq5hg8.js";
13
+ } from "./cli-zvgj5zg8.js";
14
14
  import"./cli-ht5rs63n.js";
15
15
  import"./cli-z61ykvam.js";
16
16
  import"./cli-dv6cdjs2.js";
@@ -18,7 +18,7 @@ import"./cli-c2mk1kgf.js";
18
18
  import"./cli-ej6gbxfb.js";
19
19
  import"./cli-sd0mxa3c.js";
20
20
  import"./cli-w5e1d1vv.js";
21
- import"./cli-jh9txj4n.js";
21
+ import"./cli-zvkq5csn.js";
22
22
  import"./cli-r2ap2czm.js";
23
23
  import"./cli-zf8jjwex.js";
24
24
  import"./cli-bc05qbss.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getDbClient,
3
3
  init_db
4
- } from "./cli-gacq5hg8.js";
4
+ } from "./cli-zvgj5zg8.js";
5
5
  import"./cli-ht5rs63n.js";
6
6
  import"./cli-z61ykvam.js";
7
7
  import"./cli-dv6cdjs2.js";
@@ -9,7 +9,7 @@ import"./cli-c2mk1kgf.js";
9
9
  import"./cli-ej6gbxfb.js";
10
10
  import"./cli-sd0mxa3c.js";
11
11
  import"./cli-w5e1d1vv.js";
12
- import"./cli-jh9txj4n.js";
12
+ import"./cli-zvkq5csn.js";
13
13
  import {
14
14
  init_secret_scrubber,
15
15
  scrubSecrets
@@ -17,8 +17,8 @@ import {
17
17
  resolveClaudeBridgeEnabled,
18
18
  resolveClaudeQueueSteeringOverride,
19
19
  runClaudeSessionSummary
20
- } from "./cli-8fy9dmpv.js";
21
- import"./cli-f1f9n77e.js";
20
+ } from "./cli-xw7vak96.js";
21
+ import"./cli-4ahpr4sw.js";
22
22
  import"./cli-wbyk465z.js";
23
23
  import"./cli-tng3131n.js";
24
24
  import"./cli-b5b30yzk.js";
@@ -44,7 +44,7 @@ import"./cli-c2mk1kgf.js";
44
44
  import"./cli-ej6gbxfb.js";
45
45
  import"./cli-sd0mxa3c.js";
46
46
  import"./cli-w5e1d1vv.js";
47
- import"./cli-jh9txj4n.js";
47
+ import"./cli-zvkq5csn.js";
48
48
  import"./cli-r2ap2czm.js";
49
49
  import"./cli-knd276ed.js";
50
50
  import"./cli-c4eeb5q2.js";
@@ -3,8 +3,8 @@ import {
3
3
  cleanupTaskFile,
4
4
  normalizeClaudeMessage,
5
5
  runClaudeSessionSummary
6
- } from "./cli-8fy9dmpv.js";
7
- import"./cli-f1f9n77e.js";
6
+ } from "./cli-xw7vak96.js";
7
+ import"./cli-4ahpr4sw.js";
8
8
  import"./cli-wbyk465z.js";
9
9
  import"./cli-tng3131n.js";
10
10
  import {
@@ -41,7 +41,7 @@ import"./cli-c2mk1kgf.js";
41
41
  import"./cli-ej6gbxfb.js";
42
42
  import"./cli-sd0mxa3c.js";
43
43
  import"./cli-w5e1d1vv.js";
44
- import"./cli-jh9txj4n.js";
44
+ import"./cli-zvkq5csn.js";
45
45
  import {
46
46
  init_secret_scrubber,
47
47
  scrubSecrets
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getDb,
3
3
  init_db
4
- } from "./cli-gacq5hg8.js";
4
+ } from "./cli-zvgj5zg8.js";
5
5
 
6
6
  // src/be/seed-pricing.ts
7
7
  init_db();
@@ -4,12 +4,12 @@ import {
4
4
  linkIdentity,
5
5
  recordUnmappedIdentity,
6
6
  resolveIdentity
7
- } from "./cli-72vksk1n.js";
7
+ } from "./cli-z3wkng35.js";
8
8
  import {
9
9
  getKv,
10
10
  init_db,
11
11
  upsertKv
12
- } from "./cli-gacq5hg8.js";
12
+ } from "./cli-zvgj5zg8.js";
13
13
 
14
14
  // src/slack/enrich.ts
15
15
  init_db();
@@ -35,7 +35,7 @@ import {
35
35
  import {
36
36
  init_package,
37
37
  package_default
38
- } from "./cli-jh9txj4n.js";
38
+ } from "./cli-zvkq5csn.js";
39
39
  import {
40
40
  init_secret_scrubber,
41
41
  scrubSecrets
@@ -7,7 +7,7 @@ import {
7
7
  init_date_utils,
8
8
  init_db,
9
9
  normalizeDateRequired
10
- } from "./cli-gacq5hg8.js";
10
+ } from "./cli-zvgj5zg8.js";
11
11
  import {
12
12
  init_secret_scrubber,
13
13
  registerVolatileSecret,
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  buildModelsDevSeedRows,
3
3
  loadModelsDevCache
4
- } from "./cli-zdcdh02m.js";
4
+ } from "./cli-2nnd56zt.js";
5
5
  import {
6
6
  createLogEntry,
7
7
  getActivePricingRow,
8
8
  getDbClient,
9
9
  init_db,
10
10
  insertPricingRow
11
- } from "./cli-gacq5hg8.js";
11
+ } from "./cli-zvgj5zg8.js";
12
12
  import {
13
13
  init_secret_scrubber,
14
14
  scrubSecrets
@@ -5,12 +5,12 @@ import {
5
5
  instantFlush,
6
6
  requestSlackThreadSteering,
7
7
  wasEventSeen
8
- } from "./cli-4fqn2vpg.js";
8
+ } from "./cli-jvy9qgjs.js";
9
9
  import {
10
10
  enrichSlackUserEmail,
11
11
  resolveSlackUserId,
12
12
  rewriteSlackMentions
13
- } from "./cli-awb59f08.js";
13
+ } from "./cli-3bpzj8me.js";
14
14
  import {
15
15
  TaskCreationBlockedError,
16
16
  broadcastMatches,
@@ -23,14 +23,14 @@ import {
23
23
  hasOtherUserMention,
24
24
  notifySlackFileFailures,
25
25
  routeMessage
26
- } from "./cli-72vksk1n.js";
26
+ } from "./cli-z3wkng35.js";
27
27
  import {
28
28
  ackSlackMessage,
29
29
  buildTreeBlocks,
30
30
  ensureSlackThreadTree,
31
31
  isSlackRenderV2Enabled,
32
32
  registerTreeMessage
33
- } from "./cli-cwvey7n1.js";
33
+ } from "./cli-qn042eh7.js";
34
34
  import {
35
35
  getAgentById,
36
36
  getAgentWorkingOnThread,
@@ -42,7 +42,7 @@ import {
42
42
  init_db,
43
43
  reactionName,
44
44
  slackContextKey
45
- } from "./cli-gacq5hg8.js";
45
+ } from "./cli-zvgj5zg8.js";
46
46
  import {
47
47
  init_resolver,
48
48
  resolveTemplate
@@ -322,7 +322,7 @@ function registerMessageHandler(app) {
322
322
  const threadKey = `${msg.channel}:${msg.thread_ts}`;
323
323
  console.log(`[Slack] !now command detected in thread ${threadKey}${nowMessage ? ` with message: "${nowMessage}"` : ""}`);
324
324
  if (nowMessage || msg.files?.length) {
325
- bufferThreadMessage(msg.channel, msg.thread_ts, nowMessage, msg.user, msg.ts, msg.files);
325
+ bufferThreadMessage(msg.channel, msg.thread_ts, nowMessage, msg.user, msg.ts, msg.files, botUserId);
326
326
  }
327
327
  await instantFlush(threadKey);
328
328
  await ackSlackMessage(client, msg.channel, msg.ts, reactionName("now"), "now");
@@ -337,7 +337,7 @@ function registerMessageHandler(app) {
337
337
  const hasSwarmActivity = await hasSwarmThreadActivity(client, msg.channel, msg.thread_ts);
338
338
  if (hasSwarmActivity) {
339
339
  const threadKey = `${msg.channel}:${msg.thread_ts}`;
340
- bufferThreadMessage(msg.channel, msg.thread_ts, msg.text ?? "", msg.user, msg.ts, msg.files);
340
+ bufferThreadMessage(msg.channel, msg.thread_ts, msg.text ?? "", msg.user, msg.ts, msg.files, botUserId);
341
341
  const count = getBufferMessageCount(threadKey);
342
342
  const event2 = count === 1 ? "accepted" : "buffered";
343
343
  const name = reactionName(event2);
@@ -20,10 +20,10 @@ import {
20
20
  oauthAppRowToProviderConfig,
21
21
  updateAuthorizationTokens,
22
22
  upsertAuthorization
23
- } from "./cli-cs9z1hw3.js";
23
+ } from "./cli-56h18ng2.js";
24
24
  import {
25
25
  embedScript
26
- } from "./cli-nd5s3m4y.js";
26
+ } from "./cli-gpqcs935.js";
27
27
  import {
28
28
  CredentialBroker,
29
29
  DEFAULT_CREDENTIAL_BINDINGS,
@@ -45,7 +45,7 @@ import {
45
45
  normalizeDateRequired,
46
46
  placeholderForConfigKey,
47
47
  upsertSwarmConfig
48
- } from "./cli-gacq5hg8.js";
48
+ } from "./cli-zvgj5zg8.js";
49
49
  import {
50
50
  init_env_flag,
51
51
  isEnvFlagEnabled
@@ -15,7 +15,7 @@ import {
15
15
  recoverIncompleteRuns,
16
16
  repointTrackerSyncBySwarmId,
17
17
  resolveLeadOnlyRecoveryAssignment
18
- } from "./cli-72vksk1n.js";
18
+ } from "./cli-z3wkng35.js";
19
19
  import {
20
20
  isMultiRuntimeEnabled
21
21
  } from "./cli-re8z5p8p.js";
@@ -61,7 +61,7 @@ import {
61
61
  releaseStaleReviewingTasks,
62
62
  supersedeTask,
63
63
  updateAgentStatus
64
- } from "./cli-gacq5hg8.js";
64
+ } from "./cli-zvgj5zg8.js";
65
65
  import {
66
66
  init_registry,
67
67
  init_resolver,
@@ -4,11 +4,11 @@ import {
4
4
  getEmbeddingProvider,
5
5
  init_embedding,
6
6
  serializeEmbedding
7
- } from "./cli-evgy5w3y.js";
7
+ } from "./cli-jew3jda5.js";
8
8
  import {
9
9
  getDbClient,
10
10
  init_db
11
- } from "./cli-gacq5hg8.js";
11
+ } from "./cli-zvgj5zg8.js";
12
12
  import {
13
13
  init_secret_scrubber,
14
14
  scrubSecrets
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  init_package,
3
3
  package_default
4
- } from "./cli-jh9txj4n.js";
4
+ } from "./cli-zvkq5csn.js";
5
5
 
6
6
  // src/commands/shared/client-config.ts
7
7
  init_package();
@@ -11,7 +11,7 @@ import {
11
11
  getDbClient,
12
12
  init_db,
13
13
  isSqliteVecAvailable
14
- } from "./cli-gacq5hg8.js";
14
+ } from "./cli-zvgj5zg8.js";
15
15
  import {
16
16
  __esm,
17
17
  __export,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  rewriteSlackMentions
3
- } from "./cli-awb59f08.js";
3
+ } from "./cli-3bpzj8me.js";
4
4
  import {
5
5
  bufferedFileFailures,
6
6
  buildEffectiveText,
@@ -9,7 +9,7 @@ import {
9
9
  extractSlackMessageText,
10
10
  fetchSlackFiles,
11
11
  notifySlackFileFailures
12
- } from "./cli-72vksk1n.js";
12
+ } from "./cli-z3wkng35.js";
13
13
  import {
14
14
  buildBufferFlushBlocks,
15
15
  ensureSlackThreadTree,
@@ -18,7 +18,7 @@ import {
18
18
  getSlackApp,
19
19
  isSlackRenderV2Enabled,
20
20
  registerTreeMessage
21
- } from "./cli-cwvey7n1.js";
21
+ } from "./cli-qn042eh7.js";
22
22
  import {
23
23
  createLogEntry,
24
24
  getAgentById,
@@ -31,7 +31,7 @@ import {
31
31
  init_steering,
32
32
  requestSteering,
33
33
  slackContextKey
34
- } from "./cli-gacq5hg8.js";
34
+ } from "./cli-zvgj5zg8.js";
35
35
  import {
36
36
  init_steering_enabled,
37
37
  isSteeringEnabled
@@ -154,14 +154,15 @@ var slackBuffer = createAdditiveBuffer({
154
154
  await slackFlush(items, key, reason === "manual");
155
155
  }
156
156
  });
157
- function bufferThreadMessage(channelId, threadTs, text, userId, ts, files) {
157
+ function bufferThreadMessage(channelId, threadTs, text, userId, ts, files, botUserId) {
158
158
  slackBuffer.enqueue(makeKey(channelId, threadTs), {
159
159
  text,
160
160
  userId,
161
161
  ts,
162
162
  channelId,
163
163
  threadTs,
164
- files
164
+ files,
165
+ botUserId
165
166
  });
166
167
  }
167
168
  function getBufferMessageCount(key) {
@@ -170,7 +171,7 @@ function getBufferMessageCount(key) {
170
171
  async function instantFlush(key) {
171
172
  await slackBuffer.instantFlush(key);
172
173
  }
173
- async function getThreadContextForBuffer(channelId, threadTs) {
174
+ async function getThreadContextForBuffer(channelId, threadTs, botUserId) {
174
175
  const app = getSlackApp();
175
176
  if (!app)
176
177
  return "";
@@ -194,7 +195,7 @@ async function getThreadContextForBuffer(channelId, threadTs) {
194
195
  return `<@${m.user}>: ${text}`;
195
196
  }).join(`
196
197
  `);
197
- return await rewriteSlackMentions(formatted);
198
+ return await rewriteSlackMentions(formatted, botUserId);
198
199
  } catch (error) {
199
200
  console.error("[Slack] Failed to fetch thread context for buffer:", error);
200
201
  return "";
@@ -212,6 +213,7 @@ async function slackFlush(items, key, immediate) {
212
213
  }
213
214
  const { channelId, threadTs } = split;
214
215
  const originalRequesterId = items[0].userId;
216
+ const botUserId = items.find((item) => item.botUserId)?.botUserId;
215
217
  console.log(`[Slack] Flushing buffer: ${key} (${items.length} messages, immediate=${immediate})`);
216
218
  const app = getSlackApp();
217
219
  const files = items.flatMap((item) => item.files ?? []);
@@ -224,7 +226,7 @@ async function slackFlush(items, key, immediate) {
224
226
  const resolvedFiles = new Map(inbound.files.map((file) => [file.id, file]));
225
227
  const combinedText = await rewriteSlackMentions(items.map((item) => buildEffectiveText(item.text, item.files?.map((file) => resolvedFiles.get(file.id) ?? file), inbound.failed)).join(`
226
228
  ---
227
- `));
229
+ `), botUserId);
228
230
  const description = `[Thread follow-up — ${items.length} message(s) buffered]
229
231
 
230
232
  ${combinedText}`;
@@ -260,7 +262,7 @@ ${combinedText}`;
260
262
  return;
261
263
  }
262
264
  const lead = await getLeadAgent();
263
- const threadContext = await getThreadContextForBuffer(channelId, threadTs);
265
+ const threadContext = await getThreadContextForBuffer(channelId, threadTs, botUserId);
264
266
  const fullDescription = threadContext ? `<thread_context>
265
267
  ${threadContext}
266
268
  </thread_context>