@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.
- package/LICENSE +21 -0
- package/README.md +87 -304
- package/package.json +24 -12
- package/src/dist/base.d.ts +0 -1152
- package/src/dist/browser/index.browser.d.ts +0 -2
- package/src/dist/browser/index.browser.js +0 -26781
- package/src/dist/browser/index.browser.js.map +0 -72
- package/src/dist/browser/index.d.ts +0 -2
- package/src/dist/cjs/index.d.ts +0 -2
- package/src/dist/cjs/index.node.cjs +0 -9154
- package/src/dist/cjs/index.node.cjs.map +0 -70
- package/src/dist/cjs/index.node.d.cts +0 -2
- package/src/dist/connector-credential-store.d.ts +0 -48
- package/src/dist/drizzle/index.d.ts +0 -1
- package/src/dist/drizzle/index.js +0 -1
- package/src/dist/index.d.ts +0 -4
- package/src/dist/index.js +0 -2
- package/src/dist/index.node.d.ts +0 -20
- package/src/dist/migration-service.d.ts +0 -17
- package/src/dist/migrations.d.ts +0 -15
- package/src/dist/node/index.d.ts +0 -2
- package/src/dist/node/index.node.d.ts +0 -2
- package/src/dist/node/index.node.js +0 -9175
- package/src/dist/node/index.node.js.map +0 -70
- package/src/dist/pg/adapter.d.ts +0 -42
- package/src/dist/pg/manager.d.ts +0 -17
- package/src/dist/pglite/adapter.d.ts +0 -24
- package/src/dist/pglite/errors.d.ts +0 -20
- package/src/dist/pglite/manager.d.ts +0 -32
- package/src/dist/rls.d.ts +0 -13
- package/src/dist/runtime-migrator/crypto-utils.d.ts +0 -25
- package/src/dist/runtime-migrator/drizzle-adapters/database-introspector.d.ts +0 -58
- package/src/dist/runtime-migrator/drizzle-adapters/diff-calculator.d.ts +0 -77
- package/src/dist/runtime-migrator/drizzle-adapters/snapshot-generator.d.ts +0 -21
- package/src/dist/runtime-migrator/drizzle-adapters/sql-generator.d.ts +0 -38
- package/src/dist/runtime-migrator/extension-manager.d.ts +0 -6
- package/src/dist/runtime-migrator/index.d.ts +0 -8
- package/src/dist/runtime-migrator/runtime-migrator.d.ts +0 -95
- package/src/dist/runtime-migrator/schema-transformer.d.ts +0 -18
- package/src/dist/runtime-migrator/storage/journal-storage.d.ts +0 -10
- package/src/dist/runtime-migrator/storage/migration-tracker.d.ts +0 -13
- package/src/dist/runtime-migrator/storage/snapshot-storage.d.ts +0 -9
- package/src/dist/runtime-migrator/types.d.ts +0 -157
- package/src/dist/schema/agent.d.ts +0 -344
- package/src/dist/schema/approvalRequests.d.ts +0 -277
- package/src/dist/schema/authAuditEvent.d.ts +0 -153
- package/src/dist/schema/authBootstrapJti.d.ts +0 -49
- package/src/dist/schema/authIdentity.d.ts +0 -121
- package/src/dist/schema/authOwnerBinding.d.ts +0 -168
- package/src/dist/schema/authOwnerLoginToken.d.ts +0 -122
- package/src/dist/schema/authSession.d.ts +0 -225
- package/src/dist/schema/cache.d.ts +0 -97
- package/src/dist/schema/channel.d.ts +0 -177
- package/src/dist/schema/channelParticipant.d.ts +0 -41
- package/src/dist/schema/component.d.ts +0 -163
- package/src/dist/schema/connectorAccounts.d.ts +0 -981
- package/src/dist/schema/embedding.d.ts +0 -204
- package/src/dist/schema/entity.d.ts +0 -125
- package/src/dist/schema/entityIdentity.d.ts +0 -577
- package/src/dist/schema/index.d.ts +0 -35
- package/src/dist/schema/index.js +0 -1
- package/src/dist/schema/log.d.ts +0 -114
- package/src/dist/schema/longTermMemories.d.ts +0 -254
- package/src/dist/schema/memory.d.ts +0 -185
- package/src/dist/schema/memoryAccessLogs.d.ts +0 -109
- package/src/dist/schema/message.d.ts +0 -194
- package/src/dist/schema/messageServer.d.ts +0 -126
- package/src/dist/schema/messageServerAgent.d.ts +0 -41
- package/src/dist/schema/pairingAllowlist.d.ts +0 -113
- package/src/dist/schema/pairingRequest.d.ts +0 -147
- package/src/dist/schema/participant.d.ts +0 -114
- package/src/dist/schema/relationship.d.ts +0 -156
- package/src/dist/schema/room.d.ts +0 -195
- package/src/dist/schema/server.d.ts +0 -64
- package/src/dist/schema/sessionSummaries.d.ts +0 -273
- package/src/dist/schema/tasks.d.ts +0 -225
- package/src/dist/schema/types.d.ts +0 -68
- package/src/dist/schema/world.d.ts +0 -114
- package/src/dist/services/advanced-memory-storage.d.ts +0 -36
- package/src/dist/stores/connectorAccount.store.d.ts +0 -64
- package/src/dist/stores/types.d.ts +0 -25
- package/src/dist/types.d.ts +0 -13
- package/src/dist/utils/string-to-uuid.d.ts +0 -2
- package/src/dist/utils.d.ts +0 -4
- package/src/dist/utils.node.d.ts +0 -4
|
@@ -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';
|
package/src/dist/index.d.ts
DELETED
package/src/dist/index.js
DELETED
package/src/dist/index.node.d.ts
DELETED
|
@@ -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
|
-
}
|
package/src/dist/migrations.d.ts
DELETED
|
@@ -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>;
|
package/src/dist/node/index.d.ts
DELETED