langgraph-ui-components 0.0.7 → 0.0.8
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/index.es100.js +25 -157
- package/dist/index.es100.js.map +1 -1
- package/dist/index.es101.js +3130 -176
- package/dist/index.es101.js.map +1 -1
- package/dist/index.es102.js +36 -13
- package/dist/index.es102.js.map +1 -1
- package/dist/index.es103.js +5 -30
- package/dist/index.es103.js.map +1 -1
- package/dist/index.es104.js +69 -30
- package/dist/index.es104.js.map +1 -1
- package/dist/index.es105.js +28 -3148
- package/dist/index.es105.js.map +1 -1
- package/dist/index.es106.js +5 -16
- package/dist/index.es106.js.map +1 -1
- package/dist/index.es107.js +2 -7
- package/dist/index.es107.js.map +1 -1
- package/dist/index.es108.js +13 -2
- package/dist/index.es108.js.map +1 -1
- package/dist/index.es109.js +499 -9
- package/dist/index.es109.js.map +1 -1
- package/dist/index.es11.js +2 -2
- package/dist/index.es11.js.map +1 -1
- package/dist/index.es110.js +5 -501
- package/dist/index.es110.js.map +1 -1
- package/dist/index.es111.js +2 -7
- package/dist/index.es111.js.map +1 -1
- package/dist/index.es112.js +148 -2
- package/dist/index.es112.js.map +1 -1
- package/dist/index.es113.js +878 -118
- package/dist/index.es113.js.map +1 -1
- package/dist/index.es114.js +251 -877
- package/dist/index.es114.js.map +1 -1
- package/dist/index.es115.js +3 -281
- package/dist/index.es115.js.map +1 -1
- package/dist/index.es116.js +445 -3
- package/dist/index.es116.js.map +1 -1
- package/dist/index.es117.js +39 -437
- package/dist/index.es117.js.map +1 -1
- package/dist/index.es118.js +22 -46
- package/dist/index.es118.js.map +1 -1
- package/dist/index.es119.js +78 -21
- package/dist/index.es119.js.map +1 -1
- package/dist/index.es120.js +126 -76
- package/dist/index.es120.js.map +1 -1
- package/dist/index.es121.js +45 -125
- package/dist/index.es121.js.map +1 -1
- package/dist/index.es122.js +9 -48
- package/dist/index.es122.js.map +1 -1
- package/dist/index.es123.js +45 -10
- package/dist/index.es123.js.map +1 -1
- package/dist/index.es124.js +97 -43
- package/dist/index.es124.js.map +1 -1
- package/dist/index.es125.js +48 -94
- package/dist/index.es125.js.map +1 -1
- package/dist/index.es126.js +14 -51
- package/dist/index.es126.js.map +1 -1
- package/dist/index.es127.js +13 -162
- package/dist/index.es127.js.map +1 -1
- package/dist/index.es128.js +89 -2
- package/dist/index.es128.js.map +1 -1
- package/dist/index.es129.js +2 -15
- package/dist/index.es129.js.map +1 -1
- package/dist/index.es130.js +54 -87
- package/dist/index.es130.js.map +1 -1
- package/dist/index.es131.js +100 -2
- package/dist/index.es131.js.map +1 -1
- package/dist/index.es132.js +186 -51
- package/dist/index.es132.js.map +1 -1
- package/dist/index.es133.js +97 -87
- package/dist/index.es133.js.map +1 -1
- package/dist/index.es134.js +31 -187
- package/dist/index.es134.js.map +1 -1
- package/dist/index.es135.js +10 -110
- package/dist/index.es135.js.map +1 -1
- package/dist/index.es136.js +11 -35
- package/dist/index.es136.js.map +1 -1
- package/dist/index.es137.js +12 -10
- package/dist/index.es137.js.map +1 -1
- package/dist/index.es138.js +90 -10
- package/dist/index.es138.js.map +1 -1
- package/dist/index.es139.js +274 -11
- package/dist/index.es139.js.map +1 -1
- package/dist/index.es140.js +2 -91
- package/dist/index.es140.js.map +1 -1
- package/dist/index.es141.js +150 -261
- package/dist/index.es141.js.map +1 -1
- package/dist/index.es142.js +51 -2
- package/dist/index.es142.js.map +1 -1
- package/dist/index.es143.js +34 -158
- package/dist/index.es143.js.map +1 -1
- package/dist/index.es144.js +34 -50
- package/dist/index.es144.js.map +1 -1
- package/dist/index.es145.js +32 -32
- package/dist/index.es145.js.map +1 -1
- package/dist/index.es146.js +23 -34
- package/dist/index.es146.js.map +1 -1
- package/dist/index.es147.js +583 -32
- package/dist/index.es147.js.map +1 -1
- package/dist/index.es148.js +121 -20
- package/dist/index.es148.js.map +1 -1
- package/dist/index.es149.js +158 -585
- package/dist/index.es149.js.map +1 -1
- package/dist/index.es15.js +15 -15
- package/dist/index.es150.js +2 -125
- package/dist/index.es150.js.map +1 -1
- package/dist/index.es157.js +2 -2
- package/dist/index.es159.js +2 -2
- package/dist/index.es161.js +64 -25
- package/dist/index.es161.js.map +1 -1
- package/dist/index.es162.js +22 -12
- package/dist/index.es162.js.map +1 -1
- package/dist/index.es163.js +5 -53
- package/dist/index.es163.js.map +1 -1
- package/dist/index.es164.js +337 -52
- package/dist/index.es164.js.map +1 -1
- package/dist/index.es165.js +24 -21
- package/dist/index.es165.js.map +1 -1
- package/dist/index.es166.js +12 -6
- package/dist/index.es166.js.map +1 -1
- package/dist/index.es167.js +49 -344
- package/dist/index.es167.js.map +1 -1
- package/dist/index.es175.js +1 -1
- package/dist/index.es178.js +1 -1
- package/dist/index.es183.js +1 -1
- package/dist/index.es195.js +2 -2
- package/dist/index.es197.js +2 -2
- package/dist/index.es200.js +1 -1
- package/dist/index.es201.js +1 -1
- package/dist/index.es203.js +1 -1
- package/dist/index.es204.js +2 -2
- package/dist/index.es206.js +1 -1
- package/dist/index.es209.js +3 -3
- package/dist/index.es21.js +1 -1
- package/dist/index.es210.js +2 -2
- package/dist/index.es212.js +1 -1
- package/dist/index.es214.js +1 -1
- package/dist/index.es215.js +1 -1
- package/dist/index.es217.js +1 -1
- package/dist/index.es218.js +2 -2
- package/dist/index.es219.js +1 -1
- package/dist/index.es220.js +1 -1
- package/dist/index.es221.js +1 -1
- package/dist/index.es222.js +1 -1
- package/dist/index.es223.js +1 -1
- package/dist/index.es224.js +1 -1
- package/dist/index.es225.js +1 -1
- package/dist/index.es229.js +2 -2
- package/dist/index.es28.js +7 -7
- package/dist/index.es29.js +1 -1
- package/dist/index.es32.js +4 -4
- package/dist/index.es33.js +15 -1191
- package/dist/index.es33.js.map +1 -1
- package/dist/index.es34.js +117 -6
- package/dist/index.es34.js.map +1 -1
- package/dist/index.es35.js +70 -8
- package/dist/index.es35.js.map +1 -1
- package/dist/index.es36.js +19 -148
- package/dist/index.es36.js.map +1 -1
- package/dist/index.es37.js +255 -112
- package/dist/index.es37.js.map +1 -1
- package/dist/index.es38.js +40 -68
- package/dist/index.es38.js.map +1 -1
- package/dist/index.es39.js +214 -17
- package/dist/index.es39.js.map +1 -1
- package/dist/index.es40.js +53 -247
- package/dist/index.es40.js.map +1 -1
- package/dist/index.es41.js +123 -24
- package/dist/index.es41.js.map +1 -1
- package/dist/index.es42.js +14 -205
- package/dist/index.es42.js.map +1 -1
- package/dist/index.es43.js +221 -58
- package/dist/index.es43.js.map +1 -1
- package/dist/index.es44.js +7 -140
- package/dist/index.es44.js.map +1 -1
- package/dist/index.es45.js +1185 -17
- package/dist/index.es45.js.map +1 -1
- package/dist/index.es46.js +6 -229
- package/dist/index.es46.js.map +1 -1
- package/dist/index.es47.js +146 -15
- package/dist/index.es47.js.map +1 -1
- package/dist/index.es49.js +7 -90
- package/dist/index.es49.js.map +1 -1
- package/dist/index.es50.js +92 -6
- package/dist/index.es50.js.map +1 -1
- package/dist/index.es51.js +3 -14
- package/dist/index.es51.js.map +1 -1
- package/dist/index.es52.js +36 -8
- package/dist/index.es52.js.map +1 -1
- package/dist/index.es53.js +61 -83
- package/dist/index.es53.js.map +1 -1
- package/dist/index.es54.js +37 -3
- package/dist/index.es54.js.map +1 -1
- package/dist/index.es55.js +304 -34
- package/dist/index.es55.js.map +1 -1
- package/dist/index.es56.js +9 -72
- package/dist/index.es56.js.map +1 -1
- package/dist/index.es57.js +85 -32
- package/dist/index.es57.js.map +1 -1
- package/dist/index.es58.js +6 -304
- package/dist/index.es58.js.map +1 -1
- package/dist/index.es59.js +15 -9
- package/dist/index.es59.js.map +1 -1
- package/dist/index.es60.js +142 -5
- package/dist/index.es60.js.map +1 -1
- package/dist/index.es61.js +285 -148
- package/dist/index.es61.js.map +1 -1
- package/dist/index.es62.js +62 -668
- package/dist/index.es62.js.map +1 -1
- package/dist/index.es63.js +201 -131
- package/dist/index.es63.js.map +1 -1
- package/dist/index.es64.js +29 -295
- package/dist/index.es64.js.map +1 -1
- package/dist/index.es65.js +8 -65
- package/dist/index.es65.js.map +1 -1
- package/dist/index.es66.js +9 -210
- package/dist/index.es66.js.map +1 -1
- package/dist/index.es67.js +181 -28
- package/dist/index.es67.js.map +1 -1
- package/dist/index.es68.js +23 -8
- package/dist/index.es68.js.map +1 -1
- package/dist/index.es69.js +1397 -9
- package/dist/index.es69.js.map +1 -1
- package/dist/index.es70.js +9 -187
- package/dist/index.es70.js.map +1 -1
- package/dist/index.es71.js +8 -24
- package/dist/index.es71.js.map +1 -1
- package/dist/index.es72.js +5 -1399
- package/dist/index.es72.js.map +1 -1
- package/dist/index.es73.js +163 -9
- package/dist/index.es73.js.map +1 -1
- package/dist/index.es74.js +672 -8
- package/dist/index.es74.js.map +1 -1
- package/dist/index.es75.js +11 -36
- package/dist/index.es75.js.map +1 -1
- package/dist/index.es76.js +40 -5
- package/dist/index.es76.js.map +1 -1
- package/dist/index.es77.js +32 -71
- package/dist/index.es77.js.map +1 -1
- package/dist/index.es78.js +225 -30
- package/dist/index.es78.js.map +1 -1
- package/dist/index.es79.js +29 -11
- package/dist/index.es79.js.map +1 -1
- package/dist/index.es80.js +72 -37
- package/dist/index.es80.js.map +1 -1
- package/dist/index.es81.js +74 -32
- package/dist/index.es81.js.map +1 -1
- package/dist/index.es82.js +46 -226
- package/dist/index.es82.js.map +1 -1
- package/dist/index.es83.js +6 -6
- package/dist/index.es83.js.map +1 -1
- package/dist/index.es84.js +39 -71
- package/dist/index.es84.js.map +1 -1
- package/dist/index.es85.js +54 -73
- package/dist/index.es85.js.map +1 -1
- package/dist/index.es86.js +13 -52
- package/dist/index.es86.js.map +1 -1
- package/dist/index.es87.js +135 -28
- package/dist/index.es87.js.map +1 -1
- package/dist/index.es88.js +20 -42
- package/dist/index.es88.js.map +1 -1
- package/dist/index.es89.js +175 -50
- package/dist/index.es89.js.map +1 -1
- package/dist/index.es90.js +240 -12
- package/dist/index.es90.js.map +1 -1
- package/dist/index.es91.js +348 -130
- package/dist/index.es91.js.map +1 -1
- package/dist/index.es92.js +134 -18
- package/dist/index.es92.js.map +1 -1
- package/dist/index.es93.js +62 -174
- package/dist/index.es93.js.map +1 -1
- package/dist/index.es94.js +30 -234
- package/dist/index.es94.js.map +1 -1
- package/dist/index.es95.js +26 -344
- package/dist/index.es95.js.map +1 -1
- package/dist/index.es96.js +156 -127
- package/dist/index.es96.js.map +1 -1
- package/dist/index.es97.js +196 -63
- package/dist/index.es97.js.map +1 -1
- package/dist/index.es98.js +14 -37
- package/dist/index.es98.js.map +1 -1
- package/dist/index.es99.js +27 -34
- package/dist/index.es99.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es95.js
CHANGED
|
@@ -1,358 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { IterableReadableStream } from "./index.es93.js";
|
|
4
|
-
import { GenerationChunk } from "./index.es118.js";
|
|
5
|
-
function assignName({ name, serialized }) {
|
|
6
|
-
if (name !== void 0) return name;
|
|
7
|
-
if (serialized?.name !== void 0) return serialized.name;
|
|
8
|
-
else if (serialized?.id !== void 0 && Array.isArray(serialized?.id)) return serialized.id[serialized.id.length - 1];
|
|
9
|
-
return "Unnamed";
|
|
1
|
+
function isRunnableInterface(thing) {
|
|
2
|
+
return thing ? thing.lc_runnable : false;
|
|
10
3
|
}
|
|
11
|
-
|
|
12
|
-
var EventStreamCallbackHandler = class extends BaseTracer {
|
|
13
|
-
autoClose = true;
|
|
4
|
+
var _RootEventFilter = class {
|
|
14
5
|
includeNames;
|
|
15
6
|
includeTypes;
|
|
16
7
|
includeTags;
|
|
17
8
|
excludeNames;
|
|
18
9
|
excludeTypes;
|
|
19
10
|
excludeTags;
|
|
20
|
-
runInfoMap = /* @__PURE__ */ new Map();
|
|
21
|
-
tappedPromises = /* @__PURE__ */ new Map();
|
|
22
|
-
transformStream;
|
|
23
|
-
writer;
|
|
24
|
-
receiveStream;
|
|
25
|
-
readableStreamClosed = false;
|
|
26
|
-
name = "event_stream_tracer";
|
|
27
|
-
lc_prefer_streaming = true;
|
|
28
11
|
constructor(fields) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
this.
|
|
34
|
-
this.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
this.
|
|
38
|
-
|
|
39
|
-
this.
|
|
40
|
-
this.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
this.
|
|
44
|
-
this.
|
|
45
|
-
}
|
|
46
|
-
[Symbol.asyncIterator]() {
|
|
47
|
-
return this.receiveStream;
|
|
48
|
-
}
|
|
49
|
-
async persistRun(_run) {
|
|
50
|
-
}
|
|
51
|
-
_includeRun(run) {
|
|
52
|
-
const runTags = run.tags ?? [];
|
|
53
|
-
let include = this.includeNames === void 0 && this.includeTags === void 0 && this.includeTypes === void 0;
|
|
54
|
-
if (this.includeNames !== void 0) include = include || this.includeNames.includes(run.name);
|
|
55
|
-
if (this.includeTypes !== void 0) include = include || this.includeTypes.includes(run.runType);
|
|
56
|
-
if (this.includeTags !== void 0) include = include || runTags.find((tag) => this.includeTags?.includes(tag)) !== void 0;
|
|
57
|
-
if (this.excludeNames !== void 0) include = include && !this.excludeNames.includes(run.name);
|
|
58
|
-
if (this.excludeTypes !== void 0) include = include && !this.excludeTypes.includes(run.runType);
|
|
59
|
-
if (this.excludeTags !== void 0) include = include && runTags.every((tag) => !this.excludeTags?.includes(tag));
|
|
12
|
+
this.includeNames = fields.includeNames;
|
|
13
|
+
this.includeTypes = fields.includeTypes;
|
|
14
|
+
this.includeTags = fields.includeTags;
|
|
15
|
+
this.excludeNames = fields.excludeNames;
|
|
16
|
+
this.excludeTypes = fields.excludeTypes;
|
|
17
|
+
this.excludeTags = fields.excludeTags;
|
|
18
|
+
}
|
|
19
|
+
includeEvent(event, rootType) {
|
|
20
|
+
let include = this.includeNames === void 0 && this.includeTypes === void 0 && this.includeTags === void 0;
|
|
21
|
+
const eventTags = event.tags ?? [];
|
|
22
|
+
if (this.includeNames !== void 0) include = include || this.includeNames.includes(event.name);
|
|
23
|
+
if (this.includeTypes !== void 0) include = include || this.includeTypes.includes(rootType);
|
|
24
|
+
if (this.includeTags !== void 0) include = include || eventTags.some((tag) => this.includeTags?.includes(tag));
|
|
25
|
+
if (this.excludeNames !== void 0) include = include && !this.excludeNames.includes(event.name);
|
|
26
|
+
if (this.excludeTypes !== void 0) include = include && !this.excludeTypes.includes(rootType);
|
|
27
|
+
if (this.excludeTags !== void 0) include = include && eventTags.every((tag) => !this.excludeTags?.includes(tag));
|
|
60
28
|
return include;
|
|
61
29
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (runInfo === void 0) {
|
|
67
|
-
yield firstChunk.value;
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
function _formatOutputChunk(eventType, data) {
|
|
71
|
-
if (eventType === "llm" && typeof data === "string") return new GenerationChunk({ text: data });
|
|
72
|
-
return data;
|
|
73
|
-
}
|
|
74
|
-
let tappedPromise = this.tappedPromises.get(runId);
|
|
75
|
-
if (tappedPromise === void 0) {
|
|
76
|
-
let tappedPromiseResolver;
|
|
77
|
-
tappedPromise = new Promise((resolve) => {
|
|
78
|
-
tappedPromiseResolver = resolve;
|
|
79
|
-
});
|
|
80
|
-
this.tappedPromises.set(runId, tappedPromise);
|
|
81
|
-
try {
|
|
82
|
-
const event = {
|
|
83
|
-
event: `on_${runInfo.runType}_stream`,
|
|
84
|
-
run_id: runId,
|
|
85
|
-
name: runInfo.name,
|
|
86
|
-
tags: runInfo.tags,
|
|
87
|
-
metadata: runInfo.metadata,
|
|
88
|
-
data: {}
|
|
89
|
-
};
|
|
90
|
-
await this.send({
|
|
91
|
-
...event,
|
|
92
|
-
data: { chunk: _formatOutputChunk(runInfo.runType, firstChunk.value) }
|
|
93
|
-
}, runInfo);
|
|
94
|
-
yield firstChunk.value;
|
|
95
|
-
for await (const chunk of outputStream) {
|
|
96
|
-
if (runInfo.runType !== "tool" && runInfo.runType !== "retriever") await this.send({
|
|
97
|
-
...event,
|
|
98
|
-
data: { chunk: _formatOutputChunk(runInfo.runType, chunk) }
|
|
99
|
-
}, runInfo);
|
|
100
|
-
yield chunk;
|
|
101
|
-
}
|
|
102
|
-
} finally {
|
|
103
|
-
tappedPromiseResolver?.();
|
|
104
|
-
}
|
|
105
|
-
} else {
|
|
106
|
-
yield firstChunk.value;
|
|
107
|
-
for await (const chunk of outputStream) yield chunk;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
async send(payload, run) {
|
|
111
|
-
if (this.readableStreamClosed) return;
|
|
112
|
-
if (this._includeRun(run)) await this.writer.write(payload);
|
|
113
|
-
}
|
|
114
|
-
async sendEndEvent(payload, run) {
|
|
115
|
-
const tappedPromise = this.tappedPromises.get(payload.run_id);
|
|
116
|
-
if (tappedPromise !== void 0) tappedPromise.then(() => {
|
|
117
|
-
this.send(payload, run);
|
|
118
|
-
});
|
|
119
|
-
else await this.send(payload, run);
|
|
120
|
-
}
|
|
121
|
-
async onLLMStart(run) {
|
|
122
|
-
const runName = assignName(run);
|
|
123
|
-
const runType = run.inputs.messages !== void 0 ? "chat_model" : "llm";
|
|
124
|
-
const runInfo = {
|
|
125
|
-
tags: run.tags ?? [],
|
|
126
|
-
metadata: run.extra?.metadata ?? {},
|
|
127
|
-
name: runName,
|
|
128
|
-
runType,
|
|
129
|
-
inputs: run.inputs
|
|
130
|
-
};
|
|
131
|
-
this.runInfoMap.set(run.id, runInfo);
|
|
132
|
-
const eventName = `on_${runType}_start`;
|
|
133
|
-
await this.send({
|
|
134
|
-
event: eventName,
|
|
135
|
-
data: { input: run.inputs },
|
|
136
|
-
name: runName,
|
|
137
|
-
tags: run.tags ?? [],
|
|
138
|
-
run_id: run.id,
|
|
139
|
-
metadata: run.extra?.metadata ?? {}
|
|
140
|
-
}, runInfo);
|
|
141
|
-
}
|
|
142
|
-
async onLLMNewToken(run, token, kwargs) {
|
|
143
|
-
const runInfo = this.runInfoMap.get(run.id);
|
|
144
|
-
let chunk;
|
|
145
|
-
let eventName;
|
|
146
|
-
if (runInfo === void 0) throw new Error(`onLLMNewToken: Run ID ${run.id} not found in run map.`);
|
|
147
|
-
if (this.runInfoMap.size === 1) return;
|
|
148
|
-
if (runInfo.runType === "chat_model") {
|
|
149
|
-
eventName = "on_chat_model_stream";
|
|
150
|
-
if (kwargs?.chunk === void 0) chunk = new AIMessageChunk({
|
|
151
|
-
content: token,
|
|
152
|
-
id: `run-${run.id}`
|
|
153
|
-
});
|
|
154
|
-
else chunk = kwargs.chunk.message;
|
|
155
|
-
} else if (runInfo.runType === "llm") {
|
|
156
|
-
eventName = "on_llm_stream";
|
|
157
|
-
if (kwargs?.chunk === void 0) chunk = new GenerationChunk({ text: token });
|
|
158
|
-
else chunk = kwargs.chunk;
|
|
159
|
-
} else throw new Error(`Unexpected run type ${runInfo.runType}`);
|
|
160
|
-
await this.send({
|
|
161
|
-
event: eventName,
|
|
162
|
-
data: { chunk },
|
|
163
|
-
run_id: run.id,
|
|
164
|
-
name: runInfo.name,
|
|
165
|
-
tags: runInfo.tags,
|
|
166
|
-
metadata: runInfo.metadata
|
|
167
|
-
}, runInfo);
|
|
168
|
-
}
|
|
169
|
-
async onLLMEnd(run) {
|
|
170
|
-
const runInfo = this.runInfoMap.get(run.id);
|
|
171
|
-
this.runInfoMap.delete(run.id);
|
|
172
|
-
let eventName;
|
|
173
|
-
if (runInfo === void 0) throw new Error(`onLLMEnd: Run ID ${run.id} not found in run map.`);
|
|
174
|
-
const generations = run.outputs?.generations;
|
|
175
|
-
let output;
|
|
176
|
-
if (runInfo.runType === "chat_model") {
|
|
177
|
-
for (const generation of generations ?? []) {
|
|
178
|
-
if (output !== void 0) break;
|
|
179
|
-
output = generation[0]?.message;
|
|
180
|
-
}
|
|
181
|
-
eventName = "on_chat_model_end";
|
|
182
|
-
} else if (runInfo.runType === "llm") {
|
|
183
|
-
output = {
|
|
184
|
-
generations: generations?.map((generation) => {
|
|
185
|
-
return generation.map((chunk) => {
|
|
186
|
-
return {
|
|
187
|
-
text: chunk.text,
|
|
188
|
-
generationInfo: chunk.generationInfo
|
|
189
|
-
};
|
|
190
|
-
});
|
|
191
|
-
}),
|
|
192
|
-
llmOutput: run.outputs?.llmOutput ?? {}
|
|
193
|
-
};
|
|
194
|
-
eventName = "on_llm_end";
|
|
195
|
-
} else throw new Error(`onLLMEnd: Unexpected run type: ${runInfo.runType}`);
|
|
196
|
-
await this.sendEndEvent({
|
|
197
|
-
event: eventName,
|
|
198
|
-
data: {
|
|
199
|
-
output,
|
|
200
|
-
input: runInfo.inputs
|
|
201
|
-
},
|
|
202
|
-
run_id: run.id,
|
|
203
|
-
name: runInfo.name,
|
|
204
|
-
tags: runInfo.tags,
|
|
205
|
-
metadata: runInfo.metadata
|
|
206
|
-
}, runInfo);
|
|
207
|
-
}
|
|
208
|
-
async onChainStart(run) {
|
|
209
|
-
const runName = assignName(run);
|
|
210
|
-
const runType = run.run_type ?? "chain";
|
|
211
|
-
const runInfo = {
|
|
212
|
-
tags: run.tags ?? [],
|
|
213
|
-
metadata: run.extra?.metadata ?? {},
|
|
214
|
-
name: runName,
|
|
215
|
-
runType: run.run_type
|
|
216
|
-
};
|
|
217
|
-
let eventData = {};
|
|
218
|
-
if (run.inputs.input === "" && Object.keys(run.inputs).length === 1) {
|
|
219
|
-
eventData = {};
|
|
220
|
-
runInfo.inputs = {};
|
|
221
|
-
} else if (run.inputs.input !== void 0) {
|
|
222
|
-
eventData.input = run.inputs.input;
|
|
223
|
-
runInfo.inputs = run.inputs.input;
|
|
224
|
-
} else {
|
|
225
|
-
eventData.input = run.inputs;
|
|
226
|
-
runInfo.inputs = run.inputs;
|
|
227
|
-
}
|
|
228
|
-
this.runInfoMap.set(run.id, runInfo);
|
|
229
|
-
await this.send({
|
|
230
|
-
event: `on_${runType}_start`,
|
|
231
|
-
data: eventData,
|
|
232
|
-
name: runName,
|
|
233
|
-
tags: run.tags ?? [],
|
|
234
|
-
run_id: run.id,
|
|
235
|
-
metadata: run.extra?.metadata ?? {}
|
|
236
|
-
}, runInfo);
|
|
237
|
-
}
|
|
238
|
-
async onChainEnd(run) {
|
|
239
|
-
const runInfo = this.runInfoMap.get(run.id);
|
|
240
|
-
this.runInfoMap.delete(run.id);
|
|
241
|
-
if (runInfo === void 0) throw new Error(`onChainEnd: Run ID ${run.id} not found in run map.`);
|
|
242
|
-
const eventName = `on_${run.run_type}_end`;
|
|
243
|
-
const inputs = run.inputs ?? runInfo.inputs ?? {};
|
|
244
|
-
const outputs = run.outputs?.output ?? run.outputs;
|
|
245
|
-
const data = {
|
|
246
|
-
output: outputs,
|
|
247
|
-
input: inputs
|
|
248
|
-
};
|
|
249
|
-
if (inputs.input && Object.keys(inputs).length === 1) {
|
|
250
|
-
data.input = inputs.input;
|
|
251
|
-
runInfo.inputs = inputs.input;
|
|
252
|
-
}
|
|
253
|
-
await this.sendEndEvent({
|
|
254
|
-
event: eventName,
|
|
255
|
-
data,
|
|
256
|
-
run_id: run.id,
|
|
257
|
-
name: runInfo.name,
|
|
258
|
-
tags: runInfo.tags,
|
|
259
|
-
metadata: runInfo.metadata ?? {}
|
|
260
|
-
}, runInfo);
|
|
261
|
-
}
|
|
262
|
-
async onToolStart(run) {
|
|
263
|
-
const runName = assignName(run);
|
|
264
|
-
const runInfo = {
|
|
265
|
-
tags: run.tags ?? [],
|
|
266
|
-
metadata: run.extra?.metadata ?? {},
|
|
267
|
-
name: runName,
|
|
268
|
-
runType: "tool",
|
|
269
|
-
inputs: run.inputs ?? {}
|
|
270
|
-
};
|
|
271
|
-
this.runInfoMap.set(run.id, runInfo);
|
|
272
|
-
await this.send({
|
|
273
|
-
event: "on_tool_start",
|
|
274
|
-
data: { input: run.inputs ?? {} },
|
|
275
|
-
name: runName,
|
|
276
|
-
run_id: run.id,
|
|
277
|
-
tags: run.tags ?? [],
|
|
278
|
-
metadata: run.extra?.metadata ?? {}
|
|
279
|
-
}, runInfo);
|
|
280
|
-
}
|
|
281
|
-
async onToolEnd(run) {
|
|
282
|
-
const runInfo = this.runInfoMap.get(run.id);
|
|
283
|
-
this.runInfoMap.delete(run.id);
|
|
284
|
-
if (runInfo === void 0) throw new Error(`onToolEnd: Run ID ${run.id} not found in run map.`);
|
|
285
|
-
if (runInfo.inputs === void 0) throw new Error(`onToolEnd: Run ID ${run.id} is a tool call, and is expected to have traced inputs.`);
|
|
286
|
-
const output = run.outputs?.output === void 0 ? run.outputs : run.outputs.output;
|
|
287
|
-
await this.sendEndEvent({
|
|
288
|
-
event: "on_tool_end",
|
|
289
|
-
data: {
|
|
290
|
-
output,
|
|
291
|
-
input: runInfo.inputs
|
|
292
|
-
},
|
|
293
|
-
run_id: run.id,
|
|
294
|
-
name: runInfo.name,
|
|
295
|
-
tags: runInfo.tags,
|
|
296
|
-
metadata: runInfo.metadata
|
|
297
|
-
}, runInfo);
|
|
298
|
-
}
|
|
299
|
-
async onRetrieverStart(run) {
|
|
300
|
-
const runName = assignName(run);
|
|
301
|
-
const runType = "retriever";
|
|
302
|
-
const runInfo = {
|
|
303
|
-
tags: run.tags ?? [],
|
|
304
|
-
metadata: run.extra?.metadata ?? {},
|
|
305
|
-
name: runName,
|
|
306
|
-
runType,
|
|
307
|
-
inputs: { query: run.inputs.query }
|
|
308
|
-
};
|
|
309
|
-
this.runInfoMap.set(run.id, runInfo);
|
|
310
|
-
await this.send({
|
|
311
|
-
event: "on_retriever_start",
|
|
312
|
-
data: { input: { query: run.inputs.query } },
|
|
313
|
-
name: runName,
|
|
314
|
-
tags: run.tags ?? [],
|
|
315
|
-
run_id: run.id,
|
|
316
|
-
metadata: run.extra?.metadata ?? {}
|
|
317
|
-
}, runInfo);
|
|
318
|
-
}
|
|
319
|
-
async onRetrieverEnd(run) {
|
|
320
|
-
const runInfo = this.runInfoMap.get(run.id);
|
|
321
|
-
this.runInfoMap.delete(run.id);
|
|
322
|
-
if (runInfo === void 0) throw new Error(`onRetrieverEnd: Run ID ${run.id} not found in run map.`);
|
|
323
|
-
await this.sendEndEvent({
|
|
324
|
-
event: "on_retriever_end",
|
|
325
|
-
data: {
|
|
326
|
-
output: run.outputs?.documents ?? run.outputs,
|
|
327
|
-
input: runInfo.inputs
|
|
328
|
-
},
|
|
329
|
-
run_id: run.id,
|
|
330
|
-
name: runInfo.name,
|
|
331
|
-
tags: runInfo.tags,
|
|
332
|
-
metadata: runInfo.metadata
|
|
333
|
-
}, runInfo);
|
|
334
|
-
}
|
|
335
|
-
async handleCustomEvent(eventName, data, runId) {
|
|
336
|
-
const runInfo = this.runInfoMap.get(runId);
|
|
337
|
-
if (runInfo === void 0) throw new Error(`handleCustomEvent: Run ID ${runId} not found in run map.`);
|
|
338
|
-
await this.send({
|
|
339
|
-
event: "on_custom_event",
|
|
340
|
-
run_id: runId,
|
|
341
|
-
name: eventName,
|
|
342
|
-
tags: runInfo.tags,
|
|
343
|
-
metadata: runInfo.metadata,
|
|
344
|
-
data
|
|
345
|
-
}, runInfo);
|
|
346
|
-
}
|
|
347
|
-
async finish() {
|
|
348
|
-
const pendingPromises = [...this.tappedPromises.values()];
|
|
349
|
-
Promise.all(pendingPromises).finally(() => {
|
|
350
|
-
this.writer.close();
|
|
351
|
-
});
|
|
352
|
-
}
|
|
30
|
+
};
|
|
31
|
+
const toBase64Url = (str) => {
|
|
32
|
+
const encoded = btoa(str);
|
|
33
|
+
return encoded.replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
353
34
|
};
|
|
354
35
|
export {
|
|
355
|
-
|
|
356
|
-
|
|
36
|
+
_RootEventFilter,
|
|
37
|
+
isRunnableInterface,
|
|
38
|
+
toBase64Url
|
|
357
39
|
};
|
|
358
40
|
//# sourceMappingURL=index.es95.js.map
|
package/dist/index.es95.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es95.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.13_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/tracers/event_stream.js"],"sourcesContent":["import { AIMessageChunk } from \"../messages/ai.js\";\nimport { BaseTracer } from \"./base.js\";\nimport { IterableReadableStream } from \"../utils/stream.js\";\nimport { GenerationChunk } from \"../outputs.js\";\n\n//#region src/tracers/event_stream.ts\nfunction assignName({ name, serialized }) {\n\tif (name !== void 0) return name;\n\tif (serialized?.name !== void 0) return serialized.name;\n\telse if (serialized?.id !== void 0 && Array.isArray(serialized?.id)) return serialized.id[serialized.id.length - 1];\n\treturn \"Unnamed\";\n}\nconst isStreamEventsHandler = (handler) => handler.name === \"event_stream_tracer\";\n/**\n* Class that extends the `BaseTracer` class from the\n* `langchain.callbacks.tracers.base` module. It represents a callback\n* handler that logs the execution of runs and emits `RunLog` instances to a\n* `RunLogStream`.\n*/\nvar EventStreamCallbackHandler = class extends BaseTracer {\n\tautoClose = true;\n\tincludeNames;\n\tincludeTypes;\n\tincludeTags;\n\texcludeNames;\n\texcludeTypes;\n\texcludeTags;\n\trunInfoMap = /* @__PURE__ */ new Map();\n\ttappedPromises = /* @__PURE__ */ new Map();\n\ttransformStream;\n\twriter;\n\treceiveStream;\n\treadableStreamClosed = false;\n\tname = \"event_stream_tracer\";\n\tlc_prefer_streaming = true;\n\tconstructor(fields) {\n\t\tsuper({\n\t\t\t_awaitHandler: true,\n\t\t\t...fields\n\t\t});\n\t\tthis.autoClose = fields?.autoClose ?? true;\n\t\tthis.includeNames = fields?.includeNames;\n\t\tthis.includeTypes = fields?.includeTypes;\n\t\tthis.includeTags = fields?.includeTags;\n\t\tthis.excludeNames = fields?.excludeNames;\n\t\tthis.excludeTypes = fields?.excludeTypes;\n\t\tthis.excludeTags = fields?.excludeTags;\n\t\tthis.transformStream = new TransformStream({ flush: () => {\n\t\t\tthis.readableStreamClosed = true;\n\t\t} });\n\t\tthis.writer = this.transformStream.writable.getWriter();\n\t\tthis.receiveStream = IterableReadableStream.fromReadableStream(this.transformStream.readable);\n\t}\n\t[Symbol.asyncIterator]() {\n\t\treturn this.receiveStream;\n\t}\n\tasync persistRun(_run) {}\n\t_includeRun(run) {\n\t\tconst runTags = run.tags ?? [];\n\t\tlet include = this.includeNames === void 0 && this.includeTags === void 0 && this.includeTypes === void 0;\n\t\tif (this.includeNames !== void 0) include = include || this.includeNames.includes(run.name);\n\t\tif (this.includeTypes !== void 0) include = include || this.includeTypes.includes(run.runType);\n\t\tif (this.includeTags !== void 0) include = include || runTags.find((tag) => this.includeTags?.includes(tag)) !== void 0;\n\t\tif (this.excludeNames !== void 0) include = include && !this.excludeNames.includes(run.name);\n\t\tif (this.excludeTypes !== void 0) include = include && !this.excludeTypes.includes(run.runType);\n\t\tif (this.excludeTags !== void 0) include = include && runTags.every((tag) => !this.excludeTags?.includes(tag));\n\t\treturn include;\n\t}\n\tasync *tapOutputIterable(runId, outputStream) {\n\t\tconst firstChunk = await outputStream.next();\n\t\tif (firstChunk.done) return;\n\t\tconst runInfo = this.runInfoMap.get(runId);\n\t\tif (runInfo === void 0) {\n\t\t\tyield firstChunk.value;\n\t\t\treturn;\n\t\t}\n\t\tfunction _formatOutputChunk(eventType, data) {\n\t\t\tif (eventType === \"llm\" && typeof data === \"string\") return new GenerationChunk({ text: data });\n\t\t\treturn data;\n\t\t}\n\t\tlet tappedPromise = this.tappedPromises.get(runId);\n\t\tif (tappedPromise === void 0) {\n\t\t\tlet tappedPromiseResolver;\n\t\t\ttappedPromise = new Promise((resolve) => {\n\t\t\t\ttappedPromiseResolver = resolve;\n\t\t\t});\n\t\t\tthis.tappedPromises.set(runId, tappedPromise);\n\t\t\ttry {\n\t\t\t\tconst event = {\n\t\t\t\t\tevent: `on_${runInfo.runType}_stream`,\n\t\t\t\t\trun_id: runId,\n\t\t\t\t\tname: runInfo.name,\n\t\t\t\t\ttags: runInfo.tags,\n\t\t\t\t\tmetadata: runInfo.metadata,\n\t\t\t\t\tdata: {}\n\t\t\t\t};\n\t\t\t\tawait this.send({\n\t\t\t\t\t...event,\n\t\t\t\t\tdata: { chunk: _formatOutputChunk(runInfo.runType, firstChunk.value) }\n\t\t\t\t}, runInfo);\n\t\t\t\tyield firstChunk.value;\n\t\t\t\tfor await (const chunk of outputStream) {\n\t\t\t\t\tif (runInfo.runType !== \"tool\" && runInfo.runType !== \"retriever\") await this.send({\n\t\t\t\t\t\t...event,\n\t\t\t\t\t\tdata: { chunk: _formatOutputChunk(runInfo.runType, chunk) }\n\t\t\t\t\t}, runInfo);\n\t\t\t\t\tyield chunk;\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\ttappedPromiseResolver?.();\n\t\t\t}\n\t\t} else {\n\t\t\tyield firstChunk.value;\n\t\t\tfor await (const chunk of outputStream) yield chunk;\n\t\t}\n\t}\n\tasync send(payload, run) {\n\t\tif (this.readableStreamClosed) return;\n\t\tif (this._includeRun(run)) await this.writer.write(payload);\n\t}\n\tasync sendEndEvent(payload, run) {\n\t\tconst tappedPromise = this.tappedPromises.get(payload.run_id);\n\t\tif (tappedPromise !== void 0) tappedPromise.then(() => {\n\t\t\tthis.send(payload, run);\n\t\t});\n\t\telse await this.send(payload, run);\n\t}\n\tasync onLLMStart(run) {\n\t\tconst runName = assignName(run);\n\t\tconst runType = run.inputs.messages !== void 0 ? \"chat_model\" : \"llm\";\n\t\tconst runInfo = {\n\t\t\ttags: run.tags ?? [],\n\t\t\tmetadata: run.extra?.metadata ?? {},\n\t\t\tname: runName,\n\t\t\trunType,\n\t\t\tinputs: run.inputs\n\t\t};\n\t\tthis.runInfoMap.set(run.id, runInfo);\n\t\tconst eventName = `on_${runType}_start`;\n\t\tawait this.send({\n\t\t\tevent: eventName,\n\t\t\tdata: { input: run.inputs },\n\t\t\tname: runName,\n\t\t\ttags: run.tags ?? [],\n\t\t\trun_id: run.id,\n\t\t\tmetadata: run.extra?.metadata ?? {}\n\t\t}, runInfo);\n\t}\n\tasync onLLMNewToken(run, token, kwargs) {\n\t\tconst runInfo = this.runInfoMap.get(run.id);\n\t\tlet chunk;\n\t\tlet eventName;\n\t\tif (runInfo === void 0) throw new Error(`onLLMNewToken: Run ID ${run.id} not found in run map.`);\n\t\tif (this.runInfoMap.size === 1) return;\n\t\tif (runInfo.runType === \"chat_model\") {\n\t\t\teventName = \"on_chat_model_stream\";\n\t\t\tif (kwargs?.chunk === void 0) chunk = new AIMessageChunk({\n\t\t\t\tcontent: token,\n\t\t\t\tid: `run-${run.id}`\n\t\t\t});\n\t\t\telse chunk = kwargs.chunk.message;\n\t\t} else if (runInfo.runType === \"llm\") {\n\t\t\teventName = \"on_llm_stream\";\n\t\t\tif (kwargs?.chunk === void 0) chunk = new GenerationChunk({ text: token });\n\t\t\telse chunk = kwargs.chunk;\n\t\t} else throw new Error(`Unexpected run type ${runInfo.runType}`);\n\t\tawait this.send({\n\t\t\tevent: eventName,\n\t\t\tdata: { chunk },\n\t\t\trun_id: run.id,\n\t\t\tname: runInfo.name,\n\t\t\ttags: runInfo.tags,\n\t\t\tmetadata: runInfo.metadata\n\t\t}, runInfo);\n\t}\n\tasync onLLMEnd(run) {\n\t\tconst runInfo = this.runInfoMap.get(run.id);\n\t\tthis.runInfoMap.delete(run.id);\n\t\tlet eventName;\n\t\tif (runInfo === void 0) throw new Error(`onLLMEnd: Run ID ${run.id} not found in run map.`);\n\t\tconst generations = run.outputs?.generations;\n\t\tlet output;\n\t\tif (runInfo.runType === \"chat_model\") {\n\t\t\tfor (const generation of generations ?? []) {\n\t\t\t\tif (output !== void 0) break;\n\t\t\t\toutput = generation[0]?.message;\n\t\t\t}\n\t\t\teventName = \"on_chat_model_end\";\n\t\t} else if (runInfo.runType === \"llm\") {\n\t\t\toutput = {\n\t\t\t\tgenerations: generations?.map((generation) => {\n\t\t\t\t\treturn generation.map((chunk) => {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\ttext: chunk.text,\n\t\t\t\t\t\t\tgenerationInfo: chunk.generationInfo\n\t\t\t\t\t\t};\n\t\t\t\t\t});\n\t\t\t\t}),\n\t\t\t\tllmOutput: run.outputs?.llmOutput ?? {}\n\t\t\t};\n\t\t\teventName = \"on_llm_end\";\n\t\t} else throw new Error(`onLLMEnd: Unexpected run type: ${runInfo.runType}`);\n\t\tawait this.sendEndEvent({\n\t\t\tevent: eventName,\n\t\t\tdata: {\n\t\t\t\toutput,\n\t\t\t\tinput: runInfo.inputs\n\t\t\t},\n\t\t\trun_id: run.id,\n\t\t\tname: runInfo.name,\n\t\t\ttags: runInfo.tags,\n\t\t\tmetadata: runInfo.metadata\n\t\t}, runInfo);\n\t}\n\tasync onChainStart(run) {\n\t\tconst runName = assignName(run);\n\t\tconst runType = run.run_type ?? \"chain\";\n\t\tconst runInfo = {\n\t\t\ttags: run.tags ?? [],\n\t\t\tmetadata: run.extra?.metadata ?? {},\n\t\t\tname: runName,\n\t\t\trunType: run.run_type\n\t\t};\n\t\tlet eventData = {};\n\t\tif (run.inputs.input === \"\" && Object.keys(run.inputs).length === 1) {\n\t\t\teventData = {};\n\t\t\trunInfo.inputs = {};\n\t\t} else if (run.inputs.input !== void 0) {\n\t\t\teventData.input = run.inputs.input;\n\t\t\trunInfo.inputs = run.inputs.input;\n\t\t} else {\n\t\t\teventData.input = run.inputs;\n\t\t\trunInfo.inputs = run.inputs;\n\t\t}\n\t\tthis.runInfoMap.set(run.id, runInfo);\n\t\tawait this.send({\n\t\t\tevent: `on_${runType}_start`,\n\t\t\tdata: eventData,\n\t\t\tname: runName,\n\t\t\ttags: run.tags ?? [],\n\t\t\trun_id: run.id,\n\t\t\tmetadata: run.extra?.metadata ?? {}\n\t\t}, runInfo);\n\t}\n\tasync onChainEnd(run) {\n\t\tconst runInfo = this.runInfoMap.get(run.id);\n\t\tthis.runInfoMap.delete(run.id);\n\t\tif (runInfo === void 0) throw new Error(`onChainEnd: Run ID ${run.id} not found in run map.`);\n\t\tconst eventName = `on_${run.run_type}_end`;\n\t\tconst inputs = run.inputs ?? runInfo.inputs ?? {};\n\t\tconst outputs = run.outputs?.output ?? run.outputs;\n\t\tconst data = {\n\t\t\toutput: outputs,\n\t\t\tinput: inputs\n\t\t};\n\t\tif (inputs.input && Object.keys(inputs).length === 1) {\n\t\t\tdata.input = inputs.input;\n\t\t\trunInfo.inputs = inputs.input;\n\t\t}\n\t\tawait this.sendEndEvent({\n\t\t\tevent: eventName,\n\t\t\tdata,\n\t\t\trun_id: run.id,\n\t\t\tname: runInfo.name,\n\t\t\ttags: runInfo.tags,\n\t\t\tmetadata: runInfo.metadata ?? {}\n\t\t}, runInfo);\n\t}\n\tasync onToolStart(run) {\n\t\tconst runName = assignName(run);\n\t\tconst runInfo = {\n\t\t\ttags: run.tags ?? [],\n\t\t\tmetadata: run.extra?.metadata ?? {},\n\t\t\tname: runName,\n\t\t\trunType: \"tool\",\n\t\t\tinputs: run.inputs ?? {}\n\t\t};\n\t\tthis.runInfoMap.set(run.id, runInfo);\n\t\tawait this.send({\n\t\t\tevent: \"on_tool_start\",\n\t\t\tdata: { input: run.inputs ?? {} },\n\t\t\tname: runName,\n\t\t\trun_id: run.id,\n\t\t\ttags: run.tags ?? [],\n\t\t\tmetadata: run.extra?.metadata ?? {}\n\t\t}, runInfo);\n\t}\n\tasync onToolEnd(run) {\n\t\tconst runInfo = this.runInfoMap.get(run.id);\n\t\tthis.runInfoMap.delete(run.id);\n\t\tif (runInfo === void 0) throw new Error(`onToolEnd: Run ID ${run.id} not found in run map.`);\n\t\tif (runInfo.inputs === void 0) throw new Error(`onToolEnd: Run ID ${run.id} is a tool call, and is expected to have traced inputs.`);\n\t\tconst output = run.outputs?.output === void 0 ? run.outputs : run.outputs.output;\n\t\tawait this.sendEndEvent({\n\t\t\tevent: \"on_tool_end\",\n\t\t\tdata: {\n\t\t\t\toutput,\n\t\t\t\tinput: runInfo.inputs\n\t\t\t},\n\t\t\trun_id: run.id,\n\t\t\tname: runInfo.name,\n\t\t\ttags: runInfo.tags,\n\t\t\tmetadata: runInfo.metadata\n\t\t}, runInfo);\n\t}\n\tasync onRetrieverStart(run) {\n\t\tconst runName = assignName(run);\n\t\tconst runType = \"retriever\";\n\t\tconst runInfo = {\n\t\t\ttags: run.tags ?? [],\n\t\t\tmetadata: run.extra?.metadata ?? {},\n\t\t\tname: runName,\n\t\t\trunType,\n\t\t\tinputs: { query: run.inputs.query }\n\t\t};\n\t\tthis.runInfoMap.set(run.id, runInfo);\n\t\tawait this.send({\n\t\t\tevent: \"on_retriever_start\",\n\t\t\tdata: { input: { query: run.inputs.query } },\n\t\t\tname: runName,\n\t\t\ttags: run.tags ?? [],\n\t\t\trun_id: run.id,\n\t\t\tmetadata: run.extra?.metadata ?? {}\n\t\t}, runInfo);\n\t}\n\tasync onRetrieverEnd(run) {\n\t\tconst runInfo = this.runInfoMap.get(run.id);\n\t\tthis.runInfoMap.delete(run.id);\n\t\tif (runInfo === void 0) throw new Error(`onRetrieverEnd: Run ID ${run.id} not found in run map.`);\n\t\tawait this.sendEndEvent({\n\t\t\tevent: \"on_retriever_end\",\n\t\t\tdata: {\n\t\t\t\toutput: run.outputs?.documents ?? run.outputs,\n\t\t\t\tinput: runInfo.inputs\n\t\t\t},\n\t\t\trun_id: run.id,\n\t\t\tname: runInfo.name,\n\t\t\ttags: runInfo.tags,\n\t\t\tmetadata: runInfo.metadata\n\t\t}, runInfo);\n\t}\n\tasync handleCustomEvent(eventName, data, runId) {\n\t\tconst runInfo = this.runInfoMap.get(runId);\n\t\tif (runInfo === void 0) throw new Error(`handleCustomEvent: Run ID ${runId} not found in run map.`);\n\t\tawait this.send({\n\t\t\tevent: \"on_custom_event\",\n\t\t\trun_id: runId,\n\t\t\tname: eventName,\n\t\t\ttags: runInfo.tags,\n\t\t\tmetadata: runInfo.metadata,\n\t\t\tdata\n\t\t}, runInfo);\n\t}\n\tasync finish() {\n\t\tconst pendingPromises = [...this.tappedPromises.values()];\n\t\tPromise.all(pendingPromises).finally(() => {\n\t\t\tthis.writer.close();\n\t\t});\n\t}\n};\n\n//#endregion\nexport { EventStreamCallbackHandler, isStreamEventsHandler };\n//# sourceMappingURL=event_stream.js.map"],"names":[],"mappings":";;;;AAMA,SAAS,WAAW,EAAE,MAAM,cAAc;AACzC,MAAI,SAAS,OAAQ,QAAO;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,CAAE;AACxD,YAAQ,IAAI,eAAe,EAAE,QAAQ,MAAM;AAC1C,WAAK,OAAO,MAAK;AAAA,IAClB,CAAC;AAAA,EACF;AACD;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.es95.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.13_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/runnables/utils.js"],"sourcesContent":["//#region src/runnables/utils.ts\nfunction isRunnableInterface(thing) {\n\treturn thing ? thing.lc_runnable : false;\n}\n/**\n* Utility to filter the root event in the streamEvents implementation.\n* This is simply binding the arguments to the namespace to make save on\n* a bit of typing in the streamEvents implementation.\n*\n* TODO: Refactor and remove.\n*/\nvar _RootEventFilter = class {\n\tincludeNames;\n\tincludeTypes;\n\tincludeTags;\n\texcludeNames;\n\texcludeTypes;\n\texcludeTags;\n\tconstructor(fields) {\n\t\tthis.includeNames = fields.includeNames;\n\t\tthis.includeTypes = fields.includeTypes;\n\t\tthis.includeTags = fields.includeTags;\n\t\tthis.excludeNames = fields.excludeNames;\n\t\tthis.excludeTypes = fields.excludeTypes;\n\t\tthis.excludeTags = fields.excludeTags;\n\t}\n\tincludeEvent(event, rootType) {\n\t\tlet include = this.includeNames === void 0 && this.includeTypes === void 0 && this.includeTags === void 0;\n\t\tconst eventTags = event.tags ?? [];\n\t\tif (this.includeNames !== void 0) include = include || this.includeNames.includes(event.name);\n\t\tif (this.includeTypes !== void 0) include = include || this.includeTypes.includes(rootType);\n\t\tif (this.includeTags !== void 0) include = include || eventTags.some((tag) => this.includeTags?.includes(tag));\n\t\tif (this.excludeNames !== void 0) include = include && !this.excludeNames.includes(event.name);\n\t\tif (this.excludeTypes !== void 0) include = include && !this.excludeTypes.includes(rootType);\n\t\tif (this.excludeTags !== void 0) include = include && eventTags.every((tag) => !this.excludeTags?.includes(tag));\n\t\treturn include;\n\t}\n};\nconst toBase64Url = (str) => {\n\tconst encoded = btoa(str);\n\treturn encoded.replace(/\\+/g, \"-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