@desplega.ai/agent-swarm 1.102.0 → 1.104.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-j9399ktm.js → actions-2expzt47.js} +6 -6
- package/dist/{app-tnq1pz27.js → app-dr8hwx7z.js} +3 -3
- package/dist/{assistant-c7y92gkw.js → assistant-9rhgsw7v.js} +9 -10
- package/dist/{boot-reembed-b97r699t.js → boot-reembed-3q1aywnz.js} +5 -4
- package/dist/{boot-reembed-k7e6fc1p.js → boot-reembed-9kt97g1z.js} +4 -3
- package/dist/{boot-scrub-logs-14kbc61y.js → boot-scrub-logs-vskq108e.js} +2 -2
- package/dist/{claude-managed-adapter-g07dbz3b.js → claude-managed-adapter-z29hjgzz.js} +3 -3
- package/dist/{cli-d0t4854c.js → cli-0jw6j755.js} +220 -478
- package/dist/{cli-vgck9mqq.js → cli-23zk7xqy.js} +171 -49
- package/dist/{cli-g5px3d7x.js → cli-2957pqpj.js} +24 -1
- package/dist/{cli-zmf7refz.js → cli-2g9jf9ek.js} +1 -1
- package/dist/{cli-mhj07xbq.js → cli-2hap19dv.js} +3 -3
- package/dist/{cli-wjyyv518.js → cli-3j01d33e.js} +9 -14
- package/dist/{cli-zk4gn40w.js → cli-54h5daha.js} +41 -31
- package/dist/{cli-2aaa9mqr.js → cli-5pf0b84v.js} +2 -2
- package/dist/{cli-stqqf5kh.js → cli-7v4y3hyd.js} +1 -1
- package/dist/{cli-7xdq3jg3.js → cli-92fqyjcv.js} +1 -1
- package/dist/{cli-g861fwjp.js → cli-d4z1csms.js} +30 -5
- package/dist/{cli-r68m8arr.js → cli-e7bwjntj.js} +1 -1
- package/dist/{cli-q6jzg6wj.js → cli-etvgz5x8.js} +5 -7
- package/dist/{cli-9qascwj7.js → cli-gj2n2ec1.js} +1 -1
- package/dist/{cli-axtg1zaa.js → cli-khe4x17a.js} +1 -1
- package/dist/{cli-zctkpdmd.js → cli-nzc0h54v.js} +121 -2
- package/dist/{cli-k81y1cjb.js → cli-p4cj4vhc.js} +351 -24
- package/dist/{cli-fjx4x7nn.js → cli-q5tshxd6.js} +1 -1
- package/dist/{http-eq6wxve6.js → cli-qvzgncd8.js} +85356 -77793
- package/dist/{cli-k1ghyj8b.js → cli-s42f54ja.js} +1 -1
- package/dist/{cli-dgab5x2h.js → cli-t9v14cnd.js} +23 -4
- package/dist/{cli-qbc6mncp.js → cli-v1syqkcb.js} +900 -352
- package/dist/{cli-xde8vhhp.js → cli-w1nfskkg.js} +2 -2
- package/dist/{cli-ap4md0gc.js → cli-y9p3e94h.js} +30 -5
- package/dist/{cli-hc4rd6sv.js → cli-yjt8a36k.js} +3 -3
- package/dist/{cli-s8jw5bmg.js → cli-yp2krx5r.js} +2 -2
- package/dist/{cli-5bqa41fd.js → cli-yvektv79.js} +1 -1
- package/dist/{cli-sygq3fhn.js → cli-zaxksbgj.js} +5 -5
- package/dist/{cli-t2jk33ta.js → cli-zghef0em.js} +18 -6
- package/dist/cli.js +11 -11
- 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-2wyn3swb.js → commands-wfrkef57.js} +2 -2
- package/dist/{db-567ntpxv.js → db-c42pxt7h.js} +2 -2
- package/dist/{handlers-wvwpk2kj.js → handlers-n36zkfvx.js} +10 -12
- package/dist/{hook-fatkywc0.js → hook-gw3vhv6s.js} +8 -6
- package/dist/http-59ygpn2h.js +17263 -0
- package/dist/{index-d1rm4ea3.js → index-881c1baf.js} +9 -8
- package/dist/{index-400x6p3j.js → index-jca7jdpt.js} +23 -10
- package/dist/{index-6aj8966p.js → index-xf6fp4y1.js} +5 -5
- package/dist/{index-9wqh5352.js → index-xz8vaa5c.js} +14 -11
- package/dist/{keepalive-6x9nx92g.js → keepalive-mj4302vw.js} +4 -4
- package/dist/{lead-5fgqwe13.js → lead-qm0xjvkv.js} +23 -23
- package/dist/{maintenance-eajx5k1k.js → maintenance-xppxbe4t.js} +5 -4
- package/dist/{onboard-jc1w1edg.js → onboard-ejx6yxh8.js} +2 -2
- package/dist/{otel-impl-8k375amf.js → otel-impl-zs5exkpk.js} +1 -1
- package/dist/{pi-mono-adapter-hf8sw7hs.js → pi-mono-adapter-zf7dt1wg.js} +1 -1
- package/dist/{pricing-refresh-zed6916t.js → pricing-refresh-nqyf8bkb.js} +4 -4
- package/dist/{seed-pricing-5805qzkz.js → seed-pricing-w3x550cj.js} +3 -3
- package/dist/{setup-wz05vxh0.js → setup-7729ktfj.js} +2 -2
- package/dist/{worker-j359graf.js → worker-4ttemwhw.js} +23 -23
- package/openapi.json +159 -4
- package/package.json +3 -3
- package/src/be/db.ts +83 -13
- package/src/be/memory/constants.ts +6 -0
- package/src/be/memory/providers/sqlite-store.ts +468 -71
- package/src/be/memory/raters/retrieval.ts +4 -2
- package/src/be/memory/reranker.ts +5 -2
- package/src/be/memory/retrieval-store.ts +2 -0
- package/src/be/memory/types.ts +46 -0
- package/src/be/migrations/098_repo_hooks_config.sql +3 -0
- package/src/be/migrations/099_memory_structured_key_versioning.sql +41 -0
- package/src/be/migrations/100_memory_retrieval_source.sql +8 -0
- package/src/be/migrations/101_script_connections.sql +67 -0
- package/src/be/script-connections.ts +744 -0
- package/src/be/script-credential-broker.ts +38 -0
- package/src/be/scripts/typecheck.ts +23 -2
- package/src/be/seed-scripts/catalog/boot-triage.inline.ts +16 -4
- package/src/be/seed-scripts/catalog/boot-triage.ts +16 -4
- package/src/be/task-lifecycle-events.ts +42 -0
- package/src/commands/runner.ts +182 -31
- package/src/github/task-reactions.ts +21 -0
- package/src/heartbeat/heartbeat.ts +42 -1
- package/src/heartbeat/index.ts +7 -1
- 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/memory.ts +127 -14
- package/src/http/prompt-templates.ts +1 -1
- package/src/http/repos.ts +5 -1
- package/src/http/schedules.ts +1 -1
- package/src/http/scripts.ts +15 -14
- package/src/http/session-data.ts +2 -0
- package/src/http/tasks.ts +2 -1
- package/src/http/workflows.ts +1 -0
- package/src/prompts/resolver.ts +1 -1
- package/src/scheduler/scheduler.ts +25 -2
- package/src/scripts-runtime/api-client.ts +100 -0
- package/src/scripts-runtime/api-types.ts +45 -0
- package/src/scripts-runtime/credential-broker/README.md +40 -0
- package/src/scripts-runtime/credential-broker/broker.ts +51 -0
- package/src/scripts-runtime/credential-broker/default-bindings.ts +19 -0
- package/src/scripts-runtime/credential-broker/fetch-patch.ts +102 -0
- package/src/scripts-runtime/credential-broker/index.ts +17 -0
- package/src/scripts-runtime/credential-broker/store.ts +72 -0
- package/src/scripts-runtime/credential-broker/types.ts +54 -0
- package/src/scripts-runtime/ctx.ts +11 -1
- package/src/scripts-runtime/egress-secrets.ts +14 -76
- package/src/scripts-runtime/eval-harness.ts +1 -1
- package/src/scripts-runtime/executors/types.ts +5 -5
- package/src/scripts-runtime/loader.ts +6 -1
- package/src/scripts-runtime/sdk-allowlist.ts +1 -0
- package/src/scripts-runtime/types/stdlib.d.ts +11 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +11 -0
- package/src/server-runtime-counters.ts +12 -0
- package/src/server-user.ts +1 -2
- package/src/server.ts +11 -0
- package/src/telemetry.ts +18 -1
- package/src/tests/credential-broker.test.ts +281 -0
- package/src/tests/heartbeat.test.ts +239 -0
- package/src/tests/http-api-integration.test.ts +4 -0
- package/src/tests/memory-edit.test.ts +177 -0
- package/src/tests/memory-hybrid.test.ts +212 -0
- package/src/tests/model-control.test.ts +6 -6
- package/src/tests/runner-repo-autostash.test.ts +39 -8
- package/src/tests/script-connections.test.ts +360 -0
- package/src/tests/scripts-http.test.ts +16 -10
- package/src/tests/scripts-runtime-secret-egress.test.ts +26 -5
- package/src/tests/swarm-config-reserved-keys.test.ts +23 -0
- package/src/tests/swarm-repos.test.ts +25 -2
- 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/tests/update-schedule-mcp-tool.test.ts +83 -4
- package/src/tools/credential-bindings/index.ts +1 -0
- package/src/tools/credential-bindings/tool.ts +238 -0
- package/src/tools/memory-edit.ts +148 -0
- package/src/tools/memory-search.ts +17 -10
- 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 +1 -1
- package/src/tools/schedules/delete-schedule.ts +18 -8
- package/src/tools/schedules/update-schedule.ts +5 -10
- package/src/tools/script-connections/index.ts +1 -0
- package/src/tools/script-connections/tool.ts +167 -0
- package/src/tools/send-task.ts +7 -2
- package/src/tools/swarm-config/delete-config.ts +5 -0
- package/src/tools/swarm-config/set-config.ts +23 -1
- package/src/tools/task-action.ts +6 -2
- package/src/tools/tool-config.ts +6 -1
- package/src/types.ts +161 -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/executors/swarm-script.ts +2 -0
- 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/community/dora-metrics/PLAYBOOK.md +294 -0
- package/templates/community/dora-metrics/README.md +39 -0
- package/templates/community/dora-metrics/lead-prompt.md +56 -0
- package/templates/community/dora-metrics/report.mjs +393 -0
- package/templates/community/dora-metrics/run.sh +113 -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/schedules/weekly-dora-metrics/config.json +13 -0
- package/templates/schedules/weekly-dora-metrics/content.md +61 -0
- package/dist/cli-2deg0cen.js +0 -120
- package/dist/cli-tsz1q7gk.js +0 -23871
- package/src/model-tiers.ts +0 -140
- package/templates/community/.gitkeep +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildModelsDevSeedRows
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-7v4y3hyd.js";
|
|
4
4
|
import {
|
|
5
5
|
createLogEntry,
|
|
6
6
|
getActivePricingRow,
|
|
7
7
|
getDb,
|
|
8
8
|
init_db,
|
|
9
9
|
insertPricingRow
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-0jw6j755.js";
|
|
11
11
|
import {
|
|
12
12
|
init_secret_scrubber,
|
|
13
13
|
scrubSecrets
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handleScheduleTrigger
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-zghef0em.js";
|
|
4
4
|
import {
|
|
5
5
|
createTaskWithSiblingAwareness,
|
|
6
6
|
scheduleContextKey
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-e7bwjntj.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb,
|
|
10
10
|
getDueScheduledTasks,
|
|
11
11
|
getScheduledTaskById,
|
|
12
12
|
init_db,
|
|
13
|
+
init_telemetry,
|
|
14
|
+
telemetry,
|
|
13
15
|
updateScheduledTask
|
|
14
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-0jw6j755.js";
|
|
15
17
|
import {
|
|
16
18
|
__commonJS,
|
|
17
19
|
__require,
|
|
@@ -6833,6 +6835,7 @@ var version = package_default.version;
|
|
|
6833
6835
|
// src/scheduler/scheduler.ts
|
|
6834
6836
|
init_db();
|
|
6835
6837
|
var import_cron_parser = __toESM(require_dist(), 1);
|
|
6838
|
+
init_telemetry();
|
|
6836
6839
|
var schedulerInterval = null;
|
|
6837
6840
|
var isProcessing = false;
|
|
6838
6841
|
var executorRegistry = null;
|
|
@@ -6860,8 +6863,8 @@ async function recoverMissedSchedules() {
|
|
|
6860
6863
|
if (missedBy < 15000)
|
|
6861
6864
|
continue;
|
|
6862
6865
|
console.log(`[Scheduler] Recovering missed schedule "${schedule.name}" ` + `(was due ${Math.round(missedBy / 1000)}s ago)`);
|
|
6866
|
+
let triggeredWorkflows = false;
|
|
6863
6867
|
try {
|
|
6864
|
-
let triggeredWorkflows = false;
|
|
6865
6868
|
if (executorRegistry) {
|
|
6866
6869
|
const runIds = await handleScheduleTrigger(schedule.id, schedule, executorRegistry);
|
|
6867
6870
|
if (runIds.length > 0) {
|
|
@@ -6893,7 +6896,18 @@ async function recoverMissedSchedules() {
|
|
|
6893
6896
|
if (schedule.scheduleType === "one_time") {
|
|
6894
6897
|
console.log(`[Scheduler] One-time schedule "${schedule.name}" recovered and auto-disabled`);
|
|
6895
6898
|
}
|
|
6899
|
+
telemetry.schedule("executed", {
|
|
6900
|
+
scheduleType: schedule.scheduleType,
|
|
6901
|
+
triggeredWorkflows,
|
|
6902
|
+
wasRecovered: true
|
|
6903
|
+
});
|
|
6896
6904
|
} catch (err) {
|
|
6905
|
+
telemetry.schedule("error", {
|
|
6906
|
+
scheduleType: schedule.scheduleType,
|
|
6907
|
+
triggeredWorkflows,
|
|
6908
|
+
wasRecovered: true,
|
|
6909
|
+
consecutiveErrors: schedule.consecutiveErrors ?? 0
|
|
6910
|
+
});
|
|
6897
6911
|
console.error(`[Scheduler] Error recovering "${schedule.name}":`, err);
|
|
6898
6912
|
}
|
|
6899
6913
|
}
|
|
@@ -6929,8 +6943,8 @@ function getBackoffMs(consecutiveErrors) {
|
|
|
6929
6943
|
return ERROR_BACKOFF_MS[Math.max(0, idx)] ?? ERROR_BACKOFF_MS[0];
|
|
6930
6944
|
}
|
|
6931
6945
|
async function executeSchedule(schedule) {
|
|
6946
|
+
let triggeredWorkflows = false;
|
|
6932
6947
|
try {
|
|
6933
|
-
let triggeredWorkflows = false;
|
|
6934
6948
|
if (executorRegistry) {
|
|
6935
6949
|
const runIds = await handleScheduleTrigger(schedule.id, schedule, executorRegistry);
|
|
6936
6950
|
if (runIds.length > 0) {
|
|
@@ -6967,6 +6981,11 @@ async function executeSchedule(schedule) {
|
|
|
6967
6981
|
});
|
|
6968
6982
|
console.log(`[Scheduler] Executed schedule "${schedule.name}", next run: ${nextRun}`);
|
|
6969
6983
|
}
|
|
6984
|
+
telemetry.schedule("executed", {
|
|
6985
|
+
scheduleType: schedule.scheduleType,
|
|
6986
|
+
triggeredWorkflows,
|
|
6987
|
+
wasRecovered: false
|
|
6988
|
+
});
|
|
6970
6989
|
} catch (err) {
|
|
6971
6990
|
const errorCount = (schedule.consecutiveErrors ?? 0) + 1;
|
|
6972
6991
|
const now = new Date;
|
|
@@ -6990,6 +7009,12 @@ async function executeSchedule(schedule) {
|
|
|
6990
7009
|
console.log(`[Scheduler] Backing off "${schedule.name}" for ${backoff / 1000}s`);
|
|
6991
7010
|
}
|
|
6992
7011
|
updateScheduledTask(schedule.id, updates);
|
|
7012
|
+
telemetry.schedule("error", {
|
|
7013
|
+
scheduleType: schedule.scheduleType,
|
|
7014
|
+
triggeredWorkflows,
|
|
7015
|
+
wasRecovered: false,
|
|
7016
|
+
consecutiveErrors: errorCount
|
|
7017
|
+
});
|
|
6993
7018
|
}
|
|
6994
7019
|
}
|
|
6995
7020
|
function startScheduler(registry, intervalMs = 1e4, opts) {
|
|
@@ -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.104.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>",
|
|
@@ -127,8 +127,8 @@ var init_package = __esm(() => {
|
|
|
127
127
|
"@inkjs/ui": "^2.0.0",
|
|
128
128
|
"@linear/sdk": "^77.0.0",
|
|
129
129
|
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
130
|
-
"@openai/codex-sdk": "^0.142.
|
|
131
|
-
"@opencode-ai/sdk": "^1.17.
|
|
130
|
+
"@openai/codex-sdk": "^0.142.3",
|
|
131
|
+
"@opencode-ai/sdk": "^1.17.11",
|
|
132
132
|
"@openfort/openfort-node": "^0.9.1",
|
|
133
133
|
"@opentelemetry/api": "^1.9.1",
|
|
134
134
|
"@opentelemetry/exporter-trace-otlp-http": "^0.218.0",
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
getTaskById,
|
|
26
26
|
init_db,
|
|
27
27
|
setSlackMessageTracking
|
|
28
|
-
} from "./cli-
|
|
28
|
+
} from "./cli-0jw6j755.js";
|
|
29
29
|
import {
|
|
30
30
|
require_receiver,
|
|
31
31
|
require_sender,
|
|
@@ -54980,13 +54980,13 @@ async function initSlackApp() {
|
|
|
54980
54980
|
socketMode: true,
|
|
54981
54981
|
logLevel: import_bolt.LogLevel.DEBUG
|
|
54982
54982
|
});
|
|
54983
|
-
const { registerMessageHandler } = await import("./handlers-
|
|
54984
|
-
const { registerCommandHandler } = await import("./commands-
|
|
54985
|
-
const { registerActionHandlers } = await import("./actions-
|
|
54983
|
+
const { registerMessageHandler } = await import("./handlers-n36zkfvx.js");
|
|
54984
|
+
const { registerCommandHandler } = await import("./commands-wfrkef57.js");
|
|
54985
|
+
const { registerActionHandlers } = await import("./actions-2expzt47.js");
|
|
54986
54986
|
registerMessageHandler(app);
|
|
54987
54987
|
registerCommandHandler(app);
|
|
54988
54988
|
registerActionHandlers(app);
|
|
54989
|
-
const { createAssistant } = await import("./assistant-
|
|
54989
|
+
const { createAssistant } = await import("./assistant-9rhgsw7v.js");
|
|
54990
54990
|
app.assistant(createAssistant());
|
|
54991
54991
|
return app;
|
|
54992
54992
|
}
|
|
@@ -15,10 +15,12 @@ import {
|
|
|
15
15
|
getWorkflowRunStepsByRunId,
|
|
16
16
|
getWorkflowsByScheduleId,
|
|
17
17
|
init_db,
|
|
18
|
+
init_telemetry,
|
|
18
19
|
init_template,
|
|
20
|
+
telemetry,
|
|
19
21
|
updateWorkflowRun,
|
|
20
22
|
updateWorkflowRunStep
|
|
21
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-0jw6j755.js";
|
|
22
24
|
import {
|
|
23
25
|
init_secret_scrubber,
|
|
24
26
|
isSensitiveKey
|
|
@@ -247,8 +249,12 @@ function applyDefinitionPatch(def, patch) {
|
|
|
247
249
|
return { definition: patchedDef, errors };
|
|
248
250
|
}
|
|
249
251
|
|
|
252
|
+
// src/workflows/template.ts
|
|
253
|
+
init_template();
|
|
254
|
+
|
|
250
255
|
// src/workflows/engine.ts
|
|
251
256
|
init_db();
|
|
257
|
+
init_telemetry();
|
|
252
258
|
|
|
253
259
|
// src/workflows/checkpoint.ts
|
|
254
260
|
init_db();
|
|
@@ -506,9 +512,6 @@ function typeOf(data) {
|
|
|
506
512
|
return typeof data;
|
|
507
513
|
}
|
|
508
514
|
|
|
509
|
-
// src/workflows/engine.ts
|
|
510
|
-
init_template();
|
|
511
|
-
|
|
512
515
|
// src/workflows/validation.ts
|
|
513
516
|
function extractPassResult(executorType, output) {
|
|
514
517
|
if (!output || typeof output !== "object")
|
|
@@ -605,6 +608,11 @@ async function startWorkflowExecution(workflow, triggerData, registry, options =
|
|
|
605
608
|
}
|
|
606
609
|
const runId = crypto.randomUUID();
|
|
607
610
|
createWorkflowRun({ id: runId, workflowId: workflow.id, triggerData });
|
|
611
|
+
telemetry.workflow("started", {
|
|
612
|
+
workflowId: workflow.id,
|
|
613
|
+
nodeCount: workflow.definition.nodes.length,
|
|
614
|
+
triggerType: options.triggerType ?? "manual"
|
|
615
|
+
});
|
|
608
616
|
const ctx = { trigger: triggerData };
|
|
609
617
|
if (options.requestedByUserId) {
|
|
610
618
|
ctx.swarm = { requestedByUserId: options.requestedByUserId };
|
|
@@ -1047,7 +1055,9 @@ async function handleWebhookTrigger(workflowId, payload, headers, registry) {
|
|
|
1047
1055
|
}
|
|
1048
1056
|
}
|
|
1049
1057
|
const triggerData = parseTriggerPayload(payload);
|
|
1050
|
-
const runId = await startWorkflowExecution(workflow, triggerData, registry
|
|
1058
|
+
const runId = await startWorkflowExecution(workflow, triggerData, registry, {
|
|
1059
|
+
triggerType: "event"
|
|
1060
|
+
});
|
|
1051
1061
|
return { runId };
|
|
1052
1062
|
}
|
|
1053
1063
|
function parseTriggerPayload(payload) {
|
|
@@ -1070,7 +1080,9 @@ async function handleScheduleTrigger(scheduleId, schedule, registry) {
|
|
|
1070
1080
|
scheduleName: schedule.name,
|
|
1071
1081
|
firedAt: new Date().toISOString()
|
|
1072
1082
|
};
|
|
1073
|
-
const runId = await startWorkflowExecution(workflow, triggerData, registry
|
|
1083
|
+
const runId = await startWorkflowExecution(workflow, triggerData, registry, {
|
|
1084
|
+
triggerType: "schedule"
|
|
1085
|
+
});
|
|
1074
1086
|
runIds.push(runId);
|
|
1075
1087
|
console.log(`[Triggers] Schedule "${schedule.name}" triggered workflow "${workflow.name}" (run: ${runId})`);
|
|
1076
1088
|
}
|
package/dist/cli.js
CHANGED
|
@@ -62,7 +62,7 @@ var import_react = __toESM(require_react(), 1);
|
|
|
62
62
|
// package.json
|
|
63
63
|
var package_default = {
|
|
64
64
|
name: "@desplega.ai/agent-swarm",
|
|
65
|
-
version: "1.
|
|
65
|
+
version: "1.104.0",
|
|
66
66
|
description: "Multi-agent orchestration for Claude Code, Codex, Gemini CLI, and other AI coding assistants",
|
|
67
67
|
license: "MIT",
|
|
68
68
|
author: "desplega.sh <contact@desplega.sh>",
|
|
@@ -182,8 +182,8 @@ var package_default = {
|
|
|
182
182
|
"@inkjs/ui": "^2.0.0",
|
|
183
183
|
"@linear/sdk": "^77.0.0",
|
|
184
184
|
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
185
|
-
"@openai/codex-sdk": "^0.142.
|
|
186
|
-
"@opencode-ai/sdk": "^1.17.
|
|
185
|
+
"@openai/codex-sdk": "^0.142.3",
|
|
186
|
+
"@opencode-ai/sdk": "^1.17.11",
|
|
187
187
|
"@openfort/openfort-node": "^0.9.1",
|
|
188
188
|
"@opentelemetry/api": "^1.9.1",
|
|
189
189
|
"@opentelemetry/exporter-trace-otlp-http": "^0.218.0",
|
|
@@ -616,7 +616,7 @@ function McpServer({ port, apiKey, dbPath }) {
|
|
|
616
616
|
if (dbPath) {
|
|
617
617
|
process.env.DATABASE_PATH = dbPath;
|
|
618
618
|
}
|
|
619
|
-
import("./http-
|
|
619
|
+
import("./http-59ygpn2h.js").then(() => {
|
|
620
620
|
setStatus("running");
|
|
621
621
|
}).catch((err) => {
|
|
622
622
|
setStatus("error");
|
|
@@ -702,7 +702,7 @@ function WorkerRunner({
|
|
|
702
702
|
}) {
|
|
703
703
|
const { exit } = use_app_default();
|
|
704
704
|
import_react.useEffect(() => {
|
|
705
|
-
import("./worker-
|
|
705
|
+
import("./worker-4ttemwhw.js").then(({ runWorker }) => runWorker({
|
|
706
706
|
prompt: prompt || undefined,
|
|
707
707
|
yolo,
|
|
708
708
|
systemPrompt: systemPrompt || undefined,
|
|
@@ -719,7 +719,7 @@ function WorkerRunner({
|
|
|
719
719
|
function LeadRunner({ prompt, yolo, systemPrompt, systemPromptFile, additionalArgs }) {
|
|
720
720
|
const { exit } = use_app_default();
|
|
721
721
|
import_react.useEffect(() => {
|
|
722
|
-
import("./lead-
|
|
722
|
+
import("./lead-qm0xjvkv.js").then(({ runLead }) => runLead({
|
|
723
723
|
prompt: prompt || undefined,
|
|
724
724
|
yolo,
|
|
725
725
|
systemPrompt: systemPrompt || undefined,
|
|
@@ -759,8 +759,8 @@ function LazyComponent({
|
|
|
759
759
|
}
|
|
760
760
|
return import_react.createElement(Component, props);
|
|
761
761
|
}
|
|
762
|
-
var loadOnboard = () => import("./onboard-
|
|
763
|
-
var loadConnect = () => import("./setup-
|
|
762
|
+
var loadOnboard = () => import("./onboard-ejx6yxh8.js").then(({ Onboard }) => Onboard);
|
|
763
|
+
var loadConnect = () => import("./setup-7729ktfj.js").then(({ Setup }) => Setup);
|
|
764
764
|
function UnknownCommand({ command }) {
|
|
765
765
|
const { exit } = use_app_default();
|
|
766
766
|
import_react.useEffect(() => {
|
|
@@ -873,7 +873,7 @@ ${binName} docs \u2014 v${package_default.version}
|
|
|
873
873
|
}
|
|
874
874
|
process.exit(0);
|
|
875
875
|
} else if (args.command === "hook") {
|
|
876
|
-
const { runHook } = await import("./hook-
|
|
876
|
+
const { runHook } = await import("./hook-gw3vhv6s.js");
|
|
877
877
|
await runHook();
|
|
878
878
|
} else if (args.command === "artifact") {
|
|
879
879
|
const artifactArgs = process.argv.slice(process.argv.indexOf("artifact") + 1);
|
|
@@ -893,7 +893,7 @@ ${binName} docs \u2014 v${package_default.version}
|
|
|
893
893
|
printHelp("scripts");
|
|
894
894
|
process.exit(scriptsArgs[0] === "reembed" || args.showHelp ? 0 : 1);
|
|
895
895
|
}
|
|
896
|
-
const { runScriptsMaintenanceCommand } = await import("./maintenance-
|
|
896
|
+
const { runScriptsMaintenanceCommand } = await import("./maintenance-xppxbe4t.js");
|
|
897
897
|
await runScriptsMaintenanceCommand(scriptsArgs);
|
|
898
898
|
console.log("Scripts re-embedded.");
|
|
899
899
|
} else if (args.command === "codex-login") {
|
|
@@ -901,7 +901,7 @@ ${binName} docs \u2014 v${package_default.version}
|
|
|
901
901
|
const codexLoginArgs = process.argv.slice(process.argv.indexOf("codex-login") + 1);
|
|
902
902
|
await runCodexLogin(codexLoginArgs);
|
|
903
903
|
} else if (args.command === "codex-session-runner") {
|
|
904
|
-
const { runCodexSessionRunner } = await import("./codex-session-runner-
|
|
904
|
+
const { runCodexSessionRunner } = await import("./codex-session-runner-kzbjcm2k.js");
|
|
905
905
|
await runCodexSessionRunner();
|
|
906
906
|
} else if (args.command === "claude-managed-setup") {
|
|
907
907
|
const { runClaudeManagedSetup } = await import("./claude-managed-setup-ftbmvmvx.js");
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
checkCodexCredentials,
|
|
6
6
|
createInProcessCodexSession,
|
|
7
7
|
resolveCodexRunnerArgv
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-khe4x17a.js";
|
|
9
9
|
import"./cli-p03mawph.js";
|
|
10
10
|
import"./cli-4wmnp8q3.js";
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
11
|
+
import"./cli-92fqyjcv.js";
|
|
12
|
+
import"./cli-2957pqpj.js";
|
|
13
13
|
import"./cli-r94z9p1z.js";
|
|
14
14
|
import"./cli-d6n0thxw.js";
|
|
15
15
|
import"./cli-hx1dcevq.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createInProcessCodexSession
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-khe4x17a.js";
|
|
4
4
|
import"./cli-p03mawph.js";
|
|
5
5
|
import"./cli-4wmnp8q3.js";
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
6
|
+
import"./cli-92fqyjcv.js";
|
|
7
|
+
import"./cli-2957pqpj.js";
|
|
8
8
|
import"./cli-r94z9p1z.js";
|
|
9
9
|
import"./cli-d6n0thxw.js";
|
|
10
10
|
import"./cli-hx1dcevq.js";
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
getAllAgents,
|
|
3
3
|
getAllTasks,
|
|
4
4
|
init_db
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-0jw6j755.js";
|
|
6
6
|
import"./cli-z2zcxes1.js";
|
|
7
7
|
import"./cli-q21d49ac.js";
|
|
8
8
|
import"./cli-anrj584m.js";
|
|
9
|
-
import"./cli-
|
|
9
|
+
import"./cli-yjt8a36k.js";
|
|
10
10
|
import"./cli-3pp1362w.js";
|
|
11
11
|
import"./cli-p9swy5t3.js";
|
|
12
12
|
|
|
@@ -376,11 +376,11 @@ import {
|
|
|
376
376
|
upsertSkillFile,
|
|
377
377
|
upsertSkillFiles,
|
|
378
378
|
upsertSwarmConfig
|
|
379
|
-
} from "./cli-
|
|
379
|
+
} from "./cli-0jw6j755.js";
|
|
380
380
|
import"./cli-z2zcxes1.js";
|
|
381
381
|
import"./cli-q21d49ac.js";
|
|
382
382
|
import"./cli-anrj584m.js";
|
|
383
|
-
import"./cli-
|
|
383
|
+
import"./cli-yjt8a36k.js";
|
|
384
384
|
import"./cli-3pp1362w.js";
|
|
385
385
|
import"./cli-p9swy5t3.js";
|
|
386
386
|
init_db();
|
|
@@ -3,26 +3,24 @@ import {
|
|
|
3
3
|
getBufferMessageCount,
|
|
4
4
|
instantFlush,
|
|
5
5
|
wasEventSeen
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-etvgz5x8.js";
|
|
7
7
|
import {
|
|
8
|
+
extractSlackMessageText,
|
|
8
9
|
extractTaskFromMessage,
|
|
9
10
|
hasOtherUserMention,
|
|
10
11
|
routeMessage
|
|
11
|
-
} from "./cli-
|
|
12
|
-
import {
|
|
13
|
-
extractSlackMessageText
|
|
14
|
-
} from "./cli-2deg0cen.js";
|
|
12
|
+
} from "./cli-nzc0h54v.js";
|
|
15
13
|
import {
|
|
16
14
|
registerTreeMessage
|
|
17
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-zaxksbgj.js";
|
|
18
16
|
import"./cli-fete3y1e.js";
|
|
19
17
|
import"./cli-b0p7rfnd.js";
|
|
20
18
|
import {
|
|
21
19
|
enrichSlackUserEmail,
|
|
22
20
|
resolveSlackUserId
|
|
23
|
-
} from "./cli-
|
|
24
|
-
import"./cli-
|
|
25
|
-
import"./cli-
|
|
21
|
+
} from "./cli-2hap19dv.js";
|
|
22
|
+
import"./cli-gj2n2ec1.js";
|
|
23
|
+
import"./cli-yvektv79.js";
|
|
26
24
|
import {
|
|
27
25
|
buildTreeBlocks
|
|
28
26
|
} from "./cli-z92pkwzn.js";
|
|
@@ -30,7 +28,7 @@ import"./cli-dh55d5fg.js";
|
|
|
30
28
|
import {
|
|
31
29
|
createTaskWithSiblingAwareness,
|
|
32
30
|
slackContextKey
|
|
33
|
-
} from "./cli-
|
|
31
|
+
} from "./cli-e7bwjntj.js";
|
|
34
32
|
import {
|
|
35
33
|
getAgentById,
|
|
36
34
|
getAgentWorkingOnThread,
|
|
@@ -40,11 +38,11 @@ import {
|
|
|
40
38
|
init_db,
|
|
41
39
|
init_resolver,
|
|
42
40
|
resolveTemplate
|
|
43
|
-
} from "./cli-
|
|
41
|
+
} from "./cli-0jw6j755.js";
|
|
44
42
|
import"./cli-z2zcxes1.js";
|
|
45
43
|
import"./cli-q21d49ac.js";
|
|
46
44
|
import"./cli-anrj584m.js";
|
|
47
|
-
import"./cli-
|
|
45
|
+
import"./cli-yjt8a36k.js";
|
|
48
46
|
import"./cli-3pp1362w.js";
|
|
49
47
|
import"./cli-e15jhafb.js";
|
|
50
48
|
import {
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
contentSha256,
|
|
3
|
-
readIdentityBaselines
|
|
4
|
-
} from "./cli-wjyyv518.js";
|
|
5
1
|
import {
|
|
6
2
|
summarizeSession
|
|
7
3
|
} from "./cli-p03mawph.js";
|
|
@@ -9,7 +5,7 @@ import"./cli-4wmnp8q3.js";
|
|
|
9
5
|
import {
|
|
10
6
|
checkToolLoop,
|
|
11
7
|
clearToolHistory
|
|
12
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-2957pqpj.js";
|
|
13
9
|
import"./cli-hx1dcevq.js";
|
|
14
10
|
import {
|
|
15
11
|
buildRatingsFromLlm,
|
|
@@ -21,6 +17,11 @@ import {
|
|
|
21
17
|
import {
|
|
22
18
|
getApiKey
|
|
23
19
|
} from "./cli-f14fvzag.js";
|
|
20
|
+
import {
|
|
21
|
+
contentSha256,
|
|
22
|
+
init_profile_sync,
|
|
23
|
+
readIdentityBaselines
|
|
24
|
+
} from "./cli-3j01d33e.js";
|
|
24
25
|
import {
|
|
25
26
|
getMcpBaseUrl
|
|
26
27
|
} from "./cli-dh55d5fg.js";
|
|
@@ -29,7 +30,7 @@ import"./cli-anrj584m.js";
|
|
|
29
30
|
import {
|
|
30
31
|
init_package,
|
|
31
32
|
package_default
|
|
32
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-yjt8a36k.js";
|
|
33
34
|
import"./cli-3pp1362w.js";
|
|
34
35
|
import"./cli-xw7p4wkq.js";
|
|
35
36
|
import"./cli-4wgngmwv.js";
|
|
@@ -39,6 +40,7 @@ import"./cli-p9swy5t3.js";
|
|
|
39
40
|
|
|
40
41
|
// src/hooks/hook.ts
|
|
41
42
|
init_package();
|
|
43
|
+
init_profile_sync();
|
|
42
44
|
var SERVER_NAME = package_default.config?.name ?? "agent-swarm";
|
|
43
45
|
var CLAUDE_MD_PATH = `${process.env.HOME}/.claude/CLAUDE.md`;
|
|
44
46
|
var CLAUDE_MD_BACKUP_PATH = `${process.env.HOME}/.claude/CLAUDE.md.bak`;
|