@desplega.ai/agent-swarm 1.122.1 → 1.123.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 +2 -0
- package/dist/{actions-rd8p2zqb.js → actions-e4c9f0xy.js} +5 -5
- package/dist/{app-v839gywt.js → app-vmvmj2v3.js} +3 -3
- package/dist/{assistant-qjp128zg.js → assistant-yn7a792a.js} +13 -10
- package/dist/{boot-reembed-3fjfyz1h.js → boot-reembed-chxty50a.js} +4 -4
- package/dist/{boot-reembed-e4b9xsa1.js → boot-reembed-xg1r86h2.js} +3 -3
- package/dist/{boot-scrub-logs-x3vrw472.js → boot-scrub-logs-exwddvp5.js} +2 -2
- package/dist/{cli-h4kjb2qy.js → cli-1592nfd6.js} +1 -1
- package/dist/{cli-g279mtbs.js → cli-3tv9z4wx.js} +6 -3
- package/dist/{cli-spsg6mqp.js → cli-4509mwm5.js} +15 -5
- package/dist/{cli-mwp9asnz.js → cli-822d4bjk.js} +17 -13
- package/dist/{cli-31163xvp.js → cli-8cq4z4x7.js} +117 -9
- package/dist/{cli-ydcfdmcz.js → cli-8ef5ky75.js} +1 -1
- package/dist/{cli-v2e8jdb6.js → cli-9eka6jwv.js} +2 -2
- package/dist/{cli-h7209ted.js → cli-9hj1adgp.js} +1 -1
- package/dist/{cli-ndv6ftj4.js → cli-byv3720g.js} +2 -2
- package/dist/{cli-3m3ysn1f.js → cli-c9m59f83.js} +1 -1
- package/dist/{cli-2rcegy4e.js → cli-fjf04hpa.js} +5 -5
- package/dist/{cli-xdv1vntm.js → cli-h2say6xk.js} +3 -3
- package/dist/{cli-nqxvcvnv.js → cli-hbbxmhec.js} +4 -4
- package/dist/{cli-ctzr9apr.js → cli-kmm1rwmp.js} +1 -1
- package/dist/{cli-xpveay6y.js → cli-mepk1j0t.js} +1 -1
- package/dist/{cli-pw04m0wb.js → cli-mkpf4ndf.js} +711 -135
- package/dist/{cli-jjcd495f.js → cli-mngsj9fx.js} +8 -3
- package/dist/{cli-2y473tja.js → cli-n8mf7x4b.js} +2 -2
- package/dist/{cli-4pcxkk69.js → cli-ngbsk4yx.js} +6 -1
- package/dist/{cli-fdbt8m8y.js → cli-np0yhmmk.js} +37 -21
- package/dist/{cli-ea6b2m9a.js → cli-p11rf59d.js} +7 -4
- package/dist/{cli-9pv05nba.js → cli-vz9drmce.js} +2 -2
- package/dist/{cli-th8jh1rm.js → cli-we91ywvy.js} +5 -5
- package/dist/{cli-zrc5k1rd.js → cli-zdp11t8m.js} +22 -17
- package/dist/{cli-jc23g2g2.js → cli-zkj6f2sk.js} +2 -2
- package/dist/cli.js +11 -11
- package/dist/{commands-jfmtpvvy.js → commands-sjk3zfyr.js} +7 -4
- package/dist/{db-vn5met8v.js → db-2je5agjb.js} +2 -2
- package/dist/{handlers-0s7dn9ma.js → handlers-yzv369hf.js} +13 -10
- package/dist/{hook-b2293dx1.js → hook-rfsj2r8x.js} +1 -1
- package/dist/{http-4hmtrrpx.js → http-v9rr144m.js} +101 -628
- package/dist/{index-zy9smn2h.js → index-3xtk777g.js} +9 -9
- package/dist/{index-gxj7sbzx.js → index-c3tan44f.js} +10 -10
- package/dist/{index-4bcr1r09.js → index-nr2199m6.js} +11 -11
- package/dist/{index-cmee5q4s.js → index-smjdc3h9.js} +7 -7
- package/dist/{keepalive-2htbn1j9.js → keepalive-5ds53bjd.js} +5 -5
- package/dist/{lead-p9s142mj.js → lead-5xhez25b.js} +20 -20
- package/dist/{maintenance-x8jgt9fd.js → maintenance-b43d24q6.js} +4 -4
- package/dist/{oauth-refresh-sweep-9m7qmm1m.js → oauth-refresh-sweep-qe286vn2.js} +4 -4
- package/dist/{onboard-jsy93b12.js → onboard-c4r3ds3z.js} +2 -2
- package/dist/{otel-impl-z2w4phcp.js → otel-impl-nv3rjw61.js} +1 -1
- package/dist/{pricing-refresh-cjjd6ayt.js → pricing-refresh-5ct2wp4k.js} +4 -4
- package/dist/{rbac-roles-v3xrhv48.js → rbac-roles-b82cxpxn.js} +4 -4
- package/dist/{rbac-roles-166rf7ba.js → rbac-roles-m502w0qv.js} +3 -3
- package/dist/{seed-pricing-f4xrjref.js → seed-pricing-jhjphbf0.js} +3 -3
- package/dist/{setup-58jmv2vm.js → setup-zbaspydq.js} +2 -2
- package/dist/{worker-95x5vnx4.js → worker-snvhpax5.js} +20 -20
- package/openapi.json +1 -1
- package/package.json +3 -3
- package/src/be/budget-admission.ts +2 -1
- package/src/be/db.ts +2 -1
- package/src/be/memory/constants.ts +29 -25
- package/src/be/memory/providers/sqlite-store.ts +3 -3
- package/src/be/memory/reranker.ts +4 -5
- package/src/be/rbac-audit.ts +2 -1
- package/src/be/swarm-config-guard.ts +117 -1
- package/src/commands/runner.ts +34 -0
- package/src/gitlab/auth.ts +3 -1
- package/src/heartbeat/heartbeat.ts +44 -19
- package/src/http/core.ts +66 -1
- package/src/http/index.ts +6 -2
- package/src/http/mcp-oauth.ts +2 -1
- package/src/oauth/mcp-wrapper.ts +2 -1
- package/src/otel.ts +23 -10
- package/src/rbac/admission.ts +2 -1
- package/src/slack/assistant.ts +3 -2
- package/src/slack/commands.ts +2 -1
- package/src/slack/handlers.ts +6 -3
- package/src/slack/router.ts +5 -2
- package/src/tasks/worker-follow-up.ts +9 -2
- package/src/telemetry.ts +2 -1
- package/src/tests/env-flag.test.ts +93 -0
- package/src/tests/heartbeat-reroute-decision.test.ts +10 -10
- package/src/tests/heartbeat-supersede-resume.test.ts +2 -2
- package/src/tests/reload-config.test.ts +81 -6
- package/src/utils/env-flag.ts +55 -0
- package/src/utils/scripts-only-mode.ts +12 -2
- package/src/utils/steering-enabled.ts +3 -2
- package/src/workflows/engine.ts +14 -6
package/README.md
CHANGED
|
@@ -127,6 +127,8 @@ Check [our templates](https://templates.agent-swarm.dev) for a quick start.
|
|
|
127
127
|
- **Multi-channel inputs** — Slack, GitHub, GitLab, email, WhatsApp, Linear, Jira, and the HTTP API all create tasks. [Integrations](#integrations)
|
|
128
128
|
- **Workflow engine with Human-in-the-Loop** — DAG-based automation with approval gates, retries, and structured I/O. [Workflows →](https://docs.agent-swarm.dev/docs/concepts/workflows)
|
|
129
129
|
- **Scheduled & recurring tasks** — cron-based automation for standing work, with schedules that can target agent tasks, workflows, or catalog scripts. [Scheduling →](https://docs.agent-swarm.dev/docs/concepts/scheduling)
|
|
130
|
+
- **Mid-run task steering** — add context at the next turn boundary, request an immediate interrupt where the harness supports it, or degrade safely to a follow-up task. [Task steering →](https://docs.agent-swarm.dev/docs/guides/task-steering)
|
|
131
|
+
- **Operator configuration UI** — tune non-secret feature flags, limits, integration toggles, and runtime defaults from Settings → Configuration, with source and restart-required indicators. [Configuration →](https://docs.agent-swarm.dev/docs/ui/configuration)
|
|
130
132
|
- **Asset namespaces** — group tasks, workflows, schedules, pages, and mapped files under canonical shared or personal keys, with inheritance, subtree filtering, audited moves, and cross-entity discovery. [Asset namespaces →](https://docs.agent-swarm.dev/docs/guides/asset-namespaces)
|
|
131
133
|
- **Persistent shared files via agent-fs** — co-deploy agent-fs for shared task attachments, previews, and search; late provisioning or config reloads activate the provider without an API restart, and tenant-authenticated control planes can invite shared-org members without receiving the bootstrap key. [Co-deployment guide →](https://docs.agent-swarm.dev/docs/guides/agent-fs-co-deployment)
|
|
132
134
|
- **Durable script workflows** — launch background script runs, inspect their journals, and track them from the dashboard when a one-shot `script-run` is too small. [Guide →](https://docs.agent-swarm.dev/docs/guides/script-workflow-runs)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveSlackUserId
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
} from "./cli-n8mf7x4b.js";
|
|
4
|
+
import"./cli-1592nfd6.js";
|
|
5
5
|
import {
|
|
6
6
|
createTaskWithSiblingAwareness
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-kmm1rwmp.js";
|
|
8
8
|
import {
|
|
9
9
|
buildCancelledBlocks,
|
|
10
10
|
getTaskLink
|
|
@@ -19,9 +19,9 @@ import {
|
|
|
19
19
|
init_context_key,
|
|
20
20
|
init_db,
|
|
21
21
|
slackContextKey
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-8cq4z4x7.js";
|
|
23
23
|
import"./cli-z2zcxes1.js";
|
|
24
|
-
import"./cli-
|
|
24
|
+
import"./cli-h2say6xk.js";
|
|
25
25
|
import"./cli-4j2mrzag.js";
|
|
26
26
|
import"./cli-bw80ck94.js";
|
|
27
27
|
import"./cli-xz9aq0rf.js";
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
initSlackApp,
|
|
4
4
|
startSlackApp,
|
|
5
5
|
stopSlackApp
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-fjf04hpa.js";
|
|
7
7
|
import"./cli-rkndnn90.js";
|
|
8
8
|
import"./cli-b0p7rfnd.js";
|
|
9
9
|
import"./cli-5arfywtm.js";
|
|
10
10
|
import"./cli-wspgs9bt.js";
|
|
11
11
|
import"./cli-dh55d5fg.js";
|
|
12
|
-
import"./cli-
|
|
12
|
+
import"./cli-8cq4z4x7.js";
|
|
13
13
|
import"./cli-z2zcxes1.js";
|
|
14
|
-
import"./cli-
|
|
14
|
+
import"./cli-h2say6xk.js";
|
|
15
15
|
import"./cli-4j2mrzag.js";
|
|
16
16
|
import"./cli-bw80ck94.js";
|
|
17
17
|
import"./cli-xz9aq0rf.js";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bufferThreadMessage,
|
|
3
3
|
wasEventSeen
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-we91ywvy.js";
|
|
5
5
|
import {
|
|
6
6
|
hasOtherUserMention
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-3tv9z4wx.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveSlackUserId,
|
|
10
10
|
rewriteSlackMentions
|
|
11
|
-
} from "./cli-
|
|
12
|
-
import"./cli-
|
|
11
|
+
} from "./cli-n8mf7x4b.js";
|
|
12
|
+
import"./cli-1592nfd6.js";
|
|
13
13
|
import {
|
|
14
14
|
createTaskWithSiblingAwareness
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-kmm1rwmp.js";
|
|
16
16
|
import {
|
|
17
17
|
require_dist
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-fjf04hpa.js";
|
|
19
19
|
import"./cli-rkndnn90.js";
|
|
20
20
|
import"./cli-b0p7rfnd.js";
|
|
21
21
|
import"./cli-5arfywtm.js";
|
|
@@ -27,12 +27,14 @@ import {
|
|
|
27
27
|
getMostRecentTaskInThread,
|
|
28
28
|
init_context_key,
|
|
29
29
|
init_db,
|
|
30
|
+
init_env_flag,
|
|
30
31
|
init_resolver,
|
|
32
|
+
isEnvFlagEnabled,
|
|
31
33
|
resolveTemplate,
|
|
32
34
|
slackContextKey
|
|
33
|
-
} from "./cli-
|
|
35
|
+
} from "./cli-8cq4z4x7.js";
|
|
34
36
|
import"./cli-z2zcxes1.js";
|
|
35
|
-
import"./cli-
|
|
37
|
+
import"./cli-h2say6xk.js";
|
|
36
38
|
import"./cli-4j2mrzag.js";
|
|
37
39
|
import"./cli-bw80ck94.js";
|
|
38
40
|
import"./cli-xz9aq0rf.js";
|
|
@@ -47,7 +49,8 @@ init_db();
|
|
|
47
49
|
init_resolver();
|
|
48
50
|
init_context_key();
|
|
49
51
|
var import_bolt = __toESM(require_dist(), 1);
|
|
50
|
-
|
|
52
|
+
init_env_flag();
|
|
53
|
+
var isAdditiveSlack = () => isEnvFlagEnabled("ADDITIVE_SLACK", false);
|
|
51
54
|
var cachedBotUserId = null;
|
|
52
55
|
function createAssistant() {
|
|
53
56
|
return new import_bolt.Assistant({
|
|
@@ -119,7 +122,7 @@ function createAssistant() {
|
|
|
119
122
|
}) : undefined;
|
|
120
123
|
const workingAgent = getAgentWorkingOnThread(channelId, threadTs);
|
|
121
124
|
if (workingAgent && workingAgent.status !== "offline") {
|
|
122
|
-
if (
|
|
125
|
+
if (isAdditiveSlack()) {
|
|
123
126
|
bufferThreadMessage(channelId, threadTs, messageText, userId, message.ts);
|
|
124
127
|
await safeSetStatus("Queuing follow-up...");
|
|
125
128
|
return;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
embedScript,
|
|
3
3
|
embeddingProvider
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-byv3720g.js";
|
|
5
|
+
import"./cli-zdp11t8m.js";
|
|
6
6
|
import"./cli-q25ejbyn.js";
|
|
7
7
|
import {
|
|
8
8
|
getDb,
|
|
9
9
|
init_db
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-8cq4z4x7.js";
|
|
11
11
|
import"./cli-z2zcxes1.js";
|
|
12
|
-
import"./cli-
|
|
12
|
+
import"./cli-h2say6xk.js";
|
|
13
13
|
import"./cli-4j2mrzag.js";
|
|
14
14
|
import"./cli-bw80ck94.js";
|
|
15
15
|
import"./cli-xz9aq0rf.js";
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
getEmbeddingProvider,
|
|
4
4
|
getMemoryStore,
|
|
5
5
|
init_constants
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-zdp11t8m.js";
|
|
7
7
|
import"./cli-q25ejbyn.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb,
|
|
10
10
|
init_db
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-8cq4z4x7.js";
|
|
12
12
|
import"./cli-z2zcxes1.js";
|
|
13
|
-
import"./cli-
|
|
13
|
+
import"./cli-h2say6xk.js";
|
|
14
14
|
import"./cli-4j2mrzag.js";
|
|
15
15
|
import"./cli-bw80ck94.js";
|
|
16
16
|
import"./cli-xz9aq0rf.js";
|
|
@@ -2,18 +2,21 @@ import {
|
|
|
2
2
|
getAgentById,
|
|
3
3
|
getAgentWorkingOnThread,
|
|
4
4
|
getAllAgents,
|
|
5
|
-
init_db
|
|
6
|
-
|
|
5
|
+
init_db,
|
|
6
|
+
init_env_flag,
|
|
7
|
+
isEnvFlagEnabled
|
|
8
|
+
} from "./cli-8cq4z4x7.js";
|
|
7
9
|
|
|
8
10
|
// src/slack/router.ts
|
|
9
11
|
init_db();
|
|
12
|
+
init_env_flag();
|
|
10
13
|
function hasOtherUserMention(text, botUserId) {
|
|
11
14
|
const mentions = text.match(/<@([A-Z0-9]+)>/g) ?? [];
|
|
12
15
|
return mentions.some((m) => m !== `<@${botUserId}>`);
|
|
13
16
|
}
|
|
14
17
|
function routeMessage(text, botUserId, botMentioned, threadContext) {
|
|
15
18
|
const matches = [];
|
|
16
|
-
const requireMentionForThreadFollowup =
|
|
19
|
+
const requireMentionForThreadFollowup = isEnvFlagEnabled("SLACK_THREAD_FOLLOWUP_REQUIRE_MENTION", false);
|
|
17
20
|
const agents = getAllAgents().filter((a) => a.status !== "offline");
|
|
18
21
|
const idMatches = text.matchAll(/swarm#([a-f0-9-]{36})/gi);
|
|
19
22
|
for (const match of idMatches) {
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
withSpan,
|
|
20
20
|
withSpanContext,
|
|
21
21
|
writeSkillsToFilesystem
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-mkpf4ndf.js";
|
|
23
23
|
import {
|
|
24
24
|
authJsonToCredentialSelection,
|
|
25
25
|
credentialsToAuthJson,
|
|
@@ -41,10 +41,10 @@ import {
|
|
|
41
41
|
import {
|
|
42
42
|
ensure,
|
|
43
43
|
initialize
|
|
44
|
-
} from "./cli-
|
|
44
|
+
} from "./cli-hbbxmhec.js";
|
|
45
45
|
import {
|
|
46
46
|
validateJsonSchema
|
|
47
|
-
} from "./cli-
|
|
47
|
+
} from "./cli-822d4bjk.js";
|
|
48
48
|
import {
|
|
49
49
|
getApiKey
|
|
50
50
|
} from "./cli-f14fvzag.js";
|
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
resolveTaskModelSelection,
|
|
86
86
|
resolveTemplateAsync,
|
|
87
87
|
telemetry
|
|
88
|
-
} from "./cli-
|
|
88
|
+
} from "./cli-8cq4z4x7.js";
|
|
89
89
|
import {
|
|
90
90
|
init_credentials,
|
|
91
91
|
resolveCredentialPools
|
|
@@ -1924,7 +1924,13 @@ var RELOADABLE_ENV_KEYS = new Set([
|
|
|
1924
1924
|
"REASONING_EFFORT_OVERRIDE",
|
|
1925
1925
|
"AGENT_FS_SHARED_ORG_ID",
|
|
1926
1926
|
"SWARM_USE_CLAUDE_BRIDGE",
|
|
1927
|
-
"BEDROCK_AUTH_MODE"
|
|
1927
|
+
"BEDROCK_AUTH_MODE",
|
|
1928
|
+
"STEERING_ENABLED",
|
|
1929
|
+
"ANONYMIZED_TELEMETRY",
|
|
1930
|
+
"MEMORY_RATERS",
|
|
1931
|
+
"TEMPLATE_REGISTRY_URL",
|
|
1932
|
+
"SLACK_DISABLE",
|
|
1933
|
+
"SWARM_ORG_NAME"
|
|
1928
1934
|
]);
|
|
1929
1935
|
function applyResolvedEnvToProcessEnv(freshEnv) {
|
|
1930
1936
|
const changed = [];
|
|
@@ -4123,6 +4129,10 @@ async function runAgent(config, opts) {
|
|
|
4123
4129
|
});
|
|
4124
4130
|
bootModel = bootEnv.env.MODEL_OVERRIDE || bootModel;
|
|
4125
4131
|
bootCooldownMs = resolveCodexCreditsExhaustedCooldownMs(bootEnv.env.CODEX_CREDITS_EXHAUSTED_COOLDOWN_MS);
|
|
4132
|
+
const bootApplied = applyResolvedEnvToProcessEnv(bootEnv.env);
|
|
4133
|
+
if (bootApplied.length > 0) {
|
|
4134
|
+
console.log(`[runner] Applied resolved swarm config at boot: ${bootApplied.join(", ")}`);
|
|
4135
|
+
}
|
|
4126
4136
|
} catch (err) {
|
|
4127
4137
|
console.warn(`[runner] fetchResolvedEnv failed at boot, falling back to env for provider and the default cooldown: ${err}`);
|
|
4128
4138
|
bootProvider = resolveHarnessProvider({}, process.env);
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
ensureAuthorizationTokenOrThrow,
|
|
9
9
|
oauthAppRowToProviderConfig
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-c9m59f83.js";
|
|
11
11
|
import {
|
|
12
12
|
getScript,
|
|
13
13
|
getScriptApiConnectionDescriptors,
|
|
@@ -15,15 +15,15 @@ import {
|
|
|
15
15
|
getScriptVersion,
|
|
16
16
|
listRelationalCredentialBindings,
|
|
17
17
|
validateScriptImports
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-p11rf59d.js";
|
|
19
19
|
import {
|
|
20
20
|
getAuthorizationById,
|
|
21
21
|
getOAuthApp,
|
|
22
22
|
getOAuthAppById
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-9hj1adgp.js";
|
|
24
24
|
import {
|
|
25
25
|
withSiblingAwareness
|
|
26
|
-
} from "./cli-
|
|
26
|
+
} from "./cli-kmm1rwmp.js";
|
|
27
27
|
import {
|
|
28
28
|
getAppUrl
|
|
29
29
|
} from "./cli-dh55d5fg.js";
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
updateWorkflowRun,
|
|
78
78
|
updateWorkflowRunStep,
|
|
79
79
|
workflowContextKey
|
|
80
|
-
} from "./cli-
|
|
80
|
+
} from "./cli-8cq4z4x7.js";
|
|
81
81
|
import {
|
|
82
82
|
init_secret_scrubber,
|
|
83
83
|
isSensitiveKey,
|
|
@@ -650,8 +650,12 @@ async function runStepValidation(registry, stepNode, stepOutput, context, meta)
|
|
|
650
650
|
|
|
651
651
|
// src/workflows/engine.ts
|
|
652
652
|
var DEFAULT_TIMEOUT_MS = 30000;
|
|
653
|
-
|
|
654
|
-
|
|
653
|
+
function maxIterations() {
|
|
654
|
+
return Number(process.env.WORKFLOW_MAX_ITERATIONS) || 100;
|
|
655
|
+
}
|
|
656
|
+
function maxStepsPerRun() {
|
|
657
|
+
return Number(process.env.WORKFLOW_MAX_STEPS_PER_RUN) || 500;
|
|
658
|
+
}
|
|
655
659
|
|
|
656
660
|
class TriggerSchemaError extends Error {
|
|
657
661
|
validationErrors;
|
|
@@ -736,10 +740,10 @@ async function walkGraph(def, runId, ctx, startNodes, registry, workflowId, secr
|
|
|
736
740
|
}
|
|
737
741
|
}
|
|
738
742
|
const allSteps = getWorkflowRunStepsByRunId(runId);
|
|
739
|
-
if (allSteps.length >=
|
|
743
|
+
if (allSteps.length >= maxStepsPerRun()) {
|
|
740
744
|
updateWorkflowRun(runId, {
|
|
741
745
|
status: "failed",
|
|
742
|
-
error: `Circuit breaker: run exceeded ${
|
|
746
|
+
error: `Circuit breaker: run exceeded ${maxStepsPerRun()} total steps (WORKFLOW_MAX_STEPS_PER_RUN)`,
|
|
743
747
|
finishedAt: new Date().toISOString()
|
|
744
748
|
});
|
|
745
749
|
return;
|
|
@@ -764,10 +768,10 @@ async function walkGraph(def, runId, ctx, startNodes, registry, workflowId, secr
|
|
|
764
768
|
const executedInThisWalk = new Set;
|
|
765
769
|
while (pendingNodes.length > 0) {
|
|
766
770
|
nodeExecutionCount += pendingNodes.length;
|
|
767
|
-
if (nodeExecutionCount >
|
|
771
|
+
if (nodeExecutionCount > maxIterations()) {
|
|
768
772
|
updateWorkflowRun(runId, {
|
|
769
773
|
status: "failed",
|
|
770
|
-
error: `Max node executions (${
|
|
774
|
+
error: `Max node executions (${maxIterations()}) exceeded — possible infinite loop`,
|
|
771
775
|
finishedAt: new Date().toISOString()
|
|
772
776
|
});
|
|
773
777
|
return;
|
|
@@ -2623,7 +2627,7 @@ class HumanInTheLoopExecutor extends BaseExecutor {
|
|
|
2623
2627
|
}
|
|
2624
2628
|
if (notification.channel === "slack") {
|
|
2625
2629
|
try {
|
|
2626
|
-
const { getSlackApp } = await import("./app-
|
|
2630
|
+
const { getSlackApp } = await import("./app-vmvmj2v3.js");
|
|
2627
2631
|
const slackApp = getSlackApp();
|
|
2628
2632
|
if (!slackApp) {
|
|
2629
2633
|
console.warn("[HITL] Slack not initialized — cannot send notification");
|
|
@@ -2737,7 +2741,7 @@ class NotifyExecutor extends BaseExecutor {
|
|
|
2737
2741
|
}
|
|
2738
2742
|
}
|
|
2739
2743
|
case "slack": {
|
|
2740
|
-
const { getSlackApp } = await import("./app-
|
|
2744
|
+
const { getSlackApp } = await import("./app-vmvmj2v3.js");
|
|
2741
2745
|
const app = getSlackApp();
|
|
2742
2746
|
if (!app) {
|
|
2743
2747
|
return {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
init_package,
|
|
7
7
|
package_default
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-h2say6xk.js";
|
|
9
9
|
import {
|
|
10
10
|
init_secret_scrubber,
|
|
11
11
|
scrubSecrets
|
|
@@ -592,10 +592,32 @@ var init_slack_routing = __esm(() => {
|
|
|
592
592
|
init_context_key();
|
|
593
593
|
});
|
|
594
594
|
|
|
595
|
+
// src/utils/env-flag.ts
|
|
596
|
+
function parseEnvFlag(raw, defaultValue) {
|
|
597
|
+
if (raw === undefined || raw === null)
|
|
598
|
+
return defaultValue;
|
|
599
|
+
const normalized = raw.trim().toLowerCase();
|
|
600
|
+
if (normalized === "")
|
|
601
|
+
return defaultValue;
|
|
602
|
+
if (TRUTHY.has(normalized))
|
|
603
|
+
return true;
|
|
604
|
+
if (FALSY.has(normalized))
|
|
605
|
+
return false;
|
|
606
|
+
return defaultValue;
|
|
607
|
+
}
|
|
608
|
+
function isEnvFlagEnabled(key, defaultValue, env = process.env) {
|
|
609
|
+
return parseEnvFlag(env[key], defaultValue);
|
|
610
|
+
}
|
|
611
|
+
var TRUTHY, FALSY;
|
|
612
|
+
var init_env_flag = __esm(() => {
|
|
613
|
+
TRUTHY = new Set(["true", "1"]);
|
|
614
|
+
FALSY = new Set(["false", "0"]);
|
|
615
|
+
});
|
|
616
|
+
|
|
595
617
|
// src/telemetry.ts
|
|
596
618
|
import { randomUUID } from "node:crypto";
|
|
597
619
|
function isEnabled() {
|
|
598
|
-
return
|
|
620
|
+
return isEnvFlagEnabled("ANONYMIZED_TELEMETRY", true);
|
|
599
621
|
}
|
|
600
622
|
function isCloudHostname(hostname) {
|
|
601
623
|
if (!hostname)
|
|
@@ -703,6 +725,7 @@ function track(options) {
|
|
|
703
725
|
var TELEMETRY_ENDPOINT = "https://proxy.desplega.sh/v1/events", PRODUCT = "agent-swarm", TIMEOUT_MS = 5000, installationId = null, source = "unknown", cachedIsCloud = false, cachedIsE2b = false, CLOUD_HOST_EXACT, CLOUD_HOST_SUFFIXES, telemetry;
|
|
704
726
|
var init_telemetry = __esm(() => {
|
|
705
727
|
init_package();
|
|
728
|
+
init_env_flag();
|
|
706
729
|
CLOUD_HOST_EXACT = new Set([
|
|
707
730
|
"agent-swarm-mcp.desplega.sh",
|
|
708
731
|
"agent-swarm.dev",
|
|
@@ -4197,10 +4220,11 @@ var init_seed_prompt_templates = __esm(() => {
|
|
|
4197
4220
|
|
|
4198
4221
|
// src/utils/steering-enabled.ts
|
|
4199
4222
|
function isSteeringEnabled(env = process.env) {
|
|
4200
|
-
|
|
4201
|
-
return enabled === "true" || enabled === "1";
|
|
4223
|
+
return parseEnvFlag(env.STEERING_ENABLED, false);
|
|
4202
4224
|
}
|
|
4203
|
-
var init_steering_enabled = () => {
|
|
4225
|
+
var init_steering_enabled = __esm(() => {
|
|
4226
|
+
init_env_flag();
|
|
4227
|
+
});
|
|
4204
4228
|
|
|
4205
4229
|
// src/be/steering.ts
|
|
4206
4230
|
function isSteeringEnabled2() {
|
|
@@ -4351,14 +4375,55 @@ function isReservedConfigKey(key) {
|
|
|
4351
4375
|
function reservedKeyError(key) {
|
|
4352
4376
|
return new Error(`Key '${key}' is reserved and cannot be stored in swarm_config. ` + `Set it as an environment variable instead.`);
|
|
4353
4377
|
}
|
|
4378
|
+
function booleanValidators(keys) {
|
|
4379
|
+
const message = (key) => `Invalid ${key} value (must be one of: ${BOOLEAN_LITERALS.join(", ")})`;
|
|
4380
|
+
return Object.fromEntries(keys.map((key) => [
|
|
4381
|
+
key,
|
|
4382
|
+
(value) => {
|
|
4383
|
+
if (typeof value !== "string")
|
|
4384
|
+
return message(key);
|
|
4385
|
+
return BOOLEAN_LITERALS.includes(value.trim().toLowerCase()) ? null : message(key);
|
|
4386
|
+
}
|
|
4387
|
+
]));
|
|
4388
|
+
}
|
|
4389
|
+
function enumValidator(key, options) {
|
|
4390
|
+
const message = `Invalid ${key} value (must be one of: ${options.join(", ")})`;
|
|
4391
|
+
return {
|
|
4392
|
+
[key]: (value) => {
|
|
4393
|
+
if (typeof value !== "string")
|
|
4394
|
+
return message;
|
|
4395
|
+
return options.includes(value.trim()) ? null : message;
|
|
4396
|
+
}
|
|
4397
|
+
};
|
|
4398
|
+
}
|
|
4399
|
+
function integerValidators(keys, min) {
|
|
4400
|
+
return Object.fromEntries(keys.map((key) => [
|
|
4401
|
+
key,
|
|
4402
|
+
(value) => {
|
|
4403
|
+
const str = String(value).trim();
|
|
4404
|
+
if (!/^\d+$/.test(str) || Number(str) < min) {
|
|
4405
|
+
return `Invalid ${key} (must be an integer >= ${min})`;
|
|
4406
|
+
}
|
|
4407
|
+
return null;
|
|
4408
|
+
}
|
|
4409
|
+
]));
|
|
4410
|
+
}
|
|
4411
|
+
function validateFloatRange(key, value, min, max, expectation) {
|
|
4412
|
+
const parsed = Number(String(value).trim());
|
|
4413
|
+
if (!Number.isFinite(parsed) || parsed < min || parsed > max) {
|
|
4414
|
+
return `Invalid ${key} (must be ${expectation})`;
|
|
4415
|
+
}
|
|
4416
|
+
return null;
|
|
4417
|
+
}
|
|
4354
4418
|
function validateConfigValue(key, value) {
|
|
4355
4419
|
const validator = VALIDATED_KEYS[key.toUpperCase()];
|
|
4356
4420
|
return validator ? validator(value) : null;
|
|
4357
4421
|
}
|
|
4358
|
-
var RESERVED_KEYS, VALIDATED_KEYS;
|
|
4422
|
+
var RESERVED_KEYS, BOOLEAN_LITERALS, VALIDATED_KEYS;
|
|
4359
4423
|
var init_swarm_config_guard = __esm(() => {
|
|
4360
4424
|
init_types();
|
|
4361
4425
|
RESERVED_KEYS = new Set(["API_KEY", "SECRETS_ENCRYPTION_KEY"]);
|
|
4426
|
+
BOOLEAN_LITERALS = ["true", "false", "1", "0"];
|
|
4362
4427
|
VALIDATED_KEYS = {
|
|
4363
4428
|
HARNESS_PROVIDER: (value) => {
|
|
4364
4429
|
const parsed = ProviderNameSchema.safeParse(value);
|
|
@@ -4386,7 +4451,49 @@ var init_swarm_config_guard = __esm(() => {
|
|
|
4386
4451
|
if (value === "sdk" || value === "bearer")
|
|
4387
4452
|
return null;
|
|
4388
4453
|
return "Invalid BEDROCK_AUTH_MODE value (must be one of: sdk, bearer)";
|
|
4389
|
-
}
|
|
4454
|
+
},
|
|
4455
|
+
...booleanValidators([
|
|
4456
|
+
"STEERING_ENABLED",
|
|
4457
|
+
"MEMORY_HYBRID_SEARCH",
|
|
4458
|
+
"MEMORY_GRAPH_EXPANSION",
|
|
4459
|
+
"HEARTBEAT_DISABLE",
|
|
4460
|
+
"HEARTBEAT_PIN_CRASH_RESUME",
|
|
4461
|
+
"POOL_AFFINITY_ENFORCEMENT",
|
|
4462
|
+
"SCRIPTS_ONLY_MCP",
|
|
4463
|
+
"SLACK_DISABLE",
|
|
4464
|
+
"GITHUB_DISABLE",
|
|
4465
|
+
"GITLAB_DISABLE",
|
|
4466
|
+
"LINEAR_DISABLE",
|
|
4467
|
+
"JIRA_DISABLE",
|
|
4468
|
+
"AGENTMAIL_DISABLE",
|
|
4469
|
+
"ADDITIVE_SLACK",
|
|
4470
|
+
"SLACK_THREAD_FOLLOWUP_REQUIRE_MENTION",
|
|
4471
|
+
"RBAC_ENABLED",
|
|
4472
|
+
"RBAC_AUDIT_DISABLED",
|
|
4473
|
+
"BUDGET_ADMISSION_DISABLED",
|
|
4474
|
+
"MCP_OAUTH_ALLOW_PRIVATE_HOSTS",
|
|
4475
|
+
"OTEL_TRACE_POLL",
|
|
4476
|
+
"ANONYMIZED_TELEMETRY",
|
|
4477
|
+
"SWARM_HIDE_CLOUD_PROMO"
|
|
4478
|
+
]),
|
|
4479
|
+
...enumValidator("SLACK_THREAD_STEERING", ["lead", "all"]),
|
|
4480
|
+
...enumValidator("SLACK_THREAD_STEERING_MODE", ["steer", "queue"]),
|
|
4481
|
+
...integerValidators([
|
|
4482
|
+
"HEARTBEAT_INTERVAL_MS",
|
|
4483
|
+
"HEARTBEAT_STALL_THRESHOLD_MIN",
|
|
4484
|
+
"HEARTBEAT_STALL_NO_SESSION_MIN",
|
|
4485
|
+
"HEARTBEAT_STALL_STALE_HB_MIN",
|
|
4486
|
+
"HEARTBEAT_MAX_RESUME_GENERATIONS",
|
|
4487
|
+
"MEMORY_RECENCY_HALF_LIFE_DAYS",
|
|
4488
|
+
"RBAC_AUDIT_RETENTION_DAYS",
|
|
4489
|
+
"WORKFLOW_MAX_ITERATIONS",
|
|
4490
|
+
"WORKFLOW_MAX_STEPS_PER_RUN",
|
|
4491
|
+
"SCHEDULER_INTERVAL_MS",
|
|
4492
|
+
"SCRIPT_RUN_CONCURRENCY_CAP"
|
|
4493
|
+
], 1),
|
|
4494
|
+
...integerValidators(["HEARTBEAT_MAX_AUTO_ASSIGN"], 0),
|
|
4495
|
+
MEMORY_MIN_SIMILARITY: (value) => validateFloatRange("MEMORY_MIN_SIMILARITY", value, 0, 1, "between 0 and 1 inclusive"),
|
|
4496
|
+
MEMORY_ACCESS_BOOST_MAX: (value) => validateFloatRange("MEMORY_ACCESS_BOOST_MAX", value, 1, Number.POSITIVE_INFINITY, "a number >= 1")
|
|
4390
4497
|
};
|
|
4391
4498
|
});
|
|
4392
4499
|
|
|
@@ -5471,7 +5578,7 @@ function updateAgentStatusFromCapacity(agentId) {
|
|
|
5471
5578
|
}
|
|
5472
5579
|
}
|
|
5473
5580
|
function isPoolAffinityEnforcementEnabled() {
|
|
5474
|
-
return
|
|
5581
|
+
return isEnvFlagEnabled("POOL_AFFINITY_ENFORCEMENT", true);
|
|
5475
5582
|
}
|
|
5476
5583
|
function buildRoutingAffinityFromAgent(agentId) {
|
|
5477
5584
|
const agent = getAgentById(agentId);
|
|
@@ -11827,6 +11934,7 @@ var init_db = __esm(() => {
|
|
|
11827
11934
|
init_telemetry();
|
|
11828
11935
|
init_types();
|
|
11829
11936
|
init_credentials();
|
|
11937
|
+
init_env_flag();
|
|
11830
11938
|
init_request_auth_context();
|
|
11831
11939
|
init_secret_scrubber();
|
|
11832
11940
|
init_asset_key_audit();
|
|
@@ -11933,4 +12041,4 @@ var init_db = __esm(() => {
|
|
|
11933
12041
|
};
|
|
11934
12042
|
});
|
|
11935
12043
|
|
|
11936
|
-
export { normalizeAssetKey, parseAssetKey, canWriteAssetKey, init_key, interpolate, deepInterpolate, init_template, registerTemplate, getTemplateDefinition, getAllTemplateDefinitions, init_registry, configureHttpResolver, resolveTemplate, resolveTemplateAsync, init_resolver, slackContextKey, agentmailContextKey, githubContextKey, gitlabContextKey, linearContextKey, buildJiraContextKey, scheduleContextKey, workflowContextKey, agentContextKey, pageContextKey, init_context_key, checkSlackRoutingCoherence, init_slack_routing, initTelemetry, telemetry, init_telemetry, AssetKeySchema, AssetEntityTypeSchema, ModelTierSchema, ReasoningEffortSchema, splitLegacyModelAlias, resolveTaskModelSelection, AgentTaskStatusSchema, isTerminalTaskStatus, AgentTaskSourceSchema, ProviderNameSchema, SteerModeSchema, SteeringSourceSchema, SteeringMessageSchema, SteerOutcomeSchema, OnUnsupportedSchema, FollowUpConfigSchema, AgentTaskSchema, AttachmentInputSchema, TaskAttachmentSchema, InboxItemTypeSchema, InboxItemStatusSchema, FavoriteItemTypeSchema, TaskTemplateKindSchema, AgentAvatarSchema, AgentSchema, AgentLatestModelSchema, AgentCredStatusSchema, ChannelTypeSchema, ChannelSchema, ChannelMessageSchema, ServiceStatusSchema, ServiceSchema, ResumeReasonSchema, AgentLogSchema, EventCategorySchema, EventStatusSchema, EventSourceSchema, EventNameSchema, ScheduledTaskTargetTypeSchema, SwarmConfigScopeSchema, SwarmConfigSchema, RepoGuidelinesSchema, RepoHooksSchema, SwarmRepoSchema, AgentMemoryScopeSchema, AgentMemorySourceSchema, AgentMemorySchema, WorkflowDefinitionSchema, WorkflowNodePatchSchema, WorkflowPatchSchema, TriggerConfigSchema, CooldownConfigSchema, InputValueSchema, PageContentTypeSchema, PageAuthModeSchema, MetricDefinitionSchema, MetricVersionSchema, WorkflowRunStatusSchema, ScriptRunStatusSchema, TERMINAL_SCRIPT_RUN_STATUSES, PromptTemplateScopeSchema, PromptTemplateStateSchema, PromptTemplateSchema, PromptTemplateHistorySchema, ScriptScopeSchema, ScriptFsModeSchema, ScriptApiAuthModeSchema, ContextSnapshotEventTypeSchema, ContextFormulaSchema, BudgetScopeSchema, BudgetSchema, PricingProviderSchema, PricingTokenClassSchema, PricingRowSchema, BudgetRefusalCauseSchema, BudgetRefusalNotificationSchema, KvValueTypeSchema, KvNamespaceSchema, KvKeySchema, KvEntrySchema, init_types, setRequestAuth, getRequestAuth, getCurrentRequestAuth, init_request_auth_context, auditAssetKeys, init_asset_key_audit, CredentialBindingSchema, placeholderForConfigKey, CredentialBroker, DEFAULT_CREDENTIAL_BINDINGS, init_credential_broker, encryptSecret, decryptSecret, getEncryptionKey, init_crypto, normalizeDate, normalizeDateRequired, init_date_utils, init_session_templates, init_templates, init_templates2 as init_templates1, isSteeringEnabled, init_steering_enabled, SteeringRequestError, isSteeringEnabled2 as isSteeringEnabled1, getTaskSteeringFields, promotePendingSteeringForTask, markSteeringUndeliverable, requestSteering, init_steering, isReservedConfigKey, reservedKeyError, validateConfigValue, init_swarm_config_guard, onTaskStarted, init_task_lifecycle_events, generateDefaultClaudeMd, generateDefaultSoulMd, generateDefaultIdentityMd, generateDefaultToolsMd, init_defaults, isSqliteVecAvailable, initDb, getDb, closeDb, computeContentHash, createContextVersion, getLatestContextVersion, getContextVersion, getContextVersionHistory, agentQueries, updateAgentCredentialState, createAgent, getAgentById, getAllAgents, getLeadAgent, updateAgentStatus, updateAgentMaxTasks, updateAgentProvider, setAgentHarnessProvider, updateAgentCredStatus, listAgentsWithCredStatusByProvider, getAgentHarnessProviders, updateAgentActivity, MAX_EMPTY_POLLS, incrementEmptyPollCount, resetEmptyPollCount, shouldBlockPolling, deleteAgent, getActiveTaskCount, hasCapacity, getRemainingCapacity, updateAgentStatusFromCapacity, isPoolAffinityEnforcementEnabled, buildRoutingAffinityFromAgent, isAgentEligibleForTask, taskQueries, createTask, getPendingTaskForAgent, assignUnassignedTaskPending, startTask, getTaskById, markTaskSlackReplySent, setSlackMessageTracking, getChildTasks, hasNonTerminalResumeChild, hasNonTerminalRerouteDecisionChild, updateTaskClaudeSessionId, updateTaskTitle, updateTaskVcs, getTasksByAgentId, getAgentCurrentTask, getTasksByStatus, findTaskByVcs, findTaskByGitHub, getAllTasks, getTasksCount, getTaskStats, getCompletedSlackTasks, getRecentlyFinishedWorkerTasks, markTasksNotified, resetTasksNotified, getInProgressSlackTasks, getInProgressTasksByContextKey, findExistingLinearTrackerContextWork, getLatestTaskByContextKey, getAgentWorkingOnThread, getLatestActiveTaskInThread, getLatestLeadTaskInThread, getMostRecentTaskInThread, findCompletedTaskInThread, findRecentCancelledTaskInThread, completeTask, failTask, cancelTask, supersedeTask, backfillSupersedeTaskResumeTaskId, pauseTask, resumeTask, getPausedTasksForAgent, getOrphanedInProgressTasksForAgent, resetOrphanedInProgressTasksForAgent, getRecentlyCancelledTasksForAgent, deleteTask, updateTaskProgress, insertTaskAttachment, getAssetKeyMappingByProvider, upsertAssetKeyMapping, getAssetKeyMapping, listAssetSummaries, moveAssetKey, deleteTaskAttachment, replaceTaskAttachment, getTaskAttachments, createSteeringMessage, getSteeringMessagesForTask, getSteeringMessageById, getPendingSteeringForTask, getPendingSteeringForAgent, markSteeringDelivered, markSteeringHandled, markSteeringPromoted, cancelPendingSteeringForTask, hasPendingSteering, getAgentWithTasks, getAllAgentsWithTasks, logQueries, createLogEntry, getLogsByAgentId, getLogsByTaskId, getLogsByTaskIdChronological, getLogsByEventType, getAllLogs, findRecentSimilarTasks, createTaskExtended, claimTask, releaseTask, acceptTask, rejectTask, moveTaskToBacklog, moveTaskFromBacklog, releaseStaleReviewingTasks, getOfferedTasksForAgent, claimOfferedTask, getUnassignedTasksCount, getUnassignedTaskIds, getUnassignedTaskIdsForAgent, checkDependencies, getDependentTasks, cascadeFailDependents, updateAgentProfile, updateAgentName, createChannel, getMessageById, getChannelById, getChannelByName, getAllChannels, deleteChannel, postMessage, getChannelMessages, updateReadState, getLastReadAt, getUnreadMessages, getMentionsForAgent, getInboxSummary, claimMentions, releaseMentionProcessing, releaseStaleMentionProcessing, createService, getServiceById, getServiceByAgentAndName, getServicesByAgentId, getAllServices, updateServiceStatus, deleteService, upsertService, deleteServicesByAgentId, sessionLogQueries, createSessionLogs, getSessionLogsByTaskId, getSessionLogsBySession, createSessionCost, getSessionCostsByTaskId, getSessionCostsByAgentId, getAllSessionCosts, getSessionCostsFiltered, getSessionCostSummary, getDashboardCostSummary, createInboxMessage, getInboxMessageById, getUnreadInboxMessages, claimInboxMessages, markInboxMessageRead, markInboxMessageResponded, markInboxMessageDelegated, releaseStaleProcessingInbox, getConcurrentContext, getScheduledTasks, getScheduledTaskById, getScheduledTaskByName, createScheduledTask, updateScheduledTask, deleteScheduledTask, getDueScheduledTasks, autoEncryptLegacyPlaintextSecrets, maskSecrets, getSwarmConfigs, getInjectableGlobalConfigs, getSwarmConfigById, getSwarmConfigLookupById, upsertSwarmConfig, deleteSwarmConfig, deleteSwarmConfigByKey, getResolvedConfig, getSwarmRepos, getSwarmRepoById, getSwarmRepoByName, getSwarmRepoByUrl, createSwarmRepo, updateSwarmRepo, deleteSwarmRepo, getAgentMailInboxMapping, getAgentMailInboxMappingsByAgent, getAllAgentMailInboxMappings, createAgentMailInboxMapping, deleteAgentMailInboxMapping, findTaskByAgentMailThread, insertActiveSession, deleteActiveSession, deleteActiveSessionById, getActiveSessions, heartbeatActiveSession, cleanupStaleSessions, cleanupAgentSessions, updateActiveSessionProviderSessionId, getActiveSessionForTask, reassociateSessionLogs, getStalledInProgressTasks, getStalePinnedResumes, failPendingResumeIfUnclaimed, getIdleWorkersWithCapacity, getUnassignedPoolTasks, getStaleUnassignedAffinityTasks, getRecentFailedTasks, getRecentCompletedCount, getRecentFailedCount, createWorkflow, getWorkflow, listWorkflows, updateWorkflow, deleteWorkflow, getWorkflowsByScheduleId, createWorkflowRun, getWorkflowRun, updateWorkflowRun, listWorkflowRuns, createWorkflowRunStep, getWorkflowRunStep, updateWorkflowRunStep, getWorkflowRunStepsByRunId, getStuckWorkflowRuns, getLastSuccessfulRun, getLastRunStart, getRetryableSteps, getCompletedStepNodeIds, getTaskByWorkflowRunStepId, getStepByIdempotencyKey, getStepCountForNode, getLatestStepForNode, createWorkflowVersion, getWorkflowVersions, getWorkflowVersion, createPage, getPage, getPageBySlug, getLatestPageBySlug, listPagesByAgent, listAllPages, countAllPages, countPagesByAgent, updatePage, deletePage, incrementPageViewCount, createPageVersion, getPageVersions, getPageVersion, createMetric, getMetric, getMetricBySlug, listMetricsByAgent, listAllMetrics, countAllMetrics, countMetricsByAgent, updateMetric, deleteMetric, createMetricVersion, getMetricVersions, getMetricVersion, getPromptTemplates, getPromptTemplateById, upsertPromptTemplate, deletePromptTemplate, resetPromptTemplateToDefault, getPromptTemplateHistory, resolvePromptTemplate, checkoutPromptTemplate, getAllChannelActivityCursors, getChannelActivityCursor, upsertChannelActivityCursor, createApprovalRequest, getApprovalRequestById, resolveApprovalRequest, updateApprovalRequestNotifications, listApprovalRequests, getStuckApprovalRuns, getApprovalRequestByStepId, getExpiredPendingApprovals, createWaitState, getWaitStateById, getWaitStateByStepId, getDueWaitStates, getPendingEventWaitNames, getPendingWaitsByEvent, resolveWaitState, getStuckWaitRuns, SKILL_FILE_LIMITS, normalizeSkillFilePath, createSkill, updateSkill, listSkillFileManifest, getSkillFiles, getSkillFile, upsertSkillFile, upsertSkillFiles, deleteSkillFile, deleteSkill, getSkillById, getSkillByName, listSkills, searchSkills, installSkill, getSystemDefaultSkills, installSystemDefaultSkillsForAgent, uninstallSkill, getAgentSkills, toggleAgentSkill, createMcpServer, updateMcpServer, deleteMcpServer, getMcpServerById, getMcpServerByName, listMcpServers, installMcpServer, uninstallMcpServer, getAgentMcpServers, createContextSnapshot, getContextSnapshotsByTaskId, getContextSnapshotsBySessionId, getContextSummaryByTaskId, getAvailableKeyIndices, recordKeyUsage, markKeyRateLimited, recordKeyRateLimitWindows, setApiKeyName, clearKeyRateLimit, getKeyStatuses, getKeyCostSummary, getUserById, getAllUsers, createUser, updateUser, deleteUser, listInboxState, upsertInboxState, listFavorites, listUserFavorites, getFavoriteItemIdSet, setFavorite, setUserFavorite, withFavoriteFlags, listTaskTemplates, getRootTaskChain, listRecentSessions, countSessions, getBudget, getBudgets, upsertBudget, deleteBudget, getAllPricingRows, getPricingRows, getActivePricingRow, insertPricingRow, deletePricingRow, getDailySpendForAgent, getDailySpendGlobal, getDailySpendForUser, recordBudgetRefusalNotification, getBudgetRefusalNotification, getRecentBudgetRefusalNotifications, hasBudgetRefusalNotificationToday, setBudgetRefusalFollowUpTaskId, getLiveAgentCounts, getInstanceActivity, getSwarmMetrics, hasFirstCompletedTask, getKv, upsertKv, deleteKv, KvTypeCollisionError, incrKv, listKv, countKv, createScriptRun, recordInlineScriptRun, getScriptRun, getScriptRunByIdempotencyKey, listScriptRuns, countScriptRuns, countActiveScriptRuns, updateScriptRun, getRunningScriptRuns, getScriptRunJournalStep, upsertScriptRunJournalStep, listScriptRunJournalSteps, countScriptRunJournalSteps, countScriptRunJournalAgentTaskSteps, exports_db, init_db };
|
|
12044
|
+
export { normalizeAssetKey, parseAssetKey, canWriteAssetKey, init_key, interpolate, deepInterpolate, init_template, registerTemplate, getTemplateDefinition, getAllTemplateDefinitions, init_registry, configureHttpResolver, resolveTemplate, resolveTemplateAsync, init_resolver, slackContextKey, agentmailContextKey, githubContextKey, gitlabContextKey, linearContextKey, buildJiraContextKey, scheduleContextKey, workflowContextKey, agentContextKey, pageContextKey, init_context_key, checkSlackRoutingCoherence, init_slack_routing, parseEnvFlag, isEnvFlagEnabled, init_env_flag, initTelemetry, telemetry, init_telemetry, AssetKeySchema, AssetEntityTypeSchema, ModelTierSchema, ReasoningEffortSchema, splitLegacyModelAlias, resolveTaskModelSelection, AgentTaskStatusSchema, isTerminalTaskStatus, AgentTaskSourceSchema, ProviderNameSchema, SteerModeSchema, SteeringSourceSchema, SteeringMessageSchema, SteerOutcomeSchema, OnUnsupportedSchema, FollowUpConfigSchema, AgentTaskSchema, AttachmentInputSchema, TaskAttachmentSchema, InboxItemTypeSchema, InboxItemStatusSchema, FavoriteItemTypeSchema, TaskTemplateKindSchema, AgentAvatarSchema, AgentSchema, AgentLatestModelSchema, AgentCredStatusSchema, ChannelTypeSchema, ChannelSchema, ChannelMessageSchema, ServiceStatusSchema, ServiceSchema, ResumeReasonSchema, AgentLogSchema, EventCategorySchema, EventStatusSchema, EventSourceSchema, EventNameSchema, ScheduledTaskTargetTypeSchema, SwarmConfigScopeSchema, SwarmConfigSchema, RepoGuidelinesSchema, RepoHooksSchema, SwarmRepoSchema, AgentMemoryScopeSchema, AgentMemorySourceSchema, AgentMemorySchema, WorkflowDefinitionSchema, WorkflowNodePatchSchema, WorkflowPatchSchema, TriggerConfigSchema, CooldownConfigSchema, InputValueSchema, PageContentTypeSchema, PageAuthModeSchema, MetricDefinitionSchema, MetricVersionSchema, WorkflowRunStatusSchema, ScriptRunStatusSchema, TERMINAL_SCRIPT_RUN_STATUSES, PromptTemplateScopeSchema, PromptTemplateStateSchema, PromptTemplateSchema, PromptTemplateHistorySchema, ScriptScopeSchema, ScriptFsModeSchema, ScriptApiAuthModeSchema, ContextSnapshotEventTypeSchema, ContextFormulaSchema, BudgetScopeSchema, BudgetSchema, PricingProviderSchema, PricingTokenClassSchema, PricingRowSchema, BudgetRefusalCauseSchema, BudgetRefusalNotificationSchema, KvValueTypeSchema, KvNamespaceSchema, KvKeySchema, KvEntrySchema, init_types, setRequestAuth, getRequestAuth, getCurrentRequestAuth, init_request_auth_context, auditAssetKeys, init_asset_key_audit, CredentialBindingSchema, placeholderForConfigKey, CredentialBroker, DEFAULT_CREDENTIAL_BINDINGS, init_credential_broker, encryptSecret, decryptSecret, getEncryptionKey, init_crypto, normalizeDate, normalizeDateRequired, init_date_utils, init_session_templates, init_templates, init_templates2 as init_templates1, isSteeringEnabled, init_steering_enabled, SteeringRequestError, isSteeringEnabled2 as isSteeringEnabled1, getTaskSteeringFields, promotePendingSteeringForTask, markSteeringUndeliverable, requestSteering, init_steering, isReservedConfigKey, reservedKeyError, validateConfigValue, init_swarm_config_guard, onTaskStarted, init_task_lifecycle_events, generateDefaultClaudeMd, generateDefaultSoulMd, generateDefaultIdentityMd, generateDefaultToolsMd, init_defaults, isSqliteVecAvailable, initDb, getDb, closeDb, computeContentHash, createContextVersion, getLatestContextVersion, getContextVersion, getContextVersionHistory, agentQueries, updateAgentCredentialState, createAgent, getAgentById, getAllAgents, getLeadAgent, updateAgentStatus, updateAgentMaxTasks, updateAgentProvider, setAgentHarnessProvider, updateAgentCredStatus, listAgentsWithCredStatusByProvider, getAgentHarnessProviders, updateAgentActivity, MAX_EMPTY_POLLS, incrementEmptyPollCount, resetEmptyPollCount, shouldBlockPolling, deleteAgent, getActiveTaskCount, hasCapacity, getRemainingCapacity, updateAgentStatusFromCapacity, isPoolAffinityEnforcementEnabled, buildRoutingAffinityFromAgent, isAgentEligibleForTask, taskQueries, createTask, getPendingTaskForAgent, assignUnassignedTaskPending, startTask, getTaskById, markTaskSlackReplySent, setSlackMessageTracking, getChildTasks, hasNonTerminalResumeChild, hasNonTerminalRerouteDecisionChild, updateTaskClaudeSessionId, updateTaskTitle, updateTaskVcs, getTasksByAgentId, getAgentCurrentTask, getTasksByStatus, findTaskByVcs, findTaskByGitHub, getAllTasks, getTasksCount, getTaskStats, getCompletedSlackTasks, getRecentlyFinishedWorkerTasks, markTasksNotified, resetTasksNotified, getInProgressSlackTasks, getInProgressTasksByContextKey, findExistingLinearTrackerContextWork, getLatestTaskByContextKey, getAgentWorkingOnThread, getLatestActiveTaskInThread, getLatestLeadTaskInThread, getMostRecentTaskInThread, findCompletedTaskInThread, findRecentCancelledTaskInThread, completeTask, failTask, cancelTask, supersedeTask, backfillSupersedeTaskResumeTaskId, pauseTask, resumeTask, getPausedTasksForAgent, getOrphanedInProgressTasksForAgent, resetOrphanedInProgressTasksForAgent, getRecentlyCancelledTasksForAgent, deleteTask, updateTaskProgress, insertTaskAttachment, getAssetKeyMappingByProvider, upsertAssetKeyMapping, getAssetKeyMapping, listAssetSummaries, moveAssetKey, deleteTaskAttachment, replaceTaskAttachment, getTaskAttachments, createSteeringMessage, getSteeringMessagesForTask, getSteeringMessageById, getPendingSteeringForTask, getPendingSteeringForAgent, markSteeringDelivered, markSteeringHandled, markSteeringPromoted, cancelPendingSteeringForTask, hasPendingSteering, getAgentWithTasks, getAllAgentsWithTasks, logQueries, createLogEntry, getLogsByAgentId, getLogsByTaskId, getLogsByTaskIdChronological, getLogsByEventType, getAllLogs, findRecentSimilarTasks, createTaskExtended, claimTask, releaseTask, acceptTask, rejectTask, moveTaskToBacklog, moveTaskFromBacklog, releaseStaleReviewingTasks, getOfferedTasksForAgent, claimOfferedTask, getUnassignedTasksCount, getUnassignedTaskIds, getUnassignedTaskIdsForAgent, checkDependencies, getDependentTasks, cascadeFailDependents, updateAgentProfile, updateAgentName, createChannel, getMessageById, getChannelById, getChannelByName, getAllChannels, deleteChannel, postMessage, getChannelMessages, updateReadState, getLastReadAt, getUnreadMessages, getMentionsForAgent, getInboxSummary, claimMentions, releaseMentionProcessing, releaseStaleMentionProcessing, createService, getServiceById, getServiceByAgentAndName, getServicesByAgentId, getAllServices, updateServiceStatus, deleteService, upsertService, deleteServicesByAgentId, sessionLogQueries, createSessionLogs, getSessionLogsByTaskId, getSessionLogsBySession, createSessionCost, getSessionCostsByTaskId, getSessionCostsByAgentId, getAllSessionCosts, getSessionCostsFiltered, getSessionCostSummary, getDashboardCostSummary, createInboxMessage, getInboxMessageById, getUnreadInboxMessages, claimInboxMessages, markInboxMessageRead, markInboxMessageResponded, markInboxMessageDelegated, releaseStaleProcessingInbox, getConcurrentContext, getScheduledTasks, getScheduledTaskById, getScheduledTaskByName, createScheduledTask, updateScheduledTask, deleteScheduledTask, getDueScheduledTasks, autoEncryptLegacyPlaintextSecrets, maskSecrets, getSwarmConfigs, getInjectableGlobalConfigs, getSwarmConfigById, getSwarmConfigLookupById, upsertSwarmConfig, deleteSwarmConfig, deleteSwarmConfigByKey, getResolvedConfig, getSwarmRepos, getSwarmRepoById, getSwarmRepoByName, getSwarmRepoByUrl, createSwarmRepo, updateSwarmRepo, deleteSwarmRepo, getAgentMailInboxMapping, getAgentMailInboxMappingsByAgent, getAllAgentMailInboxMappings, createAgentMailInboxMapping, deleteAgentMailInboxMapping, findTaskByAgentMailThread, insertActiveSession, deleteActiveSession, deleteActiveSessionById, getActiveSessions, heartbeatActiveSession, cleanupStaleSessions, cleanupAgentSessions, updateActiveSessionProviderSessionId, getActiveSessionForTask, reassociateSessionLogs, getStalledInProgressTasks, getStalePinnedResumes, failPendingResumeIfUnclaimed, getIdleWorkersWithCapacity, getUnassignedPoolTasks, getStaleUnassignedAffinityTasks, getRecentFailedTasks, getRecentCompletedCount, getRecentFailedCount, createWorkflow, getWorkflow, listWorkflows, updateWorkflow, deleteWorkflow, getWorkflowsByScheduleId, createWorkflowRun, getWorkflowRun, updateWorkflowRun, listWorkflowRuns, createWorkflowRunStep, getWorkflowRunStep, updateWorkflowRunStep, getWorkflowRunStepsByRunId, getStuckWorkflowRuns, getLastSuccessfulRun, getLastRunStart, getRetryableSteps, getCompletedStepNodeIds, getTaskByWorkflowRunStepId, getStepByIdempotencyKey, getStepCountForNode, getLatestStepForNode, createWorkflowVersion, getWorkflowVersions, getWorkflowVersion, createPage, getPage, getPageBySlug, getLatestPageBySlug, listPagesByAgent, listAllPages, countAllPages, countPagesByAgent, updatePage, deletePage, incrementPageViewCount, createPageVersion, getPageVersions, getPageVersion, createMetric, getMetric, getMetricBySlug, listMetricsByAgent, listAllMetrics, countAllMetrics, countMetricsByAgent, updateMetric, deleteMetric, createMetricVersion, getMetricVersions, getMetricVersion, getPromptTemplates, getPromptTemplateById, upsertPromptTemplate, deletePromptTemplate, resetPromptTemplateToDefault, getPromptTemplateHistory, resolvePromptTemplate, checkoutPromptTemplate, getAllChannelActivityCursors, getChannelActivityCursor, upsertChannelActivityCursor, createApprovalRequest, getApprovalRequestById, resolveApprovalRequest, updateApprovalRequestNotifications, listApprovalRequests, getStuckApprovalRuns, getApprovalRequestByStepId, getExpiredPendingApprovals, createWaitState, getWaitStateById, getWaitStateByStepId, getDueWaitStates, getPendingEventWaitNames, getPendingWaitsByEvent, resolveWaitState, getStuckWaitRuns, SKILL_FILE_LIMITS, normalizeSkillFilePath, createSkill, updateSkill, listSkillFileManifest, getSkillFiles, getSkillFile, upsertSkillFile, upsertSkillFiles, deleteSkillFile, deleteSkill, getSkillById, getSkillByName, listSkills, searchSkills, installSkill, getSystemDefaultSkills, installSystemDefaultSkillsForAgent, uninstallSkill, getAgentSkills, toggleAgentSkill, createMcpServer, updateMcpServer, deleteMcpServer, getMcpServerById, getMcpServerByName, listMcpServers, installMcpServer, uninstallMcpServer, getAgentMcpServers, createContextSnapshot, getContextSnapshotsByTaskId, getContextSnapshotsBySessionId, getContextSummaryByTaskId, getAvailableKeyIndices, recordKeyUsage, markKeyRateLimited, recordKeyRateLimitWindows, setApiKeyName, clearKeyRateLimit, getKeyStatuses, getKeyCostSummary, getUserById, getAllUsers, createUser, updateUser, deleteUser, listInboxState, upsertInboxState, listFavorites, listUserFavorites, getFavoriteItemIdSet, setFavorite, setUserFavorite, withFavoriteFlags, listTaskTemplates, getRootTaskChain, listRecentSessions, countSessions, getBudget, getBudgets, upsertBudget, deleteBudget, getAllPricingRows, getPricingRows, getActivePricingRow, insertPricingRow, deletePricingRow, getDailySpendForAgent, getDailySpendGlobal, getDailySpendForUser, recordBudgetRefusalNotification, getBudgetRefusalNotification, getRecentBudgetRefusalNotifications, hasBudgetRefusalNotificationToday, setBudgetRefusalFollowUpTaskId, getLiveAgentCounts, getInstanceActivity, getSwarmMetrics, hasFirstCompletedTask, getKv, upsertKv, deleteKv, KvTypeCollisionError, incrKv, listKv, countKv, createScriptRun, recordInlineScriptRun, getScriptRun, getScriptRunByIdempotencyKey, listScriptRuns, countScriptRuns, countActiveScriptRuns, updateScriptRun, getRunningScriptRuns, getScriptRunJournalStep, upsertScriptRunJournalStep, listScriptRunJournalSteps, countScriptRunJournalSteps, countScriptRunJournalAgentTaskSteps, exports_db, init_db };
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
getEmbeddingProvider,
|
|
5
5
|
init_embedding,
|
|
6
6
|
serializeEmbedding
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-zdp11t8m.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb,
|
|
10
10
|
init_db
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-8cq4z4x7.js";
|
|
12
12
|
import {
|
|
13
13
|
init_secret_scrubber,
|
|
14
14
|
scrubSecrets
|