Skip to content

Commit c86456a

Browse files
Antigravity Agentclaude
andcommitted
fix(agent): TRI branding + emojis in Telegram messages
Rename ralph → TRI (uppercase) in all Telegram messages. Add emojis: 🤖 WAKE, 📋 Issues, 🧠 Spawning, ✅ done, ❌ FAILED, 😴 Sleep. Remove HTML parse_mode — plain text renders better in Telegram. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 89b0d7c commit c86456a

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

tools/mcp/trinity_mcp/agent/agent_loop.zig

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ pub fn run(allocator: std.mem.Allocator, config: Config) !void {
4545

4646
// Telegram: announce wake
4747
var tg_buf: [512]u8 = undefined;
48-
telegram.sendFmt(config.tg_config, &tg_buf, "\xf0\x9f\xa4\x96 tri WAKE #{d}", .{wake_count});
48+
telegram.sendFmt(config.tg_config, &tg_buf, "\xf0\x9f\xa4\x96 TRI WAKE #{d}", .{wake_count});
4949

5050
if (config.max_wakes > 0 and wake_count > config.max_wakes) {
5151
log("Max wakes ({d}) reached. Exiting.", .{config.max_wakes});
52-
telegram.send(config.tg_config, "\xf0\x9f\x9b\x91 tri Max wakes reached.");
52+
telegram.send(config.tg_config, "\xf0\x9f\x9b\x91 TRI Max wakes reached.");
5353
break;
5454
}
5555

@@ -73,14 +73,14 @@ pub fn run(allocator: std.mem.Allocator, config: Config) !void {
7373

7474
if (issues_json == null) {
7575
log("No pending issues or GitHub API unavailable. Sleeping.", .{});
76-
telegram.send(config.tg_config, "\xf0\x9f\x98\xb4 tri No issues. Sleeping.");
76+
telegram.send(config.tg_config, "\xf0\x9f\x98\xb4 TRI No issues. Sleeping.");
7777
if (config.single_shot) break;
7878
std.Thread.sleep(config.sleep_interval_s * std.time.ns_per_s);
7979
continue;
8080
}
8181

8282
// Telegram: issues found
83-
telegram.sendFmt(config.tg_config, &tg_buf, "\xf0\x9f\x93\x8b tri Issues found, building context...", .{});
83+
telegram.sendFmt(config.tg_config, &tg_buf, "\xf0\x9f\x93\x8b TRI Issues found, building context...", .{});
8484

8585
// Read current state
8686
const current_issue = state.read("current_issue");
@@ -105,7 +105,7 @@ pub fn run(allocator: std.mem.Allocator, config: Config) !void {
105105
const use_continue = wake_count > 1;
106106

107107
// Telegram: spawning Claude
108-
telegram.sendFmt(config.tg_config, &tg_buf, "\xf0\x9f\xa7\xa0 tri Spawning Claude ({d}b, {s})...", .{
108+
telegram.sendFmt(config.tg_config, &tg_buf, "\xf0\x9f\xa7\xa0 TRI Spawning Claude ({d}b, {s})...", .{
109109
prompt.len,
110110
if (use_continue) "--continue" else "new session",
111111
});
@@ -119,7 +119,7 @@ pub fn run(allocator: std.mem.Allocator, config: Config) !void {
119119
use_continue,
120120
) catch |err| {
121121
log("Claude spawn error: {s}", .{@errorName(err)});
122-
telegram.sendFmt(config.tg_config, &tg_buf, "\xe2\x9d\x8c tri Claude spawn FAILED: {s}", .{@errorName(err)});
122+
telegram.sendFmt(config.tg_config, &tg_buf, "\xe2\x9d\x8c TRI Claude spawn FAILED: {s}", .{@errorName(err)});
123123
if (config.single_shot) break;
124124
std.Thread.sleep(config.sleep_interval_s * std.time.ns_per_s);
125125
continue;
@@ -130,9 +130,9 @@ pub fn run(allocator: std.mem.Allocator, config: Config) !void {
130130

131131
// Telegram: Claude finished
132132
if (result.exit_code == 0) {
133-
telegram.sendFmt(config.tg_config, &tg_buf, "\xe2\x9c\x85 tri Claude done ({d}b)", .{result.stdout.len});
133+
telegram.sendFmt(config.tg_config, &tg_buf, "\xe2\x9c\x85 TRI Claude done ({d}b)", .{result.stdout.len});
134134
} else {
135-
telegram.sendFmt(config.tg_config, &tg_buf, "\xe2\x9a\xa0\xef\xb8\x8f tri exit={d} ({d}b)", .{ result.exit_code, result.stdout.len });
135+
telegram.sendFmt(config.tg_config, &tg_buf, "\xe2\x9a\xa0\xef\xb8\x8f TRI exit={d} ({d}b)", .{ result.exit_code, result.stdout.len });
136136
}
137137

138138
// Save session log
@@ -146,12 +146,12 @@ pub fn run(allocator: std.mem.Allocator, config: Config) !void {
146146

147147
if (config.single_shot) {
148148
log("Single-shot mode. Exiting.", .{});
149-
telegram.send(config.tg_config, "\xf0\x9f\x8f\x81 tri Done.");
149+
telegram.send(config.tg_config, "\xf0\x9f\x8f\x81 TRI Done.");
150150
break;
151151
}
152152

153153
log("Sleeping for {d}s...", .{config.sleep_interval_s});
154-
telegram.sendFmt(config.tg_config, &tg_buf, "\xf0\x9f\x98\xb4 tri Sleeping {d}s...", .{config.sleep_interval_s});
154+
telegram.sendFmt(config.tg_config, &tg_buf, "\xf0\x9f\x98\xb4 TRI Sleeping {d}s...", .{config.sleep_interval_s});
155155
std.Thread.sleep(config.sleep_interval_s * std.time.ns_per_s);
156156
}
157157

tools/mcp/trinity_mcp/agent/ralph_hook.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ pub fn main() !void {
4545
else if (std.mem.eql(u8, event, "PreToolUse"))
4646
std.fmt.bufPrint(&buf, "\xf0\x9f\x94\xa7 {s}...", .{truncate(tool, 40)}) catch return
4747
else if (std.mem.eql(u8, event, "Stop"))
48-
std.fmt.bufPrint(&buf, "\xf0\x9f\x98\xb4 tri Session finished", .{}) catch return
48+
std.fmt.bufPrint(&buf, "\xf0\x9f\x98\xb4 TRI Session finished", .{}) catch return
4949
else if (std.mem.eql(u8, event, "SessionStart"))
50-
std.fmt.bufPrint(&buf, "\xf0\x9f\xa4\x96 tri Session started", .{}) catch return
50+
std.fmt.bufPrint(&buf, "\xf0\x9f\xa4\x96 TRI Session started", .{}) catch return
5151
else
5252
return; // Unknown event, skip
5353

0 commit comments

Comments
 (0)