@agentikos/omega-os 0.2.0 → 0.19.6

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 (376) hide show
  1. package/README.md +33 -3
  2. package/bootstrap/lib/__pycache__/claude-code-settings.cpython-313.pyc +0 -0
  3. package/bootstrap/lib/__pycache__/llm-clis.cpython-313.pyc +0 -0
  4. package/bootstrap/lib/__pycache__/manifest-helpers.cpython-313.pyc +0 -0
  5. package/bootstrap/lib/claude-code-settings.py +176 -0
  6. package/bootstrap/lib/common.sh +457 -1
  7. package/bootstrap/lib/llm-clis.py +341 -0
  8. package/bootstrap/lib/manifest-helpers.py +384 -0
  9. package/bootstrap/lib/steps.sh +790 -21
  10. package/bootstrap/manifest.example.yaml +87 -1
  11. package/bootstrap/templates/aisb/CLAUDE.md +305 -0
  12. package/bootstrap/templates/aisb/architect.md +204 -0
  13. package/bootstrap/templates/aisb/checkers/CLAUDE.md +9 -0
  14. package/bootstrap/templates/aisb/checkers/checker-architect.md +151 -0
  15. package/bootstrap/templates/aisb/checkers/checker-common.md +171 -0
  16. package/bootstrap/templates/aisb/checkers/checker-construct.md +129 -0
  17. package/bootstrap/templates/aisb/checkers/checker-keymaker.md +204 -0
  18. package/bootstrap/templates/aisb/checkers/checker-link.md +205 -0
  19. package/bootstrap/templates/aisb/checkers/checker-merovingian.md +219 -0
  20. package/bootstrap/templates/aisb/checkers/checker-morpheus.md +211 -0
  21. package/bootstrap/templates/aisb/checkers/checker-neo.md +177 -0
  22. package/bootstrap/templates/aisb/checkers/checker-niobe.md +156 -0
  23. package/bootstrap/templates/aisb/checkers/checker-oracle.md +164 -0
  24. package/bootstrap/templates/aisb/checkers/checker-seraph.md +187 -0
  25. package/bootstrap/templates/aisb/checkers/checker-smith.md +195 -0
  26. package/bootstrap/templates/aisb/checkers/checker-zion.md +113 -0
  27. package/bootstrap/templates/aisb/construct.md +135 -0
  28. package/bootstrap/templates/aisb/keymaker.md +227 -0
  29. package/bootstrap/templates/aisb/link.md +170 -0
  30. package/bootstrap/templates/aisb/lmc-protocol.md +57 -0
  31. package/bootstrap/templates/aisb/merovingian.md +159 -0
  32. package/bootstrap/templates/aisb/morpheus.md +243 -0
  33. package/bootstrap/templates/aisb/neo.md +147 -0
  34. package/bootstrap/templates/aisb/niobe.md +197 -0
  35. package/bootstrap/templates/aisb/oracle.md +244 -0
  36. package/bootstrap/templates/aisb/protocols/handoff-templates.md +204 -0
  37. package/bootstrap/templates/aisb/protocols/shared-protocol.md +248 -0
  38. package/bootstrap/templates/aisb/pythia.md +153 -0
  39. package/bootstrap/templates/aisb/seraph.md +315 -0
  40. package/bootstrap/templates/aisb/smith.md +202 -0
  41. package/bootstrap/templates/aisb/zion.md +172 -0
  42. package/bootstrap/templates/autonomous/audit-patrol.yaml +41 -0
  43. package/bootstrap/templates/autonomous/smith-reflect.yaml +43 -0
  44. package/bootstrap/templates/autonomous/ssh-key-rotate.yaml +46 -0
  45. package/bootstrap/templates/autonomous/support-agent.yaml +38 -0
  46. package/docs/AUDITS.md +85 -0
  47. package/docs/GAP-ANALYSIS.md +214 -0
  48. package/docs/INSTALL.md +47 -9
  49. package/docs/MCP-AND-PLUGINS.md +31 -4
  50. package/docs/SIMULATION.md +171 -0
  51. package/docs/simulate.sh +211 -0
  52. package/install.sh +164 -17
  53. package/omega/Agentik_Engine/README.md +4 -2
  54. package/omega/Agentik_Engine/omega_engine/__init__.py +147 -1
  55. package/omega/Agentik_Engine/omega_engine/__pycache__/__init__.cpython-313.pyc +0 -0
  56. package/omega/Agentik_Engine/omega_engine/__pycache__/account.cpython-313.pyc +0 -0
  57. package/omega/Agentik_Engine/omega_engine/__pycache__/agent_messages.cpython-313.pyc +0 -0
  58. package/omega/Agentik_Engine/omega_engine/__pycache__/aisb_chat.cpython-313.pyc +0 -0
  59. package/omega/Agentik_Engine/omega_engine/__pycache__/audit.cpython-313.pyc +0 -0
  60. package/omega/Agentik_Engine/omega_engine/__pycache__/audit_arsenal.cpython-313.pyc +0 -0
  61. package/omega/Agentik_Engine/omega_engine/__pycache__/audit_diff.cpython-313.pyc +0 -0
  62. package/omega/Agentik_Engine/omega_engine/__pycache__/audit_gate.cpython-313.pyc +0 -0
  63. package/omega/Agentik_Engine/omega_engine/__pycache__/auto_update.cpython-313.pyc +0 -0
  64. package/omega/Agentik_Engine/omega_engine/__pycache__/autonomous.cpython-313.pyc +0 -0
  65. package/omega/Agentik_Engine/omega_engine/__pycache__/backup.cpython-313.pyc +0 -0
  66. package/omega/Agentik_Engine/omega_engine/__pycache__/barrier.cpython-313.pyc +0 -0
  67. package/omega/Agentik_Engine/omega_engine/__pycache__/bus.cpython-313.pyc +0 -0
  68. package/omega/Agentik_Engine/omega_engine/__pycache__/cadence.cpython-313.pyc +0 -0
  69. package/omega/Agentik_Engine/omega_engine/__pycache__/classifier.cpython-313.pyc +0 -0
  70. package/omega/Agentik_Engine/omega_engine/__pycache__/cleanup.cpython-313.pyc +0 -0
  71. package/omega/Agentik_Engine/omega_engine/__pycache__/cli.cpython-313.pyc +0 -0
  72. package/omega/Agentik_Engine/omega_engine/__pycache__/completions.cpython-313.pyc +0 -0
  73. package/omega/Agentik_Engine/omega_engine/__pycache__/costs.cpython-313.pyc +0 -0
  74. package/omega/Agentik_Engine/omega_engine/__pycache__/done_signal.cpython-313.pyc +0 -0
  75. package/omega/Agentik_Engine/omega_engine/__pycache__/envelope.cpython-313.pyc +0 -0
  76. package/omega/Agentik_Engine/omega_engine/__pycache__/events.cpython-313.pyc +0 -0
  77. package/omega/Agentik_Engine/omega_engine/__pycache__/executor.cpython-313.pyc +0 -0
  78. package/omega/Agentik_Engine/omega_engine/__pycache__/handoff.cpython-313.pyc +0 -0
  79. package/omega/Agentik_Engine/omega_engine/__pycache__/hermes.cpython-313.pyc +0 -0
  80. package/omega/Agentik_Engine/omega_engine/__pycache__/hermes_bootstrap.cpython-313.pyc +0 -0
  81. package/omega/Agentik_Engine/omega_engine/__pycache__/hermes_desktop.cpython-313.pyc +0 -0
  82. package/omega/Agentik_Engine/omega_engine/__pycache__/learning.cpython-313.pyc +0 -0
  83. package/omega/Agentik_Engine/omega_engine/__pycache__/managed_agent.cpython-313.pyc +0 -0
  84. package/omega/Agentik_Engine/omega_engine/__pycache__/memory.cpython-313.pyc +0 -0
  85. package/omega/Agentik_Engine/omega_engine/__pycache__/menu.cpython-313.pyc +0 -0
  86. package/omega/Agentik_Engine/omega_engine/__pycache__/mission.cpython-313.pyc +0 -0
  87. package/omega/Agentik_Engine/omega_engine/__pycache__/plan.cpython-313.pyc +0 -0
  88. package/omega/Agentik_Engine/omega_engine/__pycache__/progress.cpython-313.pyc +0 -0
  89. package/omega/Agentik_Engine/omega_engine/__pycache__/project.cpython-313.pyc +0 -0
  90. package/omega/Agentik_Engine/omega_engine/__pycache__/prompts.cpython-313.pyc +0 -0
  91. package/omega/Agentik_Engine/omega_engine/__pycache__/provider.cpython-313.pyc +0 -0
  92. package/omega/Agentik_Engine/omega_engine/__pycache__/prune.cpython-313.pyc +0 -0
  93. package/omega/Agentik_Engine/omega_engine/__pycache__/pursue.cpython-313.pyc +0 -0
  94. package/omega/Agentik_Engine/omega_engine/__pycache__/reducer.cpython-313.pyc +0 -0
  95. package/omega/Agentik_Engine/omega_engine/__pycache__/report.cpython-313.pyc +0 -0
  96. package/omega/Agentik_Engine/omega_engine/__pycache__/router.cpython-313.pyc +0 -0
  97. package/omega/Agentik_Engine/omega_engine/__pycache__/skill_routing.cpython-313.pyc +0 -0
  98. package/omega/Agentik_Engine/omega_engine/__pycache__/smoke.cpython-313.pyc +0 -0
  99. package/omega/Agentik_Engine/omega_engine/__pycache__/store.cpython-313.pyc +0 -0
  100. package/omega/Agentik_Engine/omega_engine/__pycache__/supervisor.cpython-313.pyc +0 -0
  101. package/omega/Agentik_Engine/omega_engine/__pycache__/sync.cpython-313.pyc +0 -0
  102. package/omega/Agentik_Engine/omega_engine/__pycache__/task.cpython-313.pyc +0 -0
  103. package/omega/Agentik_Engine/omega_engine/__pycache__/telegram.cpython-313.pyc +0 -0
  104. package/omega/Agentik_Engine/omega_engine/__pycache__/telegram_history.cpython-313.pyc +0 -0
  105. package/omega/Agentik_Engine/omega_engine/__pycache__/tmux.cpython-313.pyc +0 -0
  106. package/omega/Agentik_Engine/omega_engine/__pycache__/tools.cpython-313.pyc +0 -0
  107. package/omega/Agentik_Engine/omega_engine/__pycache__/understand_anything.cpython-313.pyc +0 -0
  108. package/omega/Agentik_Engine/omega_engine/__pycache__/updater.cpython-313.pyc +0 -0
  109. package/omega/Agentik_Engine/omega_engine/__pycache__/validate.cpython-313.pyc +0 -0
  110. package/omega/Agentik_Engine/omega_engine/__pycache__/vault.cpython-313.pyc +0 -0
  111. package/omega/Agentik_Engine/omega_engine/__pycache__/webhooks.cpython-313.pyc +0 -0
  112. package/omega/Agentik_Engine/omega_engine/__pycache__/worker.cpython-313.pyc +0 -0
  113. package/omega/Agentik_Engine/omega_engine/account.py +28 -31
  114. package/omega/Agentik_Engine/omega_engine/agent_messages.py +167 -0
  115. package/omega/Agentik_Engine/omega_engine/aisb_chat.py +128 -0
  116. package/omega/Agentik_Engine/omega_engine/audit_diff.py +99 -0
  117. package/omega/Agentik_Engine/omega_engine/audit_gate.py +149 -0
  118. package/omega/Agentik_Engine/omega_engine/audits/__init__.py +60 -0
  119. package/omega/Agentik_Engine/omega_engine/audits/__pycache__/__init__.cpython-313.pyc +0 -0
  120. package/omega/Agentik_Engine/omega_engine/audits/__pycache__/batcher.cpython-313.pyc +0 -0
  121. package/omega/Agentik_Engine/omega_engine/audits/__pycache__/dispatcher.cpython-313.pyc +0 -0
  122. package/omega/Agentik_Engine/omega_engine/audits/__pycache__/generator.cpython-313.pyc +0 -0
  123. package/omega/Agentik_Engine/omega_engine/audits/__pycache__/history.cpython-313.pyc +0 -0
  124. package/omega/Agentik_Engine/omega_engine/audits/__pycache__/pipeline.cpython-313.pyc +0 -0
  125. package/omega/Agentik_Engine/omega_engine/audits/batcher.py +218 -0
  126. package/omega/Agentik_Engine/omega_engine/audits/dispatcher.py +92 -0
  127. package/omega/Agentik_Engine/omega_engine/audits/generator.py +234 -0
  128. package/omega/Agentik_Engine/omega_engine/audits/history.py +168 -0
  129. package/omega/Agentik_Engine/omega_engine/audits/pipeline.py +198 -0
  130. package/omega/Agentik_Engine/omega_engine/auto_update.py +339 -0
  131. package/omega/Agentik_Engine/omega_engine/backup.py +215 -0
  132. package/omega/Agentik_Engine/omega_engine/cadence.py +158 -0
  133. package/omega/Agentik_Engine/omega_engine/classifier.py +215 -0
  134. package/omega/Agentik_Engine/omega_engine/cleanup.py +673 -0
  135. package/omega/Agentik_Engine/omega_engine/cli.py +4156 -86
  136. package/omega/Agentik_Engine/omega_engine/completions.py +260 -0
  137. package/omega/Agentik_Engine/omega_engine/costs.py +100 -0
  138. package/omega/Agentik_Engine/omega_engine/daemons/__pycache__/__init__.cpython-313.pyc +0 -0
  139. package/omega/Agentik_Engine/omega_engine/daemons/__pycache__/autonomous.cpython-313.pyc +0 -0
  140. package/omega/Agentik_Engine/omega_engine/daemons/__pycache__/engine.cpython-313.pyc +0 -0
  141. package/omega/Agentik_Engine/omega_engine/daemons/__pycache__/telegram.cpython-313.pyc +0 -0
  142. package/omega/Agentik_Engine/omega_engine/daemons/engine.py +53 -4
  143. package/omega/Agentik_Engine/omega_engine/daemons/telegram.py +101 -17
  144. package/omega/Agentik_Engine/omega_engine/done_signal.py +154 -0
  145. package/omega/Agentik_Engine/omega_engine/educators/__pycache__/__init__.cpython-313.pyc +0 -0
  146. package/omega/Agentik_Engine/omega_engine/educators/__pycache__/artifact.cpython-313.pyc +0 -0
  147. package/omega/Agentik_Engine/omega_engine/educators/__pycache__/automation.cpython-313.pyc +0 -0
  148. package/omega/Agentik_Engine/omega_engine/educators/__pycache__/base.cpython-313.pyc +0 -0
  149. package/omega/Agentik_Engine/omega_engine/educators/__pycache__/claudecode.cpython-313.pyc +0 -0
  150. package/omega/Agentik_Engine/omega_engine/educators/__pycache__/connection.cpython-313.pyc +0 -0
  151. package/omega/Agentik_Engine/omega_engine/educators/__pycache__/coworker.cpython-313.pyc +0 -0
  152. package/omega/Agentik_Engine/omega_engine/educators/__pycache__/loop.cpython-313.pyc +0 -0
  153. package/omega/Agentik_Engine/omega_engine/educators/__pycache__/prompt.cpython-313.pyc +0 -0
  154. package/omega/Agentik_Engine/omega_engine/educators/__pycache__/skill.cpython-313.pyc +0 -0
  155. package/omega/Agentik_Engine/omega_engine/envelope.py +219 -0
  156. package/omega/Agentik_Engine/omega_engine/executor.py +149 -10
  157. package/omega/Agentik_Engine/omega_engine/genesis/__init__.py +134 -0
  158. package/omega/Agentik_Engine/omega_engine/genesis/__pycache__/__init__.cpython-313.pyc +0 -0
  159. package/omega/Agentik_Engine/omega_engine/genesis/__pycache__/orchestrator.cpython-313.pyc +0 -0
  160. package/omega/Agentik_Engine/omega_engine/genesis/__pycache__/phases.cpython-313.pyc +0 -0
  161. package/omega/Agentik_Engine/omega_engine/genesis/__pycache__/stack.cpython-313.pyc +0 -0
  162. package/omega/Agentik_Engine/omega_engine/genesis/__pycache__/state.cpython-313.pyc +0 -0
  163. package/omega/Agentik_Engine/omega_engine/genesis/orchestrator.py +262 -0
  164. package/omega/Agentik_Engine/omega_engine/genesis/phases.py +950 -0
  165. package/omega/Agentik_Engine/omega_engine/genesis/stack.py +324 -0
  166. package/omega/Agentik_Engine/omega_engine/genesis/state.py +353 -0
  167. package/omega/Agentik_Engine/omega_engine/handoff.py +459 -0
  168. package/omega/Agentik_Engine/omega_engine/hermes.py +426 -0
  169. package/omega/Agentik_Engine/omega_engine/hermes_bootstrap.py +382 -0
  170. package/omega/Agentik_Engine/omega_engine/hermes_desktop.py +469 -0
  171. package/omega/Agentik_Engine/omega_engine/integrations/__init__.py +30 -0
  172. package/omega/Agentik_Engine/omega_engine/integrations/__pycache__/__init__.cpython-313.pyc +0 -0
  173. package/omega/Agentik_Engine/omega_engine/integrations/__pycache__/graphify.cpython-313.pyc +0 -0
  174. package/omega/Agentik_Engine/omega_engine/integrations/graphify.py +234 -0
  175. package/omega/Agentik_Engine/omega_engine/learning.py +268 -0
  176. package/omega/Agentik_Engine/omega_engine/managed_agent.py +467 -0
  177. package/omega/Agentik_Engine/omega_engine/memory.py +271 -0
  178. package/omega/Agentik_Engine/omega_engine/menu.py +1065 -0
  179. package/omega/Agentik_Engine/omega_engine/migrations/__init__.py +144 -0
  180. package/omega/Agentik_Engine/omega_engine/migrations/__pycache__/__init__.cpython-313.pyc +0 -0
  181. package/omega/Agentik_Engine/omega_engine/migrations/__pycache__/v0_14_0.cpython-313.pyc +0 -0
  182. package/omega/Agentik_Engine/omega_engine/migrations/v0_14_0.py +29 -0
  183. package/omega/Agentik_Engine/omega_engine/mission.py +16 -13
  184. package/omega/Agentik_Engine/omega_engine/plan.py +846 -0
  185. package/omega/Agentik_Engine/omega_engine/prompts.py +158 -0
  186. package/omega/Agentik_Engine/omega_engine/provider.py +161 -12
  187. package/omega/Agentik_Engine/omega_engine/prune.py +151 -0
  188. package/omega/Agentik_Engine/omega_engine/pursue.py +205 -0
  189. package/omega/Agentik_Engine/omega_engine/rag/__pycache__/__init__.cpython-313.pyc +0 -0
  190. package/omega/Agentik_Engine/omega_engine/rag/__pycache__/agentic.cpython-313.pyc +0 -0
  191. package/omega/Agentik_Engine/omega_engine/rag/__pycache__/base.cpython-313.pyc +0 -0
  192. package/omega/Agentik_Engine/omega_engine/rag/__pycache__/corrective.cpython-313.pyc +0 -0
  193. package/omega/Agentik_Engine/omega_engine/rag/__pycache__/graph.cpython-313.pyc +0 -0
  194. package/omega/Agentik_Engine/omega_engine/rag/__pycache__/hybrid.cpython-313.pyc +0 -0
  195. package/omega/Agentik_Engine/omega_engine/rag/__pycache__/multimodal.cpython-313.pyc +0 -0
  196. package/omega/Agentik_Engine/omega_engine/rag/__pycache__/router.cpython-313.pyc +0 -0
  197. package/omega/Agentik_Engine/omega_engine/router.py +28 -0
  198. package/omega/Agentik_Engine/omega_engine/skill_discovery/__init__.py +48 -0
  199. package/omega/Agentik_Engine/omega_engine/skill_discovery/__pycache__/__init__.cpython-313.pyc +0 -0
  200. package/omega/Agentik_Engine/omega_engine/skill_discovery/__pycache__/auditor.cpython-313.pyc +0 -0
  201. package/omega/Agentik_Engine/omega_engine/skill_discovery/__pycache__/finder.cpython-313.pyc +0 -0
  202. package/omega/Agentik_Engine/omega_engine/skill_discovery/__pycache__/installer.cpython-313.pyc +0 -0
  203. package/omega/Agentik_Engine/omega_engine/skill_discovery/__pycache__/marketplaces.cpython-313.pyc +0 -0
  204. package/omega/Agentik_Engine/omega_engine/skill_discovery/auditor.py +232 -0
  205. package/omega/Agentik_Engine/omega_engine/skill_discovery/finder.py +94 -0
  206. package/omega/Agentik_Engine/omega_engine/skill_discovery/installer.py +129 -0
  207. package/omega/Agentik_Engine/omega_engine/skill_discovery/marketplaces.py +80 -0
  208. package/omega/Agentik_Engine/omega_engine/skill_routing.py +388 -0
  209. package/omega/Agentik_Engine/omega_engine/smoke.py +81 -0
  210. package/omega/Agentik_Engine/omega_engine/store.py +88 -41
  211. package/omega/Agentik_Engine/omega_engine/sync.py +142 -1
  212. package/omega/Agentik_Engine/omega_engine/telegram_history.py +260 -0
  213. package/omega/Agentik_Engine/omega_engine/tmux.py +526 -0
  214. package/omega/Agentik_Engine/omega_engine/understand_anything.py +275 -0
  215. package/omega/Agentik_Engine/omega_engine/updater.py +70 -0
  216. package/omega/Agentik_Engine/omega_engine/validate.py +186 -0
  217. package/omega/Agentik_Engine/omega_engine/vault.py +342 -0
  218. package/omega/Agentik_Engine/omega_engine/webhooks.py +262 -0
  219. package/omega/Agentik_Engine/omega_engine/worker.py +526 -0
  220. package/omega/Agentik_Engine/pyproject.toml +1 -1
  221. package/omega/Agentik_Engine/tests/__pycache__/test_account.cpython-313-pytest-8.4.2.pyc +0 -0
  222. package/omega/Agentik_Engine/tests/__pycache__/test_account.cpython-313.pyc +0 -0
  223. package/omega/Agentik_Engine/tests/__pycache__/test_adversarial.cpython-313-pytest-8.4.2.pyc +0 -0
  224. package/omega/Agentik_Engine/tests/__pycache__/test_adversarial.cpython-313.pyc +0 -0
  225. package/omega/Agentik_Engine/tests/__pycache__/test_agents_envelope.cpython-313-pytest-8.4.2.pyc +0 -0
  226. package/omega/Agentik_Engine/tests/__pycache__/test_agents_envelope.cpython-313.pyc +0 -0
  227. package/omega/Agentik_Engine/tests/__pycache__/test_audit_arsenal.cpython-313-pytest-8.4.2.pyc +0 -0
  228. package/omega/Agentik_Engine/tests/__pycache__/test_audit_arsenal.cpython-313.pyc +0 -0
  229. package/omega/Agentik_Engine/tests/__pycache__/test_audits_pipeline.cpython-313-pytest-8.4.2.pyc +0 -0
  230. package/omega/Agentik_Engine/tests/__pycache__/test_audits_pipeline.cpython-313.pyc +0 -0
  231. package/omega/Agentik_Engine/tests/__pycache__/test_auto_update_and_migrations.cpython-313-pytest-8.4.2.pyc +0 -0
  232. package/omega/Agentik_Engine/tests/__pycache__/test_auto_update_and_migrations.cpython-313.pyc +0 -0
  233. package/omega/Agentik_Engine/tests/__pycache__/test_autonomous.cpython-313-pytest-8.4.2.pyc +0 -0
  234. package/omega/Agentik_Engine/tests/__pycache__/test_autonomous.cpython-313.pyc +0 -0
  235. package/omega/Agentik_Engine/tests/__pycache__/test_educators.cpython-313-pytest-8.4.2.pyc +0 -0
  236. package/omega/Agentik_Engine/tests/__pycache__/test_educators.cpython-313.pyc +0 -0
  237. package/omega/Agentik_Engine/tests/__pycache__/test_executor.cpython-313-pytest-8.4.2.pyc +0 -0
  238. package/omega/Agentik_Engine/tests/__pycache__/test_executor.cpython-313.pyc +0 -0
  239. package/omega/Agentik_Engine/tests/__pycache__/test_genesis_and_plan.cpython-313-pytest-8.4.2.pyc +0 -0
  240. package/omega/Agentik_Engine/tests/__pycache__/test_genesis_and_plan.cpython-313.pyc +0 -0
  241. package/omega/Agentik_Engine/tests/__pycache__/test_graphify.cpython-313-pytest-8.4.2.pyc +0 -0
  242. package/omega/Agentik_Engine/tests/__pycache__/test_graphify.cpython-313.pyc +0 -0
  243. package/omega/Agentik_Engine/tests/__pycache__/test_handoff.cpython-313-pytest-8.4.2.pyc +0 -0
  244. package/omega/Agentik_Engine/tests/__pycache__/test_handoff.cpython-313.pyc +0 -0
  245. package/omega/Agentik_Engine/tests/__pycache__/test_hermes_and_ua.cpython-313-pytest-8.4.2.pyc +0 -0
  246. package/omega/Agentik_Engine/tests/__pycache__/test_hermes_and_ua.cpython-313.pyc +0 -0
  247. package/omega/Agentik_Engine/tests/__pycache__/test_hermes_bootstrap_and_desktop.cpython-313-pytest-8.4.2.pyc +0 -0
  248. package/omega/Agentik_Engine/tests/__pycache__/test_hermes_bootstrap_and_desktop.cpython-313.pyc +0 -0
  249. package/omega/Agentik_Engine/tests/__pycache__/test_install_steps.cpython-313-pytest-8.4.2.pyc +0 -0
  250. package/omega/Agentik_Engine/tests/__pycache__/test_install_steps.cpython-313.pyc +0 -0
  251. package/omega/Agentik_Engine/tests/__pycache__/test_install_ux.cpython-313-pytest-8.4.2.pyc +0 -0
  252. package/omega/Agentik_Engine/tests/__pycache__/test_install_ux.cpython-313.pyc +0 -0
  253. package/omega/Agentik_Engine/tests/__pycache__/test_installer_wiring.cpython-313-pytest-8.4.2.pyc +0 -0
  254. package/omega/Agentik_Engine/tests/__pycache__/test_installer_wiring.cpython-313.pyc +0 -0
  255. package/omega/Agentik_Engine/tests/__pycache__/test_intelligence.cpython-313-pytest-8.4.2.pyc +0 -0
  256. package/omega/Agentik_Engine/tests/__pycache__/test_intelligence.cpython-313.pyc +0 -0
  257. package/omega/Agentik_Engine/tests/__pycache__/test_llm_clis_and_uninstall.cpython-313-pytest-8.4.2.pyc +0 -0
  258. package/omega/Agentik_Engine/tests/__pycache__/test_llm_clis_and_uninstall.cpython-313.pyc +0 -0
  259. package/omega/Agentik_Engine/tests/__pycache__/test_managed_agent.cpython-313-pytest-8.4.2.pyc +0 -0
  260. package/omega/Agentik_Engine/tests/__pycache__/test_managed_agent.cpython-313.pyc +0 -0
  261. package/omega/Agentik_Engine/tests/__pycache__/test_max_provider_and_menu.cpython-313-pytest-8.4.2.pyc +0 -0
  262. package/omega/Agentik_Engine/tests/__pycache__/test_max_provider_and_menu.cpython-313.pyc +0 -0
  263. package/omega/Agentik_Engine/tests/__pycache__/test_menu_coverage.cpython-313-pytest-8.4.2.pyc +0 -0
  264. package/omega/Agentik_Engine/tests/__pycache__/test_menu_coverage.cpython-313.pyc +0 -0
  265. package/omega/Agentik_Engine/tests/__pycache__/test_mission.cpython-313-pytest-8.4.2.pyc +0 -0
  266. package/omega/Agentik_Engine/tests/__pycache__/test_mission.cpython-313.pyc +0 -0
  267. package/omega/Agentik_Engine/tests/__pycache__/test_progress.cpython-313-pytest-8.4.2.pyc +0 -0
  268. package/omega/Agentik_Engine/tests/__pycache__/test_progress.cpython-313.pyc +0 -0
  269. package/omega/Agentik_Engine/tests/__pycache__/test_project.cpython-313-pytest-8.4.2.pyc +0 -0
  270. package/omega/Agentik_Engine/tests/__pycache__/test_project.cpython-313.pyc +0 -0
  271. package/omega/Agentik_Engine/tests/__pycache__/test_pursue_cadence.cpython-313-pytest-8.4.2.pyc +0 -0
  272. package/omega/Agentik_Engine/tests/__pycache__/test_pursue_cadence.cpython-313.pyc +0 -0
  273. package/omega/Agentik_Engine/tests/__pycache__/test_rag.cpython-313-pytest-8.4.2.pyc +0 -0
  274. package/omega/Agentik_Engine/tests/__pycache__/test_rag.cpython-313.pyc +0 -0
  275. package/omega/Agentik_Engine/tests/__pycache__/test_reducer.cpython-313-pytest-8.4.2.pyc +0 -0
  276. package/omega/Agentik_Engine/tests/__pycache__/test_reducer.cpython-313.pyc +0 -0
  277. package/omega/Agentik_Engine/tests/__pycache__/test_report.cpython-313-pytest-8.4.2.pyc +0 -0
  278. package/omega/Agentik_Engine/tests/__pycache__/test_report.cpython-313.pyc +0 -0
  279. package/omega/Agentik_Engine/tests/__pycache__/test_role_aliases_and_ssot.cpython-313-pytest-8.4.2.pyc +0 -0
  280. package/omega/Agentik_Engine/tests/__pycache__/test_role_aliases_and_ssot.cpython-313.pyc +0 -0
  281. package/omega/Agentik_Engine/tests/__pycache__/test_skill_discovery_and_gate.cpython-313-pytest-8.4.2.pyc +0 -0
  282. package/omega/Agentik_Engine/tests/__pycache__/test_skill_discovery_and_gate.cpython-313.pyc +0 -0
  283. package/omega/Agentik_Engine/tests/__pycache__/test_skill_power.cpython-313-pytest-8.4.2.pyc +0 -0
  284. package/omega/Agentik_Engine/tests/__pycache__/test_skill_power.cpython-313.pyc +0 -0
  285. package/omega/Agentik_Engine/tests/__pycache__/test_skill_routing.cpython-313-pytest-8.4.2.pyc +0 -0
  286. package/omega/Agentik_Engine/tests/__pycache__/test_skill_routing.cpython-313.pyc +0 -0
  287. package/omega/Agentik_Engine/tests/__pycache__/test_snapshot_partial.cpython-313-pytest-8.4.2.pyc +0 -0
  288. package/omega/Agentik_Engine/tests/__pycache__/test_snapshot_partial.cpython-313.pyc +0 -0
  289. package/omega/Agentik_Engine/tests/__pycache__/test_telegram_history.cpython-313-pytest-8.4.2.pyc +0 -0
  290. package/omega/Agentik_Engine/tests/__pycache__/test_telegram_history.cpython-313.pyc +0 -0
  291. package/omega/Agentik_Engine/tests/__pycache__/test_tmux_and_aisb_chat.cpython-313-pytest-8.4.2.pyc +0 -0
  292. package/omega/Agentik_Engine/tests/__pycache__/test_tmux_and_aisb_chat.cpython-313.pyc +0 -0
  293. package/omega/Agentik_Engine/tests/__pycache__/test_tools_and_sync.cpython-313-pytest-8.4.2.pyc +0 -0
  294. package/omega/Agentik_Engine/tests/__pycache__/test_tools_and_sync.cpython-313.pyc +0 -0
  295. package/omega/Agentik_Engine/tests/__pycache__/test_v06_features.cpython-313-pytest-8.4.2.pyc +0 -0
  296. package/omega/Agentik_Engine/tests/__pycache__/test_v06_features.cpython-313.pyc +0 -0
  297. package/omega/Agentik_Engine/tests/__pycache__/test_vault.cpython-313-pytest-8.4.2.pyc +0 -0
  298. package/omega/Agentik_Engine/tests/__pycache__/test_vault.cpython-313.pyc +0 -0
  299. package/omega/Agentik_Engine/tests/__pycache__/test_webhooks_and_readiness.cpython-313-pytest-8.4.2.pyc +0 -0
  300. package/omega/Agentik_Engine/tests/__pycache__/test_webhooks_and_readiness.cpython-313.pyc +0 -0
  301. package/omega/Agentik_Engine/tests/__pycache__/test_worker_and_cleanup.cpython-313-pytest-8.4.2.pyc +0 -0
  302. package/omega/Agentik_Engine/tests/__pycache__/test_worker_and_cleanup.cpython-313.pyc +0 -0
  303. package/omega/Agentik_Engine/tests/test_account.py +8 -3
  304. package/omega/Agentik_Engine/tests/test_adversarial.py +351 -0
  305. package/omega/Agentik_Engine/tests/test_agents_envelope.py +274 -0
  306. package/omega/Agentik_Engine/tests/test_audits_pipeline.py +348 -0
  307. package/omega/Agentik_Engine/tests/test_auto_update_and_migrations.py +394 -0
  308. package/omega/Agentik_Engine/tests/test_genesis_and_plan.py +573 -0
  309. package/omega/Agentik_Engine/tests/test_graphify.py +190 -0
  310. package/omega/Agentik_Engine/tests/test_handoff.py +311 -0
  311. package/omega/Agentik_Engine/tests/test_hermes_and_ua.py +387 -0
  312. package/omega/Agentik_Engine/tests/test_hermes_bootstrap_and_desktop.py +358 -0
  313. package/omega/Agentik_Engine/tests/test_install_steps.py +359 -0
  314. package/omega/Agentik_Engine/tests/test_install_ux.py +151 -0
  315. package/omega/Agentik_Engine/tests/test_installer_wiring.py +496 -0
  316. package/omega/Agentik_Engine/tests/test_intelligence.py +285 -0
  317. package/omega/Agentik_Engine/tests/test_llm_clis_and_uninstall.py +228 -0
  318. package/omega/Agentik_Engine/tests/test_managed_agent.py +363 -0
  319. package/omega/Agentik_Engine/tests/test_max_provider_and_menu.py +231 -0
  320. package/omega/Agentik_Engine/tests/test_menu_coverage.py +72 -0
  321. package/omega/Agentik_Engine/tests/test_pursue_cadence.py +217 -0
  322. package/omega/Agentik_Engine/tests/test_role_aliases_and_ssot.py +207 -0
  323. package/omega/Agentik_Engine/tests/test_skill_discovery_and_gate.py +337 -0
  324. package/omega/Agentik_Engine/tests/test_skill_power.py +259 -0
  325. package/omega/Agentik_Engine/tests/test_skill_routing.py +189 -0
  326. package/omega/Agentik_Engine/tests/test_telegram_history.py +209 -0
  327. package/omega/Agentik_Engine/tests/test_tmux_and_aisb_chat.py +223 -0
  328. package/omega/Agentik_Engine/tests/test_v06_features.py +370 -0
  329. package/omega/Agentik_Engine/tests/test_vault.py +173 -0
  330. package/omega/Agentik_Engine/tests/test_webhooks_and_readiness.py +277 -0
  331. package/omega/Agentik_Engine/tests/test_worker_and_cleanup.py +541 -0
  332. package/omega/Agentik_Extra/etc/secrets/.vault-key +3 -0
  333. package/omega/Agentik_Extra/etc/secrets/.vault-pub +1 -0
  334. package/omega/Agentik_Runtime/audits.db +0 -0
  335. package/omega/Agentik_SSOT/VERSION +1 -1
  336. package/omega/Agentik_SSOT/claude-plugins/claude-plugins.yaml +100 -0
  337. package/omega/Agentik_SSOT/docs/LAYERS.md +90 -0
  338. package/omega/Agentik_SSOT/docs/USER-JOURNEY.md +283 -0
  339. package/omega/Agentik_SSOT/docs/quality-arsenal/ARSENAL-INTERCONNECTIONS.md +283 -0
  340. package/omega/Agentik_SSOT/docs/quality-arsenal/ARSENAL-ORCHESTRATION-PLAYBOOK.md +364 -0
  341. package/omega/Agentik_SSOT/docs/quality-arsenal/AUDIT-VERIFICATION-CONTRACT.md +272 -0
  342. package/omega/Agentik_SSOT/docs/quality-arsenal/QUALITY-ARSENAL-PREAMBLE.md +462 -0
  343. package/omega/Agentik_SSOT/marketplaces/design-discipline.yaml +86 -0
  344. package/omega/Agentik_SSOT/skills/a11yaudit/SKILL.md +161 -0
  345. package/omega/Agentik_SSOT/skills/apiaudit/SKILL.md +157 -0
  346. package/omega/Agentik_SSOT/skills/audit-orchestrator.md +212 -0
  347. package/omega/Agentik_SSOT/skills/audit-pilot.md +466 -0
  348. package/omega/Agentik_SSOT/skills/audit-tracker.md +147 -0
  349. package/omega/Agentik_SSOT/skills/automationaudit/SKILL.md +161 -0
  350. package/omega/Agentik_SSOT/skills/cadence/SKILL.md +76 -0
  351. package/omega/Agentik_SSOT/skills/codeaudit/SKILL.md +153 -0
  352. package/omega/Agentik_SSOT/skills/copyaudit/SKILL.md +161 -0
  353. package/omega/Agentik_SSOT/skills/dataaudit/SKILL.md +157 -0
  354. package/omega/Agentik_SSOT/skills/debugaudit/SKILL.md +161 -0
  355. package/omega/Agentik_SSOT/skills/dispatch/SKILL.md +79 -0
  356. package/omega/Agentik_SSOT/skills/dxaudit/SKILL.md +161 -0
  357. package/omega/Agentik_SSOT/skills/featureaudit/SKILL.md +161 -0
  358. package/omega/Agentik_SSOT/skills/flowaudit/SKILL.md +165 -0
  359. package/omega/Agentik_SSOT/skills/genesis/SKILL.md +116 -0
  360. package/omega/Agentik_SSOT/skills/handoff/SKILL.md +117 -0
  361. package/omega/Agentik_SSOT/skills/logicaudit/SKILL.md +165 -0
  362. package/omega/Agentik_SSOT/skills/motionaudit/SKILL.md +165 -0
  363. package/omega/Agentik_SSOT/skills/newcmd.md +300 -0
  364. package/omega/Agentik_SSOT/skills/perfaudit/SKILL.md +161 -0
  365. package/omega/Agentik_SSOT/skills/plan/SKILL.md +127 -0
  366. package/omega/Agentik_SSOT/skills/pursue/SKILL.md +68 -0
  367. package/omega/Agentik_SSOT/skills/quality-arsenal.md +180 -0
  368. package/omega/Agentik_SSOT/skills/rag-route.md +9 -0
  369. package/omega/Agentik_SSOT/skills/refontaudit/SKILL.md +165 -0
  370. package/omega/Agentik_SSOT/skills/retentionaudit/SKILL.md +165 -0
  371. package/omega/Agentik_SSOT/skills/secaudit/SKILL.md +157 -0
  372. package/omega/Agentik_SSOT/skills/seoaudit/SKILL.md +161 -0
  373. package/omega/Agentik_SSOT/skills/skill-auditor/SKILL.md +83 -0
  374. package/omega/Agentik_SSOT/skills/skill-finder/SKILL.md +116 -0
  375. package/omega/Agentik_SSOT/skills/uiuxaudit/SKILL.md +165 -0
  376. package/package.json +2 -2
