Build AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.
Fix PR review agent comments: escape Rich markup, fix docs, improve suggestions
Louis Choquel013c53a68fe0
diff --git a/docs/features/cli.md b/docs/features/cli.mdindex bdd1d5a65..954ff7c48 100644--- a/docs/features/cli.md+++ b/docs/features/cli.md@@ -41,7 +41,7 @@ Package manifest management is currently exposed through the lowercase `mthds` C## Agent CLI-The `pipelex-agent` CLI is a machine-first interface designed for automated environments like Claude Code skills. Output format varies by command — JSON, raw TOML, or markdown — with no interactive prompts or Rich formatting. Errors always go to stderr as JSON.+The `pipelex-agent` CLI is a machine-first interface designed for automated environments like Claude Code skills. Output format varies by command — JSON, raw TOML, or markdown — with no interactive prompts or Rich formatting. Structured commands emit JSON errors to stderr; `fmt` and `lint` pass through native `plxt` output.| Command | Description ||---------|-------------|@@ -53,7 +53,7 @@ The `pipelex-agent` CLI is a machine-first interface designed for automated envi| `inputs` | Generate example input JSON for a pipe || `concept` | Convert a JSON concept spec into raw TOML (stdout) || `pipe` | Convert a JSON pipe spec into raw TOML (stdout) |-| `models` | List available model presets, aliases, and talent mappings (`--format markdown\|json`, default: markdown) |+| `models` | List available model presets, aliases, and waterfalls (`--format markdown\|json`, default: markdown) || `doctor` | Check configuration health (`--format markdown\|json`, default: markdown) |For detailed CLI documentation, see the [CLI reference](../tools/cli/index.md).diff --git a/docs/tools/cli/agent-cli.md b/docs/tools/cli/agent-cli.mdindex 0d0ef297a..07a41a58c 100644--- a/docs/tools/cli/agent-cli.md+++ b/docs/tools/cli/agent-cli.md@@ -4,7 +4,7 @@ description: "Use the pipelex-agent CLI for machine-oriented output — designed# Agent CLI (`pipelex-agent`)-The `pipelex-agent` CLI is a machine-oriented companion to the main `pipelex` CLI. It is designed for programmatic consumption by AI agents, IDE extensions, and other automation tools. Output format varies by command — JSON, raw TOML, or markdown — with no Rich formatting or interactive prompts. Errors always go to stderr as JSON.+The `pipelex-agent` CLI is a machine-oriented companion to the main `pipelex` CLI. It is designed for programmatic consumption by AI agents, IDE extensions, and other automation tools. Output format varies by command — JSON, raw TOML, or markdown — with no Rich formatting or interactive prompts. Structured commands emit JSON errors to stderr; `fmt` and `lint` pass through native `plxt` output.It is consumed by the `mthds-agent` CLI (from the `mthds` npm package) which itself is used by Claude Code skills, the VS Code extension, and can be called directly from the command line.@@ -89,7 +89,7 @@ These commands do not have subcommands:| `lint` | Lint a `.mthds`/`.toml`/`.plx` file for errors (delegates to `plxt`) || `concept` | Convert a JSON concept spec into raw TOML (stdout) || `pipe` | Convert a JSON pipe spec into raw TOML (stdout) |-| `models` | List available model presets, aliases, waterfalls, and talent mappings (`--format markdown\|json`, default: markdown) |+| `models` | List available model presets, aliases, and waterfalls (`--format markdown\|json`, default: markdown) || `doctor` | Check config, credentials, and model health (`--format markdown\|json`, default: markdown) |## Output Contractdiff --git a/pipelex/builder/pipe/pipe_extract_spec.py b/pipelex/builder/pipe/pipe_extract_spec.pyindex 154b2b759..93071d19e 100644--- a/pipelex/builder/pipe/pipe_extract_spec.py+++ b/pipelex/builder/pipe/pipe_extract_spec.py@@ -3,6 +3,7 @@ from typing import Literalfrom pydantic import Field, field_validatorfrom pydantic.json_schema import SkipJsonSchemafrom rich.console import Group+from rich.markup import escapefrom rich.text import Textfrom typing_extensions import override@@ -78,7 +79,7 @@ class PipeExtractSpec(PipeSpec):# Add extract specific informationextract_group.renderables.append(Text()) # Blank line- extract_group.renderables.append(Text.from_markup(f"Model: [bold yellow]{self.model or '(default)'}[/bold yellow]"))+ extract_group.renderables.append(Text.from_markup(f"Model: [bold yellow]{escape(self.model or '(default)')}[/bold yellow]"))# Add optional extraction settings if they are setif self.max_page_images is not None:diff --git a/pipelex/builder/pipe/pipe_img_gen_spec.py b/pipelex/builder/pipe/pipe_img_gen_spec.pyindex ab2558dd1..1d406ed77 100644--- a/pipelex/builder/pipe/pipe_img_gen_spec.py+++ b/pipelex/builder/pipe/pipe_img_gen_spec.py@@ -2,6 +2,7 @@ from typing import Literalfrom pydantic import Field, field_validatorfrom rich.console import Group+from rich.markup import escapefrom rich.text import Textfrom typing_extensions import override@@ -50,7 +51,7 @@ class PipeImgGenSpec(PipeSpec):# Add image generation specific informationimg_gen_group.renderables.append(Text()) # Blank line- img_gen_group.renderables.append(Text.from_markup(f"Model: [bold yellow]{self.model or '(default)'}[/bold yellow]"))+ img_gen_group.renderables.append(Text.from_markup(f"Model: [bold yellow]{escape(self.model or '(default)')}[/bold yellow]"))return img_gen_groupdiff --git a/pipelex/builder/pipe/pipe_llm_spec.py b/pipelex/builder/pipe/pipe_llm_spec.pyindex cf02e72dd..063b5cfcc 100644--- a/pipelex/builder/pipe/pipe_llm_spec.py+++ b/pipelex/builder/pipe/pipe_llm_spec.py@@ -3,6 +3,7 @@ from typing import Literalfrom pydantic import Field, field_validatorfrom pydantic.json_schema import SkipJsonSchemafrom rich.console import Group+from rich.markup import escapefrom rich.panel import Panelfrom rich.text import Textfrom typing_extensions import override@@ -72,7 +73,7 @@ So, don't have to write a bullet-list of all the attributes definitions yourself# Add LLM-specific informationllm_group.renderables.append(Text()) # Blank line- llm_group.renderables.append(Text.from_markup(f"Model: [bold yellow]{self.model or '(default)'}[/bold yellow]"))+ llm_group.renderables.append(Text.from_markup(f"Model: [bold yellow]{escape(self.model or '(default)')}[/bold yellow]"))# Add system prompt if presentif self.system_prompt:diff --git a/pipelex/builder/pipe/pipe_search_spec.py b/pipelex/builder/pipe/pipe_search_spec.pyindex 2e4a5b274..394208d6a 100644--- a/pipelex/builder/pipe/pipe_search_spec.py+++ b/pipelex/builder/pipe/pipe_search_spec.py@@ -3,6 +3,7 @@ from typing import Any, Literalfrom pydantic import ConfigDict, Field, field_validator, model_validatorfrom rich.console import Group+from rich.markup import escapefrom rich.panel import Panelfrom rich.text import Textfrom typing_extensions import override@@ -88,7 +89,7 @@ class PipeSearchSpec(PipeSpec):# Add search specific informationsearch_group.renderables.append(Text()) # Blank line- search_group.renderables.append(Text.from_markup(f"Model: [bold yellow]{self.model or '(default)'}[/bold yellow]"))+ search_group.renderables.append(Text.from_markup(f"Model: [bold yellow]{escape(self.model or '(default)')}[/bold yellow]"))prompt_panel = Panel(self.prompt,title="Search Prompt",diff --git a/pipelex/cli/agent_cli/commands/check_model_cmd.py b/pipelex/cli/agent_cli/commands/check_model_cmd.pyindex dddcc4363..c08e3d915 100644--- a/pipelex/cli/agent_cli/commands/check_model_cmd.py+++ b/pipelex/cli/agent_cli/commands/check_model_cmd.py@@ -38,6 +38,8 @@ def _format_check_markdown(result: dict[str, Any]) -> str:if cross_suggestions:if not suggestions:lines.append("\nDid you mean:")+ else:+ lines.append("\nOr from a different collection:")for suggestion in cross_suggestions:lines.append(f"- {suggestion}")diff --git a/pipelex/pipeline/pipeline_run_setup.py b/pipelex/pipeline/pipeline_run_setup.pyindex 09c30c86e..eeea0d301 100644--- a/pipelex/pipeline/pipeline_run_setup.py+++ b/pipelex/pipeline/pipeline_run_setup.py@@ -176,7 +176,9 @@ async def pipeline_run_setup(if pipe_code:pipe = get_required_pipe(pipe_code=pipe_code)elif blueprint.main_pipe:- # Qualify main_pipe with domain to avoid ambiguity when multiple domains define pipes with the same code+ # Qualify main_pipe with domain to avoid ambiguity when multiple domains define pipes with the same code.+ # Note: main_pipe is validated as snake_case (no dots allowed), so it is always a bare code — never+ # already domain-qualified. See PipelexBundleBlueprint.validate_main_pipe_syntax.qualified_main_pipe = f"{blueprint.domain}.{blueprint.main_pipe}"pipe = get_required_pipe(pipe_code=qualified_main_pipe)else: