@mastra/oracledb 0.0.0 → 0.2.0-alpha.0
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.md +30 -0
- package/dist/docs/SKILL.md +37 -0
- package/dist/docs/assets/SOURCE_MAP.json +6 -0
- package/dist/docs/references/docs-memory-observational-memory.md +835 -0
- package/dist/docs/references/docs-memory-semantic-recall.md +402 -0
- package/dist/docs/references/docs-memory-working-memory.md +432 -0
- package/dist/docs/references/docs-storage-overview.md +215 -0
- package/dist/docs/references/guides-rag-overview.md +74 -0
- package/dist/docs/references/guides-rag-retrieval.md +537 -0
- package/dist/docs/references/guides-rag-vector-databases.md +710 -0
- package/dist/docs/references/reference-rag-metadata-filters.md +227 -0
- package/dist/docs/references/reference-storage-oracledb.md +239 -0
- package/dist/docs/references/reference-vectors-oracledb.md +347 -0
- package/dist/index.cjs +10217 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10196 -0
- package/dist/index.js.map +1 -0
- package/dist/schema.d.ts +27 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/shared/connection.d.ts +46 -0
- package/dist/shared/connection.d.ts.map +1 -0
- package/dist/storage/db/index.d.ts +128 -0
- package/dist/storage/db/index.d.ts.map +1 -0
- package/dist/storage/domain-utils.d.ts +18 -0
- package/dist/storage/domain-utils.d.ts.map +1 -0
- package/dist/storage/domains/agents/index.d.ts +54 -0
- package/dist/storage/domains/agents/index.d.ts.map +1 -0
- package/dist/storage/domains/mcp-clients/index.d.ts +46 -0
- package/dist/storage/domains/mcp-clients/index.d.ts.map +1 -0
- package/dist/storage/domains/memory/index.d.ts +88 -0
- package/dist/storage/domains/memory/index.d.ts.map +1 -0
- package/dist/storage/domains/memory/messages.d.ts +37 -0
- package/dist/storage/domains/memory/messages.d.ts.map +1 -0
- package/dist/storage/domains/memory/observational-buffering.d.ts +7 -0
- package/dist/storage/domains/memory/observational-buffering.d.ts.map +1 -0
- package/dist/storage/domains/memory/observational.d.ts +56 -0
- package/dist/storage/domains/memory/observational.d.ts.map +1 -0
- package/dist/storage/domains/memory/resources.d.ts +14 -0
- package/dist/storage/domains/memory/resources.d.ts.map +1 -0
- package/dist/storage/domains/memory/schema.d.ts +43 -0
- package/dist/storage/domains/memory/schema.d.ts.map +1 -0
- package/dist/storage/domains/memory/threads.d.ts +37 -0
- package/dist/storage/domains/memory/threads.d.ts.map +1 -0
- package/dist/storage/domains/memory/utils.d.ts +68 -0
- package/dist/storage/domains/memory/utils.d.ts.map +1 -0
- package/dist/storage/domains/observability/binds.d.ts +21 -0
- package/dist/storage/domains/observability/binds.d.ts.map +1 -0
- package/dist/storage/domains/observability/index.d.ts +49 -0
- package/dist/storage/domains/observability/index.d.ts.map +1 -0
- package/dist/storage/domains/observability/logs.d.ts +5 -0
- package/dist/storage/domains/observability/logs.d.ts.map +1 -0
- package/dist/storage/domains/observability/schema.d.ts +38 -0
- package/dist/storage/domains/observability/schema.d.ts.map +1 -0
- package/dist/storage/domains/observability/scores-bridge.d.ts +7 -0
- package/dist/storage/domains/observability/scores-bridge.d.ts.map +1 -0
- package/dist/storage/domains/observability/spans.d.ts +18 -0
- package/dist/storage/domains/observability/spans.d.ts.map +1 -0
- package/dist/storage/domains/scorer-definitions/index.d.ts +46 -0
- package/dist/storage/domains/scorer-definitions/index.d.ts.map +1 -0
- package/dist/storage/domains/scores/index.d.ts +63 -0
- package/dist/storage/domains/scores/index.d.ts.map +1 -0
- package/dist/storage/domains/workflows/index.d.ts +61 -0
- package/dist/storage/domains/workflows/index.d.ts.map +1 -0
- package/dist/storage/index.d.ts +45 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/migrations.d.ts +55 -0
- package/dist/storage/migrations.d.ts.map +1 -0
- package/dist/storage/types.d.ts +44 -0
- package/dist/storage/types.d.ts.map +1 -0
- package/dist/vector/ddl.d.ts +58 -0
- package/dist/vector/ddl.d.ts.map +1 -0
- package/dist/vector/filter.d.ts +7 -0
- package/dist/vector/filter.d.ts.map +1 -0
- package/dist/vector/identifiers.d.ts +11 -0
- package/dist/vector/identifiers.d.ts.map +1 -0
- package/dist/vector/index.d.ts +32 -0
- package/dist/vector/index.d.ts.map +1 -0
- package/dist/vector/prompt.d.ts +6 -0
- package/dist/vector/prompt.d.ts.map +1 -0
- package/dist/vector/query.d.ts +5 -0
- package/dist/vector/query.d.ts.map +1 -0
- package/dist/vector/sql.d.ts +12 -0
- package/dist/vector/sql.d.ts.map +1 -0
- package/dist/vector/stats.d.ts +9 -0
- package/dist/vector/stats.d.ts.map +1 -0
- package/dist/vector/types.d.ts +80 -0
- package/dist/vector/types.d.ts.map +1 -0
- package/dist/vector/upsert.d.ts +20 -0
- package/dist/vector/upsert.d.ts.map +1 -0
- package/package.json +23 -24
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ObjectRow } from '../shared/connection.js';
|
|
2
|
+
import type { OracleQueryBinds, OracleTxClient } from './db/index.js';
|
|
3
|
+
export declare const DEFAULT_ORACLE_MIGRATIONS_TABLE = "MASTRA_ORACLE_MIGRATIONS";
|
|
4
|
+
export type OracleMigrationKind = 'versioned' | 'repeatable';
|
|
5
|
+
export type OracleMigrationStatus = 'applied' | 'reapplied' | 'skipped';
|
|
6
|
+
export interface OracleMigration {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
kind?: OracleMigrationKind;
|
|
11
|
+
checksum?: string;
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export interface OracleMigrationRecord {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
kind: OracleMigrationKind;
|
|
18
|
+
checksum: string;
|
|
19
|
+
description?: string | null;
|
|
20
|
+
appliedAt?: unknown;
|
|
21
|
+
updatedAt?: unknown;
|
|
22
|
+
}
|
|
23
|
+
export interface OracleMigrationResult {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
kind: OracleMigrationKind;
|
|
27
|
+
status: OracleMigrationStatus;
|
|
28
|
+
checksum: string;
|
|
29
|
+
}
|
|
30
|
+
export interface OracleMigrationRunOptions {
|
|
31
|
+
forceRepeatable?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface OracleMigrationDatabase {
|
|
34
|
+
table(tableName: string): string;
|
|
35
|
+
executeDdl(sql: string, ignoredErrorCodes?: number[]): Promise<void>;
|
|
36
|
+
manyOrNone<T extends ObjectRow = ObjectRow>(sql: string, binds?: OracleQueryBinds): Promise<T[]>;
|
|
37
|
+
tx<T>(callback: (client: OracleTxClient) => Promise<T>): Promise<T>;
|
|
38
|
+
}
|
|
39
|
+
export interface OracleMigrationRegistryConfig {
|
|
40
|
+
db: OracleMigrationDatabase;
|
|
41
|
+
tableName?: string;
|
|
42
|
+
}
|
|
43
|
+
export declare class OracleMigrationRegistry {
|
|
44
|
+
private readonly db;
|
|
45
|
+
private readonly tableName;
|
|
46
|
+
constructor(config: OracleMigrationRegistryConfig);
|
|
47
|
+
init(): Promise<void>;
|
|
48
|
+
list(): Promise<OracleMigrationRecord[]>;
|
|
49
|
+
run(migrations: OracleMigration[], options?: OracleMigrationRunOptions): Promise<OracleMigrationResult[]>;
|
|
50
|
+
private table;
|
|
51
|
+
private readRecords;
|
|
52
|
+
private record;
|
|
53
|
+
}
|
|
54
|
+
export declare function oracleMigrationTableSql(qualifiedTableName: string): string;
|
|
55
|
+
//# sourceMappingURL=migrations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../src/storage/migrations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAE7D,eAAO,MAAM,+BAA+B,6BAA6B,CAAC;AAI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AAC,CAAC;IACjG,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACrE;AAED,MAAM,WAAW,6BAA6B;IAC5C,EAAE,EAAE,uBAAuB,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAsBD,qBAAa,uBAAuB;IAClC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAA0B;IAC7C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;gBAEvB,MAAM,EAAE,6BAA6B;IAK3C,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,IAAI,IAAI,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAKxC,GAAG,CAAC,UAAU,EAAE,eAAe,EAAE,EAAE,OAAO,GAAE,yBAA8B,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;IA8CnH,OAAO,CAAC,KAAK;YAIC,WAAW;YAeX,MAAM;CAiCrB;AAED,wBAAgB,uBAAuB,CAAC,kBAAkB,EAAE,MAAM,GAAG,MAAM,CAU1E"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { MastraCompositeStoreConfig } from '@mastra/core/storage';
|
|
2
|
+
import type { OracleConnectionConfig, OraclePoolManager } from '../shared/connection.js';
|
|
3
|
+
import type { OracleCreateIndexOptions } from './db/index.js';
|
|
4
|
+
export interface OracleStoreConfig extends OracleConnectionConfig, Pick<MastraCompositeStoreConfig, 'disableInit'> {
|
|
5
|
+
id: string;
|
|
6
|
+
schemaName?: string;
|
|
7
|
+
poolManager?: OraclePoolManager;
|
|
8
|
+
/**
|
|
9
|
+
* Number of messages to send per Oracle executeMany call. The full
|
|
10
|
+
* saveMessages operation still commits once at the transaction boundary.
|
|
11
|
+
*/
|
|
12
|
+
messageBatchSize?: number;
|
|
13
|
+
/**
|
|
14
|
+
* When true, default performance indexes are not created during initialization.
|
|
15
|
+
* Use this when DBAs manage indexes separately or custom indexes replace the defaults.
|
|
16
|
+
*/
|
|
17
|
+
skipDefaultIndexes?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Oracle-native custom indexes to create during initialization. Indexes are
|
|
20
|
+
* routed to the storage domain that owns the target table.
|
|
21
|
+
*/
|
|
22
|
+
indexes?: OracleCreateIndexOptions[];
|
|
23
|
+
/**
|
|
24
|
+
* Oracle table used to track storage schema migrations. Override only when
|
|
25
|
+
* multiple logical Mastra deployments share the same Oracle schema.
|
|
26
|
+
*/
|
|
27
|
+
migrationTableName?: string;
|
|
28
|
+
/**
|
|
29
|
+
* OracleVector registry table used to discover semantic-recall vector tables
|
|
30
|
+
* during message/thread deletion. Set this to the same value as
|
|
31
|
+
* OracleVector.registryTableName when that option is customized.
|
|
32
|
+
*/
|
|
33
|
+
vectorRegistryTableName?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface OracleDomainConfig {
|
|
36
|
+
poolManager: OraclePoolManager;
|
|
37
|
+
schemaName?: string;
|
|
38
|
+
messageBatchSize?: number;
|
|
39
|
+
skipDefaultIndexes?: boolean;
|
|
40
|
+
indexes?: OracleCreateIndexOptions[];
|
|
41
|
+
vectorRegistryTableName?: string;
|
|
42
|
+
}
|
|
43
|
+
export type { OracleCreateIndexOptions, OracleIndexType } from './db/index.js';
|
|
44
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/storage/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,MAAM,CAAC;AAIrD,MAAM,WAAW,iBAAkB,SAAQ,sBAAsB,EAAE,IAAI,CAAC,0BAA0B,EAAE,aAAa,CAAC;IAChH,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,OAAO,CAAC,EAAE,wBAAwB,EAAE,CAAC;IACrC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAID,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,iBAAiB,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,wBAAwB,EAAE,CAAC;IACrC,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,YAAY,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { DeleteIndexParams } from '@mastra/core/vector';
|
|
2
|
+
import type { Connection } from 'oracledb';
|
|
3
|
+
import type { OracleBuildIndexParams, OracleCreateIndexParams, OracleIndexStats, OracleMetric, OracleRebuildIndexParams, OracleVectorFormat, OracleVectorIndexConfig, OracleVectorIndexType } from './types.js';
|
|
4
|
+
export declare const DEFAULT_TABLE_PREFIX = "MASTRA_VEC";
|
|
5
|
+
export declare const DEFAULT_REGISTRY_TABLE = "MASTRA_VECTOR_INDEXES";
|
|
6
|
+
export declare const DEFAULT_METADATA_INDEXES: string[];
|
|
7
|
+
export declare const DEFAULT_VECTOR_FORMAT: OracleVectorFormat;
|
|
8
|
+
export type WithConnection = <T>(callback: (connection: Connection) => Promise<T>) => Promise<T>;
|
|
9
|
+
export interface IndexInfo extends OracleIndexStats {
|
|
10
|
+
qualifiedTableName: string;
|
|
11
|
+
}
|
|
12
|
+
export type CachedIndexInfo = Omit<IndexInfo, 'count'>;
|
|
13
|
+
export interface IndexRegistryConfig {
|
|
14
|
+
schemaName?: string;
|
|
15
|
+
tablePrefix: string;
|
|
16
|
+
registryTableName: string;
|
|
17
|
+
defaultMetadataIndexes: string[];
|
|
18
|
+
defaultVectorFormat: OracleVectorFormat;
|
|
19
|
+
defaultIndexConfig: OracleVectorIndexConfig;
|
|
20
|
+
}
|
|
21
|
+
export declare class IndexRegistry {
|
|
22
|
+
readonly schemaName?: string;
|
|
23
|
+
private readonly tablePrefix;
|
|
24
|
+
private readonly registryTableName;
|
|
25
|
+
private readonly defaultMetadataIndexes;
|
|
26
|
+
private readonly defaultVectorFormat;
|
|
27
|
+
private readonly defaultIndexConfig;
|
|
28
|
+
private readonly indexLocks;
|
|
29
|
+
private readonly indexInfoCache;
|
|
30
|
+
private registryReady;
|
|
31
|
+
private registryPromise?;
|
|
32
|
+
constructor(config: IndexRegistryConfig);
|
|
33
|
+
createIndex(withConnection: WithConnection, { indexName, dimension, metric, vectorFormat, indexConfig, buildIndex, metadataIndexes, }: OracleCreateIndexParams): Promise<void>;
|
|
34
|
+
buildIndex(withConnection: WithConnection, { indexName, metric, indexConfig }: OracleBuildIndexParams): Promise<void>;
|
|
35
|
+
rebuildIndex(withConnection: WithConnection, { indexName, metric, indexConfig }: OracleRebuildIndexParams): Promise<void>;
|
|
36
|
+
deleteIndex(withConnection: WithConnection, { indexName }: DeleteIndexParams): Promise<void>;
|
|
37
|
+
withIndexLock<T>(indexName: string, callback: () => Promise<T>): Promise<T>;
|
|
38
|
+
ensureRegistry(connection: Connection): Promise<void>;
|
|
39
|
+
createVectorTable(connection: Connection, indexName: string, dimension: number, vectorFormat: OracleVectorFormat): Promise<void>;
|
|
40
|
+
upsertRegistry(connection: Connection, indexName: string, dimension: number, metric: OracleMetric, vectorFormat: OracleVectorFormat, indexConfig?: OracleVectorIndexConfig): Promise<void>;
|
|
41
|
+
updateRegistryIndexConfig(connection: Connection, indexName: string, metric: OracleMetric, indexConfig: OracleVectorIndexConfig): Promise<void>;
|
|
42
|
+
createVectorIndex(connection: Connection, indexName: string, metric: OracleMetric, indexConfig?: OracleVectorIndexConfig, tableNameOverride?: string): Promise<boolean>;
|
|
43
|
+
dropVectorIndex(connection: Connection, indexName: string, tableNameOverride?: string): Promise<void>;
|
|
44
|
+
createMetadataIndexes(connection: Connection, indexName: string, metadataFields: string[], tableNameOverride?: string): Promise<void>;
|
|
45
|
+
getIndexMetadata(connection: Connection, indexName: string): Promise<CachedIndexInfo>;
|
|
46
|
+
cacheIndexMetadata(indexName: string, indexInfo: CachedIndexInfo): CachedIndexInfo;
|
|
47
|
+
clearIndexMetadata(indexName: string): void;
|
|
48
|
+
getRegistryEntry(connection: Connection, indexName: string): Promise<Omit<IndexInfo, 'qualifiedTableName' | 'count'> | null>;
|
|
49
|
+
findRegistryEntryByTableName(connection: Connection, tableName: string): Promise<string | null>;
|
|
50
|
+
vectorTableExists(connection: Connection, tableName: string): Promise<boolean>;
|
|
51
|
+
assertCompatibleExistingIndex(existing: Omit<IndexInfo, 'qualifiedTableName' | 'count'>, indexName: string, dimension: number, metric: OracleMetric, vectorFormat: OracleVectorFormat): void;
|
|
52
|
+
mergeIndexConfig(indexConfig?: OracleVectorIndexConfig): Required<Pick<OracleVectorIndexConfig, 'type'>> & OracleVectorIndexConfig;
|
|
53
|
+
qualifiedRegistryTable(): string;
|
|
54
|
+
qualifiedTableName(indexName: string): string;
|
|
55
|
+
qualifiedIndexName(indexName: string): string;
|
|
56
|
+
}
|
|
57
|
+
export declare function normalizeIndexType(indexType: string): OracleVectorIndexType;
|
|
58
|
+
//# sourceMappingURL=ddl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ddl.d.ts","sourceRoot":"","sources":["../../src/vector/ddl.ts"],"names":[],"mappings":"AACA,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AE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAgBpF,6BAA6B,CAC3B,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,oBAAoB,GAAG,OAAO,CAAC,EACzD,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,kBAAkB,GAC/B,IAAI;IAoCP,gBAAgB,CACd,WAAW,CAAC,EAAE,uBAAuB,GACpC,QAAQ,CAAC,IAAI,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC,GAAG,uBAAuB;IAqB5E,sBAAsB,IAAI,MAAM;IAIhC,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAI7C,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;CAG9C;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,qBAAqB,CAM3E"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { OracleVectorFilter } from './types.js';
|
|
2
|
+
export interface SqlFragment {
|
|
3
|
+
sql: string;
|
|
4
|
+
binds: Record<string, unknown>;
|
|
5
|
+
}
|
|
6
|
+
export declare function buildMetadataWhereClause(filter?: OracleVectorFilter): SqlFragment;
|
|
7
|
+
//# sourceMappingURL=filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/vector/filter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGlD,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAeD,wBAAgB,wBAAwB,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,WAAW,CAQjF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function normalizeIdentifier(value: string, label: string): string;
|
|
2
|
+
export declare function normalizeLogicalIndexName(value: string, label?: string): string;
|
|
3
|
+
export declare function legacyCanonicalIndexName(value: string): string;
|
|
4
|
+
export declare function quoteIdentifier(value: string, label: string): string;
|
|
5
|
+
export declare function qualifyName(name: string, schemaName?: string): string;
|
|
6
|
+
export declare function tableNameForIndex(indexName: string, tablePrefix?: string): string;
|
|
7
|
+
export declare function indexNameForTable(tableName: string, suffix: string): string;
|
|
8
|
+
export declare function indexNameForMetadataField(tableName: string, field: string): string;
|
|
9
|
+
export declare function assertJsonPath(path: string): string;
|
|
10
|
+
export declare function jsonPathForPredicatePrefix(path: string): string;
|
|
11
|
+
//# sourceMappingURL=identifiers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identifiers.d.ts","sourceRoot":"","sources":["../../src/vector/identifiers.ts"],"names":[],"mappings":"AAQA,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CASxE;AAGD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAe,GAAG,MAAM,CASrF;AAGD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAIrE;AAGD,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,SAAe,GAAG,MAAM,CAUvF;AAGD,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAM3E;AAED,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAGlF;AAGD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMnD;AAGD,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG/D"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type * from './types.js';
|
|
2
|
+
import { MastraVector } from '@mastra/core/vector';
|
|
3
|
+
import type { DeleteIndexParams, DeleteVectorParams, DeleteVectorsParams, DescribeIndexParams, IndexStats, QueryResult, UpdateVectorParams, UpsertVectorParams } from '@mastra/core/vector';
|
|
4
|
+
import type { OracleBuildIndexParams, OracleConfigureVectorMemoryParams, OracleCreateIndexParams, OracleIndexAccuracyParams, OracleIndexStatusParams, OracleQueryVectorParams, OracleRebuildIndexParams, OracleVectorConfig, OracleVectorFilter } from './types.js';
|
|
5
|
+
export declare class OracleVector extends MastraVector<OracleVectorFilter> {
|
|
6
|
+
private readonly poolManager;
|
|
7
|
+
private readonly ownsPoolManager;
|
|
8
|
+
private readonly defaultIndexConfig;
|
|
9
|
+
private readonly upsertBatchSize;
|
|
10
|
+
private readonly registry;
|
|
11
|
+
constructor(config: OracleVectorConfig);
|
|
12
|
+
createIndex(params: OracleCreateIndexParams): Promise<void>;
|
|
13
|
+
buildIndex(params: OracleBuildIndexParams): Promise<void>;
|
|
14
|
+
rebuildIndex(params: OracleRebuildIndexParams): Promise<void>;
|
|
15
|
+
deleteIndex(params: DeleteIndexParams): Promise<void>;
|
|
16
|
+
configureVectorMemory(params: OracleConfigureVectorMemoryParams): Promise<void>;
|
|
17
|
+
getIndexStatus(params: OracleIndexStatusParams): Promise<string>;
|
|
18
|
+
indexAccuracyQuery(params: OracleIndexAccuracyParams): Promise<string>;
|
|
19
|
+
upsert(params: UpsertVectorParams): Promise<string[]>;
|
|
20
|
+
query(params: OracleQueryVectorParams): Promise<QueryResult[]>;
|
|
21
|
+
listIndexes(): Promise<string[]>;
|
|
22
|
+
describeIndex(params: DescribeIndexParams): Promise<IndexStats>;
|
|
23
|
+
updateVector(params: UpdateVectorParams<OracleVectorFilter>): Promise<void>;
|
|
24
|
+
deleteVector(params: DeleteVectorParams): Promise<void>;
|
|
25
|
+
deleteVectors(params: DeleteVectorsParams<OracleVectorFilter>): Promise<void>;
|
|
26
|
+
disconnect(): Promise<void>;
|
|
27
|
+
close(): Promise<void>;
|
|
28
|
+
private withConnection;
|
|
29
|
+
private cacheIndexMetadata;
|
|
30
|
+
private createVectorIndex;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vector/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAC;AAE7B,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAsB7B,OAAO,KAAK,EACV,sBAAsB,EACtB,iCAAiC,EACjC,uBAAuB,EACvB,yBAAyB,EACzB,uBAAuB,EAEvB,uBAAuB,EACvB,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAEnB,MAAM,SAAS,CAAC;AAcjB,qBAAa,YAAa,SAAQ,YAAY,CAAC,kBAAkB,CAAC;IAChE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAoB;IAChD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAU;IAC1C,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA0B;IAC7D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAS;IACzC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgB;gBAE7B,MAAM,EAAE,kBAAkB;IAkChC,WAAW,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3D,UAAU,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzD,YAAY,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7D,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrD,qBAAqB,CAAC,MAAM,EAAE,iCAAiC,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/E,cAAc,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC;IAIhE,kBAAkB,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC;IAItE,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAIrD,KAAK,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAI9D,WAAW,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAIhC,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC;IAI/D,YAAY,CAAC,MAAM,EAAE,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3E,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvD,aAAa,CAAC,MAAM,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7E,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAM3B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAId,cAAc;IAM5B,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,iBAAiB;CAS1B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vector store specific prompt that details supported Oracle JSON metadata filter operators and examples.
|
|
3
|
+
* This prompt helps users construct valid filters for Oracle Database Vector Search.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ORACLEDB_PROMPT = "When querying Oracle Database Vector Search, you can ONLY use the operators listed below. Any other operators will be rejected.\nImportant: Don't explain how to construct the filter - use the specified operators and fields to search the content and return relevant results.\nIf a user tries to give an explicit operator that is not supported, reject the filter entirely and let them know that the operator is not supported.\n\nOracle-specific behavior:\n- Metadata is stored as Oracle JSON.\n- Scalar comparisons are compiled to JSON_VALUE(metadata, ...).\n- Array, existence, and element-match checks are compiled to JSON_EXISTS(metadata, ...).\n- Regex filters are compiled to Oracle REGEXP_LIKE.\n- String contains filters are compiled to case-insensitive LIKE predicates.\n- User metadata values are always bound as parameters; do not generate raw SQL fragments inside filters.\n\nBasic Comparison Operators:\n- $eq: Exact match (default when using field: value)\n Example: { \"category\": \"electronics\" }\n- $ne: Not equal\n Example: { \"category\": { \"$ne\": \"electronics\" } }\n- $gt: Greater than\n Example: { \"price\": { \"$gt\": 100 } }\n- $gte: Greater than or equal\n Example: { \"price\": { \"$gte\": 100 } }\n- $lt: Less than\n Example: { \"price\": { \"$lt\": 100 } }\n- $lte: Less than or equal\n Example: { \"price\": { \"$lte\": 100 } }\n\nArray Operators:\n- $in: Match any value in an array or scalar field\n Example: { \"category\": { \"$in\": [\"electronics\", \"books\"] } }\n- $nin: Does not match any value in an array or scalar field\n Example: { \"category\": { \"$nin\": [\"electronics\", \"books\"] } }\n- $all: Match all values in an array field\n Example: { \"tags\": { \"$all\": [\"premium\", \"sale\"] } }\n- $elemMatch: Match array elements that meet all specified conditions\n Example: { \"items\": { \"$elemMatch\": { \"price\": { \"$gt\": 100 } } } }\n- $contains: For strings, perform case-insensitive substring matching. For arrays, require contained values.\n Example: { \"title\": { \"$contains\": \"oracle\" } }\n Example: { \"tags\": { \"$contains\": \"premium\" } }\n\nLogical Operators:\n- $and: Logical AND (implicit when using multiple conditions)\n Example: { \"$and\": [{ \"price\": { \"$gt\": 100 } }, { \"category\": \"electronics\" }] }\n- $or: Logical OR\n Example: { \"$or\": [{ \"price\": { \"$lt\": 50 } }, { \"category\": \"books\" }] }\n- $not: Logical NOT\n Example: { \"$not\": { \"category\": \"electronics\" } }\n- $nor: Logical NOR\n Example: { \"$nor\": [{ \"price\": { \"$lt\": 50 } }, { \"category\": \"books\" }] }\n\nElement Operators:\n- $exists: Check if a JSON metadata field exists\n Example: { \"rating\": { \"$exists\": true } }\n\nSpecial Operators:\n- $size: Array length check\n Example: { \"tags\": { \"$size\": 2 } }\n- $regex: Oracle regular expression match using REGEXP_LIKE\n Example: { \"source\": { \"$regex\": \"oracle.*database\" } }\n\nRestrictions:\n- Nested fields are supported using dot notation\n- Multiple conditions on the same field are supported with both implicit and explicit $and\n- Array operations should be used only on JSON array fields\n- Empty arrays in $in, $nin, and $all conditions are handled gracefully\n- Only logical operators ($and, $or, $not, $nor) can be used at the top level\n- All other operators must be used within a field condition\n Valid: { \"field\": { \"$gt\": 100 } }\n Valid: { \"$and\": [{ \"field\": { \"$gt\": 100 } }] }\n Invalid: { \"$gt\": 100 }\n Invalid: { \"$contains\": \"value\" }\n- Logical operators must contain field conditions, not direct operators\n Valid: { \"$and\": [{ \"field\": { \"$gt\": 100 } }] }\n Invalid: { \"$and\": [{ \"$gt\": 100 }] }\n- $not operator:\n - Must be a non-empty object\n - Can be used at field level or top level\n - Valid: { \"$not\": { \"field\": \"value\" } }\n - Valid: { \"field\": { \"$not\": { \"$eq\": \"value\" } } }\n- Other logical operators ($and, $or, $nor):\n - Can only be used at top level or nested within other logical operators\n - Can not be used on a field level, or be nested inside a field\n - Can not be used inside an operator\n - Valid: { \"$and\": [{ \"field\": { \"$gt\": 100 } }] }\n - Valid: { \"$or\": [{ \"$and\": [{ \"field\": { \"$gt\": 100 } }] }] }\n - Invalid: { \"field\": { \"$and\": [{ \"$gt\": 100 }] } }\n - Invalid: { \"field\": { \"$or\": [{ \"$gt\": 100 }] } }\n - Invalid: { \"field\": { \"$gt\": { \"$and\": [{...}] } } }\n- $elemMatch requires an object with conditions\n Valid: { \"array\": { \"$elemMatch\": { \"field\": \"value\" } } }\n Invalid: { \"array\": { \"$elemMatch\": \"value\" } }\n\nExample Complex Query:\n{\n \"$and\": [\n { \"resource_id\": \"docs\" },\n { \"thread_id\": { \"$exists\": true } },\n { \"score\": { \"$gte\": 0.75 } },\n { \"tags\": { \"$all\": [\"oracle\", \"mastra\"] } },\n { \"chunks\": { \"$elemMatch\": { \"page\": { \"$gte\": 2 }, \"kind\": \"reference\" } } },\n { \"$or\": [\n { \"source\": { \"$regex\": \"oracle.*database\" } },\n { \"title\": { \"$contains\": \"vector search\" } }\n ]}\n ]\n}";
|
|
6
|
+
//# sourceMappingURL=prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/vector/prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,eAAe,shKAwG1B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { QueryResult } from '@mastra/core/vector';
|
|
2
|
+
import type { IndexRegistry, WithConnection } from './ddl.js';
|
|
3
|
+
import type { OracleQueryVectorParams } from './types.js';
|
|
4
|
+
export declare function query(registry: IndexRegistry, withConnection: WithConnection, { indexName, queryVector, topK, filter, includeVector, minScore, sparseVector, queryMode, targetAccuracy, }: OracleQueryVectorParams): Promise<QueryResult[]>;
|
|
5
|
+
//# sourceMappingURL=query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/vector/query.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIvD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG3D,OAAO,KAAK,EAAgB,uBAAuB,EAAsB,MAAM,SAAS,CAAC;AAKzF,wBAAsB,KAAK,CACzB,QAAQ,EAAE,aAAa,EACvB,cAAc,EAAE,cAAc,EAC9B,EACE,SAAS,EACT,WAAW,EACX,IAAS,EACT,MAAM,EACN,aAAqB,EACrB,QAAa,EACb,YAAY,EACZ,SAAS,EACT,cAAc,GACf,EAAE,uBAAuB,GACzB,OAAO,CAAC,WAAW,EAAE,CAAC,CAkHxB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { OracleMetric, OracleVectorFormat, OracleVectorIndexConfig, OracleVectorIndexType } from './types.js';
|
|
2
|
+
export declare function normalizeMetric(metric: string): OracleMetric;
|
|
3
|
+
export declare function normalizeVectorFormat(format: string): OracleVectorFormat;
|
|
4
|
+
export declare function metricToken(metric: OracleMetric): string;
|
|
5
|
+
export declare function defaultMetricForFormat(vectorFormat: OracleVectorFormat): OracleMetric;
|
|
6
|
+
export declare function vectorFormatToken(vectorFormat: OracleVectorFormat): string;
|
|
7
|
+
export declare function validateMetricForFormat(metric: OracleMetric, vectorFormat: OracleVectorFormat, indexType?: OracleVectorIndexType): void;
|
|
8
|
+
export declare function buildVectorIndexParameterClause(indexConfig: OracleVectorIndexConfig): string;
|
|
9
|
+
export declare function validateDimension(dimension: number): number;
|
|
10
|
+
export declare function validateVectorFormatDimension(vectorFormat: OracleVectorFormat, dimension: number): void;
|
|
11
|
+
export declare function validateAccuracy(accuracy: number): number;
|
|
12
|
+
//# sourceMappingURL=sql.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sql.d.ts","sourceRoot":"","sources":["../../src/vector/sql.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAIhH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,CAY5D;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB,CAMxE;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAcxD;AAED,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,kBAAkB,GAAG,YAAY,CAErF;AAED,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,kBAAkB,GAAG,MAAM,CAU1E;AAID,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,kBAAkB,EAChC,SAAS,CAAC,EAAE,qBAAqB,GAChC,IAAI,CAgBN;AAED,wBAAgB,+BAA+B,CAAC,WAAW,EAAE,uBAAuB,GAAG,MAAM,CAkB5F;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAK3D;AAED,wBAAgB,6BAA6B,CAAC,YAAY,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAIvG;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKzD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DescribeIndexParams, IndexStats } from '@mastra/core/vector';
|
|
2
|
+
import type { IndexRegistry, WithConnection } from './ddl.js';
|
|
3
|
+
import type { OracleConfigureVectorMemoryParams, OracleIndexAccuracyParams, OracleIndexStatusParams } from './types.js';
|
|
4
|
+
export declare function listIndexes(registry: IndexRegistry, withConnection: WithConnection): Promise<string[]>;
|
|
5
|
+
export declare function describeIndex(registry: IndexRegistry, withConnection: WithConnection, { indexName }: DescribeIndexParams): Promise<IndexStats>;
|
|
6
|
+
export declare function getIndexStatus(registry: IndexRegistry, withConnection: WithConnection, { indexName, ownerName }: OracleIndexStatusParams): Promise<string>;
|
|
7
|
+
export declare function indexAccuracyQuery(registry: IndexRegistry, withConnection: WithConnection, { indexName, queryVector, topK, targetAccuracy }: OracleIndexAccuracyParams): Promise<string>;
|
|
8
|
+
export declare function configureVectorMemory(withConnection: WithConnection, { size, scope }: OracleConfigureVectorMemoryParams): Promise<void>;
|
|
9
|
+
//# sourceMappingURL=stats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../src/vector/stats.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAM3E,OAAO,KAAK,EAAa,aAAa,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGtE,OAAO,KAAK,EAAE,iCAAiC,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAOrH,wBAAsB,WAAW,CAAC,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAc5G;AAED,wBAAsB,aAAa,CACjC,QAAQ,EAAE,aAAa,EACvB,cAAc,EAAE,cAAc,EAC9B,EAAE,SAAS,EAAE,EAAE,mBAAmB,GACjC,OAAO,CAAC,UAAU,CAAC,CAOrB;AAED,wBAAsB,cAAc,CAClC,QAAQ,EAAE,aAAa,EACvB,cAAc,EAAE,cAAc,EAC9B,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,uBAAuB,GAChD,OAAO,CAAC,MAAM,CAAC,CAqCjB;AAED,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,aAAa,EACvB,cAAc,EAAE,cAAc,EAC9B,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,yBAAyB,GAC1E,OAAO,CAAC,MAAM,CAAC,CAkCjB;AAED,wBAAsB,qBAAqB,CACzC,cAAc,EAAE,cAAc,EAC9B,EAAE,IAAI,EAAE,KAAgB,EAAE,EAAE,iCAAiC,GAC5D,OAAO,CAAC,IAAI,CAAC,CAiBf"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { CreateIndexParams, QueryVectorParams, VectorFilter } from '@mastra/core/vector';
|
|
2
|
+
import type { OracleConnectionConfig, OraclePoolManager } from '../shared/connection.js';
|
|
3
|
+
export type OracleMetric = 'cosine' | 'euclidean' | 'dotproduct' | 'hamming' | 'jaccard';
|
|
4
|
+
export type OracleVectorIndexType = 'hnsw' | 'ivf' | 'none';
|
|
5
|
+
export type OracleVectorFormat = 'vector' | 'bit' | 'int8';
|
|
6
|
+
export type OracleQueryMode = 'approx' | 'exact';
|
|
7
|
+
export type OracleVectorMemoryScope = 'MEMORY' | 'SPFILE' | 'BOTH';
|
|
8
|
+
export type OracleVectorFilter = VectorFilter;
|
|
9
|
+
export interface OracleVectorIndexConfig {
|
|
10
|
+
type?: OracleVectorIndexType;
|
|
11
|
+
accuracy?: number;
|
|
12
|
+
hnsw?: {
|
|
13
|
+
neighbors?: number;
|
|
14
|
+
efConstruction?: number;
|
|
15
|
+
};
|
|
16
|
+
ivf?: {
|
|
17
|
+
neighborPartitions?: number;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface OracleVectorMemoryConfig {
|
|
21
|
+
size: string;
|
|
22
|
+
scope?: OracleVectorMemoryScope;
|
|
23
|
+
}
|
|
24
|
+
export interface OracleVectorConfig extends OracleConnectionConfig {
|
|
25
|
+
id: string;
|
|
26
|
+
poolManager?: OraclePoolManager;
|
|
27
|
+
schemaName?: string;
|
|
28
|
+
tablePrefix?: string;
|
|
29
|
+
registryTableName?: string;
|
|
30
|
+
defaultIndexConfig?: OracleVectorIndexConfig;
|
|
31
|
+
defaultMetadataIndexes?: string[];
|
|
32
|
+
defaultVectorFormat?: OracleVectorFormat;
|
|
33
|
+
/**
|
|
34
|
+
* Number of vectors to send per Oracle executeMany call. A single upsert
|
|
35
|
+
* operation still commits once after all batches succeed.
|
|
36
|
+
*/
|
|
37
|
+
upsertBatchSize?: number;
|
|
38
|
+
}
|
|
39
|
+
export interface OracleBuildIndexParams {
|
|
40
|
+
indexName: string;
|
|
41
|
+
metric?: OracleMetric;
|
|
42
|
+
indexConfig?: OracleVectorIndexConfig;
|
|
43
|
+
}
|
|
44
|
+
export interface OracleCreateIndexParams extends Omit<CreateIndexParams, 'metric'> {
|
|
45
|
+
metric?: OracleMetric;
|
|
46
|
+
vectorFormat?: OracleVectorFormat;
|
|
47
|
+
indexConfig?: OracleVectorIndexConfig;
|
|
48
|
+
buildIndex?: boolean;
|
|
49
|
+
metadataIndexes?: string[];
|
|
50
|
+
}
|
|
51
|
+
export interface OracleQueryVectorParams extends QueryVectorParams<OracleVectorFilter> {
|
|
52
|
+
minScore?: number;
|
|
53
|
+
queryMode?: OracleQueryMode;
|
|
54
|
+
targetAccuracy?: number;
|
|
55
|
+
}
|
|
56
|
+
export interface OracleIndexStats {
|
|
57
|
+
indexName: string;
|
|
58
|
+
tableName: string;
|
|
59
|
+
dimension: number;
|
|
60
|
+
count: number;
|
|
61
|
+
metric: OracleMetric;
|
|
62
|
+
indexType: OracleVectorIndexType;
|
|
63
|
+
vectorFormat: OracleVectorFormat;
|
|
64
|
+
accuracy?: number;
|
|
65
|
+
}
|
|
66
|
+
export interface OracleRebuildIndexParams extends OracleBuildIndexParams {
|
|
67
|
+
}
|
|
68
|
+
export interface OracleConfigureVectorMemoryParams extends OracleVectorMemoryConfig {
|
|
69
|
+
}
|
|
70
|
+
export interface OracleIndexStatusParams {
|
|
71
|
+
indexName: string;
|
|
72
|
+
ownerName?: string;
|
|
73
|
+
}
|
|
74
|
+
export interface OracleIndexAccuracyParams {
|
|
75
|
+
indexName: string;
|
|
76
|
+
queryVector: number[];
|
|
77
|
+
topK: number;
|
|
78
|
+
targetAccuracy?: number;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/vector/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE9F,OAAO,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGtF,MAAM,MAAM,YAAY,GA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Error } from '@mastra/core/error';
|
|
2
|
+
import type { DeleteVectorParams, DeleteVectorsParams, UpdateVectorParams, UpsertVectorParams } from '@mastra/core/vector';
|
|
3
|
+
import oracledb from 'oracledb';
|
|
4
|
+
import type { IndexRegistry, WithConnection } from './ddl.js';
|
|
5
|
+
import type { OracleIndexStats, OracleVectorFilter, OracleVectorFormat } from './types.js';
|
|
6
|
+
export declare const VECTOR_ID_DELETE_CHUNK_SIZE = 900;
|
|
7
|
+
export declare const DEFAULT_VECTOR_UPSERT_BATCH_SIZE = 200;
|
|
8
|
+
export declare const STORE_NAME = "ORACLE";
|
|
9
|
+
export declare function upsert(registry: IndexRegistry, withConnection: WithConnection, upsertBatchSize: number, { indexName, vectors, metadata, ids, sparseVectors, deleteFilter }: UpsertVectorParams): Promise<string[]>;
|
|
10
|
+
export declare function updateVector(registry: IndexRegistry, withConnection: WithConnection, { indexName, id, filter, update }: UpdateVectorParams<OracleVectorFilter>): Promise<void>;
|
|
11
|
+
export declare function deleteVector(registry: IndexRegistry, withConnection: WithConnection, { indexName, id }: DeleteVectorParams): Promise<void>;
|
|
12
|
+
export declare function deleteVectors(registry: IndexRegistry, withConnection: WithConnection, { indexName, ids, filter }: DeleteVectorsParams<OracleVectorFilter>): Promise<void>;
|
|
13
|
+
export declare function validateVectors(vectors: number[][]): void;
|
|
14
|
+
export declare function validateVectorForIndex(vector: number[], indexInfo: Pick<OracleIndexStats, 'dimension' | 'vectorFormat'>, indexName: string): void;
|
|
15
|
+
export declare function vectorBind(vector: number[], vectorFormat: OracleVectorFormat): oracledb.BindParameter;
|
|
16
|
+
export declare function vectorValue(vector: number[], vectorFormat: OracleVectorFormat): Float32Array | Int8Array | Uint8Array;
|
|
17
|
+
export declare function chunkArray<T>(values: T[], chunkSize: number): T[][];
|
|
18
|
+
export declare function withCause(error: Error, cause: unknown): Error;
|
|
19
|
+
export declare function asMastraError(operation: string, reason: string, details: Record<string, string | number | boolean | undefined>, cause: unknown, category?: ErrorCategory): MastraError;
|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"Oracle Database provider for Mastra storage and vector retrieval",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -18,37 +18,23 @@
|
|
|
18
18
|
},
|
|
19
19
|
"./package.json": "./package.json"
|
|
20
20
|
},
|
|
21
|
-
"scripts": {
|
|
22
|
-
"build:lib": "tsup --silent --config tsup.config.ts",
|
|
23
|
-
"prepack": "tsx ../../scripts/generate-package-docs.ts",
|
|
24
|
-
"build:watch": "pnpm build:lib --watch",
|
|
25
|
-
"test": "pnpm test:unit",
|
|
26
|
-
"test:unit": "vitest run --exclude \"src/**/*.integration.test.ts\"",
|
|
27
|
-
"pretest:integration": "docker compose up -d --wait",
|
|
28
|
-
"test:integration": "pnpm test:storage-integration && pnpm test:vector-integration",
|
|
29
|
-
"posttest:integration": "docker compose down -v",
|
|
30
|
-
"typecheck": "tsc --noEmit",
|
|
31
|
-
"lint": "eslint .",
|
|
32
|
-
"test:vector-integration": "RUN_ORACLE_VECTOR_INTEGRATION=true vitest run src/vector/index.integration.test.ts",
|
|
33
|
-
"test:storage-integration": "RUN_ORACLE_STORAGE_INTEGRATION=true vitest run --fileParallelism=false src/storage/index.test.ts src/storage/index.integration.test.ts"
|
|
34
|
-
},
|
|
35
21
|
"license": "Apache-2.0",
|
|
36
22
|
"dependencies": {
|
|
37
23
|
"oracledb": "^6.10.0"
|
|
38
24
|
},
|
|
39
25
|
"devDependencies": {
|
|
40
|
-
"@internal/lint": "workspace:*",
|
|
41
|
-
"@internal/types-builder": "workspace:*",
|
|
42
|
-
"@mastra/core": "workspace:*",
|
|
43
26
|
"@types/node": "22.19.15",
|
|
44
27
|
"@types/oracledb": "6.5.2",
|
|
45
|
-
"@vitest/coverage-v8": "
|
|
46
|
-
"@vitest/ui": "
|
|
28
|
+
"@vitest/coverage-v8": "4.1.10",
|
|
29
|
+
"@vitest/ui": "4.1.10",
|
|
47
30
|
"eslint": "^10.4.1",
|
|
48
31
|
"tsup": "^8.5.1",
|
|
49
|
-
"tsx": "
|
|
50
|
-
"typescript": "
|
|
51
|
-
"vitest": "
|
|
32
|
+
"tsx": "^4.23.1",
|
|
33
|
+
"typescript": "^6.0.3",
|
|
34
|
+
"vitest": "4.1.10",
|
|
35
|
+
"@internal/lint": "0.0.121",
|
|
36
|
+
"@internal/types-builder": "0.0.96",
|
|
37
|
+
"@mastra/core": "1.58.0-alpha.6"
|
|
52
38
|
},
|
|
53
39
|
"peerDependencies": {
|
|
54
40
|
"@mastra/core": ">=1.34.0-0 <2.0.0-0"
|
|
@@ -68,5 +54,18 @@
|
|
|
68
54
|
},
|
|
69
55
|
"engines": {
|
|
70
56
|
"node": ">=22.13.0"
|
|
57
|
+
},
|
|
58
|
+
"scripts": {
|
|
59
|
+
"build:lib": "tsup --silent --config tsup.config.ts",
|
|
60
|
+
"build:watch": "pnpm build:lib --watch",
|
|
61
|
+
"test": "pnpm test:unit",
|
|
62
|
+
"test:unit": "vitest run --exclude \"src/**/*.integration.test.ts\"",
|
|
63
|
+
"pretest:integration": "docker compose up -d --wait",
|
|
64
|
+
"test:integration": "pnpm test:storage-integration && pnpm test:vector-integration",
|
|
65
|
+
"posttest:integration": "docker compose down -v",
|
|
66
|
+
"typecheck": "tsc --noEmit",
|
|
67
|
+
"lint": "eslint .",
|
|
68
|
+
"test:vector-integration": "RUN_ORACLE_VECTOR_INTEGRATION=true vitest run src/vector/index.integration.test.ts",
|
|
69
|
+
"test:storage-integration": "RUN_ORACLE_STORAGE_INTEGRATION=true vitest run --fileParallelism=false src/storage/index.test.ts src/storage/index.integration.test.ts"
|
|
71
70
|
}
|
|
72
|
-
}
|
|
71
|
+
}
|