Simple task-actor protocol

STAP (Simple Task-Actor Protocol) is a machine-readable format for specifying user-interface changes. 
STAP enables symmetric user-interface access for AI and human users.
STAP spec and sample task-side and user-side scripts: https://vdv7.github.io/stap/
Description.
Main focus of STAP is in providing a functionally-equivalent task experience for human and computational users alike.
In its focus to make human software usable by machine agents, STAP aims to eliminate non-task-essential design choices (e.g. font type/size may be irrelevant for many task types), leaving those to be optionally specified via customizable templates (e.g. CSS).
STAP messages adhere to JSON formatting, and can be deserialized with any standard JSON library.
Deployment.
Deploying a STAP application is similar to deploying a web application, where STAP takes place of HTML as the language for UI description.
Much like HTML, STAP is a means for serializing task interface display and interactions.
Unlike HTML documents, STAP messages are incremental updates to the display.
Whereas HTML is focused on hypertext look and feel, STAP is focused on function, structure, and affordances of task display.
Benefits.
Benefits of task development with STAP:
Benefits of agent development for STAP-compliant tasks:
Sample interactions.
 -> Message sent from task software to participant software
 <- Message sent to task software from participant software
 Sample Interaction 1:
 // user software ready
 <- [0,[0]]
 // display "Hello World"
 -> ["Hello World"]
 // display a "Click Me" button
 -> "Click Me"
 // user clicks the button after 30.8s
 <- [30800,"Click Me",true]
 Sample Interaction 2:
 // user software ready
 <- [0,[0]]
 // let client know that "S" (start time) and "eT" (editable-text field) are required directives for this task
 // let client know that a goal in this task is to maximize coins earned
 // display a text prompt to get participant's name (eT:1 turns text editable)
 // participant types in "Bob" and hits enter (9.876sec after task display first loaded)
 <- [9876,"What is your name?","Bob"]
 // clear display
 -> null
 // display two buttons
 -> "choose a button",[["Button 1"],["Button 2"]]
 // first button was clicked after 12.307sec
 <- [12307,"Button 1",true]
 // give client reward, "Coins Earned"=7
 -> "Coins Earned",7
 // wait 2 seconds and remove the Coins Earned display
 // second button was clicked
 <- [15422,"Button 2",true]
 // give reward
 -> "Coins Earned",3
 Sample Interaction 3:
 // user software ready
 <- [0,[0]]
 // let client know that options "w" (width) and "h" (height), type "path", and event 40 (mouse-click) are required for this task
 // display a 100x100 box that will display red lines; "e":[40] signifies that click events should be captured (see «eventType» 40 below)
 // user clicked in location 24,60 relative to top-left corner of the box
 <- [1570,"click somewhere",[40,24,60]]
 // draw a line from middle of the box to where user clicked
 -> "click somewhere",[50,50,24,60]
 // user clicked in location 91,10 relative to top-left corner of the box
 <- [2307,"click somewhere",[40,91,10]]
 // draw a line from middle of the box to where user clicked
 -> "click somewhere",[50,50,91,10]
 // user clicked in location 31,33 relative to top-left corner of the box
 <- [2555,"click somewhere",[40,31,33]]
 // draw a line from middle of the box to where user clicked
 -> "click somewhere",[50,50,31,33]