Gito Control Plane Contract Candidates
Transport Policy
- Internal runtime calls use proto-socket first.
- REST remains for health/readiness, provider callbacks, smoke/curl, and simple
bootstrap endpoints.
- gRPC is excluded from the first design.
proto-socket Channels
| Channel |
Purpose |
repo |
Register, inspect, and list managed repositories. |
workspace |
Lease, release, and inspect workspace slots. |
operation |
Create, cancel, inspect, and stream operations. |
git |
Request platformless Git operations. |
change_request |
Manage provider-neutral PR/MR operations. |
agent_shell |
Shell heartbeat, command dispatch, and log streaming. |
event |
Subscribe to normalized events. |
proto-socket Action Registry Scaffold
The first proto-socket surface exposes channel/action registry metadata before
real command execution. Every listed action starts as placeholder until its
own Milestone wires storage, worker, or provider behavior.
| Channel |
Placeholder actions |
repo |
register, get, list |
workspace |
lease, release, get |
operation |
create, cancel, get, stream |
git |
clone, fetch, status, diff, commit, push |
change_request |
open, update, list |
agent_shell |
heartbeat, dispatch, stream_logs |
event |
subscribe, ack |
Core DTO Candidates
Repo
| Field |
Meaning |
id |
Stable Gito repo id. |
name |
Display name. |
remote_url |
Git remote URL. |
default_branch |
Default source-of-truth branch. |
workspace_root |
Local workspace root for slots. |
credential_ref |
Reference to credentials, never the raw secret. |
WorkspaceLease
| Field |
Meaning |
id |
Lease id. |
repo_id |
Managed repo id. |
slot |
Zero-padded slot index. |
path |
Local workspace path. |
state |
available, leased, dirty, or error. |
expires_at |
Optional lease expiry. |
Operation
| Field |
Meaning |
id |
Operation id. |
repo_id |
Target repo. |
type |
clone, fetch, commit, push, agent_run, etc. |
state |
queued, running, succeeded, failed, cancelled. |
idempotency_key |
Duplicate guard. |
created_by |
Actor id or system source. |
RevisionEvent
| Field |
Meaning |
repo_id |
Target repo. |
branch |
Branch name. |
before |
Previous revision. |
after |
New revision. |
changed_files |
Changed file paths and change types. |
observed_at |
Observation timestamp. |
ChangeRequest
Provider-neutral abstraction for GitHub PR, GitLab MR, Gitea PR, and similar
platform features.
| Field |
Meaning |
provider |
github, gitlab, gitea, etc. |
external_id |
Provider PR/MR id. |
repo_id |
Target repo. |
source_branch |
Source branch. |
target_branch |
Target branch. |
state |
open, merged, closed, draft, etc. |
Normalized Events
| Event |
Meaning |
repo.changed |
Repo registry changed. |
branch.updated |
Branch revision changed. |
workspace.leased |
Workspace lease acquired. |
workspace.released |
Workspace lease released. |
workspace.dirty |
Workspace has uncommitted changes. |
operation.started |
Operation execution started. |
operation.completed |
Operation succeeded. |
operation.failed |
Operation failed. |
agent.run.started |
Agent execution started. |
agent.run.completed |
Agent execution completed. |
change_request.opened |
PR/MR-like object opened. |
change_request.updated |
PR/MR-like object changed. |
change_request.merged |
PR/MR-like object merged. |
provider.webhook.received |
Provider webhook received. |