Skip to content

feat(chat): realtime session-activity signals (Phase 3)#6

Merged
maksymhryzodub-prog merged 1 commit into
mainfrom
feat/chat-history
Jul 16, 2026
Merged

feat(chat): realtime session-activity signals (Phase 3)#6
maksymhryzodub-prog merged 1 commit into
mainfrom
feat/chat-history

Conversation

@maksymhryzodub-prog

Copy link
Copy Markdown
Contributor

Companion to the ranch chat-history feature. Reports every persisted user/assistant
turn to the Bridle hub so the ranch chat index updates live, without waiting for the
S3 reconcile interval. The runtime stays host-agnostic (no DB dependency).

Changes

  • IActivityReporter port in agent/session; SessionService.append emits a
    SessionActivity (user/assistant only, non-internal, non-transient) via a reporter
    wired at the composition root.
  • BridleRepository.reportActivity emits session_activity over the always-on
    agent↔hub socket (no-op when disconnected — reconcile is the safety net); routed via
    ChannelGateway / ChannelModule.
  • Tag synthetic loop-control events (continuation prompts + pre-cutoff partial assistant
    chunks) with data.transient=true so they're excluded from both the activity signal
    and the transcript reader (fix 8).
  • Version → 0.27.0.

Behavior / risk

Purely additive. No-op when bridle isn't connected; the append path is fire-and-forget
(wrapped in try/catch). No change to persistence or existing channels.

Verification

  • tsc clean; new session activity-emit spec (emits for user/assistant; skips
    tool/internal/transient); full runtime suite (73) green.
  • Live e2e: runtime connected to a local hub → session_activity reaches the ranch
    handler → chat index updates without Sync.

Report every persisted user/assistant turn to the hub so the ranch chat
index updates live, without waiting for the S3 reconcile interval.

- IActivityReporter port in agent/session; SessionService.append emits a
  SessionActivity (user/assistant only, non-internal, non-transient) via a
  reporter wired at the composition root to the bridle socket transport.
- BridleRepository.reportActivity emits `session_activity` over the always-on
  agent-hub socket (no-op when disconnected); routed through
  ChannelGateway / ChannelModule.
- Tag synthetic loop-control events (continuation prompts + pre-cutoff partial
  assistant chunks) with data.transient=true (fix 8) so they're excluded from
  both the activity signal and the transcript reader.
- v0.27.0 + session activity-emit spec.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@maksymhryzodub-prog maksymhryzodub-prog merged commit a021951 into main Jul 16, 2026
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