Details
Object Hierarchy:
Description:
public class Details :
Base
One task in the plan. Built from task list output; updated from refinement output.
Task list (input): each list item under a task section heading has a nested list with labels What is needed, Skill,
References, Expected output. Links in References: current_file, paths, plan:... Keys are exactly these labels (no other
format accepted): "What is needed", "Skill", "References", "Expected output", "Requires user approval".
Refined task (refinement output): section "Refined task" with same list plus Skill call and an optional fenced code block. Parser
uses ListItem.to_key_map() for both; update_props(refined_map); code added directly to code_blocks.
Execution: after refinement, the runner calls build_exec_runs() then run_exec(). exec_runs holds one Tool per run; each Tool.run() runs
the tool (if any) then the LLM. result is built from exec_runs summaries; documents live on each Tool (ex.document).
Content:
Properties:
- public ArrayList<Block> code_blocks { get; set; }
Code blocks from refinement (parser); add directly.
- public bool exec_done { get; set; }
True after run_exec success; result then valid (from exec_runs
summaries).
- public ArrayList<Tool> exec_runs { get; set; }
Tool instances per execution run. Populated by build_* methods;
run_exec() runs each (tool if needed, then LLM). REFINE_COMPLETED and task.result use their summaries.
- public string issues { get; set; }
Validation errors; append with this.issues += "\n" + msg. Parser
checks and appends with section context.
- public bool last_failure_was_communication { get; }
True when refinement failed after exhausting communication retries
(e.g. send threw 3 times). Caller should report to user.
- public ArrayList<Format> reference_targets { get; set; }
Markdown links from references block (current_file, paths, plan:...);
Runner resolves for prompt fill. Filled in fill_task_data().
- public bool requires_user_approval { get; set; }
True when this task should gate execution (e.g. modifies files); from
task list format.
- public string result { get; set; }
Executor output summary (Result summary section).
- public ResultParser result_parser { get; set; }
Parser for last refine or executor response; result valid after
exec_done (from exec_runs). Initialized in ctor so issues is always available.
- public unowned Runner runner { get; set; }
Runner; used for env, content_for_reference when filling prompts.
- public Manager skill_manager { get; }
Alias to runner.sr_factory.skill_manager (no setter).
- public int step_index { get; set; }
Step index (0-based) of the section this task belongs to, or -1 if not
set. Set when the task list is built (e.g. in ResultParser.parse_task_list) so we don't re-derive section from position later.
- public Map<string,Block> task_data { get; set; }
Map from ListItem.to_key_map(); keys are exact labels only. All task
content is read from here.
- public ArrayList<Tool> tools { get; set; }
Tool instances from `## Tool Calls` section (ResultParser);
build_exec_runs() uses them for scenario 1.
Creation methods:
Methods:
- public void build_exec_runs ()
Populate exec_runs. Three scenarios only: (1) tools when run → one
Tool per tool; (2) refs without tools → one per ref; (3) combined → one run with all refs. Does not run them. Return early per
branch.
- protected override async void fill_model ()
Set chat_call.model from this task's skill definition when the skill
header has an optional model and it is available; otherwise use default.
- public void fill_name (int i)
If task_data has no "Name" or empty, set Name = (Skill or "Task") + "
" + index. Single method.
- public async void refine (Cancellable? cancellable = null) throws Error
Refinement: fill template. Caller has validated via
skill_manager.validate(this); definition from skill_manager.fetch(this) is non-null. Details builds task_reference_contents by looping
reference_targets and asking Runner for each item (see "Building the task reference block"). Up to 5 refinement attempts; up to 3
communication retries per attempt. Caller (Runner) must catch and report to user; see 1.23.14.
- public PromptTemplate refinement_prompt () throws Error
Build refinement prompt template (no current_file; reference_contents
includes current file when in the task's References).
- public async void run_exec () throws Error
Run all Tool exec runs (tool if needed, then LLM). Sets result from
exec_runs summaries. Documents stay on each Tool (ex.document).
- public string slug ()
This task's name as slug (e.g. "Research 1" → "research-1"). Returns
"" if no Name in task_data or empty.
- public string to_markdown (MarkdownPhase phase)
Task as markdown for a given phase. Does not add section headings
(e.g. `## Task`); caller adds header. COARSE: creation keys. REFINEMENT: task list + `## Tool Calls` when tools exist. LIST: task list
+ Output when exec_done. EXECUTION: same as REFINEMENT for Tool Calls.
- public void update_props (Map<string,Block> refined_map)
Apply refined task map: set each key from refined_map into
this.task_data, then re-run fill.
- public void validate_references (bool allow_http_refs = false)
Validate reference_targets hrefs; append to issues on invalid. Call
from parsing process after fill_names (pass list so task-output anchors can be validated).
- public async void wait_refined () throws Error
- public void write (string suffix = "")
Write this task's result to session task dir. When exec_runs.size >
1, writes slug + "-" + ex.id + ".md" per Tool (document content). Single run writes slug + suffix + ".md" with that run's document or
result.
Inherited Members:
All known members inherited from class OLLMchat.Agent.Base
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref
All known members inherited from interface OLLMchat.Agent.Interface