mirror of
https://github.com/NeuralNomadsAI/CodeNomad.git
synced 2026-07-18 12:16:39 +00:00
Restore Tauri Debian and RPM assets while adding Flatpak outputs for both desktop variants so Linux users have package-manager and sandboxed alternatives to AppImage. Electron Flatpak packaging now installs the required Freedesktop runtime in CI, and Tauri Flatpak packaging uses a generated manifest around the existing release binary and packaged resources. The Linux dependency list also includes xdg-utils because Tauri AppImage bundling requires xdg-open. Docker-based Ubuntu 24.04 reproductions verified Electron zip/AppImage creation and Tauri AppImage/deb/rpm creation. Local Docker could not complete Flatpak builds because bubblewrap cannot create/seccomp namespaces in this host container environment, which should not apply to native GitHub runners. |
||
|---|---|---|
| .. | ||
| plugin | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
CodeNomad OpenCode Plugin
TLDR
Packaged OpenCode plugin injected into every OpenCode instance that CodeNomad launches. It provides the CodeNomad bridge for local event exchange between the CLI server and OpenCode.
What it is
An npm-packable plugin package. Production builds ship a local .tgz and inject it through OPENCODE_CONFIG_CONTENT; dev runs reference the TypeScript plugin entry directly with a file:// URL.
How it works
- CodeNomad sets
OPENCODE_CONFIG_CONTENTwhen spawning each OpenCode instance (packages/server/src/workspaces/manager.ts). - The server packs this package during build (
packages/server/scripts/package-opencode-plugin.mjs). - OpenCode loads the plugin from
pluginentries injected into the config content. - The
CodeNomadPluginreadsCODENOMAD_INSTANCE_ID+CODENOMAD_BASE_URL, connects toGET /workspaces/:id/plugin/events, and posts toPOST /workspaces/:id/plugin/event(packages/opencode-plugin/plugin/lib/client.ts). - The server exposes the plugin routes and maps events into the UI SSE pipeline (
packages/server/src/server/routes/plugin.ts,packages/server/src/plugins/handlers.ts).
Expectations
- Local-only bridge (no auth/token yet).
- Plugin must fail startup if it cannot connect after 3 retries.
- Keep plugin entrypoints thin; put shared logic under
plugin/lib/to avoid autoloaded helpers. - Keep event shapes small and explicit; use
type+propertiesonly.
Ideas
- Add feature modules under
plugin/lib/features/(tool lifecycle, permission prompts, custom commands). - Expand
/workspaces/:id/plugin/*with dedicated endpoints as needed. - Promote stable event shapes and version tags once the protocol settles.
Pointers
- Plugin entry:
packages/opencode-plugin/plugin/codenomad.ts - Plugin client:
packages/opencode-plugin/plugin/lib/client.ts - Plugin server routes:
packages/server/src/server/routes/plugin.ts - Plugin event handling:
packages/server/src/plugins/handlers.ts - Workspace env injection:
packages/server/src/workspaces/manager.ts