Files
NebulaShell/store/@{FutureOSS}/lifecycle.disabled
qwen.ai[bot] 27a1eb8a3c ### User query:
这次提交的标题

### Changes made to the code/files:

Title: Remove PHP dependencies and refactor UI rendering to pure HTML templates

Key features implemented:
- Refactored dashboard plugin to remove PHP dependency and implement pure HTML/CSS/JS template rendering
- Updated log-terminal plugin to replace PHP-based UI with native Python HTML template generation
- Modified package manager plugin to eliminate PHP view files and use direct HTML string construction
- Removed all PHP view template files across dashboard, log-terminal, and package manager plugins
- Updated .gitignore to include additional build artifacts and environment files
- Enhanced dashboard with real-time metrics, system information, and network statistics without external PHP processing

The overall change migrates the system from requiring PHP for UI rendering to using pure Python-based HTML template generation, simplifying deployment and removing external dependencies.
2026-04-25 09:55:28 +00:00
..
2026-04-25 09:55:28 +00:00
2026-04-17 23:15:15 +08:00
2026-04-17 23:15:15 +08:00
2026-04-17 23:15:15 +08:00
2026-04-17 23:15:15 +08:00

lifecycle 生命周期管理

管理插件的状态转换和钩子函数。

功能

  • 状态机:pendingrunningstopped
  • 支持状态转换验证
  • 提供生命周期钩子:
    • before_start
    • after_start
    • before_stop
    • after_stop
  • 支持扩展能力注入

状态转换

pending → running → stopped
              ↕
          (可重启)

使用

lc = lifecycle_plugin.create("my-plugin")
lc.on("after_start", lambda: print("started"))
lc.start()