@mastra/oracledb 0.5.6 → 0.5.7

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.
@@ -3,7 +3,7 @@ name: mastra-oracledb
3
3
  description: Documentation for @mastra/oracledb. Use when working with @mastra/oracledb APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/oracledb"
6
- version: "0.5.6"
6
+ version: "0.5.7"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -14,13 +14,6 @@ Use this skill whenever you are working with @mastra/oracledb to obtain the doma
14
14
 
15
15
  Read the individual reference documents for detailed explanations and code examples.
16
16
 
17
- ### Docs
18
-
19
- - [Observational Memory](references/docs-memory-observational-memory.md) - Configure Mastra Observational Memory to compress long conversations into durable observations while preserving context across threads and sessions.
20
- - [Semantic recall](references/docs-memory-semantic-recall.md) - Retrieve relevant messages from past Mastra conversations with semantic recall, vector search, embeddings, metadata filters, and configurable storage.
21
- - [Working memory](references/docs-memory-working-memory.md) - Persist user profiles, preferences, and application data with Mastra working memory using resource- or thread-scoped templates and storage adapters.
22
- - [Storage](references/docs-storage.md) - Configure Mastra storage to persist memory, workflow state, observability data, evals, schedules, and long-running agent state across restarts.
23
-
24
17
  ### Integrations
25
18
 
26
19
  - [OracleDB](references/integrations-databases-oracledb.md) - Persist Mastra memory, workflows, observability, scores, MCP metadata, and agent registry data in Oracle Database with OracleStore.
@@ -30,9 +23,6 @@ Read the individual reference documents for detailed explanations and code examp
30
23
 
31
24
  - [Reference: Metadata filters](references/reference-rag-metadata-filters.md) - Mastra provides a unified metadata filtering syntax across all vector stores, based on MongoDB/Sift query syntax.
32
25
  - [RAG (Retrieval-Augmented Generation) in Mastra](references/reference-rag-overview.md) - RAG in Mastra helps you enhance LLM outputs by incorporating relevant context from your own data sources, improving accuracy and grounding responses in real information.
33
- - [Retrieval, semantic search, reranking](references/reference-rag-retrieval.md) - After storing embeddings, you need to retrieve relevant chunks to answer user queries.
34
- - [Storing embeddings in a vector database](references/reference-rag-vector-databases.md) - After generating embeddings, you need to store them in a database that supports vector similarity search.
35
- - [Reference: Storage retention (prune)](references/reference-storage-retention.md) - prune() deletes rows. It caps growth and is safe to run against large tables (batched, bounded, resumable, cancellable).
36
26
 
37
27
 
38
28
  Read [assets/SOURCE_MAP.json](assets/SOURCE_MAP.json) for source code references.
@@ -1,6 +1,87 @@
1
1
  {
2
- "version": "0.5.6",
2
+ "version": "0.5.7",
3
3
  "package": "@mastra/oracledb",
4
- "exports": {},
4
+ "exports": {
5
+ "AgentsOracle": {
6
+ "types": "dist/storage/domains/agents/index.d.ts",
7
+ "implementation": "dist/index.js",
8
+ "line": 2187
9
+ },
10
+ "DEFAULT_ORACLE_MIGRATIONS_TABLE": {
11
+ "types": "dist/storage/migrations.d.ts",
12
+ "implementation": "dist/index.js",
13
+ "line": 8891
14
+ },
15
+ "MCPClientsOracle": {
16
+ "types": "dist/storage/domains/mcp-clients/index.d.ts",
17
+ "implementation": "dist/index.js",
18
+ "line": 2881
19
+ },
20
+ "MemoryOracle": {
21
+ "types": "dist/storage/domains/memory/index.d.ts",
22
+ "implementation": "dist/index.js",
23
+ "line": 5678
24
+ },
25
+ "ORACLEDB_PROMPT": {
26
+ "types": "dist/vector/prompt.d.ts",
27
+ "implementation": "dist/index.js",
28
+ "line": 9645
29
+ },
30
+ "ObservabilityOracle": {
31
+ "types": "dist/storage/domains/observability/index.d.ts",
32
+ "implementation": "dist/index.js",
33
+ "line": 7161
34
+ },
35
+ "OracleDB": {
36
+ "types": "dist/storage/db/index.d.ts",
37
+ "implementation": "dist/index.js",
38
+ "line": 1638
39
+ },
40
+ "OracleMigrationRegistry": {
41
+ "types": "dist/storage/migrations.d.ts",
42
+ "implementation": "dist/index.js",
43
+ "line": 8897
44
+ },
45
+ "OraclePoolManager": {
46
+ "types": "dist/shared/connection.d.ts",
47
+ "implementation": "dist/index.js",
48
+ "line": 9
49
+ },
50
+ "OracleStore": {
51
+ "types": "dist/storage/index.d.ts",
52
+ "implementation": "dist/index.js",
53
+ "line": 9058
54
+ },
55
+ "OracleVector": {
56
+ "types": "dist/vector/index.d.ts",
57
+ "implementation": "dist/index.js",
58
+ "line": 1516
59
+ },
60
+ "ScorerDefinitionsOracle": {
61
+ "types": "dist/storage/domains/scorer-definitions/index.d.ts",
62
+ "implementation": "dist/index.js",
63
+ "line": 7359
64
+ },
65
+ "ScoresOracle": {
66
+ "types": "dist/storage/domains/scores/index.d.ts",
67
+ "implementation": "dist/index.js",
68
+ "line": 7918
69
+ },
70
+ "WorkflowsOracle": {
71
+ "types": "dist/storage/domains/workflows/index.d.ts",
72
+ "implementation": "dist/index.js",
73
+ "line": 8348
74
+ },
75
+ "exportSchemas": {
76
+ "types": "dist/schema.d.ts",
77
+ "implementation": "dist/index.js",
78
+ "line": 9250
79
+ },
80
+ "oracleMigrationTableSql": {
81
+ "types": "dist/storage/migrations.d.ts",
82
+ "implementation": "dist/index.js",
83
+ "line": 8989
84
+ }
85
+ },
5
86
  "modules": {}
6
87
  }
