Conversation
Add complete integration for iFlow CLI, enabling persistent memory across
sessions with automatic context injection and observation capture.
Features:
- SessionStart hook: Start worker and inject relevant context
- PostToolUse hook: Capture tool operations as observations
- Stop hook: Generate session summaries
- SessionEnd hook: Save session state
- Skills: @mem-search and @mem-context
Fixes all P1 issues found by Codex Review:
- Fix API paths: /health -> /api/health, /api/observations -> /api/sessions/observations
- Fix request body field: session_id -> contentSessionId
- Fix Search API response handling for { content: [...] } structure
- Convert commands to skills format (SKILL.md)
- Add missing session-complete.js hook for SessionEnd
- Convert all Chinese comments and docs to English
Installation:
curl -fsSL https://raw.githubusercontent.com/thedotmack/claude-mem/main/iflow-cli/install.sh | bash
This follows the same pattern as the existing OpenClaw integration, sharing
the core worker service while adapting to iFlow CLI's hook system.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 16f95e726e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if command -v bun &> /dev/null; then | ||
| echo -e "${GREEN}✓ Bun: $(bun --version)${NC}" | ||
| else | ||
| echo -e "${YELLOW}⚠ Bun not installed (optional, needed for worker)${NC}" | ||
| fi |
There was a problem hiding this comment.
Require Bun before reporting install success
The dependency check treats Bun as optional, but install_iflow_integration writes hook commands that always execute bun-runner (for example the commands added in this same script), so environments without Bun will complete installation and then fail every hook invocation, effectively disabling memory capture. This should fail fast (or install Bun) instead of proceeding as a successful setup.
Useful? React with 👍 / 👎.
iflow-cli/install.sh
Outdated
| echo -e "${GREEN}✓ Worker already running on port ${WORKER_PORT}${NC}" | ||
| else | ||
| # Start worker (background) | ||
| nohup node plugin/scripts/worker-service.cjs start > /dev/null 2>&1 & |
There was a problem hiding this comment.
Launch worker via bun-runner instead of node
In the auto-start path, the installer launches the worker with node plugin/scripts/worker-service.cjs start, but this worker script depends on Bun runtime modules, so the command exits immediately and the installer can never actually start the worker when it is not already running. Reusing the bun-runner invocation used by the hook configuration would make the startup step functional.
Useful? React with 👍 / 👎.
- Make Bun a hard requirement in check_dependencies() since all hooks use bun-runner which requires Bun runtime - Check common Bun installation paths if not in PATH - Start worker via bun-runner instead of node directly, matching hook invocation pattern (worker-service.cjs depends on Bun modules like bun:sqlite)
Summary
Add iFlow CLI integration for claude-mem, enabling persistent memory across sessions with automatic context injection and observation capture.
Installation
```bash
curl -fsSL https://raw.githubusercontent.com/thedotmack/claude-mem/main/iflow-cli/install.sh | bash
```
Architecture
与 Claude Code 版本共享:
Files
```
iflow-cli/
├── .iflow/
│ └── settings.json # Hooks + MCP 配置
├── install.sh # 一键安装脚本
└── README.md # 文档
```