{"version":3,"sources":["../../src/cli/index.ts","../../src/cli/commands/experiment/list-runs.ts","../../src/cli/commands/experiment/results.ts","../../src/cli/commands/experiment/list.ts"],"sourcesContent":["#!/usr/bin/env node\n\n// Load environment variables BEFORE any other imports\nimport { config } from \"dotenv\";\n// quiet: silence dotenv's \"injecting env\" tip line on every CLI run.\nconfig({ quiet: true });\n\nimport { Command } from \"commander\";\nimport { parsePromptSpec } from \"./types\";\nimport { formatApiErrorMessage } from \"../client-sdk/services/_shared/format-api-error\";\nimport { experimentListRunsCommand } from \"./commands/experiment/list-runs.js\";\nimport { experimentResultsCommand } from \"./commands/experiment/results.js\";\nimport { experimentListCommand } from \"./commands/experiment/list.js\";\n\ndeclare const __CLI_VERSION__: string;\n\n// Import commands with proper async handling\nconst addCommand = async (name: string, options: { version?: string; localFile?: string }): Promise<void> => {\n  const { addCommand: addCommandImpl } = await import(\"./commands/add.js\");\n  return addCommandImpl(name, options);\n};\n\nconst removeCommand = async (name: string): Promise<void> => {\n  const { removeCommand: removeCommandImpl } = await import(\"./commands/remove.js\");\n  return removeCommandImpl(name);\n};\n\nconst initCommand = async (): Promise<void> => {\n  const { initCommand: initCommandImpl } = await import(\"./commands/init.js\");\n  return initCommandImpl();\n};\n\nconst loginCommand = async (\n  options?: { apiKey?: string; device?: boolean; browser?: string },\n): Promise<void> => {\n  const { loginCommand: loginCommandImpl } = await import(\"./commands/login.js\");\n  return loginCommandImpl(options);\n};\n\nconst listCommand = async (options?: { format?: string }): Promise<void> => {\n  const { listCommand: listCommandImpl } = await import(\"./commands/list.js\");\n  return listCommandImpl(options);\n};\n\nconst syncCommand = async (): Promise<void> => {\n  const { syncCommand: syncCommandImpl } = await import(\"./commands/sync.js\");\n  return syncCommandImpl();\n};\n\nconst pullCommand = async (options?: { tag?: string }): Promise<void> => {\n  const { pullCommand: pullCommandImpl } = await import(\"./commands/pull.js\");\n  return pullCommandImpl(options);\n};\n\n// Tag commands\nconst tagListCommand = async (options?: { format?: string }): Promise<void> => {\n  const { tagListCommand: impl } = await import(\"./commands/tag/list.js\");\n  return impl(options);\n};\n\nconst tagCreateCommand = async (name: string): Promise<void> => {\n  const { tagCreateCommand: impl } = await import(\"./commands/tag/create.js\");\n  return impl(name);\n};\n\nconst tagRenameCommand = async (oldName: string, newName: string): Promise<void> => {\n  const { tagRenameCommand: impl } = await import(\"./commands/tag/rename.js\");\n  return impl(oldName, newName);\n};\n\nconst tagAssignCommand = async (promptHandle: string, tagName: string, options?: { version?: string }): Promise<void> => {\n  const { tagAssignCommand: impl } = await import(\"./commands/tag/assign.js\");\n  return impl(promptHandle, tagName, options);\n};\n\nconst tagDeleteCommand = async (tagName: string, options?: { force?: boolean }): Promise<void> => {\n  const { tagDeleteCommand: impl } = await import(\"./commands/tag/delete.js\");\n  return impl(tagName, options);\n};\n\nconst pushCommand = async (options?: { forceLocal?: boolean; forceRemote?: boolean }): Promise<void> => {\n  const { pushCommand: pushCommandImpl } = await import(\"./commands/push.js\");\n  return pushCommandImpl(options);\n};\n\nconst createCommand = async (name: string, options: Record<string, unknown>): Promise<void> => {\n  const { createCommand: createCommandImpl } = await import(\"./commands/create.js\");\n  return createCommandImpl(name, options);\n};\n\n// Evaluator commands\nconst listEvaluatorsCommand = async (options?: { format?: string }): Promise<void> => {\n  const { listEvaluatorsCommand: impl } = await import(\"./commands/evaluators/list.js\");\n  return impl(options);\n};\n\nconst getEvaluatorCommand = async (idOrSlug: string, options?: { format?: string }): Promise<void> => {\n  const { getEvaluatorCommand: impl } = await import(\"./commands/evaluators/get.js\");\n  return impl(idOrSlug, options);\n};\n\nconst createEvaluatorCommand = async (name: string, options: { type: string; format?: string }): Promise<void> => {\n  const { createEvaluatorCommand: impl } = await import(\"./commands/evaluators/create.js\");\n  return impl(name, options);\n};\n\nconst updateEvaluatorCommand = async (idOrSlug: string, options: { name?: string; settings?: string; format?: string }): Promise<void> => {\n  const { updateEvaluatorCommand: impl } = await import(\"./commands/evaluators/update.js\");\n  return impl(idOrSlug, options);\n};\n\nconst deleteEvaluatorCommand = async (idOrSlug: string, options?: { format?: string }): Promise<void> => {\n  const { deleteEvaluatorCommand: impl } = await import(\"./commands/evaluators/delete.js\");\n  return impl(idOrSlug, options);\n};\n\nconst program = new Command();\n\nprogram\n  .name(\"langwatch\")\n  .description(\"LangWatch CLI - Manage prompts, datasets, evaluators, scenarios, suites, and more\")\n  .version(__CLI_VERSION__, \"-v, --version\", \"Display the current version\")\n  .enablePositionalOptions()\n  .passThroughOptions()\n  .configureHelp({\n    showGlobalOptions: true,\n  })\n  .showHelpAfterError()\n  .showSuggestionAfterError();\n\n// Top-level commands\nconst loginCmd = program\n  .command(\"login\")\n  .description(\n    \"Login to LangWatch. With no flags, asks where (cloud vs self-hosted) and how (AI tools vs project SDK). For CI/agents pass --device, --project, --api-key, or --token to skip prompts.\",\n  )\n  .option(\"--api-key <key>\", \"Set API key non-interactively (CI/agents that already have a project API key) — writes to .env\")\n  .option(\"--endpoint <url>\", \"Override the LangWatch control-plane URL for this login (self-hosted instances)\")\n  .option(\n    \"--device\",\n    \"RFC 8628 device-flow login via your company SSO; provisions a personal virtual key for Claude Code / Codex / Cursor / Gemini CLI\",\n  )\n  .option(\n    \"--project\",\n    \"Force project login: mint a project SDK key via the browser and write it to .env (for the SDK, `langwatch eval`, prompts). The implicit default in non-TTY contexts.\",\n  )\n  .option(\n    \"--token <token>\",\n    \"Set device-session token non-interactively (CI/agents that already have a pre-minted token from the dashboard) — writes to ~/.langwatch/config.json\",\n  )\n  .option(\n    \"--browser <name>\",\n    \"browser to open for device-flow approval (chrome|chromium|firefox|safari|none|<path>)\",\n  );\n\nloginCmd.action(async (options: { apiKey?: string; device?: boolean; project?: boolean; browser?: string; endpoint?: string; token?: string }) => {\n  try {\n    await loginCommand(options);\n  } catch (error) {\n    console.error(`Error: ${formatApiErrorMessage({ error })}`);\n    process.exit(1);\n  }\n});\n\n// `langwatch config <get|set|list>` — explicit persistence + introspection\n// for user-global CLI config. Mirrors `gh config` / `doctl auth init` /\n// `stripe config` patterns so users don't hand-edit ~/.langwatch/config.json.\nconst configCmd = program\n  .command(\"config\")\n  .description(\"Read or write user-global CLI configuration (endpoint, gateway-url)\");\n\nconfigCmd\n  .command(\"set <key> <value>\")\n  .description(\"Persist a config value to ~/.langwatch/config.json (e.g. `langwatch config set endpoint https://lw.acme.internal`)\")\n  .action(async (key: string, value: string) => {\n    const { configSetCommand } = await import(\"./commands/config.js\");\n    await configSetCommand(key, value);\n  });\n\nconfigCmd\n  .command(\"get <key>\")\n  .description(\"Print the resolved value for a config key (uses the same flag > env > config > default priority as the CLI)\")\n  .action(async (key: string) => {\n    const { configGetCommand } = await import(\"./commands/config.js\");\n    await configGetCommand(key);\n  });\n\nconfigCmd\n  .command(\"list\")\n  .description(\"List the current resolved values + their sources (no secrets shown)\")\n  .action(async () => {\n    const { configListCommand } = await import(\"./commands/config.js\");\n    await configListCommand();\n  });\n\nprogram\n  .command(\"open [path]\")\n  .description(\n    \"Open the LangWatch app in your browser. No path: /me in personal mode, project home if LANGWATCH_API_KEY is set. With a path: BASE/<path>.\",\n  )\n  .option(\"--browser <name>\", \"browser to open (chrome|chromium|firefox|safari|none|<path>)\")\n  .action(async (path: string | undefined, options: { browser?: string }) => {\n    try {\n      const { openCommand } = await import(\"./commands/open.js\");\n      await openCommand({ path, browser: options.browser });\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\n// AI Gateway governance — read identity, deep-link, request budget increase.\nprogram\n  .command(\"whoami\")\n  .description(\"Print the identity persisted by `langwatch login --device` (governance plane).\")\n  .action(async () => {\n    try {\n      const { whoamiCommand } = await import(\"./commands/whoami.js\");\n      await whoamiCommand();\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\nprogram\n  .command(\"request-increase\")\n  .description(\"Open the budget-increase request page (uses the gateway-issued signed URL when available).\")\n  .option(\"--browser <name>\", \"browser to open (chrome|chromium|firefox|safari|none|<path>)\")\n  .action(async (options: { browser?: string }) => {\n    try {\n      const { requestIncreaseCommand } = await import(\"./commands/request-increase.js\");\n      await requestIncreaseCommand(options);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\n// AI Gateway governance — wrapped tool runners.\n// Each `langwatch <tool>` exec's the underlying binary with the\n// right ANTHROPIC_*/OPENAI_*/GEMINI_* env vars injected pointing\n// at the gateway, after a Screen-8 budget pre-check.\n//\n// Marked `hidden:true` so they don't pollute the top-level command list\n// in `langwatch --help`; rendered together under a \"Coding assistants:\"\n// section via addHelpText below. `langwatch <tool> --help` still works.\nprogram\n  .command(\"claude\", { hidden: true })\n  .description(\"Run `claude` (Claude Code) routed through the LangWatch gateway.\")\n  .allowUnknownOption(true)\n  .helpOption(false)\n  .action(async (_opts, cmd: { args?: string[] }) => {\n    try {\n      const { wrapClaude } = await import(\"./commands/wrap.js\");\n      await wrapClaude(cmd.args ?? []);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\nprogram\n  .command(\"codex\", { hidden: true })\n  .description(\"Run `codex` (OpenAI Codex CLI) routed through the LangWatch gateway.\")\n  .allowUnknownOption(true)\n  .helpOption(false)\n  .action(async (_opts, cmd: { args?: string[] }) => {\n    try {\n      const { wrapCodex } = await import(\"./commands/wrap.js\");\n      await wrapCodex(cmd.args ?? []);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\nprogram\n  .command(\"cursor\", { hidden: true })\n  .description(\"Run `cursor` routed through the LangWatch gateway.\")\n  .allowUnknownOption(true)\n  .helpOption(false)\n  .action(async (_opts, cmd: { args?: string[] }) => {\n    try {\n      const { wrapCursor } = await import(\"./commands/wrap.js\");\n      await wrapCursor(cmd.args ?? []);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\nprogram\n  .command(\"gemini\", { hidden: true })\n  .description(\"Run `gemini` (Gemini CLI) routed through the LangWatch gateway.\")\n  .allowUnknownOption(true)\n  .helpOption(false)\n  .action(async (_opts, cmd: { args?: string[] }) => {\n    try {\n      const { wrapGemini } = await import(\"./commands/wrap.js\");\n      await wrapGemini(cmd.args ?? []);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\nprogram\n  .command(\"opencode\")\n  .description(\"Run `opencode` routed through the LangWatch gateway (multi-provider; injects both Anthropic and OpenAI env vars).\")\n  .allowUnknownOption(true)\n  .helpOption(false)\n  .action(async (_opts, cmd: { args?: string[] }) => {\n    try {\n      const { wrapOpencode } = await import(\"./commands/wrap.js\");\n      await wrapOpencode(cmd.args ?? []);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\n// 'after' (not 'afterAll') so the section only renders on `langwatch --help`,\n// not on every `langwatch <subcommand> --help` invocation.\nprogram.addHelpText(\n  \"after\",\n  [\n    \"\",\n    \"Coding assistants:\",\n    \"  claude          Run `claude` (Claude Code) routed through the gateway\",\n    \"  codex           Run `codex` (OpenAI Codex CLI) routed through the gateway\",\n    \"  cursor          Run `cursor` routed through the gateway\",\n    \"  gemini          Run `gemini` (Gemini CLI) routed through the gateway\",\n    \"  opencode        Run `opencode` (multi-provider) routed through the gateway\",\n    \"\",\n  ].join(\"\\n\"),\n);\n\nprogram\n  .command(\"logout-device\")\n  .description(\"Server-revoke the device-flow refresh token AND clear the local ~/.langwatch/config.json. Idempotent.\")\n  .action(async () => {\n    try {\n      const { logoutDeviceCommand } = await import(\"./commands/logout-device.js\");\n      await logoutDeviceCommand();\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\nprogram\n  .command(\"init-shell\")\n  .description(\"Print an eval-able shell snippet so any shell session auto-exports the gateway env vars (alternative to `langwatch claude`).\")\n  .argument(\"[shell]\", \"zsh|bash|fish|cmd|powershell\", \"zsh\")\n  .action(async (shell: string) => {\n    try {\n      const { initShellCommand } = await import(\"./commands/init-shell.js\");\n      await initShellCommand(shell);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\n// `langwatch ingest *` — read-only debug tools for the IngestionSource\n// + Activity Monitor surfaces. Mirrors the web admin /settings/governance\n// flows for ops folks who live in terminal. Authoring stays browser-only.\nconst ingestCmd = program\n  .command(\"ingest\")\n  .description(\"Inspect IngestionSources and tail their recent OCSF-normalised events (read-only governance debug helpers).\");\n\ningestCmd\n  .command(\"list\")\n  .description(\"List the org's IngestionSources (active by default; --all includes archived).\")\n  .option(\"--all\", \"include archived sources\")\n  .option(\"--json\", \"emit machine-readable JSON\")\n  .action(async (options: { all?: boolean; json?: boolean }) => {\n    try {\n      const { ingestListCommand } = await import(\"./commands/ingest/list.js\");\n      await ingestListCommand(options);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\ningestCmd\n  .command(\"tail <sourceId>\")\n  .description(\"Stream the most recent events for an IngestionSource. --follow polls every 3s.\")\n  .option(\"--limit <n>\", \"how many events to fetch on first poll (default 50)\", (v) => parseInt(v, 10))\n  .option(\"--follow\", \"keep polling for new events; exit on Ctrl-C\")\n  .option(\"--json\", \"emit machine-readable JSON\")\n  .action(async (sourceId: string, options: { limit?: number; follow?: boolean; json?: boolean }) => {\n    try {\n      const { ingestTailCommand } = await import(\"./commands/ingest/tail.js\");\n      await ingestTailCommand(sourceId, options);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\ningestCmd\n  .command(\"health <sourceId>\")\n  .description(\"Show events received in the last 24h / 7d / 30d + last-success timestamp for one IngestionSource.\")\n  .option(\"--json\", \"emit machine-readable JSON\")\n  .action(async (sourceId: string, options: { json?: boolean }) => {\n    try {\n      const { ingestHealthCommand } = await import(\"./commands/ingest/health.js\");\n      await ingestHealthCommand(sourceId, options);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\n// `langwatch ingest install <tool>` — hidden primitive used by CI /\n// devcontainer / scripted setups. The user surface is\n// `langwatch <tool>` (the wrapper auto-resolves Path A vs Path B\n// per cfg.tool_mode + VK presence). Kept registered so existing\n// scripts continue to work and so reviewers can find the install\n// helper from the help with `--help --all` if needed.\ningestCmd\n  .command(\"install <tool>\", { hidden: true })\n  .description(\n    \"Hidden: low-level Path B install primitive. Normal users run `langwatch <tool>` which auto-installs when needed.\",\n  )\n  .option(\"--env-only\", \"skip the codex config.toml write; print exports only\")\n  .option(\"--json\", \"emit machine-readable JSON\")\n  .action(\n    async (\n      tool: string,\n      options: { envOnly?: boolean; json?: boolean },\n    ) => {\n      const { installCommand } = await import(\n        \"./commands/ingestion/install.js\"\n      );\n      await installCommand(tool, options);\n    },\n  );\n\nconst governanceCmd = program\n  .command(\"governance\")\n  .description(\n    \"Manage governance resources (ingestion templates) from the CLI. Mirrors the public REST surface at /api/governance/* — every mutating call lands an audit row with metadata.surface='cli'.\",\n  );\n\ngovernanceCmd\n  .command(\"status\")\n  .description(\"Show the org's governance setup-state OR-of-flags (mirrors api.governance.setupState).\")\n  .option(\"--json\", \"emit machine-readable JSON\")\n  .action(async (options: { json?: boolean }) => {\n    try {\n      const { governanceStatusCommand } = await import(\"./commands/governance/status.js\");\n      await governanceStatusCommand(options);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\n// ── Ingestion templates (admin/platform-curated catalog) ──────────────────\n\nconst templatesCmd = governanceCmd\n  .command(\"ingestion-templates\")\n  .description(\"CRUD on IngestionTemplate rows. Reads use aiTools:view; mutations use aiTools:manage.\");\n\ntemplatesCmd\n  .command(\"admin-list\")\n  .description(\"Admin readonly catalog — includes ottl_rules. Requires aiTools:manage.\")\n  .option(\"--json\", \"emit machine-readable JSON\")\n  .action(async (options: { json?: boolean }) => {\n    const { adminListCommand } = await import(\n      \"./commands/governance/ingestion-templates.js\"\n    );\n    await adminListCommand(options);\n  });\n\ntemplatesCmd\n  .command(\"get <id>\")\n  .description(\"Fetch a single ingestion template by id.\")\n  .option(\"--json\", \"emit machine-readable JSON\")\n  .action(async (id: string, options: { json?: boolean }) => {\n    const { getCommand } = await import(\n      \"./commands/governance/ingestion-templates.js\"\n    );\n    await getCommand(id, options);\n  });\n\ntemplatesCmd\n  .command(\"create\")\n  .description(\"Author a new org-authored ingestion template.\")\n  .requiredOption(\"--source-type <slug>\", \"lowercase letters/digits/underscores, max 40 chars\")\n  .requiredOption(\"--display-name <name>\", \"human-readable label\")\n  .option(\"--description <text>\", \"optional description\")\n  .option(\"--icon-asset <asset>\", \"preset:<kind> | data:image/svg+xml;base64,...\")\n  .option(\n    \"--credential-schema <kind>\",\n    \"otlp_token | static_api_key | agent_id (defaults to otlp_token)\",\n  )\n  .option(\"--ottl-rules <text>\", \"OTTL rules (newline-separated statements)\")\n  .option(\"--json\", \"emit machine-readable JSON\")\n  .action(\n    async (options: {\n      sourceType: string;\n      displayName: string;\n      description?: string;\n      iconAsset?: string;\n      credentialSchema?: string;\n      ottlRules?: string;\n      json?: boolean;\n    }) => {\n      const { createCommand } = await import(\n        \"./commands/governance/ingestion-templates.js\"\n      );\n      await createCommand(options);\n    },\n  );\n\ntemplatesCmd\n  .command(\"update-ottl-rules <id>\")\n  .description(\"Replace ottl_rules on an org-authored template. Platform rows reject.\")\n  .requiredOption(\"--ottl-rules <text>\", \"OTTL rules (newline-separated statements)\")\n  .option(\"--json\", \"emit machine-readable JSON\")\n  .action(\n    async (id: string, options: { ottlRules: string; json?: boolean }) => {\n      const { updateOttlRulesCommand } = await import(\n        \"./commands/governance/ingestion-templates.js\"\n      );\n      await updateOttlRulesCommand(id, options);\n    },\n  );\n\ntemplatesCmd\n  .command(\"archive <id>\")\n  .description(\"Soft-archive an org-authored template. Platform rows reject.\")\n  .option(\"--json\", \"emit machine-readable JSON\")\n  .action(async (id: string, options: { json?: boolean }) => {\n    const { archiveCommand } = await import(\n      \"./commands/governance/ingestion-templates.js\"\n    );\n    await archiveCommand(id, options);\n  });\n\ntemplatesCmd\n  .command(\"clone-from-platform <sourceTemplateId>\")\n  .description(\"Clone a platform-published template into the caller's org for OTTL customisation.\")\n  .option(\"--json\", \"emit machine-readable JSON\")\n  .action(\n    async (sourceTemplateId: string, options: { json?: boolean }) => {\n      const { cloneFromPlatformCommand } = await import(\n        \"./commands/governance/ingestion-templates.js\"\n      );\n      await cloneFromPlatformCommand(sourceTemplateId, options);\n    },\n  );\n\n// Add prompt command group\nconst promptCmd = program\n  .command(\"prompt\")\n  .description(\"Manage prompt dependencies\");\n\npromptCmd\n  .command(\"init\")\n  .description(\"Initialize a new prompts project\")\n  .action(async () => {\n    try {\n      await initCommand();\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\npromptCmd\n  .command(\"create <name>\")\n  .description(\"Create a new prompt YAML file with default content\")\n  .action(async (name: string) => {\n    try {\n      await createCommand(name, {});\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\npromptCmd\n  .command(\"add <spec> [localFile]\")\n  .description(\"Add a prompt dependency (e.g., 'agent/foo', 'agent/bar@5') or local file\")\n  .action(async (spec: string, localFile?: string) => {\n    try {\n      if (localFile) {\n        await addCommand(spec, { localFile });\n      } else {\n        const { name, version } = parsePromptSpec(spec);\n        await addCommand(name, { version });\n      }\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\npromptCmd\n  .command(\"remove <name>\")\n  .description(\"Remove a prompt dependency\")\n  .action(async (name: string) => {\n    try {\n      await removeCommand(name);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\npromptCmd\n  .command(\"list\")\n  .description(\"List all available prompts on the server\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { format?: string }) => {\n    try {\n      await listCommand(options);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\npromptCmd\n  .command(\"sync\")\n  .description(\"Sync prompts - fetch remote and push local\")\n  .action(async () => {\n    try {\n      await syncCommand();\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\npromptCmd\n  .command(\"pull\")\n  .description(\"Pull remote prompts and materialize locally\")\n  .option(\"--tag <name>\", \"Pull the version pointed to by this tag instead of the configured version\")\n  .action(async (options: { tag?: string }) => {\n    try {\n      await pullCommand(options);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\npromptCmd\n  .command(\"push\")\n  .description(\"Push local prompts to the server\")\n  .option(\"--force-local\", \"Auto-resolve conflicts by keeping local version\")\n  .option(\"--force-remote\", \"Auto-resolve conflicts by keeping remote version\")\n  .action(async (options: { forceLocal?: boolean; forceRemote?: boolean }) => {\n    try {\n      await pushCommand({ forceLocal: options.forceLocal, forceRemote: options.forceRemote });\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\npromptCmd\n  .command(\"versions <handle>\")\n  .description(\"List all versions of a prompt\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (handle: string, options: { format?: string }) => {\n    const { promptVersionsCommand: impl } = await import(\"./commands/prompt/versions.js\");\n    await impl(handle, options);\n  });\n\npromptCmd\n  .command(\"restore <handle> <versionId>\")\n  .description(\"Restore a prompt to a previous version (creates a new version with that config)\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (handle: string, versionId: string, options: { format?: string }) => {\n    const { promptRestoreCommand: impl } = await import(\"./commands/prompt/restore.js\");\n    await impl(handle, versionId, options);\n  });\n\n// Add prompt tag subcommand group\nconst tagCmd = promptCmd\n  .command(\"tag\")\n  .description(\"Manage prompt tags\");\n\ntagCmd\n  .command(\"list\")\n  .description(\"List all tag definitions for the organization\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { format?: string }) => {\n    try {\n      await tagListCommand(options);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\ntagCmd\n  .command(\"create <name>\")\n  .description(\"Create a custom tag\")\n  .action(async (name: string) => {\n    try {\n      await tagCreateCommand(name);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\ntagCmd\n  .command(\"rename <oldName> <newName>\")\n  .description(\"Rename a tag\")\n  .action(async (oldName: string, newName: string) => {\n    try {\n      await tagRenameCommand(oldName, newName);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\ntagCmd\n  .command(\"assign <prompt> <tag>\")\n  .description(\"Assign a tag to a prompt version\")\n  .option(\"--version <number>\", \"Version number to assign (defaults to latest)\")\n  .action(async (prompt: string, tag: string, options: { version?: string }) => {\n    try {\n      await tagAssignCommand(prompt, tag, options);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\ntagCmd\n  .command(\"delete <name>\")\n  .description(\"Delete a tag and remove all its assignments\")\n  .option(\"--force\", \"Skip confirmation prompt\")\n  .action(async (name: string, options: { force?: boolean }) => {\n    try {\n      await tagDeleteCommand(name, options);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\n// Status command - project overview\nprogram\n  .command(\"status\")\n  .description(\"Show project resource counts and available commands\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { format?: string }) => {\n    const { statusCommand: impl } = await import(\"./commands/status.js\");\n    await impl(options);\n  });\n\n// Docs commands - fetch markdown documentation for LangWatch and Scenario\nprogram\n  .command(\"docs [url]\")\n  .description(\n    \"Fetch LangWatch documentation as markdown. Pass no argument for the index (llms.txt), a path like 'integration/python/guide', or a full URL. Missing extensions default to .md.\",\n  )\n  .action(async (url?: string) => {\n    try {\n      const { docsCommand: impl } = await import(\"./commands/docs.js\");\n      await impl(url);\n    } catch (error) {\n      console.error(`Error: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n      process.exit(1);\n    }\n  });\n\nprogram\n  .command(\"scenario-docs [url]\")\n  .description(\n    \"Fetch LangWatch Scenario documentation as markdown. Pass no argument for the index, a path like 'advanced/red-teaming', or a full URL. Missing extensions default to .md.\",\n  )\n  .action(async (url?: string) => {\n    try {\n      const { scenarioDocsCommand: impl } = await import(\"./commands/docs.js\");\n      await impl(url);\n    } catch (error) {\n      console.error(`Error: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n      process.exit(1);\n    }\n  });\n\n// Add evaluator command group\nconst evaluatorCmd = program\n  .command(\"evaluator\")\n  .description(\"Manage evaluator definitions\");\n\nevaluatorCmd\n  .command(\"list\")\n  .description(\"List all evaluators in the project\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { format?: string }) => {\n    try {\n      await listEvaluatorsCommand(options);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\nevaluatorCmd\n  .command(\"get <idOrSlug>\")\n  .description(\"Get evaluator details by ID or slug\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (idOrSlug: string, options: { format?: string }) => {\n    try {\n      await getEvaluatorCommand(idOrSlug, options);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\nevaluatorCmd\n  .command(\"create <name>\")\n  .description(\"Create a new evaluator\")\n  .requiredOption(\"--type <evaluatorType>\", \"Evaluator type (e.g. langevals/llm_judge)\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (name: string, options: { type: string; format?: string }) => {\n    try {\n      await createEvaluatorCommand(name, options);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\nevaluatorCmd\n  .command(\"update <idOrSlug>\")\n  .description(\"Update an evaluator name or settings\")\n  .option(\"--name <name>\", \"New evaluator name\")\n  .option(\"--settings <json>\", \"Evaluator config settings as JSON\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (idOrSlug: string, options: { name?: string; settings?: string; format?: string }) => {\n    try {\n      await updateEvaluatorCommand(idOrSlug, options);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\nevaluatorCmd\n  .command(\"delete <idOrSlug>\")\n  .description(\"Archive (soft-delete) an evaluator\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (idOrSlug: string, options: { format?: string }) => {\n    try {\n      await deleteEvaluatorCommand(idOrSlug, options);\n    } catch (error) {\n      console.error(`Error: ${formatApiErrorMessage({ error })}`);\n      process.exit(1);\n    }\n  });\n\n// Add experiment command group — run, monitor, list, and inspect experiments\nconst experimentCmd = program\n  .command(\"experiment\")\n  .description(\"Run, monitor, list, and inspect experiments\");\n\nexperimentCmd\n  .command(\"list\")\n  .description(\"List experiments in the project\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .option(\"--limit <n>\", \"Maximum experiments to fetch (default 50, max 200)\", \"50\")\n  .action(async (options: { format?: string; limit?: string }) => {\n    await experimentListCommand(options);\n  });\n\nexperimentCmd\n  .command(\"run <slug>\")\n  .description(\"Start an experiment run by slug\")\n  .option(\"--wait\", \"Wait for the experiment to complete before returning\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (slug: string, options: { wait?: boolean; format?: string }) => {\n    const { runExperimentCommand: impl } = await import(\"./commands/experiment/run.js\");\n    await impl(slug, options);\n  });\n\nexperimentCmd\n  .command(\"status <experiment>\")\n  .description(\"Check the status of an experiment run (defaults to the latest run)\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .option(\"--run-id <id>\", \"Specific run id to check (defaults to the latest run)\")\n  .action(async (experiment: string, options: { format?: string; runId?: string }) => {\n    const { experimentStatusCommand: impl } = await import(\"./commands/experiment/status.js\");\n    await impl(experiment, options);\n  });\n\nexperimentCmd\n  .command(\"list-runs <experiment>\")\n  .description(\"List experiment runs for an experiment by slug\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .option(\"--limit <n>\", \"Maximum runs to fetch (default 50, max 200)\", \"50\")\n  .action(\n    async (\n      experiment: string,\n      options: {\n        format?: string;\n        limit?: string;\n      },\n    ) => {\n      await experimentListRunsCommand({ experiment, ...options });\n    },\n  );\n\nexperimentCmd\n  .command(\"results <experiment>\")\n  .description(\n    \"Fetch per-row results for an experiment run, defaulting to the latest run (debug evaluator scores and missed rows)\",\n  )\n  .option(\"--run-id <id>\", \"Specific run id to fetch (defaults to the latest run)\")\n  .option(\"--filter <filter>\", \"Filter rows: failed | all (default)\", \"all\")\n  .option(\"--evaluator <name>\", \"Show only this evaluator's column\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .option(\"--limit <n>\", \"Maximum rows to print in table mode (default 20)\", \"20\")\n  .action(\n    async (\n      experiment: string,\n      options: {\n        runId?: string;\n        filter?: string;\n        evaluator?: string;\n        format?: string;\n        limit?: string;\n      },\n    ) => {\n      await experimentResultsCommand({ experimentSlug: experiment, options });\n    },\n  );\n\n\n// Add workflow command group\nconst workflowCmd = program\n  .command(\"workflow\")\n  .description(\"Manage workflows\");\n\nworkflowCmd\n  .command(\"list\")\n  .description(\"List all workflows in the project\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { format?: string }) => {\n    const { listWorkflowsCommand: impl } = await import(\"./commands/workflows/list.js\");\n    await impl(options);\n  });\n\nworkflowCmd\n  .command(\"get <id>\")\n  .description(\"Get workflow details by ID\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { getWorkflowCommand: impl } = await import(\"./commands/workflows/get.js\");\n    await impl(id, options);\n  });\n\nworkflowCmd\n  .command(\"update <id>\")\n  .description(\"Update a workflow's metadata (name, icon, description)\")\n  .option(\"--name <name>\", \"New workflow name\")\n  .option(\"--icon <icon>\", \"New workflow icon\")\n  .option(\"--description <desc>\", \"New workflow description\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { name?: string; icon?: string; description?: string; format?: string }) => {\n    const { updateWorkflowCommand: impl } = await import(\"./commands/workflows/update.js\");\n    await impl(id, options);\n  });\n\nworkflowCmd\n  .command(\"run <id>\")\n  .description(\"Execute a workflow with JSON input\")\n  .option(\"--input <json>\", \"Input data as JSON string\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { input?: string; format?: string }) => {\n    const { runWorkflowCommand: impl } = await import(\"./commands/workflows/run.js\");\n    await impl(id, options);\n  });\n\nworkflowCmd\n  .command(\"delete <id>\")\n  .description(\"Archive (soft-delete) a workflow\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { deleteWorkflowCommand: impl } = await import(\"./commands/workflows/delete.js\");\n    await impl(id, options);\n  });\n\n// Add agent command group\nconst agentCmd = program\n  .command(\"agent\")\n  .description(\"Manage agent definitions\");\n\nagentCmd\n  .command(\"list\")\n  .description(\"List all agents in the project\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { format?: string }) => {\n    const { listAgentsCommand: impl } = await import(\"./commands/agents/list.js\");\n    await impl(options);\n  });\n\nagentCmd\n  .command(\"get <id>\")\n  .description(\"Get agent details by ID\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { getAgentCommand: impl } = await import(\"./commands/agents/get.js\");\n    await impl(id, options);\n  });\n\nagentCmd\n  .command(\"create <name>\")\n  .description(\"Create a new agent\")\n  .requiredOption(\"--type <type>\", \"Agent type: signature, code, workflow, or http\")\n  .option(\"--config <json>\", \"Agent config as JSON\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (name: string, options: { type: string; config?: string; format?: string }) => {\n    const { createAgentCommand: impl } = await import(\"./commands/agents/create.js\");\n    await impl(name, options);\n  });\n\nagentCmd\n  .command(\"run <id>\")\n  .description(\"Execute an agent with JSON input (HTTP agents call URL directly, others use workflow engine)\")\n  .option(\"--input <json>\", \"Input data as JSON string\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { input?: string; format?: string }) => {\n    const { runAgentCommand: impl } = await import(\"./commands/agents/run.js\");\n    await impl(id, options);\n  });\n\nagentCmd\n  .command(\"update <id>\")\n  .description(\"Update an agent name, type, or configuration\")\n  .option(\"--name <name>\", \"New agent name\")\n  .option(\"--type <type>\", \"New agent type: signature, code, workflow, or http\")\n  .option(\"--config <json>\", \"Updated configuration as JSON\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { name?: string; type?: string; config?: string; format?: string }) => {\n    const { updateAgentCommand: impl } = await import(\"./commands/agents/update.js\");\n    await impl(id, options);\n  });\n\nagentCmd\n  .command(\"delete <id>\")\n  .description(\"Archive (soft-delete) an agent\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { deleteAgentCommand: impl } = await import(\"./commands/agents/delete.js\");\n    await impl(id, options);\n  });\n\n// Add dashboard command group\nconst dashboardCmd = program\n  .command(\"dashboard\")\n  .description(\"Manage analytics dashboards\");\n\ndashboardCmd\n  .command(\"list\")\n  .description(\"List all dashboards in the project\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { format?: string }) => {\n    const { listDashboardsCommand: impl } = await import(\"./commands/dashboards/list.js\");\n    await impl(options);\n  });\n\ndashboardCmd\n  .command(\"get <id>\")\n  .description(\"Get dashboard details by ID\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { getDashboardCommand: impl } = await import(\"./commands/dashboards/get.js\");\n    await impl(id, options);\n  });\n\ndashboardCmd\n  .command(\"update <id>\")\n  .description(\"Rename a dashboard\")\n  .requiredOption(\"--name <name>\", \"New dashboard name\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { name?: string; format?: string }) => {\n    const { updateDashboardCommand: impl } = await import(\"./commands/dashboards/update.js\");\n    await impl(id, options);\n  });\n\ndashboardCmd\n  .command(\"create <name>\")\n  .description(\"Create a new dashboard\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (name: string, options: { format?: string }) => {\n    const { createDashboardCommand: impl } = await import(\"./commands/dashboards/create.js\");\n    await impl(name, options);\n  });\n\ndashboardCmd\n  .command(\"delete <id>\")\n  .description(\"Delete a dashboard and its graphs\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { deleteDashboardCommand: impl } = await import(\"./commands/dashboards/delete.js\");\n    await impl(id, options);\n  });\n\n// Add model-provider command group\nconst modelProviderCmd = program\n  .command(\"model-provider\")\n  .description(\"Manage LLM model provider configurations\");\n\nmodelProviderCmd\n  .command(\"list\")\n  .description(\"List all configured model providers\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { format?: string }) => {\n    const { listModelProvidersCommand: impl } = await import(\"./commands/model-providers/list.js\");\n    await impl(options);\n  });\n\nmodelProviderCmd\n  .command(\"set <provider>\")\n  .description(\"Configure a model provider (e.g. openai, anthropic)\")\n  .option(\"--enabled <boolean>\", \"Enable or disable the provider\", (v) => v === \"true\")\n  .option(\"--api-key <key>\", \"API key for the provider\")\n  .option(\"--default-model <model>\", \"Default model to use (e.g. gpt-4o)\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (provider: string, options: { enabled?: boolean; apiKey?: string; defaultModel?: string; format?: string }) => {\n    const { setModelProviderCommand: impl } = await import(\"./commands/model-providers/set.js\");\n    await impl(provider, options);\n  });\n\n// Add model-default command group (cascading default models)\nconst modelDefaultCmd = program\n  .command(\"model-default\")\n  .description(\n    \"Manage cascading default models (per role/feature, per scope: project/team/organization)\",\n  );\n\nmodelDefaultCmd\n  .command(\"list\")\n  .description(\"Show the effective resolution + every config you can read\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { format?: string }) => {\n    const { listModelDefaultsCommand: impl } = await import(\n      \"./commands/model-defaults/list.js\"\n    );\n    await impl(options);\n  });\n\nmodelDefaultCmd\n  .command(\"set <key> <model>\")\n  .description(\n    \"Set a default model for a role (DEFAULT|FAST|EMBEDDINGS) or registered feature key. Defaults to project scope; pass --scope team|organization for higher tiers.\",\n  )\n  .option(\"--scope <scope>\", \"Scope tier: project (default), team, or organization\", \"project\")\n  .option(\n    \"--scope-id <id>\",\n    \"Explicit scope id. Defaults to the API key's project / its team / its organization.\",\n  )\n  .option(\"-f, --format <format>\", \"Output format: text (default) or json\", \"text\")\n  .action(\n    async (\n      key: string,\n      model: string,\n      options: { scope?: \"project\" | \"team\" | \"organization\"; scopeId?: string; format?: string },\n    ) => {\n      const { setModelDefaultCommand: impl } = await import(\n        \"./commands/model-defaults/set.js\"\n      );\n      await impl(key, model, options);\n    },\n  );\n\nmodelDefaultCmd\n  .command(\"unset <key>\")\n  .description(\"Remove a default model for a role or feature key at the chosen scope\")\n  .option(\"--scope <scope>\", \"Scope tier: project (default), team, or organization\", \"project\")\n  .option(\n    \"--scope-id <id>\",\n    \"Explicit scope id. Defaults to the API key's project / its team / its organization.\",\n  )\n  .option(\"-f, --format <format>\", \"Output format: text (default) or json\", \"text\")\n  .action(\n    async (\n      key: string,\n      options: { scope?: \"project\" | \"team\" | \"organization\"; scopeId?: string; format?: string },\n    ) => {\n      const { unsetModelDefaultCommand: impl } = await import(\n        \"./commands/model-defaults/unset.js\"\n      );\n      await impl(key, options);\n    },\n  );\n\n// Add virtual-keys command group (AI Gateway)\nconst virtualKeysCmd = program\n  .command(\"virtual-keys\")\n  .alias(\"vk\")\n  .description(\"Manage AI Gateway virtual keys (list, create, rotate, revoke)\");\n\nvirtualKeysCmd\n  .command(\"list\")\n  .description(\"List all virtual keys for the current project\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { format?: string }) => {\n    const { listVirtualKeysCommand: impl } = await import(\"./commands/virtual-keys/list.js\");\n    await impl(options);\n  });\n\nvirtualKeysCmd\n  .command(\"get <id>\")\n  .description(\"Show details for a single virtual key\")\n  .option(\"-f, --format <format>\", \"Output format: text (default) or json\", \"text\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { getVirtualKeyCommand: impl } = await import(\"./commands/virtual-keys/get.js\");\n    await impl(id, options);\n  });\n\nvirtualKeysCmd\n  .command(\"create\")\n  .description(\"Create a new virtual key (secret is shown once)\")\n  .requiredOption(\"--name <name>\", \"Human-readable name for the key\")\n  .option(\"--description <desc>\", \"Optional description\")\n  .option(\"--env <env>\", \"Environment: live or test\", \"live\")\n  .option(\"--scope <typeAndId...>\", \"Scope row in TYPE:id form (repeatable). Types: ORG | TEAM | PROJECT. Example: --scope ORG:acme --scope TEAM:platform\")\n  .option(\"--routing-policy <id>\", \"RoutingPolicy id to pin (otherwise uses the org's default policy)\")\n  .option(\"--principal-user <userId>\", \"Mark this VK as personal and attribute spend to the named principal user\")\n  .option(\"-f, --format <format>\", \"Output format: text (default) or json\", \"text\")\n  .action(async (options: { name: string; description?: string; env?: \"live\" | \"test\"; scope?: string[]; routingPolicy?: string; principalUser?: string; format?: string }) => {\n    const { createVirtualKeyCommand: impl } = await import(\"./commands/virtual-keys/create.js\");\n    await impl(options);\n  });\n\nvirtualKeysCmd\n  .command(\"update <id>\")\n  .description(\"Update a virtual key's name/description/scopes/routing-policy/config\")\n  .option(\"--name <name>\", \"New display name\")\n  .option(\"--description <desc>\", \"New description\")\n  .option(\"--clear-description\", \"Clear the description\")\n  .option(\"--scope <typeAndId...>\", \"Replace the scope set (repeatable; supplies the full set). Same TYPE:id form as create.\")\n  .option(\"--routing-policy <id>\", \"Switch to a different RoutingPolicy (pass id)\")\n  .option(\"--clear-routing-policy\", \"Unpin the routing policy; VK falls back to the org default ordering\")\n  .option(\"--config-json <json>\", \"Inline partial config JSON (model_aliases/cache/fallback/rate_limits/policy_rules). Merges with existing config\")\n  .option(\"--config-file <path>\", \"Read partial config JSON from a file\")\n  .option(\"-f, --format <format>\", \"Output format: text (default) or json\", \"text\")\n  .action(async (id: string, options: {\n    name?: string;\n    description?: string;\n    clearDescription?: boolean;\n    scope?: string[];\n    routingPolicy?: string;\n    clearRoutingPolicy?: boolean;\n    configJson?: string;\n    configFile?: string;\n    format?: string;\n  }) => {\n    const { updateVirtualKeyCommand: impl } = await import(\"./commands/virtual-keys/update.js\");\n    await impl(id, options);\n  });\n\nvirtualKeysCmd\n  .command(\"rotate <id>\")\n  .description(\"Rotate a virtual key's secret (old secret stops working immediately)\")\n  .option(\"-f, --format <format>\", \"Output format: text (default) or json\", \"text\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { rotateVirtualKeyCommand: impl } = await import(\"./commands/virtual-keys/rotate.js\");\n    await impl(id, options);\n  });\n\nvirtualKeysCmd\n  .command(\"revoke <id>\")\n  .description(\"Revoke a virtual key (cannot be reactivated)\")\n  .option(\"-f, --format <format>\", \"Output format: text (default) or json\", \"text\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { revokeVirtualKeyCommand: impl } = await import(\"./commands/virtual-keys/revoke.js\");\n    await impl(id, options);\n  });\n\n// Add gateway-budgets command group (AI Gateway)\nconst gatewayBudgetsCmd = program\n  .command(\"gateway-budgets\")\n  .description(\"Manage AI Gateway spend budgets (hierarchical scopes)\");\n\ngatewayBudgetsCmd\n  .command(\"list\")\n  .description(\"List all budgets across scopes\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { format?: string }) => {\n    const { listGatewayBudgetsCommand: impl } = await import(\"./commands/gateway-budgets/list.js\");\n    await impl(options);\n  });\n\ngatewayBudgetsCmd\n  .command(\"create\")\n  .description(\"Create a new budget (scope + window + limit)\")\n  .requiredOption(\"--name <name>\", \"Human-readable budget name\")\n  .option(\"--description <desc>\", \"Optional description\")\n  .requiredOption(\"--scope <kind>\", \"Budget scope: organization|team|project|virtual-key|principal\")\n  .option(\"--organization <id>\", \"Organization id (for scope=organization)\")\n  .option(\"--team <id>\", \"Team id (for scope=team)\")\n  .option(\"--project <id>\", \"Project id (for scope=project)\")\n  .option(\"--virtual-key <id>\", \"Virtual key id (for scope=virtual-key)\")\n  .option(\"--principal <id>\", \"Principal user id (for scope=principal)\")\n  .requiredOption(\"--window <w>\", \"Budget window: minute|hour|day|week|month|total\")\n  .requiredOption(\"--limit <usd>\", \"Hard cap in USD (e.g. 100 or 49.99)\")\n  .option(\"--on-breach <action>\", \"block (default) or warn\", \"block\")\n  .option(\"--timezone <tz>\", \"IANA timezone for window boundaries (e.g. Europe/Amsterdam)\")\n  .option(\"-f, --format <format>\", \"Output format: text (default) or json\", \"text\")\n  .action(async (options: {\n    name: string;\n    description?: string;\n    scope: \"organization\" | \"team\" | \"project\" | \"virtual-key\" | \"principal\";\n    organization?: string;\n    team?: string;\n    project?: string;\n    virtualKey?: string;\n    principal?: string;\n    window: string;\n    limit: string;\n    onBreach?: \"block\" | \"warn\";\n    timezone?: string;\n    format?: string;\n  }) => {\n    const { createGatewayBudgetCommand: impl } = await import(\"./commands/gateway-budgets/create.js\");\n    await impl(options);\n  });\n\ngatewayBudgetsCmd\n  .command(\"update <id>\")\n  .description(\"Update a budget's name/description/limit/on-breach/timezone\")\n  .option(\"--name <name>\", \"New display name\")\n  .option(\"--description <desc>\", \"New description\")\n  .option(\"--clear-description\", \"Clear the description\")\n  .option(\"--limit <usd>\", \"New hard-cap in USD\")\n  .option(\"--on-breach <action>\", \"block or warn\")\n  .option(\"--timezone <tz>\", \"New IANA timezone\")\n  .option(\"--clear-timezone\", \"Clear the timezone override\")\n  .option(\"-f, --format <format>\", \"Output format: text (default) or json\", \"text\")\n  .action(async (id: string, options: {\n    name?: string;\n    description?: string;\n    clearDescription?: boolean;\n    limit?: string;\n    onBreach?: \"block\" | \"warn\";\n    timezone?: string;\n    clearTimezone?: boolean;\n    format?: string;\n  }) => {\n    const { updateGatewayBudgetCommand: impl } = await import(\"./commands/gateway-budgets/update.js\");\n    await impl(id, options);\n  });\n\ngatewayBudgetsCmd\n  .command(\"archive <id>\")\n  .description(\"Archive a budget (stops enforcement; does not delete history)\")\n  .option(\"-f, --format <format>\", \"Output format: text (default) or json\", \"text\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { archiveGatewayBudgetCommand: impl } = await import(\"./commands/gateway-budgets/archive.js\");\n    await impl(id, options);\n  });\n\n// Add annotation command group\nconst annotationCmd = program\n  .command(\"annotation\")\n  .description(\"Manage trace annotations\");\n\nannotationCmd\n  .command(\"list\")\n  .description(\"List all annotations (optionally filtered by trace)\")\n  .option(\"--trace-id <traceId>\", \"Filter by trace ID\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { traceId?: string; format?: string }) => {\n    const { listAnnotationsCommand: impl } = await import(\"./commands/annotations/list.js\");\n    await impl(options);\n  });\n\nannotationCmd\n  .command(\"get <id>\")\n  .description(\"Get annotation details by ID\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { getAnnotationCommand: impl } = await import(\"./commands/annotations/get.js\");\n    await impl(id, options);\n  });\n\nannotationCmd\n  .command(\"create <traceId>\")\n  .description(\"Create an annotation for a trace\")\n  .option(\"--comment <comment>\", \"Annotation comment\")\n  .option(\"--thumbs-up\", \"Mark as thumbs up\")\n  .option(\"--thumbs-down\", \"Mark as thumbs down\")\n  .option(\"--email <email>\", \"Email of the annotator\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (traceId: string, options: { comment?: string; thumbsUp?: boolean; thumbsDown?: boolean; email?: string; format?: string }) => {\n    const { createAnnotationCommand: impl } = await import(\"./commands/annotations/create.js\");\n    await impl(traceId, options);\n  });\n\nannotationCmd\n  .command(\"delete <id>\")\n  .description(\"Delete an annotation\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { deleteAnnotationCommand: impl } = await import(\"./commands/annotations/delete.js\");\n    await impl(id, options);\n  });\n\n// Add analytics command group\nconst analyticsCmd = program\n  .command(\"analytics\")\n  .description(\"Query analytics and metrics\");\n\nanalyticsCmd\n  .command(\"query\")\n  .description(\"Query timeseries analytics (costs, latency, token usage, etc.)\")\n  .option(\"-m, --metric <metric>\", \"Metric to query (preset name or raw metric path, default: trace-count)\")\n  .option(\"-a, --aggregation <aggregation>\", \"Aggregation type: cardinality, avg, sum, min, max, p95, p99\")\n  .option(\"--start-date <date>\", \"Start date (ISO string, default: 7 days ago)\")\n  .option(\"--end-date <date>\", \"End date (ISO string, default: now)\")\n  .option(\"--group-by <field>\", \"Group by field (e.g. metadata.model)\")\n  .option(\"--time-scale <scale>\", \"Time scale: 'full' for aggregate, or interval in seconds\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { metric?: string; aggregation?: string; startDate?: string; endDate?: string; groupBy?: string; timeScale?: string; format?: string }) => {\n    const { queryAnalyticsCommand: impl } = await import(\"./commands/analytics/query.js\");\n    await impl(options);\n  });\n\n// Add trace command group\nconst traceCmd = program\n  .command(\"trace\")\n  .description(\"Search and inspect traces\");\n\ntraceCmd\n  .command(\"search\")\n  .description(\"Search traces with optional text query and date range\")\n  .option(\"-q, --query <query>\", \"Text search query\")\n  .option(\"--start-date <date>\", \"Start date (ISO string or epoch ms, default: 24h ago)\")\n  .option(\"--end-date <date>\", \"End date (ISO string or epoch ms, default: now)\")\n  .option(\"--limit <n>\", \"Max results to return (default: 25)\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { query?: string; startDate?: string; endDate?: string; limit?: string; format?: string }) => {\n    const { searchTracesCommand: impl } = await import(\"./commands/traces/search.js\");\n    await impl(options);\n  });\n\ntraceCmd\n  .command(\"export\")\n  .description(\"Export traces as CSV, JSONL, or JSON\")\n  .option(\"--start-date <date>\", \"Start date (ISO string, default: 7 days ago)\")\n  .option(\"--end-date <date>\", \"End date (ISO string, default: now)\")\n  .option(\"-q, --query <query>\", \"Text search query to filter traces\")\n  .option(\"-f, --format <format>\", \"Output format: jsonl (default), csv, or json\", \"jsonl\")\n  .option(\"-o, --output <file>\", \"Write output to file instead of stdout\")\n  .option(\"--limit <n>\", \"Max traces to export (default: 1000)\")\n  .action(async (options: { startDate?: string; endDate?: string; query?: string; format?: string; output?: string; limit?: string }) => {\n    const { exportTracesCommand: impl } = await import(\"./commands/traces/export.js\");\n    await impl(options);\n  });\n\ntraceCmd\n  .command(\"get <traceId>\")\n  .description(\"Get full trace details by ID\")\n  .option(\"-f, --format <format>\", \"Output format: digest (default, human-readable) or json\", \"digest\")\n  .action(async (traceId: string, options: { format?: string }) => {\n    const { getTraceCommand: impl } = await import(\"./commands/traces/get.js\");\n    await impl(traceId, options);\n  });\n\n// Add scenario command group\nconst scenarioCmd = program\n  .command(\"scenario\")\n  .description(\"Manage scenarios\");\n\nscenarioCmd\n  .command(\"list\")\n  .description(\"List all scenarios in the project\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { format?: string }) => {\n    const { listScenariosCommand: impl } = await import(\"./commands/scenarios/list.js\");\n    await impl(options);\n  });\n\nscenarioCmd\n  .command(\"get <id>\")\n  .description(\"Get scenario details by ID\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { getScenarioCommand: impl } = await import(\"./commands/scenarios/get.js\");\n    await impl(id, options);\n  });\n\nscenarioCmd\n  .command(\"create <name>\")\n  .description(\"Create a new scenario\")\n  .requiredOption(\"--situation <situation>\", \"The situation/context for the scenario\")\n  .option(\"--criteria <criteria>\", \"Comma-separated list of evaluation criteria\")\n  .option(\"--labels <labels>\", \"Comma-separated list of labels\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (name: string, options: { situation: string; criteria?: string; labels?: string; format?: string }) => {\n    const { createScenarioCommand: impl } = await import(\"./commands/scenarios/create.js\");\n    await impl(name, options);\n  });\n\nscenarioCmd\n  .command(\"update <id>\")\n  .description(\"Update an existing scenario\")\n  .option(\"--name <name>\", \"New scenario name\")\n  .option(\"--situation <situation>\", \"New situation/context\")\n  .option(\"--criteria <criteria>\", \"New comma-separated list of criteria (replaces existing)\")\n  .option(\"--labels <labels>\", \"New comma-separated list of labels (replaces existing)\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { name?: string; situation?: string; criteria?: string; labels?: string; format?: string }) => {\n    const { updateScenarioCommand: impl } = await import(\"./commands/scenarios/update.js\");\n    await impl(id, options);\n  });\n\nscenarioCmd\n  .command(\"run <id>\")\n  .description(\"Run a scenario against a target (agent or prompt)\")\n  .requiredOption(\"--target <target>\", \"Target to run against, as <type>:<referenceId> (e.g., http:agent_abc123)\")\n  .option(\"--wait\", \"Wait for the scenario run to complete\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { target: string; wait?: boolean; format?: string }) => {\n    const { runScenarioCommand: impl } = await import(\"./commands/scenarios/run.js\");\n    await impl(id, options);\n  });\n\nscenarioCmd\n  .command(\"delete <id>\")\n  .description(\"Archive (soft-delete) a scenario\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { deleteScenarioCommand: impl } = await import(\"./commands/scenarios/delete.js\");\n    await impl(id, options);\n  });\n\n// Add suite (run plan) command group\nconst suiteCmd = program\n  .command(\"suite\")\n  .description(\"Manage suites (run plans) — scenario × target execution plans\");\n\nsuiteCmd\n  .command(\"list\")\n  .description(\"List all suites in the project\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { format?: string }) => {\n    const { listSuitesCommand: impl } = await import(\"./commands/suites/list.js\");\n    await impl(options);\n  });\n\nsuiteCmd\n  .command(\"get <id>\")\n  .description(\"Get suite details by ID\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { getSuiteCommand: impl } = await import(\"./commands/suites/get.js\");\n    await impl(id, options);\n  });\n\nsuiteCmd\n  .command(\"create <name>\")\n  .description(\"Create a new suite (run plan)\")\n  .requiredOption(\"--scenarios <ids>\", \"Comma-separated scenario IDs\")\n  .requiredOption(\"--targets <targets...>\", \"Targets as <type>:<referenceId> (e.g., http:agent_abc)\")\n  .option(\"--repeat-count <n>\", \"Number of times to repeat each scenario-target pair\", \"1\")\n  .option(\"--labels <labels>\", \"Comma-separated labels\")\n  .option(\"--description <desc>\", \"Suite description\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (name: string, options: { scenarios?: string; targets?: string[]; repeatCount?: string; labels?: string; description?: string; format?: string }) => {\n    const { createSuiteCommand: impl } = await import(\"./commands/suites/create.js\");\n    await impl(name, options);\n  });\n\nsuiteCmd\n  .command(\"update <id>\")\n  .description(\"Update a suite (run plan)\")\n  .option(\"--name <name>\", \"New suite name\")\n  .option(\"--scenarios <ids>\", \"New comma-separated scenario IDs\")\n  .option(\"--targets <targets...>\", \"New targets as <type>:<referenceId>\")\n  .option(\"--repeat-count <n>\", \"New repeat count\")\n  .option(\"--labels <labels>\", \"New comma-separated labels\")\n  .option(\"--description <desc>\", \"New description\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { name?: string; scenarios?: string; targets?: string[]; repeatCount?: string; labels?: string; description?: string; format?: string }) => {\n    const { updateSuiteCommand: impl } = await import(\"./commands/suites/update.js\");\n    await impl(id, options);\n  });\n\nsuiteCmd\n  .command(\"duplicate <id>\")\n  .description(\"Duplicate a suite\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { duplicateSuiteCommand: impl } = await import(\"./commands/suites/duplicate.js\");\n    await impl(id, options);\n  });\n\nsuiteCmd\n  .command(\"run <id>\")\n  .description(\"Execute a suite run — schedules all scenario × target × repeat jobs\")\n  .option(\"--wait\", \"Wait for the suite run to complete before returning\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { wait?: boolean; format?: string }) => {\n    const { runSuiteCommand: impl } = await import(\"./commands/suites/run.js\");\n    await impl(id, options);\n  });\n\nsuiteCmd\n  .command(\"delete <id>\")\n  .description(\"Archive (soft-delete) a suite\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { deleteSuiteCommand: impl } = await import(\"./commands/suites/delete.js\");\n    await impl(id, options);\n  });\n\n// Add graph command group\nconst graphCmd = program\n  .command(\"graph\")\n  .description(\"Manage custom graphs on dashboards\");\n\ngraphCmd\n  .command(\"list\")\n  .description(\"List all custom graphs (optionally filter by dashboard)\")\n  .option(\"--dashboard-id <id>\", \"Filter by dashboard ID\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { dashboardId?: string; format?: string }) => {\n    const { listGraphsCommand: impl } = await import(\"./commands/graphs/list.js\");\n    await impl(options);\n  });\n\ngraphCmd\n  .command(\"get <id>\")\n  .description(\"Get a custom graph by ID\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { getGraphCommand: impl } = await import(\"./commands/graphs/get.js\");\n    await impl(id, options);\n  });\n\ngraphCmd\n  .command(\"create <name>\")\n  .description(\"Create a custom graph\")\n  .option(\"--dashboard-id <id>\", \"Dashboard to add the graph to\")\n  .option(\"--graph <json>\", \"Graph definition as JSON\")\n  .option(\"--filters <json>\", \"Filter conditions as JSON\")\n  .option(\"--col-span <n>\", \"Column span (1-2)\")\n  .option(\"--row-span <n>\", \"Row span (1-2)\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (name: string, options: { dashboardId?: string; graph?: string; filters?: string; colSpan?: string; rowSpan?: string; format?: string }) => {\n    const { createGraphCommand: impl } = await import(\"./commands/graphs/create.js\");\n    await impl(name, options);\n  });\n\ngraphCmd\n  .command(\"update <id>\")\n  .description(\"Update a custom graph\")\n  .option(\"--name <name>\", \"New graph name\")\n  .option(\"--graph <json>\", \"New graph definition as JSON\")\n  .option(\"--filters <json>\", \"New filter conditions as JSON\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { name?: string; graph?: string; filters?: string; format?: string }) => {\n    const { updateGraphCommand: impl } = await import(\"./commands/graphs/update.js\");\n    await impl(id, options);\n  });\n\ngraphCmd\n  .command(\"delete <id>\")\n  .description(\"Delete a custom graph\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { deleteGraphCommand: impl } = await import(\"./commands/graphs/delete.js\");\n    await impl(id, options);\n  });\n\n// Add trigger (automation) command group\nconst triggerCmd = program\n  .command(\"trigger\")\n  .description(\"Manage triggers (automations) — alerts, webhooks, and dataset actions\");\n\ntriggerCmd\n  .command(\"list\")\n  .description(\"List all triggers in the project\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { format?: string }) => {\n    const { listTriggersCommand: impl } = await import(\"./commands/triggers/list.js\");\n    await impl(options);\n  });\n\ntriggerCmd\n  .command(\"get <id>\")\n  .description(\"Get trigger details by ID\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { getTriggerCommand: impl } = await import(\"./commands/triggers/get.js\");\n    await impl(id, options);\n  });\n\ntriggerCmd\n  .command(\"create <name>\")\n  .description(\"Create a new trigger (automation)\")\n  .requiredOption(\"--action <action>\", \"Trigger action: SEND_EMAIL, ADD_TO_DATASET, ADD_TO_ANNOTATION_QUEUE, SEND_SLACK_MESSAGE\")\n  .option(\"--filters <json>\", \"Trigger filter conditions as JSON\")\n  .option(\"--message <text>\", \"Custom alert message\")\n  .option(\"--alert-type <type>\", \"Alert severity: CRITICAL, WARNING, INFO\")\n  .option(\"--slack-webhook <url>\", \"Slack webhook URL (for SEND_SLACK_MESSAGE action)\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (name: string, options: { action: string; filters?: string; message?: string; alertType?: string; slackWebhook?: string; format?: string }) => {\n    const { createTriggerCommand: impl } = await import(\"./commands/triggers/create.js\");\n    await impl(name, options);\n  });\n\ntriggerCmd\n  .command(\"update <id>\")\n  .description(\"Update a trigger\")\n  .option(\"--name <name>\", \"New trigger name\")\n  .option(\"--active <boolean>\", \"Enable or disable the trigger (true/false)\")\n  .option(\"--message <text>\", \"New alert message\")\n  .option(\"--alert-type <type>\", \"New alert severity\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { name?: string; active?: string; message?: string; alertType?: string; format?: string }) => {\n    const { updateTriggerCommand: impl } = await import(\"./commands/triggers/update.js\");\n    await impl(id, options);\n  });\n\ntriggerCmd\n  .command(\"delete <id>\")\n  .description(\"Delete a trigger\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { deleteTriggerCommand: impl } = await import(\"./commands/triggers/delete.js\");\n    await impl(id, options);\n  });\n\n// Add secret command group\nconst secretCmd = program\n  .command(\"secret\")\n  .description(\"Manage project secrets — encrypted environment variables for agents\");\n\nsecretCmd\n  .command(\"list\")\n  .description(\"List all secrets in the project (values are never shown)\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { format?: string }) => {\n    const { listSecretsCommand: impl } = await import(\"./commands/secrets/list.js\");\n    await impl(options);\n  });\n\nsecretCmd\n  .command(\"get <id>\")\n  .description(\"Get secret metadata by ID (value is never shown)\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { getSecretCommand: impl } = await import(\"./commands/secrets/get.js\");\n    await impl(id, options);\n  });\n\nsecretCmd\n  .command(\"create <name>\")\n  .description(\"Create a new secret (name must be UPPER_SNAKE_CASE)\")\n  .requiredOption(\"--value <value>\", \"The secret value (will be encrypted)\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (name: string, options: { value: string; format?: string }) => {\n    const { createSecretCommand: impl } = await import(\"./commands/secrets/create.js\");\n    await impl(name, options);\n  });\n\nsecretCmd\n  .command(\"update <id>\")\n  .description(\"Update a secret's value\")\n  .requiredOption(\"--value <value>\", \"The new secret value (will be encrypted)\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { value: string; format?: string }) => {\n    const { updateSecretCommand: impl } = await import(\"./commands/secrets/update.js\");\n    await impl(id, options);\n  });\n\nsecretCmd\n  .command(\"delete <id>\")\n  .description(\"Delete a secret\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { deleteSecretCommand: impl } = await import(\"./commands/secrets/delete.js\");\n    await impl(id, options);\n  });\n\n// Add monitor (online evaluation) command group\nconst monitorCmd = program\n  .command(\"monitor\")\n  .description(\"Manage online evaluation monitors — evaluators running on incoming traces\");\n\nmonitorCmd\n  .command(\"list\")\n  .description(\"List all monitors in the project\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { format?: string }) => {\n    const { listMonitorsCommand: impl } = await import(\"./commands/monitors/list.js\");\n    await impl(options);\n  });\n\nmonitorCmd\n  .command(\"get <id>\")\n  .description(\"Get monitor details by ID\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { getMonitorCommand: impl } = await import(\"./commands/monitors/get.js\");\n    await impl(id, options);\n  });\n\nmonitorCmd\n  .command(\"create <name>\")\n  .description(\"Create a new online evaluation monitor\")\n  .requiredOption(\"--check-type <type>\", \"Evaluator check type (e.g. ragas/toxicity, custom/my-eval)\")\n  .option(\"--execution-mode <mode>\", \"Execution mode: ON_MESSAGE (default), AS_GUARDRAIL, MANUALLY\", \"ON_MESSAGE\")\n  .option(\"--sample <rate>\", \"Sampling rate 0.0-1.0 (default: 1.0)\")\n  .option(\"--evaluator-id <id>\", \"Link to a saved evaluator\")\n  .option(\"--level <level>\", \"Evaluation level: trace (default) or thread\")\n  .option(\"--parameters <json>\", \"Evaluator settings as JSON\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (name: string, options: { checkType: string; executionMode?: string; sample?: string; evaluatorId?: string; level?: string; parameters?: string; format?: string }) => {\n    const { createMonitorCommand: impl } = await import(\"./commands/monitors/create.js\");\n    await impl(name, options);\n  });\n\nmonitorCmd\n  .command(\"update <id>\")\n  .description(\"Update a monitor\")\n  .option(\"--name <name>\", \"New monitor name\")\n  .option(\"--enabled <boolean>\", \"Enable or disable the monitor (true/false)\")\n  .option(\"--execution-mode <mode>\", \"Execution mode: ON_MESSAGE, AS_GUARDRAIL, MANUALLY\")\n  .option(\"--sample <rate>\", \"Sampling rate 0.0-1.0\")\n  .option(\"--parameters <json>\", \"Updated evaluator settings as JSON\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { name?: string; enabled?: string; executionMode?: string; sample?: string; parameters?: string; format?: string }) => {\n    const { updateMonitorCommand: impl } = await import(\"./commands/monitors/update.js\");\n    await impl(id, options);\n  });\n\nmonitorCmd\n  .command(\"delete <id>\")\n  .description(\"Delete a monitor\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { deleteMonitorCommand: impl } = await import(\"./commands/monitors/delete.js\");\n    await impl(id, options);\n  });\n\n// Add simulation-run command group\nconst simulationRunCmd = program\n  .command(\"simulation-run\")\n  .description(\"View simulation run results\");\n\nsimulationRunCmd\n  .command(\"list\")\n  .description(\"List simulation runs (optionally filter by scenario set or batch)\")\n  .option(\"--scenario-set-id <id>\", \"Filter by scenario set ID\")\n  .option(\"--batch-run-id <id>\", \"Filter by batch run ID (requires --scenario-set-id)\")\n  .option(\"--status <status>\", \"Filter by status (e.g. SUCCESS, FAILED, ERROR, IN_PROGRESS)\")\n  .option(\"--name <substring>\", \"Filter by run name substring (case-insensitive)\")\n  .option(\"--limit <n>\", \"Max results (default: 20)\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { scenarioSetId?: string; batchRunId?: string; status?: string; name?: string; limit?: string; format?: string }) => {\n    const { listSimulationRunsCommand: impl } = await import(\"./commands/simulation-runs/list.js\");\n    await impl(options);\n  });\n\nsimulationRunCmd\n  .command(\"get <runId>\")\n  .description(\"Get full details of a simulation run (messages, results, costs)\")\n  .option(\"--full\", \"Show full message content instead of truncating long lines\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (runId: string, options: { format?: string; full?: boolean }) => {\n    const { getSimulationRunCommand: impl } = await import(\"./commands/simulation-runs/get.js\");\n    await impl(runId, options);\n  });\n\n// Add dataset command group\nconst datasetCmd = program\n  .command(\"dataset\")\n  .description(\"Manage datasets\");\n\ndatasetCmd\n  .command(\"list\")\n  .description(\"List all datasets\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { format?: string }) => {\n    const { listCommand: listDatasetsImpl } = await import(\"./commands/dataset/list.js\");\n    await listDatasetsImpl(options);\n  });\n\ndatasetCmd\n  .command(\"create <name>\")\n  .description(\"Create a new dataset\")\n  .option(\"-c, --columns <columns>\", \"Column definitions (e.g. input:string,output:string)\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (name: string, options: { columns?: string; format?: string }) => {\n    const { createCommand: createDatasetImpl } = await import(\"./commands/dataset/create.js\");\n    await createDatasetImpl(name, options);\n  });\n\ndatasetCmd\n  .command(\"get <slugOrId>\")\n  .description(\"Get dataset details and preview records\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (slugOrId: string, options: { format?: string }) => {\n    const { getCommand: getDatasetImpl } = await import(\"./commands/dataset/get.js\");\n    await getDatasetImpl(slugOrId, options);\n  });\n\ndatasetCmd\n  .command(\"delete <slugOrId>\")\n  .description(\"Delete (archive) a dataset\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (slugOrId: string, options: { format?: string }) => {\n    const { deleteCommand: deleteDatasetImpl } = await import(\"./commands/dataset/delete.js\");\n    await deleteDatasetImpl(slugOrId, options);\n  });\n\ndatasetCmd\n  .command(\"upload <slug> <file>\")\n  .description(\"Upload a file to a dataset (creates if not found)\")\n  .option(\"--if-exists <strategy>\", \"Strategy when dataset exists: append (default), replace, error\")\n  .action(async (slug: string, file: string, options: { ifExists?: string }) => {\n    const { uploadCommand: uploadDatasetImpl } = await import(\"./commands/dataset/upload.js\");\n    await uploadDatasetImpl(slug, file, options);\n  });\n\ndatasetCmd\n  .command(\"download <slugOrId>\")\n  .description(\"Download dataset records as CSV or JSONL\")\n  .option(\"-f, --format <format>\", \"Output format: csv or jsonl\", \"csv\")\n  .action(async (slugOrId: string, options: { format?: string }) => {\n    const { downloadCommand: downloadDatasetImpl } = await import(\"./commands/dataset/download.js\");\n    await downloadDatasetImpl(slugOrId, options);\n  });\n\ndatasetCmd\n  .command(\"update <slugOrId>\")\n  .description(\"Update a dataset name or columns\")\n  .option(\"--name <name>\", \"New dataset name\")\n  .option(\"--columns <columns>\", \"New column definitions (e.g. input:string,output:string)\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (slugOrId: string, options: { name?: string; columns?: string; format?: string }) => {\n    const { updateCommand: updateDatasetImpl } = await import(\"./commands/dataset/update.js\");\n    await updateDatasetImpl(slugOrId, options);\n  });\n\n// Records subcommand group\nconst recordsCmd = datasetCmd\n  .command(\"records\")\n  .description(\"Manage dataset records\");\n\nrecordsCmd\n  .command(\"list <slugOrId>\")\n  .description(\"List records in a dataset\")\n  .option(\"--page <n>\", \"Page number (default: 1)\")\n  .option(\"--limit <n>\", \"Records per page (default: 20)\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (slugOrId: string, options: { page?: string; limit?: string; format?: string }) => {\n    const { recordsListCommand } = await import(\"./commands/dataset/records-list.js\");\n    await recordsListCommand(slugOrId, options);\n  });\n\nrecordsCmd\n  .command(\"add <slugOrId>\")\n  .description(\"Add records to a dataset\")\n  .option(\"--json <json>\", \"JSON array of records (inline)\")\n  .option(\"--file <path>\", \"Read JSON array of records from a file\")\n  .option(\"--stdin\", \"Read JSON array from stdin\")\n  .action(async (slugOrId: string, options: { json?: string; file?: string; stdin?: boolean }) => {\n    const { recordsAddCommand } = await import(\"./commands/dataset/records-add.js\");\n    await recordsAddCommand(slugOrId, options);\n  });\n\nrecordsCmd\n  .command(\"update <slugOrId> <recordId>\")\n  .description(\"Update a single record in a dataset\")\n  .requiredOption(\"--json <json>\", \"JSON object with updated fields\")\n  .action(async (slugOrId: string, recordId: string, options: { json: string }) => {\n    const { recordsUpdateCommand } = await import(\"./commands/dataset/records-update.js\");\n    await recordsUpdateCommand(slugOrId, recordId, options);\n  });\n\nrecordsCmd\n  .command(\"delete <slugOrId> <recordIds...>\")\n  .description(\"Delete records from a dataset\")\n  .action(async (slugOrId: string, recordIds: string[]) => {\n    const { recordsDeleteCommand } = await import(\"./commands/dataset/records-delete.js\");\n    await recordsDeleteCommand(slugOrId, recordIds);\n  });\nconst projectsCmd = program\n  .command(\"projects\")\n  .description(\"Manage organization projects\");\n\nprojectsCmd\n  .command(\"list\")\n  .description(\"List all projects in the organization\")\n  .option(\"--page <page>\", \"Page number\", \"1\")\n  .option(\"--limit <limit>\", \"Items per page\", \"50\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { page?: string; limit?: string; format?: string }) => {\n    const { listProjectsCommand: impl } = await import(\"./commands/projects/list.js\");\n    await impl({\n      page: options.page ? Number(options.page) : undefined,\n      limit: options.limit ? Number(options.limit) : undefined,\n      format: options.format,\n    });\n  });\n\nprojectsCmd\n  .command(\"get <id>\")\n  .description(\"Show details for a project\")\n  .option(\"-f, --format <format>\", \"Output format: text (default) or json\", \"text\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { getProjectCommand: impl } = await import(\"./commands/projects/get.js\");\n    await impl(id, options);\n  });\n\nprojectsCmd\n  .command(\"create\")\n  .description(\"Create a new project (returns a one-time service API key)\")\n  .requiredOption(\"--name <name>\", \"Project name\")\n  .requiredOption(\"--language <lang>\", \"Programming language (e.g. python, typescript)\")\n  .requiredOption(\"--framework <fw>\", \"Framework (e.g. langchain, openai, vercel-ai)\")\n  .option(\"--team-id <id>\", \"Existing team ID to assign the project to\")\n  .option(\"--new-team-name <name>\", \"Create a new team with this name\")\n  .option(\"-f, --format <format>\", \"Output format: text (default) or json\", \"text\")\n  .action(async (options: {\n    name: string;\n    language: string;\n    framework: string;\n    teamId?: string;\n    newTeamName?: string;\n    format?: string;\n  }) => {\n    const { createProjectCommand: impl } = await import(\"./commands/projects/create.js\");\n    await impl(options);\n  });\n\nprojectsCmd\n  .command(\"update <id>\")\n  .description(\"Update a project's metadata\")\n  .option(\"--name <name>\", \"New project name\")\n  .option(\"--language <lang>\", \"New language\")\n  .option(\"--framework <fw>\", \"New framework\")\n  .option(\"--pii-redaction-level <level>\", \"PII redaction: STRICT, ESSENTIAL, or DISABLED\")\n  .option(\"-f, --format <format>\", \"Output format: text (default) or json\", \"text\")\n  .action(async (id: string, options: {\n    name?: string;\n    language?: string;\n    framework?: string;\n    piiRedactionLevel?: \"STRICT\" | \"ESSENTIAL\" | \"DISABLED\";\n    format?: string;\n  }) => {\n    const { updateProjectCommand: impl } = await import(\"./commands/projects/update.js\");\n    await impl(id, options);\n  });\n\nprojectsCmd\n  .command(\"delete <id>\")\n  .description(\"Archive a project (soft-delete)\")\n  .option(\"-f, --format <format>\", \"Output format: text (default) or json\", \"text\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { deleteProjectCommand: impl } = await import(\"./commands/projects/delete.js\");\n    await impl(id, options);\n  });\n\nconst apiKeysCmd = program\n  .command(\"api-keys\")\n  .description(\"Manage organization API keys\");\n\napiKeysCmd\n  .command(\"list\")\n  .description(\"List all API keys in the organization\")\n  .option(\"-f, --format <format>\", \"Output format: table (default) or json\", \"table\")\n  .action(async (options: { format?: string }) => {\n    const { listApiKeysCommand: impl } = await import(\"./commands/api-keys/list.js\");\n    await impl(options);\n  });\n\napiKeysCmd\n  .command(\"create\")\n  .description(\"Create a new API key (token is shown once)\")\n  .requiredOption(\"--name <name>\", \"Human-readable name for the key\")\n  .option(\"--key-type <type>\", \"Key type: personal or service\", \"service\")\n  .option(\"--description <desc>\", \"Optional description\")\n  .option(\"--expires-at <date>\", \"Expiration date (ISO 8601)\")\n  .option(\"--project-id <id...>\", \"Project IDs to scope the key to (service keys only, repeatable)\")\n  .option(\"-f, --format <format>\", \"Output format: text (default) or json\", \"text\")\n  .action(async (options: {\n    name: string;\n    keyType?: \"personal\" | \"service\";\n    description?: string;\n    expiresAt?: string;\n    projectId?: string[];\n    format?: string;\n  }) => {\n    const { createApiKeyCommand: impl } = await import(\"./commands/api-keys/create.js\");\n    await impl(options);\n  });\n\napiKeysCmd\n  .command(\"revoke <id>\")\n  .description(\"Revoke an API key (cannot be reactivated)\")\n  .option(\"-f, --format <format>\", \"Output format: text (default) or json\", \"text\")\n  .action(async (id: string, options: { format?: string }) => {\n    const { revokeApiKeyCommand: impl } = await import(\"./commands/api-keys/revoke.js\");\n    await impl(id, options);\n  });\n\nprogram.parse(process.argv);\n","import chalk from \"chalk\";\nimport ora from \"ora\";\nimport {\n  ExperimentsApiService,\n  type ExperimentRunSummaryEntry,\n} from \"@/client-sdk/services/experiments/experiments-api.service\";\nimport { checkApiKey } from \"../../utils/apiKey\";\nimport { failSpinner } from \"../../utils/spinnerError\";\nimport { formatTable } from \"../../utils/formatting\";\n\nexport interface ListRunsOptions {\n  experiment?: string;\n  format?: string;\n  limit?: string;\n}\n\nconst DEFAULT_LIMIT = 50;\nconst MAX_PAGE_SIZE = 200;\n\nconst formatTimestamp = (epochMs: number | null | undefined): string => {\n  if (!epochMs || !Number.isFinite(epochMs)) return chalk.gray(\"—\");\n  return new Date(epochMs).toLocaleString();\n};\n\nconst summarizePassRate = (\n  evaluations: ExperimentRunSummaryEntry[\"summary\"][\"evaluations\"],\n): string => {\n  const entries = Object.values(evaluations ?? {});\n  if (entries.length === 0) return chalk.gray(\"—\");\n  const passEntries = entries.filter(\n    (e) => typeof e.averagePassed === \"number\",\n  );\n  if (passEntries.length === 0) {\n    const scoreEntries = entries.filter(\n      (e) => typeof e.averageScore === \"number\",\n    );\n    if (scoreEntries.length === 0) return chalk.gray(\"—\");\n    const avg =\n      scoreEntries.reduce((sum, e) => sum + (e.averageScore ?? 0), 0) /\n      scoreEntries.length;\n    return `${avg.toFixed(2)} avg`;\n  }\n  const avg =\n    passEntries.reduce((sum, e) => sum + (e.averagePassed ?? 0), 0) /\n    passEntries.length;\n  return `${(avg * 100).toFixed(0)}% pass`;\n};\n\nconst runStatus = (run: ExperimentRunSummaryEntry): string => {\n  if (run.timestamps.stoppedAt) return chalk.gray(\"stopped\");\n  if (run.timestamps.finishedAt) return chalk.green(\"completed\");\n  return chalk.yellow(\"running\");\n};\n\nexport const experimentListRunsCommand = async (\n  options: ListRunsOptions = {},\n): Promise<void> => {\n  checkApiKey();\n\n  const experimentSlug = options.experiment?.trim();\n  if (!experimentSlug) {\n    console.error(\n      chalk.red(\n        \"Error: --experiment <slug> is required. List experiments first with `langwatch experiment list`.\",\n      ),\n    );\n    process.exit(1);\n  }\n\n  const format = options.format === \"json\" ? \"json\" : \"table\";\n  const limit = (() => {\n    const parsed = options.limit ? parseInt(options.limit, 10) : DEFAULT_LIMIT;\n    if (!Number.isFinite(parsed) || parsed <= 0) return DEFAULT_LIMIT;\n    return Math.min(parsed, MAX_PAGE_SIZE);\n  })();\n\n  const service = new ExperimentsApiService();\n  const spinner = ora(\n    `Fetching runs for \"${experimentSlug}\"...`,\n  ).start();\n\n  try {\n    const result = await service.listRuns({\n      experimentSlug,\n      pageSize: limit,\n    });\n\n    spinner.succeed(\n      `Found ${result.pagination.totalHits} run${result.pagination.totalHits === 1 ? \"\" : \"s\"} for ${chalk.cyan(experimentSlug)}`,\n    );\n\n    if (format === \"json\") {\n      console.log(JSON.stringify(result, null, 2));\n      return;\n    }\n\n    if (result.runs.length === 0) {\n      console.log();\n      console.log(chalk.gray(\"No runs found for this experiment yet.\"));\n      return;\n    }\n\n    console.log();\n\n    const tableData = result.runs.map((run) => ({\n      \"Run ID\": run.runId,\n      Status: runStatus(run),\n      Progress:\n        typeof run.progress === \"number\" && typeof run.total === \"number\"\n          ? `${run.progress}/${run.total}`\n          : chalk.gray(\"—\"),\n      Started: formatTimestamp(run.timestamps.createdAt),\n      Finished: formatTimestamp(run.timestamps.finishedAt),\n      Result: summarizePassRate(run.summary?.evaluations ?? {}),\n    }));\n\n    formatTable({\n      data: tableData,\n      headers: [\"Run ID\", \"Status\", \"Progress\", \"Started\", \"Finished\", \"Result\"],\n      colorMap: {\n        \"Run ID\": chalk.cyan,\n      },\n    });\n\n    if (result.pagination.hasMore) {\n      console.log();\n      console.log(\n        chalk.gray(\n          `Showing ${result.runs.length} of ${result.pagination.totalHits}. Increase with --limit or use --format json for full data.`,\n        ),\n      );\n    }\n\n    console.log();\n    console.log(\n      chalk.gray(\n        `Use ${chalk.cyan(\"langwatch experiment status <runId>\")} or ${chalk.cyan(\"langwatch experiment results <runId>\")} to drill into a run.`,\n      ),\n    );\n  } catch (error) {\n    failSpinner({ spinner, error, action: \"list experiment runs\" });\n    process.exit(1);\n  }\n};\n","import chalk from \"chalk\";\nimport ora from \"ora\";\nimport {\n  ExperimentsApiService,\n  type ExperimentRunResultsResponse,\n  type ExperimentRunDatasetEntry,\n  type ExperimentRunEvaluation,\n} from \"@/client-sdk/services/experiments/experiments-api.service\";\nimport {\n  deriveRunStatus,\n  isTerminalStatus,\n} from \"@/client-sdk/services/experiments/run-status\";\nimport { checkApiKey } from \"../../utils/apiKey\";\nimport { failSpinner } from \"../../utils/spinnerError\";\nimport { formatTable } from \"../../utils/formatting\";\nimport { resolveRunId } from \"./resolve-run\";\n\nexport type ExperimentResultsFilter = \"failed\" | \"all\";\nexport type ExperimentResultsFormat = \"table\" | \"json\";\n\nexport interface ExperimentResultsOptions {\n  filter?: string;\n  evaluator?: string;\n  format?: string;\n  limit?: string;\n  runId?: string;\n}\n\nconst DEFAULT_LIMIT = 20;\n\nconst rowKey = (index: number, targetId?: string | null): string =>\n  `${index}:${targetId ?? \"\"}`;\n\nconst summarizeEntry = (entry: Record<string, unknown>): string => {\n  // Pick something meaningful: input, question, query, prompt, or first string field\n  const candidates = [\"input\", \"question\", \"query\", \"prompt\", \"user\"];\n  for (const key of candidates) {\n    const value = entry[key];\n    if (typeof value === \"string\" && value.length > 0) {\n      return value.length > 60 ? `${value.slice(0, 57)}...` : value;\n    }\n  }\n  const firstString = Object.entries(entry).find(\n    ([, v]) => typeof v === \"string\" && v.length > 0,\n  );\n  if (firstString) {\n    const v = firstString[1] as string;\n    return v.length > 60 ? `${v.slice(0, 57)}...` : v;\n  }\n  return chalk.gray(\"—\");\n};\n\nconst isFailedEvaluation = (evaluation: ExperimentRunEvaluation): boolean => {\n  if (evaluation.status === \"error\") return true;\n  if (evaluation.passed === false) return true;\n  return false;\n};\n\nconst isFailedRow = ({\n  entry,\n  evaluations,\n}: {\n  entry: ExperimentRunDatasetEntry;\n  evaluations: ExperimentRunEvaluation[];\n}): boolean => {\n  if (entry.error) return true;\n  return evaluations.some((e) => isFailedEvaluation(e));\n};\n\nexport const experimentResultsCommand = async ({\n  experimentSlug,\n  options = {},\n}: {\n  experimentSlug: string;\n  options?: ExperimentResultsOptions;\n}): Promise<void> => {\n  checkApiKey();\n\n  const filter: ExperimentResultsFilter =\n    options.filter === \"failed\" ? \"failed\" : \"all\";\n  const format: ExperimentResultsFormat =\n    options.format === \"json\" ? \"json\" : \"table\";\n  const limit = (() => {\n    const parsed = options.limit ? parseInt(options.limit, 10) : DEFAULT_LIMIT;\n    return Number.isFinite(parsed) && parsed > 0 ? parsed : DEFAULT_LIMIT;\n  })();\n  const evaluatorFilter = options.evaluator?.trim();\n\n  const service = new ExperimentsApiService();\n  const spinner = ora(`Fetching results for \"${experimentSlug}\"...`).start();\n\n  try {\n    const runId = await resolveRunId({\n      service,\n      experimentSlug,\n      runId: options.runId,\n    });\n    const results: ExperimentRunResultsResponse = await service.getRunResults({\n      runId,\n      experimentSlug,\n    });\n    const runStatus = deriveRunStatus(results.timestamps);\n    spinner.succeed(\n      `Loaded results for ${chalk.cyan(runId)} (${results.dataset.length} rows, ${results.evaluations.length} evaluations)`,\n    );\n\n    if (!isTerminalStatus(runStatus) && format !== \"json\") {\n      console.log(\n        chalk.yellow(\n          runStatus === \"interrupted\"\n            ? `Run status: interrupted. These are partial results (the run never sent a finished/stopped marker and has had no recent updates).`\n            : `Run status: running. These are partial results; more rows may appear later.`,\n        ),\n      );\n    }\n\n    // Group evaluations by target-scoped row key.\n    const evaluationsByRow = new Map<string, ExperimentRunEvaluation[]>();\n    for (const evaluation of results.evaluations) {\n      if (evaluatorFilter && evaluation.evaluator !== evaluatorFilter) continue;\n      const key = rowKey(evaluation.index, evaluation.targetId);\n      const list = evaluationsByRow.get(key) ?? [];\n      list.push(evaluation);\n      evaluationsByRow.set(key, list);\n    }\n\n    // Determine evaluator columns to show\n    const evaluatorNames = evaluatorFilter\n      ? [evaluatorFilter]\n      : Array.from(\n          new Set(results.evaluations.map((e) => e.evaluator)),\n        ).slice(0, 3); // cap visible columns to keep table readable\n\n    let rows = results.dataset.map((entry) => ({\n      entry,\n      evaluations: evaluationsByRow.get(rowKey(entry.index, entry.targetId)) ?? [],\n    }));\n\n    if (filter === \"failed\") {\n      rows = rows.filter((r) =>\n        isFailedRow({ entry: r.entry, evaluations: r.evaluations }),\n      );\n    }\n\n    const totalMatching = rows.length;\n    const truncated = rows.length > limit;\n    rows = rows.slice(0, limit);\n\n    if (format === \"json\") {\n      console.log(\n        JSON.stringify(\n          {\n            ...results,\n            dataset: rows.map((row) => row.entry),\n            evaluations: rows.flatMap((row) => row.evaluations),\n            meta: {\n              totalMatching,\n              truncated,\n              limit,\n              filter,\n              evaluator: evaluatorFilter ?? null,\n            },\n          },\n          null,\n          2,\n        ),\n      );\n      return;\n    }\n\n    if (rows.length === 0) {\n      if (filter === \"failed\") {\n        console.log(chalk.gray(\"No rows matched the filter.\"));\n      } else if (runStatus === \"running\") {\n        console.log(\n          chalk.gray(\n            \"No rows recorded yet. The run is still in progress; run this again shortly.\",\n          ),\n        );\n      } else if (runStatus === \"interrupted\") {\n        console.log(\n          chalk.gray(\"No rows were recorded before the run was interrupted.\"),\n        );\n      } else {\n        console.log(chalk.gray(\"No rows recorded for this run.\"));\n      }\n      return;\n    }\n\n    const headers = [\"#\", \"Target\", ...evaluatorNames, \"Status\"];\n    const tableData = rows.map(({ entry, evaluations }) => {\n      const evaluatorCols: Record<string, string> = {};\n      for (const name of evaluatorNames) {\n        const e = evaluations.find((x) => x.evaluator === name);\n        if (!e) {\n          evaluatorCols[name] = chalk.gray(\"—\");\n        } else if (e.status === \"error\") {\n          evaluatorCols[name] = chalk.red(\"error\");\n        } else if (typeof e.score === \"number\") {\n          const passedSuffix =\n            e.passed === false\n              ? chalk.red(\" ✗\")\n              : e.passed === true\n                ? chalk.green(\" ✓\")\n                : \"\";\n          evaluatorCols[name] = `${e.score.toFixed(2)}${passedSuffix}`;\n        } else if (e.label) {\n          evaluatorCols[name] = e.label;\n        } else if (typeof e.passed === \"boolean\") {\n          evaluatorCols[name] = e.passed\n            ? chalk.green(\"pass\")\n            : chalk.red(\"fail\");\n        } else {\n          evaluatorCols[name] = chalk.gray(\"—\");\n        }\n      }\n      const status = entry.error\n        ? chalk.red(\n            entry.error.length > 40\n              ? `${entry.error.slice(0, 37)}...`\n              : entry.error,\n          )\n        : evaluations.some(isFailedEvaluation)\n          ? chalk.red(\"failed\")\n          : chalk.green(\"ok\");\n\n      return {\n        \"#\": String(entry.index),\n        Target: summarizeEntry(entry.entry),\n        ...evaluatorCols,\n        Status: status,\n      };\n    });\n\n    formatTable({ data: tableData, headers });\n\n    if (truncated) {\n      console.log();\n      console.log(\n        chalk.gray(\n          `Showing ${rows.length} of ${totalMatching} rows. Use --limit <n> or --format json for the full payload.`,\n        ),\n      );\n    }\n  } catch (error) {\n    failSpinner({ spinner, error, action: \"fetch experiment results\" });\n    process.exit(1);\n  }\n};\n","import chalk from \"chalk\";\nimport ora from \"ora\";\nimport {\n  ExperimentsApiService,\n  type ExperimentSummary,\n} from \"@/client-sdk/services/experiments/experiments-api.service\";\nimport { checkApiKey } from \"../../utils/apiKey\";\nimport { failSpinner } from \"../../utils/spinnerError\";\nimport { formatTable, formatRelativeTime } from \"../../utils/formatting\";\n\nexport interface ExperimentListOptions {\n  format?: string;\n  limit?: string;\n}\n\nconst DEFAULT_LIMIT = 50;\nconst MAX_PAGE_SIZE = 200;\n\nexport const experimentListCommand = async (\n  options: ExperimentListOptions = {},\n): Promise<void> => {\n  checkApiKey();\n\n  const format = options.format === \"json\" ? \"json\" : \"table\";\n  const limit = (() => {\n    const parsed = options.limit ? parseInt(options.limit, 10) : DEFAULT_LIMIT;\n    if (!Number.isFinite(parsed) || parsed <= 0) return DEFAULT_LIMIT;\n    return Math.min(parsed, MAX_PAGE_SIZE);\n  })();\n\n  const service = new ExperimentsApiService();\n  const spinner = ora(\"Fetching experiments...\").start();\n\n  try {\n    const result = await service.listExperiments({ pageSize: limit });\n    spinner.succeed(\n      `Found ${result.pagination.totalHits} experiment${result.pagination.totalHits === 1 ? \"\" : \"s\"}`,\n    );\n\n    if (format === \"json\") {\n      console.log(JSON.stringify(result, null, 2));\n      return;\n    }\n\n    if (result.experiments.length === 0) {\n      console.log();\n      console.log(chalk.gray(\"No experiments found in this project.\"));\n      return;\n    }\n\n    console.log();\n\n    const tableData = result.experiments.map((exp: ExperimentSummary) => ({\n      Name: exp.name ?? exp.slug,\n      Slug: exp.slug,\n      \"Last Run\": exp.lastRunAt\n        ? formatRelativeTime(exp.lastRunAt)\n        : chalk.gray(\"—\"),\n      Runs: String(exp.runsCount),\n    }));\n\n    formatTable({\n      data: tableData,\n      headers: [\"Name\", \"Slug\", \"Last Run\", \"Runs\"],\n      colorMap: {\n        Name: chalk.cyan,\n        Slug: chalk.green,\n        Runs: chalk.yellow,\n      },\n    });\n\n    if (result.pagination.hasMore) {\n      console.log();\n      console.log(\n        chalk.gray(\n          `Showing ${result.experiments.length} of ${result.pagination.totalHits}. Increase with --limit or use --format json for full data.`,\n        ),\n      );\n    }\n\n    console.log();\n    console.log(\n      chalk.gray(\n        `Use ${chalk.cyan(\"langwatch experiment list-runs --experiment <slug>\")} to see runs for an experiment.`,\n      ),\n    );\n  } catch (error) {\n    failSpinner({ spinner, error, action: \"fetch experiments\" });\n    process.exit(1);\n  }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,SAAS,cAAc;AAIvB,SAAS,eAAe;;;ACPxB,OAAO,WAAW;AAClB,OAAO,SAAS;AAehB,IAAM,gBAAgB;AACtB,IAAM,gBAAgB;AAEtB,IAAM,kBAAkB,CAAC,YAA+C;AACtE,MAAI,CAAC,WAAW,CAAC,OAAO,SAAS,OAAO,EAAG,QAAO,MAAM,KAAK,QAAG;AAChE,SAAO,IAAI,KAAK,OAAO,EAAE,eAAe;AAC1C;AAEA,IAAM,oBAAoB,CACxB,gBACW;AACX,QAAM,UAAU,OAAO,OAAO,oCAAe,CAAC,CAAC;AAC/C,MAAI,QAAQ,WAAW,EAAG,QAAO,MAAM,KAAK,QAAG;AAC/C,QAAM,cAAc,QAAQ;AAAA,IAC1B,CAAC,MAAM,OAAO,EAAE,kBAAkB;AAAA,EACpC;AACA,MAAI,YAAY,WAAW,GAAG;AAC5B,UAAM,eAAe,QAAQ;AAAA,MAC3B,CAAC,MAAM,OAAO,EAAE,iBAAiB;AAAA,IACnC;AACA,QAAI,aAAa,WAAW,EAAG,QAAO,MAAM,KAAK,QAAG;AACpD,UAAMA,OACJ,aAAa,OAAO,CAAC,KAAK,MAAG;AAtCnC;AAsCsC,qBAAO,OAAE,iBAAF,YAAkB;AAAA,OAAI,CAAC,IAC9D,aAAa;AACf,WAAO,GAAGA,KAAI,QAAQ,CAAC,CAAC;AAAA,EAC1B;AACA,QAAM,MACJ,YAAY,OAAO,CAAC,KAAK,MAAG;AA3ChC;AA2CmC,mBAAO,OAA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