raindrop-ai 1.0.8 → 1.0.9
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/README.md +42 -0
- package/dist/{chunk-JK73MFZN.mjs → chunk-D3QLE7H4.mjs} +705 -252
- package/dist/{chunk-NELGM2YD.mjs → chunk-GY3TJEAZ.mjs} +10 -3
- package/dist/evals/cli.js +712 -254
- package/dist/evals/cli.mjs +2 -2
- package/dist/{index-BOTg0MlJ.d.mts → index-Bt667HTt.d.mts} +31 -2
- package/dist/{index-BOTg0MlJ.d.ts → index-Bt667HTt.d.ts} +31 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +712 -254
- package/dist/index.mjs +2 -2
- package/dist/tracing/index.d.mts +4 -2
- package/dist/tracing/index.d.ts +4 -2
- package/dist/tracing/index.js +603 -222
- package/dist/tracing/index.mjs +1 -1
- package/package.json +2 -2
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
fateOf,
|
|
24
24
|
isMissingUserId,
|
|
25
25
|
localDebuggerEnabled,
|
|
26
|
+
maskPayload,
|
|
26
27
|
normalizeFeatureFlags,
|
|
27
28
|
normalizeProjectId,
|
|
28
29
|
package_default,
|
|
@@ -48,7 +49,7 @@ import {
|
|
|
48
49
|
withReplayTraceDestination,
|
|
49
50
|
withRoutingContext,
|
|
50
51
|
withTask
|
|
51
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-D3QLE7H4.mjs";
|
|
52
53
|
import {
|
|
53
54
|
CapturedTraceSnapshotSchema,
|
|
54
55
|
EvalCaseExpectationSchema,
|
|
@@ -7668,6 +7669,7 @@ var Raindrop = class {
|
|
|
7668
7669
|
prefix: "[raindrop]"
|
|
7669
7670
|
});
|
|
7670
7671
|
this.redactPii = config.redactPii;
|
|
7672
|
+
this.mask = typeof config.mask === "function" ? config.mask : void 0;
|
|
7671
7673
|
this.remotePiiConfig = config.remotePiiConfig;
|
|
7672
7674
|
this.piiFields = new PiiFieldRedactor({
|
|
7673
7675
|
startupFieldMap: config.redactPiiFields,
|
|
@@ -7708,6 +7710,7 @@ var Raindrop = class {
|
|
|
7708
7710
|
maxTextFieldChars: config.maxTextFieldChars,
|
|
7709
7711
|
redactPii: this.redactPii,
|
|
7710
7712
|
redactPiiFields: config.redactPiiFields,
|
|
7713
|
+
mask: this.mask,
|
|
7711
7714
|
remotePiiConfig: this.remotePiiConfig,
|
|
7712
7715
|
wizardSession: (_j = this.wizardSession) != null ? _j : void 0,
|
|
7713
7716
|
flushTimeoutMs: this.flushTimeoutMs
|
|
@@ -7736,7 +7739,8 @@ var Raindrop = class {
|
|
|
7736
7739
|
flushTimeoutMs: this.flushTimeoutMs,
|
|
7737
7740
|
redactTracePii: config.redactTracePii,
|
|
7738
7741
|
redactPiiFields: config.redactPiiFields,
|
|
7739
|
-
remotePiiConfig: this.remotePiiConfig
|
|
7742
|
+
remotePiiConfig: this.remotePiiConfig,
|
|
7743
|
+
mask: this.mask
|
|
7740
7744
|
},
|
|
7741
7745
|
this.debugLogs
|
|
7742
7746
|
);
|
|
@@ -8345,7 +8349,10 @@ var Raindrop = class {
|
|
|
8345
8349
|
rows = rows.map(snapshotPayload);
|
|
8346
8350
|
redact = await piiRedaction(this.redactPii, this.remotePiiConfig, this.apiUrl, writeKey, deadlineAt);
|
|
8347
8351
|
}
|
|
8348
|
-
const body = rows.map((event) =>
|
|
8352
|
+
const body = rows.map((event) => {
|
|
8353
|
+
const redacted = redact && kind ? this.piiFields.redact(kind, event) : event;
|
|
8354
|
+
return kind && isRecord(redacted) ? maskPayload(kind, redacted, this.mask, "[raindrop]") : redacted;
|
|
8355
|
+
});
|
|
8349
8356
|
this.mirrorBatchToLocalDebugger(endpoint, body);
|
|
8350
8357
|
if (this.localOnly) {
|
|
8351
8358
|
return void 0;
|