@desplega.ai/agent-swarm 1.108.0 → 1.108.1
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/{actions-sdr91cfp.js → actions-0rszpr51.js} +6 -6
- package/dist/{app-0mcf7mwz.js → app-0rchrsgj.js} +3 -3
- package/dist/{assistant-7f3cmabp.js → assistant-81233cgs.js} +9 -9
- package/dist/{boot-reembed-a9btk2eh.js → boot-reembed-m4fdfvde.js} +4 -4
- package/dist/{boot-reembed-47cfre4w.js → boot-reembed-rcfexjee.js} +3 -3
- package/dist/{boot-scrub-logs-hy8pqhej.js → boot-scrub-logs-4r9w8ep9.js} +2 -2
- package/dist/{cli-j9eqkarv.js → cli-4nc1v1ez.js} +3 -3
- package/dist/{cli-vemx13wc.js → cli-5cv1m3gd.js} +3 -3
- package/dist/{cli-vhpa5j27.js → cli-9aqwqmyw.js} +1 -1
- package/dist/{cli-gx7gnvha.js → cli-a9ycng51.js} +17 -17
- package/dist/{cli-entbgsd5.js → cli-awex6rqa.js} +1 -1
- package/dist/{cli-psz2xq0n.js → cli-cb4yzbvr.js} +5 -5
- package/dist/{cli-apdrt1ch.js → cli-czc8mmc6.js} +1 -1
- package/dist/{cli-mmaz2btq.js → cli-dr8bpgf0.js} +1 -1
- package/dist/{cli-m0k99m2s.js → cli-dvn23403.js} +1 -1
- package/dist/{cli-mkn2ryba.js → cli-frbw04sq.js} +1 -1
- package/dist/{cli-a0w6tqyc.js → cli-h53vbe8k.js} +1 -1
- package/dist/{cli-nmt32dxp.js → cli-hz7jggwp.js} +1 -1
- package/dist/{cli-xy83cmfc.js → cli-m0j9g47t.js} +33 -6
- package/dist/{cli-cya9knf9.js → cli-mq1zkwmr.js} +2 -2
- package/dist/{cli-7r40bgvr.js → cli-q0ea86r9.js} +4 -4
- package/dist/{cli-tehpf2fm.js → cli-qcw09hr8.js} +1 -1
- package/dist/{cli-a8gkr14c.js → cli-r48tdxbv.js} +30 -4
- package/dist/{cli-kppbkzj4.js → cli-thc24d4s.js} +5 -5
- package/dist/{cli-h2qhdwhr.js → cli-vzdjbf7f.js} +1 -1
- package/dist/{cli-75b0wmer.js → cli-xcty7st9.js} +2 -2
- package/dist/{cli-3cfvx630.js → cli-xx2e6rpj.js} +2 -2
- package/dist/{cli-9wv4e7qs.js → cli-y8py1s7d.js} +7 -3
- package/dist/{cli-1zs2dm5w.js → cli-zh0zc88x.js} +4 -4
- package/dist/cli.js +8 -8
- package/dist/{commands-4p93q1rf.js → commands-rhnr6ekp.js} +2 -2
- package/dist/{db-hb0chrmg.js → db-9b4nhwt8.js} +2 -2
- package/dist/{handlers-pz3zc83m.js → handlers-exza1nv9.js} +9 -9
- package/dist/{hook-mye8ket2.js → hook-erz5hmx3.js} +1 -1
- package/dist/{http-3nrx1tp1.js → http-hpjpkat2.js} +73 -37
- package/dist/{index-17n7z8k8.js → index-n2t8g26e.js} +9 -9
- package/dist/{index-6sgpkhby.js → index-takxjn9f.js} +6 -6
- package/dist/{index-rys8ctm6.js → index-ve59rfv2.js} +7 -7
- package/dist/{index-x9n06ze1.js → index-zbbfkz52.js} +8 -8
- package/dist/{keepalive-b6eax0y0.js → keepalive-sy9ge11x.js} +4 -4
- package/dist/{lead-v1g4j7he.js → lead-kanxwtfj.js} +17 -17
- package/dist/{maintenance-xwf1vf0v.js → maintenance-5b5f4yr3.js} +4 -4
- package/dist/{onboard-vy0z8b11.js → onboard-00fgv018.js} +2 -2
- package/dist/{otel-impl-94sm94jm.js → otel-impl-s0pfpd9q.js} +1 -1
- package/dist/{pricing-refresh-an9bxjcd.js → pricing-refresh-0fw4v1j0.js} +4 -4
- package/dist/{seed-pricing-3t22x5ax.js → seed-pricing-z88nemdf.js} +3 -3
- package/dist/{setup-8hd3jk8s.js → setup-e09wnnsm.js} +2 -2
- package/dist/{worker-s0xm8naj.js → worker-w01ptydp.js} +17 -17
- package/openapi.json +1 -1
- package/package.json +1 -1
- package/plugin/skills/download-task-attachment/SKILL.md +59 -0
- package/src/be/seed/agent-fs-provision.ts +51 -4
- package/src/commands/runner.ts +40 -0
- package/src/commands/templates.ts +6 -1
- package/src/fs/local-fs-provider.ts +36 -4
- package/src/http/poll.ts +24 -2
- package/src/telemetry.ts +12 -2
- package/src/tests/agent-fs-provision-seeder.test.ts +204 -3
- package/src/tests/claude-adapter.test.ts +17 -3
- package/src/tests/fs-provider.test.ts +34 -0
- package/src/tests/http-api-integration.test.ts +51 -0
- package/src/tests/prompt-template-remaining.test.ts +25 -0
- package/src/tests/runner-attachments-section.test.ts +55 -0
- package/src/tests/telemetry-init.test.ts +23 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveSlackUserId
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
5
|
-
import"./cli-
|
|
3
|
+
} from "./cli-4nc1v1ez.js";
|
|
4
|
+
import"./cli-dvn23403.js";
|
|
5
|
+
import"./cli-dr8bpgf0.js";
|
|
6
6
|
import {
|
|
7
7
|
buildCancelledBlocks,
|
|
8
8
|
getTaskLink
|
|
@@ -11,7 +11,7 @@ import"./cli-wspgs9bt.js";
|
|
|
11
11
|
import {
|
|
12
12
|
createTaskWithSiblingAwareness,
|
|
13
13
|
slackContextKey
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-h53vbe8k.js";
|
|
15
15
|
import"./cli-dh55d5fg.js";
|
|
16
16
|
import {
|
|
17
17
|
cancelTask,
|
|
@@ -19,11 +19,11 @@ import {
|
|
|
19
19
|
getLeadAgent,
|
|
20
20
|
getTaskById,
|
|
21
21
|
init_db
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-y8py1s7d.js";
|
|
23
23
|
import"./cli-z2zcxes1.js";
|
|
24
24
|
import"./cli-q21d49ac.js";
|
|
25
25
|
import"./cli-anrj584m.js";
|
|
26
|
-
import"./cli-
|
|
26
|
+
import"./cli-czc8mmc6.js";
|
|
27
27
|
import"./cli-4j2mrzag.js";
|
|
28
28
|
import"./cli-p9swy5t3.js";
|
|
29
29
|
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
initSlackApp,
|
|
4
4
|
startSlackApp,
|
|
5
5
|
stopSlackApp
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-thc24d4s.js";
|
|
7
7
|
import"./cli-rkndnn90.js";
|
|
8
8
|
import"./cli-b0p7rfnd.js";
|
|
9
9
|
import"./cli-6xd0bvf8.js";
|
|
10
10
|
import"./cli-wspgs9bt.js";
|
|
11
11
|
import"./cli-dh55d5fg.js";
|
|
12
|
-
import"./cli-
|
|
12
|
+
import"./cli-y8py1s7d.js";
|
|
13
13
|
import"./cli-z2zcxes1.js";
|
|
14
14
|
import"./cli-q21d49ac.js";
|
|
15
15
|
import"./cli-anrj584m.js";
|
|
16
|
-
import"./cli-
|
|
16
|
+
import"./cli-czc8mmc6.js";
|
|
17
17
|
import"./cli-4j2mrzag.js";
|
|
18
18
|
import"./cli-e15jhafb.js";
|
|
19
19
|
import"./cli-7wmybrt5.js";
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bufferThreadMessage,
|
|
3
3
|
wasEventSeen
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-q0ea86r9.js";
|
|
5
5
|
import {
|
|
6
6
|
hasOtherUserMention
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-hz7jggwp.js";
|
|
8
8
|
import {
|
|
9
9
|
require_dist
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-thc24d4s.js";
|
|
11
11
|
import"./cli-rkndnn90.js";
|
|
12
12
|
import"./cli-b0p7rfnd.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveSlackUserId
|
|
15
|
-
} from "./cli-
|
|
16
|
-
import"./cli-
|
|
17
|
-
import"./cli-
|
|
15
|
+
} from "./cli-4nc1v1ez.js";
|
|
16
|
+
import"./cli-dvn23403.js";
|
|
17
|
+
import"./cli-dr8bpgf0.js";
|
|
18
18
|
import"./cli-6xd0bvf8.js";
|
|
19
19
|
import"./cli-wspgs9bt.js";
|
|
20
20
|
import {
|
|
21
21
|
createTaskWithSiblingAwareness,
|
|
22
22
|
slackContextKey
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-h53vbe8k.js";
|
|
24
24
|
import"./cli-dh55d5fg.js";
|
|
25
25
|
import {
|
|
26
26
|
getAgentWorkingOnThread,
|
|
@@ -29,11 +29,11 @@ import {
|
|
|
29
29
|
init_db,
|
|
30
30
|
init_resolver,
|
|
31
31
|
resolveTemplate
|
|
32
|
-
} from "./cli-
|
|
32
|
+
} from "./cli-y8py1s7d.js";
|
|
33
33
|
import"./cli-z2zcxes1.js";
|
|
34
34
|
import"./cli-q21d49ac.js";
|
|
35
35
|
import"./cli-anrj584m.js";
|
|
36
|
-
import"./cli-
|
|
36
|
+
import"./cli-czc8mmc6.js";
|
|
37
37
|
import"./cli-4j2mrzag.js";
|
|
38
38
|
import"./cli-e15jhafb.js";
|
|
39
39
|
import"./cli-7wmybrt5.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
embedScript,
|
|
3
3
|
embeddingProvider
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-mq1zkwmr.js";
|
|
5
|
+
import"./cli-9aqwqmyw.js";
|
|
6
6
|
import"./cli-q25ejbyn.js";
|
|
7
7
|
import {
|
|
8
8
|
getDb,
|
|
9
9
|
init_db
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-y8py1s7d.js";
|
|
11
11
|
import"./cli-z2zcxes1.js";
|
|
12
12
|
import"./cli-q21d49ac.js";
|
|
13
13
|
import"./cli-anrj584m.js";
|
|
14
|
-
import"./cli-
|
|
14
|
+
import"./cli-czc8mmc6.js";
|
|
15
15
|
import"./cli-4j2mrzag.js";
|
|
16
16
|
import"./cli-p9swy5t3.js";
|
|
17
17
|
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
getEmbeddingProvider,
|
|
4
4
|
getMemoryStore,
|
|
5
5
|
init_constants
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-9aqwqmyw.js";
|
|
7
7
|
import"./cli-q25ejbyn.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb,
|
|
10
10
|
init_db
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-y8py1s7d.js";
|
|
12
12
|
import"./cli-z2zcxes1.js";
|
|
13
13
|
import"./cli-q21d49ac.js";
|
|
14
14
|
import"./cli-anrj584m.js";
|
|
15
|
-
import"./cli-
|
|
15
|
+
import"./cli-czc8mmc6.js";
|
|
16
16
|
import"./cli-4j2mrzag.js";
|
|
17
17
|
import"./cli-p9swy5t3.js";
|
|
18
18
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDb,
|
|
3
3
|
init_db
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-y8py1s7d.js";
|
|
5
5
|
import"./cli-z2zcxes1.js";
|
|
6
6
|
import"./cli-q21d49ac.js";
|
|
7
7
|
import"./cli-anrj584m.js";
|
|
8
|
-
import"./cli-
|
|
8
|
+
import"./cli-czc8mmc6.js";
|
|
9
9
|
import {
|
|
10
10
|
init_secret_scrubber,
|
|
11
11
|
scrubSecrets
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
recordUnmappedIdentity
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-dvn23403.js";
|
|
4
4
|
import {
|
|
5
5
|
findOrCreateUserByEmail,
|
|
6
6
|
findUserByExternalId,
|
|
7
7
|
linkIdentity
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-dr8bpgf0.js";
|
|
9
9
|
import {
|
|
10
10
|
getKv,
|
|
11
11
|
init_db,
|
|
12
12
|
upsertKv
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-y8py1s7d.js";
|
|
14
14
|
|
|
15
15
|
// src/slack/enrich.ts
|
|
16
16
|
init_db();
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
getNextResumeGeneration,
|
|
5
5
|
getResumeGeneration,
|
|
6
6
|
repointTrackerSyncBySwarmId
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-vzdjbf7f.js";
|
|
8
8
|
import {
|
|
9
9
|
getExecutorRegistry,
|
|
10
10
|
recoverIncompleteRuns
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-cb4yzbvr.js";
|
|
12
12
|
import {
|
|
13
13
|
MAX_EMPTY_POLLS,
|
|
14
14
|
assignUnassignedTaskPending,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
resolveTemplate,
|
|
45
45
|
supersedeTask,
|
|
46
46
|
updateAgentStatus
|
|
47
|
-
} from "./cli-
|
|
47
|
+
} from "./cli-y8py1s7d.js";
|
|
48
48
|
|
|
49
49
|
// src/heartbeat/heartbeat.ts
|
|
50
50
|
init_db();
|
|
@@ -14,13 +14,13 @@ import {
|
|
|
14
14
|
getOAuthApp,
|
|
15
15
|
getOAuthTokens,
|
|
16
16
|
upsertOAuthApp
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-qcw09hr8.js";
|
|
18
18
|
import {
|
|
19
19
|
startPricingRefreshLoop
|
|
20
|
-
} from "./cli-
|
|
20
|
+
} from "./cli-xcty7st9.js";
|
|
21
21
|
import {
|
|
22
22
|
seedPricingFromModelsDev
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-awex6rqa.js";
|
|
24
24
|
import {
|
|
25
25
|
createTrackerAgentMapping,
|
|
26
26
|
createTrackerSync,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
repointTrackerSyncBySwarmId,
|
|
36
36
|
updateTrackerSync,
|
|
37
37
|
updateTrackerSyncSwarmId
|
|
38
|
-
} from "./cli-
|
|
38
|
+
} from "./cli-vzdjbf7f.js";
|
|
39
39
|
import {
|
|
40
40
|
ZodFirstPartyTypeKind,
|
|
41
41
|
objectType
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
ensure,
|
|
46
46
|
require_dist,
|
|
47
47
|
runScheduleNow
|
|
48
|
-
} from "./cli-
|
|
48
|
+
} from "./cli-zh0zc88x.js";
|
|
49
49
|
import {
|
|
50
50
|
TriggerSchemaError,
|
|
51
51
|
applyDefinitionPatch,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
startWorkflowExecution,
|
|
58
58
|
validateDefinition,
|
|
59
59
|
validateJsonSchema
|
|
60
|
-
} from "./cli-
|
|
60
|
+
} from "./cli-cb4yzbvr.js";
|
|
61
61
|
import {
|
|
62
62
|
getApiKey
|
|
63
63
|
} from "./cli-f14fvzag.js";
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
setScriptConnectionEnabled,
|
|
74
74
|
upsertCredentialBinding,
|
|
75
75
|
upsertScriptConnection
|
|
76
|
-
} from "./cli-
|
|
76
|
+
} from "./cli-xx2e6rpj.js";
|
|
77
77
|
import {
|
|
78
78
|
CANDIDATE_SET_MULTIPLIER,
|
|
79
79
|
getEmbeddingProvider,
|
|
@@ -81,16 +81,16 @@ import {
|
|
|
81
81
|
init_constants,
|
|
82
82
|
init_reranker,
|
|
83
83
|
rerank
|
|
84
|
-
} from "./cli-
|
|
84
|
+
} from "./cli-9aqwqmyw.js";
|
|
85
85
|
import {
|
|
86
86
|
createAdditiveBuffer,
|
|
87
87
|
extractSlackMessageText
|
|
88
|
-
} from "./cli-
|
|
88
|
+
} from "./cli-hz7jggwp.js";
|
|
89
89
|
import {
|
|
90
90
|
getSlackApp,
|
|
91
91
|
startSlackApp,
|
|
92
92
|
stopSlackApp
|
|
93
|
-
} from "./cli-
|
|
93
|
+
} from "./cli-thc24d4s.js";
|
|
94
94
|
import {
|
|
95
95
|
findOrCreateUserByEmail,
|
|
96
96
|
findUserByEmail,
|
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
recordIdentityEvent,
|
|
103
103
|
resolveUserByToken,
|
|
104
104
|
unlinkIdentity
|
|
105
|
-
} from "./cli-
|
|
105
|
+
} from "./cli-dr8bpgf0.js";
|
|
106
106
|
import {
|
|
107
107
|
markdownToSlack
|
|
108
108
|
} from "./cli-6xd0bvf8.js";
|
|
@@ -113,7 +113,7 @@ import {
|
|
|
113
113
|
createTaskWithSiblingAwareness,
|
|
114
114
|
githubContextKey,
|
|
115
115
|
linearContextKey
|
|
116
|
-
} from "./cli-
|
|
116
|
+
} from "./cli-h53vbe8k.js";
|
|
117
117
|
import {
|
|
118
118
|
getAppUrl,
|
|
119
119
|
getMcpBaseUrl,
|
|
@@ -342,7 +342,7 @@ import {
|
|
|
342
342
|
upsertService,
|
|
343
343
|
upsertSwarmConfig,
|
|
344
344
|
validateConfigValue
|
|
345
|
-
} from "./cli-
|
|
345
|
+
} from "./cli-y8py1s7d.js";
|
|
346
346
|
import {
|
|
347
347
|
init_zod
|
|
348
348
|
} from "./cli-q21d49ac.js";
|
|
@@ -386,7 +386,7 @@ import {
|
|
|
386
386
|
import {
|
|
387
387
|
init_package,
|
|
388
388
|
package_default
|
|
389
|
-
} from "./cli-
|
|
389
|
+
} from "./cli-czc8mmc6.js";
|
|
390
390
|
import {
|
|
391
391
|
init_secret_scrubber,
|
|
392
392
|
refreshSecretScrubberCache,
|
|
@@ -19668,7 +19668,7 @@ async function initOtel(serviceRole = process.env.AGENT_ROLE || "api") {
|
|
|
19668
19668
|
return;
|
|
19669
19669
|
initialized2 = true;
|
|
19670
19670
|
try {
|
|
19671
|
-
const impl = await import("./otel-impl-
|
|
19671
|
+
const impl = await import("./otel-impl-s0pfpd9q.js");
|
|
19672
19672
|
await impl.boot(serviceRole);
|
|
19673
19673
|
realWithSpan = impl.withSpan;
|
|
19674
19674
|
realStartSpan = impl.startSpan;
|
|
@@ -32884,7 +32884,7 @@ async function notifySlack(text) {
|
|
|
32884
32884
|
return;
|
|
32885
32885
|
}
|
|
32886
32886
|
try {
|
|
32887
|
-
const { getSlackApp: getSlackApp2 } = await import("./app-
|
|
32887
|
+
const { getSlackApp: getSlackApp2 } = await import("./app-0rchrsgj.js");
|
|
32888
32888
|
const app = getSlackApp2();
|
|
32889
32889
|
if (!app) {
|
|
32890
32890
|
console.warn("[Jira webhook keepalive] Slack not available, cannot send notification");
|
|
@@ -32953,7 +32953,7 @@ async function deleteJiraWebhook(webhookId) {
|
|
|
32953
32953
|
console.log(`[Jira webhook keepalive] Deleted webhook id=${webhookId}`);
|
|
32954
32954
|
}
|
|
32955
32955
|
async function overwriteWebhookIds(next) {
|
|
32956
|
-
const { getDb: getDb2 } = await import("./db-
|
|
32956
|
+
const { getDb: getDb2 } = await import("./db-9b4nhwt8.js");
|
|
32957
32957
|
const db = getDb2();
|
|
32958
32958
|
const txn = db.transaction(() => {
|
|
32959
32959
|
const row = db.query("SELECT metadata FROM oauth_apps WHERE provider = 'jira'").get();
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
getScriptVersion,
|
|
10
10
|
listRelationalCredentialBindings,
|
|
11
11
|
validateScriptImports
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-xx2e6rpj.js";
|
|
13
13
|
import {
|
|
14
14
|
withSiblingAwareness,
|
|
15
15
|
workflowContextKey
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-h53vbe8k.js";
|
|
17
17
|
import {
|
|
18
18
|
getAppUrl
|
|
19
19
|
} from "./cli-dh55d5fg.js";
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
telemetry,
|
|
63
63
|
updateWorkflowRun,
|
|
64
64
|
updateWorkflowRunStep
|
|
65
|
-
} from "./cli-
|
|
65
|
+
} from "./cli-y8py1s7d.js";
|
|
66
66
|
import {
|
|
67
67
|
init_zod
|
|
68
68
|
} from "./cli-q21d49ac.js";
|
|
@@ -2515,7 +2515,7 @@ class HumanInTheLoopExecutor extends BaseExecutor {
|
|
|
2515
2515
|
}
|
|
2516
2516
|
if (notification.channel === "slack") {
|
|
2517
2517
|
try {
|
|
2518
|
-
const { getSlackApp } = await import("./app-
|
|
2518
|
+
const { getSlackApp } = await import("./app-0rchrsgj.js");
|
|
2519
2519
|
const slackApp = getSlackApp();
|
|
2520
2520
|
if (!slackApp) {
|
|
2521
2521
|
console.warn("[HITL] Slack not initialized — cannot send notification");
|
|
@@ -2629,7 +2629,7 @@ class NotifyExecutor extends BaseExecutor {
|
|
|
2629
2629
|
}
|
|
2630
2630
|
}
|
|
2631
2631
|
case "slack": {
|
|
2632
|
-
const { getSlackApp } = await import("./app-
|
|
2632
|
+
const { getSlackApp } = await import("./app-0rchrsgj.js");
|
|
2633
2633
|
const app = getSlackApp();
|
|
2634
2634
|
if (!app) {
|
|
2635
2635
|
return {
|
|
@@ -7,7 +7,7 @@ var package_default;
|
|
|
7
7
|
var init_package = __esm(() => {
|
|
8
8
|
package_default = {
|
|
9
9
|
name: "@desplega.ai/agent-swarm",
|
|
10
|
-
version: "1.108.
|
|
10
|
+
version: "1.108.1",
|
|
11
11
|
description: "Multi-agent orchestration for Claude Code, Codex, Gemini CLI, and other AI coding assistants",
|
|
12
12
|
license: "MIT",
|
|
13
13
|
author: "desplega.sh <contact@desplega.sh>",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getScriptApiTypes,
|
|
3
3
|
require_typescript
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-xx2e6rpj.js";
|
|
5
5
|
import {
|
|
6
6
|
deleteSwarmConfigByKey,
|
|
7
7
|
getAgentById,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
getSwarmConfigs,
|
|
11
11
|
init_db,
|
|
12
12
|
upsertSwarmConfig
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-y8py1s7d.js";
|
|
14
14
|
import {
|
|
15
15
|
init_secret_scrubber,
|
|
16
16
|
scrubSecrets
|
|
@@ -67,7 +67,11 @@ async function provisionAgentFs(item) {
|
|
|
67
67
|
apiUrl: item.apiUrl,
|
|
68
68
|
registerEmail: item.registerEmail
|
|
69
69
|
});
|
|
70
|
+
const currentRoles = await getCurrentOrgMemberRoles(item.apiUrl, shared.authHeaders, shared.orgId);
|
|
70
71
|
for (const invite of item.invites) {
|
|
72
|
+
const currentRole = currentRoles.get(invite.email.toLowerCase());
|
|
73
|
+
if (currentRole && roleRank(currentRole) >= roleRank(invite.role))
|
|
74
|
+
continue;
|
|
71
75
|
await inviteToSharedOrg(item.apiUrl, shared.authHeaders, shared.orgId, invite);
|
|
72
76
|
}
|
|
73
77
|
upsertSwarmConfig({
|
|
@@ -150,7 +154,11 @@ async function ensureAgentFsCredentialsForAgent(agentId) {
|
|
|
150
154
|
const apiKey = registered.apiKey ?? "";
|
|
151
155
|
if (!apiKey)
|
|
152
156
|
throw new Error(`agent-fs registration did not return an apiKey for ${agentId}`);
|
|
153
|
-
await
|
|
157
|
+
const currentRoles = await getCurrentOrgMemberRoles(apiUrl, shared.authHeaders, shared.orgId);
|
|
158
|
+
const currentRole = currentRoles.get(email.toLowerCase());
|
|
159
|
+
if (!currentRole || roleRank(currentRole) < roleRank("editor")) {
|
|
160
|
+
await inviteToSharedOrg(apiUrl, shared.authHeaders, shared.orgId, { email, role: "editor" });
|
|
161
|
+
}
|
|
154
162
|
upsertSwarmConfig({
|
|
155
163
|
scope: "agent",
|
|
156
164
|
scopeId: agentId,
|
|
@@ -216,6 +224,25 @@ async function inviteToSharedOrg(apiUrl, headers, orgId, invite) {
|
|
|
216
224
|
console.warn(scrubSecrets(`[seed:${KIND}] invite skipped for ${invite.email}: ${error instanceof Error ? error.message : String(error)}`));
|
|
217
225
|
}
|
|
218
226
|
}
|
|
227
|
+
async function getCurrentOrgMemberRoles(apiUrl, headers, orgId) {
|
|
228
|
+
const response = await agentFsRequest(apiUrl, `/orgs/${encodeURIComponent(orgId)}/members`, { headers });
|
|
229
|
+
const roles = new Map;
|
|
230
|
+
for (const member of response.members ?? []) {
|
|
231
|
+
const email = (member.email ?? member.user?.email ?? "").trim().toLowerCase();
|
|
232
|
+
const role = normalizeRole(member.role);
|
|
233
|
+
if (email && role)
|
|
234
|
+
roles.set(email, role);
|
|
235
|
+
}
|
|
236
|
+
return roles;
|
|
237
|
+
}
|
|
238
|
+
function normalizeRole(role) {
|
|
239
|
+
if (role === "viewer" || role === "editor" || role === "admin")
|
|
240
|
+
return role;
|
|
241
|
+
return null;
|
|
242
|
+
}
|
|
243
|
+
function roleRank(role) {
|
|
244
|
+
return { viewer: 0, editor: 1, admin: 2 }[role];
|
|
245
|
+
}
|
|
219
246
|
async function agentFsRequest(apiUrl, path, options = {}) {
|
|
220
247
|
const headers = new Headers(options.headers);
|
|
221
248
|
if (options.body !== undefined)
|
|
@@ -249,13 +276,13 @@ function resolveInviteTargets() {
|
|
|
249
276
|
for (const user of getAllUsers()) {
|
|
250
277
|
if (!user.email)
|
|
251
278
|
continue;
|
|
252
|
-
const role =
|
|
279
|
+
const role = isExplicitViewerRole(user.role) ? "viewer" : "editor";
|
|
253
280
|
targets.set(user.email.toLowerCase(), { email: user.email, role });
|
|
254
281
|
}
|
|
255
282
|
return [...targets.values()].sort((a, b) => a.email.localeCompare(b.email));
|
|
256
283
|
}
|
|
257
|
-
function
|
|
258
|
-
return /\b(
|
|
284
|
+
function isExplicitViewerRole(role) {
|
|
285
|
+
return /\b(viewer|read[-\s]?only|guest)\b/i.test(role ?? "");
|
|
259
286
|
}
|
|
260
287
|
function provisionHashFromCurrentState() {
|
|
261
288
|
return provisionHash({
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
getEmbeddingProvider,
|
|
5
5
|
init_embedding,
|
|
6
6
|
serializeEmbedding
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-9aqwqmyw.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb,
|
|
10
10
|
init_db
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-y8py1s7d.js";
|
|
12
12
|
import {
|
|
13
13
|
init_secret_scrubber,
|
|
14
14
|
scrubSecrets
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAdditiveBuffer,
|
|
3
3
|
extractSlackMessageText
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-hz7jggwp.js";
|
|
5
5
|
import {
|
|
6
6
|
getSlackApp,
|
|
7
7
|
registerTreeMessage
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-thc24d4s.js";
|
|
9
9
|
import {
|
|
10
10
|
buildBufferFlushBlocks
|
|
11
11
|
} from "./cli-6xd0bvf8.js";
|
|
12
12
|
import {
|
|
13
13
|
createTaskWithSiblingAwareness,
|
|
14
14
|
slackContextKey
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-h53vbe8k.js";
|
|
16
16
|
import {
|
|
17
17
|
getLatestActiveTaskInThread,
|
|
18
18
|
getLeadAgent,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
init_db,
|
|
21
21
|
init_registry,
|
|
22
22
|
registerTemplate
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-y8py1s7d.js";
|
|
24
24
|
|
|
25
25
|
// src/slack/event-dedup.ts
|
|
26
26
|
var DEFAULT_TTL_MS = 300000;
|