15 Commits
Author SHA1 Message Date
digua cf1aee9e5b refactor(ai): upgrade pi runtime and define execution semantics 2026-08-18 17:27:48 +08:00
digua f96fef7b46 feat(cli): install local embedding runtime on demand 2026-08-01 13:19:41 +08:00
digua 93fc26fb83 fix(cli): avoid installing local embedding runtime 2026-08-01 13:19:41 +08:00
kelaocai d48745f00b fix(cli): declare sqlite-vec and @huggingface/transformers as runtime dependencies
The CLI tsup build inlines @openchatlab/node-runtime into dist chunks.
Both sqlite-vec and @huggingface/transformers load platform-specific
native packages at runtime (sqlite-vec-linux-arm64, onnxruntime-node,
sharp), so inlining them breaks global/npm and Docker installs of
chatlab-cli: the bundled chunks reference native packages that were
never installed, and configuring the semantic index vector model fails
with HTTP 500 (Cannot find package 'sqlite-vec-linux-arm64').

Declare both packages as chatlab-cli dependencies and mark them as tsup
external so they are installed from npm with their native bindings,
matching how better-sqlite3 and @node-rs/jieba are already handled.
2026-08-01 11:33:41 +08:00
digua 860bf52d62 feat(analytics): add privacy-safe product telemetry
Add self-hosted Umami reporting alongside existing telemetry across Desktop and CLI Web.

Track normalized startup, import, feature, and AI usage with a stable anonymous ID and strict privacy allowlists. Keep incremental usage platform-independent and preserve accurate failure classifications and platform metadata across import paths.
2026-07-29 14:28:48 +08:00
digua d7692b5bfc feat(runtime): add global insight service and worker 2026-07-12 15:29:09 +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 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 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
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
digua 434334b203 feat(semantic-index): run local embeddings in lazy worker 2026-06-23 14:18:32 +08:00
diguaandCursor d022bed48f refactor(mcp): extract MCP core into shared chatlab-mcp package
Move MCP Server logic (tool registration, resource registration, schema
conversion) from apps/cli/src/mcp.ts to packages/mcp-server so both CLI
and Desktop can share the same MCP implementation.

- New package: chatlab-mcp (packages/mcp-server) with McpDatabaseManager
  interface abstraction
- CLI mcp.ts slimmed to thin entry (~37 lines) calling startMcpServer()
- Desktop helper prototype at apps/desktop/helper/mcp.ts for dev-time
  MCP without GUI
- All 8 MCP tools and 3 resources unchanged

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-22 10:20:39 +08:00
digua 0aa30359ab fix(cli): resolve ESM module resolution for tsx dev mode
- Remove "type": "module" from apps/cli/package.json to avoid
  ESM/CJS interop issues with workspace packages in tsx dev mode
- Configure tsup to output .mjs files (always treated as ESM by Node.js)
- Rename bin entry from chatlab.js to chatlab.mjs
- Change chatlab web default port to 3100 (serve keeps 3110)
- Fix vite plugin: use pnpm instead of npx for tsx invocation
2026-05-19 22:13:00 +08:00
digua b1427e2422 feat(cli): add tsup build pipeline for npm publishing
- Rename package to `chatlab-cli`, version 0.1.0
- Add tsup config with ESM output, bundle @openchatlab/* + stream-json
- Update bin/chatlab.js from stub to actual entry point
- Unify version reading via src/version.ts (CLI/MCP/HTTP API)
- Add publishing fields: type, files, engines, publishConfig, keywords
- Move @openchatlab/* to devDependencies (bundled into dist/)
- Add better-sqlite3 to dependencies, @node-rs/jieba to optionalDependencies
- Fix --web default path for bundled dist/ directory structure
2026-05-19 21:46:00 +08:00