@@ -7,9 +7,10 @@ Agentik_Coding Agentik_Tools Agentik_Runtime Agentik_Extra"
7
7
 
8
8
  # --- 00 -----------------------------------------------------------------------
9
9
  step_preflight() {
10
- info "OS=$OMEGA_OS pkg=$OMEGA_PKG OMEGA_HOME=$OMEGA_HOME"
11
- if [ "$(id -u)" -eq 0 ]; then
12
- err "do not run as root create and use a non-root user with sudo"
10
+ info "OS=$OMEGA_OS pkg=$OMEGA_PKG user=$OMEGA_USER OMEGA_HOME=$OMEGA_HOME"
11
+ if [ "$(id -u)" -eq 0 ] && [ "${OMEGA_ALLOW_ROOT:-0}" != "1" ]; then
12
+ err "still running as root after user resolution refusing"
13
+ err "use --create-user or --user, or set OMEGA_ALLOW_ROOT=1 explicitly"
13
14
  return 1
14
15
  fi
15
16
  have git || { err "git is required"; return 1; }
@@ -20,27 +21,145 @@ step_preflight() {
20
21
 
21
22
  # --- 10 -----------------------------------------------------------------------
22
23
  step_system_deps() {
24
+ # `whiptail` powers `omega` (the interactive menu — the post-install entry
25
+ # point). On Debian/Ubuntu it lives in the `whiptail` package, on RHEL/Fedora
26
+ # in `newt`, on macOS in `newt` via Homebrew. We add it to the base set so a
27
+ # fresh Mac doesn't end up with a silent `omega` command.
23
28
  local pkgs="python3 git tmux sqlite3 jq curl"
24
29
  case "$OMEGA_PKG" in
25
- apt) sudo apt-get update -qq && sudo apt-get install -y -qq $pkgs python3-venv ;;
26
- dnf) sudo dnf install -y -q $pkgs ;;
27
- brew) brew install $pkgs 2>/dev/null || true ;;
28
- *) err "install manually: $pkgs"; return 1 ;;
30
+ apt) sudo apt-get update -qq && sudo apt-get install -y -qq $pkgs whiptail python3-venv python3-yaml ;;
31
+ dnf) sudo dnf install -y -q $pkgs newt python3-pyyaml ;;
32
+ brew) brew install $pkgs newt 2>/dev/null || true ;;
33
+ *) err "install manually: $pkgs (and whiptail/newt for the menu)"; return 1 ;;
29
34
  esac
