Skip to content

Commit bf1c123

Browse files
committed
feat: add configurable Inner OS trigger frequency
1 parent b6a77b6 commit bf1c123

39 files changed

Lines changed: 841 additions & 104 deletions

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{
1212
"name": "ai-inner-os",
1313
"description": "Claude Code hook-based plugin scaffold for visible AI inner monologue.",
14-
"version": "0.7.2",
14+
"version": "0.7.3",
1515
"source": "./",
1616
"author": {
1717
"name": "SummerSec",

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ai-inner-os",
3-
"version": "0.7.2",
3+
"version": "0.7.3",
44
"description": "Makes Claude Code sessions expose a visible Inner OS monologue layer in the format ▎InnerOS:...",
55
"author": {
66
"name": "SummerSec",

.codex-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ai-inner-os",
3-
"version": "0.7.2",
3+
"version": "0.7.3",
44
"description": "Expose a visible Inner OS monologue layer in Codex sessions with protocol injection and hook-based tool context.",
55
"author": {
66
"name": "SummerSec",

.cursor-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{
1212
"name": "ai-inner-os",
1313
"description": "Visible Inner OS monologue layer for Cursor sessions.",
14-
"version": "0.7.2",
14+
"version": "0.7.3",
1515
"source": "./",
1616
"author": {
1717
"name": "SummerSec",

.cursor-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ai-inner-os",
33
"displayName": "AI Inner OS",
4-
"version": "0.7.2",
4+
"version": "0.7.3",
55
"description": "Expose a visible Inner OS monologue layer in Cursor sessions, with optional hook-based event context and persona-aware protocol injection.",
66
"author": {
77
"name": "SummerSec",

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.7.3] - 2026-05-10
9+
10+
### Added
11+
12+
- **Trigger frequency**: Add `low`, `normal`, and `high` Inner OS frequency levels across the canonical protocol and platform adapter copies.
13+
- **Runtime reminders**: Track tool-event cadence in hook state and inject stronger `▎InnerOS:` reminders after failures or consecutive tool activity.
14+
- **Installer**: Add `--frequency <low|normal|high>` and persist the setting to `~/.inner-os/config.json`; OpenCode instructions receive an install-time frequency override.
15+
- **Hermes plugin**: Add a native Hermes plugin package with `pre_llm_call`, `on_session_start`, `/inner-os`, and bundled `plugin:inner-os` skill support.
16+
17+
### Changed
18+
19+
- **OpenClaw**: Align the plugin entrypoint with `definePluginEntry`, add OpenClaw package metadata, and expose a `frequency` config option.
20+
- **OpenCode**: Use the official `@opencode-ai/plugin` `tool()` helper and prefer globally installed Inner OS protocol/persona files when available.
21+
- **Documentation**: Refresh OpenClaw, OpenCode, Hermes, and global installation docs for plugin packaging and frequency configuration.
22+
823
## [0.7.2] - 2026-05-10
924

1025
### Fixed
@@ -69,6 +84,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6984

7085
- Persona system: preset personas, custom template, `/inner-os` command updates, and persona sections in platform adapter docs.
7186

87+
[0.7.3]: https://github.com/SummerSec/AI-Inner-Os/releases/tag/v0.7.3
7288
[0.7.2]: https://github.com/SummerSec/AI-Inner-Os/releases/tag/v0.7.2
7389
[0.7.1]: https://github.com/SummerSec/AI-Inner-Os/releases/tag/v0.7.1
7490
[0.7.0]: https://github.com/SummerSec/AI-Inner-Os/releases/tag/v0.7.0

CLAUDE.md

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ npm run switch-persona # switch persona across all platform files
1313
node scripts/install.js # global install for all platforms
1414
# usage: node scripts/install.js --all
1515
# usage: node scripts/install.js --platform cursor
16+
# usage: node scripts/install.js --all --frequency high
1617
```
1718

1819
No build step. Pure ESM, Node.js >= 18.
@@ -73,8 +74,8 @@ Platforms degrade gracefully in hook richness:
7374
| Codex CLI | SessionStart + PostToolUse + Stop | 3 hooks | Yes |
7475
| Cursor | sessionStart + postToolUse + stop | 3 hooks | Yes |
7576
| OpenCode | Plugin + static instructions | Plugin | No |
76-
| Hermes Agent | Skill or .hermes.md context file | None | No |
77-
| OpenClaw | Skill (AgentSkills format) | None | No |
77+
| Hermes Agent | Plugin, Skill, or .hermes.md context file | Python plugin hooks | No |
78+
| OpenClaw | Native plugin + Skill (AgentSkills format) | Plugin hook | No |
7879

7980
### Plugin Registration
8081

@@ -85,6 +86,8 @@ Platforms degrade gracefully in hook richness:
8586
- `.agents/plugins/marketplace.json` — repo-scoped Codex marketplace metadata
8687
- `.cursor-plugin/plugin.json` — plugin identity and component paths for Cursor plugin packaging
8788
- `.cursor-plugin/marketplace.json` — Cursor marketplace metadata
89+
- `openclaw.plugin.json` + `package.json#openclaw` — OpenClaw native plugin metadata and entrypoint paths
90+
- `hermes/plugins/inner-os/plugin.yaml` — Hermes native plugin metadata
8891
- `plugin.json` — repo-level metadata
8992
- Version must be bumped across all platform manifests and package metadata for updates to reach installed users: `package.json`, `plugin.json`, `.claude-plugin/plugin.json`, `.claude-plugin/marketplace.json`, `.codex-plugin/plugin.json`, `.cursor-plugin/plugin.json`, `.cursor-plugin/marketplace.json`, and `openclaw.plugin.json`
9093

@@ -124,6 +127,40 @@ This repository ships both legacy Codex adapter files and formal Codex plugin me
124127
- Codex currently uses `SessionStart`, `PostToolUse`, and `Stop` in this repo. Do not document unsupported Codex hooks as active behavior.
125128
- Keep Codex documentation in `codex/README.md` and `docs/install-codex.md` aligned with `.codex-plugin/plugin.json`, `.agents/plugins/marketplace.json`, and `codex/hooks.json`.
126129

130+
### OpenClaw Plugin Standards
131+
132+
This repository ships both OpenClaw skill content and an OpenClaw extension entrypoint:
133+
134+
- OpenClaw native plugin metadata lives in `openclaw.plugin.json`; keep `id`, `version`, `description`, `configSchema`, `activation`, and `skills` valid for OpenClaw plugin discovery.
135+
- OpenClaw runtime entrypoints are declared in `package.json#openclaw.extensions` / `runtimeExtensions` and point to `openclaw/index.js`.
136+
- The plugin entrypoint uses `definePluginEntry` from `openclaw/plugin-sdk/plugin-entry`; keep it covered by `npm run check`.
137+
- OpenClaw skill content lives under `openclaw/skills/inner-os/SKILL.md` and should remain AgentSkills-compatible.
138+
- Plugin-distributed skills are lower precedence than workspace, project, personal, and managed skill locations. Do not assume plugin skills override user/workspace skills.
139+
- Keep OpenClaw docs in `openclaw/README.md` and `docs/install-openclaw.md` aligned with `openclaw.plugin.json`, `openclaw/index.js`, and `openclaw/skills/inner-os/SKILL.md`.
140+
141+
### OpenCode Plugin Standards
142+
143+
OpenCode uses a standalone JavaScript plugin plus static instruction files:
144+
145+
- The OpenCode plugin entrypoint is `opencode/plugins/inner-os.js`; it does not reuse `hooks/lib/`.
146+
- OpenCode custom tools should use the official `tool()` helper from `@opencode-ai/plugin`.
147+
- Static Inner OS instructions live in `opencode/inner-os-rules.md` and optional config examples live under `opencode/`.
148+
- OpenCode plugins are loaded from `.opencode/plugins/` or `~/.config/opencode/plugins/`, or from npm packages configured in `opencode.json`.
149+
- OpenCode plugin code should follow the official plugin API and event names. Do not document hook-style Claude/Codex lifecycle events as OpenCode behavior.
150+
- Keep `opencode/README.md`, `docs/install-opencode.md`, and `scripts/install.js` aligned with the plugin entrypoint and instruction file paths.
151+
152+
### Hermes Plugin Standards
153+
154+
Hermes supports both plugin-style packaging and skills/context-file workflows:
155+
156+
- This repo ships a Hermes native plugin under `hermes/plugins/inner-os/` with `plugin.yaml` and `__init__.py`.
157+
- The Hermes plugin registers `pre_llm_call`, `on_session_start`, `/inner-os`, and a bundled `plugin:inner-os` skill.
158+
- The repo also supports standalone Hermes workflows through `hermes/skills/inner-os/SKILL.md` and `hermes/hermes.md`.
159+
- Hermes skills should keep Hermes-specific frontmatter such as version/category/tags when present, and remain compatible with the Hermes skills system.
160+
- `hermes/hermes.md` is the project context-file variant; keep it synchronized with the canonical protocol and persona markers.
161+
- Do not assume Hermes supports the same JavaScript hook model as Claude Code, Codex, or Cursor.
162+
- Keep `hermes/README.md` and `docs/install-hermes.md` aligned with the plugin, skill, and context-file installation paths.
163+
127164
### Key Patterns
128165

129166
- Every hook wraps its body in `try/catch` and fails silently — hook errors never interrupt the session
@@ -136,7 +173,7 @@ This repository ships both legacy Codex adapter files and formal Codex plugin me
136173

137174
### Global Install Script
138175

139-
`scripts/install.js` handles global installation for all platforms. It copies shared core files (hooks/lib/, protocol/, personas/) to `~/.inner-os/`, then generates platform-specific config files with absolute paths. After global install, hook-based platforms (Cursor, Codex) read personas dynamically at runtime — no re-copying needed after persona switches.
176+
`scripts/install.js` handles global installation for all platforms. It copies shared core files (hooks/lib/, protocol/, personas/) to `~/.inner-os/`, writes `~/.inner-os/config.json` with the Inner OS trigger frequency (`low`, `normal`, or `high`), then generates platform-specific config files with absolute paths. After global install, hook-based platforms (Cursor, Codex) read personas dynamically at runtime — no re-copying needed after persona switches.
140177

141178
### OpenCode Plugin
142179

codex/AGENTS.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@
99
- 当你想输出内心独白时,使用这个前缀:`▎InnerOS:`
1010
- 独白通常保持简短,像脑内突然冒出来的一句旁白
1111
- 独白可以出现在回复开头、中间或结尾
12-
- 独白是否出现,由你自己判断
12+
- 默认频率为 `normal`:每个明确任务至少输出一次独白;遇到复杂判断、工具失败、计划变更或最终交付前,应优先输出一条
13+
14+
## 触发频率
15+
16+
- `low`:只在关键判断、失败恢复、重要结论前输出
17+
- `normal`:每个任务至少一次;复杂任务可在开始、转折、验证或收尾阶段各输出一次
18+
- `high`:阶段推进、连续工具调用、失败重试、发现问题时都可以输出;避免每句话都刷屏
19+
- 如果连续多轮没有出现 `▎InnerOS:`,下一次有判断点时应主动补一条简短独白
1320

1421
## 允许的表达
1522

cursor/rules/inner-os-protocol.mdc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ alwaysApply: true
1414
- 当你想输出内心独白时,使用这个前缀:`▎InnerOS:`
1515
- 独白通常保持简短,像脑内突然冒出来的一句旁白
1616
- 独白可以出现在回复开头、中间或结尾
17-
- 独白是否出现,由你自己判断
17+
- 默认频率为 `normal`:每个明确任务至少输出一次独白;遇到复杂判断、工具失败、计划变更或最终交付前,应优先输出一条
18+
19+
## 触发频率
20+
21+
- `low`:只在关键判断、失败恢复、重要结论前输出
22+
- `normal`:每个任务至少一次;复杂任务可在开始、转折、验证或收尾阶段各输出一次
23+
- `high`:阶段推进、连续工具调用、失败重试、发现问题时都可以输出;避免每句话都刷屏
24+
- 如果连续多轮没有出现 `▎InnerOS:`,下一次有判断点时应主动补一条简短独白
1825

1926
## 允许的表达
2027

docs/install-codex.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ node scripts/install.js --platform codex
4444
- 生成 `~/.codex/hooks.json`(带绝对路径)
4545
- 复制 `AGENTS.md``~/.codex/`
4646
- 复制所有预设人设文件
47+
- 写入触发频率配置;可用 `--frequency high` 提高独白提醒频率
4748

4849
### 方式三:手动安装
4950

0 commit comments

Comments
 (0)