feat: add a-route uia send connector

This commit is contained in:
zhaoyilun
2026-07-11 11:16:53 +08:00
parent 456ef44e8e
commit 8aa952a491
15 changed files with 941 additions and 19 deletions

View File

@@ -574,7 +574,38 @@ runs\send-file-sandbox-gate-package.zip
They are generated under ignored `runs\` and are not committed.
## 18. Troubleshooting
## 18. A-route UIA send connector
A-route is the UI Automation fallback for text sending when the B-route sidecar cannot be tested. It is function-first: there is no human approval ID gate inside the connector. The digital employee layer is responsible for deciding when to call production mode.
Local verification uses a synthetic WinForms window:
```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\verify-win-helper.ps1
```
Expected output includes helper version `0.5.0` and:
```json
{"synthetic_uia_send_action":"uia_send_message"}
```
To enable A-route in a logged-in desktop session, configure the MCP server environment before startup:
```powershell
$env:ISPHERE_SEND_CONNECTOR_MODE = "uia_rpa"
$env:ISPHERE_SEND_UIA_HWND = "0x001A0B2C"
$env:ISPHERE_SEND_UIA_EDITOR_AUTOMATION_ID = "rtbSendMessage"
$env:ISPHERE_SEND_UIA_BUTTON_AUTOMATION_ID = "btnSend"
# optional if not using runs\win-helper\ISphereWinHelper.exe
$env:ISPHERE_SEND_UIA_HELPER_PATH = "E:\coding\codex\isphere-ai-bridge\runs\win-helper\ISphereWinHelper.exe"
```
Then call `isphere_send_message` with `execution_mode="production"`. The connector will set the send editor text and invoke the send button through UI Automation. Response metadata uses `connector_mode="uia-rpa"`; the audit still stores hashes and metadata, not the raw message body or raw idempotency key.
Standard `scripts\verify-go-mcp.ps1` clears all A-route env vars so the deterministic smoke remains preview/blocked by default.
## 19. Troubleshooting
- If C# helper build fails, run `scripts\build-win-helper.ps1` directly and check for missing .NET Framework reference assemblies.
- If `win_helper_version` fails, rerun `powershell -NoProfile -ExecutionPolicy Bypass -File scripts\verify-win-helper.ps1` first.