[bug]: @sf-agentscript/agentforce@2.5.34 (latest) still unusable — dist/ compiled against a newer @sf-agentscript/language than package.json pins (missing export `nullLiteralValidationPass`)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- node.js, typescript
- Lĩnh vực
- build-system, release
Hướng nghiên cứu
Tái hiện lỗi bằng clean npm install và bare import được trình bày trong issue, sau đó kiểm tra dist/index.js:354 cùng với package.json để lần theo dependency ngôn ngữ không khớp. Đọc publish pipeline liên quan đến scope-rewrite issue và xác minh cách các phiên bản workspace trở thành các pin được publish. Hoàn thành có nghĩa là một bản cài đặt sạch có thể import package và smoke test của artifact đã đóng gói bao phủ mọi public entry point.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
@sf-agentscript/agentforce@2.5.34 (current latest) cannot be imported after a clean npm install. The package's dist/ is compiled against a newer @sf-agentscript/language than the version its own package.json pins, so the import fails immediately.
This looks like a sibling of #35 (and PR #40): the scope-rewrite part appears fixed in 2.5.34 — dist/index.js now correctly imports from @sf-agentscript/language — but the same publish pipeline still emits dependency pins that don't match what dist/ was built against. Net effect is the same: the published package is broken end-to-end, just with a different error.
Reproduction
mkdir repro && cd repro && npm init -y
npm install @sf-agentscript/agentforce # resolves 2.5.34
node --input-type=module -e "import { parse } from '@sf-agentscript/agentforce';"
Actual
SyntaxError: The requested module '@sf-agentscript/language' does not provide
an export named 'nullLiteralValidationPass'
at .../node_modules/@sf-agentscript/agentforce/dist/index.js:354
Expected
The module imports and parse() is callable.
Root cause
@sf-agentscript/agentforce@2.5.34 → dist/index.js:354:
import { symbolTableAnalyzer, undefinedReferencePass, /* ... */,
nullLiteralValidationPass } from "@sf-agentscript/language";
but its package.json pins the dependency exactly:
"@sf-agentscript/language": "2.5.4"
and that version does not export the symbol:
@sf-agentscript/language |
exports nullLiteralValidationPass |
|---|---|
2.5.4 (the pinned version) |
❌ no |
2.18.0 |
✅ yes |
So the compiled output requires a newer language than the manifest allows. Installing @sf-agentscript/language@2.18.0 alongside it makes the import succeed, which confirms the diagnosis.
Suggested fix
- Have the publish pipeline pin the workspace versions the artifacts were actually built against (the same step that got the scope rewrite wrong in #35 / #40), or simply bump the
@sf-agentscript/languagepin. - Add a post-publish smoke test that installs the packed tarball into a clean directory and does a bare
importof every public entry point. Both #35 and this issue would have been caught by that single check, and it would keep the published artifact honest going forward.
Environment
@sf-agentscript/agentforce@2.5.34(dist-taglatest)- resolved
@sf-agentscript/language@2.5.4 - Node.js v24.15.0, npm 11.12.1, Windows 11
Notes
Workaround for anyone blocked: @sf-agentscript/parser is unaffected and can be used directly if you only need the AST — that is what I ended up doing. I am building a static authority analyzer that reads .agent authoring bundles and resolves each action's apex:// / flow:// target straight from the file.
Happy to send a PR for the smoke test if that approach is acceptable.
- 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ó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
salesforce/agentscript#73 ·
-
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ự
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Crush Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
ElementsProject/cln-application#167 · 1 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Quantco/pnpm-licenses#17 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100