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 +1 -1
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/pyproject.toml +1 -1
- package/plugin/scripts/_lib.sh +9 -1
- package/plugin/scripts/codex-hook.js +8 -3
- package/plugin/src/claude_smart/reflexio_adapter.py +2 -15
- package/plugin/uv.lock +1 -1
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.
|
|
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
package/plugin/pyproject.toml
CHANGED
package/plugin/scripts/_lib.sh
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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 (
|
|
204
|
-
|
|
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
|
-
|
|
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)
|