Large language models routinely hallucinate APIs and mislocalize edits, while language servers compute verified, IDE-grade facts about real code. We present Lanser-CLI, a CLI-first orchestration layer that pins and mediates a Language Server Protocol (LSP) server for coding agents and CI, exposing deterministic, replayable workflows. Our position is that language servers provide not only structural information (definitions, references, types, diagnostics) but also an actionable process reward: machine-checked, step-wise signals that align an agent's planning loop with program reality. In this work, Lanser-CLI contributes: (i) a robust addressing scheme beyond brittle "file:line:col" via a Selector DSL (symbolic, AST-path, and content-anchored selectors) with a principled relocation algorithm; (ii) deterministic Analysis Bundles that normalize Language Server responses and capture environment/capability metadata with stable content hashes; (iii) a safety envelope for mutating operations (rename, code actions) with preview, workspace jails, and Git-aware, transactional apply; and (iv) a process-reward functional derived from Language Server facts (diagnostic deltas, disambiguation confidence, and safe-apply checks) that is computable online and replayable offline. We formalize determinism under frozen snapshots and establish a monotonicity property for the process reward, making it suitable for process supervision and counterfactual analysis. Project Page: https://github.com/yifanzhang-pro/lanser-cli
翻译:大型语言模型常产生API幻觉并错误定位编辑操作,而语言服务器则能计算关于真实代码的、经过验证的集成开发环境级事实。本文提出Lanser-CLI,这是一个以命令行界面为先的编排层,通过固定并协调语言服务器协议服务器服务于编码智能体与持续集成系统,提供确定化、可复现的工作流。我们的核心观点是:语言服务器不仅提供结构信息(定义、引用、类型、诊断),还提供可操作的过程奖励——即机器可验证的、逐步递进的信号,使智能体的规划循环与程序现实保持一致。本工作中,Lanser-CLI贡献包括:(一)通过选择器领域特定语言(符号化、抽象语法树路径及内容锚定选择器)结合理论化的重定位算法,构建超越脆弱“文件:行:列”模式的鲁棒寻址方案;(二)确定化的分析包,可标准化语言服务器响应,并通过稳定内容哈希捕获环境/能力元数据;(三)为变更操作(重命名、代码操作)配备安全边界,支持预览、工作区沙箱及具备Git感知的事务性应用;(四)基于语言服务器事实(诊断增量、消歧置信度、安全应用检查)推导的过程奖励函数,支持在线计算与离线复现。我们在冻结快照下形式化确定化特性,并为过程奖励建立单调性属性,使其适用于过程监督与反事实分析。项目页面:https://github.com/yifanzhang-pro/lanser-cli