| 1 | // @effect-diagnostics nodeBuiltinImport:off -- The SDK must load from disk beside its Webpack chunks. |
| 2 | import * as NodeModule from "node:module"; |
| 3 | |
| 4 | // Cursor's Webpack chunks and local helpers must stay beside the SDK entry. |
| 5 | // createRequire also loads that disk-backed package from a Node SEA executable. |
| 6 | const requireCursorSdk = NodeModule.createRequire(import.meta.url); |
| 7 | export const { |
| 8 | Agent, |
| 9 | AuthenticationError, |
| 10 | createAgentPlatform, |
| 11 | Cursor, |
| 12 | CursorSdkError, |
| 13 | InMemoryCredentialStore, |
| 14 | } = requireCursorSdk("@cursor/sdk") as typeof import("@cursor/sdk"); |
| 15 | export const { SqliteLocalAgentStore } = requireCursorSdk( |
| 16 | "@cursor/sdk/sqlite", |
| 17 | ) as typeof import("@cursor/sdk/sqlite"); |