35
+ # age (optional, non-fatal) — powers the encrypted vault. If missing, the
36
+ # vault transparently falls back to chmod 600 plaintext and the doctor
37
+ # flags it.
38
+ if ! have age; then
39
+ info "installing age (powers the encrypted secrets vault)"
40
+ case "$OMEGA_PKG" in
41
+ apt) sudo apt-get install -y -qq age 2>>"$LOG_FILE" || info "age install failed (non-fatal)" ;;
42
+ dnf) sudo dnf install -y -q age 2>>"$LOG_FILE" || info "age install failed (non-fatal)" ;;
43
+ brew) brew install age 2>>"$LOG_FILE" || info "age install failed (non-fatal)" ;;
44
+ esac
45
+ fi
30
46
  if ! have uv && [ ! -x "$HOME/.local/bin/uv" ]; then
31
47
  info "installing uv (Python package/venv manager)"
32
48
  curl -LsSf https://astral.sh/uv/install.sh | sh || { err "uv install failed"; return 1; }
33
49
  fi
50
+ # graphify (optional) — a Claude Code skill that turns any folder into a
51
+ # knowledge graph (graphify-out/graph.json). We install BOTH the CLI and
52
+ # the skill so the /graphify slash command is available in Claude Code.
53
+ # All failures here are non-fatal — the engine works without graphify.
54
+ local uv_bin; uv_bin="$(command -v uv || echo "$HOME/.local/bin/uv")"
55
+ if [ -x "$uv_bin" ] && ! have graphify; then
56
+ info "installing graphifyy CLI (optional — provides the /graphify Claude Code skill)"
57
+ if "$uv_bin" tool install graphifyy >>"$LOG_FILE" 2>&1; then
58
+ ok "graphifyy CLI installed"
59
+ else
60
+ info "graphifyy install failed (non-fatal); install later: uv tool install graphifyy"
61
+ fi
62
+ fi
63
+ if have graphify; then
64
+ info "registering /graphify skill into Claude Code"
65
+ if graphify install --platform claude >>"$LOG_FILE" 2>&1; then
66
+ ok "/graphify skill registered"
67
+ else
68
+ info "graphify install failed (non-fatal); run \`graphify install\` later"
69
+ fi
70
+ fi
34
71
  return 0
