Commit Graph

20818 Commits

Author SHA1 Message Date
Josh Lehman a7ab64e394
test: narrow telegram setup prepare result
Regeneration-Prompt: |
  During PR #27727 prepare, rebasing onto current main exposed a pnpm check failure in extensions/telegram/src/setup-surface.test.ts because telegramSetupWizard.prepare is optional and the test accessed prepared.cfg without proving the result exists. Keep runtime behavior unchanged. Add the smallest test-side assertion/helper needed to narrow the optional prepare result before reading cfg, then rerun the full prepare gates on the refreshed prep branch.
2026-03-21 09:21:01 -07:00
Josh Lehman 098f0f3d13
OpenAI: restore default model exports 2026-03-21 09:21:01 -07:00
Josh Lehman 75b377fe4d
Agents: fix compaction safeguard changelog attribution 2026-03-21 09:21:00 -07:00
Josh Lehman e6e82f6321
Agents: preserve compaction suffix budget on retry fallback
Regeneration-Prompt: |
  Prepare PR #27727 for the unique compaction-safeguard budget fix only, leaving the overlapping post-compaction audit parser work out of scope. Fix the retry-fallback path in the compaction safeguard so when a quality-regeneration retry fails after one successful attempt, the final capped summary is rebuilt from the last successful history body plus the full reserved suffix, preserving split-turn context and preserved recent turns instead of only diagnostics and workspace rules. Replace the weak regression with one that forces capped fallback truncation and proves both suffix sections survive, then append the required changelog entry in Unreleased Fixes with (#27727) thanks @Pandadadadazxf.
2026-03-21 09:21:00 -07:00
Pandadadadazxf 271170a1f9
compaction-safeguard: preserve last successful summary when quality retry fails 2026-03-21 09:21:00 -07:00
Pandadadadazxf fd317d6bee
Compaction: preserve split-turn context in capped summary suffix
The split-turn block is appended at the end of summaryWithoutPreservedTurns,
so truncation (prefix-preserving slice) drops it first. Move it into the
reserved suffix so preparation.isSplitTurn sessions retain turn context.

Made-with: Cursor
2026-03-21 09:21:00 -07:00
Pandadadadazxf 031bce791d
Compaction: keep body prefix when truncation marker cannot fit
When body budget is tiny (suffix consumes almost entire 16k), budget <= 0
and we returned marker.slice(0, maxChars)—a useless fragment. Prefer
summary.slice(0, maxChars) to retain at least Decisions/Constraints prefix.

Made-with: Cursor
2026-03-21 09:21:00 -07:00
Pandadadadazxf 637d7b4728
Compaction: preserve tail sections when reserved suffix exceeds cap
When suffix.length >= maxChars, slice(0, maxChars) kept the head (preserved
turns) and dropped the tail (workspace rules, diagnostics). Use slice(-maxChars)
to preserve the critical tail instead.

Made-with: Cursor
2026-03-21 09:21:00 -07:00
Pandadadadazxf 4cb14e17cd
Compaction: preserve recent-turn suffix when capping summary
Include preservedTurnsSection in the reserved suffix so it survives truncation.
Truncation keeps the prefix (slice(0, budget)), so the tail is dropped first;
the 'preserved recent turns' block was in the body and could disappear on long
summaries. Move it into the suffix with diagnostics and workspace rules.

Made-with: Cursor
2026-03-21 09:21:00 -07:00
Pandadadadazxf 1def357950
Compaction: preserve section separators when building reserved suffix
appendSummarySection('', section) strips leading newlines via trimStart.
When body does not end with newline (e.g. buildStructuredFallbackSummary),
concatenation could merge content like '...## Exact identifiers## Tool Failures'.
Ensure reserved suffix has leading separator so headings/tags stay distinct.

Made-with: Cursor
2026-03-21 09:21:00 -07:00
Pandadadadazxf cbc0f481f4
Compaction: preserve diagnostic sections when capping summary
Cap main history body before appending tool failures and file ops so
these high-signal diagnostics survive truncation. Truncation keeps the
prefix (slice(0, budget)), so sections appended at the end would be
dropped first; moving them into the reserved suffix preserves them.

