You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"description": "Expose a visible Inner OS monologue layer in Cursor sessions, with optional hook-based event context and persona-aware protocol injection.",
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
+
## [0.7.2] - 2026-05-10
9
+
10
+
### Fixed
11
+
12
+
-**Claude Code plugin**: Store session state and active persona under `${CLAUDE_PLUGIN_DATA}` so marketplace installs keep persistent data across plugin cache updates.
13
+
-**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.
14
+
8
15
## [0.7.1] - 2026-04-16
9
16
10
17
### Fixed
@@ -54,6 +61,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
54
61
55
62
- Persona system: preset personas, custom template, `/inner-os` command updates, and persona sections in platform adapter docs.
Copy file name to clipboardExpand all lines: CLAUDE.md
+35-5Lines changed: 35 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,18 +44,22 @@ Stop → deletes session state file
44
44
45
45
### Persona Switching Script
46
46
47
-
`scripts/switch-persona.js` handles cross-platform persona switching. It reads persona files from `personas/`, updates `personas/_active.json`, and injects the persona content between `<!-- ACTIVE_PERSONA_START -->` / `<!-- ACTIVE_PERSONA_END -->` markers in all 6 platform adapter files. The `/inner-os persona use` command calls this script via Bash.
47
+
`scripts/switch-persona.js` handles persona switching for both repository/global-install workflows and Claude Code plugin runtime:
48
+
49
+
- Repository/global install: reads persona files from `personas/`, updates `personas/_active.json`, and injects persona content between `<!-- ACTIVE_PERSONA_START -->` / `<!-- ACTIVE_PERSONA_END -->` markers in all platform adapter files.
50
+
- Claude Code plugin runtime: when `CLAUDE_PLUGIN_DATA` is present, writes the active persona to `${CLAUDE_PLUGIN_DATA}/personas/_active.json` and does **not** modify plugin cache source files.
51
+
-`/inner-os persona use` calls this script via Bash from the installed Claude Code plugin.
48
52
49
53
### hooks/lib/ — Shared Logic
50
54
51
55
All hook scripts (including codex/ and cursor/ adapters) import from `hooks/lib/`:
-**state.js** — per-session JSON files in `state/`, recent-events ring buffer (max 10), consecutive failure counter
58
+
-**state.js** — per-session JSON files in `${CLAUDE_PLUGIN_DATA}/state/` for Claude Code plugin installs, falling back to repo `state/` outside plugin runtime; recent-events ring buffer (max 10), consecutive failure counter
55
59
-**events.js** — `inferEventType()` classifies tools by name; `inferResult()` derives success/failure; `normalizeToolEvent()` / `normalizeFailureEvent()` produce structured events; `extractToolTarget()` pulls the key field from tool input
- Version must be bumped in all three `plugin.json` / `package.json` files for updates to reach installed users
85
+
- 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`, `.cursor-plugin/plugin.json`, `.cursor-plugin/marketplace.json`, and `openclaw.plugin.json`
86
+
87
+
### Claude Code Plugin Standards
88
+
89
+
Follow the Claude Code plugin reference when changing Claude plugin packaging:
90
+
91
+
- The Claude Code manifest lives at `.claude-plugin/plugin.json`. Only manifest files belong under `.claude-plugin/`; component directories stay at the plugin root.
92
+
- Default component locations are root-level `commands/`, `skills/`, `agents/`, `hooks/hooks.json`, `.mcp.json`, `.lsp.json`, `output-styles/`, `themes/`, and `monitors/`.
93
+
- Custom component paths in `.claude-plugin/plugin.json` must be relative to the plugin root and start with `./`. Do not use absolute paths or `..` traversal.
94
+
- Hook commands bundled with the plugin must reference plugin files through `${CLAUDE_PLUGIN_ROOT}`. Do not assume the repository checkout path exists after marketplace installation.
95
+
- Persistent state must go under `${CLAUDE_PLUGIN_DATA}`. Do not write mutable runtime data, active persona settings, caches, or generated files into the plugin root/cache.
96
+
- Marketplace installs are cached by plugin version. If `.claude-plugin/plugin.json` has an explicit `version`, bump it for every published update; pushing commits alone is not enough.
97
+
- Validate packaging changes with `claude plugin validate .`, then run `npm run check` and `npm test`.
98
+
99
+
### Cursor Plugin Standards
100
+
101
+
This repository also ships Cursor plugin metadata because AI Inner OS is multi-platform:
102
+
103
+
- Cursor plugin metadata lives in `.cursor-plugin/plugin.json`; `.cursor-plugin/marketplace.json` is the Cursor marketplace metadata entry.
104
+
- The current Cursor design uses `cursor/` as the plugin component directory. `.cursor-plugin/plugin.json` points to `rules: "./cursor/rules/"` and `hooks: "./cursor/hooks.json"`.
105
+
- Cursor component paths must be relative, stay inside the plugin/repository root, and must not use absolute paths or `..` traversal.
106
+
- Cursor rules are `.mdc` files with YAML frontmatter. `cursor/rules/inner-os-protocol.mdc` must keep `description` and `alwaysApply: true`.
107
+
- Cursor hooks use lowercase event names in this repo's Cursor adapter: `sessionStart`, `postToolUse`, and `stop`. Cursor hook output uses top-level `{ "additional_context": "..." }`.
108
+
- Cursor `preToolUse` is intentionally not used for context injection because it cannot inject `additional_context`.
109
+
- Keep Cursor documentation in `cursor/README.md` and `docs/install-cursor.md` aligned with `.cursor-plugin/plugin.json` and `cursor/hooks.json`.
80
110
81
111
### Key Patterns
82
112
83
113
- Every hook wraps its body in `try/catch` and fails silently — hook errors never interrupt the session
84
-
-Session state files live in `state/` (gitignored), keyed by sanitized session ID
114
+
-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
85
115
-`failureCount` increments on consecutive failures, resets to 0 on any success
86
116
- Claude Code: PreToolUse uses `hookSpecificOutput.additionalContext`; PostToolUse/PostToolUseFailure output plain text to stdout
0 commit comments