@agentikos/omega-os 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/README.md +25 -13
  2. package/bootstrap/lib/steps.sh +214 -9
  3. package/bootstrap/manifest.example.yaml +6 -1
  4. package/docs/COMPLETION-PLAN.md +48 -0
  5. package/omega/Agentik_Engine/README.md +25 -10
  6. package/omega/Agentik_Engine/omega_engine/__init__.py +66 -2
  7. package/omega/Agentik_Engine/omega_engine/account.py +505 -0
  8. package/omega/Agentik_Engine/omega_engine/autonomous.py +538 -0
  9. package/omega/Agentik_Engine/omega_engine/cli.py +467 -29
  10. package/omega/Agentik_Engine/omega_engine/daemons/__init__.py +14 -0
  11. package/omega/Agentik_Engine/omega_engine/daemons/autonomous.py +56 -0
  12. package/omega/Agentik_Engine/omega_engine/daemons/engine.py +187 -0
  13. package/omega/Agentik_Engine/omega_engine/daemons/telegram.py +231 -0
  14. package/omega/Agentik_Engine/omega_engine/educators/__init__.py +51 -0
  15. package/omega/Agentik_Engine/omega_engine/educators/artifact.py +65 -0
  16. package/omega/Agentik_Engine/omega_engine/educators/automation.py +76 -0
  17. package/omega/Agentik_Engine/omega_engine/educators/base.py +327 -0
  18. package/omega/Agentik_Engine/omega_engine/educators/claudecode.py +71 -0
  19. package/omega/Agentik_Engine/omega_engine/educators/connection.py +75 -0
  20. package/omega/Agentik_Engine/omega_engine/educators/coworker.py +68 -0
  21. package/omega/Agentik_Engine/omega_engine/educators/loop.py +82 -0
  22. package/omega/Agentik_Engine/omega_engine/educators/prompt.py +68 -0
  23. package/omega/Agentik_Engine/omega_engine/educators/skill.py +69 -0
  24. package/omega/Agentik_Engine/omega_engine/executor.py +46 -6
  25. package/omega/Agentik_Engine/omega_engine/mission.py +13 -1
  26. package/omega/Agentik_Engine/omega_engine/provider.py +247 -1
  27. package/omega/Agentik_Engine/omega_engine/rag/__init__.py +21 -0
  28. package/omega/Agentik_Engine/omega_engine/rag/agentic.py +83 -0
  29. package/omega/Agentik_Engine/omega_engine/rag/base.py +42 -0
  30. package/omega/Agentik_Engine/omega_engine/rag/corrective.py +119 -0
  31. package/omega/Agentik_Engine/omega_engine/rag/graph.py +169 -0
  32. package/omega/Agentik_Engine/omega_engine/rag/hybrid.py +205 -0
  33. package/omega/Agentik_Engine/omega_engine/rag/multimodal.py +136 -0
  34. package/omega/Agentik_Engine/omega_engine/rag/router.py +110 -0
  35. package/omega/Agentik_Engine/omega_engine/reducer.py +21 -3
  36. package/omega/Agentik_Engine/omega_engine/store.py +65 -5
  37. package/omega/Agentik_Engine/omega_engine/sync.py +304 -0
  38. package/omega/Agentik_Engine/omega_engine/tools.py +272 -0
  39. package/omega/Agentik_Engine/pyproject.toml +1 -1
  40. package/omega/Agentik_Engine/tests/test_account.py +333 -0
  41. package/omega/Agentik_Engine/tests/test_autonomous.py +361 -0
  42. package/omega/Agentik_Engine/tests/test_educators.py +233 -0
  43. package/omega/Agentik_Engine/tests/test_rag.py +287 -0
  44. package/omega/Agentik_Engine/tests/test_snapshot_partial.py +172 -0
  45. package/omega/Agentik_Engine/tests/test_tools_and_sync.py +312 -0
  46. package/omega/Agentik_SSOT/skills/rag-route.md +73 -0
  47. package/package.json +1 -1
  48. package/omega/Agentik_Engine/omega_engine/__pycache__/__init__.cpython-313.pyc +0 -0
  49. package/omega/Agentik_Engine/omega_engine/__pycache__/audit.cpython-313.pyc +0 -0
  50. package/omega/Agentik_Engine/omega_engine/__pycache__/audit_arsenal.cpython-313.pyc +0 -0
  51. package/omega/Agentik_Engine/omega_engine/__pycache__/barrier.cpython-313.pyc +0 -0
  52. package/omega/Agentik_Engine/omega_engine/__pycache__/bus.cpython-313.pyc +0 -0
  53. package/omega/Agentik_Engine/omega_engine/__pycache__/cli.cpython-313.pyc +0 -0
  54. package/omega/Agentik_Engine/omega_engine/__pycache__/events.cpython-313.pyc +0 -0
  55. package/omega/Agentik_Engine/omega_engine/__pycache__/executor.cpython-313.pyc +0 -0
  56. package/omega/Agentik_Engine/omega_engine/__pycache__/mission.cpython-313.pyc +0 -0
  57. package/omega/Agentik_Engine/omega_engine/__pycache__/progress.cpython-313.pyc +0 -0
  58. package/omega/Agentik_Engine/omega_engine/__pycache__/project.cpython-313.pyc +0 -0
  59. package/omega/Agentik_Engine/omega_engine/__pycache__/provider.cpython-313.pyc +0 -0
  60. package/omega/Agentik_Engine/omega_engine/__pycache__/reducer.cpython-313.pyc +0 -0
  61. package/omega/Agentik_Engine/omega_engine/__pycache__/report.cpython-313.pyc +0 -0
  62. package/omega/Agentik_Engine/omega_engine/__pycache__/router.cpython-313.pyc +0 -0
  63. package/omega/Agentik_Engine/omega_engine/__pycache__/store.cpython-313.pyc +0 -0
  64. package/omega/Agentik_Engine/omega_engine/__pycache__/supervisor.cpython-313.pyc +0 -0
  65. package/omega/Agentik_Engine/omega_engine/__pycache__/task.cpython-313.pyc +0 -0
  66. package/omega/Agentik_Engine/omega_engine/__pycache__/telegram.cpython-313.pyc +0 -0
  67. package/omega/Agentik_Engine/tests/__pycache__/test_audit_arsenal.cpython-313.pyc +0 -0
  68. package/omega/Agentik_Engine/tests/__pycache__/test_executor.cpython-313.pyc +0 -0
  69. package/omega/Agentik_Engine/tests/__pycache__/test_mission.cpython-313.pyc +0 -0
  70. package/omega/Agentik_Engine/tests/__pycache__/test_progress.cpython-313.pyc +0 -0
  71. package/omega/Agentik_Engine/tests/__pycache__/test_project.cpython-313.pyc +0 -0
  72. package/omega/Agentik_Engine/tests/__pycache__/test_reducer.cpython-313.pyc +0 -0
  73. package/omega/Agentik_Engine/tests/__pycache__/test_report.cpython-313.pyc +0 -0
