Skip to content

Add apt generator for available repo packages#207

Merged
lucieleblanc merged 1 commit into
mainfrom
oz-agent/APP-3505-add-apt-available-packages-generator
Apr 1, 2026
Merged

Add apt generator for available repo packages#207
lucieleblanc merged 1 commit into
mainfrom
oz-agent/APP-3505-add-apt-available-packages-generator

Conversation

@lucieleblanc
Copy link
Copy Markdown
Contributor

Summary

Add a new list_available_packages generator for apt-based package managers that suggests packages available from configured repositories using apt-cache pkgnames, rather than only installed packages.

Changes

  • command-signatures/src/generators/apt.rs: Add list_available_packages generator (uses apt-cache pkgnames) and register it in both apt_get_generators() and aptitude_generators()
  • command-signatures/json/apt-get.json: Update install subcommand to use list_available_packages instead of list_all_packages
  • command-signatures/json/aptitude.json: Same update for install subcommand

The existing list_all_packages generator (via dpkg-query) is retained for remove/purge subcommands where only installed packages are relevant.


Conversation: https://staging.warp.dev/conversation/ec0771ee-86a6-413c-8a30-8e6a893cc578
Run: https://oz.staging.warp.dev/runs/019d473b-73ec-7aa9-8fb2-cd5efefccc49
This PR was generated with Oz.

Add a new list_available_packages generator using 'apt-cache pkgnames'
to suggest packages available from configured repositories, not just
installed ones.

- Add list_available_packages generator to apt.rs for both apt-get and
  aptitude command families
- Update apt-get.json and aptitude.json install subcommands to use the
  new generator instead of list_all_packages (which only lists installed
  packages via dpkg-query)
- Keep list_all_packages for remove/purge subcommands where only
  installed packages are relevant

Co-Authored-By: Oz <oz-agent@warp.dev>
@linear
Copy link
Copy Markdown

linear Bot commented Apr 1, 2026

APP-3505 Add apt generator for available repo packages

Spec + generator exist (list_all_packages via dpkg-query). Current generator only lists installed packages.

Remaining work: Add generator for available repo packages (e.g. via apt-cache pkgnames).

Copy link
Copy Markdown
Contributor Author

Generator Validation Screenshots

Tested the list_available_packages generator (backed by apt-cache pkgnames) on a local Warp build with this branch's changes patched in.

apt-get install completions

The completions dropdown shows available packages from the system's package cache, each labeled as "package":

apt-get install completions

aptitude install completions

Same generator works for aptitude install:

aptitude install completions

Both generators are working correctly — the completions dropdown appears with available package names sorted alphabetically when pressing Tab after install .

@lucieleblanc lucieleblanc marked this pull request as ready for review April 1, 2026 17:27
@lucieleblanc lucieleblanc merged commit 8e6a92c into main Apr 1, 2026
3 checks passed
@lucieleblanc lucieleblanc deleted the oz-agent/APP-3505-add-apt-available-packages-generator branch April 1, 2026 20:38
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.

3 participants