entelligence-cli 0.1.237__tar.gz → 0.1.239__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.237 → entelligence_cli-0.1.239}/PKG-INFO +1 -1
  2. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/api_client.py +29 -0
  3. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/commands/insights.py +48 -12
  4. entelligence_cli-0.1.239/entelligence_cli/session_inventory.py +206 -0
  5. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/upload/discovery.py +320 -61
  6. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli.egg-info/PKG-INFO +1 -1
  7. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli.egg-info/SOURCES.txt +2 -0
  8. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/pyproject.toml +1 -1
  9. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_discovery_opencode.py +92 -0
  10. entelligence_cli-0.1.239/tests/test_session_inventory.py +261 -0
  11. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_upload_cursor_store.py +415 -0
  12. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/README.md +0 -0
  13. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/__init__.py +0 -0
  14. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/__init__.py +0 -0
  15. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/__init__.py +0 -0
  16. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/__init__.py +0 -0
  17. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/__init__.py +0 -0
  18. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_paths.py +0 -0
  19. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_segmentation_prompts/system.j2 +0 -0
  20. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_segmentation_prompts/user.j2 +0 -0
  21. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/__init__.py +0 -0
  22. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/_base.py +0 -0
  23. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/_jsonl_utils.py +0 -0
  24. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/__init__.py +0 -0
  25. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/git_reader.py +0 -0
  26. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/models.py +0 -0
  27. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/parser.py +0 -0
  28. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/source.py +0 -0
  29. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/factory.py +0 -0
  30. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/__init__.py +0 -0
  31. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/__init__.py +0 -0
  32. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/base.py +0 -0
  33. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/claude_code.py +0 -0
  34. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/codex.py +0 -0
  35. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/copilot.py +0 -0
  36. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/cursor_agent_transcript.py +0 -0
  37. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/cursor_store.py +0 -0
  38. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/kiro.py +0 -0
  39. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/opencode.py +0 -0
  40. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/source.py +0 -0
  41. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/behavior_signals.py +0 -0
  42. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/file_paths.py +0 -0
  43. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/metrics.py +0 -0
  44. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/segment_orchestrator.py +0 -0
  45. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/segment_pure.py +0 -0
  46. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/session_pure.py +0 -0
  47. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/skill_names.py +0 -0
  48. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/spans.py +0 -0
  49. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/pricing.py +0 -0
  50. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/vocabulary/__init__.py +0 -0
  51. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/vocabulary/categories.py +0 -0
  52. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/vocabulary/edges.py +0 -0
  53. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/_vendor/memory_core/vocabulary/nodes.py +0 -0
  54. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/agent_insights_proxy.py +0 -0
  55. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/agent_insights_segment.py +0 -0
  56. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/ascii-art.txt +0 -0
  57. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/browser_login.py +0 -0
  58. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/cli.py +0 -0
  59. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/commands/__init__.py +0 -0
  60. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/commands/auth.py +0 -0
  61. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/commands/budget.py +0 -0
  62. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/commands/config.py +0 -0
  63. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/commands/cursor_doctor.py +0 -0
  64. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/commands/incident.py +0 -0
  65. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/commands/mcp.py +0 -0
  66. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/commands/reset.py +0 -0
  67. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/commands/review.py +0 -0
  68. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/commands/router.py +0 -0
  69. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/commands/security.py +0 -0
  70. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/commands/skills.py +0 -0
  71. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/commands/update.py +0 -0
  72. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/config.py +0 -0
  73. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/cursor_path_a_usage.py +0 -0
  74. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/diagnostics.py +0 -0
  75. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/exceptions.py +0 -0
  76. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/facts_envelope.py +0 -0
  77. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/git_operations.py +0 -0
  78. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/hooks/__init__.py +0 -0
  79. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/hooks/capacity_emit.py +0 -0
  80. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/hooks/session_brief.py +0 -0
  81. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/hooks/standup_emit.py +0 -0
  82. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/insights_log.py +0 -0
  83. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/mcp_inventory.py +0 -0
  84. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/platform_env.py +0 -0
  85. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/router/__init__.py +0 -0
  86. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/router/bedrock.py +0 -0
  87. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/router/catalog.py +0 -0
  88. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/router/claude_settings.py +0 -0
  89. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/router/codex_auth.py +0 -0
  90. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/router/codex_settings.py +0 -0
  91. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/router/compress.py +0 -0
  92. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/router/daemon.py +0 -0
  93. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/router/engine.py +0 -0
  94. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/router/gateway.py +0 -0
  95. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/router/gemini_translate.py +0 -0
  96. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/router/openai_translate.py +0 -0
  97. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/router/proxy.py +0 -0
  98. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/router/state.py +0 -0
  99. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/scheduling.py +0 -0
  100. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/textual_ui.py +0 -0
  101. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/ui/__init__.py +0 -0
  102. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/ui/interactive.py +0 -0
  103. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/ui/keys.py +0 -0
  104. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/ui/loaders.py +0 -0
  105. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/ui/output.py +0 -0
  106. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/ui/styles.py +0 -0
  107. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/update_checker.py +0 -0
  108. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/upload/__init__.py +0 -0
  109. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/upload/conductor.py +0 -0
  110. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/upload/config.py +0 -0
  111. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/upload/cursor_usage.py +0 -0
  112. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/upload/manifest.py +0 -0
  113. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/upload/models.py +0 -0
  114. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/upload/pii.py +0 -0
  115. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/upload/runner.py +0 -0
  116. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/upload/secrets.py +0 -0
  117. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/upload/stores.py +0 -0
  118. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli/wrapped_game.py +0 -0
  119. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli.egg-info/dependency_links.txt +0 -0
  120. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli.egg-info/entry_points.txt +0 -0
  121. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli.egg-info/requires.txt +0 -0
  122. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/entelligence_cli.egg-info/top_level.txt +0 -0
  123. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/setup.cfg +0 -0
  124. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_agent_insights_proxy.py +0 -0
  125. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_agent_insights_proxy_api_client.py +0 -0
  126. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_agent_insights_segment.py +0 -0
  127. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_attach_fix_smoke.py +0 -0
  128. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_attach_ticket_smoke.py +0 -0
  129. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_budget_smoke.py +0 -0
  130. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_capacity_emit.py +0 -0
  131. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_codex_auth.py +0 -0
  132. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_codex_settings.py +0 -0
  133. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_conductor.py +0 -0
  134. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_cursor_composer_mtime_stamp.py +0 -0
  135. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_cursor_doctor.py +0 -0
  136. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_cursor_path_a_usage.py +0 -0
  137. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_cursor_path_regex_and_heartbeat.py +0 -0
  138. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_cursor_self_heal_loop.py +0 -0
  139. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_cursor_usage.py +0 -0
  140. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_cursor_usage_archive.py +0 -0
  141. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_cursor_usage_heal.py +0 -0
  142. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_cursor_usage_recapture.py +0 -0
  143. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_cursor_usage_state.py +0 -0
  144. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_detached_background_work.py +0 -0
  145. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_diagnostics.py +0 -0
  146. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_discovery_head_unicode.py +0 -0
  147. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_error_body_decode.py +0 -0
  148. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_facts_envelope.py +0 -0
  149. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_heartbeat_api_client.py +0 -0
  150. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_identity_cache_refresh.py +0 -0
  151. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_incident_refs.py +0 -0
  152. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_incident_smoke.py +0 -0
  153. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_insights_cadence_heartbeat.py +0 -0
  154. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_insights_checkpoint_resume.py +0 -0
  155. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_insights_cursor_composer_home.py +0 -0
  156. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_insights_index_failure.py +0 -0
  157. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_insights_kiro_prompts.py +0 -0
  158. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_insights_log.py +0 -0
  159. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_insights_me_smoke.py +0 -0
  160. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_insights_path_a_default.py +0 -0
  161. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_insights_produced_prs.py +0 -0
  162. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_insights_redrain.py +0 -0
  163. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_insights_repo_attribution.py +0 -0
  164. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_insights_schedule.py +0 -0
  165. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_insights_schedule_arm.py +0 -0
  166. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_insights_structured_payload.py +0 -0
  167. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_legacy_encoding_recovery.py +0 -0
  168. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_mcp_install.py +0 -0
  169. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_mcp_inventory.py +0 -0
  170. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_multipart_backoff.py +0 -0
  171. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_pii.py +0 -0
  172. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_presigned_skip_index.py +0 -0
  173. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_processing_checkpoint_api_client.py +0 -0
  174. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_reset_command.py +0 -0
  175. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_rosetta_self_heal.py +0 -0
  176. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_router_commands.py +0 -0
  177. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_router_stats.py +0 -0
  178. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_scheduling_cron_env.py +0 -0
  179. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_schtasks_integration.py +0 -0
  180. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_secrets_redaction_boundary.py +0 -0
  181. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_security_commands.py +0 -0
  182. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_segment_chunking.py +0 -0
  183. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_segment_session_timeout.py +0 -0
  184. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_segmentation_window_scope.py +0 -0
  185. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_session_brief.py +0 -0
  186. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_sessions_status_chunking.py +0 -0
  187. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_sessions_status_safe_default.py +0 -0
  188. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_skills_command.py +0 -0
  189. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_sync_partial_schema.py +0 -0
  190. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_sync_pushes_built_sessions.py +0 -0
  191. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_sync_runs_full_pipeline.py +0 -0
  192. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_update_command.py +0 -0
  193. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_upload_home_backfill.py +0 -0
  194. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_upload_kiro.py +0 -0
  195. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_upload_repo_filter.py +0 -0
  196. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_upload_repo_roots.py +0 -0
  197. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_windows_compat.py +0 -0
  198. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/tests/test_wrap_retry.py +0 -0
  199. {entelligence_cli-0.1.237 → entelligence_cli-0.1.239}/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.237
