@elizaos/plugin-sql 2.0.0-beta.1 → 2.0.3-beta.3
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 +22 -5
- package/src/dist/browser/index.browser.js +4719 -333
- package/src/dist/browser/index.browser.js.map +24 -20
- package/src/dist/cjs/index.node.cjs +4689 -278
- package/src/dist/cjs/index.node.cjs.map +27 -22
- package/src/dist/index.d.ts +2 -2
- package/src/dist/index.node.d.ts +40 -7
- package/src/dist/migration-service.d.ts +2 -2
- package/src/dist/node/index.node.js +4638 -225
- package/src/dist/node/index.node.js.map +27 -22
- package/src/dist/pg/adapter.d.ts +4 -4
- package/src/dist/pg/sslmode.d.ts +6 -0
- package/src/dist/pglite/adapter.d.ts +44 -5
- package/src/dist/pglite/manager.d.ts +185 -4
- package/src/dist/runtime-migrator/drizzle-adapters/database-introspector.d.ts +1 -1
- package/src/dist/runtime-migrator/drizzle-adapters/diff-calculator.d.ts +1 -1
- package/src/dist/runtime-migrator/drizzle-adapters/snapshot-generator.d.ts +1 -1
- package/src/dist/runtime-migrator/drizzle-adapters/sql-generator.d.ts +2 -2
- package/src/dist/runtime-migrator/extension-manager.d.ts +1 -1
- package/src/dist/runtime-migrator/index.d.ts +8 -8
- package/src/dist/runtime-migrator/runtime-migrator.d.ts +2 -2
- package/src/dist/runtime-migrator/storage/journal-storage.d.ts +1 -1
- package/src/dist/runtime-migrator/storage/migration-tracker.d.ts +1 -1
- package/src/dist/runtime-migrator/storage/snapshot-storage.d.ts +1 -1
- package/src/dist/schema/agent.d.ts +2 -2
- package/src/dist/schema/approvalRequests.d.ts +1 -1
- package/src/dist/schema/embedding.d.ts +22 -1
- package/src/dist/schema/index.d.ts +35 -35
- package/src/dist/schema/types.d.ts +2 -2
- package/src/dist/stores/connectorAccount.store.d.ts +1 -1
- package/src/dist/stores/types.d.ts +2 -2
- package/src/dist/write-back/index.d.ts +56 -0
package/src/dist/index.d.ts
CHANGED
package/src/dist/index.node.d.ts
CHANGED
|
@@ -1,20 +1,53 @@
|
|
|
1
1
|
import type { IDatabaseAdapter, UUID } from "@elizaos/core";
|
|
2
2
|
import { type Plugin } from "@elizaos/core";
|
|
3
3
|
export { and, asc, count, desc, eq, gt, gte, inArray, isNull, lt, lte, ne, or, type SQL, sql, } from "drizzle-orm";
|
|
4
|
+
import { type LiveNamespace, type PgliteSyncStatus, type PgliteSyncTableStatus } from "./pglite/manager.js";
|
|
4
5
|
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
|
|
8
|
-
export
|
|
6
|
+
export * from "./connector-credential-store.js";
|
|
7
|
+
export * from "./pglite/errors.js";
|
|
8
|
+
export type { LiveNamespace, PgliteSyncStatus, PgliteSyncTableStatus } from "./pglite/manager.js";
|
|
9
|
+
export * from "./schema/index.js";
|
|
10
|
+
export type { DrizzleDatabase } from "./types.js";
|
|
9
11
|
export declare function createDatabaseAdapter(config: {
|
|
10
12
|
dataDir?: string;
|
|
11
13
|
postgresUrl?: string;
|
|
12
14
|
}, agentId: UUID): IDatabaseAdapter;
|
|
13
15
|
export declare const plugin: Plugin;
|
|
14
16
|
export default plugin;
|
|
15
|
-
export
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
17
|
+
export * from "./drizzle/index.js";
|
|
18
|
+
export { DatabaseMigrationService } from "./migration-service.js";
|
|
19
|
+
export { applyRLSToNewTables, assignAgentToServer, getOrCreateRlsServer, installRLSFunctions, setServerContext, uninstallRLS, } from "./rls.js";
|
|
20
|
+
export { AdvancedMemoryStorageService } from "./services/advanced-memory-storage.js";
|
|
21
|
+
/**
|
|
22
|
+
* Query the live Electric Sync status from the global PGliteClientManager
|
|
23
|
+
* singleton. Returns "disabled" when no manager exists or sync is not
|
|
24
|
+
* configured, and "syncing" / "synced" / "error" at runtime as the sync
|
|
25
|
+
* client transitions.
|
|
26
|
+
*/
|
|
27
|
+
export declare function getPgliteSyncStatus(): {
|
|
28
|
+
status: PgliteSyncStatus;
|
|
29
|
+
error: string | null;
|
|
30
|
+
tables: PgliteSyncTableStatus;
|
|
31
|
+
synced: string[];
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Access the PGlite live query namespace from the global singleton.
|
|
35
|
+
* Returns null when the PGlite adapter is not in use or extensions are disabled.
|
|
36
|
+
* Use for reactive dashboard queries via pg.live.query() / incrementalQuery() / changes().
|
|
37
|
+
*/
|
|
38
|
+
export declare function getPgliteLiveNamespace(): LiveNamespace | null;
|
|
39
|
+
/**
|
|
40
|
+
* Force-reset the Electric Sync stream for the current agent.
|
|
41
|
+
* Drops the electric schema, unsubscribes the current stream,
|
|
42
|
+
* and starts a fresh sync from the source Postgres.
|
|
43
|
+
* Returns the sync status after the reset, or null when sync is not configured.
|
|
44
|
+
*/
|
|
45
|
+
export declare function forcePgliteResync(): Promise<{
|
|
46
|
+
status: PgliteSyncStatus;
|
|
47
|
+
error: string | null;
|
|
48
|
+
tables: PgliteSyncTableStatus;
|
|
49
|
+
synced: string[];
|
|
50
|
+
} | null>;
|
|
18
51
|
|
|
19
52
|
export * from './schema/index.js';
|
|
20
53
|
export type { DrizzleDatabase } from './types.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Plugin } from "@elizaos/core";
|
|
2
|
-
import { RuntimeMigrator } from "./runtime-migrator";
|
|
3
|
-
import type { DrizzleDatabase } from "./types";
|
|
2
|
+
import { RuntimeMigrator } from "./runtime-migrator/index.js";
|
|
3
|
+
import type { DrizzleDatabase } from "./types.js";
|
|
4
4
|
export declare class DatabaseMigrationService {
|
|
5
5
|
private db;
|
|
6
6
|
private registeredSchemas;
|