@desplega.ai/agent-swarm 1.163.0 → 1.164.1
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/README.md +1 -1
- package/dist/{acp-adapter-kcgjfkpm.js → acp-adapter-rxvek4ym.js} +24 -7
- package/dist/{actions-a0b8h6ed.js → actions-hp2h32dx.js} +36 -32
- package/dist/amp-adapter-zfd7djyx.js +34 -0
- package/dist/{anthropic-messages-8xxrzky9.js → anthropic-messages-hst62ws9.js} +3 -3
- package/dist/{app-vcj9h5py.js → app-w2d26h4f.js} +12 -11
- package/dist/{assistant-rmqjkt9r.js → assistant-45pc4en7.js} +37 -33
- package/dist/{azure-openai-responses-f5cqsyj8.js → azure-openai-responses-mh8tvf78.js} +9 -68
- package/dist/{boot-reembed-35hsdjh7.js → boot-reembed-6rhcpsjf.js} +13 -12
- package/dist/{boot-reembed-8wbky6be.js → boot-reembed-k1q2s4fc.js} +14 -13
- package/dist/{boot-scrub-logs-mc0cj8cw.js → boot-scrub-logs-t8xg7wd7.js} +12 -11
- package/dist/boot-seeds-ex93edx7.js +33 -0
- package/dist/{claude-adapter-gbasvbrn.js → claude-adapter-hcxd0szm.js} +27 -23
- package/dist/{claude-managed-adapter-yxkfxg8j.js → claude-managed-adapter-fz7xps2r.js} +4 -4
- package/dist/{claude-managed-setup-pkyrgshb.js → claude-managed-setup-xx6f15h9.js} +3 -3
- package/dist/{claude-sdk-session-zkbb5phc.js → claude-sdk-session-6nb9raem.js} +10112 -9707
- package/dist/{cli-cat6h73s.js → cli-003785v9.js} +1 -1
- package/dist/cli-07s39g1n.js +68 -0
- package/dist/{cli-585swr20.js → cli-0a7r5331.js} +3 -3
- package/dist/{cli-8hsexrtr.js → cli-0wn3ypqv.js} +76 -31
- package/dist/{cli-tcen9p5w.js → cli-10zmp1p7.js} +5 -5
- package/dist/{cli-j9tvyt49.js → cli-1d3w4xm3.js} +9 -8
- package/dist/{cli-s81xzy0b.js → cli-1wd1n2ya.js} +5 -0
- package/dist/{cli-5bcd7sfy.js → cli-1wetf34q.js} +4 -4
- package/dist/{cli-yy6dew39.js → cli-2c8eky5y.js} +1 -1
- package/dist/{cli-aezmrnah.js → cli-3ajw5v5v.js} +5 -5
- package/dist/{cli-h45y0yh0.js → cli-4cn19jvn.js} +2 -2
- package/dist/{cli-zv5gxh3p.js → cli-4drstbb9.js} +261 -252
- package/dist/{cli-hmsw1gpy.js → cli-4mevd1hf.js} +13 -7
- package/dist/{cli-jv2n14x1.js → cli-4q4cmr4t.js} +12 -11
- package/dist/{cli-qjjvzwzd.js → cli-5c2j5yvx.js} +1 -1
- package/dist/{cli-vy32s71t.js → cli-691f2rxm.js} +5 -5
- package/dist/{cli-tre4bdgq.js → cli-6behs2bt.js} +1 -1
- package/dist/{cli-bsky8g7w.js → cli-6zcfw0x7.js} +1 -1
- package/dist/cli-7mm2r1kp.js +17 -0
- package/dist/{cli-mbssg1xv.js → cli-8kt0bmgx.js} +1 -1
- package/dist/{cli-p0r8sxj5.js → cli-8ssjez7e.js} +222 -4
- package/dist/{cli-e2e7m2eb.js → cli-93rxw9yd.js} +2 -2
- package/dist/{cli-esa2g8rn.js → cli-976r1zqx.js} +4 -4
- package/dist/cli-9k7mqz00.js +117 -0
- package/dist/{cli-pkd6s2wy.js → cli-9q3wt23f.js} +2 -2
- package/dist/{cli-vbz0wywh.js → cli-a9bw0xxt.js} +607 -90
- package/dist/{cli-qrgt5bqf.js → cli-agamgm0p.js} +1 -1
- package/dist/{cli-cebmgwsc.js → cli-agjzafns.js} +5 -5
- package/dist/{cli-rnyzn44p.js → cli-asqeg4ve.js} +2 -2
- package/dist/{cli-13hw4z91.js → cli-b0f70z24.js} +1 -1
- package/dist/cli-bqjfjex4.js +40 -0
- package/dist/{cli-4dcpaefp.js → cli-bz1gbac9.js} +3 -3
- package/dist/{cli-2hhfhfq5.js → cli-cn53e7vc.js} +8 -1
- package/dist/{cli-s3hwpt9v.js → cli-cwxhbf43.js} +34 -11
- package/dist/{cli-t845n9xk.js → cli-dbszf3rw.js} +7 -5
- package/dist/{cli-cvatsam7.js → cli-dyqsrqcf.js} +8 -7
- package/dist/cli-et8wdyqh.js +518 -0
- package/dist/{cli-rtekzxtd.js → cli-etbrt8x1.js} +3 -3
- package/dist/{cli-g4j2m281.js → cli-fdpkw8vk.js} +15 -12
- package/dist/{cli-g739zqzt.js → cli-fj86xr3c.js} +2 -2
- package/dist/{cli-jyy6pm2f.js → cli-g3qgrzck.js} +15 -3
- package/dist/{cli-eg0b3p0k.js → cli-g5erf0zt.js} +23 -14
- package/dist/{cli-k25mnm7h.js → cli-gc54qc0p.js} +1 -1
- package/dist/{cli-twrh04ap.js → cli-gt8v96qx.js} +7 -6
- package/dist/{cli-89s4ngw3.js → cli-gvcgmx69.js} +1 -1
- package/dist/{cli-z5swnjvr.js → cli-j0tmc908.js} +10 -10
- package/dist/{cli-hktm1f0q.js → cli-jeefgppq.js} +187 -35
- package/dist/{cli-8ev9xqnx.js → cli-krqm5f11.js} +37 -226
- package/dist/cli-ndx5yz5n.js +3299 -0
- package/dist/{cli-ykk5jaax.js → cli-nexwh8zg.js} +34 -29
- package/dist/{cli-rfjw9jw2.js → cli-ng97fjq7.js} +2 -2
- package/dist/{cli-7tre70zp.js → cli-nvvfd8bq.js} +203 -153
- package/dist/{cli-89v6kyq7.js → cli-nwhb8y2e.js} +13 -4
- package/dist/{cli-nt8hecg9.js → cli-pkke6geq.js} +69 -39
- package/dist/{cli-wgbezhw2.js → cli-ptcz1cqy.js} +4 -2
- package/dist/{cli-hb5c2x5y.js → cli-q38n4bq0.js} +2 -2
- package/dist/{cli-nexqx4ve.js → cli-qt5wzq6v.js} +60 -9
- package/dist/{cli-4cwxn7gp.js → cli-qvfk83fy.js} +2 -2
- package/dist/{cli-xqpk3rp7.js → cli-v0e7jpr5.js} +30 -5
- package/dist/{cli-6q18nwg8.js → cli-v5pr2fgt.js} +2 -2
- package/dist/{cli-ykph25en.js → cli-v7fqehqd.js} +2 -2
- package/dist/cli-v90vfwyb.js +940 -0
- package/dist/{cli-7af8yhav.js → cli-vbr859rz.js} +7 -4
- package/dist/{cli-p7y8jxd7.js → cli-wg8yjqtw.js} +31 -3
- package/dist/{cli-4x0csdjq.js → cli-x3x0qwky.js} +40 -11
- package/dist/{cli-67fh0xdx.js → cli-xb7kyanp.js} +2 -2
- package/dist/{cli-0jjdftee.js → cli-xfb7333f.js} +6 -5
- package/dist/cli-xxz89c2n.js +75 -0
- package/dist/cli-ydt3zkwv.js +70 -0
- package/dist/{cli-xk79303e.js → cli-yj790e19.js} +9 -1
- package/dist/{cli-109n34vn.js → cli-z2ap2c0c.js} +127 -55
- package/dist/cli-zt3w1cn1.js +137 -0
- package/dist/{cli-trc24wk2.js → cli-zxg80zs9.js} +1 -1
- package/dist/cli.js +28 -27
- package/dist/{cloudflare-workers-ai-system-one-k8ddqjkq.js → cloudflare-workers-ai-system-one-tt484t61.js} +2 -2
- package/dist/{codex-adapter-sfg6afn9.js → codex-adapter-pcxdn10v.js} +18 -16
- package/dist/{codex-hook-m73jmqgx.js → codex-hook-b1fb7c2k.js} +4 -3
- package/dist/{codex-login-cf7mzsgg.js → codex-login-059nm145.js} +2 -2
- package/dist/{codex-session-runner-xsxgyed1.js → codex-session-runner-xzwwddp8.js} +18 -16
- package/dist/{commands-5tqv6f77.js → commands-98at8mkn.js} +11 -10
- package/dist/cursor-adapter-dkg6qnkp.js +32 -0
- package/dist/{db-k9rc1c3j.js → db-01g8wtvw.js} +19 -10
- package/dist/{devin-adapter-dpsv6hd9.js → devin-adapter-qmttt2fz.js} +2 -1
- package/dist/{dispatcher-8q94tcgt.js → dispatcher-nn2k1wxd.js} +34 -31
- package/dist/{dsh-adapter-wpze65d4.js → dsh-adapter-w4d4vwdq.js} +8 -8
- package/dist/{e2b-gjgdjp91.js → e2b-9e4g2hvt.js} +5 -5
- package/dist/{easter-egg-3d-3w5c2n4c.js → easter-egg-3d-mtpnw06s.js} +2 -2
- package/dist/{event-bus-sfx8dx3t.js → event-bus-z7v2t26e.js} +2 -1
- package/dist/{execute-f50wg9nh.js → execute-s4ccjq3n.js} +191 -25
- package/dist/{google-generative-ai-jxxpnegy.js → google-generative-ai-d6nphg3q.js} +3 -3
- package/dist/{google-vertex-x7q1angm.js → google-vertex-cpshkref.js} +3 -3
- package/dist/{handlers-3t8mmc9f.js → handlers-b0kqsbg8.js} +37 -34
- package/dist/{hook-kvqw3tsq.js → hook-pz50gqep.js} +18 -16
- package/dist/{hook-mxzfhg2n.js → hook-sap7v1aj.js} +17 -15
- package/dist/{http-1fd52m3b.js → http-ncr8rmd0.js} +469 -257
- package/dist/{index-bgx3rpeg.js → index-38kqdt3e.js} +35 -32
- package/dist/{index-qg0sdgyf.js → index-630kj5vd.js} +32 -25
- package/dist/{index-8z4jkxdw.js → index-9nrj7797.js} +34 -31
- package/dist/index-adw4zr9j.js +1020 -0
- package/dist/{index-hn2bv5eh.js → index-c4aqcyz1.js} +13 -12
- package/dist/{index-h5gs261z.js → index-etdrp7yp.js} +140 -140
- package/dist/index-fdk1t4d6.js +91297 -0
- package/dist/{index-sj0y70m0.js → index-r46s01nq.js} +34 -31
- package/dist/{keepalive-v5g82q29.js → keepalive-31613r2h.js} +14 -13
- package/dist/{lead-e69ggv5r.js → lead-mx59tr5s.js} +52 -45
- package/dist/{maintenance-m65cjzcn.js → maintenance-55ff39ca.js} +14 -13
- package/dist/{mistral-conversations-rw7fbt22.js → mistral-conversations-8445ddjn.js} +2 -2
- package/dist/{oauth-refresh-sweep-3mjzggag.js → oauth-refresh-sweep-anma954w.js} +13 -12
- package/dist/{onboard-mwz7xqmq.js → onboard-b2fy8ftb.js} +2 -2
- package/dist/{openai-codex-responses-efvrgrq3.js → openai-codex-responses-9ynm88zy.js} +3 -3
- package/dist/{openai-completions-bbbrrz4z.js → openai-completions-nhqwjmaw.js} +2 -2
- package/dist/{openai-responses-9jjyrcm1.js → openai-responses-xx1c4kgm.js} +3 -3
- package/dist/{opencode-adapter-kb3g6pkf.js → opencode-adapter-p1s92tmy.js} +7 -7
- package/dist/{otel-impl-xwck38em.js → otel-impl-9brvt7xv.js} +12 -4
- package/dist/{pi-mono-adapter-z6s1bme2.js → pi-mono-adapter-kz4rrwvd.js} +33 -21
- package/dist/{pricing-refresh-7w8yq6s4.js → pricing-refresh-7w8mbmva.js} +13 -12
- package/dist/{rbac-roles-t85acbb7.js → rbac-roles-ejp7qwvb.js} +12 -11
- package/dist/{rbac-roles-cggpv8g9.js → rbac-roles-nhk4r7bc.js} +13 -12
- package/dist/{render-v2-qmmnkr7f.js → render-v2-2gzt8skq.js} +12 -11
- package/dist/{runtime-vfjsfsc5.js → runtime-v2t1r79e.js} +4 -4
- package/dist/{setup-99rktr9c.js → setup-5et8t412.js} +2 -2
- package/dist/{typesafe-system-one-2ef30pec.js → typesafe-system-one-datfr82p.js} +2 -2
- package/dist/{virtual-modules-9bv7ry91.js → virtual-modules-wm8mxdxx.js} +12 -11
- package/dist/{work-objects-kvb7jhes.js → work-objects-tb0er7qa.js} +37 -34
- package/dist/{worker-e1wgr2e1.js → worker-62cv075d.js} +52 -45
- package/dist/{x-f1gt1pz3.js → x-vbxb31jr.js} +2 -2
- package/openapi.json +443 -37
- package/package.json +9 -8
- package/src/be/db/active-sessions.ts +30 -0
- package/src/be/db/approvals.ts +54 -0
- package/src/be/db/tasks/write.ts +8 -6
- package/src/be/db.ts +36 -6
- package/src/be/events.ts +16 -17
- package/src/be/memory/raters/retrieval.ts +1 -1
- package/src/be/memory/raters/store.ts +1 -1
- package/src/be/migrations/195_approval_request_approvals.sql +6 -0
- package/src/be/migrations/196_skill_invocations.sql +47 -0
- package/src/be/model-validation.ts +12 -2
- package/src/be/multi-runtime.ts +4 -3
- package/src/be/pricing-normalize.ts +11 -0
- package/src/be/seed-pricing.ts +48 -1
- package/src/be/skill-invocations.ts +104 -0
- package/src/be/swarm-config-guard.ts +2 -0
- package/src/commands/provider-credentials.ts +50 -12
- package/src/commands/runner.ts +61 -22
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/extensions/contract.ts +100 -0
- package/src/extensions/dispatcher.ts +19 -0
- package/src/extensions/post-bridge.ts +191 -0
- package/src/github/handlers.ts +128 -2
- package/src/gitlab/workflow-action-name.ts +15 -0
- package/src/heartbeat/heartbeat.ts +4 -3
- package/src/http/active-sessions.ts +6 -5
- package/src/http/agents.ts +11 -2
- package/src/http/approval-requests.ts +271 -35
- package/src/http/core.ts +4 -1
- package/src/http/index.ts +3 -11
- package/src/http/mcp-servers.ts +6 -0
- package/src/http/poll.ts +1 -1
- package/src/http/session-cost-recompute.ts +71 -0
- package/src/http/session-data.ts +11 -0
- package/src/http/tasks.ts +1 -1
- package/src/http/utils.ts +27 -2
- package/src/http/webhooks.ts +17 -5
- package/src/linear/sync.ts +53 -1
- package/src/linear/templates.ts +12 -2
- package/src/otel-impl.ts +12 -2
- package/src/prompts/base-prompt.ts +9 -4
- package/src/prompts/resolver.ts +1 -1
- package/src/prompts/session-templates.ts +28 -0
- package/src/providers/acp-adapter.ts +11 -2
- package/src/providers/acp-swarm-events.ts +15 -0
- package/src/providers/amp-adapter.ts +1240 -0
- package/src/providers/claude-adapter.ts +231 -45
- package/src/providers/claude-managed-adapter.ts +2 -0
- package/src/providers/codex-adapter.ts +10 -5
- package/src/providers/codex-oauth/env-keys.ts +67 -0
- package/src/providers/codex-skill-resolver.ts +8 -0
- package/src/providers/cursor-adapter.ts +640 -0
- package/src/providers/devin-adapter.ts +8 -4
- package/src/providers/dsh-adapter.ts +1 -0
- package/src/providers/index.ts +9 -1
- package/src/providers/opencode-adapter.ts +1 -0
- package/src/providers/pi-mono-adapter.ts +14 -1
- package/src/providers/pricing-sources.md +45 -3
- package/src/providers/reasoning-effort.ts +15 -1
- package/src/providers/skill-invoke.ts +188 -0
- package/src/providers/types.ts +26 -2
- package/src/rbac/legacy-policy.ts +1 -0
- package/src/rbac/permissions.ts +5 -0
- package/src/scheduler/scheduler.ts +1 -1
- package/src/scripts-runtime/types/swarm-extension.d.ts +119 -0
- package/src/slack/actions.ts +3 -0
- package/src/slack/assistant.ts +3 -0
- package/src/slack/handlers.test.ts +46 -0
- package/src/slack/handlers.ts +3 -0
- package/src/slack/render-v2.ts +1 -1
- package/src/slack/thread-buffer.ts +3 -0
- package/src/tasks/task-terminal-effects.ts +18 -6
- package/src/tasks/worker-follow-up.ts +3 -0
- package/src/tests/acp-adapter.test.ts +123 -0
- package/src/tests/acp-swarm-events.test.ts +18 -1
- package/src/tests/amp-adapter.test.ts +823 -0
- package/src/tests/amp-budget-export-failed.test.ts +133 -0
- package/src/tests/amp-pricing-helpers.ts +16 -0
- package/src/tests/amp-pricing.test.ts +218 -0
- package/src/tests/approval-respond-auth.test.ts +371 -0
- package/src/tests/base-prompt.test.ts +13 -0
- package/src/tests/business-use-scrub.test.ts +61 -0
- package/src/tests/claude-adapter-binary.test.ts +355 -19
- package/src/tests/claude-adapter.test.ts +6 -1
- package/src/tests/claude-sdk-lifecycle.test.ts +43 -2
- package/src/tests/codex-oauth-adapter.test.ts +7 -14
- package/src/tests/codex-oauth-env-keys.test.ts +33 -0
- package/src/tests/credential-check.test.ts +31 -0
- package/src/tests/cursor-adapter.test.ts +696 -0
- package/src/tests/db-task-read-contract.test.ts +5 -0
- package/src/tests/db-task-write-contract.test.ts +5 -0
- package/src/tests/devin-adapter.test.ts +41 -0
- package/src/tests/entrypoint-config-env-export.test.ts +65 -0
- package/src/tests/extensions-post-bridge.test.ts +669 -0
- package/src/tests/extensions-run-context.test.ts +61 -0
- package/src/tests/fetch-resolved-env.test.ts +62 -0
- package/src/tests/fixtures/fake-amp.ts +304 -0
- package/src/tests/github-handlers-inline-comments.test.ts +147 -1
- package/src/tests/gitlab-workflow-event-names.test.ts +136 -0
- package/src/tests/http-error-body-scrub.test.ts +130 -0
- package/src/tests/linear-webhook.test.ts +107 -0
- package/src/tests/mcp-server-codex-oauth-env.test.ts +146 -0
- package/src/tests/model-tier-resolution.test.ts +3 -3
- package/src/tests/otel-impl-secret-scrubbing.test.ts +67 -2
- package/src/tests/output-schema-inheritance.test.ts +133 -0
- package/src/tests/pi-mono-adapter.test.ts +10 -0
- package/src/tests/pricing-refresh.test.ts +5 -4
- package/src/tests/prompt-template-remaining.test.ts +56 -0
- package/src/tests/prompt-template-session.test.ts +5 -3
- package/src/tests/provider-process-group.test.ts +41 -0
- package/src/tests/provider-registration.test.ts +3 -1
- package/src/tests/rbac-engine.test.ts +1 -1
- package/src/tests/script-connections.test.ts +4 -0
- package/src/tests/secret-scrubber.test.ts +167 -0
- package/src/tests/session-activity-liveness.test.ts +248 -0
- package/src/tests/session-cost-recompute-unit.test.ts +21 -0
- package/src/tests/session-costs-golden.test.ts +28 -0
- package/src/tests/skill-invocations.test.ts +278 -0
- package/src/tests/skill-invoke.test.ts +395 -0
- package/src/tests/slack-thread-buffer.test.ts +29 -0
- package/src/tests/status.test.ts +3 -7
- package/src/tests/synthetic-secret-helpers.ts +37 -0
- package/src/tests/task-terminal-secret-scrub.test.ts +274 -0
- package/src/tests/webhooks-task-blocked.test.ts +4 -4
- package/src/tests/x402-client.test.ts +124 -0
- package/src/tests/x402-spending-tracker.test.ts +66 -0
- package/src/tools/defer-task.ts +1 -1
- package/src/tools/steer-task.ts +1 -1
- package/src/tools/store-progress.ts +1 -1
- package/src/types.ts +42 -2
- package/src/utils/amp-models.ts +114 -0
- package/src/utils/business-use.ts +18 -0
- package/src/utils/credentials.ts +8 -0
- package/src/utils/process-group.ts +79 -0
- package/src/utils/secret-scrubber.ts +114 -7
- package/src/workflows/event-bus.ts +47 -1
- package/src/x402/client.ts +36 -14
- package/src/x402/spending-tracker.ts +64 -3
- package/templates/skills/agent-browser/SKILL.md +5 -0
- package/templates/skills/agent-browser/content.md +5 -0
- package/templates/skills/heartbeat-runbook/content.md +1 -0
- package/templates/skills/swarm-extensions/content.md +4 -0
- package/dist/boot-seeds-b4g74mpc.js +0 -32
- package/dist/cli-f7kvq46p.js +0 -32
- package/dist/cli-y89t4nca.js +0 -67
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ agent-swarm.dev is an open-source operating system for AI work. A lead agent del
|
|
|
22
22
|
- Workflows, schedules, scripts, and apps for recurring work
|
|
23
23
|
- [Extensions](https://docs.agent-swarm.dev/docs/guides/extensions) for trusted TypeScript hooks, installed as agent-owned inert drafts and activated by a trusted lead, operator, or dashboard user
|
|
24
24
|
- [Realtime rooms](./runbooks/realtime-rooms.md) for shared page state, presence, and live channels
|
|
25
|
-
- Your choice of harness and models: Claude Code, Codex, pi, opencode, Devin, or ACP agents
|
|
25
|
+
- Your choice of harness and models: Claude Code, Codex, pi, opencode, [Cursor](https://docs.agent-swarm.dev/docs/guides/provider-auth/cursor), Amp, Devin, or ACP agents
|
|
26
26
|
|
|
27
27
|
```mermaid
|
|
28
28
|
flowchart LR
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
detachedProcessGroup,
|
|
11
11
|
registerProcessGroup,
|
|
12
12
|
terminateProcessGroup
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-zt3w1cn1.js";
|
|
14
14
|
import {
|
|
15
15
|
array,
|
|
16
16
|
boolean,
|
|
@@ -30,11 +30,11 @@ import {
|
|
|
30
30
|
import {
|
|
31
31
|
init_package,
|
|
32
32
|
package_default
|
|
33
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-1d3w4xm3.js";
|
|
34
34
|
import {
|
|
35
35
|
init_secret_scrubber,
|
|
36
36
|
scrubSecrets
|
|
37
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-qt5wzq6v.js";
|
|
38
38
|
import"./cli-bc05qbss.js";
|
|
39
39
|
|
|
40
40
|
// node_modules/@agentclientprotocol/sdk/dist/schema/index.js
|
|
@@ -4655,7 +4655,8 @@ function translateAcpSessionUpdate(update) {
|
|
|
4655
4655
|
type: "tool_end",
|
|
4656
4656
|
toolCallId: update.toolCallId,
|
|
4657
4657
|
toolName: toolName(update),
|
|
4658
|
-
result: toolResult(update)
|
|
4658
|
+
result: toolResult(update),
|
|
4659
|
+
isError: update.status === "failed"
|
|
4659
4660
|
}
|
|
4660
4661
|
];
|
|
4661
4662
|
}
|
|
@@ -4702,6 +4703,16 @@ function translateAcpSessionUpdate(update) {
|
|
|
4702
4703
|
];
|
|
4703
4704
|
}
|
|
4704
4705
|
}
|
|
4706
|
+
function acpReportedCostUsd(update) {
|
|
4707
|
+
if (update.sessionUpdate !== "usage_update" || !update.cost)
|
|
4708
|
+
return null;
|
|
4709
|
+
const { amount, currency } = update.cost;
|
|
4710
|
+
if (typeof currency !== "string" || currency.trim().toUpperCase() !== "USD")
|
|
4711
|
+
return null;
|
|
4712
|
+
if (typeof amount !== "number" || !Number.isFinite(amount) || amount < 0)
|
|
4713
|
+
return null;
|
|
4714
|
+
return amount;
|
|
4715
|
+
}
|
|
4705
4716
|
function translateAcpSessionNotification(notification) {
|
|
4706
4717
|
return translateAcpSessionUpdate(notification.update);
|
|
4707
4718
|
}
|
|
@@ -4963,6 +4974,7 @@ function boundedAcpLogScalar(value) {
|
|
|
4963
4974
|
|
|
4964
4975
|
class SwarmAcpClient {
|
|
4965
4976
|
emit;
|
|
4977
|
+
reportedCostUsd = null;
|
|
4966
4978
|
constructor(emit) {
|
|
4967
4979
|
this.emit = emit;
|
|
4968
4980
|
}
|
|
@@ -4974,6 +4986,9 @@ class SwarmAcpClient {
|
|
|
4974
4986
|
}
|
|
4975
4987
|
async sessionUpdate(params) {
|
|
4976
4988
|
this.emit({ type: "raw_log", content: serializeAcpLog(params) });
|
|
4989
|
+
const costUsd = acpReportedCostUsd(params.update);
|
|
4990
|
+
if (costUsd !== null)
|
|
4991
|
+
this.reportedCostUsd = costUsd;
|
|
4977
4992
|
for (const event of translateAcpSessionNotification(params)) {
|
|
4978
4993
|
this.emit(event);
|
|
4979
4994
|
}
|
|
@@ -4982,6 +4997,7 @@ class SwarmAcpClient {
|
|
|
4982
4997
|
|
|
4983
4998
|
class ACPSession {
|
|
4984
4999
|
connection;
|
|
5000
|
+
client;
|
|
4985
5001
|
process;
|
|
4986
5002
|
config;
|
|
4987
5003
|
sessionId;
|
|
@@ -4994,8 +5010,9 @@ class ACPSession {
|
|
|
4994
5010
|
completionPromise;
|
|
4995
5011
|
completionResolve;
|
|
4996
5012
|
ephemeralTokenId = null;
|
|
4997
|
-
constructor(connection, process2, config, sessionId, providerMeta, ephemeralTokenId) {
|
|
5013
|
+
constructor(connection, client2, process2, config, sessionId, providerMeta, ephemeralTokenId) {
|
|
4998
5014
|
this.connection = connection;
|
|
5015
|
+
this.client = client2;
|
|
4999
5016
|
this.process = process2;
|
|
5000
5017
|
this.config = config;
|
|
5001
5018
|
this.sessionId = sessionId;
|
|
@@ -5128,7 +5145,7 @@ class ACPSession {
|
|
|
5128
5145
|
sessionId: this.sessionId,
|
|
5129
5146
|
taskId: this.config.taskId,
|
|
5130
5147
|
agentId: this.config.agentId,
|
|
5131
|
-
totalCostUsd: 0,
|
|
5148
|
+
totalCostUsd: this.client.reportedCostUsd ?? 0,
|
|
5132
5149
|
inputTokens: usage?.inputTokens,
|
|
5133
5150
|
outputTokens: usage?.outputTokens,
|
|
5134
5151
|
cacheReadTokens: usage?.cachedReadTokens ?? undefined,
|
|
@@ -5206,7 +5223,7 @@ class ACPAdapter {
|
|
|
5206
5223
|
]
|
|
5207
5224
|
});
|
|
5208
5225
|
const configOptions = await applyConfiguredOptions(connection, newSession.sessionId, newSession.configOptions ?? [], target.configuredOptions(config));
|
|
5209
|
-
session = new ACPSession(connection, proc, config, newSession.sessionId, {
|
|
5226
|
+
session = new ACPSession(connection, client2, proc, config, newSession.sessionId, {
|
|
5210
5227
|
target: target.target,
|
|
5211
5228
|
configOptions: sanitizeAcpConfigOptions(configOptions)
|
|
5212
5229
|
}, ephemeralToken.tokenId);
|
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveSlackUserId
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-4cn19jvn.js";
|
|
4
4
|
import {
|
|
5
5
|
createTaskWithSiblingAwareness
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
6
|
+
} from "./cli-a9bw0xxt.js";
|
|
7
|
+
import"./cli-003785v9.js";
|
|
8
|
+
import"./cli-07s39g1n.js";
|
|
8
9
|
import"./cli-w0bwte75.js";
|
|
9
10
|
import"./cli-re8z5p8p.js";
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
11
|
+
import"./cli-etbrt8x1.js";
|
|
12
|
+
import"./cli-976r1zqx.js";
|
|
13
|
+
import"./cli-wg8yjqtw.js";
|
|
14
|
+
import"./cli-j0tmc908.js";
|
|
14
15
|
import"./cli-epan13p1.js";
|
|
15
16
|
import"./cli-f14fvzag.js";
|
|
16
|
-
import"./cli-
|
|
17
|
-
import"./cli-
|
|
18
|
-
import"./cli-
|
|
17
|
+
import"./cli-zt3w1cn1.js";
|
|
18
|
+
import"./cli-1wetf34q.js";
|
|
19
|
+
import"./cli-2c8eky5y.js";
|
|
19
20
|
import"./cli-3dpj7atn.js";
|
|
20
21
|
import"./cli-2x0e561b.js";
|
|
21
|
-
import"./cli-
|
|
22
|
+
import"./cli-pkke6geq.js";
|
|
22
23
|
import"./cli-rb9m6rpe.js";
|
|
23
24
|
import"./cli-mzfth0bp.js";
|
|
24
|
-
import"./cli-
|
|
25
|
-
import"./cli-
|
|
26
|
-
import"./cli-
|
|
27
|
-
import"./cli-
|
|
25
|
+
import"./cli-0a7r5331.js";
|
|
26
|
+
import"./cli-v7fqehqd.js";
|
|
27
|
+
import"./cli-agjzafns.js";
|
|
28
|
+
import"./cli-93rxw9yd.js";
|
|
28
29
|
import"./cli-fad8m16k.js";
|
|
29
30
|
import"./cli-bsakbbkm.js";
|
|
30
|
-
import"./cli-
|
|
31
|
+
import"./cli-zxg80zs9.js";
|
|
31
32
|
import"./cli-51tf7ac3.js";
|
|
33
|
+
import"./cli-ydt3zkwv.js";
|
|
32
34
|
import {
|
|
33
35
|
buildCancelledBlocks,
|
|
34
36
|
ensureSlackThreadTree,
|
|
@@ -36,20 +38,20 @@ import {
|
|
|
36
38
|
getAgentEmoji,
|
|
37
39
|
getTaskLink,
|
|
38
40
|
isSlackRenderV2Enabled
|
|
39
|
-
} from "./cli-
|
|
41
|
+
} from "./cli-4drstbb9.js";
|
|
40
42
|
import"./cli-q51yprfq.js";
|
|
41
43
|
import"./cli-3er6gcsn.js";
|
|
42
44
|
import"./cli-cvk6yzw5.js";
|
|
43
45
|
import"./cli-yatxqynm.js";
|
|
44
|
-
import"./cli-
|
|
45
|
-
import"./cli-
|
|
46
|
+
import"./cli-b0f70z24.js";
|
|
47
|
+
import"./cli-nexwh8zg.js";
|
|
46
48
|
import"./cli-btbzvq95.js";
|
|
47
49
|
import"./cli-1m2e086m.js";
|
|
48
50
|
import"./cli-bzr0ftht.js";
|
|
49
51
|
import"./cli-bd957dgb.js";
|
|
50
52
|
import"./cli-pzxba7gw.js";
|
|
51
|
-
import"./cli-
|
|
52
|
-
import"./cli-
|
|
53
|
+
import"./cli-xb7kyanp.js";
|
|
54
|
+
import"./cli-1wd1n2ya.js";
|
|
53
55
|
import {
|
|
54
56
|
cancelTask,
|
|
55
57
|
getAgentById,
|
|
@@ -58,27 +60,28 @@ import {
|
|
|
58
60
|
init_context_key,
|
|
59
61
|
init_db,
|
|
60
62
|
slackContextKey
|
|
61
|
-
} from "./cli-
|
|
62
|
-
import"./cli-
|
|
63
|
+
} from "./cli-0wn3ypqv.js";
|
|
64
|
+
import"./cli-v0e7jpr5.js";
|
|
63
65
|
import"./cli-3qhyh31j.js";
|
|
64
|
-
import"./cli-
|
|
66
|
+
import"./cli-vbr859rz.js";
|
|
65
67
|
import"./cli-n7h1kqpf.js";
|
|
66
|
-
import"./cli-
|
|
67
|
-
import"./cli-
|
|
68
|
+
import"./cli-7mm2r1kp.js";
|
|
69
|
+
import"./cli-g5erf0zt.js";
|
|
70
|
+
import"./cli-yj790e19.js";
|
|
68
71
|
import"./cli-ywybs5as.js";
|
|
69
72
|
import"./cli-gd4favx9.js";
|
|
70
|
-
import"./cli-
|
|
71
|
-
import"./cli-
|
|
73
|
+
import"./cli-agamgm0p.js";
|
|
74
|
+
import"./cli-5c2j5yvx.js";
|
|
72
75
|
import"./cli-1a2j50m0.js";
|
|
73
76
|
import"./cli-f9w1semm.js";
|
|
74
77
|
import"./cli-ej6gbxfb.js";
|
|
75
|
-
import"./cli-
|
|
78
|
+
import"./cli-g3qgrzck.js";
|
|
76
79
|
import"./cli-sd0mxa3c.js";
|
|
77
80
|
import"./cli-w5e1d1vv.js";
|
|
78
|
-
import"./cli-
|
|
79
|
-
import"./cli-
|
|
80
|
-
import"./cli-f7kvq46p.js";
|
|
81
|
+
import"./cli-1d3w4xm3.js";
|
|
82
|
+
import"./cli-xxz89c2n.js";
|
|
81
83
|
import"./cli-zf8jjwex.js";
|
|
84
|
+
import"./cli-qt5wzq6v.js";
|
|
82
85
|
import"./cli-bc05qbss.js";
|
|
83
86
|
|
|
84
87
|
// src/slack/actions.ts
|
|
@@ -150,6 +153,7 @@ function registerActionHandlers(app) {
|
|
|
150
153
|
routingSource: lead ? "engine_default" : undefined,
|
|
151
154
|
source: "slack",
|
|
152
155
|
parentTaskId: taskId,
|
|
156
|
+
inheritParentOutputSchema: false,
|
|
153
157
|
slackChannelId: originalTask.slackChannelId,
|
|
154
158
|
slackThreadTs: originalTask.slackThreadTs,
|
|
155
159
|
slackUserId: body.user.id,
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AMP_PACKAGE,
|
|
3
|
+
AmpAdapter,
|
|
4
|
+
buildAmpPlugin,
|
|
5
|
+
checkAmpCredentials,
|
|
6
|
+
liveTestAmpCredentials,
|
|
7
|
+
parseAmpThreadCost,
|
|
8
|
+
parseAmpThreadUsage,
|
|
9
|
+
resolveAmpBinary
|
|
10
|
+
} from "./cli-v90vfwyb.js";
|
|
11
|
+
import"./cli-ptcz1cqy.js";
|
|
12
|
+
import"./cli-6behs2bt.js";
|
|
13
|
+
import"./cli-cn53e7vc.js";
|
|
14
|
+
import"./cli-07s39g1n.js";
|
|
15
|
+
import"./cli-re8z5p8p.js";
|
|
16
|
+
import"./cli-zt3w1cn1.js";
|
|
17
|
+
import"./cli-v0e7jpr5.js";
|
|
18
|
+
import"./cli-gd4favx9.js";
|
|
19
|
+
import"./cli-ej6gbxfb.js";
|
|
20
|
+
import"./cli-g3qgrzck.js";
|
|
21
|
+
import"./cli-sd0mxa3c.js";
|
|
22
|
+
import"./cli-w5e1d1vv.js";
|
|
23
|
+
import"./cli-qt5wzq6v.js";
|
|
24
|
+
import"./cli-bc05qbss.js";
|
|
25
|
+
export {
|
|
26
|
+
AMP_PACKAGE,
|
|
27
|
+
AmpAdapter,
|
|
28
|
+
buildAmpPlugin,
|
|
29
|
+
checkAmpCredentials,
|
|
30
|
+
liveTestAmpCredentials,
|
|
31
|
+
parseAmpThreadCost,
|
|
32
|
+
parseAmpThreadUsage,
|
|
33
|
+
resolveAmpBinary
|
|
34
|
+
};
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
ANTHROPIC_ORGANIZATION_ID_ENV,
|
|
18
18
|
ANTHROPIC_SERVICE_ACCOUNT_ID_ENV,
|
|
19
19
|
ANTHROPIC_WORKSPACE_ID_ENV
|
|
20
|
-
} from "./cli-
|
|
20
|
+
} from "./cli-zxg80zs9.js";
|
|
21
21
|
import"./cli-51tf7ac3.js";
|
|
22
22
|
import {
|
|
23
23
|
adjustMaxTokensForThinking,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
getJsonSchemaToolParameters,
|
|
27
27
|
resolveJsonSchemaStrictSampling,
|
|
28
28
|
transformMessages
|
|
29
|
-
} from "./cli-
|
|
29
|
+
} from "./cli-8kt0bmgx.js";
|
|
30
30
|
import {
|
|
31
31
|
sanitizeSurrogates
|
|
32
32
|
} from "./cli-y2apkfe2.js";
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
getSystemMessageText,
|
|
41
41
|
renderSystemMessageUpdate,
|
|
42
42
|
resolveTranscript
|
|
43
|
-
} from "./cli-
|
|
43
|
+
} from "./cli-nexwh8zg.js";
|
|
44
44
|
import {
|
|
45
45
|
getProviderEnvValue
|
|
46
46
|
} from "./cli-btbzvq95.js";
|
|
@@ -3,33 +3,34 @@ import {
|
|
|
3
3
|
initSlackApp,
|
|
4
4
|
startSlackApp,
|
|
5
5
|
stopSlackApp
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-4drstbb9.js";
|
|
7
7
|
import"./cli-q51yprfq.js";
|
|
8
8
|
import"./cli-3er6gcsn.js";
|
|
9
9
|
import"./cli-cvk6yzw5.js";
|
|
10
10
|
import"./cli-yatxqynm.js";
|
|
11
11
|
import"./cli-bd957dgb.js";
|
|
12
12
|
import"./cli-pzxba7gw.js";
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
13
|
+
import"./cli-0wn3ypqv.js";
|
|
14
|
+
import"./cli-v0e7jpr5.js";
|
|
15
15
|
import"./cli-3qhyh31j.js";
|
|
16
|
-
import"./cli-
|
|
16
|
+
import"./cli-vbr859rz.js";
|
|
17
17
|
import"./cli-n7h1kqpf.js";
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
18
|
+
import"./cli-7mm2r1kp.js";
|
|
19
|
+
import"./cli-g5erf0zt.js";
|
|
20
|
+
import"./cli-yj790e19.js";
|
|
20
21
|
import"./cli-ywybs5as.js";
|
|
21
22
|
import"./cli-gd4favx9.js";
|
|
22
|
-
import"./cli-
|
|
23
|
-
import"./cli-
|
|
23
|
+
import"./cli-agamgm0p.js";
|
|
24
|
+
import"./cli-5c2j5yvx.js";
|
|
24
25
|
import"./cli-1a2j50m0.js";
|
|
25
26
|
import"./cli-f9w1semm.js";
|
|
26
27
|
import"./cli-ej6gbxfb.js";
|
|
27
|
-
import"./cli-
|
|
28
|
+
import"./cli-g3qgrzck.js";
|
|
28
29
|
import"./cli-sd0mxa3c.js";
|
|
29
30
|
import"./cli-w5e1d1vv.js";
|
|
30
|
-
import"./cli-
|
|
31
|
-
import"./cli-nexqx4ve.js";
|
|
31
|
+
import"./cli-1d3w4xm3.js";
|
|
32
32
|
import"./cli-zf8jjwex.js";
|
|
33
|
+
import"./cli-qt5wzq6v.js";
|
|
33
34
|
import"./cli-bc05qbss.js";
|
|
34
35
|
export {
|
|
35
36
|
getSlackApp,
|
|
@@ -2,63 +2,65 @@ import {
|
|
|
2
2
|
bufferThreadMessage,
|
|
3
3
|
getBufferMessageCount,
|
|
4
4
|
wasEventSeen
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-xfb7333f.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveSlackUserId,
|
|
8
8
|
rewriteSlackMentions
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-4cn19jvn.js";
|
|
10
10
|
import {
|
|
11
11
|
buildEffectiveText,
|
|
12
12
|
createSlackTaskWithFiles,
|
|
13
13
|
fetchSlackFiles,
|
|
14
14
|
hasOtherUserMention,
|
|
15
15
|
notifySlackFileFailures
|
|
16
|
-
} from "./cli-
|
|
17
|
-
import"./cli-
|
|
16
|
+
} from "./cli-a9bw0xxt.js";
|
|
17
|
+
import"./cli-003785v9.js";
|
|
18
|
+
import"./cli-07s39g1n.js";
|
|
18
19
|
import"./cli-w0bwte75.js";
|
|
19
20
|
import"./cli-re8z5p8p.js";
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
23
|
-
import"./cli-
|
|
21
|
+
import"./cli-etbrt8x1.js";
|
|
22
|
+
import"./cli-976r1zqx.js";
|
|
23
|
+
import"./cli-wg8yjqtw.js";
|
|
24
|
+
import"./cli-j0tmc908.js";
|
|
24
25
|
import"./cli-epan13p1.js";
|
|
25
26
|
import"./cli-f14fvzag.js";
|
|
26
|
-
import"./cli-
|
|
27
|
-
import"./cli-
|
|
28
|
-
import"./cli-
|
|
27
|
+
import"./cli-zt3w1cn1.js";
|
|
28
|
+
import"./cli-1wetf34q.js";
|
|
29
|
+
import"./cli-2c8eky5y.js";
|
|
29
30
|
import"./cli-3dpj7atn.js";
|
|
30
31
|
import"./cli-2x0e561b.js";
|
|
31
|
-
import"./cli-
|
|
32
|
+
import"./cli-pkke6geq.js";
|
|
32
33
|
import"./cli-rb9m6rpe.js";
|
|
33
34
|
import"./cli-mzfth0bp.js";
|
|
34
|
-
import"./cli-
|
|
35
|
-
import"./cli-
|
|
36
|
-
import"./cli-
|
|
37
|
-
import"./cli-
|
|
35
|
+
import"./cli-0a7r5331.js";
|
|
36
|
+
import"./cli-v7fqehqd.js";
|
|
37
|
+
import"./cli-agjzafns.js";
|
|
38
|
+
import"./cli-93rxw9yd.js";
|
|
38
39
|
import"./cli-fad8m16k.js";
|
|
39
40
|
import"./cli-bsakbbkm.js";
|
|
40
|
-
import"./cli-
|
|
41
|
+
import"./cli-zxg80zs9.js";
|
|
41
42
|
import"./cli-51tf7ac3.js";
|
|
43
|
+
import"./cli-ydt3zkwv.js";
|
|
42
44
|
import {
|
|
43
45
|
ackSlackMessage,
|
|
44
46
|
ensureSlackThreadTree,
|
|
45
47
|
isSlackRenderV2Enabled,
|
|
46
48
|
markSlackSessionProcessing,
|
|
47
49
|
require_dist
|
|
48
|
-
} from "./cli-
|
|
50
|
+
} from "./cli-4drstbb9.js";
|
|
49
51
|
import"./cli-q51yprfq.js";
|
|
50
52
|
import"./cli-3er6gcsn.js";
|
|
51
53
|
import"./cli-cvk6yzw5.js";
|
|
52
54
|
import"./cli-yatxqynm.js";
|
|
53
|
-
import"./cli-
|
|
54
|
-
import"./cli-
|
|
55
|
+
import"./cli-b0f70z24.js";
|
|
56
|
+
import"./cli-nexwh8zg.js";
|
|
55
57
|
import"./cli-btbzvq95.js";
|
|
56
58
|
import"./cli-1m2e086m.js";
|
|
57
59
|
import"./cli-bzr0ftht.js";
|
|
58
60
|
import"./cli-bd957dgb.js";
|
|
59
61
|
import"./cli-pzxba7gw.js";
|
|
60
|
-
import"./cli-
|
|
61
|
-
import"./cli-
|
|
62
|
+
import"./cli-xb7kyanp.js";
|
|
63
|
+
import"./cli-1wd1n2ya.js";
|
|
62
64
|
import {
|
|
63
65
|
getAgentWorkingOnThread,
|
|
64
66
|
getLeadAgent,
|
|
@@ -67,33 +69,34 @@ import {
|
|
|
67
69
|
init_db,
|
|
68
70
|
reactionName,
|
|
69
71
|
slackContextKey
|
|
70
|
-
} from "./cli-
|
|
71
|
-
import"./cli-
|
|
72
|
+
} from "./cli-0wn3ypqv.js";
|
|
73
|
+
import"./cli-v0e7jpr5.js";
|
|
72
74
|
import"./cli-3qhyh31j.js";
|
|
73
|
-
import"./cli-
|
|
75
|
+
import"./cli-vbr859rz.js";
|
|
74
76
|
import"./cli-n7h1kqpf.js";
|
|
75
|
-
import"./cli-
|
|
76
|
-
import"./cli-
|
|
77
|
+
import"./cli-7mm2r1kp.js";
|
|
78
|
+
import"./cli-g5erf0zt.js";
|
|
79
|
+
import"./cli-yj790e19.js";
|
|
77
80
|
import"./cli-ywybs5as.js";
|
|
78
81
|
import"./cli-gd4favx9.js";
|
|
79
|
-
import"./cli-
|
|
82
|
+
import"./cli-agamgm0p.js";
|
|
80
83
|
import {
|
|
81
84
|
init_resolver,
|
|
82
85
|
resolveTemplate
|
|
83
|
-
} from "./cli-
|
|
86
|
+
} from "./cli-5c2j5yvx.js";
|
|
84
87
|
import"./cli-1a2j50m0.js";
|
|
85
88
|
import"./cli-f9w1semm.js";
|
|
86
89
|
import {
|
|
87
90
|
init_env_flag,
|
|
88
91
|
isEnvFlagEnabled
|
|
89
92
|
} from "./cli-ej6gbxfb.js";
|
|
90
|
-
import"./cli-
|
|
93
|
+
import"./cli-g3qgrzck.js";
|
|
91
94
|
import"./cli-sd0mxa3c.js";
|
|
92
95
|
import"./cli-w5e1d1vv.js";
|
|
93
|
-
import"./cli-
|
|
94
|
-
import"./cli-
|
|
95
|
-
import"./cli-f7kvq46p.js";
|
|
96
|
+
import"./cli-1d3w4xm3.js";
|
|
97
|
+
import"./cli-xxz89c2n.js";
|
|
96
98
|
import"./cli-zf8jjwex.js";
|
|
99
|
+
import"./cli-qt5wzq6v.js";
|
|
97
100
|
import {
|
|
98
101
|
__callDispose,
|
|
99
102
|
__toESM,
|
|
@@ -210,6 +213,7 @@ function createAssistant() {
|
|
|
210
213
|
slackTriggerMessageTs: message.ts,
|
|
211
214
|
slackUserId: userId,
|
|
212
215
|
parentTaskId: latestTask?.id,
|
|
216
|
+
inheritParentOutputSchema: false,
|
|
213
217
|
requestedByUserId,
|
|
214
218
|
contextKey: slackContextKey({ channelId, threadTs })
|
|
215
219
|
}, inbound);
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
convertResponsesMessages,
|
|
3
3
|
convertResponsesTools,
|
|
4
4
|
processResponsesStream
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-fj86xr3c.js";
|
|
6
6
|
import {
|
|
7
7
|
clampOpenAIPromptCacheKey
|
|
8
8
|
} from "./cli-mrptpp86.js";
|
|
@@ -16,6 +16,10 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
retryProviderRequest
|
|
18
18
|
} from "./cli-qbksc292.js";
|
|
19
|
+
import {
|
|
20
|
+
resolveAzureConfig,
|
|
21
|
+
resolveDeploymentName
|
|
22
|
+
} from "./cli-ydt3zkwv.js";
|
|
19
23
|
import {
|
|
20
24
|
formatProviderError,
|
|
21
25
|
normalizeProviderError
|
|
@@ -24,7 +28,7 @@ import {
|
|
|
24
28
|
buildBaseOptions,
|
|
25
29
|
createGrammarToolInputProperties,
|
|
26
30
|
resolveSamplingParams
|
|
27
|
-
} from "./cli-
|
|
31
|
+
} from "./cli-8kt0bmgx.js";
|
|
28
32
|
import"./cli-y2apkfe2.js";
|
|
29
33
|
import {
|
|
30
34
|
headersToRecord
|
|
@@ -34,10 +38,8 @@ import {
|
|
|
34
38
|
getDeclaredTools,
|
|
35
39
|
resolveTranscript,
|
|
36
40
|
resolveTranscriptTools
|
|
37
|
-
} from "./cli-
|
|
38
|
-
import
|
|
39
|
-
getProviderEnvValue
|
|
40
|
-
} from "./cli-btbzvq95.js";
|
|
41
|
+
} from "./cli-nexwh8zg.js";
|
|
42
|
+
import"./cli-btbzvq95.js";
|
|
41
43
|
import"./cli-1m2e086m.js";
|
|
42
44
|
import {
|
|
43
45
|
AssistantMessageEventStream
|
|
@@ -45,31 +47,8 @@ import {
|
|
|
45
47
|
import"./cli-bc05qbss.js";
|
|
46
48
|
|
|
47
49
|
// node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js
|
|
48
|
-
var
|
|
49
|
-
var AZURE_TOOL_CALL_PROVIDERS = new Set(["openai", "openai-codex", "opencode", "azure-openai-responses"]);
|
|
50
|
+
var AZURE_TOOL_CALL_PROVIDERS = new Set(["openai", "openai-codex", "opencode", "azure"]);
|
|
50
51
|
var OPENAI_RESPONSES_MIN_OUTPUT_TOKENS = 16;
|
|
51
|
-
function parseDeploymentNameMap(value) {
|
|
52
|
-
const map = new Map;
|
|
53
|
-
if (!value)
|
|
54
|
-
return map;
|
|
55
|
-
for (const entry of value.split(",")) {
|
|
56
|
-
const trimmed = entry.trim();
|
|
57
|
-
if (!trimmed)
|
|
58
|
-
continue;
|
|
59
|
-
const [modelId, deploymentName] = trimmed.split("=", 2);
|
|
60
|
-
if (!modelId || !deploymentName)
|
|
61
|
-
continue;
|
|
62
|
-
map.set(modelId.trim(), deploymentName.trim());
|
|
63
|
-
}
|
|
64
|
-
return map;
|
|
65
|
-
}
|
|
66
|
-
function resolveDeploymentName(model, options) {
|
|
67
|
-
if (options?.azureDeploymentName) {
|
|
68
|
-
return options.azureDeploymentName;
|
|
69
|
-
}
|
|
70
|
-
const mappedDeployment = parseDeploymentNameMap(getProviderEnvValue("AZURE_OPENAI_DEPLOYMENT_NAME_MAP", options?.env)).get(model.id);
|
|
71
|
-
return mappedDeployment || model.id;
|
|
72
|
-
}
|
|
73
52
|
function formatAzureOpenAIError(error) {
|
|
74
53
|
return formatProviderError(normalizeProviderError(error), "Azure OpenAI API error");
|
|
75
54
|
}
|
|
@@ -164,44 +143,6 @@ var streamSimple = (model, context, options) => {
|
|
|
164
143
|
reasoningEffort
|
|
165
144
|
});
|
|
166
145
|
};
|
|
167
|
-
function normalizeAzureBaseUrl(baseUrl) {
|
|
168
|
-
const trimmed = baseUrl.trim().replace(/\/+$/, "");
|
|
169
|
-
let url;
|
|
170
|
-
try {
|
|
171
|
-
url = new URL(trimmed);
|
|
172
|
-
} catch {
|
|
173
|
-
throw new Error(`Invalid Azure OpenAI base URL: ${baseUrl}`);
|
|
174
|
-
}
|
|
175
|
-
const isAzureHost = url.hostname.endsWith(".openai.azure.com") || url.hostname.endsWith(".cognitiveservices.azure.com") || url.hostname.endsWith(".ai.azure.com");
|
|
176
|
-
const normalizedPath = url.pathname.replace(/\/+$/, "");
|
|
177
|
-
if (isAzureHost && (normalizedPath === "" || normalizedPath === "/" || normalizedPath === "/openai" || normalizedPath === "/openai/v1/responses")) {
|
|
178
|
-
url.pathname = "/openai/v1";
|
|
179
|
-
url.search = "";
|
|
180
|
-
}
|
|
181
|
-
return url.toString().replace(/\/+$/, "");
|
|
182
|
-
}
|
|
183
|
-
function buildDefaultBaseUrl(resourceName) {
|
|
184
|
-
return `https://${resourceName}.openai.azure.com/openai/v1`;
|
|
185
|
-
}
|
|
186
|
-
function resolveAzureConfig(model, options) {
|
|
187
|
-
const apiVersion = options?.azureApiVersion || getProviderEnvValue("AZURE_OPENAI_API_VERSION", options?.env) || DEFAULT_AZURE_API_VERSION;
|
|
188
|
-
const baseUrl = options?.azureBaseUrl?.trim() || getProviderEnvValue("AZURE_OPENAI_BASE_URL", options?.env)?.trim() || undefined;
|
|
189
|
-
const resourceName = options?.azureResourceName || getProviderEnvValue("AZURE_OPENAI_RESOURCE_NAME", options?.env);
|
|
190
|
-
let resolvedBaseUrl = baseUrl;
|
|
191
|
-
if (!resolvedBaseUrl && resourceName) {
|
|
192
|
-
resolvedBaseUrl = buildDefaultBaseUrl(resourceName);
|
|
193
|
-
}
|
|
194
|
-
if (!resolvedBaseUrl && model.baseUrl) {
|
|
195
|
-
resolvedBaseUrl = model.baseUrl;
|
|
196
|
-
}
|
|
197
|
-
if (!resolvedBaseUrl) {
|
|
198
|
-
throw new Error("Azure OpenAI base URL is required. Set AZURE_OPENAI_BASE_URL or AZURE_OPENAI_RESOURCE_NAME, or pass azureBaseUrl, azureResourceName, or model.baseUrl.");
|
|
199
|
-
}
|
|
200
|
-
return {
|
|
201
|
-
baseUrl: normalizeAzureBaseUrl(resolvedBaseUrl),
|
|
202
|
-
apiVersion
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
146
|
function createClient(model, apiKey, options) {
|
|
206
147
|
const headers = { "User-Agent": getPiUserAgent(), ...model.headers };
|
|
207
148
|
if (options?.headers) {
|
|
@@ -3,32 +3,33 @@ import {
|
|
|
3
3
|
getEmbeddingProvider,
|
|
4
4
|
getMemoryStore,
|
|
5
5
|
init_constants
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
6
|
+
} from "./cli-v7fqehqd.js";
|
|
7
|
+
import"./cli-agjzafns.js";
|
|
8
8
|
import"./cli-cvk6yzw5.js";
|
|
9
9
|
import {
|
|
10
10
|
getDbClient,
|
|
11
11
|
init_db
|
|
12
|
-
} from "./cli-
|
|
13
|
-
import"./cli-
|
|
12
|
+
} from "./cli-0wn3ypqv.js";
|
|
13
|
+
import"./cli-v0e7jpr5.js";
|
|
14
14
|
import"./cli-3qhyh31j.js";
|
|
15
|
-
import"./cli-
|
|
15
|
+
import"./cli-vbr859rz.js";
|
|
16
16
|
import"./cli-n7h1kqpf.js";
|
|
17
|
-
import"./cli-
|
|
18
|
-
import"./cli-
|
|
17
|
+
import"./cli-7mm2r1kp.js";
|
|
18
|
+
import"./cli-g5erf0zt.js";
|
|
19
|
+
import"./cli-yj790e19.js";
|
|
19
20
|
import"./cli-ywybs5as.js";
|
|
20
21
|
import"./cli-gd4favx9.js";
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
22
|
+
import"./cli-agamgm0p.js";
|
|
23
|
+
import"./cli-5c2j5yvx.js";
|
|
23
24
|
import"./cli-1a2j50m0.js";
|
|
24
25
|
import"./cli-f9w1semm.js";
|
|
25
26
|
import"./cli-ej6gbxfb.js";
|
|
26
|
-
import"./cli-
|
|
27
|
+
import"./cli-g3qgrzck.js";
|
|
27
28
|
import"./cli-sd0mxa3c.js";
|
|
28
29
|
import"./cli-w5e1d1vv.js";
|
|
29
|
-
import"./cli-
|
|
30
|
-
import"./cli-nexqx4ve.js";
|
|
30
|
+
import"./cli-1d3w4xm3.js";
|
|
31
31
|
import"./cli-zf8jjwex.js";
|
|
32
|
+
import"./cli-qt5wzq6v.js";
|
|
32
33
|
import"./cli-bc05qbss.js";
|
|
33
34
|
|
|
34
35
|
// src/be/memory/boot-reembed.ts
|