appback-ai-agent 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +13 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appback-ai-agent",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Self-improving AI game agent for ClawClash. Auto-discovers games, fights, collects data, and trains models.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -1,3 +1,15 @@
1
+ // Global error handler — catch native module failures etc.
2
+ process.on('uncaughtException', (err) => {
3
+ console.error('[FATAL] Uncaught exception:', err.message || err)
4
+ if (String(err.message).includes('better-sqlite3') || String(err.message).includes('better_sqlite3')) {
5
+ console.error('\n better-sqlite3 failed to load.')
6
+ console.error(' On Windows, run: npm install --global windows-build-tools')
7
+ console.error(' Or install Visual Studio C++ Build Tools + Python 3.\n')
8
+ }
9
+ console.error(err.stack || err)
10
+ process.exit(1)
11
+ })
12
+
1
13
  // CLI(bin/cli.js)에서 이미 로드한 경우 스킵
2
14
  if (!process.env._PKG_ROOT) require('dotenv').config()
3
15
 
@@ -105,5 +117,6 @@ async function main() {
105
117
 
106
118
  main().catch(err => {
107
119
  log.error('Fatal error', err.message)
120
+ console.error(err.stack || err)
108
121
  process.exit(1)
109
122
  })