minion-cli 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 (217) hide show
  1. minion_cli-1.0.0/.claude/settings.local.json +40 -0
  2. minion_cli-1.0.0/.env.example +22 -0
  3. minion_cli-1.0.0/.gitignore +65 -0
  4. minion_cli-1.0.0/CACHING_BASELINE.md +90 -0
  5. minion_cli-1.0.0/CHANGELOG.md +272 -0
  6. minion_cli-1.0.0/CLAUDE.md +466 -0
  7. minion_cli-1.0.0/LICENSE +21 -0
  8. minion_cli-1.0.0/PKG-INFO +336 -0
  9. minion_cli-1.0.0/README.md +296 -0
  10. minion_cli-1.0.0/examples/a2a_echo_agent.py +299 -0
  11. minion_cli-1.0.0/examples/mcp_notes_server.py +451 -0
  12. minion_cli-1.0.0/examples/mcp_workspace_server.py +632 -0
  13. minion_cli-1.0.0/minion/__init__.py +5 -0
  14. minion_cli-1.0.0/minion/__main__.py +3 -0
  15. minion_cli-1.0.0/minion/a2a/__init__.py +37 -0
  16. minion_cli-1.0.0/minion/a2a/card.py +69 -0
  17. minion_cli-1.0.0/minion/a2a/client.py +450 -0
  18. minion_cli-1.0.0/minion/a2a/config.py +95 -0
  19. minion_cli-1.0.0/minion/a2a/manager.py +116 -0
  20. minion_cli-1.0.0/minion/a2a/models.py +233 -0
  21. minion_cli-1.0.0/minion/a2a/server.py +454 -0
  22. minion_cli-1.0.0/minion/agents/__init__.py +89 -0
  23. minion_cli-1.0.0/minion/agents/builtin/coder.yaml +35 -0
  24. minion_cli-1.0.0/minion/agents/builtin/researcher.yaml +34 -0
  25. minion_cli-1.0.0/minion/agents/builtin/reviewer.yaml +33 -0
  26. minion_cli-1.0.0/minion/agents/builtin/tester.yaml +35 -0
  27. minion_cli-1.0.0/minion/agents/display.py +285 -0
  28. minion_cli-1.0.0/minion/agents/manifest.py +79 -0
  29. minion_cli-1.0.0/minion/agents/persist.py +28 -0
  30. minion_cli-1.0.0/minion/agents/registry.py +55 -0
  31. minion_cli-1.0.0/minion/agents/runner.py +253 -0
  32. minion_cli-1.0.0/minion/cli/__init__.py +3 -0
  33. minion_cli-1.0.0/minion/cli/_core.py +287 -0
  34. minion_cli-1.0.0/minion/cli/agents.py +60 -0
  35. minion_cli-1.0.0/minion/cli/config.py +39 -0
  36. minion_cli-1.0.0/minion/cli/doctor.py +82 -0
  37. minion_cli-1.0.0/minion/cli/mcp.py +54 -0
  38. minion_cli-1.0.0/minion/cli/memory.py +104 -0
  39. minion_cli-1.0.0/minion/cli/remote.py +88 -0
  40. minion_cli-1.0.0/minion/cli/skills.py +27 -0
  41. minion_cli-1.0.0/minion/compact/__init__.py +39 -0
  42. minion_cli-1.0.0/minion/compact/base.py +31 -0
  43. minion_cli-1.0.0/minion/compact/summary.py +113 -0
  44. minion_cli-1.0.0/minion/compact/truncate.py +58 -0
  45. minion_cli-1.0.0/minion/config/__init__.py +52 -0
  46. minion_cli-1.0.0/minion/config/file.py +422 -0
  47. minion_cli-1.0.0/minion/config/interactive.py +198 -0
  48. minion_cli-1.0.0/minion/config/model_catalog.py +165 -0
  49. minion_cli-1.0.0/minion/config/wizard.py +151 -0
  50. minion_cli-1.0.0/minion/context/__init__.py +11 -0
  51. minion_cli-1.0.0/minion/context/filetree.py +151 -0
  52. minion_cli-1.0.0/minion/context/manifest.py +248 -0
  53. minion_cli-1.0.0/minion/context/project.py +83 -0
  54. minion_cli-1.0.0/minion/context/prompts.py +106 -0
  55. minion_cli-1.0.0/minion/hooks/__init__.py +37 -0
  56. minion_cli-1.0.0/minion/hooks/builtin/__init__.py +3 -0
  57. minion_cli-1.0.0/minion/hooks/builtin/minion_md.py +53 -0
  58. minion_cli-1.0.0/minion/hooks/events.py +122 -0
  59. minion_cli-1.0.0/minion/hooks/handler.py +24 -0
  60. minion_cli-1.0.0/minion/hooks/handlers/__init__.py +3 -0
  61. minion_cli-1.0.0/minion/hooks/handlers/shell.py +76 -0
  62. minion_cli-1.0.0/minion/hooks/manifest.py +73 -0
  63. minion_cli-1.0.0/minion/hooks/persist.py +60 -0
  64. minion_cli-1.0.0/minion/hooks/registry.py +115 -0
  65. minion_cli-1.0.0/minion/hooks/result.py +14 -0
  66. minion_cli-1.0.0/minion/hooks/runner.py +119 -0
  67. minion_cli-1.0.0/minion/llm/__init__.py +4 -0
  68. minion_cli-1.0.0/minion/llm/anthropic.py +370 -0
  69. minion_cli-1.0.0/minion/llm/base.py +210 -0
  70. minion_cli-1.0.0/minion/llm/conversation.py +252 -0
  71. minion_cli-1.0.0/minion/llm/factory.py +78 -0
  72. minion_cli-1.0.0/minion/llm/openai.py +148 -0
  73. minion_cli-1.0.0/minion/llm/reflection.py +344 -0
  74. minion_cli-1.0.0/minion/llm/validate.py +70 -0
  75. minion_cli-1.0.0/minion/mcp/__init__.py +13 -0
  76. minion_cli-1.0.0/minion/mcp/config.py +124 -0
  77. minion_cli-1.0.0/minion/mcp/manager.py +766 -0
  78. minion_cli-1.0.0/minion/memory/__init__.py +13 -0
  79. minion_cli-1.0.0/minion/memory/config.py +42 -0
  80. minion_cli-1.0.0/minion/memory/embedder.py +68 -0
  81. minion_cli-1.0.0/minion/memory/extractor.py +231 -0
  82. minion_cli-1.0.0/minion/memory/injection.py +88 -0
  83. minion_cli-1.0.0/minion/memory/record.py +156 -0
  84. minion_cli-1.0.0/minion/memory/store.py +481 -0
  85. minion_cli-1.0.0/minion/memory/triggers.py +70 -0
  86. minion_cli-1.0.0/minion/memory/vector_store.py +123 -0
  87. minion_cli-1.0.0/minion/output/__init__.py +16 -0
  88. minion_cli-1.0.0/minion/output/base.py +202 -0
  89. minion_cli-1.0.0/minion/output/console.py +217 -0
  90. minion_cli-1.0.0/minion/output/diff.py +181 -0
  91. minion_cli-1.0.0/minion/output/display_utils.py +200 -0
  92. minion_cli-1.0.0/minion/output/formatter.py +154 -0
  93. minion_cli-1.0.0/minion/output/tui.py +199 -0
  94. minion_cli-1.0.0/minion/planner/__init__.py +10 -0
  95. minion_cli-1.0.0/minion/planner/creator.py +401 -0
  96. minion_cli-1.0.0/minion/planner/storage.py +54 -0
  97. minion_cli-1.0.0/minion/repl/__init__.py +22 -0
  98. minion_cli-1.0.0/minion/repl/agent_handlers.py +94 -0
  99. minion_cli-1.0.0/minion/repl/commands.py +659 -0
  100. minion_cli-1.0.0/minion/repl/config_cmd.py +271 -0
  101. minion_cli-1.0.0/minion/repl/init_md.py +70 -0
  102. minion_cli-1.0.0/minion/repl/input.py +168 -0
  103. minion_cli-1.0.0/minion/repl/mcp.py +188 -0
  104. minion_cli-1.0.0/minion/repl/session.py +1521 -0
  105. minion_cli-1.0.0/minion/repl/state.py +103 -0
  106. minion_cli-1.0.0/minion/runner/__init__.py +42 -0
  107. minion_cli-1.0.0/minion/runner/context.py +91 -0
  108. minion_cli-1.0.0/minion/runner/loop.py +616 -0
  109. minion_cli-1.0.0/minion/runner/parallel.py +318 -0
  110. minion_cli-1.0.0/minion/runner/session.py +172 -0
  111. minion_cli-1.0.0/minion/skills/__init__.py +12 -0
  112. minion_cli-1.0.0/minion/skills/builtin/commit.yaml +16 -0
  113. minion_cli-1.0.0/minion/skills/builtin/explain.yaml +27 -0
  114. minion_cli-1.0.0/minion/skills/builtin/refactor.yaml +33 -0
  115. minion_cli-1.0.0/minion/skills/builtin/review.yaml +28 -0
  116. minion_cli-1.0.0/minion/skills/builtin/test.yaml +24 -0
  117. minion_cli-1.0.0/minion/skills/manifest.py +80 -0
  118. minion_cli-1.0.0/minion/skills/persist.py +28 -0
  119. minion_cli-1.0.0/minion/skills/registry.py +76 -0
  120. minion_cli-1.0.0/minion/skills/runner.py +140 -0
  121. minion_cli-1.0.0/minion/theme/__init__.py +75 -0
  122. minion_cli-1.0.0/minion/theme/banner.py +297 -0
  123. minion_cli-1.0.0/minion/theme/console.py +31 -0
  124. minion_cli-1.0.0/minion/theme/palette.py +32 -0
  125. minion_cli-1.0.0/minion/theme/printers.py +295 -0
  126. minion_cli-1.0.0/minion/tools/__init__.py +1 -0
  127. minion_cli-1.0.0/minion/tools/confirmation.py +137 -0
  128. minion_cli-1.0.0/minion/tools/definitions.py +357 -0
  129. minion_cli-1.0.0/minion/tools/executor.py +903 -0
  130. minion_cli-1.0.0/minion/tools/implementations.py +549 -0
  131. minion_cli-1.0.0/minion/tools/outline.py +241 -0
  132. minion_cli-1.0.0/minion/tools/permissions.py +280 -0
  133. minion_cli-1.0.0/minion/tracing/__init__.py +12 -0
  134. minion_cli-1.0.0/minion/tracing/cli.py +161 -0
  135. minion_cli-1.0.0/minion/tracing/events.py +310 -0
  136. minion_cli-1.0.0/minion/tracing/server.py +85 -0
  137. minion_cli-1.0.0/minion/tracing/tracer.py +154 -0
  138. minion_cli-1.0.0/minion/tracing/ui.html +1166 -0
  139. minion_cli-1.0.0/minion/tui/__init__.py +46 -0
  140. minion_cli-1.0.0/minion/tui/agent_registry.py +96 -0
  141. minion_cli-1.0.0/minion/tui/app.py +1417 -0
  142. minion_cli-1.0.0/minion/tui/choice_panel.py +98 -0
  143. minion_cli-1.0.0/minion/tui/conversation.py +319 -0
  144. minion_cli-1.0.0/minion/tui/inspector.py +604 -0
  145. minion_cli-1.0.0/minion/tui/keys.py +20 -0
  146. minion_cli-1.0.0/minion/tui/messages.py +11 -0
  147. minion_cli-1.0.0/minion/tui/permission.py +188 -0
  148. minion_cli-1.0.0/minion/tui/render.py +141 -0
  149. minion_cli-1.0.0/minion/tui/screens/__init__.py +13 -0
  150. minion_cli-1.0.0/minion/tui/screens/agents_screen.py +2963 -0
  151. minion_cli-1.0.0/minion/tui/screens/base.py +373 -0
  152. minion_cli-1.0.0/minion/tui/screens/completion_setup.py +261 -0
  153. minion_cli-1.0.0/minion/tui/screens/config_panel.py +513 -0
  154. minion_cli-1.0.0/minion/tui/screens/help_screen.py +755 -0
  155. minion_cli-1.0.0/minion/tui/screens/hooks_screen.py +2367 -0
  156. minion_cli-1.0.0/minion/tui/screens/load_screen.py +528 -0
  157. minion_cli-1.0.0/minion/tui/screens/memories_screen.py +932 -0
  158. minion_cli-1.0.0/minion/tui/screens/model_config.py +930 -0
  159. minion_cli-1.0.0/minion/tui/screens/skills_screen.py +2682 -0
  160. minion_cli-1.0.0/minion/tui/setup_checklist.py +219 -0
  161. minion_cli-1.0.0/minion/tui/slots.py +180 -0
  162. minion_cli-1.0.0/minion/tui/status.py +144 -0
  163. minion_cli-1.0.0/minion/tui/terminal.py +92 -0
  164. minion_cli-1.0.0/minion/tui/theme.py +186 -0
  165. minion_cli-1.0.0/pyproject.toml +80 -0
  166. minion_cli-1.0.0/pyrightconfig.json +9 -0
  167. minion_cli-1.0.0/tests/__init__.py +0 -0
  168. minion_cli-1.0.0/tests/test_a2a.py +878 -0
  169. minion_cli-1.0.0/tests/test_a2a_async.py +429 -0
  170. minion_cli-1.0.0/tests/test_a2a_server.py +561 -0
  171. minion_cli-1.0.0/tests/test_adapters.py +144 -0
  172. minion_cli-1.0.0/tests/test_agents.py +499 -0
  173. minion_cli-1.0.0/tests/test_compact.py +230 -0
  174. minion_cli-1.0.0/tests/test_config.py +104 -0
  175. minion_cli-1.0.0/tests/test_config_file.py +204 -0
  176. minion_cli-1.0.0/tests/test_confirmation.py +260 -0
  177. minion_cli-1.0.0/tests/test_context.py +335 -0
  178. minion_cli-1.0.0/tests/test_conversation.py +351 -0
  179. minion_cli-1.0.0/tests/test_diff.py +168 -0
  180. minion_cli-1.0.0/tests/test_display_utils.py +451 -0
  181. minion_cli-1.0.0/tests/test_executor.py +99 -0
  182. minion_cli-1.0.0/tests/test_factory.py +61 -0
  183. minion_cli-1.0.0/tests/test_formatter.py +306 -0
  184. minion_cli-1.0.0/tests/test_hooks.py +284 -0
  185. minion_cli-1.0.0/tests/test_hooks_screen.py +169 -0
  186. minion_cli-1.0.0/tests/test_llm_async.py +268 -0
  187. minion_cli-1.0.0/tests/test_llm_rate_limit.py +166 -0
  188. minion_cli-1.0.0/tests/test_llm_types.py +253 -0
  189. minion_cli-1.0.0/tests/test_mcp_notifications.py +868 -0
  190. minion_cli-1.0.0/tests/test_mcp_sdk.py +404 -0
  191. minion_cli-1.0.0/tests/test_memory_embedder.py +84 -0
  192. minion_cli-1.0.0/tests/test_memory_extractor.py +171 -0
  193. minion_cli-1.0.0/tests/test_memory_flow.py +243 -0
  194. minion_cli-1.0.0/tests/test_memory_injection.py +133 -0
  195. minion_cli-1.0.0/tests/test_memory_record.py +139 -0
  196. minion_cli-1.0.0/tests/test_memory_store.py +354 -0
  197. minion_cli-1.0.0/tests/test_memory_triggers.py +117 -0
  198. minion_cli-1.0.0/tests/test_memory_vector_store.py +151 -0
  199. minion_cli-1.0.0/tests/test_outline.py +223 -0
  200. minion_cli-1.0.0/tests/test_permissions.py +284 -0
  201. minion_cli-1.0.0/tests/test_planner.py +421 -0
  202. minion_cli-1.0.0/tests/test_planning_flow.py +207 -0
  203. minion_cli-1.0.0/tests/test_reflection.py +275 -0
  204. minion_cli-1.0.0/tests/test_repl.py +379 -0
  205. minion_cli-1.0.0/tests/test_repl_memory_commands.py +189 -0
  206. minion_cli-1.0.0/tests/test_runner.py +370 -0
  207. minion_cli-1.0.0/tests/test_runner_async.py +380 -0
  208. minion_cli-1.0.0/tests/test_session.py +183 -0
  209. minion_cli-1.0.0/tests/test_skills.py +567 -0
  210. minion_cli-1.0.0/tests/test_tools.py +294 -0
  211. minion_cli-1.0.0/tests/test_tools_async.py +141 -0
  212. minion_cli-1.0.0/tests/test_tools_phase4.py +263 -0
  213. minion_cli-1.0.0/tests/test_tracing.py +230 -0
  214. minion_cli-1.0.0/tests/test_tui_app.py +202 -0
  215. minion_cli-1.0.0/tests/test_tui_components.py +542 -0
  216. minion_cli-1.0.0/tests/test_tui_registry.py +239 -0
  217. minion_cli-1.0.0/tests/test_tui_terminal.py +107 -0
