Commit Graph

17297 Commits

Author SHA1 Message Date
Peter Steinberger
f17f2f918c fix(gateway): order bootstrap cache clear after embedded run wait
Landed from #38873 by @MumuTW.

Co-authored-by: MumuTW <clothl47364@gmail.com>
2026-03-07 20:42:33 +00:00
Peter Steinberger
3ec81709d7 refactor: unify shared utility normalization helpers 2026-03-07 20:33:50 +00:00
Peter Steinberger
30d091b2fb refactor: share thread binding id parser 2026-03-07 20:33:50 +00:00
Peter Steinberger
95fe282a17 refactor: unify channel status snapshot base fields 2026-03-07 20:33:50 +00:00
Peter Steinberger
b9e7521463 refactor: unify directory config entry extraction 2026-03-07 20:33:50 +00:00
Peter Steinberger
b0ac284dae refactor: share setup account config patch helper 2026-03-07 20:33:50 +00:00
Peter Steinberger
2ee8b807f8 refactor: dedupe discord account inspect config merge 2026-03-07 20:33:50 +00:00
Peter Steinberger
7242777d63 refactor: unify account list/default scaffolding 2026-03-07 20:33:50 +00:00
Peter Steinberger
2bcd56cfac refactor: unify DM pairing challenge flows 2026-03-07 20:33:50 +00:00
Tars
dab0e97c22 fix(models): support minimax-portal coding plan vlm routing for image tool (openclaw#33953)
Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test:macmini

Co-authored-by: tars90percent <252094836+tars90percent@users.noreply.github.com>
2026-03-07 14:30:53 -06:00
Tyler Yust
e554c59aac fix(cron): eliminate double-announce and replace delivery polling with push-based flow (#39089)
* fix(cron): eliminate double-announce and replace delivery polling with push-based flow

- Set deliveryAttempted=true in announce early-return paths (active-subagent
  suppression and stale-interim suppression) so the heartbeat timer no longer
  fires a redundant enqueueSystemEvent fallback (double-announce bug).

- Refactor waitForDescendantSubagentSummary to use event-based agent.wait RPC
  calls instead of a 500ms busy-poll loop.  Each active descendant run is now
  awaited concurrently via Promise.allSettled, and only a short bounded grace
  period (5s) remains to capture the cron agent's post-orchestration synthesis.
  Eliminates O(n*timeoutMs/500ms) gateway calls and wasted wall-clock time.

- Add FAST_TEST_MODE (OPENCLAW_TEST_FAST=1) to subagent-followup.ts to keep
  the grace-period tests instant in CI.

- Add comprehensive tests for the new waitForDescendantSubagentSummary behaviour
  (push-based wait, error resilience, NO_REPLY handling, multi-descendant waits).

* fix: prep cron double-announce followup tests (#39089) (thanks @tyler6204)
2026-03-07 12:13:37 -08:00
Altay
97f9e25525 fix(ci): restore strip-ansi and typecheck fixtures (#39146)
* fix: restore strip-ansi and typecheck fixtures

* test: normalize windows install path assertions
2026-03-07 23:13:13 +03:00
Yi-Cheng Wang
4682f3cace Fix/Complete LINE requireMention gating behavior (#35847)
* fix(line): enforce requireMention gating in group message handler

* fix(line): scope canDetectMention to text messages, pass hasAnyMention

* fix(line): fix TS errors in mentionees type and test casts

* feat(line): register LINE in DOCKS and CHAT_CHANNEL_ORDER

- Add "line" to CHAT_CHANNEL_ORDER and CHAT_CHANNEL_META in registry.ts
- Export resolveLineGroupRequireMention and resolveLineGroupToolPolicy
  in group-mentions.ts using the generic resolveChannelGroupRequireMention
  and resolveChannelGroupToolsPolicy helpers (same pattern as iMessage)
- Add "line" entry to DOCKS in dock.ts so resolveGroupRequireMention
  in the reply stage can correctly read LINE group config

Fixes the third layer of the requireMention bug: previously
getChannelDock("line") returned undefined, causing the reply-stage
resolveGroupRequireMention to fall back to true unconditionally.

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

* fix(line): pending history, requireMention default, mentionPatterns fallback

- Default requireMention to true (consistent with other channels)
- Add mentionPatterns regex fallback alongside native isSelf/@all detection
- Record unmentioned group messages via recordPendingHistoryEntryIfEnabled
- Inject pending history context in buildLineMessageContext when bot is mentioned

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

* test(line): update tests for requireMention default and pending history

- Add requireMention: false to 6 group tests unrelated to mention gating
  (allowlist, replay dedup, inflight dedup, error retry) to preserve
  their original intent after the default changed from false to true
- Add test: skips group messages by default when requireMention not configured
- Add test: records unmentioned group messages as pending history

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

* fix(line): use undefined instead of empty string as historyKey sentinel

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

* fix(line): deliver pending history via InboundHistory, not Body mutation

- Remove post-hoc ctxPayload.Body injection (BodyForAgent takes priority
  in the prompt pipeline, so Body was never reached)
- Pass InboundHistory array to finalizeInboundContext instead, matching
  the Telegram pattern rendered by buildInboundUserContextPrefix

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

* fix(line): pass agentId to buildMentionRegexes for per-agent mentionPatterns

- Resolve route before mention gating to obtain agentId
- Pass agentId to buildMentionRegexes, matching Telegram behavior

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

* fix(line): clear pending history after handled group turn

- Call clearHistoryEntriesIfEnabled after processMessage for group messages
- Prevents stale skipped messages from replaying on subsequent mentions
- Matches Discord, Signal, Slack, iMessage behavior

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

* style(line): fix import order and merge orphaned JSDoc in bot-handlers

- Move resolveAgentRoute import from ./local group to ../routing group
- Merge duplicate JSDoc blocks above getLineMentionees into one

Addresses Greptile review comments r2888826724 and r2888826840 on PR #35847.

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

* fix(line): read historyLimit from config and guard clear with has()

- bot.ts: resolve historyLimit from cfg.messages.groupChat.historyLimit
  with fallback to DEFAULT_GROUP_HISTORY_LIMIT, so setting historyLimit: 0
  actually disables pending history accumulation
- bot-handlers.ts: add groupHistories.has(historyKey) guard before
  clearHistoryEntriesIfEnabled to prevent writing empty buckets for
  groups that have never accumulated pending history (memory leak)

Addresses Codex review comments r2888829146 and r2888829152 on PR #35847.

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

* style(line): apply oxfmt formatting to bot-handlers and bot

Auto-formatted by oxfmt to fix CI format:check failure on PR #35847.

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

* fix(line): add shouldLogVerbose to globals mock in bot-handlers test

resolveAgentRoute calls shouldLogVerbose() from globals.js; the mock
was missing this export, causing 13 test failures.

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

* Address review findings for #35847

---------

Co-authored-by: Kaiyi <me@kaiyi.cool>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Yi-Cheng Wang <yicheng.wang@heph-ai.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-03-07 14:06:07 -06:00
Peter Steinberger
d6f28a3da7 fix(usage): format near-million token counts as millions (#39129)
Co-authored-by: CurryMessi <curry-messi@users.noreply.github.com>
2026-03-07 19:59:12 +00:00
Peter Steinberger
80a6eb3131 fix(daemon): use locale-invariant schtasks running code detection (#39076)
Co-authored-by: ademczuk <andrew.demczuk@gmail.com>
2026-03-07 19:56:47 +00:00
Peter Steinberger
3c1176110a fix(agents): avoid double websocket retry accounting on reconnect failures (#39133)
Co-authored-by: scoootscooob <zhentongfan@gmail.com>
2026-03-07 19:55:28 +00:00
Peter Steinberger
ac86deccee fix(gateway): harden plugin HTTP route auth 2026-03-07 19:55:06 +00:00
Peter Steinberger
cf290e31bd fix(voice-call): align plugin manifest schema with runtime config fields (#38892)
Co-authored-by: giumex <giuliano.messina@gmail.com>
2026-03-07 19:49:58 +00:00
Peter Steinberger
43b36bfe8c fix(gateway): flush chat delta before tool-start events (#39128)
Co-authored-by: john <john.j@min123.net>
2026-03-07 19:46:04 +00:00
Peter Steinberger
e4497234c7 fix(agents): increment compaction counter on overflow-triggered compaction (#39123)
Co-authored-by: MumuTW <clothl47364@gmail.com>
2026-03-07 19:44:06 +00:00
Peter Steinberger
4c2cb73055 fix(config): sanitize validation log output to prevent control character injection (#39116)
Co-authored-by: Bill <gsamzn@gmail.com>
2026-03-07 19:41:59 +00:00
Peter Steinberger
0e4603ac71 fix(agents): respect compat.supportsStore in WebSocket stream path (#39113)
Co-authored-by: scoootscooob <zhentongfan@gmail.com>
2026-03-07 19:40:34 +00:00
Peter Steinberger
5f8f58ae25 fix(gateway): require admin for chat config writes 2026-03-07 19:38:49 +00:00
Peter Steinberger
724d2d58fa fix(discord): avoid false model picker mismatch warning (#39105)
Land #39105 by @akropp.

Co-authored-by: Adam Kropp <adam@thekropp.com>
2026-03-07 19:32:35 +00:00
Peter Steinberger
17ab46aedd fix(models): prevent plaintext apiKey writes to models state (#38889)
Land #38889 by @gambletan.

Co-authored-by: gambletan <ethanchang32@gmail.com>
2026-03-07 19:29:46 +00:00
Peter Steinberger
de2ccffec1 fix(ui): stream tool events live in control chat (#39104)
Land #39104 by @jakepresent.

Co-authored-by: Jake Present <jakepresent@microsoft.com>
2026-03-07 19:27:17 +00:00
Sally O'Malley
499c1ee6e3 reduce image size, offer slim image (#38479)
Signed-off-by: sallyom <somalley@redhat.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 14:26:29 -05:00
Peter Steinberger
d72734946a fix(security): harden install base drift cleanup 2026-03-07 19:23:01 +00:00
Peter Steinberger
c06014d50c fix(agents): respect explicit provider baseUrl in merge mode (#39103)
Land #39103 by @BigUncle.

Co-authored-by: BigUncle <biguncle2017@gmail.com>
2026-03-07 19:22:21 +00:00
Peter Steinberger
537c97cce9 fix(agents): apply contextTokens cap for compaction threshold (#39099)
Land #39099 by @MumuTW.

Co-authored-by: MumuTW <clothl47364@gmail.com>
2026-03-07 19:19:03 +00:00
Peter Steinberger
e27bbe4982 fix(exec): block dangerous override-only env pivots 2026-03-07 19:18:05 +00:00
Peter Steinberger
6aa80844b8 fix(security): stage installs before publish 2026-03-07 19:11:07 +00:00
ademczuk
70be8ce15c fix(daemon): normalise whitespace in checkTokenDrift to prevent false-positive warning (#39108) 2026-03-07 14:10:54 -05:00
Peter Steinberger
74ecdec9ba fix(security): harden fs-safe copy writes 2026-03-07 19:10:27 +00:00
Peter Steinberger
6bfae2714f refactor: dedupe bluebubbles webhook auth test setup 2026-03-07 19:02:01 +00:00
Peter Steinberger
acf3ff91e4 refactor: dedupe discord native command test scaffolding 2026-03-07 19:02:01 +00:00
Peter Steinberger
0848a47c97 refactor: dedupe anthropic probe target test setup 2026-03-07 19:02:01 +00:00
Peter Steinberger
8928aba7ee refactor: dedupe minimax provider auth test setup 2026-03-07 19:02:01 +00:00
Peter Steinberger
143eca8e86 refactor: dedupe runtime snapshot test fixtures 2026-03-07 19:02:01 +00:00
Peter Steinberger
31acad4e8f fix: harden zip extraction writes 2026-03-07 19:01:35 +00:00
Peter Steinberger
0f53177971 fix(tests): stabilize diffs localReq headers (supersedes #39063)
Co-authored-by: Shennng <Shennng@users.noreply.github.com>
2026-03-07 18:57:35 +00:00
Peter Steinberger
253e159700 fix: harden workspace skill path containment 2026-03-07 18:56:15 +00:00
Peter Steinberger
5effa6043e fix(agents): land #38935 from @MumuTW
Co-authored-by: MumuTW <MumuTW@users.noreply.github.com>
2026-03-07 18:55:49 +00:00
Peter Steinberger
231c1fa37a fix(models): land #38947 from @davidemanuelDEV
Co-authored-by: davidemanuelDEV <davidemanuelDEV@users.noreply.github.com>
2026-03-07 18:54:12 +00:00
Peter Steinberger
2f59a3cff3 fix(gateway): land #39064 from @Narcooo
Co-authored-by: Narcooo <Narcooo@users.noreply.github.com>
2026-03-07 18:52:42 +00:00
Peter Steinberger
2ada1b71b6 fix(models-auth): land #38951 from @MumuTW
Co-authored-by: MumuTW <MumuTW@users.noreply.github.com>
2026-03-07 18:51:17 +00:00
Peter Steinberger
02f99c0ff3 docs: clarify agent owner trust defaults 2026-03-07 18:48:27 +00:00
Peter Steinberger
729ee165ed docs(gateway): clarify trusted operator HTTP endpoints 2026-03-07 18:48:17 +00:00
Peter Steinberger
8bd0eb5424 fix(outbound): land #38944 from @Narcooo
Co-authored-by: Narcooo <Narcooo@users.noreply.github.com>
2026-03-07 18:46:48 +00:00
Tak Hoffman
52e7d4295e fix(gateway): clear stale Slack socket state after disconnect (#39083)
* fix(gateway): restore stale-socket recovery

* test(slack): cover clean socket disconnect status
2026-03-07 12:37:32 -06:00