claude-smart 0.2.45 → 0.2.47
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/.claude-plugin/marketplace.json +3 -3
- package/README.md +47 -10
- package/bin/claude-smart.js +535 -23
- package/package.json +22 -3
- package/plugin/.claude-plugin/plugin.json +4 -2
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/README.md +27 -6
- package/plugin/commands/clear-all.md +1 -0
- package/plugin/commands/dashboard.md +1 -0
- package/plugin/commands/learn.md +1 -0
- package/plugin/commands/restart.md +1 -0
- package/plugin/commands/show.md +1 -0
- package/plugin/dashboard/app/configure/env/page.tsx +40 -14
- package/plugin/dashboard/app/configure/server/page.tsx +51 -1
- package/plugin/dashboard/app/layout.tsx +20 -0
- package/plugin/dashboard/app/preferences/[id]/page.tsx +8 -8
- package/plugin/dashboard/app/skills/project/[id]/page.tsx +7 -3
- package/plugin/dashboard/app/skills/shared/[id]/page.tsx +10 -3
- package/plugin/dashboard/lib/claude-settings-file.ts +20 -10
- package/plugin/dashboard/lib/reflexio-client.ts +16 -0
- package/plugin/dashboard/lib/status.ts +10 -3
- package/plugin/dashboard/lib/types.ts +18 -6
- package/plugin/hooks/codex-hooks.json +0 -1
- package/plugin/opencode/assistant-buffer.ts +108 -0
- package/plugin/opencode/dist/assistant-buffer.js +96 -0
- package/plugin/opencode/dist/internal.js +12 -0
- package/plugin/opencode/dist/payload.js +85 -0
- package/plugin/opencode/dist/server.mjs +232 -0
- package/plugin/opencode/internal.ts +18 -0
- package/plugin/opencode/package.json +3 -0
- package/plugin/opencode/payload.ts +90 -0
- package/plugin/opencode/server.mts +251 -0
- package/plugin/opencode/tsconfig.json +13 -0
- package/plugin/pyproject.toml +25 -4
- package/plugin/scripts/_lib.sh +5 -1
- package/plugin/scripts/backend-service.sh +22 -2
- package/plugin/scripts/ensure-plugin-root.sh +4 -4
- package/plugin/scripts/hook_entry.sh +1 -1
- package/plugin/scripts/opencode-claude-compat +4 -0
- package/plugin/scripts/opencode-claude-compat.cmd +3 -0
- package/plugin/scripts/opencode-claude-compat.js +225 -0
- package/plugin/scripts/smart-install.sh +17 -9
- package/plugin/src/README.md +1 -1
- package/plugin/src/claude_smart/cli.py +498 -12
- package/plugin/src/claude_smart/context_format.py +9 -9
- package/plugin/src/claude_smart/cs_cite.py +66 -19
- package/plugin/src/claude_smart/env_config.py +12 -4
- package/plugin/src/claude_smart/events/session_start.py +26 -7
- package/plugin/src/claude_smart/events/stop.py +1 -1
- package/plugin/src/claude_smart/ids.py +1 -1
- package/plugin/src/claude_smart/reflexio_adapter.py +5 -5
- package/plugin/src/claude_smart/runtime.py +7 -1
- package/plugin/uv.lock +5 -5
- package/plugin/vendor/reflexio/.env.example +54 -30
- package/plugin/vendor/reflexio/README.md +17 -11
- package/plugin/vendor/reflexio/pyproject.toml +13 -1
- package/plugin/vendor/reflexio/reflexio/README.md +4 -1
- package/plugin/vendor/reflexio/reflexio/cli/README.md +9 -7
- package/plugin/vendor/reflexio/reflexio/cli/__main__.py +10 -1
- package/plugin/vendor/reflexio/reflexio/cli/bootstrap_config.py +22 -5
- package/plugin/vendor/reflexio/reflexio/cli/commands/interactions.py +34 -4
- package/plugin/vendor/reflexio/reflexio/cli/commands/profiles.py +12 -7
- package/plugin/vendor/reflexio/reflexio/cli/commands/services.py +13 -6
- package/plugin/vendor/reflexio/reflexio/cli/commands/setup_cmd.py +212 -52
- package/plugin/vendor/reflexio/reflexio/cli/commands/shortcuts.py +15 -2
- package/plugin/vendor/reflexio/reflexio/cli/env_loader.py +292 -22
- package/plugin/vendor/reflexio/reflexio/cli/log_format.py +29 -4
- package/plugin/vendor/reflexio/reflexio/cli/run_services.py +17 -8
- package/plugin/vendor/reflexio/reflexio/cli/stop_services.py +13 -10
- package/plugin/vendor/reflexio/reflexio/cli/utils.py +44 -1
- package/plugin/vendor/reflexio/reflexio/client/client.py +154 -13
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/README.md +135 -257
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/npm/openclaw-smart/bin/openclaw-smart.js +13 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/npm/openclaw-smart/package.json +15 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/README.md +38 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/index.ts +151 -110
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/openclaw.plugin.json +20 -10
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/package.json +28 -6
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/pyproject.toml +42 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/scripts/_lib.sh +371 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/scripts/backend-log-runner.sh +33 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/scripts/backend-service.sh +271 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/scripts/cli.sh +68 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/scripts/dashboard-open.sh +15 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/scripts/ensure-plugin-root.sh +84 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/scripts/hook_entry.sh +106 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/scripts/npm-cli.js +219 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/scripts/smart-install.sh +269 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/skills/clear-all/SKILL.md +8 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/skills/dashboard/SKILL.md +8 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/skills/learn/SKILL.md +10 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/skills/reflexio/SKILL.md +15 -44
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/skills/restart/SKILL.md +6 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/skills/show/SKILL.md +8 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/cli.py +634 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/context_format.py +224 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/context_inject.py +79 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/events/__init__.py +0 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/events/after_tool_call.py +160 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/events/agent_end.py +187 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/events/before_prompt_build.py +69 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/events/before_tool_call.py +30 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/events/session_end.py +36 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/events/session_start.py +130 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/hook.py +131 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/ids.py +94 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/internal_call.py +75 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/oc_cite.py +196 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/optimizer_assistant.py +272 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/publish.py +96 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/query_compose.py +66 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/reflexio_adapter.py +336 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/runtime.py +47 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/stall_banner.py +61 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/src/openclaw_smart/state.py +323 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/__init__.py +0 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/integration/__init__.py +0 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/integration/test_e2e_session_loop.py +190 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/integration/test_publish_to_local_reflexio_integration.py +112 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/integration/test_recursion_guard_integration.py +86 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/integration/test_search_inject_integration.py +144 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/test_cli.py +184 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/test_events_after_tool_call.py +142 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/test_events_agent_end.py +233 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/test_events_before_prompt_build.py +116 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/test_events_before_tool_call.py +35 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/test_events_session_end.py +47 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/test_events_session_start.py +109 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/test_hook_dispatch.py +117 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/test_ids.py +41 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/test_internal_call.py +50 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/test_oc_cite.py +88 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/test_publish.py +48 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/test_query_compose.py +48 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/test_reflexio_adapter.py +188 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/test_runtime.py +41 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests/test_state.py +235 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests-ts/__mocks__/plugin-entry-stub.ts +6 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests-ts/test_npm_cli.test.ts +56 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tests-ts/test_shim_dispatch.test.ts +171 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/tsconfig.build.json +18 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/{tsconfig.json → plugin/tsconfig.json} +2 -2
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/uv.lock +3835 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/vitest.config.ts +18 -0
- package/plugin/vendor/reflexio/reflexio/lib/_agent_playbook.py +246 -10
- package/plugin/vendor/reflexio/reflexio/lib/_base.py +15 -0
- package/plugin/vendor/reflexio/reflexio/lib/_config.py +11 -4
- package/plugin/vendor/reflexio/reflexio/lib/_generation.py +17 -5
- package/plugin/vendor/reflexio/reflexio/lib/_lineage_parity_readers.py +187 -0
- package/plugin/vendor/reflexio/reflexio/lib/_profiles.py +224 -21
- package/plugin/vendor/reflexio/reflexio/lib/_reflection.py +1 -1
- package/plugin/vendor/reflexio/reflexio/lib/_search.py +52 -25
- package/plugin/vendor/reflexio/reflexio/lib/_user_playbook.py +11 -1
- package/plugin/vendor/reflexio/reflexio/models/api_schema/domain/__init__.py +1 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/domain/entities.py +127 -38
- package/plugin/vendor/reflexio/reflexio/models/api_schema/domain/enums.py +4 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/domain/governance.py +117 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/eval_overview_schema.py +64 -41
- package/plugin/vendor/reflexio/reflexio/models/api_schema/internal_schema.py +19 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/pending_tool_call_schema.py +12 -5
- package/plugin/vendor/reflexio/reflexio/models/api_schema/retriever_schema.py +97 -3
- package/plugin/vendor/reflexio/reflexio/models/api_schema/ui/converters.py +5 -1
- package/plugin/vendor/reflexio/reflexio/models/api_schema/ui/entities.py +5 -1
- package/plugin/vendor/reflexio/reflexio/models/config_schema.py +104 -7
- package/plugin/vendor/reflexio/reflexio/models/structured_output.py +148 -0
- package/plugin/vendor/reflexio/reflexio/server/OVERVIEW.md +3 -3
- package/plugin/vendor/reflexio/reflexio/server/README.md +58 -33
- package/plugin/vendor/reflexio/reflexio/server/__init__.py +29 -5
- package/plugin/vendor/reflexio/reflexio/server/__main__.py +2 -2
- package/plugin/vendor/reflexio/reflexio/server/api.py +899 -103
- package/plugin/vendor/reflexio/reflexio/server/api_endpoints/precondition_checks.py +7 -0
- package/plugin/vendor/reflexio/reflexio/server/api_endpoints/request_context.py +4 -2
- package/plugin/vendor/reflexio/reflexio/server/auth.py +90 -0
- package/plugin/vendor/reflexio/reflexio/server/billing_meter.py +173 -0
- package/plugin/vendor/reflexio/reflexio/server/billing_signals.py +64 -0
- package/plugin/vendor/reflexio/reflexio/server/cache/reflexio_cache.py +46 -16
- package/plugin/vendor/reflexio/reflexio/server/env_utils.py +65 -0
- package/plugin/vendor/reflexio/reflexio/server/extensions.py +213 -0
- package/plugin/vendor/reflexio/reflexio/server/llm/embedding_service.py +19 -4
- package/plugin/vendor/reflexio/reflexio/server/llm/litellm_client.py +264 -77
- package/plugin/vendor/reflexio/reflexio/server/llm/llm_utils.py +69 -7
- package/plugin/vendor/reflexio/reflexio/server/llm/model_defaults.py +4 -4
- package/plugin/vendor/reflexio/reflexio/server/llm/providers/claude_code_provider.py +1 -1
- package/plugin/vendor/reflexio/reflexio/server/llm/providers/embedding_service_provider.py +75 -16
- package/plugin/vendor/reflexio/reflexio/server/llm/providers/openclaw_provider.py +280 -0
- package/plugin/vendor/reflexio/reflexio/server/llm/rerank/cross_encoder_reranker.py +12 -1
- package/plugin/vendor/reflexio/reflexio/server/llm/token_accounting.py +48 -0
- package/plugin/vendor/reflexio/reflexio/server/llm/tools.py +107 -17
- package/plugin/vendor/reflexio/reflexio/server/operation_limiter.py +360 -4
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/memory_reflection/v1.6.0.prompt.md +1 -1
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/memory_reflection/v1.7.0.prompt.md +85 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_aggregation/v2.2.0.prompt.md +1 -1
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_aggregation/v2.3.0.prompt.md +253 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_consolidation/v2.3.2.prompt.md +1 -1
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_consolidation/v2.3.3.prompt.md +74 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_context/v4.2.3.prompt.md +1 -1
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_context/v4.3.0.prompt.md +266 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_context/v4.4.0.prompt.md +278 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_context_expert/v3.3.0.prompt.md +1 -1
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_context_expert/v3.4.0.prompt.md +137 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_main/v1.2.0.prompt.md +1 -1
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_main/v1.3.0.prompt.md +34 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/profile_update_instruction_start/v1.0.0.prompt.md +5 -12
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/profile_update_instruction_start/v1.1.0.prompt.md +5 -12
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/profile_update_instruction_start/v1.2.0.prompt.md +155 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/tagging/v1.0.0.prompt.md +23 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_manager.py +89 -32
- package/plugin/vendor/reflexio/reflexio/server/services/README.md +28 -11
- package/plugin/vendor/reflexio/reflexio/server/services/agent_success_evaluation/README.md +22 -0
- package/plugin/vendor/reflexio/reflexio/server/services/agent_success_evaluation/__init__.py +1 -0
- package/plugin/vendor/reflexio/reflexio/server/services/agent_success_evaluation/agent_success_evaluation_constants.py +4 -2
- package/plugin/vendor/reflexio/reflexio/server/services/agent_success_evaluation/agent_success_evaluation_utils.py +1 -0
- package/plugin/vendor/reflexio/reflexio/server/services/agent_success_evaluation/components/__init__.py +7 -0
- package/plugin/vendor/reflexio/reflexio/server/services/agent_success_evaluation/{agent_success_evaluator.py → components/evaluator.py} +3 -16
- package/plugin/vendor/reflexio/reflexio/server/services/agent_success_evaluation/regen_jobs.py +28 -72
- package/plugin/vendor/reflexio/reflexio/server/services/agent_success_evaluation/{group_evaluation_runner.py → runner.py} +12 -10
- package/plugin/vendor/reflexio/reflexio/server/services/agent_success_evaluation/{delayed_group_evaluator.py → scheduler.py} +10 -2
- package/plugin/vendor/reflexio/reflexio/server/services/agent_success_evaluation/{agent_success_evaluation_service.py → service.py} +36 -1
- package/plugin/vendor/reflexio/reflexio/server/services/base_generation_service.py +160 -0
- package/plugin/vendor/reflexio/reflexio/server/services/configurator/base_configurator.py +5 -0
- package/plugin/vendor/reflexio/reflexio/server/services/deduplication_utils.py +1 -1
- package/plugin/vendor/reflexio/reflexio/server/services/evaluation_overview/README.md +9 -0
- package/plugin/vendor/reflexio/reflexio/server/services/evaluation_overview/components/__init__.py +0 -0
- package/plugin/vendor/reflexio/reflexio/server/services/evaluation_overview/{rule_attribution.py → components/rule_attribution.py} +10 -9
- package/plugin/vendor/reflexio/reflexio/server/services/evaluation_overview/eval_sampler.py +15 -24
- package/plugin/vendor/reflexio/reflexio/server/services/evaluation_overview/service.py +238 -164
- package/plugin/vendor/reflexio/reflexio/server/services/extraction/README.md +31 -0
- package/plugin/vendor/reflexio/reflexio/server/services/extraction/outcome.py +13 -3
- package/plugin/vendor/reflexio/reflexio/server/services/extraction/pending_tool_call_dispatch.py +3 -2
- package/plugin/vendor/reflexio/reflexio/server/services/extraction/resumable_agent.py +32 -118
- package/plugin/vendor/reflexio/reflexio/server/services/extraction/resume_worker.py +47 -16
- package/plugin/vendor/reflexio/reflexio/server/services/generation_service.py +105 -23
- package/plugin/vendor/reflexio/reflexio/server/services/governance/config.py +52 -0
- package/plugin/vendor/reflexio/reflexio/server/services/governance/service.py +378 -0
- package/plugin/vendor/reflexio/reflexio/server/services/governance/subject_refs.py +34 -0
- package/plugin/vendor/reflexio/reflexio/server/services/lineage/__init__.py +0 -0
- package/plugin/vendor/reflexio/reflexio/server/services/lineage/gc_scheduler.py +219 -0
- package/plugin/vendor/reflexio/reflexio/server/services/lineage/resolve.py +98 -0
- package/plugin/vendor/reflexio/reflexio/server/services/operation_state_utils.py +26 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook/README.md +18 -11
- package/plugin/vendor/reflexio/reflexio/server/services/playbook/aggregation_prompt_processing.py +100 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook/components/__init__.py +5 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook/{playbook_aggregator.py → components/aggregator.py} +334 -178
- package/plugin/vendor/reflexio/reflexio/server/services/playbook/{playbook_consolidator.py → components/consolidator.py} +168 -62
- package/plugin/vendor/reflexio/reflexio/server/services/playbook/{playbook_extractor.py → components/extractor.py} +5 -1
- package/plugin/vendor/reflexio/reflexio/server/services/playbook/playbook_edit_apply.py +74 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook/playbook_service_utils.py +33 -3
- package/plugin/vendor/reflexio/reflexio/server/services/playbook/{playbook_generation_service.py → service.py} +121 -19
- package/plugin/vendor/reflexio/reflexio/server/services/playbook_optimizer/README.md +10 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook_optimizer/models.py +2 -1
- package/plugin/vendor/reflexio/reflexio/server/services/playbook_optimizer/optimizer.py +178 -30
- package/plugin/vendor/reflexio/reflexio/server/services/pre_retrieval/README.md +9 -0
- package/plugin/vendor/reflexio/reflexio/server/services/profile/components/__init__.py +17 -0
- package/plugin/vendor/reflexio/reflexio/server/services/profile/{profile_deduplicator.py → components/consolidator.py} +7 -6
- package/plugin/vendor/reflexio/reflexio/server/services/profile/{profile_extractor.py → components/extractor.py} +31 -22
- package/plugin/vendor/reflexio/reflexio/server/services/profile/profile_generation_service_utils.py +6 -13
- package/plugin/vendor/reflexio/reflexio/server/services/profile/{profile_generation_service.py → service.py} +32 -50
- package/plugin/vendor/reflexio/reflexio/server/services/reflection/__init__.py +4 -8
- package/plugin/vendor/reflexio/reflexio/server/services/reflection/components/__init__.py +7 -0
- package/plugin/vendor/reflexio/reflexio/server/services/reflection/reflection_service_utils.py +12 -1
- package/plugin/vendor/reflexio/reflexio/server/services/reflection/{reflection_service.py → service.py} +36 -16
- package/plugin/vendor/reflexio/reflexio/server/services/retrieval/recency.py +211 -0
- package/plugin/vendor/reflexio/reflexio/server/services/retrieval/relevance_floor.py +99 -6
- package/plugin/vendor/reflexio/reflexio/server/services/service_utils.py +36 -1
- package/plugin/vendor/reflexio/reflexio/server/services/shadow_comparison/README.md +8 -0
- package/plugin/vendor/reflexio/reflexio/server/services/shadow_comparison/outcome.py +1 -2
- package/plugin/vendor/reflexio/reflexio/server/services/storage/error.py +31 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/governance_validation.py +681 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/retention.py +9 -9
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/__init__.py +16 -2
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_agent_run.py +4 -1
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_base.py +644 -197
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_extras.py +106 -119
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_governance.py +1965 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_lineage.py +630 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_operations.py +38 -6
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_playbook.py +31 -1369
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_profiles.py +756 -210
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_requests.py +148 -34
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_shadow_verdicts.py +23 -9
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_stall_state.py +5 -2
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/playbook/__init__.py +13 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/playbook/_agent.py +952 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/playbook/_eval_results.py +189 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/playbook/_optimization.py +247 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/playbook/_source_linkage.py +145 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/playbook/_user.py +838 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/__init__.py +150 -23
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_agent_run.py +2 -8
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_base.py +5 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_extras.py +40 -57
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_governance.py +148 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_lineage.py +215 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_operations.py +20 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_playbook.py +4 -677
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_profiles.py +134 -1
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_requests.py +62 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_retrieval_log.py +51 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_shadow_verdicts.py +17 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/playbook/__init__.py +13 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/playbook/_agent.py +365 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/playbook/_eval_results.py +124 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/playbook/_optimization.py +85 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/playbook/_source_linkage.py +47 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/playbook/_user.py +333 -0
- package/plugin/vendor/reflexio/reflexio/server/services/tagging/README.md +8 -0
- package/plugin/vendor/reflexio/reflexio/server/services/tagging/__init__.py +1 -0
- package/plugin/vendor/reflexio/reflexio/server/services/tagging/service.py +200 -0
- package/plugin/vendor/reflexio/reflexio/server/services/tagging/tagging_scheduler.py +149 -0
- package/plugin/vendor/reflexio/reflexio/server/services/unified_search_service.py +372 -34
- package/plugin/vendor/reflexio/reflexio/server/site_var/README.md +2 -1
- package/plugin/vendor/reflexio/reflexio/server/site_var/feature_flags.py +120 -1
- package/plugin/vendor/reflexio/reflexio/server/site_var/site_var_sources/feature_flags.json +4 -0
- package/plugin/vendor/reflexio/reflexio/server/site_var/site_var_sources/search_settings.json +5 -0
- package/plugin/vendor/reflexio/reflexio/server/tracing.py +30 -0
- package/plugin/vendor/reflexio/reflexio/server/usage_metrics.py +18 -0
- package/plugin/vendor/reflexio/reflexio/test_support/llm_mock.py +61 -26
- package/plugin/vendor/reflexio/reflexio/test_support/llm_model_registry.py +41 -4
- package/scripts/setup-claude-smart.sh +8 -3
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/TESTING.md +0 -517
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/hook/handler.js +0 -473
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/package-lock.json +0 -2156
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/package.json +0 -18
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/hook/handler.ts +0 -241
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/hook/setup.ts +0 -140
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/lib/publish.ts +0 -113
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/lib/search.ts +0 -52
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/lib/server.ts +0 -103
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/lib/sqlite-buffer.ts +0 -156
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/lib/user-id.ts +0 -134
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/rules/reflexio.md +0 -24
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/publish_clawhub.sh +0 -278
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/references/HOOK.md +0 -164
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/scripts/install.sh +0 -36
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/scripts/uninstall.sh +0 -35
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/tests/publish.test.ts +0 -27
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/tests/search.test.ts +0 -31
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/tests/server.test.ts +0 -42
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/tests/setup.test.ts +0 -49
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/tests/sqlite-buffer.test.ts +0 -91
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/tests/user-id.test.ts +0 -50
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/vitest.config.ts +0 -13
- package/plugin/vendor/reflexio/reflexio/server/_auth.py +0 -25
- package/plugin/vendor/reflexio/reflexio/server/services/evaluation_overview/group_aggregation.py +0 -192
- package/plugin/vendor/reflexio/reflexio/server/services/extraction/invariants.py +0 -303
- package/plugin/vendor/reflexio/reflexio/server/services/extraction/plan.py +0 -138
- package/plugin/vendor/reflexio/reflexio/server/services/extraction/tools.py +0 -1125
- /package/plugin/vendor/reflexio/reflexio/integrations/{__init__.py → openclaw/plugin/src/openclaw_smart/__init__.py} +0 -0
- /package/plugin/vendor/reflexio/reflexio/integrations/openclaw/{types → plugin/types}/openclaw.d.ts +0 -0
- /package/plugin/vendor/reflexio/reflexio/server/services/evaluation_overview/{distribution.py → components/distribution.py} +0 -0
- /package/plugin/vendor/reflexio/reflexio/server/services/evaluation_overview/{hero_state.py → components/hero_state.py} +0 -0
- /package/plugin/vendor/reflexio/reflexio/server/services/evaluation_overview/{shadow_aggregation.py → components/shadow_aggregation.py} +0 -0
- /package/plugin/vendor/reflexio/reflexio/server/services/reflection/{reflection_extractor.py → components/extractor.py} +0 -0
|
@@ -85,36 +85,83 @@ WHEN_TO_CITE_COMPACT = (
|
|
|
85
85
|
|
|
86
86
|
_COMPACT_INTRO = f"_{WHEN_TO_CITE}"
|
|
87
87
|
|
|
88
|
+
# Public repo the citation marker attributes its learnings to. The cue rides
|
|
89
|
+
# along on every emitted marker so users see that the applied learning was
|
|
90
|
+
# generated by Reflexio (and can star the repo).
|
|
91
|
+
REFLEXIO_REPO_URL = "https://github.com/ReflexioAI/reflexio"
|
|
92
|
+
MARKER_PREFIX = "✨ claude-smart rule applied:"
|
|
93
|
+
_ATTRIBUTION_LABEL = "⚡Reflexio"
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def _osc8_link(url: str, text: str) -> str:
|
|
97
|
+
"""Wrap ``text`` in an OSC 8 terminal hyperlink pointing at ``url``."""
|
|
98
|
+
return f"\x1b]8;;{url}\x1b\\{text}\x1b]8;;\x1b\\"
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def marker_attribution(link_style: str = "markdown") -> str:
|
|
102
|
+
"""Return the trailing ``· ⚡Reflexio`` attribution, linked to the repo.
|
|
103
|
+
|
|
104
|
+
Args:
|
|
105
|
+
link_style (str): ``"markdown"`` for a markdown link, or ``"osc8"`` for
|
|
106
|
+
a terminal-native hyperlink. Unknown values fall back to markdown.
|
|
107
|
+
|
|
108
|
+
Returns:
|
|
109
|
+
str: The attribution segment, beginning with a leading separator.
|
|
110
|
+
"""
|
|
111
|
+
if link_style == "osc8":
|
|
112
|
+
return f" · {_osc8_link(REFLEXIO_REPO_URL, _ATTRIBUTION_LABEL)}"
|
|
113
|
+
return f" · [{_ATTRIBUTION_LABEL}]({REFLEXIO_REPO_URL})"
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def build_marker(body: str, link_style: str = "markdown") -> str:
|
|
117
|
+
"""Build the full citation marker line, including the Reflexio attribution.
|
|
118
|
+
|
|
119
|
+
Single source of truth for the marker line so the prefix and attribution
|
|
120
|
+
cannot drift across the markdown / OSC 8 / compact render paths.
|
|
121
|
+
|
|
122
|
+
Args:
|
|
123
|
+
body (str): The linked memory title(s) — already formatted as markdown
|
|
124
|
+
or OSC 8 links, joined with `` | `` for multiple items.
|
|
125
|
+
link_style (str): ``"markdown"`` or ``"osc8"``; selects the attribution
|
|
126
|
+
link form.
|
|
127
|
+
|
|
128
|
+
Returns:
|
|
129
|
+
str: ``✨ claude-smart rule applied: <body> · ⚡Reflexio``.
|
|
130
|
+
"""
|
|
131
|
+
return f"{MARKER_PREFIX} {body}{marker_attribution(link_style)}"
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
MARKDOWN_EXAMPLE_ONE = build_marker(
|
|
135
|
+
"[verify process state](http://localhost:3001/rules/s1-123)", "markdown"
|
|
136
|
+
)
|
|
137
|
+
_MARKDOWN_EXAMPLE_MULTI = build_marker(
|
|
138
|
+
"[git safety](http://localhost:3001/rules/s1-123) | "
|
|
139
|
+
"[brief answer preference](http://localhost:3001/rules/p1-pref)",
|
|
140
|
+
"markdown",
|
|
141
|
+
)
|
|
88
142
|
_MARKDOWN_MARKER_PARAGRAPH = (
|
|
89
143
|
"How to format: use human-readable linked titles, not raw ids. "
|
|
90
144
|
"Format for one item: "
|
|
91
|
-
"
|
|
92
|
-
"[verify process state](http://localhost:3001/rules/s1-123)`. "
|
|
145
|
+
f"`{MARKDOWN_EXAMPLE_ONE}`. "
|
|
93
146
|
"For multiple items: "
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
147
|
+
f"`{_MARKDOWN_EXAMPLE_MULTI}`. "
|
|
148
|
+
"Always end the marker with the ` · ⚡Reflexio` attribution shown — a link "
|
|
149
|
+
"to the reflexio repo — exactly as given. "
|
|
97
150
|
"Separate multiple linked memories with the visible ` | ` separator. "
|
|
98
151
|
"Use the dashboard URL shown beside each cited item; do not invent URLs. "
|
|
99
152
|
"Do not include `[cs:…]` ids in the marker line. Never use the old "
|
|
100
153
|
"`✨ 1 claude-smart learning applied [cs:...]` marker format._"
|
|
101
154
|
)
|
|
102
155
|
|
|
103
|
-
_OSC8_EXAMPLE_ONE = (
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"verify process state"
|
|
107
|
-
"\x1b]8;;\x1b\\"
|
|
156
|
+
_OSC8_EXAMPLE_ONE = build_marker(
|
|
157
|
+
_osc8_link("http://localhost:3001/rules/s1-123", "verify process state"),
|
|
158
|
+
"osc8",
|
|
108
159
|
)
|
|
109
|
-
_OSC8_EXAMPLE_MULTI = (
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
" | "
|
|
115
|
-
"\x1b]8;;http://localhost:3001/rules/p1-pref\x1b\\"
|
|
116
|
-
"brief answer preference"
|
|
117
|
-
"\x1b]8;;\x1b\\"
|
|
160
|
+
_OSC8_EXAMPLE_MULTI = build_marker(
|
|
161
|
+
_osc8_link("http://localhost:3001/rules/s1-123", "git safety")
|
|
162
|
+
+ " | "
|
|
163
|
+
+ _osc8_link("http://localhost:3001/rules/p1-pref", "brief answer preference"),
|
|
164
|
+
"osc8",
|
|
118
165
|
)
|
|
119
166
|
_OSC8_MARKER_PARAGRAPH = (
|
|
120
167
|
"How to format: use human-readable OSC 8 terminal hyperlinks, not raw ids "
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
"""Shared ``~/.
|
|
1
|
+
"""Shared ``~/.claude-smart/.env`` helpers for claude-smart.
|
|
2
|
+
|
|
3
|
+
claude-smart keeps its env under ``~/.claude-smart`` (not ``~/.reflexio``) so an
|
|
4
|
+
OSS reflexio backend sharing this machine never leaks its ``.env`` into
|
|
5
|
+
claude-smart. The data directory stays shared at ``~/.reflexio/data``. This path
|
|
6
|
+
must stay in sync with the ``REFLEXIO_ENV_FILE`` export in
|
|
7
|
+
``scripts/backend-service.sh`` and the source path in
|
|
8
|
+
``scripts/_lib.sh`` (``claude_smart_source_reflexio_env``).
|
|
9
|
+
"""
|
|
2
10
|
|
|
3
11
|
from __future__ import annotations
|
|
4
12
|
|
|
5
13
|
import os
|
|
6
14
|
from pathlib import Path
|
|
7
15
|
|
|
8
|
-
REFLEXIO_ENV_PATH = Path.home() / ".
|
|
16
|
+
REFLEXIO_ENV_PATH = Path.home() / ".claude-smart" / ".env"
|
|
9
17
|
MANAGED_REFLEXIO_URL = "https://www.reflexio.ai/"
|
|
10
18
|
REFLEXIO_URL_ENV = "REFLEXIO_URL"
|
|
11
19
|
REFLEXIO_API_KEY_ENV = "REFLEXIO_API_KEY"
|
|
@@ -60,7 +68,7 @@ def parse_env_line(line: str) -> tuple[str, str] | None:
|
|
|
60
68
|
|
|
61
69
|
|
|
62
70
|
def load_reflexio_env(path: Path | None = None) -> None:
|
|
63
|
-
"""Load ``~/.
|
|
71
|
+
"""Load ``~/.claude-smart/.env`` into ``os.environ`` without overriding values."""
|
|
64
72
|
path = path or REFLEXIO_ENV_PATH
|
|
65
73
|
try:
|
|
66
74
|
text = path.read_text()
|
|
@@ -111,7 +119,7 @@ def set_env_vars(path: Path, values: dict[str, str]) -> list[str]:
|
|
|
111
119
|
|
|
112
120
|
|
|
113
121
|
def ensure_local_env_defaults(path: Path | None = None) -> list[str]:
|
|
114
|
-
"""Create or augment ``~/.
|
|
122
|
+
"""Create or augment ``~/.claude-smart/.env`` for claude-smart local mode.
|
|
115
123
|
|
|
116
124
|
Existing active assignments win. This repairs first installs and deleted
|
|
117
125
|
env files without clobbering explicit user overrides such as
|
|
@@ -5,8 +5,10 @@ from __future__ import annotations
|
|
|
5
5
|
import json
|
|
6
6
|
import os
|
|
7
7
|
import sys
|
|
8
|
+
from contextlib import suppress
|
|
8
9
|
from pathlib import Path
|
|
9
10
|
from typing import Any
|
|
11
|
+
from urllib.parse import urlparse
|
|
10
12
|
|
|
11
13
|
from claude_smart import hook
|
|
12
14
|
from claude_smart.reflexio_adapter import Adapter
|
|
@@ -41,10 +43,12 @@ def _int_env(name: str, default: int) -> int:
|
|
|
41
43
|
|
|
42
44
|
_CLAUDE_SMART_WINDOW_SIZE = _int_env("CLAUDE_SMART_WINDOW_SIZE", 5)
|
|
43
45
|
_CLAUDE_SMART_STRIDE_SIZE = _int_env("CLAUDE_SMART_STRIDE_SIZE", 3)
|
|
44
|
-
# Optimizer
|
|
45
|
-
# claude-smart
|
|
46
|
-
|
|
46
|
+
# Optimizer defaults are local-only by default because they store an absolute
|
|
47
|
+
# path to the claude-smart helper process. Set this env var to "1" to force
|
|
48
|
+
# enabling against a non-local Reflexio URL, or "0" to disable everywhere.
|
|
49
|
+
_OPTIMIZER_ENV = "CLAUDE_SMART_ENABLE_OPTIMIZER"
|
|
47
50
|
_OPTIMIZER_TIMEOUT_SECONDS = 300
|
|
51
|
+
_LOCAL_REFLEXIO_HOSTS = {"", "localhost", "127.0.0.1", "::1"}
|
|
48
52
|
|
|
49
53
|
|
|
50
54
|
def _adapter() -> Adapter:
|
|
@@ -109,7 +113,7 @@ def handle(payload: dict[str, Any]) -> None:
|
|
|
109
113
|
window_size=_CLAUDE_SMART_WINDOW_SIZE,
|
|
110
114
|
stride_size=_CLAUDE_SMART_STRIDE_SIZE,
|
|
111
115
|
)
|
|
112
|
-
if
|
|
116
|
+
if _should_apply_optimizer_defaults(adapter):
|
|
113
117
|
adapter.apply_optimizer_defaults(
|
|
114
118
|
script_path=_optimizer_assistant_path(),
|
|
115
119
|
timeout_seconds=_OPTIMIZER_TIMEOUT_SECONDS,
|
|
@@ -131,13 +135,28 @@ def handle(payload: dict[str, Any]) -> None:
|
|
|
131
135
|
)
|
|
132
136
|
sys.stdout.write("\n")
|
|
133
137
|
|
|
134
|
-
|
|
138
|
+
with suppress(Exception):
|
|
135
139
|
adapter.mark_stall_notified()
|
|
136
|
-
except Exception: # noqa: BLE001 — telemetry must not break session.
|
|
137
|
-
pass
|
|
138
140
|
|
|
139
141
|
|
|
140
142
|
def _optimizer_assistant_path() -> str:
|
|
141
143
|
executable = Path(sys.executable)
|
|
142
144
|
suffix = ".exe" if os.name == "nt" else ""
|
|
143
145
|
return str(executable.with_name(f"claude-smart-optimizer-assistant{suffix}"))
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
def _should_apply_optimizer_defaults(adapter: Any) -> bool:
|
|
149
|
+
flag = os.environ.get(_OPTIMIZER_ENV, "").strip().lower()
|
|
150
|
+
if flag in {"0", "false", "no", "off"}:
|
|
151
|
+
return False
|
|
152
|
+
if flag in {"1", "true", "yes", "on"}:
|
|
153
|
+
return True
|
|
154
|
+
return _is_local_reflexio_url(getattr(adapter, "url", ""))
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def _is_local_reflexio_url(url: str) -> bool:
|
|
158
|
+
if not url:
|
|
159
|
+
return True
|
|
160
|
+
parsed = urlparse(url)
|
|
161
|
+
host = parsed.hostname if parsed.scheme else url.split(":", 1)[0]
|
|
162
|
+
return (host or "").lower() in _LOCAL_REFLEXIO_HOSTS
|
|
@@ -377,7 +377,7 @@ def handle(payload: dict[str, Any]) -> tuple[publish.PublishStatus, int] | None:
|
|
|
377
377
|
last_assistant_message = payload.get("last_assistant_message")
|
|
378
378
|
assistant_text = (
|
|
379
379
|
last_assistant_message
|
|
380
|
-
if runtime.is_codex()
|
|
380
|
+
if (runtime.is_codex() or runtime.is_opencode())
|
|
381
381
|
and isinstance(last_assistant_message, str)
|
|
382
382
|
and last_assistant_message
|
|
383
383
|
else _scan_transcript_for_assistant_text(entries)
|
|
@@ -77,7 +77,7 @@ def resolve_user_id(cwd: str | os.PathLike[str] | None = None) -> str:
|
|
|
77
77
|
Honors the ``REFLEXIO_USER_ID`` env var as an explicit override (e.g. so a
|
|
78
78
|
user can point multiple projects at a single Reflexio identity), and
|
|
79
79
|
otherwise falls back to :func:`resolve_project_id`. The env var is
|
|
80
|
-
loaded from ``~/.
|
|
80
|
+
loaded from ``~/.claude-smart/.env`` before reading the process environment so
|
|
81
81
|
CLI commands and hooks use the same identity resolution.
|
|
82
82
|
|
|
83
83
|
Args:
|
|
@@ -6,16 +6,15 @@ Exists so hook handlers (a) don't import reflexio directly at module scope
|
|
|
6
6
|
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
9
|
+
import inspect
|
|
9
10
|
import logging
|
|
10
11
|
import os
|
|
11
|
-
import inspect
|
|
12
12
|
from collections.abc import Sequence
|
|
13
13
|
from concurrent.futures import ThreadPoolExecutor
|
|
14
14
|
from dataclasses import dataclass, field
|
|
15
15
|
from typing import Any
|
|
16
16
|
|
|
17
|
-
from claude_smart import env_config
|
|
18
|
-
from claude_smart import runtime
|
|
17
|
+
from claude_smart import env_config, runtime
|
|
19
18
|
|
|
20
19
|
_LOGGER = logging.getLogger(__name__)
|
|
21
20
|
|
|
@@ -174,8 +173,9 @@ class Adapter:
|
|
|
174
173
|
|
|
175
174
|
Idempotent compare-then-write: reads ``Config``, only issues a
|
|
176
175
|
``set_config`` when the server-side values differ from the desired
|
|
177
|
-
dict below.
|
|
178
|
-
|
|
176
|
+
dict below. SessionStart calls this only for local Reflexio URLs by
|
|
177
|
+
default; ``CLAUDE_SMART_ENABLE_OPTIMIZER=1`` forces hosted URLs, and
|
|
178
|
+
``CLAUDE_SMART_ENABLE_OPTIMIZER=0`` disables it everywhere.
|
|
179
179
|
"""
|
|
180
180
|
client = self._get_client()
|
|
181
181
|
if client is None:
|
|
@@ -14,7 +14,8 @@ INTERNAL_ENV = "CLAUDE_SMART_INTERNAL"
|
|
|
14
14
|
|
|
15
15
|
HOST_CLAUDE_CODE = "claude-code"
|
|
16
16
|
HOST_CODEX = "codex"
|
|
17
|
-
|
|
17
|
+
HOST_OPENCODE = "opencode"
|
|
18
|
+
VALID_HOSTS = frozenset({HOST_CLAUDE_CODE, HOST_CODEX, HOST_OPENCODE})
|
|
18
19
|
|
|
19
20
|
_SHARED_AGENT_VERSION = "claude-code"
|
|
20
21
|
_current_host: str | None = None
|
|
@@ -42,6 +43,11 @@ def is_codex() -> bool:
|
|
|
42
43
|
return host() == HOST_CODEX
|
|
43
44
|
|
|
44
45
|
|
|
46
|
+
def is_opencode() -> bool:
|
|
47
|
+
"""True when the current hook invocation came from OpenCode."""
|
|
48
|
+
return host() == HOST_OPENCODE
|
|
49
|
+
|
|
50
|
+
|
|
45
51
|
def agent_version() -> str:
|
|
46
52
|
"""Reflexio agent version used for shared learning across hosts."""
|
|
47
53
|
return _SHARED_AGENT_VERSION
|
package/plugin/uv.lock
CHANGED
|
@@ -476,7 +476,7 @@ wheels = [
|
|
|
476
476
|
|
|
477
477
|
[[package]]
|
|
478
478
|
name = "claude-smart"
|
|
479
|
-
version = "0.2.
|
|
479
|
+
version = "0.2.47"
|
|
480
480
|
source = { editable = "." }
|
|
481
481
|
dependencies = [
|
|
482
482
|
{ name = "chromadb" },
|
|
@@ -494,7 +494,7 @@ dev = [
|
|
|
494
494
|
requires-dist = [
|
|
495
495
|
{ name = "chromadb", specifier = ">=0.5" },
|
|
496
496
|
{ name = "einops", specifier = ">=0.8.0" },
|
|
497
|
-
{ name = "reflexio-ai", specifier = ">=0.2.
|
|
497
|
+
{ name = "reflexio-ai", specifier = ">=0.2.27" },
|
|
498
498
|
{ name = "sqlite-vec", specifier = ">=0.1.6" },
|
|
499
499
|
]
|
|
500
500
|
|
|
@@ -2760,7 +2760,7 @@ wheels = [
|
|
|
2760
2760
|
|
|
2761
2761
|
[[package]]
|
|
2762
2762
|
name = "reflexio-ai"
|
|
2763
|
-
version = "0.2.
|
|
2763
|
+
version = "0.2.27"
|
|
2764
2764
|
source = { registry = "https://pypi.org/simple" }
|
|
2765
2765
|
dependencies = [
|
|
2766
2766
|
{ name = "aiohttp" },
|
|
@@ -2800,9 +2800,9 @@ dependencies = [
|
|
|
2800
2800
|
{ name = "websocket-client" },
|
|
2801
2801
|
{ name = "xlsxwriter" },
|
|
2802
2802
|
]
|
|
2803
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
2803
|
+
sdist = { url = "https://files.pythonhosted.org/packages/85/22/64429eb84ae74aaa6d36f0a2e0d91a27b35ee33ef17c18411d54f08706ba/reflexio_ai-0.2.27.tar.gz", hash = "sha256:e433209ca848245e957943c6476f2bba32581de8804d535d25ca0596b0da0afd", size = 1112139, upload-time = "2026-06-30T06:26:21.88Z" }
|
|
2804
2804
|
wheels = [
|
|
2805
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
2805
|
+
{ url = "https://files.pythonhosted.org/packages/68/22/d65332c75b9072e8838d51f68354d8d17c7636aa1cf73a20cfc1147b4364/reflexio_ai-0.2.27-py3-none-any.whl", hash = "sha256:4598f4aaa61e3c755a04573ab9711a7b5673ebf268029b2cef21cdcd5d4abfcf", size = 1461400, upload-time = "2026-06-30T06:26:19.965Z" },
|
|
2806
2806
|
]
|
|
2807
2807
|
|
|
2808
2808
|
[[package]]
|
|
@@ -1,17 +1,32 @@
|
|
|
1
|
-
#
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# Reflexio (open source) — example environment file
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# Copy to `.env` and fill in the values you need. The open-source CLI runs with
|
|
5
|
+
# SQLite storage and no auth by default, so the only thing you must set is one
|
|
6
|
+
# LLM provider key.
|
|
7
|
+
#
|
|
8
|
+
# LEGEND:
|
|
9
|
+
# (optional) = safe to leave empty; code default shown
|
|
10
|
+
# options: = allowed values for a categorical variable
|
|
11
|
+
# =============================================================================
|
|
2
12
|
|
|
3
|
-
#
|
|
4
|
-
# LLM
|
|
5
|
-
#
|
|
13
|
+
# =============================================================================
|
|
14
|
+
# 1. LLM PROVIDER KEYS
|
|
15
|
+
# =============================================================================
|
|
6
16
|
# Set at least one API key. The system auto-detects available providers and
|
|
7
|
-
# selects appropriate default models per role (generation, evaluation,
|
|
8
|
-
# pre_retrieval, embedding).
|
|
9
|
-
#
|
|
17
|
+
# selects appropriate default models per role (generation, evaluation,
|
|
18
|
+
# should_run, pre_retrieval, embedding).
|
|
19
|
+
#
|
|
20
|
+
# Provider priority when multiple keys are set:
|
|
21
|
+
# Anthropic > Gemini > OpenRouter > DeepSeek > MiniMax > DashScope > xAI >
|
|
22
|
+
# Moonshot > ZAI > OpenAI
|
|
10
23
|
# For the embedding role, if the top-priority provider has no embedding support,
|
|
11
24
|
# the next embedding-capable provider is used (currently OpenAI or Gemini).
|
|
25
|
+
#
|
|
12
26
|
# Model resolution order (highest priority first):
|
|
13
27
|
# 1. Org-level LLMConfig override
|
|
14
|
-
# 2. Non-empty values in
|
|
28
|
+
# 2. Non-empty values in
|
|
29
|
+
# reflexio/server/site_var/site_var_sources/llm_model_setting.json
|
|
15
30
|
# 3. Auto-detected default for the primary available provider
|
|
16
31
|
OPENAI_API_KEY=
|
|
17
32
|
ANTHROPIC_API_KEY=
|
|
@@ -24,39 +39,48 @@ ZAI_API_KEY=
|
|
|
24
39
|
MOONSHOT_API_KEY=
|
|
25
40
|
XAI_API_KEY=
|
|
26
41
|
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
30
|
-
# Set to enable Braintrust LLM observability (https://www.braintrust.dev)
|
|
42
|
+
# =============================================================================
|
|
43
|
+
# 2. OBSERVABILITY (optional)
|
|
44
|
+
# =============================================================================
|
|
45
|
+
# Set to enable Braintrust LLM observability (https://www.braintrust.dev).
|
|
31
46
|
# BRAINTRUST_API_KEY=
|
|
32
47
|
# BRAINTRUST_PROJECT_NAME=reflexio
|
|
33
48
|
|
|
34
|
-
#
|
|
35
|
-
#
|
|
36
|
-
#
|
|
49
|
+
# =============================================================================
|
|
50
|
+
# 3. STORAGE
|
|
51
|
+
# =============================================================================
|
|
37
52
|
# Local storage directory — houses disk-storage artifacts and the SQLite
|
|
38
|
-
# database file (reflexio.db).
|
|
53
|
+
# database file (reflexio.db). (optional; default ~/.reflexio/data/)
|
|
39
54
|
LOCAL_STORAGE_PATH=
|
|
55
|
+
# Default org id for no-auth / local mode. Controls the request org, and hence
|
|
56
|
+
# the config file name (config_<org>.json) and the SQLite data scope. Override
|
|
57
|
+
# it to run a second local backend under a distinct org so the two don't collide
|
|
58
|
+
# on the same config file under ~/.reflexio/. (optional; default self-host-org)
|
|
59
|
+
REFLEXIO_DEFAULT_ORG_ID=self-host-org
|
|
40
60
|
|
|
41
|
-
#
|
|
42
|
-
#
|
|
43
|
-
#
|
|
61
|
+
# =============================================================================
|
|
62
|
+
# 4. EXTRACTION
|
|
63
|
+
# =============================================================================
|
|
44
64
|
# Per-interaction content token budget when formatting interactions into an
|
|
45
65
|
# extraction/evaluation prompt. When an interaction's content exceeds this many
|
|
46
66
|
# tokens, the first half and last half are kept (head + tail) and the middle is
|
|
47
|
-
# elided.
|
|
67
|
+
# elided. (optional; default 512; set <= 0 to disable slicing and pass full
|
|
68
|
+
# content)
|
|
48
69
|
REFLEXIO_MAX_INTERACTION_CONTENT_TOKENS=512
|
|
70
|
+
# Inactivity delay in seconds before a quiet session is evaluated by agent-success
|
|
71
|
+
# evaluation. (optional; default 600 = 10 minutes)
|
|
72
|
+
GROUP_EVALUATION_DELAY_SECONDS=600
|
|
49
73
|
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
#
|
|
53
|
-
#
|
|
54
|
-
IS_TEST_ENV=true
|
|
55
|
-
# Set to enable debug logging to console
|
|
74
|
+
# =============================================================================
|
|
75
|
+
# 5. TESTING & LOGGING
|
|
76
|
+
# =============================================================================
|
|
77
|
+
# Verbose debug logging to console. options: true | false
|
|
56
78
|
DEBUG_LOG_TO_CONSOLE=true
|
|
57
|
-
#
|
|
79
|
+
# Mark the process as a test environment. options: true | false
|
|
80
|
+
IS_TEST_ENV=true
|
|
81
|
+
# Return canned LLM responses instead of calling providers. options: true | false
|
|
58
82
|
MOCK_LLM_RESPONSE=false
|
|
59
|
-
# Override the base directory for log files. The .reflexio/logs suffix is
|
|
60
|
-
#
|
|
61
|
-
# /tmp/foo/.reflexio/logs/.
|
|
83
|
+
# Override the base directory for log files. The .reflexio/logs suffix is always
|
|
84
|
+
# preserved, so e.g. REFLEXIO_LOG_DIR=/tmp/foo writes logs to
|
|
85
|
+
# /tmp/foo/.reflexio/logs/. (optional; default $HOME -> ~/.reflexio/logs/)
|
|
62
86
|
REFLEXIO_LOG_DIR=
|
|
@@ -7,12 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
[](https://www.python.org/)
|
|
9
9
|
[](LICENSE)
|
|
10
|
-
[](https://pypi.org/project/reflexio-ai/)
|
|
11
11
|
[](https://pepy.tech/project/reflexio-ai)
|
|
12
12
|
[](reflexio/benchmarks/retrieval_latency/results/report.md)
|
|
13
13
|
[](https://github.com/ReflexioAI/reflexio/stargazers)
|
|
14
|
+
[](https://discord.gg/7fnCxahase)
|
|
14
15
|
|
|
15
|
-
[Quick Start](#quick-start) · [Features](#features) · [Integrations](#integrations) · [SDK](#sdk-usage) · [CLI](reflexio/cli/README.md) · [Architecture](#architecture) · [Docs](https://www.reflexio.ai/docs) · [Contributing](#contributing)
|
|
16
|
+
[Quick Start](#quick-start) · [Features](#features) · [Integrations](#integrations) · [SDK](#sdk-usage) · [CLI](reflexio/cli/README.md) · [Architecture](#architecture) · [Docs](https://www.reflexio.ai/docs) · [Community](#community) · [Contributing](#contributing)
|
|
16
17
|
|
|
17
18
|
</div>
|
|
18
19
|
|
|
@@ -85,6 +86,7 @@ Publish conversations from your agent, and Reflexio closes the self-improvement
|
|
|
85
86
|
- [SDK Usage](#sdk-usage)
|
|
86
87
|
- [Architecture](#architecture)
|
|
87
88
|
- [Documentation](#documentation)
|
|
89
|
+
- [Community](#community)
|
|
88
90
|
- [Contributing](#contributing)
|
|
89
91
|
- [Star History](#star-history)
|
|
90
92
|
- [License](#license)
|
|
@@ -116,7 +118,7 @@ Publish conversations from your agent, and Reflexio closes the self-improvement
|
|
|
116
118
|
pip install reflexio-ai
|
|
117
119
|
|
|
118
120
|
# start/stop services. data saved under ~/.reflexio
|
|
119
|
-
reflexio services start # API (
|
|
121
|
+
reflexio services start # API (8061), Docs (8062), SQLite storage
|
|
120
122
|
reflexio services stop # Stop all services
|
|
121
123
|
```
|
|
122
124
|
|
|
@@ -135,13 +137,13 @@ uv sync # Python (includes workspace packages
|
|
|
135
137
|
npm --prefix docs install # API docs
|
|
136
138
|
|
|
137
139
|
# start/stop services. data saved under ~/.reflexio
|
|
138
|
-
uv run reflexio services start # API (
|
|
140
|
+
uv run reflexio services start # API (8061), Docs (8062), SQLite storage
|
|
139
141
|
uv run reflexio services stop # Stop all services
|
|
140
142
|
```
|
|
141
143
|
|
|
142
144
|
> Alternative: `python -m reflexio.cli services start` or `./run_services.sh`
|
|
143
145
|
|
|
144
|
-
Once running, open **[http://localhost:
|
|
146
|
+
Once running, open **[http://localhost:8062](http://localhost:8062)** to interactively browse and try out the API.
|
|
145
147
|
<p align="center">
|
|
146
148
|
<img src="docs/images/doc_website.png" width="800px" alt="Reflexio Doc Website">
|
|
147
149
|
</p>
|
|
@@ -172,7 +174,7 @@ One conversation, two artifacts: a user profile (`production region is us-west-2
|
|
|
172
174
|
import reflexio
|
|
173
175
|
|
|
174
176
|
client = reflexio.ReflexioClient(
|
|
175
|
-
url_endpoint="http://localhost:
|
|
177
|
+
url_endpoint="http://localhost:8061/"
|
|
176
178
|
)
|
|
177
179
|
|
|
178
180
|
# Publish a multi-turn conversation where the user corrects the agent —
|
|
@@ -222,7 +224,7 @@ Reflexio will automatically generate profiles and extract playbooks in the backg
|
|
|
222
224
|
- Session-level evaluation triggered automatically (10 min after last request)
|
|
223
225
|
- Shadow comparison mode: A/B test regular vs shadow agent responses
|
|
224
226
|
- Tool usage analysis for blocking issue detection
|
|
225
|
-
- **Causal measurement of Reflexio's impact** —
|
|
227
|
+
- **Causal measurement of Reflexio's impact** — source-set comparison on the Evaluation page groups evaluated sessions by the first request's `source`
|
|
226
228
|
|
|
227
229
|
[Read more about evaluation →](https://www.reflexio.ai/docs/examples/agent-evaluation)
|
|
228
230
|
|
|
@@ -242,10 +244,10 @@ Reflexio will automatically generate profiles and extract playbooks in the backg
|
|
|
242
244
|
|
|
243
245
|
For detailed API documentation, see the [full API reference](https://www.reflexio.ai/docs/api-reference).
|
|
244
246
|
|
|
245
|
-
Install the
|
|
247
|
+
Install the package:
|
|
246
248
|
|
|
247
249
|
```shell
|
|
248
|
-
pip install reflexio-
|
|
250
|
+
pip install reflexio-ai
|
|
249
251
|
```
|
|
250
252
|
|
|
251
253
|
### Basic usage
|
|
@@ -254,7 +256,7 @@ pip install reflexio-client
|
|
|
254
256
|
import reflexio
|
|
255
257
|
|
|
256
258
|
client = reflexio.ReflexioClient(
|
|
257
|
-
url_endpoint="http://localhost:
|
|
259
|
+
url_endpoint="http://localhost:8061/"
|
|
258
260
|
)
|
|
259
261
|
|
|
260
262
|
# Publish interactions
|
|
@@ -265,7 +267,7 @@ client.publish_interaction(
|
|
|
265
267
|
{"role": "assistant", "content": "..."},
|
|
266
268
|
],
|
|
267
269
|
agent_version="v1", # optional: track agent versions
|
|
268
|
-
session_id="session-abc", #
|
|
270
|
+
session_id="session-abc", # required: stable conversation/session id
|
|
269
271
|
)
|
|
270
272
|
|
|
271
273
|
# Search profiles
|
|
@@ -325,6 +327,10 @@ For comprehensive guides, examples, and API reference, visit the **[Reflexio Doc
|
|
|
325
327
|
|
|
326
328
|
For coding agents adding Reflexio to another agent, see **[Integrating an AI Agent with Reflexio](AI_AGENT_INTEGRATION.md)**.
|
|
327
329
|
|
|
330
|
+
## Community
|
|
331
|
+
|
|
332
|
+
Join the Reflexio community on Discord: [discord.gg/7fnCxahase](https://discord.gg/7fnCxahase).
|
|
333
|
+
|
|
328
334
|
## Contributing
|
|
329
335
|
|
|
330
336
|
We welcome contributions! Please see [developer.md](developer.md) for guidelines.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "reflexio-ai"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.27"
|
|
4
4
|
description = "A Python library for the Reflexio"
|
|
5
5
|
authors = [{name = "Reflexio Team"}]
|
|
6
6
|
readme = "README.md"
|
|
@@ -139,6 +139,9 @@ markers = [
|
|
|
139
139
|
"e2e: Full workflow tests with real storage and services",
|
|
140
140
|
"requires_credentials: Tests that need API keys (costs money)",
|
|
141
141
|
]
|
|
142
|
+
filterwarnings = [
|
|
143
|
+
"ignore:This process \\(pid=.*\\) is multi-threaded, use of fork\\(\\) may lead to deadlocks in the child\\.:DeprecationWarning:multiprocessing\\.popen_fork",
|
|
144
|
+
]
|
|
142
145
|
|
|
143
146
|
[tool.coverage.run]
|
|
144
147
|
# Measure branch coverage — ensures both if/else paths are tested, not just lines
|
|
@@ -217,6 +220,12 @@ ignore = [
|
|
|
217
220
|
"reflexio/server/api.py" = ["B008", "ARG001", "ARG002"]
|
|
218
221
|
"reflexio/server/api_endpoints/**" = ["B008", "ARG001", "ARG002"]
|
|
219
222
|
"reflexio/integrations/**" = ["ARG002"]
|
|
223
|
+
# The openclaw plugin is a nested package; its tests/scripts/cli are not reached
|
|
224
|
+
# by the top-level "tests/**" / "reflexio/cli/**" globs above (those only match
|
|
225
|
+
# at the tree root), so mirror the same standard test/cli ignores here.
|
|
226
|
+
"reflexio/integrations/openclaw/plugin/tests/**" = ["S101", "ARG001", "ARG002", "ARG005", "PTH", "ANN", "S105", "S106", "S107", "S108", "S310", "N802", "N806"]
|
|
227
|
+
"reflexio/integrations/openclaw/plugin/scripts/**" = ["S101", "G004", "ANN", "S603", "S607"]
|
|
228
|
+
"reflexio/integrations/openclaw/plugin/src/openclaw_smart/cli.py" = ["S603", "S607"]
|
|
220
229
|
"reflexio/server/services/configurator/test_config_storage.py" = ["S101", "ANN", "S108"]
|
|
221
230
|
"demo/**" = ["S101", "PTH", "G004", "ANN"]
|
|
222
231
|
"reflexio/server/services/storage/sqlite_storage/**" = ["S608"]
|
|
@@ -261,6 +270,9 @@ version_toml = ["pyproject.toml:project.version"]
|
|
|
261
270
|
tag_format = "reflexio-v{version}"
|
|
262
271
|
commit_message = "chore(release): reflexio v{version}"
|
|
263
272
|
build_command = "pip install build && python -m build"
|
|
273
|
+
# Pre-1.0 convention: a breaking change bumps the MINOR (0.x.y -> 0.(x+1).0),
|
|
274
|
+
# not MAJOR. So the B3 Task 7 breaking removal releases as 0.3.0, not 1.0.0.
|
|
275
|
+
major_on_zero = false
|
|
264
276
|
|
|
265
277
|
[tool.semantic_release.branches.main]
|
|
266
278
|
match = "^(main|master)$"
|
|
@@ -102,6 +102,7 @@ Description: FastAPI backend server that processes user interactions to generate
|
|
|
102
102
|
|
|
103
103
|
### Main Entry Points
|
|
104
104
|
- **API**: `api.py` - FastAPI routes
|
|
105
|
+
- **Extension Registry**: `extensions.py` - optional capability/service registration for OSS and enterprise integrations
|
|
105
106
|
- **Endpoint Helpers**: `api_endpoints/` - Request handlers calling `Reflexio` (reflexio_lib)
|
|
106
107
|
- **Core Service**: `services/generation_service.py` - Main orchestrator
|
|
107
108
|
|
|
@@ -140,7 +141,9 @@ client (Python SDK)
|
|
|
140
141
|
- `evaluation_overview/` - Evaluation-page aggregates and hero metrics
|
|
141
142
|
- `playbook_optimizer/` - Scenario-based playbook optimization experiments
|
|
142
143
|
- `braintrust/` - Braintrust eval export/sync support
|
|
143
|
-
- `
|
|
144
|
+
- `lineage/` - Resolve current records and schedule tombstone garbage collection for superseded profile/playbook rows
|
|
145
|
+
- `governance/` - Subject-reference contracts and retention/barrier helpers used by storage and lineage
|
|
146
|
+
- `storage/` - Abstract layer (SQLite prod, LocalJSON test) with governance-aware write validation
|
|
144
147
|
- `pre_retrieval/` - Query rewriting and document expansion helpers
|
|
145
148
|
- `configurator/` - YAML config loader
|
|
146
149
|
- **`site_var/`**: Global settings singleton
|