Repository navigation
Replies: 1 comment
|
The underlying issue appears to be an assumption that A defensive fix would be to normalize the value before performing bitwise operations: const mode = BigInt(info.mode) & 0o777n;This allows the operation to handle either a numeric or BigInt I'd also separate two concerns:
For packaged Electron applications, I'd test both ordinary filesystem paths and paths inside The important part is not merely preventing the Hope this helps! |
Uh oh!
There was an error while loading. Please reload this page.
Summary
On the packaged Desktop build, every local skill becomes invisible (
skill <name>→unknown or no longer available) while the same workspace works in a plain Node/CLI host. The model-facing skill catalog is never published. Root cause is a chain of two independent problems:@deepseek-ai/dsh-web-app'spresets/cordis.patch.ymlmountsskill-filesystemwithIn the Desktop build
@deepseek-ai/*lives insideapp.asar, so that directory is an asar path.@deepseek-ai/dsh-fs-local'sprobe()doesstat(path, { bigint: true })and thenNumber(info.mode & 511n). Electron's asar shim ignores{ bigint: true }for asar paths and returns a number-valuedfs.Stats(every numeric field isnumber, every*Nsfield isundefined), so the BigInt literal in& 511nthrowsTypeError: Cannot mix BigInt and other types, use explicit conversions.That error surfaces as
FS_IO_ERROR cannot list "<asar dir>".dsh-skill-filesystem'sdiscoverRoot()only tolerates "absent" errors (ENOENT/ENOTDIR/FS_NOT_FOUND/FS_NOT_DIRECTORY), solist()rejects;dsh-skill'slistLayerCandidates()catches it, emits a singlelogger.warn(skill provider "filesystem" skipped: …) and skips the entire provider;dsh-tool-skillthen publishes nothing becausesnapshot.complete === false.Net effect: one unreadable directory removes all local skills — including project-root
.agents/skills— silently, the only user-visible symptom beingskillreportingunknown.Environment
0.2.0-rc.2(Electron44.0.0), macOS arm64.cordis; reproducible withstandardin the same packaged host..agents/skills/<name> -> ../../.codex/skills/<name>; the file is readable and its frontmatter is valid (the same workspace works in a non-packaged host).Minimal repro A — Electron side, no DSH needed
Observed:
The older asar
fs.statbug whereblksize/blockswereundefined(electron/electron#42686, fixed by electron/electron#50877) is already fixed in Electron 44.0.0 —blksize/blocksare numeric here. What remains is that{ bigint: true }is not honoured for asar paths at all, and the*Nsfields are missing.Minimal repro B — DSH side
Mount
@deepseek-ai/dsh-skill-filesystemwithcustomSkillDirscontaining any path insideapp.asar, then callctx.skills.list({ cwd })wherecwdis a workspace with.agents/skills: the provider is skipped and no local skill is returned. In the running packaged Host we confirmed with a read-only probe plugin that an otherwise identical provider which avoidsctx.fs(plain Nodefs) lists every skill, including the four shipped underapp.asar(agent-experience,cordis-composition-reference,cordis-plugin-development,editing-cordis-compositions).Suggested fixes
dsh-fs-local: acceptnumber | bigintinprobe()(e.g.BigInt(info.mode) & 511n, and do not depend on*Nsfields), or fall back to non-bigint stats for asar paths.fs.stat(p, { bigint: true })must not throw for paths the runtime itself ships.dsh-skill-filesystem: per-root isolation inlist()— a non-absent error for one root should skip that root (or degrade tocomplete: falsewith a readable reason), never fail the whole provider. Today one unreadable directory removes every local skill.logger.warnwhile the model just sees an empty catalog. Surfacing "local discovery incomplete:<reason>" in the session would make this class of failure self-diagnosing.Related
fs.statblksize/blocks areundefinedfor.asarfiles electron/electron#42686 → PR #50877 — asarfs.statblksize/blocks.statprobes onapp.asarpaths because of the same shim.Workaround used downstream (FYI, not a fix)
WEUX mounts the same native provider with
ctx.get('fs')masked so it takes the provider's Node read path (Electron'snode:fsreads asar fine), and stops pointingcustomSkillDirsat asar paths; guard:check-shadcn-runtime8/8.All reactions