← Back to Pull requests

feat: align with agent 365 (ignite 2026) and the released mcp 2026-07-28 spec #4659

Open
unknown opened this pull request with 650 lines diff across 8 files
View on GitHub
unknown unknown commented on Nov 25, 2026 09:21 UTC
Author

Related Issue


None linked. Problem, impact and alternatives are described below.

Problem & Solution


Problem. Several surfaces are out of step with the Microsoft Agent 365 / Ignite 2026 platform and the released MCP 2026-07-28 specification, and a few paths fail open:

  • mcp-scan and the bundled Claude Code, OpenCode and Antigravity MCP servers implement the 2026-07-28 release candidate wire format (top-level _meta with clientInfo/capabilities, server/discover returning protocolVersion, Mcp-Name on server/discover). The released spec uses params._meta with io.modelcontextprotocol/ keys, supportedVersions, and Mcp-Name only for tools/call / prompts/get / resources/read.

  • MCPGateway has no way to reject header/body disagreement (Mcp-Method, Mcp-Name, Mcp-Param-) or to govern multi round-trip input_required results.

  • Cedar evaluation errors fall through to the engine default (possibly allow); the Rust PolicyEngine allows everything when no policy is loaded.

  • The Entra verifier does not recognise Entra Agent ID facet claims and accepts tokens without azp/appid.

  • The Foundry AI Gateway PDP fragment forwards allow_with_conditions while enforcing no conditions; examples/maf-integration//dotnet fail to build with NU1605 (pin Microsoft.Agents.AI 1.3.0, extension requires 1.28.0).

  • No integration with Agent 365 observability, Copilot Studio external threat detection, Purview processContent or Entra agent identity lifecycle.
  • Solution (8 commits, each scoped to one concern):

    1. fix(policy) — Cedar evaluation errors deny; Rust PolicyEngine denies without a policy, PolicyEngine::allow_all() is the explicit opt-in.
    2. feat(identity) — describe_caller() classifies callers from xms_act_fct/xms_sub_fct; relay logs and registry returns caller kind and blueprint (attribution only); AGENTMESH_ENTRA_REQUIRE_AGENT_IDENTITY; tokens without a client ID are rejected.
    3. feat(mcp) — final 2026-07-28 wire format in mcp-scan and the three bundled servers (RC shape still accepted); new agent_os.mcp_stateless; MCPGateway.intercept_request (envelope + header/body validation, W3C trace context on audit) and intercept_input_required (sampling/roots denied by default, secret-seeking form elicitation denied, URL elicitation needs approval). ADR-0027 gains implementation notes; its status is unchanged.
    4. fix(action) — composite action evaluates through AgentControl, falls back to AgtRuntime for 5.0.0, fails closed.
    5. feat(integrations) — new alpha community package agentmesh-agent365: Agent 365 observability spans with agt.policy.
    , Copilot Studio /validate + /analyze-tool-execution backed by MCPGateway (700 ms budget, fail closed), Purview client with ETag-aware scope caching, Entra agent identity → registry sync.
    6. ci — adds the package to the integration matrix (kept separate per AGENTS.md).
    7. fix(examples) — PDP fragment denies unenforced conditions and README documents that pdp-fail-open only annotates; MAF examples pin 1.28.0.
    8. docs — A365 reference architecture, Entra tutorial, roadmap, CHANGELOG, BREAKING_CHANGES, security audit note.

    Impact on Your Work


    We run AGT alongside Microsoft Agent 365 and Copilot Studio. Without these changes AGT cannot interoperate with released-spec MCP peers, cannot act as the Copilot Studio threat detection provider, and has fail-open paths in Cedar and Rust.

    Timeline


    None.

    Alternatives Considered


  • Separate PRs per commit: happy to split if maintainers prefer; commits are independent except that docs and ci reference the new package.

  • Putting the Agent 365 bridge in core: rejected per CONTRIBUTING ("Choose the smallest correct surface"); it lives in agentmesh-integrations/.

  • Treating an invalid AGENTMESH_ENTRA_REQUIRE_AGENT_IDENTITY value as "disable verification": rejected; it now applies the strictest setting.
  • Type of Change


  • Bug fix (non-breaking change that fixes an issue)

  • New feature (non-breaking change that adds functionality)

  • Breaking change (fix or feature that would cause existing functionality to change)

  • Documentation update

  • Maintenance (dependency updates, CI/CD, refactoring)

  • Security fix
  • Package(s) Affected


    Core & runtime:
  • agent-os

  • agent-mesh
  • Governance & security:

  • policy-engine (Rust SDK default)
  • Platform & tooling:

  • agentmesh-integrations (framework integrations)
  • CLI plugins:

  • agent-governance CLI plugins (claude-code / opencode / antigravity-cli)
  • Shared / other:

  • action (GitHub Action)

  • examples

  • docs / root
  • Testing

    Unit Testing


  • agent-os/tests/test_mcp_stateless.py (34): envelope validation, Base64 header decoding, x-mcp-header schema rules, trace context, input_required governance through MCPGateway.

  • test_mcp_scan_cli.py: updated for the final DiscoverResult / params._meta; new test that a discover result without 2026-07-28 falls back to initialize.

  • agent-mesh: TestAgentIdClaims and env parsing in test_entra_verifier.py; test_cedar_runtime_error_fails_closed_despite_allow_default (fails without the fix).

  • Rust: test_no_profile_denies_all, test_allow_all_is_explicit_opt_in, updated client tests.

  • agent365-agentmesh/tests (34): mocked transports only, real MCPGateway/EntraAgentRegistry where installed.

  • claude-code/test/mcp-server.test.mjs: modern params._meta and DiscoverResult shape.

  • scripts/tests/test_action_evaluate_policy.py (4).
  • Manual Testing


    Local results (macOS, Python 3.14, Node 26, .NET SDK 10.0.102):
  • agent-mesh Entra/registry/relay/Cedar: 189 passed. agent-os MCP suites: 238 passed. agent365-agentmesh: 34 passed. Action: 4 passed.

  • Node: claude-code 57, opencode 172, antigravity-cli 35 — all passed.

  • All six examples/maf-integration/*/dotnet build; 06-dotnet-extension-validation runs and blocks the denied calls.

  • scripts/docs/check_links.py, check_frontmatter.py, scripts/ci/security-audit-required.sh: pass.
  • Not verified locally — please rely on CI:

  • Rust changes were not compiled (no cargo on the machine).

  • agent-os tests ran against a local stub for the native ACS _native module (the extension was not built); CI builds the real extension.

  • No end-to-end run against a licensed Agent 365 tenant or a live Copilot Studio agent.
  • Checklist


  • I have linked a related issue above, or completed "Problem & Solution", "Impact on Your Work", and "Alternatives Considered"

  • My code follows the project style guidelines (ruff check)

  • I have added tests that prove my fix/feature works

  • All new and existing tests pass (pytest)

  • I have updated documentation as needed

  • I have signed the Microsoft CLA
  • Attribution & Prior Art


  • This contribution does not contain code copied or derived from other projects without attribution

  • Any external projects that inspired this design are credited in code comments or documentation

  • If this PR implements functionality similar to an existing open-source project, I have listed it below
  • Prior art / related projects (if any):
    Implements published interfaces: MCP specification 2026-07-28 (Streamable HTTP, MRTR), Copilot Studio external threat detection API 2025-05-01, Microsoft Graph dataSecurityAndGovernance and agentIdentity (v1.0), Agent 365 observability OTLP ingestion.

    AI Assistance


  • I can explain every meaningful change in this PR: what it does, why, and what tradeoffs were considered

  • I have run tests and verification appropriate for this change

  • No part of this PR was autonomously submitted by an AI agent without my review

  • I have not used AI to generate review comments on others' PRs
  • If AI tools materially shaped this change, briefly note what was used:
    GitHub Copilot (agent mode) drafted the code, tests and docs under my direction. Opened as a draft pending my review.

    IP, Patents, and Licensing


  • This contribution does not implement patent-pending or patent-encumbered techniques

  • This contribution does not require an NDA or licensing agreement to understand or use

  • Any AI tools used have terms compatible with the MIT License
  • Diff: 650 lines (+487 / -163) across 8 files Reviewer: MohammadHaroonAbuomar Review duration: 8002m
    All Vouch review confidence checks passed
    Residual risk 0.30 = Change Risk (0.57) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.57 · 650 lines diff across 8 files
    0.57
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.344
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #4659"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 57% (MEDIUM) · Higher = larger blast radius
    57%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 30.4% · Safe to merge
    30.4%