Repository navigation
feat: FDC3 for native side apps over a gRPC named pipe, discovered from the App Directory - #10
Merged
Merged
Conversation
… pipe New Bermuda.Fdc3.Grpc project: a Kestrel named-pipe (current-user-only) gRPC service mirroring IFdc3Commands. Each Subscribe(app_id) stream is one app instance (app id validated against the AppDirectory) and is disposed when the stream or pipe ends; Fdc3Errors strings are the gRPC status detail. Started/stopped by App.xaml.cs (FDC3_GRPC_ENABLED, FDC3_GRPC_PIPE). Adds a reference .NET pipe client, integration tests over a real pipe and a docs/fdc3.md section. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Bermuda.Fdc3.Grpc.Generator reflects over the contract and writes fdc3.proto, the proto<->contract mapping and the service overrides, run by the Bermuda.Fdc3.Grpc build. Replaces the hand-written proto, mapping and 22 service methods. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Bermuda.NativeApp connects to the host's gRPC pipe as native-incidents (registered in fdc3-appd.json), joins a channel and acks incidents it receives, as a broadcast or as a ViewIncident intent result. The AppHost starts it after the host. Fdc3PipeClient moves into Bermuda.Fdc3.Grpc so native .NET apps can reuse it. Playwright e2e covers web->native and native->web over the channel, the intent round trip and findIntent. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The proto is now hand-written (Protos/fdc3.proto) and built by Grpc.Tools. The generator reads protoc's descriptor set, fails the build if the C# contract disagrees with it, and writes the mapping/service glue from it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fdc3.proto (new Bermuda.Fdc3.Proto project) is now the single source of truth. Its build runs Bermuda.Fdc3.Grpc.Generator on protoc's descriptor set to write the Fdc3* records and IFdc3Commands (Bermuda.IpcContract/ Generated) and the gRPC glue (Bermuda.Fdc3.Grpc/Generated). The pipe client moves into the proto project so native apps need no ASP.NET Core. API event details are JSON; AgentEvent's oneof is `kind`. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The native side app is a second application of the Bermuda package (own startup task, no Start entry), published into the same folder as the host, so it installs and updates with Bermuda from the same .appinstaller. CI publishes it into the release folder and fails if the committed generated FDC3 code is stale. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The host launches Bermuda.NativeApp.exe from its own package on startup (NATIVE_APP_AUTOSTART=false disables it) and closes it on exit; the side app allows one copy per user. Its own startup task is removed: the host is what starts it, so it no longer needs a sign-in entry. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…name The name had lost it (LocalBermuda...), so the copy Bermuda autostarts and the one Aspire starts both stayed up and the e2e saw two native-incidents instances. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fdc3-appd.json is now the one list of native side apps (type native, details.path, details.project). Aspire, the MSIX build (native-apps.ps1 publishes each project and adds its manifest Application), CI and the host's autostart all read it, so adding a native app is a one-line edit of that file. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ctory with a C# file app The native-apps script is now a .NET file-based app (dotnet run --file) instead of PowerShell; the AppHost registers native apps with Aspire's new AddCSharpApp. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
moonolgerd
commented
Nov 11, 2026
moonolgerd
left a comment
Owner
Author
There was a problem hiding this comment.
Review
Five issues, marked inline.
- Untargeted
raiseIntent("ViewIncident")fails once the native app is connected. Bothnative-incidentsandbermuda-incidentslisten for it, andChooseTargetrejects a raise with more than one running listener (ResolverUnavailable). The README example raises with no target app. The new e2e always passes an instance id. Subscribetrusts the caller's app id. Any process of the current user can join as any directory app, includingbermuda-incidents.openand intent launch cannot start a native app.WindowAppLauncherstill requires a web URL, so those calls fail withErrorOnLaunch. Autostart runs only fromOnStartupand does not bring the process back if it exits later.- Autostart does not use the host's pipe name.
FDC3_GRPC_PIPEin appsettings never reaches the child, which only reads the environment variable. - One unexpected exception ends the side app for the rest of the session. The reconnect filter misses
HttpRequestExceptionandJsonException, and Bermuda will not start the exe again.
The pipe tests cover broadcast, intent round-trip, FDC3 error strings, and instance ids used from another connection. Still missing: an untargeted ViewIncident with both listeners connected, open of a native app that is down, and the appsettings pipe name. A signed MSIX install (both self-contained apps in one folder, manifest patched) is still unverified.
… pipe name and robustness - the native sample handles AcknowledgeIncident, so an untargeted ViewIncident still resolves to the dashboard - Subscribe only accepts type native apps; web apps cannot be claimed over the pipe - fdc3.open / intents start a native app that is down (NativeAppHost), passing FDC3_GRPC_PIPE and FDC3_INSTANCE_ID; Subscribe takes instance_id - details.path must stay inside Bermuda's folder; Aspire passes FDC3_GRPC_PIPE through - the sample reconnects after any failure and tolerates a non-JSON payload Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…atching tools/native-apps.cs now does publish, manifest and appinstaller steps with real XML handling and validation, reporting one clear error per problem. The manifest no longer carries a placeholder comment, and the build no longer parses tool output or edits the manifest with regexes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The runner is a normal user machine: an installed Bermuda's native app was connecting to the same default FDC3 pipe as the test host (two native-incidents instances), and a concurrent local Aspire held the dashboard port. Each run now gets its own FDC3 pipe, web and CDP ports and Aspire endpoints, e2e jobs are serialised, and CI never reuses an existing server. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Native side apps can now join Bermuda's in-process FDC3 2.2 DesktopAgent over gRPC on a Windows named pipe, next to the WebView2 windows, sharing channels and intents with them. Web behaviour is unchanged.
Bermuda.Fdc3.Grpc): Kestrel named-pipe transport, current-user-only, HTTP/2 without TLS. The pipe name is configurable and defaults to a per-user name. EachSubscribe(app_id)stream is one app instance; the app id is validated against the App Directory, and the instance is removed when the stream or pipe ends.Fdc3Errorsstrings are the gRPC status detail. Config:FDC3_GRPC_ENABLED,FDC3_GRPC_PIPE.Bermuda.Fdc3.Proto/Protos/fdc3.proto). Building that project generates the gRPC classes (Grpc.Tools), the C#IFdc3Commandscontract inBermuda.IpcContract(the old hand-writtenFdc3Contract.csis gone), and the proto-to-record mapping plus service overrides. The generated files are checked in and CI fails if they are stale. The conventions are documented at the top of the proto.Fdc3PipeClientlives inBermuda.Fdc3.Proto, so a native app does not need ASP.NET Core.Bermuda.NativeApp,native-incidents): joins a channel and acknowledges incidents andViewIncidentintents. It allows one copy per user.fdc3-appd.jsonwithtype: native,details.pathanddetails.projectis all it takes. Aspire (bumped to 13.6.5, usingAddCSharpApp) starts it,CreateMsixpublishes it into Bermuda's package and adds its manifest<Application>(viatools/native-apps.cs, a file-based C# app run withdotnet run --file), CI publishes it for tagged releases, and Bermuda starts and stops it with the host (NATIVE_APP_AUTOSTART=falseturns that off). It ships inside Bermuda's MSIX, so it installs, updates and is signed with Bermuda.Tests
dotnet build Bermuda.slnxanddotnet test Bermuda.slnx: 9 pipe integration tests plus the existing 47 pass.pnpm e2e: 124 pass, including 4 new Playwright tests against the native app (metadata, web broadcast to native ack, intent result,findIntent).<Application>.See
docs/fdc3.mdsection 7a.🤖 Generated with Claude Code