3
+ Version: 0.1.239
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
@@ -892,6 +892,35 @@ class APIClient:
892
892
  "/agent-insights/ingest-facts-envelope/", payload, org_uuid=org_uuid, timeout=120
893
893
  )
894
894
 
895
+ def ingest_session_inventory(self, org_uuid: str, payload: dict) -> dict:
896
+ """`POST /agent-insights/ingest-session-inventory/` — the session
897
+ ledger's client-emission half (ENT-4197): one calendar day's whole
898
+ locally-discovered session list for this machine's user, a raw
899
+ observation matching the facts envelope's doctrine.
900
+
901
+ Additive and independent of every other push: this endpoint never
902
+ touches the graph, RDS, or the facts store — a failure here has no
903
+ bearing on any other push's success.
904
+
905
+ `payload` carries {inventory_version, reported_org_uuid, date,
906
+ emitted_at, cli_version, sessions:[...]}; org/user identity is
907
+ derived server-side from the token, same as every other
908
+ agent-insights call — `reported_org_uuid` in the body is only ever
909
+ compared against it, never trusted on its own. Deliberately NOT
910
+ named `org_uuid`/`orgUUID` — those spellings are recognized by the
911
+ backend's shared `@require_org_access` decorator and compared
912
+ case-sensitively against the authenticated org before the endpoint's
913
+ own validation runs; this name avoids that entirely. Returns the
914
+ parsed response dict ({success, date, sessions_recorded, ...}), or
915
+ `{"Error": "<message>"}` on failure.
916
+ """
917
+ return self._eku_post(
918
+ "/agent-insights/ingest-session-inventory/",
919
+ payload,
920
+ org_uuid=org_uuid,
921
+ timeout=60,
922
+ )
923
+
895
924
  def ingest_agent_insights_session_commits(self, org_uuid: str, payload: dict) -> dict:
