Files
Orr Kislev a0851b3c46 Add macOS support across all adapters
- Fix sys.path bug in all bridge scripts: parents[1] → parents[2] so
  the bridges/ package is found from the project root
- Add bridges/applescript_bridge.py: new Mac bridge that runs ExtendScript
  in Adobe apps via osascript, using a temp file to avoid quoting issues;
  supports a custom execute_line param for apps like InDesign that use
  'do script ... language JavaScript' instead of 'do javascript'
- illustrator_bridge, photoshop_bridge, indesign_bridge: dispatch to
  applescript_bridge on macOS; auto-detect app name via System Events
  so no hardcoded version year is needed
- word_bridge, excel_bridge, powerpoint_bridge: add macOS guard that
  exits immediately with a clear JSON error instead of crashing on the
  pythoncom/win32com import; these remain Windows-only
- Update all adapter READMEs with macOS install steps, bash equivalents
  for every shell command, and dual session file paths
- Update premiere README: document Premiere 26+ CEP removal on macOS,
  'must have project open' requirement, panel location in Window menu
- Update root README: platform support table per adapter, bash install
  snippet, note macOS support
- Add two macOS-specific entries to docs/known-issues.md: Premiere 26+
  CEP removal, and session file path differences on macOS

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 14:39:26 +03:00
..

Excel Adapter Prototype

This folder lets a coding agent drive a running Microsoft Excel instance through Windows COM using only shell commands.

Platform Support

Windows only. The bridge uses Windows COM automation (pythoncom / win32com), which is not available on macOS. Running the bridge on Mac exits immediately with a clear error. A macOS port would require a different scripting surface (Office AppleScript dictionary or Office Add-in JS API).

Portable Hook (Windows)

The bridge uses the generic COM ProgID:

Excel.Application

Do not hard-code the local Office install path. Each Windows machine resolves the ProgID through its own registry.

First Live Test

Open Excel first, then open or create a workbook. From the workspace root:

Get-Content adapters/excel_adapter/examples/context.py -Raw | python adapters/excel_adapter/excel_bridge.py --stdin

Expected result:

{"ok": true, "result": {"app": "Microsoft Excel", "...": "..."}}

Script Shape

Excel does not provide a general script-eval method. The Excel bridge executes Python code and exposes the live COM object as app. Set _result to a JSON-serializable value:

book = app.ActiveWorkbook if app.Workbooks.Count else None
sheet = book.ActiveSheet if book else None
_result = {
    "workbooks": app.Workbooks.Count,
    "workbook": book.Name if book else None,
    "sheet": sheet.Name if sheet else None,
}

Use --stdin for one-off scripts. If a file is required, keep it in a temp or scratch directory, not in examples/.