@elizaos/plugin-sql 1.6.0-alpha.0 → 1.6.0-alpha.4

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 (71) hide show
  1. package/dist/browser/index.browser.js +3254 -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} +55 -4791
  8. package/dist/node/index.node.js.map +123 -0
  9. package/dist/node/tsconfig.build.node.tsbuildinfo +1 -0
  10. package/package.json +38 -13
  11. package/types/index.d.ts +19 -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/index.js.map +0 -164
  18. package/dist/migration-service.d.ts +0 -12
  19. package/dist/migration-service.d.ts.map +0 -1
  20. package/dist/pg/adapter.d.ts +0 -76
  21. package/dist/pg/adapter.d.ts.map +0 -1
  22. package/dist/pg/manager.d.ts +0 -18
  23. package/dist/pg/manager.d.ts.map +0 -1
  24. package/dist/pglite/adapter.d.ts +0 -75
  25. package/dist/pglite/adapter.d.ts.map +0 -1
  26. package/dist/pglite/manager.d.ts +0 -22
  27. package/dist/pglite/manager.d.ts.map +0 -1
  28. package/dist/schema/agent.d.ts +0 -328
  29. package/dist/schema/agent.d.ts.map +0 -1
  30. package/dist/schema/cache.d.ts +0 -98
  31. package/dist/schema/cache.d.ts.map +0 -1
  32. package/dist/schema/channel.d.ts +0 -178
  33. package/dist/schema/channel.d.ts.map +0 -1
  34. package/dist/schema/channelParticipant.d.ts +0 -42
  35. package/dist/schema/channelParticipant.d.ts.map +0 -1
  36. package/dist/schema/component.d.ts +0 -164
  37. package/dist/schema/component.d.ts.map +0 -1
  38. package/dist/schema/embedding.d.ts +0 -194
  39. package/dist/schema/embedding.d.ts.map +0 -1
  40. package/dist/schema/entity.d.ts +0 -123
  41. package/dist/schema/entity.d.ts.map +0 -1
  42. package/dist/schema/factory.d.ts +0 -60
  43. package/dist/schema/factory.d.ts.map +0 -1
  44. package/dist/schema/index.d.ts +0 -18
  45. package/dist/schema/index.d.ts.map +0 -1
  46. package/dist/schema/log.d.ts +0 -115
  47. package/dist/schema/log.d.ts.map +0 -1
  48. package/dist/schema/memory.d.ts +0 -189
  49. package/dist/schema/memory.d.ts.map +0 -1
  50. package/dist/schema/message.d.ts +0 -2
  51. package/dist/schema/message.d.ts.map +0 -1
  52. package/dist/schema/messageServer.d.ts +0 -127
  53. package/dist/schema/messageServer.d.ts.map +0 -1
  54. package/dist/schema/participant.d.ts +0 -115
  55. package/dist/schema/participant.d.ts.map +0 -1
  56. package/dist/schema/relationship.d.ts +0 -157
  57. package/dist/schema/relationship.d.ts.map +0 -1
  58. package/dist/schema/room.d.ts +0 -193
  59. package/dist/schema/room.d.ts.map +0 -1
  60. package/dist/schema/serverAgent.d.ts +0 -42
  61. package/dist/schema/serverAgent.d.ts.map +0 -1
  62. package/dist/schema/tasks.d.ts +0 -226
  63. package/dist/schema/tasks.d.ts.map +0 -1
  64. package/dist/schema/types.d.ts +0 -69
  65. package/dist/schema/types.d.ts.map +0 -1
  66. package/dist/schema/world.d.ts +0 -115
  67. package/dist/schema/world.d.ts.map +0 -1
  68. package/dist/types.d.ts +0 -16
  69. package/dist/types.d.ts.map +0 -1
  70. package/dist/utils.d.ts +0 -33
  71. 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.6.0-alpha.0",
3
+ "version": "1.6.0-alpha.4",
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.5",
55
+ "@elizaos/core": "1.6.0-alpha.4",
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": "6793ce9e65a02392af1cb72ddf8a82c6634b80cf"
88
+ "gitHead": "184b0a90459ce149ad65195c60ec0de45d71d75f"
64
89
  }
@@ -0,0 +1,19 @@
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;