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

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/2207
Author: @twsouthwick
Created: 8/3/2019
Status: Closed

Base: masterHead: extensions


📝 Commits (2)

  • 2e9683a Add initial extensions handling via optional packages
  • 4ed7d01 Merge remote-tracking branch 'upstream/master' into extensions

📊 Changes

53 files changed (+1120 additions, -183 deletions)

View changed files

📝 OpenConsole.sln (+48 -0)
src/cascadia/CascadiaPackage/Bundle.mapping.txt (+2 -0)
📝 src/cascadia/CascadiaPackage/CascadiaPackage.wapproj (+5 -2)
src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/App.xaml (+7 -0)
src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/App.xaml.cpp (+115 -0)
src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/App.xaml.h (+27 -0)
src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/Assets/LockScreenLogo.scale-200.png (+0 -0)
src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/Assets/SplashScreen.scale-200.png (+0 -0)
src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/Assets/Square150x150Logo.scale-200.png (+0 -0)
src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/Assets/Square44x44Logo.scale-200.png (+0 -0)
src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/Assets/Square44x44Logo.targetsize-24_altform-unplated.png (+0 -0)
src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/Assets/StoreLogo.png (+0 -0)
src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/Assets/Wide310x150Logo.scale-200.png (+0 -0)
src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/MainPage.xaml (+14 -0)
src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/MainPage.xaml.cpp (+27 -0)
src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/MainPage.xaml.h (+21 -0)
src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/Package.appxmanifest (+48 -0)
src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/Terminal.Plugin.AzureCloudShell.App.vcxproj (+106 -0)
src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/Terminal.Plugin.AzureCloudShell.App.vcxproj.filters (+50 -0)
src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/pch.cpp (+5 -0)

...and 33 more files

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/2207 **Author:** [@twsouthwick](https://github.com/twsouthwick) **Created:** 8/3/2019 **Status:** ❌ Closed **Base:** `master` ← **Head:** `extensions` --- ### 📝 Commits (2) - [`2e9683a`](https://github.com/microsoft/terminal/commit/2e9683a9ae771b6a9654810c3f83317d812c2330) Add initial extensions handling via optional packages - [`4ed7d01`](https://github.com/microsoft/terminal/commit/4ed7d01dad41659f5abaafc07f7d45acc249651e) Merge remote-tracking branch 'upstream/master' into extensions ### 📊 Changes **53 files changed** (+1120 additions, -183 deletions) <details> <summary>View changed files</summary> 📝 `OpenConsole.sln` (+48 -0) ➕ `src/cascadia/CascadiaPackage/Bundle.mapping.txt` (+2 -0) 📝 `src/cascadia/CascadiaPackage/CascadiaPackage.wapproj` (+5 -2) ➕ `src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/App.xaml` (+7 -0) ➕ `src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/App.xaml.cpp` (+115 -0) ➕ `src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/App.xaml.h` (+27 -0) ➕ `src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/Assets/LockScreenLogo.scale-200.png` (+0 -0) ➕ `src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/Assets/SplashScreen.scale-200.png` (+0 -0) ➕ `src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/Assets/Square150x150Logo.scale-200.png` (+0 -0) ➕ `src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/Assets/Square44x44Logo.scale-200.png` (+0 -0) ➕ `src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/Assets/Square44x44Logo.targetsize-24_altform-unplated.png` (+0 -0) ➕ `src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/Assets/StoreLogo.png` (+0 -0) ➕ `src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/Assets/Wide310x150Logo.scale-200.png` (+0 -0) ➕ `src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/MainPage.xaml` (+14 -0) ➕ `src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/MainPage.xaml.cpp` (+27 -0) ➕ `src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/MainPage.xaml.h` (+21 -0) ➕ `src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/Package.appxmanifest` (+48 -0) ➕ `src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/Terminal.Plugin.AzureCloudShell.App.vcxproj` (+106 -0) ➕ `src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/Terminal.Plugin.AzureCloudShell.App.vcxproj.filters` (+50 -0) ➕ `src/cascadia/Plugins/Terminal.Plugin.AzureCloudShell.App/pch.cpp` (+5 -0) _...and 33 more files_ </details> ### 📄 Description ## 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:05:46 +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#24854