Skip to content
曾亮懿 ZengLiangYi Blog
Tag

#Node.js

28 posts tagged "Node.js".

MCP Boundaries: Discovery, Identity, and Call Permissions

Examine Model Context Protocol boundaries: tool discovery, server instance tracking, and execution permissions in reviewable developer environments.

曾亮懿 曾亮懿
4 min read
#ChatCrystal #MCP #Node.js

SourceAdapter Internals: Content Hashing and Idempotent Sync

Trace ChatCrystal’s registry, importer, and remote payload to verify identity, canonical hashes, metadata shortcuts, and parser-version boundaries.

曾亮懿 曾亮懿
4 min read
#ChatCrystal #TypeScript #Node.js

sql.js WASM Persistence: Memory, Exports and Nested Savepoints

Trace ChatCrystal’s database lifecycle with sql.js 1.14.2 fixtures, separating SQL commits, exports, file writes, foreign-key restoration, and nested rollback.

曾亮懿 曾亮懿
5 min read
#ChatCrystal #Node.js #SQLite

Vectra Vector Search: Metadata, Updates, and Local Cache

Inspect Vectra 0.15.0 query and storage paths with temporary indexes, observing external metadata, files left after cancellation, and instance-cache boundaries.

曾亮懿 曾亮懿
4 min read
#ChatCrystal #Node.js #SQLite #Vector search

Building an Embedding Service: Text, Chunks, and Commits

Read ChatCrystal’s actual embedding pipeline, separate text selection, soft chunking, vector validation, and commits, and verify boundaries offline.

曾亮懿 曾亮懿
4 min read
#ChatCrystal #AI #Node.js

Biome vs ESLint: Dividing Code Quality and Formatting in Repos

Read ChatCrystal’s scripts and Flat Config, verify ESLint diagnostics offline, and distinguish syntax rules, type checking, formatting, and CI gates.

曾亮懿 曾亮懿
4 min read
#ChatCrystal #TypeScript #Node.js

A Minimal MCP Server: Register Tools and Verify Stdio Calls

Build an offline addition tool with TypeScript SDK, verify protocol discovery and calls, and inspect ChatCrystal adapter integration boundaries.

曾亮懿 曾亮懿
4 min read
#ChatCrystal #MCP #Node.js

Conversation Parsing: JSONL, Events, and SQLite Read Boundaries

Trace ChatCrystal parsers with offline fixtures to test line framing and SQLite snapshots, separating decoding from message normalization guarantees.

曾亮懿 曾亮懿
6 min read
#ChatCrystal #Node.js #SQLite

Release Engineering: npm, Electron, and Tag-Driven CI

Trace ChatCrystal release workflows, verify tag plans, package fixtures, and failure exits offline, identifying steps that still require acceptance.

曾亮懿 曾亮懿
5 min read
#ChatCrystal #Node.js #Automation

Async Task Queues with p-queue: Concurrency, Limits, and Retries

Use p-queue to manage task concurrency, separate starts from model requests, and verify offline that clearing waiting work never interrupts active tasks.

曾亮懿 曾亮懿
4 min read
#ChatCrystal #Node.js #TypeScript

Multi-Source Ingestion Architecture: Decouple Scan and Parsing

Read adapter import contracts, verify selective parsing with fixtures, and check source registration, enablement, identity, and version boundaries.

曾亮懿 曾亮懿
4 min read
#ChatCrystal #TypeScript #Node.js

Structured JSON Prompts: Field Design and Verifiable Evidence

Use ChatCrystal’s summaries and relations to define fields, visible evidence, and counterexamples, then distinguish shape and evidence checks with offline Zod.

曾亮懿 曾亮懿
4 min read
#ChatCrystal #AI #Node.js

Testing Strategy: Counterexamples for SQL, Functions, and APIs

Check ChatCrystal’s Node test entry points, practice dependency isolation, SQL rollback, and Fastify inject offline, and state what those tests do not cover.

曾亮懿 曾亮懿
4 min read
#ChatCrystal #Node.js #TypeScript

TypeScript Monorepo Setup: Project References and Shared Types

Check ChatCrystal’s shared types, server, Vite client, and Electron settings, then reproduce an alias failure that passes compilation but fails at runtime.

曾亮懿 曾亮懿
4 min read
#ChatCrystal #TypeScript #Node.js

Local Vector Search with Vectra: Metadata Filters and Persistence

Run a deterministic Vectra 0.15.0 exercise in a temporary directory to check cosine scores, metadata filters, reopening, and canceled updates.

曾亮懿 曾亮懿
4 min read
#ChatCrystal #AI #Node.js #Vector search

Structured Notes with Vercel AI SDK: Schema and Business Checks

Read ChatCrystal’s AI SDK 7 calls, distinguish provider adaptation from output shape and factual validity, and test description limits with offline Zod.

曾亮懿 曾亮懿
4 min read
#ChatCrystal #AI #Node.js

Electron tray and window state: hide, restore, and quit

Read ChatCrystal’s mode-aware tray, saved window bounds, and shutdown flow, including what persistence restores and which failures still need testing.

曾亮懿 曾亮懿
4 min read
#ChatCrystal #Electron #Node.js

Fastify Static Assets: Same-Port SPA Fallback and Error Handling

Check ChatCrystal’s build outputs and static-root discovery, then use isolated inject exercises to distinguish pages, unknown APIs, and missing assets.

曾亮懿 曾亮懿
4 min read
#ChatCrystal #Fastify #Node.js

Fastify in Production: Plugins, Schema Validation, and Failures

Read the actual createServer and route boundaries, then use an isolated inject exercise to check success, invalid input, and missing routes.

曾亮懿 曾亮懿
3 min read
#ChatCrystal #Fastify #Node.js

Local AI Knowledge Base Setup: Install, Ingest, and Search

Verify installation, the local service, both model configurations, import, summarization, and search with the actual ChatCrystal 0.6.1 CLI.

曾亮懿 曾亮懿
4 min read
#ChatCrystal #Node.js #Knowledge management

Memory Budgets for Large Chat Imports: Measure Before Batching

Profile memory peaks in large chat imports with sql.js and task queues. Size batches from reproducible benchmarks instead of arbitrary fixed thresholds.

曾亮懿 曾亮懿
6 min read
#ChatCrystal #Node.js #Data parsing #Performance

Exporting AI Notes to Obsidian: Markdown Formatting and Tags

Export ChatCrystal notes to Obsidian with stable links and IDs, distinguishing a readable snapshot from ongoing editing and incremental synchronization.

曾亮懿 曾亮懿
6 min read
#ChatCrystal #Node.js #Knowledge management

From writing to code

Explore ChatCrystal, developer tools and daily learning notes on my GitHub. Questions about the implementation are welcome.