Skip to the content.

Task 48 — Границы делегации

Phase: 4 Initiative: 23 Status: done Owner: — Slug: delegation-boundaries

Goal

Mesh ограничивает hop count, fan-out width, кумулятивные tool calls, общую стоимость и время на запрос. Агенты могут отклонить делегацию, чтобы не превышать свою policy или capacity.

Acceptance criteria

Sub-tasks

Validation

Implementation notes

Hop count enforcement uses existing AuthContext.DelegationDepth field. Fan-out width checked against DelegationBoundaryConfig.MaxFanOutWidth before FanOutOrchestrator.OrchestrateFanOutAsync. Cumulative tool calls and cost tracked per request chain via in-memory ConcurrentDictionary<string, DelegationBoundaryContext> keyed by root request ID.

Scope / Likely files

src/agent/Mesh/Budget/

Dependencies

Risks / Rollback

Слишком жёсткие границы блокируют легитимные задачи; явный reason code + метрики.