Skip to content

Adds OSC support cause why not#2

Draft
DingosGotMyBaby wants to merge 4 commits into
PoglyApp:mainfrom
DingosGotMyBaby:dingo/osc-support
Draft

Adds OSC support cause why not#2
DingosGotMyBaby wants to merge 4 commits into
PoglyApp:mainfrom
DingosGotMyBaby:dingo/osc-support

Conversation

@DingosGotMyBaby

Copy link
Copy Markdown

Branch based of of my previous PR

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant