import {
  createSuite
} from "./chunk-UKRCZJJC.js";
import "./chunk-CAY57CKF.js";
import "./chunk-KOO5733S.js";

// src/tools/create-suite.ts
async function handleCreateSuite(params) {
  let parsedTargets;
  try {
    parsedTargets = JSON.parse(params.targets);
  } catch {
    return 'Error: `targets` must be a valid JSON array of objects with `type` and `referenceId` fields.\n\nExample: [{"type": "http", "referenceId": "agent_abc123"}]';
  }
  const suite = await createSuite({
    name: params.name,
    description: params.description,
    scenarioIds: params.scenarioIds,
    targets: parsedTargets,
    repeatCount: params.repeatCount,
    labels: params.labels
  });
  return [
    `Suite "${suite.name}" created successfully.`,
    "",
    `**ID**: ${suite.id}`,
    `**Slug**: ${suite.slug}`,
    `**Scenarios**: ${suite.scenarioIds.length}`,
    `**Targets**: ${suite.targets.length}`,
    `**Repeat**: ${suite.repeatCount}x`,
    "",
    `> Use \`platform_run_suite\` with ID \`${suite.id}\` to trigger execution.`
  ].join("\n");
}
export {
  handleCreateSuite
};
//# sourceMappingURL=create-suite-HEQPNLND.js.map