Plugin Lifecycle
No formal plugin lifecycle specification exists. TokenPilot uses host-specific mechanisms:
- OpenClaw: native plugin slot with bundled runtime
- Codex CLI: hooks (
SessionStart,PreToolUse,PostToolUse) viahooks.json - Claude Code:
SessionStarthook + gateway + MCP recovery - DeepSeek Harness: native Cordis plugin (
tokenpilot-dsh); opt-in eviction runs inagent/pre-stepbefore native compaction by default - pi: in-process extension (
before_agent_start,context,turn_end) with a nativememory_fault_recovertool - OpenCode: in-process v1 plugin (
experimental.chat.system.transform,experimental.chat.messages.transform) + recovery MCP registered inopencode.json
Next
- Configuration Model — how plugin config works
- Runtime API — the plugin programming interface