Commit Graph

9618 Commits

Author SHA1 Message Date
AI Assistant d6cbaea434 fix(tui): preserve streamed text during tool call transitions
Fixes #27674

The TUI was erasing already-streamed assistant text when tool calls
were triggered. This happened because the finalize() method in
TuiStreamAssembler was not using the protectBoundaryDrops option
when updating run state.

Now finalize() applies the same boundary drop protection as
ingestDelta(), ensuring that streamed text before tool calls is
preserved when the final payload drops earlier content blocks.
2026-02-26 19:50:06 +00:00
Peter Steinberger 344f54b84d refactor(config): dedupe model api definitions 2026-02-26 20:00:11 +01:00
Peter Steinberger ac03803d12 fix: align codex model api schema/type coverage (#27501) (thanks @AytuncYildizli) 2026-02-26 18:51:04 +00:00
AytuncYildizli 861b90f79c fix(config): add openai-codex-responses to ModelApiSchema
The config schema validates provider api fields against ModelApiSchema,
but openai-codex-responses was missing from the allowed values. This
forces users to set api: "openai-responses" for the openai-codex
provider, which routes requests to api.openai.com/v1/responses instead
of chatgpt.com/backend-api/codex/responses, causing HTTP 401 errors
because Codex OAuth tokens lack api.responses.write scope for the
standard OpenAI Responses endpoint.

The runtime already supports openai-codex-responses throughout: model
registry, stream dispatch (streamOpenAICodexResponses), and provider
detection (OPENAI_MODEL_APIS set). Only the config schema was missing
the literal.
2026-02-26 18:51:04 +00:00
Peter Steinberger d92fc85555 refactor(cli): dedupe gateway run mode parsing 2026-02-26 19:50:49 +01:00
Shakker f7041fbee3
fix(windows): normalize namespaced path containment checks 2026-02-26 18:49:48 +00:00
Peter Steinberger dc6e4a5b13 fix: harden dm command authorization in open mode 2026-02-26 19:49:36 +01:00
Peter Steinberger a909019078 fix: align gateway run auth modes (#27469) (thanks @s1korrrr) 2026-02-26 18:20:27 +00:00
Rafal 1087033abd fix(cli): list all supported auth modes in gateway run --auth help
Made-with: Cursor
2026-02-26 18:20:27 +00:00
Shakker 47f52cd233 test(cli): tighten daemon status TLS mock typings 2026-02-26 18:13:33 +00:00
Shakker bed69339c1 fix(cli): scope daemon status TLS fingerprint to local probes 2026-02-26 18:13:33 +00:00
Shakker b788616d9c fix(cli): add TLS daemon-status probe regression coverage 2026-02-26 18:13:33 +00:00
Liu Yuan 90d426f9ad fix(cli): gateway status probe with TLS when bind=lan
- Use wss:// scheme when TLS is enabled (specifically for bind=lan)
- Load TLS runtime to get certificate fingerprint
- Pass fingerprint to probeGatewayStatus for self-signed cert trust
2026-02-26 18:13:33 +00:00
Peter Steinberger d6eefe2e75 style: format auth boundary updates 2026-02-26 18:50:47 +01:00
Peter Steinberger 262bca9bdd fix: restore dm command and self-chat auth behavior 2026-02-26 18:49:16 +01:00
Peter Steinberger 64de4b6d6a fix: enforce explicit group auth boundaries across channels 2026-02-26 18:49:16 +01:00
Shakker fe842b5f14 test(auto-reply): cover inbound timestamp guard 2026-02-26 17:10:09 +00:00
Liu Yuan c596658b8d feat(auto-reply): make agent time-aware with message timestamps
Add human-readable timestamp field to the Conversation info JSON block.

Before:
  {
    "conversation_label": "D id:123"
  }

After:
  {
    "conversation_label": "D id:123",
    "timestamp": "Sun 2026-02-15 13:35 GMT+8"
  }

Benefits:
- Better time awareness for time-related questions
- Understand conversation gaps and response delays
- Handle delayed message delivery
- Context for relative time references ("just now", "later")
2026-02-26 17:10:09 +00:00
Peter Steinberger 10481097f8 refactor(security): enforce v1 node exec approval binding 2026-02-26 18:09:01 +01:00
Peter Steinberger c5facb8477 fix(discord): avoid invalid /acp native option payload 2026-02-26 16:49:20 +00:00
Peter Steinberger cd80c7e7ff refactor: unify dm policy store reads and reason codes 2026-02-26 17:47:57 +01:00
Peter Steinberger 53e30475e2 test(agents): add compaction and workspace reset regressions 2026-02-26 17:41:25 +01:00
Peter Steinberger 0ec7711bc2 fix(agents): harden compaction and reset safety
Co-authored-by: jaden-clovervnd <91520439+jaden-clovervnd@users.noreply.github.com>
Co-authored-by: Sid <201593046+Sid-Qin@users.noreply.github.com>
Co-authored-by: Marcus Widing <245375637+widingmarcus-cyber@users.noreply.github.com>
2026-02-26 17:41:24 +01:00
Peter Steinberger 273973d374 refactor: unify typing dispatch lifecycle and policy boundaries 2026-02-26 17:36:16 +01:00
Peter Steinberger 6fd9ec97de fix(gateway): preserve turn-origin messageChannel in agent runs 2026-02-26 17:25:56 +01:00
Peter Steinberger 08e3357480 refactor: share gateway security path canonicalization 2026-02-26 17:23:46 +01:00
Shakker b044c149c1
Mattermost: avoid raw fetch in monitor media download 2026-02-26 16:03:39 +00:00
Peter Steinberger 8a51891ed5 test(exec-approvals): cover v1 binding precedence and mismatch mapping 2026-02-26 17:02:52 +01:00
Peter Steinberger 258d615c4d fix: harden plugin route auth path canonicalization 2026-02-26 17:02:06 +01:00
Peter Steinberger 37a138c554 fix: harden typing lifecycle and cross-channel suppression 2026-02-26 17:01:09 +01:00
Peter Steinberger 4894d907fa refactor(exec-approvals): unify system.run binding and generate host env policy 2026-02-26 16:58:01 +01:00
riccoyuanft 60bb475355
fix: set authHeader: true by default for MiniMax API provider (#27622)
* Update onboard-auth.config-minimax.ts

fix issue #27600

* fix(minimax): default authHeader for implicit + onboarding providers (#27600)

Landed from contributor PR #27622 by @riccoyuanft and PR #27631 by @kevinWangSheng.
Includes a small TS nullability guard in lane delivery to keep build green on rebased head.

Co-authored-by: riccoyuanft <riccoyuan@gmail.com>
Co-authored-by: Kevin Shenghui <shenghuikevin@github.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Kevin Shenghui <shenghuikevin@github.com>
2026-02-26 15:53:51 +00:00
Peter Steinberger 1708b11fab refactor(pi): simplify image reference detection 2026-02-26 16:52:13 +01:00
Peter Steinberger 75ed72e807 refactor(pi): extract history image prune helpers 2026-02-26 16:44:52 +01:00
Peter Steinberger 57334cd7d8 refactor: unify channel/plugin ssrf fetch policy and auth fallback 2026-02-26 16:44:13 +01:00
Peter Steinberger 4da6a7f212 refactor(restart): extract stale pid cleanup and supervisor markers 2026-02-26 16:39:27 +01:00
Peter Steinberger c81e9866ff fix(pi): stop history image reinjection token blowup 2026-02-26 16:38:20 +01:00
Peter Steinberger 9a4b2266cc fix(security): bind node system.run approvals to env 2026-02-26 16:38:07 +01:00
Peter Steinberger f877e7e74c fix(telegram): split stop-created preview finalization path
Refactor lane preview finalization into explicit branches so stop-created
previews never duplicate sends when edit fails.

Add Telegram dispatch regressions for:
- stop-created preview edit failure (no duplicate send)
- existing preview edit failure (fallback send preserved)
- missing message id after stop-created flush (fallback send)

Thanks @obviyus for the original preview-prime direction in #27449.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-02-26 15:35:41 +00:00
Peter Steinberger 051fdcc428 fix(security): centralize dm/group allowlist auth composition 2026-02-26 16:35:33 +01:00
Kevin Shenghui 16ccd5a874 fix(gateway): add ThrottleInterval to launchd plist to prevent restart loop 2026-02-26 15:31:04 +00:00
Peter Steinberger 03d7641b0e feat(agents): default codex transport to websocket-first 2026-02-26 16:22:53 +01:00
SidQin-cyber 63c6080d50 fix: clean stale gateway PIDs before triggerOpenClawRestart calls launchctl/systemctl
When the /restart command runs inside an embedded agent process (no
SIGUSR1 listener), it falls through to triggerOpenClawRestart() which
calls launchctl kickstart -k directly — bypassing the pre-restart port
cleanup added in #27013. If the gateway was started via TUI/CLI, the
orphaned process still holds the port and the new launchd instance
crash-loops.

Add synchronous stale-PID detection (lsof) and termination
(SIGTERM→SIGKILL) inside triggerOpenClawRestart() itself, so every
caller — including the embedded agent /restart path — gets port cleanup
before the service manager restart command fires.

Closes #26736

Made-with: Cursor
2026-02-26 15:22:35 +00:00
taw0002 792ce7b5b4 fix: detect OpenClaw-managed launchd/systemd services in process respawn
restartGatewayProcessWithFreshPid() checks SUPERVISOR_HINT_ENV_VARS to
decide whether to let the supervisor handle the restart (mode=supervised)
or to fork a detached child (mode=spawned). The existing list only had
native launchd vars (LAUNCH_JOB_LABEL, LAUNCH_JOB_NAME) and systemd vars
(INVOCATION_ID, SYSTEMD_EXEC_PID, JOURNAL_STREAM).

macOS launchd does NOT automatically inject LAUNCH_JOB_LABEL into the
child environment. OpenClaw's own plist generator (buildServiceEnvironment
in service-env.ts) sets OPENCLAW_LAUNCHD_LABEL instead. So on stock macOS
LaunchAgent installs, isLikelySupervisedProcess() returned false, causing
the gateway to fork a detached child on SIGUSR1 restart. The original
process then exits, launchd sees its child died, respawns a new instance
which finds the orphan holding the port — infinite crash loop.

Fix: add OPENCLAW_LAUNCHD_LABEL, OPENCLAW_SYSTEMD_UNIT, and
OPENCLAW_SERVICE_MARKER to the supervisor hint list. These are set by
OpenClaw's own service environment builders for both launchd and systemd
and are the reliable supervised-mode signals.

Fixes #27605
2026-02-26 15:21:23 +00:00
Peter Steinberger 5c0255477c fix: tolerate missing pi-coding-agent backend export 2026-02-26 16:11:37 +01:00
Peter Steinberger fae8de9ae0 fix(browser): land PR #27617 relay reconnect resilience 2026-02-26 15:08:55 +00:00
Peter Steinberger 47fc6a0806 fix: stabilize secrets land + docs note (#26155) (thanks @joshavant) 2026-02-26 14:47:22 +00:00
Peter Steinberger 820d614757 fix(secrets): harden plan target paths and ref-only auth profiles 2026-02-26 14:47:22 +00:00
joshavant 485cd0c512 fix(test): skip exec-backed audit batching assertion on windows 2026-02-26 14:47:22 +00:00
joshavant 14897e8de7 docs(secrets): clarify partial migration guidance 2026-02-26 14:47:22 +00:00