Install
openclaw skills install @talonpoint/cloud-file-hydration-nudgeHydrate visible but unreadable cloud placeholder files with provider-aware read verification.
openclaw skills install @talonpoint/cloud-file-hydration-nudgeWhen a cloud-synced file is visible but unreadable, hydrate it only after proving the read failure and identifying the provider/path behavior. Do not assume a previous provider's workaround applies to the current file.
Metadata visibility is not readability. Provider state is diagnostic, not proof. The proof is a successful bounded content read by a normal process.
Quick Look is deprecated for automated hydration workflows. Do not use Quick Look as a routine nudge.
If provider sync is paused, offline, quit, or otherwise unavailable, stop and inform the user. Do not start OneDrive, resume sync, or change provider sync state without explicit consent.
dd if="/path/to/file" of=/dev/null bs=64k count=1
ls -laO@ "/path/to/file"
fileproviderctl evaluate "/path/to/file"
Keep broad runtimes narrow. Do not grant general Node, shell, or scheduler processes broad Accessibility, Screen Recording, Full Disk Access, or equivalent macOS privacy powers just to hydrate cloud files.
Constrained boundary rule:
Folder watchers or Automator Folder Actions may acknowledge or enqueue a visible file before it is hydrated. That acknowledgement is not a delivery signal.
For intake workflows, use two phases:
Dataless files should remain pending/retry candidates. Do not repeatedly full-scan large folders just to rediscover the same pending placeholders.
Observed Automator result: a temporary Folder Action on a disposable OneDrive folder fired for a newly added file, but did not fire its adding folder items handler when the existing file was later offloaded with /unpin or hydrated with Finder cloud-button AXPress. Do not depend on Automator Folder Actions to notice hydration state changes for existing placeholders.
For iCloud-visible/dataless files, use Apple's ubiquitous-item download API before any UI-based fallback.
startDownloadingUbiquitousItem.Example Swift shape:
import Foundation
let url = URL(fileURLWithPath: "/path/to/file")
let values = try url.resourceValues(forKeys: [
.isUbiquitousItemKey,
.ubiquitousItemDownloadingStatusKey,
.ubiquitousItemIsDownloadingKey
])
if values.isUbiquitousItem == true {
try FileManager.default.startDownloadingUbiquitousItem(at: url)
}
Then poll externally with the same bounded read:
for i in {1..30}; do
if dd if="/path/to/file" of=/dev/null bs=64k count=1; then
exit 0
fi
sleep 1
done
exit 1
Do not use Quick Look for iCloud hydration. If native iCloud download fails or times out, explain the failure and ask the user how they want to proceed.
For OneDrive File Provider-backed folders, prefer a real provider download/materialization control and verify with a bounded read. Do not treat policy state, badges, command output, or pinning as proof that bytes are local.
Observed provider signals for dataless OneDrive placeholders may include:
filesystem flags: compressed,dataless
isDownloaded = 0
isDownloadRequested = 0
isMostRecentVersionDownloaded = 0
bounded read: Resource deadlock avoided
fileproviderctl evaluate.isSyncPaused = 1, OneDrive is quit, or sync appears offline/unavailable, stop and ask before changing sync state.In macOS Finder list view, OneDrive may expose the not-downloaded cloud glyph as an Accessibility button inside the selected row's Name cell:
role = AXButton
description = Not downloaded
actions = AXPress
When this control is present, pressing AXPress invokes the same provider UI download action as clicking the Finder cloud icon. This is the first proven non-Quick-Look OneDrive automation fallback in the observed macOS File Provider test environment.
Safety requirements:
Not downloaded or equivalent provider cloud-download state.fileproviderctl evaluate, filesystem flags, and bounded read afterward.isDownloaded = 1, or the first folder state alone.node, as temporary test permissions. Prefer a trusted helper application or constrained automation host for production.Implementation guidance:
osascript - "$path", rather than embedding paths into generated AppleScript text. This avoided quoting bugs with apostrophes, spaces, ampersands, and Unicode accents in observed tests.Observed successful file pattern:
pre: compressed,dataless; isDownloaded = 0; bounded read failed
nudge: Finder selected-row cloud AXButton, AXPress
post: isDownloaded = 1; isMostRecentVersionDownloaded = 1; bounded read succeeded
AXPress; no long-lived isDownloading = 1 state was observed at that size./Applications/OneDrive.app/Contents/MacOS/OneDrive /unpin <file> may print a failure such as status=-1895824895 while still offloading the file. Verify post-state instead of trusting command output./Applications/OneDrive.app/Contents/MacOS/OneDrive /pin <file> may fail or may set policy without materializing bytes. It is not proof of hydration./unpin <folder> did not recurse in observed tests. If offload testing is needed, operate per file and verify each child.isDownloaded = 1 while isRecursivelyDownloaded = 0; do not treat folder isDownloaded as proof that child bytes are available.adding folder items did not fire for offload/hydration of an existing file.The following may be useful diagnostics or policy controls, but must not be treated as confirmed hydration unless the bounded read succeeds afterward:
fileproviderctl evaluate com.microsoft.OneDrive.FileProviderActions.MarkPinned <file>; observed macOS rejected this custom action as invalid even when listed by evaluation output./Applications/OneDrive.app/Contents/MacOS/OneDrive /pin <file>; observed behavior either failed or set pinned/Always Available policy while leaving the file compressed,dataless and unreadable.Always Keep on This Device; this may set policy but still requires bounded-read verification.For Dropbox, Google Drive, Box, or other File Provider-backed folders:
Quick Look is deprecated for automated cloud-file hydration. It should not be built into intake scripts, scheduled retry loops, provider nudges, or parser workflows as an automated fallback.
Reason: Quick Look opens UI and invokes preview parsers. That makes it broader and riskier than provider-native or provider-UI hydration controls.
If all provider-native, provider-UI, and approved trusted-helper approaches fail, tell the user plainly that a manual Quick Look attempt may hydrate the file. Present it as a user-operated recovery option, not as an automated step:
The safer provider hydration methods did not materialize this file. Quick Look is deprecated for automated hydration because it opens a preview parser, but you can manually try Quick Look in Finder if you accept that risk. Afterward, I will re-check with the same bounded read before continuing.
After any manual Quick Look attempt, always repeat provider-state checks and the same bounded read. Do not continue downstream based only on the user seeing a preview.
Use a compact local note:
File: <relative/private-safe path>
Pre-read: failed/succeeded, error if failed
Provider evidence: iCloud ubiquitous / File Provider downloaded/current flags / dataless flags
Nudge: native iCloud download / Finder cloud-button AXPress / provider-native action / other
Post-read: failed/succeeded
Downstream: parser/import/report result
Quick Look: not used; or manual user attempt after deprecated warning
Security: approved automation host if UI automation was used; or trusted-helper boundary
Do not delete, move, or overwrite user files during hydration testing. If a hydrated file conflicts with prior work, compare it against the current authoritative baseline before replacing any parsed export or downstream classification surface.