@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,388 @@
|
|
|
1
|
+
"""Role → skills routing.
|
|
2
|
+
|
|
3
|
+
Why this module exists
|
|
4
|
+
----------------------
|
|
5
|
+
|
|
6
|
+
OmegaOS ships 24 first-party skills (17 audits + dispatch + pursue + cadence
|
|
7
|
+
+ skill-finder/auditor + rag-route). Anthropic's catalog grows weekly. A
|
|
8
|
+
worker spawned with EVERY skill available has its context bloated with
|
|
9
|
+
descriptions it'll never use — and Claude gets confused about which to
|
|
10
|
+
reach for.
|
|
11
|
+
|
|
12
|
+
The right shape: each role declares the skills it should reach for, and the
|
|
13
|
+
``WorkerBrief.skills`` field becomes the authoritative tool palette. The
|
|
14
|
+
worker's system prompt enumerates those skills + a "use them when
|
|
15
|
+
applicable" instruction so Claude actually engages them.
|
|
16
|
+
|
|
17
|
+
Topology overrides this per-mission (e.g. a "frontend-fix" mission gives
|
|
18
|
+
the worker only `pursue` + `uiuxaudit` + `a11yaudit`, while a "data-migration"
|
|
19
|
+
mission gives it `pursue` + `dataaudit` + `apiaudit`).
|
|
20
|
+
|
|
21
|
+
Resolution order (highest wins)
|
|
22
|
+
-------------------------------
|
|
23
|
+
|
|
24
|
+
1. Explicit ``brief.skills`` (operator passed --skills)
|
|
25
|
+
2. Topology declares ``mission_skills`` for the role
|
|
26
|
+
3. ``_ROLE_SKILLS`` map below (sensible defaults per role)
|
|
27
|
+
4. Empty list → Claude uses whatever's globally installed
|
|
28
|
+
|
|
29
|
+
Public API
|
|
30
|
+
----------
|
|
31
|
+
|
|
32
|
+
``skills_for(role, ...)`` returns the resolved list.
|
|
33
|
+
``recommend(role)`` returns the role-default for `omega skill recommend`.
|
|
34
|
+
``catalog_for_home(home)`` returns every skill id present in the SSOT.
|
|
35
|
+
``format_skill_block(skills, home)`` builds the system_prompt snippet
|
|
36
|
+
embedded by ``spawn_worker``.
|
|
37
|
+
"""
|
|
38
|
+
from __future__ import annotations
|
|
39
|
+
|
|
40
|
+
from pathlib import Path
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
# ---------------------------------------------------------------------------
|
|
44
|
+
# Role → default skills
|
|
45
|
+
# ---------------------------------------------------------------------------
|
|
46
|
+
#
|
|
47
|
+
# Curated. Not "every skill" — only the ones that role actually benefits from.
|
|
48
|
+
# Each entry is a comment + a list because future maintainers should be able
|
|
49
|
+
# to see the WHY of every line.
|
|
50
|
+
|
|
51
|
+
_ROLE_SKILLS: dict[str, list[str]] = {
|
|
52
|
+
# ---------------------------------------------------------------------
|
|
53
|
+
# Dispatchers — they plan + delegate. They orchestrate but never code.
|
|
54
|
+
# ``dispatch`` lets them spawn sub-missions; ``pursue`` lets them run
|
|
55
|
+
# a goal-driven loop directly when planning isn't worth it. ``cadence``
|
|
56
|
+
# lets them schedule recurring beats. They have the FULL audit catalog
|
|
57
|
+
# in scope so they can RECOMMEND audits when assigning work.
|
|
58
|
+
# ---------------------------------------------------------------------
|
|
59
|
+
"oracle": [
|
|
60
|
+
"dispatch", "pursue", "cadence",
|
|
61
|
+
"codeaudit", "debugaudit", "uiuxaudit", "secaudit",
|
|
62
|
+
"perfaudit", "a11yaudit", "flowaudit", "featureaudit",
|
|
63
|
+
],
|
|
64
|
+
"manager": [
|
|
65
|
+
"dispatch", "pursue",
|
|
66
|
+
"codeaudit", "debugaudit", "secaudit", "perfaudit",
|
|
67
|
+
],
|
|
68
|
+
"aisb": [
|
|
69
|
+
"dispatch", "pursue", "cadence",
|
|
70
|
+
"codeaudit", "debugaudit", "uiuxaudit", "secaudit",
|
|
71
|
+
],
|
|
72
|
+
"architect": [
|
|
73
|
+
"dispatch", "pursue",
|
|
74
|
+
"codeaudit", "logicaudit", "apiaudit", "dataaudit",
|
|
75
|
+
"secaudit", "perfaudit",
|
|
76
|
+
],
|
|
77
|
+
|
|
78
|
+
# ---------------------------------------------------------------------
|
|
79
|
+
# Executors — they DO the work. They get the full audit palette so
|
|
80
|
+
# they can self-verify BEFORE claiming done (a worker that runs
|
|
81
|
+
# /codeaudit on its own changes catches its own mistakes — verified
|
|
82
|
+
# completion shifts left). ``pursue`` is the goal-driven loop.
|
|
83
|
+
# ---------------------------------------------------------------------
|
|
84
|
+
"worker": [
|
|
85
|
+
"pursue",
|
|
86
|
+
# Core code / runtime
|
|
87
|
+
"codeaudit", "debugaudit", "logicaudit",
|
|
88
|
+
# UI / UX (most common worker domain)
|
|
89
|
+
"uiuxaudit", "a11yaudit", "flowaudit", "motionaudit", "copyaudit",
|
|
90
|
+
# Cross-cutting checks
|
|
91
|
+
"perfaudit", "secaudit", "seoaudit",
|
|
92
|
+
],
|
|
93
|
+
"construct": [
|
|
94
|
+
"pursue",
|
|
95
|
+
# Build / data / API specialist
|
|
96
|
+
"codeaudit", "apiaudit", "dataaudit", "logicaudit",
|
|
97
|
+
"perfaudit", "secaudit", "dxaudit",
|
|
98
|
+
],
|
|
99
|
+
"link": [
|
|
100
|
+
"pursue",
|
|
101
|
+
# Integration / external systems
|
|
102
|
+
"apiaudit", "secaudit", "automationaudit",
|
|
103
|
+
],
|
|
104
|
+
|
|
105
|
+
# ---------------------------------------------------------------------
|
|
106
|
+
# Verifiers — read-only; they audit. The bigger the palette, the
|
|
107
|
+
# harder it is for a worker to hide a regression. Seraph is the
|
|
108
|
+
# senior verifier — it gets EVERY audit.
|
|
109
|
+
# ---------------------------------------------------------------------
|
|
110
|
+
"audit": [
|
|
111
|
+
"codeaudit", "debugaudit", "secaudit",
|
|
112
|
+
"perfaudit", "a11yaudit",
|
|
113
|
+
],
|
|
114
|
+
"verifier": [
|
|
115
|
+
"codeaudit", "debugaudit", "logicaudit",
|
|
116
|
+
],
|
|
117
|
+
"seraph": [
|
|
118
|
+
"codeaudit", "debugaudit", "uiuxaudit", "secaudit",
|
|
119
|
+
"perfaudit", "a11yaudit", "seoaudit", "apiaudit", "dataaudit",
|
|
120
|
+
"flowaudit", "featureaudit", "logicaudit",
|
|
121
|
+
],
|
|
122
|
+
|
|
123
|
+
# ---------------------------------------------------------------------
|
|
124
|
+
# Triage / classifier — minimal tool surface. Haiku model, fast pass.
|
|
125
|
+
# ---------------------------------------------------------------------
|
|
126
|
+
"classifier": [],
|
|
127
|
+
"triage": [],
|
|
128
|
+
|
|
129
|
+
# ---------------------------------------------------------------------
|
|
130
|
+
# Special meta-roles
|
|
131
|
+
# ---------------------------------------------------------------------
|
|
132
|
+
"skill_curator": ["skill-finder", "skill-auditor"],
|
|
133
|
+
"smith": [ # Reflection / learning — reads audits
|
|
134
|
+
"codeaudit", "debugaudit", "retentionaudit",
|
|
135
|
+
],
|
|
136
|
+
|
|
137
|
+
# ---------------------------------------------------------------------
|
|
138
|
+
# Domain-specialist worker roles. Operators dispatch to these when a
|
|
139
|
+
# mission has an obvious primary domain. Each gets pursue + the
|
|
140
|
+
# domain audit + the 2-3 most relevant cross-cutters.
|
|
141
|
+
# ---------------------------------------------------------------------
|
|
142
|
+
"worker_ui": [
|
|
143
|
+
"pursue",
|
|
144
|
+
# Audits — UI domain
|
|
145
|
+
"uiuxaudit", "a11yaudit", "motionaudit", "copyaudit", "refontaudit",
|
|
146
|
+
# Design-discipline skills (Genesis writes these into feature briefs;
|
|
147
|
+
# workers MUST invoke them, not paraphrase them)
|
|
148
|
+
"shadcn-ui", "emil-design-eng", "impeccable", "taste-skill",
|
|
149
|
+
"frontend-design", "design-taste-frontend",
|
|
150
|
+
],
|
|
151
|
+
"worker_perf": ["pursue", "perfaudit", "codeaudit", "debugaudit", "logicaudit"],
|
|
152
|
+
"worker_sec": ["pursue", "secaudit", "codeaudit", "apiaudit", "dataaudit"],
|
|
153
|
+
"worker_api": ["pursue", "apiaudit", "codeaudit", "dataaudit", "secaudit"],
|
|
154
|
+
"worker_data": ["pursue", "dataaudit", "codeaudit", "apiaudit", "secaudit"],
|
|
155
|
+
"worker_seo": ["pursue", "seoaudit", "perfaudit", "a11yaudit", "copyaudit"],
|
|
156
|
+
"worker_ops": ["pursue", "automationaudit", "dxaudit", "secaudit"],
|
|
157
|
+
"worker_growth": ["pursue", "retentionaudit", "featureaudit", "copyaudit"],
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
# Skills the engine treats as "power tools" — operators should know they
|
|
162
|
+
# exist. Surfaced by `omega skill recommend` and the post-install card.
|
|
163
|
+
POWER_SKILLS: list[str] = [
|
|
164
|
+
"dispatch", # multi-agent orchestration
|
|
165
|
+
"pursue", # goal-driven loop
|
|
166
|
+
"cadence", # scheduled / recurring beats
|
|
167
|
+
"codeaudit", # is the code SOLID
|
|
168
|
+
"debugaudit", # what's broken right now
|
|
169
|
+
"uiuxaudit", # is the UI beautiful
|
|
170
|
+
"secaudit", # is it secure
|
|
171
|
+
"perfaudit", # is it fast
|
|
172
|
+
"a11yaudit", # is it accessible
|
|
173
|
+
"seoaudit", # is it discoverable
|
|
174
|
+
]
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
# ---------------------------------------------------------------------------
|
|
178
|
+
# Canonical skill-chain workflows.
|
|
179
|
+
#
|
|
180
|
+
# Each entry is a multi-line string describing how skills compose into a
|
|
181
|
+
# complete workflow. ``omega skill workflows`` surfaces these so operators
|
|
182
|
+
# can SEE how /dispatch → /pursue → /codeaudit → fix-workers → re-audit
|
|
183
|
+
# actually chains together at runtime.
|
|
184
|
+
#
|
|
185
|
+
# The content is informative — Claude reads these via the skill block when
|
|
186
|
+
# the role's palette includes the relevant primitives. They are NOT executed
|
|
187
|
+
# as code; they're the canonical playbook.
|
|
188
|
+
# ---------------------------------------------------------------------------
|
|
189
|
+
|
|
190
|
+
WORKFLOWS: dict[str, str] = {
|
|
191
|
+
"ship-feature": """\
|
|
192
|
+
Build + verify a feature, end-to-end, with no API-key burn.
|
|
193
|
+
|
|
194
|
+
1. Operator runs: /dispatch "implement OAuth login with verify against tests/auth.test.ts"
|
|
195
|
+
2. /dispatch → Oracle plans 3 worker subtasks:
|
|
196
|
+
a. add the auth endpoint (worker, with /codeaudit + /apiaudit + /secaudit)
|
|
197
|
+
b. update the client form (worker, with /uiuxaudit + /a11yaudit + /flowaudit)
|
|
198
|
+
c. add the playwright test (worker, with /codeaudit + /flowaudit)
|
|
199
|
+
3. Each worker runs /pursue <verify_cmd> until exit 0.
|
|
200
|
+
4. Seraph runs /codeaudit + /debugaudit + /secaudit on each .done.json.
|
|
201
|
+
5. Mission completes only when EVERY child is VERIFIED (not just CLAIMED_DONE).
|
|
202
|
+
6. Smith reflection (autonomous, daily) reads the audit history and writes Insight
|
|
203
|
+
proposals to Agentik_Extra/staging/promotion/ if anything was weak.
|
|
204
|
+
|
|
205
|
+
Skills in chain: /dispatch → /pursue → /codeaudit → fix workers → /codeaudit (re-audit)
|
|
206
|
+
""",
|
|
207
|
+
|
|
208
|
+
"self-audit-loop": """\
|
|
209
|
+
A worker AUDITS ITS OWN CHANGES before claiming done — verified completion
|
|
210
|
+
shifts left, catching mistakes one layer earlier.
|
|
211
|
+
|
|
212
|
+
1. Worker reads brief, makes the change.
|
|
213
|
+
2. BEFORE writing .done.json, worker runs /codeaudit --files=<changed>
|
|
214
|
+
- If score >= 85 → write done_clean
|
|
215
|
+
- If score < 85 → fix the findings (loop), then re-audit
|
|
216
|
+
- Hard cap: 3 iterations, then write `pending` with the unresolved findings
|
|
217
|
+
3. Seraph (verifier) re-runs the audit independently.
|
|
218
|
+
- If Seraph also passes → VERIFIED
|
|
219
|
+
- If Seraph fails what the worker thought it passed → REJECTED + retry budget
|
|
220
|
+
4. Verified completion is now SOLID — two independent passes had to agree.
|
|
221
|
+
|
|
222
|
+
Skills in chain: /pursue → /codeaudit (self) → /codeaudit (verifier)
|
|
223
|
+
""",
|
|
224
|
+
|
|
225
|
+
"ux-redesign": """\
|
|
226
|
+
Multi-domain UX redesign with parallel specialised workers.
|
|
227
|
+
|
|
228
|
+
1. Operator: /refontaudit --url=https://app/dashboard
|
|
229
|
+
→ produces a redesign plan with /100 score per pillar
|
|
230
|
+
2. /dispatch "execute the refontaudit plan; preserve existing functionality"
|
|
231
|
+
→ Oracle spawns 4 worker_ui's in parallel, file ownership disjoint:
|
|
232
|
+
a. layout shell (worker_ui + /uiuxaudit)
|
|
233
|
+
b. component primitives (worker_ui + /a11yaudit)
|
|
234
|
+
c. motion + transitions (worker_ui + /motionaudit)
|
|
235
|
+
d. copy + microcopy (worker_ui + /copyaudit)
|
|
236
|
+
3. Each worker /pursue <playwright-screenshot-diff> until 0 visual regressions.
|
|
237
|
+
4. Seraph runs FULL audit pass (12 audits) on the final state.
|
|
238
|
+
5. Mission verified only if every audit >= threshold.
|
|
239
|
+
|
|
240
|
+
Skills in chain: /refontaudit → /dispatch → 4× /pursue + /uiuxaudit/a11yaudit/motionaudit/copyaudit
|
|
241
|
+
""",
|
|
242
|
+
|
|
243
|
+
"linear-fix-batch": """\
|
|
244
|
+
Fix N Linear tickets in parallel-safe batches (the v0.10 pattern).
|
|
245
|
+
|
|
246
|
+
1. Operator: /dispatch "fix all 36 Linear feedback tickets in this project"
|
|
247
|
+
2. Oracle calls linear-conflict-analyzer.py → annotates each ticket with
|
|
248
|
+
files_touched + conflict_class (narrow | broad | terminal).
|
|
249
|
+
3. Oracle greedy-packs up to 4 NARROW tickets with disjoint file footprints
|
|
250
|
+
into one batch; BROAD tickets run alone.
|
|
251
|
+
4. Per ticket, worker runs:
|
|
252
|
+
- Playwright BEFORE capture (visual + console baseline)
|
|
253
|
+
- implement fix
|
|
254
|
+
- Playwright AFTER capture
|
|
255
|
+
- /codeaudit --files=<changed> (self-audit)
|
|
256
|
+
- write .done.json with Before/After paths
|
|
257
|
+
5. Seraph runs /debugaudit on each ticket → VERIFIED or REJECTED.
|
|
258
|
+
6. After each batch, `npm run build` once.
|
|
259
|
+
7. Next batch dispatches; repeat until queue empty.
|
|
260
|
+
|
|
261
|
+
Skills in chain: /dispatch → /pursue per ticket → /codeaudit → /debugaudit
|
|
262
|
+
""",
|
|
263
|
+
|
|
264
|
+
"scheduled-quality": """\
|
|
265
|
+
Continuously running quality watch via cron + /cadence.
|
|
266
|
+
|
|
267
|
+
1. Operator: /cadence schedule cron "0 3 * * *" \\
|
|
268
|
+
"run the full forensic audit suite on $project, write the report,
|
|
269
|
+
create Linear tickets for findings >= high severity"
|
|
270
|
+
2. Every night at 03:00, autonomous-supervisor fires the charter.
|
|
271
|
+
3. Engine dispatches a verifier with the full audit palette (12 audits).
|
|
272
|
+
4. Failing audits → Insight files in Agentik_Extra/staging/promotion/.
|
|
273
|
+
5. Smith reflection (also daily) reads the trend → proposes which audits
|
|
274
|
+
to dispatch fix-workers for first.
|
|
275
|
+
|
|
276
|
+
Skills in chain: /cadence → daily cron → /dispatch verifier → 12 audits → Smith insight
|
|
277
|
+
""",
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
def recommend(role: str) -> list[str]:
|
|
282
|
+
"""Default skill list for a role. Empty list if the role is unknown."""
|
|
283
|
+
return list(_ROLE_SKILLS.get(role, []))
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
def skills_for(
|
|
287
|
+
role: str,
|
|
288
|
+
*,
|
|
289
|
+
explicit: list[str] | None = None,
|
|
290
|
+
topology_skills: list[str] | None = None,
|
|
291
|
+
) -> list[str]:
|
|
292
|
+
"""Resolve the final skill list for a worker (precedence order documented above)."""
|
|
293
|
+
if explicit:
|
|
294
|
+
return list(explicit)
|
|
295
|
+
if topology_skills:
|
|
296
|
+
return list(topology_skills)
|
|
297
|
+
return recommend(role)
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
def catalog_for_home(home: str | Path) -> list[str]:
|
|
301
|
+
"""Every skill id present under ``$OMEGA_HOME/Agentik_SSOT/skills/``."""
|
|
302
|
+
root = Path(home) / "Agentik_SSOT" / "skills"
|
|
303
|
+
if not root.is_dir():
|
|
304
|
+
return []
|
|
305
|
+
out: list[str] = []
|
|
306
|
+
for child in sorted(root.iterdir()):
|
|
307
|
+
if child.is_dir() and (child / "SKILL.md").exists():
|
|
308
|
+
out.append(child.name)
|
|
309
|
+
elif child.is_file() and child.suffix == ".md":
|
|
310
|
+
out.append(child.stem)
|
|
311
|
+
return out
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
def format_skill_block(
|
|
315
|
+
skills: list[str], home: str | Path | None = None,
|
|
316
|
+
) -> str:
|
|
317
|
+
"""Build the system_prompt snippet that tells the worker which skills it
|
|
318
|
+
should reach for. Empty list → empty string (worker uses ambient skills).
|
|
319
|
+
|
|
320
|
+
Output shape:
|
|
321
|
+
|
|
322
|
+
## Skills available
|
|
323
|
+
|
|
324
|
+
You have these OmegaOS skills available — invoke them as slash
|
|
325
|
+
commands when applicable:
|
|
326
|
+
|
|
327
|
+
/pursue <verify-cmd> <intent> — goal-driven loop
|
|
328
|
+
/codeaudit --files=... — forensic code audit
|
|
329
|
+
...
|
|
330
|
+
|
|
331
|
+
Prefer these over ad-hoc Bash whenever they fit. Do not paraphrase
|
|
332
|
+
an audit protocol into raw prompts.
|
|
333
|
+
"""
|
|
334
|
+
if not skills:
|
|
335
|
+
return ""
|
|
336
|
+
|
|
337
|
+
# Build short descriptions from the SSOT SKILL.md if available; otherwise
|
|
338
|
+
# we just list the names.
|
|
339
|
+
descs: dict[str, str] = {}
|
|
340
|
+
if home is not None:
|
|
341
|
+
root = Path(home) / "Agentik_SSOT" / "skills"
|
|
342
|
+
for s in skills:
|
|
343
|
+
md = root / s / "SKILL.md"
|
|
344
|
+
if not md.is_file():
|
|
345
|
+
md = root / f"{s}.md"
|
|
346
|
+
if md.is_file():
|
|
347
|
+
d = _extract_description(md)
|
|
348
|
+
if d:
|
|
349
|
+
descs[s] = d
|
|
350
|
+
|
|
351
|
+
lines = ["", "## Skills available", ""]
|
|
352
|
+
lines.append(
|
|
353
|
+
"You have these OmegaOS skills available — invoke them as slash"
|
|
354
|
+
)
|
|
355
|
+
lines.append("commands when applicable:")
|
|
356
|
+
lines.append("")
|
|
357
|
+
for s in skills:
|
|
358
|
+
desc = descs.get(s, "")
|
|
359
|
+
if desc:
|
|
360
|
+
# Truncate to one line for compactness.
|
|
361
|
+
desc_line = desc.replace("\n", " ").strip()
|
|
362
|
+
if len(desc_line) > 110:
|
|
363
|
+
desc_line = desc_line[:107] + "..."
|
|
364
|
+
lines.append(f" /{s} — {desc_line}")
|
|
365
|
+
else:
|
|
366
|
+
lines.append(f" /{s}")
|
|
367
|
+
lines.append("")
|
|
368
|
+
lines.append(
|
|
369
|
+
"Prefer these over ad-hoc Bash whenever they fit. Do not paraphrase"
|
|
370
|
+
)
|
|
371
|
+
lines.append("an audit protocol into raw prompts — invoke the slash command.")
|
|
372
|
+
return "\n".join(lines)
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
def _extract_description(skill_md: Path) -> str:
|
|
376
|
+
"""Pull the `description:` field from a SKILL.md frontmatter."""
|
|
377
|
+
try:
|
|
378
|
+
text = skill_md.read_text()
|
|
379
|
+
except OSError:
|
|
380
|
+
return ""
|
|
381
|
+
if not text.startswith("---"):
|
|
382
|
+
return ""
|
|
383
|
+
# Manual minimal YAML — avoid the PyYAML dep on this hot path.
|
|
384
|
+
body = text.split("---", 2)[1] if text.count("---") >= 2 else ""
|
|
385
|
+
for line in body.splitlines():
|
|
386
|
+
if line.startswith("description:"):
|
|
387
|
+
return line.split(":", 1)[1].strip().strip('"').strip("'")
|
|
388
|
+
return ""
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"""`omega smoke` — 30-second post-install end-to-end check.
|
|
2
|
+
|
|
3
|
+
Runs a synthetic mission against the live engine using the deterministic
|
|
4
|
+
MockProvider. The mission is intentionally tiny: one Oracle, one Worker,
|
|
5
|
+
one Verifier. Pass = events flow + .done.json written + audit gate
|
|
6
|
+
returned VERIFIED. Fail = something in the orchestration stack is
|
|
7
|
+
broken and the operator's first real mission would too.
|
|
8
|
+
|
|
9
|
+
Exit code 0 on smoke pass, 1 on fail. Designed for CI / cron / install
|
|
10
|
+
post-step.
|
|
11
|
+
"""
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
import os
|
|
15
|
+
import time
|
|
16
|
+
from dataclasses import dataclass, field
|
|
17
|
+
from pathlib import Path
|
|
18
|
+
from typing import Any
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@dataclass
|
|
22
|
+
class SmokeResult:
|
|
23
|
+
passed: bool
|
|
24
|
+
elapsed_ms: int
|
|
25
|
+
mission_id: str = ""
|
|
26
|
+
final_state: str = ""
|
|
27
|
+
events_recorded: int = 0
|
|
28
|
+
done_files_written: int = 0
|
|
29
|
+
detail: str = ""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def run_smoke(*, omega_home: str | Path | None = None) -> SmokeResult:
|
|
33
|
+
"""One synthetic mission. Always uses MockProvider — no API keys needed.
|
|
34
|
+
|
|
35
|
+
The goal is "the orchestration stack itself works", not "your API
|
|
36
|
+
keys are valid" (that's ``omega validate providers``).
|
|
37
|
+
"""
|
|
38
|
+
home = Path(omega_home or os.environ.get("OMEGA_HOME")
|
|
39
|
+
or Path.home() / "Omega")
|
|
40
|
+
start = time.time()
|
|
41
|
+
try:
|
|
42
|
+
from omega_engine.audit import AuditGate
|
|
43
|
+
from omega_engine.bus import EventBus
|
|
44
|
+
from omega_engine.executor import Executor
|
|
45
|
+
from omega_engine.provider import MockProvider
|
|
46
|
+
from omega_engine.router import ModelRouter
|
|
47
|
+
from omega_engine.store import SQLiteStore
|
|
48
|
+
|
|
49
|
+
store_path = home / "Agentik_Runtime" / "eventlog" / "omega.db"
|
|
50
|
+
store_path.parent.mkdir(parents=True, exist_ok=True)
|
|
51
|
+
store = SQLiteStore(store_path)
|
|
52
|
+
bus = EventBus(store)
|
|
53
|
+
router = ModelRouter.single(MockProvider())
|
|
54
|
+
executor = Executor(store, bus, router, AuditGate(),
|
|
55
|
+
partial_policy="accept_partial")
|
|
56
|
+
outcome = executor.run_mission(
|
|
57
|
+
"OmegaOS smoke test — synthetic mission, no real work expected",
|
|
58
|
+
root_role="oracle",
|
|
59
|
+
)
|
|
60
|
+
events = store.events_for(outcome.root.id)
|
|
61
|
+
# how many .done.json files landed in the per-task session dirs
|
|
62
|
+
sess = home / "Agentik_Runtime" / "sessions"
|
|
63
|
+
done = sum(1 for p in sess.rglob(".done.json")) if sess.is_dir() else 0
|
|
64
|
+
store.close()
|
|
65
|
+
|
|
66
|
+
return SmokeResult(
|
|
67
|
+
passed=outcome.verified,
|
|
68
|
+
elapsed_ms=int((time.time() - start) * 1000),
|
|
69
|
+
mission_id=outcome.mission_id,
|
|
70
|
+
final_state=outcome.final_state.value,
|
|
71
|
+
events_recorded=len(events),
|
|
72
|
+
done_files_written=done,
|
|
73
|
+
detail=("orchestration stack healthy" if outcome.verified
|
|
74
|
+
else f"mission ended {outcome.final_state.value}"),
|
|
75
|
+
)
|
|
76
|
+
except Exception as exc: # noqa: BLE001
|
|
77
|
+
return SmokeResult(
|
|
78
|
+
passed=False,
|
|
79
|
+
elapsed_ms=int((time.time() - start) * 1000),
|
|
80
|
+
detail=f"smoke crashed: {exc}"[:300],
|
|
81
|
+
)
|
|
@@ -47,51 +47,158 @@ CREATE TABLE IF NOT EXISTS events (
|
|
|
47
47
|
);
|
|
48
48
|
CREATE INDEX IF NOT EXISTS idx_events_task ON events(task_id, ts, id);
|
|
49
49
|
CREATE INDEX IF NOT EXISTS idx_events_ts ON events(ts, id);
|
|
50
|
+
|
|
51
|
+
-- Snapshots: bounded reduction time on a growing log. A snapshot captures the
|
|
52
|
+
-- reduced state of a task at a given event rowid; later reductions can start
|
|
53
|
+
-- from the snapshot instead of replaying from genesis.
|
|
54
|
+
CREATE TABLE IF NOT EXISTS snapshots (
|
|
55
|
+
task_id TEXT NOT NULL,
|
|
56
|
+
state TEXT NOT NULL,
|
|
57
|
+
ts REAL NOT NULL,
|
|
58
|
+
last_event_rowid INTEGER NOT NULL,
|
|
59
|
+
PRIMARY KEY (task_id, ts)
|
|
60
|
+
);
|
|
61
|
+
CREATE INDEX IF NOT EXISTS idx_snapshots_task ON snapshots(task_id, ts DESC);
|
|
50
62
|
"""
|
|
51
63
|
|
|
52
64
|
|
|
53
65
|
class SQLiteStore(EventStore):
|
|
54
|
-
"""Append-only event log on SQLite (WAL). The default store for a VPS.
|
|
66
|
+
"""Append-only event log on SQLite (WAL). The default store for a VPS.
|
|
67
|
+
|
|
68
|
+
Thread-safety
|
|
69
|
+
-------------
|
|
70
|
+
The connection is opened with ``check_same_thread=False`` AND every
|
|
71
|
+
write is serialized through ``self._lock``. Background services
|
|
72
|
+
(AutonomousSupervisor, Telegram bot, webhook daemon) all share one
|
|
73
|
+
store from different threads — without this, the first cross-thread
|
|
74
|
+
call raises ``sqlite3.ProgrammingError`` and the supervisor dies.
|
|
75
|
+
|
|
76
|
+
Bug history: pre-v0.13 the lock was missing and a 5-thread fuzz
|
|
77
|
+
raised 5/5 ProgrammingErrors. Test: tests/test_store_concurrency.py.
|
|
78
|
+
"""
|
|
55
79
|
|
|
56
80
|
def __init__(self, db_path: str | Path):
|
|
81
|
+
import threading
|
|
57
82
|
self.db_path = str(db_path)
|
|
58
83
|
Path(self.db_path).parent.mkdir(parents=True, exist_ok=True)
|
|
59
|
-
|
|
84
|
+
# check_same_thread=False: we serialise via self._lock so the
|
|
85
|
+
# connection can be safely shared across threads.
|
|
86
|
+
self._conn = sqlite3.connect(
|
|
87
|
+
self.db_path, isolation_level=None, check_same_thread=False,
|
|
88
|
+
)
|
|
60
89
|
self._conn.row_factory = sqlite3.Row
|
|
61
90
|
self._conn.execute("PRAGMA journal_mode=WAL;")
|
|
62
91
|
self._conn.execute("PRAGMA synchronous=NORMAL;")
|
|
63
92
|
self._conn.executescript(_SCHEMA)
|
|
93
|
+
self._lock = threading.Lock()
|
|
94
|
+
|
|
95
|
+
def close(self) -> None:
|
|
96
|
+
"""Explicitly close the SQLite connection (best-effort)."""
|
|
97
|
+
try:
|
|
98
|
+
with self._lock:
|
|
99
|
+
self._conn.close()
|
|
100
|
+
except (sqlite3.Error, AttributeError):
|
|
101
|
+
pass
|
|
102
|
+
|
|
103
|
+
def __del__(self) -> None:
|
|
104
|
+
# Best-effort cleanup — Python may have already torn things down.
|
|
105
|
+
try:
|
|
106
|
+
self.close()
|
|
107
|
+
except Exception: # noqa: BLE001
|
|
108
|
+
pass
|
|
64
109
|
|
|
65
110
|
def append(self, event: Event) -> None:
|
|
66
|
-
self.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
111
|
+
with self._lock:
|
|
112
|
+
self._conn.execute(
|
|
113
|
+
"INSERT INTO events (id, task_id, type, ts, payload) "
|
|
114
|
+
"VALUES (:id, :task_id, :type, :ts, :payload)",
|
|
115
|
+
event.to_row(),
|
|
116
|
+
)
|
|
71
117
|
|
|
72
118
|
def events_for(self, task_id: str) -> list[Event]:
|
|
73
119
|
# ORDER BY rowid = insertion order — the only correct order for a reducer.
|
|
74
120
|
# Ordering by `ts` is unsafe: rapid emits can share a timestamp.
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
121
|
+
with self._lock:
|
|
122
|
+
cur = self._conn.execute(
|
|
123
|
+
"SELECT * FROM events WHERE task_id = ? ORDER BY rowid",
|
|
124
|
+
(task_id,),
|
|
125
|
+
)
|
|
126
|
+
rows = cur.fetchall()
|
|
127
|
+
return [Event.from_row(dict(r)) for r in rows]
|
|
79
128
|
|
|
80
129
|
def all_events(self, since_ts: float = 0.0) -> Iterator[Event]:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
130
|
+
# Read all rows under the lock, then yield outside it — long-running
|
|
131
|
+
# consumers must not hold the write lock.
|
|
132
|
+
with self._lock:
|
|
133
|
+
cur = self._conn.execute(
|
|
134
|
+
"SELECT * FROM events WHERE ts >= ? ORDER BY rowid",
|
|
135
|
+
(since_ts,),
|
|
136
|
+
)
|
|
137
|
+
rows = cur.fetchall()
|
|
138
|
+
for r in rows:
|
|
85
139
|
yield Event.from_row(dict(r))
|
|
86
140
|
|
|
87
141
|
def task_ids(self) -> list[str]:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
#
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
142
|
+
with self._lock:
|
|
143
|
+
cur = self._conn.execute("SELECT DISTINCT task_id FROM events")
|
|
144
|
+
return [r["task_id"] for r in cur.fetchall()]
|
|
145
|
+
|
|
146
|
+
# --- snapshots --------------------------------------------------------
|
|
147
|
+
# Snapshots are an optional optimisation. Correctness depends only on
|
|
148
|
+
# events; snapshots merely bound reduction time as the log grows.
|
|
149
|
+
|
|
150
|
+
def snapshot(self, task_id: str) -> dict | None:
|
|
151
|
+
"""Capture the current reduced state of a task at the latest event.
|
|
152
|
+
Returns the snapshot row, or None if the task has no events."""
|
|
153
|
+
with self._lock:
|
|
154
|
+
cur = self._conn.execute(
|
|
155
|
+
"SELECT rowid FROM events WHERE task_id = ? "
|
|
156
|
+
"ORDER BY rowid DESC LIMIT 1",
|
|
157
|
+
(task_id,),
|
|
158
|
+
)
|
|
159
|
+
row = cur.fetchone()
|
|
160
|
+
if not row:
|
|
161
|
+
return None
|
|
162
|
+
last_rowid = row[0]
|
|
163
|
+
# Local import to keep `store` importable without `reducer`-time deps.
|
|
164
|
+
from omega_engine.reducer import reduce_task
|
|
165
|
+
events = self.events_for(task_id)
|
|
166
|
+
state = reduce_task(events)
|
|
167
|
+
ts = events[-1].ts
|
|
168
|
+
with self._lock:
|
|
169
|
+
self._conn.execute(
|
|
170
|
+
"INSERT OR REPLACE INTO snapshots (task_id, state, ts, "
|
|
171
|
+
"last_event_rowid) VALUES (?, ?, ?, ?)",
|
|
172
|
+
(task_id, state.value, ts, last_rowid),
|
|
173
|
+
)
|
|
174
|
+
return {"task_id": task_id, "state": state, "ts": ts,
|
|
175
|
+
"last_event_rowid": last_rowid}
|
|
176
|
+
|
|
177
|
+
def latest_snapshot(self, task_id: str) -> dict | None:
|
|
178
|
+
"""Latest snapshot for a task, or None."""
|
|
179
|
+
with self._lock:
|
|
180
|
+
cur = self._conn.execute(
|
|
181
|
+
"SELECT state, ts, last_event_rowid FROM snapshots "
|
|
182
|
+
"WHERE task_id = ? ORDER BY ts DESC LIMIT 1",
|
|
183
|
+
(task_id,),
|
|
184
|
+
)
|
|
185
|
+
row = cur.fetchone()
|
|
186
|
+
if not row:
|
|
187
|
+
return None
|
|
188
|
+
from omega_engine.task import TaskState
|
|
189
|
+
return {"state": TaskState(row["state"]), "ts": row["ts"],
|
|
190
|
+
"last_event_rowid": row["last_event_rowid"]}
|
|
191
|
+
|
|
192
|
+
def events_since_snapshot(self, task_id: str) -> list[Event]:
|
|
193
|
+
"""Events appended since the latest snapshot, or all events if none."""
|
|
194
|
+
snap = self.latest_snapshot(task_id)
|
|
195
|
+
if not snap:
|
|
196
|
+
return self.events_for(task_id)
|
|
197
|
+
with self._lock:
|
|
198
|
+
cur = self._conn.execute(
|
|
199
|
+
"SELECT * FROM events WHERE task_id = ? AND rowid > ? "
|
|
200
|
+
"ORDER BY rowid",
|
|
201
|
+
(task_id, snap["last_event_rowid"]),
|
|
202
|
+
)
|
|
203
|
+
rows = cur.fetchall()
|
|
204
|
+
return [Event.from_row(dict(r)) for r in rows]
|