Skip to content

Summary of Changes#5

Merged
ajit-zer07 merged 1 commit intomainfrom
improve-and-fix-mode-issues
Mar 15, 2026
Merged

Summary of Changes#5
ajit-zer07 merged 1 commit intomainfrom
improve-and-fix-mode-issues

Conversation

@ajit-zer07
Copy link
Contributor

Phase 1: Proto Sync + Discovery Surface Fixes

  • proto/macp/v1/core.proto: Added TransportEndpoint message and transport_endpoints field (8) on AgentManifest
  • src/server.rs: stream: false on capabilities; GetManifest handles agent_id (empty/"macp-runtime" → self, else → not_found), content types → application/macp-envelope+proto, added transport_endpoints; ListModes returns only Decision Mode with semver 1.0.0 and schema_uris
  • src/runtime.rs: registered_mode_names() filters out multi_round (experimental)
  • 9 new tests for discovery surface

Phase 2: Session Data Model + Envelope Validation

  • src/session.rs: Added context, roots, initiator_sender fields to Session
  • src/runtime.rs: Populates new fields from SessionStartPayload and env.sender
  • src/server.rs: Validates sender and message_type are non-empty
  • All test Session constructors updated across 4 files
  • 4 new tests for context/roots/initiator_sender and validation

Phase 3: Mode-Aware Authorization

  • src/mode/mod.rs: Added authorize_sender() default method on Mode trait
  • src/mode/decision.rs: Overrides authorize_sender — orchestrator (session initiator) can send Commitment even if not in participants
  • src/runtime.rs: Replaced hardcoded participant check with mode.authorize_sender() delegation
  • 3 new tests for orchestrator bypass and unchanged multi_round behavior

Phase 4: Decision Mode Correctness

  • src/mode/decision.rs: Legacy Message/resolve scoped to "decision" alias only; canonical mode rejects unknown message types; Commitment requires proposals (not votes)
  • 6 new/updated tests for legacy scoping and commitment rules

Phase 5: Version Alignment + Docs + Clients

  • Cargo.toml: 0.1.0 → 0.3.0
  • src/main.rs: v0.3 → v0.3.0
  • src/server.rs: version "0.3" → "0.3.0"
  • README.md: v0.2 → v0.3, updated feature list, noted streaming not fully implemented
  • docs/*: Updated all version references
  • src/bin/client.rs: Rewritten to demonstrate canonical Proposal → Evaluation → Commitment lifecycle
  • CLAUDE.md: Updated to reflect all changes

Summary

Describe the changes introduced by this pull request.

Type of Change

  • New feature
  • Bug fix
  • Refactoring
  • New mode implementation
  • Proto schema change
  • Documentation improvement
  • CI / tooling change

Checklist

  • cargo test passes
  • cargo clippy has no warnings
  • cargo fmt has been run
  • Protobuf definitions compile successfully
  • New modes implement the Mode trait correctly (if applicable)
  • Error variants added to MacpError (if applicable)
  • This change preserves MACP Core invariants

  Phase 1: Proto Sync + Discovery Surface Fixes

  - proto/macp/v1/core.proto: Added TransportEndpoint message and transport_endpoints field (8) on AgentManifest
  - src/server.rs: stream: false on capabilities; GetManifest handles agent_id (empty/"macp-runtime" → self, else → not_found), content types →
  application/macp-envelope+proto, added transport_endpoints; ListModes returns only Decision Mode with semver 1.0.0 and schema_uris
  - src/runtime.rs: registered_mode_names() filters out multi_round (experimental)
  - 9 new tests for discovery surface

  Phase 2: Session Data Model + Envelope Validation

  - src/session.rs: Added context, roots, initiator_sender fields to Session
  - src/runtime.rs: Populates new fields from SessionStartPayload and env.sender
  - src/server.rs: Validates sender and message_type are non-empty
  - All test Session constructors updated across 4 files
  - 4 new tests for context/roots/initiator_sender and validation

  Phase 3: Mode-Aware Authorization

  - src/mode/mod.rs: Added authorize_sender() default method on Mode trait
  - src/mode/decision.rs: Overrides authorize_sender — orchestrator (session initiator) can send Commitment even if not in participants
  - src/runtime.rs: Replaced hardcoded participant check with mode.authorize_sender() delegation
  - 3 new tests for orchestrator bypass and unchanged multi_round behavior

  Phase 4: Decision Mode Correctness

  - src/mode/decision.rs: Legacy Message/resolve scoped to "decision" alias only; canonical mode rejects unknown message types; Commitment requires proposals (not
  votes)
  - 6 new/updated tests for legacy scoping and commitment rules

  Phase 5: Version Alignment + Docs + Clients

  - Cargo.toml: 0.1.0 → 0.3.0
  - src/main.rs: v0.3 → v0.3.0
  - src/server.rs: version "0.3" → "0.3.0"
  - README.md: v0.2 → v0.3, updated feature list, noted streaming not fully implemented
  - docs/*: Updated all version references
  - src/bin/client.rs: Rewritten to demonstrate canonical Proposal → Evaluation → Commitment lifecycle
  - CLAUDE.md: Updated to reflect all changes
@ajit-zer07 ajit-zer07 merged commit 1b6e82c into main Mar 15, 2026
7 of 8 checks passed
@ajit-zer07 ajit-zer07 deleted the improve-and-fix-mode-issues branch March 17, 2026 23:22
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