{"record":{"id":"65b2fc7207ef3e18","repo":"ruvnet/ruflo","slug":"peer-signature-protocol-unsupported","errorCode":null,"errorMessage":"PEER_SIGNATURE_PROTOCOL_UNSUPPORTED","messagePattern":"PEER_SIGNATURE_PROTOCOL_UNSUPPORTED","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/plugin-agent-federation/src/application/inbound-dispatcher.ts","lineNumber":222,"sourceCode":"  if (version === undefined) return 'legacy-v1';\n  if (version === 'jcs-v1') return version;\n  throw new TypeError(`Unsupported federation signature version: ${String(version)}`);\n}\n\nexport function selectEnvelopeSignatureVersion(\n  mode: EnvelopeSignatureMode,\n  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;","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/plugin-agent-federation/src/application/inbound-dispatcher.ts#L204-L240","documentation":"selectEnvelopeSignatureVersion() could not negotiate a signature protocol: the mode requires JCS (e.g. 'require-jcs') but the peer's advertised protocol list does not include the JCS signature protocol. With no common envelope-signature protocol, message exchange is refused rather than downgraded insecurely.","triggerScenarios":"An inbound federation message is signed with a signature protocol version the local node does not support.","commonSituations":"Peer runs a newer or older federation protocol version than this node.","solutions":["Upgrade the local federation plugin to a version supporting the peer's signature protocol.","Configure the peer to negotiate a mutually supported signature version.","Reject the peer gracefully and log the supported versions for diagnostics."],"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"}