@rasputin-ai/node 0.16.0 → 1.0.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/auto-instrumentation/instrumentation-manifest-registry.d.ts.map +1 -1
- package/dist/auto-instrumentation/schedule-instrumentation-manifest-upload.d.ts.map +1 -1
- package/dist/create-rasputin-runtime.d.ts +72 -0
- package/dist/create-rasputin-runtime.d.ts.map +1 -0
- package/dist/execution-metrics/encode-execution-metrics-upload.d.ts.map +1 -1
- package/dist/execution-metrics/execution-metrics-collector.d.ts +3 -3
- package/dist/execution-metrics/execution-metrics-collector.d.ts.map +1 -1
- package/dist/execution-recorder/adaptive-recording-options.d.ts +3 -0
- package/dist/execution-recorder/adaptive-recording-options.d.ts.map +1 -1
- package/dist/execution-recorder/bind-adaptive-recorder.d.ts.map +1 -1
- package/dist/execution-recorder/execution-journal.d.ts +16 -1
- package/dist/execution-recorder/execution-journal.d.ts.map +1 -1
- package/dist/execution-recorder/execution-recorder-types.d.ts +18 -13
- package/dist/execution-recorder/execution-recorder-types.d.ts.map +1 -1
- package/dist/execution-recorder/execution-recorder.d.ts.map +1 -1
- package/dist/execution-recorder/execution-recording-sync.d.ts +0 -1
- package/dist/execution-recorder/execution-recording-sync.d.ts.map +1 -1
- package/dist/execution-recorder/runtime-state-size-budget.d.ts +3 -3
- package/dist/execution-recorder/runtime-state-size-budget.d.ts.map +1 -1
- package/dist/function-metrics/create-metrics-only-runtime.d.ts.map +1 -1
- package/dist/function-metrics/function-metrics-collector.d.ts.map +1 -1
- package/dist/index.js +878 -412
- package/dist/instrument/build.js +211 -355
- package/dist/instrument/bun.js +135 -246
- package/dist/instrument/node.js +135 -246
- package/dist/internal.d.ts +2 -0
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +983 -341
- package/dist/rasputin-init.d.ts +7 -60
- package/dist/rasputin-init.d.ts.map +1 -1
- package/dist/sdk-meta.d.ts +1 -1
- package/dist/sdk-meta.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/rasputin-init.d.ts
CHANGED
|
@@ -1,62 +1,3 @@
|
|
|
1
|
-
import { type RasputinClient, type RasputinClientStats, type RasputinOptions, type SourceVerification, type TransportFetch } from '@rasputin-ai/core';
|
|
2
|
-
import { type ExecutionRecorderOptions, type ExecutionRecorderStats, type RasputinExecution } from './execution-recorder';
|
|
3
|
-
export type RasputinNodeOptions = RasputinOptions & {
|
|
4
|
-
/**
|
|
5
|
-
* Limits and redaction for the runtime recorder. Recording is on unless you
|
|
6
|
-
* set `enabled: false`. Successful requests and jobs are not kept.
|
|
7
|
-
*/
|
|
8
|
-
executionRecorder?: ExecutionRecorderOptions;
|
|
9
|
-
/**
|
|
10
|
-
* Path to the JSON file `rasputin-instrument` writes at build time.
|
|
11
|
-
* Defaults to `RASPUTIN_INSTRUMENTATION_MANIFEST`, or
|
|
12
|
-
* `.rasputin/instrumentation-manifest.json` in the current working directory.
|
|
13
|
-
*/
|
|
14
|
-
instrumentationManifestPath?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Observe `uncaughtException` / nonfatal `unhandledRejection`. Default true.
|
|
17
|
-
* Rasputin does not become the host crash/recovery owner: it exits only when
|
|
18
|
-
* it is the sole `uncaughtException` listener. Set false when the host owns
|
|
19
|
-
* process diagnostics.
|
|
20
|
-
*/
|
|
21
|
-
installGlobalHandlers?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Install SIGINT / SIGTERM / beforeExit flush hooks. Default true.
|
|
24
|
-
* Set false when the host owns process shutdown.
|
|
25
|
-
*/
|
|
26
|
-
installTransportSignalHandlers?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Measure durations on a progressive schedule shared by function metrics,
|
|
29
|
-
* execution metrics, and lightweight execution recording. Default false
|
|
30
|
-
* times every eligible call and execution. True counts every call,
|
|
31
|
-
* execution, and failure, and times a subset. Function durations are
|
|
32
|
-
* keyed by function, direct caller, and execution type. Execution
|
|
33
|
-
* durations use a separate counter per execution type so they cannot
|
|
34
|
-
* move function sampling. Counters reset hourly. After 5,000 samples
|
|
35
|
-
* the tail rate still samples. Selected sessions, activations, and full
|
|
36
|
-
* capture still record every duration; metric duration statistics follow
|
|
37
|
-
* this schedule so incident traffic does not bias aggregates. Invalid
|
|
38
|
-
* values are treated as false.
|
|
39
|
-
*/
|
|
40
|
-
dynamicDurationSampling?: boolean;
|
|
41
|
-
};
|
|
42
|
-
/** @internal Test seams omitted from the published declaration surface. */
|
|
43
|
-
type RasputinNodeHooks = {
|
|
44
|
-
fetch?: TransportFetch;
|
|
45
|
-
};
|
|
46
|
-
export type RasputinNodeClientStats = RasputinClientStats & {
|
|
47
|
-
/** What this process has recorded since it started. See `ExecutionRecorderStats`. */
|
|
48
|
-
recorder: ExecutionRecorderStats;
|
|
49
|
-
};
|
|
50
|
-
export type RasputinNodeClient = Omit<RasputinClient, 'getStats'> & {
|
|
51
|
-
/** Wrap background jobs, inspect recorder stats, or mark functions by hand. */
|
|
52
|
-
execution: RasputinExecution;
|
|
53
|
-
getStats: () => RasputinNodeClientStats;
|
|
54
|
-
/**
|
|
55
|
-
* Check that every recorded source file maps to the Git commit in `release`.
|
|
56
|
-
* Call this from a deploy check, not on every request.
|
|
57
|
-
*/
|
|
58
|
-
verifyConfiguration: () => Promise<SourceVerification>;
|
|
59
|
-
};
|
|
60
1
|
/**
|
|
61
2
|
* Boot the Node/Bun SDK: client + process global handlers.
|
|
62
3
|
* Call once at process start. Never throws into the host app.
|
|
@@ -69,8 +10,14 @@ export type RasputinNodeClient = Omit<RasputinClient, 'getStats'> & {
|
|
|
69
10
|
* environment: 'production',
|
|
70
11
|
* });
|
|
71
12
|
*/
|
|
13
|
+
import type { TransportFetch } from '@rasputin-ai/core';
|
|
14
|
+
import { type RasputinNodeClient, type RasputinNodeOptions } from './create-rasputin-runtime';
|
|
15
|
+
export type { RasputinNodeClient, RasputinNodeClientStats, RasputinNodeOptions, } from './create-rasputin-runtime';
|
|
16
|
+
/** @internal Test seams omitted from the published declaration surface. */
|
|
17
|
+
type RasputinNodeHooks = {
|
|
18
|
+
fetch?: TransportFetch;
|
|
19
|
+
};
|
|
72
20
|
export declare function RasputinInit(options: RasputinNodeOptions): RasputinNodeClient;
|
|
73
21
|
/** @internal Test overload; omitted from the published declaration surface. */
|
|
74
22
|
export declare function RasputinInit(options: RasputinNodeOptions, hooks: RasputinNodeHooks): RasputinNodeClient;
|
|
75
|
-
export {};
|
|
76
23
|
//# sourceMappingURL=rasputin-init.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rasputin-init.d.ts","sourceRoot":"","sources":["../src/rasputin-init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rasputin-init.d.ts","sourceRoot":"","sources":["../src/rasputin-init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAEN,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,MAAM,2BAA2B,CAAC;AAGnC,YAAY,EACX,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,GACnB,MAAM,2BAA2B,CAAC;AAEnC,2EAA2E;AAC3E,KAAK,iBAAiB,GAAG;IACxB,KAAK,CAAC,EAAE,cAAc,CAAC;CACvB,CAAC;AAEF,wBAAgB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,kBAAkB,CAAC;AAE/E,+EAA+E;AAC/E,wBAAgB,YAAY,CAC3B,OAAO,EAAE,mBAAmB,EAC5B,KAAK,EAAE,iBAAiB,GACtB,kBAAkB,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rasputin-ai/node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Official Rasputin AI SDK for Node and Bun.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
52
|
-
"@rasputin-ai/core": "0.
|
|
52
|
+
"@rasputin-ai/core": "1.0.0",
|
|
53
53
|
"typescript": "5"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@rasputin-ai/core": "workspace:*",
|
|
57
57
|
"@rasputin-ai/instrumentation": "workspace:*",
|
|
58
58
|
"@rasputin-ai/recorder": "workspace:*",
|
|
59
|
-
"@types/bun": "1.
|
|
59
|
+
"@types/bun": "1.4.5",
|
|
60
60
|
"@types/node": "22.13.10",
|
|
61
61
|
"esbuild": "0.25.12"
|
|
62
62
|
}
|