@elizaos/plugin-sql 2.0.0-beta.1 → 2.0.3-beta.2

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 (85) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +87 -304
  3. package/package.json +24 -12
  4. package/src/dist/base.d.ts +0 -1152
  5. package/src/dist/browser/index.browser.d.ts +0 -2
  6. package/src/dist/browser/index.browser.js +0 -26781
  7. package/src/dist/browser/index.browser.js.map +0 -72
  8. package/src/dist/browser/index.d.ts +0 -2
  9. package/src/dist/cjs/index.d.ts +0 -2
  10. package/src/dist/cjs/index.node.cjs +0 -9154
  11. package/src/dist/cjs/index.node.cjs.map +0 -70
  12. package/src/dist/cjs/index.node.d.cts +0 -2
  13. package/src/dist/connector-credential-store.d.ts +0 -48
  14. package/src/dist/drizzle/index.d.ts +0 -1
  15. package/src/dist/drizzle/index.js +0 -1
  16. package/src/dist/index.d.ts +0 -4
  17. package/src/dist/index.js +0 -2
  18. package/src/dist/index.node.d.ts +0 -20
  19. package/src/dist/migration-service.d.ts +0 -17
  20. package/src/dist/migrations.d.ts +0 -15
  21. package/src/dist/node/index.d.ts +0 -2
  22. package/src/dist/node/index.node.d.ts +0 -2
  23. package/src/dist/node/index.node.js +0 -9175
  24. package/src/dist/node/index.node.js.map +0 -70
  25. package/src/dist/pg/adapter.d.ts +0 -42
  26. package/src/dist/pg/manager.d.ts +0 -17
  27. package/src/dist/pglite/adapter.d.ts +0 -24
  28. package/src/dist/pglite/errors.d.ts +0 -20
  29. package/src/dist/pglite/manager.d.ts +0 -32
  30. package/src/dist/rls.d.ts +0 -13
  31. package/src/dist/runtime-migrator/crypto-utils.d.ts +0 -25
  32. package/src/dist/runtime-migrator/drizzle-adapters/database-introspector.d.ts +0 -58
  33. package/src/dist/runtime-migrator/drizzle-adapters/diff-calculator.d.ts +0 -77
  34. package/src/dist/runtime-migrator/drizzle-adapters/snapshot-generator.d.ts +0 -21
  35. package/src/dist/runtime-migrator/drizzle-adapters/sql-generator.d.ts +0 -38
  36. package/src/dist/runtime-migrator/extension-manager.d.ts +0 -6
  37. package/src/dist/runtime-migrator/index.d.ts +0 -8
  38. package/src/dist/runtime-migrator/runtime-migrator.d.ts +0 -95
  39. package/src/dist/runtime-migrator/schema-transformer.d.ts +0 -18
  40. package/src/dist/runtime-migrator/storage/journal-storage.d.ts +0 -10
  41. package/src/dist/runtime-migrator/storage/migration-tracker.d.ts +0 -13
  42. package/src/dist/runtime-migrator/storage/snapshot-storage.d.ts +0 -9
  43. package/src/dist/runtime-migrator/types.d.ts +0 -157
  44. package/src/dist/schema/agent.d.ts +0 -344
  45. package/src/dist/schema/approvalRequests.d.ts +0 -277
  46. package/src/dist/schema/authAuditEvent.d.ts +0 -153
  47. package/src/dist/schema/authBootstrapJti.d.ts +0 -49
  48. package/src/dist/schema/authIdentity.d.ts +0 -121
  49. package/src/dist/schema/authOwnerBinding.d.ts +0 -168
  50. package/src/dist/schema/authOwnerLoginToken.d.ts +0 -122
  51. package/src/dist/schema/authSession.d.ts +0 -225
  52. package/src/dist/schema/cache.d.ts +0 -97
  53. package/src/dist/schema/channel.d.ts +0 -177
  54. package/src/dist/schema/channelParticipant.d.ts +0 -41
  55. package/src/dist/schema/component.d.ts +0 -163
  56. package/src/dist/schema/connectorAccounts.d.ts +0 -981
  57. package/src/dist/schema/embedding.d.ts +0 -204
  58. package/src/dist/schema/entity.d.ts +0 -125
  59. package/src/dist/schema/entityIdentity.d.ts +0 -577
  60. package/src/dist/schema/index.d.ts +0 -35
  61. package/src/dist/schema/index.js +0 -1
  62. package/src/dist/schema/log.d.ts +0 -114
  63. package/src/dist/schema/longTermMemories.d.ts +0 -254
  64. package/src/dist/schema/memory.d.ts +0 -185
  65. package/src/dist/schema/memoryAccessLogs.d.ts +0 -109
  66. package/src/dist/schema/message.d.ts +0 -194
  67. package/src/dist/schema/messageServer.d.ts +0 -126
  68. package/src/dist/schema/messageServerAgent.d.ts +0 -41
  69. package/src/dist/schema/pairingAllowlist.d.ts +0 -113
  70. package/src/dist/schema/pairingRequest.d.ts +0 -147
  71. package/src/dist/schema/participant.d.ts +0 -114
  72. package/src/dist/schema/relationship.d.ts +0 -156
  73. package/src/dist/schema/room.d.ts +0 -195
  74. package/src/dist/schema/server.d.ts +0 -64
  75. package/src/dist/schema/sessionSummaries.d.ts +0 -273
  76. package/src/dist/schema/tasks.d.ts +0 -225
  77. package/src/dist/schema/types.d.ts +0 -68
  78. package/src/dist/schema/world.d.ts +0 -114
  79. package/src/dist/services/advanced-memory-storage.d.ts +0 -36
  80. package/src/dist/stores/connectorAccount.store.d.ts +0 -64
  81. package/src/dist/stores/types.d.ts +0 -25
  82. package/src/dist/types.d.ts +0 -13
  83. package/src/dist/utils/string-to-uuid.d.ts +0 -2
  84. package/src/dist/utils.d.ts +0 -4
  85. package/src/dist/utils.node.d.ts +0 -4
