muninn-ai 0.2.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 (460) hide show
  1. muninn_ai-0.2.0/LICENSE +202 -0
  2. muninn_ai-0.2.0/PKG-INFO +328 -0
  3. muninn_ai-0.2.0/README.md +307 -0
  4. muninn_ai-0.2.0/pyproject.toml +50 -0
  5. muninn_ai-0.2.0/pyproject.toml.orig +51 -0
  6. muninn_ai-0.2.0/src/muninn/__init__.py +0 -0
  7. muninn_ai-0.2.0/src/muninn/__main__.py +7 -0
  8. muninn_ai-0.2.0/src/muninn/adapters/__init__.py +0 -0
  9. muninn_ai-0.2.0/src/muninn/adapters/apply/__init__.py +1 -0
  10. muninn_ai-0.2.0/src/muninn/adapters/apply/browser.py +226 -0
  11. muninn_ai-0.2.0/src/muninn/adapters/apply/greenhouse.py +180 -0
  12. muninn_ai-0.2.0/src/muninn/adapters/calendar_merge.py +38 -0
  13. muninn_ai-0.2.0/src/muninn/adapters/channels/__init__.py +0 -0
  14. muninn_ai-0.2.0/src/muninn/adapters/channels/webpush.py +104 -0
  15. muninn_ai-0.2.0/src/muninn/adapters/clock.py +12 -0
  16. muninn_ai-0.2.0/src/muninn/adapters/documents.py +45 -0
  17. muninn_ai-0.2.0/src/muninn/adapters/google/__init__.py +0 -0
  18. muninn_ai-0.2.0/src/muninn/adapters/google/calendar.py +103 -0
  19. muninn_ai-0.2.0/src/muninn/adapters/google/gmail.py +106 -0
  20. muninn_ai-0.2.0/src/muninn/adapters/google/oauth.py +29 -0
  21. muninn_ai-0.2.0/src/muninn/adapters/installs.py +172 -0
  22. muninn_ai-0.2.0/src/muninn/adapters/lease_runner.py +216 -0
  23. muninn_ai-0.2.0/src/muninn/adapters/llm/__init__.py +0 -0
  24. muninn_ai-0.2.0/src/muninn/adapters/llm/anthropic_api.py +154 -0
  25. muninn_ai-0.2.0/src/muninn/adapters/llm/claude_cli.py +226 -0
  26. muninn_ai-0.2.0/src/muninn/adapters/llm/content.py +45 -0
  27. muninn_ai-0.2.0/src/muninn/adapters/llm/keys.py +56 -0
  28. muninn_ai-0.2.0/src/muninn/adapters/llm/ollama.py +137 -0
  29. muninn_ai-0.2.0/src/muninn/adapters/llm/openai_compat.py +173 -0
  30. muninn_ai-0.2.0/src/muninn/adapters/llm/reply_check.py +37 -0
  31. muninn_ai-0.2.0/src/muninn/adapters/local_projects.py +194 -0
  32. muninn_ai-0.2.0/src/muninn/adapters/microsoft/__init__.py +0 -0
  33. muninn_ai-0.2.0/src/muninn/adapters/microsoft/graph.py +132 -0
  34. muninn_ai-0.2.0/src/muninn/adapters/oauth.py +164 -0
  35. muninn_ai-0.2.0/src/muninn/adapters/plans_yaml.py +132 -0
  36. muninn_ai-0.2.0/src/muninn/adapters/postings.py +141 -0
  37. muninn_ai-0.2.0/src/muninn/adapters/project_records.py +122 -0
  38. muninn_ai-0.2.0/src/muninn/adapters/running_version.py +57 -0
  39. muninn_ai-0.2.0/src/muninn/adapters/scheduler.py +126 -0
  40. muninn_ai-0.2.0/src/muninn/adapters/sources/__init__.py +0 -0
  41. muninn_ai-0.2.0/src/muninn/adapters/sources/claude_code.py +177 -0
  42. muninn_ai-0.2.0/src/muninn/adapters/sources/conversations.py +120 -0
  43. muninn_ai-0.2.0/src/muninn/adapters/sources/git.py +122 -0
  44. muninn_ai-0.2.0/src/muninn/adapters/sources/health.py +59 -0
  45. muninn_ai-0.2.0/src/muninn/adapters/sources/languages.py +47 -0
  46. muninn_ai-0.2.0/src/muninn/adapters/sources/location/__init__.py +0 -0
  47. muninn_ai-0.2.0/src/muninn/adapters/sources/location/owntracks.py +39 -0
  48. muninn_ai-0.2.0/src/muninn/adapters/store_sqlite.py +1098 -0
  49. muninn_ai-0.2.0/src/muninn/adapters/uploads.py +49 -0
  50. muninn_ai-0.2.0/src/muninn/adapters/web/__init__.py +0 -0
  51. muninn_ai-0.2.0/src/muninn/adapters/web/app.py +1398 -0
  52. muninn_ai-0.2.0/src/muninn/adapters/web/devices.py +94 -0
  53. muninn_ai-0.2.0/src/muninn/adapters/web/lease_feed.py +133 -0
  54. muninn_ai-0.2.0/src/muninn/adapters/web/screen_watch.py +73 -0
  55. muninn_ai-0.2.0/src/muninn/adapters/web/static/api.js +53 -0
  56. muninn_ai-0.2.0/src/muninn/adapters/web/static/app.js +248 -0
  57. muninn_ai-0.2.0/src/muninn/adapters/web/static/cards.js +186 -0
  58. muninn_ai-0.2.0/src/muninn/adapters/web/static/dom.js +73 -0
  59. muninn_ai-0.2.0/src/muninn/adapters/web/static/files.js +124 -0
  60. muninn_ai-0.2.0/src/muninn/adapters/web/static/format.js +13 -0
  61. muninn_ai-0.2.0/src/muninn/adapters/web/static/icon-180.png +0 -0
  62. muninn_ai-0.2.0/src/muninn/adapters/web/static/icon-192.png +0 -0
  63. muninn_ai-0.2.0/src/muninn/adapters/web/static/icon-512.png +0 -0
  64. muninn_ai-0.2.0/src/muninn/adapters/web/static/index.html +39 -0
  65. muninn_ai-0.2.0/src/muninn/adapters/web/static/manifest.webmanifest +13 -0
  66. muninn_ai-0.2.0/src/muninn/adapters/web/static/pages.js +347 -0
  67. muninn_ai-0.2.0/src/muninn/adapters/web/static/panel.js +226 -0
  68. muninn_ai-0.2.0/src/muninn/adapters/web/static/privacy.en.html +25 -0
  69. muninn_ai-0.2.0/src/muninn/adapters/web/static/privacy.html +25 -0
  70. muninn_ai-0.2.0/src/muninn/adapters/web/static/setup.js +96 -0
  71. muninn_ai-0.2.0/src/muninn/adapters/web/static/shell.js +62 -0
  72. muninn_ai-0.2.0/src/muninn/adapters/web/static/stamps.js +93 -0
  73. muninn_ai-0.2.0/src/muninn/adapters/web/static/style.css +397 -0
  74. muninn_ai-0.2.0/src/muninn/adapters/web/static/sw.js +73 -0
  75. muninn_ai-0.2.0/src/muninn/adapters/web/static/talk.js +957 -0
  76. muninn_ai-0.2.0/src/muninn/adapters/web/static/things.js +142 -0
  77. muninn_ai-0.2.0/src/muninn/adapters/web/static/types.js +2 -0
  78. muninn_ai-0.2.0/src/muninn/adapters/web/static/viewer.js +34 -0
  79. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/en/app.js +17 -0
  80. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/en/cards.js +100 -0
  81. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/en/files.js +8 -0
  82. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/en/format.js +9 -0
  83. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/en/language.js +6 -0
  84. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/en/pages.js +208 -0
  85. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/en/panel.js +51 -0
  86. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/en/setup.js +44 -0
  87. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/en/shell.js +4 -0
  88. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/en/stamps.js +8 -0
  89. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/en/talk.js +87 -0
  90. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/en/things.js +36 -0
  91. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/en/viewer.js +5 -0
  92. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/en.js +15 -0
  93. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/zh-TW/app.js +20 -0
  94. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/zh-TW/cards.js +99 -0
  95. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/zh-TW/files.js +8 -0
  96. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/zh-TW/format.js +9 -0
  97. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/zh-TW/language.js +6 -0
  98. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/zh-TW/pages.js +207 -0
  99. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/zh-TW/panel.js +50 -0
  100. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/zh-TW/setup.js +43 -0
  101. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/zh-TW/shell.js +4 -0
  102. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/zh-TW/stamps.js +11 -0
  103. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/zh-TW/talk.js +83 -0
  104. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/zh-TW/things.js +36 -0
  105. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/zh-TW/viewer.js +5 -0
  106. muninn_ai-0.2.0/src/muninn/adapters/web/static/words/zh-TW.js +15 -0
  107. muninn_ai-0.2.0/src/muninn/adapters/web/static/words.js +18 -0
  108. muninn_ai-0.2.0/src/muninn/adapters/web/ts/api.ts +49 -0
  109. muninn_ai-0.2.0/src/muninn/adapters/web/ts/app.ts +228 -0
  110. muninn_ai-0.2.0/src/muninn/adapters/web/ts/cards.ts +271 -0
  111. muninn_ai-0.2.0/src/muninn/adapters/web/ts/dom.ts +82 -0
  112. muninn_ai-0.2.0/src/muninn/adapters/web/ts/files.ts +116 -0
  113. muninn_ai-0.2.0/src/muninn/adapters/web/ts/format.ts +18 -0
  114. muninn_ai-0.2.0/src/muninn/adapters/web/ts/pages.ts +482 -0
  115. muninn_ai-0.2.0/src/muninn/adapters/web/ts/panel.ts +275 -0
  116. muninn_ai-0.2.0/src/muninn/adapters/web/ts/setup.ts +124 -0
  117. muninn_ai-0.2.0/src/muninn/adapters/web/ts/shell.ts +76 -0
  118. muninn_ai-0.2.0/src/muninn/adapters/web/ts/stamps.ts +86 -0
  119. muninn_ai-0.2.0/src/muninn/adapters/web/ts/sw.ts +83 -0
  120. muninn_ai-0.2.0/src/muninn/adapters/web/ts/talk.ts +899 -0
  121. muninn_ai-0.2.0/src/muninn/adapters/web/ts/things.ts +166 -0
  122. muninn_ai-0.2.0/src/muninn/adapters/web/ts/tsconfig.json +21 -0
  123. muninn_ai-0.2.0/src/muninn/adapters/web/ts/tsconfig.sw.json +8 -0
  124. muninn_ai-0.2.0/src/muninn/adapters/web/ts/types.ts +341 -0
  125. muninn_ai-0.2.0/src/muninn/adapters/web/ts/viewer.ts +37 -0
  126. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/en/app.ts +19 -0
  127. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/en/cards.ts +103 -0
  128. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/en/files.ts +10 -0
  129. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/en/format.ts +12 -0
  130. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/en/language.ts +8 -0
  131. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/en/pages.ts +229 -0
  132. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/en/panel.ts +54 -0
  133. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/en/setup.ts +46 -0
  134. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/en/shell.ts +6 -0
  135. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/en/stamps.ts +11 -0
  136. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/en/talk.ts +91 -0
  137. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/en/things.ts +38 -0
  138. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/en/viewer.ts +7 -0
  139. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/en.ts +18 -0
  140. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/zh-TW/app.ts +20 -0
  141. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/zh-TW/cards.ts +99 -0
  142. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/zh-TW/files.ts +8 -0
  143. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/zh-TW/format.ts +9 -0
  144. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/zh-TW/language.ts +6 -0
  145. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/zh-TW/pages.ts +225 -0
  146. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/zh-TW/panel.ts +50 -0
  147. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/zh-TW/setup.ts +43 -0
  148. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/zh-TW/shell.ts +4 -0
  149. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/zh-TW/stamps.ts +11 -0
  150. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/zh-TW/talk.ts +84 -0
  151. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/zh-TW/things.ts +36 -0
  152. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/zh-TW/viewer.ts +5 -0
  153. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words/zh-TW.ts +17 -0
  154. muninn_ai-0.2.0/src/muninn/adapters/web/ts/words.ts +25 -0
  155. muninn_ai-0.2.0/src/muninn/collectors/__init__.py +38 -0
  156. muninn_ai-0.2.0/src/muninn/collectors/mac/install.sh +124 -0
  157. muninn_ai-0.2.0/src/muninn/collectors/mac/muninn_agent.py +291 -0
  158. muninn_ai-0.2.0/src/muninn/config.py +251 -0
  159. muninn_ai-0.2.0/src/muninn/contracts/activity.v1.md +59 -0
  160. muninn_ai-0.2.0/src/muninn/contracts/digests.v1.schema.json +38 -0
  161. muninn_ai-0.2.0/src/muninn/contracts/handoffs.v1.schema.json +29 -0
  162. muninn_ai-0.2.0/src/muninn/contracts/llm/domain_classify.schema.json +17 -0
  163. muninn_ai-0.2.0/src/muninn/contracts/llm/facts.schema.json +58 -0
  164. muninn_ai-0.2.0/src/muninn/contracts/llm/form_fill.schema.json +45 -0
  165. muninn_ai-0.2.0/src/muninn/contracts/llm/idea_next.schema.json +20 -0
  166. muninn_ai-0.2.0/src/muninn/contracts/llm/judge.schema.json +19 -0
  167. muninn_ai-0.2.0/src/muninn/contracts/llm/lent_turn.schema.json +29 -0
  168. muninn_ai-0.2.0/src/muninn/contracts/llm/mail_triage.schema.json +60 -0
  169. muninn_ai-0.2.0/src/muninn/contracts/llm/packet.schema.json +55 -0
  170. muninn_ai-0.2.0/src/muninn/contracts/llm/packet_fit.schema.json +21 -0
  171. muninn_ai-0.2.0/src/muninn/contracts/llm/reflect_digest.schema.json +31 -0
  172. muninn_ai-0.2.0/src/muninn/contracts/llm/route.schema.json +89 -0
  173. muninn_ai-0.2.0/src/muninn/contracts/llm/task_evidence.schema.json +28 -0
  174. muninn_ai-0.2.0/src/muninn/contracts/llm/task_match.schema.json +29 -0
  175. muninn_ai-0.2.0/src/muninn/contracts/llm/todo_match.schema.json +25 -0
  176. muninn_ai-0.2.0/src/muninn/contracts/llm/topic_recall.schema.json +22 -0
  177. muninn_ai-0.2.0/src/muninn/contracts/llm/topic_state.schema.json +54 -0
  178. muninn_ai-0.2.0/src/muninn/contracts/llm/turn_topic.schema.json +18 -0
  179. muninn_ai-0.2.0/src/muninn/contracts/llm/window_classify.schema.json +40 -0
  180. muninn_ai-0.2.0/src/muninn/contracts/llm/work_check.schema.json +17 -0
  181. muninn_ai-0.2.0/src/muninn/contracts/llm-points.yaml +292 -0
  182. muninn_ai-0.2.0/src/muninn/contracts/local-projects.v1.md +49 -0
  183. muninn_ai-0.2.0/src/muninn/contracts/location.v1.md +29 -0
  184. muninn_ai-0.2.0/src/muninn/contracts/messages.v1.schema.json +37 -0
  185. muninn_ai-0.2.0/src/muninn/contracts/permission-requests.v2.schema.json +159 -0
  186. muninn_ai-0.2.0/src/muninn/contracts/records.v2.md +78 -0
  187. muninn_ai-0.2.0/src/muninn/contracts/tasks.v1.schema.json +38 -0
  188. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/LICENSE +202 -0
  189. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/NOTICE +4 -0
  190. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/README.md +10 -0
  191. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/acts/conformance/lifecycle.json +1366 -0
  192. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/acts/conformance/records.json +1892 -0
  193. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/acts/schemas/amended.schema.json +38 -0
  194. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/acts/schemas/claimed.schema.json +40 -0
  195. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/acts/schemas/note.schema.json +27 -0
  196. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/acts/schemas/raised.schema.json +41 -0
  197. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/acts/schemas/related.schema.json +25 -0
  198. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/acts/schemas/reopened.schema.json +26 -0
  199. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/acts/schemas/settled.schema.json +32 -0
  200. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/acts/schemas/withdrawn.schema.json +28 -0
  201. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/core/conformance/terms-digest.json +185 -0
  202. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/core/schemas/record.schema.json +349 -0
  203. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/decisions/conformance/lifecycle.json +5237 -0
  204. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/decisions/conformance/records.json +3033 -0
  205. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/decisions/schemas/amended.schema.json +25 -0
  206. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/decisions/schemas/approved.schema.json +21 -0
  207. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/decisions/schemas/claimed.schema.json +52 -0
  208. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/decisions/schemas/note.schema.json +26 -0
  209. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/decisions/schemas/raised.schema.json +28 -0
  210. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/decisions/schemas/related.schema.json +25 -0
  211. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/decisions/schemas/reopened.schema.json +21 -0
  212. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/decisions/schemas/settled.schema.json +47 -0
  213. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/decisions/schemas/terms.schema.json +139 -0
  214. muninn_ai-0.2.0/src/muninn/contracts/vendor/principal-handoff/decisions/schemas/withdrawn.schema.json +29 -0
  215. muninn_ai-0.2.0/src/muninn/contracts/vendor/records/fixtures/state-todo.v1.example.md +18 -0
  216. muninn_ai-0.2.0/src/muninn/contracts/vendor/records/fixtures/todo-md.v1.example.md +21 -0
  217. muninn_ai-0.2.0/src/muninn/contracts/vendor/records/lease-handover.v1.schema.json +26 -0
  218. muninn_ai-0.2.0/src/muninn/contracts/vendor/records/lease-runner.v2.schema.json +747 -0
  219. muninn_ai-0.2.0/src/muninn/contracts/vendor/records/llm-points.v1.schema.json +83 -0
  220. muninn_ai-0.2.0/src/muninn/contracts/vendor/records/reflect-week.v1.schema.json +23 -0
  221. muninn_ai-0.2.0/src/muninn/contracts/vendor/records/state-todo.v1.md +42 -0
  222. muninn_ai-0.2.0/src/muninn/contracts/vendor/records/todo-md.v1.md +44 -0
  223. muninn_ai-0.2.0/src/muninn/contracts/web-api.v1.schema.json +3831 -0
  224. muninn_ai-0.2.0/src/muninn/core/__init__.py +0 -0
  225. muninn_ai-0.2.0/src/muninn/core/actions.py +1108 -0
  226. muninn_ai-0.2.0/src/muninn/core/activity.py +123 -0
  227. muninn_ai-0.2.0/src/muninn/core/actors.py +70 -0
  228. muninn_ai-0.2.0/src/muninn/core/alerts.py +62 -0
  229. muninn_ai-0.2.0/src/muninn/core/answer.py +115 -0
  230. muninn_ai-0.2.0/src/muninn/core/apply.py +447 -0
  231. muninn_ai-0.2.0/src/muninn/core/assembly.py +1013 -0
  232. muninn_ai-0.2.0/src/muninn/core/attribution.py +273 -0
  233. muninn_ai-0.2.0/src/muninn/core/budget.py +72 -0
  234. muninn_ai-0.2.0/src/muninn/core/cases.py +33 -0
  235. muninn_ai-0.2.0/src/muninn/core/classify.py +33 -0
  236. muninn_ai-0.2.0/src/muninn/core/command_trust.py +173 -0
  237. muninn_ai-0.2.0/src/muninn/core/commands.py +383 -0
  238. muninn_ai-0.2.0/src/muninn/core/composer.py +152 -0
  239. muninn_ai-0.2.0/src/muninn/core/conversation.py +265 -0
  240. muninn_ai-0.2.0/src/muninn/core/day_view.py +116 -0
  241. muninn_ai-0.2.0/src/muninn/core/decide.py +65 -0
  242. muninn_ai-0.2.0/src/muninn/core/dossier.py +97 -0
  243. muninn_ai-0.2.0/src/muninn/core/drift.py +256 -0
  244. muninn_ai-0.2.0/src/muninn/core/engine.py +617 -0
  245. muninn_ai-0.2.0/src/muninn/core/eval_suite.py +142 -0
  246. muninn_ai-0.2.0/src/muninn/core/evals.py +435 -0
  247. muninn_ai-0.2.0/src/muninn/core/facts.py +254 -0
  248. muninn_ai-0.2.0/src/muninn/core/handoff_records.py +281 -0
  249. muninn_ai-0.2.0/src/muninn/core/handoffs.py +79 -0
  250. muninn_ai-0.2.0/src/muninn/core/idea_next.py +146 -0
  251. muninn_ai-0.2.0/src/muninn/core/ideas.py +387 -0
  252. muninn_ai-0.2.0/src/muninn/core/language.py +35 -0
  253. muninn_ai-0.2.0/src/muninn/core/lease.py +1141 -0
  254. muninn_ai-0.2.0/src/muninn/core/llm_router.py +271 -0
  255. muninn_ai-0.2.0/src/muninn/core/location.py +44 -0
  256. muninn_ai-0.2.0/src/muninn/core/mail.py +273 -0
  257. muninn_ai-0.2.0/src/muninn/core/metrics.py +222 -0
  258. muninn_ai-0.2.0/src/muninn/core/models.py +341 -0
  259. muninn_ai-0.2.0/src/muninn/core/offline_time.py +143 -0
  260. muninn_ai-0.2.0/src/muninn/core/onboarding.py +34 -0
  261. muninn_ai-0.2.0/src/muninn/core/open_items.py +113 -0
  262. muninn_ai-0.2.0/src/muninn/core/ph.py +464 -0
  263. muninn_ai-0.2.0/src/muninn/core/places.py +250 -0
  264. muninn_ai-0.2.0/src/muninn/core/plan.py +138 -0
  265. muninn_ai-0.2.0/src/muninn/core/plan_base.py +117 -0
  266. muninn_ai-0.2.0/src/muninn/core/plan_edits.py +228 -0
  267. muninn_ai-0.2.0/src/muninn/core/planner.py +143 -0
  268. muninn_ai-0.2.0/src/muninn/core/plans.py +73 -0
  269. muninn_ai-0.2.0/src/muninn/core/ports.py +886 -0
  270. muninn_ai-0.2.0/src/muninn/core/prepare.py +466 -0
  271. muninn_ai-0.2.0/src/muninn/core/privacy.py +129 -0
  272. muninn_ai-0.2.0/src/muninn/core/progress.py +112 -0
  273. muninn_ai-0.2.0/src/muninn/core/project_messages.py +160 -0
  274. muninn_ai-0.2.0/src/muninn/core/prompt_check.py +123 -0
  275. muninn_ai-0.2.0/src/muninn/core/questions.py +85 -0
  276. muninn_ai-0.2.0/src/muninn/core/records.py +103 -0
  277. muninn_ai-0.2.0/src/muninn/core/redact.py +32 -0
  278. muninn_ai-0.2.0/src/muninn/core/reflect.py +424 -0
  279. muninn_ai-0.2.0/src/muninn/core/reply_json.py +33 -0
  280. muninn_ai-0.2.0/src/muninn/core/reports.py +221 -0
  281. muninn_ai-0.2.0/src/muninn/core/requests.py +203 -0
  282. muninn_ai-0.2.0/src/muninn/core/review.py +138 -0
  283. muninn_ai-0.2.0/src/muninn/core/schedule.py +83 -0
  284. muninn_ai-0.2.0/src/muninn/core/sidecar.py +83 -0
  285. muninn_ai-0.2.0/src/muninn/core/speak_up.py +113 -0
  286. muninn_ai-0.2.0/src/muninn/core/task_evidence.py +100 -0
  287. muninn_ai-0.2.0/src/muninn/core/task_models.py +75 -0
  288. muninn_ai-0.2.0/src/muninn/core/tasks.py +397 -0
  289. muninn_ai-0.2.0/src/muninn/core/timewin.py +74 -0
  290. muninn_ai-0.2.0/src/muninn/core/todo_match.py +101 -0
  291. muninn_ai-0.2.0/src/muninn/core/tools/__init__.py +97 -0
  292. muninn_ai-0.2.0/src/muninn/core/tools/alerts.py +38 -0
  293. muninn_ai-0.2.0/src/muninn/core/tools/apply.py +25 -0
  294. muninn_ai-0.2.0/src/muninn/core/tools/attribution.py +56 -0
  295. muninn_ai-0.2.0/src/muninn/core/tools/blocks.py +93 -0
  296. muninn_ai-0.2.0/src/muninn/core/tools/builtin.py +23 -0
  297. muninn_ai-0.2.0/src/muninn/core/tools/conversation.py +225 -0
  298. muninn_ai-0.2.0/src/muninn/core/tools/ideas.py +119 -0
  299. muninn_ai-0.2.0/src/muninn/core/tools/packets.py +49 -0
  300. muninn_ai-0.2.0/src/muninn/core/tools/places.py +42 -0
  301. muninn_ai-0.2.0/src/muninn/core/tools/plan.py +160 -0
  302. muninn_ai-0.2.0/src/muninn/core/tools/records.py +110 -0
  303. muninn_ai-0.2.0/src/muninn/core/tools/tasks.py +62 -0
  304. muninn_ai-0.2.0/src/muninn/core/tools/topics.py +28 -0
  305. muninn_ai-0.2.0/src/muninn/core/topic_memory.py +208 -0
  306. muninn_ai-0.2.0/src/muninn/core/topics.py +256 -0
  307. muninn_ai-0.2.0/src/muninn/core/understanding.py +95 -0
  308. muninn_ai-0.2.0/src/muninn/core/views.py +252 -0
  309. muninn_ai-0.2.0/src/muninn/core/waiting.py +156 -0
  310. muninn_ai-0.2.0/src/muninn/core/window_classify.py +283 -0
  311. muninn_ai-0.2.0/src/muninn/eval_suite/facts.en.yaml +33 -0
  312. muninn_ai-0.2.0/src/muninn/eval_suite/facts.zh-TW.yaml +33 -0
  313. muninn_ai-0.2.0/src/muninn/eval_suite/route.en.yaml +63 -0
  314. muninn_ai-0.2.0/src/muninn/eval_suite/route.zh-TW.yaml +63 -0
  315. muninn_ai-0.2.0/src/muninn/eval_suite/work_check.en.yaml +21 -0
  316. muninn_ai-0.2.0/src/muninn/eval_suite/work_check.zh-TW.yaml +21 -0
  317. muninn_ai-0.2.0/src/muninn/languages/__init__.py +72 -0
  318. muninn_ai-0.2.0/src/muninn/languages/en/__init__.py +82 -0
  319. muninn_ai-0.2.0/src/muninn/languages/en/actions.py +81 -0
  320. muninn_ai-0.2.0/src/muninn/languages/en/alerts.py +1 -0
  321. muninn_ai-0.2.0/src/muninn/languages/en/answer.py +1 -0
  322. muninn_ai-0.2.0/src/muninn/languages/en/apply.py +23 -0
  323. muninn_ai-0.2.0/src/muninn/languages/en/assembly.py +18 -0
  324. muninn_ai-0.2.0/src/muninn/languages/en/collectors.py +6 -0
  325. muninn_ai-0.2.0/src/muninn/languages/en/command_trust.py +1 -0
  326. muninn_ai-0.2.0/src/muninn/languages/en/commands.py +18 -0
  327. muninn_ai-0.2.0/src/muninn/languages/en/composer.py +4 -0
  328. muninn_ai-0.2.0/src/muninn/languages/en/config.py +1 -0
  329. muninn_ai-0.2.0/src/muninn/languages/en/conversation.py +6 -0
  330. muninn_ai-0.2.0/src/muninn/languages/en/day_view.py +4 -0
  331. muninn_ai-0.2.0/src/muninn/languages/en/drift.py +27 -0
  332. muninn_ai-0.2.0/src/muninn/languages/en/engine.py +12 -0
  333. muninn_ai-0.2.0/src/muninn/languages/en/evals.py +1 -0
  334. muninn_ai-0.2.0/src/muninn/languages/en/facts.py +17 -0
  335. muninn_ai-0.2.0/src/muninn/languages/en/handoff_records.py +19 -0
  336. muninn_ai-0.2.0/src/muninn/languages/en/idea_next.py +7 -0
  337. muninn_ai-0.2.0/src/muninn/languages/en/ideas.py +29 -0
  338. muninn_ai-0.2.0/src/muninn/languages/en/lease.py +125 -0
  339. muninn_ai-0.2.0/src/muninn/languages/en/llm.py +9 -0
  340. muninn_ai-0.2.0/src/muninn/languages/en/llm_router.py +1 -0
  341. muninn_ai-0.2.0/src/muninn/languages/en/local_projects.py +10 -0
  342. muninn_ai-0.2.0/src/muninn/languages/en/mail.py +21 -0
  343. muninn_ai-0.2.0/src/muninn/languages/en/main.py +36 -0
  344. muninn_ai-0.2.0/src/muninn/languages/en/models.py +5 -0
  345. muninn_ai-0.2.0/src/muninn/languages/en/offline_time.py +10 -0
  346. muninn_ai-0.2.0/src/muninn/languages/en/onboarding.py +7 -0
  347. muninn_ai-0.2.0/src/muninn/languages/en/open_items.py +1 -0
  348. muninn_ai-0.2.0/src/muninn/languages/en/owntracks.py +4 -0
  349. muninn_ai-0.2.0/src/muninn/languages/en/places.py +7 -0
  350. muninn_ai-0.2.0/src/muninn/languages/en/plan_edits.py +23 -0
  351. muninn_ai-0.2.0/src/muninn/languages/en/planner.py +13 -0
  352. muninn_ai-0.2.0/src/muninn/languages/en/plans.py +5 -0
  353. muninn_ai-0.2.0/src/muninn/languages/en/ports.py +1 -0
  354. muninn_ai-0.2.0/src/muninn/languages/en/prepare.py +8 -0
  355. muninn_ai-0.2.0/src/muninn/languages/en/project_messages.py +15 -0
  356. muninn_ai-0.2.0/src/muninn/languages/en/records.py +5 -0
  357. muninn_ai-0.2.0/src/muninn/languages/en/redact.py +1 -0
  358. muninn_ai-0.2.0/src/muninn/languages/en/reflect.py +14 -0
  359. muninn_ai-0.2.0/src/muninn/languages/en/reports.py +47 -0
  360. muninn_ai-0.2.0/src/muninn/languages/en/requests.py +15 -0
  361. muninn_ai-0.2.0/src/muninn/languages/en/review.py +14 -0
  362. muninn_ai-0.2.0/src/muninn/languages/en/schedule.py +6 -0
  363. muninn_ai-0.2.0/src/muninn/languages/en/setup_flow.py +1 -0
  364. muninn_ai-0.2.0/src/muninn/languages/en/sidecar.py +7 -0
  365. muninn_ai-0.2.0/src/muninn/languages/en/speak_up.py +5 -0
  366. muninn_ai-0.2.0/src/muninn/languages/en/task_evidence.py +1 -0
  367. muninn_ai-0.2.0/src/muninn/languages/en/task_models.py +9 -0
  368. muninn_ai-0.2.0/src/muninn/languages/en/tasks.py +21 -0
  369. muninn_ai-0.2.0/src/muninn/languages/en/tools.py +4 -0
  370. muninn_ai-0.2.0/src/muninn/languages/en/tools_alerts.py +6 -0
  371. muninn_ai-0.2.0/src/muninn/languages/en/tools_attribution.py +8 -0
  372. muninn_ai-0.2.0/src/muninn/languages/en/tools_blocks.py +5 -0
  373. muninn_ai-0.2.0/src/muninn/languages/en/tools_conversation.py +28 -0
  374. muninn_ai-0.2.0/src/muninn/languages/en/tools_ideas.py +12 -0
  375. muninn_ai-0.2.0/src/muninn/languages/en/tools_packets.py +5 -0
  376. muninn_ai-0.2.0/src/muninn/languages/en/tools_places.py +9 -0
  377. muninn_ai-0.2.0/src/muninn/languages/en/tools_plan.py +17 -0
  378. muninn_ai-0.2.0/src/muninn/languages/en/tools_records.py +7 -0
  379. muninn_ai-0.2.0/src/muninn/languages/en/tools_tasks.py +8 -0
  380. muninn_ai-0.2.0/src/muninn/languages/en/tools_topics.py +7 -0
  381. muninn_ai-0.2.0/src/muninn/languages/en/topic_memory.py +1 -0
  382. muninn_ai-0.2.0/src/muninn/languages/en/topics.py +7 -0
  383. muninn_ai-0.2.0/src/muninn/languages/en/uploads.py +6 -0
  384. muninn_ai-0.2.0/src/muninn/languages/en/waiting.py +19 -0
  385. muninn_ai-0.2.0/src/muninn/languages/en/web.py +20 -0
  386. muninn_ai-0.2.0/src/muninn/languages/en/window_classify.py +6 -0
  387. muninn_ai-0.2.0/src/muninn/languages/zh_tw/__init__.py +82 -0
  388. muninn_ai-0.2.0/src/muninn/languages/zh_tw/actions.py +77 -0
  389. muninn_ai-0.2.0/src/muninn/languages/zh_tw/alerts.py +1 -0
  390. muninn_ai-0.2.0/src/muninn/languages/zh_tw/answer.py +1 -0
  391. muninn_ai-0.2.0/src/muninn/languages/zh_tw/apply.py +22 -0
  392. muninn_ai-0.2.0/src/muninn/languages/zh_tw/assembly.py +18 -0
  393. muninn_ai-0.2.0/src/muninn/languages/zh_tw/collectors.py +5 -0
  394. muninn_ai-0.2.0/src/muninn/languages/zh_tw/command_trust.py +1 -0
  395. muninn_ai-0.2.0/src/muninn/languages/zh_tw/commands.py +18 -0
  396. muninn_ai-0.2.0/src/muninn/languages/zh_tw/composer.py +4 -0
  397. muninn_ai-0.2.0/src/muninn/languages/zh_tw/config.py +1 -0
  398. muninn_ai-0.2.0/src/muninn/languages/zh_tw/conversation.py +6 -0
  399. muninn_ai-0.2.0/src/muninn/languages/zh_tw/day_view.py +4 -0
  400. muninn_ai-0.2.0/src/muninn/languages/zh_tw/drift.py +20 -0
  401. muninn_ai-0.2.0/src/muninn/languages/zh_tw/engine.py +11 -0
  402. muninn_ai-0.2.0/src/muninn/languages/zh_tw/evals.py +1 -0
  403. muninn_ai-0.2.0/src/muninn/languages/zh_tw/facts.py +17 -0
  404. muninn_ai-0.2.0/src/muninn/languages/zh_tw/handoff_records.py +19 -0
  405. muninn_ai-0.2.0/src/muninn/languages/zh_tw/idea_next.py +7 -0
  406. muninn_ai-0.2.0/src/muninn/languages/zh_tw/ideas.py +28 -0
  407. muninn_ai-0.2.0/src/muninn/languages/zh_tw/lease.py +115 -0
  408. muninn_ai-0.2.0/src/muninn/languages/zh_tw/llm.py +9 -0
  409. muninn_ai-0.2.0/src/muninn/languages/zh_tw/llm_router.py +1 -0
  410. muninn_ai-0.2.0/src/muninn/languages/zh_tw/local_projects.py +10 -0
  411. muninn_ai-0.2.0/src/muninn/languages/zh_tw/mail.py +21 -0
  412. muninn_ai-0.2.0/src/muninn/languages/zh_tw/main.py +32 -0
  413. muninn_ai-0.2.0/src/muninn/languages/zh_tw/models.py +5 -0
  414. muninn_ai-0.2.0/src/muninn/languages/zh_tw/offline_time.py +10 -0
  415. muninn_ai-0.2.0/src/muninn/languages/zh_tw/onboarding.py +7 -0
  416. muninn_ai-0.2.0/src/muninn/languages/zh_tw/open_items.py +1 -0
  417. muninn_ai-0.2.0/src/muninn/languages/zh_tw/owntracks.py +4 -0
  418. muninn_ai-0.2.0/src/muninn/languages/zh_tw/places.py +7 -0
  419. muninn_ai-0.2.0/src/muninn/languages/zh_tw/plan_edits.py +22 -0
  420. muninn_ai-0.2.0/src/muninn/languages/zh_tw/planner.py +11 -0
  421. muninn_ai-0.2.0/src/muninn/languages/zh_tw/plans.py +5 -0
  422. muninn_ai-0.2.0/src/muninn/languages/zh_tw/ports.py +1 -0
  423. muninn_ai-0.2.0/src/muninn/languages/zh_tw/prepare.py +8 -0
  424. muninn_ai-0.2.0/src/muninn/languages/zh_tw/project_messages.py +15 -0
  425. muninn_ai-0.2.0/src/muninn/languages/zh_tw/records.py +5 -0
  426. muninn_ai-0.2.0/src/muninn/languages/zh_tw/redact.py +1 -0
  427. muninn_ai-0.2.0/src/muninn/languages/zh_tw/reflect.py +12 -0
  428. muninn_ai-0.2.0/src/muninn/languages/zh_tw/reports.py +36 -0
  429. muninn_ai-0.2.0/src/muninn/languages/zh_tw/requests.py +15 -0
  430. muninn_ai-0.2.0/src/muninn/languages/zh_tw/review.py +12 -0
  431. muninn_ai-0.2.0/src/muninn/languages/zh_tw/schedule.py +4 -0
  432. muninn_ai-0.2.0/src/muninn/languages/zh_tw/setup_flow.py +1 -0
  433. muninn_ai-0.2.0/src/muninn/languages/zh_tw/sidecar.py +7 -0
  434. muninn_ai-0.2.0/src/muninn/languages/zh_tw/speak_up.py +5 -0
  435. muninn_ai-0.2.0/src/muninn/languages/zh_tw/task_evidence.py +1 -0
  436. muninn_ai-0.2.0/src/muninn/languages/zh_tw/task_models.py +8 -0
  437. muninn_ai-0.2.0/src/muninn/languages/zh_tw/tasks.py +21 -0
  438. muninn_ai-0.2.0/src/muninn/languages/zh_tw/tools.py +4 -0
  439. muninn_ai-0.2.0/src/muninn/languages/zh_tw/tools_alerts.py +6 -0
  440. muninn_ai-0.2.0/src/muninn/languages/zh_tw/tools_attribution.py +8 -0
  441. muninn_ai-0.2.0/src/muninn/languages/zh_tw/tools_blocks.py +5 -0
  442. muninn_ai-0.2.0/src/muninn/languages/zh_tw/tools_conversation.py +28 -0
  443. muninn_ai-0.2.0/src/muninn/languages/zh_tw/tools_ideas.py +12 -0
  444. muninn_ai-0.2.0/src/muninn/languages/zh_tw/tools_packets.py +5 -0
  445. muninn_ai-0.2.0/src/muninn/languages/zh_tw/tools_places.py +9 -0
  446. muninn_ai-0.2.0/src/muninn/languages/zh_tw/tools_plan.py +17 -0
  447. muninn_ai-0.2.0/src/muninn/languages/zh_tw/tools_records.py +7 -0
  448. muninn_ai-0.2.0/src/muninn/languages/zh_tw/tools_tasks.py +8 -0
  449. muninn_ai-0.2.0/src/muninn/languages/zh_tw/tools_topics.py +7 -0
  450. muninn_ai-0.2.0/src/muninn/languages/zh_tw/topic_memory.py +1 -0
  451. muninn_ai-0.2.0/src/muninn/languages/zh_tw/topics.py +7 -0
  452. muninn_ai-0.2.0/src/muninn/languages/zh_tw/uploads.py +6 -0
  453. muninn_ai-0.2.0/src/muninn/languages/zh_tw/waiting.py +19 -0
  454. muninn_ai-0.2.0/src/muninn/languages/zh_tw/web.py +20 -0
  455. muninn_ai-0.2.0/src/muninn/languages/zh_tw/window_classify.py +6 -0
  456. muninn_ai-0.2.0/src/muninn/llm_config.py +261 -0
  457. muninn_ai-0.2.0/src/muninn/main.py +1185 -0
  458. muninn_ai-0.2.0/src/muninn/package.py +19 -0
  459. muninn_ai-0.2.0/src/muninn/setup_flow.py +140 -0
  460. muninn_ai-0.2.0/src/muninn/upgrade.py +152 -0
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,328 @@
1
+ Metadata-Version: 2.4
2
+ Name: muninn-ai
3
+ Version: 0.2.0
4
+ Summary: Always-on personal assistant: observes, plans, nudges
5
+ License-Expression: Apache-2.0
6
+ License-File: LICENSE
7
+ Requires-Dist: anthropic>=2.3.0
8
+ Requires-Dist: httpx>=0.27
9
+ Requires-Dist: jsonschema>=4.26.0
10
+ Requires-Dist: packaging>=24
11
+ Requires-Dist: pypdf>=6.21.1
12
+ Requires-Dist: pywebpush>=2.0
13
+ Requires-Dist: ruamel-yaml>=0.18
14
+ Requires-Dist: segno>=1.6
15
+ Requires-Dist: starlette>=0.40
16
+ Requires-Dist: uvicorn>=0.30
17
+ Requires-Dist: playwright==1.52.0 ; extra == 'autofill'
18
+ Requires-Python: >=3.13
19
+ Provides-Extra: autofill
20
+ Description-Content-Type: text/markdown
21
+
22
+ # Muninn
23
+
24
+ English · [繁體中文](README.zh-TW.md)
25
+
26
+ Always-on personal assistant: collects observations, tracks commitments per
27
+ life domain, detects drift from the plan, and pushes short nudges with concrete
28
+ corrective actions through a self-hosted PWA.
29
+
30
+ Runtime data (plans, observations, keys, state) lives in `data/` and is never
31
+ committed.
32
+
33
+ ## How it works
34
+
35
+ ```
36
+ sources ──► attribution ──► store ──► drift rules ──► composer ──► channel (Web Push)
37
+ (git, Claude Code, (rules, then (deterministic, (dedupe, quiet │
38
+ plans, ingest API) local-model no LLM) hours, priority ▼
39
+ suggestions the quotas) PWA inbox
40
+ user confirms)
41
+ ```
42
+
43
+ - **Domains** are plan files: `data/domains/<id>/plan.yaml` plus a tracker file
44
+ (plan key `tracker`, default `applications.yaml`). Each domain has a
45
+ `priority` (1 is highest) and a `sensitivity_default`.
46
+ - **Commitments** are either *goals* (`metric`, `target`, `period: day|week`,
47
+ `priority`, `if_behind: [...]`) or *deadlines* (`due`, `lead_days`,
48
+ `priority`, `done_when: manual` or `{targets: [...], status_at_least: applied}`).
49
+ Tracker status order: `todo < applied < screening < interview < offer`;
50
+ `rejected` and `withdrawn` are closed. `pivot`, `decision_tree` and `filters`
51
+ are human text shown only in the weekly report.
52
+ - **Metrics** (`src/muninn/core/metrics.py`): `applications_submitted` (tracker
53
+ dates), `hours` (activity spans tagged with the goal, plus manual
54
+ corrections), `late_activity` (minutes of activity after the goal's `cutoff`),
55
+ `sleep_hours` (longest overnight activity gap, until a real sleep source
56
+ exists), `steps` (reported by the phone through the ingest API). A metric
57
+ declares whether it is *at least* / *at most* and whether it accrues
58
+ (judged pro-rata through the period) or is a single reading.
59
+ - **Drift rules** (`core/drift.py`): behind pro-rata, deadline inside
60
+ `lead_days`, overdue next actions, late-night activity, a domain gone quiet.
61
+ - **Who may interrupt**: domains with priority ≤ 3 push; lower ones go to the
62
+ evening summary unless a signal escalates; domains without goals are only
63
+ observed. Each priority tier has its own daily push quota. Quiet hours hold
64
+ pushes back, except signals that prove the user is awake (working past the
65
+ cutoff). The same signal is sent once a day unless it gets worse.
66
+ - **Reports**: 08:30 morning brief, 22:30 evening summary, weekly report; one
67
+ inbox item each, domains in priority order.
68
+ - **Language**: Muninn speaks Traditional Chinese or English (`language: zh-TW | en` in
69
+ config; unset, the machine's locale). The setup screen asks first and the settings page switches it.
70
+ Everything follows it: the screens, what Muninn says, and the language it asks models to write in
71
+ (`muninn/languages/`, `ts/words/`; prompts are in English for both).
72
+ - **Getting things ready** (`core/prepare.py`): for open tracker targets due
73
+ soon, Muninn prepares an application packet (match, gaps, resume version,
74
+ draft answers, first-call questions) from the public posting and the user's
75
+ `documents`. For a posting on Greenhouse (with the `autofill` extra installed) it also fills in the job's application
76
+ form in a headless browser (`core/apply.py`): a model answers each field from the packet, the résumé and what the
77
+ user answered on earlier forms, Muninn asks in the conversation only what the user alone can say, and the filled form
78
+ (each field, and a picture of it) waits for one press to send. Nothing goes out without that press; a CAPTCHA or a
79
+ code sent to the user's mail is left to them. Elsewhere the user applies and taps "submitted". Everything Muninn
80
+ does on its own is listed with an undo.
81
+
82
+ ### Activity sources (metadata only)
83
+
84
+ - **git**: commit time, repo directory name, per-extension file/line counts,
85
+ and whether a `Co-Authored-By` trailer names an AI assistant (those count as
86
+ `agent_commit`, not as hands-on time). No messages, paths or diffs.
87
+ - **Claude Code transcripts**: timestamps, working directory and session id;
88
+ only *attended* activity counts (a human prompt and the 10 minutes after
89
+ it), so an agent running on its own is not the user's time. No message text.
90
+ - **Computer activity** (`src/muninn/contracts/activity.v1.md`): what a collector on a
91
+ computer sends; the Mac collector (`src/muninn/collectors/mac`, installed with
92
+ the line on the settings page) sends ActivityWatch
93
+ window activity while not AFK (Chrome windows overlapping the browser
94
+ extension, installed only in the work profile, carry
95
+ `browser_profile=work`), the laptop's commit metadata, and the work Claude
96
+ transcripts synced for the transcript source.
97
+ - **Reflection** (`core/reflect.py`): conversation text with the assistant
98
+ (the user's messages and the assistant's written replies; never tool
99
+ input/output or hidden reasoning; only sessions the user typed into) is
100
+ digested nightly per session (summary, commitments,
101
+ decisions, themes, mood, friction). The Monday reflection (on the last complete week) counts those in
102
+ code and has a model write a short reflection. Under privacy routing the
103
+ local model does both, and conversation text never goes to a cloud model;
104
+ under `routing: cloud` the cloud model does (see the privacy model below). Projects that keep their own records
105
+ (`external_todos`, `project_states`, `weekly_stats`) are the authority for
106
+ project to-dos and decisions: the reflection keeps to personal commitments,
107
+ mood and friction, cites project decisions from those records, and the
108
+ user's project to-dos are shown, not re-extracted.
109
+ - **Ingest API**: `POST /api/ingest` with `Authorization: Bearer <data/secrets/ingest_token>`
110
+ and `{"observations": [{source, key, ts, kind, payload, domain?, goal?, sensitivity?}]}`.
111
+ External observations default to `sensitive`. New observations are
112
+ evaluated immediately.
113
+ - **Project messages**: `POST /api/messages` (same bearer token) with
114
+ `{"messages": [{id, project, type: question|progress|done, text, handoff_id?}]}`,
115
+ from the system that keeps the project records. `id` is the sender's and
116
+ makes retries safe. A question waits for the user in the panel; the user's
117
+ answer leaves as a handoff to that project with `reply_to` set to the
118
+ question's id. Progress and done go to the inbox; `done` with a
119
+ `handoff_id` marks that handoff done.
120
+ - **Project records** (`src/muninn/contracts/records.v2.md`): the same
121
+ exchange as Principal Handoff 0.4 records, `POST /api/records` in and
122
+ `GET /api/records` out. Muninn is the principal side: only the user settles
123
+ a to-do or a question. A project saying something is done settles nothing by
124
+ itself: the user is asked, unless he gave Muninn a standing permission to
125
+ take a project session's word (undoably); a line gone from a project's state
126
+ file is always asked about. A project that stops listing a to-do leaves it as
127
+ it is.
128
+
129
+ ### Acting on the user's behalf
130
+
131
+ Three tiers: done and undoable (blocks in Muninn's own calendar, status set
132
+ from an application confirmation email, packets prepared); ready for one tap
133
+ (application forms filled in, sent on that tap, and never sent a second time when the site did not say it got
134
+ the first; reply drafts saved to the mailbox, status changes from interview/offer/rejection emails); never (sending mail, answering other people's invites,
135
+ paying). Accounts connect with `muninn connect google|microsoft` or the
136
+ PWA's "連結" buttons: web OAuth clients whose redirect is the PWA's
137
+ `/oauth/<provider>/callback`, checked by a single-use state. Google: Gmail
138
+ read + compose (drafts), Calendar read + events (writes only to the Muninn
139
+ calendar). Microsoft 365 (work): Mail.Read and Calendars.Read only; work
140
+ busy time is merged into scheduling. Personal mail may go to the cloud model
141
+ only with `cloud_mail: true`; work mail is local-only (under privacy routing; see below).
142
+
143
+ ## Privacy model
144
+
145
+ Where models run is one setting, `llm.routing`:
146
+
147
+ - `cloud`: every request goes to the cloud model (the `claude` CLI, or the
148
+ Anthropic API with your own key: see `llm.providers` below), work
149
+ and unattributed material included, and no local model answers, not even
150
+ when the cloud fails (Muninn says so and keeps the sentence as a note): a
151
+ local model takes over a task only once `muninn eval` shows it can. The
152
+ rest of this section then describes what is *kept* locally and labelled,
153
+ not what is withheld from the cloud.
154
+ - `privacy` (the default in config): the rules below decide what may leave.
155
+ It needs a local model for what must stay on the machine, so the setup page
156
+ writes `cloud` when you set up a cloud provider's key, and says so on that
157
+ screen; the settings page always says what goes where.
158
+
159
+ Which models answer is `llm.providers`:
160
+ each provider names its implementation (`claude` for the CLI and its login,
161
+ `anthropic` for the Anthropic API, `openai` for any service with an OpenAI-style
162
+ Chat Completions API at its `base_url`, such as OpenRouter or LM Studio, and
163
+ `ollama`), where its key is (`{secret: <file in the secrets
164
+ directory>}` or `{env: <VARIABLE>}`, never the key itself) and a model per tier.
165
+ One provider may be `location: local` (Ollama's default; its `base_url` must be
166
+ on this machine or network): it is the local model that privacy routing keeps
167
+ sensitive content on. For the cloud providers,
168
+ `llm.use` says which provider serves the `fast` tier (everything but your own
169
+ words) and the `standard` one (routing, facts, answers). A key that is missing
170
+ or rejected is a lapsed login: Muninn says so, and no other model answers in
171
+ its place. A config without `providers` keeps using the CLI as before.
172
+
173
+ To cap what the cloud models cost, set `budget.daily_usd` and give each model
174
+ in use its price (`llm.providers.<name>.prices: {<model>: {input: 3, output:
175
+ 15}}`, US dollars per million tokens). Every reply counts, including the checks
176
+ Muninn runs on its own answers and the `muninn eval` runs you start yourself
177
+ (those run to the end even past the limit). Once a day's calls reach the limit, no
178
+ cloud model is asked until the next day: what you say is kept as a note, other
179
+ work waits, and Muninn tells you once. A model whose replies don't say how many
180
+ tokens they took (the Claude CLI) or that has no price can't be counted, so
181
+ `muninn check` reports it as a problem instead of letting it run past the limit,
182
+ and the commands that ask models don't run until it is fixed.
183
+
184
+ Either way every request and reply is stored on the machine as an
185
+ evaluation case, with the user's corrections (undone actions, cancelled
186
+ handoffs, answers to Muninn's questions, window labels), so `muninn eval
187
+ --backend <provider:model>` can show per task whether another model (a local
188
+ one, a cheaper one) could take over. Before there are any cases, `muninn eval
189
+ --suite` runs a small set of invented ones shipped with Muninn (what a sentence
190
+ asks for, what news settles, whether a sentence is about work) on the models
191
+ the tasks use, or on `--backend`, in each language there are cases for (or
192
+ `--language`), and says per language how often each was right, how many replies
193
+ were off their declared shape, and how many replies to the user were not in that
194
+ language. Claude Sonnet 5.5 and Haiku 5.5
195
+ answer every one of them right.
196
+
197
+ - Unattributed observations, and anything attributed to a domain listed in
198
+ `sensitive_domains`, are **sensitive**. Sensitivity is never lowered.
199
+ - `core/llm_router.py` is the only path to an LLM. Sensitive or unattributed
200
+ content goes to the local Ollama model only; if it is down, the request is
201
+ skipped, never sent to the cloud.
202
+ - The cloud model only ever receives a `CloudSafe` payload built in
203
+ `core/privacy.py` from whitelisted fields (titles, next actions, progress
204
+ numbers), used for the evening summary wording, and — only with
205
+ `cloud_drafts: true` — application packets built from the public posting
206
+ and the user's own documents (never plan notes, pivot, decision tree or
207
+ filters). Goals or deadlines marked `private: true` are left out.
208
+ `tests/test_privacy.py` and `tests/test_prepare.py` prove this.
209
+ - Conversation digests (the local model's per-session summary, themes,
210
+ mood, commitments, decisions and friction) are sensitive like the text
211
+ they come from. They leave Muninn one way only: `muninn digests --week
212
+ YYYY-Www --json`, which the user runs (or schedules) for their own weekly
213
+ reflection elsewhere. It prints the digests' listed fields, never
214
+ conversation text, and withholds every session whose domain is in
215
+ `sensitive_domains` or unknown (by today's attribution of its project, or
216
+ by the digest), giving only their count.
217
+ - Push notifications name the thing ("每週投遞落後:本週 0/4"); payloads are
218
+ encrypted end to end (RFC 8291), so the exposure is the lock screen, which
219
+ the phone's preview setting governs. Sensitive items (work, unattributed)
220
+ only say `"<domain>: N new reminders"`; `push_detail: counts` makes every
221
+ push say only that.
222
+ - The PWA requires a paired device (one-time code from `muninn pair`, then an
223
+ HttpOnly cookie), optionally restricted further to listed Tailscale logins.
224
+
225
+ ## Layout
226
+
227
+ ```
228
+ src/muninn/core/ domain-agnostic logic; depends only on core/ports.py
229
+ src/muninn/adapters/ store (SQLite), plans (YAML), sources, LLM backends,
230
+ Web Push channel, web app + PWA
231
+ src/muninn/adapters/web/ts/ the PWA in TypeScript (strict), compiled into web/static/
232
+ by `npm run build`; the compiled .js is not committed
233
+ src/muninn/main.py composition root and CLI (the only place adapters are chosen)
234
+ src/muninn/contracts/ the interfaces other systems read or post, and the formats Muninn reads
235
+ (schemas, model decision points), shipped inside the package
236
+ examples/ config.yaml and attribution.yaml templates for data/
237
+ ```
238
+
239
+ Storage is a set of small ports in `core/ports.py`, one per kind of record
240
+ (observations, inbox, tasks, handoffs, leases, …). A module takes only the
241
+ ones it uses, so another backend can be written port by port; `Store` is all
242
+ of them together, and only the composition root and the engine take it
243
+ (`tests/test_architecture.py` checks this).
244
+
245
+ Other systems rely on interfaces published in `src/muninn/contracts/`, each with a
246
+ version: `muninn handoffs --json`, `muninn digests --json`, `muninn tasks --json`
247
+ and `POST /api/messages` (v1), the project records (`records.v2.md`, Principal
248
+ Handoff 0.4), the permission requests of a deep talk (v2), what a computer's
249
+ collector sends (`activity.v1.md`) and where the user is (`location.v1.md`).
250
+ Adding a field keeps the version; renaming one or changing its meaning is a
251
+ new version, served alongside the old one until readers move.
252
+ `tests/test_contracts.py` checks the real output against the schemas.
253
+
254
+ ## Installing
255
+
256
+ On macOS or Linux, one line installs Muninn, starts it in the background (it
257
+ runs its own schedule), and opens its setup page: pick a model, paste its key,
258
+ scan the QR code with your phone.
259
+
260
+ ```bash
261
+ curl -fsSL <address of install.sh> | sh
262
+ ```
263
+
264
+ Or, with [uv](https://docs.astral.sh/uv/): `uv tool install muninn-ai`, then
265
+ `muninn init` and `muninn serve`, and open the setup link it prints (the
266
+ package is muninn-ai; the command is `muninn`).
267
+
268
+ To move to a newer release, run `muninn upgrade`: it installs the latest
269
+ stable one, restarts the background service on it and checks that it answers,
270
+ and puts the version before back if it does not (`muninn upgrade --check` only
271
+ says what is installed and what is out). In Docker, pull the new image instead.
272
+
273
+ On a NAS or a server, `docker compose up -d` (see `compose.yaml`); the setup
274
+ link is in `docker compose logs`. Either way your phone reaches Muninn over
275
+ HTTPS: Tailscale (`tailscale serve`) is the shortest way there. `muninn backup
276
+ DIR` copies the database, plans and settings; `muninn check` says what in the
277
+ settings cannot work as written.
278
+
279
+ ## Running from a checkout
280
+
281
+ ```bash
282
+ uv sync # --extra autofill to fill in application forms (then: uv run playwright install chromium)
283
+ npm ci && npm run build # the PWA's TypeScript → web/static/*.js (type-checked)
284
+ uv run pytest
285
+ uv run muninn init # VAPID keys + ingest token in data/secrets/
286
+ uv run muninn --dry-run tick # collect + evaluate, print pushes instead of sending
287
+ uv run muninn morning | evening | weekly
288
+ uv run muninn serve # PWA + API on 127.0.0.1:18795
289
+ uv run muninn pair # one-time pairing code for a new device
290
+ uv run muninn devices [--revoke ID]
291
+ ```
292
+
293
+ `MUNINN_DATA` points at the data directory (default `./data`); copy the files
294
+ in `examples/` there. Every CLI entry point is idempotent. Run this way,
295
+ nothing runs on a schedule unless the config says `jobs: default` (the
296
+ installer and the container write it): `serve` then runs tick, the morning and
297
+ evening reports and the nightly reflection itself.
298
+
299
+ ## Testing
300
+
301
+ ```bash
302
+ uv run pytest -n 4 # unit and API tests, 4 at a time (fast; what a merge runs)
303
+ uv run playwright install webkit chromium # once per machine, for the browser tests (Chromium fills forms)
304
+ uv run pytest -m e2e -n 8 # the PWA in WebKit, as an iPhone and as a laptop, against the real app over HTTPS
305
+ ```
306
+
307
+ The browser tests compile the TypeScript first (`npm run build`), use the unit tests' fake models, clock and invented data,
308
+ block service workers so the shipped static files run, and fail on any page or
309
+ console error. Safe-area insets (the iPhone notch) cannot be emulated, so the
310
+ layout checks are approximate.
311
+
312
+ ## Deploying
313
+
314
+ `bin/deploy.sh` pins the commit it starts from, compiles the TypeScript and
315
+ runs the unit and browser tests (a type error or a failing test stops it with
316
+ nothing changed); where a platform test runner is installed (`agenthub test`),
317
+ it hands that commit to it instead (`MUNINN_TESTS` chooses). The runtime clone (`MUNINN_RUNTIME`, default
318
+ `~/services/muninn`) then takes that commit straight from this checkout, runs
319
+ `uv sync` (with the `autofill` extra, and Chromium for it) and `npm ci && npm run build`, restarts the launchd job and runs
320
+ `bin/smoke.py`: the running server checks its own dependencies on `/api/smoke`
321
+ (store, each cloud model in use, the local model, Google, the session runner, the form-filling browser;
322
+ no model is asked anything) and the served app must be the one in the repo.
323
+ Only then is `main` pushed. A version that fails after the restart is rolled
324
+ back on its own, and the runtime's `data/deploys.log` records every deploy and
325
+ why one was rolled back; the script's header lists its exit codes. One deploy
326
+ runs at a time. The server is
327
+ exposed to the tailnet only, with `tailscale serve --https=8444`. First-time
328
+ setup on the phone: [docs/d1-checklist.md](docs/d1-checklist.md).