@rasputin-ai/core 0.5.3 → 0.6.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/README.md +1 -1
- package/dist/create-client/create-client-types.d.ts +20 -11
- 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 +8 -0
- package/dist/create-client/parse-dsn.d.ts.map +1 -0
- package/dist/create-ingest-event/create-ingest-event-types.d.ts +1 -1
- package/dist/create-ingest-event/create-ingest-event-types.d.ts.map +1 -1
- package/dist/create-ingest-event/runtime-execution-state-types.d.ts +56 -21
- package/dist/create-ingest-event/runtime-execution-state-types.d.ts.map +1 -1
- package/dist/derivation/rasputin-wire-tag.d.ts +2 -1
- package/dist/derivation/rasputin-wire-tag.d.ts.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +54 -63
- package/dist/parse-release-sha.d.ts +2 -0
- package/dist/parse-release-sha.d.ts.map +1 -0
- package/dist/sdk-meta.d.ts +1 -1
- package/dist/source-identity/source-identity.d.ts +3 -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/dist/suppression/suppression-types.d.ts +1 -1
- package/dist/suppression/suppression-types.d.ts.map +1 -1
- package/package.json +1 -2
- package/dist/detect-release/detect-release.d.ts +0 -16
- package/dist/detect-release/detect-release.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
# Rasputin AI SDK — Core
|
|
2
2
|
|
|
3
|
-
Low-level error capture, stack parsing, source maps, and ingest transport. Most applications should use [
|
|
3
|
+
Low-level error capture, stack parsing, source maps, and ingest transport. Most applications should use [@rasputin-ai/node](https://www.npmjs.com/package/@rasputin-ai/node), [@rasputin-ai/elysia](https://www.npmjs.com/package/@rasputin-ai/elysia), or [@rasputin-ai/browser](https://www.npmjs.com/package/@rasputin-ai/browser) instead.
|
|
@@ -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
|
/**
|
|
@@ -18,18 +25,19 @@ type RasputinBaseOptions = {
|
|
|
18
25
|
* Git commit SHA for this deploy. Links errors to a release so you can see
|
|
19
26
|
* what shipped when something broke.
|
|
20
27
|
*
|
|
21
|
-
*
|
|
22
|
-
* `
|
|
28
|
+
* Pass the git commit SHA in `RasputinInit`. On common hosts you can use
|
|
29
|
+
* that platform's commit SHA variable instead of setting `RASPUTIN_RELEASE`:
|
|
30
|
+
* `release: process.env.VERCEL_GIT_COMMIT_SHA!`
|
|
23
31
|
*
|
|
24
|
-
* Empty
|
|
25
|
-
* blank API key. Must be 7–40 hex chars.
|
|
26
|
-
* through to `RASPUTIN_RELEASE`, platform vars, or `.git` HEAD.
|
|
32
|
+
* Empty, whitespace-only, or non-SHA values make the SDK fully inert — the
|
|
33
|
+
* same as a blank API key. Must be 7–40 hex chars.
|
|
27
34
|
*/
|
|
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,MAAM,CAAC;IAEZ;;;;OAIG;IACH,aAAa,EAAE,MAAM,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C,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,gBAiB1E,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,SAAS,uBAAuB,KAAG,OAC1B,CAAC;AAE1C,eAAO,MAAM,UAAU,QAAO,cA2B5B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type ParsedDsn = {
|
|
2
|
+
publicKey: string;
|
|
3
|
+
apiUrl: string;
|
|
4
|
+
projectId: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const parseDsn: (value: string | undefined) => ParsedDsn | null;
|
|
7
|
+
export declare const isLocalDsnPublicKey: (publicKey: string) => boolean;
|
|
8
|
+
//# 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":"AAEA,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"}
|
|
@@ -22,7 +22,7 @@ export type IngestEvent = {
|
|
|
22
22
|
environment: string;
|
|
23
23
|
origin: IngestOrigin;
|
|
24
24
|
/** Whether stack frames were source-map resolved before send. */
|
|
25
|
-
resolution
|
|
25
|
+
resolution: FrameResolution;
|
|
26
26
|
release: string;
|
|
27
27
|
request?: {
|
|
28
28
|
method?: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-ingest-event-types.d.ts","sourceRoot":"","sources":["../../src/create-ingest-event/create-ingest-event-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAE7E,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE/C,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAE3D,6DAA6D;AAC7D,MAAM,MAAM,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,wDAAwD;AACxD,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,YAAY,CAAC;IACrB,iEAAiE;IACjE,UAAU,
|
|
1
|
+
{"version":3,"file":"create-ingest-event-types.d.ts","sourceRoot":"","sources":["../../src/create-ingest-event/create-ingest-event-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAE7E,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE/C,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAE3D,6DAA6D;AAC7D,MAAM,MAAM,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,wDAAwD;AACxD,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,YAAY,CAAC;IACrB,iEAAiE;IACjE,UAAU,EAAE,eAAe,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE;QACT,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACvB,CAAC;IACF,8EAA8E;IAC9E,aAAa,CAAC,EAAE,qBAAqB,CAAC;CACtC,CAAC;AAEF,4FAA4F;AAC5F,MAAM,MAAM,cAAc,GAAG;IAC5B,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,eAAe,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,qBAAqB,CAAC;CACrC,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,15 @@ 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;
|
|
187
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[];
|
|
188
223
|
};
|
|
189
224
|
//# 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,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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CAAkC;IAClC,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"}
|
|
@@ -16,7 +16,7 @@ export type RasputinTaggedOmitted = readonly [typeof RASPUTIN_WIRE_TAG, 'omitted
|
|
|
16
16
|
/** A field hidden because its name matched a redaction rule. */
|
|
17
17
|
export type RasputinTaggedRedacted = readonly [typeof RASPUTIN_WIRE_TAG, 'redacted'];
|
|
18
18
|
/** A value that was cut short (too deep, too many keys, or too large). */
|
|
19
|
-
|
|
19
|
+
type RasputinTaggedTruncated = readonly [
|
|
20
20
|
typeof RASPUTIN_WIRE_TAG,
|
|
21
21
|
'truncated',
|
|
22
22
|
{
|
|
@@ -41,4 +41,5 @@ export declare const rasputinRedacted: () => RasputinTaggedRedacted;
|
|
|
41
41
|
export declare const rasputinTruncated: (payload: RasputinTaggedTruncated[2]) => RasputinTaggedTruncated;
|
|
42
42
|
export declare const isRasputinTaggedValue: (value: unknown) => value is RasputinTaggedValue;
|
|
43
43
|
export declare const rasputinTagKind: (value: unknown) => RasputinTaggedValue[1] | undefined;
|
|
44
|
+
export {};
|
|
44
45
|
//# sourceMappingURL=rasputin-wire-tag.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rasputin-wire-tag.d.ts","sourceRoot":"","sources":["../../src/derivation/rasputin-wire-tag.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAG,gBAAyB,CAAC;AAE3D,kFAAkF;AAClF,MAAM,MAAM,qBAAqB,GAAG,SAAS,CAAC,OAAO,iBAAiB,EAAE,SAAS,CAAC,CAAC;AACnF,0FAA0F;AAC1F,MAAM,MAAM,yBAAyB,GAAG,SAAS,CAAC,OAAO,iBAAiB,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;AACnG,oEAAoE;AACpE,MAAM,MAAM,qBAAqB,GAAG,SAAS,CAAC,OAAO,iBAAiB,EAAE,SAAS,CAAC,CAAC;AACnF,gEAAgE;AAChE,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAC,OAAO,iBAAiB,EAAE,UAAU,CAAC,CAAC;AACrF,0EAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"rasputin-wire-tag.d.ts","sourceRoot":"","sources":["../../src/derivation/rasputin-wire-tag.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAG,gBAAyB,CAAC;AAE3D,kFAAkF;AAClF,MAAM,MAAM,qBAAqB,GAAG,SAAS,CAAC,OAAO,iBAAiB,EAAE,SAAS,CAAC,CAAC;AACnF,0FAA0F;AAC1F,MAAM,MAAM,yBAAyB,GAAG,SAAS,CAAC,OAAO,iBAAiB,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;AACnG,oEAAoE;AACpE,MAAM,MAAM,qBAAqB,GAAG,SAAS,CAAC,OAAO,iBAAiB,EAAE,SAAS,CAAC,CAAC;AACnF,gEAAgE;AAChE,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAC,OAAO,iBAAiB,EAAE,UAAU,CAAC,CAAC;AACrF,0EAA0E;AAC1E,KAAK,uBAAuB,GAAG,SAAS;IACvC,OAAO,iBAAiB;IACxB,WAAW;IACX;QACC,uEAAuE;QACvE,MAAM,EAAE,MAAM,CAAC;QACf,4DAA4D;QAC5D,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,wCAAwC;QACxC,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,2CAA2C;QAC3C,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,4CAA4C;QAC5C,KAAK,CAAC,EAAE,OAAO,CAAC;KAChB;CACD,CAAC;AAEF,iFAAiF;AACjF,MAAM,MAAM,mBAAmB,GAC5B,qBAAqB,GACrB,yBAAyB,GACzB,qBAAqB,GACrB,sBAAsB,GACtB,uBAAuB,CAAC;AAE3B,eAAO,MAAM,eAAe,QAAO,qBAAuD,CAAC;AAE3F,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,KAAG,yBAIpD,CAAC;AAEF,eAAO,MAAM,eAAe,QAAO,qBAAuD,CAAC;AAE3F,eAAO,MAAM,gBAAgB,QAAO,sBAAyD,CAAC;AAE9F,eAAO,MAAM,iBAAiB,GAAI,SAAS,uBAAuB,CAAC,CAAC,CAAC,KAAG,uBAIvE,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,mBAU/D,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,OAAO,OAAO,KAAG,mBAAmB,CAAC,CAAC,CAAC,GAAG,SACtB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,19 +2,20 @@ 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';
|
|
12
|
-
export { detectRelease } from './detect-release/detect-release';
|
|
13
13
|
export type { InstrumentationArgIdentifier, InstrumentationManifestCallSite, InstrumentationManifestContent, InstrumentationManifestDestructure, InstrumentationManifestFunction, InstrumentationParamBinding, InstrumentationSkipReason, SourceVerification, SourceVerificationIssue, } from './instrumentation-manifest/instrumentation-manifest-types';
|
|
14
14
|
export { INSTRUMENTATION_MANIFEST_SCHEMA_VERSION } from './instrumentation-manifest/instrumentation-manifest-types';
|
|
15
15
|
export { uploadInstrumentationManifest } from './instrumentation-manifest/upload-instrumentation-manifest';
|
|
16
16
|
export type { Frame } from './normalize-frames/normalize-frames';
|
|
17
17
|
export { normalizeFrames } from './normalize-frames/normalize-frames';
|
|
18
|
+
export { parseReleaseSha } from './parse-release-sha';
|
|
18
19
|
export { foldSyntheticFrames, isRasputinHandleRunFrame, isRasputinShellFrame, } from './parse-stack/fold-synthetic-frames';
|
|
19
20
|
export { parseStack } from './parse-stack/parse-stack';
|
|
20
21
|
export type { RawFrame } from './parse-stack/raw-frame';
|
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,EAC/B,uBAAuB,EACvB,qBAAqB,EACrB,mCAAmC,EACnC,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,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,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.1";
|
|
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",
|
|
@@ -1694,77 +1702,58 @@ var createTransport = (options) => {
|
|
|
1694
1702
|
};
|
|
1695
1703
|
};
|
|
1696
1704
|
|
|
1697
|
-
// src/
|
|
1698
|
-
import { readFileSync as readFileSync2 } from "node:fs";
|
|
1699
|
-
import { join as join3 } from "node:path";
|
|
1700
|
-
var ENV_KEYS = [
|
|
1701
|
-
"RASPUTIN_RELEASE",
|
|
1702
|
-
"VERCEL_GIT_COMMIT_SHA",
|
|
1703
|
-
"RAILWAY_GIT_COMMIT_SHA",
|
|
1704
|
-
"RENDER_GIT_COMMIT",
|
|
1705
|
-
"COMMIT_REF",
|
|
1706
|
-
"CF_PAGES_COMMIT_SHA",
|
|
1707
|
-
"HEROKU_SLUG_COMMIT",
|
|
1708
|
-
"GIT_COMMIT",
|
|
1709
|
-
"COMMIT_SHA",
|
|
1710
|
-
"GIT_SHA"
|
|
1711
|
-
];
|
|
1705
|
+
// src/parse-release-sha.ts
|
|
1712
1706
|
var SHA_RE = /^[0-9a-f]{7,40}$/i;
|
|
1713
|
-
var
|
|
1714
|
-
|
|
1707
|
+
var parseReleaseSha = (release) => {
|
|
1708
|
+
const trimmed = release?.trim();
|
|
1709
|
+
if (!trimmed) return void 0;
|
|
1710
|
+
if (SHA_RE.test(trimmed)) return trimmed;
|
|
1715
1711
|
console.warn(
|
|
1716
|
-
`[rasputin] Ignoring invalid release
|
|
1712
|
+
`[rasputin] Ignoring invalid release: "${trimmed}". Expected a git commit SHA (7\u201340 hex characters).`
|
|
1717
1713
|
);
|
|
1714
|
+
return void 0;
|
|
1718
1715
|
};
|
|
1719
|
-
|
|
1716
|
+
|
|
1717
|
+
// src/create-client/parse-dsn.ts
|
|
1718
|
+
var DSN_PUBLIC_KEY_PREFIX = "rdn_";
|
|
1719
|
+
var parseDsn = (value) => {
|
|
1720
|
+
const trimmed = typeof value === "string" ? value.trim() : "";
|
|
1721
|
+
if (!trimmed) return null;
|
|
1720
1722
|
try {
|
|
1721
|
-
const
|
|
1722
|
-
const
|
|
1723
|
-
if (
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
}
|
|
1723
|
+
const url = new URL(trimmed);
|
|
1724
|
+
const publicKey = decodeURIComponent(url.username);
|
|
1725
|
+
if (!publicKey.startsWith(DSN_PUBLIC_KEY_PREFIX)) return null;
|
|
1726
|
+
if (!url.host) return null;
|
|
1727
|
+
const projectId = url.pathname.replace(/^\/+|\/+$/g, "").split("/")[0] ?? "";
|
|
1728
|
+
if (!projectId) return null;
|
|
1729
|
+
return {
|
|
1730
|
+
publicKey,
|
|
1731
|
+
apiUrl: `${url.protocol}//${url.host}`,
|
|
1732
|
+
projectId
|
|
1733
|
+
};
|
|
1733
1734
|
} catch {
|
|
1734
|
-
return
|
|
1735
|
-
}
|
|
1736
|
-
};
|
|
1737
|
-
var detectRelease = (options = {}) => {
|
|
1738
|
-
const explicit = options.release?.trim();
|
|
1739
|
-
if (explicit) {
|
|
1740
|
-
if (isSha(explicit)) return explicit;
|
|
1741
|
-
warnInvalid("release option", explicit);
|
|
1742
|
-
}
|
|
1743
|
-
const env = options.env ?? process.env;
|
|
1744
|
-
for (const key of ENV_KEYS) {
|
|
1745
|
-
const value = env[key]?.trim();
|
|
1746
|
-
if (!value) continue;
|
|
1747
|
-
if (isSha(value)) return value;
|
|
1748
|
-
warnInvalid(key, value);
|
|
1735
|
+
return null;
|
|
1749
1736
|
}
|
|
1750
|
-
const fromGit = readGitHead(options.cwd ?? process.cwd());
|
|
1751
|
-
if (fromGit) return fromGit;
|
|
1752
|
-
console.warn(
|
|
1753
|
-
"[rasputin] No release detected. Set `RASPUTIN_RELEASE` to your git commit SHA, pass `release` in RasputinInit, or deploy on a platform that exposes a commit SHA env var (e.g. VERCEL_GIT_COMMIT_SHA). Events are not sent without a release."
|
|
1754
|
-
);
|
|
1755
|
-
return void 0;
|
|
1756
1737
|
};
|
|
1738
|
+
var isLocalDsnPublicKey = (publicKey) => publicKey === "rdn_local" || publicKey.endsWith("_local");
|
|
1757
1739
|
|
|
1758
1740
|
// src/create-client/is-client-enabled.ts
|
|
1759
1741
|
var resolveClientActivation = (options) => {
|
|
1760
1742
|
if (options.enabled === false) return { enabled: false };
|
|
1743
|
+
const parsed = parseDsn(options.dsn);
|
|
1744
|
+
if (!parsed) return { enabled: false };
|
|
1761
1745
|
const projectApiKey = typeof options.projectApiKey === "string" ? options.projectApiKey.trim() : "";
|
|
1762
1746
|
if (!projectApiKey) return { enabled: false };
|
|
1763
|
-
const
|
|
1764
|
-
if (!explicit) return { enabled: false };
|
|
1765
|
-
const release = detectRelease({ release: explicit });
|
|
1747
|
+
const release = parseReleaseSha(options.release);
|
|
1766
1748
|
if (!release) return { enabled: false };
|
|
1767
|
-
|
|
1749
|
+
const apiUrl = typeof options.apiUrl === "string" ? options.apiUrl.trim() : "";
|
|
1750
|
+
return {
|
|
1751
|
+
enabled: true,
|
|
1752
|
+
ingestToken: parsed.publicKey,
|
|
1753
|
+
projectApiKey,
|
|
1754
|
+
apiUrl: apiUrl || parsed.apiUrl,
|
|
1755
|
+
release
|
|
1756
|
+
};
|
|
1768
1757
|
};
|
|
1769
1758
|
var isClientEnabled = (options) => resolveClientActivation(options).enabled;
|
|
1770
1759
|
var noopClient = () => ({
|
|
@@ -1839,9 +1828,9 @@ var createClient = (options, hooks = {}) => {
|
|
|
1839
1828
|
try {
|
|
1840
1829
|
const activation = resolveClientActivation(options);
|
|
1841
1830
|
if (!activation.enabled) return noopClient();
|
|
1842
|
-
const { projectApiKey, release } = activation;
|
|
1831
|
+
const { ingestToken, projectApiKey, apiUrl, release } = activation;
|
|
1843
1832
|
const environment = options.environment;
|
|
1844
|
-
const { ingestUrl, deployUrl } = resolveEndpointUrls(
|
|
1833
|
+
const { ingestUrl, deployUrl } = resolveEndpointUrls(apiUrl);
|
|
1845
1834
|
const repoRoot = resolveRepoRoot(options);
|
|
1846
1835
|
if (repoRoot) warnIfSuspiciousRepoRoot(repoRoot);
|
|
1847
1836
|
const MAX_STACK_RESOLVE_CACHE = 32;
|
|
@@ -1872,7 +1861,7 @@ var createClient = (options, hooks = {}) => {
|
|
|
1872
1861
|
};
|
|
1873
1862
|
const transport = createTransport({
|
|
1874
1863
|
ingestUrl,
|
|
1875
|
-
projectApiKey,
|
|
1864
|
+
projectApiKey: ingestToken,
|
|
1876
1865
|
enabled: true,
|
|
1877
1866
|
fetch: hooks.fetch,
|
|
1878
1867
|
installSignalHandlers: hooks.installTransportSignalHandlers,
|
|
@@ -2242,14 +2231,16 @@ export {
|
|
|
2242
2231
|
createSuppression,
|
|
2243
2232
|
createTransport,
|
|
2244
2233
|
defaultSensitivePropertyNames,
|
|
2245
|
-
detectRelease,
|
|
2246
2234
|
foldSyntheticFrames,
|
|
2247
2235
|
hashInstrumentationManifest,
|
|
2248
2236
|
isClientEnabled,
|
|
2237
|
+
isLocalDsnPublicKey,
|
|
2249
2238
|
isRasputinHandleRunFrame,
|
|
2250
2239
|
isRasputinShellFrame,
|
|
2251
2240
|
isRasputinTaggedValue,
|
|
2252
2241
|
normalizeFrames,
|
|
2242
|
+
parseDsn,
|
|
2243
|
+
parseReleaseSha,
|
|
2253
2244
|
parseStack,
|
|
2254
2245
|
propertyNameIsSensitive,
|
|
2255
2246
|
rasputinOmitted,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-release-sha.d.ts","sourceRoot":"","sources":["../src/parse-release-sha.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,KAAG,MAAM,GAAG,SAS3D,CAAC"}
|
package/dist/sdk-meta.d.ts
CHANGED
|
@@ -25,6 +25,9 @@ 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;
|
|
28
31
|
};
|
|
29
32
|
/**
|
|
30
33
|
* 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;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"}
|
|
@@ -12,7 +12,7 @@ export type IngestSummary = {
|
|
|
12
12
|
code?: string | null;
|
|
13
13
|
environment: string;
|
|
14
14
|
origin: IngestOrigin;
|
|
15
|
-
resolution
|
|
15
|
+
resolution: FrameResolution;
|
|
16
16
|
release: string;
|
|
17
17
|
};
|
|
18
18
|
export type SummaryIdentity = Pick<IngestSummary, 'type' | 'message' | 'stack_frames' | 'origin' | 'code' | 'resolution'>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suppression-types.d.ts","sourceRoot":"","sources":["../../src/suppression/suppression-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,kFAAkF;AAClF,MAAM,MAAM,aAAa,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,
|
|
1
|
+
{"version":3,"file":"suppression-types.d.ts","sourceRoot":"","sources":["../../src/suppression/suppression-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,kFAAkF;AAClF,MAAM,MAAM,aAAa,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,EAAE,eAAe,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,IAAI,CACjC,aAAa,EACb,MAAM,GAAG,SAAS,GAAG,cAAc,GAAG,QAAQ,GAAG,MAAM,GAAG,YAAY,CACtE,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,kFAAkF;IAClF,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,kCAAkC;IAClC,GAAG,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAChC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,CAAA;CAAE,GAChD;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,CAAC;AAE1B,MAAM,MAAM,wBAAwB,GAAG;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+EAA+E;IAC/E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mFAAmF;IACnF,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAClC,GAAG,EAAE,QAAQ,EAAE,KACX,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,cAAc,GAAG,YAAY,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rasputin-ai/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Core error capture, stack parsing, and ingest transport for Rasputin AI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
"@sinclair/typebox": "0.34.49",
|
|
31
31
|
"@types/bun": "1.3.14",
|
|
32
32
|
"@types/node": "22.13.10",
|
|
33
|
-
"esbuild": "0.25.12",
|
|
34
33
|
"typescript": "5"
|
|
35
34
|
},
|
|
36
35
|
"dependencies": {
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
type DetectReleaseOptions = {
|
|
2
|
-
/** Explicit release (e.g. from RasputinInit). Wins over env when a valid SHA. */
|
|
3
|
-
release?: string;
|
|
4
|
-
/** Defaults to `process.env` — override in tests. */
|
|
5
|
-
env?: Record<string, string | undefined>;
|
|
6
|
-
/** Directory to probe for `.git` — defaults to `process.cwd()`. Override in tests. */
|
|
7
|
-
cwd?: string;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Resolve the deploy release / commit SHA.
|
|
11
|
-
* Order: explicit option → `RASPUTIN_RELEASE` / platform env → `.git` HEAD → undefined (warns).
|
|
12
|
-
* Non-SHA values are skipped with a warning so ancestry checks never see `v1.2.3` or branch names.
|
|
13
|
-
*/
|
|
14
|
-
export declare const detectRelease: (options?: DetectReleaseOptions) => string | undefined;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=detect-release.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"detect-release.d.ts","sourceRoot":"","sources":["../../src/detect-release/detect-release.ts"],"names":[],"mappings":"AAGA,KAAK,oBAAoB,GAAG;IAC3B,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC,sFAAsF;IACtF,GAAG,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAkDF;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,UAAS,oBAAyB,KAAG,MAAM,GAAG,SAyB3E,CAAC"}
|