feat: 完成 B 群組 — 資料層與核心領域模型

- 導入 Prisma 7.9.1 + SQLite(better-sqlite3 driver adapter),prisma.config.ts 管理連線設定
- 完整資料模型:User/Work/Character/CharacterAlias/EpisodicMemory/SemanticMemory/
  ProceduralRule/EmotionState/Relationship/SentimentLedgerEntry
- packages/db:Prisma Client 存取層(ESM,因 Prisma 7 產出的 generated client 僅支援 ESM)
- apps/api 隨之改為 ESM 以相容 packages/db
- packages/shared:新增角色/記憶/情緒/關係共用型別,api 與 web 皆從此匯入
- prisma/seed.ts:建立測試使用者與元氣型測試角色,含完整關係帳本與記憶種子資料
- apps/api:新增 GET /characters
- scripts/smoke/B.mjs:驗證資料表齊全、API 讀出種子角色、關係與記憶可寫入讀出
- 保留 Prisma 官方隨 CLI 附的 agent skill 文件(.agents/skills 等),供後續群組查閱

npm run restart && npm run smoke -- B 皆通過(B-V),A 群組冒煙測試無回歸。
This commit is contained in:
Jeffery
2026-08-13 09:43:15 +08:00
parent ae9c44dde7
commit f44200f543
124 changed files with 13566 additions and 48 deletions
+59
View File
@@ -0,0 +1,59 @@
{
"version": 1,
"skills": {
"prisma-cli": {
"source": "prisma/skills",
"sourceType": "github",
"skillPath": "prisma-cli/SKILL.md",
"computedHash": "129e77cba93984b88d66cf0f66d5788f5487431f17f189a1ab2d839976874e3b"
},
"prisma-client-api": {
"source": "prisma/skills",
"sourceType": "github",
"skillPath": "prisma-client-api/SKILL.md",
"computedHash": "cbbabff961c8e16b2d59f8c1ffb4e7e20be52154e778ab95121e0211d6d09969"
},
"prisma-compute": {
"source": "prisma/skills",
"sourceType": "github",
"skillPath": "prisma-compute/SKILL.md",
"computedHash": "8d6053aefdf0b7c80e981e93c1300d617292efb6a5b0bdd826bc85e47431f3e3"
},
"prisma-database-setup": {
"source": "prisma/skills",
"sourceType": "github",
"skillPath": "prisma-database-setup/SKILL.md",
"computedHash": "6a991a2530a6da7131e3fc71c353e8278702d0146b8b6e1d2fdfc2d3d0a21bd2"
},
"prisma-driver-adapter-implementation": {
"source": "prisma/skills",
"sourceType": "github",
"skillPath": "prisma-driver-adapter-implementation/SKILL.md",
"computedHash": "cc487f1bf36f616ddb3a9478b3527d288dd706d77a9e5dbee9af52dca1eee8e4"
},
"prisma-mongodb-upgrade": {
"source": "prisma/skills",
"sourceType": "github",
"skillPath": "prisma-mongodb-upgrade/SKILL.md",
"computedHash": "b94149ad5f1ec269dfd717b321538de6d39943b2ae6721a0d82302057f57ae18"
},
"prisma-postgres": {
"source": "prisma/skills",
"sourceType": "github",
"skillPath": "prisma-postgres/SKILL.md",
"computedHash": "0422727e18019add9208b86ce862964025acc011ff31fba1d59a01b836bd6272"
},
"prisma-postgres-setup": {
"source": "prisma/skills",
"sourceType": "github",
"skillPath": "prisma-postgres-setup/SKILL.md",
"computedHash": "5dbcf5a488d7cb7136340b86dcf781d6d92cf793f92c105ef644ac31ccac4d3b"
},
"prisma-upgrade-v7": {
"source": "prisma/skills",
"sourceType": "github",
"skillPath": "prisma-upgrade-v7/SKILL.md",
"computedHash": "0e07dc2831f86cf27627df914db43d862b0fc75d72c1f9070434aab7940bad7c"
}
}
}