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,
188 const std::vector<ContextRef>& context = {});
212 const std::string& target_tier,
213 const std::string& task,
215 std::optional<int> max_turns = std::nullopt,
216 const std::vector<ContextRef>& context = {});
230 const std::vector<std::string>& stages,
231 const std::string& task,
232 std::vector<DelegationResult>&
stage_log,
233 const std::vector<ContextRef>& context = {});
243 std::string mint_delegation_id(
const std::string&
prefix);
252 std::filesystem::path restore_root_for(
267 static std::string format_context_block(
268 const std::vector<ContextRef>& context);
282 const std::string& task,
283 const std::vector<ContextRef>& context = {});
303 const std::string& target_tier,
304 const std::string& task,
335 std::optional<DelegationResult> check_delegation_preconditions(
337 const std::string& target_tier,
338 const std::string& task,
339 const std::string&
del_id,
357 const std::string& target_tier,
358 const std::string& task,
359 std::optional<int> max_turns);
372 const std::string& target_tier,
373 const std::string& task,
397 void finalize_sandbox_for(
398 const std::optional<SandboxInfo>&
sb_info,
411 std::string create_storage_record(
413 const std::string& task, std::optional<int> max_turns);
422 void complete_storage_record(
423 const std::string& delegation_id,
427 void* run_child_data_;
431 void* swap_dir_data_ =
nullptr;
433 std::filesystem::path repo_dir_;
441 void* delegation_cb_data_ =
nullptr;
461 const std::string& delegation_id,
462 const std::string& target_tier,
463 const std::string& task,
481 void deliver_sandbox_result(
499 const std::string& delegation_id);
514 void persist_pending_patch(
540 bool run_pipeline_stage(
542 const std::vector<std::string>& stages,
544 const std::string& task,
545 const std::optional<SandboxInfo>&
shared_sb,
546 std::vector<DelegationResult>&
stage_log,
Orchestrates child loop creation and execution.
void set_todo_callbacks(const TodoCallbacks &callbacks)
Set todo list save/restore callbacks.
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.
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, const std::vector< ContextRef > &context={})
Resume a prior delegation with pre-loaded conversation history.
DelegationResult execute_pipeline(LoopContext &parent_ctx, const std::vector< std::string > &stages, const std::string &task, std::vector< DelegationResult > &stage_log, const std::vector< ContextRef > &context={})
Run a multi-stage delegation pipeline sequentially.
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).
DelegationResult execute_delegation(LoopContext &parent_ctx, const std::string &target_tier, const std::string &task, std::optional< int > max_turns=std::nullopt, const std::vector< ContextRef > &context={})
Run a child inference loop for the target tier.
Create, finalize, and discard per-delegation filesystem sandboxes.
void(*)(const std::string &session_key, const std::filesystem::path &path, bool entering, 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).
@ optional
optional: every escape asks the host's path approver
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)