Repository navigation
feat(cli): add the console script pi-agent-cli-lc and document the Zed custom agent - #45
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[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:
authMethodsis still[], and Zed ignores registry entries that have onlyuvx.Evidence
uvx pi-agent-cli-lc==0.6.0 --helpexits 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 --helpexits 0 and prints the usage.The new test:
3 passed.initializeover stdio through that command, empty home: the agent answers in 1.6 s.--from pi-agent-cli-lc --with "pi-agent-core-lc[deepseek]" pi-agent-cli) ran with the published 0.6.0: the agent answeredinitializeand ended when stdin closed. It was not run inside Zed.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-clistays, so nobody who uses it is affected.