35
72
  }
36
73
 
37
74
  # --- 20 -----------------------------------------------------------------------
75
+ # --- 15 -----------------------------------------------------------------------
76
+ #
77
+ # step_llm_clis — install the agentic LLM CLIs the operator picked.
78
+ #
79
+ # Catalog (see bootstrap/lib/llm-clis.py): Claude Code, Gemini CLI, Codex,
80
+ # GLM SDK, Aider. Each installs via npm-global or uv-tool. The step is
81
+ # additive: an already-installed CLI is detected via shutil.which() and
82
+ # left alone unless the manifest says `force: true`.
83
+ #
84
+ # Manifest block:
85
+ #
86
+ # llm_clis:
87
+ # - claude_code
88
+ # - gemini_cli
89
+ # - codex
90
+ # # - glm_sdk
91
+ # # - aider
92
+ #
93
+ # Or the long form: `claude_code: true` etc.
94
+ step_llm_clis() {
95
+ local helper="$OMEGA_REPO/bootstrap/lib/llm-clis.py"
96
+ if [ ! -f "$helper" ]; then
97
+ info "llm-clis helper missing — skipping"
98
+ return 0
99
+ fi
100
+ if ! have npm; then
101
+ info "npm not on PATH — Node-based LLM CLIs will be skipped"
102
+ fi
103
+
104
+ local selection
105
+ if [ "${NONINTERACTIVE:-0}" = "1" ]; then
106
+ if [ -n "${MANIFEST:-}" ] && [ -f "$MANIFEST" ]; then
107
+ info "installing LLM CLIs from manifest"
108
+ python3 "$helper" install "$MANIFEST" | sed 's/^/ /'
109
+ return 0
110
+ fi
111
+ info "headless + no manifest llm_clis — skipping (run omega upgrade later)"
112
+ return 0
113
+ fi
114
+
115
+ # Interactive — whiptail checklist.
116
+ if ! have whiptail; then
117
+ info "no whiptail — falling back to plain y/n prompts for LLM CLIs"
118
+ selection=""
119
+ local ans
120
+ for id in claude_code gemini_cli codex glm_sdk aider; do
121
+ printf ' install %s? [n] ' "$id" >&2
122
+ read -r ans || ans=""
123
+ case "${ans:-n}" in y|Y|yes|YES) selection="$selection $id" ;; esac
124
+ done
125
+ if [ -n "$selection" ]; then
126
+ python3 "$helper" install $selection | sed 's/^/ /'
127
+ fi
128
+ return 0
129
+ fi
130
+
131
+ selection="$(whiptail --title "OmegaOS — LLM CLI installation" \
132
+ --checklist "Select agentic LLM CLIs to install (recommended pre-ticked):" \
133
+ 16 70 6 \
134
+ claude_code "Claude Code (Anthropic — \`claude\`)" ON \
135
+ gemini_cli "Gemini CLI (Google — \`gemini\`)" ON \
136
+ codex "Codex CLI (OpenAI — \`codex\`)" OFF \
137
+ glm_sdk "GLM / ZhipuAI Python SDK" OFF \
138
+ aider "Aider (community — \`aider\`)" OFF \
139
+ 3>&1 1>&2 2>&3 || true)"
140
+ if [ -z "$selection" ]; then
141
+ info "no LLM CLIs selected — skipping"
142
+ return 0
143
+ fi
144
+ # whiptail returns "id1" "id2" ... — strip quotes.
145
+ selection="$(printf '%s\n' $selection | tr -d '"' | tr '\n' ' ')"
146
+ python3 "$helper" install $selection | sed 's/^/ /'
147
+ return 0
148
+ }
149
+
38
150
  step_structure() {
39
151
  local b
40
152
  for b in $OMEGA_BLOCKS; do mkdir -p "$OMEGA_HOME/$b"; done
41
153
  mkdir -p "$OMEGA_HOME/Agentik_Runtime"/{eventlog,sessions,verdicts,memory,locks,snapshots}
42
154
  mkdir -p "$OMEGA_HOME/Agentik_Extra"/{var/cache,var/tmp,var/logs,staging/promotion,etc/secrets}
43
155
  chmod 700 "$OMEGA_HOME/Agentik_Extra/etc/secrets" 2>/dev/null || true
156
+ # Don't ever commit the runtime tree.
157
+ cat > "$OMEGA_HOME/Agentik_Extra/.gitignore" <<'EOF'
158
+ # Omega OS — these directories are runtime-only.
159
+ etc/secrets/
160
+ var/
161
+ staging/
162
+ EOF
44
163
  # deploy the repo's source blocks into the live tree
45
164
  if [ -d "${OMEGA_REPO:-}/omega" ]; then
46
165
  cp -R "$OMEGA_REPO/omega/." "$OMEGA_HOME/"
@@ -53,6 +172,85 @@ step_structure() {
53
172
  }
54
173
 
55
174
  # --- 30 -----------------------------------------------------------------------
175
+ # --- 25 -----------------------------------------------------------------------
176
+ #
177
+ # step_aisb_suite — ship the 13 AISB agent prompts into the SSOT.
178
+ #
179
+ # Without this, every role (oracle/worker/architect/keymaker/...) talks to
180
+ # the provider with a generic stub. With it, each role boots from the same
181
+ # rich agent definitions Gareth's home system uses — agents now have real
182
+ # identity, the LMC protocol, and the verified-completion contract.
183
+ step_aisb_suite() {
184
+ local src="$OMEGA_REPO/bootstrap/templates/aisb"
185
+ local dst="$OMEGA_HOME/Agentik_SSOT/agents/aisb"
186
+ if [ ! -d "$src" ]; then
187
+ info "no AISB templates at $src — skipping (system will use generic prompts)"
188
+ return 0
189
+ fi
190
+ mkdir -p "$dst" "$dst/checkers" "$dst/protocols"
191
+ # We use cp -R; the SSOT tree is operator-editable after install.
192
+ cp -R "$src/." "$dst/"
193
+ local count
194
+ count=$(find "$dst" -name "*.md" | wc -l | tr -d ' ')
195
+ ok "AISB suite installed: $count agent files at $dst"
196
+ return 0
197
+ }
198
+
199
+ # --- 27 -----------------------------------------------------------------------
200
+ #
201
+ # step_audit_skills — generate Claude Code SKILL.md for every audit.yaml.
202
+ #
203
+ # Each forensic audit (codeaudit, flowaudit, ...) becomes a first-class
204
+ # Claude Code skill at `Agentik_SSOT/skills/<id>/SKILL.md`, derived from
205
+ # the structured definition at `Agentik_SSOT/audits/<id>.yaml`. `omega sync`
206
+ # then projects each skill into the provider's native tree (~/.claude/skills/).
207
+ #
208
+ # Runs AFTER 25-aisb-suite (which deploys the SSOT tree) but BEFORE the
209
+ # engine venv (the generator only needs PyYAML which step 10 installed).
210
+ step_audit_skills() {
211
+ local generator="$OMEGA_REPO/omega/Agentik_Engine/omega_engine/audits/generator.py"
212
+ local audits_dir="$OMEGA_HOME/Agentik_SSOT/audits"
213
+ if [ ! -d "$audits_dir" ]; then
214
+ info "no audits dir at $audits_dir — skipping (step 20 incomplete?)"
215
+ return 0
216
+ fi
217
+ if [ ! -f "$generator" ]; then
218
+ info "audit skill generator missing — skipping"
219
+ return 0
220
+ fi
221
+ PYTHONPATH="$OMEGA_REPO/omega/Agentik_Engine" python3 - "$audits_dir" <<'PY'
222
+ import sys
223
+ from omega_engine.audits.generator import write_all
224
+ result = write_all(sys.argv[1])
225
+ print(f"audit SKILL.md: {result['written']} written, {result['skipped']} unchanged")
226
+ PY
227
+ }
228
+
229
+ # --- 33 -----------------------------------------------------------------------
230
+ #
231
+ # step_claude_code_settings — merge OmegaOS-driven settings into
232
+ # ~/.claude/settings.json.
233
+ #
234
+ # We enable the experimental Agent Teams flag, set the default
235
+ # permission mode to `bypassPermissions` (configurable in the manifest),
236
+ # and wire the Stop hook so `omega audit gate` blocks "I'm done"
237
+ # completion claims when an audit verdict is failing.
238
+ #
239
+ # Manifest block:
240
+ # claude_code_settings:
241
+ # experimental_agent_teams: true
242
+ # bypass_permissions: true
243
+ # audit_gate: true
244
+ step_claude_code_settings() {
245
+ local helper="$OMEGA_REPO/bootstrap/lib/claude-code-settings.py"
246
+ if [ ! -f "$helper" ]; then
247
+ info "claude-code-settings helper missing — skipping"
248
+ return 0
249
+ fi
250
+ python3 "$helper" "${MANIFEST:-/dev/null}" "$OMEGA_HOME" | sed 's/^/ /'
251
+ return 0
252
+ }
253
+
56
254
  step_engine() {
57
255
  local uv_bin; uv_bin="$(command -v uv || echo "$HOME/.local/bin/uv")"
58
256
  [ -x "$uv_bin" ] || { err "uv not found after step 10"; return 1; }
@@ -62,9 +260,86 @@ step_engine() {
62
260
  mkdir -p "$OMEGA_HOME/Agentik_Tools/bin"
63
261
  ln -sf "$OMEGA_HOME/Agentik_Engine/.venv/bin/omega" "$OMEGA_HOME/Agentik_Tools/bin/omega"
64
262
  ok "engine installed — omega CLI at Agentik_Tools/bin/omega"
263
+ # The engine is now importable — initialise the vault while we're here.
264
+ python3 "$OMEGA_REPO/bootstrap/lib/manifest-helpers.py" init-vault "$OMEGA_HOME" \
265
+ | sed 's/^/ /' || true
266
+ # tmux config is installed by step_tmux_config (separate step now so the
267
+ # "pro" profile + ~/.tmux.conf wire-up live in one place and can be reviewed
268
+ # on their own line in plan mode).
65
269
  return 0
66
270
  }
67
271
 
272
+ # --- 36 -----------------------------------------------------------------------
273
+ #
274
+ # step_tmux_config — install the "pro" tmux profile and wire ~/.tmux.conf.
275
+ #
276
+ # Writes two files:
277
+ # 1. $OMEGA_HOME/Agentik_Tools/tmux.conf (bundled, single source of truth)
278
+ # 2. ~/.tmux.conf (the user's live config)
279
+ #
280
+ # (2) gets a timestamped .bak.<ts> sibling whenever the existing content
281
+ # differs — re-runs that produce identical content are silent no-ops, so the
282
+ # step is fully idempotent without leaving piles of backups behind.
283
+ #
284
+ # Why "pro" by default: Termius paste-fix, session-kill forensics log, smart
285
+ # scroll in alt-screen panes (Claude Code TUI), extended keys, OSC 52
286
+ # clipboard. This matches the live OmegaVPS UX the operator already uses.
287
+ step_tmux_config() {
288
+ if ! have tmux; then
289
+ err "tmux not installed — step_system_deps should have caught this"
290
+ return 1
291
+ fi
292
+ PYTHONPATH="$OMEGA_HOME/Agentik_Engine" python3 - <<PY 2>>"$LOG_FILE"
293
+ import os
294
+ os.environ["OMEGA_HOME"] = "$OMEGA_HOME"
295
+ from pathlib import Path
296
+ from omega_engine.tmux import write_default_config, install_into_home_tmux_conf
297
+
298
+ # 1. Always write the bundled "pro" config — single source of truth.
299
+ bundled = write_default_config(profile="pro")
300
+ print(f" tmux bundled config: {bundled} (pro profile)")
301
+
302
+ # 2. Skip ~/.tmux.conf rewrite when it already matches the bundled content
303
+ # (otherwise re-runs spam timestamped backups for no reason).
304
+ home_conf = Path.home() / ".tmux.conf"
305
+ bundled_content = Path(bundled).read_text()
306
+ existing = home_conf.read_text() if home_conf.exists() else ""
307
+ if existing == bundled_content:
308
+ print(f" ~/.tmux.conf already matches pro profile — nothing to do")
309
+ else:
310
+ res = install_into_home_tmux_conf(profile="pro", backup=True)
311
+ if res["backup_path"]:
312
+ print(f" backed up previous ~/.tmux.conf -> {res['backup_path']}")
313
+ print(f" wrote pro profile to {res['written']}")
314
+ print(f" reload in-session: tmux source-file ~/.tmux.conf")
315
+ PY
316
+ return $?
317
+ }
318
+
319
+ # --- 37 -----------------------------------------------------------------------
320
+ #
321
+ # step_hermes_brief — seed Hermès with knowledge of OmegaOS.
322
+ #
323
+ # Writes ~/.hermes/skills/omega/SKILL.md so the Layer-2 Hermès companion
324
+ # understands what OmegaOS is, the L1-L5 architecture, the no-API-key
325
+ # principle, and the canonical engine commands. Without this seed, Hermès
326
+ # boots blind and the user has to teach it everything from scratch.
327
+ #
328
+ # Idempotent — write_brief() does an atomic write of the same content,
329
+ # so re-runs are quiet.
330
+ step_hermes_brief() {
331
+ PYTHONPATH="$OMEGA_HOME/Agentik_Engine" python3 - <<PY 2>>"$LOG_FILE"
332
+ import os
333
+ os.environ["OMEGA_HOME"] = "$OMEGA_HOME"
334
+ from omega_engine import hermes_bootstrap as HB
335
+ res = HB.write_brief()
336
+ print(f" Hermes brief: {res.path}")
337
+ print(f" bytes written: {res.bytes_written}")
338
+ print(f" memory log: {HB.memory_log_path()}")
339
+ PY
340
+ return $?
341
+ }
342
+
68
343
  # --- 40 -----------------------------------------------------------------------
69
344
  #
70
345
  # step_mcp — present the MCP/plugin catalog as a checklist (interactive) or
@@ -258,6 +533,10 @@ _mcp_collect_secrets() {
258
533
  fi
259
534
  done <<< "$refs"
260
535
  chmod 600 "$secfile"
536
+ # Migrate to the encrypted vault when age is active. Skipped silently when
537
+ # the vault is in plain mode or the file holds only placeholders.
538
+ python3 "$OMEGA_REPO/bootstrap/lib/manifest-helpers.py" encrypt-mcp-env \
539
+ "$OMEGA_HOME" "$id" 2>>"$LOG_FILE" | sed 's/^/ /' || true
261
540
  }
262
541
 
263
542
  # _mcp_register_in_config <id> — append/replace a row in mcp-config.yaml.
@@ -286,9 +565,208 @@ merge_mcp_config(home, {"id": mcp_id, "secret_refs": secret_refs, "enabled": Tru
286
565
  PY
287
566
  }
288
567
 
568
+ # --- 45 -----------------------------------------------------------------------
569
+ #
570
+ # step_claude_plugins — install Claude Code plugins from the SSOT catalog.
571
+ #
572
+ # Reads Agentik_SSOT/claude-plugins/claude-plugins.yaml:
573
+ # 1. registers each non-builtin marketplace via `claude plugin marketplace add`
574
+ # 2. installs each selected plugin via `claude plugin install <name>@<mkt> -s <scope>`
575
+ #
576
+ # Selection comes from the manifest's `claude_plugins:` list (headless) or a
577
+ # whiptail checklist (interactive). Failures on individual plugins are
578
+ # recorded but do not abort the step — Claude plugins are nice-to-have.
579
+ step_claude_plugins() {
580
+ local catalog="$OMEGA_HOME/Agentik_SSOT/claude-plugins/claude-plugins.yaml"
581
+ if [ ! -f "$catalog" ]; then
582
+ info "no Claude plugin catalog — skipping (step 20 should have deployed it)"
583
+ return 0
584
+ fi
585
+ if ! have claude; then
586
+ info "claude CLI not on PATH — skipping plugin install (install Claude Code first)"
587
+ return 0
588
+ fi
589
+
590
+ local selected=""
591
+ if [ "${NONINTERACTIVE:-0}" = "1" ]; then
592
+ if [ -n "${MANIFEST:-}" ] && [ -f "$MANIFEST" ]; then
593
+ selected="$(_claude_plugins_from_manifest "$MANIFEST")"
594
+ fi
595
+ if [ -z "$selected" ]; then
596
+ info "headless + no claude_plugins list — selecting recommended only"
597
+ selected="$(_claude_plugins_recommended "$catalog")"
598
+ fi
599
+ else
600
+ selected="$(_claude_plugins_prompt_checklist "$catalog")"
601
+ fi
602
+
603
+ if [ -z "$selected" ]; then
604
+ info "no Claude plugins selected — skipping (you can run \`claude plugin install\` later)"
605
+ return 0
606
+ fi
607
+
608
+ # Register every marketplace referenced by the selected plugins (excluding
609
+ # those marked `builtin: true`).
610
+ while IFS= read -r src; do
611
+ [ -z "$src" ] && continue
612
+ info "registering marketplace: $src"
613
+ if claude plugin marketplace add "$src" >>"$LOG_FILE" 2>&1; then
614
+ ok "marketplace ok: $src"
615
+ else
616
+ # Already registered or other non-fatal; log only.
617
+ info "marketplace add returned non-zero (may already be registered): $src"
618
+ fi
619
+ done < <(_claude_plugins_marketplaces_for "$catalog" "$selected")
620
+
621
+ local failed=""
622
+ local id
623
+ while IFS= read -r id; do
624
+ [ -z "$id" ] && continue
625
+ local spec scope
626
+ spec="$(_claude_plugins_install_spec "$catalog" "$id")"
627
+ scope="$(_claude_plugins_scope_for "$catalog" "$id")"
628
+ [ -z "$spec" ] && { info "no install spec for $id — skipping"; continue; }
629
+ info "installing claude plugin: $spec (scope=$scope)"
630
+ if claude plugin install "$spec" -s "$scope" >>"$LOG_FILE" 2>&1; then
631
+ ok "claude plugin installed: $id"
632
+ else
633
+ err "claude plugin $id failed to install — see $LOG_FILE; continuing"
634
+ failed="$failed $id"
635
+ fi
636
+ done <<< "$selected"
637
+
638
+ if [ -n "$failed" ]; then
639
+ err "Claude plugins that failed:$failed (the rest were installed)"
640
+ fi
641
+ return 0
642
+ }
643
+
644
+ # ----- step_claude_plugins helpers ------------------------------------------
645
+
646
+ _claude_plugins_recommended() {
647
+ python3 - "$1" <<'PY' || true
648
+ import sys, yaml
649
+ with open(sys.argv[1]) as f:
650
+ data = yaml.safe_load(f) or {}
651
+ for e in data.get("catalog") or []:
652
+ if e.get("recommended"):
653
+ print(e["id"])
654
+ PY
655
+ }
656
+
657
+ _claude_plugins_catalog_ids() {
658
+ python3 - "$1" <<'PY' || true
659
+ import sys, yaml
660
+ with open(sys.argv[1]) as f:
661
+ data = yaml.safe_load(f) or {}
662
+ for e in data.get("catalog") or []:
663
+ print(e["id"])
664
+ PY
665
+ }
666
+
667
+ _claude_plugins_from_manifest() {
668
+ python3 - "$1" <<'PY' || true
669
+ import sys, yaml
670
+ with open(sys.argv[1]) as f:
671
+ data = yaml.safe_load(f) or {}
672
+ for entry in data.get("claude_plugins") or []:
673
+ if isinstance(entry, dict):
674
+ print(entry.get("id", "").strip())
675
+ else:
676
+ print(str(entry).strip())
677
+ PY
678
+ }
679
+
680
+ # _claude_plugins_install_spec <catalog> <id> → "<name>@<marketplace>" string
681
+ _claude_plugins_install_spec() {
682
+ python3 - "$1" "$2" <<'PY' || true
683
+ import sys, yaml
684
+ with open(sys.argv[1]) as f:
685
+ data = yaml.safe_load(f) or {}
686
+ for e in data.get("catalog") or []:
687
+ if e.get("id") == sys.argv[2]:
688
+ name = e.get("name") or e["id"]
689
+ mkt = e.get("marketplace") or ""
690
+ print(f"{name}@{mkt}" if mkt else name)
691
+ break
692
+ PY
693
+ }
694
+
695
+ # _claude_plugins_scope_for <catalog> <id> → user|project|local (defaults user)
696
+ _claude_plugins_scope_for() {
697
+ python3 - "$1" "$2" <<'PY' || true
698
+ import sys, yaml
699
+ with open(sys.argv[1]) as f:
700
+ data = yaml.safe_load(f) or {}
701
+ for e in data.get("catalog") or []:
702
+ if e.get("id") == sys.argv[2]:
703
+ print(e.get("scope") or "user")
704
+ break
705
+ PY
706
+ }
707
+
708
+ # _claude_plugins_marketplaces_for <catalog> <selected-newline-ids> →
709
+ # newline-separated marketplace source strings (excluding builtin ones)
710
+ _claude_plugins_marketplaces_for() {
711
+ local catalog="$1" ids="$2"
712
+ python3 - "$catalog" <<PY || true
713
+ import sys, yaml
714
+ with open(sys.argv[1]) as f:
715
+ data = yaml.safe_load(f) or {}
716
+ selected = set("""${ids}""".strip().splitlines())
717
+ selected.discard("")
718
+ plugin_to_mkt = {
719
+ e["id"]: e.get("marketplace") for e in data.get("catalog") or []
720
+ }
721
+ needed_mkts = {plugin_to_mkt.get(p) for p in selected}
722
+ needed_mkts.discard(None)
723
+ seen = set()
724
+ for m in data.get("marketplaces") or []:
725
+ if m.get("id") in needed_mkts and not m.get("builtin"):
726
+ src = m.get("source") or ""
727
+ if src and src not in seen:
728
+ print(src)
729
+ seen.add(src)
730
+ PY
731
+ }
732
+
733
+ _claude_plugins_prompt_checklist() {
734
+ local catalog="$1" id recommended_set picks="" reply
735
+ recommended_set=" $(_claude_plugins_recommended "$catalog" | tr '\n' ' ')"
736
+ if have whiptail; then
737
+ local args=()
738
+ while IFS= read -r id; do
739
+ [ -z "$id" ] && continue
740
+ local pre="OFF"
741
+ case "$recommended_set" in *" $id "*) pre="ON" ;; esac
742
+ args+=("$id" "$id" "$pre")
743
+ done < <(_claude_plugins_catalog_ids "$catalog")
744
+ if [ "${#args[@]}" -eq 0 ]; then
745
+ printf ''
746
+ return 0
747
+ fi
748
+ picks="$(whiptail --title "Omega OS — Claude plugin checklist" \
749
+ --checklist "Select Claude Code plugins to install:" \
750
+ 18 70 10 "${args[@]}" 3>&1 1>&2 2>&3 || true)"
751
+ printf '%s\n' $picks | tr -d '"'
752
+ else
753
+ info "(no whiptail — falling back to a plain prompt)"
754
+ while IFS= read -r id; do
755
+ [ -z "$id" ] && continue
756
+ local default="n" pre=""
757
+ case "$recommended_set" in *" $id "*) default="y"; pre=" (recommended)" ;; esac
758
+ printf ' install %s%s? [%s] ' "$id" "$pre" "$default" >&2
759
+ read -r reply || reply=""
760
+ reply="${reply:-$default}"
761
+ case "$reply" in y|Y|yes|YES) picks="$picks $id" ;; esac
762
+ done < <(_claude_plugins_catalog_ids "$catalog")
763
+ printf '%s\n' $picks
764
+ fi
765
+ }
766
+
289
767
  # --- 50 -----------------------------------------------------------------------
