Files
clide/lib/builtin/claude/src/transcript_publisher.dart
T
jpmschweitzerandClaude Fable 5 37f3ad0796 remove the tmux-era TranscriptPublisher class (T-385)
No production code constructed it since the stream-json pivot (D-77)
— only its own test did. The ClaudeConversation bus-addressing
constants stay; the meta sidebar and team panel host still consume
them for member-status messages. The companion finding — the team
roster surfaces listening to TeamMemberJoined events nothing emits —
is real rewiring work, split out as T-396 (drive the roster from
TeamBroker membership, then delete the ghost event types).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 02:17:37 +02:00

43 lines
1.9 KiB
Dart

/// Bus addressing for Claude conversation content (epic T-132, D-75).
///
/// The tmux-era `TranscriptPublisher` that used to live here (one reader
/// tailing a transcript, republished onto the bus) had no production
/// constructor calls after the stream-json pivot (D-77) and was removed
/// in the T-385 dead-code sweep. The [ClaudeConversation] channel/key
/// constants remain — the meta sidebar and team panel host still consume
/// them for member-status messages.
library;
import 'package:clide/builtin/claude/src/transcript_reader.dart';
/// Bus addressing for Claude conversation content.
abstract final class ClaudeConversation {
/// Publisher id under which conversation items are published.
static const publisher = 'builtin.claude';
/// Channel for the lead (or single) Claude pane's conversation.
static const leadChannel = 'conversation';
/// Per-session channel, keyed by the Claude session id (T-146) so
/// concurrent panes in one workspace don't cross-talk.
static String sessionChannel(String sessionId) => 'conversation/$sessionId';
/// Channel for a teammate's conversation (team work, T-139/T-140).
static String teammateChannel(String agentId) => 'conversation/$agentId';
/// Key under which the [ConversationItem] travels in a bus message's data.
static const itemKey = 'item';
/// Shared channel carrying each team member's live status (T-157). Every
/// message identifies its member via the `agentId` key.
static const memberStatusChannel = 'member-status';
/// Encode [status] for [agentId] as a [memberStatusChannel] message body.
static Map<String, Object?> memberStatusData(String agentId, SessionStatus status) => {
'agentId': agentId,
if (status.model != null) 'model': status.model,
if (status.permissionMode != null) 'permissionMode': status.permissionMode,
if (status.contextTokens != null) 'contextTokens': status.contextTokens,
};
}