Skip to content

v0.13.1 - structural refactor: segments + one tool per file

Choose a tag to compare

@github-actions github-actions released this 15 Nov 10:41
· 11 commits to main since this release

Structural refactor: segments + one tool per file. No behavior changes — tool contracts and the wire format are untouched; 284 selftest + 67 smoke ALL PASS (Windows fd + real Ubuntu in CI, plus the full selftest on the Native AOT binary).

  • Segments: Core/ (engine: document, session registry, analysis — no MCP, no tool JSON), Rpc/ (transport + protocol dispatch), Tools/ (27 tools), Infra/, Testing/ (SelfTest/Smoke — was in the project root). Dependency direction: Program → Rpc → Tools → Core → Infra.
  • 1 tool = 1 class = 1 file: the 8 category files (EditTools.cs alone held 10 tools + helpers + registration, 549 lines) dissolved into 27 per-tool files — editing a tool means opening exactly one file.
  • OOP: the static ToolOps helper became abstract ToolBase (protected Json / LockedAsync / Locked / CompileRegex); HiddenTool : ToolBase; every tool inherits the base.
  • Colocation: each tool's result DTO lives in its file; shared DTOs in Tools/SharedDtos.cs; the session registry (Sessions/Attachment/Presence) moved Tools→Core (engine state); EditSession's 8 model records extracted to Core/SessionModel.cs.
  • Accessors: result DTOs {get;set} → {get;init} (only genuinely post-mutated SavedOk/SaveError keep set); Attachment.LastSeenRev/LastSeen public fields → properties with internal set; SyntaxGate.Engine required fields → required {get;init}.
  • Fix: the hidden-tool filter briefly broke during the refactor — a default-interface-member (ITool.Hidden) loses its class mapping when the interface is no longer named directly in the base list (HiddenTool : ToolBase instead of : ITool). Hidden is now a virtual property of the class hierarchy; caught by the selftest's "20 tools" check.

Full Changelog: v0.13.0...v0.13.1