feat: add send connector preflight probes

This commit is contained in:
zhaoyilun
2026-07-10 13:37:08 +08:00
parent b2ce7b0e36
commit 1f99681348
11 changed files with 1307 additions and 25 deletions

View File

@@ -77,6 +77,8 @@ probe_client_runtime.json
process_details.json
network_inventory.json
filesystem_inventory.json
send_entrypoints_preflight.json
send_uia_controls_preflight.json
services_registry_shortcuts.json
scan_windows.json
uia_summary.json
@@ -97,6 +99,8 @@ The important evidence is:
- UIA tree for target windows, useful if route A UI/RPA is needed later.
- install/cache/config/log/database candidate metadata;
- version and SHA256 for important binaries;
- send-message and send-file entrypoint metadata preflight for `IMPlatformClient.exe`, `smack.dll`, and `IMPP.Service.dll`;
- UIA send-control classifier output for search/edit/send/file controls and offline-send blocker state;
- redacted text samples for small config/log files;
- uninstall registry entries;
- related services and shortcuts;
@@ -120,3 +124,5 @@ The recorder does not:
If `probe_client_runtime.json` proves the loaded modules and bitness match the static evidence, continue with B-route sidecar design.
If the running client cannot be inspected, or the expected modules are absent, switch to the A-route constrained UI/RPA fallback.
If `send_entrypoints_preflight.json` reports `b_route_entrypoint_preflight="pass"` and `send_uia_controls_preflight.json` reports the controls/offline state clearly, continue to R6b preview/dry-run contract design. Production send still requires a later online sandbox send gate.

View File

@@ -0,0 +1,127 @@
# Send Connector Preflight
Date: 2026-07-10
Node: R6a / C31 non-mutating send connector preflight
## Goal
Confirm, without sending/clicking/typing/uploading/hooking/capturing network traffic, whether the selected B-route send connector can continue and whether the A-route UI fallback can classify the necessary controls and offline blocker state.
## Implemented helper coverage
`ISphereWinHelper` is bumped to `0.4.0` and adds two read-only helper operations:
| op | Purpose | Side effects |
| --- | --- | --- |
| `probe_send_entrypoints` | Inspect copied/installed binaries for text/file send entrypoint metadata. | none |
| `probe_send_uia_controls` | Classify UIA controls for search, receive pane, send editor, send button, file menu, and offline blocker. | none |
Both operations return a `safety` object with these booleans set to `false`: `sent_message`, `sent_file`, `uploaded_file`, `clicked_ui`, `typed_text`, `captured_network`, `attached_hook`, and `modified_client_data`.
The live recorder now writes these additional files when run in an online iSphere environment:
```text
send_entrypoints_preflight.json
send_uia_controls_preflight.json
```
## B-route entrypoint preflight result
Manual metadata probe against the copied install family:
```text
runs/offline-evidence-intake/zyl-qqfile-20260709/extracted/c28-send-candidates/zyl/Impp
```
reported:
```json
{
"entrypoint_count": 7,
"available_count": 7,
"required_count": 5,
"required_available_count": 5,
"all_required_available": true,
"b_route_entrypoint_preflight": "pass"
}
```
Confirmed candidates:
| Capability | Candidate | Evidence |
| --- | --- | --- |
| text send | `AppContextManager.SendTxtMessageByJid` | method name and `AppContextManager` type-name metadata present in `IMPlatformClient.exe`; IL evidence in the C28 snapshot shows the class/method body |
| text send | `MessageScheduling.SendChatMessage` | reflection method found in `IMPlatformClient.exe` |
| text send | `com.vision.smack.Chat.SendMessage` | reflection method found in `smack.dll` |
| file send/upload | `IMPP.Service.BLL.FileTransfer.FileUpload` | reflection method found in `IMPP.Service.dll` |
| file send/upload | `IMPP.Service.BLL.FileTransfer.AsynFileUpload` | reflection method found in `IMPP.Service.dll` |
| file send | `IMPP.Client.OffLineFileSend.sendFile` | reflection method found in `IMPlatformClient.exe` |
| file send | `com.vision.smack.Chat.sendFileMessage` | reflection method found in `smack.dll` |
Note: `AppContextManager.SendTxtMessageByJid` is treated as metadata-confirmed because .NET reflection did not resolve that type in the helper process, while the IL snapshot contains the exact class and method and the binary string scan finds the method and short type name. This is enough for R6a preflight, not enough for production invocation.
## A-route UIA preflight result
The helper classifier detects these route facts from a UIA tree:
- `has_search_edit`
- `has_receive_document`
- `has_send_editor`
- `has_send_button`
- `has_file_menu`
- `offline_blocker_visible`
- `send_button_enabled`
- `route_hint`
Synthetic WinForms verification returned:
```json
{
"synthetic_send_uia_route_hint": "A_ROUTE_OFFLINE_BLOCKED"
}
```
R5b returned live-probe evidence already showed real-window selector candidates for `skinAlphaTxt`, `rtbSendMessage`, `btnSend`, and the file-send menu, plus the offline-send blocker text. The new helper op turns that evidence into repeatable classifier output for the next live package.
## Verification
Passing local verification:
```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\build-win-helper.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\verify-win-helper.ps1 -SkipBuild
```
Observed helper smoke output:
```json
{
"ok": true,
"helper_version": "0.4.0",
"send_entrypoint_probe_mode": "read_only_send_entrypoint_metadata",
"synthetic_send_uia_route_hint": "A_ROUTE_OFFLINE_BLOCKED",
"uia_available": true
}
```
## Decision
R6a passes as a non-mutating preflight:
- B-route entrypoint metadata is available enough to continue to the next non-production B-route step.
- A-route controls can be classified as a fallback and can explicitly report offline-blocked state.
- Production `isphere_send_message` and `isphere_send_file` remain blocked.
## Next implementation node
Next node: **R6b B-route preview/dry-run contract**.
R6b should implement only preview/dry-run and audit shape first:
1. target resolution input shape from existing contact/group search result refs;
2. `content_sha256` / file hash and idempotency key validation;
3. connector metadata such as `connector="implatform-sidecar"` and `connector_stage="preview"`;
4. local audit append for preview attempts;
5. no real send, no file upload, and no UI click/type.
The later online-only gate remains: one operator-approved sandbox send must still prove success/ack or sent-record evidence before any production send path is exposed.

