@elizaos/plugin-sql 1.5.8 → 1.5.9-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.
Files changed (70) hide show
  1. package/dist/browser/index.browser.js +3252 -0
  2. package/dist/browser/index.browser.js.map +36 -0
  3. package/dist/browser/index.d.ts +2 -0
  4. package/dist/browser/tsconfig.build.tsbuildinfo +1 -0
  5. package/dist/index.d.ts +2 -33
  6. package/dist/node/index.d.ts +2 -0
  7. package/dist/{index.js → node/index.node.js} +46 -4789
  8. package/dist/{index.js.map → node/index.node.js.map} +6 -47
  9. package/dist/node/tsconfig.build.node.tsbuildinfo +1 -0
  10. package/package.json +38 -13
  11. package/types/index.d.ts +21 -0
  12. package/dist/base.d.ts +0 -894
  13. package/dist/base.d.ts.map +0 -1
  14. package/dist/custom-migrator.d.ts +0 -75
  15. package/dist/custom-migrator.d.ts.map +0 -1
  16. package/dist/index.d.ts.map +0 -1
  17. package/dist/migration-service.d.ts +0 -12
  18. package/dist/migration-service.d.ts.map +0 -1
  19. package/dist/pg/adapter.d.ts +0 -76
  20. package/dist/pg/adapter.d.ts.map +0 -1
  21. package/dist/pg/manager.d.ts +0 -18
  22. package/dist/pg/manager.d.ts.map +0 -1
  23. package/dist/pglite/adapter.d.ts +0 -75
  24. package/dist/pglite/adapter.d.ts.map +0 -1
  25. package/dist/pglite/manager.d.ts +0 -22
  26. package/dist/pglite/manager.d.ts.map +0 -1
  27. package/dist/schema/agent.d.ts +0 -328
  28. package/dist/schema/agent.d.ts.map +0 -1
  29. package/dist/schema/cache.d.ts +0 -98
  30. package/dist/schema/cache.d.ts.map +0 -1
  31. package/dist/schema/channel.d.ts +0 -178
  32. package/dist/schema/channel.d.ts.map +0 -1
  33. package/dist/schema/channelParticipant.d.ts +0 -42
  34. package/dist/schema/channelParticipant.d.ts.map +0 -1
  35. package/dist/schema/component.d.ts +0 -164
  36. package/dist/schema/component.d.ts.map +0 -1
  37. package/dist/schema/embedding.d.ts +0 -194
  38. package/dist/schema/embedding.d.ts.map +0 -1
  39. package/dist/schema/entity.d.ts +0 -123
  40. package/dist/schema/entity.d.ts.map +0 -1
  41. package/dist/schema/factory.d.ts +0 -60
  42. package/dist/schema/factory.d.ts.map +0 -1
  43. package/dist/schema/index.d.ts +0 -18
  44. package/dist/schema/index.d.ts.map +0 -1
  45. package/dist/schema/log.d.ts +0 -115
  46. package/dist/schema/log.d.ts.map +0 -1
  47. package/dist/schema/memory.d.ts +0 -189
  48. package/dist/schema/memory.d.ts.map +0 -1
  49. package/dist/schema/message.d.ts +0 -2
  50. package/dist/schema/message.d.ts.map +0 -1
  51. package/dist/schema/messageServer.d.ts +0 -127
  52. package/dist/schema/messageServer.d.ts.map +0 -1
  53. package/dist/schema/participant.d.ts +0 -115
  54. package/dist/schema/participant.d.ts.map +0 -1
  55. package/dist/schema/relationship.d.ts +0 -157
  56. package/dist/schema/relationship.d.ts.map +0 -1
  57. package/dist/schema/room.d.ts +0 -193
  58. package/dist/schema/room.d.ts.map +0 -1
  59. package/dist/schema/serverAgent.d.ts +0 -42
  60. package/dist/schema/serverAgent.d.ts.map +0 -1
  61. package/dist/schema/tasks.d.ts +0 -226
  62. package/dist/schema/tasks.d.ts.map +0 -1
  63. package/dist/schema/types.d.ts +0 -69
  64. package/dist/schema/types.d.ts.map +0 -1
  65. package/dist/schema/world.d.ts +0 -115
  66. package/dist/schema/world.d.ts.map +0 -1
  67. package/dist/types.d.ts +0 -16
  68. package/dist/types.d.ts.map +0 -1
  69. package/dist/utils.d.ts +0 -33
  70. package/dist/utils.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@elizaos/plugin-sql",
3
- "version": "1.5.8",
3
+ "version": "1.5.9-alpha.10",
4
4
  "type": "module",
