diff --git a/AGENTS.md b/AGENTS.md
index 64cf024..6ea5a80 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -12,8 +12,25 @@ generates live [LikeC4](https://likec4.dev) architecture diagrams from the Aspir
- The `AspireC4.Hosting` library (the Aspire integration).
- An incremental Roslyn source generator (`AspireC4.SourceGenerators`) that validates registry constants and
`.c4` DSL files against `.WithTag()`, `.WithKind()`, `.WithLikeC4Group()`, and `.WithMetadata()` call sites.
+- An optional Entity Framework Core ER diagram: the `AspireC4.Hosting.EntityFrameworkCore` AppHost library,
+ the analyzer-only `AspireC4.EntityFrameworkCore` package and the `AspireC4.EntityFrameworkCore.ModelDump`
+ build-time tool. It is **additive** — `WithEntityFrameworkDiagram()` extends the builder `AddAspireC4()`
+ returns, so consumers run the architecture diagram alone or both diagrams, never the ER diagram alone.
- A `TestAppHost` sample AppHost and a TypeScript AppHost sample.
+### Packages and target frameworks
+
+| Package | Project | Target framework | Shipped as |
+|---|---|---|---|
+| `AspireC4.Hosting` | `src/src/AspireC4/` | `net10.0` | `lib/net10.0/` + `analyzers/dotnet/cs/` + `build/` |
+| `AspireC4.Hosting.EntityFrameworkCore` | `src/src/EntityFrameworkCore/` | `net10.0` | `lib/net10.0/` |
+| `AspireC4.EntityFrameworkCore` | `src/src/EntityFrameworkCore.Analyzers/` | `netstandard2.0` | `analyzers/dotnet/cs/` only (no runtime assembly) |
+| `AspireC4.EntityFrameworkCore.ModelDump` | `src/src/EntityFrameworkCore.ModelDump/` | `net10.0` | `tools/` + `build/` |
+
+AppHosts therefore target `net10.0`. `src/Directory.Build.props` owns the framework; the two Roslyn
+projects override it to `netstandard2.0`. The packed content is pinned to `lib/net10.0/...` in
+`.config/purview-build.json`, so a framework change has to update that manifest too.
+
### Layout
| Path | Purpose |
@@ -44,6 +61,15 @@ one about its own package, and update it when that package's public API or setup
link the root `README.md` into a project with `Link="Sdk/README.md"`, which would override it. Use
absolute URLs in package READMEs, because relative links do not resolve on nuget.org.
+### Documentation screenshots
+
+Screenshots embedded in the root `README.md`, the wiki pages under `docs/wiki/` and the package READMEs
+live in `docs/images/screenshots/`; its own `README.md` records provenance, consumers and how to refresh
+them. Use a relative path from the root README, and absolute `raw.githubusercontent.com` URLs from
+`docs/wiki/` (published from a separate repository) and from package READMEs (nuget.org). Skills under
+`skills/` install on their own, so they never embed these files — name the diagram's export folder
+(`./.aspirec4/images/`) in prose instead.
+
## Toolchain
| Tool | Purpose | Version source |
@@ -122,8 +148,9 @@ just erd-svg # Render an emitted Mermaid .mmd to SVG in a one-shot
```
`erd-check` defaults to the model at `src/src/TestAppHost/.aspirec4/erd/schema.gen.json`, written by
-`dotnet run --project src/src/TestAppHost`. Requires `bunx playwright install chromium` once. See the
-`erd-viewer` skill in `.github/skills/` before changing the viewer or its checks.
+`dotnet run --project src/src/TestAppHost`. Requires `bunx playwright install chromium` once. The checks
+live in `scripts/erd-viewer-check.mts` and `scripts/erd-vendor.mts`; read them, and the viewer under
+`src/src/EntityFrameworkCore/Assets/viewer/`, before changing either.
### Other
@@ -290,8 +317,9 @@ headline.
## LikeC4 DSL work
-When writing or validating `.c4`/`.likec4` files, load `.agents/skills/likec4-dsl/SKILL.md` and its
-`references/*.md`. Key contracts:
+When writing or validating `.c4`/`.likec4` files, load the `likec4-dsl` skill
+(`.agents/skills/likec4-dsl/SKILL.md` plus its `references/*.md`) — install it first if it is missing, since
+`.agents/skills/` is gitignored. Key contracts:
- Validate with `likec4 validate` (never `check`/`lint`/`build`), prefer
`likec4 validate --json --no-layout --file `.
@@ -305,8 +333,8 @@ When writing or validating `.c4`/`.likec4` files, load `.agents/skills/likec4-ds
(`.github/workflows/release.yml`, delegating to the `purview-dev/build` reusable `purview-release.yml` with
`release-mode: NuGet`) reads and validates it, builds, tests, packs, builds release notes from conventional
commits, and creates a GitHub Release with the `.nupkg`/`.snupkg`. It does **not** push to nuget.org.
-- `.github/skills/release/SKILL.md` reflects the current pipeline correctly — keep it in sync when the release
- process changes. Prefer `just pipeline-release` / `pipeline-local-release`.
+- [Release Flow](docs/wiki/Release-Flow.md) and `.config/purview-build.json` describe the current pipeline —
+ keep both in sync when the release process changes. Prefer `just pipeline-release` / `pipeline-local-release`.
- Roslyn diagnostics (`ASPIREC4001`–`ASPIREC4007`) are tracked in
`src/src/SourceGenerators/AnalyzerReleases.Shipped.md` / `AnalyzerReleases.Unshipped.md`. Move unshipped rows into
a new `## Release ` shipped section when cutting a release that adds, removes, or changes a rule. See
@@ -314,14 +342,16 @@ When writing or validating `.c4`/`.likec4` files, load `.agents/skills/likec4-ds
## Skills
-Relevant bundled skills in `.agents/skills/`:
+Skills installed from other repositories live in `.agents/skills/` (gitignored); `skills-lock.json`
+records what is installed. The families:
-- `likec4-dsl` — LikeC4 DSL/CLI work.
-- `project-placement-defaults`, `sdk-configuration-reference`, `sdk-project-behavior-and-detection` —
- Purview.BuildSdk behaviour and configuration.
-- `source-generator-codewriter-modernization`, `source-generator-testing`, `tunit-test-authoring` —
- Roslyn generator work and tests.
-- `telemetry-sourcegenerator-*` — Purview.Telemetry.SourceGenerator usage (library telemetry).
+- `purview-architecture*`, `purview-engineering-principles`, `purview-testing-conventions` — architecture
+ and test conventions.
+- `purview-buildsdk-*` — Purview.BuildSdk behaviour and configuration.
+- `purview-containers-*` — the Purview.Containers packages this library consumes.
+- `purview-sourcegenerator-*` — Roslyn generator authoring, packaging and tests.
+- `purview-telemetry*` — Purview.Telemetry.SourceGenerator usage (library telemetry).
+- `purview-persistence` — the EF Core conventions the ER diagram is drawn from.
- Agents and prompts live in `.agents/agents/` and `.agents/prompts/`.
## Agent skills
@@ -337,8 +367,8 @@ own skills are never installed into it - that would leave two copies to drift ap
their authored path, `skills//SKILL.md`.
`.github/skills/` is a third, separate place: skills about working *in* this repository, which would
-be meaningless to a consumer who installed the published set. `release` and `erd-viewer` live there.
-A skill that tells you how to run this repo's own tooling belongs in `.github/skills/`, never in
+be meaningless to a consumer who installed the published set. A skill that tells you how to run this
+repo's own tooling belongs in `.github/skills/`, never in
`skills/` - `SkillTests` requires everything under `skills/` to carry the `purview-aspirec4` prefix
because those names land in a directory shared with every skill a developer has installed.
@@ -348,9 +378,10 @@ npx skills add purview-dev/aspirec4
| Skill | Answers |
| -- | -- |
-| `skills/purview-aspirec4-quickstart/` | installing, `AddAspireC4`, what happens on startup, Docker sidecar versus local CLI |
+| `skills/purview-aspirec4-quickstart/` | installing, `AddAspireC4`, what happens on startup, Docker sidecar versus local CLI, and when to add the ER diagram as well |
| `skills/purview-aspirec4-configuration/` | every `AspireC4DiagramOptions` property and its fluent method |
| `skills/purview-aspirec4-resources/` | `WithLikeC4Details`, `WithLikeC4Reference`, `WithLikeC4Group`, and exclusion |
+| `skills/purview-aspirec4-entityframework/` | `WithEntityFrameworkDiagram`, the three model-discovery sources, renderers, domain types, and ER image export |
| `skills/purview-aspirec4-validation/` | the `[LikeC4Registry]` class, severity levels, and the `ASPIREC4xxx` diagnostics |
Every skill carries the `purview-aspirec4` prefix. Skills install into one flat directory per agent,
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index cd36fe2..f3d7ce3 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -261,6 +261,14 @@ config.Item("AppHost:BrowserToken").Returns("value");
|---|---|
| `AspireC4.UnitTests` | `LikeC4ModelBuilder`, `LikeC4DslGenerator`, annotations, options — no Docker required |
| `AspireC4.IntegrationTests` | Full Aspire lifecycle: container startup, file generation, endpoint availability |
+| `EntityFrameworkCore.UnitTests` | d2 model builder, d2 DSL generator and descriptor loader — no Docker required |
+| `EntityFrameworkCore.Analyzers.UnitTests` | EF model generator, plus the generator→assembly→AppHost round-trip |
+| `SourceGenerators.UnitTests` | The registry/DSL strict-validation generator |
+| `Repository.UnitTests` | Repository-level rules, including the authored skills in `skills/` |
+
+Every project targets `net10.0` except the two Roslyn components (`SourceGenerators` and
+`EntityFrameworkCore.Analyzers`), which target `netstandard2.0`. The framework is set once in
+`src/Directory.Build.props`, which is also where the `Aspire.Hosting.AspireC4` namespace prefix lives.
Integration tests require Docker to be running. They pull `ghcr.io/likec4/likec4` on first run.
diff --git a/README.md b/README.md
index 293a1df..f1d4fc8 100644
--- a/README.md
+++ b/README.md
@@ -16,9 +16,40 @@
Each package ships its own README on NuGet; this document is the complete reference.
+### Use one diagram or both
+
+`AspireC4.Hosting` is the **base** package: it is what registers AspireC4, generates the LikeC4
+architecture diagram and owns the dashboard integration. Everything else hangs off it.
+
+- **Architecture only** (the common case): install `AspireC4.Hosting` and call `AddAspireC4()`.
+- **Architecture and ER diagram**: additionally install `AspireC4.Hosting.EntityFrameworkCore` and call
+ `.WithEntityFrameworkDiagram()` on the builder `AddAspireC4()` returns. `WithEntityFrameworkDiagram()`
+ is an extension on `IResourceBuilder`, so the architecture diagram is always present
+ — the ER diagram is additive, never a replacement.
+- **ER diagram at full fidelity**: optionally add `AspireC4.EntityFrameworkCore` (to the project that
+ declares the `DbContext`) and/or `AspireC4.EntityFrameworkCore.ModelDump` (to the project that owns
+ the EF Core provider). Both are opt-in by package reference alone.
+
+The same split applies to dependencies: the ER diagram needs the projects that own your `DbContext`
+types to be registered with `AddProject(...)`.
+
+### Target frameworks
+
+| Package | Target framework | Shipped as |
+| --- | --- | --- |
+| `AspireC4.Hosting` | `net10.0` | `lib/net10.0/` library |
+| `AspireC4.Hosting.EntityFrameworkCore` | `net10.0` | `lib/net10.0/` library |
+| `AspireC4.EntityFrameworkCore` | `netstandard2.0` | `analyzers/dotnet/cs/` — analyzer-only, no runtime assembly |
+| `AspireC4.EntityFrameworkCore.ModelDump` | `net10.0` | `tools/` — a build-time tool invoked by MSBuild |
+
+The AppHost consumes the two libraries, so an AppHost must target **`net10.0`**. The analyzer package is
+`netstandard2.0` so it loads into any compiler, and it adds no assembly to your output; the model dump is
+a `net10.0` tool run by the build, so the build machine needs a .NET 10 runtime.
+
## Prerequisites
-- **.NET 8 or later**.
+- **.NET 10 SDK or later.** Every shipping package targets `net10.0`, and an Aspire 13.5 AppHost
+ targets `net10.0` too.
- **Aspire 13.5.3 or later**. Aspire AppHost projects must reference both the AppHost SDK and
`Aspire.Hosting.AppHost`.
- **Docker** is used by default to run the LikeC4 sidecar container.
@@ -63,6 +94,20 @@ This writes `./.aspirec4/likec4/model.gen.c4`, starts the LikeC4 server, and ref
> (`./likec4/gen/`, `./erd/gen/`) and the flat `aspirec4` / `aspirec4-er` names. See
> [Upgrading from before 13.6](#upgrading-from-before-136).
+## Screenshots
+
+Both are captured from the sample AppHost in this repository (`src/src/TestAppHost`) and stored in
+[`docs/images/screenshots/`](docs/images/screenshots/), so the links below stay valid however often the
+diagrams are regenerated. Run `dotnet run --project src/src/TestAppHost` to refresh them.
+
+| Architecture diagram (`AddAspireC4()`) | ER diagram (`WithEntityFrameworkDiagram()`) |
+| --- | --- |
+|  |  |
+
+Every diagram also exports its views on startup, to `./.aspirec4/images/` beside the AppHost — see
+[Export the views as images](#export-the-views-as-images). Those exported files are the simplest way to
+add your own screenshots to a pull request, a wiki or a design document.
+
## Configuration
Configure the diagram through `AspireC4DiagramOptions`:
@@ -268,11 +313,16 @@ Only tags, links, metadata, relationships and nested elements are applied — Li
nothing else, so your project stays the single source of each element's title, technology, description and
icon. See [Generated Output](docs/wiki/Generated-Output.md) for the details.
-## Entity Framework Core ER diagrams (d2)
+## Entity Framework Core ER diagrams
+
+This is an **optional second diagram** on top of the architecture one: `AddAspireC4()` is always required,
+and `.WithEntityFrameworkDiagram()` adds the ER diagram to it. Install nothing else and you still get the
+architecture diagram; install this only where you want the schema view too.
-`AspireC4.Hosting.EntityFrameworkCore` adds a second, complementary diagram: a live
-[d2](https://d2lang.com) `sql_table` ER diagram generated from your Entity Framework Core `DbContext`
-types, hosted alongside the architecture diagram and linked from it.
+`AspireC4.Hosting.EntityFrameworkCore` adds a live ER diagram generated from your Entity Framework Core
+`DbContext` types, hosted alongside the architecture diagram and linked from it. The default `Interactive`
+renderer draws a browser viewer; `Mermaid`, `Dbml` and `D2` emit text formats instead (see
+[Renderers](#renderers)).
The AppHost package is all that is required. `WithEntityFrameworkDiagram()` finds every associated
`DbContext` automatically — reading a build-time dump or a source-generated descriptor where a project
diff --git a/docs/images/screenshots/README.md b/docs/images/screenshots/README.md
new file mode 100644
index 0000000..4889da0
--- /dev/null
+++ b/docs/images/screenshots/README.md
@@ -0,0 +1,39 @@
+# Screenshots
+
+The images the READMEs and wiki pages embed. They live here — not in the sample's generated output —
+so a documentation link never breaks when a diagram is regenerated.
+
+| File | Shows | Used by |
+| --- | --- | --- |
+| `architecture-diagram.png` | the LikeC4 architecture diagram generated by `AddAspireC4()` for the sample AppHost, with a group, relationships and per-resource technologies | root `README.md`, `docs/wiki/Home.md`, `src/src/AspireC4/README.md` |
+| `entity-framework-er-diagram.png` | the interactive ER diagram from `WithEntityFrameworkDiagram()`, one group per `DbContext`, key badges and relationship edges | root `README.md`, `docs/wiki/Home.md`, `docs/wiki/Entity-Framework-Diagrams.md`, `src/src/EntityFrameworkCore/README.md` |
+
+## Refreshing them
+
+Both are captured from the sample AppHost at `src/src/TestAppHost`:
+
+```sh
+dotnet run --project src/src/TestAppHost
+```
+
+That run exports the architecture view as one PNG per view (`architecture-index.png`, …) and the ER diagram
+as `schema.svg` / `schema.png`, which is the d2 render. The image used here is the **interactive viewer**
+instead: capture it with the viewer's own **Save as PNG** button, or turn on `UseViewerFidelityExport` to
+have the AppHost produce the identical file. Copy whichever you want over the file here, keeping the name
+above so no documentation link has to change.
+
+If a file has to be renamed, update every reference. The paths appear in:
+
+- `README.md`
+- `docs/wiki/Home.md`
+- `docs/wiki/Entity-Framework-Diagrams.md`
+- `src/src/AspireC4/README.md`
+- `src/src/EntityFrameworkCore/README.md`
+
+## Rules
+
+- **Relative links** from the root `README.md` (`docs/images/screenshots/`).
+- **Absolute `raw.githubusercontent.com` URLs** from `docs/wiki/*.md`, because the wiki is published from a
+ separate repository, and from package READMEs, because relative links do not resolve on nuget.org.
+- Skills under `skills/` are installed on their own, so they never embed these files — name the export
+ folder (`./.aspirec4/images/`) in prose instead.
diff --git a/docs/images/screenshots/architecture-diagram.png b/docs/images/screenshots/architecture-diagram.png
new file mode 100644
index 0000000..c887bee
Binary files /dev/null and b/docs/images/screenshots/architecture-diagram.png differ
diff --git a/docs/images/screenshots/entity-framework-er-diagram.png b/docs/images/screenshots/entity-framework-er-diagram.png
new file mode 100644
index 0000000..ac0ee3d
Binary files /dev/null and b/docs/images/screenshots/entity-framework-er-diagram.png differ
diff --git a/docs/wiki/Contributing.md b/docs/wiki/Contributing.md
index c020c80..2648cde 100644
--- a/docs/wiki/Contributing.md
+++ b/docs/wiki/Contributing.md
@@ -154,6 +154,10 @@ Fix: Correct HMR port fallback on Windows.
All tests in this repository **must use [TUnit](https://github.com/thomhurst/TUnit)**. Do not use xUnit, NUnit, or MSTest. Test projects declare just ``; the SDK (Purview.BuildSdk) wires TUnit, TUnit.Mocks, and Bogus into them automatically.
+Every project targets `net10.0` except the two Roslyn components (`SourceGenerators` and
+`EntityFrameworkCore.Analyzers`), which target `netstandard2.0`. The framework is set once in
+`src/Directory.Build.props`.
+
```csharp
[Test]
public async Task Something_Should_DoX()
@@ -173,6 +177,10 @@ Mocking uses TUnit.Mocks (`.Returns(...)` API); NSubstitute is not referenced.
|---|---|
| `AspireC4.UnitTests` | `LikeC4ModelBuilder`, `LikeC4DslGenerator`, annotations, options — no Docker required |
| `AspireC4.IntegrationTests` | Full Aspire lifecycle: container startup, file generation, endpoint availability |
+| `EntityFrameworkCore.UnitTests` | d2 model builder, d2 DSL generator and descriptor loader — no Docker required |
+| `EntityFrameworkCore.Analyzers.UnitTests` | EF model generator, plus the generator→assembly→AppHost round-trip |
+| `SourceGenerators.UnitTests` | The registry/DSL strict-validation generator |
+| `Repository.UnitTests` | Repository-level rules, including the authored skills in `skills/` |
Integration tests require Docker to be running. They pull `ghcr.io/likec4/likec4` on first run.
diff --git a/docs/wiki/Dashboard-Integration.md b/docs/wiki/Dashboard-Integration.md
index 8894149..88cc510 100644
--- a/docs/wiki/Dashboard-Integration.md
+++ b/docs/wiki/Dashboard-Integration.md
@@ -57,4 +57,5 @@ HMR keeps the diagram up to date in the browser as the file regenerates. The HMR
## Next pages
- [Generated Output](Generated-Output.md)
+- [Entity Framework Core ER Diagrams](Entity-Framework-Diagrams.md)
- [Configuration](Configuration.md)
\ No newline at end of file
diff --git a/docs/wiki/Entity-Framework-Diagrams.md b/docs/wiki/Entity-Framework-Diagrams.md
new file mode 100644
index 0000000..380e4c9
--- /dev/null
+++ b/docs/wiki/Entity-Framework-Diagrams.md
@@ -0,0 +1,233 @@
+# Entity Framework Core ER Diagrams
+
+`AspireC4.Hosting.EntityFrameworkCore` adds a **second, optional diagram** to AspireC4: a live ER diagram
+of your Entity Framework Core `DbContext` types, hosted beside the architecture diagram and linked from
+it.
+
+It is **additive** — `AddAspireC4()` is always the base, and `WithEntityFrameworkDiagram()` adds the ER
+diagram to the builder it returns. You can run the architecture diagram on its own and never install this
+package; there is no way to run the ER diagram without the architecture diagram.
+
+
+
+## Packages and target frameworks
+
+| Package | Target framework | Add to | Why |
+| --- | --- | --- | --- |
+| `AspireC4.Hosting` | `net10.0` | the AppHost | the architecture diagram this one hangs off. Required first |
+| `AspireC4.Hosting.EntityFrameworkCore` | `net10.0` | the AppHost | the ER diagram itself |
+| `AspireC4.EntityFrameworkCore` | `netstandard2.0` (analyzer-only) | a project **you own** that declares a `DbContext` | captures fluent `OnModelCreating` configuration |
+| `AspireC4.EntityFrameworkCore.ModelDump` | `net10.0` (build-time tool) | the project that owns the EF Core **provider** and a design-time factory | the authoritative model, composite foreign keys included |
+
+Both libraries target `net10.0`, so the AppHost must too. The analyzer package is `netstandard2.0` and
+ships only under `analyzers/dotnet/cs/`: it adds no runtime assembly, so it works whatever framework the
+owning project targets. The dump tool runs as `dotnet .dll` from an MSBuild `Exec`, so the build
+machine needs a .NET 10 runtime.
+
+## Enabling it
+
+### 1. Add the package to the AppHost
+
+```bash
+dotnet add package AspireC4.Hosting.EntityFrameworkCore
+```
+
+### 2. Register the projects that own your `DbContext` types
+
+The diagram is built from **Aspire project resources**. Every project added with
+`AddProject(...)` is scanned for `DbContext` types, including contexts that live in class
+libraries the project references. A project that is only a ``, or that runs as a
+container or executable, is not scanned.
+
+### 3. Call `WithEntityFrameworkDiagram()`
+
+```csharp
+var builder = DistributedApplication.CreateBuilder(args);
+
+builder.AddAspireC4()
+ .WithEntityFrameworkDiagram();
+
+builder.AddProject("orders-api");
+
+builder.Build().Run();
+```
+
+Run the AppHost. The dashboard shows both diagrams under a shared `aspirec4` parent row, each project that
+contributed a context gets an **ER Diagram** link, and the project's element in the architecture diagram
+gets one too. Output is written to `./.aspirec4/erd/` beside the AppHost.
+
+The model is read from each project's **build output** (`bin/`), so a project must have been built before
+the AppHost starts. Building the AppHost builds its referenced projects, so normally you do not need to do
+anything.
+
+## How the model is read
+
+Each context is recovered from the best source available, and the diagram records which one was used:
+
+| Source | When | Fidelity |
+| --- | --- | --- |
+| **Dump** | the project, or one it references, references `AspireC4.EntityFrameworkCore.ModelDump` | `Full` — the real EF model, value converters and composite foreign keys included |
+| **Descriptor** | the project references the analyzer-only `AspireC4.EntityFrameworkCore` package | `Full` — includes fluent `OnModelCreating` configuration |
+| **Metadata** | otherwise | `Approximate` — conventions and data annotations only |
+
+The metadata reader opens the built assembly with a reflection-only load context, so no code runs. It
+cannot see `OnModelCreating` — a method body is absent from metadata — so a project without a package
+still appears, but fluent renames, default schemas and `Ignore` calls do not. A shared or third-party
+assembly you cannot instrument contributes at this fidelity.
+
+Every context carries its fidelity in the diagram, so an approximate model is never mistaken for a
+complete one. When the same context reaches the diagram through several projects, the higher-fidelity
+description wins.
+
+### The build-time dump (opt-in)
+
+Reference `AspireC4.EntityFrameworkCore.ModelDump` from the project that owns the EF Core provider; that
+reference **is** the opt-in. After every build the tool builds each context's real `IModel` through its
+`IDesignTimeDbContextFactory` and writes the diagram contract to `obj/aspirec4/ef/`. That directory is
+never copied to `bin/` or `publish/` and is gitignored, so the dump has no deployment footprint. The
+AppHost reads it from that project and every project it references, and falls back when it is missing or
+older than the built assembly.
+
+Set `` when the design-time factory needs one to build its options —
+the model is never opened, so any syntactically valid value works. A dump failure never fails the build.
+
+## Choosing which contexts appear
+
+By default every project resource is scanned. To narrow that down:
+
+```csharp
+builder.AddAspireC4()
+ .WithEntityFrameworkDiagram(configure: options => options
+ .WithProjectOptInOnly() // only projects marked below
+ .WithExcludedContexts("IdentityDbContext")); // short or fully-qualified name
+
+builder.AddProject("orders-api")
+ .WithEntityFrameworkModel(options => options
+ .WithIncludedContexts("OrdersDbContext")); // per-project filter
+
+builder.AddProject("billing-api")
+ .WithEntityFrameworkModel(label: "Billing"); // label the project's group
+```
+
+Names match case-insensitively and an exclusion always wins over an inclusion. This is how a context
+shared by several projects — an `IdentityDbContext` in a common library nobody owns — is kept out without
+editing that library.
+
+## Renderers
+
+| `Renderer` | Output | Use it for |
+| --- | --- | --- |
+| `Interactive` *(default)* | `.json` + browser viewer | exploring the schema: search, column-level edges, crow's-foot cardinality, PNG/SVG export |
+| `Mermaid` | `.mmd` + preview | pasting into GitHub, Azure DevOps or a wiki |
+| `Dbml` | `.dbml` | dbdiagram.io and other DBML tooling |
+| `D2` | `.d2` + a live d2 sidecar | a live d2 view |
+
+Every text format is a lossy projection of the model; only the interactive renderer consumes the
+descriptor directly, which is why it is the default.
+
+The interactive and Mermaid viewers are static files served by a small `nginx` sidecar, so the dashboard
+has a real URL to link to. Set `UseViewerServer = false` where there is no container runtime: the diagram
+is still generated and the dashboard offers a command that opens it locally.
+
+## Configuration
+
+Set options in the `configure` callback or in the `AspireC4:EntityFramework` configuration section.
+
+| Property | Default | Description |
+| --- | --- | --- |
+| `Renderer` | `Interactive` | `Interactive`, `Mermaid`, `Dbml` or `D2` |
+| `Title` | `null` | title shown in the diagram |
+| `DiscoverAllProjects` | `true` | scan every project resource. `WithProjectOptInOnly()` restricts it |
+| `IncludedContexts` / `ExcludedContexts` | empty | `WithIncludedContexts(...)` / `WithExcludedContexts(...)` |
+| `OutputDirectory` | `"./.aspirec4/erd/"` | where generated files are written, relative to the AppHost |
+| `FileName` | `"schema.gen"` | generated file name without extension |
+| `DomainTypeDisplay` | `DomainTypeFirst` | how a value object or enum shows beside the store type: `AssetId (guid)`, `ActorType (int, enum)` |
+| `ShowNullability` | `true` | mark nullable columns with `?` |
+| `GroupBySchema` / `GroupByContext` | `true` | group tables by database schema, and by `DbContext` when there are several |
+| `UseSubgraphs` | `true` | Mermaid only: one `subgraph` per `DbContext` (Mermaid 11.17+) |
+| `LayoutEngine` | `Elk` | D2 only: `Dagre`, `Elk` or `Tala` |
+| `UseViewerServer` | `true` | serve the viewer from a container |
+| `HideFromDashboard` | `false` | hide the diagram's sidecar from the dashboard |
+| `ExportImages` | `true` | write `schema.svg` / `schema.png` to `./.aspirec4/images/` when the model changes |
+| `ImageFormats` | `{Svg, Png}` | `WithImageExport(...)`, or `WithoutImageExport()` to turn export off |
+| `UseViewerFidelityExport` | `false` | render images through the interactive viewer in a headless browser. Pulls a ~3.7 GB Playwright image |
+| `D2Command` | `null` | a local `d2` binary for image export, instead of the container |
+| `ContainerRuntimeCommand` | `"docker"` | set to `podman` where Aspire uses Podman |
+
+> [!IMPORTANT]
+> Set `OutputDirectory` in the callback rather than in configuration. The sidecar's bind mount is fixed
+> when the AppHost builder runs, so a value from configuration changes where files are written but not
+> what the sidecar serves.
+
+### Without a container runtime
+
+```csharp
+// Generate the files without starting a viewer container, and render images with a local d2
+builder.AddAspireC4()
+ .WithEntityFrameworkDiagram(configure: options =>
+ {
+ options.UseViewerServer = false; // the dashboard offers an "open locally" command instead
+ options.D2Command = "d2"; // or call options.WithoutImageExport()
+ });
+
+// Or, with the D2 renderer, replace the d2 container with a local binary
+builder.AddAspireC4()
+ .WithEntityFrameworkDiagram(configure: options => options.Renderer = ErdRenderer.D2)
+ .WithLocalD2CLI(); // must come after WithEntityFrameworkDiagram
+```
+
+d2 is a Go binary; install it with scoop, Homebrew, `install.sh` or `go install`.
+
+## Exporting images
+
+Both diagrams export to **one folder**, `./.aspirec4/images/`, so there is a single place to look. The ER
+diagram writes `schema.svg` and `schema.png` (renamed by `FileName`) whenever the model changes, and never
+on `aspire publish`.
+
+The ER export is fully cached: it is derived from the EF model alone, so restarting the AppHost over an
+unchanged schema renders nothing. A stamp file beside the images records what they were rendered from.
+
+`UseViewerFidelityExport` makes the file identical to the viewer's own **Save as SVG / PNG** support by
+loading the generated viewer in a headless browser and calling the same function the toolbar uses. It is
+off by default because it pulls `mcr.microsoft.com/playwright` (around 3.7 GB) and takes seconds rather
+than milliseconds. It applies only to the `Interactive` renderer.
+
+Prefer SVG for a large schema — a raster of the whole thing is unreadable at any sensible size. The
+images folder is also the place to take a screenshot from: the one on this page is a viewer capture of the
+sample AppHost's schema, kept in `docs/images/screenshots/`.
+
+## Dashboard
+
+With only the architecture diagram registered, `aspirec4` is a single flat row. Registering the ER diagram
+nests both under a shared parent:
+
+```text
+aspirec4 # parent row, added only when there is more than one diagram
+├── aspirec4-likec4 # the architecture diagram, renamed as it is nested
+└── aspirec4-er # the ER diagram, with its own sidecar nested beneath it
+```
+
+The ER diagram row carries an **Images** property with the resolved export path and an **Open Diagram
+Images** command that opens the folder. Grouping and the `-likec4` rename arrived in 13.6;
+`WithLegacyLayout()` keeps the flat `aspirec4` / `aspirec4-er` pair — see [Migration](Migration.md).
+
+## Troubleshooting
+
+- **No diagram content.** Check the project is added with `AddProject` and has been built.
+ The `aspirec4-er` resource's log names each project where no model was found.
+- **Tables are missing their fluent configuration.** The context was read from metadata
+ (`Approximate`). Add `AspireC4.EntityFrameworkCore` to the project that declares it.
+- **A composite or fluent-only relationship is not drawn.** Only the model dump sees these. Add
+ `AspireC4.EntityFrameworkCore.ModelDump` to the project with the provider and a design-time factory.
+- **Not captured from any static source:** owned types, inheritance mapping, delete behaviour, sequences,
+ check constraints. Relationships across `DbContext` boundaries are never drawn.
+- **The runner, not the product.** Running `AspireC4.IntegrationTests` from an IDE test runner fails
+ Aspire's project-resource start-up, which surfaces as an empty ER model. Use `just test-integration`.
+
+## Next pages
+
+- [Getting Started](Getting-Started.md)
+- [Generated Output](Generated-Output.md)
+- [Dashboard Integration](Dashboard-Integration.md)
+- [Configuration](Configuration.md)
+
diff --git a/docs/wiki/Generated-Output.md b/docs/wiki/Generated-Output.md
index c11177b..5868f8d 100644
--- a/docs/wiki/Generated-Output.md
+++ b/docs/wiki/Generated-Output.md
@@ -25,6 +25,23 @@ Every AspireC4 diagram writes beneath the same `./.aspirec4/` root in the AppHos
| `likec4.config.json` | LikeC4 project configuration (`name`, `title`, `include.paths`, `imageAliases`, `metadata`). Generated when `GenerateConfigFile` is `true`. |
| Additional `.c4` files | Any files registered through `WithAdditionalDSLFile` are copied here; LikeC4 discovers all `.c4` files in the project directory automatically. |
+The ER diagram writes its own files beneath `./.aspirec4/erd/` — `schema.gen.json` (or `.mmd`, `.dbml`,
+`.d2`, depending on the renderer) plus the viewer assets. It is a separate diagram with its own options;
+see [Entity Framework Core ER Diagrams](Entity-Framework-Diagrams.md).
+
+## Exporting images
+
+Both diagrams export to the same `./.aspirec4/images/` folder: the architecture diagram writes one PNG
+per view with an `architecture-` prefix, the ER diagram writes `schema.svg` and `schema.png`. Export runs
+in the background and only when the output would differ, so startup is never delayed and an unchanged
+diagram renders nothing.
+
+The images are the one piece of generated output worth committing — a diagram in a pull request is
+documentation. The screenshots embedded in this repository's READMEs and wiki pages are kept in
+`docs/images/screenshots/`, captured from the sample AppHost; see its `README.md` for the file list and how
+to refresh them. See [Configuration](Configuration.md) for `ImageExportDirectory`, `ImageFormats` and
+`WithoutImageExport()`.
+
## Generating into your own LikeC4 project
`WithLikeC4ProjectFolder(path)` points AspireC4 at a LikeC4 project you already maintain. That directory is what the LikeC4 server serves, so the project's own `likec4.config.json`, `.c4` sources and views are all in play, and the generated model joins them as one more file:
diff --git a/docs/wiki/Getting-Started.md b/docs/wiki/Getting-Started.md
index 9932e2a..985b2b3 100644
--- a/docs/wiki/Getting-Started.md
+++ b/docs/wiki/Getting-Started.md
@@ -4,7 +4,7 @@ This guide walks through installing AspireC4 and generating your first live arch
## Prerequisites
-- **.NET 8 or later**.
+- **.NET 10 or later.** The AppHost targets `net10.0`, and so do the `AspireC4.Hosting` and `AspireC4.Hosting.EntityFrameworkCore` libraries.
- **Aspire 13.5.3 or later**. Aspire AppHost projects must reference both the AppHost SDK and `Aspire.Hosting.AppHost`.
- **Docker** is used by default to run the LikeC4 sidecar container.
- Optional: a local Node.js CLI runtime (`npx`, `pnpm`, `yarn`, `bun`, or `deno`) if you call `.WithLocalCLI()`.
@@ -73,6 +73,36 @@ builder.AddAspireC4(options =>
See [Configuration](Configuration.md) for the full options reference and [Customizing Resources](Customizing-Resources.md) for per-resource details.
+## Add an ER diagram too (optional)
+
+The architecture diagram is the base: `AddAspireC4()` is all you need, and you can stop there. To add a
+linked ER diagram of your Entity Framework Core `DbContext` types as well, install the second AppHost
+package and call one more method on the builder `AddAspireC4()` returns:
+
+```bash
+dotnet add package AspireC4.Hosting.EntityFrameworkCore
+```
+
+```csharp
+var builder = DistributedApplication.CreateBuilder(args);
+
+builder.AddAspireC4()
+ .WithEntityFrameworkDiagram();
+
+builder.AddProject("api");
+
+builder.Build().Run();
+```
+
+The dashboard then shows both diagrams under one `aspirec4` parent row, and each contributing project is
+linked to the ER diagram. Output moves to `./.aspirec4/erd/`, beside the architecture diagram's
+`./.aspirec4/likec4/`.
+
+Two more optional packages raise the fidelity of the ER model — `AspireC4.EntityFrameworkCore` in the
+project declaring the `DbContext`, and `AspireC4.EntityFrameworkCore.ModelDump` in the project owning the
+EF Core provider. Both are opt-in by reference alone. See
+[Entity Framework Core ER Diagrams](Entity-Framework-Diagrams.md).
+
## Use a local CLI instead of Docker
When Docker is not available, or you prefer a local Node.js-based workflow:
@@ -91,6 +121,7 @@ AspireC4 supports both C# and TypeScript AppHosts. See [TypeScript AppHosts](Typ
- [Configuration](Configuration.md)
- [Customizing Resources](Customizing-Resources.md)
+- [Entity Framework Core ER Diagrams](Entity-Framework-Diagrams.md)
- [Generated Output](Generated-Output.md)
- [Dashboard Integration](Dashboard-Integration.md)
- [Source Generator Validation](Source-Generator.md)
\ No newline at end of file
diff --git a/docs/wiki/Home.md b/docs/wiki/Home.md
index 87dd1eb..543dc33 100644
--- a/docs/wiki/Home.md
+++ b/docs/wiki/Home.md
@@ -15,6 +15,7 @@ AspireC4 turns your distributed application into a living architecture diagram.
- [Getting Started](Getting-Started.md)
- [Configuration](Configuration.md)
- [Customizing Resources](Customizing-Resources.md)
+- [Entity Framework Core ER Diagrams](Entity-Framework-Diagrams.md)
- [TypeScript AppHosts](Typescript-AppHost.md)
- [Generated Output](Generated-Output.md)
- [Dashboard Integration](Dashboard-Integration.md)
@@ -25,21 +26,44 @@ AspireC4 turns your distributed application into a living architecture diagram.
- [Contributing](Contributing.md)
- [Release Flow](Release-Flow.md)
+## Screenshots
+
+| Architecture diagram | Entity Framework Core ER diagram |
+| --- | --- |
+|  |  |
+
+Both are captured from the sample AppHost in the repository and stored in `docs/images/screenshots/` — that
+folder is where the images used by these pages live. Run `dotnet run --project src/src/TestAppHost` to
+refresh them. Every diagram also exports its own views to `./.aspirec4/images/` beside the AppHost on
+startup, which is the easiest way to capture a screenshot of your own application; see
+[Generated Output](Generated-Output.md).
+
## Feature highlights
- **Live diagram generation.** `AddAspireC4()` registers a lifecycle hook that generates the `.c4` file before startup and regenerates it (debounced) whenever a resource changes state — so the diagram always reflects the current application.
+- **Optional Entity Framework Core ER diagram.** `WithEntityFrameworkDiagram()` (package `AspireC4.Hosting.EntityFrameworkCore`) adds a second, linked diagram of your `DbContext` types. It is additive — the architecture diagram is the base and is always required, so you run one diagram or both. See [Entity Framework Core ER Diagrams](Entity-Framework-Diagrams.md).
- **One generated-output root.** The architecture and ER diagrams default beneath `./.aspirec4/`, so source control needs a single `**/.aspirec4/` ignore entry.
- **Docker or local CLI.** The LikeC4 server runs as the `ghcr.io/likec4/likec4` container by default, or through a local JavaScript package manager CLI (`npx`, `pnpm`, `yarn`, `bun`, or `deno`) with `.WithLocalCLI()`.
- **Rich per-resource customization.** `WithLikeC4Details()` controls labels, technologies, descriptions, summaries, icons, kinds, tags, links, and metadata; `WithLikeC4Reference()` customizes relationships; `WithLikeC4Group()` groups resources in the generated view.
- **Automatic icons.** Icons are inferred from resource type and name using a bundled manifest, with custom `IconResolvers` evaluated first, and optional GraphViz `dot` assistance.
- **Compile-time validation.** A Roslyn source generator validates `.WithTag()`, `.WithKind()`, `.WithLikeC4Group()`, and `.WithMetadata()` values against a `[LikeC4Registry]` class and/or LikeC4 `specification` blocks, with severity controls from suggestions to errors.
+- **Image export.** Every view is written out as PNG (architecture) or SVG/PNG (ER) whenever the model changes, so a diagram can be attached to a pull request without running the server.
- **TypeScript AppHost support.** The same features are available to TypeScript AppHosts through the Aspire-generated fluent API.
- **Dashboard integration.** The diagram URL is surfaced in the Aspire dashboard, with optional per-resource dashboard links, and support for hiding the sidecar in favour of links on project resources.
## Prerequisites
-- **.NET 8 or later**.
+- **.NET 10 or later.** The AppHost targets `net10.0`, which is the target framework of both libraries.
- **Aspire 13.5.3 or later**, with `Aspire.Hosting.AppHost` referenced by the AppHost project.
- **Docker** (default LikeC4 server), or a local Node.js CLI runtime if you use `.WithLocalCLI()`.
+### Target frameworks
+
+| Package | Target framework | Shipped as |
+| --- | --- | --- |
+| `AspireC4.Hosting` | `net10.0` | library |
+| `AspireC4.Hosting.EntityFrameworkCore` | `net10.0` | library |
+| `AspireC4.EntityFrameworkCore` | `netstandard2.0` | analyzer-only, no runtime assembly |
+| `AspireC4.EntityFrameworkCore.ModelDump` | `net10.0` | build-time tool under `tools/` |
+
See [Getting Started](Getting-Started.md) for installation and the first run.
\ No newline at end of file
diff --git a/docs/wiki/Release-Flow.md b/docs/wiki/Release-Flow.md
index 16eaaba..ee6085f 100644
--- a/docs/wiki/Release-Flow.md
+++ b/docs/wiki/Release-Flow.md
@@ -76,7 +76,7 @@ The build must produce no `RS2000`–`RS2008` diagnostics.
`purview-build.json` declares the package content that must be present in the packed `.nupkg`
(`PackValidation:RequiredContent`). Keep the `lib/...` entries pinned to the concrete target framework
-(`lib/net8.0/...`) rather than the `$(TFM)` token.
+(`lib/net10.0/...`) rather than the `$(TFM)` token.
The validator expands `$(TFM)` into one entry per framework group it discovers in the package — including the
framework-agnostic `any` group contributed by the root-level `build/.props`. That makes
diff --git a/docs/wiki/Typescript-AppHost.md b/docs/wiki/Typescript-AppHost.md
index a90e62f..a3fb495 100644
--- a/docs/wiki/Typescript-AppHost.md
+++ b/docs/wiki/Typescript-AppHost.md
@@ -109,6 +109,28 @@ aspire restore
When adding another Aspire integration, use `aspire add ` so Aspire updates `aspire.config.json` and regenerates the TypeScript API. Inspect `.aspire/modules/aspire.mts` to see the APIs currently available to `apphost.mts`.
+## Entity Framework Core diagrams
+
+The ER diagram is an optional second diagram and is additive, exactly as in a C# AppHost: `addAspireC4()`
+is the base, and the ER diagram is added on top of it. It is only compiled into the TypeScript API when
+the package is declared, so add it to `packages` in `aspire.config.json` and run `aspire restore`:
+
+```json
+{
+ "packages": {
+ "Aspire.Hosting.JavaScript": "13.5.3",
+ "AspireC4.Hosting": "13.5.3",
+ "AspireC4.Hosting.EntityFrameworkCore": "13.5.3"
+ }
+}
+```
+
+The fluent methods are exported in camel case (`addAspireC4`, `withLikeC4Details`, `withEntityFrameworkDiagram`,
+…). The ER output still lands in `./.aspirec4/erd/`, and the per-service fidelity packages
+(`AspireC4.EntityFrameworkCore` and `AspireC4.EntityFrameworkCore.ModelDump`) are C# project references, so
+they apply to whatever service project declares the `DbContext`. See
+[Entity Framework Core ER Diagrams](Entity-Framework-Diagrams.md).
+
## Output paths and legacy mode
The TypeScript AppHost writes to the same paths as the C# AppHost: `./.aspirec4/likec4/` for the architecture diagram and `./.aspirec4/erd/` for the ER diagram, both relative to the AppHost working directory. If you are upgrading from 13.5 and need the pre-13.6 layout unchanged, call `withLegacyLayout()` inside the `configure` callback:
diff --git a/docs/wiki/_Sidebar.md b/docs/wiki/_Sidebar.md
index 0d6c415..38222bd 100644
--- a/docs/wiki/_Sidebar.md
+++ b/docs/wiki/_Sidebar.md
@@ -2,6 +2,7 @@
- [Getting Started](Getting-Started.md)
- [Configuration](Configuration.md)
- [Customizing Resources](Customizing-Resources.md)
+- [Entity Framework Core ER Diagrams](Entity-Framework-Diagrams.md)
- [TypeScript AppHosts](Typescript-AppHost.md)
- [Generated Output](Generated-Output.md)
- [Dashboard Integration](Dashboard-Integration.md)
diff --git a/samples/typescript-app-host/.modules/.codegen-hash b/samples/typescript-app-host/.modules/.codegen-hash
new file mode 100644
index 0000000..a9a7319
--- /dev/null
+++ b/samples/typescript-app-host/.modules/.codegen-hash
@@ -0,0 +1 @@
+8D973C74F7E4DBB83977C694EFD842CB85D2914E805551DF81AB8DFD93D7B0AD
\ No newline at end of file
diff --git a/samples/typescript-app-host/.modules/aspire.ts b/samples/typescript-app-host/.modules/aspire.ts
new file mode 100644
index 0000000..f9c41f5
--- /dev/null
+++ b/samples/typescript-app-host/.modules/aspire.ts
@@ -0,0 +1,58026 @@
+// aspire.ts - Capability-based Aspire SDK
+// This SDK uses the ATS (Aspire Type System) capability API.
+// Capabilities are endpoints like 'Aspire.Hosting/createBuilder'.
+//
+// GENERATED CODE - DO NOT EDIT
+
+import {
+ AspireClient,
+ Handle,
+ MarshalledHandle,
+ AppHostUsageError,
+ CancellationToken,
+ CapabilityError,
+ registerCallback,
+ wrapIfHandle,
+ registerHandleWrapper,
+ isPromiseLike
+} from './transport.js';
+import type { AspireClientRpc } from './transport.js';
+
+import type { HandleReference } from './base.js';
+
+import {
+ ResourceBuilderBase,
+ ReferenceExpression,
+ refExpr,
+ AspireDict,
+ AspireList
+} from './base.js';
+
+import type { Awaitable } from './base.js';
+
+// ============================================================================
+// Handle Type Aliases (Internal - not exported to users)
+// ============================================================================
+
+/** Handle to AzureKeyVaultResource */
+type AzureKeyVaultResourceHandle = Handle<'Aspire.Hosting.Azure.KeyVault/Aspire.Hosting.Azure.AzureKeyVaultResource'>;
+
+/** Handle to AzureKeyVaultSecretResource */
+type AzureKeyVaultSecretResourceHandle = Handle<'Aspire.Hosting.Azure.KeyVault/Aspire.Hosting.Azure.AzureKeyVaultSecretResource'>;
+
+/** Handle to AzurePostgresFlexibleServerDatabaseResource */
+type AzurePostgresFlexibleServerDatabaseResourceHandle = Handle<'Aspire.Hosting.Azure.PostgreSQL/Aspire.Hosting.Azure.AzurePostgresFlexibleServerDatabaseResource'>;
+
+/** Handle to AzurePostgresFlexibleServerResource */
+type AzurePostgresFlexibleServerResourceHandle = Handle<'Aspire.Hosting.Azure.PostgreSQL/Aspire.Hosting.Azure.AzurePostgresFlexibleServerResource'>;
+
+/** Handle to AzureManagedRedisResource */
+type AzureManagedRedisResourceHandle = Handle<'Aspire.Hosting.Azure.Redis/Aspire.Hosting.Azure.AzureManagedRedisResource'>;
+
+/** Handle to IAzureResource */
+type IAzureResourceHandle = Handle<'Aspire.Hosting.Azure/Aspire.Hosting.ApplicationModel.IAzureResource'>;
+
+/** Handle to AzureBicepResource */
+type AzureBicepResourceHandle = Handle<'Aspire.Hosting.Azure/Aspire.Hosting.Azure.AzureBicepResource'>;
+
+/** Handle to AzureEnvironmentResource */
+type AzureEnvironmentResourceHandle = Handle<'Aspire.Hosting.Azure/Aspire.Hosting.Azure.AzureEnvironmentResource'>;
+
+/** Handle to AzureProvisioningResource */
+type AzureProvisioningResourceHandle = Handle<'Aspire.Hosting.Azure/Aspire.Hosting.Azure.AzureProvisioningResource'>;
+
+/** Handle to AzureResourceInfrastructure */
+type AzureResourceInfrastructureHandle = Handle<'Aspire.Hosting.Azure/Aspire.Hosting.Azure.AzureResourceInfrastructure'>;
+
+/** Handle to AzureUserAssignedIdentityResource */
+type AzureUserAssignedIdentityResourceHandle = Handle<'Aspire.Hosting.Azure/Aspire.Hosting.Azure.AzureUserAssignedIdentityResource'>;
+
+/** Handle to BicepOutputReference */
+type BicepOutputReferenceHandle = Handle<'Aspire.Hosting.Azure/Aspire.Hosting.Azure.BicepOutputReference'>;
+
+/** Handle to IAzureKeyVaultResource */
+type IAzureKeyVaultResourceHandle = Handle<'Aspire.Hosting.Azure/Aspire.Hosting.Azure.IAzureKeyVaultResource'>;
+
+/** Handle to IAzureKeyVaultSecretReference */
+type IAzureKeyVaultSecretReferenceHandle = Handle<'Aspire.Hosting.Azure/Aspire.Hosting.Azure.IAzureKeyVaultSecretReference'>;
+
+/** Handle to JavaScriptAppResource */
+type JavaScriptAppResourceHandle = Handle<'Aspire.Hosting.JavaScript/Aspire.Hosting.JavaScript.JavaScriptAppResource'>;
+
+/** Handle to NextJsAppResource */
+type NextJsAppResourceHandle = Handle<'Aspire.Hosting.JavaScript/Aspire.Hosting.JavaScript.NextJsAppResource'>;
+
+/** Handle to NodeAppResource */
+type NodeAppResourceHandle = Handle<'Aspire.Hosting.JavaScript/Aspire.Hosting.JavaScript.NodeAppResource'>;
+
+/** Handle to ViteAppResource */
+type ViteAppResourceHandle = Handle<'Aspire.Hosting.JavaScript/Aspire.Hosting.JavaScript.ViteAppResource'>;
+
+/** Handle to PostgresDatabaseResource */
+type PostgresDatabaseResourceHandle = Handle<'Aspire.Hosting.PostgreSQL/Aspire.Hosting.ApplicationModel.PostgresDatabaseResource'>;
+
+/** Handle to PostgresServerResource */
+type PostgresServerResourceHandle = Handle<'Aspire.Hosting.PostgreSQL/Aspire.Hosting.ApplicationModel.PostgresServerResource'>;
+
+/** Handle to PgAdminContainerResource */
+type PgAdminContainerResourceHandle = Handle<'Aspire.Hosting.PostgreSQL/Aspire.Hosting.Postgres.PgAdminContainerResource'>;
+
+/** Handle to PgWebContainerResource */
+type PgWebContainerResourceHandle = Handle<'Aspire.Hosting.PostgreSQL/Aspire.Hosting.Postgres.PgWebContainerResource'>;
+
+/** Handle to PostgresMcpContainerResource */
+type PostgresMcpContainerResourceHandle = Handle<'Aspire.Hosting.PostgreSQL/Aspire.Hosting.Postgres.PostgresMcpContainerResource'>;
+
+/** Handle to RedisResource */
+type RedisResourceHandle = Handle<'Aspire.Hosting.Redis/Aspire.Hosting.ApplicationModel.RedisResource'>;
+
+/** Handle to RedisCommanderResource */
+type RedisCommanderResourceHandle = Handle<'Aspire.Hosting.Redis/Aspire.Hosting.Redis.RedisCommanderResource'>;
+
+/** Handle to RedisInsightResource */
+type RedisInsightResourceHandle = Handle<'Aspire.Hosting.Redis/Aspire.Hosting.Redis.RedisInsightResource'>;
+
+/** Handle to AfterResourcesCreatedEvent */
+type AfterResourcesCreatedEventHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.AfterResourcesCreatedEvent'>;
+
+/** Handle to BeforeResourceStartedEvent */
+type BeforeResourceStartedEventHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.BeforeResourceStartedEvent'>;
+
+/** Handle to BeforeStartEvent */
+type BeforeStartEventHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.BeforeStartEvent'>;
+
+/** Handle to CommandLineArgsCallbackContext */
+type CommandLineArgsCallbackContextHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.CommandLineArgsCallbackContext'>;
+
+/** Handle to CommandLineArgsEditor */
+type CommandLineArgsEditorHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.CommandLineArgsEditor'>;
+
+/** Handle to ConnectionStringAvailableEvent */
+type ConnectionStringAvailableEventHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.ConnectionStringAvailableEvent'>;
+
+/** Handle to ContainerImagePushOptions */
+type ContainerImagePushOptionsHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.ContainerImagePushOptions'>;
+
+/** Handle to ContainerImagePushOptionsCallbackContext */
+type ContainerImagePushOptionsCallbackContextHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.ContainerImagePushOptionsCallbackContext'>;
+
+/** Handle to ContainerRegistryResource */
+type ContainerRegistryResourceHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.ContainerRegistryResource'>;
+
+/** Handle to ContainerResource */
+type ContainerResourceHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.ContainerResource'>;
+
+/** Handle to CSharpAppResource */
+type CSharpAppResourceHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.CSharpAppResource'>;
+
+/** Handle to DistributedApplicationModel */
+type DistributedApplicationModelHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.DistributedApplicationModel'>;
+
+/** Handle to DockerfileBuilder */
+type DockerfileBuilderHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.Docker.DockerfileBuilder'>;
+
+/** Handle to DockerfileStage */
+type DockerfileStageHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.Docker.DockerfileStage'>;
+
+/** Handle to DockerfileBuilderCallbackContext */
+type DockerfileBuilderCallbackContextHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.DockerfileBuilderCallbackContext'>;
+
+/** Handle to DotnetToolResource */
+type DotnetToolResourceHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.DotnetToolResource'>;
+
+/** Handle to EndpointReference */
+type EndpointReferenceHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.EndpointReference'>;
+
+/** Handle to EndpointReferenceExpression */
+type EndpointReferenceExpressionHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.EndpointReferenceExpression'>;
+
+/** Handle to EndpointUpdateContext */
+type EndpointUpdateContextHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.EndpointUpdateContext'>;
+
+/** Handle to EnvironmentCallbackContext */
+type EnvironmentCallbackContextHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.EnvironmentCallbackContext'>;
+
+/** Handle to EnvironmentEditor */
+type EnvironmentEditorHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.EnvironmentEditor'>;
+
+/** Handle to ExecutableResource */
+type ExecutableResourceHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.ExecutableResource'>;
+
+/** Handle to ExecuteCommandContext */
+type ExecuteCommandContextHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.ExecuteCommandContext'>;
+
+/** Handle to IAspireStore */
+type IAspireStoreHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.IAspireStore'>;
+
+/** Handle to IComputeResource */
+type IComputeResourceHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.IComputeResource'>;
+
+/** Handle to IContainerFilesDestinationResource */
+type IContainerFilesDestinationResourceHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.IContainerFilesDestinationResource'>;
+
+/** Handle to IExecutionConfigurationBuilder */
+type IExecutionConfigurationBuilderHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.IExecutionConfigurationBuilder'>;
+
+/** Handle to IExecutionConfigurationResult */
+type IExecutionConfigurationResultHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.IExecutionConfigurationResult'>;
+
+/** Handle to IExpressionValue */
+type IExpressionValueHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.IExpressionValue'>;
+
+/** Handle to InitializeResourceEvent */
+type InitializeResourceEventHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.InitializeResourceEvent'>;
+
+/** Handle to IResource */
+type IResourceHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResource'>;
+
+/** Handle to IResourceWithArgs */
+type IResourceWithArgsHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithArgs'>;
+
+/** Handle to IResourceWithConnectionString */
+type IResourceWithConnectionStringHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithConnectionString'>;
+
+/** Handle to IResourceWithEndpoints */
+type IResourceWithEndpointsHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEndpoints'>;
+
+/** Handle to IResourceWithEnvironment */
+type IResourceWithEnvironmentHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEnvironment'>;
+
+/** Handle to IResourceWithWaitSupport */
+type IResourceWithWaitSupportHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithWaitSupport'>;
+
+/** Handle to LogFacade */
+type LogFacadeHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.LogFacade'>;
+
+/** Handle to ParameterResource */
+type ParameterResourceHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.ParameterResource'>;
+
+/** Handle to ProjectResource */
+type ProjectResourceHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.ProjectResource'>;
+
+/** Handle to ReferenceExpression */
+type ReferenceExpressionHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.ReferenceExpression'>;
+
+/** Handle to ReferenceExpressionBuilder */
+type ReferenceExpressionBuilderHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.ReferenceExpressionBuilder'>;
+
+/** Handle to ResourceEndpointsAllocatedEvent */
+type ResourceEndpointsAllocatedEventHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.ResourceEndpointsAllocatedEvent'>;
+
+/** Handle to ResourceLoggerService */
+type ResourceLoggerServiceHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.ResourceLoggerService'>;
+
+/** Handle to ResourceNotificationService */
+type ResourceNotificationServiceHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.ResourceNotificationService'>;
+
+/** Handle to ResourceReadyEvent */
+type ResourceReadyEventHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.ResourceReadyEvent'>;
+
+/** Handle to ResourceStoppedEvent */
+type ResourceStoppedEventHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.ResourceStoppedEvent'>;
+
+/** Handle to ResourceUrlsCallbackContext */
+type ResourceUrlsCallbackContextHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.ResourceUrlsCallbackContext'>;
+
+/** Handle to ResourceUrlsEditor */
+type ResourceUrlsEditorHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.ResourceUrlsEditor'>;
+
+/** Handle to UpdateCommandStateContext */
+type UpdateCommandStateContextHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ApplicationModel.UpdateCommandStateContext'>;
+
+/** Handle to EventingSubscriberRegistrationContext */
+type EventingSubscriberRegistrationContextHandle = Handle<'Aspire.Hosting/Aspire.Hosting.Ats.EventingSubscriberRegistrationContext'>;
+
+/** Handle to DistributedApplication */
+type DistributedApplicationHandle = Handle<'Aspire.Hosting/Aspire.Hosting.DistributedApplication'>;
+
+/** Handle to DistributedApplicationExecutionContext */
+type DistributedApplicationExecutionContextHandle = Handle<'Aspire.Hosting/Aspire.Hosting.DistributedApplicationExecutionContext'>;
+
+/** Handle to DistributedApplicationEventSubscription */
+type DistributedApplicationEventSubscriptionHandle = Handle<'Aspire.Hosting/Aspire.Hosting.Eventing.DistributedApplicationEventSubscription'>;
+
+/** Handle to IDistributedApplicationEventing */
+type IDistributedApplicationEventingHandle = Handle<'Aspire.Hosting/Aspire.Hosting.Eventing.IDistributedApplicationEventing'>;
+
+/** Handle to ExternalServiceResource */
+type ExternalServiceResourceHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ExternalServiceResource'>;
+
+/** Handle to IDistributedApplicationBuilder */
+type IDistributedApplicationBuilderHandle = Handle<'Aspire.Hosting/Aspire.Hosting.IDistributedApplicationBuilder'>;
+
+/** Handle to IResourceWithContainerFiles */
+type IResourceWithContainerFilesHandle = Handle<'Aspire.Hosting/Aspire.Hosting.IResourceWithContainerFiles'>;
+
+/** Handle to IResourceWithServiceDiscovery */
+type IResourceWithServiceDiscoveryHandle = Handle<'Aspire.Hosting/Aspire.Hosting.IResourceWithServiceDiscovery'>;
+
+/** Handle to IUserSecretsManager */
+type IUserSecretsManagerHandle = Handle<'Aspire.Hosting/Aspire.Hosting.IUserSecretsManager'>;
+
+/** Handle to IDistributedApplicationPipeline */
+type IDistributedApplicationPipelineHandle = Handle<'Aspire.Hosting/Aspire.Hosting.Pipelines.IDistributedApplicationPipeline'>;
+
+/** Handle to IReportingStep */
+type IReportingStepHandle = Handle<'Aspire.Hosting/Aspire.Hosting.Pipelines.IReportingStep'>;
+
+/** Handle to IReportingTask */
+type IReportingTaskHandle = Handle<'Aspire.Hosting/Aspire.Hosting.Pipelines.IReportingTask'>;
+
+/** Handle to PipelineConfigurationContext */
+type PipelineConfigurationContextHandle = Handle<'Aspire.Hosting/Aspire.Hosting.Pipelines.PipelineConfigurationContext'>;
+
+/** Handle to PipelineContext */
+type PipelineContextHandle = Handle<'Aspire.Hosting/Aspire.Hosting.Pipelines.PipelineContext'>;
+
+/** Handle to PipelineEditor */
+type PipelineEditorHandle = Handle<'Aspire.Hosting/Aspire.Hosting.Pipelines.PipelineEditor'>;
+
+/** Handle to PipelineStep */
+type PipelineStepHandle = Handle<'Aspire.Hosting/Aspire.Hosting.Pipelines.PipelineStep'>;
+
+/** Handle to PipelineStepContext */
+type PipelineStepContextHandle = Handle<'Aspire.Hosting/Aspire.Hosting.Pipelines.PipelineStepContext'>;
+
+/** Handle to PipelineStepFactoryContext */
+type PipelineStepFactoryContextHandle = Handle<'Aspire.Hosting/Aspire.Hosting.Pipelines.PipelineStepFactoryContext'>;
+
+/** Handle to PipelineSummary */
+type PipelineSummaryHandle = Handle<'Aspire.Hosting/Aspire.Hosting.Pipelines.PipelineSummary'>;
+
+/** Handle to ProjectResourceOptions */
+type ProjectResourceOptionsHandle = Handle<'Aspire.Hosting/Aspire.Hosting.ProjectResourceOptions'>;
+
+/** Handle to AspireC4Resource */
+type AspireC4ResourceHandle = Handle<'AspireC4.Hosting/Aspire.Hosting.AspireC4.ApplicationModel.AspireC4Resource'>;
+
+/** Handle to AspireC4DiagramOptions */
+type AspireC4DiagramOptionsHandle = Handle<'AspireC4.Hosting/Aspire.Hosting.AspireC4.AspireC4DiagramOptions'>;
+
+/** Handle to LikeC4NodeDetailsAnnotation */
+type LikeC4NodeDetailsAnnotationHandle = Handle<'AspireC4.Hosting/Aspire.Hosting.AspireC4.LikeC4.Annotations.LikeC4NodeDetailsAnnotation'>;
+
+/** Handle to LikeC4RelationshipDetailsAnnotation */
+type LikeC4RelationshipDetailsAnnotationHandle = Handle<'AspireC4.Hosting/Aspire.Hosting.AspireC4.LikeC4.Annotations.LikeC4RelationshipDetailsAnnotation'>;
+
+/** Handle to IConfiguration */
+type IConfigurationHandle = Handle<'Microsoft.Extensions.Configuration.Abstractions/Microsoft.Extensions.Configuration.IConfiguration'>;
+
+/** Handle to IConfigurationSection */
+type IConfigurationSectionHandle = Handle<'Microsoft.Extensions.Configuration.Abstractions/Microsoft.Extensions.Configuration.IConfigurationSection'>;
+
+/** Handle to IHostEnvironment */
+type IHostEnvironmentHandle = Handle<'Microsoft.Extensions.Hosting.Abstractions/Microsoft.Extensions.Hosting.IHostEnvironment'>;
+
+/** Handle to ILogger */
+type ILoggerHandle = Handle<'Microsoft.Extensions.Logging.Abstractions/Microsoft.Extensions.Logging.ILogger'>;
+
+/** Handle to ILoggerFactory */
+type ILoggerFactoryHandle = Handle<'Microsoft.Extensions.Logging.Abstractions/Microsoft.Extensions.Logging.ILoggerFactory'>;
+
+/** Handle to IServiceProvider */
+type IServiceProviderHandle = Handle<'System.ComponentModel/System.IServiceProvider'>;
+
+// ============================================================================
+// Enum Types
+// ============================================================================
+
+/** Enum type for AspireMetadataInclusion */
+export enum AspireMetadataInclusion {
+ None = "None",
+ Metadata = "Metadata",
+ Links = "Links",
+ All = "All",
+}
+
+/** Enum type for AzureKeyVaultRole */
+export enum AzureKeyVaultRole {
+ KeyVaultAdministrator = "KeyVaultAdministrator",
+ KeyVaultCertificateUser = "KeyVaultCertificateUser",
+ KeyVaultCertificatesOfficer = "KeyVaultCertificatesOfficer",
+ KeyVaultContributor = "KeyVaultContributor",
+ KeyVaultCryptoOfficer = "KeyVaultCryptoOfficer",
+ KeyVaultCryptoServiceEncryptionUser = "KeyVaultCryptoServiceEncryptionUser",
+ KeyVaultCryptoServiceReleaseUser = "KeyVaultCryptoServiceReleaseUser",
+ KeyVaultCryptoUser = "KeyVaultCryptoUser",
+ KeyVaultDataAccessAdministrator = "KeyVaultDataAccessAdministrator",
+ KeyVaultReader = "KeyVaultReader",
+ KeyVaultSecretsOfficer = "KeyVaultSecretsOfficer",
+ KeyVaultSecretsUser = "KeyVaultSecretsUser",
+ ManagedHsmContributor = "ManagedHsmContributor",
+}
+
+/** Enum type for CertificateTrustScope */
+export enum CertificateTrustScope {
+ None = "None",
+ Append = "Append",
+ Override = "Override",
+ System = "System",
+}
+
+/** Enum type for CommandResultFormat */
+export enum CommandResultFormat {
+ Text = "Text",
+ Json = "Json",
+ Markdown = "Markdown",
+}
+
+/** Enum type for ContainerLifetime */
+export enum ContainerLifetime {
+ Session = "Session",
+ Persistent = "Persistent",
+}
+
+/** Enum type for DeploymentScope */
+export enum DeploymentScope {
+ ResourceGroup = "ResourceGroup",
+ Subscription = "Subscription",
+ ManagementGroup = "ManagementGroup",
+ Tenant = "Tenant",
+}
+
+/** Enum type for DistributedApplicationOperation */
+export enum DistributedApplicationOperation {
+ Run = "Run",
+ Publish = "Publish",
+}
+
+/** Enum type for EndpointProperty */
+export enum EndpointProperty {
+ Url = "Url",
+ Host = "Host",
+ IPV4Host = "IPV4Host",
+ Port = "Port",
+ Scheme = "Scheme",
+ TargetPort = "TargetPort",
+ HostAndPort = "HostAndPort",
+ TlsEnabled = "TlsEnabled",
+}
+
+/** Enum type for HttpCommandResultMode */
+export enum HttpCommandResultMode {
+ None = "None",
+ Auto = "Auto",
+ Json = "Json",
+ Text = "Text",
+}
+
+/** Enum type for IconVariant */
+export enum IconVariant {
+ Regular = "Regular",
+ Filled = "Filled",
+}
+
+/** Enum type for ImagePullPolicy */
+export enum ImagePullPolicy {
+ Default = "Default",
+ Always = "Always",
+ Missing = "Missing",
+ Never = "Never",
+}
+
+/** Enum type for LikeC4RelationshipKindSyntax */
+export enum LikeC4RelationshipKindSyntax {
+ Dot = "Dot",
+ Bracket = "Bracket",
+}
+
+/** Enum type for LocalCLIRuntime */
+export enum LocalCLIRuntime {
+ Auto = "Auto",
+ Npx = "Npx",
+ Pnpm = "Pnpm",
+ Yarn = "Yarn",
+ Bun = "Bun",
+ Deno = "Deno",
+}
+
+/** Enum type for NormaliseMetadataBehaviour */
+export enum NormaliseMetadataBehaviour {
+ Normalise = "Normalise",
+ NormaliseLowercase = "NormaliseLowercase",
+ Throw = "Throw",
+}
+
+/** Enum type for OtlpProtocol */
+export enum OtlpProtocol {
+ Grpc = "Grpc",
+ HttpProtobuf = "HttpProtobuf",
+ HttpJson = "HttpJson",
+}
+
+/** Enum type for ProbeType */
+export enum ProbeType {
+ Startup = "Startup",
+ Readiness = "Readiness",
+ Liveness = "Liveness",
+}
+
+/** Enum type for ProtocolType */
+export enum ProtocolType {
+ IP = "IP",
+ IPv6HopByHopOptions = "IPv6HopByHopOptions",
+ Unspecified = "Unspecified",
+ Icmp = "Icmp",
+ Igmp = "Igmp",
+ Ggp = "Ggp",
+ IPv4 = "IPv4",
+ Tcp = "Tcp",
+ Pup = "Pup",
+ Udp = "Udp",
+ Idp = "Idp",
+ IPv6 = "IPv6",
+ IPv6RoutingHeader = "IPv6RoutingHeader",
+ IPv6FragmentHeader = "IPv6FragmentHeader",
+ IPSecEncapsulatingSecurityPayload = "IPSecEncapsulatingSecurityPayload",
+ IPSecAuthenticationHeader = "IPSecAuthenticationHeader",
+ IcmpV6 = "IcmpV6",
+ IPv6NoNextHeader = "IPv6NoNextHeader",
+ IPv6DestinationOptions = "IPv6DestinationOptions",
+ ND = "ND",
+ Raw = "Raw",
+ Ipx = "Ipx",
+ Spx = "Spx",
+ SpxII = "SpxII",
+ Unknown = "Unknown",
+}
+
+/** Enum type for UrlDisplayLocation */
+export enum UrlDisplayLocation {
+ SummaryAndDetails = "SummaryAndDetails",
+ DetailsOnly = "DetailsOnly",
+}
+
+/** Enum type for WaitBehavior */
+export enum WaitBehavior {
+ WaitOnResourceUnavailable = "WaitOnResourceUnavailable",
+ StopOnResourceUnavailable = "StopOnResourceUnavailable",
+}
+
+// ============================================================================
+// DTO Interfaces
+// ============================================================================
+
+/** DTO interface for AddContainerOptions */
+export interface AddContainerOptions {
+ image?: string;
+ tag?: string;
+}
+
+/** DTO interface for CertificateTrustExecutionConfigurationContext */
+export interface CertificateTrustExecutionConfigurationContext {
+ certificateBundlePath?: ReferenceExpression;
+ certificateDirectoriesPath?: ReferenceExpression;
+ rootCertificatesPath?: string;
+ isContainer?: boolean;
+}
+
+/** DTO interface for CertificateTrustExecutionConfigurationExportData */
+export interface CertificateTrustExecutionConfigurationExportData {
+ scope?: CertificateTrustScope;
+ certificateSubjects?: string[];
+ customBundlePaths?: string[];
+}
+
+/** DTO interface for CommandOptions */
+export interface CommandOptions {
+ description?: string;
+ parameter?: any;
+ confirmationMessage?: string;
+ iconName?: string;
+ iconVariant?: IconVariant;
+ isHighlighted?: boolean;
+ updateState?: any;
+}
+
+/** DTO interface for CommandResultData */
+export interface CommandResultData {
+ value?: string;
+ format?: CommandResultFormat;
+ displayImmediately?: boolean;
+}
+
+/** DTO interface for CreateBuilderOptions */
+export interface CreateBuilderOptions {
+ args?: string[];
+ projectDirectory?: string;
+ appHostFilePath?: string;
+ containerRegistryOverride?: string;
+ disableDashboard?: boolean;
+ dashboardApplicationName?: string;
+ allowUnsecuredTransport?: boolean;
+ enableResourceLogging?: boolean;
+ /** When false, pre-flush rejected promises are not re-thrown by build(). Default: true. */
+ throwOnPendingRejections?: boolean;
+}
+
+/** DTO interface for ExecuteCommandResult */
+export interface ExecuteCommandResult {
+ success?: boolean;
+ canceled?: boolean;
+ errorMessage?: string;
+ message?: string;
+ data?: CommandResultData;
+}
+
+/** DTO interface for GenerateParameterDefault */
+export interface GenerateParameterDefault {
+ minLength?: number;
+ lower?: boolean;
+ upper?: boolean;
+ numeric?: boolean;
+ special?: boolean;
+ minLower?: number;
+ minUpper?: number;
+ minNumeric?: number;
+ minSpecial?: number;
+}
+
+/** DTO interface for HttpCommandExportOptions */
+export interface HttpCommandExportOptions {
+ description?: string;
+ confirmationMessage?: string;
+ iconName?: string;
+ iconVariant?: IconVariant;
+ isHighlighted?: boolean;
+ commandName?: string;
+ endpointName?: string;
+ methodName?: string;
+ resultMode?: HttpCommandResultMode;
+}
+
+/** DTO interface for HttpsCertificateExecutionConfigurationContext */
+export interface HttpsCertificateExecutionConfigurationContext {
+ certificatePath?: ReferenceExpression;
+ keyPath?: ReferenceExpression;
+ pfxPath?: ReferenceExpression;
+}
+
+/** DTO interface for HttpsCertificateExecutionConfigurationExportData */
+export interface HttpsCertificateExecutionConfigurationExportData {
+ subject?: string;
+ thumbprint?: string;
+ keyPathExpression?: string;
+ pfxPathExpression?: string;
+ isKeyPathReferenced?: boolean;
+ isPfxPathReferenced?: boolean;
+ password?: string;
+}
+
+/** DTO interface for HttpsCertificateInfo */
+export interface HttpsCertificateInfo {
+ subject?: string;
+ issuer?: string;
+ thumbprint?: string;
+}
+
+/** DTO interface for ReferenceEnvironmentInjectionOptions */
+export interface ReferenceEnvironmentInjectionOptions {
+ connectionString?: boolean;
+ connectionProperties?: boolean;
+ serviceDiscovery?: boolean;
+ endpoints?: boolean;
+}
+
+/** DTO interface for ResourceEventDto */
+export interface ResourceEventDto {
+ resourceName?: string;
+ resourceId?: string;
+ state?: string;
+ stateStyle?: string;
+ healthStatus?: string;
+ exitCode?: number;
+}
+
+/** DTO interface for ResourceUrlAnnotation */
+export interface ResourceUrlAnnotation {
+ url?: string;
+ displayText?: string;
+ endpoint?: EndpointReferenceHandle;
+ displayLocation?: UrlDisplayLocation;
+}
+
+// ============================================================================
+// Exported Values
+// ============================================================================
+
+export namespace WellKnownPipelineSteps {
+ export const BeforeStart = "before-start";
+
+ export const Build = "build";
+
+ export const BuildPrereq = "build-prereq";
+
+ export const CheckContainerRuntime = "check-container-runtime";
+
+ export const Deploy = "deploy";
+
+ export const DeployPrereq = "deploy-prereq";
+
+ export const Destroy = "destroy";
+
+ export const DestroyPrereq = "destroy-prereq";
+
+ export const Diagnostics = "diagnostics";
+
+ export const ProcessParameters = "process-parameters";
+
+ export const Publish = "publish";
+
+ export const PublishPrereq = "publish-prereq";
+
+ export const Push = "push";
+
+ export const PushPrereq = "push-prereq";
+
+ export const ValidateComputeEnvironments = "validate-compute-environments";
+
+}
+
+export namespace WellKnownPipelineTags {
+ export const BuildCompute = "build-compute";
+
+ export const DeployCompute = "deploy-compute";
+
+ export const ProvisionInfrastructure = "provision-infra";
+
+ export const PushContainerImage = "push-container-image";
+
+}
+
+// ============================================================================
+// Options Interfaces
+// ============================================================================
+
+export interface AddAspireC4Options {
+ name?: string;
+ port?: number;
+ configure?: (obj: AspireC4DiagramOptions) => Promise;
+}
+
+export interface AddConnectionStringOptions {
+ environmentVariableNameOrExpression?: string | ReferenceExpression;
+}
+
+export interface AddContainerFilesOptions {
+ logger?: Awaitable;
+}
+
+export interface AddContainerFilesStagesOptions {
+ logger?: Awaitable;
+}
+
+export interface AddContainerRegistryOptions {
+ repository?: string | ParameterResource | Awaitable;
+}
+
+export interface AddCSharpAppOptions {
+ options?: Awaitable;
+}
+
+export interface AddDatabaseOptions {
+ databaseName?: string;
+}
+
+export interface AddDockerfileBuilderOptions {
+ stage?: string;
+}
+
+export interface AddDockerfileOptions {
+ dockerfilePath?: string;
+ stage?: string;
+}
+
+export interface AddForEndpointOptions {
+ displayText?: string;
+}
+
+export interface AddJavaScriptAppOptions {
+ runScriptName?: string;
+}
+
+export interface AddNextJsAppOptions {
+ runScriptName?: string;
+}
+
+export interface AddOptions {
+ displayText?: string;
+}
+
+export interface AddParameterFromConfigurationOptions {
+ secret?: boolean;
+}
+
+export interface AddParameterOptions {
+ value?: string;
+ publishValueAsDefault?: boolean;
+ secret?: boolean;
+}
+
+export interface AddParameterWithGeneratedValueOptions {
+ secret?: boolean;
+ persist?: boolean;
+}
+
+export interface AddPostgresOptions {
+ userName?: Awaitable;
+ password?: Awaitable;
+ port?: number;
+}
+
+export interface AddProjectOptions {
+ launchProfileOrOptions?: string | ProjectResourceOptions | Awaitable;
+}
+
+export interface AddRedisOptions {
+ port?: number;
+ password?: Awaitable;
+}
+
+export interface AddSecretOptions {
+ secretName?: string;
+}
+
+export interface AddStepOptions {
+ dependsOn?: string[];
+ requiredBy?: string[];
+}
+
+export interface AddViteAppOptions {
+ runScriptName?: string;
+}
+
+export interface AppendFormattedOptions {
+ format?: string;
+}
+
+export interface AppendValueProviderOptions {
+ format?: string;
+}
+
+export interface ArgOptions {
+ defaultValue?: string;
+}
+
+export interface AsExistingOptions {
+ resourceGroup?: string | ParameterResource | Awaitable;
+}
+
+export interface BuildOptions {
+ resourceLogger?: Awaitable;
+ cancellationToken?: AbortSignal | CancellationToken;
+}
+
+export interface CompleteStepMarkdownOptions {
+ completionState?: string;
+ cancellationToken?: AbortSignal | CancellationToken;
+}
+
+export interface CompleteStepOptions {
+ completionState?: string;
+ cancellationToken?: AbortSignal | CancellationToken;
+}
+
+export interface CompleteTaskMarkdownOptions {
+ completionState?: string;
+ cancellationToken?: AbortSignal | CancellationToken;
+}
+
+export interface CompleteTaskOptions {
+ completionMessage?: string;
+ completionState?: string;
+ cancellationToken?: AbortSignal | CancellationToken;
+}
+
+export interface CopyFromOptions {
+ chown?: string;
+}
+
+export interface CopyOptions {
+ chown?: string;
+}
+
+export interface CreateMarkdownTaskOptions {
+ cancellationToken?: AbortSignal | CancellationToken;
+}
+
+export interface CreateTaskOptions {
+ cancellationToken?: AbortSignal | CancellationToken;
+}
+
+export interface FromOptions {
+ stageName?: string;
+}
+
+export interface GetValueAsyncOptions {
+ cancellationToken?: AbortSignal | CancellationToken;
+}
+
+export interface PublishAsDockerFileOptions {
+ configure?: (obj: ContainerResource) => Promise;
+}
+
+export interface PublishAsExistingOptions {
+ resourceGroup?: string | ParameterResource | Awaitable;
+}
+
+export interface PublishAsNodeServerOptions {
+ outputPath?: string;
+}
+
+export interface PublishAsNpmScriptOptions {
+ startScriptName?: string;
+ runScriptArguments?: string;
+}
+
+export interface PublishAsStaticWebsiteOptions {
+ apiPath?: string;
+ apiTarget?: Awaitable;
+ outputPath?: string;
+ stripPrefix?: boolean;
+ targetEndpointName?: string;
+}
+
+export interface PublishResourceUpdateOptions {
+ state?: string;
+ stateStyle?: string;
+}
+
+export interface RunAsContainer1Options {
+ configureContainer?: (obj: PostgresServerResource) => Promise;
+}
+
+export interface RunAsContainerOptions {
+ configureContainer?: (obj: RedisResource) => Promise;
+}
+
+export interface RunAsExistingOptions {
+ resourceGroup?: string | ParameterResource | Awaitable;
+}
+
+export interface RunOptions {
+ cancellationToken?: AbortSignal | CancellationToken;
+}
+
+export interface SaveStateJsonOptions {
+ cancellationToken?: AbortSignal | CancellationToken;
+}
+
+export interface UpdateTaskMarkdownOptions {
+ cancellationToken?: AbortSignal | CancellationToken;
+}
+
+export interface UpdateTaskOptions {
+ cancellationToken?: AbortSignal | CancellationToken;
+}
+
+export interface WaitForCompletionOptions {
+ exitCode?: number;
+}
+
+export interface WaitForOptions {
+ waitBehavior?: WaitBehavior;
+}
+
+export interface WaitForResourceStateOptions {
+ targetState?: string;
+}
+
+export interface WaitForStartOptions {
+ waitBehavior?: WaitBehavior;
+}
+
+export interface WithAccessKeyAuthenticationOptions {
+ keyVaultBuilder?: Awaitable;
+}
+
+export interface WithAutoIconOptions {
+ enabled?: boolean;
+}
+
+export interface WithBindMountOptions {
+ isReadOnly?: boolean;
+}
+
+export interface WithBrowserDebuggerOptions {
+ browser?: string;
+}
+
+export interface WithBuildScriptOptions {
+ args?: string[];
+}
+
+export interface WithBunOptions {
+ install?: boolean;
+ installArgs?: string[];
+}
+
+export interface WithCommandOptions {
+ commandOptions?: CommandOptions;
+}
+
+export interface WithContainerCertificatePathsOptions {
+ customCertificatesDestination?: string;
+ defaultCertificateBundlePaths?: string[];
+ defaultCertificateDirectoryPaths?: string[];
+}
+
+export interface WithDataBindMountOptions {
+ isReadOnly?: boolean;
+}
+
+export interface WithDataVolumeOptions {
+ name?: string;
+ isReadOnly?: boolean;
+}
+
+export interface WithDescriptionOptions {
+ enableMarkdown?: boolean;
+}
+
+export interface WithDockerfileBaseImageOptions {
+ buildImage?: string;
+ runtimeImage?: string;
+}
+
+export interface WithDockerfileBuilderOptions {
+ stage?: string;
+}
+
+export interface WithDockerfileOptions {
+ dockerfilePath?: string;
+ stage?: string;
+}
+
+export interface WithEndpointCallbackOptions {
+ createIfNotExists?: boolean;
+}
+
+export interface WithEndpointOptions {
+ port?: number;
+ targetPort?: number;
+ scheme?: string;
+ name?: string;
+ env?: string;
+ isProxied?: boolean;
+ isExternal?: boolean;
+ protocol?: ProtocolType;
+}
+
+export interface WithHideFromDashboardOptions {
+ displayName?: string;
+}
+
+export interface WithHostPortOptions {
+ port?: number;
+}
+
+export interface WithHttpEndpointCallbackOptions {
+ name?: string;
+ createIfNotExists?: boolean;
+}
+
+export interface WithHttpEndpointOptions {
+ port?: number;
+ targetPort?: number;
+ name?: string;
+ env?: string;
+ isProxied?: boolean;
+}
+
+export interface WithHttpHealthCheckOptions {
+ path?: string;
+ statusCode?: number;
+ endpointName?: string;
+}
+
+export interface WithHttpProbeOptions {
+ path?: string;
+ initialDelaySeconds?: number;
+ periodSeconds?: number;
+ timeoutSeconds?: number;
+ failureThreshold?: number;
+ successThreshold?: number;
+ endpointName?: string;
+}
+
+export interface WithHttpsDeveloperCertificateOptions {
+ password?: Awaitable;
+}
+
+export interface WithHttpsEndpointCallbackOptions {
+ name?: string;
+ createIfNotExists?: boolean;
+}
+
+export interface WithHttpsEndpointOptions {
+ port?: number;
+ targetPort?: number;
+ name?: string;
+ env?: string;
+ isProxied?: boolean;
+}
+
+export interface WithIconNameOptions {
+ iconVariant?: IconVariant;
+}
+
+export interface WithImageOptions {
+ tag?: string;
+}
+
+export interface WithLikeC4DetailsOptions {
+ label?: string;
+ technology?: string;
+ description?: string;
+ summary?: string;
+ icon?: string;
+ configure?: (obj: LikeC4NodeDetailsAnnotation) => Promise;
+}
+
+export interface WithLikeC4ReferenceOptions {
+ configure?: (obj: LikeC4RelationshipDetailsAnnotation) => Promise;
+}
+
+export interface WithLikeC4ReferenceWithEnvironmentOptions {
+ configure?: (obj: LikeC4RelationshipDetailsAnnotation) => Promise;
+ connectionName?: string;
+ optional?: boolean;
+ skipAspireReference?: boolean;
+}
+
+export interface WithLinkNodeOptions {
+ title?: string;
+}
+
+export interface WithLinkRelationshipOptions {
+ title?: string;
+}
+
+export interface WithLinkUriNodeOptions {
+ title?: string;
+}
+
+export interface WithLinkUriRelationshipOptions {
+ title?: string;
+}
+
+export interface WithLocalCLIOptions {
+ runtime?: LocalCLIRuntime;
+}
+
+export interface WithMcpServerOptions {
+ path?: string;
+ endpointName?: string;
+}
+
+export interface WithNpmOptions {
+ install?: boolean;
+ installCommand?: string;
+ installArgs?: string[];
+}
+
+export interface WithOtlpExporterOptions {
+ protocol?: OtlpProtocol;
+}
+
+export interface WithParameterOptions {
+ value?: string | string[] | ParameterResource | AzureKeyVaultResource | AzureManagedRedisResource | AzurePostgresFlexibleServerDatabaseResource | AzurePostgresFlexibleServerResource | PostgresDatabaseResource | PostgresServerResource | RedisResource | ResourceWithConnectionString | BicepOutputReference | ReferenceExpression | EndpointReference | Awaitable;
+}
+
+export interface WithPasswordAuthenticationOptions {
+ keyVaultBuilder?: Awaitable;
+ userName?: Awaitable;
+ password?: Awaitable;
+}
+
+export interface WithPersistenceOptions {
+ interval?: number;
+ keysChangedThreshold?: number;
+}
+
+export interface WithPgAdminOptions {
+ configureContainer?: (obj: PgAdminContainerResource) => Promise;
+ containerName?: string;
+}
+
+export interface WithPgWebOptions {
+ configureContainer?: (obj: PgWebContainerResource) => Promise;
+ containerName?: string;
+}
+
+export interface WithPipelineStepFactoryOptions {
+ dependsOn?: string[];
+ requiredBy?: string[];
+ tags?: string[];
+ description?: string;
+}
+
+export interface WithPnpmOptions {
+ install?: boolean;
+ installArgs?: string[];
+}
+
+export interface WithPostgresMcpOptions {
+ configureContainer?: (obj: PostgresMcpContainerResource) => Promise;
+ containerName?: string;
+}
+
+export interface WithRedisCommanderOptions {
+ configureContainer?: (obj: RedisCommanderResource) => Promise;
+ containerName?: string;
+}
+
+export interface WithRedisInsightOptions {
+ configureContainer?: (obj: RedisInsightResource) => Promise;
+ containerName?: string;
+}
+
+export interface WithReferenceOptions {
+ connectionName?: string;
+ optional?: boolean;
+ name?: string;
+}
+
+export interface WithRequiredCommandOptions {
+ helpLink?: string;
+}
+
+export interface WithRunScriptOptions {
+ args?: string[];
+}
+
+export interface WithUrlOptions {
+ displayText?: string;
+}
+
+export interface WithVolumeOptions {
+ name?: string;
+ isReadOnly?: boolean;
+}
+
+export interface WithYarnOptions {
+ install?: boolean;
+ installArgs?: string[];
+}
+
+// ============================================================================
+// AfterResourcesCreatedEvent
+// ============================================================================
+
+export interface AfterResourcesCreatedEvent {
+ toJSON(): MarshalledHandle;
+ /** Gets the Services property */
+ services(): Promise;
+ /** Gets the Model property */
+ model(): Promise;
+}
+
+// ============================================================================
+// AfterResourcesCreatedEventImpl
+// ============================================================================
+
+/**
+ * Type class for AfterResourcesCreatedEvent.
+ */
+class AfterResourcesCreatedEventImpl implements AfterResourcesCreatedEvent {
+ constructor(private _handle: AfterResourcesCreatedEventHandle, private _client: AspireClientRpc) {}
+
+ /** Serialize for JSON-RPC transport */
+ toJSON(): MarshalledHandle { return this._handle.toJSON(); }
+
+ async services(): Promise {
+ const handle = await this._client.invokeCapability(
+ 'Aspire.Hosting.ApplicationModel/AfterResourcesCreatedEvent.services',
+ { context: this._handle }
+ );
+ return new ServiceProviderImpl(handle, this._client);
+ }
+
+ async model(): Promise {
+ const handle = await this._client.invokeCapability(
+ 'Aspire.Hosting.ApplicationModel/AfterResourcesCreatedEvent.model',
+ { context: this._handle }
+ );
+ return new DistributedApplicationModelImpl(handle, this._client);
+ }
+
+}
+
+// ============================================================================
+// AspireC4DiagramOptions
+// ============================================================================
+
+export interface AspireC4DiagramOptions {
+ toJSON(): MarshalledHandle;
+ /** Gets the GeneratedViewId property */
+ generatedViewId: {
+ get: () => Promise;
+ set: (value: string) => Promise;
+ };
+ /** Gets the DefaultViewId property */
+ defaultViewId: {
+ get: () => Promise;
+ set: (value: string) => Promise;
+ };
+ /** Gets the Title property */
+ title: {
+ get: () => Promise;
+ set: (value: string) => Promise;
+ };
+ /** Gets the ViewTitle property */
+ viewTitle: {
+ get: () => Promise;
+ set: (value: string) => Promise;
+ };
+ /** Gets the ViewDescription property */
+ viewDescription: {
+ get: () => Promise;
+ set: (value: string) => Promise;
+ };
+ /** Gets the OutputDirectory property */
+ outputDirectory: {
+ get: () => Promise;
+ set: (value: string) => Promise;
+ };
+ /** Gets the FileName property */
+ fileName: {
+ get: () => Promise;
+ set: (value: string) => Promise;
+ };
+ /** Gets the DisableHMR property */
+ disableHMR: {
+ get: () => Promise;
+ set: (value: boolean) => Promise;
+ };
+ /** Gets the HMRPort property */
+ hMRPort: {
+ get: () => Promise;
+ set: (value: number) => Promise;
+ };
+ /** Gets the ContainerImageTag property */
+ containerImageTag: {
+ get: () => Promise;
+ set: (value: string) => Promise;
+ };
+ /** Gets the CheckLatestImageVersion property */
+ checkLatestImageVersion: {
+ get: () => Promise;
+ set: (value: boolean) => Promise;
+ };
+ /** Gets the AutoIconsEnabled property */
+ autoIconsEnabled: {
+ get: () => Promise;
+ set: (value: boolean) => Promise;
+ };
+ /** Gets the HideFromDashboard property */
+ hideFromDashboard: {
+ get: () => Promise;
+ set: (value: boolean) => Promise;
+ };
+ /** Gets the DashboardLinkDisplayName property */
+ dashboardLinkDisplayName: {
+ get: () => Promise;
+ set: (value: string) => Promise;
+ };
+ /** Gets the RelationshipKindSyntax property */
+ relationshipKindSyntax: {
+ get: () => Promise;
+ set: (value: LikeC4RelationshipKindSyntax) => Promise;
+ };
+ /** Gets the FormatGeneratedFile property */
+ formatGeneratedFile: {
+ get: () => Promise;
+ set: (value: boolean) => Promise;
+ };
+ /** Gets the ExternalProcessTimeoutSeconds property */
+ externalProcessTimeoutSeconds: {
+ get: () => Promise;
+ set: (value: number) => Promise;
+ };
+ /** Gets the UseDotIfAvailable property */
+ useDotIfAvailable: {
+ get: () => Promise;
+ set: (value: boolean) => Promise;
+ };
+ /** Gets the AutoIncludeAspireMetadata property */
+ autoIncludeAspireMetadata: {
+ get: () => Promise;
+ set: (value: AspireMetadataInclusion) => Promise;
+ };
+ /** Gets the NormaliseMetadataBehaviour property */
+ normaliseMetadataBehaviour: {
+ get: () => Promise;
+ set: (value: NormaliseMetadataBehaviour) => Promise;
+ };
+ /** Gets the AdditionalDSLFiles property */
+ readonly additionalDSLFiles: AspireList;
+ /** Gets the AdditionalDSLFolders property */
+ readonly additionalDSLFolders: AspireList;
+ /** Gets the ImageAliases property */
+ readonly imageAliases: AspireDict;
+ /** Gets the GenerateConfigFile property */
+ generateConfigFile: {
+ get: () => Promise;
+ set: (value: boolean) => Promise;
+ };
+ /** Gets the IncludeAspireDashboardLinks property */
+ includeAspireDashboardLinks: {
+ get: () => Promise;
+ set: (value: boolean) => Promise;
+ };
+ /** Gets the IncludeAspireTokenInDashboardLinks property */
+ includeAspireTokenInDashboardLinks: {
+ get: () => Promise;
+ set: (value: boolean) => Promise;
+ };
+ /** Gets the StateTagMap property */
+ readonly stateTagMap: AspireDict;
+ /** Gets the IncludeDefaultStateStyles property */
+ includeDefaultStateStyles: {
+ get: () => Promise;
+ set: (value: boolean) => Promise;
+ };
+ /** Gets the ConfigFileMetadata property */
+ readonly configFileMetadata: AspireDict;
+}
+
+// ============================================================================
+// AspireC4DiagramOptionsImpl
+// ============================================================================
+
+/**
+ * Type class for AspireC4DiagramOptions.
+ */
+class AspireC4DiagramOptionsImpl implements AspireC4DiagramOptions {
+ constructor(private _handle: AspireC4DiagramOptionsHandle, private _client: AspireClientRpc) {}
+
+ /** Serialize for JSON-RPC transport */
+ toJSON(): MarshalledHandle { return this._handle.toJSON(); }
+
+ generatedViewId = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.generatedViewId',
+ { context: this._handle }
+ );
+ },
+ set: async (value: string): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setGeneratedViewId',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ defaultViewId = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.defaultViewId',
+ { context: this._handle }
+ );
+ },
+ set: async (value: string): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setDefaultViewId',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ title = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.title',
+ { context: this._handle }
+ );
+ },
+ set: async (value: string): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setTitle',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ viewTitle = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.viewTitle',
+ { context: this._handle }
+ );
+ },
+ set: async (value: string): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setViewTitle',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ viewDescription = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.viewDescription',
+ { context: this._handle }
+ );
+ },
+ set: async (value: string): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setViewDescription',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ outputDirectory = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.outputDirectory',
+ { context: this._handle }
+ );
+ },
+ set: async (value: string): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setOutputDirectory',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ fileName = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.fileName',
+ { context: this._handle }
+ );
+ },
+ set: async (value: string): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setFileName',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ disableHMR = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.disableHMR',
+ { context: this._handle }
+ );
+ },
+ set: async (value: boolean): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setDisableHMR',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ hMRPort = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.hMRPort',
+ { context: this._handle }
+ );
+ },
+ set: async (value: number): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setHMRPort',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ containerImageTag = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.containerImageTag',
+ { context: this._handle }
+ );
+ },
+ set: async (value: string): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setContainerImageTag',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ checkLatestImageVersion = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.checkLatestImageVersion',
+ { context: this._handle }
+ );
+ },
+ set: async (value: boolean): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setCheckLatestImageVersion',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ autoIconsEnabled = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.autoIconsEnabled',
+ { context: this._handle }
+ );
+ },
+ set: async (value: boolean): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setAutoIconsEnabled',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ hideFromDashboard = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.hideFromDashboard',
+ { context: this._handle }
+ );
+ },
+ set: async (value: boolean): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setHideFromDashboard',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ dashboardLinkDisplayName = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.dashboardLinkDisplayName',
+ { context: this._handle }
+ );
+ },
+ set: async (value: string): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setDashboardLinkDisplayName',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ relationshipKindSyntax = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.relationshipKindSyntax',
+ { context: this._handle }
+ );
+ },
+ set: async (value: LikeC4RelationshipKindSyntax): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setRelationshipKindSyntax',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ formatGeneratedFile = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.formatGeneratedFile',
+ { context: this._handle }
+ );
+ },
+ set: async (value: boolean): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setFormatGeneratedFile',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ externalProcessTimeoutSeconds = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.externalProcessTimeoutSeconds',
+ { context: this._handle }
+ );
+ },
+ set: async (value: number): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setExternalProcessTimeoutSeconds',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ useDotIfAvailable = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.useDotIfAvailable',
+ { context: this._handle }
+ );
+ },
+ set: async (value: boolean): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setUseDotIfAvailable',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ autoIncludeAspireMetadata = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.autoIncludeAspireMetadata',
+ { context: this._handle }
+ );
+ },
+ set: async (value: AspireMetadataInclusion): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setAutoIncludeAspireMetadata',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ normaliseMetadataBehaviour = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.normaliseMetadataBehaviour',
+ { context: this._handle }
+ );
+ },
+ set: async (value: NormaliseMetadataBehaviour): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setNormaliseMetadataBehaviour',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ private _additionalDSLFiles?: AspireList;
+ get additionalDSLFiles(): AspireList {
+ if (!this._additionalDSLFiles) {
+ this._additionalDSLFiles = new AspireList(
+ this._handle,
+ this._client,
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.additionalDSLFiles',
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.additionalDSLFiles'
+ );
+ }
+ return this._additionalDSLFiles;
+ }
+
+ private _additionalDSLFolders?: AspireList;
+ get additionalDSLFolders(): AspireList {
+ if (!this._additionalDSLFolders) {
+ this._additionalDSLFolders = new AspireList(
+ this._handle,
+ this._client,
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.additionalDSLFolders',
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.additionalDSLFolders'
+ );
+ }
+ return this._additionalDSLFolders;
+ }
+
+ private _imageAliases?: AspireDict;
+ get imageAliases(): AspireDict {
+ if (!this._imageAliases) {
+ this._imageAliases = new AspireDict(
+ this._handle,
+ this._client,
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.imageAliases',
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.imageAliases'
+ );
+ }
+ return this._imageAliases;
+ }
+
+ generateConfigFile = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.generateConfigFile',
+ { context: this._handle }
+ );
+ },
+ set: async (value: boolean): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setGenerateConfigFile',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ includeAspireDashboardLinks = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.includeAspireDashboardLinks',
+ { context: this._handle }
+ );
+ },
+ set: async (value: boolean): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setIncludeAspireDashboardLinks',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ includeAspireTokenInDashboardLinks = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.includeAspireTokenInDashboardLinks',
+ { context: this._handle }
+ );
+ },
+ set: async (value: boolean): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setIncludeAspireTokenInDashboardLinks',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ private _stateTagMap?: AspireDict;
+ get stateTagMap(): AspireDict {
+ if (!this._stateTagMap) {
+ this._stateTagMap = new AspireDict(
+ this._handle,
+ this._client,
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.stateTagMap',
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.stateTagMap'
+ );
+ }
+ return this._stateTagMap;
+ }
+
+ includeDefaultStateStyles = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.includeDefaultStateStyles',
+ { context: this._handle }
+ );
+ },
+ set: async (value: boolean): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.setIncludeDefaultStateStyles',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+ private _configFileMetadata?: AspireDict;
+ get configFileMetadata(): AspireDict {
+ if (!this._configFileMetadata) {
+ this._configFileMetadata = new AspireDict(
+ this._handle,
+ this._client,
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.configFileMetadata',
+ 'Aspire.Hosting.AspireC4/AspireC4DiagramOptions.configFileMetadata'
+ );
+ }
+ return this._configFileMetadata;
+ }
+
+}
+
+// ============================================================================
+// AzureResourceInfrastructure
+// ============================================================================
+
+export interface AzureResourceInfrastructure {
+ toJSON(): MarshalledHandle;
+ /** Gets the BicepName property */
+ bicepName(): Promise;
+ /** Gets the TargetScope property */
+ targetScope: {
+ get: () => Promise;
+ set: (value: DeploymentScope) => Promise;
+ };
+}
+
+// ============================================================================
+// AzureResourceInfrastructureImpl
+// ============================================================================
+
+/**
+ * Type class for AzureResourceInfrastructure.
+ */
+class AzureResourceInfrastructureImpl implements AzureResourceInfrastructure {
+ constructor(private _handle: AzureResourceInfrastructureHandle, private _client: AspireClientRpc) {}
+
+ /** Serialize for JSON-RPC transport */
+ toJSON(): MarshalledHandle { return this._handle.toJSON(); }
+
+ async bicepName(): Promise {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.Azure/AzureResourceInfrastructure.bicepName',
+ { context: this._handle }
+ );
+ }
+
+ targetScope = {
+ get: async (): Promise => {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.Azure/AzureResourceInfrastructure.targetScope',
+ { context: this._handle }
+ );
+ },
+ set: async (value: DeploymentScope): Promise => {
+ await this._client.invokeCapability(
+ 'Aspire.Hosting.Azure/AzureResourceInfrastructure.setTargetScope',
+ { context: this._handle, value }
+ );
+ }
+ };
+
+}
+
+// ============================================================================
+// BeforeResourceStartedEvent
+// ============================================================================
+
+export interface BeforeResourceStartedEvent {
+ toJSON(): MarshalledHandle;
+ /** Gets the Resource property */
+ resource(): Promise;
+ /** Gets the Services property */
+ services(): Promise;
+}
+
+// ============================================================================
+// BeforeResourceStartedEventImpl
+// ============================================================================
+
+/**
+ * Type class for BeforeResourceStartedEvent.
+ */
+class BeforeResourceStartedEventImpl implements BeforeResourceStartedEvent {
+ constructor(private _handle: BeforeResourceStartedEventHandle, private _client: AspireClientRpc) {}
+
+ /** Serialize for JSON-RPC transport */
+ toJSON(): MarshalledHandle { return this._handle.toJSON(); }
+
+ async resource(): Promise {
+ const handle = await this._client.invokeCapability(
+ 'Aspire.Hosting.ApplicationModel/BeforeResourceStartedEvent.resource',
+ { context: this._handle }
+ );
+ return new ResourceImpl(handle, this._client);
+ }
+
+ async services(): Promise {
+ const handle = await this._client.invokeCapability(
+ 'Aspire.Hosting.ApplicationModel/BeforeResourceStartedEvent.services',
+ { context: this._handle }
+ );
+ return new ServiceProviderImpl(handle, this._client);
+ }
+
+}
+
+// ============================================================================
+// BeforeStartEvent
+// ============================================================================
+
+export interface BeforeStartEvent {
+ toJSON(): MarshalledHandle;
+ /** Gets the Services property */
+ services(): Promise;
+ /** Gets the Model property */
+ model(): Promise;
+}
+
+// ============================================================================
+// BeforeStartEventImpl
+// ============================================================================
+
+/**
+ * Type class for BeforeStartEvent.
+ */
+class BeforeStartEventImpl implements BeforeStartEvent {
+ constructor(private _handle: BeforeStartEventHandle, private _client: AspireClientRpc) {}
+
+ /** Serialize for JSON-RPC transport */
+ toJSON(): MarshalledHandle { return this._handle.toJSON(); }
+
+ async services(): Promise {
+ const handle = await this._client.invokeCapability(
+ 'Aspire.Hosting.ApplicationModel/BeforeStartEvent.services',
+ { context: this._handle }
+ );
+ return new ServiceProviderImpl(handle, this._client);
+ }
+
+ async model(): Promise {
+ const handle = await this._client.invokeCapability(
+ 'Aspire.Hosting.ApplicationModel/BeforeStartEvent.model',
+ { context: this._handle }
+ );
+ return new DistributedApplicationModelImpl(handle, this._client);
+ }
+
+}
+
+// ============================================================================
+// BicepOutputReference
+// ============================================================================
+
+export interface BicepOutputReference {
+ toJSON(): MarshalledHandle;
+ /** Gets the Name property */
+ name(): Promise;
+ /** Gets the Value property */
+ value(): Promise;
+ /** Gets the ValueExpression property */
+ valueExpression(): Promise;
+}
+
+// ============================================================================
+// BicepOutputReferenceImpl
+// ============================================================================
+
+/**
+ * Type class for BicepOutputReference.
+ */
+class BicepOutputReferenceImpl implements BicepOutputReference {
+ constructor(private _handle: BicepOutputReferenceHandle, private _client: AspireClientRpc) {}
+
+ /** Serialize for JSON-RPC transport */
+ toJSON(): MarshalledHandle { return this._handle.toJSON(); }
+
+ async name(): Promise {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.Azure/BicepOutputReference.name',
+ { context: this._handle }
+ );
+ }
+
+ async value(): Promise {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.Azure/BicepOutputReference.value',
+ { context: this._handle }
+ );
+ }
+
+ async valueExpression(): Promise {
+ return await this._client.invokeCapability(
+ 'Aspire.Hosting.Azure/BicepOutputReference.valueExpression',
+ { context: this._handle }
+ );
+ }
+
+}
+
+// ============================================================================
+// CommandLineArgsCallbackContext
+// ============================================================================
+
+export interface CommandLineArgsCallbackContext {
+ toJSON(): MarshalledHandle;
+ /** Gets the command-line argument editor */
+ args(): Promise;
+ /** Gets the callback logger facade */
+ log(): Promise;
+ /** Gets the resource associated with this callback */
+ resource(): Promise;
+ /** Gets the execution context for this callback invocation */
+ executionContext(): Promise;
+}
+
+// ============================================================================
+// CommandLineArgsCallbackContextImpl
+// ============================================================================
+
+/**
+ * Type class for CommandLineArgsCallbackContext.
+ */
+class CommandLineArgsCallbackContextImpl implements CommandLineArgsCallbackContext {
+ constructor(private _handle: CommandLineArgsCallbackContextHandle, private _client: AspireClientRpc) {}
+
+ /** Serialize for JSON-RPC transport */
+ toJSON(): MarshalledHandle { return this._handle.toJSON(); }
+
+ async args(): Promise