entelligence-cli 0.1.259__tar.gz → 0.1.261__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 (216) hide show
  1. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/PKG-INFO +1 -1
  2. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/_jsonl_utils.py +21 -3
  3. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/copilot.py +10 -8
  4. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/cursor_store.py +50 -8
  5. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/opencode.py +9 -1
  6. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/api_client.py +20 -0
  7. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/commands/insights.py +57 -11
  8. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/commands/router.py +139 -60
  9. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/facts_envelope.py +13 -7
  10. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/router/__init__.py +3 -1
  11. entelligence_cli-0.1.261/entelligence_cli/router/copilot_launcher.py +80 -0
  12. entelligence_cli-0.1.261/entelligence_cli/router/copilot_settings.py +96 -0
  13. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/router/state.py +6 -1
  14. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/upload/discovery.py +13 -1
  15. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli.egg-info/PKG-INFO +1 -1
  16. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli.egg-info/SOURCES.txt +4 -0
  17. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli.egg-info/entry_points.txt +1 -0
  18. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/pyproject.toml +2 -1
  19. entelligence_cli-0.1.261/tests/test_copilot_launcher.py +166 -0
  20. entelligence_cli-0.1.261/tests/test_copilot_parser_tokens.py +61 -0
  21. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_facts_envelope.py +92 -0
  22. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_insights_checkpoint_resume.py +36 -0
  23. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_insights_copilot_prompts.py +3 -0
  24. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_insights_schedule_arm.py +14 -0
  25. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_processing_checkpoint_api_client.py +27 -0
  26. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_router_commands.py +47 -3
  27. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_upload_copilot.py +9 -0
  28. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/README.md +0 -0
  29. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/__init__.py +0 -0
  30. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/__init__.py +0 -0
  31. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/__init__.py +0 -0
  32. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/__init__.py +0 -0
  33. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/__init__.py +0 -0
  34. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_paths.py +0 -0
  35. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_segmentation_prompts/system.j2 +0 -0
  36. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_segmentation_prompts/user.j2 +0 -0
  37. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/__init__.py +0 -0
  38. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/_base.py +0 -0
  39. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/__init__.py +0 -0
  40. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/git_reader.py +0 -0
  41. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/models.py +0 -0
  42. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/parser.py +0 -0
  43. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/source.py +0 -0
  44. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/factory.py +0 -0
  45. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/__init__.py +0 -0
  46. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/__init__.py +0 -0
  47. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/base.py +0 -0
  48. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/claude_code.py +0 -0
  49. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/codex.py +0 -0
  50. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/cursor_agent_transcript.py +0 -0
  51. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/kiro.py +0 -0
  52. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/source.py +0 -0
  53. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/behavior_signals.py +0 -0
  54. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/edit_lines.py +0 -0
  55. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/file_paths.py +0 -0
  56. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/metrics.py +0 -0
  57. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/segment_orchestrator.py +0 -0
  58. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/segment_pure.py +0 -0
  59. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/session_pure.py +0 -0
  60. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/skill_names.py +0 -0
  61. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/spans.py +0 -0
  62. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/pricing.py +0 -0
  63. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/vocabulary/__init__.py +0 -0
  64. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/vocabulary/categories.py +0 -0
  65. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/vocabulary/edges.py +0 -0
  66. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/_vendor/memory_core/vocabulary/nodes.py +0 -0
  67. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/agent_insights_proxy.py +0 -0
  68. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/agent_insights_segment.py +0 -0
  69. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/ascii-art.txt +0 -0
  70. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/browser_login.py +0 -0
  71. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/cli.py +0 -0
  72. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/commands/__init__.py +0 -0
  73. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/commands/auth.py +0 -0
  74. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/commands/budget.py +0 -0
  75. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/commands/config.py +0 -0
  76. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/commands/cursor_doctor.py +0 -0
  77. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/commands/incident.py +0 -0
  78. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/commands/mcp.py +0 -0
  79. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/commands/reset.py +0 -0
  80. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/commands/review.py +0 -0
  81. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/commands/security.py +0 -0
  82. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/commands/skills.py +0 -0
  83. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/commands/update.py +0 -0
  84. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/config.py +0 -0
  85. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/cursor_path_a_usage.py +0 -0
  86. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/diagnostics.py +0 -0
  87. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/exceptions.py +0 -0
  88. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/git_operations.py +0 -0
  89. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/hooks/__init__.py +0 -0
  90. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/hooks/capacity_emit.py +0 -0
  91. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/hooks/session_brief.py +0 -0
  92. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/hooks/standup_emit.py +0 -0
  93. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/insights_log.py +0 -0
  94. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/mcp_inventory.py +0 -0
  95. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/platform_env.py +0 -0
  96. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/router/bedrock.py +0 -0
  97. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/router/catalog.py +0 -0
  98. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/router/claude_settings.py +0 -0
  99. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/router/codex_auth.py +0 -0
  100. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/router/codex_settings.py +0 -0
  101. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/router/compress.py +0 -0
  102. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/router/daemon.py +0 -0
  103. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/router/engine.py +0 -0
  104. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/router/gateway.py +0 -0
  105. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/router/gemini_translate.py +0 -0
  106. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/router/openai_translate.py +0 -0
  107. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/router/proxy.py +0 -0
  108. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/scheduling.py +0 -0
  109. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/session_inventory.py +0 -0
  110. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/textual_ui.py +0 -0
  111. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/ui/__init__.py +0 -0
  112. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/ui/interactive.py +0 -0
  113. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/ui/keys.py +0 -0
  114. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/ui/loaders.py +0 -0
  115. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/ui/output.py +0 -0
  116. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/ui/styles.py +0 -0
  117. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/update_checker.py +0 -0
  118. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/upload/__init__.py +0 -0
  119. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/upload/conductor.py +0 -0
  120. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/upload/config.py +0 -0
  121. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/upload/cursor_usage.py +0 -0
  122. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/upload/manifest.py +0 -0
  123. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/upload/models.py +0 -0
  124. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/upload/pii.py +0 -0
  125. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/upload/runner.py +0 -0
  126. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/upload/secrets.py +0 -0
  127. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/upload/stores.py +0 -0
  128. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli/wrapped_game.py +0 -0
  129. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli.egg-info/dependency_links.txt +0 -0
  130. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli.egg-info/requires.txt +0 -0
  131. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/entelligence_cli.egg-info/top_level.txt +0 -0
  132. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/setup.cfg +0 -0
  133. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_agent_insights_proxy.py +0 -0
  134. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_agent_insights_proxy_api_client.py +0 -0
  135. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_agent_insights_segment.py +0 -0
  136. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_attach_fix_smoke.py +0 -0
  137. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_attach_ticket_smoke.py +0 -0
  138. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_budget_smoke.py +0 -0
  139. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_capacity_emit.py +0 -0
  140. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_codex_auth.py +0 -0
  141. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_codex_settings.py +0 -0
  142. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_conductor.py +0 -0
  143. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_cursor_composer_mtime_stamp.py +0 -0
  144. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_cursor_doctor.py +0 -0
  145. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_cursor_path_a_usage.py +0 -0
  146. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_cursor_path_regex_and_heartbeat.py +0 -0
  147. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_cursor_self_heal_loop.py +0 -0
  148. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_cursor_usage.py +0 -0
  149. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_cursor_usage_archive.py +0 -0
  150. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_cursor_usage_heal.py +0 -0
  151. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_cursor_usage_recapture.py +0 -0
  152. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_cursor_usage_state.py +0 -0
  153. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_detached_background_work.py +0 -0
  154. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_diagnostics.py +0 -0
  155. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_discovery_head_unicode.py +0 -0
  156. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_discovery_opencode.py +0 -0
  157. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_eligibility_state.py +0 -0
  158. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_endpoint_scheme_enforcement.py +0 -0
  159. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_entropy_secret_detection.py +0 -0
  160. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_error_body_decode.py +0 -0
  161. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_gemini_key_header.py +0 -0
  162. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_git_operations_copilot.py +0 -0
  163. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_heartbeat_api_client.py +0 -0
  164. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_identity_cache_refresh.py +0 -0
  165. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_incident_refs.py +0 -0
  166. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_incident_smoke.py +0 -0
  167. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_insights_cadence_heartbeat.py +0 -0
  168. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_insights_cursor_composer_home.py +0 -0
  169. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_insights_index_failure.py +0 -0
  170. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_insights_kiro_prompts.py +0 -0
  171. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_insights_log.py +0 -0
  172. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_insights_me_smoke.py +0 -0
  173. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_insights_path_a_default.py +0 -0
  174. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_insights_produced_prs.py +0 -0
  175. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_insights_redrain.py +0 -0
  176. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_insights_repo_attribution.py +0 -0
  177. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_insights_schedule.py +0 -0
  178. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_insights_structured_payload.py +0 -0
  179. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_legacy_encoding_recovery.py +0 -0
  180. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_login_token_stdin.py +0 -0
  181. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_machine_fingerprint.py +0 -0
  182. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_mcp_install.py +0 -0
  183. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_mcp_inventory.py +0 -0
  184. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_multipart_backoff.py +0 -0
  185. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_pii.py +0 -0
  186. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_presigned_skip_index.py +0 -0
  187. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_release_directive.py +0 -0
  188. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_reset_command.py +0 -0
  189. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_review_redaction.py +0 -0
  190. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_rosetta_self_heal.py +0 -0
  191. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_router_dead_proxy_guard.py +0 -0
  192. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_router_stats.py +0 -0
  193. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_scheduling_cron_env.py +0 -0
  194. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_schtasks_integration.py +0 -0
  195. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_secrets_redaction_boundary.py +0 -0
  196. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_security_commands.py +0 -0
  197. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_segment_chunking.py +0 -0
  198. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_segment_session_timeout.py +0 -0
  199. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_segmentation_window_scope.py +0 -0
  200. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_session_brief.py +0 -0
  201. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_session_inventory.py +0 -0
  202. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_sessions_status_chunking.py +0 -0
  203. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_sessions_status_safe_default.py +0 -0
  204. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_skills_command.py +0 -0
  205. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_sync_partial_schema.py +0 -0
  206. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_sync_pushes_built_sessions.py +0 -0
  207. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_sync_runs_full_pipeline.py +0 -0
  208. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_update_command.py +0 -0
  209. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_upload_cursor_store.py +0 -0
  210. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_upload_home_backfill.py +0 -0
  211. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_upload_kiro.py +0 -0
  212. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_upload_repo_filter.py +0 -0
  213. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_upload_repo_roots.py +0 -0
  214. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_windows_compat.py +0 -0
  215. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/tests/test_wrap_retry.py +0 -0
  216. {entelligence_cli-0.1.259 → entelligence_cli-0.1.261}/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.259
