@rasputin-ai/elysia 0.2.0 → 0.3.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/README.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Official Rasputin AI SDK for Elysia
2
2
 
3
- ## Usage
3
+ Report application errors to Rasputin.
4
+
5
+ ## Setup
6
+
7
+ Initialize once and register the plugin early in your app:
4
8
 
5
9
  ```ts
6
10
  import { Elysia } from 'elysia';
@@ -8,25 +12,143 @@ import { RasputinInit } from '@rasputin-ai/elysia';
8
12
 
9
13
  const { client, plugin } = RasputinInit({
10
14
  projectApiKey: process.env.RASPUTIN_PROJECT_API_KEY!,
15
+ release: process.env.RASPUTIN_RELEASE!,
11
16
  environment: process.env.NODE_ENV ?? 'development',
12
- release: process.env.RASPUTIN_RELEASE,
17
+ enabled: ['staging', 'production'].includes(process.env.NODE_ENV ?? 'development'),
13
18
  moduleUrl: import.meta.url,
14
19
  });
15
20
 
16
- const app = new Elysia().use(plugin);
21
+ const app = new Elysia()
22
+ .use(plugin) // Register Rasputin before other plugins when possible.
23
+ .use(otherPlugins)
24
+ .listen(3000);
17
25
  ```
18
26
 
19
- Route errors are captured via the plugin. Use `client.captureException(error)` for manual reporting.
27
+ Route errors, uncaught exceptions, and unhandled rejections are reported automatically.
28
+
29
+ ## Capture handled errors
20
30
 
21
- For short-lived processes, call `await client.flush()` before exit.
31
+ ```ts
32
+ try {
33
+ await processPayment();
34
+ } catch (error) {
35
+ client.captureException(error);
36
+ }
37
+ ```
22
38
 
23
- ## Options
39
+ ## Configuration
24
40
 
25
41
  | Field | Required | Description |
26
42
  | --- | --- | --- |
27
43
  | `projectApiKey` | yes | Project API key from the Rasputin dashboard |
