claude-smart 0.2.27 → 0.2.28

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/README.md CHANGED
@@ -13,7 +13,7 @@
13
13
  <img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License">
14
14
  </a>
15
15
  <a href="plugin/pyproject.toml">
16
- <img src="https://img.shields.io/badge/version-0.2.27-green.svg" alt="Version">
16
+ <img src="https://img.shields.io/badge/version-0.2.28-green.svg" alt="Version">
17
17
  </a>
18
18
  <a href="plugin/pyproject.toml">
19
19
  <img src="https://img.shields.io/badge/python-%3E%3D3.12-brightgreen.svg" alt="Python">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-smart",
3
- "version": "0.2.27",
3
+ "version": "0.2.28",
4
4
  "description": "Self-improving Claude Code plugin — learns from corrections via reflexio",
5
5
  "keywords": [
6
6
  "claude",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-smart",
3
- "version": "0.2.27",
3
+ "version": "0.2.28",
4
4
  "description": "Self-improving Claude Code plugin — learns from corrections across sessions via reflexio",
5
5
  "author": {
6
6
  "name": "Yi Lu"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-smart",
3
- "version": "0.2.27",
3
+ "version": "0.2.28",
4
4
  "description": "Self-improving coding assistant plugin — learns from corrections across sessions via reflexio",
5
5
  "author": {
6
6
  "name": "Yi Lu"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "claude-smart"
3
- version = "0.2.27"
3
+ version = "0.2.28"
4
4
  description = "Self-improving Claude Code plugin — learns from corrections via reflexio"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -41,9 +41,8 @@ PLUGIN_ROOT="$(cd "$HERE/.." && pwd)"
41
41
 
42
42
  if [ -z "${CLAUDE_SMART_CLI_PATH:-}" ]; then
43
43
  if [ "${CLAUDE_SMART_HOST:-claude-code}" = "codex" ]; then
44
- # Reflexio's provider still calls CLAUDE_SMART_CLI_PATH with Claude CLI
45
- # flags. Use a small compatibility executable that translates that narrow
46
- # contract to `codex exec`.
44
+ # Prefer the compatibility executable for older provider entrypoints; the
45
+ # provider can also resolve `codex` directly when this override is absent.
47
46
  export CLAUDE_SMART_CLI_PATH="$PLUGIN_ROOT/scripts/codex-claude-compat.py"
48
47
  elif _cs_cli_path=$(command -v claude 2>/dev/null) && [ -n "$_cs_cli_path" ]; then
49
48
  export CLAUDE_SMART_CLI_PATH="$_cs_cli_path"
@@ -60,6 +59,37 @@ mkdir -p "$STATE_DIR"
60
59
 
61
60
  emit_ok() { echo '{"continue":true,"suppressOutput":true}'; }
62
61
 
62
+ emit_start_failure() {
63
+ reason="$1"
64
+ if py=$(claude_smart_resolve_python 2>/dev/null); then
65
+ "$py" - "$reason" <<'PY'
66
+ import json
67
+ import sys
68
+
69
+ reason = sys.argv[1].strip()
70
+ message = (
71
+ "> **claude-smart learning backend is not running.** "
72
+ "Interactions are being buffered locally, but learning will not publish "
73
+ "until the backend starts.\n"
74
+ )
75
+ if reason:
76
+ message += f">\n> Last startup error: `{reason}`\n"
77
+ message += (
78
+ ">\n> Make sure the local model provider is available: Claude Code needs "
79
+ "`claude`, Codex needs `codex`. Then run `/claude-smart:restart`."
80
+ )
81
+ print(json.dumps({
82
+ "hookSpecificOutput": {
83
+ "hookEventName": "SessionStart",
84
+ "additionalContext": message,
85
+ }
86
+ }))
87
+ PY
88
+ else
89
+ emit_ok
90
+ fi
91
+ }
92
+
63
93
  # Tree-kill the recorded process. Delegates to claude_smart_kill_tree
64
94
  # (POSIX: signal the process group; Windows: taskkill /T /F /PID).
65
95
  kill_group() {
@@ -189,6 +219,14 @@ case "$CMD" in
189
219
  backend_healthy && break
190
220
  sleep 1
191
221
  done
222
+ if ! backend_healthy; then
223
+ pid=$(cat "$PID_FILE" 2>/dev/null || echo "")
224
+ if [ -n "$pid" ] && ! kill -0 "$pid" 2>/dev/null; then
225
+ reason=$(tail -n 120 "$LOG_FILE" 2>/dev/null | grep -E "No LLM provider available|No generation-capable LLM provider available|CLI not found|skipping provider registration|Application startup failed" | tail -n 1 | sed 's/^[[:space:]]*//')
226
+ emit_start_failure "$reason"
227
+ exit 0
228
+ fi
229
+ fi
192
230
  emit_ok
193
231
  ;;
194
232
  stop)
package/plugin/uv.lock CHANGED
@@ -419,7 +419,7 @@ wheels = [
419
419
 
420
420
  [[package]]
421
421
  name = "claude-smart"
422
- version = "0.2.27"
422
+ version = "0.2.28"
423
423
  source = { editable = "." }
424
424
  dependencies = [
425
425
  { name = "chromadb" },