[bug]: @sf-agentscript/lsp-server@2.2.30 crashes at startup — variantMatch is not a function (stale @sf-agentscript/language pin)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- node.js, typescript
Hướng nghiên cứu
Bắt đầu với các khai báo dependency cho @sf-agentscript/agentforce-dialect, @sf-agentscript/lsp và @sf-agentscript/lsp-server, sau đó xem xét import smoke test sau khi publish được đề xuất trong #72. Tái hiện bằng npx --yes @sf-agentscript/lsp-server --stdio và xác minh rằng một bản cài đặt mới hoàn tất LSP initialize handshake và publish diagnostics.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 267
- Fork
- 54
- Merge trung bình
- 48 phút
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của salesforce/agentscript
-
README Quick Start fails on macOS: Node 26 incompatibility and missing tree-sitter CLI prerequisite Đang mở
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 75/100
salesforce/agentscript#33 · 2 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
salesforce/agentscript#71 · 1 bình luận ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
salesforce/agentscript#67 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
salesforce/agentscript#42 · 1 bình luận ·
-
[bug]: dist/ JS retains @agentscript/* imports after scope rewrite, breaking installed package Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
salesforce/agentscript#35 · 1 bình luận ·
Tất cả issue của salesforce/agentscript
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
mksglu/context-mode#1200 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
anthropics/claude-code#96687 ·
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
AOSSIE-Org/DebateAI#582 · 2 bình luận ·