@anvia/core 1.7.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +5 -0
  2. package/dist/agent/agent-tool.js +3 -3
  3. package/dist/agent/agent.js +7 -7
  4. package/dist/agent/index.js +10 -10
  5. package/dist/agent/resolved-agent.js +8 -8
  6. package/dist/agent/team/agent-team.js +10 -10
  7. package/dist/agent/team/index.js +10 -10
  8. package/dist/{chunk-6EJHZEXU.js → chunk-3BYFZYEV.js} +5 -5
  9. package/dist/{chunk-VDHMFJCD.js → chunk-3YN5B5UW.js} +2 -2
  10. package/dist/{chunk-LW6F3IGP.js → chunk-5CKB7RQY.js} +2 -2
  11. package/dist/{chunk-MWG2PMTE.js → chunk-F5BPVVC2.js} +2 -2
  12. package/dist/{chunk-W2XPREWL.js → chunk-GI6APIEU.js} +2 -2
  13. package/dist/{chunk-AMPQJMDG.js → chunk-GXVJGJAN.js} +2 -2
  14. package/dist/{chunk-ZRW27E32.js → chunk-KHUWYYOH.js} +4 -4
  15. package/dist/{chunk-HG6ASDNI.js → chunk-LGPXCJJO.js} +2 -2
  16. package/dist/{chunk-KRQ2HFXW.js → chunk-M7X36BQ7.js} +2 -2
  17. package/dist/{chunk-7OHHMYRO.js → chunk-MA3TYOKF.js} +2 -2
  18. package/dist/{chunk-MKY7KTZY.js → chunk-MIPBH5S7.js} +22 -6
  19. package/dist/chunk-MIPBH5S7.js.map +1 -0
  20. package/dist/{chunk-Y7Z5EHJD.js → chunk-NWCJXAE5.js} +4 -4
  21. package/dist/{chunk-YSR6KLCS.js → chunk-V5KBSXAJ.js} +2 -2
  22. package/dist/{chunk-YKWUFYXT.js → chunk-VCOGUS3Q.js} +2 -2
  23. package/dist/{chunk-7NYFTW7I.js → chunk-WBXRVW5I.js} +3 -3
  24. package/dist/completion/generate-completion.js +2 -2
  25. package/dist/completion/index.js +2 -2
  26. package/dist/completion/stream-accumulator.js +1 -1
  27. package/dist/evals/advanced-metrics.js +5 -5
  28. package/dist/evals/cli.js +2 -2
  29. package/dist/evals/index.js +6 -6
  30. package/dist/evals/judge.js +4 -4
  31. package/dist/evals/metrics.js +4 -4
  32. package/dist/evals/runner.js +2 -2
  33. package/dist/extractor/extractor.js +3 -3
  34. package/dist/extractor/index.js +3 -3
  35. package/dist/index.js +12 -12
  36. package/dist/internal/agent-runtime/agent-run.js +5 -5
  37. package/dist/internal/agent-runtime/continuation-state.js +2 -2
  38. package/dist/internal/agent-runtime/interaction-suspension.js +2 -2
  39. package/dist/internal/agent-runtime/memory.js +4 -4
  40. package/dist/internal/agent-runtime/tool-execution.js +2 -2
  41. package/dist/internal/agent.js +8 -8
  42. package/dist/internal/team-runtime/member.js +2 -2
  43. package/dist/internal/team-runtime/run.js +9 -9
  44. package/dist/memory/compaction.js +3 -3
  45. package/dist/memory/index.js +3 -3
  46. package/dist/observability/group.js +2 -2
  47. package/dist/observability/index.js +2 -2
  48. package/dist/pipeline/index.js +4 -4
  49. package/dist/pipeline/pipeline.js +4 -4
  50. package/dist/skills/index.js +2 -2
  51. package/package.json +1 -1
  52. package/dist/chunk-MKY7KTZY.js.map +0 -1
  53. /package/dist/{chunk-6EJHZEXU.js.map → chunk-3BYFZYEV.js.map} +0 -0
  54. /package/dist/{chunk-VDHMFJCD.js.map → chunk-3YN5B5UW.js.map} +0 -0
  55. /package/dist/{chunk-LW6F3IGP.js.map → chunk-5CKB7RQY.js.map} +0 -0
  56. /package/dist/{chunk-MWG2PMTE.js.map → chunk-F5BPVVC2.js.map} +0 -0
  57. /package/dist/{chunk-W2XPREWL.js.map → chunk-GI6APIEU.js.map} +0 -0
  58. /package/dist/{chunk-AMPQJMDG.js.map → chunk-GXVJGJAN.js.map} +0 -0
  59. /package/dist/{chunk-ZRW27E32.js.map → chunk-KHUWYYOH.js.map} +0 -0
  60. /package/dist/{chunk-HG6ASDNI.js.map → chunk-LGPXCJJO.js.map} +0 -0
  61. /package/dist/{chunk-KRQ2HFXW.js.map → chunk-M7X36BQ7.js.map} +0 -0
  62. /package/dist/{chunk-7OHHMYRO.js.map → chunk-MA3TYOKF.js.map} +0 -0
  63. /package/dist/{chunk-Y7Z5EHJD.js.map → chunk-NWCJXAE5.js.map} +0 -0
  64. /package/dist/{chunk-YSR6KLCS.js.map → chunk-V5KBSXAJ.js.map} +0 -0
  65. /package/dist/{chunk-YKWUFYXT.js.map → chunk-VCOGUS3Q.js.map} +0 -0
  66. /package/dist/{chunk-7NYFTW7I.js.map → chunk-WBXRVW5I.js.map} +0 -0
package/README.md CHANGED
@@ -59,6 +59,11 @@ response, a guardrail block, and an interaction that needs application input.
59
59
  Use `@anvia/client`, `@anvia/server`, and `@anvia/react` to deliver agent output to an application UI.
60
60
  Use provider, memory, vector-store, and observability adapters for the infrastructure you choose.
61
61
 
62
+ Streaming completions preserve empty or encrypted reasoning supplied only in the final provider
63
+ response, including Azure Responses streams. Final encrypted details can also enrich matching
64
+ streamed reasoning for replay on subsequent turns. Conflicting text, reasoning, and tool calls still
65
+ fail provider output validation.
66
+
62
67
  For recoverable execution, register a supported agent with the experimental
63
68
  [`@anvia/durable`](../durable/README.md) runtime. Durable tools receive an optional stable
64
69
  `ToolCallContext.operationId` for external idempotency. Direct execution does not supply it.
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createAgentTool
3
- } from "../chunk-VDHMFJCD.js";
4
- import "../chunk-HG6ASDNI.js";
3
+ } from "../chunk-3YN5B5UW.js";
4
+ import "../chunk-LGPXCJJO.js";
5
5
  import "../chunk-57AUTEQ6.js";
6
6
  import "../chunk-6OO5C5GW.js";
7
7
  import "../chunk-GSVOMQEE.js";
8
8
  import "../chunk-4ONUNWGC.js";
9
- import "../chunk-MKY7KTZY.js";
9
+ import "../chunk-MIPBH5S7.js";
10
10
  import "../chunk-XQV3XNVT.js";
11
11
  import "../chunk-JU3RX364.js";
12
12
  import "../chunk-WCJRGYF7.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Agent
3
- } from "../chunk-6EJHZEXU.js";
4
- import "../chunk-ZRW27E32.js";
3
+ } from "../chunk-3BYFZYEV.js";
4
+ import "../chunk-KHUWYYOH.js";
5
5
  import "../chunk-SXE4J43E.js";
6
6
  import "../chunk-C36RVQHF.js";
