9 Commits

Author SHA1 Message Date
c2caf97996 bugfix 2026-05-22 13:23:22 +08:00
9fefd971ab bugfix 2026-05-22 13:21:58 +08:00
dffb4ee951 bugfix 2026-05-22 13:20:19 +08:00
d7b3a7bfeb bugfix 2026-05-22 13:19:05 +08:00
4b90e59a42 bugfix 2026-05-21 18:44:25 +08:00
7982a0fd30 bugfix 2026-05-21 18:41:55 +08:00
953a10ac58 bugfix 2026-05-21 18:40:08 +08:00
feb966cba4 bugfix 2026-05-21 18:38:34 +08:00
3de5a1ce91 feat: multi-process architecture with independent backend processes
- Extract backend_accounting from llmage cleanupctx to independent process
- Add bin/backend_accounting.py for standalone LLM billing loop
- Rewrite start.sh with two-phase startup:
  1. Independent backend programs (run once)
  2. Sage Web workers (SO_REUSEPORT on same port)
- Rewrite stop.sh to handle both workers and backend processes
- Add .gitignore for build artifacts and runtime files

Architecture:
- CPU core detection for worker count
- All workers share port 9180 via SO_REUSEPORT
- Backend processes tracked in sage_backend.pid
- Workers tracked in sage.pid
2026-05-17 00:11:53 +08:00