You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
one API schema for external triggers and events
#2505
Would be great to have a single consistent schema and surfaces to trigger device signals (e.g. mouse haptics, keypad key images or status, fill light state) and watch for device events (e.g. Easy-Switch channel changes) from outside OpenLogi, rather than a new surface per feature. Today openlogi api covers settings only; the haptic PR (#2060) adds its own command, and events are separate too (draft #1821).
Idea:
Make the existing api JSON envelope (schema_version, ok, data/error) the single public contract, with typed commands and one dispatcher. Transports are thin adapters around it:
CLI as today (openlogi api <command>), plus openlogi api --stdin: JSON requests in, replies out over one connection (good for high-rate use like keypad counters).
Later, maybe, an opt-in, token-protected listener: openlogi api serve --listen <unix socket | named pipe | 127.0.0.1:port> as its own process. Same JSON in/out.
Watchers use the same envelope: openlogi api watch over the CLI, later the socket/port.
Devices are enumerated with api devices and addressed by ID or kind (e.g. keyboard, light, as #2451 asks).
Could be shipped in phases:
Refactor to request type + dispatcher, add --stdin
Relates directly to #1657: this would be a front door to its capability model, so the JSON commands should line up with its capability families and the two complement each other.
Idea
Create an api JSON envelope (schema_version, ok, data/error) as the single public contract. Transports are just thin adapters around a single dispatcher.
First obvious transport for triggers would be the existing CLI i.e. openlogi api --stdin is JSON request in, reply out. Later, maybe, allow opt-in network listener i.e. openlogi api serve --listen <unix socket | named pipe | 127.0.0.1:port> as a process with a token door - same JSON in\out.
For watchers, same envelope: openlogi api watch over CLI or maybe later again network socket\port.
Would need some way to enumerate (api devices) and correctly address devices (maybe by ID or kind like litra) as well.
This could broken up to shipping phases:
refactor to request type + dispatch, implement CLI --stdin
watchers
network servers
This also would relate directly to #1657: this would be a front door to that draft's proposed capability model, align JSON schema so that the 2 proposals align and compliment.
Device(s)
backlit keyboards, haptic mice, fill lights (Litra), MX Creative Keypad
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Pre-flight checklist
Problem / motivation
Would be great to have a single consistent schema and surfaces to trigger device signals (e.g. mouse haptics, keypad key images or status, fill light state) and watch for device events (e.g. Easy-Switch channel changes) from outside OpenLogi, rather than a new surface per feature. Today
openlogi apicovers settings only; the haptic PR (#2060) adds its own command, and events are separate too (draft #1821).Idea:
Make the existing
apiJSON envelope (schema_version, ok, data/error) the single public contract, with typed commands and one dispatcher. Transports are thin adapters around it:openlogi api <command>), plusopenlogi api --stdin: JSON requests in, replies out over one connection (good for high-rate use like keypad counters).openlogi api serve --listen <unix socket | named pipe | 127.0.0.1:port>as its own process. Same JSON in/out.openlogi api watchover the CLI, later the socket/port.Devices are enumerated with
api devicesand addressed by ID or kind (e.g.keyboard,light, as #2451 asks).Could be shipped in phases:
--stdinRelates directly to #1657: this would be a front door to its capability model, so the JSON commands should line up with its capability families and the two complement each other.
Idea
Create an api JSON envelope (schema_version, ok, data/error) as the single public contract. Transports are just thin adapters around a single dispatcher.
First obvious transport for triggers would be the existing CLI i.e.
openlogi api --stdinis JSON request in, reply out. Later, maybe, allow opt-in network listener i.e.openlogi api serve --listen <unix socket | named pipe | 127.0.0.1:port>as a process with a token door - same JSON in\out.For watchers, same envelope:
openlogi api watchover CLI or maybe later again network socket\port.Would need some way to enumerate (
api devices) and correctly address devices (maybe by ID or kind likelitra) as well.This could broken up to shipping phases:
--stdinThis also would relate directly to #1657: this would be a front door to that draft's proposed capability model, align JSON schema so that the 2 proposals align and compliment.
Device(s)
backlit keyboards, haptic mice, fill lights (Litra), MX Creative Keypad
Alternatives and workarounds
No response
All reactions