raindrop-ai 0.0.86 → 0.0.87
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/{chunk-JCKOY5OJ.mjs → chunk-KZ6B3DZM.mjs} +83 -11
- package/dist/index.js +82 -10
- package/dist/index.mjs +1 -1
- package/dist/tracing/index.js +82 -10
- package/dist/tracing/index.mjs +1 -1
- package/package.json +20 -20
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// package.json
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "raindrop-ai",
|
|
4
|
-
version: "0.0.
|
|
4
|
+
version: "0.0.87",
|
|
5
5
|
main: "dist/index.js",
|
|
6
6
|
module: "dist/index.mjs",
|
|
7
7
|
types: "dist/index.d.ts",
|
|
@@ -36,13 +36,13 @@ var package_default = {
|
|
|
36
36
|
test: "vitest run",
|
|
37
37
|
smoke: "tsx ./scripts/smoke.ts",
|
|
38
38
|
"smoke:ai-sdk-self-diagnostics": "tsx ./scripts/smoke.ai-sdk-self-diagnostics.ts",
|
|
39
|
-
"smoke:self-diagnostics:v4": "
|
|
40
|
-
"smoke:self-diagnostics:v5": "
|
|
41
|
-
"smoke:self-diagnostics:v6": "
|
|
42
|
-
"smoke:self-diagnostics:ai-sdk:all": "
|
|
43
|
-
"smoke:self-diagnostics:openai-sdk": "
|
|
44
|
-
"smoke:self-diagnostics:anthropic-sdk": "
|
|
45
|
-
"smoke:self-diagnostics:all": "
|
|
39
|
+
"smoke:self-diagnostics:v4": "pnpm build && cd tests/v4 && pnpm install && pnpm smoke",
|
|
40
|
+
"smoke:self-diagnostics:v5": "pnpm build && cd tests/v5 && pnpm install && pnpm smoke",
|
|
41
|
+
"smoke:self-diagnostics:v6": "pnpm build && cd tests/v6 && pnpm install && pnpm smoke",
|
|
42
|
+
"smoke:self-diagnostics:ai-sdk:all": "pnpm smoke:self-diagnostics:v4 && pnpm smoke:self-diagnostics:v5 && pnpm smoke:self-diagnostics:v6",
|
|
43
|
+
"smoke:self-diagnostics:openai-sdk": "pnpm build && cd tests/openai && pnpm install && pnpm smoke",
|
|
44
|
+
"smoke:self-diagnostics:anthropic-sdk": "pnpm build && cd tests/anthropic && pnpm install && pnpm smoke",
|
|
45
|
+
"smoke:self-diagnostics:all": "pnpm smoke:self-diagnostics:ai-sdk:all && pnpm smoke:self-diagnostics:openai-sdk && pnpm smoke:self-diagnostics:anthropic-sdk"
|
|
46
46
|
},
|
|
47
47
|
devDependencies: {
|
|
48
48
|
"@types/node": "^20.11.17",
|
|
@@ -53,7 +53,7 @@ var package_default = {
|
|
|
53
53
|
vitest: "^4.0.10"
|
|
54
54
|
},
|
|
55
55
|
dependencies: {
|
|
56
|
-
"@dawn-analytics/redact-pii": "
|
|
56
|
+
"@dawn-analytics/redact-pii": "workspace:*",
|
|
57
57
|
"@opentelemetry/api": "^1.9.0",
|
|
58
58
|
"@opentelemetry/resources": "^2.0.1",
|
|
59
59
|
"@traceloop/node-server-sdk": "0.19.0-otel-v1",
|
|
@@ -99,7 +99,7 @@ var package_default = {
|
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
// src/tracing/tracer-core.ts
|
|
102
|
-
import { context as context2, trace as trace4 } from "@opentelemetry/api";
|
|
102
|
+
import { context as context2, SpanStatusCode as SpanStatusCode3, trace as trace4 } from "@opentelemetry/api";
|
|
103
103
|
import { AnthropicInstrumentation } from "@traceloop/instrumentation-anthropic";
|
|
104
104
|
import { BedrockInstrumentation } from "@traceloop/instrumentation-bedrock";
|
|
105
105
|
import { ChromaDBInstrumentation } from "@traceloop/instrumentation-chromadb";
|
|
@@ -937,12 +937,83 @@ var LiveTracer = class {
|
|
|
937
937
|
};
|
|
938
938
|
|
|
939
939
|
// src/tracing/tracer-core.ts
|
|
940
|
+
function patchBedrockStreamingBug(inst) {
|
|
941
|
+
const anyInst = inst;
|
|
942
|
+
const origEndSpan = anyInst._endSpan.bind(anyInst);
|
|
943
|
+
anyInst._wrapPromise = function(span, promise) {
|
|
944
|
+
return promise.then(async (result) => {
|
|
945
|
+
const rec = result;
|
|
946
|
+
const body = rec == null ? void 0 : rec.body;
|
|
947
|
+
const isStreamBody = body != null && typeof body === "object" && Symbol.asyncIterator in body && !(body instanceof Uint8Array);
|
|
948
|
+
if (!isStreamBody) {
|
|
949
|
+
await origEndSpan({ span, result });
|
|
950
|
+
return result;
|
|
951
|
+
}
|
|
952
|
+
const origIterator = body[Symbol.asyncIterator]();
|
|
953
|
+
const chunks = [];
|
|
954
|
+
let spanEnded = false;
|
|
955
|
+
rec.body = {
|
|
956
|
+
[Symbol.asyncIterator]() {
|
|
957
|
+
return {
|
|
958
|
+
async next() {
|
|
959
|
+
try {
|
|
960
|
+
const iterResult = await origIterator.next();
|
|
961
|
+
if (iterResult.done) {
|
|
962
|
+
async function* replay() {
|
|
963
|
+
for (const c of chunks) yield c;
|
|
964
|
+
}
|
|
965
|
+
await origEndSpan({
|
|
966
|
+
span,
|
|
967
|
+
result: { ...rec, body: replay() }
|
|
968
|
+
});
|
|
969
|
+
spanEnded = true;
|
|
970
|
+
return { done: true, value: void 0 };
|
|
971
|
+
}
|
|
972
|
+
chunks.push(iterResult.value);
|
|
973
|
+
return { done: false, value: iterResult.value };
|
|
974
|
+
} catch (error) {
|
|
975
|
+
if (!spanEnded) {
|
|
976
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
977
|
+
span.setStatus({ code: SpanStatusCode3.ERROR, message: msg });
|
|
978
|
+
span.recordException(error);
|
|
979
|
+
span.end();
|
|
980
|
+
spanEnded = true;
|
|
981
|
+
}
|
|
982
|
+
throw error;
|
|
983
|
+
}
|
|
984
|
+
},
|
|
985
|
+
async return(value) {
|
|
986
|
+
var _a;
|
|
987
|
+
if (!spanEnded) {
|
|
988
|
+
span.end();
|
|
989
|
+
spanEnded = true;
|
|
990
|
+
}
|
|
991
|
+
await ((_a = origIterator.return) == null ? void 0 : _a.call(origIterator, value));
|
|
992
|
+
return { done: true, value: void 0 };
|
|
993
|
+
}
|
|
994
|
+
};
|
|
995
|
+
}
|
|
996
|
+
};
|
|
997
|
+
return result;
|
|
998
|
+
}).catch((error) => {
|
|
999
|
+
span.setStatus({
|
|
1000
|
+
code: SpanStatusCode3.ERROR,
|
|
1001
|
+
message: error.message
|
|
1002
|
+
});
|
|
1003
|
+
span.recordException(error);
|
|
1004
|
+
span.end();
|
|
1005
|
+
throw error;
|
|
1006
|
+
});
|
|
1007
|
+
};
|
|
1008
|
+
}
|
|
940
1009
|
function createDefaultInstrumentations() {
|
|
1010
|
+
const bedrockInst = new BedrockInstrumentation();
|
|
1011
|
+
patchBedrockStreamingBug(bedrockInst);
|
|
941
1012
|
return [
|
|
942
1013
|
new OpenAIInstrumentation(),
|
|
943
1014
|
new AnthropicInstrumentation(),
|
|
944
1015
|
new CohereInstrumentation(),
|
|
945
|
-
|
|
1016
|
+
bedrockInst,
|
|
946
1017
|
new VertexAIInstrumentation(),
|
|
947
1018
|
new AIPlatformInstrumentation(),
|
|
948
1019
|
new PineconeInstrumentation(),
|
|
@@ -970,6 +1041,7 @@ function createManualInstrumentations(instrumentModules) {
|
|
|
970
1041
|
}
|
|
971
1042
|
if (instrumentModules.bedrock) {
|
|
972
1043
|
const inst = new BedrockInstrumentation();
|
|
1044
|
+
patchBedrockStreamingBug(inst);
|
|
973
1045
|
inst.manuallyInstrument(instrumentModules.bedrock);
|
|
974
1046
|
instrumentations.push(inst);
|
|
975
1047
|
}
|
package/dist/index.js
CHANGED
|
@@ -152,7 +152,7 @@ var CategorizationRequestSchema = import_zod.z.object({
|
|
|
152
152
|
// package.json
|
|
153
153
|
var package_default = {
|
|
154
154
|
name: "raindrop-ai",
|
|
155
|
-
version: "0.0.
|
|
155
|
+
version: "0.0.87",
|
|
156
156
|
main: "dist/index.js",
|
|
157
157
|
module: "dist/index.mjs",
|
|
158
158
|
types: "dist/index.d.ts",
|
|
@@ -187,13 +187,13 @@ var package_default = {
|
|
|
187
187
|
test: "vitest run",
|
|
188
188
|
smoke: "tsx ./scripts/smoke.ts",
|
|
189
189
|
"smoke:ai-sdk-self-diagnostics": "tsx ./scripts/smoke.ai-sdk-self-diagnostics.ts",
|
|
190
|
-
"smoke:self-diagnostics:v4": "
|
|
191
|
-
"smoke:self-diagnostics:v5": "
|
|
192
|
-
"smoke:self-diagnostics:v6": "
|
|
193
|
-
"smoke:self-diagnostics:ai-sdk:all": "
|
|
194
|
-
"smoke:self-diagnostics:openai-sdk": "
|
|
195
|
-
"smoke:self-diagnostics:anthropic-sdk": "
|
|
196
|
-
"smoke:self-diagnostics:all": "
|
|
190
|
+
"smoke:self-diagnostics:v4": "pnpm build && cd tests/v4 && pnpm install && pnpm smoke",
|
|
191
|
+
"smoke:self-diagnostics:v5": "pnpm build && cd tests/v5 && pnpm install && pnpm smoke",
|
|
192
|
+
"smoke:self-diagnostics:v6": "pnpm build && cd tests/v6 && pnpm install && pnpm smoke",
|
|
193
|
+
"smoke:self-diagnostics:ai-sdk:all": "pnpm smoke:self-diagnostics:v4 && pnpm smoke:self-diagnostics:v5 && pnpm smoke:self-diagnostics:v6",
|
|
194
|
+
"smoke:self-diagnostics:openai-sdk": "pnpm build && cd tests/openai && pnpm install && pnpm smoke",
|
|
195
|
+
"smoke:self-diagnostics:anthropic-sdk": "pnpm build && cd tests/anthropic && pnpm install && pnpm smoke",
|
|
196
|
+
"smoke:self-diagnostics:all": "pnpm smoke:self-diagnostics:ai-sdk:all && pnpm smoke:self-diagnostics:openai-sdk && pnpm smoke:self-diagnostics:anthropic-sdk"
|
|
197
197
|
},
|
|
198
198
|
devDependencies: {
|
|
199
199
|
"@types/node": "^20.11.17",
|
|
@@ -204,7 +204,7 @@ var package_default = {
|
|
|
204
204
|
vitest: "^4.0.10"
|
|
205
205
|
},
|
|
206
206
|
dependencies: {
|
|
207
|
-
"@dawn-analytics/redact-pii": "
|
|
207
|
+
"@dawn-analytics/redact-pii": "workspace:*",
|
|
208
208
|
"@opentelemetry/api": "^1.9.0",
|
|
209
209
|
"@opentelemetry/resources": "^2.0.1",
|
|
210
210
|
"@traceloop/node-server-sdk": "0.19.0-otel-v1",
|
|
@@ -1174,12 +1174,83 @@ var LiveTracer = class {
|
|
|
1174
1174
|
};
|
|
1175
1175
|
|
|
1176
1176
|
// src/tracing/tracer-core.ts
|
|
1177
|
+
function patchBedrockStreamingBug(inst) {
|
|
1178
|
+
const anyInst = inst;
|
|
1179
|
+
const origEndSpan = anyInst._endSpan.bind(anyInst);
|
|
1180
|
+
anyInst._wrapPromise = function(span, promise) {
|
|
1181
|
+
return promise.then(async (result) => {
|
|
1182
|
+
const rec = result;
|
|
1183
|
+
const body = rec == null ? void 0 : rec.body;
|
|
1184
|
+
const isStreamBody = body != null && typeof body === "object" && Symbol.asyncIterator in body && !(body instanceof Uint8Array);
|
|
1185
|
+
if (!isStreamBody) {
|
|
1186
|
+
await origEndSpan({ span, result });
|
|
1187
|
+
return result;
|
|
1188
|
+
}
|
|
1189
|
+
const origIterator = body[Symbol.asyncIterator]();
|
|
1190
|
+
const chunks = [];
|
|
1191
|
+
let spanEnded = false;
|
|
1192
|
+
rec.body = {
|
|
1193
|
+
[Symbol.asyncIterator]() {
|
|
1194
|
+
return {
|
|
1195
|
+
async next() {
|
|
1196
|
+
try {
|
|
1197
|
+
const iterResult = await origIterator.next();
|
|
1198
|
+
if (iterResult.done) {
|
|
1199
|
+
async function* replay() {
|
|
1200
|
+
for (const c of chunks) yield c;
|
|
1201
|
+
}
|
|
1202
|
+
await origEndSpan({
|
|
1203
|
+
span,
|
|
1204
|
+
result: { ...rec, body: replay() }
|
|
1205
|
+
});
|
|
1206
|
+
spanEnded = true;
|
|
1207
|
+
return { done: true, value: void 0 };
|
|
1208
|
+
}
|
|
1209
|
+
chunks.push(iterResult.value);
|
|
1210
|
+
return { done: false, value: iterResult.value };
|
|
1211
|
+
} catch (error) {
|
|
1212
|
+
if (!spanEnded) {
|
|
1213
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
1214
|
+
span.setStatus({ code: import_api4.SpanStatusCode.ERROR, message: msg });
|
|
1215
|
+
span.recordException(error);
|
|
1216
|
+
span.end();
|
|
1217
|
+
spanEnded = true;
|
|
1218
|
+
}
|
|
1219
|
+
throw error;
|
|
1220
|
+
}
|
|
1221
|
+
},
|
|
1222
|
+
async return(value) {
|
|
1223
|
+
var _a;
|
|
1224
|
+
if (!spanEnded) {
|
|
1225
|
+
span.end();
|
|
1226
|
+
spanEnded = true;
|
|
1227
|
+
}
|
|
1228
|
+
await ((_a = origIterator.return) == null ? void 0 : _a.call(origIterator, value));
|
|
1229
|
+
return { done: true, value: void 0 };
|
|
1230
|
+
}
|
|
1231
|
+
};
|
|
1232
|
+
}
|
|
1233
|
+
};
|
|
1234
|
+
return result;
|
|
1235
|
+
}).catch((error) => {
|
|
1236
|
+
span.setStatus({
|
|
1237
|
+
code: import_api4.SpanStatusCode.ERROR,
|
|
1238
|
+
message: error.message
|
|
1239
|
+
});
|
|
1240
|
+
span.recordException(error);
|
|
1241
|
+
span.end();
|
|
1242
|
+
throw error;
|
|
1243
|
+
});
|
|
1244
|
+
};
|
|
1245
|
+
}
|
|
1177
1246
|
function createDefaultInstrumentations() {
|
|
1247
|
+
const bedrockInst = new import_instrumentation_bedrock.BedrockInstrumentation();
|
|
1248
|
+
patchBedrockStreamingBug(bedrockInst);
|
|
1178
1249
|
return [
|
|
1179
1250
|
new import_instrumentation_openai.OpenAIInstrumentation(),
|
|
1180
1251
|
new import_instrumentation_anthropic.AnthropicInstrumentation(),
|
|
1181
1252
|
new import_instrumentation_cohere.CohereInstrumentation(),
|
|
1182
|
-
|
|
1253
|
+
bedrockInst,
|
|
1183
1254
|
new import_instrumentation_vertexai.VertexAIInstrumentation(),
|
|
1184
1255
|
new import_instrumentation_vertexai.AIPlatformInstrumentation(),
|
|
1185
1256
|
new import_instrumentation_pinecone.PineconeInstrumentation(),
|
|
@@ -1207,6 +1278,7 @@ function createManualInstrumentations(instrumentModules) {
|
|
|
1207
1278
|
}
|
|
1208
1279
|
if (instrumentModules.bedrock) {
|
|
1209
1280
|
const inst = new import_instrumentation_bedrock.BedrockInstrumentation();
|
|
1281
|
+
patchBedrockStreamingBug(inst);
|
|
1210
1282
|
inst.manuallyInstrument(instrumentModules.bedrock);
|
|
1211
1283
|
instrumentations.push(inst);
|
|
1212
1284
|
}
|
package/dist/index.mjs
CHANGED
package/dist/tracing/index.js
CHANGED
|
@@ -184,7 +184,7 @@ function base64Encode(bytes) {
|
|
|
184
184
|
// package.json
|
|
185
185
|
var package_default = {
|
|
186
186
|
name: "raindrop-ai",
|
|
187
|
-
version: "0.0.
|
|
187
|
+
version: "0.0.87",
|
|
188
188
|
main: "dist/index.js",
|
|
189
189
|
module: "dist/index.mjs",
|
|
190
190
|
types: "dist/index.d.ts",
|
|
@@ -219,13 +219,13 @@ var package_default = {
|
|
|
219
219
|
test: "vitest run",
|
|
220
220
|
smoke: "tsx ./scripts/smoke.ts",
|
|
221
221
|
"smoke:ai-sdk-self-diagnostics": "tsx ./scripts/smoke.ai-sdk-self-diagnostics.ts",
|
|
222
|
-
"smoke:self-diagnostics:v4": "
|
|
223
|
-
"smoke:self-diagnostics:v5": "
|
|
224
|
-
"smoke:self-diagnostics:v6": "
|
|
225
|
-
"smoke:self-diagnostics:ai-sdk:all": "
|
|
226
|
-
"smoke:self-diagnostics:openai-sdk": "
|
|
227
|
-
"smoke:self-diagnostics:anthropic-sdk": "
|
|
228
|
-
"smoke:self-diagnostics:all": "
|
|
222
|
+
"smoke:self-diagnostics:v4": "pnpm build && cd tests/v4 && pnpm install && pnpm smoke",
|
|
223
|
+
"smoke:self-diagnostics:v5": "pnpm build && cd tests/v5 && pnpm install && pnpm smoke",
|
|
224
|
+
"smoke:self-diagnostics:v6": "pnpm build && cd tests/v6 && pnpm install && pnpm smoke",
|
|
225
|
+
"smoke:self-diagnostics:ai-sdk:all": "pnpm smoke:self-diagnostics:v4 && pnpm smoke:self-diagnostics:v5 && pnpm smoke:self-diagnostics:v6",
|
|
226
|
+
"smoke:self-diagnostics:openai-sdk": "pnpm build && cd tests/openai && pnpm install && pnpm smoke",
|
|
227
|
+
"smoke:self-diagnostics:anthropic-sdk": "pnpm build && cd tests/anthropic && pnpm install && pnpm smoke",
|
|
228
|
+
"smoke:self-diagnostics:all": "pnpm smoke:self-diagnostics:ai-sdk:all && pnpm smoke:self-diagnostics:openai-sdk && pnpm smoke:self-diagnostics:anthropic-sdk"
|
|
229
229
|
},
|
|
230
230
|
devDependencies: {
|
|
231
231
|
"@types/node": "^20.11.17",
|
|
@@ -236,7 +236,7 @@ var package_default = {
|
|
|
236
236
|
vitest: "^4.0.10"
|
|
237
237
|
},
|
|
238
238
|
dependencies: {
|
|
239
|
-
"@dawn-analytics/redact-pii": "
|
|
239
|
+
"@dawn-analytics/redact-pii": "workspace:*",
|
|
240
240
|
"@opentelemetry/api": "^1.9.0",
|
|
241
241
|
"@opentelemetry/resources": "^2.0.1",
|
|
242
242
|
"@traceloop/node-server-sdk": "0.19.0-otel-v1",
|
|
@@ -971,12 +971,83 @@ var LiveTracer = class {
|
|
|
971
971
|
};
|
|
972
972
|
|
|
973
973
|
// src/tracing/tracer-core.ts
|
|
974
|
+
function patchBedrockStreamingBug(inst) {
|
|
975
|
+
const anyInst = inst;
|
|
976
|
+
const origEndSpan = anyInst._endSpan.bind(anyInst);
|
|
977
|
+
anyInst._wrapPromise = function(span, promise) {
|
|
978
|
+
return promise.then(async (result) => {
|
|
979
|
+
const rec = result;
|
|
980
|
+
const body = rec == null ? void 0 : rec.body;
|
|
981
|
+
const isStreamBody = body != null && typeof body === "object" && Symbol.asyncIterator in body && !(body instanceof Uint8Array);
|
|
982
|
+
if (!isStreamBody) {
|
|
983
|
+
await origEndSpan({ span, result });
|
|
984
|
+
return result;
|
|
985
|
+
}
|
|
986
|
+
const origIterator = body[Symbol.asyncIterator]();
|
|
987
|
+
const chunks = [];
|
|
988
|
+
let spanEnded = false;
|
|
989
|
+
rec.body = {
|
|
990
|
+
[Symbol.asyncIterator]() {
|
|
991
|
+
return {
|
|
992
|
+
async next() {
|
|
993
|
+
try {
|
|
994
|
+
const iterResult = await origIterator.next();
|
|
995
|
+
if (iterResult.done) {
|
|
996
|
+
async function* replay() {
|
|
997
|
+
for (const c of chunks) yield c;
|
|
998
|
+
}
|
|
999
|
+
await origEndSpan({
|
|
1000
|
+
span,
|
|
1001
|
+
result: { ...rec, body: replay() }
|
|
1002
|
+
});
|
|
1003
|
+
spanEnded = true;
|
|
1004
|
+
return { done: true, value: void 0 };
|
|
1005
|
+
}
|
|
1006
|
+
chunks.push(iterResult.value);
|
|
1007
|
+
return { done: false, value: iterResult.value };
|
|
1008
|
+
} catch (error) {
|
|
1009
|
+
if (!spanEnded) {
|
|
1010
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
1011
|
+
span.setStatus({ code: import_api4.SpanStatusCode.ERROR, message: msg });
|
|
1012
|
+
span.recordException(error);
|
|
1013
|
+
span.end();
|
|
1014
|
+
spanEnded = true;
|
|
1015
|
+
}
|
|
1016
|
+
throw error;
|
|
1017
|
+
}
|
|
1018
|
+
},
|
|
1019
|
+
async return(value) {
|
|
1020
|
+
var _a;
|
|
1021
|
+
if (!spanEnded) {
|
|
1022
|
+
span.end();
|
|
1023
|
+
spanEnded = true;
|
|
1024
|
+
}
|
|
1025
|
+
await ((_a = origIterator.return) == null ? void 0 : _a.call(origIterator, value));
|
|
1026
|
+
return { done: true, value: void 0 };
|
|
1027
|
+
}
|
|
1028
|
+
};
|
|
1029
|
+
}
|
|
1030
|
+
};
|
|
1031
|
+
return result;
|
|
1032
|
+
}).catch((error) => {
|
|
1033
|
+
span.setStatus({
|
|
1034
|
+
code: import_api4.SpanStatusCode.ERROR,
|
|
1035
|
+
message: error.message
|
|
1036
|
+
});
|
|
1037
|
+
span.recordException(error);
|
|
1038
|
+
span.end();
|
|
1039
|
+
throw error;
|
|
1040
|
+
});
|
|
1041
|
+
};
|
|
1042
|
+
}
|
|
974
1043
|
function createDefaultInstrumentations() {
|
|
1044
|
+
const bedrockInst = new import_instrumentation_bedrock.BedrockInstrumentation();
|
|
1045
|
+
patchBedrockStreamingBug(bedrockInst);
|
|
975
1046
|
return [
|
|
976
1047
|
new import_instrumentation_openai.OpenAIInstrumentation(),
|
|
977
1048
|
new import_instrumentation_anthropic.AnthropicInstrumentation(),
|
|
978
1049
|
new import_instrumentation_cohere.CohereInstrumentation(),
|
|
979
|
-
|
|
1050
|
+
bedrockInst,
|
|
980
1051
|
new import_instrumentation_vertexai.VertexAIInstrumentation(),
|
|
981
1052
|
new import_instrumentation_vertexai.AIPlatformInstrumentation(),
|
|
982
1053
|
new import_instrumentation_pinecone.PineconeInstrumentation(),
|
|
@@ -1004,6 +1075,7 @@ function createManualInstrumentations(instrumentModules) {
|
|
|
1004
1075
|
}
|
|
1005
1076
|
if (instrumentModules.bedrock) {
|
|
1006
1077
|
const inst = new import_instrumentation_bedrock.BedrockInstrumentation();
|
|
1078
|
+
patchBedrockStreamingBug(inst);
|
|
1007
1079
|
inst.manuallyInstrument(instrumentModules.bedrock);
|
|
1008
1080
|
instrumentations.push(inst);
|
|
1009
1081
|
}
|
package/dist/tracing/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "raindrop-ai",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.87",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -27,22 +27,6 @@
|
|
|
27
27
|
"files": [
|
|
28
28
|
"dist/**"
|
|
29
29
|
],
|
|
30
|
-
"scripts": {
|
|
31
|
-
"build": "tsup",
|
|
32
|
-
"dev": "tsup --watch",
|
|
33
|
-
"clean": "rm -rf .turbo && rm -rf dist",
|
|
34
|
-
"try": "tsx ./src/example/index.ts",
|
|
35
|
-
"test": "vitest run",
|
|
36
|
-
"smoke": "tsx ./scripts/smoke.ts",
|
|
37
|
-
"smoke:ai-sdk-self-diagnostics": "tsx ./scripts/smoke.ai-sdk-self-diagnostics.ts",
|
|
38
|
-
"smoke:self-diagnostics:v4": "yarn build && cd tests/v4 && yarn install && yarn smoke",
|
|
39
|
-
"smoke:self-diagnostics:v5": "yarn build && cd tests/v5 && yarn install && yarn smoke",
|
|
40
|
-
"smoke:self-diagnostics:v6": "yarn build && cd tests/v6 && yarn install && yarn smoke",
|
|
41
|
-
"smoke:self-diagnostics:ai-sdk:all": "yarn smoke:self-diagnostics:v4 && yarn smoke:self-diagnostics:v5 && yarn smoke:self-diagnostics:v6",
|
|
42
|
-
"smoke:self-diagnostics:openai-sdk": "yarn build && cd tests/openai && yarn install && yarn smoke",
|
|
43
|
-
"smoke:self-diagnostics:anthropic-sdk": "yarn build && cd tests/anthropic && yarn install && yarn smoke",
|
|
44
|
-
"smoke:self-diagnostics:all": "yarn smoke:self-diagnostics:ai-sdk:all && yarn smoke:self-diagnostics:openai-sdk && yarn smoke:self-diagnostics:anthropic-sdk"
|
|
45
|
-
},
|
|
46
30
|
"devDependencies": {
|
|
47
31
|
"@types/node": "^20.11.17",
|
|
48
32
|
"msw": "^2.12.8",
|
|
@@ -52,12 +36,12 @@
|
|
|
52
36
|
"vitest": "^4.0.10"
|
|
53
37
|
},
|
|
54
38
|
"dependencies": {
|
|
55
|
-
"@dawn-analytics/redact-pii": "0.1.2",
|
|
56
39
|
"@opentelemetry/api": "^1.9.0",
|
|
57
40
|
"@opentelemetry/resources": "^2.0.1",
|
|
58
41
|
"@traceloop/node-server-sdk": "0.19.0-otel-v1",
|
|
59
42
|
"weakref": "^0.2.1",
|
|
60
|
-
"zod": "^3.23.8"
|
|
43
|
+
"zod": "^3.23.8",
|
|
44
|
+
"@dawn-analytics/redact-pii": "0.1.2"
|
|
61
45
|
},
|
|
62
46
|
"publishConfig": {
|
|
63
47
|
"access": "public",
|
|
@@ -94,5 +78,21 @@
|
|
|
94
78
|
"resolve": true
|
|
95
79
|
},
|
|
96
80
|
"clean": true
|
|
81
|
+
},
|
|
82
|
+
"scripts": {
|
|
83
|
+
"build": "tsup",
|
|
84
|
+
"dev": "tsup --watch",
|
|
85
|
+
"clean": "rm -rf .turbo && rm -rf dist",
|
|
86
|
+
"try": "tsx ./src/example/index.ts",
|
|
87
|
+
"test": "vitest run",
|
|
88
|
+
"smoke": "tsx ./scripts/smoke.ts",
|
|
89
|
+
"smoke:ai-sdk-self-diagnostics": "tsx ./scripts/smoke.ai-sdk-self-diagnostics.ts",
|
|
90
|
+
"smoke:self-diagnostics:v4": "pnpm build && cd tests/v4 && pnpm install && pnpm smoke",
|
|
91
|
+
"smoke:self-diagnostics:v5": "pnpm build && cd tests/v5 && pnpm install && pnpm smoke",
|
|
92
|
+
"smoke:self-diagnostics:v6": "pnpm build && cd tests/v6 && pnpm install && pnpm smoke",
|
|
93
|
+
"smoke:self-diagnostics:ai-sdk:all": "pnpm smoke:self-diagnostics:v4 && pnpm smoke:self-diagnostics:v5 && pnpm smoke:self-diagnostics:v6",
|
|
94
|
+
"smoke:self-diagnostics:openai-sdk": "pnpm build && cd tests/openai && pnpm install && pnpm smoke",
|
|
95
|
+
"smoke:self-diagnostics:anthropic-sdk": "pnpm build && cd tests/anthropic && pnpm install && pnpm smoke",
|
|
96
|
+
"smoke:self-diagnostics:all": "pnpm smoke:self-diagnostics:ai-sdk:all && pnpm smoke:self-diagnostics:openai-sdk && pnpm smoke:self-diagnostics:anthropic-sdk"
|
|
97
97
|
}
|
|
98
|
-
}
|
|
98
|
+
}
|