Skip to content

Release v0.11.0: read output via results.main_stuff - #58

Merged
lchoquel merged 8 commits into
mainfrom
release/v0.11.0
Jul 5, 2026
Merged

lchoquel merged 8 commits into
mainfrom
release/v0.11.0

Conversation

@lchoquel

@lchoquel lchoquel commented Jul 5, 2026

Copy link
Copy Markdown
Member

Summary

  • Read a run's output with results.main_stuff. Bumped to pipelex-sdk 0.3.0, which resolves the main output for you on both execution modes: execute returns a PipelexExecuteResult and the durable path a RunResults, and both expose a resolved .main_stuff. The starter's whole output-extraction module (my_project/run_output.pyfind_main_content shape-guessing + the to_run_results adapter) is gone; the CLI and the narrower read results.main_stuff directly, and the blocking execute result is adapted onto RunResults inline in the runner. A completed run that delivers no main stuff raises the SDK's MissingMainStuffError instead of yielding None.
  • Breaking: renamed the env var PIPELEX_API_URL to PIPELEX_BASE_URL for consistency with the SDK's base_url naming. No read alias — update .env / environment.
  • Fixed: rewrote the README and CLAUDE.md around the actual my-project CLI (the extract-entities command, durable/blocking execution modes, runs status|result|wait lifecycle). They still described the removed hello_world module, start_and_wait usage, and the find_main_content normalizer — the quick start's first command errored out for a fresh user.
  • Repository: removed internal-only planning docs (TODOS.md, wip/) that must not ship in a "Use this template" repo.

⚠️ Merge-order note

This PR pins pipelex-sdk via a git+ssh ref to pipelex-sdk-python's release/v0.3.0 branch (unpublished — see that repo's PR). Recommend not merging this until pipelex-sdk-python's release/v0.3.0 PR has merged and published pipelex-sdk 0.3.0 to PyPI. I'll push a follow-up commit swapping the pin to a registry range (pipelex-sdk>=0.3.0) once it's live, so main never depends on a git pin.

Test plan

  • make agent-check && make agent-test green
  • Quick start re-verified: uv run my-project extract-entities "<text>"
  • CHANGELOG.md updated

🤖 Generated with Claude Code

https://claude.ai/code/session_01PibWhJ6mPWdrkMqZATZpkJ

Review in cubic

lchoquel and others added 6 commits July 3, 2026 00:14
…istency

chore: update pipelex-sdk to version 0.2.0 and adjust related documentation
- Added `extract_entities.py` example for extracting people, organizations, and dates from text.
- Created `main.mthds` for the entity extraction method.
- Implemented `find_main_content` in `run_output.py` to normalize API output.
- Developed `runner.py` for executing pipelines in blocking and durable modes.
- Updated `pyproject.toml` to include new dependencies and CLI entry point.
- Removed obsolete `hello_world` files and tests.
- Added unit and integration tests for the new entity extraction functionality.
- Enhanced error handling and validation in the new implementation.
Bumps pipelex-sdk to 0.3.0 (git-pinned to release/v0.3.0 while unreleased),
which resolves the main output for you on both execution modes. Deletes the
starter's find_main_content shape-guessing helper: to_run_results is now a
trivial adapter and the CLI / narrower read results.main_stuff directly. A
completed run with no main stuff raises the SDK's MissingMainStuffError.

Bump 0.10.0 -> 0.11.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PibWhJ6mPWdrkMqZATZpkJ
…nline

Now that the SDK resolves .main_stuff on both the blocking (PipelexExecuteResult)
and durable (RunResults) result types, my_project/run_output.py earned nothing: its
find_main_content was already deleted and to_run_results was a one-line repackage.
Inlined that adaptation into runner.run_blocking and removed the module + its test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PibWhJ6mPWdrkMqZATZpkJ
Picks up the SDK's main_stuff_name typed-field cleanup (behavior-neutral).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PibWhJ6mPWdrkMqZATZpkJ
…al planning docs

The starter was rewritten from a single hello_world.py example to an
extract-entities Typer CLI, but the user-facing docs still described the
deleted module. Rewrite the README and CLAUDE.md around what actually exists:
the my-project console script, the extract-entities command, the
durable/blocking execution modes, and the runs status|result|wait lifecycle.
The quick start now runs `uv run my-project extract-entities "<text>"` — the
old first command (`python -m my_project.hello_world`) errored out. Drop the
stale references to start_and_wait usage and the removed find_main_content
normalizer.

Also remove the internal-only planning docs (TODOS.md, wip/) that must not
ship in a "Use this template" repo, mirroring the JS starter's cleanup.

CHANGELOG: fold both fixes into the unreleased v0.11.0 section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PibWhJ6mPWdrkMqZATZpkJ
@greptile-apps

greptile-apps Bot commented Jul 5, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates the starter around pipelex-sdk 0.3.0 and the new results.main_stuff output path. The main changes are:

  • Uses results.main_stuff for completed run output in both blocking and durable modes.
  • Replaces the old hello-world example with the my-project extract-entities CLI.
  • Adds durable run lifecycle commands for runs status, runs result, and runs wait.
  • Renames the API endpoint environment variable to PIPELEX_BASE_URL.
  • Refreshes docs, tests, packaging metadata, and the lockfile for the new CLI flow.

Confidence Score: 5/5

Safe to merge with minimal risk.

