[sidecar] Improve CommonJS parity and dependency diagnostics #222
Labels
No labels
abandoned
active
audit
blocked
data-safety
difficulty:easy
difficulty:hard
difficulty:high
difficulty:medium
docs
done
duplicate
notebook-v0
open
priority:high
ready
release-critical
safe-mode
spec
spec-backlog
subsystem:api
subsystem:backlog
subsystem:bases
subsystem:ci
subsystem:command
subsystem:configuration
subsystem:consolidate
subsystem:dependencies
subsystem:desktop-electron
subsystem:diffmerge
subsystem:docker
subsystem:docs
subsystem:fuzzy
subsystem:graph
subsystem:hotkeys
subsystem:lapis
subsystem:maint
subsystem:maintenance
subsystem:markdown
subsystem:markdown-lint
subsystem:md018
subsystem:notebook
subsystem:notifications
subsystem:opfs
subsystem:package
subsystem:plugin-markdown
subsystem:plugin-tasks
subsystem:plugins
subsystem:registry
subsystem:release
subsystem:renovate
subsystem:restore
subsystem:scripts
subsystem:search
subsystem:settings
subsystem:spec
subsystem:tasks
subsystem:testing
subsystem:ui
subsystem:web
subsystem:workspace
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lapis-notes/lapis#222
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Electron sidecar plugin loading is intentionally narrower than renderer loading, but sidecar CommonJS behavior and dependency failures should be predictable during the dual-format rollout.
Goal
Improve sidecar CommonJS diagnostics and decide the v1 sidecar local module policy without blocking renderer ESM.
Scope
require()dependencies before executing the CommonJS wrapper.lapisand@lapis-notes/api.Non-goals
require().Acceptance Criteria
desktop.cjssidecar plugins load reliably.Implementation Notes
require()calls must fail with an explicit "bundle your sidecar plugin" diagnostic instead of a generic missing dependency error.lapisand@lapis-notes/apialiases only, and keep Obsidian renderer compatibility plus renderer UI/Svelte/CodeMirror modules unavailable.PluginManagerdiagnostics preserve the rejected specifier.Suggested Files or Specs To Inspect
spec/src/30-cross-package-contracts/plugin-host-boundary.mdspec/src/20-packages/desktop-electron/index.mdpackages/desktop-electron/src-electron/plugin-sidecar-child.tspackages/desktop-electron/src-electron/generated/plugin-sidecar-host-modules.generated.tsValidation Commands
pnpm --filter @lapis-notes/desktop-electron check:allpnpm check:allRelated Issues
Follow-up Tasks
Implementation Summary
Implemented bundled-only Electron sidecar CommonJS v1 diagnostics, narrowed sidecar host-module aliases to lapis and @lapis-notes/api, passed selected runtime metadata through the native bridge, wrapped sidecar evaluation failures with host/format/entry context, added focused API/runtime-validation coverage, regenerated host-module metadata, and updated the runtime/desktop specs.