@desplega.ai/agent-swarm 1.145.0 → 1.146.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/README.md +1 -0
- package/dist/{acp-adapter-580t41c0.js → acp-adapter-jnq4612m.js} +20 -3
- package/dist/{actions-m662tjng.js → actions-s41xcn3f.js} +8 -8
- package/dist/{app-zb3rndm8.js → app-j8bfw3f6.js} +5 -5
- package/dist/{assistant-0qt42nzg.js → assistant-dx3ew4d8.js} +10 -10
- package/dist/{boot-reembed-072x00vn.js → boot-reembed-jxdz46jp.js} +6 -6
- package/dist/{boot-reembed-65zz2smt.js → boot-reembed-x1476agm.js} +7 -7
- package/dist/{boot-scrub-logs-yz0ams04.js → boot-scrub-logs-rab9h5bt.js} +4 -4
- package/dist/{claude-adapter-paj270y2.js → claude-adapter-ep6qekbm.js} +6 -6
- package/dist/{claude-sdk-session-swt80j9z.js → claude-sdk-session-0wp3qrcy.js} +6 -6
- package/dist/{cli-fs1kkqgr.js → cli-00kyrp1a.js} +2 -2
- package/dist/{cli-7fnkj1hj.js → cli-2zvtzevh.js} +8 -6
- package/dist/{cli-123q2get.js → cli-3k2g3kg2.js} +8 -8
- package/dist/{cli-jmb7g47h.js → cli-46yck6nj.js} +7 -7
- package/dist/{cli-wvp6bvy4.js → cli-4secrq32.js} +1 -1
- package/dist/{cli-q34a0e10.js → cli-506z6jqa.js} +1 -1
- package/dist/{cli-rs6ec3b9.js → cli-68h2mfrn.js} +3 -3
- package/dist/{cli-tqtvj5pt.js → cli-6xwhtc64.js} +1 -1
- package/dist/{cli-gzky0gkr.js → cli-a960nkfb.js} +2 -2
- package/dist/{cli-m4j6trn4.js → cli-a9bn9svs.js} +2 -2
- package/dist/{cli-65vqzz3v.js → cli-ah5hjk49.js} +13 -13
- package/dist/{cli-dt553ktb.js → cli-bafd6xnf.js} +1 -1
- package/dist/{cli-ygbjp3z8.js → cli-c8q7292f.js} +3 -3
- package/dist/{cli-f567d5c1.js → cli-d4xqde2b.js} +5 -5
- package/dist/{cli-m1xa8be7.js → cli-d9pnxgth.js} +6 -6
- package/dist/{cli-z9fprcrf.js → cli-dhg6j8h3.js} +76 -22
- package/dist/{cli-bxdhw615.js → cli-jyy3e193.js} +4 -4
- package/dist/{cli-axs8e6d4.js → cli-m4xsy03s.js} +1 -1
- package/dist/{cli-a0g1gbt5.js → cli-pmwbdw36.js} +2 -2
- package/dist/{cli-s2f20r5w.js → cli-pzfc7j7g.js} +2 -2
- package/dist/{cli-z96t0thj.js → cli-q0qq1sxw.js} +1 -1
- package/dist/{cli-gxnzc6wh.js → cli-q3qr220d.js} +1 -1
- package/dist/{cli-1fj0chdk.js → cli-qar1f940.js} +3 -3
- package/dist/{cli-v0asr5yv.js → cli-rymrjneb.js} +2 -2
- package/dist/{cli-xytwff7f.js → cli-s8sbe32s.js} +2 -2
- package/dist/{cli-kpev657q.js → cli-skd674mt.js} +1 -1
- package/dist/{cli-jnf5zghe.js → cli-ss6vybmt.js} +1 -1
- package/dist/{cli-gh8y8f36.js → cli-yqeb27t1.js} +1 -1
- package/dist/{cli-dc9k2ba9.js → cli-yxwe913z.js} +1 -1
- package/dist/{cli-anktweqr.js → cli-zn65x0w8.js} +2 -2
- package/dist/{cli-59ej1c07.js → cli-zww3vcnm.js} +5 -5
- package/dist/cli.js +12 -12
- package/dist/{codex-adapter-k98vaw2r.js → codex-adapter-d6qajxj3.js} +2 -2
- package/dist/{codex-hook-9pf19cks.js → codex-hook-n7m5k7cr.js} +2 -2
- package/dist/{codex-session-runner-tngtphx7.js → codex-session-runner-v9krqe4x.js} +2 -2
- package/dist/{commands-y8nbr3fv.js → commands-923wsas7.js} +4 -4
- package/dist/{db-30p4h2t1.js → db-m1hy4zh5.js} +4 -4
- package/dist/{handlers-yfp1qn81.js → handlers-e9vp2fr8.js} +10 -10
- package/dist/{hook-21jexvfx.js → hook-bxe3bkdy.js} +4 -4
- package/dist/{hook-dcw4jfbj.js → hook-ee4hff56.js} +5 -5
- package/dist/{http-r4kq5g8d.js → http-a8rx91me.js} +44 -39
- package/dist/{index-53zyht4z.js → index-1j9va48r.js} +11 -11
- package/dist/{index-gay66b9w.js → index-3x9g3nbg.js} +12 -12
- package/dist/{index-q3qja6ta.js → index-697zfzv1.js} +14 -14
- package/dist/{index-nqvf26za.js → index-jj4q3x59.js} +13 -13
- package/dist/{keepalive-xs8fa55y.js → keepalive-sds4e4ce.js} +6 -6
- package/dist/{lead-d9m2t4s0.js → lead-ggq6szk8.js} +26 -26
- package/dist/{maintenance-3zh82g6z.js → maintenance-093p41d4.js} +7 -7
- package/dist/{oauth-refresh-sweep-03snsye5.js → oauth-refresh-sweep-dvzq4ckj.js} +5 -5
- package/dist/{onboard-0cg1925x.js → onboard-ydr9tzw5.js} +2 -2
- package/dist/{otel-impl-0ab95z27.js → otel-impl-zx3tdf3j.js} +1 -1
- package/dist/{pricing-refresh-e5jhzz4j.js → pricing-refresh-7e6pqnzp.js} +6 -6
- package/dist/{rbac-roles-2w3cmrkc.js → rbac-roles-0dv1wt0w.js} +4 -4
- package/dist/{rbac-roles-p1mf40z3.js → rbac-roles-p2rh6d0r.js} +5 -5
- package/dist/{render-v2-xhawry3k.js → render-v2-4k3jt4r2.js} +5 -5
- package/dist/{seed-pricing-t223sw91.js → seed-pricing-2cc1qmcd.js} +5 -5
- package/dist/{setup-zcs0rce7.js → setup-c5yss30k.js} +2 -2
- package/dist/{worker-qnp2ka62.js → worker-7srgeqcr.js} +26 -26
- package/openapi.json +1 -1
- package/package.json +1 -1
- package/src/be/db.ts +1 -1
- package/src/be/swarm-config-guard.ts +4 -1
- package/src/http/index.ts +2 -0
- package/src/http/pages.ts +11 -3
- package/src/http/utils.ts +79 -1
- package/src/prompts/session-templates.ts +8 -6
- package/src/providers/acp-adapter.ts +20 -2
- package/src/providers/pricing-sources.md +11 -0
- package/src/tests/acp-adapter.test.ts +119 -2
- package/src/tests/cors-allowlist.test.ts +309 -0
- package/src/tests/reload-config.test.ts +26 -0
- package/src/tests/swarm-config-reserved-keys.test.ts +21 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderSteeringDelivery
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-bafd6xnf.js";
|
|
4
4
|
import {
|
|
5
5
|
checkCodexCredentials,
|
|
6
6
|
codexUserHome
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-q3qr220d.js";
|
|
8
8
|
import {
|
|
9
9
|
checkClaudeManagedCredentials
|
|
10
10
|
} from "./cli-cn6mmc7f.js";
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
renderMemoriesPrompt,
|
|
19
19
|
resolveScriptsOnlyMode,
|
|
20
20
|
writeSkillsToFilesystem
|
|
21
|
-
} from "./cli-
|
|
21
|
+
} from "./cli-dhg6j8h3.js";
|
|
22
22
|
import {
|
|
23
23
|
checkClaudeCredentials
|
|
24
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-rymrjneb.js";
|
|
25
25
|
import {
|
|
26
26
|
MAX_RATE_LIMIT_RESET_MS,
|
|
27
27
|
isCodexCreditsExhaustedMessage,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
} from "./cli-s25avqg9.js";
|
|
35
35
|
import {
|
|
36
36
|
validateJsonSchema
|
|
37
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-3k2g3kg2.js";
|
|
38
38
|
import {
|
|
39
39
|
authJsonToCredentialSelection,
|
|
40
40
|
credentialsToAuthJson,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
syncProfileFilesToServer,
|
|
58
58
|
writeIdentityBaselines,
|
|
59
59
|
writeProfileFileFromDb
|
|
60
|
-
} from "./cli-
|
|
60
|
+
} from "./cli-00kyrp1a.js";
|
|
61
61
|
import {
|
|
62
62
|
ensure,
|
|
63
63
|
initOtel,
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
taskAttachmentDisplayUrl,
|
|
69
69
|
withSpan,
|
|
70
70
|
withSpanContext
|
|
71
|
-
} from "./cli-
|
|
71
|
+
} from "./cli-46yck6nj.js";
|
|
72
72
|
import {
|
|
73
73
|
ProviderNameSchema,
|
|
74
74
|
initTelemetry,
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
init_types,
|
|
77
77
|
resolveTaskModelSelection,
|
|
78
78
|
telemetry
|
|
79
|
-
} from "./cli-
|
|
79
|
+
} from "./cli-d4xqde2b.js";
|
|
80
80
|
import {
|
|
81
81
|
generateDefaultClaudeMd,
|
|
82
82
|
generateDefaultIdentityMd,
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
init_base_prompt,
|
|
87
87
|
init_defaults,
|
|
88
88
|
init_templates
|
|
89
|
-
} from "./cli-
|
|
89
|
+
} from "./cli-skd674mt.js";
|
|
90
90
|
import {
|
|
91
91
|
configureHttpResolver,
|
|
92
92
|
init_resolver,
|
|
@@ -95,7 +95,7 @@ import {
|
|
|
95
95
|
interpolate,
|
|
96
96
|
isSteeringEnabled,
|
|
97
97
|
resolveTemplateAsync
|
|
98
|
-
} from "./cli-
|
|
98
|
+
} from "./cli-2zvtzevh.js";
|
|
99
99
|
import {
|
|
100
100
|
getMcpBaseUrl,
|
|
101
101
|
init_constants
|
|
@@ -144,7 +144,7 @@ async function materializeCodexAuthJson(_slot, creds, deps = {}) {
|
|
|
144
144
|
async function createProviderAdapter(provider) {
|
|
145
145
|
switch (provider) {
|
|
146
146
|
case "claude": {
|
|
147
|
-
const { ClaudeAdapter } = await import("./claude-adapter-
|
|
147
|
+
const { ClaudeAdapter } = await import("./claude-adapter-ep6qekbm.js");
|
|
148
148
|
return new ClaudeAdapter;
|
|
149
149
|
}
|
|
150
150
|
case "pi": {
|
|
@@ -152,7 +152,7 @@ async function createProviderAdapter(provider) {
|
|
|
152
152
|
return new PiMonoAdapter;
|
|
153
153
|
}
|
|
154
154
|
case "codex": {
|
|
155
|
-
const { CodexAdapter } = await import("./codex-adapter-
|
|
155
|
+
const { CodexAdapter } = await import("./codex-adapter-d6qajxj3.js");
|
|
156
156
|
return new CodexAdapter;
|
|
157
157
|
}
|
|
158
158
|
case "claude-managed": {
|
|
@@ -168,7 +168,7 @@ async function createProviderAdapter(provider) {
|
|
|
168
168
|
return new OpencodeAdapter;
|
|
169
169
|
}
|
|
170
170
|
case "acp": {
|
|
171
|
-
const { ACPAdapter } = await import("./acp-adapter-
|
|
171
|
+
const { ACPAdapter } = await import("./acp-adapter-jnq4612m.js");
|
|
172
172
|
return new ACPAdapter;
|
|
173
173
|
}
|
|
174
174
|
default:
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SYSTEM_COLUMN_KINDS,
|
|
3
3
|
listAppRecords
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-a960nkfb.js";
|
|
5
5
|
import {
|
|
6
6
|
getScriptApiTypes,
|
|
7
7
|
getScriptMcpTypes,
|
|
8
8
|
require_typescript
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-68h2mfrn.js";
|
|
10
10
|
import {
|
|
11
11
|
deleteSwarmConfigByKey,
|
|
12
12
|
getAgentById,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
getSwarmConfigs,
|
|
16
16
|
init_db,
|
|
17
17
|
upsertSwarmConfig
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-d4xqde2b.js";
|
|
19
19
|
import {
|
|
20
20
|
init_secret_scrubber,
|
|
21
21
|
scrubSecrets
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
init_templates,
|
|
11
11
|
matchesDefaultClaudeMd,
|
|
12
12
|
matchesDefaultIdentityMd
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-skd674mt.js";
|
|
14
14
|
import {
|
|
15
15
|
configureDbResolver,
|
|
16
16
|
getAllTemplateDefinitions,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
init_steering_enabled,
|
|
21
21
|
isSteeringEnabled,
|
|
22
22
|
registerTemplate
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-2zvtzevh.js";
|
|
24
24
|
import {
|
|
25
25
|
MAX_PROFILE_FILE_LENGTH,
|
|
26
26
|
init_constants
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
import {
|
|
49
49
|
init_package,
|
|
50
50
|
package_default
|
|
51
|
-
} from "./cli-
|
|
51
|
+
} from "./cli-yxwe913z.js";
|
|
52
52
|
import {
|
|
53
53
|
init_secret_scrubber,
|
|
54
54
|
registerVolatileSecret,
|
|
@@ -5452,7 +5452,7 @@ var RESERVED_KEYS, BOOLEAN_LITERALS, MAX_DB_RETENTION_DAYS = 1e6, DB_RETENTION_T
|
|
|
5452
5452
|
var init_swarm_config_guard = __esm(() => {
|
|
5453
5453
|
init_reaction_shortcode();
|
|
5454
5454
|
init_types();
|
|
5455
|
-
RESERVED_KEYS = new Set(["API_KEY", "SECRETS_ENCRYPTION_KEY"]);
|
|
5455
|
+
RESERVED_KEYS = new Set(["API_KEY", "SECRETS_ENCRYPTION_KEY", "CORS_ALLOW_ANY_ORIGIN"]);
|
|
5456
5456
|
BOOLEAN_LITERALS = ["true", "false", "1", "0"];
|
|
5457
5457
|
DB_RETENTION_TUNING_BOUNDS = {
|
|
5458
5458
|
DB_RETENTION_TICK_BUDGET_MS: { min: 1000, max: 300000 },
|
|
@@ -11049,7 +11049,7 @@ async function getSwarmConfigs(filters) {
|
|
|
11049
11049
|
async function getInjectableGlobalConfigs() {
|
|
11050
11050
|
const rows = await getDbClient().query(`SELECT * FROM swarm_config
|
|
11051
11051
|
WHERE scope = 'global'
|
|
11052
|
-
AND UPPER(key) NOT IN ('API_KEY', 'SECRETS_ENCRYPTION_KEY')
|
|
11052
|
+
AND UPPER(key) NOT IN ('API_KEY', 'SECRETS_ENCRYPTION_KEY', 'CORS_ALLOW_ANY_ORIGIN')
|
|
11053
11053
|
ORDER BY key ASC`);
|
|
11054
11054
|
return rows.map(rowToSwarmConfig);
|
|
11055
11055
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAdditiveBuffer,
|
|
3
3
|
extractSlackMessageText
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-ss6vybmt.js";
|
|
5
5
|
import {
|
|
6
6
|
rewriteSlackMentions
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-s8sbe32s.js";
|
|
8
8
|
import {
|
|
9
9
|
createTaskWithSiblingAwareness
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-m4xsy03s.js";
|
|
11
11
|
import {
|
|
12
12
|
buildBufferFlushBlocks,
|
|
13
13
|
ensureSlackThreadTree,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
getSlackApp,
|
|
17
17
|
isSlackRenderV2Enabled,
|
|
18
18
|
registerTreeMessage
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-46yck6nj.js";
|
|
20
20
|
import {
|
|
21
21
|
createLogEntry,
|
|
22
22
|
getAgentById,
|
|
@@ -29,13 +29,13 @@ import {
|
|
|
29
29
|
init_steering,
|
|
30
30
|
requestSteering,
|
|
31
31
|
slackContextKey
|
|
32
|
-
} from "./cli-
|
|
32
|
+
} from "./cli-d4xqde2b.js";
|
|
33
33
|
import {
|
|
34
34
|
init_registry,
|
|
35
35
|
init_steering_enabled,
|
|
36
36
|
isSteeringEnabled,
|
|
37
37
|
registerTemplate
|
|
38
|
-
} from "./cli-
|
|
38
|
+
} from "./cli-2zvtzevh.js";
|
|
39
39
|
|
|
40
40
|
// src/slack/event-dedup.ts
|
|
41
41
|
var DEFAULT_TTL_MS = 300000;
|
|
@@ -11,17 +11,17 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
calculateNextRun,
|
|
13
13
|
runScheduleNow
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-zww3vcnm.js";
|
|
15
15
|
import {
|
|
16
16
|
startPricingRefreshLoop
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-a9bn9svs.js";
|
|
18
18
|
import {
|
|
19
19
|
seedPricingFromModelsDev
|
|
20
|
-
} from "./cli-
|
|
20
|
+
} from "./cli-yqeb27t1.js";
|
|
21
21
|
import {
|
|
22
22
|
ensureRbacSeedsSynced,
|
|
23
23
|
getUserGrant
|
|
24
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-506z6jqa.js";
|
|
25
25
|
import {
|
|
26
26
|
can,
|
|
27
27
|
decideAdmission,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
runSavedScriptAsAgent,
|
|
49
49
|
updateApp,
|
|
50
50
|
upgradeAppDefinition
|
|
51
|
-
} from "./cli-
|
|
51
|
+
} from "./cli-a960nkfb.js";
|
|
52
52
|
import {
|
|
53
53
|
require_dist as require_dist2
|
|
54
54
|
} from "./cli-qgm2pfpq.js";
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
updateTrackerSync,
|
|
73
73
|
updateTrackerSyncSwarmId,
|
|
74
74
|
upsertSwarmConfigWithPolicyMirror
|
|
75
|
-
} from "./cli-
|
|
75
|
+
} from "./cli-qar1f940.js";
|
|
76
76
|
import {
|
|
77
77
|
isMultiRuntimeEnabled
|
|
78
78
|
} from "./cli-07jd68a1.js";
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
snapshotWorkflow,
|
|
87
87
|
startWorkflowExecution,
|
|
88
88
|
validateJsonSchema
|
|
89
|
-
} from "./cli-
|
|
89
|
+
} from "./cli-3k2g3kg2.js";
|
|
90
90
|
import {
|
|
91
91
|
ConnectionAuthInputSchema,
|
|
92
92
|
SCRIPT_LONG_TIMEOUT_HINT_MS,
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
upsertCredentialBinding,
|
|
110
110
|
upsertScriptConnection,
|
|
111
111
|
validateDefinition
|
|
112
|
-
} from "./cli-
|
|
112
|
+
} from "./cli-68h2mfrn.js";
|
|
113
113
|
import {
|
|
114
114
|
CANDIDATE_SET_MULTIPLIER,
|
|
115
115
|
computeScore,
|
|
@@ -121,7 +121,7 @@ import {
|
|
|
121
121
|
isGraphExpansionEnabled,
|
|
122
122
|
rerank,
|
|
123
123
|
rowToCandidate
|
|
124
|
-
} from "./cli-
|
|
124
|
+
} from "./cli-pzfc7j7g.js";
|
|
125
125
|
import {
|
|
126
126
|
getApiKey
|
|
127
127
|
} from "./cli-f14fvzag.js";
|
|
@@ -139,7 +139,7 @@ import {
|
|
|
139
139
|
listAuthorizationsForApp,
|
|
140
140
|
onAuthorizationRefreshed,
|
|
141
141
|
upsertOAuthApp
|
|
142
|
-
} from "./cli-
|
|
142
|
+
} from "./cli-4secrq32.js";
|
|
143
143
|
import {
|
|
144
144
|
ZodFirstPartyTypeKind,
|
|
145
145
|
objectType
|
|
@@ -154,7 +154,7 @@ import {
|
|
|
154
154
|
createAdditiveBuffer,
|
|
155
155
|
extractSlackMessageText,
|
|
156
156
|
parseSlackTs
|
|
157
|
-
} from "./cli-
|
|
157
|
+
} from "./cli-ss6vybmt.js";
|
|
158
158
|
import {
|
|
159
159
|
findOrCreateUserByEmail,
|
|
160
160
|
findUserByExternalId,
|
|
@@ -170,10 +170,10 @@ import {
|
|
|
170
170
|
resolveIdentityByEmail,
|
|
171
171
|
resolveUserByToken,
|
|
172
172
|
unlinkIdentity
|
|
173
|
-
} from "./cli-
|
|
173
|
+
} from "./cli-q0qq1sxw.js";
|
|
174
174
|
import {
|
|
175
175
|
createTaskWithSiblingAwareness
|
|
176
|
-
} from "./cli-
|
|
176
|
+
} from "./cli-m4xsy03s.js";
|
|
177
177
|
import {
|
|
178
178
|
ensure,
|
|
179
179
|
getAgentDisplayName,
|
|
@@ -184,7 +184,7 @@ import {
|
|
|
184
184
|
startSlackApp,
|
|
185
185
|
stopSlackApp,
|
|
186
186
|
withSpan
|
|
187
|
-
} from "./cli-
|
|
187
|
+
} from "./cli-46yck6nj.js";
|
|
188
188
|
import {
|
|
189
189
|
$OpenAPIRegistry,
|
|
190
190
|
$OpenApiGeneratorV31,
|
|
@@ -431,13 +431,13 @@ import {
|
|
|
431
431
|
upsertPromptTemplate,
|
|
432
432
|
upsertService,
|
|
433
433
|
validateConfigValue
|
|
434
|
-
} from "./cli-
|
|
434
|
+
} from "./cli-d4xqde2b.js";
|
|
435
435
|
import {
|
|
436
436
|
generateDefaultClaudeMd,
|
|
437
437
|
generateDefaultIdentityMd,
|
|
438
438
|
generateDefaultSoulMd,
|
|
439
439
|
init_defaults
|
|
440
|
-
} from "./cli-
|
|
440
|
+
} from "./cli-skd674mt.js";
|
|
441
441
|
import {
|
|
442
442
|
getTemplateDefinition,
|
|
443
443
|
init_registry,
|
|
@@ -446,7 +446,7 @@ import {
|
|
|
446
446
|
interpolate,
|
|
447
447
|
registerTemplate,
|
|
448
448
|
resolveTemplate
|
|
449
|
-
} from "./cli-
|
|
449
|
+
} from "./cli-2zvtzevh.js";
|
|
450
450
|
import {
|
|
451
451
|
MAX_PROFILE_FILE_LENGTH,
|
|
452
452
|
getAppUrl,
|
|
@@ -507,7 +507,7 @@ import {
|
|
|
507
507
|
import {
|
|
508
508
|
init_package,
|
|
509
509
|
package_default
|
|
510
|
-
} from "./cli-
|
|
510
|
+
} from "./cli-yxwe913z.js";
|
|
511
511
|
import {
|
|
512
512
|
init_secret_scrubber,
|
|
513
513
|
refreshSecretScrubberCache,
|
|
@@ -22295,7 +22295,7 @@ async function notifySlack(text) {
|
|
|
22295
22295
|
return;
|
|
22296
22296
|
}
|
|
22297
22297
|
try {
|
|
22298
|
-
const { getSlackApp: getSlackApp2 } = await import("./app-
|
|
22298
|
+
const { getSlackApp: getSlackApp2 } = await import("./app-j8bfw3f6.js");
|
|
22299
22299
|
const app = getSlackApp2();
|
|
22300
22300
|
if (!app) {
|
|
22301
22301
|
console.warn("[Jira webhook keepalive] Slack not available, cannot send notification");
|
|
@@ -22366,7 +22366,7 @@ async function deleteJiraWebhook(webhookId) {
|
|
|
22366
22366
|
console.log(`[Jira webhook keepalive] Deleted webhook id=${webhookId}`);
|
|
22367
22367
|
}
|
|
22368
22368
|
async function overwriteWebhookIds(next) {
|
|
22369
|
-
const { getDbClient: getDbClient2 } = await import("./db-
|
|
22369
|
+
const { getDbClient: getDbClient2 } = await import("./db-m1hy4zh5.js");
|
|
22370
22370
|
await getDbClient2().transaction(async (tx) => {
|
|
22371
22371
|
const row = await tx.get("SELECT metadata FROM oauth_apps WHERE provider = 'jira'");
|
|
22372
22372
|
if (!row) {
|
|
@@ -95438,14 +95438,68 @@ init_secret_scrubber();
|
|
|
95438
95438
|
|
|
95439
95439
|
// src/http/utils.ts
|
|
95440
95440
|
init_db();
|
|
95441
|
+
init_env_flag();
|
|
95441
95442
|
init_secret_scrubber();
|
|
95443
|
+
var DEFAULT_ALLOWED_ORIGINS = [
|
|
95444
|
+
"https://*.agent-swarm.dev",
|
|
95445
|
+
"https://*.agent-swarm.cloud",
|
|
95446
|
+
"http://localhost:5274",
|
|
95447
|
+
"http://127.0.0.1:5274",
|
|
95448
|
+
"http://[::1]:5274",
|
|
95449
|
+
"https://ui.swarm.localhost:1355"
|
|
95450
|
+
];
|
|
95451
|
+
var warnedAboutAllowAnyOrigin = false;
|
|
95452
|
+
function warnIfCorsAllowsAnyOrigin() {
|
|
95453
|
+
if (isEnvFlagEnabled("CORS_ALLOW_ANY_ORIGIN", false) && !warnedAboutAllowAnyOrigin) {
|
|
95454
|
+
warnedAboutAllowAnyOrigin = true;
|
|
95455
|
+
console.warn("[CORS] CORS_ALLOW_ANY_ORIGIN=true: any request origin can receive non-credentialed responses; cookie-authenticated responses still require CORS_ALLOWED_ORIGINS. Set CORS_ALLOWED_ORIGINS and disable CORS_ALLOW_ANY_ORIGIN to restrict access.");
|
|
95456
|
+
}
|
|
95457
|
+
}
|
|
95458
|
+
function getAllowedOrigins() {
|
|
95459
|
+
const raw = process.env.CORS_ALLOWED_ORIGINS;
|
|
95460
|
+
if (!raw || !raw.trim())
|
|
95461
|
+
return DEFAULT_ALLOWED_ORIGINS;
|
|
95462
|
+
return raw.split(",").map((entry) => entry.trim()).filter(Boolean);
|
|
95463
|
+
}
|
|
95464
|
+
function isOriginAllowedForCredentials(origin) {
|
|
95465
|
+
const allowed = getAllowedOrigins().some((entry) => {
|
|
95466
|
+
if (!entry.includes("*"))
|
|
95467
|
+
return entry === origin;
|
|
95468
|
+
const pattern = /^([a-zA-Z][a-zA-Z0-9+.-]*):\/\/\*\.([a-zA-Z0-9.-]+)(:\d+)?$/.exec(entry);
|
|
95469
|
+
const candidate = /^([a-zA-Z][a-zA-Z0-9+.-]*):\/\/([a-zA-Z0-9.-]+)(:\d+)?$/.exec(origin);
|
|
95470
|
+
if (!pattern || !candidate)
|
|
95471
|
+
return false;
|
|
95472
|
+
if (pattern[1] !== candidate[1] || pattern[3] !== candidate[3])
|
|
95473
|
+
return false;
|
|
95474
|
+
const suffix = pattern[2].toLowerCase();
|
|
95475
|
+
const hostname = candidate[2].toLowerCase();
|
|
95476
|
+
const validLabel = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;
|
|
95477
|
+
if (![...suffix.split("."), ...hostname.split(".")].every((label) => validLabel.test(label))) {
|
|
95478
|
+
return false;
|
|
95479
|
+
}
|
|
95480
|
+
return hostname.endsWith(`.${suffix}`);
|
|
95481
|
+
});
|
|
95482
|
+
if (!allowed) {
|
|
95483
|
+
console.warn(`[CORS] Denied credentialed origin ${scrubSecrets(JSON.stringify(origin.slice(0, 512)))}; add the trusted SPA origin to CORS_ALLOWED_ORIGINS (custom values replace hosted/dev defaults).`);
|
|
95484
|
+
}
|
|
95485
|
+
return allowed;
|
|
95486
|
+
}
|
|
95442
95487
|
function setCorsHeaders(req, res) {
|
|
95443
95488
|
const rawOrigin = req.headers.origin;
|
|
95444
95489
|
const origin = Array.isArray(rawOrigin) ? rawOrigin[0] : rawOrigin;
|
|
95490
|
+
const allowCredentials = origin ? isOriginAllowedForCredentials(origin) : false;
|
|
95491
|
+
const allowAnyOrigin = isEnvFlagEnabled("CORS_ALLOW_ANY_ORIGIN", false);
|
|
95492
|
+
if (allowAnyOrigin)
|
|
95493
|
+
warnIfCorsAllowsAnyOrigin();
|
|
95494
|
+
if (origin && !allowCredentials && !allowAnyOrigin) {
|
|
95495
|
+
res.setHeader("Vary", "Origin");
|
|
95496
|
+
return;
|
|
95497
|
+
}
|
|
95445
95498
|
if (origin) {
|
|
95446
95499
|
res.setHeader("Access-Control-Allow-Origin", origin);
|
|
95447
95500
|
res.setHeader("Vary", "Origin");
|
|
95448
|
-
|
|
95501
|
+
if (allowCredentials)
|
|
95502
|
+
res.setHeader("Access-Control-Allow-Credentials", "true");
|
|
95449
95503
|
const reqHeaders = req.headers["access-control-request-headers"];
|
|
95450
95504
|
const askedHeaders = Array.isArray(reqHeaders) ? reqHeaders.join(", ") : reqHeaders;
|
|
95451
95505
|
res.setHeader("Access-Control-Allow-Headers", askedHeaders ?? "Authorization, Content-Type, X-Agent-ID, X-Requested-With");
|
|
@@ -121593,4 +121647,4 @@ function writeSkillsToFilesystem(entries, harnessType = "all", home) {
|
|
|
121593
121647
|
return { synced, removed, errors };
|
|
121594
121648
|
}
|
|
121595
121649
|
|
|
121596
|
-
export { safeParseAsync2 as safeParseAsync, normalizeObjectSchema, getParseErrorMessage, DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, isJSONRPCRequest, isJSONRPCResultResponse, isJSONRPCErrorResponse, JSONRPCMessageSchema, isInitializeRequest, McpServer, isGitHubEnabled, initGitHub, verifyWebhookSignature, isAgentMailEnabled, initAgentMail, verifyAgentMailWebhook, isInboxAllowed, isSenderAllowed, handleMessageReceived, enqueueAuditRow, enqueueAdmissionRow, flushAuditBuffer, startAuditWriter, stopAuditWriter, startAuditGc, stopAuditGc, handlePullRequest, handleIssue, handleComment, handlePullRequestReview, handleCheckRun, handleCheckSuite, handleWorkflowRun, isGitLabEnabled, initGitLab, verifyGitLabWebhook, handleMergeRequest, handleIssue2 as handleIssue1, handleNote, handlePipeline, getJiraMetadata, updateJiraMetadata, clearJiraMetadata, registerJiraWebhook, deleteJiraWebhook, isJiraEnabled, initJira, handleJiraWebhook, handleAgentSessionEvent, handleIssueUpdate, handleIssueDelete, handleAgentSessionPrompted, isLinearEnabled, initLinear, parseCookieHeader, extractAndVerifyCookie, issuePageSessionCookie, resolveHttpRequestAuth, setCorsHeaders, parseQueryParams, getPathSegments, wireHttpSpanLifecycle, safeRequestUrlForLog, agentWithCapacity, parseBody, BODY_TOO_LARGE, enforceContentLengthCap, json, jsonError, triggerSchemaErrorResponse, deriveApiBaseUrl, httpServerSemconvAttributes, runtimeInstanceHeader, describeRequestRoute, route, loadGlobalConfigsIntoEnv, reloadGlobalConfigsAndIntegrations, scheduleIntegrationsReload, handleCore, mcpOverflowAuthError, markScriptSdkRequestOrigin, toolErr, createToolRegistrar, userCtx, resolveTaskAuditUserId, resolveHttpAuditUserId, resolveHttpFavoriteOwner, handleApps, getUserCommsPrefs, getTaskDetailsInputSchema, getTaskDetailsOutputSchema, getTaskDetailsHandler, cancelTaskInputSchema, cancelTaskOutputSchema, cancelTaskHandler, executeReadOnlyQuery, assertSelectOnlyQuery, handleDbQuery, snapshotMetric, AssetKeyAuthorizationError, authorizeAssetKeyWrite, snapshotPage, assertOAuthAppUrlsSafe, assertOAuthEgressUrlSafe, listOAuthPresets, listOAuthPresetIds, getOAuthPreset, hydrateOAuthAppFromPreset, scopedResourceScopeIdSchema, resolveScopedResourceId, getTasksInputSchema, getTasksOutputSchema, getTasksHandler, reservedNamespaceError, reservedRoomKeyError, refreshLinks, canReadMemory, getLinksForMemory, dedupeMemoryDocumentIds, recordMemoryAccesses, recordRetrievals, expandCandidatesWithGraph, indexMemoryContent, markKapsoMessageRead, sendKapsoReaction, getKapsoConfig, getKapsoNumberMapping, markKapsoMessageSeen, resolveRoomNamespace, roomRequestInfo, authorizeRoomNamespace, RoomOperationSchema, removeAwarenessStates, roomTopic, decodeRoomSnapshot, roomView, getRoom, changeRoom, applyRoomUpdate, resetRoom, sweepRooms, closeRooms, removeNamespaceRooms, createEvent, createEventsBatch, getEventCountsFiltered, getEventsFiltered, mergeScheduleTiming, validateRecurringTiming, checkOutputSchemaShape, sendTaskOutputSchema, sendTaskHandler, parseSkillContent, steerTaskUserInputSchema, steerTaskOutputSchema, steerTaskHandler, ExplicitSelfDuplicateError, applyRating, shouldPersistAutomaticTaskMemory, guardTerminalTaskResultWrite, canClaim, emitBudgetRefusalSideEffects, taskActionInputSchema, taskActionOutputSchema, taskActionHandler, patchWorkflowDefinition, resolveScriptsOnlyMode, ALL_CAPABILITIES, hasCapability, getEnabledCapabilities, createServer, SIMILARITY_THRESHOLD, renderMemoriesPrompt, writeSkillsToFilesystem };
|
|
121650
|
+
export { safeParseAsync2 as safeParseAsync, normalizeObjectSchema, getParseErrorMessage, DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, isJSONRPCRequest, isJSONRPCResultResponse, isJSONRPCErrorResponse, JSONRPCMessageSchema, isInitializeRequest, McpServer, isGitHubEnabled, initGitHub, verifyWebhookSignature, isAgentMailEnabled, initAgentMail, verifyAgentMailWebhook, isInboxAllowed, isSenderAllowed, handleMessageReceived, enqueueAuditRow, enqueueAdmissionRow, flushAuditBuffer, startAuditWriter, stopAuditWriter, startAuditGc, stopAuditGc, handlePullRequest, handleIssue, handleComment, handlePullRequestReview, handleCheckRun, handleCheckSuite, handleWorkflowRun, isGitLabEnabled, initGitLab, verifyGitLabWebhook, handleMergeRequest, handleIssue2 as handleIssue1, handleNote, handlePipeline, getJiraMetadata, updateJiraMetadata, clearJiraMetadata, registerJiraWebhook, deleteJiraWebhook, isJiraEnabled, initJira, handleJiraWebhook, handleAgentSessionEvent, handleIssueUpdate, handleIssueDelete, handleAgentSessionPrompted, isLinearEnabled, initLinear, parseCookieHeader, extractAndVerifyCookie, issuePageSessionCookie, resolveHttpRequestAuth, warnIfCorsAllowsAnyOrigin, isOriginAllowedForCredentials, setCorsHeaders, parseQueryParams, getPathSegments, wireHttpSpanLifecycle, safeRequestUrlForLog, agentWithCapacity, parseBody, BODY_TOO_LARGE, enforceContentLengthCap, json, jsonError, triggerSchemaErrorResponse, deriveApiBaseUrl, httpServerSemconvAttributes, runtimeInstanceHeader, describeRequestRoute, route, loadGlobalConfigsIntoEnv, reloadGlobalConfigsAndIntegrations, scheduleIntegrationsReload, handleCore, mcpOverflowAuthError, markScriptSdkRequestOrigin, toolErr, createToolRegistrar, userCtx, resolveTaskAuditUserId, resolveHttpAuditUserId, resolveHttpFavoriteOwner, handleApps, getUserCommsPrefs, getTaskDetailsInputSchema, getTaskDetailsOutputSchema, getTaskDetailsHandler, cancelTaskInputSchema, cancelTaskOutputSchema, cancelTaskHandler, executeReadOnlyQuery, assertSelectOnlyQuery, handleDbQuery, snapshotMetric, AssetKeyAuthorizationError, authorizeAssetKeyWrite, snapshotPage, assertOAuthAppUrlsSafe, assertOAuthEgressUrlSafe, listOAuthPresets, listOAuthPresetIds, getOAuthPreset, hydrateOAuthAppFromPreset, scopedResourceScopeIdSchema, resolveScopedResourceId, getTasksInputSchema, getTasksOutputSchema, getTasksHandler, reservedNamespaceError, reservedRoomKeyError, refreshLinks, canReadMemory, getLinksForMemory, dedupeMemoryDocumentIds, recordMemoryAccesses, recordRetrievals, expandCandidatesWithGraph, indexMemoryContent, markKapsoMessageRead, sendKapsoReaction, getKapsoConfig, getKapsoNumberMapping, markKapsoMessageSeen, resolveRoomNamespace, roomRequestInfo, authorizeRoomNamespace, RoomOperationSchema, removeAwarenessStates, roomTopic, decodeRoomSnapshot, roomView, getRoom, changeRoom, applyRoomUpdate, resetRoom, sweepRooms, closeRooms, removeNamespaceRooms, createEvent, createEventsBatch, getEventCountsFiltered, getEventsFiltered, mergeScheduleTiming, validateRecurringTiming, checkOutputSchemaShape, sendTaskOutputSchema, sendTaskHandler, parseSkillContent, steerTaskUserInputSchema, steerTaskOutputSchema, steerTaskHandler, ExplicitSelfDuplicateError, applyRating, shouldPersistAutomaticTaskMemory, guardTerminalTaskResultWrite, canClaim, emitBudgetRefusalSideEffects, taskActionInputSchema, taskActionOutputSchema, taskActionHandler, patchWorkflowDefinition, resolveScriptsOnlyMode, ALL_CAPABILITIES, hasCapability, getEnabledCapabilities, createServer, SIMILARITY_THRESHOLD, renderMemoriesPrompt, writeSkillsToFilesystem };
|
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
getResumeGeneration,
|
|
12
12
|
repointTrackerSyncBySwarmId,
|
|
13
13
|
resolveLeadOnlyRecoveryAssignment
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-qar1f940.js";
|
|
15
15
|
import {
|
|
16
16
|
isMultiRuntimeEnabled
|
|
17
17
|
} from "./cli-07jd68a1.js";
|
|
18
18
|
import {
|
|
19
19
|
getExecutorRegistry,
|
|
20
20
|
recoverIncompleteRuns
|
|
21
|
-
} from "./cli-
|
|
21
|
+
} from "./cli-3k2g3kg2.js";
|
|
22
22
|
import {
|
|
23
23
|
MAX_EMPTY_POLLS,
|
|
24
24
|
assignUnassignedTaskPending,
|
|
@@ -61,13 +61,13 @@ import {
|
|
|
61
61
|
releaseStaleReviewingTasks,
|
|
62
62
|
supersedeTask,
|
|
63
63
|
updateAgentStatus
|
|
64
|
-
} from "./cli-
|
|
64
|
+
} from "./cli-d4xqde2b.js";
|
|
65
65
|
import {
|
|
66
66
|
init_registry,
|
|
67
67
|
init_resolver,
|
|
68
68
|
registerTemplate,
|
|
69
69
|
resolveTemplate
|
|
70
|
-
} from "./cli-
|
|
70
|
+
} from "./cli-2zvtzevh.js";
|
|
71
71
|
import {
|
|
72
72
|
init_secret_scrubber,
|
|
73
73
|
scrubSecrets
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
getEmbeddingProvider,
|
|
5
5
|
init_embedding,
|
|
6
6
|
serializeEmbedding
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-pzfc7j7g.js";
|
|
8
8
|
import {
|
|
9
9
|
getDbClient,
|
|
10
10
|
init_db
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-d4xqde2b.js";
|
|
12
12
|
import {
|
|
13
13
|
init_secret_scrubber,
|
|
14
14
|
scrubSecrets
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
contentSha256,
|
|
3
3
|
init_profile_sync
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-00kyrp1a.js";
|
|
5
5
|
import {
|
|
6
6
|
OpenAI,
|
|
7
7
|
init_openai
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getDbClient,
|
|
12
12
|
init_db,
|
|
13
13
|
isSqliteVecAvailable
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-d4xqde2b.js";
|
|
15
15
|
import {
|
|
16
16
|
__esm,
|
|
17
17
|
__export,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./cli-07jd68a1.js";
|
|
4
4
|
import {
|
|
5
5
|
taskAttachmentDisplayUrl
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-46yck6nj.js";
|
|
7
7
|
import {
|
|
8
8
|
buildRoutingAffinityFromAgent,
|
|
9
9
|
createLogEntry,
|
|
@@ -25,11 +25,11 @@ import {
|
|
|
25
25
|
updateAgentMaxTasks,
|
|
26
26
|
updateAgentStatus,
|
|
27
27
|
upsertSwarmConfig
|
|
28
|
-
} from "./cli-
|
|
28
|
+
} from "./cli-d4xqde2b.js";
|
|
29
29
|
import {
|
|
30
30
|
init_resolver,
|
|
31
31
|
resolveTemplate
|
|
32
|
-
} from "./cli-
|
|
32
|
+
} from "./cli-2zvtzevh.js";
|
|
33
33
|
import {
|
|
34
34
|
init_env_flag,
|
|
35
35
|
isEnvFlagEnabled
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runStopHookSessionSummarySubprocess
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-zn65x0w8.js";
|
|
4
4
|
import {
|
|
5
5
|
SessionErrorTracker,
|
|
6
6
|
buildOtelTraceparentEnv,
|
|
@@ -817,7 +817,7 @@ class ClaudeAdapter {
|
|
|
817
817
|
if (transport === "sdk" && isClaudeBridgeEffective(sourceEnv)) {
|
|
818
818
|
throw new Error("CLAUDE_TRANSPORT=sdk cannot run with an effective Claude Bridge configuration. Select CLI transport or disable the bridge.");
|
|
819
819
|
}
|
|
820
|
-
const claudeSdk = transport === "sdk" ? await import("./claude-sdk-session-
|
|
820
|
+
const claudeSdk = transport === "sdk" ? await import("./claude-sdk-session-0wp3qrcy.js") : undefined;
|
|
821
821
|
claudeSdk?.validateClaudeSdkAdditionalArgs([
|
|
822
822
|
...claudeBinaryArgv.slice(1),
|
|
823
823
|
...config.additionalArgs ?? []
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
linkIdentity,
|
|
5
5
|
recordUnmappedIdentity,
|
|
6
6
|
resolveIdentity
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-q0qq1sxw.js";
|
|
8
8
|
import {
|
|
9
9
|
getKv,
|
|
10
10
|
init_db,
|
|
11
11
|
upsertKv
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-d4xqde2b.js";
|
|
13
13
|
|
|
14
14
|
// src/slack/enrich.ts
|
|
15
15
|
init_db();
|
|
@@ -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.
|
|
10
|
+
version: "1.146.0",
|
|
11
11
|
description: "agent-swarm.dev — an open-source operating system for AI work: a lead agent breaks goals into tasks, routes them to specialized workers such as Claude Code or Codex, runs each worker in an isolated container, and preserves shared memory, tools, schedules, and review gates so delegated work compounds across sessions.",
|
|
12
12
|
keywords: [
|
|
13
13
|
"agent-swarm.dev",
|