@desplega.ai/agent-swarm 1.166.0 → 1.168.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acp-adapter-zhejfecx.js +34 -0
- package/dist/{actions-qz3m692w.js → actions-7jg840nr.js} +25 -25
- package/dist/{amp-adapter-j1xbmsqz.js → amp-adapter-ye6rnetm.js} +4 -4
- package/dist/{anthropic-messages-hst62ws9.js → anthropic-messages-13yn502s.js} +4 -4
- package/dist/{app-43vrdmv8.js → app-ffes2kyf.js} +10 -9
- package/dist/{assistant-ertffmka.js → assistant-fhm5smyz.js} +26 -26
- package/dist/{azure-openai-responses-mh8tvf78.js → azure-openai-responses-9st34pfz.js} +5 -5
- package/dist/{boot-reembed-998jtpdg.js → boot-reembed-20q3nzvg.js} +9 -8
- package/dist/{boot-reembed-s7k7c6v2.js → boot-reembed-jvfadhsk.js} +9 -8
- package/dist/{boot-scrub-sweep-nepsk4t1.js → boot-scrub-sweep-jtfajzve.js} +10 -9
- package/dist/{boot-seeds-vvzs1zhk.js → boot-seeds-9qt0j8j2.js} +12 -11
- package/dist/{claude-adapter-2zvmekrp.js → claude-adapter-a8znhthz.js} +24 -22
- package/dist/{claude-managed-adapter-s49wbk8t.js → claude-managed-adapter-tzwxy803.js} +4 -4
- package/dist/{claude-managed-setup-cvhqq8qn.js → claude-managed-setup-nrhfx5b0.js} +3 -3
- package/dist/{claude-sdk-session-kkbxtw5q.js → claude-sdk-session-7x7chdrs.js} +7608 -7596
- package/dist/{cli-zsh093hk.js → cli-014vns2y.js} +63 -1
- package/dist/{cli-8kgvmkak.js → cli-0jngabtb.js} +1 -1
- package/dist/{cli-qvfk83fy.js → cli-13xwcqvj.js} +2 -2
- package/dist/{cli-0nhdwxd5.js → cli-43jg9xdw.js} +3 -3
- package/dist/{cli-cpfmqz3n.js → cli-47zfzshm.js} +5 -5
- package/dist/{cli-zy7vwsne.js → cli-5qkcdv8c.js} +16 -9
- package/dist/{cli-cwxhbf43.js → cli-5t5my0h8.js} +85 -2
- package/dist/{cli-y59h2pk9.js → cli-69egj654.js} +1 -1
- package/dist/{cli-68r1j4sg.js → cli-6bpvv8h4.js} +3 -3
- package/dist/{cli-yshaazs1.js → cli-74ez9b66.js} +63 -20
- package/dist/{cli-32bca7nr.js → cli-7avy4v8w.js} +1 -1
- package/dist/{cli-f2n17zhp.js → cli-7mhy3ths.js} +21 -18
- package/dist/{cli-q38n4bq0.js → cli-95zs84qw.js} +3 -3
- package/dist/{cli-fn697bnt.js → cli-9q0bh411.js} +21 -8
- package/dist/{cli-rggdq8wq.js → cli-9q24yyvs.js} +3 -3
- package/dist/cli-a35hzdve.js +33 -0
- package/dist/{cli-3qn4r334.js → cli-aj1e0h0d.js} +20 -14
- package/dist/{cli-rsy933yz.js → cli-bcspch6h.js} +30 -19
- package/dist/{cli-x3x0qwky.js → cli-bxqez1p0.js} +51 -23
- package/dist/{cli-ng97fjq7.js → cli-cmxkbzzs.js} +33 -7
- package/dist/{cli-df56tqdw.js → cli-ee0402n1.js} +198 -70
- package/dist/{cli-mwegs4af.js → cli-ew0c3a1j.js} +3 -3
- package/dist/{cli-ysnyhws9.js → cli-ewhwpyrb.js} +54 -51
- package/dist/{cli-j2jbr8af.js → cli-fhj4y16f.js} +1 -1
- package/dist/{cli-8t229cmr.js → cli-fqq06kkb.js} +30 -17
- package/dist/{cli-jvj6a0cv.js → cli-g6gx2dn1.js} +54 -19
- package/dist/{cli-nexwh8zg.js → cli-g7k7zbcz.js} +12 -5
- package/dist/{cli-ecknp7p1.js → cli-j05x7pnb.js} +10 -10
- package/dist/{cli-gt8azyet.js → cli-jb931ba2.js} +1 -1
- package/dist/{cli-nvvfd8bq.js → cli-jbzbr36n.js} +4091 -3793
- package/dist/{cli-3ddybbbx.js → cli-jvmtxqtc.js} +26 -14
- package/dist/{cli-pkke6geq.js → cli-km4x66j0.js} +83 -65
- package/dist/{cli-b0f70z24.js → cli-mn8qkd8v.js} +1 -1
- package/dist/{cli-0qjcsxgz.js → cli-nctfv2yy.js} +99 -9
- package/dist/{cli-4r1sjfc4.js → cli-ng1pmdx6.js} +10 -10
- package/dist/cli-nkqjj42q.js +104 -0
- package/dist/{cli-aqcey741.js → cli-p5jqk8fr.js} +1 -1
- package/dist/{cli-66zh26sp.js → cli-pgehz8e1.js} +57 -17
- package/dist/cli-q1vnz8wv.js +96 -0
- package/dist/{cli-fj86xr3c.js → cli-qd97v6z2.js} +2 -2
- package/dist/{cli-p4ztb80h.js → cli-r7eeddkq.js} +13 -8
- package/dist/{cli-8ssjez7e.js → cli-rhy7z1rp.js} +22 -11
- package/dist/{cli-vzc73wet.js → cli-rr5z1j4p.js} +87 -69
- package/dist/{cli-4mevd1hf.js → cli-s9y81s7j.js} +5 -5
- package/dist/{cli-dw2q9f7g.js → cli-svah6b6w.js} +4 -4
- package/dist/{cli-h3x613ze.js → cli-tc5zec7v.js} +6 -6
- package/dist/{cli-ttbsse3f.js → cli-tmhsxhb8.js} +1 -1
- package/dist/{cli-feh3dkah.js → cli-v1w7pbd8.js} +2 -1
- package/dist/{cli-10zmp1p7.js → cli-vr5avem2.js} +27 -32
- package/dist/{cli-bzr0ftht.js → cli-wnb9b2g3.js} +19 -0
- package/dist/{cli-krqm5f11.js → cli-xezn9nkh.js} +16 -13
- package/dist/{cli-8kt0bmgx.js → cli-xf713zz0.js} +2 -2
- package/dist/{cli-6zcfw0x7.js → cli-y195hv1a.js} +1 -1
- package/dist/{cli-x7kpr72a.js → cli-ytmmyj7f.js} +2 -2
- package/dist/{cli-v2a8x45d.js → cli-z48ggfyq.js} +11 -6
- package/dist/{cli-qbksc292.js → cli-zy39d433.js} +2 -0
- package/dist/cli.js +28 -28
- package/dist/{cloudflare-workers-ai-system-one-tt484t61.js → cloudflare-workers-ai-system-one-sta45jf9.js} +7 -5
- package/dist/{codex-adapter-dw1wxqt8.js → codex-adapter-n63k33d3.js} +18 -18
- package/dist/{codex-login-terbdsqq.js → codex-login-g1cyt5zm.js} +1 -1
- package/dist/{codex-session-runner-3cgb8y1g.js → codex-session-runner-xkxfd81a.js} +18 -18
- package/dist/{commands-mhxam6z2.js → commands-q4mfhn51.js} +9 -8
- package/dist/{cursor-adapter-2qda3st7.js → cursor-adapter-v8mm6bp5.js} +5 -5
- package/dist/{db-sjks418k.js → db-1t0bj3pc.js} +9 -8
- package/dist/{dispatcher-1es759rn.js → dispatcher-k1fhavcf.js} +24 -24
- package/dist/{dsh-adapter-bek4cyw9.js → dsh-adapter-5423p70m.js} +5 -5
- package/dist/{easter-egg-3d-mtpnw06s.js → easter-egg-3d-66zxervv.js} +2 -2
- package/dist/{execute-s4ccjq3n.js → execute-h4jgevyw.js} +61 -11
- package/dist/{google-generative-ai-d6nphg3q.js → google-generative-ai-b8zxrpax.js} +5 -5
- package/dist/{google-vertex-cpshkref.js → google-vertex-nrdd697t.js} +5 -5
- package/dist/{grok-adapter-ar9cw9jg.js → grok-adapter-phrndeb8.js} +18 -8
- package/dist/{handlers-1gkbhktr.js → handlers-59ywqwzh.js} +27 -27
- package/dist/{hook-vxa3tcsy.js → hook-atj0swc2.js} +14 -14
- package/dist/{hook-ds2zxq9v.js → hook-mew1chq9.js} +42 -31
- package/dist/{http-3h21z9md.js → http-ef2fnn9v.js} +953 -98
- package/dist/{index-n99fycq7.js → index-48pb9erw.js} +24 -24
- package/dist/{index-bn6cy8ps.js → index-9fc2h7ww.js} +24 -24
- package/dist/{index-9b65j1m5.js → index-gr69c43q.js} +9 -8
- package/dist/{index-f8xnqrye.js → index-h26wjcfy.js} +43 -24
- package/dist/{index-dkfxpkmm.js → index-w2yhye23.js} +25 -25
- package/dist/{keepalive-3xspa9jw.js → keepalive-qhcqz56v.js} +11 -10
- package/dist/{lead-6qphc124.js → lead-hpk5r3b1.js} +47 -47
- package/dist/{llama-cpp-classify-tgj35k8d.js → llama-cpp-classify-6erb7wwv.js} +3 -1
- package/dist/{maintenance-0teem1bb.js → maintenance-nvkyp2xe.js} +9 -8
- package/dist/{mistral-conversations-8445ddjn.js → mistral-conversations-059y51zt.js} +4 -4
- package/dist/{node-9sg7ajby.js → node-qm9eb6z0.js} +1 -1
- package/dist/{oauth-refresh-sweep-sh9q25xp.js → oauth-refresh-sweep-ngskthwh.js} +10 -9
- package/dist/{onboard-54qmnqxe.js → onboard-yfnkqhxc.js} +2 -2
- package/dist/{openai-codex-responses-9ynm88zy.js → openai-codex-responses-jzxkta9b.js} +8 -7
- package/dist/{openai-completions-nhqwjmaw.js → openai-completions-663yncfq.js} +4 -4
- package/dist/openai-decisions-vj9nkpf8.js +162 -0
- package/dist/{openai-responses-xx1c4kgm.js → openai-responses-m3g43rrt.js} +5 -5
- package/dist/{opencode-adapter-wjfa2wvd.js → opencode-adapter-yjyqynzf.js} +7 -7
- package/dist/{openrouter-images-8yx3487g.js → openrouter-images-kr60n6b9.js} +1 -1
- package/dist/{otel-impl-ycqzp2a1.js → otel-impl-hhm64r6m.js} +1 -1
- package/dist/{pi-messages-vxdt8v7j.js → pi-messages-xszk613n.js} +1 -1
- package/dist/{pi-mono-adapter-e77e9zst.js → pi-mono-adapter-0eg8kw2c.js} +68 -51
- package/dist/{pricing-refresh-atnkngqs.js → pricing-refresh-35f91nx2.js} +11 -10
- package/dist/{rbac-roles-j78wdksm.js → rbac-roles-97w370qj.js} +10 -9
- package/dist/{rbac-roles-9pjphh9q.js → rbac-roles-z6sje3gy.js} +9 -8
- package/dist/{render-v2-pxjs49fx.js → render-v2-n4v66bj3.js} +10 -9
- package/dist/{runtime-v2t1r79e.js → runtime-h9ha1mq6.js} +4 -4
- package/dist/{setup-ymej0xtx.js → setup-m3hhyv5f.js} +2 -2
- package/dist/{typesafe-system-one-datfr82p.js → typesafe-system-one-e988vty7.js} +7 -5
- package/dist/{virtual-modules-wm8mxdxx.js → virtual-modules-ftr9kwe8.js} +11 -11
- package/dist/{work-objects-3nh4ymzb.js → work-objects-mxf2c842.js} +27 -27
- package/dist/{worker-qa9fkz5s.js → worker-9t07z1gq.js} +47 -47
- package/openapi.json +72 -1
- package/package.json +10 -10
- package/src/be/memory/providers/openai-embedding.ts +7 -2
- package/src/be/memory/raters/llm-summarizer.ts +7 -2
- package/src/be/modelsdev-cache.json +61 -0
- package/src/be/script-connections.ts +40 -6
- package/src/be/seed-pricing.ts +84 -53
- package/src/be/swarm-config-guard.ts +14 -0
- package/src/commands/provider-credentials.ts +28 -5
- package/src/commands/runner.ts +7 -12
- package/src/extensions/catalog.generated.json +17 -0
- package/src/heartbeat/heartbeat.ts +91 -19
- package/src/hooks/hook.ts +72 -27
- package/src/http/mcp.ts +5 -0
- package/src/http/onboarding.ts +2 -0
- package/src/http/script-connections.ts +35 -0
- package/src/providers/acp-targets.ts +10 -5
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/claude-adapter.ts +32 -0
- package/src/providers/claude-background-keepalive.ts +100 -0
- package/src/providers/claude-sdk-session.ts +6 -0
- package/src/providers/codex-adapter.ts +30 -3
- package/src/providers/codex-oauth/auth-json.ts +21 -4
- package/src/providers/codex-oauth/types.ts +2 -0
- package/src/providers/dsh-adapter.ts +11 -2
- package/src/providers/grok-adapter.ts +18 -2
- package/src/providers/opencode-adapter.ts +21 -5
- package/src/providers/pi-mono-extension.ts +56 -25
- package/src/providers/pricing-sources.md +2 -0
- package/src/scheduler/scheduler.ts +82 -13
- package/src/scripts-runtime/executors/registry.ts +1 -1
- package/src/server.ts +63 -3
- package/src/tests/acp-adapter.test.ts +152 -12
- package/src/tests/ci-unit-test-report.test.ts +73 -0
- package/src/tests/claude-background-keepalive-wiring.test.ts +220 -0
- package/src/tests/claude-background-keepalive.fixture.ts +162 -0
- package/src/tests/claude-background-keepalive.test.ts +139 -0
- package/src/tests/claude-default-route.test.ts +75 -0
- package/src/tests/claude-hook-output.test.ts +233 -0
- package/src/tests/codex-adapter-pool-auth-revalidate.test.ts +4 -2
- package/src/tests/codex-adapter.test.ts +166 -26
- package/src/tests/codex-oauth-auth-timestamps.test.ts +76 -0
- package/src/tests/codex-oauth.test.ts +4 -1
- package/src/tests/connection-embedded-auth.test.ts +51 -0
- package/src/tests/context-window.test.ts +2 -2
- package/src/tests/credential-check.test.ts +51 -1
- package/src/tests/docs-index-footprint.test.js +3 -3
- package/src/tests/dsh-adapter.test.ts +24 -2
- package/src/tests/enabled-tools.test.ts +269 -0
- package/src/tests/entrypoint-codex-oauth-seed.test.ts +12 -0
- package/src/tests/extensions-catalog.test.ts +1 -0
- package/src/tests/extensions-example-slack-reply-gate.test.ts +756 -0
- package/src/tests/grok-adapter.test.ts +13 -0
- package/src/tests/haiku-5-5-pricing.test.ts +38 -0
- package/src/tests/heartbeat-checklist.test.ts +158 -1
- package/src/tests/onboarding.test.ts +44 -0
- package/src/tests/opencode-adapter.test.ts +66 -3
- package/src/tests/opencode-plugin.test.ts +37 -0
- package/src/tests/openrouter-attribution-call-sites.test.ts +204 -0
- package/src/tests/openrouter-base-url.test.ts +30 -39
- package/src/tests/pi-mono-extension.test.ts +161 -2
- package/src/tests/pricing-refresh.test.ts +70 -1
- package/src/tests/reasoning-effort.test.ts +3 -1
- package/src/tests/schedule-target-type.test.ts +136 -0
- package/src/tests/script-connections-http.test.ts +45 -0
- package/src/tests/script-connections-mcp.test.ts +41 -0
- package/src/tests/script-executor-registry.test.ts +18 -0
- package/src/tests/send-task-self-send.test.ts +107 -0
- package/src/tests/telemetry-trigger.test.ts +12 -1
- package/src/tests/workflow-llm.test.ts +14 -0
- package/src/tests/workflow-system-one-decision-providers.test.ts +33 -0
- package/src/tools/request-human-input.ts +7 -2
- package/src/tools/script-connections/tool.ts +35 -3
- package/src/tools/send-task.ts +9 -1
- package/src/utils/enabled-tools.ts +27 -0
- package/src/utils/internal-ai/complete-structured.ts +11 -3
- package/src/utils/openrouter-base-url.ts +23 -0
- package/src/workflows/executors/raw-llm.ts +1 -0
- package/src/workflows/executors/system-one-decision.ts +2 -0
- package/src/workflows/executors/validate.ts +1 -0
- package/src/workflows/executors/workflow-llm.ts +9 -2
- package/templates/extensions/README.md +1 -0
- package/templates/extensions/slack-reply-gate/README.md +98 -0
- package/templates/extensions/slack-reply-gate/hooks.ts +582 -0
- package/templates/extensions/slack-reply-gate/manifest.json +8 -0
- package/templates/skills/agent-browser/SKILL.md +2 -0
- package/templates/skills/agent-browser/content.md +2 -0
- package/templates/skills/code-quality/content.md +1 -0
- package/templates/skills/heartbeat-runbook/content.md +1 -1
- package/templates/skills/swarm-scripts/SKILL.md +10 -0
- package/templates/skills/swarm-scripts/content.md +10 -0
- package/templates/skills/work-on-task/SKILL.md +4 -0
- package/templates/skills/work-on-task/content.md +4 -0
- package/templates/skills/workflow-iterate/content.md +9 -0
- package/dist/acp-adapter-yzfxn8vj.js +0 -23
- package/dist/cli-3dpj7atn.js +0 -11
- package/dist/cli-gvcgmx69.js +0 -183
- package/dist/{cli-jhm6hzjn.js → cli-mxvnnv5q.js} +7 -7
- package/dist/{codex-hook-d2rkvf39.js → codex-hook-15dgc4cb.js} +1 -1
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
materializeClaudeMd,
|
|
4
4
|
stopClaudeMd
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-69egj654.js";
|
|
6
6
|
import {
|
|
7
7
|
guardGhPrBody
|
|
8
8
|
} from "./cli-v6vv7dy8.js";
|
|
9
9
|
import {
|
|
10
10
|
summarizeSession
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-r7eeddkq.js";
|
|
12
12
|
import {
|
|
13
13
|
checkToolLoop,
|
|
14
14
|
clearToolHistory
|
|
@@ -23,20 +23,19 @@ import {
|
|
|
23
23
|
import {
|
|
24
24
|
getApiKey
|
|
25
25
|
} from "./cli-f14fvzag.js";
|
|
26
|
-
import"./cli-
|
|
27
|
-
import"./cli-
|
|
28
|
-
import"./cli-
|
|
29
|
-
import"./cli-2x0e561b.js";
|
|
30
|
-
import"./cli-pkke6geq.js";
|
|
26
|
+
import"./cli-7mhy3ths.js";
|
|
27
|
+
import"./cli-v1w7pbd8.js";
|
|
28
|
+
import"./cli-km4x66j0.js";
|
|
31
29
|
import"./cli-rb9m6rpe.js";
|
|
30
|
+
import"./cli-2x0e561b.js";
|
|
32
31
|
import"./cli-bsakbbkm.js";
|
|
33
32
|
import"./cli-zxg80zs9.js";
|
|
34
33
|
import"./cli-ydt3zkwv.js";
|
|
35
|
-
import"./cli-
|
|
36
|
-
import"./cli-
|
|
34
|
+
import"./cli-mn8qkd8v.js";
|
|
35
|
+
import"./cli-g7k7zbcz.js";
|
|
37
36
|
import"./cli-btbzvq95.js";
|
|
38
37
|
import"./cli-1m2e086m.js";
|
|
39
|
-
import"./cli-
|
|
38
|
+
import"./cli-wnb9b2g3.js";
|
|
40
39
|
import {
|
|
41
40
|
buildIndependentIdentityPayloads,
|
|
42
41
|
contentSha256,
|
|
@@ -44,26 +43,27 @@ import {
|
|
|
44
43
|
init_profile_sync,
|
|
45
44
|
readIdentityBaselines,
|
|
46
45
|
warnProfileFileTooLarge
|
|
47
|
-
} from "./cli-
|
|
46
|
+
} from "./cli-mxvnnv5q.js";
|
|
48
47
|
import"./cli-7mm2r1kp.js";
|
|
49
48
|
import"./cli-g5erf0zt.js";
|
|
50
49
|
import"./cli-dmtrxqhg.js";
|
|
50
|
+
import"./cli-agamgm0p.js";
|
|
51
|
+
import"./cli-5c2j5yvx.js";
|
|
52
|
+
import"./cli-1a2j50m0.js";
|
|
53
|
+
import"./cli-f9w1semm.js";
|
|
54
|
+
import"./cli-a35hzdve.js";
|
|
51
55
|
import {
|
|
52
56
|
MAX_PROFILE_FILE_LENGTH,
|
|
53
57
|
getMcpBaseUrl,
|
|
54
58
|
init_constants
|
|
55
59
|
} from "./cli-gd4favx9.js";
|
|
56
|
-
import"./cli-agamgm0p.js";
|
|
57
|
-
import"./cli-5c2j5yvx.js";
|
|
58
|
-
import"./cli-1a2j50m0.js";
|
|
59
|
-
import"./cli-f9w1semm.js";
|
|
60
60
|
import"./cli-ej6gbxfb.js";
|
|
61
61
|
import"./cli-sd0mxa3c.js";
|
|
62
62
|
import"./cli-w5e1d1vv.js";
|
|
63
63
|
import {
|
|
64
64
|
init_package,
|
|
65
65
|
package_default
|
|
66
|
-
} from "./cli-
|
|
66
|
+
} from "./cli-ng1pmdx6.js";
|
|
67
67
|
import {
|
|
68
68
|
init_secret_scrubber,
|
|
69
69
|
scrubSecrets
|
|
@@ -537,9 +537,18 @@ async function handleHook() {
|
|
|
537
537
|
}
|
|
538
538
|
};
|
|
539
539
|
const outputBlockResponse = (reason) => {
|
|
540
|
+
const response = msg.hook_event_name === "PreToolUse" ? {
|
|
541
|
+
hookSpecificOutput: {
|
|
542
|
+
hookEventName: "PreToolUse",
|
|
543
|
+
permissionDecision: "deny",
|
|
544
|
+
permissionDecisionReason: reason
|
|
545
|
+
}
|
|
546
|
+
} : { decision: "block", reason };
|
|
547
|
+
console.log(JSON.stringify(response));
|
|
548
|
+
};
|
|
549
|
+
const outputToolContext = (hookEventName, additionalContext) => {
|
|
540
550
|
const response = {
|
|
541
|
-
|
|
542
|
-
reason
|
|
551
|
+
hookSpecificOutput: { hookEventName, additionalContext }
|
|
543
552
|
};
|
|
544
553
|
console.log(JSON.stringify(response));
|
|
545
554
|
};
|
|
@@ -623,7 +632,13 @@ async function handleHook() {
|
|
|
623
632
|
};
|
|
624
633
|
await ping();
|
|
625
634
|
const agentInfo = await getAgentInfo();
|
|
626
|
-
if (agentInfo) {
|
|
635
|
+
if (msg.hook_event_name === "UserPromptSubmit" && agentInfo && !agentInfo.isLead && agentInfo.status === "busy") {
|
|
636
|
+
if (await checkAndBlockIfCancelled(true)) {
|
|
637
|
+
return;
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
const isToolEvent = msg.hook_event_name === "PreToolUse" || msg.hook_event_name === "PostToolUse";
|
|
641
|
+
if (agentInfo && !isToolEvent) {
|
|
627
642
|
console.log(`You are registered as ${agentInfo.isLead ? "lead" : "worker"} agent "${agentInfo.name}" (ID: ${agentInfo.id}, status: ${agentInfo.status}).`);
|
|
628
643
|
if (agentInfo.inbox) {
|
|
629
644
|
const tray = formatSystemTray(agentInfo.inbox);
|
|
@@ -632,7 +647,7 @@ async function handleHook() {
|
|
|
632
647
|
}
|
|
633
648
|
}
|
|
634
649
|
} else if (shouldShowRegistrationNudge({
|
|
635
|
-
agentInfoPresent:
|
|
650
|
+
agentInfoPresent: Boolean(agentInfo),
|
|
636
651
|
eventType: msg.hook_event_name,
|
|
637
652
|
hasAgentIdHeader: hasAgentIdHeader()
|
|
638
653
|
})) {
|
|
@@ -741,6 +756,7 @@ You do not have a pre-defined agent ID, you will receive one when you join the s
|
|
|
741
756
|
return;
|
|
742
757
|
}
|
|
743
758
|
}
|
|
759
|
+
let loopWarning;
|
|
744
760
|
if (agentInfo && !agentInfo.isLead && agentInfo.status === "busy") {
|
|
745
761
|
const loopTaskFile = await readTaskFile();
|
|
746
762
|
if (loopTaskFile?.taskId && msg.tool_name && msg.tool_input) {
|
|
@@ -750,7 +766,7 @@ You do not have a pre-defined agent ID, you will receive one when you join the s
|
|
|
750
766
|
return;
|
|
751
767
|
}
|
|
752
768
|
if (loopResult.severity === "warning" && loopResult.reason) {
|
|
753
|
-
|
|
769
|
+
loopWarning = `Warning: ${loopResult.reason}`;
|
|
754
770
|
}
|
|
755
771
|
}
|
|
756
772
|
}
|
|
@@ -761,6 +777,9 @@ You do not have a pre-defined agent ID, you will receive one when you join the s
|
|
|
761
777
|
return;
|
|
762
778
|
}
|
|
763
779
|
}
|
|
780
|
+
if (loopWarning) {
|
|
781
|
+
outputToolContext("PreToolUse", loopWarning);
|
|
782
|
+
}
|
|
764
783
|
break;
|
|
765
784
|
}
|
|
766
785
|
case "PostToolUse":
|
|
@@ -778,7 +797,7 @@ You do not have a pre-defined agent ID, you will receive one when you join the s
|
|
|
778
797
|
method: "PUT",
|
|
779
798
|
headers: mcpConfig.headers
|
|
780
799
|
}).catch((e) => {
|
|
781
|
-
console.
|
|
800
|
+
console.error("Failed to update agent activity timestamp:", e);
|
|
782
801
|
});
|
|
783
802
|
}
|
|
784
803
|
if (agentInfo) {
|
|
@@ -823,19 +842,11 @@ You do not have a pre-defined agent ID, you will receive one when you join the s
|
|
|
823
842
|
if (agentInfo.isLead) {
|
|
824
843
|
if (msg.tool_name?.endsWith("send-task")) {
|
|
825
844
|
const maybeTaskId = msg.tool_response?.task?.id;
|
|
826
|
-
|
|
845
|
+
outputToolContext("PostToolUse", `Task sent successfully.${maybeTaskId ? ` Task ID: ${maybeTaskId}.` : ""} Monitor progress using the get-task-details tool periodically.`);
|
|
827
846
|
}
|
|
828
847
|
}
|
|
829
848
|
}
|
|
830
849
|
break;
|
|
831
|
-
case "UserPromptSubmit": {
|
|
832
|
-
if (agentInfo && !agentInfo.isLead && agentInfo.status === "busy") {
|
|
833
|
-
if (await checkAndBlockIfCancelled(true)) {
|
|
834
|
-
return;
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
break;
|
|
838
|
-
}
|
|
839
850
|
case "Stop":
|
|
840
851
|
try {
|
|
841
852
|
const pm2ListOutput = await Bun.$`pm2 jlist 2>/dev/null || echo "[]"`.text();
|