@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
@@ -0,0 +1,541 @@
1
+ """Tests for omega_engine.worker (persistent-tmux dispatch) and
2
+ omega_engine.cleanup (OmegaOS-adapted disk cleanup).
3
+
4
+ The worker tests mock both ``tmux`` and ``claude``: the real binaries are
5
+ not on the test runner so we exercise the brief I/O, the model resolution,
6
+ the JSON-parse → ``.done.json`` path, and the status/list helpers.
7
+
8
+ The cleanup tests build a fake ``$OMEGA_HOME`` tree under ``tempfile`` and
9
+ assert per-tier bytes_freed / items_removed counts in dry-run AND real
10
+ modes.
11
+ """
12
+ from __future__ import annotations
13
+
14
+ import json
15
+ import os
16
+ import sys
17
+ import tempfile
18
+ import time
19
+ import unittest
20
+ from pathlib import Path
21
+ from unittest import mock
22
+
23
+
24
+ HERE = Path(__file__).resolve().parent
25
+ sys.path.insert(0, str(HERE.parent))
26
+
27
+ from omega_engine import worker as W # noqa: E402
28
+ from omega_engine import cleanup as C # noqa: E402
29
+
30
+
31
+ # ---------------------------------------------------------------------------
32
+ # Worker — model defaults
33
+ # ---------------------------------------------------------------------------
34
+
35
+
36
+ class TestDefaultModel(unittest.TestCase):
37
+ def test_worker_role_picks_opus_1m(self):
38
+ self.assertEqual(W.default_model_for_role("worker"),
39
+ "claude-opus-4-7[1m]")
40
+
41
+ def test_construct_role_picks_opus_1m(self):
42
+ self.assertEqual(W.default_model_for_role("construct"),
43
+ "claude-opus-4-7[1m]")
44
+
45
+ def test_oracle_role_picks_sonnet(self):
46
+ self.assertEqual(W.default_model_for_role("oracle"), "sonnet")
47
+
48
+ def test_manager_role_picks_sonnet(self):
49
+ self.assertEqual(W.default_model_for_role("manager"), "sonnet")
50
+
51
+ def test_audit_role_picks_sonnet(self):
52
+ self.assertEqual(W.default_model_for_role("audit"), "sonnet")
53
+
54
+ def test_classifier_role_picks_haiku(self):
55
+ self.assertEqual(W.default_model_for_role("classifier"), "haiku")
56
+
57
+ def test_unknown_role_falls_back_to_sonnet(self):
58
+ self.assertEqual(W.default_model_for_role("does-not-exist"), "sonnet")
59
+
60
+
61
+ class TestWorkerBrief(unittest.TestCase):
62
+ def test_resolved_model_uses_role_default(self):
63
+ b = W.WorkerBrief(task_id="t1", role="worker", intent="x")
64
+ self.assertEqual(b.resolved_model(), "claude-opus-4-7[1m]")
65
+
66
+ def test_explicit_model_overrides_role_default(self):
67
+ b = W.WorkerBrief(task_id="t1", role="worker", intent="x", model="haiku")
68
+ self.assertEqual(b.resolved_model(), "haiku")
69
+
70
+ def test_oracle_role_resolved_to_sonnet(self):
71
+ b = W.WorkerBrief(task_id="t1", role="oracle", intent="x")
72
+ self.assertEqual(b.resolved_model(), "sonnet")
73
+
74
+ def test_round_trip_json(self):
75
+ b = W.WorkerBrief(
76
+ task_id="t1", role="worker", intent="hello",
77
+ system_prompt="sys", user_prompt="usr",
78
+ project="myproj", cwd="/tmp",
79
+ verify_cmd="true", mission_id="m1",
80
+ )
81
+ loaded = W.WorkerBrief.from_dict(json.loads(b.to_json()))
82
+ self.assertEqual(loaded.task_id, "t1")
83
+ self.assertEqual(loaded.role, "worker")
84
+ self.assertEqual(loaded.user_prompt, "usr")
85
+ self.assertEqual(loaded.system_prompt, "sys")
86
+ self.assertEqual(loaded.project, "myproj")
87
+ self.assertEqual(loaded.cwd, "/tmp")
88
+ self.assertEqual(loaded.verify_cmd, "true")
89
+ self.assertEqual(loaded.mission_id, "m1")
90
+
91
+ def test_user_prompt_falls_back_to_intent_in_json(self):
92
+ b = W.WorkerBrief(task_id="t1", role="worker", intent="just do it")
93
+ data = json.loads(b.to_json())
94
+ self.assertEqual(data["user_prompt"], "just do it")
95
+
96
+
97
+ class TestBriefIO(unittest.TestCase):
98
+ def test_write_and_read_brief(self):
99
+ with tempfile.TemporaryDirectory() as tmp:
100
+ home = Path(tmp)
101
+ brief = W.WorkerBrief(task_id="t-test", role="worker", intent="hi")
102
+ p = W.write_brief(home, brief)
103
+ self.assertTrue(p.exists())
104
+ # private session dir
105
+ self.assertEqual(oct(p.parent.stat().st_mode)[-3:], "700")
106
+ loaded = W.read_brief(home, "t-test")
107
+ self.assertEqual(loaded.task_id, "t-test")
108
+ self.assertEqual(loaded.intent, "hi")
109
+
110
+ def test_read_brief_missing_raises(self):
111
+ with tempfile.TemporaryDirectory() as tmp:
112
+ with self.assertRaises(FileNotFoundError):
113
+ W.read_brief(Path(tmp), "no-such-task")
114
+
115
+
116
+ # ---------------------------------------------------------------------------
117
+ # Worker — spawn (mocked tmux)
118
+ # ---------------------------------------------------------------------------
119
+
120
+
121
+ def _fake_proc(stdout: str = "", returncode: int = 0, stderr: str = ""):
122
+ """Build a fake subprocess.CompletedProcess."""
123
+ import subprocess
124
+ return subprocess.CompletedProcess(
125
+ args=[], returncode=returncode, stdout=stdout, stderr=stderr,
126
+ )
127
+
128
+
129
+ class TestSpawn(unittest.TestCase):
130
+ def test_spawn_writes_brief_and_calls_tmux(self):
131
+ with tempfile.TemporaryDirectory() as tmp:
132
+ home = Path(tmp)
133
+ brief = W.WorkerBrief(
134
+ task_id="t-spawn", role="worker", intent="x",
135
+ project="Test",
136
+ )
137
+ calls = []
138
+
139
+ def fake_run(cmd, **kw):
140
+ calls.append(cmd)
141
+ # has-session must return non-zero (no existing session)
142
+ if cmd[:2] == ["tmux", "has-session"]:
143
+ return _fake_proc(returncode=1)
144
+ return _fake_proc()
145
+
146
+ with mock.patch.object(W.shutil, "which",
147
+ side_effect=lambda x: f"/fake/{x}"):
148
+ with mock.patch.object(W.subprocess, "run", side_effect=fake_run):
149
+ name = W.spawn_worker(brief, home=home, worker_id=2)
150
+ # Brief written
151
+ self.assertTrue((home / "Agentik_Runtime" / "sessions"
152
+ / "t-spawn" / "brief.json").exists())
153
+ # tmux new-session called
154
+ new_calls = [c for c in calls if c[:2] == ["tmux", "new-session"]]
155
+ self.assertEqual(len(new_calls), 1)
156
+ self.assertIn("Test-worker-2-x", name)
157
+ self.assertIn("Test-worker-2-x", new_calls[0])
158
+
159
+ def test_spawn_is_idempotent_if_session_exists(self):
160
+ with tempfile.TemporaryDirectory() as tmp:
161
+ home = Path(tmp)
162
+ brief = W.WorkerBrief(task_id="t-idem", role="worker", intent="x")
163
+
164
+ def fake_run(cmd, **kw):
165
+ if cmd[:2] == ["tmux", "has-session"]:
166
+ return _fake_proc(returncode=0) # exists
167
+ self.fail(f"unexpected tmux call: {cmd}")
168
+
169
+ with mock.patch.object(W.shutil, "which",
170
+ side_effect=lambda x: f"/fake/{x}"):
171
+ with mock.patch.object(W.subprocess, "run", side_effect=fake_run):
172
+ name = W.spawn_worker(brief, home=home, worker_id=1)
173
+ self.assertIn("worker-1-x", name)
174
+
175
+ def test_spawn_raises_without_tmux(self):
176
+ with tempfile.TemporaryDirectory() as tmp:
177
+ with mock.patch.object(W.shutil, "which", return_value=None):
178
+ with self.assertRaises(RuntimeError):
179
+ W.spawn_worker(
180
+ W.WorkerBrief(task_id="t", role="worker", intent="x"),
181
+ home=Path(tmp),
182
+ )
183
+
184
+
185
+ # ---------------------------------------------------------------------------
186
+ # Worker — run_brief (mocked claude)
187
+ # ---------------------------------------------------------------------------
188
+
189
+
190
+ class TestRunBrief(unittest.TestCase):
191
+ def test_happy_path_writes_done_clean(self):
192
+ with tempfile.TemporaryDirectory() as tmp:
193
+ home = Path(tmp)
194
+ brief = W.WorkerBrief(
195
+ task_id="t-run", role="worker", intent="reply orange",
196
+ user_prompt="reply orange",
197
+ )
198
+ W.write_brief(home, brief)
199
+ claude_json = json.dumps({
200
+ "result": "orange",
201
+ "session_id": "sess-123",
202
+ "total_cost_usd": 0.0012,
203
+ "usage": {"input_tokens": 10, "output_tokens": 1},
204
+ })
205
+ with mock.patch.object(W.subprocess, "run",
206
+ return_value=_fake_proc(stdout=claude_json)):
207
+ rc = W.run_brief(home, "t-run")
208
+ self.assertEqual(rc, 0)
209
+ done = json.loads(
210
+ (home / "Agentik_Runtime" / "sessions" / "t-run"
211
+ / ".done.json").read_text()
212
+ )
213
+ self.assertEqual(done["status"], "done_clean")
214
+ self.assertEqual(done["summary"], "orange")
215
+ self.assertEqual(done["artifacts"]["session_id"], "sess-123")
216
+ self.assertEqual(
217
+ done["artifacts"]["model"], "claude-opus-4-7[1m]"
218
+ )
219
+ self.assertAlmostEqual(
220
+ done["artifacts"]["usage"]["cost_usd"], 0.0012, places=4,
221
+ )
222
+
223
+ def test_claude_nonzero_writes_failed(self):
224
+ with tempfile.TemporaryDirectory() as tmp:
225
+ home = Path(tmp)
226
+ brief = W.WorkerBrief(task_id="t-fail", role="worker", intent="x")
227
+ W.write_brief(home, brief)
228
+ with mock.patch.object(W.subprocess, "run",
229
+ return_value=_fake_proc(
230
+ returncode=1, stderr="boom")):
231
+ rc = W.run_brief(home, "t-fail")
232
+ self.assertEqual(rc, 1)
233
+ done = json.loads(
234
+ (home / "Agentik_Runtime" / "sessions" / "t-fail"
235
+ / ".done.json").read_text()
236
+ )
237
+ self.assertEqual(done["status"], "failed")
238
+ self.assertIn("boom", done["errors"][0])
239
+
240
+ def test_missing_brief_writes_failed(self):
241
+ with tempfile.TemporaryDirectory() as tmp:
242
+ home = Path(tmp)
243
+ rc = W.run_brief(home, "t-missing")
244
+ self.assertEqual(rc, 1)
245
+ done = json.loads(
246
+ (home / "Agentik_Runtime" / "sessions" / "t-missing"
247
+ / ".done.json").read_text()
248
+ )
249
+ self.assertEqual(done["status"], "failed")
250
+ self.assertIn("missing brief", done["summary"])
251
+
252
+ def test_non_json_response_writes_failed(self):
253
+ with tempfile.TemporaryDirectory() as tmp:
254
+ home = Path(tmp)
255
+ brief = W.WorkerBrief(task_id="t-nj", role="worker", intent="x")
256
+ W.write_brief(home, brief)
257
+ with mock.patch.object(W.subprocess, "run",
258
+ return_value=_fake_proc(stdout="<html>not-json")):
259
+ rc = W.run_brief(home, "t-nj")
260
+ self.assertEqual(rc, 1)
261
+ done = json.loads(
262
+ (home / "Agentik_Runtime" / "sessions" / "t-nj"
263
+ / ".done.json").read_text()
264
+ )
265
+ self.assertEqual(done["status"], "failed")
266
+ self.assertIn("non-JSON", done["summary"])
267
+
268
+
269
+ class TestStatusAndList(unittest.TestCase):
270
+ def test_status_reads_done_json(self):
271
+ with tempfile.TemporaryDirectory() as tmp:
272
+ home = Path(tmp)
273
+ sess = home / "Agentik_Runtime" / "sessions" / "t-stat"
274
+ sess.mkdir(parents=True)
275
+ (sess / ".done.json").write_text(json.dumps({
276
+ "status": "done_clean", "summary": "ok",
277
+ "artifacts": {"model": "sonnet"},
278
+ }))
279
+ s = W.worker_status(home, "t-stat")
280
+ self.assertEqual(s["state"], "done_clean")
281
+ self.assertEqual(s["source"], ".done.json")
282
+
283
+ def test_status_absent_when_nothing(self):
284
+ with tempfile.TemporaryDirectory() as tmp:
285
+ with mock.patch.object(W.shutil, "which", return_value=None):
286
+ s = W.worker_status(Path(tmp), "no-such")
287
+ self.assertEqual(s["state"], "unknown")
288
+
289
+ def test_list_workers_skips_dirs_without_brief(self):
290
+ with tempfile.TemporaryDirectory() as tmp:
291
+ home = Path(tmp)
292
+ sess = home / "Agentik_Runtime" / "sessions"
293
+ (sess / "t-a").mkdir(parents=True)
294
+ (sess / "t-a" / "brief.json").write_text(json.dumps({
295
+ "task_id": "t-a", "role": "worker", "intent": "do A",
296
+ }))
297
+ (sess / "t-b").mkdir() # no brief
298
+ with mock.patch.object(W.shutil, "which", return_value=None):
299
+ rows = W.list_workers(home)
300
+ self.assertEqual(len(rows), 1)
301
+ self.assertEqual(rows[0]["task_id"], "t-a")
302
+ self.assertEqual(rows[0]["role"], "worker")
303
+ self.assertEqual(rows[0]["model"], "claude-opus-4-7[1m]")
304
+
305
+ def test_wait_for_done_returns_immediately_on_done(self):
306
+ with tempfile.TemporaryDirectory() as tmp:
307
+ home = Path(tmp)
308
+ sess = home / "Agentik_Runtime" / "sessions" / "t-w"
309
+ sess.mkdir(parents=True)
310
+ (sess / ".done.json").write_text(
311
+ json.dumps({"status": "done_clean"})
312
+ )
313
+ t0 = time.time()
314
+ s = W.wait_for_done(home, "t-w", timeout_s=10, poll_s=1)
315
+ self.assertLess(time.time() - t0, 2)
316
+ self.assertEqual(s["state"], "done_clean")
317
+
318
+ def test_wait_for_done_times_out(self):
319
+ with tempfile.TemporaryDirectory() as tmp:
320
+ with mock.patch.object(W.shutil, "which", return_value=None):
321
+ s = W.wait_for_done(Path(tmp), "no-task", timeout_s=1, poll_s=1)
322
+ self.assertEqual(s["state"], "timeout")
323
+
324
+
325
+ # ---------------------------------------------------------------------------
326
+ # Cleanup — tier helpers
327
+ # ---------------------------------------------------------------------------
328
+
329
+
330
+ def _make_fake_home(tmpdir: Path) -> Path:
331
+ """Build a minimal $OMEGA_HOME tree with all the dirs the cleaner touches."""
332
+ home = tmpdir / "Omega"
333
+ for sub in [
334
+ "Agentik_Runtime/sessions",
335
+ "Agentik_Runtime/eventlog",
336
+ "Agentik_Runtime/memory",
337
+ "Agentik_Extra/var/tmp",
338
+ "Agentik_Extra/var/cache",
339
+ "Agentik_Extra/var/logs",
340
+ "Agentik_Extra/staging/promotion",
341
+ "Agentik_Coding/projects",
342
+ ]:
343
+ (home / sub).mkdir(parents=True, exist_ok=True)
344
+ return home
345
+
346
+
347
+ def _set_mtime(p: Path, days_ago: float) -> None:
348
+ t = time.time() - days_ago * 86400
349
+ os.utime(p, (t, t))
350
+
351
+
352
+ class TestTier2Scratch(unittest.TestCase):
353
+ def test_removes_old_var_tmp_entries(self):
354
+ with tempfile.TemporaryDirectory() as tmp:
355
+ home = _make_fake_home(Path(tmp))
356
+ old = home / "Agentik_Extra" / "var" / "tmp" / "stale"
357
+ old.mkdir()
358
+ (old / "x").write_text("x" * 1024)
359
+ _set_mtime(old, 5)
360
+ recent = home / "Agentik_Extra" / "var" / "tmp" / "fresh"
361
+ recent.mkdir()
362
+ (recent / "y").write_text("y" * 1024)
363
+ # Dry-run first
364
+ r = C.tier2_scratch(home, dry_run=True)
365
+ self.assertGreaterEqual(r.items_removed, 1)
366
+ self.assertTrue(old.exists())
367
+ # Real
368
+ r = C.tier2_scratch(home, dry_run=False)
369
+ self.assertFalse(old.exists())
370
+ self.assertTrue(recent.exists())
371
+
372
+ def test_skips_recent_var_cache(self):
373
+ with tempfile.TemporaryDirectory() as tmp:
374
+ home = _make_fake_home(Path(tmp))
375
+ recent = home / "Agentik_Extra" / "var" / "cache" / "today"
376
+ recent.mkdir()
377
+ (recent / "z").write_text("z")
378
+ r = C.tier2_scratch(home, dry_run=False)
379
+ self.assertEqual(r.items_removed, 0)
380
+ self.assertTrue(recent.exists())
381
+
382
+
383
+ class TestTier3Runtime(unittest.TestCase):
384
+ def test_delegates_to_prune_and_aggregates(self):
385
+ # Just verify it returns a report without erroring on an empty home.
386
+ with tempfile.TemporaryDirectory() as tmp:
387
+ home = _make_fake_home(Path(tmp))
388
+ r = C.tier3_runtime(home, older_than_days=30, dry_run=True)
389
+ self.assertEqual(r.tier, "3 runtime DBs+sessions")
390
+ self.assertEqual(r.items_removed, 0)
391
+ self.assertIn("events", r.detail)
392
+ self.assertIn("sessions", r.detail)
393
+
394
+
395
+ class TestTier5NodeModules(unittest.TestCase):
396
+ def test_removes_node_modules_for_idle_project(self):
397
+ with tempfile.TemporaryDirectory() as tmp:
398
+ home = _make_fake_home(Path(tmp))
399
+ # Idle project
400
+ idle = home / "Agentik_Coding" / "projects" / "idle-proj"
401
+ idle.mkdir()
402
+ (idle / "README.md").write_text("hello")
403
+ _set_mtime(idle / "README.md", 14)
404
+ _set_mtime(idle, 14)
405
+ nm = idle / "node_modules"
406
+ nm.mkdir()
407
+ (nm / "pkg").write_text("a" * 2048)
408
+ # Active project
409
+ active = home / "Agentik_Coding" / "projects" / "active-proj"
410
+ active.mkdir()
411
+ (active / "main.py").write_text("# hi")
412
+ anm = active / "node_modules"
413
+ anm.mkdir()
414
+ (anm / "pkg").write_text("b" * 1024)
415
+
416
+ # Dry-run
417
+ r = C.tier5_node_modules(home, idle_days=7, dry_run=True)
418
+ self.assertEqual(r.items_removed, 1)
419
+ self.assertIn("active-proj", r.skipped)
420
+ self.assertTrue(nm.exists())
421
+
422
+ # Real
423
+ r = C.tier5_node_modules(home, idle_days=7, dry_run=False)
424
+ self.assertEqual(r.items_removed, 1)
425
+ self.assertFalse(nm.exists())
426
+ self.assertTrue(anm.exists())
427
+
428
+ def test_no_projects_returns_empty(self):
429
+ with tempfile.TemporaryDirectory() as tmp:
430
+ home = _make_fake_home(Path(tmp))
431
+ r = C.tier5_node_modules(home, idle_days=7, dry_run=False)
432
+ self.assertEqual(r.items_removed, 0)
433
+
434
+
435
+ class TestTier6Logs(unittest.TestCase):
436
+ def test_truncates_oversized_log_keeps_tail(self):
437
+ with tempfile.TemporaryDirectory() as tmp:
438
+ home = _make_fake_home(Path(tmp))
439
+ log = home / "Agentik_Extra" / "var" / "logs" / "big.log"
440
+ # 30 MB to trigger truncation (default threshold is 20 MB)
441
+ content = (b"x" * 1024) * 30 * 1024
442
+ log.write_bytes(content)
443
+ r = C.tier6_logs(home, max_log_mb=20, keep_tail_mb=1, dry_run=False)
444
+ self.assertEqual(r.items_removed, 1)
445
+ # File still exists, size around 1 MB
446
+ self.assertTrue(log.exists())
447
+ self.assertLessEqual(log.stat().st_size, 2 * 1024 * 1024)
448
+
449
+ def test_small_logs_untouched(self):
450
+ with tempfile.TemporaryDirectory() as tmp:
451
+ home = _make_fake_home(Path(tmp))
452
+ log = home / "Agentik_Extra" / "var" / "logs" / "small.log"
453
+ log.write_bytes(b"tiny")
454
+ r = C.tier6_logs(home, max_log_mb=20, dry_run=False)
455
+ self.assertEqual(r.items_removed, 0)
456
+ self.assertEqual(log.read_bytes(), b"tiny")
457
+
458
+
459
+ class TestDeepStaging(unittest.TestCase):
460
+ def test_removes_old_insights_only(self):
461
+ with tempfile.TemporaryDirectory() as tmp:
462
+ home = _make_fake_home(Path(tmp))
463
+ staging = home / "Agentik_Extra" / "staging" / "promotion"
464
+ old = staging / "insight-old.json"
465
+ old.write_text("{}")
466
+ _set_mtime(old, 30)
467
+ fresh = staging / "insight-fresh.json"
468
+ fresh.write_text("{}")
469
+ r = C.deep_staging(home, older_than_days=14, dry_run=False)
470
+ self.assertEqual(r.items_removed, 1)
471
+ self.assertFalse(old.exists())
472
+ self.assertTrue(fresh.exists())
473
+
474
+
475
+ class TestDeepTranscripts(unittest.TestCase):
476
+ def test_drops_completed_old_transcripts_only(self):
477
+ with tempfile.TemporaryDirectory() as tmp:
478
+ home = _make_fake_home(Path(tmp))
479
+ sess_root = home / "Agentik_Runtime" / "sessions"
480
+ # Completed + old → eligible
481
+ done_old = sess_root / "t-old"
482
+ done_old.mkdir()
483
+ (done_old / ".done.json").write_text("{}")
484
+ tr = done_old / "transcript.json"
485
+ tr.write_text("x" * 4096)
486
+ _set_mtime(tr, 14)
487
+ # Completed + fresh → keep
488
+ done_new = sess_root / "t-new"
489
+ done_new.mkdir()
490
+ (done_new / ".done.json").write_text("{}")
491
+ tr2 = done_new / "transcript.json"
492
+ tr2.write_text("y" * 100)
493
+ # In-flight (no .done.json) → keep
494
+ inflight = sess_root / "t-inflight"
495
+ inflight.mkdir()
496
+ tr3 = inflight / "transcript.json"
497
+ tr3.write_text("z" * 4096)
498
+ _set_mtime(tr3, 30)
499
+ r = C.deep_transcripts(home, older_than_days=7, dry_run=False)
500
+ self.assertEqual(r.items_removed, 1)
501
+ self.assertFalse(tr.exists())
502
+ self.assertTrue(tr2.exists())
503
+ self.assertTrue(tr3.exists()) # in-flight stays
504
+
505
+
506
+ class TestCleanupOrchestrator(unittest.TestCase):
507
+ def test_dry_run_returns_reports_no_disk_change(self):
508
+ with tempfile.TemporaryDirectory() as tmp:
509
+ home = _make_fake_home(Path(tmp))
510
+ (home / "Agentik_Extra" / "var" / "tmp" / "scratch").mkdir()
511
+ _set_mtime(home / "Agentik_Extra" / "var" / "tmp" / "scratch", 5)
512
+ reports = C.cleanup(home, dry_run=True, deep=False)
513
+ # 6 tiers, no deep
514
+ self.assertEqual(len(reports), 6)
515
+ self.assertTrue(all(r.dry_run for r in reports))
516
+ # scratch dir still present
517
+ self.assertTrue(
518
+ (home / "Agentik_Extra" / "var" / "tmp" / "scratch").exists()
519
+ )
520
+
521
+ def test_deep_runs_extra_tiers(self):
522
+ with tempfile.TemporaryDirectory() as tmp:
523
+ home = _make_fake_home(Path(tmp))
524
+ reports = C.cleanup(home, dry_run=True, deep=True)
525
+ # 6 base + 5 deep
526
+ self.assertEqual(len(reports), 11)
527
+ deep_tiers = [r for r in reports if r.tier.startswith("D ")]
528
+ self.assertEqual(len(deep_tiers), 5)
529
+
530
+ def test_format_summary_includes_total(self):
531
+ with tempfile.TemporaryDirectory() as tmp:
532
+ home = _make_fake_home(Path(tmp))
533
+ reports = C.cleanup(home, dry_run=True)
534
+ text = C.format_summary(reports, home)
535
+ self.assertIn("OmegaOS cleanup", text)
536
+ self.assertIn("total freed", text)
537
+ self.assertIn(str(home), text)
538
+
539
+
540
+ if __name__ == "__main__":
541
+ unittest.main()
@@ -0,0 +1,3 @@
1
+ # created: 2026-05-23T12:06:13Z
2
+ # public key: age1vt9qtm4tg6am23lp88ja5cdxl9jnn7cdhuyp39yh76f3wken2dpskukvt4
3
+ AGE-SECRET-KEY-1GGNKC2Q3APMD9H632N38HETTAHM9EJPCFMRJHYF3H34HWQCVL60QG5AHVP
@@ -0,0 +1 @@
1
+ age1vt9qtm4tg6am23lp88ja5cdxl9jnn7cdhuyp39yh76f3wken2dpskukvt4
Binary file
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.19.6
@@ -0,0 +1,100 @@
1
+ # Omega OS — Claude Code plugin catalog.
2
+ #
3
+ # The installer's 45-claude-plugins step reads this file to present a checklist
4
+ # (interactive) or apply the manifest's `claude_plugins:` list (headless). For
5
+ # each selected plugin, the installer:
6
+ #
7
+ # 1. ensures the marketplace is registered: `claude plugin marketplace add <source>`
8
+ # (skipped if `source: builtin` — already present after a fresh install)
9
+ # 2. installs it: `claude plugin install <name>@<marketplace> -s <scope>`
10
+ #
11
+ # Maintained by the claudecode-educator (Agentik_Orchestration/educators/).
12
+ # Secrets are referenced by name only — never stored here.
13
+ #
14
+ # Marketplaces are listed once; plugins reference them by `marketplace:` id.
15
+
16
+ version: 1
17
+
18
+ marketplaces:
19
+ - id: claude-plugins-official
20
+ source: "github:anthropics/claude-plugins-official"
21
+ description: "Anthropic's official plugin marketplace"
22
+ builtin: true
23
+ - id: anthropic-skills
24
+ source: "github:anthropics/skills"
25
+ description: "Anthropic's official skill collection (find-skills, document skills, etc.)"
26
+ builtin: false
27
+ trust: high
28
+ - id: vercel-labs-skills
29
+ source: "github:vercel-labs/skills"
30
+ description: "Vercel Labs skills (skill discovery CLI + find-skills)"
31
+ builtin: false
32
+ trust: high
33
+ - id: davila7-templates
34
+ source: "github:davila7/claude-code-templates"
35
+ description: "Community-maintained Claude Code templates and skills"
36
+ builtin: false
37
+ trust: medium
38
+ - id: thedotmack
39
+ source: "github:thedotmack/claude-mem"
40
+ description: "claude-mem memory + observation system"
41
+ builtin: false
42
+ trust: medium
43
+
44
+ catalog:
45
+ - id: claude-mem
46
+ name: claude-mem
47
+ description: "Long-term memory + observation system across sessions"
48
+ category: memory
49
+ marketplace: thedotmack
50
+ scope: user
51
+ recommended: true
52
+
53
+ - id: frontend-design
54
+ name: frontend-design
55
+ description: "Frontend UI/UX patterns and component scaffolding"
56
+ category: ui
57
+ marketplace: claude-plugins-official
58
+ scope: user
59
+ recommended: true
60
+
61
+ - id: playground
62
+ name: playground
63
+ description: "Interactive playground for experimenting with plugins"
64
+ category: dev
65
+ marketplace: claude-plugins-official
66
+ scope: user
67
+ recommended: false
68
+
69
+ - id: stripe
70
+ name: stripe
71
+ description: "Stripe payments — products, prices, subscriptions, webhooks"
72
+ category: integrations
73
+ marketplace: claude-plugins-official
74
+ scope: project
75
+ secrets: [STRIPE_SECRET_KEY]
76
+ recommended: false
77
+
78
+ - id: skill-creator
79
+ name: skill-creator
80
+ description: "Generate new SKILL.md files with Claude's help (Anthropic official)"
81
+ category: meta
82
+ marketplace: anthropic-skills
83
+ scope: user
84
+ recommended: true
85
+
86
+ - id: find-skills
87
+ name: find-skills
88
+ description: "Discover skills across marketplaces (vercel-labs); pairs with skill-auditor"
89
+ category: meta
90
+ marketplace: vercel-labs-skills
91
+ scope: user
92
+ recommended: true
93
+
94
+ - id: document-skills
95
+ name: document-skills
96
+ description: "Anthropic official suite — docx, pdf, pptx, xlsx (creation + editing)"
97
+ category: documents
98
+ marketplace: anthropic-skills
99
+ scope: user
100
+ recommended: true