micro-cc 0.1.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 (141) hide show
  1. micro_cc-0.1.0/PKG-INFO +145 -0
  2. micro_cc-0.1.0/README.md +109 -0
  3. micro_cc-0.1.0/browser/__init__.py +0 -0
  4. micro_cc-0.1.0/browser/_cookies.py +717 -0
  5. micro_cc-0.1.0/browser/_md_convert.py +903 -0
  6. micro_cc-0.1.0/browser/browser_manager.py +47 -0
  7. micro_cc-0.1.0/browser/simpletextbrowser.py +447 -0
  8. micro_cc-0.1.0/cache/__init__.py +0 -0
  9. micro_cc-0.1.0/cache/redis_cache.py +182 -0
  10. micro_cc-0.1.0/claude_loop_.py +477 -0
  11. micro_cc-0.1.0/execute_tool.py +42 -0
  12. micro_cc-0.1.0/micro_cc.egg-info/PKG-INFO +145 -0
  13. micro_cc-0.1.0/micro_cc.egg-info/SOURCES.txt +139 -0
  14. micro_cc-0.1.0/micro_cc.egg-info/dependency_links.txt +1 -0
  15. micro_cc-0.1.0/micro_cc.egg-info/entry_points.txt +2 -0
  16. micro_cc-0.1.0/micro_cc.egg-info/requires.txt +27 -0
  17. micro_cc-0.1.0/micro_cc.egg-info/top_level.txt +11 -0
  18. micro_cc-0.1.0/models/__init__.py +0 -0
  19. micro_cc-0.1.0/models/anthropic.py +207 -0
  20. micro_cc-0.1.0/models/litellm.py +369 -0
  21. micro_cc-0.1.0/models/schema.py +344 -0
  22. micro_cc-0.1.0/pyproject.toml +53 -0
  23. micro_cc-0.1.0/screens/__init__.py +0 -0
  24. micro_cc-0.1.0/screens/window_overlay_.py +48 -0
  25. micro_cc-0.1.0/setup.cfg +4 -0
  26. micro_cc-0.1.0/skills/canvas-design/SKILL.md +130 -0
  27. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
  28. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
  29. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
  30. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
  31. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
  32. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
  33. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
  34. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  35. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
  36. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  37. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
  38. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
  39. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
  40. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
  41. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
  42. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
  43. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
  44. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
  45. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
  46. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
  47. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
  48. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
  49. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
  50. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
  51. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
  52. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
  53. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
  54. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
  55. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
  56. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
  57. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  58. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  59. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  60. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
  61. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  62. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  63. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  64. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
  65. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
  66. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  67. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
  68. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  69. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
  70. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
  71. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
  72. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
  73. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
  74. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
  75. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  76. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
  77. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
  78. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
  79. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
  80. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
  81. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
  82. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
  83. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  84. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
  85. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
  86. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
  87. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
  88. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
  89. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
  90. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
  91. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
  92. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
  93. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
  94. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
  95. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
  96. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
  97. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
  98. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
  99. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
  100. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
  101. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
  102. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
  103. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
  104. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
  105. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
  106. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
  107. micro_cc-0.1.0/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
  108. micro_cc-0.1.0/skills/github/SKILL.md +140 -0
  109. micro_cc-0.1.0/skills/pptx/SKILL.md +191 -0
  110. micro_cc-0.1.0/skills/pptx/editing.md +205 -0
  111. micro_cc-0.1.0/skills/pptx/pptxgenjs.md +420 -0
  112. micro_cc-0.1.0/skills/pptx/scripts/__init__.py +0 -0
  113. micro_cc-0.1.0/skills/pptx/scripts/add_slide.py +195 -0
  114. micro_cc-0.1.0/skills/pptx/scripts/clean.py +286 -0
  115. micro_cc-0.1.0/skills/pptx/scripts/thumbnail.py +289 -0
  116. micro_cc-0.1.0/skills/skill_loader.py +192 -0
  117. micro_cc-0.1.0/skills/xlsx/SKILL.md +225 -0
  118. micro_cc-0.1.0/start_live_.py +405 -0
  119. micro_cc-0.1.0/tests/test_messages.py +123 -0
  120. micro_cc-0.1.0/tools/__init__.py +0 -0
  121. micro_cc-0.1.0/tools/bash_tool.py +84 -0
  122. micro_cc-0.1.0/tools/browser_tool_.py +167 -0
  123. micro_cc-0.1.0/tools/computer_tool_.py +226 -0
  124. micro_cc-0.1.0/tools/file_tools_.py +285 -0
  125. micro_cc-0.1.0/tools/mcp_client_.py +126 -0
  126. micro_cc-0.1.0/tools/plan_tools_.py +378 -0
  127. micro_cc-0.1.0/tools/search_tool_.py +239 -0
  128. micro_cc-0.1.0/tools/skill_tools_.py +92 -0
  129. micro_cc-0.1.0/tools/vision_tools_.py +24 -0
  130. micro_cc-0.1.0/tools/web_tools_.py +140 -0
  131. micro_cc-0.1.0/utils/__init__.py +0 -0
  132. micro_cc-0.1.0/utils/annotate_.py +90 -0
  133. micro_cc-0.1.0/utils/claude_md_loader.py +8 -0
  134. micro_cc-0.1.0/utils/file_watcher_.py +121 -0
  135. micro_cc-0.1.0/utils/helpers.py +86 -0
  136. micro_cc-0.1.0/utils/msg_store_.py +268 -0
  137. micro_cc-0.1.0/utils/process_tracker.py +48 -0
  138. micro_cc-0.1.0/utils/tokenization.py +304 -0
  139. micro_cc-0.1.0/utils/tokenization_simple.py +143 -0
  140. micro_cc-0.1.0/utils/utils.py +46 -0
  141. micro_cc-0.1.0/web_.py +508 -0