290
768
  step_telegram() {
291
- local token
769
+ local token chat_id
292
770
  ask token "Telegram bot token (from @BotFather)" "${TELEGRAM_TOKEN:-}"
293
771
  if [ -z "$token" ]; then
294
772
  err "a Telegram bot token is required (or install with --profile minimal)"
@@ -304,34 +782,288 @@ step_telegram() {
304
782
  mkdir -p "$sec"
305
783
  printf 'TELEGRAM_TOKEN=%s\n' "$token" > "$sec/telegram.env"
306
784
  chmod 600 "$sec/telegram.env"
307
- ok "Telegram bot validated and wired (secret stored in the vault)"
785
+ # Also write the token into the encrypted vault for the new code path.
786
+ python3 - "$OMEGA_HOME" "$token" <<'PY' || true
787
+ import sys
788
+ from pathlib import Path
789
+ home = Path(sys.argv[1])
790
+ sys.path.insert(0, str(home / "Agentik_Engine"))
791
+ try:
792
+ from omega_engine.vault import vault_write
793
+ vault_write(home, "TELEGRAM_TOKEN", sys.argv[2])
794
+ except Exception as exc:
795
+ print(f"(vault write skipped: {exc})")
796
+ PY
797
+ ok "Telegram bot validated and wired"
798
+
799
+ # Capture the forum group chat id — manifest first, then prompt.
800
+ chat_id="$(python3 - "$MANIFEST" <<'PY' 2>/dev/null || true
801
+ import sys, yaml
802
+ try:
803
+ with open(sys.argv[1]) as f:
804
+ data = yaml.safe_load(f) or {}
805
+ print((data.get('telegram') or {}).get('group_chat_id', '') or '')
806
+ except Exception:
807
+ print('')
808
+ PY
809
+ )"
810
+ chat_id="${chat_id//$'\n'/}"
811
+ if [ -z "$chat_id" ]; then
812
+ ask chat_id "Telegram forum group chat id (e.g. -1001234567890; blank to set later)" ""
813
+ fi
814
+ if [ -n "$chat_id" ]; then
815
+ python3 "$OMEGA_REPO/bootstrap/lib/manifest-helpers.py" telegram-chat-id \
816
+ "$MANIFEST" "$OMEGA_HOME" 2>/dev/null | sed 's/^/ /' || true
817
+ # When chat_id came from the prompt (not the manifest), persist directly.
818
+ python3 - "$OMEGA_HOME" "$chat_id" <<'PY' || true
819
+ import sys
820
+ from pathlib import Path
821
+ home = Path(sys.argv[1])
822
+ sys.path.insert(0, str(home / "Agentik_Engine"))
823
+ try:
824
+ from omega_engine.vault import vault_write
825
+ vault_write(home, "TELEGRAM_GROUP_ID", sys.argv[2])
826
+ print(f"Telegram group_chat_id stored: {sys.argv[2]}")
827
+ except Exception as exc:
828
+ print(f"(vault write skipped: {exc})")
829
+ PY
830
+ else
831
+ info "no Telegram group_chat_id captured — set later with \`omega telegram set-group <id>\`"
832
+ fi
833
+ return 0
834
+ }
835
+
836
+ # --- 32 -----------------------------------------------------------------------
837
+ #
838
+ # step_accounts — populate the Claude Max pool from the manifest.
839
+ #
840
+ # For each entry under `accounts:`, add the account to the pool. If its
841
+ # `token_env` env var is set (e.g. `CLAUDE_OAUTH_max_primary`), write the
842
+ # token through the encrypted vault. Otherwise the account is added in
843
+ # `resting` state so `omega account login --id <id>` can finish the setup
844
+ # later — the engine sees the account but never assigns work to it until
845
+ # it has a token.
846
+ step_accounts() {
847
+ if [ -z "${MANIFEST:-}" ] || [ ! -f "$MANIFEST" ]; then
848
+ info "no manifest accounts — skipping (run \`omega account login\` later)"
849
+ return 0
850
+ fi
851
+ python3 "$OMEGA_REPO/bootstrap/lib/manifest-helpers.py" accounts \
852
+ "$MANIFEST" "$OMEGA_HOME" | sed 's/^/ /'
853
+ return 0
854
+ }
855
+
856
+ # --- 35 -----------------------------------------------------------------------
857
+ #
858
+ # step_providers — project the manifest's `providers:` list into the SSOT.
859
+ #
860
+ # The runtime ModelRouter reads `Agentik_SSOT/providers/router.yaml`; this
861
+ # step makes that file mirror the install manifest. Credentials are NEVER
862
+ # written here — they are env vars / vault refs. If no manifest is present
863
+ # we skip and the operator wires providers later via env or `omega account`.
864
+ step_providers() {
865
+ if [ -z "${MANIFEST:-}" ] || [ ! -f "$MANIFEST" ]; then
866
+ info "no manifest providers — skipping (set env vars or run \`omega account login\` later)"
867
+ return 0
868
+ fi
869
+ python3 "$OMEGA_REPO/bootstrap/lib/manifest-helpers.py" providers "$MANIFEST" "$OMEGA_HOME" \
870
+ >>"$LOG_FILE" 2>&1 || info "providers helper exited non-zero (non-fatal); see $LOG_FILE"
871
+ # Show the result on stdout for the operator.
872
+ python3 "$OMEGA_REPO/bootstrap/lib/manifest-helpers.py" providers "$MANIFEST" "$OMEGA_HOME" \
873
+ | sed 's/^/ /'
874
+ return 0
875
+ }
876
+
877
+ # --- 55 -----------------------------------------------------------------------
878
+ #
879
+ # step_autonomous — register charters listed under `autonomous_agents:`.
880
+ #
881
+ # Charters live in `Agentik_Orchestration/autonomous/<id>.yaml`. The
882
+ # AutonomousSupervisor (`omega daemon autonomous`) loads them at start. This
883
+ # step copies any selected template charter from `bootstrap/templates/
884
+ # autonomous/<id>.yaml` into the live tree. Charters not in the templates
885
+ # directory must be authored manually — we just log the gap.
886
+ step_autonomous() {
887
+ if [ -z "${MANIFEST:-}" ] || [ ! -f "$MANIFEST" ]; then
888
+ info "no manifest autonomous_agents — skipping (drop charter YAMLs later)"
889
+ return 0
890
+ fi
891
+ local templates="$OMEGA_REPO/bootstrap/templates/autonomous"
892
+ local target="$OMEGA_HOME/Agentik_Orchestration/autonomous"
893
+ mkdir -p "$target"
894
+ python3 "$OMEGA_REPO/bootstrap/lib/manifest-helpers.py" autonomous \
895
+ "$MANIFEST" "$templates" "$target" | sed 's/^/ /'
896
+ return 0
897
+ }
898
+
899
+ # --- 57 -----------------------------------------------------------------------
900
+ #
901
+ # step_rag — project `options.rag.{envelope,strategies}` from the manifest
902
+ # into `Agentik_SSOT/rag/config.yaml`. The multi-RAG router reads this at
903
+ # runtime to pick its envelope + which strategies to enable.
904
+ step_rag() {
905
+ if [ -z "${MANIFEST:-}" ] || [ ! -f "$MANIFEST" ]; then
906
+ info "no manifest RAG config — leaving defaults (Corrective + Hybrid)"
907
+ return 0
908
+ fi
909
+ python3 "$OMEGA_REPO/bootstrap/lib/manifest-helpers.py" rag \
910
+ "$MANIFEST" "$OMEGA_HOME" | sed 's/^/ /'
911
+ return 0
912
+ }
913
+
914
+ # --- 58 -----------------------------------------------------------------------
915
+ #
916
+ # step_first_project — create the project listed under `first_project:`.
917
+ #
918
+ # Idempotent: re-running an install that already created the project is a
919
+ # no-op. If a Telegram bridge is wired we bind a topic; otherwise the
920
+ # project is created without a topic and `omega project bind-topic` can
921
+ # attach one later.
922
+ step_first_project() {
923
+ if [ -z "${MANIFEST:-}" ] || [ ! -f "$MANIFEST" ]; then
924
+ info "no manifest first_project — skipping (run \`omega project <name>\` later)"
925
+ return 0
926
+ fi
927
+ OMEGA_HOME="$OMEGA_HOME" python3 \
928
+ "$OMEGA_REPO/bootstrap/lib/manifest-helpers.py" first-project \
929
+ "$MANIFEST" "$OMEGA_HOME" | sed 's/^/ /'
308
930
  return 0
309
931
  }