View File

@@ -344,16 +344,18 @@ connector_stage = "preview" | "sandbox_send" | "production"
## Next implementation loop
R5b/C30-live returned-probe intake is now complete. The live probe confirmed a running x86 `IMPlatformClient.exe` `4.1.2.6842`, installed B-route candidate DLLs, and A-route UIA controls, but it did not prove runtime send entrypoint reachability. It also observed an offline-send blocker in the captured chat windows.
R6a/C31 non-mutating send connector preflight is now complete. WinHelper `0.4.0` adds read-only `probe_send_entrypoints` and `probe_send_uia_controls`; the live recorder now emits `send_entrypoints_preflight.json` and `send_uia_controls_preflight.json`; copied install metadata reports all required B-route entrypoints available; and the UIA classifier can report offline-blocked state.
Next node should be **R6a/C31 non-mutating send connector preflight**:
Next node should be **R6b B-route preview/dry-run contract**:
1. Use the C# WinHelper read-only op `probe_client_runtime`.
2. Add or run `probe_send_entrypoints` against copied/installed binaries to confirm `SendTxtMessageByJid`, `MessageScheduling.SendChatMessage`, `Chat.SendMessage`, and file-upload/file-message candidates by metadata only.
3. Add or run a UIA preflight classifier for `skinAlphaTxt`, `rtbSendMessage`, `btnSend`, `发送文件`, and offline-send message state.
4. Do not send, click, type, upload, attach hooks, or capture network traffic in this node.
5. Update `capability-source-matrix.md` after B2/A-route preflight passes or fails.
1. Keep `isphere_send_message` in preview/dry-run only.
2. Resolve target refs from existing contact/group search output.
3. Validate `content_sha256` and `idempotency_key`.
4. Return connector metadata such as `connector="implatform-sidecar"` and `connector_stage="preview"`.
5. Append a local audit event for preview attempts.
6. Do not send, click, type, upload, attach hooks, or capture network traffic in this node.
7. Keep the later online-only sandbox-send gate separate.
## Current status
B is selected as the primary send/file-send route. The first non-mutating runtime probe has now been run against a real logged-in environment through the returned live-probe package. B can continue only through non-mutating entrypoint confirmation; A remains the fallback and now has concrete UIA selector evidence, but production send remains blocked until dry-run/idempotency/audit and sandbox-send evidence exist.
B is selected as the primary send/file-send route. Runtime discovery and entrypoint metadata preflight have passed enough to continue to preview/dry-run design. A remains the fallback and now has concrete UIA selector/offline-blocker classifier support. Production send remains blocked until dynamic observation, idempotent dry-run/audit, and one approved sandbox send prove success/ack behavior.

