GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(harness): thread created_at through UnifiedEmitter.auto_send_tur… · scaleapi/scale-agentex-python@b4b8b33

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/agentex/lib/core/harness
    • emitter.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/agentex/lib/core/harness/emitter.py‎

Copy file name to clipboardExpand all lines: src/agentex/lib/core/harness/emitter.py
+9-2Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import annotations
44

55
from typing import AsyncGenerator
6+
from datetime import datetime
67

78
from agentex.lib.core.harness.types import TurnResult, HarnessTurn, StreamTaskMessage
89
from agentex.lib.core.harness.tracer import SpanTracer
@@ -56,12 +57,18 @@ async def yield_turn(self, turn: HarnessTurn) -> AsyncGenerator[StreamTaskMessag
5657
async for event in yield_events(turn.events, tracer=self.tracer):
5758
yield event
5859

59-
async def auto_send_turn(self, turn: HarnessTurn) -> TurnResult:
60-
"""Async/temporal delivery: push to the task stream, return TurnResult."""
60+
async def auto_send_turn(self, turn: HarnessTurn, created_at: datetime | None = None) -> TurnResult:
61+
"""Async/temporal delivery: push to the task stream, return TurnResult.
62+
63+
Pass `created_at` (e.g. `workflow.now()` under Temporal) to stamp the
64+
turn's messages with a deterministic timestamp; it is forwarded to the
65+
streaming contexts. Default None preserves server-side timestamps.
66+
"""
6167
return await auto_send(
6268
turn.events,
6369
task_id=self.task_id,
6470
tracer=self.tracer,
6571
streaming=self._streaming,
6672
usage=turn.usage(),
73+
created_at=created_at,
6774
)

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.