@desplega.ai/agent-swarm 2.7.9 → 2.8.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-t949vbbp.js +15 -0
- package/dist/{actions-g563mbn2.js → actions-7e9czc7s.js} +19 -19
- package/dist/{amp-adapter-q61w05eb.js → amp-adapter-gv6cbb7d.js} +2 -3
- package/dist/app-b9fbkp9v.js +20 -0
- package/dist/{assistant-p477rjwj.js → assistant-wjb7v4c7.js} +22 -22
- package/dist/{boot-args-schema-h4qj462e.js → boot-args-schema-2t37e0fe.js} +1 -1
- package/dist/{boot-reembed-n1ehfbsw.js → boot-reembed-a35nkyr1.js} +1 -1
- package/dist/{boot-reembed-qw4mc0pt.js → boot-reembed-gka3zas7.js} +1 -1
- package/dist/{boot-scrub-sweep-9w9jp4sm.js → boot-scrub-sweep-65sdnp6c.js} +3 -3
- package/dist/{boot-seeds-qdaf3sdy.js → boot-seeds-x42tzytw.js} +4 -5
- package/dist/{claude-adapter-348p5hx9.js → claude-adapter-v221b2fd.js} +7 -8
- package/dist/{claude-managed-adapter-h74d06yz.js → claude-managed-adapter-29eq09wd.js} +2 -2
- package/dist/{claude-managed-setup-7787fxtp.js → claude-managed-setup-9m6450zk.js} +2 -2
- package/dist/{claude-sdk-session-hbszbt8a.js → claude-sdk-session-0q0ptaba.js} +9066 -8818
- package/dist/{cli-n5yexkdg.js → cli-0b4zam62.js} +1 -0
- package/dist/{cli-21159vea.js → cli-0jzra9ad.js} +2 -2
- package/dist/{cli-eqtfgfr6.js → cli-2gxeg5gr.js} +1 -1
- package/dist/{cli-k70e3x9e.js → cli-2wnq8jkz.js} +9 -9
- package/dist/{cli-cvs2r2vq.js → cli-2zp0et3v.js} +59 -6
- package/dist/{cli-650zv9q9.js → cli-334z18y3.js} +4 -4
- package/dist/{cli-12xyjhws.js → cli-3rkdne1h.js} +2 -2
- package/dist/{cli-2a8py3sx.js → cli-4txa0ter.js} +5 -7
- package/dist/{cli-jc1g9ndz.js → cli-5j88qqa8.js} +10 -5
- package/dist/{cli-xfjrc279.js → cli-5mrq3ake.js} +48 -14
- package/dist/{cli-v3cf1ts9.js → cli-6t09sdhy.js} +3 -3
- package/dist/{cli-qzt90yze.js → cli-6wxjceza.js} +8 -8
- package/dist/{cli-9aezs55w.js → cli-7b8sbmag.js} +8 -8
- package/dist/{cli-3xj33nrx.js → cli-7cp6aa1q.js} +10 -3
- package/dist/{cli-jfx48xrj.js → cli-7p1kvkck.js} +6 -6
- package/dist/{cli-b932gexn.js → cli-8aes17e4.js} +2 -2
- package/dist/{cli-3tqcamp6.js → cli-8fknbnhw.js} +14 -13
- package/dist/{cli-587857ys.js → cli-8kzasymh.js} +3 -3
- package/dist/{cli-sgs5k6yd.js → cli-a7wvp2km.js} +1 -1
- package/dist/{cli-varqt4d1.js → cli-abejgen1.js} +69 -22
- package/dist/{cli-rwymrnaz.js → cli-bsywb58a.js} +8 -8
- package/dist/{cli-btc9cb4c.js → cli-c55z5chy.js} +4 -6
- package/dist/{cli-ms5m5r1y.js → cli-deefvewm.js} +1 -1
- package/dist/{cli-p17970qv.js → cli-ee0b971j.js} +3 -3
- package/dist/cli-f3vq58d2.js +242 -0
- package/dist/{cli-3xcwp3z8.js → cli-ffhtssbp.js} +2 -2
- package/dist/{cli-hwprv9e4.js → cli-g70vxtjh.js} +2 -2
- package/dist/{cli-4t0fmf3z.js → cli-gxkx0zzp.js} +1 -1
- package/dist/{cli-neyag5p6.js → cli-h38x262p.js} +3365 -429
- package/dist/{cli-2ccpqyyf.js → cli-j790gp2w.js} +105 -22
- package/dist/{cli-f2zenhja.js → cli-kc7v1nfv.js} +1 -1
- package/dist/{cli-vxh6acp7.js → cli-m23zjcy2.js} +10 -10
- package/dist/{cli-y8nbefpb.js → cli-m28atx8q.js} +12 -10
- package/dist/{cli-serm8zrx.js → cli-m4dqmnbp.js} +1 -1
- package/dist/{cli-ybjdc978.js → cli-mrt48bx7.js} +7 -4
- package/dist/{cli-y5rbvxhc.js → cli-n515ex5z.js} +14 -14
- package/dist/{cli-ypff1qwp.js → cli-n9ftpys4.js} +7 -7
- package/dist/{cli-605nn699.js → cli-p1bq50aa.js} +894 -226
- package/dist/{cli-qkdmz8c8.js → cli-p1w18yhx.js} +1 -1
- package/dist/{cli-xk879m3k.js → cli-p2gfst4m.js} +52 -43
- package/dist/{cli-sya22y84.js → cli-pasjcnmj.js} +12 -12
- package/dist/{cli-0whpms1z.js → cli-qa4wdgsy.js} +5 -5
- package/dist/{cli-ejkvvqbe.js → cli-qfedvmcr.js} +50 -24
- package/dist/{cli-tqq0hspb.js → cli-qmqk2yc2.js} +1 -1
- package/dist/{cli-qmd3mse0.js → cli-qsnnd04k.js} +1 -1
- package/dist/{cli-agyaeef4.js → cli-qwca7s44.js} +3 -3
- package/dist/{cli-fayav105.js → cli-rfywm85n.js} +724 -792
- package/dist/{cli-zgv8gxgs.js → cli-rmmpt0wm.js} +6 -6
- package/dist/{cli-hae9j8sv.js → cli-rzsy6nc6.js} +12 -8
- package/dist/{cli-btf6fw39.js → cli-s7t6p9my.js} +1 -1
- package/dist/{cli-cseh6f8w.js → cli-sdtt3men.js} +1 -1
- package/dist/{cli-9r5gtwjr.js → cli-tk7cjj8h.js} +197 -2
- package/dist/{cli-q26b9wre.js → cli-tph5wt3y.js} +4 -4
- package/dist/{cli-gce09r66.js → cli-tqegb8eq.js} +3 -3
- package/dist/{cli-kf3pxxdg.js → cli-v1dv1r37.js} +1 -1
- package/dist/{cli-09kmfkmq.js → cli-wcg8x116.js} +1 -1
- package/dist/{cli-mnrkgg60.js → cli-wk18cm92.js} +5 -5
- package/dist/{cli-p0m0p34z.js → cli-x1wa213s.js} +3 -3
- package/dist/{cli-jrp1dt73.js → cli-xzm9vcfg.js} +1 -1
- package/dist/{cli-715t1gx6.js → cli-y97qxcfx.js} +9 -9
- package/dist/{cli-bc779n4v.js → cli-yq3zak69.js} +1 -1
- package/dist/cli.js +17 -17
- package/dist/{codex-adapter-ysq6bzha.js → codex-adapter-30j9bpzd.js} +5 -6
- package/dist/{codex-hook-fac6175r.js → codex-hook-h3vk6xzr.js} +1 -1
- package/dist/{codex-session-runner-qakzfx93.js → codex-session-runner-8vp57v8w.js} +5 -6
- package/dist/{commands-rs7hkv9r.js → commands-bngnz9g7.js} +3 -3
- package/dist/{controller-r5x9bg6e.js → controller-hxx8wwy1.js} +2 -2
- package/dist/{controllers-connect-498hrxvk.js → controllers-connect-e2b4gyxc.js} +20 -20
- package/dist/{cursor-adapter-d46qszer.js → cursor-adapter-n5nc3mfe.js} +1 -2
- package/dist/{db-s13dqhr6.js → db-bgm7vkc0.js} +3 -3
- package/dist/{db-pm96nhdb.js → db-c6np41ca.js} +12 -2
- package/dist/{devin-adapter-z46ep5ph.js → devin-adapter-xedz98zv.js} +1 -1
- package/dist/{dispatcher-j3h81t7m.js → dispatcher-jnybck15.js} +18 -18
- package/dist/{dsh-adapter-rw0d5rc4.js → dsh-adapter-nrhbrjz8.js} +1 -2
- package/dist/{easter-egg-3d-qtgfxgze.js → easter-egg-3d-533knw22.js} +1 -1
- package/dist/{embedding-space-xh8p4q4x.js → embedding-space-crsm2zp0.js} +6 -6
- package/dist/{embeddings-wp745m91.js → embeddings-e7z3f27f.js} +1 -1
- package/dist/{execute-2fzb9z74.js → execute-b3mrb1mv.js} +1 -1
- package/dist/{external-channel-ys21h3sy.js → external-channel-m77wf5z3.js} +2 -2
- package/dist/{fx-adapter-vz0b9z3g.js → fx-adapter-b6w0kf56.js} +7 -8
- package/dist/{google-generative-ai-ytpgncx9.js → google-generative-ai-h7s3e9kk.js} +1 -1
- package/dist/{google-vertex-tqhze5j7.js → google-vertex-fhxaafzw.js} +1 -1
- package/dist/{grok-adapter-spea7zkj.js → grok-adapter-4sqtebdk.js} +7 -8
- package/dist/handlers-kdjcyzdj.js +32 -0
- package/dist/heartbeat-xgb036sx.js +43 -0
- package/dist/{hook-amcj4s10.js → hook-5h02c9ga.js} +6 -6
- package/dist/{hook-bc6n49qn.js → hook-xsk1jbha.js} +5 -5
- package/dist/{http-7374brv5.js → http-txe7qhvn.js} +448 -165
- package/dist/{index-pxn30mse.js → index-0eny15vj.js} +8 -8
- package/dist/{index-5a9jtqde.js → index-0rvk3vd4.js} +46 -46
- package/dist/{index-fvzke5kx.js → index-1qw6f2dc.js} +10 -10
- package/dist/{index-q5cmtbz5.js → index-4a0670yh.js} +15939 -14244
- package/dist/index-835xdgnm.js +33 -0
- package/dist/index-d469300x.js +37 -0
- package/dist/{index-h7f61sy9.js → index-e5pfbsys.js} +3 -3
- package/dist/{index-hsad2t3r.js → index-m5gx1xd6.js} +38 -38
- package/dist/{index-5fx3b3kw.js → index-rvccek1w.js} +9 -9
- package/dist/index-rzqwp11g.js +32 -0
- package/dist/{index-w4m9z29z.js → index-tvfafeyy.js} +1 -1
- package/dist/{index-c9y31ytf.js → index-vk63emp7.js} +979 -35
- package/dist/{index-514d9pf6.js → index-w7em4ktq.js} +8 -8
- package/dist/{index-p4hjwbvw.js → index-ysvbhg5m.js} +1 -1
- package/dist/{keepalive-wy29kbrg.js → keepalive-4zsrce78.js} +3 -3
- package/dist/lead-yqt47dkr.js +70 -0
- package/dist/{maintenance-h2ds9w6c.js → maintenance-86jvartk.js} +1 -1
- package/dist/{oauth-refresh-sweep-q7mtbyp3.js → oauth-refresh-sweep-j52kg9pr.js} +2 -2
- package/dist/{onboard-vw8r2fdw.js → onboard-c2aj5p8q.js} +3 -3
- package/dist/{opencode-adapter-mtb0953j.js → opencode-adapter-dsagkhtw.js} +5 -6
- package/dist/{otel-impl-j42czw3r.js → otel-impl-yyy203z8.js} +1 -1
- package/dist/{pi-mono-adapter-zk8pg9jr.js → pi-mono-adapter-546cd1cc.js} +9 -9
- package/dist/{pricing-refresh-x7nhv23d.js → pricing-refresh-1rgzqyzz.js} +2 -3
- package/dist/{rbac-roles-9044425x.js → rbac-roles-e70xfeyj.js} +4 -6
- package/dist/{rbac-roles-bzvee6cf.js → rbac-roles-q89qe8er.js} +3 -3
- package/dist/{registry-hpjfmcfz.js → registry-32b1mft6.js} +1 -1
- package/dist/{render-v2-t7bn4skz.js → render-v2-k6tt107q.js} +9 -4
- package/dist/{resume-x94gemep.js → resume-cnnrjfxa.js} +6 -6
- package/dist/{runtime-breq6fmv.js → runtime-1hv06jsn.js} +1 -1
- package/dist/{session-access-q7dmqjvt.js → session-access-xkxkjw3n.js} +4 -4
- package/dist/{session-source-backfill-440ysamr.js → session-source-backfill-1d5pdwww.js} +2 -2
- package/dist/{setup-07n4727s.js → setup-se8q7gkc.js} +1 -1
- package/dist/{virtual-modules-z5h6mcyf.js → virtual-modules-gazyapte.js} +3 -3
- package/dist/{work-objects-pnq5y534.js → work-objects-1kxnbzy5.js} +22 -22
- package/dist/{worker-follow-up-7z1gfkr8.js → worker-follow-up-zqm8apt4.js} +18 -18
- package/dist/worker-j6xxtq7p.js +70 -0
- package/openapi.json +334 -7
- package/package.json +4 -4
- package/src/apps/catalog.generated.json +55 -0
- package/src/apps/definition.ts +11 -0
- package/src/apps/page-validator.ts +19 -0
- package/src/apps/store.ts +28 -8
- package/src/assets/key.ts +77 -4
- package/src/be/db/model-profiles.ts +147 -38
- package/src/be/db/session-labels.ts +57 -0
- package/src/be/db/session-tree.ts +51 -7
- package/src/be/db/slack-trees.ts +146 -0
- package/src/be/db/tasks/read.ts +107 -8
- package/src/be/db/workflow-run-definitions.ts +117 -0
- package/src/be/db-client.ts +8 -2
- package/src/be/db.ts +119 -87
- package/src/be/event-loop-lag.ts +146 -0
- package/src/be/mcp-overflow-sweep.ts +2 -1
- package/src/be/memory/constants.ts +14 -1
- package/src/be/memory/key-paths.ts +8 -0
- package/src/be/memory/providers/sqlite-store.ts +199 -18
- package/src/be/memory/task-learning.ts +79 -14
- package/src/be/memory/types.ts +24 -1
- package/src/be/migrations/278_slack_render_v2_reconcile.sql +108 -0
- package/src/be/migrations/279_backfill_learning_expiry.sql +15 -0
- package/src/be/migrations/281_model_profiles_pr2.sql +28 -0
- package/src/be/migrations/283_workflow_run_definitions.sql +14 -0
- package/src/be/model-profile-check.ts +284 -0
- package/src/be/model-tier-resolution.ts +112 -12
- package/src/be/multi-runtime.ts +27 -0
- package/src/be/runtime-pools/routing.ts +52 -4
- package/src/be/scripts/typecheck.ts +1 -0
- package/src/be/seed-scripts/catalog/dreaming-learnings.ts +552 -0
- package/src/be/seed-scripts/catalog/dreaming-memtax-create.ts +389 -14
- package/src/be/seed-scripts/catalog/dreaming-memtax.ts +6 -3
- package/src/be/seed-scripts/index.ts +9 -0
- package/src/be/steering.ts +8 -2
- package/src/be/swarm-config-guard.ts +2 -0
- package/src/commands/context-preamble.ts +258 -0
- package/src/commands/onboard/agent-fs-version.ts +1 -1
- package/src/commands/runner.ts +32 -1
- package/src/extensions/catalog.generated.json +3 -3
- package/src/fs/provider.ts +17 -3
- package/src/heartbeat/heartbeat.ts +17 -5
- package/src/heartbeat/index.ts +1 -0
- package/src/http/agents.ts +56 -4
- package/src/http/apps.ts +3 -1
- package/src/http/config.ts +2 -6
- package/src/http/core.ts +9 -3
- package/src/http/index.ts +12 -9
- package/src/http/memory.ts +9 -4
- package/src/http/model-profiles.ts +58 -10
- package/src/http/poll.ts +36 -3
- package/src/http/schedules.ts +42 -3
- package/src/http/sessions.ts +16 -3
- package/src/http/tasks.ts +37 -12
- package/src/http/utils.ts +18 -0
- package/src/http/webhooks.ts +48 -0
- package/src/http/workflows.ts +15 -2
- package/src/integrations/chat-sdk/commands.ts +167 -31
- package/src/integrations/chat-sdk/inbound.ts +10 -8
- package/src/integrations/chat-sdk/message-text.ts +117 -0
- package/src/prompts/session-templates.ts +1 -1
- package/src/providers/acp-targets.ts +11 -6
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/claude-sdk-session.ts +132 -23
- package/src/providers/codex-skill-resolver.ts +10 -4
- package/src/providers/cursor-adapter.ts +1 -1
- package/src/providers/devin-skill-resolver.ts +5 -5
- package/src/providers/dsh-adapter.ts +1 -1
- package/src/scheduler/schedule-task.ts +1 -0
- package/src/scheduler/scheduler.ts +4 -1
- package/src/scripts-runtime/executors/quickjs-runner.ts +2 -0
- package/src/scripts-runtime/executors/quickjs-structured-clone.ts +180 -0
- package/src/scripts-runtime/quickjs-compat.ts +0 -1
- package/src/scripts-runtime/sdk-allowlist.ts +1 -0
- package/src/scripts-runtime/swarm-sdk.ts +18 -1
- package/src/scripts-runtime/types/stdlib.d.ts +1 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +1 -0
- package/src/server.ts +2 -0
- package/src/slack/app.ts +425 -10
- package/src/slack/handlers.ts +9 -2
- package/src/slack/inbound-dispatch.ts +18 -1
- package/src/slack/index.ts +7 -1
- package/src/slack/lifecycle-lock.ts +29 -0
- package/src/slack/render-v2.ts +424 -212
- package/src/slack/socket-fence.ts +64 -0
- package/src/slack/watcher.ts +42 -8
- package/src/slack/workspace-guard.ts +345 -0
- package/src/tasks/task-terminal-effects.ts +4 -0
- package/src/tasks/worker-follow-up.ts +102 -2
- package/src/tests/acp-adapter.test.ts +82 -0
- package/src/tests/apps-icon.test.ts +120 -0
- package/src/tests/apps-schema-form.test.ts +151 -0
- package/src/tests/chained-task-follow-up.test.ts +248 -0
- package/src/tests/chat-sdk-commands.test.ts +359 -2
- package/src/tests/chat-sdk-inbound.test.ts +20 -0
- package/src/tests/chat-sdk-slack.test.ts +189 -1
- package/src/tests/check-pr-body.test.ts +40 -0
- package/src/tests/claude-sdk-lifecycle.test.ts +216 -1
- package/src/tests/claude-sdk-process.fixture.ts +57 -0
- package/src/tests/codex-skill-resolver.test.ts +31 -0
- package/src/tests/credentials-allowlist.test.ts +470 -0
- package/src/tests/db-client-busy-retry.test.ts +69 -18
- package/src/tests/db-client.test.ts +26 -1
- package/src/tests/db-task-read-contract.test.ts +7 -0
- package/src/tests/db-task-write-contract.test.ts +6 -0
- package/src/tests/deferred-wake-follow-up.test.ts +47 -0
- package/src/tests/docs-index-footprint.test.js +3 -3
- package/src/tests/dreaming-learnings.test.ts +1395 -0
- package/src/tests/dsh-adapter.test.ts +1 -1
- package/src/tests/event-loop-lag.test.ts +184 -0
- package/src/tests/explicit-model-validation.test.ts +2 -0
- package/src/tests/extensions-example-comms-adherence-gate.test.ts +115 -0
- package/src/tests/fs-provider.test.ts +42 -0
- package/src/tests/github-webhook-early-ack.test.ts +144 -0
- package/src/tests/heartbeat.test.ts +28 -1
- package/src/tests/http-api-integration.test.ts +2 -0
- package/src/tests/http-log-scrubbing.test.ts +68 -2
- package/src/tests/human-free-reclassify.test.ts +5 -1
- package/src/tests/kv-storage.test.ts +92 -1
- package/src/tests/list-endpoint-slimming.test.ts +17 -0
- package/src/tests/memory-key-paths.test.ts +57 -0
- package/src/tests/memory-retrieval-purge.test.ts +19 -0
- package/src/tests/migration-283-workflow-run-definitions.test.ts +69 -0
- package/src/tests/model-profile-check.test.ts +387 -0
- package/src/tests/model-profiles-api.test.ts +528 -1
- package/src/tests/profile-claim.test.ts +415 -3
- package/src/tests/profile-tier-alias.test.ts +382 -0
- package/src/tests/quickjs-compat.test.ts +1 -1
- package/src/tests/runner-context-preamble.test.ts +552 -0
- package/src/tests/schedule-profile.test.ts +359 -0
- package/src/tests/script-connections.test.ts +9 -0
- package/src/tests/script-executor-conformance.test.ts +188 -0
- package/src/tests/script-per-script-executor.test.ts +1 -0
- package/src/tests/scripts-sdk-bridge-tool-failure.test.ts +141 -0
- package/src/tests/seed-scripts.test.ts +2 -2
- package/src/tests/sessions-tree.test.ts +133 -2
- package/src/tests/slack-app-icon.test.ts +4 -0
- package/src/tests/slack-dm-implicit-mention.test.ts +236 -0
- package/src/tests/slack-file-tools-attachments.test.ts +1 -0
- package/src/tests/slack-inbound-receipts.test.ts +22 -2
- package/src/tests/slack-read-boundaries.test.ts +4 -3
- package/src/tests/slack-render-v2-query-plans.test.ts +262 -3
- package/src/tests/slack-render-v2-reconcile.test.ts +201 -0
- package/src/tests/slack-socket-ack.test.ts +16 -1
- package/src/tests/slack-socket-watchdog.test.ts +748 -0
- package/src/tests/slack-workspace-guard.test.ts +905 -0
- package/src/tests/steering-core.test.ts +40 -0
- package/src/tests/store-progress-learning.test.ts +605 -20
- package/src/tests/tool-annotations.test.ts +1 -1
- package/src/tests/vcs-identity-inheritance.test.ts +85 -0
- package/src/tests/workflow-convergence.test.ts +46 -40
- package/src/tests/workflow-definition-pinning-recovery.test.ts +552 -0
- package/src/tests/workflow-definition-pinning.test.ts +645 -0
- package/src/tests/workflow-executors.test.ts +16 -7
- package/src/tests/workflow-foreach.test.ts +43 -20
- package/src/tests/workflow-notify-slack-ready.test.ts +161 -0
- package/src/tests/workflow-profile.test.ts +328 -0
- package/src/tools/app-upsert.ts +1 -1
- package/src/tools/memory-edit.ts +2 -1
- package/src/tools/model-profiles/check-model-profile.ts +63 -0
- package/src/tools/schedules/create-schedule.ts +45 -4
- package/src/tools/schedules/patch-schedule.ts +50 -4
- package/src/tools/schedules/update-schedule.ts +50 -4
- package/src/tools/send-task.ts +17 -2
- package/src/tools/store-progress.ts +15 -3
- package/src/tools/task-action.ts +9 -1
- package/src/tools/templates.ts +13 -0
- package/src/tools/tool-config.ts +2 -1
- package/src/tools/utils.ts +77 -11
- package/src/tools/workflows/create-workflow.ts +1 -1
- package/src/tools/workflows/retry-workflow-run.ts +1 -1
- package/src/tools/workflows/update-workflow.ts +10 -1
- package/src/types.ts +56 -1
- package/src/utils/credentials.ts +89 -12
- package/src/workflows/engine.ts +10 -1
- package/src/workflows/executors/agent-task.ts +21 -2
- package/src/workflows/executors/foreach.ts +4 -1
- package/src/workflows/executors/notify.ts +62 -6
- package/src/workflows/executors/sub-workflow.ts +1 -1
- package/src/workflows/executors/swarm-script.ts +4 -1
- package/src/workflows/foreach-driver.ts +8 -5
- package/src/workflows/limits.ts +2 -1
- package/src/workflows/model-validation.ts +27 -2
- package/src/workflows/patch-definition.ts +3 -1
- package/src/workflows/recovery.ts +6 -6
- package/src/workflows/resume.ts +9 -9
- package/src/workflows/retry-poller.ts +2 -2
- package/templates/extensions/comms-adherence-gate/README.md +25 -0
- package/templates/extensions/comms-adherence-gate/hooks.ts +100 -11
- package/templates/extensions/comms-adherence-gate/manifest.json +1 -1
- package/templates/skills/apps/SKILL.md +9 -0
- package/templates/skills/apps/content.md +9 -0
- package/templates/skills/code-quality/content.md +12 -0
- package/templates/skills/memory/content.md +8 -0
- package/templates/skills/scheduling/config.json +1 -1
- package/templates/skills/scheduling/content.md +2 -2
- package/templates/skills/swarm-docs/content.md +4 -0
- package/templates/skills/swarm-extensions/content.md +1 -1
- package/templates/skills/swarm-scripts/SKILL.md +1 -1
- package/templates/skills/swarm-scripts/content.md +1 -1
- package/templates/skills/work-on-task/SKILL.md +2 -0
- package/templates/skills/work-on-task/content.md +2 -0
- package/templates/workflows/dreaming/content.md +174 -7
- package/dist/acp-adapter-dn4gdsgr.js +0 -16
- package/dist/app-a66ssc4k.js +0 -17
- package/dist/cli-530hkwdy.js +0 -779
- package/dist/cli-a0657jmf.js +0 -339
- package/dist/cli-cyn9v8zr.js +0 -748
- package/dist/handlers-crckt5dq.js +0 -32
- package/dist/heartbeat-8phn1kdq.js +0 -41
- package/dist/index-4x08sjtk.js +0 -30
- package/dist/index-8ybffts4.js +0 -37
- package/dist/index-nfy4kkg5.js +0 -33
- package/dist/lead-zdqxsvjn.js +0 -71
- package/dist/worker-y62rvvq3.js +0 -71
- package/dist/{cli-gxy8y1dt.js → cli-8bpgbr8k.js} +3 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
resolveSlashSkillPrompt
|
|
3
|
-
} from "./cli-jc1g9ndz.js";
|
|
4
1
|
import {
|
|
5
2
|
applyReasoningEffort
|
|
6
3
|
} from "./cli-jrzkw01m.js";
|
|
4
|
+
import {
|
|
5
|
+
resolveSlashSkillPrompt
|
|
6
|
+
} from "./cli-5j88qqa8.js";
|
|
7
7
|
import {
|
|
8
8
|
getContextWindowSize,
|
|
9
9
|
clampContextPercent,
|
|
@@ -16,13 +16,13 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
DEFAULT_MODEL_TIER_MAP,
|
|
18
18
|
init_types4
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-2zp0et3v.js";
|
|
20
20
|
import {
|
|
21
21
|
resolveTemplateFromCode,
|
|
22
22
|
resolveTemplateAsync,
|
|
23
23
|
init_resolver,
|
|
24
24
|
init_session_templates
|
|
25
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-v1dv1r37.js";
|
|
26
26
|
import {
|
|
27
27
|
parseEnvFlag,
|
|
28
28
|
init_env_flag
|
|
@@ -54,7 +54,7 @@ function checkCursorCredentials2(env) {
|
|
|
54
54
|
return env.CURSOR_API_KEY?.trim() ? { ready: true, missing: [], satisfiedBy: "env" } : { ready: false, missing: ["CURSOR_API_KEY"], hint: "Set CURSOR_API_KEY for cursor." };
|
|
55
55
|
}
|
|
56
56
|
async function liveTestCursorKey2(apiKey) {
|
|
57
|
-
const { Cursor } = await import("./index-
|
|
57
|
+
const { Cursor } = await import("./index-4a0670yh.js");
|
|
58
58
|
try {
|
|
59
59
|
await Cursor.me({ apiKey });
|
|
60
60
|
return { ok: true };
|
|
@@ -74,7 +74,7 @@ async function listCursorModels(apiKey) {
|
|
|
74
74
|
if (modelListCache?.key === apiKey && Date.now() - modelListCache.at < MODEL_LIST_TTL_MS) {
|
|
75
75
|
return modelListCache.models;
|
|
76
76
|
}
|
|
77
|
-
const { Cursor } = await import("./index-
|
|
77
|
+
const { Cursor } = await import("./index-4a0670yh.js");
|
|
78
78
|
const models = await Cursor.models.list({ apiKey });
|
|
79
79
|
modelListCache = { key: apiKey, at: Date.now(), models };
|
|
80
80
|
return models;
|
|
@@ -448,7 +448,7 @@ class CursorAdapter2 {
|
|
|
448
448
|
if (!apiKey)
|
|
449
449
|
throw new Error("cursor requires CURSOR_API_KEY");
|
|
450
450
|
registerVolatileSecret(apiKey, "CURSOR_API_KEY");
|
|
451
|
-
const { Agent, JsonlLocalAgentStore } = await import("./index-
|
|
451
|
+
const { Agent, JsonlLocalAgentStore } = await import("./index-4a0670yh.js");
|
|
452
452
|
const modelId = config.model || DEFAULT_MODEL_TIER_MAP.cursor.regular;
|
|
453
453
|
const effort = applyReasoningEffort("cursor", modelId, config.reasoningEffort);
|
|
454
454
|
const requested = effort.kind === "cursor-effort" ? effort.reasoningEffort : undefined;
|
|
@@ -15,8 +15,8 @@ function normalizeStoredKey(key) {
|
|
|
15
15
|
if (!trimmed || trimmed.includes("\x00")) {
|
|
16
16
|
throw new FilesError("Provider", "Stored file key must be a non-empty path");
|
|
17
17
|
}
|
|
18
|
-
if (trimmed.split("/").some(isParentSegment)) {
|
|
19
|
-
throw new FilesError("Provider", "Stored file key must not contain parent path segments");
|
|
18
|
+
if (trimmed.split("/").some((part) => !part || part === "." || isParentSegment(part))) {
|
|
19
|
+
throw new FilesError("Provider", "Stored file key must not contain empty or parent path segments");
|
|
20
20
|
}
|
|
21
21
|
return trimmed;
|
|
22
22
|
}
|
|
@@ -43,13 +43,20 @@ function normalizeName(name) {
|
|
|
43
43
|
}
|
|
44
44
|
function fileObjectFromHeaders(providerId, scope, headers, overrides = {}) {
|
|
45
45
|
const sizeHeader = headers.get("content-length");
|
|
46
|
+
let sizeBytes;
|
|
47
|
+
if (sizeHeader) {
|
|
48
|
+
const parsed = Number(sizeHeader);
|
|
49
|
+
if (Number.isFinite(parsed) && parsed >= 0) {
|
|
50
|
+
sizeBytes = parsed;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
46
53
|
return {
|
|
47
54
|
providerId,
|
|
48
55
|
key: providerPath(scope),
|
|
49
56
|
taskId: scope.taskId,
|
|
50
57
|
name: scope.name,
|
|
51
58
|
contentType: headers.get("content-type") ?? undefined,
|
|
52
|
-
sizeBytes
|
|
59
|
+
sizeBytes,
|
|
53
60
|
etag: headers.get("etag") ?? undefined,
|
|
54
61
|
sha256: headers.get("x-agent-fs-content-hash") ?? undefined,
|
|
55
62
|
version: headers.get("x-agent-fs-version") ?? undefined,
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
contextBoundNoteThreshold,
|
|
3
3
|
createContextBoundNote
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import {
|
|
6
|
-
resolveSlashSkillPrompt
|
|
7
|
-
} from "./cli-jc1g9ndz.js";
|
|
4
|
+
} from "./cli-xzm9vcfg.js";
|
|
8
5
|
import {
|
|
9
6
|
CTX_MODE_NUDGE_EVERY
|
|
10
7
|
} from "./cli-4bd1rck6.js";
|
|
@@ -19,13 +16,16 @@ import {
|
|
|
19
16
|
autoIndexMemoryFile,
|
|
20
17
|
fetchConcurrentContext,
|
|
21
18
|
summarizeTranscript
|
|
22
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-tqegb8eq.js";
|
|
23
20
|
import {
|
|
24
21
|
applyReasoningEffort
|
|
25
22
|
} from "./cli-jrzkw01m.js";
|
|
26
23
|
import {
|
|
27
24
|
fetchInstalledMcpServers
|
|
28
25
|
} from "./cli-bst1vp7e.js";
|
|
26
|
+
import {
|
|
27
|
+
resolveSlashSkillPrompt
|
|
28
|
+
} from "./cli-5j88qqa8.js";
|
|
29
29
|
import {
|
|
30
30
|
CONTEXT_FORMULA,
|
|
31
31
|
getContextWindowSize,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
openAICompatibleKeyLabels,
|
|
48
48
|
validateOpencodeCredentials,
|
|
49
49
|
init_credentials2
|
|
50
|
-
} from "./cli-
|
|
50
|
+
} from "./cli-5mrq3ake.js";
|
|
51
51
|
import {
|
|
52
52
|
isEnvFlagEnabled,
|
|
53
53
|
isSessionSummarySkipped,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
resolveCredential,
|
|
7
7
|
resolveCredentials,
|
|
8
8
|
init_credentials
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-x1wa213s.js";
|
|
10
10
|
import {
|
|
11
11
|
kindForModelString,
|
|
12
12
|
parseModelStr,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
selectCredential,
|
|
23
23
|
init_credentials2
|
|
24
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-5mrq3ake.js";
|
|
25
25
|
import {
|
|
26
26
|
init_zod
|
|
27
27
|
} from "./cli-zcfpsfzf.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
SteeringBlockedError,
|
|
13
13
|
init_steering2,
|
|
14
14
|
init_db4
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-h38x262p.js";
|
|
16
16
|
import {
|
|
17
17
|
isBlockExternalEnabled2,
|
|
18
18
|
invalidateChannelExternality2,
|
|
@@ -20,7 +20,11 @@ import {
|
|
|
20
20
|
shouldBlockChannel2,
|
|
21
21
|
leaveExternalChannel2,
|
|
22
22
|
init_external_channel
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-qsnnd04k.js";
|
|
24
|
+
import {
|
|
25
|
+
workflowEventBus2,
|
|
26
|
+
init_event_bus
|
|
27
|
+
} from "./cli-eddnyg3t.js";
|
|
24
28
|
import {
|
|
25
29
|
noteSlackInboundSideEffect,
|
|
26
30
|
ignoreSlackInbound,
|
|
@@ -36,11 +40,7 @@ import {
|
|
|
36
40
|
init_render_v2,
|
|
37
41
|
registerTreeMessage,
|
|
38
42
|
init_watcher
|
|
39
|
-
} from "./cli-
|
|
40
|
-
import {
|
|
41
|
-
workflowEventBus2,
|
|
42
|
-
init_event_bus
|
|
43
|
-
} from "./cli-eddnyg3t.js";
|
|
43
|
+
} from "./cli-p1bq50aa.js";
|
|
44
44
|
import {
|
|
45
45
|
TaskCreationBlockedError,
|
|
46
46
|
init_errors2,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
init_message_text,
|
|
62
62
|
dispatchPre2,
|
|
63
63
|
init_dispatcher
|
|
64
|
-
} from "./cli-
|
|
64
|
+
} from "./cli-rfywm85n.js";
|
|
65
65
|
import {
|
|
66
66
|
wasEventSeen,
|
|
67
67
|
init_event_dedup,
|
|
@@ -72,13 +72,13 @@ import {
|
|
|
72
72
|
getBufferMessageCount,
|
|
73
73
|
instantFlush,
|
|
74
74
|
init_thread_buffer
|
|
75
|
-
} from "./cli-
|
|
75
|
+
} from "./cli-rmmpt0wm.js";
|
|
76
76
|
import {
|
|
77
77
|
enrichSlackUserEmail,
|
|
78
78
|
resolveSlackUserId,
|
|
79
79
|
rewriteSlackMentions,
|
|
80
80
|
init_enrich
|
|
81
|
-
} from "./cli-
|
|
81
|
+
} from "./cli-6t09sdhy.js";
|
|
82
82
|
import {
|
|
83
83
|
isSlackLeaveThreadDisabled,
|
|
84
84
|
SLACK_LEFT_THREAD_CONFIRMATION,
|
|
@@ -86,11 +86,11 @@ import {
|
|
|
86
86
|
leaveSlackThread,
|
|
87
87
|
shouldSkipLeftSlackThread,
|
|
88
88
|
init_left_threads
|
|
89
|
-
} from "./cli-
|
|
89
|
+
} from "./cli-a7wvp2km.js";
|
|
90
90
|
import {
|
|
91
91
|
resolveTemplate,
|
|
92
92
|
init_resolver
|
|
93
|
-
} from "./cli-
|
|
93
|
+
} from "./cli-v1dv1r37.js";
|
|
94
94
|
import {
|
|
95
95
|
init_zod
|
|
96
96
|
} from "./cli-zcfpsfzf.js";
|
|
@@ -346,7 +346,8 @@ function registerMessageHandler2(app) {
|
|
|
346
346
|
}
|
|
347
347
|
const botUserId = cachedBotUserId;
|
|
348
348
|
const isAssistantThread = !!msg.assistant_thread;
|
|
349
|
-
const
|
|
349
|
+
const isTopLevelDirectMessage = msg.channel_type === "im" && !msg.thread_ts;
|
|
350
|
+
const isImplicitMention = (isAssistantThread || isTopLevelDirectMessage) && !botMentioned && !isAddressedToOtherUser(effectiveText, botUserId);
|
|
350
351
|
const additiveSlack = isEnvFlagEnabled("ADDITIVE_SLACK", false);
|
|
351
352
|
const requireMentionForThreadFollowup = isEnvFlagEnabled("SLACK_THREAD_FOLLOWUP_REQUIRE_MENTION", false);
|
|
352
353
|
if (additiveSlack && msg.thread_ts) {
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
getSwarmConfigs2,
|
|
17
17
|
upsertSwarmConfig2,
|
|
18
18
|
init_db4
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-h38x262p.js";
|
|
20
20
|
import {
|
|
21
21
|
createRuntimeProvider,
|
|
22
22
|
init_runtime_providers
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
init_session_token_connections,
|
|
27
27
|
insertSessionToken,
|
|
28
28
|
init_users
|
|
29
|
-
} from "./cli-
|
|
29
|
+
} from "./cli-gxkx0zzp.js";
|
|
30
30
|
import {
|
|
31
31
|
RuntimeControllerCreateSchema,
|
|
32
32
|
RuntimeControllerUpdateSchema,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
RuntimePoolUpdateSchema,
|
|
35
35
|
RuntimePoolCreateAgentSchema,
|
|
36
36
|
init_types4
|
|
37
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-2zp0et3v.js";
|
|
38
38
|
import {
|
|
39
39
|
poolCacheKey,
|
|
40
40
|
init_types5
|
|
@@ -3,6 +3,8 @@ import {
|
|
|
3
3
|
init_event_bus
|
|
4
4
|
} from "./cli-eddnyg3t.js";
|
|
5
5
|
import {
|
|
6
|
+
withLoopPath,
|
|
7
|
+
init_event_loop_lag,
|
|
6
8
|
getDbClient2,
|
|
7
9
|
isRuntimePoolsEnabled,
|
|
8
10
|
init_runtime_pools_flag,
|
|
@@ -14,6 +16,11 @@ import {
|
|
|
14
16
|
isPoolAffinityEnforcementEnabled2,
|
|
15
17
|
buildRoutingAffinityFromAgent2,
|
|
16
18
|
isAgentEligibleForTask2,
|
|
19
|
+
poolTaskRunsOnHarness,
|
|
20
|
+
init_model_validation2,
|
|
21
|
+
runtimeReadsRepoSecrets,
|
|
22
|
+
checkProfileForAgent,
|
|
23
|
+
init_model_profile_check,
|
|
17
24
|
rowToAgentTask,
|
|
18
25
|
getTaskById2,
|
|
19
26
|
hasNonTerminalResumeChild2,
|
|
@@ -63,27 +70,25 @@ import {
|
|
|
63
70
|
getStaleApprovalRequests2,
|
|
64
71
|
upsertKv2,
|
|
65
72
|
init_db4
|
|
66
|
-
} from "./cli-
|
|
73
|
+
} from "./cli-h38x262p.js";
|
|
67
74
|
import {
|
|
68
75
|
listRuntimePools2,
|
|
69
76
|
init_db2
|
|
70
|
-
} from "./cli-
|
|
77
|
+
} from "./cli-8kzasymh.js";
|
|
71
78
|
import {
|
|
72
79
|
userHoldsOperatorGrantedRole2,
|
|
73
80
|
assertMayActOnOperatorGrantedTarget2,
|
|
74
81
|
init_rbac_roles
|
|
75
|
-
} from "./cli-
|
|
82
|
+
} from "./cli-c55z5chy.js";
|
|
76
83
|
import {
|
|
77
84
|
remediateStalledRuntime
|
|
78
|
-
} from "./cli-
|
|
85
|
+
} from "./cli-6wxjceza.js";
|
|
79
86
|
import {
|
|
80
87
|
repointTrackerSyncBySwarmId,
|
|
81
88
|
init_tracker,
|
|
82
89
|
isRuntimePoolWakeable,
|
|
83
90
|
isAgentReachable,
|
|
84
91
|
init_reachability,
|
|
85
|
-
poolTaskRunsOnHarness,
|
|
86
|
-
init_model_validation,
|
|
87
92
|
recoverIncompleteRuns,
|
|
88
93
|
init_recovery,
|
|
89
94
|
getExecutorRegistry2,
|
|
@@ -105,22 +110,23 @@ import {
|
|
|
105
110
|
init_approval_cancel,
|
|
106
111
|
canClaim,
|
|
107
112
|
init_budget_admission
|
|
108
|
-
} from "./cli-
|
|
113
|
+
} from "./cli-rfywm85n.js";
|
|
109
114
|
import {
|
|
110
115
|
runScriptWithRunCredential,
|
|
111
116
|
init_run_credential,
|
|
112
117
|
runSavedScriptAsAgent,
|
|
113
118
|
init_run_saved
|
|
114
|
-
} from "./cli-
|
|
119
|
+
} from "./cli-j790gp2w.js";
|
|
115
120
|
import {
|
|
116
121
|
runtimeStaleThresholdMinutes,
|
|
117
122
|
countActiveRuntimeInstancesForAgent,
|
|
118
123
|
agentsWithLiveRuntime,
|
|
124
|
+
liveRuntimeAuthModes,
|
|
119
125
|
expireStaleRuntimeInstances,
|
|
120
126
|
init_multi_runtime,
|
|
121
127
|
createApprovalFollowUpTask,
|
|
122
128
|
init_approval_notifications
|
|
123
|
-
} from "./cli-
|
|
129
|
+
} from "./cli-qfedvmcr.js";
|
|
124
130
|
import {
|
|
125
131
|
isMultiRuntimeEnabled,
|
|
126
132
|
init_multi_runtime2
|
|
@@ -129,13 +135,13 @@ import {
|
|
|
129
135
|
recordIdentityEvent,
|
|
130
136
|
mintToken,
|
|
131
137
|
init_users
|
|
132
|
-
} from "./cli-
|
|
138
|
+
} from "./cli-gxkx0zzp.js";
|
|
133
139
|
import {
|
|
134
140
|
TERMINAL_TASK_STATUSES,
|
|
135
141
|
OPEN_TASK_STATUSES,
|
|
136
142
|
SUPERSEDED_WORKFLOW_TASK_REASON,
|
|
137
143
|
init_types4
|
|
138
|
-
} from "./cli-
|
|
144
|
+
} from "./cli-2zp0et3v.js";
|
|
139
145
|
import {
|
|
140
146
|
DEFAULT_OPENROUTER_BASE_URL,
|
|
141
147
|
getOpenRouterBaseUrl,
|
|
@@ -146,11 +152,11 @@ import {
|
|
|
146
152
|
init_registry3,
|
|
147
153
|
resolveTemplate,
|
|
148
154
|
init_resolver
|
|
149
|
-
} from "./cli-
|
|
155
|
+
} from "./cli-v1dv1r37.js";
|
|
150
156
|
import {
|
|
151
157
|
init_package,
|
|
152
158
|
package_default
|
|
153
|
-
} from "./cli-
|
|
159
|
+
} from "./cli-334z18y3.js";
|
|
154
160
|
import {
|
|
155
161
|
isEnvFlagEnabled,
|
|
156
162
|
init_env_flag
|
|
@@ -168,7 +174,8 @@ init_event_bus();
|
|
|
168
174
|
init_budget_admission();
|
|
169
175
|
init_db4();
|
|
170
176
|
init_read();
|
|
171
|
-
|
|
177
|
+
init_model_profile_check();
|
|
178
|
+
init_model_validation2();
|
|
172
179
|
init_multi_runtime();
|
|
173
180
|
init_db2();
|
|
174
181
|
init_reachability();
|
|
@@ -274,7 +281,42 @@ async function routePoolTasks(opts = {}) {
|
|
|
274
281
|
}
|
|
275
282
|
return (agent.maxTasks ?? 1) - count;
|
|
276
283
|
};
|
|
277
|
-
const
|
|
284
|
+
const runtimeAuthModes = withLiveRuntime === null ? null : await liveRuntimeAuthModes();
|
|
285
|
+
const secretViews = (agent, viaWake) => {
|
|
286
|
+
if (runtimeAuthModes === null)
|
|
287
|
+
return [true];
|
|
288
|
+
const tokenView = runtimeReadsRepoSecrets(agent);
|
|
289
|
+
const views = (runtimeAuthModes.get(agent.id) ?? []).map((runtimeToken) => runtimeToken ? tokenView : true);
|
|
290
|
+
if (viaWake || !views.length)
|
|
291
|
+
views.push(tokenView);
|
|
292
|
+
return [...new Set(views)];
|
|
293
|
+
};
|
|
294
|
+
const profileOk = new Map;
|
|
295
|
+
const passesProfileCheck = async (agent, task, viaWake) => {
|
|
296
|
+
if (!task.profile)
|
|
297
|
+
return true;
|
|
298
|
+
for (const includeRepoSecrets of secretViews(agent, viaWake)) {
|
|
299
|
+
const memoKey = JSON.stringify([
|
|
300
|
+
agent.id,
|
|
301
|
+
task.profile,
|
|
302
|
+
task.vcsRepo ?? null,
|
|
303
|
+
includeRepoSecrets
|
|
304
|
+
]);
|
|
305
|
+
let ok = profileOk.get(memoKey);
|
|
306
|
+
if (ok === undefined) {
|
|
307
|
+
const result = await checkProfileForAgent(agent.id, task.profile, {
|
|
308
|
+
vcsRepo: task.vcsRepo,
|
|
309
|
+
includeRepoSecrets
|
|
310
|
+
});
|
|
311
|
+
ok = result?.ok !== false;
|
|
312
|
+
profileOk.set(memoKey, ok);
|
|
313
|
+
}
|
|
314
|
+
if (!ok)
|
|
315
|
+
return false;
|
|
316
|
+
}
|
|
317
|
+
return true;
|
|
318
|
+
};
|
|
319
|
+
const eligible = async (agent, task, viaWake = false) => await headroom(agent) > 0 && isAgentEligibleForTask2(agent, task) && await poolTaskRunsOnHarness(task, agent.harnessProvider ?? agent.provider ?? null) && await passesProfileCheck(agent, task, viaWake);
|
|
278
320
|
const assigned = [];
|
|
279
321
|
const limit = nonnegativeEnv("HEARTBEAT_MAX_AUTO_ASSIGN", 5);
|
|
280
322
|
const batchSize = Number(process.env.HEARTBEAT_POOL_SCAN_BATCH_SIZE) || 50;
|
|
@@ -300,7 +342,7 @@ async function routePoolTasks(opts = {}) {
|
|
|
300
342
|
if (!worker && enabled && now.getTime() - Date.parse(task.createdAt) >= nonnegativeEnv("RUNTIME_WAKE_GRACE_SEC", 15) * 1000) {
|
|
301
343
|
const candidates = [];
|
|
302
344
|
for (const agent of wake) {
|
|
303
|
-
if (await eligible(agent, task))
|
|
345
|
+
if (await eligible(agent, task, true))
|
|
304
346
|
candidates.push({ agent, headroom: await headroom(agent) });
|
|
305
347
|
}
|
|
306
348
|
candidates.sort((a, b) => b.headroom - a.headroom || a.agent.name.localeCompare(b.agent.name));
|
|
@@ -527,7 +569,8 @@ async function deleteExpiredConnectorCodes(now = new Date) {
|
|
|
527
569
|
// src/heartbeat/heartbeat.ts
|
|
528
570
|
init_db4();
|
|
529
571
|
init_tracker();
|
|
530
|
-
|
|
572
|
+
init_event_loop_lag();
|
|
573
|
+
init_model_validation2();
|
|
531
574
|
init_multi_runtime();
|
|
532
575
|
init_reachability();
|
|
533
576
|
init_db3();
|
|
@@ -695,8 +738,12 @@ var SKIP_AUTO_RESUME_TYPES = new Set([
|
|
|
695
738
|
"heartbeat",
|
|
696
739
|
"reroute-decision"
|
|
697
740
|
]);
|
|
741
|
+
function parseHeartbeatIntervalMs2(raw) {
|
|
742
|
+
const value = Number(raw);
|
|
743
|
+
return Number.isInteger(value) && value > 0 ? value : 90000;
|
|
744
|
+
}
|
|
698
745
|
function defaultIntervalMs() {
|
|
699
|
-
return
|
|
746
|
+
return parseHeartbeatIntervalMs2(process.env.HEARTBEAT_INTERVAL_MS);
|
|
700
747
|
}
|
|
701
748
|
function stallThresholdMinutes() {
|
|
702
749
|
return Number(process.env.HEARTBEAT_STALL_THRESHOLD_MIN) || 30;
|
|
@@ -1806,10 +1853,10 @@ function startHeartbeat2(intervalMs = defaultIntervalMs()) {
|
|
|
1806
1853
|
}
|
|
1807
1854
|
console.log(`[Heartbeat] Starting with ${intervalMs}ms interval`);
|
|
1808
1855
|
setTimeout(() => {
|
|
1809
|
-
runRebootSweep2().then(() => runHeartbeatSweep2()).catch((err) => console.error("[Heartbeat] boot sweep failed:", scrubSecrets(err instanceof Error ? err.message : String(err))));
|
|
1856
|
+
withLoopPath("heartbeat.boot-sweep", () => runRebootSweep2()).then(() => withLoopPath("heartbeat.sweep", () => runHeartbeatSweep2())).catch((err) => console.error("[Heartbeat] boot sweep failed:", scrubSecrets(err instanceof Error ? err.message : String(err))));
|
|
1810
1857
|
}, 5000);
|
|
1811
1858
|
heartbeatInterval = setInterval(() => {
|
|
1812
|
-
runHeartbeatSweep2().catch((err) => console.error("[Heartbeat] sweep failed:", scrubSecrets(err instanceof Error ? err.message : String(err))));
|
|
1859
|
+
withLoopPath("heartbeat.sweep", () => runHeartbeatSweep2()).catch((err) => console.error("[Heartbeat] sweep failed:", scrubSecrets(err instanceof Error ? err.message : String(err))));
|
|
1813
1860
|
}, intervalMs);
|
|
1814
1861
|
startHeartbeatChecklist();
|
|
1815
1862
|
}
|
|
@@ -1883,7 +1930,7 @@ function startHeartbeatChecklist(intervalMs = heartbeatChecklistIntervalMs()) {
|
|
|
1883
1930
|
}
|
|
1884
1931
|
console.log(`[Heartbeat] Checklist starting with ${intervalMs}ms interval`);
|
|
1885
1932
|
checklistInterval = setInterval(() => {
|
|
1886
|
-
checkHeartbeatChecklist2().catch((err) => console.error("[Heartbeat] checklist check failed:", scrubSecrets(err instanceof Error ? err.message : String(err))));
|
|
1933
|
+
withLoopPath("heartbeat.checklist", () => checkHeartbeatChecklist2()).catch((err) => console.error("[Heartbeat] checklist check failed:", scrubSecrets(err instanceof Error ? err.message : String(err))));
|
|
1887
1934
|
}, intervalMs);
|
|
1888
1935
|
}
|
|
1889
1936
|
function stopHeartbeatChecklist() {
|
|
@@ -1898,4 +1945,4 @@ function stopHeartbeatChecklist() {
|
|
|
1898
1945
|
}
|
|
1899
1946
|
}
|
|
1900
1947
|
|
|
1901
|
-
export { startPoolRouting, stopPoolRouting, INVITE_CODE_TTL_MS, DEFAULT_CONNECTOR_CODE_LABEL, DEFAULT_INVITE_CODE_LABEL, createConnectorCode, exchangeConnectorCode, deleteUnusedInviteCodes, remediateTaskForDeadRuntime2, getBootEpochMs2, runRebootSweep2, getRebootAffectedTasks2, checkHeartbeatChecklist2, runHeartbeatSweep2, startHeartbeat2, stopHeartbeat2 };
|
|
1948
|
+
export { startPoolRouting, stopPoolRouting, INVITE_CODE_TTL_MS, DEFAULT_CONNECTOR_CODE_LABEL, DEFAULT_INVITE_CODE_LABEL, createConnectorCode, exchangeConnectorCode, deleteUnusedInviteCodes, parseHeartbeatIntervalMs2, remediateTaskForDeadRuntime2, getBootEpochMs2, runRebootSweep2, getRebootAffectedTasks2, checkHeartbeatChecklist2, runHeartbeatSweep2, startHeartbeat2, stopHeartbeat2 };
|
|
@@ -148,7 +148,7 @@ import {
|
|
|
148
148
|
Instantiate,
|
|
149
149
|
Evaluate2,
|
|
150
150
|
Priority
|
|
151
|
-
} from "./cli-
|
|
151
|
+
} from "./cli-8aes17e4.js";
|
|
152
152
|
import {
|
|
153
153
|
require_index_min
|
|
154
154
|
} from "./cli-t9wbrgm4.js";
|
|
@@ -193,7 +193,7 @@ import {
|
|
|
193
193
|
streamSimple2,
|
|
194
194
|
completeSimple,
|
|
195
195
|
init_compat
|
|
196
|
-
} from "./cli-
|
|
196
|
+
} from "./cli-x1wa213s.js";
|
|
197
197
|
import {
|
|
198
198
|
cleanupSessionResources,
|
|
199
199
|
uuidv7
|
|
@@ -59445,7 +59445,7 @@ function loadAllHighlightLanguages() {
|
|
|
59445
59445
|
if (!allLanguagesPromise) {
|
|
59446
59446
|
allLanguagesPromise = new Promise((resolve) => {
|
|
59447
59447
|
setImmediate(() => {
|
|
59448
|
-
import("./index-
|
|
59448
|
+
import("./index-tvfafeyy.js").then((m)=>__toESM(m.default,1)).then(() => resolve(), () => {
|
|
59449
59449
|
resolve();
|
|
59450
59450
|
});
|
|
59451
59451
|
});
|
|
@@ -65717,7 +65717,7 @@ function getCreateJiti() {
|
|
|
65717
65717
|
}
|
|
65718
65718
|
var virtualModulesPromise;
|
|
65719
65719
|
function getVirtualModules() {
|
|
65720
|
-
virtualModulesPromise ??= import("./virtual-modules-
|
|
65720
|
+
virtualModulesPromise ??= import("./virtual-modules-gazyapte.js").then((module) => module.VIRTUAL_MODULES);
|
|
65721
65721
|
return virtualModulesPromise;
|
|
65722
65722
|
}
|
|
65723
65723
|
var _aliases = null;
|
|
@@ -89500,7 +89500,7 @@ function parseCodemodeSource(input) {
|
|
|
89500
89500
|
}
|
|
89501
89501
|
|
|
89502
89502
|
// node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/execute.lazy.js
|
|
89503
|
-
var loadCodemodeExecutor = () => import("./execute-
|
|
89503
|
+
var loadCodemodeExecutor = () => import("./execute-b3mrb1mv.js");
|
|
89504
89504
|
|
|
89505
89505
|
// node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/renderer.js
|
|
89506
89506
|
var CODE_PREVIEW_LINES = 10;
|
|
@@ -90701,7 +90701,7 @@ function createMcpResourceToolDefinitions(options) {
|
|
|
90701
90701
|
}
|
|
90702
90702
|
|
|
90703
90703
|
// node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/runtime.lazy.js
|
|
90704
|
-
var loadMcpRuntime = () => import("./runtime-
|
|
90704
|
+
var loadMcpRuntime = () => import("./runtime-1hv06jsn.js");
|
|
90705
90705
|
|
|
90706
90706
|
// node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard.js
|
|
90707
90707
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
@@ -95891,7 +95891,7 @@ var builtInExtensions = [
|
|
|
95891
95891
|
];
|
|
95892
95892
|
|
|
95893
95893
|
// node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/cli.lazy.js
|
|
95894
|
-
var loadMcpCommand = () => import("./cli-
|
|
95894
|
+
var loadMcpCommand = () => import("./cli-0jzra9ad.js");
|
|
95895
95895
|
|
|
95896
95896
|
// node_modules/@earendil-works/pi-coding-agent/dist/migrations.js
|
|
95897
95897
|
import { existsSync as existsSync22, mkdirSync as mkdirSync11, readdirSync as readdirSync10, readFileSync as readFileSync17, renameSync as renameSync2, rmSync as rmSync3, writeFileSync as writeFileSync11 } from "fs";
|
|
@@ -98455,7 +98455,7 @@ function playEasterEgg3d(tui, egg) {
|
|
|
98455
98455
|
if (tui.hasOverlay())
|
|
98456
98456
|
return true;
|
|
98457
98457
|
const screen = tui.getScreenLines();
|
|
98458
|
-
import("./easter-egg-3d-
|
|
98458
|
+
import("./easter-egg-3d-533knw22.js").then((module) => module.playEasterEgg3d(tui, screen, egg), () => {});
|
|
98459
98459
|
return true;
|
|
98460
98460
|
}
|
|
98461
98461
|
function playPiLogo3d(tui, column, row) {
|
|
@@ -3,19 +3,17 @@ import {
|
|
|
3
3
|
init_db_client,
|
|
4
4
|
getDb2,
|
|
5
5
|
getDbClient2,
|
|
6
|
+
PermissionVerbSchema,
|
|
7
|
+
init_rbac,
|
|
6
8
|
invalidateTelemetryUserRole,
|
|
7
9
|
init_telemetry_identity,
|
|
8
10
|
init_db4
|
|
9
|
-
} from "./cli-
|
|
10
|
-
import {
|
|
11
|
-
PermissionVerbSchema,
|
|
12
|
-
init_rbac
|
|
13
|
-
} from "./cli-cyn9v8zr.js";
|
|
11
|
+
} from "./cli-h38x262p.js";
|
|
14
12
|
import {
|
|
15
13
|
revokeAllUserCredentials,
|
|
16
14
|
isLiveUserToken,
|
|
17
15
|
init_users
|
|
18
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-gxkx0zzp.js";
|
|
19
17
|
import {
|
|
20
18
|
init_env_flag
|
|
21
19
|
} from "./cli-cebvbc9t.js";
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
publicEndpointSsrfOptions,
|
|
7
7
|
init_mcp_wrapper
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-s7t6p9my.js";
|
|
9
9
|
import {
|
|
10
10
|
normalizeOrgWebsite,
|
|
11
11
|
init_org_website,
|
|
12
12
|
assertUrlSafe
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-h38x262p.js";
|
|
14
14
|
import {
|
|
15
15
|
getOpenRouterBaseUrl,
|
|
16
16
|
getOpenRouterAttributionHeaders,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
createScopedFetch,
|
|
22
22
|
deriveDefaultRoute,
|
|
23
23
|
init_src
|
|
24
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-5mrq3ake.js";
|
|
25
25
|
import {
|
|
26
26
|
providerBaseUrl,
|
|
27
27
|
providerForKeyVar,
|