3
+ Version: 0.1.261
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
@@ -81,7 +81,15 @@ SOURCE_OFFSET_KEY = "_ent_offset"
81
81
  # ENT-4417: the universal verifier — a content hash of the raw record, stamped
82
82
  # beside the offset so every parser's spans carry the same anchor block.
83
83
  SOURCE_HASH_KEY = "_ent_hash"
84
- _STAMP_KEYS = frozenset({SOURCE_OFFSET_KEY, SOURCE_HASH_KEY})
84
+ # ENT-4419 (decision #35(f)): the addressable row/document key of a record
85
+ # from a REWRITTEN source (a vscdb composer bubble id, an opencode message
86
+ # id) — the resume anchor where a byte offset cannot be one. Stamped by the
87
+ # producer that knows the key (the CLI's Cursor synthesizer, opencode's own
88
+ # record id), carried as `source.row_cursor`, and — like every `_ent_*`
89
+ # stamp — excluded from the content hash, so adding it never re-identifies
90
+ # a turn already stored under its hash.
91
+ SOURCE_ROW_CURSOR_KEY = "_ent_row_cursor"
92
+ _STAMP_KEYS = frozenset({SOURCE_OFFSET_KEY, SOURCE_HASH_KEY, SOURCE_ROW_CURSOR_KEY})
85
93
 
86
94
  SOURCE_KIND_JSONL = "jsonl"
87
95
  SOURCE_KIND_SQLITE = "sqlite"
@@ -139,15 +147,22 @@ def parse_jsonl_records(data: bytes) -> list[dict]:
139
147
  return records
140
148
 
141
149
 
142
- def source_attrs(record: object, *, kind: str = SOURCE_KIND_JSONL) -> dict:
150
+ def source_attrs(
151
+ record: object, *, kind: str = SOURCE_KIND_JSONL, row_cursor: str | None = None
152
+ ) -> dict:
143
153
  """The span attributes of the source-cursor block for one originating record.
144
154
 
145
155
  ``source.kind`` always; ``source.byte_offset`` and ``source.content_hash``
146
156
  when the record carries the stamps (:func:`parse_jsonl_records`), the
147
157
  hash computed on the fly for an unstamped record so a parser that builds
148
- its own records still anchors them. Pure.
158
+ its own records still anchors them; ``source.row_cursor`` when the caller
159
+ passes one or the record carries :data:`SOURCE_ROW_CURSOR_KEY`
160
+ (ENT-4419 — rewritten sources whose records have an addressable key).
161
+ Pure.
149
162
  """
150
163
  attrs: dict = {"source.kind": kind}
164
+ if isinstance(row_cursor, str) and row_cursor:
165
+ attrs["source.row_cursor"] = row_cursor
151
166
  if not isinstance(record, dict):
152
167
  return attrs
153
168
  offset = record.get(SOURCE_OFFSET_KEY)
