@rasputin-ai/node 0.11.0 → 0.11.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-freeze-overrides.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/session-freeze-overrides.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,wBAAwB,EAExB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAG7E,KAAK,wBAAwB,GAAG;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;
|
|
1
|
+
{"version":3,"file":"session-freeze-overrides.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/session-freeze-overrides.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,wBAAwB,EAExB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAG7E,KAAK,wBAAwB,GAAG;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AA2CF,eAAO,MAAM,oBAAoB,GAAI,OAAO,OAAO,KAAG,wBAAwB,GAAG,SA4DhF,CAAC;AAqDF,eAAO,MAAM,wBAAwB,GACpC,SAAS,wBAAwB,GAAG,SAAS,EAC7C,WAAW,OAAO;;;;;;;;;;;;;;;;CAiBjB,CAAC;AAEH,eAAO,MAAM,qBAAqB,GAAI,SAAS,wBAAwB,GAAG,SAAS;+BAMrE,wBAAwB,GAAG,SAAS,KAC7C,cAAc,GAAG,SAAS;CAoB9B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1299,7 +1299,7 @@ var settleFinalBytes = (state) => {
|
|
|
1299
1299
|
var dropEventValues = (events) => {
|
|
1300
1300
|
let dropped = 0;
|
|
1301
1301
|
const marker = () => rasputinUnavailable(VALUE_OMITTED_REASON);
|
|
1302
|
-
const
|
|
1302
|
+
const bounded2 = events.map((event) => {
|
|
1303
1303
|
if (event.type === "function_enter") {
|
|
1304
1304
|
if (event.args === void 0) return { ...event };
|
|
1305
1305
|
dropped += event.args.length;
|
|
@@ -1315,7 +1315,7 @@ var dropEventValues = (events) => {
|
|
|
1315
1315
|
}
|
|
1316
1316
|
return { ...event };
|
|
1317
1317
|
});
|
|
1318
|
-
return { events:
|
|
1318
|
+
return { events: bounded2, dropped };
|
|
1319
1319
|
};
|
|
1320
1320
|
var truncateUtf8 = (value, maximumBytes) => {
|
|
1321
1321
|
if (value === void 0 || Buffer.byteLength(value, "utf8") <= maximumBytes) return value;
|
|
@@ -2421,8 +2421,8 @@ var encodeFrozenWithBytes = (frozen, visitedNodes, maxSerializedValueBytes) => {
|
|
|
2421
2421
|
const encoded = encodeFrozen(frozen);
|
|
2422
2422
|
const bytes = jsonLiteralUtf8Bytes(encoded);
|
|
2423
2423
|
if (!isByteBudgetStub(encoded) && bytes > maxSerializedValueBytes) {
|
|
2424
|
-
const
|
|
2425
|
-
return { value:
|
|
2424
|
+
const bounded2 = truncation("max_serialized_value_bytes", { __serialized_bytes: bytes });
|
|
2425
|
+
return { value: bounded2, bytes: jsonLiteralUtf8Bytes(bounded2), visitedNodes };
|
|
2426
2426
|
}
|
|
2427
2427
|
return { value: encoded, bytes, visitedNodes };
|
|
2428
2428
|
};
|
|
@@ -2863,14 +2863,13 @@ var createExecutionRecorder = (options, hooks = {}) => {
|
|
|
2863
2863
|
recording.sessionExcludes = createSourceExclusionMatcher(session.excludeSources);
|
|
2864
2864
|
}
|
|
2865
2865
|
if (session.maxCapturedCallsPerFunction !== void 0) {
|
|
2866
|
-
recording.sessionMaxCapturedCalls = Math.
|
|
2867
|
-
|
|
2868
|
-
Math.
|
|
2866
|
+
recording.sessionMaxCapturedCalls = Math.max(
|
|
2867
|
+
1,
|
|
2868
|
+
Math.round(session.maxCapturedCallsPerFunction)
|
|
2869
2869
|
);
|
|
2870
2870
|
}
|
|
2871
2871
|
if (session.maxExecutionHoldMs !== void 0) {
|
|
2872
|
-
|
|
2873
|
-
recording.sessionHoldNs = requestedNs < maxExecutionHoldNs ? requestedNs : maxExecutionHoldNs;
|
|
2872
|
+
recording.sessionHoldNs = BigInt(Math.max(1, Math.round(session.maxExecutionHoldMs))) * 1000000n;
|
|
2874
2873
|
}
|
|
2875
2874
|
if (wasLight) {
|
|
2876
2875
|
stats.adaptiveLightExecutions = Math.max(0, stats.adaptiveLightExecutions - 1);
|
|
@@ -4241,7 +4240,9 @@ var BOUNDS = {
|
|
|
4241
4240
|
maxObjectKeys: { min: 1, max: 100 },
|
|
4242
4241
|
maxArrayElements: { min: 1, max: 100 },
|
|
4243
4242
|
maxStringLength: { min: 32, max: 4e3 },
|
|
4244
|
-
maxSerializedValueBytes: { min: 1024, max: 64 * 1024 }
|
|
4243
|
+
maxSerializedValueBytes: { min: 1024, max: 64 * 1024 },
|
|
4244
|
+
maxCapturedCallsPerFunction: { min: 1, max: 100 },
|
|
4245
|
+
maxExecutionHoldMs: { min: 1e3, max: 5 * 6e4 }
|
|
4245
4246
|
};
|
|
4246
4247
|
var MAX_SERIALIZER_CACHE = 32;
|
|
4247
4248
|
var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -4255,9 +4256,10 @@ var optionalStringList = (value) => {
|
|
|
4255
4256
|
}
|
|
4256
4257
|
return out.length > 0 ? out : void 0;
|
|
4257
4258
|
};
|
|
4258
|
-
var
|
|
4259
|
-
|
|
4260
|
-
|
|
4259
|
+
var bounded = (value, min, max) => Math.min(max, Math.max(min, Math.round(value)));
|
|
4260
|
+
var clampToBounds = (requested, fallback, min, max) => {
|
|
4261
|
+
if (requested === void 0 || !Number.isFinite(requested)) return fallback;
|
|
4262
|
+
return bounded(requested, min, max);
|
|
4261
4263
|
};
|
|
4262
4264
|
var parseSessionSettings = (value) => {
|
|
4263
4265
|
if (!isRecord(value)) return void 0;
|
|
@@ -4269,16 +4271,50 @@ var parseSessionSettings = (value) => {
|
|
|
4269
4271
|
const maxSerializedValueBytes = optionalFiniteNumber(value.maxSerializedValueBytes);
|
|
4270
4272
|
const maxCapturedCallsPerFunction = optionalFiniteNumber(value.maxCapturedCallsPerFunction);
|
|
4271
4273
|
const maxExecutionHoldMs = optionalFiniteNumber(value.maxExecutionHoldMs);
|
|
4272
|
-
if (maxDepth !== void 0)
|
|
4273
|
-
|
|
4274
|
-
if (
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4274
|
+
if (maxDepth !== void 0)
|
|
4275
|
+
overrides.maxDepth = bounded(maxDepth, BOUNDS.maxDepth.min, BOUNDS.maxDepth.max);
|
|
4276
|
+
if (maxObjectKeys !== void 0) {
|
|
4277
|
+
overrides.maxObjectKeys = bounded(
|
|
4278
|
+
maxObjectKeys,
|
|
4279
|
+
BOUNDS.maxObjectKeys.min,
|
|
4280
|
+
BOUNDS.maxObjectKeys.max
|
|
4281
|
+
);
|
|
4282
|
+
}
|
|
4283
|
+
if (maxArrayElements !== void 0) {
|
|
4284
|
+
overrides.maxArrayElements = bounded(
|
|
4285
|
+
maxArrayElements,
|
|
4286
|
+
BOUNDS.maxArrayElements.min,
|
|
4287
|
+
BOUNDS.maxArrayElements.max
|
|
4288
|
+
);
|
|
4289
|
+
}
|
|
4290
|
+
if (maxStringLength !== void 0) {
|
|
4291
|
+
overrides.maxStringLength = bounded(
|
|
4292
|
+
maxStringLength,
|
|
4293
|
+
BOUNDS.maxStringLength.min,
|
|
4294
|
+
BOUNDS.maxStringLength.max
|
|
4295
|
+
);
|
|
4296
|
+
}
|
|
4297
|
+
if (maxSerializedValueBytes !== void 0) {
|
|
4298
|
+
overrides.maxSerializedValueBytes = bounded(
|
|
4299
|
+
maxSerializedValueBytes,
|
|
4300
|
+
BOUNDS.maxSerializedValueBytes.min,
|
|
4301
|
+
BOUNDS.maxSerializedValueBytes.max
|
|
4302
|
+
);
|
|
4303
|
+
}
|
|
4278
4304
|
if (maxCapturedCallsPerFunction !== void 0) {
|
|
4279
|
-
overrides.maxCapturedCallsPerFunction =
|
|
4305
|
+
overrides.maxCapturedCallsPerFunction = bounded(
|
|
4306
|
+
maxCapturedCallsPerFunction,
|
|
4307
|
+
BOUNDS.maxCapturedCallsPerFunction.min,
|
|
4308
|
+
BOUNDS.maxCapturedCallsPerFunction.max
|
|
4309
|
+
);
|
|
4310
|
+
}
|
|
4311
|
+
if (maxExecutionHoldMs !== void 0) {
|
|
4312
|
+
overrides.maxExecutionHoldMs = bounded(
|
|
4313
|
+
maxExecutionHoldMs,
|
|
4314
|
+
BOUNDS.maxExecutionHoldMs.min,
|
|
4315
|
+
BOUNDS.maxExecutionHoldMs.max
|
|
4316
|
+
);
|
|
4280
4317
|
}
|
|
4281
|
-
if (maxExecutionHoldMs !== void 0) overrides.maxExecutionHoldMs = maxExecutionHoldMs;
|
|
4282
4318
|
const excludeSources = optionalStringList(value.excludeSources);
|
|
4283
4319
|
const redactKeys = optionalStringList(value.redactKeys);
|
|
4284
4320
|
if (excludeSources) overrides.excludeSources = excludeSources;
|
|
@@ -4287,31 +4323,31 @@ var parseSessionSettings = (value) => {
|
|
|
4287
4323
|
return Object.keys(overrides).length > 0 ? overrides : void 0;
|
|
4288
4324
|
};
|
|
4289
4325
|
var clampSessionFreezeLimits = (overrides, processLimits) => ({
|
|
4290
|
-
maxDepth:
|
|
4326
|
+
maxDepth: clampToBounds(
|
|
4291
4327
|
overrides?.maxDepth,
|
|
4292
4328
|
processLimits.maxDepth,
|
|
4293
4329
|
BOUNDS.maxDepth.min,
|
|
4294
4330
|
BOUNDS.maxDepth.max
|
|
4295
4331
|
),
|
|
4296
|
-
maxObjectKeys:
|
|
4332
|
+
maxObjectKeys: clampToBounds(
|
|
4297
4333
|
overrides?.maxObjectKeys,
|
|
4298
4334
|
processLimits.maxObjectKeys,
|
|
4299
4335
|
BOUNDS.maxObjectKeys.min,
|
|
4300
4336
|
BOUNDS.maxObjectKeys.max
|
|
4301
4337
|
),
|
|
4302
|
-
maxArrayElements:
|
|
4338
|
+
maxArrayElements: clampToBounds(
|
|
4303
4339
|
overrides?.maxArrayElements,
|
|
4304
4340
|
processLimits.maxArrayElements,
|
|
4305
4341
|
BOUNDS.maxArrayElements.min,
|
|
4306
4342
|
BOUNDS.maxArrayElements.max
|
|
4307
4343
|
),
|
|
4308
|
-
maxStringLength:
|
|
4344
|
+
maxStringLength: clampToBounds(
|
|
4309
4345
|
overrides?.maxStringLength,
|
|
4310
4346
|
processLimits.maxStringLength,
|
|
4311
4347
|
BOUNDS.maxStringLength.min,
|
|
4312
4348
|
BOUNDS.maxStringLength.max
|
|
4313
4349
|
),
|
|
4314
|
-
maxSerializedValueBytes:
|
|
4350
|
+
maxSerializedValueBytes: clampToBounds(
|
|
4315
4351
|
overrides?.maxSerializedValueBytes,
|
|
4316
4352
|
processLimits.maxSerializedValueBytes,
|
|
4317
4353
|
BOUNDS.maxSerializedValueBytes.min,
|
|
@@ -5197,7 +5233,7 @@ var installGlobalHandlers = (client, options = {}) => {
|
|
|
5197
5233
|
|
|
5198
5234
|
// src/sdk-meta.ts
|
|
5199
5235
|
var SDK_NAME = "@rasputin-ai/node";
|
|
5200
|
-
var SDK_VERSION = "0.11.
|
|
5236
|
+
var SDK_VERSION = "0.11.1";
|
|
5201
5237
|
|
|
5202
5238
|
// src/rasputin-init.ts
|
|
5203
5239
|
var publicExecution = (runtime) => ({
|
package/dist/instrument/bun.js
CHANGED
|
@@ -1606,7 +1606,7 @@ import ts14 from "typescript";
|
|
|
1606
1606
|
import { originalPositionFor as originalPositionFor2, TraceMap as TraceMap3 } from "@jridgewell/trace-mapping";
|
|
1607
1607
|
|
|
1608
1608
|
// src/sdk-meta.ts
|
|
1609
|
-
var SDK_VERSION = "0.11.
|
|
1609
|
+
var SDK_VERSION = "0.11.1";
|
|
1610
1610
|
|
|
1611
1611
|
// src/auto-instrumentation/source-map-locations.ts
|
|
1612
1612
|
import { readFileSync } from "node:fs";
|
package/dist/instrument/node.js
CHANGED
|
@@ -1668,7 +1668,7 @@ import ts14 from "typescript";
|
|
|
1668
1668
|
import { originalPositionFor as originalPositionFor3, TraceMap as TraceMap4 } from "@jridgewell/trace-mapping";
|
|
1669
1669
|
|
|
1670
1670
|
// src/sdk-meta.ts
|
|
1671
|
-
var SDK_VERSION = "0.11.
|
|
1671
|
+
var SDK_VERSION = "0.11.1";
|
|
1672
1672
|
|
|
1673
1673
|
// src/auto-instrumentation/transform-disk-cache.ts
|
|
1674
1674
|
var projectCacheDir = () => {
|
package/dist/internal.js
CHANGED
|
@@ -1269,7 +1269,7 @@ var settleFinalBytes = (state) => {
|
|
|
1269
1269
|
var dropEventValues = (events) => {
|
|
1270
1270
|
let dropped = 0;
|
|
1271
1271
|
const marker = () => rasputinUnavailable(VALUE_OMITTED_REASON);
|
|
1272
|
-
const
|
|
1272
|
+
const bounded2 = events.map((event) => {
|
|
1273
1273
|
if (event.type === "function_enter") {
|
|
1274
1274
|
if (event.args === void 0) return { ...event };
|
|
1275
1275
|
dropped += event.args.length;
|
|
@@ -1285,7 +1285,7 @@ var dropEventValues = (events) => {
|
|
|
1285
1285
|
}
|
|
1286
1286
|
return { ...event };
|
|
1287
1287
|
});
|
|
1288
|
-
return { events:
|
|
1288
|
+
return { events: bounded2, dropped };
|
|
1289
1289
|
};
|
|
1290
1290
|
var truncateUtf8 = (value, maximumBytes) => {
|
|
1291
1291
|
if (value === void 0 || Buffer.byteLength(value, "utf8") <= maximumBytes) return value;
|
|
@@ -2391,8 +2391,8 @@ var encodeFrozenWithBytes = (frozen, visitedNodes, maxSerializedValueBytes) => {
|
|
|
2391
2391
|
const encoded = encodeFrozen(frozen);
|
|
2392
2392
|
const bytes = jsonLiteralUtf8Bytes(encoded);
|
|
2393
2393
|
if (!isByteBudgetStub(encoded) && bytes > maxSerializedValueBytes) {
|
|
2394
|
-
const
|
|
2395
|
-
return { value:
|
|
2394
|
+
const bounded2 = truncation("max_serialized_value_bytes", { __serialized_bytes: bytes });
|
|
2395
|
+
return { value: bounded2, bytes: jsonLiteralUtf8Bytes(bounded2), visitedNodes };
|
|
2396
2396
|
}
|
|
2397
2397
|
return { value: encoded, bytes, visitedNodes };
|
|
2398
2398
|
};
|
|
@@ -2833,14 +2833,13 @@ var createExecutionRecorder = (options, hooks = {}) => {
|
|
|
2833
2833
|
recording.sessionExcludes = createSourceExclusionMatcher(session.excludeSources);
|
|
2834
2834
|
}
|
|
2835
2835
|
if (session.maxCapturedCallsPerFunction !== void 0) {
|
|
2836
|
-
recording.sessionMaxCapturedCalls = Math.
|
|
2837
|
-
|
|
2838
|
-
Math.
|
|
2836
|
+
recording.sessionMaxCapturedCalls = Math.max(
|
|
2837
|
+
1,
|
|
2838
|
+
Math.round(session.maxCapturedCallsPerFunction)
|
|
2839
2839
|
);
|
|
2840
2840
|
}
|
|
2841
2841
|
if (session.maxExecutionHoldMs !== void 0) {
|
|
2842
|
-
|
|
2843
|
-
recording.sessionHoldNs = requestedNs < maxExecutionHoldNs ? requestedNs : maxExecutionHoldNs;
|
|
2842
|
+
recording.sessionHoldNs = BigInt(Math.max(1, Math.round(session.maxExecutionHoldMs))) * 1000000n;
|
|
2844
2843
|
}
|
|
2845
2844
|
if (wasLight) {
|
|
2846
2845
|
stats.adaptiveLightExecutions = Math.max(0, stats.adaptiveLightExecutions - 1);
|
|
@@ -4211,7 +4210,9 @@ var BOUNDS = {
|
|
|
4211
4210
|
maxObjectKeys: { min: 1, max: 100 },
|
|
4212
4211
|
maxArrayElements: { min: 1, max: 100 },
|
|
4213
4212
|
maxStringLength: { min: 32, max: 4e3 },
|
|
4214
|
-
maxSerializedValueBytes: { min: 1024, max: 64 * 1024 }
|
|
4213
|
+
maxSerializedValueBytes: { min: 1024, max: 64 * 1024 },
|
|
4214
|
+
maxCapturedCallsPerFunction: { min: 1, max: 100 },
|
|
4215
|
+
maxExecutionHoldMs: { min: 1e3, max: 5 * 6e4 }
|
|
4215
4216
|
};
|
|
4216
4217
|
var MAX_SERIALIZER_CACHE = 32;
|
|
4217
4218
|
var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -4225,9 +4226,10 @@ var optionalStringList = (value) => {
|
|
|
4225
4226
|
}
|
|
4226
4227
|
return out.length > 0 ? out : void 0;
|
|
4227
4228
|
};
|
|
4228
|
-
var
|
|
4229
|
-
|
|
4230
|
-
|
|
4229
|
+
var bounded = (value, min, max) => Math.min(max, Math.max(min, Math.round(value)));
|
|
4230
|
+
var clampToBounds = (requested, fallback, min, max) => {
|
|
4231
|
+
if (requested === void 0 || !Number.isFinite(requested)) return fallback;
|
|
4232
|
+
return bounded(requested, min, max);
|
|
4231
4233
|
};
|
|
4232
4234
|
var parseSessionSettings = (value) => {
|
|
4233
4235
|
if (!isRecord(value)) return void 0;
|
|
@@ -4239,16 +4241,50 @@ var parseSessionSettings = (value) => {
|
|
|
4239
4241
|
const maxSerializedValueBytes = optionalFiniteNumber(value.maxSerializedValueBytes);
|
|
4240
4242
|
const maxCapturedCallsPerFunction = optionalFiniteNumber(value.maxCapturedCallsPerFunction);
|
|
4241
4243
|
const maxExecutionHoldMs = optionalFiniteNumber(value.maxExecutionHoldMs);
|
|
4242
|
-
if (maxDepth !== void 0)
|
|
4243
|
-
|
|
4244
|
-
if (
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4244
|
+
if (maxDepth !== void 0)
|
|
4245
|
+
overrides.maxDepth = bounded(maxDepth, BOUNDS.maxDepth.min, BOUNDS.maxDepth.max);
|
|
4246
|
+
if (maxObjectKeys !== void 0) {
|
|
4247
|
+
overrides.maxObjectKeys = bounded(
|
|
4248
|
+
maxObjectKeys,
|
|
4249
|
+
BOUNDS.maxObjectKeys.min,
|
|
4250
|
+
BOUNDS.maxObjectKeys.max
|
|
4251
|
+
);
|
|
4252
|
+
}
|
|
4253
|
+
if (maxArrayElements !== void 0) {
|
|
4254
|
+
overrides.maxArrayElements = bounded(
|
|
4255
|
+
maxArrayElements,
|
|
4256
|
+
BOUNDS.maxArrayElements.min,
|
|
4257
|
+
BOUNDS.maxArrayElements.max
|
|
4258
|
+
);
|
|
4259
|
+
}
|
|
4260
|
+
if (maxStringLength !== void 0) {
|
|
4261
|
+
overrides.maxStringLength = bounded(
|
|
4262
|
+
maxStringLength,
|
|
4263
|
+
BOUNDS.maxStringLength.min,
|
|
4264
|
+
BOUNDS.maxStringLength.max
|
|
4265
|
+
);
|
|
4266
|
+
}
|
|
4267
|
+
if (maxSerializedValueBytes !== void 0) {
|
|
4268
|
+
overrides.maxSerializedValueBytes = bounded(
|
|
4269
|
+
maxSerializedValueBytes,
|
|
4270
|
+
BOUNDS.maxSerializedValueBytes.min,
|
|
4271
|
+
BOUNDS.maxSerializedValueBytes.max
|
|
4272
|
+
);
|
|
4273
|
+
}
|
|
4248
4274
|
if (maxCapturedCallsPerFunction !== void 0) {
|
|
4249
|
-
overrides.maxCapturedCallsPerFunction =
|
|
4275
|
+
overrides.maxCapturedCallsPerFunction = bounded(
|
|
4276
|
+
maxCapturedCallsPerFunction,
|
|
4277
|
+
BOUNDS.maxCapturedCallsPerFunction.min,
|
|
4278
|
+
BOUNDS.maxCapturedCallsPerFunction.max
|
|
4279
|
+
);
|
|
4280
|
+
}
|
|
4281
|
+
if (maxExecutionHoldMs !== void 0) {
|
|
4282
|
+
overrides.maxExecutionHoldMs = bounded(
|
|
4283
|
+
maxExecutionHoldMs,
|
|
4284
|
+
BOUNDS.maxExecutionHoldMs.min,
|
|
4285
|
+
BOUNDS.maxExecutionHoldMs.max
|
|
4286
|
+
);
|
|
4250
4287
|
}
|
|
4251
|
-
if (maxExecutionHoldMs !== void 0) overrides.maxExecutionHoldMs = maxExecutionHoldMs;
|
|
4252
4288
|
const excludeSources = optionalStringList(value.excludeSources);
|
|
4253
4289
|
const redactKeys = optionalStringList(value.redactKeys);
|
|
4254
4290
|
if (excludeSources) overrides.excludeSources = excludeSources;
|
|
@@ -4257,31 +4293,31 @@ var parseSessionSettings = (value) => {
|
|
|
4257
4293
|
return Object.keys(overrides).length > 0 ? overrides : void 0;
|
|
4258
4294
|
};
|
|
4259
4295
|
var clampSessionFreezeLimits = (overrides, processLimits) => ({
|
|
4260
|
-
maxDepth:
|
|
4296
|
+
maxDepth: clampToBounds(
|
|
4261
4297
|
overrides?.maxDepth,
|
|
4262
4298
|
processLimits.maxDepth,
|
|
4263
4299
|
BOUNDS.maxDepth.min,
|
|
4264
4300
|
BOUNDS.maxDepth.max
|
|
4265
4301
|
),
|
|
4266
|
-
maxObjectKeys:
|
|
4302
|
+
maxObjectKeys: clampToBounds(
|
|
4267
4303
|
overrides?.maxObjectKeys,
|
|
4268
4304
|
processLimits.maxObjectKeys,
|
|
4269
4305
|
BOUNDS.maxObjectKeys.min,
|
|
4270
4306
|
BOUNDS.maxObjectKeys.max
|
|
4271
4307
|
),
|
|
4272
|
-
maxArrayElements:
|
|
4308
|
+
maxArrayElements: clampToBounds(
|
|
4273
4309
|
overrides?.maxArrayElements,
|
|
4274
4310
|
processLimits.maxArrayElements,
|
|
4275
4311
|
BOUNDS.maxArrayElements.min,
|
|
4276
4312
|
BOUNDS.maxArrayElements.max
|
|
4277
4313
|
),
|
|
4278
|
-
maxStringLength:
|
|
4314
|
+
maxStringLength: clampToBounds(
|
|
4279
4315
|
overrides?.maxStringLength,
|
|
4280
4316
|
processLimits.maxStringLength,
|
|
4281
4317
|
BOUNDS.maxStringLength.min,
|
|
4282
4318
|
BOUNDS.maxStringLength.max
|
|
4283
4319
|
),
|
|
4284
|
-
maxSerializedValueBytes:
|
|
4320
|
+
maxSerializedValueBytes: clampToBounds(
|
|
4285
4321
|
overrides?.maxSerializedValueBytes,
|
|
4286
4322
|
processLimits.maxSerializedValueBytes,
|
|
4287
4323
|
BOUNDS.maxSerializedValueBytes.min,
|
package/dist/sdk-meta.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rasputin-ai/node",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "Official Rasputin AI SDK for Node and Bun.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
52
|
-
"@rasputin-ai/core": "0.11.
|
|
52
|
+
"@rasputin-ai/core": "0.11.1",
|
|
53
53
|
"typescript": "5"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|