Commit Graph

242 Commits

Author SHA1 Message Date
BBQ 9dd7135820 refactor(mcp): standard mcpServers input format with type inference
- Accept standard mcpServers item format (command/args/env/url/headers)
- Auto-infer connection type: command -> stdio, url -> http/sse
- Add PUT /bots/:bot_id/mcp/import for batch import from mcpServers dict
- Add GET /bots/:bot_id/mcp/export for standard format export
- Add UpsertMCPConnectionByName SQL for import upsert by name
- Preserve is_active state on import upsert
2026-02-13 00:25:42 +08:00
BBQ 85251a2905 refactor(core): codebase quality cleanup
- Remove user-level model settings (chat_model_id, memory_model_id,
  embedding_model_id, max_context_load_time, language) from users table
- Merge migration 0002 into 0001, remove compatibility migrations
- Delete dead conversation/resolver.go (1177 lines, only flow/resolver.go used)
- Remove type aliases (Chat=Conversation, types_alias.go)
- Fix SQL: remove AND false stub, fix UpdateChatTitle model_id,
  reset model IDs in DeleteSettings, add preauth expiry filter,
  add ListMessages limit, remove 10 dead queries
- Extract shared handler helpers (RequireChannelIdentityID, AuthorizeBotAccess)
- Rename internal/router to internal/channel/inbound
- Fix identity confusion: remove UserID->ChannelIdentityID fallbacks
- Fix all _ = var patterns with proper error logging
- Fix error propagation: storeMessages, rescheduleJob, botContainerID
- Fix naming: ModelId->ModelID, active->is_active, Duration semantic fix
- Remove dead code: mcpService, ReplyTarget, callMCPServer, sshShellQuote,
  buildSessionMetadata, ChatRequest.Language, TriggerPayload.ChatID
- Fix code quality: errors.Is(), remove goto, CreateHuman deprecated
- Remove Enable model endpoint and user-level settings CLI commands
- Regenerate sqlc, swagger, SDK
2026-02-12 23:50:48 +08:00
BBQ 57dd75ff52 refactor(memory): fix naming, dead code, error handling and AgentID support
Normalize JSON tags to snake_case, remove dead fusion branches and unused
struct fields, add proper error logging for BM25 operations, wire AgentID
through filters/store/retrieval, and replace goto with structured control flow.
2026-02-12 23:50:48 +08:00
BBQ c53d35740e feat(deploy): self-contained containerd with embedded MCP image
- Add Dockerfile.containerd: multi-stage build that compiles MCP binary,
  assembles rootfs, creates Docker image tar, and bundles it with containerd
- Add containerd-entrypoint.sh: auto-imports MCP image on first start
- Fix MCP image reference: rename busybox_image to image in config,
  use fully-qualified docker.io/library/memoh-mcp:latest everywhere
- Make image ref configurable via config.toml instead of hardcoded
- Simplify deploy.sh: remove manual nerdctl/containerd-install steps
2026-02-12 23:50:48 +08:00
BBQ e63d335c7e feat(deploy): add containerd-in-docker support for docker compose
Run containerd as a sidecar container instead of requiring host
containerd installation. Server mounts shared docker volumes for
containerd socket, data and state.
2026-02-12 23:50:48 +08:00
Acbox 67120cb582 fix: mcp 2026-02-12 23:43:09 +08:00
Acbox b4797f8c52 fix: web, skills tools 2026-02-12 23:32:23 +08:00
Acbox 287b024887 chore(web): remove @memoh/shared 2026-02-12 22:13:24 +08:00
BBQ 40bb171d48 fix(web): remove duplicate User.ts conflicting with user.ts on case-insensitive fs 2026-02-12 21:54:30 +08:00
BBQ f8633b7501 fix(web): rename Sidebar directory to lowercase for consistency
Rename components/Sidebar to components/sidebar and update import path.
2026-02-12 21:19:56 +08:00
BBQ 4823d164c6 Merge remote-tracking branch 'github/main' into refactor/conversation-channel-gateway-20260212
# Conflicts:
#	internal/chat/types.go
#	internal/conversation/flow/service.go
#	internal/conversation/flow/service_presence_integration_test.go
#	packages/web/src/components/Sidebar/index.vue
#	packages/web/src/utils/request.ts
2026-02-12 21:02:39 +08:00
BBQ 1c15eb2146 refactor(core): restructure conversation/channel/message domains and modernize deployment
- Replace chat package with conversation flow architecture
- Add channel identity avatar support (migration 0002)
- Refactor channel adapters, identities, and message routing
- Update frontend: simplify composables, modernize UI components
- Improve Docker builds with cache mounts and version metadata
- Optimize healthchecks and simplify service dependencies
2026-02-12 20:55:03 +08:00
Ran efe294d5ed Merge branch 'pr/40' 2026-02-12 17:24:24 +08:00
Ran d061f7ac50 chore: update DEVELOPMENT.md 2026-02-12 17:16:10 +08:00
Ran 6acdd191c7 Squashed commit of the following:
commit bcdb026ae43e4f95d0b2c4f9bd440a2df9d6b514
Author: Ran <16112591+chen-ran@users.noreply.github.com>
Date:   Thu Feb 12 17:10:32 2026 +0800

    chore: update DEVELOPMENT.md

