ChatPaper.aiChatPaper

言語サーバーCLI、プロセス報酬による言語エージェントの機能強化

Language Server CLI Empowers Language Agents with Process Rewards

October 27, 2025
著者: Yifan Zhang, Lanser Contributors
cs.AI

要旨

大規模言語モデルは、APIを頻繁に幻覚し編集箇所を誤って特定する一方で、言語サーバーは実際のコードに関する検証済みのIDEレベルの事実を計算する。本論文では、LSPサーバーをコーディングエージェントやCI向けに固定・仲介するCLIファーストのオーケストレーション層であるLanser-CLIを提案する。これは決定論的で再生可能なワークフローを提供する。我々の立場は、言語サーバーが構造情報(定義、参照、型、診断)だけでなく、エージェントの計画ループをプログラムの現実に整合させる、機械チェックされた段階的シグナルという実用的なプロセス報酬を提供するという点である。本研究においてLanser-CLIは以下を貢献する:(i) 脆弱な「ファイル:行:列」を超えた堅牢なアドレッシングスキーム(Selector DSLによる記号的、ASTパス、コンテンツ固定セレクタ)と原則に基づく再配置アルゴリズム、(ii) 言語サーバー応答を正規化し、安定したコンテンツハッシュで環境/機能メタデータを捕捉する決定論的分析バンドル、(iii) プレビュー、ワークスペースジェイル、Gitを意識したトランザクション的適用を備えた変更操作(名前変更、コードアクション)の安全性エンベロープ、(iv) 言語サーバー事実(診断差分、曖昧性解消信頼度、安全適用チェック)から導出され、オンラインで計算可能でオフラインで再生可能なプロセス報酬関数。凍結スナップショット下での決定性を形式化し、プロセス報酬の単調性特性を確立することで、プロセス監視及び反事実的分析への適用を可能にする。プロジェクトページ: https://github.com/yifanzhang-pro/lanser-cli
English
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
PDF41December 31, 2025