SDT/docs/gui-bridge-contract.md
stan44 2c5493f249
Some checks failed
reliability-matrix / ubuntu-latest / .NET tests (push) Failing after 2m46s
reliability-matrix / macos-latest / .NET tests (push) Has been cancelled
reliability-matrix / windows-latest / .NET tests (push) Has been cancelled
second first push?
2026-03-01 21:40:14 -06:00

1.2 KiB

GUI Bridge Contract (sdt bridge --stdio)

The GUI uses a hybrid bridge:

  • execution: sdt run/debug --json (streamed)
  • read/manage: sdt bridge --stdio JSON-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.get
  • workspace.add (candidatePath, initializeConfig)
  • favorites.list
  • favorites.toggle (favoriteProjectPath, workflowId, label)
  • history.list (limit)
  • events.listFiles
  • events.readFile (filePath)
  • envProfiles.list
  • envProfiles.resolve (envProfile)
  • doctor.run
  • setup.plan (read-only preview)

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.