Skip to content

Commit 8f23cc3

Browse files
committed
feat(bridge): populate meta.streamingBehavior on Claude Code channel notifications
Extract hint from delivery event and set meta.streamingBehavior on the channel notification params. Content prefix ([STEER]/[FOLLOWUP]) is applied via formatDeliveryEvent. Update tool description to mention the field.
1 parent 64be6af commit 8f23cc3

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/bridges/claude-code/channel.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
CommsTool,
1818
buildAction,
1919
ensureRegistered,
20+
extractStreamingBehavior,
2021
formatDeliveryEvent,
2122
MCP_TOOL_PARAMS,
2223
} from "../../core/index.js";
@@ -49,9 +50,13 @@ export async function run(): Promise<void> {
4950
// Incoming messages arrive via TCP mesh — push as channel notifications
5051
store.onDelivery = async (_targetId: string, event) => {
5152
const line = formatDeliveryEvent(event);
53+
const hint = extractStreamingBehavior(event);
5254
await mcp.server.notification({
5355
method: "notifications/claude/channel",
54-
params: { content: line, meta: {} },
56+
params: {
57+
content: line,
58+
meta: { streamingBehavior: hint ?? "info" },
59+
},
5560
});
5661
};
5762

@@ -67,6 +72,7 @@ export async function run(): Promise<void> {
6772
"register, update, whoami, create_room, list_rooms, join_room, leave_room,",
6873
"send, dm, list_agents, read_room, invite, decline_invite, kick, destroy_room.",
6974
'Incoming messages appear as <channel source="agent-comms"> events.',
75+
"Use streamingBehavior on send/dm: steer (act now), followUp (act when idle), info (whenever, default).",
7076
].join(" "),
7177
inputSchema: MCP_TOOL_PARAMS,
7278
},

0 commit comments

Comments
 (0)