2 Commits

Author SHA1 Message Date
GVASTE d6c50ed623 windows: fix config, IPC, path, and Lua compatibility (#258)
* windows: fix config, IPC, path, and Lua compatibility

* spotify: share API structures and helper so tests compile on Windows

* windows: address PR comments and fix socket unavailable detection, tasklist matching, api_fs tests, and doc comment

* windows: address remaining PR reviews (table-driven tests, m3u resolve comments & tests, blockquote formatting, and site/index.html description)

* feat: implement cross-platform IPC server with Unix and Windows support

* feat: implement Unix socket IPC server and Windows process liveness check

* ipc: detect dead processes via os.ErrProcessDone

os.Process.Signal converts ESRCH to os.ErrProcessDone since Go 1.16, so
comparing against raw syscall.ESRCH never matched and a stale socket from
a crashed instance made NewServer fail instead of cleaning it up.

* windows: simplify fs allowlist normalization, exec env, and ipc error checks

- normalize write allow-dirs once in the memoized writeAllowDirs
- collapse duplicate test helpers and repeated getenv blocks
- drop redundant errors.As branch; name WSAECONNREFUSED
- revert single-entry table test to linear form
- gofmt: trailing newlines and indentation

---------

Co-authored-by: Bjarne Øverli <bjarne.oeverli@gmail.com>
2026-06-04 19:52:32 +02:00
Bjarne Øverli c5a9da9b6e feat(plugins): add exec, keymap, and CLI command APIs
Release / build (amd64, darwin, macos-latest) (push) Has been cancelled
Release / build (amd64, linux, ubuntu-latest) (push) Has been cancelled
Release / build (amd64, windows, windows-latest) (push) Has been cancelled
Release / build (arm64, darwin, macos-latest) (push) Has been cancelled
Release / build (arm64, linux, ubuntu-latest) (push) Has been cancelled
Release / release (push) Has been cancelled
Release / update-homebrew (push) Has been cancelled
- cliamp.exec.run(): allowlisted subprocess spawn for plugins,
  gated by permissions = {"exec"}
- p:bind([desc,] fn): plugin-registered TUI keybindings, gated by
  permissions = {"keymap"}; entries with a description appear in
  the Ctrl+K overlay. Core-reserved keys rejected at bind time.
- p:command(name, fn): shell-invokable plugin commands, dispatched
  over IPC via `cliamp plugins call <plugin> <command> [args...]`
  and listed via `cliamp plugins commands`.
- cliamp.fs: added mkdir/listdir; ~/Music/cliamp/ writable.
2026-04-23 22:11:51 +02:00