From 8c96817514ab9682cd068a0f571add34abc99d70 Mon Sep 17 00:00:00 2001 From: Michel Osswald Date: Tue, 14 Apr 2026 21:05:52 +0200 Subject: [PATCH] feat: add cli bootstrap contract --- kontext/agent/v1/agent.proto | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/kontext/agent/v1/agent.proto b/kontext/agent/v1/agent.proto index e71ee56..768269f 100644 --- a/kontext/agent/v1/agent.proto +++ b/kontext/agent/v1/agent.proto @@ -19,6 +19,11 @@ service AgentService { // start of `kontext start`. rpc CreateSession(CreateSessionRequest) returns (CreateSessionResponse); + // BootstrapCli prepares the shared CLI application for credential + // resolution and returns the managed preset providers the CLI should sync + // into the local env file. + rpc BootstrapCli(BootstrapCliRequest) returns (BootstrapCliResponse); + // Heartbeat keeps the session alive. The sidecar sends heartbeats on an // interval; the backend marks sessions as disconnected if heartbeats stop. rpc Heartbeat(HeartbeatRequest) returns (HeartbeatResponse); @@ -70,6 +75,23 @@ message CreateSessionResponse { string agent_id = 4; } +message BootstrapCliRequest { + string agent_id = 1; +} + +message BootstrapCliResponse { + string application_id = 1; + repeated ManagedProvider managed_providers = 2; +} + +message ManagedProvider { + string preset_key = 1; + string handle = 2; + string env_var = 3; + string placeholder = 4; + bool seed_on_first_run = 5; +} + message HeartbeatRequest { string session_id = 1; }