@rasputin-ai/core 0.11.3 → 0.12.0
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.
|
@@ -37,8 +37,11 @@ export type RuntimeFunctionEnterEvent = {
|
|
|
37
37
|
functionId: string;
|
|
38
38
|
/** `callId` of the function that called this one, when it is also recorded. */
|
|
39
39
|
parentCallId?: number;
|
|
40
|
-
/**
|
|
41
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Milliseconds from the start of this request or job.
|
|
42
|
+
* Omitted when this call was not timed.
|
|
43
|
+
*/
|
|
44
|
+
timestampMs?: number;
|
|
42
45
|
/** Arguments as captured (redacted and size-limited). Absent when not retained. */
|
|
43
46
|
args?: unknown[];
|
|
44
47
|
/** True when arguments were not retained. Distinct from `args: []` (called with none). */
|
|
@@ -56,8 +59,8 @@ export type RuntimeFunctionExitEvent = {
|
|
|
56
59
|
type: 'function_exit';
|
|
57
60
|
/** Matches the earlier `function_enter` for this call. */
|
|
58
61
|
callId: number;
|
|
59
|
-
/** Milliseconds from the start of this request or job. */
|
|
60
|
-
timestampMs
|
|
62
|
+
/** Milliseconds from the start of this request or job. Omitted when this call was not timed. */
|
|
63
|
+
timestampMs?: number;
|
|
61
64
|
/** How long this call ran, in milliseconds. Omitted when not measured. */
|
|
62
65
|
durationMs?: number;
|
|
63
66
|
/** Return value as captured (redacted and size-limited). */
|
|
@@ -81,8 +84,8 @@ export type RuntimeFunctionThrowEvent = {
|
|
|
81
84
|
type: 'function_throw';
|
|
82
85
|
/** Matches the earlier `function_enter` for this call. */
|
|
83
86
|
callId: number;
|
|
84
|
-
/** Milliseconds from the start of this request or job. */
|
|
85
|
-
timestampMs
|
|
87
|
+
/** Milliseconds from the start of this request or job. Omitted when this call was not timed. */
|
|
88
|
+
timestampMs?: number;
|
|
86
89
|
/** How long this call ran before it threw, in milliseconds. Omitted when not measured. */
|
|
87
90
|
durationMs?: number;
|
|
88
91
|
/** The thrown value, captured the same way as other values. */
|
|
@@ -98,20 +101,29 @@ export type RuntimeFunctionCallsSuppressedEvent = {
|
|
|
98
101
|
type: 'function_calls_suppressed';
|
|
99
102
|
functionId: string;
|
|
100
103
|
parentCallId?: number;
|
|
101
|
-
/** When the first extra call happened
|
|
102
|
-
timestampMs
|
|
103
|
-
/** When the most recent extra call finished. Omitted when not measured. */
|
|
104
|
+
/** When the first timed extra call happened. Omitted when none of these calls were timed. */
|
|
105
|
+
timestampMs?: number;
|
|
106
|
+
/** When the most recent timed extra call finished. Omitted when not measured. */
|
|
104
107
|
lastTimestampMs?: number;
|
|
105
108
|
/** How many extra successful calls this row stands in for. */
|
|
106
109
|
suppressedCallCount: number;
|
|
107
|
-
/**
|
|
110
|
+
/**
|
|
111
|
+
* How many of those calls had a measured duration.
|
|
112
|
+
* Equal to `suppressedCallCount` when the group is fully timed.
|
|
113
|
+
* Omitted when every suppressed call was timed, because `totalDurationMs` already says that.
|
|
114
|
+
*/
|
|
115
|
+
sampledDurationCount?: number;
|
|
116
|
+
/** Sum of the measured durations only. Never a stand-in for the whole group. */
|
|
117
|
+
sampledDurationMs?: number;
|
|
118
|
+
/** Combined run time of every extra call. Present only when each one was timed. */
|
|
108
119
|
totalDurationMs?: number;
|
|
109
120
|
};
|
|
110
121
|
/** A recorded function awaited a value. Browser recordings use this for compiled `await`. */
|
|
111
122
|
export type RuntimeAwaitedEvent = {
|
|
112
123
|
type: 'awaited';
|
|
113
124
|
callId: number;
|
|
114
|
-
|
|
125
|
+
/** Omitted when this await was not timed. */
|
|
126
|
+
timestampMs?: number;
|
|
115
127
|
value?: unknown;
|
|
116
128
|
omitted?: true;
|
|
117
129
|
};
|
|
@@ -120,7 +132,8 @@ export type RuntimeExpressionObservedEvent = {
|
|
|
120
132
|
type: 'expression_observed';
|
|
121
133
|
siteId: string | number;
|
|
122
134
|
callId?: number;
|
|
123
|
-
|
|
135
|
+
/** Omitted when this observation was not timed. */
|
|
136
|
+
timestampMs?: number;
|
|
124
137
|
value: unknown;
|
|
125
138
|
};
|
|
126
139
|
/** One step in the recorded call history. */
|
|
@@ -166,7 +179,11 @@ export type RuntimeCaptureProfile = {
|
|
|
166
179
|
* `selective` means some helper calls omitted values to stay under the size budget.
|
|
167
180
|
*/
|
|
168
181
|
functionValues: 'full' | 'selective' | 'none';
|
|
169
|
-
/**
|
|
182
|
+
/**
|
|
183
|
+
* Whether retained calls have measured timings.
|
|
184
|
+
* `full` means every retained call was timed, including sample-every-1.
|
|
185
|
+
* `partial` or `none` means some or all durations were not measured and were omitted.
|
|
186
|
+
*/
|
|
170
187
|
timings: RuntimeCaptureCoverage;
|
|
171
188
|
};
|
|
172
189
|
export type RuntimeHistoryLink = {
|
|
@@ -179,9 +196,17 @@ export type RuntimeHistoryLink = {
|
|
|
179
196
|
* arguments and return values, up to the recorder's size and redaction limits.
|
|
180
197
|
* Captured values are bounded JSON snapshots (special numbers are tagged), not
|
|
181
198
|
* live JavaScript objects. Successful calls may be summarized.
|
|
199
|
+
* Call timestamps and durations are omitted when they were not measured.
|
|
182
200
|
*/
|
|
183
201
|
export type RuntimeExecutionState = {
|
|
184
202
|
version: 4;
|
|
203
|
+
/**
|
|
204
|
+
* Set when inactive adaptive left some retained call timings unmeasured.
|
|
205
|
+
* Absent when every retained call was timed.
|
|
206
|
+
*/
|
|
207
|
+
durationSampling?: {
|
|
208
|
+
policy: 'progressive';
|
|
209
|
+
};
|
|
185
210
|
/** How complete this snapshot is, and whether wrapping was automatic or manual. */
|
|
186
211
|
captureProfile: RuntimeCaptureProfile;
|
|
187
212
|
/** Id of this recording. Unique within the process. */
|
|
@@ -196,7 +221,7 @@ export type RuntimeExecutionState = {
|
|
|
196
221
|
execution: RuntimeExecutionMetadata;
|
|
197
222
|
/** Functions that appear in `events`, stored once each. */
|
|
198
223
|
functions: RuntimeFunctionDefinition[];
|
|
199
|
-
/** Call history in
|
|
224
|
+
/** Call history in recorded order. Missing timestamps are not zeros and are not sorted. */
|
|
200
225
|
events: RuntimeExecutionEvent[];
|
|
201
226
|
/** Present when the event cap or size limit dropped data. */
|
|
202
227
|
truncated?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-execution-state-types.d.ts","sourceRoot":"","sources":["../../src/create-ingest-event/runtime-execution-state-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEpG;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAC7B,MAAM,GACN,YAAY,GACZ,KAAK,GACL,WAAW,GACX,QAAQ,GACR,aAAa,GACb,UAAU,CAAC;AAEd,mFAAmF;AACnF,MAAM,MAAM,uBAAuB,GAAG;IACrC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,2DAA2D;AAC3D,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,UAAU,GAAG,oBAAoB,GAAG,UAAU,CAAC;AAE5F,oFAAoF;AACpF,MAAM,MAAM,wBAAwB,GAAG;IACtC,4EAA4E;IAC5E,IAAI,EAAE,oBAAoB,CAAC;IAC3B,4FAA4F;IAC5F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,OAAO,CAAC,EAAE,uBAAuB,CAAC;CAClC,CAAC;AAEF,uEAAuE;AACvE,MAAM,MAAM,yBAAyB,GAAG;IACvC,IAAI,EAAE,gBAAgB,CAAC;IACvB,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,UAAU,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB
|
|
1
|
+
{"version":3,"file":"runtime-execution-state-types.d.ts","s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F;IAC3F,MAAM,EAAE,qBAAqB,EAAE,CAAC;IAChC,6DAA6D;IAC7D,SAAS,CAAC,EAAE;QACX,yDAAyD;QACzD,aAAa,EAAE,MAAM,CAAC;QACtB,gDAAgD;QAChD,IAAI,CAAC,EAAE,0BAA0B,CAAC;KAClC,CAAC;IACF,8EAA8E;IAC9E,OAAO,CAAC,EAAE;QACT,YAAY,EAAE,SAAS,GAAG,aAAa,CAAC;QACxC,MAAM,EACH,uBAAuB,GACvB,6BAA6B,GAC7B,wBAAwB,GACxB,uBAAuB,GACvB,2CAA2C,GAC3C,YAAY,GACZ,gBAAgB,GAChB,4BAA4B,GAC5B,uBAAuB,GACvB,6BAA6B,CAAC;QACjC,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,aAAa,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,uFAAuF;IACvF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACpC,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -899,7 +899,7 @@ var resolveSourceMaps = async (frames) => {
|
|
|
899
899
|
|
|
900
900
|
// src/sdk-meta.ts
|
|
901
901
|
var SDK_NAME = "@rasputin-ai/core";
|
|
902
|
-
var SDK_VERSION = "0.
|
|
902
|
+
var SDK_VERSION = "0.12.0";
|
|
903
903
|
|
|
904
904
|
// src/suppression/parameterize-message.ts
|
|
905
905
|
var MAX_INPUT_LENGTH = 8192;
|
package/dist/sdk-meta.d.ts
CHANGED