kolega-code 0.3.2__tar.gz → 0.5.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 (263) hide show
  1. {kolega_code-0.3.2 → kolega_code-0.5.0}/PKG-INFO +1 -1
  2. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/astro.config.mjs +9 -1
  3. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/content/docs/concepts/agents.md +10 -3
  4. kolega_code-0.5.0/docs/src/content/docs/gigacode.mdx +108 -0
  5. kolega_code-0.5.0/docs/src/content/docs/hooks.md +247 -0
  6. kolega_code-0.3.2/docs/src/content/docs/getting-started/introduction.md → kolega_code-0.5.0/docs/src/content/docs/index.mdx +35 -6
  7. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/content/docs/tui/interface.md +30 -2
  8. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/content/docs/tui/modes.md +7 -1
  9. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/content/docs/tui/slash-commands.md +1 -0
  10. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/__init__.py +1 -1
  11. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/__init__.py +1 -1
  12. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/baseagent.py +278 -5
  13. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/browseragent.py +2 -0
  14. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/coder.py +2 -0
  15. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/context.py +4 -0
  16. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/generalagent.py +2 -0
  17. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/investigationagent.py +2 -0
  18. kolega_code-0.5.0/kolega_code/agent/orchestration/__init__.py +46 -0
  19. kolega_code-0.5.0/kolega_code/agent/orchestration/budget.py +46 -0
  20. kolega_code-0.5.0/kolega_code/agent/orchestration/errors.py +22 -0
  21. kolega_code-0.5.0/kolega_code/agent/orchestration/executor.py +118 -0
  22. kolega_code-0.5.0/kolega_code/agent/orchestration/guide.py +143 -0
  23. kolega_code-0.5.0/kolega_code/agent/orchestration/journal.py +123 -0
  24. kolega_code-0.5.0/kolega_code/agent/orchestration/runtime.py +244 -0
  25. kolega_code-0.5.0/kolega_code/agent/orchestration/tests/test_orchestration.py +257 -0
  26. kolega_code-0.5.0/kolega_code/agent/orchestration/types.py +80 -0
  27. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/planningagent.py +5 -0
  28. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_provider.py +4 -0
  29. kolega_code-0.5.0/kolega_code/agent/prompt_templates/extensions/cli/shared_task_list.md +8 -0
  30. kolega_code-0.5.0/kolega_code/agent/prompt_templates/user_tasks/cli/implement_plan.md.j2 +7 -0
  31. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompts.py +4 -2
  32. kolega_code-0.5.0/kolega_code/agent/tests/test_gigacode_gating.py +214 -0
  33. kolega_code-0.5.0/kolega_code/agent/tests/test_hooks_integration.py +231 -0
  34. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/test_prompts.py +17 -0
  35. kolega_code-0.5.0/kolega_code/agent/tests/tool_backend/test_workflow_tool.py +175 -0
  36. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tool_backend/agent_tool.py +333 -6
  37. kolega_code-0.5.0/kolega_code/agent/tool_backend/workflow_tool.py +300 -0
  38. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tools.py +75 -0
  39. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/app.py +1219 -189
  40. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/main.py +70 -21
  41. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/messages.py +10 -0
  42. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/settings.py +21 -1
  43. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/slash_commands.py +2 -0
  44. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/tests/test_app.py +663 -40
  45. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/tests/test_main.py +10 -4
  46. kolega_code-0.5.0/kolega_code/cli/tests/test_themes.py +233 -0
  47. kolega_code-0.5.0/kolega_code/cli/theme.py +539 -0
  48. kolega_code-0.5.0/kolega_code/hooks/__init__.py +60 -0
  49. kolega_code-0.5.0/kolega_code/hooks/backends.py +218 -0
  50. kolega_code-0.5.0/kolega_code/hooks/config.py +203 -0
  51. kolega_code-0.5.0/kolega_code/hooks/dispatcher.py +82 -0
  52. kolega_code-0.5.0/kolega_code/hooks/events.py +90 -0
  53. kolega_code-0.5.0/kolega_code/hooks/matcher.py +37 -0
  54. kolega_code-0.5.0/kolega_code/hooks/outcome.py +81 -0
  55. kolega_code-0.5.0/kolega_code/hooks/tests/test_hooks.py +410 -0
  56. kolega_code-0.5.0/kolega_code/llm/providers/__init__.py +0 -0
  57. kolega_code-0.5.0/kolega_code/tools/tests/__init__.py +0 -0
  58. {kolega_code-0.3.2 → kolega_code-0.5.0}/pyproject.toml +1 -1
  59. {kolega_code-0.3.2 → kolega_code-0.5.0}/uv.lock +53 -50
  60. kolega_code-0.3.2/docs/src/content/docs/index.mdx +0 -52
  61. kolega_code-0.3.2/kolega_code/agent/prompt_templates/extensions/cli/shared_task_list.md +0 -7
  62. kolega_code-0.3.2/kolega_code/agent/prompt_templates/user_tasks/cli/implement_plan.md.j2 +0 -3
  63. kolega_code-0.3.2/kolega_code/cli/theme.py +0 -180
  64. {kolega_code-0.3.2 → kolega_code-0.5.0}/.env.example +0 -0
  65. {kolega_code-0.3.2 → kolega_code-0.5.0}/.github/workflows/ci.yml +0 -0
  66. {kolega_code-0.3.2 → kolega_code-0.5.0}/.github/workflows/docs.yml +0 -0
  67. {kolega_code-0.3.2 → kolega_code-0.5.0}/.github/workflows/release.yml +0 -0
  68. {kolega_code-0.3.2 → kolega_code-0.5.0}/.gitignore +0 -0
  69. {kolega_code-0.3.2 → kolega_code-0.5.0}/CONTRIBUTING.md +0 -0
  70. {kolega_code-0.3.2 → kolega_code-0.5.0}/LICENSE +0 -0
  71. {kolega_code-0.3.2 → kolega_code-0.5.0}/README.md +0 -0
  72. {kolega_code-0.3.2 → kolega_code-0.5.0}/RELEASING.md +0 -0
  73. {kolega_code-0.3.2 → kolega_code-0.5.0}/SECURITY.md +0 -0
  74. {kolega_code-0.3.2 → kolega_code-0.5.0}/conftest.py +0 -0
  75. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/.gitignore +0 -0
  76. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/README.md +0 -0
  77. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/package-lock.json +0 -0
  78. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/package.json +0 -0
  79. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/public/favicon.svg +0 -0
  80. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/assets/kolega-dark.svg +0 -0
  81. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/assets/kolega-light.svg +0 -0
  82. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/content/docs/cli/ask.md +0 -0
  83. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/content/docs/cli/doctor.md +0 -0
  84. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/content/docs/cli/overview.md +0 -0
  85. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/content/docs/cli/sessions.md +0 -0
  86. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/content/docs/concepts/how-it-works.md +0 -0
  87. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/content/docs/concepts/tools.md +0 -0
  88. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/content/docs/configuration/environment-variables.md +0 -0
  89. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/content/docs/configuration/providers-and-models.mdx +0 -0
  90. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/content/docs/configuration/settings-and-api-keys.mdx +0 -0
  91. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/content/docs/getting-started/installation.mdx +0 -0
  92. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/content/docs/getting-started/quick-start.mdx +0 -0
  93. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/content/docs/skills.mdx +0 -0
  94. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/content/docs/tui/composer.md +0 -0
  95. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/content/docs/tui/sessions-and-resume.md +0 -0
  96. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/content.config.ts +0 -0
  97. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/src/styles/brand.css +0 -0
  98. {kolega_code-0.3.2 → kolega_code-0.5.0}/docs/tsconfig.json +0 -0
  99. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/common.py +0 -0
  100. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/compression.py +0 -0
  101. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/conversation.py +0 -0
  102. {kolega_code-0.3.2/kolega_code/agent → kolega_code-0.5.0/kolega_code/agent/orchestration}/tests/__init__.py +0 -0
  103. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_templates/auxiliary/compression/summary.system.md +0 -0
  104. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_templates/auxiliary/compression/summary.user.md.j2 +0 -0
  105. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_templates/auxiliary/terminal/output_summary.system.md +0 -0
  106. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_templates/auxiliary/terminal/safety.system.md +0 -0
  107. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_templates/auxiliary/tools/think_hard.system.md +0 -0
  108. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_templates/extensions/cli/planning_questions.md +0 -0
  109. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_templates/extensions/skills/catalog.md.j2 +0 -0
  110. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_templates/system/agents/browser.md.j2 +0 -0
  111. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_templates/system/agents/coder_cli.md.j2 +0 -0
  112. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_templates/system/agents/general.md.j2 +0 -0
  113. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_templates/system/agents/investigation.md.j2 +0 -0
  114. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_templates/system/agents/planning.md.j2 +0 -0
  115. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_templates/system/includes/agents_md_instructions.md +0 -0
  116. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_templates/system/includes/environment_variables/workspace_env_vars.md +0 -0
  117. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_templates/system/includes/frontend_guidance.md +0 -0
  118. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_templates/system/includes/starter_templates/expo.md +0 -0
  119. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_templates/system/includes/starter_templates/html_website.md +0 -0
  120. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_templates/system/includes/starter_templates/mern_stack.md +0 -0
  121. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_templates/system/includes/starter_templates/react_vite_shadcdn.md +0 -0
  122. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/prompt_templates/user_tasks/cli/init_agents.md.j2 +0 -0
  123. {kolega_code-0.3.2/kolega_code/agent/tests/llm → kolega_code-0.5.0/kolega_code/agent/tests}/__init__.py +0 -0
  124. {kolega_code-0.3.2/kolega_code/agent/tests/tool_backend → kolega_code-0.5.0/kolega_code/agent/tests/llm}/__init__.py +0 -0
  125. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/llm/test_anthropic_token_counting.py +0 -0
  126. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/llm/test_billing_openai_cache.py +0 -0
  127. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/llm/test_client.py +0 -0
  128. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/llm/test_dashscope_mapping.py +0 -0
  129. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/llm/test_error_boundary.py +0 -0
  130. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/llm/test_exceptions.py +0 -0
  131. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/llm/test_google_thought_signature.py +0 -0
  132. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/llm/test_google_tool_signature_live.py +0 -0
  133. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/llm/test_instrumented_client.py +0 -0
  134. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/llm/test_instrumented_client_integration.py +0 -0
  135. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/llm/test_langfuse_normalization.py +0 -0
  136. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/llm/test_live_providers.py +0 -0
  137. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/llm/test_model_specs.py +0 -0
  138. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/llm/test_openai_cached_tokens.py +0 -0
  139. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/llm/test_openai_cached_tokens_stream.py +0 -0
  140. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/llm/test_openai_message_conversion.py +0 -0
  141. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/llm/test_openai_token_counting.py +0 -0
  142. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/llm/test_thinking_effort.py +0 -0
  143. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/llm/test_tool_execution_ids.py +0 -0
  144. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/services/__init__.py +0 -0
  145. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/services/test_browser.py +0 -0
  146. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/services/test_browser_parity.py +0 -0
  147. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/services/test_file_system.py +0 -0
  148. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/services/test_sandbox_terminal_input.py +0 -0
  149. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/services/test_terminal.py +0 -0
  150. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/services/test_terminal_command_tracking.py +0 -0
  151. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/services/test_terminal_state_serializer.py +0 -0
  152. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/test_agent_tools_inventory.py +0 -0
  153. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/test_base_agent.py +0 -0
  154. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/test_coder_attachments.py +0 -0
  155. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/test_coder_prompt_extensions.py +0 -0
  156. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/test_commands.py +0 -0
  157. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/test_duplicate_tool_results.py +0 -0
  158. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/test_empty_message_handling.py +0 -0
  159. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/test_general_agent.py +0 -0
  160. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/test_html.py +0 -0
  161. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/test_parallel_tool_calls.py +0 -0
  162. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/test_permissions.py +0 -0
  163. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/test_planning_agent.py +0 -0
  164. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/test_prompt_provider.py +0 -0
  165. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/test_tool_registry.py +0 -0
  166. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/test_tools.py +0 -0
  167. {kolega_code-0.3.2/kolega_code/llm/providers → kolega_code-0.5.0/kolega_code/agent/tests/tool_backend}/__init__.py +0 -0
  168. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/tool_backend/test_agent_tool.py +0 -0
  169. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/tool_backend/test_base_tool.py +0 -0
  170. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/tool_backend/test_browser_tool.py +0 -0
  171. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/tool_backend/test_build_tool.py +0 -0
  172. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/tool_backend/test_create_file_tool.py +0 -0
  173. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/tool_backend/test_glob_tool.py +0 -0
  174. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/tool_backend/test_glob_tool_sandbox_parity.py +0 -0
  175. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/tool_backend/test_list_directory_tool.py +0 -0
  176. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/tool_backend/test_read_file_tool.py +0 -0
  177. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/tool_backend/test_replace_entire_file_tool.py +0 -0
  178. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/tool_backend/test_replace_lines_tool.py +0 -0
  179. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/tool_backend/test_search_and_replace_tool.py +0 -0
  180. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/tool_backend/test_search_codebase_tool.py +0 -0
  181. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/tool_backend/test_terminal_tool.py +0 -0
  182. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/tool_backend/test_think_hard_integration.py +0 -0
  183. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/tool_backend/test_think_hard_streaming.py +0 -0
  184. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tests/tool_backend/test_web_fetch_tool.py +0 -0
  185. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tool_backend/apply_patch_tool.py +0 -0
  186. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tool_backend/base_tool.py +0 -0
  187. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tool_backend/browser_tool.py +0 -0
  188. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tool_backend/build_tool.py +0 -0
  189. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tool_backend/create_file_tool.py +0 -0
  190. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tool_backend/glob_tool.py +0 -0
  191. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tool_backend/list_directory_tool.py +0 -0
  192. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tool_backend/memory_tool.py +0 -0
  193. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tool_backend/read_file_tool.py +0 -0
  194. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tool_backend/replace_entire_file_tool.py +0 -0
  195. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tool_backend/replace_lines_tool.py +0 -0
  196. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tool_backend/search_and_replace_tool.py +0 -0
  197. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tool_backend/search_codebase_tool.py +0 -0
  198. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tool_backend/streaming_tool.py +0 -0
  199. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tool_backend/terminal_tool.py +0 -0
  200. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tool_backend/think_hard_tool.py +0 -0
  201. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/tool_backend/web_fetch_tool.py +0 -0
  202. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/agent/utils/commands.py +0 -0
  203. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/__init__.py +0 -0
  204. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/config.py +0 -0
  205. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/connection.py +0 -0
  206. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/file_index.py +0 -0
  207. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/mentions.py +0 -0
  208. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/provider_registry.py +0 -0
  209. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/session_store.py +0 -0
  210. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/skills.py +0 -0
  211. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/tests/__init__.py +0 -0
  212. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/tests/test_cli_config.py +0 -0
  213. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/tests/test_connection.py +0 -0
  214. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/tests/test_file_index.py +0 -0
  215. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/tests/test_mentions.py +0 -0
  216. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/tests/test_session_store.py +0 -0
  217. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/tests/test_settings.py +0 -0
  218. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/tests/test_skills.py +0 -0
  219. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/tests/test_slash_commands.py +0 -0
  220. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/tests/test_updater.py +0 -0
  221. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/cli/updater.py +0 -0
  222. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/config.py +0 -0
  223. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/events.py +0 -0
  224. {kolega_code-0.3.2/kolega_code/tools → kolega_code-0.5.0/kolega_code/hooks}/tests/__init__.py +0 -0
  225. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/llm/client.py +0 -0
  226. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/llm/exceptions.py +0 -0
  227. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/llm/instrumented_client.py +0 -0
  228. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/llm/models.py +0 -0
  229. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/llm/providers/anthropic.py +0 -0
  230. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/llm/providers/base.py +0 -0
  231. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/llm/providers/google.py +0 -0
  232. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/llm/providers/models.py +0 -0
  233. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/llm/providers/openai.py +0 -0
  234. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/llm/ratelimit.py +0 -0
  235. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/llm/specs.py +0 -0
  236. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/llm/tool_execution_ids.py +0 -0
  237. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/models/__init__.py +0 -0
  238. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/models/sandbox_terminal_state.py +0 -0
  239. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/permissions.py +0 -0
  240. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/runtime.py +0 -0
  241. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/sandbox/README.md +0 -0
  242. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/sandbox/__init__.py +0 -0
  243. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/sandbox/async_filesystem.py +0 -0
  244. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/sandbox/base.py +0 -0
  245. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/sandbox/browser.py +0 -0
  246. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/sandbox/event_loop.py +0 -0
  247. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/sandbox/filesystem.py +0 -0
  248. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/sandbox/local.py +0 -0
  249. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/sandbox/serializer.py +0 -0
  250. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/sandbox/terminal.py +0 -0
  251. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/sandbox/utils.py +0 -0
  252. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/services/base.py +0 -0
  253. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/services/browser.py +0 -0
  254. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/services/file_system.py +0 -0
  255. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/services/html.py +0 -0
  256. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/services/terminal.py +0 -0
  257. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/tools/__init__.py +0 -0
  258. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/tools/core.py +0 -0
  259. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/tools/definitions.py +0 -0
  260. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/tools/registry.py +0 -0
  261. {kolega_code-0.3.2 → kolega_code-0.5.0}/kolega_code/tools/tests/test_definitions.py +0 -0
  262. {kolega_code-0.3.2 → kolega_code-0.5.0}/run_tests.sh +0 -0
  263. {kolega_code-0.3.2 → kolega_code-0.5.0}/scripts/install-kolega-code.sh +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kolega-code
3
- Version: 0.3.2
3
+ Version: 0.5.0
4
4
  Summary: Local-first AI coding agent for the terminal
5
5
  Project-URL: Homepage, https://kolega-ai.github.io/kolega-code/
6
6
  Project-URL: Documentation, https://kolega-ai.github.io/kolega-code/
@@ -44,7 +44,7 @@ export default defineConfig({
44
44
  {
45
45
  label: "Getting Started",
46
46
  items: [
47
- { label: "Introduction", slug: "getting-started/introduction" },
47
+ { label: "Introduction", link: "/" },
48
48
  { label: "Installation", slug: "getting-started/installation" },
49
49
  { label: "Quick Start", slug: "getting-started/quick-start" },
50
50
  ],
@@ -89,6 +89,14 @@ export default defineConfig({
89
89
  label: "Skills",
90
90
  items: [{ label: "Agent Skills", slug: "skills" }],
91
91
  },
92
+ {
93
+ label: "Hooks",
94
+ items: [{ label: "Lifecycle Hooks", slug: "hooks" }],
95
+ },
96
+ {
97
+ label: "Gigacode",
98
+ items: [{ label: "Workflow Orchestration", slug: "gigacode" }],
99
+ },
92
100
  {
93
101
  label: "How It Works",
94
102
  items: [
@@ -27,9 +27,16 @@ findings. The available dispatch targets include:
27
27
  - `dispatch_coding_agent` — hand off a self-contained coding task.
28
28
  - `dispatch_general_agent` — a general-purpose helper.
29
29
 
30
- Sub-agent activity is reported live: in the TUI you'll see it in the conversation
31
- and the **Logs** tab; with `ask` it surfaces as events (on stderr in plain mode, or
32
- as `event` objects with `--json`).
30
+ When [gigacode](../../gigacode/) is enabled, the main agent can also orchestrate
31
+ **many** of these sub-agents at once through a workflow running them in parallel
32
+ or in pipelines and collecting the results.
33
+
34
+ Sub-agent activity is reported live. In the TUI each sub-agent gets a live card in
35
+ the conversation, and pressing `Ctrl+G` opens the
36
+ [sub-agent inspector](../../tui/interface/#sub-agent-inspector) — a full-screen view
37
+ of every sub-agent's complete trajectory: its thinking, tool calls, and results.
38
+ Lifecycle events also appear in the **Logs** tab. With `ask`, sub-agent activity
39
+ surfaces as events (on stderr in plain mode, or as `event` objects with `--json`).
33
40
 
34
41
  ## Modes vs. agents
35
42
 
@@ -0,0 +1,108 @@
1
+ ---
2
+ title: Gigacode
3
+ description: Dynamic multi-agent workflow orchestration — fan out many sub-agents with one command.
4
+ ---
5
+
6
+ import { Aside } from '@astrojs/starlight/components';
7
+
8
+ **Gigacode** lets the agent take on work that's too big for a single pass by
9
+ **orchestrating many sub-agents at once**. When it's enabled and a task calls for
10
+ it, the agent writes a small workflow that fans sub-agents out in parallel,
11
+ pipelines them, or loops over them — then collects the results.
12
+
13
+ It's built for work that's wide rather than deep:
14
+
15
+ - Broad audits and multi-file reviews.
16
+ - Large migrations or mechanical changes spread across many files.
17
+ - Judge panels and adversarial verification, where several agents cross-check each
18
+ other.
19
+ - Implementing a plan whose parts are independent, in parallel.
20
+
21
+ For a quick question or a small, focused edit, the agent just does it directly —
22
+ gigacode is for genuine fan-out.
23
+
24
+ ## Turning it on
25
+
26
+ Gigacode is **off by default**. Toggle it with the `/gigacode`
27
+ [slash command](../tui/slash-commands/):
28
+
29
+ | Command | Effect |
30
+ | --- | --- |
31
+ | `/gigacode` | Toggle gigacode on or off |
32
+ | `/gigacode on` | Enable workflow orchestration for the session |
33
+ | `/gigacode off` | Disable it |
34
+
35
+ Once on, it stays on for the session, and the agent decides when a task is worth
36
+ orchestrating. It works in both [Build and Plan modes](../tui/modes/) — see
37
+ [Behavior and safety](#behavior-and-safety) for how each differs.
38
+
39
+ ## What you'll see
40
+
41
+ When the agent runs a workflow, the transcript shows **phase headers** and short
42
+ **progress lines** as it works. Each sub-agent it launches appears in the
43
+ [sub-agent inspector](../tui/interface/#sub-agent-inspector) — press `Ctrl+G` to
44
+ watch every agent's live trajectory, grouped by phase.
45
+
46
+ ## How it works
47
+
48
+ Under the hood, the agent authors a short **Python script** and runs it with a
49
+ single `run_workflow` tool call. The script uses a handful of primitives:
50
+
51
+ | Primitive | What it does |
52
+ | --- | --- |
53
+ | `agent(...)` | Dispatch one sub-agent and get its result back |
54
+ | `parallel([...])` | Run several sub-agents at once and wait for all of them |
55
+ | `pipeline(items, ...)` | Run each item through a series of stages independently |
56
+ | `phase(...)` / `log(...)` | Report progress to the UI |
57
+
58
+ You don't write these scripts — the agent does. A sketch of what it generates:
59
+
60
+ ```python
61
+ # Review three areas in parallel, then synthesize.
62
+ phase("Review")
63
+ findings = await parallel([
64
+ (lambda area=area: agent(f"Review the {area} module for bugs"))
65
+ for area in ["auth", "api", "cli"]
66
+ ])
67
+ return findings
68
+ ```
69
+
70
+ <Aside type="note">
71
+ Workflows are deterministic and **resumable**. Each run is saved under Kolega
72
+ Code's state directory (`workflows/<run-id>/`) with its script, a journal, and each
73
+ sub-agent's transcript, so an interrupted run can pick up where it left off instead
74
+ of redoing finished work.
75
+ </Aside>
76
+
77
+ ## Behavior and safety
78
+
79
+ How workflow sub-agents behave depends on the mode you're in.
80
+
81
+ **Plan mode** — every workflow sub-agent is **read-only** (an investigation agent),
82
+ no matter what the workflow asks for. Use it to fan out parallel research and
83
+ synthesis while planning; it never edits your code.
84
+
85
+ **Build mode** — sub-agents have the full toolset and can edit files and run
86
+ commands.
87
+
88
+ <Aside type="caution" title="Workflows run unattended">
89
+ In Build mode, workflow sub-agents run in **auto permission mode** — they execute
90
+ shell commands and file edits **without prompting**, even when your session is set
91
+ to `ask`. A workflow is a deliberate batch operation, and pausing dozens of
92
+ parallel agents for individual approvals isn't practical. Keep this in mind before
93
+ running a workflow for risky changes.
94
+ </Aside>
95
+
96
+ A few more guarantees:
97
+
98
+ - Workflow sub-agents don't touch your [task list](../tui/modes/) — only the main
99
+ agent manages it, so agents running in parallel can't clobber it.
100
+ - Concurrency is capped, and there's a hard ceiling on the total number of agents a
101
+ single workflow can spawn, as a runaway-loop backstop.
102
+
103
+ ## See also
104
+
105
+ - [Build & Plan Modes](../tui/modes/) — how modes shape what agents can do.
106
+ - [Agents](../concepts/agents/) — the sub-agent types a workflow draws on.
107
+ - [Slash Commands](../tui/slash-commands/) — the full command reference.
108
+ - [Interface Tour](../tui/interface/#sub-agent-inspector) — the sub-agent inspector.
@@ -0,0 +1,247 @@
1
+ ---
2
+ title: Hooks
3
+ description: Run shell commands, Python callables, or LLM checks on agent lifecycle events to observe, block, or modify what the agent does.
4
+ ---
5
+
6
+ **Hooks** let you attach handlers to the agent's **lifecycle events** — points like
7
+ "before a tool runs", "a prompt was submitted", or "the agent is about to stop". A hook
8
+ can **observe** (log, notify), **block** (deny a tool, end a turn, keep the agent
9
+ working), or **modify** (rewrite a tool's input or output, inject context).
10
+
11
+ This is how you add guardrails ("never run `rm -rf`"), automation ("format files after
12
+ every edit"), and quality gates ("don't stop until the tests pass") without changing the
13
+ agent itself.
14
+
15
+ ## Where hooks live
16
+
17
+ Hooks are declared in JSON, in two places that are **merged** (global first, project last):
18
+
19
+ - **Global / user:** `hooks.json` in the Kolega Code state directory — always active. The
20
+ state directory is platform-specific:
21
+ - macOS: `~/Library/Application Support/kolega-code/hooks.json`
22
+ - Linux: `$XDG_STATE_HOME/kolega-code/hooks.json` (defaults to `~/.local/state/kolega-code/hooks.json`)
23
+ - Windows: `%LOCALAPPDATA%\kolega-code\hooks.json`
24
+
25
+ Override the location with the `KOLEGA_CODE_STATE_DIR` environment variable or the
26
+ `--state-dir <dir>` flag (the file is then `<dir>/hooks.json`).
27
+ - **Project:** `<project>/.kolega/hooks.json` — alongside `permissions.json`. Because a
28
+ project file can run arbitrary commands from a cloned repo, project hooks are
29
+ **disabled until you trust the project** (see [Trust](#trusting-project-hooks)).
30
+
31
+ Both files use the same shape:
32
+
33
+ ```json
34
+ {
35
+ "schema_version": 1,
36
+ "hooks": {
37
+ "PreToolUse": [
38
+ {
39
+ "matcher": "execute_terminal_command|run_command_tracked",
40
+ "hooks": [
41
+ { "type": "command", "command": "./.kolega/guard-bash.sh", "timeout": 30 }
42
+ ]
43
+ }
44
+ ]
45
+ }
46
+ }
47
+ ```
48
+
49
+ - The `hooks` map is keyed by **event name**.
50
+ - Each entry has a **`matcher`** and a list of **hook handlers**.
51
+ - `matcher` is tested against the tool name for tool events (or a source string for other
52
+ events): `""` or `"*"` matches everything; `"Edit|Write"` is an exact-name OR list;
53
+ anything else is a regular expression (e.g. `"mcp__.*"`).
54
+ - Handler lists from the global and project files are concatenated, so the global handler
55
+ sees the action first and the project handler last.
56
+
57
+ ## Lifecycle events
58
+
59
+ | Event | When it fires | What a "block" does |
60
+ |---|---|---|
61
+ | `SessionStart` | The agent session begins | Advisory; can inject starting context |
62
+ | `UserPromptSubmit` | You submit a prompt, before the agent sees it | Ends the turn; the reason is shown as a warning |
63
+ | `PreToolUse` | Before a tool runs (after the permission gate) | Denies the tool; the reason is returned to the agent as a tool error, so it can adjust |
64
+ | `PostToolUse` | After a tool succeeds (and on failure) | Ends the turn; the reason is shown as a warning |
65
+ | `PreCompact` | Before the conversation is compacted | Advisory |
66
+ | `Stop` | The agent is about to finish its turn | Keeps the agent working; the reason becomes its next instruction |
67
+ | `SubagentStop` | A dispatched sub-agent finished | Advisory; can annotate the result the parent sees |
68
+ | `Notification` | A permission prompt is about to be shown | Advisory (desktop notifications, sounds) |
69
+ | `SessionEnd` | The session ends | Advisory (cleanup, final logging) |
70
+
71
+ Hooks can also **modify** rather than block:
72
+
73
+ - `PreToolUse` can return `updatedInput` to rewrite the tool's arguments.
74
+ - `PostToolUse` can return `updatedToolOutput` to replace what the model sees, or
75
+ `additionalContext` to append to it.
76
+ - `SessionStart` / `UserPromptSubmit` can return `additionalContext` to inject text.
77
+
78
+ ## Hook types
79
+
80
+ ### `command` — run a shell program
81
+
82
+ The event is sent as JSON on **stdin**. The hook communicates back through its exit code:
83
+
84
+ - **exit 0** — success. Optional JSON on stdout controls behavior:
85
+ ```json
86
+ {
87
+ "hookSpecificOutput": {
88
+ "permissionDecision": "deny",
89
+ "permissionDecisionReason": "rm -rf is not allowed here",
90
+ "updatedInput": { "command": "ls" },
91
+ "updatedToolOutput": "…",
92
+ "additionalContext": "…"
93
+ },
94
+ "systemMessage": "shown to the user",
95
+ "continue": false
96
+ }
97
+ ```
98
+ - **exit 2** — block. Whatever the hook wrote to **stderr** becomes the reason.
99
+ - **any other code** — a non-blocking error: it is logged and the action proceeds.
100
+
101
+ ```json
102
+ { "type": "command", "command": "./.kolega/format.sh", "timeout": 30 }
103
+ ```
104
+
105
+ Commands run with the project directory as the working directory and are split like a
106
+ shell argument list (no shell features such as pipes — call a script if you need them).
107
+
108
+ ### `python` — run an in-process callable
109
+
110
+ Point at an importable `module.path:function`. It receives a `LifecycleEvent` and returns
111
+ a `HookOutcome` (or a dict with the same fields). Runs in the agent's process — best for
112
+ first-party checks.
113
+
114
+ ```json
115
+ { "type": "python", "callable": "myproject.hooks:block_secrets", "timeout": 15 }
116
+ ```
117
+
118
+ ```python
119
+ from kolega_code.hooks import HookOutcome
120
+
121
+ def block_secrets(event):
122
+ inputs = event.payload.get("tool_input", {})
123
+ if "AWS_SECRET" in str(inputs):
124
+ return HookOutcome.deny("Refusing to write a secret to disk.")
125
+ return HookOutcome.empty()
126
+ ```
127
+
128
+ ### `prompt` and `agent` — let an LLM decide
129
+
130
+ For judgment calls rather than deterministic rules. Both return a yes/no decision as
131
+ `{"ok": true}` (allow) or `{"ok": false, "reason": "…"}` (block); the per-event meaning of
132
+ a block is the same as the table above.
133
+
134
+ - **`prompt`** sends your prompt plus the event data to a model (the fast model by
135
+ default; `"model"` may be `"fast"`, `"long"`, or `"thinking"`). Use `$EVENT` in the
136
+ prompt to interpolate the event JSON.
137
+
138
+ ```json
139
+ {
140
+ "type": "prompt",
141
+ "prompt": "Have all of the user's requested tasks been completed? $EVENT",
142
+ "model": "fast",
143
+ "timeout": 30
144
+ }
145
+ ```
146
+
147
+ - **`agent`** spawns a full sub-agent that can read files, search the code, and run
148
+ commands to verify a condition before answering. Heavier, with a longer default timeout.
149
+ Because an agent hook uses tools, it is **not allowed on `PreToolUse`/`PostToolUse`**
150
+ (that would recurse); use it on `Stop`, `SubagentStop`, `UserPromptSubmit`, or the
151
+ session events.
152
+
153
+ ```json
154
+ {
155
+ "type": "agent",
156
+ "prompt": "Run the test suite. Only report ok:true if every test passes.",
157
+ "timeout": 120
158
+ }
159
+ ```
160
+
161
+ Tool calls made by an agent hook do **not** re-trigger tool hooks, so there is no
162
+ infinite loop.
163
+
164
+ ## Examples
165
+
166
+ **Block dangerous shell commands (project, command hook):**
167
+
168
+ ```json
169
+ {
170
+ "schema_version": 1,
171
+ "hooks": {
172
+ "PreToolUse": [
173
+ {
174
+ "matcher": "execute_terminal_command|run_command|run_command_tracked",
175
+ "hooks": [{ "type": "command", "command": "./.kolega/deny-rm.sh" }]
176
+ }
177
+ ]
178
+ }
179
+ }
180
+ ```
181
+
182
+ **Don't stop until the tests pass (prompt hook):**
183
+
184
+ ```json
185
+ {
186
+ "schema_version": 1,
187
+ "hooks": {
188
+ "Stop": [
189
+ {
190
+ "matcher": "*",
191
+ "hooks": [{
192
+ "type": "prompt",
193
+ "prompt": "Based on the conversation, did the agent finish ALL requested work AND leave the tests passing? $EVENT"
194
+ }]
195
+ }
196
+ ]
197
+ }
198
+ }
199
+ ```
200
+
201
+ **Verify tests actually pass before stopping (agent hook):**
202
+
203
+ ```json
204
+ {
205
+ "schema_version": 1,
206
+ "hooks": {
207
+ "Stop": [
208
+ {
209
+ "matcher": "*",
210
+ "hooks": [{
211
+ "type": "agent",
212
+ "prompt": "Run the project's test command and confirm it exits cleanly.",
213
+ "timeout": 120
214
+ }]
215
+ }
216
+ ]
217
+ }
218
+ }
219
+ ```
220
+
221
+ ## Trusting project hooks
222
+
223
+ A project's `.kolega/hooks.json` can run arbitrary commands, so it is **ignored until you
224
+ explicitly trust the project**. Global/user hooks are always trusted.
225
+
226
+ When an untrusted project defines hooks, Kolega Code tells you and runs only the global
227
+ hooks. To enable the project's hooks, launch with:
228
+
229
+ ```bash
230
+ kolega-code --trust-hooks # TUI
231
+ kolega-code ask "…" --trust-hooks # non-interactive
232
+ ```
233
+
234
+ Trust is recorded once (per resolved project path) in your user settings, so future runs
235
+ in that project enable its hooks automatically.
236
+
237
+ ## Safety and behavior notes
238
+
239
+ - **Failure is isolated.** A hook that crashes, times out, or prints garbage is logged and
240
+ the action proceeds — a broken hook never wedges the agent. Only a clean `exit 2`,
241
+ `permissionDecision: "deny"`, or `ok: false` blocks.
242
+ - **Each handler has a `timeout`** (seconds). On timeout the process is killed and treated
243
+ as a non-blocking error.
244
+ - **Tool hooks apply to sub-agents too**, so a `PreToolUse` guard also covers tools used by
245
+ dispatched sub-agents.
246
+ - A `Stop` hook can force the agent to keep working only a bounded number of times per
247
+ turn, so a misbehaving "don't stop" hook cannot loop forever.
@@ -24,8 +24,11 @@ and your sessions, settings, and API keys are stored on your own machine.
24
24
  - **Dispatches sub-agents.** For larger tasks, the main agent can hand off to
25
25
  specialized agents (investigation, browser, coding, general) and track their
26
26
  activity live.
27
+ - **Orchestrates workflows.** With [gigacode](gigacode/), the agent can fan out
28
+ many sub-agents in parallel — for broad audits, large migrations, or
29
+ implementing a plan's independent parts at once.
27
30
  - **Works non-interactively too.** Run a single prompt with
28
- [`kolega-code ask`](../../cli/ask/), get JSON output, and save or resume
31
+ [`kolega-code ask`](cli/ask/), get JSON output, and save or resume
29
32
  sessions.
30
33
 
31
34
  ## Two ways to use it
@@ -36,8 +39,8 @@ and your sessions, settings, and API keys are stored on your own machine.
36
39
  | **One-shot** | `kolega-code ask "…"` | Scripting, automation, quick questions, CI |
37
40
 
38
41
  There are also helper commands for managing
39
- [sessions](../../cli/sessions/) and checking your
40
- [configuration](../../cli/doctor/).
42
+ [sessions](cli/sessions/) and checking your
43
+ [configuration](cli/doctor/).
41
44
 
42
45
  ## Bring your own model
43
46
 
@@ -45,7 +48,7 @@ Kolega Code talks to a range of LLM providers — including Anthropic, OpenAI,
45
48
  Google, Moonshot, and DeepSeek — and lets you assign **different models to
46
49
  different roles** (a strong long-context model for coding, a fast cheap model for
47
50
  small utility calls, and one for extended "thinking"). See
48
- [Providers & Models](../../configuration/providers-and-models/).
51
+ [Providers & Models](configuration/providers-and-models/).
49
52
 
50
53
  ## What you need
51
54
 
@@ -53,5 +56,31 @@ small utility calls, and one for extended "thinking"). See
53
56
  - An **API key** for at least one supported provider
54
57
  - A terminal that supports a modern TUI (most do)
55
58
 
56
- Head to [Installation](../installation/) to set it up, then the
57
- [Quick Start](../quick-start/) to run your first session.
59
+ ## Install
60
+
61
+ Install with the script:
62
+
63
+ ```bash
64
+ curl -fsSL https://kolega.dev/install-kolega-code.sh | sh
65
+ ```
66
+
67
+ Or with [uv](https://docs.astral.sh/uv/):
68
+
69
+ ```bash
70
+ uv tool install kolega-code
71
+ ```
72
+
73
+ Verify the install and start a session in your project:
74
+
75
+ ```bash
76
+ kolega-code --version
77
+ kolega-code .
78
+ ```
79
+
80
+ See [Installation](getting-started/installation/) for requirements, other install
81
+ methods, and upgrade/uninstall commands.
82
+
83
+ ## Next steps
84
+
85
+ Once you're installed and have a provider key set, head to the
86
+ [Quick Start](getting-started/quick-start/) to run your first session.
@@ -37,14 +37,41 @@ At the bottom sits the **composer** — the text box where you type prompts. See
37
37
  can return to the live edge.
38
38
  - **Tool results** — shown as collapsible blocks with a state indicator
39
39
  (running / done / failed). Expand to see the full result.
40
- - **Sub-agents** — when the main agent dispatches a sub-agent, its activity is
41
- tracked live with status updates.
40
+ - **Sub-agents** — when the main agent dispatches a sub-agent, a live card tracks
41
+ it inline: the agent name, elapsed time, tool count, token usage, what it's doing
42
+ right now, and a tail of its latest output. Press `Ctrl+G` (or click the card) to
43
+ open the full [sub-agent inspector](#sub-agent-inspector).
42
44
  - **Option lists** — when the agent asks you to choose between options (including
43
45
  plan decisions and tool approvals), they render as a **vertical,
44
46
  arrow-key-selectable list**.
45
47
  Use the arrow keys to highlight, number keys (`1`–`9`) to jump, and `Enter` to
46
48
  confirm.
47
49
 
50
+ ## Sub-agent inspector
51
+
52
+ The inline cards summarize sub-agent activity; the **inspector** shows the whole
53
+ story. Press `Ctrl+G` (or click any sub-agent card) to open a full-screen
54
+ "mission control" view:
55
+
56
+ - **Roster** (left) — every sub-agent dispatched this turn, running or finished,
57
+ each with a live spinner, status, elapsed time, tool count, and token usage.
58
+ Nested sub-agents are indented by depth.
59
+ - **Trajectory** (right) — the selected agent's full run: its thinking, each tool
60
+ call, the tool results (expandable, just like the main transcript), and its
61
+ responses, streaming live as it works.
62
+
63
+ | Keys | Action |
64
+ | --- | --- |
65
+ | `Ctrl+G` | Open the inspector (on the most recently active sub-agent) |
66
+ | `↑` / `↓` | Switch between sub-agents |
67
+ | `Tab` then `Enter` | Focus a tool call and expand it (or click it) |
68
+ | `o` | Toggle follow — auto-scroll to the newest activity |
69
+ | `y` | Copy the selected agent's trajectory to the clipboard |
70
+ | `Esc` / `q` | Close the inspector |
71
+
72
+ The inspector is read-only: opening or closing it never interrupts the agent, so
73
+ the turn keeps running while you look around.
74
+
48
75
  ## Key bindings at a glance
49
76
 
50
77
  | Keys | Action |
@@ -52,6 +79,7 @@ At the bottom sits the **composer** — the text box where you type prompts. See
52
79
  | `Shift+Tab` | Toggle Build ⇄ Plan mode |
53
80
  | `Ctrl+P` | Toggle shell/edit permissions between Ask ⇄ Auto |
54
81
  | `Ctrl+O` | Show or hide the side panel |
82
+ | `Ctrl+G` | Open the sub-agent inspector |
55
83
  | `Enter` | Send the prompt |
56
84
  | `Shift+Enter` / `Ctrl+J` | Insert a newline |
57
85
  | `Ctrl+C` / `Escape` | Cancel the current generation |
@@ -22,6 +22,10 @@ default to `ask`, so shell commands and file edits prompt before they run. Press
22
22
  When you choose an “always allow” approval, Kolega Code stores the local rule in
23
23
  `.kolega/permissions.json` for that project.
24
24
 
25
+ If [gigacode](../../gigacode/) is enabled, the sub-agents inside a workflow run in
26
+ `auto` permission mode regardless of this setting — see
27
+ [Behavior and safety](../../gigacode/#behavior-and-safety).
28
+
25
29
  ## Plan mode
26
30
 
27
31
  A **read-only** planning pass. Plan mode uses a standalone planning agent that does
@@ -39,7 +43,9 @@ happens next — typically to **implement the plan** or to **keep discussing** i
39
43
  The decision is presented as a vertical, arrow-key-selectable option list.
40
44
 
41
45
  Use Plan mode when a change is non-trivial and you want to agree on the approach
42
- before any files are touched.
46
+ before any files are touched. With [gigacode](../../gigacode/) on, a planning agent
47
+ can fan out parallel research across the codebase; those workflow sub-agents stay
48
+ read-only too.
43
49
 
44
50
  ## A typical loop
45
51
 
@@ -40,6 +40,7 @@ These control the app and your session.
40
40
  | `/permissions` | Show or switch the shell/edit permission mode |
41
41
  | `/model` | Choose the active model |
42
42
  | `/effort` | Choose the active model's thinking effort |
43
+ | `/gigacode` | Toggle [gigacode](../../gigacode/) workflow orchestration on or off |
43
44
  | `/copy` | Copy the last response to the clipboard |
44
45
  | `/version` | Show the Kolega Code version |
45
46
  | `/update` | Update Kolega Code to the latest version |
@@ -148,4 +148,4 @@ __all__ = [
148
148
  "parse_git_status_output",
149
149
  ]
150
150
 
151
- __version__ = "0.3.2"
151
+ __version__ = "0.5.0"
@@ -39,4 +39,4 @@ __all__ = [
39
39
  "ToolExtension",
40
40
  ]
41
41
 
42
- __version__ = "0.3.2"
42
+ __version__ = "0.5.0"