neuron-turn-kit 0.4.0

Turn-level planning and execution primitives: planner, concurrency decider, batch executor, steering
Documentation
  • Coverage
  • 100%
    17 out of 17 items documented1 out of 13 items with examples
  • Size
  • Source code size: 26.04 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.75 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 37s Average build duration of successful builds.
  • all releases: 37s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • SecBear/skelegent
    9 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • SecBear

neuron-turn-kit

Planning and execution primitives for a single agent turn — focused on sequencing and concurrency only. These traits are intentionally narrow and do not bake in provider streaming, hooks, or operator concerns; those live at higher layers (e.g., operator implementations).

Contents:

  • Concurrency and ConcurrencyDecider — classify tool calls as Shared vs Exclusive
  • ToolExecutionPlanner and BarrierPlanner — sequence tool calls into batches
  • SteeringSource — optional source of mid-loop steering messages
  • BatchExecutor — run batches, with a simple sequential baseline executor

Example: planning with a barrier.

use neuron_turn_kit::{BarrierPlanner, Concurrency, ConcurrencyDecider, ToolExecutionPlanner};

struct SharedIfStartsWith;
impl ConcurrencyDecider for SharedIfStartsWith {
    fn concurrency(&self, tool_name: &str) -> Concurrency {
        if tool_name.starts_with("shared_") { Concurrency::Shared } else { Concurrency::Exclusive }
    }
}

let calls = vec![
    ("1".to_string(), "shared_a".to_string(), serde_json::json!({})),
    ("2".to_string(), "exclusive".to_string(), serde_json::json!({})),
    ("3".to_string(), "shared_b".to_string(), serde_json::json!({})),
];
let planner = BarrierPlanner;
let plan = planner.plan(&calls, &SharedIfStartsWith);
assert!(matches!(plan[0], neuron_turn_kit::BatchItem::Shared(_)));