micro-cc 0.2.140__tar.gz → 0.2.142__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 (322) hide show
  1. {micro_cc-0.2.140/src/micro_cc.egg-info → micro_cc-0.2.142}/PKG-INFO +1 -1
  2. {micro_cc-0.2.140 → micro_cc-0.2.142}/pyproject.toml +2 -2
  3. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/claude_loop_.py +25 -118
  4. micro_cc-0.2.142/src/micro_cc/postgres_store/pg_store_.py +322 -0
  5. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/postgres_store/schema_.py +20 -0
  6. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/customizing-micro-cc/SKILL.md +1 -0
  7. micro_cc-0.2.142/src/micro_cc/skills/design/SKILL.md +25 -0
  8. micro_cc-0.2.142/src/micro_cc/skills/hairline/SKILL.md +39 -0
  9. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/pptx/svg-slides.md +1 -1
  10. micro_cc-0.2.142/src/micro_cc/skills/tool-hooks/SKILL.md +31 -0
  11. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/start_headless_.py +14 -2
  12. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/start_live_tui_.py +29 -15
  13. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/bash_tool.py +1 -1
  14. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/monitor_.py +35 -25
  15. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/pollers_.py +13 -0
  16. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/memory_store_.py +0 -29
  17. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/msg_normalize_.py +17 -1
  18. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/msg_store_.py +274 -237
  19. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/status_marker.py +9 -6
  20. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/subagent_tracker_.py +20 -4
  21. micro_cc-0.2.142/src/micro_cc/utils/system_prompt_text_.py +115 -0
  22. micro_cc-0.2.142/src/micro_cc/utils/tool_hooks_.py +101 -0
  23. {micro_cc-0.2.140 → micro_cc-0.2.142/src/micro_cc.egg-info}/PKG-INFO +1 -1
  24. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc.egg-info/SOURCES.txt +20 -97
  25. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_durability.py +31 -0
  26. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_interrupted_run.py +11 -24
  27. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_model_catalog.py +2 -2
  28. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_pagination.py +21 -133
  29. micro_cc-0.2.142/tests/test_replica.py +430 -0
  30. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_subagent_notice.py +53 -6
  31. micro_cc-0.2.142/tests/test_tool_hooks.py +219 -0
  32. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_turn_door.py +3 -3
  33. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_use_tool_dispatcher.py +2 -1
  34. micro_cc-0.2.140/src/micro_cc/postgres_store/pg_store_.py +0 -459
  35. micro_cc-0.2.140/src/micro_cc/skills/design/SKILL.md +0 -210
  36. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/ArsenalSC-OFL.txt +0 -93
  37. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
  38. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
  39. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/BigShoulders-OFL.txt +0 -93
  40. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
  41. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Boldonse-OFL.txt +0 -93
  42. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Boldonse-Regular.ttf +0 -0
  43. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  44. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/BricolageGrotesque-OFL.txt +0 -93
  45. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  46. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
  47. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
  48. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/CrimsonPro-OFL.txt +0 -93
  49. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
  50. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/DMMono-OFL.txt +0 -93
  51. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/DMMono-Regular.ttf +0 -0
  52. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/EricaOne-OFL.txt +0 -94
  53. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/EricaOne-Regular.ttf +0 -0
  54. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/GeistMono-Bold.ttf +0 -0
  55. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/GeistMono-OFL.txt +0 -93
  56. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/GeistMono-Regular.ttf +0 -0
  57. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Gloock-OFL.txt +0 -93
  58. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Gloock-Regular.ttf +0 -0
  59. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
  60. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/IBMPlexMono-OFL.txt +0 -93
  61. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
  62. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
  63. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
  64. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
  65. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
  66. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  67. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  68. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  69. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/InstrumentSans-OFL.txt +0 -93
  70. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  71. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  72. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  73. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Italiana-OFL.txt +0 -93
  74. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Italiana-Regular.ttf +0 -0
  75. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  76. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/JetBrainsMono-OFL.txt +0 -93
  77. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  78. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Jura-Light.ttf +0 -0
  79. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Jura-Medium.ttf +0 -0
  80. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Jura-OFL.txt +0 -93
  81. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/LibreBaskerville-OFL.txt +0 -93
  82. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
  83. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Lora-Bold.ttf +0 -0
  84. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  85. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Lora-Italic.ttf +0 -0
  86. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Lora-OFL.txt +0 -93
  87. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Lora-Regular.ttf +0 -0
  88. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/NationalPark-Bold.ttf +0 -0
  89. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/NationalPark-OFL.txt +0 -93
  90. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/NationalPark-Regular.ttf +0 -0
  91. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/NothingYouCouldDo-OFL.txt +0 -93
  92. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  93. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Outfit-Bold.ttf +0 -0
  94. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Outfit-OFL.txt +0 -93
  95. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Outfit-Regular.ttf +0 -0
  96. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
  97. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/PixelifySans-OFL.txt +0 -93
  98. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/PoiretOne-OFL.txt +0 -93
  99. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
  100. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
  101. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/RedHatMono-OFL.txt +0 -93
  102. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
  103. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Silkscreen-OFL.txt +0 -93
  104. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
  105. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
  106. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/SmoochSans-OFL.txt +0 -93
  107. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Tektur-Medium.ttf +0 -0
  108. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Tektur-OFL.txt +0 -93
  109. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/Tektur-Regular.ttf +0 -0
  110. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/WorkSans-Bold.ttf +0 -0
  111. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
  112. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/WorkSans-Italic.ttf +0 -0
  113. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/WorkSans-OFL.txt +0 -93
  114. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/WorkSans-Regular.ttf +0 -0
  115. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/YoungSerif-OFL.txt +0 -93
  116. micro_cc-0.2.140/src/micro_cc/skills/design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
  117. micro_cc-0.2.140/src/micro_cc/skills/design/references/blueprint-tokens.md +0 -103
  118. micro_cc-0.2.140/src/micro_cc/skills/hairline-create/SKILL.md +0 -78
  119. {micro_cc-0.2.140 → micro_cc-0.2.142}/LICENSE +0 -0
  120. {micro_cc-0.2.140 → micro_cc-0.2.142}/README.md +0 -0
  121. {micro_cc-0.2.140 → micro_cc-0.2.142}/setup.cfg +0 -0
  122. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/__init__.py +0 -0
  123. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/browser/__init__.py +0 -0
  124. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/browser/_cookies.py +0 -0
  125. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/browser/_md_convert.py +0 -0
  126. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/browser/browser_manager.py +0 -0
  127. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/browser/simpletextbrowser.py +0 -0
  128. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/cache/__init__.py +0 -0
  129. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/cache/state_store.py +0 -0
  130. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/execute_tool.py +0 -0
  131. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/models/__init__.py +0 -0
  132. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/models/adapters/__init__.py +0 -0
  133. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/models/adapters/anthropic.py +0 -0
  134. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/models/adapters/chat.py +0 -0
  135. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/models/adapters/responses.py +0 -0
  136. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/models/apis/__init__.py +0 -0
  137. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/models/apis/anthropic_messages.py +0 -0
  138. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/models/apis/openai_chat.py +0 -0
  139. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/models/apis/openai_responses.py +0 -0
  140. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/models/catalog.json +0 -0
  141. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/models/catalog.py +0 -0
  142. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/models/catalog_sync.py +0 -0
  143. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/models/client.py +0 -0
  144. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/models/providers.py +0 -0
  145. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/models/retry.py +0 -0
  146. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/models/schema.py +0 -0
  147. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/models/types.py +0 -0
  148. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/mods_.py +0 -0
  149. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/postgres_store/__init__.py +0 -0
  150. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/self_heal_.py +0 -0
  151. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/corpus-library/SKILL.md +0 -0
  152. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/corpus-library/scripts/wiki.py +0 -0
  153. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/docx/SKILL.md +0 -0
  154. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/docx/docx-js.md +0 -0
  155. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/docx/ooxml.md +0 -0
  156. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/github/SKILL.md +0 -0
  157. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/graph-orchestration/SKILL.md +0 -0
  158. {micro_cc-0.2.140/src/micro_cc/skills/hairline-create → micro_cc-0.2.142/src/micro_cc/skills/hairline}/LICENSE-lib +0 -0
  159. {micro_cc-0.2.140/src/micro_cc/skills/hairline-create → micro_cc-0.2.142/src/micro_cc/skills/hairline}/bench.html +0 -0
  160. {micro_cc-0.2.140/src/micro_cc/skills/hairline-create → micro_cc-0.2.142/src/micro_cc/skills/hairline}/build.mjs +0 -0
  161. {micro_cc-0.2.140/src/micro_cc/skills/hairline-create → micro_cc-0.2.142/src/micro_cc/skills/hairline}/concepts.md +0 -0
  162. {micro_cc-0.2.140/src/micro_cc/skills/hairline-create → micro_cc-0.2.142/src/micro_cc/skills/hairline}/examples/contour.js +0 -0
  163. {micro_cc-0.2.140/src/micro_cc/skills/hairline-create → micro_cc-0.2.142/src/micro_cc/skills/hairline}/examples/riffle.js +0 -0
  164. {micro_cc-0.2.140/src/micro_cc/skills/hairline-create → micro_cc-0.2.142/src/micro_cc/skills/hairline}/examples/terrain.js +0 -0
  165. {micro_cc-0.2.140/src/micro_cc/skills/hairline-create → micro_cc-0.2.142/src/micro_cc/skills/hairline}/free.js +0 -0
  166. {micro_cc-0.2.140/src/micro_cc/skills/hairline-create → micro_cc-0.2.142/src/micro_cc/skills/hairline}/kernel.js +0 -0
  167. {micro_cc-0.2.140/src/micro_cc/skills/hairline-create → micro_cc-0.2.142/src/micro_cc/skills/hairline}/look.md +0 -0
  168. {micro_cc-0.2.140/src/micro_cc/skills/hairline-create → micro_cc-0.2.142/src/micro_cc/skills/hairline}/look.mjs +0 -0
  169. {micro_cc-0.2.140/src/micro_cc/skills/hairline-create → micro_cc-0.2.142/src/micro_cc/skills/hairline}/rules.md +0 -0
  170. {micro_cc-0.2.140/src/micro_cc/skills/hairline-create → micro_cc-0.2.142/src/micro_cc/skills/hairline}/stamp.mjs +0 -0
  171. {micro_cc-0.2.140/src/micro_cc/skills/hairline-create → micro_cc-0.2.142/src/micro_cc/skills/hairline}/validate.mjs +0 -0
  172. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/keep-checking/SKILL.md +0 -0
  173. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/painted-video/RENDERER.md +0 -0
  174. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/painted-video/SKILL.md +0 -0
  175. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/painted-video/TIMING.md +0 -0
  176. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/painted-video/lib/lib.js +0 -0
  177. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/painted-video/lib/paint.js +0 -0
  178. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/painted-video/scripts/analysis/align.py +0 -0
  179. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/painted-video/scripts/analysis/build_data.py +0 -0
  180. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/painted-video/scripts/analysis/features.py +0 -0
  181. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/painted-video/scripts/analysis/transcribe.py +0 -0
  182. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/painted-video/scripts/check.mjs +0 -0
  183. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/painted-video/scripts/install_stack.sh +0 -0
  184. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/painted-video/scripts/render.mjs +0 -0
  185. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/painted-video/scripts/scaffold.py +0 -0
  186. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/pptx/SKILL.md +0 -0
  187. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/pptx/brief.md +0 -0
  188. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/pptx/scripts/build_deck.py +0 -0
  189. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/pptx/scripts/deck_to_images.py +0 -0
  190. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/pptx/scripts/inspect_template.py +0 -0
  191. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/pptx/scripts/office/__init__.py +0 -0
  192. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/pptx/scripts/office/soffice.py +0 -0
  193. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/pptx/scripts/render_svg.py +0 -0
  194. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/pptx/scripts/template_ops.py +0 -0
  195. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/pptx/template.md +0 -0
  196. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/skill_loader.py +0 -0
  197. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/skills/xlsx/SKILL.md +0 -0
  198. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/__init__.py +0 -0
  199. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/ask_user_tool.py +0 -0
  200. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/browser_tool_.py +0 -0
  201. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/chart_tool_.py +0 -0
  202. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/computer_tool_.py +0 -0
  203. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/file_tools_.py +0 -0
  204. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/mcp_client_.py +0 -0
  205. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/mcp_login_.py +0 -0
  206. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/mcp_oauth.py +0 -0
  207. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/memory_review_.py +0 -0
  208. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/memory_tool_.py +0 -0
  209. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/message_session_.py +0 -0
  210. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/monitor_poll_.py +0 -0
  211. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/monitor_schedule_.py +0 -0
  212. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/monitor_schedule_runtime.py +0 -0
  213. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/monitor_store_.py +0 -0
  214. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/monitor_watch_.py +0 -0
  215. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/reload_tool_.py +0 -0
  216. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/search_history_tool_.py +0 -0
  217. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/search_tool_.py +0 -0
  218. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/skill_tools_.py +0 -0
  219. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/todo_tools_.py +0 -0
  220. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/use_tool_.py +0 -0
  221. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/vision_tools_.py +0 -0
  222. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tools/web_tools_.py +0 -0
  223. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/__init__.py +0 -0
  224. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/alt_screen_.py +0 -0
  225. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/approval_ui_.py +0 -0
  226. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/banner_fx_.py +0 -0
  227. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/detect_images_.py +0 -0
  228. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/diff_viewer_.py +0 -0
  229. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/etype_handler_.py +0 -0
  230. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/glyphs_.py +0 -0
  231. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/keys_.py +0 -0
  232. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/kill_ring_.py +0 -0
  233. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/login_ui_.py +0 -0
  234. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/md_render_.py +0 -0
  235. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/message_row_.py +0 -0
  236. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/option_panel_.py +0 -0
  237. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/pane_.py +0 -0
  238. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/panel_layout_.py +0 -0
  239. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/prompt_input_.py +0 -0
  240. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/question_ui_.py +0 -0
  241. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/renderers_.py +0 -0
  242. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/screen_cmds_.py +0 -0
  243. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/scroll_view_.py +0 -0
  244. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/self_reload_ui_.py +0 -0
  245. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/self_terminal_setup_.py +0 -0
  246. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/self_update_.py +0 -0
  247. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/stack_.py +0 -0
  248. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/status_bar_.py +0 -0
  249. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/stdin_buffer_.py +0 -0
  250. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/terminal_.py +0 -0
  251. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/text_.py +0 -0
  252. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/text_utils_.py +0 -0
  253. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/theme_.py +0 -0
  254. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/truncated_text_.py +0 -0
  255. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/ui_api_.py +0 -0
  256. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/undo_stack_.py +0 -0
  257. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/tui_native/word_navigation_.py +0 -0
  258. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/__init__.py +0 -0
  259. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/annotate_.py +0 -0
  260. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/banner_.py +0 -0
  261. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/chart_.py +0 -0
  262. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/claude_md_loader.py +0 -0
  263. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/claude_subscription.py +0 -0
  264. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/command_registry.py +0 -0
  265. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/default_status_sh.py +0 -0
  266. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/gate_check_.py +0 -0
  267. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/helpers.py +0 -0
  268. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/hidden_prompts.py +0 -0
  269. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/hints.py +0 -0
  270. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/history_mount_.py +0 -0
  271. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/inbox_store_.py +0 -0
  272. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/keep_awake_.py +0 -0
  273. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/legacy_status_sh.py +0 -0
  274. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/loop_events_.py +0 -0
  275. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/project_files_.py +0 -0
  276. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/self_reload_.py +0 -0
  277. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/session_ipc_.py +0 -0
  278. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/settings_store_.py +0 -0
  279. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/statusline_.py +0 -0
  280. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/subagent_notice_.py +0 -0
  281. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/system_prompt_.py +0 -0
  282. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/terminal_setup.py +0 -0
  283. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/theme_store_.py +0 -0
  284. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/tokenization_simple.py +0 -0
  285. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/tool_limits.py +0 -0
  286. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/tool_result_storage.py +0 -0
  287. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/tool_safety_.py +0 -0
  288. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/utils/whats_new.py +0 -0
  289. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/webui/__init__.py +0 -0
  290. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/webui/bridge.py +0 -0
  291. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/webui/dist/assets/index-50EhKMKx.js +0 -0
  292. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/webui/dist/assets/index-D24bns9q.css +0 -0
  293. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/webui/dist/index.html +0 -0
  294. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/webui/history.py +0 -0
  295. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/webui/launch.py +0 -0
  296. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/webui/live.py +0 -0
  297. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/webui/server.py +0 -0
  298. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc/webui/session.py +0 -0
  299. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc.egg-info/dependency_links.txt +0 -0
  300. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc.egg-info/entry_points.txt +0 -0
  301. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc.egg-info/requires.txt +0 -0
  302. {micro_cc-0.2.140 → micro_cc-0.2.142}/src/micro_cc.egg-info/top_level.txt +0 -0
  303. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_chart.py +0 -0
  304. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_gate_check.py +0 -0
  305. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_keep_awake.py +0 -0
  306. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_listening_pause.py +0 -0
  307. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_mcp.py +0 -0
  308. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_mod_pane.py +0 -0
  309. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_mods.py +0 -0
  310. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_monitor_poll.py +0 -0
  311. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_pg_theme_row.py +0 -0
  312. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_provider_switch.py +0 -0
  313. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_reply_thinking.py +0 -0
  314. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_schedule.py +0 -0
  315. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_self_reload.py +0 -0
  316. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_subagent_lifecycle.py +0 -0
  317. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_thinking_origin.py +0 -0
  318. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_truncated_calls.py +0 -0
  319. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_tui_render_golden.py +0 -0
  320. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_turn_recovery.py +0 -0
  321. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_webui.py +0 -0
  322. {micro_cc-0.2.140 → micro_cc-0.2.142}/tests/test_write_ahead.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: micro-cc
