YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix: pass user_token to pi pre-configure so pipes use screenpipe provider
Louis Beaumont71a1a5376796
diff --git a/crates/screenpipe-core/src/agents/mod.rs b/crates/screenpipe-core/src/agents/mod.rsindex 4aeb30819..21a13184e 100644--- a/crates/screenpipe-core/src/agents/mod.rs+++ b/crates/screenpipe-core/src/agents/mod.rs@@ -97,4 +97,10 @@ pub trait AgentExecutor: Send + Sync {/// Human-readable agent name, e.g. `"pi"`, `"claude-code"`.fn name(&self) -> &str;++ /// Optional cloud auth token for screenpipe provider proxy.+ /// Defaults to `None`; override in agents that support cloud auth.+ fn user_token(&self) -> Option<&str> {+ None+ }}diff --git a/crates/screenpipe-core/src/agents/pi.rs b/crates/screenpipe-core/src/agents/pi.rsindex 64eeff482..972208c52 100644--- a/crates/screenpipe-core/src/agents/pi.rs+++ b/crates/screenpipe-core/src/agents/pi.rs@@ -655,6 +655,10 @@ impl AgentExecutor for PiExecutor {fn name(&self) -> &str {"pi"}++ fn user_token(&self) -> Option<&str> {+ self.user_token.as_deref()+ }}// ---------------------------------------------------------------------------diff --git a/crates/screenpipe-core/src/pipes/mod.rs b/crates/screenpipe-core/src/pipes/mod.rsindex a96234f0a..d910ba3f4 100644--- a/crates/screenpipe-core/src/pipes/mod.rs+++ b/crates/screenpipe-core/src/pipes/mod.rs@@ -802,7 +802,7 @@ impl PipeManager {// Pre-configure piif config.agent == "pi" {if let Err(e) = PiExecutor::ensure_pi_config(- None,+ executor.user_token(),SCREENPIPE_API_URL,run_provider.as_deref(),Some(&run_model),@@ -1713,7 +1713,7 @@ impl PipeManager {// Pre-configure pi with the pipe's providerif config.agent == "pi" {if let Err(e) = PiExecutor::ensure_pi_config(- None,+ executor.user_token(),SCREENPIPE_API_URL,provider.as_deref(),Some(&model),