holmesgpt 0.13.1__tar.gz → 0.13.3a0__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.

Potentially problematic release.


This version of holmesgpt might be problematic. Click here for more details.

Files changed (235) hide show
  1. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/PKG-INFO +3 -2
  2. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/__init__.py +1 -1
  3. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/common/env_vars.py +7 -0
  4. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/config.py +3 -1
  5. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/conversations.py +0 -11
  6. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/investigation.py +0 -6
  7. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/llm.py +60 -1
  8. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/prompt.py +0 -2
  9. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/supabase_dal.py +2 -2
  10. holmesgpt-0.13.3a0/holmes/core/todo_tasks_formatter.py +51 -0
  11. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/tool_calling_llm.py +166 -91
  12. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/tools.py +20 -4
  13. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/interactive.py +63 -2
  14. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/main.py +0 -1
  15. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/prompts/_general_instructions.jinja2 +3 -1
  16. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/prompts/investigation_procedure.jinja2 +3 -13
  17. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/__init__.py +5 -1
  18. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/argocd.yaml +1 -1
  19. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/atlas_mongodb/mongodb_atlas.py +18 -6
  20. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/aws.yaml +9 -5
  21. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/tools/analyze_connection_failures.py +3 -1
  22. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/tools/analyze_database_connections.py +3 -1
  23. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/tools/analyze_database_health_status.py +3 -1
  24. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/tools/analyze_database_performance.py +3 -1
  25. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/tools/analyze_database_storage.py +3 -1
  26. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/tools/get_active_alerts.py +3 -1
  27. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/tools/get_slow_queries.py +3 -1
  28. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/tools/get_top_cpu_queries.py +3 -1
  29. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/tools/get_top_data_io_queries.py +3 -1
  30. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/tools/get_top_log_io_queries.py +3 -1
  31. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/bash_toolset.py +31 -20
  32. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/confluence.yaml +1 -1
  33. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/coralogix/api.py +3 -1
  34. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/coralogix/toolset_coralogix_logs.py +4 -4
  35. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/coralogix/utils.py +41 -14
  36. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/datadog/datadog_api.py +45 -2
  37. holmesgpt-0.13.3a0/holmes/plugins/toolsets/datadog/datadog_general_instructions.jinja2 +208 -0
  38. holmesgpt-0.13.3a0/holmes/plugins/toolsets/datadog/datadog_logs_instructions.jinja2 +43 -0
  39. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/datadog/datadog_metrics_instructions.jinja2 +12 -9
  40. holmesgpt-0.13.3a0/holmes/plugins/toolsets/datadog/toolset_datadog_general.py +722 -0
  41. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/datadog/toolset_datadog_logs.py +17 -6
  42. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/datadog/toolset_datadog_metrics.py +15 -7
  43. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/datadog/toolset_datadog_rds.py +6 -2
  44. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/datadog/toolset_datadog_traces.py +9 -3
  45. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/docker.yaml +1 -1
  46. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/git.py +15 -5
  47. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/grafana/toolset_grafana.py +25 -4
  48. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/grafana/toolset_grafana_loki.py +4 -4
  49. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/grafana/toolset_grafana_tempo.jinja2 +5 -3
  50. holmesgpt-0.13.3a0/holmes/plugins/toolsets/grafana/toolset_grafana_tempo.py +573 -0
  51. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/helm.yaml +1 -1
  52. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/internet/internet.py +4 -2
  53. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/internet/notion.py +4 -2
  54. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/investigator/core_investigation.py +5 -17
  55. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/investigator/investigator_instructions.jinja2 +1 -5
  56. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/kafka.py +19 -7
  57. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/kubernetes.yaml +5 -5
  58. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/kubernetes_logs.py +4 -4
  59. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/kubernetes_logs.yaml +1 -1
  60. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/logging_utils/logging_api.py +15 -2
  61. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/mcp/toolset_mcp.py +3 -1
  62. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/newrelic.py +8 -4
  63. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/opensearch/opensearch.py +13 -5
  64. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/opensearch/opensearch_logs.py +4 -4
  65. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/opensearch/opensearch_traces.py +9 -6
  66. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/prometheus/prometheus.py +193 -82
  67. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/rabbitmq/toolset_rabbitmq.py +7 -3
  68. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/robusta/robusta.py +10 -4
  69. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/runbook/runbook_fetcher.py +4 -2
  70. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/servicenow/servicenow.py +9 -3
  71. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/slab.yaml +1 -1
  72. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/pyproject.toml +5 -3
  73. holmesgpt-0.13.1/holmes/core/todo_manager.py +0 -88
  74. holmesgpt-0.13.1/holmes/plugins/toolsets/grafana/toolset_grafana_tempo.py +0 -306
  75. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/LICENSE.txt +0 -0
  76. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/README.md +0 -0
  77. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/.git_archival.json +0 -0
  78. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/clients/robusta_client.py +0 -0
  79. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/common/openshift.py +0 -0
  80. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/__init__.py +0 -0
  81. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/config.py +0 -0
  82. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/investigation_structured_output.py +0 -0
  83. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/issue.py +0 -0
  84. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/models.py +0 -0
  85. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/openai_formatting.py +0 -0
  86. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/performance_timing.py +0 -0
  87. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/resource_instruction.py +0 -0
  88. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/runbooks.py +0 -0
  89. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/safeguards.py +0 -0
  90. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/tools_utils/__init__.py +0 -0
  91. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/tools_utils/tool_executor.py +0 -0
  92. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/tools_utils/toolset_utils.py +0 -0
  93. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/toolset_manager.py +0 -0
  94. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/core/tracing.py +0 -0
  95. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/__init__.py +0 -0
  96. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/destinations/__init__.py +0 -0
  97. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/destinations/slack/__init__.py +0 -0
  98. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/destinations/slack/plugin.py +0 -0
  99. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/interfaces.py +0 -0
  100. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/prompts/__init__.py +0 -0
  101. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/prompts/_ai_safety.jinja2 +0 -0
  102. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/prompts/_current_date_time.jinja2 +0 -0
  103. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/prompts/_default_log_prompt.jinja2 +0 -0
  104. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/prompts/_fetch_logs.jinja2 +0 -0
  105. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/prompts/_global_instructions.jinja2 +0 -0
  106. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/prompts/_permission_errors.jinja2 +0 -0
  107. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/prompts/_runbook_instructions.jinja2 +0 -0
  108. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/prompts/_toolsets_instructions.jinja2 +0 -0
  109. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/prompts/generic_ask.jinja2 +0 -0
  110. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/prompts/generic_ask_conversation.jinja2 +0 -0
  111. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/prompts/generic_ask_for_issue_conversation.jinja2 +0 -0
  112. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/prompts/generic_investigation.jinja2 +0 -0
  113. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/prompts/generic_post_processing.jinja2 +0 -0
  114. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/prompts/generic_ticket.jinja2 +0 -0
  115. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/prompts/investigation_output_format.jinja2 +0 -0
  116. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/prompts/kubernetes_workload_ask.jinja2 +0 -0
  117. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/prompts/kubernetes_workload_chat.jinja2 +0 -0
  118. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/runbooks/CLAUDE.md +0 -0
  119. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/runbooks/README.md +0 -0
  120. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/runbooks/__init__.py +0 -0
  121. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/runbooks/catalog.json +0 -0
  122. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/runbooks/jira.yaml +0 -0
  123. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/runbooks/kube-prometheus-stack.yaml +0 -0
  124. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/runbooks/networking/dns_troubleshooting_instructions.md +0 -0
  125. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/runbooks/upgrade/upgrade_troubleshooting_instructions.md +0 -0
  126. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/sources/github/__init__.py +0 -0
  127. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/sources/jira/__init__.py +0 -0
  128. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/sources/opsgenie/__init__.py +0 -0
  129. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/sources/pagerduty/__init__.py +0 -0
  130. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/sources/prometheus/__init__.py +0 -0
  131. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/sources/prometheus/models.py +0 -0
  132. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/sources/prometheus/plugin.py +0 -0
  133. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/aks-node-health.yaml +0 -0
  134. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/aks.yaml +0 -0
  135. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/atlas_mongodb/instructions.jinja2 +0 -0
  136. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/__init__.py +0 -0
  137. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/apis/alert_monitoring_api.py +0 -0
  138. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/apis/azure_sql_api.py +0 -0
  139. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/apis/connection_failure_api.py +0 -0
  140. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/apis/connection_monitoring_api.py +0 -0
  141. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/apis/storage_analysis_api.py +0 -0
  142. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/azure_base_toolset.py +0 -0
  143. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/azure_sql_instructions.jinja2 +0 -0
  144. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/azure_sql_toolset.py +0 -0
  145. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/install.md +0 -0
  146. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/tools/__init__.py +0 -0
  147. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/azure_sql/utils.py +0 -0
  148. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/__init__.py +0 -0
  149. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/argocd/__init__.py +0 -0
  150. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/argocd/constants.py +0 -0
  151. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/aws/__init__.py +0 -0
  152. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/aws/constants.py +0 -0
  153. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/azure/__init__.py +0 -0
  154. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/azure/constants.py +0 -0
  155. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/bash_instructions.jinja2 +0 -0
  156. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/common/bash.py +0 -0
  157. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/common/bash_command.py +0 -0
  158. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/common/config.py +0 -0
  159. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/common/stringify.py +0 -0
  160. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/common/validators.py +0 -0
  161. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/docker/__init__.py +0 -0
  162. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/docker/constants.py +0 -0
  163. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/helm/__init__.py +0 -0
  164. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/helm/constants.py +0 -0
  165. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/kubectl/__init__.py +0 -0
  166. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/kubectl/constants.py +0 -0
  167. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/kubectl/kubectl_describe.py +0 -0
  168. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/kubectl/kubectl_events.py +0 -0
  169. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/kubectl/kubectl_get.py +0 -0
  170. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/kubectl/kubectl_logs.py +0 -0
  171. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/kubectl/kubectl_run.py +0 -0
  172. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/kubectl/kubectl_top.py +0 -0
  173. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/parse_command.py +0 -0
  174. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/utilities/__init__.py +0 -0
  175. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/utilities/base64_util.py +0 -0
  176. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/utilities/cut.py +0 -0
  177. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/utilities/grep/__init__.py +0 -0
  178. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/utilities/head.py +0 -0
  179. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/utilities/jq.py +0 -0
  180. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/utilities/sed.py +0 -0
  181. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/utilities/sort.py +0 -0
  182. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/utilities/tail.py +0 -0
  183. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/utilities/tr.py +0 -0
  184. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/utilities/uniq.py +0 -0
  185. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/bash/utilities/wc.py +0 -0
  186. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/consts.py +0 -0
  187. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/datadog/datadog_rds_instructions.jinja2 +0 -0
  188. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/datadog/datadog_traces_formatter.py +0 -0
  189. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/datadog/instructions_datadog_traces.jinja2 +0 -0
  190. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/grafana/__init__.py +0 -0
  191. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/grafana/base_grafana_toolset.py +0 -0
  192. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/grafana/common.py +0 -0
  193. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/grafana/grafana_api.py +0 -0
  194. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/grafana/loki_api.py +0 -0
  195. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/grafana/tempo_api.py +0 -0
  196. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/grafana/trace_parser.py +0 -0
  197. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/investigator/__init__.py +0 -0
  198. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/investigator/model.py +0 -0
  199. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/logging_utils/__init__.py +0 -0
  200. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/logging_utils/types.py +0 -0
  201. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/opensearch/__init__.py +0 -0
  202. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/opensearch/opensearch_traces_instructions.jinja2 +0 -0
  203. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/opensearch/opensearch_utils.py +0 -0
  204. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/prometheus/prometheus_instructions.jinja2 +0 -0
  205. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/rabbitmq/api.py +0 -0
  206. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/rabbitmq/rabbitmq_instructions.jinja2 +0 -0
  207. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/robusta/__init__.py +0 -0
  208. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/robusta/robusta_instructions.jinja2 +0 -0
  209. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/runbook/__init__.py +0 -0
  210. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/service_discovery.py +0 -0
  211. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/servicenow/install.md +0 -0
  212. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/servicenow/instructions.jinja2 +0 -0
  213. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/toolsets/utils.py +0 -0
  214. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/plugins/utils.py +0 -0
  215. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/utils/__init__.py +0 -0
  216. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/utils/cache.py +0 -0
  217. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/utils/cert_utils.py +0 -0
  218. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/utils/colors.py +0 -0
  219. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/utils/console/consts.py +0 -0
  220. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/utils/console/logging.py +0 -0
  221. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/utils/console/result.py +0 -0
  222. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/utils/default_toolset_installation_guide.jinja2 +0 -0
  223. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/utils/definitions.py +0 -0
  224. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/utils/env.py +0 -0
  225. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/utils/file_utils.py +0 -0
  226. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/utils/global_instructions.py +0 -0
  227. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/utils/holmes_status.py +0 -0
  228. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/utils/holmes_sync_toolsets.py +0 -0
  229. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/utils/keygen_utils.py +0 -0
  230. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/utils/llms.py +0 -0
  231. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/utils/markdown_utils.py +0 -0
  232. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/utils/pydantic_utils.py +0 -0
  233. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/utils/stream.py +0 -0
  234. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/utils/tags.py +0 -0
  235. {holmesgpt-0.13.1 → holmesgpt-0.13.3a0}/holmes/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: holmesgpt
