Skip to content

cli: add feynman extensions to list project and package extensions - #191

Closed
Dünya Baradari (Dunya-8a) wants to merge 1 commit into
companion-inc:mainfrom
Dunya-8a:feat/extensions-command
Closed

cli: add feynman extensions to list project and package extensions#191
Dünya Baradari (Dunya-8a) wants to merge 1 commit into
companion-inc:mainfrom
Dunya-8a:feat/extensions-command

Conversation

@Dunya-8a

@Dunya-8a Dünya Baradari (Dunya-8a) commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a read-only feynman extensions command that lists:

  • Project extensions — loose .ts/.js files under ./extensions
  • From packages — installed Pi packages that declare pi.extensions

It mirrors feynman packages list. Enumeration reuses buildConnectorResources through a new summarizeExtensions() helper, so the CLI and the workbench stay in sync (single source of truth).

Also clarifies the feynman update help text: extensions are provided by packages and update with them; there is no separate --extensions flag.

Relates to #187.

Why

Addresses the discovery/help gap behind #187. feynman update --extensions failed with a bare "Unknown option" and there was no way to see what extensions are active or understand how they relate to packages. This adds the missing discovery surface and makes the packages↔extensions relationship explicit in help. (#189 separately improves the raw unknown-flag error message.)

Example

◆ Project extensions
  my-tool  extensions/my-tool.ts

◆ From packages
  pi-web-access  2 extensions  (npm:pi-web-access)
  Extensions are provided by packages and update with them: feynman update [package].

Empty projects render clean "No project extensions found" / "No installed packages provide extensions" states.

Changes

  • src/workbench/package-resources.ts — new exported summarizeExtensions(workingDir).
  • src/cli.tshandleExtensionsCommand + dispatch wiring.
  • metadata/commands.mjs — registered extensions command, added help line, clarified update description.
  • tests/summarize-extensions.test.ts — covers project + package + nested-exclusion + empty cases.

Testing

  • npm run typecheck — clean
  • npm test — 587/587 pass (2 new)
  • Drove feynman extensions end-to-end on populated and empty projects.

Notes

  • Branched off upstream/main; independent of cli: hint at feynman help on unrecognized flags #189 (the --extensions error-hint fix). No file overlap, so the two can merge in either order.
  • Read-only command; does not add any --extensions flag (extensions have no independent update lifecycle — they ride along with packages).

Adds a read-only `feynman extensions` command that lists project-local
Pi extensions (loose .ts/.js under ./extensions) and package-provided
extensions (installed Pi packages declaring pi.extensions), mirroring
`feynman packages list`. Enumeration reuses buildConnectorResources via a
new summarizeExtensions() helper so the CLI and workbench stay in sync.

Also clarifies the `feynman update` help text: extensions are provided by
packages and update with them; there is no separate --extensions flag.

Addresses the discovery/help gap behind companion-inc#187.
@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

Dünya Baradari (@Dunya-8a) is attempting to deploy a commit to the Companion Team on Vercel.

A member of the Team first needs to authorize it.

@advaitpaliwal

Copy link
Copy Markdown
Contributor

Closing as rejected for product scope. Issue #187 is the narrower update/help defect; #192 already adds the unknown-option help hint and documents that extensions update with their packages. This PR adds a new generic extension-inventory command and workbench resource surface, which is broader than the proven research-loop need.

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