@rasputin-ai/node 0.5.0-alpha.1 → 0.5.0-alpha.10
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 +15 -15
- package/dist/auto-instrumentation/instrument-compiled-esm.d.ts +2 -0
- package/dist/auto-instrumentation/instrument-compiled-esm.d.ts.map +1 -1
- package/dist/auto-instrumentation/instrumentation-manifest-delta.d.ts +2 -1
- package/dist/auto-instrumentation/instrumentation-manifest-delta.d.ts.map +1 -1
- package/dist/auto-instrumentation/instrumentation-manifest-registry.d.ts +1 -1
- package/dist/auto-instrumentation/instrumentation-manifest-registry.d.ts.map +1 -1
- package/dist/auto-instrumentation/transform-source.d.ts +6 -0
- package/dist/auto-instrumentation/transform-source.d.ts.map +1 -1
- package/dist/auto-instrumentation/warn-production-runtime-transform.d.ts +8 -0
- package/dist/auto-instrumentation/warn-production-runtime-transform.d.ts.map +1 -0
- package/dist/derivation/analyze-function.d.ts +42 -0
- package/dist/derivation/analyze-function.d.ts.map +1 -0
- package/dist/derivation/build-dependency-graph.d.ts +21 -0
- package/dist/derivation/build-dependency-graph.d.ts.map +1 -0
- package/dist/derivation/derivation-ir.d.ts +33 -0
- package/dist/derivation/derivation-ir.d.ts.map +1 -0
- package/dist/derivation/derivation-proof.d.ts +14 -0
- package/dist/derivation/derivation-proof.d.ts.map +1 -0
- package/dist/derivation/emit-capture-plan.d.ts +8 -0
- package/dist/derivation/emit-capture-plan.d.ts.map +1 -0
- package/dist/execution-recorder/automatic-runtime.d.ts +12 -3
- package/dist/execution-recorder/automatic-runtime.d.ts.map +1 -1
- package/dist/execution-recorder/execution-journal.d.ts +84 -0
- package/dist/execution-recorder/execution-journal.d.ts.map +1 -0
- package/dist/execution-recorder/execution-recorder-types.d.ts +21 -2
- 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/recorder-memory-budget.d.ts +1 -0
- package/dist/execution-recorder/recorder-memory-budget.d.ts.map +1 -1
- package/dist/execution-recorder/safe-serialize.d.ts +1 -0
- package/dist/execution-recorder/safe-serialize.d.ts.map +1 -1
- package/dist/index.js +1162 -328
- package/dist/instrument/build.js +795 -72
- package/dist/instrument/bun.js +790 -67
- package/dist/instrument/node.js +790 -67
- package/dist/sdk-meta.d.ts +1 -1
- package/dist/sdk-meta.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/execution-recorder/call-aware-event-buffer.d.ts +0 -24
- package/dist/execution-recorder/call-aware-event-buffer.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -73,7 +73,7 @@ Optionally attach the runtime state that led to an error — arguments, return v
|
|
|
73
73
|
|
|
74
74
|
## Automatic instrumentation
|
|
75
75
|
|
|
76
|
-
Build-time instrumentation is the
|
|
76
|
+
Build-time instrumentation is the production default. Transform compiled unbundled JavaScript after `tsc` so the running process never loads the TypeScript compiler:
|
|
77
77
|
|
|
78
78
|
```json
|
|
79
79
|
{
|
|
@@ -87,7 +87,7 @@ Build-time instrumentation is the preferred high-performance mode. Transform com
|
|
|
87
87
|
|
|
88
88
|
Emit adjacent source maps from TypeScript so function identities stay pointed at the original files. The instrumenter writes `.rasputin/instrumentation-manifest.json` next to the output. RasputinInit loads that file automatically, or from `RASPUTIN_INSTRUMENTATION_MANIFEST`.
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
Node `--import` and Bun `--preload` remain compatibility and development fallbacks. They transform application source as it loads, which pulls compiler infrastructure into the process and has materially higher RSS. Do not use those loader measurements in low-overhead comparisons. In `NODE_ENV=production` the loaders print a one-time warning recommending `rasputin-instrument`. Set `RASPUTIN_SUPPRESS_RUNTIME_TRANSFORM_WARNING=1` to hide it.
|
|
91
91
|
|
|
92
92
|
```json
|
|
93
93
|
{
|
|
@@ -173,16 +173,16 @@ Runtime state can include application data. Use `redactKeys` for sensitive field
|
|
|
173
173
|
const { recorder, transport } = rasputin.getStats();
|
|
174
174
|
```
|
|
175
175
|
|
|
176
|
-
Counters are local to the current process and reset on restart.
|
|
177
|
-
|
|
178
|
-
Recorder work counters support performance diagnosis without retaining successful execution state:
|
|
179
|
-
|
|
180
|
-
- `functionCallsObserved` counts hooks reached inside active execution scopes.
|
|
181
|
-
- `functionCallsCaptured` counts complete enter/terminal pairs recorded before any later eviction.
|
|
182
|
-
- `functionCallsExcluded` counts hooks omitted by source or excluded-subtree rules.
|
|
183
|
-
- `repeatedCallsSuppressed` counts successful repetitions represented by suppression summaries.
|
|
184
|
-
- `serializedValues`, `serializedValueNodes`, and `serializedValueBytes` describe bounded value
|
|
185
|
-
capture work. Redacted subtrees are not traversed or included in the node count.
|
|
186
|
-
|
|
187
|
-
All counters are cumulative. Compare before/after snapshots for a measurement window rather than
|
|
188
|
-
dividing the process-lifetime totals by a single request count.
|
|
176
|
+
Counters are local to the current process and reset on restart.
|
|
177
|
+
|
|
178
|
+
Recorder work counters support performance diagnosis without retaining successful execution state:
|
|
179
|
+
|
|
180
|
+
- `functionCallsObserved` counts hooks reached inside active execution scopes.
|
|
181
|
+
- `functionCallsCaptured` counts complete enter/terminal pairs recorded before any later eviction.
|
|
182
|
+
- `functionCallsExcluded` counts hooks omitted by source or excluded-subtree rules.
|
|
183
|
+
- `repeatedCallsSuppressed` counts successful repetitions represented by suppression summaries.
|
|
184
|
+
- `serializedValues`, `serializedValueNodes`, and `serializedValueBytes` describe bounded value
|
|
185
|
+
capture work. Redacted subtrees are not traversed or included in the node count.
|
|
186
|
+
|
|
187
|
+
All counters are cumulative. Compare before/after snapshots for a measurement window rather than
|
|
188
|
+
dividing the process-lifetime totals by a single request count.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { InstrumentationManifestContent } from '@rasputin-ai/core';
|
|
2
|
+
import { type DerivationCaptureMode } from './transform-source';
|
|
2
3
|
export type InstrumentCompiledDirectoryOptions = {
|
|
3
4
|
inputDir: string;
|
|
4
5
|
outputDir?: string;
|
|
@@ -6,6 +7,7 @@ export type InstrumentCompiledDirectoryOptions = {
|
|
|
6
7
|
excludedRoots?: readonly string[];
|
|
7
8
|
sourceRoot?: string;
|
|
8
9
|
sourceRoots?: Record<string, string>;
|
|
10
|
+
derivationMode?: DerivationCaptureMode;
|
|
9
11
|
};
|
|
10
12
|
export type InstrumentCompiledDirectoryResult = {
|
|
11
13
|
transformedFiles: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrument-compiled-esm.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/instrument-compiled-esm.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"instrument-compiled-esm.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/instrument-compiled-esm.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAQxE,OAAO,EAAE,KAAK,qBAAqB,EAAmB,MAAM,oBAAoB,CAAC;AAIjF,MAAM,MAAM,kCAAkC,GAAG;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,cAAc,CAAC,EAAE,qBAAqB,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC/C,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,QAAQ,EAAE,8BAA8B,GAAG,SAAS,CAAC;IACrD,YAAY,EAAE,MAAM,CAAC;CACrB,CAAC;AAuBF,6FAA6F;AAC7F,eAAO,MAAM,2BAA2B,GACvC,SAAS,kCAAkC,KACzC,iCA4CF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InstrumentationArgIdentifier, InstrumentationParamBinding } from '@rasputin-ai/core';
|
|
1
|
+
import type { DerivationPlan, InstrumentationArgIdentifier, InstrumentationParamBinding } from '@rasputin-ai/core';
|
|
2
2
|
import type { EncodedFunctionPlan } from '../execution-recorder/function-plan';
|
|
3
3
|
export type RawManifestCallSite = {
|
|
4
4
|
callerFunctionId: string;
|
|
@@ -36,5 +36,6 @@ export type InstrumentationManifestDelta = {
|
|
|
36
36
|
functions: RawManifestFunction[];
|
|
37
37
|
callSites: RawManifestCallSite[];
|
|
38
38
|
destructures: RawManifestDestructure[];
|
|
39
|
+
derivationPlans: DerivationPlan[];
|
|
39
40
|
};
|
|
40
41
|
//# sourceMappingURL=instrumentation-manifest-delta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation-manifest-delta.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/instrumentation-manifest-delta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"instrumentation-manifest-delta.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/instrumentation-manifest-delta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,cAAc,EACd,4BAA4B,EAC5B,2BAA2B,EAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE/E,MAAM,MAAM,mBAAmB,GAAG;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,EAAE,4BAA4B,EAAE,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACpC,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,2BAA2B,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,2BAA2B,EAAE,CAAC;IACtC,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IAC1C,SAAS,EAAE,mBAAmB,EAAE,CAAC;IACjC,SAAS,EAAE,mBAAmB,EAAE,CAAC;IACjC,YAAY,EAAE,sBAAsB,EAAE,CAAC;IACvC,eAAe,EAAE,cAAc,EAAE,CAAC;CAClC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type InstrumentationManifestContent } from '@rasputin-ai/core';
|
|
2
2
|
import type { InstrumentationManifestDelta } from './instrumentation-manifest-delta';
|
|
3
|
-
export declare const INSTRUMENTATION_MANIFEST_SYMBOL = "rasputin.instrumentation.manifest.
|
|
3
|
+
export declare const INSTRUMENTATION_MANIFEST_SYMBOL = "rasputin.instrumentation.manifest.v3";
|
|
4
4
|
type SnapshotOptions = {
|
|
5
5
|
sourceRoot?: string;
|
|
6
6
|
sourceRoots?: Record<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation-manifest-registry.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/instrumentation-manifest-registry.ts"],"names":[],"mappings":"AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"instrumentation-manifest-registry.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/instrumentation-manifest-registry.ts"],"names":[],"mappings":"AAOA,OAAO,EAIN,KAAK,8BAA8B,EAKnC,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAErF,eAAO,MAAM,+BAA+B,yCAAyC,CAAC;AAatF,KAAK,eAAe,GAAG;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC,CAAC;AAiCF,eAAO,MAAM,kCAAkC,GAC9C,UAAU,MAAM,EAChB,OAAO,4BAA4B,KACjC,IAKF,CAAC;AAEF,eAAO,MAAM,qCAAqC,GACjD,UAAU,8BAA8B,KACtC,IAKF,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAI,MAAM,MAAM,KAAG,OAU9D,CAAC;AAEF,eAAO,MAAM,oCAAoC,GAAI,MAAM,MAAM,GAAG,SAAS,KAAG,IAG/E,CAAC;AAEF,eAAO,MAAM,8BAA8B,QAAO,OAMjD,CAAC;AAEF,eAAO,MAAM,iCAAiC,QAAO,MAAkC,CAAC;AAExF,eAAO,MAAM,kCAAkC,QAAO,MAKrD,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAC3C,UAAS,eAAoB,KAC3B,8BAA8B,GAAG,SAgGnC,CAAC;AAEF,eAAO,MAAM,mCAAmC,GAAI,YAAY,MAAM,KAAG,IAGxE,CAAC;AAEF,eAAO,MAAM,iCAAiC,GAAI,UAAU,MAAM,IAAI,KAAG,IAExE,CAAC;AAEF,eAAO,MAAM,oCAAoC,QAAO,IAEvD,CAAC"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import type { InstrumentationManifestDelta } from './instrumentation-manifest-delta';
|
|
2
|
+
export type DerivationCaptureMode = 'analysis' | 'selective';
|
|
2
3
|
export type TransformSourceOptions = {
|
|
3
4
|
filePath: string;
|
|
4
5
|
mapLocation?: SourceLocationMapper;
|
|
6
|
+
/**
|
|
7
|
+
* analysis (default): full call capture plus derivation.
|
|
8
|
+
* selective (experimental): omit argument/return serialization for exact helpers.
|
|
9
|
+
*/
|
|
10
|
+
derivationMode?: DerivationCaptureMode;
|
|
5
11
|
};
|
|
6
12
|
export type TransformedSource = {
|
|
7
13
|
code: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform-source.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/transform-source.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transform-source.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/transform-source.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACX,4BAA4B,EAE5B,MAAM,kCAAkC,CAAC;AAI1C,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,WAAW,CAAC;AAE7D,MAAM,MAAM,sBAAsB,GAAG;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC;;;OAGG;IACH,cAAc,CAAC,EAAE,qBAAqB,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,4BAA4B,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,QAAQ,EAAE,cAAc,KAAK,cAAc,GAAG,SAAS,CAAC;AA6J5F,6FAA6F;AAC7F,eAAO,MAAM,eAAe,GAC3B,QAAQ,MAAM,EACd,SAAS,sBAAsB,KAC7B,iBAAiB,GAAG,SAqItB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Load-time transformation pulls the TypeScript compiler into the application process. Production
|
|
3
|
+
* should prefer `rasputin-instrument` at build time; this warning exists so that fallback stays
|
|
4
|
+
* available without being mistaken for the low-overhead path.
|
|
5
|
+
*/
|
|
6
|
+
export declare const RUNTIME_TRANSFORM_WARNING_SUPPRESS_ENV = "RASPUTIN_SUPPRESS_RUNTIME_TRANSFORM_WARNING";
|
|
7
|
+
export declare const warnIfProductionRuntimeTransform: () => void;
|
|
8
|
+
//# sourceMappingURL=warn-production-runtime-transform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warn-production-runtime-transform.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/warn-production-runtime-transform.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,sCAAsC,gDAAgD,CAAC;AAIpG,eAAO,MAAM,gCAAgC,QAAO,IAQnD,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { CaptureReason, DerivationPlan } from '@rasputin-ai/core';
|
|
2
|
+
import ts from 'typescript';
|
|
3
|
+
import { type FunctionCallEdge } from './build-dependency-graph';
|
|
4
|
+
export type CaptureWrap = {
|
|
5
|
+
rootId: number;
|
|
6
|
+
reason: CaptureReason;
|
|
7
|
+
start: number;
|
|
8
|
+
end: number;
|
|
9
|
+
line: number;
|
|
10
|
+
column: number;
|
|
11
|
+
expressionId: number;
|
|
12
|
+
/** Object-literal shorthand must be expanded before its value can be wrapped. */
|
|
13
|
+
shorthandPropertyName?: string;
|
|
14
|
+
};
|
|
15
|
+
type NumericBinaryOp = 'add' | 'sub' | 'mul' | 'div' | 'mod';
|
|
16
|
+
export type GuardWrap = {
|
|
17
|
+
fallbackRootId: number;
|
|
18
|
+
start: number;
|
|
19
|
+
end: number;
|
|
20
|
+
op: NumericBinaryOp;
|
|
21
|
+
};
|
|
22
|
+
export type AnalyzedFunction = {
|
|
23
|
+
functionId: string;
|
|
24
|
+
name: string;
|
|
25
|
+
node: ts.FunctionLikeDeclaration;
|
|
26
|
+
plan: DerivationPlan;
|
|
27
|
+
captureWraps: CaptureWrap[];
|
|
28
|
+
guardWraps: GuardWrap[];
|
|
29
|
+
callEdges: FunctionCallEdge[];
|
|
30
|
+
hasThrow: boolean;
|
|
31
|
+
hasCoercionGuard: boolean;
|
|
32
|
+
};
|
|
33
|
+
export type ModuleFunctionTarget = {
|
|
34
|
+
functionId: string;
|
|
35
|
+
name: string;
|
|
36
|
+
node: ts.FunctionLikeDeclaration & {
|
|
37
|
+
body: ts.ConciseBody;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export declare const analyzeModuleFunctions: (sourceFile: ts.SourceFile, targets: ModuleFunctionTarget[]) => AnalyzedFunction[];
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=analyze-function.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyze-function.d.ts","sourceRoot":"","sources":["../../src/derivation/analyze-function.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,aAAa,EAGb,cAAc,EAGd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAEN,KAAK,gBAAgB,EAErB,MAAM,0BAA0B,CAAC;AAGlC,MAAM,MAAM,WAAW,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,iFAAiF;IACjF,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,KAAK,eAAe,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAE7D,MAAM,MAAM,SAAS,GAAG;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,eAAe,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,EAAE,CAAC,uBAAuB,CAAC;IACjC,IAAI,EAAE,cAAc,CAAC;IACrB,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,EAAE,OAAO,CAAC;CAC1B,CAAC;AAojBF,MAAM,MAAM,oBAAoB,GAAG;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,EAAE,CAAC,uBAAuB,GAAG;QAAE,IAAI,EAAE,EAAE,CAAC,WAAW,CAAA;KAAE,CAAC;CAC5D,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAClC,YAAY,EAAE,CAAC,UAAU,EACzB,SAAS,oBAAoB,EAAE,KAC7B,gBAAgB,EA2ClB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type FunctionCallEdge = {
|
|
2
|
+
callerFunctionId: string;
|
|
3
|
+
calleeName: string;
|
|
4
|
+
calleeFunctionId?: string;
|
|
5
|
+
};
|
|
6
|
+
export type FunctionDependencyGraph = {
|
|
7
|
+
functions: string[];
|
|
8
|
+
edges: FunctionCallEdge[];
|
|
9
|
+
calleesByCaller: Map<string, string[]>;
|
|
10
|
+
};
|
|
11
|
+
/** Same-module identifier calls only. Anything else is treated as opaque at the call site. */
|
|
12
|
+
export declare const buildDependencyGraph: (functions: Array<{
|
|
13
|
+
functionId: string;
|
|
14
|
+
name: string;
|
|
15
|
+
}>, edges: FunctionCallEdge[]) => FunctionDependencyGraph;
|
|
16
|
+
/** Callees before callers so purity proofs can be reused at call sites. */
|
|
17
|
+
export declare const topologicalFunctionOrder: (functions: Array<{
|
|
18
|
+
functionId: string;
|
|
19
|
+
name: string;
|
|
20
|
+
}>, graph: FunctionDependencyGraph) => string[];
|
|
21
|
+
//# sourceMappingURL=build-dependency-graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-dependency-graph.d.ts","sourceRoot":"","sources":["../../src/derivation/build-dependency-graph.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC9B,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACrC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACvC,CAAC;AAEF,8FAA8F;AAC9F,eAAO,MAAM,oBAAoB,GAChC,WAAW,KAAK,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EACtD,OAAO,gBAAgB,EAAE,KACvB,uBAcF,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,wBAAwB,GACpC,WAAW,KAAK,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EACtD,OAAO,uBAAuB,KAC5B,MAAM,EA8CR,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { DerivationBinaryOp, DerivationExpression, DerivationPlan, DerivationUnaryOp, PrimitiveConst } from '@rasputin-ai/core';
|
|
2
|
+
export declare class DerivationIrBuilder {
|
|
3
|
+
readonly expressions: DerivationExpression[];
|
|
4
|
+
private nextId;
|
|
5
|
+
constValue(value: PrimitiveConst): number;
|
|
6
|
+
param(index: number): number;
|
|
7
|
+
root(rootId: number): number;
|
|
8
|
+
alias(from: number): number;
|
|
9
|
+
binary(op: DerivationBinaryOp, left: number, right: number, guard: 'numeric' | 'primitive' | 'none'): number;
|
|
10
|
+
unary(op: DerivationUnaryOp, operand: number): number;
|
|
11
|
+
logical(op: 'and' | 'or' | 'nullish', left: number, right: number): number;
|
|
12
|
+
cond(test: number, consequent: number, alternate: number): number;
|
|
13
|
+
object(properties: Array<{
|
|
14
|
+
key: string;
|
|
15
|
+
value: number;
|
|
16
|
+
}>): number;
|
|
17
|
+
array(elements: Array<number | {
|
|
18
|
+
kind: 'hole';
|
|
19
|
+
}>): number;
|
|
20
|
+
prop(object: number, key: string): number;
|
|
21
|
+
index(array: number, index: number): number;
|
|
22
|
+
pureCall(calleeFunctionId: string, args: number[]): number;
|
|
23
|
+
template(parts: Array<{
|
|
24
|
+
kind: 'lit';
|
|
25
|
+
value: string;
|
|
26
|
+
} | {
|
|
27
|
+
kind: 'expr';
|
|
28
|
+
expressionId: number;
|
|
29
|
+
}>): number;
|
|
30
|
+
private add;
|
|
31
|
+
}
|
|
32
|
+
export declare const emptyPlan: (functionId: string) => DerivationPlan;
|
|
33
|
+
//# sourceMappingURL=derivation-ir.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"derivation-ir.d.ts","sourceRoot":"","sources":["../../src/derivation/derivation-ir.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,MAAM,mBAAmB,CAAC;AAE3B,qBAAa,mBAAmB;IAC/B,QAAQ,CAAC,WAAW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AC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC,GACnF,MAAM;IAIT,OAAO,CAAC,GAAG;CAIX;AAED,eAAO,MAAM,SAAS,GAAI,YAAY,MAAM,KAAG,cAO7C,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DerivationFallbackReason, DerivationPlan } from '@rasputin-ai/core';
|
|
2
|
+
export type Derivability = {
|
|
3
|
+
kind: 'exact';
|
|
4
|
+
expressionId: number;
|
|
5
|
+
shape: 'primitive' | 'object' | 'array' | 'unknown';
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'capture_root';
|
|
8
|
+
reason: import('@rasputin-ai/core').CaptureReason;
|
|
9
|
+
} | {
|
|
10
|
+
kind: 'fallback_function';
|
|
11
|
+
reason: DerivationFallbackReason;
|
|
12
|
+
};
|
|
13
|
+
export declare const functionIsExact: (plan: DerivationPlan) => boolean;
|
|
14
|
+
//# sourceMappingURL=derivation-proof.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"derivation-proof.d.ts","sourceRoot":"","sources":["../../src/derivation/derivation-proof.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAElF,MAAM,MAAM,YAAY,GACrB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAA;CAAE,GAC5F;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,MAAM,EAAE,OAAO,mBAAmB,EAAE,aAAa,CAAA;CAAE,GAC3E;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,MAAM,EAAE,wBAAwB,CAAA;CAAE,CAAC;AAEnE,eAAO,MAAM,eAAe,GAAI,MAAM,cAAc,KAAG,OAGxB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CaptureWrap } from './analyze-function';
|
|
2
|
+
export type SourceEdit = {
|
|
3
|
+
position: number;
|
|
4
|
+
text: string;
|
|
5
|
+
order: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const captureWrapEdits: (wraps: CaptureWrap[], capName: string) => SourceEdit[];
|
|
8
|
+
//# sourceMappingURL=emit-capture-plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emit-capture-plan.d.ts","sourceRoot":"","sources":["../../src/derivation/emit-capture-plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,MAAM,UAAU,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3E,eAAO,MAAM,gBAAgB,GAAI,OAAO,WAAW,EAAE,EAAE,SAAS,MAAM,KAAG,UAAU,EAgBlF,CAAC"}
|
|
@@ -6,14 +6,23 @@
|
|
|
6
6
|
import type { RasputinExecution } from './execution-recorder-types';
|
|
7
7
|
import type { EncodedFunctionPlan } from './function-plan';
|
|
8
8
|
export declare const AUTOMATIC_RUNTIME_SYMBOL = "rasputin.execution.runtime.v2";
|
|
9
|
-
type ModuleRunner = <T>(planIndex: number, args: ArrayLike<unknown>, callback: () => T) => T;
|
|
9
|
+
type ModuleRunner = <T>(planIndex: number, args: ArrayLike<unknown>, callback: () => T, omitValues?: boolean) => T;
|
|
10
|
+
type DispatchCell = {
|
|
11
|
+
run: ModuleRunner;
|
|
12
|
+
};
|
|
13
|
+
type RegisteredModule = {
|
|
14
|
+
plans: readonly EncodedFunctionPlan[];
|
|
15
|
+
cell: DispatchCell;
|
|
16
|
+
};
|
|
10
17
|
type AutomaticRuntime = {
|
|
11
|
-
|
|
18
|
+
bind: (module: RegisteredModule) => void;
|
|
19
|
+
captureRoot: (rootId: number, value: unknown) => unknown;
|
|
12
20
|
};
|
|
13
21
|
type AutomaticRuntimeRegistry = {
|
|
14
|
-
__rasputinRuntimeRegistry: true;
|
|
15
22
|
runtimes: AutomaticRuntime[];
|
|
23
|
+
modules: RegisteredModule[];
|
|
16
24
|
register: (plans: readonly EncodedFunctionPlan[]) => ModuleRunner;
|
|
25
|
+
captureRoot: (rootId: number, value: unknown) => unknown;
|
|
17
26
|
};
|
|
18
27
|
export declare const getAutomaticRuntimeRegistry: () => AutomaticRuntimeRegistry;
|
|
19
28
|
export declare const resetAutomaticExecutionRuntime: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automatic-runtime.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/automatic-runtime.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,eAAO,MAAM,wBAAwB,kCAAkC,CAAC;AAIxE,KAAK,YAAY,GAAG,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"automatic-runtime.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/automatic-runtime.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,eAAO,MAAM,wBAAwB,kCAAkC,CAAC;AAIxE,KAAK,YAAY,GAAG,CAAC,CAAC,EACrB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,EACxB,QAAQ,EAAE,MAAM,CAAC,EACjB,UAAU,CAAC,EAAE,OAAO,KAChB,CAAC,CAAC;AAEP,KAAK,YAAY,GAAG;IACnB,GAAG,EAAE,YAAY,CAAC;CAClB,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACvB,KAAK,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACtC,IAAI,EAAE,YAAY,CAAC;CACnB,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACvB,IAAI,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACzC,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;CACzD,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC/B,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,mBAAmB,EAAE,KAAK,YAAY,CAAC;IAClE,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;CACzD,CAAC;AAqCF,eAAO,MAAM,2BAA2B,QAAO,wBAY9C,CAAC;AAEF,eAAO,MAAM,8BAA8B,QAAO,IAEjD,CAAC;AAEF,sEAAsE;AACtE,eAAO,MAAM,gCAAgC,GAAI,WAAW,iBAAiB,KAAG,CAAC,MAAM,IAAI,CAsB1F,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Successful requests must not allocate one JavaScript object per enter/exit. This structure-of-arrays
|
|
3
|
+
* journal keeps fixed fields in typed arrays and materializes public events only when error state is
|
|
4
|
+
* requested. Pooled storage is bounded and drops every application-value reference before reuse.
|
|
5
|
+
*/
|
|
6
|
+
import type { RuntimeFunctionDefinition } from '@rasputin-ai/core';
|
|
7
|
+
import type { ExecutionEvent } from './execution-recorder-types';
|
|
8
|
+
import type { PreparedFunctionPlan } from './function-plan';
|
|
9
|
+
export declare const KIND_EXIT = 2;
|
|
10
|
+
export declare const KIND_THROW = 3;
|
|
11
|
+
export type CompactSuppression = {
|
|
12
|
+
count: number;
|
|
13
|
+
firstTimestampNs: bigint;
|
|
14
|
+
lastTimestampNs: bigint;
|
|
15
|
+
totalDurationNs: bigint;
|
|
16
|
+
functionId: string;
|
|
17
|
+
runtimePlanId: number;
|
|
18
|
+
parentCallId?: number;
|
|
19
|
+
storageIndex: number;
|
|
20
|
+
retainedIndex: number;
|
|
21
|
+
};
|
|
22
|
+
type MaterializedJournal = {
|
|
23
|
+
events: ExecutionEvent[];
|
|
24
|
+
functions: RuntimeFunctionDefinition[];
|
|
25
|
+
};
|
|
26
|
+
export declare const sanitizeJournalCapacity: (value: number | undefined) => number;
|
|
27
|
+
export declare class ExecutionJournal {
|
|
28
|
+
dropped: number;
|
|
29
|
+
allocatedBytes: number;
|
|
30
|
+
onGrow?: (deltaBytes: number) => boolean;
|
|
31
|
+
private length;
|
|
32
|
+
private kind;
|
|
33
|
+
private planId;
|
|
34
|
+
private callId;
|
|
35
|
+
private parentCallId;
|
|
36
|
+
private timestampNs;
|
|
37
|
+
private durationNs;
|
|
38
|
+
private suppressionIndex;
|
|
39
|
+
private readonly payloads;
|
|
40
|
+
private readonly suppressions;
|
|
41
|
+
private readonly openCallIds;
|
|
42
|
+
private readonly notedPlanIds;
|
|
43
|
+
private readonly notedPlanSet;
|
|
44
|
+
private readonly maxCapacity;
|
|
45
|
+
constructor(capacity: number);
|
|
46
|
+
get capacity(): number;
|
|
47
|
+
get hasOpenCalls(): boolean;
|
|
48
|
+
get eventCount(): number;
|
|
49
|
+
get payloadSlotCount(): number;
|
|
50
|
+
canStartCall(): boolean;
|
|
51
|
+
notePlan(runtimePlanId: number): void;
|
|
52
|
+
private registerSuppression;
|
|
53
|
+
startCall(runtimePlanId: number, callId: number, parentCallId: number | undefined, timestampNs: bigint, args: unknown[]): void;
|
|
54
|
+
finishCall(kind: typeof KIND_EXIT | typeof KIND_THROW, callId: number, timestampNs: bigint, durationNs: bigint, payload: unknown): void;
|
|
55
|
+
dropCall(): void;
|
|
56
|
+
appendSuppressed(group: CompactSuppression): boolean;
|
|
57
|
+
forceCompletedCall(runtimePlanId: number, callId: number, parentCallId: number | undefined, enterTimestampNs: bigint, args: unknown[], terminalKind: typeof KIND_EXIT | typeof KIND_THROW, terminalTimestampNs: bigint, durationNs: bigint, payload: unknown): boolean;
|
|
58
|
+
materialize(plansByRuntimeId: Array<PreparedFunctionPlan | undefined>, executionStartedAtNs: bigint): MaterializedJournal;
|
|
59
|
+
clear(): void;
|
|
60
|
+
private eventAt;
|
|
61
|
+
private write;
|
|
62
|
+
private ensureCapacity;
|
|
63
|
+
private reallocate;
|
|
64
|
+
private evictCompletedLeafOrSummary;
|
|
65
|
+
private removeAt;
|
|
66
|
+
}
|
|
67
|
+
export declare class ExecutionJournalPool {
|
|
68
|
+
private readonly capacity;
|
|
69
|
+
private readonly maxPooled;
|
|
70
|
+
hits: number;
|
|
71
|
+
misses: number;
|
|
72
|
+
private readonly available;
|
|
73
|
+
constructor(capacity: number, maxPooled?: number);
|
|
74
|
+
acquire(): ExecutionJournal;
|
|
75
|
+
release(journal: ExecutionJournal): void;
|
|
76
|
+
stats(): {
|
|
77
|
+
journalPoolHits: number;
|
|
78
|
+
journalPoolMisses: number;
|
|
79
|
+
journalPoolSize: number;
|
|
80
|
+
journalAllocatedCapacity: number;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export {};
|
|
84
|
+
//# sourceMappingURL=execution-journal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-journal.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/execution-journal.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAG5D,eAAO,MAAM,SAAS,IAAI,CAAC;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SAAS;IAN3B,IAAI,SAAK;IACT,MAAM,SAAK;IACX,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA0B;gBAGlC,QAAQ,EAAE,MAAM,EAChB,SAAS,SAAsB;IAGjD,OAAO,IAAI,gBAAgB;IAU3B,OAAO,CAAC,OAAO,EAAE,gBAAgB;IAYjC,KAAK;;;;;;CAQL"}
|
|
@@ -71,6 +71,21 @@ export type ExecutionRecorderStats = {
|
|
|
71
71
|
measuredExecutions: number;
|
|
72
72
|
totalInlineWallTimeMs: number;
|
|
73
73
|
maxInlineWallTimeMs: number;
|
|
74
|
+
journalPoolHits: number;
|
|
75
|
+
journalPoolMisses: number;
|
|
76
|
+
journalPoolSize: number;
|
|
77
|
+
journalAllocatedCapacity: number;
|
|
78
|
+
phaseAlsNs?: number;
|
|
79
|
+
phaseMaterializeNs?: number;
|
|
80
|
+
derivationCandidateFunctions: number;
|
|
81
|
+
derivationElidedFunctionCalls: number;
|
|
82
|
+
derivationRootsCaptured: number;
|
|
83
|
+
derivationControlFactsCaptured: number;
|
|
84
|
+
derivationValuesAvoided: number;
|
|
85
|
+
derivationFallbackFunctions: number;
|
|
86
|
+
derivationFallbackExpressions: number;
|
|
87
|
+
derivationFallbackReasons: Record<string, number>;
|
|
88
|
+
derivationRootBytes: number;
|
|
74
89
|
};
|
|
75
90
|
export type ExecutionScope = {
|
|
76
91
|
run: <T>(callback: () => T) => T;
|
|
@@ -85,11 +100,15 @@ export type RasputinExecution = {
|
|
|
85
100
|
/** Internal primitive used by SDK-owned source instrumentation. */
|
|
86
101
|
runFunction: <T>(definition: RuntimeFunctionDefinition | string, args: ArrayLike<unknown>, callback: () => T) => T;
|
|
87
102
|
/** Internal prepared-plan path used by automatic instrumentation. */
|
|
88
|
-
runFunctionPlans: <T>(plans: readonly EncodedFunctionPlan[], planIndex: number, args: ArrayLike<unknown>, callback: () => T) => T;
|
|
103
|
+
runFunctionPlans: <T>(plans: readonly EncodedFunctionPlan[], planIndex: number, args: ArrayLike<unknown>, callback: () => T, omitValues?: boolean) => T;
|
|
104
|
+
/** Resolve a module plan table once so generated wrappers can bind to prepared plans. */
|
|
105
|
+
prepareFunctionPlans: (plans: readonly EncodedFunctionPlan[]) => PreparedFunctionPlan[];
|
|
89
106
|
/** Internal primitive used after a module's function plans have been resolved. */
|
|
90
|
-
runPreparedFunction: <T>(plan: PreparedFunctionPlan, args: ArrayLike<unknown>, callback: () => T) => T;
|
|
107
|
+
runPreparedFunction: <T>(plan: PreparedFunctionPlan, args: ArrayLike<unknown>, callback: () => T, omitValues?: boolean) => T;
|
|
91
108
|
/** Manual fallback for runtimes/build systems without automatic instrumentation. */
|
|
92
109
|
trace: <TThis, TArgs extends unknown[], TResult>(definition: string | ExecutionFunctionDescriptor, fn: (this: TThis, ...args: TArgs) => TResult) => (this: TThis, ...args: TArgs) => TResult;
|
|
93
110
|
getStats: () => ExecutionRecorderStats;
|
|
111
|
+
/** Snapshot a derivation capture-boundary value immediately. Pass-through the live value. */
|
|
112
|
+
captureDerivationRoot: (rootId: number, value: unknown) => unknown;
|
|
94
113
|
};
|
|
95
114
|
//# sourceMappingURL=execution-recorder-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-recorder-types.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/execution-recorder-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EACX,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,mCAAmC,EACnC,yBAAyB,EACzB,yBAAyB,EACzB,cAAc,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEjF,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvD,MAAM,MAAM,wBAAwB,GAAG;IACtC,8FAA8F;IAC9F,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iF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AAM,EAC9C,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,EACxB,QAAQ,EAAE,MAAM,CAAC,KACb,CAAC,CAAC;IACP,qEAAqE;IACrE,gBAAgB,EAAE,CAAC,CAAC,EACnB,KAAK,EAAE,SAAS,mBAAmB,EAAE,EACrC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,EACxB,QAAQ,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"execution-recorder-types.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/execution-recorder-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EACX,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,mCAAmC,EACnC,yBAAyB,EACzB,yBAAyB,EACzB,cAAc,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEjF,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvD,MAAM,MAAM,wBAAwB,GAAG;IACtC,8FAA8F;IAC9F,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iFAAiF;IACjF,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,uGAAuG;IACvG,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,cAAc,CAAC,EAAE,wBAAwB,EAAE,CAAC;IAC5C,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB,CAAC,EAAE,MAAM,CAAC;C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ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"execution-recorder.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/execution-recorder.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAGX,wBAAwB,EAExB,iBAAiB,EACjB,MAAM,4BAA4B,CAAC;AAgRpC,wEAAwE;AACxE,eAAO,MAAM,uBAAuB,GACnC,SAAS,wBAAwB,GAAG,SAAS,KAC3C,iBA4yBF,CAAC"}
|
|
@@ -32,6 +32,7 @@ export declare class RecorderMemoryBudget {
|
|
|
32
32
|
captureValue(allocation: RecorderMemoryAllocation, serialize: () => SafeSerializedValue): unknown;
|
|
33
33
|
reserveCall(allocation: RecorderMemoryAllocation, estimatedBytes: number): boolean;
|
|
34
34
|
reserveStandaloneEvent(allocation: RecorderMemoryAllocation): boolean;
|
|
35
|
+
reserveStorage(allocation: RecorderMemoryAllocation, bytes: number): boolean;
|
|
35
36
|
release(allocation: RecorderMemoryAllocation): void;
|
|
36
37
|
getStats(): RecorderMemoryStats;
|
|
37
38
|
private reserve;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recorder-memory-budget.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/recorder-memory-budget.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAU5D,KAAK,WAAW,GAAG,MAAM,GAAG,gBAAgB,GAAG,eAAe,CAAC;AAE/D,MAAM,MAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE,WAAW,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IACjC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,wBAAwB,EAAE,MAA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B,aAAa,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IACjC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,wBAAwB,EAAE,MAAM,CAAC;IACjC,wBAAwB,EAAE,MAAM,CAAC;IACjC,0BAA0B,EAAE,MAAM,CAAC;IACnC,2BAA2B,EAAE,MAAM,CAAC;IACpC,2BAA2B,EAAE,MAAM,CAAC;CACpC,CAAC;AAEF,qBAAa,oBAAoB;IAY/B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,2BAA2B;IAZ7C,OAAO,CAAC,oBAAoB,CAAK;IACjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAOpB;gBAGgB,YAAY,EAAE,MAAM,EACpB,2BAA2B,EAAE,MAAM;IAGrD,cAAc,IAAI,wBAAwB;IAwB1C,YAAY,CACX,UAAU,EAAE,wBAAwB,EACpC,SAAS,EAAE,MAAM,mBAAmB,GAClC,OAAO;IAuBV,WAAW,CAAC,UAAU,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO;IAalF,sBAAsB,CAAC,UAAU,EAAE,wBAAwB,GAAG,OAAO;IAarE,cAAc,CAAC,UAAU,EAAE,wBAAwB,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;IAO5E,OAAO,CAAC,UAAU,EAAE,wBAAwB;IAQ5C,QAAQ,IAAI,mBAAmB;IAI/B,OAAO,CAAC,OAAO;IAcf,OAAO,CAAC,YAAY;IAgBpB,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,UAAU;CAIlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safe-serialize.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/safe-serialize.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"safe-serialize.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/safe-serialize.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAoG3E,eAAO,MAAM,oBAAoB,GAAI,OAAO,OAAO,KAAG,MAkCrD,CAAC;AA4EF,MAAM,MAAM,mBAAmB,GAAG;IACjC,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,4FAA4F;IAC5F,YAAY,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;IACvC,kBAAkB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,mBAAmB,CAAC;CAC5D,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,UAAS,wBAA6B,KAAG,cAuU7E,CAAC;AAYF,iFAAiF;AACjF,eAAO,MAAM,sBAAsB,GAClC,OAAO,OAAO,EACd,UAAS,wBAA6B,KACpC,mBAIyB,CAAC;AAE7B,0EAA0E;AAC1E,eAAO,MAAM,aAAa,GAAI,OAAO,OAAO,EAAE,UAAS,wBAA6B,KAAG,OAC1C,CAAC"}
|