28
- | `environment` | yes | Where errors occur, e.g. `production`, `staging` |
29
- | `release` | no | Git commit SHA. Prefer `process.env.RASPUTIN_RELEASE`; auto-detected from platform env / `.git` when omitted |
30
- | `enabled` | no | Master switch. Default `true` |
31
- | `moduleUrl` | one of these two | `import.meta.url` from the file where you call `RasputinInit`. Lets Rasputin find your project folder. |
32
- | `repoRoot` | one of these two | Your project folder the one you open in your editor. Use this when `moduleUrl` isn't enough (for example in Docker). |
44
+ | `environment` | yes | Environment such as `production`, `staging`, or `preview` |
45
+ | `release` | yes | Git commit SHA for the deployed version |
46
+ | `enabled` | no | Enables or disables the SDK; defaults to `true` |
47
+ | `moduleUrl` | one of these two | `import.meta.url` from the initialization file |
48
+ | `repoRoot` | one of these two | Explicit source root for deployments with a different filesystem layout |
49
+
50
+ ## Shutdown
51
+
52
+ Events are sent in the background. Flush before a short-lived process exits:
53
+
54
+ ```ts
55
+ await client.flush();
56
+ ```
57
+
58
+ Call `await client.close()` during graceful shutdown when the process stays alive afterward.
59
+
60
+ ---
61
+
62
+ # Runtime recorder
63
+
64
+ Optionally attach the runtime state that led to an error — arguments, return values, and call history from the failing execution.
65
+
66
+ The Elysia plugin scopes each HTTP request as an execution automatically. For background jobs and other non-HTTP work, wrap them manually (see below).
67
+
68
+ ## Automatic instrumentation
69
+
70
+ Start your process with the adapter for your runtime so Rasputin can instrument application functions as they load:
71
+
72
+ ```json
73
+ {
74
+ "scripts": {
75
+ "start:node": "node --import @rasputin-ai/elysia/instrument/node dist/app.js",
76
+ "start:bun": "bun --preload @rasputin-ai/elysia/instrument/bun src/app.ts"
77
+ }
78
+ }
79
+ ```
80
+
81
+ Runtime state is retained only inside an active execution and attached when that execution throws.
82
+
83
+ ## Manual capture
84
+
85
+ For background jobs, scheduled tasks, or worker iterations, define an execution:
86
+
87
+ ```ts
88
+ await client.execution.run({ kind: 'job', name: 'sync-invoices' }, async () => {
89
+ await syncInvoices();
90
+ });
91
+ ```
92
+
93
+ When automatic instrumentation is unavailable, mark individual functions explicitly:
94
+
95
+ ```ts
96
+ const syncInvoices = client.execution.trace(
97
+ 'src/jobs/sync-invoices.ts:syncInvoices',
98
+ async () => {
99
+ // ...
100
+ },
101
+ );
102
+ ```
103
+
104
+ ## Runtime support
105
+
106
+ | Environment | Support |
107
+ | --- | --- |
108
+ | Elysia 1.4 or newer within 1.x on Bun 1.3.x | Supported for directly loaded JavaScript and TypeScript using `instrument/bun` |
109
+ | Elysia 1.4 or newer within 1.x on Node.js 22.15 or newer | Supported for unbundled ESM/CJS JavaScript using `instrument/node`; Node 22 and 24 are the supported LTS lines |
110
+ | TypeScript compiled to multiple JavaScript files | Supported on Node; emit adjacent source maps to retain original TypeScript locations |
111
+ | Single-file bundles (esbuild, tsup, webpack, Vite SSR, Next.js) | Automatic instrumentation not supported |
112
+ | `tsx`, custom Node loader stacks, and Node's native TypeScript execution | Automatic instrumentation not supported |
113
+ | Deno and edge runtimes | Not supported |
114
+
115
+ Tested on Bun 1.3.13, Node.js 24.19.0, and Elysia 1.4.28. Node.js 22.15.0 is the minimum for automatic instrumentation (synchronous module hooks). Use `execution.run()` and `execution.trace()` when automatic instrumentation is not available.
116
+
117
+ ## Recorder configuration
118
+
119
+ Defaults work for most apps. Customize to exclude noisy sources, redact fields, or retain less state:
120
+
121
+ | Field | Default | Description |
122
+ | --- | ---: | --- |
123
+ | `enabled` | `true` | Enables runtime-state capture |
124
+ | `maxEventsPerExecution` | `500` | Maximum events retained for one execution |
125
+ | `maxCapturedCallsPerFunction` | `3` | Detailed successful calls retained before similar calls are summarized |
126
+ | `maxActiveMemoryBytes` | `64 MiB` | Maximum recorder memory shared across active executions |
127
+ | `maxDepth` | `3` | Maximum captured value depth |
128
+ | `maxObjectKeys` | `30` | Maximum properties retained from one object |
129
+ | `maxArrayElements` | `20` | Maximum items retained from one array, map, or set |
130
+ | `maxStringLength` | `500` | Maximum characters retained from one string |
131
+ | `maxSerializedValueBytes` | `8 KiB` | Maximum retained size of one captured value |
132
+ | `redactKeys` | `[]` | Additional case-insensitive property names to redact |
133
+ | `excludeSources` | `[]` | Source globs or function-ID patterns to exclude |
134
+
135
+ ```ts
136
+ const { client, plugin } = RasputinInit({
137
+ // ...required options
138
+ executionRecorder: {
139
+ excludeSources: ['src/logger/**', 'packages/shared-logger/**'],
140
+ redactKeys: ['customerEmail'],
141
+ maxEventsPerExecution: 200,
142
+ },
143
+ });
144
+ ```
145
+
146
+ Runtime state can include application data. Use `redactKeys` for sensitive fields.
147
+
148
+ ## Diagnostics
149
+
150
+ ```ts
151
+ const { recorder, transport } = client.getStats();
152
+ ```
153
+
154
+ Counters are local to the current process and reset on restart.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export type { CaptureContext, RasputinClient, RasputinOptions } from '@rasputin-ai/core';
2
- export type { RasputinElysia, RasputinElysiaPlugin } from './rasputin-init';
2
+ export type { RasputinElysia, RasputinElysiaOptions, RasputinElysiaPlugin } from './rasputin-init';
3
3
  export { RasputinInit } from './rasputin-init';
