Commit Graph

2182 Commits

Author SHA1 Message Date
Peter Steinberger ac28f4d558 fix: release channel delivery resources reliably (#117855)
* fix(channels): consolidate delivery lifecycle ownership

* test(msteams): match release mock contract

* test(plugin-sdk): satisfy promise executor lint

* chore(plugin-sdk): regenerate API baseline for delivery-correlation + fetch-runtime exports
2026-08-02 00:24:47 -07:00
Peter Steinberger 7068bc2ffe fix(telegram): serialize approval ingress sessions (#117861)
* fix(telegram): serialize approval ingress sessions

* fix(telegram): narrow approval session tuples

* fix(ingress): return lane reconciliation result

---------

Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-08-01 23:57:31 -07:00
Peter Steinberger 523907b5ec fix(telegram): retain every message in multipart delivery receipts (#117863) 2026-08-01 23:37:41 -07:00
Peter Steinberger d1372b9abd test(telegram): consolidate inbound cache fixtures (#117844) 2026-08-01 23:07:53 -07:00
Peter Steinberger a9662914b0 fix(telegram): reject unauthorized command media before any download (#117821)
* fix(telegram): reject unauthorized command media before download

* fix(telegram): reject all unauthorized command media before download
2026-08-01 23:00:25 -07:00
Peter Steinberger 59a6abd065 test: consolidate embedded agent and channel suites (#117826)
* test: consolidate embedded agent and channel suites

* test: type reply reconciliation table rows

* test: preserve raw telegram config fixture
2026-08-01 22:14:32 -07:00
Peter Steinberger 846bef946d fix(channels): tighten probe and delivery lifecycles (#117812)
* fix(channels): tighten probe and delivery lifecycles

* test(zalo): type probe fetch mocks
2026-08-01 22:12:24 -07:00
Peter Steinberger ceb8a8b3a1 fix(telegram): preserve transient getFile responses when retrying media (#117798)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-08-01 22:11:26 -07:00
Peter Steinberger e98fdeefdf refactor(errors): consolidate message formatting (#117818) 2026-08-01 22:05:49 -07:00
Peter Steinberger aadbb00f2c fix(telegram): apply group media policy before inbound downloads (#117537)
* fix(telegram): apply group media policy before inbound downloads

* test(telegram): consolidate inbound media owner regression matrix

* fix(telegram): format media group ingest

* test(telegram): restore media group policy coverage

---------

Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-08-01 20:31:21 -07:00
Vincent Koc 5327965541 perf(telegram): isolate migration persistence metadata (#117759) 2026-08-02 11:19:07 +08:00
Peter Steinberger 28e681c92f fix(channels): preserve workspace media access in gateway sends (#117711) 2026-08-01 18:09:17 -07:00
Peter Steinberger 568ea29d2e refactor(plugins): inherit shared package boundary settings (#117474) 2026-08-01 09:11:09 -07:00
weiqinl ba2827f706 fix(telegram): use Array.from instead of spread for code point length validation (#111443) 2026-08-01 08:33:12 -07:00
Vincent Koc f5a8cb02ea test(release): repair full validation regressions (#116931)
* test(discord): mock thread delete listener

* test(qa): expect blocked update evidence

* test(telegram): preserve recovered context body

* fix(test): configure kitchen-sink personality

* test(browser): expect canonical staged upload paths

* test(browser): canonicalize macOS download roots

* test(feishu): seed legacy session rows offline

* test(telegram): isolate message context session stores

* test(qqbot): expect canonical media paths

* test(anthropic): match canonical transcript paths

* test(qa): expect canonical session store keys

* test(gateway): isolate rewind media reads

* test(release): review plugin child spawns

* test(plugins): expect process-stable manifest metadata

* test(google): retire usage telemetry contracts
2026-08-01 15:42:50 +08:00
Peter Steinberger 08fc4f5a06 fix(telegram): hide disabled send actions from discovery (#117241)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-08-01 00:15:17 -07:00
Jason (Json) a0fe02a6dc fix(telegram): confirm polling before long poll (#116970) 2026-07-31 21:11:00 -06:00
Peter Steinberger 9e4381eb1c refactor(channels): unify bundled channel setup contracts (#117106)
* refactor(channels): canonicalize bundled setup contracts

* test(matrix): use scoped environment fixtures
2026-07-31 16:57:29 -07:00
Peter Steinberger b8b4a11b38 refactor(telegram): unify outbound media delivery (#117102) 2026-07-31 16:46:22 -07:00
Peter Steinberger 510ace0fbb fix(telegram): avoid polling stalls from full thread-binding rewrites (#117081)
* fix(telegram): avoid rewriting every thread binding on activity

* test(telegram): satisfy thread-binding unbind contract
2026-07-31 16:22:33 -07:00
Jason (Json) 2a56ce9ad5 fix(telegram): bound ingress worker shutdown (#116978) 2026-07-31 16:26:39 -06:00
Peter Steinberger 745b9a9ca9 fix(telegram): canonicalize topic mutation targets (#117001)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 12:41:48 -07:00
Peter Steinberger be93d44275 fix(telegram): preserve explicit empty media captions (#116984)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 11:46:34 -07:00
Peter Steinberger 4996474178 fix(telegram): preserve outbound media metadata and rejected photos (#116886)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 09:33:27 -07:00
Peter Steinberger de5ab5e1d4 fix(telegram): preserve inbound polls and batched text entities (#116898)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 08:52:37 -07:00
Peter Steinberger 77b3667757 fix(telegram): budget media captions by visible text (#116892)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 08:11:55 -07:00
Vincent Koc b45ca07ec9 fix(ci): keep full release validation aligned with runtime state (#116653)
Align Telegram artifact reuse and packaged Docker validation with current GitHub Actions and runtime state contracts. Refresh affected regression fixtures and isolate test state.
2026-07-31 23:03:02 +08:00
Peter Steinberger 146bb513e8 fix(telegram): preserve album captions and topic-aware media retries (#116827)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 05:36:46 -07:00
Peter Steinberger b9e55935f8 fix(telegram): preserve edit previews, message cache, and group history (#116818)
* test(telegram): cover edited message preview and cache ownership

* fix(telegram): preserve edit previews and refresh message context

* fix(telegram): keep edited messages out of new group history

---------

Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 05:13:01 -07:00
Peter Steinberger 1a0fde18d6 fix(commands): validate native settings and preserve Telegram ingress outcomes (#116773)
* fix(commands): validate native directives and preserve Telegram outcomes

* test(commands): isolate native directive fast runtime

---------

Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 04:36:54 -07:00
Peter Steinberger 1f578f0e65 fix(telegram): validate native queue arguments before fallback (#116726)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 02:45:15 -07:00
Peter Steinberger f03dc9785e fix(telegram): keep typing alive during active steered tasks (#116721) 2026-07-31 02:14:19 -07:00
Yuval Dinodia 589a914328 fix(session): preserve reset message payloads (#116195)
* fix(session): preserve reset message payloads

Use the raw command body when it directly matches a reset trigger so code, logs, bracketed text, and line breaks reach the new session intact. Keep structural normalization only for prefixed messages that require it to match.

* fix(session): anchor reset payloads to original input

* fix(session): anchor reset parsing to inbound projections

* fix(session): keep reset result type internal

* test(qa): prove reset payload preservation

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-31 15:34:23 +08:00
Ayaan Zaidi c2c4f0b6b7 fix(telegram): keep queued tool progress in one message (#116685)
* fix(telegram): keep queued tool progress in one message

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-07-31 15:40:21 +09:00
Josh Lehman 2bc694614f fix(telegram): make Codex login codes copyable (#116608) 2026-07-30 22:51:00 -07:00
Ayaan Zaidi c4b82609b7 fix(agents): compare shell tool names case-insensitively and stop re-parsing tool labels
Progress-draft lines recovered their detail by string-slicing the label formatToolAggregate had just rendered, and three sites decided "is this a shell tool?" against lowercase spellings only. The Claude CLI sends "Bash", so those checks missed, the slice returned nothing, and every CLI tool call rendered a line with no detail: Telegram printed the icon twice and the tool-summary payload could no longer merge, leaving a second id-less line per call.

formatToolAggregateParts now returns the label with the detail it composed, so a line cannot disagree with its own text, and one predicate owns the shell question across all four sites. Proven live on the Claude CLI backend: two lines with a doubled icon became one.
2026-07-30 19:52:08 +09:00
pash-openai e52354ea13 fix(build): pin typebox to a published release (#116333) 2026-07-30 09:58:51 +00:00
Ayaan Zaidi 21d3533460 fix(channels): ack mentions in groups that do not require them
The group-mentions ack gate returned false whenever a group did not require mentions, conflating group policy with whether this message mentioned the agent. Under the default scope, mentioning the agent in a group configured to answer everything produced no ack at all, so the user had no signal the turn was picked up until the reply arrived.

Behavior change on a default path: those groups now show the 👀 ack (and the lifecycle status reactions when messages.statusReactions.enabled is true) on mentions. Mention-required groups, group-all, unmentioned messages, and off/none are unchanged. The gate no longer reads requireMention, so the parameter is gone from the shared type and all channel call sites.

Proven live on Telegram across three configurations, including a no-mention control confirming group-mentions did not become group-all.
2026-07-30 17:58:46 +09:00
Ayaan Zaidi c63241d3ce fix(channels): resolve tool progress against the caller's stream mode
resolveChannelStreamingPreviewToolProgress guessed a mode when streaming.mode
was unset, so it could never be right for every channel: guessing "partial"
dropped Discord and Telegram's explicit progress.toolProgress opt-out, and my
earlier switch to "progress" broke it the other way for Slack, Mattermost, and
Teams, whose real default is partial. With both keys configured and disagreeing,
the wrong one won.

The helper has no channel identity, so it stops guessing and takes the mode the
caller already resolved. All nine call sites pass theirs. Omitting it keeps the
previous configured-mode reading, so untouched callers behave exactly as before.

Reported by ClawSweeper on #116143.
2026-07-30 13:36:21 +09:00
Ayaan Zaidi 06aa81a73f fix(channels): show tool lines under the progress status headline
A status headline replaced the rolling tool lines instead of sitting above
them, so a default Discord draft showed one preamble sentence for an entire
tool-heavy turn. Operators reached for `/verbose` to see any activity, which
delivers durable per-tool-call messages and floods the channel.

- Render the headline above the lines; both stay visible in one message.
- Shorten the start gate from 5s to 1.5s. The gate only creates the draft
  when the timer fires and finalize cancels it, so quick answers still post
  no draft while a 3s tool turn stops being silent.
- Drop Discord's label-gated tool-progress default so
  resolveChannelStreamingPreviewToolProgress is the single owner. An explicit
  `toolProgress: false` still silences the lines.
- Resolve that toggle against a "progress" mode guess when `streaming.mode`
  is unset, so the progress-draft channels stop ignoring an explicit
  `progress.toolProgress` opt-out.

Telegram now defaults to `streaming.mode: "progress"` like Discord; set
`"partial"` to keep streamed answer text. Its renderer draws work lines from
the compositor's structured lines, so `rendersRollingLinesNatively` keeps
them out of the composed text rather than printing every line twice.
2026-07-30 13:36:21 +09:00
joshavant cfa98bdf00 fix(telegram): emit sent hook for finalized previews 2026-07-29 23:31:53 -05:00
pick-cat e20a0039b3 fix(telegram): catch unhandled rejections in webhook and ingress worker shutdown (#100998)
* fix(telegram): isolate webhook/ingress-worker shutdown errors and guard all cleanup

- Wrap entire shutdown() body in outer try/catch so sync throws never
  produce unhandled rejections from fire-and-forget abort listeners.
- bot.stop() rejection is caught and logged; finally block ensures
  closeTransportOnce(), noteWebhookStop(), and stopDiagnosticHeartbeat()
  always execute regardless of bot.stop() outcome.
- closeTransportOnce() rejection is caught independently in the finally
  block so noteWebhookStop() and stopDiagnosticHeartbeat() are not skipped.
- Startup failure path: bot.stop() and closeTransportOnce() get
  .catch(() => undefined) so cleanup rejections never mask the original
  startup error.
- Both abort-listener call sites use consistent void shutdown() since
  the never-reject contract is now internal.
- Ingress worker stop() shares an in-flight stopPromise for idempotency;
  worker.terminate() rejections are observed via .catch(() => undefined).

Co-Authored-By: nebulacoder-v8.0 <noreply@zte.com.cn>

* fix(telegram): continue webhook cleanup after sync server.close throw

Extract independently guarded shutdown phases so a synchronous
server.close() failure still runs bot.stop, transport close, status,
and diagnostic heartbeat cleanup. Add sync-throw regression coverage
and a loopback real-behavior proof (negative/positive/valid).

* fix(telegram): clear webhook CI lint, knip, and test-types

Restore curly-safe drain timer clear, stop exporting the unused
shutdown phases interface, and narrow the transport close spy for
tsgo test types.

* chore(telegram): drop committed webhook shutdown proof script

* test(telegram): inline webhook shutdown proof cases without proof script

* fix(telegram): drop stale reply-fence import after main rebase

telegram-reply-fence.ts was deleted on main (f7786a16cf) during the
core drain refactor. The rebased webhook.ts no longer calls these
functions; remove the dangling import so the module resolves.

Co-Authored-By: nebulacoder-v8.0 <noreply@zte.com.cn>

* fix(telegram): continue webhook shutdown after phase failures

Keep each fallible Telegram-owned teardown phase independent so an early failure cannot skip transport, ingress, status, or diagnostic cleanup.

Co-authored-by: Pick-cat <huang.ting3@xydigit.com>

---------

Co-authored-by: nebulacoder-v8.0 <noreply@zte.com.cn>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-30 01:21:12 +08:00
Peter Steinberger 986e5d1758 refactor(channels): share ingress retention defaults (#115824) 2026-07-29 06:24:30 -04:00
Zakaria Rahali a9391d7312 fix(telegram): linkPreview:false is ignored on streamed replies (#114125)
* fix(telegram): linkPreview:false is ignored on streamed replies

Replies delivered through draft streaming still unfurled the first URL
even with channels.telegram.linkPreview: false. Non-streamed sends
already honored the flag.

createTelegramDraftStream never received linkPreview and never set
link_preview_options, on either its initial sendMessage or its
editMessageText calls. Finalization could not clean it up: it skips the
final edit when the streamed draft text already equals the final text,
which is the common case, so the draft message stays as-is with the
preview attached.

Passes linkPreview from telegramCfg into the draft stream and applies
link_preview_options: { is_disabled: true } on the send and on every
edit, since an edit that omits the field re-enables the preview
server-side. Rich messages keep expressing this as skip_entity_detection
at render time, which already worked.

Call arity is preserved when no preview options apply, so existing edit
assertions are unaffected.

Closes #111525

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* test(telegram): cover streamed reply option parity

Co-authored-by: Zakaria Rahali <zakariarahali288@gmail.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-29 06:18:35 -04:00
Peter Steinberger 4232126bba chore: update dependencies across workspace (#115677)
* chore(deps): update dependencies

* fix(deps): restore CI compatibility
2026-07-29 05:16:42 -04:00
Peter Steinberger 382ea7b74e refactor: centralize channel streaming config hints (#115739)
* refactor: centralize channel streaming config hints

* fix: repair code mode static checks

* fix: restore QA evidence validator import
2026-07-29 04:42:23 -04:00
Peter Steinberger 104322c5cc fix(telegram): prevent false empty replies after message-tool delivery (#115588)
* fix(telegram): suppress message-tool-only reply fallbacks

Honor message-tool-only delivery when a non-silent Telegram reply is skipped in both ordinary group dispatch and native slash-command turns. Keep the existing visible fallback for genuinely empty native replies and cover both dispatch surfaces with regression tests.

Fixes #90091

* fix(telegram): preserve genuine delivery failure fallbacks

Suppress only non-silent skips owned by message-tool-only delivery. Preserve visible fallbacks when the same turn also encounters a real dispatch or final-delivery failure, with an explicit regression for the mixed failure path.

* fix(telegram): preserve native message-tool delivery errors

Track genuine native slash delivery failures so message-tool-only skip suppression never hides a failed response. Cover the exact mixed empty-skip and real-error path with a regression while preserving true-empty and intentionally cancelled fallbacks.

* test(telegram): preserve synchronous native delivery callbacks
2026-07-29 04:19:43 -04:00
Peter Steinberger 302f262e6b refactor: deduplicate extension normalization primitives (#115650)
* refactor(plugins): reuse SDK normalization primitives

* fix(ci): repair code-mode matrix checks

* fix(ci): satisfy code-mode matrix gates

* fix(ci): use matrix evidence export

* fix(ci): validate matrix evidence artifact
2026-07-29 04:10:06 -04:00
Peter Steinberger c650d2c8c9 fix(telegram): keep update retry checks read-only (#115613)
Use the non-mutating dedupe-cache contract when checking unaccepted Telegram updates. Preserve active handler and completed-update deduplication while allowing a real update to be accepted after repeated handler skip probes.

Fixes #105192
2026-07-29 04:02:55 -04:00
Peter Steinberger c29d889b9c fix: prevent sustained inbound messages from starving delivery (#115682)
Fixes #104106

Reported-by: @masatohoshino (#104106)
2026-07-29 03:44:35 -04:00