levain 0.7.0__tar.gz → 0.7.2__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 (272) hide show
  1. {levain-0.7.0/levain.egg-info → levain-0.7.2}/PKG-INFO +6 -6
  2. {levain-0.7.0 → levain-0.7.2}/README.md +5 -5
  3. {levain-0.7.0 → levain-0.7.2}/levain/__init__.py +1 -1
  4. {levain-0.7.0 → levain-0.7.2}/levain/_tui_curses.py +80 -61
  5. {levain-0.7.0 → levain-0.7.2}/levain/cli.py +13 -40
  6. levain-0.7.2/levain/cockpit/__init__.py +29 -0
  7. levain-0.7.2/levain/cockpit/engine.py +1064 -0
  8. levain-0.7.2/levain/cockpit/external.py +289 -0
  9. levain-0.7.2/levain/cockpit/payload_map.py +173 -0
  10. levain-0.7.2/levain/cockpit/providers.py +488 -0
  11. levain-0.7.2/levain/cockpit/registry.py +269 -0
  12. levain-0.7.2/levain/cockpit/results.py +63 -0
  13. levain-0.7.2/levain/cockpit/routes.py +103 -0
  14. levain-0.7.2/levain/cockpit/text.py +201 -0
  15. {levain-0.7.0 → levain-0.7.2}/levain/dashboard.py +59 -262
  16. {levain-0.7.0 → levain-0.7.2}/levain/firing/confinement.py +132 -2
  17. {levain-0.7.0 → levain-0.7.2}/levain/firing/ws_git.py +45 -12
  18. {levain-0.7.0 → levain-0.7.2}/levain/http_guards.py +10 -3
  19. {levain-0.7.0 → levain-0.7.2}/levain/install.py +319 -30
  20. {levain-0.7.0 → levain-0.7.2}/levain/jobs.py +21 -0
  21. {levain-0.7.0 → levain-0.7.2}/levain/templates/activation/hooks/_levain_hook.py +173 -129
  22. {levain-0.7.0 → levain-0.7.2}/levain/templates/activation/hooks/session_start.py +77 -55
  23. {levain-0.7.0 → levain-0.7.2}/levain/templates/activation/hooks/user_prompt_submit.py +18 -1
  24. {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/codex/activation/hooks/_levain_hook.py +174 -129
  25. {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/codex/activation/hooks/session_start.py +77 -55
  26. {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/codex/activation/hooks/user_prompt_submit.py +18 -1
  27. {levain-0.7.0 → levain-0.7.2}/levain/templates/docs/operator-manual.md +3 -3
  28. levain-0.7.2/levain/templates/web/cockpit_view.js +384 -0
  29. {levain-0.7.0 → levain-0.7.2}/levain/templates/web/dashboard.css +29 -29
  30. {levain-0.7.0 → levain-0.7.2}/levain/templates/web/dashboard.html +2 -2
  31. {levain-0.7.0 → levain-0.7.2}/levain/templates/web/dashboard_boot.js +52 -0
  32. {levain-0.7.0 → levain-0.7.2}/levain/templates/web/dashboard_core.js +125 -98
  33. {levain-0.7.0 → levain-0.7.2}/levain/tui.py +13 -2
  34. {levain-0.7.0 → levain-0.7.2}/levain/web_server.py +73 -0
  35. {levain-0.7.0 → levain-0.7.2}/levain/writes.py +15 -67
  36. {levain-0.7.0 → levain-0.7.2/levain.egg-info}/PKG-INFO +6 -6
  37. {levain-0.7.0 → levain-0.7.2}/levain.egg-info/SOURCES.txt +14 -0
  38. {levain-0.7.0 → levain-0.7.2}/pyproject.toml +1 -1
  39. {levain-0.7.0 → levain-0.7.2}/tests/test_app_server.py +2 -2
  40. levain-0.7.2/tests/test_cockpit_external.py +538 -0
  41. levain-0.7.2/tests/test_cockpit_k1.py +1610 -0
  42. levain-0.7.2/tests/test_cockpit_r1r2.py +684 -0
  43. {levain-0.7.0 → levain-0.7.2}/tests/test_dashboard.py +55 -296
  44. {levain-0.7.0 → levain-0.7.2}/tests/test_firing_confinement.py +78 -0
  45. {levain-0.7.0 → levain-0.7.2}/tests/test_hooks.py +72 -85
  46. {levain-0.7.0 → levain-0.7.2}/tests/test_operator_state.py +47 -9
  47. levain-0.7.2/tests/test_state_line_hook.py +289 -0
  48. {levain-0.7.0 → levain-0.7.2}/tests/test_tui.py +31 -23
  49. {levain-0.7.0 → levain-0.7.2}/tests/test_update_refresh.py +191 -0
  50. {levain-0.7.0 → levain-0.7.2}/tests/test_web_server.py +22 -14
  51. {levain-0.7.0 → levain-0.7.2}/tests/test_writes.py +59 -46
  52. {levain-0.7.0 → levain-0.7.2}/tests/test_ws_git.py +82 -3
  53. {levain-0.7.0 → levain-0.7.2}/LICENSE +0 -0
  54. {levain-0.7.0 → levain-0.7.2}/MANIFEST.in +0 -0
  55. {levain-0.7.0 → levain-0.7.2}/NOTICE +0 -0
  56. {levain-0.7.0 → levain-0.7.2}/levain/__main__.py +0 -0
  57. {levain-0.7.0 → levain-0.7.2}/levain/_browser.py +0 -0
  58. {levain-0.7.0 → levain-0.7.2}/levain/answers.py +0 -0
  59. {levain-0.7.0 → levain-0.7.2}/levain/app_server.py +0 -0
  60. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/__init__.py +0 -0
  61. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/authority.py +0 -0
  62. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/binding.py +0 -0
  63. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/chainpath.py +0 -0
  64. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/compiler.py +0 -0
  65. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/confirm.py +0 -0
  66. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/db.py +0 -0
  67. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/executor.py +0 -0
  68. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/firepath.py +0 -0
  69. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/gate.py +0 -0
  70. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/gates.py +0 -0
  71. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/graduation.py +0 -0
  72. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/journal.py +0 -0
  73. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/kill.py +0 -0
  74. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/liveness.py +0 -0
  75. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/monitor.py +0 -0
  76. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/pending.py +0 -0
  77. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/policy.py +0 -0
  78. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/posture.py +0 -0
  79. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/receipt.py +0 -0
  80. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/risk.py +0 -0
  81. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/store.py +0 -0
  82. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/transport.py +0 -0
  83. {levain-0.7.0 → levain-0.7.2}/levain/autonomic/trust.py +0 -0
  84. {levain-0.7.0 → levain-0.7.2}/levain/chat.py +0 -0
  85. {levain-0.7.0 → levain-0.7.2}/levain/daemon.py +0 -0
  86. {levain-0.7.0 → levain-0.7.2}/levain/docs.py +0 -0
  87. {levain-0.7.0 → levain-0.7.2}/levain/docs_server.py +0 -0
  88. {levain-0.7.0 → levain-0.7.2}/levain/doctor.py +0 -0
  89. {levain-0.7.0 → levain-0.7.2}/levain/firing/__init__.py +0 -0
  90. {levain-0.7.0 → levain-0.7.2}/levain/firing/agent_reply.py +0 -0
  91. {levain-0.7.0 → levain-0.7.2}/levain/firing/anneal.py +0 -0
  92. {levain-0.7.0 → levain-0.7.2}/levain/firing/binding.py +0 -0
  93. {levain-0.7.0 → levain-0.7.2}/levain/firing/contract.py +0 -0
  94. {levain-0.7.0 → levain-0.7.2}/levain/firing/crystallization.py +0 -0
  95. {levain-0.7.0 → levain-0.7.2}/levain/firing/deadline.py +0 -0
  96. {levain-0.7.0 → levain-0.7.2}/levain/firing/drive.py +0 -0
  97. {levain-0.7.0 → levain-0.7.2}/levain/firing/encoding.py +0 -0
  98. {levain-0.7.0 → levain-0.7.2}/levain/firing/gate.py +0 -0
  99. {levain-0.7.0 → levain-0.7.2}/levain/firing/hands.py +0 -0
  100. {levain-0.7.0 → levain-0.7.2}/levain/firing/isolation.py +0 -0
  101. {levain-0.7.0 → levain-0.7.2}/levain/firing/openhands/__init__.py +0 -0
  102. {levain-0.7.0 → levain-0.7.2}/levain/firing/openhands/agent.py +0 -0
  103. {levain-0.7.0 → levain-0.7.2}/levain/firing/openhands/capture.py +0 -0
  104. {levain-0.7.0 → levain-0.7.2}/levain/firing/openhands/condenser.py +0 -0
  105. {levain-0.7.0 → levain-0.7.2}/levain/firing/openhands/entity.py +0 -0
  106. {levain-0.7.0 → levain-0.7.2}/levain/firing/openhands/gate.py +0 -0
  107. {levain-0.7.0 → levain-0.7.2}/levain/firing/openhands/levain_condenser.py +0 -0
  108. {levain-0.7.0 → levain-0.7.2}/levain/firing/openhands/tools.py +0 -0
  109. {levain-0.7.0 → levain-0.7.2}/levain/firing/presence.py +0 -0
  110. {levain-0.7.0 → levain-0.7.2}/levain/firing/seatbelt_guard.py +0 -0
  111. {levain-0.7.0 → levain-0.7.2}/levain/firing/seed.py +0 -0
  112. {levain-0.7.0 → levain-0.7.2}/levain/idempotency.py +0 -0
  113. {levain-0.7.0 → levain-0.7.2}/levain/init_server.py +0 -0
  114. {levain-0.7.0 → levain-0.7.2}/levain/interview.py +0 -0
  115. {levain-0.7.0 → levain-0.7.2}/levain/kernel.py +0 -0
  116. {levain-0.7.0 → levain-0.7.2}/levain/launch.py +0 -0
  117. {levain-0.7.0 → levain-0.7.2}/levain/manifest.py +0 -0
  118. {levain-0.7.0 → levain-0.7.2}/levain/packs.py +0 -0
  119. {levain-0.7.0 → levain-0.7.2}/levain/reconcile.py +0 -0
  120. {levain-0.7.0 → levain-0.7.2}/levain/run.py +0 -0
  121. {levain-0.7.0 → levain-0.7.2}/levain/session.py +0 -0
  122. {levain-0.7.0 → levain-0.7.2}/levain/spores.py +0 -0
  123. {levain-0.7.0 → levain-0.7.2}/levain/team/__init__.py +0 -0
  124. {levain-0.7.0 → levain-0.7.2}/levain/team/canon.py +0 -0
  125. {levain-0.7.0 → levain-0.7.2}/levain/team/cli.py +0 -0
  126. {levain-0.7.0 → levain-0.7.2}/levain/team/entry.py +0 -0
  127. {levain-0.7.0 → levain-0.7.2}/levain/team/export.py +0 -0
  128. {levain-0.7.0 → levain-0.7.2}/levain/team/hook.py +0 -0
  129. {levain-0.7.0 → levain-0.7.2}/levain/team/index.py +0 -0
  130. {levain-0.7.0 → levain-0.7.2}/levain/team/pack.py +0 -0
  131. {levain-0.7.0 → levain-0.7.2}/levain/team/registry.py +0 -0
  132. {levain-0.7.0 → levain-0.7.2}/levain/team/roles.py +0 -0
  133. {levain-0.7.0 → levain-0.7.2}/levain/team/transport.py +0 -0
  134. {levain-0.7.0 → levain-0.7.2}/levain/team/view.py +0 -0
  135. {levain-0.7.0 → levain-0.7.2}/levain/team/wire.py +0 -0
  136. {levain-0.7.0 → levain-0.7.2}/levain/templates/activation/hooks/automemory_mirror.py +0 -0
  137. {levain-0.7.0 → levain-0.7.2}/levain/templates/activation/posture.md +0 -0
  138. {levain-0.7.0 → levain-0.7.2}/levain/templates/activation/recency_directives.md +0 -0
  139. {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/claude-code/CLAUDE.md.template +0 -0
  140. {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/claude-code/README.md +0 -0
  141. {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/claude-code/mcp.template.json +0 -0
  142. {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/claude-code/settings.template.json +0 -0
  143. {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/codex/AGENTS.md.template +0 -0
  144. {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/codex/README.md +0 -0
  145. {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/codex/activation/posture.md +0 -0
  146. {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/codex/activation/recency_directives.md +0 -0
  147. {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/codex/hooks.json.template +0 -0
  148. {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/codex/mcp.template.toml +0 -0
  149. {levain-0.7.0 → levain-0.7.2}/levain/templates/app/dashboard.html +0 -0
  150. {levain-0.7.0 → levain-0.7.2}/levain/templates/pack.toml +0 -0
  151. {levain-0.7.0 → levain-0.7.2}/levain/templates/seed/README.md +0 -0
  152. {levain-0.7.0 → levain-0.7.2}/levain/templates/seed/continuity.md +0 -0
  153. {levain-0.7.0 → levain-0.7.2}/levain/templates/seed/memory.md +0 -0
  154. {levain-0.7.0 → levain-0.7.2}/levain/templates/seed/origin.md +0 -0
  155. {levain-0.7.0 → levain-0.7.2}/levain/templates/seed/partnership.md +0 -0
  156. {levain-0.7.0 → levain-0.7.2}/levain/templates/seed/spore_instructions.md +0 -0
  157. {levain-0.7.0 → levain-0.7.2}/levain/templates/seed/world.md +0 -0
  158. {levain-0.7.0 → levain-0.7.2}/levain/templates/web/dashboard_chat.js +0 -0
  159. {levain-0.7.0 → levain-0.7.2}/levain/templates/web/dashboard_team.js +0 -0
  160. {levain-0.7.0 → levain-0.7.2}/levain/templates/web/docs.css +0 -0
  161. {levain-0.7.0 → levain-0.7.2}/levain/templates/web/docs.html +0 -0
  162. {levain-0.7.0 → levain-0.7.2}/levain/templates/web/docs.js +0 -0
  163. {levain-0.7.0 → levain-0.7.2}/levain/templates/web/init.css +0 -0
  164. {levain-0.7.0 → levain-0.7.2}/levain/templates/web/init.html +0 -0
  165. {levain-0.7.0 → levain-0.7.2}/levain/templates/web/init.js +0 -0
  166. {levain-0.7.0 → levain-0.7.2}/levain/templates/web/markdown.js +0 -0
  167. {levain-0.7.0 → levain-0.7.2}/levain/turn_input.py +0 -0
  168. {levain-0.7.0 → levain-0.7.2}/levain/update.py +0 -0
  169. {levain-0.7.0 → levain-0.7.2}/levain/verify.py +0 -0
  170. {levain-0.7.0 → levain-0.7.2}/levain/wrap.py +0 -0
  171. {levain-0.7.0 → levain-0.7.2}/levain.egg-info/dependency_links.txt +0 -0
  172. {levain-0.7.0 → levain-0.7.2}/levain.egg-info/entry_points.txt +0 -0
  173. {levain-0.7.0 → levain-0.7.2}/levain.egg-info/requires.txt +0 -0
  174. {levain-0.7.0 → levain-0.7.2}/levain.egg-info/top_level.txt +0 -0
  175. {levain-0.7.0 → levain-0.7.2}/setup.cfg +0 -0
  176. {levain-0.7.0 → levain-0.7.2}/tests/test_accrual.py +0 -0
  177. {levain-0.7.0 → levain-0.7.2}/tests/test_actions.py +0 -0
  178. {levain-0.7.0 → levain-0.7.2}/tests/test_adopt_answers.py +0 -0
  179. {levain-0.7.0 → levain-0.7.2}/tests/test_anneal_authority.py +0 -0
  180. {levain-0.7.0 → levain-0.7.2}/tests/test_answers.py +0 -0
  181. {levain-0.7.0 → levain-0.7.2}/tests/test_automemory_mirror.py +0 -0
  182. {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_binding.py +0 -0
  183. {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_binding_integration.py +0 -0
  184. {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_chainpath.py +0 -0
  185. {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_compiler.py +0 -0
  186. {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_db.py +0 -0
  187. {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_firepath.py +0 -0
  188. {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_gate.py +0 -0
  189. {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_graduation.py +0 -0
  190. {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_journal.py +0 -0
  191. {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_journal_wiring.py +0 -0
  192. {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_l3_fixes.py +0 -0
  193. {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_l3_r2_fixes.py +0 -0
  194. {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_leaf.py +0 -0
  195. {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_policy.py +0 -0
  196. {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_rawstore.py +0 -0
  197. {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_slice_3a5.py +0 -0
  198. {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_transport.py +0 -0
  199. {levain-0.7.0 → levain-0.7.2}/tests/test_chat.py +0 -0
  200. {levain-0.7.0 → levain-0.7.2}/tests/test_cli.py +0 -0
  201. {levain-0.7.0 → levain-0.7.2}/tests/test_compat_integration.py +0 -0
  202. {levain-0.7.0 → levain-0.7.2}/tests/test_continuity_import.py +0 -0
  203. {levain-0.7.0 → levain-0.7.2}/tests/test_daemon.py +0 -0
  204. {levain-0.7.0 → levain-0.7.2}/tests/test_docs.py +0 -0
  205. {levain-0.7.0 → levain-0.7.2}/tests/test_docs_server.py +0 -0
  206. {levain-0.7.0 → levain-0.7.2}/tests/test_doctor_content.py +0 -0
  207. {levain-0.7.0 → levain-0.7.2}/tests/test_firing_anneal.py +0 -0
  208. {levain-0.7.0 → levain-0.7.2}/tests/test_firing_capture.py +0 -0
  209. {levain-0.7.0 → levain-0.7.2}/tests/test_firing_condenser.py +0 -0
  210. {levain-0.7.0 → levain-0.7.2}/tests/test_firing_contract.py +0 -0
  211. {levain-0.7.0 → levain-0.7.2}/tests/test_firing_crystallization.py +0 -0
  212. {levain-0.7.0 → levain-0.7.2}/tests/test_firing_deadline.py +0 -0
  213. {levain-0.7.0 → levain-0.7.2}/tests/test_firing_drive.py +0 -0
  214. {levain-0.7.0 → levain-0.7.2}/tests/test_firing_encoding.py +0 -0
  215. {levain-0.7.0 → levain-0.7.2}/tests/test_firing_entity.py +0 -0
  216. {levain-0.7.0 → levain-0.7.2}/tests/test_firing_gate.py +0 -0
  217. {levain-0.7.0 → levain-0.7.2}/tests/test_firing_gate_openhands.py +0 -0
  218. {levain-0.7.0 → levain-0.7.2}/tests/test_firing_isolation.py +0 -0
  219. {levain-0.7.0 → levain-0.7.2}/tests/test_firing_seed.py +0 -0
  220. {levain-0.7.0 → levain-0.7.2}/tests/test_firing_tools.py +0 -0
  221. {levain-0.7.0 → levain-0.7.2}/tests/test_floor_autonomic_store.py +0 -0
  222. {levain-0.7.0 → levain-0.7.2}/tests/test_floor_cloud_creds.py +0 -0
  223. {levain-0.7.0 → levain-0.7.2}/tests/test_floor_process_view.py +0 -0
  224. {levain-0.7.0 → levain-0.7.2}/tests/test_floor_project_memory.py +0 -0
  225. {levain-0.7.0 → levain-0.7.2}/tests/test_floor_spellings.py +0 -0
  226. {levain-0.7.0 → levain-0.7.2}/tests/test_hands_files.py +0 -0
  227. {levain-0.7.0 → levain-0.7.2}/tests/test_hands_isolation.py +0 -0
  228. {levain-0.7.0 → levain-0.7.2}/tests/test_hands_spawn.py +0 -0
  229. {levain-0.7.0 → levain-0.7.2}/tests/test_hook_freshness_receipt_status.py +0 -0
  230. {levain-0.7.0 → levain-0.7.2}/tests/test_http_guards.py +0 -0
  231. {levain-0.7.0 → levain-0.7.2}/tests/test_idempotency.py +0 -0
  232. {levain-0.7.0 → levain-0.7.2}/tests/test_init_answers.py +0 -0
  233. {levain-0.7.0 → levain-0.7.2}/tests/test_init_server.py +0 -0
  234. {levain-0.7.0 → levain-0.7.2}/tests/test_install.py +0 -0
  235. {levain-0.7.0 → levain-0.7.2}/tests/test_interview.py +0 -0
  236. {levain-0.7.0 → levain-0.7.2}/tests/test_jewel_recheck.py +0 -0
  237. {levain-0.7.0 → levain-0.7.2}/tests/test_jobs.py +0 -0
  238. {levain-0.7.0 → levain-0.7.2}/tests/test_kernel.py +0 -0
  239. {levain-0.7.0 → levain-0.7.2}/tests/test_l3_16dcb7ee_fixes.py +0 -0
  240. {levain-0.7.0 → levain-0.7.2}/tests/test_launch.py +0 -0
  241. {levain-0.7.0 → levain-0.7.2}/tests/test_levain_condenser.py +0 -0
  242. {levain-0.7.0 → levain-0.7.2}/tests/test_levain_presence.py +0 -0
  243. {levain-0.7.0 → levain-0.7.2}/tests/test_manifest.py +0 -0
  244. {levain-0.7.0 → levain-0.7.2}/tests/test_markdown_parity.py +0 -0
  245. {levain-0.7.0 → levain-0.7.2}/tests/test_masks_last.py +0 -0
  246. {levain-0.7.0 → levain-0.7.2}/tests/test_nlink_floor.py +0 -0
  247. {levain-0.7.0 → levain-0.7.2}/tests/test_openhands_adapter.py +0 -0
  248. {levain-0.7.0 → levain-0.7.2}/tests/test_packs.py +0 -0
  249. {levain-0.7.0 → levain-0.7.2}/tests/test_receipt_and_upgrade_exit.py +0 -0
  250. {levain-0.7.0 → levain-0.7.2}/tests/test_reconcile.py +0 -0
  251. {levain-0.7.0 → levain-0.7.2}/tests/test_run.py +0 -0
  252. {levain-0.7.0 → levain-0.7.2}/tests/test_run_self_consolidate.py +0 -0
  253. {levain-0.7.0 → levain-0.7.2}/tests/test_seat_consolidate_surface.py +0 -0
  254. {levain-0.7.0 → levain-0.7.2}/tests/test_seatbelt_guard.py +0 -0
  255. {levain-0.7.0 → levain-0.7.2}/tests/test_seed_refresh.py +0 -0
  256. {levain-0.7.0 → levain-0.7.2}/tests/test_session.py +0 -0
  257. {levain-0.7.0 → levain-0.7.2}/tests/test_shell_oob_status.py +0 -0
  258. {levain-0.7.0 → levain-0.7.2}/tests/test_spore866_install_path_escaping.py +0 -0
  259. {levain-0.7.0 → levain-0.7.2}/tests/test_spores.py +0 -0
  260. {levain-0.7.0 → levain-0.7.2}/tests/test_starter_jar.py +0 -0
  261. {levain-0.7.0 → levain-0.7.2}/tests/test_team_git.py +0 -0
  262. {levain-0.7.0 → levain-0.7.2}/tests/test_team_golden.py +0 -0
  263. {levain-0.7.0 → levain-0.7.2}/tests/test_team_registry.py +0 -0
  264. {levain-0.7.0 → levain-0.7.2}/tests/test_team_unit.py +0 -0
  265. {levain-0.7.0 → levain-0.7.2}/tests/test_team_view.py +0 -0
  266. {levain-0.7.0 → levain-0.7.2}/tests/test_turn_input.py +0 -0
  267. {levain-0.7.0 → levain-0.7.2}/tests/test_two_sessions.py +0 -0
  268. {levain-0.7.0 → levain-0.7.2}/tests/test_unreadable_tool_call.py +0 -0
  269. {levain-0.7.0 → levain-0.7.2}/tests/test_update.py +0 -0
  270. {levain-0.7.0 → levain-0.7.2}/tests/test_web_chat_panel.py +0 -0
  271. {levain-0.7.0 → levain-0.7.2}/tests/test_wrap.py +0 -0
  272. {levain-0.7.0 → levain-0.7.2}/tests/test_wrap_unattended.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: levain
3
- Version: 0.7.0
3
+ Version: 0.7.2
4
4
  Summary: A portable cognitive-partnership memory + methodology kit. Ship the seed that grows a practice, not the practice.
5
5
  Author: Phill Clapham
6
6
  License-Expression: Apache-2.0
@@ -307,12 +307,12 @@ levain serve --path ./ada --chat ./ada # the cockpit on ada's memory,
307
307
 
308
308
  **`levain tui`** is the terminal-native peer of `serve`: read and steer without a browser or a port. `--read-only` drops to a pure inspection view.
309
309
 
310
- **`levain focus`** sets the one line your sessions read to orient: *what you're working on right now*. It travels across sessions like the rest of your memory.
310
+ **`levain state`** sets one freeform line in your own words about how things are right now. Every session reads it at start and again when it changes, and the cockpit shows it verbatim with its age. It is never parsed or scored, and it expires after 12 hours.
311
311
 
312
312
  ```
313
- levain focus "shipping the v2 onboarding flow" # set it
314
- levain focus # show it + how fresh it is
315
- levain focus --clear # unset it
313
+ levain state "wiped, keep it light" # set it
314
+ levain state # show it + how old it is
315
+ levain state --clear # remove it
316
316
  ```
317
317
 
318
318
  Two of those write targets are your own inbox into the partnership. Dump anything mid-stream (a thought, a handoff, something to pick up next time) and it surfaces at the start of your next session, then resolves. Keep durable reference you want your partner to recall when it's relevant. You dump freely; the kit sorts.
@@ -340,7 +340,7 @@ The sovereign entity (`levain run`) gets two hands: a file editor and a bash she
340
340
 
341
341
  Levain **fails closed**: with no sandbox it drops bash and runs with the file editor alone, rather than handing an entity an unconfined shell. That is a supported configuration, not a broken install — the same crown-jewels floor is enforced in-process for the file editor.
342
342
 
343
- **On Linux, bash runs without IP network by default.** The floor stops the entity from connecting back to services on this machine (a local `sshd` is the dangerous one). The macOS sandbox can block that one destination; `bwrap` cannot block a single destination, so on Linux the block removes IP networking from bash: `pip install`, `git fetch` and `curl` fail inside bash, while the entity's own model calls (made by `levain`, outside the sandbox) are unaffected. Bash keeps its own isolated loopback. Not blocked: a unix socket at a file path the floor does not deny (an ssh ControlMaster or a proxy socket in `/tmp`, D-Bus, X11) can still reach this host's services and so bypass the block, and inside a VM so can AF_VSOCK. One of those services is the host's DNS resolver: through D-Bus, `systemd-resolved` looks up whatever name bash asks for on the network, so a lookup can carry data out. That is an open item, and it closes before Levain 2.0. Bash run as the entity's own user (`levain setup-isolation`) gets its own empty `/run` and `/tmp`, so these sockets are not in its view. Set `"allow_localhost_outbound": true` in the entity's `.levain/confinement.json` to give bash the network back, which accepts that exposure. `levain run` and `levain doctor` both say which one is in force.
343
+ **On Linux, bash runs without IP network by default.** The floor stops the entity from connecting back to services on this machine (a local `sshd` is the dangerous one). The macOS sandbox can block that one destination; `bwrap` cannot block a single destination, so on Linux the block removes IP networking from bash: `pip install`, `git fetch` and `curl` fail inside bash, while the entity's own model calls (made by `levain`, outside the sandbox) are unaffected. Bash keeps its own isolated loopback. The host daemons that would make a network request for bash are hidden from it: the system D-Bus (and with it `systemd-resolved` and avahi), resolved's varlink socket, nscd, snapd, tailscaled and your gnupg `dirmngr`, so bash cannot have them look up or fetch a name for it (a daemon whose directory did not exist when bash started, and the snapd and dirmngr sockets if their daemon recreates them during the session, are in view again from then on). In that bash, `systemctl` and `busctl` on the system bus, `resolvectl`, `snap`, `tailscale` and gpg's network commands do not work. Not blocked: a unix socket at a file path the floor does not deny (an ssh ControlMaster or a proxy socket in `/tmp`, X11, another daemon that fetches on request) can still reach this host's services and so bypass the block, and inside a VM so can AF_VSOCK. Bash run as the entity's own user (`levain setup-isolation`) gets its own empty `/run` and `/tmp`, so these sockets are not in its view. Set `"allow_localhost_outbound": true` in the entity's `.levain/confinement.json` to give bash the network back, which accepts that exposure. `levain run` and `levain doctor` both say which one is in force.
344
344
 
345
345
  Three more Linux specifics. Inside bash, the entries directly in your home folder are read-only: bash cannot create, delete, rename or replace anything at the top of `~`, or edit a file there (a new `~/notes`, a first `~/.npm`, an edit to `~/.zshrc`), while everything inside an existing folder there is as writable as before. A file or folder you add at the top of `~` while a session runs is not visible inside bash until the next one. That is what keeps a planted dotfile or a swapped symlink out of your home. The sandbox works by mounting over protected paths, so where a protected path does not exist yet it may leave an empty file or directory in its place. A symlink directly in your home (a dotfile manager's `~/.ssh` or `~/.config`) is fine: inside bash your home's own entries are read-only, so the link cannot be replaced there, and the sandbox protects what it points at. A symlink further down that you could replace (`~/.config/gh` as a link inside a real `~/.config`) keeps bash off, because a mount cannot pin a symlink. Use the real directory there instead.
346
346
 
@@ -272,12 +272,12 @@ levain serve --path ./ada --chat ./ada # the cockpit on ada's memory,
272
272
 
273
273
  **`levain tui`** is the terminal-native peer of `serve`: read and steer without a browser or a port. `--read-only` drops to a pure inspection view.
274
274
 
275
- **`levain focus`** sets the one line your sessions read to orient: *what you're working on right now*. It travels across sessions like the rest of your memory.
275
+ **`levain state`** sets one freeform line in your own words about how things are right now. Every session reads it at start and again when it changes, and the cockpit shows it verbatim with its age. It is never parsed or scored, and it expires after 12 hours.
276
276
 
277
277
  ```
278
- levain focus "shipping the v2 onboarding flow" # set it
279
- levain focus # show it + how fresh it is
280
- levain focus --clear # unset it
278
+ levain state "wiped, keep it light" # set it
279
+ levain state # show it + how old it is
280
+ levain state --clear # remove it
281
281
  ```
282
282
 
283
283
  Two of those write targets are your own inbox into the partnership. Dump anything mid-stream (a thought, a handoff, something to pick up next time) and it surfaces at the start of your next session, then resolves. Keep durable reference you want your partner to recall when it's relevant. You dump freely; the kit sorts.
@@ -305,7 +305,7 @@ The sovereign entity (`levain run`) gets two hands: a file editor and a bash she
305
305
 
306
306
  Levain **fails closed**: with no sandbox it drops bash and runs with the file editor alone, rather than handing an entity an unconfined shell. That is a supported configuration, not a broken install — the same crown-jewels floor is enforced in-process for the file editor.
307
307
 
308
- **On Linux, bash runs without IP network by default.** The floor stops the entity from connecting back to services on this machine (a local `sshd` is the dangerous one). The macOS sandbox can block that one destination; `bwrap` cannot block a single destination, so on Linux the block removes IP networking from bash: `pip install`, `git fetch` and `curl` fail inside bash, while the entity's own model calls (made by `levain`, outside the sandbox) are unaffected. Bash keeps its own isolated loopback. Not blocked: a unix socket at a file path the floor does not deny (an ssh ControlMaster or a proxy socket in `/tmp`, D-Bus, X11) can still reach this host's services and so bypass the block, and inside a VM so can AF_VSOCK. One of those services is the host's DNS resolver: through D-Bus, `systemd-resolved` looks up whatever name bash asks for on the network, so a lookup can carry data out. That is an open item, and it closes before Levain 2.0. Bash run as the entity's own user (`levain setup-isolation`) gets its own empty `/run` and `/tmp`, so these sockets are not in its view. Set `"allow_localhost_outbound": true` in the entity's `.levain/confinement.json` to give bash the network back, which accepts that exposure. `levain run` and `levain doctor` both say which one is in force.
308
+ **On Linux, bash runs without IP network by default.** The floor stops the entity from connecting back to services on this machine (a local `sshd` is the dangerous one). The macOS sandbox can block that one destination; `bwrap` cannot block a single destination, so on Linux the block removes IP networking from bash: `pip install`, `git fetch` and `curl` fail inside bash, while the entity's own model calls (made by `levain`, outside the sandbox) are unaffected. Bash keeps its own isolated loopback. The host daemons that would make a network request for bash are hidden from it: the system D-Bus (and with it `systemd-resolved` and avahi), resolved's varlink socket, nscd, snapd, tailscaled and your gnupg `dirmngr`, so bash cannot have them look up or fetch a name for it (a daemon whose directory did not exist when bash started, and the snapd and dirmngr sockets if their daemon recreates them during the session, are in view again from then on). In that bash, `systemctl` and `busctl` on the system bus, `resolvectl`, `snap`, `tailscale` and gpg's network commands do not work. Not blocked: a unix socket at a file path the floor does not deny (an ssh ControlMaster or a proxy socket in `/tmp`, X11, another daemon that fetches on request) can still reach this host's services and so bypass the block, and inside a VM so can AF_VSOCK. Bash run as the entity's own user (`levain setup-isolation`) gets its own empty `/run` and `/tmp`, so these sockets are not in its view. Set `"allow_localhost_outbound": true` in the entity's `.levain/confinement.json` to give bash the network back, which accepts that exposure. `levain run` and `levain doctor` both say which one is in force.
309
309
 
310
310
  Three more Linux specifics. Inside bash, the entries directly in your home folder are read-only: bash cannot create, delete, rename or replace anything at the top of `~`, or edit a file there (a new `~/notes`, a first `~/.npm`, an edit to `~/.zshrc`), while everything inside an existing folder there is as writable as before. A file or folder you add at the top of `~` while a session runs is not visible inside bash until the next one. That is what keeps a planted dotfile or a swapped symlink out of your home. The sandbox works by mounting over protected paths, so where a protected path does not exist yet it may leave an empty file or directory in its place. A symlink directly in your home (a dotfile manager's `~/.ssh` or `~/.config`) is fine: inside bash your home's own entries are read-only, so the link cannot be replaced there, and the sandbox protects what it points at. A symlink further down that you could replace (`~/.config/gh` as a link inside a real `~/.config`) keeps bash off, because a mount cannot pin a symlink. Use the real directory there instead.
311
311
 
@@ -1,3 +1,3 @@
1
1
  """Levain — a portable cognitive-partnership memory + methodology kit."""
2
2
 
3
- __version__ = "0.7.0"
3
+ __version__ = "0.7.2"
@@ -33,6 +33,7 @@ import subprocess
33
33
  import tempfile
34
34
  from dataclasses import replace
35
35
 
36
+ from levain.cockpit.engine import Cockpit
36
37
  from levain.dashboard import CLASS_A, CLASS_B, CLASS_C, SubstrateSource, SubstrateView
37
38
  from levain.tui import (
38
39
  ZONES,
@@ -75,6 +76,7 @@ def main_loop(
75
76
  view: SubstrateView,
76
77
  *,
77
78
  read_only: bool = False,
79
+ cockpit: "Cockpit | None" = None,
78
80
  ) -> int:
79
81
  """Run the curses event loop under ``curses.wrapper`` (which guarantees the
80
82
  terminal is restored on any exit). The first view is built by the caller,
@@ -83,10 +85,70 @@ def main_loop(
83
85
  The write target is ``source.write_scope`` (the explicit governed write surface).
84
86
  ``read_only`` forces the inspect-only variant; a source with ``write_scope is None``
85
87
  is read-only too. Either way ``_active_verbs`` advertises + dispatches nothing and
86
- ``_apply`` refuses (the un-bypassable chokepoint) — a pure inspection surface."""
88
+ ``_apply`` refuses (the un-bypassable chokepoint) — a pure inspection surface.
89
+
90
+ ``cockpit`` (R2) renders the shared cockpit MANIFEST instead of the substrate view: the
91
+ kernel's panels, order and groups, read-only (verbs are K2a/K2b)."""
92
+ if cockpit is not None:
93
+ return curses.wrapper(_manifest_loop, cockpit)
87
94
  return curses.wrapper(_loop, source, view, read_only)
88
95
 
89
96
 
97
+ _MANIFEST_ATTRS = {
98
+ "head": lambda c: c.A_BOLD, "panel": lambda c: c.A_BOLD | c.A_UNDERLINE, "group": lambda c: c.A_BOLD,
99
+ "row": lambda c: c.A_NORMAL, "note": lambda c: c.A_DIM, "dim": lambda c: c.A_DIM,
100
+ "error": lambda c: c.A_REVERSE | c.A_BOLD, "stale": lambda c: c.A_STANDOUT, "partial": lambda c: c.A_STANDOUT,
101
+ }
102
+
103
+
104
+ def _manifest_loop(stdscr: "curses.window", cockpit: "Cockpit") -> int:
105
+ """The manifest viewer: j/k/arrows/PgUp/PgDn scroll, r re-reads now, q quits. It re-reads every
106
+ couple of seconds (a getch timeout) so a status change shows without a keypress; scrolling only
107
+ re-slices the lines already read. A read that raises keeps the last good lines under a banner."""
108
+ from levain.cockpit.text import render_lines, snapshot, visible
109
+
110
+ curses.curs_set(0)
111
+ stdscr.keypad(True)
112
+ stdscr.timeout(2000)
113
+ top = 0
114
+ lines: list[tuple[str, str]] = []
115
+ banner = ""
116
+ reread = True
117
+ while True:
118
+ h, w = stdscr.getmaxyx()
119
+ if reread:
120
+ try:
121
+ lines = render_lines(snapshot(cockpit), max(20, w - 1))
122
+ banner = ""
123
+ except Exception as exc: # noqa: BLE001 - keep the last good screen, say the read failed
124
+ banner = visible(f"READ FAILED: {type(exc).__name__}: {exc}")
125
+ reread = False
126
+ body = max(1, h - 2)
127
+ top = max(0, min(top, max(0, len(lines) - body)))
128
+ stdscr.erase()
129
+ for i, (style, text) in enumerate(lines[top:top + body]):
130
+ _safe_addstr(stdscr, i, 0, text, _MANIFEST_ATTRS.get(style, lambda c: c.A_NORMAL)(curses))
131
+ foot = banner or "j/k scroll · PgUp/PgDn · r refresh · q quit (read-only manifest view)"
132
+ _safe_addstr(stdscr, h - 1, 0, foot[: w - 1], curses.A_REVERSE if banner else curses.A_DIM)
133
+ stdscr.refresh()
134
+ ch = stdscr.getch()
135
+ if ch in (ord("q"), 27):
136
+ return 0
137
+ if ch in (-1, ord("r")):
138
+ reread = True
139
+ elif ch == curses.KEY_RESIZE:
140
+ curses.update_lines_cols()
141
+ reread = True
142
+ elif ch in (ord("j"), curses.KEY_DOWN):
143
+ top += 1
144
+ elif ch in (ord("k"), curses.KEY_UP):
145
+ top -= 1
146
+ elif ch == curses.KEY_NPAGE:
147
+ top += body
148
+ elif ch == curses.KEY_PPAGE:
149
+ top -= body
150
+
151
+
90
152
  def _loop(
91
153
  stdscr: "curses.window", source: SubstrateSource,
92
154
  view: SubstrateView, read_only: bool = False,
@@ -144,10 +206,6 @@ def _loop(
144
206
  model = move_in_panel(model, +10_000)
145
207
  elif ch == ord("r"):
146
208
  model = _rebuild(model, source, "refreshed")
147
- elif ch == ord("f") and not model.read_only:
148
- # Global write: set/edit the masthead focus (not a row-scoped verb — focus
149
- # isn't a selectable panel). Read-only cockpit → 'f' falls through to a no-op.
150
- model = _edit_focus(stdscr, model, source)
151
209
  elif ch == ord("S") and not model.read_only:
152
210
  # Global write: set/edit the freeform state line (shift-S: lowercase s is a verb key).
153
211
  model = _edit_state(stdscr, model, source)
@@ -224,9 +282,10 @@ def _rebuild(model: TuiModel, source: SubstrateSource, status: str) -> TuiModel:
224
282
  def _edit_state(
225
283
  stdscr: "curses.window", model: TuiModel, source: SubstrateSource,
226
284
  ) -> TuiModel:
227
- """Set / edit the operator's freeform state line ('S'): the twin of ``_edit_focus``
228
- (same ``$EDITOR`` idiom, an empty buffer clears, same governed ``apply_edit`` seam,
229
- ``kind='operator_state'``). The text is the operator's own words, stored verbatim."""
285
+ """Set / edit the operator's freeform state line ('S'): a GLOBAL write, not a
286
+ row-scoped verb (the line isn't a selectable panel). Opens ``$EDITOR`` seeded with the
287
+ current line; an empty buffer clears it; routed through the governed ``apply_edit``
288
+ seam (``kind='operator_state'``). The text is the operator's own words, stored verbatim."""
230
289
  view = model.view
231
290
  state = getattr(view, "state", None) if view is not None else None
232
291
  current = state.text if (state is not None and state.text) else ""
@@ -638,29 +697,6 @@ def _edit_via_editor(stdscr: "curses.window", initial_text: str) -> str | None:
638
697
  pass
639
698
 
640
699
 
641
- def _edit_focus(
642
- stdscr: "curses.window", model: TuiModel, source: SubstrateSource,
643
- ) -> TuiModel:
644
- """Set / edit the operator's live focus — the masthead 'what I'm on now'. A GLOBAL
645
- write ('f'), NOT a row-scoped verb: focus isn't a selectable panel, so it can't ride
646
- ``_active_verbs``. Opens ``$EDITOR`` seeded with the current focus (the TUI's edit
647
- idiom); an empty buffer CLEARS it (distinct from an editor crash → ``None`` → no-op).
648
- Live-state, last-writer-wins — routed through the same governed ``apply_edit`` seam
649
- (``kind='focus'``) every write funnels through. The 'f' keybind is gated on
650
- ``not model.read_only``; ``_apply`` is the un-bypassable read-only backstop."""
651
- view = model.view
652
- focus = getattr(view, "focus", None) if view is not None else None
653
- current = focus.text if (focus is not None and focus.text) else ""
654
- edited = _edit_via_editor(stdscr, current)
655
- if edited is None:
656
- return replace(model, status="⚠ focus unchanged — $EDITOR is missing or exited non-zero")
657
- new = " ".join(edited.split()) # single line (write_focus collapses on write too)
658
- if new == current:
659
- return replace(model, status="focus — no change")
660
- ok = "focus cleared" if new == "" else "focus set"
661
- return _apply(model, source, {"kind": "focus", "text": new, "source": "tui"}, ok)
662
-
663
-
664
700
  # ---------------------------------------------------------------------------
665
701
  # Painting.
666
702
  # ---------------------------------------------------------------------------
@@ -688,8 +724,8 @@ def _safe_addstr(stdscr: "curses.window", y: int, x: int, text: str, attr: int =
688
724
  s = text[:avail]
689
725
  try:
690
726
  stdscr.addstr(y, x, s, attr)
691
- except curses.error:
692
- pass # last-cell write; harmless
727
+ except (curses.error, UnicodeError):
728
+ pass # last-cell write, or a string the terminal encoding cannot carry; harmless
693
729
 
694
730
 
695
731
  def _paint(stdscr: "curses.window", model: TuiModel) -> TuiModel:
@@ -716,35 +752,19 @@ def _paint(stdscr: "curses.window", model: TuiModel) -> TuiModel:
716
752
  attr = curses.A_REVERSE if i == model.zone_idx else curses.A_NORMAL
717
753
  _safe_addstr(stdscr, 1, x, tab, attr)
718
754
  x += len(tab) + 1
719
- # Rule row (row 2) — overlay the operator's live focus on the separator: their
720
- # OWN declared frame (pure-echo), freshness-tagged. NO-THEATER: a stale focus
721
- # dims + carries a "?" re-confirm nudge; no live-context source → a plain rule.
755
+ # Rule row (row 2): the operator's state line rides the separator, verbatim with its
756
+ # age. An expired line is already dropped by the reader; no live-context source → a
757
+ # plain rule.
722
758
  _safe_addstr(stdscr, 2, 0, "─" * w, curses.A_DIM)
723
- focus = view.focus
724
- if focus is not None and w > 12:
725
- if focus.text and focus.freshness == "unknown":
726
- # age can't be established — say so, dimmed (unknown ≠ fresh).
727
- tag = f" ⊙ {focus.text} · age unknown "
728
- f_attr = curses.A_DIM
729
- elif focus.text:
730
- age = focus.age_label.replace("set ", "") if focus.age_label else ""
731
- suffix = f" · {age}{' ?' if focus.stale else ''}" if age else ""
732
- tag = f" ⊙ {focus.text}{suffix} "
733
- f_attr = curses.A_DIM if focus.stale else curses.A_NORMAL
734
- else:
735
- tag = " ⊙ no focus set "
736
- f_attr = curses.A_DIM
737
- st = view.state
759
+ st = view.state
760
+ if st is not None and w > 12:
738
761
  avail = max(w - 4, 0)
739
- if st is not None and st.text:
740
- # State gets its own width budget (up to a third of the row) so a long focus
741
- # can never clip it away entirely; each part truncates within its own share.
742
- st_tag = f"· {st.text} · {st.age_label.replace('set ', '')} "
743
- st_w = min(len(st_tag), max(avail // 3, avail - len(tag)))
744
- _safe_addstr(stdscr, 2, 2, tag[: max(avail - st_w, 0)], f_attr)
745
- _safe_addstr(stdscr, 2, 2 + min(len(tag), max(avail - st_w, 0)), st_tag[:st_w])
762
+ if st.text:
763
+ age = st.age_label.replace("set ", "")
764
+ tag = f" ⊙ {st.text} · {age} " if age else f" ⊙ {st.text} "
765
+ _safe_addstr(stdscr, 2, 2, tag[:avail])
746
766
  else:
747
- _safe_addstr(stdscr, 2, 2, tag[:avail], f_attr)
767
+ _safe_addstr(stdscr, 2, 2, " ⊙ no state set "[:avail], curses.A_DIM)
748
768
 
749
769
  left_w = min(_LEFT_W, w // 3)
750
770
  body_top, body_bottom = 3, h - 3 # inclusive rows for the body
@@ -840,8 +860,7 @@ _HELP_LINES = [
840
860
  " j / k move (select item in a list panel, else scroll)",
841
861
  " PgDn / PgUp page · g / G first / last (or top / bottom)",
842
862
  " r refresh (rebuild the substrate view)",
843
- " f set / edit your focus — 'what I'm on now' (writable cockpit)",
844
- " S set / edit your state — how you are, in your words (expires in 8 h)",
863
+ " S set / edit your state — what's going on, in your words (expires in 12 h)",
845
864
  " q / Esc quit · ? this help (any key dismisses)",
846
865
  "",
847
866
  " verbs (only where the SELECTED panel + row affords them)",
@@ -297,46 +297,27 @@ def main(argv: list[str] | None = None) -> int:
297
297
  "(the mode a cockpit over a store with no governed write target uses)."
298
298
  ),
299
299
  )
300
- tui_p.set_defaults(func=_cmd_tui)
301
-
302
- focus_p = subparsers.add_parser(
303
- "focus",
304
- help="Set / show the operator's live focus — what you're working on now.",
305
- description=(
306
- "The operator's live, self-authored attention context — 'what I'm on "
307
- "right now' — that every session reads to orient (it travels across "
308
- "sessions, like the rest of the substrate). With TEXT, sets it; with no "
309
- "argument, shows the current focus + its freshness; --clear unsets it. "
310
- "Stored in the install's .levain/context.json and read into the "
311
- "dashboard / TUI / web cockpit. (A sensor app may write the same "
312
- "three-key contract into its own context file instead.)"
300
+ tui_p.add_argument(
301
+ "--manifest",
302
+ action="store_true",
303
+ help=(
304
+ "Render the shared cockpit manifest (the kernel's panels, order and groups) "
305
+ "instead of the substrate view. Read-only."
313
306
  ),
314
307
  )
315
- focus_p.add_argument(
316
- "text", nargs="?", default=None,
317
- help="The focus to set (omit to show the current one).",
318
- )
319
- focus_p.add_argument(
320
- "--path", type=Path, default=Path.cwd(),
321
- help="Install directory (default: cwd).",
322
- )
323
- focus_p.add_argument("--clear", action="store_true", help="Unset the focus.")
324
- focus_p.add_argument(
325
- "--source", default="cli",
326
- help="Provenance tag for who set it (default: cli).",
327
- )
328
- focus_p.set_defaults(func=_cmd_focus)
308
+ tui_p.set_defaults(func=_cmd_tui)
329
309
 
330
310
  state_p = subparsers.add_parser(
331
311
  "state",
332
- help="Set / show your freeform state line — how you are right now.",
312
+ help="Set / show your freeform state line — what's going on right now.",
333
313
  description=(
334
314
  "An optional, freeform line in your own words ('wiped, keep it light', "
335
- "'sharp') that every session reads at start, shown verbatim with its age. "
315
+ "'on the billing refactor') that every session reads at start and the "
316
+ "cockpit shows, verbatim with its age. "
336
317
  "It is never parsed, scored or used to limit what the partner does; you are "
337
318
  "the authority on your own state. With TEXT, sets it; with no argument, shows "
338
- "it; --clear removes it. It expires after 8 hours: a stale state is dropped, "
339
- "not shown. Lives beside the focus in .levain/context.json."
319
+ "it; --clear removes it. It expires after 12 hours: a stale state is dropped, "
320
+ "not shown. Stored in .levain/context.json."
340
321
  ),
341
322
  )
342
323
  state_p.add_argument(
@@ -1227,15 +1208,7 @@ def _cmd_dashboard(args: argparse.Namespace) -> int:
1227
1208
  def _cmd_tui(args: argparse.Namespace) -> int:
1228
1209
  from levain.tui import run_tui
1229
1210
 
1230
- return run_tui(path=args.path, read_only=args.read_only)
1231
-
1232
-
1233
- def _cmd_focus(args: argparse.Namespace) -> int:
1234
- from levain.dashboard import run_focus
1235
-
1236
- return run_focus(
1237
- path=args.path, text=args.text, source=args.source, clear=args.clear
1238
- )
1211
+ return run_tui(path=args.path, read_only=args.read_only, manifest=args.manifest)
1239
1212
 
1240
1213
 
1241
1214
  def _cmd_state(args: argparse.Namespace) -> int:
@@ -0,0 +1,29 @@
1
+ """levain.cockpit: the shared cockpit contract, read half (design: flow
2
+ ``projects/levain/reference/cockpit_manifest_DESIGN_1009.md`` §3, §6, §9 K1).
3
+
4
+ One manifest and one panel route, served by the kernel under the existing read gate. Writes,
5
+ verbs and tiers are K2a/K2b and are not here. Embedding it (the provider trust assumption and the
6
+ interrupt contract): ``docs/cockpit-engine.md``."""
7
+
8
+ from levain.cockpit.engine import (
9
+ HEADER,
10
+ SCHEMA,
11
+ Cockpit,
12
+ ProviderSpec,
13
+ ReadContext,
14
+ RowNotFound,
15
+ )
16
+ from levain.cockpit.registry import (
17
+ FACETS,
18
+ ORDERINGS,
19
+ CockpitRegistrationError,
20
+ Ordering,
21
+ register_ordering,
22
+ )
23
+ from levain.cockpit.results import Absent, Fault, Read, Result, RowIn
24
+
25
+ __all__ = [
26
+ "Absent", "Cockpit", "CockpitRegistrationError", "FACETS", "Fault", "HEADER", "ORDERINGS",
27
+ "Ordering", "ProviderSpec", "Read", "ReadContext", "Result", "RowIn", "RowNotFound",
28
+ "SCHEMA", "register_ordering",
29
+ ]