claude-smart 0.2.33 → 0.2.34

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.33-green.svg" alt="Version">
16
+ <img src="https://img.shields.io/badge/version-0.2.34-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.33",
3
+ "version": "0.2.34",
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.33",
3
+ "version": "0.2.34",
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.33",
3
+ "version": "0.2.34",
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.33"
3
+ version = "0.2.34"
4
4
  description = "Self-improving Claude Code plugin — learns from corrections via reflexio"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -63,7 +63,15 @@ claude_smart_source_reflexio_env() {
63
63
  value="${value#"${value%%[![:space:]]*}"}"
64
64
  value="${value%"${value##*[![:space:]]}"}"
65
65
  case "$key" in
66
- REFLEXIO_URL|REFLEXIO_API_KEY|REFLEXIO_USER_ID|CLAUDE_SMART_USE_LOCAL_CLI|CLAUDE_SMART_USE_LOCAL_EMBEDDING|CLAUDE_SMART_BACKEND_AUTOSTART|CLAUDE_SMART_DASHBOARD_AUTOSTART|CLAUDE_SMART_CLI_PATH|CLAUDE_SMART_CLI_TIMEOUT|CLAUDE_SMART_STATE_DIR|CLAUDE_SMART_ENABLE_OPTIMIZER)
66
+ # Reflexio identity: file always wins so a rotated key/url overrides
67
+ # whatever a long-lived managed backend or dashboard process inherited.
68
+ REFLEXIO_URL|REFLEXIO_API_KEY|REFLEXIO_USER_ID)
69
+ value="$(claude_smart_env_unquote "$value")"
70
+ export "$key=$value"
71
+ ;;
72
+ # CLAUDE_SMART_* flags: respect anything the caller already exported so
73
+ # per-session overrides (e.g., a manual test) take precedence over the file.
74
+ CLAUDE_SMART_USE_LOCAL_CLI|CLAUDE_SMART_USE_LOCAL_EMBEDDING|CLAUDE_SMART_BACKEND_AUTOSTART|CLAUDE_SMART_DASHBOARD_AUTOSTART|CLAUDE_SMART_CLI_PATH|CLAUDE_SMART_CLI_TIMEOUT|CLAUDE_SMART_STATE_DIR|CLAUDE_SMART_ENABLE_OPTIMIZER)
67
75
  if [ -z "$(eval "printf '%s' \"\${$key:-}\"")" ]; then
68
76
  value="$(claude_smart_env_unquote "$value")"
69
77
  export "$key=$value"
@@ -180,10 +180,12 @@ function loadReflexioEnv() {
180
180
  } catch {
181
181
  return;
182
182
  }
183
- const allowed = new Set([
183
+ const managedReflexioKeys = new Set([
184
184
  "REFLEXIO_URL",
185
185
  "REFLEXIO_API_KEY",
186
186
  "REFLEXIO_USER_ID",
187
+ ]);
188
+ const localConfigKeys = new Set([
187
189
  "CLAUDE_SMART_USE_LOCAL_CLI",
188
190
  "CLAUDE_SMART_USE_LOCAL_EMBEDDING",
189
191
  "CLAUDE_SMART_BACKEND_AUTOSTART",
@@ -200,8 +202,11 @@ function loadReflexioEnv() {
200
202
  const eq = line.indexOf("=");
201
203
  if (eq < 0) continue;
202
204
  const key = line.slice(0, eq).trim();
203
- if (!allowed.has(key) || process.env[key]) continue;
204
- process.env[key] = unquoteEnvValue(line.slice(eq + 1));
205
+ if (managedReflexioKeys.has(key)) {
206
+ process.env[key] = unquoteEnvValue(line.slice(eq + 1));
207
+ } else if (localConfigKeys.has(key) && !process.env[key]) {
208
+ process.env[key] = unquoteEnvValue(line.slice(eq + 1));
209
+ }
205
210
  }
206
211
  }
207
212
 
@@ -326,17 +326,10 @@ class Adapter:
326
326
  if client is None:
327
327
  return []
328
328
  try:
329
- if hasattr(client, "get_all_profiles"):
330
- response = client.get_all_profiles(limit=max(top_k * 20, 100))
331
- return [
332
- item
333
- for item in _extract_items(response, "user_profiles")
334
- if _field(item, "user_id") == project_id
335
- ][:top_k]
336
- response = client.search_user_profiles(
329
+ response = client.get_profiles(
337
330
  user_id=project_id,
338
- query="",
339
331
  top_k=top_k,
332
+ status_filter=[None],
340
333
  )
341
334
  except Exception as exc: # noqa: BLE001
342
335
  self._record_read_error("fetch_project_profiles", exc)
@@ -446,12 +439,6 @@ def _extract_items(response: Any, field: str) -> list[Any]:
446
439
  return list(value) if value else []
447
440
 
448
441
 
449
- def _field(item: Any, field: str) -> Any:
450
- if isinstance(item, dict):
451
- return item.get(field)
452
- return getattr(item, field, None)
453
-
454
-
455
442
  def _supports_keyword(callable_obj: Any, keyword: str) -> bool:
456
443
  try:
457
444
  signature = inspect.signature(callable_obj)
package/plugin/uv.lock CHANGED
@@ -419,7 +419,7 @@ wheels = [
419
419
 
420
420
  [[package]]
421
421
  name = "claude-smart"
422
- version = "0.2.33"
422
+ version = "0.2.34"
423
423
  source = { editable = "." }
424
424
  dependencies = [
425
425
  { name = "chromadb" },