import { RegisteredLogger, ConsoleLogger } from './chunk-M3LRSDLL.js';

// src/base.ts
var MastraBase = class {
  component = RegisteredLogger.LLM;
  logger;
  name;
  #rawConfig;
  constructor({
    component,
    name,
    rawConfig
  }) {
    this.component = component || RegisteredLogger.LLM;
    this.name = name;
    this.#rawConfig = rawConfig;
    this.logger = new ConsoleLogger({ name: `${this.component} - ${this.name}` });
  }
  /**
   * Returns the raw storage configuration this primitive was created from,
   * or undefined if it was created from code.
   */
  toRawConfig() {
    return this.#rawConfig;
  }
  /**
   * Sets the raw storage configuration for this primitive.
   * @internal
   */
  __setRawConfig(rawConfig) {
    this.#rawConfig = rawConfig;
  }
  /**
   * Set the logger for the agent
   * @param logger
   */
  __setLogger(logger) {
    this.logger = "child" in logger && typeof logger.child === "function" ? logger.child(this.component) : logger;
  }
};

export { MastraBase };
//# sourceMappingURL=chunk-DNW46JHP.js.map
//# sourceMappingURL=chunk-DNW46JHP.js.map