View File

@@ -5,6 +5,7 @@ Stage: Core business capability roadmap
Evidence index: `docs/source-discovery/2026-07-09-n12-pre-zyl-index.md`
Schema notes: `docs/source-discovery/2026-07-09-n12-pre-zyl-schema-notes.md`
Returned live probe: `docs/source-discovery/2026-07-10-returned-live-probe-analysis.md`
Send connector preflight: `docs/source-discovery/2026-07-10-send-connector-preflight.md`
## Source priority
@@ -23,8 +24,8 @@ Returned live probe: `docs/source-discovery/2026-07-10-returned-live-probe-analy
| `isphere_search_contacts` | bare sender/receiver JIDs extracted from normalized log-backed messages loaded from configured PacketReader file or directory source | validated copied `MsgLib.db` tables: `TD_Roster`, `TD_CustomEffigy`, `tblRecent`, `tblChatLevel`, `tblPersonMsg`; decrypted roster/contact stanzas from `Smark.SendReceive`; UIA helper source if display names are still missing | `docs/source-discovery/2026-07-10-msglib-readonly-schema-extraction.md`; `internal/isphere/contacts_test.go`; `internal/tools/isphere_contacts_test.go` | C34 documents optional MsgLib contact display enrichment; R2 adds deterministic exact-match-first ranking, case-insensitive de-duplication across log/MsgLib candidates, and preserves `source`/`raw_ref` | core contact search complete; optional richer fields later |
| `isphere_search_groups` | decrypted `PacketReader.ProcessPacket` `type="groupchat"` stanzas and conference/MUC JIDs loaded from configured PacketReader file or directory source | validated copied `MsgLib.db` tables: `tblMsgGroupPersonMsg`, `TD_WorkGroupAuth`, `tblRecent`; UIA helper source if group display names are still missing | `docs/source-discovery/2026-07-10-msglib-readonly-schema-extraction.md`; `internal/isphere/groups_test.go`; `internal/tools/isphere_groups_test.go`; C9 ignored-log scan: PacketReader 86 groupchat/86 conference hits; Smark 24 groupchat/658 conference/631 muc hits | C34 documents optional MsgLib group display enrichment; R2 adds deterministic exact-match-first ranking, case-insensitive de-duplication across log/MsgLib candidates, and preserves `source`/`raw_ref` | core group search complete; optional member/owner hierarchy later |
| `isphere_receive_files` | decrypted `PacketReader.ProcessPacket` file-transfer message stanzas via `internal/isphere.ListFilesFromMessages` and `isphere_receive_files` list mode; configured PacketReader file or directory source; `zyl\importal\<hash>` cache entries remain unlinked | MsgLib `TD_ReceiveFileRecord` safe metadata through explicit copied-DB path; decrypted `Smark.SendReceive` and `SaveToDB` traces for file-reference reconciliation; future UIA/client connector for download | `docs/source-discovery/2026-07-09-n12-pre-zyl-schema-notes.md#c12-file-transfer-evidence-precheck`; `docs/source-discovery/2026-07-10-file-download-mapping-precheck.md`; `docs/source-discovery/2026-07-10-file-cache-mapping-diagnostic.md` | C22 verifies safe file-list contract args; R3 confirms list metadata is available; R3b diagnostic finds 0 current cache/archive matches, so R4 remains blocked | blocked pending better cache evidence or UI/client download connector |
| `isphere_send_message` | B-route selected: running-client sidecar / in-process connector, preferring `AppContextManager.SendTxtMessageByJid(...)` or `MessageScheduling.SendChatMessage(...)` over the unimplemented `SendP2PMessage(...)` interface path | A-route fallback: constrained UI/RPA wrapper only if B cannot pass runtime probe, entrypoint availability, dynamic observation, and idempotent dry-run gates; network/protocol replay remains deferred | `docs/source-discovery/2026-07-10-send-message-source-precheck.md`; `docs/source-discovery/2026-07-10-send-message-connector-selection.md`; `docs/source-discovery/2026-07-10-send-sidecar-b-first-plan.md`; `docs/source-discovery/2026-07-10-returned-live-probe-analysis.md` | R5b returned live probe confirms an x86 running `IMPlatformClient.exe` `4.1.2.6842`, live TCP endpoint, installed B-route DLL presence, and A-route UIA controls (`skinAlphaTxt`, `rtbSendMessage`, `btnSend`, file menu). It also shows the chat window reporting an offline-send blocker, and it does not prove runtime send entrypoint reachability or success/ack mapping. | next: R6a/C31 non-mutating send connector preflight: `probe_send_entrypoints` plus UIA offline-state/control classifier; keep production send blocked |
| `isphere_send_file` | B-route selected after send-message probe: managed offline-file path through `OffLineFileSend.sendFile()`, `IMPP.Service*.dll` `IFileTransfer.FileUpload(...)`, and `Chat.sendFileMessage(...)` | A-route fallback: constrained UI/RPA upload/send-file flow; native `TcpFileTransfer.dll` is a later candidate only after managed path is rejected | `docs/source-discovery/2026-07-10-send-message-source-precheck.md`; `docs/source-discovery/2026-07-10-send-message-connector-selection.md`; `docs/source-discovery/2026-07-10-send-sidecar-b-first-plan.md`; `docs/source-discovery/2026-07-10-returned-live-probe-analysis.md` | R5b confirms `IMPP.Service*.dll`, `TcpFileTransfer.dll`, and UIA `发送文件` menu evidence in the live install/window tree, but file-send remains blocked behind message-send connector preflight plus upload/file-message dry-run evidence. | next: wait for R6a/C31 message-send preflight; then file-send runtime/upload preflight |
| `isphere_send_message` | B-route selected: running-client sidecar / in-process connector, preferring `AppContextManager.SendTxtMessageByJid(...)` or `MessageScheduling.SendChatMessage(...)` over the unimplemented `SendP2PMessage(...)` interface path | A-route fallback: constrained UI/RPA wrapper only if B cannot pass runtime probe, entrypoint availability, dynamic observation, and idempotent dry-run gates; network/protocol replay remains deferred | `docs/source-discovery/2026-07-10-send-message-source-precheck.md`; `docs/source-discovery/2026-07-10-send-message-connector-selection.md`; `docs/source-discovery/2026-07-10-send-sidecar-b-first-plan.md`; `docs/source-discovery/2026-07-10-returned-live-probe-analysis.md`; `docs/source-discovery/2026-07-10-send-connector-preflight.md` | R6a/C31 adds read-only `probe_send_entrypoints` and `probe_send_uia_controls`. Copied install metadata reports all 5 required B-route send entrypoints available, including `SendTxtMessageByJid`, `MessageScheduling.SendChatMessage`, `Chat.SendMessage`, and file-transfer candidates. UIA classifier can report offline-blocked state. This is preflight only: no real send, success/ack, or idempotent production behavior is proven. | next: R6b B-route preview/dry-run contract and audit shape; production send remains blocked |
| `isphere_send_file` | B-route selected after send-message probe: managed offline-file path through `OffLineFileSend.sendFile()`, `IMPP.Service*.dll` `IFileTransfer.FileUpload(...)`, and `Chat.sendFileMessage(...)` | A-route fallback: constrained UI/RPA upload/send-file flow; native `TcpFileTransfer.dll` is a later candidate only after managed path is rejected | `docs/source-discovery/2026-07-10-send-message-source-precheck.md`; `docs/source-discovery/2026-07-10-send-message-connector-selection.md`; `docs/source-discovery/2026-07-10-send-sidecar-b-first-plan.md`; `docs/source-discovery/2026-07-10-returned-live-probe-analysis.md`; `docs/source-discovery/2026-07-10-send-connector-preflight.md` | R6a/C31 metadata confirms `FileTransfer.FileUpload`, `FileTransfer.AsynFileUpload`, `OffLineFileSend.sendFile`, and `Chat.sendFileMessage` candidates. File-send remains blocked behind the message-send preview/dry-run contract plus later upload/file-message dry-run and sandbox evidence. | next: wait for R6b message-send preview/dry-run, then file-send upload preflight |
## Stage C entry rule
@@ -41,4 +42,4 @@ Start Stage C with a narrow log-backed `isphere_receive_messages` source abstrac
## Deferred source work
`MsgLib.db` has a validated copied read-only open path through the bundled 32-bit `System.Data.SQLite.dll` and password `123`. C27 adds `MsgLibReadSidecar` as the bounded x86 .NET reader boundary, C28 adds the Go `internal/msglib` process client, C29 adds bounded `display_entities` extraction, C30 wires it as optional contact/group MCP enrichment, C31 proves real copied-DB MCP enrichment with sanitized output, C32 reuses it for receive-message display fields, C33 proves that receive display path through a real copied-DB MCP smoke without printing entity values, C34 documents the operator setup/verification path, C35 maps MsgLib message tables to receive-message contract fields without reading row values, C36 adds metadata-only `message_sources` readiness, C37 defines the bounded DB-backed receive-source design, C38 implements sidecar/Go-wrapper `list_messages` with sanitized verification, C39 adds a Go adapter from MsgLib list results to the receive-message domain model, C40 adds explicit tool-level `msglib_readonly` source selection, C41 wires env-configured explicit MsgLib receive with optional sanitized smoke, R1 documents source reconciliation keys, and R2 hardens contact/group search ranking and de-duplication. The active roadmap is `docs/superpowers/plans/2026-07-10-core-business-capabilities-roadmap.md`; next step is R6a/C31 non-mutating send connector preflight.
`MsgLib.db` has a validated copied read-only open path through the bundled 32-bit `System.Data.SQLite.dll` and password `123`. C27 adds `MsgLibReadSidecar` as the bounded x86 .NET reader boundary, C28 adds the Go `internal/msglib` process client, C29 adds bounded `display_entities` extraction, C30 wires it as optional contact/group MCP enrichment, C31 proves real copied-DB MCP enrichment with sanitized output, C32 reuses it for receive-message display fields, C33 proves that receive display path through a real copied-DB MCP smoke without printing entity values, C34 documents the operator setup/verification path, C35 maps MsgLib message tables to receive-message contract fields without reading row values, C36 adds metadata-only `message_sources` readiness, C37 defines the bounded DB-backed receive-source design, C38 implements sidecar/Go-wrapper `list_messages` with sanitized verification, C39 adds a Go adapter from MsgLib list results to the receive-message domain model, C40 adds explicit tool-level `msglib_readonly` source selection, C41 wires env-configured explicit MsgLib receive with optional sanitized smoke, R1 documents source reconciliation keys, and R2 hardens contact/group search ranking and de-duplication. The active roadmap is `docs/superpowers/plans/2026-07-10-core-business-capabilities-roadmap.md`; next step is R6b B-route preview/dry-run contract.