Set Watched Folders
set_watched_foldersManage which folders a running pod watches without a restart by reading current settings and sending the full updated template and user folder set with a version check.
Instructions
Replace a running pod's watched folders without restarting it. Read watched_folders first and send the WHOLE set back:
template = {template folder path: {"enabled": bool, "include": [...] or null}} and user = [{"path", "include", "enabled", "include_existing"}].
expected_version is the revision you read; a version conflict means someone else changed it — read again.
A running pod's template folder can't be moved: to save another folder instead, turn the template folder off and add the new path to user (the app keeps writing to $MESHIVE_OUTPUT_DIR, so tell the user to point the app there).
Adding or turning on a folder can raise storage costs (uploaded files are stored and billed): with confirm=false (default) such a change only returns a summary; call again with confirm=true after the user agreed. Removing or turning off applies immediately.
Every write requires operation_id. Reuse the ID returned by the preview, or generate a UUID before the first call. Keep it for confirmation and all retries; a new ID means a new operation. After a timeout, check operation_status and resource state before retrying.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pod | Yes | ||
| user | No | ||
| confirm | No | ||
| template | No | ||
| workspace | No | ||
| operation_id | No | ||
| expected_version | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||