Skip to content

v1.14.0 — AI Guidelines, Security Fixes, Viewer Improvements

Choose a tag to compare

@CSCSoftware CSCSoftware released this 16 Mar 15:09
· 91 commits to master since this release

What's New

Added

  • aidex_global_guideline — Persistent key-value store for AI guidelines and coding conventions. Store named instructions like "review" → review checklist, "release-prep" → release steps. Actions: set, get, list, delete. Works without prior global_init.
  • Viewer file size limit: getFileContent() now refuses files larger than 1 MB — prevents browser from freezing on large binary or generated files

Fixed

  • Command injection in Linux screenshot tools: All execSync calls with shell string interpolation replaced with execFileSync using argument arrays
  • Global query cache grows unbounded: Cache entries evicted on write when they exceed the 5-minute TTL — prevents memory leak in long-running sessions
  • Viewer race condition on file change: pendingChanges set is now snapshotted and cleared before processing
  • Viewer buildTree() N+1 queries: Correlated subqueries replaced with LEFT JOIN — single query instead of one subquery per file
  • WebSocket unknown message type: Viewer now sends an error response for unrecognized message types
  • Viewer taskId not validated: updateTaskStatus now checks Number.isInteger(taskId) before processing
  • Viewer mode not whitelisted: getTree message mode constrained to 'code' | 'all'
  • getProjects() SQL injection via tag/namePattern: escapeLikeTerm() now applied to both filter parameters
  • Silent fails in viewer and global DB: catch {} blocks now log errors via console.error
  • Git status refresh on every file event: Added 5-second minimum interval between git status refreshes
  • Global query cache not invalidated after init/update: aidex_init and aidex_update now call invalidateGlobalCache()

Refactored

  • screenshot/shared.ts: New module with centralized hasTool() and runPowerShell() — both use execFileSync (no shell)
  • normalizePath(): Private duplicates removed — both now import from commands/shared.ts
  • escapeLikeTerm(): Exported from commands/shared.ts and used consistently across all LIKE queries
  • macOS sips output parsing: Replaced shell pipe with regex on direct sips output