Skip to content

Commit 44f5d4e

Browse files
committed
feat(acp-nats-ws): add WebSocket-to-NATS bridge binary crate
- Add `acp-nats-ws` crate and `axum` server routing WebSocket connections - Implement inline zero-cost connection handler operating on raw frames - Prevent graceful shutdown race condition by using `watch` channel - Implement integration tests to verify the NATS-WS interaction Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
1 parent 9ab513a commit 44f5d4e

File tree

23 files changed

+1238
-217
lines changed

23 files changed

+1238
-217
lines changed

.github/workflows/ci-rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
working-directory: rsworkspace
4444

4545
- name: Run tests with coverage
46-
run: cargo llvm-cov --all-features --workspace --ignore-filename-regex "crates/acp-nats-stdio/" --cobertura --output-path coverage.xml
46+
run: cargo cov --cobertura --output-path coverage.xml
4747
working-directory: rsworkspace
4848

4949
- name: Coverage report and gate

rsworkspace/.cargo/config.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[alias]
2+
cov = [
3+
"llvm-cov",
4+
"--all-features",
5+
"--workspace",
6+
"--ignore-filename-regex",
7+
"crates/(acp-nats-stdio|acp-telemetry)/|crates/acp-nats-ws/src/(main|connection|upgrade)\\.rs"
8+
]

rsworkspace/Cargo.lock

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

rsworkspace/crates/acp-nats-stdio/Cargo.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,16 @@ edition = "2024"
55

66
[dependencies]
77
acp-nats = { path = "../acp-nats" }
8+
acp-telemetry = { path = "../acp-telemetry" }
89
agent-client-protocol = "0.9.4"
910
async-compat = "0.2.5"
1011
async-nats = "0.45.0"
1112
clap = { version = "4.5", features = ["derive", "env"] }
1213
opentelemetry = "0.31.0"
13-
opentelemetry-appender-tracing = "0.31.0"
14-
opentelemetry-otlp = { version = "0.31.0", features = ["http-json", "logs", "metrics", "reqwest-rustls"] }
15-
opentelemetry_sdk = { version = "0.31.0", features = ["rt-tokio", "logs", "metrics"] }
1614
trogon-std = { path = "../trogon-std" }
1715
tokio = { version = "1.49.0", features = ["rt-multi-thread", "macros", "signal", "io-std"] }
1816
tracing = "0.1.44"
19-
tracing-opentelemetry = "0.32.1"
20-
tracing-subscriber = { version = "0.3.22", features = ["env-filter", "fmt", "json"] }
2117

2218
[dev-dependencies]
19+
tracing-subscriber = { version = "0.3.22", features = ["fmt"] }
2320
trogon-std = { path = "../trogon-std", features = ["test-support"] }

0 commit comments

Comments
 (0)