Commit Graph

317 Commits

Author SHA1 Message Date
Acbox 443ede30b4 refactor(skills): import skill with pure markdown string 2026-02-28 23:07:44 +08:00
BBQ cc5f00355f feat: add email service with multi-adapter support (#146)
* feat: add email service with multi-adapter support

Implement a full-stack email service with global provider management,
per-bot bindings with granular read/write permissions, outbox audit
storage, and MCP tool integration for direct mailbox access.

Backend:
- Email providers: CRUD with dynamic config schema (generic SMTP/IMAP, Mailgun)
- Generic adapter: go-mail (SMTP) + go-imap/v2 (IMAP IDLE real-time push via
  UnilateralDataHandler + UID-based tracking + periodic check fallback)
- Mailgun adapter: mailgun-go/v5 with dual inbound mode (webhook + poll)
- Bot email bindings: per-bot provider binding with independent r/w permissions
- Outbox: outbound email audit log with status tracking
- Trigger: inbound emails push notification to bot_inbox (from/subject only,
  LLM reads full content on demand via MCP tools)
- MailboxReader interface: on-demand IMAP queries for listing/reading emails
- MCP tools: email_accounts, email_send, email_list (paginated mailbox),
  email_read (by UID) — all with multi-binding and provider_id selection
- Webhook: /email/mailgun/webhook/:config_id (JWT-skipped, signature-verified)
- DB migration: 0019_add_email (email_providers, bot_email_bindings, email_outbox)

Frontend:
- Email Providers page: /email-providers with MasterDetailSidebarLayout
- Dynamic config form rendered from ordered provider meta schema with i18n keys
- Bot detail: Email tab with bindings management + outbox audit table
- Sidebar navigation entry
- Full i18n support (en + zh)
- Auto-generated SDK from Swagger

Closes #17

* feat(email): trigger bot conversation immediately on inbound email

Instead of only storing an inbox item and waiting for the next chat,
the email trigger now proactively invokes the conversation resolver
so the bot processes new emails right away — aligned with the
schedule/heartbeat trigger pattern.

* fix: lint

---------

Co-authored-by: Acbox <acbox0328@gmail.com>
2026-02-28 21:03:59 +08:00
BBQ bf0eeb0e80 feat(search): add 8 new search providers (#135)
* feat(search): add Sogou search provider

* fix(search): use new endpoint and API version for sogou

* feat(search): add Serper, SearXNG, Jina, Exa, Bocha, DuckDuckGo search providers

Add six new search provider integrations:
- Serper: Google search via Serper API
- SearXNG: Self-hosted meta search engine
- Jina: Jina AI search API
- Exa: Exa neural search API
- Bocha: Bocha AI web search
- DuckDuckGo: DuckDuckGo HTML search (no API key required)

Each provider includes backend implementation, config schema,
i18n entries, and Vue settings component.

* feat(search): add Yandex search provider

Add Yandex search provider with XML response parsing and
configurable search type (RU/TR/COM).

---------

Co-authored-by: Menci <mencici@msn.com>
2026-02-27 00:00:44 +08:00
BBQ f68b675efd fix(containerd): normalize image references for containerd compatibility (#138)
Containerd does not auto-prepend "docker.io/" to short Docker Hub names
like "memohai/mcp:latest", causing it to treat "memohai" as a registry
host and fail with EOF. Add NormalizeImageRef() to ensure all image
references are fully qualified before being passed to containerd.
2026-02-26 20:22:36 +08:00
Acbox Liu fe10abf3fc refactor: inbox (#137)
* refactor: inbox

* fix: migrations

* fix: migrations
2026-02-26 20:16:02 +08:00
BBQ d2878d841b fix(containerd): use image RootFS for snapshot parent chain ID (#132)
The previous snapshotParentFromLayers manually decompressed layer
blobs to compute diffIDs, which could diverge from the IDs that
containerd's Unpack uses (e.g. gzip vs zstd). Use image.RootFS()
instead — the canonical source containerd itself relies on.
2026-02-26 19:55:46 +08:00
BBQ d6aebf654f feat(devenv): add containerized development environment (#116)
* feat(devenv): add containerized development environment

Replace local-process dev workflow with a fully containerized stack
using docker compose. This enables consistent development across
machines without requiring local Go/Node toolchains or containerd.

- Add Dockerfile.server.dev with containerd + CNI networking support
- Add Dockerfile.web.dev for frontend dev server
- Add server-dev-entrypoint.sh for containerd lifecycle management
- Expand devenv/docker-compose.yml with server, agent, web, migrate
  and deps services with proper health checks and dependency ordering
- Update app.dev.toml to use container service names instead of localhost
- Refactor mise.toml dev tasks to drive docker compose workflow
- Support agent_gateway.server_addr in config package for inter-container
  communication

* feat(devenv): add hot-reload and registry mirror support

- Add air for Go server hot-reload in dev containers
- Fix agent_gateway host in dev config (0.0.0.0 -> agent)
- Add configurable registry mirror for China mainland users
- Unify MCP image refs via MCPConfig.ImageRef()

* feat(scripts): add China mainland mirror option to install script

Prompt users to opt-in to memoh.cn mirror during installation,
which applies docker-compose.cn.yml overlay and sets registry
in config.toml for MCP image pulls.
2026-02-26 17:32:19 +08:00
Ringo.Typowriter 19ab2fef3a feat(tool): paginated file read with safety limits for container (#119)
* feat(tool): paginated file read with safety limits for container
provider

* fix(tool): harden container read pagination and binary safety
2026-02-26 16:17:12 +08:00
Menci ed90c63888 refactor(search): improve HTTP error reporting with status code and response detail 2026-02-26 15:54:14 +08:00
Menci 08f5130c66 feat(search): add Tavily search provider 2026-02-26 15:54:14 +08:00
Acbox Liu 2f38662d4d feat: heartbeat (#108)
* feat: heartbeat

* feat: independent heartbeat model
2026-02-25 16:32:52 +08:00
晨苒 2f301ff5a1 Update internal/auth/jwt_test.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-25 16:32:52 +08:00
Ran 52d4aee104 feat(auth): implement JWT token refresh mechanism 2026-02-25 16:32:52 +08:00
Fodesu 5aefccd7cc feat: support discord attacchment file, assetService 2026-02-25 16:30:43 +08:00
Fodesu 87a4be7439 fix: discord channel stream ignore Reasoning content 2026-02-25 16:29:57 +08:00
Ran 30fe3edc39 fix(release): switch to agent-bin and gzip-only embedded web 2026-02-24 22:29:15 +08:00
Ran 625d1bbe04 fix(memoh): CI asset embedding 2026-02-24 20:49:48 +08:00
Ran ffda558d24 feat(memoh): unify embedded runtime serving and release binaries 2026-02-24 19:39:01 +08:00
Ran d6914f99ab Merge branch 'fix-issue-#78-bug' into v0.1 2026-02-24 17:05:40 +08:00
斬風千雪 a5b11dddc2 fix(mcp): adapt tool list checker to underscore name format (#113)
* fix(mcp): adapt tool list checker to underscore name format

---------

Co-authored-by: Ran <16112591+chen-ran@users.noreply.github.com>
2026-02-24 17:00:41 +08:00
晨苒 579bf45fc2 Update internal/auth/jwt_test.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-24 16:47:58 +08:00
Ran 0c6a905317 feat(auth): implement JWT token refresh mechanism 2026-02-24 16:47:58 +08:00
Ran 5e12b5a53f fix: ensure unifying on hardcoded /data mount path 2026-02-24 03:35:27 +08:00
MoeMagicMango 786959f038 feat(service): add OpenAI completions models output probe (#97) 2026-02-24 02:16:24 +08:00
Ran 65c4d6f793 feat(container): support for apple container 2026-02-23 22:40:46 +08:00
Ringo.Typowriter 29e76322cc feat(feishu): add webhook inbound mode, region support, and callback/attachment enhancements (#107) 2026-02-23 21:57:34 +08:00
Fodesu df12d94171 fix: replay methion 2026-02-23 18:38:07 +08:00
Acbox 8590c53f3d feat(web): add sunagent, history, skills page 2026-02-23 15:49:28 +08:00
Acbox a440bf122b feat(search): add bing and google support 2026-02-23 15:41:47 +08:00
Acbox Liu 17cd077f34 feat: add thinking support (#100)
* feat: add thinking support

* feat: improve thinking block render in web and filter thinking content in channels

* fix: migrate
2026-02-23 14:41:27 +08:00
Acbox 18535f97f2 feat: improve prompts 2026-02-23 14:18:41 +08:00
Ran 5a08b280ab fix: double reply bug 2026-02-23 05:55:20 +08:00
Fodesu 51acb4b546 feat: add replay Message 2026-02-23 05:55:20 +08:00
Fodesu 77ff24c6fd feat(platforms): add discord channel support 2026-02-23 05:55:20 +08:00
Acbox 44ab3792d2 fix(channel): create new message when tool calling 2026-02-23 00:31:59 +08:00
Acbox ac929f9f44 feat: add message id in user header 2026-02-23 00:06:15 +08:00
ringotypowriter 45e7362b44 Merge branch 'main' into fix/provider-scoped-model-id-resolution 2026-02-22 17:00:51 +08:00
ringotypowriter f00e4bcd4e fix(flow): support UUID model refs when provider filter is set 2026-02-22 16:53:30 +08:00
Acbox Liu ee0aa319e2 feat: add restful apis of container file system (#92)
* feat: add restful apis of container file system

* feat: add fs tools in agent
2026-02-22 16:42:30 +08:00
Acbox 928b0c0ee5 refactor: subagent usage and related tools 2026-02-22 16:35:50 +08:00
ringotypowriter 8cd7c4aa86 Merge branch 'main' into fix/provider-scoped-model-id-resolution 2026-02-22 12:47:37 +08:00
Acbox Liu c591af14b0 feat: bot inbox (#77)
* feat: bot inbox

* feat: unified header

* fix: missing tool_call usage

* feat: add group name in header
2026-02-22 01:27:24 +08:00
ringotypowriter 50bdbd519c fix(models,settings,conversation): scope model_id uniqueness per
provider and harden model reference resolution
2026-02-21 22:31:32 +08:00
Ringo.Typowriter 9461f923df fix(flow): stabilize chunked SSE and unify prune limits for read/exec/gateway (#71)
* fix(agent): emit chunked SSE data

fix(flow): reassemble chunked SSE and prune tool payloads

fix: avoid whitespace prune bypass; optimize chunked SSE builder

* refactor: LLM provider pruning use shared textprune library

* chore: smaller range
2026-02-21 17:06:02 +08:00
Acbox e2652d0884 fix: keep ext name when file was missing mime type 2026-02-21 01:36:33 +08:00
Acbox 7b12fb0b0c fix: send file out of /data/media failed 2026-02-21 00:04:38 +08:00
Acbox cb5d2c5fab fix: send message in group failed 2026-02-20 22:47:02 +08:00
Acbox 1a78ba3f53 feat: add platform metadata in contacts 2026-02-20 22:19:15 +08:00
Acbox 82cc9c357f feat: support attachment send to tool send 2026-02-20 22:04:00 +08:00
Acbox 6b7c3db952 refactor: process user header in go side 2026-02-20 21:40:13 +08:00