53 lines
2.2 KiB
Markdown
53 lines
2.2 KiB
Markdown
# A-route UIA Send Implementation Note
|
|
|
|
Date: 2026-07-11
|
|
Branch: implemented on `codex/a-route-rpa-send`, merged to `main`
|
|
|
|
## Decision
|
|
|
|
The A-route fallback is now function-first. It does not introduce an approval ID gate inside the MCP tool or connector. Digital employee policy can decide when to call `execution_mode="production"`; the connector focuses on performing the UI action when explicitly configured.
|
|
|
|
## Implemented local-safe proof
|
|
|
|
- `SendMessageConnectorRequest` now carries `ContentText` to the connector only.
|
|
- `internal/tools/send_message_uia_adapter.go` maps production send requests to helper op `uia_send_message`.
|
|
- `native/ISphereWinHelper/UiaSendAction.cs` sets the send editor text and invokes the send button by UI Automation / Win32 fallback.
|
|
- `scripts/verify-win-helper.ps1` uses a synthetic WinForms window to prove write + button invoke without requiring iSphere login.
|
|
|
|
## Runtime configuration
|
|
|
|
```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"
|
|
```
|
|
|
|
Then call `isphere_send_message` with `execution_mode="production"`.
|
|
|
|
## Status correction after real-window work
|
|
|
|
`uia_send_message` is a UI action connector. Its helper result fields such as
|
|
`typed_text=true`, `clicked_ui=true`, and `sent_message=true` mean the editor was
|
|
written and the send button was invoked/clicked. They do not mean the server
|
|
accepted the message, the receiver got it, or a sent record was written.
|
|
|
|
After this note was first written, the project also opened a real offline
|
|
`frmP2PChat` window locally and confirmed:
|
|
|
|
- root: `frmP2PChat`
|
|
- editor: `rtbSendMessage`
|
|
- send button: `btnSend`
|
|
- receive area: `rtbRecvMessage`
|
|
|
|
The real offline window still shows the client-side offline-send blocker, so it
|
|
is useful for UI positioning and click verification, not for business delivery
|
|
verification.
|
|
|
|
## Remaining real-environment work
|
|
|
|
The local environment still cannot log in to iSphere. The code path is
|
|
implemented and locally proven against synthetic UIA plus the real offline chat
|
|
window, but real iSphere success still needs a logged-in window handle and one
|
|
online run with success/ack or sent-record evidence.
|