From 40ed59e06847cbfc5db48f4120558c270f421064 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Fri, 24 Nov 2023 10:55:50 +0100 Subject: [PATCH] README.md --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e94ba07 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# syndicate-pty-driver + +[protocol]: protocols/schemas/pty.prs + +A PTY (pseudoterminal) driver for [Syndicate](https://syndicate-lang.org), plus [protocol +schema][protocol] for PTY interaction via Syndicate. + +Expects to be started from +[syndicate-server](https://git.syndicate-lang.org/syndicate-lang/syndicate-rs/), perhaps via +configuration like this: + +```preserves +> + +``` + +It publishes a service object which then speaks the [PTY protocol][protocol]. You can start a +program running in a fresh PTY like this: + +```preserves +# As soon as the PTY driver publishes its service object, $cap, ... +? ?cap> [ + # ... assert interest in existence of a session with id 1 running `bash -i`. + $cap += +] +``` + +Then, expect `` messages and send `` messages to interact with +the subprocess. + +See the [protocol definition][protocol] for more about interacting with PTYs over Syndicate.