@blunking/codexlink 0.1.14 → 0.1.15

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/README.md CHANGED
@@ -256,7 +256,13 @@ Allowed Chat ID(s) are no longer typed by hand. To pair a different chat or grou
256
256
  blun-codex telegram-setup
257
257
  ```
258
258
 
259
- If something is missing later, `blun-codex telegram-doctor` tells you exactly what is missing and what to run next.
259
+ If something is missing later, `blun-codex telegram-doctor` tells you exactly what is missing and what to run next.
260
+
261
+ Inbound Telegram messages are mirrored into the visible Codex console by default,
262
+ so the operator can see that the message arrived. Queue summaries and outbound
263
+ reply notices stay out of the console to avoid input-line spam. Set
264
+ `BLUN_TELEGRAM_CONSOLE_UI_NOTICES=off` to disable console mirroring, or `all` to
265
+ also mirror outbound notices for debugging.
260
266
 
261
267
  ## Notes
262
268
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blunking/codexlink",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "BLUN CLI launcher with Telegram channel support for one visible session.",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -1906,7 +1906,7 @@ async function sendOutboundChunks(config, state, options) {
1906
1906
  } else if (chatType === "private" && user) {
1907
1907
  label = `Antwort an ${user}`;
1908
1908
  }
1909
- state.lastUiNotice = {
1909
+ state.lastOutboundUiNotice = {
1910
1910
  ts: nowIso(),
1911
1911
  kind: "outbound",
1912
1912
  text: `${label}: ${preview}`
@@ -131,11 +131,17 @@ public static class BlunEmbeddedQueueTitleWatcher
131
131
 
132
132
  try
133
133
  {
134
- var enabled = Environment.GetEnvironmentVariable("BLUN_TELEGRAM_CONSOLE_UI_NOTICES");
135
- if (string.Equals(enabled, "1", StringComparison.OrdinalIgnoreCase)
136
- || string.Equals(enabled, "true", StringComparison.OrdinalIgnoreCase)
137
- || string.Equals(enabled, "yes", StringComparison.OrdinalIgnoreCase)
138
- || string.Equals(enabled, "on", StringComparison.OrdinalIgnoreCase))
134
+ var mode = Environment.GetEnvironmentVariable("BLUN_TELEGRAM_CONSOLE_UI_NOTICES") ?? "";
135
+ var disabled = string.Equals(mode, "0", StringComparison.OrdinalIgnoreCase)
136
+ || string.Equals(mode, "false", StringComparison.OrdinalIgnoreCase)
137
+ || string.Equals(mode, "no", StringComparison.OrdinalIgnoreCase)
138
+ || string.Equals(mode, "off", StringComparison.OrdinalIgnoreCase);
139
+ var allowAll = string.Equals(mode, "all", StringComparison.OrdinalIgnoreCase)
140
+ || string.Equals(mode, "1", StringComparison.OrdinalIgnoreCase)
141
+ || string.Equals(mode, "true", StringComparison.OrdinalIgnoreCase)
142
+ || string.Equals(mode, "yes", StringComparison.OrdinalIgnoreCase)
143
+ || string.Equals(mode, "on", StringComparison.OrdinalIgnoreCase);
144
+ if (!disabled && (allowAll || string.Equals(normalizedKind, "inbound", StringComparison.OrdinalIgnoreCase)))
139
145
  {
140
146
  Console.WriteLine("");
141
147
  Console.WriteLine("[Telegram] " + normalized);
@@ -273,10 +273,11 @@ function Write-ConsoleUiNotice {
273
273
  [string]$Kind,
274
274
  [string]$Notice
275
275
  )
276
- if ($env:BLUN_TELEGRAM_CONSOLE_UI_NOTICES -ne "1" -and
277
- $env:BLUN_TELEGRAM_CONSOLE_UI_NOTICES -ine "true" -and
278
- $env:BLUN_TELEGRAM_CONSOLE_UI_NOTICES -ine "yes" -and
279
- $env:BLUN_TELEGRAM_CONSOLE_UI_NOTICES -ine "on") {
276
+ $mode = [string]$env:BLUN_TELEGRAM_CONSOLE_UI_NOTICES
277
+ $disabled = $mode -eq "0" -or $mode -ieq "false" -or $mode -ieq "no" -or $mode -ieq "off"
278
+ $allowAll = $mode -ieq "all" -or $mode -eq "1" -or $mode -ieq "true" -or $mode -ieq "yes" -or $mode -ieq "on"
279
+ $isInbound = [string]::Equals($Kind, "inbound", [System.StringComparison]::OrdinalIgnoreCase)
280
+ if ($disabled -or (-not $allowAll -and -not $isInbound)) {
280
281
  return $false
281
282
  }
282
283
  try {