1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! Runner-host implementations of `greentic_aw_runtime::SorxInvoker`.
//!
//! Split across three modules:
//! - [`http`] — the HTTP transport pieces: SoRX capability discovery
//! (`discover`), capability invocation (`invoke_sor`), and
//! [`http::SorxHttpInvoker`], the single-SoR `GREENTIC_AW_SORX_URL`
//! development override built on top of them.
//! - [`routed`] — [`routed::SorxRoutedInvoker`], which resolves each bound
//! SoR's own route document (`sorla_route::resolve_route`) and dispatches
//! through the same [`http::discover`]/[`http::invoke_sor`] pair.
//! - [`tests`] — shared test coverage for both.
//!
//! The aw-runtime half (`SorlaToolSource`/`SorlaToolCatalog`) depends only on
//! the `SorxInvoker` trait + JSON, so this is where `reqwest` enters.
pub
use OnceLock;
use Duration;
pub use SorxHttpInvoker;
// Re-exported so a sibling module (e.g. `sorla_pack_source`'s tests) can
// reuse these `GET /admin/v1/capabilities` fixtures instead of duplicating
// them; `http` itself stays private to this module.
pub use fixtures;
// Re-exported for `sorla_node` (a sibling of this module under `runner`,
// not a descendant of it): a single `sorla.call` HTTP dispatch needs the
// same discover-then-invoke pair `SorxRoutedInvoker` uses, without wanting
// a whole tool-catalog invoker for one call.
pub use ;
pub use SorxRoutedInvoker;
/// Caller identity stamped on every capability invocation. SP1 has no
/// per-agent caller identity to thread through `SorxInvoker::invoke` (the
/// trait carries only `(pack, action, args_json)`), so a fixed identity is
/// used; the deployed worker path can carry a real caller/tenant once the
/// trait grows a context parameter.
const SORLA_CALLER_ID: &str = "dw-agent";
/// One process-wide HTTP client for every SoRX request this module makes: a
/// 30s timeout (a hung SoR must not hang an agent step forever) and
/// redirects disabled (a SoR that redirects is a misconfiguration to surface,
/// never something to silently follow). Falls back to `reqwest::Client::new`
/// (logged) on the unlikely event the configured builder fails.
pub