Commit Graph

407 Commits

Author SHA1 Message Date
Claude
b88bb879de
chore: add .claude/ to .gitignore
Prevents Claude Code worktree metadata from being tracked.

https://claude.ai/code/session_01JFvpTYgm8GiE4vJ4cJKsFx
2026-03-24 09:38:59 +00:00
Claude
7bd8567564
test: add ChatService unit tests, fix DockerService TS error, add .env.test
- Create chat_service.spec.ts with tests for suggestion parsing (comma/newline
  separated, bullet points, numbered lists, quote stripping), model selection
  (largest model), error handling for all DB-dependent methods, generateTitle
  fallback logic, and message role validation
- Fix TypeScript narrowing error in docker_service.spec.ts container command
  splitting test (null type cast)
- Add .env.test with required environment variables for test suite bootstrap

https://claude.ai/code/session_01JFvpTYgm8GiE4vJ4cJKsFx
2026-03-24 09:36:22 +00:00
Claude
d93b6679b9
test: add unit tests for DockerService and RagService
- Test GPU detection logic with mocked exec calls
- Test service installation guard and race condition prevention
- Test container command splitting with quoted arguments
- Test sanitizeFilename utility function
- Test file type validation and error handling

https://claude.ai/code/session_01JFvpTYgm8GiE4vJ4cJKsFx
2026-03-24 09:30:53 +00:00
Claude
def1a0733f
fix: standardize API error responses, fix parseInt radix, harden Docker service
- Create api_response.ts helper for consistent { success, error/data } format
- Add radix parameter (10) to all parseInt calls across controllers and services
- Fix race condition in DockerService by making in-memory guard atomic
- Fix container command splitting to handle quoted arguments properly
- Stop leaking internal error.message to API responses; log details server-side

https://claude.ai/code/session_01JFvpTYgm8GiE4vJ4cJKsFx
2026-03-24 09:30:49 +00:00
Claude
9ca20a99e5
fix: harden shell scripts with set -euo pipefail and safe sed substitution
- Add set -euo pipefail to install and update scripts for fail-fast behavior
- Escape sed replacement strings to prevent injection via special characters
- Add || true guards for commands expected to fail (tr pipe, read prompts)
- Validate target_tag in update-watcher to prevent unsafe characters in sed
- Properly quote variable assignments to satisfy strict mode

https://claude.ai/code/session_01JFvpTYgm8GiE4vJ4cJKsFx
2026-03-24 09:30:42 +00:00
Claude
6058fd31a0
fix: add input validation constraints for service names, file paths, uploads, and settings keys
- system.ts: Add maxLength(100) and alphanumeric/hyphen/underscore regex to service_name fields
- system.ts: Add maxLength(50) and semver/Docker tag regex to target_version field
- rag.ts: Add maxLength(500) to filePath field
- rag_controller.ts: Add 50MB file upload size limit and validation error handling
- settings_controller.ts: Validate getSetting() key parameter against KV_STORE_SCHEMA at runtime

https://claude.ai/code/session_01JFvpTYgm8GiE4vJ4cJKsFx
2026-03-24 09:30:03 +00:00
Claude
b5f41e4ed5
feat: improve React component performance and accessibility
- Wrap ChatMessageBubble with React.memo to prevent unnecessary re-renders
- Replace window.location.reload() with Inertia router.reload() in apps settings
- Add ARIA attributes to StyledModal (role, aria-modal, aria-labelledby)
- Add aria-label to chat textarea, send button, and suggestion buttons
- Memoize suggestion click handler with useCallback in ChatInterface
- Add role="article" to chat message containers for screen readers

https://claude.ai/code/session_01JFvpTYgm8GiE4vJ4cJKsFx
2026-03-24 09:29:01 +00:00
Claude
912f1780ac
feat: add rate limiting middleware for expensive API endpoints
Add an in-memory sliding window rate limiter as AdonisJS named
middleware. Applied to expensive endpoints to prevent abuse:
- POST /api/system/services/install: 5 req/min
- POST /api/benchmark/run{,/system,/ai}: 3 req/min
- POST /api/rag/upload: 10 req/min
- POST /api/ollama/models (pull): 5 req/min

Returns 429 with Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining
headers. Expired entries are cleaned up periodically.

https://claude.ai/code/session_01JFvpTYgm8GiE4vJ4cJKsFx
2026-03-24 09:28:46 +00:00
Claude
b959196381
refactor: deduplicate benchmark controller run methods into shared helper
Extract common logic from runSystem() and runAI() into a private
_runBenchmark() helper that handles checking for running benchmarks,
dispatching the job, and returning the response.

https://claude.ai/code/session_01JFvpTYgm8GiE4vJ4cJKsFx
2026-03-24 09:28:31 +00:00
Claude
3fa373415b
db: add missing indexes for foreign key columns
Add indexes on chat_messages.session_id (primary query path for loading
messages by session) and installed_resources.resource_type to improve
query performance on foreign key lookups.

