Skip to content

Commit 4abca4c

Browse files
committed
chore: prepare v0.7.2 release
1 parent 3c2b9c1 commit 4abca4c

22 files changed

Lines changed: 230 additions & 17 deletions

.github/workflows/release.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,29 @@ jobs:
2323
run: |
2424
VERSION="${{ steps.version.outputs.VERSION }}"
2525
# Extract section between current version and next (or end)
26-
CHANGELOG=$(awk -v ver="$VERSION" '
26+
CHANGELOG="$(awk -v ver="$VERSION" '
2727
/^## \[/ { in_section = 0 }
2828
index($0, "## [" ver "]") == 1 { in_section = 1; next }
2929
in_section && /^## \[/ { exit }
3030
in_section { print }
31-
' CHANGELOG.md | tail -n +2)
32-
echo "BODY=${CHANGELOG//$'\n'/\\n}" >> $GITHUB_OUTPUT
31+
' CHANGELOG.md | sed '/./,$!d')"
32+
33+
if [ -z "$CHANGELOG" ]; then
34+
echo "No CHANGELOG section found for version $VERSION" >&2
35+
exit 1
36+
fi
37+
38+
{
39+
echo "BODY<<EOF"
40+
echo "$CHANGELOG"
41+
echo "EOF"
42+
} >> "$GITHUB_OUTPUT"
3343
3444
- name: Create GitHub Release
3545
uses: softprops/action-gh-release@v2
3646
with:
3747
tag_name: ${{ github.ref }}
38-
name: ${{ steps.version.outputs.VERSION }}
48+
name: v${{ steps.version.outputs.VERSION }}
3949
body: ${{ steps.changelog.outputs.BODY }}
4050
draft: false
4151
prerelease: false

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- **Claude Code plugin**: Store session state and active persona under `${CLAUDE_PLUGIN_DATA}` so marketplace installs keep persistent data across plugin cache updates.
1313
- **Persona switching**: Avoid modifying plugin cache source files when `/inner-os persona use` runs inside Claude Code; repository and global-install workflows still update platform adapter files.
1414

15+
### Added
16+
17+
- **Claude Code hooks**: Add `PostCompact`, `SubagentStart`, and `SubagentStop` coverage to preserve Inner OS continuity after compaction and during subagent lifecycles.
18+
- **Cursor plugin packaging**: Add `.cursor-plugin/` metadata so the existing `cursor/` adapter can be discovered as a Cursor plugin component directory.
19+
- **OpenClaw extension packaging**: Add OpenClaw plugin metadata and extension entrypoint for JSONL capture of `▎InnerOS:` outputs.
20+
- **Documentation**: Document Claude Code and Cursor plugin packaging standards in `CLAUDE.md`, including persistent data rules and component path constraints.
21+
1522
## [0.7.1] - 2026-04-16
1623

1724
### Fixed

CLAUDE.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ PostToolUse (success) → normalizes event → appends to state → injects rece
3434
PostToolUseFailure → normalizes failure → increments failureCount → injects error context
3535
3636
PreCompact → saves compactedAt timestamp
37+
PostCompact → injects compact-continuity context with recent events
38+
SubagentStart/SubagentStop → records subagent lifecycle events
3739
3840
Stop → deletes session state file
3941
```
@@ -67,7 +69,7 @@ Platforms degrade gracefully in hook richness:
6769

6870
| Platform | Protocol mechanism | Hook scripts | Reuses hooks/lib/ |
6971
|----------|-------------------|--------------|-------------------|
70-
| Claude Code | Dynamic (reads SKILL.md) | 6 hooks | Yes (canonical) |
72+
| Claude Code | Dynamic (reads SKILL.md) | 9 hooks | Yes (canonical) |
7173
| Codex CLI | SessionStart + PostToolUse + Stop | 3 hooks | Yes |
7274
| Cursor | sessionStart + postToolUse + stop | 3 hooks | Yes |
7375
| OpenCode | Plugin + static instructions | Plugin | No |
@@ -113,7 +115,7 @@ This repository also ships Cursor plugin metadata because AI Inner OS is multi-p
113115
- Every hook wraps its body in `try/catch` and fails silently — hook errors never interrupt the session
114116
- Claude Code plugin session state files live in `${CLAUDE_PLUGIN_DATA}/state/`; repo/global-install fallback state files live in `state/` (gitignored), keyed by sanitized session ID
115117
- `failureCount` increments on consecutive failures, resets to 0 on any success
116-
- Claude Code: PreToolUse uses `hookSpecificOutput.additionalContext`; PostToolUse/PostToolUseFailure output plain text to stdout
118+
- Claude Code: PreToolUse uses `hookSpecificOutput.additionalContext`; PostToolUse/PostToolUseFailure/PostCompact/SubagentStart/SubagentStop output plain text to stdout
117119
- Cursor: sessionStart/postToolUse use `{ additional_context: string }` top-level format; preToolUse removed (can't inject context)
118120
- Codex: SessionStart outputs plain text to stdout; PostToolUse uses `hookSpecificOutput.additionalContext` JSON; PreToolUse removed (additionalContext not supported)
119121
- Bash commands are truncated at 80 chars in target extraction

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ Core principles:
203203
| Protocol Injection | Hook reads SKILL.md dynamically | SessionStart Hook | sessionStart Hook | Plugin + instructions | Skill or `.hermes.md` | Skill (AgentSkills format) |
204204
| Post-tool hook | `PostToolUse` | `PostToolUse` | `postToolUse` | Plugin event |||
205205
| Failure tracking | `PostToolUseFailure` ||||||
206+
| Compaction continuity | `PreCompact` + `PostCompact` ||||||
207+
| Subagent lifecycle | `SubagentStart` + `SubagentStop` ||||||
206208
| Persona switching | `/inner-os persona` command | Dynamic (Hook reads) | Dynamic (Hook reads) | Plugin tool | Script injection | Script injection |
207209
| Installation | Plugin marketplace one-click | `install.js` global | `install.js` global | `install.js` global | `install.js` global | `install.js` global |
208210
| Shared logic | `hooks/lib/` (canonical) | Reuses `hooks/lib/` | Reuses `hooks/lib/` | Standalone Plugin | Static injection only | Static injection only |
@@ -219,6 +221,10 @@ PreToolUse → Tool execution → PostToolUse (success)
219221
220222
PreCompact → Save state
221223
224+
PostCompact → Restore compact-continuity context
225+
226+
SubagentStart/SubagentStop → Track subagent lifecycle
227+
222228
Stop → Clean up state
223229
```
224230

@@ -229,6 +235,9 @@ Stop → Clean up state
229235
| `PostToolUse` | After successful execution | Track events, inject recent activity context |
230236
| `PostToolUseFailure` | After failed execution | Track failures, inject error context and consecutive failure count |
231237
| `PreCompact` | Before context compaction | Save state, maintain protocol continuity |
238+
| `PostCompact` | After context compaction | Inject compact-continuity context |
239+
| `SubagentStart` | Subagent starts | Track subagent lifecycle start |
240+
| `SubagentStop` | Subagent stops | Track subagent lifecycle completion |
232241
| `Stop` | Session end | Clean up state files |
233242

234243
---

README_CN.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ Inner OS 的行为协议定义在 [`protocol/SKILL.md`](protocol/SKILL.md),是
203203
| 协议注入 | Hook 动态读取 SKILL.md | SessionStart Hook | sessionStart Hook | Plugin + instructions | Skill 或 `.hermes.md` | Skill(AgentSkills 格式) |
204204
| 工具执行后 hook | `PostToolUse` | `PostToolUse` | `postToolUse` | Plugin event |||
205205
| 失败追踪 | `PostToolUseFailure` ||||||
206+
| 压缩连续性 | `PreCompact` + `PostCompact` ||||||
207+
| 子代理生命周期 | `SubagentStart` + `SubagentStop` ||||||
206208
| 人设切换 | `/inner-os persona` 命令 | 动态(Hook 读取) | 动态(Hook 读取) | Plugin tool | 脚本注入 | 脚本注入 |
207209
| 安装方式 | 插件市场一键安装 | `install.js` 全局安装 | `install.js` 全局安装 | `install.js` 全局安装 | `install.js` 全局安装 | `install.js` 全局安装 |
208210
| 共享逻辑 | `hooks/lib/`(原始实现) | 复用 `hooks/lib/` | 复用 `hooks/lib/` | 独立 Plugin | 纯静态注入 | 纯静态注入 |
@@ -219,6 +221,10 @@ PreToolUse → 工具执行 → PostToolUse (成功)
219221
220222
PreCompact → 保存状态
221223
224+
PostCompact → 恢复压缩后的连续上下文
225+
226+
SubagentStart/SubagentStop → 追踪子代理生命周期
227+
222228
Stop → 清理状态
223229
```
224230

@@ -229,6 +235,9 @@ Stop → 清理状态
229235
| `PostToolUse` | 工具执行成功后 | 追踪事件,注入最近活动上下文 |
230236
| `PostToolUseFailure` | 工具执行失败后 | 追踪失败,注入错误上下文和连续失败计数 |
231237
| `PreCompact` | 上下文压缩前 | 保存状态,维持协议连续性 |
238+
| `PostCompact` | 上下文压缩后 | 注入压缩后连续性上下文 |
239+
| `SubagentStart` | 子代理启动 | 记录子代理开始事件 |
240+
| `SubagentStop` | 子代理结束 | 记录子代理结束事件 |
232241
| `Stop` | 会话结束 | 清理状态文件 |
233242

234243
---

codex/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,5 @@ Codex CLI 支持读取 Inner OS 人设配置。手动编辑 `personas/_active.js
6767
|---|---|---|
6868
| 协议注入 | SessionStart hook 自动读取 SKILL.md | AGENTS.md 静态加载 |
6969
| 失败追踪 | PostToolUseFailure 独立 hook | 无(Codex 暂不支持) |
70-
| Hook 数量 | 6| 4|
70+
| Hook 数量 | 9| 3|
7171
| 安装方式 | 插件市场一键安装 | 手动复制配置文件 |

cursor/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,6 @@ node ~/.inner-os/scripts/switch-persona.js default
7474
| | Claude Code | Codex CLI | Cursor |
7575
|---|---|---|---|
7676
| 协议注入 | SessionStart hook 读取 SKILL.md | SessionStart hook / AGENTS.md | `.mdc` 规则 + `sessionStart` hook |
77-
| Hook 数量 | 6| 3 个 | 3 个 |
77+
| Hook 数量 | 9| 3 个 | 3 个 |
7878
| 失败追踪 | PostToolUseFailure | 不支持 | 不支持 |
7979
| 安装方式 | 插件市场一键安装 | `install.js` 全局安装 | Cursor 插件清单 / `install.js` 全局安装 |

docs/install-claude-code.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Claude Code 安装指南
22

3-
[Claude Code](https://claude.ai/code) 中安装 AI Inner OS。这是功能最完整的平台,拥有 6 个生命周期 hook。
3+
[Claude Code](https://claude.ai/code) 中安装 AI Inner OS。这是功能最完整的平台,拥有 9 个生命周期 hook。
44

55
## 前置条件
66

@@ -80,6 +80,10 @@ PostToolUseFailure (失败) → 追踪失败,注入错误上下文
8080
8181
PreCompact → 保存状态
8282
83+
PostCompact → 恢复压缩后的连续上下文
84+
85+
SubagentStart/SubagentStop → 追踪子代理生命周期
86+
8387
Stop → 清理状态
8488
```
8589

@@ -90,6 +94,9 @@ Stop → 清理状态
9094
| `PostToolUse` | 工具执行成功后 | 追踪事件,注入最近活动上下文 |
9195
| `PostToolUseFailure` | 工具执行失败后 | 追踪失败,注入错误上下文和连续失败计数 |
9296
| `PreCompact` | 上下文压缩前 | 保存状态,维持协议连续性 |
97+
| `PostCompact` | 上下文压缩后 | 注入压缩后连续性上下文 |
98+
| `SubagentStart` | 子代理启动 | 记录子代理开始事件 |
99+
| `SubagentStop` | 子代理结束 | 记录子代理结束事件 |
93100
| `Stop` | 会话结束 | 清理状态文件 |
94101

95102
## 文件说明
@@ -102,6 +109,9 @@ Stop → 清理状态
102109
| `hooks/post-tool-use.js` | 归一化事件,更新状态 |
103110
| `hooks/post-tool-use-failure.js` | 追踪失败事件 |
104111
| `hooks/pre-compact.js` | 压缩前保存状态 |
112+
| `hooks/post-compact.js` | 压缩后注入连续性上下文 |
113+
| `hooks/subagent-start.js` | 记录子代理启动事件 |
114+
| `hooks/subagent-stop.js` | 记录子代理结束事件 |
105115
| `hooks/stop.js` | 清理会话状态文件 |
106116
| `hooks/lib/` | 共享逻辑(状态管理、事件归一化、prompt 拼装等) |
107117
| `protocol/SKILL.md` | Inner OS 行为协议(唯一数据源) |

docs/install-codex.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ codex_hooks = true
8181
|---|---|---|
8282
| 协议注入 | Hook 动态读取 `SKILL.md` | `SessionStart` Hook + `AGENTS.md` |
8383
| 失败追踪 | `PostToolUseFailure` 独立 hook | 不支持 |
84-
| Hook 数量 | 6| 3 个 |
84+
| Hook 数量 | 9| 3 个 |
8585
| 工具覆盖 | 所有工具 | 仅 Bash |
8686
| 安装方式 | 插件市场一键安装 | 全局安装脚本或手动 |
8787
| 路径解析 | `${CLAUDE_PLUGIN_ROOT}` 自动解析 | 安装脚本生成绝对路径 |

docs/installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ AI Inner OS 支持 6 个平台。选择你使用的平台查看详细安装文
1313

1414
## 快速选择
1515

16-
- **想要最完整的体验?**[Claude Code](install-claude-code.md)6 个生命周期 hook,插件市场一键安装)
16+
- **想要最完整的体验?**[Claude Code](install-claude-code.md)9 个生命周期 hook,插件市场一键安装)
1717
- **使用 OpenAI 生态?**[Codex CLI](install-codex.md)(4 个 hook,手动配置)
1818
- **用 IDE 写代码?**[Cursor](install-cursor.md)(规则文件自动生效)
1919
- **轻量级 CLI?**[OpenCode CLI](install-opencode.md)(纯静态注入)
@@ -24,7 +24,7 @@ AI Inner OS 支持 6 个平台。选择你使用的平台查看详细安装文
2424
| | Claude Code | Codex CLI | Cursor | OpenCode | Hermes Agent | OpenClaw |
2525
|---|---|---|---|---|---|---|
2626
| 协议注入 | Hook 动态读取 | SessionStart Hook | sessionStart Hook | Plugin + instructions | Skill / `.hermes.md` | Skill |
27-
| Hook 数量 | 6 | 3 | 3 | Plugin | 0 | 0 |
27+
| Hook 数量 | 9 | 3 | 3 | Plugin | 0 | 0 |
2828
| 失败追踪 |||||||
2929
| 斜杠命令 | `/inner-os` ||| `inner-os` tool | `/inner-os` | `/inner-os` |
3030
| 人设切换 | `/inner-os persona` 命令 | 动态(Hook 读取) | 动态(Hook 读取) | Plugin tool | 脚本注入 | 脚本注入 |

0 commit comments

Comments
 (0)