@elizaos/plugin-sql 1.0.6 → 1.0.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.
package/dist/index.js CHANGED
@@ -16,7 +16,6 @@ import { drizzle } from "drizzle-orm/pglite";
16
16
  import {
17
17
  DatabaseAdapter,
18
18
  logger,
19
- stringToUuid,
20
19
  ChannelType
21
20
  } from "@elizaos/core";
22
21
  import {
@@ -558,31 +557,6 @@ var BaseDrizzleAdapter = class extends DatabaseAdapter {
558
557
  }
559
558
  throw lastError;
560
559
  }
561
- /**
562
- * Asynchronously ensures that an agent exists by checking if an agent with the same name already exists in the system.
563
- * If the agent does not exist, it will be created with the provided data.
564
- *
565
- * @param {Partial<Agent>} agent - The partial data of the agent to ensure its existence.
566
- * @returns {Promise<void>} - A promise that resolves when the agent is successfully ensured.
567
- * @throws {Error} - If the agent name is not provided or if there is an issue creating the agent.
568
- */
569
- async ensureAgentExists(agent) {
570
- if (!agent.name) {
571
- throw new Error("Agent name is required");
572
- }
573
- const agents = await this.getAgents();
574
- const existingAgentId = agents.find((a) => a.name === agent.name)?.id;
575
- if (existingAgentId) {
576
- const existingAgent = await this.getAgent(existingAgentId);
577
- return existingAgent;
578
- }
579
- const newAgent = {
580
- ...agent,
581
- id: stringToUuid(agent.name)
582
- };
583
- await this.createAgent(newAgent);
584
- return newAgent;
585
- }
586
560
  /**
587
561
  * Asynchronously ensures that the given embedding dimension is valid for the agent.
588
562
  *