[PR #2207] Add initial extensions handling via optional packages #24859

Open
opened 2026-01-31 09:05:47 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/2207

State: closed
Merged: No


Summary of the Pull Request

This adds extension support via optional packages, including moving the Azure connector to such a package. This does not enable 3rd party plugins (optional packages run as the same identity and in the same process), but provides some infrastructure that could be helpful for 3rd part plugins as well.

References

#555

PR Checklist

  • Closes #xxx
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

This adds a few interfaces to allow composing of sources for terminal connections and moves the Azure connection source to its own library that is brought in via an optional package. The interfaces added are:

  • ITerminalConnectionProvider: This can retrieve a connection factory by id and enumerate available factories
  • ITerminalConnectionFactory: This provides information of an available connection as well as allows for creation of an instance
  • TerminalConnectionStartupInfo: A class that contains information as to the initial start up state of a connection

A default AppConnectionProvider provides an implementation of ITerminalConnectionProvider that searches any optional packages and loads them via an exported function GetConnectionProvider that returns an ITerminalConnectionProvider. This could be expanded to include providers for all the default profiles so that nothing is hard coded but retrieved through a provider.

A caveat to loading optional packages is that the package must be signed by a valid certificate (can be a local dev), but without that it will fail. An error is written to the debug window to help diagnose that issue if it is encountered.

Validation Steps Performted

I did a variety of manual testing. The plugin is only available when the package is deployed, so I tried various permutations of running without, with, then without. If the plugin is removed, I've just had it load the EchoConnection since I wasn't sure if there was a better way of handling errors but I didn't want it to crash.

Feel free to say no if you have other plans to enable this, but if there's interest I'll respond to feedback.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/2207 **State:** closed **Merged:** No --- ## Summary of the Pull Request This adds extension support via optional packages, including moving the Azure connector to such a package. This does not enable 3rd party plugins (optional packages run as the same identity and in the same process), but provides some infrastructure that could be helpful for 3rd part plugins as well. ## References #555 ## PR Checklist * [ ] Closes #xxx * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Requires documentation to be updated * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx ## Detailed Description of the Pull Request / Additional comments This adds a few interfaces to allow composing of sources for terminal connections and moves the Azure connection source to its own library that is brought in via an optional package. The interfaces added are: - ITerminalConnectionProvider: This can retrieve a connection factory by id and enumerate available factories - ITerminalConnectionFactory: This provides information of an available connection as well as allows for creation of an instance - TerminalConnectionStartupInfo: A class that contains information as to the initial start up state of a connection A default `AppConnectionProvider` provides an implementation of `ITerminalConnectionProvider` that searches any optional packages and loads them via an exported function `GetConnectionProvider` that returns an `ITerminalConnectionProvider`. This could be expanded to include providers for all the default profiles so that nothing is hard coded but retrieved through a provider. A caveat to loading optional packages is that the package must be signed by a valid certificate (can be a local dev), but without that it will fail. An error is written to the debug window to help diagnose that issue if it is encountered. ## Validation Steps Performted I did a variety of manual testing. The plugin is only available when the package is deployed, so I tried various permutations of running without, with, then without. If the plugin is removed, I've just had it load the EchoConnection since I wasn't sure if there was a better way of handling errors but I didn't want it to crash. Feel free to say no if you have other plans to enable this, but if there's interest I'll respond to feedback.
claunia added the pull-request label 2026-01-31 09:05:47 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#24859