mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-12-06 21:11:50 +08:00
feat(schedules,chat): redesign schedules as interactive calendar with server clock and chat tools
- Expose top-level server_time, server_timezone, and server_utc_offset_minutes on GET /api/schedules - Add list_task_schedules, create_task_schedule, update_task_schedule, and delete_task_schedule chat agent tools - Redesign /function/schedules into a calendar workspace (mini month, status filters, Up next, Day/Week/Month/Agenda views, server-time red indicator, TZ/date switcher, drag-move/resize, rich detail popover) - Add schedule-calendar math unit tests and Postgres integration tests for chat schedule tools
This commit is contained in:
1 parent
778e49317d
commit
8568c41528
10 files changed
+2527
-26
No files matched your search
@@ -85,6 +85,10 @@ func (s *Server) orchestrationTools() []actool.CoreTool {
|
||||
s.toolBindFindingTraffic(),
|
||||
s.toolListProxyPool(),
|
||||
s.toolSetTaskProxy(),
|
||||
s.toolListTaskSchedules(),
|
||||
s.toolCreateTaskSchedule(),
|
||||
s.toolUpdateTaskSchedule(),
|
||||
s.toolDeleteTaskSchedule(),
|
||||
}, s.findingCaseTools()...)
|
||||
}
|
||||
|
||||
@@ -668,7 +672,9 @@ func defaultOrchestrationToolBindings(name string) json.RawMessage {
|
||||
switch {
|
||||
case name == "resume_task":
|
||||
return json.RawMessage(`["auto","mainagent"]`)
|
||||
case name == "list_proxy_pool" || name == "set_task_proxy":
|
||||
case name == "list_proxy_pool" || name == "set_task_proxy" ||
|
||||
name == "list_task_schedules" || name == "create_task_schedule" ||
|
||||
name == "update_task_schedule" || name == "delete_task_schedule":
|
||||
return json.RawMessage(`["auto","mainagent","pentest"]`)
|
||||
case name == "bind_finding_traffic" || strings.Contains(name, "finding_case") || name == "search_finding_duplicates" || name == "get_finding_record" || name == "merge_finding_records":
|
||||
return json.RawMessage(`["reporter"]`)
|
||||
@@ -693,6 +699,7 @@ func (s *Server) seedOrchestrationTools() {
|
||||
s.seedAutoDefaultBindings()
|
||||
s.seedTaskReopenBindings()
|
||||
s.seedProxyToolBindings()
|
||||
s.seedScheduleToolBindings()
|
||||
s.seedPlannerDefaultBindings()
|
||||
s.seedPlannerListAssetsBinding()
|
||||
s.seedCompanyScopeRebind()
|
||||
@@ -784,7 +791,7 @@ func (s *Server) migrateReporterWorkflow() {
|
||||
// reaches an old DB otherwise. Preserves each tool's agent binding + enabled flag.
|
||||
// Bump the flag whenever these tools' schemas/descriptions change in code.
|
||||
func (s *Server) refreshBuiltinToolSchemas() {
|
||||
const flag = "tool_schema_refresh_v10_proxy_tools"
|
||||
const flag = "tool_schema_refresh_v11_schedule_tools"
|
||||
if v, _, _ := s.m.pg.GetSetting(flag); v == "true" {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user