https://claude.ai/code/session_01JFvpTYgm8GiE4vJ4cJKsFx
2026-03-24 09:27:47 +00:00
Claude
9de5b5aabb
security: enable CSRF, HSTS, and CSP in shield config
- Enable CSRF protection with XSRF cookie for Inertia.js/React SPA
- Enable HSTS with 180-day max-age and includeSubDomains
- Enable CSP with nonce-based script policy, unsafe-inline for Tailwind
  styles, and restrictive defaults for frames/objects
- Allow map tile sources in img-src for offline map support

https://claude.ai/code/session_01JFvpTYgm8GiE4vJ4cJKsFx
2026-03-24 09:26:46 +00:00
cosmistack-bot
735b9e8ae6 chore(release): 1.30.2 [skip ci] 2026-03-23 19:47:10 +00:00
Chris Sherwood
c409896718 fix(collections): update Full Wikipedia URL to current Kiwix mirror
The 2024-01 all_maxi ZIM was removed from Kiwix mirrors, causing
silent 404 failures for users selecting "Complete Wikipedia (Full)".
Updated to 2026-02 release (115 GB).

Closes #216

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 12:46:26 -07:00
Philip L. Welch
f004c002a7 docs: fix typo in README url 2026-03-20 17:15:56 -07:00
cosmistack-bot
d501d2dc7e chore(release): 1.30.1 [skip ci] 2026-03-20 19:29:55 +00:00
Jake Turner
8e84ece2ef
fix(ui): ref issue in benchmark page 2026-03-20 19:29:13 +00:00
cosmistack-bot
a4de8d05f7 docs(release): finalize v1.30.0 release notes [skip ci] 2026-03-20 18:48:42 +00:00
cosmistack-bot
28df8e6b23 chore(release): 1.30.0 [skip ci] 2026-03-20 18:46:55 +00:00
Jake Turner
baeb96b863 fix(ui): support proper size override of LoadingSpinner 2026-03-20 11:46:10 -07:00
Jake Turner
d645fc161b fix(ui): reduce SSE reconnect churn and polling overhead on navigation 2026-03-20 11:46:10 -07:00
Jake Turner
b8cf1b6127 fix(disk): correct storage display by fixing device matching and dedup mount entries 2026-03-20 11:46:10 -07:00
cosmistack-bot
f5a181b09f chore(release): 1.30.0-rc.2 [skip ci] 2026-03-20 11:46:10 -07:00
Jake Turner
4784cd6e43 docs: update release notes 2026-03-20 11:46:10 -07:00
Jake Turner
467299b231 docs: update port mapping guidance in compose file 2026-03-20 11:46:10 -07:00
Jake Turner
5dfa6d7810 docs: update release notes 2026-03-20 11:46:10 -07:00
Chris Sherwood
571f6bb5a2 fix(GPU): persist GPU type to KV store for reliable passthrough
GPU detection results were only applied at container creation time and
never persisted. If live detection failed transiently (Docker daemon
hiccup, runtime temporarily unavailable), Ollama would silently fall
back to CPU-only mode with no way to recover short of force-reinstall.

Now _detectGPUType() persists successful detections to the KV store
(gpu.type = 'nvidia' | 'amd') and uses the saved value as a fallback
when live detection returns nothing. This ensures GPU config survives
across container recreations regardless of transient detection failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 11:46:10 -07:00
Chris Sherwood
023e3f30af fix(downloads): allow users to dismiss failed downloads
Failed download jobs persist in BullMQ forever with no way to clear
them, leaving stale error notifications in Content Explorer and Easy
Setup. Adds a dismiss button (X) on failed download cards that removes
the job from the queue via a new DELETE endpoint.

- Backend: DELETE /api/downloads/jobs/:jobId endpoint
- Frontend: X button on failed download cards with immediate refresh

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 11:46:10 -07:00
Chris Sherwood
d6c6cb66fa fix(docs): remove internal security audit from public documentation
The security audit report was an internal pre-launch document that
shouldn't be exposed in the user-facing documentation sidebar.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 11:46:10 -07:00
Chris Sherwood
b8d36da9e1 fix(UI): hide 'Start here!' badge after Easy Setup is completed
The KV store returns ui.hasVisitedEasySetup as boolean true, but the
comparison checked against string 'true'. Since true !== 'true', the
badge was always shown even after completing Easy Setup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 11:46:10 -07:00
Chris Sherwood
6b41ebbd45 fix(UI): clear stale update banner after successful update
After an update completes, the page reloads but the KV store still has
updateAvailable=true from the pre-update check. This causes the banner
to show "Current 1.30.0-rc.1 → New 1.30.0-rc.1" until the user
manually clicks Check Again.