896
925
  """`POST /agentInsightsIngestSessionCommits/` — push session→commit
897
926
  mappings for PR<->model attribution (backend `session_commit` table).
@@ -42,7 +42,7 @@ from urllib.parse import quote
42
42
 
43
43
  import click
44
44
 
45
- from .. import facts_envelope
45
+ from .. import facts_envelope, session_inventory
46
46
  from ..config import ConfigManager
47
47
  from ..diagnostics import classify_client_error, drain_events, emit_diagnostic_event
48
48
  from ..insights_log import RunLog, describe_installed_schedule
@@ -2063,6 +2063,21 @@ def _sync_cmd(
2063
2063
  discovered = []
2064
2064
  discovery_failed = True
2065
2065
  runlog.line("discover", f"{len(discovered)} local session(s) found")
2066
+ # ENT-4197 session ledger: from the RAW, unfiltered discovery — before the
2067
+ # look-back window below narrows `discovered` to what this run will
2068
+ # actually process. The whole point of the ledger is letting the backend
2069
+ # see everything on the machine, including sessions the window/HWM logic
2070
+ # is currently skipping, so a diff service can flag real gaps rather than
2071
+ # only ever agreeing with what this run chose to push. Additive, never
2072
+ # lets a build/push failure affect the real sync below.
2073
+ with suppress(Exception):
2074
+ session_inventory.push_session_inventories(
2075
+ api_client,
2076
+ org_uuid,
2077
+ session_inventory.build_daily_inventories(
2078
+ discovered, org_uuid=org_uuid, client_version=_client_version()
2079
+ ),
2080
+ )
2066
2081
  if not discovered:
2067
2082
  if discovery_failed:
2068
2083
  # A real failure, not an empty machine: do NOT mark the run clean or
@@ -4642,21 +4657,16 @@ def _run_memcore_analyze_and_push(api_client, org_uuid: str | None, *, force: bo
4642
4657
  )
4643
4658
  from memory_core.ingestion.coding_agent._sources.factory import get_source
4644
4659
 
4645
- # Broker-only: build the direct segmentation model. No proxy fallback here.
4646
- try:
4647
- model = build_foundry_llm_config(api_client, org_uuid).build_model()
4648
- except ProxyUnavailable as exc:
4649
- logger.info(
4650
- "[AgentInsightsSegment] credential broker unavailable (%s); skipping "
4651
- "CLI segmentation this run (the proxy is not used for CLI transcripts)",
4652
- exc,
4653
- )
4654
- return
4655
-
4656
4660
  # Discover across every configured agent home — the SAME set the foreground
4657
4661
  # sync uses (and the helpers honor the ENTELLIGENCE_*_HOMES overrides the
4658
4662
  # scheduler propagates), so the LLM task grain isn't limited to ~/.claude
4659
4663
  # while the metrics push covers Codex/Cursor/OpenCode/Kiro too.
4664
+ #
4665
+ # Deliberately BEFORE the broker-model build below (review-caught): this
4666
+ # discovery + the ledger push it feeds are independent of whether the
4667
+ # broker is available this run — placing them after a `return` on
4668
+ # ProxyUnavailable meant a broker outage silently skipped the "on every
4669
+ # sync" ledger emission too, not just segmentation.
4660
4670
  source = get_source(
4661
4671
  "local",
4662
4672
  claude_code_homes=_claude_homes(),
@@ -4678,10 +4688,36 @@ def _run_memcore_analyze_and_push(api_client, org_uuid: str | None, *, force: bo
4678
4688
  exc_info=True,
4679
4689
  )
4680
4690
  return
4691
+ # ENT-4197 session ledger: same "on every sync" contract as the foreground
4692
+ # `insights sync` path (insights.py's discover step above) — this worker
4693
+ # is an independent sync path in its own right (background segmentation,
4694
+ # not spawned per foreground run on every machine), so skipping it here
4695
+ # would leave a real coverage gap for machines that primarily run via
4696
+ # this path. Idempotent overwrite (same day, pushed from two paths in
4697
+ # quick succession) is harmless — last write wins, no accumulation risk.
4698
+ with suppress(Exception):
4699
+ session_inventory.push_session_inventories(
4700
+ api_client,
4701
+ org_uuid,
4702
+ session_inventory.build_daily_inventories(
4703
+ sessions, org_uuid=org_uuid, client_version=_client_version()
4704
+ ),
4705
+ )
4681
4706
  if not sessions:
4682
4707
  logger.info("[AgentInsightsSegment] no local sessions discovered")
4683
4708
  return
4684
4709
 
4710
+ # Broker-only: build the direct segmentation model. No proxy fallback here.
4711
+ try:
4712
+ model = build_foundry_llm_config(api_client, org_uuid).build_model()
4713
+ except ProxyUnavailable as exc:
4714
+ logger.info(
4715
+ "[AgentInsightsSegment] credential broker unavailable (%s); skipping "
4716
+ "CLI segmentation this run (the proxy is not used for CLI transcripts)",
4717
+ exc,
4718
+ )
4719
+ return
4720
+
4685
4721
  # ENT-3932: ask the backend where this org stands before doing any work, so
4686
4722
  # the run reports fresh-org vs. resume for the org we are CURRENTLY logged
4687
4723
  # into (not a local, org-blind guess). Log-only/best-effort — the
@@ -0,0 +1,206 @@
1
+ """ENT-4197 — the CLI-side emitter for the session ledger (M1 rider).
2
+
3
+ Builds and pushes the wire shape `POST agent-insights/ingest-session-inventory/`
4
+ expects (`agent_insights.session_inventory_contract.SESSION_INVENTORY_REQUEST_SCHEMA`
5
+ on the backend) from the SAME `discover_sessions()` list the sync flow already
6
+ computes — a raw observation of "what sessions exist on this machine," same
7
+ doctrine as the facts envelope (ENT-4131): the CLI reports what it found; the
8
+ server derives every verdict (missing / envelope-only / failed / processed).
9
+
10
+ Deliberately a separate module from `facts_envelope.py`: an inventory
11
+ statement describes a whole day's worth of sessions for the machine's user,
12
+ built straight from `DiscoveredSession` (no spans, no parsing) — it shares no
13
+ input shape with the per-session envelope builder.
14
+ """
15
+
16
+ from __future__ import annotations
17
+
18
+ import logging
19
+ from collections import defaultdict
20
+ from datetime import UTC, datetime
21
+ from typing import TYPE_CHECKING, Any
22
+
23
+
24
+ if TYPE_CHECKING:
25
+ from memory_core.ingestion.coding_agent.spans import DiscoveredSession
26
+
27
+ logger = logging.getLogger(__name__)
28
+
29
+ # Bumped by hand together with the backend's own copy whenever the wire shape
30
+ # changes in ANY way — same additive-fields-are-not-free convention the
31
+ # facts envelope's ENVELOPE_SCHEMA_VERSION follows (additionalProperties:
32
+ # false means every change is a version bump).
33
+ INVENTORY_SCHEMA_VERSION = "1"
34
+
35
+ # Matches the facts envelope's own agent allowlist (facts_envelope.py) — the
36
+ # two are kept in lockstep by hand, same as the backend's mirrored constant.
37
+ _SUPPORTED_AGENTS = ("claude-code", "cursor")
38
+
39
+
40
+ def _agent_from_session_id(session_id: str) -> str:
41
+ """The `local:{agent}:{...}` convention's middle segment.
42
+
43
+ Same split `_sync_cmd` itself already does when building the structured
44
+ push (`commands/insights.py`) — kept independent here rather than
45
+ imported, since `DiscoveredSession` carries no separate agent field of
46
+ its own to read instead.
47
+ """
48
+ parts = session_id.split(":")
49
+ return parts[1] if len(parts) > 1 else "unknown"
50
+
51
+
52
+ def _iso(dt) -> str | None:
53
+ if dt is None:
54
+ return None
55
+ if dt.tzinfo is None:
56
+ dt = dt.replace(tzinfo=UTC)
57
+ return dt.astimezone(UTC).isoformat()
58
+
59
+
60
+ def _local_date(dt: datetime, tz=None) -> str:
61
+ """The machine-local calendar day for a datetime, YYYY-MM-DD.
62
+
63
+ Review-caught: `d.start_time.date()` on a UTC-aware datetime returns the
64
+ UTC calendar day, not the machine-local one the design promises — a
65
+ session at 23:30 UTC in a UTC+5 timezone is really 04:30 the NEXT local
66
+ day, and the naive `.date()` call filed it under the wrong bucket.
67
+
68
+ A naive input is treated as a UTC instant first (matching `_iso`'s own
69
+ convention for the wire-format timestamps), then converted to local
70
+ time — deliberately different from `_iso`, which always renders UTC for
71
+ the wire: this function's whole job is the OPPOSITE, local-calendar
72
+ semantics, for the bucket key only.
73
+
74
+ Args:
75
+ dt: an aware or naive datetime.
76
+ tz: override for the target "local" zone — `None` (the production
77
+ default) means the system's configured local timezone, matching
78
+ `datetime.astimezone()`'s own no-argument behavior. Tests pass an
79
+ explicit `timezone(timedelta(hours=N))` so the cross-midnight
80
+ behavior is verified deterministically, independent of whatever
81
+ timezone the test runner's own machine happens to be in.
82
+ """
83
+ if dt.tzinfo is None:
84
+ dt = dt.replace(tzinfo=UTC)
85
+ return dt.astimezone(tz).date().isoformat()
86
+
87
+
88
+ def group_by_day(
89
+ discovered: list[DiscoveredSession], *, tz=None
90
+ ) -> dict[str, list[dict[str, Any]]]:
91
+ """Bucket discovered sessions into per-calendar-day observation lists.
92
+
93
+ Bucketed by each session's own `start_time` in the machine's local
94
+ timezone (the design's own "machine-local" contract — a session started
95
+ at 11pm local and worked past midnight UTC is still "today" from the
96
+ machine's own perspective, matching how a person would describe their
97
+ day, and avoiding a UTC-boundary session flapping between two days
98
+ depending only on which timezone last computed it).
99
+
100
+ A session missing its required `start_time`, or whose id doesn't match a
101
+ supported agent, is silently dropped from every day's bucket — same
102
+ "can't ship, don't crash" idiom `facts_envelope.build_envelope` follows
103
+ for a turn with no timestamp. This is a raw-observation ledger: an
104
+ unshippable session is simply absent from the statement, not an error
105
+ that should abort the whole day's push.
106
+
107
+ Args:
108
+ discovered: the same list `source.discover_sessions()` already
109
+ returns for the sync run — no separate discovery pass.
110
+ tz: see `_local_date` — `None` (production default) means the
111
+ system's own local timezone.
112
+
113
+ Returns:
114
+ ``{"YYYY-MM-DD": [{"session_id", "created_at", "agent", "last_span_at"?}, ...]}``,
115
+ one entry per calendar day that has at least one shippable session.
116
+ """
117
+ by_day: dict[str, list[dict[str, Any]]] = defaultdict(list)
118
+ for d in discovered:
119
+ if d.start_time is None:
120
+ continue
121
+ agent = _agent_from_session_id(d.session_id)
122
+ if agent not in _SUPPORTED_AGENTS:
123
+ continue
124
+ created_at = _iso(d.start_time)
125
+ if created_at is None:
126
+ continue
127
+ day = _local_date(d.start_time, tz)
128
+ observation: dict[str, Any] = {
129
+ "session_id": d.session_id,
130
+ "created_at": created_at,
131
+ "agent": agent,
132
+ }
133
+ last_span_at = _iso(d.last_span_time)
134
+ if last_span_at is not None:
135
+ observation["last_span_at"] = last_span_at
136
+ by_day[day].append(observation)
137
+ return dict(by_day)
138
+
139
+
140
+ def build_daily_inventories(
141
+ discovered: list[DiscoveredSession],
142
+ *,
143
+ org_uuid: str,
144
+ client_version: str | None,
145
+ tz=None,
146
+ ) -> list[dict[str, Any]]:
147
+ """One inventory-push body per calendar day represented in `discovered`.
148
+
149
+ All bodies in one call share the same `emitted_at` instant (this sync
150
+ run built every one of them together) even though each covers a
151
+ different day — the field records when the STATEMENT was made, not the
152
+ day it describes.
153
+
154
+ The body's org field is named ``reported_org_uuid``, NOT ``org_uuid``
155
+ (matching the backend contract exactly — see
156
+ `session_inventory_contract.py`'s docstring on the backend): the
157
+ backend's shared `@require_org_access` decorator scans request bodies
158
+ for several org-identity key spellings, including ``org_uuid``, and
159
+ compares them CASE-SENSITIVELY against the authenticated org before its
160
+ own controller ever runs. Sending this org claim under a name the
161
+ decorator doesn't recognize avoids that mismatch entirely.
162
+
163
+ Args:
164
+ tz: see `group_by_day`/`_local_date` — `None` (production default)
165
+ means the system's own local timezone.
166
+ """
167
+ grouped = group_by_day(discovered, tz=tz)
168
+ emitted_at = datetime.now(UTC).isoformat()
169
+ return [
170
+ {
171
+ "inventory_version": INVENTORY_SCHEMA_VERSION,
172
+ "reported_org_uuid": org_uuid,
173
+ "date": day,
174
+ "emitted_at": emitted_at,
175
+ "cli_version": client_version or "unknown",
176
+ "sessions": sessions,
177
+ }
178
+ for day, sessions in grouped.items()
179
+ ]
180
+
181
+
182
+ def push_session_inventories(api_client, org_uuid: str, inventories: list[dict[str, Any]]) -> int:
183
+ """Best-effort push, one calendar day's statement per call, never raising.
184
+
185
+ Independent of every other push (structured, facts envelope) — a
186
+ failure here must never affect them, matching `facts_envelope.
187
+ push_envelopes`'s own dual-write isolation.
188
+
189
+ Returns:
190
+ How many day-statements the backend actually stored. A call whose
191
+ response carries an `Error`, or that raises, contributes 0 — a
192
+ missing day simply gets resent whole on the next sync (this is an
193
+ idempotent overwrite, not an append, so resending costs nothing).
194
+ """
195
+ sent = 0
196
+ for inventory in inventories:
197
+ try:
198
+ resp = api_client.ingest_session_inventory(org_uuid, inventory)
199
+ if isinstance(resp, dict) and resp.get("Error"):
200
+ logger.debug("[SessionInventory] push failed: %s", resp["Error"])
201
+ continue
202
+ if isinstance(resp, dict) and resp.get("success", True):
203
+ sent += 1
204
+ except Exception: # noqa: BLE001 — dual-write must never break a sync
205
+ logger.debug("[SessionInventory] push raised", exc_info=True)
206
+ return sent