Commit Graph

66965 Commits

Author SHA1 Message Date
Gio Della-Libera
144e5894f6 fix(policy): honor node command deny overrides 2026-07-04 15:06:10 -07:00
Gio Della-Libera
997f74f42b policy: cover gateway node commands 2026-07-04 15:06:10 -07:00
xingzhou
27d6c88167 feat: add utility models and generated session titles (#87643)
* feat: add utility model session titles

* docs: clarify utility model calls

* fix: budget utility title reasoning

* docs: refresh config baseline

* docs: refresh plugin sdk baseline

* docs: refresh plugin sdk baseline

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-04 17:24:51 -04:00
Peter Steinberger
bbb744269f test: make the local pnpm test gate green on macOS hosts (#100069)
Fixes 21 macOS-only failing test cases across three classes: canonicalized fixture roots (macOS /var -> /private/var tmpdir symlink vs production realpathing), load-tolerant process-spawn tests (content-gated pid files, readiness-sequenced kill windows, bounded-window timer assertions), and cross-file worker leak guards (skip-channel env, gateway token env, imessage runtime singleton). Test-only; no production changes. Fixes #100025.
2026-07-04 17:17:42 -04:00
Jason (Json)
0221544190 fix(release): block stale Codex runtime pins (#100015)
Prevents opted-in plugin runtime dependencies from being published with stale
registry pins. The same freshness assertion now guards both npm and ClawHub
release paths, including the managed Codex runtime.

Prepared head SHA: d5d0ecba4b
Reviewed-by: @fuller-stack-dev

Closes #99951
2026-07-04 15:13:31 -06:00
Dizesales
ff58d23e8f fix(telegram): resolve local Bot API container file paths against trustedLocalFileRoots [AI-assisted] (#91984)
* fix(telegram): resolve local Bot API container file paths against trustedLocalFileRoots

When the self-hosted telegram-bot-api server runs with --local inside a
container, getFile returns absolute file_path values rooted at the
container data dir (/var/lib/telegram-bot-api/...). The host process
mounts that volume at a different path, so the absolute path never
matches a trustedLocalFileRoots entry and inbound media fails to
materialize (messages reach the agent as bare <media:document>
placeholders without bytes).

Map container-absolute paths back to relative candidates and resolve
them under each trusted root, trying both with and without the
per-token directory segment the local server uses. Relative file_path
values are now also resolved against trusted roots before falling back
to the HTTP file endpoint, which keeps large-file (>20MB) local-mode
downloads working.

Path traversal protections: candidates are normalized, NUL bytes and
dot-segments are rejected, and reads stay behind the trusted-roots
file-access sandbox.

AI-assisted (Claude Code), validated with targeted vitest run.

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

Co-Authored-By: Dizesales <269209351+Dizesales@users.noreply.github.com>

* fix(telegram): map local Bot API container media paths

Co-authored-by: Lucas Magalhaes <ellucasrj@gmail.com>

* chore(config): refresh channel metadata

---------

Co-authored-by: Lucas Magalhaes <ellucasrj@gmail.com>
Co-authored-by: Dizesales <269209351+Dizesales@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-04 17:07:51 -04:00
Peter Steinberger
ed098c6550 refactor(test): drop redundant linked-worktree bundled-plugins pin from run-vitest
The node_modules package-root boundary fix anchors bundled plugin
discovery to the running checkout in nested worktrees, so the wrapper
no longer needs to pin OPENCLAW_BUNDLED_PLUGINS_DIR for symlinked
node_modules layouts. Verified live in a .claude worktree: with the
boundary fix and no pin, vitest workers resolve the worktree's own
extensions in both no-node_modules and symlinked layouts, and linked
worktrees now follow the same canonical dist-preferred discovery as
normal checkouts. The trust env remains owned by test/setup.shared.ts.

Must land together with or after the boundary fix commit directly below.
2026-07-04 21:52:09 +01:00
Vincent Koc
260c9c4589 fix(tooling): accept pnpm separator in web fetch benchmark
Accept the documented package-manager separator for the web fetch benchmark CLI and add a process-level regression test. Verified with rebased Testbox check:changed, prior targeted Testbox benchmark/test smokes, and AWS macOS install/build/gateway probes.
2026-07-04 13:47:14 -07:00
Peter Steinberger
0427fa35fb chore: update oxlint tsgolint (#100083)
* chore: update oxlint tsgolint

* chore: sync Canvas A2UI bundle
2026-07-04 16:41:15 -04:00
qingminlong
b30278895c fix: roll rounded durations into seconds (#100006)
Summary:
- The branch updates the shared duration helpers to branch on rounded millisecond values and adds 999.6ms expectations for compact, human, and precise duration output.
- PR surface: Source +3, Tests +2. Total +5 across 2 files.
- Reproducibility: yes. Current main source branches on raw `ms < 1000` before rounding in all three helpers, and the linked issue plus prior review include direct module proof that 999.6ms returned `1000ms`.

Automerge notes:
- No ClawSweeper repair was needed after automerge opt-in.

Validation:
- ClawSweeper review passed for head 9e06973112.
- Required merge gates passed before the squash merge.

Prepared head SHA: 9e06973112
Review: https://github.com/openclaw/openclaw/pull/100006#issuecomment-4882739452

Co-authored-by: qingminlong <qing.minlong@xydigit.com>
Approved-by: takhoffman
2026-07-04 20:34:57 +00:00
Peter Steinberger
7e8ea61b08 fix(gateway): harden embedded terminal policy (#100081)
* fix(gateway): harden operator terminal policy

* test(gateway): complete terminal context coverage

* test(gateway): narrow terminal policy mock

* test(gateway): satisfy CSP header lint

* docs: refresh terminal docs map

* test: route terminal temp helper importer
2026-07-04 16:34:07 -04:00
grifjef
7a0188cbd2 fix(memory-core): treat dreaming fence marker lines as inside-fence in promotion guard (#83718)
The lineRangeOverlapsDreamingFence guard tracked insideFence state from
the marker lines but did not flag ranges that included the marker lines
themselves. A relocated promotion range that ended on a start marker,
began on an end marker, or covered only a marker line passed the guard,
and the snippet built from those raw lines carried the marker text into
MEMORY.md.

Treat marker lines as inside-fence content for range overlap purposes
and add unit + integration coverage. The integration test exercises the
real applyShortTermPromotions path: pre-patch a recall whose stored
snippet is the start-marker text produces a 'Promoted From Short-Term
Memory' entry containing the literal marker; post-patch the same input
yields applied=0 and no MEMORY.md write. Refs #80613.
2026-07-04 13:01:04 -07:00
Gio Della-Libera
d5badb9e36 Keep legacy WhatsApp crontab lint opt-in (#99250)
Keep the legacy WhatsApp crontab Doctor lint check opt-in by marking the existing core check default-disabled. Default `doctor --lint` no longer reads the user crontab for this narrow legacy diagnostic, while `--all` and `--only core/doctor/legacy-whatsapp-crontab` still run the detector.

Validation:
- focused Doctor contribution Vitest passed 70/70
- changed-file oxfmt and oxlint passed
- git diff --check passed
- pnpm build passed before the final rebase
- hosted exact-head CI/Testbox gates passed on 8964ccb239 after QA Smoke rerun
- PR body includes real lint-module proof for default skip and explicit selected warning behavior

Maintainer note: accepted ClawSweeper's default-output compatibility tradeoff for this legacy crontab probe; no public SDK/plugin/config contract changes.

Co-authored-by: giodl73-repo <235387111+giodl73-repo@users.noreply.github.com>
2026-07-04 12:48:05 -07:00
Vincent Koc
2f6459093a improve(web-fetch): speed up provider fallback loading (#98559)
* perf(web-fetch): add web fetch benchmark

* perf(web-fetch): cache provider fallback resolution

* perf(firecrawl): avoid duplicate scrape payload wrapping

* perf(web-readability): reuse void tag lookup

* fix(web-fetch): keep provider cache live

* fix(web-fetch): invalidate provider cache on registry swap

* perf(web-fetch): reduce html extraction overhead

* fix(web-fetch): bound provider discovery cache

* perf(web-fetch): avoid full plugin load on fallback
2026-07-04 12:47:10 -07:00
Dallin Romney
1d839d3339 refactor: consolidate unique string lists (#99785) 2026-07-04 12:38:23 -07:00
Kevin Lin
d214622320 feat(update): support extended-stable package updates (#99811)
* feat(update): add extended-stable channel contract

* feat(update): implement extended-stable package flow

* docs(update): document extended-stable behavior

* fix(update): preserve extended-stable preflight guarantees

* fix(update): reject extended-stable Git repair

* fix(update): support loopback extended-stable canaries

* fix(update): preserve scoped package roots
2026-07-04 12:34:29 -07:00
Masato Hoshino
fe3215cbb0 fix(cron): roll back live scheduler state when persisting add/update/remove fails (#99960)
* fix(cron): roll back live store when persist fails during add/update/remove

* fix(cron): restore catch-up deferral markers on failed persists

* fix(cron): defer rollback-sensitive notifications

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-04 12:34:02 -07:00
Peter Steinberger
fb8f62d8e4 fix(ui): localize mobile pairing in Hindi and Russian (#100040)
* fix(ui): localize mobile pairing fallbacks

* test(ui): typecheck pairing localization guard

* test(ui): typecheck pairing localization guard

* test(ui): typecheck pairing localization guard

* test(ui): typecheck pairing localization guard

* test(ui): typecheck pairing localization guard
2026-07-04 15:30:48 -04:00
Dallin Romney
6c53dfa1df refactor(infra): consolidate bounded HTTP body reads (#99744)
* refactor(infra): consolidate bounded HTTP body reads

* fix(plugin-sdk): preserve HTTP body export boundaries
2026-07-04 12:15:57 -07:00
Dallin Romney
d102715bb2 refactor(models): share strict model ref parsing (#99790) 2026-07-04 12:10:06 -07:00
Dallin Romney
bd3ad2feb0 refactor(infra): consolidate identifier digests (#99788) 2026-07-04 12:04:46 -07:00
Peter Steinberger
614e87cce1 chore: update dependencies (#100027) 2026-07-04 14:56:50 -04:00
Peter Steinberger
77f0f40bb1 fix(telegram): surface inbound media fetch failures (#100051) 2026-07-04 14:54:43 -04:00
notask-007
94ff3c6b85 fix(slack): include attachment text in thread context (#97727)
* fix(slack): include attachment text in thread context

* fix(slack): cover attachment block fallback

* fix(slack): collect full block thread text

* refactor(slack): share thread block text extraction

Co-authored-by: notask-007 <37237335+chthtlo@users.noreply.github.com>

---------

Co-authored-by: notask-007 <>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-04 14:49:43 -04:00
Dallin Romney
939f9aeff5 test(qa): record Matrix route state inventory (#100039) 2026-07-04 11:48:18 -07:00
github-actions[bot]
5304d006e5 chore(ui): refresh control ui locales 2026-07-04 18:38:46 +00:00
Peter Steinberger
77b9385340 fix: tests in nested git worktrees load bundled plugins from the enclosing checkout (#100053)
* fix(infra): stop package-root walks at node_modules boundaries

Nested git worktrees (.worktrees/<pr>, .claude/worktrees/*) have no local
node_modules, so vitest workers run with argv1 inside the enclosing
checkout's node_modules. resolveOpenClawPackageRoot* walked up past that
boundary, resolved the enclosing checkout as the openclaw package root,
and bundled plugin discovery loaded the ancestor's stale extension
manifests, failing ~12 test shards and the scripts/pr prepare-run test
gate whenever the primary checkout sat on a different branch.

A package.json above a node_modules directory belongs to the workspace
that installed the tooling, never to the package owning the running code,
so the ancestor walk now stops there. Installed layouts
(node_modules/openclaw, .bin shims, global installs) match at or below
the boundary and are unaffected.

* fix(scripts): pin bundled plugin discovery in nested PR worktree gates

scripts/pr gates run pnpm test inside .worktrees/<pr>, which resolves
vitest tooling from the primary checkout's node_modules. PR branches that
predate the openclaw-root node_modules-boundary fix would still discover
the primary checkout's stale bundled plugin manifests, so pin
OPENCLAW_BUNDLED_PLUGINS_DIR to the worktree's own extensions before the
build/check/test gates.
2026-07-04 14:36:53 -04:00
Dallin Romney
dbdaad1c2e refactor(providers): table-drive paired catalogs (#99777) 2026-07-04 11:35:55 -07:00
Peter Steinberger
6df0fb818d feat: add session thread management (#98510)
* feat: add session thread management

Squash of codex/thread-management (025aefc3ad1) onto origin/main:
pin/archive/rename sessions via sessions.patch, archived-aware
sessions.list, lifecycle fencing, read-only archived chat, SDK +
Swift protocol support, Control UI session management.

* refactor(ui): minimal session rows with hover-revealed management

Chat picker and sidebar recents share session-row primitives: single-line
rows, relative timestamps, rename/archive/pin revealed on hover or focus,
accent pin badge for pinned rows, and an active-run spinner in the trail
slot. Sidebar floats pinned sessions above recency via the shared
comparator and gains archive/pin actions through the unified sessions-view
patch fallback. Archive eligibility is one shared policy
(canArchiveSessionRow); the sidebar/picker active-run tooltip now uses the
real sessionsView.activeRun locale key.

* fix: align session admission with mailbox-era main

Integration fixes after rebasing onto current main: sessions_list mailbox
test expectations learn the archived/pinned row fields and archived:false
list param; gateway agent admission treats a session as deleted only when
both the requested and canonical alias sets miss it (legacy bare-main
stores and exec-approval followups read under different spellings); cron
persist tests keep a consistent store across claim-guarded persist calls;
the ACP abort hook test asserts abort propagation instead of signal
identity; drop dead lifecycle writes flagged by no-useless-assignment and
fix the promise-executor return in the codex compact test.

* fix(qa): align UI e2e and shard fixtures with redesigned session rows

Sidebar session rows are wrapper divs with an inner link now: update the
navigation browser tests and chat-flow Playwright selectors. Seed a real
per-test session store for the auto-fallback admission guard instead of
depending on leftover host files at /tmp/sessions.json. Teach the
test-projects routing fixture about the suites that newly import the
shared temp-dir helper. Document the Codex thread-format contract for
archivedAt/pinnedAt (flag derived from server-stamped timestamp, epoch ms
here vs Codex epoch seconds) at the type and in the session docs.

* test: route auto-fallback suite through temp-dir helper plans

The auto-fallback suite now imports the shared temp-dir helper for its
seeded session store, so the top-level helper routing fixture must list
it in the auto-reply plan.
2026-07-04 14:30:47 -04:00
sunlit-deng
3644946230 fix(acpx): handle MCP proxy stdio pipe errors (#99852)
* fix(acpx): handle MCP proxy stdio pipe errors

* fix(acpx): handle proxy stdout pipe failures

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-04 11:30:23 -07:00
github-actions[bot]
61da4f0917 chore(ui): refresh control ui locales 2026-07-04 18:26:54 +00:00
Peter Steinberger
7a92c473c1 test(qqbot): fix macOS-only outbound media test failures
The scoped outbound media tests added in #92872 assert raw mkdtemp paths,
but prod resolvers canonicalize roots, so on macOS the /var -> /private/var
tmpdir symlink made three tests fail (green on Linux CI). Realpath the tmp
roots like sibling tests, and export the real UploadDailyLimitExceededError
from the outbound-dispatch sender.js mock so prod instanceof checks in error
paths hit real assertions instead of vitest's missing-export guard.

Also add AGENTS.md test guidance covering both patterns.
2026-07-04 19:20:22 +01:00
Peter Steinberger
6da5db21a6 chore(i18n): regenerate control-ui locale metadata after rebase 2026-07-04 11:18:43 -07:00
Peter Steinberger
d41cb3aab8 fix(control-ui): drop unused vitest import and bind captured request in terminal-connection test 2026-07-04 11:18:43 -07:00
Peter Steinberger
6aeb0575cf chore(plugin-sdk): raise public export budget for GatewayTerminalConfig 2026-07-04 11:18:43 -07:00
Peter Steinberger
959a2774d7 refactor(gateway): satisfy oxlint on terminal session teardown 2026-07-04 11:18:42 -07:00
Peter Steinberger
f2e5159f53 fix(control-ui): register terminal panel via guarded define for shared test registry 2026-07-04 11:18:42 -07:00
Peter Steinberger
3c03389925 fix(control-ui): drop the terminal exit the server emits during a close RPC 2026-07-04 11:18:42 -07:00
Peter Steinberger
3601dcad24 fix(gateway): reject unknown agent ids before resolving terminal isolation 2026-07-04 11:18:42 -07:00
Peter Steinberger
3f976f9f86 fix(control-ui): reload the document when terminal enablement outpaces its CSP 2026-07-04 11:18:42 -07:00
Peter Steinberger
2399ce7c85 fix(control-ui): harden terminal panel lifecycle (pending-open cancel, live theme, viewport clamp) 2026-07-04 11:18:42 -07:00
Peter Steinberger
e275cd61d7 test(control-ui): keep terminal event listener while an open is in flight 2026-07-04 11:18:41 -07:00
Peter Steinberger
ec72de41fa feat(control-ui): dockable ghostty-web terminal panel 2026-07-04 11:18:41 -07:00
Peter Steinberger
f083f35ddb feat(gateway): embedded operator terminal (PTY) with fail-closed isolation and kill switch 2026-07-04 11:18:41 -07:00
Peter Steinberger
66015762a3 feat(gateway-protocol): add terminal.* RPC methods and events 2026-07-04 11:18:41 -07:00
Dallin Romney
9f07e01fc0 refactor: reuse shared number clamp (#99786) 2026-07-04 11:16:38 -07:00
Peter Steinberger
d9dbee7676 docs(cli): correct bare openclaw routing in onboard reference
Bare openclaw does not open Crestodian once config has authored settings.
Document the actual three-way routing: missing/unauthored config starts
classic onboarding, invalid config starts Crestodian for repair, valid
config opens the normal agent TUI (local or reachable configured Gateway),
with /crestodian or openclaw crestodian as the explicit entry points.
Matches resolveBareRootLaunchTarget in src/cli/run-main.ts.
2026-07-04 19:11:11 +01:00
Dallin Romney
d96db362bd refactor(voice-call): reuse webhook path normalization (#99766) 2026-07-04 10:53:07 -07:00
Vincent Koc
3d3a29413a fix(agents): replay images across cli fallback (#100035) 2026-07-04 10:50:42 -07:00
Dallin Romney
fab30c352e test(qa): exercise real cli channel picker (#99717) 2026-07-04 10:48:49 -07:00