@mastra/libsql 1.24.0 → 1.24.1-alpha.1

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/dist/index.js CHANGED
@@ -7,7 +7,6 @@ import { BaseFilterTranslator } from "@mastra/core/vector/filter";
7
7
  import { realpath } from "fs/promises";
8
8
  import { basename, dirname, isAbsolute, join, resolve } from "path";
9
9
  import { MastraBase } from "@mastra/core/base";
10
- import { randomUUID } from "crypto";
11
10
  import { MessageList } from "@mastra/core/agent";
12
11
  import { saveScorePayloadSchema } from "@mastra/core/evals";
13
12
  import { skillSnapshotFieldValuesEqual } from "@mastra/core/storage/domains/skills";
@@ -9579,7 +9578,7 @@ var MemoryLibSQL = class MemoryLibSQL extends MemoryStorage {
9579
9578
  return;
9580
9579
  }
9581
9580
  const newChunk = {
9582
- id: `ombuf-${randomUUID()}`,
9581
+ id: `ombuf-${globalThis.crypto.randomUUID()}`,
9583
9582
  cycleId: input.chunk.cycleId,
9584
9583
  observations: input.chunk.observations,
9585
9584
  tokenCount: input.chunk.tokenCount,
@@ -10045,7 +10044,7 @@ var NotificationsLibSQL = class NotificationsLibSQL extends NotificationsStorage
10045
10044
  }
10046
10045
  const now = input.createdAt ?? /* @__PURE__ */ new Date();
10047
10046
  const record = {
10048
- id: input.id ?? randomUUID(),
10047
+ id: input.id ?? globalThis.crypto.randomUUID(),
10049
10048
  threadId: input.threadId,
10050
10049
  source: input.source,
10051
10050
  kind: input.kind,
@@ -13506,9 +13505,10 @@ var WorkflowsLibSQL = class WorkflowsLibSQL extends WorkflowsStorage {
13506
13505
  ...state
13507
13506
  };
13508
13507
  await tx.execute({
13509
- sql: `UPDATE ${TABLE_WORKFLOW_SNAPSHOT} SET snapshot = jsonb(?) WHERE workflow_name = ? AND run_id = ?`,
13508
+ sql: `UPDATE ${TABLE_WORKFLOW_SNAPSHOT} SET snapshot = jsonb(?), updatedAt = ? WHERE workflow_name = ? AND run_id = ?`,
13510
13509
  args: [
13511
13510
  safeStringify(updatedSnapshot),
13511
+ (/* @__PURE__ */ new Date()).toISOString(),
13512
13512
  workflowName,
13513
13513
  runId
13514
13514
  ]
@@ -14350,7 +14350,7 @@ var LibSQLFactoryStorageOps = class {
14350
14350
  const schema = this.#schema(collection);
14351
14351
  const pk = primaryKeyOf(schema);
14352
14352
  const values = { ...row };
14353
- if (schema.columns[pk].type === "uuid-pk" && values[pk] === void 0) values[pk] = randomUUID();
14353
+ if (schema.columns[pk].type === "uuid-pk" && values[pk] === void 0) values[pk] = globalThis.crypto.randomUUID();
14354
14354
  const columns = Object.keys(values).filter((column) => values[column] !== void 0);
14355
14355
  for (const column of columns) this.#column(schema, column);
14356
14356
  const sql = `INSERT INTO "${schema.name}" (${columns.map((c) => `"${c}"`).join(", ")}) VALUES (${columns.map(() => "?").join(", ")})`;