@rasputin-ai/node 0.12.1 → 0.13.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 +2 -1
- package/dist/auto-instrumentation/instrumentation-manifest-registry.d.ts.map +1 -1
- package/dist/execution-recorder/execution-recorder.d.ts.map +1 -1
- package/dist/index.js +35 -29
- package/dist/instrument/build.js +10 -24
- package/dist/instrument/bun.js +1 -1
- package/dist/instrument/node.js +1 -1
- package/dist/internal.js +34 -28
- package/dist/sdk-meta.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type InstrumentationManifestContent } from '@rasputin-ai/core';
|
|
1
|
+
import { type InstrumentationManifestContent, type InstrumentationParamBinding } from '@rasputin-ai/core';
|
|
2
2
|
import type { InstrumentationManifestDelta } from '@rasputin-ai/instrumentation';
|
|
3
3
|
type SnapshotOptions = {
|
|
4
4
|
sourceRoot?: string;
|
|
@@ -17,6 +17,7 @@ export declare const instrumentationCoverageStats: () => {
|
|
|
17
17
|
};
|
|
18
18
|
export declare const instrumentationManifestModuleCount: () => number;
|
|
19
19
|
export declare const snapshotInstrumentationManifest: (options?: SnapshotOptions) => InstrumentationManifestContent | undefined;
|
|
20
|
+
export declare const paramsForRuntimeFunction: (functionId: string) => InstrumentationParamBinding[] | undefined;
|
|
20
21
|
export declare const markInstrumentationManifestUploaded: (generation: number) => void;
|
|
21
22
|
export declare const setInstrumentationManifestOnDirty: (onDirty?: () => void) => void;
|
|
22
23
|
export declare const resetInstrumentationManifestRegistry: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation-manifest-registry.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/instrumentation-manifest-registry.ts"],"names":[],"mappings":"AAOA,OAAO,EAGN,KAAK,8BAA8B,
|
|
1
|
+
{"version":3,"file":"instrumentation-manifest-registry.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/instrumentation-manifest-registry.ts"],"names":[],"mappings":"AAOA,OAAO,EAGN,KAAK,8BAA8B,EAEnC,KAAK,2BAA2B,EAGhC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AA4BjF,KAAK,eAAe,GAAG;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC,CAAC;AAoCF,eAAO,MAAM,kCAAkC,GAC9C,UAAU,MAAM,EAChB,OAAO,4BAA4B,KACjC,IASF,CAAC;AAEF,eAAO,MAAM,qCAAqC,GACjD,UAAU,8BAA8B,KACtC,IAKF,CAAC;AAcF,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,4BAA4B,QAAO;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CA0BxC,CAAC;AAEF,eAAO,MAAM,kCAAkC,QAAO,MAKrD,CAAC;AAQF,eAAO,MAAM,+BAA+B,GAC3C,UAAS,eAAoB,KAC3B,8BAA8B,GAAG,SAkGnC,CAAC;AAkBF,eAAO,MAAM,wBAAwB,GACpC,YAAY,MAAM,KAChB,2BAA2B,EAAE,GAAG,SAGlC,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-recorder.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/execution-recorder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"execution-recorder.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/execution-recorder.ts"],"names":[],"mappings":"AA8CA,OAAO,KAAK,EAAE,sBAAsB,EAAsB,MAAM,4BAA4B,CAAC;AAC7F,OAAO,KAAK,EAEX,wBAAwB,EACxB,gBAAgB,EAGhB,MAAM,4BAA4B,CAAC;AAmRpC,wEAAwE;AACxE,eAAO,MAAM,uBAAuB,GACnC,SAAS,wBAAwB,GAAG,SAAS,EAC7C,QAAO,sBAA2B,KAChC,gBA65DF,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -222,7 +222,6 @@ var snapshotInstrumentationManifest = (options = {}) => {
|
|
|
222
222
|
}
|
|
223
223
|
const functions = [];
|
|
224
224
|
const callSites = [];
|
|
225
|
-
const destructures = [];
|
|
226
225
|
const remember = (manifest) => {
|
|
227
226
|
registry.snapshotCache = {
|
|
228
227
|
generation: registry.generation,
|
|
@@ -237,13 +236,16 @@ var snapshotInstrumentationManifest = (options = {}) => {
|
|
|
237
236
|
if (!definition.source) continue;
|
|
238
237
|
functions.push({
|
|
239
238
|
functionId: definition.functionId,
|
|
240
|
-
source:
|
|
239
|
+
source: {
|
|
240
|
+
packageRelativePath: definition.source.packageRelativePath,
|
|
241
|
+
...definition.source.packageName ? { packageName: definition.source.packageName } : {},
|
|
242
|
+
...definition.source.repositoryPath ? { repositoryPath: definition.source.repositoryPath } : {}
|
|
243
|
+
},
|
|
241
244
|
name: fn.name,
|
|
242
245
|
startLine: fn.startLine,
|
|
243
246
|
startColumn: fn.startColumn,
|
|
244
247
|
endLine: fn.endLine,
|
|
245
248
|
endColumn: fn.endColumn,
|
|
246
|
-
params: fn.params,
|
|
247
249
|
...fn.instrumented === false ? { instrumented: false, skipReason: fn.skipReason } : {}
|
|
248
250
|
});
|
|
249
251
|
}
|
|
@@ -262,40 +264,25 @@ var snapshotInstrumentationManifest = (options = {}) => {
|
|
|
262
264
|
callerFunctionId: site.callerFunctionId,
|
|
263
265
|
calleeName: site.calleeName,
|
|
264
266
|
calleeText: site.calleeText,
|
|
265
|
-
source,
|
|
266
267
|
line: site.line,
|
|
267
268
|
column: site.column,
|
|
268
269
|
endLine: site.endLine,
|
|
269
270
|
endColumn: site.endColumn,
|
|
270
|
-
resultBinding: site.resultBinding
|
|
271
|
-
argIdentifiers: site.argIdentifiers
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
for (const destructure of delta.destructures) {
|
|
275
|
-
const source = sourceAt(destructure.filePath, destructure.line, destructure.column);
|
|
276
|
-
if (!source) continue;
|
|
277
|
-
destructures.push({
|
|
278
|
-
callerFunctionId: destructure.callerFunctionId,
|
|
279
|
-
sourceParam: destructure.sourceParam,
|
|
280
|
-
source,
|
|
281
|
-
line: destructure.line,
|
|
282
|
-
column: destructure.column,
|
|
283
|
-
binding: destructure.binding
|
|
271
|
+
resultBinding: site.resultBinding
|
|
284
272
|
});
|
|
285
273
|
}
|
|
286
274
|
}
|
|
287
275
|
if (registry.prebuilt && registry.files.size === 0) {
|
|
288
|
-
|
|
289
|
-
if (!options.sourceRoot && !options.sourceRoots) return remember(prebuilt);
|
|
276
|
+
if (!options.sourceRoot && !options.sourceRoots) return remember(registry.prebuilt);
|
|
290
277
|
return remember({
|
|
291
|
-
...prebuilt,
|
|
278
|
+
...registry.prebuilt,
|
|
292
279
|
sourceRoots: {
|
|
293
280
|
...options.sourceRoot ? { default: options.sourceRoot } : {},
|
|
294
281
|
packages: { ...options.sourceRoots ?? {} }
|
|
295
282
|
}
|
|
296
283
|
});
|
|
297
284
|
}
|
|
298
|
-
if (functions.length === 0 && callSites.length === 0
|
|
285
|
+
if (functions.length === 0 && callSites.length === 0) {
|
|
299
286
|
return remember(void 0);
|
|
300
287
|
}
|
|
301
288
|
const packages = { ...options.sourceRoots ?? {} };
|
|
@@ -308,10 +295,27 @@ var snapshotInstrumentationManifest = (options = {}) => {
|
|
|
308
295
|
}
|
|
309
296
|
} : {},
|
|
310
297
|
functions,
|
|
311
|
-
callSites
|
|
312
|
-
destructures
|
|
298
|
+
callSites
|
|
313
299
|
});
|
|
314
300
|
};
|
|
301
|
+
var collectParamsByFunctionId = () => {
|
|
302
|
+
const registry = getRegistry();
|
|
303
|
+
if (registry.paramsCache?.generation === registry.generation) return registry.paramsCache.params;
|
|
304
|
+
const params = /* @__PURE__ */ new Map();
|
|
305
|
+
for (const delta of registry.files.values()) {
|
|
306
|
+
for (const fn of delta.functions) {
|
|
307
|
+
if (!fn.params || fn.params.length === 0) continue;
|
|
308
|
+
const definition = definitionFromEncodedPlan(fn.plan);
|
|
309
|
+
params.set(definition.functionId, fn.params);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
registry.paramsCache = { generation: registry.generation, params };
|
|
313
|
+
return params;
|
|
314
|
+
};
|
|
315
|
+
var paramsForRuntimeFunction = (functionId) => {
|
|
316
|
+
const params = collectParamsByFunctionId().get(functionId);
|
|
317
|
+
return params && params.length > 0 ? params : void 0;
|
|
318
|
+
};
|
|
315
319
|
var markInstrumentationManifestUploaded = (generation) => {
|
|
316
320
|
const registry = getRegistry();
|
|
317
321
|
if (registry.generation === generation) registry.uploadedGeneration = generation;
|
|
@@ -3105,12 +3109,14 @@ var createExecutionRecorder = (options, hooks = {}) => {
|
|
|
3105
3109
|
if (cached) return cached;
|
|
3106
3110
|
const prepared = plans.map((encoded) => {
|
|
3107
3111
|
const definition = definitionFromEncodedPlan(encoded);
|
|
3112
|
+
const params = paramsForRuntimeFunction(definition.functionId);
|
|
3113
|
+
const withParams = params && params.length > 0 ? { ...definition, params } : definition;
|
|
3108
3114
|
return storePlan({
|
|
3109
3115
|
runtimePlanId: nextRuntimePlanId++,
|
|
3110
|
-
definition,
|
|
3111
|
-
functionId:
|
|
3112
|
-
excluded: excludesSource(
|
|
3113
|
-
estimatedCallBytes: estimatedCallBytesFor(
|
|
3116
|
+
definition: withParams,
|
|
3117
|
+
functionId: withParams.functionId,
|
|
3118
|
+
excluded: excludesSource(withParams),
|
|
3119
|
+
estimatedCallBytes: estimatedCallBytesFor(withParams.functionId),
|
|
3114
3120
|
omitCallValues: encodedPlanOmitsCallValues(encoded)
|
|
3115
3121
|
});
|
|
3116
3122
|
});
|
|
@@ -5491,7 +5497,7 @@ var installGlobalHandlers = (client, options = {}) => {
|
|
|
5491
5497
|
|
|
5492
5498
|
// src/sdk-meta.ts
|
|
5493
5499
|
var SDK_NAME = "@rasputin-ai/node";
|
|
5494
|
-
var SDK_VERSION = "0.
|
|
5500
|
+
var SDK_VERSION = "0.13.0";
|
|
5495
5501
|
|
|
5496
5502
|
// src/rasputin-init.ts
|
|
5497
5503
|
var publicExecution = (runtime) => ({
|
package/dist/instrument/build.js
CHANGED
|
@@ -1592,7 +1592,6 @@ var snapshotInstrumentationManifest = (options = {}) => {
|
|
|
1592
1592
|
}
|
|
1593
1593
|
const functions = [];
|
|
1594
1594
|
const callSites = [];
|
|
1595
|
-
const destructures = [];
|
|
1596
1595
|
const remember = (manifest) => {
|
|
1597
1596
|
registry.snapshotCache = {
|
|
1598
1597
|
generation: registry.generation,
|
|
@@ -1607,13 +1606,16 @@ var snapshotInstrumentationManifest = (options = {}) => {
|
|
|
1607
1606
|
if (!definition.source) continue;
|
|
1608
1607
|
functions.push({
|
|
1609
1608
|
functionId: definition.functionId,
|
|
1610
|
-
source:
|
|
1609
|
+
source: {
|
|
1610
|
+
packageRelativePath: definition.source.packageRelativePath,
|
|
1611
|
+
...definition.source.packageName ? { packageName: definition.source.packageName } : {},
|
|
1612
|
+
...definition.source.repositoryPath ? { repositoryPath: definition.source.repositoryPath } : {}
|
|
1613
|
+
},
|
|
1611
1614
|
name: fn.name,
|
|
1612
1615
|
startLine: fn.startLine,
|
|
1613
1616
|
startColumn: fn.startColumn,
|
|
1614
1617
|
endLine: fn.endLine,
|
|
1615
1618
|
endColumn: fn.endColumn,
|
|
1616
|
-
params: fn.params,
|
|
1617
1619
|
...fn.instrumented === false ? { instrumented: false, skipReason: fn.skipReason } : {}
|
|
1618
1620
|
});
|
|
1619
1621
|
}
|
|
@@ -1632,40 +1634,25 @@ var snapshotInstrumentationManifest = (options = {}) => {
|
|
|
1632
1634
|
callerFunctionId: site.callerFunctionId,
|
|
1633
1635
|
calleeName: site.calleeName,
|
|
1634
1636
|
calleeText: site.calleeText,
|
|
1635
|
-
source,
|
|
1636
1637
|
line: site.line,
|
|
1637
1638
|
column: site.column,
|
|
1638
1639
|
endLine: site.endLine,
|
|
1639
1640
|
endColumn: site.endColumn,
|
|
1640
|
-
resultBinding: site.resultBinding
|
|
1641
|
-
argIdentifiers: site.argIdentifiers
|
|
1642
|
-
});
|
|
1643
|
-
}
|
|
1644
|
-
for (const destructure of delta.destructures) {
|
|
1645
|
-
const source = sourceAt(destructure.filePath, destructure.line, destructure.column);
|
|
1646
|
-
if (!source) continue;
|
|
1647
|
-
destructures.push({
|
|
1648
|
-
callerFunctionId: destructure.callerFunctionId,
|
|
1649
|
-
sourceParam: destructure.sourceParam,
|
|
1650
|
-
source,
|
|
1651
|
-
line: destructure.line,
|
|
1652
|
-
column: destructure.column,
|
|
1653
|
-
binding: destructure.binding
|
|
1641
|
+
resultBinding: site.resultBinding
|
|
1654
1642
|
});
|
|
1655
1643
|
}
|
|
1656
1644
|
}
|
|
1657
1645
|
if (registry.prebuilt && registry.files.size === 0) {
|
|
1658
|
-
|
|
1659
|
-
if (!options.sourceRoot && !options.sourceRoots) return remember(prebuilt);
|
|
1646
|
+
if (!options.sourceRoot && !options.sourceRoots) return remember(registry.prebuilt);
|
|
1660
1647
|
return remember({
|
|
1661
|
-
...prebuilt,
|
|
1648
|
+
...registry.prebuilt,
|
|
1662
1649
|
sourceRoots: {
|
|
1663
1650
|
...options.sourceRoot ? { default: options.sourceRoot } : {},
|
|
1664
1651
|
packages: { ...options.sourceRoots ?? {} }
|
|
1665
1652
|
}
|
|
1666
1653
|
});
|
|
1667
1654
|
}
|
|
1668
|
-
if (functions.length === 0 && callSites.length === 0
|
|
1655
|
+
if (functions.length === 0 && callSites.length === 0) {
|
|
1669
1656
|
return remember(void 0);
|
|
1670
1657
|
}
|
|
1671
1658
|
const packages = { ...options.sourceRoots ?? {} };
|
|
@@ -1678,8 +1665,7 @@ var snapshotInstrumentationManifest = (options = {}) => {
|
|
|
1678
1665
|
}
|
|
1679
1666
|
} : {},
|
|
1680
1667
|
functions,
|
|
1681
|
-
callSites
|
|
1682
|
-
destructures
|
|
1668
|
+
callSites
|
|
1683
1669
|
});
|
|
1684
1670
|
};
|
|
1685
1671
|
var resetInstrumentationManifestRegistry = () => {
|
package/dist/instrument/bun.js
CHANGED
|
@@ -1606,7 +1606,7 @@ import ts14 from "typescript";
|
|
|
1606
1606
|
import { originalPositionFor as originalPositionFor2, TraceMap as TraceMap3 } from "@jridgewell/trace-mapping";
|
|
1607
1607
|
|
|
1608
1608
|
// src/sdk-meta.ts
|
|
1609
|
-
var SDK_VERSION = "0.
|
|
1609
|
+
var SDK_VERSION = "0.13.0";
|
|
1610
1610
|
|
|
1611
1611
|
// src/auto-instrumentation/source-map-locations.ts
|
|
1612
1612
|
import { readFileSync } from "node:fs";
|
package/dist/instrument/node.js
CHANGED
|
@@ -1668,7 +1668,7 @@ import ts14 from "typescript";
|
|
|
1668
1668
|
import { originalPositionFor as originalPositionFor3, TraceMap as TraceMap4 } from "@jridgewell/trace-mapping";
|
|
1669
1669
|
|
|
1670
1670
|
// src/sdk-meta.ts
|
|
1671
|
-
var SDK_VERSION = "0.
|
|
1671
|
+
var SDK_VERSION = "0.13.0";
|
|
1672
1672
|
|
|
1673
1673
|
// src/auto-instrumentation/transform-disk-cache.ts
|
|
1674
1674
|
var projectCacheDir = () => {
|
package/dist/internal.js
CHANGED
|
@@ -314,7 +314,6 @@ var snapshotInstrumentationManifest = (options = {}) => {
|
|
|
314
314
|
}
|
|
315
315
|
const functions = [];
|
|
316
316
|
const callSites = [];
|
|
317
|
-
const destructures = [];
|
|
318
317
|
const remember = (manifest) => {
|
|
319
318
|
registry.snapshotCache = {
|
|
320
319
|
generation: registry.generation,
|
|
@@ -329,13 +328,16 @@ var snapshotInstrumentationManifest = (options = {}) => {
|
|
|
329
328
|
if (!definition.source) continue;
|
|
330
329
|
functions.push({
|
|
331
330
|
functionId: definition.functionId,
|
|
332
|
-
source:
|
|
331
|
+
source: {
|
|
332
|
+
packageRelativePath: definition.source.packageRelativePath,
|
|
333
|
+
...definition.source.packageName ? { packageName: definition.source.packageName } : {},
|
|
334
|
+
...definition.source.repositoryPath ? { repositoryPath: definition.source.repositoryPath } : {}
|
|
335
|
+
},
|
|
333
336
|
name: fn.name,
|
|
334
337
|
startLine: fn.startLine,
|
|
335
338
|
startColumn: fn.startColumn,
|
|
336
339
|
endLine: fn.endLine,
|
|
337
340
|
endColumn: fn.endColumn,
|
|
338
|
-
params: fn.params,
|
|
339
341
|
...fn.instrumented === false ? { instrumented: false, skipReason: fn.skipReason } : {}
|
|
340
342
|
});
|
|
341
343
|
}
|
|
@@ -354,40 +356,25 @@ var snapshotInstrumentationManifest = (options = {}) => {
|
|
|
354
356
|
callerFunctionId: site.callerFunctionId,
|
|
355
357
|
calleeName: site.calleeName,
|
|
356
358
|
calleeText: site.calleeText,
|
|
357
|
-
source,
|
|
358
359
|
line: site.line,
|
|
359
360
|
column: site.column,
|
|
360
361
|
endLine: site.endLine,
|
|
361
362
|
endColumn: site.endColumn,
|
|
362
|
-
resultBinding: site.resultBinding
|
|
363
|
-
argIdentifiers: site.argIdentifiers
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
for (const destructure of delta.destructures) {
|
|
367
|
-
const source = sourceAt(destructure.filePath, destructure.line, destructure.column);
|
|
368
|
-
if (!source) continue;
|
|
369
|
-
destructures.push({
|
|
370
|
-
callerFunctionId: destructure.callerFunctionId,
|
|
371
|
-
sourceParam: destructure.sourceParam,
|
|
372
|
-
source,
|
|
373
|
-
line: destructure.line,
|
|
374
|
-
column: destructure.column,
|
|
375
|
-
binding: destructure.binding
|
|
363
|
+
resultBinding: site.resultBinding
|
|
376
364
|
});
|
|
377
365
|
}
|
|
378
366
|
}
|
|
379
367
|
if (registry.prebuilt && registry.files.size === 0) {
|
|
380
|
-
|
|
381
|
-
if (!options.sourceRoot && !options.sourceRoots) return remember(prebuilt);
|
|
368
|
+
if (!options.sourceRoot && !options.sourceRoots) return remember(registry.prebuilt);
|
|
382
369
|
return remember({
|
|
383
|
-
...prebuilt,
|
|
370
|
+
...registry.prebuilt,
|
|
384
371
|
sourceRoots: {
|
|
385
372
|
...options.sourceRoot ? { default: options.sourceRoot } : {},
|
|
386
373
|
packages: { ...options.sourceRoots ?? {} }
|
|
387
374
|
}
|
|
388
375
|
});
|
|
389
376
|
}
|
|
390
|
-
if (functions.length === 0 && callSites.length === 0
|
|
377
|
+
if (functions.length === 0 && callSites.length === 0) {
|
|
391
378
|
return remember(void 0);
|
|
392
379
|
}
|
|
393
380
|
const packages = { ...options.sourceRoots ?? {} };
|
|
@@ -400,10 +387,27 @@ var snapshotInstrumentationManifest = (options = {}) => {
|
|
|
400
387
|
}
|
|
401
388
|
} : {},
|
|
402
389
|
functions,
|
|
403
|
-
callSites
|
|
404
|
-
destructures
|
|
390
|
+
callSites
|
|
405
391
|
});
|
|
406
392
|
};
|
|
393
|
+
var collectParamsByFunctionId = () => {
|
|
394
|
+
const registry = getRegistry();
|
|
395
|
+
if (registry.paramsCache?.generation === registry.generation) return registry.paramsCache.params;
|
|
396
|
+
const params = /* @__PURE__ */ new Map();
|
|
397
|
+
for (const delta of registry.files.values()) {
|
|
398
|
+
for (const fn of delta.functions) {
|
|
399
|
+
if (!fn.params || fn.params.length === 0) continue;
|
|
400
|
+
const definition = definitionFromEncodedPlan(fn.plan);
|
|
401
|
+
params.set(definition.functionId, fn.params);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
registry.paramsCache = { generation: registry.generation, params };
|
|
405
|
+
return params;
|
|
406
|
+
};
|
|
407
|
+
var paramsForRuntimeFunction = (functionId) => {
|
|
408
|
+
const params = collectParamsByFunctionId().get(functionId);
|
|
409
|
+
return params && params.length > 0 ? params : void 0;
|
|
410
|
+
};
|
|
407
411
|
var markInstrumentationManifestUploaded = (generation) => {
|
|
408
412
|
const registry = getRegistry();
|
|
409
413
|
if (registry.generation === generation) registry.uploadedGeneration = generation;
|
|
@@ -3075,12 +3079,14 @@ var createExecutionRecorder = (options, hooks = {}) => {
|
|
|
3075
3079
|
if (cached) return cached;
|
|
3076
3080
|
const prepared = plans.map((encoded) => {
|
|
3077
3081
|
const definition = definitionFromEncodedPlan(encoded);
|
|
3082
|
+
const params = paramsForRuntimeFunction(definition.functionId);
|
|
3083
|
+
const withParams = params && params.length > 0 ? { ...definition, params } : definition;
|
|
3078
3084
|
return storePlan({
|
|
3079
3085
|
runtimePlanId: nextRuntimePlanId++,
|
|
3080
|
-
definition,
|
|
3081
|
-
functionId:
|
|
3082
|
-
excluded: excludesSource(
|
|
3083
|
-
estimatedCallBytes: estimatedCallBytesFor(
|
|
3086
|
+
definition: withParams,
|
|
3087
|
+
functionId: withParams.functionId,
|
|
3088
|
+
excluded: excludesSource(withParams),
|
|
3089
|
+
estimatedCallBytes: estimatedCallBytesFor(withParams.functionId),
|
|
3084
3090
|
omitCallValues: encodedPlanOmitsCallValues(encoded)
|
|
3085
3091
|
});
|
|
3086
3092
|
});
|
package/dist/sdk-meta.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rasputin-ai/node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Official Rasputin AI SDK for Node and Bun.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
52
|
-
"@rasputin-ai/core": "0.
|
|
52
|
+
"@rasputin-ai/core": "0.13.0",
|
|
53
53
|
"typescript": "5"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|