@@ -1,2 +0,0 @@
1
- export * from '../index.node.js';
2
- export { default } from '../index.node.js';
@@ -1,48 +0,0 @@
1
- import type { UUID } from "@elizaos/core";
2
- export interface ConnectorPasswordManagerReference {
3
- readonly source: "1password" | "protonpass";
4
- readonly path: string;
5
- }
6
- export interface ConnectorCredentialVault {
7
- set(key: string, value: string, opts?: {
8
- sensitive?: boolean;
9
- caller?: string;
10
- }): Promise<void>;
11
- setReference?(key: string, ref: ConnectorPasswordManagerReference): Promise<void>;
12
- get(key: string): Promise<string>;
13
- reveal?(key: string, caller?: string): Promise<string>;
14
- has(key: string): Promise<boolean>;
15
- remove(key: string): Promise<void>;
16
- }
17
- export interface ConnectorCredentialStore {
18
- putSecret(params: {
19
- vaultRef?: string;
20
- agentId: UUID;
21
- provider: string;
22
- accountId: UUID;
23
- credentialType: string;
24
- value: string;
25
- caller?: string;
26
- }): Promise<string>;
27
- putReference(params: {
28
- vaultRef?: string;
29
- agentId: UUID;
30
- provider: string;
31
- accountId: UUID;
32
- credentialType: string;
33
- reference: ConnectorPasswordManagerReference;
34
- }): Promise<string>;
35
- get(vaultRef: string, options?: {
36
- reveal?: boolean;
37
- caller?: string;
38
- }): Promise<string>;
39
- has(vaultRef: string): Promise<boolean>;
40
- remove(vaultRef: string): Promise<void>;
41
- }
42
- export declare function buildConnectorCredentialVaultRef(params: {
43
- agentId: UUID;
44
- provider: string;
45
- accountId: UUID;
46
- credentialType: string;
47
- }): string;
48
- export declare function createConnectorCredentialStore(vault: ConnectorCredentialVault): ConnectorCredentialStore;
@@ -1 +0,0 @@
1
- export { and, asc, count, desc, eq, gt, gte, inArray, isNull, lt, lte, ne, or, type SQL, sql } from 'drizzle-orm';
@@ -1 +0,0 @@
1
- export { and, asc, count, desc, eq, gt, gte, inArray, isNull, lt, lte, ne, or, sql } from 'drizzle-orm';
@@ -1,4 +0,0 @@
1
- export * from './index.node.js';
2
- export { default } from './index.node.js';
3
- export * from './schema/index.js';
4
- export type { DrizzleDatabase } from './types.js';
package/src/dist/index.js DELETED
@@ -1,2 +0,0 @@
1
- export * from './node/index.node.js';
2
- export { default } from './node/index.node.js';
@@ -1,20 +0,0 @@
1
- import type { IDatabaseAdapter, UUID } from "@elizaos/core";
2
- import { type Plugin } from "@elizaos/core";
3
- export { and, asc, count, desc, eq, gt, gte, inArray, isNull, lt, lte, ne, or, type SQL, sql, } from "drizzle-orm";
4
- export type { AppendConnectorAccountAuditEventParams, ConnectorAccountAuditEventRecord, ConnectorAccountAuditOutcome, ConnectorAccountCredentialRefRecord, ConnectorAccountJsonObject, ConnectorAccountRecord, ConsumeOAuthFlowStateParams, CreateOAuthFlowStateParams, DeleteConnectorAccountParams, GetConnectorAccountCredentialRefParams, GetConnectorAccountParams, ListConnectorAccountCredentialRefsParams, ListConnectorAccountsParams, OAuthFlowRecord, SetConnectorAccountCredentialRefParams, UpsertConnectorAccountParams, } from "@elizaos/core";
5
- export * from "./connector-credential-store";
6
- export * from "./pglite/errors";
7
- export * from "./schema";
8
- export type { DrizzleDatabase } from "./types";
9
- export declare function createDatabaseAdapter(config: {
10
- dataDir?: string;
11
- postgresUrl?: string;
12
- }, agentId: UUID): IDatabaseAdapter;
13
- export declare const plugin: Plugin;
14
- export default plugin;
15
- export { DatabaseMigrationService } from "./migration-service";
16
- export { applyRLSToNewTables, assignAgentToServer, getOrCreateRlsServer, installRLSFunctions, setServerContext, uninstallRLS, } from "./rls";
17
- export { AdvancedMemoryStorageService } from "./services/advanced-memory-storage";
18
-
19
- export * from './schema/index.js';
20
- export type { DrizzleDatabase } from './types.js';
@@ -1,17 +0,0 @@
1
- import { type Plugin } from "@elizaos/core";
2
- import { RuntimeMigrator } from "./runtime-migrator";
3
- import type { DrizzleDatabase } from "./types";
4
- export declare class DatabaseMigrationService {
5
- private db;
6
- private registeredSchemas;
7
- private migrator;
8
- initializeWithDatabase(db: DrizzleDatabase): Promise<void>;
9
- discoverAndRegisterPluginSchemas(plugins: Plugin[]): void;
10
- registerSchema(pluginName: string, schema: Record<string, unknown>): void;
11
- runAllPluginMigrations(options?: {
12
- verbose?: boolean;
13
- force?: boolean;
14
- dryRun?: boolean;
15
- }): Promise<void>;
16
- getMigrator(): RuntimeMigrator | null;
17
- }
@@ -1,15 +0,0 @@
1
- import { type IDatabaseAdapter } from "@elizaos/core";
2
- /**
3
- * TEMPORARY MIGRATION: pre-1.6.5 → 1.6.5+ schema migration
4
- *
5
- * This migration runs automatically on startup and is idempotent.
6
- * It handles the migration from Owner RLS to Server RLS + Entity RLS, including:
7
- * - Disabling old RLS policies temporarily
8
- * - Renaming server_id → message_server_id in channels, worlds, rooms
9
- * - Converting TEXT → UUID where needed
10
- * - Dropping old server_id columns for RLS
11
- * - Cleaning up indexes
12
- *
13
- * @param adapter - Database adapter
14
- */
15
- export declare function migrateToEntityRLS(adapter: IDatabaseAdapter): Promise<void>;
@@ -1,2 +0,0 @@
1
- export * from '../index.node.js';
2
- export { default } from '../index.node.js';
@@ -1,2 +0,0 @@
1
- export * from '../index.node.js';
2
- export { default } from '../index.node.js';