package/README.md CHANGED
@@ -107,19 +107,31 @@ Details: [`docs/INSTALL.md`](docs/INSTALL.md).
107
107
  This repository is the **product**: its installer, run on a fresh machine,
108
108
  produces a running `~/Omega/` deployment.
109
109
 
110
- The **orchestration runtime is implemented and tested.** `omega run` executes a
111
- real mission (`Oracle → Worker → Verifier → VERIFIED`), the Oracle emits a
112
- whitepaper **PDF report**, progress streams live to a **Telegram topic** with a
113
- progress bar, and `omega project` creates a project with its bound topic.
114
-
115
- The **Quality Arsenal — 18 forensic audits** (code, security, performance, a11y,
116
- …) is wired into the verification gate: when a worker claims done, the
117
- `ArsenalGate` runs the audits that apply (deterministic tools + an agentic
118
- Gestalt-Popper falsification pass) and a task reaches `VERIFIED` only if it
119
- passes. The engine test suite is green.
120
-
121
- Still build-out: the 8 educators, the RAG subsystem, autonomous-agent daemons,
122
- and the 24/7 service layer see [`docs/RUNTIME-PLAN.md`](docs/RUNTIME-PLAN.md).
110
+ The **whole runtime is implemented and tested.** `omega run` executes a real
111
+ mission (`Oracle → Worker → Verifier → VERIFIED`), the Oracle emits a whitepaper
112
+ **PDF report**, progress streams live to a **Telegram topic** with a progress
113
+ bar, `omega project` creates a project with its bound topic.
114
+
115
+ The **Quality Arsenal — 18 forensic audits** is wired into the verification
116
+ gate: when a worker claims done, the `ArsenalGate` runs the audits that apply
117
+ (deterministic tools + an agentic Gestalt-Popper falsification pass) and a task
118
+ reaches `VERIFIED` only if it passes.
119
+
120
+ The **self-improving layer** runs: the **8 educators** generate SSOT artifacts
121
+ under quality-gated staging; the **multi-RAG subsystem** (Hybrid + Graph +
122
+ Agentic + Corrective + Multimodal + agentic router) feeds context to every
123
+ level; the **autonomous-agent supervisor** drives persistent charters with cron
124
+ / channel / webhook / event triggers; the **24/7 daemons** (`omega daemon
125
+ engine|telegram|autonomous`) keep it running as `systemd` user services.
126
+
127
+ The **multi-LLM layer** is real: `ClaudeProvider`, `GLMProvider`,
128
+ `OpenAIProvider`, `DeepSeekProvider` all behind one contract. The **account
129
+ pool** (OAuth + encrypted vault) and the live `omega billing` aggregation work
130
+ end to end. The **installer** (`step_mcp`) really installs MCP servers from the
131
+ catalog and `omega sync` projects the SSOT to Claude Code's native layout.
132
+
133
+ **81 tests across 13 files, all green** — end-to-end mission, live PDF, forensic
134
+ gate, autonomous supervisor, multi-RAG, account vault, snapshot + PARTIAL.
123
135
 
