Expand description
Thin connectrpc client over the generated
polyc_proto::proto::polychrome::agent::v1::AgentServiceClient.
Both the operator CLI (polychrome send) and the reference-edge receiver dial the
external-facing AgentService with the same Connect-streaming dance: build
a connect-rust client, send one AgentRequest, drain the
AgentResponse
stream, and render each non-empty content block to user-visible text. This
crate is the single home for that logic so the two call sites can’t drift.
RPC-client concerns deliberately live here rather than in
polyc-agent (the turn-loop crate, the wrong layer for a transport
client).
For v1 the whole turn is collected into a single string and returned at
end-of-turn; incremental streaming (e.g. Slack chat.appendStream) is a
follow-up that can build on the same client.
Re-exports§
pub use edge::EdgeAdapter;pub use edge::build_attribution;
Modules§
- edge
- The edge/adapter contract.
Structs§
- Agent
Dialer - Reusable handle for dialing the polychrome control plane.
- Approval
Dialer - Reusable handle for the control plane’s
ApprovalService. - Approval
Outcome - The persisted outcome of an
ApprovalService.Respondcall. - Attribution
- Caller attribution for one turn.
- External
Identity - The external identity of a human observed at an edge (re-exported wire
type, shared with the persona store records): the per-edge
EdgeAdaptermapping produces these and the control plane resolves them to durable personas. - Gate
Message - The attributed transcript line type the participation gate consumes.
Re-exported so callers build requests without importing
polyc-proto. - Linked
Identity - One external identity linked to a persona, as the dashboard renders it (provider · display name · id).
- Payment
Receipt - A settled inbound payment receipt, re-exported so the public-edge layer can
thread it into
AgentDialer::run_turn_streaming_messages_withwithout depending onpolyc-protodirectly. - Persona
Dialer - Reusable handle for the control plane’s
PersonaService. - Persona
View - An edge-friendly read of a persona, for surfaces like the App Home dashboard. Every field is empty when the queried identity is not in the directory (a not-yet-claimed user).
- Started
Deep Link - A freshly minted deep-link token: the opaque value an edge embeds in a platform URL for a no-typing ceremony, plus its absolute expiry.
- Started
Link - A freshly minted link-ceremony challenge: the code an edge must deliver privately to the requesting user, plus its absolute expiry.
- Turn
Message - A turn-input message, re-exported so callers can build attributed
multi-party input for
AgentDialer::run_turn_streaming_messageswithout depending onpolyc-proto.
Enums§
- Dial
Error - Errors an agent dial can produce.
- Link
Ceremony - The outcome of completing a link ceremony, in edge-renderable terms.
- Turn
Event - Incremental event emitted while a turn streams from the control plane.
Functions§
- attributed_
message - Build an attributed user-role turn message rendered as
"<speaker>: text", so the model sees who said what in a multi-party thread. - framed_
conversation_ id - Collision-free variant of
hashed_conversation_idfor edges whose native parts can themselves contain':'(e.g. an emailMessage-ID, a URL, a path). - hashed_
conversation_ id - Derive a stable, fixed-length conversation id by hashing
partsinto aUUIDv5under a pinnednamespace. - namespaced_
id - Build the documented readable namespaced conversation id,
"{namespace}:{native_id}". - user_
message - Build a plain user-role turn message (no speaker attribution) — used for 1:1 DMs where there is only one human in the conversation.