Skip to content

Capability Discovery via MCP Surface#246

Closed
enricopiovesan wants to merge 7 commits into
mainfrom
022-mcp-wasm-server
Closed

Capability Discovery via MCP Surface#246
enricopiovesan wants to merge 7 commits into
mainfrom
022-mcp-wasm-server

Conversation

@enricopiovesan

@enricopiovesan enricopiovesan commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Rebase the MCP WASM server and federation/governance slice onto current main.

Governing Spec

  • 004-spec-alignment-gate
  • 005-capability-registry
  • 007-workflow-registry-traversal
  • 011-event-registry
  • 015-capability-discovery-mcp
  • 018-event-driven-composition
  • 019-downstream-consumer-contract
  • 020-downstream-integration-validation
  • 021-app-facing-operational-constraints
  • 022-mcp-wasm-server-model
  • 023-browser-hosted-mcp-consumer-model
  • 023-packaged-runtime-artifact
  • 024-packaged-mcp-server-artifact
  • 025-downstream-published-artifact-validation
  • 026-federation-registry-routing
  • 028-schema-alignment-gate-v02

Project Item

What Changed

  • Restored the missing backlog-sync and preflight automation.
  • Kept the planning board, project state, and spec registry aligned with the current active slice.
  • Preserved the latest governance wording and board-audit rules.

Validation

  • Spec alignment checked
  • Contract alignment checked
  • Tests updated and passing
  • Core coverage preserved
  • Required validation gates passing

Notes

This PR also includes the branch rebase that brought the feature tip back onto current main.

enricopiovesan and others added 6 commits April 10, 2026 11:24
* Implement first WASM AI agent example

* Fix repository checks portability

* Specify dedicated MCP WASM server model

* Ignore .claude/worktrees/ directory

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Implement federation registry foundation

* Fix PR 240 federation CI failures

* Add missing downstream artifact spec docs

