@desplega.ai/agent-swarm 1.152.1 → 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.
- package/README.md +1 -0
- package/dist/{acp-adapter-4s7q25ft.js → acp-adapter-pfeje2v5.js} +1 -1
- package/dist/{actions-cs6rhmvc.js → actions-0sttc7f5.js} +12 -12
- package/dist/{app-j54aq0dj.js → app-p8teva95.js} +3 -3
- package/dist/{assistant-w1pgn7vf.js → assistant-r45jnsrt.js} +15 -15
- package/dist/{boot-reembed-42vgkrrj.js → boot-reembed-1qmybsd4.js} +4 -4
- package/dist/{boot-reembed-smy30z32.js → boot-reembed-je26h5y7.js} +3 -3
- package/dist/{boot-scrub-logs-b6s72fsw.js → boot-scrub-logs-gte3h1mm.js} +2 -2
- package/dist/{claude-adapter-fh7rmcj9.js → claude-adapter-csc1mzka.js} +3 -3
- package/dist/{claude-sdk-session-xhynatn9.js → claude-sdk-session-fcd6f078.js} +3 -3
- package/dist/{cli-7bwaerjt.js → cli-2nnd56zt.js} +1 -1
- package/dist/{cli-b4dyetqt.js → cli-3bpzj8me.js} +2 -2
- package/dist/{cli-sqmh7jj1.js → cli-4ahpr4sw.js} +1 -1
- package/dist/{cli-vbk025fm.js → cli-56h18ng2.js} +1 -1
- package/dist/{cli-kf8qp2vf.js → cli-b9dd0h3k.js} +2 -2
- package/dist/{cli-ng4q6a9t.js → cli-ckz5t2hb.js} +7 -7
- package/dist/{cli-dsyg66vt.js → cli-fmy65jdn.js} +3 -3
- package/dist/{cli-y8tayczk.js → cli-gphgnvpf.js} +2 -2
- package/dist/{cli-gxf2ebyz.js → cli-gpqcs935.js} +2 -2
- package/dist/{cli-3g61md6v.js → cli-jbmc0r7r.js} +1 -1
- package/dist/{cli-jtvs5m8q.js → cli-jew3jda5.js} +1 -1
- package/dist/{cli-3pft2z6r.js → cli-jvy9qgjs.js} +12 -10
- package/dist/{cli-ftdjz1mk.js → cli-qd65dvr6.js} +8 -8
- package/dist/{cli-wfve107r.js → cli-qn042eh7.js} +8 -8
- package/dist/{cli-jytf5mw9.js → cli-r84ctdxn.js} +1 -1
- package/dist/{cli-ks8a1cgq.js → cli-wpv5rgg2.js} +2 -2
- package/dist/{cli-sakxd2rg.js → cli-xw7vak96.js} +2 -2
- package/dist/{cli-v9sk4dzw.js → cli-xy1cchaf.js} +1 -1
- package/dist/{cli-72tgtzr1.js → cli-z3wkng35.js} +18 -18
- package/dist/{cli-bdt7w021.js → cli-zvgj5zg8.js} +1 -1
- package/dist/{cli-gfez0qmk.js → cli-zvkq5csn.js} +1 -1
- package/dist/cli.js +11 -11
- package/dist/{codex-adapter-k6yq95sn.js → codex-adapter-fxmpsabw.js} +2 -2
- package/dist/{codex-session-runner-3rp84pk8.js → codex-session-runner-rr1e47ea.js} +2 -2
- package/dist/{commands-pbr5jzy5.js → commands-0f5rxz51.js} +2 -2
- package/dist/{db-z0xaa59a.js → db-r3jxf3wy.js} +2 -2
- package/dist/{dispatcher-pwpgsj0x.js → dispatcher-06vph6q4.js} +11 -11
- package/dist/{handlers-5mzk4mbg.js → handlers-0hgtc910.js} +14 -14
- package/dist/{hook-8bz33zee.js → hook-9kvrv1er.js} +1 -1
- package/dist/{hook-kbh84zb1.js → hook-fbfhkat3.js} +2 -2
- package/dist/{http-pppxg5vr.js → http-xbyx8k5j.js} +27 -27
- package/dist/{index-y0te09pn.js → index-gpfn1741.js} +3 -3
- package/dist/{index-z0zwjtkn.js → index-jsw3aynb.js} +11 -11
- package/dist/{index-68bd9b5f.js → index-rnyahfn5.js} +11 -11
- package/dist/{index-mjpxsr6k.js → index-sgk50mbg.js} +12 -12
- package/dist/{index-k1hq1qt6.js → index-tfsdxyv6.js} +7 -7
- package/dist/{keepalive-xvmwnh1d.js → keepalive-s3xpr7sw.js} +4 -4
- package/dist/{lead-pf8nvxt8.js → lead-rq4n5r16.js} +15 -15
- package/dist/{maintenance-jk4q0wgg.js → maintenance-f0atj1ab.js} +4 -4
- package/dist/{oauth-refresh-sweep-6207x9sj.js → oauth-refresh-sweep-q0t3bxre.js} +3 -3
- package/dist/{onboard-b0csgm0q.js → onboard-br5j1kch.js} +2 -2
- package/dist/{otel-impl-b6rfehth.js → otel-impl-vdqge2nt.js} +1 -1
- package/dist/{pricing-refresh-4e201wtd.js → pricing-refresh-hb3691fd.js} +4 -4
- package/dist/{rbac-roles-mkc5n5qa.js → rbac-roles-jh280k9g.js} +3 -3
- package/dist/{rbac-roles-zp6e4geh.js → rbac-roles-t78xt39b.js} +2 -2
- package/dist/{render-v2-4fazz9tf.js → render-v2-7p8r2ymg.js} +3 -3
- package/dist/{seed-pricing-thxpn9vn.js → seed-pricing-hf889enh.js} +3 -3
- package/dist/{setup-wb0z8cat.js → setup-w6mb03jv.js} +2 -2
- package/dist/{work-objects-h3498kwe.js → work-objects-nt8gy1kj.js} +14 -14
- package/dist/{worker-2m2tzxp3.js → worker-dwy617t0.js} +15 -15
- package/openapi.json +1 -1
- package/package.json +1 -1
- package/src/slack/assistant.ts +10 -1
- package/src/slack/handlers.ts +10 -1
- package/src/slack/thread-buffer.ts +14 -3
- 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
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveSlackUserId
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-3bpzj8me.js";
|
|
4
4
|
import {
|
|
5
5
|
createTaskWithSiblingAwareness
|
|
6
|
-
} from "./cli-
|
|
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-
|
|
13
|
-
import"./cli-
|
|
12
|
+
import"./cli-b9dd0h3k.js";
|
|
13
|
+
import"./cli-r84ctdxn.js";
|
|
14
14
|
import"./cli-zfzznn7c.js";
|
|
15
|
-
import"./cli-
|
|
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-
|
|
21
|
-
import"./cli-
|
|
20
|
+
import"./cli-56h18ng2.js";
|
|
21
|
+
import"./cli-2nnd56zt.js";
|
|
22
22
|
import"./cli-bsakbbkm.js";
|
|
23
|
-
import"./cli-
|
|
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-
|
|
32
|
+
} from "./cli-qn042eh7.js";
|
|
33
33
|
import"./cli-q51yprfq.js";
|
|
34
34
|
import"./cli-yatxqynm.js";
|
|
35
|
-
import"./cli-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
5
|
+
} from "./cli-jvy9qgjs.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveSlackUserId,
|
|
8
8
|
rewriteSlackMentions
|
|
9
|
-
} from "./cli-
|
|
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-
|
|
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-
|
|
23
|
-
import"./cli-
|
|
22
|
+
import"./cli-b9dd0h3k.js";
|
|
23
|
+
import"./cli-r84ctdxn.js";
|
|
24
24
|
import"./cli-zfzznn7c.js";
|
|
25
|
-
import"./cli-
|
|
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-
|
|
31
|
-
import"./cli-
|
|
30
|
+
import"./cli-56h18ng2.js";
|
|
31
|
+
import"./cli-2nnd56zt.js";
|
|
32
32
|
import"./cli-bsakbbkm.js";
|
|
33
|
-
import"./cli-
|
|
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-
|
|
40
|
+
} from "./cli-qn042eh7.js";
|
|
41
41
|
import"./cli-q51yprfq.js";
|
|
42
42
|
import"./cli-yatxqynm.js";
|
|
43
|
-
import"./cli-
|
|
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-
|
|
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-
|
|
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-
|
|
5
|
-
import"./cli-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
21
|
-
import"./cli-
|
|
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-
|
|
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-
|
|
7
|
-
import"./cli-
|
|
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-
|
|
44
|
+
import"./cli-zvkq5csn.js";
|
|
45
45
|
import {
|
|
46
46
|
init_secret_scrubber,
|
|
47
47
|
scrubSecrets
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
linkIdentity,
|
|
5
5
|
recordUnmappedIdentity,
|
|
6
6
|
resolveIdentity
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-z3wkng35.js";
|
|
8
8
|
import {
|
|
9
9
|
getKv,
|
|
10
10
|
init_db,
|
|
11
11
|
upsertKv
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-zvgj5zg8.js";
|
|
13
13
|
|
|
14
14
|
// src/slack/enrich.ts
|
|
15
15
|
init_db();
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildModelsDevSeedRows,
|
|
3
3
|
loadModelsDevCache
|
|
4
|
-
} from "./cli-
|
|
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-
|
|
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-
|
|
8
|
+
} from "./cli-jvy9qgjs.js";
|
|
9
9
|
import {
|
|
10
10
|
enrichSlackUserEmail,
|
|
11
11
|
resolveSlackUserId,
|
|
12
12
|
rewriteSlackMentions
|
|
13
|
-
} from "./cli-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
23
|
+
} from "./cli-56h18ng2.js";
|
|
24
24
|
import {
|
|
25
25
|
embedScript
|
|
26
|
-
} from "./cli-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
7
|
+
} from "./cli-jew3jda5.js";
|
|
8
8
|
import {
|
|
9
9
|
getDbClient,
|
|
10
10
|
init_db
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-zvgj5zg8.js";
|
|
12
12
|
import {
|
|
13
13
|
init_secret_scrubber,
|
|
14
14
|
scrubSecrets
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
rewriteSlackMentions
|
|
3
|
-
} from "./cli-
|
|
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-
|
|
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-
|
|
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-
|
|
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>
|