3
- Version: 0.2.140
3
+ Version: 0.2.142
4
4
  Summary: Harness that gives frontier models full system access — shell, filesystem, browser, MCP — running directly on the metal.
5
5
  Author: George Salapa
6
6
  License: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "micro-cc"
7
- version = "0.2.140"
7
+ version = "0.2.142"
8
8
  description = "Harness that gives frontier models full system access — shell, filesystem, browser, MCP — running directly on the metal."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -73,7 +73,7 @@ exclude = ["*pyarmor_runtime*", "build_obf*"]
73
73
 
74
74
  [tool.setuptools.package-data]
75
75
  "micro_cc.models" = ["catalog.json"]
76
- "micro_cc.skills" = ["**/*.md", "**/scripts/*", "painted-video/lib/*","**/canvas-fonts/*", "hairline-create/*.js", "hairline-create/*.mjs", "hairline-create/*.html", "hairline-create/examples/*", "hairline-create/LICENSE-lib"]
76
+ "micro_cc.skills" = ["**/*.md", "**/scripts/*", "painted-video/lib/*","hairline/*.js", "hairline/*.mjs", "hairline/*.html", "hairline/examples/*", "hairline/LICENSE-lib"]
77
77
  # Built by `npm run build` in frontend/ (see publish.sh) — the wheel ships the
78
78
  # compiled GUI, never the TSX sources, so installing needs no node.
79
79
  "micro_cc.webui" = ["dist/index.html", "dist/assets/*"]
@@ -1,8 +1,8 @@
1
1
  import asyncio
2
- import datetime
3
2
  import os
4
3
  import time
5
4
  from functools import partial
5
+ from types import SimpleNamespace
6
6
 
7
7
  from dotenv import load_dotenv
8
8
 
@@ -11,21 +11,19 @@ from micro_cc.models import model_call
11
11
  from micro_cc.models.client import thinking_origin
12
12
  from micro_cc.utils import system_prompt_
13
13
  from micro_cc.models.catalog import DEFAULT_MODEL, DEFAULT_TRIM_BUDGET
14
- from micro_cc.utils import settings_store_
14
+ from micro_cc.utils import settings_store_, system_prompt_text_, tool_hooks_
15
15
  from micro_cc.utils.tool_limits import cap_for, DEFAULT_TOOL_RESULT_CAP, MAX_TOOL_RESULTS_PER_MESSAGE
16
16
  from micro_cc.utils.tool_result_storage import persist_and_preview
17
17
  from micro_cc.models.schema import function_to_schema
18
- from micro_cc.skills.skill_loader import get_skill_summary
19
18
  from micro_cc.tools.bash_tool import bash_
