100 Commits
Author SHA1 Message Date
jakeaturner 8dcb8ea2f0 docs(release): finalize v1.35.2 release notes [skip ci] 2026-11-24 22:51:37 +00:00
jakeaturnerandClaude Opus 5.5 7fa2746005 docs: update release notes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 22:42:20 +00:00
jakeaturner ecaa8c93b0 fix(Collections): tighten ZIM matching logic when handling previous_ids 2026-11-17 22:27:51 -08:00
jakeaturner 1a5cb3b6b9 ci(collections): only touch the tracking issue on runs against main
workflow_dispatch can target any branch, so a manual run on a fix branch
could close the main tracking issue while main was still broken, or open
one for a URL main never had. Both issue steps now gated on refs/heads/main.
2026-11-17 14:45:01 -08:00
jakeaturner e1a814a3c1 fix(apps): bump default project-nomad-translate version to 0.1.2 2026-11-17 22:18:36 +00:00
jakeaturner 2ef44ce482 fix(maps): close CORS traversal and error-page leaks
Normalize and decode the request path before matching map asset
prefixes so encoded ..%2F can no longer reach other public static
files with the CORS header. Drop Access-Control-Allow-Origin on
4xx/5xx responses so error pages, which include the app version and
assistant name, stay same-origin.
2026-11-17 22:18:36 +00:00
jakeaturner d1e17fa17b fix(downloads): migration to reset Wikipedia selections damaged by #1482
Installs damaged by #1482 still have the Wikipedia selection pointing at
another wikipedia_en_* corpus such as the Medicine tier ZIM. On those
installs, choosing "None" deletes Medicine, and the boot reconcile skips
Medicine's InstalledResource row, so its tier won't show as installed.

