Package CodeNomad OpenCode plugin#433
Conversation
Replace the copied opencode config template with a versioned npm-packable CodeNomad OpenCode plugin package. The server now builds and packs the plugin artifact, and desktop bundles carry the packaged plugin through the existing server resources. Workspace launches now merge any user or system OPENCODE_CONFIG_CONTENT JSONC with CodeNomad's plugin entry, preserving existing plugin config while ensuring the managed bridge is available. Production uses an explicit npm file alias for the packaged tarball, while dev keeps loading the TypeScript plugin source directly. Validated with plugin build, server and Electron typechecks, targeted plugin config tests, and WSL spawn environment tests.
|
I want you to perform the gatekeeper checks for latest PR state check for regressions |
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/25678633369 Artifacts expire in 7 days. |
|
Gatekeeper review for the latest PR state. Understood request: review this PR ruthlessly for regressions and implementation quality, not to make code changes. Assumption: the PR should preserve existing desktop packaging behavior across Electron, Tauri, Windows/WSL, Linux, and macOS. Findings:
Validation performed:
Decision: changes requested. I would not merge this PR until the accidental platform dependency is removed and WSL production plugin loading is proven with a real path translation/accessibility test. -- |
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/25678732783 Artifacts expire in 7 days. |
Remove the accidental darwin-arm64 Tauri CLI root dependency so installs remain cross-platform. For WSL OpenCode launches, rewrite packaged CodeNomad plugin file specs through a WSLENV-translated helper path before exec so the Linux process receives a reachable file path inside OPENCODE_CONFIG_CONTENT. Ensure Tauri prebuild installs the OpenCode plugin workspace build dependencies before invoking the server build, since server packaging now builds the plugin package. Validated with plugin build, server typecheck, targeted OpenCode plugin config and WSL spawn tests, and diff whitespace checks.
|
Check again now |
|
Gatekeeper re-check for the updated PR state. Understood request: re-review the latest pushed state and verify whether the prior blockers were addressed. Assumption: this PR must be mergeable with the validation commands listed in the PR body, especially the plugin build/package path. Findings:
Because Resolved from prior review:
Validation performed:
Decision: changes still requested. The prior architecture blockers are mostly addressed, but this PR is still not mergeable until the plugin package build and -- |
Disable declaration output for the packaged OpenCode plugin and clean dist before builds so stale .d.ts files are not packed. The plugin is consumed as runtime JavaScript by OpenCode, and declaration generation can infer non-portable nested zod paths from @opencode-ai/plugin. Add explicit hook return annotations on the plugin entry to keep exported runtime shapes clear while avoiding declaration generation in CI builds. Validated with plugin build, server prepare-plugin packaging, server typecheck, and targeted plugin/WSL tests.
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/25679251910 Artifacts expire in 7 days. |
|
Now? |
|
Gatekeeper re-check for the latest pushed state. Understood request: verify whether the remaining blocker is resolved now. Assumption: this pass should focus on the previously failing plugin build/package path and any obvious regressions in the touched code. Findings:
Previously requested fixes now verified:
Validation performed:
Decision: no changes requested from this gatekeeper pass. The prior blocker I could reproduce is fixed. CI or a clean dependency install should still be used as the final authority for the broader typecheck/test commands that this local worktree could not execute cleanly. -- |
|
@pascalandr - Would you be able to test this on Windows and see if it still works in packaged binaries? |
|
Tested locally on Windows: Tauri packaged build passes, Electron packaged build passes after the small Windows quoting fix in #436, and both packaged resources include the OpenCode plugin tarball. |
## Summary - Avoid routing the Electron resource-prep Node invocation through the Windows shell. - Fix local `build:win` when Node is installed under `C:\Program Files\nodejs\node.exe`. ## Validation - `npm run build:win --workspace @neuralnomads/codenomad-electron-app` ## Notes - This targets `opencode-config-merge` so it can be merged into #433.
|
Thanks for testing and the PR @pascalandr |
Summary
Validation
Notes