(envelope: JsonRpcEnvelope)
| 164 | }; |
| 165 | |
| 166 | const replyAttrs = (envelope: JsonRpcEnvelope): Record<string, unknown> => { |
| 167 | if (!envelope.result || envelope.method) return {}; |
| 168 | return Option.match(decodeElicitationReplyResult(envelope.result), { |
| 169 | onNone: () => ({}), |
| 170 | onSome: ({ action }) => (action ? { "mcp.elicitation.action": action } : {}), |
| 171 | }); |
| 172 | }; |
| 173 | |
| 174 | const rpcAttrs = (envelope: Option.Option<JsonRpcEnvelope>): Record<string, unknown> => |
| 175 | Option.match(envelope, { |