mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
fix(plugin-agent-federation): add CLAIMS_FOR_MESSAGE_TYPE entries for ADR-101 Component C
The two new federation message types added by ADR-101 Component C
('claim-event', 'agent-handoff') were declared in
domain/entities/federation-envelope.ts but never wired into
CLAIMS_FOR_MESSAGE_TYPE in application/policy-engine.ts. TypeScript
caught the omission via Record<FederationMessageType, ...> exhaustiveness
checking, breaking `Build V3` in v3-ci.yml on every commit since the
ADR-101 work landed (3+ days).
Claim mappings chosen to match the operation semantics:
'claim-event' → ['federation:write']
Broadcasts a ClaimDomainEvent (state mutation across peers). Same
authorization shape as task-assignment per ADR-101 §B.
'agent-handoff' → ['federation:write', 'federation:spawn']
Transfers claim ownership to a remote agent. Requires both the
write capability (state mutation) AND spawn-lifecycle authority
(handoff is a sibling of agent-spawn — both reshape who owns
work). Matches the consensus-required security posture in
ADR-101 Component C.
Verified: full v3 workspace builds cleanly (23/23 packages).
Co-Authored-By: RuFlo <ruv@ruv.net>
This commit is contained in:
1 parent
4ba3adecd8
commit
3ba0b61411
1 file changed
+9
@@ -61,6 +61,15 @@ const CLAIMS_FOR_MESSAGE_TYPE: Record<FederationMessageType, FederationClaimType
|
||||
'handshake-accept': ['federation:connect'],
|
||||
'handshake-reject': ['federation:connect'],
|
||||
'session-terminate': ['federation:connect'],
|
||||
// ADR-101 Component C — federated claims operations.
|
||||
// claim-event: broadcasts a ClaimDomainEvent (state mutation across peers),
|
||||
// same authorization shape as task-assignment.
|
||||
'claim-event': ['federation:write'],
|
||||
// agent-handoff: transfers claim ownership to a remote agent. Requires
|
||||
// both the write capability (state mutation) AND spawn-lifecycle authority
|
||||
// (handoff is a sibling of agent-spawn — both reshape who owns work).
|
||||
// Matches the consensus-gated security posture in ADR-101.
|
||||
'agent-handoff': ['federation:write', 'federation:spawn'],
|
||||
};
|
||||
|
||||
export interface PolicyEngineDeps {
|
||||
|
||||
Reference in new issue
Block a user