Skip to content

Repository files navigation

MaxLogic Delphi Companion

MaxLogic Delphi Companion (MDC) is a RAD Studio Delphi 12+ IDE add-in that makes Delphi fully accessible to screen readers and gives AI agents a direct, structured way to control the running IDE.

With screen-reader support enabled, Delphi forms, dialogs, controls, focus changes, and owner-drawn action menus are exposed through UI Automation and MSAA. NVDA can announce keyboard navigation in the main menu and code-editor popup menus, not only items under the mouse pointer. With the AI bridge enabled, an agent can inspect and operate Delphi by form, control, and action identity instead of guessing from screenshots and fixed coordinates.

MDC also provides fast project and unit navigation, a Problems dialog for Error Insight and build messages, and persistent configuration.

Features

Screen-reader Accessibility and AI Control

  • Screen-reader support installs the MaxLogic Delphi Accessibility Framework across the IDE. It exposes VCL forms, dialogs, controls, values, state, relationships, focus, and change events through UI Automation and MSAA. It also corrects Delphi action-menu focus events so NVDA reads keyboard-selected commands in the main menu and code-editor popup menus.
  • AI bridge support starts a local structured-control server with mutations enabled. An AI agent can inspect Delphi forms and controls, invoke named actions and menu commands, edit supported values, navigate focus, operate bridge-visible modal dialogs, and verify the resulting VCL state. These operations target named IDE objects rather than screen positions.
  • The bridge uses the process-specific named pipe \\.\pipe\MaxLogicAccessibilityAgentBridge.<bds-process-id>.
  • The included delphi-ide-control skill documents verified routes for Projects, units, Project Options, Object Inspector, compile and build commands, Messages, debugger windows, menu speech, and safe foreground handoff when real keyboard or pointer input is required.
  • Both features are explicit, independent options. They are disabled by default and persist across IDE sessions.

Projects Picker

  • Default shortcut: Ctrl+Shift+P (configurable, works from any IDE pane and the Welcome Page).
  • Recent and favorite projects with Everything-style filtering (for example: forms|!test).
    • By default, the filter matches project name only.
    • Optionally, enable Include path to also match project paths.
  • Enter or double-click opens the selected project.
  • Ctrl+F toggles favorite; Delete forgets an entry.
  • Opening a project not in the current project group first closes the current group, then opens the selected project or group.
  • Sorting and filter options live in the dialog:
    • Alphanumeric vs. last-opened ordering.
    • Favorites-first grouping.
    • Filter by project kind (projects/project groups) and favorites (favorite/non-favorite).
    • Optionally include project path in filter matching.

Units Picker

  • Default shortcut: Ctrl+Shift+O (configurable, works from any IDE pane when a project is open).
  • Scope options: open editors, current project, or project group.
  • Optional scanning of the project unit search paths (DCC_UnitSearchPath).
  • Everything-style filtering; Enter or double-click opens the unit source (.pas) view.
  • Ctrl+C copies selected unit context as Markdown.
  • Ctrl+W closes selected units in the IDE (only if already open).
  • Right-click context menu provides copy-path variants (filename, project- or VCS-relative, full paths, Windows/Linux).
  • Multi-select is supported for bulk copy.

Problems Dialog

  • Default shortcut: Ctrl+Shift+F1 (configurable).
  • Shows Error Insight issues and build errors/warnings in separate lists.
  • Double-click (or Enter) jumps to the line in the editor.
  • Ctrl+C copies selected items in an AI-friendly text format.
  • F1/F2/F3 focuses a list, F5 refreshes, Esc closes.
  • Build errors/warnings have filter boxes for quick narrowing.

Options Dialog

  • Available from the IDE Tools menu.
  • Configure shortcuts for Projects, Units, and Problems (Focus Error Insight).
  • Enable compile sounds and set success/failure WAV files.
  • Enable or disable MDC logging (enabled by default).
  • Enable screen-reader support throughout the Delphi IDE.
  • Enable the local AI control bridge.
  • Optional developer tool: register the Debug Control Inspector.

Persistence

  • Settings are stored in %APPDATA%\MaxLogic\DelphiCompanion\MDC.ini (UTF-8 INI file).
  • Screen-reader and AI bridge choices are saved with the other MDC settings and reapplied when the package starts.
  • Window size/position is saved for pickers and the Problems dialog.

Installation

  1. Build and install MaxLogicFoundationR.bpl from the MaxLogicFoundation project.
  2. Open projects/MaxLogicDelphiCompanion.dpk in Delphi 12.
  3. Build and install the package.
  4. Open Tools > MaxLogic Delphi Companion Options to enable screen-reader support, AI bridge support, or configure shortcuts and other behavior.

Using the AI Bridge

  1. Enable AI bridge support in Tools > MaxLogic Delphi Companion Options.
  2. Find the process ID of the Delphi bds.exe instance to control.
  3. Connect to \\.\pipe\MaxLogicAccessibilityAgentBridge.<bds-process-id> and discover the live forms and controls before issuing commands. The bridge protocol reference documents the JSON requests, mutation commands, snapshot rules, and safety checks.
  4. Use the included delphi-ide-control skill for Delphi-specific navigation, evidence checks, and guarded keyboard or pointer work.

The bundled desktop-control helper can verify the connection and list visible Delphi forms:

python .\delphi-accessibility-framework\agent-skills\windows-desktop-control\scripts\windows_desktop_control.py probe-bridge --pipe-name MaxLogicAccessibilityAgentBridge.<bds-process-id>
python .\delphi-accessibility-framework\agent-skills\windows-desktop-control\scripts\windows_desktop_control.py bridge-forms --pipe-name MaxLogicAccessibilityAgentBridge.<bds-process-id>

The bridge is local Windows IPC, not a network listener. A connected local agent can modify IDE state while the option is enabled. Disable the option to stop the server and reject further bridge commands.

Notes

  • Logging (enabled by default) is written to %AppData%\MaxLogic\DelphiCompanion\mdc.log.
  • Screen-reader and AI bridge support are opt-in. The AI bridge accepts local mutation commands only while its option is enabled and shuts down with the package.
  • Clearing a hotkey in Options disables that command's binding.
  • The units picker shortcut is ignored when no project is open.

Support and Contributing

Please report issues or suggestions in the MaxLogic repository. Contributions are welcome.

License

MaxLogic Delphi Companion is released under a permissive license. See the repository for details. Embarcadero, RAD Studio, and Delphi are trademarks of their respective owners.

About

MaxLogic Delphi Companion (MDC) is a RAD Studio Delphi 12+ IDE add-in focused on fast navigation and build feedback. It provides pickers for projects and units, a problems dialog for Error Insight/build messages, and a small options dialog for shortcuts and behavior.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages