{% from 'components/artifact-type.html' import artifact_type %}

{{ t.auto_title }}

{% for row in automatic_status %} {% set status = row.value %} {% set blocked = status and status.block %} {% set execution = status.executor if status else none %} {% set pending = status and status.state == 'pending' %} {% set blocked_at = status.block.blocked_at if blocked else none %} {% set error_at = execution.last_error_at if execution else none %} {% set last_event_at = error_at if error_at and (not blocked_at or error_at > blocked_at) else blocked_at %} {% set last_event_kind = 'failed' if last_event_at and last_event_at == error_at else 'blocked' if blocked_at else 'unknown' %} {% set recorded_reason = t.get('auto_block_' ~ status.block.error_code, t.get('processing_error_' ~ status.block.error_code)) if blocked else none %}
{{ artifact_type('atomic-memory' if row.family == 'memory' else row.family) }}{% if blocked %} {{ t.processing_topic_blocked }}{% endif %} {% if row.error %}{{ t.auto_unavailable }}{% elif status.progress %}{{ status.progress.source_cursor }} / {{ status.progress.source_head }}{{ t.auto_pending_inputs if status.progress.pending_inputs else t.auto_caught_up_short }}{% else %}{{ t.unknown_value }}{% endif %} {% if execution %}{{ t.get('auto_execution_' ~ execution.state, t.auto_unobserved) }}{% else %}{{ t.auto_unobserved }}{% endif %} {{ t.home_record_details }}
{{ t.auto_input }}
{% if status and status.progress %}{{ status.progress.source_cursor }} / {{ status.progress.source_head }}{% else %}{{ t.unknown_value }}{% endif %}
{{ t.auto_focus_point if blocked else t.auto_current_stage }}
{% if row.error %}{{ t.auto_focus_unavailable }}{% elif blocked %}{{ recorded_reason if recorded_reason else t['auto_reason_' ~ status.block.diagnostics.reason.value] if status.block.diagnostics and status.block.diagnostics.reason else t.auto_block_recorded }}{% elif execution and execution.state in ['running','queued','retry_wait'] %}{{ t['auto_focus_' ~ execution.state] }}{% elif pending %}{{ t.auto_focus_pending if status.progress and status.progress.pending_inputs else t.auto_focus_request }}{% else %}{{ t.auto_focus_caught_up }}{% endif %}
{{ t.auto_last_processing_record }}
{% if last_event_at %}{{ t['auto_time_' ~ last_event_kind] }}{% else %}{{ t.auto_no_processing_record }}{% endif %}
{{ t.auto_block_window if blocked else t.auto_consumption_window }}
{% if blocked %}({{ status.block.source_after }}, {{ status.block.target_source_through }}]{% elif status and status.progress and status.progress.pending_inputs %}({{ status.progress.source_cursor }}, {{ status.progress.source_head }}]{% else %}—{% endif %}
{% if blocked or pending or row.error %}
{{ t.auto_clue }}
{% if row.error %}{{ t.error_403 if row.error.status == 403 else t.auto_clue_read_error }}{% elif blocked %}{% if status.block.last_error_code %}{{ t.auto_clue_last_failure }} {{ t.get('auto_cause_' ~ status.block.last_error_code, t.auto_error_unknown) }}{% else %}{{ t.auto_clue_block_limit if status.block.error_code in ['window_attempt_limit','window_provider_budget_exceeded'] else t.auto_clue_block_known }}{% endif %}{% elif execution and execution.last_error_code %}{{ t.auto_clue_historical }} {{ t.get('auto_cause_' ~ execution.last_error_code,t.auto_error_unknown) }}{% elif execution %}{{ t.get('auto_clue_' ~ execution.reason, t.auto_clue_local) }}{% else %}{{ t.auto_clue_execution_unknown }}{% endif %}
{% endif %}
{{ t.auto_next_action }}
{% if row.error %}{{ t.auto_next_read_error }}{% elif blocked %}{{ t.auto_next_timeout if status.block.last_error_code in ['model_timeout','inference_timeout'] else t.auto_next_blocked }}{% elif execution and execution.state == 'retry_wait' %}{{ t.auto_next_retry }}{% elif execution and execution.state == 'running' %}{{ t.auto_next_running }}{% elif pending %}{{ t.auto_next_pending }}{% else %}{{ t.auto_next_outputs }}{% endif %}
{% if blocked or row.error or pending %}{{ t.auto_action_config }}{{ t.auto_action_diagnose }}{% else %}{{ t.auto_check_outputs }}{% endif %} {% if status %}
{{ t.auto_technical_evidence }}
{% if status.invocation %}
{{ t.auto_invocations }}
{{ t.auto_generations.format(requested=status.invocation.requested_generation, handled=status.invocation.handled_generation) }}{% if status.invocation.state == 'pending' %} · {{ t.auto_pending_request }}{% elif status.invocation.state == 'dirty' %} · {{ t.auto_execution_dirty }}{% endif %}
{% endif %} {% if status.progress and status.progress.target_source_through is not none %}
{{ t.auto_target_position }}
{{ status.progress.target_source_through }}
{% endif %}
{{ t.auto_observed_at }}
{{ status.observed_at|display_time }}
{{ t.auto_executor }}
{% if execution %}{{ t.get('auto_execution_' ~ execution.state,t.auto_unobserved) }} · {{ execution.observed_at|display_time }} · {{ t.auto_local_observation }}{% else %}{{ t.auto_unobserved }}{% endif %}
{% if execution and execution.next_check_seconds is not none %}
{{ t.auto_next_check }}
{{ execution.next_check_seconds|round|int }} {{ t.runtime_config_seconds }}
{% endif %} {% if execution and execution.last_error_code %}
{{ t.auto_previous_error }}
{{ t.get('processing_error_' ~ execution.last_error_code,t.auto_error_unknown) }}{% if execution.last_error_at %} · {{ execution.last_error_at|display_time }}{% endif %}
{% endif %} {% if blocked and status.block.diagnostics and status.block.diagnostics.stage %}
{{ t.auto_failure_stage }}
{{ t['auto_stage_' ~ status.block.diagnostics.stage.value] }}
{% endif %} {% if blocked %}
{{ t.processing_topic_attempts }}
{{ status.block.attempts }}
{% endif %}

{{ t.auto_evidence_limit }}

{% endif %}
{% endfor %}