125 void* run_child_data,
127 const std::filesystem::path& repo_dir = {},
183 const std::string& target_tier,
184 const std::string& task,
185 std::optional<int> max_turns = std::nullopt);
208 const std::string& target_tier,
209 const std::string& task,
210 std::vector<Message> seed_history,
211 std::optional<int> max_turns = std::nullopt);
223 const std::vector<std::string>& stages,
224 const std::string& task);
238 const std::string& task);
258 const std::string& target_tier,
259 const std::string& task,
260 std::vector<Message> seed_history);
268 std::string extract_summary(
const LoopContext& child_ctx)
const;
288 std::optional<DelegationResult> check_delegation_preconditions(
290 const std::string& target_tier,
291 const std::string& task,
292 const std::string& del_id,
294 std::optional<SandboxInfo>& sb_info_out);
307 const std::string& target_tier,
308 const std::string& task,
309 std::optional<int> max_turns);
321 const std::string& target_tier,
322 const std::string& task,
346 void finalize_sandbox_for(
347 const std::optional<SandboxInfo>& sb_info,
359 std::string create_storage_record(
360 LoopContext& child_ctx,
const std::string& target_tier,
361 const std::string& task, std::optional<int> max_turns);
369 void complete_storage_record(
370 const std::string& delegation_id,
374 void* run_child_data_;
378 void* swap_dir_data_ =
nullptr;
380 std::filesystem::path repo_dir_;
388 void* delegation_cb_data_ =
nullptr;
407 const std::string& delegation_id,
408 const std::string& target_tier,
409 const std::string& task,
427 void deliver_sandbox_result(
445 const std::string& delegation_id);
460 void persist_pending_patch(
485 bool run_pipeline_stage(
487 const std::vector<std::string>& stages,
489 const std::string& task,
490 const std::optional<SandboxInfo>& shared_sb,
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.
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.
DelegationResult execute_pipeline(LoopContext &parent_ctx, const std::vector< std::string > &stages, const std::string &task)
Run a multi-stage delegation pipeline sequentially.
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)