Align launcher terminology docs
This commit is contained in:
29
README.md
29
README.md
@@ -10,6 +10,22 @@ This application serves as the "Native Mode" runtime for Aether podiums and devi
|
||||
- **Hardware Telemetry:** Direct access to CPU, RAM, and Network interface data.
|
||||
- **Remote Control:** Slide navigation and application control via WebSocket intents.
|
||||
|
||||
## Launcher Terminology
|
||||
|
||||
Use these terms consistently when working on the launcher bridge:
|
||||
|
||||
- **Launch Profiles**: the Svelte-side map keyed by file extension.
|
||||
- **Launch Profile**: one resolved config object selected from that map for a file.
|
||||
- **Native Template**: the single AppleScript or shell command string Electron executes after
|
||||
the file has been copied to temp. This is an implementation detail of the bridge.
|
||||
|
||||
In short, the profiles are the policy; the launch profile is the selected policy entry; the
|
||||
native template is the executable string produced by that policy.
|
||||
|
||||
Do not use `launch_scripts` as the public/config-facing term. If that wording appears in old
|
||||
comments or generated output, treat it as stale naming drift and update it to `launch_profiles`
|
||||
when referring to the Svelte-side map or `native_template` when referring to the resolved string.
|
||||
|
||||
## 🖥️ Onsite Deployment
|
||||
|
||||
**Current hardware:** MacBook Air 2018 — Intel x64. All current deployments use `aether_launcher-darwin-x64`.
|
||||
@@ -250,7 +266,7 @@ to change.
|
||||
| `check_cache({cache_root, hash, hash_prefix_length?, verify_hash?})` | Checks if a file exists in the hashed cache. `verify_hash: true` re-hashes the file to confirm integrity. |
|
||||
| `download_to_cache({url, cache_root, hash, api_key, account_id, hash_prefix_length?})` | Streams a file from the API into the hashed cache. Verifies SHA-256 integrity before finalizing. |
|
||||
| `copy_from_cache_to_temp({cache_root, hash, temp_root, filename, hash_prefix_length?})` | **Preferred primitive.** Copies cached file to temp dir with original filename. Returns `{ success, path }`. The Svelte caller decides what to do next. |
|
||||
| `launch_from_cache({cache_root, hash, temp_root, filename, hash_prefix_length?, script_template?})` | Combines copy + launch. If `script_template` is provided, runs it (AppleScript or `shell:` prefixed command) instead of hardcoded extension logic. Falls back to built-in defaults when `null`. |
|
||||
| `launch_from_cache({cache_root, hash, temp_root, filename, hash_prefix_length?, native_template?})` | Combines copy + launch. The Svelte side resolves the Launch Profile to a single `native_template` string (AppleScript or `shell:` prefixed command). If no template is supplied, it returns an error. |
|
||||
|
||||
### Shell & OS
|
||||
|
||||
@@ -313,18 +329,19 @@ await native.run_osascript(`
|
||||
await native.run_cmd({ cmd: `open "${copy.path}"` });
|
||||
|
||||
// Option C — use a template from device config (data-driven, no rebuild needed):
|
||||
const template = $ae_loc.native_device?.launch_scripts?.pptx;
|
||||
const template = $ae_loc.native_device?.launch_profiles?.pptx;
|
||||
if (template) {
|
||||
const script = template.replace(/\{\{path\}\}/g, copy.path);
|
||||
await native.run_osascript(script);
|
||||
}
|
||||
```
|
||||
|
||||
### Configurable Launch Scripts (no rebuild needed)
|
||||
### Configurable Launch Profiles (no rebuild needed)
|
||||
|
||||
`launch_from_cache` and `launcher_file_cont.svelte` support per-extension script templates
|
||||
stored in `event_device.data_json.launch_scripts`. Keys are lowercase extensions (`pptx`, `key`,
|
||||
`pdf`, etc.); `default` is a catch-all. Templates use `{{path}}` as the file path placeholder.
|
||||
`launch_profiles` is the Svelte-side map stored in `event_device.data_json.launch_profiles`.
|
||||
`launch_from_cache` receives the resolved `native_template` string, not the profile map.
|
||||
Keys are lowercase extensions (`pptx`, `key`, `pdf`, etc.); `default` is a catch-all.
|
||||
Profiles use `{{path}}` as the file path placeholder.
|
||||
AppleScript strings run via `run_osascript`; prefix with `shell:` for shell commands.
|
||||
|
||||
See `documentation/PROJECT__AE_Events_Launcher_Native_integration.md` Section 8 for full details.
|
||||
|
||||
Reference in New Issue
Block a user