310
932
 
933
+ # --- 59 -----------------------------------------------------------------------
934
+ #
935
+ # step_hermes_session — guarantee one always-on Hermès chat session.
936
+ #
937
+ # Spawns the persistent `AISB-chat` tmux session running `omega aisb chat-loop`.
938
+ # This is the operator's terminal-side conversation entry point — critical
939
+ # when Telegram isn't wired (minimal profile, or chat_id not yet set), and
940
+ # still useful when it IS wired (an always-attached local fallback that does
941
+ # not need internet).
942
+ #
943
+ # Idempotent: if `AISB-chat` is already alive, we just print attach
944
+ # instructions.
945
+ step_hermes_session() {
946
+ if ! have tmux; then
947
+ err "tmux not installed — step_system_deps should have caught this"
948
+ return 1
949
+ fi
950
+ local omega="$OMEGA_HOME/Agentik_Tools/bin/omega"
951
+ [ -x "$omega" ] || { err "omega CLI not found at $omega — step_engine incomplete"; return 1; }
952
+
953
+ PYTHONPATH="$OMEGA_HOME/Agentik_Engine" python3 - <<PY 2>>"$LOG_FILE"
954
+ import os
955
+ os.environ["OMEGA_HOME"] = "$OMEGA_HOME"
956
+ from omega_engine import tmux
957
+ name = "AISB-chat"
958
+ if tmux.is_alive(name):
959
+ print(f" session already running: {name}")
960
+ else:
961
+ tmux.spawn_aisb_chat("$OMEGA_HOME")
962
+ print(f" spawned: {name} (always-on Hermès conversation)")
963
+ print(f" attach: {tmux.attach_command(name)}")
964
+ print(f" detach: Ctrl-b d (session keeps running)")
965
+ PY
966
+ return $?
967
+ }
968
+
311
969
  # --- 60 -----------------------------------------------------------------------
