Files
paseo/packages/workspace-runtime-contract/examples/v1.json
T
Mohamed Boudra 6ca27a9b12 feat(workspaces): publish external runtime contract
Publish the rootless workspace runtime protocol, enforce module and host-execution boundaries, and prove an independently authored command runtime across lifecycle, PTY, files, Git, providers, and CI.
2026-08-11 22:14:47 +02:00

91 lines
3.7 KiB
JSON

{
"describeResponse": {
"protocolVersion": 1,
"modes": ["pipes", "pty"],
"reconcile": true
},
"lifecycleRequest": {
"protocolVersion": 1,
"input": {
"workspaceId": "workspace-01",
"project": {
"projectId": "project-01",
"source": { "kind": "host-directory", "path": "/source/project" }
},
"placement": { "kind": "existing" }
},
"options": {}
},
"lifecycleResponse": {
"protocolVersion": 1,
"type": "state",
"state": {
"workspaceId": "workspace-01",
"lifecycle": "ready"
},
"placement": { "cwd": "/workspace" }
},
"pipeSpawnControl": {
"type": "spawn",
"protocolVersion": 1,
"argv": ["/bin/sh", "-c", "printf hello"],
"cwd": "packages/app",
"env": { "PATH": "/usr/bin:/bin" },
"purpose": { "kind": "workspace-script", "script": "verify" },
"options": {},
"execId": "exec-pipe-01",
"stdio": { "kind": "pipes" }
},
"ptySpawnControl": {
"type": "spawn",
"protocolVersion": 1,
"argv": ["/bin/sh", "-c", "printf hello"],
"cwd": "packages/app",
"env": { "PATH": "/usr/bin:/bin" },
"purpose": { "kind": "workspace-script", "script": "verify" },
"options": {},
"execId": "exec-pty-01",
"stdio": { "kind": "pty", "rows": 24, "cols": 80, "term": "xterm-256color" }
},
"resizeControl": {
"type": "resize",
"protocolVersion": 1,
"id": 1,
"rows": 40,
"cols": 120
},
"signalControl": {
"type": "signal",
"protocolVersion": 1,
"signal": "SIGTERM"
},
"startedEvent": { "type": "started", "protocolVersion": 1 },
"eofEvent": { "type": "eof", "protocolVersion": 1 },
"resizedEvent": { "type": "resized", "protocolVersion": 1, "id": 1 },
"exitEvent": {
"type": "exit",
"protocolVersion": 1,
"code": 0,
"signal": null
},
"errorEvent": {
"type": "error",
"protocolVersion": 1,
"message": "runtime control failed"
},
"bytes": {
"describeResponse": "{\"protocolVersion\":1,\"modes\":[\"pipes\",\"pty\"],\"reconcile\":true}\n",
"lifecycleRequest": "{\"protocolVersion\":1,\"input\":{\"workspaceId\":\"workspace-01\",\"project\":{\"projectId\":\"project-01\",\"source\":{\"kind\":\"host-directory\",\"path\":\"/source/project\"}},\"placement\":{\"kind\":\"existing\"}},\"options\":{}}\n",
"lifecycleResponse": "{\"type\":\"state\",\"protocolVersion\":1,\"state\":{\"workspaceId\":\"workspace-01\",\"lifecycle\":\"ready\"},\"placement\":{\"cwd\":\"/workspace\"}}\n",
"pipeSpawnControl": "{\"type\":\"spawn\",\"protocolVersion\":1,\"argv\":[\"/bin/sh\",\"-c\",\"printf hello\"],\"cwd\":\"packages/app\",\"env\":{\"PATH\":\"/usr/bin:/bin\"},\"purpose\":{\"kind\":\"workspace-script\",\"script\":\"verify\"},\"options\":{},\"execId\":\"exec-pipe-01\",\"stdio\":{\"kind\":\"pipes\"}}\n",
"ptySpawnControl": "{\"type\":\"spawn\",\"protocolVersion\":1,\"argv\":[\"/bin/sh\",\"-c\",\"printf hello\"],\"cwd\":\"packages/app\",\"env\":{\"PATH\":\"/usr/bin:/bin\"},\"purpose\":{\"kind\":\"workspace-script\",\"script\":\"verify\"},\"options\":{},\"execId\":\"exec-pty-01\",\"stdio\":{\"kind\":\"pty\",\"rows\":24,\"cols\":80,\"term\":\"xterm-256color\"}}\n",
"resizeControl": "{\"type\":\"resize\",\"protocolVersion\":1,\"id\":1,\"rows\":40,\"cols\":120}\n",
"signalControl": "{\"type\":\"signal\",\"protocolVersion\":1,\"signal\":\"SIGTERM\"}\n",
"startedEvent": "{\"type\":\"started\",\"protocolVersion\":1}\n",
"eofEvent": "{\"type\":\"eof\",\"protocolVersion\":1}\n",
"resizedEvent": "{\"type\":\"resized\",\"protocolVersion\":1,\"id\":1}\n",
"exitEvent": "{\"type\":\"exit\",\"protocolVersion\":1,\"code\":0,\"signal\":null}\n",
"errorEvent": "{\"type\":\"error\",\"protocolVersion\":1,\"message\":\"runtime control failed\"}\n"
}
}