Skip to content

feat(conversations): repeat operation_name and add the content filter on items - #191

Draft
brightsparc wants to merge 2 commits into
mainfrom
claude/ark-conversation-loading-perf-s24tp1
Draft

brightsparc wants to merge 2 commits into
mainfrom
claude/ark-conversation-loading-perf-s24tp1

Conversation

@brightsparc

@brightsparc brightsparc commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Why

GET /v1/conversations/{id}/items gains two server-side filters in introspection-org/introspection-cloud#3524 so a chat client reads only the rows it renders: a repeatable operation_name (any of) and content, a closed set of content classes resolved from a plaintext summary stamped at ingest. The export route gains the repeatable operation_name only. This SDK took operation_name as one string and had no content. Nothing is removed: this SDK never exposed /turns.

Change

  • items.list() takes operation_name as str | list[str] (a list is sent as the repeated key, any of which matches) and a content: list[str] of classes: user_text, assistant_text, delegation, tool:<name>, tool_call:<name>, tool_result:<name>. Its docstring says how the two combine.
  • export_trajectory(), export_arrow(), build_export_params() and ConversationExportParams take operation_name as str | list[str]; no content, since the export route has none.
  • IntrospectionAttributes.content: IntrospectionContent | None types the introspection.content.* summary (version, counts, tool-name arrays; never message content); exported from schemas.genai_span.
  • Sync twins regenerated with scripts/gen_sync.py.

The only type change on an existing name is the widening of operation_name from str to str | list[str]; griffe check against v0.29.1 reports no breakage.

Verification

  • ruff format, ruff check, ty check, deptry clean; jscpd 16.03 % against the 16.3 % threshold.
  • pytest tests/ 778 passed, coverage 92.4 % against the 80 % floor. New cases: repeated operation_name and content keys on the items list, a single operation_name unchanged, the typed content summary on an item, and the repeated operation_name with no content on the trajectory export.
  • griffe check introspection_sdk --search . --against v0.29.1 -e scripts/griffe_reexports.py: no breakage.

Review round

Codex: the export carried a content the server ignores. Removed in the last commit.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01Hj7wRZSdedpuVRaKkxsHuF

… on items

`items.list()`, `export_trajectory()`, `export_arrow()` and the export
params take `operation_name` as one name or a list (any of which
matches) and a `content` list of classes (`user_text`,
`assistant_text`, `delegation`, `tool:<name>`, `tool_call:<name>`,
`tool_result:<name>`), both sent as repeated query keys.
`IntrospectionAttributes.content` types the ingest-stamped
`introspection.content` summary. Sync twins regenerated.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hj7wRZSdedpuVRaKkxsHuF
The export route takes the repeated `operation_name` but no `content`,
so `export_trajectory()`, `export_arrow()`, `build_export_params()` and
`ConversationExportParams` lose the option; `items.list()` keeps it.
Sync twins regenerated.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hj7wRZSdedpuVRaKkxsHuF

This branch was successfully deployed

1 active deployment
build — 9a2061ff Deployed Oct 21, 2026 by brightsparc via Unit Tests #520
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.

2 participants