3
- Version: 0.13.1
3
+ Version: 0.13.3a0
4
4
  Summary:
5
5
  Author: Natan Yellin
6
6
  Author-email: natan@robusta.dev
@@ -35,6 +35,7 @@ Requires-Dist: mcp (==v1.12.2)
35
35
  Requires-Dist: openai (>=1.6.1,<1.100.0)
36
36
  Requires-Dist: opensearch-py (>=2.8.0,<3.0.0)
37
37
  Requires-Dist: postgrest (==0.16.8)
38
+ Requires-Dist: prometrix (==0.2.3)
38
39
  Requires-Dist: prompt-toolkit (>=3.0.51,<4.0.0)
39
40
  Requires-Dist: protobuf (>=6.31.1)
40
41
  Requires-Dist: pydantic (>=2.7,<3.0)
@@ -50,7 +51,7 @@ Requires-Dist: requests (>=2.32.4,<3.0.0)
50
51
  Requires-Dist: requests-aws4auth (>=1.3.1,<2.0.0)
51
52
  Requires-Dist: rich (>=13.7.1,<14.0.0)
52
53
  Requires-Dist: sentry-sdk[fastapi] (>=2.20.0,<3.0.0)
53
- Requires-Dist: setuptools (==70.0.0)
54
+ Requires-Dist: setuptools (>=80.9.0,<81.0.0)
54
55
  Requires-Dist: slack-bolt (>=1.18.1,<2.0.0)