@@ -40,7 +40,7 @@ const results = await store.query({
40
40
 
41
41
  ### Logical Operators
42
42
 
43
- `$and`Logical AND{ $and: \[{ price: { $gt: 100 } }, { stock: { $gt: 0 } }] }Supported by: All except Vectorize, Couchbase`$or`Logical OR{ $or: \[{ status: "active" }, { priority: "high" }] }Supported by: All except Vectorize, Couchbase`$not`Logical NOT{ price: { $not: { $lt: 100 } } }Supported by: Astra, Qdrant, Upstash, PgVector, libSQL, MongoDB, OracleDB`$nor`Logical NOR{ $nor: \[{ status: "deleted" }, { archived: true }] }Supported by: Qdrant, Upstash, PgVector, libSQL, MongoDB, OracleDB
43
+ `$and`Logical AND{ $and: \[{ price: { $gt: 100 } }, { stock: { $gt: 0 } }] }Supported by: All except Vectorize, Couchbase`$or`Logical OR{ $or: \[{ status: "active" }, { priority: "high" }] }Supported by: All except Vectorize, Couchbase`$not`Logical NOT{ price: { $not: { $lt: 100 } } }Supported by: Astra, Qdrant, Upstash, PgVector, libSQL, MongoDB, OracleDB`$nor`Logical NOR{ $nor: \[{ status: "deleted" }, { archived: true }] }Supported by: Upstash, PgVector, libSQL, MongoDB, OracleDB
44
44
 
45
45
  ### Element Operators
46
46
 
package/dist/index.cjs CHANGED
@@ -8626,7 +8626,11 @@ var WorkflowsOracle = class WorkflowsOracle extends _mastra_core_storage.Workflo
8626
8626
  }, error);
8627
8627
  }
8628
8628
  }
