mirror of
https://github.com/thedotmack/claude-mem.git
synced 2026-07-03 12:32:32 +08:00
Addresses greptile review on PR #3077: - generate(): a provider crash or parse error left the job stuck in 'processing', which the queued-only guard can never reclaim. Now transition processing->failed with last_error before re-throwing. - search(): empty-query path returned chroma:true without consulting Chroma; now chroma:false (not degraded — intended filter-only path). - tsup: zod + @modelcontextprotocol/sdk are prod deps statically imported by the SDK; mark them external so they are not inlined into the bundle. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
30 lines
945 B
TypeScript
30 lines
945 B
TypeScript
import { defineConfig } from 'tsup';
|
|
|
|
// cmem-sdk build config. Plan: plans/2026-05-25-cmem-sdk-and-server-rename.md §2.
|
|
//
|
|
// Scoped narrowly to the SDK entry points so the bundler does NOT drag
|
|
// in the worker, HTTP routes, BullMQ, or `bun:sqlite`. The import-guard
|
|
// (`scripts/check-sdk-bundle.cjs`) enforces this at build time.
|
|
export default defineConfig({
|
|
entry: ['src/index.ts', 'src/sdk/index.ts'],
|
|
format: ['esm'],
|
|
dts: true,
|
|
platform: 'node',
|
|
target: 'node20',
|
|
outDir: 'dist',
|
|
// Do NOT wipe the rest of dist (npx-cli, opencode-plugin live there).
|
|
clean: false,
|
|
splitting: false,
|
|
sourcemap: true,
|
|
// Mark Node built-ins + the SDK's runtime deps external. tsup keeps
|
|
// them as `import 'pg'` etc. so consumer Node apps resolve them
|
|
// against the installed `claude-mem` package's prod deps.
|
|
external: [
|
|
'pg',
|
|
'zod',
|
|
'@modelcontextprotocol/sdk',
|
|
'@anthropic-ai/sdk',
|
|
/^node:/,
|
|
],
|
|
});
|