@desplega.ai/agent-swarm 1.135.2 → 1.136.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{actions-3az2vwwn.js → actions-agcbc8nd.js} +6 -6
- package/dist/{app-vygnfvrh.js → app-g2s78xya.js} +3 -3
- package/dist/{assistant-2jr2frrm.js → assistant-yd3jkb9d.js} +8 -8
- package/dist/{boot-reembed-y7r9cxt0.js → boot-reembed-6spqw4q0.js} +3 -3
- package/dist/{boot-reembed-ncbg16rb.js → boot-reembed-b22s9w5x.js} +4 -4
- package/dist/{boot-scrub-logs-t82rwa0y.js → boot-scrub-logs-6h3cqkc0.js} +2 -2
- package/dist/{claude-adapter-vvx2aw3v.js → claude-adapter-ng5y8zd7.js} +4 -4
- package/dist/{cli-mfa2eaef.js → cli-35jknh9e.js} +5 -5
- package/dist/{cli-cv2vjg2y.js → cli-3y553gws.js} +1 -1
- package/dist/{cli-nhvym0d2.js → cli-4gzv54ss.js} +15 -6
- package/dist/{cli-4dakdn30.js → cli-4r4jkqep.js} +6 -6
- package/dist/{cli-83razmqg.js → cli-54ht104h.js} +3 -3
- package/dist/{cli-6290n4yz.js → cli-5bnz1t86.js} +1 -1
- package/dist/{cli-6bz2hzvw.js → cli-68vayryq.js} +2 -2
- package/dist/{cli-1z01xdqh.js → cli-6gwgzdgw.js} +2 -2
- package/dist/{cli-1dfatkzm.js → cli-84vrhesc.js} +1 -1
- package/dist/{cli-jfrh963q.js → cli-8v57p983.js} +10 -10
- package/dist/{cli-3f0tnh34.js → cli-ads0hfw2.js} +81 -23
- package/dist/{cli-fmha74ga.js → cli-bnq8h7ea.js} +3 -3
- package/dist/{cli-j3xnd5b4.js → cli-d5ygfv18.js} +7 -6
- package/dist/{cli-8f4h27gm.js → cli-edwrx42s.js} +1 -1
- package/dist/{cli-r5vwg1ma.js → cli-fpjmcbhz.js} +4 -4
- package/dist/{cli-w0ygcv43.js → cli-gpdtxzar.js} +6 -4
- package/dist/{cli-4rdjdddh.js → cli-hz5hp6wn.js} +1 -1
- package/dist/{cli-6mmwmy45.js → cli-j7qp8gtf.js} +1 -1
- package/dist/{cli-5a5nrq3g.js → cli-jjhnma34.js} +5 -5
- package/dist/{cli-ey09krp2.js → cli-m3z53bed.js} +1 -1
- package/dist/{cli-cf6vq6qa.js → cli-mgef08pc.js} +1 -1
- package/dist/{cli-0jhyxtdj.js → cli-qckgdqmr.js} +2 -2
- package/dist/{cli-a1zrc2g6.js → cli-qhfkxrpg.js} +108 -33
- package/dist/{cli-yw2z5kj9.js → cli-spf767vc.js} +1 -1
- package/dist/{cli-1857msnd.js → cli-tee8w7tq.js} +1 -1
- package/dist/{cli-qxn3g3yx.js → cli-tmn19cdz.js} +61 -6
- package/dist/{cli-7ccy0h4r.js → cli-y16cesaq.js} +2 -2
- package/dist/{cli-cm4z7w7w.js → cli-z6e8eqrm.js} +2 -2
- package/dist/cli.js +16 -16
- package/dist/{codex-adapter-6p290yq3.js → codex-adapter-kw11ps3j.js} +2 -2
- package/dist/{codex-session-runner-7b3dhpmx.js → codex-session-runner-sffb69v7.js} +2 -2
- package/dist/{commands-wxg1g4nq.js → commands-0xxp4tz8.js} +2 -2
- package/dist/{db-8fqeheve.js → db-0npp39zd.js} +6 -2
- package/dist/{handlers-gwtqp17c.js → handlers-5p7a1jx6.js} +15 -9
- package/dist/{hook-gd9fwfp0.js → hook-hpefr0a8.js} +2 -2
- package/dist/{hook-mrqygs7p.js → hook-jjpxn4se.js} +3 -3
- package/dist/{http-x4mc1mqg.js → http-wfp33653.js} +322 -61
- package/dist/{index-yd654kac.js → index-17h657rg.js} +12 -8
- package/dist/{index-pzgasj16.js → index-m2p7ctyh.js} +10 -10
- package/dist/{index-2mdqrd0n.js → index-racb4wfq.js} +9 -9
- package/dist/{index-4djjkp9z.js → index-zh66wm65.js} +8 -8
- package/dist/{keepalive-3tycspcy.js → keepalive-wxjd633a.js} +4 -4
- package/dist/{lead-js1h3z7d.js → lead-359ec2z0.js} +23 -23
- package/dist/{maintenance-y91ry8q4.js → maintenance-rr03qjtb.js} +4 -4
- package/dist/{mistral-conversations-hdmnkf6h.js → mistral-conversations-qdrnmrb8.js} +1 -1
- package/dist/{oauth-refresh-sweep-s33gtxrw.js → oauth-refresh-sweep-jwj22yb8.js} +3 -3
- package/dist/{onboard-vndj64mb.js → onboard-asnhchcv.js} +2 -2
- package/dist/{openai-completions-cwy2kkzg.js → openai-completions-yzftqrft.js} +33 -4
- package/dist/{otel-impl-d2p84k6e.js → otel-impl-54cra6mw.js} +18 -4
- package/dist/{pi-mono-adapter-1phspz2y.js → pi-mono-adapter-29g7axgj.js} +669 -335
- package/dist/{pricing-refresh-c2bwsyk5.js → pricing-refresh-mkyy7c2y.js} +4 -4
- package/dist/{rbac-roles-2pedz5e9.js → rbac-roles-ak56tr75.js} +2 -2
- package/dist/{rbac-roles-reef5y2d.js → rbac-roles-kb3afm95.js} +3 -3
- package/dist/{render-v2-zd5r5wgf.js → render-v2-434asg49.js} +3 -3
- package/dist/{seed-pricing-2kyk1vhg.js → seed-pricing-nbmd7ah8.js} +3 -3
- package/dist/{setup-5ys9pwyr.js → setup-wh4qmjs4.js} +2 -2
- package/dist/{worker-nb1f7k04.js → worker-j1d27tjv.js} +23 -23
- package/openapi.json +167 -2
- package/package.json +6 -6
- package/src/be/db-retention.ts +275 -0
- package/src/be/db.ts +82 -7
- package/src/be/swarm-config-guard.ts +30 -0
- package/src/heartbeat/heartbeat.ts +21 -0
- package/src/http/index.ts +33 -33
- package/src/http/route-def.ts +93 -4
- package/src/http/stats.ts +37 -1
- package/src/http/tasks.ts +93 -0
- package/src/http/utils.ts +94 -0
- package/src/otel-impl.ts +21 -3
- package/src/otel.ts +15 -4
- package/src/slack/blocks.ts +1 -0
- package/src/slack/handlers.ts +7 -0
- package/src/tasks/sibling-awareness.ts +1 -0
- package/src/tasks/sibling-block.ts +17 -4
- package/src/tests/artifact-sdk.test.ts +20 -15
- package/src/tests/db-retention.test.ts +344 -0
- package/src/tests/docs-index-footprint.test.js +4 -5
- package/src/tests/draft-task-dispatch-race.test.ts +189 -0
- package/src/tests/events-http.test.ts +70 -27
- package/src/tests/otel-abort-span.test.ts +156 -0
- package/src/tests/otel-span-kind.test.ts +59 -0
- package/src/tests/promote-draft-task-route.test.ts +175 -0
- package/src/tests/route-def-find-route.test.ts +90 -4
- package/src/tests/sibling-block.test.ts +29 -1
- package/src/tests/slack-assistant-comention-production.test.ts +7 -1
- package/src/tests/steering-enabled.test.ts +6 -0
- package/src/tests/swarm-config-reserved-keys.test.ts +27 -0
- package/src/types.ts +2 -1
- package/templates/skills/swarm-scripts/SKILL.md +4 -0
- package/templates/skills/swarm-scripts/content.md +4 -0
|
@@ -3,20 +3,20 @@ import {
|
|
|
3
3
|
extractArgsJsonSchema,
|
|
4
4
|
extractScriptSignature,
|
|
5
5
|
typecheckScript
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
6
|
+
} from "./cli-54ht104h.js";
|
|
7
|
+
import"./cli-68vayryq.js";
|
|
8
8
|
import {
|
|
9
9
|
getScript,
|
|
10
10
|
upsertScriptByName,
|
|
11
11
|
validateScriptImports
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-bnq8h7ea.js";
|
|
13
13
|
import"./cli-epan13p1.js";
|
|
14
14
|
import"./cli-f14fvzag.js";
|
|
15
|
-
import"./cli-
|
|
16
|
-
import"./cli-
|
|
15
|
+
import"./cli-qckgdqmr.js";
|
|
16
|
+
import"./cli-hz5hp6wn.js";
|
|
17
17
|
import"./cli-dr5tcz68.js";
|
|
18
18
|
import"./cli-vsap7a8d.js";
|
|
19
|
-
import"./cli-
|
|
19
|
+
import"./cli-m3z53bed.js";
|
|
20
20
|
import {
|
|
21
21
|
computeContentHash,
|
|
22
22
|
createSkill,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
init_db,
|
|
28
28
|
updateSkill,
|
|
29
29
|
upsertSkillFiles
|
|
30
|
-
} from "./cli-
|
|
30
|
+
} from "./cli-tmn19cdz.js";
|
|
31
31
|
import"./cli-d2epf5ae.js";
|
|
32
32
|
import"./cli-87zrjxdb.js";
|
|
33
33
|
import"./cli-a1rrkrb4.js";
|
|
@@ -35,7 +35,7 @@ import"./cli-qt5bt3vk.js";
|
|
|
35
35
|
import"./cli-nanaxrz6.js";
|
|
36
36
|
import"./cli-s35981d0.js";
|
|
37
37
|
import"./cli-mkq1rk7b.js";
|
|
38
|
-
import"./cli-
|
|
38
|
+
import"./cli-4r4jkqep.js";
|
|
39
39
|
import"./cli-pqv5gvyf.js";
|
|
40
40
|
import"./cli-pq2ee5ja.js";
|
|
41
41
|
|
|
@@ -10132,6 +10132,10 @@ function rowsToObjects(res: any): any[] {
|
|
|
10132
10132
|
}
|
|
10133
10133
|
\`\`\`
|
|
10134
10134
|
|
|
10135
|
+
### Concurrency limit
|
|
10136
|
+
|
|
10137
|
+
\`ctx.swarm.db_query\` throttles at about three concurrent calls. A wider \`Promise.all\` fan-out can return 429 responses with no \`rows\` key, so \`res?.data?.rows ?? []\` misreads throttling as a clean zero. Check the response status and \`data.error\` before reading \`rows\`. Serialize queries or cap concurrency at three.
|
|
10138
|
+
|
|
10135
10139
|
Common tables: \`agent_tasks\`, \`session_logs\`, \`agent_memory\`, \`scheduled_tasks\`, \`agents\`. \`session_logs\` has no \`tool_name\` column. Tool names sit inside the \`content\` JSON column. Extract them with \`instr\` and \`substr\` in SQL, or parse the JSON in the script.
|
|
10136
10140
|
|
|
10137
10141
|
## Progress from a script
|
|
@@ -4,22 +4,22 @@ import {
|
|
|
4
4
|
runRebootSweep,
|
|
5
5
|
startHeartbeat,
|
|
6
6
|
stopHeartbeat
|
|
7
|
-
} from "./cli-
|
|
8
|
-
import"./cli-
|
|
7
|
+
} from "./cli-4gzv54ss.js";
|
|
8
|
+
import"./cli-5bnz1t86.js";
|
|
9
9
|
import"./cli-qh4sqfws.js";
|
|
10
|
-
import"./cli-
|
|
10
|
+
import"./cli-jjhnma34.js";
|
|
11
11
|
import"./cli-3dpj7atn.js";
|
|
12
|
-
import"./cli-
|
|
12
|
+
import"./cli-bnq8h7ea.js";
|
|
13
13
|
import"./cli-epan13p1.js";
|
|
14
14
|
import"./cli-f14fvzag.js";
|
|
15
|
-
import"./cli-
|
|
16
|
-
import"./cli-
|
|
15
|
+
import"./cli-qckgdqmr.js";
|
|
16
|
+
import"./cli-hz5hp6wn.js";
|
|
17
17
|
import"./cli-dr5tcz68.js";
|
|
18
18
|
import"./cli-vsap7a8d.js";
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
19
|
+
import"./cli-m3z53bed.js";
|
|
20
|
+
import"./cli-gpdtxzar.js";
|
|
21
21
|
import"./cli-5tnr64pm.js";
|
|
22
|
-
import"./cli-
|
|
22
|
+
import"./cli-tmn19cdz.js";
|
|
23
23
|
import"./cli-d2epf5ae.js";
|
|
24
24
|
import"./cli-87zrjxdb.js";
|
|
25
25
|
import"./cli-a1rrkrb4.js";
|
|
@@ -27,7 +27,7 @@ import"./cli-qt5bt3vk.js";
|
|
|
27
27
|
import"./cli-nanaxrz6.js";
|
|
28
28
|
import"./cli-s35981d0.js";
|
|
29
29
|
import"./cli-mkq1rk7b.js";
|
|
30
|
-
import"./cli-
|
|
30
|
+
import"./cli-4r4jkqep.js";
|
|
31
31
|
import"./cli-pqv5gvyf.js";
|
|
32
32
|
import"./cli-95m51ztz.js";
|
|
33
33
|
import"./cli-pq2ee5ja.js";
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
runScheduleNow,
|
|
5
5
|
startScheduler,
|
|
6
6
|
stopScheduler
|
|
7
|
-
} from "./cli-
|
|
8
|
-
import"./cli-
|
|
7
|
+
} from "./cli-fpjmcbhz.js";
|
|
8
|
+
import"./cli-jjhnma34.js";
|
|
9
9
|
import"./cli-3dpj7atn.js";
|
|
10
|
-
import"./cli-
|
|
10
|
+
import"./cli-bnq8h7ea.js";
|
|
11
11
|
import"./cli-epan13p1.js";
|
|
12
12
|
import"./cli-f14fvzag.js";
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
13
|
+
import"./cli-qckgdqmr.js";
|
|
14
|
+
import"./cli-hz5hp6wn.js";
|
|
15
15
|
import"./cli-dr5tcz68.js";
|
|
16
16
|
import"./cli-vsap7a8d.js";
|
|
17
|
-
import"./cli-
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
17
|
+
import"./cli-m3z53bed.js";
|
|
18
|
+
import"./cli-gpdtxzar.js";
|
|
19
|
+
import"./cli-tmn19cdz.js";
|
|
20
20
|
import"./cli-d2epf5ae.js";
|
|
21
21
|
import"./cli-87zrjxdb.js";
|
|
22
22
|
import"./cli-a1rrkrb4.js";
|
|
@@ -24,7 +24,7 @@ import"./cli-qt5bt3vk.js";
|
|
|
24
24
|
import"./cli-nanaxrz6.js";
|
|
25
25
|
import"./cli-s35981d0.js";
|
|
26
26
|
import"./cli-mkq1rk7b.js";
|
|
27
|
-
import"./cli-
|
|
27
|
+
import"./cli-4r4jkqep.js";
|
|
28
28
|
import"./cli-pqv5gvyf.js";
|
|
29
29
|
import"./cli-95m51ztz.js";
|
|
30
30
|
import"./cli-pq2ee5ja.js";
|
|
@@ -21,18 +21,18 @@ import {
|
|
|
21
21
|
stopWaitPoller,
|
|
22
22
|
subscribeWaitToBus,
|
|
23
23
|
validateTemplateVariables
|
|
24
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-jjhnma34.js";
|
|
25
25
|
import"./cli-3dpj7atn.js";
|
|
26
|
-
import"./cli-
|
|
26
|
+
import"./cli-bnq8h7ea.js";
|
|
27
27
|
import"./cli-epan13p1.js";
|
|
28
28
|
import"./cli-f14fvzag.js";
|
|
29
|
-
import"./cli-
|
|
30
|
-
import"./cli-
|
|
29
|
+
import"./cli-qckgdqmr.js";
|
|
30
|
+
import"./cli-hz5hp6wn.js";
|
|
31
31
|
import"./cli-dr5tcz68.js";
|
|
32
32
|
import"./cli-vsap7a8d.js";
|
|
33
|
-
import"./cli-
|
|
34
|
-
import"./cli-
|
|
35
|
-
import"./cli-
|
|
33
|
+
import"./cli-m3z53bed.js";
|
|
34
|
+
import"./cli-gpdtxzar.js";
|
|
35
|
+
import"./cli-tmn19cdz.js";
|
|
36
36
|
import"./cli-d2epf5ae.js";
|
|
37
37
|
import {
|
|
38
38
|
interpolate
|
|
@@ -42,7 +42,7 @@ import"./cli-qt5bt3vk.js";
|
|
|
42
42
|
import"./cli-nanaxrz6.js";
|
|
43
43
|
import"./cli-s35981d0.js";
|
|
44
44
|
import"./cli-mkq1rk7b.js";
|
|
45
|
-
import"./cli-
|
|
45
|
+
import"./cli-4r4jkqep.js";
|
|
46
46
|
import"./cli-pqv5gvyf.js";
|
|
47
47
|
import {
|
|
48
48
|
workflowEventBus
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureAuthorizationTokenOrThrow,
|
|
3
3
|
listKeepAliveAuthorizations
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-m3z53bed.js";
|
|
5
|
+
import"./cli-tmn19cdz.js";
|
|
6
6
|
import"./cli-d2epf5ae.js";
|
|
7
7
|
import"./cli-87zrjxdb.js";
|
|
8
8
|
import"./cli-a1rrkrb4.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
init_secret_scrubber,
|
|
14
14
|
scrubSecrets
|
|
15
15
|
} from "./cli-mkq1rk7b.js";
|
|
16
|
-
import"./cli-
|
|
16
|
+
import"./cli-4r4jkqep.js";
|
|
17
17
|
import"./cli-pqv5gvyf.js";
|
|
18
18
|
import {
|
|
19
19
|
__require
|
|
@@ -65,7 +65,7 @@ async function notifySlack(text) {
|
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
67
|
try {
|
|
68
|
-
const { getSlackApp } = await import("./app-
|
|
68
|
+
const { getSlackApp } = await import("./app-g2s78xya.js");
|
|
69
69
|
const app = getSlackApp();
|
|
70
70
|
if (!app) {
|
|
71
71
|
console.warn("[OAuth Keepalive] Slack not available, cannot send notification");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-8v57p983.js";
|
|
4
4
|
import"./cli-tdtmw1r5.js";
|
|
5
|
-
import"./cli-
|
|
5
|
+
import"./cli-j7qp8gtf.js";
|
|
6
6
|
import"./cli-0crn5kaz.js";
|
|
7
7
|
import"./cli-hsxj0yar.js";
|
|
8
8
|
import"./cli-9b13ggd1.js";
|
|
@@ -10,10 +10,10 @@ import"./cli-06ghj6pe.js";
|
|
|
10
10
|
import"./cli-f3s9dry0.js";
|
|
11
11
|
import"./cli-r94z9p1z.js";
|
|
12
12
|
import"./cli-f64gdfxc.js";
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
13
|
+
import"./cli-edwrx42s.js";
|
|
14
|
+
import"./cli-6gwgzdgw.js";
|
|
15
15
|
import"./cli-a3pkfpqs.js";
|
|
16
|
-
import"./cli-
|
|
16
|
+
import"./cli-qhfkxrpg.js";
|
|
17
17
|
import"./cli-hp1n6zq3.js";
|
|
18
18
|
import"./cli-tng3131n.js";
|
|
19
19
|
import"./cli-zm7njwzd.js";
|
|
@@ -21,41 +21,41 @@ import"./cli-cw70hymf.js";
|
|
|
21
21
|
import"./cli-v1mwc5v2.js";
|
|
22
22
|
import {
|
|
23
23
|
getEnabledCapabilities
|
|
24
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-ads0hfw2.js";
|
|
25
25
|
import"./cli-mnm7w46e.js";
|
|
26
26
|
import"./cli-jepmgn7r.js";
|
|
27
27
|
import"./cli-8p37s71j.js";
|
|
28
28
|
import"./cli-e7d20cty.js";
|
|
29
29
|
import"./cli-8whqavk2.js";
|
|
30
|
-
import"./cli-
|
|
30
|
+
import"./cli-5bnz1t86.js";
|
|
31
31
|
import"./cli-qh4sqfws.js";
|
|
32
|
-
import"./cli-
|
|
33
|
-
import"./cli-
|
|
34
|
-
import"./cli-
|
|
35
|
-
import"./cli-
|
|
32
|
+
import"./cli-fpjmcbhz.js";
|
|
33
|
+
import"./cli-z6e8eqrm.js";
|
|
34
|
+
import"./cli-tee8w7tq.js";
|
|
35
|
+
import"./cli-3y553gws.js";
|
|
36
36
|
import"./cli-s9yg23fg.js";
|
|
37
|
-
import"./cli-
|
|
38
|
-
import"./cli-
|
|
37
|
+
import"./cli-68vayryq.js";
|
|
38
|
+
import"./cli-jjhnma34.js";
|
|
39
39
|
import"./cli-3dpj7atn.js";
|
|
40
|
-
import"./cli-
|
|
40
|
+
import"./cli-bnq8h7ea.js";
|
|
41
41
|
import"./cli-epan13p1.js";
|
|
42
42
|
import"./cli-f14fvzag.js";
|
|
43
|
-
import"./cli-
|
|
44
|
-
import"./cli-
|
|
43
|
+
import"./cli-qckgdqmr.js";
|
|
44
|
+
import"./cli-hz5hp6wn.js";
|
|
45
45
|
import"./cli-dr5tcz68.js";
|
|
46
46
|
import"./cli-vsap7a8d.js";
|
|
47
|
-
import"./cli-
|
|
47
|
+
import"./cli-m3z53bed.js";
|
|
48
48
|
import"./cli-fad8m16k.js";
|
|
49
49
|
import"./cli-fhsz3twr.js";
|
|
50
50
|
import"./cli-whrvct19.js";
|
|
51
|
-
import"./cli-
|
|
52
|
-
import"./cli-
|
|
53
|
-
import"./cli-
|
|
54
|
-
import"./cli-
|
|
51
|
+
import"./cli-84vrhesc.js";
|
|
52
|
+
import"./cli-spf767vc.js";
|
|
53
|
+
import"./cli-gpdtxzar.js";
|
|
54
|
+
import"./cli-d5ygfv18.js";
|
|
55
55
|
import"./cli-qf9kpsve.js";
|
|
56
56
|
import"./cli-g2p9bd1z.js";
|
|
57
57
|
import"./cli-5tnr64pm.js";
|
|
58
|
-
import"./cli-
|
|
58
|
+
import"./cli-tmn19cdz.js";
|
|
59
59
|
import"./cli-d2epf5ae.js";
|
|
60
60
|
import"./cli-87zrjxdb.js";
|
|
61
61
|
import"./cli-a1rrkrb4.js";
|
|
@@ -63,7 +63,7 @@ import"./cli-qt5bt3vk.js";
|
|
|
63
63
|
import"./cli-nanaxrz6.js";
|
|
64
64
|
import"./cli-s35981d0.js";
|
|
65
65
|
import"./cli-mkq1rk7b.js";
|
|
66
|
-
import"./cli-
|
|
66
|
+
import"./cli-4r4jkqep.js";
|
|
67
67
|
import"./cli-pqv5gvyf.js";
|
|
68
68
|
import"./cli-qntkxysp.js";
|
|
69
69
|
import"./cli-95m51ztz.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
reembedAllScripts
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
} from "./cli-qckgdqmr.js";
|
|
4
|
+
import"./cli-hz5hp6wn.js";
|
|
5
5
|
import"./cli-dr5tcz68.js";
|
|
6
6
|
import"./cli-vsap7a8d.js";
|
|
7
|
-
import"./cli-
|
|
7
|
+
import"./cli-tmn19cdz.js";
|
|
8
8
|
import"./cli-d2epf5ae.js";
|
|
9
9
|
import"./cli-87zrjxdb.js";
|
|
10
10
|
import"./cli-a1rrkrb4.js";
|
|
@@ -12,7 +12,7 @@ import"./cli-qt5bt3vk.js";
|
|
|
12
12
|
import"./cli-nanaxrz6.js";
|
|
13
13
|
import"./cli-s35981d0.js";
|
|
14
14
|
import"./cli-mkq1rk7b.js";
|
|
15
|
-
import"./cli-
|
|
15
|
+
import"./cli-4r4jkqep.js";
|
|
16
16
|
import"./cli-pqv5gvyf.js";
|
|
17
17
|
import"./cli-pq2ee5ja.js";
|
|
18
18
|
|
|
@@ -507,7 +507,7 @@ async function consumeChatStream(model, output, stream2, mistralStream) {
|
|
|
507
507
|
currentBlock = null;
|
|
508
508
|
}
|
|
509
509
|
const callId = toolCall.id && toolCall.id !== "null" ? toolCall.id : deriveMistralToolCallId(`toolcall:${toolCall.index ?? 0}`, 0);
|
|
510
|
-
const key =
|
|
510
|
+
const key = toolCall.index ?? callId;
|
|
511
511
|
const existingIndex = toolBlocksByKey.get(key);
|
|
512
512
|
let block;
|
|
513
513
|
if (existingIndex !== undefined) {
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
forceRefreshAuthorizationOrThrow,
|
|
3
3
|
getAuthorizationById,
|
|
4
4
|
listAuthorizationSweepRows
|
|
5
|
-
} from "./cli-
|
|
6
|
-
import"./cli-
|
|
5
|
+
} from "./cli-m3z53bed.js";
|
|
6
|
+
import"./cli-tmn19cdz.js";
|
|
7
7
|
import"./cli-d2epf5ae.js";
|
|
8
8
|
import"./cli-87zrjxdb.js";
|
|
9
9
|
import"./cli-a1rrkrb4.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
init_secret_scrubber,
|
|
15
15
|
scrubSecrets
|
|
16
16
|
} from "./cli-mkq1rk7b.js";
|
|
17
|
-
import"./cli-
|
|
17
|
+
import"./cli-4r4jkqep.js";
|
|
18
18
|
import"./cli-pqv5gvyf.js";
|
|
19
19
|
import"./cli-pq2ee5ja.js";
|
|
20
20
|
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
createDefaultMcpJson,
|
|
4
4
|
createDefaultSettingsLocal,
|
|
5
5
|
createHooksConfig
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-mgef08pc.js";
|
|
7
7
|
import {
|
|
8
8
|
require_jsx_dev_runtime
|
|
9
9
|
} from "./cli-6t2fgxpv.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
init_package,
|
|
15
15
|
package_default
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-4r4jkqep.js";
|
|
17
17
|
import {
|
|
18
18
|
Box_default,
|
|
19
19
|
Select,
|
|
@@ -157,6 +157,26 @@ function parseLegacyEncryptedReasoningDetail(signature) {
|
|
|
157
157
|
return;
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
+
function fillMissingCommonReasoningDetailFields(target, source) {
|
|
161
|
+
target.id ??= source.id;
|
|
162
|
+
target.format ||= source.format;
|
|
163
|
+
target.index ??= source.index;
|
|
164
|
+
}
|
|
165
|
+
function appendOpenAIReasoningDetail(details, detail) {
|
|
166
|
+
const lastDetail = details[details.length - 1];
|
|
167
|
+
if (detail.type === "reasoning.text" && lastDetail?.type === "reasoning.text") {
|
|
168
|
+
lastDetail.text += detail.text;
|
|
169
|
+
lastDetail.signature ||= detail.signature;
|
|
170
|
+
fillMissingCommonReasoningDetailFields(lastDetail, detail);
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
if (detail.type === "reasoning.summary" && lastDetail?.type === "reasoning.summary") {
|
|
174
|
+
lastDetail.summary += detail.summary;
|
|
175
|
+
fillMissingCommonReasoningDetailFields(lastDetail, detail);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
details.push({ ...detail });
|
|
179
|
+
}
|
|
160
180
|
var OPENAI_COMPLETIONS_REASONING_FIELDS = ["reasoning", "reasoning_content", "reasoning_text"];
|
|
161
181
|
function isOpenAICompletionsReasoningField(field) {
|
|
162
182
|
return OPENAI_COMPLETIONS_REASONING_FIELDS.includes(field);
|
|
@@ -190,6 +210,12 @@ var stream = (model, context, options) => {
|
|
|
190
210
|
stopReason: "pending",
|
|
191
211
|
timestamp: Date.now()
|
|
192
212
|
};
|
|
213
|
+
let streamedReasoningDetails;
|
|
214
|
+
const applyStreamedReasoningDetails = (block) => {
|
|
215
|
+
if (streamedReasoningDetails !== undefined) {
|
|
216
|
+
block.thinkingSignature = JSON.stringify(streamedReasoningDetails);
|
|
217
|
+
}
|
|
218
|
+
};
|
|
193
219
|
try {
|
|
194
220
|
const apiKey = getClientApiKey(model.provider, options?.apiKey, options?.headers);
|
|
195
221
|
const compat = getCompat(model);
|
|
@@ -249,6 +275,7 @@ var stream = (model, context, options) => {
|
|
|
249
275
|
partial: output
|
|
250
276
|
});
|
|
251
277
|
} else if (block.type === "thinking") {
|
|
278
|
+
applyStreamedReasoningDetails(block);
|
|
252
279
|
stream2.push({
|
|
253
280
|
type: "thinking_end",
|
|
254
281
|
contentIndex,
|
|
@@ -446,10 +473,9 @@ var stream = (model, context, options) => {
|
|
|
446
473
|
for (const detail of reasoningDetails) {
|
|
447
474
|
if (!isOpenAIReasoningDetail(detail))
|
|
448
475
|
continue;
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
block.thinkingSignature = JSON.stringify(preservedDetails);
|
|
476
|
+
ensureThinkingBlock("");
|
|
477
|
+
streamedReasoningDetails ??= [];
|
|
478
|
+
appendOpenAIReasoningDetail(streamedReasoningDetails, detail);
|
|
453
479
|
}
|
|
454
480
|
}
|
|
455
481
|
}
|
|
@@ -476,6 +502,9 @@ var stream = (model, context, options) => {
|
|
|
476
502
|
stream2.end();
|
|
477
503
|
} catch (error) {
|
|
478
504
|
for (const block of output.content) {
|
|
505
|
+
if (block.type === "thinking") {
|
|
506
|
+
applyStreamedReasoningDetails(block);
|
|
507
|
+
}
|
|
479
508
|
delete block.index;
|
|
480
509
|
delete block.partialArgs;
|
|
481
510
|
delete block.customInput;
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
init_package,
|
|
13
13
|
package_default
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-4r4jkqep.js";
|
|
15
15
|
import {
|
|
16
16
|
exports_supports_color,
|
|
17
17
|
init_supports_color
|
|
@@ -51461,9 +51461,19 @@ async function withSpan(name, fn, attributes) {
|
|
|
51461
51461
|
}
|
|
51462
51462
|
});
|
|
51463
51463
|
}
|
|
51464
|
-
|
|
51465
|
-
|
|
51466
|
-
|
|
51464
|
+
var SPAN_KIND_MAP = {
|
|
51465
|
+
internal: import_api.SpanKind.INTERNAL,
|
|
51466
|
+
server: import_api.SpanKind.SERVER,
|
|
51467
|
+
client: import_api.SpanKind.CLIENT,
|
|
51468
|
+
producer: import_api.SpanKind.PRODUCER,
|
|
51469
|
+
consumer: import_api.SpanKind.CONSUMER
|
|
51470
|
+
};
|
|
51471
|
+
var tracerOverrideForTests;
|
|
51472
|
+
function startSpan(name, attributes, options) {
|
|
51473
|
+
const tracer = tracerOverrideForTests ?? import_api.trace.getTracer(TRACER_NAME);
|
|
51474
|
+
const span = tracer.startSpan(name, {
|
|
51475
|
+
attributes: cleanAttributes(attributes),
|
|
51476
|
+
kind: options?.kind ? SPAN_KIND_MAP[options.kind] : undefined
|
|
51467
51477
|
});
|
|
51468
51478
|
return spanAdapter(span);
|
|
51469
51479
|
}
|
|
@@ -51529,8 +51539,12 @@ function _injectCountersForTests(cost, token, drift) {
|
|
|
51529
51539
|
tokenCounter = token;
|
|
51530
51540
|
costDriftCounter = drift;
|
|
51531
51541
|
}
|
|
51542
|
+
function _injectTracerForTests(tracer) {
|
|
51543
|
+
tracerOverrideForTests = tracer;
|
|
51544
|
+
}
|
|
51532
51545
|
export {
|
|
51533
51546
|
_injectCountersForTests,
|
|
51547
|
+
_injectTracerForTests,
|
|
51534
51548
|
boot,
|
|
51535
51549
|
injectTraceContext,
|
|
51536
51550
|
recordSessionCost,
|