@desplega.ai/agent-swarm 1.131.1 → 1.134.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 +3 -3
- package/dist/{actions-jgcy477k.js → actions-7kast243.js} +20 -18
- package/dist/{anthropic-messages-rjmd2e7n.js → anthropic-messages-706yad38.js} +33 -17
- package/dist/app-0g84t8wf.js +28 -0
- package/dist/{artifact-jysj3wrg.js → artifact-dje5ke4h.js} +37 -131
- package/dist/{assistant-f2vkk1hj.js → assistant-ac4htcky.js} +25 -22
- package/dist/{azure-openai-responses-c0yjmbfd.js → azure-openai-responses-be59fbsz.js} +13 -13
- package/dist/{boot-reembed-q7mp8hcr.js → boot-reembed-b1rcqn85.js} +13 -11
- package/dist/{boot-reembed-xmw8wcx6.js → boot-reembed-kw2541c4.js} +14 -12
- package/dist/{boot-scrub-logs-dsqrv79n.js → boot-scrub-logs-ja29t92g.js} +11 -9
- package/dist/{claude-adapter-q6x7yspx.js → claude-adapter-5cg1fv8s.js} +33 -29
- package/dist/{claude-managed-adapter-wsg37bt8.js → claude-managed-adapter-9z9sdytx.js} +9 -9
- package/dist/{claude-managed-setup-52z4mq9w.js → claude-managed-setup-3zqp51cr.js} +5 -5
- package/dist/{claude-1ex232fc.js → claude-wqn3dtca.js} +1 -1
- package/dist/{cli-4wgngmwv.js → cli-00w4hbam.js} +1 -1
- package/dist/{cli-er3a4bb0.js → cli-15429qdw.js} +6 -1
- package/dist/{cli-e5dabkx0.js → cli-1cwhyvta.js} +4 -4
- package/dist/{cli-zsspvvm2.js → cli-1ybr6vw2.js} +237 -237
- package/dist/{cli-xpxde7rm.js → cli-2wv4kj0e.js} +60 -31
- package/dist/cli-34w2584r.js +530 -0
- package/dist/{cli-se2p6rkb.js → cli-38taxznr.js} +6 -6
- package/dist/{cli-9sbhdpvb.js → cli-3cgfyfzm.js} +14 -14
- package/dist/{cli-5n6e5yfn.js → cli-3zmdzfjf.js} +79 -74
- package/dist/{cli-3ty0t082.js → cli-43x36mty.js} +197 -8
- package/dist/{cli-ycrnynpw.js → cli-480nehnh.js} +29 -22
- package/dist/{cli-0258203w.js → cli-492e7ap5.js} +140 -20
- package/dist/{cli-3fj60etf.js → cli-497b685t.js} +3 -3
- package/dist/{cli-pxfxkx5m.js → cli-4bap00k0.js} +1 -1
- package/dist/{cli-w2wxd56v.js → cli-4bc8vmhm.js} +848 -770
- package/dist/{cli-aca5pz9f.js → cli-589599p9.js} +1 -1
- package/dist/{cli-t930g0xh.js → cli-5tnr64pm.js} +1 -1
- package/dist/{cli-jxg3s9ey.js → cli-65d93ves.js} +7 -7
- package/dist/{cli-6dpytdr2.js → cli-6x363v1z.js} +2 -2
- package/dist/{cli-dxak0fqd.js → cli-787ph852.js} +11 -11
- package/dist/{cli-793jvbsh.js → cli-7bv8nckk.js} +16 -11
- package/dist/{cli-zyxs93y9.js → cli-7jcc9y1r.js} +3 -3
- package/dist/{cli-f1am9szv.js → cli-87t2gstf.js} +1 -1
- package/dist/{cli-9aryf9tv.js → cli-95m51ztz.js} +1 -1
- package/dist/{cli-4w4fmq9x.js → cli-9w49enmh.js} +2 -2
- package/dist/{cli-v69vk5h0.js → cli-9y5b02vr.js} +13 -13
- package/dist/{cli-x23me2mg.js → cli-a1rrkrb4.js} +1 -1
- package/dist/{cli-psrqtw2m.js → cli-a3pkfpqs.js} +2 -2
- package/dist/{cli-h0rgxd24.js → cli-a4ajmfvp.js} +6 -6
- package/dist/{cli-ygrbmjja.js → cli-aw8bb6sf.js} +6 -6
- package/dist/{cli-g74vpjp2.js → cli-brm3et47.js} +55 -22
- package/dist/{cli-czkae1fp.js → cli-c5ddbdfj.js} +9 -9
- package/dist/{cli-114fvtmj.js → cli-c79a9zrc.js} +1 -1
- package/dist/{cli-49n9f49x.js → cli-dx3dz0ms.js} +3 -3
- package/dist/{cli-6dp3ydxa.js → cli-e07exmsb.js} +18 -14
- package/dist/cli-et1bbwqf.js +13 -0
- package/dist/{cli-yazx6hap.js → cli-f3s9dry0.js} +14 -14
- package/dist/{cli-t8d349cy.js → cli-f4wj0s3m.js} +3 -3
- package/dist/{cli-d6n0thxw.js → cli-f64gdfxc.js} +1 -1
- package/dist/{cli-pwfsqc2x.js → cli-fyd58xgb.js} +55 -55
- package/dist/{cli-7dm2zqy2.js → cli-g0j14czv.js} +2 -2
- package/dist/{cli-b0p7rfnd.js → cli-g2p9bd1z.js} +14 -14
- package/dist/{cli-z905tvmm.js → cli-g814jbst.js} +2 -2
- package/dist/{cli-5dsbcjjw.js → cli-ghexzd2d.js} +970 -970
- package/dist/{cli-jvv0g8bh.js → cli-gpt9kf01.js} +15 -15
- package/dist/{cli-rgrfzg8z.js → cli-grt6qv91.js} +380 -380
- package/dist/{cli-wz9115x0.js → cli-gtafvdy0.js} +8 -8
- package/dist/{cli-q5dzzak0.js → cli-gy07xk4s.js} +2 -2
- package/dist/{cli-sy7jk3tx.js → cli-h0djenzm.js} +2 -2
- package/dist/{cli-nrkkknat.js → cli-h37gbjbf.js} +2 -281
- package/dist/{cli-jevgrb4w.js → cli-h39xxnq6.js} +1200 -491
- package/dist/{cli-gz9sbyk3.js → cli-jepmgn7r.js} +1 -1
- package/dist/{cli-ccf9vy7q.js → cli-jmvk6et8.js} +7 -7
- package/dist/{cli-2rk0cx7s.js → cli-jxj92gkt.js} +51 -41
- package/dist/{cli-bqw0mt1n.js → cli-k46t4664.js} +18 -3
- package/dist/{cli-50vbt00w.js → cli-m07313tr.js} +1153 -696
- package/dist/{cli-4j2mrzag.js → cli-mkq1rk7b.js} +1 -1
- package/dist/{cli-1z7048dy.js → cli-mnm7w46e.js} +1 -1
- package/dist/{cli-kd1ck4rx.js → cli-mp9sg4cg.js} +14 -8
- package/dist/{cli-jbcva0xj.js → cli-mrammd8c.js} +60 -35
- package/dist/cli-nanaxrz6.js +27 -0
- package/dist/{cli-p9swy5t3.js → cli-pq2ee5ja.js} +8 -6
- package/dist/{cli-2wadx7p2.js → cli-pt43pdp1.js} +2 -2
- package/dist/{cli-7sgrxg9a.js → cli-q6d0vvey.js} +4 -4
- package/dist/{cli-k9qkf1hw.js → cli-qf9kpsve.js} +9 -9
- package/dist/cli-qh4sqfws.js +15 -0
- package/dist/{cli-e15jhafb.js → cli-qntkxysp.js} +14 -14
- package/dist/{cli-sajgpkqg.js → cli-qs9hhsvb.js} +1723 -325
- package/dist/{cli-z2zcxes1.js → cli-qt5bt3vk.js} +1 -1
- package/dist/{cli-wx82tw1k.js → cli-qtekrty1.js} +3 -3
- package/dist/{cli-g1re8r05.js → cli-rh6f3s9n.js} +3 -3
- package/dist/{cli-n0krnc6d.js → cli-rzhcrw2p.js} +2 -2
- package/dist/{cli-gecy3z2s.js → cli-snw62ze5.js} +4 -4
- package/dist/{cli-n6h8qt8n.js → cli-snz3p4yf.js} +15 -10
- package/dist/{cli-r6kqqbj0.js → cli-tkf8n6cw.js} +11 -11
- package/dist/{cli-4rkfg1wx.js → cli-tkrr24mz.js} +14 -9
- package/dist/{cli-9dr5qzc0.js → cli-tv9f1kyb.js} +54 -43
- package/dist/{cli-gm9cbhbq.js → cli-vtz6yj3v.js} +28 -9
- package/dist/{cli-2f07m0xr.js → cli-wf86d5t7.js} +1 -1
- package/dist/{cli-7zd05xb4.js → cli-whrvct19.js} +45 -45
- package/dist/{cli-ap1czx8f.js → cli-wrrea8xm.js} +3 -3
- package/dist/{cli-57khth04.js → cli-xmyqv00z.js} +120 -4
- package/dist/{cli-cwy5hqbq.js → cli-yjmk7tzc.js} +1 -1
- package/dist/{cli-6pcz9h15.js → cli-zykjrwcx.js} +180 -394
- package/dist/cli.js +45 -45
- package/dist/{codex-adapter-htjkn22b.js → codex-adapter-hsq6mz3m.js} +21 -19
- package/dist/{codex-hook-hq54t9ft.js → codex-hook-8c500gq8.js} +8 -7
- package/dist/{codex-login-z6yhbkmk.js → codex-login-x7603481.js} +3 -3
- package/dist/{codex-session-runner-wjfc7smz.js → codex-session-runner-c1x3x143.js} +15 -13
- package/dist/{commands-xhrfwqsk.js → commands-rwtddtst.js} +11 -9
- package/dist/{db-anvwb22f.js → db-j2b355vz.js} +458 -444
- package/dist/{devin-adapter-v1sarqtw.js → devin-adapter-8qmhqpy3.js} +3 -3
- package/dist/{devtools-2y1r7yqk.js → devtools-j2rnj8w7.js} +4 -4
- package/dist/{e2b-jdkwemv2.js → e2b-znpx78eg.js} +16 -16
- package/dist/{es5-vjgtkgp6.js → es5-fmqrjzy3.js} +2 -2
- package/dist/{event-bus-axn823e9.js → event-bus-n8sb35pw.js} +4 -4
- package/dist/{getMachineId-bsd-6tc9wxdj.js → getMachineId-bsd-wpzbhkm6.js} +4 -4
- package/dist/{getMachineId-darwin-sjt9sgnc.js → getMachineId-darwin-45zabjy0.js} +4 -4
- package/dist/{getMachineId-linux-v5n18y9p.js → getMachineId-linux-warnp5pd.js} +3 -3
- package/dist/{getMachineId-unsupported-yrjyqw3d.js → getMachineId-unsupported-5spent2a.js} +3 -3
- package/dist/{getMachineId-win-w3r8063c.js → getMachineId-win-v4bvcw7a.js} +4 -4
- package/dist/{google-generative-ai-hysrd8qx.js → google-generative-ai-b0wzss55.js} +17 -14
- package/dist/{google-vertex-p5arrga0.js → google-vertex-e8q4dpya.js} +18 -15
- package/dist/{handlers-b9kbc621.js → handlers-hchgrxkh.js} +32 -29
- package/dist/{hook-xkvn6c5h.js → hook-p49egqc0.js} +66 -52
- package/dist/hook-spb00w76.js +34 -0
- package/dist/{http-9xh6ta4r.js → http-nh14kkms.js} +663 -181
- package/dist/index-1qthq7vc.js +6 -0
- package/dist/{index-0g68f0p6.js → index-20xqmn3v.js} +3 -3
- package/dist/{index-vdkr5z2w.js → index-3e03k6e4.js} +114 -114
- package/dist/{index-ywds4812.js → index-4cbyhq2g.js} +43 -41
- package/dist/index-67pzqfrb.js +36 -0
- package/dist/{index-bccrkdkn.js → index-7m8yxkw5.js} +16 -16
- package/dist/{index-eaxyqcmj.js → index-dvsk64sm.js} +163 -83
- package/dist/{index-dqkpnmqm.js → index-e19s2m8k.js} +18 -18
- package/dist/{index-j30k5zxn.js → index-emvxcy98.js} +16 -16
- package/dist/{index-7ndw6ecy.js → index-gqnmr60d.js} +9 -9
- package/dist/{index-9znhar3x.js → index-j02xvjtd.js} +184 -185
- package/dist/{index-1s2442yw.js → index-ns5kksc1.js} +7 -7
- package/dist/{index-dpy2hth8.js → index-pdxc8kfh.js} +71 -71
- package/dist/{index-z1m7pw0v.js → index-ptcqm8bc.js} +107 -107
- package/dist/{index-070v4eyb.js → index-pyp7rexm.js} +5 -6
- package/dist/{index-86znjz1p.js → index-shne41sd.js} +13 -13
- package/dist/{index-2qn2qndv.js → index-t36q2v4t.js} +183 -183
- package/dist/index-tcnvv8w6.js +7 -0
- package/dist/index-w91qbfv1.js +7 -0
- package/dist/{index-fzc0mwvj.js → index-yqweff5n.js} +32 -32
- package/dist/index-yrfphye1.js +39 -0
- package/dist/{keepalive-vc7s2aa6.js → keepalive-9k51nqhc.js} +21 -15
- package/dist/lead-2xq3dxbz.js +88 -0
- package/dist/maintenance-0c0g6nym.js +28 -0
- package/dist/mistral-conversations-2njwdwhj.js +717 -0
- package/dist/{multipart-parser-qaktc7p8.js → multipart-parser-6gftesw0.js} +2 -2
- package/dist/{oauth-refresh-sweep-yecgjpk4.js → oauth-refresh-sweep-273a64r2.js} +14 -12
- package/dist/{onboard-xj0f73f9.js → onboard-tsv9wwhz.js} +12 -12
- package/dist/{openai-codex-responses-5g27pd6f.js → openai-codex-responses-kt84eq86.js} +26 -26
- package/dist/{openai-completions-3vkmfz2a.js → openai-completions-mrypq7qp.js} +17 -16
- package/dist/{openai-responses-dg4t7j7a.js → openai-responses-qhrk21ez.js} +20 -17
- package/dist/{opencode-adapter-1gm38aba.js → opencode-adapter-rar9676j.js} +13 -11
- package/dist/{openrouter-images-g3gm8931.js → openrouter-images-684fysx9.js} +5 -5
- package/dist/{otel-impl-nxg0n0b3.js → otel-impl-wp1mfzd2.js} +752 -537
- package/dist/{photon_rs-ky7dj5qw.js → photon_rs-8dwt2pzy.js} +581 -581
- package/dist/{pi-messages-tqj8q6b9.js → pi-messages-txp9f97r.js} +7 -7
- package/dist/{pi-mono-adapter-4g5kby31.js → pi-mono-adapter-yz47kk8e.js} +1910 -1180
- package/dist/pricing-refresh-jw1yw2fn.js +22 -0
- package/dist/rbac-roles-dg964c8p.js +32 -0
- package/dist/{rbac-roles-1hcxdtg7.js → rbac-roles-p53cg5cv.js} +19 -17
- package/dist/{registry-02cy9z5z.js → registry-mh12y17v.js} +4 -4
- package/dist/render-v2-56vn2rk9.js +36 -0
- package/dist/seed-pricing-52xx6z63.js +19 -0
- package/dist/{setup-46xtgq3c.js → setup-e8gp79sy.js} +7 -7
- package/dist/token-util-zy908s1a.js +6 -0
- package/dist/{token-fxkn2zf2.js → token-xg5711x5.js} +4 -4
- package/dist/worker-s17f1g46.js +88 -0
- package/dist/{x-6mg4kfpe.js → x-xkfh0w0v.js} +5 -5
- package/openapi.json +566 -22
- package/package.json +6 -6
- package/src/be/budget-refusal-notify.ts +14 -7
- package/src/be/db-queries/task-artifacts.ts +182 -0
- package/src/be/db.ts +834 -171
- package/src/be/events.ts +5 -0
- package/src/be/migrations/131_session_logs_created_at_index.sql +2 -0
- package/src/be/migrations/132_multi_runtime_instances.sql +44 -0
- package/src/be/migrations/133_workflow_run_trigger_type.sql +12 -0
- package/src/be/migrations/135_backfill_task_pull_request_attachments.sql +228 -0
- package/src/be/migrations/136_task_requester_provenance.sql +37 -0
- package/src/be/migrations/137_memory_retrieval_composite_index.sql +1 -0
- package/src/be/migrations/runner.ts +17 -11
- package/src/be/multi-runtime.ts +430 -0
- package/src/be/scripts/extract-schema.ts +3 -1
- package/src/be/scripts/typecheck.ts +6 -2
- package/src/be/seed-prompt-templates.ts +25 -2
- package/src/be/seed-skills/index.ts +7 -0
- package/src/be/steering.ts +1 -1
- package/src/be/swarm-config-guard.ts +18 -0
- package/src/commands/credential-wait.ts +54 -0
- package/src/commands/onboard/steps/core-credentials.tsx +1 -1
- package/src/commands/onboard/steps/custom-templates.tsx +1 -1
- package/src/commands/onboard/steps/harness-credentials.tsx +1 -1
- package/src/commands/onboard/steps/health-check.tsx +1 -1
- package/src/commands/onboard/steps/start.tsx +1 -1
- package/src/commands/profile-sync-audit.ts +56 -0
- package/src/commands/profile-sync.ts +287 -15
- package/src/commands/provider-credentials.ts +46 -19
- package/src/commands/runner.ts +199 -33
- package/src/commands/templates.ts +22 -0
- package/src/github/handlers.ts +55 -9
- package/src/heartbeat/heartbeat.ts +109 -17
- package/src/hooks/hook.ts +49 -33
- package/src/http/active-sessions.ts +11 -1
- package/src/http/agents.ts +261 -30
- package/src/http/all-routes.ts +1 -0
- package/src/http/config.ts +13 -2
- package/src/http/core.ts +102 -4
- package/src/http/db-query-bounded.ts +313 -0
- package/src/http/db-query-shared.ts +249 -0
- package/src/http/db-query.ts +54 -42
- package/src/http/events.ts +2 -0
- package/src/http/index.ts +23 -2
- package/src/http/mcp-bridge.ts +37 -3
- package/src/http/mcp.ts +12 -0
- package/src/http/memory.ts +13 -2
- package/src/http/openapi.ts +1 -0
- package/src/http/poll.ts +70 -27
- package/src/http/prompt-templates.ts +36 -13
- package/src/http/route-def.ts +43 -9
- package/src/http/schedules.ts +2 -2
- package/src/http/scripts.ts +10 -1
- package/src/http/session-data.ts +44 -0
- package/src/http/tasks.ts +2 -2
- package/src/http/users.ts +74 -52
- package/src/http/webhooks.ts +5 -2
- package/src/http/workflows.ts +1 -4
- package/src/integrations/kapso/inbound.ts +1 -1
- package/src/jira/outbound.ts +39 -8
- package/src/jira/webhook-lifecycle.ts +13 -2
- package/src/linear/outbound.ts +43 -10
- package/src/oauth/keepalive.ts +13 -2
- package/src/prompts/base-prompt.ts +1 -1
- package/src/prompts/default-drift.ts +21 -0
- package/src/prompts/session-templates.ts +56 -7
- package/src/providers/claude-adapter.ts +6 -0
- package/src/providers/codex-adapter.ts +6 -0
- package/src/providers/opencode-adapter.ts +6 -0
- package/src/providers/pi-mono-adapter.ts +8 -0
- package/src/providers/pricing-sources.md +24 -0
- package/src/queue-stall-alarm.ts +216 -0
- package/src/rbac/legacy-policy.ts +3 -0
- package/src/rbac/permissions.ts +12 -0
- package/src/scheduler/scheduler.ts +7 -0
- package/src/script-workflows/executor.ts +2 -1
- package/src/scripts-runtime/executors/native.ts +2 -1
- package/src/scripts-runtime/executors/types.ts +5 -0
- package/src/scripts-runtime/loader.ts +5 -0
- package/src/scripts-runtime/sdk-allowlist.ts +3 -0
- package/src/scripts-runtime/swarm-config.ts +8 -0
- package/src/scripts-runtime/swarm-sdk.ts +7 -0
- package/src/scripts-runtime/types/stdlib.d.ts +4 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +4 -0
- package/src/server.ts +6 -0
- package/src/slack/channel-join.ts +22 -3
- package/src/slack/channel-lifecycle.ts +114 -0
- package/src/tests/budget-claim-gate.test.ts +20 -0
- package/src/tests/claude-adapter.test.ts +32 -0
- package/src/tests/codex-adapter.test.ts +30 -0
- package/src/tests/create-task-validation.test.ts +128 -0
- package/src/tests/credential-wait.test.ts +67 -1
- package/src/tests/db-query.test.ts +711 -2
- package/src/tests/heartbeat-checklist.test.ts +28 -0
- package/src/tests/http-api-integration.test.ts +81 -0
- package/src/tests/http-users.test.ts +166 -1
- package/src/tests/identity-field-budget.test.ts +176 -0
- package/src/tests/mcp-tools-user.test.ts +34 -0
- package/src/tests/mcp-user-route.test.ts +17 -0
- package/src/tests/metrics-http.test.ts +44 -0
- package/src/tests/migration-failure.test.ts +86 -0
- package/src/tests/multi-runtime-registration.test.ts +2810 -0
- package/src/tests/openapi-response-contract.test.ts +24 -0
- package/src/tests/openapi-route-headers.test.ts +83 -0
- package/src/tests/opencode-adapter.test.ts +40 -0
- package/src/tests/outbound-listener-rejection.test.ts +138 -0
- package/src/tests/pi-mono-adapter.test.ts +98 -0
- package/src/tests/preload.ts +2 -0
- package/src/tests/profile-sync-warning.test.ts +277 -0
- package/src/tests/profile-sync.test.ts +232 -6
- package/src/tests/prompt-template-resolver.test.ts +177 -6
- package/src/tests/prompt-template-session.test.ts +39 -3
- package/src/tests/queue-stall-alarm.test.ts +226 -0
- package/src/tests/rbac-charact-slack.test.ts +29 -0
- package/src/tests/rbac-engine.test.ts +3 -0
- package/src/tests/requester-comms.test.ts +32 -0
- package/src/tests/runner-requester-profile.test.ts +38 -0
- package/src/tests/schedule-target-type.test.ts +38 -0
- package/src/tests/script-connections.test.ts +13 -1
- package/src/tests/scripts-runtime-identity.test.ts +375 -0
- package/src/tests/scripts-runtime.test.ts +4 -3
- package/src/tests/sdk-allowlist.test.ts +47 -0
- package/src/tests/send-task-requested-by.test.ts +9 -0
- package/src/tests/session-costs.test.ts +506 -1
- package/src/tests/shutdown-error-scrubbing.test.ts +92 -0
- package/src/tests/slack-channel-lifecycle.test.ts +241 -0
- package/src/tests/slack-render-v2.test.ts +43 -0
- package/src/tests/steering-core.test.ts +28 -0
- package/src/tests/swarm-config-reserved-keys.test.ts +22 -0
- package/src/tests/task-artifacts.test.ts +386 -0
- package/src/tests/task-attachments-schema.test.ts +17 -1
- package/src/tests/task-completion-idempotency.test.ts +57 -0
- package/src/tests/task-pull-request-backfill-migration.test.ts +321 -0
- package/src/tests/tool-annotations.test.ts +4 -0
- package/src/tests/update-profile-api.test.ts +67 -39
- package/src/tests/update-profile-auth.test.ts +48 -4
- package/src/tests/user-attribution-migration.test.ts +54 -0
- package/src/tests/user-identity.test.ts +72 -0
- package/src/tests/workflow-async-v2.test.ts +39 -1
- package/src/tests/workflow-http-v2.test.ts +3 -2
- package/src/tests/workflow-mcp-trigger-schema.test.ts +52 -3
- package/src/tests/workflow-retry-v2.test.ts +45 -1
- package/src/tools/db-query.ts +18 -8
- package/src/tools/get-task-details.ts +24 -3
- package/src/tools/manage-user.ts +36 -3
- package/src/tools/poll-task.ts +93 -14
- package/src/tools/script-common.ts +5 -0
- package/src/tools/send-task.ts +1 -4
- package/src/tools/slack-archive-channel.ts +70 -0
- package/src/tools/slack-create-channel.ts +74 -0
- package/src/tools/slack-invite-to-channel.ts +78 -0
- package/src/tools/store-progress.ts +13 -2
- package/src/tools/swarm-config/delete-config.ts +9 -0
- package/src/tools/swarm-config/set-config.ts +3 -2
- package/src/tools/task-action.ts +30 -0
- package/src/tools/task-tool-ctx.ts +8 -1
- package/src/tools/tool-config.ts +4 -1
- package/src/tools/update-profile.ts +16 -21
- package/src/tools/utils.ts +5 -0
- package/src/tools/workflows/trigger-workflow.ts +7 -1
- package/src/types.ts +165 -1
- package/src/utils/github-pull-request.ts +76 -0
- package/src/utils/identity-field-budget.ts +73 -0
- package/src/utils/multi-runtime.ts +20 -0
- package/src/utils/requester-comms.ts +24 -0
- package/src/workflows/engine.ts +22 -2
- package/src/workflows/resume.ts +19 -11
- package/src/workflows/retry-poller.ts +1 -0
- package/src/workflows/triggers.ts +4 -0
- package/templates/skills/db-query-guidance/config.json +14 -0
- package/templates/skills/db-query-guidance/content.md +57 -0
- package/dist/app-5da78bd4.js +0 -26
- package/dist/cli-3te4jdkm.js +0 -225
- package/dist/cli-bmze986d.js +0 -7
- package/dist/cli-kh3ba2zf.js +0 -607
- package/dist/hook-cgk4wxmx.js +0 -31
- package/dist/index-25wjsdv2.js +0 -34
- package/dist/index-76at2ymp.js +0 -7
- package/dist/index-hase6zbe.js +0 -6
- package/dist/index-vg4snay4.js +0 -36
- package/dist/index-vy8edt27.js +0 -7
- package/dist/lead-r2yqfmx7.js +0 -85
- package/dist/maintenance-mw70k468.js +0 -26
- package/dist/mistral-conversations-81fwav0j.js +0 -30578
- package/dist/otel-nqa12wf3.js +0 -3149
- package/dist/pricing-refresh-2cn6effr.js +0 -20
- package/dist/rbac-roles-vynday5g.js +0 -30
- package/dist/render-v2-tc0bh8kk.js +0 -34
- package/dist/seed-pricing-8kceb43f.js +0 -17
- package/dist/token-util-pqyc8kng.js +0 -6
- package/dist/worker-qrbz6hmv.js +0 -85
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_registry,
|
|
3
|
+
init_resolver,
|
|
4
|
+
init_session_templates,
|
|
5
|
+
init_steering_enabled,
|
|
6
|
+
isSteeringEnabled,
|
|
7
|
+
registerTemplate,
|
|
8
|
+
resolveTemplateAsync
|
|
9
|
+
} from "./cli-2wv4kj0e.js";
|
|
10
|
+
import {
|
|
11
|
+
__esm
|
|
12
|
+
} from "./cli-pq2ee5ja.js";
|
|
13
|
+
|
|
14
|
+
// src/prompts/base-prompt.ts
|
|
15
|
+
function areSlackPromptToolsEnabled(env = process.env) {
|
|
16
|
+
const slackDisable = env.SLACK_DISABLE;
|
|
17
|
+
if (slackDisable === "true" || slackDisable === "1")
|
|
18
|
+
return false;
|
|
19
|
+
return Boolean(env.SLACK_BOT_TOKEN && env.SLACK_APP_TOKEN);
|
|
20
|
+
}
|
|
21
|
+
function truncateRepoClaudeMd(content, clonePath, budget) {
|
|
22
|
+
if (content.length <= budget)
|
|
23
|
+
return content;
|
|
24
|
+
const notice = `
|
|
25
|
+
|
|
26
|
+
[...truncated — see ${clonePath}/CLAUDE.md for full content]
|
|
27
|
+
`;
|
|
28
|
+
const contentBudget = budget - notice.length;
|
|
29
|
+
if (contentBudget <= 0)
|
|
30
|
+
return notice.trimStart();
|
|
31
|
+
return content.slice(0, contentBudget) + notice;
|
|
32
|
+
}
|
|
33
|
+
function truncateSection(content, header, fileName, budget) {
|
|
34
|
+
if (!content || budget <= 0)
|
|
35
|
+
return "";
|
|
36
|
+
const fullSection = `
|
|
37
|
+
|
|
38
|
+
${header}
|
|
39
|
+
|
|
40
|
+
${content}
|
|
41
|
+
`;
|
|
42
|
+
if (fullSection.length <= budget)
|
|
43
|
+
return fullSection;
|
|
44
|
+
const headerStr = `
|
|
45
|
+
|
|
46
|
+
${header}
|
|
47
|
+
|
|
48
|
+
`;
|
|
49
|
+
const notice = truncationNotice(fileName);
|
|
50
|
+
const contentBudget = budget - headerStr.length - notice.length;
|
|
51
|
+
if (contentBudget > 0) {
|
|
52
|
+
return headerStr + content.slice(0, contentBudget) + notice;
|
|
53
|
+
}
|
|
54
|
+
return "";
|
|
55
|
+
}
|
|
56
|
+
var BOOTSTRAP_MAX_CHARS = 20000, BOOTSTRAP_TOTAL_MAX_CHARS = 120000, REPO_CLAUDE_MD_MAX_CHARS = 12000, truncationNotice = (file) => `
|
|
57
|
+
|
|
58
|
+
[...truncated, see /workspace/${file} for full content]
|
|
59
|
+
`, getBasePrompt = async (args) => {
|
|
60
|
+
const { role, agentId, swarmUrl, traits } = args;
|
|
61
|
+
const {
|
|
62
|
+
hasMcp = true,
|
|
63
|
+
hasLocalEnvironment: hasLocalEnv = true,
|
|
64
|
+
nativeSkillDiscovery = true
|
|
65
|
+
} = traits ?? {};
|
|
66
|
+
const steerModes = traits?.steerModes ?? [];
|
|
67
|
+
const vars = { role, agentId, swarmUrl };
|
|
68
|
+
let compositeEventType;
|
|
69
|
+
if (!hasMcp) {
|
|
70
|
+
compositeEventType = "system.session.worker.remote";
|
|
71
|
+
} else if (args.provider === "pi") {
|
|
72
|
+
compositeEventType = role === "lead" ? "system.session.lead.pi" : "system.session.worker.pi";
|
|
73
|
+
} else if (role === "lead") {
|
|
74
|
+
compositeEventType = "system.session.lead";
|
|
75
|
+
} else {
|
|
76
|
+
compositeEventType = "system.session.worker";
|
|
77
|
+
}
|
|
78
|
+
const compositeResult = await resolveTemplateAsync(compositeEventType, vars);
|
|
79
|
+
let prompt = compositeResult.text;
|
|
80
|
+
const scriptsOnly = args.scriptsOnly ?? process.env.SCRIPTS_ONLY_MCP === "true";
|
|
81
|
+
const scriptsOnlyMode = hasMcp && scriptsOnly;
|
|
82
|
+
if (scriptsOnlyMode) {
|
|
83
|
+
const scriptsOnlyResult = await resolveTemplateAsync("system.agent.scripts_only_mode", {});
|
|
84
|
+
prompt += `
|
|
85
|
+
${scriptsOnlyResult.text}`;
|
|
86
|
+
}
|
|
87
|
+
const slackPromptToolsEnabled = areSlackPromptToolsEnabled();
|
|
88
|
+
const serverHasCapability = (cap, whenUnknown) => args.serverCapabilities ? args.serverCapabilities.includes(cap) : whenUnknown;
|
|
89
|
+
if (hasMcp && slackPromptToolsEnabled && !scriptsOnlyMode && serverHasCapability("slack", true)) {
|
|
90
|
+
const slackResult = await resolveTemplateAsync("system.agent.slack", {});
|
|
91
|
+
prompt += slackResult.text;
|
|
92
|
+
}
|
|
93
|
+
if (role !== "lead" && args.slackContext && hasMcp && slackPromptToolsEnabled && (scriptsOnlyMode || serverHasCapability("slack", true))) {
|
|
94
|
+
const slackResult = await resolveTemplateAsync(scriptsOnlyMode ? "system.agent.scripts_only_mode.slack" : "system.agent.worker.slack", {
|
|
95
|
+
slackChannelId: args.slackContext.channelId,
|
|
96
|
+
slackThreadTs: args.slackContext.threadTs ?? ""
|
|
97
|
+
});
|
|
98
|
+
prompt += slackResult.text;
|
|
99
|
+
}
|
|
100
|
+
if (hasMcp && !scriptsOnlyMode && serverHasCapability("messaging", true)) {
|
|
101
|
+
const messagingResult = await resolveTemplateAsync("system.agent.messaging", {});
|
|
102
|
+
prompt += messagingResult.text;
|
|
103
|
+
}
|
|
104
|
+
if (hasMcp && isSteeringEnabled() && steerModes.length > 0 && !scriptsOnlyMode && serverHasCapability("core", true)) {
|
|
105
|
+
const steeringResult = await resolveTemplateAsync("system.agent.steering", {});
|
|
106
|
+
prompt += steeringResult.text;
|
|
107
|
+
}
|
|
108
|
+
if (!hasLocalEnv) {
|
|
109
|
+
prompt += `
|
|
110
|
+
|
|
111
|
+
## Your Identity
|
|
112
|
+
|
|
113
|
+
`;
|
|
114
|
+
if (args.name) {
|
|
115
|
+
prompt += `**Name:** ${args.name}
|
|
116
|
+
`;
|
|
117
|
+
if (args.description) {
|
|
118
|
+
prompt += `**Description:** ${args.description}
|
|
119
|
+
`;
|
|
120
|
+
}
|
|
121
|
+
prompt += `
|
|
122
|
+
`;
|
|
123
|
+
}
|
|
124
|
+
prompt += `You are part of an agent swarm managed by the Desplega platform. `;
|
|
125
|
+
prompt += `You receive tasks from the swarm's lead agent and execute them independently. `;
|
|
126
|
+
prompt += `Focus on quality work and clear communication of results.
|
|
127
|
+
`;
|
|
128
|
+
} else if (args.soulMd || args.identityMd || args.name) {
|
|
129
|
+
prompt += `
|
|
130
|
+
|
|
131
|
+
## Your Identity
|
|
132
|
+
|
|
133
|
+
`;
|
|
134
|
+
if (args.name) {
|
|
135
|
+
prompt += `**Name:** ${args.name}
|
|
136
|
+
`;
|
|
137
|
+
if (args.description) {
|
|
138
|
+
prompt += `**Description:** ${args.description}
|
|
139
|
+
`;
|
|
140
|
+
}
|
|
141
|
+
prompt += `
|
|
142
|
+
`;
|
|
143
|
+
}
|
|
144
|
+
if (args.soulMd) {
|
|
145
|
+
prompt += `${args.soulMd}
|
|
146
|
+
`;
|
|
147
|
+
}
|
|
148
|
+
if (args.identityMd) {
|
|
149
|
+
prompt += `${args.identityMd}
|
|
150
|
+
`;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
if (hasMcp && args.skillsSummary && args.skillsSummary.length > 0) {
|
|
154
|
+
const discovery = "To browse the full catalog use the `skill-list` MCP tool, find one by intent with `skill-search`, and read a skill's content with `skill-get`.";
|
|
155
|
+
if (nativeSkillDiscovery) {
|
|
156
|
+
const count = args.skillsSummary.length;
|
|
157
|
+
const where = hasLocalEnv ? "Your harness loads them from its skills directory (each skill is a folder with a SKILL.md — e.g. ~/.claude/skills/, ~/.codex/skills/, ~/.pi/agent/skills/, ~/.opencode/skills/) and most harnesses surface them natively." : "This session has no local skills directory, so reach them through the MCP tools.";
|
|
158
|
+
prompt += `
|
|
159
|
+
|
|
160
|
+
## Installed Skills
|
|
161
|
+
|
|
162
|
+
You have ${count} skill${count === 1 ? "" : "s"} installed. ${where} ${discovery}
|
|
163
|
+
`;
|
|
164
|
+
} else {
|
|
165
|
+
const summaries = args.skillsSummary.map((s) => `- ${hasLocalEnv ? "/" : ""}${s.name}: ${s.description}`).join(`
|
|
166
|
+
`);
|
|
167
|
+
const howTo = hasLocalEnv ? "To use one, read its SKILL.md from your skills directory and follow its instructions." : "To use one, read its content with the `skill-get` MCP tool and follow its instructions.";
|
|
168
|
+
prompt += `
|
|
169
|
+
|
|
170
|
+
## Installed Skills
|
|
171
|
+
|
|
172
|
+
The following skills are available. ${howTo}
|
|
173
|
+
|
|
174
|
+
${summaries}
|
|
175
|
+
|
|
176
|
+
${discovery}
|
|
177
|
+
`;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
if (hasMcp && args.mcpServersSummary) {
|
|
181
|
+
prompt += `
|
|
182
|
+
|
|
183
|
+
## Installed MCP Servers
|
|
184
|
+
|
|
185
|
+
The following MCP servers are configured for your use:
|
|
186
|
+
${args.mcpServersSummary}
|
|
187
|
+
`;
|
|
188
|
+
}
|
|
189
|
+
if (args.repoContext) {
|
|
190
|
+
prompt += `
|
|
191
|
+
|
|
192
|
+
## Repository Context
|
|
193
|
+
|
|
194
|
+
`;
|
|
195
|
+
if (args.repoContext.warning) {
|
|
196
|
+
prompt += `WARNING: ${args.repoContext.warning}
|
|
197
|
+
|
|
198
|
+
`;
|
|
199
|
+
}
|
|
200
|
+
if (hasLocalEnv) {
|
|
201
|
+
if (args.repoContext.claudeMd) {
|
|
202
|
+
prompt += `The following CLAUDE.md is from the repository cloned at \`${args.repoContext.clonePath}\`. `;
|
|
203
|
+
prompt += `**IMPORTANT: These instructions apply ONLY when working within the \`${args.repoContext.clonePath}\` directory.** `;
|
|
204
|
+
prompt += `Do NOT apply these rules to files outside that directory.
|
|
205
|
+
|
|
206
|
+
`;
|
|
207
|
+
prompt += `${truncateRepoClaudeMd(args.repoContext.claudeMd, args.repoContext.clonePath, REPO_CLAUDE_MD_MAX_CHARS)}
|
|
208
|
+
`;
|
|
209
|
+
} else if (!args.repoContext.warning) {
|
|
210
|
+
prompt += `Repository is cloned at \`${args.repoContext.clonePath}\` but has no CLAUDE.md file.
|
|
211
|
+
`;
|
|
212
|
+
}
|
|
213
|
+
if (args.repoContext.autoStashes && args.repoContext.autoStashes.length > 0) {
|
|
214
|
+
const stashes = args.repoContext.autoStashes.map((stash) => `- ${stash.ref}: ${stash.message}`).join(`
|
|
215
|
+
`);
|
|
216
|
+
prompt += `
|
|
217
|
+
Pending auto-stashed work exists in this repo:
|
|
218
|
+
${stashes}
|
|
219
|
+
Restore if relevant with \`git stash apply <ref>\` or \`git stash pop <ref>\`.
|
|
220
|
+
`;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
const g = args.repoContext.guidelines;
|
|
224
|
+
if (g === null || g === undefined) {
|
|
225
|
+
prompt += `
|
|
226
|
+
### Repository Guidelines
|
|
227
|
+
|
|
228
|
+
No repository guidelines defined. If you need to push code, ask the lead or user to define guidelines first.
|
|
229
|
+
`;
|
|
230
|
+
} else {
|
|
231
|
+
const hasAnyContent = g.prChecks.length > 0 || g.mergeChecks.length > 0 || g.review.length > 0 || g.allowMerge;
|
|
232
|
+
if (hasAnyContent) {
|
|
233
|
+
prompt += `
|
|
234
|
+
### Repository Guidelines (MANDATORY)
|
|
235
|
+
|
|
236
|
+
`;
|
|
237
|
+
if (g.prChecks.length > 0) {
|
|
238
|
+
prompt += `**PR Checks — Run ALL before pushing code or creating a PR:**
|
|
239
|
+
`;
|
|
240
|
+
g.prChecks.forEach((check, i) => {
|
|
241
|
+
prompt += `${i + 1}. \`${check}\`
|
|
242
|
+
`;
|
|
243
|
+
});
|
|
244
|
+
prompt += `If ANY check fails, fix the issue before pushing. Do NOT push code with failing checks.
|
|
245
|
+
Do NOT use \`--no-verify\` or any flag that bypasses git hooks.
|
|
246
|
+
|
|
247
|
+
`;
|
|
248
|
+
}
|
|
249
|
+
prompt += `**Merge Policy:**
|
|
250
|
+
`;
|
|
251
|
+
prompt += `- Auto-merge: ${g.allowMerge ? "Allowed" : "Not allowed (default)"}
|
|
252
|
+
`;
|
|
253
|
+
if (g.mergeChecks.length > 0) {
|
|
254
|
+
prompt += `- Before merging, verify:
|
|
255
|
+
`;
|
|
256
|
+
g.mergeChecks.forEach((check) => {
|
|
257
|
+
prompt += ` - ${check}
|
|
258
|
+
`;
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
prompt += `
|
|
262
|
+
`;
|
|
263
|
+
if (g.review.length > 0) {
|
|
264
|
+
prompt += `**Review Guidance:**
|
|
265
|
+
`;
|
|
266
|
+
g.review.forEach((item) => {
|
|
267
|
+
prompt += `- ${item}
|
|
268
|
+
`;
|
|
269
|
+
});
|
|
270
|
+
prompt += `
|
|
271
|
+
`;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
if (hasLocalEnv) {
|
|
277
|
+
let conditionalSuffix = "";
|
|
278
|
+
if (process.env.AGENT_FS_API_URL) {
|
|
279
|
+
const sharedOrgId = process.env.AGENT_FS_SHARED_ORG_ID || "YOUR_SHARED_ORG_ID";
|
|
280
|
+
const agentFsResult = await resolveTemplateAsync("system.agent.agent_fs", {
|
|
281
|
+
agentId,
|
|
282
|
+
sharedOrgId
|
|
283
|
+
});
|
|
284
|
+
conditionalSuffix += agentFsResult.text;
|
|
285
|
+
}
|
|
286
|
+
if (args.serverCapabilities ? args.serverCapabilities.includes("services") : !args.capabilities || args.capabilities.includes("services")) {
|
|
287
|
+
const servicesResult = await resolveTemplateAsync("system.agent.services", {
|
|
288
|
+
agentId,
|
|
289
|
+
swarmUrl
|
|
290
|
+
});
|
|
291
|
+
conditionalSuffix += servicesResult.text;
|
|
292
|
+
}
|
|
293
|
+
if (!args.capabilities || args.capabilities.includes("artifacts")) {
|
|
294
|
+
const artifactsResult = await resolveTemplateAsync("system.agent.artifacts", {});
|
|
295
|
+
conditionalSuffix += artifactsResult.text;
|
|
296
|
+
}
|
|
297
|
+
if (serverHasCapability("pages", !args.capabilities || args.capabilities.includes("pages"))) {
|
|
298
|
+
const appsResult = await resolveTemplateAsync("system.agent.apps", {});
|
|
299
|
+
conditionalSuffix += appsResult.text;
|
|
300
|
+
}
|
|
301
|
+
if (args.capabilities) {
|
|
302
|
+
conditionalSuffix += `
|
|
303
|
+
### Capabilities enabled for this agent:
|
|
304
|
+
|
|
305
|
+
- ${args.capabilities.join(`
|
|
306
|
+
- `)}
|
|
307
|
+
`;
|
|
308
|
+
}
|
|
309
|
+
const protectedLength = prompt.length + conditionalSuffix.length;
|
|
310
|
+
const totalBudget = Math.max(0, BOOTSTRAP_TOTAL_MAX_CHARS - protectedLength);
|
|
311
|
+
let totalUsed = 0;
|
|
312
|
+
if (args.claudeMd) {
|
|
313
|
+
const perSectionBudget = Math.min(BOOTSTRAP_MAX_CHARS, totalBudget - totalUsed);
|
|
314
|
+
const section = truncateSection(args.claudeMd, "## Agent Instructions", "CLAUDE.md", perSectionBudget);
|
|
315
|
+
prompt += section;
|
|
316
|
+
totalUsed += section.length;
|
|
317
|
+
}
|
|
318
|
+
if (args.toolsMd) {
|
|
319
|
+
const perSectionBudget = Math.min(BOOTSTRAP_MAX_CHARS, totalBudget - totalUsed);
|
|
320
|
+
const section = truncateSection(args.toolsMd, "## Your Tools & Capabilities", "TOOLS.md", perSectionBudget);
|
|
321
|
+
prompt += section;
|
|
322
|
+
totalUsed += section.length;
|
|
323
|
+
}
|
|
324
|
+
prompt += conditionalSuffix;
|
|
325
|
+
}
|
|
326
|
+
return prompt;
|
|
327
|
+
};
|
|
328
|
+
var init_base_prompt = __esm(() => {
|
|
329
|
+
init_steering_enabled();
|
|
330
|
+
init_resolver();
|
|
331
|
+
init_session_templates();
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
// src/utils/identity-field-budget.ts
|
|
335
|
+
function checkIdentityFieldBudget({
|
|
336
|
+
field,
|
|
337
|
+
currentValue,
|
|
338
|
+
nextValue
|
|
339
|
+
}) {
|
|
340
|
+
const budget = IDENTITY_FIELD_BUDGETS[field];
|
|
341
|
+
if (nextValue.length <= budget || nextValue.length <= currentValue.length) {
|
|
342
|
+
return { ok: true };
|
|
343
|
+
}
|
|
344
|
+
const delta = nextValue.length - currentValue.length;
|
|
345
|
+
const remediation = field === "toolsMd" ? ` Content past the ${budget}-character cap is already silently dropped at read time, so shrinking that tail loses nothing sessions currently receive. Move durable content into memories and keep pointers to it in this field.` : field === "claudeMd" ? ` The tail past the ${budget}-character cap is dropped from the base prompt and only reaches harnesses with a native CLAUDE.md loader. Move durable content into memories and keep pointers to it in this field.` : " Move durable content into memories and keep pointers to it in this field.";
|
|
346
|
+
return {
|
|
347
|
+
ok: false,
|
|
348
|
+
field,
|
|
349
|
+
dbSize: currentValue.length,
|
|
350
|
+
diskSize: nextValue.length,
|
|
351
|
+
budget,
|
|
352
|
+
delta,
|
|
353
|
+
reason: `Update rejected for ${field}: current size ${currentValue.length} characters, ` + `budget ${budget} characters, delta ${delta >= 0 ? "+" : ""}${delta} characters.` + remediation
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
var SOUL_MD_MAX_CHARS = 1e4, IDENTITY_MD_MAX_CHARS = 1e4, IDENTITY_FIELD_BUDGETS, IdentityFieldBudgetError;
|
|
357
|
+
var init_identity_field_budget = __esm(() => {
|
|
358
|
+
init_base_prompt();
|
|
359
|
+
IDENTITY_FIELD_BUDGETS = {
|
|
360
|
+
soulMd: SOUL_MD_MAX_CHARS,
|
|
361
|
+
identityMd: IDENTITY_MD_MAX_CHARS,
|
|
362
|
+
claudeMd: BOOTSTRAP_MAX_CHARS,
|
|
363
|
+
toolsMd: BOOTSTRAP_MAX_CHARS
|
|
364
|
+
};
|
|
365
|
+
IdentityFieldBudgetError = class IdentityFieldBudgetError extends Error {
|
|
366
|
+
rejection;
|
|
367
|
+
dbHash;
|
|
368
|
+
diskHash;
|
|
369
|
+
constructor(rejection, dbHash, diskHash) {
|
|
370
|
+
super(rejection.reason);
|
|
371
|
+
this.rejection = rejection;
|
|
372
|
+
this.dbHash = dbHash;
|
|
373
|
+
this.diskHash = diskHash;
|
|
374
|
+
this.name = "IdentityFieldBudgetError";
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
// src/commands/templates.ts
|
|
380
|
+
var init_templates = __esm(() => {
|
|
381
|
+
init_registry();
|
|
382
|
+
registerTemplate({
|
|
383
|
+
eventType: "task.trigger.assigned",
|
|
384
|
+
header: "",
|
|
385
|
+
defaultBody: `{{work_on_task_cmd}} {{task_id}}{{task_desc_section}}{{attachments_section}}{{output_instructions}}`,
|
|
386
|
+
variables: [
|
|
387
|
+
{ name: "work_on_task_cmd", description: "Formatted /work-on-task command" },
|
|
388
|
+
{ name: "task_id", description: "Task ID" },
|
|
389
|
+
{ name: "task_desc_section", description: "Task description section or empty string" },
|
|
390
|
+
{
|
|
391
|
+
name: "attachments_section",
|
|
392
|
+
description: "Ready-to-run fetch recipe per task attachment (or empty string if none) — lets the agent download an attachment in one call instead of discovering the path/provider itself"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
name: "output_instructions",
|
|
396
|
+
description: "Output format instructions (with outputSchema if present, or generic store-progress)"
|
|
397
|
+
}
|
|
398
|
+
],
|
|
399
|
+
category: "task_lifecycle"
|
|
400
|
+
});
|
|
401
|
+
registerTemplate({
|
|
402
|
+
eventType: "task.trigger.offered",
|
|
403
|
+
header: "",
|
|
404
|
+
defaultBody: `{{review_offered_task_cmd}} {{task_id}}{{task_desc_section}}
|
|
405
|
+
|
|
406
|
+
Accept if you have capacity and skills. Reject with a reason if you cannot handle it.`,
|
|
407
|
+
variables: [
|
|
408
|
+
{ name: "review_offered_task_cmd", description: "Formatted /review-offered-task command" },
|
|
409
|
+
{ name: "task_id", description: "Task ID" },
|
|
410
|
+
{ name: "task_desc_section", description: "Task description section or empty string" }
|
|
411
|
+
],
|
|
412
|
+
category: "task_lifecycle"
|
|
413
|
+
});
|
|
414
|
+
registerTemplate({
|
|
415
|
+
eventType: "task.profile_sync_rejection",
|
|
416
|
+
header: "",
|
|
417
|
+
defaultBody: `=== PERSISTED PROFILE SYNC REJECTION ===
|
|
418
|
+
A {{timestamp}} sync of {{field_label}} did not reach the database. Disk size: {{disk_size}}; DB size: {{db_size}}; budget: {{budget}}; delta: {{delta}}.
|
|
419
|
+
Audit event: {{event_id}}. {{recovery_guidance}}
|
|
420
|
+
=== END PROFILE SYNC REJECTION ===
|
|
421
|
+
|
|
422
|
+
`,
|
|
423
|
+
variables: [
|
|
424
|
+
{ name: "timestamp", description: "UTC timestamp of the rejected sync" },
|
|
425
|
+
{ name: "field_label", description: "Profile field and its harness-specific file path" },
|
|
426
|
+
{ name: "disk_size", description: "Rejected local file size" },
|
|
427
|
+
{ name: "db_size", description: "Stored database field size" },
|
|
428
|
+
{ name: "budget", description: "Configured field budget" },
|
|
429
|
+
{ name: "delta", description: "Signed size delta" },
|
|
430
|
+
{ name: "event_id", description: "Persisted audit event ID" },
|
|
431
|
+
{ name: "recovery_guidance", description: "Accurate field-specific recovery instructions" }
|
|
432
|
+
],
|
|
433
|
+
category: "task_lifecycle"
|
|
434
|
+
});
|
|
435
|
+
registerTemplate({
|
|
436
|
+
eventType: "task.trigger.unread_mentions",
|
|
437
|
+
header: "",
|
|
438
|
+
defaultBody: `You have {{mention_count}} mention(s) in chat channels.
|
|
439
|
+
|
|
440
|
+
1. Use \`read-messages\` with unreadOnly: true to see them
|
|
441
|
+
2. Respond to questions or requests directed at you
|
|
442
|
+
3. If a message requires work, create a task using \`send-task\``,
|
|
443
|
+
variables: [{ name: "mention_count", description: "Number of unread mentions or 'unread'" }],
|
|
444
|
+
category: "task_lifecycle"
|
|
445
|
+
});
|
|
446
|
+
registerTemplate({
|
|
447
|
+
eventType: "task.trigger.pool_available",
|
|
448
|
+
header: "",
|
|
449
|
+
defaultBody: `{{task_count}} task(s) available in the pool.
|
|
450
|
+
|
|
451
|
+
1. Run \`get-tasks\` with unassigned: true to browse
|
|
452
|
+
2. Pick one matching your skills
|
|
453
|
+
3. Run \`task-action\` with action: "claim" and taskId: "<id>"
|
|
454
|
+
|
|
455
|
+
Note: Claims are first-come-first-serve. If claim fails, pick another.`,
|
|
456
|
+
variables: [{ name: "task_count", description: "Number of available pool tasks" }],
|
|
457
|
+
category: "task_lifecycle"
|
|
458
|
+
});
|
|
459
|
+
registerTemplate({
|
|
460
|
+
eventType: "task.trigger.channel_activity",
|
|
461
|
+
header: "",
|
|
462
|
+
defaultBody: `## Slack Channel Activity
|
|
463
|
+
|
|
464
|
+
{{message_count}} new message(s) in monitored Slack channels:
|
|
465
|
+
|
|
466
|
+
{{messages_detail}}
|
|
467
|
+
## Your Task
|
|
468
|
+
|
|
469
|
+
Review these messages and decide if any require action:
|
|
470
|
+
1. If a message is a question or request, respond using \`slack-reply\` or create a task with \`send-task\`
|
|
471
|
+
2. If a message is informational, no action needed
|
|
472
|
+
3. Use \`slack-read\` with the channelId to get more context if needed`,
|
|
473
|
+
variables: [
|
|
474
|
+
{ name: "message_count", description: "Number of new messages" },
|
|
475
|
+
{
|
|
476
|
+
name: "messages_detail",
|
|
477
|
+
description: "Formatted list of messages with channel and user info"
|
|
478
|
+
}
|
|
479
|
+
],
|
|
480
|
+
category: "task_lifecycle"
|
|
481
|
+
});
|
|
482
|
+
registerTemplate({
|
|
483
|
+
eventType: "task.resumption.with_progress",
|
|
484
|
+
header: "",
|
|
485
|
+
defaultBody: `{{work_on_task_cmd}} {{task_id}}
|
|
486
|
+
|
|
487
|
+
**RESUMED TASK** - This task was interrupted during a deployment and is being resumed.
|
|
488
|
+
|
|
489
|
+
Task: "{{task_description}}"
|
|
490
|
+
|
|
491
|
+
Previous Progress:
|
|
492
|
+
{{progress}}
|
|
493
|
+
|
|
494
|
+
Continue from where you left off. Review the progress above and complete the remaining work.{{completion_instructions}}`,
|
|
495
|
+
variables: [
|
|
496
|
+
{ name: "work_on_task_cmd", description: "Formatted /work-on-task command" },
|
|
497
|
+
{ name: "task_id", description: "Task ID" },
|
|
498
|
+
{ name: "task_description", description: "Original task description" },
|
|
499
|
+
{ name: "progress", description: "Previous progress text" },
|
|
500
|
+
{
|
|
501
|
+
name: "completion_instructions",
|
|
502
|
+
description: "Completion instructions (empty for providers without MCP)"
|
|
503
|
+
}
|
|
504
|
+
],
|
|
505
|
+
category: "task_lifecycle"
|
|
506
|
+
});
|
|
507
|
+
registerTemplate({
|
|
508
|
+
eventType: "task.resumption.no_progress",
|
|
509
|
+
header: "",
|
|
510
|
+
defaultBody: `{{work_on_task_cmd}} {{task_id}}
|
|
511
|
+
|
|
512
|
+
**RESUMED TASK** - This task was interrupted during a deployment and is being resumed.
|
|
513
|
+
|
|
514
|
+
Task: "{{task_description}}"
|
|
515
|
+
|
|
516
|
+
No progress was saved before the interruption. Start the task fresh but be aware files may have been partially modified.{{completion_instructions}}`,
|
|
517
|
+
variables: [
|
|
518
|
+
{ name: "work_on_task_cmd", description: "Formatted /work-on-task command" },
|
|
519
|
+
{ name: "task_id", description: "Task ID" },
|
|
520
|
+
{ name: "task_description", description: "Original task description" },
|
|
521
|
+
{
|
|
522
|
+
name: "completion_instructions",
|
|
523
|
+
description: "Completion instructions (empty for providers without MCP)"
|
|
524
|
+
}
|
|
525
|
+
],
|
|
526
|
+
category: "task_lifecycle"
|
|
527
|
+
});
|
|
528
|
+
});
|
|
529
|
+
|
|
530
|
+
export { getBasePrompt, init_base_prompt, IDENTITY_FIELD_BUDGETS, checkIdentityFieldBudget, IdentityFieldBudgetError, init_identity_field_budget, init_templates };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
contentSha256,
|
|
3
3
|
init_profile_sync
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-492e7ap5.js";
|
|
5
5
|
import {
|
|
6
6
|
getDb,
|
|
7
7
|
init_db,
|
|
8
8
|
isSqliteVecAvailable
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-m07313tr.js";
|
|
10
10
|
import {
|
|
11
11
|
__esm,
|
|
12
12
|
__export,
|
|
13
13
|
__toCommonJS
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-pq2ee5ja.js";
|
|
15
15
|
|
|
16
16
|
// src/be/memory/constants.ts
|
|
17
17
|
function numEnv(key, fallback) {
|
|
@@ -6608,10 +6608,10 @@ var init_reranker = __esm(() => {
|
|
|
6608
6608
|
// src/be/memory/providers/sqlite-store.ts
|
|
6609
6609
|
var exports_sqlite_store = {};
|
|
6610
6610
|
__export(exports_sqlite_store, {
|
|
6611
|
-
|
|
6612
|
-
computeRrfScore: () => computeRrfScore,
|
|
6611
|
+
SqliteMemoryStore: () => SqliteMemoryStore,
|
|
6613
6612
|
applyEditMode: () => applyEditMode,
|
|
6614
|
-
|
|
6613
|
+
computeRrfScore: () => computeRrfScore,
|
|
6614
|
+
rowToCandidate: () => rowToCandidate
|
|
6615
6615
|
});
|
|
6616
6616
|
function rowToAgentMemory(row) {
|
|
6617
6617
|
return {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_tslib
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-g814jbst.js";
|
|
4
4
|
import {
|
|
5
5
|
require_serde
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-c5ddbdfj.js";
|
|
7
7
|
import {
|
|
8
8
|
__commonJS,
|
|
9
9
|
__require
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-pq2ee5ja.js";
|
|
11
11
|
|
|
12
12
|
// node_modules/@smithy/is-array-buffer/dist-cjs/index.js
|
|
13
|
-
var require_dist_cjs = __commonJS((exports, module)
|
|
13
|
+
var require_dist_cjs = __commonJS(function(exports, module) {
|
|
14
14
|
var __defProp = Object.defineProperty;
|
|
15
15
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
16
16
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -38,7 +38,7 @@ var require_dist_cjs = __commonJS((exports, module) => {
|
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
// node_modules/@smithy/util-buffer-from/dist-cjs/index.js
|
|
41
|
-
var require_dist_cjs2 = __commonJS((exports, module)
|
|
41
|
+
var require_dist_cjs2 = __commonJS(function(exports, module) {
|
|
42
42
|
var __defProp = Object.defineProperty;
|
|
43
43
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
44
44
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -80,7 +80,7 @@ var require_dist_cjs2 = __commonJS((exports, module) => {
|
|
|
80
80
|
});
|
|
81
81
|
|
|
82
82
|
// node_modules/@smithy/util-utf8/dist-cjs/index.js
|
|
83
|
-
var require_dist_cjs3 = __commonJS((exports, module)
|
|
83
|
+
var require_dist_cjs3 = __commonJS(function(exports, module) {
|
|
84
84
|
var __defProp = Object.defineProperty;
|
|
85
85
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
86
86
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -132,7 +132,7 @@ var require_dist_cjs3 = __commonJS((exports, module) => {
|
|
|
132
132
|
});
|
|
133
133
|
|
|
134
134
|
// node_modules/@aws-crypto/util/build/main/convertToBuffer.js
|
|
135
|
-
var require_convertToBuffer = __commonJS((exports)
|
|
135
|
+
var require_convertToBuffer = __commonJS(function(exports) {
|
|
136
136
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
137
137
|
exports.convertToBuffer = undefined;
|
|
138
138
|
var util_utf8_1 = require_dist_cjs3();
|
|
@@ -154,7 +154,7 @@ var require_convertToBuffer = __commonJS((exports) => {
|
|
|
154
154
|
});
|
|
155
155
|
|
|
156
156
|
// node_modules/@aws-crypto/util/build/main/isEmptyData.js
|
|
157
|
-
var require_isEmptyData = __commonJS((exports)
|
|
157
|
+
var require_isEmptyData = __commonJS(function(exports) {
|
|
158
158
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
159
159
|
exports.isEmptyData = undefined;
|
|
160
160
|
function isEmptyData(data) {
|
|
@@ -167,7 +167,7 @@ var require_isEmptyData = __commonJS((exports) => {
|
|
|
167
167
|
});
|
|
168
168
|
|
|
169
169
|
// node_modules/@aws-crypto/util/build/main/numToUint8.js
|
|
170
|
-
var require_numToUint8 = __commonJS((exports)
|
|
170
|
+
var require_numToUint8 = __commonJS(function(exports) {
|
|
171
171
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
172
172
|
exports.numToUint8 = undefined;
|
|
173
173
|
function numToUint8(num) {
|
|
@@ -182,7 +182,7 @@ var require_numToUint8 = __commonJS((exports) => {
|
|
|
182
182
|
});
|
|
183
183
|
|
|
184
184
|
// node_modules/@aws-crypto/util/build/main/uint32ArrayFrom.js
|
|
185
|
-
var require_uint32ArrayFrom = __commonJS((exports)
|
|
185
|
+
var require_uint32ArrayFrom = __commonJS(function(exports) {
|
|
186
186
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
187
187
|
exports.uint32ArrayFrom = undefined;
|
|
188
188
|
function uint32ArrayFrom(a_lookUpTable) {
|
|
@@ -201,7 +201,7 @@ var require_uint32ArrayFrom = __commonJS((exports) => {
|
|
|
201
201
|
});
|
|
202
202
|
|
|
203
203
|
// node_modules/@aws-crypto/util/build/main/index.js
|
|
204
|
-
var require_main = __commonJS((exports)
|
|
204
|
+
var require_main = __commonJS(function(exports) {
|
|
205
205
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
206
206
|
exports.uint32ArrayFrom = exports.numToUint8 = exports.isEmptyData = exports.convertToBuffer = undefined;
|
|
207
207
|
var convertToBuffer_1 = require_convertToBuffer();
|
|
@@ -223,7 +223,7 @@ var require_main = __commonJS((exports) => {
|
|
|
223
223
|
});
|
|
224
224
|
|
|
225
225
|
// node_modules/@aws-crypto/crc32/build/main/aws_crc32.js
|
|
226
|
-
var require_aws_crc32 = __commonJS((exports)
|
|
226
|
+
var require_aws_crc32 = __commonJS(function(exports) {
|
|
227
227
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
228
228
|
exports.AwsCrc32 = undefined;
|
|
229
229
|
var tslib_1 = require_tslib();
|
|
@@ -254,7 +254,7 @@ var require_aws_crc32 = __commonJS((exports) => {
|
|
|
254
254
|
});
|
|
255
255
|
|
|
256
256
|
// node_modules/@aws-crypto/crc32/build/main/index.js
|
|
257
|
-
var require_main2 = __commonJS((exports)
|
|
257
|
+
var require_main2 = __commonJS(function(exports) {
|
|
258
258
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
259
259
|
exports.AwsCrc32 = exports.Crc32 = exports.crc32 = undefined;
|
|
260
260
|
var tslib_1 = require_tslib();
|
|
@@ -559,7 +559,7 @@ var require_main2 = __commonJS((exports) => {
|
|
|
559
559
|
});
|
|
560
560
|
|
|
561
561
|
// node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js
|
|
562
|
-
var require_event_streams = __commonJS((exports)
|
|
562
|
+
var require_event_streams = __commonJS(function(exports) {
|
|
563
563
|
var crc32 = require_main2();
|
|
564
564
|
var serde = require_serde();
|
|
565
565
|
var node_stream = __require("node:stream");
|