* Define app-consumable release artifact bundle (#155)

* Implement MCP stdio server package foundation (#163)

* Implement MCP stdio server foundation

* Document MCP stdio server errors

* Fix MCP stdio server test assertions

* Allow panic in MCP stdio tests

* Fix MCP stdio server clippy violations

* Fix MCP stdio server test lint issues

* Format MCP stdio server tests

* Allow test-only clippy lints in MCP stdio server

* Implement core MCP discovery and description operations (#164)

* Implement MCP discovery and description operations

* Format MCP stdio server implementation

* Fix MCP stdio server clippy issues

* Implement MCP execution validation (#166)

* Implement MCP discovery and description operations

* Format MCP stdio server implementation

* Implement MCP execution validation

* Fix MCP execution validation formatting

* Fix MCP execution validation clippy issues

* Prepare app-consumable release bundle (#165)

* Implement convenience MCP operations and execution-report rendering (#167)

* Implement MCP discovery and description operations

* Format MCP stdio server implementation

* Implement MCP execution validation

* Fix MCP execution validation clippy issues

* Implement MCP convenience operations

* Fix mcp stdio server clippy warning

* Implement the first dedicated Traverse MCP WASM server package (#168)

* Implement dedicated MCP WASM server package

* Restore MCP stdio server smoke references

* Fix dedicated MCP server rebase conflicts

* Format dedicated MCP server stdio module

* Fix dedicated MCP server clippy violations

* Trigger PR 168 CI rerun

* Fix MCP server field naming clippy warning

* Fix traverse-mcp stdio entrypoint wiring

* Fix downstream MCP validation quickstart link

* Expose core runtime content group through MCP

* Format MCP content group description

* Fix MCP content group helper clippy warning

* Fix MCP content group catalog call sites

* Fix MCP content group helper signatures

* Specify browser-hosted MCP consumer model

* Clarify browser-hosted consumer model governance

* Implement browser-targeted consumer package (#181)

* Publish versioned consumer bundle (#182)

* Add Claude Code as parallel AI development agent (#184)

Closes #183

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Configure Codex to skip tickets claimed by Claude Code (#188) (#189)

- Add AGENTS.md with coordination rules: pre-flight check for
  agent:claude label and claude/issue-NNN-* branches, plus claim
  step that sets agent:codex label and Agent/Status on Project 1
- Update docs/multi-thread-workflow.md dev thread starter prompt
  with pre-flight and claim steps
- Add two-agent model section documenting the Codex + Claude Code
  coordination pattern
- Add spec and plan artifacts for this feature

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Add youaskm3 starter kit guide (#187)

* Add youaskm3 compatibility conformance suite (#185)

* Add youaskm3 compatibility conformance suite

* Fix youaskm3 conformance docs references

* Rewrite README for best-in-class open source with human and agent paths (#191)

* Rewrite README for best-in-class open source (#190)

- Add CI, coverage, spec-governed, license, Rust, and version badges
- Restructure with dual paths: For Humans (quick start, vision,
  contributing) and For Agents (entry points, workflow, coordination,
  approved specs table)
- Add architecture section with crates table and governance table
- Remove outdated screenshot and flat doc dump
- Update GitHub repo description, homepage, and topic tags

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci: trigger CI run

* Fix repository_checks: restore required phrases and doc links

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Add UMA connection and fix repository checks (#192)

* Update README.md

* Add UMA connection and restore personal research disclaimer

- Add "Built on UMA" section linking Traverse to the Universal
  Microservices Architecture book and code examples with a clear
  theory-vs-implementation framing
- Restore personal research disclaimer required by repository checks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Restore header image and remove Autodesk disclaimer (#193)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Add youaskm3 real shell validation (#194)

* Add app-consumable package release pointer (#197)

* Add real-agent MCP exercise guide (#220)

* Publish the first packaged Traverse MCP server artifact for downstream consumers (#219)

* Add packaged MCP server artifact guide

* Fix repository checks conflict markers

* Add WASM agent authoring guide (#216)

* Document how to create new WASM microservices in Traverse (#217)

* Add WASM microservice authoring guide

* Specify downstream publication strategy

* Add packaged runtime artifact guide (#218)

* Add v0.2.0 governing specs (#204#212) and approve in governance registry (#222)

Adds spec.md and plan.md for all 9 v0.2.0 tickets:

- 024-placement-constraint-evaluator (issue #204)
- 025-wasm-executor-adapter (issue #205)
- 012-execution-trace-tiered (issue #206)
- 026-event-broker (issue #207)
- 014-service-type-taxonomy (issue #208)
- 015-capability-discovery-mcp (issue #209)
- 016-runtime-placement-router (issue #210)
- 027-expedition-wasm-port (issue #211)
- 028-schema-alignment-gate-v02 (issue #212)

Updates specs/governance/approved-specs.json with all 9 entries.
Governed by specs 001, 002, 003, 004, 006, 008, 009.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Add published-artifact validation for youaskm3 (#221)

* Add service type taxonomy to capability contracts (#208) (#223)

* Add service type taxonomy to capability contracts (#208)

Adds ServiceType enum (Stateless | Subscribable | Stateful) and three
new backward-compatible fields to CapabilityContract:

- service_type: ServiceType (defaults to Stateless)
- permitted_targets: Vec<ExecutionTarget> (defaults to all targets)
- event_trigger: Option<String> (defaults to None)

Two new validation rules:
- Stateful + Browser in permitted_targets → InvalidPlacementConstraint
- Subscribable + missing/empty event_trigger → MissingEventTrigger

Updates all CapabilityContract struct literals across traverse-registry,
traverse-runtime, and traverse-mcp. Adds 5 new tests. All 153 tests pass.
Expedition capability contracts updated with service_type: stateless.

Governed by spec 014-service-type-taxonomy.
Closes #208.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Format service type taxonomy changes

* Format service type taxonomy changes

* Fix contract validation lint

* Fix contracts validation clippy warnings

* Fix contracts validation coverage issues

* fix(#208): replace panic!/match patterns with Result-returning tests

Clippy denies panic! and match_wild_err_arm in test code. Rewrote the
5 new placement-constraint tests to return Result<(), String> and use ?
propagation instead of panic! or match on Err(_).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(#204): placement constraint evaluator (#228)

* Implement placement constraint evaluator (#204)

Three-tier evaluator in traverse-runtime: (1) caller hint, (2) contract
constraints (service_type + permitted_targets), (3) runtime heuristics
(load scores from RuntimeSnapshot). Returns PlacementDecision with
target, reason, and confidence. 9 unit tests covering all tiers.

Adds Hash derive to ExecutionTarget for HashMap use.

Governed by spec 024-placement-constraint-evaluator.
Closes #204.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(#204): resolve clippy expect/unwrap/panic errors

Convert all test functions to return Result<(), PlacementError> and use
? instead of .expect() to satisfy unwrap_used/expect_used deny lints.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(#204): resolve remaining clippy errors in placement/mod.rs

- Add # Errors doc section to evaluate() (missing_errors_doc)
- Change request param to &PlacementRequest (needless_pass_by_value)
- Collapse nested if into if-let-&&-guard (collapsible_if)
- Update all test call sites to pass &request

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(#204): remove unused empty_snapshot helper

* fix(#204): remove unused HashMap import

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(#205): WASM executor adapter (Wasmtime v43, WASI preview1) (#229)

* feat(#205): add WASM executor adapter with Wasmtime v43

Implements spec 025-wasm-executor-adapter. Adds CapabilityExecutor trait
with NativeExecutor (closure-backed) and WasmExecutor (Wasmtime v43, WASI
preview1, deny-by-default sandbox). SHA-256 checksum validation on binary
load. 10 integration tests using WAT fixtures via the `wat` crate.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* style(#205): apply cargo fmt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci: retrigger CI after PR body update

* fix(#205): type alias for handler, add Errors doc to run_bytes

* fix(#205): eliminate unwrap/expect in executor tests

Convert all test functions to return Result<(), String> and use
map_err + expect_err helper instead of unwrap_err/expect.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(#205): add Display coverage, disk execute path, and invalid binary test

Adds 3 more tests to reach 100% line coverage:
- executor_error_display_covers_all_variants: exercises all Display branches
- wasm_executor_full_execute_path_via_disk: exercises execute() file I/O path
- wasm_executor_invalid_binary_triggers_runtime_setup_failed: covers RuntimeSetupFailed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(#205): cover checksum-match success branch in execute()

Adds wasm_executor_execute_with_matching_checksum_succeeds to exercise
the path where a provided SHA-256 checksum matches the binary, completing
the 100% line coverage requirement.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(#205): cover NativeExecutor Debug impl

Adds native_executor_debug_impl_is_accessible to format the executor
with {:?} — reaches the finish_non_exhaustive branch for 100% line coverage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(#206): tiered execution trace (CloudEvents + SHA-256) (#230)

* Implement tiered execution trace (#206)

Two-tier trace: PublicTraceEntry (CloudEvents-formatted, always logged)
and PrivateTraceEntry (SHA-256 hashed inputs/outputs, access-controlled).
TraceStore in-memory. MCP tools list_traces and get_trace with private
opt-in flag. 9 unit tests.

Governed by spec 012-execution-trace-tiered.
Closes #206.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(#206): resolve clippy expect/unwrap errors

Convert three test functions to return Result<(), String>, replacing
.expect() / .unwrap() calls with .ok_or_else(...)? to satisfy the
workspace-level unwrap_used = "deny" and expect_used = "deny" lints.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* style(#206): cargo fmt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(#206): add backticks to CloudEvents doc refs, use map_or in store

* fix(#206): use is_none_or instead of map_or in list_public

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(#207): in-process event broker with ECCA-aligned catalog (#231)

* Implement in-process event broker with ECCA-aligned catalog (#207)

InProcessBroker with CloudEvents schema and governance metadata on
every TraverseEvent. EventCatalog with lifecycle enforcement (Active
only). MCP tools list_event_types and get_event_type. 8 unit tests
covering publish, lifecycle violations, subscriber delivery, and catalog.

Governed by spec 026-event-broker.
Closes #207.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(#207): resolve clippy expect/unwrap errors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(#207): resolve clippy errors and reach 100% coverage

- Refactor `EventCatalog::increment_consumer_count` to use `.lock().ok()` chain,
  eliminating the unreachable mutex-poisoning branch from coverage counts
- Add 9 new tests covering Debug impls, duplicate registration, Default,
  Display for both EventError variants, and unregistered-type error paths
  for subscribe and unsubscribe

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(#207): type alias for subscriber fn to resolve type_complexity lint

* fix(#207): remove unnecessary Result return types from two tests

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(#210): runtime placement router (#233)

* feat(#210): implement PlacementRouter as single execution entry point

Wires PlacementConstraintEvaluator → CapabilityExecutorRegistry →
executor → TraceStore (public+private) → EventBroker (Subscribable only).
Adds CapabilityExecutorRegistry type alias, RouterRequest/RouterResponse,
and RouterError. Derives Hash on ArtifactType and Debug on placement types.
Six integration tests cover: native end-to-end with trace, placement failure
(no trace), missing executor, subscribable event publishing, stateless
non-publishing, and executor error propagation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: replace expect_err with must_err helper; add RouterError Display coverage test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: add *.profraw to .gitignore and remove tracked coverage files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci: trigger re-run after PR body spec declaration fix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: format assert! call to comply with rustfmt line length

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(#209): capability discovery via MCP surface (#232)

* feat(#209): implement capability discovery via MCP surface (spec 015)

Transitions traverse-mcp from stub to functional by implementing
McpContext, 6 MCP tool functions (list_capabilities, get_capability,
list_event_types, get_event_type, list_traces, get_trace), and 17
integration tests covering all FRs and error cases.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix MCP test clippy warnings

* Fix MCP test clippy warnings

* Fix MCP test clippy warnings

* fix: remove panic!/unwrap_or_else, convert all test fns to Result<(), String>

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: rustfmt line-length formatting in mcp_tests.rs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(#212): extend spec alignment gate for v0.2.0 (#235)

- Add artifact_type field to all 6 expedition capability contracts
- Extend spec_alignment_check.sh to validate service_type and artifact_type
  on all capability_contract JSON files under contracts/
- approved-specs.json already contains all 25 spec entries (010-028)
  including new traverse-expedition-wasm and traverse-mcp coverage

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(#211): expedition example domain WASM port (#234)

* feat(#211): expedition example domain WASM port

Adds traverse-expedition-wasm crate (pure Rust, wasm32-wasi target) with
stdin/stdout JSON I/O and an end-to-end integration test exercising
PlacementRouter → WasmExecutor via a WAT-based expedition stub.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix expedition wasm test docs

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Ignore .claude/worktrees/ directory

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Cover federation registry failure paths

* Cover federation registry failure paths

* Refresh federation PR checks

* Refresh federation PR checks after spec body update

* Format federation registry tests

* Restore federation test lint allowances

* Allow federation module lint-heavy route paths

* Tighten federation module lint allowances

* Allow federation module clippy-heavy paths

* Fix federation test clippy allowances

* Fix federation test mutability

* Fix federation test coverage gaps

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@enricopiovesan

Copy link
Copy Markdown
Collaborator Author

Closing this as superseded. The linked issue #209 is already closed, and this branch now carries a stale mixed diff that no longer represents a clean, mergeable slice on top of current main.

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.

2 participants