Skip to content

feat(session): render native session_records (transcript + lifecycle)#48

Merged
hbrooks merged 2 commits into
mainfrom
feat/native-session-records
Jul 16, 2026
Merged

feat(session): render native session_records (transcript + lifecycle)#48
hbrooks merged 2 commits into
mainfrom
feat/native-session-records

Conversation

@hbrooks

@hbrooks hbrooks commented Jul 16, 2026

Copy link
Copy Markdown
Member

Moves the CLI onto native session_records — the backend /v1/sessions/{id}/steps now returns records (transcript + lifecycle), not the legacy AgentStep shape (Ellipsis harness-general session model, phase 2).

  • types: AgentStep → SessionRecord (source/record_type/payload + feed_seq/stream_seq); response field steps → records.
  • steps/events: recordText + lifecycleText + recordToItems() switch on source (claude_code → eventToItems on payload; lifecycle → a dim notice line).
  • connect/ConnectApp: committed-transcript cursor is now feed_seq (lifecycle records carry a negative per-execution stream_seq, so the old step-index cursor would drop them).

So agent session connect / session steps show spawn/respawn/idle lifecycle events inline. typecheck + 225 tests + build green.

Coordinated with the backend /v1 cutover; release right after that deploys.

hbrooks added 2 commits July 16, 2026 11:09
Add a maintainers section to the ellipsis skill covering how the CLI is
released: Homebrew-tap-only distribution (never npm), the tag-triggered
release.yml automation, and the manual bump/commit/tag steps. Records
that package.json is the version source of truth and the tag must match.
The backend /v1/sessions/{id}/steps now returns native session_records instead
of the legacy AgentStep shape (harness-general session model, phase 2). Move the
CLI onto records:

- types: AgentStep -> SessionRecord (source/record_type/record_format/payload +
  feed_seq/stream_seq); ListSessionStepsResponse.steps -> records. Add
  RecordSource/LifecycleRecordType.
- steps.ts: stepText -> recordText (reads payload); lifecycleText() maps a
  lifecycle record_type to a human line; formatStepLine uses stream_seq +
  record_type and renders lifecycle records.
- events.ts: recordToItems() switches on source — claude_code -> eventToItems on
  the payload; lifecycle -> a dim notice line. eventToItems unchanged.
- connect + ConnectApp: the committed-transcript cursor is now feed_seq (the
  shared transcript+lifecycle order), not the per-execution step index — a
  lifecycle record's stream_seq is negative, so a step-index cursor would drop
  it. Renders each record via recordToItems.

So `agent session connect` / `session steps` now show spawn/respawn/idle
lifecycle events inline. typecheck + 225 tests + build green.
@hbrooks
hbrooks merged commit 3fad15f into main Jul 16, 2026
1 check failed
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