Made-with: Cursor
2026-03-21 09:20:59 -07:00
Pandadadadazxf a04976ed6b
Compaction: preserve workspace rules when capping safeguard summary 2026-03-21 09:20:59 -07:00
Pandadadadazxf 55f77bb944
Agents: fix compaction safeguard test formatting 2026-03-21 09:20:59 -07:00
Pandadadadazxf 9d15f5dd74
Agents: cap compaction safeguard summary size 2026-03-21 09:20:59 -07:00
Val Alexander 7c520cc0ea
web UI: fix context notice using accumulated inputTokens instead of prompt snapshot (#51721)
The context-usage banner in the web UI fell back to inputTokens when
totalTokens was missing. inputTokens is accumulated across all API
calls in a run (tool-use loops, compaction retries), so it overstates
actual context window utilization -- e.g. showing "100% context used
757.3k / 200k" when the real prompt snapshot is only 46k/200k (23%).

Drop the inputTokens fallback so the banner only fires when a genuine
prompt snapshot (totalTokens) is available.

Made-with: Cursor
2026-03-21 11:16:32 -05:00
Vincent Koc 15fd11032d fix(status): skip cold-start status probes 2026-03-21 08:59:19 -07:00
Vincent Koc a267c5d9ae
refactor(doctor): extract telegram provider warnings (#51704)
* refactor(doctor): extract telegram provider warnings

* docs(changelog): note doctor provider refactor
2026-03-21 08:57:06 -07:00
Vincent Koc a90c5092f2 fix(telegram): default fresh setups to mention-gated groups 2026-03-21 08:54:23 -07:00
Vincent Koc 91b9be1549 docs(changelog): note telegram doctor first-run guidance 2026-03-21 08:46:28 -07:00
Vincent Koc 2ead75ea0e fix(doctor): add telegram first-run guidance 2026-03-21 08:46:28 -07:00
Vincent Koc 7918308b1a fix(doctor): suppress telegram fresh-install group warning 2026-03-21 08:46:28 -07:00
Vincent Koc 06b4efb1e7 fix(configure): drop duplicate wizard header 2026-03-21 08:41:57 -07:00
Vincent Koc 2e8c8a7ae6 refactor(openai): centralize provider defaults 2026-03-21 08:40:03 -07:00
Vincent Koc 931fc9989d docs(changelog): note fresh setup provider guidance 2026-03-21 08:34:44 -07:00
Vincent Koc 4c4eea97e9 fix(configure): tighten fresh setup provider UX 2026-03-21 08:34:44 -07:00
Vincent Koc ffce904a10 fix(check): format onboard search test 2026-03-21 08:33:15 -07:00
Vincent Koc a27aeeabf0 docs(changelog): note web search key copy 2026-03-21 08:22:52 -07:00
Vincent Koc 265386cd6b feat(plugins): register claude bundle commands natively 2026-03-21 08:14:48 -07:00
zidongdesign 2b68d20ab3
feat: notify user when context compaction starts and completes (#38805)
Merged via squash.

Prepared head SHA: 0f48c1bbf6
Co-authored-by: zidongdesign <81469543+zidongdesign@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-03-21 08:14:29 -07:00
Vincent Koc 1169d51aee fix(onboarding): clarify web search key copy 2026-03-21 08:13:39 -07:00
Vincent Koc 1698726c18 chore(deps): dedupe pnpm lockfile 2026-03-21 08:03:42 -07:00
Harold Hunt 5eb99a9b50
Infra: unify plugin split runtime state (#50725)
Merged via squash.

Prepared head SHA: 570b7b9459
Co-authored-by: huntharo <5617868+huntharo@users.noreply.github.com>
Co-authored-by: huntharo <5617868+huntharo@users.noreply.github.com>
Reviewed-by: @huntharo
2026-03-21 11:00:21 -04:00
Dinakar Sarbada 1643d15057
fix(matrix): pass agentId to buildMentionRegexes for agent-level mention patterns (#51272)
* fix(matrix): pass agentId to buildMentionRegexes for agent-level mention patterns

* fix(matrix): resolve conflicts from main branch

* Retrigger CI

---------

Co-authored-by: Dinakar Sarbada <dinakars777@users.noreply.github.com>
2026-03-21 07:43:59 -07:00
Vincent Koc a3a5cad7d7 fix(onboarding): hide image-only auth providers 2026-03-21 07:42:42 -07:00
scoootscooob f10d054745
refactor: route discord runtime through plugin sdk (#51444) 2026-03-21 07:40:51 -07:00
Echo 11aff6ed72
fix(auth): support remote Codex OAuth manual input (#51631)
* fix(auth): support remote codex oauth manual input

* fix: support remote Codex OAuth manual input (#51631) (thanks @cash-echo-bot)

---------

Co-authored-by: Cash Williams <cashwilliams@gmail.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-21 19:40:54 +05:30
Bijin 59c4059647
Add Community plugins - Wecom (#29905)
Merged via squash.

Prepared head SHA: da0f08436c
Co-authored-by: sliverp <38134380+sliverp@users.noreply.github.com>
Co-authored-by: frankekn <4488090+frankekn@users.noreply.github.com>
Reviewed-by: @frankekn
2026-03-21 22:03:24 +08:00
Tak Hoffman 4af79f20d5
fix ci main cancellation behavior 2026-03-21 08:57:37 -05:00
Harold Hunt 35e6310b22
Docs: refresh generated config baseline (#51625) 2026-03-21 09:41:56 -04:00
fuller-stack-dev c9449d77b4
feat(gateway): persist webchat inbound images to disk (#51324)
* feat(gateway): persist webchat inbound images to disk

Images sent via the webchat control UI (chat.send RPC) were parsed into
content blocks but never written to disk, unlike WhatsApp and Telegram
handlers which call saveMediaBuffer(). This caused:

- Images lost after conversation compaction (only existed as ephemeral base64)
- Image editing/generation workflows failing for webchat-origin images
- Incomplete ~/.openclaw/media/inbound/ directory

After parseMessageWithAttachments extracts parsedImages, iterate and
persist each via saveMediaBuffer(buffer, mimeType, 'inbound'). Uses
fire-and-forget (.catch + warn log) so disk I/O never blocks the
chat.send response path.

Fixes #47930

* fix(gateway): address PR review comments on webchat image persistence

- Move saveMediaBuffer calls after sendPolicy/stop/dedupe checks so
  rejected or retried requests don't write files to disk (Codex P1)
- Await all saves and collect SavedMedia results into persistedImages
  so the persisted paths are available in scope (Greptile P1)
- Preserve Error stack trace in warn log instead of coercing to
  toString() (Greptile P2)
- Switch to Promise.all for concurrent writes

* fix(gateway): address remaining review comments on webchat image persistence

- Revert to fire-and-forget pattern (no await) to eliminate race window
  where retried requests miss the in-flight guard during image saves
- Remove unused SavedMedia import and persistedImages collection
- Use formatForLog for consistent error logging with stack traces
- Add NOTE comment about path propagation being a follow-up task

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

* fix(gateway): gate image persistence to webchat callers and defer base64 decode

* fix: drop unrelated format churn in lifecycle.test.ts

* gateway: clarify image persistence scope covers all chat.send callers

* fix(gateway): use generic chat.send log prefix for image persistence warnings

* fix(gateway): persist chat.send image refs in transcript

* fix(gateway): keep chat.send image refs off visible text

* fix(gateway): persist chat send media refs on dispatch

* fix(gateway): serialize chat send image persistence

* fix(gateway): persist chat send media after dispatch

* fix: persist chat.send inbound images across follow-ups (#51324) (thanks @fuller-stack-dev)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-21 19:05:11 +05:30
RichardCao 7bf437402d
fix: trim config validation startup imports (#51574)
Merged via squash.

Prepared head SHA: 23b235e465
Co-authored-by: RichardCao <4612401+RichardCao@users.noreply.github.com>
Co-authored-by: huntharo <5617868+huntharo@users.noreply.github.com>
Reviewed-by: @huntharo
2026-03-21 09:31:39 -04:00
Tak Hoffman 6db6e117df
fix(ui): use current session context usage in chat notice 2026-03-21 08:18:27 -05:00
Harold Hunt 8d733350de
CI: run config docs drift check on PRs (#51618) 2026-03-21 09:13:41 -04:00
fuller-stack-dev 5137a51307
feat(github-copilot): resolve any model ID dynamically (#51325)
* feat(github-copilot): resolve any model ID dynamically instead of only known ones

* refactor(github-copilot): extract model resolution, add reasoning heuristic and tests

* fix(github-copilot): default synthetic models to text-only input

* ci: retrigger checks

* copilot: mark synthetic catch-all models as vision-capable

* fix(github-copilot): anchor reasoning regex, unexport internal constants, add mid-string test

* fix(github-copilot): default synthetic models to text-only input

* fix(github-copilot): restore image input for synthetic models with explanatory comment

* fix(github-copilot): normalize registry lookup casing, add bare o3 test case

* fix: preserve configured overrides for dynamic models

* fix: allow dynamic GitHub Copilot models (#51325) (thanks @fuller-stack-dev)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-21 17:37:50 +05:30
Ayaan Zaidi 42e708d005
fix(agents): register simple completion transports 2026-03-21 17:22:31 +05:30
Taras Lukavyi 466debb75c
feat(telegram): auto-rename DM topics on first message (#51502)
* feat(telegram): auto-rename DM topics on first message

fix(telegram): use bot.api for topic rename to avoid SecretRef resolution

* fix(telegram): address security + test review feedback

- Fix test assertion: DEFAULT_PROMPT_SUBSTRING matches 'very short'
- Use RawBody instead of Body (no envelope metadata to LLM)
- Truncate user message to 500 chars for LLM prompt
- Remove user-derived content from verbose logs
- Remove redundant threadSpec.id null check
- Fix AutoTopicLabelParams type to match generateTopicLabel

* fix(telegram): use effective dm auto-topic config

* fix(telegram): detect direct auto-topic overrides

* fix: auto-rename Telegram DM topics on first message (#51502) (thanks @Lukavyi)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-21 16:53:30 +05:30
darkamenosa cdf49f0b00
zalo: use photo_url for inbound images (#51543)
* Zalo: use photo_url for inbound images

* Tests: wait for Zalo webhook image processing
2026-03-21 17:21:44 +07:00
Josh Avant 3f7f2c8dc9
Voice Call: enforce spoken-output contract and fix stream TTS silence regression (#51500)
* voice-call: harden streaming startup and fallback behavior

* voice-call: suppress barge-in during intro

* voice-call: skip first-turn auto-response while greeting plays

* Voice-call: improve telephony audio fidelity and pacing

* voice-call: enforce spoken JSON and first-message barge skip

* voice-call: fix silent stream TTS regression

* voice-call: remove TTS timing diagnostics and document stream behavior

* voice-call: fail stream playback when stream sends are dropped

* voice-call: harden spoken contract and initial stream replay

* voice-call: suppress barge transcripts during initial greeting

* voice-call: harden stream fallback and media safety
2026-03-21 04:15:16 -05:00
Val Alexander e9f715f27b
UI: fix and optimize overview log panels (#51477) 2026-03-21 02:14:53 -05:00
Val Alexander 2fd372836e
iOS: improve QR pairing flow (#51359)
- improve QR pairing UX and bootstrap token handling
- preserve repeated optimistic user messages during refresh
- add regression coverage for refresh reconciliation

Thanks @ImLukeF
2026-03-21 01:10:29 -05:00