DD-338 Phase C W5 — consolidate _meta emission onto MCPHelpers + catalog backfill #3

Merged
piersdd merged 2 commits from feat/dd-338-c-w5-flip-mcp-helpers into main 2026-05-24 01:48:27 +00:00
piersdd commented 2026-05-24 01:44:00 +00:00 (Migrated from github.com)

Summary

  • DD-338 Phase C Wave 5 Cluster WA: replace the 160-LOC hand-rolled Sources/AppleNotesBlade/MetaEnvelope.swift with the canonical stallari-mcp-helpers-swift SPM dep (MCPHelpers v0.1.0).
  • Platform bump .macOS(.v13) → .macOS(.v14) to satisfy the canonical lib's minimum platform.
  • Catalog declarations in stallari-plugins/plugins/tools/apple-notes-blade-mcp.json flip audit_surface: minimal → structured for the 3 emitting tools — landed in a sibling stallari-plugins PR (separate atomic unit per spec).

Wire-shape changes (canonical vs hand-rolled v1)

  • redactions ALWAYS emitted ([] when empty). Was omit-when-empty.
  • next_cursor ALWAYS emitted (JSON null when nil). Was omit-when-nil.
  • filtered_by alphabetically sorted by the formatter (caller pre-sort no longer load-bearing).
  • formatMetaLine now throws (encoding-failure surface).
  • MetaEnvelope.init parameter order changed to (matchedTotal, returned, latencyMs, filteredBy, redactions, ...) — all 3 tool handlers updated.

Retained blade-local

  • Duration.toMilliseconds() — clock marshalling helper.
  • metaQueryDigest(_:) — search-query SHA-256 short digest.

Moved into Sources/AppleNotesBlade/MetaHelpers.swift.

Test plan

  • swift package resolve clean
  • swift build clean, zero warnings
  • swift test — 73/73 green
  • MetaEnvelope.swift deleted; grep -rn "MetaEnvelope.swift" Sources/ shows only doc-comment references
  • CHANGELOG entry added (v0.3.0)
  • Version bumped 0.2.0 → 0.3.0
  • New canonical-shape gate test exercises locked input/output pair against MCPHelpers contract

🤖 Generated with Claude Code

## Summary - DD-338 Phase C Wave 5 Cluster WA: replace the 160-LOC hand-rolled `Sources/AppleNotesBlade/MetaEnvelope.swift` with the canonical `stallari-mcp-helpers-swift` SPM dep (MCPHelpers v0.1.0). - Platform bump `.macOS(.v13) → .macOS(.v14)` to satisfy the canonical lib's minimum platform. - Catalog declarations in `stallari-plugins/plugins/tools/apple-notes-blade-mcp.json` flip `audit_surface: minimal → structured` for the 3 emitting tools — landed in a sibling stallari-plugins PR (separate atomic unit per spec). ## Wire-shape changes (canonical vs hand-rolled v1) - `redactions` ALWAYS emitted (`[]` when empty). Was omit-when-empty. - `next_cursor` ALWAYS emitted (JSON `null` when nil). Was omit-when-nil. - `filtered_by` alphabetically sorted by the formatter (caller pre-sort no longer load-bearing). - `formatMetaLine` now throws (encoding-failure surface). - `MetaEnvelope.init` parameter order changed to `(matchedTotal, returned, latencyMs, filteredBy, redactions, ...)` — all 3 tool handlers updated. ## Retained blade-local - `Duration.toMilliseconds()` — clock marshalling helper. - `metaQueryDigest(_:)` — search-query SHA-256 short digest. Moved into `Sources/AppleNotesBlade/MetaHelpers.swift`. ## Test plan - [x] `swift package resolve` clean - [x] `swift build` clean, zero warnings - [x] `swift test` — 73/73 green - [x] `MetaEnvelope.swift` deleted; `grep -rn "MetaEnvelope.swift" Sources/` shows only doc-comment references - [x] CHANGELOG entry added (v0.3.0) - [x] Version bumped 0.2.0 → 0.3.0 - [x] New canonical-shape gate test exercises locked input/output pair against MCPHelpers contract 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No description provided.