@desplega.ai/agent-swarm 1.171.1 → 1.173.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{acp-adapter-wnhq4ydy.js → acp-adapter-ccm9xrep.js} +23 -5
- package/dist/{actions-45eyf0ns.js → actions-sgeyv08k.js} +51 -27
- package/dist/{amp-adapter-f5dr6dm0.js → amp-adapter-gpxp3kc9.js} +1 -1
- package/dist/{anthropic-messages-etkbxhhy.js → anthropic-messages-r6czkjv1.js} +62 -29
- package/dist/{app-qv86qhzz.js → app-km9qnv2f.js} +9 -8
- package/dist/{assistant-10yaeebp.js → assistant-5r8tcvvd.js} +52 -31
- package/dist/{azure-openai-responses-xap57x4b.js → azure-openai-responses-ygfreq4t.js} +8 -8
- package/dist/{boot-reembed-wyb785et.js → boot-reembed-16rv9843.js} +7 -7
- package/dist/{boot-reembed-p2wbqxm4.js → boot-reembed-swwzdgd7.js} +7 -7
- package/dist/{boot-scrub-sweep-daaqcs9t.js → boot-scrub-sweep-zkr6vkqb.js} +8 -8
- package/dist/{boot-seeds-1pvzyx4h.js → boot-seeds-d8sp49t2.js} +10 -10
- package/dist/{claude-adapter-v2py1c6g.js → claude-adapter-yzzzh8jp.js} +17 -18
- package/dist/{claude-managed-adapter-kqqqhp2q.js → claude-managed-adapter-xgxhqrt2.js} +2 -2
- package/dist/{claude-sdk-session-mk938tpt.js → claude-sdk-session-4whxere4.js} +9466 -9173
- package/dist/{cli-c9cnsnms.js → cli-0a7mm3zp.js} +92 -10
- package/dist/{cli-m4csbs67.js → cli-0kxf81jj.js} +1 -1
- package/dist/{cli-w0bwte75.js → cli-104zsxba.js} +2 -1
- package/dist/{cli-x6z90nq9.js → cli-19njxg5g.js} +2 -4
- package/dist/{cli-1qtgd1h1.js → cli-1m2xxxe2.js} +2 -2
- package/dist/{cli-vtqrsgnm.js → cli-1w0vj3gw.js} +5 -5
- package/dist/{cli-231av4y6.js → cli-1x7da0de.js} +2 -4
- package/dist/{cli-tqzk05ty.js → cli-3nxdmjrc.js} +1 -1
- package/dist/{cli-ehf1dfay.js → cli-42qhyvwx.js} +3 -3
- package/dist/{cli-bkdbswyn.js → cli-5er5gjbm.js} +8 -9
- package/dist/{cli-f651ypy4.js → cli-5wpw4rab.js} +1 -1
- package/dist/{cli-mn8qkd8v.js → cli-61625k3x.js} +1 -1
- package/dist/{cli-pwnxv8pw.js → cli-6r2f7edk.js} +5 -5
- package/dist/{cli-x61srfpp.js → cli-6thk4jz3.js} +2 -2
- package/dist/{cli-jr749y58.js → cli-7a93cv8c.js} +1470 -54
- package/dist/{cli-2k8gyaey.js → cli-94b48jhk.js} +6 -6
- package/dist/{cli-xf713zz0.js → cli-9fxpr83v.js} +1 -1
- package/dist/{cli-q1vnz8wv.js → cli-9s17naqf.js} +1 -1
- package/dist/{cli-tb8p51kg.js → cli-9xf7fdtp.js} +2 -2
- package/dist/{cli-hrbedqp0.js → cli-anzdk0z4.js} +1 -1
- package/dist/{cli-5y67yrt6.js → cli-b07hr3bt.js} +113 -177
- package/dist/{cli-s9y81s7j.js → cli-bt8k5h3s.js} +625 -150
- package/dist/{cli-48ve9gsj.js → cli-bv2etw2y.js} +2 -2
- package/dist/{cli-ndvfgmk8.js → cli-c3rk1v0x.js} +3 -3
- package/dist/{cli-13xwcqvj.js → cli-c5km5znr.js} +2 -2
- package/dist/{cli-k2v5x13t.js → cli-d603qf86.js} +1 -1
- package/dist/{cli-cgj4hc12.js → cli-eh1ytktb.js} +1872 -190
- package/dist/cli-ev91t6xp.js +148 -0
- package/dist/{cli-e2prcx5m.js → cli-fdvbjtbw.js} +235 -5
- package/dist/{cli-amvnn9wz.js → cli-fmhj1ehj.js} +64 -26
- package/dist/{cli-rb9m6rpe.js → cli-h6vtvt5c.js} +139 -1
- package/dist/{cli-j0w59p15.js → cli-h7k0xtry.js} +7 -7
- package/dist/cli-hd27d2md.js +1057 -0
- package/dist/{cli-2rbt7at8.js → cli-hz99wfxp.js} +1 -1
- package/dist/{cli-xy6sgy6p.js → cli-jpc4r224.js} +1 -1
- package/dist/{cli-y1j1ggbf.js → cli-m89t9jdf.js} +1375 -591
- package/dist/{cli-agamgm0p.js → cli-mvzyxwg3.js} +1 -1
- package/dist/cli-na2pxe4f.js +514 -0
- package/dist/{cli-8ntwbxmm.js → cli-ne7smj1b.js} +4 -4
- package/dist/{cli-ph3145b7.js → cli-nwrdx840.js} +4 -4
- package/dist/cli-p0sg24zp.js +16 -0
- package/dist/{cli-g7k7zbcz.js → cli-p7z6q2m6.js} +2 -1
- package/dist/{cli-6pxmb99j.js → cli-phcqp1b9.js} +1 -1
- package/dist/{cli-yn0a417a.js → cli-phre6gz0.js} +22 -4
- package/dist/{cli-y195hv1a.js → cli-pxeeyc53.js} +1 -1
- package/dist/{cli-z9cvwx5m.js → cli-qm1448f9.js} +52 -6
- package/dist/{cli-5t5my0h8.js → cli-qybkr9n3.js} +278 -1267
- package/dist/{cli-zh93km01.js → cli-r0byd61h.js} +8 -8
- package/dist/{cli-xezn9nkh.js → cli-r44t9wqc.js} +29 -472
- package/dist/{cli-rrbctenq.js → cli-r4fqfpwf.js} +6 -8
- package/dist/{cli-bxqez1p0.js → cli-rcp5aqdw.js} +9 -39
- package/dist/{cli-d78fccnb.js → cli-rfs4vddv.js} +5 -5
- package/dist/{cli-f3vy7ncj.js → cli-rfz2ve55.js} +889 -259
- package/dist/{cli-hadkza7w.js → cli-s8z6x4b4.js} +37 -36
- package/dist/cli-saqyage0.js +782 -0
- package/dist/{cli-vr5avem2.js → cli-smcrrmhy.js} +14 -18
- package/dist/{cli-zxm9p3x4.js → cli-srqq3gc5.js} +1 -1
- package/dist/{cli-pw9x22wp.js → cli-tcc4wd5d.js} +185 -86
- package/dist/cli-v3zhnxsb.js +263 -0
- package/dist/cli-vb8g5x02.js +549 -0
- package/dist/{cli-gt4hxb8p.js → cli-vv0qtfpx.js} +1 -2
- package/dist/{cli-apnwqe6h.js → cli-w1apjecb.js} +1 -1
- package/dist/{cli-95zs84qw.js → cli-wd0hz6ah.js} +671 -388
- package/dist/{cli-2aap68ns.js → cli-wrh08zjd.js} +5 -5
- package/dist/{cli-jn9wk8z8.js → cli-x119kdba.js} +1 -1
- package/dist/{cli-nkqjj42q.js → cli-x4m6feqt.js} +1 -1
- package/dist/{cli-j8xzym9k.js → cli-xc7p7s3g.js} +1 -1
- package/dist/cli-z1kd834t.js +36 -0
- package/dist/cli.js +26 -27
- package/dist/{cloudflare-workers-ai-system-one-sta45jf9.js → cloudflare-workers-ai-system-one-vnpyfr7e.js} +3 -3
- package/dist/{codex-adapter-cg8vntj1.js → codex-adapter-r3dn4fp5.js} +13 -13
- package/dist/{codex-hook-7ba15hjd.js → codex-hook-xch6z5wt.js} +2 -3
- package/dist/{codex-session-runner-jxs6n1qx.js → codex-session-runner-fwt793h4.js} +13 -13
- package/dist/{commands-8zhezbzr.js → commands-z8fq9qna.js} +17 -8
- package/dist/{controllers-connect-q0brsq11.js → controllers-connect-3mf2btyj.js} +28 -27
- package/dist/{cursor-adapter-t4pr1m3c.js → cursor-adapter-q8pgv5qa.js} +2 -3
- package/dist/{db-ggc4b127.js → db-qfpq4bt7.js} +7 -7
- package/dist/{db-d80sy99v.js → db-yyhqqrbf.js} +8 -8
- package/dist/{dispatcher-eascgc1z.js → dispatcher-x0x7qfcq.js} +27 -26
- package/dist/{dsh-adapter-2h8m4cab.js → dsh-adapter-34etvb5m.js} +1 -1
- package/dist/{easter-egg-3d-66zxervv.js → easter-egg-3d-m8rvz40s.js} +4 -3
- package/dist/execute-107xtsp1.js +3745 -0
- package/dist/external-channel-h1fjecwe.js +51 -0
- package/dist/{google-generative-ai-pvhm0dq1.js → google-generative-ai-szdxbpqg.js} +4 -4
- package/dist/{google-vertex-tek9sqe2.js → google-vertex-qzw3p36d.js} +4 -4
- package/dist/{grok-adapter-8ram8zse.js → grok-adapter-e7mr287e.js} +24 -6
- package/dist/{handlers-hypxbg7e.js → handlers-znb9n7d4.js} +30 -29
- package/dist/{heartbeat-ge72pt7q.js → heartbeat-bm4qkn8d.js} +29 -28
- package/dist/{hook-grgtyrad.js → hook-254r4mza.js} +14 -15
- package/dist/{hook-xzwg1zwp.js → hook-xaa3q80s.js} +15 -16
- package/dist/{http-2nf2axqq.js → http-3dgrgp8y.js} +153 -84
- package/dist/{index-6zehd2p5.js → index-2ybk7khy.js} +627 -127
- package/dist/{index-kkeftv5h.js → index-82rk11v7.js} +4 -4
- package/dist/{index-57svck0z.js → index-bdsqa799.js} +29 -28
- package/dist/{index-9egx96ey.js → index-fx3jqq1e.js} +27 -26
- package/dist/{index-0h5dd9xg.js → index-g2byveez.js} +28 -27
- package/dist/{index-27aez391.js → index-jd7sejm2.js} +7 -7
- package/dist/{index-w097eg0x.js → index-vccv018g.js} +1 -1
- package/dist/{keepalive-5pjbsz8f.js → keepalive-6ywhpja1.js} +9 -9
- package/dist/{lead-g19prqhd.js → lead-cw45n21s.js} +45 -44
- package/dist/{maintenance-1brc7q4c.js → maintenance-ss1a1ge9.js} +7 -7
- package/dist/{mistral-conversations-rjxa9s1j.js → mistral-conversations-vjc1ggpd.js} +29 -15
- package/dist/node-c9we95xf.js +1 -1
- package/dist/{oauth-refresh-sweep-rhe857nd.js → oauth-refresh-sweep-3c6f8vyy.js} +8 -8
- package/dist/{onboard-6bcg69eg.js → onboard-8hzdhc1k.js} +2 -2
- package/dist/{openai-codex-responses-pgvtddvv.js → openai-codex-responses-3bk0grnr.js} +8 -40
- package/dist/{openai-completions-44gb0zsk.js → openai-completions-5d4jpakc.js} +11 -11
- package/dist/{openai-decisions-vj9nkpf8.js → openai-decisions-fctnj8xd.js} +2 -2
- package/dist/{openai-responses-9dyzwzkr.js → openai-responses-krb51f59.js} +8 -8
- package/dist/opencode-adapter-qbchbcfz.js +55 -0
- package/dist/{otel-impl-y237rck3.js → otel-impl-e6mnvc4v.js} +7 -2
- package/dist/{pi-mono-adapter-fx6k5wwh.js → pi-mono-adapter-3c9g9snh.js} +26 -501
- package/dist/{pricing-refresh-se1qg8wn.js → pricing-refresh-gedkjdw0.js} +9 -9
- package/dist/{rbac-roles-b6ca1n23.js → rbac-roles-dt4vh1yy.js} +7 -7
- package/dist/{rbac-roles-c58kydph.js → rbac-roles-eszdg6pm.js} +8 -8
- package/dist/{render-v2-gqz7z5xt.js → render-v2-907cy6sa.js} +9 -8
- package/dist/{resume-yb3y3vda.js → resume-42stcaz0.js} +17 -16
- package/dist/{runtime-h9ha1mq6.js → runtime-qfry88v2.js} +4 -7
- package/dist/{setup-1rbr9x3c.js → setup-adbc1c10.js} +2 -2
- package/dist/{typesafe-system-one-e988vty7.js → typesafe-system-one-zzzcx4s3.js} +3 -3
- package/dist/{virtual-modules-rdjmcg7q.js → virtual-modules-rtmt494q.js} +14 -13
- package/dist/{work-objects-nzcp8srm.js → work-objects-wpj8ck95.js} +35 -29
- package/dist/{worker-wnz1h3g0.js → worker-bzdra9rf.js} +45 -44
- package/openapi.json +423 -7
- package/package.json +8 -9
- package/src/apps/catalog.generated.json +1309 -53
- package/src/apps/page-validator.ts +93 -31
- package/src/azure-devops/api.ts +94 -18
- package/src/azure-devops/auth.ts +32 -0
- package/src/azure-devops/boards-sync.ts +708 -0
- package/src/azure-devops/handlers.ts +52 -8
- package/src/azure-devops/html.ts +26 -0
- package/src/azure-devops/index.ts +15 -0
- package/src/azure-devops/templates.ts +86 -0
- package/src/azure-devops/types.ts +65 -1
- package/src/be/db.ts +22 -6
- package/src/be/migrations/213_script_connections_sql.sql +79 -0
- package/src/be/script-connections.ts +47 -8
- package/src/be/scripts/extract-schema.ts +4 -0
- package/src/be/seed-skills/bundled-files.generated.json +10 -0
- package/src/be/seed-skills/index.ts +3 -0
- package/src/be/sql-connections.ts +118 -0
- package/src/be/swarm-config-guard.ts +1 -0
- package/src/commands/profile-sync.ts +5 -3
- package/src/commands/runner.ts +6 -2
- package/src/github/handlers.ts +61 -18
- package/src/github/types.ts +2 -1
- package/src/http/mcp-oauth.ts +6 -13
- package/src/http/pages-public.ts +3 -2
- package/src/http/pages.ts +2 -1
- package/src/http/route-def.ts +7 -6
- package/src/http/script-connection-proxy.ts +51 -4
- package/src/http/script-connections.ts +5 -2
- package/src/http/session-cost-recompute.ts +12 -2
- package/src/http/session-data.ts +4 -0
- package/src/http/webhooks.ts +24 -1
- package/src/jira/adf.ts +3 -1
- package/src/kv-reserved-namespaces.ts +2 -0
- package/src/oauth/mcp-wrapper.ts +10 -6
- package/src/otel-impl.ts +2 -1
- package/src/prompts/base-prompt.ts +3 -3
- package/src/prompts/goal-reminder.ts +30 -0
- package/src/prompts/session-templates.ts +22 -0
- package/src/providers/acp-targets.ts +3 -4
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/claude-adapter.ts +27 -2
- package/src/providers/claude-flag-settings.ts +121 -0
- package/src/providers/claude-sdk-session.ts +7 -0
- package/src/providers/dsh-adapter.ts +1 -1
- package/src/providers/harness-version.ts +0 -1
- package/src/providers/opencode-adapter.ts +461 -728
- package/src/providers/opencode-billing.ts +86 -0
- package/src/providers/opencode-swarm-plugin.ts +108 -0
- package/src/providers/pi-mono-extension.ts +58 -37
- package/src/providers/pricing-sources.md +4 -1
- package/src/providers/types.ts +5 -0
- package/src/scripts-runtime/api-client.ts +15 -1
- package/src/scripts-runtime/api-types.ts +9 -1
- package/src/scripts-runtime/ctx.ts +1 -1
- package/src/scripts-runtime/executors/native.ts +6 -5
- package/src/scripts-runtime/executors/quickjs-bundle.ts +18 -11
- package/src/scripts-runtime/extract-args-schema.ts +22 -4
- package/src/scripts-runtime/import-allowlist.ts +1 -1
- package/src/scripts-runtime/mcp-client.ts +30 -19
- package/src/scripts-runtime/zod-mini-bundle.ts +5 -0
- package/src/slack/actions.ts +29 -1
- package/src/slack/app.ts +14 -2
- package/src/slack/assistant.ts +36 -2
- package/src/slack/channel-join.ts +3 -16
- package/src/slack/commands.ts +9 -1
- package/src/slack/external-channel-egress.ts +113 -0
- package/src/slack/external-channel.ts +309 -0
- package/src/slack/handlers.ts +61 -0
- package/src/slack/render-v2.ts +41 -48
- package/src/slack/work-objects.ts +5 -0
- package/src/tasks/context-key.ts +34 -1
- package/src/telemetry.ts +2 -1
- package/src/tests/apps-catalog-feedback.test.ts +310 -0
- package/src/tests/apps-catalog-inputs.test.ts +70 -0
- package/src/tests/apps-catalog-table.test.ts +113 -0
- package/src/tests/azure-devops-boards-sync.test.ts +584 -0
- package/src/tests/azure-devops-html.test.ts +13 -0
- package/src/tests/azure-devops-webhook-malformed.test.ts +4 -0
- package/src/tests/claude-adapter-binary.test.ts +139 -0
- package/src/tests/claude-flag-settings.test.ts +106 -0
- package/src/tests/claude-sdk-lifecycle.test.ts +142 -1
- package/src/tests/claude-sdk-process.fixture.ts +7 -0
- package/src/tests/context-key.test.ts +32 -0
- package/src/tests/deferred-task-wake.test.ts +52 -4
- package/src/tests/docs-index-footprint.test.js +3 -3
- package/src/tests/dsh-adapter.test.ts +1 -1
- package/src/tests/entrypoint-acp-target-binary.test.ts +19 -1
- package/src/tests/fixtures/azure-boards/workitem.commented.json +89 -0
- package/src/tests/fixtures/azure-boards/workitem.created.json +81 -0
- package/src/tests/fixtures/azure-boards/workitem.deleted.json +70 -0
- package/src/tests/fixtures/azure-boards/workitem.restored.json +82 -0
- package/src/tests/fixtures/azure-boards/workitem.updated.json +130 -0
- package/src/tests/fixtures/catalog-feedback-definition.json.txt +860 -0
- package/src/tests/fixtures/catalog-inputs-definition.json.txt +910 -0
- package/src/tests/fixtures/catalog-table-definition.json.txt +468 -0
- package/src/tests/fixtures/runner-identity-refresh.ts +3 -0
- package/src/tests/github-handlers-inline-comments.test.ts +131 -2
- package/src/tests/github-handlers-reactions.test.ts +9 -0
- package/src/tests/harness-version.test.ts +0 -20
- package/src/tests/node-env-runtime.test.ts +98 -0
- package/src/tests/opencode-adapter.test.ts +655 -1377
- package/src/tests/opencode-billing.test.ts +28 -0
- package/src/tests/opencode-mcp-admission-sdk.test.ts +106 -0
- package/src/tests/opencode-swarm-plugin.test.ts +130 -0
- package/src/tests/pi-mono-extension.test.ts +59 -0
- package/src/tests/prompt-template-session.test.ts +4 -3
- package/src/tests/provider-registration.test.ts +3 -0
- package/src/tests/runner-identity-refresh.test.ts +3 -0
- package/src/tests/script-connections-sql.test.ts +675 -0
- package/src/tests/script-connections.test.ts +5 -1
- package/src/tests/script-executor-quickjs.test.ts +17 -12
- package/src/tests/scripts-http.test.ts +24 -16
- package/src/tests/scripts-import-allowlist.test.ts +1 -1
- package/src/tests/scripts-runtime.test.ts +78 -40
- package/src/tests/seed-scripts.test.ts +13 -0
- package/src/tests/session-cost-recompute-unit.test.ts +48 -0
- package/src/tests/slack-channel-join.test.ts +4 -1
- package/src/tests/slack-external-channel-config.test.ts +65 -0
- package/src/tests/slack-external-channel-egress.test.ts +237 -0
- package/src/tests/slack-external-channel-guard.test.ts +280 -0
- package/src/tests/slack-external-channel-tools.test.ts +173 -0
- package/src/tests/slack-external-channel.test.ts +370 -0
- package/src/tests/slack-render-v2.test.ts +89 -11
- package/src/tests/spec-base-url.test.ts +16 -1
- package/src/tests/ui-logs-parser.test.ts +28 -0
- package/src/tests/vendored-openapi.test.ts +16 -1
- package/src/tools/defer-task.ts +17 -0
- package/src/tools/script-upsert.ts +1 -1
- package/src/tools/slack-post.ts +6 -0
- package/src/tools/slack-read.ts +8 -0
- package/src/tools/slack-reply.ts +6 -0
- package/src/tools/slack-start-thread.ts +6 -0
- package/src/tools/slack-update.ts +6 -0
- package/src/tools/slack-upload-file.ts +6 -0
- package/src/utils/memory-raters.ts +7 -3
- package/src/utils/node-env.ts +24 -0
- package/src/utils/openrouter-base-url.ts +0 -2
- package/templates/schedules/weekly-harness-upgrade-check/content.md +4 -6
- package/templates/skills/apps/SKILL.md +742 -0
- package/templates/skills/apps/content.md +52 -21
- package/templates/skills/heartbeat-runbook/content.md +2 -0
- package/templates/skills/qa-loom/config.json +14 -0
- package/templates/skills/qa-loom/content.md +187 -0
- package/templates/skills/qa-loom/files/build-loom.mjs +221 -0
- package/templates/skills/qa-loom/files/run-qa.sh +57 -0
- package/templates/skills/slack-interaction/content.md +4 -0
- package/templates/skills/swarm-scripts/SKILL.md +1 -0
- package/templates/skills/swarm-scripts/content.md +1 -0
- package/dist/cli-5bfdm1ah.js +0 -462
- package/dist/cli-5c2j5yvx.js +0 -222
- package/dist/cli-rhy7z1rp.js +0 -532
- package/dist/cli-ywh2a87k.js +0 -2359
- package/dist/execute-h4jgevyw.js +0 -1387
- package/dist/opencode-adapter-f1zby94p.js +0 -34
- package/plugin/opencode-plugins/lib/memory-raters.ts +0 -7
- package/src/tests/opencode-plugin.test.ts +0 -580
- package/src/tests/providers/opencode-cost.test.ts +0 -74
- package/dist/{cli-5rqrj7q0.js → cli-pw7ebjdt.js} +0 -0
- package/dist/{pi-messages-xszk613n.js → pi-messages-x9gzynm1.js} +3 -3
|
@@ -3,26 +3,44 @@ import {
|
|
|
3
3
|
applyConfiguredOptions,
|
|
4
4
|
sanitizeAcpConfigOptions,
|
|
5
5
|
toAcpMcpServers
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-5bfdm1ah.js";
|
|
6
|
+
} from "./cli-bv2etw2y.js";
|
|
7
|
+
import"./cli-saqyage0.js";
|
|
8
|
+
import"./cli-na2pxe4f.js";
|
|
10
9
|
import"./cli-7a0sde2x.js";
|
|
11
10
|
import"./cli-tng3131n.js";
|
|
12
11
|
import"./cli-zm7njwzd.js";
|
|
12
|
+
import"./cli-nwrdx840.js";
|
|
13
|
+
import"./cli-hp1n6zq3.js";
|
|
13
14
|
import"./cli-ptcz1cqy.js";
|
|
14
15
|
import"./cli-7avy4v8w.js";
|
|
15
16
|
import"./cli-tmhsxhb8.js";
|
|
16
17
|
import"./cli-dpvkp2et.js";
|
|
18
|
+
import"./cli-104zsxba.js";
|
|
17
19
|
import"./cli-re8z5p8p.js";
|
|
18
20
|
import"./cli-zt3w1cn1.js";
|
|
21
|
+
import"./cli-6thk4jz3.js";
|
|
22
|
+
import"./cli-7jykv7ef.js";
|
|
23
|
+
import"./cli-b07hr3bt.js";
|
|
24
|
+
import"./cli-h6vtvt5c.js";
|
|
25
|
+
import"./cli-2x0e561b.js";
|
|
26
|
+
import"./cli-bsakbbkm.js";
|
|
27
|
+
import"./cli-zxg80zs9.js";
|
|
28
|
+
import"./cli-ydt3zkwv.js";
|
|
29
|
+
import"./cli-61625k3x.js";
|
|
30
|
+
import"./cli-1m2e086m.js";
|
|
31
|
+
import"./cli-btbzvq95.js";
|
|
32
|
+
import"./cli-p7z6q2m6.js";
|
|
33
|
+
import"./cli-wnb9b2g3.js";
|
|
19
34
|
import"./cli-tadfgd0t.js";
|
|
35
|
+
import"./cli-fdvbjtbw.js";
|
|
20
36
|
import"./cli-ywybs5as.js";
|
|
21
37
|
import"./cli-f9w1semm.js";
|
|
38
|
+
import"./cli-1a2j50m0.js";
|
|
22
39
|
import"./cli-a35hzdve.js";
|
|
23
40
|
import"./cli-014vns2y.js";
|
|
41
|
+
import"./cli-sd0mxa3c.js";
|
|
24
42
|
import"./cli-w5e1d1vv.js";
|
|
25
|
-
import"./cli-
|
|
43
|
+
import"./cli-5er5gjbm.js";
|
|
26
44
|
import"./cli-ej6gbxfb.js";
|
|
27
45
|
import"./cli-d161g69q.js";
|
|
28
46
|
import"./cli-bc05qbss.js";
|
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveSlackUserId
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-c3rk1v0x.js";
|
|
4
4
|
import {
|
|
5
5
|
createTaskWithSiblingAwareness
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-rfz2ve55.js";
|
|
7
7
|
import"./cli-451ks6aw.js";
|
|
8
8
|
import"./cli-2bw3w47j.js";
|
|
9
|
-
import"./cli-
|
|
9
|
+
import"./cli-104zsxba.js";
|
|
10
10
|
import"./cli-re8z5p8p.js";
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
11
|
+
import"./cli-42qhyvwx.js";
|
|
12
|
+
import"./cli-9xf7fdtp.js";
|
|
13
|
+
import"./cli-jpc4r224.js";
|
|
14
|
+
import"./cli-7a93cv8c.js";
|
|
15
15
|
import"./cli-epan13p1.js";
|
|
16
16
|
import"./cli-zt3w1cn1.js";
|
|
17
|
-
import"./cli-
|
|
17
|
+
import"./cli-w1apjecb.js";
|
|
18
18
|
import"./cli-mzfth0bp.js";
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
19
|
+
import"./cli-1w0vj3gw.js";
|
|
20
|
+
import"./cli-6r2f7edk.js";
|
|
21
|
+
import"./cli-6thk4jz3.js";
|
|
22
22
|
import"./cli-7jykv7ef.js";
|
|
23
|
-
import"./cli-
|
|
24
|
-
import"./cli-
|
|
23
|
+
import"./cli-b07hr3bt.js";
|
|
24
|
+
import"./cli-h6vtvt5c.js";
|
|
25
25
|
import"./cli-2x0e561b.js";
|
|
26
26
|
import"./cli-fad8m16k.js";
|
|
27
27
|
import"./cli-bsakbbkm.js";
|
|
28
28
|
import"./cli-zxg80zs9.js";
|
|
29
|
+
import"./cli-51tf7ac3.js";
|
|
29
30
|
import"./cli-ydt3zkwv.js";
|
|
30
31
|
import {
|
|
31
32
|
buildCancelledBlocks,
|
|
@@ -36,21 +37,24 @@ import {
|
|
|
36
37
|
ignoreSlackInbound,
|
|
37
38
|
isSlackRenderV2Enabled,
|
|
38
39
|
noteSlackInboundSideEffect
|
|
39
|
-
} from "./cli-
|
|
40
|
+
} from "./cli-tcc4wd5d.js";
|
|
40
41
|
import"./cli-q51yprfq.js";
|
|
41
42
|
import"./cli-3er6gcsn.js";
|
|
42
43
|
import"./cli-yatxqynm.js";
|
|
43
|
-
import
|
|
44
|
-
|
|
44
|
+
import {
|
|
45
|
+
EXTERNAL_CHANNEL_BLOCKED_REPLY,
|
|
46
|
+
shouldBlockChannel
|
|
47
|
+
} from "./cli-v3zhnxsb.js";
|
|
48
|
+
import"./cli-3nxdmjrc.js";
|
|
45
49
|
import"./cli-cd0hv9nh.js";
|
|
46
|
-
import"./cli-
|
|
47
|
-
import"./cli-btbzvq95.js";
|
|
50
|
+
import"./cli-61625k3x.js";
|
|
48
51
|
import"./cli-1m2e086m.js";
|
|
49
|
-
import"./cli-
|
|
52
|
+
import"./cli-btbzvq95.js";
|
|
53
|
+
import"./cli-p7z6q2m6.js";
|
|
50
54
|
import"./cli-wnb9b2g3.js";
|
|
51
55
|
import"./cli-bd957dgb.js";
|
|
52
56
|
import"./cli-pzxba7gw.js";
|
|
53
|
-
import"./cli-
|
|
57
|
+
import"./cli-anzdk0z4.js";
|
|
54
58
|
import"./cli-7pz3b7x5.js";
|
|
55
59
|
import {
|
|
56
60
|
cancelTask,
|
|
@@ -60,24 +64,24 @@ import {
|
|
|
60
64
|
init_context_key,
|
|
61
65
|
init_db1 as init_db,
|
|
62
66
|
slackContextKey
|
|
63
|
-
} from "./cli-
|
|
67
|
+
} from "./cli-fmhj1ehj.js";
|
|
64
68
|
import"./cli-ywm1azg9.js";
|
|
65
69
|
import"./cli-hsem16hb.js";
|
|
66
|
-
import"./cli-
|
|
70
|
+
import"./cli-r4fqfpwf.js";
|
|
67
71
|
import"./cli-7mm2r1kp.js";
|
|
68
|
-
import"./cli-e2prcx5m.js";
|
|
69
72
|
import"./cli-dmtrxqhg.js";
|
|
70
|
-
import"./cli-
|
|
71
|
-
import"./cli-5c2j5yvx.js";
|
|
72
|
-
import"./cli-1a2j50m0.js";
|
|
73
|
+
import"./cli-mvzyxwg3.js";
|
|
73
74
|
import"./cli-tadfgd0t.js";
|
|
75
|
+
import"./cli-fdvbjtbw.js";
|
|
74
76
|
import"./cli-ywybs5as.js";
|
|
75
77
|
import"./cli-f9w1semm.js";
|
|
78
|
+
import"./cli-1a2j50m0.js";
|
|
76
79
|
import"./cli-a35hzdve.js";
|
|
77
80
|
import"./cli-014vns2y.js";
|
|
78
81
|
import"./cli-sd0mxa3c.js";
|
|
79
82
|
import"./cli-w5e1d1vv.js";
|
|
80
|
-
import"./cli-
|
|
83
|
+
import"./cli-p0sg24zp.js";
|
|
84
|
+
import"./cli-5er5gjbm.js";
|
|
81
85
|
import"./cli-81r1wjyv.js";
|
|
82
86
|
import"./cli-zf8jjwex.js";
|
|
83
87
|
import"./cli-gd4favx9.js";
|
|
@@ -89,6 +93,17 @@ import"./cli-bc05qbss.js";
|
|
|
89
93
|
// src/slack/actions.ts
|
|
90
94
|
init_db();
|
|
91
95
|
init_context_key();
|
|
96
|
+
async function postExternalChannelNotice(client, channelId, userId) {
|
|
97
|
+
try {
|
|
98
|
+
await client.chat.postEphemeral({
|
|
99
|
+
channel: channelId,
|
|
100
|
+
user: userId,
|
|
101
|
+
text: EXTERNAL_CHANNEL_BLOCKED_REPLY
|
|
102
|
+
});
|
|
103
|
+
} catch (error) {
|
|
104
|
+
console.error("[Slack] Failed to post external channel notice:", error);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
92
107
|
function registerActionHandlers(app) {
|
|
93
108
|
app.action("view_task_logs", async ({ ack }) => {
|
|
94
109
|
await ack();
|
|
@@ -103,6 +118,11 @@ function registerActionHandlers(app) {
|
|
|
103
118
|
const triggerId = "trigger_id" in body ? body.trigger_id : undefined;
|
|
104
119
|
if (!triggerId)
|
|
105
120
|
return;
|
|
121
|
+
const channelId = "channel" in body ? body.channel?.id : undefined;
|
|
122
|
+
if (channelId && await shouldBlockChannel(client, channelId)) {
|
|
123
|
+
await postExternalChannelNotice(client, channelId, body.user.id);
|
|
124
|
+
return ignoreSlackInbound("external_channel");
|
|
125
|
+
}
|
|
106
126
|
try {
|
|
107
127
|
await client.views.open({
|
|
108
128
|
trigger_id: triggerId,
|
|
@@ -145,6 +165,10 @@ function registerActionHandlers(app) {
|
|
|
145
165
|
if (!originalTask || !originalTask.slackChannelId) {
|
|
146
166
|
return ignoreSlackInbound("follow_up_target_missing");
|
|
147
167
|
}
|
|
168
|
+
if (await shouldBlockChannel(client, originalTask.slackChannelId)) {
|
|
169
|
+
await postExternalChannelNotice(client, originalTask.slackChannelId, body.user.id);
|
|
170
|
+
return ignoreSlackInbound("external_channel");
|
|
171
|
+
}
|
|
148
172
|
const lead = await getLeadAgent();
|
|
149
173
|
const requestedByUserId = await resolveSlackUserId(client, body.user.id, {
|
|
150
174
|
sampleEventType: "view_submission",
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
hasCopilotVisionInput
|
|
4
4
|
} from "./cli-67bad0ze.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "./cli-
|
|
6
|
+
Anthropic
|
|
7
|
+
} from "./cli-pw7ebjdt.js";
|
|
8
8
|
import {
|
|
9
9
|
getPiUserAgent
|
|
10
10
|
} from "./cli-et1bbwqf.js";
|
|
11
11
|
import {
|
|
12
|
-
|
|
13
|
-
} from "./cli-
|
|
12
|
+
retryProviderRequest
|
|
13
|
+
} from "./cli-zy39d433.js";
|
|
14
14
|
import {
|
|
15
15
|
ANTHROPIC_FEDERATION_RULE_ID_ENV,
|
|
16
16
|
ANTHROPIC_IDENTITY_TOKEN_FILE_ENV,
|
|
@@ -26,20 +26,20 @@ import {
|
|
|
26
26
|
getJsonSchemaToolParameters,
|
|
27
27
|
resolveJsonSchemaStrictSampling,
|
|
28
28
|
transformMessages
|
|
29
|
-
} from "./cli-
|
|
29
|
+
} from "./cli-9fxpr83v.js";
|
|
30
30
|
import {
|
|
31
31
|
sanitizeSurrogates
|
|
32
32
|
} from "./cli-y2apkfe2.js";
|
|
33
33
|
import {
|
|
34
34
|
headersToRecord
|
|
35
35
|
} from "./cli-7kyk9jr3.js";
|
|
36
|
-
import {
|
|
37
|
-
getProviderEnvValue
|
|
38
|
-
} from "./cli-btbzvq95.js";
|
|
39
36
|
import {
|
|
40
37
|
parseJsonWithRepair,
|
|
41
38
|
parseStreamingJson
|
|
42
39
|
} from "./cli-1m2e086m.js";
|
|
40
|
+
import {
|
|
41
|
+
getProviderEnvValue
|
|
42
|
+
} from "./cli-btbzvq95.js";
|
|
43
43
|
import {
|
|
44
44
|
calculateCost,
|
|
45
45
|
getCurrentTools,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
getSystemMessageText,
|
|
48
48
|
renderSystemMessageUpdate,
|
|
49
49
|
resolveTranscript
|
|
50
|
-
} from "./cli-
|
|
50
|
+
} from "./cli-p7z6q2m6.js";
|
|
51
51
|
import {
|
|
52
52
|
AssistantMessageEventStream,
|
|
53
53
|
appendAssistantMessageDiagnostic
|
|
@@ -423,21 +423,45 @@ var stream = (model, context, options) => {
|
|
|
423
423
|
client = created.client;
|
|
424
424
|
isOAuth = created.isOAuthToken;
|
|
425
425
|
}
|
|
426
|
-
let params = buildParams(model, normalizedContext, isOAuth, options);
|
|
427
|
-
const nextParams = await options?.onPayload?.(params, model);
|
|
428
|
-
if (nextParams !== undefined) {
|
|
429
|
-
params = { ...nextParams, stream: true };
|
|
430
|
-
}
|
|
431
426
|
const requestOptions = {
|
|
432
427
|
...options?.signal ? { signal: options.signal } : {},
|
|
433
428
|
...options?.timeoutMs !== undefined ? { timeout: options.timeoutMs } : {},
|
|
434
429
|
maxRetries: 0
|
|
435
430
|
};
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
431
|
+
let disablePreferredStrictTools = false;
|
|
432
|
+
let response;
|
|
433
|
+
for (;; ) {
|
|
434
|
+
options?.signal?.throwIfAborted();
|
|
435
|
+
const built = buildParams(model, normalizedContext, isOAuth, options, disablePreferredStrictTools);
|
|
436
|
+
let params = built.params;
|
|
437
|
+
const nextParams = await options?.onPayload?.(params, model);
|
|
438
|
+
if (nextParams !== undefined) {
|
|
439
|
+
params = { ...nextParams, stream: true };
|
|
440
|
+
}
|
|
441
|
+
try {
|
|
442
|
+
response = await retryProviderRequest(() => client.beta.messages.create(params, requestOptions).asResponse(), {
|
|
443
|
+
maxRetries: options?.maxRetries,
|
|
444
|
+
maxRetryDelayMs: options?.maxRetryDelayMs,
|
|
445
|
+
signal: options?.signal
|
|
446
|
+
});
|
|
447
|
+
break;
|
|
448
|
+
} catch (error) {
|
|
449
|
+
if (options?.signal?.aborted || disablePreferredStrictTools || !built.hasPreferredStrictTools || !(error instanceof Anthropic.APIError) || error.status !== 400 || error.type !== "invalid_request_error" || ![
|
|
450
|
+
"The compiled grammar is too large",
|
|
451
|
+
"Too many strict tools (",
|
|
452
|
+
"Schemas contains too many parameters with union types ("
|
|
453
|
+
].some((message) => error.message.includes(message))) {
|
|
454
|
+
throw error;
|
|
455
|
+
}
|
|
456
|
+
disablePreferredStrictTools = true;
|
|
457
|
+
appendAssistantMessageDiagnostic(output, {
|
|
458
|
+
type: "anthropic_strict_tools_fallback",
|
|
459
|
+
timestamp: Date.now(),
|
|
460
|
+
error: { message: error.message },
|
|
461
|
+
details: { reason: "strict_tool_limits_exceeded" }
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
}
|
|
441
465
|
await options?.onResponse?.({ status: response.status, headers: headersToRecord(response.headers) }, model);
|
|
442
466
|
stream2.push({ type: "start", partial: output });
|
|
443
467
|
const blocks = output.content;
|
|
@@ -805,16 +829,27 @@ function getBetaFeatures(model, context, isOAuthToken2, nativeToolChanges, optio
|
|
|
805
829
|
features.push(INLINE_TOOLS_BETA);
|
|
806
830
|
return [...new Set(features)];
|
|
807
831
|
}
|
|
808
|
-
function buildParams(model, context, isOAuthToken2, options) {
|
|
832
|
+
function buildParams(model, context, isOAuthToken2, options, disablePreferredStrictTools = false) {
|
|
809
833
|
const { cacheControl } = getCacheControl(model, options?.cacheRetention, options?.env);
|
|
810
834
|
const compat = getAnthropicCompat(model);
|
|
811
835
|
const initialSystemMessage = getInitialSystemMessage(context.messages);
|
|
812
836
|
const initialSystemText = initialSystemMessage ? getSystemMessageText(initialSystemMessage) : "";
|
|
813
837
|
const transformedMessages = transformMessages(context.messages, model, normalizeToolCallId);
|
|
814
838
|
const conversationMessages = initialSystemMessage ? transformedMessages.slice(1) : transformedMessages;
|
|
839
|
+
let hasPreferredStrictTools = false;
|
|
840
|
+
const convertToolDefinitions = (tools, toolCacheControl2) => {
|
|
841
|
+
const definitions = convertTools(tools, isOAuthToken2, compat.supportsEagerToolInputStreaming, compat.supportsStrictTools, toolCacheControl2, disablePreferredStrictTools);
|
|
842
|
+
if (definitions.some((definition, index) => {
|
|
843
|
+
const config = tools[index].constrainedSampling;
|
|
844
|
+
return definition.strict === true && config && config.type === "json_schema" && config.strict === "prefer";
|
|
845
|
+
})) {
|
|
846
|
+
hasPreferredStrictTools = true;
|
|
847
|
+
}
|
|
848
|
+
return definitions;
|
|
849
|
+
};
|
|
815
850
|
const initialTools = initialSystemMessage?.toolsAdded ?? [];
|
|
816
851
|
const nativeToolChanges = compat.supportsMidConvoSystemMessages && compat.supportsMidConvoToolChanges && initialTools.length > 0;
|
|
817
|
-
const converted = convertMessages(conversationMessages, isOAuthToken2, cacheControl, compat.allowEmptySignature, model.compat?.supportsMidConvoEffort === true ? model.provider : undefined, nativeToolChanges ?
|
|
852
|
+
const converted = convertMessages(conversationMessages, isOAuthToken2, cacheControl, compat.allowEmptySignature, model.compat?.supportsMidConvoEffort === true ? model.provider : undefined, nativeToolChanges ? convertToolDefinitions : undefined);
|
|
818
853
|
const activeEffort = options?.effort ?? "high";
|
|
819
854
|
const betaFeatures = getBetaFeatures(model, context, isOAuthToken2, nativeToolChanges, options);
|
|
820
855
|
const params = {
|
|
@@ -853,14 +888,11 @@ function buildParams(model, context, isOAuthToken2, options) {
|
|
|
853
888
|
}
|
|
854
889
|
const toolCacheControl = compat.supportsCacheControlOnTools ? cacheControl : undefined;
|
|
855
890
|
if (nativeToolChanges) {
|
|
856
|
-
params.tools = [
|
|
857
|
-
...convertTools(initialTools, isOAuthToken2, compat.supportsEagerToolInputStreaming, compat.supportsStrictTools, toolCacheControl),
|
|
858
|
-
DEFERRED_TOOL_PLACEHOLDER
|
|
859
|
-
];
|
|
891
|
+
params.tools = [...convertToolDefinitions(initialTools, toolCacheControl), DEFERRED_TOOL_PLACEHOLDER];
|
|
860
892
|
} else {
|
|
861
893
|
const tools = getCurrentTools(context.messages);
|
|
862
894
|
if (tools.length > 0) {
|
|
863
|
-
params.tools =
|
|
895
|
+
params.tools = convertToolDefinitions(tools, toolCacheControl);
|
|
864
896
|
}
|
|
865
897
|
}
|
|
866
898
|
if (model.compat?.supportsMidConvoEffort === true) {
|
|
@@ -906,7 +938,7 @@ function buildParams(model, context, isOAuthToken2, options) {
|
|
|
906
938
|
if (allowedFallbackModels && allowedFallbackModels.length > 0) {
|
|
907
939
|
params.fallbacks = allowedFallbackModels.map((fallback) => ({ model: fallback.model }));
|
|
908
940
|
}
|
|
909
|
-
return params;
|
|
941
|
+
return { params, hasPreferredStrictTools };
|
|
910
942
|
}
|
|
911
943
|
function normalizeToolCallId(id) {
|
|
912
944
|
return id.replace(/[^a-zA-Z0-9_-]/g, "_").slice(0, 64);
|
|
@@ -1136,11 +1168,12 @@ var isAnthropicStrictUnsupportedKeyword = (key, value) => {
|
|
|
1136
1168
|
return typeof value !== "string" || !ANTHROPIC_STRICT_STRING_FORMATS.has(value);
|
|
1137
1169
|
return false;
|
|
1138
1170
|
};
|
|
1139
|
-
function convertTools(tools, isOAuthToken2, supportsEagerToolInputStreaming, supportsStrictTools, cacheControl) {
|
|
1171
|
+
function convertTools(tools, isOAuthToken2, supportsEagerToolInputStreaming, supportsStrictTools, cacheControl, disablePreferredStrictTools = false) {
|
|
1140
1172
|
if (!tools)
|
|
1141
1173
|
return [];
|
|
1142
1174
|
return tools.map((tool, index) => {
|
|
1143
|
-
const
|
|
1175
|
+
const config = tool.constrainedSampling;
|
|
1176
|
+
const strict = disablePreferredStrictTools && config && config.type === "json_schema" && config.strict === "prefer" ? undefined : resolveJsonSchemaStrictSampling(tool, supportsStrictTools, isAnthropicStrictUnsupportedKeyword);
|
|
1144
1177
|
const parameters = getJsonSchemaToolParameters(tool, strict);
|
|
1145
1178
|
const schema = parameters;
|
|
1146
1179
|
const legacyInputSchema = {
|
|
@@ -3,30 +3,31 @@ import {
|
|
|
3
3
|
initSlackApp,
|
|
4
4
|
startSlackApp,
|
|
5
5
|
stopSlackApp
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-tcc4wd5d.js";
|
|
7
7
|
import"./cli-q51yprfq.js";
|
|
8
8
|
import"./cli-3er6gcsn.js";
|
|
9
9
|
import"./cli-yatxqynm.js";
|
|
10
|
+
import"./cli-v3zhnxsb.js";
|
|
10
11
|
import"./cli-bd957dgb.js";
|
|
11
12
|
import"./cli-pzxba7gw.js";
|
|
12
|
-
import"./cli-
|
|
13
|
+
import"./cli-fmhj1ehj.js";
|
|
13
14
|
import"./cli-ywm1azg9.js";
|
|
14
15
|
import"./cli-hsem16hb.js";
|
|
15
|
-
import"./cli-
|
|
16
|
+
import"./cli-r4fqfpwf.js";
|
|
16
17
|
import"./cli-7mm2r1kp.js";
|
|
17
|
-
import"./cli-e2prcx5m.js";
|
|
18
18
|
import"./cli-dmtrxqhg.js";
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-5c2j5yvx.js";
|
|
21
|
-
import"./cli-1a2j50m0.js";
|
|
19
|
+
import"./cli-mvzyxwg3.js";
|
|
22
20
|
import"./cli-tadfgd0t.js";
|
|
21
|
+
import"./cli-fdvbjtbw.js";
|
|
23
22
|
import"./cli-ywybs5as.js";
|
|
24
23
|
import"./cli-f9w1semm.js";
|
|
24
|
+
import"./cli-1a2j50m0.js";
|
|
25
25
|
import"./cli-a35hzdve.js";
|
|
26
26
|
import"./cli-014vns2y.js";
|
|
27
27
|
import"./cli-sd0mxa3c.js";
|
|
28
28
|
import"./cli-w5e1d1vv.js";
|
|
29
|
-
import"./cli-
|
|
29
|
+
import"./cli-p0sg24zp.js";
|
|
30
|
+
import"./cli-5er5gjbm.js";
|
|
30
31
|
import"./cli-zf8jjwex.js";
|
|
31
32
|
import"./cli-gd4favx9.js";
|
|
32
33
|
import"./cli-ej6gbxfb.js";
|
|
@@ -2,40 +2,41 @@ import {
|
|
|
2
2
|
bufferThreadMessage,
|
|
3
3
|
getBufferMessageCount,
|
|
4
4
|
wasEventSeen
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-rfs4vddv.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveSlackUserId,
|
|
8
8
|
rewriteSlackMentions
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-c3rk1v0x.js";
|
|
10
10
|
import {
|
|
11
11
|
buildEffectiveText,
|
|
12
12
|
createSlackTaskWithFiles,
|
|
13
13
|
fetchSlackFiles,
|
|
14
14
|
hasOtherUserMention,
|
|
15
15
|
notifySlackFileFailures
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-rfz2ve55.js";
|
|
17
17
|
import"./cli-451ks6aw.js";
|
|
18
18
|
import"./cli-2bw3w47j.js";
|
|
19
|
-
import"./cli-
|
|
19
|
+
import"./cli-104zsxba.js";
|
|
20
20
|
import"./cli-re8z5p8p.js";
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
23
|
-
import"./cli-
|
|
24
|
-
import"./cli-
|
|
21
|
+
import"./cli-42qhyvwx.js";
|
|
22
|
+
import"./cli-9xf7fdtp.js";
|
|
23
|
+
import"./cli-jpc4r224.js";
|
|
24
|
+
import"./cli-7a93cv8c.js";
|
|
25
25
|
import"./cli-epan13p1.js";
|
|
26
26
|
import"./cli-zt3w1cn1.js";
|
|
27
|
-
import"./cli-
|
|
27
|
+
import"./cli-w1apjecb.js";
|
|
28
28
|
import"./cli-mzfth0bp.js";
|
|
29
|
-
import"./cli-
|
|
30
|
-
import"./cli-
|
|
31
|
-
import"./cli-
|
|
29
|
+
import"./cli-1w0vj3gw.js";
|
|
30
|
+
import"./cli-6r2f7edk.js";
|
|
31
|
+
import"./cli-6thk4jz3.js";
|
|
32
32
|
import"./cli-7jykv7ef.js";
|
|
33
|
-
import"./cli-
|
|
34
|
-
import"./cli-
|
|
33
|
+
import"./cli-b07hr3bt.js";
|
|
34
|
+
import"./cli-h6vtvt5c.js";
|
|
35
35
|
import"./cli-2x0e561b.js";
|
|
36
36
|
import"./cli-fad8m16k.js";
|
|
37
37
|
import"./cli-bsakbbkm.js";
|
|
38
38
|
import"./cli-zxg80zs9.js";
|
|
39
|
+
import"./cli-51tf7ac3.js";
|
|
39
40
|
import"./cli-ydt3zkwv.js";
|
|
40
41
|
import {
|
|
41
42
|
ackSlackMessage,
|
|
@@ -47,21 +48,23 @@ import {
|
|
|
47
48
|
noteSlackInboundSideEffect,
|
|
48
49
|
reportSlackInboundFailure,
|
|
49
50
|
require_dist
|
|
50
|
-
} from "./cli-
|
|
51
|
+
} from "./cli-tcc4wd5d.js";
|
|
51
52
|
import"./cli-q51yprfq.js";
|
|
52
53
|
import"./cli-3er6gcsn.js";
|
|
53
54
|
import"./cli-yatxqynm.js";
|
|
54
|
-
import
|
|
55
|
-
|
|
55
|
+
import {
|
|
56
|
+
shouldBlockChannel
|
|
57
|
+
} from "./cli-v3zhnxsb.js";
|
|
58
|
+
import"./cli-3nxdmjrc.js";
|
|
56
59
|
import"./cli-cd0hv9nh.js";
|
|
57
|
-
import"./cli-
|
|
58
|
-
import"./cli-btbzvq95.js";
|
|
60
|
+
import"./cli-61625k3x.js";
|
|
59
61
|
import"./cli-1m2e086m.js";
|
|
60
|
-
import"./cli-
|
|
62
|
+
import"./cli-btbzvq95.js";
|
|
63
|
+
import"./cli-p7z6q2m6.js";
|
|
61
64
|
import"./cli-wnb9b2g3.js";
|
|
62
65
|
import"./cli-bd957dgb.js";
|
|
63
66
|
import"./cli-pzxba7gw.js";
|
|
64
|
-
import"./cli-
|
|
67
|
+
import"./cli-anzdk0z4.js";
|
|
65
68
|
import"./cli-7pz3b7x5.js";
|
|
66
69
|
import {
|
|
67
70
|
getAgentWorkingOnThread,
|
|
@@ -71,27 +74,27 @@ import {
|
|
|
71
74
|
init_db1 as init_db,
|
|
72
75
|
reactionName,
|
|
73
76
|
slackContextKey
|
|
74
|
-
} from "./cli-
|
|
77
|
+
} from "./cli-fmhj1ehj.js";
|
|
75
78
|
import"./cli-ywm1azg9.js";
|
|
76
79
|
import"./cli-hsem16hb.js";
|
|
77
|
-
import"./cli-
|
|
80
|
+
import"./cli-r4fqfpwf.js";
|
|
78
81
|
import"./cli-7mm2r1kp.js";
|
|
79
|
-
import"./cli-e2prcx5m.js";
|
|
80
82
|
import"./cli-dmtrxqhg.js";
|
|
81
|
-
import"./cli-
|
|
83
|
+
import"./cli-mvzyxwg3.js";
|
|
84
|
+
import"./cli-tadfgd0t.js";
|
|
82
85
|
import {
|
|
83
86
|
init_resolver,
|
|
84
87
|
resolveTemplate
|
|
85
|
-
} from "./cli-
|
|
86
|
-
import"./cli-1a2j50m0.js";
|
|
87
|
-
import"./cli-tadfgd0t.js";
|
|
88
|
+
} from "./cli-fdvbjtbw.js";
|
|
88
89
|
import"./cli-ywybs5as.js";
|
|
89
90
|
import"./cli-f9w1semm.js";
|
|
91
|
+
import"./cli-1a2j50m0.js";
|
|
90
92
|
import"./cli-a35hzdve.js";
|
|
91
93
|
import"./cli-014vns2y.js";
|
|
92
94
|
import"./cli-sd0mxa3c.js";
|
|
93
95
|
import"./cli-w5e1d1vv.js";
|
|
94
|
-
import"./cli-
|
|
96
|
+
import"./cli-p0sg24zp.js";
|
|
97
|
+
import"./cli-5er5gjbm.js";
|
|
95
98
|
import"./cli-81r1wjyv.js";
|
|
96
99
|
import"./cli-zf8jjwex.js";
|
|
97
100
|
import"./cli-gd4favx9.js";
|
|
@@ -115,9 +118,19 @@ var import_bolt = __toESM(require_dist(), 1);
|
|
|
115
118
|
init_env_flag();
|
|
116
119
|
var isAdditiveSlack = () => isEnvFlagEnabled("ADDITIVE_SLACK", false);
|
|
117
120
|
var cachedBotUserId = null;
|
|
121
|
+
async function isExternalAssistantThread(client, channelId, body) {
|
|
122
|
+
const envelope = body.is_ext_shared_channel;
|
|
123
|
+
if (!await shouldBlockChannel(client, channelId, envelope))
|
|
124
|
+
return false;
|
|
125
|
+
console.log(`[Slack] Ignoring assistant thread event in external channel ${channelId}`);
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
118
128
|
function createAssistant() {
|
|
119
129
|
return new import_bolt.Assistant({
|
|
120
|
-
threadStarted: async ({ say, setSuggestedPrompts, saveThreadContext }) => {
|
|
130
|
+
threadStarted: async ({ event, body, client, say, setSuggestedPrompts, saveThreadContext }) => {
|
|
131
|
+
if (await isExternalAssistantThread(client, event.assistant_thread.channel_id, body)) {
|
|
132
|
+
return ignoreSlackInbound("external_channel");
|
|
133
|
+
}
|
|
121
134
|
try {
|
|
122
135
|
await saveThreadContext();
|
|
123
136
|
if (!isSlackRenderV2Enabled()) {
|
|
@@ -137,7 +150,10 @@ function createAssistant() {
|
|
|
137
150
|
reportSlackInboundFailure("assistant_thread_started_error");
|
|
138
151
|
}
|
|
139
152
|
},
|
|
140
|
-
threadContextChanged: async ({ saveThreadContext }) => {
|
|
153
|
+
threadContextChanged: async ({ event, body, client, saveThreadContext }) => {
|
|
154
|
+
if (await isExternalAssistantThread(client, event.assistant_thread.channel_id, body)) {
|
|
155
|
+
return ignoreSlackInbound("external_channel");
|
|
156
|
+
}
|
|
141
157
|
await saveThreadContext();
|
|
142
158
|
},
|
|
143
159
|
userMessage: async ({ message, body, say, setStatus, setTitle, getThreadContext, client }) => {
|
|
@@ -146,6 +162,11 @@ function createAssistant() {
|
|
|
146
162
|
console.log(`[Slack] dropping Slack retry: event_id=${eventId}`);
|
|
147
163
|
return ignoreSlackInbound("duplicate_event");
|
|
148
164
|
}
|
|
165
|
+
const externalCheckChannel = message.channel;
|
|
166
|
+
if (externalCheckChannel && await shouldBlockChannel(client, externalCheckChannel, body.is_ext_shared_channel)) {
|
|
167
|
+
console.log(`[Slack] Ignoring message in external channel ${externalCheckChannel}`);
|
|
168
|
+
return ignoreSlackInbound("external_channel");
|
|
169
|
+
}
|
|
149
170
|
let statusThread;
|
|
150
171
|
const safeSetStatus = async (status) => {
|
|
151
172
|
if (statusThread && isSlackRenderV2Enabled() && await markSlackSessionProcessing({ ...statusThread, client })) {
|
|
@@ -2,20 +2,20 @@ import {
|
|
|
2
2
|
convertResponsesMessages,
|
|
3
3
|
convertResponsesTools,
|
|
4
4
|
processResponsesStream
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-1m2xxxe2.js";
|
|
6
6
|
import {
|
|
7
7
|
clampOpenAIPromptCacheKey
|
|
8
8
|
} from "./cli-mrptpp86.js";
|
|
9
|
+
import"./cli-5m9j2spm.js";
|
|
9
10
|
import {
|
|
10
11
|
AzureOpenAI
|
|
11
12
|
} from "./cli-7cxw8b60.js";
|
|
12
|
-
import {
|
|
13
|
-
retryProviderRequest
|
|
14
|
-
} from "./cli-zy39d433.js";
|
|
15
|
-
import"./cli-5m9j2spm.js";
|
|
16
13
|
import {
|
|
17
14
|
getPiUserAgent
|
|
18
15
|
} from "./cli-et1bbwqf.js";
|
|
16
|
+
import {
|
|
17
|
+
retryProviderRequest
|
|
18
|
+
} from "./cli-zy39d433.js";
|
|
19
19
|
import {
|
|
20
20
|
resolveAzureConfig,
|
|
21
21
|
resolveDeploymentName
|
|
@@ -28,19 +28,19 @@ import {
|
|
|
28
28
|
buildBaseOptions,
|
|
29
29
|
createGrammarToolInputProperties,
|
|
30
30
|
resolveSamplingParams
|
|
31
|
-
} from "./cli-
|
|
31
|
+
} from "./cli-9fxpr83v.js";
|
|
32
32
|
import"./cli-y2apkfe2.js";
|
|
33
33
|
import {
|
|
34
34
|
headersToRecord
|
|
35
35
|
} from "./cli-7kyk9jr3.js";
|
|
36
|
-
import"./cli-btbzvq95.js";
|
|
37
36
|
import"./cli-1m2e086m.js";
|
|
37
|
+
import"./cli-btbzvq95.js";
|
|
38
38
|
import {
|
|
39
39
|
clampThinkingLevel,
|
|
40
40
|
getDeclaredTools,
|
|
41
41
|
resolveTranscript,
|
|
42
42
|
resolveTranscriptTools
|
|
43
|
-
} from "./cli-
|
|
43
|
+
} from "./cli-p7z6q2m6.js";
|
|
44
44
|
import {
|
|
45
45
|
AssistantMessageEventStream
|
|
46
46
|
} from "./cli-wnb9b2g3.js";
|
|
@@ -4,24 +4,24 @@ import {
|
|
|
4
4
|
getDbClient,
|
|
5
5
|
init_db1 as init_db,
|
|
6
6
|
init_embeddings
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-fmhj1ehj.js";
|
|
8
8
|
import"./cli-ywm1azg9.js";
|
|
9
9
|
import"./cli-hsem16hb.js";
|
|
10
|
-
import"./cli-
|
|
10
|
+
import"./cli-r4fqfpwf.js";
|
|
11
11
|
import"./cli-7mm2r1kp.js";
|
|
12
|
-
import"./cli-e2prcx5m.js";
|
|
13
12
|
import"./cli-dmtrxqhg.js";
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-5c2j5yvx.js";
|
|
16
|
-
import"./cli-1a2j50m0.js";
|
|
13
|
+
import"./cli-mvzyxwg3.js";
|
|
17
14
|
import"./cli-tadfgd0t.js";
|
|
15
|
+
import"./cli-fdvbjtbw.js";
|
|
18
16
|
import"./cli-ywybs5as.js";
|
|
19
17
|
import"./cli-f9w1semm.js";
|
|
18
|
+
import"./cli-1a2j50m0.js";
|
|
20
19
|
import"./cli-a35hzdve.js";
|
|
21
20
|
import"./cli-014vns2y.js";
|
|
22
21
|
import"./cli-sd0mxa3c.js";
|
|
23
22
|
import"./cli-w5e1d1vv.js";
|
|
24
|
-
import"./cli-
|
|
23
|
+
import"./cli-p0sg24zp.js";
|
|
24
|
+
import"./cli-5er5gjbm.js";
|
|
25
25
|
import"./cli-zf8jjwex.js";
|
|
26
26
|
import"./cli-gd4favx9.js";
|
|
27
27
|
import"./cli-ej6gbxfb.js";
|