(envelope: JsonRpcEnvelope)
| 213 | }; |
| 214 | |
| 215 | const replyAttrs = (envelope: JsonRpcEnvelope): Record<string, unknown> => { |
| 216 | if (!envelope.result || envelope.method) return {}; |
| 217 | return Option.match(decodeElicitationReplyResult(envelope.result), { |
| 218 | onNone: () => ({}), |
| 219 | onSome: ({ action }) => (action ? { "mcp.elicitation.action": action } : {}), |
| 220 | }); |
| 221 | }; |
| 222 | |
| 223 | const rpcAttrs = (envelope: Option.Option<JsonRpcEnvelope>): Record<string, unknown> => |
| 224 | Option.match(envelope, { |