develop
master
這批變更涵蓋三個獨立子系統的更新:
pnpm-workspace.yaml
turbo.json
package-lock.json
pnpm-lock.yaml
restart
smoke
pnpm run smoke A
--
apps/api/src/cache/redis-client.ts
working-memory
memory-consolidation
memory.controller
emotion.service
prompt-builder.ts
few-shot-examples.ts
claude-provider.service
context-assembler.service
dialogue.service
llm.module
另同步更新 scripts/smoke/F.mjs、J.mjs 冒煙測試涵蓋上述新行為,並在 README/.env.example 補上 pnpm 開發流程、Redis/LLM 相關環境變數說明與正式環境部署路徑(不使用 Docker,走 systemd + nginx)。
scripts/smoke/F.mjs
J.mjs
.env.example
apps/api
apps/api/src/llm/prompt-builder.ts
apps/api/src/memory/working-memory.service.ts
pnpm install
pnpm install --frozen-lockfile && pnpm run build
REDIS_URL
LLM_PROVIDER=claude
CLAUDE_BASE_URL
No dependencies set.
The note is not visible to the blocked user.
變更摘要
這批變更涵蓋三個獨立子系統的更新:
pnpm-workspace.yaml、turbo.json,移除package-lock.json改用pnpm-lock.yaml)。對外指令介面(restart/smoke)維持不變,但pnpm run smoke A不可再加--分隔符。apps/api/src/cache/redis-client.ts,讓working-memory/memory-consolidation/memory.controller/emotion.service可用 Redis 加速讀寫;Redis 連不到時自動退回原本的 DB/行程記憶體行為,非必要依賴。prompt-builder.ts、few-shot-examples.ts,供claude-provider.service/context-assembler.service/dialogue.service/llm.module組裝更完整的 prompt。另同步更新
scripts/smoke/F.mjs、J.mjs冒煙測試涵蓋上述新行為,並在 README/.env.example補上 pnpm 開發流程、Redis/LLM 相關環境變數說明與正式環境部署路徑(不使用 Docker,走 systemd + nginx)。影響範圍
apps/api:llm、memory、emotion、cache 模組重點檔案/模組
apps/api/src/cache/redis-client.ts(新增)apps/api/src/llm/prompt-builder.ts、few-shot-examples.ts(新增)apps/api/src/memory/working-memory.service.ts(改動幅度最大,+91/-)風險與注意事項
pnpm install需搭配新 lockfile,正式環境建置指令改為pnpm install --frozen-lockfile && pnpm run build。REDIS_URL或連線失敗時應自動退回原行為,建議在無 Redis 環境下額外驗證一次冒煙測試。LLM_PROVIDER=claude時需確認 CLIProxy(CLAUDE_BASE_URL)已有對應模型的 Worker 註冊,否則會派工失敗。