970
+ #
971
+ # step_services — install the 24/7 service layer.
972
+ #
973
+ # Linux: write 3 systemd user units, `daemon-reload`, then `enable --now`.
974
+ # Also enable `loginctl linger` so the units stay up when the operator
975
+ # is not logged in (the VPS case).
976
+ # macOS: write 3 launchd LaunchAgent plists into ~/Library/LaunchAgents/
977
+ # and `launchctl load` each. RunAtLoad + KeepAlive give the same
978
+ # 24/7 semantics as systemd.
312
979
  step_services() {
313
980
  if [ "${PROFILE:-vps}" = "minimal" ]; then
314
981
  info "minimal profile — no services installed"
315
982
  return 0
316
983
  fi
984
+ local omegabin="$OMEGA_HOME/Agentik_Tools/bin/omega"
985
+ [ -x "$omegabin" ] || { err "omega CLI not found at $omegabin — step 30 incomplete"; return 1; }
986
+
317
987
  if [ "$OMEGA_OS" = "linux" ]; then
318
- local unitdir="$HOME/.config/systemd/user"
319
- local omegabin="$OMEGA_HOME/Agentik_Tools/bin/omega"
320
- mkdir -p "$unitdir"
321
- _systemd_unit "Omega OS engine" "$omegabin daemon engine" \
322
- > "$unitdir/omega-engine.service"
323
- _systemd_unit "Omega OS Telegram bridge" "$omegabin daemon telegram" \
324
- > "$unitdir/omega-telegram.service"
325
- _systemd_unit "Omega OS autonomous supervisor" "$omegabin daemon autonomous" \
326
- > "$unitdir/omega-autonomous.service"
327
- info "systemd user units written to $unitdir"
328
- info "the 24/7 layer: \`systemctl --user enable --now omega-engine omega-telegram omega-autonomous\`"
988
+ _services_linux "$omegabin"
329
989
  else
330
- info "macOS — launchd plists for the workstation profile go here (build-out)"
990
+ _services_macos "$omegabin"
331
991
  fi
332
992
  return 0
333
993
  }