55
56
  Requires-Dist: starlette (==0.47.2)
56
57
  Requires-Dist: strenum (>=0.4.15,<0.5.0)
@@ -1,5 +1,5 @@
1
1
  # This is patched by github actions during release
2
- __version__ = "0.13.1"
2
+ __version__ = "0.13.3-alpha"
3
3
 
4
4
  # Re-export version functions from version module for backward compatibility
5
5
  from .version import (
@@ -67,3 +67,10 @@ MAX_OUTPUT_TOKEN_RESERVATION = int(
67
67
 
68
68
  # When using the bash tool, setting BASH_TOOL_UNSAFE_ALLOW_ALL will skip any command validation and run any command requested by the LLM
69
69
  BASH_TOOL_UNSAFE_ALLOW_ALL = load_bool("BASH_TOOL_UNSAFE_ALLOW_ALL", False)
70
+
71
+ LOG_LLM_USAGE_RESPONSE = load_bool("LOG_LLM_USAGE_RESPONSE", False)
72
+
73
+ # For CLI only, enable user approval for potentially sensitive commands that would otherwise be rejected
74
+ ENABLE_CLI_TOOL_APPROVAL = load_bool("ENABLE_CLI_TOOL_APPROVAL", True)
75
+
76
+ MAX_GRAPH_POINTS = float(os.environ.get("MAX_GRAPH_POINTS", 300))
@@ -527,7 +527,9 @@ class Config(RobustaBaseConfig):
527
527
  if model_key
528
528
  else next(iter(self._model_list.values())).copy()
529
529
  )
530
- if model_params.get("is_robusta_model") and self.api_key:
530
+ is_robusta_model = model_params.pop("is_robusta_model", False)
531
+ if is_robusta_model and self.api_key:
532
+ # we set here the api_key since it is being refresh when exprided and not as part of the model loading.
531
533
  api_key = self.api_key.get_secret_value()
532
534
  else:
533
535
  api_key = model_params.pop("api_key", api_key)
@@ -133,7 +133,6 @@ def build_issue_chat_messages(
133
133
  "issue": issue_chat_request.issue_type,
134
134
  "toolsets": ai.tool_executor.toolsets,
135
135
  "cluster_name": config.cluster_name,
136
- "investigation_id": ai.investigation_id,
137
136
  },
138
137
  )
139
138
  messages = [
@@ -154,7 +153,6 @@ def build_issue_chat_messages(
154
153
  "issue": issue_chat_request.issue_type,
155
154
  "toolsets": ai.tool_executor.toolsets,
156
155
  "cluster_name": config.cluster_name,
157
- "investigation_id": ai.investigation_id,
158
156
  }
159
157
  system_prompt_without_tools = load_and_render_prompt(
160
158
  template_path, template_context_without_tools
@@ -188,7 +186,6 @@ def build_issue_chat_messages(
188
186
  "issue": issue_chat_request.issue_type,
189
187
  "toolsets": ai.tool_executor.toolsets,
190
188
  "cluster_name": config.cluster_name,
191
- "investigation_id": ai.investigation_id,
192
189
  }
193
190
  system_prompt_with_truncated_tools = load_and_render_prompt(
194
191
  template_path, truncated_template_context
@@ -230,7 +227,6 @@ def build_issue_chat_messages(
230
227
  "issue": issue_chat_request.issue_type,
231
228
  "toolsets": ai.tool_executor.toolsets,
232
229
  "cluster_name": config.cluster_name,
233
- "investigation_id": ai.investigation_id,
234
230
  }
235
231
  system_prompt_without_tools = load_and_render_prompt(
236
232
  template_path, template_context_without_tools
@@ -254,7 +250,6 @@ def build_issue_chat_messages(
254
250
  "issue": issue_chat_request.issue_type,
255
251
  "toolsets": ai.tool_executor.toolsets,
256
252
  "cluster_name": config.cluster_name,
257
- "investigation_id": ai.investigation_id,
258
253
  }
259
254
  system_prompt_with_truncated_tools = load_and_render_prompt(
260
255
  template_path, template_context
@@ -279,7 +274,6 @@ def add_or_update_system_prompt(
279
274
  context = {
280
275
  "toolsets": ai.tool_executor.toolsets,
281
276
  "cluster_name": config.cluster_name,
282
- "investigation_id": ai.investigation_id,
283
277
  }
284
278
 
285
279
  system_prompt = load_and_render_prompt(template_path, context)
@@ -471,7 +465,6 @@ def build_workload_health_chat_messages(
471
465
  "resource": resource,
472
466
  "toolsets": ai.tool_executor.toolsets,
473
467
  "cluster_name": config.cluster_name,
474
- "investigation_id": ai.investigation_id,
475
468
  },
476
469
  )
477
470
  messages = [
@@ -492,7 +485,6 @@ def build_workload_health_chat_messages(
492
485
  "resource": resource,
493
486
  "toolsets": ai.tool_executor.toolsets,
494
487
  "cluster_name": config.cluster_name,
495
- "investigation_id": ai.investigation_id,
496
488
  }
497
489
  system_prompt_without_tools = load_and_render_prompt(
498
490
  template_path, template_context_without_tools
@@ -526,7 +518,6 @@ def build_workload_health_chat_messages(
526
518
  "resource": resource,
527
519
  "toolsets": ai.tool_executor.toolsets,
528
520
  "cluster_name": config.cluster_name,
529
- "investigation_id": ai.investigation_id,
530
521
  }
531
522
  system_prompt_with_truncated_tools = load_and_render_prompt(
532
523
  template_path, truncated_template_context
@@ -568,7 +559,6 @@ def build_workload_health_chat_messages(
568
559
  "resource": resource,
569
560
  "toolsets": ai.tool_executor.toolsets,
570
561
  "cluster_name": config.cluster_name,
571
- "investigation_id": ai.investigation_id,
572
562
  }
573
563
  system_prompt_without_tools = load_and_render_prompt(
574
564
  template_path, template_context_without_tools
@@ -592,7 +582,6 @@ def build_workload_health_chat_messages(
592
582
  "resource": resource,
593
583
  "toolsets": ai.tool_executor.toolsets,
594
584
  "cluster_name": config.cluster_name,
595
- "investigation_id": ai.investigation_id,
596
585
  }
597
586
  system_prompt_with_truncated_tools = load_and_render_prompt(
598
587
  template_path, template_context
@@ -9,7 +9,6 @@ from holmes.core.models import InvestigateRequest, InvestigationResult
9
9
  from holmes.core.supabase_dal import SupabaseDal
10
10
  from holmes.core.tracing import DummySpan, SpanType
11
11
  from holmes.utils.global_instructions import add_global_instructions_to_user_prompt
12
- from holmes.core.todo_manager import get_todo_manager
13
12
 
14
13
  from holmes.core.investigation_structured_output import (
15
14
  DEFAULT_SECTIONS,
@@ -133,9 +132,6 @@ def get_investigation_context(
133
132
  else:
134
133
  logging.info("Structured output is disabled for this request")
135
134
 
136
- todo_manager = get_todo_manager()
137
- todo_context = todo_manager.format_tasks_for_prompt(ai.investigation_id)
138
-
139
135
  system_prompt = load_and_render_prompt(
140
136
  investigate_request.prompt_template,
141
137
  {
@@ -144,8 +140,6 @@ def get_investigation_context(
144
140
  "structured_output": request_structured_output_from_llm,
145
141
  "toolsets": ai.tool_executor.toolsets,
146
142
  "cluster_name": config.cluster_name,
147
- "todo_list": todo_context,
148
- "investigation_id": ai.investigation_id,
149
143
  },
150
144
  )
151
145
 
@@ -229,9 +229,11 @@ class DefaultLLM(LLM):
229
229
  ] # can be removed after next litelm version
230
230
 
231
231
  self.args.setdefault("temperature", temperature)
232
+
233
+ self._add_cache_control_to_last_message(messages)
234
+
232
235
  # Get the litellm module to use (wrapped or unwrapped)
233
236
  litellm_to_use = self.tracer.wrap_llm(litellm) if self.tracer else litellm
234
-
235
237
  result = litellm_to_use.completion(
236
238
  model=self.model,
237
239
  api_key=self.api_key,
@@ -266,3 +268,60 @@ class DefaultLLM(LLM):
266
268
  f"Couldn't find model's name {model_name} in litellm's model list, fallback to 4096 tokens for max_output_tokens"
267
269
  )
268
270
  return 4096
271
+
272
+ def _add_cache_control_to_last_message(
273
+ self, messages: List[Dict[str, Any]]
274
+ ) -> None:
275
+ """
276
+ Add cache_control to the last non-user message for Anthropic prompt caching.
277
+ Removes any existing cache_control from previous messages to avoid accumulation.
278
+ """
279
+ # First, remove any existing cache_control from all messages
280
+ for msg in messages:
281
+ content = msg.get("content")
282
+ if isinstance(content, list):
283
+ for block in content:
284
+ if isinstance(block, dict) and "cache_control" in block:
285
+ del block["cache_control"]
286
+ logging.debug(
287
+ f"Removed existing cache_control from {msg.get('role')} message"
288
+ )
289
+
290
+ # Find the last non-user message to add cache_control to.
291
+ # Adding cache_control to user message requires changing its structure, so we avoid it
292
+ # This avoids breaking parse_messages_tags which only processes user messages
293
+ target_msg = None
294
+ for msg in reversed(messages):
295
+ if msg.get("role") != "user":
296
+ target_msg = msg
297
+ break
298
+
299
+ if not target_msg:
300
+ logging.debug("No non-user message found for cache_control")
301
+ return
302
+
303
+ content = target_msg.get("content")
304
+
305
+ if content is None:
306
+ return
307
+
308
+ if isinstance(content, str):
309
+ # Convert string to structured format with cache_control
310
+ target_msg["content"] = [
311
+ {
312
+ "type": "text",
313
+ "text": content,
314
+ "cache_control": {"type": "ephemeral"},
315
+ }
316
+ ]
317
+ logging.debug(
318
+ f"Added cache_control to {target_msg.get('role')} message (converted from string)"
319
+ )
320
+ elif isinstance(content, list) and content:
321
+ # Add cache_control to the last content block
322
+ last_block = content[-1]
323
+ if isinstance(last_block, dict) and "type" in last_block:
324
+ last_block["cache_control"] = {"type": "ephemeral"}
325
+ logging.debug(
326
+ f"Added cache_control to {target_msg.get('role')} message (structured content)"
327
+ )
@@ -40,7 +40,6 @@ def build_initial_ask_messages(
40
40
  initial_user_prompt: str,
41
41
  file_paths: Optional[List[Path]],
42
42
  tool_executor: Any, # ToolExecutor type
43
- investigation_id: str,
44
43
  runbooks: Union[RunbookCatalog, Dict, None] = None,
45
44
  system_prompt_additions: Optional[str] = None,
46
45
  ) -> List[Dict]:
@@ -60,7 +59,6 @@ def build_initial_ask_messages(
60
59
  "toolsets": tool_executor.toolsets,
61
60
  "runbooks": runbooks or {},
62
61
  "system_prompt_additions": system_prompt_additions or "",
63
- "investigation_id": investigation_id,
64
62
  }
65
63
  system_prompt_rendered = load_and_render_prompt(
66
64
  system_prompt_template, template_context
@@ -131,7 +131,7 @@ class SupabaseDal:
131
131
  raise Exception(
132
132
  "No robusta token provided to Holmes.\n"
133
133
  "Please set a valid Robusta UI token.\n "
134
- "See https://docs.robusta.dev/master/configuration/ai-analysis.html#choosing-and-configuring-an-ai-provider for instructions."
134
+ "See https://holmesgpt.dev/ai-providers/ for instructions."
135
135
  )
136
136
  env_replacement_token = get_env_replacement(token)
137
137
  if env_replacement_token:
@@ -143,7 +143,7 @@ class SupabaseDal:
143
143
  "Ensure your Helm chart or environment variables are set correctly.\n "
144
144
  "If you store the token in a secret, you must also pass "
145
145
  "the environment variable ROBUSTA_UI_TOKEN to Holmes.\n "
146
- "See https://docs.robusta.dev/master/configuration/ai-analysis.html#configuring-holmesgpt-access-to-saas-data for instructions."
146
+ "See https://holmesgpt.dev/data-sources/builtin-toolsets/robusta/ for instructions."
147
147
  )
148
148
  try:
149
149
  decoded = base64.b64decode(token)
@@ -0,0 +1,51 @@
1
+ from typing import List
2
+
3
+ from holmes.plugins.toolsets.investigator.model import Task, TaskStatus
4
+
5
+
6
+ def format_tasks(tasks: List[Task]) -> str:
7
+ """
8
+ Format tasks for tool response
9
+ Returns empty string if no tasks exist.
10
+ """
11
+ if not tasks:
12
+ return ""
13
+
14
+ status_order = {
15
+ TaskStatus.PENDING: 0,
16
+ TaskStatus.IN_PROGRESS: 1,
17
+ TaskStatus.COMPLETED: 2,
18
+ }
19
+
20
+ sorted_tasks = sorted(
21
+ tasks,
22
+ key=lambda t: (status_order.get(t.status, 3),),
23
+ )
24
+
25
+ lines = ["# CURRENT INVESTIGATION TASKS"]
26
+ lines.append("")
27
+
28
+ pending_count = sum(1 for t in tasks if t.status == TaskStatus.PENDING)
29
+ progress_count = sum(1 for t in tasks if t.status == TaskStatus.IN_PROGRESS)
30
+ completed_count = sum(1 for t in tasks if t.status == TaskStatus.COMPLETED)
31
+
32
+ lines.append(
33
+ f"**Task Status**: {completed_count} completed, {progress_count} in progress, {pending_count} pending"
34
+ )
35
+ lines.append("")
36
+
37
+ for task in sorted_tasks:
38
+ status_indicator = {
39
+ TaskStatus.PENDING: "[ ]",
40
+ TaskStatus.IN_PROGRESS: "[~]",
41
+ TaskStatus.COMPLETED: "[✓]",
42
+ }.get(task.status, "[?]")
43
+
44
+ lines.append(f"{status_indicator} [{task.id}] {task.content}")
45
+
46
+ lines.append("")
47
+ lines.append(
48
+ "**Instructions**: Use TodoWrite tool to update task status as you work. Mark tasks as 'in_progress' when starting, 'completed' when finished."
49
+ )
50
+
51
+ return "\n".join(lines)