commit 30281742ef
Merge: ca5c6a1 5b05f13
Author: BBQ <bbq@BBQdeMacBook-Air.local>
Date:   Thu Feb 12 15:49:17 2026 +0800

    merge(github/main): integrate fx dependency injection framework

    Merge upstream fx refactor and adapt all services to use go.uber.org/fx
    for dependency injection. Resolve conflicts in main.go, server.go,
    and service constructors while preserving our domain model changes.

    - Fix telegram adapter panic on shutdown (double close channel)
    - Fix feishu adapter processing messages after stop
    - Increase directory lookup timeout from 2s to 5s

commit ca5c6a1866
Author: BBQ <bbq@BBQdeMacBook-Air.local>
Date:   Thu Feb 12 15:33:09 2026 +0800

    refactor(core): restructure conversation, channel and message domains

    - 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

commit 75e2ef0467
Merge: d99ba38 01cb6c8
Author: BBQ <bbq@BBQdeMacBook-Air.local>
Date:   Thu Feb 12 14:45:49 2026 +0800

    merge(github): merge github/main, resolve index.ts URL conflict

    Keep our defensive absolute-URL check in createAuthFetcher.

commit d99ba38b7d
Merge: 860e20f 35ce7d1
Author: BBQ <bbq@BBQdeMacBook-Air.local>
Date:   Thu Feb 12 05:20:18 2026 +0800

    merge(github): merge github/main, keep our code and docs/spec

commit 860e20fe70
Author: BBQ <bbq@BBQdeMacBook-Air.local>
Date:   Wed Feb 11 22:13:27 2026 +0800

    docs(docs): add concepts and style guides for VitePress site

    - Add concepts: identity-and-binding, index (en/zh)
    - Add style: terminology (en/zh)
    - Update index and zh/index
    - Update .vitepress/config.ts

commit a75fdb8040
Author: BBQ <bbq@BBQdeMacBook-Air.local>
Date:   Wed Feb 11 17:37:16 2026 +0800

    refactor(mcp): standardize unified tool gateway on go-sdk

    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.

commit 02b33c8e85
Author: BBQ <bbq@BBQdeMacBook-Air.local>
Date:   Wed Feb 11 15:42:21 2026 +0800

    refactor(core): finalize user-centric identity and policy cleanup

    Unify auth and chat identity semantics around user_id, enforce personal-bot owner-only authorization, and remove legacy compatibility branches in integration tests.

commit 06e8619a37
Author: BBQ <bbq@BBQdeMacBook-Air.local>
Date:   Wed Feb 11 14:47:03 2026 +0800

    refactor(core): migrate channel identity and binding across app

    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.
2026-02-12 17:13:03 +08:00
alexma233 e681eed3f3 feat(script): support more pm in containerd install 2026-02-12 16:58:25 +08:00
AlexMa233 81be665cc4 docs: fix manual deployment
Use steps in deploy.sh to replace wrong steps.
2026-02-12 16:46:45 +08:00
BBQ 30281742ef merge(github/main): integrate fx dependency injection framework
Merge upstream fx refactor and adapt all services to use go.uber.org/fx
for dependency injection. Resolve conflicts in main.go, server.go,
and service constructors while preserving our domain model changes.

