11 Commits
Author SHA1 Message Date
Bruno ClermontandBruno Clermont d856a58218 feat(providers): make provider request timeout configurable (default 30s) (#1400)
The provider verify call and the provider models-list call used hardcoded
timeouts (30s and 15s) that were too low for slow models. Introduce a
tenant-scoped, UI-editable setting `providers.request_timeout_sec`
(default 30) stored in system_configs, consumed by both handlers, and
overlaid from config.json like tts.timeout_ms. Adds a field to the System
Settings modal (all 4 locales) so operators can raise it without a
redeploy.

Co-authored-by: Bruno Clermont <bruno.clermont@gmail.com>
2026-07-09 04:54:15 +07:00
nguyenha935 f826738ee6 feat: add team work classification routing (#1379)
Approved by github-maintain bot. Clean team work classification feature with comprehensive tests and i18n.
2026-07-07 01:21:12 +07:00
Duy /zuey/ 00c25635e5 Merge pull request #1176 from dataplanelabs/upstream-fix/tts-timeout-wire
fix(tts): wire dashboard tts.timeout_ms through ApplySystemConfigs + seed
2026-06-15 10:36:50 +07:00
Duc Nguyen 944ba4ccff fix(tts): wire dashboard tts.timeout_ms through ApplySystemConfigs + seed
ApplySystemConfigs and seedConfigForContext both handle tts.provider,
tts.auto, tts.mode, tts.max_length — but neither carries tts.timeout_ms.
Result: the dashboard /tts page Timeout (ms) input is inert; cfg.Tts.TimeoutMs
stays at config.json default; setupTTS passes 0 to provider constructors;
each provider falls back to its hardcoded default (e.g. edge = 30s).

Two-line fix to mirror the existing pattern for the other tts.* keys.
2026-05-26 08:01:01 +07:00
Duy /zuey/ 68684e4859 feat(browser): add scoped cookie sync
Fixes #49
2026-05-24 11:27:02 +07:00
Duy /zuey/ 2c699f31de fix(chat): support zero debounce and agent overrides 2026-05-23 14:02:34 +07:00
viettranx 4b658a2304 feat(tools): tenant-scoped allowed_paths configuration
- Add tenant-level filesystem path restrictions via system_configs table
- Merge tenant paths with global skills directories in allowedWithTeamWorkspace()
- Propagate tenant paths to subagents via RunContext
- Seed allowed_paths from config.json to system_configs on startup
- Fix TestStoreTask_RaceToClaimSameTask: use composite PK for team members
2026-04-12 21:23:21 +07:00
viettranx 9f77bfe711 feat(vault): tenant-wide rescan with nullable agent_id + media preview
Vault rescan redesigned from per-agent to tenant-wide:
- POST /v1/vault/rescan replaces POST /v1/agents/{id}/vault/rescan
- agent_id nullable in vault_documents (PG migration 046 + SQLite v14)
- Path-based scope inference: agents/{key}/ → personal, teams/{uuid}/ → team, root → shared
- Interceptor sets agent_id=NULL for team-scoped file writes
- Enrichment worker batch key handles empty agent_id
- web-fetch/ directory excluded from vault scan at any depth
- Media preview: images render via authenticated blob URL, binary files show metadata
- Scan button no longer requires agent selection
2026-04-10 16:32:54 +07:00
viettranx 258e378593 feat(memory): add chunk overlap support and clean up per-agent config
- Add ChunkOverlap to MemoryConfig (default 200) for context continuity
  at chunk boundaries during semantic search
- Implement overlap logic in ChunkText() with safety clamp at maxChunkLen/2
- Wire per-agent chunk_len/chunk_overlap overrides at IndexDocument time
  via RunContext, falling back to global PGMemoryConfig defaults
- Add sync.RWMutex to PGMemoryStore for thread-safe config updates
- Persist chunk settings via system_configs (embedding.max_chunk_len,
  embedding.chunk_overlap) with runtime refresh on config change
- Remove dead per-agent embedding_provider/embedding_model fields from
  agent Memory UI (system uses single global provider)
- Show Memory section always-visible in agent config (no toggle needed)
- Add chunk_overlap fields to System Settings modal and Config AI Defaults
- Update i18n (en/vi/zh) for all new and removed keys
2026-03-25 18:24:36 +07:00
viettranx 7aa47d1baf refactor(security): remove cross-tenant bypass, enforce strict tenant isolation
- Add RoleOwner ("owner") to permissions hierarchy (above admin)
- Replace all IsCrossTenant/client.IsCrossTenant() permission guards with
  IsOwnerRole/client.IsOwner() role-based checks (20+ locations)
- Remove cross-tenant bypass from tenantClauseN SQL helper — always adds
  AND tenant_id = $N (fail-closed)
- Add explicit unscoped store methods for startup: ListAllProviders,
  ListAllInstances, ListAllEnabled, GetByIDUnscoped, GetTeamUnscoped
- Remove CrossTenant from auth layer: owner users get role "owner" with
  concrete tenant ID (MasterTenantID fallback), no bypass flag
- Remove crossTenant field from WS Client; connect response sends
  is_owner instead of cross_tenant
- Simplify event filter from 3-mode to 2-mode (tenant-scoped + owner sees system events)
- Fix channel instance loader to use inst.TenantID for agent lookup
- Fix agent embedding goroutine to capture tenant from caller context
- Fix provider cache invalidation to use event.TenantID
- Separate skills store: ListAllSystemSkills (system only) vs
  ListAllSkills (system + tenant-scoped), StoreMissingDeps restricted
  to system skills only
- Frontend: isCrossTenant → isOwner, add "owner" to UserRole type,
  RequireAdmin uses hasMinRole for owner > admin hierarchy
2026-03-24 20:40:59 +07:00
viettranx 651072a9ea feat(config): add system_configs DB table with per-tenant isolation and System Settings modal
- Add system_configs table (migration 029) with per-tenant key-value config
- Add SystemConfigStore interface with strict tenant isolation (no cross-tenant fallback)
- Add ApplySystemConfigs overlay: DB values → in-memory cfg at startup + after save
- Add System Settings modal (navbar gear icon) with 3 sections:
  - Embedding: verified 1536d models (OpenAI, OpenRouter, Mistral), custom verify endpoint
  - UX Behavior: tool_status, block_reply, intent_classify toggles
  - Pending Compaction: provider/model + threshold/keepRecent/maxTokens
- Fix block_reply label inversion: ON = delivers intermediate text (not suppresses)
- Fix embedding status endpoint to read from system_configs DB (not provider JSONB)
- Fix config page save to only sync current tenant (not all tenants)
- Fix bus event payload to use fresh context (prevent canceled request context)
- Remove config.json fallback for embedding provider/model resolution
- Add "More Config" link in modal footer to full config page
- Add i18n for system-settings namespace (en/vi/zh)
2026-03-24 16:01:02 +07:00