[bug]: @sf-agentscript/lsp-server@2.2.30 crashes at startup — variantMatch is not a function (stale @sf-agentscript/language pin)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- node.js, typescript
調査の方向性
@sf-agentscript/agentforce-dialect、@sf-agentscript/lsp、@sf-agentscript/lsp-server の依存関係宣言から始め、続いて #72 で提案されている公開後の import smoke test を確認してください。npx --yes @sf-agentscript/lsp-server --stdio で再現し、新規インストールで LSP の initialize ハンドシェイクが完了し、diagnostics が公開されることを確認してください。
索引モデルが issue の本文から書いたものです。
説明
Description
The published @sf-agentscript/lsp-server (2.2.30, currently latest) crashes
at startup with TypeError: ...variantMatch is not a function, before the LSP
connection is established. The root cause is a stale exact pin on the transitive
@sf-agentscript/language dependency, so no fresh install of the LSP server
works (same for @sf-agentscript/lsp@2.3.8).
Steps to Reproduce
npx --yes @sf-agentscript/lsp-server --stdio
(ornpm install -g @sf-agentscript/lsp-serverand runagentscript-lsp --stdio)- The process throws immediately, before any LSP handshake.
Expected Behavior
The server starts, completes the LSP initialize handshake, and publishes
diagnostics.
Actual Behavior
Immediate crash at import:
.../@sf-agentscript/agentforce-dialect/dist/schema.js:217
.variantMatch('byon', (value) => value.startsWith(BYON_SCHEMA_PREFIX), byonSubagentVariant);
^
TypeError: NamedBlock(...).describe(...).discriminant(...).variant(...).variantMatch is not a function
Cause: @sf-agentscript/agentforce-dialect@2.13.4 (published 2026-06-10)
uses the variantMatch schema-builder API but pins
@sf-agentscript/language@2.5.4 (2026-06-01), which predates that API.
variantMatch first shipped in @sf-agentscript/language@2.8.4 (2026-06-11,
one day after the dialect) — the dialect appears to have been built against
the unreleased workspace version of language and published with a stale exact
pin. Because every @sf-agentscript/* dependency is an exact pin, no fresh
install can resolve a working language.
Fix: republish agentforce-dialect / lsp / lsp-server against
@sf-agentscript/language >= 2.8.4 (current train is 2.19.3).
Environment
- Node.js version: 22.18.0
- pnpm version: n/a (reproduced with npm / npx)
- OS: Windows 11 (also reproduced in the
node:22-bookwormcontainer) - Package & version:
@sf-agentscript/lsp-server2.2.30 (also@sf-agentscript/lsp2.3.8) - Browser (if applicable): n/a
Minimal Reproduction
The crash happens before any .agent source is read, so no snippet is required —
just running the server reproduces it:
npx --yes @sf-agentscript/lsp-server --stdio
Verified workaround — install with an npm overrides fix, after which the
server initializes and publishes diagnostics normally (verified against
Neovim's LSP client on Node 22):
{
"dependencies": { "@sf-agentscript/lsp-server": "2.2.30" },
"overrides": { "@sf-agentscript/language": "2.8.4" }
}
Additional Context
This is the same publish-pipeline defect already reported for a sibling package
in #71 (@sf-agentscript/agentforce unusable for the same reason, different
missing symbol), and the earlier #35 / #40 scope-rewrite incident. The
post-publish import smoke test proposed in #72 would have caught this too.
- 主要言語
- TypeScript
- スター
- 267
- フォーク
- 54
- 平均マージ
- 48分
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
salesforce/agentscript のほかの issue
-
README Quick Start fails on macOS: Node 26 incompatibility and missing tree-sitter CLI prerequisite オープン
難易度 2/5 半日 初心者へのやさしさ 75/100
salesforce/agentscript#33 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
salesforce/agentscript#71 · コメント 1 件 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
salesforce/agentscript#67 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
salesforce/agentscript#42 · コメント 1 件 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
salesforce/agentscript#35 · コメント 1 件 ·
salesforce/agentscript の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mksglu/context-mode#1200 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
anthropics/claude-code#96687 ·
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
AOSSIE-Org/DebateAI#582 · コメント 2 件 ·