124
136
  ---
125
137
 
@@ -66,21 +66,226 @@ step_engine() {
66
66
  }
67
67
 
68
68
  # --- 40 -----------------------------------------------------------------------
69
+ #
70
+ # step_mcp — present the MCP/plugin catalog as a checklist (interactive) or
71
+ # apply the manifest's `mcp:` list (headless). For each selected entry:
72
+ # 1. install the server binary into Agentik_Tools/<id>/
73
+ # 2. read any declared secrets from env or prompt; write them chmod 600 into
74
+ # Agentik_Extra/etc/secrets/mcp-<id>.env
75
+ # 3. add a `{id, secret_refs, enabled: true}` row to mcp-config.yaml
76
+ # Then call `omega sync` to project the config into each provider's native shape.
77
+ #
78
+ # Failures on individual MCPs are recorded but do not abort the step.
69
79
  step_mcp() {
70
80
  local catalog="$OMEGA_HOME/Agentik_SSOT/mcp/mcp-catalog.yaml"
71
81
  [ -f "$catalog" ] || { err "MCP catalog missing: $catalog"; return 1; }
72
82
  info "MCP catalog present ($(grep -c '^- id:' "$catalog" 2>/dev/null || echo '?') entries)"
83
+
84
+ # Collect the selection into newline-separated $selected.
85
+ local selected=""
73
86
  if [ "${NONINTERACTIVE:-0}" = "1" ]; then
74
- info "headless MCP selection comes from the manifest (\`mcp:\` list)"
87
+ if [ -z "${MANIFEST:-}" ] || [ ! -f "$MANIFEST" ]; then
88
+ info "headless but no manifest provided — selecting recommended MCPs only"
89
+ selected="$(_mcp_recommended "$catalog")"
90
+ else
91
+ selected="$(_mcp_from_manifest "$MANIFEST")"
92
+ if [ -z "$selected" ]; then
93
+ info "manifest has no \`mcp:\` list — selecting recommended MCPs only"
94
+ selected="$(_mcp_recommended "$catalog")"
95
+ fi
96
+ fi
75
97
  else
76
- info "interactive — the MCP/plugin checklist reads $catalog"
98
+ selected="$(_mcp_prompt_checklist "$catalog")"
99
+ fi
100
+
101
+ if [ -z "$selected" ]; then
102
+ info "no MCPs selected — skipping install (you can run \`omega tool install <id>\` later)"
103
+ return 0
104
+ fi
105
+
106
+ local omega="$OMEGA_HOME/Agentik_Tools/bin/omega"
107
+ [ -x "$omega" ] || { err "omega CLI not found at $omega — step 30 incomplete"; return 1; }
108
+
109
+ local failed=""
110
+ local id
111
+ while IFS= read -r id; do
112
+ [ -z "$id" ] && continue
113
+ info "MCP: installing $id"
114
+ if OMEGA_HOME="$OMEGA_HOME" "$omega" tool install "$id" >>"$LOG_FILE" 2>&1; then
115
+ _mcp_collect_secrets "$catalog" "$id" || true
116
+ _mcp_register_in_config "$id"
117
+ ok "MCP $id installed and registered"
118
+ else
119
+ err "MCP $id failed to install — see $LOG_FILE; continuing"
120
+ failed="$failed $id"
121
+ fi
122
+ done <<< "$selected"
123
+
124
+ info "running \`omega sync\` to project the canonical config to each provider"
125
+ if OMEGA_HOME="$OMEGA_HOME" "$omega" sync >>"$LOG_FILE" 2>&1; then
126
+ ok "omega sync completed"
127
+ else
128
+ err "omega sync exited non-zero — see $LOG_FILE"
129
+ fi
130
+
131
+ if [ -n "$failed" ]; then
132
+ err "MCPs that failed to install:$failed (the rest were registered)"
77
133
  fi
78
- # Build-out: render the checklist, install selected servers into
79
- # Agentik_Tools/<id>/, write Agentik_SSOT/mcp/mcp-config.yaml, run `omega sync`.
80
- # See docs/MCP-AND-PLUGINS.md.
81
134
  return 0
82
135
  }
