th-56aa52: IToolHook seam through the .NET server (polyglot parity)#323
Merged
Conversation
Supplies the engine's new IToolHook chain (surveillance / redaction) to every turn's tool registry — the C# analog of the Rust server installing NarcHook on the operative's ToolRegistry. The seam mirrors the existing `tools` seam exactly: - TurnRunner: new IReadOnlyList<IToolHook>? toolHooks ctor param; plumbed into AgentOptions.ToolHooks alongside the tools loop (empty ⇒ unchanged). - FrameDispatcher: new toolHooks ctor param → _toolHooks → forwarded to TurnRunner. - BuildDispatcher (SmoothOperatorWebSocketExtensions): resolves the host's IReadOnlyList<IToolHook> from DI, the parallel of the tools resolution. - ToolHookSeamTests: end-to-end over a real WebSocket — a DI-registered spy sees pre+post for the tool call, and a redacting PostCallAsync mutation reaches the wire (the streamed toolResult chunk is scrubbed, not the raw secret). NUGET PUBLISH GATE: server/src references the engine as the published NuGet SmooAI.SmoothOperator.Core 1.5.0, which does NOT yet contain IToolHook (that's on the paired engine branch th-56aa52-net-toolhook). This server code therefore compiles + tests GREEN only against the local engine project reference; it needs a new engine NuGet (>1.5.0) published before it builds against the package. Verified locally by temporarily swapping the PackageReference for a ProjectReference to the sibling engine worktree: server unit (185) + integration (37, incl. the new seam test) all pass. The csproj is committed with the NuGet PackageReference intact. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01USBgWKcgpkWAugmHPE7Bc9
|
brentrager
enabled auto-merge (squash)
July 22, 2026 23:02
…e params Union with main's evolution (logger + preambleChatClient + per-agent confirm-tool patterns). NOTE: needs SmooAI.SmoothOperator.Core > 1.7.0 (with IToolHook, core #97) published to NuGet + PackageReference bump before CI greens. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ji3rA65cTfU9vPQh9HAASJ
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.
Polyglot ToolHook seam parity.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ji3rA65cTfU9vPQh9HAASJ