@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,272 @@
|
|
|
1
|
+
"""The tool registry — Agentik_Tools/registry.json + install/remove logic.
|
|
2
|
+
|
|
3
|
+
Tools are third-party software that lands under `Agentik_Tools/<name>/`. Each
|
|
4
|
+
tool has one home and one invoke command. Source can be the MCP catalog
|
|
5
|
+
(`mcp-catalog.yaml`), a direct npm package spec, or a pre-existing tool the
|
|
6
|
+
installer already shipped (e.g. pdfgen).
|
|
7
|
+
|
|
8
|
+
The registry is the manifest of what is installed — it is git-tracked, the
|
|
9
|
+
tool payloads are not. On a new machine the bootstrap reads the registry and
|
|
10
|
+
reinstalls exactly the same set.
|
|
11
|
+
"""
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
import json
|
|
15
|
+
import os
|
|
16
|
+
import shutil
|
|
17
|
+
import subprocess
|
|
18
|
+
import time
|
|
19
|
+
from dataclasses import asdict, dataclass, field
|
|
20
|
+
from pathlib import Path
|
|
21
|
+
from typing import Any
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# --------------------------------------------------------------------------
|
|
25
|
+
# Tool dataclass + registry
|
|
26
|
+
# --------------------------------------------------------------------------
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@dataclass
|
|
30
|
+
class Tool:
|
|
31
|
+
"""One row in Agentik_Tools/registry.json."""
|
|
32
|
+
|
|
33
|
+
name: str
|
|
34
|
+
version: str = ""
|
|
35
|
+
path: str = "" # relative to OMEGA_HOME
|
|
36
|
+
invoke: str = "" # relative path to the binary
|
|
37
|
+
source: str = "" # npm package, mcp:<id>, etc.
|
|
38
|
+
providers: list[str] = field(default_factory=list) # provider ids that should see it
|
|
39
|
+
installed_at: str = ""
|
|
40
|
+
# Optional extras kept for MCP tools (server config + secret refs).
|
|
41
|
+
secret_refs: list[str] = field(default_factory=list)
|
|
42
|
+
enabled: bool = True
|
|
43
|
+
|
|
44
|
+
def to_dict(self) -> dict[str, Any]:
|
|
45
|
+
# Match the existing registry.json field naming for back-compat
|
|
46
|
+
# (camelCase for installedAt — see pdfgen entry shipped in the repo).
|
|
47
|
+
d = asdict(self)
|
|
48
|
+
d["installedAt"] = d.pop("installed_at", "")
|
|
49
|
+
return d
|
|
50
|
+
|
|
51
|
+
@staticmethod
|
|
52
|
+
def from_dict(d: dict[str, Any]) -> "Tool":
|
|
53
|
+
return Tool(
|
|
54
|
+
name=str(d.get("name", "")),
|
|
55
|
+
version=str(d.get("version", "")),
|
|
56
|
+
path=str(d.get("path", "")),
|
|
57
|
+
invoke=str(d.get("invoke", "")),
|
|
58
|
+
source=str(d.get("source", "")),
|
|
59
|
+
providers=list(d.get("providers", []) or []),
|
|
60
|
+
installed_at=str(d.get("installedAt", d.get("installed_at", "")) or ""),
|
|
61
|
+
secret_refs=list(d.get("secret_refs", []) or []),
|
|
62
|
+
enabled=bool(d.get("enabled", True)),
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def _omega_home(explicit: str | Path | None = None) -> Path:
|
|
67
|
+
return Path(explicit or os.environ.get("OMEGA_HOME", str(Path.home() / "Omega")))
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class ToolRegistry:
|
|
71
|
+
"""Load, mutate, save Agentik_Tools/registry.json."""
|
|
72
|
+
|
|
73
|
+
def __init__(self, omega_home: Path, tools: list[Tool], version: int = 1) -> None:
|
|
74
|
+
self._home = omega_home
|
|
75
|
+
self._tools: dict[str, Tool] = {t.name: t for t in tools}
|
|
76
|
+
self._version = version
|
|
77
|
+
|
|
78
|
+
# ----- file io -------------------------------------------------------
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def load(cls, omega_home: str | Path | None = None) -> "ToolRegistry":
|
|
82
|
+
home = _omega_home(omega_home)
|
|
83
|
+
rfile = home / "Agentik_Tools" / "registry.json"
|
|
84
|
+
if not rfile.exists():
|
|
85
|
+
return cls(home, [])
|
|
86
|
+
data = json.loads(rfile.read_text() or "{}")
|
|
87
|
+
tools = [Tool.from_dict(t) for t in data.get("tools", [])]
|
|
88
|
+
return cls(home, tools, version=int(data.get("version", 1)))
|
|
89
|
+
|
|
90
|
+
def save(self, omega_home: str | Path | None = None) -> None:
|
|
91
|
+
home = _omega_home(omega_home) if omega_home is not None else self._home
|
|
92
|
+
rfile = home / "Agentik_Tools" / "registry.json"
|
|
93
|
+
rfile.parent.mkdir(parents=True, exist_ok=True)
|
|
94
|
+
payload = {
|
|
95
|
+
"version": self._version,
|
|
96
|
+
"tools": [t.to_dict() for t in self._tools.values()],
|
|
97
|
+
}
|
|
98
|
+
rfile.write_text(json.dumps(payload, indent=2) + "\n")
|
|
99
|
+
|
|
100
|
+
# ----- queries -------------------------------------------------------
|
|
101
|
+
|
|
102
|
+
def list(self) -> list[Tool]:
|
|
103
|
+
return list(self._tools.values())
|
|
104
|
+
|
|
105
|
+
def get(self, name: str) -> Tool | None:
|
|
106
|
+
return self._tools.get(name)
|
|
107
|
+
|
|
108
|
+
def installed_path(self, name: str) -> Path:
|
|
109
|
+
tool = self.get(name)
|
|
110
|
+
if tool is None:
|
|
111
|
+
raise KeyError(f"tool not registered: {name}")
|
|
112
|
+
return self._home / tool.path
|
|
113
|
+
|
|
114
|
+
# ----- mutations -----------------------------------------------------
|
|
115
|
+
|
|
116
|
+
def install(self, tool: Tool) -> Tool:
|
|
117
|
+
"""Register a tool (does not run the installer — see install_from_catalog)."""
|
|
118
|
+
if not tool.installed_at:
|
|
119
|
+
tool.installed_at = time.strftime("%Y-%m-%dT%H:%M:%S")
|
|
120
|
+
self._tools[tool.name] = tool
|
|
121
|
+
return tool
|
|
122
|
+
|
|
123
|
+
def remove(self, name: str) -> bool:
|
|
124
|
+
return self._tools.pop(name, None) is not None
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
# --------------------------------------------------------------------------
|
|
128
|
+
# MCP catalog → tool install
|
|
129
|
+
# --------------------------------------------------------------------------
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
class CatalogError(RuntimeError):
|
|
133
|
+
"""The catalog is missing or the requested id is unknown."""
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def load_catalog(omega_home: str | Path | None = None) -> dict[str, Any]:
|
|
137
|
+
"""Read Agentik_SSOT/mcp/mcp-catalog.yaml. Raises CatalogError if missing."""
|
|
138
|
+
import yaml
|
|
139
|
+
home = _omega_home(omega_home)
|
|
140
|
+
path = home / "Agentik_SSOT" / "mcp" / "mcp-catalog.yaml"
|
|
141
|
+
if not path.exists():
|
|
142
|
+
raise CatalogError(f"MCP catalog missing: {path}")
|
|
143
|
+
data = yaml.safe_load(path.read_text()) or {}
|
|
144
|
+
return data
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def catalog_entry(catalog: dict[str, Any], mcp_id: str) -> dict[str, Any]:
|
|
148
|
+
for entry in catalog.get("catalog") or []:
|
|
149
|
+
if str(entry.get("id")) == mcp_id:
|
|
150
|
+
return entry
|
|
151
|
+
raise CatalogError(f"unknown MCP id: {mcp_id}")
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
def install_from_catalog(
|
|
155
|
+
omega_home: str | Path,
|
|
156
|
+
mcp_id: str,
|
|
157
|
+
catalog: dict[str, Any] | None = None,
|
|
158
|
+
registry: ToolRegistry | None = None,
|
|
159
|
+
) -> Tool:
|
|
160
|
+
"""Install one MCP server from the catalog.
|
|
161
|
+
|
|
162
|
+
Concrete steps for `install.method == npx`:
|
|
163
|
+
1. resolve the npm package from `install.package`
|
|
164
|
+
2. `npm install -g --prefix Agentik_Tools/<id>/ <package>` — binaries land
|
|
165
|
+
under `Agentik_Tools/<id>/bin/`
|
|
166
|
+
3. register the tool in registry.json with `source=mcp:<id>`,
|
|
167
|
+
`invoke=Agentik_Tools/<id>/bin/<binname>` (first binary in bin/), and
|
|
168
|
+
`secret_refs` copied from the catalog entry.
|
|
169
|
+
|
|
170
|
+
Other install methods are recorded but logged as "no installer wired" — they
|
|
171
|
+
can be added later without changing the call sites.
|
|
172
|
+
"""
|
|
173
|
+
home = Path(omega_home)
|
|
174
|
+
if catalog is None:
|
|
175
|
+
catalog = load_catalog(home)
|
|
176
|
+
entry = catalog_entry(catalog, mcp_id)
|
|
177
|
+
|
|
178
|
+
install = entry.get("install") or {}
|
|
179
|
+
method = str(install.get("method", "")).lower()
|
|
180
|
+
package = str(install.get("package", "")).strip()
|
|
181
|
+
secret_refs = list(entry.get("secrets") or [])
|
|
182
|
+
|
|
183
|
+
tool_dir = home / "Agentik_Tools" / mcp_id
|
|
184
|
+
tool_dir.mkdir(parents=True, exist_ok=True)
|
|
185
|
+
bin_dir = tool_dir / "bin"
|
|
186
|
+
|
|
187
|
+
invoke = ""
|
|
188
|
+
version = ""
|
|
189
|
+
|
|
190
|
+
if method == "npx" and package:
|
|
191
|
+
npm = shutil.which("npm")
|
|
192
|
+
if npm is None:
|
|
193
|
+
raise RuntimeError("npm not found on PATH — install Node.js to use MCP servers")
|
|
194
|
+
# npm install -g --prefix <dir> <pkg> places binaries in <dir>/bin/.
|
|
195
|
+
try:
|
|
196
|
+
subprocess.run(
|
|
197
|
+
[npm, "install", "-g", "--prefix", str(tool_dir), package],
|
|
198
|
+
check=True, capture_output=True, text=True, timeout=600,
|
|
199
|
+
)
|
|
200
|
+
except subprocess.CalledProcessError as exc:
|
|
201
|
+
raise RuntimeError(
|
|
202
|
+
f"npm install failed for {package}: "
|
|
203
|
+
f"{(exc.stderr or exc.stdout or '')[:500]}"
|
|
204
|
+
) from exc
|
|
205
|
+
if bin_dir.is_dir():
|
|
206
|
+
bins = sorted(p for p in bin_dir.iterdir() if p.is_file())
|
|
207
|
+
if bins:
|
|
208
|
+
invoke = str(bins[0].relative_to(home))
|
|
209
|
+
# best-effort version detect: read the installed package's package.json
|
|
210
|
+
try:
|
|
211
|
+
pkg_dir = tool_dir / "lib" / "node_modules" / package
|
|
212
|
+
pkg_json = pkg_dir / "package.json"
|
|
213
|
+
if pkg_json.exists():
|
|
214
|
+
version = str(json.loads(pkg_json.read_text()).get("version", ""))
|
|
215
|
+
except (OSError, json.JSONDecodeError):
|
|
216
|
+
version = ""
|
|
217
|
+
|
|
218
|
+
tool = Tool(
|
|
219
|
+
name=mcp_id,
|
|
220
|
+
version=version,
|
|
221
|
+
path=f"Agentik_Tools/{mcp_id}/",
|
|
222
|
+
invoke=invoke,
|
|
223
|
+
source=f"mcp:{mcp_id}" if method else f"catalog:{mcp_id}",
|
|
224
|
+
secret_refs=secret_refs,
|
|
225
|
+
installed_at=time.strftime("%Y-%m-%dT%H:%M:%S"),
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
reg = registry if registry is not None else ToolRegistry.load(home)
|
|
229
|
+
reg.install(tool)
|
|
230
|
+
reg.save(home)
|
|
231
|
+
return tool
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
# --------------------------------------------------------------------------
|
|
235
|
+
# Canonical MCP config (Agentik_SSOT/mcp/mcp-config.yaml)
|
|
236
|
+
# --------------------------------------------------------------------------
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
def mcp_config_path(omega_home: str | Path | None = None) -> Path:
|
|
240
|
+
return _omega_home(omega_home) / "Agentik_SSOT" / "mcp" / "mcp-config.yaml"
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
def load_mcp_config(omega_home: str | Path | None = None) -> dict[str, Any]:
|
|
244
|
+
import yaml
|
|
245
|
+
path = mcp_config_path(omega_home)
|
|
246
|
+
if not path.exists():
|
|
247
|
+
return {"version": 1, "servers": []}
|
|
248
|
+
data = yaml.safe_load(path.read_text()) or {}
|
|
249
|
+
data.setdefault("version", 1)
|
|
250
|
+
data.setdefault("servers", [])
|
|
251
|
+
return data
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def merge_mcp_config(
|
|
255
|
+
omega_home: str | Path | None,
|
|
256
|
+
entry: dict[str, Any],
|
|
257
|
+
) -> dict[str, Any]:
|
|
258
|
+
"""Append-or-replace one server entry in mcp-config.yaml. Idempotent."""
|
|
259
|
+
import yaml
|
|
260
|
+
data = load_mcp_config(omega_home)
|
|
261
|
+
servers = data.setdefault("servers", [])
|
|
262
|
+
eid = entry.get("id")
|
|
263
|
+
for i, existing in enumerate(servers):
|
|
264
|
+
if existing.get("id") == eid:
|
|
265
|
+
servers[i] = entry
|
|
266
|
+
break
|
|
267
|
+
else:
|
|
268
|
+
servers.append(entry)
|
|
269
|
+
path = mcp_config_path(omega_home)
|
|
270
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
271
|
+
path.write_text(yaml.safe_dump(data, sort_keys=False))
|
|
272
|
+
return data
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
"""Understand-Anything bridge — register the Claude Code plugin + consume its graph.
|
|
2
|
+
|
|
3
|
+
Understand-Anything is a popular Claude Code plugin (27k+ stars) that
|
|
4
|
+
analyses a codebase with a multi-agent pipeline and produces an
|
|
5
|
+
interactive knowledge graph at
|
|
6
|
+
``.understand-anything/knowledge-graph.json``.
|
|
7
|
+
|
|
8
|
+
It overlaps with OmegaOS's existing graphify integration, but the output
|
|
9
|
+
shape is different (it's much richer — file/function/class/dependency
|
|
10
|
+
nodes, business-domain layer, persona-adaptive views, language-concept
|
|
11
|
+
overlays).
|
|
12
|
+
|
|
13
|
+
This bridge gives operators a one-command path to:
|
|
14
|
+
|
|
15
|
+
1. Install the plugin into Claude Code via the marketplace (uses the
|
|
16
|
+
same OAuth as everything else — no API key, no separate auth).
|
|
17
|
+
2. After ``/understand`` runs in Claude Code, consume the resulting
|
|
18
|
+
``.understand-anything/knowledge-graph.json`` into OmegaOS's
|
|
19
|
+
``GraphRetriever`` (same path we use for graphify) so Oracle /
|
|
20
|
+
workers can answer "where in the code is X?" via Graph RAG.
|
|
21
|
+
|
|
22
|
+
What this module does NOT do
|
|
23
|
+
----------------------------
|
|
24
|
+
|
|
25
|
+
* Run the analysis pipeline itself — that's Claude Code's job via the
|
|
26
|
+
plugin. We trigger it (``/understand``) and consume the artefact.
|
|
27
|
+
* Replace graphify — both can coexist; ``omega graph`` already
|
|
28
|
+
consumes whichever JSON the operator points at.
|
|
29
|
+
"""
|
|
30
|
+
from __future__ import annotations
|
|
31
|
+
|
|
32
|
+
import json
|
|
33
|
+
import shutil
|
|
34
|
+
import subprocess
|
|
35
|
+
import time
|
|
36
|
+
from dataclasses import dataclass
|
|
37
|
+
from pathlib import Path
|
|
38
|
+
from typing import Any
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
_PLUGIN_MARKETPLACE = "Lum1104/Understand-Anything"
|
|
42
|
+
_PLUGIN_NAME = "understand-anything"
|
|
43
|
+
_OUTPUT_FILE = "knowledge-graph.json"
|
|
44
|
+
_OUTPUT_DIR = ".understand-anything"
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
# ---------------------------------------------------------------------------
|
|
48
|
+
# Errors
|
|
49
|
+
# ---------------------------------------------------------------------------
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class UnderstandAnythingError(RuntimeError):
|
|
53
|
+
pass
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
# ---------------------------------------------------------------------------
|
|
57
|
+
# Plugin install (via `claude` CLI's plugin system)
|
|
58
|
+
# ---------------------------------------------------------------------------
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
@dataclass
|
|
62
|
+
class InstallResult:
|
|
63
|
+
ok: bool
|
|
64
|
+
method: str
|
|
65
|
+
detail: str = ""
|
|
66
|
+
error: str = ""
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def is_plugin_installed(home_claude: str | Path | None = None) -> bool:
|
|
70
|
+
"""True iff the plugin dir already exists under ~/.claude/plugins/."""
|
|
71
|
+
base = Path(home_claude) if home_claude else Path.home() / ".claude"
|
|
72
|
+
# Claude Code stores marketplaces under plugins/marketplaces/<owner>-<repo>/
|
|
73
|
+
p = base / "plugins" / "marketplaces"
|
|
74
|
+
if not p.is_dir():
|
|
75
|
+
return False
|
|
76
|
+
# Best-effort match — different versions of Claude Code use slightly
|
|
77
|
+
# different dir naming conventions.
|
|
78
|
+
for child in p.iterdir():
|
|
79
|
+
n = child.name.lower()
|
|
80
|
+
if "understand-anything" in n or "lum1104" in n:
|
|
81
|
+
return True
|
|
82
|
+
return False
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def install_plugin(
|
|
86
|
+
*,
|
|
87
|
+
claude_cmd: str = "claude",
|
|
88
|
+
timeout_s: int = 120,
|
|
89
|
+
dry_run: bool = False,
|
|
90
|
+
) -> InstallResult:
|
|
91
|
+
"""Install the Understand-Anything plugin into Claude Code.
|
|
92
|
+
|
|
93
|
+
Mirrors the upstream instructions::
|
|
94
|
+
|
|
95
|
+
/plugin marketplace add Lum1104/Understand-Anything
|
|
96
|
+
/plugin install understand-anything
|
|
97
|
+
|
|
98
|
+
We invoke them via ``claude -p`` so the existing Max OAuth is the
|
|
99
|
+
auth — no API key, no marketplace login.
|
|
100
|
+
"""
|
|
101
|
+
if shutil.which(claude_cmd) is None:
|
|
102
|
+
return InstallResult(
|
|
103
|
+
ok=False, method="skip",
|
|
104
|
+
error=f"`{claude_cmd}` not on PATH — install Claude Code first",
|
|
105
|
+
)
|
|
106
|
+
if dry_run:
|
|
107
|
+
return InstallResult(
|
|
108
|
+
ok=True, method="dry-run",
|
|
109
|
+
detail=(
|
|
110
|
+
f"would run: {claude_cmd} -p "
|
|
111
|
+
f"'/plugin marketplace add {_PLUGIN_MARKETPLACE} && "
|
|
112
|
+
f"/plugin install {_PLUGIN_NAME}'"
|
|
113
|
+
),
|
|
114
|
+
)
|
|
115
|
+
# Two slash commands, one session.
|
|
116
|
+
prompt = (
|
|
117
|
+
f"/plugin marketplace add {_PLUGIN_MARKETPLACE}\n"
|
|
118
|
+
f"/plugin install {_PLUGIN_NAME}"
|
|
119
|
+
)
|
|
120
|
+
try:
|
|
121
|
+
proc = subprocess.run(
|
|
122
|
+
[claude_cmd, "-p", prompt, "--dangerously-skip-permissions"],
|
|
123
|
+
check=False, capture_output=True, text=True, timeout=timeout_s,
|
|
124
|
+
)
|
|
125
|
+
except subprocess.TimeoutExpired:
|
|
126
|
+
return InstallResult(
|
|
127
|
+
ok=False, method="claude-p",
|
|
128
|
+
error=f"`claude -p` timed out after {timeout_s}s",
|
|
129
|
+
)
|
|
130
|
+
if proc.returncode != 0:
|
|
131
|
+
tail = (proc.stdout + "\n" + proc.stderr).strip()[-400:]
|
|
132
|
+
return InstallResult(
|
|
133
|
+
ok=False, method="claude-p",
|
|
134
|
+
error=f"claude exited {proc.returncode}\n{tail}",
|
|
135
|
+
)
|
|
136
|
+
return InstallResult(
|
|
137
|
+
ok=True, method="claude-p",
|
|
138
|
+
detail=f"installed {_PLUGIN_NAME} from {_PLUGIN_MARKETPLACE}",
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
# ---------------------------------------------------------------------------
|
|
143
|
+
# Trigger an analysis run + consume the output
|
|
144
|
+
# ---------------------------------------------------------------------------
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
@dataclass
|
|
148
|
+
class RunResult:
|
|
149
|
+
ok: bool
|
|
150
|
+
output_path: str = ""
|
|
151
|
+
nodes: int = 0
|
|
152
|
+
edges: int = 0
|
|
153
|
+
error: str = ""
|
|
154
|
+
elapsed_s: float = 0.0
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def run(
|
|
158
|
+
project_path: str | Path,
|
|
159
|
+
*,
|
|
160
|
+
claude_cmd: str = "claude",
|
|
161
|
+
language: str | None = None,
|
|
162
|
+
timeout_s: int = 1800,
|
|
163
|
+
) -> RunResult:
|
|
164
|
+
"""Trigger ``/understand`` in the given project directory.
|
|
165
|
+
|
|
166
|
+
Returns a RunResult pointing at the produced
|
|
167
|
+
``.understand-anything/knowledge-graph.json`` and a node/edge count.
|
|
168
|
+
"""
|
|
169
|
+
start = time.time()
|
|
170
|
+
project = Path(project_path).resolve()
|
|
171
|
+
if not project.is_dir():
|
|
172
|
+
return RunResult(ok=False, error=f"not a directory: {project}")
|
|
173
|
+
if shutil.which(claude_cmd) is None:
|
|
174
|
+
return RunResult(
|
|
175
|
+
ok=False,
|
|
176
|
+
error=f"`{claude_cmd}` not on PATH — install Claude Code first",
|
|
177
|
+
)
|
|
178
|
+
prompt = "/understand"
|
|
179
|
+
if language:
|
|
180
|
+
prompt += f" --language {language}"
|
|
181
|
+
try:
|
|
182
|
+
proc = subprocess.run(
|
|
183
|
+
[claude_cmd, "-p", prompt, "--add-dir", str(project),
|
|
184
|
+
"--dangerously-skip-permissions"],
|
|
185
|
+
check=False, capture_output=True, text=True, timeout=timeout_s,
|
|
186
|
+
cwd=str(project),
|
|
187
|
+
)
|
|
188
|
+
except subprocess.TimeoutExpired:
|
|
189
|
+
return RunResult(
|
|
190
|
+
ok=False, elapsed_s=round(time.time() - start, 2),
|
|
191
|
+
error=f"claude -p /understand timed out after {timeout_s}s",
|
|
192
|
+
)
|
|
193
|
+
if proc.returncode != 0:
|
|
194
|
+
tail = (proc.stdout + "\n" + proc.stderr).strip()[-400:]
|
|
195
|
+
return RunResult(
|
|
196
|
+
ok=False, elapsed_s=round(time.time() - start, 2),
|
|
197
|
+
error=f"claude exited {proc.returncode}\n{tail}",
|
|
198
|
+
)
|
|
199
|
+
out = project / _OUTPUT_DIR / _OUTPUT_FILE
|
|
200
|
+
if not out.exists():
|
|
201
|
+
return RunResult(
|
|
202
|
+
ok=False, elapsed_s=round(time.time() - start, 2),
|
|
203
|
+
error=f"expected output not found at {out}",
|
|
204
|
+
)
|
|
205
|
+
nodes, edges = _count_graph(out)
|
|
206
|
+
return RunResult(
|
|
207
|
+
ok=True, output_path=str(out),
|
|
208
|
+
nodes=nodes, edges=edges,
|
|
209
|
+
elapsed_s=round(time.time() - start, 2),
|
|
210
|
+
)
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
def _count_graph(path: Path) -> tuple[int, int]:
|
|
214
|
+
try:
|
|
215
|
+
data = json.loads(path.read_text())
|
|
216
|
+
except (OSError, json.JSONDecodeError):
|
|
217
|
+
return 0, 0
|
|
218
|
+
if not isinstance(data, dict):
|
|
219
|
+
return 0, 0
|
|
220
|
+
n = len(data.get("nodes") or [])
|
|
221
|
+
e = len(data.get("edges") or data.get("links") or [])
|
|
222
|
+
return n, e
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
# ---------------------------------------------------------------------------
|
|
226
|
+
# Consume the produced graph into GraphRetriever
|
|
227
|
+
# ---------------------------------------------------------------------------
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
def consume_graph(
|
|
231
|
+
project_path: str | Path,
|
|
232
|
+
*,
|
|
233
|
+
omega_home: str | Path | None = None,
|
|
234
|
+
) -> dict[str, Any]:
|
|
235
|
+
"""Merge the knowledge-graph.json into OmegaOS's GraphRetriever.
|
|
236
|
+
|
|
237
|
+
Format adapter: Understand-Anything emits ``{nodes: [{id, type, …}],
|
|
238
|
+
edges: [{from, to, kind, …}]}``; we map that onto the engine's
|
|
239
|
+
``GraphRetriever`` interface (which already powers the graphify
|
|
240
|
+
consumer at ``omega graph <path>``).
|
|
241
|
+
|
|
242
|
+
Returns ``{nodes, edges, written_to}``.
|
|
243
|
+
"""
|
|
244
|
+
import os as _os
|
|
245
|
+
project = Path(project_path).resolve()
|
|
246
|
+
out = project / _OUTPUT_DIR / _OUTPUT_FILE
|
|
247
|
+
if not out.exists():
|
|
248
|
+
raise UnderstandAnythingError(
|
|
249
|
+
f"no graph at {out} — run `omega ua run {project}` first"
|
|
250
|
+
)
|
|
251
|
+
try:
|
|
252
|
+
data = json.loads(out.read_text())
|
|
253
|
+
except (OSError, json.JSONDecodeError) as exc:
|
|
254
|
+
raise UnderstandAnythingError(f"unreadable graph at {out}: {exc}") from exc
|
|
255
|
+
|
|
256
|
+
nodes = data.get("nodes") or []
|
|
257
|
+
edges = data.get("edges") or data.get("links") or []
|
|
258
|
+
|
|
259
|
+
# Project into the engine's memory dir.
|
|
260
|
+
home = Path(omega_home or _os.environ.get(
|
|
261
|
+
"OMEGA_HOME", str(Path.home() / "Omega")
|
|
262
|
+
))
|
|
263
|
+
mem = home / "Agentik_Runtime" / "memory"
|
|
264
|
+
mem.mkdir(parents=True, exist_ok=True)
|
|
265
|
+
dest = mem / "understand-anything.graph.json"
|
|
266
|
+
# Normalised shape — same as graphify's output, so GraphRetriever
|
|
267
|
+
# can consume it via the existing ``omega graph`` pipeline.
|
|
268
|
+
normalised = {
|
|
269
|
+
"format": "understand-anything",
|
|
270
|
+
"source_project": str(project),
|
|
271
|
+
"nodes": nodes,
|
|
272
|
+
"edges": edges,
|
|
273
|
+
}
|
|
274
|
+
dest.write_text(json.dumps(normalised, indent=2))
|
|
275
|
+
return {"nodes": len(nodes), "edges": len(edges), "written_to": str(dest)}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""Update checker — is a newer @agentikos/omega-os out?
|
|
2
|
+
|
|
3
|
+
Queries the npm registry for the latest published version, compares
|
|
4
|
+
against the running version. Pure-stdlib HTTP (no requests).
|
|
5
|
+
|
|
6
|
+
CLI surface:
|
|
7
|
+
|
|
8
|
+
* ``omega update --check`` — print current + latest, exit 0
|
|
9
|
+
* ``omega update --apply`` — re-run install.sh --force (delegates
|
|
10
|
+
to ``omega upgrade`` which already
|
|
11
|
+
handles that path)
|
|
12
|
+
"""
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
|
|
15
|
+
import json
|
|
16
|
+
import urllib.error
|
|
17
|
+
import urllib.request
|
|
18
|
+
from dataclasses import dataclass
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
_REGISTRY = "https://registry.npmjs.org/@agentikos%2Fomega-os"
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@dataclass
|
|
25
|
+
class UpdateInfo:
|
|
26
|
+
current: str
|
|
27
|
+
latest: str
|
|
28
|
+
is_outdated: bool
|
|
29
|
+
error: str = ""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _parse_semver(v: str) -> tuple[int, int, int]:
|
|
33
|
+
"""Best-effort semver parse. Non-numeric components → 0."""
|
|
34
|
+
parts = v.split("-")[0].split(".")[:3]
|
|
35
|
+
out: list[int] = []
|
|
36
|
+
for p in parts:
|
|
37
|
+
try:
|
|
38
|
+
out.append(int(p))
|
|
39
|
+
except ValueError:
|
|
40
|
+
out.append(0)
|
|
41
|
+
while len(out) < 3:
|
|
42
|
+
out.append(0)
|
|
43
|
+
return out[0], out[1], out[2]
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def check_for_updates(current: str, *, timeout: int = 10) -> UpdateInfo:
|
|
47
|
+
"""Compare ``current`` against the npm registry."""
|
|
48
|
+
try:
|
|
49
|
+
req = urllib.request.Request(
|
|
50
|
+
_REGISTRY,
|
|
51
|
+
headers={"Accept": "application/json"},
|
|
52
|
+
)
|
|
53
|
+
with urllib.request.urlopen(req, timeout=timeout) as resp: # noqa: S310
|
|
54
|
+
data = json.loads(resp.read().decode("utf-8"))
|
|
55
|
+
except urllib.error.HTTPError as exc:
|
|
56
|
+
return UpdateInfo(
|
|
57
|
+
current=current, latest="?", is_outdated=False,
|
|
58
|
+
error=f"HTTP {exc.code}: {exc.reason}",
|
|
59
|
+
)
|
|
60
|
+
except Exception as exc: # noqa: BLE001
|
|
61
|
+
return UpdateInfo(
|
|
62
|
+
current=current, latest="?", is_outdated=False,
|
|
63
|
+
error=f"network: {exc}"[:200],
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
latest = (data.get("dist-tags") or {}).get("latest", "?")
|
|
67
|
+
return UpdateInfo(
|
|
68
|
+
current=current, latest=latest,
|
|
69
|
+
is_outdated=_parse_semver(current) < _parse_semver(latest),
|
|
70
|
+
)
|