Skip to content

refactor(runtime): add generic action and event queue - #36

Open
inayayousfi wants to merge 3 commits into
mainfrom
refactor/generic-runtime-actions
Open

refactor(runtime): add generic action and event queue#36
inayayousfi wants to merge 3 commits into
mainfrom
refactor/generic-runtime-actions

Conversation

@inayayousfi

Copy link
Copy Markdown
Contributor

Written by inayayousfi, typed by gpt-5.6-sol running in OpenCode.
Every call here is inayayousfi's, and no agent acted on its own.

Summary

  • Replace concrete runtime command and event classes with generic RuntimeAction and RuntimeEvent messages containing Lua-compatible native data.
  • Add registered argument decoders, typed built-in constructors, explicit override behavior, ordered follow-up messages, and structured action.failed events.
  • Migrate keyboard input, windows, prompts, hot corners, single-instance activation, and configured component actions to the shared queue.
  • Keep durable state isolated with defensive copies and require component IDs to be unique across a layout.
  • Add project-wide Pyright checks on Windows and Ubuntu, document the queue contract in AGENTS.md, and remove duplicated contribution guidance from README.md.

Architecture

The runtime now uses one synchronous first-in, first-out queue for both events and actions. Every message name must be registered before use, and every payload is validated as native data without process-local objects.

Built-in Python call sites retain typed constructors and decoded argument records. Future Lua-defined messages can use the same envelope with runtime registration and validation.

Keyboard actions resolve stable layout and component IDs inside the keyboard service. Configured component presses carry only their stable component ID and configured action rather than serializing a complete key specification on every press.

Verification

  • Windows unit tests: 181 passed, 1 skipped
  • Pyright: 0 errors, 0 warnings
  • Flake8 selected CI rules: passed
  • Source and wheel distributions: built successfully
  • Windows offscreen startup: application runtime, startup window, and input backend initialized and exited cleanly
  • git diff --check: passed

Written by inayayousfi, typed by gpt-5.6-sol running in OpenCode.
Every call here is inayayousfi's, and no agent acted on its own.

Replace concrete runtime command and event DTOs with registered native-data
messages, then migrate built-in producers, handlers, and tests.

Add full-source Pyright checks and document the queue contract.
Written by inayayousfi, typed by gpt-5.6-sol running in OpenCode.
Every call here is inayayousfi's, and no agent acted on its own.

Run type checking only after PySide6, axidev-io, and Axidev OSK are
available to the selected Python interpreter.
Written by inayayousfi, typed by gpt-5.6-sol running in OpenCode.
Every call here is inayayousfi's, and no agent acted on its own.

Move component policy and keyboard output into root SourcePath behavior
bindings backed by runtime state snapshots and ordered hooks.

Keep controls render-only, isolate keyboard backend I/O, and migrate the
bundled config and tests to explicit visual IDs and behavior maps.
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