- Introduced a new `document_histories` table to track changes made to documents, including fields for `editor_data`, `save_source`, and `saved_at`.
- Updated foreign key relationships to link `document_histories` with `documents` and `users`.
- Modified existing models and tests to accommodate the new document history functionality, including changes to pagination and retrieval methods.
- Removed the versioning system from documents in favor of a more flexible history tracking approach.
Signed-off-by: Innei <tukon479@gmail.com>
* ♻️ refactor: remove @lobehub/chat-plugin-sdk dependency
Plugins have been deprecated. This removes the SDK entirely:
- Define built-in ToolManifest, ToolManifestSettings, ToolErrorType types
- Delete src/features/PluginsUI/ (plugin iframe rendering)
- Delete src/store/tool/slices/oldStore/ (deprecated plugin store)
- Delete src/server/services/pluginGateway/ (plugin gateway)
- Delete src/app/(backend)/webapi/plugin/gateway/ (plugin API route)
- Migrate all ~50 files from SDK imports to @lobechat/types
- Remove @lobehub/chat-plugin-sdk, @lobehub/chat-plugins-gateway deps
- Remove @swagger-api/apidom-reference override and patch
Fixes LOBE-6655
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 🐛 fix: add missing getInstalledPlugins mock in customPlugin test
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 🔧 chore: increase Vercel build memory limit to 8192MB
The 6144MB limit was causing OOM during Vite SPA chunk rendering.
Aligned with other build commands that already use 8192MB.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* ♻️ refactor: unify default tool type to builtin and fix CustomRender
- Remove `invokeDefaultTypePlugin` — default type now falls through to builtin in both server and client execution paths
- Fix `CustomRender` to actually render builtin tool components via `getBuiltinRender` instead of always returning null
- Increase SPA build memory limit from 7168MB to 8192MB to fix OOM
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* ♻️ refactor: remove legacy plugin gateway and type-specific invocations
- Delete `runPluginApi`, `internal_callPluginApi`, `invokeMarkdownTypePlugin`, `invokeStandaloneTypePlugin`
- Remove plugin gateway endpoint (`/webapi/plugin/gateway`) from URL config
- Remove special `builtin → default` runtimeType mapping in plugin model
- Clean up unused imports and related tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 🐛 fix: add 'builtin' to runtimeType union to fix type error
Use ToolManifestType instead of inline union for runtimeType fields
so that 'builtin' is included as a valid type.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* ✨ docs: add screenshots to Telegram channel guide
* 📝 docs: Remove "feature in development" callout and developer mode requirement from channels documentation.
* docs: Migrate Telegram channel images to local assets and update CDN cache.
* docs: Add screenshots to channel setup guides for various platforms.
* chore: Update documentation image paths from GitHub user attachments to local blog assets.
---------
Co-authored-by: Rdmclin2 <rdmclin2@gmail.com>
* ✨ feat(onboarding): add agent-guided web onboarding flow
Made-with: Cursor
* Update onboarding prompts
Co-authored-by: Codex <noreply@openai.com>
* 🐛 fix web onboarding builtin tool flow
* ✨ feat(onboarding): enhance agent onboarding flow with new dimensions and refined rules
- Updated onboarding structure to include new nodes: agentIdentity, userIdentity, workStyle, workContext, and painPoints.
- Revised system role instructions to emphasize a conversational approach and concise interactions.
- Adjusted manifest and type definitions to reflect the new onboarding schema.
- Implemented tests to ensure proper functionality of the onboarding context and flow.
This update aims to improve user experience during onboarding by making it more engaging and structured.
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat(onboarding): enhance onboarding experience with localized welcome messages and interaction hints
- Added localized welcome messages for onboarding in English and Chinese.
- Refactored system role handling to support dynamic interaction hints based on user locale.
- Updated onboarding context to include interaction hints for improved user engagement.
- Implemented tests to validate the new interaction hint functionality.
This update aims to create a more personalized and engaging onboarding experience for users across different languages.
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat(onboarding): overhaul onboarding flow with new question structure and refined interaction rules
- Replaced existing interaction hints with a focused question structure to enhance user engagement.
- Updated system role instructions to clarify onboarding protocols and improve conversational flow.
- Refactored type definitions and manifest to align with the new onboarding schema.
- Removed deprecated interaction hint components and tests to streamline the codebase.
This update aims to create a more structured and engaging onboarding experience for users, ensuring clarity and efficiency in interactions.
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat(onboarding): introduce builtin agent onboarding package with structured roles and prompts
- Added a new package for agent onboarding, including a package.json configuration and initial TypeScript files.
- Implemented system role templates and tool prompts to guide the onboarding process.
- Established a client interface for rendering questions and handling user interactions.
- Updated dependencies in related packages to integrate the new onboarding functionality.
This update aims to enhance the onboarding experience by providing a structured approach for agents, ensuring clarity and efficiency in user interactions.
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat(onboarding): enhance agent onboarding with new question renderer and refined interaction logic
- Introduced a new `QuestionRendererView` component to streamline the rendering of onboarding questions.
- Refactored the `QuestionRenderer` to utilize a runtime hook for improved state management and separation of concerns.
- Updated the onboarding context to fallback to stored questions when the current question is empty, enhancing user experience.
- Simplified the onboarding API by removing unnecessary read token requirements from various endpoints.
- Added tests to validate the new question rendering logic and ensure proper functionality.
This update aims to create a more efficient and user-friendly onboarding experience by improving the question handling and rendering process.
Signed-off-by: Innei <tukon479@gmail.com>
* Add dev history view for onboarding
* remove: prosetting
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat(onboarding): inline response language step in agent conversation
- Add ResponseLanguageInlineStep and wire into Conversation flow
- Extend agent onboarding context and update ResponseLanguageStep route
- Add tests and onboarding agent document design spec
Made-with: Cursor
* ✨ feat(onboarding): enhance onboarding flow with inbox integration and schema refactor
- Updated onboarding process to migrate conversation topics to the inbox upon completion, ensuring users can revisit their onboarding discussions.
- Introduced a new schema-driven normalizer and node handler registry to streamline onboarding data handling, reducing code duplication and improving maintainability.
- Added comprehensive tests for new document builders and onboarding service methods to ensure functionality and reliability.
- Refactored existing components to support the new onboarding structure and improve user experience.
This update aims to create a more cohesive onboarding experience by integrating user identity data into the inbox and simplifying the underlying code structure.
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat(agent-documents): add listDocuments, readDocumentByFilename, upsertDocumentByFilename APIs
* ✨ feat(onboarding): add generic user interaction builtin tool
* ✨ feat(onboarding): wire generic tool interaction semantics
Register user-interaction tool in builtin-tools registry with manifest,
intervention components, client executor, and server runtime. Extend
BuiltinInterventionProps with interactionMode and onInteractionAction
to support custom (non-approval) interaction UIs. Add submit/skip/cancel
actions to conversation store with full operation lifecycle management.
* 🔧 fix: add builtin-tool-user-interaction to root workspace dependencies
* ♻️ refactor(onboarding): remove onboarding-owned question persistence
Drop askUserQuestion from the web-onboarding tool and remove
questionSurface from persisted state. Question presentation is now
delegated to the generic lobe-user-interaction tool.
* ♻️ refactor(onboarding): switch UI to generic interaction tool
Enable UserInteraction and AgentDocuments tools in web-onboarding and
inbox agent configs. Remove obsolete inline question renderers
(QuestionRenderer, QuestionRendererView, questionRendererRuntime,
questionRendererSchema, ResponseLanguageInlineStep) and simplify
Conversation component to only render summary CTA.
* 🔥 refactor(onboarding): remove identity doc and rewrite soul sync
* 🐛 fix(user-interaction): add humanIntervention to manifest and implement form UI
* 🐛 fix(onboarding): create user message on interaction submit instead of re-executing tool
* ♻️ refactor(onboarding): rebuild generic interaction flow
Align agent/tool roles and onboarding UI/runtime around the generic interaction rebuild.
Made-with: Cursor
* ✨ feat(onboarding): implement onboarding document and persona management
Introduce a new onboarding document structure that separates agent identity and user persona data. Replace existing `readSoulDocument` and `updateSoulDocument` APIs with `readDocument` and `updateDocument` to handle both SOUL.md and user persona documents. Update related services, client executors, and localization keys to reflect these changes. Ensure document updates are driven by the agent, allowing for incremental updates and improved content management.
Signed-off-by: Innei <tukon479@gmail.com>
* refactor
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat(workflow): introduce unified tool call collapse UI and supporting components
Add a new workflow collapse feature that groups tool calls and reasoning into a single collapsible unit, enhancing the user interface for tool call progress. This includes the creation of several components: `WorkflowCollapse`, `WorkflowSummary`, `WorkflowExpandedList`, `WorkflowToolLine`, and `WorkflowReasoningLine`. Update the design specifications and implementation plans to reflect this new structure, aiming for a more cohesive and user-friendly experience.
Signed-off-by: Innei <tukon479@gmail.com>
* feat(types): add discovery pacing types and constant
* feat(onboarding): add countTopicUserMessages and pacing gate to derivePhase
* feat(onboarding): capture discovery baseline and return pacing data in getState
* ✨ feat(onboarding): add pacing hints to discovery phase tool result
* test(onboarding): add discovery pacing gate tests
* ♻️ refactor(onboarding): soften discovery pacing gate and add early exit exception
- MIN_DISCOVERY_USER_MESSAGES lowered from 4 to 2 (hard floor)
- RECOMMENDED_DISCOVERY_USER_MESSAGES = 4 (advisory hint)
- Tool protocol rule 2 now has explicit early exit exception
- Pacing hint text changed from imperative to advisory
* ✨ feat(onboarding): update .gitignore and remove outdated onboarding plans
- Added `docs/superpowers` to .gitignore to exclude documentation files from version control.
- Deleted several outdated onboarding implementation plans, including those for onboarding inbox integration, generic interaction rebuild, and user question simplification, to streamline project documentation.
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat(onboarding): refine agent onboarding, streaming, and AskUserQuestion
Made-with: Cursor
* ✨ feat(store): add pending interventions selector
* 🐛 fix(store): handle standalone tool messages and structural children traversal in pending interventions selector
* ✨ feat(conversation): create InterventionBar component
Add InterventionBar UI component with tab bar for multiple pending
interventions, reusing the existing Intervention detail component.
* 🐛 fix(conversation): use stable toolCallId for active tab state and add min-height: 0
Track active intervention by toolCallId instead of array index to prevent
stale selection when interventions are resolved. Add min-height: 0 to
scrollable content for correct overflow in flex column layout.
* feat(chatinput): show InterventionBar when pending interventions exist
* feat(tool): collapse inline intervention to one-line summary with scroll-to-bottom
* feat(i18n): add intervention bar translation keys
* 🐛 fix(chatinput): prevent infinite render loop from pendingInterventions selector
* 🐛 fix(chatinput): use equality function for pendingInterventions to break render loop
* refactor(tool): remove CollapsedIntervention, return null for pending inline
* feat(i18n): add form.other translation key
* feat(tool): add styles for select field with Other option
* feat(tool): add SelectFieldInput with Other option row
* feat(tool): wire SelectFieldInput and update validation in AskUserQuestion
* fix(tool): add keyboard handler to Other row, fix label flex
* refactor(tool): restore Select dropdown, add Other toggle row below
* refactor(tool): change Other to form-level escape hatch, restore antd Select
* refactor(tool): replace checkbox toggle with minimal text link escape hatch
* feat(tool): use lucide icons, auto-focus on escape toggle, createStaticStyles
* refactor(onboarding): update onboarding model references and improve styling in ModeSwitch component
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat(onboarding): add greeting entry animation keyframes and card styles
* ✨ feat(onboarding): add LogoThree and entry animations to greeting card
* ✨ feat(onboarding): add View Transition morph from greeting to conversation
* refactor(onboarding): simplify ModeSwitch component by removing segmentedGlass styling
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat(onboarding): increase maximum onboarding steps to 5 and add ProSettingsStep component
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat: enhance user interaction question handling with validation schema
- Introduced Zod validation for askUserQuestion arguments to ensure correct structure.
- Updated test to reflect new question format with fields.
- Added error handling in AskUserQuestion component to log submission errors.
This improves the robustness of user interactions by enforcing schema validation and enhancing error reporting.
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat: enhance agent metadata handling and onboarding synchronization
- Updated `useAgentMeta` to prioritize custom titles from the database, falling back to the default Lobe AI title if none exists.
- Integrated `refreshBuiltinAgent` into the onboarding process to ensure the latest agent data is reflected during user interactions.
- Adjusted the `InboxItem` component to display the correct agent title and avatar based on the updated metadata.
- Refactored optimistic update actions to improve message handling and synchronization across components.
This improves the user experience by ensuring that the most relevant agent information is displayed and updated in real-time during onboarding and conversation flows.
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat: enhance conversation lifecycle and onboarding agent synchronization
- Updated `ConversationLifecycleActionImpl` to include additional context parameters (agentId, groupId, threadId, topicId) when updating message plugins for aborted interactions.
- Integrated `refreshBuiltinAgent` for the inbox during the onboarding process to ensure the latest agent data is synchronized.
These changes improve the handling of conversation lifecycle events and ensure that onboarding reflects the most current agent information, enhancing user experience during interactions.
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat: implement agent onboarding feature toggle and enhance ModeSwitch component
- Introduced `AGENT_ONBOARDING_ENABLED` configuration to control the visibility of the agent onboarding options.
- Updated `ModeSwitch` component to conditionally render onboarding options based on the feature toggle.
- Enhanced tests for `ModeSwitch` to cover scenarios for both enabled and disabled states of agent onboarding.
- Refactored `AgentOnboardingRoute` to navigate to the classic onboarding if the agent onboarding feature is disabled.
These changes improve the onboarding experience by allowing dynamic control over the agent onboarding feature, ensuring that users only see relevant options based on the configuration.
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat: update agent onboarding feature toggle to include development mode
- Modified `AGENT_ONBOARDING_ENABLED` to also activate in development mode using `isDev`.
- This change allows for easier testing and development of the agent onboarding feature without needing to alter production configurations.
Signed-off-by: Innei <tukon479@gmail.com>
* Prevent welcome message when onboard
* 🐛 fix: satisfy ToolExecutionContext and updateMessageTools typings
Made-with: Cursor
* 🐛 fix: update tests for custom builtin agent title and discovery phase constants
* 🐛 fix: use custom inbox agent title and avatar in InboxWelcome
* 🧹 chore(onboarding): remove HistoryPanel unit test
Made-with: Cursor
* 🐛 fix: add missing onboarding/agent and onboarding/classic routes to desktop config
* ✅ test: fix failing tests for onboarding container, document helpers, and executor
* ✅ test: mock LogoThree to prevent Spline runtime fetch errors in CI
---------
Signed-off-by: Innei <tukon479@gmail.com>
Co-authored-by: Codex <noreply@openai.com>
* ✨ 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>
* 🗃️ chore: add agent task system database schema
Add 6 new tables for the Agent Task System:
- tasks: core task with tree structure, heartbeat, scheduling
- task_dependencies: inter-task dependency graph (blocks/relates)
- task_documents: MVP workspace document pinning
- task_topics: topic tracking with handoff (jsonb) and review results
- task_comments: user/agent comments with author tracking (text id: cmt_)
- briefs: unresolved notification system (text id: brf_)
All sub-tables include userId FK for row-level user isolation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 🗃️ chore: add self-referential FK on tasks.parentTaskId (ON DELETE SET NULL)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 🐛 fix: use foreignKey() for self-referential parentTaskId to avoid TS circular inference
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 🗃️ chore: add FK on task_topics.topic_id → topics.id (ON DELETE SET NULL)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 🐛 fix: resolve pre-existing TS type-check errors
- Fix i18next defaultValue type (string | null → string)
- Fix i18next options type mismatches
- Fix fieldTags.webhook possibly undefined
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 🗃️ chore: add FK on tasks.currentTopicId → topics.id (ON DELETE SET NULL)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 🗃️ chore: add FK constraints for assignee, author, topic, and parent fields
- tasks.assigneeUserId → users.id (ON DELETE SET NULL)
- tasks.assigneeAgentId → agents.id (ON DELETE SET NULL)
- tasks.parentTaskId → tasks.id (ON DELETE SET NULL)
- tasks.currentTopicId → topics.id (ON DELETE SET NULL)
- task_comments.authorUserId → users.id (ON DELETE SET NULL)
- task_comments.authorAgentId → agents.id (ON DELETE SET NULL)
- task_topics.topicId → topics.id (ON DELETE SET NULL)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 🗃️ chore: change task_topics.topicId FK to ON DELETE CASCADE
Topic deleted → task_topic mapping row removed (not just nulled).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* ♻️ refactor: use inline .references() for currentTopicId FK
No circular inference issue — only parentTaskId (self-ref) needs foreignKey().
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 🗃️ chore: add FK on task_comments.briefId and topicId (ON DELETE SET NULL)
- task_comments.briefId → briefs.id (SET NULL)
- task_comments.topicId → topics.id (SET NULL)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* ♻️ refactor: merge briefs table into task.ts to fix circular dependency
brief.ts imported task.ts (briefs.taskId FK) and task.ts imported
brief.ts (taskComments.briefId FK), causing circular dependency error.
Merged briefs into task.ts since briefs are part of the task system.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 🗃️ chore: add FK on tasks.createdByAgentId → agents.id (ON DELETE SET NULL)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 🔨 chore(database): added id_nanoid to replace id using seq and identity
* 🔨 chore(database): assgin database id column value to id_nanoid
* 🔨 chore(database): update dbml
* 🔨 chore(database): add not null & unique index
* 🔨 chore(database): drop foreign key dependency, switch to depend on id_nanoid
* 🔨 chore(database): switch to use id_nanoid as primary key
* 🔨 chore(database): drop old id column
* 🔨 chore(database): rename id_nanoid to id
* 🔨 chore(database): remove unique constraint
* 🔨 chore(database): updated dbml
* 🔨 chore(database): incorrect --> statement-breakpoint
* 🔧 chore(vscode): add typescript.tsdk and disable mdx server
Fix MDX extension crash caused by Cursor's bundled TypeScript version
* 🔧 chore(claude): add skills symlink to .claude directory
* 📝 docs: update development guides with current tech stack and architecture
- Update tech stack: Next.js 16 + React 19, hybrid routing (App Router + React Router DOM), tRPC, Drizzle ORM + PostgreSQL, react-i18next
- Update directory structure to reflect monorepo layout (apps/, packages/, e2e/, locales/)
- Expand src/server/ with detailed subdirectory descriptions
- Add complete SPA routing architecture with desktop and mobile route tables
- Add tRPC router grouping details (lambda, async, tools, mobile)
- Add data flow diagram
- Simplify dev setup section to link to setup-development guide
- Fix i18n default language description (English, not Chinese)
- Sync all changes between zh-CN and English versions
* 📝 docs: expand data flow diagram in folder structure guide
Replace the single-line data flow with a detailed layer-by-layer
flow diagram showing each layer's location and responsibility.
* 📝 docs: modernize feature development guide
- Remove outdated clientDB/pglite/indexDB references
- Update schema path to packages/database/src/schemas/
- Update types path to packages/types/src/
- Replace inline migration steps with link to db-migrations guide
- Add complete layered architecture table (Client Service, WebAPI,
tRPC Router, Server Service, Server Module, Repository, DB Model)
- Clarify Client Service as frontend code
- Add i18n handling section with workflow and key naming convention
- Remove verbose CSS style code, keep core business logic only
- Expand testing section with commands, skill refs, and CI tip
* 🔥 docs: remove outdated frontend feature development guide
Content is superseded by the comprehensive feature-development guide
which covers the full chain from schema to testing.
* 📝 docs: add LobeHub ecosystem and community resources
Add official ecosystem packages (LobeUI, LobeIcons, LobeCharts,
LobeEditor, LobeTTS, LobeLint, Lobe i18n, MCP Mark) and community
platforms (Agent Market, MCP Market, YouTube, X, Discord).
* 📝 docs: improve contributing guidelines and resources
- Clarify semantic release triggers (feat/fix vs style/chore)
- Add testing section with Vitest/E2E/CI requirements
- Update contribution steps to include CI check
- Add LobeHub ecosystem packages and community platforms to resources
* 📝 docs: rewrite architecture guide to reflect current platform design
* 📝 docs: add code quality tools to architecture guide
* 📝 docs: rewrite chat-api guide to reflect current architecture
- Update sequence diagram with Agent Runtime loop as core execution engine
- Replace PluginGateway with ToolExecution layer (Builtin/MCP/Plugin)
- Update all path references (model-runtime, agent-runtime, fetch-sse packages)
- Split old AgentRuntime section into Model Runtime + Agent Runtime
- Add tool calling taxonomy: Builtin, MCP, and Plugin (deprecated)
- Add client-side vs server-side execution section
- Remove outdated adapter pseudo-code examples
* 📝 docs: update file paths in add-new-image-model guide
- src/libs/standard-parameters/ → packages/model-bank/src/standard-parameters/
- src/config/aiModels/ → packages/model-bank/src/aiModels/
- src/libs/model-runtime/ → packages/model-runtime/src/providers/
* 📝 docs: restore S3_PUBLIC_DOMAIN in deployment guides
The S3_PUBLIC_DOMAIN env var was incorrectly removed from all
documentation in commit 4a87b31. This variable is still required
by the code (src/server/services/file/impls/s3.ts) to generate
public URLs for uploaded files. Without it, image URLs sent to
vision models are just S3 keys instead of full URLs.
Closes#12161
* 📦 chore: pin @lobehub/ui to 4.33.4 to fix SortableList type errors
@lobehub/ui 4.34.0 introduced breaking type changes in SortableList
where SortableListItem became strict, causing type incompatibility
in onChange and renderItem callbacks across 6 files. Pin to 4.33.4
via pnpm overrides to enforce consistent version across monorepo.
* 🐛 fix: correct ReadableStream type annotations and add dom.asynciterable
- Add dom.asynciterable to tsconfig lib for ReadableStream async iteration
- Fix createCallbacksTransformer return type: TransformStream<string, Uint8Array>
- Update stream function return types from ReadableStream<string> to
ReadableStream<Uint8Array> (llama.ts, ollama.ts, claude.ts)
- Remove @ts-ignore from for-await loops in test files
- Add explicit string[] type for chunks arrays
* Revert "📝 docs: restore S3_PUBLIC_DOMAIN in deployment guides"
This reverts commit 24073f83d3.
* 🔥 chore(docker-compose): remove Casdoor SSO dependency
Casdoor is no longer needed since BetterAuth now supports email/password registration natively.
LOBE-3907
* ♻️ refactor(docker-compose): restructure directories
- Rename local/ to dev/ for development dependencies
- Remove logto/ and zitadel/ from production/
- Restore Casdoor config in production/grafana/
- Simplify dev/ to core services only (postgresql, redis, rustfs, searxng)
- Update docker-compose.development.yml to use dev/
- Remove minio-bucket.config.json (switched to rustfs)
* ♻️ refactor(docker-compose): simplify dev environment setup
- Remove docker-compose.development.yml, use dev/docker-compose.yml directly
- Add npm scripts: dev:docker, dev:docker:down, dev:docker:reset
- Simplify .env.example.development (remove variable refs, redundant vars)
- Update docker-compose/dev/.env.example (consistent passwords)
- Add docker-compose/dev/data/ to .gitignore
- Update setup docs: use npm scripts, remove image generation section
* 🔧 chore: add SSRF_ALLOW_PRIVATE_IP_ADDRESS to dev env example
* 🔒 security: auto-generate KEY_VAULTS_SECRET and AUTH_SECRET in setup.sh
- Remove hardcoded secrets from docker-compose.yml
- Add placeholders to .env.example files
- Generate secrets dynamically in setup.sh using openssl rand -base64 32
* 🔧 chore(docker-compose): expose SearXNG port and improve dev scripts
- Add SearXNG port mapping (8180:8080) for host access
- Use --wait flag in dev:docker to ensure services are healthy
- Include db:migrate in dev:docker:reset for one-command reset
- Update MinIO reference to RustFS in zh-CN docs
- Add SearXNG to service URLs and port conflict docs
* update e2e test
* 📝 docs: Update src directory structure to be more comprehensive
- Add missing directories: business, const, envs, helpers, tools
- Add missing root files: auth.ts, instrumentation.ts, instrumentation.node.ts, proxy.ts
- Update descriptions to be more accurate
- Sync changes across English and Chinese documentation
Fixes#9521
* feat: generate agent_cron_job in agents
* feat: update the db fields
* feat: add trigger/mode in topics table & add group id in cronjob
* feat: update sql
* fix: fixed db migration
* feat: update the test
* ✨ feat: Add browser compatibility detection and fallback page
- Add automatic browser compatibility check in app layout
- Create standalone not-compatible.html fallback page with modern responsive design
- Support dark mode via prefers-color-scheme
- Include browser download links (Chrome, Firefox, Edge, Safari, Arc)
- Display minimum browser requirements
- Update feature development documentation
* 📝 docs(CLAUDE): Update PR Linear Issue Association guidelines
- Clarify the requirement to include magic keywords in PR body for Linear issues.
- Add instruction to summarize work done in the Linear issue comment and update the issue status to "In Review".
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat: Update browser compatibility page and layout
- Change favicon link to absolute path in not-compatible.html.
- Add Safari browser support with corresponding icon and link.
- Update minimum browser requirements to Chrome 99+, Safari 16.4+, and Edge 99+.
- Fix typo in layout.tsx comments from "serveral" to "several".
Signed-off-by: Innei <tukon479@gmail.com>
---------
Signed-off-by: Innei <tukon479@gmail.com>