Commit Graph

23487 Commits

Author SHA1 Message Date
Peter Steinberger
354bc01f29 ci: raise test workflow timeouts 2026-03-29 16:00:51 +01:00
Peter Steinberger
637b4c8193 refactor: move remaining provider policy into plugins 2026-03-29 23:05:58 +09:00
Peter Steinberger
edc58a6864 refactor: generalize provider transport hooks 2026-03-29 23:05:58 +09:00
Peter Steinberger
8109195ad8 fix(plugin-sdk): avoid recursive bundled facade loads 2026-03-29 15:00:25 +01:00
Peter Steinberger
24d16c39ad refactor(plugin-sdk): remove source alias residue 2026-03-29 14:53:03 +01:00
Peter Steinberger
e6116769b4 build(plugin-sdk): verify dist facade exports 2026-03-29 14:53:03 +01:00
Peter Steinberger
2c9bc0bb78 chore(deps): bump workspace dependencies 2026-03-29 14:41:58 +01:00
Peter Steinberger
2dd29db464 fix: ease bundled browser plugin recovery 2026-03-29 22:39:30 +09:00
Peter Steinberger
f1af7d66d2 chore: bump version to 2026.3.29 2026-03-29 14:33:12 +01:00
Thomas M
0a01386756 fix: canonicalize session keys at write time (#30654) (thanks @thomasxm)
* fix: canonicalize session keys at write time to prevent orphaned sessions (#29683)

resolveSessionKey() uses hardcoded DEFAULT_AGENT_ID="main", but all read
paths canonicalize via cfg. When the configured default agent differs
(e.g. "ops" with mainKey "work"), writes produce "agent:main:main" while
reads look up "agent:ops:work", orphaning transcripts on every restart.

Fix all three write-path call sites by wrapping with
canonicalizeMainSessionAlias:
- initSessionState (auto-reply/reply/session.ts)
- runWebHeartbeatOnce (web/auto-reply/heartbeat-runner.ts)
- resolveCronAgentSessionKey (cron/isolated-agent/session-key.ts)

Add startup migration (migrateOrphanedSessionKeys) to rename existing
orphaned keys to canonical form, merging by most-recent updatedAt.

* fix: address review — track agent IDs in migration map, align snapshot key

P1: migrateOrphanedSessionKeys now tracks agentId alongside each store
path in a Map instead of inferring from the filesystem path. This
correctly handles custom session.store templates outside the default
agents/<id>/ layout.

P2: Pass the already-canonicalized sessionKey to getSessionSnapshot so
the heartbeat snapshot reads/restores use the same key as the write path.

* fix: log migration results at all early return points

migrateOrphanedSessionKeys runs before detectLegacyStateMigrations, so
it can canonicalize legacy keys (e.g. "main" → "agent:main:main") before
the legacy detector sees them. This caused the early return path to skip
logging, breaking doctor-state-migrations tests that assert log.info was
called.

Extract logMigrationResults helper and call it at every return point.

* fix: handle shared stores and ~ expansion in migration

P1: When session.store has no {agentId}, all agents resolve to the same
file. Track all agentIds per store path (Map<path, Set<id>>) and run
canonicalization once per agent. Skip cross-agent "agent:main:*"
remapping when "main" is a legitimate configured agent sharing the store,
to avoid merging its data into another agent's namespace.

P2: Use expandHomePrefix (environment-aware ~ resolution) instead of
os.homedir() in resolveStorePathFromTemplate, matching the runtime
resolveStorePath behavior for OPENCLAW_HOME/HOME overrides.

* fix: narrow cross-agent remap to provable orphan aliases only

Only remap agent:main:* keys where the suffix is a main session alias
("main" or the configured mainKey). Other agent:main:* keys — hooks,
subagents, cron sessions, per-sender keys — may be intentional
cross-agent references and must not be silently moved into another
agent's namespace.

* fix: run orphan-key session migration at gateway startup (#29683)

* fix: canonicalize cross-agent legacy main aliases in session keys (#29683)

* fix: guard shared-store migration against cross-agent legacy alias remap (#29683)

* refactor: split session-key migration out of pr 30654

---------

Co-authored-by: Your Name <your_email@example.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-29 18:59:25 +05:30
Peter Steinberger
e0f0a1aa1f docs: clarify browser allowlist troubleshooting 2026-03-29 22:19:22 +09:00
wangchunyue
2c8c4e45f1 fix: preserve fallback prompt on model fallback for new sessions (#55632) (thanks @openperf)
* fix(agents): preserve original task prompt on model fallback for new sessions

* fix(agents): use dynamic transcript check for sessionHasHistory on fallback retry

Address Greptile review feedback: replace the static !isNewSession flag
with a dynamic sessionFileHasContent() check that reads the on-disk
transcript before each fallback retry. This correctly handles the edge
case where the primary model completes at least one assistant-response
turn (flushing the user message to disk) before failing - the fallback
now sends the recovery prompt instead of duplicating the original body.

The !isNewSession short-circuit is kept as a fast path so existing
sessions skip the file read entirely.

* fix(agents): address security vulnerabilities in session fallback logic

Fixes three medium-severity security issues identified by Aisle Security Analysis on PR #55632:
- CWE-400: Unbounded session transcript read in sessionFileHasContent()
- CWE-400: Symlink-following in sessionFileHasContent()
- CWE-201: Sensitive prompt replay to a different fallback provider

* fix(agents): use JSONL parsing for session history detection (CWE-703)

Replace bounded byte-prefix substring matching in sessionFileHasContent()
with line-by-line JSONL record parsing. The previous approach could miss
an assistant message when the preceding user content exceeded the 256KB
read limit, causing a false negative that blocks cross-provider fallback
entirely.

* fix(agents): preserve fallback prompt across providers

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-29 18:35:45 +05:30
wangchunyue
fc3f6fa51f fix: preserve node exec cwd on remote hosts (#50961) (thanks @openperf)
* fix(gateway): skip local workdir resolution for remote node execution

* chore: add inline comment for non-obvious node workdir skip

* fix: preserve node exec cwd on remote hosts (#50961) (thanks @openperf)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-29 17:46:49 +05:30
Tak Hoffman
5f85c4e69f Docs: add runtime semantics guidance to AGENTS 2026-03-29 06:57:56 -05:00
Ayaan Zaidi
ee701d6bad build: bump Android version to 2026.3.29 2026-03-29 17:15:23 +05:30
Mariano
92d0b3a557 Gateway: abstract task registry storage (#56927)
Merged via squash.

Prepared head SHA: 8db9b860e8
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
2026-03-29 12:58:06 +02:00
Mariano
17c36b5093 Gateway: track background task lifecycle (#52518)
Merged via squash.

Prepared head SHA: 7c4554204e
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
2026-03-29 12:48:02 +02:00
Peter Steinberger
270d0c5158 fix: avoid telegram plugin self-recursive sdk imports 2026-03-29 11:32:29 +01:00
Luke
88ca0b2c3f fix(status): handle node-only hosts on current main (#56718)
* Status: handle node-only hosts

* Status: address follow-up review nits

* Changelog: note node-only status fix

* Status: lazy-load node-only helper
2026-03-29 21:12:08 +11:00
nanakotsai
571da81a35 fix: keep openai-codex on HTTP responses transport 2026-03-29 15:04:38 +05:30
Vincent Koc
e06069c8c2 fix(sandbox): add CJK fonts to browser image (#56905) 2026-03-29 18:21:51 +09:00
助爪
443295448c Track ACP sessions_spawn runs and emit ACP lifecycle events (#40885)
* Fix ACP sessions_spawn lifecycle tracking

* fix(tests): resolve leftover merge markers in sessions spawn lifecycle test

* fix(agents): clarify acp spawn cleanup semantics

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-03-29 18:20:10 +09:00
Vincent Koc
a7a89fb680 fix(ci): retry actionlint release downloads 2026-03-29 18:11:38 +09:00
xingjie zhou
81193336d0 fix(acpx): read ACPX_PINNED_VERSION from package.json instead of hard… (#49089)
* fix(acpx): read ACPX_PINNED_VERSION from package.json instead of hardcoding

The hardcoded ACPX_PINNED_VERSION ("0.1.16") falls out of sync with the bundled acpx version in package.json every release, causing ACP runtime to be marked unavailable due to version mismatch (see #43997).

* Validate and sanitize ACPX version retrieval

Add validation for acpx version from package.json
2026-03-29 18:05:55 +09:00
Frank Yang
5adc50ce6b docs(changelog): add slack status reactions entry 2026-03-29 16:57:47 +08:00
Vincent Koc
7c50138f62 fix(plugins): keep built cli metadata scans lightweight 2026-03-29 17:55:17 +09:00
Hsiao A
cea7162490 feat(slack): status reaction lifecycle for tool/thinking progress indicators (#56430)
Merged via squash.

Prepared head SHA: 1ba5df3e3b
Co-authored-by: hsiaoa <70124331+hsiaoa@users.noreply.github.com>
Co-authored-by: frankekn <4488090+frankekn@users.noreply.github.com>
Reviewed-by: @frankekn
2026-03-29 16:49:53 +08:00
Vincent Koc
e28fdb08b8 docs: add LINE ACP support and plugin requireApproval hook docs
- LINE: document ACP conversation binding support (#45826)
- Plugins: document requireApproval in before_tool_call hook semantics (#55339)
2026-03-29 17:45:26 +09:00
Vincent Koc
2899ce5198 Update CHANGELOG.md 2026-03-29 17:42:04 +09:00
Vincent Koc
af694def5b fix(agents): fail closed on silent turns (#52593)
* fix(agents): fail closed on silent turns

* fix(agents): suppress all silent turn emissions

* fix(agents): pass silent turns into embedded subscribe
2026-03-29 17:40:20 +09:00
Vincent Koc
f897aba69a docs: add missing feature docs for Matrix E2EE thumbnails, LINE media, and CJK memory
- Matrix: note encrypted thumbnail behavior in E2EE rooms (#54711)
- LINE: add outbound media section for image/video/audio sends (#45826)
- Memory: document CJK trigram tokenization and chunk sizing
2026-03-29 17:26:02 +09:00
Vincent Koc
3aac43e30b docs: remove stale MiniMax M2.5 refs and add image generation docs
After the M2.7-only catalog trim (#54487), update 10 docs files:
- Replace removed M2.5/VL-01 model references across FAQ, wizard,
  config reference, local-models, and provider pages
- Make local-models guide model-agnostic (generic LM Studio placeholder)
- Add image-01 generation section to minimax.md
- Leave third-party catalogs (Synthetic, Venice) unchanged
2026-03-29 17:26:02 +09:00
Vincent Koc
57882f0351 fix(web-search): localize shared search cache (#54040)
* fix(web-search): localize shared search cache

* docs(changelog): note localized web search cache

* test(web-search): assert module-local cache behavior

* Update CHANGELOG.md
2026-03-29 17:25:07 +09:00
Vignesh Natarajan
4d54376483 Tests: stabilize shard-2 queue and channel state 2026-03-29 01:12:58 -07:00
Vignesh Natarajan
9c185faba9 Agents: cover subagent memory tool policy 2026-03-29 01:12:58 -07:00
factnest365-ops
6c85c82ba3 fix: allow memory_search and memory_get in sub-agent sessions
Remove memory_search and memory_get from SUBAGENT_TOOL_DENY_ALWAYS.

These are read-only tools with no side effects that are essential for
multi-agent setups relying on shared memory for context retrieval.

Rationale:
- Read-only tools (memory_search, memory_get) have no side effects and
  cannot modify state, send messages, or affect external systems
- Other read-only tools (read, web_search, web_fetch) are already
  available to sub-agents by default
- Multi-agent deployments with shared knowledge depend on memory tools
  for context retrieval
- The workaround (tools.subagents.tools.alsoAllow) works but requires
  manual configuration that contradicts memorySearch.enabled: true

Fixes #55385
2026-03-29 01:12:58 -07:00
Peter Steinberger
341e617c84 docs(plugins): refresh bundled plugin runtime docs 2026-03-29 09:10:39 +01:00
Peter Steinberger
caeeecf399 refactor(test): centralize bundled channel test roots 2026-03-29 09:10:39 +01:00
Peter Steinberger
8e0ab35b0e refactor(plugins): decouple bundled plugin runtime loading 2026-03-29 09:10:38 +01:00
Vincent Koc
1738d540f4 fix(gateway/auth): local trusted-proxy fallback to require token auth (#54536)
* fix(auth): improve local request and trusted proxy handling

* fix(gateway): require token for local trusted-proxy fallback

* docs(changelog): credit trusted-proxy auth fix

* Update src/gateway/auth.ts

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix(gateway): fail closed on forwarded local detection

* docs(gateway): clarify fail-closed local detection

* fix(gateway): harden trusted-proxy local fallback

* fix(gateway): align trusted-proxy loopback validation

* Update CHANGELOG.md

---------

Co-authored-by: “zhangning” <zhangning.2025@bytedance.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-29 17:05:00 +09:00
Vincent Koc
9777781001 fix(subagents): preserve requester agent for inline announces (#55998)
* fix(subagents): preserve requester agent on inline announce

* docs(changelog): remove maintainer follow-up entry
2026-03-29 17:00:05 +09:00
Vincent Koc
d6a4ec6a3d fix(telegram): sanitize invalid stream-order errors (#55999)
* fix(telegram): sanitize invalid stream order errors

* docs(changelog): remove maintainer follow-up entry
2026-03-29 16:59:15 +09:00
Vincent Koc
aec58d4cde fix(agents): repair btw reasoning and oauth snapshot refresh (#56001)
* fix(agents): repair btw reasoning and oauth snapshot refresh

* Update CHANGELOG.md

* test(agents): strengthen btw reasoning assertion
2026-03-29 16:58:49 +09:00
Peter Steinberger
f4d60478c9 test: reset plugin runtime state in optional tools tests 2026-03-29 08:52:12 +01:00
Ted Li
ebb919e311 fix: prefer transcript model in sessions list (#55628) (thanks @MonkeyLeeT)
* gateway: prefer transcript model in sessions list

* gateway: keep live subagent model in session rows

* gateway: prefer selected model until runtime refresh

* gateway: simplify session model identity selection

* gateway: avoid transcript model fallback on cost-only reads
2026-03-29 13:20:55 +05:30
Vignesh Natarajan
08b5206b19 chore(test): harden channel plugin registry against malformed runtime state 2026-03-29 00:47:39 -07:00
Vignesh Natarajan
8bdb518bde Memory/LanceDB: fix bundled runtime manifest lookup (#56623) 2026-03-29 00:37:46 -07:00
Peter Steinberger
c48e0f8e6a style: normalize import order and formatting 2026-03-29 16:33:22 +09:00
Peter Steinberger
04c976b43d refactor(markdown): share render-aware chunking 2026-03-29 16:33:22 +09:00
Peter Steinberger
c664b67796 fix: apply Mistral compat across proxy transports 2026-03-29 16:32:31 +09:00