Dashboard › opencode-lore › Core optional embedding stack
01a0ab1d-5f58-7332-9925-463c17cd4c14Chose direct optional declarations for @huggingface/transformers, onnxruntime-node, and sharp over relying on transformer transitive dependencies because pnpm may nest them where packages/core/dist/** cannot resolve them, silently degrading recall to FTS-only. Keep them out of regular dependencies so --omit=optional remains supported, and align versions with transformers so pnpm deduplicates to one stack. Validate resolution from a real subprocess rooted at the built worker; Vitest’s resolver can walk .pnpm and create a vacuous pass.