Commit Graph

242 Commits

Author SHA1 Message Date
Acbox ac8a935545 refactor: remove bot type 2026-03-15 00:42:09 +08:00
Acbox e7844dfa89 release: v0.5.0-beta.1 2026-03-14 17:30:48 +08:00
BBQ 839e63acda feat(access): add guest chat ACL (#235) 2026-03-14 17:15:41 +08:00
Acbox Liu c8728ffc2c refactor(browser): split browser cores via build ARG, add core selector (#237)
* refactor(browser): split browser cores via build ARG, add core selector

- Replace playwright official image with ubuntu:noble base in both
  docker/Dockerfile.browser and devenv/Dockerfile.browser; install
  browsers at build time driven by ARG/ENV BROWSER_CORES
- Add GET /cores endpoint to Browser Gateway reporting available cores
- Proxy GET /browser-contexts/cores in Go handler to Browser Gateway
- Add `core` field to BrowserContextConfigModel and GatewayBrowserContext;
  context creation selects the appropriate browser instance by core
- Frontend context-setting page fetches available cores and renders a
  core selector; saves core as part of the config JSON
- install.sh prompts for browser core selection and writes BROWSER_CORES
  to .env; builds the browser image locally before docker compose up
- Regenerate OpenAPI spec and TypeScript SDK

* fix: lint
2026-03-14 12:37:20 +08:00
晨苒 627b673a5c refactor: multi-provider memory adapters with scan-based builtin (#227)
* refactor: restructure memory into multi-provider adapters, remove manifest.json dependency

- Rename internal/memory/provider to internal/memory/adapters with per-provider subdirectories (builtin, mem0, openviking)
- Replace manifest.json-based delete/update with scan-based index from daily files
- Add mem0 and openviking provider adapters with HTTP client, chat hooks, MCP tools, and CRUD
- Wire provider lifecycle into registry (auto-instantiate on create, evict on update/delete)
- Split docker-compose into base stack + optional overlays (qdrant, browser, mem0, openviking)
- Update admin UI to support dynamic provider config schema rendering

* chore(lint): fix all golangci-lint issues for clean CI

* refactor(docker): replace compose overlay files with profiles

* feat(memory): add built-in memory multi modes

* fix(ci): golangci lint

* feat(memory): edit built-in memory sparse design
2026-03-14 06:04:13 +08:00
Fodesu b46e494d3a feat(tts): introduce TTS system (#195) 2026-03-13 02:49:52 +08:00
Acbox 92aa7ee104 chore(web): re-generate sdk and use it 2026-03-11 22:19:50 +08:00
Acbox fe04c5722b release: v0.4.3 2026-03-11 20:57:52 +08:00
Acbox 1da251885d feat(agent): add extensible tag interception system and inline reactions
Refactor the attachment tag extraction into a generic TagResolver/StreamTagExtractor
system that supports multiple custom tags. Implement <reactions> tag allowing the
agent to embed emoji reactions directly in text responses, dispatched as side-effects
through the channel reactor interface.

- Add TagResolver interface and StreamTagExtractor streaming state machine
- Refactor AttachmentsStreamExtractor as backward-compatible wrapper
- Add reactionsResolver and ReactionDeltaAction stream event
- Wire reaction dispatch in Go channel inbound processor
- Fix .gitignore to scope compiled binary patterns to repo root
2026-03-11 17:43:30 +08:00
Acbox 30653fbdbf fix(agent): reject send tool when targeting the same conversation
Pass replyTarget through the full pipeline (ChatRequest → gateway
identity → agent headers → MCP session) so the send tool can detect
when the destination matches the current conversation and return an
error guiding the agent to reply directly instead.
2026-03-11 16:59:42 +08:00
Acbox Liu 23d49a1c7b feat: message abort and web socket support (#222)
* feat: message abort and web socket support

* fix(web): chat end

* fix: lint

* fix: lint
2026-03-09 23:27:50 +08:00
Acbox 99114d2521 Merge branch 'v0.4' 2026-03-07 18:26:46 +08:00
Acbox c70d452238 release: v0.4.2 2026-03-07 18:20:46 +08:00
Ringo.Typowriter e6a6dbe3f6 feat(channel): add QQ channel support and image message pipeline (#199)
* feat(channel): add qq adapter and outbound delivery

* feat(channel): ingest inbound qq messages

* feat(web): expose qq channel in management ui

* feat(channel): support qq attachment ingestion

* fix(mcp): fail read raw immediately for missing files

* fix(agent): parse inline image data into native image parts

* test(agent): align read_media tool tests with SDK options

* fix(channel): harden qq image delivery and reconnect loop

Avoid data URLs for qq channel images, reset reconnect backoff after healthy sessions, and fall back gracefully for malformed public image URLs.

* fix(channel): restore qq media delivery and target resolution

* fix(qq,mcp,agent): fix message/qq regressions and pass go lint

* fix(qq,agent): validate inline base64 and sync heartbeat seq

* fix(qq): validate remote voice mime for upload checks

* fix(qq): fall back intents and restore adapter wiring

* fix(qq): prevent final text leakage and dedupe persisted inbound query
2026-03-07 17:12:06 +08:00
Acbox 7f3f8ce2e5 release: v0.4.1 2026-03-07 16:02:53 +08:00
Acbox d4749ab322 release: v0.4.0 2026-03-07 15:33:43 +08:00
Acbox 99657740ad chore: move web from packages to apps 2026-03-07 15:22:51 +08:00
Acbox Liu bafd327b6b feat: agent browser (#200)
* feat: agent browser

* chore: complete docker and action config

* feat: more actions

* feat: browser tab switch

* fix: browser build

* fix: lint

* fix: migrations
2026-03-07 15:06:00 +08:00
BBQ 21999b49f4 feat(container): add explicit data workflows and snapshot rollback (#193)
* feat(container): add explicit data workflows and snapshot rollback

Make container upgrades and recreation data-safe by adding explicit preserve, export, import, restore, and rollback flows across the backend, SDK, and web UI.

* fix(container): resolve go lint issues

Fix formatting and lint violations introduced by the container data workflow changes so the Go CI lint job passes cleanly.
2026-03-06 17:57:48 +08:00
Acbox 4109a141f9 feat: move all tools from @memoh/agent into built-in mcp 2026-03-06 16:48:18 +08:00
Quincy 486189ec37 align content layout in bot detail page tabs (#191)
* fix(chat): auto-scroll to bottom when new messages arrive

* fix(ui): align content layout in bot detail page tabs
2026-03-06 13:02:36 +08:00
Acbox 387ac50030 release: v0.3.1 2026-03-05 00:44:50 +08:00
Acbox 1ccf6fd80e release: v0.3.0 2026-03-04 23:56:46 +08:00
Acbox ffb59d0c3b fix(agent): thinking failed with openai-completions model 2026-03-04 23:50:27 +08:00
Acbox b8551a58c7 feat(web): add model search bar 2026-03-04 23:33:05 +08:00
BBQ a8b960db80 fix(agent): replace jsdom with linkedom to fix Docker EISDIR error (#186)
jsdom relies on Node.js-specific APIs that Bun cannot properly resolve
when running a bundled artifact. This caused an EISDIR error in Docker
containers (Bun tried to read the jsdom directory as a file).

Replace jsdom with linkedom, a lightweight pure-JS DOM implementation
that is fully compatible with Bun and @mozilla/readability. Also remove
the --external jsdom build flag since linkedom bundles cleanly.

Closes #181
2026-03-04 22:11:08 +08:00
Fodesu 4d5c554014 fix(web): add discord option for bind code generation (#184) 2026-03-04 21:49:22 +08:00
Quicy d8cc0f37b4 fix(bot): resolve tab component cache invalidation issue 2026-03-04 16:49:50 +08:00
Ringo.Typowriter 0a2a17ecc8 feat(agent): add readMedia tool for model to view the image (#165)
* feat(agent): add readMedia tool for loading local images into model
context

* feat(channel/inbound): include container attachment refs in inbound
query

* fix(agent): preserve ImagePart literal typing in buildNativeImageParts

* chore: rename tool

---------

Co-authored-by: 晨苒 <16112591+chen-ran@users.noreply.github.com>
2026-03-04 11:24:01 +08:00
Acbox Liu 64609c2101 feat: MCP OAuth (#178)
* feat: MCP OAuth

* fix: redirect url and oauth
2026-03-04 00:41:05 +08:00
Acbox f0517a3a1f fix: inbox indirectly push notidy item into context 2026-03-03 20:38:36 +08:00
Acbox f88827945f feat(web): add tool message ui for built-in tools 2026-03-03 17:50:21 +08:00
Acbox 8f3e763fe4 fix(web): sidebar overlap 2026-03-03 16:42:14 +08:00
Tosd a5099e04d4 fix(webhook): missing client import (#170)
Co-authored-by: Tosd0 <65720409+Sevenyine@users.noreply.github.com>
2026-03-03 16:02:20 +08:00
Quincy ba918dc8b9 style(sidebar): improve mobile responsive layout for multi-level sidebar (#172) 2026-03-03 16:01:54 +08:00
BBQ b6e7407e63 fix(web): prevent bot history horizontal overflow and pagination wrapping (#166)
Ensure long history message content can wrap without expanding layout width, and keep pagination summary and controls on a stable single line.
2026-03-03 16:00:21 +08:00
Fodesu 78faee4a0e fix(web): fix legend overlapping with chart (#163) 2026-03-03 15:56:43 +08:00
Acbox Liu 5982bc6a42 feat: models import (#164) 2026-03-03 15:53:52 +08:00
RoomWithOutRoof 450cc30a9f fix(utils): preserve colon-containing values in tagsToRecord; align invalidFallback; add formatRelativeTime (#156)
* fix(utils): preserve colon-containing values in tagsToRecord; align invalidFallback across date formatters; add formatRelativeTime

**key-value-tags: fix value truncation on tags with colons**

`tagsToRecord` used `tag.split(':')` with array destructuring, so any
value containing `:` (e.g. a webhook URL `https://example.com/hook`)
was silently truncated to just the scheme.  Switch to `indexOf` so the
split happens only on the first colon, preserving the full value.

Example (before → after):
  `tagsToRecord(['hook:https://api.example.com/cb'])`
  before: `{ hook: 'https' }`  ← bug
  after:  `{ hook: 'https://api.example.com/cb' }`

Add `key-value-tags.test.ts` covering: simple pairs, URL values,
multi-colon values, empty key/value, round-trip with `recordToTags`.

**date-time: honour `invalidFallback` consistently**

`FormatDateOptions` declares `invalidFallback` but only
`formatDateTimeSeconds` ever read it — `formatDateTime` and `formatDate`
both collapsed a present-but-invalid date string into `fallback ?? ''`,
making it impossible for callers to distinguish "nothing was passed" from
"a bad string was passed".

Extract a shared `resolveInvalid(value, options)` helper (prefers
`invalidFallback`, then `fallback`, then the raw value) and apply it
uniformly.  Also refactor `formatDateTimeSeconds` to use the existing
`parseDate` helper, eliminating the duplicated `new Date` + `isNaN`
guard.  No externally visible behaviour change for previously valid
combinations; callers that relied on invalid dates falling through to
`fallback` keep working since `resolveInvalid` falls through to
`fallback` when `invalidFallback` is absent.

**date-time: add `formatRelativeTime`**

Chat and notification UIs commonly need relative timestamps ("3 minutes
ago", "yesterday").  The utility file has no such function.  Add
`formatRelativeTime(value, options?)` using `Intl.RelativeTimeFormat`
so the output respects the browser locale without hardcoded English
strings.  Thresholds: seconds < 60 s, minutes < 1 h, hours < 24 h,
days < 7 d, beyond that falls back to `toLocaleDateString()`.  Accepts
both ISO strings and `Date` objects.

Add `date-time.test.ts` covering all four exported functions including
`vi.useFakeTimers` assertions for `formatRelativeTime`.

* fix(utils): clean up formatRelativeTime after merge

Made-with: Cursor
2026-03-03 15:49:02 +08:00
Acbox Liu ea719f7ca7 refactor: memory provider (#140)
* refactor: memory provider

* fix: migrations

* feat: divide collection from different built-in memory

* feat: add `MEMORY.md` and `PROFILES.md`

* use .env for docker compose. fix #142 (#143)

* feat(web): add brand icons for search providers (#144)

Add custom FontAwesome icon definitions for all 9 search providers:
- Yandex: uses existing faYandex from FA free brands
- Tavily, Jina, Exa, Bocha, Serper: custom icons from brand SVGs
- DuckDuckGo, SearXNG, Sogou: custom icons from Simple Icons

Icons are registered with a custom 'fac' prefix and rendered as
monochrome (currentColor) via FontAwesome's standard rendering.

* fix: resolve multiple UI bugs (#147)

* 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>

* chore: update AGENTS.md

* feat: files preview

* feat(web): improve MCP details page

* refactor(skills): import skill with pure markdown string

* merge main into refactor/memory

* fix: migration

* refactor: temp delete qdrant and bm25 index

* fix: clean merge code

* fix: update memory handler

---------

Co-authored-by: Leohearts <leohearts@leohearts.com>
Co-authored-by: Menci <mencici@msn.com>
Co-authored-by: Quincy <69751197+dqygit@users.noreply.github.com>
Co-authored-by: BBQ <35603386+HoneyBBQ@users.noreply.github.com>
Co-authored-by: Ran <16112591+chen-ran@users.noreply.github.com>
2026-03-03 15:33:50 +08:00
RoomWithOutRoof 567a1f3761 feat(chat): show message timestamp (relative time, full datetime on hover) (#157)
- Add formatRelativeTime() to date-time utils (Intl.RelativeTimeFormat, locale-aware)
- Display relative time under each message in message-item.vue
- Show full datetime in title attribute on hover

Made-with: Cursor
2026-03-02 15:09:01 +08:00
RoomWithOutRoof 874ca5fac7 fix(web): add email channel icon (#158)
Email is a supported channel (bindings, providers, outbox) but had no icon
and fell back to the generic comment icon. Use FontAwesome envelope.

Made-with: Cursor
2026-03-02 15:08:49 +08:00
Ringo.Typowriter d3edd17d90 feat(agent): loop detection (#152)
* feat(loop-detection): add configurable text and tool loop guards

* style(web): remove duplicate separator in bot settings
2026-03-02 15:00:09 +08:00
BBQ f9f968f13f feat(models): per-model probe testing with auto-detect UI (#133)
* feat(models): add per-model probe testing and auto-detect in UI

Move health probes from provider level to model level for precise
testing with real model_id and client_type. Provider test is now a
simple reachability check.

Backend:
- Add POST /models/:id/test endpoint that probes the model's provider
  using its actual model_id and client_type
- Add model healthcheck checker for bot health checks (chat/memory/embedding)
- Simplify provider test to reachability-only

Frontend:
- Auto-probe models on mount with status indicator (green/yellow/red dot + latency)
- Auto-probe provider reachability on load and on provider switch
- Fix missing faBolt icon registration
- Manual re-probe via refresh button

Closes #117

* fix(models): increase probe timeout to 15s for slow providers

Some providers (e.g. DashScope) exceed the 5s probe timeout, causing
false-negative "context deadline exceeded" errors. Increase per-probe
timeout to 15s and healthcheck overall timeout to 30s.

* fix(sdk): regenerate exports after merge conflict

Resolve duplicate SDK exports introduced by merge conflict resolution so the web build can compile again while preserving new model probe endpoints.
2026-03-02 14:59:15 +08:00
Acbox dc6f9bee89 release: v0.2.0 2026-03-01 18:04:54 +08:00
Acbox 25167cb456 feat(web): schedule page 2026-03-01 17:28:31 +08:00
Acbox d69daeff68 release: v0.2.0-beta.1 2026-03-01 16:31:06 +08:00
Acbox 521eb41b63 refactor(ui): color design 2026-03-01 15:04:52 +08:00
Acbox 111e8d8732 fix(web): chart can only display today's data 2026-03-01 14:39:23 +08:00
Acbox 05e8e66bb2 feat(web): file manager in chat page 2026-03-01 14:35:26 +08:00