Now triggers a version re-check before the post-update reload so the
KV store is updated and the banner reflects the correct state.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 11:46:10 -07:00
cosmistack-bot
85492454a5 chore(release): 1.30.0-rc.1 [skip ci] 2026-03-20 11:46:10 -07:00
Jake Turner
77e83085d6 docs: updated release notes with latest changes 2026-03-20 11:46:10 -07:00
Jake Turner
0ec5334e0d docs: additional comments in management_compose about storage config 2026-03-20 11:46:10 -07:00
Jake Turner
6cb2a0d944 ops: added additional warning about possible overwrites of existing custom installs 2026-03-20 11:46:10 -07:00
Jake Turner
6934e8b4d1 ops: added a check for docker-compose version in Nomad utility scripts 2026-03-20 11:46:10 -07:00
Jake Turner
bb0c4d19d8 docs: add note about Dozzle optionality 2026-03-20 11:46:10 -07:00
Jake Turner
1c179efde2 docs: improve docs for advanced install 2026-03-20 11:46:10 -07:00
Jake Turner
5dc48477f6 fix(Docker): ensure fresh GPU detection when Ollama ctr updated 2026-03-20 11:46:10 -07:00
Chris Sherwood
b0b8f07661 fix: improve download reliability with stall detection, failure visibility, and Wikipedia status tracking
Three bugs caused downloads to hang, disappear, or leave stuck spinners:
1. Wikipedia downloads that failed never updated the DB status from 'downloading',
   leaving the spinner stuck forever. Now the worker's failed handler marks them as failed.
2. No stall detection on streaming downloads - if data stopped flowing mid-download,
   the job hung indefinitely. Added a 5-minute stall timer that triggers retry.
3. Failed jobs were invisible to users since only waiting/active/delayed states were
   queried. Now failed jobs appear with error indicators in the download list.

Closes #364, closes #216

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 11:46:10 -07:00
Jake Turner
5e290119ab fix(maps): remove DC from South Atlantic until generated 2026-03-20 11:46:10 -07:00
Chris Sherwood
ab5a7cb178 fix(maps): split combined Indiana/Michigan entry into separate states
The East North Central region had a single "indianamichigan" entry pointing
to a pmtiles file that doesn't exist. Indiana and Michigan are separate
files in the maps repo.

Closes #350

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 11:46:10 -07:00
Chris Sherwood
5b990b7323 fix(collections): update stale React devdocs ZIM URL
Kiwix skipped the January 2026 build of devdocs_en_react — the
2026-01 URL returns 404. Updated to 2026-02 which exists.

Closes #269

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 11:46:10 -07:00
Jake Turner
92ce7400e7 feat: make Nomad fully composable 2026-03-20 11:46:10 -07:00
Andrew Barnes
d53ccd2dc8 fix: prefer real block devices over tmpfs for storage display
The disk-collector could produce an empty fsSize array when
/host/proc/1/mounts is unreadable, causing the admin UI to fall back
to systeminformation's fsSize which includes tmpfs mounts. This led to
the storage display showing ~1.5 GB (tmpfs /run) instead of the actual
storage capacity.

Two changes:
- disk-collector: fall back to df on /storage when host mount table
  yields no real filesystems, since /storage is always bind-mounted
  from the host and reflects the actual backing device.
- easy-setup UI: when falling back to systeminformation fsSize, filter
  for /dev/ block devices and prefer the largest one instead of blindly
  taking the first entry.

Fixes #373
2026-03-20 11:46:10 -07:00
Jake Turner
c0b1980bbc build: change compose to use prebuilt sidecar-updater image 2026-03-20 11:46:10 -07:00
Jake Turner
9b74c71f29 fix(UI): minor styling fixes for Night Ops 2026-03-20 11:46:10 -07:00
orbisai0security
9802dd7c70 fix: upgrade systeminformation to 5.31.0 (CVE-2026-26318)
systeminformation: systeminformation: Arbitrary code execution via unsanitized `locate` output
Resolves CVE-2026-26318
2026-03-20 11:46:10 -07:00
dependabot[bot]
138ad84286 build(deps): bump fast-xml-parser from 5.3.8 to 5.5.6 in /admin
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 5.3.8 to 5.5.6.
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5.3.8...v5.5.6)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-version: 5.5.6
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-20 11:46:10 -07:00
Chris Sherwood
34076b107b fix: prevent embedding retry storm when Ollama is not installed
When Ollama isn't installed, every ZIM download dispatches embedding jobs
that fail and retry 30x with 60s backoff. With many ZIM files downloading
in parallel, this exhausts Redis connections with EPIPE/ECONNRESET errors.

Two changes:
1. Don't dispatch embedding jobs when Ollama isn't installed (belt)
2. Use BullMQ UnrecoverableError for "not installed" so jobs fail
   immediately without retrying (suspenders)

Closes #351

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 11:46:10 -07:00
dependabot[bot]
5e0fba29ca build(deps): bump undici in /admin
Bumps  and [undici](https://github.com/nodejs/undici). These dependencies needed to be updated together.

Updates `undici` from 6.23.0 to 6.24.1
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v6.23.0...v6.24.1)

Updates `undici` from 7.20.0 to 7.24.3
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v6.23.0...v6.24.1)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 6.24.1
  dependency-type: indirect
- dependency-name: undici
  dependency-version: 7.24.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-20 11:46:10 -07:00