@@ -0,0 +1,40 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(wc -l /Users/bhanu/Documents/Projects/minion-cli/minion/*.py)",
5
+ "Bash(.venv/bin/pytest tests/test_tracing.py -v)",
6
+ "Bash(.venv/bin/pytest --tb=short -q)",
7
+ "Bash(.venv/bin/minion trace:*)",
8
+ "Bash(.venv/bin/minion --help)",
9
+ "Bash(.venv/bin/minion --version)",
10
+ "Bash(.venv/bin/pytest tests/test_tracing.py -q)",
11
+ "Bash(.venv/bin/nefario trace:*)",
12
+ "Bash(.venv/bin/pytest tests/test_planner.py -v)",
13
+ "Bash(.venv/bin/pytest tests/ -q)",
14
+ "Bash(.venv/bin/minion skills:*)",
15
+ "Bash(python3 -m pytest tests/ -q -k \"skill\")",
16
+ "Bash(.venv/bin/pytest tests/test_mcp.py -v)",
17
+ "Bash(grep -E \"^-.*\\\\.py$\")",
18
+ "Bash(.venv/bin/pytest *)",
19
+ "Bash(.venv/bin/python -m pytest -q)",
20
+ "Bash(/Users/bhanu/Documents/Projects/minion-cli/.venv/bin/python3 -c ' *)",
21
+ "Bash(python3.12 -m pytest --tb=short -q)",
22
+ "Bash(~/.pyenv/versions/3.12.9/bin/python -m pytest --tb=short -q)",
23
+ "Bash(.venv/bin/python -m pytest --tb=short -q)",
24
+ "Bash(grep -E \"\\\\.py$\")",
25
+ "Bash(.venv/bin/python -m pyright minion/tui/screens/base.py)",
26
+ "Bash(.venv/bin/python -m pyright minion/tui/screens/)",
27
+ "Bash(.venv/bin/python -m pyright minion/tui/screens/model_config.py)",
28
+ "Bash(.venv/bin/python -m pyright minion/tui/screens/config_panel.py)",
29
+ "Bash(MINION_NO_TUI=1 .venv/bin/python -m minion)",
30
+ "Bash(grep -v \"^\\\\s*$\")",
31
+ "Bash(python3 -c \"import textual; print\\(textual.__version__\\)\")",
32
+ "Bash(python3 -c \"from textual.app import App; import inspect; print\\([m for m in dir\\(App\\) if 'suspend' in m.lower\\(\\)]\\)\")",
33
+ "Bash(.venv/bin/python -c \"import textual; print\\(textual.__version__\\)\")",
34
+ "Bash(.venv/bin/python -c \"from textual.app import App; print\\([m for m in dir\\(App\\) if 'suspend' in m.lower\\(\\)]\\)\")",
35
+ "Read(//Users/bhanu/Desktop/Screenshots/minion agents experience/**)",
36
+ "Read(//Users/bhanu/Desktop/Screenshots/minion experience/**)",
37
+ "Read(//Users/bhanu/Desktop/Screenshots/claude code hooks tui experience/**)"
38
+ ]
39
+ }
40
+ }
@@ -0,0 +1,22 @@
1
+ # ─── Provider Selection ────────────────────────────────────────────────────────
2
+ # Which LLM provider to use by default.
3
+ # Options: anthropic | openai | openrouter
4
+ MINION_PROVIDER=anthropic
5
+
6
+ # Model ID for the selected provider.
7
+ # Anthropic examples : claude-sonnet-4-5, claude-opus-4-5, claude-haiku-4-5-20251001
8
+ # OpenAI examples : gpt-4o, gpt-4o-mini
9
+ # OpenRouter examples: anthropic/claude-sonnet-4-5, openai/gpt-4o, google/gemini-pro
10
+ MINION_MODEL=claude-sonnet-4-5
11
+
12
+ # ─── API Keys ──────────────────────────────────────────────────────────────────
13
+ # Fill in the key(s) for the provider(s) you want to use.
14
+
15
+ ANTHROPIC_API_KEY=sk-ant-...
16
+
17
+ OPENAI_API_KEY=sk-...
18
+
19
+ # OpenRouter gives access to 100+ models through one OpenAI-compatible API.
20
+ # Get a key at https://openrouter.ai
21
+ OPENROUTER_API_KEY=sk-or-...
22
+ OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
@@ -0,0 +1,65 @@
1
+ # Context & planning docs (not for version control)
2
+ .context/
3
+
4
+ # Learning notes & concept briefs (personal study material)
5
+ .learn/
6
+
7
+ # Python
8
+ __pycache__/
9
+ *.py[cod]
10
+ *$py.class
11
+ *.so
12
+ .Python
13
+ build/
14
+ dist/
15
+ develop-eggs/
16
+ downloads/
17
+ eggs/
18
+ .eggs/
19
+ lib/
20
+ lib64/
21
+ parts/
22
+ sdist/
23
+ var/
24
+ wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ .venv/
29
+ venv/
30
+ env/
31
+ ENV/
32
+
33
+ # Node / TypeScript
34
+ node_modules/
35
+ dist/
36
+ *.js.map
37
+ *.d.ts.map
38
+
39
+ # Environment & secrets (.example is a safe template, always commit it)
40
+ .env
41
+ .env.*
42
+ !.env.example
43
+ *.pem
44
+ *.key
45
+
46
+ # IDE
47
+ .vscode/
48
+ .idea/
49
+ *.swp
50
+ *.swo
51
+
52
+ # OS
53
+ .DS_Store
54
+ Thumbs.db
55
+
56
+ # Logs
57
+ *.log
58
+ logs/
59
+
60
+ # Test coverage
61
+ .coverage
62
+ htmlcov/
63
+ .pytest_cache/
64
+ coverage/
65
+ .env.bak
@@ -0,0 +1,90 @@
1
+ # Prompt Caching — Baseline & Expected Improvement
2
+
3
+ ## When this was recorded
4
+ 2026-05-02 — after implementing caching improvements, before dashboard data updated.
5
+
6
+ ---
7
+
8
+ ## What was implemented
9
+
10
+ ### Phase 1 — Caching infrastructure (commit `5f2cd1d`)
11
+ Added `cache_control: {"type": "ephemeral"}` to:
12
+ - Last tool in the tool definitions list (so full tool list gets cached)
13
+ - Static system prompt block (`system=` parameter)
14
+
15
+ Split system prompt into two parameters:
16
+ - `system=` — static base prompt (cached): BASE_SYSTEM_PROMPT + ProjectContext + SUBAGENT_GUIDANCE + A2A_GUIDANCE
17
+ - `system_dynamic=` — dynamic per-turn context (NOT cached): memory block + active plan block
18
+
19
+ ### Phase 2 — Cache threshold fix + prompt quality (commit `1954226`)
20
+ Expanded prompts to push static prefix above the 2048-token minimum cacheable threshold.
21
+
22
+ ---
23
+
24
+ ## Token counts (before vs. after)
25
+
26
+ | Component | Before | After |
27
+ |---|---|---|
28
+ | Tools (8 tools) | ~1,461 | ~1,461 (unchanged) |
29
+ | BASE_SYSTEM_PROMPT | ~356 | ~599 |
30
+ | SUBAGENT_GUIDANCE | ~205 | ~409 |
31
+ | **Static prefix total** | **~2,047** | **~2,469** |
32
+ | Threshold (Haiku 4.5 + Sonnet 4.6) | 2,048 | 2,048 |
33
+ | **Margin** | **-1 (BELOW)** | **+421 (above)** |
34
+
35
+ Verified with:
36
+ ```
37
+ Tools: 1,461 tokens
38
+ BASE_SYSTEM: 599 tokens
39
+ SUBAGENT_GUIDANCE: 409 tokens
40
+ Total: 2,469 tokens ✓ PASS
41
+ ```
42
+
43
+ ---
44
+
45
+ ## Dashboard snapshot before improvements
46
+
47
+ | Metric | Value |
48
+ |---|---|
49
+ | Cache read ratio | 6.5% |
50
+ | Write amortization | 4.21× |
51
+ | Cache read tokens | 619K |
52
+ | Total input tokens | ~9.7M |
53
+ | Model | Claude Haiku 4.5 |
54
+
55
+ ### Why 6.5% was happening
56
+ The static prefix was **1 token below** the 2048-token minimum cacheable threshold.
57
+ `cache_control` markers were being sent on every request but Anthropic silently
58
+ no-ops them when the prefix is below threshold. The only turns that hit the cache
59
+ were ones where A2A guidance was also appended, pushing it just over 2048.
60
+
61
+ ---
62
+
63
+ ## Expected metrics after improvements
64
+
65
+ | Metric | Before | Expected after |
66
+ |---|---|---|
67
+ | Cache read ratio | 6.5% | 60–80% |
68
+ | Write amortization | 4.21× | similar or higher |
69
+ | Cache read tokens | 619K (period) | much higher per period |
70
+
71
+ **Why the jump:** Every turn after the first in a session will now be a cache read
72
+ (static prefix is stable at 2,469 tokens, well above threshold). Previously almost
73
+ no turns were cache reads.
74
+
75
+ Cache read tokens cost ~10% of normal input token price, so a 70% cache read ratio
76
+ means ~63% reduction in effective input token cost for the cached prefix portion.
77
+
78
+ ---
79
+
80
+ ## Files changed
81
+
82
+ - `minion/llm/anthropic.py` — `cache_control` on tools and system blocks
83
+ - `minion/llm/base.py` — `system_dynamic` param added to `stream()` / `async_stream()`
84
+ - `minion/llm/openai.py` — `system_dynamic` param (combined, no caching for OpenAI)
85
+ - `minion/runner.py` — threads `system_dynamic` through, fixes `system_prompt_tokens`
86
+ - `minion/repl.py` — extracts memory+plan into `system_dynamic`
87
+ - `minion/prompts.py` — BASE_SYSTEM_PROMPT expanded (+243 tokens)
88
+ - `minion/agents/__init__.py` — SUBAGENT_GUIDANCE expanded (+204 tokens)
89
+ - `minion/a2a/__init__.py` — A2A_REMOTE_GUIDANCE expanded (+3 lines)
90
+ - `minion/agents/builtin/*.yaml` — all 4 roles: no-clarifying-questions rule added
@@ -0,0 +1,272 @@
1
+ # Changelog
2
+
3
+ All notable changes to minion-cli are documented here.
4
+ Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
5
+ Versioning: [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ---
8
+
9
+ ## [Unreleased]
10
+
11
+ ## [1.0.0] — 2026-06-07 — "Gru's Lab"
12
+
13
+ ### Added
14
+
15
+ **TUI — full Textual rewrite**
16
+ - Complete TUI rewrite from prompt_toolkit to [Textual](https://textual.textualize.io/) — Rich markup rendering, no visual glitches, proper async event loop
17
+ - `/help` — command palette modal with category tabs and per-command detail pane
18
+ - `/model` — 3-step wizard modal: provider card selector → model picker → API key input with live validation
19
+ - `/config` — interactive settings panel; all config keys editable in-app with immediate feedback
20
+ - `/load` — session picker modal with fuzzy search, content preview, and delete
21
+ - `/agents` — full agent management UI: browse all tiers, search, create, edit (tools / model / system prompt / iterations), run, duplicate, delete
22
+ - `/skills` — full skill browser: search, filter by tier, preview system prompt, run directly
23
+ - `/hooks` — hook management UI: browse, create, delete, multi-select tool filter
24
+ - `/memories` — memory browser: search, edit text, delete individual records or clear all
25
+ - Inline permission panel — confirmation dialogs render inside the conversation area (no external prompt takeover)
26
+ - Slash-command autocomplete dropdown with inline description preview; arrow-key nav, gold highlighting
27
+ - `/compact` animates with a live blue spinner; `/context` token breakdown rendered in blue
28
+ - Input shortcuts: Ctrl+A/E for line navigation, clipboard copy, selection tip
29
+ - Thinking animation during LLM calls; streaming response renders directly into conversation log
30
+ - TUI-native first-run onboarding: guided setup checklist screen with per-row status cards
31
+ - `/plan` TUI experience: live narration during planning, streaming choices on completion
32
+ - Diff shown inline in parallel tool slots and permission panel
33
+
34
+ **Hooks system**
35
+ - Lifecycle event hooks: `PreToolUse`, `PostToolUse`, `SessionStart`, `SessionEnd`, `UserPromptSubmit`
36
+ - Shell handlers — run any shell command in response to a lifecycle event
37
+ - Built-in hook: MINION.md staleness tip fires after `write_file` / `edit_file` with deduplication
38
+ - Hook definitions in YAML files at `~/.minion/hooks/` (global) and `.minion/hooks/` (project)
39
+ - `/hooks [list|on|off]` REPL command to inspect and toggle hooks
40
+ - Nefario trace events emitted for all hook lifecycle firings
41
+
42
+ **Subagents and agent management**
43
+ - Persistent agent chat mode: `/agent <role>` opens a back-and-forth session; `/back` returns to minion, `/handoff` passes the conversation
44
+ - Subagent inspector (Ctrl+O) redesigned as a two-pane Textual modal with clickable agent tabs and Markdown transcript rendering
45
+ - `/agent` result fed back to minion for interpretation after completion (both console and TUI)
46
+ - Create new agent flow in `/agents` modal: name, description, tool checklist, model, system prompt, iterations
47
+
48
+ **Packaging and release**
49
+ - `pip install minion-cli` via hatchling — wheel bundles all YAML skill/agent manifests and HTML trace viewer
50
+ - Shell tab completion: `minion --install-completion [bash|zsh|fish]`
51
+ - `minion setup` — interactive first-run wizard (provider + API key); fires automatically when no key is detected
52
+ - `minion --version` — shows installed version (`minion-cli v1.0.0`)
53
+ - `python -m minion` entry point via `__main__.py`
54
+ - Version single-sourced from `importlib.metadata` in `minion/__init__.py`
55
+ - MIT `LICENSE` file
56
+ - CHANGELOG.md in keepachangelog / semver format
57
+ - README.md with installation, quickstart, full configuration reference, and feature tour
58
+ - `pytest-cov` added to dev deps; 70% coverage threshold enforced
59
+ - Flow tests for memory pipeline, planning cycle, and compaction
60
+
61
+ ### Fixed
62
+ - LLM `complete()` / `async_complete()` switched to streaming transport — fixes silent hangs on large responses
63
+ - `pytest-asyncio` moved from runtime to dev dependencies
64
+ - `--install-completion zsh` no longer misinterpreted as a one-shot LLM prompt
65
+ - All pyright type errors resolved (0 errors, `basic` mode)
66
+ - `.env` loading consolidated to `~/.minion/.env` only — project root `.env` no longer silently loaded
67
+ - `/remote` routed through `CommandContext` so TUI captures output correctly
68
+ - Serialized parallel tool confirmations — overlapping dialogs no longer race each other
69
+
70
+ ### Changed
71
+ - Hooks configuration migrated from `[hooks]` in `config.toml` to standalone YAML files — composable and shareable per project
72
+ - `/memory` command removed; use `/memories` to browse, search, edit, and delete stored records
73
+ - `repl.py` (1,878 lines), `cli.py`, `theme.py` (608 lines), and `runner.py` decomposed into subpackages (`repl/`, `cli/`, `theme/`, `runner/`) — each module under ~300 lines
74
+ - `OutputRenderer` ABC introduced — TUI and console share one rendering code path, eliminating ~390 lines of duplicated display logic
75
+
76
+ ---
77
+
78
+ ## [0.12.0] — 2026-05-01 — "Turbo Mode"
79
+
80
+ ### Added
81
+ - Full async rewrite: `run_prompt_async()` with `asyncio.TaskGroup` for parallel tools
82
+ - Official `mcp` Python SDK replaces ~1,200 lines of hand-rolled MCP protocol code
83
+ - `~/.minion/config.toml` via stdlib `tomllib` — unified settings (provider, model, memory, tracing)
84
+ - `/config` REPL command shows merged effective config from all sources
85
+ - `edit_file` tool — targeted old_string/new_string edits (no full-file rewrites)
86
+ - `glob` and `web_fetch` tools
87
+ - Prompt caching for tools and static system prompt (cache hits from turn 2 onward)
88
+ - 429 rate-limit retry (3× with 60s countdown) + auto-compact on input-token limit
89
+ - `/compact [summary|truncate [N]]` — strategy-pattern conversation compaction
90
+ - Ctrl+C cancellation with keep-completed-work (completed tool results preserved)
91
+ - `write_file` diff preview before overwrite
92
+ - Tool accumulation spinner showing pending calls
93
+ - Tiered permissions/trust model — session / project / global auto-approval tiers
94
+ - `todo_write` / `todo_read` tools for live task progress tracking
95
+ - Live Markdown rendering for LLM responses (`Rich.Live` + `Markdown`)
96
+ - REPL multiline input (Ctrl+J / Option+Enter inserts newline)
97
+ - Slash command highlighting anywhere in the input line
98
+ - Inline-editable `[enter custom]` in permission dialogs
99
+ - Banner redesign — figlet logo + two-column info panel, silver chrome theme
100
+ - Startup warnings deferred to section 3 (banner always renders first)
101
+ - `minion doctor` CLI subcommand — health check across API key, memory, MCP, A2A
102
+ - `/mcp reload` — live MCP server reload without REPL restart
103
+ - A2A context sessions (`contextId` per remote agent per session)
104
+ - Spec-compliant `input-required` task state for human approval in A2A
105
+
106
+ ### Fixed
107
+ - Ctrl+C now cleanly cancels in-flight LLM calls (no zombie threads)
108
+ - Stdin drained before `questionary` prompts to prevent phantom declines
109
+ - `MemoryConfig` correctly wired from config.toml
110
+ - Consecutive user-message bug in `/compact` stub generation
111
+
112
+ ---
113
+
114
+ ## [0.11.0] — 2026-04-27 — "Global Domination"
115
+
116
+ ### Added
117
+ - A2A (Agent-to-Agent) bidirectional protocol — minion as both client and server
118
+ - `minion a2a serve [--port N]` — expose minion as an HTTP A2A agent
119
+ - `minion a2a list` — list configured remote agents
120
+ - Agent Card served at `/.well-known/agent.json`
121
+ - `send_remote_task` tool for delegating to remote A2A agents from the REPL
122
+ - SSE streaming for A2A task subscriptions (`POST /tasks/sendSubscribe`)
123
+ - A2A config at `~/.minion/a2a.json` and `.minion/a2a.json`
124
+ - Nefario trace events for A2A task lifecycle
125
+
126
+ ---
127
+
128
+ ## [0.10.0] — 2026-04-25 — "Minion Army"
129
+
130
+ ### Added
131
+ - SubAgent orchestrator-worker pattern via `spawn_agent` tool
132
+ - Parallel subagent execution with live terminal display panels
133
+ - 4 built-in agent roles: researcher, coder, reviewer, tester
134
+ - `minion agent run <role> <task>` — one-shot subagent CLI command
135
+ - `minion agent list` — list available roles with tool subsets
136
+ - Agent YAML manifests in `~/.minion/agents/` and `.minion/agents/`
137
+ - Max subagent depth limit (configurable via config.toml)
138
+ - Token aggregation across orchestrator + all workers in usage footer
139
+
140
+ ---
141
+
142
+ ## [0.9.0] — 2026-04-08 — "The Gadget Show"
143
+
144
+ ### Added
145
+ - MCP (Model Context Protocol) client — connect any MCP-compliant tool server
146
+ - stdio and Streamable HTTP MCP transports
147
+ - MCP resources and prompt templates support
148
+ - `minion mcp list` — inspect connected servers and their tools
149
+ - Tool namespacing: `servername__toolname` format
150
+ - MCP config at `~/.minion/mcp.json` and `.minion/mcp.json`
151
+ - `/mcp prompt <name>` REPL command for interactive MCP prompt injection
152
+ - Nefario trace events for MCP tool calls and server notifications
153
+
154
+ ---
155
+
156
+ ## [0.8.0] — 2026-04-05 — "Gadgets"
157
+
158
+ ### Added
159
+ - Skills system: reusable prompt templates invoked via `/skill-name`
160
+ - 5 built-in skills: `/commit`, `/explain`, `/refactor`, `/review`, `/test`
161
+ - User skills at `~/.minion/skills/` and project skills at `.minion/skills/`
162
+ - Skill chaining (steps field in skill YAML)
163
+ - `minion skills list` — enumerate all available skills
164
+ - Skill YAML manifests with system_prompt, tools, args, thinking_label fields
165
+
166
+ ---
167
+
168
+ ## [0.7.0] — 2026-04-03 — "Mission Planning"
169
+
170
+ ### Added
171
+ - Document-based planning with explore → plan → refine → execute workflow
172
+ - `/plan <goal>` REPL command — creates a markdown plan with tool-assisted exploration
173
+ - Interactive refinement dropdown after plan creation
174
+ - `/plan execute` — inject plan into system prompt and run the ReAct agent
175
+ - `minion plan show` — display active plan
176
+ - Nefario observability system — SQLite event store + self-contained SPA trace viewer
177
+ - `nefario` CLI entry point (`nefario --latest` opens latest session trace)
178
+ - Plan files saved to `.minion/plans/` with datestamped slugs
179
+
180
+ ---
181
+
182
+ ## [0.6.0] — 2026-04-02 — "The Banana Vault"
183
+
184
+ ### Added
185
+ - Long-term memory: extraction, storage, retrieval, and injection
186
+ - Episodic and semantic memory records with category classification
187
+ - Vector-based retrieval using numpy cosine similarity + keyword fallback
188
+ - `inject_memories()` appends a `## What I Remember` block to the system prompt
189
+ - `/remember <fact>` and `/forget <pattern>` slash commands
190
+ - Memory config: extraction trigger (always / substantial / manual)
191
+ - Memory token usage shown in `/context` breakdown
192
+ - Memory files at `~/.minion/memory/` with JSON vector index
193
+
194
+ ---
195
+
196
+ ## [0.5.0] — 2026-04-01 — "Banana Smoothie"
197
+
198
+ ### Added
199
+ - Self-refine reflection loop: initial response → critique → score → refine
200
+ - `--reflect N` flag (depth 1–3) and `/reflect` REPL toggle
201
+ - Score threshold gating (only refines when score < threshold)
202
+ - Verbose mode shows critique text and response diffs
203
+ - LLM-assisted `/init` generates project-specific MINION.md from codebase structure
204
+
205
+ ---
206
+
207
+ ## [0.4.0] — 2026-04-01 — "Gelato"
208
+
209
+ ### Added
210
+ - Code intelligence tools: `get_file_outline`, `search_file` (grep), `find_files`, `glob`
211
+ - MINION.md project context injection into system prompt
212
+ - `web_fetch` tool for fetching URLs during agent tasks
213
+ - `@file.py` mention syntax in REPL to inject specific files into context
214
+ - `/init` command to generate MINION.md for a project
215
+ - Tiered permission/trust model with session, project, and global scopes
216
+ - `/edits` and `/yolo` auto-approval modes
217
+
218
+ ---
219
+
220
+ ## [0.3.0] — 2026-03-31 — "Bello!"
221
+
222
+ ### Added
223
+ - ReAct agent loop (Reason → Act → Observe → repeat, max 20 iterations)
224
+ - Tool use: `read_file`, `write_file`, `edit_file`, `list_directory`, `run_shell`
225
+ - Tool confirmation dialog before side-effecting operations
226
+ - `--dry-run` flag to preview tool calls without executing
227
+ - Provider-agnostic conversation model with typed `ContentBlock` hierarchy
228
+ - Parallel tool execution for multiple tool calls in a single LLM turn
229
+
230
+ ---
231
+
232
+ ## [0.2.0] — 2026-03-30 — "Papagena"
233
+
234
+ ### Added
235
+ - Persistent conversation history within a session (messages array replay)
236
+ - `/save <name>` and `/load <name>` session commands
237
+ - Running token usage display with per-turn breakdown
238
+ - `ContextSnapshot` and `/context` command showing token budget by category
239
+ - Conversation compaction: LLM summary (default) and truncation strategies
240
+ - Sliding-window truncation as context limit fallback
241
+
242
+ ---
243
+
244
+ ## [0.1.0] — 2026-03-30 — "The Banana"
245
+
246
+ ### Added
247
+ - MVP CLI: `minion "prompt"` for one-shot queries
248
+ - Interactive REPL mode (`minion` with no args)
249
+ - Minion theme: yellow/blue colors, figlet banner, "Bello!" greeting
250
+ - Multi-provider LLM support: Anthropic Claude, OpenAI, OpenRouter
251
+ - Streaming responses with live terminal output
252
+ - `python-dotenv` config via `.env`
253
+ - `/clear`, `/model`, `/quit`, `/help` slash commands
254
+ - Persistent REPL history (up/down arrow navigation)
255
+ - Tab completion for slash commands in REPL
256
+
257
+ ---
258
+
259
+ [Unreleased]: https://github.com/bhanuvikas/minion-cli/compare/v1.0.0...HEAD
260
+ [1.0.0]: https://github.com/bhanuvikas/minion-cli/compare/v0.12.0...v1.0.0
261
+ [0.12.0]: https://github.com/bhanuvikas/minion-cli/compare/v0.11.0...v0.12.0
262
+ [0.11.0]: https://github.com/bhanuvikas/minion-cli/compare/v0.10.0...v0.11.0
263
+ [0.10.0]: https://github.com/bhanuvikas/minion-cli/compare/v0.9.0...v0.10.0
264
+ [0.9.0]: https://github.com/bhanuvikas/minion-cli/compare/v0.8.0...v0.9.0
265
+ [0.8.0]: https://github.com/bhanuvikas/minion-cli/compare/v0.7.0...v0.8.0
266
+ [0.7.0]: https://github.com/bhanuvikas/minion-cli/compare/v0.6.0...v0.7.0
267
+ [0.6.0]: https://github.com/bhanuvikas/minion-cli/compare/v0.5.0...v0.6.0
268
+ [0.5.0]: https://github.com/bhanuvikas/minion-cli/compare/v0.4.0...v0.5.0
269
+ [0.4.0]: https://github.com/bhanuvikas/minion-cli/compare/v0.3.0...v0.4.0
270
+ [0.3.0]: https://github.com/bhanuvikas/minion-cli/compare/v0.2.0...v0.3.0
271
+ [0.2.0]: https://github.com/bhanuvikas/minion-cli/compare/v0.1.0...v0.2.0
272
+ [0.1.0]: https://github.com/bhanuvikas/minion-cli/releases/tag/v0.1.0