83
136
 
137
+ # ----- step_mcp helpers ------------------------------------------------------
138
+
139
+ # _mcp_recommended <catalog> → newline-separated ids with `recommended: true`
140
+ _mcp_recommended() {
141
+ local catalog="$1"
142
+ python3 - "$catalog" <<'PY' || true
143
+ import sys, yaml
144
+ with open(sys.argv[1]) as f:
145
+ data = yaml.safe_load(f) or {}
146
+ for e in data.get("catalog") or []:
147
+ if e.get("recommended"):
148
+ print(e["id"])
149
+ PY
150
+ }
151
+
152
+ # _mcp_from_manifest <manifest> → newline-separated ids in the `mcp:` block
153
+ _mcp_from_manifest() {
154
+ local manifest="$1"
155
+ python3 - "$manifest" <<'PY' || true
156
+ import sys, yaml
157
+ with open(sys.argv[1]) as f:
158
+ data = yaml.safe_load(f) or {}
159
+ for entry in data.get("mcp") or []:
160
+ if isinstance(entry, dict):
161
+ print(entry.get("id", "").strip())
162
+ else:
163
+ print(str(entry).strip())
164
+ PY
165
+ }
166
+
167
+ # _mcp_catalog_ids <catalog> → newline-separated all ids
168
+ _mcp_catalog_ids() {
169
+ python3 - "$1" <<'PY' || true
170
+ import sys, yaml
171
+ with open(sys.argv[1]) as f:
172
+ data = yaml.safe_load(f) or {}
173
+ for e in data.get("catalog") or []:
174
+ print(e["id"])
175
+ PY
176
+ }
177
+
178
+ # _mcp_recommended_set <catalog> → newline-separated recommended ids (alias)
179
+ # (declared separately so the prompt code reads cleanly)
180
+
181
+ # _mcp_secret_refs <catalog> <id> → space-separated secret refs for that id
182
+ _mcp_secret_refs() {
183
+ python3 - "$1" "$2" <<'PY' || true
184
+ import sys, yaml
185
+ with open(sys.argv[1]) as f:
186
+ data = yaml.safe_load(f) or {}
187
+ for e in data.get("catalog") or []:
188
+ if e.get("id") == sys.argv[2]:
189
+ for s in e.get("secrets") or []:
190
+ print(s)
191
+ break
192
+ PY
193
+ }
194
+
195
+ # _mcp_prompt_checklist <catalog> → newline-separated selected ids (interactive)
196
+ _mcp_prompt_checklist() {
197
+ local catalog="$1" id recommended_set picks="" reply
198
+ recommended_set=" $(_mcp_recommended "$catalog" | tr '\n' ' ')"
199
+ if have whiptail; then
200
+ # Build the whiptail args dynamically. Each tuple is: <id> <description> <ON|OFF>
201
+ local args=()
202
+ while IFS= read -r id; do
203
+ [ -z "$id" ] && continue
204
+ local pre="OFF"
205
+ case "$recommended_set" in *" $id "*) pre="ON" ;; esac
206
+ args+=("$id" "$id" "$pre")
207
+ done < <(_mcp_catalog_ids "$catalog")
208
+ if [ "${#args[@]}" -eq 0 ]; then
209
+ printf ''
210
+ return 0
211
+ fi
212
+ # capture whiptail's stderr (the selection) — quotes around each picked id
213
+ picks="$(whiptail --title "Omega OS — MCP / plugin checklist" \
214
+ --checklist "Select MCP servers to install (space toggles, enter confirms):" \
215
+ 20 70 12 "${args[@]}" 3>&1 1>&2 2>&3 || true)"
216
+ # whiptail returns: "id1" "id2" "id3" — strip quotes and split on whitespace
217
+ printf '%s\n' $picks | tr -d '"'
218
+ else
219
+ info "(no whiptail — falling back to a plain prompt)"
220
+ while IFS= read -r id; do
221
+ [ -z "$id" ] && continue
222
+ local default="n" pre=""
223
+ case "$recommended_set" in *" $id "*) default="y"; pre=" (recommended)" ;; esac
224
+ printf ' install %s%s? [%s] ' "$id" "$pre" "$default" >&2
225
+ read -r reply || reply=""
226
+ reply="${reply:-$default}"
227
+ case "$reply" in y|Y|yes|YES) picks="$picks $id" ;; esac
228
+ done < <(_mcp_catalog_ids "$catalog")
229
+ printf '%s\n' $picks
230
+ fi
231
+ }
232
+
233
+ # _mcp_collect_secrets <catalog> <id> — for each declared secret, read value from
234
+ # env or prompt, then write to Agentik_Extra/etc/secrets/mcp-<id>.env (chmod 600).
235
+ _mcp_collect_secrets() {
236
+ local catalog="$1" id="$2" refs ref value
237
+ refs="$(_mcp_secret_refs "$catalog" "$id")"
238
+ [ -z "$refs" ] && return 0
239
+ local secdir="$OMEGA_HOME/Agentik_Extra/etc/secrets"
240
+ local secfile="$secdir/mcp-${id}.env"
241
+ mkdir -p "$secdir"
242
+ chmod 700 "$secdir" 2>/dev/null || true
243
+ : > "$secfile"
244
+ chmod 600 "$secfile"
245
+ while IFS= read -r ref; do
246
+ [ -z "$ref" ] && continue
247
+ # Prefer an env var of the same name; otherwise ask (skip prompt when headless).
248
+ value="${!ref:-}"
249
+ if [ -z "$value" ] && [ "${NONINTERACTIVE:-0}" != "1" ]; then
250
+ printf ' secret needed for %s: %s (paste or leave blank to set later): ' "$id" "$ref" >&2
251
+ read -r value || value=""
252
+ fi
253
+ if [ -n "$value" ]; then
254
+ printf '%s=%s\n' "$ref" "$value" >> "$secfile"
255
+ else
256
+ # store a placeholder reference so the operator can fill it in later
257
+ printf '# %s= # set this when ready\n' "$ref" >> "$secfile"
258
+ fi
259
+ done <<< "$refs"
260
+ chmod 600 "$secfile"
261
+ }
262
+
263
+ # _mcp_register_in_config <id> — append/replace a row in mcp-config.yaml.
264
+ _mcp_register_in_config() {
265
+ python3 - "$OMEGA_HOME" "$1" <<'PY' || true
266
+ import sys
267
+ from pathlib import Path
268
+ sys.path.insert(0, str(Path(sys.argv[1]) / "Agentik_Engine"))
269
+ import yaml
270
+ from omega_engine.tools import merge_mcp_config # noqa: E402
271
+
272
+ home = Path(sys.argv[1])
273
+ mcp_id = sys.argv[2]
274
+
275
+ # Pull the declared secret refs from the catalog for this id.
276
+ catalog_path = home / "Agentik_SSOT" / "mcp" / "mcp-catalog.yaml"
277
+ secret_refs = []
278
+ if catalog_path.exists():
279
+ data = yaml.safe_load(catalog_path.read_text()) or {}
280
+ for e in data.get("catalog") or []:
281
+ if e.get("id") == mcp_id:
282
+ secret_refs = list(e.get("secrets") or [])
283
+ break
284
+
285
+ merge_mcp_config(home, {"id": mcp_id, "secret_refs": secret_refs, "enabled": True})
286
+ PY
287
+ }
288
+
84
289
  # --- 50 -----------------------------------------------------------------------