7
7
  import "../chunk-5IURMWFN.js";
8
8
  import "../chunk-LAIATEUB.js";
9
- import "../chunk-7OHHMYRO.js";
9
+ import "../chunk-MA3TYOKF.js";
10
10
  import "../chunk-PFJN5OIQ.js";
11
11
  import "../chunk-SBWSXEIH.js";
12
12
  import "../chunk-NPJ2T3L5.js";
@@ -19,7 +19,7 @@ import "../chunk-2NLINXRF.js";
19
19
  import "../chunk-ZMAF3I4H.js";
20
20
  import "../chunk-YNA3UR42.js";
21
21
  import "../chunk-H3H74RWJ.js";
22
- import "../chunk-LW6F3IGP.js";
22
+ import "../chunk-5CKB7RQY.js";
23
23
  import "../chunk-LQJ4KHMY.js";
24
24
  import "../chunk-MJCMKZFP.js";
25
25
  import "../chunk-EZR5AV3J.js";
@@ -64,13 +64,13 @@ import "../chunk-NVALGVQG.js";
64
64
  import "../chunk-ZHC5CD6J.js";
65
65
  import "../chunk-5V533R7F.js";
66
66
  import "../chunk-KY4VXIN2.js";
67
- import "../chunk-VDHMFJCD.js";
68
- import "../chunk-HG6ASDNI.js";
67
+ import "../chunk-3YN5B5UW.js";
68
+ import "../chunk-LGPXCJJO.js";
69
69
  import "../chunk-57AUTEQ6.js";
70
70
  import "../chunk-6OO5C5GW.js";
71
71
  import "../chunk-GSVOMQEE.js";
72
72
  import "../chunk-4ONUNWGC.js";
73
- import "../chunk-MKY7KTZY.js";
73
+ import "../chunk-MIPBH5S7.js";
74
74
  import "../chunk-XQV3XNVT.js";
75
75
  import "../chunk-JU3RX364.js";
76
76
  import "../chunk-WCJRGYF7.js";
@@ -1,9 +1,9 @@
1
1
  import "../chunk-53TPAXYR.js";
2
2
  import {
3
3
  AgentTeam
4
- } from "../chunk-7NYFTW7I.js";
4
+ } from "../chunk-WBXRVW5I.js";
5
5
  import "../chunk-X6WS3XWL.js";
6
- import "../chunk-Y7Z5EHJD.js";
6
+ import "../chunk-NWCJXAE5.js";
7
7
  import "../chunk-PIMD4DYG.js";
8
8
  import "../chunk-FSBDE6RF.js";
9
9
  import "../chunk-3TAQXJBC.js";
@@ -12,16 +12,16 @@ import {
12
12
  AgentTeamInteractionError,
13
13
  AgentTeamLimitError
14
14
  } from "../chunk-ENZ2XX27.js";
15
- import "../chunk-KRQ2HFXW.js";
15
+ import "../chunk-M7X36BQ7.js";
16
16
  import {
17
17
  Agent
18
- } from "../chunk-6EJHZEXU.js";
19
- import "../chunk-ZRW27E32.js";
18
+ } from "../chunk-3BYFZYEV.js";
19
+ import "../chunk-KHUWYYOH.js";
20
20
  import "../chunk-SXE4J43E.js";
21
21
  import "../chunk-C36RVQHF.js";
22
22
  import "../chunk-5IURMWFN.js";
23
23
  import "../chunk-LAIATEUB.js";
24
- import "../chunk-7OHHMYRO.js";
24
+ import "../chunk-MA3TYOKF.js";
25
25
  import "../chunk-PFJN5OIQ.js";
26
26
  import "../chunk-SBWSXEIH.js";
27
27
  import "../chunk-NPJ2T3L5.js";
@@ -34,7 +34,7 @@ import "../chunk-2NLINXRF.js";
34
34
  import "../chunk-ZMAF3I4H.js";
35
35
  import "../chunk-YNA3UR42.js";
36
36
  import "../chunk-H3H74RWJ.js";
37
- import "../chunk-LW6F3IGP.js";
37
+ import "../chunk-5CKB7RQY.js";
38
38
  import "../chunk-LQJ4KHMY.js";
39
39
  import "../chunk-MJCMKZFP.js";
40
40
  import "../chunk-EZR5AV3J.js";
@@ -82,13 +82,13 @@ import {
82
82
  } from "../chunk-ZHC5CD6J.js";
83
83
  import "../chunk-5V533R7F.js";
84
84
  import "../chunk-KY4VXIN2.js";
85
- import "../chunk-VDHMFJCD.js";
86
- import "../chunk-HG6ASDNI.js";
85
+ import "../chunk-3YN5B5UW.js";
86
+ import "../chunk-LGPXCJJO.js";
87
87
  import "../chunk-57AUTEQ6.js";
88
88
  import "../chunk-6OO5C5GW.js";
89
89
  import "../chunk-GSVOMQEE.js";
90
90
  import "../chunk-4ONUNWGC.js";
91
- import "../chunk-MKY7KTZY.js";
91
+ import "../chunk-MIPBH5S7.js";
92
92
  import "../chunk-XQV3XNVT.js";
93
93
  import "../chunk-JU3RX364.js";
94
94
  import "../chunk-WCJRGYF7.js";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  createResolvedAgent,
3
3
  getResolvedAgentOptions
4
- } from "../chunk-KRQ2HFXW.js";
5
- import "../chunk-6EJHZEXU.js";
6
- import "../chunk-ZRW27E32.js";
4
+ } from "../chunk-M7X36BQ7.js";
5
+ import "../chunk-3BYFZYEV.js";
6
+ import "../chunk-KHUWYYOH.js";
7
7
  import "../chunk-SXE4J43E.js";
8
8
  import "../chunk-C36RVQHF.js";
9
9
  import "../chunk-5IURMWFN.js";
10
10
  import "../chunk-LAIATEUB.js";
11
- import "../chunk-7OHHMYRO.js";
11
+ import "../chunk-MA3TYOKF.js";
12
12
  import "../chunk-PFJN5OIQ.js";
13
13
  import "../chunk-SBWSXEIH.js";
14
14
  import "../chunk-NPJ2T3L5.js";
@@ -21,7 +21,7 @@ import "../chunk-2NLINXRF.js";
21
21
  import "../chunk-ZMAF3I4H.js";
22
22
  import "../chunk-YNA3UR42.js";
23
23
  import "../chunk-H3H74RWJ.js";
24
- import "../chunk-LW6F3IGP.js";
24
+ import "../chunk-5CKB7RQY.js";
25
25
  import "../chunk-LQJ4KHMY.js";
26
26
  import "../chunk-MJCMKZFP.js";
27
27
  import "../chunk-EZR5AV3J.js";
@@ -66,13 +66,13 @@ import "../chunk-NVALGVQG.js";
66
66
  import "../chunk-ZHC5CD6J.js";
67
67
  import "../chunk-5V533R7F.js";
68
68
  import "../chunk-KY4VXIN2.js";
69
- import "../chunk-VDHMFJCD.js";
70
- import "../chunk-HG6ASDNI.js";
69
+ import "../chunk-3YN5B5UW.js";
70
+ import "../chunk-LGPXCJJO.js";
71
71
  import "../chunk-57AUTEQ6.js";
72
72
  import "../chunk-6OO5C5GW.js";
73
73
  import "../chunk-GSVOMQEE.js";
74
74
  import "../chunk-4ONUNWGC.js";
75
- import "../chunk-MKY7KTZY.js";
75
+ import "../chunk-MIPBH5S7.js";
76
76
  import "../chunk-XQV3XNVT.js";
