function mrtrFigure(host) { ensureStyles(); var clientX = 100; var serverX = 460; var rows = [ {y: 70, dir: 'right', label: 'tools/call (id 1): deploy_release'}, {y: 118, dir: 'left', label: 'input_required: confirm + requestState'}, {y: 160, dir: 'note', label: 'client gathers confirmation from the user'}, {y: 206, dir: 'right', label: 'tools/call (id 2): new id, inputResponses'}, {y: 254, dir: 'left', label: 'complete: deployed = true'} ]; var parts = []; parts.push(''); parts.push(''); parts.push('Client'); parts.push('Server'); var mid = (clientX + serverX) / 2; var i; for (i = 0; i < rows.length; i++) { var row = rows[i]; if (row.dir === 'note') { parts.push('' + row.label + ''); continue; } var x1 = row.dir === 'right' ? clientX : serverX; var x2 = row.dir === 'right' ? serverX : clientX; parts.push('' + row.label + ''); parts.push(''); } var shell = document.createElement('div'); shell.className = 'mf-shell'; shell.innerHTML = [ '
Multi Round-Trip Requests one call, an input_required pause, a fresh retry that echoes requestState
', '
', '', '', '', parts.join(''), '', '
', '
The server never pushes a request to the client. It ends the first call with input_required, and the client starts an independent second call, with a new JSON-RPC id, that echoes requestState byte for byte and supplies inputResponses.
' ].join(''); host.appendChild(shell); } // register as: mcpa-14-mrtr