import {
  toKebabCase
} from "./chunk-KET4QQZB.js";
import {
  init_dist
} from "./chunk-IBTHD2UA.js";
import {
  Err,
  Ok
} from "./chunk-RL4VMEXL.js";

// src/persona/generators/runtime.ts
init_dist();
function generateRuntime(persona) {
  try {
    const config = {
      name: toKebabCase(persona.name),
      skills: persona.skills,
      steps: persona.steps,
      timeout: persona.config.timeout,
      severity: persona.config.severity
    };
    return Ok(JSON.stringify(config, null, 2));
  } catch (error) {
    return Err(
      new Error(
        `Failed to generate runtime config: ${error instanceof Error ? error.message : String(error)}`
      )
    );
  }
}

export {
  generateRuntime
};