77
77
  import "../chunk-JU3RX364.js";
78
78
  import "../chunk-WCJRGYF7.js";
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  AgentTeam
3
- } from "../../chunk-7NYFTW7I.js";
3
+ } from "../../chunk-WBXRVW5I.js";
4
4
  import "../../chunk-X6WS3XWL.js";
5
- import "../../chunk-Y7Z5EHJD.js";
5
+ import "../../chunk-NWCJXAE5.js";
6
6
  import "../../chunk-PIMD4DYG.js";
7
7
  import "../../chunk-FSBDE6RF.js";
8
8
  import "../../chunk-3TAQXJBC.js";
9
9
  import "../../chunk-E5MIZ6Z5.js";
10
10
  import "../../chunk-ENZ2XX27.js";
11
- import "../../chunk-KRQ2HFXW.js";
12
- import "../../chunk-6EJHZEXU.js";
13
- import "../../chunk-ZRW27E32.js";
11
+ import "../../chunk-M7X36BQ7.js";
12
+ import "../../chunk-3BYFZYEV.js";
13
+ import "../../chunk-KHUWYYOH.js";
14
14
  import "../../chunk-SXE4J43E.js";
15
15
  import "../../chunk-C36RVQHF.js";
16
16
  import "../../chunk-5IURMWFN.js";
17
17
  import "../../chunk-LAIATEUB.js";
18
- import "../../chunk-7OHHMYRO.js";
18
+ import "../../chunk-MA3TYOKF.js";
19
19
  import "../../chunk-PFJN5OIQ.js";
20
20
  import "../../chunk-SBWSXEIH.js";
21
21
  import "../../chunk-NPJ2T3L5.js";
@@ -28,7 +28,7 @@ import "../../chunk-2NLINXRF.js";
28
28
  import "../../chunk-ZMAF3I4H.js";
29
29
  import "../../chunk-YNA3UR42.js";
30
30
  import "../../chunk-H3H74RWJ.js";
31
- import "../../chunk-LW6F3IGP.js";
31
+ import "../../chunk-5CKB7RQY.js";
32
32
  import "../../chunk-LQJ4KHMY.js";
33
33
  import "../../chunk-MJCMKZFP.js";
34
34
  import "../../chunk-EZR5AV3J.js";
@@ -73,13 +73,13 @@ import "../../chunk-NVALGVQG.js";
73
73
  import "../../chunk-ZHC5CD6J.js";
74
74
  import "../../chunk-5V533R7F.js";
75
75
  import "../../chunk-KY4VXIN2.js";
76
- import "../../chunk-VDHMFJCD.js";
77
- import "../../chunk-HG6ASDNI.js";
76
+ import "../../chunk-3YN5B5UW.js";
77
+ import "../../chunk-LGPXCJJO.js";
78
78
  import "../../chunk-57AUTEQ6.js";
79
79
  import "../../chunk-6OO5C5GW.js";
80
80
  import "../../chunk-GSVOMQEE.js";
81
81
  import "../../chunk-4ONUNWGC.js";
82
- import "../../chunk-MKY7KTZY.js";
82
+ import "../../chunk-MIPBH5S7.js";
83
83
  import "../../chunk-XQV3XNVT.js";
84
84
  import "../../chunk-JU3RX364.js";
85
85
  import "../../chunk-WCJRGYF7.js";
@@ -1,9 +1,9 @@
1
1
  import "../../chunk-53TPAXYR.js";
2
2
  import {
3
3
  AgentTeam
4
- } from "../../chunk-7NYFTW7I.js";
4
+ } from "../../chunk-WBXRVW5I.js";
5
5
  import "../../chunk-X6WS3XWL.js";
6
- import "../../chunk-Y7Z5EHJD.js";
6
+ import "../../chunk-NWCJXAE5.js";
7
7
  import "../../chunk-PIMD4DYG.js";
8
8
  import "../../chunk-FSBDE6RF.js";
9
9
  import "../../chunk-3TAQXJBC.js";
@@ -12,14 +12,14 @@ import {
12
12
  AgentTeamInteractionError,
13
13
  AgentTeamLimitError
14
14
  } from "../../chunk-ENZ2XX27.js";
15
- import "../../chunk-KRQ2HFXW.js";
16
- import "../../chunk-6EJHZEXU.js";
17
- import "../../chunk-ZRW27E32.js";
15
+ import "../../chunk-M7X36BQ7.js";
16
+ import "../../chunk-3BYFZYEV.js";
17
+ import "../../chunk-KHUWYYOH.js";
18
18
  import "../../chunk-SXE4J43E.js";
19
19
  import "../../chunk-C36RVQHF.js";
20
20
  import "../../chunk-5IURMWFN.js";
21
21
  import "../../chunk-LAIATEUB.js";
22
- import "../../chunk-7OHHMYRO.js";
22
+ import "../../chunk-MA3TYOKF.js";
23
23
  import "../../chunk-PFJN5OIQ.js";
24
24
  import "../../chunk-SBWSXEIH.js";
25
25
  import "../../chunk-NPJ2T3L5.js";
@@ -32,7 +32,7 @@ import "../../chunk-2NLINXRF.js";
32
32
  import "../../chunk-ZMAF3I4H.js";
33
33
  import "../../chunk-YNA3UR42.js";
34
34
  import "../../chunk-H3H74RWJ.js";
35
- import "../../chunk-LW6F3IGP.js";
35
+ import "../../chunk-5CKB7RQY.js";
36
36
  import "../../chunk-LQJ4KHMY.js";
37
37
  import "../../chunk-MJCMKZFP.js";
38
38
  import "../../chunk-EZR5AV3J.js";
@@ -77,13 +77,13 @@ import "../../chunk-NVALGVQG.js";
77
77
  import "../../chunk-ZHC5CD6J.js";
78
78
  import "../../chunk-5V533R7F.js";
79
79
  import "../../chunk-KY4VXIN2.js";
80
- import "../../chunk-VDHMFJCD.js";
81
- import "../../chunk-HG6ASDNI.js";
80
+ import "../../chunk-3YN5B5UW.js";
81
+ import "../../chunk-LGPXCJJO.js";
82
82
  import "../../chunk-57AUTEQ6.js";
83
83
  import "../../chunk-6OO5C5GW.js";
84
84
  import "../../chunk-GSVOMQEE.js";
85
85
  import "../../chunk-4ONUNWGC.js";
86
- import "../../chunk-MKY7KTZY.js";
86
+ import "../../chunk-MIPBH5S7.js";
87
87
  import "../../chunk-XQV3XNVT.js";
88
88
  import "../../chunk-JU3RX364.js";
89
89
  import "../../chunk-WCJRGYF7.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  AgentRun
3
- } from "./chunk-ZRW27E32.js";
3
+ } from "./chunk-KHUWYYOH.js";
4
4
  import {
5
5
  normalizeMemoryScope
6
6
  } from "./chunk-LAIATEUB.js";
7
7
  import {
8
8
  AgentRunMemory
9
- } from "./chunk-7OHHMYRO.js";
9
+ } from "./chunk-MA3TYOKF.js";
10
10
  import {
11
11
  assertNonnegativeSafeInteger
12
12
  } from "./chunk-NPJ2T3L5.js";
@@ -35,10 +35,10 @@ import {
35
35
  } from "./chunk-KY4VXIN2.js";
