Expand description
JSON-over-stdio protocol types for external VCS adapter plugins.
VCS adapter plugins communicate with TA using a request/response protocol over stdin/stdout. TA spawns the plugin process, writes one JSON request line to stdin, reads one JSON response line from stdout.
§Protocol overview
Every exchange is a single JSON line in each direction:
TA → plugin: {"method":"<name>","params":{...}}
plugin → TA: {"ok":true,"result":{...}} or {"ok":false,"error":"..."}§Message methods
| Method | Direction | Description |
|---|---|---|
handshake | TA→plugin | Version negotiation; first call on every spawn |
detect | TA→plugin | Auto-detect from project root |
exclude_patterns | TA→plugin | Patterns to exclude from staging copy |
save_state | TA→plugin | Save VCS working state before apply |
restore_state | TA→plugin | Restore saved state after apply |
commit | TA→plugin | Commit staged changes |
push | TA→plugin | Push committed changes |
open_review | TA→plugin | Open a review request (PR, Swarm review, etc.) |
revision_id | TA→plugin | Get current revision identifier |
protected_targets | TA→plugin | Get §15 protected submit targets |
verify_target | TA→plugin | §15 invariant check post-prepare() |
sync_upstream | TA→plugin | Sync local workspace with upstream |
prepare | TA→plugin | Create feature branch / changelist |
check_review | TA→plugin | Check status of an open review |
merge_review | TA→plugin | Merge / submit a review |
Structs§
- Check
Review Params - Parameters for the
check_reviewmethod. - Check
Review Result - Result from the
check_reviewmethod. - Commit
Params - Parameters for the
commitmethod. - Commit
Result - Result from the
commitmethod. - Detect
Params - Parameters for the
detectmethod. - Detect
Result - Result from the
detectmethod. - Exclude
Patterns Result - Result from the
exclude_patternsmethod. - Handshake
Params - Parameters for the
handshakemethod. - Handshake
Result - Result from the
handshakemethod. - Merge
Review Params - Parameters for the
merge_reviewmethod. - Merge
Review Result - Result from the
merge_reviewmethod. - Open
Review Params - Parameters for the
open_reviewmethod. - Open
Review Result - Result from the
open_reviewmethod. - Prepare
Params - Parameters for the
preparemethod. - Protected
Targets Result - Result from the
protected_targetsmethod. - Push
Params - Parameters for the
pushmethod. - Push
Result - Result from the
pushmethod. - Restore
State Params - Parameters for the
restore_statemethod. - Revision
IdResult - Result from the
revision_idmethod. - Save
State Result - Result from the
save_statemethod. - Sync
Upstream Result - Result from the
sync_upstreammethod. - VcsPlugin
Request - Request sent from TA to a VCS plugin over stdin.
- VcsPlugin
Response - Response sent from a VCS plugin to TA over stdout.
Constants§
- PROTOCOL_
VERSION - Protocol version implemented by this TA build.