feat(runtime/knowledge): SQLite knowledge base with starter intel + lessons
Per-server state/<host>/knowledge.db. Schema: - recipes (seeded from docs/minecraft-recipes.json, 38 rows) - mob_intel (15 mobs incl. creeper/zombie/skeleton with verdict_no_weapon) - block_intel (30 blocks with required_tool / drops) - lessons (12 starter rules — "don't attack creepers with fists", etc.) - deaths / postmortems / poi / wiki_pages / chat_log / code_changes Public API in runtime/knowledge/index.js: initKnowledge, recall, record, markApplied, topAdvice, lookupRecipe/Mob/Block, insertDeath, insertPostmortem, recordPOI, poiNearby, logChat. All operations gracefully no-op when better-sqlite3 is unavailable. 10 tests; covers init, seeding, recall filters, lesson lifecycle, death/PM round-trip, spatial POI queries, chat log. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -16,9 +16,10 @@
|
||||
"tui": "tsx tui/tui.tsx",
|
||||
"propose:apply": "node scripts/propose-apply.js",
|
||||
"stop": "bash scripts/stop.sh",
|
||||
"test": "node --test runtime/skills/contract.test.js runtime/skills/groups.test.js runtime/skills/compat.test.js runtime/skills/recovery-tunnel-out.test.js runtime/curriculum.test.js runtime/social/social.test.js runtime/social/conversation.test.js runtime/social/chat-history.test.js runtime/social/reply-pi.test.js runtime/stuck-incident.test.js runtime/compat.test.js runtime/reflex.test.js runtime/base-site.test.js runtime/locations.test.js runtime/watch-filter.test.js runtime/world-journal.test.js runtime/scenario-memory.test.js runtime/critic.test.js runtime/skill-library.test.js runtime/modes.test.js runtime/pathfinder-watchdog.test.js scripts/edit-scope.test.js scripts/lint-patch.test.js"
|
||||
"test": "node --test runtime/skills/contract.test.js runtime/skills/groups.test.js runtime/skills/compat.test.js runtime/skills/recovery-tunnel-out.test.js runtime/curriculum.test.js runtime/social/social.test.js runtime/social/conversation.test.js runtime/social/chat-history.test.js runtime/social/reply-pi.test.js runtime/stuck-incident.test.js runtime/compat.test.js runtime/reflex.test.js runtime/base-site.test.js runtime/locations.test.js runtime/watch-filter.test.js runtime/world-journal.test.js runtime/scenario-memory.test.js runtime/critic.test.js runtime/skill-library.test.js runtime/modes.test.js runtime/pathfinder-watchdog.test.js runtime/knowledge/knowledge.test.js runtime/coach/postmortem.test.js runtime/persona/chatter.test.js scripts/edit-scope.test.js scripts/lint-patch.test.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"better-sqlite3": "^11.10.0",
|
||||
"canvas": "^3.2.3",
|
||||
"dotenv": "^16.4.5",
|
||||
"ink": "^7.0.4",
|
||||
@@ -31,7 +32,6 @@
|
||||
"mineflayer-pathfinder": "^2.4.5",
|
||||
"mineflayer-pvp": "^1.3.2",
|
||||
"mineflayer-tool": "^1.2.0",
|
||||
"better-sqlite3": "^11.3.0",
|
||||
"prismarine-item": "^1.18.0",
|
||||
"prismarine-viewer": "^1.33.0",
|
||||
"react": "^19.2.6",
|
||||
|
||||
Reference in New Issue
Block a user