Forge documentation
Library referenceRust

harness-sdk-forge

Forge ↔ Harness bridge — implements harness-sdk's AgentAdapter for forge-rs agents and re-exports the full forge SDK so harness apps get every Forge primitive in one import.

Forge ↔ Harness bridge — implements harness-sdk's AgentAdapter for forge-rs agents and re-exports the full forge SDK so harness apps get every Forge primitive in one import.

Package contract

FieldValue
Languagerust
Source version0.1.0-alpha.1
Manifestharness-sdk-forge/Cargo.toml
Source files3
EvidenceSource reference; registry publication and runtime conformance are separate checks

Import boundary

use harness_sdk_forge;

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.

pub mod adapter;

pub mod translate;

pub use adapter::ForgeAdapter;

pub mod prelude;

pub use crate::adapter::ForgeAdapter;

pub use harness_sdk::adapter::AgentAdapter;

pub use harness_sdk::error::AdapterError;

pub use harness_sdk::types::{
        ActivityLevel, AdapterCapabilities, AutonomyEvent, HumanInterjection, InterjectionAck,
        ResponseChunk, SdkAgentInfo, SdkAgentStatus,
    };

pub use harness_sdk::AgentApp;

pub use forge_core::config::GenerateOptions;

pub use forge_core::error::{ForgeError, ForgeResult};

pub use forge_core::message::{MessagePart, ModelMessage, Role};

pub use forge_core::model::{ChunkStream, LanguageModel, ModelCapabilities, StreamChunkResult};

pub use forge_core::output::{FinishReason, GenerateResult, StreamChunk, Usage};

pub use forge_core::tool::{ToolCall, ToolDefinition, ToolResult, ToolTier};

pub use forge_agent::agent::{
        Agent, AgentConfig, AgentEvent, AgentOutput, ToolInvocationRecord, ToolInvocationStatus,
    };

pub use forge_agent::observer::{AgentLoopObserver, NoOpObserver};

pub use forge_agent::streaming_tool_loop::{StreamingLoopConfig, StreamingToolLoopAgent};

pub use forge_agent::tool_loop::ToolLoopAgent;

pub use forge_tool::approval::{ApprovalHandler, AutoApprove};

pub use forge_tool::execution::FnToolExecutor;

pub use forge_tool::registry::ToolRegistry;

pub use forge_identity::lineage::{
        create_hmr_identity, create_hmr_with_seed, create_mhr_identity, create_mhr_with_seed,
        derive_agent_identity,
    };

pub use forge_generate::{stream_text, stream_text_chunks, TextStreamResult};

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.

adapter.rs

Read declaration text · 7 declaration entries

pub struct ForgeAdapter {

}

pub fn new(agent: Arc<StreamingToolLoopAgent>) -> Self;

#[must_use]
pub fn with_id(mut self, id: impl Into<String>) -> Self;

#[must_use]
pub fn with_display_name(mut self, name: impl Into<String>) -> Self;

#[must_use]
pub fn with_model_label(mut self, label: impl Into<String>) -> Self;

#[must_use]
pub fn with_capabilities(mut self, caps: AdapterCapabilities) -> Self;

pub fn forge_agent(&self) -> &Arc<StreamingToolLoopAgent>;

lib.rs

Read declaration text · 24 declaration entries

pub mod adapter;

pub mod translate;

pub use adapter::ForgeAdapter;

pub mod prelude;

pub use crate::adapter::ForgeAdapter;

pub use harness_sdk::adapter::AgentAdapter;

pub use harness_sdk::error::AdapterError;

pub use harness_sdk::types::{
        ActivityLevel, AdapterCapabilities, AutonomyEvent, HumanInterjection, InterjectionAck,
        ResponseChunk, SdkAgentInfo, SdkAgentStatus,
    };

pub use harness_sdk::AgentApp;

pub use forge_core::config::GenerateOptions;

pub use forge_core::error::{ForgeError, ForgeResult};

pub use forge_core::message::{MessagePart, ModelMessage, Role};

pub use forge_core::model::{ChunkStream, LanguageModel, ModelCapabilities, StreamChunkResult};

pub use forge_core::output::{FinishReason, GenerateResult, StreamChunk, Usage};

pub use forge_core::tool::{ToolCall, ToolDefinition, ToolResult, ToolTier};

pub use forge_agent::agent::{
        Agent, AgentConfig, AgentEvent, AgentOutput, ToolInvocationRecord, ToolInvocationStatus,
    };

pub use forge_agent::observer::{AgentLoopObserver, NoOpObserver};

pub use forge_agent::streaming_tool_loop::{StreamingLoopConfig, StreamingToolLoopAgent};

pub use forge_agent::tool_loop::ToolLoopAgent;

pub use forge_tool::approval::{ApprovalHandler, AutoApprove};

pub use forge_tool::execution::FnToolExecutor;

pub use forge_tool::registry::ToolRegistry;

pub use forge_identity::lineage::{
        create_hmr_identity, create_hmr_with_seed, create_mhr_identity, create_mhr_with_seed,
        derive_agent_identity,
    };

pub use forge_generate::{stream_text, stream_text_chunks, TextStreamResult};

translate.rs

Read declaration text · 5 declaration entries

pub struct ChunkTranslator {

}

pub fn new(agent_id: impl Into<String>) -> Self;

pub fn agent_id(&self) -> &str;

pub fn translate(&mut self, chunk: StreamChunk) -> Vec<ResponseChunk>;

pub fn finish(&mut self) -> Vec<ResponseChunk>;

Continue

On this page