5
- "main": "dist/index.js",
6
- "module": "dist/index.js",
5
+ "main": "dist/node/index.node.js",
6
+ "module": "dist/node/index.node.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "repository": {
9
9
  "type": "git",
@@ -12,26 +12,52 @@
12
12
  "publishConfig": {
13
13
  "access": "public"
14
14
  },
15
+ "browser": "dist/browser/index.browser.js",
15
16
  "exports": {
16
17
  "./package.json": "./package.json",
17
18
  ".": {
18
- "import": {
19
- "types": "./dist/index.d.ts",
20
- "default": "./dist/index.js"
21
- }
19
+ "types": "./types/index.d.ts",
20
+ "browser": {
21
+ "types": "./dist/browser/index.d.ts",
22
+ "import": "./dist/browser/index.browser.js",
23
+ "default": "./dist/browser/index.browser.js"
24
+ },
25
+ "node": {
26
+ "types": "./dist/node/index.d.ts",
27
+ "import": "./dist/node/index.node.js",
28
+ "default": "./dist/node/index.node.js"
29
+ },
30
+ "bun": {
31
+ "types": "./dist/node/index.d.ts",
32
+ "default": "./dist/node/index.node.js"
33
+ },
34
+ "default": "./dist/node/index.node.js"
35
+ },
36
+ "./node": {
37
+ "types": "./dist/node/index.d.ts",
38
+ "import": "./dist/node/index.node.js",
39
+ "default": "./dist/node/index.node.js"
40
+ },
41
+ "./browser": {
42
+ "types": "./dist/browser/index.d.ts",
43
+ "import": "./dist/browser/index.browser.js",
44
+ "default": "./dist/browser/index.browser.js"
22
45
  }
23
46
  },
47
+ "sideEffects": false,
24
48
  "files": [
25
49
  "dist",
26
- "drizzle"
50
+ "drizzle",
51
+ "types"
27
52
  ],
28
53
  "dependencies": {
29
54
  "@electric-sql/pglite": "^0.3.3",
30
- "@elizaos/core": "1.5.8",
55
+ "@elizaos/core": "1.5.9-alpha.10",
31
56
  "dotenv": "^16.4.7",
32
57
  "drizzle-kit": "^0.31.1",
33
58
  "drizzle-orm": "^0.44.2",
34
- "pg": "^8.13.3"
59
+ "pg": "^8.13.3",
60
+ "uuid": "^11.0.5"
35
61
  },
36
62
  "devDependencies": {
37
63
  "@eslint/js": "^9.28.0",
@@ -43,7 +69,7 @@
43
69
  "typescript-eslint": "^8.26.0"
44
70
  },
45
71
  "scripts": {
46
- "build": "bun run build.ts",
72
+ "build": "bun run build.ts && tsc -p tsconfig.build.json && tsc -p tsconfig.build.node.json",
47
73
  "dev": "bun run build.ts --watch",
48
74
  "migrate:generate": "drizzle-kit generate",
49
75
  "migrate": "drizzle-kit migrate",
@@ -56,9 +82,8 @@
56
82
  "test:coverage": "bun test --coverage",
57
83
  "test:integration": "bash scripts/run-integration-tests.sh",
58
84
  "test:integration:fast": "bun test __tests__/integration --bail=5 --timeout=180000",
59
- "test:postgres": "POSTGRES_URL=postgresql://postgres:cT5nfCeebBS8R0q3@db.mwyntrazuakaieibjuvo.supabase.co:5432/postgres bun test",
60
85
  "build:clean": "rm -rf dist",
61
86
  "lint:fix": "eslint . --fix"
62
87
  },
63
- "gitHead": "a724ad6ace35f9dc3b2b515be4bba309a04ab1e4"
88
+ "gitHead": "4896da93046e60795849669e26438c1c5c682df7"
64
89
  }
@@ -0,0 +1,21 @@
1
+ import type { IDatabaseAdapter, UUID, Plugin } from '@elizaos/core';
2
+
3
+ export function createDatabaseAdapter(
4
+ config: {
5
+ dataDir?: string;
6
+ postgresUrl?: string;
7
+ },
8
+ agentId: UUID
9
+ ): IDatabaseAdapter;
10
+
11
+ export const plugin: Plugin;
12
+
13
+ export class DatabaseMigrationService {
14
+ initializeWithDatabase(db: any): Promise<void>;
15
+ discoverAndRegisterPluginSchemas(plugins: Plugin[]): void;
16
+ runAllPluginMigrations(): Promise<void>;
17
+ }
18
+
19
+ export default plugin;
20
+
21
+