Forge documentation
Library referenceRust

forge-provider-coding

Official coding-provider adapters for the Forge SDK

Official coding-provider adapters for the Forge SDK

Package contract

FieldValue
Languagerust
Source version0.2.0
Manifestforge-rs/crates/forge-provider-coding/Cargo.toml
Source files1
EvidenceSource reference; registry publication and runtime conformance are separate checks

Import boundary

use forge_provider_coding;

Use a source checkout or your verified private registry. Manifest coordinates identify the package; they do not establish that a public registry release exists.

Crate boundary

The following entries are taken from src/lib.rs. Feature conditions in the exact source still apply.

Source reference

Download package reference JSON. Each original source file and generated declaration artifact has its own SHA-256 digest. Function bodies and constant values are omitted from downloads. These are source declaration inventories, not compiler-resolved rustdoc, TypeDoc, DocC, or Dokka output. Private modules can contain public declarations that are not reachable through the package boundary; consult the entry point before importing.

lib.rs

Read declaration text · 21 declaration entries

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct CliCommandSpec {
pub program: String,
pub args: Vec<String>,
pub current_dir: Option<PathBuf>,
pub final_output_path: Option<PathBuf>
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct AuthorizedSessionRequest {
pub provider_ref: String,
pub required_capabilities: Vec<RuntimeCapability>,
pub prompt: String,
pub system_prompt: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub working_directory: Option<PathBuf>,
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_seconds: Option<u64>
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct AuthorizedSessionExecution {
pub session_id: String,
pub provider_ref: String,
pub events: Vec<ProviderSessionEvent>,
pub usage: ProviderUsageSummary
}

#[cfg(not(target_arch = "wasm32"))]
#[derive(Clone)]
pub struct AuthorizedSessionHandle {

}

#[cfg(not(target_arch = "wasm32"))]
pub fn session_id(&self) -> &str;

#[cfg(not(target_arch = "wasm32"))]
pub fn provider_ref(&self) -> &str;

#[cfg(not(target_arch = "wasm32"))]
pub fn preflight(&self) -> &CodingProviderPreflight;

#[cfg(not(target_arch = "wasm32"))]
pub async fn execute(&self) -> ForgeResult<AuthorizedSessionExecution>;

#[cfg(not(target_arch = "wasm32"))]
pub struct OfficialCodingProviderManager {

}

#[cfg(not(target_arch = "wasm32"))]
pub fn new() -> ForgeResult<Self>;

#[cfg(not(target_arch = "wasm32"))]
pub fn registry(&self) -> &ProviderRegistry;

#[cfg(not(target_arch = "wasm32"))]
pub async fn start_authorized_session<V: ProviderAuthorityVerifier>(
        &self,
        agent: &AgentConfig,
        request: &AuthorizedSessionRequest,
        verifier: &V,
    ) -> Result<AuthorizedSessionHandle, ForgeAgentError>;

#[cfg(not(target_arch = "wasm32"))]
pub fn official_provider_registry() -> ForgeResult<ProviderRegistry>;

#[cfg(not(target_arch = "wasm32"))]
pub fn register_official_coding_providers(registry: &mut ProviderRegistry) -> ForgeResult<()>;

#[cfg(not(target_arch = "wasm32"))]
#[derive(Debug, Clone)]
pub struct OpenAiCompatibleCodingLanguageModel {

}

#[cfg(not(target_arch = "wasm32"))]
pub fn new(
        provider_namespace: impl Into<String>,
        model_id: impl Into<String>,
        api_key_env: impl Into<String>,
        base_url_env: impl Into<String>,
        default_base_url: impl Into<String>,
    ) -> Self;

#[cfg(not(target_arch = "wasm32"))]
#[derive(Debug, Clone)]
pub struct CodexCliAdapter {
pub program: String
}

#[cfg(not(target_arch = "wasm32"))]
pub fn build_command(
        &self,
        prompt: &str,
        system_prompt: Option<&str>,
        cwd: Option<&Path>,
    ) -> CliCommandSpec;

#[cfg(not(target_arch = "wasm32"))]
#[derive(Debug, Clone)]
pub struct ClaudeCodeAdapter {
pub program: String
}

#[cfg(not(target_arch = "wasm32"))]
pub fn build_command(
        &self,
        prompt: &str,
        system_prompt: Option<&str>,
        cwd: Option<&Path>,
    ) -> CliCommandSpec;

#[cfg(not(target_arch = "wasm32"))]
pub fn official_provider_metadata<'a>(
    registry: &'a ProviderRegistry,
    provider_ref: &str,
) -> Option<&'a ProviderMetadata>;

Continue

On this page