157 Commits

Author SHA1 Message Date
github-actions[bot] 6115ea8a44 chore: update marketplace for v0.14.5 2026-06-05 04:39:49 +00:00
lukaszraczylo 93446d1437 Update go.mod and go.sum (#50) v0.14.5 2026-06-05 05:32:20 +01:00
github-actions[bot] 1d1807da9e chore: update marketplace for v0.14.1 2026-06-01 22:48:13 +00:00
lukaszraczylo 7bdb523106 fix(ci): sync ui/package.json.tpl with upgraded frontend deps
GoReleaser (.goreleaser.yaml before-hook) and the Makefile regenerate
ui/package.json from ui/package.json.tpl at build time, then run npm ci.
The deps upgrade updated ui/package.json and the lockfile but not the
template, so the release hook regenerated package.json with the old deps
and npm ci failed against the new lockfile. Sync the template to the
upgraded versions (Vite 8, Tailwind 4, vis-network 10, FontAwesome 7,
TypeScript 6, ...). Verified by replaying the hook locally: regenerate
from the template then npm ci + build both pass.
v0.14.1
2026-06-01 23:41:32 +01:00
lukaszraczylo abd34c9629 fix(ci): resolve @fortawesome/fontawesome-free from public npm registry
The frontend deps bump regenerated ui/package-lock.json with the
@fortawesome/fontawesome-free tarball resolved from npm.fontawesome.com
(per the developer's scoped ~/.npmrc), which requires auth. CI has no
FontAwesome token, so `npm ci` failed with E401.

The free package is also published to the public registry with an
identical tarball/integrity, so pin @fortawesome to registry.npmjs.org
via ui/.npmrc and repoint the lockfile. Verified `npm ci` + build now
succeed with no token.
2026-06-01 16:48:19 +01:00
lukaszraczylo 5fe25e9328 chore: upgrade ui and docs frontend dependencies to latest
ui: Vite 8, vue-tsc 3, TypeScript 6, @vitejs/plugin-vue 6, vis-network 10,
vis-data 8, FontAwesome 7, @types/node 25. docs: Vite 8, plugin-vue 6.
Both migrated to Tailwind CSS v4.

- Tailwind v3 -> v4: @import "tailwindcss" with @theme/@config, switch to
  @tailwindcss/postcss, drop autoprefixer (bundled via Lightning CSS).
- docs: move theme into @theme, delete tailwind.config.js, remove stale
  pnpm-lock.yaml (npm/package-lock.json is authoritative).
- ui: TypeScript 6 removes deprecated tsconfig baseUrl; no code changes
  needed for vis-network 10 / FontAwesome 7.
- Bump CI Node 20 -> 22 (Vite 8 requires Node ^20.19 || >=22.12).

0 npm audit vulnerabilities; ui type-check and both production builds pass.
2026-06-01 16:40:27 +01:00
lukaszraczylo b7b82ce22f fix: bound SQLite WAL growth and prevent worker hangs (#49)
The worker's SQLite WAL could grow unbounded (observed 19MB) and wedge the
DB, hanging Claude Code on every prompt. No checkpoint ever truncated the
WAL (only PASSIVE auto-checkpoint, which cannot reclaim the file), the
connection-scoped pragmas were set via a single Exec so only one pooled
connection received them (e.g. busy_timeout=0 on the rest), and the
maintenance service that would optimize/checkpoint was never wired up.

- Register a sqlite3 ConnectHook driver so all pragmas (busy_timeout,
  journal_mode, synchronous, cache_size, foreign_keys, journal_size_limit)
  apply to every pooled connection; enable safe connection recycling.
- Add Store.Checkpoint (TRUNCATE), checkpoint-on-Close, and a periodic
  size-gated checkpoint loop with configurable interval/threshold.
- Wire up the previously-dead maintenance service; make trigger_maintenance
  actually run DB maintenance instead of only recalculating scores.
- Harden the user-prompt hook to honor its deadline and fail open so a
  slow worker can never stall a prompt.
- Add regression tests for WAL truncation, checkpoint-on-close, and
  per-connection pragmas.
2026-06-01 16:40:27 +01:00
github-actions[bot] f78370a531 chore: update marketplace for v0.13.17 2026-05-31 04:41:38 +00:00
lukaszraczylo 5f89559842 Update go.mod and go.sum (#48) v0.13.17 2026-05-31 05:33:00 +01:00
github-actions[bot] 794eacf02a chore: update marketplace for v0.13.13 2026-05-30 04:32:51 +00:00
lukaszraczylo 6fc752abb1 Update go.mod and go.sum (#47) v0.13.13 2026-05-30 05:24:21 +01:00
github-actions[bot] 9ce29ac7b1 chore: update marketplace for v0.13.9 2026-05-27 04:40:51 +00:00
lukaszraczylo a0d0e856f5 Update go.mod and go.sum (#46) v0.13.9 2026-05-27 05:32:37 +01:00
lukaszraczylo 549fefc675 deslopify docs website 2026-05-26 19:22:47 +01:00
github-actions[bot] c5967c3eaa chore: update marketplace for v0.13.3 2026-05-26 17:56:36 +00:00
lukaszraczylo dbe89f37c8 fix: remove duplicate else block in workflow-prepare.sh v0.13.3 2026-05-26 18:51:02 +01:00
lukaszraczylo 1a4fea5c17 refactor: replace Git LFS with runtime model download from Hugging Face
Remove ~170MB of model files from the repository (LFS + committed).
Models are now downloaded at runtime from Hugging Face on first use
and cached to the OS cache directory with progress reporting and retries.

- Add internal/models/download.go: runtime downloader with retry, progress bar, checksums
- Remove go:embed for ONNX models (keep tokenizers embedded)
- Use file-based ONNX session loading instead of byte-slice
- Add scripts/download-models.sh for dev/CI model setup
- Update Makefile with setup-models target
- Update workflow-prepare.sh to download models in CI
- Set lfs: false in all CI workflows
- SHA256: bge=828e14..., cross-encoder=5d3e70...
2026-05-26 17:53:30 +01:00
github-actions[bot] c8b462aaec chore: update marketplace for v0.12.21 2026-05-26 13:53:19 +00:00
lukaszraczylo a5b18140d3 fix: use build tags for Setpgid (Unix-only) to fix Windows build v0.12.21 2026-05-26 14:46:36 +01:00
lukaszraczylo a81482d06a fix: address 15 additional hang vectors found during deep audit (#45)
MCP server (5 fixes):
- Move semaphore acquisition inside goroutine so main loop stays
  responsive when all slots are taken
- Add 10s write timeout to sendResponse to prevent pipe deadlock
  when Claude Code pauses reading stdout
- Send fallback JSON-RPC error when json.Marshal fails instead of
  silently swallowing the error and leaving caller waiting forever
- Silence unknown notification methods (req.ID == nil) instead of
  sending unsolicited error responses that may desync the host
- Return MCP isError content for tool failures instead of top-level
  JSON-RPC error, matching the MCP specification

Vector/embedding (3 fixes):
- Move EmbedBatchWithContext call before writeMu.Lock in AddDocuments
  so ONNX inference runs outside the write lock
- Replace singleflight.Do with DoChan + ctx select in both
  getOrComputeEmbedding and UnifiedSearch so callers can bail out
  independently when their context expires
- Add activeQueries atomic counter; skip cache warming when user
  queries are in-flight; reduce warming timeout from 5s to 2s

Hooks (4 fixes):
- Cap EnsureWorkerRunning to 15s hard deadline with context; reduce
  StartupTimeout from 30s to 10s; reduce port-in-use retries
- Fix nil dereference panic in user-prompt hook when initResult is
  nil (non-JSON worker response); use comma-ok assertions
- Use package-level hookClient/healthClient with DisableKeepAlives
  to prevent FD leaks in short-lived hook processes
- Set SysProcAttr{Setpgid: true} to detach worker from hook process
  group, preventing kill-cascade from Claude Code

Worker/DB (3 fixes):
- Replace os.Exit(0) in MCP config watcher with context cancellation
  for clean protocol shutdown
- Add 60s context.WithTimeout around ProcessObservation calls in
  processAllSessions to prevent hung CLI subprocesses from blocking
  the queue processor forever
- Set explicit PRAGMA wal_autocheckpoint=1000 and add PASSIVE WAL
  checkpoint to Optimize() to prevent checkpoint stalls

Adds 20+ regression tests across all fix areas.
2026-05-26 14:29:34 +01:00
lukaszraczylo de5796bbe6 test: add regression tests for #45 hang fixes
- MCP server: 4 tests verifying concurrent dispatch, slow-request
  isolation, semaphore limiting, and graceful drain on cancel
- Embedding: 4 tests verifying context-aware mutex cancellation,
  uncontended success, batch cancellation, and cleanup after cancel
- Vector client: 3 tests for acquireRLockWithContext cancel, success,
  and cleanup goroutine correctness
- Worker handlers: 1 test verifying handleSearchByPrompt inherits
  request context cancellation (skips without FTS5)

12 regression tests total covering the four fix areas.
2026-05-26 14:29:34 +01:00
lukaszraczylo 29d57857ff fix: prevent MCP server hanging by adding concurrency, timeouts, and context propagation (#45)
Root cause: synchronous MCP request processing combined with missing
context propagation to the embedding layer caused indefinite hangs when
ONNX inference was slow or the database was contended.

Changes:
- MCP server: dispatch each request in its own goroutine with semaphore
  (cap 10) and WaitGroup for clean shutdown drain
- Embedding: add context-aware mutex acquisition (acquireMutex) so
  callers can bail out instead of blocking forever on a stuck ONNX model
- Vector client: propagate context through getOrComputeEmbedding and
  replace bare RLock() calls with context-aware acquireRLockWithContext
- Worker handlers: add 15s request-scoped timeouts to all search/context
  handlers (handleSearchByPrompt, handleContextInject, handleFileContext,
  handleContextCount, handleGetObservations/Summaries/Prompts)
- Worker HTTP server: set WriteTimeout=60s (was 0); SSE endpoint extends
  deadline per-request via http.ResponseController

Fixes #45
2026-05-26 14:29:34 +01:00
github-actions[bot] 56616d0616 chore: update marketplace for v0.12.11 2026-05-24 04:39:28 +00:00
lukaszraczylo 90803a4885 Update go.mod and go.sum (#44) v0.12.11 2026-05-24 05:30:05 +01:00
github-actions[bot] e2dd736e38 chore: update marketplace for v0.12.3 2026-05-24 02:13:16 +00:00
github-actions[bot] a9677881df chore: update marketplace for v0.12.1 2026-05-24 02:11:59 +00:00
github-actions[bot] 620d538f23 chore: update marketplace for v0.11.118 2026-05-24 02:07:29 +00:00
lukaszraczylo a59b9b1622 chore: remove hand-rolled telemetry pkg; ignore build binaries
- delete internal/telemetry (replaced by oss-telemetry library in prev commit)
- gitignore root /mcp and /worker build artifacts
v0.12.3
2026-05-24 03:03:57 +01:00
lukaszraczylo 00d8871f5e refactor: use oss-telemetry library instead of hand-rolled ping v0.12.1 2026-05-24 03:02:16 +01:00
lukaszraczylo 28b6582dac feat: add OSS analytics ping on MCP server startup v0.11.118 2026-05-24 03:01:15 +01:00
github-actions[bot] dc010fe57d chore: update marketplace for v0.11.113 2026-05-24 01:10:04 +00:00
github-actions[bot] 7e1f6efe3c chore: update marketplace for v0.11.109 2026-05-24 01:05:29 +00:00
lukaszraczylo eab3b58e0f fix: data race in maintenance totalOptimizeRun counter v0.11.113 2026-05-24 02:04:53 +01:00
lukaszraczylo 720a14cd65 chore: fix npm audit vulnerabilities (rollup, vite, uuid, postcss) 2026-05-24 01:58:20 +01:00
lukaszraczylo f07875ee82 fix: plugin no longer vanishes after Claude Code updates
Root cause: plugin registered as directory source in known_marketplaces.json,
which gets wiped on CLI updates. Now registers in extraKnownMarketplaces
(settings.json) as a GitHub source — same mechanism caveman/context-mode use.

Binaries install to ~/.claude-mnemonic/bin/ instead of the Claude-managed
plugins directory. Thin wrapper scripts in the repo let the marketplace
clone find them. Nothing gets cleaned up when Claude refreshes its cache.

Also fixed along the way:
- ONNX Runtime 1.24.3 → 1.26.0 (API v25 mismatch broke all embedding tests)
- Vector client leaked on DB reinit, processQueue had a race on sessionManager
- reloadConfig called os.Exit(0) bypassing graceful shutdown
- Removed dead QueryRowWithTimeout that leaked contexts
- Added tests for graph/watcher/maintenance/update (all were at 0%)
v0.11.109
2026-05-24 01:56:54 +01:00
github-actions[bot] cfc95c9ce4 chore: update marketplace for v0.11.105 2026-04-21 04:14:53 +00:00
lukaszraczylo 62da8e5315 Update go.mod and go.sum (#43) v0.11.105 2026-04-21 05:03:47 +01:00
github-actions[bot] d0200ff9ee chore: update marketplace for v0.11.101 2026-04-10 04:13:01 +00:00
lukaszraczylo c14dbc6877 Update go.mod and go.sum (#42) v0.11.101 2026-04-10 05:03:55 +01:00
github-actions[bot] 9316c7ac8d chore: update marketplace for v0.11.97 2026-04-09 04:08:30 +00:00
lukaszraczylo 73c42c9f55 Update go.mod and go.sum (#41) v0.11.97 2026-04-09 04:59:04 +01:00
github-actions[bot] c258c0c845 chore: update marketplace for v0.11.93 2026-04-07 04:12:24 +00:00
lukaszraczylo be536e56d5 Update go.mod and go.sum (#40) v0.11.93 2026-04-07 04:59:43 +01:00
github-actions[bot] 6b575b92d6 chore: update marketplace for v0.11.89 2026-04-04 03:58:54 +00:00
lukaszraczylo c572408ab4 Update go.mod and go.sum (#39) v0.11.89 2026-04-04 04:50:08 +01:00
github-actions[bot] fae538c169 chore: update marketplace for v0.11.85 2026-04-03 04:06:58 +00:00
lukaszraczylo 9e333a7de1 Update go.mod and go.sum (#38) v0.11.85 2026-04-03 04:58:18 +01:00
github-actions[bot] 458f607b80 chore: update marketplace for v0.11.81 2026-03-30 04:15:50 +00:00
lukaszraczylo 9c0083c24c Update go.mod and go.sum (#37) v0.11.81 2026-03-30 05:03:46 +01:00
github-actions[bot] a0fecab186 chore: update marketplace for v0.11.77 2026-03-28 03:59:53 +00:00