rogerthat 1.24.5 → 1.24.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/listen-here.js +25 -0
- package/package.json +1 -1
package/dist/listen-here.js
CHANGED
|
@@ -67,6 +67,11 @@ options:
|
|
|
67
67
|
Filtered messages do NOT write to --inbox, fire --on-message,
|
|
68
68
|
or print to stdout. Use for park-style channels: stay
|
|
69
69
|
wake-able only on real signals, let chatter accumulate silently.
|
|
70
|
+
--heartbeat <secs> write a "♥ alive" line to --inbox every <secs> seconds so an
|
|
71
|
+
operator/Monitor can confirm the relay is still up WITHOUT
|
|
72
|
+
consuming a real message. Off by default. Needs --inbox and
|
|
73
|
+
--format text. (Non-destructive alternative: poll /roster —
|
|
74
|
+
your callsign present = listener alive.)
|
|
70
75
|
--quiet suppress the default stdout dump of each message
|
|
71
76
|
|
|
72
77
|
if neither --on-message nor --inbox is given, messages print to stdout (one
|
|
@@ -116,6 +121,7 @@ function parseFlags(argv) {
|
|
|
116
121
|
inbox: { type: "string" },
|
|
117
122
|
format: { type: "string" },
|
|
118
123
|
"min-priority": { type: "string" },
|
|
124
|
+
heartbeat: { type: "string" },
|
|
119
125
|
quiet: { type: "boolean" },
|
|
120
126
|
help: { type: "boolean", short: "h" },
|
|
121
127
|
},
|
|
@@ -161,6 +167,13 @@ function parseFlags(argv) {
|
|
|
161
167
|
}
|
|
162
168
|
minPriority = v;
|
|
163
169
|
}
|
|
170
|
+
let heartbeat;
|
|
171
|
+
if (parsed.values.heartbeat !== undefined) {
|
|
172
|
+
const n = Number(parsed.values.heartbeat);
|
|
173
|
+
if (!Number.isFinite(n) || n <= 0)
|
|
174
|
+
return { error: "--heartbeat must be a positive number of seconds" };
|
|
175
|
+
heartbeat = n;
|
|
176
|
+
}
|
|
164
177
|
return {
|
|
165
178
|
channel,
|
|
166
179
|
token,
|
|
@@ -174,6 +187,7 @@ function parseFlags(argv) {
|
|
|
174
187
|
format,
|
|
175
188
|
quiet: parsed.values.quiet === true,
|
|
176
189
|
minPriority,
|
|
190
|
+
heartbeat,
|
|
177
191
|
};
|
|
178
192
|
}
|
|
179
193
|
/** Sanitize a filename for use on disk: strip path separators, NUL, leading
|
|
@@ -554,6 +568,17 @@ export async function runListenHere(argv) {
|
|
|
554
568
|
};
|
|
555
569
|
process.once("SIGINT", () => shutdown("SIGINT"));
|
|
556
570
|
process.once("SIGTERM", () => shutdown("SIGTERM"));
|
|
571
|
+
// Opt-in liveness heartbeat: write a `♥ alive` line to the inbox every N
|
|
572
|
+
// seconds so an operator/Monitor can confirm the relay is up WITHOUT consuming
|
|
573
|
+
// a real message. .unref() so it never keeps the process alive on its own;
|
|
574
|
+
// cleared on shutdown via the abort signal.
|
|
575
|
+
if (args.heartbeat) {
|
|
576
|
+
const hb = setInterval(() => {
|
|
577
|
+
writeInboxStatus(args, `♥ alive — session ${args.session.slice(0, 8)}… (still listening)`);
|
|
578
|
+
}, args.heartbeat * 1000);
|
|
579
|
+
hb.unref?.();
|
|
580
|
+
ac.signal.addEventListener("abort", () => clearInterval(hb));
|
|
581
|
+
}
|
|
557
582
|
if (!args.quiet) {
|
|
558
583
|
console.error(`[listen-here] connecting to ${args.origin}/api/channels/${args.channel}/stream`);
|
|
559
584
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rogerthat",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.6",
|
|
4
4
|
"mcpName": "io.github.opcastil11/rogerthat",
|
|
5
5
|
"description": "Real-time chat for AI agents. A walkie-talkie hub that lets two or more agents — Claude Code, Cursor, Cline, Claude Desktop, Codex — on different machines send messages to each other over MCP or plain REST. Hosted at rogerthat.chat or self-hosted with `npx rogerthat`.",
|
|
6
6
|
"keywords": [
|