Skip to content

Commit 0d4fc49

Browse files
committed
feat: port signal channel adapter from TS to Rust
Replaces src/channels/signal.ts (107 LOC) with workers/channel-signal/ (~310 LOC Rust + tests). Inbound webhook + outbound REST bridge to signal-cli-rest-api (no Node-only deps required — pure HTTP). Function IDs preserved: - channel::signal::webhook HTTP trigger: POST /webhook/signal Auth env: SIGNAL_API_URL, SIGNAL_PHONE (resolved via vault::get fallback to env var). Group routing via envelope.dataMessage.groupInfo.groupId. Outbound respects 10s send timeout (mirrors AbortController behavior from TS). Empty agent reply still returns 500 to surface upstream failures, matching TS port. Continues #41 phase 3 channel migration.
1 parent 9819777 commit 0d4fc49

7 files changed

Lines changed: 367 additions & 283 deletions

File tree

Cargo.lock

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ members = [
1010
"workers/approval-tiers",
1111
"workers/bridge",
1212
"workers/channel-email",
13+
"workers/channel-signal",
1314
"workers/channel-slack",
1415
"workers/channel-teams",
1516
"workers/channel-webex",

src/__tests__/channels-signal.test.ts

Lines changed: 0 additions & 177 deletions
This file was deleted.

src/channels/signal.ts

Lines changed: 0 additions & 106 deletions
This file was deleted.

workers/channel-signal/Cargo.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[package]
2+
name = "agentos-channel-signal"
3+
version.workspace = true
4+
edition.workspace = true
5+
license.workspace = true
6+
7+
[[bin]]
8+
name = "agentos-channel-signal"
9+
path = "src/main.rs"
10+
11+
[dependencies]
12+
iii-sdk.workspace = true
13+
tokio.workspace = true
14+
serde.workspace = true
15+
serde_json.workspace = true
16+
tracing.workspace = true
17+
tracing-subscriber.workspace = true
18+
anyhow.workspace = true
19+
reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false }
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
iii: v1
2+
name: channel-signal
3+
language: rust
4+
deploy: binary
5+
manifest: Cargo.toml
6+
bin: agentos-channel-signal
7+
description: "Signal channel adapter — REST bridge to signal-cli-rest-api"

0 commit comments

Comments
 (0)