Repository navigation
Description
Spike branch: davidfowl/ts-integration (bb3cd1289)
This issue tracks the follow-up work after the polyglot integration host spike.
The spike proved that Aspire can support integrations authored in TypeScript and other guest languages, and project them into guest AppHosts as first-class generated APIs. In particular, it established an end-to-end path where:
- the CLI resolves integration references from
aspire.config.json - guest-language integration dependencies are restored before startup
- the CLI writes integration host entries into the generated AppHost server config
- the AppHost server owns integration host lifetime
- the AppHost server gathers capabilities from external hosts and merges them into ATS/codegen
- runtime calls are dispatched back to the owning integration over JSON-RPC
- TypeScript integrations can opt into projection via
AspireExport(...)anddefineIntegration(...)
The spike also added the supporting design docs and playgrounds for this model:
docs/specs/polyglot-integrations.mddocs/specs/polyglot-apphost.mdplayground/TsIntegrationSpikeplayground/TsKafkaLib
What the spike established
At a design level, the winning model is:
- integrations are authored as normal language-native packages on top of generated Aspire hosting APIs
- unannotated integrations remain same-language free-function libraries
- annotated integrations are exported through a common capability schema
- the AppHost server owns integration lifetime uniformly across in-proc .NET integrations and out-of-proc hosts
- generated guest SDKs project exported capabilities into fluent builder methods regardless of consumer language
Architecture direction
The spike should move toward a more uniform end-state than the current split between “in-proc .NET integrations” and “external integration hosts”.
The intended model is:
- the AppHost server is the control plane for composition and integration dispatch
- the CLI, VS Code extension, and AppHost are clients around that server boundary
- DCP is a backend the AppHost server talks to over HTTP, not part of the integration model itself
- ATS and the generated Aspire hosting surface become the shared integration contract and standard library, rather than
Aspire.Hosting.dllbeing the defining boundary - every integration, including C# integrations, should converge on the same capability boundary
Long term, C# should move toward being just another integration host from the architectural point of view, even if the implementation keeps an in-proc path as a compatibility mechanism or optimization. In other words, in-proc assembly loading may remain an implementation detail, but it should not be the model the rest of the system is built around.
This also implies two primary RPC seams:
- AppHost ↔ AppHost server
- AppHost server ↔ integration hosts
That direction is broader than “polyglot support”. It is a move toward a uniform server-owned integration architecture where language becomes an implementation detail rather than the shape of the system.
What is still missing
This is still a spike, not a finished feature. The biggest gaps are:
- only
typescript/nodejscurrently hosts integrations end-to-end - TypeScript projection metadata is still hand-authored
- external integrations cannot yet contribute handle/DTO catalogs beyond existing ATS knowledge
aspire sdk dump/aspire sdk generatestill assume.csprojinputaspire addis still NuGet-centric and has no per-language registry story- diagnostics need more polish for partially supported or misconfigured integrations
- end-to-end automated coverage for multi-host / multi-language projection scenarios is still limited
- the current implementation still treats .NET integrations and guest-language integration hosts as different architectural shapes rather than different implementations of the same abstraction
Proposed follow-up work
-
Productize the TypeScript authoring story
- emit generated type-ref constants so authors do not hand-write projection type refs
- move toward signature/projection inference so metadata duplication is minimized
-
Validate the model with a second hosted language
- add
ILanguageSupport.GetIntegrationHostSpec()for another language, likely Python - run the same projection/dispatch flow end-to-end
- add
-
Improve CLI ergonomics for guest-language integration authors
- allow SDK dump/generate flows for guest-language integrations
- add a language-extensible package discovery/add story
-
Extend runtime projection
- allow external integrations to contribute handles and DTOs
- add stronger metadata validation and better failure diagnostics
-
Converge on a single integration-host abstraction
- treat the AppHost server as the single owner of integration lifetime and dispatch
- make .NET and guest-language integrations different implementations of the same model
- preserve in-proc loading only as an optimization or compatibility path, not as the architectural center of gravity
-
Add dedicated automated coverage
- multi-host projection
- cross-language capability projection
- runtime dispatch and callback flow
- startup / registration failure cases
- mixed scenarios involving both C# and guest-language integrations under the same server-owned model
Exit criteria
We should consider this area productized when:
- at least two guest languages can host integrations end-to-end
- TypeScript integrations no longer require hand-written projection type refs
- guest-language integration authors can inspect/generate SDK output with normal CLI flows
aspire addhas a language-extensible registry model- external integrations can contribute more than capability metadata
- there is solid E2E coverage for external capability projection and dispatch
- the AppHost server is clearly the uniform control plane for integration lifetime and dispatch
- .NET and guest-language integrations fit the same architectural abstraction, even if they do not use the same transport implementation internally
- failure modes produce actionable diagnostics

Activity
strue36 commentedon Apr 20, 2026
Will this support being able to reference a running AppHost from a language integration?
Consider the case where I have a series of test projects that take a handful of seconds to complete once the AppHost has started, but the AppHost takes minutes to start.
I want to be able to start the AppHost once and then pass a reference to each consumer, that is then able to do something like
I think that right now I can start to get there by wrapping aspire describe (provided I only have a single instance of the AppHost running), but I want to know whether you have plans to introduce wrappers for the CLI before I invest too much time into that.
davidfowl commentedon Apr 20, 2026
There's more on that here https://github.com/microsoft/aspire/blob/main/docs/specs/polyglot-apphost-testing.md
strue36 commentedon Apr 20, 2026
Thanks David. I did have a read through that earlier and saw this section
.NET
For .NET tests that want CLI-based testing (instead of
Aspire.Hosting.Testing):The bit that was unclear was if there are plans to be able to attach to an externally started AppHost instead of calling StartAsync. It seems like it should be possible with the CLI approach. I think the process would be easier if the output of aspire start
Output (JSON):
{ "appHostPath": "/path/to/MyApp.AppHost/MyApp.AppHost.csproj", "appHostPid": 12345, "cliPid": 12340, "dashboardUrl": "http://localhost:15000/login?t=abc123", "logFile": "/path/to/MyApp.AppHost/.aspire/logs/apphost.log" }was then usable in the other aspire commands such as describe with something like
and presumably that is what would then be usable in a mechanism that connected to an existing AppHost
davidfowl commentedon Apr 20, 2026
Today the cli can attach via path (not pid), so yes the APIs are not in there but we'd expose a way to target an existing apphost without explicitly starting it.
strue36 commentedon Apr 20, 2026
Great. Thanks
Add polyglot hosting integrations through ATS projection (#16110)
davidfowl commentedon Oct 10, 2026
The foundational TypeScript integration-host support landed in #16110. Closing this umbrella issue as superseded by #20873, which carries forward the remaining productization work and defines the next runtime scenario: unchanged shipped C# Redis plus unpublished Nuxt reworked for the ATS-native model, composing in one TS AppHost. Existing AppHost and integration compatibility is an explicit requirement. This closure does not mean every original exit criterion has been completed.