Previously the voice map referenced 10+ non-existent Edge TTS voice names
(xiaohan, xiaochen, xiaoshuang, etc.), causing NoAudioReceived errors and
fallback to browser default TTS. Now only maps to the 6 actually available
Chinese voices (xiaoxiao, xiaoyi, yunxi, yunyang, yunjian, yunxia).
Added voice speed adjustments and fixed --rate argument format for Windows.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Three changes to fix the CS agent (3490efa8) and other public agents not being
accessible to regular users:
- agents.py: include is_public=1 agents in listing query for non-admin users
- agent_chat.py: add is_public check in chat/stream permission guards
- permission_service.py: grant read+execute to all users for public agents
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- "天工客服" agent (ID: 3490efa8) created on backend, status: published
- Settings > Account section now has "联系客服" button
- Tap navigates to chat with the CS agent directly
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Backend: CRUD endpoints for app versions (list, create, delete, download)
- Backend: APK file upload with multipart form data
- Backend: Version data stored in JSON file, APK files in data/app_versions/
- Frontend: Vue 3 + Element Plus page at /app-versions
- Frontend: Drag-and-drop APK upload, version publish, force update config
- Frontend: Version history table with "set as latest" and delete actions
- Menu item under System Settings (admin only)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- LoginScreen: add agreement checkbox, disabled until checked
- RegisterScreen: add agreement checkbox, disabled until checked
- RegisterViewModel: pass agreed_terms/agreed_terms_version to API
- RegisterRequest DTO: add agreedTerms/agreedTermsVersion fields
- Also include 3 template scripts missed in previous commit
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Backend changes for Phase A of v1.0 commercial launch:
P0-3: Password Security
- Remove hardcoded admin/123456 defaults from 34+ bootstrap scripts
- Add PLATFORM_USERNAME/PLATFORM_PASSWORD env vars to config
- Add PUT /api/v1/auth/change-password endpoint (requires old password)
P0-1: User Agreement & Privacy Policy
- Add agreed_terms/agreed_terms_version/agreed_terms_at to User model
- New GET /api/v1/legal/privacy and GET /api/v1/legal/terms endpoints
- New POST /api/v1/legal/agree endpoint to record consent
- Register endpoint now validates agreed_terms must be True
P0-6: Account Management
- Add phone/status/is_email_verified to User model
- Add DELETE /api/v1/auth/account for account deletion (with password confirmation)
- Add PUT /api/v1/auth/phone for phone binding
- Reject authentication for deleted accounts (status=deleted)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Three root causes fixed:
- Room Flow observer overwrote deduplicated list during loadMoreHistory()
→ Added isLoadingHistory flag to suppress Flow updates while loading
- beforeId used local IDs (user_/asst_ prefix) that server couldn't resolve,
causing server to return ALL messages → Find oldest server-UUID message as cursor
- Scroll-to-top LaunchedEffect could double-fire → Added 800ms throttle
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
AgentRuntime writes scope_id as {user_id}:{agent_id} (73 chars) but:
- DB columns were CHAR(36)/VARCHAR(36), causing Data too long errors
- Memory API queried with agent_id only, returning empty results
- Add _mem_scope() helper to build correct scope_id format
- Update all CRUD queries in agent_memory.py to use _mem_scope()
- Enhance login failure logging in auth.py
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Backend:
- Composite ORDER BY (created_at DESC, iteration ASC, id ASC) to fix
non-deterministic ordering when multiple messages share same second
- Composite key cursor pagination to avoid missing messages at boundary
Android:
- Fix message duplication: guard loadMoreHistory from firing before
initial scroll completes (isAtTop race → fetchOlderMessages →
cacheMessagesFromApi with different IDs → Room duplicates)
- Add distinctBy(id) at all message assignment points in ViewModel
- cacheMessagesFromApi: skip insert if same ID or same content exists
- Add relative timestamp display on message bubbles
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Backend:
- New /api/v1/agents/{id}/memory endpoints: CRUD for global_knowledge,
knowledge_entities, learning_patterns, vector_memories + import/export
- Fix scope_id column overflow: 3 model columns expanded to hold compound
keys (user_id:agent_id format, 73 chars vs old VARCHAR(36))
- Config: allow unknown env vars (extra="ignore") for optional overrides
Android:
- MemoryManageScreen: 4-tab UI (全局知识/知识实体/学习模式/对话记忆)
with search, delete, and FAB to add new entries
- Import/export via ShareSheet and file picker
- AgentListScreen: long-press dropdown menu → 记忆管理 entry point
- NavGraph: memory_manage/{agentId}/{agentName} route with URL encoding
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Backend:
- Add ChatMessage model + Alembic migration 024
- Add on_message callback to AgentRuntime for persisting messages during SSE streaming
- Plumb session_id from ChatRequest to AgentContext in all 4 chat endpoints
- Add GET /agent-chat/{id}/sessions and /sessions/{sid}/messages with cursor pagination
Android:
- Add DTOs/ApiService/MessageDao for server-side chat history
- ChatRepository: fetchOlderMessages (API + Room cache), offline fallback
- ChatViewModel: loadMoreHistory with isLoadingMore/hasMoreMessages state
- ChatScreen: scroll-to-top detection + top loading indicator
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix delete agent 500: clean up FK records (agent_llm_logs, permissions,
schedules, executions, team_members) and unbind goals/tasks before delete
- Remove hardcoded personality templates in Android, replace with dynamic
system prompt generation from name + description
- Set promptSectionsEnabled=false to bypass PromptComposer for personality
- Add Tencent Cloud Linux deployment guide (Docker Compose)
- Accumulated backend service updates, frontend UI fixes, Android app changes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Without phase_start, the frontend had no panel created until the first
agent_event arrived (30+ seconds after plan_done), making it look like
nothing was happening.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Backend: execute_stream() now uses AgentRuntime.run_stream() per phase,
forwarding agent internal events (think/tool_call/tool_result/final) as
`agent_event` SSE type with phase metadata via asyncio.Queue for DAG
parallel batches.
Frontend: new agent-panels-grid with per-phase cards showing live
activity log, tool calls, iteration count, and collapsible full output.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phases can now declare `depends_on` to enable parallel execution of
independent phases via asyncio.gather. Backward compatible — templates
without depends_on continue to use sequential execution.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add 5 roles: doc_architect, tech_writer, api_doc_specialist, translator_reviewer, release_manager
- Add 5 dedicated system prompts for documentation roles
- Add orchestrator planner mapping for tech_doc workflow
- Add frontend button and API client function
- Total preset roles now 19 across 4 template families
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add 2 new team templates: 教育培训团队 (4 roles) and 天工平台工程团队 (5 roles)
- Fix orchestrator to support multi-template workflow types (remove hardcoded PM planner)
- Add _resolve_planner_role() to auto-detect planner based on team.config.workflow
- Add frontend buttons and API clients for new templates
- Merge 14 preset roles from 3 template families in get_preset_roles()
- Add creation guide and platform engineering usage docs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Both pages were missing the MainLayout wrapper, causing the navigation
bar to disappear when navigating to /digital-employees or /goals/:id.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- New pages: DigitalEmployeeFactory.vue (goal grid + create dialog), GoalDetail.vue (task tree + progress)
- New store: goal.ts (Pinia store with full Goal/Task API bindings)
- Router: add /digital-employees and /goals/:id routes
- MainLayout: add "数字员工工厂" nav menu item with UserFilled icon
- Schedule model: add schedule_type, goal_id, goal_config for Goal-type cron scheduling
- Schedule service: add _create_execution_for_goal_schedule for periodic Goal creation
- Migration 014: add schedule_type/goal_id/goal_config columns to agent_schedules
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The platform has evolved from a low-code workflow engine to an autonomous
agent platform with ReAct runtime, multi-agent marketplace, persistent
memory, multimodal tools, and multi-channel integration.
"天工" (Tiangong) draws from 《天工开物》- the wonders of nature and human
ingenuity, reflecting the platform's purpose: empowering users to create
and orchestrate AI agents as masterfully as nature creates all things.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These four handlers were missing the 🤔 prefix in their "正在思考,请稍候..."
reply, while 橙子/苏瑶/主飞书 handlers already had it. Unified for consistency.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
web_search_tool now tries Bing Web Search API first (works in China, free tier
1000 searches/month via Azure), then falls back to DuckDuckGo. Both backends
support optional SEARCH_PROXY for network-restricted environments.
New settings:
- BING_SEARCH_API_KEY: Azure Bing Search API key
- SEARCH_PROXY: HTTP proxy for outbound search requests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When conversation history exceeds max_history, the blind slice in trim_messages
could cut between an assistant(tool_calls) message and its tool result messages.
DeepSeek/OpenAI requires every role:"tool" message to follow a preceding
assistant message with matching tool_calls.
The fix detects when the slice boundary lands on a tool message, then scans
backwards to include the parent assistant(tool_calls) message(s). If the parent
cannot be found (e.g. cut at a user boundary), the orphaned tool messages are
removed. This fixes the "Messages with role 'tool' must be a response to a
preceding message with 'tool_calls'" error from DeepSeek.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Nodes created via some paths store configuration under "config" instead of
"data", causing agent/LLM/orchestrator nodes to run with default settings
(gpt-4o-mini/openai instead of the configured model). This caused 橙子 agent
scheduled tasks to fail with "节点 node-agent-1 执行失败: 未知错误".
Add normalize at execute_node entry + fallback reads in agent/LLM/orchestrator
handlers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- schedule_delete_tool 执行前先解除 executions.schedule_id 引用
- 迁移 012: executions.schedule_id FK 改为 ON DELETE SET NULL
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>