* refactor(agent): move user identity headers to system prompt and sanitize input
- Relocate user-context headers from User Prompt to System Prompt for better instruction adherence.
- Implement soft-sanitization to strip header-like patterns from user input to prevent prompt injection.
- Update resolver logic in Go to support the new prompt structure.
* refactor(agent): move user identity headers to system prompt and sanitize input
- Relocate user-context headers from User Prompt to System Prompt for better instruction adherence.
- Implement soft-sanitization to strip header-like patterns from user input to prevent prompt injection.
- Update resolver logic in Go to support the new prompt structure.
* chore: remove same process in go side
---------
Co-authored-by: Acbox <acbox0328@gmail.com>
Propagate conversation type (direct/group/thread) from channel adapters
all the way to the agent prompt. Store conversation_type on bot_channel_routes
so the bot knows whether a message originates from a p2p chat, group, or thread.
Schema changes are folded into the 0001 init migration (destructive update).
- Rename chat module to conversation with flow-based architecture
- Move channelidentities into channel/identities subpackage
- Add channel/route for routing logic
- Add message service with event hub
- Add MCP providers: container, directory, schedule
- Refactor Feishu/Telegram adapters with directory and stream support
- Add platform management page and channel badges in web UI
- Update database schema for conversations, messages and channel routes
- Add @memoh/shared package for cross-package type definitions
Split business executors from federation sources and migrate unified tool/federation transports to the official go-sdk for stricter MCP compliance and safer session lifecycle handling. Add targeted regression tests for accept compatibility, initialization retries, pending cleanup, and include updated swagger artifacts.
Align channel identity and bind flow across backend and app-facing layers, including generated swagger artifacts and package lock updates while excluding docs content changes.
- Add SetupBotContainer to ContainerLifecycle interface so containers
are automatically created when a bot is created, matching the existing
cleanup-on-delete behavior.
- Refactor schedule tools to use bot-scoped API paths and pass identity
context for proper authorization.
- Introduce dedicated trigger-schedule endpoint in chat resolver with
explicit schedule payload instead of reusing the generic chat path.
- Generate short-lived JWT tokens for schedule trigger callbacks with
resolved bot owner identity.
- Validate required parameters in NewLLMClient and NewOpenAIEmbedder
constructors, returning errors instead of falling back to defaults.
- Add unit tests for schedule token generation and chat resolver.