- 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>
Implement per-app open_id storage via user_feishu_open_ids table with
union_id-based cross-app user identification. WS handlers now auto-capture
open_id+union_id and resolve/associate user accounts. Schedule notifications
route through the correct bot's open_id instead of always falling back to 苹果.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When datetime.utcnow() (naive) was passed as after=, astimezone() treated
it as system-local time (Beijing), causing next_run_at to be calculated
incorrectly. Now naive datetimes are explicitly localized to UTC first.
Also replaced deprecated datetime.utcnow() with aware UTC equivalent.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Timezone: compute_next_run now correctly interprets cron in the schedule's
configured timezone (e.g., "0 8 * * *" with Asia/Shanghai = 8AM Beijing, not UTC)
- Notifications: agent_tasks now reuses pre-created execution records and calls
notify_schedule_result on completion, so non-workflow agent schedules get
DB notifications + Feishu webhook + Feishu app messages
- Duplicate execution: execute_agent_task accepts optional execution_id to reuse
the record created by schedule_service instead of creating a second one
- Celery Beat: added to restart_backend_celery.ps1, stop_aiagent.ps1, and
docker-compose.dev.yml; fixed repo-root path resolution in all PS1 scripts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 4.1 Fallback chain: LLM fallback_llm config in AgentLLMConfig, retry with alternate model on API failure; Agent fallback_agent in DAG nodes
- 4.2 Knowledge sharing: GlobalKnowledge model with embedding-based semantic search, auto-extraction of tool names as tags after execution
- 4.3 Async execution: execute_agent_task fully implemented with AgentRuntime, scheduler dual-path for workflow/non-workflow agents
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2.1 Orchestrator in workflow:
- New run_orchestrator_node() in workflow_integration.py loads agents from DB,
supports route/sequential/debate/pipeline modes
- New 'orchestrator' node type in workflow_engine.py execute_node dispatch
2.2 Tool-level human approval:
- AgentToolConfig extended with require_approval, approval_timeout_ms,
approval_default fields
- New ApprovalManager (approval_manager.py) with asyncio.Event-based
create/wait_for_decision/resolve pattern
- AgentRuntime run() and run_stream() intercept tool execution,
wait for approval decision before executing
- New POST /api/v1/approval/{id}/resolve REST endpoint
- Frontend: approval_required SSE event handling, approval dialog UI
with approve/deny/skip buttons
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- All 5 WS handlers (lingxi/feishu/orange/suyao/tiantian) now inject agent_id
into LLM system prompt so agents know their own ID for schedule_list calls
- schedule_delete_tool now supports agent_id parameter for ownership checks
and bulk delete by agent_id
- SCHEDULE_DELETE_SCHEMA updated: required fields now empty, supports
both schedule_id and agent_id params
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add enterprise_review tool (35th builtin) for LLM-based quality assessment
- Add evaluator workflow node type for quality gating in DAG
- Add AgentRuntime built-in self-review with auto-correction loop
- Rewrite error_handler node from stub to real retry mechanism
- Add engine-level per-node retry with configurable max_retries/delay/on_exhausted
- Add AgentExtension model for extension tracking
- Enhance validation in agent_create_tool and tool_register_tool
- Update 全能助手 system prompt with self-evolution workflow
- Docs: 缺失能力.md and 解决缺失能力计划.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- New PromptTemplatePicker component for browsing 13 preset prompt templates
- AgentConfig.vue: "Load from library" button for system prompt
- Agents.vue: "Create from Prompt template" entry with agent node + RAG memory
- seed_prompt_templates.py: 13 preset templates (客服/研发/教育/内容/分析/创意/健康医疗)
- agent_call tool: agents can delegate tasks to other agents (19th builtin tool)
- Created 全能助手 (general orchestrator) and 家庭医生助手 agents
- Switch template-created agents from type:llm to type:agent for full ReAct + RAG
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add 3 schedule tools (create/list/delete) and 5 utility tools (crypto, random, email, URL, regex)
- Add frontend AgentSchedules.vue page with full CRUD, cron presets, manual trigger
- Integrate Celery Beat for automatic schedule execution
- Update startup scripts with Celery Beat launch
- Fix schedule list API to show all schedules for admin users
- Add celrybeat-schedule.* to .gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>