Adds OSC support cause why not#2
Draft
DingosGotMyBaby wants to merge 4 commits into
Draft
Conversation
I used gemini to make this like the lazy cunt I am. Adds a lightweight, stdio-based MCP server subcommand to the pogly-cli. This enables AI assistants (like Claude Desktop or Antigravity) to view, build, and manage overlay layouts and elements directly. Key changes: - Created a custom JSON-RPC 2.0 stdio message handler in commands/mcp.rs with zero external async dependencies (tokio, rmcp, etc.). - Registered the new `mcp` subcommand in cli.rs and commands/mod.rs. - Exposed 23 MCP tools mapping to elements, elementdata, layouts, folders, and status commands (each accepting an optional 'overlay' nickname flag). - Handled automatic overlay resolution and API client forwarding. - Added Claude Desktop and source-based configuration instructions to the README.
why? why not. the rest is large loser model generated of course - Integrate the `rosc` crate for OSC message and bundle decoding - Define `pogly osc` subcommand with configurable `--host` and `--port` (defaulting to 127.0.0.1:9000) - Implement a UDP listener server that routes OSC address patterns to Pogly HTTP API endpoints: - Active layout selection (/pogly/layouts/set-active) - Element deletion (/pogly/elements/delete) - Element property updates (/pogly/elements/update/...) - Generic element update routing (/pogly/elements/update) for any key-value property - Support robust type coercion (coercing float, int, string, and bool inputs into correct API types) - Add comprehensive unit tests verifying coercion rules and dynamic JSON builders - Provide `send-osc.py` example and document OSC commands in READMEs
Pogly runs at 30hz on the server side with clients interpolating to their native refresh rate. So therefore we only need to send an event when required by the server, not every time an OSC event arrives
Since APPDATA and LOCALAPPDATA don't exist on Linux and Mac, I have implemented a native way to handle it. This will allow people to run this on servers and stuff without the api keys being put into the system tmp folder
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.
Branch based of of my previous PR