feat: add send message preview contract
This commit is contained in:
@@ -264,19 +264,20 @@ Errors: `INVALID_ARGUMENT`, `SOURCE_UNAVAILABLE`, `NOT_LOGGED_IN`, `PERMISSION_D
|
||||
| --- | --- |
|
||||
| Business purpose | Send a text message to a resolved contact or group. |
|
||||
| Read-only | No. |
|
||||
| Execution mode | Preview or production write. |
|
||||
| Current priority | Stage D write capability. |
|
||||
| Execution mode | Preview/dry-run now; production write after sandbox-send gate. |
|
||||
| Current priority | R6b preview/dry-run contract is implemented; production remains blocked. |
|
||||
|
||||
Input parameters:
|
||||
|
||||
```json
|
||||
{
|
||||
"target_type": "contact|group|conversation, required",
|
||||
"target_type": "direct|group, required",
|
||||
"target_id": "string, required",
|
||||
"content_text": "string, required",
|
||||
"content_sha256": "sha256 hex of content_text, required",
|
||||
"idempotency_key": "string, required; stored only as SHA256 in audit",
|
||||
"execution_mode": "preview|production, optional, default preview",
|
||||
"idempotency_key": "string, optional but recommended",
|
||||
"source_preference": "bridge|uia|network|auto, optional, default auto"
|
||||
"source_preference": "not accepted in R6b preview-only implementation"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -286,18 +287,37 @@ Output JSON:
|
||||
{
|
||||
"ok": true,
|
||||
"execution_mode": "preview",
|
||||
"send_status": "planned|sent|rejected",
|
||||
"send_status": "planned|blocked",
|
||||
"connector": "implatform-sidecar",
|
||||
"connector_stage": "preview|blocked",
|
||||
"target": {
|
||||
"target_type": "contact|group|conversation",
|
||||
"target_type": "direct|group",
|
||||
"target_id": "string",
|
||||
"display_name": "string|null"
|
||||
"target_ref": "contact:<id>|group:<id>"
|
||||
},
|
||||
"content": {
|
||||
"content_sha256": "sha256 hex",
|
||||
"content_length": 12
|
||||
},
|
||||
"idempotency": {
|
||||
"idempotency_key_sha256": "sha256 hex"
|
||||
},
|
||||
"side_effects": {
|
||||
"sent_message": false,
|
||||
"sent_file": false,
|
||||
"uploaded_file": false,
|
||||
"clicked_ui": false,
|
||||
"typed_text": false,
|
||||
"captured_network": false,
|
||||
"attached_hook": false,
|
||||
"modified_client_data": false
|
||||
},
|
||||
"message_ref": null,
|
||||
"content_sha256": "sha256 hex",
|
||||
"audit": {}
|
||||
}
|
||||
```
|
||||
|
||||
R6b rule: the response and audit may include `content_sha256`, `content_length`, `idempotency_key_sha256`, `target_ref`, connector metadata, and side-effect booleans. They must not include raw message body or raw idempotency key. `execution_mode="production"` returns `ok=false` and `send_status="blocked"` until dynamic observation, idempotency/audit verification, and one approved sandbox send pass.
|
||||
|
||||
Errors: `INVALID_ARGUMENT`, `WRITE_NOT_READY`, `PERMISSION_DENIED`, `NOT_LOGGED_IN`, `TARGET_NOT_FOUND`, `AMBIGUOUS_TARGET`, `PREVIEW_ONLY`, `TIMEOUT`, `CONNECTOR_FAILED`, `INTERNAL_ERROR`.
|
||||
|
||||
## Tool: `isphere_send_file`
|
||||
|
||||
Reference in New Issue
Block a user