6c3ff0c7aa
refactor(models): convert to json format per database-table-definition-spec
2026-05-27 13:23:31 +08:00
cb8910cb40
revert: remove cache_sync references from sage.py
...
- Remove 'start_cache_sync' from rbac.init import
- Remove 'add_startup' import
- Remove 'add_startup(start_cache_sync)' call from init()
- This reverts the cache_sync integration that caused session data loss
2026-05-26 18:31:25 +08:00
bc5e0f5e82
fix: use add_startup() for cache_sync instead of asyncio.create_task
...
- init() is called synchronously before the event loop starts
(configuredServer.py:36), so asyncio.create_task() fails with
'no running event loop'
- Use ahserver's add_startup() which appends to app.on_startup
and runs after the loop is ready (configuredServer.py:118)
- Remove unused asyncio import
2026-05-26 17:16:18 +08:00
5cbd8535dd
bugfix
2026-05-26 16:15:37 +08:00
46bc814fdc
feat: replace index.ui with shell left-right layout, add missing routes for dashboard widgets and module index.ui files
2026-05-26 15:52:45 +08:00
8db5e982fa
revert: restore original DB password in config.json (previous change was accidental)
2026-05-26 15:19:41 +08:00
6a27233d2d
revert: remove llmage api paths from sage load_path.py
...
- These paths belong in llmage/scripts/load_path.py
- Follows the rule: module permissions in module's scripts/ directory
2026-05-26 14:32:50 +08:00
9fbc2b1dc6
feat: add llmage api endpoints to load_path.py for data_filter
...
- /llmage/api/llm_list.dspy logined
- /llmage/api/llm_create.dspy logined
- /llmage/api/llm_update.dspy logined
- /llmage/api/llm_delete.dspy logined
- /llmage/api/get_organizations.dspy logined
- /llmage/api/get_upapps.dspy logined
2026-05-26 14:28:57 +08:00
7dd5fa8234
feat: start cache_sync for cross-process cache invalidation
...
- sage.py: Import start_cache_sync from rbac.init
- Call asyncio.create_task(start_cache_sync()) after load_rbac()
- Starts Redis Pub/Sub subscription for cache invalidation messages
2026-05-26 13:52:23 +08:00
6af4770709
fix: add RBAC permissions for llmage /v1 API endpoints
...
Added logined permission entries for all v1 OpenAI-compatible endpoints:
- /v1/chat/completions (existing, was missing)
- /v1/models (existing, was missing)
- /v1/tasks (existing, was missing)
- /v1/video/generations (new)
- /v1/image/generations (new)
Each has both directory and index.dspy file entries.
2026-05-26 11:58:07 +08:00
b841f79e13
fix: add dark mode background (#0B1120) to public/mainpage/index.ui
2026-05-26 11:57:10 +08:00
63ee4b324d
fix: add local dev env vars and fix DB password format
...
- start.sh: add placeholder env vars (ALIPAY_PUB, BAIDU_SMS_*) for local dev
- conf/config.json: fix DB password to AES-encoded format
2026-05-26 09:27:32 +08:00
9ac5ae0830
revert: remove scripts moved to rbac module
2026-05-26 09:12:11 +08:00
b589e9f155
fix: pass empty {} ns param to sqlExe() calls
2026-05-26 09:05:35 +08:00
2d2dad84d0
feat: add RBAC scripts — list_path_roles.py and find_unauth_files.py
2026-05-26 08:55:49 +08:00
c5d6ec6c8f
feat: integrate product_management module - import, load, build loop, RBAC permissions
2026-05-25 15:24:12 +08:00
8260637bf2
bugfix
2026-05-25 15:18:19 +08:00
205547a4e0
add route for dashboard accounting_errors.ui
2026-05-24 17:27:36 +08:00
ad5da620e3
update dashboard_for_sage routes: replace .dspy with .ui endpoints
...
New routes:
- today_usage.ui, today_amount.ui, total_users.ui,
concurrent_users.ui, top_models_chart.ui
Removed deprecated .dspy routes:
- api/get_today_usage.dspy, api/get_user_stats.dspy,
api/get_top_models.dspy, api/dashboard_cards.dspy
2026-05-24 17:20:34 +08:00
cd80c53aaa
chore: update dashboard permissions — replace dashboard_content.dspy with dashboard_cards.dspy
2026-05-24 16:44:30 +08:00
00ea7675ac
chore: update dashboard_for_sage permissions — remove JS, add dashboard_content.dspy
2026-05-24 16:30:57 +08:00
96b0682a08
Add dashboard_refresh.js at wwwroot root path to RBAC permissions
2026-05-24 14:46:13 +08:00
25105e4f43
Add dashboard_for_sage RBAC permissions to load_path.py
2026-05-24 14:33:55 +08:00
3cda907ba2
Add dashboard_for_sage module: menu submenu, sage.py import/load, build.sh module list
2026-05-24 14:25:00 +08:00
c18c9113cc
bugfix
2026-05-23 17:26:57 +08:00
8b387ab71c
bugfix
2026-05-23 11:13:51 +08:00
bce275972e
bugfix
2026-05-23 00:47:20 +08:00
847c6e314e
bugfix
2026-05-22 22:56:14 +08:00
e8c72d2712
bigfox
2026-05-22 17:31:45 +08:00
3a286ad300
bugfix
2026-05-22 13:45:18 +08:00
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
57d602bd54
bugfix
2026-05-21 14:06:10 +08:00
d557c7266b
bugfix
2026-05-19 16:33:34 +08:00
497f143f26
bugfix
2026-05-19 16:14:10 +08:00
3791b65236
bugfix
2026-05-19 16:07:33 +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
53285aa17e
feat: multi-process worker scaling for Sage web app
...
- Refactor start.sh to launch multiple worker processes based on CPU core count
- Assign dynamic ports to each worker (base_port + offset)
- Update stop.sh to gracefully handle and kill multiple worker PIDs
- Implement PID file management for multi-process tracking
2026-05-16 22:08:52 +08:00
2e86b7a008
feat: add production migration script for llm_catalog_rel
2026-05-16 21:31:50 +08:00
051d15f1af
fix: 添加 .wss 后缀映射到 ws 处理器
2026-05-13 16:12:51 +08:00
fbed69ea35
bugfix
2026-05-13 16:09:08 +08:00
ae43ce2c6c
新增 rbac 模块权限初始化脚本
...
基于角色职责分析的四层权限模型:
1. Public (any): 18个路径 - 登录/注册/认证/静态资源
2. Logined (11角色): 29个路径 - 用户自助服务、API Key CRUD
3. Admin (5角色): 35个路径 - 用户管理、机构管理、供应商/分销商
4. Superuser (1角色): 27个路径 - 角色/权限/机构类型管理
总计: 18 + 29*11 + 35*5 + 27*1 = 592 条权限记录
2026-05-13 14:41:08 +08:00
b1073c6afe
fix: 推理菜单submenu指向正确的harnessed_reasoning菜单
...
之前'推理'菜单的submenu错误指向了/harnessed_agent/menu.ui,
改为/harnessed_reasoning/menu.ui后可以看到:
- 推理控制台
- 推理交互
- 推理会话
- 推理配置
2026-05-13 14:29:35 +08:00
6951ee7ebf
重构权限模型:基于角色职责的四层分级
...
根据角色职责重新设计权限分级:
- owner.superuser: 系统级管理(机构/角色/权限)
- *.admin: 机构级管理(人员/角色分配)
- reseller.operator: 运营(产品/合同/定价)
- reseller.sale: 销售(客户/折扣)
- reseller.accountant: 财务(充值/对账)
- reseller.maintainer: 运维
- customer.customer: 终端客户
权限模型:
1. Public (any): CSS静态资源
2. Logined (所有登录用户10角色): 控制台、数据查看、用户自己的CRUD、推理、执行
3. Admin (superuser+5种admin): 系统级LLM配置管理
4. Superuser (仅owner.superuser): 技能部署等高危操作
2026-05-13 14:27:53 +08:00