@rasputin-ai/core 0.5.3 → 0.6.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.
- package/dist/create-client/create-client-types.d.ts +15 -6
- package/dist/create-client/create-client-types.d.ts.map +1 -1
- package/dist/create-client/is-client-enabled.d.ts +4 -1
- package/dist/create-client/is-client-enabled.d.ts.map +1 -1
- package/dist/create-client/parse-dsn.d.ts +9 -0
- package/dist/create-client/parse-dsn.d.ts.map +1 -0
- package/dist/create-ingest-event/runtime-execution-state-types.d.ts +62 -21
- package/dist/create-ingest-event/runtime-execution-state-types.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +49 -7
- package/dist/sdk-meta.d.ts +1 -1
- package/dist/source-identity/source-identity.d.ts +4 -0
- package/dist/source-identity/source-identity.d.ts.map +1 -1
- package/dist/suppression/parameterize-message.d.ts +6 -0
- package/dist/suppression/parameterize-message.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -3,8 +3,15 @@ import type { RuntimeExecutionState } from '../create-ingest-event/runtime-execu
|
|
|
3
3
|
import type { TransportFetch, TransportStats } from '../transport/transport-types';
|
|
4
4
|
type RasputinBaseOptions = {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
* An empty or
|
|
6
|
+
* Public ingest DSN from project settings. Required for runtime reporting.
|
|
7
|
+
* Safe to include in application config. An empty or invalid value makes
|
|
8
|
+
* the SDK fully inert.
|
|
9
|
+
*/
|
|
10
|
+
dsn: string;
|
|
11
|
+
/**
|
|
12
|
+
* Secret project API key for privileged operations such as deploy
|
|
13
|
+
* announcement and instrumentation manifest upload. Required. An empty
|
|
14
|
+
* value makes the SDK fully inert. Do not put this in frontend code.
|
|
8
15
|
*/
|
|
9
16
|
projectApiKey: string;
|
|
10
17
|
/**
|
|
@@ -28,8 +35,9 @@ type RasputinBaseOptions = {
|
|
|
28
35
|
release: string;
|
|
29
36
|
/**
|
|
30
37
|
* Master on/off switch. When `false`, nothing is captured or sent and no
|
|
31
|
-
* process handlers are installed. A blank `projectApiKey
|
|
32
|
-
* also inert.
|
|
38
|
+
* process handlers are installed. A blank `dsn`, `projectApiKey`, or
|
|
39
|
+
* `release` is also inert.
|
|
40
|
+
* Useful for local dev or tests without removing init code.
|
|
33
41
|
*
|
|
34
42
|
* @default true
|
|
35
43
|
*/
|
|
@@ -77,8 +85,9 @@ type RasputinBaseOptions = {
|
|
|
77
85
|
*
|
|
78
86
|
* ```ts
|
|
79
87
|
* RasputinInit({
|
|
80
|
-
*
|
|
81
|
-
*
|
|
88
|
+
* dsn: process.env.RASPUTIN_DSN!,
|
|
89
|
+
* projectApiKey: process.env.RASPUTIN_PROJECT_API_KEY!,
|
|
90
|
+
* environment: 'production',
|
|
82
91
|
* release: process.env.RASPUTIN_RELEASE!,
|
|
83
92
|
* });
|
|
84
93
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-client-types.d.ts","sourceRoot":"","sources":["../../src/create-client/create-client-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AACvF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAClG,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnF,KAAK,mBAAmB,GAAG;IAC1B
|
|
1
|
+
{"version":3,"file":"create-client-types.d.ts","sourceRoot":"","sources":["../../src/create-client/create-client-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AACvF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAClG,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnF,KAAK,mBAAmB,GAAG;IAC1B;;;;OAIG;IACH,GAAG,EAAE,MA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AAwF;IACxF,QAAQ,EAAE,MAAM,mBAAmB,CAAC;CACpC,CAAC;AAEF,qFAAqF;AACrF,MAAM,MAAM,iBAAiB,GAAG;IAC/B,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,CACrB,KAAK,EAAE,OAAO,EACd,OAAO,CAAC,EAAE,cAAc,KACpB,qBAAqB,GAAG,SAAS,CAAC;CACvC,CAAC"}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import type { RasputinClient } from './create-client-types';
|
|
2
2
|
type ClientActivationOptions = {
|
|
3
3
|
enabled?: boolean;
|
|
4
|
+
dsn?: string;
|
|
4
5
|
projectApiKey?: string;
|
|
6
|
+
apiUrl?: string;
|
|
5
7
|
release?: string;
|
|
6
8
|
};
|
|
7
9
|
export type ClientActivation = {
|
|
8
10
|
enabled: false;
|
|
9
11
|
} | {
|
|
10
12
|
enabled: true;
|
|
13
|
+
ingestToken: string;
|
|
11
14
|
projectApiKey: string;
|
|
15
|
+
apiUrl: string;
|
|
12
16
|
release: string;
|
|
13
17
|
};
|
|
14
|
-
/** `enabled: false`, a blank API key, or a blank/unresolved release → fully inert. */
|
|
15
18
|
export declare const resolveClientActivation: (options: ClientActivationOptions) => ClientActivation;
|
|
16
19
|
export declare const isClientEnabled: (options: ClientActivationOptions) => boolean;
|
|
17
20
|
export declare const noopClient: () => RasputinClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-client-enabled.d.ts","sourceRoot":"","sources":["../../src/create-client/is-client-enabled.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"is-client-enabled.d.ts","sourceRoot":"","sources":["../../src/create-client/is-client-enabled.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D,KAAK,uBAAuB,GAAG;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GACzB;IAAE,OAAO,EAAE,KAAK,CAAA;CAAE,GAClB;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAElG,eAAO,MAAM,uBAAuB,GAAI,SAAS,uBAAuB,KAAG,gBAmB1E,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,SAAS,uBAAuB,KAAG,OAC1B,CAAC;AAE1C,eAAO,MAAM,UAAU,QAAO,cA2B5B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const DSN_PUBLIC_KEY_PREFIX = "rdn_";
|
|
2
|
+
export type ParsedDsn = {
|
|
3
|
+
publicKey: string;
|
|
4
|
+
apiUrl: string;
|
|
5
|
+
projectId: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const parseDsn: (value: string | undefined) => ParsedDsn | null;
|
|
8
|
+
export declare const isLocalDsnPublicKey: (publicKey: string) => boolean;
|
|
9
|
+
//# sourceMappingURL=parse-dsn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-dsn.d.ts","sourceRoot":"","sources":["../../src/create-client/parse-dsn.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,SAAS,CAAC;AAE5C,MAAM,MAAM,SAAS,GAAG;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,OAAO,MAAM,GAAG,SAAS,KAAG,SAAS,GAAG,IAkBhE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,WAAW,MAAM,KAAG,OACE,CAAC"}
|
|
@@ -6,21 +6,25 @@
|
|
|
6
6
|
import type { RuntimeFunctionDefinition, SourcePosition } from '../source-identity/source-identity';
|
|
7
7
|
/**
|
|
8
8
|
* What kind of work this recording belongs to.
|
|
9
|
-
* HTTP requests use `http`.
|
|
9
|
+
* HTTP requests use `http`. Browser UI work uses `interaction` or `detached`.
|
|
10
10
|
*/
|
|
11
|
-
export type RuntimeExecutionKind = 'http' | 'serverless' | 'job' | 'scheduled' | 'custom';
|
|
11
|
+
export type RuntimeExecutionKind = 'http' | 'serverless' | 'job' | 'scheduled' | 'custom' | 'interaction' | 'detached';
|
|
12
12
|
/** HTTP details for a request-scoped recording. Same shape as `RequestContext`. */
|
|
13
13
|
export type RuntimeExecutionRequest = {
|
|
14
14
|
method?: string | null;
|
|
15
15
|
route?: string | null;
|
|
16
16
|
status?: number | null;
|
|
17
17
|
};
|
|
18
|
+
/** How a browser call was attributed to an interaction. */
|
|
19
|
+
export type RuntimeProvenance = 'observed' | 'inferred' | 'inferred-ambiguous' | 'unlinked';
|
|
18
20
|
/** Labels for one recording: what kind of work it is, and optional HTTP details. */
|
|
19
21
|
export type RuntimeExecutionMetadata = {
|
|
20
|
-
/** `http` for a request, `
|
|
22
|
+
/** `http` for a request, `interaction` for a browser gesture, and so on. */
|
|
21
23
|
kind: RuntimeExecutionKind;
|
|
22
24
|
/** Human-readable name you passed to `execution.createScope()`, such as `sync-invoices`. */
|
|
23
25
|
name?: string;
|
|
26
|
+
/** Browser event type that rooted this recording, such as `click`. */
|
|
27
|
+
eventType?: string;
|
|
24
28
|
/** HTTP method, route, and status when this recording is a request. */
|
|
25
29
|
request?: RuntimeExecutionRequest;
|
|
26
30
|
};
|
|
@@ -35,13 +39,17 @@ export type RuntimeFunctionEnterEvent = {
|
|
|
35
39
|
parentCallId?: number;
|
|
36
40
|
/** Milliseconds from the start of this request or job. */
|
|
37
41
|
timestampMs: number;
|
|
38
|
-
/** Arguments as captured (redacted and size-limited). */
|
|
39
|
-
args
|
|
42
|
+
/** Arguments as captured (redacted and size-limited). Absent when not retained. */
|
|
43
|
+
args?: unknown[];
|
|
44
|
+
/** True when arguments were not retained. Distinct from `args: []` (called with none). */
|
|
45
|
+
argsOmitted?: true;
|
|
40
46
|
/**
|
|
41
47
|
* `throw` when arguments were read at throw time for a previously summarized call.
|
|
42
48
|
* Omitted means they were captured at function entry.
|
|
43
49
|
*/
|
|
44
50
|
capturedAt?: 'enter' | 'throw';
|
|
51
|
+
/** How this call was attributed to the current browser execution. */
|
|
52
|
+
provenance?: RuntimeProvenance;
|
|
45
53
|
};
|
|
46
54
|
/** A recorded function returned normally. */
|
|
47
55
|
export type RuntimeFunctionExitEvent = {
|
|
@@ -50,8 +58,8 @@ export type RuntimeFunctionExitEvent = {
|
|
|
50
58
|
callId: number;
|
|
51
59
|
/** Milliseconds from the start of this request or job. */
|
|
52
60
|
timestampMs: number;
|
|
53
|
-
/** How long this call ran, in milliseconds. */
|
|
54
|
-
durationMs
|
|
61
|
+
/** How long this call ran, in milliseconds. Omitted when not measured. */
|
|
62
|
+
durationMs?: number;
|
|
55
63
|
/** Return value as captured (redacted and size-limited). */
|
|
56
64
|
returnValue?: unknown;
|
|
57
65
|
};
|
|
@@ -75,8 +83,8 @@ export type RuntimeFunctionThrowEvent = {
|
|
|
75
83
|
callId: number;
|
|
76
84
|
/** Milliseconds from the start of this request or job. */
|
|
77
85
|
timestampMs: number;
|
|
78
|
-
/** How long this call ran before it threw, in milliseconds. */
|
|
79
|
-
durationMs
|
|
86
|
+
/** How long this call ran before it threw, in milliseconds. Omitted when not measured. */
|
|
87
|
+
durationMs?: number;
|
|
80
88
|
/** The thrown value, captured the same way as other values. */
|
|
81
89
|
error?: unknown;
|
|
82
90
|
/** Source location of the throw, when the stack could be mapped. */
|
|
@@ -92,15 +100,31 @@ export type RuntimeFunctionCallsSuppressedEvent = {
|
|
|
92
100
|
parentCallId?: number;
|
|
93
101
|
/** When the first extra call happened, in milliseconds from execution start. */
|
|
94
102
|
timestampMs: number;
|
|
95
|
-
/** When the most recent extra call finished. */
|
|
96
|
-
lastTimestampMs
|
|
103
|
+
/** When the most recent extra call finished. Omitted when not measured. */
|
|
104
|
+
lastTimestampMs?: number;
|
|
97
105
|
/** How many extra successful calls this row stands in for. */
|
|
98
106
|
suppressedCallCount: number;
|
|
99
|
-
/** Combined run time of those extra calls, in milliseconds. */
|
|
100
|
-
totalDurationMs
|
|
107
|
+
/** Combined run time of those extra calls, in milliseconds. Omitted when not measured. */
|
|
108
|
+
totalDurationMs?: number;
|
|
109
|
+
};
|
|
110
|
+
/** A recorded function awaited a value. Browser recordings use this for compiled `await`. */
|
|
111
|
+
export type RuntimeAwaitedEvent = {
|
|
112
|
+
type: 'awaited';
|
|
113
|
+
callId: number;
|
|
114
|
+
timestampMs: number;
|
|
115
|
+
value?: unknown;
|
|
116
|
+
omitted?: true;
|
|
117
|
+
};
|
|
118
|
+
/** A compile-time observe site recorded a value on the failing execution. */
|
|
119
|
+
export type RuntimeExpressionObservedEvent = {
|
|
120
|
+
type: 'expression_observed';
|
|
121
|
+
siteId: string | number;
|
|
122
|
+
callId?: number;
|
|
123
|
+
timestampMs: number;
|
|
124
|
+
value: unknown;
|
|
101
125
|
};
|
|
102
126
|
/** One step in the recorded call history. */
|
|
103
|
-
export type RuntimeExecutionEvent = RuntimeFunctionEnterEvent | RuntimeFunctionExitEvent | RuntimeFunctionThrowEvent | RuntimeFunctionCallsSuppressedEvent;
|
|
127
|
+
export type RuntimeExecutionEvent = RuntimeFunctionEnterEvent | RuntimeFunctionExitEvent | RuntimeFunctionThrowEvent | RuntimeFunctionCallsSuppressedEvent | RuntimeAwaitedEvent | RuntimeExpressionObservedEvent;
|
|
104
128
|
/** Recorder cost for this one request or job, not process-wide totals. */
|
|
105
129
|
export type RuntimeExecutionRecorderMetrics = {
|
|
106
130
|
/** Time spent inside recorder code for this execution, in milliseconds. */
|
|
@@ -147,6 +171,11 @@ export type RuntimeCaptureProfile = {
|
|
|
147
171
|
/** Whether call timings were kept. */
|
|
148
172
|
timings: RuntimeCaptureCoverage;
|
|
149
173
|
};
|
|
174
|
+
export type RuntimeHistoryLink = {
|
|
175
|
+
executionId: string;
|
|
176
|
+
relationship: 'observed-write' | 'last-observed-write' | 'inferred';
|
|
177
|
+
key?: string;
|
|
178
|
+
};
|
|
150
179
|
/**
|
|
151
180
|
* Snapshot of the request or job that failed: which functions ran, with what
|
|
152
181
|
* arguments and return values, up to the recorder's size and redaction limits.
|
|
@@ -159,10 +188,10 @@ export type RuntimeExecutionState = {
|
|
|
159
188
|
captureProfile: RuntimeCaptureProfile;
|
|
160
189
|
/** Id of this recording. Unique within the process. */
|
|
161
190
|
executionId: string;
|
|
162
|
-
/** When this request or job started, as an ISO timestamp. */
|
|
163
|
-
startedAt
|
|
164
|
-
/** How long it had been running when the snapshot was taken, in milliseconds. */
|
|
165
|
-
durationMs
|
|
191
|
+
/** When this request or job started, as an ISO timestamp. Omitted when not measured. */
|
|
192
|
+
startedAt?: string;
|
|
193
|
+
/** How long it had been running when the snapshot was taken, in milliseconds. Omitted when not measured. */
|
|
194
|
+
durationMs?: number;
|
|
166
195
|
/** Recorder cost for this execution only. */
|
|
167
196
|
recorder?: RuntimeExecutionRecorderMetrics;
|
|
168
197
|
/** Kind of work, optional name, and HTTP details. */
|
|
@@ -181,9 +210,21 @@ export type RuntimeExecutionState = {
|
|
|
181
210
|
/** Present when capture was degraded or the retained snapshot was evicted. */
|
|
182
211
|
capture?: {
|
|
183
212
|
completeness: 'partial' | 'unavailable';
|
|
184
|
-
reason: 'process_memory_budget' | 'long_lived_execution_budget' | 'retained_state_evicted' | 'attribution_invariant' | 'plan_disabled_after_attribution_invariant';
|
|
185
|
-
valuesDropped
|
|
186
|
-
eventsDropped
|
|
213
|
+
reason: 'process_memory_budget' | 'long_lived_execution_budget' | 'retained_state_evicted' | 'attribution_invariant' | 'plan_disabled_after_attribution_invariant' | 'values_off' | 'helpers_sparse' | 'value_observations_omitted' | 'open_execution_budget' | 'structural_events_truncated';
|
|
214
|
+
valuesDropped?: number;
|
|
215
|
+
eventsDropped?: number;
|
|
216
|
+
};
|
|
217
|
+
/** Exact browser compilation identity. Namespace for compact moduleIndex.planIndex. */
|
|
218
|
+
buildId?: string;
|
|
219
|
+
/** Successful prior executions linked by observed writes. */
|
|
220
|
+
historyLinks?: RuntimeHistoryLink[];
|
|
221
|
+
/** Honesty notes from the browser recorder (truncation, inferred attribution). */
|
|
222
|
+
notes?: string[];
|
|
223
|
+
/** Compact browser indices when functionId is a `moduleIndex.planIndex` id. */
|
|
224
|
+
browser?: {
|
|
225
|
+
/** Same exact compilation identity as runtime_state.buildId. */
|
|
226
|
+
buildId?: string;
|
|
227
|
+
degradation?: 'normal' | 'values-off' | 'helpers-sparse';
|
|
187
228
|
};
|
|
188
229
|
};
|
|
189
230
|
//# sourceMappingURL=runtime-execution-state-types.d.ts.map
|
|
@@ -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,
|
|
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,o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B,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;IACjB,+EAA+E;IAC/E,OAAO,CAAC,EAAE;QACT,gEAAgE;QAChE,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,QAAQ,GAAG,YAAY,GAAG,gBAAgB,CAAC;KACzD,CAAC;CACF,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,10 +2,11 @@ export { announceDeploy } from './announce-deploy/announce-deploy';
|
|
|
2
2
|
export { createClient } from './create-client/create-client';
|
|
3
3
|
export type { CaptureContext, RasputinClient, RasputinClientStats, RasputinOptions, } from './create-client/create-client-types';
|
|
4
4
|
export { isClientEnabled } from './create-client/is-client-enabled';
|
|
5
|
+
export { isLocalDsnPublicKey, parseDsn } from './create-client/parse-dsn';
|
|
5
6
|
export { resolveEndpointUrls } from './create-client/resolve-endpoint-urls';
|
|
6
7
|
export { createIngestEvent } from './create-ingest-event/create-ingest-event';
|
|
7
8
|
export type { RequestContext } from './create-ingest-event/create-ingest-event-types';
|
|
8
|
-
export type { RuntimeCaptureCoverage, RuntimeCaptureProfile, RuntimeExecutionEvent, RuntimeExecutionKind, RuntimeExecutionMetadata, RuntimeExecutionRecorderMetrics, RuntimeExecutionRequest, RuntimeExecutionState, RuntimeFunctionCallsSuppressedEvent, RuntimeFunctionEnterEvent, RuntimeFunctionExitEvent, RuntimeFunctionThrowEvent, RuntimeStateSizeTruncation, RuntimeThrowLocation, } from './create-ingest-event/runtime-execution-state-types';
|
|
9
|
+
export type { RuntimeAwaitedEvent, RuntimeCaptureCoverage, RuntimeCaptureProfile, RuntimeExecutionEvent, RuntimeExecutionKind, RuntimeExecutionMetadata, RuntimeExecutionRecorderMetrics, RuntimeExecutionRequest, RuntimeExecutionState, RuntimeExpressionObservedEvent, RuntimeFunctionCallsSuppressedEvent, RuntimeFunctionEnterEvent, RuntimeFunctionExitEvent, RuntimeFunctionThrowEvent, RuntimeHistoryLink, RuntimeProvenance, RuntimeStateSizeTruncation, RuntimeThrowLocation, } from './create-ingest-event/runtime-execution-state-types';
|
|
9
10
|
export { hashInstrumentationManifest } from './derivation/hash-instrumentation-manifest';
|
|
10
11
|
export { isRasputinTaggedValue, RASPUTIN_WIRE_TAG, type RasputinTaggedValue, rasputinOmitted, rasputinRedacted, rasputinTagKind, rasputinTruncated, rasputinUnavailable, rasputinUnknown, } from './derivation/rasputin-wire-tag';
|
|
11
12
|
export { defaultSensitivePropertyNames, propertyNameIsSensitive, } from './derivation/sensitive-property-name';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,YAAY,EACX,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,eAAe,GACf,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,YAAY,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACtF,YAAY,EACX,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,+BAA+B,E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B,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EACX,yBAAyB,EACzB,aAAa,EACb,cAAc,GACd,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACN,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,GAChB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,YAAY,EACX,wBAAwB,EACxB,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,uBAAuB,GACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,YAAY,EACX,sBAAsB,EACtB,SAAS,EACT,iBAAiB,EACjB,cAAc,GACd,MAAM,6BAA6B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -755,7 +755,7 @@ var resolveSourceMaps = async (frames) => {
|
|
|
755
755
|
|
|
756
756
|
// src/sdk-meta.ts
|
|
757
757
|
var SDK_NAME = "@rasputin-ai/core";
|
|
758
|
-
var SDK_VERSION = "0.
|
|
758
|
+
var SDK_VERSION = "0.6.0";
|
|
759
759
|
|
|
760
760
|
// src/suppression/identity-needs-message-template.ts
|
|
761
761
|
var identityNeedsMessageTemplate = (type, code) => {
|
|
@@ -764,8 +764,16 @@ var identityNeedsMessageTemplate = (type, code) => {
|
|
|
764
764
|
};
|
|
765
765
|
|
|
766
766
|
// src/suppression/parameterize-message.ts
|
|
767
|
-
import { isIP } from "node:net";
|
|
768
767
|
var MAX_INPUT_LENGTH = 8192;
|
|
768
|
+
var IPV4 = /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;
|
|
769
|
+
var isIpAddress = (value) => {
|
|
770
|
+
if (IPV4.test(value)) return true;
|
|
771
|
+
try {
|
|
772
|
+
return new URL(`http://[${value}]`).hostname.length > 2;
|
|
773
|
+
} catch {
|
|
774
|
+
return false;
|
|
775
|
+
}
|
|
776
|
+
};
|
|
769
777
|
var RULES = [
|
|
770
778
|
{
|
|
771
779
|
token: "email",
|
|
@@ -798,7 +806,7 @@ var RULES = [
|
|
|
798
806
|
{
|
|
799
807
|
token: "ip",
|
|
800
808
|
pattern: /\b(?:\d{1,3}\.){3}\d{1,3}\b|(?<![\w:])(?:[0-9a-f]{0,4}:){2,7}[0-9a-f]{0,4}(?![\w:])/giu,
|
|
801
|
-
validate:
|
|
809
|
+
validate: isIpAddress
|
|
802
810
|
},
|
|
803
811
|
{
|
|
804
812
|
token: "hash",
|
|
@@ -1755,16 +1763,48 @@ var detectRelease = (options = {}) => {
|
|
|
1755
1763
|
return void 0;
|
|
1756
1764
|
};
|
|
1757
1765
|
|
|
1766
|
+
// src/create-client/parse-dsn.ts
|
|
1767
|
+
var DSN_PUBLIC_KEY_PREFIX = "rdn_";
|
|
1768
|
+
var parseDsn = (value) => {
|
|
1769
|
+
const trimmed = typeof value === "string" ? value.trim() : "";
|
|
1770
|
+
if (!trimmed) return null;
|
|
1771
|
+
try {
|
|
1772
|
+
const url = new URL(trimmed);
|
|
1773
|
+
const publicKey = decodeURIComponent(url.username);
|
|
1774
|
+
if (!publicKey.startsWith(DSN_PUBLIC_KEY_PREFIX)) return null;
|
|
1775
|
+
if (!url.host) return null;
|
|
1776
|
+
const projectId = url.pathname.replace(/^\/+|\/+$/g, "").split("/")[0] ?? "";
|
|
1777
|
+
if (!projectId) return null;
|
|
1778
|
+
return {
|
|
1779
|
+
publicKey,
|
|
1780
|
+
apiUrl: `${url.protocol}//${url.host}`,
|
|
1781
|
+
projectId
|
|
1782
|
+
};
|
|
1783
|
+
} catch {
|
|
1784
|
+
return null;
|
|
1785
|
+
}
|
|
1786
|
+
};
|
|
1787
|
+
var isLocalDsnPublicKey = (publicKey) => publicKey === "rdn_local" || publicKey.endsWith("_local");
|
|
1788
|
+
|
|
1758
1789
|
// src/create-client/is-client-enabled.ts
|
|
1759
1790
|
var resolveClientActivation = (options) => {
|
|
1760
1791
|
if (options.enabled === false) return { enabled: false };
|
|
1792
|
+
const parsed = parseDsn(options.dsn);
|
|
1793
|
+
if (!parsed) return { enabled: false };
|
|
1761
1794
|
const projectApiKey = typeof options.projectApiKey === "string" ? options.projectApiKey.trim() : "";
|
|
1762
1795
|
if (!projectApiKey) return { enabled: false };
|
|
1763
1796
|
const explicit = typeof options.release === "string" ? options.release.trim() : "";
|
|
1764
1797
|
if (!explicit) return { enabled: false };
|
|
1765
1798
|
const release = detectRelease({ release: explicit });
|
|
1766
1799
|
if (!release) return { enabled: false };
|
|
1767
|
-
|
|
1800
|
+
const apiUrl = typeof options.apiUrl === "string" ? options.apiUrl.trim() : "";
|
|
1801
|
+
return {
|
|
1802
|
+
enabled: true,
|
|
1803
|
+
ingestToken: parsed.publicKey,
|
|
1804
|
+
projectApiKey,
|
|
1805
|
+
apiUrl: apiUrl || parsed.apiUrl,
|
|
1806
|
+
release
|
|
1807
|
+
};
|
|
1768
1808
|
};
|
|
1769
1809
|
var isClientEnabled = (options) => resolveClientActivation(options).enabled;
|
|
1770
1810
|
var noopClient = () => ({
|
|
@@ -1839,9 +1879,9 @@ var createClient = (options, hooks = {}) => {
|
|
|
1839
1879
|
try {
|
|
1840
1880
|
const activation = resolveClientActivation(options);
|
|
1841
1881
|
if (!activation.enabled) return noopClient();
|
|
1842
|
-
const { projectApiKey, release } = activation;
|
|
1882
|
+
const { ingestToken, projectApiKey, apiUrl, release } = activation;
|
|
1843
1883
|
const environment = options.environment;
|
|
1844
|
-
const { ingestUrl, deployUrl } = resolveEndpointUrls(
|
|
1884
|
+
const { ingestUrl, deployUrl } = resolveEndpointUrls(apiUrl);
|
|
1845
1885
|
const repoRoot = resolveRepoRoot(options);
|
|
1846
1886
|
if (repoRoot) warnIfSuspiciousRepoRoot(repoRoot);
|
|
1847
1887
|
const MAX_STACK_RESOLVE_CACHE = 32;
|
|
@@ -1872,7 +1912,7 @@ var createClient = (options, hooks = {}) => {
|
|
|
1872
1912
|
};
|
|
1873
1913
|
const transport = createTransport({
|
|
1874
1914
|
ingestUrl,
|
|
1875
|
-
projectApiKey,
|
|
1915
|
+
projectApiKey: ingestToken,
|
|
1876
1916
|
enabled: true,
|
|
1877
1917
|
fetch: hooks.fetch,
|
|
1878
1918
|
installSignalHandlers: hooks.installTransportSignalHandlers,
|
|
@@ -2246,10 +2286,12 @@ export {
|
|
|
2246
2286
|
foldSyntheticFrames,
|
|
2247
2287
|
hashInstrumentationManifest,
|
|
2248
2288
|
isClientEnabled,
|
|
2289
|
+
isLocalDsnPublicKey,
|
|
2249
2290
|
isRasputinHandleRunFrame,
|
|
2250
2291
|
isRasputinShellFrame,
|
|
2251
2292
|
isRasputinTaggedValue,
|
|
2252
2293
|
normalizeFrames,
|
|
2294
|
+
parseDsn,
|
|
2253
2295
|
parseStack,
|
|
2254
2296
|
propertyNameIsSensitive,
|
|
2255
2297
|
rasputinOmitted,
|
package/dist/sdk-meta.d.ts
CHANGED
|
@@ -25,6 +25,10 @@ export type RuntimeFunctionDefinition = {
|
|
|
25
25
|
* `parentCallId` on nearby events is still the store at enter time, not rewritten.
|
|
26
26
|
*/
|
|
27
27
|
parentAttribution?: 'pre_body_parameter_evaluation';
|
|
28
|
+
/** Compact browser emit indices. The build artifact owns the verbose identity. */
|
|
29
|
+
moduleIndex?: number;
|
|
30
|
+
planIndex?: number;
|
|
31
|
+
siteIndex?: number;
|
|
28
32
|
};
|
|
29
33
|
/**
|
|
30
34
|
* Describe a source file using deploy-stable package identity. Production images often omit the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-identity.d.ts","sourceRoot":"","sources":["../../src/source-identity/source-identity.ts"],"names":[],"mappings":"AAKA,8FAA8F;AAC9F,MAAM,MAAM,aAAa,GAAG;IAC3B,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,mBAAmB,EAAE,MAAM,CAAC;IAC5B,2FAA2F;IAC3F,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,oEAAoE;AACpE,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,8DAA8D;AAC9D,MAAM,MAAM,yBAAyB,GAAG;IACvC,uFAAuF;IACvF,UAAU,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"source-identity.d.ts","sourceRoot":"","sources":["../../src/source-identity/source-identity.ts"],"names":[],"mappings":"AAKA,8FAA8F;AAC9F,MAAM,MAAM,aAAa,GAAG;IAC3B,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,mBAAmB,EAAE,MAAM,CAAC;IAC5B,2FAA2F;IAC3F,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,oEAAoE;AACpE,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,8DAA8D;AAC9D,MAAM,MAAM,yBAAyB,GAAG;IACvC,uFAAuF;IACvF,UAAU,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,+BAA+B,CAAC;IACpD,kFAAkF;IAClF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAuDF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,KAAG,aAAa,GAAG,SAoBpE,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,QAAQ,aAAa,KAAG,MACI,CAAC;AAE9D,eAAO,MAAM,iBAAiB,GAC7B,YAAY,IAAI,CAAC,yBAAyB,EAAE,YAAY,CAAC,KACvD,MAUF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,QAAQ,aAAa,KAAG,MACN,CAAC;AAErD,eAAO,MAAM,wBAAwB,QAAO,IAE3C,CAAC"}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keep in sync with `packages/~core/lib/parameterize-message.ts` (minus logging).
|
|
3
|
+
* ⚠️ FINGERPRINT IDENTITY LOCKSTEP — message templates must match the server
|
|
4
|
+
* or generic-Error burst buckets split from server groups.
|
|
5
|
+
* SDK copy — no ~core dependency at publish time.
|
|
6
|
+
*/
|
|
1
7
|
export declare const parameterizeMessage: (rawMessage: string) => string;
|
|
2
8
|
//# sourceMappingURL=parameterize-message.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameterize-message.d.ts","sourceRoot":"","sources":["../../src/suppression/parameterize-message.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parameterize-message.d.ts","sourceRoot":"","sources":["../../src/suppression/parameterize-message.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA0FH,eAAO,MAAM,mBAAmB,GAAI,YAAY,MAAM,KAAG,MAyBxD,CAAC"}
|