Skip to content

Add OpenAI-shaped response trace models - #181

Open
soon-dubu wants to merge 27 commits into
mainfrom
spencer/openai-shaped-trace-models
Open

Add OpenAI-shaped response trace models#181
soon-dubu wants to merge 27 commits into
mainfrom
spencer/openai-shaped-trace-models

Conversation

@soon-dubu

@soon-dubu soon-dubu commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add OpenAI-shaped Trace and generic Span[TSpanData] response models without changing runtime tracing
  • define discriminated workflow, GUI-step, control-flow, agent, and agent-action span-data models
  • support structural child spans with explicit null timestamps
  • use starting_url for agent actions so it matches GUI-step URL semantics
  • add workflow chat_input and effective input_variables, where explicit inputs override authored defaults
  • require GUI agent-step inputs to report the effective reasoning_mode
  • use user-facing GUI-step names and omit the ambiguous GUI-step description field
  • keep group_id as an optional caller-supplied cross-trace correlation identifier that is distinct from per-run request IDs
  • expose the response models from the local narada SDK; narada-pyodide is intentionally unchanged
  • centralize the tracing public surface and enforce taxonomy, statuses, validation, hierarchy, and exports with tests

Scope

This is Stage 1 only: typed response models, local SDK public exports, serialization behavior, and tests. The supported sources are GUI Agent Studio workflow traces and local Python SDK responses.

This PR does not add AgentResponse.trace, conversion adapters, trace collection, bundle validation, runtime producer changes, billing attribution, or Core/Productivity agent-action instrumentation.

Existing action_trace and workflow_trace response behavior is unchanged.

Testing

  • focused shape and public-export suites: 31 passed
  • Ruff check and format passed

Codex sibling refs

@soon-dubu
soon-dubu force-pushed the spencer/openai-shaped-trace-models branch from 1aca248 to 51a6070 Compare July 25, 2026 01:37
@soon-dubu
soon-dubu marked this pull request as draft July 25, 2026 01:38
@soon-dubu
soon-dubu marked this pull request as ready for review July 25, 2026 02:05
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/span_data.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/response_trace.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/span_data.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/span_data.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/span_data.py Outdated
Comment thread packages/narada-core/src/narada_core/tracing/span_data.py
description="Optional identifier used to correlate related traces.",
description=(
"Optional caller-supplied identifier used to correlate related traces. "
"This is distinct from per-run request identifiers."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove the per-run request identifier portion here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant