grinta 1.0.0__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 (1226) hide show
  1. grinta-1.0.0/.gitignore +81 -0
  2. grinta-1.0.0/CHANGELOG.md +304 -0
  3. grinta-1.0.0/CITATION.cff +12 -0
  4. grinta-1.0.0/CODE_OF_CONDUCT.md +47 -0
  5. grinta-1.0.0/CONTRIBUTING.md +223 -0
  6. grinta-1.0.0/GOVERNANCE.md +30 -0
  7. grinta-1.0.0/LICENSE +24 -0
  8. grinta-1.0.0/MANIFEST.in +5 -0
  9. grinta-1.0.0/PKG-INFO +197 -0
  10. grinta-1.0.0/README.md +117 -0
  11. grinta-1.0.0/SECURITY.md +139 -0
  12. grinta-1.0.0/SHOWCASE.md +12 -0
  13. grinta-1.0.0/SUPPORT.md +33 -0
  14. grinta-1.0.0/backend/README.md +83 -0
  15. grinta-1.0.0/backend/README_GRINTA.md +9 -0
  16. grinta-1.0.0/backend/__init__.py +103 -0
  17. grinta-1.0.0/backend/_canonical.py +67 -0
  18. grinta-1.0.0/backend/app/__init__.py +36 -0
  19. grinta-1.0.0/backend/app/agent_control_loop.py +223 -0
  20. grinta-1.0.0/backend/app/main.py +707 -0
  21. grinta-1.0.0/backend/app/setup.py +573 -0
  22. grinta-1.0.0/backend/cli/__init__.py +8 -0
  23. grinta-1.0.0/backend/cli/_typing.py +115 -0
  24. grinta-1.0.0/backend/cli/display/__init__.py +1 -0
  25. grinta-1.0.0/backend/cli/display/diff_renderer.py +437 -0
  26. grinta-1.0.0/backend/cli/display/hud.py +680 -0
  27. grinta-1.0.0/backend/cli/display/layout_tokens.py +98 -0
  28. grinta-1.0.0/backend/cli/display/notifications.py +137 -0
  29. grinta-1.0.0/backend/cli/display/path_links.py +114 -0
  30. grinta-1.0.0/backend/cli/display/reasoning_display.py +379 -0
  31. grinta-1.0.0/backend/cli/display/status_chrome.py +643 -0
  32. grinta-1.0.0/backend/cli/display/text_truncation.py +86 -0
  33. grinta-1.0.0/backend/cli/display/tool_call_display.py +68 -0
  34. grinta-1.0.0/backend/cli/display/transcript.py +454 -0
  35. grinta-1.0.0/backend/cli/doctor/__init__.py +5 -0
  36. grinta-1.0.0/backend/cli/doctor/checks.py +561 -0
  37. grinta-1.0.0/backend/cli/doctor/doctor_cli.py +129 -0
  38. grinta-1.0.0/backend/cli/entry.py +420 -0
  39. grinta-1.0.0/backend/cli/event_renderer.py +244 -0
  40. grinta-1.0.0/backend/cli/event_rendering/__init__.py +9 -0
  41. grinta-1.0.0/backend/cli/event_rendering/actions/__init__.py +30 -0
  42. grinta-1.0.0/backend/cli/event_rendering/actions/browser.py +78 -0
  43. grinta-1.0.0/backend/cli/event_rendering/actions/dispatch.py +223 -0
  44. grinta-1.0.0/backend/cli/event_rendering/actions/exploration.py +53 -0
  45. grinta-1.0.0/backend/cli/event_rendering/actions/file.py +88 -0
  46. grinta-1.0.0/backend/cli/event_rendering/actions/mcp.py +62 -0
  47. grinta-1.0.0/backend/cli/event_rendering/actions/message.py +219 -0
  48. grinta-1.0.0/backend/cli/event_rendering/actions/meta.py +71 -0
  49. grinta-1.0.0/backend/cli/event_rendering/actions/shell.py +66 -0
  50. grinta-1.0.0/backend/cli/event_rendering/actions/terminal.py +134 -0
  51. grinta-1.0.0/backend/cli/event_rendering/activity_mixin.py +253 -0
  52. grinta-1.0.0/backend/cli/event_rendering/constants.py +169 -0
  53. grinta-1.0.0/backend/cli/event_rendering/delegate.py +312 -0
  54. grinta-1.0.0/backend/cli/event_rendering/error_categories/__init__.py +132 -0
  55. grinta-1.0.0/backend/cli/event_rendering/error_categories/auth_errors.py +55 -0
  56. grinta-1.0.0/backend/cli/event_rendering/error_categories/browser_errors.py +36 -0
  57. grinta-1.0.0/backend/cli/event_rendering/error_categories/matchers.py +76 -0
  58. grinta-1.0.0/backend/cli/event_rendering/error_categories/model_errors.py +61 -0
  59. grinta-1.0.0/backend/cli/event_rendering/error_categories/network_errors.py +40 -0
  60. grinta-1.0.0/backend/cli/event_rendering/error_categories/rate_limit_errors.py +59 -0
  61. grinta-1.0.0/backend/cli/event_rendering/error_categories/system_errors.py +189 -0
  62. grinta-1.0.0/backend/cli/event_rendering/error_categories/timeout_errors.py +59 -0
  63. grinta-1.0.0/backend/cli/event_rendering/error_panel.py +497 -0
  64. grinta-1.0.0/backend/cli/event_rendering/live_mixin.py +219 -0
  65. grinta-1.0.0/backend/cli/event_rendering/messages_mixin.py +283 -0
  66. grinta-1.0.0/backend/cli/event_rendering/observations/__init__.py +32 -0
  67. grinta-1.0.0/backend/cli/event_rendering/observations/dispatch.py +112 -0
  68. grinta-1.0.0/backend/cli/event_rendering/observations/error.py +118 -0
  69. grinta-1.0.0/backend/cli/event_rendering/observations/exploration.py +246 -0
  70. grinta-1.0.0/backend/cli/event_rendering/observations/file.py +68 -0
  71. grinta-1.0.0/backend/cli/event_rendering/observations/mcp.py +100 -0
  72. grinta-1.0.0/backend/cli/event_rendering/observations/misc.py +141 -0
  73. grinta-1.0.0/backend/cli/event_rendering/observations/shell.py +160 -0
  74. grinta-1.0.0/backend/cli/event_rendering/observations/shell_helpers.py +69 -0
  75. grinta-1.0.0/backend/cli/event_rendering/observations/status.py +247 -0
  76. grinta-1.0.0/backend/cli/event_rendering/observations/terminal.py +100 -0
  77. grinta-1.0.0/backend/cli/event_rendering/observations/think_browser.py +42 -0
  78. grinta-1.0.0/backend/cli/event_rendering/panels.py +385 -0
  79. grinta-1.0.0/backend/cli/event_rendering/panels_mixin.py +171 -0
  80. grinta-1.0.0/backend/cli/event_rendering/renderer_constants.py +28 -0
  81. grinta-1.0.0/backend/cli/event_rendering/sidebar.py +263 -0
  82. grinta-1.0.0/backend/cli/event_rendering/state_mixin.py +183 -0
  83. grinta-1.0.0/backend/cli/event_rendering/streaming_mixin.py +295 -0
  84. grinta-1.0.0/backend/cli/event_rendering/subscription_mixin.py +121 -0
  85. grinta-1.0.0/backend/cli/event_rendering/text_utils.py +287 -0
  86. grinta-1.0.0/backend/cli/event_rendering/unified_renderer/__init__.py +18 -0
  87. grinta-1.0.0/backend/cli/event_rendering/unified_renderer/mixins/__init__.py +1 -0
  88. grinta-1.0.0/backend/cli/event_rendering/unified_renderer/mixins/browser.py +72 -0
  89. grinta-1.0.0/backend/cli/event_rendering/unified_renderer/mixins/code.py +44 -0
  90. grinta-1.0.0/backend/cli/event_rendering/unified_renderer/mixins/delegate.py +56 -0
  91. grinta-1.0.0/backend/cli/event_rendering/unified_renderer/mixins/exploration.py +257 -0
  92. grinta-1.0.0/backend/cli/event_rendering/unified_renderer/mixins/file.py +108 -0
  93. grinta-1.0.0/backend/cli/event_rendering/unified_renderer/mixins/mcp.py +298 -0
  94. grinta-1.0.0/backend/cli/event_rendering/unified_renderer/mixins/shell.py +225 -0
  95. grinta-1.0.0/backend/cli/event_rendering/unified_renderer/mixins/status.py +72 -0
  96. grinta-1.0.0/backend/cli/event_rendering/unified_renderer/mixins/terminal.py +131 -0
  97. grinta-1.0.0/backend/cli/event_rendering/unified_renderer/renderer.py +29 -0
  98. grinta-1.0.0/backend/cli/event_rendering/unified_renderer/types.py +85 -0
  99. grinta-1.0.0/backend/cli/event_rendering/unified_renderer/utils.py +119 -0
  100. grinta-1.0.0/backend/cli/main.py +661 -0
  101. grinta-1.0.0/backend/cli/onboarding/__init__.py +19 -0
  102. grinta-1.0.0/backend/cli/onboarding/connection_check.py +125 -0
  103. grinta-1.0.0/backend/cli/onboarding/flow.py +304 -0
  104. grinta-1.0.0/backend/cli/onboarding/init_noninteractive.py +192 -0
  105. grinta-1.0.0/backend/cli/onboarding/init_wizard.py +633 -0
  106. grinta-1.0.0/backend/cli/onboarding/menu_prompts.py +77 -0
  107. grinta-1.0.0/backend/cli/onboarding/provider_presets.py +69 -0
  108. grinta-1.0.0/backend/cli/onboarding/settings_defaults.py +81 -0
  109. grinta-1.0.0/backend/cli/repl/__init__.py +12 -0
  110. grinta-1.0.0/backend/cli/repl/debug.py +11 -0
  111. grinta-1.0.0/backend/cli/repl/noninteractive.py +296 -0
  112. grinta-1.0.0/backend/cli/repl/run_helpers_dispatch.py +457 -0
  113. grinta-1.0.0/backend/cli/repl/slash_command_actions.py +450 -0
  114. grinta-1.0.0/backend/cli/repl/slash_command_checkpoint.py +191 -0
  115. grinta-1.0.0/backend/cli/repl/slash_command_diff.py +234 -0
  116. grinta-1.0.0/backend/cli/repl/slash_command_dispatch.py +128 -0
  117. grinta-1.0.0/backend/cli/repl/slash_command_registry.py +40 -0
  118. grinta-1.0.0/backend/cli/repl/slash_command_status.py +447 -0
  119. grinta-1.0.0/backend/cli/repl/slash_commands_mixin.py +339 -0
  120. grinta-1.0.0/backend/cli/repl/slash_registry_clipboard.py +53 -0
  121. grinta-1.0.0/backend/cli/repl/slash_registry_commands.py +350 -0
  122. grinta-1.0.0/backend/cli/repl/slash_registry_help.py +269 -0
  123. grinta-1.0.0/backend/cli/repl/slash_registry_models.py +36 -0
  124. grinta-1.0.0/backend/cli/repl/slash_registry_parsing.py +81 -0
  125. grinta-1.0.0/backend/cli/repl/slash_registry_prompt.py +188 -0
  126. grinta-1.0.0/backend/cli/repl/slash_registry_terminal.py +66 -0
  127. grinta-1.0.0/backend/cli/session/__init__.py +1 -0
  128. grinta-1.0.0/backend/cli/session/session_manager.py +697 -0
  129. grinta-1.0.0/backend/cli/session/sessions_cli.py +383 -0
  130. grinta-1.0.0/backend/cli/session/storage_cleanup.py +327 -0
  131. grinta-1.0.0/backend/cli/settings/__init__.py +93 -0
  132. grinta-1.0.0/backend/cli/settings/bootstrap_sync.py +39 -0
  133. grinta-1.0.0/backend/cli/settings/confirmation.py +248 -0
  134. grinta-1.0.0/backend/cli/settings/constants.py +52 -0
  135. grinta-1.0.0/backend/cli/settings/mcp.py +213 -0
  136. grinta-1.0.0/backend/cli/settings/mode_runtime.py +109 -0
  137. grinta-1.0.0/backend/cli/settings/query.py +535 -0
  138. grinta-1.0.0/backend/cli/settings/settings_tui.py +455 -0
  139. grinta-1.0.0/backend/cli/settings/storage.py +158 -0
  140. grinta-1.0.0/backend/cli/terminal_mouse.py +25 -0
  141. grinta-1.0.0/backend/cli/terminal_restore.py +183 -0
  142. grinta-1.0.0/backend/cli/terminal_sanitize.py +94 -0
  143. grinta-1.0.0/backend/cli/theme/__init__.py +470 -0
  144. grinta-1.0.0/backend/cli/theme/cards.py +82 -0
  145. grinta-1.0.0/backend/cli/theme/env.py +75 -0
  146. grinta-1.0.0/backend/cli/theme/navy.py +112 -0
  147. grinta-1.0.0/backend/cli/theme/presets.py +245 -0
  148. grinta-1.0.0/backend/cli/theme/spacing.py +31 -0
  149. grinta-1.0.0/backend/cli/theme/styles.py +148 -0
  150. grinta-1.0.0/backend/cli/theme/syntax_theme.py +268 -0
  151. grinta-1.0.0/backend/cli/theme/tokens.py +167 -0
  152. grinta-1.0.0/backend/cli/tool_display/__init__.py +5 -0
  153. grinta-1.0.0/backend/cli/tool_display/constants.py +115 -0
  154. grinta-1.0.0/backend/cli/tool_display/headline.py +209 -0
  155. grinta-1.0.0/backend/cli/tool_display/orient_tools.py +758 -0
  156. grinta-1.0.0/backend/cli/tool_display/preview.py +615 -0
  157. grinta-1.0.0/backend/cli/tool_display/redact.py +570 -0
  158. grinta-1.0.0/backend/cli/tool_display/renderers/__init__.py +89 -0
  159. grinta-1.0.0/backend/cli/tool_display/renderers/_syntax.py +41 -0
  160. grinta-1.0.0/backend/cli/tool_display/renderers/badge.py +110 -0
  161. grinta-1.0.0/backend/cli/tool_display/renderers/browser.py +68 -0
  162. grinta-1.0.0/backend/cli/tool_display/renderers/delegation.py +72 -0
  163. grinta-1.0.0/backend/cli/tool_display/renderers/file_editor.py +183 -0
  164. grinta-1.0.0/backend/cli/tool_display/renderers/lsp.py +41 -0
  165. grinta-1.0.0/backend/cli/tool_display/renderers/mcp.py +241 -0
  166. grinta-1.0.0/backend/cli/tool_display/renderers/memory.py +48 -0
  167. grinta-1.0.0/backend/cli/tool_display/renderers/output_parsers.py +447 -0
  168. grinta-1.0.0/backend/cli/tool_display/renderers/search.py +232 -0
  169. grinta-1.0.0/backend/cli/tool_display/renderers/shell.py +249 -0
  170. grinta-1.0.0/backend/cli/tool_display/renderers/tasks.py +98 -0
  171. grinta-1.0.0/backend/cli/tool_display/renderers/terminal.py +256 -0
  172. grinta-1.0.0/backend/cli/tool_display/renderers/think.py +105 -0
  173. grinta-1.0.0/backend/cli/tool_display/summarize.py +610 -0
  174. grinta-1.0.0/backend/cli/tui/__init__.py +1 -0
  175. grinta-1.0.0/backend/cli/tui/_a11y.py +45 -0
  176. grinta-1.0.0/backend/cli/tui/app.py +426 -0
  177. grinta-1.0.0/backend/cli/tui/constants.py +126 -0
  178. grinta-1.0.0/backend/cli/tui/dialogs/__init__.py +27 -0
  179. grinta-1.0.0/backend/cli/tui/dialogs/add_mcp.py +87 -0
  180. grinta-1.0.0/backend/cli/tui/dialogs/add_skill.py +115 -0
  181. grinta-1.0.0/backend/cli/tui/dialogs/confirm.py +251 -0
  182. grinta-1.0.0/backend/cli/tui/dialogs/help.py +63 -0
  183. grinta-1.0.0/backend/cli/tui/dialogs/manage_mcp.py +308 -0
  184. grinta-1.0.0/backend/cli/tui/dialogs/manage_skills.py +206 -0
  185. grinta-1.0.0/backend/cli/tui/dialogs/sessions.py +421 -0
  186. grinta-1.0.0/backend/cli/tui/dialogs/settings.py +562 -0
  187. grinta-1.0.0/backend/cli/tui/helpers.py +354 -0
  188. grinta-1.0.0/backend/cli/tui/image_attachments.py +323 -0
  189. grinta-1.0.0/backend/cli/tui/image_input_gate.py +35 -0
  190. grinta-1.0.0/backend/cli/tui/main.py +203 -0
  191. grinta-1.0.0/backend/cli/tui/renderer/README.md +44 -0
  192. grinta-1.0.0/backend/cli/tui/renderer/__init__.py +7 -0
  193. grinta-1.0.0/backend/cli/tui/renderer/classify.py +64 -0
  194. grinta-1.0.0/backend/cli/tui/renderer/diff.py +194 -0
  195. grinta-1.0.0/backend/cli/tui/renderer/drain.py +821 -0
  196. grinta-1.0.0/backend/cli/tui/renderer/event_helpers.py +65 -0
  197. grinta-1.0.0/backend/cli/tui/renderer/handlers/__init__.py +1 -0
  198. grinta-1.0.0/backend/cli/tui/renderer/handlers/acceptance_criteria.py +85 -0
  199. grinta-1.0.0/backend/cli/tui/renderer/handlers/browser.py +70 -0
  200. grinta-1.0.0/backend/cli/tui/renderer/handlers/compaction.py +88 -0
  201. grinta-1.0.0/backend/cli/tui/renderer/handlers/debugger.py +25 -0
  202. grinta-1.0.0/backend/cli/tui/renderer/handlers/delegate.py +122 -0
  203. grinta-1.0.0/backend/cli/tui/renderer/handlers/exploration.py +203 -0
  204. grinta-1.0.0/backend/cli/tui/renderer/handlers/fallback.py +81 -0
  205. grinta-1.0.0/backend/cli/tui/renderer/handlers/file.py +384 -0
  206. grinta-1.0.0/backend/cli/tui/renderer/handlers/mcp.py +92 -0
  207. grinta-1.0.0/backend/cli/tui/renderer/handlers/memory.py +133 -0
  208. grinta-1.0.0/backend/cli/tui/renderer/handlers/shell.py +58 -0
  209. grinta-1.0.0/backend/cli/tui/renderer/handlers/status.py +379 -0
  210. grinta-1.0.0/backend/cli/tui/renderer/handlers/task_state.py +33 -0
  211. grinta-1.0.0/backend/cli/tui/renderer/handlers/task_tracking.py +71 -0
  212. grinta-1.0.0/backend/cli/tui/renderer/handlers/terminal.py +142 -0
  213. grinta-1.0.0/backend/cli/tui/renderer/handlers/thinking.py +55 -0
  214. grinta-1.0.0/backend/cli/tui/renderer/helpers/__init__.py +1 -0
  215. grinta-1.0.0/backend/cli/tui/renderer/helpers/browser.py +39 -0
  216. grinta-1.0.0/backend/cli/tui/renderer/helpers/delegate.py +29 -0
  217. grinta-1.0.0/backend/cli/tui/renderer/helpers/exploration.py +115 -0
  218. grinta-1.0.0/backend/cli/tui/renderer/helpers/file.py +79 -0
  219. grinta-1.0.0/backend/cli/tui/renderer/helpers/mcp.py +21 -0
  220. grinta-1.0.0/backend/cli/tui/renderer/helpers/shell.py +37 -0
  221. grinta-1.0.0/backend/cli/tui/renderer/helpers/status.py +17 -0
  222. grinta-1.0.0/backend/cli/tui/renderer/helpers/terminal.py +22 -0
  223. grinta-1.0.0/backend/cli/tui/renderer/mixins/__init__.py +6 -0
  224. grinta-1.0.0/backend/cli/tui/renderer/mixins/action_handlers.py +435 -0
  225. grinta-1.0.0/backend/cli/tui/renderer/mixins/debugger.py +126 -0
  226. grinta-1.0.0/backend/cli/tui/renderer/mixins/display.py +864 -0
  227. grinta-1.0.0/backend/cli/tui/renderer/mixins/event_processor.py +109 -0
  228. grinta-1.0.0/backend/cli/tui/renderer/mixins/live.py +315 -0
  229. grinta-1.0.0/backend/cli/tui/renderer/mixins/terminal.py +362 -0
  230. grinta-1.0.0/backend/cli/tui/renderer/mixins/thinking.py +420 -0
  231. grinta-1.0.0/backend/cli/tui/renderer/prep.py +396 -0
  232. grinta-1.0.0/backend/cli/tui/renderer/processor.py +497 -0
  233. grinta-1.0.0/backend/cli/tui/renderer/step_draft.py +87 -0
  234. grinta-1.0.0/backend/cli/tui/screen/__init__.py +21 -0
  235. grinta-1.0.0/backend/cli/tui/screen/actions.py +214 -0
  236. grinta-1.0.0/backend/cli/tui/screen/communicate.py +185 -0
  237. grinta-1.0.0/backend/cli/tui/screen/input.py +780 -0
  238. grinta-1.0.0/backend/cli/tui/screen/lifecycle.py +454 -0
  239. grinta-1.0.0/backend/cli/tui/screen/lifecycle_bootstrap.py +360 -0
  240. grinta-1.0.0/backend/cli/tui/screen/lifecycle_dispatch.py +331 -0
  241. grinta-1.0.0/backend/cli/tui/screen/messages.py +452 -0
  242. grinta-1.0.0/backend/cli/tui/screen/settings.py +544 -0
  243. grinta-1.0.0/backend/cli/tui/screen/slash.py +203 -0
  244. grinta-1.0.0/backend/cli/tui/screen/state.py +825 -0
  245. grinta-1.0.0/backend/cli/tui/screen/welcome.py +99 -0
  246. grinta-1.0.0/backend/cli/tui/screens/detail/__init__.py +39 -0
  247. grinta-1.0.0/backend/cli/tui/screens/detail/acceptance_criteria.py +114 -0
  248. grinta-1.0.0/backend/cli/tui/screens/detail/base.py +283 -0
  249. grinta-1.0.0/backend/cli/tui/screens/detail/browser.py +83 -0
  250. grinta-1.0.0/backend/cli/tui/screens/detail/debugger.py +66 -0
  251. grinta-1.0.0/backend/cli/tui/screens/detail/edit.py +105 -0
  252. grinta-1.0.0/backend/cli/tui/screens/detail/helpers.py +250 -0
  253. grinta-1.0.0/backend/cli/tui/screens/detail/message.py +34 -0
  254. grinta-1.0.0/backend/cli/tui/screens/detail/payload.py +106 -0
  255. grinta-1.0.0/backend/cli/tui/screens/detail/shell.py +60 -0
  256. grinta-1.0.0/backend/cli/tui/screens/detail/terminal.py +64 -0
  257. grinta-1.0.0/backend/cli/tui/services/__init__.py +1 -0
  258. grinta-1.0.0/backend/cli/tui/services/mcp_reload_adapter.py +193 -0
  259. grinta-1.0.0/backend/cli/tui/services/settings_watcher.py +238 -0
  260. grinta-1.0.0/backend/cli/tui/strings.py +80 -0
  261. grinta-1.0.0/backend/cli/tui/styles.tcss +1141 -0
  262. grinta-1.0.0/backend/cli/tui/transcript_tiers.py +57 -0
  263. grinta-1.0.0/backend/cli/tui/transcript_typography.py +76 -0
  264. grinta-1.0.0/backend/cli/tui/widgets/__init__.py +1 -0
  265. grinta-1.0.0/backend/cli/tui/widgets/activity_card/__init__.py +23 -0
  266. grinta-1.0.0/backend/cli/tui/widgets/activity_card/message_widgets.py +320 -0
  267. grinta-1.0.0/backend/cli/tui/widgets/activity_card/orient.py +103 -0
  268. grinta-1.0.0/backend/cli/tui/widgets/collapsible.py +811 -0
  269. grinta-1.0.0/backend/cli/tui/widgets/command_list.py +270 -0
  270. grinta-1.0.0/backend/cli/tui/widgets/detail_terminal_frame.py +73 -0
  271. grinta-1.0.0/backend/cli/tui/widgets/dialogs.py +75 -0
  272. grinta-1.0.0/backend/cli/tui/widgets/error_block.py +61 -0
  273. grinta-1.0.0/backend/cli/tui/widgets/glyphs.py +94 -0
  274. grinta-1.0.0/backend/cli/tui/widgets/prompt_text_area.py +207 -0
  275. grinta-1.0.0/backend/cli/tui/widgets/scan_line/__init__.py +50 -0
  276. grinta-1.0.0/backend/cli/tui/widgets/scan_line/card.py +265 -0
  277. grinta-1.0.0/backend/cli/tui/widgets/scan_line/cards.py +946 -0
  278. grinta-1.0.0/backend/cli/tui/widgets/small.py +688 -0
  279. grinta-1.0.0/backend/cli/tui/widgets/transcript_notice.py +28 -0
  280. grinta-1.0.0/backend/cli/tui/widgets/unified_diff_view.py +644 -0
  281. grinta-1.0.0/backend/cli/tui/widgets/welcome.py +263 -0
  282. grinta-1.0.0/backend/cli/win32_console.py +166 -0
  283. grinta-1.0.0/backend/cli/workspace_trust_prompt.py +124 -0
  284. grinta-1.0.0/backend/context/README.md +20 -0
  285. grinta-1.0.0/backend/context/__init__.py +26 -0
  286. grinta-1.0.0/backend/context/canonical_state/__init__.py +159 -0
  287. grinta-1.0.0/backend/context/canonical_state/ops.py +654 -0
  288. grinta-1.0.0/backend/context/canonical_state/private.py +715 -0
  289. grinta-1.0.0/backend/context/canonical_state/types.py +379 -0
  290. grinta-1.0.0/backend/context/coding_preflight.py +224 -0
  291. grinta-1.0.0/backend/context/compactor/__init__.py +61 -0
  292. grinta-1.0.0/backend/context/compactor/compact_boundary.py +77 -0
  293. grinta-1.0.0/backend/context/compactor/compaction_finalizer.py +31 -0
  294. grinta-1.0.0/backend/context/compactor/compactor.py +649 -0
  295. grinta-1.0.0/backend/context/compactor/condensed_history.py +19 -0
  296. grinta-1.0.0/backend/context/compactor/microcompact.py +162 -0
  297. grinta-1.0.0/backend/context/compactor/pre_condensation_snapshot.py +1250 -0
  298. grinta-1.0.0/backend/context/compactor/strategies/__init__.py +31 -0
  299. grinta-1.0.0/backend/context/compactor/strategies/composition_pipeline.py +160 -0
  300. grinta-1.0.0/backend/context/compactor/strategies/layers/__init__.py +213 -0
  301. grinta-1.0.0/backend/context/compactor/strategies/microcompact_compactor.py +156 -0
  302. grinta-1.0.0/backend/context/compactor/strategies/no_op_compactor.py +50 -0
  303. grinta-1.0.0/backend/context/compactor/strategies/observation_masking_compactor.py +99 -0
  304. grinta-1.0.0/backend/context/compactor/strategies/pipeline.py +107 -0
  305. grinta-1.0.0/backend/context/compactor/strategies/recent_events_compactor.py +92 -0
  306. grinta-1.0.0/backend/context/compactor/strategies/smart_compactor.py +573 -0
  307. grinta-1.0.0/backend/context/compactor/strategies/structured_summary_compactor.py +887 -0
  308. grinta-1.0.0/backend/context/context_budget.py +112 -0
  309. grinta-1.0.0/backend/context/context_explorer.py +397 -0
  310. grinta-1.0.0/backend/context/context_pipeline/__init__.py +38 -0
  311. grinta-1.0.0/backend/context/context_pipeline/compaction.py +508 -0
  312. grinta-1.0.0/backend/context/context_pipeline/goal_context.py +117 -0
  313. grinta-1.0.0/backend/context/context_pipeline/grouping.py +73 -0
  314. grinta-1.0.0/backend/context/context_pipeline/helpers.py +68 -0
  315. grinta-1.0.0/backend/context/context_pipeline/pipeline.py +659 -0
  316. grinta-1.0.0/backend/context/context_pipeline/post_compact_reinject.py +32 -0
  317. grinta-1.0.0/backend/context/context_pipeline/types.py +22 -0
  318. grinta-1.0.0/backend/context/context_tracking.py +187 -0
  319. grinta-1.0.0/backend/context/continuity_eval.py +238 -0
  320. grinta-1.0.0/backend/context/memory/__init__.py +1 -0
  321. grinta-1.0.0/backend/context/memory/agent_memory.py +721 -0
  322. grinta-1.0.0/backend/context/memory/conversation_memory.py +1270 -0
  323. grinta-1.0.0/backend/context/memory/project_memory.py +360 -0
  324. grinta-1.0.0/backend/context/memory/session_context.py +112 -0
  325. grinta-1.0.0/backend/context/memory/session_memory.py +401 -0
  326. grinta-1.0.0/backend/context/memory/types.py +112 -0
  327. grinta-1.0.0/backend/context/memory/working_set.py +529 -0
  328. grinta-1.0.0/backend/context/processors/__init__.py +1 -0
  329. grinta-1.0.0/backend/context/processors/action_processors.py +500 -0
  330. grinta-1.0.0/backend/context/processors/observation_processors.py +744 -0
  331. grinta-1.0.0/backend/context/prompt/__init__.py +1 -0
  332. grinta-1.0.0/backend/context/prompt/compact_snapshot.py +50 -0
  333. grinta-1.0.0/backend/context/prompt/context_packet.py +599 -0
  334. grinta-1.0.0/backend/context/prompt/context_packet_cache.py +233 -0
  335. grinta-1.0.0/backend/context/prompt/message_formatting.py +151 -0
  336. grinta-1.0.0/backend/context/prompt/prompt_assembly.py +281 -0
  337. grinta-1.0.0/backend/context/prompt/prompt_window.py +1393 -0
  338. grinta-1.0.0/backend/context/prompt/turn_context.py +102 -0
  339. grinta-1.0.0/backend/context/prompt/user_turns.py +99 -0
  340. grinta-1.0.0/backend/context/render/__init__.py +23 -0
  341. grinta-1.0.0/backend/context/render/execution_contract.py +234 -0
  342. grinta-1.0.0/backend/context/render/task_context.py +144 -0
  343. grinta-1.0.0/backend/context/symbol_index/__init__.py +23 -0
  344. grinta-1.0.0/backend/context/symbol_index/aps_bridge.py +89 -0
  345. grinta-1.0.0/backend/context/symbol_index/builder.py +220 -0
  346. grinta-1.0.0/backend/context/symbol_index/imports.py +10 -0
  347. grinta-1.0.0/backend/context/symbol_index/paths.py +16 -0
  348. grinta-1.0.0/backend/context/symbol_index/query.py +36 -0
  349. grinta-1.0.0/backend/context/symbol_index/rank.py +114 -0
  350. grinta-1.0.0/backend/context/symbol_index/repo_map.py +126 -0
  351. grinta-1.0.0/backend/context/symbol_index/store.py +404 -0
  352. grinta-1.0.0/backend/context/tool_call_tracker.py +134 -0
  353. grinta-1.0.0/backend/context/tool_result_storage.py +278 -0
  354. grinta-1.0.0/backend/context/vector_store/__init__.py +35 -0
  355. grinta-1.0.0/backend/context/vector_store/_local_vector_store.py +971 -0
  356. grinta-1.0.0/backend/context/vector_store/_vector_store.py +813 -0
  357. grinta-1.0.0/backend/context/view.py +179 -0
  358. grinta-1.0.0/backend/core/__init__.py +5 -0
  359. grinta-1.0.0/backend/core/app_paths.py +54 -0
  360. grinta-1.0.0/backend/core/autonomy.py +75 -0
  361. grinta-1.0.0/backend/core/bounded_result.py +16 -0
  362. grinta-1.0.0/backend/core/cache/__init__.py +5 -0
  363. grinta-1.0.0/backend/core/cache/_serializer.py +55 -0
  364. grinta-1.0.0/backend/core/cache/async_smart_cache.py +156 -0
  365. grinta-1.0.0/backend/core/cache/cache_utils.py +26 -0
  366. grinta-1.0.0/backend/core/cache/smart_config_cache.py +147 -0
  367. grinta-1.0.0/backend/core/config/README.md +95 -0
  368. grinta-1.0.0/backend/core/config/__init__.py +57 -0
  369. grinta-1.0.0/backend/core/config/agent_config.py +693 -0
  370. grinta-1.0.0/backend/core/config/api_key_manager.py +496 -0
  371. grinta-1.0.0/backend/core/config/app_config.py +342 -0
  372. grinta-1.0.0/backend/core/config/arg_utils.py +91 -0
  373. grinta-1.0.0/backend/core/config/cli_config.py +131 -0
  374. grinta-1.0.0/backend/core/config/compactor_config.py +353 -0
  375. grinta-1.0.0/backend/core/config/config_loader.py +831 -0
  376. grinta-1.0.0/backend/core/config/config_telemetry.py +44 -0
  377. grinta-1.0.0/backend/core/config/config_utils.py +62 -0
  378. grinta-1.0.0/backend/core/config/dotenv_keys.py +150 -0
  379. grinta-1.0.0/backend/core/config/env_loader.py +188 -0
  380. grinta-1.0.0/backend/core/config/extended_config.py +53 -0
  381. grinta-1.0.0/backend/core/config/llm_config.py +506 -0
  382. grinta-1.0.0/backend/core/config/mcp_config.py +546 -0
  383. grinta-1.0.0/backend/core/config/mcp_defaults.py +64 -0
  384. grinta-1.0.0/backend/core/config/model_rebuild.py +83 -0
  385. grinta-1.0.0/backend/core/config/permissions_config.py +374 -0
  386. grinta-1.0.0/backend/core/config/provider_config.py +311 -0
  387. grinta-1.0.0/backend/core/config/quickstart.py +132 -0
  388. grinta-1.0.0/backend/core/config/runtime_config.py +57 -0
  389. grinta-1.0.0/backend/core/config/security_config.py +163 -0
  390. grinta-1.0.0/backend/core/config/tool_integration_defaults.py +31 -0
  391. grinta-1.0.0/backend/core/constants.py +730 -0
  392. grinta-1.0.0/backend/core/content_escape_repair.py +442 -0
  393. grinta-1.0.0/backend/core/contracts/__init__.py +10 -0
  394. grinta-1.0.0/backend/core/contracts/plugins.py +67 -0
  395. grinta-1.0.0/backend/core/criteria/__init__.py +23 -0
  396. grinta-1.0.0/backend/core/criteria/acceptance_criteria_store.py +190 -0
  397. grinta-1.0.0/backend/core/criteria/criterion_item.py +136 -0
  398. grinta-1.0.0/backend/core/enums.py +285 -0
  399. grinta-1.0.0/backend/core/errors/__init__.py +471 -0
  400. grinta-1.0.0/backend/core/errors/structured_edit_errors.py +450 -0
  401. grinta-1.0.0/backend/core/external_service.py +122 -0
  402. grinta-1.0.0/backend/core/file_history.py +72 -0
  403. grinta-1.0.0/backend/core/interaction_modes.py +152 -0
  404. grinta-1.0.0/backend/core/io_adapters/__init__.py +13 -0
  405. grinta-1.0.0/backend/core/io_adapters/cli_input.py +35 -0
  406. grinta-1.0.0/backend/core/io_adapters/json.py +109 -0
  407. grinta-1.0.0/backend/core/json_compat.py +129 -0
  408. grinta-1.0.0/backend/core/json_stdout.py +52 -0
  409. grinta-1.0.0/backend/core/logging/__init__.py +0 -0
  410. grinta-1.0.0/backend/core/logging/log_formatters.py +294 -0
  411. grinta-1.0.0/backend/core/logging/log_shipping.py +320 -0
  412. grinta-1.0.0/backend/core/logging/logger.py +719 -0
  413. grinta-1.0.0/backend/core/logging/session_context.py +158 -0
  414. grinta-1.0.0/backend/core/logging/session_event_logger.py +439 -0
  415. grinta-1.0.0/backend/core/logging/session_log_audit.py +434 -0
  416. grinta-1.0.0/backend/core/logging/session_log_renderer.py +104 -0
  417. grinta-1.0.0/backend/core/message.py +280 -0
  418. grinta-1.0.0/backend/core/os_capabilities.py +182 -0
  419. grinta-1.0.0/backend/core/plugin.py +534 -0
  420. grinta-1.0.0/backend/core/prompt_role_debug.py +82 -0
  421. grinta-1.0.0/backend/core/providers/__init__.py +9 -0
  422. grinta-1.0.0/backend/core/providers/configurations.py +565 -0
  423. grinta-1.0.0/backend/core/providers/provider_handler.py +129 -0
  424. grinta-1.0.0/backend/core/providers/provider_models.py +211 -0
  425. grinta-1.0.0/backend/core/runtime_paths.py +61 -0
  426. grinta-1.0.0/backend/core/schemas/__init__.py +128 -0
  427. grinta-1.0.0/backend/core/schemas/actions.py +562 -0
  428. grinta-1.0.0/backend/core/schemas/base.py +82 -0
  429. grinta-1.0.0/backend/core/schemas/metadata.py +91 -0
  430. grinta-1.0.0/backend/core/schemas/observations.py +148 -0
  431. grinta-1.0.0/backend/core/schemas/retry.py +23 -0
  432. grinta-1.0.0/backend/core/schemas/serialization.py +236 -0
  433. grinta-1.0.0/backend/core/step_phase.py +33 -0
  434. grinta-1.0.0/backend/core/task_tracker.py +5 -0
  435. grinta-1.0.0/backend/core/tasks/__init__.py +5 -0
  436. grinta-1.0.0/backend/core/tasks/plan_step.py +90 -0
  437. grinta-1.0.0/backend/core/tasks/task_status.py +63 -0
  438. grinta-1.0.0/backend/core/tasks/task_tracker.py +189 -0
  439. grinta-1.0.0/backend/core/timeouts/__init__.py +0 -0
  440. grinta-1.0.0/backend/core/timeouts/llm_step_timeout.py +38 -0
  441. grinta-1.0.0/backend/core/timeouts/loop_watchdog.py +298 -0
  442. grinta-1.0.0/backend/core/timeouts/suspend_aware_deadline.py +90 -0
  443. grinta-1.0.0/backend/core/timeouts/timeout_policy.py +82 -0
  444. grinta-1.0.0/backend/core/tools/__init__.py +1 -0
  445. grinta-1.0.0/backend/core/tools/tool_arguments_json.py +80 -0
  446. grinta-1.0.0/backend/core/tools/tool_names.py +82 -0
  447. grinta-1.0.0/backend/core/tools/tool_transport.py +40 -0
  448. grinta-1.0.0/backend/core/tracing.py +317 -0
  449. grinta-1.0.0/backend/core/type_safety/__init__.py +51 -0
  450. grinta-1.0.0/backend/core/type_safety/path_validation.py +699 -0
  451. grinta-1.0.0/backend/core/type_safety/sentinels.py +163 -0
  452. grinta-1.0.0/backend/core/type_safety/type_safety.py +203 -0
  453. grinta-1.0.0/backend/core/workspace_resolution.py +355 -0
  454. grinta-1.0.0/backend/core/workspace_trust.py +91 -0
  455. grinta-1.0.0/backend/core/wsl.py +171 -0
  456. grinta-1.0.0/backend/engine/README.md +16 -0
  457. grinta-1.0.0/backend/engine/__init__.py +24 -0
  458. grinta-1.0.0/backend/engine/contracts.py +175 -0
  459. grinta-1.0.0/backend/engine/executor.py +352 -0
  460. grinta-1.0.0/backend/engine/executor_mixins/__init__.py +29 -0
  461. grinta-1.0.0/backend/engine/executor_mixins/_executor_lifecycle_mixin.py +410 -0
  462. grinta-1.0.0/backend/engine/executor_mixins/_executor_response_mixin.py +147 -0
  463. grinta-1.0.0/backend/engine/executor_mixins/_executor_streaming_mixin.py +1129 -0
  464. grinta-1.0.0/backend/engine/executor_mixins/_executor_types.py +90 -0
  465. grinta-1.0.0/backend/engine/executor_response_helpers.py +230 -0
  466. grinta-1.0.0/backend/engine/file_reads.py +97 -0
  467. grinta-1.0.0/backend/engine/function_calling/__init__.py +1 -0
  468. grinta-1.0.0/backend/engine/function_calling/dispatch.py +331 -0
  469. grinta-1.0.0/backend/engine/function_calling/helpers.py +97 -0
  470. grinta-1.0.0/backend/engine/llm_message_serializer.py +97 -0
  471. grinta-1.0.0/backend/engine/memory_manager.py +482 -0
  472. grinta-1.0.0/backend/engine/memory_prompt_cache.py +57 -0
  473. grinta-1.0.0/backend/engine/orchestrator.py +460 -0
  474. grinta-1.0.0/backend/engine/orchestrator_helpers/__init__.py +22 -0
  475. grinta-1.0.0/backend/engine/orchestrator_helpers/actions.py +85 -0
  476. grinta-1.0.0/backend/engine/orchestrator_helpers/condensation.py +102 -0
  477. grinta-1.0.0/backend/engine/orchestrator_helpers/helpers.py +91 -0
  478. grinta-1.0.0/backend/engine/orchestrator_helpers/prompts.py +181 -0
  479. grinta-1.0.0/backend/engine/orchestrator_helpers/protocol.py +95 -0
  480. grinta-1.0.0/backend/engine/orchestrator_helpers/recovery.py +99 -0
  481. grinta-1.0.0/backend/engine/orchestrator_helpers/step.py +522 -0
  482. grinta-1.0.0/backend/engine/planner.py +1101 -0
  483. grinta-1.0.0/backend/engine/prompts/prompt_builder.py +915 -0
  484. grinta-1.0.0/backend/engine/prompts/section_renderers/__init__.py +101 -0
  485. grinta-1.0.0/backend/engine/prompts/section_renderers/_autonomy.py +242 -0
  486. grinta-1.0.0/backend/engine/prompts/section_renderers/_capabilities.py +337 -0
  487. grinta-1.0.0/backend/engine/prompts/section_renderers/_common.py +59 -0
  488. grinta-1.0.0/backend/engine/prompts/section_renderers/_critical.py +209 -0
  489. grinta-1.0.0/backend/engine/prompts/section_renderers/_env_hints.py +214 -0
  490. grinta-1.0.0/backend/engine/prompts/section_renderers/_examples.py +124 -0
  491. grinta-1.0.0/backend/engine/prompts/section_renderers/_interaction.py +44 -0
  492. grinta-1.0.0/backend/engine/prompts/section_renderers/_mcp.py +105 -0
  493. grinta-1.0.0/backend/engine/prompts/section_renderers/_permissions.py +74 -0
  494. grinta-1.0.0/backend/engine/prompts/section_renderers/_routing.py +110 -0
  495. grinta-1.0.0/backend/engine/prompts/section_renderers/_security.py +54 -0
  496. grinta-1.0.0/backend/engine/prompts/section_renderers/_tools.py +108 -0
  497. grinta-1.0.0/backend/engine/prompts/system_partial_00_routing.md +42 -0
  498. grinta-1.0.0/backend/engine/prompts/system_partial_01_autonomy.md +44 -0
  499. grinta-1.0.0/backend/engine/prompts/system_partial_02_tools.md +3 -0
  500. grinta-1.0.0/backend/engine/prompts/system_partial_03_tail.md +23 -0
  501. grinta-1.0.0/backend/engine/prompts/system_partial_04_critical.md +14 -0
  502. grinta-1.0.0/backend/engine/prompts/system_partial_05_examples.md +10 -0
  503. grinta-1.0.0/backend/engine/reflection.py +113 -0
  504. grinta-1.0.0/backend/engine/response_processing.py +860 -0
  505. grinta-1.0.0/backend/engine/streaming_checkpoint.py +314 -0
  506. grinta-1.0.0/backend/engine/tool_registry.py +82 -0
  507. grinta-1.0.0/backend/engine/tools/__init__.py +55 -0
  508. grinta-1.0.0/backend/engine/tools/_aps_callers_coverage.py +154 -0
  509. grinta-1.0.0/backend/engine/tools/_aps_dependencies.py +257 -0
  510. grinta-1.0.0/backend/engine/tools/_aps_file_modes.py +286 -0
  511. grinta-1.0.0/backend/engine/tools/_aps_shared.py +135 -0
  512. grinta-1.0.0/backend/engine/tools/_aps_tree.py +295 -0
  513. grinta-1.0.0/backend/engine/tools/_file_edits.py +70 -0
  514. grinta-1.0.0/backend/engine/tools/_file_edits_common.py +45 -0
  515. grinta-1.0.0/backend/engine/tools/_file_edits_handlers.py +147 -0
  516. grinta-1.0.0/backend/engine/tools/_file_edits_multi.py +425 -0
  517. grinta-1.0.0/backend/engine/tools/_file_edits_symbols.py +135 -0
  518. grinta-1.0.0/backend/engine/tools/_file_ops.py +405 -0
  519. grinta-1.0.0/backend/engine/tools/_search_helpers.py +587 -0
  520. grinta-1.0.0/backend/engine/tools/_tool_handlers.py +880 -0
  521. grinta-1.0.0/backend/engine/tools/acceptance_criteria.py +119 -0
  522. grinta-1.0.0/backend/engine/tools/analyze_project_structure.py +223 -0
  523. grinta-1.0.0/backend/engine/tools/atomic_refactor.py +694 -0
  524. grinta-1.0.0/backend/engine/tools/blackboard.py +53 -0
  525. grinta-1.0.0/backend/engine/tools/browser_native.py +255 -0
  526. grinta-1.0.0/backend/engine/tools/checkpoint.py +538 -0
  527. grinta-1.0.0/backend/engine/tools/debugger.py +327 -0
  528. grinta-1.0.0/backend/engine/tools/delegate_task.py +131 -0
  529. grinta-1.0.0/backend/engine/tools/docs_tools.py +129 -0
  530. grinta-1.0.0/backend/engine/tools/execute_mcp_tool.py +104 -0
  531. grinta-1.0.0/backend/engine/tools/glob.py +179 -0
  532. grinta-1.0.0/backend/engine/tools/grep.py +358 -0
  533. grinta-1.0.0/backend/engine/tools/health_check.py +188 -0
  534. grinta-1.0.0/backend/engine/tools/ignore_filter.py +83 -0
  535. grinta-1.0.0/backend/engine/tools/lesson_store.py +141 -0
  536. grinta-1.0.0/backend/engine/tools/lsp_query.py +151 -0
  537. grinta-1.0.0/backend/engine/tools/memory.py +141 -0
  538. grinta-1.0.0/backend/engine/tools/meta_cognition.py +59 -0
  539. grinta-1.0.0/backend/engine/tools/native_file_tools.py +179 -0
  540. grinta-1.0.0/backend/engine/tools/param_defs.py +197 -0
  541. grinta-1.0.0/backend/engine/tools/scratchpad.py +237 -0
  542. grinta-1.0.0/backend/engine/tools/semantic_analyzer.py +86 -0
  543. grinta-1.0.0/backend/engine/tools/session_lessons.py +264 -0
  544. grinta-1.0.0/backend/engine/tools/smart_errors.py +240 -0
  545. grinta-1.0.0/backend/engine/tools/structure_editor.py +986 -0
  546. grinta-1.0.0/backend/engine/tools/task_state.py +92 -0
  547. grinta-1.0.0/backend/engine/tools/task_tracker.py +115 -0
  548. grinta-1.0.0/backend/engine/tools/terminal.py +180 -0
  549. grinta-1.0.0/backend/engine/tools/treesitter_editor.py +19 -0
  550. grinta-1.0.0/backend/engine/tools/web_tools.py +218 -0
  551. grinta-1.0.0/backend/engine/tools/whitespace_handler.py +575 -0
  552. grinta-1.0.0/backend/engine/tools/working_memory.py +475 -0
  553. grinta-1.0.0/backend/engine/tools/workspace_memory.py +293 -0
  554. grinta-1.0.0/backend/execution/README.md +86 -0
  555. grinta-1.0.0/backend/execution/__init__.py +69 -0
  556. grinta-1.0.0/backend/execution/acceptance_criteria.py +299 -0
  557. grinta-1.0.0/backend/execution/aes/__init__.py +1 -0
  558. grinta-1.0.0/backend/execution/aes/file_operations.py +1264 -0
  559. grinta-1.0.0/backend/execution/aes/helpers.py +1314 -0
  560. grinta-1.0.0/backend/execution/aes/policy_block_messages.py +53 -0
  561. grinta-1.0.0/backend/execution/aes/security_enforcement.py +688 -0
  562. grinta-1.0.0/backend/execution/browser/__init__.py +5 -0
  563. grinta-1.0.0/backend/execution/browser/_browser_cdp.py +47 -0
  564. grinta-1.0.0/backend/execution/browser/_browser_interaction.py +512 -0
  565. grinta-1.0.0/backend/execution/browser/_browser_navigation.py +220 -0
  566. grinta-1.0.0/backend/execution/browser/_browser_shared.py +75 -0
  567. grinta-1.0.0/backend/execution/browser/_browser_snapshot.py +254 -0
  568. grinta-1.0.0/backend/execution/browser/grinta_browser.py +361 -0
  569. grinta-1.0.0/backend/execution/capabilities.py +125 -0
  570. grinta-1.0.0/backend/execution/dap/__init__.py +47 -0
  571. grinta-1.0.0/backend/execution/dap/_dap_adapters.py +376 -0
  572. grinta-1.0.0/backend/execution/dap/_dap_client.py +479 -0
  573. grinta-1.0.0/backend/execution/dap/_dap_errors.py +25 -0
  574. grinta-1.0.0/backend/execution/dap/_dap_logging.py +52 -0
  575. grinta-1.0.0/backend/execution/dap/_dap_manager.py +436 -0
  576. grinta-1.0.0/backend/execution/dap/_dap_session.py +650 -0
  577. grinta-1.0.0/backend/execution/dap/_dap_spawn_utils.py +197 -0
  578. grinta-1.0.0/backend/execution/dap/dap_aliases.py +23 -0
  579. grinta-1.0.0/backend/execution/document_readers.py +64 -0
  580. grinta-1.0.0/backend/execution/drivers/__init__.py +31 -0
  581. grinta-1.0.0/backend/execution/drivers/local/__init__.py +7 -0
  582. grinta-1.0.0/backend/execution/drivers/local/local_runtime_inprocess.py +941 -0
  583. grinta-1.0.0/backend/execution/executor_protocol.py +149 -0
  584. grinta-1.0.0/backend/execution/io_mixins/__init__.py +36 -0
  585. grinta-1.0.0/backend/execution/io_mixins/_aes_io_file_mixin.py +165 -0
  586. grinta-1.0.0/backend/execution/io_mixins/_aes_io_init_mixin.py +100 -0
  587. grinta-1.0.0/backend/execution/io_mixins/_aes_io_run_mixin.py +307 -0
  588. grinta-1.0.0/backend/execution/io_mixins/_aes_io_terminal_mixin.py +1039 -0
  589. grinta-1.0.0/backend/execution/io_mixins/_aes_io_workspace_mixin.py +112 -0
  590. grinta-1.0.0/backend/execution/mcp/config.json +22 -0
  591. grinta-1.0.0/backend/execution/playbook_loader.py +298 -0
  592. grinta-1.0.0/backend/execution/plugin_loader.py +28 -0
  593. grinta-1.0.0/backend/execution/plugins/__init__.py +136 -0
  594. grinta-1.0.0/backend/execution/plugins/agent_skills/README.md +38 -0
  595. grinta-1.0.0/backend/execution/plugins/agent_skills/__init__.py +31 -0
  596. grinta-1.0.0/backend/execution/plugins/agent_skills/agentskills.py +48 -0
  597. grinta-1.0.0/backend/execution/plugins/agent_skills/database/__init__.py +545 -0
  598. grinta-1.0.0/backend/execution/plugins/agent_skills/file_editor/README.md +3 -0
  599. grinta-1.0.0/backend/execution/plugins/agent_skills/file_editor/__init__.py +20 -0
  600. grinta-1.0.0/backend/execution/plugins/agent_skills/file_ops/__init__.py +23 -0
  601. grinta-1.0.0/backend/execution/plugins/agent_skills/file_ops/file_ops.py +512 -0
  602. grinta-1.0.0/backend/execution/plugins/agent_skills/file_reader/__init__.py +23 -0
  603. grinta-1.0.0/backend/execution/plugins/agent_skills/file_reader/file_readers.py +213 -0
  604. grinta-1.0.0/backend/execution/plugins/agent_skills/repo_ops/__init__.py +14 -0
  605. grinta-1.0.0/backend/execution/plugins/agent_skills/utils/config.py +109 -0
  606. grinta-1.0.0/backend/execution/plugins/agent_skills/utils/dependency.py +25 -0
  607. grinta-1.0.0/backend/execution/rollback/__init__.py +21 -0
  608. grinta-1.0.0/backend/execution/rollback/rollback_manager.py +632 -0
  609. grinta-1.0.0/backend/execution/rollback/shadow_repo.py +508 -0
  610. grinta-1.0.0/backend/execution/rollback/workspace_checkpoint.py +360 -0
  611. grinta-1.0.0/backend/execution/runtime/__init__.py +1 -0
  612. grinta-1.0.0/backend/execution/runtime/factory.py +41 -0
  613. grinta-1.0.0/backend/execution/runtime/orchestrator.py +247 -0
  614. grinta-1.0.0/backend/execution/runtime/pool.py +208 -0
  615. grinta-1.0.0/backend/execution/runtime_mixins/__init__.py +0 -0
  616. grinta-1.0.0/backend/execution/runtime_mixins/command_timeout.py +54 -0
  617. grinta-1.0.0/backend/execution/runtime_mixins/editor_only_shell_policy.py +163 -0
  618. grinta-1.0.0/backend/execution/runtime_mixins/env_manager.py +132 -0
  619. grinta-1.0.0/backend/execution/runtime_mixins/git_setup.py +354 -0
  620. grinta-1.0.0/backend/execution/sandbox_helpers/__init__.py +1 -0
  621. grinta-1.0.0/backend/execution/sandbox_helpers/appcontainer_runner.py +427 -0
  622. grinta-1.0.0/backend/execution/sandboxing.py +236 -0
  623. grinta-1.0.0/backend/execution/server/__init__.py +0 -0
  624. grinta-1.0.0/backend/execution/server/action_execution_server.py +503 -0
  625. grinta-1.0.0/backend/execution/server/action_execution_server_io.py +30 -0
  626. grinta-1.0.0/backend/execution/server/base.py +1098 -0
  627. grinta-1.0.0/backend/execution/server/supervisor.py +128 -0
  628. grinta-1.0.0/backend/execution/task_state.py +22 -0
  629. grinta-1.0.0/backend/execution/task_tracking.py +238 -0
  630. grinta-1.0.0/backend/execution/telemetry.py +76 -0
  631. grinta-1.0.0/backend/execution/utils/__init__.py +8 -0
  632. grinta-1.0.0/backend/execution/utils/fallbacks/__init__.py +6 -0
  633. grinta-1.0.0/backend/execution/utils/fallbacks/file_ops.py +193 -0
  634. grinta-1.0.0/backend/execution/utils/fallbacks/search.py +164 -0
  635. grinta-1.0.0/backend/execution/utils/file_editor/__init__.py +360 -0
  636. grinta-1.0.0/backend/execution/utils/file_editor/_file_editor_diff_helpers.py +136 -0
  637. grinta-1.0.0/backend/execution/utils/file_editor/_file_editor_edit_helpers.py +690 -0
  638. grinta-1.0.0/backend/execution/utils/file_editor/_file_editor_io_helpers.py +107 -0
  639. grinta-1.0.0/backend/execution/utils/file_editor/_file_editor_read_write_helpers.py +213 -0
  640. grinta-1.0.0/backend/execution/utils/file_editor/_file_editor_types.py +24 -0
  641. grinta-1.0.0/backend/execution/utils/file_editor/file_editor_edit_mixin.py +269 -0
  642. grinta-1.0.0/backend/execution/utils/file_editor/file_editor_edit_ops.py +160 -0
  643. grinta-1.0.0/backend/execution/utils/file_editor/file_editor_ops_mixin.py +295 -0
  644. grinta-1.0.0/backend/execution/utils/file_editor/file_editor_rollback_mixin.py +230 -0
  645. grinta-1.0.0/backend/execution/utils/file_editor/file_editor_view_mixin.py +218 -0
  646. grinta-1.0.0/backend/execution/utils/files/__init__.py +0 -0
  647. grinta-1.0.0/backend/execution/utils/files/bounded_io.py +369 -0
  648. grinta-1.0.0/backend/execution/utils/files/diff.py +173 -0
  649. grinta-1.0.0/backend/execution/utils/files/file_transaction.py +390 -0
  650. grinta-1.0.0/backend/execution/utils/files/file_viewer.py +60 -0
  651. grinta-1.0.0/backend/execution/utils/files/files.py +224 -0
  652. grinta-1.0.0/backend/execution/utils/git/__init__.py +1 -0
  653. grinta-1.0.0/backend/execution/utils/git/git_changes.py +119 -0
  654. grinta-1.0.0/backend/execution/utils/git/git_common.py +124 -0
  655. grinta-1.0.0/backend/execution/utils/git/git_diff.py +111 -0
  656. grinta-1.0.0/backend/execution/utils/git/git_handler.py +134 -0
  657. grinta-1.0.0/backend/execution/utils/log_capture.py +39 -0
  658. grinta-1.0.0/backend/execution/utils/mcp_runtime.py +243 -0
  659. grinta-1.0.0/backend/execution/utils/memory_monitor.py +85 -0
  660. grinta-1.0.0/backend/execution/utils/process/__init__.py +0 -0
  661. grinta-1.0.0/backend/execution/utils/process/process_manager.py +392 -0
  662. grinta-1.0.0/backend/execution/utils/process/process_registry.py +265 -0
  663. grinta-1.0.0/backend/execution/utils/process/server_detector.py +265 -0
  664. grinta-1.0.0/backend/execution/utils/shell/__init__.py +1 -0
  665. grinta-1.0.0/backend/execution/utils/shell/_bash_command.py +205 -0
  666. grinta-1.0.0/backend/execution/utils/shell/_bash_detached.py +127 -0
  667. grinta-1.0.0/backend/execution/utils/shell/_bash_pane.py +234 -0
  668. grinta-1.0.0/backend/execution/utils/shell/_bash_server.py +44 -0
  669. grinta-1.0.0/backend/execution/utils/shell/_bash_timeouts.py +431 -0
  670. grinta-1.0.0/backend/execution/utils/shell/background_turn_sync.py +153 -0
  671. grinta-1.0.0/backend/execution/utils/shell/bash.py +455 -0
  672. grinta-1.0.0/backend/execution/utils/shell/bash_constants.py +5 -0
  673. grinta-1.0.0/backend/execution/utils/shell/bash_support.py +193 -0
  674. grinta-1.0.0/backend/execution/utils/shell/blocking_heuristics.py +71 -0
  675. grinta-1.0.0/backend/execution/utils/shell/idle_detach_policy.py +66 -0
  676. grinta-1.0.0/backend/execution/utils/shell/prompt_detector.py +342 -0
  677. grinta-1.0.0/backend/execution/utils/shell/pty_session.py +849 -0
  678. grinta-1.0.0/backend/execution/utils/shell/pty_shell_session.py +616 -0
  679. grinta-1.0.0/backend/execution/utils/shell/session_manager.py +260 -0
  680. grinta-1.0.0/backend/execution/utils/shell/shell_utils.py +74 -0
  681. grinta-1.0.0/backend/execution/utils/shell/simple_bash.py +249 -0
  682. grinta-1.0.0/backend/execution/utils/shell/stall_hints.py +102 -0
  683. grinta-1.0.0/backend/execution/utils/shell/subprocess_background.py +172 -0
  684. grinta-1.0.0/backend/execution/utils/shell/unified_shell.py +765 -0
  685. grinta-1.0.0/backend/execution/utils/shell/windows_bash.py +537 -0
  686. grinta-1.0.0/backend/execution/utils/shell/windows_exceptions.py +16 -0
  687. grinta-1.0.0/backend/execution/utils/system.py +81 -0
  688. grinta-1.0.0/backend/execution/utils/system_stats.py +79 -0
  689. grinta-1.0.0/backend/execution/utils/tenacity_stop.py +18 -0
  690. grinta-1.0.0/backend/execution/utils/test_output_summary.py +193 -0
  691. grinta-1.0.0/backend/execution/utils/tool_registry.py +533 -0
  692. grinta-1.0.0/backend/execution/watchdog.py +216 -0
  693. grinta-1.0.0/backend/inference/README.md +802 -0
  694. grinta-1.0.0/backend/inference/__init__.py +25 -0
  695. grinta-1.0.0/backend/inference/caching/__init__.py +1 -0
  696. grinta-1.0.0/backend/inference/caching/gemini_cache.py +145 -0
  697. grinta-1.0.0/backend/inference/caching/prompt_cache.py +130 -0
  698. grinta-1.0.0/backend/inference/caching/prompt_caching.py +189 -0
  699. grinta-1.0.0/backend/inference/capabilities/__init__.py +16 -0
  700. grinta-1.0.0/backend/inference/capabilities/context_limits.py +194 -0
  701. grinta-1.0.0/backend/inference/capabilities/model_features.py +248 -0
  702. grinta-1.0.0/backend/inference/capabilities/param_profiles.py +85 -0
  703. grinta-1.0.0/backend/inference/capabilities/provider_capabilities.py +280 -0
  704. grinta-1.0.0/backend/inference/catalog/__init__.py +0 -0
  705. grinta-1.0.0/backend/inference/catalog/catalog_loader.py +1176 -0
  706. grinta-1.0.0/backend/inference/catalog/catalog_validator.py +481 -0
  707. grinta-1.0.0/backend/inference/catalog/model_catalog.py +25 -0
  708. grinta-1.0.0/backend/inference/catalog/provider_catalog.py +442 -0
  709. grinta-1.0.0/backend/inference/catalogs/anthropic.json +240 -0
  710. grinta-1.0.0/backend/inference/catalogs/cerebras.json +40 -0
  711. grinta-1.0.0/backend/inference/catalogs/deepinfra.json +66 -0
  712. grinta-1.0.0/backend/inference/catalogs/deepseek.json +68 -0
  713. grinta-1.0.0/backend/inference/catalogs/digitalocean.json +113 -0
  714. grinta-1.0.0/backend/inference/catalogs/fireworks.json +67 -0
  715. grinta-1.0.0/backend/inference/catalogs/google.json +96 -0
  716. grinta-1.0.0/backend/inference/catalogs/groq.json +132 -0
  717. grinta-1.0.0/backend/inference/catalogs/lightning.json +84 -0
  718. grinta-1.0.0/backend/inference/catalogs/mistral.json +66 -0
  719. grinta-1.0.0/backend/inference/catalogs/moonshot.json +97 -0
  720. grinta-1.0.0/backend/inference/catalogs/nvidia.json +40 -0
  721. grinta-1.0.0/backend/inference/catalogs/openai.json +672 -0
  722. grinta-1.0.0/backend/inference/catalogs/opencode-go.json +909 -0
  723. grinta-1.0.0/backend/inference/catalogs/opencode.json +4908 -0
  724. grinta-1.0.0/backend/inference/catalogs/openrouter.json +72 -0
  725. grinta-1.0.0/backend/inference/catalogs/perplexity.json +53 -0
  726. grinta-1.0.0/backend/inference/catalogs/together.json +67 -0
  727. grinta-1.0.0/backend/inference/catalogs/vercel.json +943 -0
  728. grinta-1.0.0/backend/inference/catalogs/xai.json +109 -0
  729. grinta-1.0.0/backend/inference/catalogs/zai.json +40 -0
  730. grinta-1.0.0/backend/inference/clients/__init__.py +74 -0
  731. grinta-1.0.0/backend/inference/clients/anthropic_client.py +90 -0
  732. grinta-1.0.0/backend/inference/clients/base.py +679 -0
  733. grinta-1.0.0/backend/inference/clients/factory.py +322 -0
  734. grinta-1.0.0/backend/inference/clients/openai_client.py +124 -0
  735. grinta-1.0.0/backend/inference/cost_tracker.py +104 -0
  736. grinta-1.0.0/backend/inference/debug_mixin.py +130 -0
  737. grinta-1.0.0/backend/inference/discover_models.py +140 -0
  738. grinta-1.0.0/backend/inference/exceptions.py +213 -0
  739. grinta-1.0.0/backend/inference/fn_call/__init__.py +106 -0
  740. grinta-1.0.0/backend/inference/fn_call/_fn_call_convert.py +246 -0
  741. grinta-1.0.0/backend/inference/fn_call/_fn_call_examples.py +386 -0
  742. grinta-1.0.0/backend/inference/fn_call/_fn_call_to_messages.py +766 -0
  743. grinta-1.0.0/backend/inference/llm/__init__.py +67 -0
  744. grinta-1.0.0/backend/inference/llm/config.py +259 -0
  745. grinta-1.0.0/backend/inference/llm/core.py +787 -0
  746. grinta-1.0.0/backend/inference/llm/exceptions.py +231 -0
  747. grinta-1.0.0/backend/inference/llm/stream.py +93 -0
  748. grinta-1.0.0/backend/inference/llm/utils.py +255 -0
  749. grinta-1.0.0/backend/inference/llm_registry.py +260 -0
  750. grinta-1.0.0/backend/inference/local_model.py +42 -0
  751. grinta-1.0.0/backend/inference/mappers/__init__.py +1 -0
  752. grinta-1.0.0/backend/inference/mappers/anthropic.py +456 -0
  753. grinta-1.0.0/backend/inference/mappers/gemini.py +565 -0
  754. grinta-1.0.0/backend/inference/mappers/openai.py +90 -0
  755. grinta-1.0.0/backend/inference/metrics.py +360 -0
  756. grinta-1.0.0/backend/inference/provider_resolver.py +459 -0
  757. grinta-1.0.0/backend/inference/providers/__init__.py +1 -0
  758. grinta-1.0.0/backend/inference/providers/anthropic_ops.py +417 -0
  759. grinta-1.0.0/backend/inference/providers/gemini_ops.py +596 -0
  760. grinta-1.0.0/backend/inference/providers/openai_ops.py +633 -0
  761. grinta-1.0.0/backend/inference/providers/opencode_gemini_ops.py +165 -0
  762. grinta-1.0.0/backend/inference/providers/opencode_responses_ops.py +213 -0
  763. grinta-1.0.0/backend/inference/rate_limit_parser.py +265 -0
  764. grinta-1.0.0/backend/inference/reasoning.py +678 -0
  765. grinta-1.0.0/backend/inference/reasoning_profiles.py +130 -0
  766. grinta-1.0.0/backend/inference/retry_mixin.py +230 -0
  767. grinta-1.0.0/backend/inference/runtime_profile.py +170 -0
  768. grinta-1.0.0/backend/inference/tool_support/__init__.py +0 -0
  769. grinta-1.0.0/backend/inference/tool_support/tool_history.py +47 -0
  770. grinta-1.0.0/backend/inference/tool_support/tool_result_format.py +50 -0
  771. grinta-1.0.0/backend/inference/tool_support/tool_types.py +73 -0
  772. grinta-1.0.0/backend/inference/transport.py +16 -0
  773. grinta-1.0.0/backend/inference/utils/batching.py +249 -0
  774. grinta-1.0.0/backend/integrations/README.md +32 -0
  775. grinta-1.0.0/backend/integrations/__init__.py +31 -0
  776. grinta-1.0.0/backend/integrations/mcp/README.md +24 -0
  777. grinta-1.0.0/backend/integrations/mcp/__init__.py +65 -0
  778. grinta-1.0.0/backend/integrations/mcp/cache.py +125 -0
  779. grinta-1.0.0/backend/integrations/mcp/client.py +493 -0
  780. grinta-1.0.0/backend/integrations/mcp/config_bus.py +353 -0
  781. grinta-1.0.0/backend/integrations/mcp/error_collector.py +79 -0
  782. grinta-1.0.0/backend/integrations/mcp/mcp_bootstrap_status.py +64 -0
  783. grinta-1.0.0/backend/integrations/mcp/mcp_tool_aliases.py +56 -0
  784. grinta-1.0.0/backend/integrations/mcp/mcp_utils.py +1165 -0
  785. grinta-1.0.0/backend/integrations/mcp/native_backends.py +60 -0
  786. grinta-1.0.0/backend/integrations/mcp/rigour_bootstrap.py +72 -0
  787. grinta-1.0.0/backend/integrations/mcp/tool.py +44 -0
  788. grinta-1.0.0/backend/integrations/mcp/wrappers.py +94 -0
  789. grinta-1.0.0/backend/knowledge/__init__.py +17 -0
  790. grinta-1.0.0/backend/knowledge/knowledge_base_manager.py +537 -0
  791. grinta-1.0.0/backend/knowledge/query_expansion.py +120 -0
  792. grinta-1.0.0/backend/knowledge/smart_chunking.py +559 -0
  793. grinta-1.0.0/backend/ledger/__init__.py +21 -0
  794. grinta-1.0.0/backend/ledger/action/__init__.py +105 -0
  795. grinta-1.0.0/backend/ledger/action/action.py +49 -0
  796. grinta-1.0.0/backend/ledger/action/agent.py +360 -0
  797. grinta-1.0.0/backend/ledger/action/browse.py +33 -0
  798. grinta-1.0.0/backend/ledger/action/browser_tool.py +31 -0
  799. grinta-1.0.0/backend/ledger/action/code_nav.py +41 -0
  800. grinta-1.0.0/backend/ledger/action/commands.py +59 -0
  801. grinta-1.0.0/backend/ledger/action/debugger.py +86 -0
  802. grinta-1.0.0/backend/ledger/action/empty.py +46 -0
  803. grinta-1.0.0/backend/ledger/action/files.py +102 -0
  804. grinta-1.0.0/backend/ledger/action/mcp.py +43 -0
  805. grinta-1.0.0/backend/ledger/action/memory_tools.py +114 -0
  806. grinta-1.0.0/backend/ledger/action/message.py +113 -0
  807. grinta-1.0.0/backend/ledger/action/search.py +91 -0
  808. grinta-1.0.0/backend/ledger/action/terminal.py +167 -0
  809. grinta-1.0.0/backend/ledger/event/__init__.py +26 -0
  810. grinta-1.0.0/backend/ledger/event/_event.py +244 -0
  811. grinta-1.0.0/backend/ledger/event/event_filter.py +146 -0
  812. grinta-1.0.0/backend/ledger/event/event_store.py +561 -0
  813. grinta-1.0.0/backend/ledger/event/event_store_abc.py +119 -0
  814. grinta-1.0.0/backend/ledger/event/event_utils.py +76 -0
  815. grinta-1.0.0/backend/ledger/infra/__init__.py +1 -0
  816. grinta-1.0.0/backend/ledger/infra/adapter.py +98 -0
  817. grinta-1.0.0/backend/ledger/infra/config.py +130 -0
  818. grinta-1.0.0/backend/ledger/infra/integrity.py +118 -0
  819. grinta-1.0.0/backend/ledger/infra/secret_masker.py +129 -0
  820. grinta-1.0.0/backend/ledger/infra/tool.py +64 -0
  821. grinta-1.0.0/backend/ledger/model_response_lite.py +111 -0
  822. grinta-1.0.0/backend/ledger/observation/__init__.py +107 -0
  823. grinta-1.0.0/backend/ledger/observation/acceptance_criteria.py +21 -0
  824. grinta-1.0.0/backend/ledger/observation/agent.py +161 -0
  825. grinta-1.0.0/backend/ledger/observation/browser_screenshot.py +44 -0
  826. grinta-1.0.0/backend/ledger/observation/code_nav.py +40 -0
  827. grinta-1.0.0/backend/ledger/observation/commands.py +266 -0
  828. grinta-1.0.0/backend/ledger/observation/debugger.py +26 -0
  829. grinta-1.0.0/backend/ledger/observation/empty.py +22 -0
  830. grinta-1.0.0/backend/ledger/observation/error.py +64 -0
  831. grinta-1.0.0/backend/ledger/observation/file_download.py +29 -0
  832. grinta-1.0.0/backend/ledger/observation/files.py +302 -0
  833. grinta-1.0.0/backend/ledger/observation/mcp.py +21 -0
  834. grinta-1.0.0/backend/ledger/observation/memory_tools.py +104 -0
  835. grinta-1.0.0/backend/ledger/observation/observation.py +43 -0
  836. grinta-1.0.0/backend/ledger/observation/reject.py +19 -0
  837. grinta-1.0.0/backend/ledger/observation/search.py +94 -0
  838. grinta-1.0.0/backend/ledger/observation/server.py +32 -0
  839. grinta-1.0.0/backend/ledger/observation/status.py +34 -0
  840. grinta-1.0.0/backend/ledger/observation/success.py +19 -0
  841. grinta-1.0.0/backend/ledger/observation/task_state.py +15 -0
  842. grinta-1.0.0/backend/ledger/observation/task_tracking.py +21 -0
  843. grinta-1.0.0/backend/ledger/observation/terminal.py +31 -0
  844. grinta-1.0.0/backend/ledger/observation_cause.py +62 -0
  845. grinta-1.0.0/backend/ledger/serialization/__init__.py +17 -0
  846. grinta-1.0.0/backend/ledger/serialization/action.py +197 -0
  847. grinta-1.0.0/backend/ledger/serialization/common.py +21 -0
  848. grinta-1.0.0/backend/ledger/serialization/event.py +455 -0
  849. grinta-1.0.0/backend/ledger/serialization/observation.py +253 -0
  850. grinta-1.0.0/backend/ledger/serialization/serialization_utils.py +24 -0
  851. grinta-1.0.0/backend/ledger/stream/__init__.py +39 -0
  852. grinta-1.0.0/backend/ledger/stream/async_event_store_wrapper.py +37 -0
  853. grinta-1.0.0/backend/ledger/stream/backpressure.py +264 -0
  854. grinta-1.0.0/backend/ledger/stream/coalescing.py +168 -0
  855. grinta-1.0.0/backend/ledger/stream/compaction.py +176 -0
  856. grinta-1.0.0/backend/ledger/stream/durable_writer.py +358 -0
  857. grinta-1.0.0/backend/ledger/stream/event_stream.py +1132 -0
  858. grinta-1.0.0/backend/ledger/stream/nested_event_store.py +191 -0
  859. grinta-1.0.0/backend/ledger/stream/persistence.py +764 -0
  860. grinta-1.0.0/backend/ledger/stream/stream_stats.py +82 -0
  861. grinta-1.0.0/backend/orchestration/__init__.py +6 -0
  862. grinta-1.0.0/backend/orchestration/action_scheduler.py +199 -0
  863. grinta-1.0.0/backend/orchestration/agent/__init__.py +303 -0
  864. grinta-1.0.0/backend/orchestration/agent/agent_protocol.py +180 -0
  865. grinta-1.0.0/backend/orchestration/agent/autonomy.py +237 -0
  866. grinta-1.0.0/backend/orchestration/agent/circuit_breaker.py +632 -0
  867. grinta-1.0.0/backend/orchestration/agent/tools.py +88 -0
  868. grinta-1.0.0/backend/orchestration/blackboard.py +156 -0
  869. grinta-1.0.0/backend/orchestration/file_edits/__init__.py +1 -0
  870. grinta-1.0.0/backend/orchestration/file_edits/file_edit_transaction.py +418 -0
  871. grinta-1.0.0/backend/orchestration/file_edits/file_state_tracker.py +310 -0
  872. grinta-1.0.0/backend/orchestration/file_edits/pre_exec_diff.py +219 -0
  873. grinta-1.0.0/backend/orchestration/health.py +377 -0
  874. grinta-1.0.0/backend/orchestration/memory_pressure.py +366 -0
  875. grinta-1.0.0/backend/orchestration/middleware/__init__.py +34 -0
  876. grinta-1.0.0/backend/orchestration/middleware/auto_check.py +99 -0
  877. grinta-1.0.0/backend/orchestration/middleware/blackboard.py +103 -0
  878. grinta-1.0.0/backend/orchestration/middleware/circuit_breaker.py +135 -0
  879. grinta-1.0.0/backend/orchestration/middleware/context_window.py +121 -0
  880. grinta-1.0.0/backend/orchestration/middleware/cost_quota.py +65 -0
  881. grinta-1.0.0/backend/orchestration/middleware/destructive_command.py +200 -0
  882. grinta-1.0.0/backend/orchestration/middleware/logging_mw.py +39 -0
  883. grinta-1.0.0/backend/orchestration/middleware/post_edit_diagnostics.py +350 -0
  884. grinta-1.0.0/backend/orchestration/middleware/progress_policy.py +123 -0
  885. grinta-1.0.0/backend/orchestration/middleware/rollback_middleware.py +263 -0
  886. grinta-1.0.0/backend/orchestration/middleware/safety_validator.py +69 -0
  887. grinta-1.0.0/backend/orchestration/middleware/symbol_index_invalidation.py +52 -0
  888. grinta-1.0.0/backend/orchestration/middleware/telemetry.py +31 -0
  889. grinta-1.0.0/backend/orchestration/middleware/tool_result_validator.py +392 -0
  890. grinta-1.0.0/backend/orchestration/mixins/__init__.py +59 -0
  891. grinta-1.0.0/backend/orchestration/mixins/action.py +171 -0
  892. grinta-1.0.0/backend/orchestration/mixins/lifecycle.py +357 -0
  893. grinta-1.0.0/backend/orchestration/mixins/parallel.py +537 -0
  894. grinta-1.0.0/backend/orchestration/mixins/state.py +436 -0
  895. grinta-1.0.0/backend/orchestration/mixins/step.py +253 -0
  896. grinta-1.0.0/backend/orchestration/mixins/watchdog.py +194 -0
  897. grinta-1.0.0/backend/orchestration/orchestration_config.py +107 -0
  898. grinta-1.0.0/backend/orchestration/rate_governor.py +238 -0
  899. grinta-1.0.0/backend/orchestration/replay.py +220 -0
  900. grinta-1.0.0/backend/orchestration/safety_validator.py +368 -0
  901. grinta-1.0.0/backend/orchestration/services/__init__.py +67 -0
  902. grinta-1.0.0/backend/orchestration/services/action_execution_service.py +856 -0
  903. grinta-1.0.0/backend/orchestration/services/action_service.py +239 -0
  904. grinta-1.0.0/backend/orchestration/services/autonomy_service.py +89 -0
  905. grinta-1.0.0/backend/orchestration/services/circuit_breaker_service.py +142 -0
  906. grinta-1.0.0/backend/orchestration/services/confirmation_service.py +174 -0
  907. grinta-1.0.0/backend/orchestration/services/error_formatting.py +214 -0
  908. grinta-1.0.0/backend/orchestration/services/event_router_mixins/__init__.py +33 -0
  909. grinta-1.0.0/backend/orchestration/services/event_router_mixins/_event_router_actions_mixin.py +286 -0
  910. grinta-1.0.0/backend/orchestration/services/event_router_mixins/_event_router_delegate_helpers.py +280 -0
  911. grinta-1.0.0/backend/orchestration/services/event_router_mixins/_event_router_delegate_mixin.py +818 -0
  912. grinta-1.0.0/backend/orchestration/services/event_router_mixins/_event_router_state_mixin.py +85 -0
  913. grinta-1.0.0/backend/orchestration/services/event_router_mixins/_event_router_user_message_mixin.py +201 -0
  914. grinta-1.0.0/backend/orchestration/services/event_router_service.py +52 -0
  915. grinta-1.0.0/backend/orchestration/services/exception_handler_service.py +106 -0
  916. grinta-1.0.0/backend/orchestration/services/guard_bus.py +186 -0
  917. grinta-1.0.0/backend/orchestration/services/iteration_guard_service.py +139 -0
  918. grinta-1.0.0/backend/orchestration/services/iteration_service.py +104 -0
  919. grinta-1.0.0/backend/orchestration/services/lifecycle_service.py +105 -0
  920. grinta-1.0.0/backend/orchestration/services/observation_service.py +508 -0
  921. grinta-1.0.0/backend/orchestration/services/orchestration_context.py +279 -0
  922. grinta-1.0.0/backend/orchestration/services/pending_action_service.py +642 -0
  923. grinta-1.0.0/backend/orchestration/services/recovery_service.py +717 -0
  924. grinta-1.0.0/backend/orchestration/services/retry_queue.py +353 -0
  925. grinta-1.0.0/backend/orchestration/services/retry_service.py +657 -0
  926. grinta-1.0.0/backend/orchestration/services/safety_service.py +157 -0
  927. grinta-1.0.0/backend/orchestration/services/state_transition_service.py +267 -0
  928. grinta-1.0.0/backend/orchestration/services/step_decision_service.py +119 -0
  929. grinta-1.0.0/backend/orchestration/services/step_guard_service.py +580 -0
  930. grinta-1.0.0/backend/orchestration/services/step_prerequisite_service.py +64 -0
  931. grinta-1.0.0/backend/orchestration/services/stuck_detection_service.py +50 -0
  932. grinta-1.0.0/backend/orchestration/services/task_validation_service.py +113 -0
  933. grinta-1.0.0/backend/orchestration/session_orchestrator.py +582 -0
  934. grinta-1.0.0/backend/orchestration/session_orchestrator_accessors.py +121 -0
  935. grinta-1.0.0/backend/orchestration/state/__init__.py +46 -0
  936. grinta-1.0.0/backend/orchestration/state/control_flags.py +118 -0
  937. grinta-1.0.0/backend/orchestration/state/session_checkpoint_manager.py +131 -0
  938. grinta-1.0.0/backend/orchestration/state/state.py +980 -0
  939. grinta-1.0.0/backend/orchestration/state/state_tracker.py +427 -0
  940. grinta-1.0.0/backend/orchestration/stuck/__init__.py +5 -0
  941. grinta-1.0.0/backend/orchestration/stuck/detector.py +772 -0
  942. grinta-1.0.0/backend/orchestration/stuck/patterns.py +187 -0
  943. grinta-1.0.0/backend/orchestration/telemetry/__init__.py +1 -0
  944. grinta-1.0.0/backend/orchestration/telemetry/conversation_stats.py +231 -0
  945. grinta-1.0.0/backend/orchestration/telemetry/progress_tracker.py +281 -0
  946. grinta-1.0.0/backend/orchestration/telemetry/tool_telemetry.py +580 -0
  947. grinta-1.0.0/backend/orchestration/tool_pipeline.py +155 -0
  948. grinta-1.0.0/backend/persistence/README.md +32 -0
  949. grinta-1.0.0/backend/persistence/__init__.py +56 -0
  950. grinta-1.0.0/backend/persistence/auth.py +57 -0
  951. grinta-1.0.0/backend/persistence/conversation/__init__.py +1 -0
  952. grinta-1.0.0/backend/persistence/conversation/conversation_resumer.py +156 -0
  953. grinta-1.0.0/backend/persistence/conversation/conversation_store.py +78 -0
  954. grinta-1.0.0/backend/persistence/conversation/conversation_validator.py +195 -0
  955. grinta-1.0.0/backend/persistence/conversation/file_conversation_store.py +257 -0
  956. grinta-1.0.0/backend/persistence/data_models/__init__.py +1 -0
  957. grinta-1.0.0/backend/persistence/data_models/conversation_metadata.py +52 -0
  958. grinta-1.0.0/backend/persistence/data_models/conversation_metadata_result_set.py +19 -0
  959. grinta-1.0.0/backend/persistence/data_models/conversation_status.py +43 -0
  960. grinta-1.0.0/backend/persistence/data_models/conversation_template.py +96 -0
  961. grinta-1.0.0/backend/persistence/data_models/knowledge_base.py +164 -0
  962. grinta-1.0.0/backend/persistence/data_models/settings.py +354 -0
  963. grinta-1.0.0/backend/persistence/data_models/user_secrets.py +263 -0
  964. grinta-1.0.0/backend/persistence/file_store/__init__.py +0 -0
  965. grinta-1.0.0/backend/persistence/file_store/atomic_write.py +42 -0
  966. grinta-1.0.0/backend/persistence/file_store/files.py +65 -0
  967. grinta-1.0.0/backend/persistence/file_store/in_memory_file_store.py +95 -0
  968. grinta-1.0.0/backend/persistence/file_store/local_file_store.py +241 -0
  969. grinta-1.0.0/backend/persistence/knowledge_base/__init__.py +1 -0
  970. grinta-1.0.0/backend/persistence/knowledge_base/knowledge_base_store.py +302 -0
  971. grinta-1.0.0/backend/persistence/knowledge_base/migrations/001_create_knowledge_base_tables.sql +38 -0
  972. grinta-1.0.0/backend/persistence/knowledge_base/migrations/__init__.py +1 -0
  973. grinta-1.0.0/backend/persistence/knowledge_base/migrations/run_migrations.py +81 -0
  974. grinta-1.0.0/backend/persistence/locations.py +341 -0
  975. grinta-1.0.0/backend/persistence/secrets/__init__.py +1 -0
  976. grinta-1.0.0/backend/persistence/secrets/file_secrets_store.py +101 -0
  977. grinta-1.0.0/backend/persistence/secrets/secrets_store.py +39 -0
  978. grinta-1.0.0/backend/persistence/settings/__init__.py +1 -0
  979. grinta-1.0.0/backend/persistence/settings/file_settings_store.py +150 -0
  980. grinta-1.0.0/backend/persistence/settings/settings_store.py +40 -0
  981. grinta-1.0.0/backend/persistence/sqlite_event_store.py +588 -0
  982. grinta-1.0.0/backend/persistence/user/__init__.py +0 -0
  983. grinta-1.0.0/backend/playbooks/README.md +73 -0
  984. grinta-1.0.0/backend/playbooks/__init__.py +1 -0
  985. grinta-1.0.0/backend/playbooks/add_repo_inst.md +65 -0
  986. grinta-1.0.0/backend/playbooks/address_pr_comments.md +28 -0
  987. grinta-1.0.0/backend/playbooks/agent_memory.md +32 -0
  988. grinta-1.0.0/backend/playbooks/api.md +70 -0
  989. grinta-1.0.0/backend/playbooks/code-review.md +50 -0
  990. grinta-1.0.0/backend/playbooks/database.md +33 -0
  991. grinta-1.0.0/backend/playbooks/debug.md +42 -0
  992. grinta-1.0.0/backend/playbooks/deps.md +67 -0
  993. grinta-1.0.0/backend/playbooks/documentation.md +36 -0
  994. grinta-1.0.0/backend/playbooks/engine/__init__.py +18 -0
  995. grinta-1.0.0/backend/playbooks/engine/playbook.py +673 -0
  996. grinta-1.0.0/backend/playbooks/engine/types.py +97 -0
  997. grinta-1.0.0/backend/playbooks/feature.md +36 -0
  998. grinta-1.0.0/backend/playbooks/git-wizard.md +66 -0
  999. grinta-1.0.0/backend/playbooks/incident.md +51 -0
  1000. grinta-1.0.0/backend/playbooks/log-fu.md +86 -0
  1001. grinta-1.0.0/backend/playbooks/migration.md +54 -0
  1002. grinta-1.0.0/backend/playbooks/net-diag.md +95 -0
  1003. grinta-1.0.0/backend/playbooks/perf.md +60 -0
  1004. grinta-1.0.0/backend/playbooks/python.md +50 -0
  1005. grinta-1.0.0/backend/playbooks/react.md +40 -0
  1006. grinta-1.0.0/backend/playbooks/refactoring.md +33 -0
  1007. grinta-1.0.0/backend/playbooks/security.md +52 -0
  1008. grinta-1.0.0/backend/playbooks/shell.md +41 -0
  1009. grinta-1.0.0/backend/playbooks/testing.md +63 -0
  1010. grinta-1.0.0/backend/playbooks/tool.md +50 -0
  1011. grinta-1.0.0/backend/playbooks/typescript.md +50 -0
  1012. grinta-1.0.0/backend/playbooks/update_pr_description.md +33 -0
  1013. grinta-1.0.0/backend/playbooks/update_test.md +20 -0
  1014. grinta-1.0.0/backend/py.typed +0 -0
  1015. grinta-1.0.0/backend/scripts/README.md +30 -0
  1016. grinta-1.0.0/backend/scripts/build_tree_sitter_lang.py +89 -0
  1017. grinta-1.0.0/backend/scripts/sanitize_trajectories.py +319 -0
  1018. grinta-1.0.0/backend/scripts/verify/README.md +31 -0
  1019. grinta-1.0.0/backend/scripts/verify/check_fastmcp_import.py +14 -0
  1020. grinta-1.0.0/backend/scripts/verify/check_file_size.py +131 -0
  1021. grinta-1.0.0/backend/scripts/verify/check_layer_imports.py +214 -0
  1022. grinta-1.0.0/backend/scripts/verify/ga_onboarding_gate.py +222 -0
  1023. grinta-1.0.0/backend/scripts/verify/reliability_gate.py +238 -0
  1024. grinta-1.0.0/backend/scripts/verify/verify_api_versioning.py +175 -0
  1025. grinta-1.0.0/backend/scripts/verify/verify_optional_imports.py +75 -0
  1026. grinta-1.0.0/backend/security/__init__.py +15 -0
  1027. grinta-1.0.0/backend/security/analyzer.py +131 -0
  1028. grinta-1.0.0/backend/security/command_analyzer.py +686 -0
  1029. grinta-1.0.0/backend/security/options.py +36 -0
  1030. grinta-1.0.0/backend/security/safety_config.py +54 -0
  1031. grinta-1.0.0/backend/task_state/__init__.py +7 -0
  1032. grinta-1.0.0/backend/task_state/models.py +118 -0
  1033. grinta-1.0.0/backend/task_state/service.py +262 -0
  1034. grinta-1.0.0/backend/task_state/store.py +57 -0
  1035. grinta-1.0.0/backend/telemetry/__init__.py +6 -0
  1036. grinta-1.0.0/backend/telemetry/audit_logger.py +370 -0
  1037. grinta-1.0.0/backend/telemetry/models.py +137 -0
  1038. grinta-1.0.0/backend/utils/README.md +18 -0
  1039. grinta-1.0.0/backend/utils/__init__.py +5 -0
  1040. grinta-1.0.0/backend/utils/async_helpers/__init__.py +1 -0
  1041. grinta-1.0.0/backend/utils/async_helpers/async_utils.py +679 -0
  1042. grinta-1.0.0/backend/utils/async_helpers/circuit_breaker.py +196 -0
  1043. grinta-1.0.0/backend/utils/async_helpers/retry.py +260 -0
  1044. grinta-1.0.0/backend/utils/async_helpers/subprocess_bridge.py +56 -0
  1045. grinta-1.0.0/backend/utils/async_helpers/tenacity_metrics.py +131 -0
  1046. grinta-1.0.0/backend/utils/async_helpers/tenacity_stop.py +35 -0
  1047. grinta-1.0.0/backend/utils/conversation_summary.py +250 -0
  1048. grinta-1.0.0/backend/utils/core_utils.py +73 -0
  1049. grinta-1.0.0/backend/utils/http/__init__.py +1 -0
  1050. grinta-1.0.0/backend/utils/http/http_session.py +89 -0
  1051. grinta-1.0.0/backend/utils/http/stdio_json_rpc.py +106 -0
  1052. grinta-1.0.0/backend/utils/impact_analysis.py +488 -0
  1053. grinta-1.0.0/backend/utils/import_utils.py +124 -0
  1054. grinta-1.0.0/backend/utils/linux_host_tools.py +213 -0
  1055. grinta-1.0.0/backend/utils/lsp/__init__.py +1 -0
  1056. grinta-1.0.0/backend/utils/lsp/lsp_capabilities.py +46 -0
  1057. grinta-1.0.0/backend/utils/lsp/lsp_client.py +1173 -0
  1058. grinta-1.0.0/backend/utils/lsp/lsp_project_routing.py +129 -0
  1059. grinta-1.0.0/backend/utils/lsp/lsp_session.py +557 -0
  1060. grinta-1.0.0/backend/utils/lsp/lsp_timeouts.py +61 -0
  1061. grinta-1.0.0/backend/utils/metrics_labels.py +27 -0
  1062. grinta-1.0.0/backend/utils/model_prewarm.py +102 -0
  1063. grinta-1.0.0/backend/utils/optional_extras.py +78 -0
  1064. grinta-1.0.0/backend/utils/path_normalize.py +156 -0
  1065. grinta-1.0.0/backend/utils/prompt.py +388 -0
  1066. grinta-1.0.0/backend/utils/regex_limits.py +24 -0
  1067. grinta-1.0.0/backend/utils/runtime_detect.py +1028 -0
  1068. grinta-1.0.0/backend/utils/search_utils.py +65 -0
  1069. grinta-1.0.0/backend/utils/shutdown_listener.py +97 -0
  1070. grinta-1.0.0/backend/utils/stdio_restore.py +55 -0
  1071. grinta-1.0.0/backend/utils/terminal/__init__.py +1 -0
  1072. grinta-1.0.0/backend/utils/terminal/term_color.py +29 -0
  1073. grinta-1.0.0/backend/utils/terminal/terminal_contract.py +124 -0
  1074. grinta-1.0.0/backend/utils/treesitter/__init__.py +1 -0
  1075. grinta-1.0.0/backend/utils/treesitter/_tse_errors.py +165 -0
  1076. grinta-1.0.0/backend/utils/treesitter/_tse_languages.py +167 -0
  1077. grinta-1.0.0/backend/utils/treesitter/_tse_query.py +328 -0
  1078. grinta-1.0.0/backend/utils/treesitter/_tse_runtime.py +57 -0
  1079. grinta-1.0.0/backend/utils/treesitter/_tse_types.py +49 -0
  1080. grinta-1.0.0/backend/utils/treesitter/chunk_localizer.py +116 -0
  1081. grinta-1.0.0/backend/utils/treesitter/syntax_check.py +281 -0
  1082. grinta-1.0.0/backend/utils/treesitter/treesitter_editor.py +767 -0
  1083. grinta-1.0.0/backend/validation/__init__.py +5 -0
  1084. grinta-1.0.0/backend/validation/code_quality/__init__.py +9 -0
  1085. grinta-1.0.0/backend/validation/code_quality/linter.py +339 -0
  1086. grinta-1.0.0/backend/validation/command_classification.py +272 -0
  1087. grinta-1.0.0/backend/validation/task_metadata.py +185 -0
  1088. grinta-1.0.0/backend/validation/task_validator.py +925 -0
  1089. grinta-1.0.0/docs/ADR.md +406 -0
  1090. grinta-1.0.0/docs/ARCHITECTURE.md +243 -0
  1091. grinta-1.0.0/docs/CI.md +69 -0
  1092. grinta-1.0.0/docs/CLI_MODULE_MAP.md +114 -0
  1093. grinta-1.0.0/docs/CLI_THEME_CONTRACT.md +95 -0
  1094. grinta-1.0.0/docs/CODE_REVIEW.md +224 -0
  1095. grinta-1.0.0/docs/CONTRIBUTOR_MAP.md +97 -0
  1096. grinta-1.0.0/docs/DEVELOPER.md +218 -0
  1097. grinta-1.0.0/docs/ENGINES.md +161 -0
  1098. grinta-1.0.0/docs/INFERENCE_AND_INTEGRATIONS.md +63 -0
  1099. grinta-1.0.0/docs/MANUAL_RELEASE_ACTIONS.md +66 -0
  1100. grinta-1.0.0/docs/PERFORMANCE.md +58 -0
  1101. grinta-1.0.0/docs/PLUGIN_GUIDE.md +7 -0
  1102. grinta-1.0.0/docs/QUICK_START.md +113 -0
  1103. grinta-1.0.0/docs/README.md +17 -0
  1104. grinta-1.0.0/docs/REFACTOR_BASELINE.md +154 -0
  1105. grinta-1.0.0/docs/REGRESSION_TESTS.md +16 -0
  1106. grinta-1.0.0/docs/RELEASE_CHECKLIST.md +152 -0
  1107. grinta-1.0.0/docs/RELEASE_NOTES_v1.0.0-rc1.md +83 -0
  1108. grinta-1.0.0/docs/RELEASE_NOTES_v1.0.0.md +31 -0
  1109. grinta-1.0.0/docs/RELIABILITY.md +211 -0
  1110. grinta-1.0.0/docs/RELIABILITY_AUDIT_CHECKLIST.md +69 -0
  1111. grinta-1.0.0/docs/SECURITY_CHECKLIST.md +63 -0
  1112. grinta-1.0.0/docs/SETTINGS.md +124 -0
  1113. grinta-1.0.0/docs/SUPPORT_MATRIX.md +70 -0
  1114. grinta-1.0.0/docs/TROUBLESHOOTING.md +52 -0
  1115. grinta-1.0.0/docs/TWO_MODE_FILE_EDITING.md +15 -0
  1116. grinta-1.0.0/docs/USER_GUIDE.md +44 -0
  1117. grinta-1.0.0/docs/VOCABULARY.md +70 -0
  1118. grinta-1.0.0/docs/assets/logo.svg +50 -0
  1119. grinta-1.0.0/docs/assets/social-preview.png +0 -0
  1120. grinta-1.0.0/docs/evidence/2026-07-09-autonomous-run-report.md +219 -0
  1121. grinta-1.0.0/docs/internals/README.md +95 -0
  1122. grinta-1.0.0/docs/internals/confirmation-autonomy.md +123 -0
  1123. grinta-1.0.0/docs/internals/import-manifest.json +32248 -0
  1124. grinta-1.0.0/docs/internals/mode-switching.md +98 -0
  1125. grinta-1.0.0/docs/journey/00-the-meaning-of-grinta.md +37 -0
  1126. grinta-1.0.0/docs/journey/01-the-saas-fortress.md +315 -0
  1127. grinta-1.0.0/docs/journey/02-the-killed-darlings.md +521 -0
  1128. grinta-1.0.0/docs/journey/03-the-architectural-gauntlet.md +276 -0
  1129. grinta-1.0.0/docs/journey/04-the-context-war.md +365 -0
  1130. grinta-1.0.0/docs/journey/05-the-giants-playbook.md +501 -0
  1131. grinta-1.0.0/docs/journey/06-the-system-design-playbook.md +657 -0
  1132. grinta-1.0.0/docs/journey/07-the-road-ahead.md +292 -0
  1133. grinta-1.0.0/docs/journey/08-the-first-fixed-issue.md +165 -0
  1134. grinta-1.0.0/docs/journey/09-the-3am-decisions.md +101 -0
  1135. grinta-1.0.0/docs/journey/10-model-agnostic-reckoning.md +132 -0
  1136. grinta-1.0.0/docs/journey/11-the-console-wars.md +117 -0
  1137. grinta-1.0.0/docs/journey/12-open-source-was-the-better-business.md +98 -0
  1138. grinta-1.0.0/docs/journey/13-the-hidden-playbooks.md +323 -0
  1139. grinta-1.0.0/docs/journey/14-the-verification-tax.md +292 -0
  1140. grinta-1.0.0/docs/journey/15-prompts-are-programs.md +214 -0
  1141. grinta-1.0.0/docs/journey/17-the-pragmatic-stack.md +74 -0
  1142. grinta-1.0.0/docs/journey/18-the-mind-of-the-agent.md +113 -0
  1143. grinta-1.0.0/docs/journey/19-surviving-the-crash.md +155 -0
  1144. grinta-1.0.0/docs/journey/20-circuit-breakers-and-hallucinations.md +184 -0
  1145. grinta-1.0.0/docs/journey/21-the-safety-sandbox-is-not-optional.md +126 -0
  1146. grinta-1.0.0/docs/journey/22-who-grades-the-agent.md +133 -0
  1147. grinta-1.0.0/docs/journey/23-the-middleware-contract.md +152 -0
  1148. grinta-1.0.0/docs/journey/24-the-identity-and-execution-crisis.md +119 -0
  1149. grinta-1.0.0/docs/journey/25-the-parallelization-trap.md +80 -0
  1150. grinta-1.0.0/docs/journey/27-the-observability-black-hole.md +164 -0
  1151. grinta-1.0.0/docs/journey/30-the-weight-divide-local-vs-hosted.md +61 -0
  1152. grinta-1.0.0/docs/journey/32-the-two-lives-of-the-terminal.md +70 -0
  1153. grinta-1.0.0/docs/journey/33-the-small-async-wars.md +120 -0
  1154. grinta-1.0.0/docs/journey/34-the-fuzzy-match-heresy.md +127 -0
  1155. grinta-1.0.0/docs/journey/35-the-self-knowing-agent.md +90 -0
  1156. grinta-1.0.0/docs/journey/36-the-required-risk.md +97 -0
  1157. grinta-1.0.0/docs/journey/37-the-verbose-status.md +88 -0
  1158. grinta-1.0.0/docs/journey/38-the-vendor-neutral-bench.md +107 -0
  1159. grinta-1.0.0/docs/journey/39-the-semantic-memory-that-survived.md +157 -0
  1160. grinta-1.0.0/docs/journey/40-the-facade-pattern-and-the-smaller-file-api.md +160 -0
  1161. grinta-1.0.0/docs/journey/41-the-mode-split.md +57 -0
  1162. grinta-1.0.0/docs/journey/42-the-interface-returned.md +72 -0
  1163. grinta-1.0.0/docs/journey/43-the-plugin-boundary.md +77 -0
  1164. grinta-1.0.0/docs/journey/44-the-empty-folder-trials.md +105 -0
  1165. grinta-1.0.0/docs/journey/45-the-product-surface-became-real.md +216 -0
  1166. grinta-1.0.0/docs/journey/46-the-decomposition-wave.md +293 -0
  1167. grinta-1.0.0/docs/journey/47-the-long-runs-and-their-receipts.md +116 -0
  1168. grinta-1.0.0/docs/journey/48-the-continuity-contract.md +143 -0
  1169. grinta-1.0.0/docs/journey/EVIDENCE.md +80 -0
  1170. grinta-1.0.0/docs/journey/README.md +212 -0
  1171. grinta-1.0.0/docs/journey/preface-why-this-story-matters.md +139 -0
  1172. grinta-1.0.0/docs/launch/CONTRIBUTOR_ISSUES.md +51 -0
  1173. grinta-1.0.0/docs/launch/REPOSITORY_SETTINGS.md +22 -0
  1174. grinta-1.0.0/docs/mcp/integration_examples.md +58 -0
  1175. grinta-1.0.0/docs/message_format.md +68 -0
  1176. grinta-1.0.0/docs/onboarding_reports/2026-07-08_source_windows_2.md +42 -0
  1177. grinta-1.0.0/docs/onboarding_reports/GA_GATE_STATUS.md +18 -0
  1178. grinta-1.0.0/docs/onboarding_reports/README.md +16 -0
  1179. grinta-1.0.0/docs/onboarding_reports/REPORT_TEMPLATE.md +46 -0
  1180. grinta-1.0.0/docs/plugins/authoring_guide.md +70 -0
  1181. grinta-1.0.0/docs/showcase/autonomous-4h-session.md +24 -0
  1182. grinta-1.0.0/docs/showcase/compilation-failure-recovery.md +25 -0
  1183. grinta-1.0.0/docs/showcase/issue-tracker-build.md +19 -0
  1184. grinta-1.0.0/docs/showcase/raft-kv-store.md +24 -0
  1185. grinta-1.0.0/launch/__init__.py +1 -0
  1186. grinta-1.0.0/launch/entry.py +103 -0
  1187. grinta-1.0.0/mypy.ini +232 -0
  1188. grinta-1.0.0/packaging/homebrew/grinta.rb +32 -0
  1189. grinta-1.0.0/packaging/scoop/grinta.json +25 -0
  1190. grinta-1.0.0/packaging/vulture_whitelist.py +23 -0
  1191. grinta-1.0.0/pydoc-markdown.yml +14 -0
  1192. grinta-1.0.0/pyproject.toml +334 -0
  1193. grinta-1.0.0/pytest.ini +34 -0
  1194. grinta-1.0.0/scripts/README.md +56 -0
  1195. grinta-1.0.0/scripts/bootstrap_env.py +97 -0
  1196. grinta-1.0.0/scripts/build.sh +4 -0
  1197. grinta-1.0.0/scripts/check_contributor_bootstrap.sh +46 -0
  1198. grinta-1.0.0/scripts/dev/clean_pycache.py +71 -0
  1199. grinta-1.0.0/scripts/discover_public_imports.py +533 -0
  1200. grinta-1.0.0/scripts/docker/docker_start.ps1 +43 -0
  1201. grinta-1.0.0/scripts/docker/docker_start.sh +53 -0
  1202. grinta-1.0.0/scripts/evals/agent_comparison_pack.json +179 -0
  1203. grinta-1.0.0/scripts/evals/grinta_results.template.json +97 -0
  1204. grinta-1.0.0/scripts/evals/quarantine/run_realworld_task.py +384 -0
  1205. grinta-1.0.0/scripts/evals/quarantine/score_agent_eval_pack.py +77 -0
  1206. grinta-1.0.0/scripts/evals/results/.gitkeep +0 -0
  1207. grinta-1.0.0/scripts/launch/grinta-dev.sh +7 -0
  1208. grinta-1.0.0/scripts/launch/start_here.ps1 +165 -0
  1209. grinta-1.0.0/scripts/launch/start_here.sh +178 -0
  1210. grinta-1.0.0/scripts/launch/start_here_pipx.ps1 +98 -0
  1211. grinta-1.0.0/scripts/launch/start_here_pipx.sh +82 -0
  1212. grinta-1.0.0/scripts/probe_llm_settings.py +182 -0
  1213. grinta-1.0.0/scripts/render_session_log.py +44 -0
  1214. grinta-1.0.0/scripts/smoke/Dockerfile.smoke +35 -0
  1215. grinta-1.0.0/scripts/smoke/cli_llm_stub_sitecustomize.py +113 -0
  1216. grinta-1.0.0/scripts/smoke/run_cli_with_stub.py +41 -0
  1217. grinta-1.0.0/scripts/smoke/run_stub_cli_task.ps1 +77 -0
  1218. grinta-1.0.0/scripts/smoke/run_stub_cli_task.sh +76 -0
  1219. grinta-1.0.0/scripts/smoke/smoke_install.ps1 +97 -0
  1220. grinta-1.0.0/scripts/smoke/smoke_install.sh +82 -0
  1221. grinta-1.0.0/scripts/smoke/smoke_source_onboarding.ps1 +41 -0
  1222. grinta-1.0.0/scripts/smoke/smoke_source_onboarding.sh +40 -0
  1223. grinta-1.0.0/scripts/smoke/smoke_wsl_layout.sh +40 -0
  1224. grinta-1.0.0/scripts/strip_session_log.py +45 -0
  1225. grinta-1.0.0/scripts/tui-profiles/fast-streaming.ps1 +10 -0
  1226. grinta-1.0.0/scripts/tui-profiles/low-memory.ps1 +10 -0
