@desplega.ai/agent-swarm 1.101.1 → 1.103.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-3bnwa1ep.js → actions-7txktrdj.js} +6 -6
- package/dist/{app-5efpcda0.js → app-xm3xsdye.js} +3 -3
- package/dist/{assistant-rgfbyp46.js → assistant-qpv63wk6.js} +9 -9
- package/dist/{boot-reembed-j3gp6x92.js → boot-reembed-9cxqka3e.js} +3 -3
- package/dist/{boot-reembed-8428r5df.js → boot-reembed-chxhrwv8.js} +4 -4
- package/dist/{boot-scrub-logs-ax5e0nrw.js → boot-scrub-logs-8qtfkcz8.js} +2 -2
- package/dist/{claude-managed-adapter-g07dbz3b.js → claude-managed-adapter-z29hjgzz.js} +3 -3
- package/dist/{cli-qsy1aedt.js → cli-2307phk1.js} +435 -35
- package/dist/{cli-g5px3d7x.js → cli-2957pqpj.js} +24 -1
- package/dist/{cli-b2k39ff6.js → cli-2qynerth.js} +1 -1
- package/dist/{cli-42f5hj29.js → cli-4fnp2tc3.js} +1 -1
- package/dist/{cli-7fzbt4p5.js → cli-85pf4z38.js} +1 -1
- package/dist/{cli-gwp428sg.js → cli-8hyv6c2v.js} +6 -14
- package/dist/{cli-qr8ky518.js → cli-8w95v19d.js} +1 -1
- package/dist/{cli-7xdq3jg3.js → cli-92fqyjcv.js} +1 -1
- package/dist/{cli-dg9tkgx0.js → cli-dz3d6zjg.js} +1 -1
- package/dist/{cli-53w8f9q9.js → cli-fedn86nz.js} +238 -484
- package/dist/{cli-zwc67pz4.js → cli-fwxdt7kt.js} +3 -3
- package/dist/{cli-53jkzjwm.js → cli-fygaw191.js} +2 -2
- package/dist/{cli-rdhzpm5x.js → cli-gzepjz54.js} +10 -9
- package/dist/{cli-n2xem10h.js → cli-jt9d9fjw.js} +1 -1
- package/dist/{cli-axtg1zaa.js → cli-khe4x17a.js} +1 -1
- package/dist/{cli-3a5wne6a.js → cli-kk51f3tf.js} +5 -5
- package/dist/{cli-12mrw9t3.js → cli-krvxq8bc.js} +1 -1
- package/dist/{cli-ft42ja8t.js → cli-ksq38x4n.js} +2 -2
- package/dist/{cli-z5gm760z.js → cli-m8f6qzck.js} +1 -1
- package/dist/{cli-p3mgqhjg.js → cli-ns0r7mkr.js} +30 -5
- package/dist/{cli-0v0nmmx1.js → cli-rttgde5f.js} +18 -6
- package/dist/{cli-8ayape3v.js → cli-rvae030h.js} +3 -3
- package/dist/{cli-6w7kg2y6.js → cli-s14sb64w.js} +4 -4
- package/dist/{cli-yg15ef2d.js → cli-v9283nma.js} +1 -1
- package/dist/{cli-kdhqhhrt.js → cli-xmtsan9k.js} +1 -1
- package/dist/{cli-5mt46cfa.js → cli-yeemwevj.js} +155 -37
- package/dist/{cli-54wmx6d9.js → cli-yfwwjeft.js} +1 -1
- package/dist/{cli-s8jw5bmg.js → cli-yp2krx5r.js} +2 -2
- package/dist/cli.js +9 -9
- package/dist/{codex-adapter-wf119mnw.js → codex-adapter-w0xharsg.js} +3 -3
- package/dist/{codex-session-runner-1gknw7mh.js → codex-session-runner-kzbjcm2k.js} +3 -3
- package/dist/{commands-ne6wm294.js → commands-aqn63mcw.js} +2 -2
- package/dist/{db-4bssa9fd.js → db-azrvwsnj.js} +2 -2
- package/dist/{handlers-b1xzrzd8.js → handlers-hf61har3.js} +9 -9
- package/dist/{hook-ghkvmqhb.js → hook-306p3yz4.js} +2 -2
- package/dist/{http-3d87gpq5.js → http-zts4haq7.js} +106 -69
- package/dist/{index-zc2ryfs3.js → index-29vg51x6.js} +163 -26
- package/dist/{index-vfxc8p1h.js → index-3c651yfk.js} +10 -10
- package/dist/{index-g2dtq2m4.js → index-bfh9hgek.js} +5 -5
- package/dist/{index-7eqxb7sq.js → index-h2yqjyk0.js} +8 -8
- package/dist/{keepalive-mdrtpw97.js → keepalive-a0dg5pds.js} +4 -4
- package/dist/{lead-k05m28c2.js → lead-7mcxedkc.js} +21 -21
- package/dist/{maintenance-3qnntmp1.js → maintenance-mrzqd53t.js} +4 -4
- package/dist/{onboard-kch4svdx.js → onboard-4dkpv9wa.js} +2 -2
- package/dist/{otel-impl-7c00xnhe.js → otel-impl-jt7gpyp9.js} +1 -1
- package/dist/{pi-mono-adapter-hf8sw7hs.js → pi-mono-adapter-zf7dt1wg.js} +1 -1
- package/dist/{pricing-refresh-6038eg1z.js → pricing-refresh-xqnzh8dt.js} +4 -4
- package/dist/{seed-pricing-75b6h84n.js → seed-pricing-56tjm1fj.js} +3 -3
- package/dist/{setup-jrqcgbdc.js → setup-tbwk8j10.js} +2 -2
- package/dist/{worker-0p9zfby6.js → worker-e03za92t.js} +21 -21
- package/openapi.json +70 -1
- package/package.json +1 -1
- package/src/be/audit-user.ts +49 -0
- package/src/be/db.ts +114 -17
- package/src/be/migrations/098_repo_hooks_config.sql +3 -0
- package/src/be/scripts/db.ts +25 -5
- package/src/be/seed-skills/index.ts +7 -0
- package/src/be/task-lifecycle-events.ts +42 -0
- package/src/commands/runner.ts +174 -25
- package/src/github/task-reactions.ts +21 -0
- package/src/hooks/tool-loop-detection.test.ts +40 -0
- package/src/hooks/tool-loop-detection.ts +37 -1
- package/src/http/agents.ts +7 -0
- package/src/http/index.ts +16 -2
- package/src/http/prompt-templates.ts +1 -1
- package/src/http/repos.ts +5 -1
- package/src/http/schedules.ts +6 -2
- package/src/http/scripts.ts +4 -0
- package/src/http/session-data.ts +2 -0
- package/src/http/tasks.ts +2 -1
- package/src/http/workflows.ts +14 -1
- package/src/prompts/resolver.ts +1 -1
- package/src/scheduler/scheduler.ts +25 -2
- package/src/server-runtime-counters.ts +12 -0
- package/src/server-user.ts +1 -2
- package/src/server.ts +5 -0
- package/src/telemetry.ts +18 -1
- package/src/tests/audit-updated-by.test.ts +636 -0
- package/src/tests/audit-user.test.ts +156 -0
- package/src/tests/http-api-integration.test.ts +4 -0
- package/src/tests/model-control.test.ts +6 -6
- package/src/tests/swarm-repos.test.ts +25 -2
- package/src/tests/system-default-skills.test.ts +14 -1
- package/src/tests/task-lifecycle-events.test.ts +53 -0
- package/src/tests/task-lifecycle-telemetry.test.ts +37 -1
- package/src/tests/telemetry-init.test.ts +32 -0
- package/src/tools/prompt-templates/preview.ts +1 -1
- package/src/tools/repos/update-repo.ts +6 -1
- package/src/tools/schedules/create-schedule.ts +6 -1
- package/src/tools/schedules/update-schedule.ts +5 -2
- package/src/tools/script-common.ts +9 -5
- package/src/tools/send-task.ts +7 -2
- package/src/tools/task-action.ts +6 -2
- package/src/tools/workflows/create-workflow.ts +5 -0
- package/src/tools/workflows/patch-workflow-node.ts +10 -1
- package/src/tools/workflows/patch-workflow.ts +6 -0
- package/src/tools/workflows/update-workflow.ts +4 -0
- package/src/types.ts +159 -1
- package/src/utils/template.ts +127 -0
- package/src/workflows/engine.ts +7 -0
- package/src/workflows/executors/agent-task.ts +1 -2
- package/src/workflows/template.ts +12 -121
- package/src/workflows/triggers.ts +6 -2
- package/templates/community/code-health-reports/PLAYBOOK.md +355 -0
- package/templates/community/code-health-reports/README.md +38 -0
- package/templates/community/code-health-reports/lead-prompt.md +52 -0
- package/templates/community/code-health-reports/report.mjs +378 -0
- package/templates/community/code-health-reports/run.sh +143 -0
- package/templates/schedules/weekly-code-health-reports/config.json +13 -0
- package/templates/schedules/weekly-code-health-reports/content.md +60 -0
- package/templates/skills/TASTE-SKILL-LICENSE +21 -0
- package/templates/skills/pages/config.json +4 -3
- package/templates/skills/pages/content.md +39 -12
- package/templates/skills/taste-minimalist-skill/config.json +19 -0
- package/templates/skills/taste-minimalist-skill/content.md +83 -0
- package/src/model-tiers.ts +0 -140
- package/templates/community/.gitkeep +0 -0
|
@@ -3,6 +3,7 @@ var HISTORY_DIR = "/tmp/agent-swarm-tool-history";
|
|
|
3
3
|
var MAX_HISTORY = 30;
|
|
4
4
|
var REPEAT_WARNING_THRESHOLD = 8;
|
|
5
5
|
var REPEAT_CRITICAL_THRESHOLD = 15;
|
|
6
|
+
var LOW_CARDINALITY_FILE_CHANGE_CRITICAL_THRESHOLD = 24;
|
|
6
7
|
var PINGPONG_WARNING_THRESHOLD = 6;
|
|
7
8
|
var PINGPONG_CRITICAL_THRESHOLD = 12;
|
|
8
9
|
function hashArgs(args) {
|
|
@@ -15,6 +16,27 @@ function hashArgs(args) {
|
|
|
15
16
|
}
|
|
16
17
|
return hash.toString(36);
|
|
17
18
|
}
|
|
19
|
+
function isCodexFileChangeArgs(toolName, toolInput) {
|
|
20
|
+
if (toolName !== "Edit" && toolName !== "Write" && toolName !== "Delete") {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
const topLevelKeys = Object.keys(toolInput);
|
|
24
|
+
if (topLevelKeys.length !== 1 || topLevelKeys[0] !== "changes") {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
const changes = toolInput.changes;
|
|
28
|
+
if (!Array.isArray(changes) || changes.length === 0) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
return changes.every((change) => {
|
|
32
|
+
if (!change || typeof change !== "object" || Array.isArray(change)) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
const entry = change;
|
|
36
|
+
const keys = Object.keys(entry).sort();
|
|
37
|
+
return keys.length === 2 && keys[0] === "kind" && keys[1] === "path" && typeof entry.path === "string" && (entry.kind === "add" || entry.kind === "update" || entry.kind === "delete");
|
|
38
|
+
});
|
|
39
|
+
}
|
|
18
40
|
async function loadHistory(sessionKey) {
|
|
19
41
|
try {
|
|
20
42
|
const file = Bun.file(`${HISTORY_DIR}/${sessionKey}.json`);
|
|
@@ -39,13 +61,14 @@ async function checkToolLoop(sessionKey, toolName, toolInput) {
|
|
|
39
61
|
return { blocked: false };
|
|
40
62
|
}
|
|
41
63
|
const key = `${toolName}:${argsHash}`;
|
|
64
|
+
const repeatCriticalThreshold = isCodexFileChangeArgs(toolName, toolInput) ? LOW_CARDINALITY_FILE_CHANGE_CRITICAL_THRESHOLD : REPEAT_CRITICAL_THRESHOLD;
|
|
42
65
|
let repeatCount = 0;
|
|
43
66
|
for (const record of history) {
|
|
44
67
|
if (`${record.toolName}:${record.argsHash}` === key) {
|
|
45
68
|
repeatCount++;
|
|
46
69
|
}
|
|
47
70
|
}
|
|
48
|
-
if (repeatCount >=
|
|
71
|
+
if (repeatCount >= repeatCriticalThreshold) {
|
|
49
72
|
return {
|
|
50
73
|
blocked: true,
|
|
51
74
|
severity: "critical",
|
|
@@ -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.103.0",
|
|
11
11
|
description: "Multi-agent orchestration for Claude Code, Codex, Gemini CLI, and other AI coding assistants",
|
|
12
12
|
license: "MIT",
|
|
13
13
|
author: "desplega.sh <contact@desplega.sh>",
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
getScript,
|
|
6
6
|
getScriptVersion,
|
|
7
7
|
validateScriptImports
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-gzepjz54.js";
|
|
9
9
|
import {
|
|
10
10
|
checkpointStep,
|
|
11
11
|
checkpointStepFailure,
|
|
@@ -15,14 +15,14 @@ import {
|
|
|
15
15
|
interpolateNodeConfig,
|
|
16
16
|
runStepValidation,
|
|
17
17
|
walkGraph
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-rttgde5f.js";
|
|
19
19
|
import {
|
|
20
20
|
getAppUrl
|
|
21
21
|
} from "./cli-dh55d5fg.js";
|
|
22
22
|
import {
|
|
23
23
|
withSiblingAwareness,
|
|
24
24
|
workflowContextKey
|
|
25
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-jt9d9fjw.js";
|
|
26
26
|
import {
|
|
27
27
|
FollowUpConfigSchema,
|
|
28
28
|
ModelTierSchema,
|
|
@@ -46,8 +46,6 @@ import {
|
|
|
46
46
|
getWorkflowRunStepsByRunId,
|
|
47
47
|
getWorkflowVersions,
|
|
48
48
|
init_db,
|
|
49
|
-
init_model_tiers,
|
|
50
|
-
init_template,
|
|
51
49
|
init_types,
|
|
52
50
|
interpolate,
|
|
53
51
|
resolveApprovalRequest,
|
|
@@ -55,7 +53,7 @@ import {
|
|
|
55
53
|
splitLegacyModelAlias,
|
|
56
54
|
updateWorkflowRun,
|
|
57
55
|
updateWorkflowRunStep
|
|
58
|
-
} from "./cli-
|
|
56
|
+
} from "./cli-fedn86nz.js";
|
|
59
57
|
import {
|
|
60
58
|
init_zod
|
|
61
59
|
} from "./cli-q21d49ac.js";
|
|
@@ -1014,10 +1012,6 @@ function stopRetryPoller() {
|
|
|
1014
1012
|
pollerTimeout = null;
|
|
1015
1013
|
}
|
|
1016
1014
|
}
|
|
1017
|
-
|
|
1018
|
-
// src/workflows/index.ts
|
|
1019
|
-
init_template();
|
|
1020
|
-
|
|
1021
1015
|
// src/workflows/templates.ts
|
|
1022
1016
|
function validateTemplateVariables(template, provided) {
|
|
1023
1017
|
const missing = [];
|
|
@@ -1141,7 +1135,6 @@ init_zod();
|
|
|
1141
1135
|
|
|
1142
1136
|
// src/workflows/executors/agent-task.ts
|
|
1143
1137
|
init_zod();
|
|
1144
|
-
init_model_tiers();
|
|
1145
1138
|
init_types();
|
|
1146
1139
|
var AgentTaskConfigSchema = exports_external.object({
|
|
1147
1140
|
template: exports_external.string(),
|
|
@@ -1428,7 +1421,7 @@ class HumanInTheLoopExecutor extends BaseExecutor {
|
|
|
1428
1421
|
}
|
|
1429
1422
|
if (notification.channel === "slack") {
|
|
1430
1423
|
try {
|
|
1431
|
-
const { getSlackApp } = await import("./app-
|
|
1424
|
+
const { getSlackApp } = await import("./app-xm3xsdye.js");
|
|
1432
1425
|
const slackApp = getSlackApp();
|
|
1433
1426
|
if (!slackApp) {
|
|
1434
1427
|
console.warn("[HITL] Slack not initialized — cannot send notification");
|
|
@@ -1542,7 +1535,7 @@ class NotifyExecutor extends BaseExecutor {
|
|
|
1542
1535
|
}
|
|
1543
1536
|
}
|
|
1544
1537
|
case "slack": {
|
|
1545
|
-
const { getSlackApp } = await import("./app-
|
|
1538
|
+
const { getSlackApp } = await import("./app-xm3xsdye.js");
|
|
1546
1539
|
const app = getSlackApp();
|
|
1547
1540
|
if (!app) {
|
|
1548
1541
|
return {
|
|
@@ -2545,7 +2538,6 @@ function createExecutorRegistry(deps) {
|
|
|
2545
2538
|
}
|
|
2546
2539
|
|
|
2547
2540
|
// src/workflows/index.ts
|
|
2548
|
-
init_template();
|
|
2549
2541
|
var _registry = null;
|
|
2550
2542
|
function getExecutorRegistry() {
|
|
2551
2543
|
if (!_registry) {
|