Commit Graph

21334 Commits

Author SHA1 Message Date
Vincent Koc
2fcd6507ec perf(reply): narrow queue imports 2026-03-22 19:05:12 -07:00
Vincent Koc
3392558b42 perf(reply): split usage line helpers 2026-03-22 19:00:35 -07:00
Vincent Koc
05055e200a fix(docs): remaining code audit fixes
- sdk-entrypoints.md: fix mislabeled 'Channel entry options' heading
  (should be 'Options' — these are definePluginEntry options, not
  channel-specific)
- sdk-overview.md: add 4 missing API object fields (version, description,
  source, rootDir) from OpenClawPluginApi type
2026-03-22 18:59:03 -07:00
Peter Steinberger
562e4a1791 refactor(outbound): split delivery queue storage and recovery 2026-03-23 01:57:56 +00:00
Peter Steinberger
103098513f perf: remove stale unit isolated entry 2026-03-22 18:57:44 -07:00
Peter Steinberger
5051a37de4 test: fix googlechat security typing drift 2026-03-22 18:57:44 -07:00
Vincent Koc
16de5a7b41 fix(docs): code-verified fixes from deep reference audit
- sdk-runtime.md: add missing required params (runId, timeoutMs) to
  runEmbeddedPiAgent example
- sdk-provider-plugins.md: add missing onModelSelected hook (#22),
  clarify capabilities is data not callable, drop misleading '21' count
2026-03-22 18:56:51 -07:00
Peter Steinberger
e5be5c1b99 style: format plugin sdk helper updates 2026-03-23 01:56:01 +00:00
Peter Steinberger
f56edd62f0 fix: export provider-entry plugin sdk subpath 2026-03-23 01:56:01 +00:00
Peter Steinberger
5c8ea0a175 refactor: share channel setup status helpers 2026-03-23 01:56:01 +00:00
Peter Steinberger
583bea001c refactor: share parsed channel allowlist prompts 2026-03-23 01:56:01 +00:00
Peter Steinberger
7d032ed38c refactor: add provider onboarding preset appliers 2026-03-23 01:56:00 +00:00
Peter Steinberger
956fe72b39 refactor: extract single-provider plugin entry helper 2026-03-23 01:56:00 +00:00
Peter Steinberger
6237cfc6a6 fix: finish telegram reply fallback landing (#52524) (thanks @moltbot886) 2026-03-22 18:54:01 -07:00
moltbot886
b12dc4d04d fix(telegram): update test expectations for allow_sending_without_reply
Update exact-match test assertions in send.test.ts to include the new
allow_sending_without_reply: true parameter. Tests using objectContaining
already pass, but several tests use exact object matching.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 18:54:01 -07:00
moltbot886
d264c761cb fix(telegram): add allow_sending_without_reply to prevent lost messages
When a Telegram message that OpenClaw is replying to gets deleted before
delivery, the Telegram API rejects the entire sendMessage call with
"message to be replied not found". This causes the bot's response to be
silently lost and stuck in the failed delivery queue permanently.

Setting allow_sending_without_reply: true tells Telegram to deliver the
message as a standalone message if the reply target no longer exists,
instead of failing the entire request.

Applied to all 6 locations across 4 source files where
reply_to_message_id is set:
- send.ts: buildTelegramReplyParams (both reply_parameters and plain reply)
- bot/delivery.send.ts: buildTelegramSendParams
- draft-stream.ts: draft stream reply params
- bot-handlers.runtime.ts: error reply messages (file too large, media download failed)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 18:54:01 -07:00
Peter Steinberger
3547b5fd1e fix: restore bundled plugin metadata generator 2026-03-23 01:53:28 +00:00
Peter Steinberger
54213b587f refactor: reuse shared cli runtime test mocks 2026-03-23 01:53:28 +00:00
Peter Steinberger
2e6f2b0f07 test: centralize cli runtime capture helpers 2026-03-23 01:53:28 +00:00
Vincent Koc
9a07187339 style(format): fix extension test drift 2026-03-22 18:53:22 -07:00
Vincent Koc
a960cba2db perf(reply): lazy-load context token lookup 2026-03-22 18:52:53 -07:00
Vincent Koc
8a7ae5b67e test(googlechat): cover security normalization 2026-03-22 18:51:20 -07:00
Vincent Koc
7d8daa7173 perf(reply): lazy-load usage cost resolution 2026-03-22 18:48:42 -07:00
Peter Steinberger
ee362b7e38 perf: remove remaining unit thread pins 2026-03-22 18:47:35 -07:00
Peter Steinberger
ee1001d0ae test: slim outbound test import graphs 2026-03-22 18:47:35 -07:00
Vincent Koc
7a0781a367 test(irc): cover inbound behavior branches 2026-03-22 18:47:28 -07:00
Vincent Koc
a437f0417e test(nextcloud-talk): cover inbound behavior branches 2026-03-22 18:47:28 -07:00
Vincent Koc
3f002feffb fix(plugins): remove metadata generator conflict markers 2026-03-22 18:46:51 -07:00
Vincent Koc
263d5ea687 perf(reply): lazy-load runner execution and memory 2026-03-22 18:44:17 -07:00
create
aaba1ae653 fix(mattermost): honor replyToMode off for threaded messages 2026-03-22 18:42:56 -07:00
Vincent Koc
55e0c6380a test(msteams): cover store and live directory helpers 2026-03-22 18:42:43 -07:00
Vincent Koc
6e9cf81a8b test(mattermost): cover directory discovery 2026-03-22 18:42:43 -07:00
Peter Steinberger
29f3b7f6eb fix: harden image auth env lookups (#52552) (thanks @vincentkoc) 2026-03-22 18:42:18 -07:00
Vincent Koc
94f36bf373 docs(image): remove duplicate typical values bullet 2026-03-22 18:42:18 -07:00
Vincent Koc
654089320b fix(image): deprecate legacy skill and clarify auth 2026-03-22 18:42:18 -07:00
Vincent Koc
a59db4c9f4 fix(plugins): make metadata generator formatter portable 2026-03-22 18:41:13 -07:00
Peter Steinberger
2dd3425584 fix(ci): restore delivery queue branch checks 2026-03-22 18:39:24 -07:00
Stephen Schoettler
b07312c55b fix(delivery-queue): increment retryCount on deadline-deferred entries
Codex P1: entries deferred by the recovery time budget kept retryCount=0
forever, so they could loop across restarts without ever reaching MAX_RETRIES.

After breaking on deadline, call failDelivery() for all remaining entries
so retryCount is incremented. Entries stay in queue until MAX_RETRIES is
reached and they are pruned normally.

Also updates the maxRecoveryMs test to assert retryCount=1 on deferred entries.
2026-03-22 18:39:24 -07:00
Stephen Schoettler
329e539796 test(delivery-queue): align test assertion with 'next startup' log message 2026-03-22 18:39:24 -07:00
Stephen Schoettler
ca778b3f3c fix(browser): add ChildProcessWithoutNullStreams cast for @types/node compat
The stdio tuple overload resolves differently across @types/node versions
(v20 vs v24/v25). Cast the spawn() result to ChildProcessWithoutNullStreams
to ensure proc.stderr?.on/off type-checks regardless of installed @types/node.
2026-03-22 18:39:24 -07:00
Stephen Schoettler
a05a251be0 fix(delivery-queue): align test assertion and JSDoc with 'next startup' log message 2026-03-22 18:39:24 -07:00
Stephen Schoettler
20f758d4cb fix(delivery-queue): break immediately on deadline instead of failing all remaining entries
P1-C: After now >= deadline, the old code would iterate all remaining queue
entries and call failDelivery() on each — O(n) work that nullified the
maxRecoveryMs wall-clock cap on large queues.

Fix: break out of the recovery loop immediately when the deadline is exceeded.
Remaining entries are picked up on next startup unchanged (retryCount not
incremented). The deadline means 'stop here', not 'fail everything remaining'.
2026-03-22 18:39:24 -07:00
Stephen Schoettler
4e92807f10 fix(delivery-queue): increment retryCount on deferred entries when time budget exceeded
When delivery recovery ran out of the 60s time budget, remaining pending
entries were silently deferred to the next restart with no retryCount
increment. This caused them to loop forever across restarts, never hitting
MAX_RETRIES and never moving to failed/.

Fix: call failDelivery() on each remaining entry before breaking out of
the recovery loop (both the deadline check and the backoff-exceeds-deadline
check). This increments retryCount so that entries eventually exhaust
MAX_RETRIES and are permanently skipped.

Fixes #24353
2026-03-22 18:39:24 -07:00
Stephen Schoettler
5e64265537 fix(browser): prevent stdio buffer blocking in Docker environments 2026-03-22 18:39:24 -07:00
Stephen Schoettler
69217164f7 fix: add null guards to usage sort comparators
Prevents crash when totals is undefined in byModel/byProvider/byAgent
sort comparators. Fixes 'Cannot read properties of undefined (reading
totalTokens)' crash that causes context overflow in active sessions.
2026-03-22 18:39:24 -07:00
Vincent Koc
248caf09f5 fix(test): speed up openshell remote fs bridge 2026-03-22 18:38:45 -07:00
Vincent Koc
653d69ede7 test(msteams): cover setup wizard status 2026-03-22 18:37:37 -07:00
Peter Steinberger
f3650b466f style: format mattermost slash monitor test 2026-03-22 18:36:56 -07:00
Peter Steinberger
75835fc664 test: restore runtime-aware cli mocks 2026-03-22 18:35:37 -07:00
Peter Steinberger
c43bfcbbec refactor: split best-effort network display discovery 2026-03-22 18:35:37 -07:00