20
19
  from micro_cc.tools.monitor_ import monitor_
21
20
  from micro_cc.tools.file_tools_ import read_, write_, edit_, glob_, grep_
22
21
  from micro_cc.tools.search_tool_ import search_tools, list_mcps
23
- from micro_cc.tools.use_tool_ import use_tool_, check_wrapper_shape, inner_block
22
+ from micro_cc.tools.use_tool_ import use_tool_, check_wrapper_shape
24
23
  from micro_cc.utils.msg_normalize_ import DISPATCHER, interrupted_text, resolve_call, window_base
25
24
  from micro_cc.tools.todo_tools_ import todo_tool_
26
25
  from micro_cc.tools.memory_tool_ import memory_
27
26
  from micro_cc.tools.search_history_tool_ import search_history_
28
- from micro_cc.utils import memory_store_
29
27
  from micro_cc.tools.skill_tools_ import read_skill, list_skills
30
28
  from micro_cc.tools.ask_user_tool import ask_user_question_tool_, validate_ask_questions
31
29
  from micro_cc.tools.search_tool_ import (
@@ -41,7 +39,6 @@ from micro_cc.tools.mcp_client_ import resolve_mcp_tools, call_mcp_tool
41
39
  from micro_cc.tools.memory_review_ import review_memory
42
40
  from micro_cc.utils.msg_store_ import load_summary, load_checkpoint, compact_checkpoint, store_msgs, inflight_path
43
41
  from micro_cc.utils.tokenization_simple import token_cutter, token_stats, save_token_stats, detect_cache_miss, record_prompt_segments
44
- from micro_cc.utils.claude_md_loader import load_claude_md_file
45
42
  from micro_cc.models.providers import active_provider
46
43
  from micro_cc.utils.tool_safety_ import READ_ONLY_TOOLS, read_only_by_input
47
44
  from micro_cc.utils.gate_check_ import needs_approval
@@ -180,10 +177,7 @@ async def claude_loop(
180
177
 
181
178
  provider = active_provider() # pinned for the whole turn
182
179
 
183
- skills_summary = get_skill_summary(project_dir)
184
- claude_md_content = load_claude_md_file(project_dir)
185
180
  mcp_catalog = get_effective_mcp_catalog(project_dir)
186
- package_dir = os.path.dirname(os.path.abspath(__file__))
187
181
 
188
182
  # The running tool batch on disk: what started and what finished survives a kill -9 (load_msgs reads it back).
189
183
  sidecar = inflight_path(project_dir)
@@ -220,108 +214,8 @@ async def claude_loop(
220
214
 
221
215
  yield {"type": "status", "message": "", "msgs": msgs}
222
216
 
223
- orchestration_line = (
224
- "- Multi-subagent orchestration: read_skill('graph-orchestration') to "
225
- "orchestrate headless subagents any time you judge a task benefits "
226
- "from parallel or sequenced work."
227
- ) if surface == "tui" else ""
228
-
229
- def _build_memory_manifest() -> str | None:
230
- """Index memory keys across global and project scopes."""
231
- parts = []
232
- global_items = memory_store_.list_memories()
233
- if global_items:
234
- parts.append(
235
- "Global (all projects):\n"
236
- + "\n".join(f"- {it['key']} — {it['description']}" for it in global_items)
237
- )
238
- project_items = memory_store_.list_memories(project_dir=project_dir)
239
- if project_items:
240
- parts.append(
241
- "Project (this project_dir only):\n"
242
- + "\n".join(f"- {it['key']} — {it['description']}" for it in project_items)
243
- )
244
- return "\n\n".join(parts) if parts else None
245
-
246
- # Volatile parts of the system prompt; the head is rendered from the conversation's first set (system_prompt_).
247
- sections = {name: text for name, text in {
248
- "date": datetime.datetime.now().strftime("%B %d, %Y"),
249
- "orchestration": orchestration_line,
250
- "skills": skills_summary,
251
- "claude_md": claude_md_content,
252
- "memory": _build_memory_manifest(),
253
- }.items() if text}
254
-
255
- def _system_msgs(s: dict) -> list:
256
- claude_md_section = f"\n\n<project-instructions>\n{s['claude_md']}\n</project-instructions>" if s.get("claude_md") else ""
257
- system_prompt_msg = {
258
- "role": "system",
259
- "content": f"""You are micro cognitive compute - a CLI assistant. You have full system access and thus using code you can achieve any task.
260
-
261
- ## Environment
262
- - You are running LOCALLY on the user's machine (on the metal), NOT a remote server
263
- - You have direct access to the local filesystem, Desktop, Documents, etc.
264
- - Project directory: {project_dir}
265
- - Your own source code lives at: {package_dir} (not project_dir) — plain, editable .py. You can change the harness itself: edit it, then once the user allows it call reload_harness_ (load it with search_tools) to restart into your change, otherwise it never takes effect; the conversation persists across the restart. Before changing the harness, read the customizing-micro-cc skill: it says which changes belong in ~/.micro-cc (they survive updates) and which edit core (overwritten by the next /update).
266
- - Date: {s.get("date", "")}
267
-
268
- ## Core Tools (always available)
269
- - bash_: Execute shell commands (runs in project_dir, use path param or absolute paths for elsewhere)
270
- - read_: Read file contents with line numbers — also reads image files (png/jpg/gif/webp/bmp) directly, no separate tool needed
271
- - write_: Create/overwrite files
272
- - edit_: Surgical string replacement in files
273
- - glob_: Find files by pattern
274
- - grep_: Search file contents with regex
275
-
276
- ## Discoverable Tools
277
- search_tools is two-step and cheap: `search_tools(action="discover")` lists
278
- every tool and MCP you could load (name + one-line description, no schemas),
279
- then `search_tools(action="add", names="browser, deepwiki")` returns the
280
- schemas of the ones you want — including several at once — as text in its
281
- result. Those tools are not in your tool list: call each one through the
282
- fixed dispatcher `use_tool_(name="browser", args=...)` with args matching the
283
- schema you were given. A call with args that don't match the schema fails
284
- and the error carries the schema, so retry from that.
285
- Do this when you need a capability you don't currently have: web research,
286
- browser, computer_use, message_session_ (list and message other live
287
- micro-cc sessions), etc.
288
- {s.get("orchestration", "")}
289
-
290
- ## Planning Tools
291
- - todo_tool_: For multi-step complex work, write a todo plan and keep on track.
292
-
293
- ## Long-term Memory
294
- memory_ (action=add|edit|get|delete|list, scope=global|project).
295
- scope="global": cross-project facts (~/.micro-cc/memory.json). scope="project":
296
- this project only (~/.micro-cc/projects/{{name}}_{{hash}}/memory.json).
297
- <memory-manifest> lists keys each loop; memory_(action="get", key=...) expands
298
- one. In-progress state: use todo_tool_ instead.
299
-
300
- ## Conversation History Search
301
- conversation grows forever
302
- search_history_(query=..., limit=...): full-text search over this project's
303
- whole conversation history, including compacted turns.
304
-
305
- {s.get("skills", "")}
306
- {claude_md_section}
307
-
308
- ## Guidelines
309
- - Read files before editing them
310
- - Use absolute paths when working outside project_dir
311
- - When writing to user, remove all mannered prose
312
- """,
313
- # cache breakpoint: tools + this prompt, byte-identical across iterations of this call
314
- "cache_control": {"type": "ephemeral"},
315
- }
316
- if not s.get("memory"):
317
- return [system_prompt_msg]
318
- # Own system block with its own cache breakpoint.
319
- memory_manifest_msg = {
320
- "role": "system",
321
- "content": f"## Long-term Memory\nKey+description index for both scopes — call memory_(action=\"get\", key=..., scope=...) to expand an entry.\n\n{s['memory']}",
322
- "cache_control": {"type": "ephemeral"},
323
- }
324
- return [system_prompt_msg, memory_manifest_msg]
217
+ # The system prompt's sections as of now; the head is rendered from the conversation's first set (system_prompt_).
218
+ sections = system_prompt_text_.sections(project_dir, surface)
325
219
 
326
220
  images = [encoded_image] if isinstance(encoded_image, str) else (encoded_image or [])
327
221
  if query is None:
@@ -389,7 +283,7 @@ whole conversation history, including compacted turns.
389
283
  "to restart into the change; the conversation is kept.\n</reload-pending>"
390
284
  )
391
285
 
392
- current_manifest = _build_memory_manifest() # Mid-turn edits surfaced as delta
286
+ current_manifest = system_prompt_text_.memory_manifest(project_dir) # Mid-turn edits surfaced as delta
393
287
  if current_manifest is not None and current_manifest != _last_shown_manifest:
394
288
  status_sections.append(
395
289
  "<memory-manifest-update>\nMemory changed since this turn started "
@@ -414,7 +308,7 @@ whole conversation history, including compacted turns.
414
308
  )
415
309
  else:
416
310
  trimmed_rest = token_cutter(msgs, max_tokens)
417
- system_msgs = _system_msgs(system_prompt_.head(msgs, trimmed_rest))
311
+ system_msgs = system_prompt_text_.render(system_prompt_.head(msgs, trimmed_rest), project_dir)
418
312
  trimmed_loop_msgs = system_msgs + trimmed_rest + status_msgs # Cache: system, memory, transcript, ephemeral
419
313
 
420
314
  record_prompt_segments(
@@ -615,10 +509,22 @@ whole conversation history, including compacted turns.
615
509
  c["result"], c["run"], c["done"], denied = DENIED_MSG, False, True, True
616
510
 
617
511
 
512
+ def _note(rec):
513
+ try:
514
+ with open(sidecar, "a") as f:
515
+ f.write(json.dumps(rec) + "\n")
516
+ except OSError:
517
+ pass # disk full: the sidecar is a crash record, the tool still runs and its result is stored
518
+
618
519
  async def _run_and_record(c):
520
+ # Tool hooks (~/.micro-cc/hooks): may change the args, or answer the call so it never runs.
521
+ c["args"], instead = await tool_hooks_.before(c["name"], c["args"], project_dir)
522
+ if instead is not None:
523
+ c["result"], c["done"] = instead, True
524
+ _note({"id": c["id"], "result": _result_text(instead, c["name"])})
525
+ return
619
526
  c["started"] = True
620
- with open(sidecar, "a") as f:
621
- f.write(json.dumps({"id": c["id"], "started": True}) + "\n")
527
+ _note({"id": c["id"], "started": True})
622
528
  try:
623
529
  if c["mcp"]:
624
530
  route = mcp_routing[c["name"]]
@@ -627,12 +533,13 @@ whole conversation history, including compacted turns.
627
533
  headers=route.get("headers"), entry=route.get("entry"), project_dir=project_dir,
628
534
  )
629
535
  else:
630
- c["result"] = await execute_tool_call(inner_block(c["tb"]), tools, project_dir, model)
536
+ call = SimpleNamespace(name=c["name"], input=c["args"], id=c["id"]) # use_tool_'s inner call
537
+ c["result"] = await execute_tool_call(call, tools, project_dir, model)
631
538
  except Exception as e:
632
539
  c["result"] = f"Tool error ({c['name']}): {type(e).__name__}: {e}"
633
540
  c["done"] = True
634
- with open(sidecar, "a") as f: # text only, capped
635
- f.write(json.dumps({"id": c["id"], "result": _result_text(c["result"], c["name"])}) + "\n")
541
+ _note({"id": c["id"], "result": _result_text(c["result"], c["name"])}) # text only, capped
542
+ await tool_hooks_.after(c["name"], c["args"], c["result"], project_dir)
636
543
 
637
544
  # Reads in a row run in parallel; a mutating tool runs alone.
638
545
  for batch in _partition_tool_batches([c for c in calls if not c["error"] and c["run"]]):
@@ -0,0 +1,322 @@
1
+ import json
2
+ import os
3
+
4
+ from micro_cc.postgres_store import schema_
5
+ from micro_cc.utils.helpers import project_hash
6
+ from micro_cc.utils.msg_normalize_ import storable
7
+
8
+ # The Postgres copy of a project's messages.jsonl: row N of the file is the row with row_index N. msg_store_ keeps
9
+ # the local file and sends this copy each change; it only ever appends past its own end (compare-and-append, the
10
+ # UNIQUE (project_hash, row_index) key refuses a writer whose view is stale), cuts, or replaces in one transaction.
11
+
12
+ def _connect():
13
+ try:
14
+ import psycopg
15
+ except ImportError as e:
16
+ raise RuntimeError(
17
+ "Postgres backend selected but psycopg isn't installed — "
18
+ "run `pip install micro-cc[postgres]`"
19
+ ) from e
20
+ conn = psycopg.connect(os.environ["MICRO_CC_POSTGRES_URL"], autocommit=True)
21
+ schema_.ensure_all(conn)
22
+ return conn
23
+
24
+
25
+ class ReplicaConflict(RuntimeError):
26
+ """The Postgres copy is not where this writer left it: another writer changed it."""
27
+
28
+
29
+ def take_lease(project_dir: str):
30
+ """A connection holding the project's writer lock, for as long as it stays open (Postgres drops the lock when the
31
+ connection or the process dies); None when another connection holds it."""
32
+ conn = _connect()
33
+ with conn.cursor() as cur:
34
+ cur.execute("SELECT pg_try_advisory_lock(hashtext(%s)::bigint)", (f"micro_cc_writer:{project_hash(project_dir)}",))
35
+ if cur.fetchone()[0]:
36
+ return conn
37
+ conn.close()
38
+ return None
39
+
40
+
41
+ def _touch_session(cur, phash: str, project_dir: str) -> None:
42
+ normalized = os.path.abspath(os.path.expanduser(project_dir))
43
+ cur.execute(
44
+ """
45
+ INSERT INTO micro_cc_sessions (project_hash, project_dir, updated_at)
46
+ VALUES (%s, %s, now())
47
+ ON CONFLICT (project_hash) DO UPDATE
48
+ SET project_dir = EXCLUDED.project_dir, updated_at = now()
49
+ """,
50
+ (phash, normalized),
51
+ )
52
+
53
+
54
+ def replica_state(conn, project_dir: str) -> tuple[int, dict | None]:
55
+ """(rows in the copy, its last row): how far it reaches, and what it ends with."""
56
+ with conn.cursor() as cur:
57
+ cur.execute(
58
+ "SELECT row_index, message FROM micro_cc_messages WHERE project_hash = %s ORDER BY row_index DESC LIMIT 1",
59
+ (project_hash(project_dir),),
60
+ )
61
+ row = cur.fetchone()
62
+ return (row[0] + 1, row[1]) if row else (0, None)
63
+
64
+
65
+ def read_rows(conn, project_dir: str, start: int = 0) -> list:
66
+ """The copy's rows from row `start` on, as stored (unrepaired)."""
67
+ with conn.cursor() as cur:
68
+ cur.execute(
69
+ "SELECT message FROM micro_cc_messages WHERE project_hash = %s AND row_index >= %s ORDER BY row_index",
70
+ (project_hash(project_dir), start),
71
+ )
72
+ return [row[0] for row in cur.fetchall()]
73
+
74
+
75
+ def append_rows(conn, project_dir: str, start: int, rows: list) -> None:
76
+ """Insert rows as rows start, start+1, ... in one transaction; ReplicaConflict unless the copy ends at `start`."""
77
+ import psycopg
78
+ phash = project_hash(project_dir)
79
+ try:
80
+ with conn.transaction(), conn.cursor() as cur:
81
+ cur.execute("SELECT COALESCE(MAX(row_index) + 1, 0) FROM micro_cc_messages WHERE project_hash = %s", (phash,))
82
+ have = cur.fetchone()[0]
83
+ if have != start:
84
+ raise ReplicaConflict(f"Postgres copy of {project_dir} has {have} rows, this writer expected {start}")
85
+ _touch_session(cur, phash, project_dir) # parent row before its messages (FK)
86
+ cur.executemany(
87
+ "INSERT INTO micro_cc_messages (project_hash, row_index, message) VALUES (%s, %s, %s)",
88
+ [(phash, start + i, json.dumps(storable(m))) for i, m in enumerate(rows)],
89
+ )
90
+ except psycopg.errors.UniqueViolation as e: # another writer inserted the same row numbers between check and insert
91
+ raise ReplicaConflict(f"Postgres copy of {project_dir} changed under this writer") from e
92
+
93
+
94
+ def replace_rows(conn, project_dir: str, rows: list) -> None:
95
+ """Make the copy exactly rows, in one transaction: a failure leaves it as it was."""
96
+ phash = project_hash(project_dir)
97
+ with conn.transaction(), conn.cursor() as cur:
98
+ _touch_session(cur, phash, project_dir)
99
+ cur.execute("DELETE FROM micro_cc_messages WHERE project_hash = %s", (phash,))
100
+ cur.executemany(
101
+ "INSERT INTO micro_cc_messages (project_hash, row_index, message) VALUES (%s, %s, %s)",
102
+ [(phash, i, json.dumps(storable(m))) for i, m in enumerate(rows)],
103
+ )
104
+
105
+
106
+ def cut_rows(conn, project_dir: str, cut_idx: int) -> None:
107
+ """Keep rows [0, cut_idx)."""
108
+ with conn.cursor() as cur:
109
+ cur.execute("DELETE FROM micro_cc_messages WHERE project_hash = %s AND row_index >= %s",
110
+ (project_hash(project_dir), cut_idx))
111
+
112
+
113
+ def load_checkpoint(project_dir: str) -> dict | None:
114
+ """The copy's current checkpoint (micro_cc_sessions.summary); None if absent or old-format (no as_of_index)."""
115
+ with _connect() as conn, conn.cursor() as cur:
116
+ cur.execute("SELECT summary FROM micro_cc_sessions WHERE project_hash = %s", (project_hash(project_dir),))
117
+ row = cur.fetchone()
118
+ return row[0] if row and row[0] and "as_of_index" in row[0] else None
119
+
120
+
121
+ def store_checkpoint(project_dir: str, record: dict) -> None:
122
+ """Append a fold to the log and make it current, in one transaction (the local summary.json record)."""
123
+ phash = project_hash(project_dir)
124
+ with _connect() as conn, conn.transaction(), conn.cursor() as cur:
125
+ _touch_session(cur, phash, project_dir)
126
+ cur.execute("INSERT INTO micro_cc_checkpoints (project_hash, as_of_index, checkpoint) VALUES (%s, %s, %s)",
127
+ (phash, record["as_of_index"], json.dumps(record)))
128
+ cur.execute("UPDATE micro_cc_sessions SET summary = %s, updated_at = now() WHERE project_hash = %s",
129
+ (json.dumps(record), phash))
130
+
131
+
132
+ def load_checkpoint_log(project_dir: str) -> list:
133
+ """Every fold of the project, oldest first."""
134
+ with _connect() as conn, conn.cursor() as cur:
135
+ cur.execute(
136
+ "SELECT checkpoint FROM micro_cc_checkpoints WHERE project_hash = %s ORDER BY id", (project_hash(project_dir),)
137
+ )
138
+ return [row[0] for row in cur.fetchall()]
139
+
140
+
141
+ def set_checkpoints(project_dir: str, log: list, current: dict | None) -> None:
142
+ """Make the copy's fold log exactly `log` and its checkpoint `current` (None: no checkpoint), in one transaction:
143
+ what rewind, erase and a claim that finds the local log ahead all end in."""
144
+ phash = project_hash(project_dir)
145
+ with _connect() as conn, conn.transaction(), conn.cursor() as cur:
146
+ _touch_session(cur, phash, project_dir)
147
+ cur.execute("DELETE FROM micro_cc_checkpoints WHERE project_hash = %s", (phash,))
148
+ cur.executemany("INSERT INTO micro_cc_checkpoints (project_hash, as_of_index, checkpoint) VALUES (%s, %s, %s)",
149
+ [(phash, c["as_of_index"], json.dumps(c)) for c in log])
150
+ cur.execute("UPDATE micro_cc_sessions SET summary = %s, updated_at = now() WHERE project_hash = %s",
151
+ (json.dumps(current) if current else None, phash))
152
+
153
+
154
+ def load_token_stats(project_dir: str) -> dict | None:
155
+ """Token stats dict or None; the Postgres twin of tokenization_simple's tokens.json."""
156
+ phash = project_hash(project_dir)
157
+ with _connect() as conn, conn.cursor() as cur:
158
+ cur.execute(
159
+ "SELECT tokens FROM micro_cc_sessions WHERE project_hash = %s",
160
+ (phash,),
161
+ )
162
+ row = cur.fetchone()
163
+ return row[0] if row and row[0] else None
164
+
165
+
166
+ def save_token_stats(project_dir: str, token_stats: dict) -> None:
167
+ """Upsert the whole token_stats dict, as tokenization_simple writes it to tokens.json."""
168
+ phash = project_hash(project_dir)
169
+ normalized = os.path.abspath(os.path.expanduser(project_dir))
170
+ with _connect() as conn, conn.cursor() as cur:
171
+ cur.execute(
172
+ """
173
+ INSERT INTO micro_cc_sessions (project_hash, project_dir, tokens, updated_at)
174
+ VALUES (%s, %s, %s, now())
175
+ ON CONFLICT (project_hash) DO UPDATE
176
+ SET tokens = EXCLUDED.tokens, updated_at = now()
177
+ """,
178
+ (phash, normalized, json.dumps(token_stats)),
179
+ )
180
+
181
+
182
+ # ---------------------------------------------------------------------------
183
+ # Long-term memory (memory_store_'s Postgres backend — see _ensure_memory_table)
184
+ # ---------------------------------------------------------------------------
185
+
186
+ def list_memories(project_hash: str = "") -> list:
187
+ """Manifest [{key, description, updated_at}], newest first; project_hash '' is the global scope."""
188
+ with _connect() as conn, conn.cursor() as cur:
189
+ cur.execute(
190
+ "SELECT key, description, updated_at FROM micro_cc_memory WHERE project_hash = %s ORDER BY updated_at DESC",
191
+ (project_hash,),
192
+ )
193
+ rows = cur.fetchall()
194
+ return [
195
+ {"key": r[0], "description": r[1], "updated_at": r[2].isoformat() if r[2] else ""}
196
+ for r in rows
197
+ ]
198
+
199
+
200
+ def get_memory(key: str, project_hash: str = "") -> dict | None:
201
+ with _connect() as conn, conn.cursor() as cur:
202
+ cur.execute(
203
+ "SELECT description, content FROM micro_cc_memory WHERE key = %s AND project_hash = %s",
204
+ (key, project_hash),
205
+ )
206
+ row = cur.fetchone()
207
+ if not row:
208
+ return None
209
+ return {"key": key, "description": row[0], "content": row[1]}
210
+
211
+
212
+ def count_memories(project_hash: str = "") -> int:
213
+ with _connect() as conn, conn.cursor() as cur:
214
+ cur.execute("SELECT COUNT(*) FROM micro_cc_memory WHERE project_hash = %s", (project_hash,))
215
+ return cur.fetchone()[0]
216
+
217
+
218
+ def add_memory(key: str, description: str, content: str, project_hash: str = "") -> dict:
219
+ """{'status': 'ok'|'exists'}; ON CONFLICT keeps the existence check atomic across processes."""
220
+ with _connect() as conn, conn.cursor() as cur:
221
+ cur.execute(
222
+ """
223
+ INSERT INTO micro_cc_memory (project_hash, key, description, content, updated_at)
224
+ VALUES (%s, %s, %s, %s, now())
225
+ ON CONFLICT (project_hash, key) DO NOTHING
226
+ """,
227
+ (project_hash, key, description, content),
228
+ )
229
+ status = "ok" if cur.rowcount else "exists"
230
+ return {"status": status, "key": key}
231
+
232
+
233
+ def edit_memory(
234
+ key: str,
235
+ new_content: str | None = None,
236
+ new_description: str | None = None,
237
+ project_hash: str = "",
238
+ ) -> dict:
239
+ """{'status': 'ok'|'missing'}; COALESCE merges in one atomic UPDATE."""
240
+ with _connect() as conn, conn.cursor() as cur:
241
+ cur.execute(
242
+ """
243
+ UPDATE micro_cc_memory
244
+ SET description = COALESCE(%s, description),
245
+ content = COALESCE(%s, content),
246
+ updated_at = now()
247
+ WHERE key = %s AND project_hash = %s
248
+ """,
249
+ (new_description, new_content, key, project_hash),
250
+ )
251
+ status = "ok" if cur.rowcount else "missing"
252
+ return {"status": status, "key": key}
253
+
254
+
255
+ def delete_memory(key: str, project_hash: str = "") -> dict:
256
+ """{'status': 'ok'|'missing'}."""
257
+ with _connect() as conn, conn.cursor() as cur:
258
+ cur.execute("DELETE FROM micro_cc_memory WHERE key = %s AND project_hash = %s", (key, project_hash))
259
+ status = "ok" if cur.rowcount else "missing"
260
+ return {"status": status, "key": key}
261
+
262
+
263
+ # ---------------------------------------------------------------------------
264
+ # Settings (settings_store_'s Postgres backend — see _ensure_settings_table)
265
+ # ---------------------------------------------------------------------------
266
+
267
+ def load_settings() -> dict | None:
268
+ """None on a missing row, so settings_store_ can tell unwritten from {}."""
269
+ with _connect() as conn, conn.cursor() as cur:
270
+ cur.execute("SELECT data FROM micro_cc_settings WHERE id = 'global'")
271
+ row = cur.fetchone()
272
+ return row[0] if row else None
273
+
274
+
275
+ def load_theme() -> dict | None:
276
+ """Theme row of micro_cc_settings; None if never written. Falls back to the legacy micro_cc_theme table."""
277
+ with _connect() as conn, conn.cursor() as cur:
278
+ cur.execute("SELECT data FROM micro_cc_settings WHERE id = 'theme'")
279
+ row = cur.fetchone()
280
+ if row:
281
+ return row[0]
282
+ cur.execute("SELECT to_regclass('micro_cc_theme') IS NOT NULL")
283
+ if not cur.fetchone()[0]:
284
+ return None
285
+ cur.execute("SELECT data FROM micro_cc_theme WHERE id = 'global'")
286
+ row = cur.fetchone()
287
+ if not row:
288
+ return None
289
+ # Idempotent: racing processes write the same row; legacy table left in place.
290
+ cur.execute(
291
+ "INSERT INTO micro_cc_settings (id, data, updated_at) VALUES ('theme', %s, now()) ON CONFLICT (id) DO NOTHING",
292
+ (json.dumps(row[0]),),
293
+ )
294
+ return row[0]
295
+
296
+
297
+ def save_theme(store: dict) -> None:
298
+ """Whole-dict upsert into the 'theme' row of micro_cc_settings; edited via /theme, not a hot path."""
299
+ with _connect() as conn, conn.cursor() as cur:
300
+ cur.execute(
301
+ """
302
+ INSERT INTO micro_cc_settings (id, data, updated_at)
303
+ VALUES ('theme', %s, now())
304
+ ON CONFLICT (id) DO UPDATE
305
+ SET data = EXCLUDED.data, updated_at = now()
306
+ """,
307
+ (json.dumps(store),),
308
+ )
309
+
310
+
311
+ def save_settings(store: dict) -> None:
312
+ """Whole-dict upsert; settings are human-edited, so no append/lock path like store_msgs."""
313
+ with _connect() as conn, conn.cursor() as cur:
314
+ cur.execute(
315
+ """
316
+ INSERT INTO micro_cc_settings (id, data, updated_at)
317
+ VALUES ('global', %s, now())
318
+ ON CONFLICT (id) DO UPDATE
319
+ SET data = EXCLUDED.data, updated_at = now()
320
+ """,
321
+ (json.dumps(store),),
322
+ )
@@ -63,6 +63,26 @@ def _ensure_messages_table(conn) -> None:
63
63
  END IF;
64
64
  END $$;
65
65
  """)
66
+ # row_index: the row's number in messages.jsonl. Rows written before it existed are numbered once, in id
67
+ # order (the old read order); the partial index makes "any left?" instant once none are.
68
+ cur.execute("ALTER TABLE micro_cc_messages ADD COLUMN IF NOT EXISTS row_index BIGINT")
69
+ cur.execute("""
70
+ CREATE INDEX IF NOT EXISTS micro_cc_messages_unnumbered_idx
71
+ ON micro_cc_messages (project_hash, id) WHERE row_index IS NULL
72
+ """)
73
+ cur.execute("SELECT 1 FROM micro_cc_messages WHERE row_index IS NULL LIMIT 1")
74
+ if cur.fetchone():
75
+ cur.execute("""
76
+ UPDATE micro_cc_messages m SET row_index = n.position
77
+ FROM (SELECT id, row_number() OVER (PARTITION BY project_hash ORDER BY id) - 1 AS position
78
+ FROM micro_cc_messages
79
+ WHERE project_hash IN (SELECT project_hash FROM micro_cc_messages WHERE row_index IS NULL)) n
80
+ WHERE m.id = n.id AND m.row_index IS NULL
81
+ """)
82
+ cur.execute("""
83
+ CREATE UNIQUE INDEX IF NOT EXISTS micro_cc_messages_row_idx
84
+ ON micro_cc_messages (project_hash, row_index)
85
+ """)
66
86
  _messages_table_ready = True
67
87
 
68
88
 
@@ -19,6 +19,7 @@ Rule: put the change in a mod or a config file below. Edit core only when nothin
19
19
  | Colors | `theme.json` (or `/theme`) |
20
20
  | Add or tweak a model | `models.json` |
21
21
  | Skill | `skills/<name>/SKILL.md` |
22
+ | A rule on tool calls: block, approve, rewrite args, audit | a hook in `hooks/<name>.py` (read the `tool-hooks` skill) |
22
23
 
23
24
  ## Mods
24
25
 
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: design
3
+ description: Taste for any visual output (slide, diagram, poster, page, chart). Minimalist, Dieter Rams-inspired defaults you may depart from. Use before drawing or styling anything visual.
4
+ ---
5
+
6
+ # Design
7
+
8
+ Default taste: **as little design as possible**. Dieter Rams' principles, applied:
9
+
10
+ - **Useful**: every element earns its place by carrying meaning. Cut the rest.
11
+ - **Honest**: show the real mechanism or data; no decoration pretending to be content.
12
+ - **Unobtrusive**: neutral ground, ink-dark type, one restrained accent at most. Colour marks what matters.
13
+ - **Thorough**: alignment, spacing, and type scale are consistent down to the last pixel. Nothing overlaps or leaves the canvas.
14
+ - **Long-lasting**: a grid and whitespace over trends, gradients, shadows, emoji.
15
+
16
+ These are defaults, not rules. Break them when the content or the user's brief calls for it (a loud poster, a rich dashboard, a brand palette). The user's brief and any template always win.
17
+
18
+ ## Practice
19
+
20
+ - Pick the one thing the visual says, make it the focal point, then subordinate the rest.
21
+ - Type: one or two families, few sizes; small and quiet by default, large only for the focal word.
22
+ - Diagrams: label directly on the shape, thin lines, one highlighted element.
23
+ - Output: self-contained `.html`/`.svg` (inline CSS, no external assets), or `.png`/`.pdf` for static pieces. Render and look at it before handing over.
24
+ - Open every `.html` result for the user as the last step: `open "$FILE"` (macOS) or `wslview "$FILE"` (WSL).
25
+ - For decks use `pptx`; for pointer-reactive line figures use `hairline`.