dfycaly98931680/dsh-trajectory-governance ↗★ 4
dsh-trajectory-governance
DSH 智能体轨迹治理与异常诊断插件,支持重建多分支轨迹树并运行死锁、无效重试和目标漂移诊断。
AI 分析
核心用途是监控和诊断 Agent 运行中的异常行为。适合需要解决 Agent 陷入死循环、无效重复尝试或偏离原始目标等运行期问题的开发者,需 DSH >= 0.1.0-rc.6。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:dfycaly98931680/dsh-trajectory-governance說明文件
閱讀完整 README ↗Configuration
The plugin row accepts config (all optional; deep-merged over defaults):
- insert:
- id: trajectory-governance
name: dsh-trajectory-governance
config:
storage:
path: C:/data/trajectory.db # default ~/.dsh-trajectory-governance/trajectory.db
diagnosis:
strategyA:
enabled: true
windowSize: 5
similarityThreshold: 0.85
resultSimilarityThreshold: 0.8
strategyB:
enabled: true
minRounds: 3
strategyC:
enabled: true
sampleEveryNRounds: 5
similarityThreshold: 0.5
consecutiveSamples: 2
embedder: lexical # 'lexical' built-in; 'llm' is the extension seam
analyzer:
enabled: true
intervalMs: 10000
alerts:
enabled: true
minConfidence: 0.8
cooldownMs: 600000
channels:
desktop: true # browser Notification (client side)
cordisEvent: true # 'trajectory/anomaly' bus event for the ecosystem
webhook:
url: "" # Feishu/DingTalk/Slack-style text webhook
actions:
onLoopDeadlock: notify # notify | suggest-stop(一键中断按钮) | auto-stop
onInvalidRetry: notify
onGoalDrift: notify
cost:
enabled: true
tokenPricePerM: 0.28 # adjust to your provider pricing
estimateWhenUsageMissing: true
Full schema: DIAGNOSIS_CONFIG_SCHEMA in src/diagnose/config.ts.