MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / ProviderPlugin

Interface ProviderPlugin

crates/openshell-providers/src/lib.rs:59–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59pub trait ProviderPlugin: Send + Sync {
60 /// Canonical provider id (for example: "claude", "gitlab").
61 fn id(&self) -> &'static str;
62
63 /// Discover provider credentials and config from the local machine.
64 fn discover_existing(&self) -> Result<Option<DiscoveredProvider>, ProviderError>;
65
66 /// Return the known credential environment variable names for this provider type.
67 ///
68 /// Used by the TUI to label BYO key entry fields and to choose which
69 /// env var name to store a manually-entered credential under.
70 fn credential_env_vars(&self) -> &'static [&'static str] {
71 &[]
72 }
73
74 /// Inject provider-specific environment variables into the sandbox env.
75 ///
76 /// Called during sandbox creation to project provider config (project IDs,
77 /// regions, SDK flags) into env vars the sandbox process will inherit.
78 /// Default is a no-op; GCP and Vertex providers override this.
79 fn inject_env(&self, _provider: &Provider, _env: &mut HashMap<String, String>) {}
80}
81
82/// Blanket implementation of [`ProviderPlugin`] for [`ProviderDiscoverySpec`].
83///

Callers

nothing calls this directly

Implementers 6

lib.rscrates/openshell-providers/src/lib.rs
google_cloud.rscrates/openshell-providers/src/provide
outlook.rscrates/openshell-providers/src/provide
vertex.rscrates/openshell-providers/src/provide
opencode.rscrates/openshell-providers/src/provide
generic.rscrates/openshell-providers/src/provide

Calls

no outgoing calls

Tested by

no test coverage detected