@rasputin-ai/node 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.
Files changed (51) hide show
  1. package/README.md +143 -16
  2. package/dist/auto-instrumentation/bun-plugin.d.ts +23 -0
  3. package/dist/auto-instrumentation/bun-plugin.d.ts.map +1 -0
  4. package/dist/auto-instrumentation/collect-instrumentation-delta.d.ts +64 -0
  5. package/dist/auto-instrumentation/collect-instrumentation-delta.d.ts.map +1 -0
  6. package/dist/auto-instrumentation/format-configuration-report.d.ts +14 -0
  7. package/dist/auto-instrumentation/format-configuration-report.d.ts.map +1 -0
  8. package/dist/auto-instrumentation/instrumentation-manifest-registry.d.ts +17 -0
  9. package/dist/auto-instrumentation/instrumentation-manifest-registry.d.ts.map +1 -0
  10. package/dist/auto-instrumentation/node-hooks.d.ts +6 -0
  11. package/dist/auto-instrumentation/node-hooks.d.ts.map +1 -0
  12. package/dist/auto-instrumentation/schedule-instrumentation-manifest-upload.d.ts +26 -0
  13. package/dist/auto-instrumentation/schedule-instrumentation-manifest-upload.d.ts.map +1 -0
  14. package/dist/auto-instrumentation/sdk-source-boundary.d.ts +7 -0
  15. package/dist/auto-instrumentation/sdk-source-boundary.d.ts.map +1 -0
  16. package/dist/auto-instrumentation/source-classification.d.ts +10 -0
  17. package/dist/auto-instrumentation/source-classification.d.ts.map +1 -0
  18. package/dist/auto-instrumentation/source-map-locations.d.ts +3 -0
  19. package/dist/auto-instrumentation/source-map-locations.d.ts.map +1 -0
  20. package/dist/auto-instrumentation/transform-source.d.ts +18 -0
  21. package/dist/auto-instrumentation/transform-source.d.ts.map +1 -0
  22. package/dist/execution-recorder/automatic-runtime.d.ts +21 -0
  23. package/dist/execution-recorder/automatic-runtime.d.ts.map +1 -0
  24. package/dist/execution-recorder/call-aware-event-buffer.d.ts +23 -0
  25. package/dist/execution-recorder/call-aware-event-buffer.d.ts.map +1 -0
  26. package/dist/execution-recorder/execution-recorder-types.d.ts +75 -0
  27. package/dist/execution-recorder/execution-recorder-types.d.ts.map +1 -0
  28. package/dist/execution-recorder/execution-recorder.d.ts +4 -0
  29. package/dist/execution-recorder/execution-recorder.d.ts.map +1 -0
  30. package/dist/execution-recorder/index.d.ts +3 -0
  31. package/dist/execution-recorder/index.d.ts.map +1 -0
  32. package/dist/execution-recorder/recorder-memory-budget.d.ts +37 -0
  33. package/dist/execution-recorder/recorder-memory-budget.d.ts.map +1 -0
  34. package/dist/execution-recorder/safe-serialize.d.ts +10 -0
  35. package/dist/execution-recorder/safe-serialize.d.ts.map +1 -0
  36. package/dist/execution-recorder/source-exclusions.d.ts +10 -0
  37. package/dist/execution-recorder/source-exclusions.d.ts.map +1 -0
  38. package/dist/index.d.ts +5 -0
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +1393 -5
  41. package/dist/instrument/bun.d.ts +2 -0
  42. package/dist/instrument/bun.d.ts.map +1 -0
  43. package/dist/instrument/bun.js +489 -0
  44. package/dist/instrument/node.d.ts +2 -0
  45. package/dist/instrument/node.d.ts.map +1 -0
  46. package/dist/instrument/node.js +544 -0
  47. package/dist/rasputin-init.d.ts +24 -4
  48. package/dist/rasputin-init.d.ts.map +1 -1
  49. package/dist/sdk-meta.d.ts +2 -2
  50. package/dist/sdk-meta.d.ts.map +1 -1
  51. package/package.json +15 -4
@@ -0,0 +1,10 @@
1
+ import type { ExecutionRecorderOptions } from './execution-recorder-types';
2
+ export type SafeSerializedValue = {
3
+ value: unknown;
4
+ bytes: number;
5
+ };
6
+ /** Safely converts an arbitrary value and reports its bounded JSON byte size. */
7
+ export declare const safeSerializeWithBytes: (value: unknown, options?: ExecutionRecorderOptions) => SafeSerializedValue;
8
+ /** Safely converts an arbitrary value to bounded JSON-compatible data. */
9
+ export declare const safeSerialize: (value: unknown, options?: ExecutionRecorderOptions) => unknown;
10
+ //# sourceMappingURL=safe-serialize.d.ts.map
@@ -0,0 +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;AA4K3E,MAAM,MAAM,mBAAmB,GAAG;IACjC,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,sBAAsB,GAClC,OAAO,OAAO,EACd,UAAS,wBAA6B,KACpC,mBA+BF,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,aAAa,GAAI,OAAO,OAAO,EAAE,UAAS,wBAA6B,KAAG,OAC1C,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Source exclusions remove known-noisy utility subtrees before values are serialized. Doing this at
3
+ * capture time avoids both CPU work and accidental retention of redundant logger/framework state,
4
+ * while compiling patterns once keeps the exclusion feature off the hot path.
5
+ */
6
+ import type { RuntimeFunctionDefinition } from '@rasputin-ai/core';
7
+ import type { ExecutionSourceExclusion } from './execution-recorder-types';
8
+ /** Compile exclusions once so skipped calls avoid serialization and repeated pattern work. */
9
+ export declare const createSourceExclusionMatcher: (exclusions: ExecutionSourceExclusion[] | undefined) => ((definition: RuntimeFunctionDefinition) => boolean);
10
+ //# sourceMappingURL=source-exclusions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-exclusions.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/source-exclusions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AA2C3E,8FAA8F;AAC9F,eAAO,MAAM,4BAA4B,GACxC,YAAY,wBAAwB,EAAE,GAAG,SAAS,KAChD,CAAC,CAAC,UAAU,EAAE,yBAAyB,KAAK,OAAO,CAgCrD,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,10 @@
1
1
  export type { CaptureContext, RasputinClient, RasputinOptions } from '@rasputin-ai/core';
2
+ export { scheduleInstrumentationManifestUpload } from './auto-instrumentation/schedule-instrumentation-manifest-upload';
3
+ export type { ExecutionKind, ExecutionMetadata, ExecutionRecorderOptions, ExecutionRecorderStats, ExecutionScope, ExecutionSourceExclusion, ExecutionState, RasputinExecution, } from './execution-recorder';
4
+ export { createExecutionRecorder } from './execution-recorder';
5
+ export { installAutomaticExecutionRuntime } from './execution-recorder/automatic-runtime';
2
6
  export type { InstallGlobalHandlersOptions } from './install-global-handlers';
3
7
  export { installGlobalHandlers } from './install-global-handlers';
8
+ export type { RasputinNodeClient, RasputinNodeClientStats, RasputinNodeOptions, } from './rasputin-init';
4
9
  export { RasputinInit } from './rasputin-init';
5
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzF,YAAY,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzF,OAAO,EAAE,qCAAqC,EAAE,MAAM,iEAAiE,CAAC;AACxH,YAAY,EACX,aAAa,EACb,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,cAAc,EACd,wBAAwB,EACxB,cAAc,EACd,iBAAiB,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAC1F,YAAY,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,YAAY,EACX,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,GACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}