Skip to content

feat(addons): show the tool count of each add-on before install - #12898

Merged
mudler merged 1 commit into
masterfrom
feat/addon-tool-count
Oct 25, 2026
Merged

mudler merged 1 commit into
masterfrom
feat/addon-tool-count

Conversation

@mudler-agent

Copy link
Copy Markdown
Collaborator

What changes

A library entry now says what the add-on brings to chat before it is installed: "Adds a page" (already shown) and "Adds N tools" (new, singular "Adds 1 tool"). The line shows when the tool count is above zero, in three places: the featured cards of the first-run page, the Find add-ons tab, and the install dialog (the details of an entry before install). Installed add-ons keep their current text.

N is the number of chat tools in capabilities.tools of the manifest. Admin tools (capabilities.adminTools) are not chat tools and are not counted.

How

  • Index entries carry toolCount and tools, the same JSON names as the installed view. tools is capped at 32 names, like apps.MaxTools; toolCount stays the full number. An add-on without chat tools has neither field.
  • addonpkg catalog writes the fields from the verified manifest. A new addonpkg catalog-tools subcommand adds them to an existing index from addons/<id>/manifest.json in the repository, because the packaged artifacts are not needed to read a manifest. It changes no other field: no digest, artifact or policy line moved. gallery/addons/index.yaml was regenerated with it.
  • The catalog reader (catalog.Release) validates the hint (names are tool names, no duplicates, count not below the names listed, at most 32 names) and refuses it on a backend entry. The catalog search and details actions return the release as is, so the fields reach the UI.
  • UI: one helper (addedByEntry) feeds the existing addedByAddon path. New i18n keys card.addsTools_one and card.addsTools_other in all locales (English text, as for card.chatTools).
  • Docs: docs/content/features/addons.md and gallery/addons/README.md.

Tool counts in the regenerated index

add-on chat tools
tables 16 (its admin tool is not counted)
fine-tuning 8
quantization 6
voice, face, studio, talk 0 (no line)

Tests

  • pkg/addons/packaging: 138 specs pass (new: tables reports 16 tools and not the admin tool; fine-tuning 8, quantization 6, voice none; the 32-name cap keeps the full count; catalog-tools reproduces the committed index and is idempotent).
  • core/services/addons/catalog (with -tags auth): 80 specs pass (new: fields carried from the index to the listing and its JSON, absent when empty, cap with full count, malformed hints refused).
  • Also green with -tags auth: core/services/addons/..., pkg/addons/..., core/http/endpoints/addons/..., core/gallery/....
  • React UI: npm run test:unit 200 passed, 0 failed (new: the line is shown only when the count is above zero, the catalog adapter carries the fields, the English wording "Adds 16 tools" and "Adds 1 tool", locale key parity). npm run build succeeds.

Not run

  • Playwright e2e specs (npm run test:e2e). The existing specs assert the installed-view text, which did not change.
  • No image was built, published or signed.

The add-on cards, the Find add-ons tab and the install dialog said
"Adds a page" for a library entry but nothing about chat tools, so the
tools only showed once the add-on was installed.

The library index now carries toolCount and tools on each entry, with
the same names as the installed view. They come from capabilities.tools
of the manifest; admin tools are not chat tools and are not counted.
Tools is capped at 32 names and toolCount stays the full number. The
catalog reader validates the hint and refuses it on a backend entry.
addonpkg catalog writes the fields. The new catalog-tools subcommand adds
them to an existing index from addons/<id>/manifest.json, and leaves
every digest and artifact as it was.

The UI reads the fields through the same helper as the installed view and
shows "Adds N tools" when N is above zero.

Assisted-by: Claude:claude-sonnet-5-5 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
@mudler
mudler merged commit 6e32229 into master Oct 25, 2026
40 of 42 checks passed
@mudler
mudler deleted the feat/addon-tool-count branch October 25, 2026 18:13
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.

2 participants