feat(security,timer): harden auth and add multi-instance coordination

- Extract JASPER_URL into a shared constants module
- Pass login credentials via a temp curl config file to avoid exposure
  in the process argument list (ps/proc)
- Replace vim.ui.input secret prompt with vim.fn.inputsecret()
- Add -s (silent) flag to all curl calls to suppress progress output
- Guard curl output parser against missing newline in stdout
- Track per-activity shared timestamp file
  (/tmp/jasper_<id>.last_activity)
  so the inactivity watchdog skips auto-pause when another Neovim
  instance is still active on the same task
- Clean up leftover uv_timer on repeated begin_tracking calls
- Remove shared activity file on teardown only when this instance wrote
  it
This commit is contained in:
2026-04-18 19:17:44 +02:00
parent 56ccfe63b6
commit 9c122a312f
4 changed files with 133 additions and 21 deletions

6
lua/jasper/constants.lua Normal file
View File

@@ -0,0 +1,6 @@
--- jasper/constants.lua
--- Shared constants used across the plugin.
return {
JASPER_URL = "https://jasper.4sigma.it",
}