Update docs: README + project structure for v0.5
This commit is contained in:
+68
-37
@@ -1,44 +1,75 @@
|
||||
SenSu/
|
||||
├── main.py # 框架主入口
|
||||
├── requirements.txt # 依赖包列表
|
||||
├── README.md # 项目说明
|
||||
├── main.py # 框架主入口 (--headless 参数)
|
||||
├── service_manager.py # 服务管理器 (依赖注入 + 健康检查)
|
||||
├── requirements.txt # Python 依赖 (版本锁定)
|
||||
├── README.md # 项目说明
|
||||
├── ROADMAP.md # 开发路线图 (本地)
|
||||
├── LICENSE # Apache 2.0
|
||||
├── Dockerfile # Docker 镜像
|
||||
│
|
||||
├── config/ # 运行时生成的配置文件
|
||||
│ ├── framework/ # 框架核心配置
|
||||
│ ├── plugins/ # 插件配置
|
||||
│ ├── services/ # 服务配置
|
||||
│ └── permissions/ # 权限配置
|
||||
├── sdk/ # 插件开发工具包
|
||||
│ ├── plugin_command_decorator.py # @plugin_command 装饰器
|
||||
│ ├── plugin_status.py # PluginStatus 枚举 (9 状态)
|
||||
│ └── plugin_error.py # PluginError 异常层级 (6 类)
|
||||
│
|
||||
├── logs/ # 日志文件目录
|
||||
│ ├── debug/ # debug级别日志
|
||||
│ └── runtime/ # 运行时日志
|
||||
├── services/ # 核心服务 (15 个)
|
||||
│ ├── init_service.py # 初始化 + 调试服务器自启
|
||||
│ ├── log_service.py # 日志 (多输出, 切割, TUI捕获)
|
||||
│ ├── tui_service.py # Textual TUI (4栏 + 系统监控)
|
||||
│ ├── command_service.py # 命令系统 (注册/历史/补全)
|
||||
│ ├── auth_service.py # 认证 (PBKDF2, Token)
|
||||
│ ├── internet_service.py # HTTP + WebSocket
|
||||
│ ├── plugin_service.py # 插件管理 (热加载, 状态追踪)
|
||||
│ ├── permission_service.py # 权限验证 (4级, 通配符)
|
||||
│ ├── api_service.py # API 端点
|
||||
│ ├── shutdown_service.py # 优雅关闭
|
||||
│ ├── sensu_db.py # SQLite 持久化 (5表)
|
||||
│ ├── project_service.py # 项目注册表 + 依赖解析
|
||||
│ ├── process_isolated.py # 插件进程隔离
|
||||
│ ├── sysmon_widget.py # TUI 系统监控组件
|
||||
│ └── web_panel/ # Web 管理面板
|
||||
│ ├── manager.py # 路由注册
|
||||
│ ├── auth.py # 面板认证
|
||||
│ ├── routes/ # API 路由 (auth/status/plugins/commands/logs)
|
||||
│ └── utils/ # 工具 (auth/system_info/response)
|
||||
│
|
||||
├── fmfuncs/ # 框架功能集
|
||||
│ ├── __init__.py
|
||||
│ ├── tui_renderer.py # TUI渲染器
|
||||
│ ├── log_handler.py # 日志处理模块
|
||||
│ ├── init_system.py # 初始化系统
|
||||
│ ├── command_handler.py # 指令处理模块
|
||||
│ ├── bridge_core.py # 核心桥模块
|
||||
│ ├── bridge_plugin.py # 插件桥模块
|
||||
│ ├── internet_module.py # 互联网模块集
|
||||
│ ├── auth_system.py # 访问验证系统
|
||||
│ ├── plugin_manager.py # 插件管理器
|
||||
│ ├── permission_validator.py # 权限验证器
|
||||
│ ├── api_manager.py # API管理器
|
||||
│ └── shutdown_handler.py # 终止处理器
|
||||
├── bridges/ # 消息桥接
|
||||
│ ├── core_bridge.py # 核心桥 (发布-订阅)
|
||||
│ ├── plugin_bridge.py # 插件桥 (subscribe_plugin)
|
||||
│ └── plugin_network_bridge.py # 网络桥 (setup_data_transfer, send_data)
|
||||
│
|
||||
├── plugins/ # 插件目录
|
||||
│ └── example_plugin/ # 示例插件结构
|
||||
│ ├── __init__.py
|
||||
│ ├── permissions.yaml
|
||||
│ └── config.yaml
|
||||
├── plugins/ # 插件目录
|
||||
│ └── example_plugin/ # 示例插件 (echo, plugin_status)
|
||||
│
|
||||
├── gui/ # GUI接口目录
|
||||
│ └── api.py # GUI操作接口
|
||||
├── tests/ # 测试 (23 个, pytest)
|
||||
│ ├── test_auth.py
|
||||
│ ├── test_service_manager.py
|
||||
│ ├── test_plugin_enhancements.py
|
||||
│ └── test_v03.py
|
||||
│
|
||||
└── utils/ # 工具函数
|
||||
├── __init__.py
|
||||
├── file_utils.py # 文件操作工具
|
||||
├── config_utils.py # 配置工具
|
||||
└── validation_utils.py # 验证工具
|
||||
├── deploy/ # 部署文件
|
||||
│ ├── sensu.service # systemd unit
|
||||
│ └── Dockerfile
|
||||
│
|
||||
├── docs/ # 文档
|
||||
│ ├── SenSu 框架基本架构.md
|
||||
│ ├── SenSu 插件开发详细指南.md
|
||||
│ └── 项目文件结构.txt
|
||||
│
|
||||
├── config/ # 运行时配置
|
||||
│ ├── framework/ # 框架配置
|
||||
│ ├── permissions/ # 权限数据
|
||||
│ ├── plugins/ # 插件配置
|
||||
│ └── services/ # 服务配置
|
||||
│
|
||||
├── static/ # 前端静态资源
|
||||
│ └── web_panel/
|
||||
│
|
||||
├── utils/ # 通用工具
|
||||
│ └── async_file_utils.py # 异步文件IO
|
||||
│
|
||||
├── templates/ # 插件模板
|
||||
│ └── plugin/
|
||||
│
|
||||
└── gui/ # GUI 接口 (预留)
|
||||
└── api.py
|
||||
|
||||
Reference in New Issue
Block a user