Part of the node-message-broker build-out (Track B, Hub Plan 013 Phase 4). See .agents/plans/001-message-broker.md (local working doc).
Goal: enforce that the calling analysis may use the broker (analysis policy lives node-side; the Hub is analysis-agnostic).
Steps
- Implement
IAnalysisPolicy.assertMayUse(analysisId, token) (adapters/analysis/analysis-policy.ts): assert the analysis client holds ANALYSIS_SELF_MESSAGE_BROKER_USE — from verified token claims or via server-core introspection. Throw ForbiddenError otherwise.
Depends on: S2 (core client, if introspection is used).
Acceptance: allows a token with the capability; rejects one without; rejects a token whose analysis ≠ path :id.
Part of the node-message-broker build-out (Track B, Hub Plan 013 Phase 4). See .agents/plans/001-message-broker.md (local working doc).
Goal: enforce that the calling analysis may use the broker (analysis policy lives node-side; the Hub is analysis-agnostic).
Steps
IAnalysisPolicy.assertMayUse(analysisId, token)(adapters/analysis/analysis-policy.ts): assert the analysis client holdsANALYSIS_SELF_MESSAGE_BROKER_USE— from verified token claims or via server-core introspection. ThrowForbiddenErrorotherwise.Depends on: S2 (core client, if introspection is used).
Acceptance: allows a token with the capability; rejects one without; rejects a token whose analysis ≠ path
:id.