cmux-socket-policy
/cmux-socket-policy
Zasady wątkowania i fokusu poleceń socket w cmux CLI: dodawanie poleceń, zachowanie fokusu i nieprzejmowanie okna aplikacji.
- Autor
- legotec73 ↗
- Repozytorium
- CMUX ↗
- Licencja
- GPL-3.0
- Ostatnia zmiana repozytorium
- 03.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 4
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 03.10.2026, bez odwołań do wycofanych modeli i API.
GPL-3.0, otwarta.
Co robi i kiedy
Zasady wątkowania i fokusu poleceń socket w cmux CLI: dodawanie poleceń, zachowanie fokusu i nieprzejmowanie okna aplikacji.
Oryginalny opis (EN)
Socket command threading and focus policy for cmux CLI/socket work. Use when adding or changing socket commands, CLI commands, telemetry commands, focus/select/open/close/send-key behavior, or automation that could steal app focus.
Jak działa
- Threading policy
- Focus policy
- Remote relay authorization
- Detailed references
Podgląd SKILL.md
--- name: cmux-socket-policy description: "Socket command threading and focus policy for cmux CLI/socket work. Use when adding or changing socket commands, CLI commands, telemetry commands, focus/select/open/close/send-key behavior, or automation that could steal app focus." --- # cmux Socket Policy ## Threading policy - Do not use `DispatchQueue.main.sync` for high-frequency socket telemetry commands such as `report_*`, `ports_kick`, status/progress updates, or log metadata updates. - For telemetry hot paths, parse and validate arguments off-main. - Dedupe and coalesce off-main first. - Schedule minimal UI/model mutation on the main actor only when needed. In the app, mutations go through the bounded `MainActorWorkQueue` and read-only queries answer off the main actor from the published `ControlSnapshot` ([architecture 5a](../../plans/cmux-next/architecture.md)). - Commands that directly manipulate AppKit/Ghostty UI state are allowed to run on the main actor. - If adding a new socket command, default to off-main handling and require an explicit reason in code comments when main-thread execution is necessary. ## Focus policy - Socket/CLI commands must not steal macOS app focus. - Do not activate the app or raise windows unless the command has explicit focus intent. - Only explicit focus-intent commands may mutate in-app focus/selection. - Explicit focus-intent commands include `window.focus`, `workspace.select/next/previous/last`, `surface.focus`, `pane.focus/last`, browser focus commands, and v1 focus equivalents. - All non-focus commands should preserve the current user focus context while still applying data/model changes. - Open commands (`vm`/`cloud` shell, tui, open, new, base, workspace new/open, agent; `surface open`/`new-terminal`; `cmux open`; `cmux ssh`) focus only when run interactively and stay in the background when run by an agent or script (`defaultFocusForUserOpen`); `--focus` opts in, `--no-focus` opts out. Their socket methods default `focus` to false, and a pane opened without focus is marked unread. ## Remote relay authorization Every v2 method is a potential `cmux ssh` relay payload. The legacy `RemoteRelayCommandPolicy` was deleted with the legacy app and the app has no relay policy yet; any relay path must be default-deny with the security analysis and policy tests in [remote relay authorization](references/remote-relay-authorization.md). ## Detailed references - Read [references/threading-and-focus.md](references/threading-and-focus.md) when adding a command, changing command execution context, or deciding whether focus changes are allowed. - Read [references/remote-relay-authorization.md](references/remote-relay-authorization.md) when adding or changing a v2 method, a remote CLI command, or the relay policy.
Pliki w paczce (4)
- SKILL.md 3 KB
- agents/openai.yaml 1 KB
- references/remote-relay-authorization.md 3 KB
- references/threading-and-focus.md 1 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · legotec73/CMUX | 90 | GPL-3.0 |
| manaflow-ai/cmux | 90 | GPL-3.0 |
Migawka bazy z 13.11.2026 · wersja paczki 76217bf442f5 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 3 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100cmux-cli
Opisuje użycie CLI cmux: --help, polecenia socketu, odkrywanie poleceń, obszary robocze, panele, powierzchnie, CLI przeglądarki, hooki, feed, ustawienia i automatyzacja przez polecenie cmux. - 95cmux-browser
Automatyzuje przeglądarkę cmux: otwiera strony, czyta ich stan i wyciąga dane bez przejmowania fokusu. - 100cmux-diagnostics
Uruchamia diagnostykę cmux, gdy nie działają hooki, powiadomienia, przywracanie sesji, ustawienia lub sterowanie z CLI. - 95cmux-browser
Automatyzuje przeglądarkę w cmux: otwiera strony, sprawdza i obsługuje powierzchnie, czeka na stan i wyciąga dane bez przejmowania fokusu. - 100cmux-capture
Robi zrzuty ekranu lub nagrania okna cmux z CLI, do pull requestu, zgłoszenia błędu lub pokazania aktualnego wyglądu aplikacji, gdy zmiana jest wizualna. - 100cmux-workspace
Obsługuje bieżący workspace cmux, panele i powierzchnie oraz automatyzację, która nie przeszkadza innym procesom.