Cangjier/xl ↗★ 0

xl

xl-md (*.xl.md) compiler for DeepSeek Harness: the xl command line, an xl Host service, and model-facing xl_* tools. 适合需要编译xl-md文件或在会话中使用相关工具的开发者。

패키지
xl
호환성
미검증
버전
0.1.0
최근 업데이트
2026. 9. 29.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Cangjier/xl

5. 配置

5.1 profile 行配置(cordis.patch.yml)

- id: xl
  name: 'xl'
  config:
    workspaceRoot: null      # 工具缺省的工作目录;null 用进程 cwd
    cacheDir: '.xl'          # 每个语言目录下的 cache 目录名(缺省即 dist//.xl);xl.json 与 XL_CACHE_DIR 优先级更高
    defaultTargets: ['ts']   # 请求未给 targets 且 xl.json 也没有时的缺省
    verifyOnEmit: true       # xl_emit 未显式给 verify 时是否先校验

字段类型错误会在激活时抛错(Loader 无法替本包校验配置,因为校验需要 harness 依赖)。

5.2 xl.json

沿用 xl-cli.md §4 的查找顺序与字段:

{
  "build": { "target": ["ts"], "out": "dist", "naming": "idiomatic", "header": true, "cacheVersions": 5 },
  "check": { "ignore": ["W3102"], "strict": false, "maxWarnings": null },
  "targets": {
    "kotlin": { "ext": ".kt" },
    "objcpp": {
      "parts": [
        { "role": "header", "ext": ".h" },
        { "role": "source", "ext": ".mm", "requires": "bodies", "scope": "definition" }
      ]
    }
  }
}
  • 自定义目标给 ext(单部件,等价于 parts: [{ "role": "file", "ext": … }])或直接给 parts。parts 里 role 是部件名(缺省 part1、part2…,同一目标内唯一),ext 必填,requires: "bodies" 表示"该单元有可执行内容时才计划",scope: "definition" 表示"这个部件只定义部分成员"(见 docs/xl-cli.md §3.5)。声明不成部件表是用法错误(E0004,退出码 2)。

  • build.target(字符串或数组)是缺省目标,优先于行配置的 defaultTargets;build.out、build.naming、build.header、build.cacheVersions、build.cacheDir 都生效。

  • harness 段整体不再被读取(没有子进程通道);targets..model 虽然被读进目标描述符,但无人消费——模型 id 由 agent 在 xl_emit 的 model 参数里给出;targets..layout 则根本不读:自定义目标走计划通道,而计划通道恒为 type(§4.4)。

优先级一律是 CLI 参数 > 环境变量(XL_TARGET / XL_OUT / XL_CONFIG / XL_CACHE_DIR)> xl.json > 内置缺省,所有入口(CLI 与七个工具)适用同一套规则。


5.1 profile 行配置(cordis.patch.yml)

- id: xl
  name: 'xl'
  config:
    workspaceRoot: null      # 工具缺省的工作目录;null 用进程 cwd
    cacheDir: '.xl'          # 每个语言目录下的 cache 目录名(缺省即 dist//.xl);xl.json 与 XL_CACHE_DIR 优先级更高
    defaultTargets: ['ts']   # 请求未给 targets 且 xl.json 也没有时的缺省
    verifyOnEmit: true       # xl_emit 未显式给 verify 时是否先校验

字段类型错误会在激活时抛错(Loader 无法替本包校验配置,因为校验需要 harness 依赖)。