4
4
  //# 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,cAAc,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC5E,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,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -1,16 +1,54 @@
1
1
  // src/rasputin-init.ts
2
2
  import {
3
3
  createClient,
4
- isClientEnabled
4
+ isClientEnabled,
5
+ resolveRepoRoot
5
6
  } from "@rasputin-ai/core";
6
- import { installGlobalHandlers } from "@rasputin-ai/node";
7
+ import {
8
+ createExecutionRecorder,
9
+ installAutomaticExecutionRuntime,
10
+ installGlobalHandlers,
11
+ scheduleInstrumentationManifestUpload
12
+ } from "@rasputin-ai/node";
7
13
  import { Elysia } from "elysia";
8
14
 
9
15
  // src/sdk-meta.ts
10
16
  var SDK_NAME = "@rasputin-ai/elysia";
11
- var SDK_VERSION = "0.2.0";
17
+ var SDK_VERSION = "0.3.0";
12
18
 
13
19
  // src/rasputin-init.ts
20
+ var withExecution = (client, execution, installRuntime, repoRoot, manifest) => {
21
+ const uninstallRuntime = installRuntime ? installAutomaticExecutionRuntime(execution, { repoRoot }) : () => {
22
+ };
23
+ const manifestUpload = scheduleInstrumentationManifestUpload({
24
+ ...manifest,
25
+ repoRoot
26
+ });
27
+ return {
28
+ ...client,
29
+ execution,
30
+ getStats: () => ({ ...client.getStats(), recorder: execution.getStats() }),
31
+ captureException: (error, context) => {
32
+ const runtimeState = context?.runtimeState ?? execution.getErrorState(
33
+ error,
34
+ context?.request ? { kind: "http", request: context.request } : void 0
35
+ );
36
+ const result = client.captureException(error, { ...context, runtimeState });
37
+ manifestUpload.flushSoon();
38
+ return result;
39
+ },
40
+ flush: async (timeoutMs) => {
41
+ await client.flush(timeoutMs);
42
+ await manifestUpload.wait();
43
+ },
44
+ close: async () => {
45
+ uninstallRuntime();
46
+ manifestUpload.disconnect();
47
+ await client.close();
48
+ await manifestUpload.wait();
49
+ }
50
+ };
51
+ };
14
52
  var toStatus = (status) => {
15
53
  if (typeof status === "number" && Number.isFinite(status)) return status;
16
54
  if (typeof status === "string") {
@@ -19,20 +57,72 @@ var toStatus = (status) => {
19
57
  }
20
58
  return void 0;
21
59
  };
22
- var buildPlugin = (client) => new Elysia({ name: "rasputin" }).decorate("rasputin", client).onError({ as: "global" }, ({ error, request, set, route }) => {
60
+ var isPromiseLike = (value) => {
61
+ return Boolean(value) && typeof value.then === "function";
62
+ };
63
+ var finishExecution = (scope, metadata) => {
23
64
  try {
24
- client.captureException(error, {
25
- request: {
26
- method: request.method,
27
- route: route || void 0,
28
- status: toStatus(set.status)
29
- }
30
- });
65
+ scope.finish(metadata);
66
+ } catch {
67
+ }
68
+ };
69
+ var rememberExecutionError = (scope, error) => {
70
+ try {
71
+ scope.getErrorState(error);
31
72
  } catch {
32
73
  }
33
- return;
34
- });
35
- var RasputinInit = (options, hooks = {}) => {
74
+ };
75
+ var buildPlugin = (client, execution, recorderEnabled) => {
76
+ const executionBoundary = ((handler, initialRequest) => {
77
+ const scope = execution.createScope({
78
+ kind: "http",
79
+ request: { method: initialRequest.method }
80
+ });
81
+ return (request) => scope.run(() => {
82
+ try {
83
+ const response = handler(request);
84
+ if (isPromiseLike(response)) {
85
+ return Promise.resolve(response).then(
86
+ (value) => {
87
+ finishExecution(scope, { request: { status: value.status } });
88
+ return value;
89
+ },
90
+ (error) => {
91
+ rememberExecutionError(scope, error);
92
+ finishExecution(scope);
93
+ throw error;
94
+ }
95
+ );
96
+ }
97
+ finishExecution(scope, { request: { status: response.status } });
98
+ return response;
99
+ } catch (error) {
100
+ rememberExecutionError(scope, error);
101
+ finishExecution(scope);
102
+ throw error;
103
+ }
104
+ });
105
+ });
106
+ const plugin = new Elysia({ name: "rasputin" }).decorate("rasputin", client);
107
+ if (recorderEnabled) plugin.wrap(executionBoundary);
108
+ return plugin.onError({ as: "global" }, ({ error, request, set, route }) => {
109
+ const requestContext = {
110
+ method: request.method,
111
+ route: route || void 0,
112
+ status: toStatus(set.status)
113
+ };
114
+ try {
115
+ const runtimeState = execution.getErrorState(error, {
116
+ kind: "http",
117
+ request: requestContext
118
+ });
119
+ client.captureException(error, { request: requestContext, runtimeState });
120
+ } catch {
121
+ }
122
+ return;
123
+ });
124
+ };
125
+ function RasputinInit(options, hooks = {}) {
36
126
  try {
37
127
  const {
38
128
  installGlobalHandlers: installProcessHandlers = true,
@@ -47,15 +137,43 @@ var RasputinInit = (options, hooks = {}) => {
47
137
  sdkVersion: SDK_VERSION,
48
138
  sdkName: SDK_NAME
49
139
  });
140
+ const recorderEnabled = isClientEnabled(options) && options.executionRecorder?.enabled !== false;
141
+ const execution = createExecutionRecorder({
142
+ ...options.executionRecorder,
143
+ enabled: recorderEnabled
144
+ });
145
+ const wrappedClient = withExecution(
146
+ client,
147
+ execution,
148
+ recorderEnabled,
149
+ resolveRepoRoot(options),
150
+ {
151
+ projectApiKey: options.projectApiKey,
152
+ release: options.release,
153
+ apiUrl: options.apiUrl,
154
+ fetch,
155
+ enabled: isClientEnabled(options)
156
+ }
157
+ );
50
158
  if (isClientEnabled(options) && installProcessHandlers) {
51
- installGlobalHandlers(client);
159
+ installGlobalHandlers(wrappedClient);
52
160
  }
53
- return { client, plugin: buildPlugin(client) };
161
+ return {
162
+ client: wrappedClient,
163
+ plugin: buildPlugin(wrappedClient, execution, recorderEnabled)
164
+ };
54
165
  } catch {
55
166
  const client = createClient({ ...options, enabled: false });
56
- return { client, plugin: buildPlugin(client) };
167
+ const execution = createExecutionRecorder({ enabled: false });
168
+ const wrappedClient = withExecution(client, execution, false, void 0, {
169
+ projectApiKey: options.projectApiKey,
170
+ release: options.release,
171
+ apiUrl: options.apiUrl,
172
+ enabled: false
173
+ });
174
+ return { client: wrappedClient, plugin: buildPlugin(wrappedClient, execution, false) };
57
175
  }
58
- };
176
+ }
59
177
  export {
60
178
  RasputinInit
61
179
  };
@@ -0,0 +1,3 @@
1
+ /** Elysia convenience entry point; instrumentation is shared with the Node/Bun SDK. */
2
+ import '@rasputin-ai/node/instrument/bun';
3
+ //# sourceMappingURL=bun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bun.d.ts","sourceRoot":"","sources":["../../src/instrument/bun.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,OAAO,kCAAkC,CAAC"}
@@ -0,0 +1,2 @@
1
+ // src/instrument/bun.ts
2
+ import "@rasputin-ai/node/instrument/bun";
@@ -0,0 +1,3 @@
1
+ /** Elysia convenience entry point; instrumentation is shared with the Node/Bun SDK. */
2
+ import '@rasputin-ai/node/instrument/node';
3
+ //# sourceMappingURL=node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/instrument/node.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,OAAO,mCAAmC,CAAC"}
@@ -0,0 +1,2 @@
1
+ // src/instrument/node.ts
2
+ import "@rasputin-ai/node/instrument/node";
@@ -1,21 +1,24 @@
1
- import { type RasputinClient, type RasputinOptions } from '@rasputin-ai/core';
1
+ /**
2
+ * Elysia owns a reliable request/response lifecycle, so this integration creates HTTP execution
3
+ * boundaries automatically around the full middleware and handler chain. Framework-specific code is
4
+ * intentionally limited to lifecycle wiring; recording, serialization, and safety policy stay in
5
+ * the framework-neutral Node recorder.
6
+ */
7
+ import { type RasputinOptions } from '@rasputin-ai/core';
8
+ import { type ExecutionRecorderOptions, type RasputinExecution, type RasputinNodeClient } from '@rasputin-ai/node';
2
9
  import { Elysia } from 'elysia';
3
10
  export type RasputinElysiaPlugin = ReturnType<typeof buildPlugin>;
4
11
  export type RasputinElysia = {
5
- client: RasputinClient;
12
+ client: RasputinNodeClient;
6
13
  plugin: RasputinElysiaPlugin;
7
14
  };
8
- /** Test / internal seams not part of the public init API. */
9
- type RasputinElysiaHooks = {
10
- fetch?: (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
11
- announceDeploy?: boolean;
12
- installTransportSignalHandlers?: boolean;
13
- /** Install process uncaught/rejection handlers. Default true. */
14
- installGlobalHandlers?: boolean;
15
+ export type RasputinElysiaOptions = RasputinOptions & {
16
+ /** Bounded runtime-state capture. Enabled by default; successful executions are discarded. */
17
+ executionRecorder?: ExecutionRecorderOptions;
15
18
  };
16
- declare const buildPlugin: (client: RasputinClient) => Elysia<"", {
19
+ declare const buildPlugin: (client: RasputinNodeClient, execution: RasputinExecution, recorderEnabled: boolean) => Elysia<"", {
17
20
  decorator: {
18
- rasputin: RasputinClient;
21
+ rasputin: RasputinNodeClient;
19
22
  };
20
23
  store: {};
21
24
  derive: {};
@@ -48,17 +51,18 @@ declare const buildPlugin: (client: RasputinClient) => Elysia<"", {
48
51
  *
49
52
  * @example
50
53
  * const { client, plugin } = RasputinInit({
51
- * projectApiKey: process.env.RASPUTIN_PROJECT_API_KEY!,
52
- * environment: process.env.NODE_ENV ?? 'development',
53
- * release: process.env.RASPUTIN_RELEASE,
54
- * moduleUrl: import.meta.url,
54
+ * projectApiKey: process.env.RASPUTIN_PROJECT_API_KEY!,
55
+ * release: process.env.RASPUTIN_RELEASE!,
56
+ * environment: process.env.NODE_ENV ?? 'development',
57
+ * enabled: ['staging', 'production'].includes(process.env.NODE_ENV ?? 'development'),
58
+ * moduleUrl: import.meta.url,
55
59
  * });
56
- * app.use(plugin);
60
+ * app.use(plugin); // Chain this plugin as early as possible with .use(), before any other plugins or middleware.
57
61
  * client.captureException(err); // manual capture
58
62
  * await client.flush(); // serverless shutdown
59
63
  *
60
64
  * Never throws into the host app.
61
65
  */
62
- export declare const RasputinInit: (options: RasputinOptions, hooks?: RasputinElysiaHooks) => RasputinElysia;
66
+ export declare function RasputinInit(options: RasputinElysiaOptions): RasputinElysia;
63
67
  export {};
64
68
  //# sourceMappingURL=rasputin-init.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rasputin-init.d.ts","sourceRoot":"","sources":["../src/rasputin-init.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAElE,MAAM,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,oBAAoB,CAAC;CAC7B,CAAC;AAEF,+DAA+D;AAC/D,KAAK,mBAAmB,GAAG;IAC1B,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,iEAAiE;IACjE,qBAAqB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAWF,QAAA,MAAM,WAAW,GAAI,QAAQ,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBvC,CAAC;AAEL;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,YAAY,GACxB,SAAS,eAAe,EACxB,QAAO,mBAAwB,KAC7B,cA0BF,CAAC"}
1
+ {"version":3,"file":"rasputin-init.d.ts","sourceRoot":"","sources":["../src/rasputin-init.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAKN,KAAK,eAAe,EAEpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEN,KAAK,wBAAwB,EAI7B,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EAEvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIhC,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAElE,MAAM,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,EAAE,oBAAoB,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,eAAe,GAAG;IACrD,8FAA8F;IAC9F,iBAAiB,CAAC,EAAE,wBAAwB,CAAC;CAC7C,CAAC;AA8FF,QAAA,MAAM,WAAW,GAChB,QAAQ,kBAAkB,EAC1B,WAAW,iBAAiB,EAC5B,iBAAiB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0DxB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,qBAAqB,GAAG,cAAc,CAAC"}
@@ -1,4 +1,4 @@
1
1
  /** Generated by packages/sdk/scripts/generate-sdk-meta.ts — do not edit. */
2
2
  export declare const SDK_NAME = "@rasputin-ai/elysia";
3
- export declare const SDK_VERSION = "0.2.0";
3
+ export declare const SDK_VERSION = "0.3.0";
4
4
  //# sourceMappingURL=sdk-meta.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rasputin-ai/elysia",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Official Rasputin AI SDK for Elysia.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -8,6 +8,16 @@
8
8
  "types": "./dist/index.d.ts",
9
9
  "import": "./dist/index.js",
10
10
  "default": "./dist/index.js"
11
+ },
12
+ "./instrument/bun": {
13
+ "types": "./dist/instrument/bun.d.ts",
14
+ "import": "./dist/instrument/bun.js",
15
+ "default": "./dist/instrument/bun.js"
16
+ },
17
+ "./instrument/node": {
18
+ "types": "./dist/instrument/node.d.ts",
19
+ "import": "./dist/instrument/node.js",
20
+ "default": "./dist/instrument/node.js"
11
21
  }
12
22
  },
13
23
  "files": [
@@ -25,11 +35,11 @@
25
35
  "access": "public"
26
36
  },
27
37
  "dependencies": {
28
- "@rasputin-ai/core": "0.2.0",
29
- "@rasputin-ai/node": "0.2.0"
38
+ "@rasputin-ai/core": "0.3.0",
39
+ "@rasputin-ai/node": "0.3.0"
30
40
  },
31
41
  "peerDependencies": {
32
- "elysia": ">=1.0.0"
42
+ "elysia": ">=1.4.0 <2"
33
43
  },
34
44
  "devDependencies": {
35
45
  "@rasputin-ai/core": "workspace:*",