Skip to content

feat(cli): add the console script pi-agent-cli-lc and document the Zed custom agent - #45

Merged
zy1233 merged 1 commit into
mainfrom
feat/pi-agent-cli-lc-script
Oct 28, 2026
Merged

zy1233 merged 1 commit into
mainfrom
feat/pi-agent-cli-lc-script

Conversation

@zy1233

@zy1233 zy1233 commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Summary

uvx pi-agent-cli-lc==X <args>        # the only form the ACP registry runs (no --from)
  looks for an executable named "pi-agent-cli-lc"
    before: the package has only "pi-agent-cli"  -> error
    after:  the package has both                 -> pi_agent_cli.__main__:main
 [project.scripts]
 pi-agent-cli = "pi_agent_cli.__main__:main"
+pi-agent-cli-lc = "pi_agent_cli.__main__:main"

Also: README section "In Zed (custom agent)" (uvx --from pi-agent-cli-lc ...), the package README, CHANGELOG.md [Unreleased], and a test that keeps both script names.

This does not make the agent ready for the ACP registry: authMethods is still [], and Zed ignores registry entries that have only uvx.

Evidence

  • Before: the published 0.6.0, in the registry's form:
    uvx pi-agent-cli-lc==0.6.0 --help exits 1: An executable named `pi-agent-cli-lc` is not provided by package `pi-agent-cli-lc`.
    The new test on main: 1 failed, 2 passed.
    After: a wheel built from this branch (version 0.6.1.dev0, --find-links):
    uvx pi-agent-cli-lc==0.6.1.dev0 --help exits 0 and prints the usage.
    The new test: 3 passed.
    initialize over stdio through that command, empty home: the agent answers in 1.6 s.
  • The command of the README entry (--from pi-agent-cli-lc --with "pi-agent-core-lc[deepseek]" pi-agent-cli) ran with the published 0.6.0: the agent answered initialize and ended when stdin closed. It was not run inside Zed.
  • Ruff check and format check pass locally. The full pytest run is left to CI.

Merge Danger

Door: two-way until the next release. After that the script name is public.

Blast Radius: packaging metadata and docs. No code path of the agent changes. pi-agent-cli stays, so nobody who uses it is affected.

…d custom agent

`uvx <package>` runs the executable that has the name of the package, and it stops with an
error when the package has none (uv 0.7 and later). The package `pi-agent-cli-lc` had only the
script `pi-agent-cli`, so `uvx pi-agent-cli-lc==0.6.0` failed. The ACP registry starts a PyPI
agent only in this form (`uvx <package> <args>`, no `--from`; registry issue 296), so a registry
entry needs a script that has the name of the package.

- pyproject.toml of pi-agent-cli: a second script `pi-agent-cli-lc` with the same entry point.
  `pi-agent-cli` stays.
- test_console_scripts.py: a script with the name of the package exists, the old name stays,
  and the entry point can be imported.
- README: the section "In Zed (custom agent)" with the `agent_servers` entry
  (`uvx --from pi-agent-cli-lc`), the place of the model and key settings, and the entry for a
  checkout. The package README names both uvx forms.
- CHANGELOG [Unreleased]: two entries under "Added".

Checked:
- The new test fails on main (1 failed, 2 passed) and passes with the script (3 passed).
- A wheel built from a copy of the package (version 0.6.1.dev0, outside the workspace):
  `uvx --find-links <dir> pi-agent-cli-lc==0.6.1.dev0 --help` exits 0. The published 0.6.0 in
  the same form exits 1 with "An executable named `pi-agent-cli-lc` is not provided by
  package `pi-agent-cli-lc`."
- `initialize` through that uvx command, with an empty home: the answer comes in 1.6 s;
  `authMethods` is still [] (the registry also needs a login method; not part of this change).
- The command of the README entry ran with the published 0.6.0 (`--from pi-agent-cli-lc --with
  "pi-agent-core-lc[deepseek]" pi-agent-cli`): the agent answered `initialize` and ended when
  stdin closed. It was not run inside Zed.
- Ruff check and format check pass. The temporary directories of the uv runs are removed.
@zy1233
zy1233 merged commit 7265c29 into main Oct 28, 2026
4 checks passed
@zy1233
zy1233 deleted the feat/pi-agent-cli-lc-script branch October 28, 2026 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant