entelligence-cli 0.1.239__tar.gz → 0.1.241__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.
Files changed (199) hide show
  1. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/PKG-INFO +1 -1
  2. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/commands/insights.py +284 -56
  3. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli.egg-info/PKG-INFO +1 -1
  4. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/pyproject.toml +1 -1
  5. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_insights_cadence_heartbeat.py +50 -0
  6. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_insights_checkpoint_resume.py +110 -1
  7. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_sync_pushes_built_sessions.py +36 -0
  8. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/README.md +0 -0
  9. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/__init__.py +0 -0
  10. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/__init__.py +0 -0
  11. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/__init__.py +0 -0
  12. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/__init__.py +0 -0
  13. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/__init__.py +0 -0
  14. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_paths.py +0 -0
  15. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_segmentation_prompts/system.j2 +0 -0
  16. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_segmentation_prompts/user.j2 +0 -0
  17. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/__init__.py +0 -0
  18. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/_base.py +0 -0
  19. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/_jsonl_utils.py +0 -0
  20. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/__init__.py +0 -0
  21. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/git_reader.py +0 -0
  22. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/models.py +0 -0
  23. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/parser.py +0 -0
  24. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/source.py +0 -0
  25. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/factory.py +0 -0
  26. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/__init__.py +0 -0
  27. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/__init__.py +0 -0
  28. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/base.py +0 -0
  29. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/claude_code.py +0 -0
  30. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/codex.py +0 -0
  31. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/copilot.py +0 -0
  32. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/cursor_agent_transcript.py +0 -0
  33. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/cursor_store.py +0 -0
  34. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/kiro.py +0 -0
  35. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/opencode.py +0 -0
  36. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/source.py +0 -0
  37. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/behavior_signals.py +0 -0
  38. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/file_paths.py +0 -0
  39. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/metrics.py +0 -0
  40. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/segment_orchestrator.py +0 -0
  41. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/segment_pure.py +0 -0
  42. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/session_pure.py +0 -0
  43. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/skill_names.py +0 -0
  44. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/spans.py +0 -0
  45. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/pricing.py +0 -0
  46. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/vocabulary/__init__.py +0 -0
  47. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/vocabulary/categories.py +0 -0
  48. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/vocabulary/edges.py +0 -0
  49. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/_vendor/memory_core/vocabulary/nodes.py +0 -0
  50. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/agent_insights_proxy.py +0 -0
  51. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/agent_insights_segment.py +0 -0
  52. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/api_client.py +0 -0
  53. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/ascii-art.txt +0 -0
  54. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/browser_login.py +0 -0
  55. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/cli.py +0 -0
  56. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/commands/__init__.py +0 -0
  57. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/commands/auth.py +0 -0
  58. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/commands/budget.py +0 -0
  59. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/commands/config.py +0 -0
  60. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/commands/cursor_doctor.py +0 -0
  61. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/commands/incident.py +0 -0
  62. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/commands/mcp.py +0 -0
  63. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/commands/reset.py +0 -0
  64. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/commands/review.py +0 -0
  65. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/commands/router.py +0 -0
  66. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/commands/security.py +0 -0
  67. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/commands/skills.py +0 -0
  68. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/commands/update.py +0 -0
  69. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/config.py +0 -0
  70. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/cursor_path_a_usage.py +0 -0
  71. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/diagnostics.py +0 -0
  72. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/exceptions.py +0 -0
  73. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/facts_envelope.py +0 -0
  74. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/git_operations.py +0 -0
  75. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/hooks/__init__.py +0 -0
  76. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/hooks/capacity_emit.py +0 -0
  77. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/hooks/session_brief.py +0 -0
  78. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/hooks/standup_emit.py +0 -0
  79. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/insights_log.py +0 -0
  80. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/mcp_inventory.py +0 -0
  81. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/platform_env.py +0 -0
  82. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/router/__init__.py +0 -0
  83. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/router/bedrock.py +0 -0
  84. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/router/catalog.py +0 -0
  85. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/router/claude_settings.py +0 -0
  86. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/router/codex_auth.py +0 -0
  87. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/router/codex_settings.py +0 -0
  88. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/router/compress.py +0 -0
  89. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/router/daemon.py +0 -0
  90. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/router/engine.py +0 -0
  91. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/router/gateway.py +0 -0
  92. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/router/gemini_translate.py +0 -0
  93. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/router/openai_translate.py +0 -0
  94. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/router/proxy.py +0 -0
  95. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/router/state.py +0 -0
  96. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/scheduling.py +0 -0
  97. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/session_inventory.py +0 -0
  98. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/textual_ui.py +0 -0
  99. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/ui/__init__.py +0 -0
  100. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/ui/interactive.py +0 -0
  101. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/ui/keys.py +0 -0
  102. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/ui/loaders.py +0 -0
  103. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/ui/output.py +0 -0
  104. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/ui/styles.py +0 -0
  105. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/update_checker.py +0 -0
  106. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/upload/__init__.py +0 -0
  107. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/upload/conductor.py +0 -0
  108. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/upload/config.py +0 -0
  109. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/upload/cursor_usage.py +0 -0
  110. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/upload/discovery.py +0 -0
  111. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/upload/manifest.py +0 -0
  112. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/upload/models.py +0 -0
  113. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/upload/pii.py +0 -0
  114. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/upload/runner.py +0 -0
  115. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/upload/secrets.py +0 -0
  116. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/upload/stores.py +0 -0
  117. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli/wrapped_game.py +0 -0
  118. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli.egg-info/SOURCES.txt +0 -0
  119. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli.egg-info/dependency_links.txt +0 -0
  120. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli.egg-info/entry_points.txt +0 -0
  121. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli.egg-info/requires.txt +0 -0
  122. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/entelligence_cli.egg-info/top_level.txt +0 -0
  123. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/setup.cfg +0 -0
  124. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_agent_insights_proxy.py +0 -0
  125. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_agent_insights_proxy_api_client.py +0 -0
  126. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_agent_insights_segment.py +0 -0
  127. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_attach_fix_smoke.py +0 -0
  128. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_attach_ticket_smoke.py +0 -0
  129. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_budget_smoke.py +0 -0
  130. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_capacity_emit.py +0 -0
  131. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_codex_auth.py +0 -0
  132. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_codex_settings.py +0 -0
  133. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_conductor.py +0 -0
  134. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_cursor_composer_mtime_stamp.py +0 -0
  135. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_cursor_doctor.py +0 -0
  136. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_cursor_path_a_usage.py +0 -0
  137. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_cursor_path_regex_and_heartbeat.py +0 -0
  138. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_cursor_self_heal_loop.py +0 -0
  139. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_cursor_usage.py +0 -0
  140. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_cursor_usage_archive.py +0 -0
  141. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_cursor_usage_heal.py +0 -0
  142. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_cursor_usage_recapture.py +0 -0
  143. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_cursor_usage_state.py +0 -0
  144. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_detached_background_work.py +0 -0
  145. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_diagnostics.py +0 -0
  146. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_discovery_head_unicode.py +0 -0
  147. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_discovery_opencode.py +0 -0
  148. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_error_body_decode.py +0 -0
  149. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_facts_envelope.py +0 -0
  150. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_heartbeat_api_client.py +0 -0
  151. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_identity_cache_refresh.py +0 -0
  152. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_incident_refs.py +0 -0
  153. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_incident_smoke.py +0 -0
  154. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_insights_cursor_composer_home.py +0 -0
  155. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_insights_index_failure.py +0 -0
  156. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_insights_kiro_prompts.py +0 -0
  157. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_insights_log.py +0 -0
  158. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_insights_me_smoke.py +0 -0
  159. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_insights_path_a_default.py +0 -0
  160. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_insights_produced_prs.py +0 -0
  161. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_insights_redrain.py +0 -0
  162. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_insights_repo_attribution.py +0 -0
  163. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_insights_schedule.py +0 -0
  164. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_insights_schedule_arm.py +0 -0
  165. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_insights_structured_payload.py +0 -0
  166. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_legacy_encoding_recovery.py +0 -0
  167. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_mcp_install.py +0 -0
  168. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_mcp_inventory.py +0 -0
  169. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_multipart_backoff.py +0 -0
  170. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_pii.py +0 -0
  171. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_presigned_skip_index.py +0 -0
  172. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_processing_checkpoint_api_client.py +0 -0
  173. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_reset_command.py +0 -0
  174. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_rosetta_self_heal.py +0 -0
  175. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_router_commands.py +0 -0
  176. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_router_stats.py +0 -0
  177. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_scheduling_cron_env.py +0 -0
  178. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_schtasks_integration.py +0 -0
  179. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_secrets_redaction_boundary.py +0 -0
  180. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_security_commands.py +0 -0
  181. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_segment_chunking.py +0 -0
  182. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_segment_session_timeout.py +0 -0
  183. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_segmentation_window_scope.py +0 -0
  184. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_session_brief.py +0 -0
  185. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_session_inventory.py +0 -0
  186. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_sessions_status_chunking.py +0 -0
  187. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_sessions_status_safe_default.py +0 -0
  188. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_skills_command.py +0 -0
  189. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_sync_partial_schema.py +0 -0
  190. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_sync_runs_full_pipeline.py +0 -0
  191. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_update_command.py +0 -0
  192. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_upload_cursor_store.py +0 -0
  193. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_upload_home_backfill.py +0 -0
  194. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_upload_kiro.py +0 -0
  195. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_upload_repo_filter.py +0 -0
  196. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_upload_repo_roots.py +0 -0
  197. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_windows_compat.py +0 -0
  198. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/tests/test_wrap_retry.py +0 -0
  199. {entelligence_cli-0.1.239 → entelligence_cli-0.1.241}/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.239