This one-off migration resets any selection whose filename (or pending
URL) isn't a Wikipedia selector option. It leaves the file on disk, so the
next reconcile restores the Medicine row. It reads the option list from the
cached wikipedia manifest and falls back to the current option filenames.
2026-11-17 22:18:35 +00:00
jakeaturner b8b6e8995e docs: update release notes 2026-11-17 22:18:34 +00:00
jakeaturner 0e4f0615fa fix(rag): fail a ZIM batch only when its resume point is past the end
The resume check failed any batch that picked up from its saved
position, found no articles, and still had startOffset below
articleCount. Our article count and libzim's articleCount do not
match. Older ZIMs count redirects in articleCount, and some ZIMs
come out the other way (#903). So a file whose article count is an
exact multiple of the batch size failed on its last, empty batch.
It retried 30 times and never got marked indexed.

An empty batch at a valid saved position is a normal end of file.
The real broken case is a saved position past the end of the entry
range, which means the file changed between batches. openZimBatchRange
now throws UnrecoverableError for that, and processAndEmbedFile lets
UnrecoverableError through instead of turning it into
{ success: false }, so BullMQ does not retry.

Replace the test that copied the extraction loop with one that runs
ZIMExtractionService on the bundled 100-article ZIM. It checks that
chained batches return every article exactly once, and that a job
queued by an older build (no saved position) lands on the same next
position as the new path. Moving the dirent counter above the batch
break fails it.
2026-11-17 22:18:34 +00:00
jakeaturner c922d98c01 fix(gpu): stop Intel iGPUs passing as discrete cards and skip the verdict for external Ollama
Closes two gaps in the Intel "unsupported" fallback in #1404, the first
an existing bug and the other a hardening of the #1404 work:

- isDiscreteGpuVendor matched /ati/ anywhere in the vendor string, and
  "Intel Corporation" contains "ati". An Intel iGPU with a small lspci
  VRAM reading was flagged as a discrete card with bogus VRAM. That set
  lspciNeedsProbe, so the box stayed at no_gpu and wouldn't reach the
  unsupported branch. It now uses classifyGpuVendor, which keeps all
  vendor matching in gpu_model.ts.

- An Intel host using ai.remoteOllamaUrl, or a custom local Ollama image,
  can run inference on a GPU this host's lspci cannot see. A reachable
  external Ollama (getExternalOllamaGpuInfo) now vetoes the unsupported
  verdict, so those setups don't show a false "runs on CPU" banner.
2026-11-17 22:18:31 +00:00
jakeaturner 0a5f87abc4 fix(apps): migration for broken Ollama ui_location
Builds on #1584 work from @FuryNocturn and runs a one-off migration to repair the broken
`ui_location = '11434'` that NOMAD would save for the Ollama app row before the fix
from #1584
2026-11-17 22:18:30 +00:00
jakeaturner a6f18b05ab fix(downloads): mark terminal failures correctly when retries are skipped
The worker's failed handler decided a failure was final by comparing
attemptsMade to opts.attempts. An UnrecoverableError (disk full, gated
auth) skips BullMQ's retries and fails on attempt 1 of 10, so that check
never fired. A Wikipedia download that hit a full disk stayed at
"downloading", and failed auto-updates never advanced their backoff.

Use job.finishedOn instead. BullMQ sets it only when a job moves to the
failed set for good.

User cancels also throw UnrecoverableError, so they now count as
terminal. Exclude them from the auto-update backoff with a shared
RunDownloadJob.CANCELLED_PREFIX, so a cancel can't self-disable an
update.
2026-11-17 22:18:29 +00:00
jakeaturner ca277652ba fix(downloads): recognize selected Wikipedia ZIM even if option list can't be loaded 2026-11-17 22:18:28 +00:00
jakeaturner 0acc024ff1 fix(maps): kill abandoned size estimates instead of letting them run to timeout
The country picker starts a new size estimate on each selection or zoom
change. The browser ignored stale replies, but the server kept pmtiles
dry runs going, which stream range requests from the remote
archive. With the limit now 10 minutes, a few clicks left several
processes running for minutes after the user stopped waiting.

- The controller aborts the dry run when the connection drops before it
  answers. It listens on the ServerResponse, since IncomingMessage 'close'
  fires once the body is read.
- runDryRun passes the signal to execFile and throws
  MapPreflightAbortedError on abort, so it no longer logs 500.
- The picker aborts the request in flight when the selection changes or
  the modal closes.
- Cancel no longer spins for the whole estimate, only while a download is
  being dispatched.

Refs #1258
2026-11-17 22:18:27 +00:00
jakeaturner 20b8cf0c32 docs: update log rotation behavior code comment 2026-11-17 22:18:26 +00:00
jakeaturner fe2f0bcdcb fix(installer): ensure the source guard allows piping 2026-11-17 22:18:26 +00:00
jakeaturner 23aca597f3 docs: note in config/cors.ts that map routes have separate CORS handling 2026-11-17 22:18:25 +00:00
jakeaturner a813c1c9d9 fix(security): pin the 11 Nov 2026 security releases
Expands on #1459 introduced by @cpugenius and 1) bumps the admin
Docker image's Node version to 22.23.5 and 2) makes the Node version
used by the build-admin-on-pr.yml workflow match. Previously, the workflow
was running Node 24, so PR checks were running on one version of Node but
shipping on a different runtime version.
2026-11-17 22:18:23 +00:00
jakeaturner f257d54a29 chore(docs): update release notes 2026-10-05 22:25:22 +00:00
jakeaturnerandGabe Graves a483e15f7d chore(attribution): credit Gabe Graves for the vision attachments work
The vision attachment feature landed in edbfe1a with Gabe Graves as the
commit author, but under the legacy gabegraves@users.noreply.github.com
address rather than the ID-prefixed noreply GitHub associates with the
account. GitHub therefore did not count it toward his contributions.

This empty commit carries the correct trailer so the credit is restored
once dev fast-forwards onto main. No files change.

Original implementation: #1178. Integration and rebase: #1288.

Co-authored-by: Gabe Graves <37971265+gabegraves@users.noreply.github.com>
2026-09-30 03:59:53 +00:00
jakeaturner ddb0235887 docs: update release notes 2026-09-29 15:54:41 -07:00
jakeaturner c65198c7c3 fix(kb): keep chunk active flags in sync with toggles during embedding
embedAndStoreText read the file's active flag, then upserted its
chunks. A toggle landing between those two steps set its payload
before the new points existed, so the new points kept the old value.
Retrieval and the KB panel then disagreed.

Both toggles (setFileActive and setKnowledgeCollectionActive) now write
kb_ingest_state before calling Qdrant setPayload, and restore the rows
they changed if setPayload fails. embedAndStoreText re-reads the flag
after its upsert and sets active on its own point IDs if the flag
changed. Whichever order the two run in, one of them writes the final
value to the new points.

Also coerce the flag to a boolean before stamping it into the payload.
MySQL returns tinyint(1) as 0/1, and a raw 0 got past the search
filter's must_not active == false, so an inactive file that was
re-embedded became searchable again.
2026-09-29 15:54:41 -07:00
jakeaturner 152d1ee198 fix(kb): persist source active toggle when no ingest state row exists
setFileActive updated the Qdrant payload but skipped the DB write when
a source had no kb_ingest_state row. ZIMs hit this during embedding
(markIndexed runs only after the final batch), after a lost row, or on
pre-RFC installs. The API returned success, getStoredFiles still showed
the file as active, and the switch could never turn it back on. All
chunks stayed excluded from retrieval.

When the row is missing, create it the same way the scanner backfills:
indexed if Qdrant has chunks for the source, pending_decision if not.
Then save the flag.

Creating the row does not affect retrieval, since search filters only
on the Qdrant payload. It also leaves failed or partial embeds no worse
off:
- A failed job already leaves a row via markFailed. Only active changes.
- A crashed worker leaves partial chunks and no row. The next scan
  writes the same indexed row through backfill_indexed.
- For an in-flight job, markIndexed/markFailed reuse the row and keep
  active, so later batches stop stamping chunks active: true.
- The UI already treats a null state as indexed, and stall/zero-chunk
  warnings come from Qdrant counts, so Re-embed still appears.

A partial ZIM with no row is still labeled indexed, as before.
markStalled has no callers, so stalls are not tracked in the row.
2026-09-29 15:54:41 -07:00
jakeaturner bc24508795 fix(maps): stop world basemap provisioning from running pmtiles extract twice 2026-09-29 15:54:41 -07:00
jakeaturner ae1eae78e7 fix(kb): stop orphan sweep from purging an empty but present scan root
Boot runs ensureDirectoryExists() on the zim root, so a separate volume
that failed to mount leaves an empty mountpoint behind. The scan walks it
without error and reports it as scanned. One upload in kb_uploads keeps
the overall scan non-empty, so the next manual sync purged the vectors
for every ZIM under that root.

decideOrphans() now decides per scanned root and returns
{ orphans, withheld }. A root keeps its indexed sources when:

- it holds no embeddable files (kiwix-library.xml does not count)
- the purge would remove more than 50% of its indexed sources and at
  least 5 of them, which points to a wrong or stale mount rather than
  hand deletions

scanAndSyncStorage() logs each withheld root and appends a note to the
sync result message, so the user sees a likely unmounted drive instead
of losing hours of embeddings.

Replaces the unit test that asserted the old empty-root purge with
regression coverage for #1378 and both guards.

Closes #1378
2026-09-29 15:54:41 -07:00
jakeaturner a1b899f49a fix(gpu): keep an existing AMD HSA override across reinstall and update
Upgraded AMD iGPU installs sometimes carry a working
HSA_OVERRIDE_GFX_VERSION on nomad_ollama, set by hand or by an older
install path, but have no ai.amdHsaOverride KV and no .nomad-amd-gfx
marker. The CPU-fallback banner offered Fix: Reinstall, and the
reinstall rebuilt the container without the override, so a 780M
(gfx1103) stayed on CPU.

- Add pickAmdHsaOverride to utils/amd_hsa_override.ts with the
  resolution order KV, marker, existing container override, none.
  A marker still wins even when it maps to none. KV "none" still
  disables the override.
- forceReinstall inspects nomad_ollama before removing it and saves a
  container-only override to ai.amdHsaOverride. Saving it keeps the
  value through a reinstall that fails after the removal and shows it
  in the Set GFX Override modal.
- The update path passes the old container env to the resolver, so a
  routine Update keeps the override too.
- The GPU health check passes the container env, so
  diffAmdOllamaConfig compares against what a reinstall would build.
  On the reported box, the only drift is OLLAMA_IGPU_ENABLE=1.
- diagnoseAmdCpuFallback suggests the container's current override
  when one is set. With an override applied, Ollama logs the coerced
  target (gfx1100), which maps to none and would suggest removing a
  working value.
- Remove the unused _mapGfxToHsaOverride wrapper.

parseAmdGfxTargetFromLogs is unchanged. It still matches only
gpu_type=. The "dropping integrated GPU ... compute=gfx..." line needs
a full sample from an affected box before we can write a regex for it.
We'll address in a later PR.
2026-09-29 15:54:41 -07:00
jakeaturner ac437f8429 fix(gpu): detect Ollama CPU fallback on AMD and offer the right fix
GpuPassthroughRemediationProvider returned early unless the NVIDIA
runtime was registered with Docker. AMD doesn't register one, so the
log-based CPU-fallback detection added in v1.35.0-rc.1 never ran on
AMD boxes. On a Phoenix1 iGPU running ollama:rocm with /dev/kfd and
/dev/dri passed through, Ollama logged library=cpu while gpuHealth
reported status "ok".

The gpuHealth side had its own bug. hasNvidiaRuntime and
hasRocmRuntime were set only inside the lspci probe branch. When lspci
returned a plausible controller, the else branch reported "ok" without
probing and left both flags false. A blind reinstall would not have
helped either: gfx1103 needs HSA_OVERRIDE_GFX_VERSION=11.0.0, and
without the gfx marker or ai.amdHsaOverride a reinstall rebuilds the
same CPU-bound container.

- Add resolveExpectedGpuVendor(). It reads the nomad_ollama container
  config first (nvidia DeviceRequest, ROCm image tag, /dev/kfd), then
  the nvidia runtime, then the AMD GPU type when no container exists.
  /dev/dri alone is not treated as AMD. A CPU container on an AMD box
  is trusted as deliberate (#1232 fallback, acceleration disabled).
- Gate the provider on the expected vendor. NVIDIA auto-reinstall is
  unchanged but now skips when the container requests a GPU with no
  runtime registered. AMD is detect-only: the provider logs whether a
  reinstall would change the container and never reinstalls itself.
- In gpuHealth, set the runtime flags up front and let Ollama's
  startup log decide health whenever a GPU is expected, whatever lspci
  returned. A CPU-only log now reports passthrough_failed and skips
  the nvidia-smi exec. lspci stays the display source when clean.
- Parse the first GPU "inference compute" line instead of the last
  line, which could be the CPU fallback device, and recognize Vulkan.
  Move the startup-log reader into ollama_compute so both callers
  share it.
- Report amdReinstallWouldChange, amdGfxTarget, currentHsaOverride and
  suggestedHsaOverride on AMD passthrough_failed. The gfx target is
  parsed from Ollama's "amdgpu is not supported" line (best-effort).
- Add GpuPassthroughAlert, shared by Settings > System and Settings >
  Models. When a reinstall would rebuild the same AMD container, it
  offers "Fix: Set GFX Override" instead of a reinstall. The dialog
  saves ai.amdHsaOverride and then reinstalls.
- Expose ai.amdHsaOverride through the settings API. The value lands
  in the container env, so only x.y.z, "none" or empty is accepted.
- Silence the HSA override resolver's logging on the gpuHealth poll.

The #1325 case where no GPU runtime is expected and lspci reports a
controller still returns "ok" unprobed.

Fixes #1344
Refs #1325, #1232
2026-09-29 15:54:41 -07:00
jakeaturner a915cdcfc9 feat(AI): add opt-in relevance check for off-topic retrieval
The post-rerank relevance floor rejects noise but passes coherent
off-topic questions, and it gets worse as the library grows. Adding
Gutenberg prose, the Python tutorial and MDN pages to the eval corpus
took the off-topic leak rate from 22% to 67% at the 0.62 floor.

Score cutoff does not fix it. The weakest correct top hit scores 0.666
while "write me a haiku about autumn leaves" pulls Walden at 0.705.
A cosine floor and a top-vs-median contrast test both cost recall
faster than they cut leaks.

- Add rag.relevanceCheck (default off). After the floor, the tasks
  model, or the chat model when none is set, gives one grammar-constrained
  on_topic verdict for the whole retrieved set. Off topic means no
  context and no citations. Any failure keeps the chunks unjudged.
- Add a Settings > Models toggle recommending an 8B+ tasks model.
  On llama3:8b the check cuts off-topic leaks from 67% to 6% for about
  5 points of core recall@5 and ~0.6s per turn. On 3B models it rejects
  most valid questions, which is why it is opt-in.
- Add 6 distractor documents and an off_topic suite (18 unanswerable
  questions, 7 distractor controls) to the eval corpus.
- Report per-tag leak rates and leaked cases with top scores in
  eval:retrieval. Add --judge-model to measure the check and --dump to
  export pre-floor candidate pools for offline gate simulation.
- Pin the check off in eval:generation so a local setting cannot move
  scores.
- Record the distractor sweep on RAG_MIN_FINAL_SCORE. The 0.62 default
  stays: 0.65 halves leaks at no measured recall cost but leaves only
  0.016 of margin.

The corpus fingerprint changes to b4ebe5dce8699f5d. Retrieval reports
from before this commit are not comparable, and a new baseline is
committed.

Refs #1341
2026-09-29 15:54:41 -07:00
jakeaturner a013eb6394 fix(chat): stop capping answers at 1024 tokens and surface truncation
planPrompt() returned the response reserve as num_predict, and the
reserve was clamped by MAX_RESPONSE_RESERVE = 1024. Chat answers
stopped at 1024 output tokens regardless of window size, often
mid-sentence, and the normalized stream chunks dropped Ollama's
done_reason, so neither the UI nor API clients could discern between
a cut-off answer and a finished one.

- Decouple the generation cap from the reserve. num_predict is now the
  space left in the window after the prompt, less a 5% (min 64 token)
  margin for estimator error, with the reserve as its floor. Raise
  MAX_RESPONSE_RESERVE to 8192 so it only bounds prompt hold-back.
- Carry done_reason through all four OllamaService chat paths. Native
  forwards Ollama's done_reason; compat maps OpenAI's finish_reason.
- Log length-limited stops in OllamaController with num_predict,
  num_ctx and tokens generated.
- Show a truncation notice on cut-off answers, with a Continue button
  on the latest one that sends a normal follow-up turn.

Generation evals before and after this change are not length
comparable.

Closes #1342
2026-09-29 15:54:41 -07:00
jakeaturner 5bc47a4aff fix(drug-reference): backfill the missing dataset install row on boot
On 1.34.0 every FDA ingest finished with its labels loaded but lost the
installed_resources 'dataset' row, because resource_type was still
enum('zim','map'). The enum migration in #1243 fixes new writes but can't recreate
the lost row. Re-selecting the tier doesn't fix it either, because ZimService
skips a dataset that already has rows. So Medicine never resolved its
Standard tier.

- Add DrugInstallRowProvider. On each boot it backfills the row when an
  ingest has finished (rows present, export date set, no download
  marker, no drug job running) and no row exists.
- Put the decision in decideDrugRowReconcile() so it has unit tests.
- Add DrugReferenceService.recordInstalledRow() as the one writer used
  by the ingest job, the provider, and ZimService.
- ZimService now writes the row when a Medicine tier re-select finds a
  finished ingest with no row.

Manual ingests and reset-and-reingest runs, which dispatch without
resourceMeta, also get the row on the next boot.
2026-09-29 15:54:41 -07:00
jakeaturner 27be71b46e feat(AI): give chat a sampler instead of the backend's defaults
Chat sent num_ctx, num_predict and nothing else, so every turn decoded at
whatever the backend picked: temperature 0.8, top_p 0.9, no min_p. On a
heavily quantized 1-3B model that is the wandering, repetitive output people
read as "the local model is bad".

Adds `ai.responseStyle` with four profiles. min_p is the lever, not
temperature: it floors relative to the top token, so it truncates hard on a
confident distribution and barely at all on a flat one, which is where small
models start to wander. top_p stays at 1.0 rather than stacked on top of it.
repeat_penalty moves with the style, because a grounded answer legitimately
repeats a part number inside the 64-token window: `focused` relaxes it to
1.05, `creative` tightens it to 1.15.

`auto` is the only style that defers to the model. Plenty of library models
ship author-tuned samplers (qwen3 sets 0.6/0.95/20), so those win key by key
and NOMAD fills only the gap, which in practice is min_p. A style the user
picked by name overrides them, or it would silently do nothing on half
their models.

The compat transport drops min_p, so a profile carries a separate compatTopP.
Passing top_p 1.0 to a backend with no min_p behind it would sample the raw
distribution, which is worse than the 0.9 it replaced.

Resolved in the controller, so the grammar-constrained task calls keep their
temperature 0. An explicit temperature still outranks a profile's, which is
what keeps the eval harness deterministic.

`eval:generation --style` is new and load-bearing: temperature 0 makes min_p,
top_p and top_k inert, so a default run cannot see this change at all.
`--style=off` sends no samplers and no temperature, and is the control.

Verified against Ollama 0.32.9, min_p accepted. 22 unit tests.
2026-09-29 15:54:41 -07:00
jakeaturner a1b39cdcf2 fix(zim): extract Kiwix catalog URL into system-wide constant 2026-09-29 15:54:41 -07:00
jakeaturner e468cf363a fix(seeder): derive ui_location from the merged config, not the live row 2026-09-29 15:54:41 -07:00
jakeaturner 1d1945dae4 fix(maps): undef func call, flyTo issue, visible column, and silent save failures 2026-09-29 15:54:41 -07:00
jakeaturner ae06a295de feat(AI): let retrieval decline instead of making the prompt paper over it
There was one cutoff, Qdrant's score_threshold at 0.3, and nomic scores
unrelated text well above it, so every question retrieved *something*
(nonEmptyRateOnRefusal 1.0) and rag_context wasted four lines asking a 3B
model to "silently judge" relevance. That is a classification a number
should decide, not a micro model.

Adds `RAG_MIN_FINAL_SCORE`, a floor on the post-rerank score, applied before
source diversity. The floor judges relevance, the 0.85^n penalty judges
redundancy. Nothing clears it and nothing is injected. `score_threshold` stays
at 0.3 as the candidate net. Exposed as `rag.minRelevance` with a module-
scoped TTL cache invalidated from `updateSetting`.

The floor is calibrated and the harness was describing the wrong number:
aggregate() bucketed semanticScore, so its percentiles measured raw cosine
while the new knob filters the reranked score. Both axes now, and the gap
matters: recall falls at 0.60 on the semantic axis, 0.66 on the final one.

  floor  recall@5  precision@5  emptyOnAnswerable  nonEmptyOnRefusal
  0.00     0.991      0.221            0%               100%
  0.62     0.991      0.524            0%                60%
  0.66     0.991      0.695            0%                60%
  0.67     0.972      0.704            1%                60%

Default 0.62, not the last-lossless 0.66: the refusal win is complete at
0.62 and 28 documents is a thin basis for spending margin. 0.60 is the
honest floor. Three of five refusal goldens are near-corpus by
construction, where declining is the generation tier's job.

Both eval tiers pin the floor to the constant and ignore the setting, for
the same reason the harness never sets skipRetrieval.

4 metrics improved against baseline, no regressions.
2026-09-29 15:54:41 -07:00
jakeaturner 06941e71c5 fix(AI): tell a broken grammar apart from a backend that never had one 2026-09-29 15:54:41 -07:00
jakeaturner 5e9bd5a6ca feat(AI): constrain the structured task calls instead of asking nicely
Ollama's format parameter turns a formatting request into a decoder
constraint, and NOMAD's three ancillary calls — chat title, suggestion
chips, RAG query rewrite — were the ones paying for not having it.
The rewrite is particularly important: whatever it returned got embedded
and sent to Qdrant, so a malformed response degraded retrieval for the
rest of the conversation.

Three explicit design choices made:
- Native-only. The compat path sends nothing new and keeps its string
parsing, so a non-Ollama backend that rejects response_format can't
take out title generation entirely.
- parseStructured returning null is the control flow. It's how each
caller falls back to the parser it already had, which is why it's written
to be total and never throw.
- {queries: []} not {query: ""} for the rewrite (tee-ing up future
improvements)
2026-09-29 15:54:41 -07:00
jakeaturner 3eaddfe6bf fix(UI): remove deprecated prop from type dec 2026-09-29 15:54:41 -07:00
jakeaturner b3e695f4bc fix(AI): removes long-dead default rewrite model warning 2026-09-29 15:54:41 -07:00
jakeaturner fbeb3cf7ae fix(zim): extract Kiwix catalog URL into system-wide constant 2026-09-02 09:40:38 -07:00
jakeaturner 195a0a99fa docs: update release notes 2026-08-04 03:40:02 +00:00
jakeaturner 9e173ce3d9 docs: update release notes 2026-08-04 03:39:59 +00:00
jakeaturner 67a91ed5f6 docs: update release notes 2026-08-04 03:39:54 +00:00
jakeaturner 7fc5132e9e fix(UI): add API reference to Settings sidebar 2026-08-04 03:38:40 +00:00
jakeaturner 678bb17fbd chore(deps): bump axios and systeminformation in /admin 2026-08-04 03:38:40 +00:00
jakeaturner f6c626650f docs: update release notes 2026-08-04 03:38:37 +00:00
jakeaturner a1570023ac docs: update release notes 2026-08-04 03:38:34 +00:00
jakeaturner abc5730667 fix(KVStore): missing apps.homebox key 2026-08-04 03:38:32 +00:00
jakeaturner b005a671c6 fix(Benchmark): various typescript errors 2026-08-04 03:38:32 +00:00
jakeaturner ee1b6a594e chore(deps): bump tar, vite, and dockerode in admin 2026-08-04 03:37:39 +00:00
jakeaturner 81667eb45b chore(collections): add creator-packs.json to main 2026-07-24 03:54:14 +00:00
jakeaturner c794d5e4b0 Revert "chore(release): 1.33.0 [skip ci]"
This reverts commit d8cca183f9.
2026-06-23 17:49:54 +00:00
jakeaturner 587600ba78 Revert "docs(release): finalize v1.33.0 release notes [skip ci]"
This reverts commit c9a86790de.
2026-06-23 17:49:36 +00:00
jakeaturner e82a2934c7 Revert "chore(release): 1.33.1 [skip ci]"
This reverts commit 0ee5dda534.
2026-06-23 17:49:17 +00:00
jakeaturner f4af81ef02 fix: lazy-connect + retry for ioredis to avoid blocked startup 2026-06-23 17:40:10 +00:00
jakeaturner 76ce725340 chore(release): set version to 1.33.0-rc.1 2026-06-23 04:47:13 +00:00
jakeaturner 9609edc281 chore(docs): update release notes 2026-06-23 04:47:12 +00:00
jakeaturner f0142b67f8 chore(docs): update release notes 2026-06-23 04:47:11 +00:00
jakeaturner 4a795df793 feat: configurable internet test url override in new Advanced Settings page 2026-06-23 04:47:10 +00:00
jakeaturner fad9e30ddc fix(zim): stabilize uploader state to avoid cancel on tab refocus
Also improves surfacing of upload error messages
2026-06-23 04:47:09 +00:00
jakeaturner 1b040c8b9a fix: pin default meshcore web image 2026-06-23 04:47:07 +00:00
jakeaturner 475781ffa2 build: ensure openssl installed in admin container 2026-06-23 04:47:06 +00:00
jakeaturner 61ef8f3697 chore: force bump main version 2026-06-23 04:47:04 +00:00
jakeaturner 5eb208fb50 docs: update release notes 2026-06-23 04:47:03 +00:00
jakeaturner 37ad684fbd fix(bullmq): bump to 5.77.6 and update set calls w new args shape 2026-06-23 04:47:03 +00:00
jakeaturner d4972445d9 chore(deps): bump autoprefixer 2026-06-23 04:47:02 +00:00
jakeaturner b6a08058e8 chore(deps): bump react and react-dom 2026-06-23 04:47:02 +00:00
jakeaturner 6a2d4c2bf6 feat(content): opt-in automatic updates for installed ZIM & map content 2026-06-23 04:47:01 +00:00
jakeaturner e5565d1e95 refactor(supply-depot): extract version and subtitle helpers instead of IIFE for readability 2026-06-23 04:47:00 +00:00
jakeaturner 026ab6df8f feat(supply-depot): add custom launch URLs for apps
Let users override an app's "Open" link with a reverse-proxy or
local-DNS address (e.g. https://jellyfin.myhomelab.net). Falls back to
the default host+port when unset. Metadata-only — no container changes.
2026-06-23 04:46:56 +00:00
jakeaturner dfc284c34d docs: fix out of place JSDoc comment 2026-06-23 04:46:53 +00:00
jakeaturner cf8db6218d feat(supply-depot): opt-in automatic updates for installed apps 2026-06-23 04:46:52 +00:00
jakeaturner 02d985db5e feat(system): add opt-in automatic updates for the core NOMAD app
Adds a self-update path for the NOMAD admin/core image that runs without a
human in the loop, gated by layered safety checks. Recreation remains the
sidecar's job; this only decides *whether* to update now and requests it.

An hourly job (AutoUpdateJob) evaluates a side-effect-free decision pipeline
(AutoUpdateService.evaluate):
 - opt-in: disabled by default
 - in a user-configured local-time window (handles midnight wrap)
 - an eligible release: same major (major bumps stay manual), strictly newer,
   past a configurable cool-off, GA only (no drafts/prereleases), strict semver
 - pre-flight: sidecar present, no in-flight system update / downloads / app
   installs, and sufficient host disk (estimated from the registry manifest)
When all pass, it drives SystemUpdateService.requestUpdate() with a vetted tag.

Failure backoff auto-disables after 3 genuine update-request failures; transient
release-lookup errors are skips (offline-first appliances are routinely without
connectivity). Re-enabling clears the backoff state.

Settings UI exposes the toggle, window, and cool-off, with live status (eligible
target, in/out of window, last result/error). A `node ace auto-update:dry-run`
command exercises the full pipeline — and a deterministic --scenarios suite the
pure decision logic — without ever triggering an update.

New KVStore keys under autoUpdate.* hold config + last-run state.
2026-06-23 04:46:51 +00:00
jakeaturner 057fb693f6 fix(storage): match default prefix too when relocating child-app binds
_applyHostStorageRoot only rewrote binds carrying the current
NOMAD_STORAGE_PATH and short-circuited when env == resolved root. That
left user-modified/custom apps — whose binds freeze the default prefix at
edit time — mounting an empty dir on the documented "set NOMAD_STORAGE_PATH
+ relocate the volume" path (#938).

- Match either the env value or the hardcoded default prefix; drop the
  root == seededRoot no-op, excluding root from the candidates instead so
  rewrites stay idempotent.
- Add ADMIN_STORAGE_DEST / DEFAULT_HOST_STORAGE_ROOT constants; replace the
  cwd-derived storage dest so admin-mount lookup can't silently break.
- Comment why a transient inspect failure is deliberately not cached.
2026-06-23 04:46:49 +00:00
jakeaturner b2bea191a8 fix: minor type guarding fixes after axios bump 2026-06-23 04:46:48 +00:00
jakeaturner 555ffa8790 fix(supply-depot): reintroduce app update UI 2026-06-23 04:46:48 +00:00
Jake Turner be434d755a feat: supply depot 2026-06-23 04:46:45 +00:00
jakeaturner 7943ae5d1f chore(deps): bump axios to 1.17.0 in admin 2026-06-23 04:46:44 +00:00
jakeaturner b8961d27dd fix(rag): improve context-reliance hedging and use heading metadata at query time
Users often saw the assistant disclaim ("Sorry, I couldn't find specific
context regarding X, but here's a general answer...") even when material
that directly answered the query was embedded. Two compounding causes,
both on the read/generation side:

1. The rag_context system prompt explicitly authorized the hedge: it told
   the model to fall back to general knowledge and "acknowledge the
   limitations," and mandated "According to the information available..."
   citations that pushed small models into meta-commentary preambles.
   Rewrote it to treat the retrieved context as the primary, authoritative
   source, lead with the answer, fall back to general knowledge *silently*,
   and never emit "couldn't find specific context" phrasing, while still allowing
   the model itself to make some "sanity-check" decisions if the retrieved context
   seems wildly incorrect or unrelated to the user's query.

2. The injected context labeled each block with a raw relevance score
   (e.g. "Relevance: 42.3%"). nomic-embed cosine scores for genuinely
   relevant passages sit ~0.4-0.6, so the number primed the model to
   distrust correct context. Dropped the model-visible score (it stays in
   the logs) and replaced it with a neutral source-title label.

Also added a conservative, score-scaled heading boost in rerankResults:
when query keywords match a chunk's section/article title (ZIM metadata we
already fetch), nudge its rank. Same diminishing-returns shape as the
existing boosts and gated behind the existing semantic-quality threshold,
so it can't promote a weak match.

Scope note: this removes the visible hedge and improves ranking of
already-retrieved chunks. It does NOT fix retrieval recall — diluted
1500-token chunks that never reach dense search's top-k are unaffected.
That's a follow-up (smaller chunks + BM25/RRF hybrid).
2026-06-23 04:46:43 +00:00
Jake Turner 17630c048f docs: update release notes 2026-06-23 04:46:43 +00:00
jakeaturner e26ce4f1f6 docs: update release notes 2026-05-27 15:32:28 -07:00
jakeaturner 8d2bf785e1 chore(deps): bump various deps 2026-05-27 15:32:28 -07:00
jakeaturner d2dd8b4f9e docs: update release notes 2026-05-20 10:16:00 -07:00
jakeaturner 95bd05ed78 chore(deps): pin ipaddr.js version 2026-05-20 10:16:00 -07:00
jakeaturner 736c9bd672 fix(security): canonicalize hostnames to block IPv4-mapped IPv6 IMDS bypass
Replace literal string matching with ipaddr.js parsing
so equivalent encodings of 169.254.169.254
(::ffff:169.254.169.254, ::ffff:a9fe:a9fe,fully-expanded forms)
and fd00:ec2::254 are all rejected.
2026-05-20 10:16:00 -07:00
jakeaturner b3dac9b324 fix(security): match IPv6 SSRF patterns against unbracketed hostnames 2026-05-20 10:16:00 -07:00
jakeaturner 989a401f28 fix(AI): improve remote Ollama url validation to prevent SSRF vulnerability 2026-05-20 10:16:00 -07:00
jakeaturner a9c48fc098 refactor(AI): single source of truth for embedding model name
Lift the hardcoded 'nomic-embed-text:v1.5' string out of both
RagService and OllamaService into a shared EMBEDDING_MODEL_NAME
constant in constants/ollama.ts. The duplicate in OllamaService
existed only to dodge a circular import with RagService; the
constants module has no service imports, so a shared constant
eliminates both the duplication and the drift risk called out
in the inline "keep in sync" comment.
2026-05-20 10:16:00 -07:00
jakeaturner 21ab37cee4 chore(release): 1.32.0-rc.6 [skip ci] 2026-05-20 10:16:00 -07:00
jakeaturner 9356443d73 refactor(KB): typed failure codes for embedSingleFile + accurate HTTP status
Return a discriminated `EmbedSingleFileResult` from `RagService.embedSingleFile`
with `code: 'not_found' | 'inflight' | 'delete_failed' | 'dispatch_failed'` on
failure. `RagController.embedFile` now maps those codes to the correct status
instead of collapsing every failure to 409:

- not_found       → 404
- inflight        → 409
- delete_failed   → 500
- dispatch_failed → 500

The `code` is also included in the JSON body so clients can branch without
string-matching `error`.
2026-05-20 10:16:00 -07:00
Jake Turner 2150189121 chore(release): 1.32.0-rc.5 [skip ci] 2026-05-20 10:16:00 -07:00
Jake Turner 7e768f3d09 fix(KB): guardrail bypass during estimate load + Transition sibling (PR #901 review)
- Disable TierSelectionModal Submit while the embed-estimate query is in
flight, so a fast click can't slip past the guardrail with an undefined
estimate.
- Move KbGuardrailModal out of the outer <Transition> and render it as a
Fragment sibling — Headless UI's Transition expects Transition.Child
descendants, not raw conditional siblings.
2026-05-20 10:16:00 -07:00
Jake Turner 9a684a5e62 fix(KB): silent maybe-later error + redundant prompt-state refetches (PR #899 review)
- KbPolicyPromptBanner: add onError toast to maybeLaterMutation so a
    failed policy save surfaces to the user instead of looking like a
    broken button (banner would otherwise reappear on next chat open
    with no explanation).
  - KbPolicyPromptBanner: set staleTime: Infinity on the prompt-state
    query. For users who already picked a policy (the vast majority),
    the result is effectively immutable per session — the mutations
    invalidate the key when it actually changes.
2026-05-20 10:16:00 -07:00
Jake Turner a0047c1555 fix(KB): surface file-warning compute failures instead of masking as healthy (PR #895 review)
`computeFileWarnings()` previously caught all errors and returned an empty
map, which the frontend rendered as "every file is healthy" — reintroducing
exactly the silent-failure mode this surface exists to expose.

Return `{ ok, warnings }`; flip `ok: false` from the catch. KB modal renders
an inline amber notice under the Stored Files header when `ok === false`,
leaving per-row warning rendering untouched. Transient failures self-heal on
the next 30s poll; no toast spam.
2026-05-20 10:16:00 -07:00
Jake Turner 102998ec96 refactor(KB): move FileWarning to shared types/rag following existing convention 2026-05-20 10:16:00 -07:00
Jake Turner 4d6b140a1f fix(KB): align chunks_per_mb column type with TS contract
Switch kb_ratio_registry.chunks_per_mb from DECIMAL(10,2) to UNSIGNED
INTEGER so the value mysql2 returns matches the `number` type declared
on the model. DECIMAL columns deserialize as strings by default, which
would break `=== 0` checks for video-only ZIMs and silently coerce
through arithmetic in Phase 2 consumers.

All seeds are whole numbers and the heuristic's real-world variance
(~±50%) makes sub-integer precision meaningless.
2026-05-20 10:16:00 -07:00
Jake Turner e3b758f11e fix(AI): add truncation DEBUG log 2026-05-20 10:16:00 -07:00
Jake Turner 501860a23b fix(DockerService): improve volume logic and documentation in forceReinstall 2026-05-20 10:16:00 -07:00
Jake Turner ac4720d4d5 chore(release): 1.32.0-rc.4 [skip ci] 2026-05-20 10:16:00 -07:00
Jake Turner 5694c91e3e chore(release): 1.32.0-rc.3 [skip ci] 2026-05-20 10:16:00 -07:00