@desplega.ai/agent-swarm 1.119.3 → 1.119.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{actions-kd321p1j.js → actions-xqb0w6as.js} +5 -5
- package/dist/{anthropic-messages-kq3pjhbp.js → anthropic-messages-qjxzsabf.js} +94 -46
- package/dist/{app-p1gqacgd.js → app-qv9sy539.js} +3 -3
- package/dist/{assistant-6w0zb089.js → assistant-54jkns28.js} +8 -8
- package/dist/{azure-openai-responses-f57n5qy7.js → azure-openai-responses-ntfd05zd.js} +10 -7
- package/dist/{boot-reembed-zktmj8zt.js → boot-reembed-m3cpwet0.js} +4 -4
- package/dist/{boot-reembed-7gy85nnp.js → boot-reembed-s0mftrn2.js} +3 -3
- package/dist/{boot-scrub-logs-d8n8pcgr.js → boot-scrub-logs-btj144vd.js} +2 -2
- package/dist/{claude-adapter-3csn5bks.js → claude-adapter-9n3nzt65.js} +2 -2
- package/dist/{claude-managed-adapter-kysmkz89.js → claude-managed-adapter-pv2nbqy4.js} +2 -2
- package/dist/{cli-e5hdn9nx.js → cli-150bvqyw.js} +1 -1
- package/dist/{cli-m6pzzhqr.js → cli-1arw00dp.js} +251 -122
- package/dist/{cli-g5a31r9y.js → cli-3brg2qy0.js} +2 -2
- package/dist/{cli-9y4z25ke.js → cli-4ntm7f2r.js} +1 -1
- package/dist/{cli-get7n46a.js → cli-4yby3gz2.js} +1 -1
- package/dist/{cli-cx30v78p.js → cli-5sexkty0.js} +6 -6
- package/dist/{cli-6expbmb3.js → cli-65anxt77.js} +1 -1
- package/dist/{cli-gzng1fst.js → cli-7h1sce5x.js} +9 -7
- package/dist/{cli-xgefj1nz.js → cli-9rrpjvan.js} +2 -2
- package/dist/{cli-emgzr4ja.js → cli-ctdx3h19.js} +5 -5
- package/dist/{cli-dh9eb7tt.js → cli-da3x3btq.js} +5 -3
- package/dist/{cli-bsyka9ta.js → cli-e0y603nn.js} +30 -16
- package/dist/{cli-8y1kmyn7.js → cli-hc543pgg.js} +2 -2
- package/dist/{cli-z612d1nc.js → cli-hjpdm93t.js} +1 -1
- package/dist/{cli-yzxg93ma.js → cli-jcp7f17k.js} +4 -4
- package/dist/{cli-7yfmb4ne.js → cli-m0aghjk5.js} +1 -1
- package/dist/{cli-xw7p4wkq.js → cli-mg280wsv.js} +1 -1
- package/dist/{cli-hcpm1e90.js → cli-n61x2aph.js} +2488 -18718
- package/dist/{cli-9aqtt1dn.js → cli-qh6dfg7b.js} +5 -5
- package/dist/cli-qs7nb3zn.js +76 -0
- package/dist/{cli-y82m27mq.js → cli-rp04sjbc.js} +1 -1
- package/dist/{cli-j5da6jb2.js → cli-sjvxb0ys.js} +19 -30
- package/dist/{cli-eb3s7zwh.js → cli-tznnqgnf.js} +18 -18
- package/dist/cli-v1mwc5v2.js +68 -0
- package/dist/cli-vfcth11k.js +36 -0
- package/dist/{cli-kc3h8mnm.js → cli-w6rhc30s.js} +1 -1
- package/dist/{cli-j2vpt4hd.js → cli-w9jp9sc4.js} +16 -16
- package/dist/{cli-p4yn675m.js → cli-wbrj97j4.js} +1 -1
- package/dist/{cli-td2x0s9b.js → cli-wejdajv9.js} +1 -1
- package/dist/{cli-527y7yzc.js → cli-wqfxznva.js} +3 -3
- package/dist/{cli-sdpnhajn.js → cli-wr706gez.js} +56 -7
- package/dist/{cli-0qy7bk86.js → cli-xeatwfbe.js} +25 -16
- package/dist/{cli-3sew4a9j.js → cli-xv365pmn.js} +1 -1
- package/dist/{cli-hx1dcevq.js → cli-z9gzq07x.js} +1 -23
- package/dist/{cli-j6n9at34.js → cli-zn7x1nkq.js} +2 -2
- package/dist/cli.js +21 -20
- package/dist/{codex-adapter-efskwfc4.js → codex-adapter-6j2b38tg.js} +8 -6
- package/dist/{codex-session-runner-n7ad0jdv.js → codex-session-runner-vz215wgw.js} +8 -6
- package/dist/{commands-14gkjns3.js → commands-jc6a4g7b.js} +2 -2
- package/dist/{db-c9wx8pbf.js → db-5gntqs7z.js} +2 -2
- package/dist/{google-generative-ai-hyrra2jm.js → google-generative-ai-n1d3xt4n.js} +9 -7
- package/dist/{google-vertex-9hhq68sw.js → google-vertex-mxst23gy.js} +9 -7
- package/dist/{handlers-m9jxp50r.js → handlers-jtjhcfec.js} +8 -8
- package/dist/{hook-mm8mj3cp.js → hook-d3yspdv9.js} +7 -5
- package/dist/{http-hhmh7m51.js → http-vf5qsq5m.js} +39 -38
- package/dist/{index-basky7qw.js → index-9t676t5s.js} +10 -10
- package/dist/{index-vmcp507g.js → index-be74p0aj.js} +8 -8
- package/dist/{index-9h6qre5v.js → index-dh8vf4p5.js} +6 -6
- package/dist/{index-ep25fyer.js → index-krp5s3s3.js} +9 -9
- package/dist/{keepalive-70mwsyhb.js → keepalive-p5m5d3g9.js} +4 -4
- package/dist/{lead-pshn5w58.js → lead-z4z70dn3.js} +32 -30
- package/dist/{maintenance-rbjav7ey.js → maintenance-n67pnrp0.js} +4 -4
- package/dist/{mistral-conversations-tn4sj5qv.js → mistral-conversations-ykcg66za.js} +5 -3
- package/dist/{oauth-refresh-sweep-dfbd7yw0.js → oauth-refresh-sweep-ygx2e3hv.js} +3 -3
- package/dist/{onboard-g8911158.js → onboard-76fn6mr2.js} +2 -2
- package/dist/{openai-codex-responses-bex0bpn6.js → openai-codex-responses-zy0907j9.js} +68 -39
- package/dist/{openai-completions-gygw5cxt.js → openai-completions-xk4p56n9.js} +73 -14
- package/dist/{openai-responses-8c0dgmty.js → openai-responses-4gv3ca5d.js} +38 -16
- package/dist/{opencode-adapter-p6bxnbm4.js → opencode-adapter-5bwzvbwj.js} +2 -2
- package/dist/{otel-impl-qw4pakj6.js → otel-impl-d9vmbspk.js} +1 -1
- package/dist/pi-messages-zb8v76wx.js +313 -0
- package/dist/{pi-mono-adapter-erghwha0.js → pi-mono-adapter-9sg69kg3.js} +15711 -12608
- package/dist/{pricing-refresh-7ra0g3az.js → pricing-refresh-wn1gbbnc.js} +4 -4
- package/dist/{rbac-roles-ksnmkjzf.js → rbac-roles-gzzmwqyj.js} +2 -2
- package/dist/{rbac-roles-s0esm5k6.js → rbac-roles-xz80cgy4.js} +3 -3
- package/dist/{seed-pricing-jd8zj8k7.js → seed-pricing-yr9dg75w.js} +3 -3
- package/dist/{setup-z2s4vqf3.js → setup-g15twpgb.js} +2 -2
- package/dist/{worker-xse3rpzd.js → worker-jdsz3va6.js} +32 -30
- package/openapi.json +1 -1
- package/package.json +6 -6
- package/src/be/script-credential-broker.ts +12 -26
- package/src/providers/pi-mono-adapter.ts +14 -20
- package/src/scripts-runtime/credential-broker/broker.ts +15 -4
- package/src/scripts-runtime/credential-broker/index.ts +1 -0
- package/src/scripts-runtime/credential-broker/types.ts +1 -0
- package/src/scripts-runtime/egress-secrets.ts +2 -2
- package/src/scripts-runtime/loader.ts +3 -3
- package/src/tests/credential-broker.test.ts +130 -3
- package/src/tests/internal-ai/credentials.test.ts +22 -0
- package/src/tests/pi-mono-adapter.test.ts +28 -20
- package/src/tests/scripts-runtime-secret-egress.test.ts +4 -4
- package/src/tests/workflow-engine-v2.test.ts +26 -0
- package/src/utils/internal-ai/credentials.ts +53 -5
- package/src/workflows/engine.ts +12 -2
- package/dist/{cli-sznberje.js → cli-2r7s8jhp.js} +3 -3
- package/dist/{cli-bc89my0z.js → cli-branks1w.js} +3 -3
- package/dist/{cli-mnbgv3w7.js → cli-mw3xpgwb.js} +3 -3
- package/dist/{openrouter-images-537nmn1r.js → openrouter-images-4fsrrzes.js} +3 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveSlackUserId
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
} from "./cli-zn7x1nkq.js";
|
|
4
|
+
import"./cli-xv365pmn.js";
|
|
5
5
|
import {
|
|
6
6
|
createTaskWithSiblingAwareness
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-wejdajv9.js";
|
|
8
8
|
import {
|
|
9
9
|
buildCancelledBlocks,
|
|
10
10
|
getTaskLink
|
|
@@ -19,11 +19,11 @@ import {
|
|
|
19
19
|
init_context_key,
|
|
20
20
|
init_db,
|
|
21
21
|
slackContextKey
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-rp04sjbc.js";
|
|
23
23
|
import"./cli-z2zcxes1.js";
|
|
24
24
|
import"./cli-bw80ck94.js";
|
|
25
25
|
import"./cli-xz9aq0rf.js";
|
|
26
|
-
import"./cli-
|
|
26
|
+
import"./cli-5sexkty0.js";
|
|
27
27
|
import"./cli-4j2mrzag.js";
|
|
28
28
|
import"./cli-p9swy5t3.js";
|
|
29
29
|
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
splitDeferredTools
|
|
3
|
+
} from "./cli-vfcth11k.js";
|
|
1
4
|
import {
|
|
2
5
|
buildCopilotDynamicHeaders,
|
|
3
6
|
hasCopilotVisionInput
|
|
@@ -14,17 +17,19 @@ import {
|
|
|
14
17
|
buildBaseOptions,
|
|
15
18
|
clampMaxTokensToContext,
|
|
16
19
|
transformMessages
|
|
17
|
-
} from "./cli-
|
|
18
|
-
import {
|
|
19
|
-
headersToRecord
|
|
20
|
-
} from "./cli-vapyk8sw.js";
|
|
20
|
+
} from "./cli-e0y603nn.js";
|
|
21
21
|
import {
|
|
22
22
|
sanitizeSurrogates
|
|
23
23
|
} from "./cli-y2apkfe2.js";
|
|
24
24
|
import {
|
|
25
|
-
|
|
25
|
+
headersToRecord
|
|
26
|
+
} from "./cli-vapyk8sw.js";
|
|
27
|
+
import {
|
|
26
28
|
calculateCost
|
|
27
|
-
} from "./cli-
|
|
29
|
+
} from "./cli-1arw00dp.js";
|
|
30
|
+
import {
|
|
31
|
+
AssistantMessageEventStream
|
|
32
|
+
} from "./cli-qs7nb3zn.js";
|
|
28
33
|
import"./cli-p9swy5t3.js";
|
|
29
34
|
|
|
30
35
|
// node_modules/@earendil-works/pi-ai/node_modules/@anthropic-ai/sdk/internal/tslib.mjs
|
|
@@ -4913,9 +4918,20 @@ function getAnthropicCompat(model) {
|
|
|
4913
4918
|
sendSessionAffinityHeaders: model.compat?.sendSessionAffinityHeaders ?? false,
|
|
4914
4919
|
supportsCacheControlOnTools: model.compat?.supportsCacheControlOnTools ?? true,
|
|
4915
4920
|
supportsTemperature: model.compat?.supportsTemperature ?? true,
|
|
4916
|
-
allowEmptySignature: model.compat?.allowEmptySignature ?? false
|
|
4921
|
+
allowEmptySignature: model.compat?.allowEmptySignature ?? false,
|
|
4922
|
+
supportsToolReferences: model.compat?.supportsToolReferences ?? defaultSupportsToolReferences(model)
|
|
4917
4923
|
};
|
|
4918
4924
|
}
|
|
4925
|
+
function defaultSupportsToolReferences(model) {
|
|
4926
|
+
if (model.provider !== "anthropic" || model.id.includes("haiku"))
|
|
4927
|
+
return false;
|
|
4928
|
+
const version = model.id.match(/^claude-(?:opus|sonnet|fable)-(\d+)(?:-(\d+))?(?:-|$)/);
|
|
4929
|
+
if (!version)
|
|
4930
|
+
return false;
|
|
4931
|
+
const major = Number(version[1]);
|
|
4932
|
+
const minor = version[2] && version[2].length < 8 ? Number(version[2]) : 0;
|
|
4933
|
+
return major > 4 || major === 4 && minor >= 5;
|
|
4934
|
+
}
|
|
4919
4935
|
function mergeHeaders(...headerSources) {
|
|
4920
4936
|
const merged = {};
|
|
4921
4937
|
for (const headers of headerSources) {
|
|
@@ -5284,21 +5300,23 @@ var stream = (model, context, options) => {
|
|
|
5284
5300
|
output.errorMessage = stopReasonResult.errorMessage;
|
|
5285
5301
|
}
|
|
5286
5302
|
}
|
|
5287
|
-
if (event.usage
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5303
|
+
if (event.usage) {
|
|
5304
|
+
if (event.usage.input_tokens != null) {
|
|
5305
|
+
output.usage.input = event.usage.input_tokens;
|
|
5306
|
+
}
|
|
5307
|
+
if (event.usage.output_tokens != null) {
|
|
5308
|
+
output.usage.output = event.usage.output_tokens;
|
|
5309
|
+
}
|
|
5310
|
+
if (event.usage.cache_read_input_tokens != null) {
|
|
5311
|
+
output.usage.cacheRead = event.usage.cache_read_input_tokens;
|
|
5312
|
+
}
|
|
5313
|
+
if (event.usage.cache_creation_input_tokens != null) {
|
|
5314
|
+
output.usage.cacheWrite = event.usage.cache_creation_input_tokens;
|
|
5315
|
+
}
|
|
5316
|
+
const thinkingTokens = event.usage.output_tokens_details?.thinking_tokens;
|
|
5317
|
+
if (thinkingTokens != null) {
|
|
5318
|
+
output.usage.reasoning = thinkingTokens;
|
|
5319
|
+
}
|
|
5302
5320
|
}
|
|
5303
5321
|
output.usage.totalTokens = output.usage.input + output.usage.output + output.usage.cacheRead + output.usage.cacheWrite;
|
|
5304
5322
|
calculateCost(model, output.usage);
|
|
@@ -5424,9 +5442,19 @@ function createClient(model, apiKey, interleavedThinking, useFineGrainedToolStre
|
|
|
5424
5442
|
function buildParams(model, context, isOAuthToken2, options) {
|
|
5425
5443
|
const { cacheControl } = getCacheControl(model, options?.cacheRetention, options?.env);
|
|
5426
5444
|
const compat = getAnthropicCompat(model);
|
|
5445
|
+
const transformedMessages = transformMessages(context.messages, model, normalizeToolCallId);
|
|
5446
|
+
const normalizeToolName = isOAuthToken2 ? toClaudeCodeName : (name) => name;
|
|
5447
|
+
const toolPlacement = splitDeferredTools({ ...context, messages: transformedMessages }, compat.supportsToolReferences, normalizeToolName);
|
|
5448
|
+
let immediateTools = toolPlacement.immediate;
|
|
5449
|
+
let deferredTools = [...toolPlacement.deferred.values()];
|
|
5450
|
+
if (immediateTools.length === 0 && deferredTools.length > 0) {
|
|
5451
|
+
immediateTools = deferredTools;
|
|
5452
|
+
deferredTools = [];
|
|
5453
|
+
}
|
|
5454
|
+
const deferredToolNames = new Set(deferredTools.map((tool) => normalizeToolName(tool.name)));
|
|
5427
5455
|
const params = {
|
|
5428
5456
|
model: model.id,
|
|
5429
|
-
messages: convertMessages(
|
|
5457
|
+
messages: convertMessages(transformedMessages, isOAuthToken2, cacheControl, compat.allowEmptySignature, deferredToolNames, normalizeToolName),
|
|
5430
5458
|
max_tokens: options?.maxTokens ?? model.maxTokens,
|
|
5431
5459
|
stream: true
|
|
5432
5460
|
};
|
|
@@ -5457,8 +5485,11 @@ function buildParams(model, context, isOAuthToken2, options) {
|
|
|
5457
5485
|
if (options?.temperature !== undefined && !options?.thinkingEnabled && compat.supportsTemperature) {
|
|
5458
5486
|
params.temperature = options.temperature;
|
|
5459
5487
|
}
|
|
5460
|
-
if (
|
|
5461
|
-
params.tools =
|
|
5488
|
+
if (immediateTools.length > 0 || deferredTools.length > 0) {
|
|
5489
|
+
params.tools = [
|
|
5490
|
+
...convertTools(immediateTools, isOAuthToken2, compat.supportsEagerToolInputStreaming, compat.supportsCacheControlOnTools ? cacheControl : undefined),
|
|
5491
|
+
...convertTools(deferredTools, isOAuthToken2, compat.supportsEagerToolInputStreaming, undefined, true)
|
|
5492
|
+
];
|
|
5462
5493
|
}
|
|
5463
5494
|
if (model.reasoning) {
|
|
5464
5495
|
if (options?.thinkingEnabled) {
|
|
@@ -5497,9 +5528,32 @@ function buildParams(model, context, isOAuthToken2, options) {
|
|
|
5497
5528
|
function normalizeToolCallId(id) {
|
|
5498
5529
|
return id.replace(/[^a-zA-Z0-9_-]/g, "_").slice(0, 64);
|
|
5499
5530
|
}
|
|
5500
|
-
function
|
|
5531
|
+
function convertToolResult(msg, isOAuthToken2, deferredToolNames, loadedToolNames, normalizeToolName) {
|
|
5532
|
+
const references = [];
|
|
5533
|
+
for (const name of msg.addedToolNames ?? []) {
|
|
5534
|
+
const normalizedName = normalizeToolName(name);
|
|
5535
|
+
if (!deferredToolNames.has(normalizedName) || loadedToolNames.has(normalizedName))
|
|
5536
|
+
continue;
|
|
5537
|
+
loadedToolNames.add(normalizedName);
|
|
5538
|
+
references.push({
|
|
5539
|
+
type: "tool_reference",
|
|
5540
|
+
tool_name: isOAuthToken2 ? toClaudeCodeName(name) : name
|
|
5541
|
+
});
|
|
5542
|
+
}
|
|
5543
|
+
const convertedContent = convertContentBlocks(msg.content);
|
|
5544
|
+
return {
|
|
5545
|
+
toolResult: {
|
|
5546
|
+
type: "tool_result",
|
|
5547
|
+
tool_use_id: msg.toolCallId,
|
|
5548
|
+
content: references.length > 0 ? references : convertedContent,
|
|
5549
|
+
is_error: msg.isError
|
|
5550
|
+
},
|
|
5551
|
+
siblingContent: references.length === 0 ? [] : typeof convertedContent === "string" ? [{ type: "text", text: convertedContent }] : convertedContent
|
|
5552
|
+
};
|
|
5553
|
+
}
|
|
5554
|
+
function convertMessages(transformedMessages, isOAuthToken2, cacheControl, allowEmptySignature = false, deferredToolNames = new Set, normalizeToolName = (name) => name) {
|
|
5501
5555
|
const params = [];
|
|
5502
|
-
const
|
|
5556
|
+
const loadedToolNames = new Set;
|
|
5503
5557
|
for (let i = 0;i < transformedMessages.length; i++) {
|
|
5504
5558
|
const msg = transformedMessages[i];
|
|
5505
5559
|
if (msg.role === "user") {
|
|
@@ -5559,9 +5613,11 @@ function convertMessages(messages, model, isOAuthToken2, cacheControl, allowEmpt
|
|
|
5559
5613
|
});
|
|
5560
5614
|
continue;
|
|
5561
5615
|
}
|
|
5562
|
-
|
|
5616
|
+
const thinkingSignature = block.thinkingSignature;
|
|
5617
|
+
const hasThinkingSignature = !!thinkingSignature && thinkingSignature.trim().length > 0;
|
|
5618
|
+
if (block.thinking.trim().length === 0 && !hasThinkingSignature)
|
|
5563
5619
|
continue;
|
|
5564
|
-
if (!
|
|
5620
|
+
if (!hasThinkingSignature) {
|
|
5565
5621
|
blocks.push(allowEmptySignature ? {
|
|
5566
5622
|
type: "thinking",
|
|
5567
5623
|
thinking: sanitizeSurrogates(block.thinking),
|
|
@@ -5574,7 +5630,7 @@ function convertMessages(messages, model, isOAuthToken2, cacheControl, allowEmpt
|
|
|
5574
5630
|
blocks.push({
|
|
5575
5631
|
type: "thinking",
|
|
5576
5632
|
thinking: sanitizeSurrogates(block.thinking),
|
|
5577
|
-
signature:
|
|
5633
|
+
signature: thinkingSignature
|
|
5578
5634
|
});
|
|
5579
5635
|
}
|
|
5580
5636
|
} else if (block.type === "toolCall") {
|
|
@@ -5594,27 +5650,18 @@ function convertMessages(messages, model, isOAuthToken2, cacheControl, allowEmpt
|
|
|
5594
5650
|
});
|
|
5595
5651
|
} else if (msg.role === "toolResult") {
|
|
5596
5652
|
const toolResults = [];
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
tool_use_id: msg.toolCallId,
|
|
5600
|
-
content: convertContentBlocks(msg.content),
|
|
5601
|
-
is_error: msg.isError
|
|
5602
|
-
});
|
|
5603
|
-
let j = i + 1;
|
|
5653
|
+
const siblingContent = [];
|
|
5654
|
+
let j = i;
|
|
5604
5655
|
while (j < transformedMessages.length && transformedMessages[j].role === "toolResult") {
|
|
5605
|
-
const
|
|
5606
|
-
toolResults.push(
|
|
5607
|
-
|
|
5608
|
-
tool_use_id: nextMsg.toolCallId,
|
|
5609
|
-
content: convertContentBlocks(nextMsg.content),
|
|
5610
|
-
is_error: nextMsg.isError
|
|
5611
|
-
});
|
|
5656
|
+
const converted = convertToolResult(transformedMessages[j], isOAuthToken2, deferredToolNames, loadedToolNames, normalizeToolName);
|
|
5657
|
+
toolResults.push(converted.toolResult);
|
|
5658
|
+
siblingContent.push(...converted.siblingContent);
|
|
5612
5659
|
j++;
|
|
5613
5660
|
}
|
|
5614
5661
|
i = j - 1;
|
|
5615
5662
|
params.push({
|
|
5616
5663
|
role: "user",
|
|
5617
|
-
content: toolResults
|
|
5664
|
+
content: [...toolResults, ...siblingContent]
|
|
5618
5665
|
});
|
|
5619
5666
|
}
|
|
5620
5667
|
}
|
|
@@ -5642,7 +5689,7 @@ function convertMessages(messages, model, isOAuthToken2, cacheControl, allowEmpt
|
|
|
5642
5689
|
function shouldUseFineGrainedToolStreamingBeta(model, context) {
|
|
5643
5690
|
return !!context.tools?.length && !getAnthropicCompat(model).supportsEagerToolInputStreaming;
|
|
5644
5691
|
}
|
|
5645
|
-
function convertTools(tools, isOAuthToken2, supportsEagerToolInputStreaming, cacheControl) {
|
|
5692
|
+
function convertTools(tools, isOAuthToken2, supportsEagerToolInputStreaming, cacheControl, deferLoading = false) {
|
|
5646
5693
|
if (!tools)
|
|
5647
5694
|
return [];
|
|
5648
5695
|
return tools.map((tool, index) => {
|
|
@@ -5656,6 +5703,7 @@ function convertTools(tools, isOAuthToken2, supportsEagerToolInputStreaming, cac
|
|
|
5656
5703
|
properties: schema.properties ?? {},
|
|
5657
5704
|
required: schema.required ?? []
|
|
5658
5705
|
},
|
|
5706
|
+
...deferLoading ? { defer_loading: true } : {},
|
|
5659
5707
|
...cacheControl && index === tools.length - 1 ? { cache_control: cacheControl } : {}
|
|
5660
5708
|
};
|
|
5661
5709
|
});
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
initSlackApp,
|
|
4
4
|
startSlackApp,
|
|
5
5
|
stopSlackApp
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-ctdx3h19.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-rp04sjbc.js";
|
|
13
13
|
import"./cli-z2zcxes1.js";
|
|
14
14
|
import"./cli-bw80ck94.js";
|
|
15
15
|
import"./cli-xz9aq0rf.js";
|
|
16
|
-
import"./cli-
|
|
16
|
+
import"./cli-5sexkty0.js";
|
|
17
17
|
import"./cli-4j2mrzag.js";
|
|
18
18
|
import"./cli-e15jhafb.js";
|
|
19
19
|
import"./cli-7wmybrt5.js";
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bufferThreadMessage,
|
|
3
3
|
wasEventSeen
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-qh6dfg7b.js";
|
|
5
5
|
import {
|
|
6
6
|
hasOtherUserMention
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-4ntm7f2r.js";
|
|
8
8
|
import {
|
|
9
9
|
require_dist
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-ctdx3h19.js";
|
|
11
11
|
import"./cli-rkndnn90.js";
|
|
12
12
|
import"./cli-b0p7rfnd.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveSlackUserId,
|
|
15
15
|
rewriteSlackMentions
|
|
16
|
-
} from "./cli-
|
|
17
|
-
import"./cli-
|
|
16
|
+
} from "./cli-zn7x1nkq.js";
|
|
17
|
+
import"./cli-xv365pmn.js";
|
|
18
18
|
import {
|
|
19
19
|
createTaskWithSiblingAwareness
|
|
20
|
-
} from "./cli-
|
|
20
|
+
} from "./cli-wejdajv9.js";
|
|
21
21
|
import"./cli-ma04faw5.js";
|
|
22
22
|
import"./cli-wspgs9bt.js";
|
|
23
23
|
import"./cli-dh55d5fg.js";
|
|
@@ -30,11 +30,11 @@ import {
|
|
|
30
30
|
init_resolver,
|
|
31
31
|
resolveTemplate,
|
|
32
32
|
slackContextKey
|
|
33
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-rp04sjbc.js";
|
|
34
34
|
import"./cli-z2zcxes1.js";
|
|
35
35
|
import"./cli-bw80ck94.js";
|
|
36
36
|
import"./cli-xz9aq0rf.js";
|
|
37
|
-
import"./cli-
|
|
37
|
+
import"./cli-5sexkty0.js";
|
|
38
38
|
import"./cli-4j2mrzag.js";
|
|
39
39
|
import"./cli-e15jhafb.js";
|
|
40
40
|
import"./cli-7wmybrt5.js";
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
convertResponsesMessages,
|
|
3
3
|
convertResponsesTools,
|
|
4
4
|
processResponsesStream
|
|
5
|
-
} from "./cli-
|
|
6
|
-
import"./cli-5m9j2spm.js";
|
|
5
|
+
} from "./cli-wr706gez.js";
|
|
7
6
|
import {
|
|
8
7
|
clampOpenAIPromptCacheKey
|
|
9
8
|
} from "./cli-mrptpp86.js";
|
|
9
|
+
import"./cli-5m9j2spm.js";
|
|
10
10
|
import {
|
|
11
11
|
AzureOpenAI
|
|
12
12
|
} from "./cli-sajgpkqg.js";
|
|
@@ -20,20 +20,23 @@ import {
|
|
|
20
20
|
} from "./cli-pscrc6tw.js";
|
|
21
21
|
import {
|
|
22
22
|
buildBaseOptions
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-e0y603nn.js";
|
|
24
|
+
import"./cli-y2apkfe2.js";
|
|
24
25
|
import {
|
|
25
26
|
headersToRecord
|
|
26
27
|
} from "./cli-vapyk8sw.js";
|
|
27
|
-
import"./cli-y2apkfe2.js";
|
|
28
28
|
import {
|
|
29
|
-
AssistantMessageEventStream,
|
|
30
29
|
clampThinkingLevel
|
|
31
|
-
} from "./cli-
|
|
30
|
+
} from "./cli-1arw00dp.js";
|
|
31
|
+
import {
|
|
32
|
+
AssistantMessageEventStream
|
|
33
|
+
} from "./cli-qs7nb3zn.js";
|
|
32
34
|
import"./cli-p9swy5t3.js";
|
|
33
35
|
|
|
34
36
|
// node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js
|
|
35
37
|
var DEFAULT_AZURE_API_VERSION = "v1";
|
|
36
38
|
var AZURE_TOOL_CALL_PROVIDERS = new Set(["openai", "openai-codex", "opencode", "azure-openai-responses"]);
|
|
39
|
+
var OPENAI_RESPONSES_MIN_OUTPUT_TOKENS = 16;
|
|
37
40
|
function parseDeploymentNameMap(value) {
|
|
38
41
|
const map = new Map;
|
|
39
42
|
if (!value)
|
|
@@ -196,7 +199,7 @@ function buildParams(model, context, options, deploymentName) {
|
|
|
196
199
|
store: false
|
|
197
200
|
};
|
|
198
201
|
if (options?.maxTokens) {
|
|
199
|
-
params.max_output_tokens = options
|
|
202
|
+
params.max_output_tokens = Math.max(options.maxTokens, OPENAI_RESPONSES_MIN_OUTPUT_TOKENS);
|
|
200
203
|
}
|
|
201
204
|
if (options?.temperature !== undefined) {
|
|
202
205
|
params.temperature = options?.temperature;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
embedScript,
|
|
3
3
|
embeddingProvider
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-9rrpjvan.js";
|
|
5
|
+
import"./cli-65anxt77.js";
|
|
6
6
|
import"./cli-q25ejbyn.js";
|
|
7
7
|
import {
|
|
8
8
|
getDb,
|
|
9
9
|
init_db
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-rp04sjbc.js";
|
|
11
11
|
import"./cli-z2zcxes1.js";
|
|
12
12
|
import"./cli-bw80ck94.js";
|
|
13
13
|
import"./cli-xz9aq0rf.js";
|
|
14
|
-
import"./cli-
|
|
14
|
+
import"./cli-5sexkty0.js";
|
|
15
15
|
import"./cli-4j2mrzag.js";
|
|
16
16
|
import"./cli-p9swy5t3.js";
|
|
17
17
|
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
getEmbeddingProvider,
|
|
4
4
|
getMemoryStore,
|
|
5
5
|
init_constants
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-65anxt77.js";
|
|
7
7
|
import"./cli-q25ejbyn.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb,
|
|
10
10
|
init_db
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-rp04sjbc.js";
|
|
12
12
|
import"./cli-z2zcxes1.js";
|
|
13
13
|
import"./cli-bw80ck94.js";
|
|
14
14
|
import"./cli-xz9aq0rf.js";
|
|
15
|
-
import"./cli-
|
|
15
|
+
import"./cli-5sexkty0.js";
|
|
16
16
|
import"./cli-4j2mrzag.js";
|
|
17
17
|
import"./cli-p9swy5t3.js";
|
|
18
18
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDb,
|
|
3
3
|
init_db
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-rp04sjbc.js";
|
|
5
5
|
import"./cli-z2zcxes1.js";
|
|
6
6
|
import"./cli-bw80ck94.js";
|
|
7
7
|
import"./cli-xz9aq0rf.js";
|
|
8
|
-
import"./cli-
|
|
8
|
+
import"./cli-5sexkty0.js";
|
|
9
9
|
import {
|
|
10
10
|
init_secret_scrubber,
|
|
11
11
|
scrubSecrets
|
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
resolveClaudeBinary,
|
|
13
13
|
resolveClaudeBinaryArgv,
|
|
14
14
|
resolveClaudeBridgeEnabled
|
|
15
|
-
} from "./cli-
|
|
16
|
-
import"./cli-tng3131n.js";
|
|
15
|
+
} from "./cli-mw3xpgwb.js";
|
|
17
16
|
import"./cli-psrqtw2m.js";
|
|
17
|
+
import"./cli-tng3131n.js";
|
|
18
18
|
import"./cli-zm7njwzd.js";
|
|
19
19
|
import"./cli-tghre7g6.js";
|
|
20
20
|
import"./cli-e61fs2hp.js";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
checkClaudeManagedCredentials,
|
|
4
4
|
composeManagedUserMessage,
|
|
5
5
|
normalizeRepoUrl
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-2r7s8jhp.js";
|
|
7
7
|
import"./cli-07er7wrs.js";
|
|
8
|
-
import"./cli-d6n0thxw.js";
|
|
9
8
|
import"./cli-yv9dttkh.js";
|
|
9
|
+
import"./cli-d6n0thxw.js";
|
|
10
10
|
import"./cli-gz9sbyk3.js";
|
|
11
11
|
import"./cli-tghre7g6.js";
|
|
12
12
|
import"./cli-4j2mrzag.js";
|