Skip to content

Commit 64f532f

Browse files
authored
feat: implement async task system and enhance agent capabilities (#179)
1 parent 0e17a3f commit 64f532f

312 files changed

Lines changed: 17491 additions & 4642 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

assets/schema/derisk.sql

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use derisk;
99
-- MySQL DDL Script for Derisk
1010
-- Version: 0.3.0
1111
-- Generated from SQLAlchemy ORM Models
12-
-- Generated: 2026-03-21 15:56:36
12+
-- Generated: 2026-03-24 19:23:14
1313
-- ============================================================
1414

1515
SET NAMES utf8mb4;
@@ -284,24 +284,25 @@ CREATE TABLE IF NOT EXISTS `gpts_messages` (
284284
`is_success` TINYINT(1) NULL DEFAULT 1 COMMENT 'is success',
285285
`app_code` VARCHAR(255) NOT NULL COMMENT 'The message in which app',
286286
`app_name` VARCHAR(255) NOT NULL COMMENT 'The message in which app name',
287-
`thinking` TEXT NULL COMMENT 'Thinking of the speech',
288-
`content` TEXT NULL COMMENT 'Content of the speech',
287+
`thinking` LONGTEXT NULL COMMENT 'Thinking of the speech',
288+
`content` LONGTEXT NULL COMMENT 'Content of the speech',
289289
`content_types` VARCHAR(1000) NULL COMMENT 'Content types of the speech',
290290
`message_type` VARCHAR(255) NULL COMMENT 'type of the message',
291-
`system_prompt` TEXT NULL COMMENT 'this message system prompt',
292-
`user_prompt` TEXT NULL COMMENT 'this message system prompt',
291+
`system_prompt` LONGTEXT NULL COMMENT 'this message system prompt',
292+
`user_prompt` LONGTEXT NULL COMMENT 'this message system prompt',
293293
`show_message` TINYINT(1) NULL COMMENT 'Whether the current message needs to be displayed to the user',
294294
`goal_id` VARCHAR(255) NULL COMMENT 'The target id to the current message',
295295
`current_goal` TEXT NULL COMMENT 'The target corresponding to the current message',
296296
`context` TEXT NULL COMMENT 'Current conversation context',
297297
`review_info` TEXT NULL COMMENT 'Current conversation review info',
298-
`action_report` TEXT NULL COMMENT 'Current conversation action report',
298+
`action_report` LONGTEXT NULL COMMENT 'Current conversation action report',
299299
`resource_info` TEXT NULL COMMENT 'Current conversation resource info',
300300
`role` VARCHAR(255) NULL COMMENT 'The role of the current message content',
301301
`avatar` VARCHAR(255) NULL COMMENT 'The avatar of the agent who send current message content',
302302
`metrics` VARCHAR(1000) NULL COMMENT 'The performance metrics of agent messages',
303-
`tool_calls` TEXT NULL COMMENT 'The tool_calls of agent messages',
304-
`observation` TEXT NULL COMMENT 'The message observation',
303+
`tool_calls` LONGTEXT NULL COMMENT 'The tool_calls of agent messages',
304+
`input_tools` LONGTEXT NULL COMMENT 'The input tools passed to LLM',
305+
`observation` LONGTEXT NULL COMMENT 'The message observation',
305306
`gmt_create` DATETIME NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'create time',
306307
`gmt_modified` DATETIME NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'last update time',
307308
`gmt_modify` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
@@ -478,7 +479,7 @@ CREATE TABLE IF NOT EXISTS `gpts_app_config` (
478479
`system_prompt_template` TEXT NULL COMMENT '当前版本配置的system prompt模版',
479480
`user_prompt_template` TEXT NULL COMMENT '当前版本配置的user prompt模版',
480481
`layout` VARCHAR(255) NULL COMMENT '当前版本配置的布局配置',
481-
`custom_variables` TEXT NULL COMMENT '当前版本配置自定义参数配置',
482+
`custom_variables` VARCHAR(2000) NULL COMMENT '当前版本配置自定义参数配置',
482483
`llm_config` TEXT NULL COMMENT '当前版本配置的模型配置',
483484
`resource_knowledge` TEXT NULL COMMENT '当前版本配置的知识配置',
484485
`resource_tool` TEXT NULL COMMENT '当前版本配置的工具配置',

configs/derisk-proxy-aliyun.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,7 @@ oss_ak="${env:OSS_ACCESS_KEY_ID:-xxx}"
8383
oss_sk="${env:OSS_ACCESS_KEY_SECRET:-xxx}"
8484
oss_endpoint="https://oss-cn-beijing.aliyuncs.com"
8585
oss_bucket_name="openderisk"
86+
87+
# Disable default skill sync from GitHub (network can be slow)
88+
[derisk.serve.skill]
89+
enable_default_skill_sync = false

derisk/context/unified_context_middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ async def _group_worklog_by_phase(
192192
}
193193

194194
current_phase = TaskPhase.EXPLORATION
195-
exploration_tools = {"read", "glob", "grep", "search", "think"}
195+
exploration_tools = {"read", "glob", "grep", "search"}
196196
development_tools = {"write", "edit", "bash", "execute", "run"}
197197
refinement_keywords = {"refactor", "optimize", "improve", "enhance"}
198198
delivery_keywords = {"summary", "document", "conclusion", "report"}

0 commit comments

Comments
 (0)