yin52133/dsh-luban--packages-dsh-luban-server-mode0

@yin52133/dsh-luban-server-mode

适用于 Ubuntu 的 systemd 启动器、受保护的构建队列以及经过身份验证的产物收集插件。

AI 分析

核心用途是在 Ubuntu 服务器上以守护进程运行 DSH,并提供安全的编译构建队列。适合在服务器端部署 DSH 并进行远程编译的用户。依赖 systemd 和 tmux。

包名
@yin52133/dsh-luban-server-mode
版本
0.1.1
许可证
MIT
最近更新
2026年9月1日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:yin52133/dsh-luban#fd42aad0a6c5628a3bee24796f0caba131fb0252&path:packages/dsh-luban-server-mode

Configuration

Build queue

Templates are declarative command/argument vectors. ${workspace} is substituted only into arguments, working directories, and artifact collection paths—never into the executable. Every workspace must be under a configured build.workspaceRoots entry. The default templates cover pnpm and CMake builds; customize them for the server toolchain.

build:
  maxConcurrent: 1
  defaultTimeoutMin: 30
  workspaceRoots: [~/workspace, ~/projects]
  templates:
    - id: firmware
      title: Firmware (CMake)
      command: cmake
      args: [--build, '${workspace}/build', --target, firmware]
      cwd: '${workspace}'
      collect: [build/firmware.bin, build/firmware.map]
guard: { diskMinGb: 10, loadMax: 8, checkIntervalSec: 15 }
artifacts: { dir: ~/builds, retainRuns: 10, linkTtlSec: 300 }

M03 launches an internal worker in a luban-server-build-* managed session. The worker enforces the timeout, captures a bounded log tail, skips symlinks while collecting artifacts, and writes a durable result. On timeout or cancellation, the process runner sends TERM, waits for process close and pipe drain, escalates to KILL after one second, and applies a final one-second close bound while removing its timers and listeners. A DSH restart reconnects to that worker/result instead of blindly starting a duplicate build.

Resource probes have a five-second scheduler-side deadline. A rejected or timed-out probe fails closed: new starts remain queued, the resource report is marked paused, and an optional M02 alert card is created. The same pause applies when disk or load crosses its threshold. Failed builds retain a bounded excerpt. The Settings page can send that excerpt directly to the currently open DSH session for diagnosis.