Skip to content

🚀 release: 20260327#13330

Merged
ONLY-yours merged 90 commits into
mainfrom
release/weekly-20260326
Mar 27, 2026
Merged

🚀 release: 20260327#13330
ONLY-yours merged 90 commits into
mainfrom
release/weekly-20260326

Conversation

@ONLY-yours

@ONLY-yours ONLY-yours commented Mar 27, 2026

Copy link
Copy Markdown
Member

🚀 release: 20260326

This release includes 91 commits. Key updates are below.

  • Agent can now execute background tasks — Agents can perform long-running operations without blocking your conversation. #13289
  • Better error messages — Redesigned error UI across chat and image generation with clearer explanations and recovery options. #13302
  • Smoother topic switching — No more full page reloads when switching topics while an agent is responding. #13309
  • Faster image uploads — Large images are now automatically compressed to 1920px before upload, reducing wait times. #13224
  • Improved knowledge base — Documents are now properly parsed before chunking, improving retrieval accuracy. #13221

Bot Platform

  • WeChat Bot support — You can now connect LobeChat to WeChat, in addition to Discord. #13191
  • Richer bot responses — Bots now support custom markdown rendering and context injection. #13294
  • New bot commands — Added /new to start fresh conversations and /stop to halt generation. #13194
  • Discord stability fixes — Fixed thread creation issues and Redis connection drops. #13228 #13205

Models & Providers

  • GLM-5 is now available in the LobeHub model list. #13189
  • Coding Plan providers — Added support for code planning assistant providers. #13203
  • Tencent Hunyuan 3.0 ImageGen — New image generation model from Tencent. #13166
  • Gemini content handling — Better handling when Gemini blocks content due to safety filters. #13270
  • Claude token limits fixed — Corrected max window tokens for Anthropic Claude models. #13206

Skills & Tools

  • Auto credential injection — Skills can now automatically request and use required credentials. #13124
  • Smarter tool permissions — Built-in tools skip confirmation for safe paths like /tmp. #13232
  • Model switcher improvements — Quick access to provider settings and visual highlight for default model. #13220

Memory

  • Bulk delete memories — You can now delete all memory entries at once. #13161
  • Per-agent memory control — Memory injection now respects individual agent settings. #13265

Desktop App

  • Gateway connection — Desktop app can now connect to LobeHub Gateway for enhanced features. #13234
  • Connection status indicator — See gateway connection status in the titlebar. #13260
  • Settings persistence — Gateway toggle state now persists across app restarts. #13300

CLI

  • API key authentication — CLI now supports API key auth for programmatic access. #13190
  • Shell completion — Tab completion for bash/zsh/fish shells. #13164
  • Man pages — Built-in manual pages for CLI commands. #13200

Security

  • XSS protection — Sanitized search result image titles to prevent script injection. #13303
  • Workflow hardening — Fixed potential shell injection in release automation. #13319
  • Dependency update — Updated nodemailer to address security advisory. #13326

Bug Fixes

  • Fixed skill page not redirecting correctly after import. #13255 #13261
  • Fixed token counting in group chats. #13247
  • Fixed editor not resetting when switching to empty pages. #13229
  • Fixed manual tool toggle not working. #13218
  • Fixed Search1API response parsing. #13207 #13208
  • Fixed mobile topic menus rendering issues. #12477
  • Fixed history count calculation for accurate context. #13051
  • Added missing Turkish translations. #13196

Credits

Huge thanks to these contributors:

@bakiburakogun @hardy-one @Zhouguanyang @sxjeru @hezhijie0327 @arvinxx @cy948 @CanisMinor @Innei @lijian @lobehubbot @neko @rdmclin2 @rivertwilight @tjx666

