1.6 KiB
1.6 KiB
GUI Bridge Contract (sdt bridge --stdio)
The GUI uses a hybrid bridge:
- execution:
sdt run/debug --json(streamed) - read/manage:
sdt bridge --stdioJSON-RPC over stdio
Envelope
Request (one JSON object per line):
{ "id": "req-1", "method": "workspace.get", "params": { "projectRoot": "E:\\repo" } }
Response:
{ "id": "req-1", "ok": true, "result": { "...": "..." }, "error": null }
Error response:
{
"id": "req-1",
"ok": false,
"result": null,
"error": { "code": "validation_failed", "message": "Missing required parameter 'filePath'." }
}
Methods (v1)
workspace.getworkspace.add(candidatePath,initializeConfig)favorites.listfavorites.toggle(favoriteProjectPath,workflowId,label)favorites.removeMany(items[]withprojectPath,workflowId)history.list(limit)events.listFilesevents.readFile(filePath)envProfiles.listenvProfiles.resolve(envProfile)envProfiles.setActive(profileId)envProfiles.saveProfile(profileobject withid,description,inherits[],values{})envVars.listenvVars.save(env[]array of env var definitions)doctor.runsetup.plan(read-only preview)setup.autofixDirs(apply missing directory fixes)setup.migrateLegacy(apply targets->workflows migration)setup.applyRecommendedConfig(apply recommended config updates with backup)
Determinism Notes
- Responses are always single-envelope JSON.
- Unknown methods return
method_not_found. - Parameter issues return
validation_failed. - GUI should tolerate additive fields in
result.