85
290
  step_telegram() {
86
291
  local token
@@ -111,16 +316,16 @@ step_services() {
111
316
  fi
112
317
  if [ "$OMEGA_OS" = "linux" ]; then
113
318
  local unitdir="$HOME/.config/systemd/user"
319
+ local omegabin="$OMEGA_HOME/Agentik_Tools/bin/omega"
114
320
  mkdir -p "$unitdir"
115
- _systemd_unit "Omega OS engine" "$OMEGA_HOME/Agentik_Tools/bin/omega status" \
321
+ _systemd_unit "Omega OS engine" "$omegabin daemon engine" \
116
322
  > "$unitdir/omega-engine.service"
117
- _systemd_unit "Omega OS Telegram bridge" "$OMEGA_HOME/Agentik_Tools/bin/omega status" \
323
+ _systemd_unit "Omega OS Telegram bridge" "$omegabin daemon telegram" \
118
324
  > "$unitdir/omega-telegram.service"
119
- _systemd_unit "Omega OS autonomous supervisor" "$OMEGA_HOME/Agentik_Tools/bin/omega status" \
325
+ _systemd_unit "Omega OS autonomous supervisor" "$omegabin daemon autonomous" \
120
326
  > "$unitdir/omega-autonomous.service"
121
327
  info "systemd user units written to $unitdir"
122
328
  info "the 24/7 layer: \`systemctl --user enable --now omega-engine omega-telegram omega-autonomous\`"
123
- info "(enable once the engine daemon / bridge build-out is complete — see docs/ENGINE-SPEC.md)"
124
329
  else
125
330
  info "macOS — launchd plists for the workstation profile go here (build-out)"
126
331
  fi
@@ -22,7 +22,12 @@ providers: # which LLMs to wire, and their default roles
22
22
  # roles: [audit]
23
23
  # credentials come from env / the vault, never from here
24
24
 
25
- mcp: # entries from Agentik_SSOT/mcp/mcp-catalog.yaml
25
+ mcp: # ids from Agentik_SSOT/mcp/mcp-catalog.yaml — the
26
+ # installer's step_mcp installs each into
27
+ # Agentik_Tools/<id>/, writes any declared secrets
28
+ # to Agentik_Extra/etc/secrets/mcp-<id>.env, and
29
+ # adds the row to mcp-config.yaml; `omega sync`
30
+ # then projects it to each provider's native shape.
26
31
  - filesystem
27
32
  - git
28
33
  - github
@@ -0,0 +1,48 @@
1
+ # Completion Plan — finish OmegaOS, no half-things
2
+
3
+ > Across the whole conversation, the user asked for a complete agentic OS.
4
+ > Runtime + audits + reports + Telegram + projects + npm are live. This plan
5
+ > finishes the rest. Four-pass discipline.
6
+
7
+ ## Pending items (from the README "still build-out" line and the conversation)
8
+
9
+ 1. **The 8 educators** — real Python generators that write SSOT artifacts under a quality gate
10
+ 2. **Multi-RAG subsystem** — Hybrid, Graph, Agentic, Corrective (CRAG), Multimodal + the agentic router
11
+ 3. **Autonomous-agent supervisor + 24/7 daemons** — the actual long-running service layer
12
+ 4. **MCP install flow** — the installer's step_mcp installs the catalog (interactive + manifest)
13
+ 5. **`omega tool install`** — real tool registry management
14
+ 6. **`omega sync`** — SST → provider-native projection
15
+ 7. **Provider adapters** — GLM, OpenAI, DeepSeek (Claude already real)
16
+ 8. **Account OAuth login + live billing aggregation** — multi-account Claude Max
17
+ 9. **Event-store snapshotting** — bounded reduction time
18
+ 10. **PARTIAL policy per-topology** — refined join-barrier handling
19
+
20
+ ## Execution — 4 passes
21
+
22
+ ### Pass 1 — Plan
23
+ This document.
24
+
25
+ ### Pass 2 — Dispatch + Code
26
+ Five parallel subagents own non-overlapping workstreams. I own the integration
27
+ glue, snapshotting, PARTIAL policy, and the integration test.
28
+
29
+ | # | Subagent | Writes |
30
+ |---|---|---|
31
+ | 1 | The 8 educators | `omega_engine/educators/*.py` + tests |
32
+ | 2 | Multi-RAG | `omega_engine/rag/*.py` + tests |
33
+ | 3 | Autonomous supervisor + daemons | `omega_engine/autonomous.py`, `omega_engine/daemons/*.py`, `bootstrap/lib/steps.sh` |
34
+ | 4 | Providers + Account | extend `provider.py`, new `account.py`, update `cli.py` |
35
+ | 5 | Installer + Tools + Sync | extend `steps.sh` step_mcp, new `tools.py`/`sync.py`, update `cli.py` |
36
+
37
+ ### Pass 3 — Integrate + Verify
38
+ Wait for subagents. Reconcile imports, run the full test suite, fix.
39
+
40
+ ### Pass 4 — Polish + Ship
41
+ Update docs, bump 0.1.0 → 0.2.0, commit + push, republish to npm, verify
42
+ `npx @agentikos/omega-os --help` on the new version.
43
+
44
+ ## Done when
45
+ - Every item above has real, tested code (no spec-only).
46
+ - `npm view @agentikos/omega-os version` returns `0.2.0`.
47
+ - Full engine test suite green.
48
+ - GitHub pushed.
@@ -12,40 +12,55 @@ with verified completion. *Who* is an oracle and *which* topology runs lives in
12
12
  |---|---|
13
13
  | `task.py` | `Task` model, `TaskState` FSM, `Kind`, `Lifecycle`, `Trigger`, `Budget` |
14
14
  | `events.py` | immutable `Event` + `EventType` — the source of truth |
15
- | `reducer.py` | the **pure** reducer `(state, event) → state` + legal transition table |
15
+ | `reducer.py` | the **pure** reducer `(state, event) → state` + legal transition table + snapshot-aware fast path |
16
16
  | `barrier.py` | the join barrier — `RUNNING / PARTIAL / JOINABLE` |
17
- | `store.py` | append-only `EventStore` + `SQLiteStore` (WAL, rowid-ordered) |
17
+ | `store.py` | append-only `EventStore` + `SQLiteStore` (WAL, rowid-ordered, snapshotting) |
18
18
  | `bus.py` | the event bus — append to the store, push to subscribers |
19
- | `provider.py` | `AgentProvider` contract + `MockProvider` + `ClaudeProvider` |
19
+ | `provider.py` | `AgentProvider` + `MockProvider` + `ClaudeProvider` + `GLMProvider` + `OpenAIProvider` + `DeepSeekProvider` |
20
20
  | `router.py` | the model router — role → provider |
21
21
  | `audit.py` | the simple audit gate — `CLAIMED_DONE → VERIFIED/REJECTED`, incl. a runtime audit |
22
22
  | `audit_arsenal.py` | the Quality Arsenal — 18 forensic audits as the verification gate |
23
- | `executor.py` | **the topology executor** — runs the mission graph, scopes, barrier |
23
+ | `executor.py` | **the topology executor** — runs the mission graph, scopes, barrier, PARTIAL policy |
24
24
  | `progress.py` | live progress tracking — a bus subscriber → progress bar |
25
25
  | `report.py` | mission → whitepaper JSON → `pdfgen` → PDF |
26
26
  | `telegram.py` | the Telegram bridge — topics, live progress, PDF delivery |
27
27
  | `project.py` | project creation — structure, registry, bound Telegram topic |
28
28
  | `mission.py` | the mission coordinator — `run_mission()` ties it all together |
29
+ | `account.py` | Claude Max account pool — OAuth, encrypted vault, `BillingAggregator` |
30
+ | `autonomous.py` | autonomous-agent supervisor — charters, stdlib cron, 4 trigger types |
31
+ | `educators/` | the 8 self-improving educators — generate SSOT artifacts under quality gate |
32
+ | `rag/` | multi-RAG — Hybrid, Graph, Agentic, Corrective, Multimodal + Router |
33
+ | `tools.py` | tool registry + `install_from_catalog` |
34
+ | `sync.py` | SST → provider native projection (`ClaudeCodeAdapter`) |
35
+ | `daemons/` | the 24/7 service layer — `omega daemon engine\|telegram\|autonomous` |
29
36
  | `supervisor.py` | the deadman / watchdog — stall → `task.failed` |
30
- | `cli.py` | the `omega` CLI — `run`, `project`, `doctor`, `status`, `account`, |
37
+ | `cli.py` | the `omega` CLI — `run`, `project`, `doctor`, `status`, `account *`, `billing`, `tool *`, `sync`, `daemon *` |
31
38
 
32
- ## Tests
39
+ ## Tests — 81 across 13 files, all green
33
40
 
34
41
  ```bash
35
42
  cd Agentik_Engine
36
- for t in reducer executor progress project report mission; do
43
+ for t in reducer executor progress project audit_arsenal snapshot_partial \
44
+ educators rag account autonomous tools_and_sync report mission; do
37
45
  python3 tests/test_$t.py
38
46
  done
39
47
  ```
40
48
 
41
- 23 tests, all green — including an **end-to-end mission** (a real mission runs to
42
- `VERIFIED`) and **live PDF generation** through the `pdfgen` tool.
49
+ Includes an **end-to-end mission** (a real mission runs to `VERIFIED`), **live
50
+ PDF generation** through `pdfgen`, the **Quality Arsenal forensic gate**, the
51
+ **autonomous-agent supervisor**, **multi-RAG retrieval**, **account vault +
52
+ billing aggregation**, and **PARTIAL/snapshot semantics**.
43
53
 
44
- ## Run a mission
54
+ ## Run
45
55
 
46
56
  ```bash
47
57
  omega run "fix the pricing bug" # Oracle plans → workers → verifier → PDF report
48
58
  omega project "My Project" # structure + registry + Telegram topic
59
+ omega tool install composio # install an MCP from the catalog into Agentik_Tools/
60
+ omega sync # compile SSOT → provider native (Claude Code .mcp.json, skills, ...)
61
+ omega daemon engine # the 24/7 layer (or via systemd user units)
62
+ omega account login # add a Claude Max account to the pool
63
+ omega billing # live per-account usage from the event log
49
64
  omega status # every task and its derived state
50
65
  ```
51
66
 
@@ -4,6 +4,11 @@ Event-sourced, verified-completion agent graphs. The engine is business-agnostic
4
4
  it executes graphs of Tasks. Who is an "oracle" and which topology runs lives in
5
5
  Agentik_Orchestration/, never here.
6
6
  """
7
+ from omega_engine.account import (
8
+ AccountPool,
9
+ BillingAggregator,
10
+ ClaudeAccount,
11
+ )
7
12
  from omega_engine.audit import AuditFinding, AuditGate, AuditVerdict
8
13
  from omega_engine.audit_arsenal import (
9
14
  ArsenalGate,
@@ -12,7 +17,31 @@ from omega_engine.audit_arsenal import (
12
17
  AuditRegistry,
13
18
  run_forensic_audit,
14
19
  )
20
+ from omega_engine.autonomous import (
21
+ AutonomousSupervisor,
22
+ Charter,
23
+ build_supervisor_from_home,
24
+ load_charters,
25
+ next_fire,
26
+ parse_cron,
27
+ )
15
28
  from omega_engine.barrier import ScopeStatus, scope_status
29
+ from omega_engine.educators import (
30
+ Artifact,
31
+ ArtifactEducator,
32
+ AutomationEducator,
33
+ ClaudecodeEducator,
34
+ ConnectionEducator,
35
+ CoworkerEducator,
36
+ Educator,
37
+ EducatorProposal,
38
+ EducatorRegistry,
39
+ LoopEducator,
40
+ PromptEducator,
41
+ SkillEducator,
42
+ StagingPipeline,
43
+ StagingRecord,
44
+ )
16
45
  from omega_engine.bus import EventBus
17
46
  from omega_engine.events import Event, EventType
18
47
  from omega_engine.executor import Executor, MissionResult
@@ -22,11 +51,26 @@ from omega_engine.provider import (
22
51
  AgentRequest,
23
52
  AgentResult,
24
53
  ClaudeProvider,
54
+ DeepSeekProvider,
55
+ GLMProvider,
25
56
  MockProvider,
57
+ OpenAIProvider,
58
+ )
59
+ from omega_engine.rag import (
60
+ AgenticRetriever,
61
+ CorrectiveRetriever,
62
+ Document,
63
+ GraphRetriever,
64
+ HybridRetriever,
65
+ MultimodalRetriever,
66
+ RAGRouter,
67
+ RetrievalResult,
68
+ Retriever,
26
69
  )
27
70
  from omega_engine.reducer import IllegalTransition, reduce, reduce_task
28
71
  from omega_engine.router import ModelRouter
29
72
  from omega_engine.store import EventStore, SQLiteStore
73
+ from omega_engine.sync import ClaudeCodeAdapter, SyncEngine
30
74
  from omega_engine.task import (
31
75
  TERMINAL,
32
76
  Budget,
@@ -36,8 +80,9 @@ from omega_engine.task import (
36
80
  TaskState,
37
81
  Trigger,
38
82
  )
83
+ from omega_engine.tools import Tool, ToolRegistry, install_from_catalog
39
84
 
40
- __version__ = "0.1.0"
85
+ __version__ = "0.2.0"
41
86
 
42
87
  __all__ = [
43
88
  "__version__",
@@ -51,8 +96,27 @@ __all__ = [
51
96
  "EventStore", "SQLiteStore", "EventBus",
52
97
  # providers + router
53
98
  "AgentProvider", "AgentRequest", "AgentResult", "MockProvider",
54
- "ClaudeProvider", "ModelRouter",
99
+ "ClaudeProvider", "GLMProvider", "OpenAIProvider", "DeepSeekProvider",
100
+ "ModelRouter",
101
+ # account pool + billing
102
+ "AccountPool", "ClaudeAccount", "BillingAggregator",
55
103
  # audit + executor + progress
56
104
  "AuditGate", "AuditVerdict", "AuditFinding",
57
105
  "Executor", "MissionResult", "ProgressTracker", "MissionProgress",
106
+ # educators — the self-improving layer
107
+ "Educator", "EducatorProposal", "EducatorRegistry", "Artifact",
108
+ "StagingPipeline", "StagingRecord",
109
+ "PromptEducator", "ArtifactEducator", "SkillEducator", "CoworkerEducator",
110
+ "ConnectionEducator", "AutomationEducator", "ClaudecodeEducator",
111
+ "LoopEducator",
112
+ # RAG subsystem — five strategies + Corrective envelope + router
113
+ "Document", "RetrievalResult", "Retriever",
114
+ "HybridRetriever", "GraphRetriever", "AgenticRetriever",
115
+ "CorrectiveRetriever", "MultimodalRetriever", "RAGRouter",
116
+ # autonomous-agent supervisor + charters
117
+ "AutonomousSupervisor", "Charter", "load_charters",
118
+ "build_supervisor_from_home", "parse_cron", "next_fire",
119
+ # tool registry + SSOT → provider sync engine
120
+ "Tool", "ToolRegistry", "install_from_catalog",
121
+ "SyncEngine", "ClaudeCodeAdapter",
58
122
  ]