Skip to content

Commit 707efba

Browse files
authored
feat(a2a-bridge): wire inbound HTTPS route, production main, and NATS transport harness (#382)
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
1 parent ed04a90 commit 707efba

8 files changed

Lines changed: 1245 additions & 2 deletions

File tree

rsworkspace/Cargo.lock

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

rsworkspace/crates/a2a-bridge/Cargo.toml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ license = "Apache-2.0"
66
description = "HTTPS ↔ NATS A2A sidecar: caller identity, error surface, and routing scaffolds"
77
publish = false
88

9+
[[bin]]
10+
name = "a2a-bridge"
11+
path = "src/main.rs"
12+
913
[lib]
1014
name = "a2a_bridge"
1115
path = "src/lib.rs"
@@ -16,15 +20,21 @@ workspace = true
1620
[dependencies]
1721
a2a-auth-callout = { workspace = true }
1822
a2a-nats = { workspace = true }
19-
async-nats = { workspace = true }
23+
async-nats = { workspace = true, features = ["jetstream"] }
2024
async-trait = { workspace = true }
25+
axum = { workspace = true }
2126
bytes = { workspace = true }
27+
futures-util = { workspace = true }
2228
reqwest = { workspace = true, features = ["json", "rustls-tls"] }
2329
serde_json = { workspace = true }
2430
thiserror = { workspace = true }
25-
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "sync"] }
31+
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "signal", "sync"] }
32+
tracing = { workspace = true }
33+
tracing-subscriber = { version = "=0.3.23", features = ["fmt", "env-filter"] }
2634

2735
[dev-dependencies]
36+
futures-util = { workspace = true }
2837
nkeys = { workspace = true }
2938
serde_json = { workspace = true }
3039
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
40+
trogon-nats = { workspace = true, features = ["test-support"] }

rsworkspace/crates/a2a-bridge/src/auth.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ use async_trait::async_trait;
77

88
use a2a_auth_callout::{BridgeMintRequest, BridgeMintResponse};
99

10+
#[cfg(test)]
11+
pub(crate) use callout_mint::harness_callout_dispatcher;
1012
pub use callout_mint::{BridgeTenantAccount, InProcessCalloutDispatcherMintWire};
1113

1214
use crate::error::BridgeError;

rsworkspace/crates/a2a-bridge/src/error.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ pub enum BridgeError {
3131
CatalogRegistration(String),
3232
#[error("invalid agent identifier: {0}")]
3333
InvalidAgent(String),
34+
#[error("failed to build HTTP response: {0}")]
35+
ResponseBuild(String),
3436
}
3537

3638
#[cfg(test)]

0 commit comments

Comments
 (0)