334
994
 
995
+ _services_linux() {
996
+ local omegabin="$1"
997
+ local unitdir="$HOME/.config/systemd/user"
998
+ mkdir -p "$unitdir"
999
+ _systemd_unit "Omega OS engine" "$omegabin daemon engine" \
1000
+ > "$unitdir/omega-engine.service"
1001
+ _systemd_unit "Omega OS Telegram bridge" "$omegabin daemon telegram" \
1002
+ > "$unitdir/omega-telegram.service"
1003
+ _systemd_unit "Omega OS autonomous supervisor" "$omegabin daemon autonomous" \
1004
+ > "$unitdir/omega-autonomous.service"
1005
+ info "systemd user units written to $unitdir"
1006
+
1007
+ # Enable linger so services survive logout (the VPS case).
1008
+ if have loginctl; then
1009
+ if sudo -n loginctl enable-linger "$OMEGA_USER" >>"$LOG_FILE" 2>&1; then
1010
+ ok "loginctl enable-linger $OMEGA_USER"
1011
+ else
1012
+ info "could not enable linger (sudo password required) — run later: sudo loginctl enable-linger $OMEGA_USER"
1013
+ fi
1014
+ fi
1015
+
1016
+ # systemctl --user needs a running user manager. Try; fall back to a hint.
1017
+ if systemctl --user daemon-reload >>"$LOG_FILE" 2>&1; then
1018
+ if systemctl --user enable --now \
1019
+ omega-engine.service omega-telegram.service omega-autonomous.service \
1020
+ >>"$LOG_FILE" 2>&1; then
1021
+ ok "systemd user services enabled and started (omega-engine, omega-telegram, omega-autonomous)"
1022
+ else
1023
+ err "systemctl --user enable failed — see $LOG_FILE; start manually with:"
1024
+ err " systemctl --user enable --now omega-engine omega-telegram omega-autonomous"
1025
+ fi
1026
+ else
1027
+ info "systemd --user not available in this session (no D-Bus / login session)"
1028
+ info "after first login: \`systemctl --user enable --now omega-engine omega-telegram omega-autonomous\`"
1029
+ fi
1030
+ }
1031
+
1032
+ _services_macos() {
1033
+ local omegabin="$1"
1034
+ local agentdir="$HOME/Library/LaunchAgents"
1035
+ local logdir="$OMEGA_HOME/Agentik_Extra/var/logs"
1036
+ mkdir -p "$agentdir" "$logdir"
1037
+
1038
+ _launchd_plist "com.agentikos.omega.engine" "$omegabin" "engine" \
1039
+ "$logdir/engine.log" "$logdir/engine.err.log" \
1040
+ > "$agentdir/com.agentikos.omega.engine.plist"
1041
+ _launchd_plist "com.agentikos.omega.telegram" "$omegabin" "telegram" \
1042
+ "$logdir/telegram.log" "$logdir/telegram.err.log" \
1043
+ > "$agentdir/com.agentikos.omega.telegram.plist"
1044
+ _launchd_plist "com.agentikos.omega.autonomous" "$omegabin" "autonomous" \
1045
+ "$logdir/autonomous.log" "$logdir/autonomous.err.log" \
1046
+ > "$agentdir/com.agentikos.omega.autonomous.plist"
1047
+
1048
+ info "launchd LaunchAgent plists written to $agentdir"
1049
+
1050
+ local label rc=0
1051
+ for label in com.agentikos.omega.engine com.agentikos.omega.telegram com.agentikos.omega.autonomous; do
1052
+ # `launchctl bootstrap` is the modern command; `load` works on every
1053
+ # supported macOS version. Try bootstrap first, fall back to load.
1054
+ if launchctl bootstrap "gui/$(id -u)" "$agentdir/$label.plist" >>"$LOG_FILE" 2>&1; then
1055
+ ok "launchd loaded: $label"
1056
+ elif launchctl load -w "$agentdir/$label.plist" >>"$LOG_FILE" 2>&1; then
1057
+ ok "launchd loaded (legacy): $label"
1058
+ else
1059
+ err "launchctl load failed for $label — start manually:"
1060
+ err " launchctl bootstrap gui/\$(id -u) $agentdir/$label.plist"
1061
+ rc=1
1062
+ fi
1063
+ done
1064
+ return $rc
1065
+ }
1066
+
335
1067
  _systemd_unit() { # _systemd_unit <description> <execstart>
336
1068
  cat <<EOF
337
1069
  [Unit]
@@ -350,6 +1082,43 @@ WantedBy=default.target
350
1082
  EOF
351
1083
  }
352
1084
 
1085
+ # _launchd_plist <label> <omegabin> <daemon> <stdout-log> <stderr-log>
1086
+ _launchd_plist() {
1087
+ cat <<EOF
1088
+ <?xml version="1.0" encoding="UTF-8"?>
1089
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
1090
+ <plist version="1.0">
1091
+ <dict>
1092
+ <key>Label</key>
1093
+ <string>$1</string>
1094
+ <key>ProgramArguments</key>
1095
+ <array>
1096
+ <string>$2</string>
1097
+ <string>daemon</string>
1098
+ <string>$3</string>
1099
+ </array>
1100
+ <key>EnvironmentVariables</key>
1101
+ <dict>
1102
+ <key>OMEGA_HOME</key>
1103
+ <string>$OMEGA_HOME</string>
1104
+ <key>PATH</key>
1105
+ <string>$PATH</string>
1106
+ </dict>
1107
+ <key>RunAtLoad</key>
1108
+ <true/>
1109
+ <key>KeepAlive</key>
1110
+ <true/>
1111
+ <key>StandardOutPath</key>
1112
+ <string>$4</string>
1113
+ <key>StandardErrorPath</key>
1114
+ <string>$5</string>
1115
+ <key>ThrottleInterval</key>
1116
+ <integer>10</integer>
1117
+ </dict>
1118
+ </plist>
1119
+ EOF
1120
+ }
1121
+
353
1122
  # --- 70 -----------------------------------------------------------------------
354
1123
  step_doctor() {
355
1124
  local omega="$OMEGA_HOME/Agentik_Tools/bin/omega"