force_sync_directory
Prepare project files, optionally write a visible probe, then upload and retain a Code Sync connection for explicit first-sync troubleshooting.
Instructions
Prepare project files, optionally write a visible probe, then upload and retain a Code Sync connection. Inputs: sync_token (required string); directory (required string, project root path); glob_pattern (optional string, default empty: bwconfig.lua syncGlob or scripts/**/*.lua); probe (optional boolean, default true); probe_message (optional string, default empty: generated message); watch (optional boolean, default true: auto-upload later matching changes). Effects: creates scripts/, drafts/, and prompts/, creates main.lua if missing, writes project metadata and the brief, creates bwconfig.lua if missing, and writes or replaces scripts/zz_sync_probe.lua when probe=true. Uploads selected files and on success replaces the in-memory connection and applies watch. Returns preparation details, probe details, upload status, and connection/watcher flags.
Context: Choose only for explicit first-sync troubleshooting when project preparation or a visible in-game message is wanted. It uses the same upload transport as sync_directory, not a stronger remote-state check. It changes local project files even with probe=false; use sync_directory for normal existing-file uploads. Existing main.lua is preserved; the brief and metadata can be replaced. A custom glob must include the generated files to upload them. There is no allow_empty input; it does not offer delete-all. It cannot start a match or read the editor/console.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| probe | No | ||
| watch | No | ||
| directory | Yes | ||
| sync_token | Yes | ||
| glob_pattern | No | ||
| probe_message | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||