Conversation
- HTTP callback server for ntfy action buttons - Unix socket IPC for plugin communication - Nonce management for permission requests - Session registration and response forwarding
- Label: io.opencode.ntfy - Runs server.js via node - KeepAlive and RunAtLoad enabled - Logs to /usr/local/var/log/opencode-ntfy.log
- Connect/disconnect to callback service via Unix socket - Session registration with service - Nonce request/response handling - Permission response callback forwarding - Graceful degradation when service not running
…sions - Connect to callback service on startup when callbackHost configured - Handle permission.updated events by sending notifications - Request nonces from service for each permission notification - Forward permission responses to OpenCode client - Add shutdown handler to disconnect from service - Add service client tests to plugin test suite
- Install service files to ~/.local/share/opencode-ntfy - Generate LaunchAgent plist with correct paths - Include service-client.js and config.js in plugin files - Add launchctl commands for service management
- Add section for starting/stopping the callback service - Include launchctl commands and log location - Clarify that service must be running for interactive permissions
- Fix launchctl command in plugin log message - Improve node path detection for Apple Silicon Macs - Make createNonce internal in server.js (was exported but unused) - Use isConnected() instead of potentially stale serviceConnected flag - Add defensive validation for permission.id
Recommend brew services for Homebrew installs, keep launchctl instructions for manual installs.
The simple string comparison of import.meta.url vs process.argv[1] fails on macOS due to symlink resolution differences: - /tmp vs /private/tmp - /opt/homebrew/opt vs /opt/homebrew/Cellar This caused brew services to fail because launchd runs the script via the symlinked path but import.meta.url resolves to the real path.
Owner
Author
|
Superseded by #16 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
import.meta.urlvsprocess.argv[1]fails on macOS due to symlink resolution differences (/tmpvs/private/tmp,/opt/homebrew/optvs/opt/homebrew/Cellar)