Session Downloads fixtures¶
stageSessionDownloads is a deprecated session-bound alias of putAppFile
target.domain: "user_files". It remains available with unchanged defaults,
schemas, and session ownership checks until equivalent workflows are device-verified.
See the unified call shape and target policy. Its stored overrides
remain attached to this exact name; it does not grant unified private writes.
Stage the files a system picker (documents, gallery, media) would open from the
device’s shared Downloads tree, bound to the caller’s device session. The
stageSessionDownloads tool is the session-scoped companion to
putAppFile with target.domain: "user_files": every operation
is scoped to the live session that owns the device, and the tool refuses before
touching the device when that session is missing or no longer active.
Breaking change: stageSharedStorage and stageSharedStorageFixtures have been removed.
Replace either call with default-enabled putAppFile:
{
"name": "putAppFile",
"arguments": {
"target": {
"domain": "user_files",
"namespace": "fixtures",
"reset": false,
"indexMedia": true
},
"files": [{ "destinationPath": "fixture.txt", "contentText": "fixture" }]
}
}
Move namespace, reset, and indexMedia into target; keep files and device/session
options at the top level. Each file requires destinationPath and exactly one of
sourcePath, contentText, or contentBase64. Set indexMedia: true to preserve the
removed tools’ Android indexing default; putAppFile defaults it to false.
Tool¶
stageSessionDownloads (opt-in; enable with --enable-tool stageSessionDownloads).
| Field | Type | Notes |
|---|---|---|
sessionUuid |
string (required) | The live device session that owns the target Android device. |
directory |
string (required) | Exactly one child directory beneath Downloads; no separators, no ... |
reset |
boolean (default false) |
Remove only that one directory before writing. |
indexMedia |
boolean (default true) |
Request Android media indexing for media files. |
files |
array (at least one) | Each file provides exactly one of sourcePath, contentText, or contentBase64, plus a relative destinationPath. |
Scope and safety¶
- Android only. iOS has no user-visible shared Downloads tree; an iOS
session returns
{ success: false, status: "unavailable" }. - Session-bound. The device is resolved from
sessionUuidthrough the same resolver the session-log family uses. A request without a bound session is refused withSESSION_NOT_BOUND, and one whose session no longer owns a device withSESSION_NOT_ACTIVE— both before any device is touched. - Downloads only.
directoryis a single normalized segment, soresetcan only ever removeDownloads/<directory>.destinationPathvalues are normalized and reject absolute paths and..traversal, so no fixture can escape the declared directory. Arbitrary shared-storage mutation is not exposed.
Result¶
On success the tool reports the resolved sessionUuid, deviceId, the
destinationDirectory under the session device’s active user, whether the
directory was reset, and a per-file entry with its byteCount and a
mediaIndexing outcome (completed when indexing was requested and confirmed,
otherwise notRequested with the reason).