The changed runtime paths consistently use the new SDK main_stuff contract, CLI mode dispatch is covered by tests, and package data includes the new method bundle.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex performed an environment presence check and confirmed the required Pipelex environment variables were unset.
  • T-Rex ran the quick-start CLI and encountered a 401 credential blocker.
  • T-Rex executed the fallback tests, resulting in 12 tests passing and 2 deselected.
  • T-Rex collected test names to show coverage of the .main_stuff parse tests.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
README.md Rewrites the starter quick start and architecture docs around the extract-entities CLI and run lifecycle commands.
my_project/cli.py Adds a Typer CLI for extract-entities plus durable run status/result/wait commands; no blocking issues found.
my_project/errors.py Adds SDK and HTTP error presentation with actionable CLI hints for auth, timeout, lifecycle, and connectivity failures.
my_project/examples/extract_entities.py Adds the extract-entities example metadata and Pydantic result narrower based on results.main_stuff.
my_project/methods/extract-entities/main.mthds Adds the extract_entities PipeLLM method and structured output concept for people, organizations, and dates.
my_project/runner.py Adds blocking, durable attended, detached, and run-inspection SDK lifecycle wrappers with stderr progress output.
pyproject.toml Bumps the project and SDK dependency, adds CLI/runtime dependencies, console script, package data, and test dependency updates.
tests/e2e/test_my_project.py Replaces hello-world e2e coverage with durable and blocking extract-entities API runs.
tests/unit/test_cli.py Adds offline CLI tests for help, input validation, execution-mode selection, file input, and detached start behavior.
uv.lock Refreshes the lockfile for pipelex-sdk 0.3.0, Typer/Rich dependencies, and test dependency additions.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
actor User
participant CLI as my-project CLI
participant Runner as my_project.runner
participant SDK as PipelexAPIClient
participant API as Pipelex API

User->>CLI: extract-entities text / runs command
CLI->>CLI: load .env and read bundle
alt blocking mode
    CLI->>Runner: run_blocking(pipe_code, bundle, inputs)
    Runner->>SDK: execute(...)
    SDK->>API: POST /execute
    API-->>SDK: PipelexExecuteResult(main_stuff)
    Runner-->>CLI: RunResults(main_stuff)
else durable attended
    CLI->>Runner: run_durable_attended(...)
    Runner->>SDK: start(...)
    SDK->>API: create durable run
    API-->>SDK: pipeline_run_id
    Runner->>SDK: wait_for_result(run_id)
    SDK->>API: poll result state
    API-->>SDK: RunResults(main_stuff)
    Runner-->>CLI: RunResults(main_stuff)
else durable detached / resume
    CLI->>Runner: start_detached or wait_for_run(run_id)
    Runner->>SDK: start / get_run_status / get_run_result / wait_for_result
    SDK->>API: durable run lifecycle request
    API-->>SDK: run id, state, or RunResults
    Runner-->>CLI: lifecycle response
end
CLI->>CLI: parse or print results.main_stuff
CLI-->>User: JSON output or run status
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
actor User
participant CLI as my-project CLI
participant Runner as my_project.runner
participant SDK as PipelexAPIClient
participant API as Pipelex API

User->>CLI: extract-entities text / runs command
CLI->>CLI: load .env and read bundle
alt blocking mode
    CLI->>Runner: run_blocking(pipe_code, bundle, inputs)
    Runner->>SDK: execute(...)
    SDK->>API: POST /execute
    API-->>SDK: PipelexExecuteResult(main_stuff)
    Runner-->>CLI: RunResults(main_stuff)
else durable attended
    CLI->>Runner: run_durable_attended(...)
    Runner->>SDK: start(...)
    SDK->>API: create durable run
    API-->>SDK: pipeline_run_id
    Runner->>SDK: wait_for_result(run_id)
    SDK->>API: poll result state
    API-->>SDK: RunResults(main_stuff)
    Runner-->>CLI: RunResults(main_stuff)
else durable detached / resume
    CLI->>Runner: start_detached or wait_for_run(run_id)
    Runner->>SDK: start / get_run_status / get_run_result / wait_for_result
    SDK->>API: durable run lifecycle request
    API-->>SDK: run id, state, or RunResults
    Runner-->>CLI: lifecycle response
end
CLI->>CLI: parse or print results.main_stuff
CLI-->>User: JSON output or run status
Loading

Reviews (2): Last reviewed commit: "chore: swap pipelex-sdk pin from git ref..." | Re-trigger Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c1d26596bc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread my_project/methods/extract-entities/main.mthds Outdated
Comment thread pyproject.toml Outdated
lchoquel and others added 2 commits July 5, 2026 17:23
pipelex-sdk 0.3.0 published to PyPI now that pipelex-sdk-python#6 merged
and the repo is public. The git+ssh pin couldn't be cloned by CI runners
(no SSH key), which is exactly the failure this resolves.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PibWhJ6mPWdrkMqZATZpkJ
The demo bundle declared people/orgs/dates as bare type = "list" with no
item_type, so the runtime built them as List[Any] instead of the list[str]
the ExtractedEntities model mirrors. Add item_type = "text" to all three.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014mFVgTkeUHpKPBqAbArWLv
@lchoquel
lchoquel merged commit dc09d5d into main Jul 5, 2026
16 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 5, 2026
@lchoquel
lchoquel deleted the release/v0.11.0 branch July 5, 2026 16:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant