@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
package/dist/cli-2deg0cen.js
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
// src/slack/message-text.ts
|
|
2
|
-
function collectRichTextParts(node, parts) {
|
|
3
|
-
if (node == null || typeof node !== "object")
|
|
4
|
-
return;
|
|
5
|
-
const n = node;
|
|
6
|
-
if (n.type === "text" && n.text) {
|
|
7
|
-
parts.push(n.text);
|
|
8
|
-
}
|
|
9
|
-
if (Array.isArray(n.elements)) {
|
|
10
|
-
for (const child of n.elements) {
|
|
11
|
-
collectRichTextParts(child, parts);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
function extractSlackMessageText(msg) {
|
|
16
|
-
const topText = msg.text?.trim() ?? "";
|
|
17
|
-
const attachmentParts = [];
|
|
18
|
-
if (Array.isArray(msg.attachments) && msg.attachments.length > 0) {
|
|
19
|
-
for (const raw of msg.attachments) {
|
|
20
|
-
if (raw == null || typeof raw !== "object")
|
|
21
|
-
continue;
|
|
22
|
-
const a = raw;
|
|
23
|
-
const attParts = [];
|
|
24
|
-
const titleText = a.title_link && a.title ? `<${a.title_link}|${a.title}>` : a.title;
|
|
25
|
-
const seenPrimary = new Set;
|
|
26
|
-
for (const part of [a.pretext, titleText, a.text, a.fallback]) {
|
|
27
|
-
const s = part?.trim();
|
|
28
|
-
if (s && !seenPrimary.has(s)) {
|
|
29
|
-
seenPrimary.add(s);
|
|
30
|
-
attParts.push(s);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
if (Array.isArray(a.fields)) {
|
|
34
|
-
for (const field of a.fields) {
|
|
35
|
-
if (field == null || typeof field !== "object")
|
|
36
|
-
continue;
|
|
37
|
-
const f = field;
|
|
38
|
-
if (f.title && f.value)
|
|
39
|
-
attParts.push(`${f.title}: ${f.value}`);
|
|
40
|
-
else if (f.title)
|
|
41
|
-
attParts.push(f.title);
|
|
42
|
-
else if (f.value)
|
|
43
|
-
attParts.push(f.value);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
if (Array.isArray(a.actions)) {
|
|
47
|
-
for (const action of a.actions) {
|
|
48
|
-
if (action == null || typeof action !== "object")
|
|
49
|
-
continue;
|
|
50
|
-
const act = action;
|
|
51
|
-
if (act.url) {
|
|
52
|
-
attParts.push(act.text ? `<${act.url}|${act.text}>` : act.url);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
if (attParts.length > 0)
|
|
57
|
-
attachmentParts.push(attParts.join(`
|
|
58
|
-
`));
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
const blockParts = [];
|
|
62
|
-
if (Array.isArray(msg.blocks) && msg.blocks.length > 0) {
|
|
63
|
-
for (const rawBlock of msg.blocks) {
|
|
64
|
-
if (rawBlock == null || typeof rawBlock !== "object")
|
|
65
|
-
continue;
|
|
66
|
-
const block = rawBlock;
|
|
67
|
-
if (block.type === "section") {
|
|
68
|
-
if (block.text?.text)
|
|
69
|
-
blockParts.push(block.text.text);
|
|
70
|
-
if (Array.isArray(block.fields)) {
|
|
71
|
-
for (const field of block.fields) {
|
|
72
|
-
if (field != null && typeof field === "object" && field.text) {
|
|
73
|
-
blockParts.push(field.text);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
} else if (block.type === "rich_text" && Array.isArray(block.elements)) {
|
|
78
|
-
for (const el of block.elements) {
|
|
79
|
-
collectRichTextParts(el, blockParts);
|
|
80
|
-
}
|
|
81
|
-
} else if (block.type === "header") {
|
|
82
|
-
if (block.text?.text)
|
|
83
|
-
blockParts.push(block.text.text);
|
|
84
|
-
} else if (block.type === "context" && Array.isArray(block.elements)) {
|
|
85
|
-
for (const el of block.elements) {
|
|
86
|
-
if (el == null || typeof el !== "object")
|
|
87
|
-
continue;
|
|
88
|
-
const e = el;
|
|
89
|
-
if (e.text)
|
|
90
|
-
blockParts.push(e.text);
|
|
91
|
-
}
|
|
92
|
-
} else if (block.type === "actions" && Array.isArray(block.elements)) {
|
|
93
|
-
for (const el of block.elements) {
|
|
94
|
-
if (el == null || typeof el !== "object")
|
|
95
|
-
continue;
|
|
96
|
-
const e = el;
|
|
97
|
-
const label = e.text?.text;
|
|
98
|
-
const url = e.url;
|
|
99
|
-
if (label && url)
|
|
100
|
-
blockParts.push(`<${url}|${label}>`);
|
|
101
|
-
else if (label)
|
|
102
|
-
blockParts.push(label);
|
|
103
|
-
else if (url)
|
|
104
|
-
blockParts.push(url);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
const bodyText = [...attachmentParts, ...blockParts].filter(Boolean).join(`
|
|
110
|
-
`);
|
|
111
|
-
const bodyLines = new Set(bodyText.split(`
|
|
112
|
-
`).map((l) => l.trim()).filter(Boolean));
|
|
113
|
-
if (topText && !bodyLines.has(topText)) {
|
|
114
|
-
return bodyText ? `${topText}
|
|
115
|
-
${bodyText}` : topText;
|
|
116
|
-
}
|
|
117
|
-
return bodyText || topText;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export { extractSlackMessageText };
|