@@ -0,0 +1,81 @@
1
+ # Python
2
+ .venv/
3
+ .venv-smoke/
4
+ __pycache__/
5
+ *.pyc
6
+ *.pyo
7
+ *.pyd
8
+ pip/
9
+
10
+ # Node (residual)
11
+ node_modules/
12
+ dist/
13
+ build/
14
+
15
+ # OS
16
+ .DS_Store
17
+ *.log
18
+
19
+ # Backup files
20
+ *.bak
21
+
22
+ # Secrets
23
+ .env
24
+ .env.local
25
+ .jwt_secret
26
+ ~/
27
+ backend/~/ # Never commit JWT secrets or sensitive backend configs
28
+
29
+ # Runtime config (user-specific — only template is tracked)
30
+ settings.json
31
+
32
+ # Test coverage reports
33
+ coverage/
34
+ .coverage
35
+ .coverage.*
36
+ coverage.json
37
+ coverage.xml
38
+ coverage-full.xml
39
+ coverage_report.json
40
+ *.cover
41
+ htmlcov/
42
+
43
+ # Generated dependency audit exports
44
+ audit-requirements.txt
45
+
46
+ # Test framework caches
47
+ .hypothesis/
48
+ .pytest_cache/
49
+ .mypy_cache/
50
+ .ruff_cache/
51
+ .tox/
52
+
53
+ # Analysis / lint tool output
54
+ mypy_*.txt
55
+ pylint_*.txt
56
+ *_results.txt
57
+ *_check.txt
58
+
59
+ # Local pip download cache (must not be tracked)
60
+ pip/cache/
61
+
62
+ # Grinta runtime logs (always under install tree ``logs/``, not workspace cwd)
63
+ logs/*
64
+ !logs/README.md
65
+ !logs/.gitkeep
66
+
67
+ # Debug/error logs
68
+ *.out
69
+ tsc_errors*.txt
70
+
71
+ backend/MagicMock/
72
+ .pytest-reliability/
73
+ bandit-out.json
74
+
75
+ # Release assets and generated agent state
76
+ backend/.grinta/
77
+ rustup-init.exe
78
+ grinta_raft.mp4
79
+ docs/assets/grinta-demo.mp4
80
+ docs/assets/grinta-demo-preview.webp
81
+ traces/**/session.zip
@@ -0,0 +1,304 @@
1
+ # Changelog
2
+
3
+ All notable changes to Grinta will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+
12
+ - **Repository launch surface:** a compact README hero, animated recovery
13
+ preview, capability table, contributor call, and direct links to the
14
+ strongest autonomous-run evidence.
15
+ - **Public showcase:** standardized case studies for the 4h 33m autonomous
16
+ session, failure recovery, issue-tracker build, and Raft key-value store.
17
+ - **Shareable media:** a 1280 × 640 social-preview asset and a compressed,
18
+ looping WebP excerpt that links to the full demo.
19
+
20
+ ### Changed
21
+
22
+ - **Package discovery metadata:** expanded the package description, keywords,
23
+ classifiers, and project URLs for package-index searchability.
24
+ - **Citation metadata:** credits maintainer Youssef Mejdi and records the
25
+ public repository URL.
26
+
27
+ ### Removed
28
+
29
+ - **`read_symbol` tool removed after a brief trial.** Targeted discovery remains
30
+ in `find_symbols`; file content is read through `read_file`. Removing the
31
+ dedicated tool keeps the final public file surface at six tools.
32
+
33
+ - **`edit_symbol` tool removed.** The model was not using it; the schema
34
+ was complex (six optional disambiguation fields plus `new_content`),
35
+ and `replace_string` covers the same ground with a simpler schema the
36
+ model already uses confidently. Symbol discovery stays in `find_symbols`;
37
+ content reads stay in `read_file`.
38
+ - **`create(type="symbol")` mode removed.** `create` is now file-only.
39
+ Insert new symbols via `replace_string` with an anchor line.
40
+ - **`multiedit` `edit_symbol` command removed.** `multiedit` now
41
+ supports `replace_string` operations only. The `allOf`/`if-then`
42
+ conditional schema is gone; the operation shape is just
43
+ `path`, `old_string`, `new_string`, `replace_all`.
44
+
45
+ ### Changed
46
+
47
+ - **Packaging:** PDF/DOCX/PPTX/LaTeX parsers (`pypdf`, `python-docx`,
48
+ `python-pptx`, `pylatexenc`) are included in the base install; the
49
+ `[documents]` extra is removed. Optional extras are now `[rag]`, `[browser]`,
50
+ and `[all]`.
51
+ - **Packaging:** `debugpy` is no longer bundled in the base wheel. Python
52
+ debugging is auto-detected when `debugpy` is installed in the active
53
+ environment (`pip install debugpy`), consistent with other DAP adapters and
54
+ LSP servers. Contributor dev deps still include `debugpy`.
55
+ - **Model-facing file API:** `read` renamed to `read_file`, `create` renamed
56
+ to `create_file`, and the old `read(type="symbols")` mode was retired. A
57
+ dedicated `read_symbol` tool was tried and later removed. Final public tools:
58
+ `read_file`, `find_symbols`, `create_file`, `replace_string`, `multiedit`,
59
+ `undo_last_edit`.
60
+ - **CI:** `py-tests` required jobs on Linux and Windows run the full
61
+ `backend/tests/unit` corpus (fast PR gates), not a fixed nine-file slice.
62
+ [docs/CI.md](docs/CI.md) documents the tiers.
63
+ - **Testing:** [`pytest.ini`](pytest.ini) `testpaths` defaults to
64
+ `backend/tests` (full tree for a bare `pytest`); use `pytest backend/tests/unit`
65
+ to match the required gates locally.
66
+ - **Docs:** [CONTRIBUTING.md](CONTRIBUTING.md) testing instructions match CI;
67
+ added [docs/RELEASE_CHECKLIST.md](docs/RELEASE_CHECKLIST.md),
68
+ [docs/REGRESSION_TESTS.md](docs/REGRESSION_TESTS.md); user-facing autonomy
69
+ naming is **conservative** / **balanced** / **full** only
70
+ ([docs/SECURITY_CHECKLIST.md](docs/SECURITY_CHECKLIST.md),
71
+ [docs/USER_GUIDE.md](docs/USER_GUIDE.md)).
72
+ - **OSS readiness:** added governance and ownership policy docs
73
+ ([GOVERNANCE.md](GOVERNANCE.md), [MAINTAINERS.md](MAINTAINERS.md)),
74
+ published [docs/SUPPORT_MATRIX.md](docs/SUPPORT_MATRIX.md), expanded
75
+ [SUPPORT.md](SUPPORT.md) with response targets, and added
76
+ [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
77
+
78
+ ### Removed
79
+
80
+ - **`supervised` autonomy spelling:** Config, `/autonomy`, and
81
+ `PermissionsConfig.get_preset()` no longer accept `supervised`; use
82
+ `conservative` (same behaviour). A clear validation error points to
83
+ `conservative` if old configs still say `supervised`.
84
+
85
+ ## [1.0.0-rc1] - 2026-04-29
86
+
87
+ First release candidate. Includes everything in `0.56.0` plus the
88
+ pre-launch polish below. Tagged as `rc1` to invite community feedback
89
+ before the final `1.0.0` cut.
90
+
91
+ ### Added
92
+
93
+ - **Symbol-aware reading restored** (tree-sitter-backed). Lets the
94
+ agent fetch named symbols or a whole file through the public file API,
95
+ replacing the previous multi-call dance of code search plus file reads.
96
+ Backed by the already-core
97
+ `backend.utils.treesitter_editor.TreeSitterEditor.find_symbol()`. Wired
98
+ through `planner.py`, `function_calling.py`, and the CLI display layer.
99
+ - **README** rewritten with a multi-line pitch and an 11-row competitor
100
+ comparison table (Grinta vs Aider, Claude Code, Codex CLI) covering
101
+ install size, provider-agnosticism, local-first posture, LSP, DAP, HUD,
102
+ stuck-detection, hardened_local profile, checkpoint/resume, Windows
103
+ parity, and MCP support.
104
+ - **Demo material**: `docs/DEMO_SCRIPT.md` — a 60-second asciinema scenario
105
+ (`demo_app/calc.py::average` `ZeroDivisionError`) plus an `agg` command
106
+ for converting the cast into a GIF for the README.
107
+ - **Smoke-test scripts** for clean-box install verification:
108
+ - `scripts/smoke/smoke_install.sh` (Linux/macOS, accepts extras as positional
109
+ args; prefers a local wheel from `$WHEEL_DIR=./dist`, falls back to PyPI).
110
+ - `scripts/smoke/smoke_install.ps1` (Windows mirror; reports site-packages MB).
111
+ - `scripts/Dockerfile.smoke` (Python 3.12-slim base, ripgrep pre-installed,
112
+ `EXTRAS` env var picks the optional extras to test).
113
+ Each script runs `python -c "import backend"`, `--help`, and
114
+ `verify_optional_imports.py` so a broken extras gate is caught before
115
+ publishing to PyPI.
116
+ - **GitHub label catalog** at `.github/labels.yml` covering triage,
117
+ type, severity, OS (`os: windows|linux|macos`), provider
118
+ (`provider: openai|anthropic|google|openrouter|ollama|lmstudio`), area
119
+ (`area: cli|engine|execution|lsp|dap|rag|mcp|safety|telemetry|packaging`),
120
+ contributor onboarding, and release governance. Apply with
121
+ `gh label sync -f .github/labels.yml`.
122
+
123
+ ### Changed
124
+
125
+ - **Wheel size**: stable at ~1.4 MB on the base install (see `0.56.0`).
126
+ - **Issue template** version hint bumped to `1.0.0rc1`.
127
+ - **Autonomy is now a single-axis knob**. The three modes
128
+ (`conservative` / `balanced` / `full`) share identical execution,
129
+ prompting, and retry behaviour. The _only_ difference between them is
130
+ _when_ the runtime stops to ask the user before running an action:
131
+ conservative asks for every action, balanced asks only for high-risk
132
+ actions, full never asks. The system prompt no longer branches on the
133
+ mode (the previous "FULL AUTONOMOUS MODE" block has been replaced by a
134
+ single mode-agnostic sentence so the prompt stays correct when the
135
+ user toggles modes mid-session via `/autonomy`).
136
+ - **Cost caps and iteration limits decoupled from autonomy**.
137
+ `max_cost_per_task`, `warn_at_cost`, `max_autonomous_iterations`, and
138
+ `stuck_threshold_iterations` are now standalone config keys with
139
+ global defaults; they apply universally regardless of autonomy mode.
140
+ `PermissionsConfig.get_preset()` no longer pre-fills cost caps per
141
+ mode, and the "this knob only applies in full autonomy" warning has
142
+ been removed.
143
+
144
+ ### Added
145
+
146
+ - **Per-session "always allow" memory** for the confirmation gate. The
147
+ approval prompt now offers `[y/n/a=always]`; choosing `a` whitelists
148
+ that exact action signature (e.g. the literal command string) for the
149
+ remainder of the session so the agent does not re-ask for the same
150
+ `pytest -q`, `git status`, or `ls` over and over. The whitelist is
151
+ in-memory only and is cleared on process exit.
152
+
153
+ ### Migration
154
+
155
+ - **`autonomy_level: supervised` is renamed to `conservative`** to
156
+ better describe the behaviour ("confirm every action in the confirmation
157
+ flow") and to avoid implying extra oversight features that don't exist.
158
+ The string `supervised` is **rejected** in config files and on the
159
+ `/autonomy` slash command; use `conservative` instead.
160
+ - Set `max_budget_per_task` explicitly in `settings.json` for per-task
161
+ spend caps (see [docs/SETTINGS.md](docs/SETTINGS.md)).
162
+
163
+ ## [0.56.0] - 2026-04-29
164
+
165
+ ### Added
166
+
167
+ - **Auto-discovery of LSP servers**: `LspClient` now probes `PATH` for
168
+ installed language servers (pylsp, typescript-language-server, rust-analyzer,
169
+ gopls, clangd, jdtls, omnisharp, lua-language-server, bash-language-server,
170
+ vscode-html-language-server, vscode-css-language-server, vscode-json-language-server,
171
+ yaml-language-server, ruby-lsp, solargraph, intelephense, terraform-ls).
172
+ No more pylsp-only gating.
173
+ - **Auto-discovery of DAP debug adapters**: `DAPDebugManager` now probes
174
+ `PATH` for `dlv`, `codelldb`, `lldb-dap`, `netcoredbg`, `node`, etc. and
175
+ falls back to a sensible adapter command when the model omits `adapter_command`.
176
+ Python remains batteries-included via bundled `debugpy`.
177
+ - `detect_lsp_servers()` and `detect_debug_adapters()` discovery helpers
178
+ exported for diagnostics / UI.
179
+ - Optional dependency extras: `[rag]` (chromadb + ONNX MiniLM-L6-v2),
180
+ `[documents]` (PyPDF2 / python-docx / python-pptx / pylatexenc),
181
+ `[browser]` (browser-use), and `[all]` (everything).
182
+
183
+ ### Changed
184
+
185
+ - `enable_lsp_query` now defaults to **`True`** — the planner enables the
186
+ `lsp` tool whenever any supported LSP server is on `PATH`.
187
+ - DAP `start` no longer requires the model to supply `adapter_command` for
188
+ languages whose adapter is auto-discoverable.
189
+ - **Massive install slim-down**: base wheel dropped from ~1.6GB to ~1.4MB.
190
+ Achieved by gating `chromadb` behind the `[rag]` extra, dropping the
191
+ redundant `sentence-transformers` + `torch` + `transformers` stack in
192
+ favour of chromadb's bundled ONNX `DefaultEmbeddingFunction` (384-dim,
193
+ ~80MB) when `[rag]` is installed, and moving document parsers
194
+ (`PyPDF2`, `python-docx`, `python-pptx`, `pylatexenc`) behind
195
+ `[documents]`. `enable_vector_memory` and `enable_hybrid_retrieval`
196
+ agent-config flags now default to `False`.
197
+ - `MemoryMonitor` migrated from `memory-profiler` to a `psutil`-based RSS
198
+ sampler thread (no behaviour change for callers).
199
+
200
+ ### Removed
201
+
202
+ - **GraphRAG** subsystem (`backend/context/graph_rag.py`,
203
+ `graph_store.py`) and its dependent tools (`explore_tree_structure`,
204
+ `read_symbol_definition`). The four remaining retrieval primitives
205
+ (`grep` / `glob` via ripgrep, `find_symbols` / `read` via tree-sitter,
206
+ `lsp` via LSP) cover the same surface
207
+ without the index-maintenance cost.
208
+ - **`ReRanker`** class and the cross-encoder rerank step from
209
+ `EnhancedVectorStore` — over-engineered for a CLI agent's recall
210
+ workload. Hybrid retrieval now returns top-k candidates directly.
211
+ - Unused dependencies dropped from base install: `sentence-transformers`,
212
+ `optimum`, `puremagic`, `memory-profiler`, plus the eager top-level
213
+ imports of `python-docx` / `python-pptx` / `pylatexenc` / `PyPDF2` /
214
+ `chromadb`.
215
+
216
+ ## [0.55.0] - 2026-04-29
217
+
218
+ First public open-source release. Grinta is now a **CLI-only**, local-first
219
+ coding agent with no managed web UI, no hosted control plane, and no built-in
220
+ HTTP server.
221
+
222
+ ### Added
223
+
224
+ - Open-source release on PyPI as `grinta`, with Homebrew and Scoop manifests
225
+ in `packaging/` for native installs on macOS and Windows.
226
+ - `CHANGELOG.md` following [keepachangelog.com](https://keepachangelog.com)
227
+ format and `SECURITY.md` describing reporting, threat model, and supported
228
+ versions.
229
+ - `docs/SECURITY_CHECKLIST.md` documenting the trust boundary, built-in
230
+ protections, and operator pre-flight checklist for untrusted repositories.
231
+ - `hardened_local` execution profile with workspace-scoped allowlists for git,
232
+ package, and network-capable commands; CRITICAL refusal gate enforced in
233
+ `safety_validator.py` regardless of profile or autonomy level.
234
+ - Session checkpoint and resume support via `SessionCheckpointManager`.
235
+ - `LLMRateGovernor` per-session token-rate throttling and cost-acceleration
236
+ loop detection in `StuckDetector` to bound runaway agent loops.
237
+ - Real auto-recovery in `ErrorRecoveryStrategy` covering network retry,
238
+ context truncation, and runtime restart.
239
+ - Canonical local-server startup planner shared by `start_server.py` and the
240
+ embedded mode, with the resolved plan surfaced in health and settings
241
+ output.
242
+ - Audit logging middleware for sensitive operations (settings, secrets,
243
+ conversations) writing to `~/.grinta/workspaces/<id>/storage/<session>/audit/`.
244
+ - Plugin authoring guide (`docs/PLUGIN_GUIDE.md`) and MCP integration examples
245
+ (`docs/MCP_EXAMPLES.md`).
246
+ - Cross-platform CI matrix on GitHub Actions: Ubuntu and Windows are required
247
+ gates; macOS runs as advisory in both `py-tests.yml` and `e2e-tests.yml`.
248
+
249
+ ### Changed
250
+
251
+ - Repositioned Grinta as a **CLI-only** coding agent. Removed the React web
252
+ UI, Socket.IO surface, Textual TUI prototype, and the public
253
+ `/api/v1/monitoring/*` HTTP endpoints. The CLI is the sole interactive
254
+ surface.
255
+ - Removed all cloud runtime dependencies (`e2b`, `modal`,
256
+ `runloop-api-client`, `daytona`) for a strictly local-first runtime.
257
+ - Renamed `get_remote_runtime_config` -> `get_runtime_config`.
258
+ - Hardened the local execution policy: interactive terminals, command cwd,
259
+ uploads, and direct file access stay workspace-scoped under
260
+ `security.execution_profile = "hardened_local"`.
261
+ - Crash recovery now fails closed more often, tracks restore provenance, and
262
+ uses persisted control-event evidence to distinguish stale WAL from
263
+ ambiguous recovery.
264
+ - Trimmed base dependencies: `asyncpg` and `libtmux` moved to optional
265
+ groups; `python-socketio` removed from base runtime.
266
+ - Consolidated editor tools around a smaller public file API;
267
+ older experimental editor modules are deprecated.
268
+ - Broke up `action_execution_server.py` (1944 → 4 focused modules),
269
+ `conversation_memory.py` (1709 → 4 focused modules), and `config/utils.py`
270
+ (43 KB → 4 focused modules).
271
+ - Rewrote `README.md` and the public docs set (`docs/INSTALL.md`,
272
+ `docs/QUICK_START.md`, `docs/USER_GUIDE.md`, `docs/TROUBLESHOOTING.md`,
273
+ `docs/ARCHITECTURE.md`, `docs/DEVELOPER.md`) for the CLI-only positioning.
274
+ - Repository home moved to `josephsenior/Grinta-Coding-Agent`; all release
275
+ metadata, support links, and issue templates updated to match.
276
+
277
+ ### Deprecated
278
+
279
+ - `ultimate_editor.py` — use the public file API instead.
280
+ - `universal_editor.py` — use the public file API or `atomic_refactor`
281
+ internally instead.
282
+
283
+ ### Removed
284
+
285
+ - React frontend, Socket.IO real-time streaming, Textual TUI replacement, and
286
+ the `/api/v1/monitoring/agent-metrics` HTTP endpoint.
287
+ - `start_backend.ps1`, `openapi.json`, archival `client/` package, the dead
288
+ `service_circuit_breaker.py`, and stale socket-era tests.
289
+
290
+ ### Security
291
+
292
+ - New `SECURITY.md` documents reporting, supported versions, the threat
293
+ model, and the trust boundary (Grinta runs as the operator’s OS user — it
294
+ is **not** a sandbox).
295
+ - Secret masker strips known credential patterns from event-stream output,
296
+ audit logs, and panel renders before display.
297
+ - Telemetry remains **off by default**; the only on-disk telemetry is the
298
+ local `AuditLogger`. No outbound calls are made beyond configured LLM
299
+ providers and explicitly enabled MCP servers.
300
+
301
+ [Unreleased]: https://github.com/josephsenior/Grinta-Coding-Agent/compare/v1.0.0-rc1...HEAD
302
+ [1.0.0-rc1]: https://github.com/josephsenior/Grinta-Coding-Agent/releases/tag/v1.0.0-rc1
303
+ [0.56.0]: https://github.com/josephsenior/Grinta-Coding-Agent/releases/tag/v0.56.0
304
+ [0.55.0]: https://github.com/josephsenior/Grinta-Coding-Agent/releases/tag/v0.55.0
@@ -0,0 +1,12 @@
1
+ cff-version: 1.2.0
2
+ title: Grinta
3
+ message: "If you use Grinta in research, please cite this software."
4
+ type: software
5
+ authors:
6
+ - family-names: Mejdi
7
+ given-names: Youssef
8
+ alias: josephsenior
9
+ repository-code: "https://github.com/josephsenior/Grinta-Coding-Agent"
10
+ url: "https://github.com/josephsenior/Grinta-Coding-Agent"
11
+ license: MIT
12
+ version: "1.0.0"
@@ -0,0 +1,47 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to a positive environment:
15
+
16
+ * Using welcoming and inclusive language
17
+ * Being respectful of differing viewpoints and experiences
18
+ * Gracefully accepting constructive criticism
19
+ * Focusing on what is best for the community
20
+ * Showing empathy towards other community members
21
+
22
+ Examples of unacceptable behavior:
23
+
24
+ * The use of sexualized language or imagery and unwelcome sexual attention
25
+ * Trolling, insulting or derogatory comments, and personal or political attacks
26
+ * Public or private harassment
27
+ * Publishing others' private information without explicit permission
28
+ * Other conduct which could reasonably be considered inappropriate
29
+
30
+ ## Enforcement
31
+
32
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
33
+ reported to the project maintainers at:
34
+
35
+ - conduct@app.ai
36
+
37
+ Security issues should be reported through the private channels in `SECURITY.md`,
38
+ not through Code of Conduct channels.
39
+
40
+ All complaints will be reviewed and investigated promptly and fairly. Maintainers
41
+ will respect reporter confidentiality to the extent possible and communicate follow-up
42
+ status when an investigation is closed.
43
+
44
+ ## Attribution
45
+
46
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
47
+ version 2.1.
@@ -0,0 +1,223 @@
1
+ # Contributing to Grinta
2
+
3
+ Thank you for your interest in contributing to Grinta! This guide will help you get started.
4
+
5
+ ## Development Setup
6
+
7
+ ### Prerequisites
8
+
9
+ - **Git** (to clone and contribute)
10
+ - **No manual Python or `uv`** — `START_HERE.ps1` / `start_here.sh` install the toolchain when missing
11
+
12
+ ### Getting Started
13
+
14
+ ```bash
15
+ git clone https://github.com/josephsenior/Grinta-Coding-Agent.git Grinta
16
+ cd Grinta
17
+ bash start_here.sh
18
+ ```
19
+
20
+ Windows PowerShell:
21
+
22
+ ```powershell
23
+ .\START_HERE.ps1
24
+ ```
25
+
26
+ That installs `uv` and Python 3.12 if needed, natively downloads `ripgrep`, syncs `dev-test` dependencies, runs setup when `settings.json` is missing, and installs the `grinta` CLI globally via `uv tool install`.
27
+
28
+ Manual equivalent:
29
+
30
+ ```bash
31
+ uv python install 3.12
32
+ uv run python scripts/bootstrap_env.py dev-test
33
+ uv tool install -e .
34
+ ```
35
+
36
+ **Windows note:** `make` targets in the Makefile are aimed at macOS, Linux, and WSL.
37
+ On native Windows, use `START_HERE.ps1` for the same happy path, and run pytest directly:
38
+
39
+ ```powershell
40
+ uv run python scripts/bootstrap_env.py dev-test
41
+ $env:PYTHONPATH = '.'
42
+ uv run pytest backend/tests/unit/ --tb=short -q
43
+ ```
44
+
45
+ ### Repo hygiene
46
+
47
+ - Treat `dist/`, `logs/`, local cache directories, and one-off diagnostics as disposable output, not source.
48
+ - Historical narrative docs under `docs/journey/` are intentionally not the current spec; use `README.md`, `docs/USER_GUIDE.md`, `docs/ARCHITECTURE.md`, and `docs/DEVELOPER.md` for current behavior.
49
+ - Prefer the current helper surfaces for local work:
50
+ - `make help`
51
+ - `make run-cli`
52
+ - `make test-unit`
53
+ - `make reliability-gate`
54
+
55
+ ### Local configuration (source checkout)
56
+
57
+ - **`settings.json`** at the repository root holds non-secret defaults (`llm_model`,
58
+ `llm_provider`, `${LLM_API_KEY}` placeholder).
59
+ - **`.env`** beside `settings.json` stores the real `LLM_API_KEY` (copy from
60
+ [`.env.template`](.env.template); never commit secrets).
61
+ - **`APP_ROOT`** overrides where `settings.json` is resolved when you need an
62
+ isolated config directory (for example smoke tests or multiple profiles).
63
+ - Installed runs (`pipx`, Homebrew, Scoop) use `~/.grinta/settings.json` instead
64
+ of the repo root unless `APP_ROOT` is set.
65
+
66
+ Launching `grinta` or `uv run python -m backend.cli.entry` without a configured
67
+ key runs the same setup wizard as `grinta init` on first interactive launch.
68
+ Use `grinta init` when you want to configure without the TUI, or for `--non-interactive` / CI.
69
+
70
+ See also [docs/QUICK_START.md](docs/QUICK_START.md) and [docs/USER_GUIDE.md](docs/USER_GUIDE.md).
71
+
72
+ ## How to Contribute
73
+
74
+ ### Reporting Bugs
75
+
76
+ - Use the [Bug Report template](.github/ISSUE_TEMPLATE/bug_template.yml)
77
+ - Include: steps to reproduce, expected vs actual behavior, environment details
78
+ - Attach logs from `backend/` console output if applicable
79
+
80
+ ### Suggesting Features
81
+
82
+ - Use the [Feature Request template](.github/ISSUE_TEMPLATE/feature_request.md)
83
+ - Describe the use case, not just the solution
84
+
85
+ ### Submitting Code
86
+
87
+ 1. **Fork** the repository
88
+ 2. **Branch** from `main`: `git checkout -b feature/your-feature`
89
+ 3. **Implement** your change following existing patterns
90
+ 4. **Test**: see [Testing before a pull request](#testing-before-a-pull-request)
91
+ 5. **Commit** with a clear message: `feat: add trajectory pagination`
92
+ 6. **Push** and open a Pull Request
93
+
94
+ ### Testing before a pull request
95
+
96
+ **Required** GitHub Actions jobs differ by platform ([docs/CI.md](docs/CI.md)):
97
+
98
+ - **Linux (`gates-on-linux`):** unit corpus with coverage — match locally with:
99
+
100
+ ```bash
101
+ uv run python scripts/bootstrap_env.py dev-test
102
+ PYTHONPATH=. uv run pytest --cov=backend --cov-fail-under=75 backend/tests/unit
103
+ ```
104
+
105
+ - **Windows (`gates-on-windows` + `gates-on-windows-extended`):** unit corpus, then integration/e2e/stress — match locally with:
106
+
107
+ ```bash
108
+ uv run python scripts/bootstrap_env.py dev-test
109
+ PYTHONPATH=. uv run pytest backend/tests/unit
110
+ PYTHONPATH=. uv run pytest backend/tests/integration backend/tests/e2e backend/tests/stress
111
+ ```
112
+
113
+ - **macOS (`gates-on-macos` + `gates-on-macos-extended`):** same extended tier as Windows.
114
+
115
+ For day-to-day edits, `pytest backend/tests/unit` is usually enough before you push. Run the full Linux corpus when your change touches integration, e2e, stress, or cross-cutting orchestration paths.
116
+
117
+ Optional: `uv run pytest backend/tests/unit -q` for quieter output.
118
+
119
+ A bare `pytest` or `PYTHONPATH=. uv run pytest` from the repository root discovers all of **`backend/tests`** (unit, integration, e2e, stress, and so on) per [`pytest.ini`](pytest.ini). That run is much slower and may need extra services; use it when your change spans those tiers or before a large release.
120
+
121
+ The scheduled **Heavy / Integration Tests** job runs a marker-filtered slice (`pytest backend/tests -m "heavy or integration or benchmark"`). See [docs/CI.md](docs/CI.md#heavy--integration--benchmark-tier).
122
+
123
+ If your change touches the CLI, REPL, or orchestration hot paths, also run the [CLI regression workflow](.github/workflows/e2e-tests.yml) locally when possible (it may also run on PRs when files under `backend/`, `launch/`, etc. change).
124
+
125
+ For bugfix PRs, prefer adding a **regression test** next to the code you fixed (see [docs/REGRESSION_TESTS.md](docs/REGRESSION_TESTS.md)).
126
+
127
+ Dependency profiles are centralized in `scripts/bootstrap_env.py` (for example: `base`, `browser`, `dev`, `dev-test`, `dev-test-browser`).
128
+
129
+ For a one-command onboarding sanity check on Unix-like systems:
130
+
131
+ ```bash
132
+ bash scripts/check_contributor_bootstrap.sh
133
+ ```
134
+
135
+ For packaging / onboarding smoke (wheel + source non-interactive checks):
136
+
137
+ ```bash
138
+ uv build --wheel
139
+ WHEEL_DIR=./dist ./scripts/smoke/smoke_install.sh
140
+ ./scripts/smoke/smoke_source_onboarding.sh
141
+ ```
142
+
143
+ Maintainers: see [docs/onboarding_reports/](docs/onboarding_reports/) for GA fresh-machine evidence.
144
+
145
+ ### Code Standards
146
+
147
+ **Backend (Python):**
148
+
149
+ - Type hints on all function signatures
150
+ - Docstrings on public functions (Google style)
151
+ - `async def` for I/O-bound operations
152
+ - Use `app_logger` for logging (not `print()`)
153
+ - Follow existing service decomposition patterns
154
+
155
+ ### Commit Convention
156
+
157
+ ```text
158
+ type: short description
159
+
160
+ types: feat, fix, refactor, docs, test, chore, perf
161
+ ```
162
+
163
+ ## Where to start in the codebase
164
+
165
+ New contributors: read **[docs/CONTRIBUTOR_MAP.md](docs/CONTRIBUTOR_MAP.md)** first.
166
+ It lists task-oriented entry points (CLI, orchestration, inference, MCP, tests)
167
+ without reading the whole tree. Day-to-day reference: [docs/DEVELOPER.md](docs/DEVELOPER.md).
168
+
169
+ ## Architecture Quick Reference
170
+
171
+ | Directory | Purpose |
172
+ | --- | --- |
173
+ | `backend/orchestration/` | Session orchestration (decomposed services) |
174
+ | `backend/orchestration/services/` | Service classes composing the orchestrator |
175
+ | `backend/cli/` | CLI entrypoint, REPL, init wizard, and session commands |
176
+ | `backend/ledger/` | Event sourcing, backpressure-aware stream, durable writer |
177
+ | `backend/persistence/` | File & DB storage implementations |
178
+ | `backend/inference/` | Provider registry, LLM clients, model catalogs |
179
+ | `backend/integrations/` | MCP adapters (external tools) |
180
+ | `backend/engine/` | Production agent engine package |
181
+ | `backend/context/` | Context memory, compactors, RAG, vector store |
182
+ | `backend/core/` | Config (Pydantic), exceptions, schemas, logging |
183
+ | `backend/security/` | Security analyzer, input validation |
184
+
185
+ ### Orchestration Service Map
186
+
187
+ The `SessionOrchestrator` delegates work to these services (implementation split
188
+ across mixins under `backend/orchestration/mixins/`):
189
+
190
+ | Service | Responsibility |
191
+ | --- | --- |
192
+ | `LifecycleService` | Init, reset, config binding |
193
+ | `ActionExecutionService` | Get & execute next agent action |
194
+ | `ActionService` | Action intake, pending coordination |
195
+ | `RecoveryService` | Exception classification, retry orchestration |
196
+ | `TaskValidationService` | Optional completion-quality warning pipeline |
197
+ | `CircuitBreakerService` | Circuit breaker pattern |
198
+ | `StuckDetectionService` | 6-strategy stuck/loop detection |
199
+ | `IterationGuardService` | Iteration limit control flags |
200
+ | `StateTransitionService` | Agent state machine transitions |
201
+ | `StepGuardService` | Pre-step guard checks |
202
+ | `StepPrerequisiteService` | Can-step prerequisite checks |
203
+ | `PendingActionService` | Pending action get/set/timeout |
204
+ | `ConfirmationService` | User confirmation flow |
205
+ | `SafetyService` | Safety validation |
206
+ | `RetryService` | Retry count & backoff |
207
+ | `ObservationService` | Observation event handling |
208
+ | `AutonomyService` | Autonomy controller init |
209
+ | `IterationService` | Iteration counting |
210
+ | `OrchestrationContext` | Shared facade for services |
211
+
212
+ ### Key Patterns
213
+
214
+ - **Event sourcing**: All agent actions/observations go through `EventStream`
215
+ - **Backpressure**: `EventStream` caps in-flight events and applies backpressure
216
+ - **Compactor**: Memory management via `Compactor` with configurable strategies
217
+ - **State checkpoints**: Timestamped state snapshots (last 3 kept for crash recovery)
218
+ - **Circuit breaker**: Trips after consecutive errors/stuck detections
219
+ - **Safe defaults**: Budget capped at $5, circuit breaker ON, graceful shutdown ON
220
+
221
+ ## Questions?
222
+
223
+ Open an issue with the relevant template if you need help or want to discuss a change.