Skip to content

dotnet: add live TypeScript session conformance - #424

Merged
Connor Peet (connor4312) merged 2 commits into
microsoft:mainfrom
joshmouch:pr/dotnet-typescript-session-conformance
Aug 29, 2026
Merged

dotnet: add live TypeScript session conformance#424
Connor Peet (connor4312) merged 2 commits into
microsoft:mainfrom
joshmouch:pr/dotnet-typescript-session-conformance

Conversation

@joshmouch

Copy link
Copy Markdown
Contributor

Summary

Add a hermetic real-socket interoperability lane between the current first-party .NET client and the repository-local TypeScript session reducer.

The test proves three runtime obligations that static fixture replay does not cover:

  1. A real ClientWebSocket connection performs JSON-RPC initialize and negotiates the current protocol version.
  2. The .NET client seeds session state from InitializeResult snapshots.
  3. Four streamed action notifications converge structurally after the TypeScript host applies the canonical sessionReducer and the .NET client applies the handwritten C# Reducers.

The host binds to an ephemeral 127.0.0.1 port, has bounded readiness and shutdown, and is typechecked in CI. It uses only repository-local sources and current project references: no published package, absolute developer path, symlink, OpenAgency, Conflux, or external service.

Validation

  • interoperability host TypeScript check
  • change-fragment verification: 21 fragments
  • AgentHostProtocol.Abstractions release build: 0 warnings/errors
  • AgentHostProtocol release build: 0 warnings/errors
  • AgentHostProtocol.Tests release build: 0 warnings/errors
  • targeted real-socket test: 1 passed in 549 ms
  • complete .NET suite: 536 passed, 0 failed, 0 skipped
  • dotnet whitespace format verification
  • owned host process cleanup: session-host-clean
  • git diff --check

The build was partitioned by dependency layer so each finite validation command remains bounded; this does not weaken the complete test suite gate.

@joshmouch
Josh (joshmouch) marked this pull request as draft August 27, 2026 05:08
@joshmouch
Josh (joshmouch) marked this pull request as ready for review August 27, 2026 12:45
failure(socket, request.id, -32601, `unknown method: ${request.method}`);
}

function acceptFrames(socket: Duplex, initialData: Buffer): void {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node has a built-in WebSocket client now if we want to use that, I am also not opposed to just having a dev dependency here on the ws package for the server side

@joshmouch
Josh (joshmouch) force-pushed the pr/dotnet-typescript-session-conformance branch from 2271b78 to 1b01b27 Compare August 27, 2026 22:10
@connor4312
Connor Peet (connor4312) merged commit adf77a5 into microsoft:main Aug 29, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants