Commit Graph
142 Commits
Author SHA1 Message Date
Gmer4Lfe be306cf86c Let one gate decide every AI surface, so switching AI off actually removes all of it
The Tools card adopted the AI scripts on the host check alone, and api/ai.php only
tested AI_ENABLED in front of ask, so a disabled subsystem still had rows to run and
an endpoint that answered.
2026-08-07 09:49:31 -04:00
Gmer4Lfe 4989486f45 Two thirds of the conf was unreachable from the UI, and an empty Config block said nothing about why 2026-08-06 23:08:49 -04:00
Gmer4Lfe 8b0c2f6d1b Tools had no gear, so nineteen scripts had no Info and Settings at all 2026-08-06 22:57:05 -04:00
Gmer4Lfe 141e2ca37c At full size the dock's own button becomes its collapse, and closing hands the panel back 2026-08-06 22:49:38 -04:00
Gmer4Lfe b803fefebd Give the assistant dock a size toggle, so a long answer can have the panel without hiding what it is about 2026-08-06 22:44:00 -04:00
Gmer4Lfe d5944c2443 Sweep every onclick built from data: an unescaped quote silently killed nine handlers 2026-08-06 22:13:10 -04:00
Gmer4Lfe d135dff5cd An unescaped quote ended the onclick attribute early, so clicking an error line did nothing 2026-08-06 22:08:10 -04:00
Gmer4Lfe 62a838ebdd Clicking a recent error opens the log on that line and acks it, so acknowledged means seen 2026-08-06 22:00:44 -04:00
Gmer4Lfe f2d0e18f2c Ask about a run from the row it is on, and stop spending context on health checks when the run was clean 2026-08-06 21:51:55 -04:00
Gmer4Lfe 10c1705790 An answer sized the assistant dock past the bottom of the page because nothing refit the panel after it landed 2026-08-06 18:36:50 -04:00
Gmer4Lfe e467cdaf23 The scheduler AI dock read the poll envelope as the job, so every answer hung on thinking 2026-08-06 18:28:13 -04:00
Gmer4Lfe 269ef9b2de Verify a bug report's component and evidence before filing it 2026-08-05 21:25:00 -04:00
Gmer4Lfe 657ee435d1 Add a copy-out button that formats a report as a pasteable issue 2026-08-05 21:12:40 -04:00
Gmer4Lfe 2c5e412d91 File AI-detected Varaverk defects as deduped reports, surfaced on the AI tab and counted in the coffee report 2026-08-05 20:48:54 -04:00
Gmer4Lfe 714d97dd49 Add an incident journal the troubleshooter reads back, and thinking for diagnosis 2026-08-05 20:26:56 -04:00
Gmer4Lfe 5a813eb4c8 Add a troubleshooting profile with the scoped log, and a deterministic conf-key lookup 2026-08-05 20:18:05 -04:00
Gmer4Lfe 185abdb442 Add a scope-aware assistant dock to the scheduler right panel 2026-08-05 19:56:02 -04:00
Gmer4Lfe eacea56d9d Title the info banner for its view, and number and stripe the array fields 2026-08-05 18:13:04 -04:00
Gmer4Lfe 99486b1eaf Open on the condensed list, with a More info button for the full document 2026-08-05 18:03:47 -04:00
Gmer4Lfe aeb8c01370 Show the terse control list when the help block is collapsed 2026-08-05 17:58:29 -04:00
Gmer4Lfe 2ad3a1bfed Put the whole help doc back behind the collapse so the live blocks are not buried 2026-08-05 17:51:12 -04:00
Gmer4Lfe 329bf25b14 Number and stripe the per-script settings so each one reads as its own row 2026-08-05 17:44:12 -04:00
Gmer4Lfe 1761087283 Measure the editor chrome instead of assuming 38px, so the last lines are reachable 2026-08-04 21:16:15 -04:00
Gmer4Lfe a13c5541cc Pin the editor highlight overlay to the textarea so long confs scroll to the end 2026-08-04 21:07:27 -04:00
Gmer4Lfe 262cd92300 Cover every control in the reference tables so the collapsed view stays complete 2026-08-04 19:49:44 -04:00
Gmer4Lfe 87fa2693f0 Show the reference tables collapsed and the task guide on expand, from one file 2026-08-04 19:45:23 -04:00
Gmer4Lfe 3ea80ef944 Single-source the scheduler help from markdown the AI index can read 2026-08-04 19:30:38 -04:00
Gmer4Lfe e1bbecad38 Rename the per-orchestrator expander to Steps so it stops colliding with Advanced mode 2026-08-04 19:19:48 -04:00
Gmer4Lfe 149d98a10b Add a collapsed settings card under the composer 2026-08-04 18:27:57 -04:00
Gmer4Lfe bd583b58dc Put token usage above the system checks on the AI tab 2026-08-04 18:22:09 -04:00
Gmer4Lfe 83508cfb1b Pull partner token ledgers into a RAM cache so fleet totals are fleet-wide 2026-08-04 18:14:38 -04:00
Gmer4Lfe 969a85f303 Record token usage per turn and show daily, weekly and all-time totals by host 2026-08-04 18:04:46 -04:00
Gmer4Lfe 961c57c6f0 Let the system checks reach three columns on a wide monitor 2026-08-04 17:49:20 -04:00
Gmer4Lfe 89d6219e95 Align the System checks card with the third banner stat 2026-08-04 17:44:30 -04:00
Gmer4Lfe 131c9ffc13 Run the AI system checks in two columns to halve the card height 2026-08-04 17:40:50 -04:00
Gmer4Lfe b1fdaced9f Restrict the AI tab to HOST1 — the only node with the GPU, Ollama and the index 2026-08-04 17:25:40 -04:00
Gmer4Lfe 9d189e9dbf Flag destructive operations in generated scripts
Custom Scripts run as root on a schedule, so the expensive mistake is not
tangled logic — it is a simple script aimed one directory too high. The prompt
now asks for the dry-run form and an explicit line on what gets destroyed, and
a scan of the generated code blocks raises a banner regardless of whether the
model bothered to warn. Scans fenced code only, so prose mentioning rm does not
trip it.
2026-08-03 18:09:47 -04:00
Gmer4Lfe 8d393a1e1c Add three chat profiles: Varaverk Assistant, General Chat, Code Sketcher
Explicit buttons rather than an automatic router. Misclassifying a Varaverk
question as chat produces a confident invention about the user's system, which
is exactly what retrieval exists to prevent — with buttons there is no hidden
heuristic to be wrong and the strict profile is the default you land on.