36
36
  import {
37
37
  createAgentTool
38
- } from "./chunk-VDHMFJCD.js";
38
+ } from "./chunk-3YN5B5UW.js";
39
39
  import {
40
40
  isStreamingCompletionModel
41
- } from "./chunk-HG6ASDNI.js";
41
+ } from "./chunk-LGPXCJJO.js";
42
42
  import {
43
43
  assertJsonObject
44
44
  } from "./chunk-4ONUNWGC.js";
@@ -155,4 +155,4 @@ var Agent = class {
155
155
  export {
156
156
  Agent
157
157
  };
158
- //# sourceMappingURL=chunk-6EJHZEXU.js.map
158
+ //# sourceMappingURL=chunk-3BYFZYEV.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isStreamingCompletionModel
3
- } from "./chunk-HG6ASDNI.js";
3
+ } from "./chunk-LGPXCJJO.js";
4
4
  import {
5
5
  createTool
6
6
  } from "./chunk-JU3RX364.js";
@@ -78,4 +78,4 @@ function createAgentTool(agent, options) {
78
78
  export {
79
79
  createAgentTool
80
80
  };
81
- //# sourceMappingURL=chunk-VDHMFJCD.js.map
81
+ //# sourceMappingURL=chunk-3YN5B5UW.js.map
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-ZPJFXRQZ.js";
8
8
  import {
9
9
  generateCompletion
10
- } from "./chunk-HG6ASDNI.js";
10
+ } from "./chunk-LGPXCJJO.js";
11
11
 
12
12
  // src/memory/compaction.ts
