~ knotless Search/
↑↓ move↵ open⇧↵ all results

socialweb.computer/socialweb-computer-kcp

socialweb.computer: a compute market on atproto (kcp)

1 collaborator
0
0
40 lines · 2.3 KB Raw History
{
  "lexicon": 1,
  "id": "computer.socialweb.cicd.process.read",
  "defs": {
    "main": {
      "type": "procedure",
      "description": "socialweb-guest-agent answers a job's interleaved stdout and stderr from a byte cursor, waiting up to waitMs for more. The agent keeps the last 16 MiB of each job's output. Served only on the agent's shell unix socket (/run/socialweb-guest-agent/shell.sock, root 0600), with no auth beyond the socket; the same tool the agent's /mcp server offers as read.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["id"],
          "properties": {
            "id": { "type": "string", "description": "The job id from start." },
            "cursor": { "type": "integer", "minimum": 0, "default": 0, "description": "The byte offset to read from: 0, or the cursor of the previous answer." },
            "maxBytes": { "type": "integer", "minimum": 1, "maximum": 262144, "default": 65536, "description": "The most bytes to answer; at most 262144, 65536 when absent." },
            "waitMs": { "type": "integer", "minimum": 0, "maximum": 30000, "description": "When there is nothing new and the job runs, how long to wait for output, in milliseconds (at most 30000)." }
          }
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["output", "cursor", "done"],
          "properties": {
            "output": { "type": "string", "description": "The output from the cursor on, never ending inside a UTF-8 character." },
            "cursor": { "type": "integer", "description": "The cursor for the next read." },
            "done": { "type": "boolean", "description": "True once the job exited and the cursor reached the end of its output." },
            "exitCode": { "type": "integer", "description": "The job's exit status, once it exited." },
            "dropped": { "type": "integer", "description": "How many bytes before the kept output the cursor asked for and the agent no longer holds." }
          }
        }
      },
      "errors": [
        { "name": "InvalidRequest", "description": "405: not a POST; 413: the body is over 8 MiB; 400: the arguments are not valid or there is no job with that id." }
      ]
    }
  }
}