{"type":"begin","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"}}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    SubagentToolCallEvent,\n"},"line_number":31,"absolute_offset":722,"submatches":[{"match":{"text":"ToolCallEvent"},"start":12,"end":25}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    SubagentToolResultEvent,\n"},"line_number":32,"absolute_offset":749,"submatches":[{"match":{"text":"ToolResultEvent"},"start":12,"end":27}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    TextEvent,\n"},"line_number":34,"absolute_offset":800,"submatches":[{"match":{"text":"TextEvent"},"start":4,"end":13}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    TextDeltaEvent,\n"},"line_number":35,"absolute_offset":815,"submatches":[{"match":{"text":"TextDeltaEvent"},"start":4,"end":18}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    ToolCallEvent,\n"},"line_number":39,"absolute_offset":900,"submatches":[{"match":{"text":"ToolCallEvent"},"start":4,"end":17}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    ToolCallStartEvent,\n"},"line_number":41,"absolute_offset":950,"submatches":[{"match":{"text":"ToolCallStartEvent"},"start":4,"end":22}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    ToolResultEvent,\n"},"line_number":42,"absolute_offset":974,"submatches":[{"match":{"text":"ToolResultEvent"},"start":4,"end":19}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    TextEvent,\n"},"line_number":327,"absolute_offset":9834,"submatches":[{"match":{"text":"TextEvent"},"start":4,"end":13}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    ToolCallEvent,\n"},"line_number":329,"absolute_offset":9868,"submatches":[{"match":{"text":"ToolCallEvent"},"start":4,"end":17}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    ToolResultEvent,\n"},"line_number":330,"absolute_offset":9887,"submatches":[{"match":{"text":"ToolResultEvent"},"start":4,"end":19}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        self._stream_staging: deque[HistoryEntry] = deque()\n"},"line_number":411,"absolute_offset":13183,"submatches":[{"match":{"text":"stream_staging"},"start":14,"end":28}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        self._stream_staging_flushed: list[HistoryEntry] = []\n"},"line_number":412,"absolute_offset":13243,"submatches":[{"match":{"text":"stream_staging"},"start":14,"end":28}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        self._stream_staging_spilled: bool = False\n"},"line_number":413,"absolute_offset":13305,"submatches":[{"match":{"text":"stream_staging"},"start":14,"end":28}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        self._stream_staging_version: int = 0\n"},"line_number":414,"absolute_offset":13356,"submatches":[{"match":{"text":"stream_staging"},"start":14,"end":28}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        self._stream_staging_budget_cb: Callable[[], int] = lambda: 20\n"},"line_number":415,"absolute_offset":13402,"submatches":[{"match":{"text":"stream_staging"},"start":14,"end":28}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    def set_stream_staging_budget_provider(self, provider: Callable[[], int]) -> None:\n"},"line_number":500,"absolute_offset":16457,"submatches":[{"match":{"text":"stream_staging"},"start":12,"end":26}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        self._stream_staging_budget_cb = provider\n"},"line_number":501,"absolute_offset":16544,"submatches":[{"match":{"text":"stream_staging"},"start":14,"end":28}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    def stream_staging_entries(self) -> list[HistoryEntry]:\n"},"line_number":503,"absolute_offset":16595,"submatches":[{"match":{"text":"stream_staging"},"start":8,"end":22}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        return [*self._stream_staging_flushed, *self._stream_staging]\n"},"line_number":504,"absolute_offset":16655,"submatches":[{"match":{"text":"stream_staging"},"start":23,"end":37},{"match":{"text":"stream_staging"},"start":54,"end":68}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    def stream_staging_version(self) -> int:\n"},"line_number":506,"absolute_offset":16726,"submatches":[{"match":{"text":"stream_staging"},"start":8,"end":22}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        return self._stream_staging_version\n"},"line_number":507,"absolute_offset":16771,"submatches":[{"match":{"text":"stream_staging"},"start":21,"end":35}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    def clear_flushed_stream_staging(self) -> bool:\n"},"line_number":509,"absolute_offset":16816,"submatches":[{"match":{"text":"stream_staging"},"start":22,"end":36}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        if not self._stream_staging_flushed:\n"},"line_number":510,"absolute_offset":16868,"submatches":[{"match":{"text":"stream_staging"},"start":21,"end":35}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        self._stream_staging_flushed = []\n"},"line_number":512,"absolute_offset":16938,"submatches":[{"match":{"text":"stream_staging"},"start":14,"end":28}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        self._stream_staging_version += 1\n"},"line_number":513,"absolute_offset":16980,"submatches":[{"match":{"text":"stream_staging"},"start":14,"end":28}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    def _stream_staging_budget(self) -> int:\n"},"line_number":516,"absolute_offset":17043,"submatches":[{"match":{"text":"stream_staging"},"start":9,"end":23}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"            return max(1, int(self._stream_staging_budget_cb()))\n"},"line_number":518,"absolute_offset":17101,"submatches":[{"match":{"text":"stream_staging"},"start":36,"end":50}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    def _stream_staging_line_total(self) -> int:\n"},"line_number":522,"absolute_offset":17215,"submatches":[{"match":{"text":"stream_staging"},"start":9,"end":23}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        return sum(_entry_line_count(entry) for entry in self._stream_staging)\n"},"line_number":523,"absolute_offset":17264,"submatches":[{"match":{"text":"stream_staging"},"start":63,"end":77}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        budget = self._stream_staging_budget()\n"},"line_number":526,"absolute_offset":17408,"submatches":[{"match":{"text":"stream_staging"},"start":23,"end":37}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"            self._stream_staging_spilled = True\n"},"line_number":528,"absolute_offset":17501,"submatches":[{"match":{"text":"stream_staging"},"start":18,"end":32}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"            self._stream_staging_version += 1\n"},"line_number":530,"absolute_offset":17595,"submatches":[{"match":{"text":"stream_staging"},"start":18,"end":32}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        self._stream_staging.append(entry)\n"},"line_number":533,"absolute_offset":17661,"submatches":[{"match":{"text":"stream_staging"},"start":14,"end":28}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        while len(self._stream_staging) > 1 and self._stream_staging_line_total() > budget:\n"},"line_number":534,"absolute_offset":17704,"submatches":[{"match":{"text":"stream_staging"},"start":24,"end":38},{"match":{"text":"stream_staging"},"start":54,"end":68}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"            oldest = self._stream_staging.popleft()\n"},"line_number":535,"absolute_offset":17796,"submatches":[{"match":{"text":"stream_staging"},"start":27,"end":41}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"            self._stream_staging_spilled = True\n"},"line_number":536,"absolute_offset":17848,"submatches":[{"match":{"text":"stream_staging"},"start":18,"end":32}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"            self._stream_staging_flushed.append(oldest)\n"},"line_number":538,"absolute_offset":17943,"submatches":[{"match":{"text":"stream_staging"},"start":18,"end":32}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        self._stream_staging_version += 1\n"},"line_number":539,"absolute_offset":17999,"submatches":[{"match":{"text":"stream_staging"},"start":14,"end":28}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    def _flush_stream_staging(self) -> None:\n"},"line_number":541,"absolute_offset":18042,"submatches":[{"match":{"text":"stream_staging"},"start":15,"end":29}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        self._stream_staging_spilled = False\n"},"line_number":542,"absolute_offset":18087,"submatches":[{"match":{"text":"stream_staging"},"start":14,"end":28}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        if not self._stream_staging:\n"},"line_number":543,"absolute_offset":18132,"submatches":[{"match":{"text":"stream_staging"},"start":21,"end":35}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        staged = list(self._stream_staging)\n"},"line_number":545,"absolute_offset":18188,"submatches":[{"match":{"text":"stream_staging"},"start":28,"end":42}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        self._stream_staging.clear()\n"},"line_number":546,"absolute_offset":18232,"submatches":[{"match":{"text":"stream_staging"},"start":14,"end":28}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        self._stream_staging_flushed.extend(staged)\n"},"line_number":549,"absolute_offset":18344,"submatches":[{"match":{"text":"stream_staging"},"start":14,"end":28}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        self._stream_staging_version += 1\n"},"line_number":550,"absolute_offset":18396,"submatches":[{"match":{"text":"stream_staging"},"start":14,"end":28}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        self._flush_stream_staging()\n"},"line_number":563,"absolute_offset":18853,"submatches":[{"match":{"text":"stream_staging"},"start":20,"end":34}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"    def _discard_stream_staging(self) -> None:\n"},"line_number":568,"absolute_offset":19045,"submatches":[{"match":{"text":"stream_staging"},"start":17,"end":31}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        had_content = bool(self._stream_staging)\n"},"line_number":569,"absolute_offset":19092,"submatches":[{"match":{"text":"stream_staging"},"start":33,"end":47}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        had_spill = self._stream_staging_spilled\n"},"line_number":570,"absolute_offset":19141,"submatches":[{"match":{"text":"stream_staging"},"start":26,"end":40}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        self._stream_staging.clear()\n"},"line_number":571,"absolute_offset":19190,"submatches":[{"match":{"text":"stream_staging"},"start":14,"end":28}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"lines":{"text":"        self._stream_staging_spilled = False\n"},"line_number":572,"absolute_offset":19227,"submatches":[{"match":{"text":"stream_staging"},"start":14,"end":28}]}}
{"type":"end","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/event_renderer.py"},"binary_offset":null,"stats":{"elapsed":{"secs":0,"nanos":184457,"human":"0.000184s"},"searches":1,"searches_with_match":1,"bytes_searched":19272,"bytes_printed":16343,"matched_lines":51,"matches":53}}}
{"data":{"elapsed_total":{"human":"0.001344s","nanos":1344078,"secs":0},"stats":{"bytes_printed":16343,"bytes_searched":19272,"elapsed":{"human":"0.000184s","nanos":184457,"secs":0},"matched_lines":51,"matches":53,"searches":1,"searches_with_match":1}},"type":"summary"}
