diff --git a/mobile/rpc-foundation/goldens/matrix-session.terminal-input-send-orchestration.workerterminaluserinput-1.json b/mobile/rpc-foundation/goldens/matrix-session.terminal-input-send-orchestration.workerterminaluserinput-1.json new file mode 100644 index 00000000000..220e3d44d89 --- /dev/null +++ b/mobile/rpc-foundation/goldens/matrix-session.terminal-input-send-orchestration.workerterminaluserinput-1.json @@ -0,0 +1,647 @@ +{ + "operation": "session.terminal-input-send", + "family": "session.terminal-input-send", + "namedDeltas": [], + "runnerVersion": 1, + "baseline": "e7206f62a827f4fe0a2badf3eecd2167b8ac4285", + "lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571", + "recorderSha256": "64a741e034b13bca69c466f93f713aa5c0cf3fbb2bbb02f357003506b17fe353", + "adapterSha256": "e7e3718f685e3713cf1b8209d59d618741f892bd286853b79bb456c59cec8d86", + "scenarioSha256": "cde3cac5407ef731315d18fc855b2696b9bfd30b90cb43d4a2cc812059cdd987", + "platform": "darwin", + "scenarioVersion": 1, + "projectionVersion": 2, + "goldenFormatVersion": 5, + "values": { + "0203262b5432": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "transport failure", + "isRpcDeliveryUnknown": true + } + } + }, + "093b7147f9b0": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "changed": 1 + } + } + } + }, + "0ba725456703": { + "crash": { + "$rpc": "null" + }, + "input": "", + "liveAccepted": "unsent", + "sending": false + }, + "191580ba859d": { + "name": "orchestration.workerTerminalUserInput#1", + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"orchestration.workerTerminalUserInput\",\"params\":{\"terminal\":\"terminal-1\"}}" + }, + "34a453846d11": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "error": { + "message": "inner refused" + }, + "ok": false + } + } + } + }, + "4f58026b7877": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "", + "isRpcDeliveryUnknown": true + } + } + }, + "5e9826c92f7b": { + "crash": { + "$rpc": "null" + }, + "input": "ls -la", + "liveAccepted": "unsent", + "sending": false + }, + "6aad8cc2e655": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "error": "refused" + } + } + } + }, + "750695db0ef8": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": true, + "terminal": "terminal-1", + "text": "ls -la" + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "send": { + "accepted": true + } + } + } + } + }, + "84777d7d765a": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "refused", + "message": "outer refused" + }, + "id": "frame-2", + "ok": false + } + } + }, + "ad01b4d8b4de": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "method_not_found", + "message": "Unknown method" + }, + "id": "frame-2", + "ok": false + } + } + }, + "bca437e23d8a": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true + } + } + }, + "c28710807a02": { + "name": "terminal.send#1", + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"terminal.send\",\"params\":{\"terminal\":\"terminal-1\",\"text\":\"ls -la\",\"enter\":true,\"client\":{\"id\":\"device-token-1\",\"type\":\"mobile\"}}}" + }, + "cb9a9683ab1e": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "error": "inner refused", + "ok": false + } + } + } + }, + "d642e739823d": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "$rpc": "null" + } + } + } + }, + "dc19ad107e96": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "refused", + "message": "" + }, + "id": "frame-2", + "ok": false + } + } + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + } + }, + "recording": { + "scenario": "matrix-session.terminal-input-send-orchestration.workerterminaluserinput-1", + "checkpoints": [ + { + "id": "terminal-input-send-accepted.prelude:composed", + "observation": { + "sender": [], + "payloads": [], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a" + }, + "state": "5e9826c92f7b", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.normal:sent", + "observation": { + "sender": ["750695db0ef8", "093b7147f9b0"], + "payloads": ["c28710807a02", "191580ba859d"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "0ba725456703", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.result-absent:sent", + "observation": { + "sender": ["750695db0ef8", "bca437e23d8a"], + "payloads": ["c28710807a02", "191580ba859d"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "0ba725456703", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.result-null:sent", + "observation": { + "sender": ["750695db0ef8", "d642e739823d"], + "payloads": ["c28710807a02", "191580ba859d"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "0ba725456703", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.inner-ok-missing:sent", + "observation": { + "sender": ["750695db0ef8", "6aad8cc2e655"], + "payloads": ["c28710807a02", "191580ba859d"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "0ba725456703", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.inner-false-string-error:sent", + "observation": { + "sender": ["750695db0ef8", "cb9a9683ab1e"], + "payloads": ["c28710807a02", "191580ba859d"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "0ba725456703", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.inner-false-object-error:sent", + "observation": { + "sender": ["750695db0ef8", "34a453846d11"], + "payloads": ["c28710807a02", "191580ba859d"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "0ba725456703", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.outer-refused:sent", + "observation": { + "sender": ["750695db0ef8", "84777d7d765a"], + "payloads": ["c28710807a02", "191580ba859d"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "0ba725456703", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.outer-refused-no-message:sent", + "observation": { + "sender": ["750695db0ef8", "dc19ad107e96"], + "payloads": ["c28710807a02", "191580ba859d"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "0ba725456703", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.method-not-found:sent", + "observation": { + "sender": ["750695db0ef8", "ad01b4d8b4de"], + "payloads": ["c28710807a02", "191580ba859d"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "0ba725456703", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.transport-rejection:sent", + "observation": { + "sender": ["750695db0ef8", "0203262b5432"], + "payloads": ["c28710807a02", "191580ba859d"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "0ba725456703", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.transport-rejection-no-message:sent", + "observation": { + "sender": ["750695db0ef8", "4f58026b7877"], + "payloads": ["c28710807a02", "191580ba859d"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "0ba725456703", + "effects": [] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/matrix-session.terminal-input-send-terminal.send-1.json b/mobile/rpc-foundation/goldens/matrix-session.terminal-input-send-terminal.send-1.json new file mode 100644 index 00000000000..be227577c47 --- /dev/null +++ b/mobile/rpc-foundation/goldens/matrix-session.terminal-input-send-terminal.send-1.json @@ -0,0 +1,687 @@ +{ + "operation": "session.terminal-input-send", + "family": "session.terminal-input-send", + "namedDeltas": [], + "runnerVersion": 1, + "baseline": "e7206f62a827f4fe0a2badf3eecd2167b8ac4285", + "lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571", + "recorderSha256": "64a741e034b13bca69c466f93f713aa5c0cf3fbb2bbb02f357003506b17fe353", + "adapterSha256": "e7e3718f685e3713cf1b8209d59d618741f892bd286853b79bb456c59cec8d86", + "scenarioSha256": "6575a0f89894d9b66e50a73446dfe92293ceccc7048b556f1ff114fd3ce05b8e", + "platform": "darwin", + "scenarioVersion": 1, + "projectionVersion": 2, + "goldenFormatVersion": 5, + "values": { + "093b7147f9b0": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "changed": 1 + } + } + } + }, + "0ba725456703": { + "crash": { + "$rpc": "null" + }, + "input": "", + "liveAccepted": "unsent", + "sending": false + }, + "18f98f3c57c5": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": true, + "terminal": "terminal-1", + "text": "ls -la" + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "transport failure", + "isRpcDeliveryUnknown": true + } + } + }, + "191580ba859d": { + "name": "orchestration.workerTerminalUserInput#1", + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"orchestration.workerTerminalUserInput\",\"params\":{\"terminal\":\"terminal-1\"}}" + }, + "3e2a483908bf": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": true, + "terminal": "terminal-1", + "text": "ls -la" + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "method_not_found", + "message": "Unknown method" + }, + "id": "frame-1", + "ok": false + } + } + }, + "431e2651ee54": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": true, + "terminal": "terminal-1", + "text": "ls -la" + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "error": "refused" + } + } + } + }, + "53392468a4c7": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": true, + "terminal": "terminal-1", + "text": "ls -la" + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "refused", + "message": "" + }, + "id": "frame-1", + "ok": false + } + } + }, + "59ae86ca6e18": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": true, + "terminal": "terminal-1", + "text": "ls -la" + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "error": "inner refused", + "ok": false + } + } + } + }, + "5c7f8cb7e930": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": true, + "terminal": "terminal-1", + "text": "ls -la" + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true + } + } + }, + "5e9826c92f7b": { + "crash": { + "$rpc": "null" + }, + "input": "ls -la", + "liveAccepted": "unsent", + "sending": false + }, + "750695db0ef8": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": true, + "terminal": "terminal-1", + "text": "ls -la" + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "send": { + "accepted": true + } + } + } + } + }, + "9be1be46fdb3": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": true, + "terminal": "terminal-1", + "text": "ls -la" + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "$rpc": "null" + } + } + } + }, + "ae241b7bb5cd": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": true, + "terminal": "terminal-1", + "text": "ls -la" + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "error": { + "message": "inner refused" + }, + "ok": false + } + } + } + }, + "c28710807a02": { + "name": "terminal.send#1", + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"terminal.send\",\"params\":{\"terminal\":\"terminal-1\",\"text\":\"ls -la\",\"enter\":true,\"client\":{\"id\":\"device-token-1\",\"type\":\"mobile\"}}}" + }, + "db539dd077c2": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": true, + "terminal": "terminal-1", + "text": "ls -la" + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "refused", + "message": "outer refused" + }, + "id": "frame-1", + "ok": false + } + } + }, + "ea46298a695e": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": true, + "terminal": "terminal-1", + "text": "ls -la" + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "", + "isRpcDeliveryUnknown": true + } + } + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + } + }, + "recording": { + "scenario": "matrix-session.terminal-input-send-terminal.send-1", + "checkpoints": [ + { + "id": "terminal-input-send-accepted.prelude:composed", + "observation": { + "sender": [], + "payloads": [], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a" + }, + "state": "5e9826c92f7b", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.normal:sent", + "observation": { + "sender": ["750695db0ef8", "093b7147f9b0"], + "payloads": ["c28710807a02", "191580ba859d"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "0ba725456703", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.result-absent:sent", + "observation": { + "sender": ["5c7f8cb7e930"], + "payloads": ["c28710807a02"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "5e9826c92f7b", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.result-null:sent", + "observation": { + "sender": ["9be1be46fdb3"], + "payloads": ["c28710807a02"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "5e9826c92f7b", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.inner-ok-missing:sent", + "observation": { + "sender": ["431e2651ee54"], + "payloads": ["c28710807a02"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "5e9826c92f7b", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.inner-false-string-error:sent", + "observation": { + "sender": ["59ae86ca6e18"], + "payloads": ["c28710807a02"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "5e9826c92f7b", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.inner-false-object-error:sent", + "observation": { + "sender": ["ae241b7bb5cd"], + "payloads": ["c28710807a02"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "5e9826c92f7b", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.outer-refused:sent", + "observation": { + "sender": ["db539dd077c2"], + "payloads": ["c28710807a02"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "5e9826c92f7b", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.outer-refused-no-message:sent", + "observation": { + "sender": ["53392468a4c7"], + "payloads": ["c28710807a02"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "5e9826c92f7b", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.method-not-found:sent", + "observation": { + "sender": ["3e2a483908bf"], + "payloads": ["c28710807a02"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "5e9826c92f7b", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.transport-rejection:sent", + "observation": { + "sender": ["18f98f3c57c5"], + "payloads": ["c28710807a02"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "5e9826c92f7b", + "effects": [] + } + }, + { + "id": "terminal-input-send-accepted.transport-rejection-no-message:sent", + "observation": { + "sender": ["ea46298a695e"], + "payloads": ["c28710807a02"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "5e9826c92f7b", + "effects": [] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/matrix-session.terminal-paste-orchestration.workerterminaluserinput-1.json b/mobile/rpc-foundation/goldens/matrix-session.terminal-paste-orchestration.workerterminaluserinput-1.json new file mode 100644 index 00000000000..41b45d309c2 --- /dev/null +++ b/mobile/rpc-foundation/goldens/matrix-session.terminal-paste-orchestration.workerterminaluserinput-1.json @@ -0,0 +1,706 @@ +{ + "operation": "session.terminal-clipboard", + "family": "session.terminal-paste", + "namedDeltas": [], + "runnerVersion": 1, + "baseline": "e7206f62a827f4fe0a2badf3eecd2167b8ac4285", + "lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571", + "recorderSha256": "64a741e034b13bca69c466f93f713aa5c0cf3fbb2bbb02f357003506b17fe353", + "adapterSha256": "e7e3718f685e3713cf1b8209d59d618741f892bd286853b79bb456c59cec8d86", + "scenarioSha256": "27c4f13ae43042cf5e6b5ca95e9c1a37db2f1f0c08b31a1164bb56cf0967549a", + "platform": "darwin", + "scenarioVersion": 1, + "projectionVersion": 2, + "goldenFormatVersion": 5, + "values": { + "0203262b5432": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "transport failure", + "isRpcDeliveryUnknown": true + } + } + }, + "0aa7daf076d0": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "method_not_found", + "message": "Unknown method" + }, + "id": "frame-3", + "ok": false + } + } + }, + "1ec65e7a7aca": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "refused", + "message": "outer refused" + }, + "id": "frame-3", + "ok": false + } + } + }, + "23812b44df37": { + "name": "refresh-can-paste", + "value": {}, + "sent": 3 + }, + "3735935dd61c": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "refused", + "message": "" + }, + "id": "frame-3", + "ok": false + } + } + }, + "4e9a0397c220": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-3", + "ok": true, + "result": { + "changed": 1 + } + } + } + }, + "4f58026b7877": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "", + "isRpcDeliveryUnknown": true + } + } + }, + "51eb315f9426": { + "name": "flush-live-input", + "value": { + "handle": "terminal-1" + }, + "sent": 1 + }, + "528166d1face": { + "connectionId": "unresolved", + "crash": { + "$rpc": "null" + }, + "pasteOutcome": "sent" + }, + "61a24302b6cc": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-3", + "ok": true, + "result": { + "error": "inner refused", + "ok": false + } + } + } + }, + "63ceb8bb55e0": { + "name": "orchestration.workerTerminalUserInput#1", + "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"orchestration.workerTerminalUserInput\",\"params\":{\"terminal\":\"terminal-1\"}}" + }, + "7107540f16ca": { + "name": "toast", + "value": { + "durationMs": { + "$rpc": "null" + }, + "message": "Copied" + }, + "sent": 1 + }, + "7ddcb1852b39": { + "name": "settings.get#1", + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"settings.get\"}" + }, + "7f20afa60962": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-3", + "ok": true, + "result": { + "error": { + "message": "inner refused" + }, + "ok": false + } + } + } + }, + "84990d8de7e9": { + "connectionId": "unresolved", + "crash": { + "$rpc": "null" + }, + "pasteOutcome": "unpasted" + }, + "9c3247b7bf64": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-3", + "ok": true, + "result": { + "error": "refused" + } + } + } + }, + "b7fae68f05c9": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-3", + "ok": true, + "result": { + "$rpc": "null" + } + } + } + }, + "d8dd3cd46511": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-3", + "ok": true + } + } + }, + "e142ca57bc1f": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": false, + "terminal": "terminal-1", + "text": "\u001b[200~echo hi\u001b[201~" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "send": { + "accepted": true + } + } + } + } + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "f3df5e006d8e": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "settings": { + "terminalCopyTrimsGutter": true + } + } + } + } + }, + "f63f705d3a7f": { + "name": "terminal.send#1", + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"terminal.send\",\"params\":{\"terminal\":\"terminal-1\",\"text\":\"\\u001b[200~echo hi\\u001b[201~\",\"enter\":false,\"client\":{\"id\":\"device-token-1\",\"type\":\"mobile\"}}}" + } + }, + "recording": { + "scenario": "matrix-session.terminal-paste-orchestration.workerterminaluserinput-1", + "checkpoints": [ + { + "id": "terminal-paste-accepted.prelude:copied", + "observation": { + "sender": ["f3df5e006d8e"], + "payloads": ["7ddcb1852b39"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a" + }, + "state": "84990d8de7e9", + "effects": ["7107540f16ca"] + } + }, + { + "id": "terminal-paste-accepted.normal:pasted", + "observation": { + "sender": ["f3df5e006d8e", "e142ca57bc1f", "4e9a0397c220"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.result-absent:pasted", + "observation": { + "sender": ["f3df5e006d8e", "e142ca57bc1f", "d8dd3cd46511"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.result-null:pasted", + "observation": { + "sender": ["f3df5e006d8e", "e142ca57bc1f", "b7fae68f05c9"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.inner-ok-missing:pasted", + "observation": { + "sender": ["f3df5e006d8e", "e142ca57bc1f", "9c3247b7bf64"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.inner-false-string-error:pasted", + "observation": { + "sender": ["f3df5e006d8e", "e142ca57bc1f", "61a24302b6cc"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.inner-false-object-error:pasted", + "observation": { + "sender": ["f3df5e006d8e", "e142ca57bc1f", "7f20afa60962"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.outer-refused:pasted", + "observation": { + "sender": ["f3df5e006d8e", "e142ca57bc1f", "1ec65e7a7aca"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.outer-refused-no-message:pasted", + "observation": { + "sender": ["f3df5e006d8e", "e142ca57bc1f", "3735935dd61c"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.method-not-found:pasted", + "observation": { + "sender": ["f3df5e006d8e", "e142ca57bc1f", "0aa7daf076d0"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.transport-rejection:pasted", + "observation": { + "sender": ["f3df5e006d8e", "e142ca57bc1f", "0203262b5432"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.transport-rejection-no-message:pasted", + "observation": { + "sender": ["f3df5e006d8e", "e142ca57bc1f", "4f58026b7877"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/matrix-session.terminal-paste-settings.get-1.json b/mobile/rpc-foundation/goldens/matrix-session.terminal-paste-settings.get-1.json new file mode 100644 index 00000000000..fe2e2ee3f53 --- /dev/null +++ b/mobile/rpc-foundation/goldens/matrix-session.terminal-paste-settings.get-1.json @@ -0,0 +1,816 @@ +{ + "operation": "session.terminal-clipboard", + "family": "session.terminal-paste", + "namedDeltas": [], + "runnerVersion": 1, + "baseline": "e7206f62a827f4fe0a2badf3eecd2167b8ac4285", + "lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571", + "recorderSha256": "64a741e034b13bca69c466f93f713aa5c0cf3fbb2bbb02f357003506b17fe353", + "adapterSha256": "e7e3718f685e3713cf1b8209d59d618741f892bd286853b79bb456c59cec8d86", + "scenarioSha256": "449f8c793a371dddf1bb9b3beb36b2dbd9b991918dae1f6290df75fe6d2aeace", + "platform": "darwin", + "scenarioVersion": 1, + "projectionVersion": 2, + "goldenFormatVersion": 5, + "values": { + "0fc3e204e7ba": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "error": "refused" + } + } + } + }, + "127ad2bdc042": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "error": { + "message": "inner refused" + }, + "ok": false + } + } + } + }, + "23812b44df37": { + "name": "refresh-can-paste", + "value": {}, + "sent": 3 + }, + "2b3aa0da0852": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "", + "isRpcDeliveryUnknown": true + } + } + }, + "4e9a0397c220": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-3", + "ok": true, + "result": { + "changed": 1 + } + } + } + }, + "51eb315f9426": { + "name": "flush-live-input", + "value": { + "handle": "terminal-1" + }, + "sent": 1 + }, + "528166d1face": { + "connectionId": "unresolved", + "crash": { + "$rpc": "null" + }, + "pasteOutcome": "sent" + }, + "63ceb8bb55e0": { + "name": "orchestration.workerTerminalUserInput#1", + "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"orchestration.workerTerminalUserInput\",\"params\":{\"terminal\":\"terminal-1\"}}" + }, + "6a98511b6371": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "refused", + "message": "" + }, + "id": "frame-1", + "ok": false + } + } + }, + "7107540f16ca": { + "name": "toast", + "value": { + "durationMs": { + "$rpc": "null" + }, + "message": "Copied" + }, + "sent": 1 + }, + "7ddcb1852b39": { + "name": "settings.get#1", + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"settings.get\"}" + }, + "84990d8de7e9": { + "connectionId": "unresolved", + "crash": { + "$rpc": "null" + }, + "pasteOutcome": "unpasted" + }, + "8b77098df0c3": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "transport failure", + "isRpcDeliveryUnknown": true + } + } + }, + "8f8296303a77": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "refused", + "message": "outer refused" + }, + "id": "frame-1", + "ok": false + } + } + }, + "b759ab27e4dd": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "method_not_found", + "message": "Unknown method" + }, + "id": "frame-1", + "ok": false + } + } + }, + "d27ce798af34": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "error": "inner refused", + "ok": false + } + } + } + }, + "e0cf1af55a54": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true + } + } + }, + "e142ca57bc1f": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": false, + "terminal": "terminal-1", + "text": "\u001b[200~echo hi\u001b[201~" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "send": { + "accepted": true + } + } + } + } + }, + "e1bd8b4a5d70": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "$rpc": "null" + } + } + } + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "f3df5e006d8e": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "settings": { + "terminalCopyTrimsGutter": true + } + } + } + } + }, + "f63f705d3a7f": { + "name": "terminal.send#1", + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"terminal.send\",\"params\":{\"terminal\":\"terminal-1\",\"text\":\"\\u001b[200~echo hi\\u001b[201~\",\"enter\":false,\"client\":{\"id\":\"device-token-1\",\"type\":\"mobile\"}}}" + } + }, + "recording": { + "scenario": "matrix-session.terminal-paste-settings.get-1", + "checkpoints": [ + { + "id": "terminal-paste-accepted.normal:copied", + "observation": { + "sender": ["f3df5e006d8e"], + "payloads": ["7ddcb1852b39"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a" + }, + "state": "84990d8de7e9", + "effects": ["7107540f16ca"] + } + }, + { + "id": "terminal-paste-accepted.normal:pasted", + "observation": { + "sender": ["f3df5e006d8e", "e142ca57bc1f", "4e9a0397c220"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.result-absent:copied", + "observation": { + "sender": ["e0cf1af55a54"], + "payloads": ["7ddcb1852b39"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a" + }, + "state": "84990d8de7e9", + "effects": ["7107540f16ca"] + } + }, + { + "id": "terminal-paste-accepted.result-absent:pasted", + "observation": { + "sender": ["e0cf1af55a54", "e142ca57bc1f", "4e9a0397c220"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.result-null:copied", + "observation": { + "sender": ["e1bd8b4a5d70"], + "payloads": ["7ddcb1852b39"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a" + }, + "state": "84990d8de7e9", + "effects": ["7107540f16ca"] + } + }, + { + "id": "terminal-paste-accepted.result-null:pasted", + "observation": { + "sender": ["e1bd8b4a5d70", "e142ca57bc1f", "4e9a0397c220"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.inner-ok-missing:copied", + "observation": { + "sender": ["0fc3e204e7ba"], + "payloads": ["7ddcb1852b39"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a" + }, + "state": "84990d8de7e9", + "effects": ["7107540f16ca"] + } + }, + { + "id": "terminal-paste-accepted.inner-ok-missing:pasted", + "observation": { + "sender": ["0fc3e204e7ba", "e142ca57bc1f", "4e9a0397c220"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.inner-false-string-error:copied", + "observation": { + "sender": ["d27ce798af34"], + "payloads": ["7ddcb1852b39"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a" + }, + "state": "84990d8de7e9", + "effects": ["7107540f16ca"] + } + }, + { + "id": "terminal-paste-accepted.inner-false-string-error:pasted", + "observation": { + "sender": ["d27ce798af34", "e142ca57bc1f", "4e9a0397c220"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.inner-false-object-error:copied", + "observation": { + "sender": ["127ad2bdc042"], + "payloads": ["7ddcb1852b39"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a" + }, + "state": "84990d8de7e9", + "effects": ["7107540f16ca"] + } + }, + { + "id": "terminal-paste-accepted.inner-false-object-error:pasted", + "observation": { + "sender": ["127ad2bdc042", "e142ca57bc1f", "4e9a0397c220"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.outer-refused:copied", + "observation": { + "sender": ["8f8296303a77"], + "payloads": ["7ddcb1852b39"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a" + }, + "state": "84990d8de7e9", + "effects": ["7107540f16ca"] + } + }, + { + "id": "terminal-paste-accepted.outer-refused:pasted", + "observation": { + "sender": ["8f8296303a77", "e142ca57bc1f", "4e9a0397c220"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.outer-refused-no-message:copied", + "observation": { + "sender": ["6a98511b6371"], + "payloads": ["7ddcb1852b39"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a" + }, + "state": "84990d8de7e9", + "effects": ["7107540f16ca"] + } + }, + { + "id": "terminal-paste-accepted.outer-refused-no-message:pasted", + "observation": { + "sender": ["6a98511b6371", "e142ca57bc1f", "4e9a0397c220"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.method-not-found:copied", + "observation": { + "sender": ["b759ab27e4dd"], + "payloads": ["7ddcb1852b39"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a" + }, + "state": "84990d8de7e9", + "effects": ["7107540f16ca"] + } + }, + { + "id": "terminal-paste-accepted.method-not-found:pasted", + "observation": { + "sender": ["b759ab27e4dd", "e142ca57bc1f", "4e9a0397c220"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.transport-rejection:copied", + "observation": { + "sender": ["8b77098df0c3"], + "payloads": ["7ddcb1852b39"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a" + }, + "state": "84990d8de7e9", + "effects": ["7107540f16ca"] + } + }, + { + "id": "terminal-paste-accepted.transport-rejection:pasted", + "observation": { + "sender": ["8b77098df0c3", "e142ca57bc1f", "4e9a0397c220"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.transport-rejection-no-message:copied", + "observation": { + "sender": ["2b3aa0da0852"], + "payloads": ["7ddcb1852b39"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a" + }, + "state": "84990d8de7e9", + "effects": ["7107540f16ca"] + } + }, + { + "id": "terminal-paste-accepted.transport-rejection-no-message:pasted", + "observation": { + "sender": ["2b3aa0da0852", "e142ca57bc1f", "4e9a0397c220"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/matrix-session.terminal-paste-terminal.send-1.json b/mobile/rpc-foundation/goldens/matrix-session.terminal-paste-terminal.send-1.json new file mode 100644 index 00000000000..64bd9060e66 --- /dev/null +++ b/mobile/rpc-foundation/goldens/matrix-session.terminal-paste-terminal.send-1.json @@ -0,0 +1,817 @@ +{ + "operation": "session.terminal-clipboard", + "family": "session.terminal-paste", + "namedDeltas": [], + "runnerVersion": 1, + "baseline": "e7206f62a827f4fe0a2badf3eecd2167b8ac4285", + "lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571", + "recorderSha256": "64a741e034b13bca69c466f93f713aa5c0cf3fbb2bbb02f357003506b17fe353", + "adapterSha256": "e7e3718f685e3713cf1b8209d59d618741f892bd286853b79bb456c59cec8d86", + "scenarioSha256": "5cc67ab6df80a81be814a16cb60dcc4c703b0fc17594e409697a9fdeb0edeb76", + "platform": "darwin", + "scenarioVersion": 1, + "projectionVersion": 2, + "goldenFormatVersion": 5, + "values": { + "0bc8e5a0d4e1": { + "name": "refresh-can-paste", + "value": {}, + "sent": 2 + }, + "21f01e71bca3": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": false, + "terminal": "terminal-1", + "text": "\u001b[200~echo hi\u001b[201~" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "refused", + "message": "outer refused" + }, + "id": "frame-2", + "ok": false + } + } + }, + "23812b44df37": { + "name": "refresh-can-paste", + "value": {}, + "sent": 3 + }, + "280b3e341a56": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": false, + "terminal": "terminal-1", + "text": "\u001b[200~echo hi\u001b[201~" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "refused", + "message": "" + }, + "id": "frame-2", + "ok": false + } + } + }, + "4e9a0397c220": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-3", + "ok": true, + "result": { + "changed": 1 + } + } + } + }, + "50c4c0f3e188": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": false, + "terminal": "terminal-1", + "text": "\u001b[200~echo hi\u001b[201~" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "error": "refused" + } + } + } + }, + "51eb315f9426": { + "name": "flush-live-input", + "value": { + "handle": "terminal-1" + }, + "sent": 1 + }, + "528166d1face": { + "connectionId": "unresolved", + "crash": { + "$rpc": "null" + }, + "pasteOutcome": "sent" + }, + "63ceb8bb55e0": { + "name": "orchestration.workerTerminalUserInput#1", + "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"orchestration.workerTerminalUserInput\",\"params\":{\"terminal\":\"terminal-1\"}}" + }, + "7107540f16ca": { + "name": "toast", + "value": { + "durationMs": { + "$rpc": "null" + }, + "message": "Copied" + }, + "sent": 1 + }, + "7a59c74ff63f": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": false, + "terminal": "terminal-1", + "text": "\u001b[200~echo hi\u001b[201~" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "method_not_found", + "message": "Unknown method" + }, + "id": "frame-2", + "ok": false + } + } + }, + "7b22b223fd28": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": false, + "terminal": "terminal-1", + "text": "\u001b[200~echo hi\u001b[201~" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "Connection closed", + "isRpcDeliveryUnknown": true + } + } + }, + "7ddcb1852b39": { + "name": "settings.get#1", + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"settings.get\"}" + }, + "847bbb81a389": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": false, + "terminal": "terminal-1", + "text": "\u001b[200~echo hi\u001b[201~" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "$rpc": "null" + } + } + } + }, + "84990d8de7e9": { + "connectionId": "unresolved", + "crash": { + "$rpc": "null" + }, + "pasteOutcome": "unpasted" + }, + "a3feb18ca8f5": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": false, + "terminal": "terminal-1", + "text": "\u001b[200~echo hi\u001b[201~" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "error": "inner refused", + "ok": false + } + } + } + }, + "a76bbdc0f8dd": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": false, + "terminal": "terminal-1", + "text": "\u001b[200~echo hi\u001b[201~" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "", + "isRpcDeliveryUnknown": true + } + } + }, + "cb723e8eb690": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": false, + "terminal": "terminal-1", + "text": "\u001b[200~echo hi\u001b[201~" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "transport failure", + "isRpcDeliveryUnknown": true + } + } + }, + "d8542c0eba03": { + "name": "toast", + "value": { + "durationMs": 1500, + "message": "Paste failed" + }, + "sent": 2 + }, + "def2823f0306": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": false, + "terminal": "terminal-1", + "text": "\u001b[200~echo hi\u001b[201~" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "error": { + "message": "inner refused" + }, + "ok": false + } + } + } + }, + "e142ca57bc1f": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": false, + "terminal": "terminal-1", + "text": "\u001b[200~echo hi\u001b[201~" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "send": { + "accepted": true + } + } + } + } + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "ebe2af37c0a0": { + "connectionId": "unresolved", + "crash": { + "$rpc": "null" + }, + "pasteOutcome": "error" + }, + "f3df5e006d8e": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "settings": { + "terminalCopyTrimsGutter": true + } + } + } + } + }, + "f63f705d3a7f": { + "name": "terminal.send#1", + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"terminal.send\",\"params\":{\"terminal\":\"terminal-1\",\"text\":\"\\u001b[200~echo hi\\u001b[201~\",\"enter\":false,\"client\":{\"id\":\"device-token-1\",\"type\":\"mobile\"}}}" + }, + "fd8a212e7908": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": false, + "terminal": "terminal-1", + "text": "\u001b[200~echo hi\u001b[201~" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true + } + } + } + }, + "recording": { + "scenario": "matrix-session.terminal-paste-terminal.send-1", + "checkpoints": [ + { + "id": "terminal-paste-accepted.prelude:copied", + "observation": { + "sender": ["f3df5e006d8e"], + "payloads": ["7ddcb1852b39"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a" + }, + "state": "84990d8de7e9", + "effects": ["7107540f16ca"] + } + }, + { + "id": "terminal-paste-accepted.prelude:cleanup", + "observation": { + "sender": ["f3df5e006d8e", "7b22b223fd28"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "84990d8de7e9", + "effects": ["7107540f16ca", "51eb315f9426", "d8542c0eba03"] + } + }, + { + "id": "terminal-paste-accepted.normal:pasted", + "observation": { + "sender": ["f3df5e006d8e", "e142ca57bc1f", "4e9a0397c220"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + }, + { + "id": "terminal-paste-accepted.result-absent:pasted", + "observation": { + "sender": ["f3df5e006d8e", "fd8a212e7908"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "0bc8e5a0d4e1"] + } + }, + { + "id": "terminal-paste-accepted.result-null:pasted", + "observation": { + "sender": ["f3df5e006d8e", "847bbb81a389"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "0bc8e5a0d4e1"] + } + }, + { + "id": "terminal-paste-accepted.inner-ok-missing:pasted", + "observation": { + "sender": ["f3df5e006d8e", "50c4c0f3e188"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "0bc8e5a0d4e1"] + } + }, + { + "id": "terminal-paste-accepted.inner-false-string-error:pasted", + "observation": { + "sender": ["f3df5e006d8e", "a3feb18ca8f5"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "0bc8e5a0d4e1"] + } + }, + { + "id": "terminal-paste-accepted.inner-false-object-error:pasted", + "observation": { + "sender": ["f3df5e006d8e", "def2823f0306"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "0bc8e5a0d4e1"] + } + }, + { + "id": "terminal-paste-accepted.outer-refused:pasted", + "observation": { + "sender": ["f3df5e006d8e", "21f01e71bca3"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "0bc8e5a0d4e1"] + } + }, + { + "id": "terminal-paste-accepted.outer-refused-no-message:pasted", + "observation": { + "sender": ["f3df5e006d8e", "280b3e341a56"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "0bc8e5a0d4e1"] + } + }, + { + "id": "terminal-paste-accepted.method-not-found:pasted", + "observation": { + "sender": ["f3df5e006d8e", "7a59c74ff63f"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "0bc8e5a0d4e1"] + } + }, + { + "id": "terminal-paste-accepted.transport-rejection:pasted", + "observation": { + "sender": ["f3df5e006d8e", "cb723e8eb690"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "ebe2af37c0a0", + "effects": ["7107540f16ca", "51eb315f9426", "d8542c0eba03"] + } + }, + { + "id": "terminal-paste-accepted.transport-rejection-no-message:pasted", + "observation": { + "sender": ["f3df5e006d8e", "a76bbdc0f8dd"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "ebe2af37c0a0", + "effects": ["7107540f16ca", "51eb315f9426", "d8542c0eba03"] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/matrix-session.worktree-connection-repo.list-1.json b/mobile/rpc-foundation/goldens/matrix-session.worktree-connection-repo.list-1.json new file mode 100644 index 00000000000..a87883ff6ff --- /dev/null +++ b/mobile/rpc-foundation/goldens/matrix-session.worktree-connection-repo.list-1.json @@ -0,0 +1,732 @@ +{ + "operation": "session.terminal-clipboard", + "family": "session.worktree-connection", + "namedDeltas": [], + "runnerVersion": 1, + "baseline": "e7206f62a827f4fe0a2badf3eecd2167b8ac4285", + "lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571", + "recorderSha256": "64a741e034b13bca69c466f93f713aa5c0cf3fbb2bbb02f357003506b17fe353", + "adapterSha256": "e7e3718f685e3713cf1b8209d59d618741f892bd286853b79bb456c59cec8d86", + "scenarioSha256": "e7fb7a8083aac4c8c5edc7dd52465ca53bfcded00bf8b1ec18ae7604651bbe32", + "platform": "darwin", + "scenarioVersion": 1, + "projectionVersion": 2, + "goldenFormatVersion": 5, + "values": { + "2381a3fe154e": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "TypeError", + "message": "Cannot read properties of undefined (reading 'repos')", + "isRpcDeliveryUnknown": false + } + }, + "32a7c0ae7918": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "outer refused", + "isRpcDeliveryUnknown": false + } + }, + "37c71f7bece7": { + "connectionId": "Cannot read properties of undefined (reading 'repos')", + "crash": { + "$rpc": "null" + }, + "pasteOutcome": "unpasted" + }, + "397587780f89": { + "name": "repo.list#1", + "args": [ + { + "name": "method", + "value": "repo.list" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "refused", + "message": "" + }, + "id": "frame-2", + "ok": false + } + } + }, + "45ad6315feb3": { + "connectionId": "", + "crash": { + "$rpc": "null" + }, + "pasteOutcome": "unpasted" + }, + "52500878f297": { + "name": "repo.list#1", + "args": [ + { + "name": "method", + "value": "repo.list" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "refused", + "message": "outer refused" + }, + "id": "frame-2", + "ok": false + } + } + }, + "572ea5e1e980": { + "name": "repo.list#1", + "args": [ + { + "name": "method", + "value": "repo.list" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "error": "inner refused", + "ok": false + } + } + } + }, + "594101d24d72": { + "name": "repo.list#1", + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"repo.list\"}" + }, + "63200026ea8b": { + "name": "repo.list#1", + "args": [ + { + "name": "method", + "value": "repo.list" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "repos": [ + { + "connectionId": "ssh-zeta", + "displayName": "zeta", + "id": "repo-z" + }, + { + "connectionId": "ssh-alpha", + "displayName": "alpha", + "id": "repo-a" + } + ] + } + } + } + }, + "63c1ccf6c3e3": { + "name": "repo.list#1", + "args": [ + { + "name": "method", + "value": "repo.list" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "$rpc": "null" + } + } + } + }, + "63dfbb6942f2": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "TypeError", + "message": "Cannot read properties of null (reading 'repos')", + "isRpcDeliveryUnknown": false + } + }, + "6e5c6593dad8": { + "name": "repo.list#1", + "args": [ + { + "name": "method", + "value": "repo.list" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "transport failure", + "isRpcDeliveryUnknown": true + } + } + }, + "7ddcb1852b39": { + "name": "settings.get#1", + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"settings.get\"}" + }, + "87c5de8dadf8": { + "connectionId": { + "$rpc": "null" + }, + "crash": { + "$rpc": "null" + }, + "pasteOutcome": "unpasted" + }, + "978b9015256c": { + "connectionId": "transport failure", + "crash": { + "$rpc": "null" + }, + "pasteOutcome": "unpasted" + }, + "9eb52b24aea4": { + "name": "repo.list#1", + "args": [ + { + "name": "method", + "value": "repo.list" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true + } + } + }, + "a947768bc0ed": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "transport failure", + "isRpcDeliveryUnknown": true + } + }, + "ae85758452ae": { + "name": "repo.list#1", + "args": [ + { + "name": "method", + "value": "repo.list" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "error": "refused" + } + } + } + }, + "af2065a16bd9": { + "connectionId": "Unknown method", + "crash": { + "$rpc": "null" + }, + "pasteOutcome": "unpasted" + }, + "b948e8307e81": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "Unknown method", + "isRpcDeliveryUnknown": false + } + }, + "c7584e82c72f": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "", + "isRpcDeliveryUnknown": true + } + }, + "caa7fdd9839a": { + "name": "repo.list#1", + "args": [ + { + "name": "method", + "value": "repo.list" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "error": { + "message": "inner refused" + }, + "ok": false + } + } + } + }, + "cc1facdf008c": { + "name": "repo.list#1", + "args": [ + { + "name": "method", + "value": "repo.list" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "", + "isRpcDeliveryUnknown": true + } + } + }, + "d1013a931f34": { + "connectionId": "Cannot read properties of null (reading 'repos')", + "crash": { + "$rpc": "null" + }, + "pasteOutcome": "unpasted" + }, + "d607cc114b04": { + "connectionId": "outer refused", + "crash": { + "$rpc": "null" + }, + "pasteOutcome": "unpasted" + }, + "e31fdb68b5c2": { + "name": "repo.list#1", + "args": [ + { + "name": "method", + "value": "repo.list" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "method_not_found", + "message": "Unknown method" + }, + "id": "frame-2", + "ok": false + } + } + }, + "e61132f30b52": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": "ssh-alpha" + }, + "e84b72d7c6fc": { + "connectionId": "ssh-alpha", + "crash": { + "$rpc": "null" + }, + "pasteOutcome": "unpasted" + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "ee20a1dc39e7": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "null" + } + }, + "f3b516f62081": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "", + "isRpcDeliveryUnknown": false + } + }, + "f3df5e006d8e": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "settings": { + "terminalCopyTrimsGutter": true + } + } + } + } + } + }, + "recording": { + "scenario": "matrix-session.worktree-connection-repo.list-1", + "checkpoints": [ + { + "id": "terminal-worktree-connection-resolved.normal:resolved", + "observation": { + "sender": ["f3df5e006d8e", "63200026ea8b"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "e61132f30b52" + }, + "state": "e84b72d7c6fc", + "effects": [] + } + }, + { + "id": "terminal-worktree-connection-resolved.result-absent:resolved", + "observation": { + "sender": ["f3df5e006d8e", "9eb52b24aea4"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "2381a3fe154e" + }, + "state": "37c71f7bece7", + "effects": [] + } + }, + { + "id": "terminal-worktree-connection-resolved.result-null:resolved", + "observation": { + "sender": ["f3df5e006d8e", "63c1ccf6c3e3"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "63dfbb6942f2" + }, + "state": "d1013a931f34", + "effects": [] + } + }, + { + "id": "terminal-worktree-connection-resolved.inner-ok-missing:resolved", + "observation": { + "sender": ["f3df5e006d8e", "ae85758452ae"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "ee20a1dc39e7" + }, + "state": "87c5de8dadf8", + "effects": [] + } + }, + { + "id": "terminal-worktree-connection-resolved.inner-false-string-error:resolved", + "observation": { + "sender": ["f3df5e006d8e", "572ea5e1e980"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "ee20a1dc39e7" + }, + "state": "87c5de8dadf8", + "effects": [] + } + }, + { + "id": "terminal-worktree-connection-resolved.inner-false-object-error:resolved", + "observation": { + "sender": ["f3df5e006d8e", "caa7fdd9839a"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "ee20a1dc39e7" + }, + "state": "87c5de8dadf8", + "effects": [] + } + }, + { + "id": "terminal-worktree-connection-resolved.outer-refused:resolved", + "observation": { + "sender": ["f3df5e006d8e", "52500878f297"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "32a7c0ae7918" + }, + "state": "d607cc114b04", + "effects": [] + } + }, + { + "id": "terminal-worktree-connection-resolved.outer-refused-no-message:resolved", + "observation": { + "sender": ["f3df5e006d8e", "397587780f89"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "f3b516f62081" + }, + "state": "45ad6315feb3", + "effects": [] + } + }, + { + "id": "terminal-worktree-connection-resolved.method-not-found:resolved", + "observation": { + "sender": ["f3df5e006d8e", "e31fdb68b5c2"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "b948e8307e81" + }, + "state": "af2065a16bd9", + "effects": [] + } + }, + { + "id": "terminal-worktree-connection-resolved.transport-rejection:resolved", + "observation": { + "sender": ["f3df5e006d8e", "6e5c6593dad8"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "a947768bc0ed" + }, + "state": "978b9015256c", + "effects": [] + } + }, + { + "id": "terminal-worktree-connection-resolved.transport-rejection-no-message:resolved", + "observation": { + "sender": ["f3df5e006d8e", "cc1facdf008c"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "c7584e82c72f" + }, + "state": "45ad6315feb3", + "effects": [] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/matrix-session.worktree-connection-settings.get-1.json b/mobile/rpc-foundation/goldens/matrix-session.worktree-connection-settings.get-1.json new file mode 100644 index 00000000000..8628cbc5a67 --- /dev/null +++ b/mobile/rpc-foundation/goldens/matrix-session.worktree-connection-settings.get-1.json @@ -0,0 +1,603 @@ +{ + "operation": "session.terminal-clipboard", + "family": "session.worktree-connection", + "namedDeltas": [], + "runnerVersion": 1, + "baseline": "e7206f62a827f4fe0a2badf3eecd2167b8ac4285", + "lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571", + "recorderSha256": "64a741e034b13bca69c466f93f713aa5c0cf3fbb2bbb02f357003506b17fe353", + "adapterSha256": "e7e3718f685e3713cf1b8209d59d618741f892bd286853b79bb456c59cec8d86", + "scenarioSha256": "b1e1b221ab7bfe5356c89a09cf4252613c78aecab48b2212e84ac7de885ec569", + "platform": "darwin", + "scenarioVersion": 1, + "projectionVersion": 2, + "goldenFormatVersion": 5, + "values": { + "0fc3e204e7ba": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "error": "refused" + } + } + } + }, + "127ad2bdc042": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "error": { + "message": "inner refused" + }, + "ok": false + } + } + } + }, + "2b3aa0da0852": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "", + "isRpcDeliveryUnknown": true + } + } + }, + "594101d24d72": { + "name": "repo.list#1", + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"repo.list\"}" + }, + "63200026ea8b": { + "name": "repo.list#1", + "args": [ + { + "name": "method", + "value": "repo.list" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "repos": [ + { + "connectionId": "ssh-zeta", + "displayName": "zeta", + "id": "repo-z" + }, + { + "connectionId": "ssh-alpha", + "displayName": "alpha", + "id": "repo-a" + } + ] + } + } + } + }, + "6a98511b6371": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "refused", + "message": "" + }, + "id": "frame-1", + "ok": false + } + } + }, + "7ddcb1852b39": { + "name": "settings.get#1", + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"settings.get\"}" + }, + "8b77098df0c3": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "transport failure", + "isRpcDeliveryUnknown": true + } + } + }, + "8f8296303a77": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "refused", + "message": "outer refused" + }, + "id": "frame-1", + "ok": false + } + } + }, + "b759ab27e4dd": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "method_not_found", + "message": "Unknown method" + }, + "id": "frame-1", + "ok": false + } + } + }, + "d27ce798af34": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "error": "inner refused", + "ok": false + } + } + } + }, + "e0cf1af55a54": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true + } + } + }, + "e1bd8b4a5d70": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "$rpc": "null" + } + } + } + }, + "e61132f30b52": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": "ssh-alpha" + }, + "e84b72d7c6fc": { + "connectionId": "ssh-alpha", + "crash": { + "$rpc": "null" + }, + "pasteOutcome": "unpasted" + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "f3df5e006d8e": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "settings": { + "terminalCopyTrimsGutter": true + } + } + } + } + } + }, + "recording": { + "scenario": "matrix-session.worktree-connection-settings.get-1", + "checkpoints": [ + { + "id": "terminal-worktree-connection-resolved.normal:resolved", + "observation": { + "sender": ["f3df5e006d8e", "63200026ea8b"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "e61132f30b52" + }, + "state": "e84b72d7c6fc", + "effects": [] + } + }, + { + "id": "terminal-worktree-connection-resolved.result-absent:resolved", + "observation": { + "sender": ["e0cf1af55a54", "63200026ea8b"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "e61132f30b52" + }, + "state": "e84b72d7c6fc", + "effects": [] + } + }, + { + "id": "terminal-worktree-connection-resolved.result-null:resolved", + "observation": { + "sender": ["e1bd8b4a5d70", "63200026ea8b"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "e61132f30b52" + }, + "state": "e84b72d7c6fc", + "effects": [] + } + }, + { + "id": "terminal-worktree-connection-resolved.inner-ok-missing:resolved", + "observation": { + "sender": ["0fc3e204e7ba", "63200026ea8b"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "e61132f30b52" + }, + "state": "e84b72d7c6fc", + "effects": [] + } + }, + { + "id": "terminal-worktree-connection-resolved.inner-false-string-error:resolved", + "observation": { + "sender": ["d27ce798af34", "63200026ea8b"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "e61132f30b52" + }, + "state": "e84b72d7c6fc", + "effects": [] + } + }, + { + "id": "terminal-worktree-connection-resolved.inner-false-object-error:resolved", + "observation": { + "sender": ["127ad2bdc042", "63200026ea8b"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "e61132f30b52" + }, + "state": "e84b72d7c6fc", + "effects": [] + } + }, + { + "id": "terminal-worktree-connection-resolved.outer-refused:resolved", + "observation": { + "sender": ["8f8296303a77", "63200026ea8b"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "e61132f30b52" + }, + "state": "e84b72d7c6fc", + "effects": [] + } + }, + { + "id": "terminal-worktree-connection-resolved.outer-refused-no-message:resolved", + "observation": { + "sender": ["6a98511b6371", "63200026ea8b"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "e61132f30b52" + }, + "state": "e84b72d7c6fc", + "effects": [] + } + }, + { + "id": "terminal-worktree-connection-resolved.method-not-found:resolved", + "observation": { + "sender": ["b759ab27e4dd", "63200026ea8b"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "e61132f30b52" + }, + "state": "e84b72d7c6fc", + "effects": [] + } + }, + { + "id": "terminal-worktree-connection-resolved.transport-rejection:resolved", + "observation": { + "sender": ["8b77098df0c3", "63200026ea8b"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "e61132f30b52" + }, + "state": "e84b72d7c6fc", + "effects": [] + } + }, + { + "id": "terminal-worktree-connection-resolved.transport-rejection-no-message:resolved", + "observation": { + "sender": ["2b3aa0da0852", "63200026ea8b"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "e61132f30b52" + }, + "state": "e84b72d7c6fc", + "effects": [] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/terminal-input-send-accepted.json b/mobile/rpc-foundation/goldens/terminal-input-send-accepted.json new file mode 100644 index 00000000000..e3c2f269ae3 --- /dev/null +++ b/mobile/rpc-foundation/goldens/terminal-input-send-accepted.json @@ -0,0 +1,157 @@ +{ + "operation": "session.terminal-input-send", + "family": "session.terminal-input-send", + "namedDeltas": [], + "runnerVersion": 1, + "baseline": "e7206f62a827f4fe0a2badf3eecd2167b8ac4285", + "lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571", + "recorderSha256": "64a741e034b13bca69c466f93f713aa5c0cf3fbb2bbb02f357003506b17fe353", + "adapterSha256": "e7e3718f685e3713cf1b8209d59d618741f892bd286853b79bb456c59cec8d86", + "scenarioSha256": "7cdbf3308411ed6764cc1cdcc0f663a27ddc9390fcc329c49fad4b27cb5a7fd5", + "platform": "darwin", + "scenarioVersion": 1, + "projectionVersion": 2, + "goldenFormatVersion": 5, + "values": { + "093b7147f9b0": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "changed": 1 + } + } + } + }, + "0ba725456703": { + "crash": { + "$rpc": "null" + }, + "input": "", + "liveAccepted": "unsent", + "sending": false + }, + "191580ba859d": { + "name": "orchestration.workerTerminalUserInput#1", + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"orchestration.workerTerminalUserInput\",\"params\":{\"terminal\":\"terminal-1\"}}" + }, + "5e9826c92f7b": { + "crash": { + "$rpc": "null" + }, + "input": "ls -la", + "liveAccepted": "unsent", + "sending": false + }, + "750695db0ef8": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": true, + "terminal": "terminal-1", + "text": "ls -la" + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "send": { + "accepted": true + } + } + } + } + }, + "c28710807a02": { + "name": "terminal.send#1", + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"terminal.send\",\"params\":{\"terminal\":\"terminal-1\",\"text\":\"ls -la\",\"enter\":true,\"client\":{\"id\":\"device-token-1\",\"type\":\"mobile\"}}}" + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + } + }, + "recording": { + "scenario": "terminal-input-send-accepted", + "checkpoints": [ + { + "id": "composed", + "observation": { + "sender": [], + "payloads": [], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a" + }, + "state": "5e9826c92f7b", + "effects": [] + } + }, + { + "id": "sent", + "observation": { + "sender": ["750695db0ef8", "093b7147f9b0"], + "payloads": ["c28710807a02", "191580ba859d"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "0ba725456703", + "effects": [] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/terminal-input-send-refused.json b/mobile/rpc-foundation/goldens/terminal-input-send-refused.json new file mode 100644 index 00000000000..06bb9dd0abd --- /dev/null +++ b/mobile/rpc-foundation/goldens/terminal-input-send-refused.json @@ -0,0 +1,97 @@ +{ + "operation": "session.terminal-input-send", + "family": "session.terminal-input-send", + "namedDeltas": [], + "runnerVersion": 1, + "baseline": "e7206f62a827f4fe0a2badf3eecd2167b8ac4285", + "lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571", + "recorderSha256": "64a741e034b13bca69c466f93f713aa5c0cf3fbb2bbb02f357003506b17fe353", + "adapterSha256": "e7e3718f685e3713cf1b8209d59d618741f892bd286853b79bb456c59cec8d86", + "scenarioSha256": "eb5e47e3accccc7ca280ca029f97405905b0cee8a05afb9ef15448314041d9d4", + "platform": "darwin", + "scenarioVersion": 1, + "projectionVersion": 2, + "goldenFormatVersion": 5, + "values": { + "5e9826c92f7b": { + "crash": { + "$rpc": "null" + }, + "input": "ls -la", + "liveAccepted": "unsent", + "sending": false + }, + "73d599c067f6": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": true, + "terminal": "terminal-1", + "text": "ls -la" + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "send": { + "accepted": false + } + } + } + } + }, + "c28710807a02": { + "name": "terminal.send#1", + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"terminal.send\",\"params\":{\"terminal\":\"terminal-1\",\"text\":\"ls -la\",\"enter\":true,\"client\":{\"id\":\"device-token-1\",\"type\":\"mobile\"}}}" + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + } + }, + "recording": { + "scenario": "terminal-input-send-refused", + "checkpoints": [ + { + "id": "restored", + "observation": { + "sender": ["73d599c067f6"], + "payloads": ["c28710807a02"], + "settlements": { + "mount": "eb79a9b3682a", + "type": "eb79a9b3682a", + "send": "eb79a9b3682a" + }, + "state": "5e9826c92f7b", + "effects": [] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/terminal-live-input-accepted.json b/mobile/rpc-foundation/goldens/terminal-live-input-accepted.json new file mode 100644 index 00000000000..2d8a7022f88 --- /dev/null +++ b/mobile/rpc-foundation/goldens/terminal-live-input-accepted.json @@ -0,0 +1,141 @@ +{ + "operation": "session.terminal-input-send", + "family": "session.terminal-input-send", + "namedDeltas": [], + "runnerVersion": 1, + "baseline": "e7206f62a827f4fe0a2badf3eecd2167b8ac4285", + "lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571", + "recorderSha256": "64a741e034b13bca69c466f93f713aa5c0cf3fbb2bbb02f357003506b17fe353", + "adapterSha256": "e7e3718f685e3713cf1b8209d59d618741f892bd286853b79bb456c59cec8d86", + "scenarioSha256": "391a4f681443f099e6ea4417811d82d730242dfe07e21f74b0ad49a98bcd7c81", + "platform": "darwin", + "scenarioVersion": 1, + "projectionVersion": 2, + "goldenFormatVersion": 5, + "values": { + "093b7147f9b0": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "changed": 1 + } + } + } + }, + "0a0137383ed3": { + "name": "terminal.send#1", + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"terminal.send\",\"params\":{\"terminal\":\"terminal-1\",\"text\":\"ls\",\"enter\":false,\"client\":{\"id\":\"device-token-1\",\"type\":\"mobile\"}}}" + }, + "191580ba859d": { + "name": "orchestration.workerTerminalUserInput#1", + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"orchestration.workerTerminalUserInput\",\"params\":{\"terminal\":\"terminal-1\"}}" + }, + "4dbb5ea36ed2": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": false, + "terminal": "terminal-1", + "text": "ls" + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "send": { + "accepted": true + } + } + } + } + }, + "84e5ca07cb7a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": true + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "f0a0a85e7632": { + "crash": { + "$rpc": "null" + }, + "input": "", + "liveAccepted": true, + "sending": false + } + }, + "recording": { + "scenario": "terminal-live-input-accepted", + "checkpoints": [ + { + "id": "live-sent", + "observation": { + "sender": ["4dbb5ea36ed2", "093b7147f9b0"], + "payloads": ["0a0137383ed3", "191580ba859d"], + "settlements": { + "mount": "eb79a9b3682a", + "live": "84e5ca07cb7a" + }, + "state": "f0a0a85e7632", + "effects": [] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/terminal-paste-accepted.json b/mobile/rpc-foundation/goldens/terminal-paste-accepted.json new file mode 100644 index 00000000000..3a9b18b4677 --- /dev/null +++ b/mobile/rpc-foundation/goldens/terminal-paste-accepted.json @@ -0,0 +1,216 @@ +{ + "operation": "session.terminal-clipboard", + "family": "session.terminal-paste", + "namedDeltas": [], + "runnerVersion": 1, + "baseline": "e7206f62a827f4fe0a2badf3eecd2167b8ac4285", + "lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571", + "recorderSha256": "64a741e034b13bca69c466f93f713aa5c0cf3fbb2bbb02f357003506b17fe353", + "adapterSha256": "e7e3718f685e3713cf1b8209d59d618741f892bd286853b79bb456c59cec8d86", + "scenarioSha256": "48bb495de3b54f2b2edc0543f0f232ff4fd6068d5aca34d005766ebacbb078c9", + "platform": "darwin", + "scenarioVersion": 1, + "projectionVersion": 2, + "goldenFormatVersion": 5, + "values": { + "23812b44df37": { + "name": "refresh-can-paste", + "value": {}, + "sent": 3 + }, + "4e9a0397c220": { + "name": "orchestration.workerTerminalUserInput#1", + "args": [ + { + "name": "method", + "value": "orchestration.workerTerminalUserInput" + }, + { + "name": "params", + "value": { + "terminal": "terminal-1" + } + }, + { + "name": "options", + "value": { + "budgetSpansConnect": true, + "failWhenDisconnected": true, + "timeoutMs": 5000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-3", + "ok": true, + "result": { + "changed": 1 + } + } + } + }, + "51eb315f9426": { + "name": "flush-live-input", + "value": { + "handle": "terminal-1" + }, + "sent": 1 + }, + "528166d1face": { + "connectionId": "unresolved", + "crash": { + "$rpc": "null" + }, + "pasteOutcome": "sent" + }, + "63ceb8bb55e0": { + "name": "orchestration.workerTerminalUserInput#1", + "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"orchestration.workerTerminalUserInput\",\"params\":{\"terminal\":\"terminal-1\"}}" + }, + "7107540f16ca": { + "name": "toast", + "value": { + "durationMs": { + "$rpc": "null" + }, + "message": "Copied" + }, + "sent": 1 + }, + "7ddcb1852b39": { + "name": "settings.get#1", + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"settings.get\"}" + }, + "84990d8de7e9": { + "connectionId": "unresolved", + "crash": { + "$rpc": "null" + }, + "pasteOutcome": "unpasted" + }, + "e142ca57bc1f": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": false, + "terminal": "terminal-1", + "text": "\u001b[200~echo hi\u001b[201~" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "send": { + "accepted": true + } + } + } + } + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "f3df5e006d8e": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "settings": { + "terminalCopyTrimsGutter": true + } + } + } + } + }, + "f63f705d3a7f": { + "name": "terminal.send#1", + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"terminal.send\",\"params\":{\"terminal\":\"terminal-1\",\"text\":\"\\u001b[200~echo hi\\u001b[201~\",\"enter\":false,\"client\":{\"id\":\"device-token-1\",\"type\":\"mobile\"}}}" + } + }, + "recording": { + "scenario": "terminal-paste-accepted", + "checkpoints": [ + { + "id": "copied", + "observation": { + "sender": ["f3df5e006d8e"], + "payloads": ["7ddcb1852b39"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a" + }, + "state": "84990d8de7e9", + "effects": ["7107540f16ca"] + } + }, + { + "id": "pasted", + "observation": { + "sender": ["f3df5e006d8e", "e142ca57bc1f", "4e9a0397c220"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f", "63ceb8bb55e0"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "23812b44df37"] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/terminal-paste-refused.json b/mobile/rpc-foundation/goldens/terminal-paste-refused.json new file mode 100644 index 00000000000..db529309c32 --- /dev/null +++ b/mobile/rpc-foundation/goldens/terminal-paste-refused.json @@ -0,0 +1,157 @@ +{ + "operation": "session.terminal-clipboard", + "family": "session.terminal-paste", + "namedDeltas": [], + "runnerVersion": 1, + "baseline": "e7206f62a827f4fe0a2badf3eecd2167b8ac4285", + "lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571", + "recorderSha256": "64a741e034b13bca69c466f93f713aa5c0cf3fbb2bbb02f357003506b17fe353", + "adapterSha256": "e7e3718f685e3713cf1b8209d59d618741f892bd286853b79bb456c59cec8d86", + "scenarioSha256": "78e62b9125252accc7f6d2ce772b93c84a917b01d2df308c1f9fb163d9127665", + "platform": "darwin", + "scenarioVersion": 1, + "projectionVersion": 2, + "goldenFormatVersion": 5, + "values": { + "0bc8e5a0d4e1": { + "name": "refresh-can-paste", + "value": {}, + "sent": 2 + }, + "42b6b7a204f7": { + "name": "terminal.send#1", + "args": [ + { + "name": "method", + "value": "terminal.send" + }, + { + "name": "params", + "value": { + "client": { + "id": "device-token-1", + "type": "mobile" + }, + "enter": false, + "terminal": "terminal-1", + "text": "\u001b[200~echo hi\u001b[201~" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "send": { + "accepted": false + } + } + } + } + }, + "51eb315f9426": { + "name": "flush-live-input", + "value": { + "handle": "terminal-1" + }, + "sent": 1 + }, + "528166d1face": { + "connectionId": "unresolved", + "crash": { + "$rpc": "null" + }, + "pasteOutcome": "sent" + }, + "7107540f16ca": { + "name": "toast", + "value": { + "durationMs": { + "$rpc": "null" + }, + "message": "Copied" + }, + "sent": 1 + }, + "7ddcb1852b39": { + "name": "settings.get#1", + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"settings.get\"}" + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "f3df5e006d8e": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "settings": { + "terminalCopyTrimsGutter": true + } + } + } + } + }, + "f63f705d3a7f": { + "name": "terminal.send#1", + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"terminal.send\",\"params\":{\"terminal\":\"terminal-1\",\"text\":\"\\u001b[200~echo hi\\u001b[201~\",\"enter\":false,\"client\":{\"id\":\"device-token-1\",\"type\":\"mobile\"}}}" + } + }, + "recording": { + "scenario": "terminal-paste-refused", + "checkpoints": [ + { + "id": "not-reported", + "observation": { + "sender": ["f3df5e006d8e", "42b6b7a204f7"], + "payloads": ["7ddcb1852b39", "f63f705d3a7f"], + "settlements": { + "mount": "eb79a9b3682a", + "copy": "eb79a9b3682a", + "paste": "eb79a9b3682a" + }, + "state": "528166d1face", + "effects": ["7107540f16ca", "51eb315f9426", "0bc8e5a0d4e1"] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/terminal-worktree-connection-resolved.json b/mobile/rpc-foundation/goldens/terminal-worktree-connection-resolved.json new file mode 100644 index 00000000000..182ea899b10 --- /dev/null +++ b/mobile/rpc-foundation/goldens/terminal-worktree-connection-resolved.json @@ -0,0 +1,143 @@ +{ + "operation": "session.terminal-clipboard", + "family": "session.worktree-connection", + "namedDeltas": [], + "runnerVersion": 1, + "baseline": "e7206f62a827f4fe0a2badf3eecd2167b8ac4285", + "lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571", + "recorderSha256": "64a741e034b13bca69c466f93f713aa5c0cf3fbb2bbb02f357003506b17fe353", + "adapterSha256": "e7e3718f685e3713cf1b8209d59d618741f892bd286853b79bb456c59cec8d86", + "scenarioSha256": "f921c4a764cdf7a4c1df0a7ec618d7c3b1d8a05ee4baa42d66f3bc0d95b3f550", + "platform": "darwin", + "scenarioVersion": 1, + "projectionVersion": 2, + "goldenFormatVersion": 5, + "values": { + "594101d24d72": { + "name": "repo.list#1", + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"repo.list\"}" + }, + "63200026ea8b": { + "name": "repo.list#1", + "args": [ + { + "name": "method", + "value": "repo.list" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "repos": [ + { + "connectionId": "ssh-zeta", + "displayName": "zeta", + "id": "repo-z" + }, + { + "connectionId": "ssh-alpha", + "displayName": "alpha", + "id": "repo-a" + } + ] + } + } + } + }, + "7ddcb1852b39": { + "name": "settings.get#1", + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"settings.get\"}" + }, + "e61132f30b52": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": "ssh-alpha" + }, + "e84b72d7c6fc": { + "connectionId": "ssh-alpha", + "crash": { + "$rpc": "null" + }, + "pasteOutcome": "unpasted" + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "f3df5e006d8e": { + "name": "settings.get#1", + "args": [ + { + "name": "method", + "value": "settings.get" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "settings": { + "terminalCopyTrimsGutter": true + } + } + } + } + } + }, + "recording": { + "scenario": "terminal-worktree-connection-resolved", + "checkpoints": [ + { + "id": "resolved", + "observation": { + "sender": ["f3df5e006d8e", "63200026ea8b"], + "payloads": ["7ddcb1852b39", "594101d24d72"], + "settlements": { + "mount": "eb79a9b3682a", + "connection": "e61132f30b52" + }, + "state": "e84b72d7c6fc", + "effects": [] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/pilot-scenarios.json b/mobile/rpc-foundation/pilot-scenarios.json index 7d298335865..acf2f71a18e 100644 --- a/mobile/rpc-foundation/pilot-scenarios.json +++ b/mobile/rpc-foundation/pilot-scenarios.json @@ -18694,6 +18694,377 @@ "checkpoint": "reconciled" } ] + }, + { + "id": "terminal-paste-accepted", + "operation": "session.terminal-clipboard", + "version": 1, + "family": "session.terminal-paste", + "sites": [ + "mobile/src/session/use-mobile-terminal-paste.ts", + "mobile/src/session/use-mobile-session-accessory-selection.ts", + "mobile/src/terminal/worker-terminal-takeover-report.ts" + ], + "schedules": [], + "steps": [ + { + "action": "mount", + "id": "mount" + }, + { + "complete": "settings.get#1", + "params": { + "$undefined": true + }, + "reply": { + "ok": true, + "result": { + "settings": { + "terminalCopyTrimsGutter": true + } + } + } + }, + { + "action": "copy", + "id": "copy", + "args": { + "text": "echo hi" + } + }, + { + "checkpoint": "copied" + }, + { + "action": "paste", + "id": "paste" + }, + { + "complete": "terminal.send#1", + "params": { + "terminal": "terminal-1", + "text": "\u001b[200~echo hi\u001b[201~", + "enter": false, + "client": { + "id": "device-token-1", + "type": "mobile" + } + }, + "reply": { + "ok": true, + "result": { + "send": { + "accepted": true + } + } + } + }, + { + "complete": "orchestration.workerTerminalUserInput#1", + "params": { + "terminal": "terminal-1" + }, + "reply": { + "ok": true, + "result": { + "changed": 1 + } + } + }, + { + "checkpoint": "pasted" + } + ] + }, + { + "id": "terminal-paste-refused", + "operation": "session.terminal-clipboard", + "version": 1, + "family": "session.terminal-paste", + "sites": ["mobile/src/session/use-mobile-terminal-paste.ts"], + "schedules": [], + "steps": [ + { + "action": "mount", + "id": "mount" + }, + { + "complete": "settings.get#1", + "params": { + "$undefined": true + }, + "reply": { + "ok": true, + "result": { + "settings": { + "terminalCopyTrimsGutter": true + } + } + } + }, + { + "action": "copy", + "id": "copy", + "args": { + "text": "echo hi" + } + }, + { + "action": "paste", + "id": "paste" + }, + { + "complete": "terminal.send#1", + "params": { + "terminal": "terminal-1", + "text": "\u001b[200~echo hi\u001b[201~", + "enter": false, + "client": { + "id": "device-token-1", + "type": "mobile" + } + }, + "reply": { + "ok": true, + "result": { + "send": { + "accepted": false + } + } + } + }, + { + "checkpoint": "not-reported" + } + ] + }, + { + "id": "terminal-worktree-connection-resolved", + "operation": "session.terminal-clipboard", + "version": 1, + "family": "session.worktree-connection", + "sites": ["mobile/src/session/use-mobile-session-accessory-selection.ts"], + "schedules": [], + "steps": [ + { + "action": "mount", + "id": "mount" + }, + { + "complete": "settings.get#1", + "params": { + "$undefined": true + }, + "reply": { + "ok": true, + "result": { + "settings": { + "terminalCopyTrimsGutter": true + } + } + } + }, + { + "action": "connection", + "id": "connection" + }, + { + "complete": "repo.list#1", + "params": { + "$undefined": true + }, + "reply": { + "ok": true, + "result": { + "repos": [ + { + "id": "repo-z", + "displayName": "zeta", + "connectionId": "ssh-zeta" + }, + { + "id": "repo-a", + "displayName": "alpha", + "connectionId": "ssh-alpha" + } + ] + } + } + }, + { + "checkpoint": "resolved" + } + ] + }, + { + "id": "terminal-input-send-accepted", + "operation": "session.terminal-input-send", + "version": 1, + "family": "session.terminal-input-send", + "sites": [ + "mobile/src/session/use-mobile-session-terminal-send-actions.ts", + "mobile/src/terminal/worker-terminal-takeover-report.ts" + ], + "schedules": [], + "steps": [ + { + "action": "mount", + "id": "mount" + }, + { + "action": "type", + "id": "type", + "args": { + "text": "ls -la" + } + }, + { + "checkpoint": "composed" + }, + { + "action": "send", + "id": "send" + }, + { + "complete": "terminal.send#1", + "params": { + "terminal": "terminal-1", + "text": "ls -la", + "enter": true, + "client": { + "id": "device-token-1", + "type": "mobile" + } + }, + "reply": { + "ok": true, + "result": { + "send": { + "accepted": true + } + } + } + }, + { + "complete": "orchestration.workerTerminalUserInput#1", + "params": { + "terminal": "terminal-1" + }, + "reply": { + "ok": true, + "result": { + "changed": 1 + } + } + }, + { + "checkpoint": "sent" + } + ] + }, + { + "id": "terminal-input-send-refused", + "operation": "session.terminal-input-send", + "version": 1, + "family": "session.terminal-input-send", + "sites": ["mobile/src/session/use-mobile-session-terminal-send-actions.ts"], + "schedules": [], + "steps": [ + { + "action": "mount", + "id": "mount" + }, + { + "action": "type", + "id": "type", + "args": { + "text": "ls -la" + } + }, + { + "action": "send", + "id": "send" + }, + { + "complete": "terminal.send#1", + "params": { + "terminal": "terminal-1", + "text": "ls -la", + "enter": true, + "client": { + "id": "device-token-1", + "type": "mobile" + } + }, + "reply": { + "ok": true, + "result": { + "send": { + "accepted": false + } + } + } + }, + { + "checkpoint": "restored" + } + ] + }, + { + "id": "terminal-live-input-accepted", + "operation": "session.terminal-input-send", + "version": 1, + "family": "session.terminal-input-send", + "sites": ["mobile/src/session/use-mobile-session-terminal-send-actions.ts"], + "schedules": [], + "steps": [ + { + "action": "mount", + "id": "mount" + }, + { + "action": "live", + "id": "live", + "args": { + "bytes": "ls" + } + }, + { + "complete": "terminal.send#1", + "params": { + "terminal": "terminal-1", + "text": "ls", + "enter": false, + "client": { + "id": "device-token-1", + "type": "mobile" + } + }, + "reply": { + "ok": true, + "result": { + "send": { + "accepted": true + } + } + } + }, + { + "complete": "orchestration.workerTerminalUserInput#1", + "params": { + "terminal": "terminal-1" + }, + "reply": { + "ok": true, + "result": { + "changed": 1 + } + } + }, + { + "checkpoint": "live-sent" + } + ] } ] } diff --git a/mobile/src/components/codex-reset-credit-consume-operations.ts b/mobile/src/components/codex-reset-credit-consume-operations.ts new file mode 100644 index 00000000000..b20baa68c1a --- /dev/null +++ b/mobile/src/components/codex-reset-credit-consume-operations.ts @@ -0,0 +1,37 @@ +import { bindDeferredRpcOperation, defineRpcOperation } from '../transport/rpc-operation' +import { rpcUncheckedPayloadReader } from '../transport/rpc-reader-payload' + +/** + * Redeeming an earned Codex rate-limit reset credit. + * + * `require-result-or-throw-message` because the confirm sheet shows the host's own sentence and + * never a diagnostic code, which is what the raw `throw new Error(response.error.message)` here + * spelled. The payload stays unread at this boundary: the call site's `decodeResetResult` is a + * scope-and-snapshot check that rejects a reply whose scope is not the one the attempt claimed, + * and moving any of it into a reader would split one refusal rule across two places. + * + * Separate from the capability probe on `status.get` next door, which answers a different question + * about the same feature with a different policy. + */ +export const codexResetCreditConsume = bindDeferredRpcOperation( + defineRpcOperation({ + name: 'accounts.consume-codex-reset-credit', + method: 'accounts.consumeCodexResetCredit', + acceptance: 'require-result-or-throw-message', + barrier: 'after-caller-barrier', + read: rpcUncheckedPayloadReader('codex-reset-credit') + }) +) + +/** What the redeem sends with, named from the operation so no module names the raw port. */ +export type MobileCodexResetCreditRpcSender = Parameters[0] + +/** + * The scope the host contract accepts, which pairs each runtime with the distro it may name. The + * shared `CodexResetCreditExpectedScope` predates that pairing and is one type wider, so the + * journal's schema is what holds the invariant; taken from the operation so no module here names + * the params catalog. + */ +export type MobileCodexResetCreditSendScope = Parameters< + typeof codexResetCreditConsume.request +>[1]['expectedScope'] diff --git a/mobile/src/components/codex-reset-credit.ts b/mobile/src/components/codex-reset-credit.ts index 25ecdcb9eb0..67d191f4b21 100644 --- a/mobile/src/components/codex-reset-credit.ts +++ b/mobile/src/components/codex-reset-credit.ts @@ -3,7 +3,11 @@ import { buildCodexResetCreditExpectedScope, type CodexResetCreditExpectedScope } from '../../../src/shared/codex-reset-credit-scope' -import type { RpcClient } from '../transport/rpc-client' +import { + codexResetCreditConsume, + type MobileCodexResetCreditRpcSender, + type MobileCodexResetCreditSendScope +} from './codex-reset-credit-consume-operations' import { clearCodexResetAttemptAfterAuthoritativeResponse, CodexResetCreditExpectedScopeSchema, @@ -217,7 +221,7 @@ function decodeResetResult( } async function performCodexResetCreditRequest( - client: Pick, + client: MobileCodexResetCreditRpcSender, options: { hostId: string expectedScope: CodexResetCreditExpectedScope @@ -225,18 +229,19 @@ async function performCodexResetCreditRequest( } ): Promise { const attempt = await getOrCreateCodexResetAttempt(options) - const response = await client.sendRequest( - 'accounts.consumeCodexResetCredit', + const response = await codexResetCreditConsume.request( + client, { idempotencyKey: attempt.idempotencyKey, - expectedScope: attempt.expectedScope + // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: every attempt is parsed through CodexResetAttemptSchema, whose refinement pairs runtime 'host' with a null distro and 'wsl' with a trimmed non-empty one. The bytes are unchanged. + expectedScope: attempt.expectedScope as MobileCodexResetCreditSendScope }, { timeoutMs: RESET_RPC_TIMEOUT_MS } ) - if (!response.ok) { - throw new Error(response.error.message) - } - const result = decodeResetResult(response.result, attempt.expectedScope) + const result = decodeResetResult( + codexResetCreditConsume.interpret(response), + attempt.expectedScope + ) let attemptJournalRetained = false try { await clearCodexResetAttemptAfterAuthoritativeResponse({ @@ -251,7 +256,7 @@ async function performCodexResetCreditRequest( } export async function requestCodexResetCredit( - client: Pick, + client: MobileCodexResetCreditRpcSender, options: { hostId: string expectedScope: CodexResetCreditExpectedScope diff --git a/mobile/src/components/use-new-workspace-repositories.ts b/mobile/src/components/use-new-workspace-repositories.ts index d2b700cc9ab..52ba6716143 100644 --- a/mobile/src/components/use-new-workspace-repositories.ts +++ b/mobile/src/components/use-new-workspace-repositories.ts @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react' import type { RpcClient } from '../transport/rpc-client' -import type { RpcSuccess } from '../transport/types' +import { nativeChatRepoListRead } from '../session/mobile-session-read-operations' import { getCachedRepos, setCachedRepos } from '../cache/repo-cache' import { useLastVisitedWorktreeRepoId } from '../worktree/use-last-visited-worktree-repo' import { @@ -50,19 +50,24 @@ export function useNewWorkspaceRepositories(args: { } let stale = false setLoading(true) - void client - .sendRequest('repo.list') + void nativeChatRepoListRead + .request(client) .then((response) => { - if (stale || !response.ok) { + if (stale) { return } - const result = (response as RpcSuccess).result as { repos: MobileWorkspaceRepo[] } - setRepos(result.repos) + const listed = nativeChatRepoListRead.interpret(response) + if (!listed.accepted) { + return + } + // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: Preserve the established response shape at this boundary. + const listedRepos = listed.value as MobileWorkspaceRepo[] + setRepos(listedRepos) if (hostId) { - setCachedRepos(hostId, result.repos) + setCachedRepos(hostId, listedRepos) } setSelectedRepo((current) => - refreshMobileNewWorkspaceDialogSelectedRepo(result.repos, current) + refreshMobileNewWorkspaceDialogSelectedRepo(listedRepos, current) ) }) .catch(() => undefined) diff --git a/mobile/src/notifications/push-dismissal-operations.ts b/mobile/src/notifications/push-dismissal-operations.ts new file mode 100644 index 00000000000..663e1f55753 --- /dev/null +++ b/mobile/src/notifications/push-dismissal-operations.ts @@ -0,0 +1,24 @@ +import { bindDeferredRpcOperation, defineRpcOperation } from '../transport/rpc-operation' +import { rpcUncheckedPayloadReader } from '../transport/rpc-reader-payload' + +/** + * The catch-up read that tells this device which of the banners still in its OS tray the host has + * already dismissed elsewhere. + * + * A skip rather than a throw: reconciliation is a background pass with no screen to raise a host + * message on, and a refusal leaves the tray as it is for the next pass. The member read stays at + * the call site, where the optional chaining over `dismissedPushes` tolerates a null result instead + * of throwing on it. + */ +export const pushMissedSinceRead = bindDeferredRpcOperation( + defineRpcOperation({ + name: 'notifications.missed-since-or-skip', + method: 'notifications.getMissedSince', + acceptance: 'success-result-or-skip', + barrier: 'after-caller-barrier', + read: rpcUncheckedPayloadReader('missed-notifications') + }) +) + +/** What the reconciliation sends with, named from the operation so no module names the raw port. */ +export type MobilePushDismissalRpcSender = Parameters[0] diff --git a/mobile/src/notifications/push-dismissal-reconciliation.ts b/mobile/src/notifications/push-dismissal-reconciliation.ts index 4c39ccfeb0f..5f54bb9f4c2 100644 --- a/mobile/src/notifications/push-dismissal-reconciliation.ts +++ b/mobile/src/notifications/push-dismissal-reconciliation.ts @@ -1,5 +1,5 @@ import * as Notifications from 'expo-notifications' -import type { RpcClient } from '../transport/rpc-client' +import { pushMissedSinceRead, type MobilePushDismissalRpcSender } from './push-dismissal-operations' import { loadHostCatalog } from '../transport/host-store' import { resolveHostIdForFingerprint } from './push-host-fingerprint' import { readNativeNotificationData } from './native-notification-data' @@ -40,24 +40,26 @@ async function readDelivered(hostId: string): Promise, + client: MobilePushDismissalRpcSender, hostId: string, isDisposed: () => boolean ): Promise { const entries = [...(await readDelivered(hostId)).entries()] for (let offset = 0; offset < entries.length && !isDisposed(); offset += 256) { const requested = new Map(entries.slice(offset, offset + 256)) - const reply = await client.sendRequest('notifications.getMissedSince', { + const reply = await pushMissedSinceRead.request(client, { // Reconcile the tray without requesting historical alerts. lastSeenSeq: Number.MAX_SAFE_INTEGER, deliveredPushes: [...requested.values()].map((payload) => readPushNotificationIdentity(payload)! ) }) - if (!reply.ok || isDisposed()) { + const missed = pushMissedSinceRead.interpret(reply) + if (!missed.accepted || isDisposed()) { return } - const result = reply.result as { dismissedPushes?: unknown } | undefined + // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: Preserve the established response shape at this boundary. + const result = missed.value as { dismissedPushes?: unknown } | undefined if (!Array.isArray(result?.dismissedPushes)) { continue } diff --git a/mobile/src/session/agent-send-keyboard-dismissal-wiring.test.ts b/mobile/src/session/agent-send-keyboard-dismissal-wiring.test.ts index 83c9263273b..cfc93265f7d 100644 --- a/mobile/src/session/agent-send-keyboard-dismissal-wiring.test.ts +++ b/mobile/src/session/agent-send-keyboard-dismissal-wiring.test.ts @@ -84,10 +84,12 @@ describe('terminal send keyboard dismissal wiring', () => { 'async function handleSend() {', 'async function handleAccessoryKey(' ) - const acceptedAt = slice.indexOf('const accepted = isTerminalSendRpcAccepted(response)') + const acceptedAt = slice.indexOf( + 'const accepted = terminalInputSend.interpret(response) === true' + ) const restoreAt = slice.indexOf('restoreRejectedDraft()', acceptedAt) const dismissAt = slice.indexOf('dismissKeyboardAfterAgentSend(') - const responseAt = slice.indexOf('const response = await client.sendRequest(') + const responseAt = slice.indexOf('const response = await terminalInputSend.request(') const catchAt = slice.indexOf('} catch {') expect(dismissAt).toBeGreaterThan(0) expect(responseAt).toBeGreaterThan(0) @@ -121,7 +123,7 @@ describe('terminal send keyboard dismissal wiring', () => { 'async function handleAccessoryKey(' ) const originAt = sendSlice.indexOf('handle: activeHandle') - const requestAt = sendSlice.indexOf('await client.sendRequest(') + const requestAt = sendSlice.indexOf('await terminalInputSend.request(') const restoreSlice = sourceSlice( sendActionsSource, 'const bufferedDraftSend = bufferedTerminalDraftState.beginBufferedTerminalDraftSend(', diff --git a/mobile/src/session/mobile-session-read-operations.ts b/mobile/src/session/mobile-session-read-operations.ts index 3fa00be2799..cb3caa76fe0 100644 --- a/mobile/src/session/mobile-session-read-operations.ts +++ b/mobile/src/session/mobile-session-read-operations.ts @@ -28,10 +28,15 @@ export type MobileRuntimeRepoSummary = { id: string; connectionId?: string | nul const repoListReader = rpcUncheckedMemberReader('runtime-repo-list', 'repos') /** - * The repo list, read for one workspace's connection id. Two call sites want it and disagree about - * a refusal, so each declares its own operation over the same reader rather than sharing a policy: - * the new-tab agent loader has nothing to show without it and raises the host's message, while the - * native-chat readability probe answers "not readable" and lets the screen render. + * The repo list, read for one workspace's connection id. Call sites disagree about a refusal, so + * each of the two operations below declares its own policy over the same reader rather than + * sharing one, and every consumer joins whichever policy it already had. + * + * Throw-message: the new-tab agent loader has nothing to show without the list, and the terminal + * accessory's connection lookup raised the host's message the same way. + * + * Skip: the native-chat readability probe answers "not readable" and lets the screen render, and + * the new-workspace dialog's repo refresh leaves the list it already has. */ export const newTabRepoListRead = bindDeferredRpcOperation( defineRpcOperation({ diff --git a/mobile/src/session/mobile-session-route-parity.test.ts b/mobile/src/session/mobile-session-route-parity.test.ts index 3e73969effc..b1973782b7c 100644 --- a/mobile/src/session/mobile-session-route-parity.test.ts +++ b/mobile/src/session/mobile-session-route-parity.test.ts @@ -66,15 +66,15 @@ const HEAD_MAIN_HOOK_SHA256 = 'c7a1bbc0588a5d27797bbab13168e76eb20200288921fdc33 const HEAD_HOOK_BINDING_SHA256 = '06edf1a4314eba41b1d3e1cb67b0cfab2a936aef7d127c5dc48e789c9adc6c8f' const HEAD_CALLBACK_IDENTITY_SHA256 = '2a9e4825df007f6ef53b81aa5004991d6318eee7507b44d625c07e630be432eb' -// Body text, not behaviour: refreshed when the session hooks' refusal try/catch blocks became -// `interpretOrThrowRefusalMessage` calls. One of them lives in a callback. -const HEAD_CALLBACK_BODY_SHA256 = '309666c03fdfaa4b48fe6e32d86e885e0c92c42954bc2917ac605ef1e50061de' +// Pins that no callback body in the route changed unnoticed. Body text, not behaviour: the sends +// and repo reads inside them now name their `RpcOperation` instead of the raw `sendRequest` port. +const HEAD_CALLBACK_BODY_SHA256 = 'bacd826b9fc4f16ddd052382787dad76cac1b962f7fdf6deb8c767e9fc8f09db' const HEAD_EFFECT_SHA256 = '73d80845e0a4b6363cfb4bb55551af97965b1f676b97adf0b2a8504219b9a501' const HEAD_CONTENT_HOOK_SHA256 = '9c3b612fef3f370d66873aefdbe1d701f20cb64ded31fef5cc45fde6f8189581' -// Same refresh as the callback-body hash above, for the three of those blocks that sit in -// nested functions rather than callbacks. Count still 12. +// Same pin for the 12 bodies that sit in nested functions rather than callbacks, moved by the same +// rewrite of those send and read expressions. Count unchanged. const HEAD_NESTED_FUNCTION_SHA256 = - '74772a16be98781d85d12caa7771b373a908e3da00651412a1e15647ec67398c' + '258930d2955a3689f2ae2a25392a75fd294513ad141bc6fbf5b7d9bafccf374e' const HEAD_NATIVE_REGISTRATION_SHA256 = 'cab85e4e4a3f43289ba93ddea9ccce57aea83e0bf14fd1620a965aad0c1cb49e' const HEAD_NATIVE_REMOVAL_SHA256 = @@ -83,7 +83,7 @@ const HEAD_TIMER_CREATION_SHA256 = '1a31b625e2174c3db77272249843196d2b6b06ab1e654a96d8f7858e3082e66b' const HEAD_TIMER_CLEANUP_SHA256 = 'c73f1d1c2cc89642f3d727d6f3b6b81860a9d6f34234541a2065ec3d1a8cd116' const HEAD_RUNTIME_STRING_SHA256 = - '3d4c680adb34c5871530fa4bd7ecd2f800048b8b00f98ef503693d9c44cf6464' + '0c713141a9e8b75d1435ffa6cc5f446b72e3316b5b553a4f3bb8f767831173b8' const HEAD_HOST_JSX_SHA256 = '390405926b1695fa3a33686f0bc192b432f5468d8576499d7cafbb4922defbb5' const HEAD_LEAF_JSX_SHA256 = '21dba981875e173f692590bf910d60964660c5f4cbb79f3a377c7e54f6a1f016' const HEAD_STYLE_REFERENCE_SHA256 = @@ -521,7 +521,7 @@ describe('mobile session route extraction parity', () => { it('preserves runtime strings, styles, and the expanded JSX tree', () => { const strings = readRuntimeStrings() - expect(strings).toHaveLength(540) + expect(strings).toHaveLength(537) expect(hash(strings)).toBe(HEAD_RUNTIME_STRING_SHA256) const jsx = readJsxFacts(readDefinitions()) expect(jsx.host).toHaveLength(124) diff --git a/mobile/src/session/mobile-session-route-types.ts b/mobile/src/session/mobile-session-route-types.ts index 03ddcb1a124..944337fd028 100644 --- a/mobile/src/session/mobile-session-route-types.ts +++ b/mobile/src/session/mobile-session-route-types.ts @@ -144,11 +144,6 @@ export type TerminalCreateResult = { export type MobileNewTabAgentLoadState = 'idle' | 'loading' | 'loaded' | 'error' -export type RuntimeRepoSummary = { - id: string - connectionId?: string | null -} - export type MobileDisplayMode = 'auto' | 'phone' | 'desktop' export type TerminalGestureInputBucket = { diff --git a/mobile/src/session/use-mobile-session-accessory-selection.ts b/mobile/src/session/use-mobile-session-accessory-selection.ts index ad0116cb9c6..fdcd7885f79 100644 --- a/mobile/src/session/use-mobile-session-accessory-selection.ts +++ b/mobile/src/session/use-mobile-session-accessory-selection.ts @@ -1,7 +1,7 @@ import { useRef, useCallback } from 'react' import { Keyboard, Platform, type View } from 'react-native' import * as Clipboard from 'expo-clipboard' -import type { RpcFailure, RpcSuccess } from '../transport/types' +import { newTabRepoListRead, type MobileRuntimeRepoSummary } from './mobile-session-read-operations' import { triggerSelection, triggerSuccess, @@ -17,7 +17,6 @@ import { clearTerminalLiveInputFocusTimer } from '../terminal/terminal-live-inpu import { stripTerminalSelectionGutter } from '../../../src/shared/terminal-selection-gutter' import { useTerminalCopyTrimsGutter } from '../terminal/terminal-copy-gutter-preference' import { getRepoIdFromMobileWorktreeId } from './mobile-session-route-helpers' -import type { RuntimeRepoSummary } from './mobile-session-route-types' import type { MobileSessionTerminalInputModel } from './use-mobile-session-terminal-input' export function useMobileSessionAccessorySelection(scope: MobileSessionTerminalInputModel) { @@ -197,12 +196,9 @@ export function useMobileSessionAccessorySelection(scope: MobileSessionTerminalI return null } const repoId = getRepoIdFromMobileWorktreeId(worktreeId) - const repoResponse = await client.sendRequest('repo.list') - if (!repoResponse.ok) { - throw new Error((repoResponse as RpcFailure).error.message) - } - const repos = - ((repoResponse as RpcSuccess).result as { repos?: RuntimeRepoSummary[] }).repos ?? [] + const repoResponse = await newTabRepoListRead.request(client) + // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: Preserve the established response shape at this boundary. + const repos = (newTabRepoListRead.interpret(repoResponse) as MobileRuntimeRepoSummary[]) ?? [] return repos.find((repo) => repo.id === repoId)?.connectionId?.trim() || null }, [client, isFloatingWorkspaceRoute, worktreeId]) diff --git a/mobile/src/session/use-mobile-session-terminal-send-actions.ts b/mobile/src/session/use-mobile-session-terminal-send-actions.ts index aa365d5ba39..f589aed6ed7 100644 --- a/mobile/src/session/use-mobile-session-terminal-send-actions.ts +++ b/mobile/src/session/use-mobile-session-terminal-send-actions.ts @@ -9,7 +9,7 @@ import { isTerminalLiveInputWithinByteLimit } from '../terminal/terminal-live-input' import { dismissTerminalKeyboard } from '../terminal/terminal-keyboard-dismiss' -import { isTerminalSendRpcAccepted } from '../terminal/terminal-send-rpc-response' +import { terminalInputSend } from '../terminal/mobile-terminal-operations' import { buildTerminalSendParams, TERMINAL_INPUT_SEND_OPTIONS @@ -88,8 +88,8 @@ export function useMobileSessionTerminalSendActions(scope: MobileSessionTerminal try { // Why: fail now and restore the text — a send parked across a reconnect would execute long after the tap. - const response = await client.sendRequest( - 'terminal.send', + const response = await terminalInputSend.request( + client, buildTerminalSendParams({ terminal: activeHandle, text, @@ -98,7 +98,7 @@ export function useMobileSessionTerminalSendActions(scope: MobileSessionTerminal }), TERMINAL_INPUT_SEND_OPTIONS ) - const accepted = isTerminalSendRpcAccepted(response) + const accepted = terminalInputSend.interpret(response) === true if (accepted) { reportWorkerTerminalUserInput(client, activeHandle) } @@ -159,9 +159,9 @@ export function useMobileSessionTerminalSendActions(scope: MobileSessionTerminal } // Why: live-mirror deltas queued behind a dying send drain into the connect // wait and replay stale bytes after reconnect (#6713's `YZZYecho …` corruption). - return rpc - .sendRequest( - 'terminal.send', + return terminalInputSend + .request( + rpc, buildTerminalSendParams({ terminal: handle, text, @@ -172,7 +172,7 @@ export function useMobileSessionTerminalSendActions(scope: MobileSessionTerminal ) .then( (response) => { - const accepted = isTerminalSendRpcAccepted(response) + const accepted = terminalInputSend.interpret(response) === true if (accepted) { reportWorkerTerminalUserInput(rpc, handle) } diff --git a/mobile/src/session/use-mobile-terminal-paste.ts b/mobile/src/session/use-mobile-terminal-paste.ts index 3680fa2e505..ffb006bd9d0 100644 --- a/mobile/src/session/use-mobile-terminal-paste.ts +++ b/mobile/src/session/use-mobile-terminal-paste.ts @@ -1,6 +1,6 @@ import { reportWorkerTerminalUserInput } from '../terminal/worker-terminal-takeover-report' import { useCallback, type RefObject } from 'react' -import { isTerminalSendRpcAccepted } from '../terminal/terminal-send-rpc-response' +import { terminalInputSend } from '../terminal/mobile-terminal-operations' import * as Clipboard from 'expo-clipboard' import { File as FsFile, Paths } from 'expo-file-system' import { ImageManipulator, SaveFormat } from 'expo-image-manipulator' @@ -157,7 +157,7 @@ export function useMobileTerminalPaste({ ) { return } - const response = await currentClient.sendRequest('terminal.send', { + const response = await terminalInputSend.request(currentClient, { terminal: targetHandle, text: payload, enter: false, @@ -165,7 +165,7 @@ export function useMobileTerminalPaste({ ? { client: { id: deviceTokenRef.current, type: 'mobile' as const } } : {}) }) - if (isTerminalSendRpcAccepted(response)) { + if (terminalInputSend.interpret(response) === true) { reportWorkerTerminalUserInput(currentClient, targetHandle) } onSuccess() diff --git a/mobile/src/terminal/mobile-terminal-operations.ts b/mobile/src/terminal/mobile-terminal-operations.ts index 2d6d4a6b879..3650ae6cb94 100644 --- a/mobile/src/terminal/mobile-terminal-operations.ts +++ b/mobile/src/terminal/mobile-terminal-operations.ts @@ -20,8 +20,12 @@ const terminalSendAcceptanceReader: RpcCompatibleReader< > = (raw) => rpcReadUnchecked('terminal-send-accepted', isTerminalSendResultAccepted(raw)) /** - * Two call sites send terminal input this way — the query-reply responder and the live accessory's - * raw send — and they agree on acceptance, differing only in the params they build. + * Five call sites send terminal input this way and all agree on acceptance, differing only in the + * params they build: the query-reply responder (`mobile-terminal-query-reply.ts`), the live + * accessory's raw send (`terminal-live-accessory-raw-send.ts`), and — in the session screen — the + * composed draft send and the live keystroke send (`use-mobile-session-terminal-send-actions.ts`) + * plus the clipboard paste (`use-mobile-terminal-paste.ts`). Narrowing `object-result-or-null` here + * changes what a lost ack means for all five. */ export const terminalInputSend = bindDeferredRpcOperation( defineRpcOperation({ diff --git a/mobile/src/test-support/rpc-recording/adapters/mounted-operation-modules.ts b/mobile/src/test-support/rpc-recording/adapters/mounted-operation-modules.ts index 5fdcd0e197e..dfac0af8776 100644 --- a/mobile/src/test-support/rpc-recording/adapters/mounted-operation-modules.ts +++ b/mobile/src/test-support/rpc-recording/adapters/mounted-operation-modules.ts @@ -35,6 +35,7 @@ import { sessionNotesMountAdapters } from './session-notes-mount-adapters' import { sessionScreenReadMountAdapters } from './session-screen-read-mount-adapters' import { sessionScreenTabMountAdapters } from './session-screen-tab-mount-adapters' import { sessionTabMountAdapters } from './session-tab-mount-adapters' +import { sessionTerminalInputMountAdapters } from './session-terminal-input-mount-adapters' import { settingsMountAdapters, settingsMountExposures } from './settings-mount-adapters' import { sourceControlMountAdapters } from './source-control-mount-adapters' import { structuredAgentLaunchMountAdapters } from './structured-agent-launch-mount-adapters' @@ -113,6 +114,10 @@ export const MOUNTED_OPERATION_MODULES: readonly MountedOperationModule[] = [ }, { source: 'session-screen-tab-mount-adapters.ts', mounts: sessionScreenTabMountAdapters }, { source: 'session-tab-mount-adapters.ts', mounts: sessionTabMountAdapters }, + { + source: 'session-terminal-input-mount-adapters.ts', + mounts: sessionTerminalInputMountAdapters + }, { source: 'settings-mount-adapters.ts', mounts: settingsMountAdapters, diff --git a/mobile/src/test-support/rpc-recording/adapters/session-terminal-input-mount-adapters.ts b/mobile/src/test-support/rpc-recording/adapters/session-terminal-input-mount-adapters.ts new file mode 100644 index 00000000000..4d3bcd26a2f --- /dev/null +++ b/mobile/src/test-support/rpc-recording/adapters/session-terminal-input-mount-adapters.ts @@ -0,0 +1,246 @@ +import { hookScreenMount } from '../mounted-screen-tree' +import { mountFixture } from '../recorder-fixture-shape' +import type { operationModuleLoader } from '../operation-module-loader' +import type { MountAdapter, MountContext } from '../recording-scenario' +import type { TerminalModes } from '../../../terminal/terminal-webview-contract' + +const HANDLE = 'terminal-1' +const DEVICE_TOKEN = 'device-token-1' +const WORKTREE = 'repo-a::/tmp/repo-a' +/** Bracketed paste is on and the alt screen is off, which is what wraps a pasted payload. */ +const PTY_MODES: TerminalModes = { + bracketedPasteMode: true, + altScreen: false, + mouseTrackingMode: 'none', + sgrMouseMode: false, + sgrMousePixelsMode: false +} + +/** + * What the session screen's terminal input surface puts on the wire: the composed draft send, the + * live keystroke send, the clipboard paste that rides on the same method, and the repo read that + * resolves which connection a workspace's terminal lives on. + * + * The device state these hooks read is real rather than declared. The pasteboard is the engine's + * per-recording fixture, so the bytes a paste reads are the bytes a recorded copy put there one + * action earlier — the same sequence a phone performs. The draft store is the product's own + * `useBufferedTerminalDrafts`, mounted in the same tree, so the text a send clears and a refusal + * restores is state the recording drove rather than a stand-in. + * + * Only the clipboard's text path is driven. Its image path decodes a raster through + * expo-image-manipulator and stages it on expo-file-system, and neither module is substituted: + * recording it would mean inventing image and file-system behaviour, which is not what this oracle + * is evidence of. The send both paths reach is the same expression, and the text path reaches it. + * + * Mounted through `hookScreenMount` for its crash boundary: a reply partition that takes a hook's + * effect down is the recording, not a suite failure. + */ +export function sessionTerminalInputMountAdapters( + modules: ReturnType +): Record { + return { + 'session.terminal-clipboard': (context) => mountTerminalClipboard(modules, context), + 'session.terminal-input-send': (context) => mountTerminalInputSend(modules, context) + } +} + +function mountTerminalClipboard( + modules: ReturnType, + { client, effect }: MountContext +) { + const useAccessorySelection = modules.load< + typeof import('../../../session/use-mobile-session-accessory-selection') + >( + 'mobile/src/session/use-mobile-session-accessory-selection.ts' + ).useMobileSessionAccessorySelection + const useTerminalPaste = modules.load< + typeof import('../../../session/use-mobile-terminal-paste') + >('mobile/src/session/use-mobile-terminal-paste.ts').useMobileTerminalPaste + const takeover = modules.load( + 'mobile/src/terminal/worker-terminal-takeover-report.ts' + ) + // The per-client report window is module state; a fresh recording must not inherit one. + takeover.resetWorkerTerminalTakeoverReportsForTest() + + const ptyModesRef = { current: new Map([[HANDLE, PTY_MODES]]) } + let selection: ReturnType | undefined + let paste: ReturnType | undefined + let connectionId: unknown = 'unresolved' + let pasteOutcome: unknown = 'unpasted' + + const screen = hookScreenMount(() => { + const model = useAccessorySelection( + mountFixture[0]>({ + client, + connState: 'connected', + worktreeId: WORKTREE, + isFloatingWorkspaceRoute: false, + activeHandleRef: { current: HANDLE }, + terminalRefs: { current: new Map() }, + ptyModesRef, + setCanPaste: (value) => effect('can-paste', { value }), + setSelectModeActive: (value) => effect('select-mode', { value }), + showToast: (message: string, durationMs?: number) => + effect('toast', { message, durationMs: durationMs ?? null }) + }) + ) + selection = model + paste = useTerminalPaste( + mountFixture[0]>({ + activeHandle: HANDLE, + activeHandleRef: { current: HANDLE }, + activeSessionTabTypeRef: { current: 'terminal' }, + canSend: true, + client, + clientRef: { current: client }, + connState: 'connected', + connStateRef: { current: 'connected' }, + deviceTokenRef: { current: DEVICE_TOKEN }, + flushPendingLiveInputBeforeExternalSend: (handle: string) => { + effect('flush-live-input', { handle }) + return Promise.resolve(true) + }, + getActiveWorktreeConnectionId: () => model.getActiveWorktreeConnectionId(), + onError: () => { + pasteOutcome = 'error' + }, + onSuccess: () => { + pasteOutcome = 'sent' + }, + ptyModesRef, + refreshCanPaste: () => effect('refresh-can-paste', {}), + showToast: (message: string, durationMs?: number) => + effect('toast', { message, durationMs: durationMs ?? null }) + }) + ) + }, effect) + + return { + action(name: string, args: Record) { + if (name === 'mount') { + return screen.mount() + } + if (name === 'copy') { + return selection!.handleSelectionCopy(HANDLE, String(args.text ?? 'echo hi')) + } + if (name === 'paste') { + return paste!() + } + if (name === 'connection') { + return selection!.getActiveWorktreeConnectionId().then( + (value: unknown) => { + connectionId = value + return value + }, + (error: unknown) => { + connectionId = error instanceof Error ? error.message : String(error) + throw error + } + ) + } + throw new Error(`Unknown terminal clipboard action: ${name}`) + }, + state: () => ({ connectionId, pasteOutcome, crash: screen.crash() }), + dispose: () => { + takeover.resetWorkerTerminalTakeoverReportsForTest() + screen.unmount() + } + } +} + +function mountTerminalInputSend( + modules: ReturnType, + { client, effect }: MountContext +) { + const useSendActions = modules.load< + typeof import('../../../session/use-mobile-session-terminal-send-actions') + >( + 'mobile/src/session/use-mobile-session-terminal-send-actions.ts' + ).useMobileSessionTerminalSendActions + const useDrafts = modules.load( + 'mobile/src/terminal/use-buffered-terminal-drafts.ts' + ).useBufferedTerminalDrafts + const takeover = modules.load( + 'mobile/src/terminal/worker-terminal-takeover-report.ts' + ) + takeover.resetWorkerTerminalTakeoverReportsForTest() + + const activeHandleRef = { current: HANDLE } + const sendingRef = { current: false } + // An agent tab, so an accepted send hands the turn over and the keyboard drop is observable. + const activeSessionTab = { + type: 'terminal' as const, + id: 'tab-1', + title: 'claude', + terminal: HANDLE, + launchAgent: 'claude' as const, + isActive: true + } + let drafts: ReturnType | undefined + let actions: ReturnType | undefined + let liveAccepted: unknown = 'unsent' + + const screen = hookScreenMount(() => { + const draftState = useDrafts({ activeHandle: HANDLE, activeHandleRef }) + drafts = draftState + actions = useSendActions( + mountFixture[0]>({ + client, + activeHandle: HANDLE, + activeSessionTab, + canSend: true, + keyboardHeight: 0, + deviceTokenRef: { current: DEVICE_TOKEN }, + clientRef: { current: client }, + connStateRef: { current: 'connected' }, + liveInputRef: { current: null }, + commandInputRef: { current: null }, + liveInputFocusTimerRef: { current: null }, + sendLiveTerminalInputRef: { current: null }, + sessionTabActionSheetKeyboardHideSubRef: { current: null }, + sessionTabActionSheetRequestSeqRef: { current: 0 }, + activeHandleRef, + activeSessionTabTypeRef: { current: 'terminal' }, + sendingRef, + bufferedTerminalDraftState: draftState, + getSendCompletionGeneration: () => 0, + showToast: (message: string, durationMs?: number) => + effect('toast', { message, durationMs: durationMs ?? null }) + }) + ) + }, effect) + + return { + action(name: string, args: Record) { + if (name === 'mount') { + return screen.mount() + } + if (name === 'type') { + drafts!.setInput(String(args.text ?? 'ls -la')) + return screen.update() + } + if (name === 'send') { + return actions!.handleSend() + } + if (name === 'live') { + return actions! + .sendLiveTerminalInput(HANDLE, String(args.bytes ?? 'ls')) + .then((value: unknown) => { + liveAccepted = value + return value + }) + } + throw new Error(`Unknown terminal input send action: ${name}`) + }, + state: () => ({ + input: drafts?.input ?? null, + sending: sendingRef.current, + liveAccepted, + crash: screen.crash() + }), + dispose: () => { + takeover.resetWorkerTerminalTakeoverReportsForTest() + screen.unmount() + } + } +} diff --git a/mobile/src/test-support/rpc-recording/mutants/operation-mutations.ts b/mobile/src/test-support/rpc-recording/mutants/operation-mutations.ts index 1752e5bc2dd..c97eff98c36 100644 --- a/mobile/src/test-support/rpc-recording/mutants/operation-mutations.ts +++ b/mobile/src/test-support/rpc-recording/mutants/operation-mutations.ts @@ -136,6 +136,25 @@ export const OPERATION_MUTATIONS = { }`, after: ' setRuntimeSettings(settingsValue)' }, + // Keeps the composed draft cleared after a send the runtime refused, so the text the user typed + // is gone and only a retype recovers it. Anchored on the branch that reads the send verdict, not + // on the send, so the step-4 migration of this file does not move it. + 'terminal-send-refusal-restores-draft': { + file: 'use-mobile-session-terminal-send-actions.ts', + before: ` if (!accepted) { + restoreRejectedDraft() + }`, + after: ` if (accepted) { + restoreRejectedDraft() + }` + }, + // Resolves the connection of whichever repo the host listed first instead of the workspace's own, + // so a terminal opens against a different machine than the one the workspace lives on. + 'worktree-connection-first-repo': { + file: 'use-mobile-session-accessory-selection.ts', + before: 'return repos.find((repo) => repo.id === repoId)?.connectionId?.trim() || null', + after: 'return repos[0]?.connectionId?.trim() || null' + }, // Publishes the settings envelope as the refreshed task runtime settings. 'task-workspace-envelope': { file: 'use-mobile-tasks-workspace-create-actions.tsx', diff --git a/mobile/src/test-support/rpc-recording/mutants/pilot-mutants.test.ts b/mobile/src/test-support/rpc-recording/mutants/pilot-mutants.test.ts index b6de872588c..158f15e2be8 100644 --- a/mobile/src/test-support/rpc-recording/mutants/pilot-mutants.test.ts +++ b/mobile/src/test-support/rpc-recording/mutants/pilot-mutants.test.ts @@ -29,7 +29,9 @@ const mutants: Record = { 'settings-task-write': 'task-preferences-optimistic', 'settings-workspace-submit-fulfilled': 'workspace-submit-envelope', 'settings-task-workspace-fulfilled': 'task-workspace-envelope', - 'native-chat-write-delivery-unknown': 'native-chat-send-delivery-unknown' + 'native-chat-write-delivery-unknown': 'native-chat-send-delivery-unknown', + 'terminal-input-send-refused': 'terminal-send-refusal-restores-draft', + 'terminal-worktree-connection-resolved': 'worktree-connection-first-repo' } /** * The archived tree's visible state, pinned per seed: b1 serves the poisoned empty inventory, b2 diff --git a/mobile/src/transport/unvalidated-rpc-request-port-inventory.ts b/mobile/src/transport/unvalidated-rpc-request-port-inventory.ts index 4cf1301d1ac..236dde30676 100644 --- a/mobile/src/transport/unvalidated-rpc-request-port-inventory.ts +++ b/mobile/src/transport/unvalidated-rpc-request-port-inventory.ts @@ -63,16 +63,13 @@ export const UNVALIDATED_RPC_REQUEST_PORT_PENDING: readonly UnvalidatedRpcReques // recording can mount without a fabricated react-native view tree. { file: 'src/agent-history/MobileAgentSessionHistoryPanel.tsx', references: 1 }, - // src/components/ — shared widgets that fetch their own data. The New Workspace drawer's - // execution target, setup hook, runtime context and Codex capability probe migrated in step 4: - // see new-workspace-operations.ts, codex-reset-credit-capability-operations.ts, and the SSH and - // agent-detection operations in tasks/mobile-workspace-source-operations.ts. Two remain, neither - // recordable. codex-reset-credit.ts loads under the module loader; its attempt-journal access - // throws on async-storage at call time, before the send, and nothing guards it away. The repo - // list fails one module further out: it renders use-last-visited-worktree-repo.ts, whose default - // import of async-storage is a property read the loader's proxy refuses. - { file: 'src/components/codex-reset-credit.ts', references: 3 }, - { file: 'src/components/use-new-workspace-repositories.ts', references: 1 }, + // src/components/ — shared widgets that fetch their own data. Nothing is left here: the New + // Workspace drawer's execution target, setup hook, runtime context and Codex capability probe + // migrated in step 4, and the last two followed once a scenario could declare the device store + // both of them read. See new-workspace-operations.ts, + // codex-reset-credit-{capability,consume}-operations.ts, the SSH and agent-detection operations + // in tasks/mobile-workspace-source-operations.ts, and the repo.list readers the dialog now shares + // in session/mobile-session-read-operations.ts. // src/files/ — file read, write and preview. The preview loader, the terminal-artifact grant // refresh and save, the session file tab and the mutation-ownership capture migrated in step 4: @@ -94,18 +91,21 @@ export const UNVALIDATED_RPC_REQUEST_PORT_PENDING: readonly UnvalidatedRpcReques { file: 'src/host-screen/host-screen-overlays.tsx', references: 1 }, // src/notifications/ — push registration and delivery. Registration and unregistration migrated - // in step 4; see mobile-push-registration-operations.ts. + // in step 4; see mobile-push-registration-operations.ts. Tray reconciliation followed once a + // scenario could declare the notification tray and the stored host list it resolves against; + // see push-dismissal-operations.ts. // Holdout: the unsubscribe is a closure inside a `subscribe` callback, and subscriptions are a // later step; the request-only recording runner refuses to open one. { file: 'src/notifications/mobile-notifications.ts', references: 1 }, - // Holdout: the send is gated behind the OS notification tray and the keychain host catalog, and - // faking either would record a fiction of device state rather than of the wire. - { file: 'src/notifications/push-dismissal-reconciliation.ts', references: 2 }, // src/session/ — session screen: chat, diff review, PR actions, tabs. The github.* PR surface, // the diff-review loaders and the rest of the screen migrated in step 4; see // mobile-session-{read,write,launch}-operations.ts, mobile-clipboard-image-operations.ts and - // mobile-diff-review-git-operations.ts. + // mobile-diff-review-git-operations.ts. The terminal input surface followed: the composed send, + // the live keystroke send and the clipboard paste all send through terminal.input-send in + // terminal/mobile-terminal-operations.ts, and the accessory's connection lookup reads the repo + // list through the new-tab operation. Every holdout below opens or rides a subscription or takes its + // method as a parameter, except the gesture-input file, which this PR simply did not cover. // Holdout: the method is a parameter. `callAgentSession` takes a method string and a generic // result type, and five call sites across two hooks pass their own, plus one inside this module's // own mutation wrapper; an operation fixes the method at definition time, so migrating it is a @@ -119,27 +119,20 @@ export const UNVALIDATED_RPC_REQUEST_PORT_PENDING: readonly UnvalidatedRpcReques // paging callback, not in an effect, but only the mount effect's `nativeChat.subscribe` arms the // offset and generation it pages against — and the request-only runner refuses to open one. { file: 'src/session/use-mobile-native-chat-session.ts', references: 1 }, - // Holdout: unrecorded site, record-first rule. The hook reads the pasteboard and the PTY mode - // registry before the send, so a recording would pin device state rather than the wire. - { file: 'src/session/use-mobile-session-accessory-selection.ts', references: 1 }, // Holdout: unrecorded site, record-first rule. The startup effect drives 36 members of the // session model including the terminal subscription lifecycle, which is a later step. { file: 'src/session/use-mobile-session-startup.ts', references: 2 }, // Holdout: unrecorded site, record-first rule. The create path subscribes to the terminal it // makes, and the request-only runner refuses the subscription. { file: 'src/session/use-mobile-session-terminal-create-actions.ts', references: 2 }, - // Holdout: unrecorded site, record-first rule. Gesture input is queued against a live PTY mode - // and a webview handle; neither exists in the runner. + // Holdout: scope only, no recorder gap. The gesture flush reads refs (client, connection state, + // PTY modes, the gesture buckets, active handle and tab type), and the clear-buffer ref optional- + // chains the webview, so a mount with a null terminal ref records both sends. These 2 refs are + // migratable as they stand; they were out of this PR's bucket. { file: 'src/session/use-mobile-session-terminal-input.ts', references: 2 }, - // Holdout: unrecorded site, record-first rule. The send reads the buffered draft store and the - // keyboard, both native state a recording would have to invent. - { file: 'src/session/use-mobile-session-terminal-send-actions.ts', references: 2 }, // Holdout: unrecorded site, record-first rule. The display-mode write is gated on an open // terminal subscription, which is a later step. { file: 'src/session/use-mobile-session-terminal-stream-display.ts', references: 1 }, - // Holdout: unrecorded site, record-first rule. The paste reads a clipboard image through - // expo-image-manipulator and expo-file-system before any send. - { file: 'src/session/use-mobile-terminal-paste.ts', references: 1 }, // src/settings/ — notification display probe { file: 'src/settings/notification-display-test.tsx', references: 1 },