@agentikos/omega-os 0.1.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.
- package/LICENSE +21 -0
- package/README.md +127 -0
- package/bin/omega-os.js +48 -0
- package/bootstrap/lib/common.sh +73 -0
- package/bootstrap/lib/steps.sh +153 -0
- package/bootstrap/manifest.example.yaml +45 -0
- package/docs/ACCOUNT-AND-BILLING.md +95 -0
- package/docs/ARCHITECTURE.md +225 -0
- package/docs/AUTONOMOUS-AGENTS.md +128 -0
- package/docs/ENGINE-SPEC.md +174 -0
- package/docs/INSTALL.md +106 -0
- package/docs/MCP-AND-PLUGINS.md +121 -0
- package/docs/RUNTIME-PLAN.md +63 -0
- package/install.sh +54 -0
- package/omega/Agentik_Coding/README.md +21 -0
- package/omega/Agentik_Engine/README.md +58 -0
- package/omega/Agentik_Engine/omega_engine/__init__.py +58 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/__init__.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/audit.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/audit_arsenal.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/barrier.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/bus.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__/events.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__/mission.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/progress.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__/provider.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__/report.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__/store.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/supervisor.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/task.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/telegram.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/audit.py +96 -0
- package/omega/Agentik_Engine/omega_engine/audit_arsenal.py +314 -0
- package/omega/Agentik_Engine/omega_engine/barrier.py +45 -0
- package/omega/Agentik_Engine/omega_engine/bus.py +45 -0
- package/omega/Agentik_Engine/omega_engine/cli.py +158 -0
- package/omega/Agentik_Engine/omega_engine/events.py +60 -0
- package/omega/Agentik_Engine/omega_engine/executor.py +167 -0
- package/omega/Agentik_Engine/omega_engine/mission.py +145 -0
- package/omega/Agentik_Engine/omega_engine/progress.py +75 -0
- package/omega/Agentik_Engine/omega_engine/project.py +92 -0
- package/omega/Agentik_Engine/omega_engine/provider.py +139 -0
- package/omega/Agentik_Engine/omega_engine/reducer.py +76 -0
- package/omega/Agentik_Engine/omega_engine/report.py +146 -0
- package/omega/Agentik_Engine/omega_engine/router.py +34 -0
- package/omega/Agentik_Engine/omega_engine/store.py +97 -0
- package/omega/Agentik_Engine/omega_engine/supervisor.py +69 -0
- package/omega/Agentik_Engine/omega_engine/task.py +91 -0
- package/omega/Agentik_Engine/omega_engine/telegram.py +115 -0
- package/omega/Agentik_Engine/pyproject.toml +31 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_audit_arsenal.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_executor.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_mission.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_progress.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_project.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_reducer.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_report.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/test_audit_arsenal.py +80 -0
- package/omega/Agentik_Engine/tests/test_executor.py +96 -0
- package/omega/Agentik_Engine/tests/test_mission.py +64 -0
- package/omega/Agentik_Engine/tests/test_progress.py +69 -0
- package/omega/Agentik_Engine/tests/test_project.py +61 -0
- package/omega/Agentik_Engine/tests/test_reducer.py +144 -0
- package/omega/Agentik_Engine/tests/test_report.py +88 -0
- package/omega/Agentik_Extra/README.md +37 -0
- package/omega/Agentik_Extra/etc/agentik.env.example +19 -0
- package/omega/Agentik_Extra/etc/structure.yaml +46 -0
- package/omega/Agentik_Orchestration/README.md +43 -0
- package/omega/Agentik_Orchestration/autonomous/README.md +29 -0
- package/omega/Agentik_Orchestration/autonomous/example-agents.yaml +85 -0
- package/omega/Agentik_Orchestration/educators/README.md +55 -0
- package/omega/Agentik_Orchestration/topologies/aisb-oracle-worker.yaml +42 -0
- package/omega/Agentik_Orchestration/verifier/audit-router.yaml +26 -0
- package/omega/Agentik_Providers/README.md +62 -0
- package/omega/Agentik_Providers/claude/accounts.example.yaml +28 -0
- package/omega/Agentik_Providers/registry.yaml +30 -0
- package/omega/Agentik_Runtime/README.md +30 -0
- package/omega/Agentik_SSOT/README.md +36 -0
- package/omega/Agentik_SSOT/VERSION +1 -0
- package/omega/Agentik_SSOT/audits/a11yaudit.yaml +69 -0
- package/omega/Agentik_SSOT/audits/apiaudit.yaml +71 -0
- package/omega/Agentik_SSOT/audits/automationaudit.yaml +77 -0
- package/omega/Agentik_SSOT/audits/codeaudit.yaml +63 -0
- package/omega/Agentik_SSOT/audits/copyaudit.yaml +68 -0
- package/omega/Agentik_SSOT/audits/dataaudit.yaml +76 -0
- package/omega/Agentik_SSOT/audits/debugaudit.yaml +75 -0
- package/omega/Agentik_SSOT/audits/dxaudit.yaml +78 -0
- package/omega/Agentik_SSOT/audits/featureaudit.yaml +73 -0
- package/omega/Agentik_SSOT/audits/flowaudit.yaml +72 -0
- package/omega/Agentik_SSOT/audits/logicaudit.yaml +75 -0
- package/omega/Agentik_SSOT/audits/motionaudit.yaml +67 -0
- package/omega/Agentik_SSOT/audits/perfaudit.yaml +71 -0
- package/omega/Agentik_SSOT/audits/refontaudit.yaml +77 -0
- package/omega/Agentik_SSOT/audits/retentionaudit.yaml +84 -0
- package/omega/Agentik_SSOT/audits/secaudit.yaml +73 -0
- package/omega/Agentik_SSOT/audits/seoaudit.yaml +75 -0
- package/omega/Agentik_SSOT/audits/uiuxaudit.yaml +61 -0
- package/omega/Agentik_SSOT/mcp/mcp-catalog.yaml +136 -0
- package/omega/Agentik_SSOT/rules/constitution.md +44 -0
- package/omega/Agentik_SSOT/schemas/event.schema.json +45 -0
- package/omega/Agentik_SSOT/schemas/task.schema.json +54 -0
- package/omega/Agentik_Tools/README.md +42 -0
- package/omega/Agentik_Tools/registry.json +15 -0
- package/package.json +43 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Gareth Moison — Agentik OS
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Omega OS
|
|
2
|
+
|
|
3
|
+
**An agentic operating system for a VPS. One command installs it; it runs your
|
|
4
|
+
software-engineering agents 24/7, takes missions over Telegram, and ships
|
|
5
|
+
production code without supervision — with completion that is *verified*, never
|
|
6
|
+
*claimed*.**
|
|
7
|
+
|
|
8
|
+
Omega OS is the from-scratch, installable successor of the Omega orchestration
|
|
9
|
+
system. It is built on one hard principle:
|
|
10
|
+
|
|
11
|
+
> **An agent must never be able to say "done" and be wrong.**
|
|
12
|
+
> Completion is a state the engine *derives* from observable facts — never a
|
|
13
|
+
> claim an agent writes about itself.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Why Omega OS exists
|
|
18
|
+
|
|
19
|
+
Most agentic frameworks have the same three structural bugs:
|
|
20
|
+
|
|
21
|
+
1. **Completion is self-declared.** The worker writes "I finished". You trust the
|
|
22
|
+
actor with the most incentive to declare itself done.
|
|
23
|
+
2. **Completion is *observed*, not *computed*.** The parent polls files, races,
|
|
24
|
+
reads stale state.
|
|
25
|
+
3. **A parent can finish before its children.** Nothing mechanically stops an
|
|
26
|
+
orchestrator from closing while its workers still run.
|
|
27
|
+
|
|
28
|
+
Omega OS makes all three **structurally impossible** — see
|
|
29
|
+
[`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) and
|
|
30
|
+
[`docs/ENGINE-SPEC.md`](docs/ENGINE-SPEC.md).
|
|
31
|
+
|
|
32
|
+
## What makes it different
|
|
33
|
+
|
|
34
|
+
| | Omega OS |
|
|
35
|
+
|---|---|
|
|
36
|
+
| **Verified completion** | A task is `VERIFIED` only after an independent verifier *runs the real flow* (dev server, endpoints, UI path). Lying "it's done" is impossible. |
|
|
37
|
+
| **Structured concurrency** | A parent scope cannot close until every child is in a terminal state. Join barrier, not polling. |
|
|
38
|
+
| **Event-sourced** | One append-only log is the single source of truth. Free audit trail, time-travel debug, zero races. |
|
|
39
|
+
| **Topology-as-data** | `AISB → Oracle → Worker` is *one* graph. New orchestration = new graph, **zero engine code**. |
|
|
40
|
+
| **Multi-LLM by contract** | Claude, GLM, OpenAI behind one `AgentProvider` interface. Swap by config. |
|
|
41
|
+
| **Account pool** | Multiple Claude Code Max accounts pooled — N accounts yield the sum of their rate limits as throughput. `omega account` / `omega billing`. |
|
|
42
|
+
| **Autonomous agents** | Long-running agents are first-class `Node`s of the *same* engine — not a bolted-on subsystem. |
|
|
43
|
+
| **Self-improving** | Eight *educators* regenerate the system's own prompts, skills, agents and automations into the SSOT, under a quality gate. |
|
|
44
|
+
|
|
45
|
+
## The 8-block rack
|
|
46
|
+
|
|
47
|
+
Everything installs under one master folder, `~/Omega/`, as eight pluggable
|
|
48
|
+
`Agentik_*` blocks — each a single nature, a single lifecycle, openable alone
|
|
49
|
+
over SSH:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
Omega/
|
|
53
|
+
├── Agentik_SSOT/ truth — rules, skills, schemas, MCP catalog (git, read-only in prod)
|
|
54
|
+
├── Agentik_Engine/ the generic Python engine — reducer, store, barrier, supervisor
|
|
55
|
+
├── Agentik_Orchestration/ definitions — topologies, roles, verifier, educators, autonomous
|
|
56
|
+
├── Agentik_Providers/ LLM wiring — one folder per provider, zero business logic
|
|
57
|
+
├── Agentik_Coding/ your projects — git worktrees
|
|
58
|
+
├── Agentik_Tools/ the "/Applications" — third-party installs, MCP servers, RAG engine
|
|
59
|
+
├── Agentik_Runtime/ live state — event log, sessions, verdicts, memory.db
|
|
60
|
+
└── Agentik_Extra/ ephemeral + config + encrypted secrets
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Full reference + lifecycle table: [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md).
|
|
64
|
+
|
|
65
|
+
## Install
|
|
66
|
+
|
|
67
|
+
One command on a fresh VPS (Ubuntu) or workstation (macOS):
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npx @agentikos/omega-os # interactive
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Headless (CI / scripted provisioning):
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
npx @agentikos/omega-os --manifest bootstrap/manifest.example.yaml --non-interactive
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
From a git clone (no npm needed):
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
git clone https://github.com/agentik-os/OmegaOS && cd OmegaOS && bash install.sh
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The installer is **idempotent and resumable** — if it stops at step 5/8,
|
|
86
|
+
re-running resumes. It detects the OS, installs dependencies, builds the
|
|
87
|
+
`~/Omega/` tree, wires the engine, lets you pick MCP servers and Claude Code
|
|
88
|
+
plugins from a catalog, connects a Telegram bot + group, registers your
|
|
89
|
+
autonomous agents, installs `systemd` services (the 24/7 layer), and runs
|
|
90
|
+
`omega doctor` to validate everything.
|
|
91
|
+
|
|
92
|
+
Details: [`docs/INSTALL.md`](docs/INSTALL.md).
|
|
93
|
+
|
|
94
|
+
## Documentation
|
|
95
|
+
|
|
96
|
+
| Doc | Content |
|
|
97
|
+
|---|---|
|
|
98
|
+
| [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) | The full architecture — 8 blocks, philosophy, RAG, lifecycle |
|
|
99
|
+
| [`docs/ENGINE-SPEC.md`](docs/ENGINE-SPEC.md) | The orchestration engine — FSM, reducer, join barrier, audit gate |
|
|
100
|
+
| [`docs/AUTONOMOUS-AGENTS.md`](docs/AUTONOMOUS-AGENTS.md) | Long-running autonomous agents as first-class nodes |
|
|
101
|
+
| [`docs/MCP-AND-PLUGINS.md`](docs/MCP-AND-PLUGINS.md) | MCP servers & Claude Code plugins — catalog, placement, install |
|
|
102
|
+
| [`docs/ACCOUNT-AND-BILLING.md`](docs/ACCOUNT-AND-BILLING.md) | Claude Max account pool, login flow, per-account billing |
|
|
103
|
+
| [`docs/INSTALL.md`](docs/INSTALL.md) | Install guide — profiles, manifest, troubleshooting |
|
|
104
|
+
|
|
105
|
+
## Status
|
|
106
|
+
|
|
107
|
+
This repository is the **product**: its installer, run on a fresh machine,
|
|
108
|
+
produces a running `~/Omega/` deployment.
|
|
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).
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
*Omega OS — the intelligence was always there. This gives it a body that does
|
|
127
|
+
not shake.*
|
package/bin/omega-os.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Omega OS — npx bootstrap launcher.
|
|
4
|
+
*
|
|
5
|
+
* npx @agentik-os/omega-os [--profile vps|workstation|minimal]
|
|
6
|
+
* [--manifest FILE] [--non-interactive] [--force]
|
|
7
|
+
*
|
|
8
|
+
* A thin launcher. npm has already fetched the whole package (install.sh,
|
|
9
|
+
* bootstrap/, omega/, docs/) into its cache; this script runs install.sh with
|
|
10
|
+
* the OS-native bash. The engine itself is Python — npx is only the one-command
|
|
11
|
+
* entry point, so a fresh machine needs nothing pre-installed but Node.
|
|
12
|
+
*/
|
|
13
|
+
"use strict";
|
|
14
|
+
|
|
15
|
+
const { spawnSync } = require("node:child_process");
|
|
16
|
+
const path = require("node:path");
|
|
17
|
+
const fs = require("node:fs");
|
|
18
|
+
|
|
19
|
+
const pkgRoot = path.resolve(__dirname, "..");
|
|
20
|
+
const installer = path.join(pkgRoot, "install.sh");
|
|
21
|
+
|
|
22
|
+
function fail(msg) {
|
|
23
|
+
console.error(`omega-os: ${msg}`);
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (process.platform === "win32") {
|
|
28
|
+
fail("Windows is not supported — use a Linux VPS or macOS.");
|
|
29
|
+
}
|
|
30
|
+
if (!fs.existsSync(installer)) {
|
|
31
|
+
fail("install.sh is missing from the package — the download is incomplete.");
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
console.log("");
|
|
35
|
+
console.log(" Omega OS — npx bootstrap");
|
|
36
|
+
console.log(" -> handing off to install.sh");
|
|
37
|
+
console.log("");
|
|
38
|
+
|
|
39
|
+
const args = process.argv.slice(2);
|
|
40
|
+
const result = spawnSync("bash", [installer, ...args], {
|
|
41
|
+
stdio: "inherit",
|
|
42
|
+
cwd: pkgRoot,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
if (result.error) {
|
|
46
|
+
fail(`could not run install.sh — ${result.error.message}`);
|
|
47
|
+
}
|
|
48
|
+
process.exit(result.status === null ? 1 : result.status);
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Omega OS installer — shared helpers. Sourced by install.sh.
|
|
3
|
+
|
|
4
|
+
# --- paths ---
|
|
5
|
+
OMEGA_HOME="${OMEGA_HOME:-$HOME/Omega}"
|
|
6
|
+
STATE_DIR="$OMEGA_HOME/Agentik_Extra/var"
|
|
7
|
+
STATE_FILE="$STATE_DIR/.install-state"
|
|
8
|
+
LOG_FILE="$STATE_DIR/logs/install.log"
|
|
9
|
+
|
|
10
|
+
# --- colours (only when attached to a tty) ---
|
|
11
|
+
if [ -t 1 ]; then
|
|
12
|
+
C_OK=$'\033[32m'; C_ERR=$'\033[31m'; C_INFO=$'\033[36m'; C_DIM=$'\033[2m'; C_RST=$'\033[0m'
|
|
13
|
+
else
|
|
14
|
+
C_OK=''; C_ERR=''; C_INFO=''; C_DIM=''; C_RST=''
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
log() { mkdir -p "$(dirname "$LOG_FILE")" 2>/dev/null || true
|
|
18
|
+
printf '%s\n' "$*" | tee -a "$LOG_FILE" 2>/dev/null || printf '%s\n' "$*"; }
|
|
19
|
+
info() { log "${C_INFO}::${C_RST} $*"; }
|
|
20
|
+
ok() { log "${C_OK}ok${C_RST} $*"; }
|
|
21
|
+
err() { log "${C_ERR}!!${C_RST} $*" >&2; }
|
|
22
|
+
die() { err "$*"; exit 1; }
|
|
23
|
+
|
|
24
|
+
have() { command -v "$1" >/dev/null 2>&1; }
|
|
25
|
+
|
|
26
|
+
# --- OS / package-manager detection ---
|
|
27
|
+
detect_os() {
|
|
28
|
+
case "$(uname -s)" in
|
|
29
|
+
Linux) OMEGA_OS="linux" ;;
|
|
30
|
+
Darwin) OMEGA_OS="macos" ;;
|
|
31
|
+
*) die "unsupported OS: $(uname -s)" ;;
|
|
32
|
+
esac
|
|
33
|
+
if [ "$OMEGA_OS" = "linux" ]; then
|
|
34
|
+
if have apt-get; then OMEGA_PKG="apt"
|
|
35
|
+
elif have dnf; then OMEGA_PKG="dnf"
|
|
36
|
+
else OMEGA_PKG="unknown"; fi
|
|
37
|
+
else
|
|
38
|
+
OMEGA_PKG="brew"
|
|
39
|
+
fi
|
|
40
|
+
export OMEGA_OS OMEGA_PKG
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
# --- step state (idempotent / resumable) ---
|
|
44
|
+
step_done() { [ -f "$STATE_FILE" ] && grep -qx "$1" "$STATE_FILE"; }
|
|
45
|
+
mark_done() { mkdir -p "$STATE_DIR"; printf '%s\n' "$1" >> "$STATE_FILE"; }
|
|
46
|
+
reset_state() { rm -f "$STATE_FILE"; }
|
|
47
|
+
|
|
48
|
+
# run_step <name> <function>
|
|
49
|
+
run_step() {
|
|
50
|
+
local name="$1" fn="$2"
|
|
51
|
+
if step_done "$name" && [ "${FORCE:-0}" != "1" ]; then
|
|
52
|
+
log "${C_DIM}-- skip $name (already done)${C_RST}"
|
|
53
|
+
return 0
|
|
54
|
+
fi
|
|
55
|
+
info "step $name"
|
|
56
|
+
if "$fn"; then
|
|
57
|
+
mark_done "$name"
|
|
58
|
+
ok "$name"
|
|
59
|
+
else
|
|
60
|
+
die "step $name failed — fix the cause and re-run install.sh (it resumes here)"
|
|
61
|
+
fi
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
# ask <var> <prompt> <default> — respects --non-interactive
|
|
65
|
+
ask() {
|
|
66
|
+
local __var="$1" __prompt="$2" __default="${3:-}" __reply
|
|
67
|
+
if [ "${NONINTERACTIVE:-0}" = "1" ]; then
|
|
68
|
+
printf -v "$__var" '%s' "$__default"
|
|
69
|
+
return 0
|
|
70
|
+
fi
|
|
71
|
+
read -r -p "$__prompt ${__default:+[$__default] }" __reply || true
|
|
72
|
+
printf -v "$__var" '%s' "${__reply:-$__default}"
|
|
73
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Omega OS installer — the 8 steps. Each function returns 0 on success, 1 on
|
|
3
|
+
# failure. run_step (common.sh) records success so re-runs resume.
|
|
4
|
+
|
|
5
|
+
OMEGA_BLOCKS="Agentik_SSOT Agentik_Engine Agentik_Orchestration Agentik_Providers \
|
|
6
|
+
Agentik_Coding Agentik_Tools Agentik_Runtime Agentik_Extra"
|
|
7
|
+
|
|
8
|
+
# --- 00 -----------------------------------------------------------------------
|
|
9
|
+
step_preflight() {
|
|
10
|
+
info "OS=$OMEGA_OS pkg=$OMEGA_PKG OMEGA_HOME=$OMEGA_HOME"
|
|
11
|
+
if [ "$(id -u)" -eq 0 ]; then
|
|
12
|
+
err "do not run as root — create and use a non-root user with sudo"
|
|
13
|
+
return 1
|
|
14
|
+
fi
|
|
15
|
+
have git || { err "git is required"; return 1; }
|
|
16
|
+
[ "$OMEGA_PKG" = "unknown" ] && { err "no supported package manager (apt/dnf/brew)"; return 1; }
|
|
17
|
+
mkdir -p "$STATE_DIR/logs"
|
|
18
|
+
return 0
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
# --- 10 -----------------------------------------------------------------------
|
|
22
|
+
step_system_deps() {
|
|
23
|
+
local pkgs="python3 git tmux sqlite3 jq curl"
|
|
24
|
+
case "$OMEGA_PKG" in
|
|
25
|
+
apt) sudo apt-get update -qq && sudo apt-get install -y -qq $pkgs python3-venv ;;
|
|
26
|
+
dnf) sudo dnf install -y -q $pkgs ;;
|
|
27
|
+
brew) brew install $pkgs 2>/dev/null || true ;;
|
|
28
|
+
*) err "install manually: $pkgs"; return 1 ;;
|
|
29
|
+
esac
|
|
30
|
+
if ! have uv && [ ! -x "$HOME/.local/bin/uv" ]; then
|
|
31
|
+
info "installing uv (Python package/venv manager)"
|
|
32
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh || { err "uv install failed"; return 1; }
|
|
33
|
+
fi
|
|
34
|
+
return 0
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
# --- 20 -----------------------------------------------------------------------
|
|
38
|
+
step_structure() {
|
|
39
|
+
local b
|
|
40
|
+
for b in $OMEGA_BLOCKS; do mkdir -p "$OMEGA_HOME/$b"; done
|
|
41
|
+
mkdir -p "$OMEGA_HOME/Agentik_Runtime"/{eventlog,sessions,verdicts,memory,locks,snapshots}
|
|
42
|
+
mkdir -p "$OMEGA_HOME/Agentik_Extra"/{var/cache,var/tmp,var/logs,staging/promotion,etc/secrets}
|
|
43
|
+
chmod 700 "$OMEGA_HOME/Agentik_Extra/etc/secrets" 2>/dev/null || true
|
|
44
|
+
# deploy the repo's source blocks into the live tree
|
|
45
|
+
if [ -d "${OMEGA_REPO:-}/omega" ]; then
|
|
46
|
+
cp -R "$OMEGA_REPO/omega/." "$OMEGA_HOME/"
|
|
47
|
+
ok "deployed source blocks from $OMEGA_REPO/omega"
|
|
48
|
+
else
|
|
49
|
+
err "repo source not found at \$OMEGA_REPO/omega"; return 1
|
|
50
|
+
fi
|
|
51
|
+
ok "8-block tree ready at $OMEGA_HOME"
|
|
52
|
+
return 0
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
# --- 30 -----------------------------------------------------------------------
|
|
56
|
+
step_engine() {
|
|
57
|
+
local uv_bin; uv_bin="$(command -v uv || echo "$HOME/.local/bin/uv")"
|
|
58
|
+
[ -x "$uv_bin" ] || { err "uv not found after step 10"; return 1; }
|
|
59
|
+
cd "$OMEGA_HOME/Agentik_Engine" || { err "engine block missing"; return 1; }
|
|
60
|
+
"$uv_bin" venv >/dev/null 2>&1 || { err "uv venv failed"; return 1; }
|
|
61
|
+
"$uv_bin" pip install -e . >/dev/null 2>&1 || { err "engine install failed"; return 1; }
|
|
62
|
+
mkdir -p "$OMEGA_HOME/Agentik_Tools/bin"
|
|
63
|
+
ln -sf "$OMEGA_HOME/Agentik_Engine/.venv/bin/omega" "$OMEGA_HOME/Agentik_Tools/bin/omega"
|
|
64
|
+
ok "engine installed — omega CLI at Agentik_Tools/bin/omega"
|
|
65
|
+
return 0
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
# --- 40 -----------------------------------------------------------------------
|
|
69
|
+
step_mcp() {
|
|
70
|
+
local catalog="$OMEGA_HOME/Agentik_SSOT/mcp/mcp-catalog.yaml"
|
|
71
|
+
[ -f "$catalog" ] || { err "MCP catalog missing: $catalog"; return 1; }
|
|
72
|
+
info "MCP catalog present ($(grep -c '^- id:' "$catalog" 2>/dev/null || echo '?') entries)"
|
|
73
|
+
if [ "${NONINTERACTIVE:-0}" = "1" ]; then
|
|
74
|
+
info "headless — MCP selection comes from the manifest (\`mcp:\` list)"
|
|
75
|
+
else
|
|
76
|
+
info "interactive — the MCP/plugin checklist reads $catalog"
|
|
77
|
+
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
|
+
return 0
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
# --- 50 -----------------------------------------------------------------------
|
|
85
|
+
step_telegram() {
|
|
86
|
+
local token
|
|
87
|
+
ask token "Telegram bot token (from @BotFather)" "${TELEGRAM_TOKEN:-}"
|
|
88
|
+
if [ -z "$token" ]; then
|
|
89
|
+
err "a Telegram bot token is required (or install with --profile minimal)"
|
|
90
|
+
return 1
|
|
91
|
+
fi
|
|
92
|
+
if have curl; then
|
|
93
|
+
if ! curl -s "https://api.telegram.org/bot${token}/getMe" | grep -q '"ok":true'; then
|
|
94
|
+
err "Telegram token rejected by the API"
|
|
95
|
+
return 1
|
|
96
|
+
fi
|
|
97
|
+
fi
|
|
98
|
+
local sec="$OMEGA_HOME/Agentik_Extra/etc/secrets"
|
|
99
|
+
mkdir -p "$sec"
|
|
100
|
+
printf 'TELEGRAM_TOKEN=%s\n' "$token" > "$sec/telegram.env"
|
|
101
|
+
chmod 600 "$sec/telegram.env"
|
|
102
|
+
ok "Telegram bot validated and wired (secret stored in the vault)"
|
|
103
|
+
return 0
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
# --- 60 -----------------------------------------------------------------------
|
|
107
|
+
step_services() {
|
|
108
|
+
if [ "${PROFILE:-vps}" = "minimal" ]; then
|
|
109
|
+
info "minimal profile — no services installed"
|
|
110
|
+
return 0
|
|
111
|
+
fi
|
|
112
|
+
if [ "$OMEGA_OS" = "linux" ]; then
|
|
113
|
+
local unitdir="$HOME/.config/systemd/user"
|
|
114
|
+
mkdir -p "$unitdir"
|
|
115
|
+
_systemd_unit "Omega OS engine" "$OMEGA_HOME/Agentik_Tools/bin/omega status" \
|
|
116
|
+
> "$unitdir/omega-engine.service"
|
|
117
|
+
_systemd_unit "Omega OS Telegram bridge" "$OMEGA_HOME/Agentik_Tools/bin/omega status" \
|
|
118
|
+
> "$unitdir/omega-telegram.service"
|
|
119
|
+
_systemd_unit "Omega OS autonomous supervisor" "$OMEGA_HOME/Agentik_Tools/bin/omega status" \
|
|
120
|
+
> "$unitdir/omega-autonomous.service"
|
|
121
|
+
info "systemd user units written to $unitdir"
|
|
122
|
+
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
|
+
else
|
|
125
|
+
info "macOS — launchd plists for the workstation profile go here (build-out)"
|
|
126
|
+
fi
|
|
127
|
+
return 0
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
_systemd_unit() { # _systemd_unit <description> <execstart>
|
|
131
|
+
cat <<EOF
|
|
132
|
+
[Unit]
|
|
133
|
+
Description=$1
|
|
134
|
+
After=network.target
|
|
135
|
+
|
|
136
|
+
[Service]
|
|
137
|
+
Type=simple
|
|
138
|
+
Environment=OMEGA_HOME=$OMEGA_HOME
|
|
139
|
+
ExecStart=$2
|
|
140
|
+
Restart=always
|
|
141
|
+
RestartSec=5
|
|
142
|
+
|
|
143
|
+
[Install]
|
|
144
|
+
WantedBy=default.target
|
|
145
|
+
EOF
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
# --- 70 -----------------------------------------------------------------------
|
|
149
|
+
step_doctor() {
|
|
150
|
+
local omega="$OMEGA_HOME/Agentik_Tools/bin/omega"
|
|
151
|
+
[ -x "$omega" ] || { err "omega CLI not found — the engine step is incomplete"; return 1; }
|
|
152
|
+
OMEGA_HOME="$OMEGA_HOME" "$omega" doctor
|
|
153
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Omega OS — headless install manifest.
|
|
2
|
+
#
|
|
3
|
+
# cp bootstrap/manifest.example.yaml bootstrap/manifest.yaml # then edit
|
|
4
|
+
# TELEGRAM_TOKEN=... bash install.sh --manifest bootstrap/manifest.yaml --non-interactive
|
|
5
|
+
#
|
|
6
|
+
# Secrets are NEVER stored in this file — they are read from environment
|
|
7
|
+
# variables or the encrypted vault. This file declares choices, not credentials.
|
|
8
|
+
|
|
9
|
+
profile: vps # vps | workstation | minimal
|
|
10
|
+
omega_home: ~/Omega
|
|
11
|
+
|
|
12
|
+
telegram:
|
|
13
|
+
token_env: TELEGRAM_TOKEN # the installer reads the token from this env var
|
|
14
|
+
group_chat_id: "" # the Telegram forum group; topics map to projects
|
|
15
|
+
|
|
16
|
+
providers: # which LLMs to wire, and their default roles
|
|
17
|
+
- id: claude
|
|
18
|
+
roles: [oracle, manager, worker, verifier]
|
|
19
|
+
- id: glm
|
|
20
|
+
roles: [aisb]
|
|
21
|
+
# - id: openai
|
|
22
|
+
# roles: [audit]
|
|
23
|
+
# credentials come from env / the vault, never from here
|
|
24
|
+
|
|
25
|
+
mcp: # entries from Agentik_SSOT/mcp/mcp-catalog.yaml
|
|
26
|
+
- filesystem
|
|
27
|
+
- git
|
|
28
|
+
- github
|
|
29
|
+
- composio
|
|
30
|
+
- playwright
|
|
31
|
+
- context7
|
|
32
|
+
- fetch
|
|
33
|
+
# - higgsfield
|
|
34
|
+
# - notion
|
|
35
|
+
# - linear
|
|
36
|
+
|
|
37
|
+
autonomous_agents: # charters from Agentik_Orchestration/autonomous/
|
|
38
|
+
- support-agent
|
|
39
|
+
# - growth-agent
|
|
40
|
+
|
|
41
|
+
options:
|
|
42
|
+
enable_services: true # install + describe the systemd 24/7 layer
|
|
43
|
+
rag:
|
|
44
|
+
envelope: corrective # CRAG wraps every retrieval
|
|
45
|
+
strategies: [hybrid, graph, multimodal]
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Omega OS — Accounts & Billing
|
|
2
|
+
|
|
3
|
+
> Multiple Claude Code Max accounts as a **pool**, and per-account usage
|
|
4
|
+
> tracking. Commands: `omega account`, `omega billing`.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 1. The shift — from "switch" to "pool"
|
|
9
|
+
|
|
10
|
+
In the original Omega, work ran in N tmux sessions, each its own `claude`
|
|
11
|
+
process. "Switching account" meant rewriting the OAuth credentials every
|
|
12
|
+
session used — the job of the old `account.py` + `claude-oauth.sh`.
|
|
13
|
+
|
|
14
|
+
**Omega OS has no tmux fan-out.** One engine process makes every provider call.
|
|
15
|
+
There is nothing to "switch" globally. Instead, the Claude provider holds an
|
|
16
|
+
**account pool** and assigns each agent call to an account.
|
|
17
|
+
|
|
18
|
+
This is strictly better. With N Max accounts in the pool you get the **sum** of
|
|
19
|
+
their rate limits as usable throughput — more concurrent agents, and no single
|
|
20
|
+
account slamming into its weekly cap. "Switching" becomes "pooling".
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 2. The account pool
|
|
25
|
+
|
|
26
|
+
`Agentik_Providers/claude/accounts.yaml` declares the pool:
|
|
27
|
+
|
|
28
|
+
| Field | Meaning |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `id` | a short handle for the account (`max-primary`, `max-secondary`, …) |
|
|
31
|
+
| `label` | a human description |
|
|
32
|
+
| `secret_ref` | a **reference** into the vault — never the token itself |
|
|
33
|
+
| `weight` | relative share of agent calls (`by-quota` / `round-robin`) |
|
|
34
|
+
| `status` | `active` · `resting` (temporarily out) · `disabled` |
|
|
35
|
+
| `selection` | pool-wide: `round-robin` \| `least-used` \| `by-quota` |
|
|
36
|
+
|
|
37
|
+
OAuth tokens are **never** in this file. They live encrypted in
|
|
38
|
+
`Agentik_Extra/etc/secrets/`; `accounts.yaml` only stores a `secret_ref`.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 3. Commands
|
|
43
|
+
|
|
44
|
+
| Command | Does |
|
|
45
|
+
|---|---|
|
|
46
|
+
| `omega account` | show the pool and the selection strategy |
|
|
47
|
+
| `omega account login` | run the Claude OAuth flow, store the token in the vault, add the account to the pool |
|
|
48
|
+
| `omega account use <id>` | set an account `active` / `resting` |
|
|
49
|
+
| `omega account pool` | edit weights and the selection strategy |
|
|
50
|
+
| `omega billing` | usage & cost per account |
|
|
51
|
+
|
|
52
|
+
> `omega account login` (the OAuth flow) and live `omega billing` aggregation
|
|
53
|
+
> are build-out — the commands and the model are in place; the OAuth handshake
|
|
54
|
+
> and usage rollup are the module-by-module implementation, like `bus.py`.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 4. The login flow
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
omega account login
|
|
62
|
+
│
|
|
63
|
+
├─ 1. open the Claude OAuth flow (device / browser code)
|
|
64
|
+
├─ 2. on success, store the token encrypted in
|
|
65
|
+
│ Agentik_Extra/etc/secrets/ as CLAUDE_OAUTH_<id>
|
|
66
|
+
├─ 3. add a pool entry to Agentik_Providers/claude/accounts.yaml
|
|
67
|
+
│ (secret_ref only — never the token)
|
|
68
|
+
└─ 4. the account is immediately part of the rotation
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
No credential ever lands in the git-tracked tree.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 5. Billing
|
|
76
|
+
|
|
77
|
+
Every `task.*` event can carry token usage in its payload. `omega billing`
|
|
78
|
+
aggregates that usage **per account** against the provider cost model — so you
|
|
79
|
+
can see, at a glance, which Max account is near its weekly limit and when to add
|
|
80
|
+
another one to the pool. Per-account is the point: each Max account has its own
|
|
81
|
+
cap, and the pool's whole value is spreading load across them.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## 6. Where it lives
|
|
86
|
+
|
|
87
|
+
| Concern | Block |
|
|
88
|
+
|---|---|
|
|
89
|
+
| pool config (`accounts.yaml`) | `Agentik_Providers/claude/` |
|
|
90
|
+
| OAuth tokens | `Agentik_Extra/etc/secrets/` (encrypted vault) |
|
|
91
|
+
| the rotation logic | the Claude provider adapter (`Agentik_Providers/claude/`, build-out) |
|
|
92
|
+
| usage data | the event log (`Agentik_Runtime/eventlog/`) |
|
|
93
|
+
|
|
94
|
+
Consistent with the rest of the rack: config in Providers, secrets in Extra,
|
|
95
|
+
runtime data in Runtime.
|