8629
- async listWorkflowRuns({ workflowName, fromDate, toDate, perPage, page, resourceId, status } = {}) {
8629
+ /**
8630
+ * Lists runs newest first, with optional filters and pagination. With `summary`, each run's
8631
+ * snapshot holds only `status`, `timestamp` and `parentWorkflow`.
8632
+ */
8633
+ async listWorkflowRuns({ workflowName, fromDate, toDate, perPage, page, resourceId, status, summary } = {}) {
8630
8634
  try {
8631
8635
  const { whereClause, binds } = this.workflowWhereClause({
8632
8636
  workflowName,
@@ -8639,7 +8643,7 @@ var WorkflowsOracle = class WorkflowsOracle extends _mastra_core_storage.Workflo
8639
8643
  const normalizedPerPage = usePagination ? (0, _mastra_core_storage.normalizePerPage)(perPage, Number.MAX_SAFE_INTEGER) : 0;
8640
8644
  const offset = usePagination ? page * normalizedPerPage : 0;
8641
8645
  const count = usePagination ? Number((await this.db.one(`SELECT COUNT(*) AS "count" FROM ${this.table()} ${whereClause}`, binds)).count ?? 0) : 0;
8642
- const runs = (await this.db.manyOrNone(`${this.workflowSelect()} FROM ${this.table()} ${whereClause} ORDER BY ${WORKFLOW_CREATED_AT} DESC ${usePagination ? "OFFSET :offset ROWS FETCH NEXT :limit ROWS ONLY" : ""}`, usePagination ? {
8646
+ const runs = (await this.db.manyOrNone(`${summary ? this.workflowSummarySelect() : this.workflowSelect()} FROM ${this.table()} ${whereClause} ORDER BY ${WORKFLOW_CREATED_AT} DESC ${usePagination ? "OFFSET :offset ROWS FETCH NEXT :limit ROWS ONLY" : ""}`, usePagination ? {
8643
8647
  ...binds,
8644
8648
  offset,
8645
8649
  limit: normalizedPerPage
@@ -8823,12 +8827,25 @@ var WorkflowsOracle = class WorkflowsOracle extends _mastra_core_storage.Workflo
8823
8827
  workflowSelect() {
8824
8828
  return `SELECT workflow_name AS "workflowName", run_id AS "runId", ${WORKFLOW_RESOURCE_ID} AS "resourceId", snapshot AS "snapshot", ${WORKFLOW_CREATED_AT} AS "createdAt", ${WORKFLOW_UPDATED_AT} AS "updatedAt"`;
8825
8829
  }
8830
+ /**
8831
+ * Selects only the snapshot fields a summary listing returns, so the snapshot itself is never
8832
+ * sent. `NULL ON ERROR` keeps a row whose snapshot isn't valid JSON from failing the listing.
8833
+ */
8834
+ workflowSummarySelect() {
8835
+ return `SELECT workflow_name AS "workflowName", run_id AS "runId", ${WORKFLOW_RESOURCE_ID} AS "resourceId",
8836
+ JSON_VALUE(snapshot, '$.status' RETURNING VARCHAR2(64) NULL ON ERROR) AS "status",
8837
+ JSON_VALUE(snapshot, '$.timestamp' RETURNING NUMBER NULL ON ERROR) AS "timestamp",
8838
+ JSON_VALUE(snapshot, '$.parentWorkflow.workflowId' NULL ON ERROR) AS "parentWorkflowId",
8839
+ JSON_VALUE(snapshot, '$.parentWorkflow.runId' NULL ON ERROR) AS "parentRunId",
8840
+ ${WORKFLOW_CREATED_AT} AS "createdAt", ${WORKFLOW_UPDATED_AT} AS "updatedAt"`;
8841
+ }
8842
+ /** Maps a full row, or a summary row from `workflowSummarySelect()`, to a workflow run. */
8826
8843
  parseWorkflowRun(row) {
8827
8844
  return {
8828
8845
  workflowName: String(row.workflowName),
8829
8846
  runId: String(row.runId),
8830
8847
  resourceId: row.resourceId === null || row.resourceId === void 0 ? void 0 : String(row.resourceId),
8831
- snapshot: parseSnapshot(row.snapshot),
8848
+ snapshot: "snapshot" in row ? parseSnapshot(row.snapshot) : summarySnapshot(row),
8832
8849
  createdAt: toDate(row.createdAt),
8833
8850
  updatedAt: toDate(row.updatedAt)
8834
8851
  };
@@ -8872,6 +8889,21 @@ function createDefaultSnapshot(runId) {
8872
8889
  requestContext: {}
8873
8890
  };
8874
8891
  }
8892
+ /**
8893
+ * The reduced snapshot of a summary row from `workflowSummarySelect()`: `status` and `timestamp`
8894
+ * when set, and `parentWorkflow` only when both of its IDs are non-empty strings.
8895
+ */
8896
+ function summarySnapshot(row) {
8897
+ const snapshot = {};
8898
+ if (row.status !== null && row.status !== void 0) snapshot.status = row.status;
8899
+ if (row.timestamp !== null && row.timestamp !== void 0) snapshot.timestamp = Number(row.timestamp);
8900
+ const { parentWorkflowId: workflowId, parentRunId: runId } = row;
8901
+ if (typeof workflowId === "string" && workflowId !== "" && typeof runId === "string" && runId !== "") snapshot.parentWorkflow = {
8902
+ workflowId,
8903
+ runId
8904
+ };
8905
+ return snapshot;
8906
+ }
8875
8907
  function parseSnapshot(value) {
8876
8908
  if (typeof value === "string") return JSON.parse(value);
8877
8909
  if (Buffer.isBuffer(value)) return JSON.parse(value.toString("utf8"));