Commit Graph
197 Commits
Author SHA1 Message Date
diguaandCursor 9503fc18cb fix(cli): download official prebuilds when preparing better-sqlite3
prebuild-install was invoked with -r napi, but better-sqlite3 only
publishes per-ABI node/electron prebuilds, so the download branch always
failed and every run fell back to a ~1.5min node-gyp source build.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-10 15:51:19 +08:00
digua 2b214b75df fix(storage): clarify managed data directory scope (resolve #241) 2026-07-07 17:08:51 +08:00
digua 0581b55deb fix(desktop): keep readonly database opens read-only
Avoid switching legacy DELETE-journal session databases to WAL from readonly validation paths. This prevents sync existence checks from treating valid databases as unreadable and deleting them.
2026-07-06 15:01:50 +08:00
digua 5f1a9bb34e fix(desktop): isolate better-sqlite3 electron binding 2026-07-06 15:01:50 +08:00
digua 312a0306cb fix(parser-native): harden native parser test edge cases 2026-07-05 22:49:38 +08:00
digua c0548f63c8 feat(import): prepare native parser rollout 2026-07-05 22:49:38 +08:00
diguaandCursor c265925e3e fix(import): report accurate post-parse progress stages in real time
The UI stayed on "parsing messages" during the whole post-parse phase:
the importer emitted an 'importing' stage the frontend had no text for,
and on CLI Web the synchronous DB writes / index / FTS build starved the
event loop so buffered SSE progress events only arrived after the import
finished.

- Replace 'importing' with 'saving' (message writes) and a new 'indexing'
  stage (indexes / FTS / session index) in ParseProgress, with UI texts
  for all four locales.
- Yield a macrotask between native parser batches and before heavy
  synchronous steps so SSE progress events flush while importing.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-05 22:49:38 +08:00
diguaandCursor 1e7aefe08b feat(import): add Rust native parsing kernels for WeFlow and ChatLab JSON
Add @openchatlab/parser-native (napi-rs v3) with a shared byte-level JSON
scanner and two format kernels. Parsing large exports is 4-10x faster in
real-data benchmarks. The native module is an optional local build; the
pure-TS parsers remain as automatic fallback when it is unavailable,
disabled via CHATLAB_DISABLE_NATIVE_PERF=1, or rejects off-spec files.

The ChatLab kernel also parses the members array structurally, fixing the
TS head-regex heuristic that silently dropped avatars/roles for files with
nested arrays or long member lists.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-05 22:49:38 +08:00
digua bbf89332b2 release: v0.30.0 2026-07-05 01:41:21 +08:00
digua 73553c4c2c fix(query): clamp SQL rows and stabilize response stats
Clamp CLI SQL output after execution so user-provided LIMIT clauses cannot bypass the requested row cap. Add a deterministic message id tie-breaker for response-time statistics.
2026-07-04 15:12:50 +08:00
digua 8fd3f397e0 fix(query): hide context time filters
Remove time filter options from the message context command so agents do not pass unsupported bounds that would be silently ignored.
2026-07-04 15:12:50 +08:00
digua 6e5a0fa893 fix(query): dedupe expanded search tail
Avoid appending search hits that were already included as context when max message expansion limits only expand the first hits.
2026-07-04 15:12:50 +08:00
digua 801e7fc66a fix(cli): harden agent query safeguards
Tighten agent-facing query validation, privacy guards, SQL result handling, config writes, and LIKE search semantics for the CLI query workflow.
2026-07-04 15:12:50 +08:00
digua b33cbd065d docs(agent): add chatlab analyze skill 2026-07-04 15:12:50 +08:00
digua 98a92c73f1 docs(cli): add agent query usage guide 2026-07-04 15:12:50 +08:00
digua c4f5e06e5e feat(cli): add agent-facing query commands 2026-07-04 15:12:50 +08:00
digua fd97c55681 feat(query): extend shared chat query capabilities 2026-07-04 15:12:50 +08:00
digua b346b51eee refactor(sync): share automation routes across runtimes 2026-07-02 10:35:02 +08:00
digua 70ada5031c fix(ai): share AI log opening route 2026-07-02 10:35:02 +08:00
digua 57d6450430 release: v0.29.0 2026-07-01 01:27:49 +08:00
digua d3d2661882 fix(relationships): address galaxy review regressions
Bundle relationship worker entries for packaged builds.

Refresh and surface galaxy task failures, clean detached Pixi layers, cap focused neighborhoods, merge owner nodes across platforms, apply manual friend overrides, and track owner group activity.
2026-06-30 14:41:46 +08:00
digua 85b9e203ab feat(people): add relationship galaxy graph 2026-06-30 14:41:46 +08:00
digua 1e2148a4d2 perf(contacts): cache session facts 2026-06-27 22:13:25 +08:00
digua 9563c26645 refactor(contacts): group contacts service files 2026-06-27 15:54:08 +08:00
digua c8c4e1aca6 feat(contacts): compute contacts in background worker 2026-06-27 15:54:08 +08:00
digua ef71543237 feat(electron): download updates silently
Start stable desktop update downloads in the background during automatic checks, then prompt only after the update is ready to install.

Keep manual update checks interactive so users still confirm the download after explicitly checking.
2026-06-26 14:03:45 +08:00
digua f74aae1bb4 release: v0.28.1 2026-06-26 10:07:20 +08:00
digua 6cc7454049 fix(electron): preserve socks proxy fallback
Return a recorded SOCKS proxy before a fallback DIRECT rule so local model downloads fail explicitly instead of silently bypassing the configured system proxy.
2026-06-26 09:56:32 +08:00
digua cbc8728f41 fix(electron): resolve model download proxy from session
Make desktop proxy saves await Electron session proxy application before model download proxy resolution.

Resolve HTTP, HTTPS, and SOCKS system proxy rules for semantic index model downloads while preserving DIRECT precedence.
2026-06-26 09:56:32 +08:00
digua 851166188d fix(import): harden push and pull import guards
Combine the PR review fixes for push import validation, deduplication, system sender handling, and pull import lock scoping into one reviewable change.
2026-06-25 21:45:16 +08:00
diguaandClaude Sonnet 4.6 4694d83729 fix(electron): align Desktop API port with CLI, auto-fallback on conflict, update docs
- Change default port from 5200 to 3110 in sync config-manager, Vue store,
  and settings UI to match CLI DEFAULT_API_PORT
- Desktop API server now tries up to 10 consecutive ports when preferred
  port is occupied (e.g. CLI already running); reports actual bound port
- Scope Desktop import route lock to session (Set<string>) matching the
  push-importer fix
- Docs: remove unimplemented JSONL/X-Dry-Run claims, fix port references,
  replace platform-specific examples with generic ones

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 21:45:16 +08:00
diguaandClaude Sonnet 4.6 1209e2ce4b refactor(import): migrate CLI sync/pull path to shared streaming importer
Removes the legacy apps/cli/src/import/importer.ts (hand-rolled FTS, dedup,
session-ID generation) and apps/cli/src/import/chatlab-reader.ts (buffered
in-memory JSON/JSONL parser). DirectImporter in sync/adapters.ts now calls
streamImport / incrementalImport from stream-import.ts, which use the
@openchatlab/parser streaming pipeline and node-runtime shared logic.

Changes:
- Add sessionId? to StreamImportOptions so callers can fix the target session
  ID instead of auto-generating one (needed by pull engine full-import path)
- Rewrite DirectImporter.incrementalImportFile and fullImportFile to use
  the shared importers; map IncrementalImportResult fields to ImportResult
- Remove legacy exports from apps/cli/src/import/index.ts
- Rewrite importer.test.ts to use streamImport + a temp ChatLab JSON file
  (same two data-dir compatibility gate assertions as before)
- Delete importer.ts and chatlab-reader.ts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 21:45:16 +08:00
diguaandClaude Sonnet 4.6 0f1ea43a11 refactor(electron): remove redundant generateIncrementalSessions calls after incremental import
Session index is now built inside the shared incremental-importer, so the
explicit post-import worker.generateIncrementalSessions(sessionId) calls in
the Desktop layer were no-ops. Remove all four call sites.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 21:45:16 +08:00
diguaandClaude Sonnet 4.6 ced4ed16bd feat(import): auto-generate session index after all import paths
Session index (segment/message_context tables) was previously generated
inconsistently: CLI used postImportHook, Desktop relied on a separate
explicit RPC call, and the CLI sync/pull legacy importer never built it.

Move generateSessionIndex / generateIncrementalSessionIndex into the
shared importers (streaming-importer.ts, incremental-importer.ts) so
every caller gets it automatically. Remove the now-redundant calls from
CLI's postImportHook. Also add the calls to the legacy importer.ts used
by CLI sync/pull, which had no session index at all.

Incremental imports use generateIncrementalSessionIndex, which preserves
existing AI summaries. Full imports call generateSessionIndex only on
newly created sessions where no summaries exist.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 21:45:16 +08:00
digua a2158cccc4 release: v0.28.0 2026-06-25 00:12:53 +08:00
diguaandClaude Sonnet 4.6 aff59c7503 feat(import): wire Google Chat archive sources into CLI, Electron and frontend
Add archive reader, Google Chat resolver and source manager in node-runtime.
Expose prepared archive sources via CLI HTTP route and Electron IPC.
Add frontend service adapters and an import selection flow with i18n support
for all four locales. Fix rescanning on repeated archive imports.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 18:10:30 +08:00
diguaandClaude Sonnet 4.6 2dbe569f2a fix(logging): fix four review issues in unified logger
- Front-end error reporter was posting to /_web/_web/logs/report (double
  base URL prefix); fixed to /logs/report
- uncaughtException/unhandledRejection handlers in CLI and Electron did not
  exit after logging, overriding Node's default crash behavior; added
  process.exit(1)
- NodePathProvider constructor in run() and chatlab status triggered
  migrateFromElectronIfNeeded() as a side effect; added getSystemLogsDir()
  to get the system logs path without resolving user data
- formatData() was called outside write()'s try/catch, so errors with
  circular cause objects could escape appLogger.error(); moved inside

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 15:28:09 +08:00
diguaandClaude Opus 4.8 7c21d1c879 feat(logging): add unified app logger with file rotation and global error capture
Build a shared appLogger (node-runtime) that all three runtimes write to a
single rolling logs/app.log (10 MB → rename to app.old.log). Replaces the
four independent hand-written loggers (app.log/api.log Electron wrappers)
with a unified entry point while leaving AiLogger/perf-logger intact.

Key additions:
- packages/node-runtime/src/logging/app-logger.ts: initAppLogger/appLogger
  singleton, INFO threshold by default (CHATLAB_LOG_LEVEL to override),
  atomic rename rotation, Error data auto-extracts message+stack
- Three-runtime init: Electron main, CLI Web (http/index.ts), CLI (run())
- Global crash capture: uncaughtException + unhandledRejection on all three
  Node runtimes now land in app.log scope 'crash'
- Fastify setErrorHandler fallback logs scope 'http' on CLI Web and Electron
  internal server for unexpected 5xx errors
- Frontend: window.onerror + unhandledrejection + Vue errorHandler feed into
  POST /_web/logs/report (scope 'web') with dedup+throttle
- AGENTS.md: logging rules section requiring key-path logs on new/changed features

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 15:28:09 +08:00
digua 46fb1cd4ca release: v0.27.2 2026-06-24 00:02:01 +08:00
digua 43e6ffdb81 fix(cli): include analytics key in release build 2026-06-23 22:58:22 +08:00
digua aaea90d2fc refactor(analytics): drop legacy settings migration 2026-06-23 22:58:22 +08:00
digua da1432a1d3 fix(semantic-index): package local embedding runtime deps 2026-06-23 22:58:22 +08:00
diguaandClaude Sonnet 4.6 c8cccbefd4 feat(analytics): track CLI web daily active users via shared AnalyticsService
- Extract shared AnalyticsService to packages/node-runtime using direct
  Aptabase HTTP API (removes @aptabase/electron dependency)
- Add POST /_web/telemetry/track route for generic event reporting
- Desktop: migrate analytics.json from userData to systemDir (~/.chatlab/),
  trigger daily active from renderer via new IPC so user-selected locale is used
- CLI: inject APTABASE_APP_KEY at build time, create AnalyticsService on
  server start, report app_active with platform: cli-web
- Both platforms report user-selected locale via platform service abstraction

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-23 22:58:22 +08:00
diguaandClaude Sonnet 4.6 04680fc840 fix(ai): delete auth profile when removing a model service config
When deleteConfig was called, the auth profile written to
auth-profiles.json during addConfig was never cleaned up, leaving
orphaned credentials on disk indefinitely.

Add onApiKeyDeleted callback to LLMConfigStoreDeps and call it in
deleteConfig with the removed config so callers can clean up the
corresponding auth profile. Wire up deleteAuthProfile in both the
CLI HTTP server and the Desktop internal API.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-23 22:58:22 +08:00
digua 5bb01966fa release: v0.27.1 2026-06-23 14:39:53 +08:00
digua dc1c236cc0 fix: address semantic worker and pull review bugs 2026-06-23 14:18:32 +08:00
digua 434334b203 feat(semantic-index): run local embeddings in lazy worker 2026-06-23 14:18:32 +08:00
digua 35c260ac33 fix(sync): repair pull pagination cursor(#237) 2026-06-23 14:18:32 +08:00
diguaandClaude Sonnet 4.6 39393cf38d refactor: remove dead code and simplify over-engineered abstractions
- Delete NotificationBus interface (no implementations, no callers)
- Delete useAsyncData/useMultipleAsyncData composables (zero import sites)
- Inline CHART_CAPABILITY_SKILL_ID into tool-catalog.ts (was a single-constant file)
- Inline AsyncSqlExecutor into message-query-functions.ts (was a single-interface file)
- Rename tools TimeFilter → ToolTimeRange to eliminate name collision with shared-types
- Shrink useToast wrapper: two interfaces → one type, 40 lines → 17 lines
- Simplify deepMerge: remove recursion, config is at most 1 level deep

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-23 14:18:32 +08:00
digua 307b0380bd release: v0.27.0 2026-06-22 13:56:43 +08:00