@rasputin-ai/core 0.5.0-alpha.9 → 0.5.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 +3 -3
- package/dist/announce-deploy/announce-deploy.d.ts +2 -2
- package/dist/announce-deploy/announce-deploy.d.ts.map +1 -1
- package/dist/create-client/create-client-types.d.ts +23 -8
- package/dist/create-client/create-client-types.d.ts.map +1 -1
- package/dist/create-client/create-client.d.ts.map +1 -1
- package/dist/create-client/is-client-enabled.d.ts +17 -3
- package/dist/create-client/is-client-enabled.d.ts.map +1 -1
- package/dist/create-ingest-event/create-ingest-event-types.d.ts +4 -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 +104 -43
- package/dist/create-ingest-event/runtime-execution-state-types.d.ts.map +1 -1
- package/dist/derivation/canonical-json.d.ts +0 -1
- package/dist/derivation/canonical-json.d.ts.map +1 -1
- package/dist/derivation/hash-instrumentation-manifest.d.ts +2 -2
- package/dist/derivation/hash-instrumentation-manifest.d.ts.map +1 -1
- package/dist/derivation/rasputin-wire-tag.d.ts +14 -2
- package/dist/derivation/rasputin-wire-tag.d.ts.map +1 -1
- package/dist/derivation/sensitive-property-name.d.ts +3 -0
- package/dist/derivation/sensitive-property-name.d.ts.map +1 -0
- package/dist/derivation/sha256.d.ts +0 -1
- package/dist/derivation/sha256.d.ts.map +1 -1
- package/dist/index.d.ts +4 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +860 -1238
- package/dist/instrumentation-manifest/instrumentation-manifest-types.d.ts +26 -2
- package/dist/instrumentation-manifest/instrumentation-manifest-types.d.ts.map +1 -1
- package/dist/instrumentation-manifest/upload-instrumentation-manifest.d.ts +1 -0
- package/dist/instrumentation-manifest/upload-instrumentation-manifest.d.ts.map +1 -1
- package/dist/normalize-frames/normalize-frames.d.ts.map +1 -1
- package/dist/parse-stack/fold-synthetic-frames.d.ts +15 -0
- package/dist/parse-stack/fold-synthetic-frames.d.ts.map +1 -0
- package/dist/resolve-source-maps/resolve-source-maps.d.ts.map +1 -1
- package/dist/sdk-meta.d.ts +1 -1
- package/dist/sdk-meta.d.ts.map +1 -1
- package/dist/source-identity/source-identity.d.ts +14 -1
- package/dist/source-identity/source-identity.d.ts.map +1 -1
- package/dist/suppression/create-suppression.d.ts.map +1 -1
- package/dist/suppression/suppression-types.d.ts +2 -0
- package/dist/suppression/suppression-types.d.ts.map +1 -1
- package/dist/transport/create-transport.d.ts.map +1 -1
- package/dist/transport/node-http-fetch.d.ts +3 -0
- package/dist/transport/node-http-fetch.d.ts.map +1 -0
- package/dist/transport/process-shutdown-hooks.d.ts +8 -0
- package/dist/transport/process-shutdown-hooks.d.ts.map +1 -0
- package/dist/transport/send-batch.d.ts +1 -0
- package/dist/transport/send-batch.d.ts.map +1 -1
- package/dist/transport/transport-queue.d.ts +2 -1
- package/dist/transport/transport-queue.d.ts.map +1 -1
- package/dist/transport/transport-types.d.ts +36 -11
- package/dist/transport/transport-types.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/derivation/captured-value-markers.d.ts +0 -5
- package/dist/derivation/captured-value-markers.d.ts.map +0 -1
- package/dist/derivation/evaluate-derivation-plan.d.ts +0 -53
- package/dist/derivation/evaluate-derivation-plan.d.ts.map +0 -1
- package/dist/derivation/wire-values-equal.d.ts +0 -3
- package/dist/derivation/wire-values-equal.d.ts.map +0 -1
- package/dist/instrumentation-manifest/derivation-plan-types.d.ts +0 -142
- package/dist/instrumentation-manifest/derivation-plan-types.d.ts.map +0 -1
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* ⚠️ DERIVATION LOCKSTEP — manifest schema must match the server.
|
|
6
6
|
*/
|
|
7
7
|
import type { SourcePosition } from '../source-identity/source-identity';
|
|
8
|
-
import type { DerivationPlan } from './derivation-plan-types';
|
|
9
8
|
export declare const INSTRUMENTATION_MANIFEST_SCHEMA_VERSION = 3;
|
|
10
9
|
export type InstrumentationParamBinding = {
|
|
11
10
|
kind: 'identifier';
|
|
@@ -48,7 +47,10 @@ export type InstrumentationManifestFunction = {
|
|
|
48
47
|
endLine: number;
|
|
49
48
|
endColumn: number;
|
|
50
49
|
params: InstrumentationParamBinding[];
|
|
50
|
+
instrumented?: boolean;
|
|
51
|
+
skipReason?: InstrumentationSkipReason;
|
|
51
52
|
};
|
|
53
|
+
export type InstrumentationSkipReason = 'direct_eval' | 'unsupported_for_await' | 'await_using' | 'unsupported_async_generator' | 'unsupported_sync_generator' | 'unsupported_constructor' | 'unknown_suspension' | 'verification_failed' | 'parameter_rebinding' | 'arguments_binding';
|
|
52
54
|
export type InstrumentationManifestCallSite = {
|
|
53
55
|
id: string;
|
|
54
56
|
callerFunctionId: string;
|
|
@@ -70,20 +72,43 @@ export type InstrumentationManifestDestructure = {
|
|
|
70
72
|
column: number;
|
|
71
73
|
binding: InstrumentationParamBinding;
|
|
72
74
|
};
|
|
75
|
+
/** One instrumented file that could not be matched to the Git release. */
|
|
73
76
|
export type SourceVerificationIssue = {
|
|
77
|
+
/** `name` from that file's package, when known. */
|
|
74
78
|
packageName?: string;
|
|
79
|
+
/** Path of the file inside that package. */
|
|
75
80
|
packageRelativePath: string;
|
|
81
|
+
/**
|
|
82
|
+
* `not_found` — no matching file in the release.
|
|
83
|
+
* `ambiguous` — more than one possible file; set `sourceRoot` or `sourceRoots`.
|
|
84
|
+
* `invalid_mapping` — `sourceRoot` / `sourceRoots` does not match the repo.
|
|
85
|
+
* `github_unavailable` — Rasputin could not read the release from GitHub.
|
|
86
|
+
*/
|
|
76
87
|
reason: 'not_found' | 'ambiguous' | 'invalid_mapping' | 'github_unavailable';
|
|
88
|
+
/** Other matching paths, when `reason` is `ambiguous`. */
|
|
77
89
|
candidates?: string[];
|
|
78
90
|
};
|
|
79
91
|
type SourcePackageMapping = {
|
|
80
92
|
packageName?: string;
|
|
81
93
|
repositoryRoot: string;
|
|
82
94
|
};
|
|
95
|
+
/**
|
|
96
|
+
* Result of `verifyConfiguration()`: whether every recorded source file maps to
|
|
97
|
+
* exactly one file in the Git commit you set as `release`.
|
|
98
|
+
*/
|
|
83
99
|
export type SourceVerification = {
|
|
100
|
+
/**
|
|
101
|
+
* `verified` — every file mapped uniquely.
|
|
102
|
+
* `partial` — some files mapped, some did not.
|
|
103
|
+
* `ambiguous` — at least one file matched more than one path.
|
|
104
|
+
* `unavailable` — Rasputin could not check GitHub.
|
|
105
|
+
*/
|
|
84
106
|
status: 'verified' | 'partial' | 'ambiguous' | 'unavailable';
|
|
107
|
+
/** How many files mapped uniquely. */
|
|
85
108
|
verified: number;
|
|
109
|
+
/** Files that did not map, with the reason. */
|
|
86
110
|
unresolved: SourceVerificationIssue[];
|
|
111
|
+
/** Package-to-folder mappings that were used. */
|
|
87
112
|
packages?: SourcePackageMapping[];
|
|
88
113
|
};
|
|
89
114
|
export type InstrumentationManifestContent = {
|
|
@@ -96,7 +121,6 @@ export type InstrumentationManifestContent = {
|
|
|
96
121
|
functions: InstrumentationManifestFunction[];
|
|
97
122
|
callSites: InstrumentationManifestCallSite[];
|
|
98
123
|
destructures: InstrumentationManifestDestructure[];
|
|
99
|
-
derivationPlans: DerivationPlan[];
|
|
100
124
|
};
|
|
101
125
|
export {};
|
|
102
126
|
//# sourceMappingURL=instrumentation-manifest-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation-manifest-types.d.ts","sourceRoot":"","sources":["../../src/instrumentation-manifest/instrumentation-manifest-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentation-manifest-types.d.ts","sourceRoot":"","sources":["../../src/instrumentation-manifest/instrumentation-manifest-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE,eAAO,MAAM,uCAA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AG;IAChC;;;;;OAKG;IACH,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,CAAC;IAC7D,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,+CAA+C;IAC/C,UAAU,EAAE,uBAAuB,EAAE,CAAC;IACtC,iDAAiD;IACjD,QAAQ,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IAC5C,cAAc,EAAE,OAAO,uCAAuC,CAAC;IAC/D,WAAW,CAAC,EAAE;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACjC,CAAC;IACF,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,SAAS,EAAE,+BAA+B,EAAE,CAAC;IAC7C,SAAS,EAAE,+BAA+B,EAAE,CAAC;IAC7C,YAAY,EAAE,kCAAkC,EAAE,CAAC;CACnD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-instrumentation-manifest.d.ts","sourceRoot":"","sources":["../../src/instrumentation-manifest/upload-instrumentation-manifest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"upload-instrumentation-manifest.d.ts","sourceRoot":"","sources":["../../src/instrumentation-manifest/upload-instrumentation-manifest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EACX,8BAA8B,EAC9B,kBAAkB,EAClB,MAAM,kCAAkC,CAAC;AAE1C,KAAK,oCAAoC,GAAG;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,8BAA8B,CAAC;IACzC,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,MAAM,CAAC,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,GACzC,SAAS,oCAAoC,KAC3C,OAAO,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,YAAY,EAAE,kBAAkB,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAA;CAAE,CAyBxE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-frames.d.ts","sourceRoot":"","sources":["../../src/normalize-frames/normalize-frames.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"normalize-frames.d.ts","sourceRoot":"","sources":["../../src/normalize-frames/normalize-frames.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EACN,KAAK,cAAc,EAGnB,MAAM,oCAAoC,CAAC;AAE5C,KAAK,sBAAsB,GAAG;IAC7B,iGAAiG;IACjG,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IACnB,SAAS,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5D,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,cAAc,CAAC;CACxB,CAAC;AA4DF,kGAAkG;AAClG,eAAO,MAAM,eAAe,GAC3B,QAAQ,aAAa,EAAE,EACvB,SAAS,sBAAsB,KAC7B,KAAK,EAoDP,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drop only frames Rasputin can name as its own. Customer functions named
|
|
3
|
+
* `run` / `Object.run` stay. Raw `error.stack` may still show `__rasputinShell__`.
|
|
4
|
+
*/
|
|
5
|
+
export type FoldableFrame = {
|
|
6
|
+
function?: string;
|
|
7
|
+
file?: string;
|
|
8
|
+
generated?: {
|
|
9
|
+
file: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare const isRasputinShellFrame: (name: string | undefined) => boolean;
|
|
13
|
+
export declare const isRasputinHandleRunFrame: (name: string | undefined) => boolean;
|
|
14
|
+
export declare const foldSyntheticFrames: <T extends FoldableFrame>(frames: readonly T[]) => T[];
|
|
15
|
+
//# sourceMappingURL=fold-synthetic-frames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fold-synthetic-frames.d.ts","sourceRoot":"","sources":["../../src/parse-stack/fold-synthetic-frames.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7B,CAAC;AAgBF,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,GAAG,SAAS,KAAG,OACqB,CAAC;AAEtF,eAAO,MAAM,wBAAwB,GAAI,MAAM,MAAM,GAAG,SAAS,KAAG,OACsB,CAAC;AAoB3F,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,aAAa,EAAE,QAAQ,SAAS,CAAC,EAAE,KAAG,CAAC,EAKpF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-source-maps.d.ts","sourceRoot":"","sources":["../../src/resolve-source-maps/resolve-source-maps.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAiB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"resolve-source-maps.d.ts","sourceRoot":"","sources":["../../src/resolve-source-maps/resolve-source-maps.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAiB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAwK/E,iFAAiF;AACjF,eAAO,MAAM,iBAAiB,GAAU,QAAQ,QAAQ,EAAE,KAAG,OAAO,CAAC,uBAAuB,CAW3F,CAAC;AAEF,qDAAqD;AACrD,eAAO,MAAM,mBAAmB,YAE/B,CAAC"}
|
package/dist/sdk-meta.d.ts
CHANGED
package/dist/sdk-meta.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-meta.d.ts","sourceRoot":"","sources":["../src/sdk-meta.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,eAAO,MAAM,QAAQ,sBAAsB,CAAC;AAC5C,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"sdk-meta.d.ts","sourceRoot":"","sources":["../src/sdk-meta.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,eAAO,MAAM,QAAQ,sBAAsB,CAAC;AAC5C,eAAO,MAAM,WAAW,UAAU,CAAC"}
|
|
@@ -1,17 +1,30 @@
|
|
|
1
|
+
/** Where a recorded file lives in your package, without using a container filesystem path. */
|
|
1
2
|
export type SourceLocator = {
|
|
3
|
+
/** `name` from the nearest `package.json`, when Rasputin can read one. */
|
|
2
4
|
packageName?: string;
|
|
5
|
+
/** Path of the file inside that package, such as `src/checkout.ts`. */
|
|
3
6
|
packageRelativePath: string;
|
|
4
|
-
/**
|
|
7
|
+
/** Path in the Git repo after Rasputin has matched this file to the configured release. */
|
|
5
8
|
repositoryPath?: string;
|
|
6
9
|
};
|
|
10
|
+
/** A location in source: the file plus optional line and column. */
|
|
7
11
|
export type SourcePosition = SourceLocator & {
|
|
8
12
|
line?: number;
|
|
9
13
|
column?: number;
|
|
10
14
|
};
|
|
15
|
+
/** One function that ran during a recorded request or job. */
|
|
11
16
|
export type RuntimeFunctionDefinition = {
|
|
17
|
+
/** Stable id used by call events so the function's name and source are stored once. */
|
|
12
18
|
functionId: string;
|
|
19
|
+
/** Function name as written in source, or `(anonymous)` when it has none. */
|
|
13
20
|
name: string;
|
|
21
|
+
/** File and position of the function, when that can be resolved. */
|
|
14
22
|
source?: SourcePosition;
|
|
23
|
+
/**
|
|
24
|
+
* Present when parameter initializers may run before recorder entry.
|
|
25
|
+
* `parentCallId` on nearby events is still the store at enter time, not rewritten.
|
|
26
|
+
*/
|
|
27
|
+
parentAttribution?: 'pre_body_parameter_evaluation';
|
|
15
28
|
};
|
|
16
29
|
/**
|
|
17
30
|
* 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,MAAM,MAAM,aAAa,GAAG;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,
|
|
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;CACpD,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-suppression.d.ts","sourceRoot":"","sources":["../../src/suppression/create-suppression.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EACX,wBAAwB,EACxB,aAAa,EACb,oBAAoB,EAEpB,sBAAsB,EACtB,uBAAuB,EACvB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"create-suppression.d.ts","sourceRoot":"","sources":["../../src/suppression/create-suppression.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EACX,wBAAwB,EACxB,aAAa,EACb,oBAAoB,EAEpB,sBAAsB,EACtB,uBAAuB,EACvB,MAAM,qBAAqB,CAAC;AA0C7B;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAS,wBAA6B;oBA0DhD,sBAAsB,KAAG,uBAAuB;sCAgEpE;QAAE,OAAO,EAAE,aAAa,CAAC;QAAC,SAAS,EAAE,QAAQ,EAAE,CAAA;KAAE,EAAE;mDAsBpC,oBAAoB,KACnC,OAAO,CAAC,aAAa,EAAE,CAAC;IA0B1B,oDAAoD;;CAGrD,CAAC"}
|
|
@@ -41,6 +41,8 @@ export type CreateSuppressionOptions = {
|
|
|
41
41
|
capPerWindow?: number;
|
|
42
42
|
/** LRU cap on in-process burst buckets (burstKey), not server fingerprints. */
|
|
43
43
|
maxBurstBuckets?: number;
|
|
44
|
+
/** Cap on drained-but-not-yet-sent window summaries. Oldest drafts are dropped. */
|
|
45
|
+
maxPendingSummaries?: number;
|
|
44
46
|
};
|
|
45
47
|
export type PrepareSummaryFrames = (raw: RawFrame[]) => Promise<Pick<SummaryIdentity, 'stack_frames' | 'resolution'>>;
|
|
46
48
|
//# sourceMappingURL=suppression-types.d.ts.map
|
|
@@ -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,CAA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AM,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-transport.d.ts","sourceRoot":"","sources":["../../src/transport/create-transport.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-transport.d.ts","sourceRoot":"","sources":["../../src/transport/create-transport.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,sBAAsB,EAAe,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAuBxF,eAAO,MAAM,eAAe,GAAI,SAAS,sBAAsB,KAAG,SAwXjE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-http-fetch.d.ts","sourceRoot":"","sources":["../../src/transport/node-http-fetch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAuFxD,eAAO,MAAM,kBAAkB,QAAO,cACkB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type ProcessShutdownParticipant = {
|
|
2
|
+
onBeforeExit: () => void;
|
|
3
|
+
onSignal: () => Promise<void>;
|
|
4
|
+
dropRemaining: () => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const registerProcessShutdownHooks: (participant: ProcessShutdownParticipant) => (() => void);
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=process-shutdown-hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-shutdown-hooks.d.ts","sourceRoot":"","sources":["../../src/transport/process-shutdown-hooks.ts"],"names":[],"mappings":"AA4BA,KAAK,0BAA0B,GAAG;IACjC,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,aAAa,EAAE,MAAM,IAAI,CAAC;CAC1B,CAAC;AA8BF,eAAO,MAAM,4BAA4B,GACxC,aAAa,0BAA0B,KACrC,CAAC,MAAM,IAAI,CAiBb,CAAC"}
|
|
@@ -13,6 +13,7 @@ type SendBatchOptions = {
|
|
|
13
13
|
maxRetries: number;
|
|
14
14
|
fetch: TransportFetch;
|
|
15
15
|
signal?: AbortSignal;
|
|
16
|
+
requestTimeoutMs?: number;
|
|
16
17
|
};
|
|
17
18
|
export type SendBatchFailureKind = 'aborted' | 'network_error' | 'rate_limited' | 'server_error' | 'non_retryable_http';
|
|
18
19
|
export type SendBatchResult = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-batch.d.ts","sourceRoot":"","sources":["../../src/transport/send-batch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"send-batch.d.ts","sourceRoot":"","sources":["../../src/transport/send-batch.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAC;AACpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,KAAK,gBAAgB,GAAG;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,SAAS,CAAC,EAAE,aAAa,EAAE,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,cAAc,CAAC;IACtB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAC7B,SAAS,GACT,eAAe,GACf,cAAc,GACd,cAAc,GACd,oBAAoB,CAAC;AAExB,MAAM,MAAM,eAAe,GAAG;IAC7B,OAAO,EAAE,IAAI,GAAG,SAAS,GAAG,QAAQ,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACzC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC;AA6DF,iGAAiG;AACjG,eAAO,MAAM,SAAS,GAAU,SAAS,gBAAgB,KAAG,OAAO,CAAC,eAAe,CA+GlF,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { QueuedEvent } from './transport-types';
|
|
2
2
|
/** Bounded queue — drops lower-priority items first when full. */
|
|
3
|
-
export declare const createQueue: (maxSize: number) => {
|
|
3
|
+
export declare const createQueue: (maxSize: number, maxBytes?: number) => {
|
|
4
4
|
enqueue: (item: QueuedEvent) => void;
|
|
5
5
|
drain: (count: number) => QueuedEvent[];
|
|
6
|
+
setReservedBytes: (bytes: number) => void;
|
|
6
7
|
size: () => number;
|
|
7
8
|
getStats: () => {
|
|
8
9
|
queued: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport-queue.d.ts","sourceRoot":"","sources":["../../src/transport/transport-queue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAqB,MAAM,mBAAmB,CAAC;AAQxE,kEAAkE;AAClE,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM;
|
|
1
|
+
{"version":3,"file":"transport-queue.d.ts","sourceRoot":"","sources":["../../src/transport/transport-queue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAqB,MAAM,mBAAmB,CAAC;AAQxE,kEAAkE;AAClE,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,EAAE,iBAA0B;oBAkD/C,WAAW;mBA2BZ,MAAM,KAAG,WAAW,EAAE;8BAUjB,MAAM;;;;;;;;;;CAiBjC,CAAC"}
|
|
@@ -13,12 +13,14 @@ export type QueuedEvent = {
|
|
|
13
13
|
priority: 'first' | 'repeat';
|
|
14
14
|
/** Generated frames for flush-time source-map resolution. */
|
|
15
15
|
rawFrames: RawFrame[];
|
|
16
|
+
encodedBytes?: number;
|
|
16
17
|
} | {
|
|
17
18
|
kind: 'summary';
|
|
18
19
|
summary: IngestSummary;
|
|
19
20
|
priority: 'summary';
|
|
20
21
|
/** Same capture-time frames as the exemplar — remapped at send. */
|
|
21
22
|
rawFrames: RawFrame[];
|
|
23
|
+
encodedBytes?: number;
|
|
22
24
|
};
|
|
23
25
|
export type TransportFetch = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
24
26
|
type PrepareQueuedEvent = (item: {
|
|
@@ -26,33 +28,46 @@ type PrepareQueuedEvent = (item: {
|
|
|
26
28
|
rawFrames: RawFrame[];
|
|
27
29
|
}) => Promise<IngestEvent>;
|
|
28
30
|
export type TransportStats = {
|
|
31
|
+
/** Events waiting to be sent right now. */
|
|
29
32
|
queued: number;
|
|
33
|
+
/** Events accepted into the queue since this process started. */
|
|
30
34
|
enqueued: number;
|
|
35
|
+
/** Events refused because the queue was already full. */
|
|
31
36
|
droppedIncoming: number;
|
|
37
|
+
/** Events removed from the queue to make room for newer ones. */
|
|
32
38
|
droppedQueued: number;
|
|
39
|
+
/** `droppedIncoming` plus `droppedQueued`. */
|
|
33
40
|
droppedTotal: number;
|
|
34
|
-
/**
|
|
41
|
+
/** Flushes that actually started sending. */
|
|
35
42
|
flushesStarted: number;
|
|
36
|
-
/** Flush calls that
|
|
43
|
+
/** Flush calls that waited on a send already in progress. */
|
|
37
44
|
flushesJoined: number;
|
|
38
|
-
/**
|
|
45
|
+
/** HTTP requests to the ingest API, including retries. */
|
|
39
46
|
sendAttempts: number;
|
|
40
|
-
/** HTTP attempts after the first
|
|
47
|
+
/** Extra HTTP attempts after the first try of a batch. */
|
|
41
48
|
sendRetries: number;
|
|
42
|
-
/**
|
|
49
|
+
/** Failed batches sent again on a later flush. */
|
|
43
50
|
batchReplays: number;
|
|
51
|
+
/** Batches the API accepted. */
|
|
44
52
|
batchesSucceeded: number;
|
|
45
|
-
/** Batches
|
|
53
|
+
/** Batches given up after a response that should not be retried. */
|
|
46
54
|
batchesDropped: number;
|
|
47
|
-
/**
|
|
55
|
+
/** Batches that failed and are waiting to be tried again. */
|
|
48
56
|
batchesFailed: number;
|
|
49
|
-
/**
|
|
57
|
+
/** Flushes that stopped because they ran out of time. */
|
|
50
58
|
flushTimeouts: number;
|
|
59
|
+
/** Sends that failed before getting an HTTP response. */
|
|
51
60
|
networkErrors: number;
|
|
61
|
+
/** HTTP 429 responses. */
|
|
52
62
|
rateLimitedResponses: number;
|
|
63
|
+
/** HTTP 5xx responses. */
|
|
53
64
|
serverErrorResponses: number;
|
|
54
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* Why the most recent send failed, without URLs or error text.
|
|
67
|
+
* `null` if nothing has failed yet.
|
|
68
|
+
*/
|
|
55
69
|
lastFailureKind: 'aborted' | 'network_error' | 'rate_limited' | 'server_error' | 'non_retryable_http' | null;
|
|
70
|
+
/** Status code from that failure, when the API responded. */
|
|
56
71
|
lastFailureStatusCode: number | null;
|
|
57
72
|
};
|
|
58
73
|
export type CreateTransportOptions = {
|
|
@@ -66,8 +81,14 @@ export type CreateTransportOptions = {
|
|
|
66
81
|
flushIntervalMs?: number;
|
|
67
82
|
gzipThresholdBytes?: number;
|
|
68
83
|
maxRetries?: number;
|
|
84
|
+
/** Per-attempt HTTP timeout. Default 2s so a dead ingest host cannot hold the process open. */
|
|
85
|
+
requestTimeoutMs?: number;
|
|
69
86
|
fetch?: TransportFetch;
|
|
70
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* Install SIGINT / SIGTERM / beforeExit flush hooks and briefly hold
|
|
89
|
+
* `process.exit` so queued events can drain. Default true. Disable when the
|
|
90
|
+
* host owns process shutdown.
|
|
91
|
+
*/
|
|
71
92
|
installSignalHandlers?: boolean;
|
|
72
93
|
/** Rewrite events before send (e.g. source-map resolve + re-normalize). */
|
|
73
94
|
prepareEvent?: PrepareQueuedEvent;
|
|
@@ -75,9 +96,13 @@ export type CreateTransportOptions = {
|
|
|
75
96
|
prepareSummary?: PrepareSummaryFrames;
|
|
76
97
|
sdkVersion?: string;
|
|
77
98
|
sdkName?: string;
|
|
99
|
+
/** Drain pending work (burst summaries) immediately before a flush or timer tick. */
|
|
100
|
+
beforeFlush?: () => void;
|
|
101
|
+
/** Hard cap on queued JSON bytes. Default 8 MiB. */
|
|
102
|
+
maxQueueBytes?: number;
|
|
78
103
|
};
|
|
79
104
|
export type Transport = {
|
|
80
|
-
enqueue: (event: IngestEvent, priority?: 'first' | 'repeat', rawFrames?: RawFrame[]) => void;
|
|
105
|
+
enqueue: (event: IngestEvent, priority?: 'first' | 'repeat', rawFrames?: RawFrame[], encodedBytes?: number) => void;
|
|
81
106
|
enqueueSummary: (summary: IngestSummary, rawFrames?: RawFrame[]) => void;
|
|
82
107
|
flush: (timeoutMs?: number) => Promise<void>;
|
|
83
108
|
close: () => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport-types.d.ts","sourceRoot":"","sources":["../../src/transport/transport-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAC;AACpF,OAAO,KAAK,EAAE,QAAQ,EAAE,MA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,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qFAAqF;IACrF,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,oDAAoD;IACpD,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACvB,OAAO,EAAE,CACR,KAAK,EAAE,WAAW,EAClB,QAAQ,CAAC,EAAE,OAAO,GAAG,QAAQ,EAC7B,SAAS,CAAC,EAAE,QAAQ,EAAE,EACtB,YAAY,CAAC,EAAE,MAAM,KACjB,IAAI,CAAC;IACV,cAAc,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,SAAS,CAAC,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;IACzE,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,uFAAuF;IACvF,IAAI,EAAE,MAAM,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,cAAc,CAAC;CAC/B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rasputin-ai/core",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Core error capture, stack parsing, and ingest transport for Rasputin AI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@sinclair/typebox": "0.34.49",
|
|
31
|
-
"@types/bun": "
|
|
31
|
+
"@types/bun": "1.3.14",
|
|
32
32
|
"@types/node": "22.13.10",
|
|
33
33
|
"esbuild": "0.25.12",
|
|
34
34
|
"typescript": "5"
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/** Serializer markers and tagged holes that make a captured snapshot incomplete. */
|
|
2
|
-
export declare const capturedValueCompleteness: (value: unknown) => "exact" | "partial";
|
|
3
|
-
export declare const isRedactedCapturedValue: (value: unknown) => boolean;
|
|
4
|
-
export declare const isSerializerMarker: (value: unknown) => boolean;
|
|
5
|
-
//# sourceMappingURL=captured-value-markers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"captured-value-markers.d.ts","sourceRoot":"","sources":["../../src/derivation/captured-value-markers.ts"],"names":[],"mappings":"AAWA,oFAAoF;AACpF,eAAO,MAAM,yBAAyB,GAAI,OAAO,OAAO,KAAG,OAAO,GAAG,SA6BpE,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,OAAO,OAAO,KAAG,OAKxD,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,KAAG,OAInD,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Keep in sync with `packages/~core/lib/runtime-derivation/evaluate-derivation-plan.ts`.
|
|
3
|
-
* ⚠️ DERIVATION LOCKSTEP — investigation must interpret the same IR the SDK emitted.
|
|
4
|
-
*/
|
|
5
|
-
import type { RuntimeExecutionState } from '../create-ingest-event/runtime-execution-state-types';
|
|
6
|
-
import type { InstrumentationManifestContent } from '../instrumentation-manifest/instrumentation-manifest-types';
|
|
7
|
-
export type DerivationValidation = {
|
|
8
|
-
status: 'verified' | 'mismatch';
|
|
9
|
-
derivedValue?: unknown;
|
|
10
|
-
expressionId?: number;
|
|
11
|
-
dependencies?: number[];
|
|
12
|
-
};
|
|
13
|
-
export type EvaluatedRuntimeValue = {
|
|
14
|
-
origin: 'captured';
|
|
15
|
-
completeness: 'exact' | 'partial';
|
|
16
|
-
value: unknown;
|
|
17
|
-
derivationValidation?: DerivationValidation;
|
|
18
|
-
} | {
|
|
19
|
-
origin: 'derived';
|
|
20
|
-
completeness: 'exact' | 'partial';
|
|
21
|
-
value: unknown;
|
|
22
|
-
dependencies: number[];
|
|
23
|
-
derivationValidation?: DerivationValidation;
|
|
24
|
-
} | {
|
|
25
|
-
origin: 'unavailable';
|
|
26
|
-
reason: string;
|
|
27
|
-
};
|
|
28
|
-
export type EvaluatedFunctionState = {
|
|
29
|
-
functionId: string;
|
|
30
|
-
callId: number;
|
|
31
|
-
values: Record<number, EvaluatedRuntimeValue>;
|
|
32
|
-
variables: Array<{
|
|
33
|
-
variableId: number;
|
|
34
|
-
name: string;
|
|
35
|
-
availableAtLine: number;
|
|
36
|
-
availableAtColumn: number;
|
|
37
|
-
result: EvaluatedRuntimeValue;
|
|
38
|
-
}>;
|
|
39
|
-
returnValue?: EvaluatedRuntimeValue;
|
|
40
|
-
};
|
|
41
|
-
export type EvaluateDerivationResult = {
|
|
42
|
-
unavailableReason?: string;
|
|
43
|
-
functions: EvaluatedFunctionState[];
|
|
44
|
-
};
|
|
45
|
-
export declare const evaluateRuntimeDerivation: (input: {
|
|
46
|
-
state: RuntimeExecutionState;
|
|
47
|
-
manifest: InstrumentationManifestContent | null;
|
|
48
|
-
}) => EvaluateDerivationResult;
|
|
49
|
-
export declare const evaluatedValueAtLine: (evaluated: EvaluatedFunctionState | undefined, line: number | null) => Array<{
|
|
50
|
-
name: string;
|
|
51
|
-
result: EvaluatedRuntimeValue;
|
|
52
|
-
}>;
|
|
53
|
-
//# sourceMappingURL=evaluate-derivation-plan.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate-derivation-plan.d.ts","sourceRoot":"","sources":["../../src/derivation/evaluate-derivation-plan.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAGX,qBAAqB,EACrB,MAAM,sDAAsD,CAAC;AAM9D,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,4DAA4D,CAAC;AAYjH,MAAM,MAAM,oBAAoB,GAAG;IAClC,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC;IAChC,YAAY,CAAC,EAAE,OAAO,C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