Repository navigation
Replies: 2 comments
|
Follow-up: I checked
The trigger in the shipped preset is likewise unchanged on master ( Minimal fix is still one token in each of the two places: |
|
你的诊断完全正确,两处行号我都在最新代码上核过了。补三样东西:根因可以再钉死一个 token、放大器你没强调、以及一条"即便修好 fs 层也仍会全空"的理由。 1. 根因两处(
|
Uh oh!
There was an error while loading. Please reload this page.
[Bug] Composed filesystem throws "Cannot mix BigInt and other types" on
app.asarpaths, which silently empties the whole skill catalogEnvironment
0.2.0-rc.2(installed build dated 2026-09-29)desktopprofile, agent presetcordisSymptom
Every skill shipped with the installation is unresolvable.
skill cordis-plugin-development(and the three others) answersunknown or no longer available, and the session has no skill catalog at all — including skills placed in a healthy on-disk root such as$DSH_HOME/skills.The underlying filesystem fault is a
TypeErrorraised on any packedasarpath.Minimal reproduction
Call the
readtool (i.e. any composed-filesystem read) on a path insideapp.asar:Result:
The same operation on the same file placed under
app.asar.unpacked, or on any ordinary disk file, succeeds. Reading a directory insideapp.asarfails identically, which shows the failure happens before any read — during metadata resolution.Exact cause (pinned to a line)
@deepseek-ai/dsh-fs-local/lib/index.jsrequests BigInt metadata:and then, at lines 243 and 258:
511nis a BigInt literal. On ordinary disk pathsstat(..., { bigint: true })returns BigInt fields (verified here:typeof mode === 'bigint',typeof size === 'bigint'), so&is BigInt & BigInt and works. Onasar-backed paths Electron's archive layer returns plain Number fields, so the expression becomesNumber & BigIntand throws:That message matches the observed failure verbatim. Because this runs inside
probe()— the first metadata probe — every composed-filesystem operation on an asar path fails atfs.resolve, before the caller can see a more specific error.Why it takes down the entire skill catalog
The shipped
cordispreset mountsskill-filesystemwith acustomSkillDirsentry that resolves inside the archive:SkillProvider.list()iterates roots without a per-root guard:listSkillRootEntriesFromFileSystem()swallows only absent-path errors (ENOENT/ENOTDIR/FS_NOT_FOUND/FS_NOT_DIRECTORY) and re-throws everything else. So the one poisoned root makes the wholelist()reject, the registry skips the provider ("logged and skipped"), and skills from every other root become invisible — the catalog is empty rather than partial.Suggested fixes
Number(info.mode) & 511, or haveprobeStatsdetect non-BigInt fields and degrade to the plain-stat path. Both keep the intent of BigInt metadata while tolerating archives that ignore thebigintoption.SkillProvider.list()— skip the failing root instead of rejecting the whole observation. A single unreadable directory should never hide every other skill.bundledSkillDirinstead ofcustomSkillDirsfor an in-archive directory:bundledSkillDirsetstrustedHost: true, which routes discovery through Node I/O rather than the composed filesystem. Trade-off: rank moves from 300 to 600, so shipped skills would rank below user skills (arguably the right priority for content that ships with the installation).Verification notes
master(packages/bundle/web-app/presets/cordis.patch.yml, shaf6527f77ba) thecustomSkillDirsentry is unchanged, so the trigger is still present there.packages/fs/fs-local/src/index.tsagainst this build (GitHub API rate limit), so "still unfixed on master" is verified for the preset only, not for the fs layer.asar-returns-Number half is an inference from the TypeError plus the absence of any other BigInt/Number mixing on that path; the throwing expression itself is verified by reproducing the error message.All reactions