<script lang="ts">
  import { onMount } from 'svelte'
  import { startWorkspace } from '$lib/stores/workspace'
  import GoalHeader from './GoalHeader.svelte'
  import PlanProgress from './PlanProgress.svelte'
  import OperatorQuestion from './OperatorQuestion.svelte'
  import SessionGraph from './SessionGraph.svelte'
  import SessionDigest from './SessionDigest.svelte'

  onMount(() => startWorkspace())
</script>

<!--
  The task's live control panel: goal + status, plan progress, a pinned
  question when the agent needs a decision, the live entity graph (pulses what
  the agent is touching, flags health changes), and the outcome/knowledge
  record once the task completes. Driven by the always-on events stream
  (see workspace.ts) so it keeps updating during server-side auto-continuation,
  not just while a chat turn is streaming.
-->
<div class="flex h-full min-h-0 flex-col">
  <GoalHeader />
  <PlanProgress />
  <OperatorQuestion />
  <div class="min-h-0 flex-1">
    <SessionGraph />
  </div>
  <SessionDigest />
</div>
