@softspark/ai-toolkit 4.4.0 → 4.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,42 @@ Versioning follows [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ---
9
9
 
10
+ ## v4.4.2 - Ecosystem sync: Claude Code 2.1.158 + Codex 0.134 hook events (2026-05-30)
11
+
12
+ Patch release. Syncs the tool registry and `hook-creator` skill with newly detected upstream hook events and refreshes the ecosystem drift snapshot. No generated output or runtime behavior changes.
13
+
14
+ ### Changed
15
+
16
+ - **Claude Code hook events** - Recorded `MessageDisplay` (new in Claude Code 2.1.152) in `scripts/ecosystem_tools.json` and the `hook-creator` skill's Supported Hook Events table. Also added three real-but-untracked events to the registry: `PostToolUseFailure`, `PostToolBatch`, `UserPromptExpansion`.
17
+ - **Codex hook events** - Recorded the four Codex events we did not track (`PreCompact`, `PostCompact`, `SubagentStart`, `SubagentStop`); Codex exposes 10 lifecycle events. Updated the `scripts/generate_codex_hooks.py` docstring (6 to 10) and `kb/reference/supported-tools-registry.md`.
18
+ - **Ecosystem snapshot** - Refreshed `benchmarks/ecosystem-doctor-snapshot.json` to baseline Claude Code 2.1.158 and Codex 0.134, and bumped the registry `last_updated`.
19
+
20
+ ### Ecosystem
21
+
22
+ - Class-B drift (new Claude Code and Codex hook events) tracked in the registry and skill docs; wiring the Codex subagent/compaction events into generated `.codex/hooks.json` is deferred to a future release. GitHub Copilot docs reorg classified class C (not adopted). Seven editors showed cosmetic-only doc drift (class A).
23
+
24
+ ### Verification
25
+
26
+ - `python3 scripts/validate.py --strict`
27
+ - `python3 scripts/ecosystem_doctor.py --offline --check`
28
+ - `npm test` (1151 passing)
29
+
30
+ ## v4.4.1 - Codex hook output compatibility fix (2026-05-25)
31
+
32
+ Patch release. Fixes Codex `UserPromptSubmit` hook JSON validation failures and visible hook-context noise while preserving hook side effects.
33
+
34
+ ### Fixed
35
+
36
+ - **Codex `UserPromptSubmit` default output** - generated Codex hooks now keep `user-prompt-submit.sh` in quiet plain-text mode, preserving search-first flag side effects without emitting visible `additionalContext` in the Codex TUI.
37
+ - **Event-specific JSON context** - `hook_emit_context` can include `hookSpecificOutput.hookEventName`, and `user-prompt-submit.sh` emits `"UserPromptSubmit"` with `additionalContext` when JSON context mode is explicitly enabled.
38
+ - **Prompt hook output corruption** - `user-prompt-submit.sh` now suppresses filesystem redirection errors when search-first state writes are blocked by sandboxing or local permissions, keeping JSON output parseable.
39
+ - **Usage tracking tracebacks** - `track-usage.sh` now treats stats writes as best-effort and suppresses Python tracebacks when `~/.softspark/ai-toolkit/stats.json` cannot be written.
40
+
41
+ ### Verification
42
+
43
+ - `bats tests/test_hooks.bats --filter 'track-usage|user-prompt-submit|post-tool-use'`
44
+ - `python3 scripts/validate.py --strict`
45
+
10
46
  ## v4.4.0 - native editor skill pointers and hook governance hardening (2026-05-25)
11
47
 
12
48
  Minor release. Adds native skill pointer generation for more editor surfaces and hardens search-first governance so quiet hooks still inject model context without noisy transcript output.
package/README.md CHANGED
@@ -6,16 +6,16 @@
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
7
  [![Skills](https://img.shields.io/badge/skills-107-brightgreen)](app/skills/)
8
8
  [![Agents](https://img.shields.io/badge/agents-44-blue)](app/agents/)
9
- [![Tests](https://img.shields.io/badge/tests-1149%20passing-success)](tests/)
9
+ [![Tests](https://img.shields.io/badge/tests-1151%20passing-success)](tests/)
10
10
 
11
- ## What's New in v4.4.0
11
+ ## What's New in v4.4.2
12
12
 
13
- Minor release. Adds native skill pointers for more editor surfaces and hardens quiet hook governance for Claude and Codex.
13
+ Patch release. Syncs the tool registry and `hook-creator` skill with newly detected upstream hook events and refreshes the ecosystem drift snapshot. No generated output or runtime behavior changes.
14
14
 
15
- - **Native editor skills**: Cursor, Windsurf, and Cline now get generated skill pointer catalogs alongside existing rule surfaces.
16
- - **Quiet JSON governance**: `UserPromptSubmit` keeps output quiet while still injecting `additionalContext` for search-first and workflow reminders.
17
- - **Codex search-first hardening**: Stop enforcement recognizes current Codex MCP log shapes and tolerates noisy skill-loader output.
18
- - **Release coverage updated**: generator, install, Codex, hook, and search-first tests cover the new behavior; suite count is 1149 tests.
15
+ - **Claude Code `MessageDisplay`**: the hook event added in Claude Code 2.1.152 is now tracked in the registry and documented in the `hook-creator` skill.
16
+ - **Three more Claude Code events tracked**: `PostToolUseFailure`, `PostToolBatch`, and `UserPromptExpansion` were real but missing from the registry.
17
+ - **Codex hook events**: recorded the four untracked Codex events (`PreCompact`, `PostCompact`, `SubagentStart`, `SubagentStop`); Codex exposes 10 lifecycle events total.
18
+ - **Drift snapshot refreshed**: baselined Claude Code 2.1.158 and Codex 0.134; `ecosystem_doctor.py --check` is green.
19
19
 
20
20
  See [CHANGELOG.md](CHANGELOG.md) for full history.
21
21
 
@@ -148,7 +148,7 @@ ai-toolkit/
148
148
  │ └── ARCHITECTURE.md # Full system design
149
149
  ├── kb/ # Reference docs, procedures, plans
150
150
  ├── scripts/ # Validation, install, evaluation scripts
151
- ├── tests/ # Bats test suite (1149 tests)
151
+ ├── tests/ # Bats test suite (1151 tests)
152
152
  └── CHANGELOG.md
153
153
  ```
154
154
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ai-toolkit",
3
3
  "description": "Professional-grade Claude Code toolkit with persona presets, skill security auditor, expanded lifecycle hooks, experimental opt-in plugin packs, benchmark harvesting, and multi-tool support.",
4
- "version": "4.4.0",
4
+ "version": "4.4.2",
5
5
  "author": {
6
6
  "name": "SoftSpark",
7
7
  "url": "https://github.com/softspark"
@@ -57,10 +57,16 @@ hook_new_content() {
57
57
  }
58
58
 
59
59
  hook_emit_context() {
60
- local message="$1"
60
+ local event="${2:+$1}"
61
+ local message="${2:-$1}"
61
62
  if [ "${AI_TOOLKIT_HOOK_FORMAT:-}" = "json" ]; then
62
- jq -nc --arg msg "$message" \
63
- '{"hookSpecificOutput":{"additionalContext":$msg},"suppressOutput":true}'
63
+ if [ -n "$event" ]; then
64
+ jq -nc --arg event "$event" --arg msg "$message" \
65
+ '{"hookSpecificOutput":{"hookEventName":$event,"additionalContext":$msg},"suppressOutput":true}'
66
+ else
67
+ jq -nc --arg msg "$message" \
68
+ '{"hookSpecificOutput":{"additionalContext":$msg},"suppressOutput":true}'
69
+ fi
64
70
  elif [ "${AI_TOOLKIT_HOOK_QUIET:-0}" = "1" ]; then
65
71
  return 0
66
72
  elif [ "${AI_TOOLKIT_HOOK_VERBOSE:-0}" = "1" ]; then
@@ -22,10 +22,10 @@ SKILL_NAME=$(printf '%s' "$PROMPT_TEXT" | grep -oE '^/[a-z][a-z0-9-]*' | head -1
22
22
  [ -z "$SKILL_NAME" ] && exit 0
23
23
 
24
24
  # Ensure directory exists
25
- mkdir -p "$(dirname "$STATS_FILE")"
25
+ mkdir -p "$(dirname "$STATS_FILE")" 2>/dev/null || true
26
26
 
27
27
  # Atomic update via python3
28
- python3 - "$STATS_FILE" "$SKILL_NAME" <<'PY'
28
+ python3 - "$STATS_FILE" "$SKILL_NAME" 2>/dev/null <<'PY' || true
29
29
  import json
30
30
  import sys
31
31
  import os
@@ -28,9 +28,9 @@ mkdir -p "$STATE_DIR" 2>/dev/null
28
28
  if [ "$PROMPT_LEN" -gt 30 ] && \
29
29
  [ "${CLAUDE_SKIP_SEARCH_FIRST:-0}" != "1" ] && \
30
30
  ai_toolkit_has_search_provider; then
31
- printf '%s\n%s\n' "$(date -u +%s)" "$PROMPT_TEXT" > "$FLAG" 2>/dev/null
31
+ { printf '%s\n%s\n' "$(date -u +%s)" "$PROMPT_TEXT" > "$FLAG"; } 2>/dev/null
32
32
  else
33
- rm -f "$FLAG" 2>/dev/null
33
+ { rm -f "$FLAG"; } 2>/dev/null
34
34
  fi
35
35
 
36
36
  if ai_toolkit_has_search_provider; then
@@ -50,6 +50,6 @@ else
50
50
  UserPromptSubmit: apply KB-first research, keep changes minimal, and update tests/docs when behavior changes."
51
51
  fi
52
52
 
53
- hook_emit_context "$CONTEXT_MSG"
53
+ hook_emit_context "UserPromptSubmit" "$CONTEXT_MSG"
54
54
 
55
55
  exit 0
@@ -23,6 +23,7 @@ Create a new Claude Code hook following ai-toolkit conventions.
23
23
  | `SessionEnd` | Session is closing | any | Flush logs, save transcripts |
24
24
  | `UserPromptSubmit` | User submits a prompt | any | Prompt governance, usage tracking |
25
25
  | `Notification` | Claude sends a notification | any | OS alerts, Slack pings |
26
+ | `MessageDisplay` | Assistant message is about to be shown to the user | any | Transform or hide assistant message text before display |
26
27
 
27
28
  ### Tool lifecycle
28
29
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "last_run": "2026-05-25T11:12:53Z",
2
+ "last_run": "2026-05-30T19:51:17Z",
3
3
  "schema_version": 1,
4
4
  "tools": {
5
5
  "aider": {
@@ -24,7 +24,7 @@
24
24
  }
25
25
  },
26
26
  "augment": {
27
- "docs_hash": "2546ce56fc2d92e4",
27
+ "docs_hash": "46ef1d20d537234f",
28
28
  "headings": [
29
29
  "Admin",
30
30
  "Auggie CLI",
@@ -65,11 +65,15 @@
65
65
  }
66
66
  },
67
67
  "claude-code": {
68
- "docs_hash": "78dbdbf9b1b09fe8",
68
+ "docs_hash": "b2ee6850b58cee40",
69
69
  "headings": [
70
+ "Core concepts",
70
71
  "Documentation Index",
72
+ "Getting started",
71
73
  "On this page",
72
74
  "Overview",
75
+ "Platforms and integrations",
76
+ "Use Claude Code",
73
77
  "\u200bGet started",
74
78
  "\u200bNext steps",
75
79
  "\u200bUse Claude Code everywhere",
@@ -83,11 +87,14 @@
83
87
  "FileChanged": false,
84
88
  "InstructionsLoaded": false,
85
89
  "MCP server": true,
90
+ "MessageDisplay": false,
86
91
  "Notification": true,
87
92
  "PermissionDenied": false,
88
93
  "PermissionRequest": false,
89
94
  "PostCompact": false,
95
+ "PostToolBatch": false,
90
96
  "PostToolUse": true,
97
+ "PostToolUseFailure": false,
91
98
  "PreCompact": false,
92
99
  "PreToolUse": true,
93
100
  "SKILL.md": true,
@@ -101,6 +108,7 @@
101
108
  "TaskCompleted": false,
102
109
  "TaskCreated": false,
103
110
  "TeammateIdle": false,
111
+ "UserPromptExpansion": false,
104
112
  "UserPromptSubmit": false,
105
113
  "WorktreeCreate": false,
106
114
  "WorktreeRemove": false,
@@ -112,10 +120,10 @@
112
120
  "slash command": true,
113
121
  "sub-agent": true
114
122
  },
115
- "version": "2.1.150 (Claude Code)"
123
+ "version": "2.1.158 (Claude Code)"
116
124
  },
117
125
  "cline": {
118
- "docs_hash": "0d30b8f46cb45976",
126
+ "docs_hash": "9ec25e5132332d2f",
119
127
  "headings": [
120
128
  "API Reference",
121
129
  "Best Practices",
@@ -156,7 +164,7 @@
156
164
  }
157
165
  },
158
166
  "codex-cli": {
159
- "docs_hash": "8cad495445dd03e0",
167
+ "docs_hash": "f7a6a5144e0f61a2",
160
168
  "headings": [
161
169
  "About",
162
170
  "Contributing",
@@ -175,7 +183,7 @@
175
183
  "Packages 0",
176
184
  "Provide feedback",
177
185
  "Quickstart",
178
- "Releases 799",
186
+ "Releases 804",
179
187
  "Repository files navigation",
180
188
  "Resources",
181
189
  "Saved searches",
@@ -193,10 +201,14 @@
193
201
  "AGENTS.md": true,
194
202
  "config.toml": false,
195
203
  "hook event: PermissionRequest": false,
204
+ "hook event: PostCompact": false,
196
205
  "hook event: PostToolUse": false,
206
+ "hook event: PreCompact": false,
197
207
  "hook event: PreToolUse": false,
198
208
  "hook event: SessionStart": false,
199
209
  "hook event: Stop": false,
210
+ "hook event: SubagentStart": false,
211
+ "hook event: SubagentStop": false,
200
212
  "hook event: UserPromptSubmit": false,
201
213
  "hook handler: agent": false,
202
214
  "hook handler: command": false,
@@ -205,10 +217,10 @@
205
217
  "mcp_servers": false,
206
218
  "sandbox": true
207
219
  },
208
- "version": "codex-cli 0.133.0"
220
+ "version": "codex-cli 0.134.0"
209
221
  },
210
222
  "cursor": {
211
- "docs_hash": "56c9209877480e01",
223
+ "docs_hash": "6aa8a8d7cc046f13",
212
224
  "headings": [],
213
225
  "markers": {
214
226
  ".cursor/rules": false,
@@ -224,7 +236,7 @@
224
236
  }
225
237
  },
226
238
  "gemini-cli": {
227
- "docs_hash": "6a47f9b11ff1527d",
239
+ "docs_hash": "5569709cc2e463a8",
228
240
  "headings": [
229
241
  "Breadcrumbs",
230
242
  "Directory actions",
@@ -263,16 +275,16 @@
263
275
  }
264
276
  },
265
277
  "github-copilot": {
266
- "docs_hash": "a5b81592ca646743",
278
+ "docs_hash": "56ac2d5768f930b5",
267
279
  "headings": [
268
280
  "About Copilot auto model selection",
269
281
  "About Copilot integrations",
270
282
  "About agent management",
271
283
  "About agent skills",
272
284
  "About billing for GitHub Copilot in organizations and enterprises",
273
- "About billing for individual GitHub Copilot plans",
274
285
  "About custom agents",
275
286
  "About customizing GitHub Copilot responses",
287
+ "About enterprise accounts for Copilot Business",
276
288
  "Articles",
277
289
  "Did you find what you needed?",
278
290
  "GitHub Copilot",
@@ -295,7 +307,7 @@
295
307
  }
296
308
  },
297
309
  "google-antigravity": {
298
- "docs_hash": "6f089d2c7caabceb",
310
+ "docs_hash": "f933b31ac7414c29",
299
311
  "headings": [],
300
312
  "markers": {
301
313
  "AGENTS.md": false,
@@ -311,7 +323,7 @@
311
323
  }
312
324
  },
313
325
  "opencode": {
314
- "docs_hash": "74eb2d934df9b613",
326
+ "docs_hash": "fe7f7590e4553574",
315
327
  "headings": [
316
328
  "Add features",
317
329
  "Ask questions",
@@ -371,7 +383,7 @@
371
383
  }
372
384
  },
373
385
  "windsurf": {
374
- "docs_hash": "eddf51fabbcaa0a3",
386
+ "docs_hash": "a30041baf564742f",
375
387
  "headings": [
376
388
  "Accounts",
377
389
  "Advanced",
@@ -3,9 +3,9 @@ title: "AI Toolkit - Codex CLI Compatibility"
3
3
  category: reference
4
4
  service: ai-toolkit
5
5
  tags: [codex, compatibility, install, skills, hooks]
6
- version: "1.0.2"
6
+ version: "1.0.3"
7
7
  created: "2026-04-12"
8
- last_updated: "2026-05-21"
8
+ last_updated: "2026-05-25"
9
9
  description: "Reference for how ai-toolkit maps Claude-oriented skills, hooks, and plugin packs to Codex CLI."
10
10
  ---
11
11
 
@@ -110,12 +110,27 @@ This means Claude-only events such as `TaskCompleted`, `TeammateIdle`,
110
110
  `~/.codex/hooks.json` (global layer). Non-Codex events are silently skipped.
111
111
  `remove-hook` cleans both Claude and Codex targets.
112
112
 
113
- Generated Codex hook commands include `AI_TOOLKIT_HOOK_QUIET=1`. The
114
- `UserPromptSubmit` governance hook additionally sets `AI_TOOLKIT_HOOK_FORMAT=json`
115
- so it can pass quiet `additionalContext` before the model responds. This keeps
116
- non-blocking reminders and startup context out of visible hook output while
117
- preserving hook side effects, proactive search-first context, and blocking
118
- decisions such as search-first Stop enforcement.
113
+ Generated Codex hook commands include `AI_TOOLKIT_HOOK_QUIET=1`. The generated
114
+ `UserPromptSubmit` governance hook does not set `AI_TOOLKIT_HOOK_FORMAT=json`
115
+ by default because Codex currently renders `additionalContext` as visible hook
116
+ context in the TUI. This keeps prompt-submit output quiet while preserving hook
117
+ side effects and blocking decisions such as search-first Stop enforcement.
118
+
119
+ Codex `UserPromptSubmit` JSON output is event-specific. When emitting context,
120
+ the hook must include the event name alongside the context:
121
+
122
+ ```json
123
+ {
124
+ "hookSpecificOutput": {
125
+ "hookEventName": "UserPromptSubmit",
126
+ "additionalContext": "..."
127
+ },
128
+ "suppressOutput": true
129
+ }
130
+ ```
131
+
132
+ Older `{"hookSpecificOutput":{"additionalContext":"..."}}` output can be valid
133
+ JSON but fail newer Codex event-output validation.
119
134
 
120
135
  Plain-text informational hook context is also silent by default in the shared
121
136
  hook helper. Set `AI_TOOLKIT_HOOK_VERBOSE=1` only when debugging hook output
@@ -3,7 +3,7 @@ title: "Hooks Catalog"
3
3
  category: reference
4
4
  service: ai-toolkit
5
5
  tags: [hooks, quality, safety, enforcement, settings.json]
6
- version: "1.5.5"
6
+ version: "1.5.6"
7
7
  created: "2026-03-27"
8
8
  last_updated: "2026-05-25"
9
9
  description: "Complete reference of all ai-toolkit hooks: events, scripts, installation, and runtime behavior."
@@ -114,12 +114,29 @@ work, evidence-first debugging, KB-first research, and validation expectations.
114
114
  Skipped when `TOOLKIT_HOOK_PROFILE=minimal`. The bundled `app/hooks.json`
115
115
  registers this command with `AI_TOOLKIT_HOOK_QUIET=1 AI_TOOLKIT_HOOK_FORMAT=json`.
116
116
  This keeps the hook visually quiet (`suppressOutput: true`) while still
117
- injecting `hookSpecificOutput.additionalContext` before Claude starts working.
117
+ injecting event-specific JSON context before Claude starts working in runtimes
118
+ that consume hidden context:
119
+
120
+ ```json
121
+ {
122
+ "hookSpecificOutput": {
123
+ "hookEventName": "UserPromptSubmit",
124
+ "additionalContext": "..."
125
+ },
126
+ "suppressOutput": true
127
+ }
128
+ ```
129
+
118
130
  That context is the proactive half of search-first enforcement; the paired
119
131
  `stop-search-check.sh` remains the corrective half. In plain-text mode,
120
132
  informational reminders are silent by default and require
121
133
  `AI_TOOLKIT_HOOK_VERBOSE=1`.
122
134
 
135
+ Codex-generated hooks intentionally run this script without
136
+ `AI_TOOLKIT_HOOK_FORMAT=json` by default because Codex renders
137
+ `additionalContext` visibly in the TUI; the search-first flag side effect still
138
+ arms the corrective Stop hook.
139
+
123
140
  ### UserPromptSubmit (usage tracking) — `track-usage.sh`
124
141
 
125
142
  | Field | Value |
@@ -129,7 +146,7 @@ informational reminders are silent by default and require
129
146
  | Script | `~/.softspark/ai-toolkit/hooks/track-usage.sh` |
130
147
  | Fires | Before Claude starts working on a submitted prompt |
131
148
 
132
- **Action:** Records skill invocations (slash commands like `/commit`, `/review`) to `~/.softspark/ai-toolkit/stats.json` for local usage analytics. Non-slash prompts are ignored.
149
+ **Action:** Records skill invocations (slash commands like `/commit`, `/review`) to `~/.softspark/ai-toolkit/stats.json` for local usage analytics. Non-slash prompts are ignored. Stats writes are best-effort and stay silent if the local state path is not writable.
133
150
 
134
151
  ### PostToolUse (edit feedback) — `post-tool-use.sh`
135
152
 
@@ -5,7 +5,7 @@ service: ai-toolkit
5
5
  tags: [mcp, editors, compatibility, codex, cursor]
6
6
  version: "1.1.0"
7
7
  created: "2026-04-12"
8
- last_updated: "2026-04-28"
8
+ last_updated: "2026-05-30"
9
9
  description: "Official MCP support matrix and native config targets for editors supported by ai-toolkit."
10
10
  ---
11
11
 
@@ -5,7 +5,7 @@ service: ai-toolkit
5
5
  tags: [editors, platforms, generators, integration, ecosystem]
6
6
  version: "1.3.0"
7
7
  created: "2026-04-23"
8
- last_updated: "2026-05-25"
8
+ last_updated: "2026-05-30"
9
9
  description: "Human-readable view of scripts/ecosystem_tools.json — the canonical list of tools ai-toolkit integrates with (Claude Code + 11 editors), their documentation URLs, config paths, our generators, and tracked capability markers."
10
10
  ---
11
11
 
@@ -30,7 +30,7 @@ The canonical data lives in **`scripts/ecosystem_tools.json`** and is consumed b
30
30
  | Release notes | https://github.com/anthropics/claude-code/releases |
31
31
  | Config paths | `~/.claude/settings.json`, `.claude/settings.local.json`, `CLAUDE.md`, `.claude/agents/*.md`, `.claude/skills/*/SKILL.md`, `~/.claude/themes/*.json` (v2.1.118+) |
32
32
  | Our generators | — (Claude Code is the primary target; toolkit content ships directly as `.md` files and `settings.json` merges) |
33
- | Tracked hook events | Core: `SessionStart`, `SessionEnd`, `UserPromptSubmit`, `Notification`. Tool: `PreToolUse`, `PostToolUse`. Turn: `Stop`, `StopFailure`. Subagent: `SubagentStart`, `SubagentStop`. Compaction: `PreCompact`, `PostCompact`. Permissions: `PermissionRequest`, `PermissionDenied`. Elicitation: `Elicitation`, `ElicitationResult`. Teams: `TaskCreated`, `TaskCompleted`, `TeammateIdle`. Worktrees/env: `WorktreeCreate`, `WorktreeRemove`, `CwdChanged`, `FileChanged`, `ConfigChange`. Setup: `Setup`, `InstructionsLoaded` |
33
+ | Tracked hook events | Core: `SessionStart`, `SessionEnd`, `UserPromptSubmit`, `Notification`, `MessageDisplay`. Tool: `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PostToolBatch`. Turn: `Stop`, `StopFailure`, `UserPromptExpansion`. Subagent: `SubagentStart`, `SubagentStop`. Compaction: `PreCompact`, `PostCompact`. Permissions: `PermissionRequest`, `PermissionDenied`. Elicitation: `Elicitation`, `ElicitationResult`. Teams: `TaskCreated`, `TaskCompleted`, `TeammateIdle`. Worktrees/env: `WorktreeCreate`, `WorktreeRemove`, `CwdChanged`, `FileChanged`, `ConfigChange`. Setup: `Setup`, `InstructionsLoaded` |
34
34
  | Tracked handler types | `command`, `prompt`, `agent`, `mcp_tool` |
35
35
  | Other capabilities | slash commands, MCP server/client, sub-agent, output style, `SKILL.md` (≥500 lines warn) |
36
36
  | Version probe | `claude --version` |
@@ -163,7 +163,7 @@ The canonical data lives in **`scripts/ecosystem_tools.json`** and is consumed b
163
163
  | Release notes | https://github.com/openai/codex/releases |
164
164
  | Config paths | `AGENTS.md`, `.agents/rules/*.md`, `.agents/skills/*/SKILL.md`, `.codex/hooks.json`, `~/.codex/config.toml` |
165
165
  | Our generators | `scripts/generate_codex.py`, `scripts/generate_codex_rules.py`, `scripts/generate_codex_hooks.py`, `scripts/generate_codex_skills.py` (opt-in via `--codex-skills`) |
166
- | Tracked hook events | `PreToolUse`, `PostToolUse`, `SessionStart`, `UserPromptSubmit`, `Stop`, `PermissionRequest` (6 events supported upstream in `config.toml`) |
166
+ | Tracked hook events | Upstream canonical (codex-rs `HookEventName` enum): `PreToolUse`, `PostToolUse`, `PermissionRequest`, `PreCompact`, `PostCompact`, `SessionStart`, `UserPromptSubmit`, `SubagentStart`, `SubagentStop`, `Stop` (10 events). We currently wire a subset: `SessionStart`, `PreToolUse`, `PermissionRequest`, `UserPromptSubmit`, `Stop`. |
167
167
  | Tracked handler types | `command` (emitted by default); `prompt` and `agent` available upstream but authored by hand |
168
168
  | Other capabilities | `AGENTS.md`, `config.toml`, `mcp_servers`, sandbox policies, `.agents/skills/*/SKILL.md` (native Codex skill discovery path) |
169
169
  | Version probe | `codex --version` |
package/llms-full.txt CHANGED
@@ -6965,9 +6965,9 @@ title: "AI Toolkit - Codex CLI Compatibility"
6965
6965
  category: reference
6966
6966
  service: ai-toolkit
6967
6967
  tags: [codex, compatibility, install, skills, hooks]
6968
- version: "1.0.2"
6968
+ version: "1.0.3"
6969
6969
  created: "2026-04-12"
6970
- last_updated: "2026-05-21"
6970
+ last_updated: "2026-05-25"
6971
6971
  description: "Reference for how ai-toolkit maps Claude-oriented skills, hooks, and plugin packs to Codex CLI."
6972
6972
  ---
6973
6973
 
@@ -7072,12 +7072,27 @@ This means Claude-only events such as `TaskCompleted`, `TeammateIdle`,
7072
7072
  `~/.codex/hooks.json` (global layer). Non-Codex events are silently skipped.
7073
7073
  `remove-hook` cleans both Claude and Codex targets.
7074
7074
 
7075
- Generated Codex hook commands include `AI_TOOLKIT_HOOK_QUIET=1`. The
7076
- `UserPromptSubmit` governance hook additionally sets `AI_TOOLKIT_HOOK_FORMAT=json`
7077
- so it can pass quiet `additionalContext` before the model responds. This keeps
7078
- non-blocking reminders and startup context out of visible hook output while
7079
- preserving hook side effects, proactive search-first context, and blocking
7080
- decisions such as search-first Stop enforcement.
7075
+ Generated Codex hook commands include `AI_TOOLKIT_HOOK_QUIET=1`. The generated
7076
+ `UserPromptSubmit` governance hook does not set `AI_TOOLKIT_HOOK_FORMAT=json`
7077
+ by default because Codex currently renders `additionalContext` as visible hook
7078
+ context in the TUI. This keeps prompt-submit output quiet while preserving hook
7079
+ side effects and blocking decisions such as search-first Stop enforcement.
7080
+
7081
+ Codex `UserPromptSubmit` JSON output is event-specific. When emitting context,
7082
+ the hook must include the event name alongside the context:
7083
+
7084
+ ```json
7085
+ {
7086
+ "hookSpecificOutput": {
7087
+ "hookEventName": "UserPromptSubmit",
7088
+ "additionalContext": "..."
7089
+ },
7090
+ "suppressOutput": true
7091
+ }
7092
+ ```
7093
+
7094
+ Older `{"hookSpecificOutput":{"additionalContext":"..."}}` output can be valid
7095
+ JSON but fail newer Codex event-output validation.
7081
7096
 
7082
7097
  Plain-text informational hook context is also silent by default in the shared
7083
7098
  hook helper. Set `AI_TOOLKIT_HOOK_VERBOSE=1` only when debugging hook output
@@ -8880,7 +8895,7 @@ title: "Hooks Catalog"
8880
8895
  category: reference
8881
8896
  service: ai-toolkit
8882
8897
  tags: [hooks, quality, safety, enforcement, settings.json]
8883
- version: "1.5.5"
8898
+ version: "1.5.6"
8884
8899
  created: "2026-03-27"
8885
8900
  last_updated: "2026-05-25"
8886
8901
  description: "Complete reference of all ai-toolkit hooks: events, scripts, installation, and runtime behavior."
@@ -8991,12 +9006,29 @@ work, evidence-first debugging, KB-first research, and validation expectations.
8991
9006
  Skipped when `TOOLKIT_HOOK_PROFILE=minimal`. The bundled `app/hooks.json`
8992
9007
  registers this command with `AI_TOOLKIT_HOOK_QUIET=1 AI_TOOLKIT_HOOK_FORMAT=json`.
8993
9008
  This keeps the hook visually quiet (`suppressOutput: true`) while still
8994
- injecting `hookSpecificOutput.additionalContext` before Claude starts working.
9009
+ injecting event-specific JSON context before Claude starts working in runtimes
9010
+ that consume hidden context:
9011
+
9012
+ ```json
9013
+ {
9014
+ "hookSpecificOutput": {
9015
+ "hookEventName": "UserPromptSubmit",
9016
+ "additionalContext": "..."
9017
+ },
9018
+ "suppressOutput": true
9019
+ }
9020
+ ```
9021
+
8995
9022
  That context is the proactive half of search-first enforcement; the paired
8996
9023
  `stop-search-check.sh` remains the corrective half. In plain-text mode,
8997
9024
  informational reminders are silent by default and require
8998
9025
  `AI_TOOLKIT_HOOK_VERBOSE=1`.
8999
9026
 
9027
+ Codex-generated hooks intentionally run this script without
9028
+ `AI_TOOLKIT_HOOK_FORMAT=json` by default because Codex renders
9029
+ `additionalContext` visibly in the TUI; the search-first flag side effect still
9030
+ arms the corrective Stop hook.
9031
+
9000
9032
  ### UserPromptSubmit (usage tracking) — `track-usage.sh`
9001
9033
 
9002
9034
  | Field | Value |
@@ -9006,7 +9038,7 @@ informational reminders are silent by default and require
9006
9038
  | Script | `~/.softspark/ai-toolkit/hooks/track-usage.sh` |
9007
9039
  | Fires | Before Claude starts working on a submitted prompt |
9008
9040
 
9009
- **Action:** Records skill invocations (slash commands like `/commit`, `/review`) to `~/.softspark/ai-toolkit/stats.json` for local usage analytics. Non-slash prompts are ignored.
9041
+ **Action:** Records skill invocations (slash commands like `/commit`, `/review`) to `~/.softspark/ai-toolkit/stats.json` for local usage analytics. Non-slash prompts are ignored. Stats writes are best-effort and stay silent if the local state path is not writable.
9010
9042
 
9011
9043
  ### PostToolUse (edit feedback) — `post-tool-use.sh`
9012
9044
 
@@ -9988,7 +10020,7 @@ service: ai-toolkit
9988
10020
  tags: [mcp, editors, compatibility, codex, cursor]
9989
10021
  version: "1.1.0"
9990
10022
  created: "2026-04-12"
9991
- last_updated: "2026-04-28"
10023
+ last_updated: "2026-05-30"
9992
10024
  description: "Official MCP support matrix and native config targets for editors supported by ai-toolkit."
9993
10025
  ---
9994
10026
 
@@ -11716,7 +11748,7 @@ service: ai-toolkit
11716
11748
  tags: [editors, platforms, generators, integration, ecosystem]
11717
11749
  version: "1.3.0"
11718
11750
  created: "2026-04-23"
11719
- last_updated: "2026-05-25"
11751
+ last_updated: "2026-05-30"
11720
11752
  description: "Human-readable view of scripts/ecosystem_tools.json — the canonical list of tools ai-toolkit integrates with (Claude Code + 11 editors), their documentation URLs, config paths, our generators, and tracked capability markers."
11721
11753
  ---
11722
11754
 
@@ -11741,7 +11773,7 @@ The canonical data lives in **`scripts/ecosystem_tools.json`** and is consumed b
11741
11773
  | Release notes | https://github.com/anthropics/claude-code/releases |
11742
11774
  | Config paths | `~/.claude/settings.json`, `.claude/settings.local.json`, `CLAUDE.md`, `.claude/agents/*.md`, `.claude/skills/*/SKILL.md`, `~/.claude/themes/*.json` (v2.1.118+) |
11743
11775
  | Our generators | — (Claude Code is the primary target; toolkit content ships directly as `.md` files and `settings.json` merges) |
11744
- | Tracked hook events | Core: `SessionStart`, `SessionEnd`, `UserPromptSubmit`, `Notification`. Tool: `PreToolUse`, `PostToolUse`. Turn: `Stop`, `StopFailure`. Subagent: `SubagentStart`, `SubagentStop`. Compaction: `PreCompact`, `PostCompact`. Permissions: `PermissionRequest`, `PermissionDenied`. Elicitation: `Elicitation`, `ElicitationResult`. Teams: `TaskCreated`, `TaskCompleted`, `TeammateIdle`. Worktrees/env: `WorktreeCreate`, `WorktreeRemove`, `CwdChanged`, `FileChanged`, `ConfigChange`. Setup: `Setup`, `InstructionsLoaded` |
11776
+ | Tracked hook events | Core: `SessionStart`, `SessionEnd`, `UserPromptSubmit`, `Notification`, `MessageDisplay`. Tool: `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PostToolBatch`. Turn: `Stop`, `StopFailure`, `UserPromptExpansion`. Subagent: `SubagentStart`, `SubagentStop`. Compaction: `PreCompact`, `PostCompact`. Permissions: `PermissionRequest`, `PermissionDenied`. Elicitation: `Elicitation`, `ElicitationResult`. Teams: `TaskCreated`, `TaskCompleted`, `TeammateIdle`. Worktrees/env: `WorktreeCreate`, `WorktreeRemove`, `CwdChanged`, `FileChanged`, `ConfigChange`. Setup: `Setup`, `InstructionsLoaded` |
11745
11777
  | Tracked handler types | `command`, `prompt`, `agent`, `mcp_tool` |
11746
11778
  | Other capabilities | slash commands, MCP server/client, sub-agent, output style, `SKILL.md` (≥500 lines warn) |
11747
11779
  | Version probe | `claude --version` |
@@ -11874,7 +11906,7 @@ The canonical data lives in **`scripts/ecosystem_tools.json`** and is consumed b
11874
11906
  | Release notes | https://github.com/openai/codex/releases |
11875
11907
  | Config paths | `AGENTS.md`, `.agents/rules/*.md`, `.agents/skills/*/SKILL.md`, `.codex/hooks.json`, `~/.codex/config.toml` |
11876
11908
  | Our generators | `scripts/generate_codex.py`, `scripts/generate_codex_rules.py`, `scripts/generate_codex_hooks.py`, `scripts/generate_codex_skills.py` (opt-in via `--codex-skills`) |
11877
- | Tracked hook events | `PreToolUse`, `PostToolUse`, `SessionStart`, `UserPromptSubmit`, `Stop`, `PermissionRequest` (6 events supported upstream in `config.toml`) |
11909
+ | Tracked hook events | Upstream canonical (codex-rs `HookEventName` enum): `PreToolUse`, `PostToolUse`, `PermissionRequest`, `PreCompact`, `PostCompact`, `SessionStart`, `UserPromptSubmit`, `SubagentStart`, `SubagentStop`, `Stop` (10 events). We currently wire a subset: `SessionStart`, `PreToolUse`, `PermissionRequest`, `UserPromptSubmit`, `Stop`. |
11878
11910
  | Tracked handler types | `command` (emitted by default); `prompt` and `agent` available upstream but authored by hand |
11879
11911
  | Other capabilities | `AGENTS.md`, `config.toml`, `mcp_servers`, sandbox policies, `.agents/skills/*/SKILL.md` (native Codex skill discovery path) |
11880
11912
  | Version probe | `codex --version` |
package/manifest.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.4.0",
2
+ "version": "4.4.2",
3
3
  "components": {
4
4
  "agents": {
5
5
  "description": "44 specialized agents (orchestrator, backend, frontend, security, devops, etc.)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softspark/ai-toolkit",
3
- "version": "4.4.0",
3
+ "version": "4.4.2",
4
4
  "description": "AI coding toolkit: 107 skills, 44 agents, 12-editor write-through (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo, Aider, Augment, Antigravity, Codex, opencode), machine-enforced safety constitution, SARIF audit, signed npm provenance.",
5
5
  "keywords": [
6
6
  "claude",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema_version": 1,
3
3
  "description": "Authoritative registry of tools ai-toolkit integrates with. Consumed by scripts/ecosystem_doctor.py to detect upstream doc/version drift.",
4
- "last_updated": "2026-05-25",
4
+ "last_updated": "2026-05-30",
5
5
  "tools": [
6
6
  {
7
7
  "id": "claude-code",
@@ -24,12 +24,16 @@
24
24
  "capability_markers": [
25
25
  "PreToolUse",
26
26
  "PostToolUse",
27
+ "PostToolUseFailure",
28
+ "PostToolBatch",
27
29
  "SessionStart",
28
30
  "SessionEnd",
29
31
  "SubagentStart",
30
32
  "SubagentStop",
31
33
  "UserPromptSubmit",
34
+ "UserPromptExpansion",
32
35
  "Notification",
36
+ "MessageDisplay",
33
37
  "Stop",
34
38
  "StopFailure",
35
39
  "PreCompact",
@@ -452,6 +456,10 @@
452
456
  "hook event: UserPromptSubmit",
453
457
  "hook event: Stop",
454
458
  "hook event: PermissionRequest",
459
+ "hook event: PreCompact",
460
+ "hook event: PostCompact",
461
+ "hook event: SubagentStart",
462
+ "hook event: SubagentStop",
455
463
  "hook handler: command",
456
464
  "hook handler: prompt",
457
465
  "hook handler: agent",
@@ -4,10 +4,11 @@
4
4
  Maps compatible ai-toolkit hooks to Codex lifecycle events.
5
5
  Hook scripts are shared with Claude Code (stored in ~/.softspark/ai-toolkit/hooks/).
6
6
 
7
- Codex supports 6 events (PascalCase in config.toml / hooks.json):
8
- ``PreToolUse``, ``PostToolUse``, ``PermissionRequest``, ``SessionStart``,
9
- ``UserPromptSubmit``, ``Stop``. PreToolUse/PostToolUse only support
10
- the ``Bash`` matcher.
7
+ Codex exposes 10 lifecycle events (PascalCase in config.toml / hooks.json):
8
+ ``PreToolUse``, ``PostToolUse``, ``PermissionRequest``, ``PreCompact``,
9
+ ``PostCompact``, ``SessionStart``, ``UserPromptSubmit``, ``SubagentStart``,
10
+ ``SubagentStop``, ``Stop``. PreToolUse/PostToolUse only support the ``Bash``
11
+ matcher. We currently wire the subset defined in ``CODEX_HOOKS`` below.
11
12
 
12
13
  Handler types in Codex: ``command`` (what we emit), ``prompt``, and ``agent``.
13
14
  Reference: codex-rs/config/src/hook_config.rs.
@@ -25,10 +26,6 @@ from pathlib import Path
25
26
 
26
27
 
27
28
  HOOKS_PREFIX = 'AI_TOOLKIT_HOOK_QUIET=1 "$HOME/.softspark/ai-toolkit/hooks/'
28
- HOOKS_JSON_CONTEXT_PREFIX = (
29
- 'AI_TOOLKIT_HOOK_QUIET=1 AI_TOOLKIT_HOOK_FORMAT=json "$HOME/.softspark/ai-toolkit/hooks/'
30
- )
31
-
32
29
  # Hooks compatible with Codex, grouped by event.
33
30
  # Format: (matcher, script_name)
34
31
  CODEX_HOOKS: dict[str, list[tuple[str, str]]] = {
@@ -66,12 +63,7 @@ def build_hooks_json() -> dict:
66
63
  for event, entries in CODEX_HOOKS.items():
67
64
  hooks[event] = []
68
65
  for matcher, script in entries:
69
- prefix = (
70
- HOOKS_JSON_CONTEXT_PREFIX
71
- if event == "UserPromptSubmit" and script == "user-prompt-submit.sh"
72
- else HOOKS_PREFIX
73
- )
74
- entry: dict = {"hooks": [{"type": "command", "command": f"{prefix}{script}\""}]}
66
+ entry: dict = {"hooks": [{"type": "command", "command": f"{HOOKS_PREFIX}{script}\""}]}
75
67
  if matcher:
76
68
  entry["matcher"] = matcher
77
69
  hooks[event].append(entry)