Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,16 @@ jobs:
RELAY_URL=ws://localhost:3000 \
SPROUT_BIND_ADDR=0.0.0.0:3000 \
SPROUT_REQUIRE_AUTH_TOKEN=false \
SPROUT_RECONCILE_CHANNELS=true \
./target/ci/sprout-relay > /tmp/sprout-relay.log 2>&1 &
echo $! > /tmp/sprout-relay.pid
for attempt in $(seq 1 60); do
if ! kill -0 "$(cat /tmp/sprout-relay.pid)" 2>/dev/null; then
cat /tmp/sprout-relay.log
exit 1
fi
status_code=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:3000/api/channels || true)
if [ "${status_code}" != "000" ]; then
status_code=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:3000/_readiness || true)
if [ "${status_code}" = "200" ]; then
exit 0
fi
sleep 1
Expand Down
45 changes: 4 additions & 41 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

712 changes: 712 additions & 0 deletions PLANS/HUDDLES_IMPLEMENTATION.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions crates/sprout-acp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ chrono = { workspace = true }
# URL parsing
url = { workspace = true }

# NIP-98 HTTP auth signing
sha2 = { workspace = true }
base64 = "0.22"
hex = { workspace = true }

# Logging
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
Expand Down
13 changes: 8 additions & 5 deletions crates/sprout-acp/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,9 @@ pub struct CliArgs {
#[arg(long, env = "SPROUT_PRIVATE_KEY")]
pub private_key: String,

#[arg(long, env = "SPROUT_API_TOKEN")]
pub api_token: Option<String>,
/// Agent owner pubkey (64-char hex). Used for --respond-to=owner-only gate.
#[arg(long, env = "SPROUT_ACP_AGENT_OWNER")]
pub agent_owner: Option<String>,

#[arg(long, env = "SPROUT_ACP_AGENT_COMMAND", default_value = "goose")]
pub agent_command: String,
Expand Down Expand Up @@ -380,7 +381,6 @@ pub struct ChannelFilter {
#[derive(Debug)]
pub struct Config {
pub keys: Keys,
pub api_token: Option<String>,
pub relay_url: String,
pub agent_command: String,
pub agent_args: Vec<String>,
Expand Down Expand Up @@ -418,6 +418,9 @@ pub struct Config {
pub persona_env_vars: Vec<(String, String)>,
/// Whether to publish encrypted observer frames through the relay.
pub relay_observer: bool,
/// Agent owner pubkey (hex). Used for `--respond-to=owner-only` gate.
/// Replaces the old REST-based owner lookup.
pub agent_owner: Option<String>,
}

/// Validate and deduplicate allowlist entries: each must be exactly 64 hex chars.
Expand Down Expand Up @@ -724,7 +727,6 @@ impl Config {

let config = Config {
keys,
api_token: args.api_token,
relay_url: args.relay_url,
agent_command,
agent_args,
Expand Down Expand Up @@ -754,6 +756,7 @@ impl Config {
respond_to_allowlist,
persona_env_vars,
relay_observer: args.relay_observer,
agent_owner: args.agent_owner.map(|s| s.trim().to_ascii_lowercase()),
};

Ok(config)
Expand Down Expand Up @@ -1085,7 +1088,6 @@ mod tests {
fn test_config(mode: SubscribeMode) -> Config {
Config {
keys: nostr::Keys::generate(),
api_token: None,
relay_url: "ws://localhost:3000".into(),
agent_command: "goose".into(),
agent_args: vec!["acp".into()],
Expand Down Expand Up @@ -1115,6 +1117,7 @@ mod tests {
respond_to_allowlist: HashSet::new(),
persona_env_vars: vec![],
relay_observer: false,
agent_owner: None,
}
}

Expand Down
Loading