{"record":{"id":"abea55d27dc8f9b9","repo":"ruvnet/ruflo","slug":"peer-signature-protocol-unsupported-for-message","errorCode":null,"errorMessage":"PEER_SIGNATURE_PROTOCOL_UNSUPPORTED_FOR_MESSAGE: ${messageType}","messagePattern":"PEER_SIGNATURE_PROTOCOL_UNSUPPORTED_FOR_MESSAGE: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/plugin-agent-federation/src/application/inbound-dispatcher.ts","lineNumber":229,"sourceCode":"  peerProtocols: readonly string[],\n  messageType?: string,\n): EnvelopeSignatureVersion {\n  const selected = mode === 'legacy'\n    ? 'legacy-v1'\n    : peerProtocols.includes(JCS_SIGNATURE_PROTOCOL)\n      ? 'jcs-v1'\n      : mode === 'prefer-jcs'\n        ? 'legacy-v1'\n        : null;\n  if (selected === null) {\n    throw new Error('PEER_SIGNATURE_PROTOCOL_UNSUPPORTED');\n  }\n  if (\n    selected === 'legacy-v1'\n    && messageType !== undefined\n    && !isLegacyEnvelopeTypeAllowed(messageType)\n  ) {\n    throw new Error(`PEER_SIGNATURE_PROTOCOL_UNSUPPORTED_FOR_MESSAGE: ${messageType}`);\n  }\n  return selected;\n}\n\nexport function canonicalizeEnvelopeForVerify(\n  message: AgentMessage,\n  requestedVersion?: EnvelopeSignatureVersion,\n): string {\n  const meta = (message.metadata ?? {}) as Record<string, unknown>;\n  // Strip signature from metadata if present (we verify the rest)\n  const { signature: _sig, ...metaForSig } = meta;\n  const canon = {\n    id: message.id,\n    type: message.type,\n    payload: message.payload,\n    metadata: metaForSig,\n  };\n  const version = requestedVersion ?? envelopeSignatureVersion(message);","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/plugin-agent-federation/src/application/inbound-dispatcher.ts#L211-L247","documentation":"Protocol negotiation fell back to legacy-v1 signing, but the message type being sent is not in the allowlist of legacy-envelope types (legacy envelopes cannot carry all message kinds securely). The combination 'legacy signature + this messageType' is unsupported, so the specific message type is named in the refusal.","triggerScenarios":"A specific federation message type arrives signed with a protocol version not supported for that message type.","commonSituations":"Version skew where a message type requires a newer signature scheme than the peer used.","solutions":["Align both peers on a signature protocol version that supports the message type.","Gate the message type behind a supported-version capability check before sending."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}