@@ -156,6 +171,9 @@ def source_attrs(record: object, *, kind: str = SOURCE_KIND_JSONL) -> dict:
156
171
  content_hash = record.get(SOURCE_HASH_KEY) or record_hash(record)
157
172
  if content_hash is not None:
158
173
  attrs["source.content_hash"] = content_hash
174
+ stamped = record.get(SOURCE_ROW_CURSOR_KEY)
175
+ if "source.row_cursor" not in attrs and isinstance(stamped, str) and stamped:
176
+ attrs["source.row_cursor"] = stamped
159
177
  return attrs
160
178
 
161
179
 
@@ -46,9 +46,10 @@ the root span carries the billed session totals as ``session.token_count.*``,
46
46
  which ``session_pure.aggregate_session_spans`` prefers over the turn sums
47
47
  (the same override Cursor's billed-usage path uses). A session that has not
48
48
  shut down yet is priced from completion tokens only until its next re-index.
49
- ``inputTokens`` is treated as the FRESH component, exclusive of cache reads and
50
- writes, mirroring the Anthropic usage block whose field names it copies:
51
- prompt = input + cache_read + cache_write.
49
+ ``inputTokens`` is the TOTAL input count, inclusive of cache reads and writes.
50
+ This is unlike Anthropic's ``input_tokens`` field despite the similar name:
51
+ fresh input = max(input - cache_read - cache_write, 0). The prompt total must
52
+ therefore use ``inputTokens`` directly or cached input is counted twice.
52
53
 
53
54
  # Turns, tools, sub-agents
54
55
 
@@ -774,9 +775,9 @@ def _shutdown_totals(metrics: dict | None) -> dict | None:
774
775
  Returns ``{prompt, completion, cache_read, cache_write, requests,
775
776
  per_model}`` or None when there are no metrics or every count is zero
776
777
  (a zero aggregate must not override real per-turn completion tokens).
777
- ``inputTokens`` is the fresh component; prompt adds the cache reads and
778
- writes on top, matching the "everything on the wire" semantics every other
779
- parser gives ``llm.token_count.prompt``.
778
+ Copilot's ``inputTokens`` is already the total input count, including cache
779
+ reads and writes. ``input`` in the normalized per-model detail remains the
780
+ fresh component expected by downstream pricing code.
780
781
  """
781
782
  if not metrics:
782
783
  return None
@@ -789,10 +790,11 @@ def _shutdown_totals(metrics: dict | None) -> dict | None:
789
790
  usage = usage if isinstance(usage, dict) else {}
790
791
  req = entry.get("requests")
791
792
  req = req if isinstance(req, dict) else {}
792
- fresh = _as_int(usage.get("inputTokens"))
793
+ total_input = _as_int(usage.get("inputTokens"))
793
794
  out = _as_int(usage.get("outputTokens"))
794
795
  read = _as_int(usage.get("cacheReadTokens"))
795
796
  write = _as_int(usage.get("cacheWriteTokens"))
797
+ fresh = max(total_input - read - write, 0)
796
798
  count = _as_int(req.get("count"))
797
799
  per_model[model] = {
798
800
  "input": fresh,
@@ -801,7 +803,7 @@ def _shutdown_totals(metrics: dict | None) -> dict | None:
801
803
  "cache_write": write,
802
804
  "requests": count,
803
805
  }
804
- prompt += fresh + read + write
806
+ prompt += total_input
805
807
  completion += out
806
808
  cache_read += read
807
809
  cache_write += write
@@ -82,6 +82,7 @@ from memory_core.ingestion.coding_agent._paths import basename as path_basename,
82
82
  from memory_core.ingestion.coding_agent._sources._jsonl_utils import (
83
83
  _SKILL_BODY_MAX_CHARS,
84
84
  SOURCE_KIND_SQLITE,
85
+ SOURCE_ROW_CURSOR_KEY,
85
86
  )
86
87
  from memory_core.ingestion.coding_agent.skill_names import is_valid_skill_name
87
88
  from memory_core.ingestion.coding_agent.spans import SpanData, TraceData
@@ -258,13 +259,36 @@ def _event_hash(event: dict | None) -> str | None:
258
259
  """
259
260
  if not isinstance(event, dict):
260
261
  return None
262
+ # The parser's own `_ent_*` stamps (ENT-4419: the bubble id the CLI
263
+ # synthesizer adds as the row cursor) are not content — stripping them
264
+ # keeps every hash identical to what the same message hashed to before
265
+ # the stamp existed, so stored TURN#SHA# keys never churn.
266
+ body = {k: v for k, v in event.items() if not (isinstance(k, str) and k.startswith("_ent_"))}
261
267
  try:
262
- canonical = json.dumps(event, sort_keys=True, default=str)
268
+ canonical = json.dumps(body, sort_keys=True, default=str)
263
269
  except (TypeError, ValueError):
264
270
  return None
265
271
  return hashlib.sha1(canonical.encode("utf-8")).hexdigest()[:16]
266
272
 
267
273
 
274
+ def _row_cursor(event: dict | None) -> str | None:
275
+ """The record's addressable key — the composer bubble id (ENT-4419).
276
+
277
+ The CLI synthesizer has always written the bubble id as the message's
278
+ ``id`` (user and assistant messages), so existing uploads already carry
279
+ it and it is already inside the content hash. The ``_ent_row_cursor``
280
+ stamp is the generic fallback for a producer that keeps the key out of
281
+ the record body. None when neither is present.
282
+ """
283
+ if not isinstance(event, dict):
284
+ return None
285
+ for key in ("id", SOURCE_ROW_CURSOR_KEY):
286
+ cursor = event.get(key)
287
+ if isinstance(cursor, str) and cursor:
288
+ return cursor
289
+ return None
290
+
291
+
268
292
  def parse_cursor_store(
269
293
  data: bytes,
270
294
  trace_id: str,
@@ -315,8 +339,9 @@ def parse_cursor_store(
315
339
 
316
340
  root_id = f"{trace_id}:root"
317
341
  all_spans: list[SpanData] = []
318
- # toolCallId -> (tool-call part, owning turn's span_id, call timestamp).
319
- pending_calls: dict[str, tuple[dict, str, datetime]] = {}
342
+ # toolCallId -> (tool-call part, owning turn's span_id, call timestamp,
343
+ # the requesting message's row cursor or None).
344
+ pending_calls: dict[str, tuple[dict, str, datetime, str | None]] = {}
320
345
  # ENT-4335: skill invocations detected via `_skill_read_from_tool`, keyed by
321
346
  # canonical name — same contract shape claude_code.py's capture produces.
322
347
  skill_counts: Counter[str] = Counter()
@@ -347,6 +372,7 @@ def parse_cursor_store(
347
372
  input_value: str = "",
348
373
  real_ts: datetime | None = None,
349
374
  source_hash: str | None = None,
375
+ row_cursor: str | None = None,
350
376
  ) -> None:
351
377
  nonlocal turn_num, turn
352
378
  turn_num += 1
@@ -390,6 +416,9 @@ def parse_cursor_store(
390
416
  # ENT-4417: the store file is rewritten per sync, so the anchor kind is
391
417
  # the content hash, never an offset; `source.kind` says so explicitly.
392
418
  turn.attributes["source.kind"] = SOURCE_KIND_SQLITE
419
+ if row_cursor:
420
+ # ENT-4419: the bubble id — the seekable key in a rewritten store.
421
+ turn.attributes["source.row_cursor"] = row_cursor
393
422
  all_spans.append(turn)
394
423
  turns.append(turn)
395
424
  turn_open_real_ts.append(real_ts)
@@ -407,13 +436,19 @@ def parse_cursor_store(
407
436
  _text_from_content(msg.get("content")),
408
437
  _iso_to_dt(msg.get("createdAt")),
409
438
  source_hash=_event_hash(msg),
439
+ row_cursor=_row_cursor(msg),
410
440
  )
411
441
  continue
412
442
 
413
443
  if turn is None:
414
444
  # Assistant/tool activity before any user message (e.g. an
415
445
  # agent-initiated step) still needs a turn to live under.
416
- _open_turn(ts, real_ts=_iso_to_dt(msg.get("createdAt")), source_hash=_event_hash(msg))
446
+ _open_turn(
447
+ ts,
448
+ real_ts=_iso_to_dt(msg.get("createdAt")),
449
+ source_hash=_event_hash(msg),
450
+ row_cursor=_row_cursor(msg),
451
+ )
417
452
  turn.end_time = ts
418
453
 
419
454
  if role == "assistant":
@@ -430,15 +465,15 @@ def parse_cursor_store(
430
465
  if isinstance(part, dict) and part.get("type") == "tool-call":
431
466
  call_id = part.get("toolCallId")
432
467
  if call_id:
433
- pending_calls[call_id] = (part, turn.span_id, ts)
468
+ pending_calls[call_id] = (part, turn.span_id, ts, _row_cursor(msg))
434
469
  elif role == "tool":
435
470
  parts = msg.get("content") if isinstance(msg.get("content"), list) else []
436
471
  for part in parts:
437
472
  if not (isinstance(part, dict) and part.get("type") == "tool-result"):
438
473
  continue
439
474
  call_id = part.get("toolCallId")
440
- call_part, tool_turn_id, call_ts = pending_calls.pop(
441
- call_id, (None, turn.span_id, ts)
475
+ call_part, tool_turn_id, call_ts, call_cursor = pending_calls.pop(
476
+ call_id, (None, turn.span_id, ts, None)
442
477
  )
443
478
  all_spans.append(
444
479
  _build_tool_span(
@@ -450,6 +485,9 @@ def parse_cursor_store(
450
485
  ts,
451
486
  skill_counts,
452
487
  skill_bodies,
488
+ # The request's message anchors the call; the result's
489
+ # message is the fallback for an orphaned result.
490
+ row_cursor=call_cursor or _row_cursor(msg),
453
491
  )
454
492
  )
455
493
 
@@ -460,7 +498,7 @@ def parse_cursor_store(
460
498
 
461
499
  # Tool calls that never saw a matching result (session ended mid-call) —
462
500
  # still worth a best-effort span; assume success since no error surfaced.
463
- for call_part, tool_turn_id, call_ts in pending_calls.values():
501
+ for call_part, tool_turn_id, call_ts, call_cursor in pending_calls.values():
464
502
  all_spans.append(
465
503
  _build_tool_span(
466
504
  trace_id,
@@ -471,6 +509,7 @@ def parse_cursor_store(
471
509
  call_ts,
472
510
  skill_counts,
473
511
  skill_bodies,
512
+ row_cursor=call_cursor,
474
513
  )
475
514
  )
476
515
 
@@ -549,6 +588,7 @@ def _build_tool_span(
549
588
  end: datetime,
550
589
  skill_counts: Counter[str],
551
590
  skill_bodies: dict[str, str],
591
+ row_cursor: str | None = None,
552
592
  ) -> SpanData:
553
593
  """One tool-call/tool-result pair -> a tool span.
554
594
 
@@ -607,6 +647,8 @@ def _build_tool_span(
607
647
  if content_hash is not None:
608
648
  source_attrs["source.content_hash"] = content_hash
609
649
  source_attrs["source.kind"] = SOURCE_KIND_SQLITE # ENT-4417
650
+ if row_cursor:
651
+ source_attrs["source.row_cursor"] = row_cursor # ENT-4419
610
652
  return SpanData(
611
653
  span_id=f"{trace_id}:tool:{call_id}",
612
654
  trace_id=trace_id,
@@ -70,9 +70,17 @@ def _source_attrs(record: dict | None) -> dict:
70
70
  silently drift across re-parses if kept. ``kind="sqlite"`` (content hash
71
71
  only) matches ``cursor_store.py``'s own rewritten-store anchor.
72
72
  """
73
+ # ENT-4419: the message id IS the addressable key in the re-materialized
74
+ # store — the row cursor a seek can find again, unlike the throwaway
75
+ # NDJSON offset. It is part of the record already, so the hash is unchanged.
76
+ msg_id = record.get("id") if isinstance(record, dict) else None
73
77
  return {
74
78
  k: v
75
- for k, v in source_attrs(record, kind=SOURCE_KIND_SQLITE).items()
79
+ for k, v in source_attrs(
80
+ record,
81
+ kind=SOURCE_KIND_SQLITE,
82
+ row_cursor=msg_id if isinstance(msg_id, str) and msg_id else None,
83
+ ).items()
76
84
  if k != "source.byte_offset"
77
85
  }
78
86
 
@@ -13,6 +13,24 @@ from typing import Any
13
13
  import requests
14
14
 
15
15
 
16
+ # ENT-4419 / KI-71: every EKU call declares the CLI's own version, so the
17
+ # backend can decide per REQUEST whether this client understands newer wire
18
+ # shapes (object-shaped directive entries from 0.1.260). Best-effort: an
19
+ # unknown version sends nothing, and the backend then falls back to the
20
+ # shapes every version understands.
21
+ CLI_VERSION_HEADER = "X-Entelligence-CLI-Version"
22
+
23
+
24
+ def _cli_version_header() -> dict[str, str]:
25
+ with suppress(Exception):
26
+ from importlib.metadata import version
27
+
28
+ value = version("entelligence-cli")
29
+ if value:
30
+ return {CLI_VERSION_HEADER: value}
31
+ return {}
32
+
33
+
16
34
  # Use the top-level package logger so the file handler set up in review.py captures these
17
35
  logger = logging.getLogger("entelligence_cli")
18
36
 
@@ -783,6 +801,7 @@ class APIClient:
783
801
  headers = {
784
802
  "Content-Type": "application/json",
785
803
  "Authorization": f"Bearer {self.config.api_token}",
804
+ **_cli_version_header(),
786
805
  }
787
806
  if org_uuid:
788
807
  headers["orguuid"] = org_uuid
@@ -837,6 +856,7 @@ class APIClient:
837
856
  "Authorization": f"Bearer {self.config.api_token}",
838
857
  "Cache-Control": "no-cache",
839
858
  "Pragma": "no-cache",
859
+ **_cli_version_header(),
840
860
  }
841
861
  if org_uuid:
842
862
  headers["orguuid"] = org_uuid
@@ -365,6 +365,21 @@ def _segmentation_window_cutoff(
365
365
  return cutoff
366
366
 
367
367
 
368
+ def _directive_entry_session_id(entry: object) -> str | None:
369
+ """The session id a checkpoint directive entry targets (ENT-4419).
370
+
371
+ Plain strings (every backend before decision #35(f)) and objects carrying
372
+ ``session_id`` both resolve; anything else is ignored, never coerced.
373
+ """
374
+ if isinstance(entry, str):
375
+ return entry.strip() or None
376
+ if isinstance(entry, dict):
377
+ sid = entry.get("session_id")
378
+ if isinstance(sid, str) and sid.strip():
379
+ return sid.strip()
380
+ return None
381
+
382
+
368
383
  def _pending_client_window(
369
384
  ckpt: dict, org_uuid: str, which: str
370
385
  ) -> tuple[datetime | None, datetime | None, int | None, str | None, set[str] | None]:
@@ -384,7 +399,9 @@ def _pending_client_window(
384
399
  is a non-empty set and ``resume_from``/``resume_to`` are both ``None``
385
400
  (exact-id targeting), or ``session_ids`` is ``None`` and the window
386
401
  bounds carry the (possibly one-sided-unbounded) date range — never a mix
387
- of both. ``user_uuid`` is the checkpoint's authenticated user — callers
402
+ of both. A non-empty id list whose entries are all unusable yields an
403
+ EMPTY set (id mode, no targets), never ``None`` (ENT-4419, review-caught:
404
+ ``None`` would be read as an open-ended window). ``user_uuid`` is the checkpoint's authenticated user — callers
388
405
  must pass it straight through to the matching
389
406
  :func:`_stamp_client_directive_generation` call, so the obeyed-
390
407
  generation write lands in the SAME (org, user)-scoped file this read
@@ -419,8 +436,27 @@ def _pending_client_window(
419
436
  session_ids: set[str] | None = None
420
437
  raw_ids = ckpt.get("client_resume_session_ids")
421
438
  if isinstance(raw_ids, list):
422
- cleaned = {str(s) for s in raw_ids if s}
423
- session_ids = cleaned or None
439
+ # ENT-4419: an entry is a session id OR an object
440
+ # `{session_id, mode, resume_from}` (backend decision #35(f)). This
441
+ # client honours every entry as a whole-session re-process — `mode:
442
+ # full`, the default — which is exactly what a plain id has always
443
+ # meant; `tail` / `seg` and the anchor are consumed by the byte-resume
444
+ # slice. A dict must never be stringified into an id that matches
445
+ # nothing (KI-71).
446
+ cleaned = {sid for sid in (_directive_entry_session_id(e) for e in raw_ids) if sid}
447
+ if raw_ids and not cleaned:
448
+ # Review-caught: a non-empty list with no usable entry is still an
449
+ # id-mode directive — an EMPTY target set, consumed harmlessly —
450
+ # never `None`, which the seg lane would read as an open-ended
451
+ # window and re-process the whole local backlog.
452
+ logger.warning(
453
+ "client directive generation %s carries no usable session entry; "
454
+ "treating as an id-mode directive with no targets",
455
+ server_gen,
456
+ )
457
+ session_ids = set()
458
+ else:
459
+ session_ids = cleaned or None
424
460
  return (
425
461
  _parse_iso(ckpt.get("client_resume_from")),
426
462
  _parse_iso(ckpt.get("client_resume_to")),
@@ -3487,6 +3523,7 @@ def _arm_sync_schedule(
3487
3523
  "ENTELLIGENCE_OPENCODE_HOMES",
3488
3524
  "ENTELLIGENCE_KIRO_HOMES",
3489
3525
  "ENTELLIGENCE_COPILOT_HOMES",
3526
+ "COPILOT_HOME",
3490
3527
  "ENTELLIGENCE_SEGMENT_CONCURRENCY",
3491
3528
  "ENTELLIGENCE_SEGMENT_SESSION_TIMEOUT",
3492
3529
  "ENTELLIGENCE_SEGMENT_MAX_SESSIONS",
@@ -4165,13 +4202,14 @@ def _kiro_homes() -> list[str]:
4165
4202
 
4166
4203
  def _copilot_homes() -> list[str]:
4167
4204
  """Copilot CLI homes memory_core can read (``ENTELLIGENCE_COPILOT_HOMES``
4168
- override, else ``~/.copilot``).
4205
+ override, else Copilot's ``COPILOT_HOME``, else ``~/.copilot``).
4169
4206
 
4170
4207
  Unlike OpenCode / Cursor / Kiro there is no materialized cache: Copilot writes a
4171
4208
  per-session JSONL itself (``session-state/<session-id>/events.jsonl``) and
4172
4209
  memory_core's LocalSource parses it in place, so this points at the raw home.
4173
4210
  """
4174
- return _homes_from_env("ENTELLIGENCE_COPILOT_HOMES", "~/.copilot")
4211
+ default = os.environ.get("COPILOT_HOME", "").strip() or "~/.copilot"
4212
+ return _homes_from_env("ENTELLIGENCE_COPILOT_HOMES", default)
4175
4213
 
4176
4214
 
4177
4215
  def _strip_prompt_tags(text: str) -> str:
@@ -5746,7 +5784,7 @@ def _run_memcore_analyze_and_push(api_client, org_uuid: str | None, *, force: bo
5746
5784
  if not sessions:
5747
5785
  logger.info("[AgentInsightsSegment] no sessions inside the look-back window")
5748
5786
  if pending_seg_generation is not None:
5749
- if pending_seg_session_ids is not None:
5787
+ if pending_seg_session_ids:
5750
5788
  # Review-caught: an id-targeted directive's target
5751
5789
  # simply isn't discoverable on THIS machine — that is
5752
5790
  # "target missing", not "range confirmed empty", and
@@ -5761,6 +5799,9 @@ def _run_memcore_analyze_and_push(api_client, org_uuid: str | None, *, force: bo
5761
5799
  pending_seg_generation,
5762
5800
  )
5763
5801
  else:
5802
+ # A window that matched nothing — or an id list with
5803
+ # no usable target (ENT-4419, review-caught) — is
5804
+ # satisfied by emptiness: stamp it, never re-obey it.
5764
5805
  _stamp_client_directive_generation(
5765
5806
  "seg_generation", org_uuid, pending_seg_user, pending_seg_generation
5766
5807
  )
@@ -5918,23 +5959,28 @@ def _run_memcore_analyze_and_push(api_client, org_uuid: str | None, *, force: bo
5918
5959
  len(directive_gated),
5919
5960
  )
5920
5961
  elif pending_seg_generation is not None:
5921
- if pending_seg_session_ids is not None:
5962
+ if pending_seg_session_ids:
5922
5963
  # Review-caught: the carve-out above guarantees any targeted
5923
5964
  # session that IS locally present and covered lands in
5924
5965
  # `todo` — so reaching an EMPTY `todo` here means none of the
5925
5966
  # target ids exist on this machine at all. That's "target
5926
5967
  # missing", not "confirmed nothing to do", so it must not
5927
5968
  # be treated as satisfied (mirrors the look-back-window
5928
- # early-return above).
5969
+ # early-return above). An EMPTY target set (a directive whose
5970
+ # entries were all unusable, ENT-4419) is the opposite case:
5971
+ # nothing was ever targeted, so it falls through to the
5972
+ # satisfied-by-emptiness stamp below instead of re-obeying
5973
+ # the same malformed generation every run (review-caught).
5929
5974
  logger.warning(
5930
5975
  "[AgentInsightsSegment] reprocess directive gen=%s: none of "
5931
5976
  "its targeted session(s) found locally — leaving it pending",
5932
5977
  pending_seg_generation,
5933
5978
  )
5934
5979
  else:
5935
- # The directive's window matched nothing locally — satisfied by
5936
- # emptiness, same contract as the metrics lane's empty case.
5937
- # Without this stamp, an empty window would re-trigger every run.
5980
+ # The directive's window matched nothing locally — or its id
5981
+ # list carried no usable target — satisfied by emptiness, same
5982
+ # contract as the metrics lane's empty case. Without this
5983
+ # stamp, an empty window would re-trigger every run.
5938
5984
  _stamp_client_directive_generation(
5939
5985
  "seg_generation", org_uuid, pending_seg_user, pending_seg_generation
5940
5986
  )