macp-runtime 0.8.5

MACP reference runtime: a coordination kernel and gRPC server enforcing session boundaries, message validation, append-only history, modes, and governance policy.
Documentation
{
  "_comment": "Pins the schema_version 3 fail-closed empty-tally rule for 'unanimous' (RFC-MACP-0012 4.1) and the monotonicity it restores: under the legacy rule this transcript went SEALED / REFUSED / SEALED, so adding an approving ballot converted an allowed positive commitment into a denied one (issue #98, item 1). Under schema_version 3 it is DENIED / DENIED / SEALED. 'participants' is exactly two and the initiator is one of them, because 'unanimous' quantifies over DECLARED participants -- the roster size and the accepting tally must agree or the final commitment could never pass.",
  "description": "Decision Mode: schema_version 3 makes 'unanimous' binding on an empty tally, restoring monotonicity.",
  "mode": "macp.mode.decision.v1",
  "initiator": "agent://orchestrator",
  "participants": [
    "agent://orchestrator",
    "agent://a"
  ],
  "mode_version": "1.0.0",
  "configuration_version": "cfg-1",
  "policy": {
    "policy_id": "policy.decision.unanimous-binding-v3",
    "mode": "macp.mode.decision.v1",
    "schema_version": 3,
    "description": "Unanimous vote, initiator-only commitment, schema_version 3 fail-closed empty-tally semantics.",
    "rules": {
      "voting": {
        "algorithm": "unanimous"
      },
      "commitment": {
        "authority": "initiator_only"
      }
    }
  },
  "policy_version": "policy.decision.unanimous-binding-v3",
  "ttl_ms": 60000,
  "messages": [
    {
      "sender": "agent://orchestrator",
      "message_type": "Proposal",
      "payload_type": "macp.modes.decision.v1.ProposalPayload",
      "payload": {
        "proposal_id": "p1",
        "option": "deploy",
        "rationale": "ready",
        "supporting_data": []
      },
      "expect": "accept"
    },
    {
      "_comment": "schema_version 3, empty tally. Under the legacy schema_version <= 2 rule this SEALED (unanimous produced no result and require_vote_quorum was false); under 3 the algorithm is binding on its own and the empty tally fails. RFC-MACP-0012 4.1, Empty tally.",
      "sender": "agent://orchestrator",
      "message_type": "Commitment",
      "payload_type": "macp.v1.CommitmentPayload",
      "payload": {
        "commitment_id": "c0",
        "outcome_positive": true,
        "action": "decision.selected",
        "authority_scope": "test",
        "reason": "positive commitment attempted on an empty decisive tally",
        "mode_version": "1.0.0",
        "policy_version": "policy.decision.unanimous-binding-v3",
        "configuration_version": "cfg-1"
      },
      "expect": "reject",
      "expected_error_code": "POLICY_DENIED"
    },
    {
      "sender": "agent://a",
      "message_type": "Vote",
      "payload_type": "macp.modes.decision.v1.VotePayload",
      "payload": {
        "proposal_id": "p1",
        "vote": "APPROVE",
        "reason": "looks good"
      },
      "expect": "accept"
    },
    {
      "_comment": "One of two declared participants has approved. unanimous requires every declared participant to have cast an approve vote, so this fails. Under the legacy rule this same tally REFUSED while the empty tally above SEALED -- adding an approving ballot flipped allow to deny (issue #98, item 1). Under schema_version 3 both deny, so the sequence is monotone.",
      "sender": "agent://orchestrator",
      "message_type": "Commitment",
      "payload_type": "macp.v1.CommitmentPayload",
      "payload": {
        "commitment_id": "c1",
        "outcome_positive": true,
        "action": "decision.selected",
        "authority_scope": "test",
        "reason": "positive commitment attempted at a 1-of-2 unanimous tally",
        "mode_version": "1.0.0",
        "policy_version": "policy.decision.unanimous-binding-v3",
        "configuration_version": "cfg-1"
      },
      "expect": "reject",
      "expected_error_code": "POLICY_DENIED"
    },
    {
      "sender": "agent://orchestrator",
      "message_type": "Vote",
      "payload_type": "macp.modes.decision.v1.VotePayload",
      "payload": {
        "proposal_id": "p1",
        "vote": "APPROVE",
        "reason": "confirmed"
      },
      "expect": "accept"
    },
    {
      "_comment": "2 of 2 declared participants approved, no reject cast: unanimous passes and the positive commitment is allowed.",
      "sender": "agent://orchestrator",
      "message_type": "Commitment",
      "payload_type": "macp.v1.CommitmentPayload",
      "payload": {
        "commitment_id": "c2",
        "outcome_positive": true,
        "action": "decision.selected",
        "authority_scope": "test",
        "reason": "unanimous approval by both declared participants",
        "mode_version": "1.0.0",
        "policy_version": "policy.decision.unanimous-binding-v3",
        "configuration_version": "cfg-1"
      },
      "expect": "accept"
    }
  ],
  "expected_final_state": "Resolved",
  "expect_resolution_present": true,
  "expected_resolution": {
    "action": "decision.selected",
    "mode_version": "1.0.0",
    "configuration_version": "cfg-1",
    "outcome_positive": true
  },
  "expected_mode_state": {
    "phase": "Committed",
    "proposals": {
      "p1": {
        "proposal_id": "p1",
        "sender": "agent://orchestrator"
      }
    },
    "votes": {
      "p1": {
        "agent://a": {
          "vote": "APPROVE"
        },
        "agent://orchestrator": {
          "vote": "APPROVE"
        }
      }
    }
  }
}