125 void* run_child_data,
127 const std::filesystem::path& repo_dir = {},
185 const std::string& target_tier,
186 const std::string& task,
187 std::optional<int> max_turns = std::nullopt);
211 const std::string& target_tier,
212 const std::string& task,
213 std::vector<Message> seed_history,
214 std::optional<int> max_turns = std::nullopt);
228 const std::vector<std::string>& stages,
229 const std::string& task,
230 std::vector<DelegationResult>& stage_log);
245 const std::string& task);
265 const std::string& target_tier,
266 const std::string& task,
267 std::vector<Message> seed_history);
276 std::string extract_summary(
const LoopContext& child_ctx)
const;
297 std::optional<DelegationResult> check_delegation_preconditions(
299 const std::string& target_tier,
300 const std::string& task,
301 const std::string& del_id,
303 std::optional<SandboxInfo>& sb_info_out);
317 const std::string& target_tier,
318 const std::string& task,
319 std::optional<int> max_turns);
332 const std::string& target_tier,
333 const std::string& task,
357 void finalize_sandbox_for(
358 const std::optional<SandboxInfo>& sb_info,
371 std::string create_storage_record(
372 LoopContext& child_ctx,
const std::string& target_tier,
373 const std::string& task, std::optional<int> max_turns);
382 void complete_storage_record(
383 const std::string& delegation_id,
387 void* run_child_data_;
391 void* swap_dir_data_ =
nullptr;
393 std::filesystem::path repo_dir_;
401 void* delegation_cb_data_ =
nullptr;
421 const std::string& delegation_id,
422 const std::string& target_tier,
423 const std::string& task,
441 void deliver_sandbox_result(
459 const std::string& delegation_id);
474 void persist_pending_patch(
500 bool run_pipeline_stage(
502 const std::vector<std::string>& stages,
504 const std::string& task,
505 const std::optional<SandboxInfo>& shared_sb,
506 std::vector<DelegationResult>& stage_log,
Orchestrates child loop creation and execution.
DelegationResult execute_delegation(LoopContext &parent_ctx, const std::string &target_tier, const std::string &task, std::optional< int > max_turns=std::nullopt)
Run a child inference loop for the target tier.
DelegationResult execute_pipeline(LoopContext &parent_ctx, const std::vector< std::string > &stages, const std::string &task, std::vector< DelegationResult > &stage_log)
Run a multi-stage delegation pipeline sequentially.
void set_todo_callbacks(const TodoCallbacks &callbacks)
Set todo list save/restore callbacks.
DelegationResult execute_resume_delegation(LoopContext &parent_ctx, const std::string &target_tier, const std::string &task, std::vector< Message > seed_history, std::optional< int > max_turns=std::nullopt)
Resume a prior delegation with pre-loaded conversation history.
void set_dir_swap(ScopedSandbox::SwapDirFn swap_fn, void *user_data)
Set directory swap callback for ScopedSandbox.
void set_storage(const struct StorageInterface *storage)
Set storage interface for delegation record persistence.
void set_delegation_callbacks(ent_decision_t(*on_start)(const ent_delegation_request_t *, void *), ent_decision_t(*on_complete)(const ent_delegation_result_t *, void *), void *user_data)
Set delegation start/complete callbacks (gh#29, v2.1.5).
Create, finalize, and discard per-delegation filesystem sandboxes.
void(*)(const std::filesystem::path &path, void *user_data) SwapDirFn
Callback type for directory swapping.
Types for the agentic loop engine.
Public C API for the Entropic inference engine.
ent_decision_t
Consumer decision returned from delegation callbacks.
Message struct for conversation history.
Activate model on GPU (WARM → ACTIVE).
void(*)(LoopContext &ctx, void *user_data) RunChildLoopFn
Callback type for running a child engine loop.
Filesystem-based sandbox isolation for delegations.
Request describing a delegation that is about to run.
Result of a finalized delegation, delivered to the consumer.
Resolved tier information for building child delegation contexts.
Result returned from a child delegation loop.
std::vector< Message > child_messages
Full child message history.
std::string terminal_reason
Non-empty when the child terminated synthetically rather than via a real entropic....
bool coverage_gap
Issue #10 (v2.1.4): coverage_gap signal from the child's entropic.complete call.
bool success
Whether child reached COMPLETE via real entropic.complete.
std::string summary
Final summary from child.
std::string task
Original task text.
std::vector< std::string > suggested_files
Issue #10 (v2.1.4): file paths the lead should inspect to fill the coverage gap.
std::string target_tier
Tier that executed.
std::string gap_description
Issue #10 (v2.1.4): concrete description of what the child's answer DOES NOT cover.
int turns_used
Iterations consumed.
Mutable state carried through the agentic loop.
Identifies one delegation's sandbox directory.
Final artifact emitted by a finalized sandbox.
Storage interface for conversation persistence.
Tier resolution callbacks for delegation and auto-chain.
Callback type for saving/restoring todo list state.
std::string(* save)(void *user_data)
Save current todo list state. Returns opaque state string.
void(* restore)(const std::string &saved, void *user_data)
Restore a previously saved todo list state.
void(* install_fresh)(void *user_data)
Install a fresh empty todo list for child.
void * user_data
Opaque pointer (facade context)