3
+ Version: 0.1.241
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
@@ -294,8 +294,8 @@ def _segmentation_window_cutoff(
294
294
 
295
295
  def _pending_client_window(
296
296
  ckpt: dict, org_uuid: str, which: str
297
- ) -> tuple[datetime | None, datetime | None, int | None, str | None]:
298
- """The client directive's window, iff its generation is newer for this lane.
297
+ ) -> tuple[datetime | None, datetime | None, int | None, str | None, set[str] | None]:
298
+ """The client directive's window or id list, iff its generation is newer for this lane.
299
299
 
300
300
  Args:
301
301
  ckpt: A processing-checkpoint response dict (already error-checked).
@@ -304,11 +304,15 @@ def _pending_client_window(
304
304
  ``"seg_generation"``.
305
305
 
306
306
  Returns:
307
- ``(resume_from, resume_to, pending_generation, user_uuid)`` when a
308
- newer client directive is pending (either bound may be ``None`` ⇒
309
- unbounded on that side), else ``(None, None, None, None)``.
310
- ``user_uuid`` is the checkpoint's authenticated user — callers must
311
- pass it straight through to the matching
307
+ ``(resume_from, resume_to, pending_generation, user_uuid, session_ids)``
308
+ when a newer client directive is pending, else
309
+ ``(None, None, None, None, None)``. The backend's two targeting modes
310
+ (ENT-4197) are mutually exclusive by construction: either ``session_ids``
311
+ is a non-empty set and ``resume_from``/``resume_to`` are both ``None``
312
+ (exact-id targeting), or ``session_ids`` is ``None`` and the window
313
+ bounds carry the (possibly one-sided-unbounded) date range — never a mix
314
+ of both. ``user_uuid`` is the checkpoint's authenticated user — callers
315
+ must pass it straight through to the matching
312
316
  :func:`_stamp_client_directive_generation` call, so the obeyed-
313
317
  generation write lands in the SAME (org, user)-scoped file this read
314
318
  checked.
@@ -318,16 +322,22 @@ def _pending_client_window(
318
322
  raw = ckpt.get("client_resume_generation")
319
323
  server_gen = int(raw) if raw is not None else 0
320
324
  if server_gen <= 0:
321
- return None, None, None, None
325
+ return None, None, None, None, None
322
326
  user_uuid = ckpt.get("user_uuid")
323
327
  local_gen = _read_client_directive_generation(which, org_uuid, user_uuid)
324
328
  if server_gen <= local_gen:
325
- return None, None, None, None
329
+ return None, None, None, None, None
330
+ session_ids: set[str] | None = None
331
+ raw_ids = ckpt.get("client_resume_session_ids")
332
+ if isinstance(raw_ids, list):
333
+ cleaned = {str(s) for s in raw_ids if s}
334
+ session_ids = cleaned or None
326
335
  return (
327
336
  _parse_iso(ckpt.get("client_resume_from")),
328
337
  _parse_iso(ckpt.get("client_resume_to")),
329
338
  server_gen,
330
339
  user_uuid,
340
+ session_ids,
331
341
  )
332
342
 
333
343
 
@@ -360,6 +370,22 @@ def _resolve_high_water_mark(
360
370
  (org, user)-scoped state file this resolution read from; ``None``
361
371
  whenever ``pending_client_generation`` is.
362
372
 
373
+ An id-targeted per-client directive (ENT-4197's ``session_ids`` mode) is a
374
+ segmentation-lane concern only — see :func:`_pending_client_window`'s
375
+ docstring. This resolver recognizes that mode and stamps the metrics
376
+ lane's own obeyed-generation file for it IMMEDIATELY, breaking this
377
+ function's own "never stamps, only the caller does after a successful
378
+ push" rule as a deliberate, narrow exception: the metrics lane has no
379
+ action at all tied to that generation, so there is no push outcome to
380
+ gate on and nothing to lose by stamping eagerly. Skipping this would be a
381
+ real bug, not just an inefficiency — id-mode always reports
382
+ ``client_resume_from=None`` (the two targeting modes are mutually
383
+ exclusive), and this resolver's own convention reads ``client_from=None``
384
+ as "resume from the very beginning." Left unstamped, an id-targeted
385
+ directive meant only to force one specific session's re-segmentation
386
+ would ALSO make every subsequent metrics sync re-push this machine's
387
+ entire history, forever, until the directive's generation is superseded.
388
+
363
389
  Two concerns, kept separate:
364
390
 
365
391
  - **Resume authority** — the backend's ``resume_generation`` / ``resume_from``.
@@ -391,9 +417,28 @@ def _resolve_high_water_mark(
391
417
  # LLM calls). Newer client and org directives can both be pending — the
392
418
  # earlier resume point covers both, and each generation is stamped
393
419
  # independently after the push succeeds.
394
- client_from, _client_to, client_gen, client_user = _pending_client_window(
420
+ client_from, _client_to, client_gen, client_user, client_session_ids = _pending_client_window(
395
421
  ckpt, org_uuid, "metrics_generation"
396
422
  )
423
+ if client_gen is not None and client_session_ids is not None:
424
+ # Exact-id targeting (ENT-4197) is a segmentation-lane concern only —
425
+ # this lane has nothing to do for it. Stamp it obeyed right away (see
426
+ # this function's own docstring for why an immediate stamp is safe
427
+ # here) and fall through as if no client directive were pending, so
428
+ # `client_from`'s None doesn't get misread below as "resume from the
429
+ # beginning."
430
+ _stamp_client_directive_generation("metrics_generation", org_uuid, client_user, client_gen)
431
+ # Review-caught (ENT-4197): this consumption happens ENTIRELY inside
432
+ # this resolver call, before the caller's own return value even
433
+ # exists — a caller-side "did anything get stamped" check (like
434
+ # _sync_cmd's own follow-up-heartbeat gate) can never see it, because
435
+ # by the time that check runs, client_gen has already been reset to
436
+ # None below (matching "no client directive pending" on purpose).
437
+ # Send the follow-up heartbeat right here instead, at the one place
438
+ # that actually knows this generation was just obeyed.
439
+ _send_heartbeat_best_effort(api_client, org_uuid, client_user)
440
+ client_gen = None
441
+ client_from = None
397
442
  if client_gen is not None:
398
443
  emit_diagnostic_event("resume_directive_applied", org_uuid, outcome="success")
399
444
  logger.info(
@@ -666,8 +711,19 @@ def _version_is_newer(latest: str | None, current: str | None) -> bool:
666
711
  return False
667
712
 
668
713
 
669
- def _heartbeat_payload(org_uuid: str) -> dict:
670
- """Build the hourly heartbeat telemetry — structured fields only, no content."""
714
+ def _heartbeat_payload(org_uuid: str, user_uuid: str | None = None) -> dict:
715
+ """Build the hourly heartbeat telemetry — structured fields only, no content.
716
+
717
+ Args:
718
+ org_uuid: Tenant scope.
719
+ user_uuid: The authenticated developer, if known at the call site
720
+ (``ctx.obj["user_info"]["UserUUID"]``, already cached at CLI
721
+ bootstrap — no extra network call). ``None`` degrades gracefully:
722
+ the per-client obeyed-generation fields below read their local
723
+ state file keyed by ``user_uuid or "unknown"`` (same fallback
724
+ :func:`_client_directive_state_path` already uses), which simply
725
+ defaults to 0 rather than raising.
726
+ """
671
727
  import platform as _platform
672
728
 
673
729
  stats = _read_last_run_stats(org_uuid)
@@ -693,10 +749,30 @@ def _heartbeat_payload(org_uuid: str) -> dict:
693
749
  # to CloudWatch). Fire-and-forget: drained now, lost if this heartbeat
694
750
  # fails, same best-effort semantics as the heartbeat itself.
695
751
  "diagnosticEvents": drain_events(org_uuid),
752
+ # ENT-4197 design invariant — "close the one existing gap": the record
753
+ # of "directive generation N was obeyed" today lives ONLY in these
754
+ # local files; the service has never been told directly, only able to
755
+ # infer it from re-pushes. Reporting the generation each lane has
756
+ # actually obeyed (0 = never obeyed anything for that lane, same
757
+ # meaning as the server's own default) lets the service mark a
758
+ # directive consumed, and a future Data Health card show "picked up
759
+ # at 14:02", without inference. Three independent trackers, since the
760
+ # org-wide directive and the per-client directive's two lanes each
761
+ # consume on their own schedule (see _read_sync_state /
762
+ # _read_client_directive_generation's own docstrings for why).
763
+ "obeyedResumeGeneration": _read_sync_state(org_uuid)[1],
764
+ "obeyedClientMetricsGeneration": _read_client_directive_generation(
765
+ "metrics_generation", org_uuid, user_uuid
766
+ ),
767
+ "obeyedClientSegGeneration": _read_client_directive_generation(
768
+ "seg_generation", org_uuid, user_uuid
769
+ ),
696
770
  }
697
771
 
698
772
 
699
- def _send_heartbeat_best_effort(api_client, org_uuid: str | None) -> None:
773
+ def _send_heartbeat_best_effort(
774
+ api_client, org_uuid: str | None, user_uuid: str | None = None
775
+ ) -> None:
700
776
  """POST the hourly heartbeat; notify about a new CLI, or upgrade now if required.
701
777
 
702
778
  Fire-and-forget: any failure (offline, unauthenticated, no org) is swallowed
@@ -719,12 +795,19 @@ def _send_heartbeat_best_effort(api_client, org_uuid: str | None) -> None:
719
795
  editable installs). The server therefore never names a version, a source, or
720
796
  an artifact — it cannot make this machine execute anything it would not have
721
797
  installed on its own schedule.
798
+
799
+ Args:
800
+ api_client: Authenticated API client, or ``None`` to no-op.
801
+ org_uuid: Tenant scope, or ``None`` to no-op.
802
+ user_uuid: The authenticated developer, if known at the call site —
803
+ threaded straight through to :func:`_heartbeat_payload`, whose own
804
+ docstring covers the ``None`` fallback.
722
805
  """
723
806
  if not api_client or not org_uuid:
724
807
  return
725
808
  with suppress(Exception):
726
809
  try:
727
- resp = api_client.send_heartbeat(org_uuid, _heartbeat_payload(org_uuid))
810
+ resp = api_client.send_heartbeat(org_uuid, _heartbeat_payload(org_uuid, user_uuid))
728
811
  except Exception as exc:
729
812
  # Queued for the NEXT heartbeat (this one plainly can't carry it):
730
813
  # a machine whose beats keep failing shows up in CloudWatch as a
@@ -1907,6 +1990,11 @@ def _sync_cmd(
1907
1990
  org_uuid = user_info.get("OrgUUID") or user_info.get("orgUUID")
1908
1991
  if not org_uuid:
1909
1992
  raise click.ClickException("Could not determine your org. Run: entelligence auth login")
1993
+ # Already fetched at CLI bootstrap (entelligence_cli/cli.py) — no extra
1994
+ # network call. Threaded into every heartbeat this command sends so the
1995
+ # per-client obeyed-generation fields (ENT-4197) read the right (org, user)
1996
+ # state files; see _heartbeat_payload's own docstring for the None fallback.
1997
+ user_uuid = user_info.get("UserUUID")
1910
1998
 
1911
1999
  # Parse the fixed-time escape hatch up front so a bad value fails before any work.
1912
2000
  sched_hour: int | None = None
@@ -1951,7 +2039,7 @@ def _sync_cmd(
1951
2039
  # on the next heartbeat, wrongly armed is a privacy incident. Arming is
1952
2040
  # idempotent and best-effort; it never fails the sync that just succeeded.
1953
2041
  if not do_transcripts and not no_schedule:
1954
- _apply_transcript_posture_gate(api_client, org_uuid)
2042
+ _apply_transcript_posture_gate(api_client, org_uuid, user_uuid)
1955
2043
 
1956
2044
  if do_transcripts:
1957
2045
  from ..upload.runner import run_transcript_upload
@@ -2000,7 +2088,7 @@ def _sync_cmd(
2000
2088
  # sync`) — otherwise `--agent` would double-heartbeat. Fired here, before
2001
2089
  # discovery, so a no-op sync still registers liveness. Best-effort.
2002
2090
  if owns_runlog:
2003
- _send_heartbeat_best_effort(api_client, org_uuid)
2091
+ _send_heartbeat_best_effort(api_client, org_uuid, user_uuid)
2004
2092
 
2005
2093
  # There is no separate cinsights "index" step or local database any more:
2006
2094
  # memory_core parses each transcript in-process below (§2.6). `--no-index` /
@@ -2424,16 +2512,26 @@ def _sync_cmd(
2424
2512
  # merely clipped by --hours). Guarded on `pending_generation`, so an
2425
2513
  # ordinary "already up to date" sync writes no state, and `earliest_failed`
2426
2514
  # leaves the directive pending when a parse failure is still retryable.
2515
+ directive_generation_updated = False
2427
2516
  if pending_generation is not None and earliest_failed is None:
2428
2517
  _write_sync_state(
2429
2518
  org_uuid,
2430
2519
  watermark=_read_sync_state(org_uuid)[0],
2431
2520
  directive_generation=pending_generation,
2432
2521
  )
2522
+ directive_generation_updated = True
2433
2523
  if pending_client_generation is not None and earliest_failed is None:
2434
2524
  _stamp_client_directive_generation(
2435
2525
  "metrics_generation", org_uuid, pending_client_user, pending_client_generation
2436
2526
  )
2527
+ directive_generation_updated = True
2528
+ if directive_generation_updated:
2529
+ # Review-caught: this run's heartbeat already fired at the top of
2530
+ # _sync_cmd, reporting whatever generation was obeyed BEFORE this
2531
+ # run — without a follow-up, a directive this run just consumed
2532
+ # would wait a full heartbeat cycle (up to an hour) before the
2533
+ # service could see it. Best-effort, same as every heartbeat.
2534
+ _send_heartbeat_best_effort(api_client, org_uuid, user_uuid)
2437
2535
  _mark_sync_run(transcripts=False) # a metrics sync ran today (confirmed up to date)
2438
2536
  if not no_schedule:
2439
2537
  _arm_sync_schedule_best_effort(transcripts=False, hour=sched_hour, minute=sched_minute)
@@ -2555,6 +2653,13 @@ def _sync_cmd(
2555
2653
  "sessions — leaving it pending so the next run re-obeys it",
2556
2654
  pending_client_generation,
2557
2655
  )
2656
+ if directive_took_effect and (
2657
+ pending_generation is not None or pending_client_generation is not None
2658
+ ):
2659
+ # Same follow-up as the empty-backlog branch above: this run's
2660
+ # opening heartbeat reported the PRE-run generation, so send a
2661
+ # fresh one now that a directive was actually just consumed.
2662
+ _send_heartbeat_best_effort(api_client, org_uuid, user_uuid)
2558
2663
  _mark_sync_run(transcripts=False) # a metrics sync ran today
2559
2664
  if not no_schedule:
2560
2665
  _arm_sync_schedule_best_effort(transcripts=False, hour=sched_hour, minute=sched_minute)
@@ -2890,7 +2995,9 @@ def _arm_sync_schedule_best_effort(
2890
2995
  console.print(f"[green]✓[/green] Background sync armed [dim]· {when}[/dim]")
2891
2996
 
2892
2997
 
2893
- def _apply_transcript_posture_gate(api_client, org_uuid: str | None) -> None:
2998
+ def _apply_transcript_posture_gate(
2999
+ api_client, org_uuid: str | None, user_uuid: str | None = None
3000
+ ) -> None:
2894
3001
  """Arm or remove the background transcript-upload job per the org posture.
2895
3002
 
2896
3003
  EXPERIMENTAL, SLATED FOR DEPRECATION — this whole raw-transcript-upload
@@ -2919,7 +3026,7 @@ def _apply_transcript_posture_gate(api_client, org_uuid: str | None) -> None:
2919
3026
  """
2920
3027
  posture = _read_transcript_posture(org_uuid)
2921
3028
  if posture is None:
2922
- _send_heartbeat_best_effort(api_client, org_uuid)
3029
+ _send_heartbeat_best_effort(api_client, org_uuid, user_uuid)
2923
3030
  posture = _read_transcript_posture(org_uuid)
2924
3031
  if posture:
2925
3032
  from ..scheduling import describe_schedule
@@ -4252,17 +4359,18 @@ def _run_full_pipeline(
4252
4359
  api_client = obj.get("api_client")
4253
4360
  user_info = obj.get("user_info") or {}
4254
4361
  org_uuid = user_info.get("OrgUUID") or user_info.get("orgUUID")
4362
+ user_uuid = user_info.get("UserUUID")
4255
4363
 
4256
4364
  # ENT-3933: hourly heartbeat every fire — BEFORE the processing gate — so
4257
4365
  # liveness + telemetry register even when this fire does no processing.
4258
- _send_heartbeat_best_effort(api_client, org_uuid)
4366
+ _send_heartbeat_best_effort(api_client, org_uuid, user_uuid)
4259
4367
  # Transcript posture enforcement rides EVERY fire, right after the
4260
4368
  # heartbeat that refreshes it — cadence no-ops, discovery failures, and
4261
4369
  # arm_schedule=False catch-ups included. The nested sync below runs with
4262
4370
  # --no-schedule, and `arm_schedule` scopes only the METRICS schedule:
4263
4371
  # posture repair (and the privacy-critical removal half) must never wait
4264
4372
  # on either (cli #228 gate).
4265
- _apply_transcript_posture_gate(api_client, org_uuid)
4373
+ _apply_transcript_posture_gate(api_client, org_uuid, user_uuid)
4266
4374
 
4267
4375
  # ENT-3933: process at least ~twice/day (12h floor) and opportunistically
4268
4376
  # within ~1h when new local transcripts appear, replacing the old
@@ -4727,6 +4835,7 @@ def _run_memcore_analyze_and_push(api_client, org_uuid: str | None, *, force: bo
4727
4835
  reprocess_to: datetime | None = None
4728
4836
  pending_seg_generation: int | None = None
4729
4837
  pending_seg_user: str | None = None
4838
+ pending_seg_session_ids: set[str] | None = None
4730
4839
  ckpt: dict | None = None
4731
4840
  if not force:
4732
4841
  with suppress(Exception):
@@ -4738,22 +4847,35 @@ def _run_memcore_analyze_and_push(api_client, org_uuid: str | None, *, force: bo
4738
4847
  # below — WITHOUT it, a directive would silently no-op here,
4739
4848
  # because coverage-skip runs on every non-forced pass and a
4740
4849
  # reprocess target is by definition already covered.
4850
+ # ENT-4197: the SAME directive may instead carry an exact
4851
+ # session_ids list (mutually exclusive with the window
4852
+ # server-side — see _pending_client_window's docstring).
4741
4853
  (
4742
4854
  reprocess_from,
4743
4855
  reprocess_to,
4744
4856
  pending_seg_generation,
4745
4857
  pending_seg_user,
4858
+ pending_seg_session_ids,
4746
4859
  ) = _pending_client_window(ckpt, org_uuid, "seg_generation")
4747
4860
  if pending_seg_generation is not None:
4748
4861
  emit_diagnostic_event("resume_directive_applied", org_uuid, outcome="success")
4749
- logger.info(
4750
- "[AgentInsightsSegment] obeying per-client reprocess directive "
4751
- "gen=%s: re-segmenting sessions in [%s, %s] (recorded only "
4752
- "after this run pushes cleanly)",
4753
- pending_seg_generation,
4754
- reprocess_from.isoformat() if reprocess_from else "beginning",
4755
- reprocess_to.isoformat() if reprocess_to else "open-ended",
4756
- )
4862
+ if pending_seg_session_ids is not None:
4863
+ logger.info(
4864
+ "[AgentInsightsSegment] obeying per-client reprocess directive "
4865
+ "gen=%s: re-segmenting %d exact session id(s) (recorded only "
4866
+ "after this run pushes cleanly)",
4867
+ pending_seg_generation,
4868
+ len(pending_seg_session_ids),
4869
+ )
4870
+ else:
4871
+ logger.info(
4872
+ "[AgentInsightsSegment] obeying per-client reprocess directive "
4873
+ "gen=%s: re-segmenting sessions in [%s, %s] (recorded only "
4874
+ "after this run pushes cleanly)",
4875
+ pending_seg_generation,
4876
+ reprocess_from.isoformat() if reprocess_from else "beginning",
4877
+ reprocess_to.isoformat() if reprocess_to else "open-ended",
4878
+ )
4757
4879
  if ckpt.get("has_data"):
4758
4880
  logger.info(
4759
4881
  "[AgentInsightsSegment] resuming: org already has agent-insights "
@@ -4770,18 +4892,37 @@ def _run_memcore_analyze_and_push(api_client, org_uuid: str | None, *, force: bo
4770
4892
  # Scope the backlog to the operator's window BEFORE coverage/ordering
4771
4893
  # (ENT-4183 follow-up): without this, the per-run cap fills from the whole
4772
4894
  # local history regardless of any 30-day scope. force=True keeps its full
4773
- # reach; a pending client window that is open-ended on the left (None
4774
- # resume_from) removes the window like an org data-reset does.
4775
- if not force and not (pending_seg_generation is not None and reprocess_from is None):
4895
+ # reach; a pending WINDOW-mode client directive that is open-ended on the
4896
+ # left (None resume_from) removes the window like an org data-reset does.
4897
+ #
4898
+ # An id-targeted directive (ENT-4197) does NOT get that same blanket
4899
+ # removal (review-caught): its reprocess_from is unconditionally None (the
4900
+ # two targeting modes are mutually exclusive server-side), which is NOT
4901
+ # the same thing as an operator asking to reach the whole backlog — the
4902
+ # normal look-back window still applies to every OTHER session, and only
4903
+ # the exact target ids are exempted from it below. Without this
4904
+ # distinction, "re-process these 2 stuck sessions" would have silently
4905
+ # unlocked this machine's entire uncovered history for segmentation.
4906
+ _window_mode_removes_window = (
4907
+ pending_seg_generation is not None
4908
+ and pending_seg_session_ids is None
4909
+ and reprocess_from is None
4910
+ )
4911
+ if not force and not _window_mode_removes_window:
4776
4912
  _window_open = _segmentation_window_cutoff(ckpt, org_uuid, reprocess_from)
4777
4913
  if _window_open is not None:
4778
4914
  _n_before = len(sessions)
4779
4915
  # Unknown-age sessions stay — matching the metrics lane's post-parse
4780
4916
  # guard, which keeps sessions with nothing truthful to date them by.
4917
+ # An id-targeted session ALSO stays regardless of age: exact-id
4918
+ # targeting exists precisely to reach one specific old session
4919
+ # without widening scope to the rest of the backlog.
4781
4920
  sessions = [
4782
4921
  s
4783
4922
  for s in sessions
4784
- if getattr(s, "last_span_time", None) is None or s.last_span_time >= _window_open
4923
+ if getattr(s, "last_span_time", None) is None
4924
+ or s.last_span_time >= _window_open
4925
+ or (pending_seg_session_ids is not None and s.session_id in pending_seg_session_ids)
4785
4926
  ]
4786
4927
  if len(sessions) < _n_before:
4787
4928
  logger.info(
@@ -4793,9 +4934,30 @@ def _run_memcore_analyze_and_push(api_client, org_uuid: str | None, *, force: bo
4793
4934
  if not sessions:
4794
4935
  logger.info("[AgentInsightsSegment] no sessions inside the look-back window")
4795
4936
  if pending_seg_generation is not None:
4796
- _stamp_client_directive_generation(
4797
- "seg_generation", org_uuid, pending_seg_user, pending_seg_generation
4798
- )
4937
+ if pending_seg_session_ids is not None:
4938
+ # Review-caught: an id-targeted directive's target
4939
+ # simply isn't discoverable on THIS machine — that is
4940
+ # "target missing", not "range confirmed empty", and
4941
+ # must NOT be treated as satisfied. Leave it pending
4942
+ # so a run on the machine that actually has this
4943
+ # session (or a later run here, if it appears) can
4944
+ # still obey it.
4945
+ logger.warning(
4946
+ "[AgentInsightsSegment] reprocess directive gen=%s: "
4947
+ "none of its targeted session(s) found locally — "
4948
+ "leaving it pending",
4949
+ pending_seg_generation,
4950
+ )
4951
+ else:
4952
+ _stamp_client_directive_generation(
4953
+ "seg_generation", org_uuid, pending_seg_user, pending_seg_generation
4954
+ )
4955
+ # Review-caught (ENT-4197): this detached worker never
4956
+ # gets the benefit of _sync_cmd's own opening
4957
+ # heartbeat — nothing here has sent one yet — so
4958
+ # every consumption needs its own follow-up, not just
4959
+ # the metrics lane's.
4960
+ _send_heartbeat_best_effort(api_client, org_uuid, pending_seg_user)
4799
4961
  return
4800
4962
 
4801
4963
  # Skip sessions the backend already has task data for (cost + time), unless
@@ -4819,17 +4981,29 @@ def _run_memcore_analyze_and_push(api_client, org_uuid: str | None, *, force: bo
4819
4981
  return
4820
4982
  emit_diagnostic_event("coverage_check", org_uuid, outcome="success", count=len(covered))
4821
4983
  if pending_seg_generation is not None:
4822
- # Carve the directive's window back OUT of the covered set — a narrow
4823
- # override, not force=True: only this client's sessions whose start
4824
- # falls inside the window get re-segmented; everything else keeps the
4825
- # cost-guard skip. `start_time` mirrors the server-side preview's
4826
- # filter, so the operator's affected-count matches what re-runs.
4984
+ # Carve the directive's target back OUT of the covered set — a narrow
4985
+ # override, not force=True: only the matched sessions get re-segmented;
4986
+ # everything else keeps the cost-guard skip. Two mutually exclusive
4987
+ # modes (ENT-4197): an exact session_ids list, matched by id only — or
4988
+ # a date window, matched by `start_time` (mirrors the server-side
4989
+ # preview's own filter, so the operator's affected-count matches what
4990
+ # re-runs). `pending_seg_session_ids is None` gates the window branch
4991
+ # so id-mode (where reprocess_from/reprocess_to are always None) can
4992
+ # never fall through to a blanket "None-bounded window matches
4993
+ # everything" — the two conditions are structured to be mutually
4994
+ # exclusive, matching the backend's own directive shape.
4827
4995
  in_window = {
4828
4996
  s.session_id
4829
4997
  for s in sessions
4830
4998
  if s.session_id in covered
4831
- and (reprocess_from is None or s.start_time >= reprocess_from)
4832
- and (reprocess_to is None or s.start_time <= reprocess_to)
4999
+ and (
5000
+ (pending_seg_session_ids is not None and s.session_id in pending_seg_session_ids)
5001
+ or (
5002
+ pending_seg_session_ids is None
5003
+ and (reprocess_from is None or s.start_time >= reprocess_from)
5004
+ and (reprocess_to is None or s.start_time <= reprocess_to)
5005
+ )
5006
+ )
4833
5007
  }
4834
5008
  if in_window:
4835
5009
  logger.info(
@@ -4856,12 +5030,27 @@ def _run_memcore_analyze_and_push(api_client, org_uuid: str | None, *, force: bo
4856
5030
  if not todo:
4857
5031
  logger.info("[AgentInsightsSegment] all %d local sessions already covered", len(sessions))
4858
5032
  if pending_seg_generation is not None:
4859
- # The directive's window matched nothing locally — satisfied by
4860
- # emptiness, same contract as the metrics lane's empty case.
4861
- # Without this stamp, an empty window would re-trigger every run.
4862
- _stamp_client_directive_generation(
4863
- "seg_generation", org_uuid, pending_seg_user, pending_seg_generation
4864
- )
5033
+ if pending_seg_session_ids is not None:
5034
+ # Review-caught: the carve-out above guarantees any targeted
5035
+ # session that IS locally present and covered lands in
5036
+ # `todo` — so reaching an EMPTY `todo` here means none of the
5037
+ # target ids exist on this machine at all. That's "target
5038
+ # missing", not "confirmed nothing to do", so it must not
5039
+ # be treated as satisfied (mirrors the look-back-window
5040
+ # early-return above).
5041
+ logger.warning(
5042
+ "[AgentInsightsSegment] reprocess directive gen=%s: none of "
5043
+ "its targeted session(s) found locally — leaving it pending",
5044
+ pending_seg_generation,
5045
+ )
5046
+ else:
5047
+ # The directive's window matched nothing locally — satisfied by
5048
+ # emptiness, same contract as the metrics lane's empty case.
5049
+ # Without this stamp, an empty window would re-trigger every run.
5050
+ _stamp_client_directive_generation(
5051
+ "seg_generation", org_uuid, pending_seg_user, pending_seg_generation
5052
+ )
5053
+ _send_heartbeat_best_effort(api_client, org_uuid, pending_seg_user)
4865
5054
  return
4866
5055
  if len(todo) > _MEMCORE_MAX_SESSIONS:
4867
5056
  logger.info(
@@ -5124,6 +5313,18 @@ def _run_memcore_analyze_and_push(api_client, org_uuid: str | None, *, force: bo
5124
5313
  pushed_sessions = 0
5125
5314
  pushed_tasks = 0
5126
5315
  push_failures = 0
5316
+ # ENT-4197, review-caught: an id-targeted directive's own guarantee is
5317
+ # "this specific session gets reprocessed," not "something in this run
5318
+ # succeeded" — the aggregate push_failures/pushed_sessions counters below
5319
+ # answer the latter, so an ordinary unrelated session succeeding must
5320
+ # never let a directive whose actual target failed be marked obeyed.
5321
+ # Track confirmed storage PER TARGETED SESSION instead. The push response
5322
+ # only reports a per-BATCH count, never which specific sessions within it
5323
+ # stored — so a targeted session's storage is only confirmed when the
5324
+ # WHOLE batch it rode in reports every member stored; a partial count
5325
+ # leaves every targeted session in that batch unconfirmed, same caution
5326
+ # as the aggregate "silent-zero-effect" case below.
5327
+ confirmed_target_ids: set[str] = set()
5127
5328
  for start in range(0, len(session_payloads), _MEMCORE_PUSH_BATCH):
5128
5329
  batch = session_payloads[start : start + _MEMCORE_PUSH_BATCH]
5129
5330
  payload = {
@@ -5137,24 +5338,51 @@ def _run_memcore_analyze_and_push(api_client, org_uuid: str | None, *, force: bo
5137
5338
  logger.warning("[AgentInsightsSegment] push failed: %s", resp["Error"])
5138
5339
  push_failures += 1
5139
5340
  continue
5140
- pushed_sessions += (resp or {}).get("sessions_stored", 0) if isinstance(resp, dict) else 0
5341
+ batch_stored = (resp or {}).get("sessions_stored", 0) if isinstance(resp, dict) else 0
5342
+ pushed_sessions += batch_stored
5141
5343
  pushed_tasks += (resp or {}).get("tasks_written", 0) if isinstance(resp, dict) else 0
5344
+ if pending_seg_session_ids is not None and batch_stored == len(batch):
5345
+ confirmed_target_ids.update(
5346
+ p["session_id"] for p in batch if p.get("session_id") in pending_seg_session_ids
5347
+ )
5142
5348
  logger.info(
5143
5349
  "[AgentInsightsSegment] pushed: %d session(s), %d task(s) written",
5144
5350
  pushed_sessions,
5145
5351
  pushed_tasks,
5146
5352
  )
5147
5353
  if pending_seg_generation is not None:
5148
- # Require genuine storage, not just "no batch raised an Error" — a
5149
- # batch can come back error-free with sessions_stored=0 (every session
5150
- # in it server-side skipped, e.g. an unconnected repo), and stamping
5151
- # on that would mark the reprocess "done" while nothing actually
5152
- # landed. push_failures == 0 still guards the raised-error case;
5153
- # pushed_sessions > 0 additionally guards the silent-zero-effect one.
5154
- if push_failures == 0 and pushed_sessions > 0:
5354
+ if pending_seg_session_ids is not None:
5355
+ # Stamp only when EVERY targeted id is confirmed stored — a
5356
+ # target missing this run (never discovered, failed
5357
+ # segmentation, or landed in an unconfirmed batch) leaves the
5358
+ # directive pending so a future run (on this machine or another
5359
+ # the same user runs) can still retry it specifically.
5360
+ missing_targets = pending_seg_session_ids - confirmed_target_ids
5361
+ if not missing_targets:
5362
+ _stamp_client_directive_generation(
5363
+ "seg_generation", org_uuid, pending_seg_user, pending_seg_generation
5364
+ )
5365
+ _send_heartbeat_best_effort(api_client, org_uuid, pending_seg_user)
5366
+ else:
5367
+ logger.warning(
5368
+ "[AgentInsightsSegment] reprocess directive gen=%s: %d "
5369
+ "targeted session(s) not confirmed stored this run — "
5370
+ "leaving it pending so a future run retries them",
5371
+ pending_seg_generation,
5372
+ len(missing_targets),
5373
+ )
5374
+ elif push_failures == 0 and pushed_sessions > 0:
5375
+ # Require genuine storage, not just "no batch raised an Error" —
5376
+ # a batch can come back error-free with sessions_stored=0 (every
5377
+ # session in it server-side skipped, e.g. an unconnected repo),
5378
+ # and stamping on that would mark the reprocess "done" while
5379
+ # nothing actually landed. push_failures == 0 still guards the
5380
+ # raised-error case; pushed_sessions > 0 additionally guards the
5381
+ # silent-zero-effect one.
5155
5382
  _stamp_client_directive_generation(
5156
5383
  "seg_generation", org_uuid, pending_seg_user, pending_seg_generation
5157
5384
  )
5385
+ _send_heartbeat_best_effort(api_client, org_uuid, pending_seg_user)
5158
5386
  else:
5159
5387
  logger.warning(
5160
5388
  "[AgentInsightsSegment] reprocess directive gen=%s stored 0 "
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: entelligence-cli
3
- Version: 0.1.239
3
+ Version: 0.1.241
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.239"
7
+ version = "0.1.241"
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 = [