@desplega.ai/agent-swarm 1.126.1 → 1.127.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/{actions-pr0awmcg.js → actions-644n22m6.js} +7 -7
- package/dist/{app-kbzfgyey.js → app-ny0gj6kg.js} +4 -4
- package/dist/{assistant-vr8arc5z.js → assistant-gj8b3c00.js} +9 -9
- package/dist/{boot-reembed-cg7df7q1.js → boot-reembed-5ca9kv94.js} +4 -4
- package/dist/{boot-reembed-psn36zf1.js → boot-reembed-xkbsbxxn.js} +5 -5
- package/dist/{boot-scrub-logs-5kmrkcjw.js → boot-scrub-logs-669xsqq1.js} +3 -3
- package/dist/{cli-nh38ds38.js → cli-2e10g9r7.js} +2 -2
- package/dist/{cli-vj5dhwap.js → cli-4gfwmxa8.js} +2 -2
- package/dist/{cli-jmgyb1eq.js → cli-4ww6rhhg.js} +2 -2
- package/dist/{cli-afhc1avq.js → cli-68jy5v0w.js} +1 -1
- package/dist/{cli-jgtghmhz.js → cli-6b41m0f8.js} +101 -62
- package/dist/{cli-5z2z3g6b.js → cli-b696veeb.js} +6 -6
- package/dist/{cli-6tqz94c0.js → cli-bepzsbrb.js} +4 -4
- package/dist/{cli-cq3vdb5f.js → cli-bs2awjtx.js} +1 -1
- package/dist/{cli-dwab6m0t.js → cli-bwx9h2cj.js} +2 -2
- package/dist/{cli-sg9et3f3.js → cli-c64x8s7t.js} +2 -2
- package/dist/{cli-gs7g55h5.js → cli-dhb6rmf6.js} +23 -9
- package/dist/{cli-wv0crj18.js → cli-dw20rn0d.js} +1 -1
- package/dist/{cli-bm3pgsh5.js → cli-emcj32bv.js} +6 -6
- package/dist/{cli-c4f49bv5.js → cli-hzad20bp.js} +3 -3
- package/dist/{cli-90yzwka4.js → cli-jqqq7zhc.js} +1 -1
- package/dist/{cli-p8kqdvay.js → cli-n09s3zaf.js} +8 -8
- package/dist/{cli-1fv0qxms.js → cli-nftx594v.js} +4 -4
- package/dist/{cli-5x6g59th.js → cli-peycqz69.js} +1 -1
- package/dist/{cli-y1d8824j.js → cli-rdhfg33j.js} +1 -1
- package/dist/{cli-hqvf4ed9.js → cli-sh9vv838.js} +1 -1
- package/dist/{cli-da6r73tg.js → cli-tfev56s0.js} +1 -1
- package/dist/{cli-jvrynjae.js → cli-wa4p03nz.js} +22 -5
- package/dist/{cli-bj4ra6x8.js → cli-x883h2ky.js} +1 -1
- package/dist/{cli-ft5t0yrn.js → cli-xg5g50w0.js} +4 -4
- package/dist/{cli-4yz5rd62.js → cli-xt6r7vgw.js} +1 -1
- package/dist/{cli-m7z29jt3.js → cli-ynppb182.js} +2 -2
- package/dist/{cli-7btwpbce.js → cli-yy56svjs.js} +2 -2
- package/dist/cli.js +10 -10
- package/dist/{codex-hook-5tdxqhpe.js → codex-hook-tyqm0gpy.js} +2 -2
- package/dist/{commands-wcpgyfg0.js → commands-jasxqcmp.js} +3 -3
- package/dist/{db-r6eqntx8.js → db-wkqh4pk7.js} +5 -3
- package/dist/{handlers-1mp32c7k.js → handlers-jtp4gkw3.js} +9 -9
- package/dist/{hook-mnzsezsa.js → hook-yw7b5qpr.js} +1 -1
- package/dist/{http-r4e6xg5v.js → http-821k8pmw.js} +39 -36
- package/dist/{index-h9a2rjqz.js → index-acdakscd.js} +10 -10
- package/dist/{index-tcy3cyxb.js → index-fwv94k2a.js} +12 -12
- package/dist/{index-9xt5q3wx.js → index-j0m3pjgx.js} +8 -8
- package/dist/{index-fvjh1s6f.js → index-qsjkh0ad.js} +11 -11
- package/dist/{keepalive-0ag082m0.js → keepalive-4kr014zc.js} +6 -6
- package/dist/{lead-w0kvabkf.js → lead-cvh88580.js} +22 -22
- package/dist/{maintenance-mafpkbhv.js → maintenance-mnbj2wpg.js} +5 -5
- package/dist/{oauth-refresh-sweep-4an3rn3k.js → oauth-refresh-sweep-feh6w9a0.js} +5 -5
- package/dist/{onboard-4ew5r5fs.js → onboard-22n94r81.js} +2 -2
- package/dist/{otel-impl-63fy87ma.js → otel-impl-2qdetxze.js} +1 -1
- package/dist/{pricing-refresh-fj513s7s.js → pricing-refresh-zjq4hrdx.js} +5 -5
- package/dist/{rbac-roles-0c1cy3k3.js → rbac-roles-335afb7w.js} +5 -5
- package/dist/{rbac-roles-yqc4kcjr.js → rbac-roles-4nr41yak.js} +4 -4
- package/dist/{render-v2-t2nzvdtf.js → render-v2-hy2jyz5n.js} +4 -4
- package/dist/{seed-pricing-5f9jgqs9.js → seed-pricing-pbc479ga.js} +4 -4
- package/dist/{setup-t8ve3zjz.js → setup-qrfd6aae.js} +2 -2
- package/dist/{worker-rsc6tw0v.js → worker-6cyvsr2y.js} +22 -22
- package/openapi.json +10 -1
- package/package.json +1 -1
- package/src/be/db.ts +37 -2
- package/src/http/tasks.ts +11 -0
- package/src/prompts/session-templates.ts +3 -3
- package/src/slack/render-v2.ts +24 -2
- package/src/tests/prompt-template-session.test.ts +16 -1
- package/src/tests/slack-render-v2.test.ts +137 -0
- package/src/tests/store-progress-attachments-handler.test.ts +5 -2
- package/src/tests/task-cancellation.test.ts +2 -2
- package/src/tests/task-cascade-fail.test.ts +9 -9
- package/src/tests/task-completion-idempotency.test.ts +289 -10
- package/src/tests/task-pause-resume.test.ts +15 -15
- package/src/tests/tasks-requested-by-filter.test.ts +211 -0
- package/src/tools/slack-reply.ts +1 -1
- package/src/tools/store-progress.ts +112 -35
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveSlackUserId
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
} from "./cli-ynppb182.js";
|
|
4
|
+
import"./cli-68jy5v0w.js";
|
|
5
5
|
import {
|
|
6
6
|
createTaskWithSiblingAwareness
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-x883h2ky.js";
|
|
8
8
|
import {
|
|
9
9
|
buildCancelledBlocks,
|
|
10
10
|
ensureSlackThreadTree,
|
|
11
11
|
getTaskLink,
|
|
12
12
|
isSlackRenderV2Enabled
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-dhb6rmf6.js";
|
|
14
14
|
import"./cli-rkndnn90.js";
|
|
15
15
|
import"./cli-b0p7rfnd.js";
|
|
16
16
|
import"./cli-wspgs9bt.js";
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
init_context_key,
|
|
24
24
|
init_db,
|
|
25
25
|
slackContextKey
|
|
26
|
-
} from "./cli-
|
|
27
|
-
import"./cli-
|
|
26
|
+
} from "./cli-wa4p03nz.js";
|
|
27
|
+
import"./cli-hzad20bp.js";
|
|
28
28
|
import"./cli-z2zcxes1.js";
|
|
29
29
|
import"./cli-bw80ck94.js";
|
|
30
|
-
import"./cli-
|
|
30
|
+
import"./cli-dw20rn0d.js";
|
|
31
31
|
import"./cli-4j2mrzag.js";
|
|
32
32
|
import"./cli-xz9aq0rf.js";
|
|
33
33
|
import"./cli-e15jhafb.js";
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
initSlackApp,
|
|
4
4
|
startSlackApp,
|
|
5
5
|
stopSlackApp
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-dhb6rmf6.js";
|
|
7
7
|
import"./cli-rkndnn90.js";
|
|
8
8
|
import"./cli-b0p7rfnd.js";
|
|
9
9
|
import"./cli-wspgs9bt.js";
|
|
10
10
|
import"./cli-dh55d5fg.js";
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
11
|
+
import"./cli-wa4p03nz.js";
|
|
12
|
+
import"./cli-hzad20bp.js";
|
|
13
13
|
import"./cli-z2zcxes1.js";
|
|
14
14
|
import"./cli-bw80ck94.js";
|
|
15
|
-
import"./cli-
|
|
15
|
+
import"./cli-dw20rn0d.js";
|
|
16
16
|
import"./cli-4j2mrzag.js";
|
|
17
17
|
import"./cli-xz9aq0rf.js";
|
|
18
18
|
import"./cli-e15jhafb.js";
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bufferThreadMessage,
|
|
3
3
|
wasEventSeen
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-b696veeb.js";
|
|
5
5
|
import {
|
|
6
6
|
hasOtherUserMention
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-yy56svjs.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveSlackUserId,
|
|
10
10
|
rewriteSlackMentions
|
|
11
|
-
} from "./cli-
|
|
12
|
-
import"./cli-
|
|
11
|
+
} from "./cli-ynppb182.js";
|
|
12
|
+
import"./cli-68jy5v0w.js";
|
|
13
13
|
import {
|
|
14
14
|
createTaskWithSiblingAwareness
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-x883h2ky.js";
|
|
16
16
|
import {
|
|
17
17
|
ensureSlackThreadTree,
|
|
18
18
|
isSlackRenderV2Enabled,
|
|
19
19
|
require_dist
|
|
20
|
-
} from "./cli-
|
|
20
|
+
} from "./cli-dhb6rmf6.js";
|
|
21
21
|
import"./cli-rkndnn90.js";
|
|
22
22
|
import"./cli-b0p7rfnd.js";
|
|
23
23
|
import"./cli-wspgs9bt.js";
|
|
@@ -29,16 +29,16 @@ import {
|
|
|
29
29
|
init_context_key,
|
|
30
30
|
init_db,
|
|
31
31
|
slackContextKey
|
|
32
|
-
} from "./cli-
|
|
32
|
+
} from "./cli-wa4p03nz.js";
|
|
33
33
|
import {
|
|
34
34
|
init_env_flag,
|
|
35
35
|
init_resolver,
|
|
36
36
|
isEnvFlagEnabled,
|
|
37
37
|
resolveTemplate
|
|
38
|
-
} from "./cli-
|
|
38
|
+
} from "./cli-hzad20bp.js";
|
|
39
39
|
import"./cli-z2zcxes1.js";
|
|
40
40
|
import"./cli-bw80ck94.js";
|
|
41
|
-
import"./cli-
|
|
41
|
+
import"./cli-dw20rn0d.js";
|
|
42
42
|
import"./cli-4j2mrzag.js";
|
|
43
43
|
import"./cli-xz9aq0rf.js";
|
|
44
44
|
import"./cli-e15jhafb.js";
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
getEmbeddingProvider,
|
|
4
4
|
getMemoryStore,
|
|
5
5
|
init_constants
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-jqqq7zhc.js";
|
|
7
7
|
import"./cli-q25ejbyn.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb,
|
|
10
10
|
init_db
|
|
11
|
-
} from "./cli-
|
|
12
|
-
import"./cli-
|
|
11
|
+
} from "./cli-wa4p03nz.js";
|
|
12
|
+
import"./cli-hzad20bp.js";
|
|
13
13
|
import"./cli-z2zcxes1.js";
|
|
14
14
|
import"./cli-bw80ck94.js";
|
|
15
|
-
import"./cli-
|
|
15
|
+
import"./cli-dw20rn0d.js";
|
|
16
16
|
import"./cli-4j2mrzag.js";
|
|
17
17
|
import"./cli-xz9aq0rf.js";
|
|
18
18
|
import"./cli-p9swy5t3.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
embedScript,
|
|
3
3
|
embeddingProvider
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-bwx9h2cj.js";
|
|
5
|
+
import"./cli-jqqq7zhc.js";
|
|
6
6
|
import"./cli-q25ejbyn.js";
|
|
7
7
|
import {
|
|
8
8
|
getDb,
|
|
9
9
|
init_db
|
|
10
|
-
} from "./cli-
|
|
11
|
-
import"./cli-
|
|
10
|
+
} from "./cli-wa4p03nz.js";
|
|
11
|
+
import"./cli-hzad20bp.js";
|
|
12
12
|
import"./cli-z2zcxes1.js";
|
|
13
13
|
import"./cli-bw80ck94.js";
|
|
14
|
-
import"./cli-
|
|
14
|
+
import"./cli-dw20rn0d.js";
|
|
15
15
|
import"./cli-4j2mrzag.js";
|
|
16
16
|
import"./cli-xz9aq0rf.js";
|
|
17
17
|
import"./cli-p9swy5t3.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDb,
|
|
3
3
|
init_db
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-wa4p03nz.js";
|
|
5
|
+
import"./cli-hzad20bp.js";
|
|
6
6
|
import"./cli-z2zcxes1.js";
|
|
7
7
|
import"./cli-bw80ck94.js";
|
|
8
|
-
import"./cli-
|
|
8
|
+
import"./cli-dw20rn0d.js";
|
|
9
9
|
import {
|
|
10
10
|
init_secret_scrubber,
|
|
11
11
|
scrubSecrets
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildModelsDevSeedRows,
|
|
3
3
|
loadModelsDevCache
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-xt6r7vgw.js";
|
|
5
5
|
import {
|
|
6
6
|
createLogEntry,
|
|
7
7
|
getActivePricingRow,
|
|
8
8
|
getDb,
|
|
9
9
|
init_db,
|
|
10
10
|
insertPricingRow
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-wa4p03nz.js";
|
|
12
12
|
import {
|
|
13
13
|
init_secret_scrubber,
|
|
14
14
|
scrubSecrets
|
|
@@ -16,13 +16,13 @@ import {
|
|
|
16
16
|
init_db,
|
|
17
17
|
init_templates1 as init_templates,
|
|
18
18
|
normalizeDateRequired
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-wa4p03nz.js";
|
|
20
20
|
import {
|
|
21
21
|
init_env_flag,
|
|
22
22
|
init_resolver,
|
|
23
23
|
isEnvFlagEnabled,
|
|
24
24
|
resolveTemplate
|
|
25
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-hzad20bp.js";
|
|
26
26
|
|
|
27
27
|
// src/be/db-queries/tracker.ts
|
|
28
28
|
init_date_utils();
|
|
@@ -22,28 +22,28 @@ import {
|
|
|
22
22
|
repointTrackerSyncBySwarmId,
|
|
23
23
|
updateTrackerSync,
|
|
24
24
|
updateTrackerSyncSwarmId
|
|
25
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-4gfwmxa8.js";
|
|
26
26
|
import {
|
|
27
27
|
calculateNextRun,
|
|
28
28
|
ensure,
|
|
29
29
|
require_dist,
|
|
30
30
|
runScheduleNow
|
|
31
|
-
} from "./cli-
|
|
31
|
+
} from "./cli-bepzsbrb.js";
|
|
32
32
|
import {
|
|
33
33
|
startPricingRefreshLoop
|
|
34
|
-
} from "./cli-
|
|
34
|
+
} from "./cli-2e10g9r7.js";
|
|
35
35
|
import {
|
|
36
36
|
seedPricingFromModelsDev
|
|
37
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-xt6r7vgw.js";
|
|
38
38
|
import {
|
|
39
39
|
ensureRbacSeedsSynced,
|
|
40
40
|
getUserGrant
|
|
41
|
-
} from "./cli-
|
|
41
|
+
} from "./cli-4ww6rhhg.js";
|
|
42
42
|
import {
|
|
43
43
|
can,
|
|
44
44
|
decideAdmission,
|
|
45
45
|
isRbacEnabled
|
|
46
|
-
} from "./cli-
|
|
46
|
+
} from "./cli-peycqz69.js";
|
|
47
47
|
import {
|
|
48
48
|
TriggerSchemaError,
|
|
49
49
|
applyDefinitionPatch,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
startWorkflowExecution,
|
|
58
58
|
validateDefinition,
|
|
59
59
|
validateJsonSchema
|
|
60
|
-
} from "./cli-
|
|
60
|
+
} from "./cli-n09s3zaf.js";
|
|
61
61
|
import {
|
|
62
62
|
getApiKey
|
|
63
63
|
} from "./cli-f14fvzag.js";
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
ensureToken,
|
|
68
68
|
ensureTokenOrThrow,
|
|
69
69
|
onAuthorizationRefreshed
|
|
70
|
-
} from "./cli-
|
|
70
|
+
} from "./cli-sh9vv838.js";
|
|
71
71
|
import {
|
|
72
72
|
ConnectionAuthInputSchema,
|
|
73
73
|
assertUrlSafe,
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
setScriptConnectionEnabled,
|
|
83
83
|
upsertCredentialBinding,
|
|
84
84
|
upsertScriptConnection
|
|
85
|
-
} from "./cli-
|
|
85
|
+
} from "./cli-xg5g50w0.js";
|
|
86
86
|
import {
|
|
87
87
|
CANDIDATE_SET_MULTIPLIER,
|
|
88
88
|
computeScore,
|
|
@@ -94,7 +94,7 @@ import {
|
|
|
94
94
|
isGraphExpansionEnabled,
|
|
95
95
|
rerank,
|
|
96
96
|
rowToCandidate
|
|
97
|
-
} from "./cli-
|
|
97
|
+
} from "./cli-jqqq7zhc.js";
|
|
98
98
|
import {
|
|
99
99
|
createOAuthApp,
|
|
100
100
|
getAuthorizationById,
|
|
@@ -104,7 +104,7 @@ import {
|
|
|
104
104
|
getOAuthTokens,
|
|
105
105
|
listAuthorizationsForApp,
|
|
106
106
|
upsertOAuthApp
|
|
107
|
-
} from "./cli-
|
|
107
|
+
} from "./cli-rdhfg33j.js";
|
|
108
108
|
import {
|
|
109
109
|
ZodFirstPartyTypeKind,
|
|
110
110
|
objectType
|
|
@@ -113,7 +113,7 @@ import {
|
|
|
113
113
|
createAdditiveBuffer,
|
|
114
114
|
extractSlackMessageText,
|
|
115
115
|
parseSlackTs
|
|
116
|
-
} from "./cli-
|
|
116
|
+
} from "./cli-yy56svjs.js";
|
|
117
117
|
import {
|
|
118
118
|
findOrCreateUserByEmail,
|
|
119
119
|
findUserByExternalId,
|
|
@@ -129,17 +129,17 @@ import {
|
|
|
129
129
|
resolveIdentityByEmail,
|
|
130
130
|
resolveUserByToken,
|
|
131
131
|
unlinkIdentity
|
|
132
|
-
} from "./cli-
|
|
132
|
+
} from "./cli-68jy5v0w.js";
|
|
133
133
|
import {
|
|
134
134
|
createTaskWithSiblingAwareness
|
|
135
|
-
} from "./cli-
|
|
135
|
+
} from "./cli-x883h2ky.js";
|
|
136
136
|
import {
|
|
137
137
|
getSlackApp,
|
|
138
138
|
getTaskLink,
|
|
139
139
|
markdownToSlack,
|
|
140
140
|
startSlackApp,
|
|
141
141
|
stopSlackApp
|
|
142
|
-
} from "./cli-
|
|
142
|
+
} from "./cli-dhb6rmf6.js";
|
|
143
143
|
import {
|
|
144
144
|
getAppUrl,
|
|
145
145
|
getMcpBaseUrl,
|
|
@@ -340,6 +340,7 @@ import {
|
|
|
340
340
|
moveTaskToBacklog,
|
|
341
341
|
normalizeAssetKey,
|
|
342
342
|
onTaskStarted,
|
|
343
|
+
overwriteTerminalTaskResultText,
|
|
343
344
|
parseAssetKey,
|
|
344
345
|
placeholderForConfigKey,
|
|
345
346
|
postMessage,
|
|
@@ -382,7 +383,7 @@ import {
|
|
|
382
383
|
upsertService,
|
|
383
384
|
upsertSwarmConfig,
|
|
384
385
|
validateConfigValue
|
|
385
|
-
} from "./cli-
|
|
386
|
+
} from "./cli-wa4p03nz.js";
|
|
386
387
|
import {
|
|
387
388
|
getTemplateDefinition,
|
|
388
389
|
init_env_flag,
|
|
@@ -394,14 +395,14 @@ import {
|
|
|
394
395
|
parseEnvFlag,
|
|
395
396
|
registerTemplate,
|
|
396
397
|
resolveTemplate
|
|
397
|
-
} from "./cli-
|
|
398
|
+
} from "./cli-hzad20bp.js";
|
|
398
399
|
import {
|
|
399
400
|
init_zod
|
|
400
401
|
} from "./cli-bw80ck94.js";
|
|
401
402
|
import {
|
|
402
403
|
init_package,
|
|
403
404
|
package_default
|
|
404
|
-
} from "./cli-
|
|
405
|
+
} from "./cli-dw20rn0d.js";
|
|
405
406
|
import {
|
|
406
407
|
init_secret_scrubber,
|
|
407
408
|
refreshSecretScrubberCache,
|
|
@@ -22858,7 +22859,7 @@ async function notifySlack(text) {
|
|
|
22858
22859
|
return;
|
|
22859
22860
|
}
|
|
22860
22861
|
try {
|
|
22861
|
-
const { getSlackApp: getSlackApp2 } = await import("./app-
|
|
22862
|
+
const { getSlackApp: getSlackApp2 } = await import("./app-ny0gj6kg.js");
|
|
22862
22863
|
const app = getSlackApp2();
|
|
22863
22864
|
if (!app) {
|
|
22864
22865
|
console.warn("[Jira webhook keepalive] Slack not available, cannot send notification");
|
|
@@ -22929,7 +22930,7 @@ async function deleteJiraWebhook(webhookId) {
|
|
|
22929
22930
|
console.log(`[Jira webhook keepalive] Deleted webhook id=${webhookId}`);
|
|
22930
22931
|
}
|
|
22931
22932
|
async function overwriteWebhookIds(next) {
|
|
22932
|
-
const { getDb: getDb2 } = await import("./db-
|
|
22933
|
+
const { getDb: getDb2 } = await import("./db-wkqh4pk7.js");
|
|
22933
22934
|
const db = getDb2();
|
|
22934
22935
|
const txn = db.transaction(() => {
|
|
22935
22936
|
const row = db.query("SELECT metadata FROM oauth_apps WHERE provider = 'jira'").get();
|
|
@@ -97841,7 +97842,7 @@ async function initOtel(serviceRole = process.env.AGENT_ROLE || "api") {
|
|
|
97841
97842
|
return;
|
|
97842
97843
|
initialized6 = true;
|
|
97843
97844
|
try {
|
|
97844
|
-
const impl = await import("./otel-impl-
|
|
97845
|
+
const impl = await import("./otel-impl-2qdetxze.js");
|
|
97845
97846
|
await impl.boot(serviceRole);
|
|
97846
97847
|
realWithSpan = impl.withSpan;
|
|
97847
97848
|
realStartSpan = impl.startSpan;
|
|
@@ -107705,7 +107706,7 @@ init_db();
|
|
|
107705
107706
|
var registerSlackReplyTool = (server) => {
|
|
107706
107707
|
createToolRegistrar(server)("slack-reply", {
|
|
107707
107708
|
title: "Reply to Slack thread",
|
|
107708
|
-
description: "Send a reply to a Slack thread. Use inboxMessageId for inbox messages, or taskId for task-related threads.",
|
|
107709
|
+
description: "Send a reply to a Slack thread. Use inboxMessageId for inbox messages, or taskId for task-related threads. The engine already publishes the task tree and outcome card, so send only a distinct agent-authored message. Prefer one reply per task over several, do not post progress, receipt, or acknowledgment messages, and match its length to what the user asked for.",
|
|
107709
107710
|
annotations: { openWorldHint: true },
|
|
107710
107711
|
inputSchema: object({
|
|
107711
107712
|
inboxMessageId: uuid().optional().describe("The inbox message ID to reply to (for leads responding to inbox)."),
|
|
@@ -108559,6 +108560,35 @@ var shouldPersistTaskCompletionMemory = shouldPersistAutomaticTaskMemory;
|
|
|
108559
108560
|
|
|
108560
108561
|
// src/tools/store-progress.ts
|
|
108561
108562
|
init_types();
|
|
108563
|
+
init_secret_scrubber();
|
|
108564
|
+
function getTaskOutputValidationError(outputSchema, output) {
|
|
108565
|
+
if (!outputSchema || typeof outputSchema !== "object")
|
|
108566
|
+
return;
|
|
108567
|
+
const schema = outputSchema;
|
|
108568
|
+
if (!output) {
|
|
108569
|
+
return `Task has an outputSchema but no output was provided. You must call store-progress with a valid JSON output matching this schema:
|
|
108570
|
+
${JSON.stringify(schema, null, 2)}`;
|
|
108571
|
+
}
|
|
108572
|
+
let parsed;
|
|
108573
|
+
try {
|
|
108574
|
+
parsed = JSON.parse(output);
|
|
108575
|
+
} catch {
|
|
108576
|
+
return `Task output must be valid JSON matching the outputSchema. Got invalid JSON. Schema:
|
|
108577
|
+
${JSON.stringify(schema, null, 2)}`;
|
|
108578
|
+
}
|
|
108579
|
+
const validationErrors = validateJsonSchema(schema, parsed);
|
|
108580
|
+
if (validationErrors.length > 0) {
|
|
108581
|
+
return `Task output does not match the outputSchema. Errors:
|
|
108582
|
+
${validationErrors.join(`
|
|
108583
|
+
`)}
|
|
108584
|
+
|
|
108585
|
+
Expected schema:
|
|
108586
|
+
${JSON.stringify(schema, null, 2)}
|
|
108587
|
+
|
|
108588
|
+
Please fix your output and retry.`;
|
|
108589
|
+
}
|
|
108590
|
+
return;
|
|
108591
|
+
}
|
|
108562
108592
|
var storeProgressOutputSchema = swarmToolOutputSchema({
|
|
108563
108593
|
task: looseObject({
|
|
108564
108594
|
id: string(),
|
|
@@ -108566,7 +108596,8 @@ var storeProgressOutputSchema = swarmToolOutputSchema({
|
|
|
108566
108596
|
finishedAt: string().optional()
|
|
108567
108597
|
}).optional(),
|
|
108568
108598
|
yourAgentId: string().optional(),
|
|
108569
|
-
wasNoOp: boolean().optional().describe("True when the call was a no-op because the task was already in a terminal state (completed/failed/cancelled). First-call-wins.")
|
|
108599
|
+
wasNoOp: boolean().optional().describe("True when the call was a no-op because the task was already in a terminal state (completed/failed/cancelled). First-call-wins."),
|
|
108600
|
+
wasForcedOverwrite: boolean().optional().describe("True when force: true replaced output and/or failureReason on an already-terminal task without replaying completion side effects.")
|
|
108570
108601
|
});
|
|
108571
108602
|
var registerStoreProgressTool = (server) => {
|
|
108572
108603
|
createToolRegistrar(server)("store-progress", {
|
|
@@ -108577,13 +108608,14 @@ var registerStoreProgressTool = (server) => {
|
|
|
108577
108608
|
taskId: uuid().describe("The ID of the task to update progress for."),
|
|
108578
108609
|
progress: string().optional().describe("The progress update to store."),
|
|
108579
108610
|
status: _enum(["completed", "failed"]).optional().describe("Set to 'completed' or 'failed' to finish the task."),
|
|
108580
|
-
output: string().optional().describe("The
|
|
108611
|
+
output: string().optional().describe("The task result (used when completing). For Slack-originated tasks, this is published verbatim in the thread's outcome card: provide a concrete summary scaled to what was asked, including only the outcome and any links or IDs the human needs—not process narration, a transcript, or a restatement of the brief."),
|
|
108581
108612
|
failureReason: string().optional().describe("The reason for failure (used when failing)."),
|
|
108582
108613
|
attachments: array(AttachmentInputSchema).max(20).optional().describe("Pointer-based artifacts produced by this step — agent-fs path, URL, shared-fs path, or swarm Page. No inline file data; upload to agent-fs first and attach by path. May be sent on any call (progress or completion) and accumulates across calls; duplicates are de-duped by sha256 (when present) or by (kind, pointer, name)."),
|
|
108583
|
-
persistMemory: boolean().optional().describe("Opt in to task_completion memory persistence for automatic/recurring tasks. Manual tasks are persisted by default; scheduled, system, heartbeat/boot-triage, monitor, and digest tasks are skipped unless this is true.")
|
|
108614
|
+
persistMemory: boolean().optional().describe("Opt in to task_completion memory persistence for automatic/recurring tasks. Manual tasks are persisted by default; scheduled, system, heartbeat/boot-triage, monitor, and digest tasks are skipped unless this is true."),
|
|
108615
|
+
force: boolean().optional().describe("On an already-terminal task, overwrite explicitly provided output and/or failureReason text while preserving status and finishedAt and without replaying events, memory writes, follow-up creation, business-use ensure, or capacity updates. Differing terminal text is otherwise discarded and reported as a failure.")
|
|
108584
108616
|
}),
|
|
108585
108617
|
outputSchema: storeProgressOutputSchema
|
|
108586
|
-
}, async ({ taskId, progress, status, output, failureReason, attachments, persistMemory }, requestInfo, _meta) => {
|
|
108618
|
+
}, async ({ taskId, progress, status, output, failureReason, attachments, persistMemory, force }, requestInfo, _meta) => {
|
|
108587
108619
|
if (!requestInfo.agentId) {
|
|
108588
108620
|
return toolErr('Agent ID not found. The MCP client should define the "X-Agent-ID" header.');
|
|
108589
108621
|
}
|
|
@@ -108648,7 +108680,41 @@ var registerStoreProgressTool = (server) => {
|
|
|
108648
108680
|
});
|
|
108649
108681
|
}
|
|
108650
108682
|
}
|
|
108651
|
-
if (
|
|
108683
|
+
if (isTerminal2 && (status || force)) {
|
|
108684
|
+
const scrubbedOutput = output !== undefined ? scrubSecrets(output) : undefined;
|
|
108685
|
+
const scrubbedFailureReason = failureReason !== undefined ? scrubSecrets(failureReason) : undefined;
|
|
108686
|
+
const hasDifferingOutput = scrubbedOutput !== undefined && scrubbedOutput !== existingTask.output;
|
|
108687
|
+
const hasDifferingFailureReason = scrubbedFailureReason !== undefined && scrubbedFailureReason !== existingTask.failureReason;
|
|
108688
|
+
const hasDifferingResultText = hasDifferingOutput || hasDifferingFailureReason;
|
|
108689
|
+
if (hasDifferingResultText && force) {
|
|
108690
|
+
const outputValidationError = hasDifferingOutput ? getTaskOutputValidationError(existingTask.outputSchema, output) : undefined;
|
|
108691
|
+
if (outputValidationError) {
|
|
108692
|
+
return { success: false, message: outputValidationError, task: existingTask };
|
|
108693
|
+
}
|
|
108694
|
+
const overwrittenTask = overwriteTerminalTaskResultText(taskId, {
|
|
108695
|
+
...output !== undefined ? { output } : {},
|
|
108696
|
+
...failureReason !== undefined ? { failureReason } : {}
|
|
108697
|
+
});
|
|
108698
|
+
if (!overwrittenTask) {
|
|
108699
|
+
return {
|
|
108700
|
+
success: false,
|
|
108701
|
+
message: `Task "${taskId}" terminal result text could not be overwritten.`
|
|
108702
|
+
};
|
|
108703
|
+
}
|
|
108704
|
+
return {
|
|
108705
|
+
success: true,
|
|
108706
|
+
message: `Task "${taskId}" is already ${existingTask.status}; force-overwrote terminal result text ` + "without replaying completion side effects.",
|
|
108707
|
+
task: overwrittenTask,
|
|
108708
|
+
wasForcedOverwrite: true
|
|
108709
|
+
};
|
|
108710
|
+
}
|
|
108711
|
+
if (hasDifferingResultText) {
|
|
108712
|
+
return {
|
|
108713
|
+
success: false,
|
|
108714
|
+
message: `Discarded write for already-${existingTask.status} task "${taskId}"; ` + "existing output/failureReason and finishedAt were preserved. Retry with force: true " + "to overwrite terminal result text without replaying completion side effects.",
|
|
108715
|
+
task: existingTask
|
|
108716
|
+
};
|
|
108717
|
+
}
|
|
108652
108718
|
return {
|
|
108653
108719
|
success: true,
|
|
108654
108720
|
message: `Task "${taskId}" is already ${existingTask.status}; treating as no-op. ` + `Existing output preserved (first-call-wins).`,
|
|
@@ -108664,38 +108730,10 @@ var registerStoreProgressTool = (server) => {
|
|
|
108664
108730
|
updatedTask = result2;
|
|
108665
108731
|
}
|
|
108666
108732
|
}
|
|
108667
|
-
if (status === "completed"
|
|
108668
|
-
const
|
|
108669
|
-
if (
|
|
108670
|
-
return {
|
|
108671
|
-
success: false,
|
|
108672
|
-
message: `Task has an outputSchema but no output was provided. You must call store-progress with a valid JSON output matching this schema:
|
|
108673
|
-
${JSON.stringify(schema, null, 2)}`
|
|
108674
|
-
};
|
|
108675
|
-
}
|
|
108676
|
-
let parsed;
|
|
108677
|
-
try {
|
|
108678
|
-
parsed = JSON.parse(output);
|
|
108679
|
-
} catch {
|
|
108680
|
-
return {
|
|
108681
|
-
success: false,
|
|
108682
|
-
message: `Task output must be valid JSON matching the outputSchema. Got invalid JSON. Schema:
|
|
108683
|
-
${JSON.stringify(schema, null, 2)}`
|
|
108684
|
-
};
|
|
108685
|
-
}
|
|
108686
|
-
const validationErrors = validateJsonSchema(schema, parsed);
|
|
108687
|
-
if (validationErrors.length > 0) {
|
|
108688
|
-
return {
|
|
108689
|
-
success: false,
|
|
108690
|
-
message: `Task output does not match the outputSchema. Errors:
|
|
108691
|
-
${validationErrors.join(`
|
|
108692
|
-
`)}
|
|
108693
|
-
|
|
108694
|
-
Expected schema:
|
|
108695
|
-
${JSON.stringify(schema, null, 2)}
|
|
108696
|
-
|
|
108697
|
-
Please fix your output and retry.`
|
|
108698
|
-
};
|
|
108733
|
+
if (status === "completed") {
|
|
108734
|
+
const outputValidationError = getTaskOutputValidationError(existingTask.outputSchema, output);
|
|
108735
|
+
if (outputValidationError) {
|
|
108736
|
+
return { success: false, message: outputValidationError };
|
|
108699
108737
|
}
|
|
108700
108738
|
}
|
|
108701
108739
|
if (status === "completed") {
|
|
@@ -108756,7 +108794,7 @@ Please fix your output and retry.`
|
|
|
108756
108794
|
};
|
|
108757
108795
|
});
|
|
108758
108796
|
const result = txn();
|
|
108759
|
-
const shouldRunTerminalSideEffects = (status === "completed" || status === "failed") && result.success && result.task && !(("wasNoOp" in result) && result.wasNoOp);
|
|
108797
|
+
const shouldRunTerminalSideEffects = (status === "completed" || status === "failed") && result.success && result.task && !(("wasNoOp" in result) && result.wasNoOp) && !(("wasForcedOverwrite" in result) && result.wasForcedOverwrite);
|
|
108760
108798
|
if (shouldRunTerminalSideEffects && shouldPersistTaskCompletionMemory(result.task, persistMemory)) {
|
|
108761
108799
|
(async () => {
|
|
108762
108800
|
try {
|
|
@@ -108828,7 +108866,7 @@ ${taskContent}`,
|
|
|
108828
108866
|
}
|
|
108829
108867
|
})();
|
|
108830
108868
|
}
|
|
108831
|
-
if (status && result.success && result.task && !result.task.workflowRunId && !(("wasNoOp" in result) && result.wasNoOp)) {
|
|
108869
|
+
if (status && result.success && result.task && !result.task.workflowRunId && !(("wasNoOp" in result) && result.wasNoOp) && !(("wasForcedOverwrite" in result) && result.wasForcedOverwrite)) {
|
|
108832
108870
|
try {
|
|
108833
108871
|
const followUp = createWorkerTaskFollowUp({
|
|
108834
108872
|
task: result.task,
|
|
@@ -108852,7 +108890,8 @@ ${taskContent}`,
|
|
|
108852
108890
|
const data = {
|
|
108853
108891
|
yourAgentId: requestInfo.agentId,
|
|
108854
108892
|
...task ? { task } : {},
|
|
108855
|
-
..."wasNoOp" in result && result.wasNoOp ? { wasNoOp: true } : {}
|
|
108893
|
+
..."wasNoOp" in result && result.wasNoOp ? { wasNoOp: true } : {},
|
|
108894
|
+
..."wasForcedOverwrite" in result && result.wasForcedOverwrite ? { wasForcedOverwrite: true } : {}
|
|
108856
108895
|
};
|
|
108857
108896
|
return success ? toolOk(message, { data }) : toolErr(message, { data });
|
|
108858
108897
|
});
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAdditiveBuffer,
|
|
3
3
|
extractSlackMessageText
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-yy56svjs.js";
|
|
5
5
|
import {
|
|
6
6
|
rewriteSlackMentions
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-ynppb182.js";
|
|
8
8
|
import {
|
|
9
9
|
createTaskWithSiblingAwareness
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-x883h2ky.js";
|
|
11
11
|
import {
|
|
12
12
|
buildBufferFlushBlocks,
|
|
13
13
|
ensureSlackThreadTree,
|
|
14
14
|
getSlackApp,
|
|
15
15
|
isSlackRenderV2Enabled,
|
|
16
16
|
registerTreeMessage
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-dhb6rmf6.js";
|
|
18
18
|
import {
|
|
19
19
|
getLatestActiveTaskInThread,
|
|
20
20
|
getLatestLeadTaskInThread,
|
|
@@ -25,13 +25,13 @@ import {
|
|
|
25
25
|
init_steering,
|
|
26
26
|
requestSteering,
|
|
27
27
|
slackContextKey
|
|
28
|
-
} from "./cli-
|
|
28
|
+
} from "./cli-wa4p03nz.js";
|
|
29
29
|
import {
|
|
30
30
|
init_registry,
|
|
31
31
|
init_steering_enabled,
|
|
32
32
|
isSteeringEnabled,
|
|
33
33
|
registerTemplate
|
|
34
|
-
} from "./cli-
|
|
34
|
+
} from "./cli-hzad20bp.js";
|
|
35
35
|
|
|
36
36
|
// src/slack/event-dedup.ts
|
|
37
37
|
var DEFAULT_TTL_MS = 300000;
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
handleScheduleTrigger,
|
|
5
5
|
runScript,
|
|
6
6
|
startWorkflowExecution
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-n09s3zaf.js";
|
|
8
8
|
import {
|
|
9
9
|
getScript,
|
|
10
10
|
getScriptApiConnectionDescriptors,
|
|
11
11
|
getScriptMcpConnectionDescriptors
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-xg5g50w0.js";
|
|
13
13
|
import {
|
|
14
14
|
createTaskWithSiblingAwareness
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-x883h2ky.js";
|
|
16
16
|
import {
|
|
17
17
|
getDb,
|
|
18
18
|
getDueScheduledTasks,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
scheduleContextKey,
|
|
25
25
|
telemetry,
|
|
26
26
|
updateScheduledTask
|
|
27
|
-
} from "./cli-
|
|
27
|
+
} from "./cli-wa4p03nz.js";
|
|
28
28
|
import {
|
|
29
29
|
__commonJS,
|
|
30
30
|
__require,
|