Skip to main content

Crate punch_kernel

Crate punch_kernel 

Source
Expand description

§punch-kernel

The Ring — central kernel and orchestrator for the Punch Agent Combat System.

This crate coordinates fighters (conversational agents), gorillas (autonomous agents), the event bus, the scheduler, the background executor, the workflow engine, and the metering engine. It is the single entry point through which the rest of the system interacts with the agent runtime.

Re-exports§

pub use a2a_executor::A2ATaskExecutor;
pub use agent_messaging::MessageRouter;
pub use background::BackgroundExecutor;
pub use background::fighter_manifest_from_gorilla;
pub use background::run_gorilla_tick;
pub use budget::BudgetEnforcer;
pub use budget::BudgetLimit;
pub use budget::BudgetStatus;
pub use budget::BudgetVerdict;
pub use config_watcher::KernelConfigDiff;
pub use config_watcher::KernelConfigWatcher;
pub use event_bus::EventBus;
pub use metering::MeteringEngine;
pub use metering::ModelPrice;
pub use metering::SpendPeriod;
pub use metrics::MetricsRegistry;
pub use metrics::register_default_metrics;
pub use patterns::ChainHandler;
pub use patterns::MapReduceConfig;
pub use patterns::MapReduceResult;
pub use patterns::ScatterResponse;
pub use patterns::SupervisedWorker;
pub use patterns::SupervisorConfig;
pub use patterns::auction_filter_bids;
pub use patterns::auction_select_winner;
pub use patterns::chain_find_handler;
pub use patterns::chain_walk;
pub use patterns::execute_auction;
pub use patterns::execute_chain_of_responsibility;
pub use patterns::execute_map_reduce;
pub use patterns::execute_map_reduce_distributed;
pub use patterns::execute_scatter_gather;
pub use patterns::map_reduce_merge;
pub use patterns::map_split;
pub use patterns::scatter_select;
pub use patterns::supervisor_handle_failure;
pub use patterns::supervisor_monitor_health;
pub use registry::AgentRegistry;
pub use ring::FighterEntry;
pub use ring::GorillaEntry;
pub use ring::Ring;
pub use scheduler::Scheduler;
pub use shutdown::ShutdownCoordinator;
pub use swarm::FighterLoad;
pub use swarm::ProgressReport;
pub use swarm::SwarmCoordinator;
pub use tenant_registry::TenantRegistry;
pub use triggers::Trigger;
pub use triggers::TriggerAction;
pub use triggers::TriggerCondition;
pub use triggers::TriggerEngine;
pub use triggers::TriggerId;
pub use triggers::TriggerSummary;
pub use troop::TaskAssignmentResult;
pub use troop::TroopManager;
pub use workflow::CircuitBreakerState;
pub use workflow::DagExecutionResult;
pub use workflow::DagWorkflow;
pub use workflow::DagWorkflowStep;
pub use workflow::DeadLetterEntry;
pub use workflow::ExecutionTraceEntry;
pub use workflow::OnError;
pub use workflow::StepExecutor;
pub use workflow::StepResult;
pub use workflow::StepStatus;
pub use workflow::Workflow;
pub use workflow::WorkflowEngine;
pub use workflow::WorkflowId;
pub use workflow::WorkflowRun;
pub use workflow::WorkflowRunId;
pub use workflow::WorkflowRunStatus;
pub use workflow::WorkflowStep;
pub use workflow::execute_dag;
pub use workflow::expand_dag_variables;
pub use workflow_conditions::Condition;
pub use workflow_conditions::evaluate_condition;
pub use workflow_loops::LoopConfig;
pub use workflow_loops::LoopState;
pub use workflow_loops::calculate_backoff;
pub use workflow_loops::parse_foreach_items;
pub use workflow_validation::ValidationError;
pub use workflow_validation::topological_sort;
pub use workflow_validation::validate_workflow;

Modules§

a2a_executor
A2A Task Executor — picks up pending A2A tasks and runs them through fighters.
agent_messaging
Inter-Agent Messaging
background
Background executor for autonomous gorilla tasks.
budget
Budget Enforcement — the promoter’s purse control.
config_watcher
Config Hot Reload — poll-based config watcher with callback support.
event_bus
Event bus for publishing and subscribing to system-wide PunchEvents.
metering
Cost tracking and quota enforcement engine.
metrics
Lightweight Prometheus-compatible metrics registry.
patterns
Coordination Patterns
registry
Agent template registry.
ring
The Ring — the central kernel and coordinator for the Punch system.
scheduler
Per-fighter quota tracking and rate limiting.
shutdown
Graceful shutdown coordinator for the Punch kernel.
swarm
Swarm Intelligence
tenant_registry
Tenant registry for multi-tenant isolation.
triggers
Event-driven trigger engine for the Punch Agent Combat System.
troop
Troop System
workflow
Multi-step agent workflow engine with DAG execution.
workflow_conditions
Conditional branching for workflow steps.
workflow_loops
Loop constructs for workflow steps.
workflow_validation
Pre-execution validation for workflow DAGs.