@desplega.ai/agent-swarm 1.148.0 → 1.149.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 -1
- package/dist/{acp-adapter-grez7xhd.js → acp-adapter-4jncb126.js} +12 -5
- package/dist/{actions-kweznh5a.js → actions-31vp3ae7.js} +10 -9
- package/dist/{app-5fvvjv9m.js → app-1hh67x8w.js} +6 -6
- package/dist/{assistant-40m4w50s.js → assistant-z66dmz6p.js} +13 -11
- package/dist/{boot-reembed-cn357y5n.js → boot-reembed-fqzxxzjh.js} +7 -7
- package/dist/{boot-reembed-9rxmb26n.js → boot-reembed-wxa8ya0s.js} +8 -8
- package/dist/{boot-scrub-logs-5tpp0x3y.js → boot-scrub-logs-jnyndh79.js} +5 -5
- package/dist/{claude-adapter-9pz5q2pb.js → claude-adapter-3qpa9w0j.js} +9 -9
- package/dist/{claude-managed-adapter-sactwn31.js → claude-managed-adapter-qvsmh6mv.js} +2 -2
- package/dist/{claude-sdk-session-v8w0s7qm.js → claude-sdk-session-2yxgjs5d.js} +9 -9
- package/dist/{cli-y6b6fb76.js → cli-08b07b4r.js} +1 -1
- package/dist/{cli-8fc8de14.js → cli-0z2v4nhw.js} +1 -1
- package/dist/{cli-tebsjpk7.js → cli-19f354qr.js} +2 -2
- package/dist/{cli-kzvhgvk3.js → cli-2qts1hys.js} +3 -3
- package/dist/{cli-kpv03zhj.js → cli-3apbzgyk.js} +27 -15
- package/dist/{cli-5khqvvnq.js → cli-3q5ejx9p.js} +2 -2
- package/dist/{cli-d8brzxjb.js → cli-4wtq5jjv.js} +2 -2
- package/dist/{cli-ct0et58h.js → cli-5my3bjsd.js} +1 -1
- package/dist/{cli-cn6mmc7f.js → cli-6664w7y4.js} +1 -1
- package/dist/{cli-f8j56xv2.js → cli-6pqcb4q0.js} +53 -13
- package/dist/{cli-m1p5cysp.js → cli-7smrsr25.js} +3 -3
- package/dist/{cli-0amc6myn.js → cli-9fy6nk6g.js} +1 -1
- package/dist/{cli-dcem3pr1.js → cli-9hspd3dp.js} +2 -2
- package/dist/{cli-0er5m69z.js → cli-aae6hz6a.js} +4 -4
- package/dist/{cli-brxyat7h.js → cli-cr12paw2.js} +5 -5
- package/dist/{cli-dk3me3qs.js → cli-d8ftsp62.js} +8 -8
- package/dist/{cli-v3e51x7w.js → cli-e95cx1eb.js} +3 -3
- package/dist/{cli-ztn0ga15.js → cli-gjhjfeeg.js} +1 -1
- package/dist/{cli-xqcpg1st.js → cli-gv88e1vf.js} +1 -1
- package/dist/{cli-rvqz34y5.js → cli-jecc01cb.js} +1 -1
- package/dist/{cli-hzhhrt7b.js → cli-k0cr4kat.js} +1 -1
- package/dist/{cli-hz8xhefy.js → cli-kgz4np97.js} +4 -4
- package/dist/{cli-anedxf1w.js → cli-kjwt6hdf.js} +1 -1
- package/dist/{cli-3n7cbfjn.js → cli-mnmsfd1w.js} +6 -2
- package/dist/{cli-n9grk3yd.js → cli-n3dz2942.js} +37 -26
- package/dist/{cli-cdjezzc7.js → cli-nye12xk5.js} +8 -5
- package/dist/{cli-9216xm24.js → cli-phsxnkp6.js} +20 -20
- package/dist/{cli-7gn7c2af.js → cli-q50ef8g0.js} +1 -1
- package/dist/{cli-qy6h009w.js → cli-qaacms9y.js} +7 -6
- package/dist/{cli-xqcq9y5e.js → cli-r2ap2czm.js} +1 -0
- package/dist/{cli-hp2est46.js → cli-sd5pv3b1.js} +3 -3
- package/dist/{cli-0b6y7kxm.js → cli-xm87hzbw.js} +1 -1
- package/dist/{cli-6s2y152y.js → cli-yab68w40.js} +285 -11
- package/dist/{cli-p73drk6p.js → cli-yb9qhqam.js} +167 -40
- package/dist/{cli-56y3hch2.js → cli-ygweqcn4.js} +133 -22
- package/dist/{cli-n2cwscdd.js → cli-ykxrnd1q.js} +2 -2
- package/dist/{cli-m9sxbkhm.js → cli-zvz62chv.js} +3 -3
- package/dist/cli.js +14 -14
- package/dist/{codex-adapter-ehhj2qwc.js → codex-adapter-8meawydj.js} +4 -4
- package/dist/{codex-hook-bw8p5nh4.js → codex-hook-hfrt9shr.js} +2 -2
- package/dist/{codex-session-runner-5hne566k.js → codex-session-runner-gjgxyp5j.js} +4 -4
- package/dist/{commands-xnvh951h.js → commands-hz3nb95f.js} +5 -5
- package/dist/{db-ycr5zfr4.js → db-ggz97zbm.js} +5 -5
- package/dist/{e2b-6hb103d8.js → e2b-p04vmtx0.js} +1 -1
- package/dist/{handlers-1vt77kgq.js → handlers-nbzdzn9k.js} +14 -11
- package/dist/{hook-91ntpmff.js → hook-bks2q1f6.js} +7 -7
- package/dist/{hook-qfwjydvn.js → hook-kq9wp0ep.js} +8 -8
- package/dist/{http-h6g7bv5b.js → http-hrf77v87.js} +96 -45
- package/dist/{index-47ghesbn.js → index-6nsbg88z.js} +443 -144
- package/dist/{index-antf9t4p.js → index-8hmeg8j1.js} +14 -14
- package/dist/{index-d2mytx95.js → index-cqtebbhb.js} +13 -13
- package/dist/{index-0ez2aack.js → index-n28pw1zt.js} +15 -15
- package/dist/{keepalive-c4sp7yvd.js → keepalive-dxc12gvg.js} +7 -7
- package/dist/{lead-4r7z9e8v.js → lead-yckfn18d.js} +32 -32
- package/dist/{maintenance-yqjfdjas.js → maintenance-6kfb2m5e.js} +8 -8
- package/dist/{oauth-refresh-sweep-wtqgnh3c.js → oauth-refresh-sweep-1x1ac722.js} +6 -6
- package/dist/{onboard-a4krmh46.js → onboard-dcyt1609.js} +4 -3
- package/dist/{opencode-adapter-fef1mrn2.js → opencode-adapter-dce4wskd.js} +2 -2
- package/dist/{otel-impl-725kq0vp.js → otel-impl-tbk3e5dr.js} +2 -2
- package/dist/{pi-mono-adapter-2has4gnp.js → pi-mono-adapter-zvshk5cj.js} +2 -2
- package/dist/{pricing-refresh-kqxd7w9h.js → pricing-refresh-kaqg567e.js} +7 -7
- package/dist/{rbac-roles-gws5xej6.js → rbac-roles-ammq6rd2.js} +5 -5
- package/dist/{rbac-roles-t3wygpth.js → rbac-roles-cf97v1vd.js} +6 -6
- package/dist/{render-v2-x1wxvn51.js → render-v2-80w603vy.js} +6 -6
- package/dist/{seed-pricing-t6y8d0vf.js → seed-pricing-zbrn83xv.js} +6 -6
- package/dist/{setup-x50py6xg.js → setup-fe66kczs.js} +2 -2
- package/dist/{worker-zsz0qfxk.js → worker-qmb2d1e2.js} +32 -32
- package/dist/{x-n2phr5vm.js → x-n3e0v3xa.js} +2 -2
- package/openapi.json +46 -4
- package/package.json +1 -1
- package/src/agentmail/handlers.ts +5 -0
- package/src/automation-preflight-alert.ts +41 -0
- package/src/be/automation-preflight.ts +3 -3
- package/src/be/budget-refusal-notify.ts +1 -0
- package/src/be/db/tasks/read.ts +5 -0
- package/src/be/db.ts +132 -2
- package/src/be/migrations/150_deferred_task_waits.sql +18 -0
- package/src/be/migrations/151_repair_scheduled_task_required_params.sql +39 -0
- package/src/be/migrations/152_routing_decisions.sql +44 -0
- package/src/be/scripts/typecheck.ts +33 -22
- package/src/be/seed-scripts/catalog/delegate.ts +5 -1
- package/src/be/seed-skills/bundled-files.generated.json +10 -0
- package/src/be/seed-skills/index.ts +3 -0
- package/src/be/steering.ts +1 -0
- package/src/be/swarm-config-guard.ts +11 -0
- package/src/commands/onboard/steps/post-task.tsx +1 -0
- package/src/github/handlers.ts +9 -0
- package/src/gitlab/handlers.ts +4 -0
- package/src/heartbeat/heartbeat.ts +8 -0
- package/src/http/approval-requests.ts +1 -0
- package/src/http/apps.ts +1 -0
- package/src/http/config.ts +15 -6
- package/src/http/mcp.ts +31 -4
- package/src/http/script-runs.ts +6 -0
- package/src/http/tasks.ts +52 -30
- package/src/integrations/kapso/inbound.ts +1 -0
- package/src/jira/sync.ts +2 -0
- package/src/linear/sync.ts +2 -0
- package/src/prompts/session-templates.ts +29 -15
- package/src/scheduler/deferred-task-waits.ts +123 -0
- package/src/scheduler/schedule-task.ts +42 -0
- package/src/scheduler/scheduler.ts +22 -31
- package/src/script-workflows/workflow-ctx.ts +2 -0
- package/src/scripts-runtime/types/stdlib.d.ts +38 -24
- package/src/scripts-runtime/types/swarm-sdk.d.ts +38 -24
- package/src/server.ts +10 -1
- package/src/slack/actions.ts +1 -0
- package/src/slack/assistant.ts +2 -0
- package/src/slack/handlers.ts +3 -0
- package/src/slack/thread-buffer.ts +2 -0
- package/src/tasks/worker-follow-up.ts +9 -0
- package/src/tests/acp-adapter.test.ts +35 -6
- package/src/tests/acp-session-token.test.ts +67 -0
- package/src/tests/asset-key-api.test.ts +15 -2
- package/src/tests/asset-key-mcp.test.ts +2 -0
- package/src/tests/automation-preflight-alert.test.ts +91 -0
- package/src/tests/claude-worker-parity.test.ts +3 -0
- package/src/tests/config-session-auth.test.ts +143 -0
- package/src/tests/defer-task.test.ts +117 -6
- package/src/tests/deferred-task-wake.test.ts +456 -0
- package/src/tests/heartbeat-reroute-decision.test.ts +1 -0
- package/src/tests/http-api-integration.test.ts +33 -4
- package/src/tests/model-control.test.ts +18 -5
- package/src/tests/opencode-adapter.test.ts +2 -2
- package/src/tests/promote-draft-task-route.test.ts +4 -0
- package/src/tests/prompt-template-session.test.ts +13 -4
- package/src/tests/rbac-wire-e2e.test.ts +2 -2
- package/src/tests/routing-decision-persistence.test.ts +520 -0
- package/src/tests/routing-reason-contract.test.ts +89 -0
- package/src/tests/routing-reason-inventory.test.ts +55 -0
- package/src/tests/schedule-target-type.test.ts +48 -1
- package/src/tests/scheduled-task-required-params-migration.test.ts +182 -0
- package/src/tests/scheduled-tasks.test.ts +9 -5
- package/src/tests/script-connections.test.ts +4 -0
- package/src/tests/script-runs-http.test.ts +31 -0
- package/src/tests/scripts-typecheck.test.ts +11 -0
- package/src/tests/secret-scrubber.test.ts +12 -0
- package/src/tests/send-task-output-schema.test.ts +66 -1
- package/src/tests/send-task-requested-by.test.ts +1 -0
- package/src/tests/send-task-slack-routing-guard.test.ts +2 -0
- package/src/tests/store-progress-blocked-waiting-gate.test.ts +151 -0
- package/src/tests/swarm-tool-result-gate.test.ts +24 -0
- package/src/tests/task-tool-manifest.test.ts +47 -0
- package/src/tests/task-tool-preload-mcp.test.ts +125 -0
- package/src/tests/task-tools-ctx.test.ts +2 -0
- package/src/tests/tool-output-agent-id.test.ts +1 -0
- package/src/tests/ui-followup-lead-delegation.test.ts +6 -1
- package/src/tests/workflow-agent-task.test.ts +24 -1
- package/src/tests/workflow-engine-v2.test.ts +58 -2
- package/src/tools/defer-task.ts +73 -21
- package/src/tools/send-task.ts +31 -0
- package/src/tools/skills/skill-publish.ts +1 -0
- package/src/tools/store-progress.ts +43 -0
- package/src/tools/templates.ts +2 -1
- package/src/tools/utils.ts +33 -2
- package/src/types.ts +14 -1
- package/src/utils/acp-session-token.ts +14 -4
- package/src/utils/secret-scrubber.ts +2 -0
- package/src/utils/task-tool-manifest.ts +33 -0
- package/src/workflows/engine.ts +4 -1
- package/src/workflows/executors/agent-task.ts +7 -1
- package/templates/ai-toolbox.manifest.json +6 -1
- package/templates/skills/comms/config.json +18 -0
- package/templates/skills/comms/content.md +74 -0
- package/templates/skills/comms/files/references/ste-rules.md +73 -0
- package/templates/skills/comms/files/references/visual-shapes.md +112 -0
- package/templates/skills/swarm-scripts/SKILL.md +3 -2
- package/templates/skills/swarm-scripts/content.md +3 -2
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
> **This repo evolves every single day.** [Watch now →](https://github.com/desplega-ai/agent-swarm/subscription)
|
|
6
6
|
<p align="center"><video src="https://github.com/user-attachments/assets/e220712e-c54d-4f46-b059-bac04639d229" controls muted playsinline width="720"></video></p>
|
|
7
7
|
<p align="center"><sub>▸ <a href="./assets/agent-swarm.mp4">daily evolution</a> · <a href="./assets/agent-swarm-slack-to-pr.mp4">slack → pr</a> · <a href="./assets/video-source">Making of</a></sub></p>
|
|
8
|
-
<p align="center"><a href="https://agent-swarm.dev"><img src="https://img.shields.io/badge/Website-agent--swarm.dev-000?style=for-the-badge" alt="Website"></a> <a href="https://docs.agent-swarm.dev"><img src="https://img.shields.io/badge/Docs-docs.agent--swarm.dev-amber?style=for-the-badge" alt="Docs"></a> <a href="https://app.agent-swarm.dev"><img src="https://img.shields.io/badge/Dashboard-app.agent--swarm.dev-blue?style=for-the-badge" alt="Dashboard"></a> <a href="https://discord.gg/KZgfyyDVZa"><img src="https://img.shields.io/badge/Discord-Join%20Community-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Join Discord"></a> <a href="https://x.com/desplegalabs"><img src="https://img.shields.io/badge/𝕏-@desplegalabs-000?style=for-the-badge&logo=x&logoColor=white" alt="Follow on X"></a> <a href="https://www.linkedin.com/company/desplega-labs/"><img src="https://img.shields.io/badge/LinkedIn-Desplega%20Labs-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white" alt="Desplega Labs on LinkedIn"></a></p>
|
|
8
|
+
<p align="center"><a href="https://agent-swarm.dev"><img src="https://img.shields.io/badge/Website-agent--swarm.dev-000?style=for-the-badge" alt="Website"></a> <a href="https://docs.agent-swarm.dev"><img src="https://img.shields.io/badge/Docs-docs.agent--swarm.dev-amber?style=for-the-badge" alt="Docs"></a> <a href="https://app.agent-swarm.dev"><img src="https://img.shields.io/badge/Dashboard-app.agent--swarm.dev-blue?style=for-the-badge" alt="Dashboard"></a> <a href="https://discord.gg/KZgfyyDVZa"><img src="https://img.shields.io/badge/Discord-Join%20Community-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Join Discord"></a> <a href="https://x.com/desplegalabs"><img src="https://img.shields.io/badge/𝕏-@desplegalabs-000?style=for-the-badge&logo=x&logoColor=white" alt="Follow on X"></a> <a href="https://www.linkedin.com/company/desplega-labs/"><img src="https://img.shields.io/badge/LinkedIn-Desplega%20Labs-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white" alt="Desplega Labs on LinkedIn"></a> <a href="https://www.youtube.com/@desplega-labs/videos"><img src="https://img.shields.io/badge/YouTube-Desplega%20Labs-FF0000?style=for-the-badge&logo=youtube&logoColor=white" alt="Desplega Labs on YouTube"></a></p>
|
|
9
9
|
|
|
10
10
|
agent-swarm.dev is an open-source operating system for AI work. A lead agent delegates goals to workers such as Claude Code or Codex. Isolated containers, shared memory, tools, schedules, and review gates preserve work across sessions.
|
|
11
11
|
|
|
@@ -13,6 +13,7 @@ agent-swarm.dev is an open-source operating system for AI work. A lead agent del
|
|
|
13
13
|
|
|
14
14
|
- A lead agent that receives work from Slack, repositories, issue trackers, email, or the API
|
|
15
15
|
- [Schema-validated task results](./MCP.md#send-task) for callers that need structured JSON output
|
|
16
|
+
- [Deferred tasks](./MCP.md#defer-task) that wake when another task finishes or a deadline arrives
|
|
16
17
|
- [Dashboard file attachments](https://docs.agent-swarm.dev/docs/ui#file-attachments) by drag-and-drop or file picker
|
|
17
18
|
- Workers in isolated Docker containers with development environments
|
|
18
19
|
- Memory and identity that persist across sessions
|
|
@@ -29,11 +29,11 @@ import {
|
|
|
29
29
|
import {
|
|
30
30
|
init_package,
|
|
31
31
|
package_default
|
|
32
|
-
} from "./cli-
|
|
32
|
+
} from "./cli-kjwt6hdf.js";
|
|
33
33
|
import {
|
|
34
34
|
init_secret_scrubber,
|
|
35
35
|
scrubSecrets
|
|
36
|
-
} from "./cli-
|
|
36
|
+
} from "./cli-r2ap2czm.js";
|
|
37
37
|
import"./cli-bc05qbss.js";
|
|
38
38
|
|
|
39
39
|
// node_modules/@agentclientprotocol/sdk/dist/schema/index.js
|
|
@@ -4349,6 +4349,8 @@ class ClientSideConnection {
|
|
|
4349
4349
|
init_package();
|
|
4350
4350
|
|
|
4351
4351
|
// src/utils/acp-session-token.ts
|
|
4352
|
+
init_secret_scrubber();
|
|
4353
|
+
var REVOKE_TIMEOUT_MS = 5000;
|
|
4352
4354
|
var ACP_SESSION_TOKEN_TTL_MS = 24 * 60 * 60 * 1000;
|
|
4353
4355
|
async function mintAcpSessionToken(apiUrl, apiKey, agentId, taskId) {
|
|
4354
4356
|
const res = await fetch(`${apiUrl.replace(/\/+$/, "")}/api/sessions/tokens`, {
|
|
@@ -4367,11 +4369,16 @@ async function mintAcpSessionToken(apiUrl, apiKey, agentId, taskId) {
|
|
|
4367
4369
|
}
|
|
4368
4370
|
async function revokeAcpSessionToken(apiUrl, apiKey, tokenId) {
|
|
4369
4371
|
try {
|
|
4370
|
-
await fetch(`${apiUrl.replace(/\/+$/, "")}/api/sessions/tokens/${tokenId}`, {
|
|
4372
|
+
const res = await fetch(`${apiUrl.replace(/\/+$/, "")}/api/sessions/tokens/${tokenId}`, {
|
|
4371
4373
|
method: "DELETE",
|
|
4372
|
-
headers: { Authorization: `Bearer ${apiKey}` }
|
|
4374
|
+
headers: { Authorization: `Bearer ${apiKey}` },
|
|
4375
|
+
signal: AbortSignal.timeout(REVOKE_TIMEOUT_MS)
|
|
4373
4376
|
});
|
|
4374
|
-
|
|
4377
|
+
if (!res.ok)
|
|
4378
|
+
throw new Error(`HTTP ${res.status}`);
|
|
4379
|
+
} catch (error) {
|
|
4380
|
+
console.warn(scrubSecrets(`[acp] Session token revoke failed: ${error instanceof Error ? error.message : String(error)}`));
|
|
4381
|
+
}
|
|
4375
4382
|
}
|
|
4376
4383
|
|
|
4377
4384
|
// src/providers/acp-adapter.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveSlackUserId
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
} from "./cli-ykxrnd1q.js";
|
|
4
|
+
import"./cli-gv88e1vf.js";
|
|
5
5
|
import {
|
|
6
6
|
createTaskWithSiblingAwareness
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-q50ef8g0.js";
|
|
8
8
|
import {
|
|
9
9
|
buildCancelledBlocks,
|
|
10
10
|
ensureSlackThreadTree,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
getAgentEmoji,
|
|
13
13
|
getTaskLink,
|
|
14
14
|
isSlackRenderV2Enabled
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-d8ftsp62.js";
|
|
16
16
|
import"./cli-q51yprfq.js";
|
|
17
17
|
import"./cli-9d8ntetj.js";
|
|
18
18
|
import"./cli-yatxqynm.js";
|
|
@@ -24,16 +24,16 @@ import {
|
|
|
24
24
|
init_context_key,
|
|
25
25
|
init_db,
|
|
26
26
|
slackContextKey
|
|
27
|
-
} from "./cli-
|
|
28
|
-
import"./cli-
|
|
29
|
-
import"./cli-
|
|
27
|
+
} from "./cli-yab68w40.js";
|
|
28
|
+
import"./cli-08b07b4r.js";
|
|
29
|
+
import"./cli-3apbzgyk.js";
|
|
30
30
|
import"./cli-e29gmdmw.js";
|
|
31
31
|
import"./cli-c2mk1kgf.js";
|
|
32
32
|
import"./cli-ej6gbxfb.js";
|
|
33
33
|
import"./cli-sd0mxa3c.js";
|
|
34
34
|
import"./cli-w5e1d1vv.js";
|
|
35
|
-
import"./cli-
|
|
36
|
-
import"./cli-
|
|
35
|
+
import"./cli-kjwt6hdf.js";
|
|
36
|
+
import"./cli-r2ap2czm.js";
|
|
37
37
|
import"./cli-pzxba7gw.js";
|
|
38
38
|
import"./cli-zf8jjwex.js";
|
|
39
39
|
import"./cli-bd957dgb.js";
|
|
@@ -104,6 +104,7 @@ function registerActionHandlers(app) {
|
|
|
104
104
|
});
|
|
105
105
|
const followUpTask = await createTaskWithSiblingAwareness(followUpText, {
|
|
106
106
|
agentId: lead?.id,
|
|
107
|
+
routingReason: lead ? "skill" : undefined,
|
|
107
108
|
source: "slack",
|
|
108
109
|
parentTaskId: taskId,
|
|
109
110
|
slackChannelId: originalTask.slackChannelId,
|
|
@@ -3,20 +3,20 @@ import {
|
|
|
3
3
|
initSlackApp,
|
|
4
4
|
startSlackApp,
|
|
5
5
|
stopSlackApp
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-d8ftsp62.js";
|
|
7
7
|
import"./cli-q51yprfq.js";
|
|
8
8
|
import"./cli-9d8ntetj.js";
|
|
9
9
|
import"./cli-yatxqynm.js";
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
10
|
+
import"./cli-yab68w40.js";
|
|
11
|
+
import"./cli-08b07b4r.js";
|
|
12
|
+
import"./cli-3apbzgyk.js";
|
|
13
13
|
import"./cli-e29gmdmw.js";
|
|
14
14
|
import"./cli-c2mk1kgf.js";
|
|
15
15
|
import"./cli-ej6gbxfb.js";
|
|
16
16
|
import"./cli-sd0mxa3c.js";
|
|
17
17
|
import"./cli-w5e1d1vv.js";
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
18
|
+
import"./cli-kjwt6hdf.js";
|
|
19
|
+
import"./cli-r2ap2czm.js";
|
|
20
20
|
import"./cli-pzxba7gw.js";
|
|
21
21
|
import"./cli-zf8jjwex.js";
|
|
22
22
|
import"./cli-bd957dgb.js";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
bufferThreadMessage,
|
|
3
3
|
getBufferMessageCount,
|
|
4
4
|
wasEventSeen
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-qaacms9y.js";
|
|
6
6
|
import {
|
|
7
7
|
bufferedFileFailures,
|
|
8
8
|
buildEffectiveText,
|
|
@@ -10,20 +10,20 @@ import {
|
|
|
10
10
|
fetchSlackFiles,
|
|
11
11
|
hasOtherUserMention,
|
|
12
12
|
notifySlackFileFailures
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-kgz4np97.js";
|
|
14
14
|
import"./cli-jsp14b6c.js";
|
|
15
15
|
import {
|
|
16
16
|
resolveSlackUserId,
|
|
17
17
|
rewriteSlackMentions
|
|
18
|
-
} from "./cli-
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
18
|
+
} from "./cli-ykxrnd1q.js";
|
|
19
|
+
import"./cli-gv88e1vf.js";
|
|
20
|
+
import"./cli-q50ef8g0.js";
|
|
21
21
|
import {
|
|
22
22
|
ackSlackMessage,
|
|
23
23
|
ensureSlackThreadTree,
|
|
24
24
|
isSlackRenderV2Enabled,
|
|
25
25
|
require_dist
|
|
26
|
-
} from "./cli-
|
|
26
|
+
} from "./cli-d8ftsp62.js";
|
|
27
27
|
import"./cli-q51yprfq.js";
|
|
28
28
|
import"./cli-9d8ntetj.js";
|
|
29
29
|
import"./cli-yatxqynm.js";
|
|
@@ -35,12 +35,12 @@ import {
|
|
|
35
35
|
init_db,
|
|
36
36
|
reactionName,
|
|
37
37
|
slackContextKey
|
|
38
|
-
} from "./cli-
|
|
39
|
-
import"./cli-
|
|
38
|
+
} from "./cli-yab68w40.js";
|
|
39
|
+
import"./cli-08b07b4r.js";
|
|
40
40
|
import {
|
|
41
41
|
init_resolver,
|
|
42
42
|
resolveTemplate
|
|
43
|
-
} from "./cli-
|
|
43
|
+
} from "./cli-3apbzgyk.js";
|
|
44
44
|
import"./cli-e29gmdmw.js";
|
|
45
45
|
import"./cli-c2mk1kgf.js";
|
|
46
46
|
import {
|
|
@@ -49,8 +49,8 @@ import {
|
|
|
49
49
|
} from "./cli-ej6gbxfb.js";
|
|
50
50
|
import"./cli-sd0mxa3c.js";
|
|
51
51
|
import"./cli-w5e1d1vv.js";
|
|
52
|
-
import"./cli-
|
|
53
|
-
import"./cli-
|
|
52
|
+
import"./cli-kjwt6hdf.js";
|
|
53
|
+
import"./cli-r2ap2czm.js";
|
|
54
54
|
import"./cli-pzxba7gw.js";
|
|
55
55
|
import"./cli-zf8jjwex.js";
|
|
56
56
|
import"./cli-bd957dgb.js";
|
|
@@ -159,6 +159,7 @@ function createAssistant() {
|
|
|
159
159
|
const latestTask = await getMostRecentTaskInThread(channelId, threadTs);
|
|
160
160
|
const { task: task2, unattached: unattached2 } = await createSlackTaskWithFiles(renderedMessageText, {
|
|
161
161
|
agentId: workingAgent.id,
|
|
162
|
+
routingReason: "continuity",
|
|
162
163
|
source: "slack",
|
|
163
164
|
slackChannelId: channelId,
|
|
164
165
|
slackThreadTs: threadTs,
|
|
@@ -207,6 +208,7 @@ function createAssistant() {
|
|
|
207
208
|
}
|
|
208
209
|
const { task, unattached } = await createSlackTaskWithFiles(renderedMessageText + channelContext, {
|
|
209
210
|
agentId: lead.id,
|
|
211
|
+
routingReason: "skill",
|
|
210
212
|
source: "slack",
|
|
211
213
|
slackChannelId: channelId,
|
|
212
214
|
slackThreadTs: threadTs,
|
|
@@ -3,23 +3,23 @@ import {
|
|
|
3
3
|
getEmbeddingProvider,
|
|
4
4
|
getMemoryStore,
|
|
5
5
|
init_constants
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
6
|
+
} from "./cli-3q5ejx9p.js";
|
|
7
|
+
import"./cli-zvz62chv.js";
|
|
8
8
|
import"./cli-aehm1rbq.js";
|
|
9
9
|
import"./cli-9d8ntetj.js";
|
|
10
10
|
import {
|
|
11
11
|
getDbClient,
|
|
12
12
|
init_db
|
|
13
|
-
} from "./cli-
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-
|
|
13
|
+
} from "./cli-yab68w40.js";
|
|
14
|
+
import"./cli-08b07b4r.js";
|
|
15
|
+
import"./cli-3apbzgyk.js";
|
|
16
16
|
import"./cli-e29gmdmw.js";
|
|
17
17
|
import"./cli-c2mk1kgf.js";
|
|
18
18
|
import"./cli-ej6gbxfb.js";
|
|
19
19
|
import"./cli-sd0mxa3c.js";
|
|
20
20
|
import"./cli-w5e1d1vv.js";
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
21
|
+
import"./cli-kjwt6hdf.js";
|
|
22
|
+
import"./cli-r2ap2czm.js";
|
|
23
23
|
import"./cli-zf8jjwex.js";
|
|
24
24
|
import"./cli-bc05qbss.js";
|
|
25
25
|
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
embedScript,
|
|
3
3
|
embeddingProvider
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
6
|
-
import"./cli-
|
|
4
|
+
} from "./cli-2qts1hys.js";
|
|
5
|
+
import"./cli-3q5ejx9p.js";
|
|
6
|
+
import"./cli-zvz62chv.js";
|
|
7
7
|
import"./cli-aehm1rbq.js";
|
|
8
8
|
import"./cli-9d8ntetj.js";
|
|
9
9
|
import {
|
|
10
10
|
getDbClient,
|
|
11
11
|
init_db
|
|
12
|
-
} from "./cli-
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
12
|
+
} from "./cli-yab68w40.js";
|
|
13
|
+
import"./cli-08b07b4r.js";
|
|
14
|
+
import"./cli-3apbzgyk.js";
|
|
15
15
|
import"./cli-e29gmdmw.js";
|
|
16
16
|
import"./cli-c2mk1kgf.js";
|
|
17
17
|
import"./cli-ej6gbxfb.js";
|
|
18
18
|
import"./cli-sd0mxa3c.js";
|
|
19
19
|
import"./cli-w5e1d1vv.js";
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
20
|
+
import"./cli-kjwt6hdf.js";
|
|
21
|
+
import"./cli-r2ap2czm.js";
|
|
22
22
|
import"./cli-zf8jjwex.js";
|
|
23
23
|
import"./cli-bc05qbss.js";
|
|
24
24
|
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDbClient,
|
|
3
3
|
init_db
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
6
|
-
import"./cli-
|
|
4
|
+
} from "./cli-yab68w40.js";
|
|
5
|
+
import"./cli-08b07b4r.js";
|
|
6
|
+
import"./cli-3apbzgyk.js";
|
|
7
7
|
import"./cli-e29gmdmw.js";
|
|
8
8
|
import"./cli-c2mk1kgf.js";
|
|
9
9
|
import"./cli-ej6gbxfb.js";
|
|
10
10
|
import"./cli-sd0mxa3c.js";
|
|
11
11
|
import"./cli-w5e1d1vv.js";
|
|
12
|
-
import"./cli-
|
|
12
|
+
import"./cli-kjwt6hdf.js";
|
|
13
13
|
import {
|
|
14
14
|
init_secret_scrubber,
|
|
15
15
|
scrubSecrets
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-r2ap2czm.js";
|
|
17
17
|
import"./cli-zf8jjwex.js";
|
|
18
18
|
import"./cli-bc05qbss.js";
|
|
19
19
|
|
|
@@ -17,11 +17,11 @@ import {
|
|
|
17
17
|
resolveClaudeBridgeEnabled,
|
|
18
18
|
resolveClaudeQueueSteeringOverride,
|
|
19
19
|
runClaudeSessionSummary
|
|
20
|
-
} from "./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
20
|
+
} from "./cli-7smrsr25.js";
|
|
21
|
+
import"./cli-cr12paw2.js";
|
|
22
|
+
import"./cli-4wtq5jjv.js";
|
|
23
23
|
import"./cli-b5b30yzk.js";
|
|
24
|
-
import"./cli-
|
|
24
|
+
import"./cli-jecc01cb.js";
|
|
25
25
|
import"./cli-hp1n6zq3.js";
|
|
26
26
|
import"./cli-tng3131n.js";
|
|
27
27
|
import"./cli-zm7njwzd.js";
|
|
@@ -35,18 +35,18 @@ import"./cli-e7d20cty.js";
|
|
|
35
35
|
import"./cli-3dpj7atn.js";
|
|
36
36
|
import"./cli-y89t4nca.js";
|
|
37
37
|
import"./cli-f14fvzag.js";
|
|
38
|
-
import"./cli-
|
|
38
|
+
import"./cli-zvz62chv.js";
|
|
39
39
|
import"./cli-bsakbbkm.js";
|
|
40
40
|
import"./cli-9d8ntetj.js";
|
|
41
|
-
import"./cli-
|
|
42
|
-
import"./cli-
|
|
41
|
+
import"./cli-08b07b4r.js";
|
|
42
|
+
import"./cli-3apbzgyk.js";
|
|
43
43
|
import"./cli-e29gmdmw.js";
|
|
44
44
|
import"./cli-c2mk1kgf.js";
|
|
45
45
|
import"./cli-ej6gbxfb.js";
|
|
46
46
|
import"./cli-sd0mxa3c.js";
|
|
47
47
|
import"./cli-w5e1d1vv.js";
|
|
48
|
-
import"./cli-
|
|
49
|
-
import"./cli-
|
|
48
|
+
import"./cli-kjwt6hdf.js";
|
|
49
|
+
import"./cli-r2ap2czm.js";
|
|
50
50
|
import"./cli-knd276ed.js";
|
|
51
51
|
import"./cli-c4eeb5q2.js";
|
|
52
52
|
import"./cli-btbzvq95.js";
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
checkClaudeManagedCredentials,
|
|
4
4
|
composeManagedUserMessage,
|
|
5
5
|
normalizeRepoUrl
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-6664w7y4.js";
|
|
7
7
|
import"./cli-hsxj0yar.js";
|
|
8
8
|
import"./cli-2djtr51b.js";
|
|
9
9
|
import"./cli-j490egb5.js";
|
|
10
10
|
import"./cli-hp1n6zq3.js";
|
|
11
11
|
import"./cli-s25avqg9.js";
|
|
12
|
-
import"./cli-
|
|
12
|
+
import"./cli-r2ap2czm.js";
|
|
13
13
|
import"./cli-bc05qbss.js";
|
|
14
14
|
export {
|
|
15
15
|
ClaudeManagedAdapter,
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
cleanupTaskFile,
|
|
4
4
|
normalizeClaudeMessage,
|
|
5
5
|
runClaudeSessionSummary
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
6
|
+
} from "./cli-7smrsr25.js";
|
|
7
|
+
import"./cli-cr12paw2.js";
|
|
8
|
+
import"./cli-4wtq5jjv.js";
|
|
9
9
|
import {
|
|
10
10
|
SessionErrorTracker,
|
|
11
11
|
parseStderrForErrors,
|
|
12
12
|
trackErrorFromJson
|
|
13
13
|
} from "./cli-b5b30yzk.js";
|
|
14
|
-
import"./cli-
|
|
14
|
+
import"./cli-jecc01cb.js";
|
|
15
15
|
import"./cli-hp1n6zq3.js";
|
|
16
16
|
import"./cli-tng3131n.js";
|
|
17
17
|
import"./cli-zm7njwzd.js";
|
|
@@ -32,21 +32,21 @@ import {
|
|
|
32
32
|
terminateProcessGroup
|
|
33
33
|
} from "./cli-y89t4nca.js";
|
|
34
34
|
import"./cli-f14fvzag.js";
|
|
35
|
-
import"./cli-
|
|
35
|
+
import"./cli-zvz62chv.js";
|
|
36
36
|
import"./cli-bsakbbkm.js";
|
|
37
37
|
import"./cli-9d8ntetj.js";
|
|
38
|
-
import"./cli-
|
|
39
|
-
import"./cli-
|
|
38
|
+
import"./cli-08b07b4r.js";
|
|
39
|
+
import"./cli-3apbzgyk.js";
|
|
40
40
|
import"./cli-e29gmdmw.js";
|
|
41
41
|
import"./cli-c2mk1kgf.js";
|
|
42
42
|
import"./cli-ej6gbxfb.js";
|
|
43
43
|
import"./cli-sd0mxa3c.js";
|
|
44
44
|
import"./cli-w5e1d1vv.js";
|
|
45
|
-
import"./cli-
|
|
45
|
+
import"./cli-kjwt6hdf.js";
|
|
46
46
|
import {
|
|
47
47
|
init_secret_scrubber,
|
|
48
48
|
scrubSecrets
|
|
49
|
-
} from "./cli-
|
|
49
|
+
} from "./cli-r2ap2czm.js";
|
|
50
50
|
import"./cli-knd276ed.js";
|
|
51
51
|
import"./cli-c4eeb5q2.js";
|
|
52
52
|
import"./cli-btbzvq95.js";
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
restoreScratchScriptLastUsedIfUnchanged,
|
|
8
8
|
runScript,
|
|
9
9
|
touchScratchScriptLastUsed
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-aae6hz6a.js";
|
|
11
11
|
import {
|
|
12
12
|
defaultAssetKey,
|
|
13
13
|
getDbClient,
|
|
14
14
|
getLeadAgent,
|
|
15
15
|
init_db,
|
|
16
16
|
init_key
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-yab68w40.js";
|
|
18
18
|
import {
|
|
19
19
|
init_zod
|
|
20
20
|
} from "./cli-sd0mxa3c.js";
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
getEmbeddingProvider,
|
|
5
5
|
init_embedding,
|
|
6
6
|
serializeEmbedding
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-3q5ejx9p.js";
|
|
8
8
|
import {
|
|
9
9
|
getDbClient,
|
|
10
10
|
init_db
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-yab68w40.js";
|
|
12
12
|
import {
|
|
13
13
|
init_secret_scrubber,
|
|
14
14
|
scrubSecrets
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-r2ap2czm.js";
|
|
16
16
|
|
|
17
17
|
// src/be/scripts/embeddings.ts
|
|
18
18
|
init_secret_scrubber();
|
|
@@ -285,14 +285,15 @@ The task has four endings. When you are done: \`completed\`. When the answer nee
|
|
|
285
285
|
Your output is delegation and review. Workers implement, research, analyze, and write. Data gathering, even a quick query, goes to a worker. You answer simple factual questions yourself.
|
|
286
286
|
|
|
287
287
|
\`get-swarm\` is the roster. Route by capability and load.
|
|
288
|
-
|
|
288
|
+
\`send-task\`: include \`routingReason\` with \`agentId\`. Read results via \`get-task-details\`.
|
|
289
289
|
A task states the goal, the repo URL when there is one, and the constraints. Workers know git, the skills, and \`store-progress\`.
|
|
290
290
|
Delegate by the shape of the work: a workflow for multi-step or fan-out work, a schedule for recurring work, a script for bulk data, an inline \`script-run\` for a one-off bulk job you can run yourself. The \`workflow-iterate\`, \`scheduling\`, and \`swarm-scripts\` skills build them.
|
|
291
291
|
Research or exploration: tell the worker to use the \`researching\` skill. A large feature: a task for the \`planning\` skill first, then a task for the \`implementing\` skill with \`parentTaskId\`. A small fix: direct implementation.
|
|
292
292
|
A follow-up that continues earlier work carries \`parentTaskId\`. The worker receives the prior context.
|
|
293
|
-
A task whose result depends on the workers' output: wait for the children with the \`wait-for-task\` script, then merge and complete the task yourself. A turn that ends with children still running leaves the task unfinished.
|
|
294
293
|
|
|
295
|
-
|
|
294
|
+
Worker completion/failure triggers a follow-up by default. For longer work, \`defer-task\` with a wake-up or complete this task. Review the worker's answer and complete the follow-up. Escalate only failures needing a person.
|
|
295
|
+
|
|
296
|
+
Wait inline via \`wait-for-task\` only for an essential result expected within ~1 minute. Set \`send-task.followUpConfig.disabled=true\`; cap all waits at ~1 minute total. If still running, \`defer-task\` with a wake-up.
|
|
296
297
|
|
|
297
298
|
A task from an unknown user: register them with \`manage-user\`, then continue.
|
|
298
299
|
Your heartbeat runbook is the \`heartbeatMd\` profile field. Edit it with \`update-profile\`. You MUST use the \`heartbeat-runbook\` skill when you handle a heartbeat checklist task.
|
|
@@ -398,16 +399,20 @@ Link env: \`APP_URL\` for pages, \`MCP_BASE_URL\` for the API. Report missing va
|
|
|
398
399
|
defaultBody: `
|
|
399
400
|
## How you write
|
|
400
401
|
|
|
401
|
-
|
|
402
|
+
For human-facing replies and artifacts: lead with the result. Use plain words, active voice, one idea per sentence, and sentence case headings.
|
|
403
|
+
State blockers and reasons. Preserve meaningful uncertainty.
|
|
404
|
+
Omit em dashes, filler, sign-offs, praise, repetition, step narration, and generic offers to elaborate.
|
|
405
|
+
|
|
406
|
+
Simple replies: one to three sentences. Routine replies: under 120 words, using short paragraphs or up to three bullets.
|
|
407
|
+
Use more detail for requested depth or essential evidence, caveats, or instructions.
|
|
408
|
+
Include context only when it changes understanding or action. Link extensive supporting material when useful, but make the reply self-contained.
|
|
409
|
+
Do not shorten investigation, required artifacts, or schema-defined output to meet reply limits.
|
|
402
410
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
Reply in the requester's language, at the depth they asked for. A one-line question gets the answer first.
|
|
409
|
-
A Requester Profile section, when present, wins on tone, depth, and format. Correctness wins over style.
|
|
410
|
-
Em dashes, filler, sign-offs, and praise of the question are out.
|
|
411
|
+
Follow the current request and Requester Profile for language, tone, depth, and format. Correctness wins over style.
|
|
412
|
+
Use the \`comms\` skill when available for requested simplification or clarity rewrites. Ordinary replies need no skill invocation.
|
|
413
|
+
Use Visual mode only for explicit visual requests with delivery tools available in the active channel.
|
|
414
|
+
Requests to show data are not visual requests. New facts, diagnosis, and actions still require work.
|
|
415
|
+
Output schemas and channel delivery rules, including Slack's engine-owned delivery, override skill defaults.
|
|
411
416
|
`,
|
|
412
417
|
variables: [],
|
|
413
418
|
category: "system"
|
|
@@ -461,6 +466,13 @@ You may receive steering messages while this task is running. Each one arrives w
|
|
|
461
466
|
],
|
|
462
467
|
category: "system"
|
|
463
468
|
});
|
|
469
|
+
registerTemplate({
|
|
470
|
+
eventType: "system.agent.tool_preload",
|
|
471
|
+
header: "",
|
|
472
|
+
defaultBody: "This session preloads selected swarm tools. If a tool definition is already available in context, call it directly. Use your harness tool search only for tools whose definitions are not yet available.",
|
|
473
|
+
variables: [],
|
|
474
|
+
category: "system"
|
|
475
|
+
});
|
|
464
476
|
registerTemplate({
|
|
465
477
|
eventType: "system.agent.tools_skills",
|
|
466
478
|
header: "",
|
|
@@ -521,8 +533,8 @@ This swarm runs in **scripts-only mode**. The ONLY swarm MCP tools available are
|
|
|
521
533
|
The script authoring contract in the \`swarm-scripts\` skill (entry signature, \`ctx\` shape, secret handling) applies here unchanged. The full SDK is \`ctx.swarm.*\`: task lifecycle (\`task_get\`, \`task_send\`, \`task_storeProgress\`, \`task_action\`, \`task_list\`), Slack (\`slack_reply\`, \`slack_post\`, \`slack_read\`), memory, kv, swarm info (\`swarm_get\`, \`agent_info\`), and more. Responses are usually wrapped; prefer \`res?.data ?? res\`.
|
|
522
534
|
|
|
523
535
|
**Built-in coordination scripts, USE THESE FIRST (\`script-run\` with \`name\` + \`args\`):**
|
|
524
|
-
- \`delegate\` {agentName, task, parentTaskId?} → subtask for an agent by name; returns {taskId}
|
|
525
|
-
- \`wait-for-task\` {taskId} → waits up to ~25s for a terminal state; returns {done, status, output};
|
|
536
|
+
- \`delegate\` {agentName, task, routingReason, parentTaskId?} → subtask for an agent by name; returns {taskId}
|
|
537
|
+
- \`wait-for-task\` {taskId} → waits up to ~25s for a terminal state; returns {done, status, output}; only for a child expected to finish within about a minute whose result the answer requires. Bound all calls to about a minute total; if still done=false, use \`defer-task\` with a wake-up to collect the result.
|
|
526
538
|
- \`get-child-outputs\` {parentTaskId} → all children with status+output
|
|
527
539
|
- \`complete-task\` {taskId, output} → THE way to finish your assigned task
|
|
528
540
|
- \`report-progress\` {taskId, note} → progress update
|
|
@@ -532,7 +544,7 @@ Rules of the road:
|
|
|
532
544
|
- Prefer a built-in script over inline source; write inline TypeScript only for logic no built-in covers. Check \`script-search\` first, and \`script-query-types\` for the live \`swarm-sdk.d.ts\` before authoring anything non-trivial.
|
|
533
545
|
- \`taskId\` is NOT ambient inside scripts; pass it explicitly via \`args\`.
|
|
534
546
|
- Report progress and completion via \`complete-task\` / \`report-progress\` (or \`ctx.swarm.task_storeProgress\` inline). This is how you update, complete, or fail your task; there is no other way.
|
|
535
|
-
- Scripts are killed after ~30s and stdout is capped at 1 MB. Never sleep/loop longer than ~25s inside one script;
|
|
547
|
+
- Scripts are killed after ~30s and stdout is capped at 1 MB. Never sleep/loop longer than ~25s inside one script. Default to the child's automatic follow-up; chained \`wait-for-task\` calls are only for the inline exception above and must stay within about a minute total.
|
|
536
548
|
- Aggregate inside the script and return only the derived result; never dump raw data.
|
|
537
549
|
- Batch related SDK calls into a single script when it reduces round trips.
|
|
538
550
|
`,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
contentSha256,
|
|
3
3
|
init_profile_sync
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-zvz62chv.js";
|
|
5
5
|
import {
|
|
6
6
|
OpenAI,
|
|
7
7
|
init_openai
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getDbClient,
|
|
12
12
|
init_db,
|
|
13
13
|
isSqliteVecAvailable
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-yab68w40.js";
|
|
15
15
|
import {
|
|
16
16
|
__esm,
|
|
17
17
|
__export,
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
parseClaudeMdPendingRecord,
|
|
14
14
|
planClaudeMdSync,
|
|
15
15
|
withFileLock
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-zvz62chv.js";
|
|
17
17
|
import {
|
|
18
18
|
init_secret_scrubber,
|
|
19
19
|
scrubSecrets
|
|
20
|
-
} from "./cli-
|
|
20
|
+
} from "./cli-r2ap2czm.js";
|
|
21
21
|
|
|
22
22
|
// src/commands/claude-md-session.ts
|
|
23
23
|
init_file_lock();
|