entelligence-cli 0.1.261__tar.gz → 0.1.263__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.261 → entelligence_cli-0.1.263}/PKG-INFO +1 -1
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/commands/insights.py +130 -4
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/diagnostics.py +10 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/facts_envelope.py +120 -1
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli.egg-info/PKG-INFO +1 -1
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/pyproject.toml +1 -1
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_diagnostics.py +21 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_facts_envelope.py +216 -3
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_insights_checkpoint_resume.py +95 -3
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_insights_redrain.py +46 -2
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_sync_pushes_built_sessions.py +107 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/README.md +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/__init__.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/__init__.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/__init__.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/__init__.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/__init__.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_paths.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_segmentation_prompts/system.j2 +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_segmentation_prompts/user.j2 +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/__init__.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/_base.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/_jsonl_utils.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/__init__.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/git_reader.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/models.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/parser.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/source.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/factory.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/__init__.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/__init__.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/base.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/claude_code.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/codex.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/copilot.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/cursor_agent_transcript.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/cursor_store.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/kiro.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/opencode.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/source.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/behavior_signals.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/edit_lines.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/file_paths.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/metrics.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/segment_orchestrator.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/segment_pure.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/session_pure.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/skill_names.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/spans.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/pricing.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/vocabulary/__init__.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/vocabulary/categories.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/vocabulary/edges.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/_vendor/memory_core/vocabulary/nodes.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/agent_insights_proxy.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/agent_insights_segment.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/api_client.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/ascii-art.txt +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/browser_login.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/cli.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/commands/__init__.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/commands/auth.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/commands/budget.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/commands/config.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/commands/cursor_doctor.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/commands/incident.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/commands/mcp.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/commands/reset.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/commands/review.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/commands/router.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/commands/security.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/commands/skills.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/commands/update.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/config.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/cursor_path_a_usage.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/exceptions.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/git_operations.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/hooks/__init__.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/hooks/capacity_emit.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/hooks/session_brief.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/hooks/standup_emit.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/insights_log.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/mcp_inventory.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/platform_env.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/router/__init__.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/router/bedrock.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/router/catalog.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/router/claude_settings.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/router/codex_auth.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/router/codex_settings.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/router/compress.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/router/copilot_launcher.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/router/copilot_settings.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/router/daemon.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/router/engine.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/router/gateway.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/router/gemini_translate.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/router/openai_translate.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/router/proxy.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/router/state.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/scheduling.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/session_inventory.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/textual_ui.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/ui/__init__.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/ui/interactive.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/ui/keys.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/ui/loaders.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/ui/output.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/ui/styles.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/update_checker.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/upload/__init__.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/upload/conductor.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/upload/config.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/upload/cursor_usage.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/upload/discovery.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/upload/manifest.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/upload/models.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/upload/pii.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/upload/runner.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/upload/secrets.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/upload/stores.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli/wrapped_game.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli.egg-info/SOURCES.txt +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli.egg-info/dependency_links.txt +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli.egg-info/entry_points.txt +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli.egg-info/requires.txt +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/entelligence_cli.egg-info/top_level.txt +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/setup.cfg +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_agent_insights_proxy.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_agent_insights_proxy_api_client.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_agent_insights_segment.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_attach_fix_smoke.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_attach_ticket_smoke.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_budget_smoke.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_capacity_emit.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_codex_auth.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_codex_settings.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_conductor.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_copilot_launcher.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_copilot_parser_tokens.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_cursor_composer_mtime_stamp.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_cursor_doctor.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_cursor_path_a_usage.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_cursor_path_regex_and_heartbeat.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_cursor_self_heal_loop.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_cursor_usage.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_cursor_usage_archive.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_cursor_usage_heal.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_cursor_usage_recapture.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_cursor_usage_state.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_detached_background_work.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_discovery_head_unicode.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_discovery_opencode.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_eligibility_state.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_endpoint_scheme_enforcement.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_entropy_secret_detection.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_error_body_decode.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_gemini_key_header.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_git_operations_copilot.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_heartbeat_api_client.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_identity_cache_refresh.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_incident_refs.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_incident_smoke.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_insights_cadence_heartbeat.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_insights_copilot_prompts.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_insights_cursor_composer_home.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_insights_index_failure.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_insights_kiro_prompts.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_insights_log.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_insights_me_smoke.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_insights_path_a_default.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_insights_produced_prs.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_insights_repo_attribution.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_insights_schedule.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_insights_schedule_arm.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_insights_structured_payload.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_legacy_encoding_recovery.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_login_token_stdin.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_machine_fingerprint.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_mcp_install.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_mcp_inventory.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_multipart_backoff.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_pii.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_presigned_skip_index.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_processing_checkpoint_api_client.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_release_directive.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_reset_command.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_review_redaction.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_rosetta_self_heal.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_router_commands.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_router_dead_proxy_guard.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_router_stats.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_scheduling_cron_env.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_schtasks_integration.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_secrets_redaction_boundary.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_security_commands.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_segment_chunking.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_segment_session_timeout.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_segmentation_window_scope.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_session_brief.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_session_inventory.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_sessions_status_chunking.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_sessions_status_safe_default.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_skills_command.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_sync_partial_schema.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_sync_runs_full_pipeline.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_update_command.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_upload_copilot.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_upload_cursor_store.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_upload_home_backfill.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_upload_kiro.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_upload_repo_filter.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_upload_repo_roots.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_windows_compat.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/tests/test_wrap_retry.py +0 -0
- {entelligence_cli-0.1.261 → entelligence_cli-0.1.263}/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.263
|
|
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
|
|
@@ -380,6 +380,28 @@ def _directive_entry_session_id(entry: object) -> str | None:
|
|
|
380
380
|
return None
|
|
381
381
|
|
|
382
382
|
|
|
383
|
+
# ENT-4419 (cli slice 6): the `mode: tail` entries of the pending id-mode
|
|
384
|
+
# directive, keyed by org then session id — recorded by
|
|
385
|
+
# `_resolve_high_water_mark`, popped by the metrics lane's build loop in the
|
|
386
|
+
# same run. Module state rather than a fifth return value so the resolver's
|
|
387
|
+
# tuple contract (and every caller and test of it) stays untouched.
|
|
388
|
+
_PENDING_TAIL_ENTRIES: dict[str, dict[str, dict]] = {}
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
def _tail_entries(raw_ids: object) -> dict[str, dict]:
|
|
392
|
+
"""The usable ``mode: tail`` object entries of a directive, by session id."""
|
|
393
|
+
out: dict[str, dict] = {}
|
|
394
|
+
if not isinstance(raw_ids, list):
|
|
395
|
+
return out
|
|
396
|
+
for entry in raw_ids:
|
|
397
|
+
if not isinstance(entry, dict) or entry.get("mode") != "tail":
|
|
398
|
+
continue
|
|
399
|
+
sid = _directive_entry_session_id(entry)
|
|
400
|
+
if sid and isinstance(entry.get("resume_from"), dict):
|
|
401
|
+
out[sid] = entry
|
|
402
|
+
return out
|
|
403
|
+
|
|
404
|
+
|
|
383
405
|
def _pending_client_window(
|
|
384
406
|
ckpt: dict, org_uuid: str, which: str
|
|
385
407
|
) -> tuple[datetime | None, datetime | None, int | None, str | None, set[str] | None]:
|
|
@@ -443,8 +465,15 @@ def _pending_client_window(
|
|
|
443
465
|
# meant; `tail` / `seg` and the anchor are consumed by the byte-resume
|
|
444
466
|
# slice. A dict must never be stringified into an id that matches
|
|
445
467
|
# nothing (KI-71).
|
|
446
|
-
|
|
447
|
-
|
|
468
|
+
usable = {sid for sid in (_directive_entry_session_id(e) for e in raw_ids) if sid}
|
|
469
|
+
# ENT-4419 (cli slice 6): a `mode: tail` entry is the METRICS lane's
|
|
470
|
+
# work (a facts resume, no LLM) — the seg lane must never carve it
|
|
471
|
+
# back into whole-session segmentation (the nightly sweep emits up to
|
|
472
|
+
# 500 per member). It is simply not this lane's target, so a directive
|
|
473
|
+
# made only of tails is an id-mode directive with no seg targets: an
|
|
474
|
+
# empty set, consumed harmlessly — never `None`.
|
|
475
|
+
cleaned = usable - set(_tail_entries(raw_ids)) if which == "seg_generation" else usable
|
|
476
|
+
if raw_ids and not usable:
|
|
448
477
|
# Review-caught: a non-empty list with no usable entry is still an
|
|
449
478
|
# id-mode directive — an EMPTY target set, consumed harmlessly —
|
|
450
479
|
# never `None`, which the seg lane would read as an open-ended
|
|
@@ -455,8 +484,10 @@ def _pending_client_window(
|
|
|
455
484
|
server_gen,
|
|
456
485
|
)
|
|
457
486
|
session_ids = set()
|
|
487
|
+
elif usable:
|
|
488
|
+
session_ids = cleaned
|
|
458
489
|
else:
|
|
459
|
-
session_ids =
|
|
490
|
+
session_ids = None
|
|
460
491
|
return (
|
|
461
492
|
_parse_iso(ckpt.get("client_resume_from")),
|
|
462
493
|
_parse_iso(ckpt.get("client_resume_to")),
|
|
@@ -661,6 +692,28 @@ def _resolve_high_water_mark(
|
|
|
661
692
|
client_from, _client_to, client_gen, client_user, client_session_ids = _pending_client_window(
|
|
662
693
|
ckpt, org_uuid, "metrics_generation"
|
|
663
694
|
)
|
|
695
|
+
_PENDING_TAIL_ENTRIES.pop(org_uuid, None)
|
|
696
|
+
_tails = (
|
|
697
|
+
_tail_entries(ckpt.get("client_resume_session_ids"))
|
|
698
|
+
if client_gen is not None and client_session_ids is not None
|
|
699
|
+
else {}
|
|
700
|
+
)
|
|
701
|
+
if _tails:
|
|
702
|
+
# ENT-4419 (cli slice 6): `mode: tail` entries ARE this lane's work —
|
|
703
|
+
# the build loop re-parses each target and pushes a v5 tail envelope
|
|
704
|
+
# — so the generation stays PENDING (the caller stamps it after the
|
|
705
|
+
# push succeeds, the rule every other pending directive follows) and
|
|
706
|
+
# the resume point stays the efficiency watermark: the targets are
|
|
707
|
+
# force-included by id, never by widening the window (which is what
|
|
708
|
+
# `client_from=None` would mean below).
|
|
709
|
+
_PENDING_TAIL_ENTRIES[org_uuid] = _tails
|
|
710
|
+
client_from = local_wm if local_wm is not None else _parse_iso(ckpt.get("last_session_at"))
|
|
711
|
+
client_session_ids = None
|
|
712
|
+
logger.info(
|
|
713
|
+
"[AgentInsights] per-client directive gen=%s carries %d tail target(s) for this lane",
|
|
714
|
+
client_gen,
|
|
715
|
+
len(_tails),
|
|
716
|
+
)
|
|
664
717
|
if client_gen is not None and client_session_ids is not None:
|
|
665
718
|
# Exact-id targeting (ENT-4197) is a segmentation-lane concern only —
|
|
666
719
|
# this lane has nothing to do for it. Stamp it obeyed right away (see
|
|
@@ -2673,6 +2726,15 @@ def _sync_cmd(
|
|
|
2673
2726
|
pending_client_generation,
|
|
2674
2727
|
pending_client_user,
|
|
2675
2728
|
) = _resolve_high_water_mark(api_client, org_uuid, user_uuid=user_uuid)
|
|
2729
|
+
# ENT-4419 (cli slice 6): the pending directive's tail targets, by session
|
|
2730
|
+
# id — force-included below regardless of the watermark and the look-back
|
|
2731
|
+
# (a truncated projection is exactly a session the watermark already
|
|
2732
|
+
# passed). Popped, so a later run in this process never inherits them.
|
|
2733
|
+
tail_targets: dict[str, dict] = {} if push_all else _PENDING_TAIL_ENTRIES.pop(org_uuid, {})
|
|
2734
|
+
if tail_targets:
|
|
2735
|
+
runlog.line(
|
|
2736
|
+
"discover", f"resume directive: {len(tail_targets)} tail target(s) force-included"
|
|
2737
|
+
)
|
|
2676
2738
|
|
|
2677
2739
|
# Honor the --hours look-back (default 30 days; Wrapped passes --days*24):
|
|
2678
2740
|
# drop sessions whose newest activity is older than the window. The
|
|
@@ -2695,7 +2757,11 @@ def _sync_cmd(
|
|
|
2695
2757
|
window_cutoff = cutoff
|
|
2696
2758
|
if cutoff is not None:
|
|
2697
2759
|
_n_before = len(discovered)
|
|
2698
|
-
discovered = [
|
|
2760
|
+
discovered = [
|
|
2761
|
+
d
|
|
2762
|
+
for d in discovered
|
|
2763
|
+
if (d.last_span_time and d.last_span_time >= cutoff) or d.session_id in tail_targets
|
|
2764
|
+
]
|
|
2699
2765
|
if len(discovered) < _n_before:
|
|
2700
2766
|
runlog.line(
|
|
2701
2767
|
"discover",
|
|
@@ -2796,6 +2862,7 @@ def _sync_cmd(
|
|
|
2796
2862
|
# exists for it — because nothing else would ever re-push them.
|
|
2797
2863
|
if (
|
|
2798
2864
|
not push_all
|
|
2865
|
+
and disc.session_id not in tail_targets
|
|
2799
2866
|
and hwm is not None
|
|
2800
2867
|
and (last is None or last <= hwm)
|
|
2801
2868
|
and not _cursor_usage_recapture_due(disc, last, cursor_billed_usage)
|
|
@@ -2948,6 +3015,28 @@ def _sync_cmd(
|
|
|
2948
3015
|
# schema that rejects anything it doesn't list.
|
|
2949
3016
|
session_facts=session,
|
|
2950
3017
|
)
|
|
3018
|
+
if envelope is not None and disc.session_id in tail_targets:
|
|
3019
|
+
# ENT-4419 (cli slice 6): a tail target ships only what grew
|
|
3020
|
+
# after the verified anchor (v5 `resumed_from`), or the whole
|
|
3021
|
+
# session again when the anchor cannot be trusted — the
|
|
3022
|
+
# diagnostic says which; its server mirror (backend#4913) is
|
|
3023
|
+
# how the byte-resume saving is measured.
|
|
3024
|
+
envelope, _seek = facts_envelope.tail_envelope(
|
|
3025
|
+
envelope, tail_targets[disc.session_id].get("resume_from")
|
|
3026
|
+
)
|
|
3027
|
+
_n_turns = len(envelope.get("turns") or [])
|
|
3028
|
+
emit_diagnostic_event(
|
|
3029
|
+
"resume_applied",
|
|
3030
|
+
org_uuid,
|
|
3031
|
+
outcome="success" if _seek == facts_envelope.RESUME_SEEKED else "skipped",
|
|
3032
|
+
reason=_seek,
|
|
3033
|
+
session_id=disc.session_id,
|
|
3034
|
+
count=_n_turns,
|
|
3035
|
+
)
|
|
3036
|
+
runlog.line(
|
|
3037
|
+
"build",
|
|
3038
|
+
f"tail directive session={disc.session_id}: {_seek} ({_n_turns} turn(s))",
|
|
3039
|
+
)
|
|
2951
3040
|
if envelope is not None:
|
|
2952
3041
|
envelopes.append(envelope)
|
|
2953
3042
|
shas = _session_commits_from_spans(spans)
|
|
@@ -5373,6 +5462,23 @@ def _is_confirmed_empty_segmentation(got_tasks: bool, degrade_reasons: list[str]
|
|
|
5373
5462
|
return not got_tasks and not degrade_reasons
|
|
5374
5463
|
|
|
5375
5464
|
|
|
5465
|
+
def _segments_are_authoritative(degrade_reasons: list[str]) -> bool:
|
|
5466
|
+
"""Whether this segmentation attempt's `tasks` may be trusted as the
|
|
5467
|
+
session's COMPLETE segmentation truth (ENT-4437 — envelope v6's
|
|
5468
|
+
`segments_authoritative`).
|
|
5469
|
+
|
|
5470
|
+
True for a full clean run (tasks or none — see
|
|
5471
|
+
`_is_confirmed_empty_segmentation`, which shares this same
|
|
5472
|
+
`degrade_reasons` input for the zero-task question). False whenever ANY
|
|
5473
|
+
window exhausted its recovery ladder: the resulting task list may be
|
|
5474
|
+
PARTIAL — real tasks from the windows that succeeded, silently missing
|
|
5475
|
+
whatever the degraded window would have found — and a partial list must
|
|
5476
|
+
never tell the store it has seen everything (it would sweep segments a
|
|
5477
|
+
prior, more complete run stored for turns this pass failed to re-cover).
|
|
5478
|
+
"""
|
|
5479
|
+
return not degrade_reasons
|
|
5480
|
+
|
|
5481
|
+
|
|
5376
5482
|
def _suspected_suspend(elapsed_mono: float, elapsed_wall: float) -> bool:
|
|
5377
5483
|
"""Best-effort signal that a run's wall-clock duration includes system sleep (ENT-4352).
|
|
5378
5484
|
|
|
@@ -6156,6 +6262,14 @@ def _run_memcore_analyze_and_push(api_client, org_uuid: str | None, *, force: bo
|
|
|
6156
6262
|
# `tasks_json = "[]"` rather than inferring it from the shape of
|
|
6157
6263
|
# an empty list alone (ENT-4309).
|
|
6158
6264
|
payload["segmentation_confirmed_empty"] = confirmed_empty
|
|
6265
|
+
# ENT-4437 (review-caught, CRITICAL): a degraded window can leave a
|
|
6266
|
+
# PARTIAL task list — real tasks from the windows that succeeded,
|
|
6267
|
+
# silently missing whatever the degraded window would have found.
|
|
6268
|
+
# That is not the session's complete segmentation truth, so the
|
|
6269
|
+
# v6 envelope must not claim authority over `segments` for it —
|
|
6270
|
+
# doing so would tell the store to sweep segments a prior, more
|
|
6271
|
+
# complete run stored for turns this degraded pass never re-covered.
|
|
6272
|
+
payload["segments_authoritative"] = _segments_are_authoritative(degrade_reasons)
|
|
6159
6273
|
payload["agent"] = (
|
|
6160
6274
|
disc.session_id.split(":")[1] if ":" in disc.session_id else "unknown"
|
|
6161
6275
|
)
|
|
@@ -6270,6 +6384,18 @@ def _run_memcore_analyze_and_push(api_client, org_uuid: str | None, *, force: bo
|
|
|
6270
6384
|
spans=_spans,
|
|
6271
6385
|
client_version=_client_version(),
|
|
6272
6386
|
tasks=_payload.get("tasks"),
|
|
6387
|
+
# v6 (ENT-4437, review-caught): NOT unconditionally True — a
|
|
6388
|
+
# degraded window's partial (or redrain-superseded) result is
|
|
6389
|
+
# this lane's own verdict only when nothing degraded.
|
|
6390
|
+
# `_segment_one` stamps this the same way it stamps
|
|
6391
|
+
# `segmentation_confirmed_empty`, and `_merge_redrained_results`
|
|
6392
|
+
# replaces the whole payload per session, so the redrain's own
|
|
6393
|
+
# (possibly still-degraded) verdict always wins over the
|
|
6394
|
+
# concurrent pass's — never a stale True from an earlier
|
|
6395
|
+
# attempt. Missing entirely would be a real bug elsewhere in
|
|
6396
|
+
# this loop, not a reason to assume authority, hence the
|
|
6397
|
+
# `False` default rather than `True`.
|
|
6398
|
+
segments_authoritative=_payload.get("segments_authoritative", False),
|
|
6273
6399
|
cursor_usage=cursor_billed_usage,
|
|
6274
6400
|
repo_remote=_remote,
|
|
6275
6401
|
# v4 (ENT-4417): _payload IS the structured-push session
|
|
@@ -79,6 +79,11 @@ _EVENTS = frozenset(
|
|
|
79
79
|
# ENT-4413 (WS4): the version floor. `_upgrade_now_best_effort` had five
|
|
80
80
|
# silent exits; `floor_check` names each one.
|
|
81
81
|
"floor_check",
|
|
82
|
+
# ENT-4419 (cli slice 6): a `mode: tail` directive target's fate —
|
|
83
|
+
# whether the client seeked to the verified anchor and pushed a v5
|
|
84
|
+
# tail, or fell back to the whole session. Mirrored in the backend's
|
|
85
|
+
# DIAGNOSTIC_EVENT_SCHEMA (backend#4913).
|
|
86
|
+
"resume_applied",
|
|
82
87
|
}
|
|
83
88
|
)
|
|
84
89
|
_OUTCOMES = frozenset({"success", "transient_error", "failed", "skipped"})
|
|
@@ -88,6 +93,7 @@ _OUTCOMES = frozenset({"success", "transient_error", "failed", "skipped"})
|
|
|
88
93
|
# directive_outcome: obeyed | zero_stored | aborted
|
|
89
94
|
# floor_check: not_required | throttled | index_unreachable | index_nothing_newer
|
|
90
95
|
# | index_below_floor | auto_update_disabled | install_failed | upgraded
|
|
96
|
+
# resume_applied: seeked | hash_mismatch_full | no_offset_full
|
|
91
97
|
_REASONS = frozenset(
|
|
92
98
|
{
|
|
93
99
|
"applied",
|
|
@@ -106,6 +112,10 @@ _REASONS = frozenset(
|
|
|
106
112
|
"auto_update_disabled",
|
|
107
113
|
"install_failed",
|
|
108
114
|
"upgraded",
|
|
115
|
+
# resume_applied (ENT-4419)
|
|
116
|
+
"seeked",
|
|
117
|
+
"hash_mismatch_full",
|
|
118
|
+
"no_offset_full",
|
|
109
119
|
}
|
|
110
120
|
)
|
|
111
121
|
_MODES = frozenset({"window", "ids", "none"})
|
|
@@ -64,7 +64,19 @@ logger = logging.getLogger(__name__)
|
|
|
64
64
|
# so a rebuild from the S3 archive needs no serving store), and
|
|
65
65
|
# `env_facts.mcp_inventory`. See `_derive_session_facts` and `_build_source`
|
|
66
66
|
# below.
|
|
67
|
-
ENVELOPE_SCHEMA_VERSION = "
|
|
67
|
+
ENVELOPE_SCHEMA_VERSION = "6"
|
|
68
|
+
# v6 (ENT-4437): `segments_authoritative` — every push before this stated no
|
|
69
|
+
# opinion on whether it had checked segmentation at all; the metrics-only
|
|
70
|
+
# lane (which never runs segmentation) and a genuine "found nothing" seg-lane
|
|
71
|
+
# push were wire-identical (`segments: []`), so the store's stale sweep
|
|
72
|
+
# treated a metrics-only sync's silence as "this session has zero segments"
|
|
73
|
+
# and deleted a real prior segmentation on the session's very next unrelated
|
|
74
|
+
# hourly resync.
|
|
75
|
+
# v5 (ENT-4419): `resumed_from` (a tail envelope's base content_hash + the
|
|
76
|
+
# verified anchor turn; null on a whole-session envelope) and
|
|
77
|
+
# `claimed_counts.skill_names`. The server accepts v5 from backend#4912 on; an
|
|
78
|
+
# older server treats an unknown version as a validation skip, so this
|
|
79
|
+
# version must never ship ahead of it.
|
|
68
80
|
|
|
69
81
|
# file_paths per tool call is capped to match the backend schema's maxItems —
|
|
70
82
|
# a single Bash call fanning out over a huge tree must not bloat the envelope.
|
|
@@ -547,6 +559,91 @@ def _derive_session_facts(session: dict[str, Any] | None) -> dict[str, Any] | No
|
|
|
547
559
|
return facts
|
|
548
560
|
|
|
549
561
|
|
|
562
|
+
# v5 (ENT-4419): why a tail directive did or did not seek — the closed
|
|
563
|
+
# `reason` vocabulary of the `resume_applied` diagnostic (mirrored in the
|
|
564
|
+
# backend's client_diagnostics schema). Only `seeked` yields a tail; the other
|
|
565
|
+
# two mean "pushed the whole-session envelope instead".
|
|
566
|
+
RESUME_SEEKED = "seeked"
|
|
567
|
+
RESUME_HASH_MISMATCH_FULL = "hash_mismatch_full"
|
|
568
|
+
RESUME_NO_OFFSET_FULL = "no_offset_full"
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
def _anchor_matches(source: dict[str, Any] | None, anchor: dict[str, Any]) -> bool:
|
|
572
|
+
"""Whether a turn's source block sits at the anchor's locator (offset or row_cursor)."""
|
|
573
|
+
if not source:
|
|
574
|
+
return False
|
|
575
|
+
if anchor.get("offset") is not None:
|
|
576
|
+
return source.get("offset") == anchor.get("offset")
|
|
577
|
+
if anchor.get("row_cursor") is not None:
|
|
578
|
+
return source.get("row_cursor") == anchor.get("row_cursor")
|
|
579
|
+
return False
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
def tail_envelope(
|
|
583
|
+
envelope: dict[str, Any], anchor: dict[str, Any] | None
|
|
584
|
+
) -> tuple[dict[str, Any], str]:
|
|
585
|
+
"""Cut a whole-session envelope down to the tail after ``anchor`` (ENT-4419).
|
|
586
|
+
|
|
587
|
+
``anchor`` is a directive entry's ``resume_from`` block — the last fully
|
|
588
|
+
projected turn's ``source`` (``kind``, ``hash``, ``offset`` | ``row_cursor``)
|
|
589
|
+
plus ``base_hash``, the archived base envelope's ``content_hash`` — echoed
|
|
590
|
+
verbatim by the server, never interpreted by it. Only the client can
|
|
591
|
+
verify it, and it does so over the PARSED turns (every parser reads the
|
|
592
|
+
whole transcript; there is no byte-seek, so the saving is on the wire and
|
|
593
|
+
in the server's projection, not in the parse): the turn whose source block
|
|
594
|
+
sits at the anchor's locator is the anchor, its content hash must equal
|
|
595
|
+
the anchor's, and everything after it is the tail.
|
|
596
|
+
|
|
597
|
+
Returns ``(envelope, reason)``. On ``seeked``, a NEW v5 envelope carrying
|
|
598
|
+
only the post-anchor turns, tool calls and segments (a segment is kept
|
|
599
|
+
when it ENDS after the anchor — the server upserts by task id, so the
|
|
600
|
+
tail's copy replaces a straddling one), with ``resumed_from`` set and a
|
|
601
|
+
fresh ``content_hash``. ``skills_used`` and ``claimed_counts`` stay
|
|
602
|
+
CUMULATIVE on purpose: the server upserts SKILL# items by name (a
|
|
603
|
+
tail-only count would shrink the base's) and diffs base+tail against the
|
|
604
|
+
claimed manifest. On ``hash_mismatch_full`` (the anchor turn is there but
|
|
605
|
+
its bytes changed — a rewritten store) or ``no_offset_full`` (no usable
|
|
606
|
+
locator or ``base_hash``, or no turn at that locator) the ORIGINAL
|
|
607
|
+
whole-session envelope comes back untouched, so the caller pushes what it
|
|
608
|
+
always has.
|
|
609
|
+
"""
|
|
610
|
+
if not isinstance(anchor, dict):
|
|
611
|
+
return envelope, RESUME_NO_OFFSET_FULL
|
|
612
|
+
base_hash = anchor.get("base_hash")
|
|
613
|
+
has_locator = anchor.get("offset") is not None or anchor.get("row_cursor") is not None
|
|
614
|
+
if not (isinstance(base_hash, str) and base_hash and has_locator):
|
|
615
|
+
return envelope, RESUME_NO_OFFSET_FULL
|
|
616
|
+
turns = envelope.get("turns") or []
|
|
617
|
+
idx = next((i for i, t in enumerate(turns) if _anchor_matches(t.get("source"), anchor)), None)
|
|
618
|
+
if idx is None:
|
|
619
|
+
return envelope, RESUME_NO_OFFSET_FULL
|
|
620
|
+
anchor_turn = turns[idx]
|
|
621
|
+
if (anchor_turn.get("source") or {}).get("hash") != anchor.get("hash"):
|
|
622
|
+
return envelope, RESUME_HASH_MISMATCH_FULL
|
|
623
|
+
kept_turns = turns[idx + 1 :]
|
|
624
|
+
kept_ids = {t.get("turn_id") for t in kept_turns}
|
|
625
|
+
tail = dict(envelope)
|
|
626
|
+
tail["turns"] = kept_turns
|
|
627
|
+
tail["tool_calls"] = [
|
|
628
|
+
c for c in envelope.get("tool_calls") or [] if c.get("turn_id") in kept_ids
|
|
629
|
+
]
|
|
630
|
+
tail["segments"] = [
|
|
631
|
+
s
|
|
632
|
+
for s in envelope.get("segments") or []
|
|
633
|
+
if (s.get("turn_range") or [None, None])[-1] in kept_ids
|
|
634
|
+
]
|
|
635
|
+
tail["resumed_from"] = {
|
|
636
|
+
"content_hash": base_hash,
|
|
637
|
+
# The server's own id for the anchor turn (it handed it to us); the
|
|
638
|
+
# locally parsed id is the same span, echoed only if the anchor
|
|
639
|
+
# somehow lacks one.
|
|
640
|
+
"turn_id": anchor.get("turn_id") or anchor_turn.get("turn_id"),
|
|
641
|
+
}
|
|
642
|
+
tail["generated_at"] = datetime.now(UTC).isoformat()
|
|
643
|
+
tail["content_hash"] = compute_content_hash(tail)
|
|
644
|
+
return tail, RESUME_SEEKED
|
|
645
|
+
|
|
646
|
+
|
|
550
647
|
def build_envelope(
|
|
551
648
|
*,
|
|
552
649
|
session_id: str,
|
|
@@ -555,6 +652,7 @@ def build_envelope(
|
|
|
555
652
|
spans: list[SpanData],
|
|
556
653
|
client_version: str | None,
|
|
557
654
|
tasks: list[dict[str, Any]] | None = None,
|
|
655
|
+
segments_authoritative: bool = False,
|
|
558
656
|
cursor_usage: dict[str, dict] | None = None,
|
|
559
657
|
repo_remote: str | None = None,
|
|
560
658
|
cwd_repos: dict[str, str] | None = None,
|
|
@@ -576,6 +674,15 @@ def build_envelope(
|
|
|
576
674
|
payload (pre-``tasks``) — run through `_derive_session_facts` here, not
|
|
577
675
|
by the caller, so every caller shares the one allowlist instead of each
|
|
578
676
|
reimplementing the filter.
|
|
677
|
+
`segments_authoritative` (v6, ENT-4437) MUST be set explicitly by the
|
|
678
|
+
caller, never inferred from `tasks` alone — the seg lane passes `True`
|
|
679
|
+
only when NO window degraded (a full clean run, tasks or none — see
|
|
680
|
+
`_is_confirmed_empty_segmentation`), `False` when any window exhausted
|
|
681
|
+
its recovery ladder, since a resulting task list could then be partial
|
|
682
|
+
and must not tell the store to sweep segments a degraded pass failed to
|
|
683
|
+
re-cover; every other caller (the metrics lane) leaves the default
|
|
684
|
+
`False`, since it never runs segmentation and has no basis to claim
|
|
685
|
+
otherwise.
|
|
579
686
|
"""
|
|
580
687
|
if agent not in _REACHABLE_AGENTS:
|
|
581
688
|
return None
|
|
@@ -640,7 +747,14 @@ def build_envelope(
|
|
|
640
747
|
"skill_invocations": sum(int(s.get("count") or 0) for s in skills_used),
|
|
641
748
|
"segments": len(segments),
|
|
642
749
|
"transcript_bytes": int(transcript_bytes) if transcript_bytes is not None else None,
|
|
750
|
+
# v5 (ENT-4419): the distinct-skill claim, so the server's `skills`
|
|
751
|
+
# completeness family has a claimed side — a tail's projected
|
|
752
|
+
# skill_count would otherwise read partial forever.
|
|
753
|
+
"skill_names": len(skills_used),
|
|
643
754
|
}
|
|
755
|
+
# v6 (ENT-4437): required explicitly, not derived from `bool(segments)` —
|
|
756
|
+
# a legitimately empty seg-lane result (`segments_authoritative=True`,
|
|
757
|
+
# `segments=[]`) must read differently from a lane that never checked.
|
|
644
758
|
|
|
645
759
|
envelope: dict[str, Any] = {
|
|
646
760
|
"envelope_version": ENVELOPE_SCHEMA_VERSION,
|
|
@@ -654,6 +768,11 @@ def build_envelope(
|
|
|
654
768
|
"segments": segments,
|
|
655
769
|
"skills_used": skills_used,
|
|
656
770
|
"claimed_counts": claimed_counts,
|
|
771
|
+
# v5 (ENT-4419): null on a whole-session envelope; `tail_envelope`
|
|
772
|
+
# sets it on a tail.
|
|
773
|
+
"resumed_from": None,
|
|
774
|
+
# v6 (ENT-4437): see the docstring — the seg lane's own explicit claim.
|
|
775
|
+
"segments_authoritative": segments_authoritative,
|
|
657
776
|
# v4 (ENT-4417): the non-task half of the structured push, so a
|
|
658
777
|
# rebuild from the S3 archive can reproduce the session node and
|
|
659
778
|
# sidecar with no serving store in the loop. Null when the caller
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: entelligence-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.263
|
|
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
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "entelligence-cli"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.263"
|
|
8
8
|
description = "AI-powered code review assistant for your terminal - Get instant, intelligent feedback on your code changes"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [
|
|
@@ -562,3 +562,24 @@ class TestDirectiveAndFloorVocabulary:
|
|
|
562
562
|
)
|
|
563
563
|
(e,) = diag.drain_events(_ORG)
|
|
564
564
|
assert len(e["required_version"]) == 32 and len(e["latest_seen"]) == 32
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
class TestResumeAppliedVocabulary:
|
|
568
|
+
"""ENT-4419 (cli slice 6): the tail directive's fate event and its closed reasons."""
|
|
569
|
+
|
|
570
|
+
@pytest.mark.parametrize("reason", ["seeked", "hash_mismatch_full", "no_offset_full"])
|
|
571
|
+
def test_resume_applied_reasons_are_queued_not_dropped(self, fake_home, reason):
|
|
572
|
+
diag.emit_diagnostic_event(
|
|
573
|
+
"resume_applied",
|
|
574
|
+
_ORG,
|
|
575
|
+
outcome="success" if reason == "seeked" else "skipped",
|
|
576
|
+
reason=reason,
|
|
577
|
+
session_id="local:claude-code:s1",
|
|
578
|
+
count=4,
|
|
579
|
+
)
|
|
580
|
+
queued = diag._read_queue(_ORG)
|
|
581
|
+
assert len(queued) == 1
|
|
582
|
+
assert queued[0]["event"] == "resume_applied"
|
|
583
|
+
assert queued[0]["reason"] == reason
|
|
584
|
+
assert queued[0]["count"] == 4
|
|
585
|
+
assert queued[0]["session_id"] == "local:claude-code:s1"
|