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.
- {levain-0.7.0/levain.egg-info → levain-0.7.2}/PKG-INFO +6 -6
- {levain-0.7.0 → levain-0.7.2}/README.md +5 -5
- {levain-0.7.0 → levain-0.7.2}/levain/__init__.py +1 -1
- {levain-0.7.0 → levain-0.7.2}/levain/_tui_curses.py +80 -61
- {levain-0.7.0 → levain-0.7.2}/levain/cli.py +13 -40
- levain-0.7.2/levain/cockpit/__init__.py +29 -0
- levain-0.7.2/levain/cockpit/engine.py +1064 -0
- levain-0.7.2/levain/cockpit/external.py +289 -0
- levain-0.7.2/levain/cockpit/payload_map.py +173 -0
- levain-0.7.2/levain/cockpit/providers.py +488 -0
- levain-0.7.2/levain/cockpit/registry.py +269 -0
- levain-0.7.2/levain/cockpit/results.py +63 -0
- levain-0.7.2/levain/cockpit/routes.py +103 -0
- levain-0.7.2/levain/cockpit/text.py +201 -0
- {levain-0.7.0 → levain-0.7.2}/levain/dashboard.py +59 -262
- {levain-0.7.0 → levain-0.7.2}/levain/firing/confinement.py +132 -2
- {levain-0.7.0 → levain-0.7.2}/levain/firing/ws_git.py +45 -12
- {levain-0.7.0 → levain-0.7.2}/levain/http_guards.py +10 -3
- {levain-0.7.0 → levain-0.7.2}/levain/install.py +319 -30
- {levain-0.7.0 → levain-0.7.2}/levain/jobs.py +21 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/activation/hooks/_levain_hook.py +173 -129
- {levain-0.7.0 → levain-0.7.2}/levain/templates/activation/hooks/session_start.py +77 -55
- {levain-0.7.0 → levain-0.7.2}/levain/templates/activation/hooks/user_prompt_submit.py +18 -1
- {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/codex/activation/hooks/_levain_hook.py +174 -129
- {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/codex/activation/hooks/session_start.py +77 -55
- {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/codex/activation/hooks/user_prompt_submit.py +18 -1
- {levain-0.7.0 → levain-0.7.2}/levain/templates/docs/operator-manual.md +3 -3
- levain-0.7.2/levain/templates/web/cockpit_view.js +384 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/web/dashboard.css +29 -29
- {levain-0.7.0 → levain-0.7.2}/levain/templates/web/dashboard.html +2 -2
- {levain-0.7.0 → levain-0.7.2}/levain/templates/web/dashboard_boot.js +52 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/web/dashboard_core.js +125 -98
- {levain-0.7.0 → levain-0.7.2}/levain/tui.py +13 -2
- {levain-0.7.0 → levain-0.7.2}/levain/web_server.py +73 -0
- {levain-0.7.0 → levain-0.7.2}/levain/writes.py +15 -67
- {levain-0.7.0 → levain-0.7.2/levain.egg-info}/PKG-INFO +6 -6
- {levain-0.7.0 → levain-0.7.2}/levain.egg-info/SOURCES.txt +14 -0
- {levain-0.7.0 → levain-0.7.2}/pyproject.toml +1 -1
- {levain-0.7.0 → levain-0.7.2}/tests/test_app_server.py +2 -2
- levain-0.7.2/tests/test_cockpit_external.py +538 -0
- levain-0.7.2/tests/test_cockpit_k1.py +1610 -0
- levain-0.7.2/tests/test_cockpit_r1r2.py +684 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_dashboard.py +55 -296
- {levain-0.7.0 → levain-0.7.2}/tests/test_firing_confinement.py +78 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_hooks.py +72 -85
- {levain-0.7.0 → levain-0.7.2}/tests/test_operator_state.py +47 -9
- levain-0.7.2/tests/test_state_line_hook.py +289 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_tui.py +31 -23
- {levain-0.7.0 → levain-0.7.2}/tests/test_update_refresh.py +191 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_web_server.py +22 -14
- {levain-0.7.0 → levain-0.7.2}/tests/test_writes.py +59 -46
- {levain-0.7.0 → levain-0.7.2}/tests/test_ws_git.py +82 -3
- {levain-0.7.0 → levain-0.7.2}/LICENSE +0 -0
- {levain-0.7.0 → levain-0.7.2}/MANIFEST.in +0 -0
- {levain-0.7.0 → levain-0.7.2}/NOTICE +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/__main__.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/_browser.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/answers.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/app_server.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/__init__.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/authority.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/binding.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/chainpath.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/compiler.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/confirm.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/db.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/executor.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/firepath.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/gate.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/gates.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/graduation.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/journal.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/kill.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/liveness.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/monitor.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/pending.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/policy.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/posture.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/receipt.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/risk.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/store.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/transport.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/autonomic/trust.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/chat.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/daemon.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/docs.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/docs_server.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/doctor.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/__init__.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/agent_reply.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/anneal.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/binding.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/contract.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/crystallization.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/deadline.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/drive.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/encoding.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/gate.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/hands.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/isolation.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/openhands/__init__.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/openhands/agent.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/openhands/capture.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/openhands/condenser.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/openhands/entity.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/openhands/gate.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/openhands/levain_condenser.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/openhands/tools.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/presence.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/seatbelt_guard.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/firing/seed.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/idempotency.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/init_server.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/interview.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/kernel.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/launch.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/manifest.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/packs.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/reconcile.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/run.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/session.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/spores.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/team/__init__.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/team/canon.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/team/cli.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/team/entry.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/team/export.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/team/hook.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/team/index.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/team/pack.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/team/registry.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/team/roles.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/team/transport.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/team/view.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/team/wire.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/activation/hooks/automemory_mirror.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/activation/posture.md +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/activation/recency_directives.md +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/claude-code/CLAUDE.md.template +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/claude-code/README.md +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/claude-code/mcp.template.json +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/claude-code/settings.template.json +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/codex/AGENTS.md.template +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/codex/README.md +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/codex/activation/posture.md +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/codex/activation/recency_directives.md +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/codex/hooks.json.template +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/adapters/codex/mcp.template.toml +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/app/dashboard.html +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/pack.toml +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/seed/README.md +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/seed/continuity.md +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/seed/memory.md +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/seed/origin.md +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/seed/partnership.md +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/seed/spore_instructions.md +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/seed/world.md +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/web/dashboard_chat.js +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/web/dashboard_team.js +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/web/docs.css +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/web/docs.html +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/web/docs.js +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/web/init.css +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/web/init.html +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/web/init.js +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/templates/web/markdown.js +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/turn_input.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/update.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/verify.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain/wrap.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain.egg-info/dependency_links.txt +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain.egg-info/entry_points.txt +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain.egg-info/requires.txt +0 -0
- {levain-0.7.0 → levain-0.7.2}/levain.egg-info/top_level.txt +0 -0
- {levain-0.7.0 → levain-0.7.2}/setup.cfg +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_accrual.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_actions.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_adopt_answers.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_anneal_authority.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_answers.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_automemory_mirror.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_binding.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_binding_integration.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_chainpath.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_compiler.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_db.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_firepath.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_gate.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_graduation.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_journal.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_journal_wiring.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_l3_fixes.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_l3_r2_fixes.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_leaf.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_policy.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_rawstore.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_slice_3a5.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_autonomic_transport.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_chat.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_cli.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_compat_integration.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_continuity_import.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_daemon.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_docs.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_docs_server.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_doctor_content.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_firing_anneal.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_firing_capture.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_firing_condenser.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_firing_contract.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_firing_crystallization.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_firing_deadline.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_firing_drive.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_firing_encoding.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_firing_entity.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_firing_gate.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_firing_gate_openhands.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_firing_isolation.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_firing_seed.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_firing_tools.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_floor_autonomic_store.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_floor_cloud_creds.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_floor_process_view.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_floor_project_memory.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_floor_spellings.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_hands_files.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_hands_isolation.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_hands_spawn.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_hook_freshness_receipt_status.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_http_guards.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_idempotency.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_init_answers.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_init_server.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_install.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_interview.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_jewel_recheck.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_jobs.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_kernel.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_l3_16dcb7ee_fixes.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_launch.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_levain_condenser.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_levain_presence.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_manifest.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_markdown_parity.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_masks_last.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_nlink_floor.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_openhands_adapter.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_packs.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_receipt_and_upgrade_exit.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_reconcile.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_run.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_run_self_consolidate.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_seat_consolidate_surface.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_seatbelt_guard.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_seed_refresh.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_session.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_shell_oob_status.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_spore866_install_path_escaping.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_spores.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_starter_jar.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_team_git.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_team_golden.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_team_registry.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_team_unit.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_team_view.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_turn_input.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_two_sessions.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_unreadable_tool_call.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_update.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_web_chat_panel.py +0 -0
- {levain-0.7.0 → levain-0.7.2}/tests/test_wrap.py +0 -0
- {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.
|
|
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
|
|
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
|
|
314
|
-
levain
|
|
315
|
-
levain
|
|
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.
|
|
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
|
|
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
|
|
279
|
-
levain
|
|
280
|
-
levain
|
|
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.
|
|
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
|
|
|
@@ -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'):
|
|
228
|
-
|
|
229
|
-
|
|
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)
|
|
720
|
-
#
|
|
721
|
-
#
|
|
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
|
-
|
|
724
|
-
if
|
|
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
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
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,
|
|
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
|
-
"
|
|
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.
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
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
|
-
|
|
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 —
|
|
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
|
-
"'
|
|
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
|
|
339
|
-
"not shown.
|
|
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
|
+
]
|