@rasputin-ai/node 0.8.0 → 0.9.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.
- package/dist/auto-instrumentation/format-configuration-report.d.ts.map +1 -1
- package/dist/execution-recorder/execution-recorder-types.d.ts +0 -10
- package/dist/execution-recorder/execution-recorder-types.d.ts.map +1 -1
- package/dist/execution-recorder/execution-recorder.d.ts.map +1 -1
- package/dist/execution-recorder/runtime-state-size-budget.d.ts +3 -5
- package/dist/execution-recorder/runtime-state-size-budget.d.ts.map +1 -1
- package/dist/index.js +30 -30
- package/dist/instrument/bun.js +1 -1
- package/dist/instrument/node.js +1 -1
- package/dist/internal.js +29 -29
- package/dist/sdk-meta.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-configuration-report.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/format-configuration-report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,KAAK,wBAAwB,GAAG;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAClD,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE,kBAAkB,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;CAClB,CAAC;
|
|
1
|
+
{"version":3,"file":"format-configuration-report.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/format-configuration-report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,KAAK,wBAAwB,GAAG;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAClD,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE,kBAAkB,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;CAClB,CAAC;AA8CF,eAAO,MAAM,yBAAyB,GAAI,OAAO,wBAAwB,KAAG,MAwF3E,CAAC;AAEF,eAAO,MAAM,YAAY,QAAO,MAI/B,CAAC"}
|
|
@@ -47,16 +47,6 @@ export type ExecutionRecorderOptions = {
|
|
|
47
47
|
maxStringLength?: number;
|
|
48
48
|
/** Maximum size of one captured value after serialization. Default: 16 KiB. */
|
|
49
49
|
maxSerializedValueBytes?: number;
|
|
50
|
-
/**
|
|
51
|
-
* Soft size goal for the whole snapshot sent with an error. Extra reconstruction
|
|
52
|
-
* data is dropped first to stay near this. Default: 256 KiB.
|
|
53
|
-
*/
|
|
54
|
-
runtimeStateTargetBytes?: number;
|
|
55
|
-
/**
|
|
56
|
-
* Hard size limit for that snapshot. Values are dropped before call history.
|
|
57
|
-
* Default: 512 KiB.
|
|
58
|
-
*/
|
|
59
|
-
maxRuntimeStateBytes?: number;
|
|
60
50
|
/**
|
|
61
51
|
* How long a recording may hold process-wide memory budget, in milliseconds.
|
|
62
52
|
* Covers unfinished work and finished work that still has in-flight instrumented
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-recorder-types.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/execution-recorder-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EACX,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,yBAAyB,EACzB,cAAc,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,2FAA2F;AAC3F,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvD;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACtC,sFAAsF;IACtF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sGAAsG;IACtG,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;OAGG;IACH,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,cAAc,CAAC,EAAE,wBAAwB,EAAE,CAAC;IAC5C,wGAAwG;IACxG,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iEAAiE;IACjE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+EAA+E;IAC/E,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC
|
|
1
|
+
{"version":3,"file":"execution-recorder-types.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/execution-recorder-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EACX,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,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AoB,EAAE,CAAC,KAAK,EAAE,SAAS,mBAAmB,EAAE,KAAK,oBAAoB,EAAE,CAAC;IACxF,mBAAmB,EAAE,CAAC,CAAC,EACtB,IAAI,EAAE,oBAAoB,EAC1B,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,EACxB,QAAQ,EAAE,MAAM,CAAC,EACjB,UAAU,CAAC,EAAE,OAAO,KAChB,CAAC,CAAC;IACP,qBAAqB,EAAE,CACtB,IAAI,EAAE,oBAAoB,EAC1B,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,EACxB,UAAU,CAAC,EAAE,OAAO,KAChB,kBAAkB,CAAC;CACxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-recorder.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/execution-recorder.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAGX,wBAAwB,EACxB,gBAAgB,EAGhB,MAAM,4BAA4B,CAAC;AA2OpC,wEAAwE;AACxE,eAAO,MAAM,uBAAuB,GACnC,SAAS,wBAAwB,GAAG,SAAS,KAC3C,
|
|
1
|
+
{"version":3,"file":"execution-recorder.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/execution-recorder.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAGX,wBAAwB,EACxB,gBAAgB,EAGhB,MAAM,4BAA4B,CAAC;AA2OpC,wEAAwE;AACxE,eAAO,MAAM,uBAAuB,GACnC,SAAS,wBAAwB,GAAG,SAAS,KAC3C,gBA2/CF,CAAC"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { type RuntimeExecutionState } from '@rasputin-ai/core';
|
|
2
|
+
export declare const MAX_RUNTIME_STATE_BYTES: number;
|
|
2
3
|
/**
|
|
3
4
|
* Bound the complete compact-JSON runtime state after materialization. Captured function values
|
|
4
|
-
* are
|
|
5
|
+
* are omitted above 256 KiB; call boundaries and timings remain until a final
|
|
5
6
|
* pathological-metadata fallback is required.
|
|
6
7
|
*/
|
|
7
|
-
export declare const enforceRuntimeStateSizeBudget: (input: RuntimeExecutionState
|
|
8
|
-
targetBytes?: number;
|
|
9
|
-
maximumBytes?: number;
|
|
10
|
-
}) => RuntimeExecutionState;
|
|
8
|
+
export declare const enforceRuntimeStateSizeBudget: (input: RuntimeExecutionState) => RuntimeExecutionState;
|
|
11
9
|
export declare const runtimeStateEncodedBytes: (value: unknown) => number;
|
|
12
10
|
//# sourceMappingURL=runtime-state-size-budget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-state-size-budget.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/runtime-state-size-budget.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,qBAAqB,EAG1B,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"runtime-state-size-budget.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/runtime-state-size-budget.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,qBAAqB,EAG1B,MAAM,mBAAmB,CAAC;AAE3B,eAAO,MAAM,uBAAuB,QAAa,CAAC;AAuHlD;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,GACzC,OAAO,qBAAqB,KAC1B,qBAwEF,CAAC;AAEF,eAAO,MAAM,wBAAwB,UApMR,OAAO,WAoMgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -384,6 +384,9 @@ var issueHeadline = (issue) => {
|
|
|
384
384
|
if (issue.reason === "invalid_mapping") {
|
|
385
385
|
return `The configured package root for ${target} does not match this Git release.`;
|
|
386
386
|
}
|
|
387
|
+
if (issue.reason === "commit_not_found") {
|
|
388
|
+
return `GitHub does not have this release commit while locating ${target}.`;
|
|
389
|
+
}
|
|
387
390
|
return `GitHub could not be reached while locating ${target}.`;
|
|
388
391
|
};
|
|
389
392
|
var formatIssue = (issue) => {
|
|
@@ -402,8 +405,11 @@ var formatIssue = (issue) => {
|
|
|
402
405
|
var formatConfigurationReport = (input) => {
|
|
403
406
|
const packages = input.verification.packages ?? [];
|
|
404
407
|
const unresolved = input.verification.unresolved;
|
|
405
|
-
const mappingIssues = unresolved.filter(
|
|
408
|
+
const mappingIssues = unresolved.filter(
|
|
409
|
+
(issue) => issue.reason !== "github_unavailable" && issue.reason !== "commit_not_found"
|
|
410
|
+
);
|
|
406
411
|
const githubUnavailable = input.verification.status === "unavailable" || unresolved.some((issue) => issue.reason === "github_unavailable");
|
|
412
|
+
const commitNotFound = input.verification.status === "commit_not_found";
|
|
407
413
|
const verified = input.uploaded && input.verification.status === "verified";
|
|
408
414
|
const lines = [
|
|
409
415
|
...BANNER,
|
|
@@ -442,13 +448,19 @@ var formatConfigurationReport = (input) => {
|
|
|
442
448
|
lines.push("! upload failed");
|
|
443
449
|
} else {
|
|
444
450
|
lines.push("\u2713 uploaded");
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
)
|
|
451
|
+
if (verified) {
|
|
452
|
+
lines.push("\u2713 verified against GitHub");
|
|
453
|
+
} else if (commitNotFound) {
|
|
454
|
+
lines.push("! this Git commit was not found in the connected repository");
|
|
455
|
+
} else {
|
|
456
|
+
lines.push("! some source files could not be mapped to this Git release");
|
|
457
|
+
}
|
|
448
458
|
}
|
|
449
459
|
lines.push("", "GitHub");
|
|
450
460
|
if (!input.uploaded) {
|
|
451
461
|
lines.push("! not verified");
|
|
462
|
+
} else if (commitNotFound) {
|
|
463
|
+
lines.push("! push this commit to GitHub so Rasputin can map source");
|
|
452
464
|
} else if (githubUnavailable) {
|
|
453
465
|
lines.push("! repository is not connected, or this release could not be read");
|
|
454
466
|
} else {
|
|
@@ -595,7 +607,7 @@ var scheduleInstrumentationManifestUpload = (options) => {
|
|
|
595
607
|
failedAttempts = 0;
|
|
596
608
|
clearRetry();
|
|
597
609
|
if (verification.status === "verified") {
|
|
598
|
-
if (!loggedSuccess && options.logSuccess
|
|
610
|
+
if (!loggedSuccess && options.logSuccess === true) {
|
|
599
611
|
loggedSuccess = true;
|
|
600
612
|
console.info(report(manifest, true, verification));
|
|
601
613
|
}
|
|
@@ -1239,17 +1251,14 @@ var RecorderMemoryBudget = class {
|
|
|
1239
1251
|
import {
|
|
1240
1252
|
rasputinUnavailable
|
|
1241
1253
|
} from "@rasputin-ai/core";
|
|
1242
|
-
var
|
|
1243
|
-
var DEFAULT_MAX_RUNTIME_STATE_BYTES = 512 * 1024;
|
|
1254
|
+
var MAX_RUNTIME_STATE_BYTES = 256 * 1024;
|
|
1244
1255
|
var VALUE_OMITTED_REASON = "runtime_state_size_budget";
|
|
1245
1256
|
var encodedBytes = (value) => Buffer.byteLength(JSON.stringify(value), "utf8");
|
|
1246
|
-
var
|
|
1247
|
-
var sizeMetadata = (originalBytes, targetBytes, maximumBytes) => ({
|
|
1257
|
+
var sizeMetadata = (originalBytes) => ({
|
|
1248
1258
|
reason: "runtime_state_size_budget",
|
|
1249
1259
|
originalBytes,
|
|
1250
1260
|
finalBytes: 0,
|
|
1251
|
-
|
|
1252
|
-
maximumBytes,
|
|
1261
|
+
maximumBytes: MAX_RUNTIME_STATE_BYTES,
|
|
1253
1262
|
eventValuesDropped: 0,
|
|
1254
1263
|
eventsDropped: 0,
|
|
1255
1264
|
functionDefinitionsDropped: 0
|
|
@@ -1340,18 +1349,13 @@ var minimalState = (state, size) => {
|
|
|
1340
1349
|
size
|
|
1341
1350
|
);
|
|
1342
1351
|
};
|
|
1343
|
-
var enforceRuntimeStateSizeBudget = (input
|
|
1344
|
-
const maximumBytes = boundedLimit(options.maximumBytes, DEFAULT_MAX_RUNTIME_STATE_BYTES);
|
|
1345
|
-
const targetBytes = Math.min(
|
|
1346
|
-
maximumBytes,
|
|
1347
|
-
boundedLimit(options.targetBytes, DEFAULT_RUNTIME_STATE_TARGET_BYTES)
|
|
1348
|
-
);
|
|
1352
|
+
var enforceRuntimeStateSizeBudget = (input) => {
|
|
1349
1353
|
const initialBytes = encodedBytes(input);
|
|
1350
1354
|
const existingSize = input.truncated?.size;
|
|
1351
|
-
if (existingSize && initialBytes <=
|
|
1352
|
-
if (initialBytes <=
|
|
1355
|
+
if (existingSize && initialBytes <= MAX_RUNTIME_STATE_BYTES) return settleFinalBytes(input);
|
|
1356
|
+
if (initialBytes <= MAX_RUNTIME_STATE_BYTES) return input;
|
|
1353
1357
|
const originalBytes = existingSize?.originalBytes ?? initialBytes;
|
|
1354
|
-
const size = sizeMetadata(originalBytes
|
|
1358
|
+
const size = sizeMetadata(originalBytes);
|
|
1355
1359
|
let state = input;
|
|
1356
1360
|
const stripped = dropEventValues(state.events);
|
|
1357
1361
|
size.eventValuesDropped += stripped.dropped;
|
|
@@ -1368,7 +1372,7 @@ var enforceRuntimeStateSizeBudget = (input, options = {}) => {
|
|
|
1368
1372
|
size
|
|
1369
1373
|
)
|
|
1370
1374
|
);
|
|
1371
|
-
if (encodedBytes(state) <=
|
|
1375
|
+
if (encodedBytes(state) <= MAX_RUNTIME_STATE_BYTES) return state;
|
|
1372
1376
|
size.eventsDropped += state.events.length;
|
|
1373
1377
|
size.functionDefinitionsDropped += state.functions.length;
|
|
1374
1378
|
state = settleFinalBytes(
|
|
@@ -1391,9 +1395,9 @@ var enforceRuntimeStateSizeBudget = (input, options = {}) => {
|
|
|
1391
1395
|
size
|
|
1392
1396
|
)
|
|
1393
1397
|
);
|
|
1394
|
-
if (encodedBytes(state) <=
|
|
1398
|
+
if (encodedBytes(state) <= MAX_RUNTIME_STATE_BYTES) return state;
|
|
1395
1399
|
state = settleFinalBytes(minimalState(state, size));
|
|
1396
|
-
if (encodedBytes(state) <=
|
|
1400
|
+
if (encodedBytes(state) <= MAX_RUNTIME_STATE_BYTES) return state;
|
|
1397
1401
|
const emergency = {
|
|
1398
1402
|
version: 4,
|
|
1399
1403
|
captureProfile: {
|
|
@@ -2834,10 +2838,6 @@ var createExecutionRecorder = (options) => {
|
|
|
2834
2838
|
});
|
|
2835
2839
|
const excludesSource = createSourceExclusionMatcher(options.excludeSources);
|
|
2836
2840
|
const journalPool = new ExecutionJournalPool(maxEventsPerExecution);
|
|
2837
|
-
const runtimeStateSizeBudget = {
|
|
2838
|
-
targetBytes: options.runtimeStateTargetBytes,
|
|
2839
|
-
maximumBytes: options.maxRuntimeStateBytes
|
|
2840
|
-
};
|
|
2841
2841
|
const plansByRuntimeId = [];
|
|
2842
2842
|
let executionCounter = 0;
|
|
2843
2843
|
let nextRuntimePlanId = 1;
|
|
@@ -3074,12 +3074,12 @@ var createExecutionRecorder = (options) => {
|
|
|
3074
3074
|
state.recorder = {
|
|
3075
3075
|
inlineWallTimeMs: roundedMilliseconds2(recording.inlineRecorderTimeNs)
|
|
3076
3076
|
};
|
|
3077
|
-
const boundedState = enforceRuntimeStateSizeBudget(state
|
|
3077
|
+
const boundedState = enforceRuntimeStateSizeBudget(state);
|
|
3078
3078
|
addRecorderTime(recording, process.hrtime.bigint() - sizeBudgetStartedAtNs);
|
|
3079
3079
|
boundedState.recorder = {
|
|
3080
3080
|
inlineWallTimeMs: roundedMilliseconds2(recording.inlineRecorderTimeNs)
|
|
3081
3081
|
};
|
|
3082
|
-
return boundedState.truncated?.size ? enforceRuntimeStateSizeBudget(boundedState
|
|
3082
|
+
return boundedState.truncated?.size ? enforceRuntimeStateSizeBudget(boundedState) : boundedState;
|
|
3083
3083
|
};
|
|
3084
3084
|
const forgetDiscardedRecording = (recording) => {
|
|
3085
3085
|
if (recording.hasError || recording.retainedForError) return;
|
|
@@ -4280,7 +4280,7 @@ var installGlobalHandlers = (client, options = {}) => {
|
|
|
4280
4280
|
|
|
4281
4281
|
// src/sdk-meta.ts
|
|
4282
4282
|
var SDK_NAME = "@rasputin-ai/node";
|
|
4283
|
-
var SDK_VERSION = "0.
|
|
4283
|
+
var SDK_VERSION = "0.9.1";
|
|
4284
4284
|
|
|
4285
4285
|
// src/rasputin-init.ts
|
|
4286
4286
|
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.
|
|
1609
|
+
var SDK_VERSION = "0.9.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.
|
|
1671
|
+
var SDK_VERSION = "0.9.1";
|
|
1672
1672
|
|
|
1673
1673
|
// src/auto-instrumentation/transform-disk-cache.ts
|
|
1674
1674
|
var projectCacheDir = () => {
|
package/dist/internal.js
CHANGED
|
@@ -26,6 +26,9 @@ var issueHeadline = (issue) => {
|
|
|
26
26
|
if (issue.reason === "invalid_mapping") {
|
|
27
27
|
return `The configured package root for ${target} does not match this Git release.`;
|
|
28
28
|
}
|
|
29
|
+
if (issue.reason === "commit_not_found") {
|
|
30
|
+
return `GitHub does not have this release commit while locating ${target}.`;
|
|
31
|
+
}
|
|
29
32
|
return `GitHub could not be reached while locating ${target}.`;
|
|
30
33
|
};
|
|
31
34
|
var formatIssue = (issue) => {
|
|
@@ -44,8 +47,11 @@ var formatIssue = (issue) => {
|
|
|
44
47
|
var formatConfigurationReport = (input) => {
|
|
45
48
|
const packages = input.verification.packages ?? [];
|
|
46
49
|
const unresolved = input.verification.unresolved;
|
|
47
|
-
const mappingIssues = unresolved.filter(
|
|
50
|
+
const mappingIssues = unresolved.filter(
|
|
51
|
+
(issue) => issue.reason !== "github_unavailable" && issue.reason !== "commit_not_found"
|
|
52
|
+
);
|
|
48
53
|
const githubUnavailable = input.verification.status === "unavailable" || unresolved.some((issue) => issue.reason === "github_unavailable");
|
|
54
|
+
const commitNotFound = input.verification.status === "commit_not_found";
|
|
49
55
|
const verified = input.uploaded && input.verification.status === "verified";
|
|
50
56
|
const lines = [
|
|
51
57
|
...BANNER,
|
|
@@ -84,13 +90,19 @@ var formatConfigurationReport = (input) => {
|
|
|
84
90
|
lines.push("! upload failed");
|
|
85
91
|
} else {
|
|
86
92
|
lines.push("\u2713 uploaded");
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
)
|
|
93
|
+
if (verified) {
|
|
94
|
+
lines.push("\u2713 verified against GitHub");
|
|
95
|
+
} else if (commitNotFound) {
|
|
96
|
+
lines.push("! this Git commit was not found in the connected repository");
|
|
97
|
+
} else {
|
|
98
|
+
lines.push("! some source files could not be mapped to this Git release");
|
|
99
|
+
}
|
|
90
100
|
}
|
|
91
101
|
lines.push("", "GitHub");
|
|
92
102
|
if (!input.uploaded) {
|
|
93
103
|
lines.push("! not verified");
|
|
104
|
+
} else if (commitNotFound) {
|
|
105
|
+
lines.push("! push this commit to GitHub so Rasputin can map source");
|
|
94
106
|
} else if (githubUnavailable) {
|
|
95
107
|
lines.push("! repository is not connected, or this release could not be read");
|
|
96
108
|
} else {
|
|
@@ -566,7 +578,7 @@ var scheduleInstrumentationManifestUpload = (options) => {
|
|
|
566
578
|
failedAttempts = 0;
|
|
567
579
|
clearRetry();
|
|
568
580
|
if (verification.status === "verified") {
|
|
569
|
-
if (!loggedSuccess && options.logSuccess
|
|
581
|
+
if (!loggedSuccess && options.logSuccess === true) {
|
|
570
582
|
loggedSuccess = true;
|
|
571
583
|
console.info(report(manifest, true, verification));
|
|
572
584
|
}
|
|
@@ -1210,17 +1222,14 @@ var RecorderMemoryBudget = class {
|
|
|
1210
1222
|
import {
|
|
1211
1223
|
rasputinUnavailable
|
|
1212
1224
|
} from "@rasputin-ai/core";
|
|
1213
|
-
var
|
|
1214
|
-
var DEFAULT_MAX_RUNTIME_STATE_BYTES = 512 * 1024;
|
|
1225
|
+
var MAX_RUNTIME_STATE_BYTES = 256 * 1024;
|
|
1215
1226
|
var VALUE_OMITTED_REASON = "runtime_state_size_budget";
|
|
1216
1227
|
var encodedBytes = (value) => Buffer.byteLength(JSON.stringify(value), "utf8");
|
|
1217
|
-
var
|
|
1218
|
-
var sizeMetadata = (originalBytes, targetBytes, maximumBytes) => ({
|
|
1228
|
+
var sizeMetadata = (originalBytes) => ({
|
|
1219
1229
|
reason: "runtime_state_size_budget",
|
|
1220
1230
|
originalBytes,
|
|
1221
1231
|
finalBytes: 0,
|
|
1222
|
-
|
|
1223
|
-
maximumBytes,
|
|
1232
|
+
maximumBytes: MAX_RUNTIME_STATE_BYTES,
|
|
1224
1233
|
eventValuesDropped: 0,
|
|
1225
1234
|
eventsDropped: 0,
|
|
1226
1235
|
functionDefinitionsDropped: 0
|
|
@@ -1311,18 +1320,13 @@ var minimalState = (state, size) => {
|
|
|
1311
1320
|
size
|
|
1312
1321
|
);
|
|
1313
1322
|
};
|
|
1314
|
-
var enforceRuntimeStateSizeBudget = (input
|
|
1315
|
-
const maximumBytes = boundedLimit(options.maximumBytes, DEFAULT_MAX_RUNTIME_STATE_BYTES);
|
|
1316
|
-
const targetBytes = Math.min(
|
|
1317
|
-
maximumBytes,
|
|
1318
|
-
boundedLimit(options.targetBytes, DEFAULT_RUNTIME_STATE_TARGET_BYTES)
|
|
1319
|
-
);
|
|
1323
|
+
var enforceRuntimeStateSizeBudget = (input) => {
|
|
1320
1324
|
const initialBytes = encodedBytes(input);
|
|
1321
1325
|
const existingSize = input.truncated?.size;
|
|
1322
|
-
if (existingSize && initialBytes <=
|
|
1323
|
-
if (initialBytes <=
|
|
1326
|
+
if (existingSize && initialBytes <= MAX_RUNTIME_STATE_BYTES) return settleFinalBytes(input);
|
|
1327
|
+
if (initialBytes <= MAX_RUNTIME_STATE_BYTES) return input;
|
|
1324
1328
|
const originalBytes = existingSize?.originalBytes ?? initialBytes;
|
|
1325
|
-
const size = sizeMetadata(originalBytes
|
|
1329
|
+
const size = sizeMetadata(originalBytes);
|
|
1326
1330
|
let state = input;
|
|
1327
1331
|
const stripped = dropEventValues(state.events);
|
|
1328
1332
|
size.eventValuesDropped += stripped.dropped;
|
|
@@ -1339,7 +1343,7 @@ var enforceRuntimeStateSizeBudget = (input, options = {}) => {
|
|
|
1339
1343
|
size
|
|
1340
1344
|
)
|
|
1341
1345
|
);
|
|
1342
|
-
if (encodedBytes(state) <=
|
|
1346
|
+
if (encodedBytes(state) <= MAX_RUNTIME_STATE_BYTES) return state;
|
|
1343
1347
|
size.eventsDropped += state.events.length;
|
|
1344
1348
|
size.functionDefinitionsDropped += state.functions.length;
|
|
1345
1349
|
state = settleFinalBytes(
|
|
@@ -1362,9 +1366,9 @@ var enforceRuntimeStateSizeBudget = (input, options = {}) => {
|
|
|
1362
1366
|
size
|
|
1363
1367
|
)
|
|
1364
1368
|
);
|
|
1365
|
-
if (encodedBytes(state) <=
|
|
1369
|
+
if (encodedBytes(state) <= MAX_RUNTIME_STATE_BYTES) return state;
|
|
1366
1370
|
state = settleFinalBytes(minimalState(state, size));
|
|
1367
|
-
if (encodedBytes(state) <=
|
|
1371
|
+
if (encodedBytes(state) <= MAX_RUNTIME_STATE_BYTES) return state;
|
|
1368
1372
|
const emergency = {
|
|
1369
1373
|
version: 4,
|
|
1370
1374
|
captureProfile: {
|
|
@@ -2805,10 +2809,6 @@ var createExecutionRecorder = (options) => {
|
|
|
2805
2809
|
});
|
|
2806
2810
|
const excludesSource = createSourceExclusionMatcher(options.excludeSources);
|
|
2807
2811
|
const journalPool = new ExecutionJournalPool(maxEventsPerExecution);
|
|
2808
|
-
const runtimeStateSizeBudget = {
|
|
2809
|
-
targetBytes: options.runtimeStateTargetBytes,
|
|
2810
|
-
maximumBytes: options.maxRuntimeStateBytes
|
|
2811
|
-
};
|
|
2812
2812
|
const plansByRuntimeId = [];
|
|
2813
2813
|
let executionCounter = 0;
|
|
2814
2814
|
let nextRuntimePlanId = 1;
|
|
@@ -3045,12 +3045,12 @@ var createExecutionRecorder = (options) => {
|
|
|
3045
3045
|
state.recorder = {
|
|
3046
3046
|
inlineWallTimeMs: roundedMilliseconds2(recording.inlineRecorderTimeNs)
|
|
3047
3047
|
};
|
|
3048
|
-
const boundedState = enforceRuntimeStateSizeBudget(state
|
|
3048
|
+
const boundedState = enforceRuntimeStateSizeBudget(state);
|
|
3049
3049
|
addRecorderTime(recording, process.hrtime.bigint() - sizeBudgetStartedAtNs);
|
|
3050
3050
|
boundedState.recorder = {
|
|
3051
3051
|
inlineWallTimeMs: roundedMilliseconds2(recording.inlineRecorderTimeNs)
|
|
3052
3052
|
};
|
|
3053
|
-
return boundedState.truncated?.size ? enforceRuntimeStateSizeBudget(boundedState
|
|
3053
|
+
return boundedState.truncated?.size ? enforceRuntimeStateSizeBudget(boundedState) : boundedState;
|
|
3054
3054
|
};
|
|
3055
3055
|
const forgetDiscardedRecording = (recording) => {
|
|
3056
3056
|
if (recording.hasError || recording.retainedForError) return;
|
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.
|
|
3
|
+
"version": "0.9.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.
|
|
52
|
+
"@rasputin-ai/core": "0.9.1",
|
|
53
53
|
"typescript": "5"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|