lobehubbot and others added 30 commits March 20, 2026 17:13
…i/src/controllers (#13146)

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* 🐛 fix: restore eval pass@1 display after compression

* ♻️ refactor: narrow eval compression pass@1 fix scope

* ♻️ refactor: reduce eval compression fix to parser core

* 🐛 fix compressed group indexing type narrowing

* ✅ add conversation-flow compression tests

* ✅ fix orphan structuring test expectation
…ures (#13119)

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: should capture id if dataset has

* fix: should use unique case id
🐛 fix(desktop): bust stable release manifest cache
* chore: bot architecture upgrade

* chore: unify schema definition

* chore: adjust channel schema

* feat: add setting render page

* chore: add i18n files

* chore: tag use field.key

* chore: add i18n files

* chore: add dev mode

* chore: refactor body to header and footer with body

* chore: add dev portal dev

* chore: add showWebhookUrl config

* chore: optimize form render

* feat: add slack channel

* chore: add new bot platform docs

* chore: unify applicationId to replace appId

* chore: add instrumentation file logger

* fix: gateway client error

* feat: support usageStats

* fix: bot settings pass and add  invalidate

* chore: update delete modal title and description

* chore: adjust save and connect button

* chore: support canEdit function

* fix: platform specific config

* fix: enable logic reconnect

* feat: add connection mode

* chore: start  gateway service in local dev env

* chore: default add a thread in channel when on mention at discord

* chore: add necessary permissions for slack

* feat: support charLimt and debounceMS

* chore: add schema maximum and minimum

* chore: adjust debounceMs and charLimit default value

* feat: support reset to default settings

* chore: hide reset when collapse

* fix: create discord bot lost app url

* fix: registry test case

* fix: lint error
chore: spilit feishu with lark and update overview
#13092)

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
🔧 adjust jina timeout setting
Allow Claude Code to push branches and create PRs by upgrading
contents/pull-requests/issues permissions from read to write,
and adding git/gh to allowed tools.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 📝 docs: add changelog entries for Jan–Mar 2026

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: Changelog content

* feat: Changelog content

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: remove calculator from RECOMMENDED_SKILLS

* chore: add default uninstalled builtin list

* fix: ensure uninstall tool loaded

* fix: lint error
fix: add the lost desktop community skill page
* feat: support weixin channel

* chore: rename to wechat

* chore: refact wechat adapter with ilink spec

* feat: add qrcode generate and refresh

* chore: update wechat docs

* fix: qrcode

* chore: remove developer mode restrict

* fix: wechat link error

* chore: add thread typing

* chore: support skip progressMessageId

* fix: discord eye reaction

* chore: resolve CodeQL regex rule

* test: add chat adapter wechat test case

* chore: wechat refresh like discord

* fix: perist token and add typing action

* chore: bot cli support weixin

* fix: database test case
…and image-config (#13169)

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* 👷 build(cli): migrate bundler from tsup to tsdown

Made-with: Cursor

* 🔧 chore(cli): update package.json and tsdown.config.ts dependencies

- Moved several dependencies from "dependencies" to "devDependencies" in package.json.
- Updated the bundling configuration in tsdown.config.ts to simplify the bundling process.

Signed-off-by: Innei <tukon479@gmail.com>

* 🔧 chore(cli): reorganize package.json and tsdown.config.ts

- Moved "fast-glob" from "dependencies" to "devDependencies" in package.json for better clarity.
- Removed the "onlyBundle" option from tsdown.config.ts to streamline the configuration.

Signed-off-by: Innei <tukon479@gmail.com>

* ✨ feat(cli): add shell completion support

---------

Signed-off-by: Innei <tukon479@gmail.com>
* fix anthropic max tokens

* fix anthropic max tokens

* clean

* fix tests
* 🐛 fix(electron): reserve titlebar control space

* 🐛 fix(electron): update titlebar padding for Windows control space
…#13207)

* 🐛 fix: correct Search1API response parsing to match actual API format

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix tests

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
rdmclin2 and others added 19 commits March 26, 2026 16:52
…3294)

* feat: support  bot mardown format

* feat: support custom markdownRender and bot context inject

* feat: support custom PORT

* feat: telegram support html render

* feat: slack support markdown render

* chore: feishu and lark don't handle markdown for now
* ✨ feat: agent task system — CLI, review rubrics, workspace, comments, brief tool split

support import md

Major changes:
- Split task CLI into modular files (task/, lifecycle, topic, doc, review, checkpoint, dep)
- Split builtin-tool-task into task + brief tools (conditional injection)
- Task review uses EvalBenchmarkRubric from @lobechat/eval-rubric
- Task workspace: documents auto-pin via Notebook, tree view with folders
- Task comments system (task_comments table)
- Task topics: dedicated TaskTopicModel with userId, handoff fields, review results
- Heartbeat timeout auto-detection in detail API
- Run idempotency (reject duplicate runs) + error rollback
- Topic cancel/delete by topicId only (no taskId needed)
- Integration tests for task router (13 tests)
- interruptOperation fix (string param, not object)
- Global TRPC error handler in CLI

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

task document workflow

task handoff loop

🗃️ chore: consolidate task system migrations into single 0095

Merged 7 separate migrations (0095-0101) into one:
- tasks, briefs, task_comments, task_dependencies, task_documents, task_topics tables
- All fields including sort_order, resolved_action/comment, review fields
- Idempotent CREATE TABLE IF NOT EXISTS, DROP/ADD CONSTRAINT, CREATE INDEX IF NOT EXISTS

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

fix interruptOperation

topic auto review workflow

topic handoff workflow

finish run topic and brief workflow

support task tool

improve task schema

update

✨ feat: add onComplete hook to task.run for completion callbacks

When agent execution completes, the hook:
- Updates task heartbeat
- Creates a result Brief (on success) with assistant content summary
- Creates an error Brief (on failure) with error message
- Supports both local (handler) and production (webhook) modes

Uses the new Agent Runtime Hooks system instead of raw stepCallbacks.

LOBE-6160 LOBE-6208

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

✨ feat: add Review system — LLM-as-Judge automated review

Task review uses an independent LLM call to evaluate topic output
quality against configurable criteria with pass/fail thresholds.

- TaskReviewService: structured LLM review via generateObject,
  auto-resolves model/provider from user's system agent defaults
- Model: getReviewConfig, updateReviewConfig on TaskModel
- Router: getReview, updateReview, runReview procedures
- CLI: `task review set/view/run` commands
- Auto-creates Brief with review results

LOBE-6165

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

✨ feat: add TaskScheduler, multi-topic execution, and handoff context

- TaskScheduler: interface + Local implementation (setTimeout-based),
  following QueueService dual-mode pattern
- Multi-topic execution: `task run --topics N --delay S` runs N topics
  in sequence with optional delay between them
- Handoff context: buildTaskPrompt() queries previous topics by
  metadata.taskId and injects handoff summaries into the next topic's
  prompt (sliding window: latest full, older summaries only)
- Heartbeat auto-update between topics

LOBE-6161

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

✨ feat: add Heartbeat watchdog + heartbeat CLI

Watchdog scans running tasks with expired heartbeats, marks them as
failed, and creates urgent error Briefs. Heartbeat CLI allows manual
heartbeat reporting for testing.

- Model: refactored to use Drizzle operators (isNull, isNotNull, ne)
  instead of raw SQL where possible; fixed findStuckTasks to skip
  tasks without heartbeat data
- Router: heartbeat (manual report), watchdog (scan + fail + brief)
- Router: updateSchema now includes heartbeatInterval, heartbeatTimeout
- CLI: `task heartbeat <id>`, `task watchdog`, `task edit` with
  --heartbeat-timeout, --heartbeat-interval, --description

LOBE-6161

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

♻️ refactor: move CheckpointConfig to @lobechat/types

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

✨ feat: add task run — trigger agent execution for tasks

Task.run creates a topic, triggers AiAgentService.execAgent with task
context, and streams results via SSE. Supports both agentId and slug.

- Service: added taskId to ExecAgentParams, included in topic metadata
- Router: task.run procedure — resolves agent, builds prompt, calls execAgent,
  updates topic count and heartbeat
- CLI: `task run <id>` command with SSE streaming, --prompt, --verbose

LOBE-6160

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

✨ feat: add Checkpoint system for task review gates

Checkpoint allows configuring pause points in task execution flow.
Supports beforeIds (pause before subtask starts) and afterIds (pause
after subtask completes) on parent tasks.

- Model: CheckpointConfig type, getCheckpointConfig, updateCheckpointConfig,
  shouldPauseBeforeStart, shouldPauseAfterComplete
- Router: getCheckpoint, updateCheckpoint procedures; integrated with
  updateStatus for automatic checkpoint triggering
- CLI: `task checkpoint view/set` commands with --before, --after,
  --topic-before, --topic-after, --on-agent-request options
- Tests: 3 new checkpoint tests (37 total)

LOBE-6162

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

✨ feat: add dependency unlocking on task completion

When a task completes, automatically check and unlock blocked tasks
whose dependencies are all satisfied (backlog → running). Also notify
when all subtasks of a parent are completed.

- Model: getUnlockedTasks, areAllSubtasksCompleted (Drizzle, no raw SQL)
- Router: updateStatus hook triggers unlocking on completion
- CLI: shows unlocked tasks and parent completion notification
- Tests: 3 new tests (34 total)

LOBE-6164

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

✨ feat: add Brief system — schema, model, router, CLI

Brief is a universal Agent-to-User reporting mechanism, not limited to
Tasks. CronJobs, Agents, and future systems can all produce Briefs.

- Schema: briefs table with polymorphic source (taskId, cronJobId, agentId)
- Model: BriefModel with CRUD, listUnresolved (Daily Brief), markRead, resolve
- Router: TRPC brief router with taskId identifier resolution
- CLI: `lh brief` command (list/view/read/resolve)
- Tests: 11 model tests
- Migration: 0096_add_briefs_table.sql

LOBE-6163

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

✨ feat: add Task system — schema, model, router, CLI

Implement the foundational Task system for managing long-running,
multi-topic agent tasks with subtask trees and dependency chains.

- Schema: tasks, task_dependencies, task_documents tables
- Model: TaskModel with CRUD, tree queries, heartbeat, dependencies, document pinning
- Router: TRPC task router with identifier/id resolution
- CLI: `lh task` command (list/view/create/edit/delete/start/pause/resume/complete/cancel/tree/dep)
- Tests: 31 model tests
- Migration: 0095_add_task_tables.sql

LOBE-6036 LOBE-6054

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* update

* 🐛 fix: update brief model import path and add raw-md vitest plugin

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🐛 fix: eslint import sort in vitest config

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🐛 fix: brief ID validation, auto-review retry, and continueTopicId operationId

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🐛 fix: task integration tests — create test agent for FK, fix children spread

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🐛 fix: task integration tests — correct identifier prefix and agent ID

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🐛 fix: remove unused toolsActivatorRuntime import

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🐛 fix: create real topic in task integration tests to satisfy FK constraint

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🐛 fix: type errors in task prompt tests, handoff schema, and activity mapping

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🐛 fix: create real agent/topic/brief records in database model tests for FK constraints

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
)

🐛 fix: persist gateway toggle state across app restarts

The gateway auto-connect logic only checked if the user was logged in,
ignoring whether they had manually disabled the toggle. Added a
`gatewayEnabled` flag to the Electron store that is set on
connect/disconnect and checked before auto-connecting on startup.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🔒 fix: remove SystemJS plugin renderer to eliminate arbitrary JS execution risk

The old plugin render system (ui.mode === 'module') that used SystemJS
to dynamically load and execute JS from untrusted URLs has been fully
retired. Remove SystemJsRender and systemjs dependency entirely.

Ref: GHSA-46v7-wvmj-6vf7

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…#13304)

* ♻️ refactor: remove langchain dependency, use direct document loaders

Replace langchain and @langchain/community with self-implemented text
splitters and direct usage of underlying libraries (pdf-parse, d3-dsv,
mammoth, officeparser, epub2). This eliminates unnecessary dependency
bloat and addresses CVE-2026-26019 in @langchain/community.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🐛 fix: add missing @types/html-to-text and @types/pdf-parse

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ecution (#13309)

Move `e.preventDefault()` before the `disabled || loading` early return
in NavItem's onClick handler. Previously, when a NavItem was in disabled
or loading state, the early return skipped `preventDefault()`, allowing
the underlying `<a>` tag's default navigation to trigger a full browser
page load instead of SPA routing.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…enderer (#13312)

💄 style(conversation): set LexicalRenderer line height in user rich text

Made-with: Cursor
* 🐛 fix: sanitize search grounding image titles to prevent XSS

Replace dangerouslySetInnerHTML with stripHtml() for image result titles
in SearchGrounding and ImageSearchRef components to prevent stored XSS
attacks via malicious search result data.

Ref: GHSA-m5qx-g8hx-5f2p

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🔒 fix: remove SystemJS plugin renderer to eliminate arbitrary JS execution risk

The old plugin render system (ui.mode === 'module') that used SystemJS
to dynamically load and execute JS from untrusted URLs has been fully
retired. Remove SystemJsRender and systemjs dependency entirely.

Ref: GHSA-46v7-wvmj-6vf7

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Revert "🔒 fix: remove SystemJS plugin renderer to eliminate arbitrary JS execution risk"

This reverts commit 99a7603.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… transition (#13320)

* 🐛 fix: prevent first assistant message re-animation on assistantGroup transition

When tool calls arrive during streaming, the message transitions from
assistant to assistantGroup, causing a full React remount. The first
content block's text was re-animating because isGenerating was still
true. Pass isFirstBlock prop through the render chain to disable
animation for the first block, since its text is guaranteed complete
by the time the group forms.

Fixes LOBE-6414

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ♻️ refactor: remove redundant isToolSingleLine animation check

isFirstBlock already covers the first block case, and subsequent blocks
should not have animation disabled just because they are single-line
with tools — they may still be streaming.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nt document injection pipeline (#13315)

* ♻️ refactor: implement SkillResolver to replace ad-hoc skill assembly

Introduces a two-layer skill resolution architecture mirroring ToolsEngine + ToolResolver:

- SkillEngine (assembly layer): accepts raw skills + enableChecker, outputs OperationSkillSet
- SkillResolver (resolution layer): merges operation + step delta + accumulated activations

Key changes:
- Add SkillResolver, OperationSkillSet, StepSkillDelta, ActivatedStepSkill types
- Enhance SkillEngine with enableChecker and generate() method
- Wire SkillResolver into RuntimeExecutors call_llm
- Replace manual skillMetas assembly in aiAgent with SkillEngine.generate()
- Update client-side skillEngineering to use SkillEngine + enableChecker
- Add activatedStepSkills to AgentState for step-level skill accumulation

Fixes: agent-browser content injected into non-desktop scenarios (Discord bot)
due to missing filterBuiltinSkills call in aiAgent

LOBE-6410

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ♻️ refactor: extract agent-templates to standalone package and inject documents server-side

- Create @lobechat/agent-templates package with types, templates, and registry
- Move DocumentLoadPosition, DocumentLoadFormat, DocumentLoadRule, etc. to new package
- Move claw templates (AGENTS, BOOTSTRAP, IDENTITY, SOUL) with .md file imports
- Add BOOTSTRAP.md as new onboarding template (priority 1, system-append)
- Fix template positions: AGENTS→before-system, IDENTITY/SOUL→system-append
- Update database package to re-export from @lobechat/agent-templates
- Migrate all consumers to import directly from @lobechat/agent-templates
- Add agent documents injection in server-side RuntimeExecutors (was missing)
- Support -p CLI flag in devStartupSequence for port configuration

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🐛 fix: correct import statement for non-type exports from agent-templates

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 📦 build: add @lobechat/agent-templates to root dependencies

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ♻️ refactor: remove template proxy files from database package

Stop re-exporting template/templates from database — consumers import
directly from @lobechat/agent-templates. Keep types.ts re-exports for
internal database code only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ♻️ refactor: create BaseSystemRoleProvider to unify system message append pattern

All providers that append to the system message now inherit from
BaseSystemRoleProvider and only implement buildSystemRoleContent().
The base class handles find-or-create and join logic.

Migrated providers:
- EvalContextSystemInjector
- BotPlatformContextInjector
- SystemDateProvider
- ToolSystemRoleProvider
- HistorySummaryProvider
- SkillContextProvider

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🐛 fix: restore metadata tracking in BaseSystemRoleProvider via onInjected hook

Add onInjected() callback to BaseSystemRoleProvider so subclasses can
update pipeline metadata after successful injection. Also add raw-md
plugin to context-engine vitest config for .md imports.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ✨ feat: add enabled field to AgentDocumentInjector config

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ♻️ refactor: add enabled field to all providers, remove spread conditionals in MessagesEngine

All providers now accept an `enabled` config field. MessagesEngine
pipeline is a flat array with no spread conditionals — each provider
is always instantiated and uses `enabled` to skip internally.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 💄 style: clean up MessagesEngine pipeline comments

Remove numbered prefixes, keep descriptive comments for each provider.
Only phase headers use separator blocks.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ♻️ refactor: reorganize MessagesEngine pipeline phases by injection target

Phase 1: History Truncation
Phase 2: System Message Assembly (all BaseSystemRoleProvider)
Phase 3: Context Injection (before first user message, BaseFirstUserContentProvider)
Phase 4: User Message Augmentation (last user message injections)
Phase 5: Message Transformation (flatten, template, variables)
Phase 6: Content Processing & Cleanup (multimodal, tool calls, cleanup)

Moved SkillContext, ToolSystemRole, HistorySummary from Phase 3 to
Phase 2 since they append to system message, not user context.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 💄 style: split Phase 6 into Content Processing (6) and Cleanup (7)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ♻️ refactor: split AgentDocumentInjector into three position-based injectors

- AgentDocumentSystemInjector (Phase 2): before-system, system-append, system-replace
- AgentDocumentContextInjector (Phase 3): before-first-user
- AgentDocumentMessageInjector (Phase 4): after-first-user, context-end

Shared utilities (filterByRules, formatDocument, sortByPriority) extracted
to AgentDocumentInjector/shared.ts. Old monolithic injector removed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ♻️ refactor: split AgentDocumentSystemInjector into three separate injectors

- AgentDocumentBeforeSystemInjector: prepends as separate system message (before-system)
- AgentDocumentSystemAppendInjector: appends to system message (system-append)
- AgentDocumentSystemReplaceInjector: replaces entire system message (system-replace)

Each has distinct semantics and correct pipeline placement:
- BeforeSystem → before SystemRoleInjector
- SystemAppend → after HistorySummary (end of Phase 2)
- SystemReplace → last in Phase 2 (destructive)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ✨ feat: auto-enable agent-documents tool when agent has documents

- Add AgentDocumentsManifest to defaultToolIds
- Add hasAgentDocuments rule in server createServerAgentToolsEngine
- Query agent documents in AiAgentService.execAgent to determine flag
- Pattern matches KnowledgeBase auto-enable via enableChecker rules

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🔨 chore: add agent documents status to execAgent operation log

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* update content

* fix tests

* 🐛 fix: add raw-md plugin to database vitest configs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* ✨ feat: improve error messages for Google AI block reasons and enhance handling of blocked content

* ✨ feat: add error localization for Google provider in createAgentExecutors

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, we are unable to review this pull request

The GitHub API does not allow us to fetch diffs exceeding 300 files, and this pull request has 1021

@vercel

vercel Bot commented Mar 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lobehub (staging) Ready Ready Preview, Comment Mar 27, 2026 3:51am

Request Review

@lobehubbot

Copy link
Copy Markdown
Member

@arvinxx @nekomeowww @rivertwilight - This is the weekly release PR (20260327) touching multiple areas: backend/DB/gateway infrastructure, knowledge base document parsing, desktop gateway connectivity, CLI enhancements, and documentation. Please coordinate review.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 48b5927024

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/server/services/bot/AgentBridgeService.ts
Comment thread src/server/services/bot/AgentBridgeService.ts

@rdmclin2 rdmclin2 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@ONLY-yours ONLY-yours merged commit feb50e7 into main Mar 27, 2026
265 of 266 checks passed
@ONLY-yours ONLY-yours deleted the release/weekly-20260326 branch March 27, 2026 08:04
@lobehubbot

Copy link
Copy Markdown
Member

❤️ Great PR @ONLY-yours ❤️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.