@@ -0,0 +1,145 @@
1
+ Metadata-Version: 2.4
2
+ Name: micro-cc
3
+ Version: 0.1.0
4
+ Summary: Harness that gives frontier models full system access — shell, filesystem, browser, MCP — running directly on the metal.
5
+ Author: George Salapa
6
+ License-Expression: MIT
7
+ Requires-Python: >=3.12
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: anthropic>=0.76.0
10
+ Requires-Dist: anyio>=4.0
11
+ Requires-Dist: beautifulsoup4>=4.14
12
+ Requires-Dist: httpx>=0.28
13
+ Requires-Dist: httpx-sse>=0.4
14
+ Requires-Dist: lxml>=6.0
15
+ Requires-Dist: mammoth>=1.11
16
+ Requires-Dist: markdown-it-py>=4.0
17
+ Requires-Dist: markdownify>=1.2
18
+ Requires-Dist: mcp>=1.26
19
+ Requires-Dist: numpy>=2.4
20
+ Requires-Dist: openai>=2.16
21
+ Requires-Dist: openpyxl>=3.1
22
+ Requires-Dist: pandas>=3.0
23
+ Requires-Dist: pdfminer.six>=20260107
24
+ Requires-Dist: pillow>=12.0
25
+ Requires-Dist: playwright>=1.58
26
+ Requires-Dist: prompt_toolkit>=3.0
27
+ Requires-Dist: pydantic>=2.12
28
+ Requires-Dist: pydantic-settings>=2.13
29
+ Requires-Dist: python-dotenv>=1.2
30
+ Requires-Dist: python-pptx>=1.0
31
+ Requires-Dist: requests>=2.32
32
+ Requires-Dist: rich>=14.0
33
+ Requires-Dist: tiktoken>=0.12
34
+ Requires-Dist: watchdog>=6.0
35
+ Requires-Dist: xlsxwriter>=3.2
36
+
37
+ # micro·cc — cognitive compute
38
+
39
+ ```
40
+ ███╗ ███╗ ██████╗ ██████╗ ███████╗██╗
41
+ ████╗ ████║██╔═══██╗██╔══██╗██╔════╝██║
42
+ ██╔████╔██║██║ ██║██║ ██║█████╗ ██║
43
+ ██║╚██╔╝██║██║ ██║██║ ██║██╔══╝ ██║
44
+ ██║ ╚═╝ ██║╚██████╔╝██████╔╝███████╗███████╗
45
+ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚══════╝
46
+ ─────── on the metal ─────────────────────
47
+ ```
48
+
49
+ Harness that gives frontier models full system access — shell, filesystem, browser, MCP — running directly on the metal. Planning, memory, and tool orchestration let models perform complex multi-step work autonomously. Point it at any project directory and go.
50
+
51
+ ## Install
52
+
53
+ ```bash
54
+ pip install micro-cc
55
+ ```
56
+
57
+ ## Environment
58
+
59
+ Create `~/.micro-cc/.env` with **one** endpoint — set Anthropic OR LiteLLM, not both. If both are set, Anthropic takes priority.
60
+
61
+ ```
62
+ # Anthropic (direct)
63
+ ANTHROPIC_API_KEY=sk-ant-
64
+
65
+ # OR LiteLLM (proxy to Bedrock, Azure, etc.)
66
+ LITELLM_BASE_URL=https://your-proxy.com
67
+ LITELLM_API_KEY=sk-...
68
+
69
+ # Shared
70
+ OPENAI_API_KEY=sk-proj-
71
+ SERPAPI_KEY=
72
+ ```
73
+
74
+ ## Usage
75
+
76
+ ```bash
77
+ microcc /path/to/your/project
78
+ ```
79
+
80
+ **Controls:**
81
+ - `Option+Enter` — submit prompt
82
+ - `Enter` — newline
83
+ - `Ctrl+C` — interrupt
84
+ - `/clear` — reset conversation
85
+ - `/exit` — quit
86
+
87
+ ## Terminal
88
+
89
+ Recommended: **iTerm2**
90
+
91
+ For `Option+Enter` (submit) to work, configure iTerm2:
92
+
93
+ `iTerm2 → Settings → Profiles → Keys → General → Left Option Key → Esc+`
94
+
95
+ ## Shell Alias
96
+
97
+ Add to `~/.zshrc`:
98
+
99
+ ```bash
100
+ microcc() {
101
+ (cd ~/micro-cc && source env/bin/activate && python start_.py "$@")
102
+ }
103
+ ```
104
+
105
+ Then: `microcc /path/to/project`
106
+
107
+ ## Architecture
108
+
109
+ ```
110
+ start_.py (CLI) prompt_toolkit + rich rendering
111
+
112
+ │ async for event in claude_loop()
113
+
114
+ claude_loop_.py (Core) API calls, tool execution, JSONL storage
115
+
116
+ │ execute_tool_call()
117
+
118
+ tools/ bash_, read_, write_, edit_, glob_, grep_
119
+
120
+
121
+ micro-cc/projects/{name}_{hash}/ conversation persistence
122
+ ```
123
+
124
+ **How it works:**
125
+ 1. CLI starts FileWatcher on project dir, enters prompt loop
126
+ 2. User query → `claude_loop()` async generator
127
+ 3. Builds system prompt with project's `CLAUDE.md` + any file changes detected
128
+ 4. Calls Anthropic API with tool definitions
129
+ 5. Executes tool calls locally, loops until the model stops calling tools
130
+ 6. Yields events (`thinking`, `tool_call`, `tool_result`, `final_text`) for CLI to render
131
+ 7. Saves conversation to JSONL (stripped of thinking blocks for replay)
132
+
133
+ **Tools:**
134
+ | Tool | Description |
135
+ |------|-------------|
136
+ | `bash_` | Subprocess execution in project_dir, timeout support |
137
+ | `read_` | Read files with line numbers, offset/limit |
138
+ | `write_` | Create/overwrite files, auto-creates dirs |
139
+ | `edit_` | Surgical string replacement (fails if ambiguous) |
140
+ | `glob_` | Find files by pattern, sorted by mtime |
141
+ | `grep_` | Regex search with context lines |
142
+
143
+ **Path handling:** Relative paths resolve to `project_dir`, absolute paths work anywhere.
144
+
145
+ **File watcher:** Detects external changes, injects into system prompt so the model sees what you edited.
@@ -0,0 +1,109 @@
1
+ # micro·cc — cognitive compute
2
+
3
+ ```
4
+ ███╗ ███╗ ██████╗ ██████╗ ███████╗██╗
5
+ ████╗ ████║██╔═══██╗██╔══██╗██╔════╝██║
6
+ ██╔████╔██║██║ ██║██║ ██║█████╗ ██║
7
+ ██║╚██╔╝██║██║ ██║██║ ██║██╔══╝ ██║
8
+ ██║ ╚═╝ ██║╚██████╔╝██████╔╝███████╗███████╗
9
+ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚══════╝
10
+ ─────── on the metal ─────────────────────
11
+ ```
12
+
13
+ Harness that gives frontier models full system access — shell, filesystem, browser, MCP — running directly on the metal. Planning, memory, and tool orchestration let models perform complex multi-step work autonomously. Point it at any project directory and go.
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ pip install micro-cc
19
+ ```
20
+
21
+ ## Environment
22
+
23
+ Create `~/.micro-cc/.env` with **one** endpoint — set Anthropic OR LiteLLM, not both. If both are set, Anthropic takes priority.
24
+
25
+ ```
26
+ # Anthropic (direct)
27
+ ANTHROPIC_API_KEY=sk-ant-
28
+
29
+ # OR LiteLLM (proxy to Bedrock, Azure, etc.)
30
+ LITELLM_BASE_URL=https://your-proxy.com
31
+ LITELLM_API_KEY=sk-...
32
+
33
+ # Shared
34
+ OPENAI_API_KEY=sk-proj-
35
+ SERPAPI_KEY=
36
+ ```
37
+
38
+ ## Usage
39
+
40
+ ```bash
41
+ microcc /path/to/your/project
42
+ ```
43
+
44
+ **Controls:**
45
+ - `Option+Enter` — submit prompt
46
+ - `Enter` — newline
47
+ - `Ctrl+C` — interrupt
48
+ - `/clear` — reset conversation
49
+ - `/exit` — quit
50
+
51
+ ## Terminal
52
+
53
+ Recommended: **iTerm2**
54
+
55
+ For `Option+Enter` (submit) to work, configure iTerm2:
56
+
57
+ `iTerm2 → Settings → Profiles → Keys → General → Left Option Key → Esc+`
58
+
59
+ ## Shell Alias
60
+
61
+ Add to `~/.zshrc`:
62
+
63
+ ```bash
64
+ microcc() {
65
+ (cd ~/micro-cc && source env/bin/activate && python start_.py "$@")
66
+ }
67
+ ```
68
+
69
+ Then: `microcc /path/to/project`
70
+
71
+ ## Architecture
72
+
73
+ ```
74
+ start_.py (CLI) prompt_toolkit + rich rendering
75
+
76
+ │ async for event in claude_loop()
77
+
78
+ claude_loop_.py (Core) API calls, tool execution, JSONL storage
79
+
80
+ │ execute_tool_call()
81
+
82
+ tools/ bash_, read_, write_, edit_, glob_, grep_
83
+
84
+
85
+ micro-cc/projects/{name}_{hash}/ conversation persistence
86
+ ```
87
+
88
+ **How it works:**
89
+ 1. CLI starts FileWatcher on project dir, enters prompt loop
90
+ 2. User query → `claude_loop()` async generator
91
+ 3. Builds system prompt with project's `CLAUDE.md` + any file changes detected
92
+ 4. Calls Anthropic API with tool definitions
93
+ 5. Executes tool calls locally, loops until the model stops calling tools
94
+ 6. Yields events (`thinking`, `tool_call`, `tool_result`, `final_text`) for CLI to render
95
+ 7. Saves conversation to JSONL (stripped of thinking blocks for replay)
96
+
97
+ **Tools:**
98
+ | Tool | Description |
99
+ |------|-------------|
100
+ | `bash_` | Subprocess execution in project_dir, timeout support |
101
+ | `read_` | Read files with line numbers, offset/limit |
102
+ | `write_` | Create/overwrite files, auto-creates dirs |
103
+ | `edit_` | Surgical string replacement (fails if ambiguous) |
104
+ | `glob_` | Find files by pattern, sorted by mtime |
105
+ | `grep_` | Regex search with context lines |
106
+
107
+ **Path handling:** Relative paths resolve to `project_dir`, absolute paths work anywhere.
108
+
109
+ **File watcher:** Detects external changes, injects into system prompt so the model sees what you edited.
File without changes