13
13
  var defaultSummaryInstructions = `Summarize the conversation transcript for use as future agent memory.
@@ -213,4 +213,4 @@ export {
213
213
  createMemoryCompactionSummary,
214
214
  cumulativeCompactedMessageCount
215
215
  };
216
- //# sourceMappingURL=chunk-LW6F3IGP.js.map
216
+ //# sourceMappingURL=chunk-5CKB7RQY.js.map
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-ZPXOBQDS.js";
7
7
  import {
8
8
  extract
9
- } from "./chunk-YKWUFYXT.js";
9
+ } from "./chunk-VCOGUS3Q.js";
10
10
  import {
11
11
  evalValuesEqual,
12
12
  formatValue
@@ -328,4 +328,4 @@ export {
328
328
  llmJudge,
329
329
  llmScore
330
330
  };
331
- //# sourceMappingURL=chunk-MWG2PMTE.js.map
331
+ //# sourceMappingURL=chunk-F5BPVVC2.js.map
@@ -2,7 +2,7 @@ import {
2
2
  addUsage,
3
3
  evaluationMetadata,
4
4
  runJudge
5
- } from "./chunk-YSR6KLCS.js";
5
+ } from "./chunk-V5KBSXAJ.js";
6
6
  import {
7
7
  resolveActualText,
8
8
  resolveExpected
@@ -1113,4 +1113,4 @@ export {
1113
1113
  turnRelevancy,
1114
1114
  knowledgeRetention
1115
1115
  };
1116
- //# sourceMappingURL=chunk-W2XPREWL.js.map
1116
+ //# sourceMappingURL=chunk-GI6APIEU.js.map
@@ -23,7 +23,7 @@ import {
23
23
  } from "./chunk-V3FFZWF3.js";
24
24
  import {
25
25
  extract
26
- } from "./chunk-YKWUFYXT.js";
26
+ } from "./chunk-VCOGUS3Q.js";
27
27
  import {
28
28
  mapWithConcurrency
29
29
  } from "./chunk-4FIVU53H.js";
@@ -372,4 +372,4 @@ function normalizeParallelBranches(branches) {
372
372
  export {
373
373
  Pipeline
374
374
  };
375
- //# sourceMappingURL=chunk-AMPQJMDG.js.map
375
+ //# sourceMappingURL=chunk-GXVJGJAN.js.map
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-LAIATEUB.js";
18
18
  import {
19
19
  AgentRunMemory
20
- } from "./chunk-7OHHMYRO.js";
20
+ } from "./chunk-MA3TYOKF.js";
21
21
  import {
22
22
  fetchContextDocuments,
23
23
  fetchToolDefinitions
@@ -85,7 +85,7 @@ import {
85
85
  } from "./chunk-6BTJC3ES.js";
86
86
  import {
87
87
  isStreamingCompletionModel
88
- } from "./chunk-HG6ASDNI.js";
88
+ } from "./chunk-LGPXCJJO.js";
89
89
  import {
90
90
  createCompletionRequest
91
91
  } from "./chunk-GSVOMQEE.js";
@@ -94,7 +94,7 @@ import {
94
94
  } from "./chunk-4ONUNWGC.js";
95
95
  import {
96
96
  CompletionStreamAccumulator
97
- } from "./chunk-MKY7KTZY.js";
97
+ } from "./chunk-MIPBH5S7.js";
98
98
  import {
99
99
  assertCompletionResponseIntegrity
100
100
  } from "./chunk-XQV3XNVT.js";
@@ -2343,4 +2343,4 @@ function observerRunEnd(outcome) {
2343
2343
  export {
2344
2344
  AgentRun
2345
2345
  };
2346
- //# sourceMappingURL=chunk-ZRW27E32.js.map
2346
+ //# sourceMappingURL=chunk-KHUWYYOH.js.map
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-GSVOMQEE.js";
12
12
  import {
13
13
  CompletionStreamAccumulator
14
- } from "./chunk-MKY7KTZY.js";
14
+ } from "./chunk-MIPBH5S7.js";
15
15
  import {
16
16
  CompletionProviderOutputError,
17
17
  assertCompletionResponseIntegrity
@@ -388,4 +388,4 @@ export {
388
388
  streamCompletion,
389
389
  isStreamingCompletionModel
390
390
  };
391
- //# sourceMappingURL=chunk-HG6ASDNI.js.map
391
+ //# sourceMappingURL=chunk-LGPXCJJO.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Agent
3
- } from "./chunk-6EJHZEXU.js";
3
+ } from "./chunk-3BYFZYEV.js";
4
4
  import {
5
5
  getAgentToolState
6
6
  } from "./chunk-A7BXVZXZ.js";
@@ -45,4 +45,4 @@ export {
45
45
  createResolvedAgent,
46
46
  getResolvedAgentOptions
47
47
  };
48
- //# sourceMappingURL=chunk-KRQ2HFXW.js.map
48
+ //# sourceMappingURL=chunk-M7X36BQ7.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createMemoryCompactionSummary,
3
3
  cumulativeCompactedMessageCount
4
- } from "./chunk-LW6F3IGP.js";
4
+ } from "./chunk-5CKB7RQY.js";
5
5
  import {
6
6
  MemoryCompactionConflictError,
7
7
  MemoryCompactionError
@@ -349,4 +349,4 @@ function isEmptyUsage(usage) {
349
349
  export {
350
350
  AgentRunMemory
351
351
  };
352
- //# sourceMappingURL=chunk-7OHHMYRO.js.map
352
+ //# sourceMappingURL=chunk-MA3TYOKF.js.map
@@ -313,7 +313,7 @@ var CompletionStreamAccumulator = class {
313
313
  (content) => content.type !== "tool-call"
314
314
  );
315
315
  const finalNonTool = finalResponse.choice.filter((content) => content.type !== "tool-call");
316
- if (accumulatedNonTool.length > 0 && !nonToolPartsEqual(accumulatedNonTool, finalNonTool)) {
316
+ if (accumulatedNonTool.length > 0 && !nonToolPartsMatchFinal(accumulatedNonTool, finalNonTool)) {
317
317
  throw new CompletionProviderOutputError({
318
318
  kind: "invalid-stream-event",
319
319
  usage: finalResponse.usage
@@ -604,16 +604,32 @@ function jsonValuesEqual(left, right) {
604
604
  }
605
605
  return true;
606
606
  }
607
- function nonToolPartsEqual(accumulated, final) {
608
- if (accumulated.length !== final.length) return false;
607
+ function nonToolPartsMatchFinal(accumulated, final) {
609
608
  if (!isJsonValue(accumulated) || !isJsonValue(final)) return false;
610
609
  const unmatched = [...final];
611
610
  for (const part of accumulated) {
612
- const index = unmatched.findIndex((candidate) => jsonValuesEqual(part, candidate));
611
+ let index = unmatched.findIndex((candidate) => jsonValuesEqual(part, candidate));
612
+ if (index < 0 && part.type === "reasoning") {
613
+ index = unmatched.findIndex(
614
+ (candidate) => candidate.type === "reasoning" && reasoningMatchesFinal(part, candidate)
615
+ );
616
+ }
613
617
  if (index < 0) return false;
614
618
  unmatched.splice(index, 1);
615
619
  }
616
- return true;
620
+ return unmatched.every(
621
+ (part) => part.type === "reasoning" && part.text === "" && (part.details === void 0 || part.details.every(
622
+ (detail) => detail.type === "encrypted" || (detail.type === "text" || detail.type === "summary") && detail.text === ""
623
+ ))
624
+ );
625
+ }
626
+ function reasoningMatchesFinal(accumulated, final) {
627
+ if (accumulated.details?.some((detail) => detail.type === "encrypted")) return false;
628
+ if (!final.details?.some((detail) => detail.type === "encrypted")) return false;
629
+ const { details, ...base } = final;
630
+ const streamedDetails = details.filter((detail) => detail.type !== "encrypted");
631
+ const comparable = streamedDetails.length === 0 ? base : { ...base, details: streamedDetails };
632
+ return isJsonValue(accumulated) && isJsonValue(comparable) && jsonValuesEqual(accumulated, comparable);
617
633
  }
618
634
  function isJsonArray(value) {
619
635
  return Array.isArray(value);
@@ -654,4 +670,4 @@ function isReasoningContentType(value) {
654
670
  export {
655
671
  CompletionStreamAccumulator
656
672
  };
657
- //# sourceMappingURL=chunk-MKY7KTZY.js.map
673
+ //# sourceMappingURL=chunk-MIPBH5S7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/completion/stream-accumulator.ts"],"sourcesContent":["import { isJsonValue } from \"./json\";\nimport { CompletionProviderOutputError } from \"./provider-output-error\";\nimport type {\n AssistantContentPart,\n CompletionModelStreamEvent,\n CompletionResponse,\n CompletionSource,\n CompletionStreamPart,\n JsonValue,\n ProviderToolCall,\n ReasoningDetail,\n ReasoningPart,\n ToolCallPart,\n} from \"./types\";\nimport { Usage } from \"./types\";\n\ntype AccumulatedStreamEvent = Exclude<\n CompletionStreamPart,\n { type: \"tool_call_delta\" } | { type: \"message_id\" }\n>;\n\ntype ReasoningState = {\n id?: string;\n text: string;\n details?: ReasoningDetail[];\n};\n\ntype PartialToolCall = {\n id: string;\n callId?: string;\n name: string;\n argumentsText: string;\n argumentsSnapshotSeen: boolean;\n signature?: string;\n fullCallSeen: boolean;\n};\n\ntype OrderedPartRef =\n | { type: \"text\"; key: string }\n | { type: \"reasoning\"; key: string }\n | { type: \"tool_call\"; key: string };\n\nexport class CompletionStreamAccumulator<RawResponse = unknown> {\n private orderedParts: OrderedPartRef[] = [];\n private textParts = new Map<string, string>();\n private reasoningByKey = new Map<string, ReasoningState>();\n private reasoningKeyById = new Map<string, string>();\n private toolCalls = new Map<string, PartialToolCall>();\n private sources = new Map<string, CompletionSource>();\n private providerToolCalls = new Map<string, ProviderToolCall>();\n private finalResponse: CompletionResponse<RawResponse> | undefined;\n private messageId: string | undefined;\n private nextTextKey = 0;\n private nextReasoningKey = 0;\n\n accept(event: CompletionModelStreamEvent<RawResponse>): AccumulatedStreamEvent | undefined {\n if (event.type === \"text_delta\") {\n if (typeof event.delta !== \"string\") {\n throw new CompletionProviderOutputError({ kind: \"invalid-stream-event\" });\n }\n this.appendText(event.delta);\n return { type: \"text_delta\", delta: event.delta };\n }\n\n if (event.type === \"reasoning_delta\") {\n if (\n typeof event.delta !== \"string\" ||\n (event.id !== undefined && !isNonblankString(event.id)) ||\n (event.signature !== undefined && !isNonblankString(event.signature)) ||\n (event.contentType !== undefined && !isReasoningContentType(event.contentType))\n ) {\n throw new CompletionProviderOutputError({ kind: \"invalid-stream-event\" });\n }\n const reasoning = this.reasoningStateForEvent(event);\n this.appendReasoning(reasoning, event);\n return reasoningDeltaEvent(event);\n }\n\n if (event.type === \"tool_call_delta\") {\n if (!isNonblankString(event.id)) {\n throw new CompletionProviderOutputError({ kind: \"invalid-tool-call\" });\n }\n const toolCall = this.toolCallStateForId(event.id);\n if (toolCall.fullCallSeen) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-call\",\n toolCallId: toolCall.id,\n });\n }\n if (event.callId !== undefined) {\n if (!isNonblankString(event.callId)) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-call\",\n toolCallId: toolCall.id,\n });\n }\n if (toolCall.callId !== undefined && toolCall.callId !== event.callId) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-call\",\n toolCallId: toolCall.id,\n });\n }\n toolCall.callId = event.callId;\n }\n if (event.name !== undefined) {\n if (!isNonblankString(event.name)) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-call\",\n toolCallId: toolCall.id,\n });\n }\n if (toolCall.name.length > 0 && toolCall.name !== event.name) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-call\",\n toolCallId: toolCall.id,\n });\n }\n toolCall.name = event.name;\n }\n if (event.signature !== undefined) {\n if (\n !isNonblankString(event.signature) ||\n (toolCall.signature !== undefined && toolCall.signature !== event.signature)\n ) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-call\",\n toolCallId: toolCall.id,\n });\n }\n toolCall.signature = event.signature;\n }\n if (\n event.argumentsMode !== undefined &&\n event.argumentsMode !== \"append\" &&\n event.argumentsMode !== \"replace\"\n ) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-stream-event\",\n toolCallId: toolCall.id,\n });\n }\n if (event.argumentsMode !== undefined && event.argumentsDelta === undefined) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-stream-event\",\n toolCallId: toolCall.id,\n });\n }\n if (event.argumentsDelta !== undefined) {\n if (typeof event.argumentsDelta !== \"string\") {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-arguments\",\n toolCallId: toolCall.id,\n });\n }\n if (event.argumentsMode === \"replace\") {\n if (\n toolCall.argumentsText.length > 0 &&\n toolCall.argumentsText !== event.argumentsDelta &&\n (toolCall.argumentsSnapshotSeen ||\n !event.argumentsDelta.startsWith(toolCall.argumentsText))\n ) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-call\",\n toolCallId: toolCall.id,\n });\n }\n toolCall.argumentsText = event.argumentsDelta;\n toolCall.argumentsSnapshotSeen = true;\n } else {\n if (toolCall.argumentsSnapshotSeen) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-call\",\n toolCallId: toolCall.id,\n });\n }\n toolCall.argumentsText += event.argumentsDelta;\n }\n }\n return undefined;\n }\n\n if (event.type === \"tool_call\") {\n this.upsertToolCall(event.toolCall);\n return { type: \"tool_call\", toolCall: event.toolCall };\n }\n\n if (event.type === \"source\") {\n this.sources.set(sourceKey(event.source), event.source);\n return { type: \"source\", source: event.source };\n }\n\n if (event.type === \"provider_tool_call\") {\n this.providerToolCalls.set(event.toolCall.id, event.toolCall);\n return { type: \"provider_tool_call\", toolCall: event.toolCall };\n }\n\n if (event.type === \"message_id\") {\n if (!isNonblankString(event.id)) {\n throw new CompletionProviderOutputError({ kind: \"invalid-stream-event\" });\n }\n this.messageId = event.id;\n return undefined;\n }\n\n if (event.type === \"final\") {\n this.finalResponse = event.response;\n return undefined;\n }\n\n return undefined;\n }\n\n response(): CompletionResponse<RawResponse> {\n this.assertAccumulatedFinishReason();\n let accumulatedResponse: CompletionResponse<RawResponse>;\n try {\n accumulatedResponse = this.buildAccumulatedResponse();\n } catch (error) {\n if (error instanceof CompletionProviderOutputError && this.finalResponse !== undefined) {\n throw providerOutputErrorWithUsage(error, this.finalResponse.usage);\n }\n throw error;\n }\n if (this.finalResponse !== undefined) {\n if (accumulatedResponse.choice.length === 0) {\n return this.withAccumulatedArtifacts(this.finalResponse, accumulatedResponse);\n }\n return this.mergeFinalResponse(accumulatedResponse, this.finalResponse);\n }\n\n return accumulatedResponse;\n }\n\n private assertAccumulatedFinishReason(): void {\n if (this.finalResponse === undefined) {\n if (this.toolCalls.size === 0) {\n throw new CompletionProviderOutputError({ kind: \"incomplete-stream\" });\n }\n const toolCallId = this.toolCalls.size === 1 ? this.toolCalls.keys().next().value : undefined;\n throw new CompletionProviderOutputError({\n kind: \"incomplete-tool-call\",\n toolCallId,\n });\n }\n if (this.toolCalls.size === 0) return;\n const finishReason = this.finalResponse.finishReason;\n if (finishReason === \"length\") {\n throw new CompletionProviderOutputError({\n kind: \"truncated-tool-call\",\n finishReason,\n usage: this.finalResponse.usage,\n });\n }\n if (finishReason === \"content-filter\") {\n throw new CompletionProviderOutputError({\n kind: \"filtered-tool-call\",\n finishReason,\n usage: this.finalResponse.usage,\n });\n }\n if (finishReason !== undefined && finishReason !== \"stop\" && finishReason !== \"tool-calls\") {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-call\",\n usage: this.finalResponse.usage,\n });\n }\n }\n\n private buildAccumulatedResponse(): CompletionResponse<RawResponse> {\n const choice: AssistantContentPart[] = [];\n\n for (const part of this.orderedParts) {\n if (part.type === \"text\") {\n const text = this.textParts.get(part.key) ?? \"\";\n if (text.length > 0) {\n choice.push({ type: \"text\", text });\n }\n continue;\n }\n\n if (part.type === \"reasoning\") {\n const reasoning = this.reasoningByKey.get(part.key);\n if (reasoning !== undefined) {\n choice.push(reasoningContent(reasoning));\n }\n continue;\n }\n\n const toolCall = this.toolCalls.get(part.key);\n if (toolCall !== undefined) {\n choice.push(toolCallContent(toolCall));\n }\n }\n\n const response: CompletionResponse<RawResponse> = {\n choice,\n usage: Usage.empty(),\n rawResponse: undefined as RawResponse,\n };\n if (this.messageId !== undefined) {\n response.messageId = this.messageId;\n }\n const sources = [...this.sources.values()];\n if (sources.length > 0) {\n response.sources = sources;\n }\n const providerToolCalls = [...this.providerToolCalls.values()];\n if (providerToolCalls.length > 0) {\n response.providerToolCalls = providerToolCalls;\n }\n return response;\n }\n\n private upsertToolCall(toolCall: ToolCallPart): void {\n if (\n !isNonblankString(toolCall.toolCallId) ||\n !isNonblankString(toolCall.toolName) ||\n (toolCall.callId !== undefined && !isNonblankString(toolCall.callId)) ||\n (toolCall.signature !== undefined && !isNonblankString(toolCall.signature))\n ) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-call\",\n toolCallId: isNonblankString(toolCall.toolCallId) ? toolCall.toolCallId : undefined,\n });\n }\n if (!isJsonValue(toolCall.input)) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-arguments\",\n toolCallId: toolCall.toolCallId,\n });\n }\n const existing = this.toolCalls.get(toolCall.toolCallId);\n if (existing !== undefined) {\n if (existing.fullCallSeen) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-call\",\n toolCallId: toolCall.toolCallId,\n });\n }\n if (\n (existing.name.length > 0 && existing.name !== toolCall.toolName) ||\n (existing.callId !== undefined && existing.callId !== toolCall.callId) ||\n (existing.signature !== undefined &&\n toolCall.signature !== undefined &&\n existing.signature !== toolCall.signature)\n ) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-call\",\n toolCallId: toolCall.toolCallId,\n });\n }\n if (existing.argumentsText.length > 0) {\n const accumulatedInput = parseToolArguments(existing.id, existing.argumentsText);\n if (!jsonValuesEqual(accumulatedInput, toolCall.input)) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-call\",\n toolCallId: toolCall.toolCallId,\n });\n }\n }\n }\n if (!this.toolCalls.has(toolCall.toolCallId)) {\n this.orderedParts.push({ type: \"tool_call\", key: toolCall.toolCallId });\n }\n const partial: PartialToolCall = {\n id: toolCall.toolCallId,\n name: toolCall.toolName,\n argumentsText: JSON.stringify(toolCall.input),\n argumentsSnapshotSeen: true,\n fullCallSeen: true,\n };\n if (toolCall.callId !== undefined) {\n partial.callId = toolCall.callId;\n }\n const signature = toolCall.signature ?? existing?.signature;\n if (signature !== undefined) {\n partial.signature = signature;\n }\n this.toolCalls.set(toolCall.toolCallId, partial);\n }\n\n private mergeFinalResponse(\n accumulatedResponse: CompletionResponse<RawResponse>,\n finalResponse: CompletionResponse<RawResponse>,\n ): CompletionResponse<RawResponse> {\n if (finalResponse.choice.length === 0) {\n const mergedResponse: CompletionResponse<RawResponse> = {\n ...finalResponse,\n choice: accumulatedResponse.choice,\n };\n return this.withAccumulatedArtifacts(mergedResponse, accumulatedResponse);\n }\n\n const accumulatedNonTool = accumulatedResponse.choice.filter(\n (content) => content.type !== \"tool-call\",\n );\n const finalNonTool = finalResponse.choice.filter((content) => content.type !== \"tool-call\");\n if (\n accumulatedNonTool.length > 0 &&\n !nonToolPartsMatchFinal(accumulatedNonTool, finalNonTool)\n ) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-stream-event\",\n usage: finalResponse.usage,\n });\n }\n\n const accumulatedById = new Map<string, ToolCallPart>();\n const accumulatedByCallId = new Map<string, ToolCallPart>();\n for (const content of accumulatedResponse.choice) {\n if (content.type !== \"tool-call\") continue;\n accumulatedById.set(content.toolCallId, content);\n if (content.callId !== undefined) accumulatedByCallId.set(content.callId, content);\n }\n\n const matchedAccumulatedToolCalls = new Set<ToolCallPart>();\n const choice = finalResponse.choice.map((content) => {\n if (content.type !== \"tool-call\") return content;\n const accumulated = accumulatedById.get(content.toolCallId);\n if (accumulated === undefined) {\n const changedIdentity =\n content.callId === undefined ? undefined : accumulatedByCallId.get(content.callId);\n if (changedIdentity !== undefined) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-call\",\n toolCallId: changedIdentity.toolCallId,\n usage: finalResponse.usage,\n });\n }\n return content;\n }\n matchedAccumulatedToolCalls.add(accumulated);\n return mergeFinalToolCall(accumulated, content, finalResponse.usage);\n });\n\n for (const accumulated of accumulatedById.values()) {\n if (!matchedAccumulatedToolCalls.has(accumulated)) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-call\",\n toolCallId: accumulated.toolCallId,\n usage: finalResponse.usage,\n });\n }\n }\n\n return this.withAccumulatedArtifacts({ ...finalResponse, choice }, accumulatedResponse);\n }\n\n private appendText(delta: string): void {\n const lastPart = this.orderedParts.at(-1);\n const key = lastPart?.type === \"text\" ? lastPart.key : this.createTextKey();\n if (lastPart?.type !== \"text\") {\n this.orderedParts.push({ type: \"text\", key });\n }\n this.textParts.set(key, `${this.textParts.get(key) ?? \"\"}${delta}`);\n }\n\n private reasoningStateForEvent(\n event: Extract<CompletionModelStreamEvent<RawResponse>, { type: \"reasoning_delta\" }>,\n ): ReasoningState {\n if (event.id !== undefined) {\n const existingKey = this.reasoningKeyById.get(event.id);\n if (existingKey !== undefined) {\n const existing = this.reasoningByKey.get(existingKey);\n if (existing !== undefined) {\n return existing;\n }\n }\n\n const key = this.createReasoningKey();\n const reasoning: ReasoningState = { id: event.id, text: \"\" };\n this.reasoningKeyById.set(event.id, key);\n this.reasoningByKey.set(key, reasoning);\n this.orderedParts.push({ type: \"reasoning\", key });\n return reasoning;\n }\n\n const lastPart = this.orderedParts.at(-1);\n if (lastPart?.type === \"reasoning\") {\n const lastReasoning = this.reasoningByKey.get(lastPart.key);\n if (lastReasoning !== undefined && lastReasoning.id === undefined) {\n return lastReasoning;\n }\n }\n\n const key = this.createReasoningKey();\n const reasoning: ReasoningState = { text: \"\" };\n this.reasoningByKey.set(key, reasoning);\n this.orderedParts.push({ type: \"reasoning\", key });\n return reasoning;\n }\n\n private toolCallStateForId(id: string): PartialToolCall {\n const existing = this.toolCalls.get(id);\n if (existing !== undefined) {\n return existing;\n }\n\n const toolCall: PartialToolCall = {\n id,\n name: \"\",\n argumentsText: \"\",\n argumentsSnapshotSeen: false,\n fullCallSeen: false,\n };\n this.toolCalls.set(id, toolCall);\n this.orderedParts.push({ type: \"tool_call\", key: id });\n return toolCall;\n }\n\n private withMessageIdFallback(\n response: CompletionResponse<RawResponse>,\n accumulatedResponse: CompletionResponse<RawResponse>,\n ): CompletionResponse<RawResponse> {\n if (response.messageId !== undefined || accumulatedResponse.messageId === undefined) {\n return response;\n }\n return { ...response, messageId: accumulatedResponse.messageId };\n }\n\n private withAccumulatedArtifacts(\n response: CompletionResponse<RawResponse>,\n accumulatedResponse: CompletionResponse<RawResponse>,\n ): CompletionResponse<RawResponse> {\n const withMessageId = this.withMessageIdFallback(response, accumulatedResponse);\n const sources = mergeSources(accumulatedResponse.sources, response.sources);\n const providerToolCalls = mergeProviderToolCalls(\n accumulatedResponse.providerToolCalls,\n response.providerToolCalls,\n );\n let accumulated: CompletionResponse<RawResponse> = { ...withMessageId };\n if (sources.length > 0) accumulated = { ...accumulated, sources };\n if (providerToolCalls.length > 0) {\n accumulated = { ...accumulated, providerToolCalls };\n }\n return accumulated;\n }\n\n private createTextKey(): string {\n this.nextTextKey += 1;\n return `text_${this.nextTextKey.toString()}`;\n }\n\n private createReasoningKey(): string {\n this.nextReasoningKey += 1;\n return `reasoning_${this.nextReasoningKey.toString()}`;\n }\n\n private appendReasoning(\n reasoning: ReasoningState,\n event: Extract<CompletionModelStreamEvent<RawResponse>, { type: \"reasoning_delta\" }>,\n ): void {\n const contentType = event.contentType ?? \"text\";\n if (contentType === \"text\" || contentType === \"summary\") {\n reasoning.text += event.delta;\n }\n\n if (event.contentType === undefined && event.signature === undefined) {\n return;\n }\n\n reasoning.details ??= [];\n const last = reasoning.details.at(-1);\n if (contentType === \"text\") {\n if (last?.type === \"text\") {\n let detail: ReasoningDetail = {\n ...last,\n text: `${last.text}${event.delta}`,\n };\n if (event.signature !== undefined) detail = { ...detail, signature: event.signature };\n reasoning.details[reasoning.details.length - 1] = detail;\n } else {\n reasoning.details.push(\n event.signature === undefined\n ? { type: \"text\", text: event.delta }\n : { type: \"text\", text: event.delta, signature: event.signature },\n );\n }\n return;\n }\n\n if (contentType === \"summary\") {\n if (last?.type === \"summary\") {\n reasoning.details[reasoning.details.length - 1] = {\n ...last,\n text: `${last.text}${event.delta}`,\n };\n } else {\n reasoning.details.push({ type: \"summary\", text: event.delta });\n }\n return;\n }\n\n if (contentType === \"encrypted\") {\n reasoning.details.push({ type: \"encrypted\", data: event.delta });\n return;\n }\n\n reasoning.details.push({ type: \"redacted\", data: event.delta });\n }\n}\n\nfunction sourceKey(source: CompletionSource): string {\n return `${source.url}\\u0000${source.startIndex ?? \"\"}\\u0000${source.endIndex ?? \"\"}`;\n}\n\nfunction mergeSources(\n accumulated: CompletionSource[] | undefined,\n final: CompletionSource[] | undefined,\n): CompletionSource[] {\n const sources = new Map<string, CompletionSource>();\n for (const source of [...(accumulated ?? []), ...(final ?? [])]) {\n sources.set(sourceKey(source), source);\n }\n return [...sources.values()];\n}\n\nfunction mergeProviderToolCalls(\n accumulated: ProviderToolCall[] | undefined,\n final: ProviderToolCall[] | undefined,\n): ProviderToolCall[] {\n const toolCalls = new Map<string, ProviderToolCall>();\n for (const toolCall of [...(accumulated ?? []), ...(final ?? [])]) {\n toolCalls.set(toolCall.id, toolCall);\n }\n return [...toolCalls.values()];\n}\n\nfunction reasoningContent(reasoning: ReasoningState): AssistantContentPart {\n const content =\n reasoning.details === undefined\n ? { type: \"reasoning\" as const, text: reasoning.text }\n : { type: \"reasoning\" as const, text: reasoning.text, details: reasoning.details };\n return reasoning.id === undefined ? content : { ...content, id: reasoning.id };\n}\n\nfunction toolCallContent(toolCall: PartialToolCall): ToolCallPart {\n const argumentsValue = parseToolArguments(toolCall.id, toolCall.argumentsText);\n let content: ToolCallPart = {\n type: \"tool-call\",\n toolCallId: toolCall.id,\n toolName: toolCall.name,\n input: argumentsValue,\n };\n if (toolCall.callId !== undefined) content = { ...content, callId: toolCall.callId };\n if (toolCall.signature !== undefined) content = { ...content, signature: toolCall.signature };\n return content;\n}\n\nfunction mergeFinalToolCall(\n accumulated: ToolCallPart,\n finalToolCall: ToolCallPart,\n usage: CompletionResponse[\"usage\"],\n): ToolCallPart {\n if (\n finalToolCall.toolCallId !== accumulated.toolCallId ||\n finalToolCall.toolName !== accumulated.toolName ||\n (accumulated.callId !== undefined && finalToolCall.callId !== accumulated.callId) ||\n (accumulated.signature !== undefined &&\n finalToolCall.signature !== undefined &&\n finalToolCall.signature !== accumulated.signature)\n ) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-call\",\n toolCallId: accumulated.toolCallId,\n usage,\n });\n }\n if (!isJsonValue(finalToolCall.input)) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-arguments\",\n toolCallId: accumulated.toolCallId,\n usage,\n });\n }\n if (!jsonValuesEqual(accumulated.input, finalToolCall.input)) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-call\",\n toolCallId: accumulated.toolCallId,\n usage,\n });\n }\n let merged: ToolCallPart = {\n type: \"tool-call\",\n toolCallId: finalToolCall.toolCallId,\n toolName: finalToolCall.toolName,\n input: accumulated.input,\n };\n const callId = finalToolCall.callId ?? accumulated.callId;\n if (callId !== undefined) merged = { ...merged, callId };\n const signature = finalToolCall.signature ?? accumulated.signature;\n if (signature !== undefined) merged = { ...merged, signature };\n return merged;\n}\n\nfunction reasoningDeltaEvent(\n event: Extract<CompletionModelStreamEvent, { type: \"reasoning_delta\" }>,\n): AccumulatedStreamEvent {\n const mapped: AccumulatedStreamEvent = { type: \"reasoning_delta\", delta: event.delta };\n if (event.id !== undefined) mapped.id = event.id;\n if (event.contentType !== undefined) mapped.contentType = event.contentType;\n if (event.signature !== undefined) mapped.signature = event.signature;\n return mapped;\n}\n\nfunction parseToolArguments(toolCallId: string, text: string): JsonValue {\n let value: unknown;\n try {\n value = JSON.parse(text);\n } catch {\n throw new CompletionProviderOutputError({\n kind: \"malformed-tool-arguments\",\n toolCallId,\n });\n }\n if (!isJsonValue(value)) {\n throw new CompletionProviderOutputError({\n kind: \"invalid-tool-arguments\",\n toolCallId,\n });\n }\n return value;\n}\n\nfunction jsonValuesEqual(left: JsonValue, right: JsonValue): boolean {\n if (left === right) {\n return true;\n }\n if (left === null || right === null || typeof left !== \"object\" || typeof right !== \"object\") {\n return false;\n }\n if (isJsonArray(left) || isJsonArray(right)) {\n if (!isJsonArray(left) || !isJsonArray(right) || left.length !== right.length) {\n return false;\n }\n return left.every((value, index) => {\n const rightValue = right[index];\n return rightValue !== undefined && jsonValuesEqual(value, rightValue);\n });\n }\n\n const leftKeys = Object.keys(left);\n const rightKeys = Object.keys(right);\n if (leftKeys.length !== rightKeys.length) {\n return false;\n }\n for (const key of leftKeys) {\n if (!Object.hasOwn(right, key)) {\n return false;\n }\n const leftValue = left[key];\n const rightValue = right[key];\n if (\n leftValue === undefined ||\n rightValue === undefined ||\n !jsonValuesEqual(leftValue, rightValue)\n ) {\n return false;\n }\n }\n return true;\n}\n\nfunction nonToolPartsMatchFinal(\n accumulated: readonly AssistantContentPart[],\n final: readonly AssistantContentPart[],\n): boolean {\n if (!isJsonValue(accumulated) || !isJsonValue(final)) return false;\n const unmatched = [...final];\n for (const part of accumulated) {\n let index = unmatched.findIndex((candidate) => jsonValuesEqual(part, candidate));\n if (index < 0 && part.type === \"reasoning\") {\n index = unmatched.findIndex(\n (candidate) => candidate.type === \"reasoning\" && reasoningMatchesFinal(part, candidate),\n );\n }\n if (index < 0) return false;\n unmatched.splice(index, 1);\n }\n // Responses may expose replayable reasoning only in the terminal snapshot.\n // It has no displayable delta, so it must not change text/tool validation.\n return unmatched.every(\n (part) =>\n part.type === \"reasoning\" &&\n part.text === \"\" &&\n (part.details === undefined ||\n part.details.every(\n (detail) =>\n detail.type === \"encrypted\" ||\n ((detail.type === \"text\" || detail.type === \"summary\") && detail.text === \"\"),\n )),\n );\n}\n\nfunction reasoningMatchesFinal(accumulated: ReasoningPart, final: ReasoningPart): boolean {\n // Only allow final-only encryption to enrich an otherwise identical part.\n // Already streamed encryption, summaries, IDs and signatures must still agree.\n if (accumulated.details?.some((detail) => detail.type === \"encrypted\")) return false;\n if (!final.details?.some((detail) => detail.type === \"encrypted\")) return false;\n const { details, ...base } = final;\n const streamedDetails = details.filter((detail) => detail.type !== \"encrypted\");\n const comparable = streamedDetails.length === 0 ? base : { ...base, details: streamedDetails };\n return (\n isJsonValue(accumulated) && isJsonValue(comparable) && jsonValuesEqual(accumulated, comparable)\n );\n}\n\nfunction isJsonArray(value: JsonValue): value is readonly JsonValue[] {\n return Array.isArray(value);\n}\n\nfunction providerOutputErrorWithUsage(\n error: CompletionProviderOutputError,\n usage: CompletionResponse[\"usage\"],\n): CompletionProviderOutputError {\n const shared: { toolCallId?: string; usage: CompletionResponse[\"usage\"] } = { usage };\n if (error.toolCallId !== undefined) shared.toolCallId = error.toolCallId;\n if (error.kind === \"truncated-tool-call\") {\n return new CompletionProviderOutputError({\n ...shared,\n kind: error.kind,\n finishReason: \"length\",\n });\n }\n if (error.kind === \"filtered-tool-call\") {\n return new CompletionProviderOutputError({\n ...shared,\n kind: error.kind,\n finishReason: \"content-filter\",\n });\n }\n if (error.finishReason === \"length\" || error.finishReason === \"content-filter\") {\n throw error;\n }\n return new CompletionProviderOutputError({\n ...shared,\n kind: error.kind,\n finishReason: error.finishReason,\n });\n}\n\nfunction isNonblankString(value: unknown): value is string {\n return typeof value === \"string\" && value.trim().length > 0;\n}\n\nfunction isReasoningContentType(value: unknown): boolean {\n return value === \"text\" || value === \"summary\" || value === \"encrypted\" || value === \"redacted\";\n}\n"],"mappings":";;;;;;;;;;;AA0CO,IAAM,8BAAN,MAAyD;AAAA,EACtD,eAAiC,CAAC;AAAA,EAClC,YAAY,oBAAI,IAAoB;AAAA,E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