webui: replace nautctl web server with a loadable plugin

Drop the web UI that was compiled into nautctl and serve the
torrent-ui front end (../torrent-ui/public) from a native plugin
(plugins/webui) loaded via `nautd --plugin`. The plugin talks to the
engine only through the host call_rpc ABI and adapts the daemon's RPC
surface to the qBittorrent-style contract the UI expects (snapshot/SSE,
torrent detail tabs, add/delete, cookie auth).

Also folds in the daemon refactor that owns per-torrent worker threads
and the swarm engine (naut_swarm) used by the plugin's data source.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ookami125 2026-06-17 00:21:48 -04:00
parent 50a357968a
commit 8dde48c05a
27 changed files with 2706 additions and 403 deletions

View file

@ -10,9 +10,9 @@
-- without waiting for the rest of the torrent.
--
-- Install:
-- nautd --socket /tmp/nautd.sock --script examples/anime_sort.lua
-- nautctl --socket /tmp/nautd.sock add_torrent \
-- '{"torrent_id":1,"torrent":"show.torrent","root":"/downloads/1"}'
-- nautd --socket /tmp/nautd.sock
-- nautctl --socket /tmp/nautd.sock script examples/anime_sort.lua
-- nautctl --socket /tmp/nautd.sock add show.torrent /downloads/1
--
-- The parser below is a VERBATIM COPY of examples/anitomy.lua (the sandbox has
-- no `require`, so it must be inlined). Keep the two in sync; examples/
@ -22,7 +22,7 @@
-- CONFIG — edit these
----------------------------------------------------------------------
local SORTED_ROOT = "/sorted" -- destination library root
local SORTED_ROOT = "/workspaces/source/ai-garbo/Naut-Torrent/sorted" -- destination library root
local ONLY_VIDEO = true -- skip non-video files (subs, nfo, samples)
local KEEP_ORIGINAL_NAME = false -- true: keep the original filename;
-- false: rename to "Title - SNNENN.ext"