Commit Graph
171 Commits
Author SHA1 Message Date
viettranx e0da99d150 feat: enhance log tailing with attrs, redaction, ring buffer, level control and persistent UI
Backend: include all slog attrs in WS payload with sensitive key redaction,
add 100-entry ring buffer for replay on subscribe, support per-client level
selection via logs.tail { level: "debug" }.

Frontend: move log state to Zustand store so tailing persists across page
navigation, add level selector, client-side level filter, text search, and
inline attr rendering.
2026-03-06 19:41:49 +07:00
viettranx c5127733a0 feat: Implement real-time pending pairing request count and notifications in the UI, backed by WebSocket event broadcasting. 2026-03-06 19:31:59 +07:00
Viet Tran 6895e369f6 refactor: remove standalone mode, consolidate to managed-only (PostgreSQL) (#70)
- Remove standalone mode code: file-based stores, standalone gateway,
  heartbeat service, SQLite memory, standalone docker-compose
- Rename docker-compose.managed.yml → docker-compose.postgres.yml
- Clean up ~130 Go comments referencing "managed mode" qualifier
- Simplify docker-compose.yml env vars (providers/channels via web UI)
- Update .env.example to essential vars only (token + encryption key)
- Add setup wizard UI (provider → agent → channel bootstrap flow)
- Add logs.tail WebSocket handler for live log streaming
- Add cursor-pointer to interactive UI components
- Clean up config page (remove standalone-only sections)
- Update README and docs for managed-only architecture
2026-03-06 18:51:11 +07:00
viettranx 0f44f18b0c feat: Introduce .repomixignore for repomix-specific exclusions and update .gitignore to include release-manifest.json. 2026-03-06 14:42:06 +07:00
viettranxandClaude Opus 4.6 d49596a805 feat: Add USER_PREDEFINED.md for predefined agents with token count sidebar
Add shared agent-level USER_PREDEFINED.md file for predefined agents to define
baseline user-handling rules (owner info, audience, language, communication norms)
that apply to ALL users. Individual USER.md per-user supplements but never overrides.

- Seed USER_PREDEFINED.md template in SeedToStore for new predefined agents
- Backfill existing agents via ensureUserPredefined in summon/regenerate flows
- AI optionally generates/updates the file when description mentions people/user context
- Add to context file interceptor, RPC allowlist, and system prompt injection
- Update summoning modal with optional file progress tracking
- Show estimated token count (Unicode-aware) instead of bytes in file sidebar

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 12:27:43 +07:00
viettranx 4e7d55ff37 feat: Add user and chat ID filtering to the events page and store event user/chat IDs. 2026-03-05 19:43:18 +07:00
viettranx c8cd63dbe8 feat: Deny team_message tool for team leads and update string truncation to handle Unicode characters. 2026-03-05 19:24:35 +07:00
viettranxandClaude Opus 4.6 8862842b46 feat: add runKind field to differentiate delegation/announce runs from user-initiated
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 18:59:51 +07:00
viettranxandClaude Opus 4.6 5664135c8a enhance: channel-aware identity line, remove model leak from system prompt
Remove hardcoded "personal assistant running inside GoClaw" identity.
Replace with channel+peer-aware context: "running in Telegram (a group chat)".
Remove model name from Runtime section to prevent leaking provider info.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 18:59:29 +07:00
viettranxandClaude Opus 4.6 5a4d40f458 enhance: rewrite AGENTS.md for managed mode, add Style section to SOUL.md
Remove ~60% redundant content from AGENTS.md (safety, bootstrap, tools, workspace
sections already covered by system prompt). Add Conversational Style rules to reduce
bot-like behavior. Add customizable Style section to SOUL.md template with summoner
metaprompt support. Migration 000010 force-updates all existing AGENTS.md in DB.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 18:33:23 +07:00
viettranx 99cab86373 fix: Simplify config leak detection to a single gate, triggering on 3+ distinct internal file name mentions without requiring list patterns. 2026-03-05 18:17:20 +07:00
viettranx 85a6379e8c feat: Introduce a dedicated events page by relocating and restructuring event display components, and enhance agent system prompt and sanitization logic. 2026-03-05 17:47:42 +07:00
viettranxandClaude Opus 4.6 60aec38d62 enhance: enrich agent event payloads and fix card layout
Backend: add message to run.started, content to run.completed,
arguments to tool.call events. Frontend: fix arrow direction
(agent → tool), compact card layout (badge+content+timestamp in
single row), show subtype in outer badge for agent events, fix
JSON dialog newline consumption in regex.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 15:17:05 +07:00
viettranxandClaude Opus 4.6 a0f69a6fee enhance(ui): improve realtime event cards with richer payload rendering
Split agent event cards into RunEventCard and ToolEventCard with full
context rows (channel, delegation, parent agent, team task, call ID).
Add channel badge and delegation ID to delegation lifecycle cards,
completed task count to announce cards, task ID to task/message cards.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 14:36:13 +07:00
viettranxandClaude Opus 4.6 9b9e99e72a feat(ui): add Realtime Events tab to team detail with structured event cards
Add a new "Realtime Events" tab in team detail page that displays WS events
in real-time via a centralized Zustand store + wildcard listener. Includes
structured card components for delegation, task, message, agent, and CRUD
events with agent name resolution from TanStack Query cache. Each card is
clickable to show raw JSON with syntax highlighting and copy support.

Also removes byte-based task truncation in delegation event payloads that
was corrupting multi-byte UTF-8 characters — now sends full task content.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 14:21:34 +07:00
viettranxandClaude Opus 4.6 f426460358 feat(teams): per-team progress notifications setting with UI toggle
Added progress_notifications to agent_teams.settings JSONB so teams can
opt-in to periodic "Your team is working on it..." chat messages during
async delegations. Global default is OFF.

Backend: progressEnabled resolved per-delegation from team settings,
falling back to global default. Frontend: checkbox toggle in team
settings page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 14:20:29 +07:00
viettranxandClaude Opus 4.6 64ca26e611 fix(delegation): serialize announces per session to prevent stale history reads
Concurrent announce runs (delegate + subagent) on the same leader session
could read stale session history because the agent loop reads at start and
writes at end. Added per-session mutex via sync.Map to serialize announces,
ensuring each reads up-to-date history.

Also removed unnecessary task preview truncation in delegation events
(WS clients handle display formatting).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 14:20:20 +07:00
viettranxandClaude Opus 4.6 61da687ad1 feat(ws): comprehensive team & delegation WS events with typed payloads
Add 16 new event constants and typed payload structs for full WS
visibility into team agent operations. Enrich AgentEvent with delegation
and routing context (delegationId, teamId, parentAgentId, userId,
channel, chatId). Emit thinking/chunk events for non-streaming runs
so delegate member agents also produce WS events.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 12:56:15 +07:00
viettranxandClaude Opus 4.6 936e958699 fix(ui): move refresh buttons back into tab content with useMinLoading
Use variant="outline" and useMinLoading for proper spin animation,
matching the pattern used across other pages (traces, channels, etc.).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 12:55:56 +07:00
viettranxandClaude Opus 4.6 013a3c021b fix(ui): team detail layout fixes, thin scrollbar, and refresh buttons
- Remove card wrapper from team tabs to fix scroll-Y inside tabs
- Add overflow-y-hidden to TabsList to prevent vertical scrollbar leak
- Widen task detail dialog to match trace detail (95vw/max-w-4xl)
- Add max-h-[85vh] + overflow-y-auto to task detail dialog
- Add global thin scrollbar styling (scrollbar-width: thin)
- Add refresh buttons to Tasks and Delegations tabs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 12:49:04 +07:00
viettranxandClaude Opus 4.6 851cdb2391 fix(ui): constrain detail page card width and add team task/delegation detail views
- Add max-w-4xl to agent/channel/team detail card so tabs hug content
- Add TaskDetailDialog for viewing full task info on click
- Add click-to-detail on Team Delegations tab reusing DelegationDetailDialog
- Add overflow-x-auto + min-w on task list for mobile

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 12:27:53 +07:00
viettranxandClaude Opus 4.6 07d8b4efa6 refactor(ui): mobile 375px responsiveness for pages and config sections
- Config page: vertical tabs → horizontal on mobile via useIsMobile()
- Agent/Channel/Team detail: scrollable tab overflow, responsive card padding
- Config sections: grid-cols-2/3/4 → responsive sm: breakpoints (18 files)
- Gateway/Quota sections: responsive grids, overflow-x-auto on data tables
- Shares/Links/Skills: stack forms on mobile, responsive fixed widths

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 12:13:59 +07:00
viettranxandClaude Opus 4.6 4120226f24 refactor(ui): mobile responsiveness, toast system, service layer, and modal fixes
- Add mobile sidebar drawer, chat sidebar drawer, and responsive layouts
- Fix hooks: useApprovals stale closure, useClipboard cleanup, error states
- Expand cache invalidation for cron/health/usage events, add staleTime
- Create toast notification system (Zustand store + Toaster component)
- Integrate toast into 7 mutation hooks (providers, agents, cron, mcp, etc.)
- Enforce service layer: move all useHttp calls from pages to hooks
- Replace inline SVGs with Lucide icons
- Fix modal mobile support: responsive max-w, grid-cols, padding
- Reduce dialog padding on mobile (p-4 sm:p-6)
- Add responsive grid stacking in agent/provider/custom-tool forms
- Fix trace detail span tree indent and token display on mobile

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 11:57:59 +07:00
viettranxandClaude Opus 4.6 7d211fa796 refactor: split 7 large Go files into smaller files per package
Pure cut-and-paste of functions/methods into separate files within the
same package — no logic changes. Reduces file sizes for readability.

- loop.go (1312→856) → loop_types.go, loop_compact.go, loop_media.go, loop_utils.go
- delegate.go (687→171) → delegate_sync.go, delegate_async.go, delegate_prep.go
- browser.go (605→154) → browser_tabs.go, browser_page.go, browser_remote.go
- teams.go (602→170) → teams_crud.go, teams_members.go
- web_fetch_convert.go (572→176) → web_fetch_convert_handlers.go, web_fetch_convert_utils.go
- resolver.go (543→373) → resolver_helpers.go
- sessions.go (536→157) → sessions_tokens.go, sessions_ops.go, sessions_list.go

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 10:47:06 +07:00
043149bd43 ci: add CI workflow, Makefile targets, and fix typing keepalive race (#41)
- Add GitHub Actions CI with parallel Go (build/test -race/vet) and Web UI (pnpm build) jobs
- Add Makefile targets: test, vet, check-web, setup, ci
- Fix data race in typing keepalive: remove nil assignment after close(keepaliveDone)
  so the goroutine can safely read the channel without holding the mutex

Co-Authored-By: Duc Nguyen <me@vanducng.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 10:22:30 +07:00
viettranxandClaude Opus 4.6 6991f9ae1c fix(browser): clear refs on reconnect, add reconnect to ListTabs
- Reset RefStore when connection drops to avoid stale DOM node refs
- Add auto-reconnect logic to ListTabs for consistency with getPage
- Remove console from auto-start list (no browser needed for empty msgs)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 10:12:59 +07:00
Luvu182andLuvu182 62a6ca9ee5 feat(browser): add remote Chrome sidecar support for Docker deployments (#59)
* feat(browser): add remote Chrome sidecar support for Docker deployments

When running in Docker, Chrome is not installed in the runtime image.
This adds support for connecting to a remote Chrome via CDP (Chrome
DevTools Protocol) using a Docker Compose sidecar overlay, following
the existing pattern used by sandbox, OTel, and Tailscale overlays.

Changes:
- Add RemoteURL field to BrowserToolConfig
- Add GOCLAW_BROWSER_REMOTE_URL env var (auto-enables browser tool)
- Browser Manager: remote CDP connection with hostname-to-IP resolution
  (required by Chrome M113+ DNS rebinding protection), auto-reconnect
  on dead connections, disconnect-only on Stop (sidecar stays alive)
- Auto-start browser on first tool action (no explicit "start" needed)
- Add docker-compose.browser.yml overlay (zenika/alpine-chrome:124)
- Add unit tests for CDP resolution and Manager lifecycle

Usage:
  docker compose -f docker-compose.yml -f docker-compose.managed.yml \
    -f docker-compose.browser.yml up -d --build

Closes #56

* feat(browser): fix onboard summary and config serialization for remote mode

- onboard.go: show "remote: ws://..." instead of "headless" when RemoteURL is set
- onboard_auto.go: serialize remote_url field in generated config

---------

Co-authored-by: Luvu182 <208665161+Luvu182@users.noreply.github.com>
2026-03-05 10:09:08 +07:00
viettranxandClaude Opus 4.6 4af4c69d3f fix(delegate): periodic progress notifications instead of one-shot 90s timer
Replace the fixed 90s one-shot timer with a 30s periodic ticker so users
see real-time elapsed updates as delegation progresses. Agents that complete
disappear from the list, and notifications stop when all delegations finish.

Also adds taskCtx.Done() listener to prevent goroutine leaks on cancel/stopall.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 10:08:06 +07:00
viettranxandClaude Opus 4.6 1f8c98d3de fix: enforce revoke disconnect, group pairing, and agent disable cascade
- Revoke paired device now force-closes the active WebSocket connection
  via pubsub (EventPairingRevoked → Server.DisconnectByPairing)
- Add group-level pairing policy ("pairing") to Discord, WhatsApp, and
  Zalo Personal channels (matching existing Telegram/Feishu pattern)
- Block inactive agents at resolver level (chat, cron, delegation all
  reject with "agent is inactive")
- Cascade: setting agent status to "inactive" auto-disables linked
  channel instances via EventAgentStatusChanged pubsub

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 10:03:08 +07:00
viettranxandClaude Opus 4.6 6d9374a1a5 fix: route list_files("memory") to DB in managed mode
The memory interceptor handled read_file/write_file for memory paths
but list_files hit the filesystem, returning "Directory does not exist".
Now list_files queries memory_documents from PostgreSQL via the existing
ListDocuments store method.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 09:35:38 +07:00
viettranxandClaude Opus 4.6 a9ce64981d refactor(dashboard): split overview page into focused components
Reorganize layout: System Health full-width grid, 2-column Clients+Cron,
Recent Requests moved above Quota Usage. Extract 8 modules from 768-line
monolith (overview-page.tsx now 212 lines).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 09:31:15 +07:00
viettranxandClaude Opus 4.6 b1d2e8982a fix: nil guard for QueryTodaySummary, correct remoteAddr comment and UI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:25:34 +07:00
Luvu182andLuvu182 9cb73ac132 fix(dashboard): enrich overview with real stats, client tracking, and IP extraction (#51)
- Extract QueryTodaySummary to package-level so quota.usage returns
  requestsToday/tokensToday even when QuotaChecker is nil (standalone mode)
- Enrich health RPC: version, uptime, mode, DB ping, tool count,
  connected clients list with real IP and connectedAt
- Add handleStatus: sessions count, agentTotal from DB (managed mode)
- Extract client IP from X-Real-IP / X-Forwarded-For during WS upgrade
- Rebuild overview UI: live uptime, System Health panel, Connected Clients
  panel, inline channel status with dots, auto-refresh 30s

Co-authored-by: Luvu182 <208665161+Luvu182@users.noreply.github.com>
2026-03-04 23:24:07 +07:00
Luvu182andLuvu182 ab9f582de6 fix: OpenAI-compat SSE streaming drops usage data (tokens always 0) (#52)
When stream_options.include_usage is enabled, the OpenAI API sends the
final usage chunk with an empty choices array. The streaming parser
skipped chunks with no choices before checking for usage data, causing
token counts to always be 0 in traces.

Fix: extract usage data before the empty-choices skip.

Also fixes two related SSE parsing issues:
- SSE data prefix now handles both "data: " and "data:" (some providers
  like Kimi omit the space after the colon, per SSE spec)
- Added scanner.Err() check to surface stream read errors (timeout,
  connection reset) instead of silently returning partial results

Co-authored-by: Luvu182 <208665161+Luvu182@users.noreply.github.com>
2026-03-04 23:20:27 +07:00
viettranxandClaude Opus 4.6 78abdec887 feat(mcp+skills): per-agent registry isolation, skill access filtering, managed skill lifecycle (#57)
Security: fix cross-agent MCP tool leak by cloning tool registry before MCP registration.

MCP: enforce mcp_ prefix on all tool names, add cache invalidation on server/grant changes,
add grant management endpoints, add group:mcp policy support for per-agent allowlisting.

Skills: persist full YAML frontmatter, auto-promote/demote visibility on grant/revoke,
simplify versioning, handle ZIP wrapper directories, expand tilde in skillsDir path.

Fixes: wrap DeleteSkill cascade in transaction, use atomic NOT EXISTS for revoke-demote,
create cancel context before storing server in map.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:14:31 +07:00
viettranxandClaude Opus 4.6 4da116292a feat(teams): add CancelTask with dependency unblocking and delegation cancellation
- Add CancelTask store method: guards against completed tasks, unblocks dependents, transitions blocked→pending
- Cancel running delegation when team task is cancelled via CancelByTeamTaskID
- Prevent delegate agents from completing/cancelling tasks directly
- Wire DelegateManager into TeamToolManager for task-delegation lifecycle
- Remove BOOTSTRAP.md from predefined agent seed (predefined agents already have full context)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:11:10 +07:00
viettranxandClaude Opus 4.6 1841a7097c fix: wire DelegateManager into /stopall to cancel async delegations
DelegateAsync creates detached contexts (context.Background()) and runs
outside the scheduler, so /stopall's CancelSession() couldn't reach them.
Now /stopall also calls DelegateManager.CancelForOrigin() to cancel
active delegate tasks matching the origin channel+chatID.

Also silences context.Canceled errors in subagent/delegate announce
handlers to avoid sending spurious error messages after cancellation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 22:17:22 +07:00
viettranxandClaude Opus 4.6 b8afe6a899 feat(security): add web_fetch domain blocklist, enhance IP scrubbing, enforce delegation scope
- Add blocked_domains to web_fetch policy (always enforced regardless of allow_all/allowlist mode)
- Refactor domain matching into shared matchDomainList() for allowlist and blocklist
- Enhance server IP scrubbing: register decimal IP, dashed pattern, and reverse DNS hostnames
- Add SOUL.md scope enforcement to delegation ExtraPrompt so agents refuse out-of-scope tasks
- Add blocked domains UI textarea in dashboard tools config

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 20:08:59 +07:00
viettranx b35dc56aff feat: add prose-invert class to user-rendered markdown content in MarkdownRenderer. 2026-03-04 16:10:17 +07:00
viettranxandClaude Opus 4.6 6c7e3251e2 fix: complete reasoning passback + fix stripGarbledToolXML discarding valid content
- Copy resp.Thinking to assistant message in agent loop so reasoning_content
  is actually passed back to thinking models (Kimi, DeepSeek) on multi-turn
- Fix stripGarbledToolXML returning empty string when valid content remains
  after stripping XML artifacts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 16:05:25 +07:00
Viet Tran 87ce3030b2 Merge pull request #49 from Luvu182/fix/openai-sse-and-bugfixes
fix: OpenAI-compat SSE parsing, reasoning passback, sanitize logic, env var parity
2026-03-04 16:04:58 +07:00
viettranxandClaude Opus 4.6 c7d7c80100 feat(dashboard): redesign overview page with quota usage, recent traces, system info
Add quota.usage RPC method backed by QuotaChecker.Usage() which queries
per-user request counts (hour/day/week) with resolved limits and today's
aggregate stats. Dashboard now shows summary cards, quota progress bars,
recent requests table, system health, and cron jobs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 11:41:46 +07:00
viettranx bae367b188 feat: Implement web fetch domain allowlist policy with UI configuration and dynamic updates, and enhance quota group selection. 2026-03-04 11:14:02 +07:00
viettranxandClaude Opus 4.6 d0531df67e fix(teams): auto-create team task in spawn + remove pendingTasksHint
Root cause: TEAM.md instructed LLM to call team_tasks create + spawn
in the "SAME turn", but parallel tool execution caused LLM to
hallucinate task IDs. pendingTasksHint then leaked real task IDs
into error messages, causing cascade failures.

Changes:
- Auto-create team task when spawn is called without team_task_id
  (subject from label param, fallback to task description)
- Remove pendingTasksHint() — stop leaking task IDs in error messages
- Update TEAM.md workflow to one-step delegation (just spawn)
- Orphan detection now queries DB for actual pending tasks
- Include team_task_id in spawn tool result for tracing
- Improve in-progress reminder wording

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 10:51:22 +07:00
viettranxandClaude Opus 4.6 ed32e68c68 feat(quota): channel quota limiter + per-run tool budget + config UI
Part A — Channel quota limiter (managed mode):
- DB-backed per-user/group request quotas with in-memory 60s TTL cache
- Config merge priority: Groups > Channels > Providers > Default
- Per-group quota override via channels.telegram.groups[chatID].quota
- Migration 000009: index on channel_requests for quota queries
- Hot-reload quota config via pub/sub (TopicConfigChanged)

Part B — Per-run tool call budget:
- Soft stop at configurable limit (default 25, per-agent override)
- MaxToolCalls field on AgentDefaults + AgentSpec + LoopConfig
- LLM gets one final call to summarize when budget exceeded

Part C — Web UI + config page refactor:
- QuotaSection with provider/channel dropdowns (useProviders, useChannelInstances)
- Config page refactored to vertical sidebar tabs layout
- Categories: General, Quota, Agents, Tools, Connections, Advanced, Raw Editor
- Fixed config.patch RPC to serialize raw JSON + baseHash correctly
- Config change pub/sub broadcast from handleApply/handlePatch

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 10:11:17 +07:00
Luvu182 1c9e8db8e4 fix: OpenAI-compat SSE parsing, scanner error check, reasoning passback, and env var parity
- SSE: handle "data:" without space (Kimi and other providers)
- Add scanner.Err() check to detect stream read failures
- Echo reasoning_content for thinking models (Kimi, DeepSeek)
- Add Thinking field to Message struct for reasoning passback
- Add GOCLAW_OPENAI_BASE_URL env var override (parity with Anthropic)
2026-03-04 09:38:38 +07:00
viettranxandClaude Opus 4.6 d62fd830e0 feat(delegation): grouped progress notification + configurable estimated_duration
Progress notifications are now grouped per source agent — one combined
message lists all active delegations instead of spamming per-task.
Agents can set estimated_duration (seconds) when spawning to control
the notification delay (default 90s). Uses dedup via progressSent map.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 08:29:53 +07:00
viettranxandClaude Opus 4.6 71da3d7889 feat(delegation): proactive progress notification + in-progress task reminder
Send a "still working" message to users after 45s if async delegation is
still running, using PublishOutbound directly. Also expand the team task
reminder to include in-progress tasks so lead agents wait for delegates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 08:06:03 +07:00
Winter279 10361b36f8 fix: correct cron job delivery to Discord channels (#47)
- Override LLM-provided channel ID with context value to prevent
  misrouted deliveries (LLM was confusing guild ID with channel ID)
- Send cron reminder message directly instead of agent response
  so reminders appear as bot notifications in Discord
2026-03-04 07:53:23 +07:00
ca05aba6ea fix(chat): show all active agents in chat dropdown (#48)
* fix(channels): start outbound dispatcher before channel check

StartAll() returned early when no channels existed at boot,
skipping the dispatchOutbound goroutine. Channels loaded later
via Reload() assumed the dispatcher was running, causing outbound
messages (agent responses) to never reach Telegram.

Move dispatcher startup before the empty-channel early return so
dynamically loaded channels always have a running consumer.

* feat(ui): add LLM provider warning on overview page and ignore plans dir

Show alert when no providers configured or all disabled, linking to provider settings. Add plans/ to .gitignore.

* feat(onboard): add provider connectivity verification and placeholder seeding

- Add onboard_verify.go: verify API keys via POST to chat/completions
  endpoint (401/403 = fatal, 400/422 = key valid, 5xx = warn)
- Verify all configured providers before seeding in auto-onboard
- Seed disabled placeholder providers (OpenRouter, Synthetic, AliCloud
  API/Sub) for UI discoverability after managed data seeding

* fix: use model ID as display name in OpenAI-compatible provider list

The `owned_by` field (e.g. "system") was incorrectly used as the model
display name, causing all models to show as "system" in the UI dropdown
for providers like AliCloud DashScope.

* fix(chat): show all active agents in chat dropdown

Chat agent selector showed "No agents available" because:
- WS agents.list only returned in-memory router cache (empty in managed mode)
- useEffect had stale [ws] dep that never re-fired after connect

Frontend: switch agent-selector from WS to HTTP /v1/agents API with
proper access control (ListAccessible). Backend: add store-backed
agents.list for WS consumers + Router.IsRunning() helper.

* fix(security): prevent agent list leaking on empty userID or store error

- Return error instead of falling through to unfiltered router cache
  when userID is empty or DB query fails in managed mode
- Add empty-string guard to isOwnerUser to prevent false owner match

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: ntduc <ntduc@cpp.ai.vn>
Co-authored-by: viettranx <viettranx@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 07:50:47 +07:00