@desplega.ai/agent-swarm 2.7.10 → 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-b8aqhrsg.js → actions-7e9czc7s.js} +18 -19
- package/dist/{amp-adapter-4c165vgn.js → amp-adapter-gv6cbb7d.js} +2 -3
- package/dist/{app-m9khefrh.js → app-b9fbkp9v.js} +3 -3
- package/dist/{assistant-rh4v3ntz.js → assistant-wjb7v4c7.js} +20 -21
- package/dist/{boot-args-schema-hwkc8bzv.js → boot-args-schema-2t37e0fe.js} +1 -1
- package/dist/{boot-reembed-5y6yw9sj.js → boot-reembed-a35nkyr1.js} +1 -1
- package/dist/{boot-reembed-fdyk55h4.js → boot-reembed-gka3zas7.js} +1 -1
- package/dist/{boot-scrub-sweep-r5r8kqsn.js → boot-scrub-sweep-65sdnp6c.js} +3 -3
- package/dist/{boot-seeds-8f9zt5cm.js → boot-seeds-x42tzytw.js} +4 -5
- package/dist/{claude-adapter-s5df247c.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-9gsmwzyx.js → claude-managed-setup-9m6450zk.js} +2 -2
- package/dist/{claude-sdk-session-dq1j4nz9.js → claude-sdk-session-0q0ptaba.js} +9066 -8818
- package/dist/{cli-n5yexkdg.js → cli-0b4zam62.js} +1 -0
- package/dist/{cli-5wfz00be.js → cli-0jzra9ad.js} +2 -2
- package/dist/{cli-eqtfgfr6.js → cli-2gxeg5gr.js} +1 -1
- package/dist/{cli-eqk5p56g.js → cli-2wnq8jkz.js} +9 -9
- package/dist/{cli-hfkwwy1h.js → cli-2zp0et3v.js} +21 -2
- package/dist/{cli-rt0ag4x1.js → cli-334z18y3.js} +4 -4
- package/dist/{cli-6m6b4bep.js → cli-3rkdne1h.js} +2 -2
- package/dist/{cli-3xddv0rk.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-n07eecjs.js → cli-6t09sdhy.js} +3 -3
- package/dist/{cli-38yww4e9.js → cli-6wxjceza.js} +8 -8
- package/dist/{cli-5xcb8gxq.js → cli-7b8sbmag.js} +8 -8
- package/dist/{cli-3xj33nrx.js → cli-7cp6aa1q.js} +10 -3
- package/dist/{cli-mp9aa8g5.js → cli-7p1kvkck.js} +6 -6
- package/dist/{cli-w3bk0dgv.js → cli-8aes17e4.js} +2 -2
- package/dist/{cli-n9abj89w.js → cli-8fknbnhw.js} +8 -8
- package/dist/{cli-xd5ebp64.js → cli-8kzasymh.js} +3 -3
- package/dist/{cli-2tsfpc70.js → cli-a7wvp2km.js} +1 -1
- package/dist/{cli-kx4c8j05.js → cli-abejgen1.js} +63 -19
- package/dist/{cli-36wdfzgn.js → cli-bsywb58a.js} +8 -8
- package/dist/{cli-yz7v0sh4.js → cli-c55z5chy.js} +4 -6
- package/dist/{cli-18qt3few.js → cli-deefvewm.js} +1 -1
- package/dist/{cli-jg24scat.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-rjyghzg4.js → cli-g70vxtjh.js} +2 -2
- package/dist/{cli-g1px1g2e.js → cli-gxkx0zzp.js} +1 -1
- package/dist/{cli-j7d73g1y.js → cli-h38x262p.js} +3035 -354
- package/dist/{cli-zjphdj1a.js → cli-j790gp2w.js} +40 -18
- package/dist/{cli-f2zenhja.js → cli-kc7v1nfv.js} +1 -1
- package/dist/{cli-td33w98c.js → cli-m23zjcy2.js} +10 -10
- package/dist/{cli-8ewkreqd.js → cli-m28atx8q.js} +7 -9
- package/dist/{cli-x9exydey.js → cli-m4dqmnbp.js} +1 -1
- package/dist/{cli-ybjdc978.js → cli-mrt48bx7.js} +7 -4
- package/dist/{cli-mr97t7cc.js → cli-p1bq50aa.js} +263 -14
- package/dist/{cli-ttbqe3q4.js → cli-p1w18yhx.js} +1 -1
- package/dist/{cli-nj3x45rw.js → cli-p2gfst4m.js} +52 -43
- package/dist/{cli-z9cs5m0w.js → cli-pasjcnmj.js} +12 -12
- package/dist/{cli-an1knn2k.js → cli-qa4wdgsy.js} +5 -5
- package/dist/{cli-xncjscpm.js → cli-qfedvmcr.js} +50 -24
- package/dist/{cli-tmft5dz2.js → cli-qmqk2yc2.js} +1 -1
- package/dist/{cli-bxz823sz.js → cli-qsnnd04k.js} +1 -1
- package/dist/{cli-cr14kftt.js → cli-qwca7s44.js} +3 -3
- package/dist/{cli-7wz05bx3.js → cli-rfywm85n.js} +460 -737
- package/dist/{cli-v2fwbnsk.js → cli-rmmpt0wm.js} +6 -6
- package/dist/{cli-xbtq4d6s.js → cli-rzsy6nc6.js} +12 -8
- package/dist/{cli-0m7rtm11.js → cli-s7t6p9my.js} +1 -1
- package/dist/{cli-16phend6.js → cli-sdtt3men.js} +1 -1
- package/dist/{cli-pyrxt9gw.js → cli-tk7cjj8h.js} +1 -1
- package/dist/{cli-xvymtmv4.js → cli-tqegb8eq.js} +3 -3
- package/dist/{cli-kf3pxxdg.js → cli-v1dv1r37.js} +1 -1
- package/dist/{cli-h49ejvmc.js → cli-wcg8x116.js} +1 -1
- package/dist/{cli-q581b386.js → cli-wk18cm92.js} +5 -5
- package/dist/{cli-4vwxp550.js → cli-x1wa213s.js} +1 -1
- package/dist/{cli-jrp1dt73.js → cli-xzm9vcfg.js} +1 -1
- package/dist/{cli-eb2azq8n.js → cli-y97qxcfx.js} +9 -9
- package/dist/{cli-55bkx8hh.js → cli-yq3zak69.js} +1 -1
- package/dist/cli.js +17 -17
- package/dist/{codex-adapter-yr60sme6.js → codex-adapter-30j9bpzd.js} +5 -6
- package/dist/{codex-hook-fac6175r.js → codex-hook-h3vk6xzr.js} +1 -1
- package/dist/{codex-session-runner-pch8x584.js → codex-session-runner-8vp57v8w.js} +5 -6
- package/dist/{commands-phjfbkv0.js → commands-bngnz9g7.js} +3 -3
- package/dist/{controller-jkx994pz.js → controller-hxx8wwy1.js} +2 -2
- package/dist/{controllers-connect-c4448kwa.js → controllers-connect-e2b4gyxc.js} +19 -20
- package/dist/{cursor-adapter-ndebqnm8.js → cursor-adapter-n5nc3mfe.js} +1 -2
- package/dist/{db-ez6egt6v.js → db-bgm7vkc0.js} +3 -3
- package/dist/{db-ef32tbfc.js → db-c6np41ca.js} +10 -2
- package/dist/{devin-adapter-z46ep5ph.js → devin-adapter-xedz98zv.js} +1 -1
- package/dist/{dispatcher-g3tt9hs9.js → dispatcher-jnybck15.js} +17 -18
- package/dist/{dsh-adapter-tcyn3099.js → dsh-adapter-nrhbrjz8.js} +1 -2
- package/dist/{easter-egg-3d-e36hk5td.js → easter-egg-3d-533knw22.js} +1 -1
- package/dist/{embedding-space-4kyh5qqj.js → embedding-space-crsm2zp0.js} +6 -6
- package/dist/{embeddings-6a8v4a6t.js → embeddings-e7z3f27f.js} +1 -1
- package/dist/{execute-3cbg0twf.js → execute-b3mrb1mv.js} +1 -1
- package/dist/{external-channel-se646snz.js → external-channel-m77wf5z3.js} +2 -2
- package/dist/{fx-adapter-yw795hqq.js → fx-adapter-b6w0kf56.js} +7 -8
- package/dist/{grok-adapter-ttmcss2j.js → grok-adapter-4sqtebdk.js} +7 -8
- package/dist/handlers-kdjcyzdj.js +32 -0
- package/dist/heartbeat-xgb036sx.js +43 -0
- package/dist/{hook-g3nhexsy.js → hook-5h02c9ga.js} +6 -6
- package/dist/{hook-hq93y5ej.js → hook-xsk1jbha.js} +5 -5
- package/dist/{http-5a9p4h6y.js → http-txe7qhvn.js} +282 -140
- package/dist/{index-6haqt3v5.js → index-4a0670yh.js} +8917 -8476
- package/dist/index-835xdgnm.js +33 -0
- package/dist/index-d469300x.js +37 -0
- package/dist/index-rzqwp11g.js +32 -0
- package/dist/{index-s72rqgsx.js → index-tvfafeyy.js} +1 -1
- package/dist/{index-hgn3c961.js → index-vk63emp7.js} +978 -35
- package/dist/{index-3c5pxbge.js → index-ysvbhg5m.js} +1 -1
- package/dist/{keepalive-1j4n4dmk.js → keepalive-4zsrce78.js} +3 -3
- package/dist/lead-yqt47dkr.js +70 -0
- package/dist/{maintenance-dmghacy5.js → maintenance-86jvartk.js} +1 -1
- package/dist/{oauth-refresh-sweep-yy06c03c.js → oauth-refresh-sweep-j52kg9pr.js} +2 -2
- package/dist/{onboard-52f9t5dm.js → onboard-c2aj5p8q.js} +3 -3
- package/dist/{opencode-adapter-krnh9jkn.js → opencode-adapter-dsagkhtw.js} +5 -6
- package/dist/{otel-impl-xjqz6wjj.js → otel-impl-yyy203z8.js} +1 -1
- package/dist/{pi-mono-adapter-dbxyp0qv.js → pi-mono-adapter-546cd1cc.js} +9 -9
- package/dist/{pricing-refresh-ctdr74pd.js → pricing-refresh-1rgzqyzz.js} +2 -3
- package/dist/{rbac-roles-q0gr8eyj.js → rbac-roles-e70xfeyj.js} +4 -6
- package/dist/{rbac-roles-ehv8s10n.js → rbac-roles-q89qe8er.js} +3 -3
- package/dist/{registry-hpjfmcfz.js → registry-32b1mft6.js} +1 -1
- package/dist/{render-v2-5b6chvcq.js → render-v2-k6tt107q.js} +3 -3
- package/dist/{resume-5a5d2845.js → resume-cnnrjfxa.js} +6 -6
- package/dist/{runtime-khxszyfp.js → runtime-1hv06jsn.js} +1 -1
- package/dist/{session-access-gj0bjhqg.js → session-access-xkxkjw3n.js} +4 -4
- package/dist/{session-source-backfill-2sy0krfk.js → session-source-backfill-1d5pdwww.js} +2 -2
- package/dist/{setup-7ssfakk1.js → setup-se8q7gkc.js} +1 -1
- package/dist/{virtual-modules-pjj0knwf.js → virtual-modules-gazyapte.js} +3 -3
- package/dist/{work-objects-bf3syvhq.js → work-objects-1kxnbzy5.js} +20 -21
- package/dist/{worker-follow-up-38xevga6.js → worker-follow-up-zqm8apt4.js} +17 -18
- package/dist/worker-j6xxtq7p.js +70 -0
- package/openapi.json +334 -7
- package/package.json +4 -4
- package/src/apps/definition.ts +11 -0
- package/src/apps/store.ts +28 -8
- package/src/be/db/model-profiles.ts +147 -38
- package/src/be/db/tasks/read.ts +5 -1
- package/src/be/db/workflow-run-definitions.ts +117 -0
- package/src/be/db.ts +24 -3
- 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 +160 -10
- package/src/be/memory/task-learning.ts +79 -14
- package/src/be/memory/types.ts +24 -1
- 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/commands/onboard/agent-fs-version.ts +1 -1
- package/src/commands/runner.ts +32 -1
- package/src/fs/provider.ts +17 -3
- package/src/heartbeat/heartbeat.ts +12 -1
- 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/index.ts +2 -3
- 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/tasks.ts +37 -12
- package/src/http/workflows.ts +15 -2
- 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/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 +93 -0
- package/src/slack/inbound-dispatch.ts +18 -1
- 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/chained-task-follow-up.test.ts +248 -0
- 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-task-read-contract.test.ts +5 -0
- package/src/tests/db-task-write-contract.test.ts +5 -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/explicit-model-validation.test.ts +2 -0
- package/src/tests/fs-provider.test.ts +42 -0
- package/src/tests/heartbeat.test.ts +28 -1
- package/src/tests/human-free-reclassify.test.ts +5 -1
- package/src/tests/list-endpoint-slimming.test.ts +17 -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/schedule-profile.test.ts +359 -0
- package/src/tests/script-connections.test.ts +6 -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/slack-inbound-receipts.test.ts +22 -2
- package/src/tests/slack-socket-ack.test.ts +16 -1
- 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/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 +61 -4
- 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/skills/apps/SKILL.md +2 -0
- package/templates/skills/apps/content.md +2 -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-srfhs1s9.js +0 -16
- package/dist/cli-bzvs88tv.js +0 -339
- package/dist/cli-cyn9v8zr.js +0 -748
- package/dist/cli-ed6yqpf1.js +0 -779
- package/dist/handlers-17wha3ze.js +0 -33
- package/dist/heartbeat-gwewgdms.js +0 -42
- package/dist/index-8arwq8mw.js +0 -34
- package/dist/index-tpw054az.js +0 -38
- package/dist/index-waq75j2j.js +0 -31
- package/dist/lead-re73kdgc.js +0 -72
- package/dist/worker-r8mz7a65.js +0 -72
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
checkDeepSeekApiKey,
|
|
12
12
|
checkOpenAICompatibleProvider,
|
|
13
13
|
writeSkillsToFilesystem
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-ee0b971j.js";
|
|
15
15
|
import {
|
|
16
16
|
renderSteeringDelivery
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-2gxeg5gr.js";
|
|
18
18
|
import {
|
|
19
19
|
effectiveReasoningEffort
|
|
20
20
|
} from "./cli-jrzkw01m.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
CODEX_CREDITS_EXHAUSTED_COOLDOWN_MS,
|
|
31
31
|
resolveCodexCreditsExhaustedCooldownMs,
|
|
32
32
|
parseRateLimitResetTime
|
|
33
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-kc7v1nfv.js";
|
|
34
34
|
import {
|
|
35
35
|
ACP_TARGET_IDS,
|
|
36
36
|
isAcpTarget
|
|
@@ -38,35 +38,35 @@ import {
|
|
|
38
38
|
import {
|
|
39
39
|
checkAmpCredentials2,
|
|
40
40
|
liveTestAmpCredentials2
|
|
41
|
-
} from "./cli-
|
|
41
|
+
} from "./cli-m23zjcy2.js";
|
|
42
42
|
import {
|
|
43
43
|
checkClaudeCredentials2
|
|
44
|
-
} from "./cli-
|
|
44
|
+
} from "./cli-y97qxcfx.js";
|
|
45
45
|
import {
|
|
46
46
|
checkClaudeManagedCredentials2
|
|
47
|
-
} from "./cli-
|
|
47
|
+
} from "./cli-ffhtssbp.js";
|
|
48
48
|
import {
|
|
49
49
|
codexUserHome,
|
|
50
50
|
checkCodexCredentials2
|
|
51
|
-
} from "./cli-
|
|
51
|
+
} from "./cli-2wnq8jkz.js";
|
|
52
52
|
import {
|
|
53
53
|
checkCursorCredentials2
|
|
54
|
-
} from "./cli-
|
|
54
|
+
} from "./cli-7b8sbmag.js";
|
|
55
55
|
import {
|
|
56
56
|
checkDevinCredentials2
|
|
57
|
-
} from "./cli-
|
|
57
|
+
} from "./cli-mrt48bx7.js";
|
|
58
58
|
import {
|
|
59
59
|
checkDshCredentials2
|
|
60
|
-
} from "./cli-
|
|
60
|
+
} from "./cli-wk18cm92.js";
|
|
61
61
|
import {
|
|
62
62
|
checkOpencodeCredentials2
|
|
63
|
-
} from "./cli-
|
|
63
|
+
} from "./cli-7p1kvkck.js";
|
|
64
64
|
import {
|
|
65
65
|
checkFxCredentials2
|
|
66
|
-
} from "./cli-
|
|
66
|
+
} from "./cli-yq3zak69.js";
|
|
67
67
|
import {
|
|
68
68
|
checkGrokCredentials2
|
|
69
|
-
} from "./cli-
|
|
69
|
+
} from "./cli-wcg8x116.js";
|
|
70
70
|
import {
|
|
71
71
|
CODEX_OAUTH_POOL_SLOTS_ENV,
|
|
72
72
|
isCodexOAuthConfigKey,
|
|
@@ -78,15 +78,13 @@ import {
|
|
|
78
78
|
init_context_window
|
|
79
79
|
} from "./cli-m88rpzkh.js";
|
|
80
80
|
import {
|
|
81
|
-
resumedTaskModelSelection,
|
|
82
|
-
init_model_pin,
|
|
83
81
|
isAzureDevOpsUrl,
|
|
84
82
|
canonicalAzureDevOpsRepoUrl,
|
|
85
83
|
parseAzureDevOpsRepoUrl,
|
|
86
84
|
init_azure_devops,
|
|
87
85
|
resolveScriptsOnlyMode,
|
|
88
86
|
init_scripts_only_mode
|
|
89
|
-
} from "./cli-
|
|
87
|
+
} from "./cli-rfywm85n.js";
|
|
90
88
|
import {
|
|
91
89
|
terminateRegisteredProcessGroups,
|
|
92
90
|
init_process_group
|
|
@@ -94,7 +92,7 @@ import {
|
|
|
94
92
|
import {
|
|
95
93
|
validateJsonSchema,
|
|
96
94
|
init_json_schema_validator
|
|
97
|
-
} from "./cli-
|
|
95
|
+
} from "./cli-qfedvmcr.js";
|
|
98
96
|
import {
|
|
99
97
|
authJsonToCredentialSelection,
|
|
100
98
|
credentialsToAuthJson,
|
|
@@ -113,7 +111,7 @@ import {
|
|
|
113
111
|
initialize,
|
|
114
112
|
ensure,
|
|
115
113
|
init_business_use
|
|
116
|
-
} from "./cli-
|
|
114
|
+
} from "./cli-p1bq50aa.js";
|
|
117
115
|
import {
|
|
118
116
|
mapTriggerSurface,
|
|
119
117
|
init_telemetry_context,
|
|
@@ -130,8 +128,10 @@ import {
|
|
|
130
128
|
init_output_schema,
|
|
131
129
|
vcsRepoName,
|
|
132
130
|
vcsRepoUrlMatches,
|
|
133
|
-
init_vcs_repo_match
|
|
134
|
-
|
|
131
|
+
init_vcs_repo_match,
|
|
132
|
+
resumedTaskModelSelection,
|
|
133
|
+
init_model_pin
|
|
134
|
+
} from "./cli-h38x262p.js";
|
|
135
135
|
import {
|
|
136
136
|
parseWorkerModelTierOverrides,
|
|
137
137
|
resolveTaskModelSelection,
|
|
@@ -139,7 +139,7 @@ import {
|
|
|
139
139
|
ProviderNameSchema,
|
|
140
140
|
WorkerNudgeSchema,
|
|
141
141
|
init_types4
|
|
142
|
-
} from "./cli-
|
|
142
|
+
} from "./cli-2zp0et3v.js";
|
|
143
143
|
import {
|
|
144
144
|
isCodexAuthFailureReason,
|
|
145
145
|
init_codex_auth_failure
|
|
@@ -169,7 +169,7 @@ import {
|
|
|
169
169
|
resolveClaudeMdPath,
|
|
170
170
|
syncProfileFilesToServer,
|
|
171
171
|
init_profile_sync
|
|
172
|
-
} from "./cli-
|
|
172
|
+
} from "./cli-tk7cjj8h.js";
|
|
173
173
|
import {
|
|
174
174
|
isSteeringEnabled2,
|
|
175
175
|
init_steering_enabled
|
|
@@ -186,18 +186,19 @@ import {
|
|
|
186
186
|
CREDENTIAL_POOL_VARS,
|
|
187
187
|
normalizeProviderKeyAliases,
|
|
188
188
|
ModelWindowExhaustedError,
|
|
189
|
+
CredentialAllowlistError,
|
|
189
190
|
splitCredentialPool,
|
|
190
191
|
CLAUDE_CREDENTIALS_HINT,
|
|
191
192
|
resolveCredentialPools,
|
|
192
193
|
init_credentials2
|
|
193
|
-
} from "./cli-
|
|
194
|
+
} from "./cli-5mrq3ake.js";
|
|
194
195
|
import {
|
|
195
196
|
interpolate,
|
|
196
197
|
init_template2,
|
|
197
198
|
configureHttpResolver,
|
|
198
199
|
resolveTemplateAsync,
|
|
199
200
|
init_resolver
|
|
200
|
-
} from "./cli-
|
|
201
|
+
} from "./cli-v1dv1r37.js";
|
|
201
202
|
import {
|
|
202
203
|
runtimeHarnessSections,
|
|
203
204
|
refreshRuntimeModelCatalog,
|
|
@@ -270,51 +271,51 @@ init_storage();
|
|
|
270
271
|
async function createProviderAdapter(provider) {
|
|
271
272
|
switch (provider) {
|
|
272
273
|
case "claude": {
|
|
273
|
-
const { ClaudeAdapter } = await import("./claude-adapter-
|
|
274
|
+
const { ClaudeAdapter } = await import("./claude-adapter-v221b2fd.js");
|
|
274
275
|
return new ClaudeAdapter;
|
|
275
276
|
}
|
|
276
277
|
case "pi": {
|
|
277
|
-
const { PiMonoAdapter } = await import("./pi-mono-adapter-
|
|
278
|
+
const { PiMonoAdapter } = await import("./pi-mono-adapter-546cd1cc.js");
|
|
278
279
|
return new PiMonoAdapter;
|
|
279
280
|
}
|
|
280
281
|
case "codex": {
|
|
281
|
-
const { CodexAdapter } = await import("./codex-adapter-
|
|
282
|
+
const { CodexAdapter } = await import("./codex-adapter-30j9bpzd.js");
|
|
282
283
|
return new CodexAdapter;
|
|
283
284
|
}
|
|
284
285
|
case "claude-managed": {
|
|
285
|
-
const { ClaudeManagedAdapter } = await import("./claude-managed-adapter-
|
|
286
|
+
const { ClaudeManagedAdapter } = await import("./claude-managed-adapter-29eq09wd.js");
|
|
286
287
|
return new ClaudeManagedAdapter;
|
|
287
288
|
}
|
|
288
289
|
case "devin": {
|
|
289
|
-
const { DevinAdapter } = await import("./devin-adapter-
|
|
290
|
+
const { DevinAdapter } = await import("./devin-adapter-xedz98zv.js");
|
|
290
291
|
return new DevinAdapter;
|
|
291
292
|
}
|
|
292
293
|
case "opencode": {
|
|
293
|
-
const { OpencodeAdapter } = await import("./opencode-adapter-
|
|
294
|
+
const { OpencodeAdapter } = await import("./opencode-adapter-dsagkhtw.js");
|
|
294
295
|
return new OpencodeAdapter;
|
|
295
296
|
}
|
|
296
297
|
case "dsh": {
|
|
297
|
-
const { DshAdapter } = await import("./dsh-adapter-
|
|
298
|
+
const { DshAdapter } = await import("./dsh-adapter-nrhbrjz8.js");
|
|
298
299
|
return new DshAdapter;
|
|
299
300
|
}
|
|
300
301
|
case "amp": {
|
|
301
|
-
const { AmpAdapter } = await import("./amp-adapter-
|
|
302
|
+
const { AmpAdapter } = await import("./amp-adapter-gv6cbb7d.js");
|
|
302
303
|
return new AmpAdapter;
|
|
303
304
|
}
|
|
304
305
|
case "cursor": {
|
|
305
|
-
const { CursorAdapter } = await import("./cursor-adapter-
|
|
306
|
+
const { CursorAdapter } = await import("./cursor-adapter-n5nc3mfe.js");
|
|
306
307
|
return new CursorAdapter;
|
|
307
308
|
}
|
|
308
309
|
case "grok": {
|
|
309
|
-
const { GrokAdapter } = await import("./grok-adapter-
|
|
310
|
+
const { GrokAdapter } = await import("./grok-adapter-4sqtebdk.js");
|
|
310
311
|
return new GrokAdapter;
|
|
311
312
|
}
|
|
312
313
|
case "fx": {
|
|
313
|
-
const { FxAdapter } = await import("./fx-adapter-
|
|
314
|
+
const { FxAdapter } = await import("./fx-adapter-b6w0kf56.js");
|
|
314
315
|
return new FxAdapter;
|
|
315
316
|
}
|
|
316
317
|
case "acp": {
|
|
317
|
-
const { ACPAdapter } = await import("./acp-adapter-
|
|
318
|
+
const { ACPAdapter } = await import("./acp-adapter-t949vbbp.js");
|
|
318
319
|
return new ACPAdapter;
|
|
319
320
|
}
|
|
320
321
|
default:
|
|
@@ -1314,7 +1315,7 @@ var CREDENTIAL_PROVIDER_CHECKERS = {
|
|
|
1314
1315
|
devin: (env) => checkDevinCredentials2(env),
|
|
1315
1316
|
opencode: (env, opts) => checkOpencodeCredentials2(env, opts),
|
|
1316
1317
|
pi: async (env, opts) => {
|
|
1317
|
-
const { checkPiMonoCredentials, listPiOpencodeGoModelIds } = await import("./pi-mono-adapter-
|
|
1318
|
+
const { checkPiMonoCredentials, listPiOpencodeGoModelIds } = await import("./pi-mono-adapter-546cd1cc.js");
|
|
1318
1319
|
return {
|
|
1319
1320
|
...await checkPiMonoCredentials(env, opts),
|
|
1320
1321
|
opencodeGoModels: listPiOpencodeGoModelIds()
|
|
@@ -1593,7 +1594,7 @@ async function validateProviderCredentials(provider, env = process.env, presence
|
|
|
1593
1594
|
latency_ms: Date.now() - startedAt
|
|
1594
1595
|
};
|
|
1595
1596
|
}
|
|
1596
|
-
const { liveTestCursorKey } = await import("./cursor-adapter-
|
|
1597
|
+
const { liveTestCursorKey } = await import("./cursor-adapter-n5nc3mfe.js");
|
|
1597
1598
|
return checkEachKey("CURSOR_API_KEY", apiKey, async (member) => {
|
|
1598
1599
|
const start = Date.now();
|
|
1599
1600
|
const result = await liveTestCursorKey(member);
|
|
@@ -2634,7 +2635,9 @@ async function fetchResolvedEnv(apiUrl, apiKey, agentId, baseEnv = process.env,
|
|
|
2634
2635
|
provider: resolvedProvider,
|
|
2635
2636
|
model: effectiveModel,
|
|
2636
2637
|
localBlocks: sessionContext?.localBlocks,
|
|
2637
|
-
enforceModelCapacity: sessionContext?.enforceModelCapacity
|
|
2638
|
+
enforceModelCapacity: sessionContext?.enforceModelCapacity,
|
|
2639
|
+
allowedKeySuffixes: sessionContext?.credentialAllowlist,
|
|
2640
|
+
allowlistProfile: sessionContext?.resolvedProfile
|
|
2638
2641
|
});
|
|
2639
2642
|
return { env, credentialEnv, credentialSelections, resolvedProvider, scriptsOnlyConfigValue };
|
|
2640
2643
|
}
|
|
@@ -4426,10 +4429,12 @@ async function spawnProviderProcess(adapter, opts, logDir) {
|
|
|
4426
4429
|
provider: adapter.name,
|
|
4427
4430
|
modelTier: opts.modelTier,
|
|
4428
4431
|
localBlocks: opts.localBlocks,
|
|
4429
|
-
enforceModelCapacity: true
|
|
4432
|
+
enforceModelCapacity: true,
|
|
4433
|
+
credentialAllowlist: opts.credentialAllowlist,
|
|
4434
|
+
resolvedProfile: opts.resolvedProfile
|
|
4430
4435
|
}));
|
|
4431
4436
|
} catch (err) {
|
|
4432
|
-
if (err instanceof ModelWindowExhaustedError && realTaskId) {
|
|
4437
|
+
if ((err instanceof ModelWindowExhaustedError || err instanceof CredentialAllowlistError) && realTaskId) {
|
|
4433
4438
|
const reason = err.message;
|
|
4434
4439
|
console.warn(`[${opts.role}] ${reason}`);
|
|
4435
4440
|
await ensureTaskFinished({ apiUrl: opts.apiUrl, apiKey: opts.apiKey, agentId: opts.agentId }, opts.role, realTaskId, 1, reason, undefined, opts.harnessProvider);
|
|
@@ -6220,7 +6225,9 @@ ${additionalSystemPrompt}` : basePrompt;
|
|
|
6220
6225
|
cwd: resumeCwd,
|
|
6221
6226
|
vcsRepo: task.vcsRepo,
|
|
6222
6227
|
contextKey: task.contextKey,
|
|
6223
|
-
localBlocks: state.modelWindowBlocks
|
|
6228
|
+
localBlocks: state.modelWindowBlocks,
|
|
6229
|
+
resolvedProfile: task.resolvedProfile,
|
|
6230
|
+
credentialAllowlist: task.credentialAllowlist
|
|
6224
6231
|
}, logDir);
|
|
6225
6232
|
} catch (spawnErr) {
|
|
6226
6233
|
const errMsg = spawnErr instanceof Error ? spawnErr.message : String(spawnErr);
|
|
@@ -6598,7 +6605,9 @@ ${additionalSystemPrompt}` : basePrompt;
|
|
|
6598
6605
|
cwd: effectiveCwd,
|
|
6599
6606
|
vcsRepo: taskVcsRepo,
|
|
6600
6607
|
contextKey: taskContextKey,
|
|
6601
|
-
localBlocks: state.modelWindowBlocks
|
|
6608
|
+
localBlocks: state.modelWindowBlocks,
|
|
6609
|
+
resolvedProfile: trigger.task?.resolvedProfile,
|
|
6610
|
+
credentialAllowlist: trigger.task?.credentialAllowlist
|
|
6602
6611
|
}, logDir);
|
|
6603
6612
|
} catch (spawnErr) {
|
|
6604
6613
|
const errMsg = spawnErr instanceof Error ? spawnErr.message : String(spawnErr);
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
createForeachAttemptSteps,
|
|
19
19
|
init_workflow_runs,
|
|
20
20
|
cancelTask2,
|
|
21
|
-
|
|
21
|
+
getRunWorkflow2,
|
|
22
22
|
getWorkflowRun2,
|
|
23
23
|
updateWorkflowRun2,
|
|
24
24
|
getWorkflowRunStep2,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
getPendingWaitsByEvent2,
|
|
35
35
|
resolveWaitState2,
|
|
36
36
|
init_db4
|
|
37
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-h38x262p.js";
|
|
38
38
|
import {
|
|
39
39
|
workflowEventBus2,
|
|
40
40
|
init_event_bus
|
|
@@ -79,12 +79,12 @@ import {
|
|
|
79
79
|
getNextTargets,
|
|
80
80
|
getSuccessors,
|
|
81
81
|
init_definition2
|
|
82
|
-
} from "./cli-
|
|
82
|
+
} from "./cli-qfedvmcr.js";
|
|
83
83
|
import {
|
|
84
84
|
RetryPolicySchema,
|
|
85
85
|
SUPERSEDED_WORKFLOW_TASK_REASON,
|
|
86
86
|
init_types4
|
|
87
|
-
} from "./cli-
|
|
87
|
+
} from "./cli-2zp0et3v.js";
|
|
88
88
|
import {
|
|
89
89
|
init_zod
|
|
90
90
|
} from "./cli-zcfpsfzf.js";
|
|
@@ -198,7 +198,7 @@ var init_sub_workflow = __esm(() => {
|
|
|
198
198
|
if (!workflow.enabled) {
|
|
199
199
|
return { status: "failed", error: `Workflow ${config.workflowId} is disabled` };
|
|
200
200
|
}
|
|
201
|
-
const parent = await db.
|
|
201
|
+
const parent = await db.getRunWorkflow({ id: meta.runId, workflowId: meta.workflowId });
|
|
202
202
|
const triggeredByAgentId = parent?.createdByAgentId ?? await getWorkflowRunTriggeredByAgentId(meta.runId) ?? undefined;
|
|
203
203
|
let childRunId;
|
|
204
204
|
try {
|
|
@@ -806,7 +806,7 @@ async function resumeFromTaskCompletionUnguarded(event, registry) {
|
|
|
806
806
|
return;
|
|
807
807
|
if (await isStaleTaskEvent(step.id, event))
|
|
808
808
|
return;
|
|
809
|
-
const workflow = await
|
|
809
|
+
const workflow = await getRunWorkflow2(run);
|
|
810
810
|
if (!workflow)
|
|
811
811
|
return;
|
|
812
812
|
const ctx = run.context ?? {};
|
|
@@ -864,7 +864,7 @@ async function handleTaskFailureUnguarded(event, reason, registry, options) {
|
|
|
864
864
|
return;
|
|
865
865
|
if (await isStaleTaskEvent(step.id, event))
|
|
866
866
|
return;
|
|
867
|
-
const workflow = await
|
|
867
|
+
const workflow = await getRunWorkflow2(run);
|
|
868
868
|
if (!workflow)
|
|
869
869
|
return;
|
|
870
870
|
if (options.retryable) {
|
|
@@ -905,7 +905,7 @@ async function recordLateForeachOutcome(run, stepId, event, outcome) {
|
|
|
905
905
|
return;
|
|
906
906
|
if (await isStaleTaskEvent(step.id, event))
|
|
907
907
|
return;
|
|
908
|
-
const workflow = await
|
|
908
|
+
const workflow = await getRunWorkflow2(run);
|
|
909
909
|
if (!workflow || !resolveForeachParent(workflow.definition, step.nodeId))
|
|
910
910
|
return;
|
|
911
911
|
await settleForeachChild(workflow.definition, run.id, step.id, outcome, run.context ?? {});
|
|
@@ -923,7 +923,7 @@ async function retryFailedRun2(runId, registry) {
|
|
|
923
923
|
const run = await getWorkflowRun2(runId);
|
|
924
924
|
if (!run || run.status !== "failed")
|
|
925
925
|
throw new Error("Run is not in failed state");
|
|
926
|
-
const workflow = await
|
|
926
|
+
const workflow = await getRunWorkflow2(run);
|
|
927
927
|
if (!workflow)
|
|
928
928
|
throw new Error("Workflow not found");
|
|
929
929
|
const steps = await getWorkflowRunStepsByRunId2(runId);
|
|
@@ -1109,7 +1109,7 @@ async function resumeFromApprovalResolutionUnguarded(event, registry) {
|
|
|
1109
1109
|
const step = await getWorkflowRunStep2(event.workflowRunStepId);
|
|
1110
1110
|
if (!step || step.status !== "waiting")
|
|
1111
1111
|
return;
|
|
1112
|
-
const workflow = await
|
|
1112
|
+
const workflow = await getRunWorkflow2(run);
|
|
1113
1113
|
if (!workflow)
|
|
1114
1114
|
return;
|
|
1115
1115
|
if (event.status === "cancelled") {
|
|
@@ -1153,7 +1153,7 @@ async function resumeClaimedWait(waitRow, status, cappedPayload, registry) {
|
|
|
1153
1153
|
const step = await getWorkflowRunStep2(waitRow.workflowRunStepId);
|
|
1154
1154
|
if (!step || step.status !== "waiting")
|
|
1155
1155
|
return;
|
|
1156
|
-
const workflow = await
|
|
1156
|
+
const workflow = await getRunWorkflow2(run);
|
|
1157
1157
|
if (!workflow)
|
|
1158
1158
|
return;
|
|
1159
1159
|
const nextPort = computeNextPort(waitRow.mode, status);
|
|
@@ -1187,7 +1187,7 @@ async function resumeFromChildRun2(parentStepId, registry) {
|
|
|
1187
1187
|
const run = await getWorkflowRun2(step.runId);
|
|
1188
1188
|
if (!run || run.status !== "waiting" && run.status !== "running")
|
|
1189
1189
|
return;
|
|
1190
|
-
const workflow = await
|
|
1190
|
+
const workflow = await getRunWorkflow2(run);
|
|
1191
1191
|
if (!workflow)
|
|
1192
1192
|
return;
|
|
1193
1193
|
const ctx = run.context ?? {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
materializeClaudeMd,
|
|
3
3
|
stopClaudeMd
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-qmqk2yc2.js";
|
|
5
5
|
import {
|
|
6
6
|
summarizeSession
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-g70vxtjh.js";
|
|
8
8
|
import {
|
|
9
9
|
contextBoundNoteThreshold,
|
|
10
10
|
injectClaimedContextBoundNote
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-xzm9vcfg.js";
|
|
12
12
|
import {
|
|
13
13
|
guardGhPrBody,
|
|
14
14
|
guardGhPrRoom
|
|
@@ -33,11 +33,11 @@ import {
|
|
|
33
33
|
warnProfileFileTooLarge,
|
|
34
34
|
buildIndependentIdentityPayloads,
|
|
35
35
|
init_profile_sync
|
|
36
|
-
} from "./cli-
|
|
36
|
+
} from "./cli-tk7cjj8h.js";
|
|
37
37
|
import {
|
|
38
38
|
init_package,
|
|
39
39
|
package_default
|
|
40
|
-
} from "./cli-
|
|
40
|
+
} from "./cli-334z18y3.js";
|
|
41
41
|
import {
|
|
42
42
|
MAX_PROFILE_FILE_LENGTH,
|
|
43
43
|
getMcpBaseUrl,
|
|
@@ -30,10 +30,11 @@ import {
|
|
|
30
30
|
emitRunFinished,
|
|
31
31
|
createForeachChildSteps,
|
|
32
32
|
init_workflow_runs,
|
|
33
|
+
pinWorkflowDefinition2,
|
|
34
|
+
getRunWorkflow2,
|
|
33
35
|
createTaskExtended2,
|
|
34
36
|
getSwarmConfigs2,
|
|
35
37
|
upsertSwarmConfig2,
|
|
36
|
-
getWorkflow2,
|
|
37
38
|
createWorkflowRun2,
|
|
38
39
|
getWorkflowRun2,
|
|
39
40
|
updateWorkflowRun2,
|
|
@@ -56,21 +57,21 @@ import {
|
|
|
56
57
|
releaseApprovalCancellationNotificationClaim2,
|
|
57
58
|
updateApprovalRequestNotifications2,
|
|
58
59
|
init_db4
|
|
59
|
-
} from "./cli-
|
|
60
|
+
} from "./cli-h38x262p.js";
|
|
60
61
|
import {
|
|
61
62
|
externalChannelToolError2,
|
|
62
63
|
isBlockExternalEnabled2,
|
|
63
64
|
getChannelBlockReason2,
|
|
64
65
|
init_external_channel
|
|
65
|
-
} from "./cli-
|
|
66
|
+
} from "./cli-qsnnd04k.js";
|
|
66
67
|
import {
|
|
67
68
|
getSlackApp2,
|
|
68
69
|
init_app3
|
|
69
|
-
} from "./cli-
|
|
70
|
+
} from "./cli-p1bq50aa.js";
|
|
70
71
|
import {
|
|
71
72
|
resolveCredential,
|
|
72
73
|
init_credentials
|
|
73
|
-
} from "./cli-
|
|
74
|
+
} from "./cli-x1wa213s.js";
|
|
74
75
|
import {
|
|
75
76
|
isMultiRuntimeEnabled,
|
|
76
77
|
init_multi_runtime2
|
|
@@ -78,11 +79,11 @@ import {
|
|
|
78
79
|
import {
|
|
79
80
|
revokeRuntimeTokensForRuntime,
|
|
80
81
|
init_users
|
|
81
|
-
} from "./cli-
|
|
82
|
+
} from "./cli-gxkx0zzp.js";
|
|
82
83
|
import {
|
|
83
84
|
TERMINAL_TASK_STATUSES,
|
|
84
85
|
init_types4
|
|
85
|
-
} from "./cli-
|
|
86
|
+
} from "./cli-2zp0et3v.js";
|
|
86
87
|
import {
|
|
87
88
|
getSlackConfiguration,
|
|
88
89
|
isSlackConfigured,
|
|
@@ -100,13 +101,13 @@ import {
|
|
|
100
101
|
import {
|
|
101
102
|
selectCredential,
|
|
102
103
|
init_credentials2
|
|
103
|
-
} from "./cli-
|
|
104
|
+
} from "./cli-5mrq3ake.js";
|
|
104
105
|
import {
|
|
105
106
|
deepInterpolate,
|
|
106
107
|
init_template2,
|
|
107
108
|
resolveTemplate,
|
|
108
109
|
init_resolver
|
|
109
|
-
} from "./cli-
|
|
110
|
+
} from "./cli-v1dv1r37.js";
|
|
110
111
|
import {
|
|
111
112
|
init_zod
|
|
112
113
|
} from "./cli-zcfpsfzf.js";
|
|
@@ -155,7 +156,7 @@ async function notifyAutomationPreflightFailure(preflight) {
|
|
|
155
156
|
return;
|
|
156
157
|
}
|
|
157
158
|
try {
|
|
158
|
-
const { getSlackApp } = await import("./app-
|
|
159
|
+
const { getSlackApp } = await import("./app-b9fbkp9v.js");
|
|
159
160
|
const app = getSlackApp();
|
|
160
161
|
if (!app) {
|
|
161
162
|
console.warn("[Automation Preflight] Slack not available, cannot send notification");
|
|
@@ -711,6 +712,23 @@ async function agentsWithLiveRuntime() {
|
|
|
711
712
|
WHERE status = 'active' AND last_seen_at >= ?`, [runtimeLivenessCutoff()]);
|
|
712
713
|
return new Set(rows.map((r) => r.agent_id));
|
|
713
714
|
}
|
|
715
|
+
async function liveRuntimeAuthModes() {
|
|
716
|
+
const now = new Date().toISOString();
|
|
717
|
+
const rows = await getDbClient2().query(`SELECT r.agent_id, EXISTS(
|
|
718
|
+
SELECT 1 FROM session_tokens s
|
|
719
|
+
WHERE s.runtimeId = r.id AND s.agentId = r.agent_id
|
|
720
|
+
AND s.revokedAt IS NULL AND s.expiresAt > ?
|
|
721
|
+
) AS runtime_token
|
|
722
|
+
FROM runtime_instances r
|
|
723
|
+
WHERE r.status = 'active' AND r.last_seen_at >= ?`, [now, runtimeLivenessCutoff()]);
|
|
724
|
+
const modes = new Map;
|
|
725
|
+
for (const row of rows) {
|
|
726
|
+
const list = modes.get(row.agent_id) ?? [];
|
|
727
|
+
list.push(row.runtime_token === 1);
|
|
728
|
+
modes.set(row.agent_id, list);
|
|
729
|
+
}
|
|
730
|
+
return modes;
|
|
731
|
+
}
|
|
714
732
|
async function expireStaleRuntimeInstances() {
|
|
715
733
|
if (!isMultiRuntimeEnabled()) {
|
|
716
734
|
return { expired: 0, agentsOffline: 0, pruned: 0 };
|
|
@@ -3821,7 +3839,8 @@ var init_json_schema_validator = () => {};
|
|
|
3821
3839
|
|
|
3822
3840
|
// src/workflows/limits.ts
|
|
3823
3841
|
function getMaxWorkflowStepsPerRun() {
|
|
3824
|
-
|
|
3842
|
+
const value = Number(process.env.WORKFLOW_MAX_STEPS_PER_RUN);
|
|
3843
|
+
return Number.isInteger(value) && value > 0 ? value : DEFAULT_MAX_STEPS_PER_RUN;
|
|
3825
3844
|
}
|
|
3826
3845
|
var DEFAULT_MAX_STEPS_PER_RUN = 500;
|
|
3827
3846
|
var init_limits = () => {};
|
|
@@ -3969,7 +3988,8 @@ var init_validation = () => {};
|
|
|
3969
3988
|
|
|
3970
3989
|
// src/workflows/engine.ts
|
|
3971
3990
|
function maxIterations() {
|
|
3972
|
-
|
|
3991
|
+
const value = Number(process.env.WORKFLOW_MAX_ITERATIONS);
|
|
3992
|
+
return Number.isInteger(value) && value > 0 ? value : 100;
|
|
3973
3993
|
}
|
|
3974
3994
|
async function resolveRenderedWorkflowInputs(input) {
|
|
3975
3995
|
const stringInputs = {};
|
|
@@ -3983,6 +4003,7 @@ async function resolveRenderedWorkflowInputs(input) {
|
|
|
3983
4003
|
return { ...resolved, ...await resolveInputs(stringInputs) };
|
|
3984
4004
|
}
|
|
3985
4005
|
async function startWorkflowExecution2(workflow, triggerData, registry, options = {}) {
|
|
4006
|
+
const pinSource = workflow;
|
|
3986
4007
|
const preflight = preflightAutomation(workflowPreflightInput(workflow), await getAutomationSetupStates());
|
|
3987
4008
|
if (preflight.state === "needs_setup" && !options.parentStepId) {
|
|
3988
4009
|
const { runId, recorded } = await getDbClient2().transaction(async () => {
|
|
@@ -4025,7 +4046,7 @@ async function startWorkflowExecution2(workflow, triggerData, registry, options
|
|
|
4025
4046
|
const newRunId = crypto.randomUUID();
|
|
4026
4047
|
const release = holdWorkflowRun(newRunId);
|
|
4027
4048
|
try {
|
|
4028
|
-
const { runId, created, preflightAlert, status } = await createRunWithInitialState(workflow, triggerData, options, initial, newRunId);
|
|
4049
|
+
const { runId, created, preflightAlert, status } = await createRunWithInitialState(workflow, triggerData, options, initial, newRunId, pinSource);
|
|
4029
4050
|
if (!created)
|
|
4030
4051
|
return runId;
|
|
4031
4052
|
if (initial.status === "failed" && initial.preflight) {
|
|
@@ -4084,7 +4105,7 @@ async function buildInitialRunState(workflow, triggerData, registry, options) {
|
|
|
4084
4105
|
}
|
|
4085
4106
|
return { context: ctx };
|
|
4086
4107
|
}
|
|
4087
|
-
async function createRunWithInitialState(workflow, triggerData, options, initial, runId) {
|
|
4108
|
+
async function createRunWithInitialState(workflow, triggerData, options, initial, runId, pinSource) {
|
|
4088
4109
|
return getDbClient2().transaction(async () => {
|
|
4089
4110
|
const { parentStepId } = options;
|
|
4090
4111
|
const attempt = options.parentStepAttempt ?? 0;
|
|
@@ -4097,6 +4118,7 @@ async function createRunWithInitialState(workflow, triggerData, options, initial
|
|
|
4097
4118
|
return { runId: existingId, created: false };
|
|
4098
4119
|
}
|
|
4099
4120
|
const state = !initial.status && workflow.cooldown && await shouldSkipCooldown(workflow.id, workflow.cooldown) ? { status: "skipped", error: "cooldown", finishedAt: new Date().toISOString() } : initial;
|
|
4121
|
+
const definitionHash = await pinWorkflowDefinition2(pinSource);
|
|
4100
4122
|
await createWorkflowRun2({
|
|
4101
4123
|
id: runId,
|
|
4102
4124
|
workflowId: workflow.id,
|
|
@@ -4105,7 +4127,8 @@ async function createRunWithInitialState(workflow, triggerData, options, initial
|
|
|
4105
4127
|
createdBy: options.requestedByUserId,
|
|
4106
4128
|
parentStepId,
|
|
4107
4129
|
parentStepAttempt: parentStepId ? attempt : undefined,
|
|
4108
|
-
triggeredByAgentId: options.triggeredByAgentId
|
|
4130
|
+
triggeredByAgentId: options.triggeredByAgentId,
|
|
4131
|
+
definitionHash
|
|
4109
4132
|
});
|
|
4110
4133
|
await updateWorkflowRun2(runId, state.status ? { status: state.status, error: state.error, finishedAt: state.finishedAt } : { context: state.context });
|
|
4111
4134
|
const preflightAlert = state.status === "failed" && state.preflight ? await isFirstWorkflowPreflightFailureToday(workflow.id, runId) : undefined;
|
|
@@ -4562,7 +4585,7 @@ async function runClaimedStep(def, runId, ctx, node, registry, existingStep, ste
|
|
|
4562
4585
|
}
|
|
4563
4586
|
const waiting = await checkpointStepWaiting(runId, stepId, ctx);
|
|
4564
4587
|
if (waiting && result.waitFor === "workflow.child.finished") {
|
|
4565
|
-
const { resumeFromChildRun } = await import("./resume-
|
|
4588
|
+
const { resumeFromChildRun } = await import("./resume-cnnrjfxa.js");
|
|
4566
4589
|
await resumeFromChildRun(stepId, registry);
|
|
4567
4590
|
}
|
|
4568
4591
|
return { outcome: waiting ? "waiting" : "completed", successors: [] };
|
|
@@ -4875,7 +4898,10 @@ var init_foreach = __esm(() => {
|
|
|
4875
4898
|
const missingItems = items.filter(({ itemKey }) => !existingChildNodeIds.has(`${meta.nodeId}#${itemKey}`));
|
|
4876
4899
|
const childCountToCreate = missingItems.length;
|
|
4877
4900
|
const maxSteps = getMaxWorkflowStepsPerRun();
|
|
4878
|
-
const workflow = await this.deps.db.
|
|
4901
|
+
const workflow = await this.deps.db.getRunWorkflow({
|
|
4902
|
+
id: meta.runId,
|
|
4903
|
+
workflowId: meta.workflowId
|
|
4904
|
+
});
|
|
4879
4905
|
const hasSuccessors = workflow ? getSuccessors(workflow.definition, meta.nodeId).length > 0 : true;
|
|
4880
4906
|
const totalSteps = runSteps.length + childCountToCreate;
|
|
4881
4907
|
const capBreached = hasSuccessors ? totalSteps >= maxSteps : totalSteps > maxSteps;
|
|
@@ -4952,7 +4978,7 @@ async function driveForeach(runId, parentNodeId, registry, options = {}) {
|
|
|
4952
4978
|
const run = await getWorkflowRun2(runId);
|
|
4953
4979
|
if (!run || run.status !== "running" && run.status !== "waiting")
|
|
4954
4980
|
return NOT_JOINED;
|
|
4955
|
-
const workflow = await getRenderedWorkflow(run
|
|
4981
|
+
const workflow = await getRenderedWorkflow(run);
|
|
4956
4982
|
if (!workflow)
|
|
4957
4983
|
return NOT_JOINED;
|
|
4958
4984
|
const def = workflow.definition;
|
|
@@ -5060,14 +5086,14 @@ async function runForeachDrive(runId, parentNodeId, registry) {
|
|
|
5060
5086
|
return drive;
|
|
5061
5087
|
}
|
|
5062
5088
|
const run = await getWorkflowRun2(runId);
|
|
5063
|
-
const workflow = run ? await getRenderedWorkflow(run
|
|
5089
|
+
const workflow = run ? await getRenderedWorkflow(run) : null;
|
|
5064
5090
|
if (!run || !workflow)
|
|
5065
5091
|
return drive;
|
|
5066
5092
|
const ctx = run.context ?? {};
|
|
5067
5093
|
if (drive.successors.length > 0) {
|
|
5068
5094
|
await walkGraph(workflow.definition, runId, ctx, drive.successors, registry, workflow.id, getSecretInputKeys(workflow.input));
|
|
5069
5095
|
} else {
|
|
5070
|
-
const { finalizeOrWait } = await import("./resume-
|
|
5096
|
+
const { finalizeOrWait } = await import("./resume-cnnrjfxa.js");
|
|
5071
5097
|
await finalizeOrWait(runId);
|
|
5072
5098
|
}
|
|
5073
5099
|
return drive;
|
|
@@ -5075,8 +5101,8 @@ async function runForeachDrive(runId, parentNodeId, registry) {
|
|
|
5075
5101
|
release();
|
|
5076
5102
|
}
|
|
5077
5103
|
}
|
|
5078
|
-
async function getRenderedWorkflow(
|
|
5079
|
-
const workflow = await
|
|
5104
|
+
async function getRenderedWorkflow(run) {
|
|
5105
|
+
const workflow = await getRunWorkflow2(run);
|
|
5080
5106
|
return workflow ? renderAutomationTokens(workflow, workflow.params ?? {}) : null;
|
|
5081
5107
|
}
|
|
5082
5108
|
async function childLiveness(runId, stepId) {
|
|
@@ -5210,7 +5236,7 @@ async function startChild(input) {
|
|
|
5210
5236
|
const parked = await getDbClient2().get("UPDATE workflow_run_steps SET status = 'waiting' WHERE id = ? AND status = 'running' RETURNING id", [child.id]);
|
|
5211
5237
|
if (parked && result.waitFor === "workflow.child.finished") {
|
|
5212
5238
|
ownedChildren.delete(child.id);
|
|
5213
|
-
const { resumeFromChildRun } = await import("./resume-
|
|
5239
|
+
const { resumeFromChildRun } = await import("./resume-cnnrjfxa.js");
|
|
5214
5240
|
await resumeFromChildRun(child.id, registry);
|
|
5215
5241
|
}
|
|
5216
5242
|
return null;
|
|
@@ -5868,4 +5894,4 @@ var init_definition2 = __esm(() => {
|
|
|
5868
5894
|
init_foreach_body();
|
|
5869
5895
|
});
|
|
5870
5896
|
|
|
5871
|
-
export { notifyAutomationPreflightFailure, init_automation_preflight_alert, automationIntegrationFixUrl, isNeedsSetupFailure, preflightAutomation, renderAutomationTokens, getAutomationSetupStates, schedulePreflightInput, listEnabledAutomationPreflightInputs, recordSchedulePreflightFailure, init_automation_preflight, BaseExecutor, init_base, AGENT_MAX_TASKS_CONFIG_KEY, reconcileAgentMaxTasksPolicy, resetAgentMaxTasksMirror, upsertSwarmConfigWithPolicyMirror, runtimeStaleThresholdMinutes, upsertRuntimeInstance, getRuntimeInstanceById, insertProvisioningRuntime, markRuntimeTerminated, touchRuntimeInstance, markRuntimeInstanceOffline, countActiveRuntimeInstancesForAgent, listRuntimeInstancesForAgent, setRuntimeCredentialReady, reconcileAgentStatusFromRuntimes, agentsWithLiveRuntime, expireStaleRuntimeInstances, listRuntimeInstancesForPool, init_multi_runtime, ConfigQuestionSettingsSchema, ConfigStateSchema, readConfigState, normalizeApprovalQuestions, isConfigQuestion, parseConfigAnswer, skippedConfigResult, keptConfigResult, applyConfigAnswer, init_approval_config_question, resolveSlackConversationId, init_dm, dispatchApprovalNotifications, postApprovalCancellationUpdates, createApprovalFollowUpTask, init_approval_notifications, HumanInTheLoopExecutor, init_human_in_the_loop, resolveWorkflowLlmConfig, init_workflow_llm, SYSTEM_ONE_PROVIDER_IDS, init_system_one_providers, SystemOneExtractionExecutor, init_system_one_extraction, SYSTEM_ONE_DECISION_NODE_TYPE, SystemOneDecisionConfigSchema, SystemOneDecisionExecutor, init_system_one_decision, checkpointStep, checkpointStepFailure, checkpointStepWaiting, init_checkpoint, FAILED_TASK_OUTPUT_PREFIX, FOREACH_ITEMS_WAIT_FOR, init_constants, loadCompletedStepRouting, init_completed_step_routing, resolveInputValue, getSecretInputKeys, init_input, validateJsonSchema, findJsonSchemaShapeErrors, init_json_schema_validator, getMaxWorkflowStepsPerRun, init_limits, findWorkflowReadinessProblems, formatReadinessProblems, workflowSaveWarnings, withSaveWarnings, init_readiness, init_template, runStepValidation, init_validation, TriggerSchemaError, startWorkflowExecution2, ParentStepNotCurrentError, failRunOnUnreadableReplay, isWorkflowRunActive, isStepExecuting, holdWorkflowRun, walkGraph, hasRunningStep, findReadyNodes, scriptBodyInterpolationError, init_engine, ForeachExecutor, init_foreach, rebuildNodeExecutionInput, init_step_input, isForeachChildOwned, parkAndDriveForeach, startForeachDrive, runForeachDrive, init_foreach_driver, FOREACH_TERMINAL_STEP_STATUSES, isRetryPending, parseSyntheticNodeId, resolveForeachParent, settleForeachChild, init_foreach_join, resolveStepNode, stepFailureMode, init_foreach_body, getNextTargets, generateEdges, resolveValidationPort, getSuccessors, definitionNodeIds, validateDefinition, applyDefinitionPatch, init_definition2 };
|
|
5897
|
+
export { notifyAutomationPreflightFailure, init_automation_preflight_alert, automationIntegrationFixUrl, isNeedsSetupFailure, preflightAutomation, renderAutomationTokens, getAutomationSetupStates, schedulePreflightInput, listEnabledAutomationPreflightInputs, recordSchedulePreflightFailure, init_automation_preflight, BaseExecutor, init_base, AGENT_MAX_TASKS_CONFIG_KEY, reconcileAgentMaxTasksPolicy, resetAgentMaxTasksMirror, upsertSwarmConfigWithPolicyMirror, runtimeStaleThresholdMinutes, upsertRuntimeInstance, getRuntimeInstanceById, insertProvisioningRuntime, markRuntimeTerminated, touchRuntimeInstance, markRuntimeInstanceOffline, countActiveRuntimeInstancesForAgent, listRuntimeInstancesForAgent, setRuntimeCredentialReady, reconcileAgentStatusFromRuntimes, agentsWithLiveRuntime, liveRuntimeAuthModes, expireStaleRuntimeInstances, listRuntimeInstancesForPool, init_multi_runtime, ConfigQuestionSettingsSchema, ConfigStateSchema, readConfigState, normalizeApprovalQuestions, isConfigQuestion, parseConfigAnswer, skippedConfigResult, keptConfigResult, applyConfigAnswer, init_approval_config_question, resolveSlackConversationId, init_dm, dispatchApprovalNotifications, postApprovalCancellationUpdates, createApprovalFollowUpTask, init_approval_notifications, HumanInTheLoopExecutor, init_human_in_the_loop, resolveWorkflowLlmConfig, init_workflow_llm, SYSTEM_ONE_PROVIDER_IDS, init_system_one_providers, SystemOneExtractionExecutor, init_system_one_extraction, SYSTEM_ONE_DECISION_NODE_TYPE, SystemOneDecisionConfigSchema, SystemOneDecisionExecutor, init_system_one_decision, checkpointStep, checkpointStepFailure, checkpointStepWaiting, init_checkpoint, FAILED_TASK_OUTPUT_PREFIX, FOREACH_ITEMS_WAIT_FOR, init_constants, loadCompletedStepRouting, init_completed_step_routing, resolveInputValue, getSecretInputKeys, init_input, validateJsonSchema, findJsonSchemaShapeErrors, init_json_schema_validator, getMaxWorkflowStepsPerRun, init_limits, findWorkflowReadinessProblems, formatReadinessProblems, workflowSaveWarnings, withSaveWarnings, init_readiness, init_template, runStepValidation, init_validation, TriggerSchemaError, startWorkflowExecution2, ParentStepNotCurrentError, failRunOnUnreadableReplay, isWorkflowRunActive, isStepExecuting, holdWorkflowRun, walkGraph, hasRunningStep, findReadyNodes, scriptBodyInterpolationError, init_engine, ForeachExecutor, init_foreach, rebuildNodeExecutionInput, init_step_input, isForeachChildOwned, parkAndDriveForeach, startForeachDrive, runForeachDrive, init_foreach_driver, FOREACH_TERMINAL_STEP_STATUSES, isRetryPending, parseSyntheticNodeId, resolveForeachParent, settleForeachChild, init_foreach_join, resolveStepNode, stepFailureMode, init_foreach_body, getNextTargets, generateEdges, resolveValidationPort, getSuccessors, definitionNodeIds, validateDefinition, applyDefinitionPatch, init_definition2 };
|