@agentikos/omega-os 0.1.0 → 0.19.5
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.
- package/README.md +56 -14
- package/bootstrap/lib/__pycache__/claude-code-settings.cpython-313.pyc +0 -0
- package/bootstrap/lib/__pycache__/llm-clis.cpython-313.pyc +0 -0
- package/bootstrap/lib/__pycache__/manifest-helpers.cpython-313.pyc +0 -0
- package/bootstrap/lib/claude-code-settings.py +176 -0
- package/bootstrap/lib/common.sh +457 -1
- package/bootstrap/lib/llm-clis.py +341 -0
- package/bootstrap/lib/manifest-helpers.py +384 -0
- package/bootstrap/lib/steps.sh +1000 -26
- package/bootstrap/manifest.example.yaml +93 -2
- package/bootstrap/templates/aisb/CLAUDE.md +305 -0
- package/bootstrap/templates/aisb/architect.md +204 -0
- package/bootstrap/templates/aisb/checkers/CLAUDE.md +9 -0
- package/bootstrap/templates/aisb/checkers/checker-architect.md +151 -0
- package/bootstrap/templates/aisb/checkers/checker-common.md +171 -0
- package/bootstrap/templates/aisb/checkers/checker-construct.md +129 -0
- package/bootstrap/templates/aisb/checkers/checker-keymaker.md +204 -0
- package/bootstrap/templates/aisb/checkers/checker-link.md +205 -0
- package/bootstrap/templates/aisb/checkers/checker-merovingian.md +219 -0
- package/bootstrap/templates/aisb/checkers/checker-morpheus.md +211 -0
- package/bootstrap/templates/aisb/checkers/checker-neo.md +177 -0
- package/bootstrap/templates/aisb/checkers/checker-niobe.md +156 -0
- package/bootstrap/templates/aisb/checkers/checker-oracle.md +164 -0
- package/bootstrap/templates/aisb/checkers/checker-seraph.md +187 -0
- package/bootstrap/templates/aisb/checkers/checker-smith.md +195 -0
- package/bootstrap/templates/aisb/checkers/checker-zion.md +113 -0
- package/bootstrap/templates/aisb/construct.md +135 -0
- package/bootstrap/templates/aisb/keymaker.md +227 -0
- package/bootstrap/templates/aisb/link.md +170 -0
- package/bootstrap/templates/aisb/lmc-protocol.md +57 -0
- package/bootstrap/templates/aisb/merovingian.md +159 -0
- package/bootstrap/templates/aisb/morpheus.md +243 -0
- package/bootstrap/templates/aisb/neo.md +147 -0
- package/bootstrap/templates/aisb/niobe.md +197 -0
- package/bootstrap/templates/aisb/oracle.md +244 -0
- package/bootstrap/templates/aisb/protocols/handoff-templates.md +204 -0
- package/bootstrap/templates/aisb/protocols/shared-protocol.md +248 -0
- package/bootstrap/templates/aisb/pythia.md +153 -0
- package/bootstrap/templates/aisb/seraph.md +315 -0
- package/bootstrap/templates/aisb/smith.md +202 -0
- package/bootstrap/templates/aisb/zion.md +172 -0
- package/bootstrap/templates/autonomous/audit-patrol.yaml +41 -0
- package/bootstrap/templates/autonomous/smith-reflect.yaml +43 -0
- package/bootstrap/templates/autonomous/ssh-key-rotate.yaml +46 -0
- package/bootstrap/templates/autonomous/support-agent.yaml +38 -0
- package/docs/AUDITS.md +85 -0
- package/docs/COMPLETION-PLAN.md +48 -0
- package/docs/GAP-ANALYSIS.md +214 -0
- package/docs/INSTALL.md +47 -9
- package/docs/MCP-AND-PLUGINS.md +31 -4
- package/docs/SIMULATION.md +171 -0
- package/docs/simulate.sh +211 -0
- package/install.sh +164 -17
- package/omega/Agentik_Engine/README.md +27 -10
- package/omega/Agentik_Engine/omega_engine/__init__.py +212 -2
- package/omega/Agentik_Engine/omega_engine/__pycache__/__init__.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/account.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/agent_messages.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/aisb_chat.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/audit_diff.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/audit_gate.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/auto_update.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/autonomous.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/backup.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/cadence.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/classifier.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/cleanup.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/cli.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/completions.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/costs.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/done_signal.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/envelope.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/executor.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/handoff.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/hermes.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/hermes_bootstrap.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/hermes_desktop.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/learning.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/managed_agent.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/memory.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/menu.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/mission.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/plan.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/project.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/prompts.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/provider.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/prune.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/pursue.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/reducer.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/router.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/skill_routing.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/smoke.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/store.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/sync.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/telegram_history.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/tmux.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/tools.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/understand_anything.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/updater.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/validate.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/vault.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/webhooks.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/worker.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/account.py +502 -0
- package/omega/Agentik_Engine/omega_engine/agent_messages.py +167 -0
- package/omega/Agentik_Engine/omega_engine/aisb_chat.py +128 -0
- package/omega/Agentik_Engine/omega_engine/audit_diff.py +99 -0
- package/omega/Agentik_Engine/omega_engine/audit_gate.py +149 -0
- package/omega/Agentik_Engine/omega_engine/audits/__init__.py +60 -0
- package/omega/Agentik_Engine/omega_engine/audits/__pycache__/__init__.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/audits/__pycache__/batcher.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/audits/__pycache__/dispatcher.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/audits/__pycache__/generator.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/audits/__pycache__/history.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/audits/__pycache__/pipeline.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/audits/batcher.py +218 -0
- package/omega/Agentik_Engine/omega_engine/audits/dispatcher.py +92 -0
- package/omega/Agentik_Engine/omega_engine/audits/generator.py +234 -0
- package/omega/Agentik_Engine/omega_engine/audits/history.py +168 -0
- package/omega/Agentik_Engine/omega_engine/audits/pipeline.py +198 -0
- package/omega/Agentik_Engine/omega_engine/auto_update.py +339 -0
- package/omega/Agentik_Engine/omega_engine/autonomous.py +538 -0
- package/omega/Agentik_Engine/omega_engine/backup.py +215 -0
- package/omega/Agentik_Engine/omega_engine/cadence.py +158 -0
- package/omega/Agentik_Engine/omega_engine/classifier.py +215 -0
- package/omega/Agentik_Engine/omega_engine/cleanup.py +673 -0
- package/omega/Agentik_Engine/omega_engine/cli.py +4564 -56
- package/omega/Agentik_Engine/omega_engine/completions.py +260 -0
- package/omega/Agentik_Engine/omega_engine/costs.py +100 -0
- package/omega/Agentik_Engine/omega_engine/daemons/__init__.py +14 -0
- package/omega/Agentik_Engine/omega_engine/daemons/__pycache__/__init__.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/daemons/__pycache__/autonomous.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/daemons/__pycache__/engine.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/daemons/__pycache__/telegram.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/daemons/autonomous.py +56 -0
- package/omega/Agentik_Engine/omega_engine/daemons/engine.py +236 -0
- package/omega/Agentik_Engine/omega_engine/daemons/telegram.py +315 -0
- package/omega/Agentik_Engine/omega_engine/done_signal.py +154 -0
- package/omega/Agentik_Engine/omega_engine/educators/__init__.py +51 -0
- package/omega/Agentik_Engine/omega_engine/educators/__pycache__/__init__.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/educators/__pycache__/artifact.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/educators/__pycache__/automation.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/educators/__pycache__/base.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/educators/__pycache__/claudecode.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/educators/__pycache__/connection.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/educators/__pycache__/coworker.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/educators/__pycache__/loop.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/educators/__pycache__/prompt.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/educators/__pycache__/skill.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/educators/artifact.py +65 -0
- package/omega/Agentik_Engine/omega_engine/educators/automation.py +76 -0
- package/omega/Agentik_Engine/omega_engine/educators/base.py +327 -0
- package/omega/Agentik_Engine/omega_engine/educators/claudecode.py +71 -0
- package/omega/Agentik_Engine/omega_engine/educators/connection.py +75 -0
- package/omega/Agentik_Engine/omega_engine/educators/coworker.py +68 -0
- package/omega/Agentik_Engine/omega_engine/educators/loop.py +82 -0
- package/omega/Agentik_Engine/omega_engine/educators/prompt.py +68 -0
- package/omega/Agentik_Engine/omega_engine/educators/skill.py +69 -0
- package/omega/Agentik_Engine/omega_engine/envelope.py +219 -0
- package/omega/Agentik_Engine/omega_engine/executor.py +195 -16
- package/omega/Agentik_Engine/omega_engine/genesis/__init__.py +134 -0
- package/omega/Agentik_Engine/omega_engine/genesis/__pycache__/__init__.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/genesis/__pycache__/orchestrator.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/genesis/__pycache__/phases.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/genesis/__pycache__/stack.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/genesis/__pycache__/state.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/genesis/orchestrator.py +262 -0
- package/omega/Agentik_Engine/omega_engine/genesis/phases.py +950 -0
- package/omega/Agentik_Engine/omega_engine/genesis/stack.py +324 -0
- package/omega/Agentik_Engine/omega_engine/genesis/state.py +353 -0
- package/omega/Agentik_Engine/omega_engine/handoff.py +459 -0
- package/omega/Agentik_Engine/omega_engine/hermes.py +426 -0
- package/omega/Agentik_Engine/omega_engine/hermes_bootstrap.py +382 -0
- package/omega/Agentik_Engine/omega_engine/hermes_desktop.py +469 -0
- package/omega/Agentik_Engine/omega_engine/integrations/__init__.py +30 -0
- package/omega/Agentik_Engine/omega_engine/integrations/__pycache__/__init__.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/integrations/__pycache__/graphify.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/integrations/graphify.py +234 -0
- package/omega/Agentik_Engine/omega_engine/learning.py +268 -0
- package/omega/Agentik_Engine/omega_engine/managed_agent.py +467 -0
- package/omega/Agentik_Engine/omega_engine/memory.py +271 -0
- package/omega/Agentik_Engine/omega_engine/menu.py +1065 -0
- package/omega/Agentik_Engine/omega_engine/migrations/__init__.py +144 -0
- package/omega/Agentik_Engine/omega_engine/migrations/__pycache__/__init__.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/migrations/__pycache__/v0_14_0.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/migrations/v0_14_0.py +29 -0
- package/omega/Agentik_Engine/omega_engine/mission.py +29 -14
- package/omega/Agentik_Engine/omega_engine/plan.py +846 -0
- package/omega/Agentik_Engine/omega_engine/prompts.py +158 -0
- package/omega/Agentik_Engine/omega_engine/provider.py +408 -13
- package/omega/Agentik_Engine/omega_engine/prune.py +151 -0
- package/omega/Agentik_Engine/omega_engine/pursue.py +205 -0
- package/omega/Agentik_Engine/omega_engine/rag/__init__.py +21 -0
- package/omega/Agentik_Engine/omega_engine/rag/__pycache__/__init__.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/rag/__pycache__/agentic.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/rag/__pycache__/base.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/rag/__pycache__/corrective.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/rag/__pycache__/graph.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/rag/__pycache__/hybrid.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/rag/__pycache__/multimodal.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/rag/__pycache__/router.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/rag/agentic.py +83 -0
- package/omega/Agentik_Engine/omega_engine/rag/base.py +42 -0
- package/omega/Agentik_Engine/omega_engine/rag/corrective.py +119 -0
- package/omega/Agentik_Engine/omega_engine/rag/graph.py +169 -0
- package/omega/Agentik_Engine/omega_engine/rag/hybrid.py +205 -0
- package/omega/Agentik_Engine/omega_engine/rag/multimodal.py +136 -0
- package/omega/Agentik_Engine/omega_engine/rag/router.py +110 -0
- package/omega/Agentik_Engine/omega_engine/reducer.py +21 -3
- package/omega/Agentik_Engine/omega_engine/router.py +28 -0
- package/omega/Agentik_Engine/omega_engine/skill_discovery/__init__.py +48 -0
- package/omega/Agentik_Engine/omega_engine/skill_discovery/__pycache__/__init__.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/skill_discovery/__pycache__/auditor.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/skill_discovery/__pycache__/finder.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/skill_discovery/__pycache__/installer.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/skill_discovery/__pycache__/marketplaces.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/skill_discovery/auditor.py +232 -0
- package/omega/Agentik_Engine/omega_engine/skill_discovery/finder.py +94 -0
- package/omega/Agentik_Engine/omega_engine/skill_discovery/installer.py +129 -0
- package/omega/Agentik_Engine/omega_engine/skill_discovery/marketplaces.py +80 -0
- package/omega/Agentik_Engine/omega_engine/skill_routing.py +388 -0
- package/omega/Agentik_Engine/omega_engine/smoke.py +81 -0
- package/omega/Agentik_Engine/omega_engine/store.py +132 -25
- package/omega/Agentik_Engine/omega_engine/sync.py +445 -0
- package/omega/Agentik_Engine/omega_engine/telegram_history.py +260 -0
- package/omega/Agentik_Engine/omega_engine/tmux.py +526 -0
- package/omega/Agentik_Engine/omega_engine/tools.py +272 -0
- package/omega/Agentik_Engine/omega_engine/understand_anything.py +275 -0
- package/omega/Agentik_Engine/omega_engine/updater.py +70 -0
- package/omega/Agentik_Engine/omega_engine/validate.py +186 -0
- package/omega/Agentik_Engine/omega_engine/vault.py +342 -0
- package/omega/Agentik_Engine/omega_engine/webhooks.py +262 -0
- package/omega/Agentik_Engine/omega_engine/worker.py +526 -0
- package/omega/Agentik_Engine/pyproject.toml +1 -1
- package/omega/Agentik_Engine/tests/__pycache__/test_account.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_account.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_adversarial.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_adversarial.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_agents_envelope.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_agents_envelope.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_audit_arsenal.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_audits_pipeline.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_audits_pipeline.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_auto_update_and_migrations.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_auto_update_and_migrations.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_autonomous.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_autonomous.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_educators.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_educators.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_executor.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_genesis_and_plan.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_genesis_and_plan.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_graphify.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_graphify.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_handoff.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_handoff.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_hermes_and_ua.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_hermes_and_ua.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_hermes_bootstrap_and_desktop.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_hermes_bootstrap_and_desktop.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_install_steps.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_install_steps.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_install_ux.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_install_ux.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_installer_wiring.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_installer_wiring.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_intelligence.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_intelligence.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_llm_clis_and_uninstall.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_llm_clis_and_uninstall.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_managed_agent.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_managed_agent.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_max_provider_and_menu.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_max_provider_and_menu.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_menu_coverage.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_menu_coverage.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_mission.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_progress.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_project.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_pursue_cadence.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_pursue_cadence.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_rag.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_rag.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_reducer.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_report.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_role_aliases_and_ssot.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_role_aliases_and_ssot.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_skill_discovery_and_gate.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_skill_discovery_and_gate.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_skill_power.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_skill_power.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_skill_routing.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_skill_routing.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_snapshot_partial.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_snapshot_partial.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_telegram_history.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_telegram_history.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_tmux_and_aisb_chat.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_tmux_and_aisb_chat.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_tools_and_sync.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_tools_and_sync.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_v06_features.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_v06_features.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_vault.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_vault.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_webhooks_and_readiness.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_webhooks_and_readiness.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_worker_and_cleanup.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_worker_and_cleanup.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/test_account.py +338 -0
- package/omega/Agentik_Engine/tests/test_adversarial.py +351 -0
- package/omega/Agentik_Engine/tests/test_agents_envelope.py +274 -0
- package/omega/Agentik_Engine/tests/test_audits_pipeline.py +348 -0
- package/omega/Agentik_Engine/tests/test_auto_update_and_migrations.py +394 -0
- package/omega/Agentik_Engine/tests/test_autonomous.py +361 -0
- package/omega/Agentik_Engine/tests/test_educators.py +233 -0
- package/omega/Agentik_Engine/tests/test_genesis_and_plan.py +573 -0
- package/omega/Agentik_Engine/tests/test_graphify.py +190 -0
- package/omega/Agentik_Engine/tests/test_handoff.py +311 -0
- package/omega/Agentik_Engine/tests/test_hermes_and_ua.py +387 -0
- package/omega/Agentik_Engine/tests/test_hermes_bootstrap_and_desktop.py +358 -0
- package/omega/Agentik_Engine/tests/test_install_steps.py +359 -0
- package/omega/Agentik_Engine/tests/test_install_ux.py +151 -0
- package/omega/Agentik_Engine/tests/test_installer_wiring.py +496 -0
- package/omega/Agentik_Engine/tests/test_intelligence.py +285 -0
- package/omega/Agentik_Engine/tests/test_llm_clis_and_uninstall.py +228 -0
- package/omega/Agentik_Engine/tests/test_managed_agent.py +363 -0
- package/omega/Agentik_Engine/tests/test_max_provider_and_menu.py +231 -0
- package/omega/Agentik_Engine/tests/test_menu_coverage.py +72 -0
- package/omega/Agentik_Engine/tests/test_pursue_cadence.py +217 -0
- package/omega/Agentik_Engine/tests/test_rag.py +287 -0
- package/omega/Agentik_Engine/tests/test_role_aliases_and_ssot.py +207 -0
- package/omega/Agentik_Engine/tests/test_skill_discovery_and_gate.py +337 -0
- package/omega/Agentik_Engine/tests/test_skill_power.py +259 -0
- package/omega/Agentik_Engine/tests/test_skill_routing.py +189 -0
- package/omega/Agentik_Engine/tests/test_snapshot_partial.py +172 -0
- package/omega/Agentik_Engine/tests/test_telegram_history.py +209 -0
- package/omega/Agentik_Engine/tests/test_tmux_and_aisb_chat.py +223 -0
- package/omega/Agentik_Engine/tests/test_tools_and_sync.py +312 -0
- package/omega/Agentik_Engine/tests/test_v06_features.py +370 -0
- package/omega/Agentik_Engine/tests/test_vault.py +173 -0
- package/omega/Agentik_Engine/tests/test_webhooks_and_readiness.py +277 -0
- package/omega/Agentik_Engine/tests/test_worker_and_cleanup.py +541 -0
- package/omega/Agentik_Extra/etc/secrets/.vault-key +3 -0
- package/omega/Agentik_Extra/etc/secrets/.vault-pub +1 -0
- package/omega/Agentik_Runtime/audits.db +0 -0
- package/omega/Agentik_SSOT/VERSION +1 -1
- package/omega/Agentik_SSOT/claude-plugins/claude-plugins.yaml +100 -0
- package/omega/Agentik_SSOT/docs/LAYERS.md +90 -0
- package/omega/Agentik_SSOT/docs/USER-JOURNEY.md +283 -0
- package/omega/Agentik_SSOT/marketplaces/design-discipline.yaml +86 -0
- package/omega/Agentik_SSOT/skills/a11yaudit/SKILL.md +161 -0
- package/omega/Agentik_SSOT/skills/apiaudit/SKILL.md +157 -0
- package/omega/Agentik_SSOT/skills/automationaudit/SKILL.md +161 -0
- package/omega/Agentik_SSOT/skills/cadence/SKILL.md +76 -0
- package/omega/Agentik_SSOT/skills/codeaudit/SKILL.md +153 -0
- package/omega/Agentik_SSOT/skills/copyaudit/SKILL.md +161 -0
- package/omega/Agentik_SSOT/skills/dataaudit/SKILL.md +157 -0
- package/omega/Agentik_SSOT/skills/debugaudit/SKILL.md +161 -0
- package/omega/Agentik_SSOT/skills/dispatch/SKILL.md +79 -0
- package/omega/Agentik_SSOT/skills/dxaudit/SKILL.md +161 -0
- package/omega/Agentik_SSOT/skills/featureaudit/SKILL.md +161 -0
- package/omega/Agentik_SSOT/skills/flowaudit/SKILL.md +165 -0
- package/omega/Agentik_SSOT/skills/genesis/SKILL.md +116 -0
- package/omega/Agentik_SSOT/skills/handoff/SKILL.md +117 -0
- package/omega/Agentik_SSOT/skills/logicaudit/SKILL.md +165 -0
- package/omega/Agentik_SSOT/skills/motionaudit/SKILL.md +165 -0
- package/omega/Agentik_SSOT/skills/perfaudit/SKILL.md +161 -0
- package/omega/Agentik_SSOT/skills/plan/SKILL.md +127 -0
- package/omega/Agentik_SSOT/skills/pursue/SKILL.md +68 -0
- package/omega/Agentik_SSOT/skills/rag-route.md +82 -0
- package/omega/Agentik_SSOT/skills/refontaudit/SKILL.md +165 -0
- package/omega/Agentik_SSOT/skills/retentionaudit/SKILL.md +165 -0
- package/omega/Agentik_SSOT/skills/secaudit/SKILL.md +157 -0
- package/omega/Agentik_SSOT/skills/seoaudit/SKILL.md +161 -0
- package/omega/Agentik_SSOT/skills/skill-auditor/SKILL.md +83 -0
- package/omega/Agentik_SSOT/skills/skill-finder/SKILL.md +116 -0
- package/omega/Agentik_SSOT/skills/uiuxaudit/SKILL.md +165 -0
- package/package.json +2 -2
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
"""Tests for the v0.9 "intelligence" layer:
|
|
2
|
+
|
|
3
|
+
classifier.py — task complexity classification
|
|
4
|
+
memory.py — cross-source semantic search
|
|
5
|
+
learning.py — Smith reflection on audit + worker history
|
|
6
|
+
agent_messages.py — worker ↔ oracle messaging
|
|
7
|
+
"""
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import json
|
|
11
|
+
import sys
|
|
12
|
+
import tempfile
|
|
13
|
+
import time
|
|
14
|
+
import unittest
|
|
15
|
+
from pathlib import Path
|
|
16
|
+
from unittest import mock
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
HERE = Path(__file__).resolve().parent
|
|
20
|
+
sys.path.insert(0, str(HERE.parent))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# ---------------------------------------------------------------------------
|
|
24
|
+
# classifier.py
|
|
25
|
+
# ---------------------------------------------------------------------------
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class TestClassifier(unittest.TestCase):
|
|
29
|
+
def test_empty_is_simple(self):
|
|
30
|
+
from omega_engine.classifier import classify
|
|
31
|
+
c = classify("")
|
|
32
|
+
self.assertEqual(c.bucket, "simple")
|
|
33
|
+
self.assertEqual(c.confidence, "high")
|
|
34
|
+
|
|
35
|
+
def test_architect_role_always_complex(self):
|
|
36
|
+
from omega_engine.classifier import classify
|
|
37
|
+
c = classify("rename a variable", role="architect")
|
|
38
|
+
self.assertEqual(c.bucket, "complex")
|
|
39
|
+
|
|
40
|
+
def test_oracle_role_is_moderate(self):
|
|
41
|
+
from omega_engine.classifier import classify
|
|
42
|
+
c = classify("anything", role="oracle")
|
|
43
|
+
self.assertEqual(c.bucket, "moderate")
|
|
44
|
+
|
|
45
|
+
def test_complex_keywords(self):
|
|
46
|
+
from omega_engine.classifier import classify
|
|
47
|
+
c = classify(
|
|
48
|
+
"design a security architecture for the auth refactor",
|
|
49
|
+
role="worker",
|
|
50
|
+
)
|
|
51
|
+
self.assertEqual(c.bucket, "complex")
|
|
52
|
+
self.assertEqual(c.suggested_model, "opus")
|
|
53
|
+
|
|
54
|
+
def test_simple_keyword_short(self):
|
|
55
|
+
from omega_engine.classifier import classify
|
|
56
|
+
c = classify("rename Foo to Bar in utils.py", role="worker")
|
|
57
|
+
self.assertEqual(c.bucket, "simple")
|
|
58
|
+
self.assertEqual(c.suggested_model, "haiku")
|
|
59
|
+
|
|
60
|
+
def test_file_count_complex(self):
|
|
61
|
+
from omega_engine.classifier import classify
|
|
62
|
+
c = classify("update 12 files for the new API", role="worker")
|
|
63
|
+
self.assertEqual(c.bucket, "complex")
|
|
64
|
+
|
|
65
|
+
def test_long_description_complex(self):
|
|
66
|
+
from omega_engine.classifier import classify
|
|
67
|
+
long_text = (
|
|
68
|
+
"We need to investigate the recent performance regression on "
|
|
69
|
+
"the dashboard route. The user reports load times went from "
|
|
70
|
+
"1.2s to 4.5s in the last two weeks. Look at the bundle, "
|
|
71
|
+
"the database queries, the cache, and the rendering "
|
|
72
|
+
"pipeline. Identify the regression and propose a fix that "
|
|
73
|
+
"we can ship today."
|
|
74
|
+
)
|
|
75
|
+
c = classify(long_text, role="worker")
|
|
76
|
+
# Has "investigate", "performance" → complex
|
|
77
|
+
self.assertEqual(c.bucket, "complex")
|
|
78
|
+
|
|
79
|
+
def test_moderate_keyword(self):
|
|
80
|
+
from omega_engine.classifier import classify
|
|
81
|
+
# 'implement' + medium length but no complex keyword → moderate
|
|
82
|
+
c = classify("implement the password validator function",
|
|
83
|
+
role="worker")
|
|
84
|
+
self.assertEqual(c.bucket, "moderate")
|
|
85
|
+
self.assertEqual(c.suggested_model, "sonnet")
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
# ---------------------------------------------------------------------------
|
|
89
|
+
# memory.py
|
|
90
|
+
# ---------------------------------------------------------------------------
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class TestMemory(unittest.TestCase):
|
|
94
|
+
def _seed(self, home: Path):
|
|
95
|
+
# Telegram history
|
|
96
|
+
from omega_engine.telegram_history import (
|
|
97
|
+
record_inbound, record_outbound,
|
|
98
|
+
)
|
|
99
|
+
record_inbound(home, topic_id=1, text="we decided to use age for vault encryption")
|
|
100
|
+
record_outbound(home, topic_id=1, text="confirmed; vault keys live in Agentik_Extra")
|
|
101
|
+
record_inbound(home, topic_id=2, text="the login bug returns 500 on Safari")
|
|
102
|
+
# .done.json
|
|
103
|
+
from omega_engine.done_signal import DoneSignal, write_done
|
|
104
|
+
write_done(home, "t-abc", DoneSignal(
|
|
105
|
+
status="done_clean", summary="fixed the login bug for Safari",
|
|
106
|
+
files_changed=["src/auth.py"],
|
|
107
|
+
))
|
|
108
|
+
# Audit history
|
|
109
|
+
from omega_engine.audits.history import (
|
|
110
|
+
AuditRun, make_run_id, now, record_run,
|
|
111
|
+
)
|
|
112
|
+
record_run(home, AuditRun(
|
|
113
|
+
run_id=make_run_id(), audit_id="codeaudit",
|
|
114
|
+
scope=".", timestamp=now(),
|
|
115
|
+
score=88, verified=True, finding_count=2,
|
|
116
|
+
verdict={"summary": "code passes with two minor warnings",
|
|
117
|
+
"findings": []},
|
|
118
|
+
))
|
|
119
|
+
|
|
120
|
+
def test_reindex_counts_each_source(self):
|
|
121
|
+
from omega_engine import memory
|
|
122
|
+
with tempfile.TemporaryDirectory() as td:
|
|
123
|
+
home = Path(td)
|
|
124
|
+
self._seed(home)
|
|
125
|
+
counts = memory.reindex(home)
|
|
126
|
+
self.assertGreaterEqual(counts["telegram"], 3)
|
|
127
|
+
self.assertGreaterEqual(counts["done_json"], 1)
|
|
128
|
+
self.assertGreaterEqual(counts["audit"], 1)
|
|
129
|
+
self.assertEqual(counts["total"],
|
|
130
|
+
counts["telegram"] + counts["done_json"]
|
|
131
|
+
+ counts["audit"])
|
|
132
|
+
|
|
133
|
+
def test_search_finds_across_sources(self):
|
|
134
|
+
from omega_engine import memory
|
|
135
|
+
with tempfile.TemporaryDirectory() as td:
|
|
136
|
+
home = Path(td)
|
|
137
|
+
self._seed(home)
|
|
138
|
+
memory.reindex(home)
|
|
139
|
+
hits = memory.search(home, "vault", k=5)
|
|
140
|
+
sources = {h.source for h in hits}
|
|
141
|
+
# We seeded "vault encryption" in telegram — should find it.
|
|
142
|
+
self.assertIn("telegram", sources)
|
|
143
|
+
|
|
144
|
+
def test_search_returns_login_bug_done_json(self):
|
|
145
|
+
from omega_engine import memory
|
|
146
|
+
with tempfile.TemporaryDirectory() as td:
|
|
147
|
+
home = Path(td)
|
|
148
|
+
self._seed(home)
|
|
149
|
+
memory.reindex(home)
|
|
150
|
+
hits = memory.search(home, "login bug", k=5)
|
|
151
|
+
# The .done.json text mentions "login bug" — should appear.
|
|
152
|
+
sources = {h.source for h in hits}
|
|
153
|
+
self.assertTrue("done_json" in sources or "telegram" in sources)
|
|
154
|
+
|
|
155
|
+
def test_index_stats(self):
|
|
156
|
+
from omega_engine import memory
|
|
157
|
+
with tempfile.TemporaryDirectory() as td:
|
|
158
|
+
home = Path(td)
|
|
159
|
+
self._seed(home)
|
|
160
|
+
memory.reindex(home)
|
|
161
|
+
stats = memory.index_stats(home)
|
|
162
|
+
self.assertTrue(stats["indexed"])
|
|
163
|
+
self.assertGreater(stats["total"], 0)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
# ---------------------------------------------------------------------------
|
|
167
|
+
# learning.py — Smith reflection
|
|
168
|
+
# ---------------------------------------------------------------------------
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
class TestLearning(unittest.TestCase):
|
|
172
|
+
def test_weak_audit_insight(self):
|
|
173
|
+
from omega_engine.audits.history import (
|
|
174
|
+
AuditRun, make_run_id, record_run,
|
|
175
|
+
)
|
|
176
|
+
from omega_engine.learning import reflect
|
|
177
|
+
with tempfile.TemporaryDirectory() as td:
|
|
178
|
+
now_s = int(time.time())
|
|
179
|
+
# Seed 4 codeaudit runs all below threshold.
|
|
180
|
+
for i in range(4):
|
|
181
|
+
record_run(td, AuditRun(
|
|
182
|
+
run_id=make_run_id(), audit_id="codeaudit",
|
|
183
|
+
scope=".", timestamp=now_s - i * 3600,
|
|
184
|
+
score=55 + i * 2, verified=False, finding_count=10,
|
|
185
|
+
verdict={"findings": []},
|
|
186
|
+
))
|
|
187
|
+
report = reflect(td, write_proposals=False)
|
|
188
|
+
kinds = {i.kind for i in report.insights}
|
|
189
|
+
self.assertIn("weak_audit", kinds)
|
|
190
|
+
titles = " ".join(i.title for i in report.insights)
|
|
191
|
+
self.assertIn("codeaudit", titles)
|
|
192
|
+
|
|
193
|
+
def test_repeated_pending_action_insight(self):
|
|
194
|
+
from omega_engine.done_signal import DoneSignal, write_done
|
|
195
|
+
from omega_engine.learning import reflect
|
|
196
|
+
with tempfile.TemporaryDirectory() as td:
|
|
197
|
+
for i in range(12):
|
|
198
|
+
write_done(td, f"t-{i}", DoneSignal(
|
|
199
|
+
status="pending",
|
|
200
|
+
summary=f"part {i}",
|
|
201
|
+
pending_actions=["write the unit test for X"],
|
|
202
|
+
))
|
|
203
|
+
report = reflect(td, write_proposals=False)
|
|
204
|
+
kinds = [i.kind for i in report.insights]
|
|
205
|
+
self.assertIn("skill_suggestion", kinds)
|
|
206
|
+
|
|
207
|
+
def test_write_proposals_creates_files(self):
|
|
208
|
+
from omega_engine.audits.history import (
|
|
209
|
+
AuditRun, make_run_id, record_run,
|
|
210
|
+
)
|
|
211
|
+
from omega_engine.learning import reflect
|
|
212
|
+
with tempfile.TemporaryDirectory() as td:
|
|
213
|
+
now_s = int(time.time())
|
|
214
|
+
for i in range(4):
|
|
215
|
+
record_run(td, AuditRun(
|
|
216
|
+
run_id=make_run_id(), audit_id="seoaudit",
|
|
217
|
+
scope=".", timestamp=now_s - i * 3600,
|
|
218
|
+
score=40, verified=False, finding_count=10,
|
|
219
|
+
verdict={"findings": []},
|
|
220
|
+
))
|
|
221
|
+
report = reflect(td, write_proposals=True)
|
|
222
|
+
staging = Path(td) / "Agentik_Extra" / "staging" / "promotion"
|
|
223
|
+
files = list(staging.glob("smith-*.json"))
|
|
224
|
+
self.assertGreater(len(files), 0)
|
|
225
|
+
# Each file is parseable JSON with the expected schema.
|
|
226
|
+
data = json.loads(files[0].read_text())
|
|
227
|
+
self.assertIn("kind", data)
|
|
228
|
+
self.assertIn("title", data)
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
# ---------------------------------------------------------------------------
|
|
232
|
+
# agent_messages.py
|
|
233
|
+
# ---------------------------------------------------------------------------
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
class TestAgentMessages(unittest.TestCase):
|
|
237
|
+
def test_send_and_read_round_trip(self):
|
|
238
|
+
from omega_engine import agent_messages as am
|
|
239
|
+
with tempfile.TemporaryDirectory() as td:
|
|
240
|
+
am.send(td, "t-1", from_="worker", to="oracle",
|
|
241
|
+
type="question", text="should I bump the version?")
|
|
242
|
+
am.send(td, "t-1", from_="oracle", to="worker",
|
|
243
|
+
type="answer", text="yes, semver minor.")
|
|
244
|
+
msgs = am.read(td, "t-1")
|
|
245
|
+
self.assertEqual(len(msgs), 2)
|
|
246
|
+
self.assertEqual(msgs[0].type, "question")
|
|
247
|
+
self.assertEqual(msgs[1].type, "answer")
|
|
248
|
+
|
|
249
|
+
def test_recipient_filter(self):
|
|
250
|
+
from omega_engine import agent_messages as am
|
|
251
|
+
with tempfile.TemporaryDirectory() as td:
|
|
252
|
+
am.send(td, "t-2", from_="worker", to="oracle",
|
|
253
|
+
type="question", text="for oracle")
|
|
254
|
+
am.send(td, "t-2", from_="worker", to="manager",
|
|
255
|
+
type="question", text="for manager")
|
|
256
|
+
for_oracle = am.read(td, "t-2", for_recipient="oracle")
|
|
257
|
+
self.assertEqual(len(for_oracle), 1)
|
|
258
|
+
self.assertEqual(for_oracle[0].text, "for oracle")
|
|
259
|
+
|
|
260
|
+
def test_open_questions(self):
|
|
261
|
+
from omega_engine import agent_messages as am
|
|
262
|
+
with tempfile.TemporaryDirectory() as td:
|
|
263
|
+
# task A: question without answer
|
|
264
|
+
am.send(td, "task-A", from_="worker", to="oracle",
|
|
265
|
+
type="question", text="answer me")
|
|
266
|
+
# task B: question with answer (no longer open)
|
|
267
|
+
am.send(td, "task-B", from_="worker", to="oracle",
|
|
268
|
+
type="question", text="x")
|
|
269
|
+
am.send(td, "task-B", from_="oracle", to="worker",
|
|
270
|
+
type="answer", text="y")
|
|
271
|
+
opens = am.list_open_questions(td)
|
|
272
|
+
tasks = {pair[0] for pair in opens}
|
|
273
|
+
self.assertIn("task-A", tasks)
|
|
274
|
+
self.assertNotIn("task-B", tasks)
|
|
275
|
+
|
|
276
|
+
def test_rejects_unknown_type(self):
|
|
277
|
+
from omega_engine import agent_messages as am
|
|
278
|
+
with tempfile.TemporaryDirectory() as td:
|
|
279
|
+
with self.assertRaises(ValueError):
|
|
280
|
+
am.send(td, "t-3", from_="a", to="b",
|
|
281
|
+
type="invalid", text="x")
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
if __name__ == "__main__":
|
|
285
|
+
unittest.main(verbosity=2)
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
"""Tests for the LLM CLI helper + omega uninstall + omega upgrade.
|
|
2
|
+
|
|
3
|
+
The helper is at ``bootstrap/lib/llm-clis.py`` — loadable as a module
|
|
4
|
+
via importlib.util because of the hyphen in the filename. We exercise:
|
|
5
|
+
|
|
6
|
+
* CliSpec.is_installed() resolves to PATH presence.
|
|
7
|
+
* _selection_from_manifest reads the list AND dict forms.
|
|
8
|
+
* install_cli short-circuits on already-installed.
|
|
9
|
+
* uninstall_cli reverses npm/uv/pip commands.
|
|
10
|
+
* cmd_uninstall removes the 8-block tree and strips settings.json
|
|
11
|
+
keys (idempotent + safe with a fake HOME).
|
|
12
|
+
"""
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
|
|
15
|
+
import importlib.util
|
|
16
|
+
import io
|
|
17
|
+
import json
|
|
18
|
+
import os
|
|
19
|
+
import sys
|
|
20
|
+
import tempfile
|
|
21
|
+
import unittest
|
|
22
|
+
from pathlib import Path
|
|
23
|
+
from unittest import mock
|
|
24
|
+
|
|
25
|
+
import yaml
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
HERE = Path(__file__).resolve().parent
|
|
29
|
+
sys.path.insert(0, str(HERE.parent))
|
|
30
|
+
|
|
31
|
+
REPO_ROOT = HERE.parent.parent.parent
|
|
32
|
+
HELPER = REPO_ROOT / "bootstrap" / "lib" / "llm-clis.py"
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _load_helper():
|
|
36
|
+
"""Load bootstrap/lib/llm-clis.py as a module.
|
|
37
|
+
|
|
38
|
+
Python 3.13's dataclasses inspects ``sys.modules[cls.__module__]``,
|
|
39
|
+
so we must register the freshly loaded module BEFORE exec_module
|
|
40
|
+
runs the class-definitions inside.
|
|
41
|
+
"""
|
|
42
|
+
spec = importlib.util.spec_from_file_location("llm_clis", str(HELPER))
|
|
43
|
+
mod = importlib.util.module_from_spec(spec)
|
|
44
|
+
sys.modules["llm_clis"] = mod
|
|
45
|
+
spec.loader.exec_module(mod) # type: ignore[union-attr]
|
|
46
|
+
return mod
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class TestCliSpec(unittest.TestCase):
|
|
50
|
+
def test_is_installed_false_when_missing(self):
|
|
51
|
+
mod = _load_helper()
|
|
52
|
+
spec = mod.CliSpec(
|
|
53
|
+
id="x", label="x", bin_name="definitely-not-a-real-binary-1234",
|
|
54
|
+
install_cmd=["npm", "install", "-g", "x"],
|
|
55
|
+
)
|
|
56
|
+
self.assertFalse(spec.is_installed())
|
|
57
|
+
self.assertIsNone(spec.installed_version())
|
|
58
|
+
|
|
59
|
+
def test_is_installed_true_when_present(self):
|
|
60
|
+
mod = _load_helper()
|
|
61
|
+
# `python3` is always on PATH in our test env.
|
|
62
|
+
spec = mod.CliSpec(
|
|
63
|
+
id="py", label="python", bin_name="python3",
|
|
64
|
+
install_cmd=["echo", "noop"],
|
|
65
|
+
version_cmd=["python3", "--version"],
|
|
66
|
+
)
|
|
67
|
+
self.assertTrue(spec.is_installed())
|
|
68
|
+
v = spec.installed_version()
|
|
69
|
+
self.assertIsNotNone(v)
|
|
70
|
+
self.assertIn("Python", v or "")
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
class TestManifestParsing(unittest.TestCase):
|
|
74
|
+
def test_list_form(self):
|
|
75
|
+
mod = _load_helper()
|
|
76
|
+
with tempfile.TemporaryDirectory() as td:
|
|
77
|
+
p = Path(td) / "m.yaml"
|
|
78
|
+
p.write_text(yaml.safe_dump({
|
|
79
|
+
"llm_clis": ["claude_code", "gemini_cli"],
|
|
80
|
+
}))
|
|
81
|
+
self.assertEqual(
|
|
82
|
+
mod._selection_from_manifest(p),
|
|
83
|
+
{"claude_code", "gemini_cli"},
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
def test_dict_form_filters_false(self):
|
|
87
|
+
mod = _load_helper()
|
|
88
|
+
with tempfile.TemporaryDirectory() as td:
|
|
89
|
+
p = Path(td) / "m.yaml"
|
|
90
|
+
p.write_text(yaml.safe_dump({
|
|
91
|
+
"llm_clis": {
|
|
92
|
+
"claude_code": True,
|
|
93
|
+
"gemini_cli": True,
|
|
94
|
+
"codex": False,
|
|
95
|
+
},
|
|
96
|
+
}))
|
|
97
|
+
self.assertEqual(
|
|
98
|
+
mod._selection_from_manifest(p),
|
|
99
|
+
{"claude_code", "gemini_cli"},
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
def test_no_block_returns_none(self):
|
|
103
|
+
mod = _load_helper()
|
|
104
|
+
with tempfile.TemporaryDirectory() as td:
|
|
105
|
+
p = Path(td) / "m.yaml"
|
|
106
|
+
p.write_text(yaml.safe_dump({"profile": "vps"}))
|
|
107
|
+
self.assertIsNone(mod._selection_from_manifest(p))
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
class TestInstallShortCircuits(unittest.TestCase):
|
|
111
|
+
def test_already_installed_skips(self):
|
|
112
|
+
mod = _load_helper()
|
|
113
|
+
spec = mod.CliSpec(
|
|
114
|
+
id="py", label="python", bin_name="python3",
|
|
115
|
+
install_cmd=["echo", "noop"],
|
|
116
|
+
version_cmd=["python3", "--version"],
|
|
117
|
+
)
|
|
118
|
+
result = mod.install_cli(spec, force=False)
|
|
119
|
+
self.assertEqual(result["status"], "skip")
|
|
120
|
+
self.assertEqual(result["reason"], "already installed")
|
|
121
|
+
|
|
122
|
+
def test_unknown_tool_errors_cleanly(self):
|
|
123
|
+
mod = _load_helper()
|
|
124
|
+
spec = mod.CliSpec(
|
|
125
|
+
id="x", label="x", bin_name="not-real-x-1234",
|
|
126
|
+
install_cmd=["definitely-not-a-real-tool-9999",
|
|
127
|
+
"install", "x"],
|
|
128
|
+
)
|
|
129
|
+
result = mod.install_cli(spec)
|
|
130
|
+
self.assertEqual(result["status"], "error")
|
|
131
|
+
self.assertIn("not on PATH", result["reason"])
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
class TestUninstallCommand(unittest.TestCase):
|
|
135
|
+
def test_uninstall_strips_settings_keys(self):
|
|
136
|
+
# Simulate a settings.json that was previously merged by step 33.
|
|
137
|
+
with tempfile.TemporaryDirectory() as td:
|
|
138
|
+
home = Path(td) / "Omega"
|
|
139
|
+
home.mkdir(parents=True)
|
|
140
|
+
# Minimal 8-block tree.
|
|
141
|
+
for b in ("Agentik_SSOT", "Agentik_Engine", "Agentik_Orchestration",
|
|
142
|
+
"Agentik_Providers", "Agentik_Coding", "Agentik_Tools",
|
|
143
|
+
"Agentik_Runtime", "Agentik_Extra"):
|
|
144
|
+
(home / b).mkdir()
|
|
145
|
+
|
|
146
|
+
fake_home = Path(td) / "fake-home"
|
|
147
|
+
settings = fake_home / ".claude" / "settings.json"
|
|
148
|
+
settings.parent.mkdir(parents=True)
|
|
149
|
+
settings.write_text(json.dumps({
|
|
150
|
+
"env": {
|
|
151
|
+
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1",
|
|
152
|
+
"OPERATOR_OWN_KEY": "preserve me",
|
|
153
|
+
},
|
|
154
|
+
"permissions": {"defaultMode": "bypassPermissions"},
|
|
155
|
+
"hooks": {
|
|
156
|
+
"Stop": [
|
|
157
|
+
{"tag": "omega-audit-gate",
|
|
158
|
+
"hooks": [{"type": "command", "command": "x"}]},
|
|
159
|
+
{"tag": "operator-own-hook",
|
|
160
|
+
"hooks": [{"type": "command", "command": "y"}]},
|
|
161
|
+
],
|
|
162
|
+
},
|
|
163
|
+
}))
|
|
164
|
+
|
|
165
|
+
# Run the uninstall.
|
|
166
|
+
from omega_engine.cli import cmd_uninstall
|
|
167
|
+
ns = mock.Mock(yes=True, purge=False, include_llm_clis=False)
|
|
168
|
+
with mock.patch.dict(os.environ, {
|
|
169
|
+
"OMEGA_HOME": str(home),
|
|
170
|
+
"HOME": str(fake_home),
|
|
171
|
+
}), mock.patch("pathlib.Path.home", return_value=fake_home):
|
|
172
|
+
rc = cmd_uninstall(ns)
|
|
173
|
+
self.assertEqual(rc, 0)
|
|
174
|
+
# Tree gone.
|
|
175
|
+
self.assertFalse(home.exists())
|
|
176
|
+
# Settings cleaned, operator keys preserved.
|
|
177
|
+
data = json.loads(settings.read_text())
|
|
178
|
+
self.assertNotIn(
|
|
179
|
+
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS", data.get("env", {}),
|
|
180
|
+
)
|
|
181
|
+
self.assertEqual(data["env"]["OPERATOR_OWN_KEY"], "preserve me")
|
|
182
|
+
tags = [
|
|
183
|
+
e.get("tag") for e in data["hooks"]["Stop"]
|
|
184
|
+
if isinstance(e, dict)
|
|
185
|
+
]
|
|
186
|
+
self.assertNotIn("omega-audit-gate", tags)
|
|
187
|
+
self.assertIn("operator-own-hook", tags)
|
|
188
|
+
|
|
189
|
+
def test_uninstall_backs_up_vault_by_default(self):
|
|
190
|
+
with tempfile.TemporaryDirectory() as td:
|
|
191
|
+
home = Path(td) / "Omega"
|
|
192
|
+
home.mkdir()
|
|
193
|
+
secrets = home / "Agentik_Extra" / "etc" / "secrets"
|
|
194
|
+
secrets.mkdir(parents=True)
|
|
195
|
+
(secrets / "CLAUDE_OAUTH_max_TOKEN.age").write_text("encrypted")
|
|
196
|
+
fake_home = Path(td) / "fake-home"
|
|
197
|
+
fake_home.mkdir()
|
|
198
|
+
|
|
199
|
+
from omega_engine.cli import cmd_uninstall
|
|
200
|
+
ns = mock.Mock(yes=True, purge=False, include_llm_clis=False)
|
|
201
|
+
with mock.patch.dict(os.environ, {"OMEGA_HOME": str(home)}), \
|
|
202
|
+
mock.patch("pathlib.Path.home", return_value=fake_home):
|
|
203
|
+
cmd_uninstall(ns)
|
|
204
|
+
|
|
205
|
+
backups = list(fake_home.glob(".omega-vault-backup-*"))
|
|
206
|
+
self.assertEqual(len(backups), 1)
|
|
207
|
+
self.assertTrue(
|
|
208
|
+
(backups[0] / "CLAUDE_OAUTH_max_TOKEN.age").exists()
|
|
209
|
+
)
|
|
210
|
+
|
|
211
|
+
def test_uninstall_purge_drops_vault(self):
|
|
212
|
+
with tempfile.TemporaryDirectory() as td:
|
|
213
|
+
home = Path(td) / "Omega"
|
|
214
|
+
home.mkdir()
|
|
215
|
+
(home / "Agentik_Extra" / "etc" / "secrets").mkdir(parents=True)
|
|
216
|
+
(home / "Agentik_Extra" / "etc" / "secrets" / "x.age").write_text("x")
|
|
217
|
+
fake_home = Path(td) / "fake-home"; fake_home.mkdir()
|
|
218
|
+
|
|
219
|
+
from omega_engine.cli import cmd_uninstall
|
|
220
|
+
ns = mock.Mock(yes=True, purge=True, include_llm_clis=False)
|
|
221
|
+
with mock.patch.dict(os.environ, {"OMEGA_HOME": str(home)}), \
|
|
222
|
+
mock.patch("pathlib.Path.home", return_value=fake_home):
|
|
223
|
+
cmd_uninstall(ns)
|
|
224
|
+
self.assertEqual(list(fake_home.glob(".omega-vault-backup-*")), [])
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
if __name__ == "__main__":
|
|
228
|
+
unittest.main(verbosity=2)
|