EricWang1358/dsh-jspace-trigger1

dsh-jspace-trigger

可配置的近场触发器:根据规则提醒 DeepSeek Harness 智能体加载 J-Space 认知套件

AI 分析

核心用途是按需触发智能体加载 J-Space 认知套件以节省资源。适合已安装 J-Space 认知套件并希望通过规则控制其加载时机的 DSH 用户。

包名
dsh-jspace-trigger
版本
0.2.0
许可证
MIT
最近更新
2026年8月18日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:EricWang1358/dsh-jspace-trigger

Configuration

Configuration lives in the plugin config, normally edited in cordis.patch.yml.

- insert:
    - id: jspace-trigger
      name: dsh-jspace-trigger
      config:
        enabled: true
        injectMode: near-field      # near-field | none
        analytics:
          enabled: true             # metadata only; no prompts or tool arguments
          maxRecords: 50            # bounded to 1..500
        trigger:
          minScore: 1               # threshold only for matchMode: score
          loopChars: 1800           # text longer than this -> loop fallback
          fullChars: 120            # text longer than this -> full fallback
          rules:
            - id: explicit
              action: trigger
              pass: loop
              excludePatterns: ["不要使用 j-space", "do not use j-space"]
              modules: [capacity, broadcast]
              patterns: ["/j-space", "use j-space"]

            - id: chat
              action: ignore
              patterns: ["^你好[!。.!??~~]*$", "^(hello|hi|thanks|ok)[!。.!??~~]*$"]

            - id: workspace-research
              action: trigger
              pass: loop
              matchMode: all
              modules: [capacity, broadcast, markers, self-monitoring]
              patterns:
                - "文件夹|目录|仓库|代码库|工作区|(?:todo|ddl).*(?:文件|列表|状态)|(?:文件|列表).*(?:todo|ddl)|folder|directory|repository|repo|workspace"
                - "调研|盘点|梳理|画像|审计|研究|分析|了解|research|survey|audit"

            - id: loop
              action: trigger
              pass: loop
              modules: [capacity, broadcast, markers, self-monitoring]
              patterns: ["多阶段|多文件|跨文件|长程|仓库级", "long-horizon|multi-file|repository-wide"]

            - id: research
              action: trigger
              pass: full
              modules: [deep-reasoning, self-monitoring]
              patterns: ["调研|盘点|梳理|尽调|研究|调查|research|investigate|survey"]

            - id: complex
              action: trigger
              pass: full
              modules: [deep-reasoning, self-monitoring]
              patterns: ["重构|架构|全面|调试|审查", "refactor|architecture|debug|review"]

        # Optional: skill install/check settings
        skillRoots:
          - ~/.agents/skills
          - ~/.dsh/skills
        repoUrl: https://github.com/Tiger3807861189/J-Space-Cognition-Suite-V3.6.git
        branch: main

Rule fields

FieldMeaning
actiontrigger, ignore, or none
passfast, full, loop
modulesJ-Space modules to suggest on a hit
patternsRegex source strings or RegExp objects
matchModeany (default), all, or score
minScorePer-rule score threshold; overrides trigger.minScore for matchMode: score
excludePatternsRegexes that veto this rule, useful for explicit opt-outs