@desplega.ai/agent-swarm 1.152.2 → 1.154.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/README.md +2 -2
- package/dist/{acp-adapter-pfeje2v5.js → acp-adapter-eb2aj8xy.js} +4 -4
- package/dist/{actions-0sttc7f5.js → actions-kpnwp1kz.js} +31 -27
- package/dist/{anthropic-messages-2y8nktar.js → anthropic-messages-9vqsbznt.js} +112 -84
- package/dist/{app-p8teva95.js → app-zk1apkf6.js} +10 -7
- package/dist/{assistant-r45jnsrt.js → assistant-kwq4y50q.js} +32 -28
- package/dist/{azure-openai-responses-f38x2avq.js → azure-openai-responses-04qwdwfq.js} +27 -13
- package/dist/{boot-reembed-je26h5y7.js → boot-reembed-22hd3jjn.js} +9 -7
- package/dist/{boot-reembed-1qmybsd4.js → boot-reembed-qe168424.js} +10 -8
- package/dist/{boot-scrub-logs-gte3h1mm.js → boot-scrub-logs-pkdpsrjd.js} +7 -5
- package/dist/{claude-adapter-csc1mzka.js → claude-adapter-3fx90nww.js} +18 -16
- package/dist/{claude-managed-adapter-dsmkcrjy.js → claude-managed-adapter-ea2aga6w.js} +3 -3
- package/dist/{claude-sdk-session-fcd6f078.js → claude-sdk-session-z7fahf1k.js} +18 -16
- package/dist/{cli-r2fpe7cx.js → cli-00w2c66p.js} +61 -55
- package/dist/{cli-wbyk465z.js → cli-09y3tjxz.js} +1 -1
- package/dist/{cli-ht5rs63n.js → cli-0e31nm4n.js} +16 -7
- package/dist/cli-0x5qzvkg.js +4279 -0
- package/dist/{cli-d3p82erb.js → cli-18amys3y.js} +9 -9
- package/dist/{cli-4ahpr4sw.js → cli-1jpjafw4.js} +5 -5
- package/dist/{cli-jbmc0r7r.js → cli-243tzws8.js} +1 -1
- package/dist/{cli-ch38q5z4.js → cli-24k806sc.js} +6789 -2542
- package/dist/cli-3bkz2p7j.js +2828 -0
- package/dist/cli-3er6gcsn.js +1849 -0
- package/dist/cli-4k7jazkq.js +3339 -0
- package/dist/{cli-c4eeb5q2.js → cli-5b6b62tz.js} +1 -1
- package/dist/{cli-qd65dvr6.js → cli-5vs0nh43.js} +65 -44
- package/dist/{cli-z3wkng35.js → cli-6r3cgpk2.js} +224 -156
- package/dist/{cli-pgj4a5fb.js → cli-71cj99hx.js} +4 -3
- package/dist/cli-8sea27q4.js +14075 -0
- package/dist/{cli-jvy9qgjs.js → cli-913yakhv.js} +22 -7
- package/dist/{cli-pf9q3696.js → cli-927erqqt.js} +5 -2
- package/dist/cli-95jnpnqg.js +230 -0
- package/dist/{cli-wpv5rgg2.js → cli-abp3g4ax.js} +15 -2
- package/dist/{cli-ckz5t2hb.js → cli-acy6bfhr.js} +10 -7
- package/dist/{cli-4yc5d8fk.js → cli-avkd6mqv.js} +50 -0
- package/dist/{cli-8wrympd7.js → cli-bzr0ftht.js} +26 -7
- package/dist/{cli-qn042eh7.js → cli-c1v10xb2.js} +194 -1913
- package/dist/cli-cgj4hc12.js +18902 -0
- package/dist/{cli-2nnd56zt.js → cli-e0pg4zeh.js} +3 -2
- package/dist/{cli-r84ctdxn.js → cli-e31ehqwy.js} +2 -2
- package/dist/{cli-gphgnvpf.js → cli-e3229na9.js} +3 -3
- package/dist/{cli-gpqcs935.js → cli-e3cyf59d.js} +2 -2
- package/dist/{cli-s25avqg9.js → cli-e781c6f9.js} +1 -0
- package/dist/{cli-s2qjdd6z.js → cli-eetrvv91.js} +1 -1
- package/dist/{cli-j4nv2wqy.js → cli-fdzg6jhf.js} +10 -4
- package/dist/{cli-fm4ytsdk.js → cli-g2h29qar.js} +2 -2
- package/dist/{cli-zvgj5zg8.js → cli-ge67p080.js} +302 -3497
- package/dist/cli-h38x0qhg.js +6912 -0
- package/dist/{cli-9xvdm3bx.js → cli-h60qfasa.js} +742 -278
- package/dist/{cli-jew3jda5.js → cli-hws0vn86.js} +2 -2
- package/dist/{cli-j8dggbcr.js → cli-k0g1sjzm.js} +23 -31
- package/dist/{cli-xw7vak96.js → cli-kp3qs53m.js} +5 -5
- package/dist/{cli-rgvp6r2x.js → cli-mcnhgnn1.js} +193 -4
- package/dist/{cli-zvkq5csn.js → cli-myaxtgh8.js} +7 -6
- package/dist/{cli-56h18ng2.js → cli-n62atwh9.js} +1 -1
- package/dist/cli-n7h1kqpf.js +29 -0
- package/dist/{cli-fmy65jdn.js → cli-pf1v8xhb.js} +7 -5
- package/dist/{cli-xy1cchaf.js → cli-q85qhckh.js} +238 -11
- package/dist/{cli-3bpzj8me.js → cli-r1d3dzt6.js} +2 -2
- package/dist/{pi-mono-adapter-jcqt71cg.js → cli-rxkqvngf.js} +67343 -101083
- package/dist/{cli-kj76p1ez.js → cli-scwq51gn.js} +13 -7
- package/dist/{cli-b9dd0h3k.js → cli-stwsmd6k.js} +3 -2
- package/dist/{cli-c2mk1kgf.js → cli-v4en75c5.js} +8 -1
- package/dist/{cli-z61ykvam.js → cli-wg04s9kr.js} +4 -3
- package/dist/cli-yn0a417a.js +4069 -0
- package/dist/{cli-zfzznn7c.js → cli-ytxs7mn1.js} +26 -2
- package/dist/{cli-4j8k1m4w.js → cli-zt1227k1.js} +1162 -192
- package/dist/cli.js +28 -35
- package/dist/{codex-adapter-fxmpsabw.js → codex-adapter-ttdm995v.js} +12 -11
- package/dist/{codex-hook-8jexc34x.js → codex-hook-8gx7bcz0.js} +3 -3
- package/dist/{codex-session-runner-rr1e47ea.js → codex-session-runner-3v8nh4c8.js} +12 -11
- package/dist/{commands-0f5rxz51.js → commands-1cxwbhhq.js} +7 -5
- package/dist/{db-r3jxf3wy.js → db-y9zwsr79.js} +25 -5
- package/dist/{dispatcher-06vph6q4.js → dispatcher-9m9zss36.js} +30 -26
- package/dist/dsh-adapter-gsb2qqf9.js +19 -0
- package/dist/{e2b-413b8t4v.js → e2b-93x1k0j5.js} +6 -7
- package/dist/{google-generative-ai-ndjmj5fa.js → google-generative-ai-gwwrnzqn.js} +33 -73
- package/dist/{google-vertex-fr665tqs.js → google-vertex-5wfawpwz.js} +38 -68
- package/dist/{handlers-0hgtc910.js → handlers-36fm1bwn.js} +33 -29
- package/dist/{hook-9kvrv1er.js → hook-pntw4r8h.js} +12 -10
- package/dist/{hook-fbfhkat3.js → hook-vwq8y26p.js} +13 -11
- package/dist/{http-xbyx8k5j.js → http-20jesakk.js} +357 -261
- package/dist/{index-jsw3aynb.js → index-6artrehg.js} +30 -26
- package/dist/{cli-pdz9qde4.js → index-9ch1n761.js} +10 -11
- package/dist/{index-rnyahfn5.js → index-9n5z2492.js} +30 -26
- package/dist/{index-66xz5e9j.js → index-h5gs261z.js} +521 -9
- package/dist/{index-tfsdxyv6.js → index-j5wrf1yw.js} +40 -25
- package/dist/{index-2sp0384z.js → index-kkeftv5h.js} +738 -21
- package/dist/{index-sgk50mbg.js → index-m2xqpz5r.js} +31 -27
- package/dist/{index-gpfn1741.js → index-m9ks8a7t.js} +9 -7
- package/dist/index-w097eg0x.js +5 -0
- package/dist/jiti-loader-b4837mtm.js +34 -0
- package/dist/jiti-static-loader-q2g5ds0y.js +31267 -0
- package/dist/{keepalive-s3xpr7sw.js → keepalive-pwxvxd2c.js} +9 -7
- package/dist/{lead-rq4n5r16.js → lead-m789wqa3.js} +46 -41
- package/dist/{maintenance-f0atj1ab.js → maintenance-bvg6w7e2.js} +10 -8
- package/dist/{mistral-conversations-qhr84ph3.js → mistral-conversations-zx0kn554.js} +24 -18
- package/dist/{node-x1g4v0pq.js → node-5qtycf6a.js} +16 -11
- package/dist/{oauth-refresh-sweep-q0t3bxre.js → oauth-refresh-sweep-6v4bd737.js} +8 -6
- package/dist/{onboard-br5j1kch.js → onboard-snckpcj1.js} +115 -35
- package/dist/{openai-codex-responses-wy6a43wd.js → openai-codex-responses-4vjqzvjp.js} +33 -27
- package/dist/{openai-completions-32rdwmze.js → openai-completions-pxsmym7g.js} +52 -64
- package/dist/{openai-responses-6xwf7bzg.js → openai-responses-tmn0rqp0.js} +23 -24
- package/dist/{opencode-adapter-28axqa09.js → opencode-adapter-qbmv4tpy.js} +6 -6
- package/dist/{otel-impl-vdqge2nt.js → otel-impl-e0ytens5.js} +4 -4
- package/dist/{pi-messages-b1mbr6gp.js → pi-messages-txpjj39q.js} +3 -3
- package/dist/pi-mono-adapter-c4ggemhz.js +1316 -0
- package/dist/{pricing-refresh-hb3691fd.js → pricing-refresh-52g2ywrw.js} +9 -7
- package/dist/{rbac-roles-t78xt39b.js → rbac-roles-5455kfdn.js} +8 -6
- package/dist/{rbac-roles-jh280k9g.js → rbac-roles-hbf0xa52.js} +9 -7
- package/dist/{render-v2-7p8r2ymg.js → render-v2-npm8xdzh.js} +16 -9
- package/dist/{seed-pricing-hf889enh.js → seed-pricing-650wbr1n.js} +8 -6
- package/dist/{setup-w6mb03jv.js → setup-k1mew5rf.js} +4 -5
- package/dist/virtual-modules-2q5b2pk4.js +54 -0
- package/dist/{work-objects-nt8gy1kj.js → work-objects-2ea3kvwg.js} +33 -29
- package/dist/{worker-dwy617t0.js → worker-ec6hvc4m.js} +46 -41
- package/openapi.json +109 -16
- package/package.json +7 -6
- package/plugin/opencode-plugins/lib/memory-raters.ts +7 -0
- package/src/be/automation-preflight.ts +6 -4
- package/src/be/db/agents.ts +75 -2
- package/src/be/db/tasks/read.ts +2 -0
- package/src/be/db/tasks/write.ts +7 -1
- package/src/be/db.ts +140 -18
- package/src/be/extensions/db.ts +35 -4
- package/src/be/memory/raters/llm.ts +2 -6
- package/src/be/memory/raters/noop.ts +2 -3
- package/src/be/memory/raters/registry.ts +4 -10
- package/src/be/migrations/157_defer_provenance_and_marker.sql +27 -0
- package/src/be/models-catalog.ts +2 -0
- package/src/be/modelsdev-cache.json +213 -0
- package/src/be/rbac-audit.ts +2 -0
- package/src/be/seed/agent-fs-provision.ts +23 -0
- package/src/be/seed-pricing.ts +3 -1
- package/src/be/swarm-config-guard.ts +1 -0
- package/src/commands/onboard/compose-generator.ts +16 -1
- package/src/commands/onboard/env-generator.ts +14 -1
- package/src/commands/onboard/manifest.ts +1 -0
- package/src/commands/onboard/steps/integration-slack.tsx +56 -16
- package/src/commands/onboard/steps/review.tsx +5 -0
- package/src/commands/onboard/types.ts +6 -0
- package/src/commands/onboard.tsx +5 -1
- package/src/commands/provider-credentials.ts +14 -2
- package/src/commands/runner.ts +18 -2
- package/src/extensions/identity.ts +15 -7
- package/src/extensions/lifecycle.ts +15 -21
- package/src/hooks/codex-hook.ts +7 -1
- package/src/http/agents.ts +12 -4
- package/src/http/config.ts +1 -1
- package/src/http/core.ts +5 -3
- package/src/http/extensions.ts +108 -34
- package/src/http/poll.ts +7 -0
- package/src/http/schedules.ts +10 -0
- package/src/http/script-runs.ts +35 -26
- package/src/http/status.ts +24 -11
- package/src/http/tasks.ts +6 -1
- package/src/prompts/base-prompt.ts +15 -7
- package/src/prompts/memories.ts +5 -7
- package/src/prompts/session-templates.ts +3 -2
- package/src/prompts/steering-delivery.ts +2 -0
- package/src/providers/claude-managed-models.ts +8 -0
- package/src/providers/codex-adapter.ts +3 -6
- package/src/providers/codex-models.ts +15 -1
- package/src/providers/dsh-adapter.ts +248 -0
- package/src/providers/index.ts +5 -1
- package/src/providers/modelsdev-reasoning.json +50 -0
- package/src/providers/pi-mono-extension.ts +2 -5
- package/src/rbac/legacy-policy.ts +15 -1
- package/src/rbac/types.ts +2 -0
- package/src/server.ts +7 -1
- package/src/slack/ack.ts +43 -8
- package/src/slack/app.ts +32 -10
- package/src/slack/config.ts +29 -0
- package/src/slack/handlers.ts +7 -1
- package/src/slack/render-v2.ts +186 -17
- package/src/slack/responses.ts +1 -3
- package/src/slack/task-output.ts +66 -8
- package/src/slack/thread-buffer.ts +27 -3
- package/src/telemetry.ts +2 -3
- package/src/tests/agent-fs-provision-seeder.test.ts +56 -2
- package/src/tests/agents-harness-provider.test.ts +19 -0
- package/src/tests/agents-list-model-display.test.ts +60 -1
- package/src/tests/base-prompt.test.ts +25 -0
- package/src/tests/claude-managed-adapter.test.ts +6 -0
- package/src/tests/codex-gpt6-release.test.ts +97 -0
- package/src/tests/codex-steering-hook.test.ts +2 -2
- package/src/tests/config-api-only-keys.test.ts +9 -0
- package/src/tests/context-window.test.ts +1 -0
- package/src/tests/db-task-read-contract.test.ts +9 -0
- package/src/tests/db-task-write-contract.test.ts +9 -0
- package/src/tests/defer-task.test.ts +115 -16
- package/src/tests/dsh-adapter.test.ts +276 -0
- package/src/tests/e2e-nightly-report.test.ts +3 -3
- package/src/tests/e2e-redact.test.ts +2 -0
- package/src/tests/env-flag.test.ts +6 -0
- package/src/tests/extension-agent-visibility.test.ts +474 -0
- package/src/tests/extensions-db.test.ts +41 -0
- package/src/tests/extensions-http.test.ts +148 -4
- package/src/tests/extensions-lifecycle.test.ts +21 -1
- package/src/tests/extensions-mcp-tools.test.ts +9 -5
- package/src/tests/fetch-resolved-env.test.ts +43 -0
- package/src/tests/internal-ai/complete-structured.test.ts +32 -9
- package/src/tests/internal-ai/credentials.test.ts +4 -4
- package/src/tests/internal-ai/models.test.ts +20 -0
- package/src/tests/memory-rate-tool.test.ts +7 -10
- package/src/tests/memory-rater-defaults.test.ts +23 -0
- package/src/tests/memory-rater-e2e.test.ts +2 -3
- package/src/tests/migration-046-budgets.test.ts +2 -0
- package/src/tests/model-control.test.ts +2 -2
- package/src/tests/onboard-compose.test.ts +14 -0
- package/src/tests/onboard-env.test.ts +17 -0
- package/src/tests/onboard-manifest.test.ts +12 -0
- package/src/tests/opus-5-5-registry.test.ts +48 -0
- package/src/tests/pricing-refresh.test.ts +1 -1
- package/src/tests/pricing-routes.test.ts +15 -3
- package/src/tests/provider-registration.test.ts +5 -2
- package/src/tests/rbac-admission-e2e.test.ts +54 -0
- package/src/tests/rbac-e2e-helpers.ts +2 -0
- package/src/tests/rbac-engine.test.ts +32 -0
- package/src/tests/rbac-wire-e2e.test.ts +33 -0
- package/src/tests/reasoning-effort.test.ts +8 -0
- package/src/tests/reload-config.test.ts +33 -0
- package/src/tests/script-connections.test.ts +3 -0
- package/src/tests/session-costs-model-key-normalize.test.ts +1 -0
- package/src/tests/slack-config.test.ts +136 -0
- package/src/tests/slack-mode-lifecycle.test.ts +69 -0
- package/src/tests/slack-render-v2.test.ts +446 -16
- package/src/tests/slack-steering.test.ts +69 -1
- package/src/tests/slack-task-output.test.ts +33 -12
- package/src/tests/status.test.ts +22 -2
- package/src/tests/steering-core.test.ts +35 -0
- package/src/tests/steering-delivery.test.ts +39 -0
- package/src/tests/steering-transport.test.ts +2 -2
- package/src/tests/task-tool-preload-mcp.test.ts +3 -1
- package/src/tests/telemetry-init.test.ts +18 -0
- package/src/tests/workflow-live-recovery.test.ts +126 -0
- package/src/tests/workflow-llm.test.ts +3 -3
- package/src/tools/defer-task.ts +64 -26
- package/src/tools/extension-common.ts +4 -0
- package/src/tools/extension-install.ts +1 -1
- package/src/tools/extension-list.ts +4 -3
- package/src/tools/join-swarm.ts +1 -1
- package/src/tools/schedules/create-schedule.ts +11 -1
- package/src/tools/schedules/patch-schedule.ts +5 -0
- package/src/tools/schedules/update-schedule.ts +5 -0
- package/src/tools/send-task.ts +6 -0
- package/src/tools/utils.ts +1 -1
- package/src/types.ts +30 -8
- package/src/utils/context-window.ts +1 -0
- package/src/utils/credentials.ts +8 -0
- package/src/utils/internal-ai/complete-structured.ts +8 -0
- package/src/utils/internal-ai/models.ts +5 -5
- package/src/utils/memory-raters.ts +3 -0
- package/src/workflows/engine.ts +28 -0
- package/src/workflows/recovery.ts +7 -4
- package/templates/schedules/daily-status-report/content.md +25 -12
- package/templates/schedules/daily-workflow-health-audit/content.md +1 -1
- package/templates/skills/swarm-extensions/content.md +9 -5
- package/dist/cli-4wppfkcm.js +0 -16384
- package/dist/cli-55qrx3q8.js +0 -6041
- package/dist/cli-cg4vnyh4.js +0 -305
- package/dist/cli-jyetr64j.js +0 -52
- package/dist/cli-pp9ax9pa.js +0 -520
- package/dist/cli-qa66qaf0.js +0 -6076
- package/dist/cli-qghpvca2.js +0 -590
- package/dist/cli-rembwgt8.js +0 -861
- package/dist/cli-tcvj7j2r.js +0 -1971
- package/dist/cli-vfcth11k.js +0 -36
- package/dist/cli-w1d1bgkk.js +0 -1422
- package/dist/cli-y6x0gqtg.js +0 -5977
- package/dist/es5-tj3tn4jj.js +0 -844
- package/dist/index-1kq5hw2p.js +0 -467
- package/dist/index-1p8wdstt.js +0 -7
- package/dist/index-8fdjzb2f.js +0 -100
- package/dist/index-bxmwzbgw.js +0 -365
- package/dist/index-nzerxd5z.js +0 -7
- package/dist/index-pyymnzat.js +0 -1168
- package/dist/index-qv6atbab.js +0 -619
- package/dist/index-rja32qa7.js +0 -801
- package/dist/index-tzg5srfp.js +0 -211
- package/dist/index-vhncw983.js +0 -90
- package/dist/index-xk036zsk.js +0 -859
- package/dist/index-zyazbzcb.js +0 -6
- package/dist/{claude-managed-setup-48dwg9bv.js → claude-managed-setup-f5pmsyrp.js} +3 -3
|
@@ -3,17 +3,22 @@ import {
|
|
|
3
3
|
createDefaultMcpJson,
|
|
4
4
|
createDefaultSettingsLocal,
|
|
5
5
|
createHooksConfig
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-243tzws8.js";
|
|
7
7
|
import {
|
|
8
8
|
require_jsx_dev_runtime
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-eetrvv91.js";
|
|
10
10
|
import {
|
|
11
11
|
getApiKey
|
|
12
12
|
} from "./cli-f14fvzag.js";
|
|
13
|
+
import {
|
|
14
|
+
getSlackConfiguration,
|
|
15
|
+
init_config,
|
|
16
|
+
isSlackConfigured
|
|
17
|
+
} from "./cli-n7h1kqpf.js";
|
|
13
18
|
import {
|
|
14
19
|
init_package,
|
|
15
20
|
package_default
|
|
16
|
-
} from "./cli-
|
|
21
|
+
} from "./cli-myaxtgh8.js";
|
|
17
22
|
import {
|
|
18
23
|
Box_default,
|
|
19
24
|
Select,
|
|
@@ -23,9 +28,8 @@ import {
|
|
|
23
28
|
require_react,
|
|
24
29
|
use_app_default,
|
|
25
30
|
use_input_default
|
|
26
|
-
} from "./cli-
|
|
31
|
+
} from "./cli-zt1227k1.js";
|
|
27
32
|
import"./cli-pw9rj5t9.js";
|
|
28
|
-
import"./cli-pp9ax9pa.js";
|
|
29
33
|
import {
|
|
30
34
|
__toESM
|
|
31
35
|
} from "./cli-bc05qbss.js";
|
|
@@ -33,6 +37,7 @@ import {
|
|
|
33
37
|
// src/commands/onboard.tsx
|
|
34
38
|
import crypto2 from "node:crypto";
|
|
35
39
|
init_package();
|
|
40
|
+
init_config();
|
|
36
41
|
var import_react15 = __toESM(require_react(), 1);
|
|
37
42
|
|
|
38
43
|
// src/commands/onboard/dashboard-url.ts
|
|
@@ -124,6 +129,8 @@ var INITIAL_STATE = {
|
|
|
124
129
|
githubName: "",
|
|
125
130
|
slackBotToken: "",
|
|
126
131
|
slackAppToken: "",
|
|
132
|
+
slackSigningSecret: "",
|
|
133
|
+
slackMode: "socket",
|
|
127
134
|
gitlabToken: "",
|
|
128
135
|
gitlabEmail: "",
|
|
129
136
|
sentryToken: "",
|
|
@@ -856,6 +863,8 @@ var ENV_INSTALL_METHOD = " - INSTALL_METHOD=${INSTALL_METHOD}";
|
|
|
856
863
|
var ENV_INSTALL_PRESET = " - INSTALL_PRESET=${INSTALL_PRESET:-}";
|
|
857
864
|
var ENV_SLACK_BOT_TOKEN = " - SLACK_BOT_TOKEN=${SLACK_BOT_TOKEN}";
|
|
858
865
|
var ENV_SLACK_APP_TOKEN = " - SLACK_APP_TOKEN=${SLACK_APP_TOKEN}";
|
|
866
|
+
var ENV_SLACK_SIGNING_SECRET = " - SLACK_SIGNING_SECRET=${SLACK_SIGNING_SECRET}";
|
|
867
|
+
var ENV_SLACK_MODE = " - SLACK_MODE=${SLACK_MODE:-socket}";
|
|
859
868
|
var ENV_CLAUDE_OAUTH = " - CLAUDE_CODE_OAUTH_TOKEN=${CLAUDE_CODE_OAUTH_TOKEN}";
|
|
860
869
|
var ENV_ANTHROPIC_KEY = " - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}";
|
|
861
870
|
var ENV_HARNESS_PROVIDER = " - HARNESS_PROVIDER=${HARNESS_PROVIDER}";
|
|
@@ -936,13 +945,18 @@ function generateCompose(state) {
|
|
|
936
945
|
lines.push(ENV_API_KEY);
|
|
937
946
|
lines.push(ENV_INSTALL_METHOD);
|
|
938
947
|
lines.push(ENV_INSTALL_PRESET);
|
|
948
|
+
lines.push(" - MEMORY_HYBRID_SEARCH=${MEMORY_HYBRID_SEARCH-1}");
|
|
949
|
+
lines.push(" - MEMORY_GRAPH_EXPANSION=${MEMORY_GRAPH_EXPANSION-1}");
|
|
950
|
+
lines.push(" - MEMORY_RATERS=${MEMORY_RATERS-implicit-citation,explicit-self}");
|
|
951
|
+
lines.push(" - MEMORY_DEMOTION_FLOOR=${MEMORY_DEMOTION_FLOOR-1.0}");
|
|
939
952
|
appendProviderEnvironment(lines, state, false);
|
|
940
953
|
lines.push(` - MCP_BASE_URL=http://localhost:${port}`);
|
|
941
954
|
lines.push(" - APP_URL=https://app.agent-swarm.dev");
|
|
942
955
|
if (state.integrations.slack) {
|
|
943
956
|
lines.push(" - SLACK_DISABLE=false");
|
|
957
|
+
lines.push(ENV_SLACK_MODE);
|
|
944
958
|
lines.push(ENV_SLACK_BOT_TOKEN);
|
|
945
|
-
lines.push(ENV_SLACK_APP_TOKEN);
|
|
959
|
+
lines.push(state.slackMode === "http" ? ENV_SLACK_SIGNING_SECRET : ENV_SLACK_APP_TOKEN);
|
|
946
960
|
}
|
|
947
961
|
if (state.integrations.github) {
|
|
948
962
|
lines.push(" - GITHUB_DISABLE=false");
|
|
@@ -981,6 +995,7 @@ function generateCompose(state) {
|
|
|
981
995
|
lines.push(" environment:");
|
|
982
996
|
appendProviderEnvironment(lines, state, true);
|
|
983
997
|
lines.push(ENV_API_KEY);
|
|
998
|
+
lines.push(" - MEMORY_RATERS=${MEMORY_RATERS-implicit-citation,explicit-self}");
|
|
984
999
|
lines.push(` - AGENT_ID=${svc.agentId}`);
|
|
985
1000
|
lines.push(` - AGENT_NAME=${agentName}`);
|
|
986
1001
|
lines.push(` - AGENT_ROLE=${agentRole}`);
|
|
@@ -1046,6 +1061,13 @@ function generateEnv(state) {
|
|
|
1046
1061
|
lines.push(`INSTALL_PRESET=${state.presetId}`);
|
|
1047
1062
|
}
|
|
1048
1063
|
lines.push("");
|
|
1064
|
+
lines.push("# New-deployment memory preset: retrieval, citation ratings, self-rating hints.");
|
|
1065
|
+
lines.push("# Set MEMORY_RATERS= to disable all raters; leave SKIP_SESSION_SUMMARY unset.");
|
|
1066
|
+
lines.push("MEMORY_HYBRID_SEARCH=1");
|
|
1067
|
+
lines.push("MEMORY_GRAPH_EXPANSION=1");
|
|
1068
|
+
lines.push("MEMORY_RATERS=implicit-citation,explicit-self");
|
|
1069
|
+
lines.push("MEMORY_DEMOTION_FLOOR=1.0");
|
|
1070
|
+
lines.push("");
|
|
1049
1071
|
lines.push("# === Authentication ===");
|
|
1050
1072
|
lines.push(`HARNESS_PROVIDER=${state.harness}`);
|
|
1051
1073
|
switch (state.provider) {
|
|
@@ -1094,8 +1116,13 @@ function generateEnv(state) {
|
|
|
1094
1116
|
if (state.integrations.slack) {
|
|
1095
1117
|
lines.push("");
|
|
1096
1118
|
lines.push("# Slack");
|
|
1119
|
+
lines.push(`SLACK_MODE=${state.slackMode}`);
|
|
1097
1120
|
lines.push(`SLACK_BOT_TOKEN=${state.slackBotToken}`);
|
|
1098
|
-
|
|
1121
|
+
if (state.slackMode === "http") {
|
|
1122
|
+
lines.push(`SLACK_SIGNING_SECRET=${state.slackSigningSecret}`);
|
|
1123
|
+
} else {
|
|
1124
|
+
lines.push(`SLACK_APP_TOKEN=${state.slackAppToken}`);
|
|
1125
|
+
}
|
|
1099
1126
|
lines.push("SLACK_DISABLE=false");
|
|
1100
1127
|
} else {
|
|
1101
1128
|
lines.push("SLACK_DISABLE=true");
|
|
@@ -1147,6 +1174,7 @@ function generateManifest(state) {
|
|
|
1147
1174
|
gitlab: state.integrations.gitlab,
|
|
1148
1175
|
sentry: state.integrations.sentry
|
|
1149
1176
|
},
|
|
1177
|
+
slackMode: state.slackMode,
|
|
1150
1178
|
composePath: "./docker-compose.yml",
|
|
1151
1179
|
envPath: "./.env",
|
|
1152
1180
|
apiUrl: `http://localhost:${state.apiPort || 3013}`,
|
|
@@ -2351,6 +2379,7 @@ function IntegrationSlackStep({ goToNext }) {
|
|
|
2351
2379
|
const [subStep, setSubStep] = import_react10.useState("manifest_options");
|
|
2352
2380
|
const [copied, setCopied] = import_react10.useState(false);
|
|
2353
2381
|
const [botToken, setBotToken] = import_react10.useState("");
|
|
2382
|
+
const [mode, setMode] = import_react10.useState("socket");
|
|
2354
2383
|
const [error, setError] = import_react10.useState("");
|
|
2355
2384
|
return /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Box_default, {
|
|
2356
2385
|
flexDirection: "column",
|
|
@@ -2395,7 +2424,7 @@ function IntegrationSlackStep({ goToNext }) {
|
|
|
2395
2424
|
setCopied(false);
|
|
2396
2425
|
setSubStep("app_created");
|
|
2397
2426
|
} else {
|
|
2398
|
-
setSubStep("
|
|
2427
|
+
setSubStep("mode");
|
|
2399
2428
|
}
|
|
2400
2429
|
}
|
|
2401
2430
|
}, undefined, false, undefined, this)
|
|
@@ -2457,7 +2486,32 @@ function IntegrationSlackStep({ goToNext }) {
|
|
|
2457
2486
|
marginTop: 1,
|
|
2458
2487
|
children: /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Select, {
|
|
2459
2488
|
options: [{ label: "Continue — I've created the app", value: "continue" }],
|
|
2460
|
-
onChange: () => setSubStep("
|
|
2489
|
+
onChange: () => setSubStep("mode")
|
|
2490
|
+
}, undefined, false, undefined, this)
|
|
2491
|
+
}, undefined, false, undefined, this)
|
|
2492
|
+
]
|
|
2493
|
+
}, undefined, true, undefined, this),
|
|
2494
|
+
subStep === "mode" && /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Box_default, {
|
|
2495
|
+
marginTop: 1,
|
|
2496
|
+
flexDirection: "column",
|
|
2497
|
+
children: [
|
|
2498
|
+
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Text, {
|
|
2499
|
+
children: "Select the Slack transport:"
|
|
2500
|
+
}, undefined, false, undefined, this),
|
|
2501
|
+
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Box_default, {
|
|
2502
|
+
marginTop: 1,
|
|
2503
|
+
children: /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Select, {
|
|
2504
|
+
options: [
|
|
2505
|
+
{ label: "Socket Mode (default)", value: "socket" },
|
|
2506
|
+
{
|
|
2507
|
+
label: "HTTP (configuration only; receiver not installed yet)",
|
|
2508
|
+
value: "http"
|
|
2509
|
+
}
|
|
2510
|
+
],
|
|
2511
|
+
onChange: (value2) => {
|
|
2512
|
+
setMode(value2);
|
|
2513
|
+
setSubStep("bot_token");
|
|
2514
|
+
}
|
|
2461
2515
|
}, undefined, false, undefined, this)
|
|
2462
2516
|
}, undefined, false, undefined, this)
|
|
2463
2517
|
]
|
|
@@ -2498,14 +2552,14 @@ function IntegrationSlackStep({ goToNext }) {
|
|
|
2498
2552
|
}
|
|
2499
2553
|
setError("");
|
|
2500
2554
|
setBotToken(trimmed);
|
|
2501
|
-
setSubStep("
|
|
2555
|
+
setSubStep("credential");
|
|
2502
2556
|
}
|
|
2503
2557
|
}, "slack-bot-token", false, undefined, this)
|
|
2504
2558
|
]
|
|
2505
2559
|
}, undefined, true, undefined, this)
|
|
2506
2560
|
]
|
|
2507
2561
|
}, undefined, true, undefined, this),
|
|
2508
|
-
subStep === "
|
|
2562
|
+
subStep === "credential" && /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Box_default, {
|
|
2509
2563
|
marginTop: 1,
|
|
2510
2564
|
flexDirection: "column",
|
|
2511
2565
|
children: [
|
|
@@ -2520,50 +2574,64 @@ function IntegrationSlackStep({ goToNext }) {
|
|
|
2520
2574
|
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Box_default, {
|
|
2521
2575
|
marginTop: 1,
|
|
2522
2576
|
flexDirection: "column",
|
|
2523
|
-
children:
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2577
|
+
children: mode === "socket" ? /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(jsx_dev_runtime11.Fragment, {
|
|
2578
|
+
children: [
|
|
2579
|
+
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Text, {
|
|
2580
|
+
children: [
|
|
2581
|
+
"Find your App-Level Token under",
|
|
2582
|
+
" ",
|
|
2583
|
+
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Text, {
|
|
2584
|
+
bold: true,
|
|
2585
|
+
children: "Basic Information → App-Level Tokens"
|
|
2586
|
+
}, undefined, false, undefined, this),
|
|
2587
|
+
"."
|
|
2588
|
+
]
|
|
2589
|
+
}, undefined, true, undefined, this),
|
|
2590
|
+
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Text, {
|
|
2591
|
+
dimColor: true,
|
|
2592
|
+
children: "Create one with connections:write scope if you don't have one."
|
|
2593
|
+
}, undefined, false, undefined, this)
|
|
2594
|
+
]
|
|
2595
|
+
}, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Text, {
|
|
2596
|
+
children: [
|
|
2597
|
+
"Find your Signing Secret under ",
|
|
2598
|
+
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Text, {
|
|
2599
|
+
bold: true,
|
|
2600
|
+
children: "Basic Information → App Credentials"
|
|
2601
|
+
}, undefined, false, undefined, this),
|
|
2602
|
+
"."
|
|
2603
|
+
]
|
|
2604
|
+
}, undefined, true, undefined, this)
|
|
2605
|
+
}, undefined, false, undefined, this),
|
|
2540
2606
|
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Box_default, {
|
|
2541
2607
|
marginTop: 1,
|
|
2542
2608
|
flexDirection: "column",
|
|
2543
2609
|
children: [
|
|
2544
2610
|
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Text, {
|
|
2545
2611
|
bold: true,
|
|
2546
|
-
children: "App Token (SLACK_APP_TOKEN):"
|
|
2612
|
+
children: mode === "socket" ? "App Token (SLACK_APP_TOKEN):" : "Signing Secret (SLACK_SIGNING_SECRET):"
|
|
2547
2613
|
}, undefined, false, undefined, this),
|
|
2548
2614
|
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(TextInput, {
|
|
2549
|
-
placeholder: "xapp-...",
|
|
2615
|
+
placeholder: mode === "socket" ? "xapp-..." : "signing secret",
|
|
2550
2616
|
onSubmit: (value2) => {
|
|
2551
2617
|
const trimmed = value2.trim();
|
|
2552
2618
|
if (!trimmed) {
|
|
2553
|
-
setError("App token is required. Please enter it above
|
|
2619
|
+
setError(`${mode === "socket" ? "App token" : "Signing secret"} is required. Please enter it above.`);
|
|
2554
2620
|
return;
|
|
2555
2621
|
}
|
|
2556
|
-
if (!trimmed.startsWith("xapp-")) {
|
|
2622
|
+
if (mode === "socket" && !trimmed.startsWith("xapp-")) {
|
|
2557
2623
|
setError("App token should start with xapp- — please check and re-enter.");
|
|
2558
2624
|
return;
|
|
2559
2625
|
}
|
|
2560
2626
|
setError("");
|
|
2561
2627
|
goToNext({
|
|
2562
2628
|
slackBotToken: botToken,
|
|
2563
|
-
|
|
2629
|
+
slackMode: mode,
|
|
2630
|
+
slackAppToken: mode === "socket" ? trimmed : "",
|
|
2631
|
+
slackSigningSecret: mode === "http" ? trimmed : ""
|
|
2564
2632
|
});
|
|
2565
2633
|
}
|
|
2566
|
-
},
|
|
2634
|
+
}, `slack-${mode}-credential`, false, undefined, this)
|
|
2567
2635
|
]
|
|
2568
2636
|
}, undefined, true, undefined, this)
|
|
2569
2637
|
]
|
|
@@ -3164,6 +3232,15 @@ function ReviewStep({ state, dryRun, goToNext, goToStep }) {
|
|
|
3164
3232
|
}, undefined, false, undefined, this)
|
|
3165
3233
|
]
|
|
3166
3234
|
}, undefined, true, undefined, this),
|
|
3235
|
+
state.integrations.slack ? /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(Text, {
|
|
3236
|
+
children: [
|
|
3237
|
+
"Slack transport: ",
|
|
3238
|
+
/* @__PURE__ */ jsx_dev_runtime16.jsxDEV(Text, {
|
|
3239
|
+
color: "cyan",
|
|
3240
|
+
children: state.slackMode
|
|
3241
|
+
}, undefined, false, undefined, this)
|
|
3242
|
+
]
|
|
3243
|
+
}, undefined, true, undefined, this) : null,
|
|
3167
3244
|
/* @__PURE__ */ jsx_dev_runtime16.jsxDEV(Text, {
|
|
3168
3245
|
children: [
|
|
3169
3246
|
"Output directory: ",
|
|
@@ -3438,9 +3515,10 @@ function Onboard({
|
|
|
3438
3515
|
}
|
|
3439
3516
|
}
|
|
3440
3517
|
}
|
|
3518
|
+
const slackConfig = getSlackConfiguration(process.env);
|
|
3441
3519
|
const integrations = {
|
|
3442
3520
|
github: !!process.env.GITHUB_TOKEN,
|
|
3443
|
-
slack:
|
|
3521
|
+
slack: isSlackConfigured(process.env),
|
|
3444
3522
|
gitlab: !!process.env.GITLAB_TOKEN,
|
|
3445
3523
|
sentry: !!process.env.SENTRY_AUTH_TOKEN
|
|
3446
3524
|
};
|
|
@@ -3464,6 +3542,8 @@ function Onboard({
|
|
|
3464
3542
|
githubName: process.env.GITHUB_NAME || "",
|
|
3465
3543
|
slackBotToken: process.env.SLACK_BOT_TOKEN || "",
|
|
3466
3544
|
slackAppToken: process.env.SLACK_APP_TOKEN || "",
|
|
3545
|
+
slackSigningSecret: process.env.SLACK_SIGNING_SECRET || "",
|
|
3546
|
+
slackMode: slackConfig.mode ?? "socket",
|
|
3467
3547
|
gitlabToken: process.env.GITLAB_TOKEN || "",
|
|
3468
3548
|
gitlabEmail: process.env.GITLAB_EMAIL || "",
|
|
3469
3549
|
sentryToken: process.env.SENTRY_AUTH_TOKEN || "",
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
splitDeferredTools
|
|
3
|
-
} from "./cli-vfcth11k.js";
|
|
4
1
|
import {
|
|
5
2
|
convertResponsesMessages,
|
|
6
3
|
convertResponsesTools,
|
|
7
4
|
processResponsesStream
|
|
8
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-00w2c66p.js";
|
|
9
6
|
import {
|
|
10
7
|
clampOpenAIPromptCacheKey
|
|
11
8
|
} from "./cli-mrptpp86.js";
|
|
@@ -27,22 +24,28 @@ import {
|
|
|
27
24
|
import {
|
|
28
25
|
buildBaseOptions,
|
|
29
26
|
createGrammarToolInputProperties
|
|
30
|
-
} from "./cli-
|
|
27
|
+
} from "./cli-k0g1sjzm.js";
|
|
31
28
|
import"./cli-y2apkfe2.js";
|
|
32
29
|
import {
|
|
33
30
|
headersToRecord
|
|
34
31
|
} from "./cli-vapyk8sw.js";
|
|
35
|
-
import {
|
|
36
|
-
clampThinkingLevel
|
|
37
|
-
} from "./cli-rgvp6r2x.js";
|
|
38
32
|
import"./cli-btbzvq95.js";
|
|
39
33
|
import"./cli-1m2e086m.js";
|
|
34
|
+
import {
|
|
35
|
+
clampThinkingLevel,
|
|
36
|
+
getDeclaredTools,
|
|
37
|
+
getInitialSystemMessage,
|
|
38
|
+
getSystemMessageText,
|
|
39
|
+
normalizeContext,
|
|
40
|
+
resolveTranscript,
|
|
41
|
+
resolveTranscriptTools
|
|
42
|
+
} from "./cli-mcnhgnn1.js";
|
|
40
43
|
import {
|
|
41
44
|
AssistantMessageEventStream,
|
|
42
45
|
appendAssistantMessageDiagnostic,
|
|
43
46
|
createAssistantMessageDiagnostic,
|
|
44
47
|
formatThrownValue
|
|
45
|
-
} from "./cli-
|
|
48
|
+
} from "./cli-bzr0ftht.js";
|
|
46
49
|
import"./cli-bc05qbss.js";
|
|
47
50
|
|
|
48
51
|
// node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.js
|
|
@@ -195,6 +198,7 @@ function compressRequestBodyZstd(bodyJson) {
|
|
|
195
198
|
}
|
|
196
199
|
var stream = (model, context, options) => {
|
|
197
200
|
const stream2 = new AssistantMessageEventStream;
|
|
201
|
+
const normalizedContext = resolveTranscript(context, model.compat?.supportsMidConvoSystemMessages);
|
|
198
202
|
(async () => {
|
|
199
203
|
const output = {
|
|
200
204
|
role: "assistant",
|
|
@@ -219,10 +223,10 @@ var stream = (model, context, options) => {
|
|
|
219
223
|
throw new Error(`No API key for provider: ${model.provider}`);
|
|
220
224
|
}
|
|
221
225
|
const accountId = extractAccountId(apiKey);
|
|
222
|
-
const grammarToolInputProperties = createGrammarToolInputProperties(
|
|
226
|
+
const grammarToolInputProperties = createGrammarToolInputProperties(getDeclaredTools(normalizedContext.messages), model.compat?.supportsOpenAIGrammarTools ?? false);
|
|
223
227
|
const cacheSessionId = options?.cacheRetention === "none" ? undefined : options?.sessionId;
|
|
224
228
|
const codexSessionId = clampOpenAIPromptCacheKey(cacheSessionId);
|
|
225
|
-
let body = buildRequestBody(model,
|
|
229
|
+
let body = buildRequestBody(model, normalizedContext, options, codexSessionId, grammarToolInputProperties);
|
|
226
230
|
const nextBody = await options?.onPayload?.(body, model);
|
|
227
231
|
if (nextBody !== undefined) {
|
|
228
232
|
body = nextBody;
|
|
@@ -281,7 +285,7 @@ var stream = (model, context, options) => {
|
|
|
281
285
|
}
|
|
282
286
|
appendAssistantMessageDiagnostic(output, createAssistantMessageDiagnostic("provider_transport_failure", error, {
|
|
283
287
|
configuredTransport: transport,
|
|
284
|
-
|
|
288
|
+
...websocketStarted ? {} : { fallbackTransport: "sse" },
|
|
285
289
|
eventsEmitted: websocketStarted,
|
|
286
290
|
phase: websocketStarted ? "after_message_stream_start" : "before_message_stream_start",
|
|
287
291
|
requestBytes: new TextEncoder().encode(bodyJson).byteLength
|
|
@@ -403,27 +407,27 @@ var streamSimple = (model, context, options) => {
|
|
|
403
407
|
reasoningEffort
|
|
404
408
|
});
|
|
405
409
|
};
|
|
406
|
-
function buildRequestBody(model, context, options, cacheSessionId, grammarToolInputProperties = createGrammarToolInputProperties(context.
|
|
410
|
+
function buildRequestBody(model, context, options, cacheSessionId, grammarToolInputProperties = createGrammarToolInputProperties(getDeclaredTools(context.messages), model.compat?.supportsOpenAIGrammarTools ?? false)) {
|
|
407
411
|
const supportsStrictMode = model.compat?.supportsStrictMode ?? true;
|
|
408
412
|
const supportsOpenAIGrammarTools = model.compat?.supportsOpenAIGrammarTools ?? false;
|
|
409
|
-
const
|
|
410
|
-
const
|
|
413
|
+
const supportsAdditionalTools = model.compat?.supportsAdditionalTools ?? false;
|
|
414
|
+
const supportsToolSearch = model.compat?.supportsToolSearch ?? false;
|
|
415
|
+
const transcriptTools = resolveTranscriptTools(context.messages, supportsAdditionalTools || supportsToolSearch);
|
|
411
416
|
const messages = convertResponsesMessages(model, context, CODEX_TOOL_CALL_PROVIDERS, {
|
|
412
417
|
includeSystemPrompt: false,
|
|
413
418
|
grammarToolInputProperties,
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
supportsStrictMode,
|
|
419
|
-
supportsOpenAIGrammarTools
|
|
420
|
-
}
|
|
419
|
+
supportsMidConvoSystemMessages: model.compat?.supportsMidConvoSystemMessages ?? false,
|
|
420
|
+
supportsAdditionalTools,
|
|
421
|
+
supportsToolSearch,
|
|
422
|
+
toolOptions: { strict: null, supportsStrictMode, supportsOpenAIGrammarTools }
|
|
421
423
|
});
|
|
424
|
+
const initialSystemMessage = getInitialSystemMessage(context.messages);
|
|
425
|
+
const instructions = initialSystemMessage ? getSystemMessageText(initialSystemMessage) : "";
|
|
422
426
|
const body = {
|
|
423
427
|
model: model.id,
|
|
424
428
|
store: false,
|
|
425
429
|
stream: true,
|
|
426
|
-
instructions:
|
|
430
|
+
instructions: instructions || "You are a helpful assistant.",
|
|
427
431
|
input: messages,
|
|
428
432
|
text: { verbosity: options?.textVerbosity || "low" },
|
|
429
433
|
include: ["reasoning.encrypted_content"],
|
|
@@ -437,21 +441,23 @@ function buildRequestBody(model, context, options, cacheSessionId, grammarToolIn
|
|
|
437
441
|
if (options?.serviceTier !== undefined) {
|
|
438
442
|
body.service_tier = options.serviceTier;
|
|
439
443
|
}
|
|
440
|
-
if (
|
|
441
|
-
body.tools = convertResponsesTools(
|
|
444
|
+
if (transcriptTools.requestTools.length > 0) {
|
|
445
|
+
body.tools = convertResponsesTools(transcriptTools.requestTools, {
|
|
442
446
|
strict: null,
|
|
443
447
|
supportsStrictMode,
|
|
444
448
|
supportsOpenAIGrammarTools
|
|
445
449
|
});
|
|
446
450
|
}
|
|
447
451
|
if (options?.reasoningEffort !== undefined) {
|
|
448
|
-
const effort = options.reasoningEffort === "none" ? model.thinkingLevelMap?.off
|
|
452
|
+
const effort = options.reasoningEffort === "none" ? model.thinkingLevelMap?.off === undefined ? "none" : model.thinkingLevelMap.off : model.thinkingLevelMap?.[options.reasoningEffort] ?? options.reasoningEffort;
|
|
449
453
|
if (effort !== null) {
|
|
450
454
|
body.reasoning = {
|
|
451
455
|
effort,
|
|
452
456
|
summary: options.reasoningSummary ?? "auto"
|
|
453
457
|
};
|
|
454
458
|
}
|
|
459
|
+
} else if (model.reasoning && model.thinkingLevelMap?.off !== null) {
|
|
460
|
+
body.reasoning = { effort: model.thinkingLevelMap?.off ?? "none" };
|
|
455
461
|
}
|
|
456
462
|
return body;
|
|
457
463
|
}
|
|
@@ -1197,7 +1203,7 @@ async function processWebSocketStream(url, body, headers, output, stream2, model
|
|
|
1197
1203
|
if (options?.signal?.aborted) {
|
|
1198
1204
|
keepConnection = false;
|
|
1199
1205
|
} else if (useCachedContext && entry && output.responseId) {
|
|
1200
|
-
const responseItems = convertResponsesMessages(model, { messages: [output] }, CODEX_TOOL_CALL_PROVIDERS, {
|
|
1206
|
+
const responseItems = convertResponsesMessages(model, normalizeContext({ messages: [output] }), CODEX_TOOL_CALL_PROVIDERS, {
|
|
1201
1207
|
includeSystemPrompt: false,
|
|
1202
1208
|
grammarToolInputProperties
|
|
1203
1209
|
}).filter((item) => item.type !== "function_call_output" && item.type !== "custom_tool_call_output");
|