(envelope: JsonRpcEnvelope)
| 184 | }; |
| 185 | |
| 186 | const replyAttrs = (envelope: JsonRpcEnvelope): Record<string, unknown> => { |
| 187 | if (!envelope.result || envelope.method) return {}; |
| 188 | return Option.match(decodeElicitationReplyResult(envelope.result), { |
| 189 | onNone: () => ({}), |
| 190 | onSome: ({ action }) => (action ? { "mcp.elicitation.action": action } : {}), |
| 191 | }); |
| 192 | }; |
| 193 | |
| 194 | const rpcAttrs = (envelope: Option.Option<JsonRpcEnvelope>): Record<string, unknown> => |
| 195 | Option.match(envelope, { |