@rasputin-ai/core 0.2.0 → 0.4.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/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 +50 -19
- package/dist/create-client/create-client-types.d.ts.map +1 -1
- package/dist/create-client/create-client.d.ts +1 -1
- package/dist/create-client/create-client.d.ts.map +1 -1
- package/dist/create-client/is-client-enabled.d.ts.map +1 -1
- package/dist/create-client/resolve-endpoint-urls.d.ts +2 -1
- package/dist/create-client/resolve-endpoint-urls.d.ts.map +1 -1
- package/dist/create-ingest-event/create-ingest-event-types.d.ts +8 -2
- package/dist/create-ingest-event/create-ingest-event-types.d.ts.map +1 -1
- package/dist/create-ingest-event/create-ingest-event.d.ts.map +1 -1
- package/dist/create-ingest-event/runtime-execution-state-types.d.ts +91 -0
- package/dist/create-ingest-event/runtime-execution-state-types.d.ts.map +1 -0
- package/dist/create-ingest-event/truncate-ingest-message.d.ts +3 -0
- package/dist/create-ingest-event/truncate-ingest-message.d.ts.map +1 -0
- package/dist/detect-release/detect-release.d.ts +1 -1
- package/dist/detect-release/detect-release.d.ts.map +1 -1
- package/dist/index.d.ts +10 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +331 -80
- package/dist/instrumentation-manifest/instrumentation-manifest-types.d.ts +98 -0
- package/dist/instrumentation-manifest/instrumentation-manifest-types.d.ts.map +1 -0
- package/dist/instrumentation-manifest/upload-instrumentation-manifest.d.ts +21 -0
- package/dist/instrumentation-manifest/upload-instrumentation-manifest.d.ts.map +1 -0
- package/dist/normalize-frames/normalize-frames.d.ts +4 -2
- package/dist/normalize-frames/normalize-frames.d.ts.map +1 -1
- package/dist/repo-root/warn-repo-root-setup.d.ts +0 -1
- package/dist/repo-root/warn-repo-root-setup.d.ts.map +1 -1
- package/dist/sdk-meta.d.ts +2 -2
- package/dist/sdk-meta.d.ts.map +1 -1
- package/dist/source-identity/source-identity.d.ts +25 -0
- package/dist/source-identity/source-identity.d.ts.map +1 -0
- package/dist/suppression/suppression-types.d.ts +2 -2
- package/dist/suppression/suppression-types.d.ts.map +1 -1
- package/dist/transport/create-transport.d.ts.map +1 -1
- package/dist/transport/transport-queue.d.ts +7 -0
- package/dist/transport/transport-queue.d.ts.map +1 -1
- package/dist/transport/transport-types.d.ts +11 -2
- package/dist/transport/transport-types.d.ts.map +1 -1
- package/package.json +1 -2
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static per-release facts about instrumented source. Runtime events only carry opaque function
|
|
3
|
+
* IDs; this payload joins those IDs to source without coupling them to a container filesystem.
|
|
4
|
+
*/
|
|
5
|
+
import type { SourcePosition } from '../source-identity/source-identity';
|
|
6
|
+
export declare const INSTRUMENTATION_MANIFEST_SCHEMA_VERSION = 2;
|
|
7
|
+
export type InstrumentationParamBinding = {
|
|
8
|
+
kind: 'identifier';
|
|
9
|
+
name: string;
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'object';
|
|
12
|
+
properties: Array<{
|
|
13
|
+
key: string;
|
|
14
|
+
binding: InstrumentationParamBinding;
|
|
15
|
+
}>;
|
|
16
|
+
} | {
|
|
17
|
+
kind: 'array';
|
|
18
|
+
elements: Array<InstrumentationParamBinding | {
|
|
19
|
+
kind: 'omitted';
|
|
20
|
+
}>;
|
|
21
|
+
} | {
|
|
22
|
+
kind: 'rest';
|
|
23
|
+
binding: InstrumentationParamBinding;
|
|
24
|
+
} | {
|
|
25
|
+
kind: 'omitted';
|
|
26
|
+
};
|
|
27
|
+
export type InstrumentationArgIdentifier = {
|
|
28
|
+
index: number;
|
|
29
|
+
kind: 'identifier';
|
|
30
|
+
name: string;
|
|
31
|
+
} | {
|
|
32
|
+
index: number;
|
|
33
|
+
kind: 'object';
|
|
34
|
+
properties: Array<{
|
|
35
|
+
key: string;
|
|
36
|
+
name: string;
|
|
37
|
+
}>;
|
|
38
|
+
};
|
|
39
|
+
export type InstrumentationManifestFunction = {
|
|
40
|
+
functionId: string;
|
|
41
|
+
source: SourcePosition;
|
|
42
|
+
name: string;
|
|
43
|
+
startLine: number;
|
|
44
|
+
startColumn: number;
|
|
45
|
+
endLine: number;
|
|
46
|
+
endColumn: number;
|
|
47
|
+
params: InstrumentationParamBinding[];
|
|
48
|
+
};
|
|
49
|
+
export type InstrumentationManifestCallSite = {
|
|
50
|
+
id: string;
|
|
51
|
+
callerFunctionId: string;
|
|
52
|
+
calleeName: string;
|
|
53
|
+
calleeText: string;
|
|
54
|
+
source: SourcePosition;
|
|
55
|
+
line: number;
|
|
56
|
+
column: number;
|
|
57
|
+
endLine: number;
|
|
58
|
+
endColumn: number;
|
|
59
|
+
resultBinding: string | null;
|
|
60
|
+
argIdentifiers: InstrumentationArgIdentifier[];
|
|
61
|
+
};
|
|
62
|
+
export type InstrumentationManifestDestructure = {
|
|
63
|
+
callerFunctionId: string;
|
|
64
|
+
sourceParam: string;
|
|
65
|
+
source: SourcePosition;
|
|
66
|
+
line: number;
|
|
67
|
+
column: number;
|
|
68
|
+
binding: InstrumentationParamBinding;
|
|
69
|
+
};
|
|
70
|
+
export type SourceVerificationIssue = {
|
|
71
|
+
packageName?: string;
|
|
72
|
+
packageRelativePath: string;
|
|
73
|
+
reason: 'not_found' | 'ambiguous' | 'invalid_mapping' | 'github_unavailable';
|
|
74
|
+
candidates?: string[];
|
|
75
|
+
};
|
|
76
|
+
type SourcePackageMapping = {
|
|
77
|
+
packageName?: string;
|
|
78
|
+
repositoryRoot: string;
|
|
79
|
+
};
|
|
80
|
+
export type SourceVerification = {
|
|
81
|
+
status: 'verified' | 'partial' | 'ambiguous' | 'unavailable';
|
|
82
|
+
verified: number;
|
|
83
|
+
unresolved: SourceVerificationIssue[];
|
|
84
|
+
packages?: SourcePackageMapping[];
|
|
85
|
+
};
|
|
86
|
+
export type InstrumentationManifestContent = {
|
|
87
|
+
schema_version: typeof INSTRUMENTATION_MANIFEST_SCHEMA_VERSION;
|
|
88
|
+
sourceRoots?: {
|
|
89
|
+
default?: string;
|
|
90
|
+
packages: Record<string, string>;
|
|
91
|
+
};
|
|
92
|
+
verification?: SourceVerification;
|
|
93
|
+
functions: InstrumentationManifestFunction[];
|
|
94
|
+
callSites: InstrumentationManifestCallSite[];
|
|
95
|
+
destructures: InstrumentationManifestDestructure[];
|
|
96
|
+
};
|
|
97
|
+
export {};
|
|
98
|
+
//# sourceMappingURL=instrumentation-manifest-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentation-manifest-types.d.ts","sourceRoot":"","sources":["../../src/instrumentation-manifest/instrumentation-manifest-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE,eAAO,MAAM,uCAAuC,IAAI,CAAC;AAEzD,MAAM,MAAM,2BAA2B,GACpC;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACpC;IACA,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,2BAA2B,CAAA;KAAE,CAAC,CAAC;CACxE,GACD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC,2BAA2B,GAAG;QAAE,IAAI,EAAE,SAAS,CAAA;KAAE,CAAC,CAAA;CAAE,GACrF;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,2BAA2B,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAEvB,MAAM,MAAM,4BAA4B,GACrC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,KAAK,EAAE,M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iB,GAAG,oBAAoB,CAAC;IAC7E,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAChC,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,CAAC;IAC7D,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,uBAAuB,EAAE,CAAC;IACtC,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"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TransportFetch } from '../transport/transport-types';
|
|
2
|
+
import type { InstrumentationManifestContent, SourceVerification } from './instrumentation-manifest-types';
|
|
3
|
+
type UploadInstrumentationManifestOptions = {
|
|
4
|
+
url: string;
|
|
5
|
+
projectApiKey: string;
|
|
6
|
+
release: string;
|
|
7
|
+
manifest: InstrumentationManifestContent;
|
|
8
|
+
fetch?: TransportFetch;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Fire-and-forget merge of static source metadata for this release.
|
|
12
|
+
* Never throws — init and capture must not wait on this HTTP call.
|
|
13
|
+
*/
|
|
14
|
+
export declare const uploadInstrumentationManifest: (options: UploadInstrumentationManifestOptions) => Promise<{
|
|
15
|
+
ok: true;
|
|
16
|
+
verification: SourceVerification;
|
|
17
|
+
} | {
|
|
18
|
+
ok: false;
|
|
19
|
+
}>;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=upload-instrumentation-manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-instrumentation-manifest.d.ts","sourceRoot":"","sources":["../../src/instrumentation-manifest/upload-instrumentation-manifest.ts"],"names":[],"mappings":"AAAA,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;CACvB,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,CAwBxE,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ResolvedFrame } from '../resolve-source-maps/resolved-frame';
|
|
2
|
+
import { type SourcePosition } from '../source-identity/source-identity';
|
|
2
3
|
type NormalizeFramesOptions = {
|
|
3
|
-
/**
|
|
4
|
-
appRoot
|
|
4
|
+
/** Optional display root. Source identity does not depend on this directory being a Git root. */
|
|
5
|
+
appRoot?: string;
|
|
5
6
|
};
|
|
6
7
|
export type Frame = {
|
|
7
8
|
generated: {
|
|
@@ -17,6 +18,7 @@ export type Frame = {
|
|
|
17
18
|
};
|
|
18
19
|
function?: string;
|
|
19
20
|
in_app: boolean;
|
|
21
|
+
source?: SourcePosition;
|
|
20
22
|
};
|
|
21
23
|
/** Normalize resolved frames: repo-relative paths + in_app (runs after source-map resolution). */
|
|
22
24
|
export declare const normalizeFrames: (frames: ResolvedFrame[], options: NormalizeFramesOptions) => Frame[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-frames.d.ts","sourceRoot":"","sources":["../../src/normalize-frames/normalize-frames.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"normalize-frames.d.ts","sourceRoot":"","sources":["../../src/normalize-frames/normalize-frames.ts"],"names":[],"mappings":"AAEA,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"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** Reset per-process warning state (for testing only). */
|
|
2
2
|
export declare const resetRepoRootSetupWarnings: () => void;
|
|
3
|
-
export declare const warnIfMissingRepoRoot: () => void;
|
|
4
3
|
export declare const warnIfSuspiciousRepoRoot: (root: string) => void;
|
|
5
4
|
//# sourceMappingURL=warn-repo-root-setup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"warn-repo-root-setup.d.ts","sourceRoot":"","sources":["../../src/repo-root/warn-repo-root-setup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"warn-repo-root-setup.d.ts","sourceRoot":"","sources":["../../src/repo-root/warn-repo-root-setup.ts"],"names":[],"mappings":"AAQA,0DAA0D;AAC1D,eAAO,MAAM,0BAA0B,YAEtC,CAAC;AAOF,eAAO,MAAM,wBAAwB,GAAI,MAAM,MAAM,SAcpD,CAAC"}
|
package/dist/sdk-meta.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Generated by
|
|
1
|
+
/** Generated by scripts/generate-sdk-meta.ts — do not edit. */
|
|
2
2
|
export declare const SDK_NAME = "@rasputin-ai/core";
|
|
3
|
-
export declare const SDK_VERSION = "0.
|
|
3
|
+
export declare const SDK_VERSION = "0.4.0";
|
|
4
4
|
//# sourceMappingURL=sdk-meta.d.ts.map
|
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
|
|
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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type SourceLocator = {
|
|
2
|
+
packageName?: string;
|
|
3
|
+
packageRelativePath: string;
|
|
4
|
+
/** Filled only after the backend verifies this path against the exact Git release. */
|
|
5
|
+
repositoryPath?: string;
|
|
6
|
+
};
|
|
7
|
+
export type SourcePosition = SourceLocator & {
|
|
8
|
+
line?: number;
|
|
9
|
+
column?: number;
|
|
10
|
+
};
|
|
11
|
+
export type RuntimeFunctionDefinition = {
|
|
12
|
+
functionId: string;
|
|
13
|
+
name: string;
|
|
14
|
+
source?: SourcePosition;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Describe a source file using deploy-stable package identity. Production images often omit the
|
|
18
|
+
* repository root, so absolute container paths are deliberately never part of the wire contract.
|
|
19
|
+
*/
|
|
20
|
+
export declare const sourceLocatorFromFile: (file: string) => SourceLocator | undefined;
|
|
21
|
+
export declare const sourceLocatorKey: (source: SourceLocator) => string;
|
|
22
|
+
export declare const runtimeFunctionId: (definition: Omit<RuntimeFunctionDefinition, "functionId">) => string;
|
|
23
|
+
export declare const sourceDisplayPath: (source: SourceLocator) => string;
|
|
24
|
+
export declare const resetSourceIdentityCache: () => void;
|
|
25
|
+
//# sourceMappingURL=source-identity.d.ts.map
|
|
@@ -0,0 +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,sFAAsF;IACtF,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,cAAc,CAAC;CACxB,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"}
|
|
@@ -13,7 +13,7 @@ export type IngestSummary = {
|
|
|
13
13
|
environment: string;
|
|
14
14
|
origin: IngestOrigin;
|
|
15
15
|
resolution?: FrameResolution;
|
|
16
|
-
release
|
|
16
|
+
release: string;
|
|
17
17
|
};
|
|
18
18
|
export type SummaryIdentity = Pick<IngestSummary, 'type' | 'message' | 'stack_frames' | 'origin' | 'code' | 'resolution'>;
|
|
19
19
|
export type SuppressionDecideInput = {
|
|
@@ -25,7 +25,7 @@ export type SuppressionDecideInput = {
|
|
|
25
25
|
origin: IngestOrigin;
|
|
26
26
|
code?: string | null;
|
|
27
27
|
environment: string;
|
|
28
|
-
release
|
|
28
|
+
release: string;
|
|
29
29
|
route?: string | null;
|
|
30
30
|
/** Injectable clock for tests. */
|
|
31
31
|
now?: number;
|
|
@@ -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,CAAC,EAAE,eAAe,CAAC;IAC7B,OAAO,
|
|
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,CAAC,EAAE,eAAe,CAAC;IAC7B,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;CACzB,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":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAe,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAoCxF,eAAO,MAAM,eAAe,GAAI,SAAS,sBAAsB,KAAG,
|
|
1
|
+
{"version":3,"file":"create-transport.d.ts","sourceRoot":"","sources":["../../src/transport/create-transport.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAe,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAoCxF,eAAO,MAAM,eAAe,GAAI,SAAS,sBAAsB,KAAG,SA6KjE,CAAC"}
|
|
@@ -4,6 +4,13 @@ export declare const createQueue: (maxSize: number) => {
|
|
|
4
4
|
enqueue: (item: QueuedEvent) => void;
|
|
5
5
|
drain: (count: number) => QueuedEvent[];
|
|
6
6
|
size: () => number;
|
|
7
|
+
getStats: () => {
|
|
8
|
+
queued: number;
|
|
9
|
+
enqueued: number;
|
|
10
|
+
droppedIncoming: number;
|
|
11
|
+
droppedQueued: number;
|
|
12
|
+
droppedTotal: number;
|
|
13
|
+
};
|
|
7
14
|
clear: () => void;
|
|
8
15
|
};
|
|
9
16
|
//# sourceMappingURL=transport-queue.d.ts.map
|
|
@@ -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;oBAkBnB,WAAW;mBAgBZ,MAAM,KAAG,WAAW,EAAE;;;;;;;;;;CAiB5C,CAAC"}
|
|
@@ -21,10 +21,17 @@ export type QueuedEvent = {
|
|
|
21
21
|
rawFrames: RawFrame[];
|
|
22
22
|
};
|
|
23
23
|
export type TransportFetch = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
24
|
-
|
|
24
|
+
type PrepareQueuedEvent = (item: {
|
|
25
25
|
event: IngestEvent;
|
|
26
26
|
rawFrames: RawFrame[];
|
|
27
27
|
}) => Promise<IngestEvent>;
|
|
28
|
+
export type TransportStats = {
|
|
29
|
+
queued: number;
|
|
30
|
+
enqueued: number;
|
|
31
|
+
droppedIncoming: number;
|
|
32
|
+
droppedQueued: number;
|
|
33
|
+
droppedTotal: number;
|
|
34
|
+
};
|
|
28
35
|
export type CreateTransportOptions = {
|
|
29
36
|
/** Real API ingest URL — `POST /ingest` (apps/api post-ingest.handler). */
|
|
30
37
|
ingestUrl: string;
|
|
@@ -51,7 +58,9 @@ export type Transport = {
|
|
|
51
58
|
enqueueSummary: (summary: IngestSummary, rawFrames?: RawFrame[]) => void;
|
|
52
59
|
flush: (timeoutMs?: number) => Promise<void>;
|
|
53
60
|
close: () => Promise<void>;
|
|
54
|
-
/**
|
|
61
|
+
/** Number of events waiting in the bounded queue or a failed batch awaiting replay. */
|
|
55
62
|
size: () => number;
|
|
63
|
+
getStats: () => TransportStats;
|
|
56
64
|
};
|
|
65
|
+
export {};
|
|
57
66
|
//# sourceMappingURL=transport-types.d.ts.map
|
|
@@ -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,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAE5F;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE/D,MAAM,MAAM,WAAW,GACpB;IACA,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC7B,6DAA6D;IAC7D,SAAS,EAAE,QAAQ,EAAE,CAAC;CACrB,GACD;IACA,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAA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AAE,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.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Core error capture, stack parsing, and ingest transport for Rasputin AI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
"@types/bun": "latest",
|
|
32
32
|
"@types/node": "22.13.10",
|
|
33
33
|
"esbuild": "0.25.12",
|
|
34
|
-
"~core": "workspace:*",
|
|
35
34
|
"typescript": "5"
|
|
36
35
|
},
|
|
37
36
|
"dependencies": {
|