Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion binary/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "openflows"
version = "1.1.6"
version = "1.1.7"
edition = "2021"
license = "MIT"

Expand Down
20 changes: 15 additions & 5 deletions binary/src/bin/agentflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
use agent_vessel::{VesselConfig, VesselNode};
use anyhow::Result;
use config::{
ACTION_CI_FIX_NEEDED, ACTION_CONFLICTS_DETECTED, ACTION_DEPLOYED, ACTION_DEPLOY_FAILED,
ACTION_DOCS_COMPLETE, ACTION_FAILED, ACTION_MERGE_PRS, ACTION_NO_WORK, ACTION_PR_OPENED,
ACTION_WORK_ASSIGNED, KEY_PENDING_PRS, KEY_TICKETS, KEY_WORKER_SLOTS,
ACTION_AWAITING_HUMAN, ACTION_CI_FIX_NEEDED, ACTION_CONFLICTS_DETECTED, ACTION_DEPLOYED,
ACTION_DEPLOY_FAILED, ACTION_DOCS_COMPLETE, ACTION_FAILED, ACTION_MERGE_PRS, ACTION_NO_WORK,
ACTION_PR_OPENED, ACTION_WORK_ASSIGNED, KEY_PENDING_PRS, KEY_TICKETS, KEY_WORKER_SLOTS,
};
use pair_harness::WorkspaceManager;
use pocketflow_core::{Action, Flow, SharedStore};
use pocketflow_core::{Action, Flow, SharedStore, NODE_ERROR};
use std::sync::Arc;
use tracing::{info, warn};

Expand Down Expand Up @@ -208,16 +208,24 @@
};

// 4. Setup Flow with Routing
//
// Error recovery routes:
// - "node_error": When a node's exec() fails, the flow routes to the
// nexus node for retry instead of crashing. This enables self-healing.
// - "awaiting_human": When the LLM can't decide and needs human input,
// the flow routes back to nexus which will pause and log the condition.
let mut flow = Flow::new("nexus")
.add_node(
"nexus",
nexus,
vec![

Check warning on line 221 in binary/src/bin/agentflow.rs

View workflow job for this annotation

GitHub Actions / Format

Diff in /home/runner/work/openflows/openflows/binary/src/bin/agentflow.rs
(ACTION_WORK_ASSIGNED, "forge_pair"),
(ACTION_MERGE_PRS, "vessel"),
(ACTION_NO_WORK, "nexus"),
(ACTION_NO_WORK, "nexus"), // loop back for next cycle
(ACTION_AWAITING_HUMAN, "nexus"), // needs human input — log and pause
("approve_command", "forge_pair"),
("reject_command", "nexus"),
(NODE_ERROR, "nexus"), // self-healing: retry on LLM/api failures
],
)
.add_node(
Expand All @@ -225,9 +233,10 @@
forge_pair,
vec![
(ACTION_PR_OPENED, "vessel"),
(ACTION_FAILED, "nexus"),

Check warning on line 236 in binary/src/bin/agentflow.rs

View workflow job for this annotation

GitHub Actions / Format

Diff in /home/runner/work/openflows/openflows/binary/src/bin/agentflow.rs
("suspended", "nexus"),
(Action::NO_TICKETS, "nexus"),
(NODE_ERROR, "nexus"), // self-healing: retry on LLM/api failures
],
)
.add_node("vessel", vessel, {
Expand All @@ -235,9 +244,10 @@
(ACTION_DEPLOY_FAILED, "nexus"),
(ACTION_CI_FIX_NEEDED, "forge_pair"),
("merge_blocked", "nexus"),
(ACTION_CONFLICTS_DETECTED, "forge_pair"),

Check warning on line 247 in binary/src/bin/agentflow.rs

View workflow job for this annotation

GitHub Actions / Format

Diff in /home/runner/work/openflows/openflows/binary/src/bin/agentflow.rs
(Action::AWAITING_HUMAN, "nexus"),
("no_work", "nexus"),
(NODE_ERROR, "nexus"), // self-healing: retry on merge/api failures
];
if lore.is_some() {
routes.insert(0, (ACTION_DEPLOYED, "lore"));
Expand Down
2 changes: 1 addition & 1 deletion crates/agent-client/src/fallback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ impl FallbackClient {

fn build_fireworks_chain(model_override: Option<&str>) -> Result<Self> {
let mut clients: Vec<Box<dyn LlmClient>> = Vec::new();
let model = model_override.unwrap_or("accounts/fireworks/models/llama-v3p1-8b-instruct");
let model = model_override.unwrap_or("accounts/fireworks/models/deepseek-v3p1");

info!(
model = model,
Expand Down
2 changes: 1 addition & 1 deletion crates/agent-client/src/fireworks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl FireworksClient {
pub fn from_env() -> Result<Self> {
let key = std::env::var("FIREWORKS_API_KEY").context("FIREWORKS_API_KEY not set")?;
let model = std::env::var("FIREWORKS_MODEL")
.unwrap_or_else(|_| "accounts/fireworks/models/llama-v3p1-8b-instruct".to_string());
.unwrap_or_else(|_| "accounts/fireworks/models/deepseek-v3p1".to_string());
let api_url =
std::env::var("FIREWORKS_API_URL").unwrap_or_else(|_| FIREWORKS_API_URL.to_string());
Ok(Self {
Expand Down
Loading
Loading