@desplega.ai/agent-swarm 1.120.0 → 1.121.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/{actions-rym7jyg2.js → actions-mwshtkf7.js} +6 -6
- package/dist/{anthropic-messages-qjxzsabf.js → anthropic-messages-4gn944cn.js} +29 -13
- package/dist/{app-ss3a0nfj.js → app-skbty91x.js} +4 -4
- package/dist/{assistant-8sd2b21b.js → assistant-tg7dhfj8.js} +13 -13
- package/dist/{azure-openai-responses-ntfd05zd.js → azure-openai-responses-79zc0wyy.js} +28 -13
- package/dist/{boot-reembed-eh18r04f.js → boot-reembed-ntjmeyh2.js} +4 -4
- package/dist/{boot-reembed-7bs0d0sj.js → boot-reembed-q5x0xpcp.js} +5 -5
- package/dist/{boot-scrub-logs-v8ch000n.js → boot-scrub-logs-5gznsfbe.js} +4 -4
- package/dist/{claude-adapter-9n3nzt65.js → claude-adapter-vxvcym3r.js} +3 -3
- package/dist/{claude-managed-adapter-pv2nbqy4.js → claude-managed-adapter-g807894s.js} +2 -2
- package/dist/{cli-py8z9bjq.js → cli-072t49hf.js} +9 -9
- package/dist/{cli-383wyw2f.js → cli-0df2g86x.js} +61 -17
- package/dist/{cli-84j2vp67.js → cli-1728qh70.js} +1 -1
- package/dist/{cli-kyqs14qe.js → cli-3b1ayz83.js} +5 -5
- package/dist/{cli-0ap79nha.js → cli-3fxqwfh3.js} +1 -1
- package/dist/{cli-w6rhc30s.js → cli-3jrdwnn9.js} +20 -5
- package/dist/{cli-gq12jc1m.js → cli-46etyprn.js} +7 -5
- package/dist/{cli-j59bj3vs.js → cli-4pfweq4x.js} +8 -8
- package/dist/{cli-2r7s8jhp.js → cli-5c4327dx.js} +7 -1
- package/dist/{cli-4cb3p8pj.js → cli-5hpvd15x.js} +2 -2
- package/dist/{cli-branks1w.js → cli-6s3ytc5x.js} +1 -1
- package/dist/{cli-da3x3btq.js → cli-7pt9sc83.js} +2 -2
- package/dist/{cli-n745f8e5.js → cli-7pzae66m.js} +1 -1
- package/dist/{cli-qs7nb3zn.js → cli-8wrympd7.js} +27 -1
- package/dist/{cli-zxnp21rf.js → cli-95rbe11h.js} +13 -13
- package/dist/{cli-v65h59hn.js → cli-agdrxyex.js} +1 -1
- package/dist/{cli-wr706gez.js → cli-av2s7my4.js} +167 -66
- package/dist/{cli-t91zbm2s.js → cli-avw9ev3x.js} +55 -21
- package/dist/{cli-shdvvj0n.js → cli-b2mqkg1h.js} +2 -2
- package/dist/{cli-1arw00dp.js → cli-ccjwgarc.js} +12 -3
- package/dist/{cli-pscrc6tw.js → cli-ch7t5v7n.js} +5 -0
- package/dist/{cli-tghre7g6.js → cli-cw70hymf.js} +1 -0
- package/dist/{cli-n61x2aph.js → cli-dmzv0986.js} +816 -1335
- package/dist/{cli-0kkggfr9.js → cli-g9vva2qh.js} +2 -2
- package/dist/{cli-dnx98dwa.js → cli-gdpx70nc.js} +38185 -38141
- package/dist/{cli-vmhqfnp1.js → cli-ghq3v4c9.js} +2 -2
- package/dist/{cli-w5em21am.js → cli-ky8esb8t.js} +3 -3
- package/dist/{cli-f6c6y7fw.js → cli-nf7sadev.js} +2 -2
- package/dist/{cli-zxeb2qe3.js → cli-p9w7kb3h.js} +1 -1
- package/dist/{cli-xeatwfbe.js → cli-ry656xem.js} +24 -17
- package/dist/{cli-th08nm8p.js → cli-s8bdcke2.js} +1 -1
- package/dist/cli-s8s499xy.js +81 -0
- package/dist/{cli-d2eyq90a.js → cli-srjqn7fd.js} +1 -1
- package/dist/{cli-gad984jj.js → cli-tv7vekye.js} +1 -1
- package/dist/{cli-kyfx7z3d.js → cli-vg3zrw6h.js} +4 -4
- package/dist/{cli-sbh0b9r1.js → cli-vp9r4ap4.js} +5 -4
- package/dist/{cli-mg280wsv.js → cli-we156bmz.js} +1 -1
- package/dist/{cli-e0y603nn.js → cli-x0e0yvnq.js} +101 -1
- package/dist/{cli-mw3xpgwb.js → cli-x4apc9t3.js} +4 -4
- package/dist/cli.js +23 -21
- package/dist/{codex-adapter-6j2b38tg.js → codex-adapter-mmy741zd.js} +8 -9
- package/dist/{codex-session-runner-vz215wgw.js → codex-session-runner-sazmx9zt.js} +8 -9
- package/dist/{commands-w1swgcgg.js → commands-cxxye5e4.js} +3 -3
- package/dist/{db-yv6y0fxw.js → db-ab1954b7.js} +5 -3
- package/dist/{google-generative-ai-n1d3xt4n.js → google-generative-ai-wwa2ked5.js} +14 -18
- package/dist/{google-vertex-mxst23gy.js → google-vertex-71xmdd7n.js} +14 -18
- package/dist/{handlers-yjyafdwk.js → handlers-fmfe2343.js} +13 -13
- package/dist/{hook-6nvc6p19.js → hook-ygnw3cvt.js} +7 -8
- package/dist/{http-g6j8rc6h.js → http-kactcc0z.js} +142 -64
- package/dist/{index-b2rarbkn.js → index-6erq0wvk.js} +11 -11
- package/dist/{index-7betnvg6.js → index-g86j2yt5.js} +9 -9
- package/dist/{index-64th6eqs.js → index-gmzs6a2q.js} +10 -10
- package/dist/{index-cbknx39k.js → index-hmp82wn0.js} +12 -12
- package/dist/{keepalive-j8c99r3m.js → keepalive-3cvt26dw.js} +6 -6
- package/dist/{lead-8xe71m3s.js → lead-ysf26cjr.js} +30 -31
- package/dist/{maintenance-eqnmrwb2.js → maintenance-9npwptbb.js} +5 -5
- package/dist/{mistral-conversations-ykcg66za.js → mistral-conversations-26ya4yah.js} +17 -13
- package/dist/{oauth-refresh-sweep-c5dy1653.js → oauth-refresh-sweep-0r2v76vw.js} +6 -6
- package/dist/{onboard-4avg01c1.js → onboard-ddb1674a.js} +2 -2
- package/dist/{openai-codex-responses-zy0907j9.js → openai-codex-responses-6rr2ye0s.js} +78 -38
- package/dist/{openai-completions-xk4p56n9.js → openai-completions-zfa9nkvt.js} +130 -33
- package/dist/{openai-responses-4gv3ca5d.js → openai-responses-9wmdks0g.js} +38 -14
- package/dist/{opencode-adapter-5bwzvbwj.js → opencode-adapter-h6rkxwrk.js} +2 -2
- package/dist/{openrouter-images-4fsrrzes.js → openrouter-images-dgq98729.js} +10 -3
- package/dist/{otel-impl-z4cwkp40.js → otel-impl-b43bkq8e.js} +4 -4
- package/dist/{pi-messages-zb8v76wx.js → pi-messages-nzjbbz47.js} +4 -6
- package/dist/{pi-mono-adapter-9sg69kg3.js → pi-mono-adapter-ke789738.js} +2328 -1281
- package/dist/{pricing-refresh-dts9429d.js → pricing-refresh-2rqf114z.js} +5 -5
- package/dist/{rbac-roles-4f64wch6.js → rbac-roles-5wkhc8xv.js} +4 -4
- package/dist/{rbac-roles-24cvsejy.js → rbac-roles-6vtafvzb.js} +3 -3
- package/dist/{seed-pricing-74ph9wap.js → seed-pricing-23wrb873.js} +4 -4
- package/dist/{setup-9q0n8rvd.js → setup-6rny4fk6.js} +2 -2
- package/dist/{worker-x7g344z8.js → worker-yapewe14.js} +30 -31
- package/openapi.json +169 -85
- package/package.json +7 -5
- package/plugin/commands/swarm-chat.md +2 -0
- package/plugin/pi-skills/swarm-chat/SKILL.md +2 -0
- package/src/be/db.ts +61 -5
- package/src/be/migrations/119_agent_avatar.sql +7 -0
- package/src/be/migrations/120_task_title.sql +3 -0
- package/src/be/scripts/typecheck.ts +3 -2
- package/src/be/seed-capabilities.ts +62 -0
- package/src/be/seed-pricing.ts +1 -1
- package/src/be/seed-scripts/catalog/ops-catalog-audit.inline.ts +1 -1
- package/src/be/seed-scripts/catalog/ops-catalog-audit.ts +1 -1
- package/src/commands/runner.ts +69 -6
- package/src/http/agents.ts +23 -5
- package/src/http/core.ts +8 -5
- package/src/http/index.ts +11 -0
- package/src/http/mcp-bridge.ts +5 -2
- package/src/http/poll.ts +5 -1
- package/src/http/sessions.ts +1 -1
- package/src/http/tasks.ts +35 -0
- package/src/prompts/base-prompt.ts +48 -4
- package/src/prompts/session-templates.ts +13 -1
- package/src/providers/claude-managed-models.ts +8 -0
- package/src/scripts-runtime/types/stdlib.d.ts +11 -0
- package/src/server.ts +230 -126
- package/src/tests/agent-avatar-resolution.test.ts +123 -0
- package/src/tests/agents-list-model-display.test.ts +10 -0
- package/src/tests/base-prompt.test.ts +72 -0
- package/src/tests/claude-managed-adapter.test.ts +6 -0
- package/src/tests/context-window.test.ts +1 -0
- package/src/tests/list-endpoint-slimming.test.ts +45 -0
- package/src/tests/prompt-template-session.test.ts +6 -5
- package/src/tests/script-connections.test.ts +1 -0
- package/src/tests/sdk-allowlist.test.ts +4 -1
- package/src/tests/seed-capabilities.test.ts +92 -0
- package/src/tests/session-costs-model-key-normalize.test.ts +1 -0
- package/src/tests/sessions.test.ts +46 -0
- package/src/tests/task-title-route.test.ts +106 -0
- package/src/tests/tool-annotations.test.ts +6 -3
- package/src/tools/update-profile.ts +15 -5
- package/src/types.ts +29 -0
- package/src/utils/context-window.ts +1 -0
- package/dist/cli-z9gzq07x.js +0 -27
- package/dist/{otel-g299k41b.js → otel-63jr5v38.js} +1 -1
package/README.md
CHANGED
|
@@ -142,7 +142,7 @@ Check [our templates](https://templates.agent-swarm.dev) for a quick start.
|
|
|
142
142
|
- **Config-driven metrics dashboards** — define read-only SQL widgets, version them, and render them in the dashboard without shipping custom frontend code. [Metrics API →](https://docs.agent-swarm.dev/docs/api-reference/stats)
|
|
143
143
|
- **DB-backed pages** — agents publish HTML or JSON pages (reports, dashboards, action specs) via `create_page`, remove stale pages with `delete-page`, and share them with public / authed / password modes, version history, view counters, diff helpers, and PDF export. [MCP tools → Pages](https://docs.agent-swarm.dev/docs/reference/mcp-tools#pages-tools)
|
|
144
144
|
- **KV store** — Redis-like namespaced key/value store with auto-scoped context (Slack thread / PR / Linear issue / page). [MCP tools → KV](https://docs.agent-swarm.dev/docs/reference/mcp-tools#kv-tools)
|
|
145
|
-
- **Real-time dashboard + task attachments** — monitor agents, tasks, and inter-agent chat
|
|
145
|
+
- **Real-time dashboard + task attachments** — monitor agents, tasks, and inter-agent chat; rename sessions inline; customize each agent's icon and color; filter Pages, Approval Requests, and workflow definitions with URL-backed search/facets; create tasks with uploaded files from the sessions composer; and preview task attachments inline above session prompts. [app.agent-swarm.dev →](https://app.agent-swarm.dev)
|
|
146
146
|
|
|
147
147
|
## Quick Start
|
|
148
148
|
|
|
@@ -217,7 +217,7 @@ Missing one? Ask the swarm to build it.
|
|
|
217
217
|
|
|
218
218
|
## Dashboard
|
|
219
219
|
|
|
220
|
-
Real-time monitoring of agents, tasks, and inter-agent chat. Use the hosted version at [app.agent-swarm.dev](https://app.agent-swarm.dev), or run locally:
|
|
220
|
+
Real-time monitoring of agents, tasks, and inter-agent chat. Session titles can be renamed inline, and agent profiles can use a custom Lucide icon and color while retaining deterministic defaults. Use the hosted version at [app.agent-swarm.dev](https://app.agent-swarm.dev), or run locally:
|
|
221
221
|
|
|
222
222
|
```bash
|
|
223
223
|
cd apps/ui && bun install && bun run dev
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveSlackUserId
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
} from "./cli-nf7sadev.js";
|
|
4
|
+
import"./cli-srjqn7fd.js";
|
|
5
5
|
import {
|
|
6
6
|
createTaskWithSiblingAwareness
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-s8bdcke2.js";
|
|
8
8
|
import {
|
|
9
9
|
buildCancelledBlocks,
|
|
10
10
|
getTaskLink
|
|
@@ -19,12 +19,12 @@ import {
|
|
|
19
19
|
init_context_key,
|
|
20
20
|
init_db,
|
|
21
21
|
slackContextKey
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-0df2g86x.js";
|
|
23
23
|
import"./cli-z2zcxes1.js";
|
|
24
|
+
import"./cli-46etyprn.js";
|
|
25
|
+
import"./cli-4j2mrzag.js";
|
|
24
26
|
import"./cli-bw80ck94.js";
|
|
25
27
|
import"./cli-xz9aq0rf.js";
|
|
26
|
-
import"./cli-gq12jc1m.js";
|
|
27
|
-
import"./cli-4j2mrzag.js";
|
|
28
28
|
import"./cli-p9swy5t3.js";
|
|
29
29
|
|
|
30
30
|
// src/slack/actions.ts
|
|
@@ -5,6 +5,9 @@ import {
|
|
|
5
5
|
buildCopilotDynamicHeaders,
|
|
6
6
|
hasCopilotVisionInput
|
|
7
7
|
} from "./cli-67bad0ze.js";
|
|
8
|
+
import {
|
|
9
|
+
retryProviderRequest
|
|
10
|
+
} from "./cli-s8s499xy.js";
|
|
8
11
|
import {
|
|
9
12
|
parseJsonWithRepair,
|
|
10
13
|
parseStreamingJson
|
|
@@ -16,8 +19,9 @@ import {
|
|
|
16
19
|
adjustMaxTokensForThinking,
|
|
17
20
|
buildBaseOptions,
|
|
18
21
|
clampMaxTokensToContext,
|
|
22
|
+
resolveJsonSchemaStrictSampling,
|
|
19
23
|
transformMessages
|
|
20
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-x0e0yvnq.js";
|
|
21
25
|
import {
|
|
22
26
|
sanitizeSurrogates
|
|
23
27
|
} from "./cli-y2apkfe2.js";
|
|
@@ -26,10 +30,10 @@ import {
|
|
|
26
30
|
} from "./cli-vapyk8sw.js";
|
|
27
31
|
import {
|
|
28
32
|
calculateCost
|
|
29
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-ccjwgarc.js";
|
|
30
34
|
import {
|
|
31
35
|
AssistantMessageEventStream
|
|
32
|
-
} from "./cli-
|
|
36
|
+
} from "./cli-8wrympd7.js";
|
|
33
37
|
import"./cli-p9swy5t3.js";
|
|
34
38
|
|
|
35
39
|
// node_modules/@earendil-works/pi-ai/node_modules/@anthropic-ai/sdk/internal/tslib.mjs
|
|
@@ -4919,6 +4923,7 @@ function getAnthropicCompat(model) {
|
|
|
4919
4923
|
supportsCacheControlOnTools: model.compat?.supportsCacheControlOnTools ?? true,
|
|
4920
4924
|
supportsTemperature: model.compat?.supportsTemperature ?? true,
|
|
4921
4925
|
allowEmptySignature: model.compat?.allowEmptySignature ?? false,
|
|
4926
|
+
supportsStrictTools: model.compat?.supportsStrictTools ?? false,
|
|
4922
4927
|
supportsToolReferences: model.compat?.supportsToolReferences ?? defaultSupportsToolReferences(model)
|
|
4923
4928
|
};
|
|
4924
4929
|
}
|
|
@@ -5160,9 +5165,13 @@ var stream = (model, context, options) => {
|
|
|
5160
5165
|
const requestOptions = {
|
|
5161
5166
|
...options?.signal ? { signal: options.signal } : {},
|
|
5162
5167
|
...options?.timeoutMs !== undefined ? { timeout: options.timeoutMs } : {},
|
|
5163
|
-
maxRetries:
|
|
5168
|
+
maxRetries: 0
|
|
5164
5169
|
};
|
|
5165
|
-
const response = await client.messages.create({ ...params, stream: true }, requestOptions).asResponse()
|
|
5170
|
+
const response = await retryProviderRequest(() => client.messages.create({ ...params, stream: true }, requestOptions).asResponse(), {
|
|
5171
|
+
maxRetries: options?.maxRetries,
|
|
5172
|
+
maxRetryDelayMs: options?.maxRetryDelayMs,
|
|
5173
|
+
signal: options?.signal
|
|
5174
|
+
});
|
|
5166
5175
|
await options?.onResponse?.({ status: response.status, headers: headersToRecord(response.headers) }, model);
|
|
5167
5176
|
stream2.push({ type: "start", partial: output });
|
|
5168
5177
|
const blocks = output.content;
|
|
@@ -5487,8 +5496,8 @@ function buildParams(model, context, isOAuthToken2, options) {
|
|
|
5487
5496
|
}
|
|
5488
5497
|
if (immediateTools.length > 0 || deferredTools.length > 0) {
|
|
5489
5498
|
params.tools = [
|
|
5490
|
-
...convertTools(immediateTools, isOAuthToken2, compat.supportsEagerToolInputStreaming, compat.supportsCacheControlOnTools ? cacheControl : undefined),
|
|
5491
|
-
...convertTools(deferredTools, isOAuthToken2, compat.supportsEagerToolInputStreaming, undefined, true)
|
|
5499
|
+
...convertTools(immediateTools, isOAuthToken2, compat.supportsEagerToolInputStreaming, compat.supportsStrictTools, compat.supportsCacheControlOnTools ? cacheControl : undefined),
|
|
5500
|
+
...convertTools(deferredTools, isOAuthToken2, compat.supportsEagerToolInputStreaming, compat.supportsStrictTools, undefined, true)
|
|
5492
5501
|
];
|
|
5493
5502
|
}
|
|
5494
5503
|
if (model.reasoning) {
|
|
@@ -5689,20 +5698,27 @@ function convertMessages(transformedMessages, isOAuthToken2, cacheControl, allow
|
|
|
5689
5698
|
function shouldUseFineGrainedToolStreamingBeta(model, context) {
|
|
5690
5699
|
return !!context.tools?.length && !getAnthropicCompat(model).supportsEagerToolInputStreaming;
|
|
5691
5700
|
}
|
|
5692
|
-
function convertTools(tools, isOAuthToken2, supportsEagerToolInputStreaming, cacheControl, deferLoading = false) {
|
|
5701
|
+
function convertTools(tools, isOAuthToken2, supportsEagerToolInputStreaming, supportsStrictTools, cacheControl, deferLoading = false) {
|
|
5693
5702
|
if (!tools)
|
|
5694
5703
|
return [];
|
|
5695
5704
|
return tools.map((tool, index) => {
|
|
5705
|
+
const strict = resolveJsonSchemaStrictSampling(tool, supportsStrictTools);
|
|
5696
5706
|
const schema = tool.parameters;
|
|
5707
|
+
const legacyInputSchema = {
|
|
5708
|
+
type: "object",
|
|
5709
|
+
properties: schema.properties ?? {},
|
|
5710
|
+
required: schema.required ?? []
|
|
5711
|
+
};
|
|
5712
|
+
const inputSchema = strict === true ? {
|
|
5713
|
+
...tool.parameters,
|
|
5714
|
+
...legacyInputSchema
|
|
5715
|
+
} : legacyInputSchema;
|
|
5697
5716
|
return {
|
|
5698
5717
|
name: isOAuthToken2 ? toClaudeCodeName(tool.name) : tool.name,
|
|
5699
5718
|
description: tool.description,
|
|
5700
5719
|
...supportsEagerToolInputStreaming ? { eager_input_streaming: true } : {},
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
properties: schema.properties ?? {},
|
|
5704
|
-
required: schema.required ?? []
|
|
5705
|
-
},
|
|
5720
|
+
...strict === true ? { strict: true } : {},
|
|
5721
|
+
input_schema: inputSchema,
|
|
5706
5722
|
...deferLoading ? { defer_loading: true } : {},
|
|
5707
5723
|
...cacheControl && index === tools.length - 1 ? { cache_control: cacheControl } : {}
|
|
5708
5724
|
};
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
initSlackApp,
|
|
4
4
|
startSlackApp,
|
|
5
5
|
stopSlackApp
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-3b1ayz83.js";
|
|
7
7
|
import"./cli-rkndnn90.js";
|
|
8
8
|
import"./cli-b0p7rfnd.js";
|
|
9
9
|
import"./cli-ma04faw5.js";
|
|
10
10
|
import"./cli-wspgs9bt.js";
|
|
11
11
|
import"./cli-dh55d5fg.js";
|
|
12
|
-
import"./cli-
|
|
12
|
+
import"./cli-0df2g86x.js";
|
|
13
13
|
import"./cli-z2zcxes1.js";
|
|
14
|
+
import"./cli-46etyprn.js";
|
|
15
|
+
import"./cli-4j2mrzag.js";
|
|
14
16
|
import"./cli-bw80ck94.js";
|
|
15
17
|
import"./cli-xz9aq0rf.js";
|
|
16
|
-
import"./cli-gq12jc1m.js";
|
|
17
|
-
import"./cli-4j2mrzag.js";
|
|
18
18
|
import"./cli-e15jhafb.js";
|
|
19
19
|
import"./cli-7wmybrt5.js";
|
|
20
20
|
import"./cli-p9swy5t3.js";
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bufferThreadMessage,
|
|
3
3
|
wasEventSeen
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-4pfweq4x.js";
|
|
5
5
|
import {
|
|
6
6
|
hasOtherUserMention
|
|
7
|
-
} from "./cli-
|
|
8
|
-
import {
|
|
9
|
-
require_dist
|
|
10
|
-
} from "./cli-kyqs14qe.js";
|
|
11
|
-
import"./cli-rkndnn90.js";
|
|
12
|
-
import"./cli-b0p7rfnd.js";
|
|
7
|
+
} from "./cli-g9vva2qh.js";
|
|
13
8
|
import {
|
|
14
9
|
resolveSlackUserId,
|
|
15
10
|
rewriteSlackMentions
|
|
16
|
-
} from "./cli-
|
|
17
|
-
import"./cli-
|
|
11
|
+
} from "./cli-nf7sadev.js";
|
|
12
|
+
import"./cli-srjqn7fd.js";
|
|
18
13
|
import {
|
|
19
14
|
createTaskWithSiblingAwareness
|
|
20
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-s8bdcke2.js";
|
|
16
|
+
import {
|
|
17
|
+
require_dist
|
|
18
|
+
} from "./cli-3b1ayz83.js";
|
|
19
|
+
import"./cli-rkndnn90.js";
|
|
20
|
+
import"./cli-b0p7rfnd.js";
|
|
21
21
|
import"./cli-ma04faw5.js";
|
|
22
22
|
import"./cli-wspgs9bt.js";
|
|
23
23
|
import"./cli-dh55d5fg.js";
|
|
@@ -30,12 +30,12 @@ import {
|
|
|
30
30
|
init_resolver,
|
|
31
31
|
resolveTemplate,
|
|
32
32
|
slackContextKey
|
|
33
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-0df2g86x.js";
|
|
34
34
|
import"./cli-z2zcxes1.js";
|
|
35
|
+
import"./cli-46etyprn.js";
|
|
36
|
+
import"./cli-4j2mrzag.js";
|
|
35
37
|
import"./cli-bw80ck94.js";
|
|
36
38
|
import"./cli-xz9aq0rf.js";
|
|
37
|
-
import"./cli-gq12jc1m.js";
|
|
38
|
-
import"./cli-4j2mrzag.js";
|
|
39
39
|
import"./cli-e15jhafb.js";
|
|
40
40
|
import"./cli-7wmybrt5.js";
|
|
41
41
|
import {
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
convertResponsesMessages,
|
|
3
3
|
convertResponsesTools,
|
|
4
4
|
processResponsesStream
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-av2s7my4.js";
|
|
6
6
|
import {
|
|
7
7
|
clampOpenAIPromptCacheKey
|
|
8
8
|
} from "./cli-mrptpp86.js";
|
|
@@ -10,6 +10,9 @@ import"./cli-5m9j2spm.js";
|
|
|
10
10
|
import {
|
|
11
11
|
AzureOpenAI
|
|
12
12
|
} from "./cli-sajgpkqg.js";
|
|
13
|
+
import {
|
|
14
|
+
retryProviderRequest
|
|
15
|
+
} from "./cli-s8s499xy.js";
|
|
13
16
|
import"./cli-zyxs93y9.js";
|
|
14
17
|
import {
|
|
15
18
|
getProviderEnvValue
|
|
@@ -17,20 +20,21 @@ import {
|
|
|
17
20
|
import {
|
|
18
21
|
formatProviderError,
|
|
19
22
|
normalizeProviderError
|
|
20
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-ch7t5v7n.js";
|
|
21
24
|
import {
|
|
22
|
-
buildBaseOptions
|
|
23
|
-
|
|
25
|
+
buildBaseOptions,
|
|
26
|
+
createGrammarToolInputProperties
|
|
27
|
+
} from "./cli-x0e0yvnq.js";
|
|
24
28
|
import"./cli-y2apkfe2.js";
|
|
25
29
|
import {
|
|
26
30
|
headersToRecord
|
|
27
31
|
} from "./cli-vapyk8sw.js";
|
|
28
32
|
import {
|
|
29
33
|
clampThinkingLevel
|
|
30
|
-
} from "./cli-
|
|
34
|
+
} from "./cli-ccjwgarc.js";
|
|
31
35
|
import {
|
|
32
36
|
AssistantMessageEventStream
|
|
33
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-8wrympd7.js";
|
|
34
38
|
import"./cli-p9swy5t3.js";
|
|
35
39
|
|
|
36
40
|
// node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js
|
|
@@ -89,7 +93,8 @@ var stream = (model, context, options) => {
|
|
|
89
93
|
throw new Error(`No API key for provider: ${model.provider}`);
|
|
90
94
|
}
|
|
91
95
|
const client = createClient(model, apiKey, options);
|
|
92
|
-
|
|
96
|
+
const grammarToolInputProperties = createGrammarToolInputProperties(context.tools, model.compat?.supportsOpenAIGrammarTools ?? false);
|
|
97
|
+
let params = buildParams(model, context, options, deploymentName, grammarToolInputProperties);
|
|
93
98
|
const nextParams = await options?.onPayload?.(params, model);
|
|
94
99
|
if (nextParams !== undefined) {
|
|
95
100
|
params = nextParams;
|
|
@@ -97,12 +102,16 @@ var stream = (model, context, options) => {
|
|
|
97
102
|
const requestOptions = {
|
|
98
103
|
...options?.signal ? { signal: options.signal } : {},
|
|
99
104
|
...options?.timeoutMs !== undefined ? { timeout: options.timeoutMs } : {},
|
|
100
|
-
maxRetries:
|
|
105
|
+
maxRetries: 0
|
|
101
106
|
};
|
|
102
|
-
const { data: openaiStream, response } = await client.responses.create(params, requestOptions).withResponse()
|
|
107
|
+
const { data: openaiStream, response } = await retryProviderRequest(() => client.responses.create(params, requestOptions).withResponse(), {
|
|
108
|
+
maxRetries: options?.maxRetries,
|
|
109
|
+
maxRetryDelayMs: options?.maxRetryDelayMs,
|
|
110
|
+
signal: options?.signal
|
|
111
|
+
});
|
|
103
112
|
await options?.onResponse?.({ status: response.status, headers: headersToRecord(response.headers) }, model);
|
|
104
113
|
stream2.push({ type: "start", partial: output });
|
|
105
|
-
await processResponsesStream(openaiStream, output, stream2, model);
|
|
114
|
+
await processResponsesStream(openaiStream, output, stream2, model, { grammarToolInputProperties });
|
|
106
115
|
if (options?.signal?.aborted) {
|
|
107
116
|
throw new Error("Request was aborted");
|
|
108
117
|
}
|
|
@@ -115,6 +124,7 @@ var stream = (model, context, options) => {
|
|
|
115
124
|
for (const block of output.content) {
|
|
116
125
|
delete block.index;
|
|
117
126
|
delete block.partialJson;
|
|
127
|
+
delete block.customInput;
|
|
118
128
|
}
|
|
119
129
|
output.stopReason = options?.signal?.aborted ? "aborted" : "error";
|
|
120
130
|
output.errorMessage = formatAzureOpenAIError(error);
|
|
@@ -189,8 +199,10 @@ function createClient(model, apiKey, options) {
|
|
|
189
199
|
baseURL: baseUrl
|
|
190
200
|
});
|
|
191
201
|
}
|
|
192
|
-
function buildParams(model, context, options, deploymentName) {
|
|
193
|
-
const messages = convertResponsesMessages(model, context, AZURE_TOOL_CALL_PROVIDERS
|
|
202
|
+
function buildParams(model, context, options, deploymentName, grammarToolInputProperties = createGrammarToolInputProperties(context.tools, model.compat?.supportsOpenAIGrammarTools ?? false)) {
|
|
203
|
+
const messages = convertResponsesMessages(model, context, AZURE_TOOL_CALL_PROVIDERS, {
|
|
204
|
+
grammarToolInputProperties
|
|
205
|
+
});
|
|
194
206
|
const params = {
|
|
195
207
|
model: deploymentName,
|
|
196
208
|
input: messages,
|
|
@@ -205,7 +217,10 @@ function buildParams(model, context, options, deploymentName) {
|
|
|
205
217
|
params.temperature = options?.temperature;
|
|
206
218
|
}
|
|
207
219
|
if (context.tools && context.tools.length > 0) {
|
|
208
|
-
params.tools = convertResponsesTools(context.tools
|
|
220
|
+
params.tools = convertResponsesTools(context.tools, {
|
|
221
|
+
supportsStrictMode: model.compat?.supportsStrictMode ?? true,
|
|
222
|
+
supportsOpenAIGrammarTools: model.compat?.supportsOpenAIGrammarTools ?? false
|
|
223
|
+
});
|
|
209
224
|
}
|
|
210
225
|
if (model.reasoning) {
|
|
211
226
|
if (options?.reasoningEffort || options?.reasoningSummary) {
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
getEmbeddingProvider,
|
|
4
4
|
getMemoryStore,
|
|
5
5
|
init_constants
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-3fxqwfh3.js";
|
|
7
7
|
import"./cli-q25ejbyn.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb,
|
|
10
10
|
init_db
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-0df2g86x.js";
|
|
12
12
|
import"./cli-z2zcxes1.js";
|
|
13
|
+
import"./cli-46etyprn.js";
|
|
14
|
+
import"./cli-4j2mrzag.js";
|
|
13
15
|
import"./cli-bw80ck94.js";
|
|
14
16
|
import"./cli-xz9aq0rf.js";
|
|
15
|
-
import"./cli-gq12jc1m.js";
|
|
16
|
-
import"./cli-4j2mrzag.js";
|
|
17
17
|
import"./cli-p9swy5t3.js";
|
|
18
18
|
|
|
19
19
|
// src/be/memory/boot-reembed.ts
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
embedScript,
|
|
3
3
|
embeddingProvider
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-5hpvd15x.js";
|
|
5
|
+
import"./cli-3fxqwfh3.js";
|
|
6
6
|
import"./cli-q25ejbyn.js";
|
|
7
7
|
import {
|
|
8
8
|
getDb,
|
|
9
9
|
init_db
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-0df2g86x.js";
|
|
11
11
|
import"./cli-z2zcxes1.js";
|
|
12
|
+
import"./cli-46etyprn.js";
|
|
13
|
+
import"./cli-4j2mrzag.js";
|
|
12
14
|
import"./cli-bw80ck94.js";
|
|
13
15
|
import"./cli-xz9aq0rf.js";
|
|
14
|
-
import"./cli-gq12jc1m.js";
|
|
15
|
-
import"./cli-4j2mrzag.js";
|
|
16
16
|
import"./cli-p9swy5t3.js";
|
|
17
17
|
|
|
18
18
|
// src/be/scripts/boot-reembed.ts
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDb,
|
|
3
3
|
init_db
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-0df2g86x.js";
|
|
5
5
|
import"./cli-z2zcxes1.js";
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-xz9aq0rf.js";
|
|
8
|
-
import"./cli-gq12jc1m.js";
|
|
6
|
+
import"./cli-46etyprn.js";
|
|
9
7
|
import {
|
|
10
8
|
init_secret_scrubber,
|
|
11
9
|
scrubSecrets
|
|
12
10
|
} from "./cli-4j2mrzag.js";
|
|
11
|
+
import"./cli-bw80ck94.js";
|
|
12
|
+
import"./cli-xz9aq0rf.js";
|
|
13
13
|
import"./cli-p9swy5t3.js";
|
|
14
14
|
|
|
15
15
|
// src/be/boot-scrub-logs.ts
|
|
@@ -12,15 +12,15 @@ import {
|
|
|
12
12
|
resolveClaudeBinary,
|
|
13
13
|
resolveClaudeBinaryArgv,
|
|
14
14
|
resolveClaudeBridgeEnabled
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-x4apc9t3.js";
|
|
16
16
|
import"./cli-psrqtw2m.js";
|
|
17
17
|
import"./cli-tng3131n.js";
|
|
18
18
|
import"./cli-zm7njwzd.js";
|
|
19
|
-
import"./cli-
|
|
19
|
+
import"./cli-cw70hymf.js";
|
|
20
20
|
import"./cli-e61fs2hp.js";
|
|
21
|
+
import"./cli-7zd05xb4.js";
|
|
21
22
|
import"./cli-z2zcxes1.js";
|
|
22
23
|
import"./cli-4j2mrzag.js";
|
|
23
|
-
import"./cli-7zd05xb4.js";
|
|
24
24
|
import"./cli-p9swy5t3.js";
|
|
25
25
|
export {
|
|
26
26
|
resolveClaudeBridgeEnabled,
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
checkClaudeManagedCredentials,
|
|
4
4
|
composeManagedUserMessage,
|
|
5
5
|
normalizeRepoUrl
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-5c4327dx.js";
|
|
7
7
|
import"./cli-07er7wrs.js";
|
|
8
8
|
import"./cli-yv9dttkh.js";
|
|
9
9
|
import"./cli-d6n0thxw.js";
|
|
10
10
|
import"./cli-gz9sbyk3.js";
|
|
11
|
-
import"./cli-
|
|
11
|
+
import"./cli-cw70hymf.js";
|
|
12
12
|
import"./cli-4j2mrzag.js";
|
|
13
13
|
import"./cli-p9swy5t3.js";
|
|
14
14
|
export {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./cli-jkhwmmgg.js";
|
|
4
4
|
import {
|
|
5
5
|
embedScript
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-5hpvd15x.js";
|
|
7
7
|
import {
|
|
8
8
|
calculatePKCECodeChallenge,
|
|
9
9
|
generateRandomCodeVerifier,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
getOAuthAppById,
|
|
13
13
|
updateAuthorizationTokens,
|
|
14
14
|
upsertAuthorization
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-1728qh70.js";
|
|
16
16
|
import {
|
|
17
17
|
computeContentHash,
|
|
18
18
|
decryptSecret,
|
|
@@ -28,19 +28,19 @@ import {
|
|
|
28
28
|
normalizeDateRequired,
|
|
29
29
|
placeholderForConfigKey,
|
|
30
30
|
upsertSwarmConfig
|
|
31
|
-
} from "./cli-
|
|
32
|
-
import {
|
|
33
|
-
init_zod
|
|
34
|
-
} from "./cli-bw80ck94.js";
|
|
35
|
-
import {
|
|
36
|
-
exports_external
|
|
37
|
-
} from "./cli-xz9aq0rf.js";
|
|
31
|
+
} from "./cli-0df2g86x.js";
|
|
38
32
|
import {
|
|
39
33
|
init_secret_scrubber,
|
|
40
34
|
refreshSecretScrubberCache,
|
|
41
35
|
registerVolatileSecret,
|
|
42
36
|
scrubSecrets
|
|
43
37
|
} from "./cli-4j2mrzag.js";
|
|
38
|
+
import {
|
|
39
|
+
init_zod
|
|
40
|
+
} from "./cli-bw80ck94.js";
|
|
41
|
+
import {
|
|
42
|
+
exports_external
|
|
43
|
+
} from "./cli-xz9aq0rf.js";
|
|
44
44
|
import {
|
|
45
45
|
__commonJS,
|
|
46
46
|
__require,
|