Skip to content

Commit 9afdd72

Browse files
committed
Fix directory structure
1 parent 7c33427 commit 9afdd72

File tree

9 files changed

+69
-11
lines changed

9 files changed

+69
-11
lines changed

src/agentex/lib/core/temporal/plugins/openai_agents/__init__.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,23 @@
5151
- No forked plugin required - uses standard OpenAIAgentsPlugin
5252
"""
5353

54-
from agentex.lib.core.temporal.plugins.openai_agents.streaming_model import (
54+
from agentex.lib.core.temporal.plugins.openai_agents.models.streaming_model import (
5555
StreamingModel,
5656
StreamingModelProvider,
5757
)
58-
# Import TracingModelProvider from the adk providers module
59-
from agentex.lib.adk.providers._modules.temporal_tracing import (
58+
from agentex.lib.core.temporal.plugins.openai_agents.models.tracing_model import (
6059
TracingModelProvider,
6160
)
62-
from agentex.lib.core.temporal.plugins.openai_agents.context_interceptor import (
61+
from agentex.lib.core.temporal.plugins.openai_agents.interceptors.context_interceptor import (
6362
ContextInterceptor,
6463
streaming_task_id,
6564
streaming_trace_id,
6665
streaming_parent_span_id,
6766
)
68-
from agentex.lib.core.temporal.plugins.openai_agents.hooks import (
67+
from agentex.lib.core.temporal.plugins.openai_agents.hooks.hooks import (
6968
TemporalStreamingHooks,
7069
)
71-
from agentex.lib.core.temporal.plugins.openai_agents.activities import (
70+
from agentex.lib.core.temporal.plugins.openai_agents.hooks.activities import (
7271
stream_lifecycle_content,
7372
)
7473

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""Temporal streaming hooks and activities for OpenAI Agents SDK.
2+
3+
This module provides hooks for streaming agent lifecycle events and
4+
activities for streaming content to the AgentEx UI.
5+
"""
6+
7+
from agentex.lib.core.temporal.plugins.openai_agents.hooks.hooks import (
8+
TemporalStreamingHooks,
9+
)
10+
from agentex.lib.core.temporal.plugins.openai_agents.hooks.activities import (
11+
stream_lifecycle_content,
12+
)
13+
14+
__all__ = [
15+
"TemporalStreamingHooks",
16+
"stream_lifecycle_content",
17+
]

src/agentex/lib/core/temporal/plugins/openai_agents/hooks.py renamed to src/agentex/lib/core/temporal/plugins/openai_agents/hooks/hooks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
from agentex.types.text_content import TextContent
1515
from agentex.types.task_message_content import ToolRequestContent, ToolResponseContent
16-
from agentex.lib.core.temporal.plugins.openai_agents.activities import stream_lifecycle_content
16+
from agentex.lib.core.temporal.plugins.openai_agents.hooks.activities import stream_lifecycle_content
1717

1818

1919
class TemporalStreamingHooks(RunHooks):
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""Temporal interceptors for OpenAI Agents SDK integration.
2+
3+
This module provides interceptors for threading context (task_id, trace_id, parent_span_id)
4+
from workflows to activities in Temporal.
5+
"""
6+
7+
from agentex.lib.core.temporal.plugins.openai_agents.interceptors.context_interceptor import (
8+
ContextInterceptor,
9+
streaming_task_id,
10+
streaming_trace_id,
11+
streaming_parent_span_id,
12+
)
13+
14+
__all__ = [
15+
"ContextInterceptor",
16+
"streaming_task_id",
17+
"streaming_trace_id",
18+
"streaming_parent_span_id",
19+
]
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
"""Model providers for Temporal OpenAI Agents SDK integration.
2+
3+
This module provides model implementations that add streaming and tracing
4+
capabilities to standard OpenAI models when running in Temporal workflows/activities.
5+
"""
6+
7+
from agentex.lib.core.temporal.plugins.openai_agents.models.streaming_model import (
8+
StreamingModel,
9+
StreamingModelProvider,
10+
)
11+
from agentex.lib.core.temporal.plugins.openai_agents.models.tracing_model import (
12+
TracingModelProvider,
13+
TracingResponsesModel,
14+
TracingChatCompletionsModel,
15+
)
16+
17+
__all__ = [
18+
"StreamingModel",
19+
"StreamingModelProvider",
20+
"TracingModelProvider",
21+
"TracingResponsesModel",
22+
"TracingChatCompletionsModel",
23+
]

src/agentex/lib/core/temporal/plugins/openai_agents/streaming_model.py renamed to src/agentex/lib/core/temporal/plugins/openai_agents/models/streaming_model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@
5959
from agentex.types.task_message_delta import ReasoningSummaryDelta, TextDelta, ReasoningContentDelta
6060
from agentex.types.task_message_content import TextContent, ReasoningContent
6161
from agentex.types.task_message_update import StreamTaskMessageDelta, StreamTaskMessageFull
62-
from agentex.lib.core.temporal.plugins.openai_agents.context_interceptor import streaming_task_id
63-
from agentex.lib.core.temporal.plugins.openai_agents.context_interceptor import streaming_trace_id
64-
from agentex.lib.core.temporal.plugins.openai_agents.context_interceptor import streaming_parent_span_id
62+
from agentex.lib.core.temporal.plugins.openai_agents.interceptors.context_interceptor import streaming_task_id
63+
from agentex.lib.core.temporal.plugins.openai_agents.interceptors.context_interceptor import streaming_trace_id
64+
from agentex.lib.core.temporal.plugins.openai_agents.interceptors.context_interceptor import streaming_parent_span_id
6565
# Create logger for this module
6666
logger = logging.getLogger("agentex.temporal.streaming")
6767

src/agentex/lib/adk/providers/_modules/temporal_tracing.py renamed to src/agentex/lib/core/temporal/plugins/openai_agents/models/tracing_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from agentex.lib.core.tracing.tracer import AsyncTracer
3535

3636
# Import context variables from the interceptor
37-
from agentex.lib.core.temporal.plugins.openai_agents.context_interceptor import (
37+
from agentex.lib.core.temporal.plugins.openai_agents.interceptors.context_interceptor import (
3838
streaming_task_id,
3939
streaming_trace_id,
4040
streaming_parent_span_id,

0 commit comments

Comments
 (0)