Skip to main content

Module vcs_plugin_protocol

Module vcs_plugin_protocol 

Source
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

MethodDirectionDescription
handshakeTA→pluginVersion negotiation; first call on every spawn
detectTA→pluginAuto-detect from project root
exclude_patternsTA→pluginPatterns to exclude from staging copy
save_stateTA→pluginSave VCS working state before apply
restore_stateTA→pluginRestore saved state after apply
commitTA→pluginCommit staged changes
pushTA→pluginPush committed changes
open_reviewTA→pluginOpen a review request (PR, Swarm review, etc.)
revision_idTA→pluginGet current revision identifier
protected_targetsTA→pluginGet §15 protected submit targets
verify_targetTA→plugin§15 invariant check post-prepare()
sync_upstreamTA→pluginSync local workspace with upstream
prepareTA→pluginCreate feature branch / changelist
check_reviewTA→pluginCheck status of an open review
merge_reviewTA→pluginMerge / submit a review

Structs§

CheckReviewParams
Parameters for the check_review method.
CheckReviewResult
Result from the check_review method.
CommitParams
Parameters for the commit method.
CommitResult
Result from the commit method.
DetectParams
Parameters for the detect method.
DetectResult
Result from the detect method.
ExcludePatternsResult
Result from the exclude_patterns method.
HandshakeParams
Parameters for the handshake method.
HandshakeResult
Result from the handshake method.
MergeReviewParams
Parameters for the merge_review method.
MergeReviewResult
Result from the merge_review method.
OpenReviewParams
Parameters for the open_review method.
OpenReviewResult
Result from the open_review method.
PrepareParams
Parameters for the prepare method.
ProtectedTargetsResult
Result from the protected_targets method.
PushParams
Parameters for the push method.
PushResult
Result from the push method.
RestoreStateParams
Parameters for the restore_state method.
RevisionIdResult
Result from the revision_id method.
SaveStateResult
Result from the save_state method.
SyncUpstreamResult
Result from the sync_upstream method.
VcsPluginRequest
Request sent from TA to a VCS plugin over stdin.
VcsPluginResponse
Response sent from a VCS plugin to TA over stdout.

Constants§

PROTOCOL_VERSION
Protocol version implemented by this TA build.