- Fix telegram adapter panic on shutdown (double close channel)
- Fix feishu adapter processing messages after stop
- Increase directory lookup timeout from 2s to 5s
2026-02-12 16:42:44 +08:00
Ran 818a48b406 Revert "docs(deploy): simplify deployment guide and update docker compose"
This reverts commit 86d53818a8.
2026-02-12 15:37:17 +08:00
晨苒 5b05f13f1a Merge pull request #36 from ix64/refactor/fx
refactor: using fx
2026-02-12 15:35:01 +08:00
BBQ ca5c6a1866 refactor(core): restructure conversation, channel and message domains
- 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
2026-02-12 15:34:40 +08:00
zenhouke 86d53818a8 docs(deploy): simplify deployment guide and update docker compose 2026-02-12 15:32:41 +08:00
BBQ 75e2ef0467 merge(github): merge github/main, resolve index.ts URL conflict
Keep our defensive absolute-URL check in createAuthFetcher.
2026-02-12 14:45:49 +08:00
Ran 01cb6c85db fix(deploy): many docker compose bug 2026-02-12 08:23:25 +08:00
BBQ d99ba38b7d merge(github): merge github/main, keep our code and docs/spec 2026-02-12 05:20:18 +08:00
Ran 35ce7d169d fix: some toolkit update 2026-02-12 04:02:00 +08:00
zenhouke 057e95cb9a refactor(deploy): consolidate configuration and reorganize docker files 2026-02-12 02:16:41 +08:00
晨苒 4de579b57b Merge pull request #39 from confuseder/main
fix: mistakes in agent's Dockerfile
2026-02-12 01:29:58 +08:00
盼兮 f4ff56bfcf fix: mistakes in agent's Dokcerfile 2026-02-12 01:10:53 +08:00
zenhouke 56ab5d3758 fix(deploy): remove example config and env setup from deployment 2026-02-12 00:08:16 +08:00
zenhouke 6ab2a6d6b5 fix(docker): update web service port mapping 2026-02-11 23:26:46 +08:00
Acbox a7544f85ae docs(fix): wrong markdown 2026-02-11 23:12:50 +08:00
Acbox d4d2015784 docs: update README 2026-02-11 23:11:16 +08:00
zenhouke d45487433c feat: add Docker Compose deployment support (#38)
- Add Docker Compose configuration for one-click deployment
- Add Dockerfiles for server, agent, and web services
- Add deployment script (deploy.sh) with automatic setup
- Add comprehensive deployment documentation (DEPLOYMENT.md)
- Use host Docker socket instead of DinD for better performance
- Add Nginx configuration for web frontend
- Add Makefile for common operations
- Update README with Docker deployment quick start

Features:
- One-command deployment with ./deploy.sh
- Automatic JWT secret generation
- Health checks for all services
- Data persistence with Docker volumes
- Support for Bot container management via host Docker
- Production-ready configuration examples

Co-authored-by: root <root@DESKTOP-OU6H3GS.localdomain>
2026-02-11 22:58:05 +08:00
BBQ 860e20fe70 docs(docs): add concepts and style guides for VitePress site
- Add concepts: identity-and-binding, index (en/zh)
- Add style: terminology (en/zh)
- Update index and zh/index
- Update .vitepress/config.ts
2026-02-11 22:13:27 +08:00
Fodesu f8cd244d25 chore: add typos for spell check (#37) 2026-02-11 21:54:17 +08:00
Ran 065aa303e9 chore: update README.md 2026-02-11 20:00:07 +08:00
BBQ a75fdb8040 refactor(mcp): standardize unified tool gateway on go-sdk
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.
2026-02-11 17:37:16 +08:00
Acbox b46cb0c4e3 refactor(web): router 2026-02-11 16:08:36 +08:00
BBQ 02b33c8e85 refactor(core): finalize user-centric identity and policy cleanup
Unify auth and chat identity semantics around user_id, enforce personal-bot owner-only authorization, and remove legacy compatibility branches in integration tests.
2026-02-11 15:49:38 +08:00
Acbox 5021aed307 fix(swagger): wrong docs name 2026-02-11 15:41:44 +08:00
Acbox a4199f0575 chore: move swagger docs to spec 2026-02-11 15:29:26 +08:00
Acbox 1f30e666e0 feat(web): use generate sdk 2026-02-11 15:23:47 +08:00
BBQ 06e8619a37 refactor(core): migrate channel identity and binding across app
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.
2026-02-11 14:51:58 +08:00
Acbox ca86a8d1c3 chore: remove @memoh/shared 2026-02-11 14:46:50 +08:00
Acbox 48681ce0bb feat: add hey-api sdk generate 2026-02-11 14:27:53 +08:00
斬風千雪 1aef8f7389 fix(web): file name case error (#35) 2026-02-11 12:25:37 +08:00
MengYX d16cd04fae chore: go mod tidy 2026-02-11 12:00:19 +08:00
MengYX 6548c31597 refactor: using fx 2026-02-11 10:25:40 +08:00
Ran 632fd1fe9f fix(web): fix case-sensitive import 2026-02-11 08:50:21 +08:00