Liora-Z/dsh-behavior-enhancer5

dsh-behavior-enhancer

行为管理插件:提供系统提示词行为约束、失败收敛并行度调节以及连续失败用户介入功能。

AI 分析

核心用途是约束和优化智能体的工具调用行为。适合需要防止智能体陷入死循环、控制并发度并提高调用成功率的用户。

包名
dsh-behavior-enhancer
版本
1.0.0
最近更新
2026年9月7日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Liora-Z/dsh-behavior-enhancer

配置

- id: behavior-enhancer
  name: 'dsh-behavior-enhancer'
  config:
    behaviorPrompt:
      enabled: true
      order: -98
      text: |        # 可整体替换;必须保持静态(禁时间戳/动态值)
        ## 工具调用行为纪律(本会话)
        - 先读后写
        - 批量操作前先验证
        - 失败立即收敛
        - 同类修改串行
        - 证据与诚实
        - 上下文已压缩时先查日志再回答
    parallelConvergence:
      enabled: true
      recoveryThreshold: 3     # 连续成功次数达到后恢复原并行度
      complexRatio: 0.6        # 上下文压力比(idle 测量),超阈值降档
      minParallel: 1
      defaultParallel: 10      # 读不到当前值时的 fallback(核心默认 10)
      contextWindowFallback: 1000000
    failureGuard:
      enabled: true
      maxFailures: 2
      followupMessage: '工具 {tool} 已连续失败 {count} 次。请停止重试,向用户说明失败原因并询问下一步。'
      blockFeedback: false     # 慎用:拦截错误结果正文,模型会看不到失败细节
      feedbackText: '该工具调用失败。请先分析失败原因并修正调用参数后再重试,不要原样重复。'