Documentation
¶
Overview ¶
Package cuxcli is cuxdeck's only write path into cux: a thin, allowlisted bridge to the `cux` command-line tool. Every mutation the panel offers maps to exactly one CLI invocation, so cux's own validation, locking, and business rules apply unchanged — cuxdeck forks no logic.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnknownAction = errors.New("cuxcli: unknown action")
ErrUnknownAction is returned for actions outside the allowlist.
Functions ¶
This section is empty.
Types ¶
type AttachResult ¶ added in v0.3.0
type AttachResult int
AttachResult is the outcome of EnsureAttach.
const ( AttachAlreadyOn AttachResult = iota // cux attach was already enabled AttachEnabled // cuxdeck just turned it on AttachFailed // couldn't enable (cux < 0.3.2, or an error) )
func EnsureAttach ¶ added in v0.3.0
func EnsureAttach() (AttachResult, string)
EnsureAttach makes sure cux's `attach` setting is on. cuxdeck mirrors sessions over the PTY socket cux exposes only when attach is enabled, and it's opt-in (off by default) as of cux 0.3.2 — the always-on PTY was taxing every session (inulute/cux#33). It flips the setting on only when it's actually off, so the caller can warn about restarting running sessions exactly when that matters (enabling only affects cux sessions started afterwards). The second return is a detail string for the AttachFailed case.