@softspark/ai-toolkit 1.3.11 → 1.3.12

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,19 @@ Versioning follows [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ---
9
9
 
10
+ ## v1.3.12 — Cross-platform notifications + version check fix (2026-04-08)
11
+
12
+ ### Fixed
13
+ - **Version check**: `ai-toolkit status` and session-start hook now read installed version from `state.json` instead of `package.json`, fixing false "up to date" when npm package was upgraded but `ai-toolkit update` not yet run.
14
+ - **Version check**: `status` forces a fresh npm check (no 24h cache) so user always sees real state.
15
+ - **Session-start hook**: `TOOLKIT_DIR` resolved via `npm root -g` instead of broken `../../` relative path from `~/.ai-toolkit/hooks/`.
16
+
17
+ ### Changed
18
+ - **Notification hook**: replaced inline macOS-only `osascript` with cross-platform `notify-waiting.sh` script (macOS/Linux/Windows WSL).
19
+ - **Update notification**: session-start hook now shows desktop notification (macOS/Linux/Windows) when a new version is available.
20
+
21
+ ---
22
+
10
23
  ## v1.3.11 — Proactive Context Checkpointing + Augment CLI (2026-04-08)
11
24
 
12
25
  ### Added
package/README.md CHANGED
@@ -181,7 +181,8 @@ ai-toolkit/
181
181
  │ │ ├── governance-capture.sh # Security-sensitive op logging
182
182
  │ │ ├── commit-quality.sh # Conventional commit advisory
183
183
  │ │ ├── session-context.sh # Environment snapshot on start
184
- │ │ └── track-usage.sh # Skill invocation tracking
184
+ │ │ ├── track-usage.sh # Skill invocation tracking
185
+ │ │ └── notify-waiting.sh # Cross-platform "Claude waiting" notification
185
186
  │ ├── hooks.json # Hook definitions (merged into settings.json)
186
187
  │ ├── plugins/ # Experimental plugin packs (opt-in, not part of default install)
187
188
  │ ├── output-styles/ # System prompt output style overrides
@@ -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": "1.3.11",
4
+ "version": "1.3.12",
5
5
  "author": {
6
6
  "name": "SoftSpark",
7
7
  "url": "https://github.com/softspark"
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env bash
2
+ # notify-waiting.sh — Cross-platform desktop notification when Claude is waiting.
3
+ #
4
+ # Fires on: Notification
5
+ # Non-blocking (always exits 0).
6
+
7
+ MSG="Claude Code needs your attention"
8
+ TITLE="Claude Code"
9
+
10
+ if command -v osascript >/dev/null 2>&1; then
11
+ osascript -e "display notification \"$MSG\" with title \"$TITLE\"" 2>/dev/null &
12
+ elif command -v notify-send >/dev/null 2>&1; then
13
+ notify-send "$TITLE" "$MSG" 2>/dev/null &
14
+ elif command -v powershell.exe >/dev/null 2>&1; then
15
+ powershell.exe -Command "[void](New-Object -ComObject WScript.Shell).Popup('$MSG',5,'$TITLE',64)" 2>/dev/null &
16
+ fi
17
+
18
+ exit 0
@@ -9,10 +9,19 @@ echo "MANDATORY: Before answering ANY technical question, apply ALL rules from y
9
9
  echo "REMINDER: When writing features or fixing bugs, ensure tests cover the changes. When modifying API, config, or setup, update relevant documentation. Propose these steps to the user — do not silently skip them."
10
10
 
11
11
  # 2. Check for updates (cached, max once per 24h, non-blocking)
12
- TOOLKIT_DIR="$(cd "$(dirname "$0")/../.." && pwd)"
12
+ TOOLKIT_DIR="$(npm root -g 2>/dev/null)/@softspark/ai-toolkit"
13
+ [ ! -d "$TOOLKIT_DIR" ] && TOOLKIT_DIR="$(cd "$(dirname "$0")/../.." && pwd)"
13
14
  VERSION_MSG=$(python3 "$TOOLKIT_DIR/scripts/version_check.py" 2>/dev/null)
14
15
  if [ -n "$VERSION_MSG" ]; then
15
16
  echo "$VERSION_MSG"
17
+ # Desktop notification so user sees update before typing
18
+ if command -v osascript >/dev/null 2>&1; then
19
+ osascript -e "display notification \"$VERSION_MSG\" with title \"ai-toolkit\"" 2>/dev/null &
20
+ elif command -v notify-send >/dev/null 2>&1; then
21
+ notify-send "ai-toolkit" "$VERSION_MSG" 2>/dev/null &
22
+ elif command -v powershell.exe >/dev/null 2>&1; then
23
+ powershell.exe -Command "[void](New-Object -ComObject WScript.Shell).Popup('$VERSION_MSG',5,'ai-toolkit',64)" 2>/dev/null &
24
+ fi
16
25
  fi
17
26
 
18
27
  # 3. Load session context (if available)
package/app/hooks.json CHANGED
@@ -39,7 +39,7 @@
39
39
  "hooks": [
40
40
  {
41
41
  "type": "command",
42
- "command": "osascript -e 'display notification \"Claude Code needs your attention\" with title \"Claude Code\"'"
42
+ "command": "bash ~/.ai-toolkit/hooks/notify-waiting.sh"
43
43
  }
44
44
  ]
45
45
  }
@@ -44,15 +44,19 @@ ai-toolkit update # re-copies scripts, re-merges (idempotent)
44
44
  3. Loads session context from `.claude/session-context.md` (if exists)
45
45
  4. Loads active instincts from `.claude/instincts/*.md` (if any)
46
46
 
47
- ### Notification — inline
47
+ ### Notification — `notify-waiting.sh`
48
48
 
49
49
  | Field | Value |
50
50
  |-------|-------|
51
51
  | Event | `Notification` |
52
52
  | Matcher | *(all)* |
53
+ | Script | `~/.ai-toolkit/hooks/notify-waiting.sh` |
53
54
  | Fires | Claude Code waiting for user input |
54
55
 
55
- **Action:** macOS desktop notification via `osascript`.
56
+ **Action:** Cross-platform desktop notification ("Claude Code needs your attention"):
57
+ - macOS: `osascript` (native)
58
+ - Linux: `notify-send` (libnotify)
59
+ - Windows/WSL: `powershell.exe` WScript popup (5s auto-close)
56
60
 
57
61
  ### PreToolUse (Bash) — `guard-destructive.sh`
58
62
 
package/llms-full.txt CHANGED
@@ -2783,15 +2783,19 @@ ai-toolkit update # re-copies scripts, re-merges (idempotent)
2783
2783
  3. Loads session context from `.claude/session-context.md` (if exists)
2784
2784
  4. Loads active instincts from `.claude/instincts/*.md` (if any)
2785
2785
 
2786
- ### Notification — inline
2786
+ ### Notification — `notify-waiting.sh`
2787
2787
 
2788
2788
  | Field | Value |
2789
2789
  |-------|-------|
2790
2790
  | Event | `Notification` |
2791
2791
  | Matcher | *(all)* |
2792
+ | Script | `~/.ai-toolkit/hooks/notify-waiting.sh` |
2792
2793
  | Fires | Claude Code waiting for user input |
2793
2794
 
2794
- **Action:** macOS desktop notification via `osascript`.
2795
+ **Action:** Cross-platform desktop notification ("Claude Code needs your attention"):
2796
+ - macOS: `osascript` (native)
2797
+ - Linux: `notify-send` (libnotify)
2798
+ - Windows/WSL: `powershell.exe` WScript popup (5s auto-close)
2795
2799
 
2796
2800
  ### PreToolUse (Bash) — `guard-destructive.sh`
2797
2801
 
package/manifest.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.11",
2
+ "version": "1.3.12",
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": "1.3.11",
3
+ "version": "1.3.12",
4
4
  "description": "Professional-grade AI coding toolkit: 90 skills, 44 agents, multi-platform support (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment), machine-enforced safety constitution, persona presets, skill security auditor, expanded lifecycle hooks, 11 plugin packs, and benchmark tooling.",
5
5
  "keywords": [
6
6
  "claude",
@@ -126,7 +126,7 @@ def print_status() -> None:
126
126
  import sys as _sys
127
127
  _sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
128
128
  from version_check import check
129
- result = check()
129
+ result = check(force=True)
130
130
  if result["update_available"]:
131
131
  print()
132
132
  print(f" Update available: {result['installed']} -> {result['latest']}")
@@ -27,7 +27,23 @@ PACKAGE_NAME = "@softspark/ai-toolkit"
27
27
 
28
28
 
29
29
  def _get_installed_version() -> str:
30
- """Read version from the toolkit's own package.json."""
30
+ """Read version from state.json (what user actually has configured).
31
+
32
+ Falls back to package.json if state.json is missing (e.g. fresh install).
33
+ state.json is the source of truth because it reflects what was last
34
+ installed/updated, while package.json may be newer if the npm package
35
+ was upgraded but `ai-toolkit update` was not run yet.
36
+ """
37
+ state_file = Path.home() / ".ai-toolkit" / "state.json"
38
+ if state_file.is_file():
39
+ try:
40
+ with open(state_file, encoding="utf-8") as f:
41
+ version = json.load(f).get("installed_version")
42
+ if version:
43
+ return version
44
+ except (json.JSONDecodeError, OSError):
45
+ pass
46
+ # Fallback: package.json
31
47
  pkg = Path(__file__).resolve().parent.parent / "package.json"
32
48
  if pkg.is_file():
33
49
  with open(pkg, encoding="utf-8") as f: