Csilk 0.2.1
A lightweight, high-performance C HTTP web framework
Loading...
Searching...
No Matches
csilk_wf_ctx_t Struct Reference

Workflow execution context — per-run state tracking all node progress, scheduling, memory, and budget enforcement. Created by csilk_wf_run_ext_internal() and freed by cleanup_ctx(). More...

Collaboration diagram for csilk_wf_ctx_t:

Data Fields

csilk_wf_t * wf
 
csilk_data_tinitial_input
 
void(* callback )(csilk_data_t *)
 
void(* trace_callback )(csilk_data_t *, csilk_wf_trace_t *)
 
int * node_input_counts
 
int total_executions
 
int nodes_active
 
uv_mutex_t mutex
 
csilk_arena_tarena
 
uv_mutex_t arena_mutex
 
csilk_data_t ** node_outputs
 
char exec_id [37]
 
char * wal_path
 
csilk_wf_trace_ttrace
 
uv_mutex_t trace_mutex
 
int total_tokens
 
int is_terminated
 
int is_paused
 
int * node_approved
 
uv_timer_t ttl_timer
 
int is_ttl_expired
 

Detailed Description

Workflow execution context — per-run state tracking all node progress, scheduling, memory, and budget enforcement. Created by csilk_wf_run_ext_internal() and freed by cleanup_ctx().

Opaque handle for a workflow execution context.

Field Documentation

◆ arena

csilk_arena_t* csilk_wf_ctx_t::arena

Memory arena for this execution.

◆ arena_mutex

uv_mutex_t csilk_wf_ctx_t::arena_mutex

Protects arena allocations (parallel tool calls).

◆ callback

void(* csilk_wf_ctx_t::callback) (csilk_data_t *)

Final result callback.

◆ exec_id

char csilk_wf_ctx_t::exec_id[37]

UUID execution identifier (36 chars + null).

◆ initial_input

csilk_data_t* csilk_wf_ctx_t::initial_input

Original input data passed to run().

◆ is_paused

int csilk_wf_ctx_t::is_paused

Workflow is waiting for human input.

◆ is_terminated

int csilk_wf_ctx_t::is_terminated

Hard stop flag (budget exceeded, TTL expired).

◆ is_ttl_expired

int csilk_wf_ctx_t::is_ttl_expired

TTL expiration flag.

◆ mutex

uv_mutex_t csilk_wf_ctx_t::mutex

Protects scheduler state (counters, flags).

◆ node_approved

int* csilk_wf_ctx_t::node_approved

Tracking approved interactive nodes.

◆ node_input_counts

int* csilk_wf_ctx_t::node_input_counts

Per-node received-input counters for join tracking.

◆ node_outputs

csilk_data_t** csilk_wf_ctx_t::node_outputs

Per-node output data history.

◆ nodes_active

int csilk_wf_ctx_t::nodes_active

Nodes currently queued or running on thread pool.

◆ total_executions

int csilk_wf_ctx_t::total_executions

Total nodes executed (safety counter for infinite loops).

◆ total_tokens

int csilk_wf_ctx_t::total_tokens

Cumulative tokens used across AI nodes.

◆ trace

csilk_wf_trace_t* csilk_wf_ctx_t::trace

Execution trace (timing, I/O dumps).

◆ trace_callback

void(* csilk_wf_ctx_t::trace_callback) (csilk_data_t *, csilk_wf_trace_t *)

Traced result callback.

◆ trace_mutex

uv_mutex_t csilk_wf_ctx_t::trace_mutex

Protects trace appends from parallel completions.

◆ ttl_timer

uv_timer_t csilk_wf_ctx_t::ttl_timer

Global TTL timer handle.

◆ wal_path

char* csilk_wf_ctx_t::wal_path

Full path to the WAL file for this execution.

◆ wf

csilk_wf_t* csilk_wf_ctx_t::wf

The workflow definition.


The documentation for this struct was generated from the following file: