Skip to content

th-56aa52: IToolHook seam through the .NET server (polyglot parity)#323

Merged
brentrager merged 2 commits into
mainfrom
th-56aa52-net-hookseam
Jul 22, 2026
Merged

th-56aa52: IToolHook seam through the .NET server (polyglot parity)#323
brentrager merged 2 commits into
mainfrom
th-56aa52-net-hookseam

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

Polyglot ToolHook seam parity.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ji3rA65cTfU9vPQh9HAASJ

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
@changeset-bot

changeset-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 050ae04

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@brentrager
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
@brentrager
brentrager merged commit 3f38e34 into main Jul 22, 2026
1 check failed
brentrager added a commit that referenced this pull request Jul 22, 2026
…327)

Heals the .NET server build on main after #323: the IToolHook seam needs the
core release that carries it (core #96/#97/#98, published as 1.7.1).


Claude-Session: https://claude.ai/code/session_01Ji3rA65cTfU9vPQh9HAASJ

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant