Skip to main content

Module protocol

Module protocol 

Source
Expand description

Wire protocol: one JSON object per line over a Unix socket (docs/protocol.md). The parameters of repo.prepare_init are the daemon’s (lonca_daemon::protocol::PrepareInit): they name a policy profile, and this crate knows no policy.

Structs§

Attenuate
BlobsQuery
blobs: the contents of some files of one commit, one page. The client sizes a page from tree’s sizes to stay under the line cap.
ChangeDiff
change.diff: the unified diff of a change, computed by the daemon in the store, with redaction applied and a size cap.
ChangeRef
ChangeResolve
change.resolve: the whole id of the one change whose id starts with prefix (at least 4 letters).
ErrorBody
Events
FactsPreview
FileChange
One file in a proposed change, relative to the base commit.
HarnessSetup
harness.setup: which harness’s setup to read from the policy.
HookBind
HookEvent
A harness hook event, reduced to what Lonca uses. hook.input makes one from what a harness sent; tool names stay the harness’s own.
HookInput
What a hook received from its harness, untouched: the daemon reads it with the harness’s profile from the policy.
HookStop
hook.stop: the agent is about to finish its turn, with these changes.
HookVerdict
HumanLogin
human.login: opens a human session. The signature is over a lonca_core::ops::LoginIntent; repo on the request names the repository whose enrolment verifies it, or is left out to try every repository the daemon serves.
HumanSubmit
LeaseAcquire
LeaseInterest
LocalFile
One file a workspace differs in from its base, as it would be in a tree.
LogQuery
Logged
The outcome of a logged operation.
McpCall
mcp.call: lonca mcp is about to run one of its tools, by the name it has in tools/list.
Negotiate
PrepareChange
PrepareIsolate
human.prepare_isolate.
PreparePolicy
PrepareRemote
ProposeChange
Request
Response
Restore
repo.restore: a new repository from a backup bundle, a bare store or a remote Lonca pushed to.
SecurityEvents
security.events: what the security log holds since since_ms (default: the last day).
SessionEnd
session.end: what the workspace held, when the client knows.
SetRef
TreeFile
TreeQuery
TrunkBundle
trunk.bundle: a Git bundle of trunk for a checkout, thin against the commits the checkout already has.
TrunkDistance
trunk.distance: how far a commit that once was trunk is behind.

Constants§

MAX_LINE
Largest accepted request line (base64 file contents included).

Functions§

read_line_limited
Reads one line of at most max bytes. Ok(None) at end of stream.
write_line