@desplega.ai/agent-swarm 2.7.5 → 2.7.7
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-g3ads55s.js → acp-adapter-7b4vk3h5.js} +5 -4
- package/dist/{actions-zwfykqqk.js → actions-3tt153af.js} +18 -17
- package/dist/{amp-adapter-z3s0ssdt.js → amp-adapter-njpts0yr.js} +1 -1
- package/dist/{anthropic-messages-x4q6rfq5.js → anthropic-messages-xey2skwx.js} +7 -7
- package/dist/{app-vmp4fgep.js → app-nky4378f.js} +3 -3
- package/dist/{assistant-vwde653f.js → assistant-jnb669pa.js} +24 -22
- package/dist/{azure-openai-responses-s1w5n70z.js → azure-openai-responses-26t7j9ra.js} +5 -5
- package/dist/{boot-reembed-375t7tbk.js → boot-reembed-9mgvaztt.js} +1 -1
- package/dist/{boot-reembed-gq9rcpnj.js → boot-reembed-qs2djdej.js} +1 -1
- package/dist/{boot-scrub-sweep-nd938kyf.js → boot-scrub-sweep-yjpdj7s1.js} +3 -3
- package/dist/{boot-seeds-aykx51v3.js → boot-seeds-5cm6ambd.js} +4 -4
- package/dist/{boxd-k1j26g3h.js → boxd-nv507va8.js} +5 -5
- package/dist/{claude-adapter-8j4hm099.js → claude-adapter-fn287zmm.js} +5 -4
- package/dist/{claude-managed-setup-0wyynpn1.js → claude-managed-setup-wtdz2mj2.js} +1 -1
- package/dist/{claude-sdk-session-q6wj5hmy.js → claude-sdk-session-x91kqyhm.js} +9677 -9514
- package/dist/{cli-j3jvnpe8.js → cli-08bmz9z9.js} +1 -1
- package/dist/{cli-gjr2y2xk.js → cli-0agcv1v5.js} +4 -1
- package/dist/{cli-y24sc29k.js → cli-1c6tzt8g.js} +30 -8
- package/dist/{cli-mjzynrse.js → cli-35rsp8ye.js} +1 -1
- package/dist/{cli-rpm2sgv0.js → cli-3fg0bdcv.js} +19 -2
- package/dist/{cli-nn4d8dne.js → cli-5b456bpf.js} +2 -2
- package/dist/{cli-bhjt02p8.js → cli-5jnhv72d.js} +1 -1
- package/dist/{cli-fqzx7gwa.js → cli-5zx699j9.js} +2 -2
- package/dist/{cli-hf6zt5m6.js → cli-69szn7w7.js} +17 -1
- package/dist/{cli-vqypxzh4.js → cli-6g0hb4cp.js} +8 -8
- package/dist/{cli-tqgg40ek.js → cli-6pfd54vx.js} +9 -8
- package/dist/{cli-bsn8nhrq.js → cli-6vcp76qk.js} +3 -3
- package/dist/{cli-zppwg9p9.js → cli-72v799xn.js} +1 -1
- package/dist/cli-82j36f2m.js +45 -0
- package/dist/{cli-hn9hxmz9.js → cli-8305gbq0.js} +29 -16
- package/dist/{cli-z8eh3ex8.js → cli-8sckt74b.js} +8 -8
- package/dist/{cli-bnz7a7qf.js → cli-95jzxcp3.js} +1 -1
- package/dist/{cli-0bxqnvq9.js → cli-adeegh7d.js} +29 -7
- package/dist/{cli-g61qxmge.js → cli-afkqkrtw.js} +3 -3
- package/dist/{cli-7a42nfy0.js → cli-ayayvfg4.js} +24 -4
- package/dist/{cli-bqt1mptt.js → cli-az48n0nr.js} +4 -4
- package/dist/{cli-z6jkx23q.js → cli-bfv7vdg6.js} +9 -9
- package/dist/{cli-pywf3eh5.js → cli-caj33vcq.js} +5 -5
- package/dist/{cli-5pag6rmn.js → cli-cb2a8pna.js} +1 -1
- package/dist/{cli-wvaawacd.js → cli-cppkf404.js} +5236 -72
- package/dist/{cli-mry0qzym.js → cli-ddaanqkd.js} +123 -10
- package/dist/{cli-0gey5fzy.js → cli-e0kmphd6.js} +2 -2
- package/dist/{cli-zh3fp8v2.js → cli-e46hg0xw.js} +1 -1
- package/dist/{cli-jm2vfpfd.js → cli-e5bzrn01.js} +1 -1
- package/dist/{cli-qxnf8z2z.js → cli-excnnjg2.js} +165 -153
- package/dist/{cli-71ptav7x.js → cli-ferkkrg9.js} +1 -1
- package/dist/{cli-vpf89f34.js → cli-fmjd0t1y.js} +3 -3
- package/dist/{cli-rm6hqj3z.js → cli-fyt2g4wd.js} +33 -139
- package/dist/cli-g08zdaec.js +55 -0
- package/dist/{cli-ehq736cn.js → cli-g7s47cc5.js} +4 -4
- package/dist/{cli-82ae98pz.js → cli-gz6q4eve.js} +3 -3
- package/dist/{cli-82jg7fp9.js → cli-he5nxaa8.js} +1 -1
- package/dist/{cli-rqkxrmgw.js → cli-je518txm.js} +39 -14
- package/dist/{cli-8hs41zy2.js → cli-jtjtabxe.js} +1 -1
- package/dist/{cli-611a1294.js → cli-k0wwfqbg.js} +18 -1
- package/dist/{cli-nzxr556s.js → cli-k1nje3v3.js} +38 -43
- package/dist/{cli-3h4nhjn8.js → cli-k8196sh2.js} +9 -7
- package/dist/{cli-afrrppsw.js → cli-k899ehvh.js} +2 -2
- package/dist/{cli-0731hvbw.js → cli-m0da8j35.js} +23 -9
- package/dist/cli-m2z8jagn.js +12078 -0
- package/dist/{cli-8veytvbh.js → cli-mkk9rnzz.js} +5 -5
- package/dist/{cli-7wspm5gm.js → cli-n6bv12jn.js} +528 -6
- package/dist/{cli-spknvxbq.js → cli-nmzhp1b5.js} +14 -12
- package/dist/{cli-p599f1qm.js → cli-p82cnnjq.js} +1 -1
- package/dist/{cli-xtjhfmpc.js → cli-pc6n7fre.js} +1 -1
- package/dist/{cli-vbyfwh92.js → cli-pjctyea3.js} +2 -2
- package/dist/{cli-nmbmy64z.js → cli-pq73h5mz.js} +3 -3
- package/dist/{cli-aa6yxc7m.js → cli-pz4rk021.js} +1 -1
- package/dist/{cli-7wcyk2s5.js → cli-q3tkegby.js} +1 -1
- package/dist/cli-qghe0h66.js +67 -0
- package/dist/{cli-6s7vdcta.js → cli-qh4d4tvk.js} +4 -4
- package/dist/{cli-mmwm7zbf.js → cli-rtt8g4v9.js} +1 -1
- package/dist/{cli-kg8hchyg.js → cli-sa02jsqt.js} +1 -1
- package/dist/{cli-1h3wcpbw.js → cli-snpj5zbj.js} +2 -2
- package/dist/{cli-a7v854rf.js → cli-tgrv9cjx.js} +263 -12
- package/dist/{cli-a47xy8eq.js → cli-vz22fyqv.js} +186 -54
- package/dist/{cli-1ayk1eas.js → cli-wk5yrfwd.js} +285 -42
- package/dist/{cli-1338796d.js → cli-ws19768n.js} +1755 -119
- package/dist/{cli-70r77n04.js → cli-xae4g51r.js} +1 -1
- package/dist/{cli-gf5hbmdr.js → cli-yjdgea32.js} +3 -3
- package/dist/{cli-xbkdm710.js → cli-yndmfxb3.js} +3 -3
- package/dist/{cli-rhw40jgb.js → cli-yyj3j5m4.js} +2 -2
- package/dist/cli.js +26 -25
- package/dist/{cloudflare-workers-ai-system-one-bm60fjm0.js → cloudflare-workers-ai-system-one-ef2a980q.js} +2 -2
- package/dist/{codex-adapter-q6k3gnyg.js → codex-adapter-cf2yxe9m.js} +3 -2
- package/dist/{codex-hook-9efm2x1m.js → codex-hook-a0c6g6t6.js} +1 -1
- package/dist/{codex-session-runner-3mwmk3d9.js → codex-session-runner-6vfzdgbd.js} +3 -2
- package/dist/{commands-evrenjn9.js → commands-t3mfy7vn.js} +9 -3
- package/dist/{controller-xjp8vswh.js → controller-q7xrbaz0.js} +8 -3
- package/dist/{controllers-connect-pp5jnxvc.js → controllers-connect-c6nm70kg.js} +20 -19
- package/dist/{cursor-adapter-yf47w4t0.js → cursor-adapter-ftd81ga8.js} +1 -1
- package/dist/{db-zxpw6aht.js → db-dk572x25.js} +3 -3
- package/dist/{db-rgfsh91f.js → db-vemtpmcc.js} +14 -4
- package/dist/{devtools-82fzqra8.js → devtools-qxfgbsqz.js} +1 -1
- package/dist/{dispatcher-smasgws7.js → dispatcher-kh7ecxh9.js} +17 -16
- package/dist/{docker-rrjhaqt9.js → docker-c1a3gqmf.js} +89 -22
- package/dist/{dsh-adapter-ftyy8dnp.js → dsh-adapter-v8628r89.js} +1 -1
- package/dist/{e2b-w1p0bnpm.js → e2b-fr12yccx.js} +5 -5
- package/dist/{e2b-qcaj675y.js → e2b-x6ywzak3.js} +3 -3
- package/dist/{easter-egg-3d-yyts7p16.js → easter-egg-3d-nenw4x63.js} +1 -1
- package/dist/{embedding-space-1z0mbg95.js → embedding-space-0jepb239.js} +6 -6
- package/dist/{embeddings-ygeg7tm7.js → embeddings-xxt49yxg.js} +1 -1
- package/dist/{execute-14qhqp4d.js → execute-1mhw6e4x.js} +1 -1
- package/dist/{external-channel-ttgrs3sx.js → external-channel-55v12e60.js} +2 -2
- package/dist/{fx-adapter-gt6pncj2.js → fx-adapter-bs8wqrk5.js} +6 -5
- package/dist/{google-generative-ai-yvmdxyxa.js → google-generative-ai-v94hr7h0.js} +5 -5
- package/dist/{google-vertex-jrtdh9gs.js → google-vertex-g7vr6cf8.js} +5 -5
- package/dist/{grok-adapter-sm4m5k4g.js → grok-adapter-gpjqmkcq.js} +6 -5
- package/dist/handlers-zxmp1ta4.js +32 -0
- package/dist/{heartbeat-qahz4p62.js → heartbeat-k42svnr0.js} +20 -19
- package/dist/{hook-4fd5wq5w.js → hook-114m7hap.js} +4 -3
- package/dist/{hook-kj3d398m.js → hook-6nphweh0.js} +24 -9
- package/dist/{http-1ted0j1k.js → http-r8cc4wz7.js} +1196 -211
- package/dist/index-a8phxqnk.js +37 -0
- package/dist/{index-q4b917zs.js → index-e3s8wmxy.js} +1 -1
- package/dist/{index-6rq3r5zb.js → index-fpk4bcd9.js} +1 -1
- package/dist/{index-5rk6rfzr.js → index-fvzke5kx.js} +1 -1
- package/dist/index-k6h00t4c.js +30 -0
- package/dist/{index-7v51awbn.js → index-nh3wyqdt.js} +1027 -577
- package/dist/{index-yqhz88yy.js → index-pxn30mse.js} +8 -8
- package/dist/index-xrz7te8h.js +33 -0
- package/dist/{keepalive-6cf311t5.js → keepalive-x060nt9p.js} +3 -3
- package/dist/lead-956sd2yc.js +71 -0
- package/dist/{maintenance-a4bm1bmt.js → maintenance-2xxfexhf.js} +1 -1
- package/dist/{mistral-conversations-4pmwj1c0.js → mistral-conversations-3gjpdb4b.js} +4 -4
- package/dist/{oauth-refresh-sweep-3h0dfw1k.js → oauth-refresh-sweep-fckc4ar5.js} +2 -2
- package/dist/{onboard-myn5hraa.js → onboard-zc48j237.js} +5 -5
- package/dist/{openai-codex-responses-44j573nm.js → openai-codex-responses-8pbxq9h5.js} +5 -5
- package/dist/{openai-completions-a4gee2a8.js → openai-completions-rm00s912.js} +4 -4
- package/dist/{openai-decisions-w4qkrcar.js → openai-decisions-8v957r2r.js} +1 -1
- package/dist/{openai-responses-rbp6h5kr.js → openai-responses-agxpf96k.js} +5 -5
- package/dist/{opencode-adapter-p2nkb5am.js → opencode-adapter-r690h1cr.js} +4 -3
- package/dist/{otel-impl-a1a0ef6b.js → otel-impl-r5xbh81q.js} +4 -4
- package/dist/{pi-mono-adapter-rzmpb72a.js → pi-mono-adapter-c7v8sdec.js} +7 -6
- package/dist/{pricing-refresh-83drrnxj.js → pricing-refresh-3pmre11v.js} +3 -3
- package/dist/{rbac-roles-s8y6ecb5.js → rbac-roles-3vbshwsb.js} +1 -1
- package/dist/{rbac-roles-0fb6e7pj.js → rbac-roles-910mmkgz.js} +2 -2
- package/dist/{render-v2-twmbgrz4.js → render-v2-pxykkbab.js} +3 -3
- package/dist/{resume-zfqc36xj.js → resume-adda0bwy.js} +6 -6
- package/dist/{runtime-qwggdpqr.js → runtime-fnbm7stk.js} +1 -1
- package/dist/{session-access-sc9pn9da.js → session-access-2fvamrdc.js} +4 -4
- package/dist/{session-source-backfill-qh07xr8g.js → session-source-backfill-08xvv0sm.js} +2 -2
- package/dist/{setup-4fr0m7a1.js → setup-1aqmvmh1.js} +3 -3
- package/dist/{typesafe-system-one-5mavm259.js → typesafe-system-one-0bmqcxfg.js} +2 -2
- package/dist/{virtual-modules-fh4ha15b.js → virtual-modules-d2pjk9j1.js} +5 -5
- package/dist/{work-objects-0wr8zxct.js → work-objects-9s0yrm5j.js} +20 -19
- package/dist/{worker-follow-up-ktyyazyp.js → worker-follow-up-3q78fqmr.js} +17 -16
- package/dist/worker-y15hy08h.js +71 -0
- package/openapi.json +289 -4
- package/package.json +9 -8
- package/src/apps/definition.ts +6 -5
- package/src/be/db/page-theme-tokens.ts +12 -0
- package/src/be/db/script-runs.ts +23 -0
- package/src/be/db/tasks/read.ts +131 -4
- package/src/be/db/tasks/write.ts +19 -0
- package/src/be/db-client.ts +114 -11
- package/src/be/db.ts +49 -6
- package/src/be/memory/providers/sqlite-store.ts +49 -12
- package/src/be/migrations/260_runtime_pool_cache.sql +20 -0
- package/src/be/migrations/262_session_visibility_indexes.sql +18 -0
- package/src/be/migrations/263_task_list_filter_index.sql +11 -0
- package/src/be/migrations/264_slack_thread_cover_index.sql +9 -0
- package/src/be/migrations/266_script_runs_source_task.sql +11 -0
- package/src/be/migrations/269_pages_design_system.sql +23 -0
- package/src/be/runtime-pools/cache-cleanup.ts +109 -0
- package/src/be/runtime-pools/db.ts +65 -6
- package/src/be/runtime-pools/remote-controller.ts +5 -0
- package/src/be/runtime-pools/supervisor.ts +33 -2
- package/src/be/scripts/typecheck.ts +22 -0
- package/src/be/seed/schedules-seeder.ts +0 -10
- package/src/be/seed-scripts/catalog/catalog-report.inline.ts +2 -0
- package/src/be/seed-scripts/catalog/catalog-report.ts +2 -0
- package/src/be/seed-scripts/catalog/memory-eval.ts +2 -0
- package/src/be/seed-scripts/catalog/swarm-update-check.ts +150 -0
- package/src/be/seed-scripts/catalog/task-failure-audit.ts +5 -1
- package/src/be/seed-scripts/index.ts +9 -0
- package/src/be/seed-skills/bundled-files.generated.json +3 -3
- package/src/be/swarm-config-guard.ts +32 -0
- package/src/be/task-auto-title-listener.ts +127 -0
- package/src/commands/controller.ts +4 -0
- package/src/commands/entrypoint-api-readiness.ts +74 -0
- package/src/commands/onboard/agent-fs-version.ts +1 -1
- package/src/commands/profile-sync.ts +151 -16
- package/src/commands/runner.ts +15 -7
- package/src/hooks/hook.ts +20 -9
- package/src/http/index.ts +4 -1
- package/src/http/list-total-cache.ts +14 -7
- package/src/http/memory.ts +38 -9
- package/src/http/pages-public.ts +93 -129
- package/src/http/pages.ts +94 -21
- package/src/http/script-runs.ts +174 -5
- package/src/http/status.ts +10 -2
- package/src/http/tasks.ts +4 -2
- package/src/pages/browser-sdk.ts +48 -21
- package/src/pages/color-literals.ts +115 -0
- package/src/pages/page-head.ts +766 -0
- package/src/pages/version.ts +3 -0
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/codex-adapter.ts +1 -0
- package/src/providers/codex-app-server.ts +27 -1
- package/src/providers/fx-adapter.ts +1 -1
- package/src/providers/pi-mono-extension.ts +30 -15
- package/src/runtime-providers/controller-protocol.ts +14 -1
- package/src/runtime-providers/controller.ts +5 -0
- package/src/runtime-providers/docker.ts +108 -23
- package/src/runtime-providers/types.ts +16 -0
- package/src/script-workflows/workflow-ctx.ts +8 -0
- package/src/scripts-runtime/types/stdlib.d.ts +22 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +22 -0
- package/src/server-user.ts +1 -0
- package/src/slack/commands.ts +5 -1
- package/src/slack/handlers.ts +37 -2
- package/src/slack/left-threads.ts +27 -4
- package/src/tasks/follow-up-gate.ts +318 -0
- package/src/tasks/follow-up-redelegation-guard.ts +155 -0
- package/src/tasks/worker-follow-up.ts +21 -1
- package/src/tests/claude-artifacts-read-script.test.ts +209 -0
- package/src/tests/codex-app-server.test.ts +59 -0
- package/src/tests/codex-gateway-route.test.ts +50 -1
- package/src/tests/create-page-tool.test.ts +501 -0
- package/src/tests/db-client-busy-retry.test.ts +81 -0
- package/src/tests/db-client.test.ts +21 -0
- package/src/tests/db-task-read-contract.test.ts +9 -2
- package/src/tests/db-task-write-contract.test.ts +7 -1
- package/src/tests/db-tasks-read.test.ts +21 -0
- package/src/tests/entrypoint-api-readiness.test.ts +416 -210
- package/src/tests/explicit-model-validation.test.ts +14 -8
- package/src/tests/fixtures/pages/head-v1.html +56 -0
- package/src/tests/follow-up-gate-shadow.test.ts +513 -0
- package/src/tests/follow-up-redelivery-guard.test.ts +432 -202
- package/src/tests/identity-field-budget.test.ts +1 -1
- package/src/tests/internal-ai/credentials.test.ts +62 -0
- package/src/tests/internal-ai/task-title.test.ts +283 -0
- package/src/tests/list-total-cache.test.ts +27 -2
- package/src/tests/memory-fts-populate.test.ts +11 -9
- package/src/tests/memory-retrieval-purge.test.ts +80 -0
- package/src/tests/merge-gate-detect-changes.test.ts +145 -0
- package/src/tests/migration-260-runtime-pool-cache.test.ts +118 -0
- package/src/tests/page-proxy.test.ts +1 -1
- package/src/tests/page-session-dev-cookie.test.ts +188 -0
- package/src/tests/pages-frame-ancestors.test.ts +28 -1
- package/src/tests/pages-head-v2.test.ts +534 -0
- package/src/tests/pages-http.test.ts +330 -0
- package/src/tests/pages-public-html.test.ts +43 -0
- package/src/tests/pages-storage.test.ts +182 -0
- package/src/tests/pages-versioning.test.ts +72 -0
- package/src/tests/profile-sync-stale-writeback.test.ts +334 -0
- package/src/tests/profile-sync.test.ts +11 -15
- package/src/tests/query-audit-plans.test.ts +27 -0
- package/src/tests/runtime-cache-cleanup.test.ts +367 -0
- package/src/tests/runtime-e2b-pools.test.ts +41 -0
- package/src/tests/runtime-pools-db.test.ts +98 -0
- package/src/tests/runtime-pools-http.test.ts +29 -0
- package/src/tests/runtime-providers-docker.test.ts +253 -0
- package/src/tests/runtime-remote-controller.test.ts +66 -2
- package/src/tests/runtime-supervisor.test.ts +66 -2
- package/src/tests/scheduled-task-required-params-migration.test.ts +3 -1
- package/src/tests/script-connections.test.ts +13 -0
- package/src/tests/script-runs-http.test.ts +684 -2
- package/src/tests/seed-registry.test.ts +28 -6
- package/src/tests/seed-schedules.test.ts +61 -8
- package/src/tests/seed-scripts.test.ts +168 -2
- package/src/tests/slack-leave-thread.test.ts +145 -5
- package/src/tests/slack-render-v2-query-plans.test.ts +24 -2
- package/src/tests/status.test.ts +11 -0
- package/src/tests/swarm-diff.test.ts +121 -2
- package/src/tests/task-auto-title-config-guard.test.ts +37 -0
- package/src/tests/task-auto-title-listener.test.ts +165 -0
- package/src/tests/tasks-readable-row.test.ts +155 -0
- package/src/tests/theme-import.test.ts +758 -0
- package/src/tests/themes-page-theme.test.ts +155 -0
- package/src/tests/themes-presets.test.ts +172 -0
- package/src/tests/workflow-script-principal.test.ts +2 -1
- package/src/themes/classics.ts +949 -0
- package/src/themes/import.ts +420 -0
- package/src/themes/page-fields.ts +40 -0
- package/src/themes/page-theme.ts +102 -0
- package/src/themes/presets.ts +561 -0
- package/src/themes/tokens.ts +218 -0
- package/src/tools/app-upsert.ts +1 -1
- package/src/tools/create-page.ts +118 -12
- package/src/tools/send-task.ts +35 -47
- package/src/tools/slack-leave-thread.ts +1 -1
- package/src/tools/task-dedup.ts +45 -21
- package/src/tools/utils.ts +33 -0
- package/src/types.ts +83 -3
- package/src/utils/constants.ts +19 -0
- package/src/utils/follow-up-gate-schedule-ids.ts +13 -0
- package/src/utils/internal-ai/credentials.ts +146 -93
- package/src/utils/internal-ai/index.ts +10 -0
- package/src/utils/internal-ai/models.ts +18 -0
- package/src/utils/internal-ai/task-title.ts +282 -0
- package/src/utils/page-session.ts +37 -0
- package/templates/schedules/daily-status-report/content.md +88 -2
- package/templates/schedules/daily-swarm-update-check/content.md +16 -40
- package/templates/skills/apps/SKILL.md +1 -1
- package/templates/skills/apps/content.md +1 -1
- package/templates/skills/composio-google-docs/content.md +10 -0
- package/templates/skills/heartbeat-runbook/content.md +1 -1
- package/templates/skills/pages/config.json +1 -1
- package/templates/skills/pages/content.md +539 -86
- package/templates/skills/pages/files/examples/annotated-pr.html +21 -12
- package/templates/skills/pages/files/examples/multiplayer-board.html +41 -41
- package/templates/skills/pages/files/examples/report-page.html +125 -124
- package/templates/skills/script-workflows/content.md +19 -1
- package/templates/skills/swarm-docs/content.md +1 -0
- package/templates/skills/swarm-scripts/SKILL.md +2 -0
- package/templates/skills/swarm-scripts/content.md +2 -0
- package/dist/cli-2pnswgh8.js +0 -189
- package/dist/cli-dznrgaep.js +0 -30
- package/dist/cli-w3hcrxht.js +0 -6985
- package/dist/handlers-vwmba1m2.js +0 -31
- package/dist/index-5r71rf98.js +0 -32
- package/dist/index-anmwxs87.js +0 -29
- package/dist/index-spp0ra5c.js +0 -36
- package/dist/lead-fjy418cw.js +0 -69
- package/dist/worker-0c5tyzqe.js +0 -69
- package/templates/schedules/daily-workflow-health-audit/config.json +0 -19
- package/templates/schedules/daily-workflow-health-audit/content.md +0 -191
|
@@ -27,8 +27,9 @@ import {
|
|
|
27
27
|
AgentSlackIconSchema,
|
|
28
28
|
VersionableFieldSchema,
|
|
29
29
|
SessionCostModelBreakdownSchema,
|
|
30
|
+
PageThemeTokensSchema,
|
|
30
31
|
init_types4
|
|
31
|
-
} from "./cli-
|
|
32
|
+
} from "./cli-n6bv12jn.js";
|
|
32
33
|
import {
|
|
33
34
|
CODEX_AUTH_FAILURE_BENCH_THRESHOLD,
|
|
34
35
|
CODEX_AUTH_FAILURE_BENCH_MS,
|
|
@@ -44,12 +45,13 @@ import {
|
|
|
44
45
|
matchesDefaultIdentityMd,
|
|
45
46
|
matchesDefaultClaudeMd,
|
|
46
47
|
init_defaults,
|
|
48
|
+
init_templates4,
|
|
47
49
|
checkIdentityFieldBudget,
|
|
48
50
|
IdentityFieldBudgetError,
|
|
49
51
|
init_identity_field_budget,
|
|
50
52
|
contentSha256,
|
|
51
53
|
init_profile_sync
|
|
52
|
-
} from "./cli-
|
|
54
|
+
} from "./cli-tgrv9cjx.js";
|
|
53
55
|
import {
|
|
54
56
|
isSlackConfigured,
|
|
55
57
|
init_config4
|
|
@@ -59,8 +61,9 @@ import {
|
|
|
59
61
|
init_steering_enabled
|
|
60
62
|
} from "./cli-4sydckyj.js";
|
|
61
63
|
import {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
kindForModelString,
|
|
65
|
+
init_models2
|
|
66
|
+
} from "./cli-82j36f2m.js";
|
|
64
67
|
import {
|
|
65
68
|
SUBSCRIPTION_KEY_TYPES,
|
|
66
69
|
planAllowsModelFamily,
|
|
@@ -110,14 +113,10 @@ import {
|
|
|
110
113
|
literal2,
|
|
111
114
|
exports_iso
|
|
112
115
|
} from "./cli-agfm16v9.js";
|
|
113
|
-
import {
|
|
114
|
-
getNodeEnv,
|
|
115
|
-
init_node_env
|
|
116
|
-
} from "./cli-rgeadyvq.js";
|
|
117
116
|
import {
|
|
118
117
|
init_package,
|
|
119
118
|
package_default
|
|
120
|
-
} from "./cli-
|
|
119
|
+
} from "./cli-6pfd54vx.js";
|
|
121
120
|
import {
|
|
122
121
|
realtimeBus,
|
|
123
122
|
init_bus
|
|
@@ -126,6 +125,10 @@ import {
|
|
|
126
125
|
isEnvFlagEnabled,
|
|
127
126
|
init_env_flag
|
|
128
127
|
} from "./cli-cebvbc9t.js";
|
|
128
|
+
import {
|
|
129
|
+
getNodeEnv,
|
|
130
|
+
init_node_env
|
|
131
|
+
} from "./cli-rgeadyvq.js";
|
|
129
132
|
import {
|
|
130
133
|
scrubSecrets,
|
|
131
134
|
scrubObject,
|
|
@@ -3835,15 +3838,58 @@ function isSqliteBusy(err) {
|
|
|
3835
3838
|
return typeof code === "string" && code.startsWith("SQLITE_BUSY");
|
|
3836
3839
|
}
|
|
3837
3840
|
|
|
3841
|
+
class BusyGate {
|
|
3842
|
+
baseMs;
|
|
3843
|
+
maxMs;
|
|
3844
|
+
openUntil = 0;
|
|
3845
|
+
streak = 0;
|
|
3846
|
+
lastBusyAt = 0;
|
|
3847
|
+
episodeStartedAt = 0;
|
|
3848
|
+
episodeProbes = 0;
|
|
3849
|
+
constructor(baseMs, maxMs) {
|
|
3850
|
+
this.baseMs = baseMs;
|
|
3851
|
+
this.maxMs = maxMs;
|
|
3852
|
+
}
|
|
3853
|
+
isOpen(now = performance.now()) {
|
|
3854
|
+
return now < this.openUntil;
|
|
3855
|
+
}
|
|
3856
|
+
recordBusy(now = performance.now()) {
|
|
3857
|
+
if (this.streak > 0 && now - this.lastBusyAt > GATE_DECAY_MS)
|
|
3858
|
+
this.endEpisode(now, "decayed");
|
|
3859
|
+
if (this.streak === 0) {
|
|
3860
|
+
this.episodeStartedAt = now;
|
|
3861
|
+
this.episodeProbes = 0;
|
|
3862
|
+
console.warn("[db-client] SQLITE_BUSY: another process holds the write lock; spinning at most one probe per gate interval until it releases");
|
|
3863
|
+
}
|
|
3864
|
+
this.streak += 1;
|
|
3865
|
+
this.episodeProbes += 1;
|
|
3866
|
+
this.lastBusyAt = now;
|
|
3867
|
+
const interval = Math.min(this.maxMs, this.baseMs * 2 ** Math.min(this.streak - 1, 20));
|
|
3868
|
+
this.openUntil = now + interval;
|
|
3869
|
+
}
|
|
3870
|
+
recordRecovered(now = performance.now()) {
|
|
3871
|
+
if (this.streak === 0)
|
|
3872
|
+
return;
|
|
3873
|
+
this.endEpisode(now, "released");
|
|
3874
|
+
}
|
|
3875
|
+
endEpisode(now, how) {
|
|
3876
|
+
console.warn(`[db-client] write lock ${how} after ${Math.round(now - this.episodeStartedAt)}ms (${this.episodeProbes} spinning probes)`);
|
|
3877
|
+
this.streak = 0;
|
|
3878
|
+
this.openUntil = 0;
|
|
3879
|
+
}
|
|
3880
|
+
}
|
|
3881
|
+
|
|
3838
3882
|
class BunSqliteClient {
|
|
3839
3883
|
getDatabase;
|
|
3840
3884
|
busyRetry;
|
|
3841
3885
|
lock = new FifoLock;
|
|
3886
|
+
gate;
|
|
3842
3887
|
savepointSeq = 0;
|
|
3843
3888
|
restoreBusyTimeoutMs = null;
|
|
3844
3889
|
constructor(getDatabase, busyRetry = DEFAULT_BUSY_RETRY) {
|
|
3845
3890
|
this.getDatabase = getDatabase;
|
|
3846
3891
|
this.busyRetry = busyRetry;
|
|
3892
|
+
this.gate = new BusyGate(busyRetry.attemptSpinMs, Math.max(busyRetry.attemptSpinMs, busyRetry.maxGateMs ?? DEFAULT_MAX_GATE_MS));
|
|
3847
3893
|
}
|
|
3848
3894
|
query(sql, params = []) {
|
|
3849
3895
|
return this.execute(sql, (db) => db.query(sql).all(...params));
|
|
@@ -3899,6 +3945,7 @@ class BunSqliteClient {
|
|
|
3899
3945
|
} else {
|
|
3900
3946
|
try {
|
|
3901
3947
|
this.shortSpin(db, () => db.run("BEGIN IMMEDIATE"), finalAttempt);
|
|
3948
|
+
this.gate.recordRecovered();
|
|
3902
3949
|
} catch (err) {
|
|
3903
3950
|
if (isSqliteBusy(err))
|
|
3904
3951
|
return { ok: false, busyBegin: err };
|
|
@@ -3910,7 +3957,7 @@ class BunSqliteClient {
|
|
|
3910
3957
|
if (readOnly) {
|
|
3911
3958
|
db.run("COMMIT");
|
|
3912
3959
|
} else {
|
|
3913
|
-
await this.retryHoldingLock(() => this.shortSpin(db, () => db.run("COMMIT")));
|
|
3960
|
+
await this.retryHoldingLock(() => this.shortSpin(db, () => db.run("COMMIT"), false, false));
|
|
3914
3961
|
}
|
|
3915
3962
|
for (const hook of ctx.afterCommit)
|
|
3916
3963
|
this.scheduleHook(hook);
|
|
@@ -3984,19 +4031,26 @@ class BunSqliteClient {
|
|
|
3984
4031
|
};
|
|
3985
4032
|
const ctx = txContext.getStore();
|
|
3986
4033
|
if (ctx && !ctx.closed) {
|
|
3987
|
-
|
|
4034
|
+
const db = this.getDatabase();
|
|
4035
|
+
return timed(() => op(db));
|
|
3988
4036
|
}
|
|
3989
4037
|
let sleptMs = 0;
|
|
4038
|
+
let sawBusy = false;
|
|
3990
4039
|
for (let attemptIndex = 0;; attemptIndex++) {
|
|
3991
4040
|
const next = this.busyRetry.backoffMs[attemptIndex];
|
|
3992
4041
|
const canRetryAfter = next !== undefined && sleptMs + next <= this.busyRetry.maxWaitMs;
|
|
3993
4042
|
const release = await this.lock.acquire();
|
|
3994
4043
|
let backoff = 0;
|
|
3995
4044
|
try {
|
|
3996
|
-
|
|
4045
|
+
const db = this.getDatabase();
|
|
4046
|
+
const result = timed(() => this.shortSpin(db, () => op(db), !canRetryAfter), canRetryAfter);
|
|
4047
|
+
if (sawBusy)
|
|
4048
|
+
this.gate.recordRecovered();
|
|
4049
|
+
return result;
|
|
3997
4050
|
} catch (err) {
|
|
3998
4051
|
if (!isSqliteBusy(err) || !canRetryAfter || next === undefined)
|
|
3999
4052
|
throw err;
|
|
4053
|
+
sawBusy = true;
|
|
4000
4054
|
backoff = next;
|
|
4001
4055
|
sleptMs += next;
|
|
4002
4056
|
} finally {
|
|
@@ -4005,15 +4059,20 @@ class BunSqliteClient {
|
|
|
4005
4059
|
await sleep(jittered(backoff));
|
|
4006
4060
|
}
|
|
4007
4061
|
}
|
|
4008
|
-
shortSpin(db, attempt, finalAttempt = false) {
|
|
4062
|
+
shortSpin(db, attempt, finalAttempt = false, gateable = true) {
|
|
4009
4063
|
if (this.restoreBusyTimeoutMs === null) {
|
|
4010
4064
|
const row = db.query("PRAGMA busy_timeout").get();
|
|
4011
4065
|
this.restoreBusyTimeoutMs = row?.timeout ?? 5000;
|
|
4012
4066
|
}
|
|
4013
|
-
const
|
|
4067
|
+
const gated = gateable && this.gate.isOpen();
|
|
4068
|
+
const spinMs = gated ? 0 : finalAttempt ? this.busyRetry.finalAttemptSpinMs ?? DEFAULT_FINAL_ATTEMPT_SPIN_MS : this.busyRetry.attemptSpinMs;
|
|
4014
4069
|
db.exec(`PRAGMA busy_timeout = ${spinMs}`);
|
|
4015
4070
|
try {
|
|
4016
4071
|
return attempt();
|
|
4072
|
+
} catch (err) {
|
|
4073
|
+
if (gateable && !gated && isSqliteBusy(err))
|
|
4074
|
+
this.gate.recordBusy();
|
|
4075
|
+
throw err;
|
|
4017
4076
|
} finally {
|
|
4018
4077
|
db.exec(`PRAGMA busy_timeout = ${this.restoreBusyTimeoutMs}`);
|
|
4019
4078
|
}
|
|
@@ -4054,7 +4113,7 @@ class BunSqliteClient {
|
|
|
4054
4113
|
function createBunSqliteClient(getDatabase, busyRetry) {
|
|
4055
4114
|
return new BunSqliteClient(getDatabase, busyRetry);
|
|
4056
4115
|
}
|
|
4057
|
-
var LOCK_WATCHDOG_MS = 30000, txContext, DEFAULT_FINAL_ATTEMPT_SPIN_MS = 250, DEFAULT_BUSY_RETRY, SLOW_STATEMENT_WARN_MS = 100, SLOW_STATEMENT_SQL_MAX_CHARS = 200;
|
|
4116
|
+
var LOCK_WATCHDOG_MS = 30000, txContext, DEFAULT_FINAL_ATTEMPT_SPIN_MS = 250, DEFAULT_BUSY_RETRY, SLOW_STATEMENT_WARN_MS = 100, SLOW_STATEMENT_SQL_MAX_CHARS = 200, DEFAULT_MAX_GATE_MS = 1000, GATE_DECAY_MS = 5000;
|
|
4058
4117
|
var init_db_client = __esm(() => {
|
|
4059
4118
|
init_secret_scrubber();
|
|
4060
4119
|
txContext = new AsyncLocalStorage2;
|
|
@@ -5026,7 +5085,7 @@ var init_runtime2 = __esm(() => {
|
|
|
5026
5085
|
// src/telemetry-identity.ts
|
|
5027
5086
|
async function loadUserRole(userId) {
|
|
5028
5087
|
try {
|
|
5029
|
-
const { getUserGrant } = await import("./rbac-roles-
|
|
5088
|
+
const { getUserGrant } = await import("./rbac-roles-910mmkgz.js");
|
|
5030
5089
|
const grant = await getUserGrant(userId);
|
|
5031
5090
|
const role = grant.grantsAll ? "admin" : "member";
|
|
5032
5091
|
const user = await getDbClient2().get("SELECT json_extract(metadata, '$.jobFunction') AS jobFunction FROM users WHERE id = ? AND json_valid(metadata)", [userId]);
|
|
@@ -6408,6 +6467,32 @@ function readableSessionCondition(userId, taskIdColumn = "agent_tasks.id", opts
|
|
|
6408
6467
|
params: userId ? [userId, userId] : []
|
|
6409
6468
|
};
|
|
6410
6469
|
}
|
|
6470
|
+
function readableSessionRowCondition(userId, taskIdColumn = "agent_tasks.id") {
|
|
6471
|
+
const otherOwner = userId ? "up.requestedByUserId IS NOT NULL AND up.requestedByUserId != ?" : "up.requestedByUserId IS NOT NULL";
|
|
6472
|
+
const shareMatch = userId ? "(s.userId IS NULL OR s.userId = ?)" : "s.userId IS NULL";
|
|
6473
|
+
const set = readableSessionCondition(userId, taskIdColumn);
|
|
6474
|
+
return {
|
|
6475
|
+
sql: `(CASE (
|
|
6476
|
+
WITH RECURSIVE up(id, parentTaskId, requestedByUserId, scheduleId, depth) AS (
|
|
6477
|
+
SELECT u.id, u.parentTaskId, u.requestedByUserId, u.scheduleId, 0
|
|
6478
|
+
FROM agent_tasks u WHERE u.id = ${taskIdColumn}
|
|
6479
|
+
UNION ALL
|
|
6480
|
+
SELECT p.id, p.parentTaskId, p.requestedByUserId, p.scheduleId, up.depth + 1
|
|
6481
|
+
FROM up JOIN agent_tasks p ON p.id = up.parentTaskId
|
|
6482
|
+
WHERE up.depth < ${READABLE_WALK_MAX_DEPTH}
|
|
6483
|
+
)
|
|
6484
|
+
SELECT CASE WHEN ${otherOwner} AND up.scheduleId IS NULL
|
|
6485
|
+
AND NOT EXISTS (SELECT 1 FROM session_shares s
|
|
6486
|
+
WHERE s.rootTaskId = up.id AND s.revokedAt IS NULL AND ${shareMatch})
|
|
6487
|
+
THEN 1 ELSE 0 END
|
|
6488
|
+
FROM up
|
|
6489
|
+
WHERE up.parentTaskId IS NULL
|
|
6490
|
+
OR NOT EXISTS (SELECT 1 FROM agent_tasks p WHERE p.id = up.parentTaskId)
|
|
6491
|
+
LIMIT 1
|
|
6492
|
+
) WHEN 0 THEN 1 WHEN 1 THEN 0 ELSE ${set.sql} END)`,
|
|
6493
|
+
params: [...userId ? [userId, userId] : [], ...set.params]
|
|
6494
|
+
};
|
|
6495
|
+
}
|
|
6411
6496
|
async function getAllTasks2(filters, opts) {
|
|
6412
6497
|
const conditions = [];
|
|
6413
6498
|
const params = [];
|
|
@@ -6489,11 +6574,12 @@ async function getAllTasks2(filters, opts) {
|
|
|
6489
6574
|
conditions.push("requestedByUserId = ?");
|
|
6490
6575
|
params.push(filters.requestedByUserId);
|
|
6491
6576
|
}
|
|
6577
|
+
const pageIndex = conditions.length === 0 && !filters?.readableBy && filters?.orderBy !== "createdAt" ? "INDEXED BY idx_agent_tasks_last_updated" : "";
|
|
6492
6578
|
if (!filters?.includeHeartbeat) {
|
|
6493
6579
|
conditions.push(`(IFNULL(taskType, '') NOT IN ('heartbeat', 'heartbeat-checklist', 'boot-triage') AND tags NOT LIKE '%"heartbeat"%')`);
|
|
6494
6580
|
}
|
|
6495
6581
|
if (filters?.readableBy) {
|
|
6496
|
-
const readable =
|
|
6582
|
+
const readable = readableSessionRowCondition(filters.readableBy.userId);
|
|
6497
6583
|
conditions.push(readable.sql);
|
|
6498
6584
|
params.push(...readable.params);
|
|
6499
6585
|
}
|
|
@@ -6503,7 +6589,7 @@ async function getAllTasks2(filters, opts) {
|
|
|
6503
6589
|
const orderColumns = filters?.orderBy === "createdAt" ? ["createdAt DESC", "rowid DESC"] : ["lastUpdatedAt DESC", "priority DESC"];
|
|
6504
6590
|
const fields = opts?.fields === "timeline" ? "timeline" : opts?.slim ? "slim" : "full";
|
|
6505
6591
|
const query = `WITH page AS (
|
|
6506
|
-
SELECT rowid AS rid FROM agent_tasks ${whereClause}
|
|
6592
|
+
SELECT rowid AS rid FROM agent_tasks ${pageIndex} ${whereClause}
|
|
6507
6593
|
ORDER BY ${orderColumns.join(", ")} LIMIT ${limit} OFFSET ${offset}
|
|
6508
6594
|
)
|
|
6509
6595
|
SELECT ${LIST_COLUMNS[fields]},
|
|
@@ -6997,17 +7083,49 @@ async function getMostRecentTaskInThread2(channelId, threadTs) {
|
|
|
6997
7083
|
LIMIT 1`, [channelId, threadTs]);
|
|
6998
7084
|
return row ? rowToAgentTask(row) : null;
|
|
6999
7085
|
}
|
|
7000
|
-
async function
|
|
7086
|
+
async function findCompletedTasksInThread2(channelId, threadTs, windowMinutes, limit = 200, before) {
|
|
7001
7087
|
const since = new Date(Date.now() - windowMinutes * 60 * 1000).toISOString();
|
|
7002
|
-
const
|
|
7088
|
+
const cursorSql = before ? "AND (lastUpdatedAt < ? OR (lastUpdatedAt = ? AND id < ?))" : "";
|
|
7089
|
+
const cursorParams = before ? [before.lastUpdatedAt, before.lastUpdatedAt, before.id] : [];
|
|
7090
|
+
const rows = await getDbClient2().query(`SELECT * FROM agent_tasks
|
|
7003
7091
|
WHERE slackChannelId = ?
|
|
7004
7092
|
AND slackThreadTs = ?
|
|
7005
7093
|
AND status = 'completed'
|
|
7094
|
+
AND COALESCE(taskType, '') != 'follow-up'
|
|
7095
|
+
AND lastUpdatedAt > ?
|
|
7096
|
+
${cursorSql}
|
|
7097
|
+
ORDER BY lastUpdatedAt DESC, id DESC
|
|
7098
|
+
LIMIT ?`, [channelId, threadTs, since, ...cursorParams, limit]);
|
|
7099
|
+
return rows.map(rowToAgentTask);
|
|
7100
|
+
}
|
|
7101
|
+
async function findRecentFailedTaskInThread2(channelId, threadTs, windowMinutes) {
|
|
7102
|
+
const since = new Date(Date.now() - windowMinutes * 60 * 1000).toISOString();
|
|
7103
|
+
const row = await getDbClient2().get(`SELECT * FROM agent_tasks
|
|
7104
|
+
WHERE slackChannelId = ?
|
|
7105
|
+
AND slackThreadTs = ?
|
|
7106
|
+
AND status = 'failed'
|
|
7006
7107
|
AND lastUpdatedAt > ?
|
|
7007
7108
|
ORDER BY lastUpdatedAt DESC
|
|
7008
7109
|
LIMIT 1`, [channelId, threadTs, since]);
|
|
7009
7110
|
return row ? rowToAgentTask(row) : null;
|
|
7010
7111
|
}
|
|
7112
|
+
async function countAgentDispatchesInThread2(channelId, threadTs, creatorAgentId, windowMinutes) {
|
|
7113
|
+
const since = new Date(Date.now() - windowMinutes * 60 * 1000).toISOString();
|
|
7114
|
+
const row = await getDbClient2().get(`SELECT COUNT(*) AS c FROM (
|
|
7115
|
+
SELECT MIN(createdAt) AS firstAt FROM agent_tasks
|
|
7116
|
+
WHERE slackChannelId = ?
|
|
7117
|
+
AND slackThreadTs = ?
|
|
7118
|
+
AND creatorAgentId = ?
|
|
7119
|
+
AND source = 'mcp'
|
|
7120
|
+
AND (createdAt > ? OR taskType = 'script-run-step')
|
|
7121
|
+
GROUP BY CASE
|
|
7122
|
+
WHEN taskType = 'script-run-step' AND contextKey LIKE 'script-run:%:%'
|
|
7123
|
+
THEN substr(contextKey, 1, instr(substr(contextKey, 12), ':') + 10)
|
|
7124
|
+
ELSE id
|
|
7125
|
+
END
|
|
7126
|
+
) WHERE firstAt > ?`, [channelId, threadTs, creatorAgentId, since, since]);
|
|
7127
|
+
return row?.c ?? 0;
|
|
7128
|
+
}
|
|
7011
7129
|
async function findRecentCancelledTaskInThread2(channelId, threadTs, windowMinutes) {
|
|
7012
7130
|
const since = new Date(Date.now() - windowMinutes * 60 * 1000).toISOString();
|
|
7013
7131
|
const row = await getDbClient2().get(`SELECT * FROM agent_tasks
|
|
@@ -7030,7 +7148,7 @@ async function findRecentCancelledTaskInThread2(channelId, threadTs, windowMinut
|
|
|
7030
7148
|
LIMIT 1`, [channelId, threadTs, since]);
|
|
7031
7149
|
return row ? rowToAgentTask(row) : null;
|
|
7032
7150
|
}
|
|
7033
|
-
var dependencies2, TASK_PREVIEW_LENGTH = 300, TASK_PREVIEW_BYTES, SIBLING_OPEN = "<sibling_tasks_in_progress>", SIBLING_CLOSE = "</sibling_tasks_in_progress>", TASK_BLOB = "CAST(agent_tasks.task AS BLOB)", SIBLING_CLOSE_AT, SIBLING_END, TASK_PREVIEW_START, TASK_PREVIEW_SQL, taskPreviewDecoder, LIST_COLUMNS, TASK_LINEAGE_LIMITS2, LINEAGE_COLUMNS, SUPERSEDED_RESUME_REPAIR_WINDOW_MS2, NEVER_STARTED_TASK_STATUSES, findTaskByGitHub2, CHAT_RELAY_ELIGIBLE_SQL = `(obligation.last_attempt_at IS NULL
|
|
7151
|
+
var dependencies2, TASK_PREVIEW_LENGTH = 300, TASK_PREVIEW_BYTES, SIBLING_OPEN = "<sibling_tasks_in_progress>", SIBLING_CLOSE = "</sibling_tasks_in_progress>", TASK_BLOB = "CAST(agent_tasks.task AS BLOB)", SIBLING_CLOSE_AT, SIBLING_END, TASK_PREVIEW_START, TASK_PREVIEW_SQL, taskPreviewDecoder, LIST_COLUMNS, TASK_LINEAGE_LIMITS2, LINEAGE_COLUMNS, SUPERSEDED_RESUME_REPAIR_WINDOW_MS2, NEVER_STARTED_TASK_STATUSES, findTaskByGitHub2, READABLE_WALK_MAX_DEPTH = 64, CHAT_RELAY_ELIGIBLE_SQL = `(obligation.last_attempt_at IS NULL
|
|
7034
7152
|
OR (julianday(?) - julianday(obligation.last_attempt_at)) * 86400000.0 >=
|
|
7035
7153
|
CASE WHEN obligation.attempt_count >= 8 THEN 600000
|
|
7036
7154
|
ELSE 3000 * (1 << obligation.attempt_count) END)`, LINEAR_TRACKER_CONTEXT_KEY_PREFIX = "task:trackers:linear:";
|
|
@@ -7251,6 +7369,21 @@ var init_page_search = __esm(() => {
|
|
|
7251
7369
|
init_db4();
|
|
7252
7370
|
});
|
|
7253
7371
|
|
|
7372
|
+
// src/be/db/page-theme-tokens.ts
|
|
7373
|
+
function parsePageThemeTokens(raw) {
|
|
7374
|
+
if (!raw)
|
|
7375
|
+
return null;
|
|
7376
|
+
try {
|
|
7377
|
+
const parsed = PageThemeTokensSchema.safeParse(JSON.parse(raw));
|
|
7378
|
+
return parsed.success ? parsed.data : null;
|
|
7379
|
+
} catch {
|
|
7380
|
+
return null;
|
|
7381
|
+
}
|
|
7382
|
+
}
|
|
7383
|
+
var init_page_theme_tokens = __esm(() => {
|
|
7384
|
+
init_types4();
|
|
7385
|
+
});
|
|
7386
|
+
|
|
7254
7387
|
// src/be/db/session-visibility.ts
|
|
7255
7388
|
function sessionViewerCondition(viewer) {
|
|
7256
7389
|
const shared = `r.id IN (SELECT s.rootTaskId FROM session_shares s
|
|
@@ -8378,6 +8511,13 @@ async function updateTaskTitle2(taskId, title) {
|
|
|
8378
8511
|
const row = await getDbClient2().get("UPDATE agent_tasks SET title = ? WHERE id = ? RETURNING *", [normalized, taskId]);
|
|
8379
8512
|
return row ? rowToAgentTask(row) : null;
|
|
8380
8513
|
}
|
|
8514
|
+
async function setTaskTitleIfUnset2(taskId, title) {
|
|
8515
|
+
const normalized = title.trim();
|
|
8516
|
+
if (!normalized)
|
|
8517
|
+
return null;
|
|
8518
|
+
const row = await getDbClient2().get("UPDATE agent_tasks SET title = ? WHERE id = ? AND title IS NULL RETURNING *", [normalized, taskId]);
|
|
8519
|
+
return row ? rowToAgentTask(row) : null;
|
|
8520
|
+
}
|
|
8381
8521
|
async function completeTask2(id, output, options) {
|
|
8382
8522
|
const oldTask = await getTaskById2(id);
|
|
8383
8523
|
if (!oldTask)
|
|
@@ -8585,7 +8725,7 @@ async function cancelTask2(id, reason, options = {}) {
|
|
|
8585
8725
|
if (row.source === "schedule" && row.taskType === "deferred" && row.parentTaskId) {
|
|
8586
8726
|
getDbClient2().afterCommit(async () => {
|
|
8587
8727
|
try {
|
|
8588
|
-
const { createWorkerTaskFollowUp } = await import("./worker-follow-up-
|
|
8728
|
+
const { createWorkerTaskFollowUp } = await import("./worker-follow-up-3q78fqmr.js");
|
|
8589
8729
|
await createWorkerTaskFollowUp({
|
|
8590
8730
|
task: rowToAgentTask(row),
|
|
8591
8731
|
status: "failed",
|
|
@@ -9740,6 +9880,18 @@ function parseEnabledTools(value) {
|
|
|
9740
9880
|
}
|
|
9741
9881
|
var init_enabled_tools = () => {};
|
|
9742
9882
|
|
|
9883
|
+
// src/utils/follow-up-gate-schedule-ids.ts
|
|
9884
|
+
function parseFollowUpGateScheduleIds(raw) {
|
|
9885
|
+
return (raw ?? "").split(",").map((id) => id.trim()).filter(Boolean);
|
|
9886
|
+
}
|
|
9887
|
+
function isFollowUpGateScheduleId(id) {
|
|
9888
|
+
return UUID_RE.test(id);
|
|
9889
|
+
}
|
|
9890
|
+
var UUID_RE;
|
|
9891
|
+
var init_follow_up_gate_schedule_ids = __esm(() => {
|
|
9892
|
+
UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
9893
|
+
});
|
|
9894
|
+
|
|
9743
9895
|
// src/utils/task-tool-manifest.ts
|
|
9744
9896
|
function parseTaskToolManifest(value) {
|
|
9745
9897
|
return taskToolManifestSchema.parse(JSON.parse(value));
|
|
@@ -9912,6 +10064,17 @@ function validateRuntimeTokenTtlHours(value) {
|
|
|
9912
10064
|
const hours = Number(value);
|
|
9913
10065
|
return typeof value === "string" && Number.isFinite(hours) && hours > 0 && hours <= 168 ? null : "Invalid RUNTIME_TOKEN_TTL_HOURS (must be greater than zero and at most 168)";
|
|
9914
10066
|
}
|
|
10067
|
+
function validateTaskAutoTitleModel(value) {
|
|
10068
|
+
if (typeof value !== "string")
|
|
10069
|
+
return "Invalid TASK_AUTO_TITLE_MODEL (must be a string)";
|
|
10070
|
+
const model = value.trim();
|
|
10071
|
+
if (!model)
|
|
10072
|
+
return null;
|
|
10073
|
+
if (/\s/.test(model) || model.endsWith("/")) {
|
|
10074
|
+
return "Invalid TASK_AUTO_TITLE_MODEL (use provider/model-id or a claude -p alias)";
|
|
10075
|
+
}
|
|
10076
|
+
return kindForModelString(model) ? null : "Invalid TASK_AUTO_TITLE_MODEL (provider must be openrouter, anthropic, openai, or openai-codex)";
|
|
10077
|
+
}
|
|
9915
10078
|
function validateConfigValue(key, value) {
|
|
9916
10079
|
if (isTierConfigKey(key))
|
|
9917
10080
|
return validateTierConfigValue(key.toUpperCase(), value);
|
|
@@ -9945,6 +10108,8 @@ var init_swarm_config_guard = __esm(() => {
|
|
|
9945
10108
|
init_config_env_export();
|
|
9946
10109
|
init_egress_guard();
|
|
9947
10110
|
init_enabled_tools();
|
|
10111
|
+
init_follow_up_gate_schedule_ids();
|
|
10112
|
+
init_models2();
|
|
9948
10113
|
init_org_website();
|
|
9949
10114
|
init_task_tool_manifest();
|
|
9950
10115
|
init_model_tier_keys();
|
|
@@ -10074,6 +10239,13 @@ var init_swarm_config_guard = __esm(() => {
|
|
|
10074
10239
|
SCRIPT_EGRESS_ALLOWLIST: (value) => typeof value === "string" ? validateEgressAllowlist(value) : "Invalid SCRIPT_EGRESS_ALLOWLIST",
|
|
10075
10240
|
...enumValidator("MODEL_WINDOW_EXHAUSTED_POLICY", ["fail", "fallback"]),
|
|
10076
10241
|
...enumValidator("HEARTBEAT_CHECKLIST_GATE_MODE", ["shadow", "enforce"]),
|
|
10242
|
+
...enumValidator("FOLLOW_UP_GATE_MODE", ["off", "shadow"]),
|
|
10243
|
+
FOLLOW_UP_GATE_SCHEDULE_IDS: (value) => {
|
|
10244
|
+
const message = "Invalid FOLLOW_UP_GATE_SCHEDULE_IDS (must be comma-separated schedule UUIDs)";
|
|
10245
|
+
if (typeof value !== "string")
|
|
10246
|
+
return message;
|
|
10247
|
+
return parseFollowUpGateScheduleIds(value).every(isFollowUpGateScheduleId) ? null : message;
|
|
10248
|
+
},
|
|
10077
10249
|
...enumValidator("SYSTEM_ONE_DEFAULT_PROVIDER", [...SYSTEM_ONE_DEFAULT_PROVIDER_OPTIONS]),
|
|
10078
10250
|
CODEX_CREDITS_EXHAUSTED_COOLDOWN_MS: (value) => {
|
|
10079
10251
|
const str = String(value).trim();
|
|
@@ -10159,8 +10331,10 @@ var init_swarm_config_guard = __esm(() => {
|
|
|
10159
10331
|
"DB_RETENTION_DRY_RUN",
|
|
10160
10332
|
"MODEL_AUTO_UPGRADE",
|
|
10161
10333
|
"COMB_ENABLED",
|
|
10162
|
-
"AGENT_FS_PROXY"
|
|
10334
|
+
"AGENT_FS_PROXY",
|
|
10335
|
+
"TASK_AUTO_TITLE_ENABLED"
|
|
10163
10336
|
]),
|
|
10337
|
+
TASK_AUTO_TITLE_MODEL: validateTaskAutoTitleModel,
|
|
10164
10338
|
...enumValidator("SLACK_MODE", ["socket", "http"]),
|
|
10165
10339
|
...enumValidator("SLACK_THREAD_STEERING", ["off", "lead", "all"]),
|
|
10166
10340
|
...enumValidator("SLACK_THREAD_STEERING_MODE", ["steer", "queue"]),
|
|
@@ -18850,7 +19024,7 @@ function noteEmbeddingSuccess() {
|
|
|
18850
19024
|
const report = (what) => (err) => {
|
|
18851
19025
|
console.error(`[memory] ${what} backfill after embeddings recovered failed:`, err.message);
|
|
18852
19026
|
};
|
|
18853
|
-
backfill2 = import("./embedding-space-
|
|
19027
|
+
backfill2 = import("./embedding-space-0jepb239.js").then(({ runEmbeddingMaintenance }) => runEmbeddingMaintenance({ backfill: true })).catch(report("Embedding")).finally(() => {
|
|
18854
19028
|
backfill2 = null;
|
|
18855
19029
|
});
|
|
18856
19030
|
}
|
|
@@ -19383,11 +19557,41 @@ class SqliteMemoryStore {
|
|
|
19383
19557
|
async populateFtsTable() {
|
|
19384
19558
|
const client = getDbClient2();
|
|
19385
19559
|
const startedAt = performance.now();
|
|
19386
|
-
const
|
|
19387
|
-
|
|
19388
|
-
|
|
19560
|
+
const yieldLoop = () => new Promise((resolve) => setImmediate(resolve));
|
|
19561
|
+
const indexed = new Set;
|
|
19562
|
+
let removed = 0;
|
|
19563
|
+
for (let after = 0;; ) {
|
|
19564
|
+
const rows = await client.query(FTS_SCAN_BATCH_SQL, [after, FTS_SCAN_BATCH_SIZE]);
|
|
19565
|
+
if (rows.length === 0)
|
|
19566
|
+
break;
|
|
19567
|
+
after = rows[rows.length - 1].rowid;
|
|
19568
|
+
const orphans = rows.filter((row) => row.orphan).map((row) => row.rowid);
|
|
19569
|
+
if (orphans.length > 0) {
|
|
19570
|
+
await client.run(`DELETE FROM memory_fts WHERE rowid IN (${orphans.map(() => "?").join(",")})`, orphans);
|
|
19571
|
+
removed += orphans.length;
|
|
19572
|
+
}
|
|
19573
|
+
for (const row of rows)
|
|
19574
|
+
if (!row.orphan && row.memoryId)
|
|
19575
|
+
indexed.add(row.memoryId);
|
|
19576
|
+
await yieldLoop();
|
|
19577
|
+
}
|
|
19578
|
+
if (removed > 0) {
|
|
19579
|
+
console.warn(`[memory-fts] removed_extra_rows count=${removed}`);
|
|
19580
|
+
}
|
|
19581
|
+
const missing = [];
|
|
19582
|
+
for (let after = 0;; ) {
|
|
19583
|
+
const rows = await client.query(MEMORY_ID_BATCH_SQL, [
|
|
19584
|
+
after,
|
|
19585
|
+
FTS_SCAN_BATCH_SIZE
|
|
19586
|
+
]);
|
|
19587
|
+
if (rows.length === 0)
|
|
19588
|
+
break;
|
|
19589
|
+
after = rows[rows.length - 1].rowid;
|
|
19590
|
+
for (const row of rows)
|
|
19591
|
+
if (!indexed.has(row.id))
|
|
19592
|
+
missing.push(row);
|
|
19593
|
+
await yieldLoop();
|
|
19389
19594
|
}
|
|
19390
|
-
const missing = await client.query(FTS_MISSING_IDS_SQL);
|
|
19391
19595
|
for (let i = 0;i < missing.length; i += FTS_POPULATE_BATCH_SIZE) {
|
|
19392
19596
|
const ids = missing.slice(i, i + FTS_POPULATE_BATCH_SIZE).map((row) => row.id);
|
|
19393
19597
|
const placeholders = ids.map(() => "?").join(",");
|
|
@@ -20223,9 +20427,11 @@ class SqliteMemoryStore {
|
|
|
20223
20427
|
};
|
|
20224
20428
|
}
|
|
20225
20429
|
}
|
|
20226
|
-
var VECTOR_BYTES,
|
|
20227
|
-
|
|
20228
|
-
|
|
20430
|
+
var VECTOR_BYTES, FTS_SCAN_BATCH_SQL = `SELECT rowid AS rowid, memory_id AS memoryId,
|
|
20431
|
+
memory_id IS NOT NULL
|
|
20432
|
+
AND NOT EXISTS (SELECT 1 FROM agent_memory m WHERE m.id = memory_fts.memory_id) AS orphan
|
|
20433
|
+
FROM memory_fts WHERE rowid > ? ORDER BY rowid LIMIT ?`, MEMORY_ID_BATCH_SQL = `SELECT rowid AS rowid, id FROM agent_memory
|
|
20434
|
+
WHERE rowid > ? ORDER BY rowid LIMIT ?`, FTS_SCAN_BATCH_SIZE = 1000, FTS_POPULATE_BATCH_SIZE = 500;
|
|
20229
20435
|
var init_sqlite_store = __esm(() => {
|
|
20230
20436
|
init_db4();
|
|
20231
20437
|
init_embedding();
|
|
@@ -20912,7 +21118,7 @@ async function loadSecretRegistry() {
|
|
|
20912
21118
|
result.failed += 1;
|
|
20913
21119
|
}
|
|
20914
21120
|
try {
|
|
20915
|
-
const { loadRuntimeControllerSecrets } = await import("./db-
|
|
21121
|
+
const { loadRuntimeControllerSecrets } = await import("./db-dk572x25.js");
|
|
20916
21122
|
const loaded = await loadRuntimeControllerSecrets();
|
|
20917
21123
|
result.runtimeController = loaded.count;
|
|
20918
21124
|
result.failed += loaded.failed;
|
|
@@ -21061,7 +21267,7 @@ async function requestSteering(args) {
|
|
|
21061
21267
|
}
|
|
21062
21268
|
const requestedMode = args.mode ?? "queue";
|
|
21063
21269
|
const onUnsupported = args.onUnsupported ?? "degrade";
|
|
21064
|
-
const { dispatchPre, extensionIdForAgent } = await import("./dispatcher-
|
|
21270
|
+
const { dispatchPre, extensionIdForAgent } = await import("./dispatcher-kh7ecxh9.js");
|
|
21065
21271
|
const preSteer = await dispatchPre("pre.task.steer", {
|
|
21066
21272
|
task,
|
|
21067
21273
|
message: args.message,
|
|
@@ -21260,6 +21466,16 @@ async function getScriptRunExecutionArgs2(id) {
|
|
|
21260
21466
|
const row = await getDbClient2().get("SELECT args FROM script_runs WHERE id = ?", [id]);
|
|
21261
21467
|
return row ? openSealedJson(row.args) : undefined;
|
|
21262
21468
|
}
|
|
21469
|
+
async function getScriptRunFollowUpGuard2(runId) {
|
|
21470
|
+
const row = await getDbClient2().get("SELECT followUpGuard FROM script_runs WHERE id = ?", [runId]);
|
|
21471
|
+
return row?.followUpGuard ?? null;
|
|
21472
|
+
}
|
|
21473
|
+
async function setScriptRunFollowUpGuard2(runId, decision) {
|
|
21474
|
+
await getDbClient2().run("UPDATE script_runs SET followUpGuard = ? WHERE id = ?", [
|
|
21475
|
+
decision,
|
|
21476
|
+
runId
|
|
21477
|
+
]);
|
|
21478
|
+
}
|
|
21263
21479
|
var init_script_runs = __esm(() => {
|
|
21264
21480
|
init_sealed_json();
|
|
21265
21481
|
init_runtime2();
|
|
@@ -21310,6 +21526,7 @@ __export(exports_db, {
|
|
|
21310
21526
|
completeTask: () => completeTask2,
|
|
21311
21527
|
computeContentHash: () => computeContentHash2,
|
|
21312
21528
|
countActiveScriptRuns: () => countActiveScriptRuns2,
|
|
21529
|
+
countAgentDispatchesInThread: () => countAgentDispatchesInThread2,
|
|
21313
21530
|
countAllMetrics: () => countAllMetrics2,
|
|
21314
21531
|
countAllPages: () => countAllPages2,
|
|
21315
21532
|
countKv: () => countKv2,
|
|
@@ -21384,9 +21601,10 @@ __export(exports_db, {
|
|
|
21384
21601
|
failPendingResumeIfUnclaimed: () => failPendingResumeIfUnclaimed2,
|
|
21385
21602
|
failTask: () => failTask2,
|
|
21386
21603
|
findActiveTasksByVcs: () => findActiveTasksByVcs2,
|
|
21387
|
-
|
|
21604
|
+
findCompletedTasksInThread: () => findCompletedTasksInThread2,
|
|
21388
21605
|
findExistingLinearTrackerContextWork: () => findExistingLinearTrackerContextWork2,
|
|
21389
21606
|
findRecentCancelledTaskInThread: () => findRecentCancelledTaskInThread2,
|
|
21607
|
+
findRecentFailedTaskInThread: () => findRecentFailedTaskInThread2,
|
|
21390
21608
|
findRecentSimilarTasks: () => findRecentSimilarTasks2,
|
|
21391
21609
|
findTaskByAgentMailThread: () => findTaskByAgentMailThread2,
|
|
21392
21610
|
findTaskByGitHub: () => findTaskByGitHub2,
|
|
@@ -21535,6 +21753,7 @@ __export(exports_db, {
|
|
|
21535
21753
|
getScriptRun: () => getScriptRun2,
|
|
21536
21754
|
getScriptRunByIdempotencyKey: () => getScriptRunByIdempotencyKey2,
|
|
21537
21755
|
getScriptRunExecutionArgs: () => getScriptRunExecutionArgs2,
|
|
21756
|
+
getScriptRunFollowUpGuard: () => getScriptRunFollowUpGuard2,
|
|
21538
21757
|
getScriptRunJournalStep: () => getScriptRunJournalStep2,
|
|
21539
21758
|
getServiceByAgentAndName: () => getServiceByAgentAndName2,
|
|
21540
21759
|
getServiceById: () => getServiceById2,
|
|
@@ -21727,7 +21946,9 @@ __export(exports_db, {
|
|
|
21727
21946
|
setApiKeyPlan: () => setApiKeyPlan2,
|
|
21728
21947
|
setBudgetRefusalFollowUpTaskId: () => setBudgetRefusalFollowUpTaskId2,
|
|
21729
21948
|
setFavorite: () => setFavorite2,
|
|
21949
|
+
setScriptRunFollowUpGuard: () => setScriptRunFollowUpGuard2,
|
|
21730
21950
|
setSlackMessageTracking: () => setSlackMessageTracking2,
|
|
21951
|
+
setTaskTitleIfUnset: () => setTaskTitleIfUnset2,
|
|
21731
21952
|
setUserFavorite: () => setUserFavorite2,
|
|
21732
21953
|
settleSupersededTaskDependents: () => settleSupersededTaskDependents2,
|
|
21733
21954
|
shouldBlockPolling: () => shouldBlockPolling2,
|
|
@@ -25119,7 +25340,7 @@ async function deleteScheduledTask2(id) {
|
|
|
25119
25340
|
const parent = await getTaskById2(deferred.parentTaskId);
|
|
25120
25341
|
if (!parent?.deferredAt)
|
|
25121
25342
|
return;
|
|
25122
|
-
const { createWorkerTaskFollowUp } = await import("./worker-follow-up-
|
|
25343
|
+
const { createWorkerTaskFollowUp } = await import("./worker-follow-up-3q78fqmr.js");
|
|
25123
25344
|
await createWorkerTaskFollowUp({
|
|
25124
25345
|
task: parent,
|
|
25125
25346
|
status: "failed",
|
|
@@ -26303,6 +26524,9 @@ function rowToPage(row) {
|
|
|
26303
26524
|
passwordHash: row.passwordHash ?? undefined,
|
|
26304
26525
|
body: row.body,
|
|
26305
26526
|
needsCredentials: row.needsCredentials ? JSON.parse(row.needsCredentials) : undefined,
|
|
26527
|
+
theme: row.theme ?? null,
|
|
26528
|
+
themeTokens: parsePageThemeTokens(row.theme_tokens),
|
|
26529
|
+
designVersion: typeof row.design_version === "number" ? row.design_version : 1,
|
|
26306
26530
|
viewCount: typeof row.view_count === "number" ? row.view_count : 0,
|
|
26307
26531
|
createdAt: normalizeDateRequired(row.createdAt),
|
|
26308
26532
|
updatedAt: normalizeDateRequired(row.updatedAt)
|
|
@@ -26310,8 +26534,8 @@ function rowToPage(row) {
|
|
|
26310
26534
|
}
|
|
26311
26535
|
async function createPage2(data) {
|
|
26312
26536
|
const id = crypto.randomUUID().replace(/-/g, "");
|
|
26313
|
-
const row = await getDbClient2().get(`INSERT INTO pages (id, "key", agentId, slug, title, description, contentType, authMode, passwordHash, body, needsCredentials)
|
|
26314
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING *`, [
|
|
26537
|
+
const row = await getDbClient2().get(`INSERT INTO pages (id, "key", agentId, slug, title, description, contentType, authMode, passwordHash, body, needsCredentials, theme, theme_tokens, design_version)
|
|
26538
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING *`, [
|
|
26315
26539
|
id,
|
|
26316
26540
|
normalizeAssetKey(data.key ?? defaultAssetKey("page", id)),
|
|
26317
26541
|
data.agentId,
|
|
@@ -26322,7 +26546,10 @@ async function createPage2(data) {
|
|
|
26322
26546
|
data.authMode ?? "authed",
|
|
26323
26547
|
data.passwordHash ?? null,
|
|
26324
26548
|
data.body,
|
|
26325
|
-
data.needsCredentials ? JSON.stringify(data.needsCredentials) : null
|
|
26549
|
+
data.needsCredentials ? JSON.stringify(data.needsCredentials) : null,
|
|
26550
|
+
data.theme ?? null,
|
|
26551
|
+
data.themeTokens ? JSON.stringify(data.themeTokens) : null,
|
|
26552
|
+
data.designVersion ?? 2
|
|
26326
26553
|
]);
|
|
26327
26554
|
if (!row)
|
|
26328
26555
|
throw new Error("Failed to create page");
|
|
@@ -26455,6 +26682,18 @@ async function updatePage2(id, data) {
|
|
|
26455
26682
|
updates.push("slug = ?");
|
|
26456
26683
|
params.push(data.slug);
|
|
26457
26684
|
}
|
|
26685
|
+
if (data.theme !== undefined) {
|
|
26686
|
+
updates.push("theme = ?");
|
|
26687
|
+
params.push(data.theme);
|
|
26688
|
+
}
|
|
26689
|
+
if (data.themeTokens !== undefined) {
|
|
26690
|
+
updates.push("theme_tokens = ?");
|
|
26691
|
+
params.push(data.themeTokens ? JSON.stringify(data.themeTokens) : null);
|
|
26692
|
+
}
|
|
26693
|
+
if (data.designVersion !== undefined) {
|
|
26694
|
+
updates.push("design_version = ?");
|
|
26695
|
+
params.push(data.designVersion);
|
|
26696
|
+
}
|
|
26458
26697
|
if (updates.length === 0)
|
|
26459
26698
|
return getPage2(id);
|
|
26460
26699
|
updates.push("updatedAt = ?");
|
|
@@ -29135,7 +29374,8 @@ function rowToScriptRun(row) {
|
|
|
29135
29374
|
error: row.error ?? undefined,
|
|
29136
29375
|
lastHeartbeatAt: row.last_heartbeat_at ?? undefined,
|
|
29137
29376
|
idempotencyKey: row.idempotencyKey ?? undefined,
|
|
29138
|
-
requestedByUserId: row.requestedByUserId ?? undefined
|
|
29377
|
+
requestedByUserId: row.requestedByUserId ?? undefined,
|
|
29378
|
+
sourceTaskId: row.sourceTaskId ?? undefined
|
|
29139
29379
|
};
|
|
29140
29380
|
}
|
|
29141
29381
|
function rowToScriptRunListItem(row) {
|
|
@@ -29162,8 +29402,9 @@ async function createScriptRun2(data) {
|
|
|
29162
29402
|
return { run: rowToScriptRun(existing), existing: true };
|
|
29163
29403
|
}
|
|
29164
29404
|
const row = await client.get(`INSERT INTO script_runs
|
|
29165
|
-
(id, agentId, scriptName, source, args, idempotencyKey, requestedByUserId,
|
|
29166
|
-
|
|
29405
|
+
(id, agentId, scriptName, source, args, idempotencyKey, requestedByUserId, sourceTaskId,
|
|
29406
|
+
created_by, updated_by)
|
|
29407
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
29167
29408
|
RETURNING *`, [
|
|
29168
29409
|
data.id,
|
|
29169
29410
|
data.agentId,
|
|
@@ -29172,6 +29413,7 @@ async function createScriptRun2(data) {
|
|
|
29172
29413
|
sealJson(data.args ?? null),
|
|
29173
29414
|
data.idempotencyKey ?? null,
|
|
29174
29415
|
data.requestedByUserId ?? null,
|
|
29416
|
+
data.sourceTaskId ?? null,
|
|
29175
29417
|
data.createdBy ?? null,
|
|
29176
29418
|
data.updatedBy ?? data.createdBy ?? null
|
|
29177
29419
|
]);
|
|
@@ -29418,6 +29660,7 @@ var init_db4 = __esm(() => {
|
|
|
29418
29660
|
init_context_versions();
|
|
29419
29661
|
init_model_profiles();
|
|
29420
29662
|
init_page_search();
|
|
29663
|
+
init_page_theme_tokens();
|
|
29421
29664
|
init_runtime2();
|
|
29422
29665
|
init_session_moves();
|
|
29423
29666
|
init_session_tree();
|
|
@@ -29499,4 +29742,4 @@ var init_db4 = __esm(() => {
|
|
|
29499
29742
|
};
|
|
29500
29743
|
});
|
|
29501
29744
|
|
|
29502
|
-
export { slackContextKey, chatSdkContextKey, chatThreadOfContextKey, agentmailContextKey, githubContextKey, gitlabContextKey, azureDevOpsContextKey, azureDevOpsWorkItemContextKey, bitbucketContextKey, linearContextKey, buildJiraContextKey, scheduleContextKey, workflowContextKey, agentContextKey, pageContextKey, init_context_key, sessionSourceKey, sourceOfKey, SOURCE_GROUPS_READ_ONLY, sourceMoveError, init_source_key, checkSlackRoutingCoherence, init_slack_routing, init_catalog, catalog_default, COMPANY_TEAM_SIZES, COMPANY_USE_CASES, USER_FUNCTIONS, reportedUseCase, reportedUserFunction, init_company_profile, mapTriggerSurface, init_telemetry_context, TELEMETRY_PROXY_ORIGIN, normalizeOrgWebsite, orgLogoUrl, isFilledOrgLogoUrl, init_org_website, beginRequestAuthScope, setRequestAuth, getRequestAuth, runWithoutRequestAuth, authUserId, authUser, isOperatorAuth, getCurrentRequestUserId, init_request_auth_context, setTelemetryIngestObserver, isTelemetryEnabled, _resolveIntegrationType, _resolveIntegrationProvider, initTelemetry, setTelemetryRoleResolver, setTelemetryFunctionResolver, isTelemetryReady, track, trackRelayed, telemetry, emitIntegrationConnected, init_telemetry, auditAssetKeys, init_asset_key_audit, CredentialBindingSchema, placeholderForConfigKey, CredentialBroker, DEFAULT_CREDENTIAL_BINDINGS, isPrivateAddress, assertUrlSafe, parseEgressAllowlist, init_egress_guard, init_credential_broker, encryptSecret, decryptSecret, getEncryptionKey, init_crypto, isInTransaction, init_db_client, breaksJsonValidity, scrubJsonValue, foldHexCopies, init_scrub_json, sealJson, init_sealed_json, getPromptTemplateDefaultDrift, init_default_drift, init_templates2, init_templates3, isSqliteVecAvailable2, resolveSqliteVecExtensionPath2, __resetSqliteVecExtensionPathCacheForTests2, initDb2, getDb2, closeDb2, getDbClient2, init_runtime2, cachedUserRole, cachedUserFunction, invalidateTelemetryUserRole, configureOrgDomainPersistence, recomputeOrgDomain, scheduleOrgDomainRecompute, init_telemetry_identity, resolveTriggerSurface, emitTaskTelemetry, init_telemetry_trigger, isEnvExportRestrictedKey, init_config_env_export, MASKED_SECRET_VALUE, init_config_secrets, HeartbeatExpiryError, init_heartbeat_expiry, isRuntimePoolsEnabled, init_runtime_pools_flag, normalizeDate, normalizeDateRequired, init_date_utils, rowToAgent, updateAgentCredentialState2, updateAgentCredentialMissing2, createAgent2, getAgentById2, EXTENSION_AGENT_ROLE2, NOT_EXTENSION_AGENT_SQL2, isExtensionAgent2, extensionAgentAssignmentError2, ReservedAgentRoleError2, reservedRoleViolation2, ExtensionAgentAssignmentError2, getAllAgents2, getAgentStatusCounts2, getLeadAgent2, updateAgentStatus2, updateAgentMaxTasks2, updateAgentProvider2, setAgentHarnessProvider2, updateAgentCredStatus2, listAgentsWithCredStatusByProvider2, getAgentHarnessProviders2, updateAgentActivity2, MAX_EMPTY_POLLS2, incrementEmptyPollCount2, resetEmptyPollCount2, shouldBlockPolling2, deleteAgent2, getActiveTaskCount2, hasCapacity2, getRemainingCapacity2, updateAgentStatusFromCapacity2, isPoolAffinityEnforcementEnabled2, buildRoutingAffinityFromAgent2, isAgentEligibleForTask2, getAgentDailyTaskCounts2, init_agents, listApprovalRequestSummaries2, getPendingApprovalVoteState2, recordApprovalVotes2, getPendingApprovalsForTasks2, approvalCancellationNotificationKey, listUndeliveredCancelledApprovalRequestIds, init_approvals, computeContentHash2, createContextVersion2, getLatestContextVersion2, getContextVersion2, getContextVersionHistory2, vcsRepoName, vcsRepoUrlMatches, init_vcs_repo_match, startTaskSearchBackfill, stopTaskSearchBackfill, init_search_index, rowToAgentTask, getTaskById2, getChildTasks2, TASK_LINEAGE_LIMITS2, getTaskLineage2, hasNonTerminalResumeChild2, SUPERSEDED_RESUME_REPAIR_WINDOW_MS2, getSupersededTasksWithoutResume2, getSupersededTasksWithUnsettledDependents2, hasNonTerminalRerouteDecisionChild2, getTasksByAgentId2, getAgentCurrentTask2, getTasksByStatus2, findTaskByVcs2, findActiveTasksByVcs2, findTaskByGitHub2, readableSessionCondition, getAllTasks2, getTasksCount2, getTaskStats2, getCompletedSlackTasks2, getPendingSlackRelayTasks2, markSlackRelayAttempted2, markSlackRelayDelivered2, markFinalizedSlackRelaysDelivered2, getPendingChatRelayTasks2, giveUpStaleChatRelays2, markChatRelayAttempted2, recordChatRelayError2, markChatRelayDelivered2, markChatRelayGivenUp2, getRecentlyFinishedWorkerTasks2, markTasksNotified2, resetTasksNotified2, getInProgressSlackTasks2, getSlackTasksMissingTree2, getInProgressTasksByContextKey2, isLinearTrackerContextKey2, findExistingLinearTrackerContextWork2, getLatestTaskByContextKey2, getLatestScriptRunStepTaskByContextKey2, getAgentWorkingOnThread2, getLatestActiveTaskInThread2, getLatestLeadTaskInThread2, getAgentWorkingOnContextKey2, getLatestActiveTaskByContextKey2, getLatestLeadTaskByContextKey2, getMostRecentTaskInThread2, findCompletedTaskInThread2, findRecentCancelledTaskInThread2, init_read, MODEL_PROFILE_CONFIG_KEY, listModelProfiles, getModelProfileByName, createModelProfile, updateModelProfile, modelProfileReferences, modelProfileRefError, deleteModelProfile, getAgentDefaultProfileName, repoModelOverrideKeys, taskProfileError, init_model_profiles, AssetKeyMovesBlockedError2, assertAssetKeyMovesAllowed2, moveTaskChainKeyInTx2, moveSessionChains, listPrefixRoots, listSharedPrefixRoots, init_session_moves, getSessionGroupKey, getSessionReadState, getSessionTree, triageSessionList, init_session_tree, setHumanFreeQueueListener, drainHumanFreeReclassifyQueue, init_human_free, onTaskStarted, init_task_lifecycle_events, channelTopic, addWorkerSubscription, removeWorkerSubscription, listSubscribedWorkerAgents, init_channels, publishWorkerNudge, init_worker_nudges, CHAT_SDK_ADAPTER_NAMES, CHAT_SDK_ADAPTER_SCHEMAS, ChatSdkAdaptersDraftSchema, firstIssueText, isAdapterEntryEnabled, init_schema, TELEMETRY_RANKING_KEY, PUBLIC_RANKING_ENABLED_KEY, RANKING_CATEGORIES, readTelemetryRanking, rankingFormSchema, buildListing, init_telemetry_ranking, resolveQuickJSPoolSize, init_quickjs_pool_config, SLACK_REACTION_DEFAULTS, SLACK_REACTION_CONFIG_KEYS, reactionName, completedStatusIcon, init_reaction_shortcode, API_DRAINING_HEADER, API_DRAIN_MAX_MS_LIMIT, isApiDrainingResponse, init_api_drain2, parseEnabledTools, init_enabled_tools, parseTaskToolManifest, CHAT_TASK_ONLY_TOOLS, isChatSdkTask, selectTaskTools, init_task_tool_manifest, tierConfigKey, init_model_tier_keys, isApiOnlyConfigKey, isInternalConfigKey, internalConfigKeyError, isReservedConfigKey, reservedKeyError, MAX_DB_RETENTION_DAYS, DB_RETENTION_TUNING_BOUNDS, APPS_JSON_COLUMN_MAX_BYTES_BOUNDS, CODEX_OAUTH_KEEP_WARM_MAX_AGE_HOURS_BOUNDS, validateRuntimeTokenTtlHours, validateControllerTokenTtlDays, validateControllerGraceSec, validateConfigValue, validateConfigEntry, validateExportToEnv, init_swarm_config_guard, getDefaultAuthorizationIdForProvider, getOAuthApp, getOAuthAppById, getOAuthAppIdByProvider, createOAuthApp, updateOAuthAppById, upsertOAuthApp, listAuthorizationsForApp, getAuthorizationById, upsertAuthorization, updateAuthorizationTokens, updateAuthorizationIdentity, deleteAuthorizationById, deleteAuthorizationsForApp, createOAuthPending, consumeOAuthPending, gcOAuthPending, markAuthorizationRefreshFailed, getOAuthTokens, listAuthorizationSweepRows, listKeepAliveAuthorizations, deleteOAuthTokens, acquireOAuthRefreshLock, releaseOAuthRefreshLock, init_oauth, OpenAI2, init_openai2, LEARNING_DUPLICATE_MIN_SIMILARITY, CANDIDATE_SET_MULTIPLIER, isGraphExpansionEnabled, EMBEDDING_DIMENSIONS, init_constants2, LONGTERM_ROOT, MEMORY_KEY_PATTERN, MEMORY_KEY_PATTERN_MESSAGE, MEMORY_KEY_MAX_LENGTH, isLongtermKey, longtermKeyError, isConsolidatedKey, consolidatedKeyMessage, resolveStoreKey, init_key_paths, computeScore, rerank, init_reranker, searchMemoryCandidates, init_search_candidates, rowToCandidate, init_sqlite_store, getEmbeddingProvider2, resetEmbeddingProvider2, getMemoryStore2, init_memory, embeddingProvider2, computeScriptEmbedding2, writeScriptEmbedding2, embedScript2, searchScripts2, reembedAllScripts2, init_embeddings, upsertScriptByName, getScript, getScriptById, getScriptVersion, listScripts, listScriptVersions, deleteScript, touchScratchScriptLastUsed, restoreScratchScriptLastUsedIfUnchanged, createScriptApi, listScriptApisForScript, getScriptApiById, getScriptApiSecret, updateScriptApi, rotateScriptApiSecret, deleteScriptApi, recordScriptApiUsage, init_db3, oauthSecretName, registerStoredSecret, loadSecretRegistry, init_secret_registry, WorkflowReplayStateError, init_workflow_replay, getWorkflowRunTriggeredByAgentId, getWorkflowRunSummary, getWorkflowRunStepsSlimByRunId, WORKFLOW_RUN_TREE_MAX_DEPTH, WorkflowRunTreeError, getRunLineageBlock, getWorkflowRunTreeIds, getWorkflowRunStatus, getOpenWorkflowTreeTaskIds, getTaskIdsWithDependents, workflowRunTreeHasOpenWork, getWorkflowRunTree, cancelOpenWorkflowTreeSteps, disarmWorkflowTreeRetries, cancelLiveWorkflowTreeRuns, getChildWorkflowRunId, isParentStepAttemptCurrent, getRunningSubWorkflowSteps, getWorkflowRunParent, getWorkflowRunLineage, getSettledChildRunParentSteps, emitRunFinished, createForeachChildSteps, createForeachAttemptSteps, init_workflow_runs, SESSION_ACTIVITY_REFRESH_MIN_INTERVAL_MS2, refreshActiveSessionOnActivity2, getActiveSessionById, init_active_sessions, STEERING_MOVED_ERROR, SteeringRequestError, SteeringBlockedError, isSteeringEnabled, getTaskSteeringFields, getTaskSteeringFieldsForTasks, promotePendingSteeringForTask, markSteeringUndeliverable, carryUnhandledSteering, requestSteering, init_steering2, createTask2, getPendingTaskForAgent2, assignUnassignedTaskPending2, startTask2, updateTaskClaudeSessionId2, recordTaskProviderIfUnset2, updateTaskTitle2, completeTask2, failTask2, overwriteTerminalTaskResultText2, cancelTask2, supersedeTask2, settleSupersededTaskDependents2, backfillSupersedeTaskResumeTaskId2, pauseTask2, resumeTask2, getPausedTasksForAgent2, getOrphanedInProgressTasksForAgent2, resetOrphanedInProgressTasksForAgent2, getRecentlyCancelledTasksForAgent2, deleteTask2, updateTaskProgress2, IdempotencyKeyTakenError, workflowRequestFingerprint, findAcceptedWorkflowOperation, assertWorkflowIdempotencyKeyUnused, recordAcceptedWorkflowOperation, init_workflow_idempotency, recordKeySeatMismatch2, recordKeyValidation2, retirePoolKeyStatus, init_api_keys, getScriptRunExecutionArgs2, literalPrefixPattern2, getSlackRenderV2ActivatedAt2, ensureSlackRenderV2Activation2, getSlackDelegationActivatedAt2, ensureSlackDelegationActivation2, isPendingSlackMessage2, isSettledSlackMessage2, recordSlackMessage2, reserveSlackMessage2, bindSlackMessageTimestamp2, updateSlackMessageRecord2, markSlackTreeRendered2, deleteSlackMessageRecord2, getSlackTreeMessage2, getSlackTreeMessageByThread2, getSlackOutcomeMessage2, getResolvableDeferralOutcomes2, markSlackDeferralResolved2, noteSlackOutcomeDeliveryFailure2, abandonSlackOutcomeDelivery2, getSlackTreeMessages2, getSlackMessageByChannelTs2, getSlackTasksInThread2, listSlackThreadsAwaitingHuman2, isSlackThreadAwaitingHuman2, markTaskSlackReplySent2, setSlackMessageTracking2, updateTaskVcs2, insertTaskAttachment2, recordTaskPullRequestAttachments2, getAssetKeyMappingByProvider2, upsertAssetKeyMapping2, getAssetKeyMapping2, listAssetSummaries2, moveAssetKey2, deleteTaskAttachment2, replaceTaskAttachment2, getTaskAttachments2, createSteeringMessage2, getSteeringMessagesForTask2, getSteeringMessageById2, getPendingSteeringForTask2, getPendingSteeringForAgent2, markSteeringDelivered2, markSteeringHandled2, markSteeringPromoted2, cancelPendingSteeringForTask2, hasPendingSteering2, getAgentWithTasks2, getAllAgentsWithTasks2, createLogEntry2, getLogsByAgentId2, getLogsByTaskId2, getLogsByTaskIdAndEventType2, getLogsByTaskIdChronological2, getLogsByEventType2, getAllLogs2, findRecentSimilarTasks2, createTaskExtended2, claimTask2, releaseTask2, acceptTask2, rejectTask2, moveTaskToBacklog2, moveTaskFromBacklog2, promoteDraftTask2, refreshDraftTaskLease2, promoteAbandonedDraftTasks2, releaseStaleReviewingTasks2, releaseStaleOfferedTasksForOfflineAgents2, getOfferedTasksForAgent2, claimOfferedTask2, getUnassignedTasksCount2, getUnassignedTaskIds2, getUnassignedTaskIdsForAgent2, checkDependencies2, getDependentTasks2, cascadeFailDependents2, updateAgentProfile2, updateAgentName2, createChannel2, getMessageById2, getChannelById2, getChannelByName2, getAllChannels2, deleteChannel2, postMessage2, getChannelMessages2, updateReadState2, getLastReadAt2, getUnreadMessages2, getMentionsForAgent2, getInboxSummary2, claimMentions2, releaseMentionProcessing2, releaseStaleMentionProcessing2, createService2, getServiceById2, getServiceByAgentAndName2, getServicesByAgentId2, getAllServices2, updateServiceStatus2, deleteService2, upsertService2, deleteServicesByAgentId2, createSessionLogs2, getSessionLogsByTaskId2, getSessionLogsBySession2, createSessionCost2, getSessionCostsByTaskId2, getSessionCostsByAgentId2, getAllSessionCosts2, getSessionCostsFiltered2, UNATTRIBUTED_USER_ID2, getSessionCostSummary2, getAttributionByPerson2, getDashboardCostSummary2, createInboxMessage2, getInboxMessageById2, getUnreadInboxMessages2, claimInboxMessages2, markInboxMessageRead2, markInboxMessageResponded2, markInboxMessageDelegated2, releaseStaleProcessingInbox2, getConcurrentContext2, getScheduledTasks2, getScheduledTaskById2, getScheduledTaskByName2, createScheduledTask2, updateScheduledTask2, deleteScheduledTask2, getDueScheduledTasks2, autoEncryptLegacyPlaintextSecrets2, maskSecrets2, getSwarmConfigs2, getInjectableGlobalConfigs2, getSwarmConfigById2, getSwarmConfigLookupById2, upsertSwarmConfig2, emitBuiltInIntegrationConnectedOnce2, deleteSwarmConfig2, deleteSwarmConfigByKey2, getResolvedConfig2, getSwarmRepos2, getSwarmRepoById2, getSwarmRepoByName2, getSwarmRepoByUrl2, createSwarmRepo2, updateSwarmRepo2, deleteSwarmRepo2, getAgentMailInboxMapping2, getAgentMailInboxMappingsByAgent2, getAllAgentMailInboxMappings2, createAgentMailInboxMapping2, deleteAgentMailInboxMapping2, findTaskByAgentMailThread2, insertActiveSession2, deleteActiveSession2, deleteActiveSessionById2, getActiveSessions2, heartbeatActiveSession2, cleanupStaleSessions2, cleanupAgentSessions2, updateActiveSessionProviderSessionId2, getActiveSessionForTask2, reassociateSessionLogs2, getStalledInProgressTasks2, getStalePinnedResumes2, failPendingResumeIfUnclaimed2, getIdleWorkersWithCapacity2, getUnassignedPoolTasks2, getStaleUnassignedAffinityTasks2, getRecentFailedTasks2, getRecentCompletedCount2, getRecentFailedCount2, createWorkflow2, getWorkflow2, listWorkflows2, updateWorkflow2, deleteWorkflow2, getWorkflowsByScheduleId2, createWorkflowRun2, getWorkflowRun2, updateWorkflowRun2, listWorkflowRuns2, countWorkflowRuns2, listWorkflowRunsPage2, createWorkflowRunStep2, getWorkflowRunStep2, updateWorkflowRunStep2, getWorkflowRunStepsByRunId2, getStuckWorkflowRuns2, getLastSuccessfulRun2, getLastRunStart2, getRetryableSteps2, getCompletedStepNodeIds2, getTaskByWorkflowRunStepId2, detachTaskFromWorkflowRunStep2, getStepByIdempotencyKey2, getStepCountForNode2, getLatestStepForNode2, getCurrentStepForNode2, createWorkflowVersion2, getWorkflowVersions2, getWorkflowVersion2, createAppVersion2, getAppVersions2, getAppVersion2, createPage2, getPage2, getPageBySlug2, getLatestPageBySlug2, listPagesByAgent2, listAllPages2, countAllPages2, countPagesByAgent2, updatePage2, deletePage2, incrementPageViewCount2, createPageVersion2, getPageVersions2, getPageVersion2, createMetric2, getMetric2, getMetricBySlug2, listMetricsByAgent2, listAllMetrics2, countAllMetrics2, countMetricsByAgent2, updateMetric2, deleteMetric2, createMetricVersion2, getMetricVersions2, getMetricVersion2, getPromptTemplates2, getPromptTemplateById2, upsertPromptTemplate2, deletePromptTemplate2, resetPromptTemplateToDefault2, getPromptTemplateHistory2, resolvePromptTemplate2, checkoutPromptTemplate2, getAllChannelActivityCursors2, getChannelActivityCursor2, upsertChannelActivityCursor2, createApprovalRequest2, getApprovalRequestById2, resolveApprovalRequest2, cancelApprovalRequestById2, cancelPendingApprovalRequestsForRun2, listCancelledApprovalRequestsForRun2, listCancelledApprovalRequestsForStep2, claimApprovalCancellationNotification2, completeApprovalCancellationNotificationClaim2, releaseApprovalCancellationNotificationClaim2, updateApprovalRequestNotifications2, listApprovalRequests2, getStuckApprovalRuns2, getApprovalRequestByStepId2, getExpiredPendingApprovals2, getStaleApprovalRequests2, createWaitState2, getWaitStateById2, getWaitStateByStepId2, getDueWaitStates2, getPendingEventWaitNames2, getPendingWaitsByEvent2, resolveWaitState2, getStuckWaitRuns2, SKILL_FILE_LIMITS2, normalizeSkillFilePath2, createSkill2, updateSkill2, listSkillFileManifest2, getSkillFiles2, getSkillFile2, upsertSkillFile2, upsertSkillFiles2, deleteSkillFile2, deleteSkill2, getSkillById2, getSkillByName2, listSkills2, searchSkills2, installSkill2, getSystemDefaultSkills2, installSystemDefaultSkillsForAgent2, uninstallSkill2, getAgentSkills2, toggleAgentSkill2, createMcpServer2, emitMcpServerConnectedTelemetry2, updateMcpServer2, deleteMcpServer2, getMcpServerById2, getMcpServerByName2, listMcpServers2, installMcpServer2, uninstallMcpServer2, getAgentMcpServers2, createContextSnapshot2, getContextSnapshotsByTaskId2, getContextSnapshotsBySessionId2, getContextSummaryByTaskId2, getAvailableKeyIndices2, recordKeyUsage2, setApiKeyPlan2, markKeyRateLimited2, recordKeyAuthFailure2, recordKeyRateLimitWindows2, setApiKeyName2, clearKeyRateLimit2, getKeyStatuses2, getKeyCostSummary2, getUserById2, getAllUsers2, createUser2, updateUser2, deleteUser2, listInboxState2, upsertInboxState2, listFavorites2, listUserFavorites2, getFavoriteItemIdSet2, setFavorite2, setUserFavorite2, withFavoriteFlags2, listTaskTemplates2, getRootTaskChain2, listRecentSessions2, countSessions2, getBudget2, getBudgets2, upsertBudget2, deleteBudget2, getAllPricingRows2, getPricingRows2, getActivePricingRow2, insertPricingRow2, deletePricingRow2, getDailySpendForAgent2, getDailySpendGlobal2, getDailySpendForUser2, recordBudgetRefusalNotification2, getBudgetRefusalNotification2, getRecentBudgetRefusalNotifications2, hasBudgetRefusalNotificationToday2, setBudgetRefusalFollowUpTaskId2, getLiveAgentCounts2, getReadyAgentCounts2, getInstanceActivity2, getSwarmMetrics2, hasFirstCompletedTask2, getKv2, sweepExpiredKv2, sweepExpiredKvPrefix2, upsertKv2, claimKv2, deleteKv2, KvTypeCollisionError2, incrKv2, kvPrefixUpperBound2, listKv2, countKv2, createScriptRun2, recordInlineScriptRun2, getScriptRun2, getScriptRunByIdempotencyKey2, listScriptRuns2, countScriptRuns2, countActiveScriptRuns2, updateScriptRun2, updateScriptRunIfNotTerminal2, updateScriptRunIfRunning2, getRunningScriptRuns2, getScriptRunJournalStep2, upsertScriptRunJournalStep2, listScriptRunJournalSteps2, countScriptRunJournalSteps2, countScriptRunJournalAgentTaskSteps2, exports_db, init_db4 };
|
|
29745
|
+
export { slackContextKey, chatSdkContextKey, chatThreadOfContextKey, agentmailContextKey, githubContextKey, gitlabContextKey, azureDevOpsContextKey, azureDevOpsWorkItemContextKey, bitbucketContextKey, linearContextKey, buildJiraContextKey, scheduleContextKey, workflowContextKey, agentContextKey, pageContextKey, init_context_key, sessionSourceKey, sourceOfKey, SOURCE_GROUPS_READ_ONLY, sourceMoveError, init_source_key, checkSlackRoutingCoherence, init_slack_routing, init_catalog, catalog_default, COMPANY_TEAM_SIZES, COMPANY_USE_CASES, USER_FUNCTIONS, reportedUseCase, reportedUserFunction, init_company_profile, mapTriggerSurface, init_telemetry_context, TELEMETRY_PROXY_ORIGIN, normalizeOrgWebsite, orgLogoUrl, isFilledOrgLogoUrl, init_org_website, beginRequestAuthScope, setRequestAuth, getRequestAuth, runWithoutRequestAuth, authUserId, authUser, isOperatorAuth, getCurrentRequestUserId, init_request_auth_context, setTelemetryIngestObserver, isTelemetryEnabled, _resolveIntegrationType, _resolveIntegrationProvider, initTelemetry, setTelemetryRoleResolver, setTelemetryFunctionResolver, isTelemetryReady, track, trackRelayed, telemetry, emitIntegrationConnected, init_telemetry, auditAssetKeys, init_asset_key_audit, CredentialBindingSchema, placeholderForConfigKey, CredentialBroker, DEFAULT_CREDENTIAL_BINDINGS, isPrivateAddress, assertUrlSafe, parseEgressAllowlist, init_egress_guard, init_credential_broker, encryptSecret, decryptSecret, getEncryptionKey, init_crypto, isInTransaction, init_db_client, breaksJsonValidity, scrubJsonValue, foldHexCopies, init_scrub_json, sealJson, init_sealed_json, getPromptTemplateDefaultDrift, init_default_drift, init_templates2, init_templates3, isSqliteVecAvailable2, resolveSqliteVecExtensionPath2, __resetSqliteVecExtensionPathCacheForTests2, initDb2, getDb2, closeDb2, getDbClient2, init_runtime2, cachedUserRole, cachedUserFunction, invalidateTelemetryUserRole, configureOrgDomainPersistence, recomputeOrgDomain, scheduleOrgDomainRecompute, init_telemetry_identity, resolveTriggerSurface, emitTaskTelemetry, init_telemetry_trigger, isEnvExportRestrictedKey, init_config_env_export, MASKED_SECRET_VALUE, init_config_secrets, HeartbeatExpiryError, init_heartbeat_expiry, isRuntimePoolsEnabled, init_runtime_pools_flag, normalizeDate, normalizeDateRequired, init_date_utils, rowToAgent, updateAgentCredentialState2, updateAgentCredentialMissing2, createAgent2, getAgentById2, EXTENSION_AGENT_ROLE2, NOT_EXTENSION_AGENT_SQL2, isExtensionAgent2, extensionAgentAssignmentError2, ReservedAgentRoleError2, reservedRoleViolation2, ExtensionAgentAssignmentError2, getAllAgents2, getAgentStatusCounts2, getLeadAgent2, updateAgentStatus2, updateAgentMaxTasks2, updateAgentProvider2, setAgentHarnessProvider2, updateAgentCredStatus2, listAgentsWithCredStatusByProvider2, getAgentHarnessProviders2, updateAgentActivity2, MAX_EMPTY_POLLS2, incrementEmptyPollCount2, resetEmptyPollCount2, shouldBlockPolling2, deleteAgent2, getActiveTaskCount2, hasCapacity2, getRemainingCapacity2, updateAgentStatusFromCapacity2, isPoolAffinityEnforcementEnabled2, buildRoutingAffinityFromAgent2, isAgentEligibleForTask2, getAgentDailyTaskCounts2, init_agents, listApprovalRequestSummaries2, getPendingApprovalVoteState2, recordApprovalVotes2, getPendingApprovalsForTasks2, approvalCancellationNotificationKey, listUndeliveredCancelledApprovalRequestIds, init_approvals, computeContentHash2, createContextVersion2, getLatestContextVersion2, getContextVersion2, getContextVersionHistory2, vcsRepoName, vcsRepoUrlMatches, init_vcs_repo_match, startTaskSearchBackfill, stopTaskSearchBackfill, init_search_index, rowToAgentTask, getTaskById2, getChildTasks2, TASK_LINEAGE_LIMITS2, getTaskLineage2, hasNonTerminalResumeChild2, SUPERSEDED_RESUME_REPAIR_WINDOW_MS2, getSupersededTasksWithoutResume2, getSupersededTasksWithUnsettledDependents2, hasNonTerminalRerouteDecisionChild2, getTasksByAgentId2, getAgentCurrentTask2, getTasksByStatus2, findTaskByVcs2, findActiveTasksByVcs2, findTaskByGitHub2, readableSessionCondition, getAllTasks2, getTasksCount2, getTaskStats2, getCompletedSlackTasks2, getPendingSlackRelayTasks2, markSlackRelayAttempted2, markSlackRelayDelivered2, markFinalizedSlackRelaysDelivered2, getPendingChatRelayTasks2, giveUpStaleChatRelays2, markChatRelayAttempted2, recordChatRelayError2, markChatRelayDelivered2, markChatRelayGivenUp2, getRecentlyFinishedWorkerTasks2, markTasksNotified2, resetTasksNotified2, getInProgressSlackTasks2, getSlackTasksMissingTree2, getInProgressTasksByContextKey2, isLinearTrackerContextKey2, findExistingLinearTrackerContextWork2, getLatestTaskByContextKey2, getLatestScriptRunStepTaskByContextKey2, getAgentWorkingOnThread2, getLatestActiveTaskInThread2, getLatestLeadTaskInThread2, getAgentWorkingOnContextKey2, getLatestActiveTaskByContextKey2, getLatestLeadTaskByContextKey2, getMostRecentTaskInThread2, findCompletedTasksInThread2, findRecentFailedTaskInThread2, countAgentDispatchesInThread2, findRecentCancelledTaskInThread2, init_read, MODEL_PROFILE_CONFIG_KEY, listModelProfiles, getModelProfileByName, createModelProfile, updateModelProfile, modelProfileReferences, modelProfileRefError, deleteModelProfile, getAgentDefaultProfileName, repoModelOverrideKeys, taskProfileError, init_model_profiles, AssetKeyMovesBlockedError2, assertAssetKeyMovesAllowed2, moveTaskChainKeyInTx2, moveSessionChains, listPrefixRoots, listSharedPrefixRoots, init_session_moves, getSessionGroupKey, getSessionReadState, getSessionTree, triageSessionList, init_session_tree, setHumanFreeQueueListener, drainHumanFreeReclassifyQueue, init_human_free, onTaskStarted, init_task_lifecycle_events, channelTopic, addWorkerSubscription, removeWorkerSubscription, listSubscribedWorkerAgents, init_channels, publishWorkerNudge, init_worker_nudges, CHAT_SDK_ADAPTER_NAMES, CHAT_SDK_ADAPTER_SCHEMAS, ChatSdkAdaptersDraftSchema, firstIssueText, isAdapterEntryEnabled, init_schema, TELEMETRY_RANKING_KEY, PUBLIC_RANKING_ENABLED_KEY, RANKING_CATEGORIES, readTelemetryRanking, rankingFormSchema, buildListing, init_telemetry_ranking, resolveQuickJSPoolSize, init_quickjs_pool_config, SLACK_REACTION_DEFAULTS, SLACK_REACTION_CONFIG_KEYS, reactionName, completedStatusIcon, init_reaction_shortcode, API_DRAINING_HEADER, API_DRAIN_MAX_MS_LIMIT, isApiDrainingResponse, init_api_drain2, parseEnabledTools, init_enabled_tools, parseFollowUpGateScheduleIds, isFollowUpGateScheduleId, init_follow_up_gate_schedule_ids, parseTaskToolManifest, CHAT_TASK_ONLY_TOOLS, isChatSdkTask, selectTaskTools, init_task_tool_manifest, tierConfigKey, init_model_tier_keys, isApiOnlyConfigKey, isInternalConfigKey, internalConfigKeyError, isReservedConfigKey, reservedKeyError, MAX_DB_RETENTION_DAYS, DB_RETENTION_TUNING_BOUNDS, APPS_JSON_COLUMN_MAX_BYTES_BOUNDS, CODEX_OAUTH_KEEP_WARM_MAX_AGE_HOURS_BOUNDS, validateRuntimeTokenTtlHours, validateControllerTokenTtlDays, validateControllerGraceSec, validateConfigValue, validateConfigEntry, validateExportToEnv, init_swarm_config_guard, getDefaultAuthorizationIdForProvider, getOAuthApp, getOAuthAppById, getOAuthAppIdByProvider, createOAuthApp, updateOAuthAppById, upsertOAuthApp, listAuthorizationsForApp, getAuthorizationById, upsertAuthorization, updateAuthorizationTokens, updateAuthorizationIdentity, deleteAuthorizationById, deleteAuthorizationsForApp, createOAuthPending, consumeOAuthPending, gcOAuthPending, markAuthorizationRefreshFailed, getOAuthTokens, listAuthorizationSweepRows, listKeepAliveAuthorizations, deleteOAuthTokens, acquireOAuthRefreshLock, releaseOAuthRefreshLock, init_oauth, OpenAI2, init_openai2, LEARNING_DUPLICATE_MIN_SIMILARITY, CANDIDATE_SET_MULTIPLIER, isGraphExpansionEnabled, EMBEDDING_DIMENSIONS, init_constants2, LONGTERM_ROOT, MEMORY_KEY_PATTERN, MEMORY_KEY_PATTERN_MESSAGE, MEMORY_KEY_MAX_LENGTH, isLongtermKey, longtermKeyError, isConsolidatedKey, consolidatedKeyMessage, resolveStoreKey, init_key_paths, computeScore, rerank, init_reranker, searchMemoryCandidates, init_search_candidates, rowToCandidate, init_sqlite_store, getEmbeddingProvider2, resetEmbeddingProvider2, getMemoryStore2, init_memory, embeddingProvider2, computeScriptEmbedding2, writeScriptEmbedding2, embedScript2, searchScripts2, reembedAllScripts2, init_embeddings, upsertScriptByName, getScript, getScriptById, getScriptVersion, listScripts, listScriptVersions, deleteScript, touchScratchScriptLastUsed, restoreScratchScriptLastUsedIfUnchanged, createScriptApi, listScriptApisForScript, getScriptApiById, getScriptApiSecret, updateScriptApi, rotateScriptApiSecret, deleteScriptApi, recordScriptApiUsage, init_db3, oauthSecretName, registerStoredSecret, loadSecretRegistry, init_secret_registry, WorkflowReplayStateError, init_workflow_replay, getWorkflowRunTriggeredByAgentId, getWorkflowRunSummary, getWorkflowRunStepsSlimByRunId, WORKFLOW_RUN_TREE_MAX_DEPTH, WorkflowRunTreeError, getRunLineageBlock, getWorkflowRunTreeIds, getWorkflowRunStatus, getOpenWorkflowTreeTaskIds, getTaskIdsWithDependents, workflowRunTreeHasOpenWork, getWorkflowRunTree, cancelOpenWorkflowTreeSteps, disarmWorkflowTreeRetries, cancelLiveWorkflowTreeRuns, getChildWorkflowRunId, isParentStepAttemptCurrent, getRunningSubWorkflowSteps, getWorkflowRunParent, getWorkflowRunLineage, getSettledChildRunParentSteps, emitRunFinished, createForeachChildSteps, createForeachAttemptSteps, init_workflow_runs, SESSION_ACTIVITY_REFRESH_MIN_INTERVAL_MS2, refreshActiveSessionOnActivity2, getActiveSessionById, init_active_sessions, STEERING_MOVED_ERROR, SteeringRequestError, SteeringBlockedError, isSteeringEnabled, getTaskSteeringFields, getTaskSteeringFieldsForTasks, promotePendingSteeringForTask, markSteeringUndeliverable, carryUnhandledSteering, requestSteering, init_steering2, createTask2, getPendingTaskForAgent2, assignUnassignedTaskPending2, startTask2, updateTaskClaudeSessionId2, recordTaskProviderIfUnset2, updateTaskTitle2, setTaskTitleIfUnset2, completeTask2, failTask2, overwriteTerminalTaskResultText2, cancelTask2, supersedeTask2, settleSupersededTaskDependents2, backfillSupersedeTaskResumeTaskId2, pauseTask2, resumeTask2, getPausedTasksForAgent2, getOrphanedInProgressTasksForAgent2, resetOrphanedInProgressTasksForAgent2, getRecentlyCancelledTasksForAgent2, deleteTask2, updateTaskProgress2, init_write, IdempotencyKeyTakenError, workflowRequestFingerprint, findAcceptedWorkflowOperation, assertWorkflowIdempotencyKeyUnused, recordAcceptedWorkflowOperation, init_workflow_idempotency, recordKeySeatMismatch2, recordKeyValidation2, retirePoolKeyStatus, init_api_keys, getScriptRunExecutionArgs2, getScriptRunFollowUpGuard2, setScriptRunFollowUpGuard2, literalPrefixPattern2, getSlackRenderV2ActivatedAt2, ensureSlackRenderV2Activation2, getSlackDelegationActivatedAt2, ensureSlackDelegationActivation2, isPendingSlackMessage2, isSettledSlackMessage2, recordSlackMessage2, reserveSlackMessage2, bindSlackMessageTimestamp2, updateSlackMessageRecord2, markSlackTreeRendered2, deleteSlackMessageRecord2, getSlackTreeMessage2, getSlackTreeMessageByThread2, getSlackOutcomeMessage2, getResolvableDeferralOutcomes2, markSlackDeferralResolved2, noteSlackOutcomeDeliveryFailure2, abandonSlackOutcomeDelivery2, getSlackTreeMessages2, getSlackMessageByChannelTs2, getSlackTasksInThread2, listSlackThreadsAwaitingHuman2, isSlackThreadAwaitingHuman2, markTaskSlackReplySent2, setSlackMessageTracking2, updateTaskVcs2, insertTaskAttachment2, recordTaskPullRequestAttachments2, getAssetKeyMappingByProvider2, upsertAssetKeyMapping2, getAssetKeyMapping2, listAssetSummaries2, moveAssetKey2, deleteTaskAttachment2, replaceTaskAttachment2, getTaskAttachments2, createSteeringMessage2, getSteeringMessagesForTask2, getSteeringMessageById2, getPendingSteeringForTask2, getPendingSteeringForAgent2, markSteeringDelivered2, markSteeringHandled2, markSteeringPromoted2, cancelPendingSteeringForTask2, hasPendingSteering2, getAgentWithTasks2, getAllAgentsWithTasks2, createLogEntry2, getLogsByAgentId2, getLogsByTaskId2, getLogsByTaskIdAndEventType2, getLogsByTaskIdChronological2, getLogsByEventType2, getAllLogs2, findRecentSimilarTasks2, createTaskExtended2, claimTask2, releaseTask2, acceptTask2, rejectTask2, moveTaskToBacklog2, moveTaskFromBacklog2, promoteDraftTask2, refreshDraftTaskLease2, promoteAbandonedDraftTasks2, releaseStaleReviewingTasks2, releaseStaleOfferedTasksForOfflineAgents2, getOfferedTasksForAgent2, claimOfferedTask2, getUnassignedTasksCount2, getUnassignedTaskIds2, getUnassignedTaskIdsForAgent2, checkDependencies2, getDependentTasks2, cascadeFailDependents2, updateAgentProfile2, updateAgentName2, createChannel2, getMessageById2, getChannelById2, getChannelByName2, getAllChannels2, deleteChannel2, postMessage2, getChannelMessages2, updateReadState2, getLastReadAt2, getUnreadMessages2, getMentionsForAgent2, getInboxSummary2, claimMentions2, releaseMentionProcessing2, releaseStaleMentionProcessing2, createService2, getServiceById2, getServiceByAgentAndName2, getServicesByAgentId2, getAllServices2, updateServiceStatus2, deleteService2, upsertService2, deleteServicesByAgentId2, createSessionLogs2, getSessionLogsByTaskId2, getSessionLogsBySession2, createSessionCost2, getSessionCostsByTaskId2, getSessionCostsByAgentId2, getAllSessionCosts2, getSessionCostsFiltered2, UNATTRIBUTED_USER_ID2, getSessionCostSummary2, getAttributionByPerson2, getDashboardCostSummary2, createInboxMessage2, getInboxMessageById2, getUnreadInboxMessages2, claimInboxMessages2, markInboxMessageRead2, markInboxMessageResponded2, markInboxMessageDelegated2, releaseStaleProcessingInbox2, getConcurrentContext2, getScheduledTasks2, getScheduledTaskById2, getScheduledTaskByName2, createScheduledTask2, updateScheduledTask2, deleteScheduledTask2, getDueScheduledTasks2, autoEncryptLegacyPlaintextSecrets2, maskSecrets2, getSwarmConfigs2, getInjectableGlobalConfigs2, getSwarmConfigById2, getSwarmConfigLookupById2, upsertSwarmConfig2, emitBuiltInIntegrationConnectedOnce2, deleteSwarmConfig2, deleteSwarmConfigByKey2, getResolvedConfig2, getSwarmRepos2, getSwarmRepoById2, getSwarmRepoByName2, getSwarmRepoByUrl2, createSwarmRepo2, updateSwarmRepo2, deleteSwarmRepo2, getAgentMailInboxMapping2, getAgentMailInboxMappingsByAgent2, getAllAgentMailInboxMappings2, createAgentMailInboxMapping2, deleteAgentMailInboxMapping2, findTaskByAgentMailThread2, insertActiveSession2, deleteActiveSession2, deleteActiveSessionById2, getActiveSessions2, heartbeatActiveSession2, cleanupStaleSessions2, cleanupAgentSessions2, updateActiveSessionProviderSessionId2, getActiveSessionForTask2, reassociateSessionLogs2, getStalledInProgressTasks2, getStalePinnedResumes2, failPendingResumeIfUnclaimed2, getIdleWorkersWithCapacity2, getUnassignedPoolTasks2, getStaleUnassignedAffinityTasks2, getRecentFailedTasks2, getRecentCompletedCount2, getRecentFailedCount2, createWorkflow2, getWorkflow2, listWorkflows2, updateWorkflow2, deleteWorkflow2, getWorkflowsByScheduleId2, createWorkflowRun2, getWorkflowRun2, updateWorkflowRun2, listWorkflowRuns2, countWorkflowRuns2, listWorkflowRunsPage2, createWorkflowRunStep2, getWorkflowRunStep2, updateWorkflowRunStep2, getWorkflowRunStepsByRunId2, getStuckWorkflowRuns2, getLastSuccessfulRun2, getLastRunStart2, getRetryableSteps2, getCompletedStepNodeIds2, getTaskByWorkflowRunStepId2, detachTaskFromWorkflowRunStep2, getStepByIdempotencyKey2, getStepCountForNode2, getLatestStepForNode2, getCurrentStepForNode2, createWorkflowVersion2, getWorkflowVersions2, getWorkflowVersion2, createAppVersion2, getAppVersions2, getAppVersion2, createPage2, getPage2, getPageBySlug2, getLatestPageBySlug2, listPagesByAgent2, listAllPages2, countAllPages2, countPagesByAgent2, updatePage2, deletePage2, incrementPageViewCount2, createPageVersion2, getPageVersions2, getPageVersion2, createMetric2, getMetric2, getMetricBySlug2, listMetricsByAgent2, listAllMetrics2, countAllMetrics2, countMetricsByAgent2, updateMetric2, deleteMetric2, createMetricVersion2, getMetricVersions2, getMetricVersion2, getPromptTemplates2, getPromptTemplateById2, upsertPromptTemplate2, deletePromptTemplate2, resetPromptTemplateToDefault2, getPromptTemplateHistory2, resolvePromptTemplate2, checkoutPromptTemplate2, getAllChannelActivityCursors2, getChannelActivityCursor2, upsertChannelActivityCursor2, createApprovalRequest2, getApprovalRequestById2, resolveApprovalRequest2, cancelApprovalRequestById2, cancelPendingApprovalRequestsForRun2, listCancelledApprovalRequestsForRun2, listCancelledApprovalRequestsForStep2, claimApprovalCancellationNotification2, completeApprovalCancellationNotificationClaim2, releaseApprovalCancellationNotificationClaim2, updateApprovalRequestNotifications2, listApprovalRequests2, getStuckApprovalRuns2, getApprovalRequestByStepId2, getExpiredPendingApprovals2, getStaleApprovalRequests2, createWaitState2, getWaitStateById2, getWaitStateByStepId2, getDueWaitStates2, getPendingEventWaitNames2, getPendingWaitsByEvent2, resolveWaitState2, getStuckWaitRuns2, SKILL_FILE_LIMITS2, normalizeSkillFilePath2, createSkill2, updateSkill2, listSkillFileManifest2, getSkillFiles2, getSkillFile2, upsertSkillFile2, upsertSkillFiles2, deleteSkillFile2, deleteSkill2, getSkillById2, getSkillByName2, listSkills2, searchSkills2, installSkill2, getSystemDefaultSkills2, installSystemDefaultSkillsForAgent2, uninstallSkill2, getAgentSkills2, toggleAgentSkill2, createMcpServer2, emitMcpServerConnectedTelemetry2, updateMcpServer2, deleteMcpServer2, getMcpServerById2, getMcpServerByName2, listMcpServers2, installMcpServer2, uninstallMcpServer2, getAgentMcpServers2, createContextSnapshot2, getContextSnapshotsByTaskId2, getContextSnapshotsBySessionId2, getContextSummaryByTaskId2, getAvailableKeyIndices2, recordKeyUsage2, setApiKeyPlan2, markKeyRateLimited2, recordKeyAuthFailure2, recordKeyRateLimitWindows2, setApiKeyName2, clearKeyRateLimit2, getKeyStatuses2, getKeyCostSummary2, getUserById2, getAllUsers2, createUser2, updateUser2, deleteUser2, listInboxState2, upsertInboxState2, listFavorites2, listUserFavorites2, getFavoriteItemIdSet2, setFavorite2, setUserFavorite2, withFavoriteFlags2, listTaskTemplates2, getRootTaskChain2, listRecentSessions2, countSessions2, getBudget2, getBudgets2, upsertBudget2, deleteBudget2, getAllPricingRows2, getPricingRows2, getActivePricingRow2, insertPricingRow2, deletePricingRow2, getDailySpendForAgent2, getDailySpendGlobal2, getDailySpendForUser2, recordBudgetRefusalNotification2, getBudgetRefusalNotification2, getRecentBudgetRefusalNotifications2, hasBudgetRefusalNotificationToday2, setBudgetRefusalFollowUpTaskId2, getLiveAgentCounts2, getReadyAgentCounts2, getInstanceActivity2, getSwarmMetrics2, hasFirstCompletedTask2, getKv2, sweepExpiredKv2, sweepExpiredKvPrefix2, upsertKv2, claimKv2, deleteKv2, KvTypeCollisionError2, incrKv2, kvPrefixUpperBound2, listKv2, countKv2, createScriptRun2, recordInlineScriptRun2, getScriptRun2, getScriptRunByIdempotencyKey2, listScriptRuns2, countScriptRuns2, countActiveScriptRuns2, updateScriptRun2, updateScriptRunIfNotTerminal2, updateScriptRunIfRunning2, getRunningScriptRuns2, getScriptRunJournalStep2, upsertScriptRunJournalStep2, listScriptRunJournalSteps2, countScriptRunJournalSteps2, countScriptRunJournalAgentTaskSteps2, exports_db, init_db4 };
|