Only Varaverk Assistant retrieves; the other two would be carrying passages
that cannot help write a folder-copy script. Memory goes to all three, since
that is what lets chat know the setup without claiming authority over it.
History depth is per profile and set server-side: retrieval costs ~2500 of
16384, so the profiles that skip it can hold a real conversation. Code
Sketcher is told to flag flags it is unsure of, after it invented
rsync --no-overwrite.
2026-08-03 17:36:24 -04:00
Gmer4Lfe d0b3588f6c Give the assistant a standing memory file
A small operator-written file handed to the model at the start of every
conversation — who you are, how this install is set up, what has already been
decided. Injected ahead of the retrieved passages and marked operator-authored
so it outranks anything they contradict, and never cited as a source.

Deliberately not indexed and deliberately under DATA_DIR: it changes
constantly, vector similarity is the wrong way to retrieve things you were
told to remember, and gitignoring it keeps personal notes out of a pushed
repository. The character cap is a context budget — this text costs its share
of 16k on every single turn.
2026-08-03 17:11:27 -04:00
Gmer4Lfe 76ad744581 Convert every POST off multipart — 21 call sites across 7 tabs
A multipart POST to the plugin API hangs and never completes on this host: no
status code, and no server-side trace of any kind. The correlation was exact —
every page using URLSearchParams worked, every page using FormData hung, which
is why scheduler and partnership appeared fine while docker, rsync, settings,
auth, arrs, fallback and monitor did not. URLSearchParams has the same append
API and fetch sets the urlencoded content type for it, so each site is a
one-token change with the payload logic untouched.
2026-08-02 18:27:25 -04:00
Gmer4Lfe 47110730e6 Send AI POSTs urlencoded instead of multipart
A multipart POST to this endpoint hangs: no status code is ever returned, and
the request never reaches PHP — no CSRF termination, no fatal, no entry log —
despite leaving the browser with a valid token and a correct body. Every POST
on this host that demonstrably works, including Unraid's own, is
x-www-form-urlencoded. Same fields and same $_POST server-side.
2026-08-02 18:20:57 -04:00
Gmer4Lfe f30f3263bd Fix nested php open tag in the AI page build stamp
The build-stamp edit replaced the header block's closing tag instead of
keeping it, opening a second php block inside the first. Deployed broken
because the lint in that commit printed OK unconditionally rather than
gating on php -l.
2026-08-02 18:06:52 -04:00
Gmer4Lfe ca678b1784 Stamp the AI page build and tear down stale copies of its script
The tab bar uses Unraid's localURL, which swaps content by AJAX without
tearing down the previous page's JavaScript, so old copies keep their timers
and their state. That makes "is the browser running what I deployed"
unanswerable from the server, and explains banner polls arriving far faster
than the 30s timer. The page now stamps its build, says plainly when its own
script is not the one running, and stops the previous copy's timers.
2026-08-02 18:06:10 -04:00
Gmer4Lfe ae7555a423 Stop a stuck in-flight flag from silently swallowing every later question
A turn that ended without finish() left busy=true, so send() returned at line
one for every subsequent click — no fetch, no error, and the original
"starting…" still on screen. That is a hang which produces no request and so
no server-side trace of any kind. It now says what happened, and the pending
indicator carries an elapsed counter so stalled and merely slow look different.
2026-08-02 18:03:21 -04:00
Gmer4Lfe e0925b9d38 Make a failed AI send visible instead of hanging
GET reaches the endpoint and POST does not, with nothing in the request log,
no CSRF termination and no PHP error — so it fails in the browser before the
request goes out, and the only symptom was the pending indicator sitting
there. Reads the response as text before parsing so an empty body reports as
rejected-before-execution rather than a JSON error, wraps the synchronous
path, and surfaces script errors into the transcript.
2026-08-02 18:00:53 -04:00
Gmer4Lfe 237156c46f Add config-vs-reality health checks, loaded models, and log evidence
The failures this subsystem actually has are configuration drift, so each
check names the setting to change rather than reporting that retrieval
failed. Notably it catches a conf model tag that is no longer installed, and
an index built by a different embedder than the one configured — vectors
from two models are not comparable, and that failure returns confident
nonsense rather than erroring. Diagnostic questions also get recent log
warnings, attached only then because they cost budget the passages need.
2026-08-02 17:40:43 -04:00
Gmer4Lfe 264ba57cbb Add the AI tab — grounded chat over the documentation index
Token and poll rather than SSE, so the api layer keeps one response
convention and reuses the pattern manual_sync already proved. History is
capped at three turns because the model is only fully offloaded at 16384
context and unbounded history would cross that silently. The tab exists
only while AI_ENABLED is true, rejected server-side and not merely hidden.
2026-08-02 17:32:17 -04:00
Gmer4Lfe e02dc1be15 Keep the monitor page header inside its PHP block
Its first line closed PHP before the header comment started, so the whole
block rendered as text at the top of the tab.
2026-08-02 10:37:34 -04:00
Gmer4Lfe c34224effa Carry the CSRF token on fetch requests and put mutations behind POST
Unraid already enforces CSRF on every POST via auto_prepend, but its
injector is jQuery-only — the plugin's native fetch() calls carried no
token and were being terminated before the endpoint ran, silently,
because csrf_terminate exits with an empty body that r.json() swallows.
2026-08-02 10:28:53 -04:00
Gmer4Lfe ccc6c742ee Add structured headers to the PHP pages layer
Documents each tab's purpose, what it renders, and which endpoints it polls.
Pages that start with markup get the header in a <?php ?> block so it never
reaches the browser.

Also corrects the layer diagram in README-unraid.md: eight of eleven pages hold
no PHP logic and poll api/ for everything — only auth, monitor and scheduler
require an include/ file directly.
2026-08-02 00:51:41 -04:00