entelligence-cli 0.1.321__tar.gz → 0.1.323__tar.gz
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.
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/PKG-INFO +1 -1
- entelligence_cli-0.1.323/entelligence_cli/_vendor/MEMORY_CORE_SOURCE_REVISION +1 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/claude_code.py +12 -7
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/source.py +28 -2
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/vocabulary/edges.py +5 -2
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/vocabulary/nodes.py +53 -4
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/commands/insights.py +132 -23
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/scheduling.py +4 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/update_checker.py +72 -8
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli.egg-info/PKG-INFO +1 -1
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli.egg-info/SOURCES.txt +2 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/pyproject.toml +1 -1
- entelligence_cli-0.1.323/tests/test_auto_update_loop_guard.py +159 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_billing_snapshot.py +4 -1
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_claude_capture_boundary.py +7 -2
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_insights_cadence_heartbeat.py +3 -1
- entelligence_cli-0.1.323/tests/test_sync_parse_failure_checkpoint.py +121 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_sync_pushes_built_sessions.py +4 -2
- entelligence_cli-0.1.321/entelligence_cli/_vendor/MEMORY_CORE_SOURCE_REVISION +0 -1
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/README.md +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/__init__.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/MEMORY_CORE_VERSION +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/__init__.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/__init__.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/code_authorship.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/__init__.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/__init__.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_paths.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_segmentation_prompts/system.j2 +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_segmentation_prompts/user.j2 +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/__init__.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/_base.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/_jsonl_utils.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/__init__.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/git_reader.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/models.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/parser.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/source.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/factory.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/__init__.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/__init__.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/base.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/claude_cost_summary.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/codex.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/copilot.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/cursor_agent_transcript.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/cursor_store.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/kiro.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/opencode.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/behavior_signals.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/edit_lines.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/file_paths.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/metrics.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/produced.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/segment_orchestrator.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/segment_pure.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/session_pure.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/skill_names.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/spans.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/pricing.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/vocabulary/__init__.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/_vendor/memory_core/vocabulary/categories.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/agent_insights_proxy.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/agent_insights_segment.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/api_client.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/ascii-art.txt +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/billing_snapshot.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/browser_login.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/claude_cloud.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/cli.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/code_authorship.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/commands/__init__.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/commands/auth.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/commands/budget.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/commands/config.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/commands/cursor_doctor.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/commands/incident.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/commands/mcp.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/commands/reset.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/commands/review.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/commands/router.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/commands/security.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/commands/skills.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/commands/trim.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/commands/update.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/config.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/cursor_cloud.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/cursor_path_a_usage.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/diagnostics.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/exceptions.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/facts_envelope.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/git_operations.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/hooks/__init__.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/hooks/capacity_emit.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/hooks/context_guard.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/hooks/session_brief.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/hooks/standup_emit.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/insights_log.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/insights_watch.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/mcp_inventory.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/platform_env.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/router/__init__.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/router/claude_settings.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/router/codex_auth.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/router/codex_settings.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/router/compress.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/router/copilot_launcher.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/router/copilot_settings.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/router/cursor_settings.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/router/state.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/session_deferrals.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/session_inventory.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/session_revisions.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/textual_ui.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/token_savings_snapshot.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/ui/__init__.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/ui/interactive.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/ui/keys.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/ui/loaders.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/ui/output.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/ui/styles.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/upload/__init__.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/upload/conductor.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/upload/config.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/upload/cursor_usage.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/upload/discovery.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/upload/manifest.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/upload/models.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/upload/pii.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/upload/runner.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/upload/secrets.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/upload/stores.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli/wrapped_game.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli.egg-info/dependency_links.txt +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli.egg-info/entry_points.txt +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli.egg-info/requires.txt +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/entelligence_cli.egg-info/top_level.txt +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/setup.cfg +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_agent_insights_proxy.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_agent_insights_proxy_api_client.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_agent_insights_segment.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_attach_fix_smoke.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_attach_ticket_smoke.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_billing_snapshot_cloud.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_budget_smoke.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_capacity_emit.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_claude_cloud.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_claude_cloud_cadence.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_claude_code_cost_events.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_claude_code_subagent_usage.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_claude_hook_helper_classification.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_code_authorship.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_code_authorship_parser_regressions.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_code_authorship_parsers.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_codex_auth.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_codex_native_ledger.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_codex_settings.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_codex_total_only_sync.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_conductor.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_context_guard.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_copilot_launcher.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_copilot_parser_tokens.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_creation_provenance_contract.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_cursor_cloud.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_cursor_composer_mtime_stamp.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_cursor_doctor.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_cursor_path_a_usage.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_cursor_path_regex_and_heartbeat.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_cursor_self_heal_loop.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_cursor_settings.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_cursor_unknown_timestamps.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_cursor_usage.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_cursor_usage_archive.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_cursor_usage_completeness.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_cursor_usage_heal.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_cursor_usage_recapture.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_cursor_usage_state.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_detached_background_work.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_diagnostics.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_discovery_head_unicode.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_discovery_opencode.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_eligibility_state.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_endpoint_scheme_enforcement.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_entropy_secret_detection.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_error_body_decode.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_facts_envelope.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_git_operations_copilot.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_heartbeat_api_client.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_identity_cache_refresh.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_incident_refs.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_incident_smoke.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_insights_checkpoint_resume.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_insights_copilot_prompts.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_insights_cursor_composer_home.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_insights_index_failure.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_insights_kiro_prompts.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_insights_log.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_insights_me_smoke.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_insights_path_a_default.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_insights_produced_prs.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_insights_redrain.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_insights_repo_attribution.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_insights_schedule.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_insights_schedule_arm.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_insights_structured_payload.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_insights_watch.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_insights_watch_transport.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_legacy_encoding_recovery.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_local_source_discovery_stats.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_login_token_stdin.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_machine_fingerprint.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_mcp_install.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_mcp_inventory.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_multipart_backoff.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_pii.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_presigned_skip_index.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_processing_checkpoint_api_client.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_release_directive.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_reset_command.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_review_redaction.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_rosetta_self_heal.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_router_commands.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_router_dead_proxy_guard.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_router_stats.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_scheduling_cron_env.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_schtasks_integration.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_secrets_redaction_boundary.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_security_commands.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_segment_chunking.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_segment_session_timeout.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_segmentation_role_gate.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_segmentation_window_scope.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_segmentation_worker_failure_visibility.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_session_accuracy_regressions.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_session_brief.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_session_deferrals.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_session_inventory.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_session_revisions.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_sessions_status_chunking.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_sessions_status_safe_default.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_skills_command.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_sync_backgrounding.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_sync_dry_run_checkpoint.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_sync_partial_schema.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_sync_runs_full_pipeline.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_token_savings_snapshot.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_trim_command.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_trim_hook_opt_in_only_guard.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_update_command.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_upload_copilot.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_upload_cursor_store.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_upload_home_backfill.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_upload_kiro.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_upload_repo_filter.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_upload_repo_roots.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_windows_compat.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_world_model_provenance.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_wrap_retry.py +0 -0
- {entelligence_cli-0.1.321 → entelligence_cli-0.1.323}/tests/test_wsl_support.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: entelligence-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.323
|
|
4
4
|
Summary: AI-powered code review assistant for your terminal - Get instant, intelligent feedback on your code changes
|
|
5
5
|
Author-email: EntelligenceAI <info@entelligence.ai>
|
|
6
6
|
Project-URL: Homepage, https://entelligence.ai
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9ac7865b1402c01f13f3503cd4e0c8c871ed609e
|
|
@@ -118,7 +118,7 @@ def _fallback_iterations(line: dict) -> list | None:
|
|
|
118
118
|
if iterations is None or iterations == []:
|
|
119
119
|
return None
|
|
120
120
|
if not isinstance(iterations, list) or not all(
|
|
121
|
-
isinstance(item, dict) and item.get("type")
|
|
121
|
+
isinstance(item, dict) and isinstance(item.get("type"), str) and item["type"]
|
|
122
122
|
for item in iterations
|
|
123
123
|
):
|
|
124
124
|
raise ValueError("Invalid Claude usage iterations")
|
|
@@ -136,13 +136,18 @@ def _fallback_iterations(line: dict) -> list | None:
|
|
|
136
136
|
)
|
|
137
137
|
if type(value) is not int or value < 0:
|
|
138
138
|
raise ValueError("Invalid Claude fallback token component")
|
|
139
|
-
if
|
|
139
|
+
if len(iterations) == 1 and iterations[0].get("model") in (None, message.get("model")):
|
|
140
140
|
# Native ordinary responses carry one message iteration with model=null.
|
|
141
141
|
# They retain the top-level streaming usage contract.
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
142
|
+
return None
|
|
143
|
+
# Any other shape means the response served more than one billed attempt —
|
|
144
|
+
# a fallback after a refusal, or a side call such as an advisor iteration
|
|
145
|
+
# whose tokens the top-level usage does not include. Per-attempt accounting
|
|
146
|
+
# is the only contract that bills all of them. An iteration without a model
|
|
147
|
+
# was served by the response's own model, so only a present one is checked.
|
|
148
|
+
if not all(
|
|
149
|
+
model_id_or_none(item["model"]) for item in iterations if item.get("model") is not None
|
|
150
|
+
):
|
|
146
151
|
raise ValueError("Invalid Claude fallback usage iterations")
|
|
147
152
|
return iterations
|
|
148
153
|
|
|
@@ -190,7 +195,7 @@ def _expand_fallback_requests(requests: dict) -> dict:
|
|
|
190
195
|
"message": {
|
|
191
196
|
**message,
|
|
192
197
|
"id": attempt_key,
|
|
193
|
-
"model": item
|
|
198
|
+
"model": item.get("model") or message.get("model"),
|
|
194
199
|
"usage": attempt_usage,
|
|
195
200
|
},
|
|
196
201
|
}
|
|
@@ -1376,8 +1376,34 @@ class LocalSource:
|
|
|
1376
1376
|
self._record_discovery("claude-code", "different_agent")
|
|
1377
1377
|
return None
|
|
1378
1378
|
|
|
1379
|
-
#
|
|
1380
|
-
# not
|
|
1379
|
+
# `<slug>/<session>/subagents/agent-*.jsonl` are component pieces of
|
|
1380
|
+
# the parent session, not sessions of their own — `get_spans_by_session`
|
|
1381
|
+
# folds them into the parent (`_with_claude_code_subagents`), so
|
|
1382
|
+
# indexing one here would also stand it up as a standalone session and
|
|
1383
|
+
# count its turns, tools and spend twice.
|
|
1384
|
+
#
|
|
1385
|
+
# This is a PATH check because the content check below is not
|
|
1386
|
+
# sufficient on its own: it reads the first parseable line, and newer
|
|
1387
|
+
# Claude Code builds front-load `queue-operation` / `last-prompt` /
|
|
1388
|
+
# `ai-title` records that carry no `isSidechain` flag at all, so the
|
|
1389
|
+
# loop breaks on one of those and admits the file. Measured 2026-09-17:
|
|
1390
|
+
# 461 production sessions have ids shaped `local:claude-code:agent-<hex>`,
|
|
1391
|
+
# every one of them a subagent transcript admitted this way. The Cursor
|
|
1392
|
+
# indexer and `memory/scripts/upload_transcripts.py` both already make
|
|
1393
|
+
# exactly this exclusion. Check the parts BELOW `projects_dir` only: a
|
|
1394
|
+
# configured home (or any ancestor of it) could itself be named
|
|
1395
|
+
# `subagents`, which must not drop real sessions.
|
|
1396
|
+
try:
|
|
1397
|
+
relative_parts = jsonl_file.relative_to(projects_dir).parts
|
|
1398
|
+
except ValueError:
|
|
1399
|
+
relative_parts = ()
|
|
1400
|
+
if "subagents" in relative_parts:
|
|
1401
|
+
self._record_discovery("claude-code", "subagent_component")
|
|
1402
|
+
return None
|
|
1403
|
+
|
|
1404
|
+
# Sub-agent sessions also carry isSidechain=true; skip them — they're
|
|
1405
|
+
# not developer-initiated work. Retained for the older layout, which
|
|
1406
|
+
# wrote a sidechain as a sibling transcript with no `subagents/` parent.
|
|
1381
1407
|
for line in head.split(b"\n"):
|
|
1382
1408
|
line = line.strip()
|
|
1383
1409
|
if not line:
|
|
@@ -117,7 +117,7 @@ class EdgeType(StrEnum):
|
|
|
117
117
|
REFERENCES_TICKET = "references_ticket" # CodingAgentTask / PullRequest → Ticket
|
|
118
118
|
PRODUCED = "produced" # CodingAgentSession → PullRequest
|
|
119
119
|
CONTRIBUTED_CODE_TO = "contributed_code_to" # Observed surviving edits, versioned by PR head
|
|
120
|
-
BILLED_ON = "billed_on" #
|
|
120
|
+
BILLED_ON = "billed_on" # Session/task → their UTC billed-day projection
|
|
121
121
|
SPANS = "spans" # CodingAgentTheme → Repo
|
|
122
122
|
INTRODUCED = "introduced" # CodingAgentTask / PullRequest → Issue
|
|
123
123
|
PRODUCED_FIX = "produced_fix" # CodingAgentTask → Fix (deferred writer)
|
|
@@ -288,7 +288,10 @@ ALLOWED_CONNECTIONS: dict[EdgeType, frozenset[tuple[NodeType, NodeType]]] = {
|
|
|
288
288
|
{(NodeType.CODING_AGENT_SESSION, NodeType.PULL_REQUEST)}
|
|
289
289
|
),
|
|
290
290
|
EdgeType.BILLED_ON: frozenset(
|
|
291
|
-
{
|
|
291
|
+
{
|
|
292
|
+
(NodeType.CODING_AGENT_SESSION, NodeType.CODING_AGENT_BILLED_DAY),
|
|
293
|
+
(NodeType.CODING_AGENT_TASK, NodeType.CODING_AGENT_TASK_BILLED_DAY),
|
|
294
|
+
}
|
|
292
295
|
),
|
|
293
296
|
EdgeType.SPANS: frozenset({(NodeType.CODING_AGENT_THEME, NodeType.REPO)}),
|
|
294
297
|
EdgeType.INTRODUCED: frozenset(
|
|
@@ -90,6 +90,7 @@ class NodeType(StrEnum):
|
|
|
90
90
|
CODING_AGENT_TASK = "CodingAgentTask"
|
|
91
91
|
CODING_AGENT_THEME = "CodingAgentTheme"
|
|
92
92
|
CODING_AGENT_BILLED_DAY = "CodingAgentBilledDay"
|
|
93
|
+
CODING_AGENT_TASK_BILLED_DAY = "CodingAgentTaskBilledDay"
|
|
93
94
|
|
|
94
95
|
# Decisions — architectural / strategic choices extracted from
|
|
95
96
|
# agent sessions (later: meetings, Slack, docs). Carries lifecycle
|
|
@@ -751,7 +752,9 @@ class Person(TenantedNode):
|
|
|
751
752
|
),
|
|
752
753
|
)
|
|
753
754
|
gitlab_login: str | None = Field(default=None, description="GitLab handle.")
|
|
754
|
-
github_user_id: str | None = Field(
|
|
755
|
+
github_user_id: str | None = Field(
|
|
756
|
+
default=None, description="Stable numeric GitHub account ID."
|
|
757
|
+
)
|
|
755
758
|
bitbucket_login: str | None = Field(default=None, description="Bitbucket handle.")
|
|
756
759
|
display_name: str | None = Field(default=None, description="Human name if known.")
|
|
757
760
|
email: str | None = Field(default=None)
|
|
@@ -1018,7 +1021,9 @@ class CodingAgentSession(TenantedNode):
|
|
|
1018
1021
|
default=None,
|
|
1019
1022
|
description="Latest branch observed in the transcript; HEAD means detached checkout.",
|
|
1020
1023
|
)
|
|
1021
|
-
branches: list[str] = Field(
|
|
1024
|
+
branches: list[str] = Field(
|
|
1025
|
+
default_factory=list, description="Distinct observed named branches in transcript order."
|
|
1026
|
+
)
|
|
1022
1027
|
conductor_workspace: str | None = Field(
|
|
1023
1028
|
default=None,
|
|
1024
1029
|
description="When the session ran inside a Conductor (conductor.build) workspace, the "
|
|
@@ -1035,7 +1040,8 @@ class CodingAgentSession(TenantedNode):
|
|
|
1035
1040
|
default=None, description="Active task-set write stamp; matches each task's ingested_at."
|
|
1036
1041
|
)
|
|
1037
1042
|
tasks_projection_complete: bool | None = Field(
|
|
1038
|
-
default=None,
|
|
1043
|
+
default=None,
|
|
1044
|
+
description="Whether the active write certified its exact task set and Session links.",
|
|
1039
1045
|
)
|
|
1040
1046
|
tasks_projection_ids: list[str] | None = Field(
|
|
1041
1047
|
default=None, description="Expected task IDs certified by the completed task-set write."
|
|
@@ -1559,6 +1565,40 @@ class CodingAgentBilledDay(TenantedNode):
|
|
|
1559
1565
|
)
|
|
1560
1566
|
|
|
1561
1567
|
|
|
1568
|
+
class CodingAgentTaskBilledDay(TenantedNode):
|
|
1569
|
+
"""One task's request-attributed usage on one UTC day.
|
|
1570
|
+
|
|
1571
|
+
Unlike :class:`CodingAgentBilledDay`, this projection includes only
|
|
1572
|
+
requests with a durable task range. That makes repository and theme scopes
|
|
1573
|
+
honest when a session also contains unscoped billable work.
|
|
1574
|
+
"""
|
|
1575
|
+
|
|
1576
|
+
node_type: Literal[NodeType.CODING_AGENT_TASK_BILLED_DAY] = Field(
|
|
1577
|
+
default=NodeType.CODING_AGENT_TASK_BILLED_DAY, frozen=True
|
|
1578
|
+
)
|
|
1579
|
+
session_id: str = Field(..., description="Owning CodingAgentSession id.")
|
|
1580
|
+
task_id: str = Field(..., description="Owning CodingAgentTask id.")
|
|
1581
|
+
user_uuid: str | None = Field(default=None, description="Member who ran the parent session.")
|
|
1582
|
+
agent: str = Field(..., description="Agent kind the request came from.")
|
|
1583
|
+
day: str = Field(..., description="UTC calendar day, YYYY-MM-DD.")
|
|
1584
|
+
cost_usd: float = Field(default=0.0, description="Task-linked request cost for the day.")
|
|
1585
|
+
requests: int = Field(default=0, description="Task-linked billing requests that day.")
|
|
1586
|
+
priced_requests: int = Field(default=0, description="Task-linked requests carrying a price.")
|
|
1587
|
+
input_tokens: int = Field(default=0)
|
|
1588
|
+
cache_read_tokens: int = Field(default=0)
|
|
1589
|
+
cache_write_tokens: int = Field(default=0)
|
|
1590
|
+
output_tokens: int = Field(default=0)
|
|
1591
|
+
models_json: str | None = Field(
|
|
1592
|
+
default=None, description="JSON {model: {requests, cost_usd, ...}} for the task/day."
|
|
1593
|
+
)
|
|
1594
|
+
cost_basis: Literal["vendor", "rate_card", "mixed", "allocated"] = Field(
|
|
1595
|
+
default="rate_card", description="Provenance of the task/day dollars."
|
|
1596
|
+
)
|
|
1597
|
+
computed_at: datetime | None = Field(
|
|
1598
|
+
default=None, description="When the attribution job last rebuilt this node."
|
|
1599
|
+
)
|
|
1600
|
+
|
|
1601
|
+
|
|
1562
1602
|
class CodingAgentTheme(TenantedNode):
|
|
1563
1603
|
"""A cluster of related Tasks spanning developers and weeks.
|
|
1564
1604
|
|
|
@@ -1683,7 +1723,10 @@ class Decision(TenantedNode):
|
|
|
1683
1723
|
)
|
|
1684
1724
|
|
|
1685
1725
|
# Provenance
|
|
1686
|
-
applies_to_files: list[str] = Field(
|
|
1726
|
+
applies_to_files: list[str] = Field(
|
|
1727
|
+
default_factory=list,
|
|
1728
|
+
description="Files explicitly governed by the decision, not all files in its session.",
|
|
1729
|
+
)
|
|
1687
1730
|
extraction_source: DecisionSourceLiteral = Field(default="coding_agent_session")
|
|
1688
1731
|
extraction_confidence: float | None = Field(
|
|
1689
1732
|
default=None,
|
|
@@ -1718,6 +1761,7 @@ NODE_MODELS: dict[NodeType, type[MemoryNode]] = {
|
|
|
1718
1761
|
NodeType.CODING_AGENT_TASK: CodingAgentTask,
|
|
1719
1762
|
NodeType.CODING_AGENT_THEME: CodingAgentTheme,
|
|
1720
1763
|
NodeType.CODING_AGENT_BILLED_DAY: CodingAgentBilledDay,
|
|
1764
|
+
NodeType.CODING_AGENT_TASK_BILLED_DAY: CodingAgentTaskBilledDay,
|
|
1721
1765
|
NodeType.DECISION: Decision,
|
|
1722
1766
|
}
|
|
1723
1767
|
|
|
@@ -1783,6 +1827,10 @@ def model_for(
|
|
|
1783
1827
|
node_type: Literal[NodeType.CODING_AGENT_BILLED_DAY],
|
|
1784
1828
|
) -> type[CodingAgentBilledDay]: ...
|
|
1785
1829
|
@overload
|
|
1830
|
+
def model_for(
|
|
1831
|
+
node_type: Literal[NodeType.CODING_AGENT_TASK_BILLED_DAY],
|
|
1832
|
+
) -> type[CodingAgentTaskBilledDay]: ...
|
|
1833
|
+
@overload
|
|
1786
1834
|
def model_for(node_type: Literal[NodeType.DECISION]) -> type[Decision]: ...
|
|
1787
1835
|
@overload
|
|
1788
1836
|
def model_for(node_type: str) -> type[MemoryNode]: ...
|
|
@@ -1808,6 +1856,7 @@ __all__ = [
|
|
|
1808
1856
|
"CodingAgentTask",
|
|
1809
1857
|
"CodingAgentTheme",
|
|
1810
1858
|
"CodingAgentBilledDay",
|
|
1859
|
+
"CodingAgentTaskBilledDay",
|
|
1811
1860
|
"Decision",
|
|
1812
1861
|
"DecisionLifecycleLiteral",
|
|
1813
1862
|
"DecisionScopeLiteral",
|
|
@@ -175,6 +175,45 @@ def _read_high_water_mark(org_uuid: str) -> datetime | None:
|
|
|
175
175
|
return _read_sync_state(org_uuid)[0]
|
|
176
176
|
|
|
177
177
|
|
|
178
|
+
# How many consecutive syncs may fail to capture the SAME session before the
|
|
179
|
+
# watermark is allowed past it. A failure caps the mark just below the failing
|
|
180
|
+
# session so it stays eligible for a retry; that is right for a transient read
|
|
181
|
+
# error and wrong for a malformed transcript, which fails identically forever
|
|
182
|
+
# and pins the mark at its own timestamp. Measured 2026-09-17: the shipped
|
|
183
|
+
# parser rejected 129 of 260 local Claude transcripts, and this org re-pushed
|
|
184
|
+
# 14,702 of 15,913 session rows in 24h because the mark never moved past the
|
|
185
|
+
# oldest of them. Three is a compromise: enough for a genuinely transient cause
|
|
186
|
+
# on a 15-minute schedule, short enough that a permanent one costs under an hour.
|
|
187
|
+
_PARSE_FAILURE_ABANDON_AFTER = 3
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
def _parse_failures_path(org_uuid: str) -> Path:
|
|
191
|
+
"""Per-org path for the consecutive parse-failure tally, keyed like the state file.
|
|
192
|
+
|
|
193
|
+
A separate file rather than a key in the sync-state file: ``_write_sync_state``
|
|
194
|
+
builds its payload from scratch and would drop the tally on every successful run.
|
|
195
|
+
"""
|
|
196
|
+
d = Path.home() / ".entelligence"
|
|
197
|
+
d.mkdir(exist_ok=True)
|
|
198
|
+
safe = "".join(c if (c.isalnum() or c in "._-") else "_" for c in (org_uuid or "unknown"))
|
|
199
|
+
return d / f"insights_parse_failures.{safe}.json"
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
def _read_parse_failures(org_uuid: str) -> dict[str, int]:
|
|
203
|
+
"""Consecutive parse failures per session id. Missing/corrupt reads as empty."""
|
|
204
|
+
with suppress(Exception):
|
|
205
|
+
raw = json.loads(_parse_failures_path(org_uuid).read_text(encoding="utf-8"))
|
|
206
|
+
if isinstance(raw, dict):
|
|
207
|
+
return {str(k): int(v) for k, v in raw.items() if isinstance(v, int)}
|
|
208
|
+
return {}
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
def _write_parse_failures(org_uuid: str, counts: dict[str, int]) -> None:
|
|
212
|
+
"""Persist the tally. Best-effort: a failure here only costs a retry budget."""
|
|
213
|
+
with suppress(Exception):
|
|
214
|
+
_parse_failures_path(org_uuid).write_text(json.dumps(counts), encoding="utf-8")
|
|
215
|
+
|
|
216
|
+
|
|
178
217
|
def _write_sync_state(
|
|
179
218
|
org_uuid: str, *, watermark: datetime | None, directive_generation: int
|
|
180
219
|
) -> None:
|
|
@@ -1932,9 +1971,18 @@ def _upgrade_now_best_effort(required: str, current: str, org_uuid: str | None =
|
|
|
1932
1971
|
required,
|
|
1933
1972
|
)
|
|
1934
1973
|
_enabled = None
|
|
1974
|
+
_guard = False
|
|
1935
1975
|
with suppress(Exception):
|
|
1976
|
+
from ..update_checker import loop_guard_active
|
|
1977
|
+
|
|
1978
|
+
_guard = loop_guard_active()
|
|
1936
1979
|
_enabled = auto_update_enabled(allow_headless=True)
|
|
1937
|
-
if
|
|
1980
|
+
if _guard:
|
|
1981
|
+
# ENT-4716: an upgrade re-exec'd this process and it is STILL on the
|
|
1982
|
+
# version it upgraded from — the installer ran but had no effect.
|
|
1983
|
+
# That is a failed install, not an opt-out.
|
|
1984
|
+
_floor("install_failed", outcome="failed", latest=latest)
|
|
1985
|
+
elif _enabled is False:
|
|
1938
1986
|
_floor("auto_update_disabled", outcome="skipped", latest=latest)
|
|
1939
1987
|
else:
|
|
1940
1988
|
_floor("install_failed", outcome="failed", latest=latest)
|
|
@@ -3656,6 +3704,40 @@ def _sync_cmd(
|
|
|
3656
3704
|
# failed extractions via its DLQ; Path A's mark must not strand them).
|
|
3657
3705
|
earliest_failed: datetime | None = None
|
|
3658
3706
|
parse_failed = False
|
|
3707
|
+
# Consecutive capture failures per session, so a transcript that fails
|
|
3708
|
+
# forever eventually stops holding the checkpoint (see
|
|
3709
|
+
# `_PARSE_FAILURE_ABANDON_AFTER`). Loaded once per run, written once below.
|
|
3710
|
+
parse_failures = _read_parse_failures(org_uuid)
|
|
3711
|
+
parse_abandoned = 0
|
|
3712
|
+
|
|
3713
|
+
def _note_parse_failure(session_id: str, last: datetime | None) -> None:
|
|
3714
|
+
"""Record a session's capture failure and decide whether it still blocks the mark.
|
|
3715
|
+
|
|
3716
|
+
Within the retry budget the mark is capped just below this session, so
|
|
3717
|
+
it (and everything newer) is re-evaluated next run. Past the budget the
|
|
3718
|
+
session is abandoned: it stops capping, and the loss is stated in the
|
|
3719
|
+
run log and counted in the run stats rather than dropped silently.
|
|
3720
|
+
|
|
3721
|
+
Args:
|
|
3722
|
+
session_id: the session that failed to capture.
|
|
3723
|
+
last: its discovery `last_span_time`, or None when unknown.
|
|
3724
|
+
"""
|
|
3725
|
+
nonlocal earliest_failed, parse_failed, parse_abandoned
|
|
3726
|
+
parse_failed = True
|
|
3727
|
+
count = parse_failures.get(session_id, 0) + 1
|
|
3728
|
+
parse_failures[session_id] = count
|
|
3729
|
+
if count >= _PARSE_FAILURE_ABANDON_AFTER:
|
|
3730
|
+
parse_abandoned += 1
|
|
3731
|
+
runlog.warn(
|
|
3732
|
+
"build",
|
|
3733
|
+
f"session={session_id} failed to capture {count} runs in a row: "
|
|
3734
|
+
"abandoned so the checkpoint can advance past it. Only "
|
|
3735
|
+
"`sync --all` or a resume directive will re-read it",
|
|
3736
|
+
)
|
|
3737
|
+
return
|
|
3738
|
+
if last is not None and (earliest_failed is None or last < earliest_failed):
|
|
3739
|
+
earliest_failed = last
|
|
3740
|
+
|
|
3659
3741
|
# Cursor persists no per-turn tokens locally, so its memory_core-parsed spans
|
|
3660
3742
|
# carry zero tokens and the backend drops the rows for graph parity (#4105).
|
|
3661
3743
|
# Fetch Cursor's billed usage once for this run and stamp it onto each Cursor
|
|
@@ -3715,9 +3797,7 @@ def _sync_cmd(
|
|
|
3715
3797
|
runlog.warn(
|
|
3716
3798
|
"build", f"parse failed for session={disc.session_id} — skipped", exc_info=True
|
|
3717
3799
|
)
|
|
3718
|
-
|
|
3719
|
-
if last is not None and (earliest_failed is None or last < earliest_failed):
|
|
3720
|
-
earliest_failed = last
|
|
3800
|
+
_note_parse_failure(disc.session_id, last)
|
|
3721
3801
|
continue
|
|
3722
3802
|
with suppress(Exception):
|
|
3723
3803
|
facts_envelope.enrich_session_identity(source, disc.session_id, spans)
|
|
@@ -3726,14 +3806,12 @@ def _sync_cmd(
|
|
|
3726
3806
|
# genuinely empty session — keep it retryable (don't advance the mark past
|
|
3727
3807
|
# it) instead of silently dropping it as "no turns" below.
|
|
3728
3808
|
if not spans and disc.span_count > 0:
|
|
3729
|
-
parse_failed = True
|
|
3730
3809
|
runlog.warn(
|
|
3731
3810
|
"build",
|
|
3732
3811
|
f"unreadable session={disc.session_id} "
|
|
3733
3812
|
f"(0 of {disc.span_count} spans read) — skipped",
|
|
3734
3813
|
)
|
|
3735
|
-
|
|
3736
|
-
earliest_failed = last
|
|
3814
|
+
_note_parse_failure(disc.session_id, last)
|
|
3737
3815
|
continue
|
|
3738
3816
|
# Stamp Cursor billed usage onto the root span BEFORE metrics compute, so
|
|
3739
3817
|
# aggregate_session_spans reports real session totals (no-op for non-Cursor
|
|
@@ -3746,14 +3824,12 @@ def _sync_cmd(
|
|
|
3746
3824
|
disc.session_id, spans, repos_by_leaf=repos_by_leaf
|
|
3747
3825
|
)
|
|
3748
3826
|
except (TypeError, ValueError):
|
|
3749
|
-
parse_failed = True
|
|
3750
3827
|
runlog.warn(
|
|
3751
3828
|
"build",
|
|
3752
3829
|
f"metrics failed for session={disc.session_id} — retry pending",
|
|
3753
3830
|
exc_info=True,
|
|
3754
3831
|
)
|
|
3755
|
-
|
|
3756
|
-
earliest_failed = last
|
|
3832
|
+
_note_parse_failure(disc.session_id, last)
|
|
3757
3833
|
continue
|
|
3758
3834
|
if session is None:
|
|
3759
3835
|
continue
|
|
@@ -3938,6 +4014,10 @@ def _sync_cmd(
|
|
|
3938
4014
|
# loop end to end so it cannot silently happen again.
|
|
3939
4015
|
sessions.append(session)
|
|
3940
4016
|
pushed_session_ids.append(disc.session_id)
|
|
4017
|
+
# Captured cleanly, so the retry budget resets: `_PARSE_FAILURE_ABANDON_AFTER`
|
|
4018
|
+
# counts CONSECUTIVE failures, and a transient read error must never
|
|
4019
|
+
# accumulate toward abandoning a session that parses fine on other runs.
|
|
4020
|
+
parse_failures.pop(disc.session_id, None)
|
|
3941
4021
|
# ENT-4430 (part 2): lets the push loop below cap the watermark at a
|
|
3942
4022
|
# specific session's timestamp (via `earliest_failed`, same mechanism
|
|
3943
4023
|
# the parse-failure branches above already use) if that session's
|
|
@@ -3954,6 +4034,13 @@ def _sync_cmd(
|
|
|
3954
4034
|
f"{outside_window} session(s) outside the look-back window by parsed "
|
|
3955
4035
|
"span time (discovery mtime said newer) — not pushed",
|
|
3956
4036
|
)
|
|
4037
|
+
if not dry_run:
|
|
4038
|
+
# Persisted HERE, at the end of capture, not after the push: whether a
|
|
4039
|
+
# transcript parses is independent of whether the push later succeeded,
|
|
4040
|
+
# and a run that aborts on a 429 must still spend the retry budget. A
|
|
4041
|
+
# dry run writes nothing, so its failures cost no budget either.
|
|
4042
|
+
_write_parse_failures(org_uuid, parse_failures)
|
|
4043
|
+
_merge_last_run_stats(org_uuid, parse_abandoned=parse_abandoned)
|
|
3957
4044
|
if cursor_usage_run_state != RUN_STATE_NO_CURSOR_SESSIONS:
|
|
3958
4045
|
# Remembered for the hourly heartbeat: the run-level reason plus the
|
|
3959
4046
|
# per-session tally, so the org's readiness check can name the machines
|
|
@@ -4191,7 +4278,27 @@ def _sync_cmd(
|
|
|
4191
4278
|
e.get("cost_observation", {}).get("complete") is False for e in envelopes
|
|
4192
4279
|
)
|
|
4193
4280
|
deferred_live = bool(os.environ.get("ENTELLIGENCE_LIVE_SYNC")) and pushed < len(sessions)
|
|
4194
|
-
|
|
4281
|
+
# A capture failure is NOT a whole-run failure. Every session that built,
|
|
4282
|
+
# pushed and was acknowledged is durable server-side, and
|
|
4283
|
+
# `_next_high_water_mark` already caps the new mark below the earliest
|
|
4284
|
+
# still-retryable failure. Aborting here discarded that mark too, so one
|
|
4285
|
+
# unparseable transcript froze the checkpoint for every other session in the
|
|
4286
|
+
# batch: the whole backlog then re-pushed on every run and nothing newer ever
|
|
4287
|
+
# settled. This is the exact shape `error_type` used to label
|
|
4288
|
+
# `_PartialCaptureError`: capture lost some sessions, but every session that
|
|
4289
|
+
# DID build was pushed and archived. Those runs now leave through the raise
|
|
4290
|
+
# BELOW the checkpoint write. Anything else (an unproven push, a missing
|
|
4291
|
+
# acknowledgement, a deferred batch) is still a hard abort with the mark
|
|
4292
|
+
# untouched, because those sessions are not stored anywhere yet.
|
|
4293
|
+
capture_only = (
|
|
4294
|
+
parse_failed
|
|
4295
|
+
and sessions
|
|
4296
|
+
and pushed == len(sessions)
|
|
4297
|
+
and envelopes_archived_total == len(sessions)
|
|
4298
|
+
and not unconfirmed
|
|
4299
|
+
and not incomplete_facts
|
|
4300
|
+
)
|
|
4301
|
+
if not capture_only and (
|
|
4195
4302
|
envelopes_archived_total < len(sessions)
|
|
4196
4303
|
or unconfirmed
|
|
4197
4304
|
or parse_failed
|
|
@@ -4214,17 +4321,9 @@ def _sync_cmd(
|
|
|
4214
4321
|
gated_count=repo_gated_total,
|
|
4215
4322
|
error_detail=detail,
|
|
4216
4323
|
)
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
and sessions
|
|
4221
|
-
and pushed == len(sessions)
|
|
4222
|
-
and envelopes_archived_total == len(sessions)
|
|
4223
|
-
and not unconfirmed
|
|
4224
|
-
and not incomplete_facts
|
|
4225
|
-
else click.ClickException
|
|
4226
|
-
)
|
|
4227
|
-
raise error_type(
|
|
4324
|
+
# Always the hard type here: every capture-only failure now leaves via
|
|
4325
|
+
# the `_PartialCaptureError` below, AFTER the checkpoint is written.
|
|
4326
|
+
raise click.ClickException(
|
|
4228
4327
|
f"Sync incomplete ({envelopes_archived_total}/{len(sessions)} archived, "
|
|
4229
4328
|
f"{len(unconfirmed)} storage acknowledgements missing, capture failed={parse_failed}, "
|
|
4230
4329
|
f"request facts truncated={incomplete_facts}). "
|
|
@@ -4304,7 +4403,7 @@ def _sync_cmd(
|
|
|
4304
4403
|
if earliest_failed is None:
|
|
4305
4404
|
_write_unpriced_cursor(org_uuid, unpriced_cursor)
|
|
4306
4405
|
_mark_sync_run(transcripts=False) # a metrics sync ran today
|
|
4307
|
-
|
|
4406
|
+
elif pushed < len(sessions):
|
|
4308
4407
|
# ENT-4528 review: a run that left 429'd batches for "a future run" must
|
|
4309
4408
|
# not stamp the cadence marker — `_should_run_path_a` would then treat
|
|
4310
4409
|
# the next hourly `--agent` fire as "recently synced" and sit on the
|
|
@@ -4315,6 +4414,16 @@ def _sync_cmd(
|
|
|
4315
4414
|
"run complete so the next scheduled fire retries them",
|
|
4316
4415
|
len(sessions) - pushed,
|
|
4317
4416
|
)
|
|
4417
|
+
if parse_failed:
|
|
4418
|
+
# Capture-only: everything that built is pushed, acknowledged and now
|
|
4419
|
+
# checkpointed. Still an error so the run is reported as incomplete and
|
|
4420
|
+
# the cadence marker above stays unstamped while a retry is pending.
|
|
4421
|
+
raise _PartialCaptureError(
|
|
4422
|
+
f"Capture incomplete ({pushed}/{len(sessions)} sessions captured, "
|
|
4423
|
+
f"{parse_abandoned} abandoned). Checkpoint advanced to "
|
|
4424
|
+
f"{(new_hwm if max_seen is not None else hwm)}; "
|
|
4425
|
+
"the next sync retries what is still eligible."
|
|
4426
|
+
)
|
|
4318
4427
|
runlog.line(
|
|
4319
4428
|
"push",
|
|
4320
4429
|
f"{pushed} sent · {sessions_stored_total} stored · "
|
|
@@ -104,6 +104,10 @@ def detach_env(env: dict[str, str] | None = None) -> dict[str, str]:
|
|
|
104
104
|
The environment with UTF-8 IO pinned on Windows, unchanged elsewhere.
|
|
105
105
|
"""
|
|
106
106
|
result = dict(env if env is not None else os.environ)
|
|
107
|
+
# ENT-4716: the auto-update re-exec sentinel (update_checker
|
|
108
|
+
# AUTO_UPDATE_SENTINEL_ENV) is a one-process marker. A detached child that
|
|
109
|
+
# inherits it looks "just upgraded" to every later floor check.
|
|
110
|
+
result.pop("ENTELLIGENCE_AUTO_UPDATED", None)
|
|
107
111
|
if platform.system() == "Windows":
|
|
108
112
|
result["PYTHONUTF8"] = "1"
|
|
109
113
|
result["PYTHONIOENCODING"] = "utf-8"
|
|
@@ -431,6 +431,53 @@ def get_update_message(update_info: dict) -> str:
|
|
|
431
431
|
)
|
|
432
432
|
|
|
433
433
|
|
|
434
|
+
def _running_version() -> str | None:
|
|
435
|
+
"""The version THIS process is running (captured at import, so it stays the
|
|
436
|
+
old version after an in-place upgrade until we re-exec)."""
|
|
437
|
+
try:
|
|
438
|
+
from entelligence_cli import __version__
|
|
439
|
+
|
|
440
|
+
return str(__version__)
|
|
441
|
+
except Exception: # noqa: BLE001 — a missing version must not break a gate
|
|
442
|
+
return None
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
def installed_version_on_disk() -> str | None:
|
|
446
|
+
"""The version currently installed on disk for the running interpreter.
|
|
447
|
+
|
|
448
|
+
Read fresh from the package metadata, not from ``__version__``: right after
|
|
449
|
+
``pip``/``uv`` upgraded in place this is the NEW version while the process
|
|
450
|
+
still runs the old one. ``None`` when the metadata cannot be read.
|
|
451
|
+
"""
|
|
452
|
+
try:
|
|
453
|
+
return metadata.version(PACKAGE_NAME)
|
|
454
|
+
except Exception: # noqa: BLE001 — unreadable metadata means "unknown"
|
|
455
|
+
return None
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
def loop_guard_active() -> bool:
|
|
459
|
+
"""True only when the re-exec sentinel names THIS running version (ENT-4716).
|
|
460
|
+
|
|
461
|
+
The sentinel is set by :func:`_reexec_current_command` right before an
|
|
462
|
+
upgraded process re-execs, so that process skips auto-update. It used to be
|
|
463
|
+
a bare ``"1"`` honoured unconditionally, which froze a machine whenever the
|
|
464
|
+
marker lingered: an upgrade that exited 0 without changing the running
|
|
465
|
+
install re-exec'd with it set, and an inherited copy in a scheduled job's
|
|
466
|
+
environment blocked every hourly floor check for good, both reported as
|
|
467
|
+
``auto_update_disabled`` while the heartbeat said auto-update was on.
|
|
468
|
+
|
|
469
|
+
A process still on the version the sentinel names IS the ineffective-upgrade
|
|
470
|
+
loop the guard exists for. Any other value — a different version (the
|
|
471
|
+
upgrade worked), the legacy ``"1"``, or an inherited leftover — is stale
|
|
472
|
+
and must not block an upgrade.
|
|
473
|
+
"""
|
|
474
|
+
value = os.environ.get(AUTO_UPDATE_SENTINEL_ENV)
|
|
475
|
+
if not value:
|
|
476
|
+
return False
|
|
477
|
+
running = _running_version()
|
|
478
|
+
return bool(running) and value == running
|
|
479
|
+
|
|
480
|
+
|
|
434
481
|
def auto_update_enabled(allow_headless: bool = False, *, ignore_loop_guard: bool = False) -> bool:
|
|
435
482
|
"""Decide whether the CLI may upgrade itself in place.
|
|
436
483
|
|
|
@@ -457,7 +504,7 @@ def auto_update_enabled(allow_headless: bool = False, *, ignore_loop_guard: bool
|
|
|
457
504
|
True only for a normally-installed, non-CI invocation that has not
|
|
458
505
|
opted out — and, unless ``allow_headless``, is interactive.
|
|
459
506
|
"""
|
|
460
|
-
if not ignore_loop_guard and
|
|
507
|
+
if not ignore_loop_guard and loop_guard_active():
|
|
461
508
|
return False
|
|
462
509
|
if _is_truthy_env(os.environ.get(AUTO_UPDATE_DISABLE_ENV)):
|
|
463
510
|
return False
|
|
@@ -479,19 +526,21 @@ def auto_update_enabled(allow_headless: bool = False, *, ignore_loop_guard: bool
|
|
|
479
526
|
return not is_editable_install()
|
|
480
527
|
|
|
481
528
|
|
|
482
|
-
def _reexec_current_command() -> None:
|
|
529
|
+
def _reexec_current_command(from_version: str | None = None) -> None:
|
|
483
530
|
"""Replace this process with the same command so it runs on the new version.
|
|
484
531
|
|
|
485
|
-
Sets the loop-guard sentinel
|
|
486
|
-
process skips auto-update
|
|
487
|
-
|
|
532
|
+
Sets the loop-guard sentinel to the version we are upgrading FROM before
|
|
533
|
+
exec, so the re-exec'd process skips auto-update only if it is still on
|
|
534
|
+
that version (see :func:`loop_guard_active`). Returns normally (without
|
|
535
|
+
exec-ing) only if the re-exec fails, letting the caller continue on the
|
|
536
|
+
already-running version.
|
|
488
537
|
"""
|
|
489
538
|
exe = sys.argv[0]
|
|
490
539
|
if exe and os.sep not in exe and (resolved := shutil.which(exe)):
|
|
491
540
|
exe = resolved
|
|
492
541
|
if not exe or not os.path.exists(exe):
|
|
493
542
|
return
|
|
494
|
-
os.environ[AUTO_UPDATE_SENTINEL_ENV] = "1"
|
|
543
|
+
os.environ[AUTO_UPDATE_SENTINEL_ENV] = from_version or "1"
|
|
495
544
|
try:
|
|
496
545
|
os.execv(exe, [exe, *sys.argv[1:]])
|
|
497
546
|
except OSError:
|
|
@@ -720,6 +769,18 @@ def maybe_auto_update(
|
|
|
720
769
|
pass
|
|
721
770
|
return False
|
|
722
771
|
|
|
772
|
+
# ENT-4716: an installer can exit 0 without changing what this interpreter
|
|
773
|
+
# runs (a stale index cache answering "nothing to upgrade", a pip that
|
|
774
|
+
# targets another environment). Re-exec'ing on that is how a machine loops
|
|
775
|
+
# or freezes, so verify the install actually moved before trusting it.
|
|
776
|
+
on_disk = installed_version_on_disk()
|
|
777
|
+
if on_disk is not None and current and on_disk == current:
|
|
778
|
+
cache = load_cache()
|
|
779
|
+
cache["last_upgrade_error"] = f"installer exited 0 but {on_disk} is still installed"
|
|
780
|
+
save_cache(cache)
|
|
781
|
+
_emit_upgrade_failed_event("unknown", org_uuid, error_detail="UpgradeHadNoEffect")
|
|
782
|
+
return False
|
|
783
|
+
|
|
723
784
|
# Mark this version as current so a failed re-exec won't re-prompt today, and
|
|
724
785
|
# clear any stale failure recorded by a previous attempt.
|
|
725
786
|
cache = load_cache()
|
|
@@ -728,7 +789,7 @@ def maybe_auto_update(
|
|
|
728
789
|
save_cache(cache)
|
|
729
790
|
_emit_upgrade_event(latest, org_uuid)
|
|
730
791
|
|
|
731
|
-
_reexec_current_command()
|
|
792
|
+
_reexec_current_command(current or None)
|
|
732
793
|
|
|
733
794
|
# Only reached if re-exec failed. The upgrade itself succeeded on disk, so we
|
|
734
795
|
# must NOT fall through to the "run the upgrade command" notice — that would
|
|
@@ -877,7 +938,9 @@ def _emit_upgrade_event(new_version: str, org_uuid: str | None = None) -> None:
|
|
|
877
938
|
pass
|
|
878
939
|
|
|
879
940
|
|
|
880
|
-
def _emit_upgrade_failed_event(
|
|
941
|
+
def _emit_upgrade_failed_event(
|
|
942
|
+
error_code: str, org_uuid: str | None = None, *, error_detail: str | None = None
|
|
943
|
+
) -> None:
|
|
881
944
|
"""Queue a cli_version_upgrade outcome=failed event (ENT-4413), best-effort.
|
|
882
945
|
|
|
883
946
|
Same org-attribution rules as :func:`_emit_upgrade_event`. ``error_code`` is
|
|
@@ -899,6 +962,7 @@ def _emit_upgrade_failed_event(error_code: str, org_uuid: str | None = None) ->
|
|
|
899
962
|
outcome="failed",
|
|
900
963
|
error_code=error_code,
|
|
901
964
|
install_method=install_method_label(),
|
|
965
|
+
error_detail=error_detail,
|
|
902
966
|
)
|
|
903
967
|
except Exception: # noqa: BLE001 — diagnostics must never break the upgrade
|
|
904
968
|
pass
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: entelligence-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.323
|
|
4
4
|
Summary: AI-powered code review assistant for your terminal - Get instant, intelligent feedback on your code changes
|
|
5
5
|
Author-email: EntelligenceAI <info@entelligence.ai>
|
|
6
6
|
Project-URL: Homepage, https://entelligence.ai
|
|
@@ -132,6 +132,7 @@ tests/test_agent_insights_proxy_api_client.py
|
|
|
132
132
|
tests/test_agent_insights_segment.py
|
|
133
133
|
tests/test_attach_fix_smoke.py
|
|
134
134
|
tests/test_attach_ticket_smoke.py
|
|
135
|
+
tests/test_auto_update_loop_guard.py
|
|
135
136
|
tests/test_billing_snapshot.py
|
|
136
137
|
tests/test_billing_snapshot_cloud.py
|
|
137
138
|
tests/test_budget_smoke.py
|
|
@@ -235,6 +236,7 @@ tests/test_sessions_status_safe_default.py
|
|
|
235
236
|
tests/test_skills_command.py
|
|
236
237
|
tests/test_sync_backgrounding.py
|
|
237
238
|
tests/test_sync_dry_run_checkpoint.py
|
|
239
|
+
tests/test_sync_parse_failure_checkpoint.py
|
|
238
240
|
tests/test_sync_partial_schema.py
|
|
239
241
|
tests/test_sync_pushes_built_sessions.py
|
|
240
242
|
tests/test_sync_runs_full_pipeline.py
|