diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 4429312a..2f2ce320 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -34,6 +34,6 @@ A clear and concise description of what happens. - Version [e.g. 22] **Additional context** -- OmegaClaw version: [e.g. v0.1.10] +- Omega version: [e.g. v0.1.10] - Communication channel: [e.g. IRC] - Model provider: [e.g. Anthropic] diff --git a/.github/renovate-config.js b/.github/renovate-config.js index 36f7e9e6..6bd29dce 100644 --- a/.github/renovate-config.js +++ b/.github/renovate-config.js @@ -7,7 +7,7 @@ module.exports = { requireConfig: false, platform: "github", forkProcessing: "disable", - repositories: ["asi-alliance/OmegaClaw-Core"], + repositories: ["singnet/Omega"], extends: ["config:recommended"], dependencyDashboardAutoclose: true, prCreation: "approval", diff --git a/.github/workflows/autotests.yml b/.github/workflows/autotests.yml index 66252276..ca7b650d 100644 --- a/.github/workflows/autotests.yml +++ b/.github/workflows/autotests.yml @@ -52,17 +52,17 @@ jobs: fail-fast: false matrix: ${{ fromJSON(needs.prepare.outputs.matrix) }} env: - AUTOTESTS_OMEGACLAW_CONTAINER: omegaclaw - AUTOTESTS_OMEGACLAW_TAG: 'cicd-${{ github.run_id }}' + AUTOTESTS_OMEGA_CONTAINER: omega + AUTOTESTS_OMEGA_TAG: 'cicd-${{ github.run_id }}' # Not a real credential: it authenticates against the stub Gateway that # the openclaw fixture starts. It also gives test_credentials_scrubbed_mock # a token that is really present, so that check can fail if one leaks. - OMEGACLAW_OPENCLAW_TOKEN: 'ci-openclaw-stub-token' + OMEGA_OPENCLAW_TOKEN: 'ci-openclaw-stub-token' steps: - name: Complete tag name run: | - NEW_TAG="$AUTOTESTS_OMEGACLAW_TAG-${PLATFORM////-}" - echo "AUTOTESTS_OMEGACLAW_TAG=$NEW_TAG" >> "$GITHUB_ENV" + NEW_TAG="$AUTOTESTS_OMEGA_TAG-${PLATFORM////-}" + echo "AUTOTESTS_OMEGA_TAG=$NEW_TAG" >> "$GITHUB_ENV" echo "Completed image tag $NEW_TAG" env: PLATFORM: ${{ matrix.platform }} @@ -86,29 +86,29 @@ jobs: platforms: ${{ matrix.platform }} load: true push: false - tags: singularitynet/omegaclaw:${{ env.AUTOTESTS_OMEGACLAW_TAG }} + tags: singularitynet/omega:${{ env.AUTOTESTS_OMEGA_TAG }} cache-from: type=gha cache-to: type=gha,mode=min no-cache: ${{ inputs.no_build_cache }} - name: Verify version in release image run: | - expected="OmegaClaw version=$(git describe --tags --dirty --always)" - test "$(./scripts/omegaclaw --version)" = "$expected" + expected="Omega version=$(git describe --tags --dirty --always)" + test "$(./scripts/omega --version)" = "$expected" actual="$(docker run --rm \ - --entrypoint /PeTTa/repos/OmegaClaw-Core/scripts/omegaclaw \ - singularitynet/omegaclaw:${AUTOTESTS_OMEGACLAW_TAG} --version)" + --entrypoint /PeTTa/repos/Omega/scripts/omega \ + singularitynet/omega:${AUTOTESTS_OMEGA_TAG} --version)" test "$actual" = "$expected" - name: Autotests - Set up run: | - chmod +x ./scripts/omegaclaw - ./scripts/omegaclaw start -p Test -t test -d singularitynet/omegaclaw:${{ env.AUTOTESTS_OMEGACLAW_TAG }} -g "http://host.docker.internal:18789" + chmod +x ./scripts/omega + ./scripts/omega start -p Test -t test -d singularitynet/omega:${{ env.AUTOTESTS_OMEGA_TAG }} -g "http://host.docker.internal:18789" pip install pytest echo "Waiting for agent to become ready..." ready= for i in $(seq 1 90); do - if docker logs omegaclaw 2>&1 | grep -qE "CHARS_SENT: [0-9]+"; then + if docker logs omega 2>&1 | grep -qE "CHARS_SENT: [0-9]+"; then echo "Agent ready after ${i}s" ready=1 break @@ -117,7 +117,7 @@ jobs: done if [ -z "$ready" ]; then echo "::error::Agent did not become ready in 90s" - docker logs omegaclaw 2>&1 | tail -100 + docker logs omega 2>&1 | tail -100 exit 1 fi env: @@ -127,9 +127,9 @@ jobs: - name: MeTTa and Python unit tests env: PETTA_PATH: '/PeTTa' - PROJECT_ROOT: '/PeTTa/repos/OmegaClaw-Core' + PROJECT_ROOT: '/PeTTa/repos/Omega' run: | - docker exec -e PETTA_PATH=${PETTA_PATH} omegaclaw ${PROJECT_ROOT}/tests/mettatest.sh + docker exec -e PETTA_PATH=${PETTA_PATH} omega ${PROJECT_ROOT}/tests/mettatest.sh ./tests/pytest.sh - name: Autotests - Phase 1 (Blocking Checks) @@ -138,12 +138,12 @@ jobs: python ../src/helper.py pytest -s -v @run_mandatory env: - OMEGACLAW_CONTAINER: ${{ env.AUTOTESTS_OMEGACLAW_CONTAINER }} + OMEGA_CONTAINER: ${{ env.AUTOTESTS_OMEGA_CONTAINER }} - name: Autotests - Phase 2 (Non-Blocking Checks) continue-on-error: true working-directory: Autotests run: pytest -s -v @run_optional env: - OMEGACLAW_CONTAINER: ${{ env.AUTOTESTS_OMEGACLAW_CONTAINER }} - OMEGACLAW_GIT_TOKEN: ${{ secrets.CICD_GITHUB_PAT }} + OMEGA_CONTAINER: ${{ env.AUTOTESTS_OMEGA_CONTAINER }} + OMEGA_GIT_TOKEN: ${{ secrets.CICD_GITHUB_PAT }} diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 366ee3e5..1fc5383d 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -87,8 +87,8 @@ jobs: platforms: ${{ inputs.platforms }} push: ${{ inputs.publish_docker }} tags: | - singularitynet/omegaclaw:${{ inputs.tag_name }} - ${{ inputs.move_latest && 'singularitynet/omegaclaw:latest' || '' }} + singularitynet/omega:${{ inputs.tag_name }} + ${{ inputs.move_latest && 'singularitynet/omega:latest' || '' }} provenance: false cache-from: type=gha cache-to: type=gha,mode=min @@ -103,8 +103,8 @@ jobs: platforms: ${{ inputs.platforms }} push: ${{ inputs.publish_docker }} tags: | - singularitynet/omegaclaw:${{ inputs.tag_name }} - ${{ inputs.move_latest && 'singularitynet/omegaclaw:latest' || '' }} + singularitynet/omega:${{ inputs.tag_name }} + ${{ inputs.move_latest && 'singularitynet/omega:latest' || '' }} provenance: false cache-from: type=gha cache-to: type=gha,mode=min diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ea87518a..6a8954f1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,6 +34,6 @@ jobs: - name: Update release tags run: | docker buildx imagetools create \ - -t singularitynet/omegaclaw:${{ github.event.release.tag_name }} \ - -t singularitynet/omegaclaw:latest \ - singularitynet/omegaclaw:${{ github.sha }} + -t singularitynet/omega:${{ github.event.release.tag_name }} \ + -t singularitynet/omega:latest \ + singularitynet/omega:${{ github.sha }} diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 71a6b18b..58ea3e45 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -14,7 +14,7 @@ jobs: private-key: ${{ secrets.RENOVATE_PRIVATE_KEY }} client-id: ${{ secrets.RENOVATE_CLIENT_ID }} owner: ${{ github.repository_owner }} - repositories: "asi-alliance/OmegaClaw-Core" + repositories: "singnet/Omega" - name: Checkout uses: actions/checkout@v7.0.0 diff --git a/Autotests/README_live.md b/Autotests/README_live.md new file mode 100644 index 00000000..05bcd1a5 --- /dev/null +++ b/Autotests/README_live.md @@ -0,0 +1,445 @@ +# Live autotests — setup and run + +This document describes how to run the Omega autotest suite against a real LLM provider +(Anthropic / ASICloud / ASIOne / OpenAI / OpenRouter / Ollama-local), as opposed to the +deterministic LLM mock used by the variants under `Autotests/mock/`, +`Autotests/mock_telegram/`, and `Autotests/mock_memory/`. The live and mock variants share the +same set of assertions; the difference is the source of the agent's response. + +## 1. Prerequisites + +- Docker engine on the host. +- Repository checked out, working from its root. +- Python virtual environment under `Autotests/venv` with `pytest` installed. +- A valid API key for the chosen LLM provider. + +## 2. Container deployment + +Run on the QA host before starting pytest. Replace placeholders in angle brackets with concrete +values. `` and `` must agree (Anthropic + `ANTHROPIC_API_KEY`, +ASICloud + `ASI_API_KEY`, OpenAI + `OPENAI_API_KEY`). + +``` +docker run -d -it \ + --name \ + --user 65534:65534 \ + --init \ + --network bridge \ + --security-opt no-new-privileges:true \ + --volume omega-memory:/PeTTa/repos/Omega/memory/ \ + --tmpfs /tmp:size=64m,mode=1777,exec \ + --tmpfs /run:size=16m,mode=755 \ + --tmpfs /var/tmp:size=64m,mode=1777,exec \ + -e ="" \ + -e OMEGA_AUTH_SECRET=0000 \ + singularitynet/omega: \ + IRC_channel="" \ + provider="" \ + embeddingprovider="Local" +``` + +### Parameters + +| Parameter | Required | Description | +|---|---|---| +| `--name ` | Yes | Container name. Must equal `OMEGA_CONTAINER` on the host shell. | +| `--user 65534:65534` | No | Runs the agent as `nobody:nogroup`. Recommended; matches the image default. | +| `--init` | Yes | Uses tini as PID 1 to reap zombie processes spawned by `(run ...)` and `(create-script ...)`. | +| `--network bridge` | Yes | Outbound network for IRC, LLM API, search, embeddings. | +| `--volume omega-memory:<.../memory/>` | Yes | Persists ChromaDB and `history.metta` across container restarts. Tests run fine without it within one session. | +| `--tmpfs /tmp:...,exec` | Yes | `exec` is mandatory: several tests create shell scripts in `/tmp` and execute them. Default Docker tmpfs is `noexec`. | +| `--tmpfs /var/tmp:...,exec` | Yes | Same as `/tmp`; some tests use `/var/tmp`. | +| `--tmpfs /run:...` | No | System runtime files; no scripts run from here. | +| `-e ` | Yes | API key for the chosen LLM provider (`ANTHROPIC_API_KEY` / `ASI_API_KEY` / `OPENAI_API_KEY`). | +| `-e OMEGA_AUTH_SECRET=0000` | Yes | IRC authorization secret. The first nick that sends `auth ` binds; later nicks are ignored. `helpers.py` sends `auth 0000` hard-coded, so the value must stay `0000`. | +| `singularitynet/omega:` | Yes | Image pinned by full SHA. Tests are written against a specific build of skill semantics. | +| `IRC_channel=""` | Yes | Channel the agent joins on irc.quakenet.org. Must equal `OMEGA_IRC_CHANNEL` on the host shell. | +| `provider=""` | Yes | LLM provider: Anthropic / ASICloud / OpenAI. Must match the API key supplied above. | +| `embeddingprovider="Local"` | Yes | Local sentence-transformers in-container. OpenAI is also supported but consumes credits and adds latency. | + +## 3. Environment for pytest + +Export these on the host shell before running pytest: + +``` +export OMEGA_CONTAINER="" +export OMEGA_IRC_CHANNEL="" +export OMEGA_GIT_TOKEN="" +``` + +| Variable | Required | Description | +|---|---|---| +| `OMEGA_CONTAINER` | Yes | Name passed to `docker exec`. Must equal `--name` above. Default in `helpers.py` is `omega`. | +| `OMEGA_IRC_CHANNEL` | Yes | Channel for PRIVMSG. Must equal `IRC_channel` above. Default in `helpers.py` is `#metaclaw777`. | +| `OMEGA_GIT_TOKEN` | No | GitHub PAT used by `test_git_push_to_remote`. The test is skipped if this variable is unset. | +| `OMEGA_GIT_REMOTE` | No | Override the test remote. Default `https://github.com/OmegaSing/Test-Repopo`. | + +## 4. Run the suite + +``` +cd Autotests +source venv/bin/activate +pytest -s -v test_*.py +``` + +## 5. General notes + +- All files required for checks are created at the beginning of the test before accessing Omega. + Upon completion of the tests (both positive and negative), all test files are deleted. +- At the beginning of each test it is verified that there are no leftover test files in the target + directories. +- The tests verify functionality of the agent's skills. Each skill has several core functions that + are covered by tests, either individually or in combination. +- When launching the container, use Authorization Key `0000`. To use a different value, edit the + line `sock.sendall(f"PRIVMSG {CHANNEL} :auth 0000\r\n".encode())` in `helpers.py` before + starting the tests. +- Tests will be expanded as we go deeper into the project. + +## 6. Grading: 0 / 1 / 2 + +Tests where the agent's success may legitimately depend on prompt phrasing (complex multi-step +tasks, network-dependent searches, git workflows) report a grade in addition to pass/fail. The +grade is set via `Checker.set_grade()` in `helpers.py`: + +| Grade | Meaning | +|---|---| +| 1, FIRST TRY | Agent solved the task on the original prompt within the first timeout window. | +| 2, AFTER CLARIFY | First attempt timed out; the harness sent a clarification prompt and the agent succeeded on the retry. | +| 0, FAIL | Agent did not produce the expected result even after the clarification prompt. | + +Mechanics live in `try_with_clarification()` in `helpers.py`. If a graded step succeeds but a +later step in the same test fails, the grade is collapsed to 0 so it always matches the test +outcome. Tests without a graded step are reported as a plain pass/fail and never print a grade. + +The graded tests: `test_create_script`, `test_convert_format`, `test_run_error_script`, +`test_run_create_dirs`, `test_search_weather`, `test_git_pull_public`, `test_git_local_commit`, +`test_git_push_to_remote`, `test_memory_episode`, `test_complex_weather_flow`. + +## 7. Single-skill tests (one skill in isolation) + +These tests exercise one Omega skill at a time. `(send ...)` is treated as the reply transport, +not as a second skill under test. + +### Creating files + +**1. test_create_file.py** + +Creates `/tmp/testcat/hello.txt` containing exactly `Hello`. + +- Skill: `write-file`. +- Checks: directory exists, file exists, permissions start with `-rw`, mtime >= test start, + content is `Hello` (with or without trailing newline). +- Grade: not graded. + +**2. test_create_empty_file.py** + +Creates an empty `/tmp/test_empty/hello.txt`. + +- Skill: `write-file`. +- Checks: file is created, `cat` returns an empty string. +- Grade: not graded. + +**3. test_create_script.py** + +Creates `/tmp/test_script/date.sh`, a shell script that prints the current date. + +- Skill: `write-file` (with executable bit; agent may use shell `chmod`). +- Checks: file exists, is executable (`x` in permissions), the harness runs it via `sh date.sh` + and verifies the output contains the current year (UTC or local). +- GRADED. First attempt 120 s, post-clarification 180 s. + +### Editing files + +**4. test_edit_add_timestamp.py** + +Appends the current timestamp as a new line to a pre-created `note.txt` containing "This is a +test note." + +- Skill: `append-file` (or `write-file` rewrite). +- Preparation: harness creates the file with one line. +- Checks: mtime changed, last line of the file contains at least 4 digits. +- Grade: not graded. + +**5. test_edit_delete_line.py** + +Deletes the second line from a pre-created 3-line file (First line / Second line / Third line). + +- Skill: `write-file` (rewrite). +- Checks: mtime changed, exactly 2 lines remain, lines 1 and 3 intact, line 2 is gone. +- Grade: not graded. + +**6. test_edit_append_line.py** + +Appends a 4th line `Delta` to a pre-created 3-line file (Alpha / Bravo / Charlie). + +- Skill: `append-file`. +- Checks: mtime changed, 4 lines total, first 3 lines unchanged, 4th line equals `Delta`. +- Grade: not graded. + +**7. test_convert_format.py** + +Converts `document.md` to `document.txt`, preserving textual content. + +- Skill: `shell` (for example `cp src dst`) or `write-file` (read source then rewrite as `.txt`). +- Preparation: harness creates the `.md` file with title, paragraph, and a bullet list. +- Checks: `.txt` file exists, contains the keywords `My Title`, `Some paragraph text`, + `item one`, `item two`. +- GRADED. First attempt 120 s, post-clarification 180 s. + +### Running shell scripts + +**8. test_run_error_script.py** + +Runs a syntactically broken script and captures stdout and stderr to a file. + +- Skill: `shell` (with redirection `2>&1`). +- Preparation: harness pre-creates `broken.sh` with an unclosed `if [`. +- Checks: `output.txt` exists, contains the literal `start` (stdout) and at least one of `error` / + `syntax` / `unexpected` / `missing` / `not found` (stderr), container is still alive. +- GRADED. First-attempt timeout 60 s, post-clarification 120 s. + +**9. test_run_repeated.py** + +Runs `dateupdate.sh` exactly 10 times in a row. + +- Skill: `shell`. +- Preparation: harness pre-creates a script that appends `date` to `update.txt`. +- Checks: `update.txt` exists with mtime >= start, has at least 10 lines, every line contains + date-like digits. +- Grade: not graded. + +### Internet search + +**10. test_search_basic.py** + +Sends prompt "What is SingularityNet? Search the web." + +- Skill: `search` or `tavily-search`. +- Checks: agent invoked search/tavily-search with `singularity` in the argument; the reply + contains at least one of `singularitynet`, `agi`, `blockchain`, `decentralized`, `marketplace`, + `goertzel`. +- Grade: not graded. + +**11. test_search_weather.py** + +Cross-checks Valencia's temperature against the open-meteo.com API. + +- Skill: `search` or `tavily-search`. +- Preparation: harness fetches reference temperature from open-meteo. +- Checks: agent invoked search/tavily-search with `valencia` in the argument; the reply contains + a Celsius number within 10 °C of the reference. +- GRADED (search-call stage). First attempt 120 s, post-clarification 180 s. The follow-up + `(send ...)` stage uses a separate 240 s window (not graded itself; collapses overall grade to 0 + on timeout). + +**12. test_search_invalid.py** + +Asks about the gibberish string `dfghjkgkfjghj`. + +- Skill: `search` or `tavily-search`. +- Checks: agent invoked search/tavily-search with the gibberish argument; the reply contains a + negation phrase (`no results`, `not found`, `gibberish`, `nonsense`, `no meaning`, `unknown`, + and so on). +- Grade: not graded. + +**13. test_tavily_search.py** + +Explicitly requests `tavily-search` for "Fetch.ai latest news". + +- Skill: `tavily-search` (must NOT fall back to plain `search`). +- Checks: agent invoked `(tavily-search ...)` with `fetch` in the argument (240 s window); + warning (does not fail) if a plain `(search ...)` was also called; reply contains Fetch-related + keywords and none of the delivery-error markers (`delivery failed`, `tavily-search failed`, + `currently unavailable`, and so on), which would mask a downed external uAgent as a passing test. +- Grade: not graded. + +**14. test_technical_analysis.py** + +Requests technical analysis for ticker AAPL. + +- Skill: `technical-analysis`. +- Checks: agent invoked `(technical-analysis "AAPL")` with exact ticker match (240 s window); + reply mentions the ticker (`aapl` / `apple`) and at least one TA indicator (`rsi`, `macd`, + `sma`, `bullish`, `bearish`, `buy signal`, `trend`, and so on) and none of the delivery-error + markers. +- Grade: not graded. + +### Memory + +**15. test_memory_chromadb.py** + +Requests the agent to remember a fact tagged with marker `CI-SMOKE-`. + +- Skill: `remember`. +- Preparation: harness reads current vector count from `chroma.sqlite3`. +- Checks: agent invoked `(remember ...)` with the marker; vector count in the `embeddings` table + grew by at least 1. +- Grade: not graded. + +**16. test_memory_history.py** + +Sends "Acknowledge with one short line that you received marker ``." and verifies the +entry in `history.metta`. + +- Skill: `send` (or `pin`); test exists to verify history bookkeeping. +- Preparation: harness reads current mtime and size of `history.metta`. +- Checks: an s-exp record referencing `REQ-` appears in history; agent issued `(send ...)` + or `(pin ...)`; file mtime and size grew. +- Grade: not graded. + +**17. test_skill_metta.py** + +Asks the agent to evaluate any short MeTTa expression via the `metta` skill and report the result. + +- Skill: `metta`. +- Checks: agent invoked `(metta ...)`; agent then issued a `(send ...)` reply describing the + result. +- Grade: not graded. + +**18. test_skill_pin.py** + +Gives a multi-step task ("restarting servers alpha, beta, gamma, just finished alpha") and expects +the agent to track the progress with `pin`. + +- Skill: `pin`. +- Checks: agent invoked `(pin ...)` whose argument references either the `run_id` or one of the + keywords `step` / `alpha` / `beta` / `gamma` / `restart` / `server` / `done`; agent + acknowledged via `(send ...)`. +- Grade: not graded. + +### Working with git + +**19. test_git_pull_public.py** + +Agent clones a public repository over anonymous HTTPS, no token. + +- Skill: `shell`. +- Checks: `.git/` directory appears, HEAD points to a real commit, at least 1 tracked file in + HEAD, `origin` matches the expected remote URL (normalized, trailing `/` and `.git` ignored). +- GRADED. First attempt 120 s, post-clarification 180 s. + +**20. test_git_local_commit.py** + +Agent runs `git init`, `git add`, `git commit` locally inside the container. + +- Skill: `shell`. +- Preparation: harness installs git author identity (`Omega Test `), without + which `git commit` fails. +- Checks: file lands on disk inside the container within 60 s; `.git/` exists and `git log` + returns a HEAD line; commit subject contains the `run_id` (warning, not failure); the file is + present in the tree; warning (not failure) if no shell call mentioned `git`. +- GRADED (commit stage). First attempt 60 s, post-clarification 60 s. + +**21. test_git_push_to_remote.py** + +Agent clones a remote, creates a unique branch `qa/run-`, adds a file, commits, and pushes. +The harness then verifies via the GitHub REST API that the branch exists with the file, and +deletes the branch in teardown. + +- Skill: `shell`. +- Parameters via env vars: `OMEGA_GIT_TOKEN` (token; never appears in code) and + `OMEGA_GIT_REMOTE` (default `https://github.com/OmegaSing/Test-Repopo`). Test is skipped if the + token variable is unset. +- Checks: file lands on disk inside the container within 120 s; branch present on remote (GitHub + API 200); file present on branch; warning (not failure) if the shell call chain did not include + `git push`; credentials wiped on teardown. +- GRADED (remote-branch stage). First attempt 180 s, post-clarification 180 s, because the full + chain (clone, branch, write-file, commit, push, GitHub propagation) is heavy under real-LLM + latency. + +## 8. Multi-skill tests (combine two or more skills) + +These tests exercise sequencing of multiple skills in a single run. + +**22. test_run_create_dirs.py** + +Asks the agent to write `mkdirs.sh` and run it. The script must create `test1`, `test2`, `test3` +inside `/tmp/test_dirs/`. + +- Skills: `write-file` + `shell`. +- Preparation: target dir pre-created at 0777 to rule out permission errors. +- Checks: all three directories exist with fresh mtimes; agent invoked `(write-file ...)` + referencing `mkdirs.sh`; agent invoked `(shell ...)` to run the script. Diagnostics print + `wf=`, `sh=`, `script_present=`, `perms=<...>`, `dirs=` to make + stalls obvious, since weak models often write only the shebang and never run the script. +- GRADED. Both stages 60 s. + +**23. test_memory_episode.py** + +Tells the agent that the user's dog Barney lost a baby tooth, waits 60 seconds, then asks to +recall when this happened. + +- Skills: `remember` (turn 1) + `query` or `episodes` (turn 2). +- Preparation: parse the seed timestamp directly from the leading `("YYYY-MM-DD HH:MM:SS"` of the + `history.metta` block that quotes our REQ-tag, so the reference matches the agent's own clock, + not the host's. +- Checks (turn 1): agent invoked `(remember ...)` whose argument contains `tooth` or `Barney` + (180 s window, since the agent often asks a clarifying question first). +- Checks (turn 2): the reply contains one of the topic words (`dog` / `tooth` / `lost` / + `barney`) and a date in one of: full ISO YYYY-MM-DD, short MM-DD, hour HH:, or English + long/abbreviated month-name forms. Independently, either `(query ...)` or `(episodes ...)` must + have been invoked. +- GRADED. First attempt 180 s, post-clarification 180 s. + +**24. test_skill_query.py** + +Two-turn flow: plant a unique color (`azure-`) via `remember`, wait 60 s for embeddings to +settle, then ask the agent to recall it via `query` (embedding lookup, not timestamp lookup). + +- Skills: `remember` (turn 1) + `query` (turn 2). +- Checks (turn 1): agent invoked `(remember ...)` carrying the secret color. +- Checks (turn 2): agent invoked `(query ...)`; reply mentions the secret color verbatim. +- Grade: not graded. + +**25. test_skill_episodes.py** + +Two-turn flow: send a message tagged with `BEACON-` (no `remember`), capture the +timestamp, wait 90 s, then ask the agent to use `episodes` (timestamp lookup, not `query`) to +recall what was discussed at that earlier time. + +- Skills: `send` (turn 1, used as a recordable event) + `episodes` (turn 2). +- Checks (turn 1): agent issued `(send ...)` reply within 60 s, so the turn is recorded in + `history.metta` with a timestamp. +- Checks (turn 2): agent invoked `(episodes ...)` for the seed timestamp. +- Grade: not graded. + +**26. test_complex_weather_flow.py** + +Four-step pipeline: search NY weather, write `w.txt` with the forecast, write `p.sh` extracting +the first Celsius number into `t.txt`, run `p.sh`. + +- Skills: `search` (or `tavily-search`) + `write-file` + `shell`. +- Preparation: `verify_clean` for `/tmp/wflow`; pre-create the directory at 0777. +- Checks: agent invoked search/tavily-search for NY/weather; `w.txt` exists on disk; history + contains a `(write-file ...)` referencing `w.txt`; `p.sh` exists with executable bit; history + contains `(write-file ...)` or `(shell ...)` referencing `p.sh`; `t.txt` exists; history + contains `(shell ...)` running `p.sh`; `t.txt` content is a number in the range [-60; 120] + (range widened from the original spec because English-language NY sources often report °F); + content length is 40 characters or less. +- GRADED. Both stages 60 s. + +## 9. Negative test (live-only) + +**27. test_memory_no_autoremember.py** + +Sends a fact-shaped statement (`My favorite color is azure-. This is just a casual +mention, no need to do anything special.`) and verifies the agent does NOT silently promote it to +long-term memory unless it explicitly invokes `(remember ...)`. There is no mock-LLM counterpart, +because the test is meaningful only against a real model that exercises its own judgement about +what to remember. + +- Skill: none required (negative). +- Checks: marker lands in `history.metta` within 180 s (confirms HUMAN_MESSAGE was recorded); + after a further 60 s settle pause, the test reports one of three outcomes: agent volunteered + `remember`, agent volunteered `remember` (other content), or no implicit promotion, based on the + presence of an explicit `(remember ...)` with the marker and on the ChromaDB vector delta. All + three outcomes are passing; the test is informational, surfacing the agent's policy choice + rather than enforcing a single behaviour. +- Grade: not graded. + +## 10. Tear down + +``` +docker rm -f +docker volume rm omega-memory +``` diff --git a/Autotests/README_live.pdf b/Autotests/README_live.pdf deleted file mode 100644 index 753aefd2..00000000 Binary files a/Autotests/README_live.pdf and /dev/null differ diff --git a/Autotests/cleanup_legacy.py b/Autotests/cleanup_legacy.py index b2551461..18cdcdeb 100644 --- a/Autotests/cleanup_legacy.py +++ b/Autotests/cleanup_legacy.py @@ -22,8 +22,8 @@ "CI smoke", "CI smokes", "smoke test marker", - "OmegaClaw CI smoke", - "OmegaClaw smoke", + "Omega CI smoke", + "Omega smoke", "/root/testcat", "testcat/", "IDLE SPIN PATTERN NOTE 2026-04-14", @@ -36,7 +36,7 @@ def test_cleanup_legacy(): - print("\n=== OmegaClaw: legacy cleanup ===", flush=True) + print("\n=== Omega: legacy cleanup ===", flush=True) print(f">> history.metta: searching for {len(LEGACY_MARKERS)} markers", flush=True) removed_blocks = history_cleanup_by_markers(LEGACY_MARKERS) diff --git a/Autotests/helpers.py b/Autotests/helpers.py index 482ad199..24c7490f 100644 --- a/Autotests/helpers.py +++ b/Autotests/helpers.py @@ -1,4 +1,4 @@ -"""Shared test infrastructure for OmegaClaw smoke tests.""" +"""Shared test infrastructure for Omega smoke tests.""" import atexit import inspect import os @@ -10,21 +10,21 @@ import pytest -CHANNEL = os.environ.get("OMEGACLAW_IRC_CHANNEL") or "#metaclaw777" -CONTAINER = os.environ.get("OMEGACLAW_CONTAINER") or "omegaclaw" +CHANNEL = os.environ.get("OMEGA_IRC_CHANNEL") or "#metaclaw777" +CONTAINER = os.environ.get("OMEGA_CONTAINER") or "omega" IRC_SERVER = "irc.quakenet.org" IRC_PORT = 6667 WAIT = 30 POLL = 3 -HISTORY_FILE = "/PeTTa/repos/OmegaClaw-Core/memory/history.metta" +HISTORY_FILE = "/PeTTa/repos/Omega/memory/history.metta" CHROMA_SQLITE = "/PeTTa/chroma_db/chroma.sqlite3" -GIT_TOKEN_ENV = "OMEGACLAW_GIT_TOKEN" -GIT_REMOTE_ENV = "OMEGACLAW_GIT_REMOTE" +GIT_TOKEN_ENV = "OMEGA_GIT_TOKEN" +GIT_REMOTE_ENV = "OMEGA_GIT_REMOTE" GIT_DEFAULT_REMOTE = "https://github.com/OmegaSing/Test-Repopo" -GIT_AUTHOR_NAME = "OmegaClaw Test" -GIT_AUTHOR_EMAIL = "test@omegaclaw.local" +GIT_AUTHOR_NAME = "Omega Test" +GIT_AUTHOR_EMAIL = "test@omega.local" GIT_CREDENTIALS_PATH = "/etc/git-credentials" diff --git a/Autotests/import_knowledge/README.md b/Autotests/import_knowledge/README.md index dbdbbf25..fa943687 100644 --- a/Autotests/import_knowledge/README.md +++ b/Autotests/import_knowledge/README.md @@ -3,14 +3,14 @@ Tests for the knowledge-base import that runs on container startup (PR #168): the `scripts/import_knowledge.sh` gating logic and the entrypoint wiring that triggers it. - `test_import_knowledge.py` — unit tests for `scripts/import_knowledge.sh`, with the `import-knowledge` binary stubbed on PATH. -- `test_import_knowledge_integration.py` — startup tests that launch the image through `scripts/omegaclaw` and check the entrypoint gating and that a local import lands in the `chroma_db` the agent reads. +- `test_import_knowledge_integration.py` — startup tests that launch the image through `scripts/omega` and check the entrypoint gating and that a local import lands in the `chroma_db` the agent reads. ## Build the image The integration tests need a locally built image. Build it from the repository root: ``` -docker build -t omegaclaw:kb-test . +docker build -t omega:kb-test . ``` The unit tests need no image. @@ -24,14 +24,14 @@ cd Autotests pytest -s import_knowledge/test_import_knowledge.py ``` -Integration (point `OMEGACLAW_KB_IMAGE` at the image built above): +Integration (point `OMEGA_KB_IMAGE` at the image built above): ``` cd Autotests -OMEGACLAW_KB_IMAGE=omegaclaw:kb-test pytest -s import_knowledge/test_import_knowledge_integration.py +OMEGA_KB_IMAGE=omega:kb-test pytest -s import_knowledge/test_import_knowledge_integration.py ``` -The integration tests start and remove the container themselves through `scripts/omegaclaw` (fixed name `omegaclaw`, one at a time), so there is no manual `docker run` step. They are skipped unless `OMEGACLAW_KB_IMAGE` is set and Docker and `scripts/omegaclaw` are available. +The integration tests start and remove the container themselves through `scripts/omega` (fixed name `omega`, one at a time), so there is no manual `docker run` step. They are skipped unless `OMEGA_KB_IMAGE` is set and Docker and `scripts/omega` are available. # Tests description @@ -101,7 +101,7 @@ When `import-knowledge` exits non-zero, no sentinel is written, so the next star ## Integration: container startup -They launch the image through `scripts/omegaclaw`, so the real entrypoint runs (nginx, env scrub, import gating). +They launch the image through `scripts/omega`, so the real entrypoint runs (nginx, env scrub, import gating). ### 11. test_entrypoint_imports_when_enabled diff --git a/Autotests/import_knowledge/README.pdf b/Autotests/import_knowledge/README.pdf deleted file mode 100644 index 0a0b33a0..00000000 Binary files a/Autotests/import_knowledge/README.pdf and /dev/null differ diff --git a/Autotests/import_knowledge/test_import_knowledge_integration.py b/Autotests/import_knowledge/test_import_knowledge_integration.py index f5b8814e..fc261f5c 100644 --- a/Autotests/import_knowledge/test_import_knowledge_integration.py +++ b/Autotests/import_knowledge/test_import_knowledge_integration.py @@ -1,10 +1,10 @@ """ Test: knowledge-base import on container startup (PR #168). Covers entrypoint gating on IMPORT_KB_ON_START and a real local import landing in the chroma_db the -agent reads. Needs a built image (OMEGACLAW_KB_IMAGE) and Docker. +agent reads. Needs a built image (OMEGA_KB_IMAGE) and Docker. Run: - cd Autotests && OMEGACLAW_KB_IMAGE= \ + cd Autotests && OMEGA_KB_IMAGE= \ pytest -s import_knowledge/test_import_knowledge_integration.py """ import os @@ -14,9 +14,9 @@ import pytest -IMAGE = os.environ.get("OMEGACLAW_KB_IMAGE", "") -REPO = Path(os.environ.get("OMEGACLAW_REPO", "/root/OmegaClaw-Core")) -NAME = "omegaclaw" +IMAGE = os.environ.get("OMEGA_KB_IMAGE", "") +REPO = Path(os.environ.get("OMEGA_REPO", "/root/Omega")) +NAME = "omega" def _docker_ok(): @@ -29,8 +29,8 @@ def _docker_ok(): pytestmark = pytest.mark.skipif( - not IMAGE or not _docker_ok() or not (REPO / "scripts" / "omegaclaw").exists(), - reason="needs OMEGACLAW_KB_IMAGE, Docker, and scripts/omegaclaw", + not IMAGE or not _docker_ok() or not (REPO / "scripts" / "omega").exists(), + reason="needs OMEGA_KB_IMAGE, Docker, and scripts/omega", ) @@ -53,7 +53,7 @@ def _start(import_kb_on_start): env["IMPORT_KB_ON_START"] = import_kb_on_start env.setdefault("TEST_SERVER_IP", "127.0.0.1") r = subprocess.run( - ["bash", str(REPO / "scripts" / "omegaclaw"), + ["bash", str(REPO / "scripts" / "omega"), "start", "-d", IMAGE, "-t", "test", "-p", "Test"], env=env, cwd=str(REPO), capture_output=True, text=True, ) diff --git a/Autotests/mock/README.md b/Autotests/mock/README.md index a0c90c9c..c33ebbb0 100644 --- a/Autotests/mock/README.md +++ b/Autotests/mock/README.md @@ -1,8 +1,8 @@ # Mock autotests — setup and run -This section describes how to bring up a local OmegaClaw container running with the deterministic LLM mock and run the `test_*_mock.py` suite against it. +This section describes how to bring up a local Omega container running with the deterministic LLM mock and run the `test_*_mock.py` suite against it. -For the live-provider counterpart (real LLM, grading scheme, parameters table) see `Autotests/README_live.pdf`. +For the live-provider counterpart (real LLM, grading scheme, parameters table) see `Autotests/README_live.md`. ## 1. Prerequisites @@ -15,32 +15,32 @@ For the live-provider counterpart (real LLM, grading scheme, parameters table) s The mock infrastructure is part of the source tree, so the image must be built locally rather than pulled from the registry. ``` -docker build -t omegaclaw:mock . +docker build -t omega:mock . ``` ## 3. Start the container with the Test provider -Use the `scripts/omegaclaw` wrapper. It takes care of `--init`, `--user`, the `--tmpfs` mounts, `--security-opt no-new-privileges`, the persistent memory volume, and the `commchannel`/`provider`/`embeddingprovider` arguments, so the test setup stays in sync with how the agent is started in production and in CI. +Use the `scripts/omega` wrapper. It takes care of `--init`, `--user`, the `--tmpfs` mounts, `--security-opt no-new-privileges`, the persistent memory volume, and the `commchannel`/`provider`/`embeddingprovider` arguments, so the test setup stays in sync with how the agent is started in production and in CI. The container connects back to the host on TCP port 9765 to reach the mock LLM controller and on TCP port 9766 to reach the test communication channel server. `TEST_SERVER_IP` must hold the host IP that is reachable from inside the container; under the default Docker bridge this is `172.17.0.1`. ``` -env TEST_SERVER_IP=172.17.0.1 ./scripts/omegaclaw start -s 0000 -p Test -t test -d omegaclaw:mock +env TEST_SERVER_IP=172.17.0.1 ./scripts/omega start -s 0000 -p Test -t test -d omega:mock ``` Notes: - `-t test` selects the in-process test communication channel; messages travel over a TCP RPC between the container and the host fixture, not over IRC, Telegram, or Slack. - `-p Test` selects the mock LLM dispatcher. -- `-s 0000` sets `OMEGACLAW_AUTH_SECRET` inside the container. -- `-d omegaclaw:mock` points at the local image built in step 2. +- `-s 0000` sets `OMEGA_AUTH_SECRET` inside the container. +- `-d omega:mock` points at the local image built in step 2. - `TEST_SERVER_IP=172.17.0.1` is the host's docker-bridge address used by both the mock LLM provider and the test channel client. -- The container is created with the name `omegaclaw` (the script default). +- The container is created with the name `omega` (the script default). Wait until the agent loop is up. The first runtime `CHARS_SENT:` line (with a byte count after the colon) in the container log marks the end of `initChannels` / `initMemory` and the start of real iterations; the bare `CHARS_SENT:` string also appears earlier as part of the MeTTa source dump, so match on the numeric form to avoid a premature exit: ``` -until docker logs omegaclaw 2>&1 | grep -qE "CHARS_SENT: [0-9]+"; do sleep 2; done +until docker logs omega 2>&1 | grep -qE "CHARS_SENT: [0-9]+"; do sleep 2; done ``` ## 4. Configure the test environment @@ -48,14 +48,14 @@ until docker logs omegaclaw 2>&1 | grep -qE "CHARS_SENT: [0-9]+"; do sleep 2; do Export the variables the test harness reads. ``` -export OMEGACLAW_CONTAINER=omegaclaw -export OMEGACLAW_GIT_TOKEN= # only required by test_git_push_to_remote_mock +export OMEGA_CONTAINER=omega +export OMEGA_GIT_TOKEN= # only required by test_git_push_to_remote_mock ``` | Variable | Required | Description | |---|---|---| -| `OMEGACLAW_CONTAINER` | Yes | Container name passed to `docker exec` from the harness. Must equal the container name created in step 3 (`omegaclaw` when using the script). | -| `OMEGACLAW_GIT_TOKEN` | No | GitHub PAT used by `test_git_push_to_remote_mock`. The test is skipped if this variable is unset. | +| `OMEGA_CONTAINER` | Yes | Container name passed to `docker exec` from the harness. Must equal the container name created in step 3 (`omega` when using the script). | +| `OMEGA_GIT_TOKEN` | No | GitHub PAT used by `test_git_push_to_remote_mock`. The test is skipped if this variable is unset. | ## 5. Run the suite @@ -65,7 +65,7 @@ source venv/bin/activate pytest -s -v mock/test_*_mock.py ``` -The `LlmMockController`, `CommMockServer`, and the OpenClaw Gateway stub are provided by session-scoped fixtures in `mock/conftest.py`, so all three are started once per pytest session. Expected output: `42 passed`, minus the ones whose optional variables are unset - `test_git_push_to_remote_mock` skips without `OMEGACLAW_GIT_TOKEN`, and the six OpenClaw tests skip without `OMEGACLAW_OPENCLAW_TOKEN` (see "OpenClaw plugin" below). +The `LlmMockController`, `CommMockServer`, and the OpenClaw Gateway stub are provided by session-scoped fixtures in `mock/conftest.py`, so all three are started once per pytest session. Expected output: `42 passed`, minus the ones whose optional variables are unset - `test_git_push_to_remote_mock` skips without `OMEGA_GIT_TOKEN`, and the six OpenClaw tests skip without `OMEGA_OPENCLAW_TOKEN` (see "OpenClaw plugin" below). ## 5a. OpenClaw plugin (`test_openclaw_delegate_mock.py`) @@ -88,23 +88,23 @@ Two things must still be true of the container, because the plugin is configured 1. **Start it with `-g`**, which points Nginx's `/openclaw/` proxy at the stub and sets `openClawEnabled`/`openClawURL` - no `config/config.yaml` edit needed: ```bash - env TEST_SERVER_IP=172.17.0.1 OMEGACLAW_OPENCLAW_TOKEN= \ - ./scripts/omegaclaw start -s 0000 -p Test -t test -d omegaclaw:mock -g "http://172.17.0.1:18789" + env TEST_SERVER_IP=172.17.0.1 OMEGA_OPENCLAW_TOKEN= \ + ./scripts/omega start -s 0000 -p Test -t test -d omega:mock -g "http://172.17.0.1:18789" ``` Use the address the container reaches the host on: `172.17.0.1` under the default Docker bridge, `host.docker.internal` in CI. Starting the container by hand instead of through the script? Pass `openclaw_url=` as a container argument, same as `openaiapi_url=` (see `entrypoint.sh`). -2. **Export `OMEGACLAW_OPENCLAW_TOKEN`.** The stub accepts exactly this value, so the tests fail if Nginx does not inject it. Nginx reads it before the agent's environment is scrubbed, which is also what gives `test_credentials_scrubbed_mock.py` a real token to catch a leak of - with the variable unset, that assertion passes without proving anything. +2. **Export `OMEGA_OPENCLAW_TOKEN`.** The stub accepts exactly this value, so the tests fail if Nginx does not inject it. Nginx reads it before the agent's environment is scrubbed, which is also what gives `test_credentials_scrubbed_mock.py` a real token to catch a leak of - with the variable unset, that assertion passes without proving anything. If the token is unset the suite skips, since the plugin cannot be exercised at all. If the token is set but the container was started without `-g`, the fixture fails instead of skipping: a token with a disabled plugin means the run would look green while testing nothing. ## 6. Tear down ``` -./scripts/omegaclaw clean +./scripts/omega clean ``` -This removes the `omegaclaw` container and the `omegaclaw-memory` volume created by the script in step 3. +This removes the `omega` container and the `omega-memory` volume created by the script in step 3. # Tests description @@ -255,7 +255,7 @@ Agent runs `git init`, `git add`, `git commit` locally inside the container. Agent clones a remote, creates branch `qa/run-`, adds a file, commits, and pushes. - Mock answer: single `(shell "rm -rf ... && git clone ... && cd ... && git checkout -b ... && printf ... > && git add -A && git commit -m '...' && git push -u origin ...")`. -- Parameters via env vars: `OMEGACLAW_GIT_TOKEN` (token; never appears in code) and `OMEGACLAW_GIT_REMOTE` (default `https://github.com/OmegaSing/Test-Repopo`). Test is skipped if the token variable is unset. +- Parameters via env vars: `OMEGA_GIT_TOKEN` (token; never appears in code) and `OMEGA_GIT_REMOTE` (default `https://github.com/OmegaSing/Test-Repopo`). Test is skipped if the token variable is unset. - Checks: branch present on remote (GitHub API 200), file present on branch, the shell call included `git push`, credentials wiped on teardown. ## Multi-skill tests @@ -360,7 +360,7 @@ Explicit working-memory to long-term-memory transition. Verifies that provider keys, channel tokens, and the auth secret are scrubbed from the agent process environment after startup. The agent runs as `nobody` under an entrypoint that rebuilds the environment from a fixed allowlist, so secrets passed into the container reach the proxy/entrypoint but never the agent process itself. - Mock answer: `(shell "env > /tmp/omega38_agentenv.txt")` — the agent dumps its own environment (only the process owner can read it). -- Checks: `PATH` is present (positive control that the environment was captured); none of the forbidden secret variable names are present in the agent environment (`OMEGACLAW_AUTH_SECRET`, the provider API keys `ANTHROPIC_API_KEY` / `ASI_API_KEY` / `ASIONE_API_KEY` / `OPENAI_API_KEY` / `OPENROUTER_API_KEY` / `OPENAIAPI_API_KEY`, and the channel tokens `TG_BOT_TOKEN` / `SL_BOT_TOKEN` / `MM_BOT_TOKEN`). A leak fails with `leaked into agent env: [...]`. The check is by variable name, so it is independent of the secret values. +- Checks: `PATH` is present (positive control that the environment was captured); none of the forbidden secret variable names are present in the agent environment (`OMEGA_AUTH_SECRET`, the provider API keys `ANTHROPIC_API_KEY` / `ASI_API_KEY` / `ASIONE_API_KEY` / `OPENAI_API_KEY` / `OPENROUTER_API_KEY` / `OPENAIAPI_API_KEY`, and the channel tokens `TG_BOT_TOKEN` / `SL_BOT_TOKEN` / `MM_BOT_TOKEN`). A leak fails with `leaked into agent env: [...]`. The check is by variable name, so it is independent of the secret values. ## OpenClaw plugin (`test_openclaw_delegate_mock.py`) @@ -426,4 +426,4 @@ The delegation path is authenticated by Nginx rather than by the agent, checked - Mock answer: `(delegate-task-to-openclaw-agent "Reply with exactly: TOKEN-") (send "Token delegation sent ")`. - Checks: the stub recorded at least one request whose `Authorization` header matched the token, and no request arrived without that header. Since the agent process never holds the token, a matching header can only have come from the proxy. -The other half of this property - that `OMEGACLAW_OPENCLAW_TOKEN` never reaches the agent process - belongs to `test_credentials_scrubbed_mock.py`, which reads the environment the agent dumps for itself. Do not check it with `dexec`: `docker exec` starts a new process from the container's own configuration, which does carry the token by design, so such a check fails while the scrubbing works correctly. +The other half of this property - that `OMEGA_OPENCLAW_TOKEN` never reaches the agent process - belongs to `test_credentials_scrubbed_mock.py`, which reads the environment the agent dumps for itself. Do not check it with `dexec`: `docker exec` starts a new process from the container's own configuration, which does carry the token by design, so such a check fails while the scrubbing works correctly. diff --git a/Autotests/mock/README.pdf b/Autotests/mock/README.pdf deleted file mode 100644 index 4cff7fc3..00000000 Binary files a/Autotests/mock/README.pdf and /dev/null differ diff --git a/Autotests/mock/conftest.py b/Autotests/mock/conftest.py index c5c7997f..e425b1a0 100644 --- a/Autotests/mock/conftest.py +++ b/Autotests/mock/conftest.py @@ -69,9 +69,9 @@ def comm(): @pytest.fixture(scope="session") def openclaw_gateway(): - token = os.environ.get("OMEGACLAW_OPENCLAW_TOKEN", "") + token = os.environ.get("OMEGA_OPENCLAW_TOKEN", "") if not token: - pytest.skip("OMEGACLAW_OPENCLAW_TOKEN is not set, so the openclaw plugin cannot be " + pytest.skip("OMEGA_OPENCLAW_TOKEN is not set, so the openclaw plugin cannot be " "exercised; start the container with -g and the token") # A token with the plugin disabled means the container was started without # -g. Fail here instead of skipping: the token is always set in CI, so a @@ -80,13 +80,13 @@ def openclaw_gateway(): # Match the runtime log line, not the phrase: the container log also carries # the MeTTa source dump and its prolog translation, so the plain text # appears even when the plugin is off. - container = os.environ.get("OMEGACLAW_CONTAINER", "omegaclaw") + container = os.environ.get("OMEGA_CONTAINER", "omega") logs = subprocess.run(["docker", "logs", container], capture_output=True, text=True, errors="replace") enabled = re.search(r"\|\s*openclaw-plugin\s*\|\s*\"OpenClaw integration is enabled\"", logs.stdout + logs.stderr) if not enabled: - pytest.fail("OMEGACLAW_OPENCLAW_TOKEN is set but the openclaw plugin is disabled in " + pytest.fail("OMEGA_OPENCLAW_TOKEN is set but the openclaw plugin is disabled in " f"container {container!r}: start it with -g " f"pointing at port {GATEWAY_PORT}") stub = GatewayStub(token).start() diff --git a/Autotests/mock/test_complex_weather_flow_mock.py b/Autotests/mock/test_complex_weather_flow_mock.py index 1b3fdfb2..1cd9ff9e 100644 --- a/Autotests/mock/test_complex_weather_flow_mock.py +++ b/Autotests/mock/test_complex_weather_flow_mock.py @@ -34,7 +34,7 @@ def test_complex_weather_flow_mock(llm, comm): with Checker("complex weather flow (mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: complex flow mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: complex flow mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock/test_convert_format_mock.py b/Autotests/mock/test_convert_format_mock.py index 03177dcb..19066c6a 100644 --- a/Autotests/mock/test_convert_format_mock.py +++ b/Autotests/mock/test_convert_format_mock.py @@ -24,7 +24,7 @@ def test_convert_md_to_txt_mock(llm, comm): with Checker("convert .md to .txt (mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: convert format mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: convert format mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock/test_create_empty_file_mock.py b/Autotests/mock/test_create_empty_file_mock.py index 12685fe1..101c5b5c 100644 --- a/Autotests/mock/test_create_empty_file_mock.py +++ b/Autotests/mock/test_create_empty_file_mock.py @@ -22,7 +22,7 @@ def test_create_empty_file_mock(llm, comm): with Checker("create empty file (mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: create empty file mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: create empty file mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock/test_create_file_mock.py b/Autotests/mock/test_create_file_mock.py index 67561337..bef769eb 100644 --- a/Autotests/mock/test_create_file_mock.py +++ b/Autotests/mock/test_create_file_mock.py @@ -1,5 +1,5 @@ """ -Test: OmegaClaw creates hello.txt with content "Hello" in /tmp/testcat. +Test: Omega creates hello.txt with content "Hello" in /tmp/testcat. Run: pytest test_create_file.py -s @@ -18,7 +18,7 @@ def test_hello_file(llm, comm): with Checker("create hello.txt", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw smoke test (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega smoke test (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock/test_create_script_mock.py b/Autotests/mock/test_create_script_mock.py index e4fa288e..dc841fc4 100644 --- a/Autotests/mock/test_create_script_mock.py +++ b/Autotests/mock/test_create_script_mock.py @@ -32,7 +32,7 @@ def _current_year_strs(): def test_create_date_script_mock(llm, comm): with Checker("create date.sh (mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: create date.sh mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: create date.sh mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock/test_credentials_scrubbed_mock.py b/Autotests/mock/test_credentials_scrubbed_mock.py index 6593f51e..38a75dbb 100644 --- a/Autotests/mock/test_credentials_scrubbed_mock.py +++ b/Autotests/mock/test_credentials_scrubbed_mock.py @@ -7,8 +7,8 @@ or auth secret survives into the agent process. Red/green: before the fix the agent was the container's main process and -inherited every `-e` var. OMEGACLAW_AUTH_SECRET is always injected by -scripts/omegaclaw (default 0000), so it is the reliable marker: this test +inherited every `-e` var. OMEGA_AUTH_SECRET is always injected by +scripts/omega (default 0000), so it is the reliable marker: this test is RED before the fix and GREEN after. The agent reads its OWN environment via the shell skill, because only the @@ -23,11 +23,11 @@ DUMP = "/tmp/omega38_agentenv.txt" FORBIDDEN = [ - "OMEGACLAW_AUTH_SECRET", + "OMEGA_AUTH_SECRET", "ANTHROPIC_API_KEY", "ASI_API_KEY", "ASIONE_API_KEY", "OPENAI_API_KEY", "OPENROUTER_API_KEY", "OPENAIAPI_API_KEY", "TG_BOT_TOKEN", "SL_BOT_TOKEN", "MM_BOT_TOKEN", - "OMEGACLAW_OPENCLAW_TOKEN", + "OMEGA_OPENCLAW_TOKEN", ] diff --git a/Autotests/mock/test_edit_add_timestamp_mock.py b/Autotests/mock/test_edit_add_timestamp_mock.py index ae7ce386..51e03c23 100644 --- a/Autotests/mock/test_edit_add_timestamp_mock.py +++ b/Autotests/mock/test_edit_add_timestamp_mock.py @@ -23,7 +23,7 @@ def test_edit_add_timestamp_mock(llm, comm): with Checker("edit add timestamp (mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: add timestamp mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: add timestamp mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock/test_edit_append_line_mock.py b/Autotests/mock/test_edit_append_line_mock.py index aaf14417..a0f667cc 100644 --- a/Autotests/mock/test_edit_append_line_mock.py +++ b/Autotests/mock/test_edit_append_line_mock.py @@ -25,7 +25,7 @@ def test_edit_append_line_mock(llm, comm): with Checker("edit append line (mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: append line mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: append line mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock/test_edit_delete_line_mock.py b/Autotests/mock/test_edit_delete_line_mock.py index 708192f6..5fff7c51 100644 --- a/Autotests/mock/test_edit_delete_line_mock.py +++ b/Autotests/mock/test_edit_delete_line_mock.py @@ -23,7 +23,7 @@ def test_edit_delete_line_mock(llm, comm): with Checker("edit delete line (mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: delete second line mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: delete second line mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock/test_git_local_commit_mock.py b/Autotests/mock/test_git_local_commit_mock.py index a77f0f74..f33a81e9 100644 --- a/Autotests/mock/test_git_local_commit_mock.py +++ b/Autotests/mock/test_git_local_commit_mock.py @@ -36,7 +36,7 @@ def test_git_local_commit_mock(llm, comm): c.ok("git setup") start_ts = int(time.time()) - 1 - marker = f"omegaclaw run {c.run_id}" + marker = f"omega run {c.run_id}" c.add_cleanup_marker(marker) c.step("send prompt via comm channel with mocked response") diff --git a/Autotests/mock/test_git_push_to_remote_mock.py b/Autotests/mock/test_git_push_to_remote_mock.py index cf903f58..00a01b33 100644 --- a/Autotests/mock/test_git_push_to_remote_mock.py +++ b/Autotests/mock/test_git_push_to_remote_mock.py @@ -4,7 +4,7 @@ The mocked LLM response performs the full clone + branch + write + commit + push sequence in a single shell call. Cloning and pushing still require network access plus a real GitHub PAT -(OMEGACLAW_GIT_TOKEN) — the mock controls only the LLM dispatch. +(OMEGA_GIT_TOKEN) — the mock controls only the LLM dispatch. Run: pytest test_git_push_to_remote_mock.py -s @@ -56,7 +56,7 @@ def _api_base(remote_url): def test_git_push_to_remote_mock(llm, comm): token = get_git_token() if not token: - pytest.skip("OMEGACLAW_GIT_TOKEN not set") + pytest.skip("OMEGA_GIT_TOKEN not set") remote = get_git_remote() api = _api_base(remote) branch = f"qa/run-{int(time.time())}-mock" @@ -83,7 +83,7 @@ def test_git_push_to_remote_mock(llm, comm): c.ok("pre-create dir", TARGET_DIR) unique_file = f"qa-run-{c.run_id}.txt" - marker = f"omegaclaw push run {c.run_id}" + marker = f"omega push run {c.run_id}" c.add_cleanup_marker(marker) start_ts = int(time.time()) - 1 diff --git a/Autotests/mock/test_io_policy_skill_mock.py b/Autotests/mock/test_io_policy_skill_mock.py index 25cd7b21..b4d3e864 100644 --- a/Autotests/mock/test_io_policy_skill_mock.py +++ b/Autotests/mock/test_io_policy_skill_mock.py @@ -12,12 +12,12 @@ JSON_POLICY_OUTPUT_PATH = "/tmp/policy_out.json" -YAML_POLICY_INPUT_PATH = "/PeTTa/repos/OmegaClaw-Core/profile/policy.yaml" +YAML_POLICY_INPUT_PATH = "/PeTTa/repos/Omega/profile/policy.yaml" def test_get_io_policy_mock(llm, comm): with Checker("get-io-policy skill mock") as c: - print(f"\n=== OmegaClaw: get-io-policy mock (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: get-io-policy mock (run-id {c.run_id}) ===", flush=True) #################################### # Phase 1: check isolated skill call diff --git a/Autotests/mock/test_last_skill_results_visible_next_turn_mock.py b/Autotests/mock/test_last_skill_results_visible_next_turn_mock.py index a93ffb8e..c31e6020 100644 --- a/Autotests/mock/test_last_skill_results_visible_next_turn_mock.py +++ b/Autotests/mock/test_last_skill_results_visible_next_turn_mock.py @@ -29,7 +29,7 @@ def docker_logs(): def test_last_skill_results_visible_next_turn_mock(llm, comm): with Checker("LAST_SKILL_USE_RESULTS carries to next iteration (mock)") as c: - print(f"\n=== OmegaClaw: lastresults carry (run-id {c.run_id}) ===", + print(f"\n=== Omega: lastresults carry (run-id {c.run_id}) ===", flush=True) sentinel = f"UNIQ{c.run_id}" # appears in the metta expression diff --git a/Autotests/mock/test_memory_chromadb_mock.py b/Autotests/mock/test_memory_chromadb_mock.py index 210528b3..dc91a178 100644 --- a/Autotests/mock/test_memory_chromadb_mock.py +++ b/Autotests/mock/test_memory_chromadb_mock.py @@ -40,7 +40,7 @@ def chromadb_vector_count(): def test_memory_chromadb_mock(llm, comm): with Checker("chromadb vector write (mock)") as c: - print(f"\n=== OmegaClaw: chromadb mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: chromadb mock (run-id {c.run_id}) ===", flush=True) c.step("count chromadb vectors before") diff --git a/Autotests/mock/test_memory_episode_mock.py b/Autotests/mock/test_memory_episode_mock.py index 8006ddd6..e219fee6 100644 --- a/Autotests/mock/test_memory_episode_mock.py +++ b/Autotests/mock/test_memory_episode_mock.py @@ -28,7 +28,7 @@ def test_memory_episode_mock(llm, comm): with Checker("memory episode recall (mock)") as c: - print(f"\n=== OmegaClaw: memory episode mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: memory episode mock (run-id {c.run_id}) ===", flush=True) c.add_cleanup_marker("Barney") diff --git a/Autotests/mock/test_memory_history_byte_window_truncation_mock.py b/Autotests/mock/test_memory_history_byte_window_truncation_mock.py index 6c57b1c3..b69471c1 100644 --- a/Autotests/mock/test_memory_history_byte_window_truncation_mock.py +++ b/Autotests/mock/test_memory_history_byte_window_truncation_mock.py @@ -36,7 +36,7 @@ def history_tail(n): def test_memory_history_byte_window_truncation_mock(llm, comm): with Checker("history.metta byte-window truncation (mock)") as c: - print(f"\n=== OmegaClaw: history window truncation (run-id {c.run_id}) ===", + print(f"\n=== Omega: history window truncation (run-id {c.run_id}) ===", flush=True) early_marker = f"EARLY-{c.run_id}" diff --git a/Autotests/mock/test_memory_history_mock.py b/Autotests/mock/test_memory_history_mock.py index 4614f630..fd262564 100644 --- a/Autotests/mock/test_memory_history_mock.py +++ b/Autotests/mock/test_memory_history_mock.py @@ -21,7 +21,7 @@ def test_memory_history_mock(llm, comm): with Checker("history append (mock)") as c: - print(f"\n=== OmegaClaw: history append mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: history append mock (run-id {c.run_id}) ===", flush=True) c.step("capture initial history state") diff --git a/Autotests/mock/test_memory_missing_history_file_mock.py b/Autotests/mock/test_memory_missing_history_file_mock.py index 6950731b..fd8ab481 100644 --- a/Autotests/mock/test_memory_missing_history_file_mock.py +++ b/Autotests/mock/test_memory_missing_history_file_mock.py @@ -18,7 +18,7 @@ def test_history_recreation_mock(llm, comm): with Checker("history recreation on missing file") as c: - print(f"\n=== OmegaClaw: history recreation mock (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: history recreation mock (run-id {c.run_id}) ===", flush=True) try: c.step("Move history.metta to a temporary backup") diff --git a/Autotests/mock/test_memory_pin_window_visibility_mock.py b/Autotests/mock/test_memory_pin_window_visibility_mock.py index 046b3baa..2fc72444 100644 --- a/Autotests/mock/test_memory_pin_window_visibility_mock.py +++ b/Autotests/mock/test_memory_pin_window_visibility_mock.py @@ -28,7 +28,7 @@ def history_tail_bytes(n): def test_memory_pin_window_visibility_mock(llm, comm): with Checker("pin visibility in HISTORY window (mock)") as c: - print(f"\n=== OmegaClaw: pin window visibility (run-id {c.run_id}) ===", + print(f"\n=== Omega: pin window visibility (run-id {c.run_id}) ===", flush=True) pin_marker = f"alpha-{c.run_id}" diff --git a/Autotests/mock/test_openclaw_delegate_mock.py b/Autotests/mock/test_openclaw_delegate_mock.py index fdfb25c1..97349993 100644 --- a/Autotests/mock/test_openclaw_delegate_mock.py +++ b/Autotests/mock/test_openclaw_delegate_mock.py @@ -43,7 +43,7 @@ def _read_json(path): def test_delegate_isolated_and_success_mock(llm, comm, gateway): with Checker("delegate-task-to-openclaw-agent mock") as c: - print(f"\n=== OmegaClaw: openclaw delegate mock (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: openclaw delegate mock (run-id {c.run_id}) ===", flush=True) #################################### # Phase 1: check isolated skill call @@ -141,7 +141,7 @@ def test_delegate_isolated_and_success_mock(llm, comm, gateway): def test_delegate_empty_message_mock(llm, comm, gateway): with Checker("delegate-task-to-openclaw-agent empty message mock") as c: - print(f"\n=== OmegaClaw: openclaw delegate empty mock (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: openclaw delegate empty mock (run-id {c.run_id}) ===", flush=True) out_path = f"/tmp/openclaw_empty_{c.run_id}.json" @@ -177,7 +177,7 @@ def test_delegate_empty_message_mock(llm, comm, gateway): def test_delegate_new_session_per_call_mock(llm, comm, gateway): with Checker("delegate-task-to-openclaw-agent new session per call mock") as c: - print(f"\n=== OmegaClaw: openclaw delegate session isolation mock (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: openclaw delegate session isolation mock (run-id {c.run_id}) ===", flush=True) first_path = f"/tmp/openclaw_session1_{c.run_id}.json" second_path = f"/tmp/openclaw_session2_{c.run_id}.json" @@ -244,7 +244,7 @@ def test_delegate_new_session_per_call_mock(llm, comm, gateway): def test_delegate_stays_async_under_a_slow_gateway_mock(llm, comm, gateway): with Checker("delegate-task-to-openclaw-agent stays async") as c: - print(f"\n=== OmegaClaw: openclaw slow-gateway mock (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: openclaw slow-gateway mock (run-id {c.run_id}) ===", flush=True) out_path = f"/tmp/openclaw_slow_{c.run_id}.json" @@ -313,7 +313,7 @@ def test_delegate_stays_async_under_a_slow_gateway_mock(llm, comm, gateway): def test_delegate_reports_gateway_rejection_mock(llm, comm, gateway): with Checker("delegate-task-to-openclaw-agent reports a rejection") as c: - print(f"\n=== OmegaClaw: openclaw rejection mock (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: openclaw rejection mock (run-id {c.run_id}) ===", flush=True) out_path = f"/tmp/openclaw_401_{c.run_id}.json" @@ -358,7 +358,7 @@ def test_delegate_reports_gateway_rejection_mock(llm, comm, gateway): def test_delegate_retries_a_starting_gateway_mock(llm, comm, gateway): with Checker("delegate-task-to-openclaw-agent retries a starting Gateway") as c: - print(f"\n=== OmegaClaw: openclaw startup-retry mock (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: openclaw startup-retry mock (run-id {c.run_id}) ===", flush=True) out_path = f"/tmp/openclaw_503_{c.run_id}.json" marker = f"RETRIED-{c.run_id}" @@ -404,7 +404,7 @@ def test_delegate_retries_a_starting_gateway_mock(llm, comm, gateway): def test_delegate_reports_a_reply_without_text_mock(llm, comm, gateway): with Checker("delegate-task-to-openclaw-agent reports an empty Gateway reply") as c: - print(f"\n=== OmegaClaw: openclaw no-text mock (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: openclaw no-text mock (run-id {c.run_id}) ===", flush=True) out_path = f"/tmp/openclaw_notext_{c.run_id}.json" @@ -438,7 +438,7 @@ def test_delegate_reports_a_reply_without_text_mock(llm, comm, gateway): def test_delegation_is_authenticated_by_the_proxy_mock(llm, comm, gateway): with Checker("delegation is authenticated by the proxy, not by the agent") as c: - print(f"\n=== OmegaClaw: openclaw token-injection mock (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: openclaw token-injection mock (run-id {c.run_id}) ===", flush=True) c.step("delegate a task and let it reach the Gateway") prompt = make_prompt(c.run_id, "Delegate a task.") diff --git a/Autotests/mock/test_pin_invisible_within_iteration_mock.py b/Autotests/mock/test_pin_invisible_within_iteration_mock.py index b24fcb59..8017b3d2 100644 --- a/Autotests/mock/test_pin_invisible_within_iteration_mock.py +++ b/Autotests/mock/test_pin_invisible_within_iteration_mock.py @@ -38,7 +38,7 @@ def chars_sent_lines(): def test_pin_invisible_within_iteration_mock(llm, comm): with Checker("pin not visible inside its own iteration (mock)") as c: - print(f"\n=== OmegaClaw: pin within-iteration (run-id {c.run_id}) ===", + print(f"\n=== Omega: pin within-iteration (run-id {c.run_id}) ===", flush=True) marker = f"XENO-{c.run_id}" diff --git a/Autotests/mock/test_prompt_missing_files_mock.py b/Autotests/mock/test_prompt_missing_files_mock.py index b32f9c29..1873e848 100644 --- a/Autotests/mock/test_prompt_missing_files_mock.py +++ b/Autotests/mock/test_prompt_missing_files_mock.py @@ -16,16 +16,16 @@ from helpers import Checker, dexec_root, make_prompt, wait_for_skill_call -PROMPT_FILE = "/PeTTa/repos/OmegaClaw-Core/memory/prompt.txt" +PROMPT_FILE = "/PeTTa/repos/Omega/memory/prompt.txt" PROMPT_BAK = "/tmp/prompt.txt.bak" -PROMPT_PROVIDER_FILE = "/PeTTa/repos/OmegaClaw-Core/memory/prompt_Test.txt" +PROMPT_PROVIDER_FILE = "/PeTTa/repos/Omega/memory/prompt_Test.txt" PROMPT_PROVIDER_BAK = "/tmp/prompt_Test.txt.bak" def test_missing_default_prompt_mock(llm, comm): with Checker("missing default prompt fallback") as c: - print(f"\n=== OmegaClaw: missing prompt mock (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: missing prompt mock (run-id {c.run_id}) ===", flush=True) try: c.step("Move prompt.txt to a temporary backup") @@ -54,7 +54,7 @@ def test_missing_default_prompt_mock(llm, comm): def test_missing_provider_prompt_mock(llm, comm): with Checker("missing provider prompt fallback") as c: - print(f"\n=== OmegaClaw: provider prompt fallback (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: provider prompt fallback (run-id {c.run_id}) ===", flush=True) try: c.step("Ensure provider prompt is missing (move if it exists)") diff --git a/Autotests/mock/test_run_create_dirs_mock.py b/Autotests/mock/test_run_create_dirs_mock.py index a9843488..8c13521e 100644 --- a/Autotests/mock/test_run_create_dirs_mock.py +++ b/Autotests/mock/test_run_create_dirs_mock.py @@ -25,7 +25,7 @@ def test_run_create_dirs_mock(llm, comm): with Checker("create dirs script (mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: create dirs mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: create dirs mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock/test_run_error_script_mock.py b/Autotests/mock/test_run_error_script_mock.py index d33c61ef..d9f7372b 100644 --- a/Autotests/mock/test_run_error_script_mock.py +++ b/Autotests/mock/test_run_error_script_mock.py @@ -28,7 +28,7 @@ def test_run_error_script_mock(llm, comm): with Checker("run error script (mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: error script mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: error script mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock/test_run_repeated_mock.py b/Autotests/mock/test_run_repeated_mock.py index 5ce7f5cd..ecfff62f 100644 --- a/Autotests/mock/test_run_repeated_mock.py +++ b/Autotests/mock/test_run_repeated_mock.py @@ -24,7 +24,7 @@ def test_run_repeated_mock(llm, comm): with Checker("run repeated script (mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: run 10x mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: run 10x mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock/test_search_basic_mock.py b/Autotests/mock/test_search_basic_mock.py index 5940ab5a..f90f5cc4 100644 --- a/Autotests/mock/test_search_basic_mock.py +++ b/Autotests/mock/test_search_basic_mock.py @@ -29,7 +29,7 @@ def test_search_basic_mock(llm, comm): with Checker("search singularitynet (mock)") as c: - print(f"\n=== OmegaClaw: basic search mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: basic search mock (run-id {c.run_id}) ===", flush=True) c.step("send prompt via comm channel with mocked send response") diff --git a/Autotests/mock/test_search_invalid_mock.py b/Autotests/mock/test_search_invalid_mock.py index 2967b8ad..a33ad771 100644 --- a/Autotests/mock/test_search_invalid_mock.py +++ b/Autotests/mock/test_search_invalid_mock.py @@ -32,7 +32,7 @@ def test_search_invalid_mock(llm, comm): with Checker("search invalid (mock)") as c: - print(f"\n=== OmegaClaw: invalid search mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: invalid search mock (run-id {c.run_id}) ===", flush=True) c.step("send prompt via comm channel with mocked negation response") diff --git a/Autotests/mock/test_search_weather_mock.py b/Autotests/mock/test_search_weather_mock.py index 80a6f2f3..fcb8ce81 100644 --- a/Autotests/mock/test_search_weather_mock.py +++ b/Autotests/mock/test_search_weather_mock.py @@ -22,7 +22,7 @@ def test_search_weather_mock(llm, comm): with Checker("search weather valencia (mock)") as c: - print(f"\n=== OmegaClaw: Valencia weather mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: Valencia weather mock (run-id {c.run_id}) ===", flush=True) c.step("send prompt via comm channel with mocked send response") diff --git a/Autotests/mock/test_skill_episodes_mock.py b/Autotests/mock/test_skill_episodes_mock.py index 144ca4fa..595a3833 100644 --- a/Autotests/mock/test_skill_episodes_mock.py +++ b/Autotests/mock/test_skill_episodes_mock.py @@ -25,7 +25,7 @@ def test_skill_episodes_mock(llm, comm): with Checker("episodes skill recall (mock)") as c: - print(f"\n=== OmegaClaw: episodes mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: episodes mock (run-id {c.run_id}) ===", flush=True) marker = f"BEACON-{c.run_id}" diff --git a/Autotests/mock/test_skill_metta_mock.py b/Autotests/mock/test_skill_metta_mock.py index 831eb64c..e3e869c8 100644 --- a/Autotests/mock/test_skill_metta_mock.py +++ b/Autotests/mock/test_skill_metta_mock.py @@ -19,7 +19,7 @@ def test_skill_metta_mock(llm, comm): with Checker("metta skill invocation (mock)") as c: - print(f"\n=== OmegaClaw: metta mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: metta mock (run-id {c.run_id}) ===", flush=True) c.step("send prompt via comm channel with mocked metta + send response") diff --git a/Autotests/mock/test_skill_pin_mock.py b/Autotests/mock/test_skill_pin_mock.py index 1386ff93..2ee8478d 100644 --- a/Autotests/mock/test_skill_pin_mock.py +++ b/Autotests/mock/test_skill_pin_mock.py @@ -18,7 +18,7 @@ def test_skill_pin_mock(llm, comm): with Checker("pin skill invocation (mock)") as c: - print(f"\n=== OmegaClaw: pin mock (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: pin mock (run-id {c.run_id}) ===", flush=True) c.step("send prompt with mocked pin + send response") prompt = make_prompt( diff --git a/Autotests/mock/test_skill_query_mock.py b/Autotests/mock/test_skill_query_mock.py index 18f6cdd8..cf850632 100644 --- a/Autotests/mock/test_skill_query_mock.py +++ b/Autotests/mock/test_skill_query_mock.py @@ -23,7 +23,7 @@ def test_skill_query_mock(llm, comm): with Checker("query skill recall (mock)") as c: - print(f"\n=== OmegaClaw: query mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: query mock (run-id {c.run_id}) ===", flush=True) secret_color = f"azure-{c.run_id}" diff --git a/Autotests/mock/test_transition_episodes_after_eviction_mock.py b/Autotests/mock/test_transition_episodes_after_eviction_mock.py index aec5f792..44d99bfa 100644 --- a/Autotests/mock/test_transition_episodes_after_eviction_mock.py +++ b/Autotests/mock/test_transition_episodes_after_eviction_mock.py @@ -34,7 +34,7 @@ def history_tail(n): def test_transition_episodes_after_eviction_mock(llm, comm): with Checker("episodes retrieves evicted block (mock)") as c: - print(f"\n=== OmegaClaw: episodes after eviction (run-id {c.run_id}) ===", + print(f"\n=== Omega: episodes after eviction (run-id {c.run_id}) ===", flush=True) beacon_marker = f"BEACON-{c.run_id}" diff --git a/Autotests/mock/test_transition_metta_to_remember_mock.py b/Autotests/mock/test_transition_metta_to_remember_mock.py index b80a6c68..ffe92b57 100644 --- a/Autotests/mock/test_transition_metta_to_remember_mock.py +++ b/Autotests/mock/test_transition_metta_to_remember_mock.py @@ -37,7 +37,7 @@ def chromadb_vector_count(): def test_transition_metta_to_remember_mock(llm, comm): with Checker("metta reasoning -> remember (mock)") as c: - print(f"\n=== OmegaClaw: metta->remember (run-id {c.run_id}) ===", + print(f"\n=== Omega: metta->remember (run-id {c.run_id}) ===", flush=True) conclusion_marker = f"conclusion-{c.run_id}" diff --git a/Autotests/mock/test_transition_pin_to_remember_mock.py b/Autotests/mock/test_transition_pin_to_remember_mock.py index 02b8d858..8515e53a 100644 --- a/Autotests/mock/test_transition_pin_to_remember_mock.py +++ b/Autotests/mock/test_transition_pin_to_remember_mock.py @@ -39,7 +39,7 @@ def chromadb_vector_count(): def test_transition_pin_to_remember_mock(llm, comm): with Checker("pin -> remember transition (mock)") as c: - print(f"\n=== OmegaClaw: pin->remember transition (run-id {c.run_id}) ===", + print(f"\n=== Omega: pin->remember transition (run-id {c.run_id}) ===", flush=True) marker = f"candidate-set-{c.run_id}" diff --git a/Autotests/mock/test_workflow_plugin_mock.py b/Autotests/mock/test_workflow_plugin_mock.py index cbea4b5c..41295a02 100644 --- a/Autotests/mock/test_workflow_plugin_mock.py +++ b/Autotests/mock/test_workflow_plugin_mock.py @@ -32,7 +32,7 @@ DEMO_MESSAGE = "This is a test workflow demonstration" RESEARCH_WORKFLOW = "research-workflow" -RESEARCH_DIR = "/PeTTa/repos/OmegaClaw-Core/memory/workflow_space/research" +RESEARCH_DIR = "/PeTTa/repos/Omega/memory/workflow_space/research" RESEARCH_NAME = "qa-research-autotest" @@ -60,7 +60,7 @@ class TestWorkflowPlugin: def test_load_and_skill(self, llm, comm): with Checker("workflow load + skill (mock)") as c: - print(f"\n=== OmegaClaw: workflow load + skill (run-id {c.run_id}) ===", + print(f"\n=== Omega: workflow load + skill (run-id {c.run_id}) ===", flush=True) c.add_cleanup_marker(str(c.run_id)) c.add_cleanup_marker(str(c.run_id + 1)) @@ -107,7 +107,7 @@ def test_unload_removes_skill(self, llm, comm): # skill is gone and no longer produces output. This does not depend on # the unload confirmation message. with Checker("workflow unload removes its skill (mock)") as c: - print(f"\n=== OmegaClaw: workflow unload (run-id {c.run_id}) ===", + print(f"\n=== Omega: workflow unload (run-id {c.run_id}) ===", flush=True) c.add_cleanup_marker(str(c.run_id)) c.add_cleanup_marker(str(c.run_id + 1)) @@ -153,7 +153,7 @@ def test_unload_removes_skill(self, llm, comm): def test_research_workflow(self, llm, comm): project = f"{RESEARCH_DIR}/{RESEARCH_NAME}" with Checker("research-workflow start (mock)", cleanup_dirs=[project]) as c: - print(f"\n=== OmegaClaw: research-workflow (run-id {c.run_id}) ===", + print(f"\n=== Omega: research-workflow (run-id {c.run_id}) ===", flush=True) c.add_cleanup_marker(str(c.run_id)) c.add_cleanup_marker(str(c.run_id + 1)) diff --git a/Autotests/mock_memory/README.md b/Autotests/mock_memory/README.md new file mode 100644 index 00000000..fa5a6dd3 --- /dev/null +++ b/Autotests/mock_memory/README.md @@ -0,0 +1,177 @@ +# Memory mock autotests — setup and run + +This section describes how to bring up a local Omega container running with the deterministic +LLM mock and run the `test_*_mock.py` suite in `Autotests/mock_memory/` against it. The +container, image, IRC channel, and LLM mock controller are identical to those used by +`Autotests/mock/`; only the pytest target directory differs. + +## 1. Prerequisites + +- Docker engine on the host. +- Repository checked out, working from its root. +- Python virtual environment under `Autotests/venv` with `pytest` installed. + +## 2. Build the local image + +The mock infrastructure is part of the source tree, so the image must be built locally rather than +pulled from the registry. + +``` +docker build -t omega:mock . +``` + +## 3. Start the container with the Test provider + +The container connects back to the host on TCP port 9765 to reach the mock LLM controller. +`TEST_API_KEY` must hold the host IP that is reachable from inside the container. Under the +default Docker bridge this is `172.17.0.1`. + +``` +docker run -d -it \ + --name omega_mock \ + --user 65534:65534 \ + --init \ + --network bridge \ + --security-opt no-new-privileges:true \ + --volume omega-mock-memory:/PeTTa/repos/Omega/memory/ \ + --tmpfs /tmp:size=64m,mode=1777,exec \ + --tmpfs /run:size=16m,mode=755 \ + --tmpfs /var/tmp:size=64m,mode=1777,exec \ + -e TEST_API_KEY=172.17.0.1 \ + -e OMEGA_AUTH_SECRET=0000 \ + omega:mock \ + IRC_channel="#omega_mock" \ + provider="Test" \ + embeddingprovider="Local" +``` + +Notes: + +- `provider="Test"` selects the mock LLM dispatcher. +- `embeddingprovider="Local"` keeps the embedding model in-process (no network call). +- `TEST_API_KEY=172.17.0.1` is the host's docker-bridge address. +- `OMEGA_AUTH_SECRET=0000` matches the value the test harness sends as `auth 0000`. +- The IRC channel can be any unique string; pick one not used by another concurrent run. + +Wait until the container has registered on IRC and joined the channel: + +``` +docker logs omega_mock 2>&1 | grep -E "Joining|Registered" +``` + +## 4. Configure the test environment + +Export the variables the test harness reads. The values must match the container name and IRC +channel chosen at step 3. + +``` +export OMEGA_CONTAINER=omega_mock +export OMEGA_IRC_CHANNEL="#omega_mock" +``` + +## 5. Run the suite + +``` +cd Autotests +source venv/bin/activate +pytest -s -v mock_memory/test_*_mock.py +``` + +The mock controller is provided by a session-scoped fixture in `mock_memory/conftest.py`, which +reuses the `LlmMockController` from `Autotests/mock/llm.py` (the same controller used by the +`mock/` suite). It is started once per pytest session. Expected output: 7 passed. + +## 6. Tear down + +``` +docker rm -f omega_mock +docker volume rm omega-mock-memory +``` + +## Tests description + +All seven tests exercise the agent's memory machinery (working memory via `pin`, long-term +memory via `remember`, history window, episodes lookup) using deterministic mock-LLM answers. +Each test sends one or more prompts via IRC, registers a fixed answer for each prompt, and +verifies the resulting skill calls and side effects (`history.metta`, ChromaDB, docker logs). + +### 1. test_memory_pin_window_visibility_mock.py + +Two-turn flow that verifies a `(pin ...)` block lands on disk in `history.metta` and remains inside +the trailing 30K-byte HISTORY window so the agent can see it on the next iteration. + +- Turn 1 mock answer: `(pin "") (send "Pinned .")`. +- Turn 2 mock answer: a short `(send ...)` acknowledgement. +- Checks: `(pin ...)` was invoked with the marker, the pin block is grep-able in `history.metta`, + and the marker is present in the last 30000 bytes of the file. + +### 2. test_pin_invisible_within_iteration_mock.py + +Negative test that confirms a `(pin ...)` emitted inside iteration N is not present in the same +iteration's PROMPT (the prompt is built before skill evaluation), and only enters HISTORY on +iteration N+1. + +- Mock answer: `(pin "") (send "Pinned a progress code.")`. The marker is + intentionally not placed in the HUMAN_MESSAGE body so it cannot leak into the current + iteration's PROMPT via that path. +- Checks (via docker logs): the CHARS_SENT line for the iteration that carries REQ-`` + must not contain the marker; at least one later CHARS_SENT line must contain it. + +### 3. test_memory_history_byte_window_truncation_mock.py + +Two-turn flow that exercises the sliding-window mechanic of `history.metta`: an early marker is +written, then ~35K bytes of padding push it past the trailing 30K-byte HISTORY window. The +marker stays in the file on disk but disappears from the slice fed back to the agent as HISTORY. + +- Turn 1 mock answer: `(send "")`. +- Turn 2 mock answer: `(remember "+~35K bytes of A") (send "padded")`. +- Checks: the early marker is initially inside the last 30000 bytes; after padding, the file grew by + at least 35000 bytes; the early marker is still grep-able in the full file; the early marker is no + longer inside the last 30000 bytes. + +### 4. test_transition_episodes_after_eviction_mock.py + +Three-turn flow that confirms an evicted marker is still recoverable via the `episodes` skill +(timestamp-based scan of `history.metta`). + +- Turn 1 mock answer: `(send "")`; the host captures `seed_time` immediately before + sending. +- Turn 2 mock answer: `(remember "+~35K bytes") (send "padded")`, which evicts + BEACON from the trailing 30K-byte window. +- Turn 3 mock answer: `(episodes "") (send "Recalled .")`. +- Checks: BEACON evicted from the last 30000 bytes; `(episodes ...)` was invoked with a prefix + matching the captured seed timestamp; the final `(send ...)` references the BEACON marker. + +### 5. test_transition_pin_to_remember_mock.py + +Two-turn flow that promotes a working-memory item to long-term memory: turn 1 pins three +candidates; turn 2 commits the same set via `remember`. ChromaDB grows by exactly one vector. + +- Turn 1 mock answer: `(pin ": candidates A, B, C") (send "Pinned : A, B, C.")`. +- Turn 2 mock answer: `(remember ": candidates A, B, C") (send "Committed to + long-term memory.")`. +- Checks: both skill calls landed with the same marker, and `chroma.sqlite3` embeddings count + rose from N to N+1. + +### 6. test_transition_metta_to_remember_mock.py + +Single-turn flow that combines an in-process reasoning step with persistence: the agent calls +`metta` for NAL inheritance and then `remember` for the conclusion. ChromaDB grows by exactly +one vector. + +- Mock answer: + - `(metta "(|- ((--> sam friend) (stv 1.0 0.9)) ((--> garfield animal) (stv 1.0 0.9)))")` + - `(remember ": Sam is friend of an animal (derived via NAL inheritance).")` + - `(send "Reasoned and remembered.")` +- Checks: `(metta ...)` was invoked; `(remember ...)` was invoked with the conclusion marker; + `chroma.sqlite3` embeddings count rose from N to N+1. + +### 7. test_last_skill_results_visible_next_turn_mock.py + +Verifies the LAST_SKILL_USE_RESULTS carry: results of skill calls in iteration N appear in the +assembled PROMPT for iteration N+1. + +- Mock answer: `(metta "(quote )") (send "computed")`. The sentinel is placed inside + the metta expression so it can be located in the next iteration's PROMPT. +- Checks (via docker logs): the CHARS_SENT line that follows the one carrying REQ-`` + contains the LAST_SKILL_USE_RESULTS marker and the sentinel string. diff --git a/Autotests/mock_memory/README.pdf b/Autotests/mock_memory/README.pdf deleted file mode 100644 index 2f4d602d..00000000 Binary files a/Autotests/mock_memory/README.pdf and /dev/null differ diff --git a/Autotests/mock_slack/README.md b/Autotests/mock_slack/README.md index 131b5866..36ba98e2 100644 --- a/Autotests/mock_slack/README.md +++ b/Autotests/mock_slack/README.md @@ -1,6 +1,6 @@ # Slack autotests — setup and run -This section describes how to run the `test_*_slack_mock.py` suite against a local OmegaClaw container that talks to the real Slack Web API. Two Slack bots are used: an "agent" bot, which OmegaClaw runs as inside the container, and a "driver" bot, which the pytest harness uses to post prompts into a shared channel and to read the agent's replies. The LLM is still mocked (`provider="Test"`, deterministic answers from `Autotests/mock/llm.py`); only the message-delivery transport differs from `Autotests/mock/`. +This section describes how to run the `test_*_slack_mock.py` suite against a local Omega container that talks to the real Slack Web API. Two Slack bots are used: an "agent" bot, which Omega runs as inside the container, and a "driver" bot, which the pytest harness uses to post prompts into a shared channel and to read the agent's replies. The LLM is still mocked (`provider="Test"`, deterministic answers from `Autotests/mock/llm.py`); only the message-delivery transport differs from `Autotests/mock/`. The 26 tests in this directory mirror `Autotests/mock/test_*_mock.py` 1:1: same mock-LLM answers, same prompts, same assertions. They are listed at the end of this document. @@ -22,14 +22,14 @@ A free Slack workspace is enough. Create one at [slack.com/get-started](https:// ### 2.2. Shared channel -In the Slack client, click `+` next to **Channels** in the sidebar, choose **Create channel**, give it a name (for example `omegaclaw-qa`), keep it public, create. A private channel works too, but requires extra scopes on both apps (see 2.4). +In the Slack client, click `+` next to **Channels** in the sidebar, choose **Create channel**, give it a name (for example `omega-qa`), keep it public, create. A private channel works too, but requires extra scopes on both apps (see 2.4). ### 2.3. Create the two apps For each role (agent and driver) repeat the same flow at [api.slack.com/apps](https://api.slack.com/apps), signed in with the same account that owns the workspace: 1. Click **Create New App**, choose **From scratch**. -2. Set **App Name** (for example `OmegaClaw Agent` for the first app and `OmegaClaw Driver` for the second; the names are arbitrary, only the resulting tokens matter). +2. Set **App Name** (for example `Omega Agent` for the first app and `Omega Driver` for the second; the names are arbitrary, only the resulting tokens matter). 3. Pick the workspace from 2.1. 4. Click **Create App**. You land on the **Basic Information** page of the new app. @@ -104,12 +104,12 @@ This value is `SL_AGENT_USER_ID`, used by pytest only (step 5). The mock infrastructure is part of the source tree, so the image must be built locally rather than pulled from the registry. ``` -docker build -t omegaclaw:mock . +docker build -t omega:mock . ``` ## 4. Start the container with the Test provider and the Slack channel -Use the `scripts/omegaclaw` wrapper. It takes care of `--init`, `--user`, the `--tmpfs` mounts, `--security-opt no-new-privileges`, the persistent memory volume, and the `commchannel`/`provider`/`embeddingprovider` arguments, so the test setup stays in sync with how the agent is started in production and in CI. +Use the `scripts/omega` wrapper. It takes care of `--init`, `--user`, the `--tmpfs` mounts, `--security-opt no-new-privileges`, the persistent memory volume, and the `commchannel`/`provider`/`embeddingprovider` arguments, so the test setup stays in sync with how the agent is started in production and in CI. The container connects back to the host on TCP port 9765 to reach the mock LLM controller. `TEST_SERVER_IP` must hold the host IP that is reachable from inside the container; under the default Docker bridge this is `172.17.0.1`. The Slack adapter inside the container talks directly to `slack.com/api`. @@ -117,22 +117,22 @@ The container connects back to the host on TCP port 9765 to reach the mock LLM c env TEST_SERVER_IP=172.17.0.1 \ SL_BOT_TOKEN="" \ SL_CHANNEL_ID="" \ - ./scripts/omegaclaw start -s 0000 -p Test -t slack -d omegaclaw:mock + ./scripts/omega start -s 0000 -p Test -t slack -d omega:mock ``` Notes: - `-t slack` selects the Slack adapter inside `src/channels.metta`. - `-p Test` selects the mock LLM dispatcher. -- `-s 0000` sets `OMEGACLAW_AUTH_SECRET` inside the container; the test harness sends this same secret via the driver bot during `_sl_authenticate` once per session, binding the driver as the agent's owner. -- `SL_BOT_TOKEN` is the agent bot token (the bot OmegaClaw runs as). +- `-s 0000` sets `OMEGA_AUTH_SECRET` inside the container; the test harness sends this same secret via the driver bot during `_sl_authenticate` once per session, binding the driver as the agent's owner. +- `SL_BOT_TOKEN` is the agent bot token (the bot Omega runs as). - `SL_CHANNEL_ID` is the shared channel both bots live in. - `TEST_SERVER_IP=172.17.0.1` is the host's docker-bridge address used by the mock LLM provider. It must be set even for the Slack channel, because `provider=Test` reads it. Wait until the agent loop is up. The first runtime `CHARS_SENT:` line (with a byte count after the colon) marks the end of `initChannels` / `initMemory`: ``` -until docker logs omegaclaw 2>&1 | grep -qE "CHARS_SENT: [0-9]+"; do sleep 2; done +until docker logs omega 2>&1 | grep -qE "CHARS_SENT: [0-9]+"; do sleep 2; done ``` ## 5. Configure the test environment @@ -140,22 +140,22 @@ until docker logs omegaclaw 2>&1 | grep -qE "CHARS_SENT: [0-9]+"; do sleep 2; do Export the variables the test harness reads. ``` -export OMEGACLAW_CONTAINER=omegaclaw -export OMEGACLAW_AUTH_SECRET=0000 +export OMEGA_CONTAINER=omega +export OMEGA_AUTH_SECRET=0000 export SL_DRIVER_TOKEN="" export SL_CHANNEL_ID="" export SL_AGENT_USER_ID="" -export OMEGACLAW_GIT_TOKEN= # only required by test_git_push_to_remote_slack_mock +export OMEGA_GIT_TOKEN= # only required by test_git_push_to_remote_slack_mock ``` | Variable | Required | Description | |---|---|---| -| `OMEGACLAW_CONTAINER` | Yes | Container name passed to `docker exec` from the harness. Must equal the container name from step 4 (`omegaclaw` when using the script). | -| `OMEGACLAW_AUTH_SECRET` | Yes | Auth secret used by the driver bot once per session. Must equal the `-s` value from step 4. | +| `OMEGA_CONTAINER` | Yes | Container name passed to `docker exec` from the harness. Must equal the container name from step 4 (`omega` when using the script). | +| `OMEGA_AUTH_SECRET` | Yes | Auth secret used by the driver bot once per session. Must equal the `-s` value from step 4. | | `SL_DRIVER_TOKEN` | Yes | Driver bot token. Tests are skipped if unset. | | `SL_CHANNEL_ID` | Yes | Shared channel id. Same value the container was started with. | | `SL_AGENT_USER_ID` | Yes | Bot user id of the agent app. The driver bot filters incoming messages by author and ignores everything except messages from this user id. | -| `OMEGACLAW_GIT_TOKEN` | No | GitHub PAT used by `test_git_push_to_remote_slack_mock`. The test is skipped if this variable is unset. | +| `OMEGA_GIT_TOKEN` | No | GitHub PAT used by `test_git_push_to_remote_slack_mock`. The test is skipped if this variable is unset. | ## 6. Run the suite @@ -165,15 +165,15 @@ source venv/bin/activate pytest -s -v mock_slack/test_*_slack_mock.py ``` -The `LlmMockController` and the `SlackRealDriver` are provided by session-scoped fixtures in `mock_slack/conftest.py`, so both are started once per pytest session. Expected output: `26 passed` (or `25 passed, 1 skipped` if `OMEGACLAW_GIT_TOKEN` is not set). +The `LlmMockController` and the `SlackRealDriver` are provided by session-scoped fixtures in `mock_slack/conftest.py`, so both are started once per pytest session. Expected output: `26 passed` (or `25 passed, 1 skipped` if `OMEGA_GIT_TOKEN` is not set). ## 7. Tear down ``` -./scripts/omegaclaw clean +./scripts/omega clean ``` -This removes the `omegaclaw` container and the `omegaclaw-memory` volume created by the script in step 4. +This removes the `omega` container and the `omega-memory` volume created by the script in step 4. # Tests description @@ -324,7 +324,7 @@ Agent runs `git init`, `git add`, `git commit` locally inside the container. Agent clones a remote, creates branch `qa/run-`, adds a file, commits, and pushes. - Mock answer: single `(shell "rm -rf ... && git clone ... && cd ... && git checkout -b ... && printf ... > && git add -A && git commit -m '...' && git push -u origin ...")`. -- Parameters via env vars: `OMEGACLAW_GIT_TOKEN` (token; never appears in code) and `OMEGACLAW_GIT_REMOTE` (default `https://github.com/OmegaSing/Test-Repopo`). Test is skipped if the token variable is unset. +- Parameters via env vars: `OMEGA_GIT_TOKEN` (token; never appears in code) and `OMEGA_GIT_REMOTE` (default `https://github.com/OmegaSing/Test-Repopo`). Test is skipped if the token variable is unset. - Checks: branch present on remote (GitHub API 200), file present on branch, the shell call included `git push`, credentials wiped on teardown. ## Multi-skill tests diff --git a/Autotests/mock_slack/README.pdf b/Autotests/mock_slack/README.pdf deleted file mode 100644 index 57898d67..00000000 Binary files a/Autotests/mock_slack/README.pdf and /dev/null differ diff --git a/Autotests/mock_slack/conftest.py b/Autotests/mock_slack/conftest.py index d4eaf43f..5d345e04 100644 --- a/Autotests/mock_slack/conftest.py +++ b/Autotests/mock_slack/conftest.py @@ -13,7 +13,7 @@ - SL_DRIVER_TOKEN — Bot User OAuth Token (xoxb-...) of the driver app - SL_CHANNEL_ID — channel id where both bots are members (C0...) - SL_AGENT_USER_ID — bot user id of the agent app (U0...) -- OMEGACLAW_AUTH_SECRET — agent auth secret (default 0000) +- OMEGA_AUTH_SECRET — agent auth secret (default 0000) """ import os import sys @@ -33,7 +33,7 @@ from real_driver import SlackRealDriver # noqa: E402 -AUTH_SECRET = os.environ.get("OMEGACLAW_AUTH_SECRET") or "0000" +AUTH_SECRET = os.environ.get("OMEGA_AUTH_SECRET") or "0000" @pytest.fixture(scope="session") diff --git a/Autotests/mock_slack/test_complex_weather_flow_slack_mock.py b/Autotests/mock_slack/test_complex_weather_flow_slack_mock.py index c97887ec..d38dce64 100644 --- a/Autotests/mock_slack/test_complex_weather_flow_slack_mock.py +++ b/Autotests/mock_slack/test_complex_weather_flow_slack_mock.py @@ -35,7 +35,7 @@ def test_complex_weather_flow_slack_mock(llm, sl): with Checker("complex weather flow (slack mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: complex flow slack mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: complex flow slack mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_slack/test_convert_format_slack_mock.py b/Autotests/mock_slack/test_convert_format_slack_mock.py index b14b1ae6..946d0418 100644 --- a/Autotests/mock_slack/test_convert_format_slack_mock.py +++ b/Autotests/mock_slack/test_convert_format_slack_mock.py @@ -25,7 +25,7 @@ def test_convert_md_to_txt_slack_mock(llm, sl): with Checker("convert .md to .txt (slack mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: convert format slack mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: convert format slack mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_slack/test_create_empty_file_slack_mock.py b/Autotests/mock_slack/test_create_empty_file_slack_mock.py index 73864ad8..5db72045 100644 --- a/Autotests/mock_slack/test_create_empty_file_slack_mock.py +++ b/Autotests/mock_slack/test_create_empty_file_slack_mock.py @@ -23,7 +23,7 @@ def test_create_empty_file_slack_mock(llm, sl): with Checker("create empty file (slack mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: create empty file slack mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: create empty file slack mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_slack/test_create_file_slack_mock.py b/Autotests/mock_slack/test_create_file_slack_mock.py index c4e1cce1..1c1f9b4b 100644 --- a/Autotests/mock_slack/test_create_file_slack_mock.py +++ b/Autotests/mock_slack/test_create_file_slack_mock.py @@ -1,5 +1,5 @@ """ -Test: OmegaClaw creates hello.txt with content "Hello" in /tmp/testcat. +Test: Omega creates hello.txt with content "Hello" in /tmp/testcat. Run: pytest test_create_file.py -s @@ -19,7 +19,7 @@ def test_hello_file_slack_mock(llm, sl): with Checker("create hello.txt", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw smoke test (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega smoke test (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_slack/test_create_script_slack_mock.py b/Autotests/mock_slack/test_create_script_slack_mock.py index 237b84c2..9ebbac2c 100644 --- a/Autotests/mock_slack/test_create_script_slack_mock.py +++ b/Autotests/mock_slack/test_create_script_slack_mock.py @@ -33,7 +33,7 @@ def _current_year_strs(): def test_create_date_script_slack_mock(llm, sl): with Checker("create date.sh (slack mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: create date.sh slack mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: create date.sh slack mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_slack/test_edit_add_timestamp_slack_mock.py b/Autotests/mock_slack/test_edit_add_timestamp_slack_mock.py index 4f93de34..9d639fbe 100644 --- a/Autotests/mock_slack/test_edit_add_timestamp_slack_mock.py +++ b/Autotests/mock_slack/test_edit_add_timestamp_slack_mock.py @@ -24,7 +24,7 @@ def test_edit_add_timestamp_slack_mock(llm, sl): with Checker("edit add timestamp (slack mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: add timestamp slack mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: add timestamp slack mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_slack/test_edit_append_line_slack_mock.py b/Autotests/mock_slack/test_edit_append_line_slack_mock.py index b710fef3..fe53e467 100644 --- a/Autotests/mock_slack/test_edit_append_line_slack_mock.py +++ b/Autotests/mock_slack/test_edit_append_line_slack_mock.py @@ -26,7 +26,7 @@ def test_edit_append_line_slack_mock(llm, sl): with Checker("edit append line (slack mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: append line slack mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: append line slack mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_slack/test_edit_delete_line_slack_mock.py b/Autotests/mock_slack/test_edit_delete_line_slack_mock.py index 292c4549..9f98871c 100644 --- a/Autotests/mock_slack/test_edit_delete_line_slack_mock.py +++ b/Autotests/mock_slack/test_edit_delete_line_slack_mock.py @@ -24,7 +24,7 @@ def test_edit_delete_line_slack_mock(llm, sl): with Checker("edit delete line (slack mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: delete second line slack mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: delete second line slack mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_slack/test_git_local_commit_slack_mock.py b/Autotests/mock_slack/test_git_local_commit_slack_mock.py index 1265fcce..67215f8c 100644 --- a/Autotests/mock_slack/test_git_local_commit_slack_mock.py +++ b/Autotests/mock_slack/test_git_local_commit_slack_mock.py @@ -36,7 +36,7 @@ def test_git_local_commit_slack_mock(llm, sl): c.ok("git setup") start_ts = int(time.time()) - 1 - marker = f"omegaclaw run {c.run_id}" + marker = f"omega run {c.run_id}" c.add_cleanup_marker(marker) c.step("send prompt via Slack with mocked response") diff --git a/Autotests/mock_slack/test_git_push_to_remote_slack_mock.py b/Autotests/mock_slack/test_git_push_to_remote_slack_mock.py index 5974a608..8c8aa3ff 100644 --- a/Autotests/mock_slack/test_git_push_to_remote_slack_mock.py +++ b/Autotests/mock_slack/test_git_push_to_remote_slack_mock.py @@ -4,7 +4,7 @@ The mocked LLM response performs the full clone + branch + write + commit + push sequence in a single shell call. Cloning and pushing still require network access plus a real GitHub PAT -(OMEGACLAW_GIT_TOKEN) — the mock controls only the LLM dispatch. +(OMEGA_GIT_TOKEN) — the mock controls only the LLM dispatch. Run: pytest test_git_push_to_remote_mock.py -s @@ -57,7 +57,7 @@ def _api_base(remote_url): def test_git_push_to_remote_slack_mock(llm, sl): token = get_git_token() if not token: - pytest.skip("OMEGACLAW_GIT_TOKEN not set") + pytest.skip("OMEGA_GIT_TOKEN not set") remote = get_git_remote() api = _api_base(remote) branch = f"qa/run-{int(time.time())}-mock" @@ -84,7 +84,7 @@ def test_git_push_to_remote_slack_mock(llm, sl): c.ok("pre-create dir", TARGET_DIR) unique_file = f"qa-run-{c.run_id}.txt" - marker = f"omegaclaw push run {c.run_id}" + marker = f"omega push run {c.run_id}" c.add_cleanup_marker(marker) start_ts = int(time.time()) - 1 diff --git a/Autotests/mock_slack/test_memory_chromadb_slack_mock.py b/Autotests/mock_slack/test_memory_chromadb_slack_mock.py index 357fcdba..ecc32e10 100644 --- a/Autotests/mock_slack/test_memory_chromadb_slack_mock.py +++ b/Autotests/mock_slack/test_memory_chromadb_slack_mock.py @@ -41,7 +41,7 @@ def chromadb_vector_count(): def test_memory_chromadb_slack_mock(llm, sl): with Checker("chromadb vector write (slack mock)") as c: - print(f"\n=== OmegaClaw: chromadb slack mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: chromadb slack mock (run-id {c.run_id}) ===", flush=True) c.step("count chromadb vectors before") diff --git a/Autotests/mock_slack/test_memory_episode_slack_mock.py b/Autotests/mock_slack/test_memory_episode_slack_mock.py index 78b4c0e0..64980328 100644 --- a/Autotests/mock_slack/test_memory_episode_slack_mock.py +++ b/Autotests/mock_slack/test_memory_episode_slack_mock.py @@ -28,7 +28,7 @@ def test_memory_episode_slack_mock(llm, sl): with Checker("memory episode recall (slack mock)") as c: - print(f"\n=== OmegaClaw: memory episode slack mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: memory episode slack mock (run-id {c.run_id}) ===", flush=True) c.add_cleanup_marker("Barney") diff --git a/Autotests/mock_slack/test_memory_history_slack_mock.py b/Autotests/mock_slack/test_memory_history_slack_mock.py index ad445ed4..76565f4d 100644 --- a/Autotests/mock_slack/test_memory_history_slack_mock.py +++ b/Autotests/mock_slack/test_memory_history_slack_mock.py @@ -21,7 +21,7 @@ def test_memory_history_slack_mock(llm, sl): with Checker("history append (slack mock)") as c: - print(f"\n=== OmegaClaw: history append slack mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: history append slack mock (run-id {c.run_id}) ===", flush=True) c.step("capture initial history state") diff --git a/Autotests/mock_slack/test_run_create_dirs_slack_mock.py b/Autotests/mock_slack/test_run_create_dirs_slack_mock.py index 7cd9fd70..647e780a 100644 --- a/Autotests/mock_slack/test_run_create_dirs_slack_mock.py +++ b/Autotests/mock_slack/test_run_create_dirs_slack_mock.py @@ -26,7 +26,7 @@ def test_run_create_dirs_slack_mock(llm, sl): with Checker("create dirs script (slack mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: create dirs slack mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: create dirs slack mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_slack/test_run_error_script_slack_mock.py b/Autotests/mock_slack/test_run_error_script_slack_mock.py index a6a899a5..e7a5925e 100644 --- a/Autotests/mock_slack/test_run_error_script_slack_mock.py +++ b/Autotests/mock_slack/test_run_error_script_slack_mock.py @@ -29,7 +29,7 @@ def test_run_error_script_slack_mock(llm, sl): with Checker("run error script (slack mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: error script slack mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: error script slack mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_slack/test_run_repeated_slack_mock.py b/Autotests/mock_slack/test_run_repeated_slack_mock.py index 96caca4a..a821d552 100644 --- a/Autotests/mock_slack/test_run_repeated_slack_mock.py +++ b/Autotests/mock_slack/test_run_repeated_slack_mock.py @@ -25,7 +25,7 @@ def test_run_repeated_slack_mock(llm, sl): with Checker("run repeated script (slack mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: run 10x slack mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: run 10x slack mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_slack/test_search_basic_slack_mock.py b/Autotests/mock_slack/test_search_basic_slack_mock.py index 50863520..e3a885d7 100644 --- a/Autotests/mock_slack/test_search_basic_slack_mock.py +++ b/Autotests/mock_slack/test_search_basic_slack_mock.py @@ -29,7 +29,7 @@ def test_search_basic_slack_mock(llm, sl): with Checker("search singularitynet (slack mock)") as c: - print(f"\n=== OmegaClaw: basic search slack mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: basic search slack mock (run-id {c.run_id}) ===", flush=True) c.step("send prompt via Slack with mocked send response") diff --git a/Autotests/mock_slack/test_search_invalid_slack_mock.py b/Autotests/mock_slack/test_search_invalid_slack_mock.py index d8407ecb..09bf039a 100644 --- a/Autotests/mock_slack/test_search_invalid_slack_mock.py +++ b/Autotests/mock_slack/test_search_invalid_slack_mock.py @@ -32,7 +32,7 @@ def test_search_invalid_slack_mock(llm, sl): with Checker("search invalid (slack mock)") as c: - print(f"\n=== OmegaClaw: invalid search slack mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: invalid search slack mock (run-id {c.run_id}) ===", flush=True) c.step("send prompt via Slack with mocked negation response") diff --git a/Autotests/mock_slack/test_search_weather_slack_mock.py b/Autotests/mock_slack/test_search_weather_slack_mock.py index 30686f01..f0951583 100644 --- a/Autotests/mock_slack/test_search_weather_slack_mock.py +++ b/Autotests/mock_slack/test_search_weather_slack_mock.py @@ -22,7 +22,7 @@ def test_search_weather_slack_mock(llm, sl): with Checker("search weather valencia (slack mock)") as c: - print(f"\n=== OmegaClaw: Valencia weather slack mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: Valencia weather slack mock (run-id {c.run_id}) ===", flush=True) c.step("send prompt via Slack with mocked send response") diff --git a/Autotests/mock_slack/test_skill_episodes_slack_mock.py b/Autotests/mock_slack/test_skill_episodes_slack_mock.py index c2862255..eae4fcf1 100644 --- a/Autotests/mock_slack/test_skill_episodes_slack_mock.py +++ b/Autotests/mock_slack/test_skill_episodes_slack_mock.py @@ -25,7 +25,7 @@ def test_skill_episodes_slack_mock(llm, sl): with Checker("episodes skill recall (slack mock)") as c: - print(f"\n=== OmegaClaw: episodes slack mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: episodes slack mock (run-id {c.run_id}) ===", flush=True) marker = f"BEACON-{c.run_id}" diff --git a/Autotests/mock_slack/test_skill_metta_slack_mock.py b/Autotests/mock_slack/test_skill_metta_slack_mock.py index ff69eedf..4379139a 100644 --- a/Autotests/mock_slack/test_skill_metta_slack_mock.py +++ b/Autotests/mock_slack/test_skill_metta_slack_mock.py @@ -19,7 +19,7 @@ def test_skill_metta_slack_mock(llm, sl): with Checker("metta skill invocation (slack mock)") as c: - print(f"\n=== OmegaClaw: metta slack mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: metta slack mock (run-id {c.run_id}) ===", flush=True) c.step("send prompt via Slack with mocked metta + send response") diff --git a/Autotests/mock_slack/test_skill_pin_slack_mock.py b/Autotests/mock_slack/test_skill_pin_slack_mock.py index 4b10ae1e..9cb4e16a 100644 --- a/Autotests/mock_slack/test_skill_pin_slack_mock.py +++ b/Autotests/mock_slack/test_skill_pin_slack_mock.py @@ -18,7 +18,7 @@ def test_skill_pin_slack_mock(llm, sl): with Checker("pin skill invocation (slack mock)") as c: - print(f"\n=== OmegaClaw: pin slack mock (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: pin slack mock (run-id {c.run_id}) ===", flush=True) c.step("send prompt with mocked pin + send response") prompt = make_prompt( diff --git a/Autotests/mock_slack/test_skill_query_slack_mock.py b/Autotests/mock_slack/test_skill_query_slack_mock.py index bc1a1d2e..c3e00f5b 100644 --- a/Autotests/mock_slack/test_skill_query_slack_mock.py +++ b/Autotests/mock_slack/test_skill_query_slack_mock.py @@ -23,7 +23,7 @@ def test_skill_query_slack_mock(llm, sl): with Checker("query skill recall (slack mock)") as c: - print(f"\n=== OmegaClaw: query slack mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: query slack mock (run-id {c.run_id}) ===", flush=True) secret_color = f"azure-{c.run_id}" diff --git a/Autotests/mock_telegram/README.md b/Autotests/mock_telegram/README.md new file mode 100644 index 00000000..f8ac2bcf --- /dev/null +++ b/Autotests/mock_telegram/README.md @@ -0,0 +1,396 @@ +# Telegram autotests — setup and run + +This section describes how to run the `test_*_telegram_mock.py` suite against a local Omega +container that talks to the real api.telegram.org over Telegram's bot-to-bot mode (Bot API 10.0, +May 2026). A second "driver" bot plays the test user, sending prompts to the agent bot and +reading its replies. The LLM is still mocked (`provider="Test"`, deterministic answers from +`Autotests/mock/llm.py`); only the message-delivery transport differs from `Autotests/mock/`. + +The 26 tests in this directory mirror `Autotests/mock/test_*_mock.py` 1:1, with the same +mock-LLM answers, prompts and assertions, and are listed at the end of this document. + +## 1. Prerequisites + +- Docker engine on the host. +- Repository checked out, working from its root. +- Python virtual environment under `Autotests/venv` with `pytest` installed. +- Two Telegram bots, both opted into bot-to-bot mode in BotFather: + - the agent bot, which receives prompts and runs Omega inside the container; + - the driver bot, which sends prompts to the agent and collects its replies on behalf of pytest. +- An open private chat between the two bots (initiated once via BotFather or by sending `/start` + from each side). + +## 2. Configure BotFather + +For each of the two bots, in BotFather: + +1. `/mybots`, select the bot, Bot Settings, enable bot-to-bot mode (Bot API 10.0, May 2026), so + the bot can send to and receive messages from other bots. +2. Record the bot token (`TG_BOT_TOKEN` for the agent bot, `TG_DRIVER_TOKEN` for the driver bot). + +## 3. Build the local image + +The mock LLM infrastructure is part of the source tree, so the image must be built locally rather +than pulled from the registry. + +``` +docker build -t omega:mock . +``` + +## 4. Start the container with the Test provider and the Telegram channel + +The container connects back to the host on TCP port 9765 to reach the mock LLM controller +(`0.0.0.0` on the host, `172.17.0.1` from inside the default docker bridge). The Telegram adapter +inside the container talks directly to api.telegram.org, there is no `TG_API_BASE` override. + +``` +docker run -d -it \ + --name omega_tg \ + --user 65534:65534 \ + --init \ + --network bridge \ + --security-opt no-new-privileges:true \ + --volume omega-tg-memory:/PeTTa/repos/Omega/memory/ \ + --tmpfs /tmp:size=64m,mode=1777,exec \ + --tmpfs /run:size=16m,mode=755 \ + --tmpfs /var/tmp:size=64m,mode=1777,exec \ + -e TEST_API_KEY=172.17.0.1 \ + -e OMEGA_AUTH_SECRET=0000 \ + omega:mock \ + commchannel="telegram" \ + TG_BOT_TOKEN="" \ + TG_POLL_TIMEOUT="5" \ + provider="Test" \ + embeddingprovider="Local" +``` + +Notes: + +- `commchannel="telegram"` selects the Telegram adapter inside `src/channels.metta`. +- `TG_BOT_TOKEN` is the agent bot token (the bot that the Omega loop runs as). +- `provider="Test"` selects the mock LLM dispatcher. +- `embeddingprovider="Local"` keeps the embedding model in-process (no network call). +- `TEST_API_KEY=172.17.0.1` is the host's docker-bridge address used by the mock LLM provider. +- `OMEGA_AUTH_SECRET=0000` matches the value the autouse `_tg_authenticate` fixture sends as + `auth 0000` once per session. + +Wait until the container has started the Telegram poll loop: + +``` +docker logs omega_tg 2>&1 | grep -E "Telegram" +``` + +## 5. Configure the test environment + +Export the variables the test harness reads. + +``` +export OMEGA_CONTAINER=omega_tg +export TG_BOT_TOKEN="" +export TG_DRIVER_TOKEN="" +export TG_MIRROR_CHAT_ID="" +export OMEGA_GIT_TOKEN= # only required by test_git_push_to_remote_telegram_mock +``` + +| Variable | Required | Description | +|---|---|---| +| `OMEGA_CONTAINER` | Yes | Name passed to `docker exec` from the harness. Must equal `--name` above. | +| `TG_DRIVER_TOKEN` | Yes | Driver bot token. Tests are skipped if unset. | +| `TG_BOT_TOKEN` | Yes (or `TG_AGENT_USERNAME`) | Agent bot token. Used by the harness to auto-derive the agent's @username via Telegram's `getMe` endpoint. | +| `TG_AGENT_USERNAME` | No | Explicit override for the agent bot's @username (without @). If set, the `getMe` probe is skipped. Useful in air-gapped CI where the host cannot reach api.telegram.org. | +| `TG_MIRROR_CHAT_ID` | No | Chat id (numeric, can be negative for groups) that receives a mirror of the bot-to-bot conversation and per-test PASS/FAIL/SKIP lines. | +| `OMEGA_GIT_TOKEN` | No | GitHub PAT used by `test_git_push_to_remote_telegram_mock`. The test is skipped if this variable is unset. | + +## 6. Run the suite + +``` +cd Autotests +source venv/bin/activate +pytest -s -v mock_telegram/test_*_telegram_mock.py +``` + +The LLM mock controller and the `RealTgDriver` are provided by session-scoped fixtures in +`mock_telegram/conftest.py`, so both are started once per pytest session. Expected output: +26 passed (plus 1 skipped if `OMEGA_GIT_TOKEN` is not set). + +## 7. Tear down + +``` +docker rm -f omega_tg +docker volume rm omega-tg-memory +``` + +## Tests description + +All 26 tests are 1:1 mirrors of the corresponding `Autotests/mock/test_*_mock.py` files. The +mock-LLM answer, prompt body, prepared fixtures, and assertions are identical to the IRC +variants; the only difference is the message-delivery transport. Where the IRC variant calls +`helpers.send_prompt(prompt)`, the Telegram variant calls `tg_send_prompt(tg, prompt)`, which +makes the driver bot send `sendMessage(@agent, prompt)` to the agent bot via api.telegram.org. +Because the LLM is deterministic, no `try_with_clarification` retries are needed: every test +either passes on the first attempt or fails outright. + +### Creating files + +**1. test_create_file_telegram_mock.py** + +Creates `/tmp/testcat/hello.txt` containing exactly `Hello`. + +- Mock answer: `(shell "mkdir -p /tmp/testcat") (write-file "/tmp/testcat/hello.txt" "Hello")`. +- Checks: directory exists, file exists, permissions start with `-rw`, mtime >= test start, content + is `Hello` (with or without trailing newline). + +**2. test_create_empty_file_telegram_mock.py** + +Creates an empty `/tmp/test_empty/hello.txt`. + +- Mock answer: `(shell "mkdir -p /tmp/test_empty") (write-file "/tmp/test_empty/hello.txt" "")`. +- Checks: file is created, `cat` returns an empty string. + +**3. test_create_script_telegram_mock.py** + +Creates `/tmp/test_script/date.sh`, a shell script that prints the current date. + +- Mock answer: `(shell "mkdir -p /tmp/test_script") (write-file "/tmp/test_script/date.sh" + "#!/bin/bash\ndate\n") (shell "chmod +x /tmp/test_script/date.sh")`. +- Checks: file exists, is executable (`x` in permissions), harness runs it via `sh date.sh` and + verifies the output contains the current year (UTC or local). + +### Editing files + +**4. test_edit_add_timestamp_telegram_mock.py** + +Appends the current timestamp as a new line to a pre-created `note.txt`. + +- Mock answer: `(shell "date -Iseconds >> {TARGET_FILE}")`. +- Checks: mtime changed, last line of the file contains at least 4 digits. + +**5. test_edit_delete_line_telegram_mock.py** + +Deletes the second line from a pre-created 3-line file. + +- Mock answer: `(shell "sed -i 2d {TARGET_FILE}")`. +- Checks: mtime changed, exactly 2 lines remain, lines 1 and 3 intact. + +**6. test_edit_append_line_telegram_mock.py** + +Appends a 4th line `Delta` to a pre-created 3-line file (Alpha / Bravo / Charlie). + +- Mock answer: `(shell "printf '%s\n' Delta >> {TARGET_FILE}")`. +- Checks: mtime changed, 4 lines total, first 3 unchanged, 4th line equals `Delta`. + +**7. test_convert_format_telegram_mock.py** + +Converts `document.md` to `document.txt`, preserving textual content. + +- Mock answer: `(shell "cp {SOURCE_FILE} {DEST_FILE}")`. +- Checks: `.txt` exists, contains the keywords `My Title`, `Some paragraph text`, `item one`, + `item two`. + +### Running shell scripts + +**8. test_run_error_script_telegram_mock.py** + +Runs a syntactically broken pre-created script and captures stdout and stderr to a file. + +- Mock answer: `(shell "sh {SCRIPT_FILE} > {OUTPUT_FILE} 2>&1")`. +- Checks: `output.txt` exists, contains the literal `start` (stdout) and at least one of `error` / + `syntax` / `unexpected` / `missing` / `not found` (stderr); container is still alive. + +**9. test_run_repeated_telegram_mock.py** + +Runs `dateupdate.sh` exactly 10 times in a row. + +- Mock answer: ten consecutive `(shell "{SCRIPT_FILE}")` calls (one per run). +- Checks: `update.txt` exists with mtime >= start, has at least 10 lines, every line contains + date-like digits. + +### Internet search + +**10. test_search_basic_telegram_mock.py** + +Sends prompt "What is SingularityNet? Search the web." + +- Mock answer: `(send "SingularityNet (SNET) is a decentralized AI marketplace founded by Ben + Goertzel. Its native token AGIX powers a network of AI agents and services, and it is part of + the broader ASI Alliance ecosystem.")`. +- Checks: the reply contains at least one of `singularitynet`, `agi`, `blockchain`, + `decentralized`, `marketplace`, `goertzel`. + +**11. test_search_weather_telegram_mock.py** + +Returns a synthetic Valencia weather reply (the live variant cross-checks against open-meteo; the +mock variant fixes a synthetic reference `REF_TEMP_C = 18.0` and stays fully offline). + +- Mock answer: `(send "Current weather in Valencia, Spain: about 18.0°C.")`. +- Checks: the reply contains a plausible Celsius number (range [-20; 50]); at least one of those + numbers is within 10 °C of the synthetic reference 18.0 °C. + +**12. test_search_invalid_telegram_mock.py** + +Asks about a gibberish string. + +- Mock answer: `(send "No results found for . The string appears to be gibberish, no + meaningful matches.")`. +- Checks: the reply contains a negation phrase (`no results`, `not found`, `gibberish`, + `nonsense`, `no meaning`, `unknown`, and so on). + +**13. test_tavily_search_telegram_mock.py** + +The live variant exercises the external Tavily uAgent. The mock variant cannot reach it +deterministically, so the mocked response delivers the answer directly via `(send ...)` and the +assertion narrows to whether the agent surfaced a real Fetch.ai-specific reply. + +- Mock answer: `(send "Fetch.ai (FET) is a decentralized AI blockchain platform powering + autonomous economic agents (uAgents). Recent news covers the ASI Alliance roadmap, FET token + activity, and integration work with SingularityNET and CUDOS.")`. The `tavily-search` skill + itself is not invoked under the mock. +- Checks: a `(send ...)` exists whose body contains at least one strict Fetch keyword (`fetch.ai`, + `fetch ai`, `fet `, `asi alliance`, `humayun`, `uagent`, `decentralized`, `blockchain`, `token`) + and none of the delivery-error markers (`delivery failed`, `tavily-search failed`, `currently + unavailable`, and so on). + +**14. test_technical_analysis_telegram_mock.py** + +The live variant exercises the external technical-analysis uAgent. The mock variant cannot reach +it deterministically, so the mocked response delivers the TA summary directly via `(send ...)` and +the assertion narrows to whether the agent surfaced TA-style content for the requested ticker. + +- Mock answer: `(send "AAPL (Apple) is showing bullish momentum: RSI is rising, MACD crossed + above its signal line, and the 50-day SMA is above the 200-day. Composite indicators point to a + buy signal with strong trend strength.")`. The `technical-analysis` skill itself is not invoked + under the mock. +- Checks: a `(send ...)` exists whose body mentions the ticker (`aapl` or `apple`) and at least one + TA indicator (`rsi`, `macd`, `sma`, `bullish`, `bearish`, `buy signal`, `trend`, `momentum`, and + so on) and none of the delivery-error markers. + +### Memory + +**15. test_memory_chromadb_telegram_mock.py** + +Requests the agent to remember a fact tagged with marker `CI-SMOKE-`. + +- Mock answer: `(remember "Unique smoke marker CI-SMOKE- was emitted by CI.")`. +- Checks: `(remember ...)` was invoked with the marker; vector count in the `embeddings` table of + `chroma.sqlite3` grew by at least 1. + +**16. test_memory_history_telegram_mock.py** + +Sends "Acknowledge with one short line that you received marker ``." and verifies the +entry in `history.metta`. + +- Mock answer: `(send "Acknowledged marker .")`. +- Checks: an s-exp record referencing `REQ-` appears in history; the agent issued + `(send ...)`; file mtime and size grew. + +**17. test_skill_metta_telegram_mock.py** + +Asks the agent to evaluate a short MeTTa expression and report the result. + +- Mock answer: `(metta "(+ 2 2)") (send "The metta skill evaluated (+ 2 2) and returned 4.")`. +- Checks: `(metta ...)` was invoked; the agent then issued a `(send ...)`. Semantic correctness of + the MeTTa expression is not checked, the goal is to exercise the skill. + +**18. test_skill_pin_telegram_mock.py** + +Gives a multi-step task ("restarting servers alpha, beta, gamma, just finished alpha") and expects +the agent to track progress with `pin`. + +- Mock answer: `(pin "Server restart progress: alpha done; beta and gamma pending.") (send + "Tracking: alpha done, beta and gamma pending.")`. +- Checks: `(pin ...)` was invoked whose argument references either the `run_id` or one of the + keywords `step` / `alpha` / `beta` / `gamma` / `restart` / `server` / `done`; the agent + acknowledged via `(send ...)`. + +### Working with git + +**19. test_git_pull_public_telegram_mock.py** + +Agent clones a public repository over anonymous HTTPS, no token. + +- Mock answer: `(shell "rm -rf {TARGET_DIR} && git clone {remote} {TARGET_DIR}")`. +- Checks: `.git/` appears, HEAD points to a real commit, at least 1 tracked file in HEAD, `origin` + matches the expected remote URL (normalized, trailing `/` and `.git` ignored). + +**20. test_git_local_commit_telegram_mock.py** + +Agent runs `git init`, `git add`, `git commit` locally inside the container. + +- Mock answer: chain of `(shell "git -C {TARGET_DIR} init") (shell "...write file...") (shell "git + -C {TARGET_DIR} add -A") (shell "git -C {TARGET_DIR} commit -m 'add hello '")`. +- Checks: HEAD has at least one commit, commit subject contains the `run_id` (warning, not + failure), the file is present in the tree. + +**21. test_git_push_to_remote_telegram_mock.py** + +Agent clones a remote, creates branch `qa/run-`, adds a file, commits, and pushes. + +- Mock answer: single `(shell "rm -rf ... && git clone ... && cd ... && git checkout -b ... && + printf ... > && git add -A && git commit -m '...' && git push -u origin ...")`. +- Parameters via env vars: `OMEGA_GIT_TOKEN` (token; never appears in code) and + `OMEGA_GIT_REMOTE` (default `https://github.com/OmegaSing/Test-Repopo`). Test is skipped if the + token variable is unset. +- Checks: branch present on remote (GitHub API 200), file present on branch, the shell call + included `git push`, credentials wiped on teardown. + +### Multi-skill tests + +**22. test_run_create_dirs_telegram_mock.py** + +Agent writes `mkdirs.sh` and runs it. The script must create `test1`, `test2`, `test3` inside +`/tmp/test_dirs/`. + +- Mock answer: `(write-file "{SCRIPT_PATH}" "#!/bin/bash\nmkdir -p .../test1 .../test2 + .../test3\n") (shell "chmod +x {SCRIPT_PATH}") (shell "{SCRIPT_PATH}")`. +- Checks: all three directories exist with fresh mtimes; agent invoked `(write-file ...)` + referencing `mkdirs.sh`; agent invoked `(shell ...)` to run the script. Diagnostics print + `wf=`, `sh=`, `perms=<...>` to make stalls obvious. + +**23. test_memory_episode_telegram_mock.py** + +Two-turn flow: tells the agent that the user's dog Barney lost a baby tooth, waits 5 seconds, then +asks to recall when this happened. + +- Turn 1 mock answer: `(remember "Barney the dog lost his first baby tooth at the vet today.")`. +- Turn 2 mock answer: `(query "Barney tooth") (send "Barney the dog lost his first baby tooth on + . The milestone is recorded in my notes.")`. +- Checks (turn 1): `(remember ...)` was invoked whose argument contains `tooth` or `Barney`. + Checks (turn 2): `(query ...)` or `(episodes ...)` was invoked; the reply contains at least one + of `dog` / `tooth` / `lost`; the reply contains the captured seed date in YYYY-MM-DD format. + +**24. test_skill_query_telegram_mock.py** + +Two-turn flow: plant a unique color (`azure-`) via `remember`, wait for embeddings to +settle, then ask the agent to recall it via `query` (embedding lookup, not timestamp lookup). + +- Turn 1 mock answer: `(remember "My favorite color is azure-.") (send "Stored: favorite + colour is azure-.")`. +- Turn 2 mock answer: `(query "favorite color") (send "Your favorite color is azure-.")`. +- Checks (turn 1): `(remember ...)` carried the secret color. Checks (turn 2): `(query ...)` was + invoked; the reply mentions the secret color verbatim. + +**25. test_skill_episodes_telegram_mock.py** + +Two-turn flow: send a message tagged with a unique keyword (no `remember`), capture the timestamp, +then ask the agent to use `episodes` (timestamp lookup, not `query`) to recall what was discussed +at that earlier time. + +- Turn 1 mock answer: `(send "Acknowledged keyword .")`. +- Turn 2 mock answer: `(episodes "") (send "The unique keyword was .")`. +- Checks (turn 1): the turn is recorded in `history.metta` with a timestamp. Checks (turn 2): + `(episodes ...)` was invoked for the seed timestamp; the reply mentions the original marker. + +**26. test_complex_weather_flow_telegram_mock.py** + +Four-step pipeline: search NY weather, write `w.txt` with the forecast, write `p.sh` extracting the +first Celsius number into `t.txt`, run `p.sh`. Because the mock controls only the LLM dispatch (the +network-bound search skill is not exercised), the mocked response provides the forecast text +directly. + +- Mock answer: `(write-file "/tmp/wflow/w.txt" "New York tomorrow: clear, high 22 degrees + Celsius.") (write-file "/tmp/wflow/p.sh" "#!/bin/bash\ngrep -oE '[0-9]+' /tmp/wflow/w.txt | + head -1 > /tmp/wflow/t.txt\n") (shell "chmod +x /tmp/wflow/p.sh") (shell "/tmp/wflow/p.sh")`. +- Checks: `w.txt` exists; history contains `(write-file ...)` referencing `w.txt`; `p.sh` exists + with executable bit; history contains `(write-file ...)` or `(shell ...)` referencing `p.sh`; + `t.txt` exists; history contains `(shell ...)` running `p.sh`; `t.txt` content is a number in the + range [-60; 120]; content length is 40 characters or less. diff --git a/Autotests/mock_telegram/README.pdf b/Autotests/mock_telegram/README.pdf deleted file mode 100644 index 219e3b04..00000000 Binary files a/Autotests/mock_telegram/README.pdf and /dev/null differ diff --git a/Autotests/mock_telegram/conftest.py b/Autotests/mock_telegram/conftest.py index c284dc38..92bdf254 100644 --- a/Autotests/mock_telegram/conftest.py +++ b/Autotests/mock_telegram/conftest.py @@ -48,7 +48,7 @@ from real_driver import RealTgDriver # noqa: E402 -AUTH_SECRET = os.environ.get("OMEGACLAW_AUTH_SECRET") or "0000" +AUTH_SECRET = os.environ.get("OMEGA_AUTH_SECRET") or "0000" def _agent_username_from_bot_token(token): @@ -84,7 +84,7 @@ def tg(): if not driver_token: pytest.skip( "Telegram autotests require TG_DRIVER_TOKEN env var " - "(see Autotests/mock_telegram/README.pdf)" + "(see Autotests/mock_telegram/README.md)" ) agent_username = os.environ.get("TG_AGENT_USERNAME") if not agent_username: diff --git a/Autotests/mock_telegram/real_driver.py b/Autotests/mock_telegram/real_driver.py index 78b693e0..144af212 100644 --- a/Autotests/mock_telegram/real_driver.py +++ b/Autotests/mock_telegram/real_driver.py @@ -12,7 +12,7 @@ Requires `channels/telegram.py` to run against the real api.telegram.org and both bots opted into bot-to-bot mode via BotFather. See -`Autotests/mock_telegram/README.pdf` for setup. +`Autotests/mock_telegram/README.md` for setup. """ import json import queue diff --git a/Autotests/mock_telegram/test_complex_weather_flow_telegram_mock.py b/Autotests/mock_telegram/test_complex_weather_flow_telegram_mock.py index 796da633..4e076d0e 100644 --- a/Autotests/mock_telegram/test_complex_weather_flow_telegram_mock.py +++ b/Autotests/mock_telegram/test_complex_weather_flow_telegram_mock.py @@ -35,7 +35,7 @@ def test_complex_weather_flow_telegram_mock(llm, tg): with Checker("complex weather flow (telegram mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: complex flow telegram mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: complex flow telegram mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_telegram/test_convert_format_telegram_mock.py b/Autotests/mock_telegram/test_convert_format_telegram_mock.py index 07902bcb..75b59981 100644 --- a/Autotests/mock_telegram/test_convert_format_telegram_mock.py +++ b/Autotests/mock_telegram/test_convert_format_telegram_mock.py @@ -25,7 +25,7 @@ def test_convert_md_to_txt_telegram_mock(llm, tg): with Checker("convert .md to .txt (telegram mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: convert format telegram mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: convert format telegram mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_telegram/test_create_empty_file_telegram_mock.py b/Autotests/mock_telegram/test_create_empty_file_telegram_mock.py index 205f2654..d706d1ce 100644 --- a/Autotests/mock_telegram/test_create_empty_file_telegram_mock.py +++ b/Autotests/mock_telegram/test_create_empty_file_telegram_mock.py @@ -23,7 +23,7 @@ def test_create_empty_file_telegram_mock(llm, tg): with Checker("create empty file (telegram mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: create empty file telegram mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: create empty file telegram mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_telegram/test_create_file_telegram_mock.py b/Autotests/mock_telegram/test_create_file_telegram_mock.py index cc61ca5f..cd79561e 100644 --- a/Autotests/mock_telegram/test_create_file_telegram_mock.py +++ b/Autotests/mock_telegram/test_create_file_telegram_mock.py @@ -1,5 +1,5 @@ """ -Test: OmegaClaw creates hello.txt with content "Hello" in /tmp/testcat. +Test: Omega creates hello.txt with content "Hello" in /tmp/testcat. Run: pytest test_create_file.py -s @@ -19,7 +19,7 @@ def test_hello_file_telegram_mock(llm, tg): with Checker("create hello.txt", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw smoke test (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega smoke test (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_telegram/test_create_script_telegram_mock.py b/Autotests/mock_telegram/test_create_script_telegram_mock.py index f929c2e7..e075f527 100644 --- a/Autotests/mock_telegram/test_create_script_telegram_mock.py +++ b/Autotests/mock_telegram/test_create_script_telegram_mock.py @@ -33,7 +33,7 @@ def _current_year_strs(): def test_create_date_script_telegram_mock(llm, tg): with Checker("create date.sh (telegram mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: create date.sh telegram mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: create date.sh telegram mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_telegram/test_edit_add_timestamp_telegram_mock.py b/Autotests/mock_telegram/test_edit_add_timestamp_telegram_mock.py index e3877873..5239dbd4 100644 --- a/Autotests/mock_telegram/test_edit_add_timestamp_telegram_mock.py +++ b/Autotests/mock_telegram/test_edit_add_timestamp_telegram_mock.py @@ -24,7 +24,7 @@ def test_edit_add_timestamp_telegram_mock(llm, tg): with Checker("edit add timestamp (telegram mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: add timestamp telegram mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: add timestamp telegram mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_telegram/test_edit_append_line_telegram_mock.py b/Autotests/mock_telegram/test_edit_append_line_telegram_mock.py index b135a781..fa082b00 100644 --- a/Autotests/mock_telegram/test_edit_append_line_telegram_mock.py +++ b/Autotests/mock_telegram/test_edit_append_line_telegram_mock.py @@ -26,7 +26,7 @@ def test_edit_append_line_telegram_mock(llm, tg): with Checker("edit append line (telegram mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: append line telegram mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: append line telegram mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_telegram/test_edit_delete_line_telegram_mock.py b/Autotests/mock_telegram/test_edit_delete_line_telegram_mock.py index 3487929b..cb23b545 100644 --- a/Autotests/mock_telegram/test_edit_delete_line_telegram_mock.py +++ b/Autotests/mock_telegram/test_edit_delete_line_telegram_mock.py @@ -24,7 +24,7 @@ def test_edit_delete_line_telegram_mock(llm, tg): with Checker("edit delete line (telegram mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: delete second line telegram mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: delete second line telegram mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_telegram/test_git_local_commit_telegram_mock.py b/Autotests/mock_telegram/test_git_local_commit_telegram_mock.py index fec7ea87..2ce2e30e 100644 --- a/Autotests/mock_telegram/test_git_local_commit_telegram_mock.py +++ b/Autotests/mock_telegram/test_git_local_commit_telegram_mock.py @@ -36,7 +36,7 @@ def test_git_local_commit_telegram_mock(llm, tg): c.ok("git setup") start_ts = int(time.time()) - 1 - marker = f"omegaclaw run {c.run_id}" + marker = f"omega run {c.run_id}" c.add_cleanup_marker(marker) c.step("send prompt via Telegram with mocked response") diff --git a/Autotests/mock_telegram/test_git_push_to_remote_telegram_mock.py b/Autotests/mock_telegram/test_git_push_to_remote_telegram_mock.py index 68f824d8..5ec41b20 100644 --- a/Autotests/mock_telegram/test_git_push_to_remote_telegram_mock.py +++ b/Autotests/mock_telegram/test_git_push_to_remote_telegram_mock.py @@ -4,7 +4,7 @@ The mocked LLM response performs the full clone + branch + write + commit + push sequence in a single shell call. Cloning and pushing still require network access plus a real GitHub PAT -(OMEGACLAW_GIT_TOKEN) — the mock controls only the LLM dispatch. +(OMEGA_GIT_TOKEN) — the mock controls only the LLM dispatch. Run: pytest test_git_push_to_remote_mock.py -s @@ -57,7 +57,7 @@ def _api_base(remote_url): def test_git_push_to_remote_telegram_mock(llm, tg): token = get_git_token() if not token: - pytest.skip("OMEGACLAW_GIT_TOKEN not set") + pytest.skip("OMEGA_GIT_TOKEN not set") remote = get_git_remote() api = _api_base(remote) branch = f"qa/run-{int(time.time())}-mock" @@ -84,7 +84,7 @@ def test_git_push_to_remote_telegram_mock(llm, tg): c.ok("pre-create dir", TARGET_DIR) unique_file = f"qa-run-{c.run_id}.txt" - marker = f"omegaclaw push run {c.run_id}" + marker = f"omega push run {c.run_id}" c.add_cleanup_marker(marker) start_ts = int(time.time()) - 1 diff --git a/Autotests/mock_telegram/test_memory_chromadb_telegram_mock.py b/Autotests/mock_telegram/test_memory_chromadb_telegram_mock.py index bf15732e..94f1978c 100644 --- a/Autotests/mock_telegram/test_memory_chromadb_telegram_mock.py +++ b/Autotests/mock_telegram/test_memory_chromadb_telegram_mock.py @@ -41,7 +41,7 @@ def chromadb_vector_count(): def test_memory_chromadb_telegram_mock(llm, tg): with Checker("chromadb vector write (telegram mock)") as c: - print(f"\n=== OmegaClaw: chromadb telegram mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: chromadb telegram mock (run-id {c.run_id}) ===", flush=True) c.step("count chromadb vectors before") diff --git a/Autotests/mock_telegram/test_memory_episode_telegram_mock.py b/Autotests/mock_telegram/test_memory_episode_telegram_mock.py index 1f28dd8b..fe5df789 100644 --- a/Autotests/mock_telegram/test_memory_episode_telegram_mock.py +++ b/Autotests/mock_telegram/test_memory_episode_telegram_mock.py @@ -28,7 +28,7 @@ def test_memory_episode_telegram_mock(llm, tg): with Checker("memory episode recall (telegram mock)") as c: - print(f"\n=== OmegaClaw: memory episode telegram mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: memory episode telegram mock (run-id {c.run_id}) ===", flush=True) c.add_cleanup_marker("Barney") diff --git a/Autotests/mock_telegram/test_memory_history_telegram_mock.py b/Autotests/mock_telegram/test_memory_history_telegram_mock.py index 095f95c1..37ce0d26 100644 --- a/Autotests/mock_telegram/test_memory_history_telegram_mock.py +++ b/Autotests/mock_telegram/test_memory_history_telegram_mock.py @@ -21,7 +21,7 @@ def test_memory_history_telegram_mock(llm, tg): with Checker("history append (telegram mock)") as c: - print(f"\n=== OmegaClaw: history append telegram mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: history append telegram mock (run-id {c.run_id}) ===", flush=True) c.step("capture initial history state") diff --git a/Autotests/mock_telegram/test_run_create_dirs_telegram_mock.py b/Autotests/mock_telegram/test_run_create_dirs_telegram_mock.py index 79b2baaf..ef1a3031 100644 --- a/Autotests/mock_telegram/test_run_create_dirs_telegram_mock.py +++ b/Autotests/mock_telegram/test_run_create_dirs_telegram_mock.py @@ -26,7 +26,7 @@ def test_run_create_dirs_telegram_mock(llm, tg): with Checker("create dirs script (telegram mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: create dirs telegram mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: create dirs telegram mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_telegram/test_run_error_script_telegram_mock.py b/Autotests/mock_telegram/test_run_error_script_telegram_mock.py index 521f8cf3..6ffd2427 100644 --- a/Autotests/mock_telegram/test_run_error_script_telegram_mock.py +++ b/Autotests/mock_telegram/test_run_error_script_telegram_mock.py @@ -29,7 +29,7 @@ def test_run_error_script_telegram_mock(llm, tg): with Checker("run error script (telegram mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: error script telegram mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: error script telegram mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_telegram/test_run_repeated_telegram_mock.py b/Autotests/mock_telegram/test_run_repeated_telegram_mock.py index e20b43ab..9f09b498 100644 --- a/Autotests/mock_telegram/test_run_repeated_telegram_mock.py +++ b/Autotests/mock_telegram/test_run_repeated_telegram_mock.py @@ -25,7 +25,7 @@ def test_run_repeated_telegram_mock(llm, tg): with Checker("run repeated script (telegram mock)", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: run 10x telegram mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: run 10x telegram mock (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/mock_telegram/test_search_basic_telegram_mock.py b/Autotests/mock_telegram/test_search_basic_telegram_mock.py index 74178abb..c5e26602 100644 --- a/Autotests/mock_telegram/test_search_basic_telegram_mock.py +++ b/Autotests/mock_telegram/test_search_basic_telegram_mock.py @@ -29,7 +29,7 @@ def test_search_basic_telegram_mock(llm, tg): with Checker("search singularitynet (telegram mock)") as c: - print(f"\n=== OmegaClaw: basic search telegram mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: basic search telegram mock (run-id {c.run_id}) ===", flush=True) c.step("send prompt via Telegram with mocked send response") diff --git a/Autotests/mock_telegram/test_search_invalid_telegram_mock.py b/Autotests/mock_telegram/test_search_invalid_telegram_mock.py index 01e81203..11ba219a 100644 --- a/Autotests/mock_telegram/test_search_invalid_telegram_mock.py +++ b/Autotests/mock_telegram/test_search_invalid_telegram_mock.py @@ -32,7 +32,7 @@ def test_search_invalid_telegram_mock(llm, tg): with Checker("search invalid (telegram mock)") as c: - print(f"\n=== OmegaClaw: invalid search telegram mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: invalid search telegram mock (run-id {c.run_id}) ===", flush=True) c.step("send prompt via Telegram with mocked negation response") diff --git a/Autotests/mock_telegram/test_search_weather_telegram_mock.py b/Autotests/mock_telegram/test_search_weather_telegram_mock.py index 0b5caca2..bde7611e 100644 --- a/Autotests/mock_telegram/test_search_weather_telegram_mock.py +++ b/Autotests/mock_telegram/test_search_weather_telegram_mock.py @@ -22,7 +22,7 @@ def test_search_weather_telegram_mock(llm, tg): with Checker("search weather valencia (telegram mock)") as c: - print(f"\n=== OmegaClaw: Valencia weather telegram mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: Valencia weather telegram mock (run-id {c.run_id}) ===", flush=True) c.step("send prompt via Telegram with mocked send response") diff --git a/Autotests/mock_telegram/test_skill_episodes_telegram_mock.py b/Autotests/mock_telegram/test_skill_episodes_telegram_mock.py index d0c2a824..89ea3ed2 100644 --- a/Autotests/mock_telegram/test_skill_episodes_telegram_mock.py +++ b/Autotests/mock_telegram/test_skill_episodes_telegram_mock.py @@ -25,7 +25,7 @@ def test_skill_episodes_telegram_mock(llm, tg): with Checker("episodes skill recall (telegram mock)") as c: - print(f"\n=== OmegaClaw: episodes telegram mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: episodes telegram mock (run-id {c.run_id}) ===", flush=True) marker = f"BEACON-{c.run_id}" diff --git a/Autotests/mock_telegram/test_skill_metta_telegram_mock.py b/Autotests/mock_telegram/test_skill_metta_telegram_mock.py index 355bc4cc..d627f2fa 100644 --- a/Autotests/mock_telegram/test_skill_metta_telegram_mock.py +++ b/Autotests/mock_telegram/test_skill_metta_telegram_mock.py @@ -19,7 +19,7 @@ def test_skill_metta_telegram_mock(llm, tg): with Checker("metta skill invocation (telegram mock)") as c: - print(f"\n=== OmegaClaw: metta telegram mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: metta telegram mock (run-id {c.run_id}) ===", flush=True) c.step("send prompt via Telegram with mocked metta + send response") diff --git a/Autotests/mock_telegram/test_skill_pin_telegram_mock.py b/Autotests/mock_telegram/test_skill_pin_telegram_mock.py index 239349a4..52876ce5 100644 --- a/Autotests/mock_telegram/test_skill_pin_telegram_mock.py +++ b/Autotests/mock_telegram/test_skill_pin_telegram_mock.py @@ -18,7 +18,7 @@ def test_skill_pin_telegram_mock(llm, tg): with Checker("pin skill invocation (telegram mock)") as c: - print(f"\n=== OmegaClaw: pin telegram mock (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: pin telegram mock (run-id {c.run_id}) ===", flush=True) c.step("send prompt with mocked pin + send response") prompt = make_prompt( diff --git a/Autotests/mock_telegram/test_skill_query_telegram_mock.py b/Autotests/mock_telegram/test_skill_query_telegram_mock.py index 1b0f3f3f..aafb8140 100644 --- a/Autotests/mock_telegram/test_skill_query_telegram_mock.py +++ b/Autotests/mock_telegram/test_skill_query_telegram_mock.py @@ -23,7 +23,7 @@ def test_skill_query_telegram_mock(llm, tg): with Checker("query skill recall (telegram mock)") as c: - print(f"\n=== OmegaClaw: query telegram mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: query telegram mock (run-id {c.run_id}) ===", flush=True) secret_color = f"azure-{c.run_id}" diff --git a/Autotests/mock_websocket/README.md b/Autotests/mock_websocket/README.md index f652c492..b54e64ef 100644 --- a/Autotests/mock_websocket/README.md +++ b/Autotests/mock_websocket/README.md @@ -18,7 +18,7 @@ For the LLM-mock harness shared with this suite see `Autotests/mock/README.md`. ## 2. Build the local image ``` -docker build -t omegaclaw:mock . +docker build -t omega:mock . ``` ## 3. Start the container on the websocket channel with the Test provider @@ -31,7 +31,7 @@ match the bearer token the mock server checks (`test-token`). ``` env WS_URL=ws://172.17.0.1:8770 WS_TOKEN=test-token TEST_SERVER_IP=172.17.0.1 \ - ./scripts/omegaclaw start -s 0000 -p Test -t websocket -d omegaclaw:mock + ./scripts/omega start -s 0000 -p Test -t websocket -d omega:mock ``` Notes: @@ -40,27 +40,27 @@ Notes: the container. - `-p Test` selects the mock LLM dispatcher; `TEST_SERVER_IP` is the host's docker-bridge address used to reach the mock LLM controller. -- The container is created with the name `omegaclaw` (the script default). +- The container is created with the name `omega` (the script default). The agent reconnects with backoff until the mock server is up, so the container can be started before or after the pytest session. Wait until the agent loop is running: ``` -until docker logs omegaclaw 2>&1 | grep -qE "CHARS_SENT: [0-9]+"; do sleep 2; done +until docker logs omega 2>&1 | grep -qE "CHARS_SENT: [0-9]+"; do sleep 2; done ``` ## 4. Configure the test environment ``` -export OMEGACLAW_CONTAINER=omegaclaw +export OMEGA_CONTAINER=omega export WS_MOCK_PORT=8770 # must match the WS_URL port used in step 3 export WS_TOKEN=test-token # must match step 3 ``` | Variable | Required | Description | |---|---|---| -| `OMEGACLAW_CONTAINER` | Yes | Container name passed to `docker exec`. | +| `OMEGA_CONTAINER` | Yes | Container name passed to `docker exec`. | | `WS_MOCK_PORT` | No | Port the mock WS server binds (default `8770`). Must match the `WS_URL` port. | | `WS_TOKEN` | No | Bearer token the mock server requires (default `test-token`). Must match the container's `WS_TOKEN`. | @@ -100,7 +100,7 @@ per session. ## 6. Tear down ``` -./scripts/omegaclaw clean +./scripts/omega clean ``` # Tests description diff --git a/Autotests/mock_websocket/test_create_file_ws_mock.py b/Autotests/mock_websocket/test_create_file_ws_mock.py index df5e69d9..90a8e7c4 100644 --- a/Autotests/mock_websocket/test_create_file_ws_mock.py +++ b/Autotests/mock_websocket/test_create_file_ws_mock.py @@ -1,5 +1,5 @@ """ -WebSocket variant of test_create_file: OmegaClaw creates hello.txt with content +WebSocket variant of test_create_file: Omega creates hello.txt with content "Hello" in /tmp/testcat. Skill smoke over the WebSocket transport. Run: @@ -20,7 +20,7 @@ def test_hello_file_ws_mock(llm, ws): with Checker("create hello.txt", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw smoke test (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega smoke test (run-id {c.run_id}) ===", flush=True) c.step("wait for agent WebSocket connection") if not ws.wait_for_connection(timeout=60): diff --git a/Autotests/mock_websocket/test_memory_chromadb_ws_mock.py b/Autotests/mock_websocket/test_memory_chromadb_ws_mock.py index decaa6b5..bbf20cea 100644 --- a/Autotests/mock_websocket/test_memory_chromadb_ws_mock.py +++ b/Autotests/mock_websocket/test_memory_chromadb_ws_mock.py @@ -37,7 +37,7 @@ def chromadb_vector_count(): def test_memory_chromadb_ws_mock(llm, ws): with Checker("chromadb vector write (ws mock)") as c: - print(f"\n=== OmegaClaw: chromadb ws mock (run-id {c.run_id}) ===", + print(f"\n=== Omega: chromadb ws mock (run-id {c.run_id}) ===", flush=True) c.step("wait for agent WebSocket connection") diff --git a/Autotests/mock_websocket/test_ws_delivery_ws_mock.py b/Autotests/mock_websocket/test_ws_delivery_ws_mock.py index fd67ca4a..db20314e 100644 --- a/Autotests/mock_websocket/test_ws_delivery_ws_mock.py +++ b/Autotests/mock_websocket/test_ws_delivery_ws_mock.py @@ -35,7 +35,7 @@ def _wait_for_reply(ws, needle, timeout): def test_ws_delivery_ws_mock(llm, ws): with Checker("ws delivery round-trip") as c: - print(f"\n=== OmegaClaw: ws delivery (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: ws delivery (run-id {c.run_id}) ===", flush=True) c.step("wait for agent WebSocket connection") if not ws.wait_for_connection(timeout=60): diff --git a/Autotests/mock_websocket/test_ws_frame_robustness_ws_mock.py b/Autotests/mock_websocket/test_ws_frame_robustness_ws_mock.py index f25b0fa1..3639ad2f 100644 --- a/Autotests/mock_websocket/test_ws_frame_robustness_ws_mock.py +++ b/Autotests/mock_websocket/test_ws_frame_robustness_ws_mock.py @@ -27,7 +27,7 @@ def _wait_for_reply(ws, needle, timeout): def test_ws_frame_robustness_ws_mock(llm, ws): with Checker("ws frame robustness") as c: - print(f"\n=== OmegaClaw: ws frame robustness (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: ws frame robustness (run-id {c.run_id}) ===", flush=True) c.step("wait for agent WebSocket connection") if not ws.wait_for_connection(timeout=60): diff --git a/Autotests/mock_websocket/test_ws_outbox_flush_ws_mock.py b/Autotests/mock_websocket/test_ws_outbox_flush_ws_mock.py index 619a58ed..927c9bfb 100644 --- a/Autotests/mock_websocket/test_ws_outbox_flush_ws_mock.py +++ b/Autotests/mock_websocket/test_ws_outbox_flush_ws_mock.py @@ -20,7 +20,7 @@ def test_ws_outbox_flush_ws_mock(llm, ws): with Checker("ws outbox flush after reconnect") as c: - print(f"\n=== OmegaClaw: ws outbox flush (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: ws outbox flush (run-id {c.run_id}) ===", flush=True) c.step("wait for agent WebSocket connection") if not ws.wait_for_connection(timeout=60): diff --git a/Autotests/mock_websocket/test_ws_queue_merge_ws_mock.py b/Autotests/mock_websocket/test_ws_queue_merge_ws_mock.py index 68ed261b..e04483e5 100644 --- a/Autotests/mock_websocket/test_ws_queue_merge_ws_mock.py +++ b/Autotests/mock_websocket/test_ws_queue_merge_ws_mock.py @@ -26,7 +26,7 @@ def _wait_for_reply(ws, needle, timeout): def test_ws_queue_merge_ws_mock(llm, ws): with Checker("ws queue merge A | B | C") as c: - print(f"\n=== OmegaClaw: ws queue merge (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: ws queue merge (run-id {c.run_id}) ===", flush=True) c.step("wait for agent WebSocket connection") if not ws.wait_for_connection(timeout=60): diff --git a/Autotests/mock_websocket/test_ws_resume_dedup_ws_mock.py b/Autotests/mock_websocket/test_ws_resume_dedup_ws_mock.py index de86438f..4c241dfe 100644 --- a/Autotests/mock_websocket/test_ws_resume_dedup_ws_mock.py +++ b/Autotests/mock_websocket/test_ws_resume_dedup_ws_mock.py @@ -30,7 +30,7 @@ def _wait_for_reply(ws, needle, timeout): def test_ws_resume_dedup_ws_mock(llm, ws): with Checker("ws resume + dedup") as c: - print(f"\n=== OmegaClaw: ws resume dedup (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: ws resume dedup (run-id {c.run_id}) ===", flush=True) c.step("wait for agent WebSocket connection") if not ws.wait_for_connection(timeout=60): diff --git a/Autotests/test_convert_format.py b/Autotests/test_convert_format.py index b5119b9c..cbcf5613 100644 --- a/Autotests/test_convert_format.py +++ b/Autotests/test_convert_format.py @@ -1,5 +1,5 @@ """ -Test: OmegaClaw converts a .md file to .txt preserving content. +Test: Omega converts a .md file to .txt preserving content. Run: pytest test_convert_format.py -s @@ -20,7 +20,7 @@ def test_convert_md_to_txt(): with Checker("convert .md to .txt", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: convert format (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: convert format (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/test_create_empty_file.py b/Autotests/test_create_empty_file.py index 6f9a1712..6c9ab120 100644 --- a/Autotests/test_create_empty_file.py +++ b/Autotests/test_create_empty_file.py @@ -1,5 +1,5 @@ """ -Test: OmegaClaw creates an empty file hello.txt. +Test: Omega creates an empty file hello.txt. Run: pytest test_create_empty_file.py -s @@ -16,7 +16,7 @@ def test_create_empty_file(): with Checker("create empty file", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: create empty file (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: create empty file (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/test_create_file.py b/Autotests/test_create_file.py index 14074648..b141ced5 100644 --- a/Autotests/test_create_file.py +++ b/Autotests/test_create_file.py @@ -1,5 +1,5 @@ """ -Test: OmegaClaw creates hello.txt with content "Hello" in /tmp/testcat. +Test: Omega creates hello.txt with content "Hello" in /tmp/testcat. Run: pytest test_create_file.py -s @@ -17,7 +17,7 @@ def test_hello_file(): with Checker("create hello.txt", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw smoke test (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega smoke test (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/test_create_script.py b/Autotests/test_create_script.py index 204e60e6..af9e3c27 100644 --- a/Autotests/test_create_script.py +++ b/Autotests/test_create_script.py @@ -1,5 +1,5 @@ """ -Test: OmegaClaw creates date.sh that prints the current date. +Test: Omega creates date.sh that prints the current date. Run: pytest test_create_script.py -s @@ -25,7 +25,7 @@ def _current_year_strs(): def test_create_date_script(): with Checker("create date.sh", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: create date.sh (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: create date.sh (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/test_edit_add_timestamp.py b/Autotests/test_edit_add_timestamp.py index c9423ffd..67fb513e 100644 --- a/Autotests/test_edit_add_timestamp.py +++ b/Autotests/test_edit_add_timestamp.py @@ -1,5 +1,5 @@ """ -Test: OmegaClaw adds a timestamp to an existing note.txt file. +Test: Omega adds a timestamp to an existing note.txt file. Run: pytest test_edit_add_timestamp.py -s @@ -17,7 +17,7 @@ def test_edit_add_timestamp(): with Checker("edit add timestamp", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: add timestamp (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: add timestamp (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/test_edit_append_line.py b/Autotests/test_edit_append_line.py index d59984cb..32832e60 100644 --- a/Autotests/test_edit_append_line.py +++ b/Autotests/test_edit_append_line.py @@ -1,5 +1,5 @@ """ -Test: OmegaClaw appends a 4th line to a 3-line file. +Test: Omega appends a 4th line to a 3-line file. Run: pytest test_edit_append_line.py -s @@ -20,7 +20,7 @@ def test_edit_append_line(): with Checker("edit append line", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: append line (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: append line (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/test_edit_delete_line.py b/Autotests/test_edit_delete_line.py index adccf2ca..0ecaa467 100644 --- a/Autotests/test_edit_delete_line.py +++ b/Autotests/test_edit_delete_line.py @@ -1,5 +1,5 @@ """ -Test: OmegaClaw deletes the second line from a 3-line file. +Test: Omega deletes the second line from a 3-line file. Run: pytest test_edit_delete_line.py -s @@ -19,7 +19,7 @@ def test_edit_delete_line(): with Checker("edit delete line", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: delete second line (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: delete second line (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/test_git_local_commit.py b/Autotests/test_git_local_commit.py index f7e469d9..7e4655c7 100644 --- a/Autotests/test_git_local_commit.py +++ b/Autotests/test_git_local_commit.py @@ -27,7 +27,7 @@ def test_git_local_commit(): c.ok("git setup") start_ts = int(time.time()) - 1 - marker = f"omegaclaw run {c.run_id}" + marker = f"omega run {c.run_id}" c.add_cleanup_marker(marker) c.step("send prompt via IRC") diff --git a/Autotests/test_git_push_to_remote.py b/Autotests/test_git_push_to_remote.py index 700eff80..5c2a4b00 100644 --- a/Autotests/test_git_push_to_remote.py +++ b/Autotests/test_git_push_to_remote.py @@ -1,7 +1,7 @@ """Agent clones a remote, adds a unique file, commits and pushes. -Needs OMEGACLAW_GIT_TOKEN (skipped otherwise). -Optionally OMEGACLAW_GIT_REMOTE — defaults to OmegaSing/Test-Repopo. +Needs OMEGA_GIT_TOKEN (skipped otherwise). +Optionally OMEGA_GIT_REMOTE — defaults to OmegaSing/Test-Repopo. """ import json import time @@ -49,7 +49,7 @@ def _api_base(remote_url): def test_git_push_to_remote(): token = get_git_token() if not token: - pytest.skip("OMEGACLAW_GIT_TOKEN not set") + pytest.skip("OMEGA_GIT_TOKEN not set") remote = get_git_remote() api = _api_base(remote) branch = f"qa/run-{int(time.time())}" @@ -71,7 +71,7 @@ def test_git_push_to_remote(): c.ok("pre-create dir", TARGET_DIR) unique_file = f"qa-run-{c.run_id}.txt" - marker = f"omegaclaw push run {c.run_id}" + marker = f"omega push run {c.run_id}" c.add_cleanup_marker(marker) start_ts = int(time.time()) - 1 diff --git a/Autotests/test_memory_chromadb.py b/Autotests/test_memory_chromadb.py index f9773bbf..e355529a 100644 --- a/Autotests/test_memory_chromadb.py +++ b/Autotests/test_memory_chromadb.py @@ -35,7 +35,7 @@ def chromadb_vector_count(): def test_memory_chromadb(): with Checker("chromadb vector write") as c: - print(f"\n=== OmegaClaw: chromadb write (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: chromadb write (run-id {c.run_id}) ===", flush=True) c.step("count chromadb vectors before") count_before = chromadb_vector_count() diff --git a/Autotests/test_memory_episode.py b/Autotests/test_memory_episode.py index 6e393806..dfe96a28 100644 --- a/Autotests/test_memory_episode.py +++ b/Autotests/test_memory_episode.py @@ -79,7 +79,7 @@ def _date_candidates(record_time): def test_memory_episode(): with Checker("memory episode recall") as c: - print(f"\n=== OmegaClaw: memory episode (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: memory episode (run-id {c.run_id}) ===", flush=True) c.step("send 'dog lost tooth' fact message") fact_marker = c.run_id diff --git a/Autotests/test_memory_history.py b/Autotests/test_memory_history.py index 0b30850e..fabe5219 100644 --- a/Autotests/test_memory_history.py +++ b/Autotests/test_memory_history.py @@ -21,7 +21,7 @@ def test_memory_history(): with Checker("history append") as c: - print(f"\n=== OmegaClaw: history append (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: history append (run-id {c.run_id}) ===", flush=True) c.step("capture initial history state") mtime_before = get_mtime(HISTORY_FILE) diff --git a/Autotests/test_memory_no_autoremember.py b/Autotests/test_memory_no_autoremember.py index 21303990..bc7aff7b 100644 --- a/Autotests/test_memory_no_autoremember.py +++ b/Autotests/test_memory_no_autoremember.py @@ -56,7 +56,7 @@ def chromadb_vector_count(): def test_memory_no_autoremember(): with Checker("HUMAN_MESSAGE does NOT autopromote to ChromaDB (live)") as c: - print(f"\n=== OmegaClaw: no-autoremember live (run-id {c.run_id}) ===", + print(f"\n=== Omega: no-autoremember live (run-id {c.run_id}) ===", flush=True) fact_marker = f"azure-{c.run_id}" diff --git a/Autotests/test_run_error_script.py b/Autotests/test_run_error_script.py index d2d30192..acc72a9c 100644 --- a/Autotests/test_run_error_script.py +++ b/Autotests/test_run_error_script.py @@ -1,5 +1,5 @@ """ -Test: OmegaClaw runs a script with a syntax error and reports the error. +Test: Omega runs a script with a syntax error and reports the error. Run: pytest test_run_error_script.py -s @@ -29,7 +29,7 @@ def test_run_error_script(): with Checker("run error script", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: error script (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: error script (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/test_run_repeated.py b/Autotests/test_run_repeated.py index 3c331f98..164fb415 100644 --- a/Autotests/test_run_repeated.py +++ b/Autotests/test_run_repeated.py @@ -1,5 +1,5 @@ """ -Test: OmegaClaw runs dateupdate.sh 10 times, producing 10 lines in update.txt. +Test: Omega runs dateupdate.sh 10 times, producing 10 lines in update.txt. Graded 0/1/2: weaker models occasionally interpret "run 10 times" as a single invocation (treating the script as a loop) and stop after one @@ -32,7 +32,7 @@ def _line_count(): def test_run_repeated(): with Checker("run repeated script", cleanup_dirs=[TARGET_DIR]) as c: - print(f"\n=== OmegaClaw: run 10x (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: run 10x (run-id {c.run_id}) ===", flush=True) c.verify_clean() diff --git a/Autotests/test_search_basic.py b/Autotests/test_search_basic.py index 049d9d90..bcc771f4 100644 --- a/Autotests/test_search_basic.py +++ b/Autotests/test_search_basic.py @@ -1,5 +1,5 @@ """ -Test: OmegaClaw invokes (search ...) for "SingularityNet" and gets relevant info. +Test: Omega invokes (search ...) for "SingularityNet" and gets relevant info. Run: pytest test_search_basic.py -s @@ -14,7 +14,7 @@ def test_search_basic(): with Checker("search singularitynet") as c: - print(f"\n=== OmegaClaw: basic search (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: basic search (run-id {c.run_id}) ===", flush=True) c.step("send prompt via IRC") prompt = make_prompt( diff --git a/Autotests/test_search_invalid.py b/Autotests/test_search_invalid.py index 5eb9d310..01ef96a7 100644 --- a/Autotests/test_search_invalid.py +++ b/Autotests/test_search_invalid.py @@ -1,5 +1,5 @@ """ -Test: OmegaClaw invokes (search ...) for gibberish and reports no results. +Test: Omega invokes (search ...) for gibberish and reports no results. Run: pytest test_search_invalid.py -s @@ -15,7 +15,7 @@ def test_search_invalid(): with Checker("search invalid") as c: - print(f"\n=== OmegaClaw: invalid search (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: invalid search (run-id {c.run_id}) ===", flush=True) c.step("send prompt via IRC") prompt = make_prompt( diff --git a/Autotests/test_skill_episodes.py b/Autotests/test_skill_episodes.py index beed7281..c9103403 100644 --- a/Autotests/test_skill_episodes.py +++ b/Autotests/test_skill_episodes.py @@ -25,7 +25,7 @@ def test_skill_episodes(): with Checker("episodes skill recall") as c: - print(f"\n=== OmegaClaw: episodes skill (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: episodes skill (run-id {c.run_id}) ===", flush=True) marker = f"BEACON-{c.run_id}" c.add_cleanup_marker(marker) diff --git a/Autotests/test_skill_metta.py b/Autotests/test_skill_metta.py index 1e5d9c06..91b29dee 100644 --- a/Autotests/test_skill_metta.py +++ b/Autotests/test_skill_metta.py @@ -30,7 +30,7 @@ def test_skill_metta(): with Checker("metta skill invocation") as c: - print(f"\n=== OmegaClaw: metta skill (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: metta skill (run-id {c.run_id}) ===", flush=True) c.step("send prompt asking agent to use metta skill") prompt = make_prompt( diff --git a/Autotests/test_skill_pin.py b/Autotests/test_skill_pin.py index 4730601f..204a5f3b 100644 --- a/Autotests/test_skill_pin.py +++ b/Autotests/test_skill_pin.py @@ -25,7 +25,7 @@ def test_skill_pin(): with Checker("pin skill invocation") as c: - print(f"\n=== OmegaClaw: pin skill (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: pin skill (run-id {c.run_id}) ===", flush=True) c.step("send a multi-step task that needs pinning") prompt = make_prompt( diff --git a/Autotests/test_skill_query.py b/Autotests/test_skill_query.py index e520d4ed..23e57c1d 100644 --- a/Autotests/test_skill_query.py +++ b/Autotests/test_skill_query.py @@ -22,7 +22,7 @@ def test_skill_query(): with Checker("query skill recall") as c: - print(f"\n=== OmegaClaw: query skill (run-id {c.run_id}) ===", flush=True) + print(f"\n=== Omega: query skill (run-id {c.run_id}) ===", flush=True) secret_color = f"azure-{c.run_id}" c.add_cleanup_marker(secret_color) diff --git a/Autotests/test_websearch_smoke.py b/Autotests/test_websearch_smoke.py index 3a655457..5ed4ca09 100644 --- a/Autotests/test_websearch_smoke.py +++ b/Autotests/test_websearch_smoke.py @@ -12,7 +12,7 @@ def test_websearch_returns_results(): code = ( "import os, sys;" - "sys.path.insert(0, os.path.join(os.environ['OMEGACLAW_DIR'], 'src'));" + "sys.path.insert(0, os.path.join(os.environ['OMEGA_DIR'], 'src'));" "import websearch;" "print('COUNT', len(websearch.search_('test')))" ) diff --git a/Autotests/unit/test_openclaw_unit.py b/Autotests/unit/test_openclaw_unit.py index c694c039..7239bc19 100644 --- a/Autotests/unit/test_openclaw_unit.py +++ b/Autotests/unit/test_openclaw_unit.py @@ -226,7 +226,7 @@ def test_endpoint_rewrites_websocket_schemes(oc): def test_request_target_prefers_the_proxy_and_sends_no_token(oc, monkeypatch): monkeypatch.setattr(oc, "config_get_by_key", lambda key, default=None: "http://localhost:8080/") - monkeypatch.setenv("OMEGACLAW_OPENCLAW_TOKEN", "must-not-be-used") + monkeypatch.setenv("OMEGA_OPENCLAW_TOKEN", "must-not-be-used") url, headers = oc._request_target("http://gw:18789") assert url == "http://localhost:8080/openclaw" + oc.RESPONSES_PATH assert headers == {} @@ -234,7 +234,7 @@ def test_request_target_prefers_the_proxy_and_sends_no_token(oc, monkeypatch): def test_request_target_falls_back_to_a_direct_call_with_the_token(oc, monkeypatch): monkeypatch.setattr(oc, "config_get_by_key", lambda key, default=None: None) - monkeypatch.setenv("OMEGACLAW_OPENCLAW_TOKEN", "s3cret") + monkeypatch.setenv("OMEGA_OPENCLAW_TOKEN", "s3cret") url, headers = oc._request_target("http://gw:18789") assert url == "http://gw:18789" + oc.RESPONSES_PATH assert headers == {"Authorization": "Bearer s3cret"} @@ -242,7 +242,7 @@ def test_request_target_falls_back_to_a_direct_call_with_the_token(oc, monkeypat def test_request_target_refuses_when_it_cannot_authenticate(oc, monkeypatch): monkeypatch.setattr(oc, "config_get_by_key", lambda key, default=None: None) - monkeypatch.setenv("OMEGACLAW_OPENCLAW_TOKEN", " ") + monkeypatch.setenv("OMEGA_OPENCLAW_TOKEN", " ") with pytest.raises(oc.OpenClawError): oc._request_target("http://gw:18789") diff --git a/Dockerfile b/Dockerfile index d297c58c..ded48a6f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -71,16 +71,16 @@ PY FROM builder AS versioned-source -WORKDIR /omegaclaw-source +WORKDIR /omega-source COPY . . -RUN : > /tmp/omegaclaw-ignored-tracked \ +RUN : > /tmp/omega-ignored-tracked \ && if [ -e .git ] && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then \ - git ls-files -ci --exclude-from=.dockerignore -z > /tmp/omegaclaw-ignored-tracked; \ - git checkout-index --force --stdin -z < /tmp/omegaclaw-ignored-tracked; \ + git ls-files -ci --exclude-from=.dockerignore -z > /tmp/omega-ignored-tracked; \ + git checkout-index --force --stdin -z < /tmp/omega-ignored-tracked; \ fi \ - && python3 -c 'from src.helper import omegaclaw_version; print(omegaclaw_version())' > /tmp/omegaclaw-version \ - && mv /tmp/omegaclaw-version ./version \ - && while IFS= read -r -d '' path; do rm -f -- "$path"; done < /tmp/omegaclaw-ignored-tracked \ + && python3 -c 'from src.helper import omega_version; print(omega_version())' > /tmp/omega-version \ + && mv /tmp/omega-version ./version \ + && while IFS= read -r -d '' path; do rm -f -- "$path"; done < /tmp/omega-ignored-tracked \ && rm -rf ./.git \ && chmod 0444 ./version @@ -124,24 +124,24 @@ RUN chown www-data:www-data /opt/nginx RUN chmod 0700 /opt/nginx COPY --chown=www-data:www-data --chmod=0600 ./proxy/* /opt/nginx/ -ENV OMEGACLAW_DIR=/PeTTa/repos/OmegaClaw-Core -ENV MEMORY_DIR=${OMEGACLAW_DIR}/memory +ENV OMEGA_DIR=/PeTTa/repos/Omega +ENV MEMORY_DIR=${OMEGA_DIR}/memory # Start defaults for import-kb ENV IMPORT_KB_ON_START=0 # Bring in the clean source tree and its version generated from Git metadata. -COPY --from=versioned-source /omegaclaw-source ${OMEGACLAW_DIR} +COPY --from=versioned-source /omega-source ${OMEGA_DIR} -RUN cp ${OMEGACLAW_DIR}/run.metta /PeTTa/run.metta \ +RUN cp ${OMEGA_DIR}/run.metta /PeTTa/run.metta \ && mkdir -p ${MEMORY_DIR}/chroma_db \ && ln -s ${MEMORY_DIR}/chroma_db ./chroma_db \ - && chmod +x ${OMEGACLAW_DIR}/entrypoint.sh \ - && chmod +x ${OMEGACLAW_DIR}/scripts/import_knowledge.sh \ - && chmod +x ${OMEGACLAW_DIR}/scripts/omegaclaw \ + && chmod +x ${OMEGA_DIR}/entrypoint.sh \ + && chmod +x ${OMEGA_DIR}/scripts/import_knowledge.sh \ + && chmod +x ${OMEGA_DIR}/scripts/omega \ && chown -R 65534:65534 ${MEMORY_DIR} \ && find ${MEMORY_DIR} -type f -exec chmod 0644 {} \; \ && chmod 0444 ${MEMORY_DIR}/prompt.txt \ && chown -R 65534:65534 /opt/huggingface /opt/sentence_transformers -ENTRYPOINT ["/PeTTa/repos/OmegaClaw-Core/entrypoint.sh"] +ENTRYPOINT ["/PeTTa/repos/Omega/entrypoint.sh"] CMD [] diff --git a/README.md b/README.md index 44ba26f0..650cf214 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -![OmegaClaw banner](/docs/assets/banner.png) +![Omega banner](/docs/assets/banner.png) # Meet Oma -Oma is the first Telegram agent built on the OmegaClaw framework. Interacting -with Oma is the fastest way to experience what we’re building with OmegaClaw. +Oma is the first Telegram agent built on the Omega framework. Interacting +with Oma is the fastest way to experience what we’re building with Omega.

@@ -15,16 +15,16 @@ with Oma is the fastest way to experience what we’re building with OmegaClaw. ## Overview -OmegaClaw is a neural-symbolic agent framework built on the Hyperon AGI stack. +Omega is a neural-symbolic agent framework built on the Hyperon AGI stack. It unifies large language models with a formal symbolic layer to create a stateful cognitive architecture capable of auditable inference, autonomous self-improvement, and long-term persistence. -Unlike reactive, session-based agents, OmegaClaw operates in a continuous +Unlike reactive, session-based agents, Omega operates in a continuous execution loop, managing its own goals and providing auditable proof trails for its reasoning. -The primary design criteria for OmegaClaw were simplicity, ease of extension, +The primary design criteria for Omega were simplicity, ease of extension, and transparent implementation. This results in a minimalist MeTTa-based core of approximately 200 lines of code. @@ -41,14 +41,14 @@ sudo apt-get install git python3 python3-dev python3-pip python3-venv build-esse Get [SWI-Prolog 10.0.2 or later](https://www.swi-prolog.org/). -Install OmegaClaw: +Install Omega: ``` git clone https://github.com/trueagi-io/PeTTa cd PeTTa mkdir -p repos -git clone https://github.com/asi-alliance/OmegaClaw-Core.git repos/OmegaClaw-Core +git clone https://github.com/singnet/Omega.git repos/Omega git clone https://github.com/patham9/petta_lib_chromadb.git repos/petta_lib_chromadb -cp repos/OmegaClaw-Core/run.metta ./ +cp repos/Omega/run.metta ./ ``` Setup Python virtual environment (or use your own): @@ -64,37 +64,37 @@ python3 -m pip install --index-url https://download.pytorch.org/whl/cpu torch Install Python dependencies: ``` -python3 -m pip install -r ./repos/OmegaClaw-Core/requirements.txt +python3 -m pip install -r ./repos/Omega/requirements.txt ``` --- -## Run OmegaClaw in Docker +## Run Omega in Docker Ensure that you have [Docker installed](https://docs.docker.com/engine/install/) -Run OmegaClaw using the next command: +Run Omega using the next command: ``` -curl -fsSL https://raw.githubusercontent.com/asi-alliance/OmegaClaw-Core/refs/heads/main/scripts/omegaclaw | bash -s -- singularitynet/omegaclaw:latest +curl -fsSL https://raw.githubusercontent.com/singnet/Omega/refs/heads/main/scripts/omega | bash -s -- singularitynet/omega:latest ``` -To run a specific version of OmegaClaw set version in `TAG` environment variable and run the following command: +To run a specific version of Omega set version in `TAG` environment variable and run the following command: ``` -export TAG=v0.1.17; curl -fsSL https://github.com/asi-alliance/OmegaClaw-Core/raw/refs/tags/$TAG/scripts/omegaclaw | bash -s -- singularitynet/omegaclaw:$TAG +export TAG=; curl -fsSL https://github.com/singnet/Omega/raw/refs/tags/$TAG/scripts/omega | bash -s -- singularitynet/omega:$TAG ``` -To stop the OmegaClaw Docker container: +To stop the Omega Docker container: ``` -docker stop omegaclaw +docker stop omega ``` -To restart the OmegaClaw Docker container: +To restart the Omega Docker container: ``` -docker start omegaclaw +docker start omega ``` -To reset OmegaClaw's memory: +To reset Omega's memory: ``` -docker volume rm omegaclaw-memory +docker volume rm omega-memory ``` --- @@ -113,13 +113,13 @@ Before running the system you need to choose your LLM API provider and export th Run the system via the following command which ensures the system is started from the root folder of PeTTa: ``` -OMEGACLAW_AUTH_SECRET= sh run.sh run.metta IRC_channel="" +OMEGA_AUTH_SECRET= sh run.sh run.metta IRC_channel="" ``` After start go to https://webchat.quakenet.org/ to communicate with the agent. Join `` and after agent is joined send `auth ` message to authenticate yourself as an agent owner. Please replace `` and `` by your own values. ### Import Knowledge -If you are running OmegaClaw without Docker and would like to load it with preset knowledge, follow these steps: +If you are running Omega without Docker and would like to load it with preset knowledge, follow these steps: 1. Set EMBEDDING_PROVIDER in your environment. It can be set to either OpenAI or Local. OpenAI embeddings also require OPENAI_API_KEY to be set in your environment. @@ -127,23 +127,23 @@ If you are running OmegaClaw without Docker and would like to load it with prese ``` sh ./import_knowledge.sh ``` -After the script finishes, your OmegaClaw bot will have the preset knowledge stored in its long-term memory (LTM). +After the script finishes, your Omega bot will have the preset knowledge stored in its long-term memory (LTM). If you want to skip preloading the knowledge then run `export IMPORT_KB_ON_START=0` ## Configuration Options These are the following sources of the configuration parameters for the -OmegaClaw agent: +Omega agent: - command line parameters - environment variables - configuration file -OmegaClaw looks for parameters in each of the locations. Command line +Omega looks for parameters in each of the locations. Command line parameters override environment variables which in turn override configuration -file values. Environment variables should be named `OMEGACLAW_` in +file values. Environment variables should be named `OMEGA_` in order to separate them from other variables. For example to override the -default LLM model one can set an `OMEGACLAW_model` environment variable. The full +default LLM model one can set an `OMEGA_model` environment variable. The full list of parameters with descriptions and default values can be found in [default configuration file](/config/config.yaml). @@ -153,7 +153,7 @@ sh run.sh run.metta config= ``` The LLM API keys (see [table above](#usage)) and communication channel tokens -from the table below are passed via environment variables (without `OMEGACLAW_` +from the table below are passed via environment variables (without `OMEGA_` prefix) to prevent agent accessing them. | Environment variable | Meaning | @@ -173,4 +173,4 @@ tutorials, and API reference as a flat set of markdown files. ### Disclaimer -OmegaClaw is experimental, open-source software developed by SingularityNET Foundation, a Swiss foundation, and distributed and promoted by Superintelligence Alliance Ltd., a Singapore company (collectively, the "Parties"), and is provided "AS IS" and "AS AVAILABLE," without warranty of any kind, express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, and non-infringement. OmegaClaw is an autonomous AI agent that is designed to independently set goals, make decisions, and take actions (including actions that the user did not specifically request or anticipate) and whose behavior is influenced by large language models provided by third parties, the outputs of which are inherently non-deterministic. Depending on its configuration and the permissions granted to it, OmegaClaw may execute operating-system shell commands, read, write, modify, or delete files, access network resources, send and receive messages through connected communication channels, and modify its own skills, memory, and operational logic at runtime. OmegaClaw may also be susceptible to prompt injection and other adversarial manipulation techniques whereby malicious content embedded in data sources consumed by the agent could influence its behavior in unintended ways. OmegaClaw supports third-party skills and extensions that have not necessarily been reviewed, audited, or endorsed by either of the Parties and that may introduce security vulnerabilities, cause data loss, or result in unintended behavior including data exfiltration. OmegaClaw relies on third-party services, including large language model providers, whose availability, accuracy, cost, and conduct are outside the control of the Parties and whose use is subject to their respective terms, conditions, and privacy policies. The user is solely responsible for configuring appropriate access controls, sandboxing, and permission boundaries, for monitoring, supervising, and constraining OmegaClaw's actions, for ensuring that no sensitive personal data is exposed to the agent without adequate safeguards, and for all actions taken by OmegaClaw on the user's systems or on the user's behalf, including communications sent and files modified. The user is strongly advised to run OmegaClaw in an isolated environment with the minimum permissions necessary for the intended use case. To the maximum extent permitted by applicable law, in no event shall the Parties, their respective board members, directors, contributors, employees, or affiliates be liable for any direct, indirect, incidental, special, consequential, or exemplary damages (including but not limited to damages for loss of data, loss of profits, business interruption, unauthorized transactions, reputational harm, or any damages arising from the autonomous actions taken by OmegaClaw) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise), even if advised of the possibility of such damages. By downloading, installing, running, or otherwise using OmegaClaw, the user acknowledges that they have read, understood, and agreed to this disclaimer in its entirety. This disclaimer supplements but does not replace the terms of the MIT License under which OmegaClaw is released. +Omega is experimental, open-source software developed by SingularityNET Foundation, a Swiss foundation, and distributed and promoted by Superintelligence Alliance Ltd., a Singapore company (collectively, the "Parties"), and is provided "AS IS" and "AS AVAILABLE," without warranty of any kind, express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, and non-infringement. Omega is an autonomous AI agent that is designed to independently set goals, make decisions, and take actions (including actions that the user did not specifically request or anticipate) and whose behavior is influenced by large language models provided by third parties, the outputs of which are inherently non-deterministic. Depending on its configuration and the permissions granted to it, Omega may execute operating-system shell commands, read, write, modify, or delete files, access network resources, send and receive messages through connected communication channels, and modify its own skills, memory, and operational logic at runtime. Omega may also be susceptible to prompt injection and other adversarial manipulation techniques whereby malicious content embedded in data sources consumed by the agent could influence its behavior in unintended ways. Omega supports third-party skills and extensions that have not necessarily been reviewed, audited, or endorsed by either of the Parties and that may introduce security vulnerabilities, cause data loss, or result in unintended behavior including data exfiltration. Omega relies on third-party services, including large language model providers, whose availability, accuracy, cost, and conduct are outside the control of the Parties and whose use is subject to their respective terms, conditions, and privacy policies. The user is solely responsible for configuring appropriate access controls, sandboxing, and permission boundaries, for monitoring, supervising, and constraining Omega's actions, for ensuring that no sensitive personal data is exposed to the agent without adequate safeguards, and for all actions taken by Omega on the user's systems or on the user's behalf, including communications sent and files modified. The user is strongly advised to run Omega in an isolated environment with the minimum permissions necessary for the intended use case. To the maximum extent permitted by applicable law, in no event shall the Parties, their respective board members, directors, contributors, employees, or affiliates be liable for any direct, indirect, incidental, special, consequential, or exemplary damages (including but not limited to damages for loss of data, loss of profits, business interruption, unauthorized transactions, reputational harm, or any damages arising from the autonomous actions taken by Omega) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise), even if advised of the possibility of such damages. By downloading, installing, running, or otherwise using Omega, the user acknowledges that they have read, understood, and agreed to this disclaimer in its entirety. This disclaimer supplements but does not replace the terms of the Apache License, Version 2.0, under which Omega is released. diff --git a/channels/auth.py b/channels/auth.py index ba27632e..da34d977 100644 --- a/channels/auth.py +++ b/channels/auth.py @@ -27,7 +27,7 @@ def get_proxy_url(): def _local_auth_secret(): - return os.environ.get("OMEGACLAW_AUTH_SECRET", "").strip() + return os.environ.get("OMEGA_AUTH_SECRET", "").strip() def is_auth_enabled(): @@ -73,7 +73,7 @@ def _channel_auth_user_path(): def store_channel_authenticated_user_id(channel_identifier, user_id): - # For any single run of OmegaClaw, allow only a single save of a user-id or verification + # For any single run of Omega, allow only a single save of a user-id or verification global _user_ID_processed if _user_ID_processed: logger.warning(f"[{channel_identifier}] Warning: a user already was validated, ignoring") diff --git a/channels/irc.py b/channels/irc.py index 82a245ba..9d1d1920 100644 --- a/channels/irc.py +++ b/channels/irc.py @@ -188,7 +188,7 @@ def _irc_loop(channel, server, port, nick): time.sleep(backoff_seconds) backoff_seconds = min(backoff_seconds * 2, 30) -def start_irc(channel, server="irc.libera.chat", port=6667, nick="omegaclaw"): +def start_irc(channel, server="irc.libera.chat", port=6667, nick="omega"): global _running, _channel, _connected nick = f"{nick}{random.randint(1000, 9999)}" if not channel.startswith("#"): @@ -226,10 +226,10 @@ def __init__(self): super().__init__() def start(self) -> None: - channel = config_get_by_key("IRC_channel", "##omegaclaw") + channel = config_get_by_key("IRC_channel", "##omega") server = config_get_by_key("IRC_server", "irc.quakenet.org") port = int(config_get_by_key("IRC_port", 6667)) - user = config_get_by_key("IRC_user", "omegaclaw") + user = config_get_by_key("IRC_user", "omega") start_irc(channel, server, port, user) def stop(self) -> None: @@ -241,5 +241,5 @@ def receive(self) -> str: def send(self, message: str) -> None: send_message(message) -def loadOmegaClawPlugin(): +def loadOmegaPlugin(): channels.registerCommChannel("irc", IRCChannel()) diff --git a/channels/mattermost.py b/channels/mattermost.py index 51a42f91..d6d13f64 100644 --- a/channels/mattermost.py +++ b/channels/mattermost.py @@ -26,7 +26,7 @@ # ---- Mattermost config (dummy token ok) ---- MM_URL = "https://chat.singularitynet.io" -CHANNEL_ID = "8fjrmabjx7gupy7e5kjznpt5qh" #NOT AN ID JUST NAME: "omegaclaw"x +CHANNEL_ID = "8fjrmabjx7gupy7e5kjznpt5qh" #NOT AN ID JUST NAME: "omega"x BOT_TOKEN = "" def _get_bot_user_id(): @@ -244,5 +244,5 @@ def receive(self) -> str: def send(self, message: str) -> None: send_message(message) -def loadOmegaClawPlugin(): +def loadOmegaPlugin(): channels.registerCommChannel("mattermost", MattermostChannel()) diff --git a/channels/mockchannel.py b/channels/mockchannel.py index 654a9dae..f0b22415 100644 --- a/channels/mockchannel.py +++ b/channels/mockchannel.py @@ -38,5 +38,5 @@ def receive(self) -> str: def send(self, message: str) -> None: send_message(message) -def loadOmegaClawPlugin(): +def loadOmegaPlugin(): channels.registerCommChannel("test", MockChannel()) diff --git a/channels/slack.py b/channels/slack.py index daa05dfc..ce4ca6f6 100644 --- a/channels/slack.py +++ b/channels/slack.py @@ -605,5 +605,5 @@ def receive(self) -> str: def send(self, message: str) -> None: send_message(message) -def loadOmegaClawPlugin(): +def loadOmegaPlugin(): channels.registerCommChannel("slack", SlackChannel()) diff --git a/channels/telegram.py b/channels/telegram.py index 331da7ff..b7fa26a5 100644 --- a/channels/telegram.py +++ b/channels/telegram.py @@ -294,5 +294,5 @@ def receive(self) -> str: def send(self, message: str) -> None: send_message(message) -def loadOmegaClawPlugin(): +def loadOmegaPlugin(): channels.registerCommChannel("telegram", TelegramChannel()) diff --git a/channels/wschat.py b/channels/wschat.py index d188a58a..04617973 100644 --- a/channels/wschat.py +++ b/channels/wschat.py @@ -369,5 +369,5 @@ def send(self, message: str) -> None: send_message(message) -def loadOmegaClawPlugin(): +def loadOmegaPlugin(): channels.registerCommChannel("websocket", WSChannel()) diff --git a/config/config.yaml b/config/config.yaml index 5a505504..04c2aad7 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -40,7 +40,7 @@ embeddingprovider: Local # Policy # Path to the security profile written using [OpenShell YAML](https://docs.nvidia.com/openshell/reference/policy-schema#filesystem-policy). See [./profile/policy.yaml](./profile/policy.yaml) as an example. Empty value disables restrictions. -securityPolicyPath: "./repos/OmegaClaw-Core/profile/policy.yaml" +securityPolicyPath: "./repos/Omega/profile/policy.yaml" # (internal) URL to the Nginx proxy isolating API keys from agent #GATEWAY_URL: @@ -53,13 +53,13 @@ commchannel: irc # IRC # Enabled with commchannel: irc # IRC channel to join -IRC_channel: "##omegaclaw" +IRC_channel: "##omega" # IRC server hostname IRC_server: "irc.quakenet.org" # IRC port IRC_port: 6667 # IRC nickname -IRC_user: "omegaclaw" +IRC_user: "omega" # Mattermost # Enabled with commchannel: mattermost @@ -70,7 +70,7 @@ MM_CHANNEL_ID: "8fjrmabjx7gupy7e5kjznpt5qh" # Slack # Enabled with commchannel: slack -# Slack channel ID (for example `C0123456789`). If empty, OmegaClaw auto-binds on first successful auth message. +# Slack channel ID (for example `C0123456789`). If empty, Omega auto-binds on first successful auth message. SL_CHANNEL_ID: "" # Slack polling interval in seconds (minimum effective value is 60). SL_POLL_INTERVAL: 60 @@ -79,7 +79,7 @@ SL_MAX_FILE_SIZE_MB: 5 # Telegram # Enabled with commchannel: telegram -# Telegram chat ID. If empty, OmegaClaw auto-binds after first valid inbound auth/message. +# Telegram chat ID. If empty, Omega auto-binds after first valid inbound auth/message. TG_CHAT_ID: "" # Telegram polling timeout in seconds. TG_POLL_TIMEOUT: 20 @@ -155,7 +155,7 @@ asione_model: "asi1-ultra" # OpenClaw openClawEnabled: disabled # In Docker, openClawURL is only a fallback: the real Gateway target and its -# token are set at container start (openclaw_url=, OMEGACLAW_OPENCLAW_TOKEN) +# token are set at container start (openclaw_url=, OMEGA_OPENCLAW_TOKEN) # and injected by the local Nginx proxy, so the agent never sees the token. # See plugins/openclaw/README.md. openClawURL: "http://172.17.0.1:18789" diff --git a/docs/README.md b/docs/README.md index 0f98472b..15dc3d5d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ -# OmegaClaw Documentation +# Omega Documentation -This directory contains the full documentation for OmegaClaw. Every page is a sibling file — no subdirectories. Filename prefixes identify the section: +This directory contains the full documentation for Omega. Every page is a sibling file — no subdirectories. Filename prefixes identify the section: - `intro-*` — conceptual introduction - `tutorial-NN-*` — numbered, task-oriented walkthroughs @@ -12,9 +12,9 @@ If you are new, read the Introduction in order, then pick tutorials that match w ## Introduction -Start here to understand what OmegaClaw is, the hybrid reasoning thesis, how the pieces fit together, and how to get it running. +Start here to understand what Omega is, the hybrid reasoning thesis, how the pieces fit together, and how to get it running. -- [introduction.md](./introduction.md) — What OmegaClaw is, the hybrid thesis, architecture, core vocabulary, design goals, and honest limits (merged conceptual intro). +- [introduction.md](./introduction.md) — What Omega is, the hybrid thesis, architecture, core vocabulary, design goals, and honest limits (merged conceptual intro). - [installation instruction](/README.md#installation) — Manual MeTTa setup, environment variables, API keys. --- diff --git a/docs/introduction.md b/docs/introduction.md index e97ed14c..9154860d 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -1,16 +1,16 @@ # Introduction -OmegaClaw is a **hybrid agentic AI framework** implemented in MeTTa on OpenCog Hyperon. A large language model (LLM) works together with formal logic engines — **NAL** and **PLN** — to reason about the world, track uncertainty, combine evidence, and produce conclusions that are mathematically grounded rather than just plausible-sounding. +Omega is a **hybrid agentic AI framework** implemented in MeTTa on OpenCog Hyperon. A large language model (LLM) works together with formal logic engines — **NAL** and **PLN** — to reason about the world, track uncertainty, combine evidence, and produce conclusions that are mathematically grounded rather than just plausible-sounding. The core agent loop is approximately **200 lines of MeTTa**. -> Most AI assistants generate answers that sound right. OmegaClaw-hosted agents generate answers that come with a **mathematical receipt** showing exactly how confident each conclusion is and what evidence supports it. When the agent says it is 72% confident, that number comes from formal inference — not a feeling. +> Most AI assistants generate answers that sound right. Omega-hosted agents generate answers that come with a **mathematical receipt** showing exactly how confident each conclusion is and what evidence supports it. When the agent says it is 72% confident, that number comes from formal inference — not a feeling. -This page is the conceptual introduction: what OmegaClaw is, why the hybrid architecture exists, how the pieces connect at runtime, the vocabulary used throughout the rest of the docs, and the honest limits of the current system. For getting a running instance, see [installation instruction](/README.md#installation). For hands-on walkthroughs, see the tutorials listed at the end. +This page is the conceptual introduction: what Omega is, why the hybrid architecture exists, how the pieces connect at runtime, the vocabulary used throughout the rest of the docs, and the honest limits of the current system. For getting a running instance, see [installation instruction](/README.md#installation). For hands-on walkthroughs, see the tutorials listed at the end. --- -## What OmegaClaw does +## What Omega does - Runs a token-efficient agentic loop that receives messages, selects skills, and acts. - Delegates reasoning to one of two formal engines, orchestrated by the LLM: @@ -111,8 +111,8 @@ The **LLM layer** is opaque and creative. The **engine layer** is deterministic ### Module map ``` -run.metta entry point: (omegaclaw) -lib_omegaclaw.metta loads all submodules +run.metta entry point: (omega) +lib_omega.metta loads all submodules ├── src/loop.metta agentic loop, turn structure ├── src/memory.metta long-term memory + history ├── src/skills.metta callable skill surface @@ -137,7 +137,7 @@ memory/history.metta episodic trace (written at runtime) ### The agentic turn -Each iteration of `(omegaclaw $k)` in `src/loop.metta` performs: +Each iteration of `(omega $k)` in `src/loop.metta` performs: ``` ┌─────────────────────────────────────────────────────────────┐ @@ -151,7 +151,7 @@ Each iteration of `(omegaclaw $k)` in `src/loop.metta` performs: │ 6. addToHistory append human msg + response + │ │ any errors │ │ 7. sleep sleepInterval seconds │ -│ 8. recurse (omegaclaw (+ 1 $k)) │ +│ 8. recurse (omega (+ 1 $k)) │ └─────────────────────────────────────────────────────────────┘ ``` @@ -223,7 +223,7 @@ Vocabulary used throughout the rest of the documentation. Skim once; come back w ### AtomSpace -The knowledge substrate provided by Hyperon / MeTTa. Every fact, memory item, and program fragment in OmegaClaw lives in the same AtomSpace, so memory is directly interrogable by other Hyperon components. +The knowledge substrate provided by Hyperon / MeTTa. Every fact, memory item, and program fragment in Omega lives in the same AtomSpace, so memory is directly interrogable by other Hyperon components. ### Atomization @@ -334,7 +334,7 @@ The failure mode where a flawed premise is run through the formal engine and eme - **Extensibility.** New skills, channels, tools, and engines are short additions — see [reference-internals-extension-points.md](./reference-internals-extension-points.md). - **Flexibility in memory representation.** Memory items coexist with other Hyperon components in the same AtomSpace; no single representation is hardcoded. -### When to use OmegaClaw +### When to use Omega - a small, auditable agent that can explain **why** it reached a conclusion; - reasoning with explicit uncertainty (`stv frequency confidence`) rather than opaque probabilities; diff --git a/docs/reference-channels.md b/docs/reference-channels.md index 7d8b69d8..8fc1d7e9 100644 --- a/docs/reference-channels.md +++ b/docs/reference-channels.md @@ -70,7 +70,7 @@ Slack adapter using Slack Web API polling. Minimal JSON chat adapter over a WebSocket connection. Selected with `commchannel=websocket` — the Python module is `wschat`, exposing `start_websocket` / `stop_websocket` alongside the usual `getLastMessage` / `send_message`. -- `start_websocket(ws_url, ws_token)` — connect and spawn the listener thread. URL and optional token are read from `WS_URL` / `WS_TOKEN`, or passed directly. `WS_URL` is required when `commchannel=websocket`; if it is missing, OmegaClaw still starts, the adapter logs that the WebSocket channel is disabled, and the process continues without an active WebSocket connection. +- `start_websocket(ws_url, ws_token)` — connect and spawn the listener thread. URL and optional token are read from `WS_URL` / `WS_TOKEN`, or passed directly. `WS_URL` is required when `commchannel=websocket`; if it is missing, Omega still starts, the adapter logs that the WebSocket channel is disabled, and the process continues without an active WebSocket connection. - `stop_websocket()` — stop the listener thread and close the socket. - Requires the `websockets` Python package. - When `WS_TOKEN` is set it is sent as an `Authorization: Bearer ` header. Unlike the IRC/Telegram/Slack adapters there is no one-time `auth ` gate — trust is established by the endpoint URL and bearer token. diff --git a/docs/reference-configuration.md b/docs/reference-configuration.md index ee4ffe9c..1fb5b661 100644 --- a/docs/reference-configuration.md +++ b/docs/reference-configuration.md @@ -1,6 +1,6 @@ # Reference — Configuration -Every tunable in OmegaClaw is declared as `(= (name) (empty))` and later bound by a `configure` call inside an `init*` function. The `configure` helper in `src/utils.metta` is: +Every tunable in Omega is declared as `(= (name) (empty))` and later bound by a `configure` call inside an `init*` function. The `configure` helper in `src/utils.metta` is: ```metta (= (configure $name $default) @@ -38,13 +38,13 @@ This reads a command-line override via `argk` (`name=value` on the MeTTa command | Parameter | Default | Meaning | |---|---|---| | `commchannel` | `irc` | Active channel — `irc`, `telegram`, `slack`, `mattermost`, or `websocket`. | -| `IRC_channel` | `##omegaclaw` | IRC channel to join. | +| `IRC_channel` | `##omega` | IRC channel to join. | | `IRC_server` | `irc.quakenet.org` | IRC server hostname. | | `IRC_port` | 6667 | IRC port. | -| `IRC_user` | `omegaclaw` | IRC nickname. | +| `IRC_user` | `omega` | IRC nickname. | | `TG_CHAT_ID` | *(empty — auto-bind supported)* | Optional fixed Telegram chat ID. Leave empty to auto-bind on first valid inbound auth/message. | | `TG_POLL_TIMEOUT` | 20 | Telegram long-poll timeout in seconds. | -| `SL_CHANNEL_ID` | *(empty — auto-bind supported)* | Optional Slack channel ID where OmegaClaw reads/writes messages. Leave empty to auto-bind on first valid inbound auth/message. | +| `SL_CHANNEL_ID` | *(empty — auto-bind supported)* | Optional Slack channel ID where Omega reads/writes messages. Leave empty to auto-bind on first valid inbound auth/message. | | `SL_POLL_INTERVAL` | 60 | Slack poll interval in seconds (minimum effective value is 60). | | `MM_URL` | `https://chat.singularitynet.io` | Mattermost base URL. | | `MM_CHANNEL_ID` | `8fjrmabjx7gupy7e5kjznpt5qh` | Target channel ID. | diff --git a/docs/reference-failure-modes.md b/docs/reference-failure-modes.md index 30dc447f..4ef92182 100644 --- a/docs/reference-failure-modes.md +++ b/docs/reference-failure-modes.md @@ -1,6 +1,6 @@ # Reference — Failure Modes and Mitigations -OmegaClaw has been exercised for thousands of continuous cycles on the reference deployment (the **Max Botnick** agent — see [Empirical context](#empirical-context) below). The failures in this page are observed and quantified, not hypothetical. +Omega has been exercised for thousands of continuous cycles on the reference deployment (the **Max Botnick** agent — see [Empirical context](#empirical-context) below). The failures in this page are observed and quantified, not hypothetical. A hybrid LLM + formal-logic system can fail in at least three places: premise formulation, confidence propagation, and orchestration. This page catalogues each category, cites measured rates where available, and points to the mitigations. @@ -157,7 +157,7 @@ Before trusting a conclusion: ## Empirical context -The numbers on this page come from operational experience with **Max Botnick**, an OmegaClaw-hosted agent used by the project maintainers for internal reasoning experiments. Max ran **3,100+ continuous cycles minimum** (4,500+ cycles with full error instrumentation) and self-authored the whitepaper from which this documentation draws. The measurements are therefore OmegaClaw-on-OmegaClaw evaluations, with all the caveats that implies — they are indicative of the framework under realistic workloads but not a formal benchmark. +The numbers on this page come from operational experience with **Max Botnick**, an Omega-hosted agent used by the project maintainers for internal reasoning experiments. Max ran **3,100+ continuous cycles minimum** (4,500+ cycles with full error instrumentation) and self-authored the whitepaper from which this documentation draws. The measurements are therefore Omega-on-Omega evaluations, with all the caveats that implies — they are indicative of the framework under realistic workloads but not a formal benchmark. ## See also diff --git a/docs/reference-internals-extension-points.md b/docs/reference-internals-extension-points.md index c0ce4acc..9aaab3d8 100644 --- a/docs/reference-internals-extension-points.md +++ b/docs/reference-internals-extension-points.md @@ -60,7 +60,7 @@ To add a new backend, add a branch and implement the Python function. ## Change the reasoning library -`lib_nal.metta` and `lib_pln.metta` are plain MeTTa files loaded by `lib_omegaclaw.metta`. Add new rule definitions directly, or swap in a different logic library entirely — the only required surface is whatever operator the LLM invokes through `(metta ...)`. +`lib_nal.metta` and `lib_pln.metta` are plain MeTTa files loaded by `lib_omega.metta`. Add new rule definitions directly, or swap in a different logic library entirely — the only required surface is whatever operator the LLM invokes through `(metta ...)`. ## See also diff --git a/docs/reference-internals-loop.md b/docs/reference-internals-loop.md index 50c5d877..7d9709ac 100644 --- a/docs/reference-internals-loop.md +++ b/docs/reference-internals-loop.md @@ -1,14 +1,14 @@ # Internals — `src/loop.metta` -The heart of OmegaClaw. One function, `omegaclaw`, tail-recurses forever. +The heart of Omega. One function, `omega`, tail-recurses forever. ## Entry ```metta -(= (omegaclaw) (omegaclaw 1)) +(= (omega) (omega 1)) ``` -Outer `run.metta` simply calls `(omegaclaw)`. +Outer `run.metta` simply calls `(omega)`. ## On turn 1 (`$k == 1`) @@ -42,7 +42,7 @@ Also creates shared state slots: 10. **Record** — `addToHistory` appends human message + response + any errors to `memory/history.metta`, provided something new happened. 11. **Save last results** — into `&lastresults` for the next turn's prompt. 12. **Sleep** — `(sleep (sleepInterval))`. -13. **Recurse** — `(omegaclaw (+ 1 $k))`. +13. **Recurse** — `(omega (+ 1 $k))`. ## Idle behavior diff --git a/docs/reference-internals-memory-store.md b/docs/reference-internals-memory-store.md index 1ceb810f..1d21c70b 100644 --- a/docs/reference-internals-memory-store.md +++ b/docs/reference-internals-memory-store.md @@ -1,6 +1,6 @@ # Internals — Memory Store -OmegaClaw uses a **three-tier memory architecture**. Each tier has distinct semantics, persistence, and purpose. Choosing the wrong tier is one of the easier performance and reliability foot-guns. +Omega uses a **three-tier memory architecture**. Each tier has distinct semantics, persistence, and purpose. Choosing the wrong tier is one of the easier performance and reliability foot-guns. ## Overview @@ -78,7 +78,7 @@ Reads lines around `$time` from `memory/history.metta` — the **episodic trace* ### Startup knowledge priors -At startup, OmegaClaw also checks for a folder named `knowledge-priors` in the OmegaClaw-Core project root. If that folder exists and contains Markdown files (`*.md`), their contents are chunked, embedded, and loaded into the ChromaDB `memories` collection for semantic lookup. +At startup, Omega also checks for a folder named `knowledge-priors` in the Omega project root. If that folder exists and contains Markdown files (`*.md`), their contents are chunked, embedded, and loaded into the ChromaDB `memories` collection for semantic lookup. The loader skips the step when the folder is missing, or when the folder exists but has no `.md` files. Indexed chunks are tagged with `time = knowledge_prior` instead of an actual time. diff --git a/docs/reference-lib-nal.md b/docs/reference-lib-nal.md index 53de3f17..9e7dd186 100644 --- a/docs/reference-lib-nal.md +++ b/docs/reference-lib-nal.md @@ -1,6 +1,6 @@ # Reference — `lib_nal.metta` -Non-Axiomatic Logic (NAL) — a logic of uncertain reasoning with explicit evidence-based truth values. NAL is the primary symbolic engine for OmegaClaw's inheritance and implication reasoning. +Non-Axiomatic Logic (NAL) — a logic of uncertain reasoning with explicit evidence-based truth values. NAL is the primary symbolic engine for Omega's inheritance and implication reasoning. --- @@ -32,7 +32,7 @@ Every NAL statement carries `(stv frequency confidence)`: ## The `|-` operator -`|-` applies NAL inference. OmegaClaw selects the appropriate rule automatically based on premise shape. +`|-` applies NAL inference. Omega selects the appropriate rule automatically based on premise shape. --- diff --git a/docs/reference-lib-ona.md b/docs/reference-lib-ona.md index a60dffd9..4200f9bd 100644 --- a/docs/reference-lib-ona.md +++ b/docs/reference-lib-ona.md @@ -1,6 +1,6 @@ # Reference — ONA (OpenNARS for Applications) -ONA is a lightweight, real-time implementation of NARS created by Dr. Patrick Hammer. **ONA is not installed by default in OmegaClaw.** There are no ONA bindings in the repository, no `lib_ona.metta`, and no dedicated operator in the `(metta ...)` skill surface. The stock install ships two formal engines — symbolic NAL (`|-`) and probabilistic PLN (`|~`). +ONA is a lightweight, real-time implementation of NARS created by Dr. Patrick Hammer. **ONA is not installed by default in Omega.** There are no ONA bindings in the repository, no `lib_ona.metta`, and no dedicated operator in the `(metta ...)` skill surface. The stock install ships two formal engines — symbolic NAL (`|-`) and probabilistic PLN (`|~`). This page exists because ONA is named in the project's architectural vision and has been an experimental target — see [Status](#status-partly-successful-self-building-experiment) below. @@ -25,13 +25,13 @@ Today, with ONA absent, the current practical fallback for temporal questions is ## Invocation surface -**There is no stock invocation surface for ONA in OmegaClaw.** `lib_omegaclaw.metta` does not load ONA bindings. The `(metta ...)` skill has no ONA operator. +**There is no stock invocation surface for ONA in Omega.** `lib_omega.metta` does not load ONA bindings. The `(metta ...)` skill has no ONA operator. Any integration has to be built — either by calling an external ONA binary through `(shell ...)` and parsing its output, or by constructing MeTTa-side wrappers that emulate ONA's temporal operators. This is a non-trivial tools-authoring task and is the subject of the experiment described below. ## Status: partly-successful self-building experiment -OmegaClaw's architectural vision lists ONA as a third engine, but in practice ONA support has been pursued as an experiment in whether the agent can **itself build the tools** to interface with that reasoning system. Results so far: partly successful. +Omega's architectural vision lists ONA as a third engine, but in practice ONA support has been pursued as an experiment in whether the agent can **itself build the tools** to interface with that reasoning system. Results so far: partly successful. What this means concretely: @@ -40,7 +40,7 @@ What this means concretely: - There is no native mechanism for belief revision triggered by time — confidence does not automatically decay for stale claims. - Real-time feedback loops require careful phase tracking and frequently break due to state-management failures when the agent attempts to orchestrate them end-to-end. -Treat ONA in OmegaClaw as a research direction, not a feature. The limits of agent-authored self-improvement (which is effectively what this experiment is) are documented in [reference-failure-modes.md §6](./reference-failure-modes.md) — self-authored improvements should be taken as signals but validated externally before being relied upon. +Treat ONA in Omega as a research direction, not a feature. The limits of agent-authored self-improvement (which is effectively what this experiment is) are documented in [reference-failure-modes.md §6](./reference-failure-modes.md) — self-authored improvements should be taken as signals but validated externally before being relied upon. ## See also diff --git a/docs/reference-lib-pln.md b/docs/reference-lib-pln.md index 2735564e..8a2daedb 100644 --- a/docs/reference-lib-pln.md +++ b/docs/reference-lib-pln.md @@ -18,7 +18,7 @@ Truth values share NAL's `(stv frequency confidence)` format, interpreted probab ## The `|~` operator -`|~` applies PLN rules. OmegaClaw's current deployment supports a useful subset; the rest are left to NAL or future work. +`|~` applies PLN rules. Omega's current deployment supports a useful subset; the rest are left to NAL or future work. --- diff --git a/docs/reference-orchestration.md b/docs/reference-orchestration.md index c0d925cc..15d4d40f 100644 --- a/docs/reference-orchestration.md +++ b/docs/reference-orchestration.md @@ -1,6 +1,6 @@ # Reference — Orchestration -OmegaClaw exposes two reasoning engines (NAL and PLN) plus direct memory recall. The LLM decides which to use, when to stop, and whether to act on a result. This page catalogues those decision policies. (ONA is a planned third engine — see [reference-lib-ona.md](./reference-lib-ona.md) for its experimental, not-installed status.) +Omega exposes two reasoning engines (NAL and PLN) plus direct memory recall. The LLM decides which to use, when to stop, and whether to act on a result. This page catalogues those decision policies. (ONA is a planned third engine — see [reference-lib-ona.md](./reference-lib-ona.md) for its experimental, not-installed status.) --- @@ -73,7 +73,7 @@ Revision produces a frequency that encodes the disagreement (drifts toward the m ## 5. The defense stack (four layers) -OmegaClaw assembles these layers to resist noisy or adversarial input: +Omega assembles these layers to resist noisy or adversarial input: ### Layer 1 — Novelty modulation New claims are discounted by their novelty: diff --git a/docs/reference-plugin-api.md b/docs/reference-plugin-api.md index ffbb0689..b5427d6a 100644 --- a/docs/reference-plugin-api.md +++ b/docs/reference-plugin-api.md @@ -1,10 +1,10 @@ # Reference - Plugin API -OmegaClaw provides a plugin API which allows writing plugins to extend the +Omega provides a plugin API which allows writing plugins to extend the agent's functionality. A plugin is a MeTTa or Python module which provides the -entry point function `loadOmegaClawPlugin`. +entry point function `loadOmegaPlugin`. -The `loadOmegaClawPlugin` function calls the OmegaClaw plugin API in order to +The `loadOmegaPlugin` function calls the Omega plugin API in order to implement new agent's features. The plugin API provides functions to: - add communication channel integrations - add LLM provider integrations @@ -14,10 +14,10 @@ implement new agent's features. The plugin API provides functions to: In order to be loaded the plugin should be included into the [config/plugins.yaml](/config/plugins.yaml) file. The agent loads each module -listed in this file on start and calls `loadOmegaClawPlugin` entry function of +listed in this file on start and calls `loadOmegaPlugin` entry function of each loaded module. All communication channels and LLM integrations of -OmegaClaw are implemented using this API. The full list of plugins available in -the OmegaClaw repository can be found in the +Omega are implemented using this API. The full list of plugins available in +the Omega repository can be found in the [config/plugins.yaml](/config/plugins.yaml) file. Plugin can be implemented as a MeTTa module, a single Python file or a Python @@ -31,13 +31,13 @@ module. The plugin record has the following fields: - `location` (optional) - must be specified if plugin is a single Python file or MeTTa module. In such case it provides the path to the directory where `name` module is located. Can include `{REPO}` placeholder to designate the - root folder of the OmegaClaw source repository. + root folder of the Omega source repository. As an example of a MeTTa plugin one can look at the code of the [workflow plugin](/plugins/workflow/workflow.metta). As an example of a Python plugin one can look at the code of the [IRC communication channel](/channels/irc.py). -The OmegaClaw plugin API is under construction. This is the reason why some +The Omega plugin API is under construction. This is the reason why some APIs are available only as the Python modules and others only as the MeTTa modules. Partially it is because writing some kinds of plugins is simpler using Python. @@ -50,7 +50,7 @@ There are two ways of doing this: file into the container using custom `docker run` command. This document doesn't describe using Docker in details it is a subject to the -future OmegaClaw improvements. +future Omega improvements. ## Communication channel integration @@ -90,7 +90,7 @@ register the instance of the `ExampleCommChannel` in the system using `registerCommChannel` function. ```python -def loadOmegaClawPlugin(): +def loadOmegaPlugin(): channels.registerCommChannel("Example", ExampleCommChannel()) ``` @@ -103,7 +103,7 @@ The communication channel identifier should be used as the value for the agent (see [README.md](/README.md#configuration-options)): For example one can use the following command to run the agent using `Example` -as the communication plugin. This command requires OmegaClaw to be installed in +as the communication plugin. This command requires Omega to be installed in the system first (see [README.md](/README.md#installation)): ```sh sh run.sh run.metta commchannel=Example @@ -147,7 +147,7 @@ register the instance of the `ExampleLLMProvider` in the system using `registerLLMProvider` function. ```python -def loadOmegaClawPlugin(): +def loadOmegaPlugin(): providers.registerLLMProvider("Example", ExampleLLMProvider()) ``` @@ -160,7 +160,7 @@ configuration parameter to use the LLM provider with the agent (see [README.md](/README.md#configuration-options)): For example one can use the following command to run the agent using `Example` -as the LLM provider plugin. This command requires OmegaClaw to be installed in +as the LLM provider plugin. This command requires Omega to be installed in the system first (see [README.md](/README.md#installation)): ```sh sh run.sh run.metta provider=Example diff --git a/docs/reference-plugins-publishing.md b/docs/reference-plugins-publishing.md index a6da3fed..736d9bcb 100644 --- a/docs/reference-plugins-publishing.md +++ b/docs/reference-plugins-publishing.md @@ -1,6 +1,6 @@ # Reference — Plugin Publishing -The OmegaClaw plugin registry is managed through the project Wiki and +The Omega plugin registry is managed through the project Wiki and the GitHub Issues tracker. The process below describes how to submit a plugin for inclusion in the official catalog. @@ -11,15 +11,15 @@ a plugin for inclusion in the official catalog. | Step | Description | |---|---| | **Fill out the request** | Open a new Issue using the **Plugin addition request** template. Fill in the required fields: plugin name, description, and repository link. | -| **Team review** | The maintainer team reviews incoming Issues of this type and adds the plugin to the [Omega Plugins Spreadsheet](https://github.com/asi-alliance/OmegaClaw-Core/wiki/Omega-Plugins-Spreadsheet) on the Wiki. | +| **Team review** | The maintainer team reviews incoming Issues of this type and adds the plugin to the [Omega Plugins Spreadsheet](https://github.com/singnet/Omega/wiki/Omega-Plugins-Spreadsheet) on the Wiki. | --- ## Resources -- [Unified Plugin Catalog](https://github.com/asi-alliance/OmegaClaw-Core/wiki/Omega-Plugins-Spreadsheet) — complete list of available plugins with links and descriptions. -- [Plugin Development Guide](./reference-plugin-api.md) — detailed instructions for creating a plugin using the OmegaClaw API. -- [Submit a Plugin](https://github.com/asi-alliance/OmegaClaw-Core/issues/new/choose) — open a new Issue with the Plugin addition request template. +- [Unified Plugin Catalog](https://github.com/singnet/Omega/wiki/Omega-Plugins-Spreadsheet) — complete list of available plugins with links and descriptions. +- [Plugin Development Guide](./reference-plugin-api.md) — detailed instructions for creating a plugin using the Omega API. +- [Submit a Plugin](https://github.com/singnet/Omega/issues/new/choose) — open a new Issue with the Plugin addition request template. > **Note:** The canonical plugin list lives in the Wiki. This page > documents the submission process only. diff --git a/docs/reference-python-bridges.md b/docs/reference-python-bridges.md index 78c868aa..8346a449 100644 --- a/docs/reference-python-bridges.md +++ b/docs/reference-python-bridges.md @@ -38,17 +38,17 @@ YYYY-MM-DD HH:MM:SS | LEVEL | module | message Docker container stdout/stderr is captured automatically and can be viewed with: ```bash -docker logs -f omegaclaw +docker logs -f omega ``` **Custom logging configuration** Users can provide their own Python logging config file to control log levels, handlers, formatters, output destinations, and per-module logging behavior. -When starting OmegaClaw through the launcher script, pass: +When starting Omega through the launcher script, pass: ```bash -scripts/omegaclaw start -l /path/to/logging.conf +scripts/omega start -l /path/to/logging.conf ``` For standalone runs without Docker, pass the config path to the MeTTa runtime: @@ -57,7 +57,7 @@ For standalone runs without Docker, pass the config path to the MeTTa runtime: sh run.sh run.metta logConfigPath=/path/to/logging.conf ``` -If no custom config is provided, OmegaClaw uses `config/logging.conf`. If the configured file is missing, OmegaClaw falls back to basic stderr logging. +If no custom config is provided, Omega uses `config/logging.conf`. If the configured file is missing, Omega falls back to basic stderr logging. ## `lib_llm_ext.py` diff --git a/docs/reference-skills-io.md b/docs/reference-skills-io.md index 4b84e799..8c3e7179 100644 --- a/docs/reference-skills-io.md +++ b/docs/reference-skills-io.md @@ -27,7 +27,7 @@ The captured stdout of the command as a string. ``` ### Notes / Limits -- Runs with the permissions of the OmegaClaw process. +- Runs with the permissions of the Omega process. - No sandboxing. Run in a container for anything resembling untrusted use. - Prefer writing complex commands to a file and invoking the file rather than embedding quotes-within-quotes. @@ -44,7 +44,7 @@ The captured stdout of the command as a string. Read a file into a string. ### Parameters -- `path` — absolute or relative filesystem path. MeTTa library paths of the form `(library OmegaClaw-Core ./memory/prompt.txt)` are also accepted (see `getPrompt`). +- `path` — absolute or relative filesystem path. MeTTa library paths of the form `(library Omega ./memory/prompt.txt)` are also accepted (see `getPrompt`). ### Returns The file's contents as a single string. @@ -162,7 +162,7 @@ read back from disk — or `APPEND-FAILED file=: ` (e.g. when the f ### Purpose -Return the filesystem paths allowed by OmegaClaw's active security policy. +Return the filesystem paths allowed by Omega's active security policy. Agent should use this skill before reading, writing, appending, or otherwise modifying a file when the target path is not known to be allowed. diff --git a/docs/tutorial-01-teaching-memories.md b/docs/tutorial-01-teaching-memories.md index f1176985..330fa9cb 100644 --- a/docs/tutorial-01-teaching-memories.md +++ b/docs/tutorial-01-teaching-memories.md @@ -4,11 +4,11 @@ ## Prerequisites -- A running OmegaClaw (see [Usage](/README.md#usage)). +- A running Omega (see [Usage](/README.md#usage)). ## Background -OmegaClaw uses a **three-tier memory architecture**: +Omega uses a **three-tier memory architecture**: 1. **Working memory** — `pin` (volatile, single slot, session-local). 2. **Long-term embedding memory** — `remember` / `query` (persistent across sessions). diff --git a/docs/tutorial-02-shell-and-files.md b/docs/tutorial-02-shell-and-files.md index d7910ae2..3d8231cd 100644 --- a/docs/tutorial-02-shell-and-files.md +++ b/docs/tutorial-02-shell-and-files.md @@ -1,11 +1,11 @@ # Tutorial 02 — Shell and Files -**Goal:** let OmegaClaw inspect and modify its environment using `shell`, `read-file`, `write-file`, and `append-file`. +**Goal:** let Omega inspect and modify its environment using `shell`, `read-file`, `write-file`, and `append-file`. ## Prerequisites -- A running OmegaClaw (see [Usage](/README.md#usage)). -- Awareness that these skills run with the permissions of the OmegaClaw process. +- A running Omega (see [Usage](/README.md#usage)). +- Awareness that these skills run with the permissions of the Omega process. ## The four I/O skills @@ -46,7 +46,7 @@ The agent should `(append-file "/tmp/session.log" "...")` on each subsequent tur - **Apostrophes in `shell` arguments are rejected** by the Prolog-side `shell` helper. Quote text with double quotes instead, or write it to a file first and operate on the file. - **There is no sandbox.** If you expose destructive commands (`rm -rf`, etc.) through the shell you will get what you ask for. Run in Docker and treat the container as ephemeral. -- File paths are resolved relative to the OmegaClaw working directory unless absolute. +- File paths are resolved relative to the Omega working directory unless absolute. ## Verification diff --git a/docs/tutorial-03-writing-a-custom-skill.md b/docs/tutorial-03-writing-a-custom-skill.md index fed36728..7594c1b8 100644 --- a/docs/tutorial-03-writing-a-custom-skill.md +++ b/docs/tutorial-03-writing-a-custom-skill.md @@ -4,7 +4,7 @@ ## Prerequisites -- A local clone of OmegaClaw-Core (so you can edit MeTTa source). +- A local clone of Omega (so you can edit MeTTa source). - Familiarity with running the agent — see [Usage](/README.md#usage). ## The anatomy of a skill diff --git a/docs/tutorial-04-adding-a-channel.md b/docs/tutorial-04-adding-a-channel.md index f16640d1..f9b2dec6 100644 --- a/docs/tutorial-04-adding-a-channel.md +++ b/docs/tutorial-04-adding-a-channel.md @@ -1,6 +1,6 @@ # Tutorial 04 — Adding a Channel -**Goal:** plug OmegaClaw into a new communication surface (Slack, Discord, a REST endpoint, a terminal) by writing a channel adapter. +**Goal:** plug Omega into a new communication surface (Slack, Discord, a REST endpoint, a terminal) by writing a channel adapter. ## Prerequisites diff --git a/docs/tutorial-05-reasoning-with-nal-pln.md b/docs/tutorial-05-reasoning-with-nal-pln.md index f034aae5..df263f8c 100644 --- a/docs/tutorial-05-reasoning-with-nal-pln.md +++ b/docs/tutorial-05-reasoning-with-nal-pln.md @@ -1,10 +1,10 @@ # Tutorial 05 — Reasoning with NAL and PLN -**Goal:** invoke Non-Axiomatic Logic and Probabilistic Logic Networks from inside OmegaClaw using the `(metta ...)` skill, and read the truth values the engines emit. +**Goal:** invoke Non-Axiomatic Logic and Probabilistic Logic Networks from inside Omega using the `(metta ...)` skill, and read the truth values the engines emit. ## Prerequisites -- A running OmegaClaw. +- A running Omega. - Reading familiarity with `(stv frequency confidence)` truth values. ## The `metta` skill diff --git a/docs/tutorial-07-grounded-reasoning.md b/docs/tutorial-07-grounded-reasoning.md index fa0791bf..50bf89b1 100644 --- a/docs/tutorial-07-grounded-reasoning.md +++ b/docs/tutorial-07-grounded-reasoning.md @@ -63,7 +63,7 @@ Step 3: atomize with source-anchored confidence ## Step-by-step — add a grounded fact -Ask the agent, in a running OmegaClaw session: +Ask the agent, in a running Omega session: ``` please verify Netflix's 2024 content spend from SEC EDGAR and diff --git a/entrypoint.sh b/entrypoint.sh index 6bb54133..50d6cd44 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -37,14 +37,14 @@ su www-data -s /bin/sh -c "sh /opt/nginx/nginx.sh" # Optional knowledge-base import if [[ "${IMPORT_KB_ON_START}" == "1" ]]; then - su nobody -s /bin/sh -c "${OMEGACLAW_DIR}/scripts/import_knowledge.sh" + su nobody -s /bin/sh -c "${OMEGA_DIR}/scripts/import_knowledge.sh" fi # Scrub environment: only allowlisted vars survive. SAFE_VARS="HOME USER PATH HOSTNAME TERM LANG LC_ALL \ PYTHONDONTWRITEBYTECODE PYTHONUNBUFFERED \ HF_HOME SENTENCE_TRANSFORMERS_HOME HF_HUB_OFFLINE TRANSFORMERS_OFFLINE \ - OMEGACLAW_DIR MEMORY_DIR TEST_SERVER_IP" + OMEGA_DIR MEMORY_DIR TEST_SERVER_IP" env_args="" for var in $SAFE_VARS; do diff --git a/lib_omega.metta b/lib_omega.metta new file mode 100644 index 00000000..e4919d83 --- /dev/null +++ b/lib_omega.metta @@ -0,0 +1,30 @@ +!(import! &self (library lib_patrick)) +!(import! &self (library lib_llm)) +!(import! &self (library lib_vector)) +!(import! &self (library lib_combinatorics)) +!(import! &self (library lib_he)) +!(import! &self (library Omega lib_nal)) +!(import! &self (library Omega lib_pln)) +!(import! &self (library Omega ./src/helper.py)) +!(import! &self (library Omega ./src/utils)) +!(import! &self (library Omega ./src/config.py)) +!(import! &self (library Omega ./src/config)) +!(import! &self (library Omega ./providers/lib_llm_ext.py)) +!(import! &self (library Omega ./src/logger.py)) +!(import! &self (library Omega ./src/log)) +!(import! &self (library Omega ./src/plugin.py)) +!(import! &self (library Omega ./src/plugin)) +!(import! &self (library Omega ./src/channels.py)) +!(import! &self (library Omega ./src/channels)) +!(import! &self (library Omega ./src/providers.py)) +!(import! &self (library Omega ./src/providers)) +!(import! &self (library Omega ./profile/policy)) +!(import! &self (library Omega ./src/fileio.py)) +!(import! &self (library Omega ./src/skills)) +!(import! &self (library Omega ./src/websearch.py)) +!(import! &self (library Omega ./src/memory)) +!(import! &self (library Omega ./src/context)) +!(import! &self (library Omega ./src/loop)) +!(import! &self (library Omega ./src/rag.py)) +!(git-import! "https://github.com/patham9/petta_lib_chromadb.git") +!(import! &self (library petta_lib_chromadb lib_chromadb)) diff --git a/lib_omegaclaw.metta b/lib_omegaclaw.metta deleted file mode 100644 index b8cc0a44..00000000 --- a/lib_omegaclaw.metta +++ /dev/null @@ -1,30 +0,0 @@ -!(import! &self (library lib_patrick)) -!(import! &self (library lib_llm)) -!(import! &self (library lib_vector)) -!(import! &self (library lib_combinatorics)) -!(import! &self (library lib_he)) -!(import! &self (library OmegaClaw-Core lib_nal)) -!(import! &self (library OmegaClaw-Core lib_pln)) -!(import! &self (library OmegaClaw-Core ./src/helper.py)) -!(import! &self (library OmegaClaw-Core ./src/utils)) -!(import! &self (library OmegaClaw-Core ./src/config.py)) -!(import! &self (library OmegaClaw-Core ./src/config)) -!(import! &self (library OmegaClaw-Core ./providers/lib_llm_ext.py)) -!(import! &self (library OmegaClaw-Core ./src/logger.py)) -!(import! &self (library OmegaClaw-Core ./src/log)) -!(import! &self (library OmegaClaw-Core ./src/plugin.py)) -!(import! &self (library OmegaClaw-Core ./src/plugin)) -!(import! &self (library OmegaClaw-Core ./src/channels.py)) -!(import! &self (library OmegaClaw-Core ./src/channels)) -!(import! &self (library OmegaClaw-Core ./src/providers.py)) -!(import! &self (library OmegaClaw-Core ./src/providers)) -!(import! &self (library OmegaClaw-Core ./profile/policy)) -!(import! &self (library OmegaClaw-Core ./src/fileio.py)) -!(import! &self (library OmegaClaw-Core ./src/skills)) -!(import! &self (library OmegaClaw-Core ./src/websearch.py)) -!(import! &self (library OmegaClaw-Core ./src/memory)) -!(import! &self (library OmegaClaw-Core ./src/context)) -!(import! &self (library OmegaClaw-Core ./src/loop)) -!(import! &self (library OmegaClaw-Core ./src/rag.py)) -!(git-import! "https://github.com/patham9/petta_lib_chromadb.git") -!(import! &self (library petta_lib_chromadb lib_chromadb)) diff --git a/memory/prompt.txt b/memory/prompt.txt index 57920b65..d5095675 100644 --- a/memory/prompt.txt +++ b/memory/prompt.txt @@ -1,4 +1,4 @@ -You are a OmegaClaw agentic harness in a continuous loop. +You are an Omega agentic harness in a continuous loop. Understand and remember the user goals, and choose your own goals in ways that are assistive for the user. Use send commands to communicate questions and progress on goals to the user. Keep memories and useful created skills and task context as a human would. diff --git a/memory/prompt_ASICloud.txt b/memory/prompt_ASICloud.txt index 69ba2315..8129b9c2 100644 --- a/memory/prompt_ASICloud.txt +++ b/memory/prompt_ASICloud.txt @@ -1,4 +1,4 @@ -You are a OmegaClaw agentic harness in a continuous loop. +You are an Omega agentic harness in a continuous loop. Understand and remember the user goals, and choose your own goals to assist the user. Your response should be a composition of the skill calls. Call "send" skill to communicate to the user. diff --git a/memory/prompt_OpenRouter.txt b/memory/prompt_OpenRouter.txt index 8d64c113..d3c9a536 100644 --- a/memory/prompt_OpenRouter.txt +++ b/memory/prompt_OpenRouter.txt @@ -1,4 +1,4 @@ -You are a OmegaClaw agentic harness in a continuous loop. +You are an Omega agentic harness in a continuous loop. Understand and remember the user goals, and choose your own goals to assist the user. Your response should be a composition of the skill calls. Call "send" skill to communicate to the user. diff --git a/plugins/openclaw/README.md b/plugins/openclaw/README.md index 3a3ffcfa..7c587c33 100644 --- a/plugins/openclaw/README.md +++ b/plugins/openclaw/README.md @@ -53,7 +53,7 @@ configured with - the plugin never overrides it. Token auth is the default (`gateway.auth.mode: "token"`). The value lives in the Gateway's `.env` as `OPENCLAW_GATEWAY_TOKEN`. -## Configure the OmegaClaw side +## Configure the Omega side `config/config.yaml`: @@ -74,14 +74,14 @@ openClawAgent: "main" ### The token never reaches the agent process Unlike a bare Python deployment, the Docker image never lets the agent -process hold the Gateway token. `OMEGACLAW_OPENCLAW_TOKEN` must still be +process hold the Gateway token. `OMEGA_OPENCLAW_TOKEN` must still be passed through the environment, never through config files: ```bash -docker run ... -e OMEGACLAW_OPENCLAW_TOKEN="" openclaw_url="" ... +docker run ... -e OMEGA_OPENCLAW_TOKEN="" openclaw_url="" ... ``` -(with `scripts/omegaclaw`: `OMEGACLAW_OPENCLAW_TOKEN= ./scripts/omegaclaw start -g "" ...`) +(with `scripts/omega`: `OMEGA_OPENCLAW_TOKEN= ./scripts/omega start -g "" ...`) but the local Nginx proxy (`proxy/nginx.conf.template`, `location /openclaw/`) reads it *before* the agent's environment is scrubbed (see `entrypoint.sh`) @@ -96,7 +96,7 @@ same Gateway for that case to keep working. ### Choosing the Gateway URL -| OmegaClaw runs | Gateway runs | Use | +| Omega runs | Gateway runs | Use | | --- | --- | --- | | in Docker | on the host | `http://172.17.0.1:18789` (the `docker0` bridge address) | | in Docker | in Docker, same user-defined network | `http://:18789` | @@ -126,7 +126,7 @@ curl -sS http://127.0.0.1:18789/v1/responses \ -d '{"model":"openclaw","input":"Reply with exactly: PONG"}' ``` -On OmegaClaw startup the log should show +On Omega startup the log should show `openclaw-plugin: OpenClaw integration is enabled`, and the agent should offer the `delegate-task-to-openclaw-agent` skill. @@ -183,7 +183,7 @@ the rest of the history window (`maxHistory`). | Error | Cause | | --- | --- | | `HTTP 404` | `gateway.http.endpoints.responses.enabled` is not set, or the Gateway was not restarted after setting it | -| `HTTP 401: Unauthorized` | `OMEGACLAW_OPENCLAW_TOKEN` is empty or does not match `OPENCLAW_GATEWAY_TOKEN` | +| `HTTP 401: Unauthorized` | `OMEGA_OPENCLAW_TOKEN` is empty or does not match `OPENCLAW_GATEWAY_TOKEN` | | `HTTP 400: Unknown agent ''` | `openClawAgent` does not exist in `agents.entries` | | `Cannot reach OpenClaw Gateway` | Wrong `openClawURL`, or the Gateway is bound to loopback only | | `missing scope ... (MISSING_SCOPE)` | The request went to the WebSocket surface instead of `/v1/responses` | diff --git a/plugins/openclaw/openclaw.metta b/plugins/openclaw/openclaw.metta index 9b75e805..f045b847 100644 --- a/plugins/openclaw/openclaw.metta +++ b/plugins/openclaw/openclaw.metta @@ -1,16 +1,16 @@ -!(import! &self (library OmegaClaw-Core ./plugins/openclaw/openclaw.py)) +!(import! &self (library Omega ./plugins/openclaw/openclaw.py)) (= (openClawEnabled) (empty)) (= (openClawURL) (empty)) (= (openClawAgent) (empty)) -(= (loadOmegaClawPlugin) +(= (loadOmegaPlugin) (progn ; Enable or disable the integration. (configure openClawEnabled disabled) ; OpenClaw Gateway base URL, http://... or https://... ; In Docker this is only a fallback: the real target and its token - ; are set at container start (openclaw_url=, OMEGACLAW_OPENCLAW_TOKEN) + ; are set at container start (openclaw_url=, OMEGA_OPENCLAW_TOKEN) ; and injected by the local Nginx proxy. See plugins/openclaw/README.md. (configure openClawURL "") ; OpenClaw agent name. "main" by default @@ -18,7 +18,7 @@ (if (== (openClawEnabled) enabled) (if (== (openClawURL) "") (Error - (_loadOmegaClawPlugin) + (_loadOmegaPlugin) "OpenClaw integration is enabled, but openClawURL is not configured") (progn (log INFO "openclaw-plugin" "OpenClaw integration is enabled") @@ -48,7 +48,7 @@ ; append-file rather than appendToHistory/library: this plugin's own ; definitions live in the plugin's own MeTTa space (src/plugin.metta), ; library's file-spec resolves against whichever space an -; evaluation started from - it does not find the OmegaClaw-Core alias +; evaluation started from - it does not find the Omega alias ; reached this way. append-file takes a plain path and has no such ; dependency, so the path is built with projectRootDirectory/joinPath ; (same as pluginWorkflowInstructionsDir in workflow.metta) instead of diff --git a/plugins/openclaw/openclaw.py b/plugins/openclaw/openclaw.py index 998b6d21..aa9961e1 100644 --- a/plugins/openclaw/openclaw.py +++ b/plugins/openclaw/openclaw.py @@ -1,4 +1,4 @@ -"""Bridge between an OmegaClaw dynamic skill and an external OpenClaw Gateway. +"""Bridge between an Omega dynamic skill and an external OpenClaw Gateway. Protocol reference: https://docs.openclaw.ai/gateway/openresponses-http-api (Gateway OpenResponses HTTP API). @@ -79,7 +79,7 @@ def _get_token() -> str: Returns: str: The auth token. """ - return os.getenv("OMEGACLAW_OPENCLAW_TOKEN", "").strip() + return os.getenv("OMEGA_OPENCLAW_TOKEN", "").strip() def send( @@ -363,7 +363,7 @@ def _request_target(openclaw_url: str): Nginx injects the Bearer token from its own environment, so this process never holds the Gateway token. Without `GATEWAY_URL` (e.g. running outside Docker), fall back to talking to `openclaw_url` directly with a token read - from `OMEGACLAW_OPENCLAW_TOKEN`. + from `OMEGA_OPENCLAW_TOKEN`. Args: openclaw_url (str): The configured Gateway base URL, used only by the @@ -386,7 +386,7 @@ def _request_target(openclaw_url: str): # Sending an empty Bearer would come back as a plain 401, which is # indistinguishable from a wrong token. Say what is actually missing. raise OpenClawError( - "No GATEWAY_URL to proxy through and OMEGACLAW_OPENCLAW_TOKEN is " + "No GATEWAY_URL to proxy through and OMEGA_OPENCLAW_TOKEN is " "empty, so the request cannot be authenticated" ) logger.debug("No GATEWAY_URL, calling the OpenClaw Gateway directly") diff --git a/plugins/workflow/README.md b/plugins/workflow/README.md index 1e143dc8..bcb0efac 100644 --- a/plugins/workflow/README.md +++ b/plugins/workflow/README.md @@ -27,22 +27,22 @@ format](https://agentskills.io/specification). For example: ```md --- name: test-workflow -description: Created to check how SKILL.md is loaded to OmegaClaw. +description: Created to check how SKILL.md is loaded to Omega. --- Next are instructions and MeTTa functions that should be performed step by step -# Test Workflow (OmegaClaw) +# Test Workflow (Omega) ## Step 1 - demonstrate usage of skills - Call test-skill with "This is a test workflow demonstration" message ## Step 2 - complete workflow - Call `(workflow-unload-instructions)` ``` -`skill.metta` (optional) contains the list of the OmegaClaw skills to load +`skill.metta` (optional) contains the list of the Omega skills to load when workflow is active and additional MeTTa functions which are mentioned in `SKILL.md` file. Skill description are added as high-level expressions. Each such expression -adds one skill to the OmegaClaw. First atom of the expression is `skill` symbol +adds one skill to the Omega. First atom of the expression is `skill` symbol and other atoms are parameters of the `add-skill` function. See [skills.metta](/src/skills.metta) for details. Skill implementations are added as MeTTa functions. @@ -62,7 +62,7 @@ send: `Demonstrate workflow plugin` ## Workflow parameters -Wofkflow plugin OmegaClaw configuration parameters: +Wofkflow plugin Omega configuration parameters: - `pluginWorkflowInstructionsDir` - path to the directory which contains available workflows. Default value is `/plugins/workflow/instructions` diff --git a/plugins/workflow/instructions/research-workflow/SKILL.md b/plugins/workflow/instructions/research-workflow/SKILL.md index 8eb89c3b..f3bff583 100644 --- a/plugins/workflow/instructions/research-workflow/SKILL.md +++ b/plugins/workflow/instructions/research-workflow/SKILL.md @@ -1,9 +1,9 @@ --- name: research-workflow -description: End-to-end research workflow for OmegaClaw. Iterative planning, +description: End-to-end research workflow for Omega. Iterative planning, data acquisition, experiments, and write-up. --- -# Research Workflow (OmegaClaw) +# Research Workflow (Omega) This workflow guides you through problem definition, online research, and creating a detailed execution plan. Once the user approves the plan, it replaces these instructions and you follow it step by step. diff --git a/plugins/workflow/instructions/test-workflow/SKILL.md b/plugins/workflow/instructions/test-workflow/SKILL.md index f66a8c97..55549b95 100644 --- a/plugins/workflow/instructions/test-workflow/SKILL.md +++ b/plugins/workflow/instructions/test-workflow/SKILL.md @@ -1,9 +1,9 @@ --- name: test-workflow -description: Created to check how SKILL.md is loaded to OmegaClaw. +description: Created to check how SKILL.md is loaded to Omega. --- Next are instructions and MeTTa functions that should be performed step by step -# Test Workflow (OmegaClaw) +# Test Workflow (Omega) ## Step 1 - demonstrate usage of skills - Call test-skill with "This is a test workflow demonstration" message ## Step 2 - complete workflow diff --git a/plugins/workflow/workflow.metta b/plugins/workflow/workflow.metta index af21a7d9..07a20420 100644 --- a/plugins/workflow/workflow.metta +++ b/plugins/workflow/workflow.metta @@ -3,11 +3,11 @@ (= (pluginWorkflowInstructionsDir) (empty)) (= (pluginWorkflowMemoryDir) (empty)) -(= (loadOmegaClawPlugin) +(= (loadOmegaPlugin) (progn (configure pluginWorkflowInstructionsDir (joinPath ((projectRootDirectory) "plugins" "workflow" "instructions"))) (if (not (exists-directory (pluginWorkflowInstructionsDir))) - (Error (_loadOmegaClawPlugin) (strings-concat ("Instructions directory: " (pluginWorkflowInstructionsDir) " doesn't exist"))) + (Error (_loadOmegaPlugin) (strings-concat ("Instructions directory: " (pluginWorkflowInstructionsDir) " doesn't exist"))) (progn (configure pluginWorkflowMemoryDir (joinPath ((memoryDirectory) workflow_space))) (log INFO "workflow-plugin" (strings-concat ("Creating working directory: " (pluginWorkflowMemoryDir)))) diff --git a/profile/policy.metta b/profile/policy.metta index 19002c21..4dd5c0fe 100644 --- a/profile/policy.metta +++ b/profile/policy.metta @@ -1,9 +1,9 @@ -!(import! &self (library OmegaClaw-Core ./profile/policy.py)) +!(import! &self (library Omega ./profile/policy.py)) (= (securityPolicyPath) (empty)) (= (applySecurityPolicy) (progn (log INFO "policy" "Configuring security policy") - (configure securityPolicyPath "./repos/OmegaClaw-Core/profile/policy.yaml") + (configure securityPolicyPath "./repos/Omega/profile/policy.yaml") (py-call (policy.apply_security_policy (securityPolicyPath))) True)) diff --git a/profile/policy.yaml b/profile/policy.yaml index b479db42..840d58d3 100644 --- a/profile/policy.yaml +++ b/profile/policy.yaml @@ -13,7 +13,7 @@ filesystem_policy: - /sys/devices/system - /PeTTa read_write: - - /PeTTa/repos/OmegaClaw-Core/memory + - /PeTTa/repos/Omega/memory - /tmp - /dev/null - /opt/huggingface diff --git a/providers/asione.py b/providers/asione.py index 0bb0983f..0237ec7f 100644 --- a/providers/asione.py +++ b/providers/asione.py @@ -22,7 +22,7 @@ def stop(self) -> None: def chat(self, prompt: str, max_tokens: int = 6000, reasoning_mode: str = "medium") -> str: return self.delegate.chat(prompt, max_tokens, reasoning_mode) -def loadOmegaClawPlugin(): +def loadOmegaPlugin(): providers.registerLLMProvider("ASIOne", ASIOneProvider()) class ASIOneProviderImpl(llm.AIProvider): diff --git a/providers/mockprovider.py b/providers/mockprovider.py index 4d21d813..aa3c91bb 100644 --- a/providers/mockprovider.py +++ b/providers/mockprovider.py @@ -16,7 +16,7 @@ def stop(self) -> None: def chat(self, prompt: str, max_tokens: int = 6000, reasoning_mode: str = "medium") -> str: return self.delegate.chat(prompt, max_tokens, reasoning_mode) -def loadOmegaClawPlugin(): +def loadOmegaPlugin(): providers.registerLLMProvider("Test", MockProvider()) class MockProviderImpl(llm.AbstractAIProvider): diff --git a/providers/openai.py b/providers/openai.py index 10072aa0..5491ca9e 100644 --- a/providers/openai.py +++ b/providers/openai.py @@ -23,7 +23,7 @@ def stop(self) -> None: def chat(self, prompt: str, max_tokens: int = 6000, reasoning_mode: str = "medium") -> str: return self.delegate.chat(prompt, max_tokens, reasoning_mode) -def loadOmegaClawPlugin(): +def loadOmegaPlugin(): providers.registerLLMProvider("OpenAI", OpenAIProvider()) class OpenAIProviderImpl(llm.AIProvider): diff --git a/providers/openaiapi.py b/providers/openaiapi.py index bef6f22e..a667fe30 100644 --- a/providers/openaiapi.py +++ b/providers/openaiapi.py @@ -47,7 +47,7 @@ def model(self): def base_url(self): return self._base_url -def loadOmegaClawPlugin(): +def loadOmegaPlugin(): providers.registerLLMProvider("OpenAIAPI", OpenAIAPI("OpenAIAPI")) asicloud_model = config_get_by_key("asicloud_model", "minimax/minimax-m3") providers.registerLLMProvider("ASICloud", OpenAIAPIPreconfigured("ASICloud", "ASI_API_KEY", asicloud_model, "https://inference.asicloud.cudos.org/v1")) diff --git a/providers/openrouter.py b/providers/openrouter.py index b15a35a9..40aca84b 100644 --- a/providers/openrouter.py +++ b/providers/openrouter.py @@ -25,7 +25,7 @@ def stop(self) -> None: def chat(self, prompt: str, max_tokens: int = 6000, reasoning_mode: str = "medium") -> str: return self.delegate.chat(prompt, max_tokens, reasoning_mode) -def loadOmegaClawPlugin(): +def loadOmegaPlugin(): providers.registerLLMProvider("OpenRouter", OpenRouterProvider()) class OpenRouterProviderImpl(llm.AIProvider): diff --git a/proxy/nginx.conf.template b/proxy/nginx.conf.template index 7a96fa9a..f569ea97 100644 --- a/proxy/nginx.conf.template +++ b/proxy/nginx.conf.template @@ -80,7 +80,7 @@ http { # start via the openclaw_url= argument (see entrypoint.sh). location = /openclaw/v1/responses { proxy_pass ${OPENCLAW_URL}v1/responses; - proxy_set_header Authorization "Bearer ${OMEGACLAW_OPENCLAW_TOKEN}"; + proxy_set_header Authorization "Bearer ${OMEGA_OPENCLAW_TOKEN}"; proxy_set_header Content-Type $content_type; proxy_ssl_server_name on; proxy_ssl_protocols TLSv1.2 TLSv1.3; @@ -151,8 +151,8 @@ http { } # Auth secret verification — agent sends candidate token, proxy compares. - # After envsubst, ${OMEGACLAW_AUTH_SECRET} becomes the literal secret. - set $auth_secret_value "${OMEGACLAW_AUTH_SECRET}"; + # After envsubst, ${OMEGA_AUTH_SECRET} becomes the literal secret. + set $auth_secret_value "${OMEGA_AUTH_SECRET}"; location = /auth/status { default_type application/json; @@ -167,7 +167,7 @@ http { if ($auth_secret_value = "") { return 200 '{"match":true}'; } - if ($http_x_auth_token = "${OMEGACLAW_AUTH_SECRET}") { + if ($http_x_auth_token = "${OMEGA_AUTH_SECRET}") { return 200 '{"match":true}'; } return 200 '{"match":false}'; diff --git a/run.metta b/run.metta index 2ebde23a..3b1e0e3a 100644 --- a/run.metta +++ b/run.metta @@ -1,5 +1,5 @@ !(import! &self (library lib_import)) -!(git-import! "https://github.com/asi-alliance/OmegaClaw-Core.git") -!(import! &self (library OmegaClaw-Core lib_omegaclaw)) +!(git-import! "https://github.com/singnet/Omega.git") +!(import! &self (library Omega lib_omega)) -!(omegaclaw) +!(omega) diff --git a/scripts/omegaclaw b/scripts/omega similarity index 78% rename from scripts/omegaclaw rename to scripts/omega index 76a21e02..eeb7bd9b 100755 --- a/scripts/omegaclaw +++ b/scripts/omega @@ -28,7 +28,7 @@ LICENSE_TEXT = """\ ** DISCLAIMER ** -OmegaClaw is experimental, open-source software developed by SingularityNET Foundation, a Swiss foundation, and distributed and promoted by Superintelligence Alliance Ltd., a Singapore company (collectively, the "Parties"), and is provided "AS IS" and "AS AVAILABLE," without warranty of any kind, express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, and non-infringement. OmegaClaw is an autonomous AI agent that is designed to independently set goals, make decisions, and take actions (including actions that the user did not specifically request or anticipate) and whose behavior is influenced by large language models provided by third parties, the outputs of which are inherently non-deterministic. Depending on its configuration and the permissions granted to it, OmegaClaw may execute operating-system shell commands, read, write, modify, or delete files, access network resources, send and receive messages through connected communication channels, and modify its own skills, memory, and operational logic at runtime. OmegaClaw may also be susceptible to prompt injection and other adversarial manipulation techniques whereby malicious content embedded in data sources consumed by the agent could influence its behavior in unintended ways. OmegaClaw supports third-party skills and extensions that have not necessarily been reviewed, audited, or endorsed by either of the Parties and that may introduce security vulnerabilities, cause data loss, or result in unintended behavior including data exfiltration. OmegaClaw relies on third-party services, including large language model providers, whose availability, accuracy, cost, and conduct are outside the control of the Parties and whose use is subject to their respective terms, conditions, and privacy policies. The user is solely responsible for configuring appropriate access controls, sandboxing, and permission boundaries, for monitoring, supervising, and constraining OmegaClaw's actions, for ensuring that no sensitive personal data is exposed to the agent without adequate safeguards, and for all actions taken by OmegaClaw on the user's systems or on the user's behalf, including communications sent and files modified. The user is strongly advised to run OmegaClaw in an isolated environment with the minimum permissions necessary for the intended use case. To the maximum extent permitted by applicable law, in no event shall the Parties, their respective board members, directors, contributors, employees, or affiliates be liable for any direct, indirect, incidental, special, consequential, or exemplary damages (including but not limited to damages for loss of data, loss of profits, business interruption, unauthorized transactions, reputational harm, or any damages arising from the autonomous actions taken by OmegaClaw) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise), even if advised of the possibility of such damages. By downloading, installing, running, or otherwise using OmegaClaw, the user acknowledges that they have read, understood, and agreed to this disclaimer in its entirety. This disclaimer supplements but does not replace the terms of the MIT License under which OmegaClaw is released. +Omega is experimental, open-source software developed by SingularityNET Foundation, a Swiss foundation, and distributed and promoted by Superintelligence Alliance Ltd., a Singapore company (collectively, the "Parties"), and is provided "AS IS" and "AS AVAILABLE," without warranty of any kind, express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, and non-infringement. Omega is an autonomous AI agent that is designed to independently set goals, make decisions, and take actions (including actions that the user did not specifically request or anticipate) and whose behavior is influenced by large language models provided by third parties, the outputs of which are inherently non-deterministic. Depending on its configuration and the permissions granted to it, Omega may execute operating-system shell commands, read, write, modify, or delete files, access network resources, send and receive messages through connected communication channels, and modify its own skills, memory, and operational logic at runtime. Omega may also be susceptible to prompt injection and other adversarial manipulation techniques whereby malicious content embedded in data sources consumed by the agent could influence its behavior in unintended ways. Omega supports third-party skills and extensions that have not necessarily been reviewed, audited, or endorsed by either of the Parties and that may introduce security vulnerabilities, cause data loss, or result in unintended behavior including data exfiltration. Omega relies on third-party services, including large language model providers, whose availability, accuracy, cost, and conduct are outside the control of the Parties and whose use is subject to their respective terms, conditions, and privacy policies. The user is solely responsible for configuring appropriate access controls, sandboxing, and permission boundaries, for monitoring, supervising, and constraining Omega's actions, for ensuring that no sensitive personal data is exposed to the agent without adequate safeguards, and for all actions taken by Omega on the user's systems or on the user's behalf, including communications sent and files modified. The user is strongly advised to run Omega in an isolated environment with the minimum permissions necessary for the intended use case. To the maximum extent permitted by applicable law, in no event shall the Parties, their respective board members, directors, contributors, employees, or affiliates be liable for any direct, indirect, incidental, special, consequential, or exemplary damages (including but not limited to damages for loss of data, loss of profits, business interruption, unauthorized transactions, reputational harm, or any damages arising from the autonomous actions taken by Omega) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise), even if advised of the possibility of such damages. By downloading, installing, running, or otherwise using Omega, the user acknowledges that they have read, understood, and agreed to this disclaimer in its entirety. This disclaimer supplements but does not replace the terms of the Apache License, Version 2.0, under which Omega is released. """ @@ -135,7 +135,7 @@ def _choose_channel(): print("Telegram bot token validated.") if username: print(f"Talk to your bot here: https://t.me/{username}") - print("No Telegram chat ID is needed. OmegaClaw will auto-bind after your first auth message.") + print("No Telegram chat ID is needed. Omega will auto-bind after your first auth message.") return { "commchannel": "telegram", @@ -180,7 +180,7 @@ def _choose_channel(): print(f"Slack channel ID: {channel_id}") print("Invite the bot user to that channel before sending messages.") else: - print("No channel ID set. OmegaClaw will auto-bind to the first channel where auth succeeds.") + print("No channel ID set. Omega will auto-bind to the first channel where auth succeeds.") return { "commchannel": "slack", @@ -300,9 +300,9 @@ def _write_kv(fp, key, value): fp.write(f"{key}={shlex.quote(str(value))}\n") -def config_run_omegaclaw(config_output_path): +def config_run_omega(config_output_path): print(" ") - print("Welcome to OmegaClaw!") + print("Welcome to Omega!") print(" ") require_license_acceptance() @@ -313,7 +313,7 @@ def config_run_omegaclaw(config_output_path): with open(config_output_path, "w", encoding="utf-8") as f: _write_kv(f, "api_token_var", api_token_var) _write_kv(f, "api_token", token) - _write_kv(f, "OMEGACLAW_AUTH_SECRET", "".join(secrets.choice(string.digits) for _ in range(6))) + _write_kv(f, "OMEGA_AUTH_SECRET", "".join(secrets.choice(string.digits) for _ in range(6))) _write_kv(f, "provider", provider) _write_kv(f, "embeddingprovider", embeddingprovider) _write_kv(f, "model", model) @@ -324,7 +324,7 @@ def config_run_omegaclaw(config_output_path): if __name__ == "__main__": - config_run_omegaclaw(sys.argv[1]) + config_run_omega(sys.argv[1]) PY python3 "$tmp_py_file" "$tmp_config_file" set LLM model to use with provider (default depends on provider)." echo -e "\t-u set LLM API URL for the OpenAIAPI provider" echo -e "\t-g enable the openclaw plugin against this Gateway" - echo -e "\t Pass the Gateway token via OMEGACLAW_OPENCLAW_TOKEN" + echo -e "\t Pass the Gateway token via OMEGA_OPENCLAW_TOKEN" echo -e "\t-c set IRC channel" echo -e "\t-t set communication channel type: irc|telegram|slack|websocket|mattermost|test" - echo -e "\t-d set Docker image name (default omegaclaw:latest)" + echo -e "\t-d set Docker image name (default omega:latest)" echo -e "\t-l set Python logging config file" - echo -e "\t--version, -v show the OmegaClaw version" + echo -e "\t--version, -v show the Omega version" echo -e "\t--help, -h show this help" } options() { - OMEGACLAW_AUTH_SECRET=0000 + OMEGA_AUTH_SECRET=0000 provider=ASICloud - image=singularitynet/omegaclaw:latest + image=singularitynet/omega:latest commchannel=irc - IRC_channel="${IRC_channel:-##omegaclaw}" + IRC_channel="${IRC_channel:-##omega}" TG_BOT_TOKEN="${TG_BOT_TOKEN:-}" TG_POLL_TIMEOUT="${TG_POLL_TIMEOUT:-20}" SL_BOT_TOKEN="${SL_BOT_TOKEN:-}" @@ -512,7 +512,7 @@ options() { SL_POLL_INTERVAL="${SL_POLL_INTERVAL:-2}" WS_URL="${WS_URL:-}" WS_TOKEN="${WS_TOKEN:-}" - OMEGACLAW_OPENCLAW_TOKEN="${OMEGACLAW_OPENCLAW_TOKEN:-}" + OMEGA_OPENCLAW_TOKEN="${OMEGA_OPENCLAW_TOKEN:-}" commchannel=irc log_config_path="" @@ -527,7 +527,7 @@ options() { while getopts s:t:p:u:g:c:d:l:m: flag do case "${flag}" in - s) OMEGACLAW_AUTH_SECRET=${OPTARG};; + s) OMEGA_AUTH_SECRET=${OPTARG};; t) commchannel=${OPTARG};; p) provider=${OPTARG};; u) openaiapi_url=${OPTARG};; @@ -586,7 +586,7 @@ options() { } start() { - docker rm -f omegaclaw 2>/dev/null || true + docker rm -f omega 2>/dev/null || true docker pull "${image}" 2>/dev/null || true container_log_config_path="" @@ -599,32 +599,32 @@ start() { fi log_config_abs="$(cd -- "$(dirname -- "${log_config_path}")" && pwd)/$(basename -- "${log_config_path}")" - container_log_config_path="/tmp/omegaclaw-logging.conf" + container_log_config_path="/tmp/omega-logging.conf" log_config_volume=(--volume "${log_config_abs}:${container_log_config_path}:ro") fi docker_cmd=( docker run -d -it - --name omegaclaw + --name omega --security-opt no-new-privileges:true --init --add-host=host.docker.internal:host-gateway --tmpfs /tmp:size=64m,mode=1777 --tmpfs /var/tmp:size=64m,mode=1777 --tmpfs /run:size=16m,mode=755 - --volume omegaclaw-memory:/PeTTa/repos/OmegaClaw-Core/memory + --volume omega-memory:/PeTTa/repos/Omega/memory ${log_config_volume[@]+"${log_config_volume[@]}"} -e "${api_token_var}"="${api_token}" -e "TG_BOT_TOKEN=${TG_BOT_TOKEN:-}" -e "SL_BOT_TOKEN=${SL_BOT_TOKEN:-}" - -e "OMEGACLAW_OPENCLAW_TOKEN=${OMEGACLAW_OPENCLAW_TOKEN:-}" - -e OMEGACLAW_AUTH_SECRET="$OMEGACLAW_AUTH_SECRET" + -e "OMEGA_OPENCLAW_TOKEN=${OMEGA_OPENCLAW_TOKEN:-}" + -e OMEGA_AUTH_SECRET="$OMEGA_AUTH_SECRET" -e IMPORT_KB_ON_START="${IMPORT_KB_ON_START:-0}" "$image" "commchannel=${commchannel}" "provider=${provider}" "embeddingprovider=${embeddingprovider}" - "securityPolicyPath=/PeTTa/repos/OmegaClaw-Core/profile/policy.yaml" + "securityPolicyPath=/PeTTa/repos/Omega/profile/policy.yaml" ) if [ -n "${container_log_config_path}" ]; then @@ -666,12 +666,12 @@ start() { } stop() { - docker stop omegaclaw + docker stop omega } clean() { - docker rm -f omegaclaw - docker volume rm omegaclaw-memory + docker rm -f omega + docker volume rm omega-memory } set -euo pipefail diff --git a/src/config.metta b/src/config.metta index b259c40d..de5503fb 100644 --- a/src/config.metta +++ b/src/config.metta @@ -13,7 +13,7 @@ (add-atom &self (= ($key) $value)))) ; Get configuration parameter from the list of sources: (1) command line -; parameters, (2) environment variable with OMEGACLAW_$key name, (3) +; parameters, (2) environment variable with OMEGA_$key name, (3) ; configuration file, (4) use $default value. (= (configGetByKey $key $default) (py-call (config.config_get_by_key $key $default))) diff --git a/src/config.py b/src/config.py index 2dce6984..492cb42a 100644 --- a/src/config.py +++ b/src/config.py @@ -30,14 +30,14 @@ def init_config(command_line): def config_get_by_key(key, default=None): """Get configuration parameter from the list of sources: (1) command line - parameters, (2) environment variable with OMEGACLAW_$key name, (3) + parameters, (2) environment variable with OMEGA_$key name, (3) configuration file, (4) use $default value.""" global _CONFIG, _COMMAND_LINE, _CONFIG_FILE if key in _CONFIG: return _CONFIG.get(key) if key in _COMMAND_LINE: return _cache_config(key, _COMMAND_LINE.get(key), "command line") - envkey = f"OMEGACLAW_{key}" + envkey = f"OMEGA_{key}" if envkey in os.environ: return _cache_config(key, os.environ.get(envkey), "environment variable") if key in _CONFIG_FILE: diff --git a/src/helper.py b/src/helper.py index 6056568f..7f71c3e6 100644 --- a/src/helper.py +++ b/src/helper.py @@ -63,7 +63,7 @@ def extract_timestamp(line): def around_time(needle_time_str, k): needle_time_str = needle_time_str.replace(r'\"', '').replace('"', '').strip() - filename = "repos/OmegaClaw-Core/memory/history.metta" + filename = "repos/Omega/memory/history.metta" target = datetime.strptime(needle_time_str, "%Y-%m-%d %H:%M:%S") best_lineno = None best_line = None @@ -206,18 +206,18 @@ def projectRootDirectory(): return os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -def _format_omegaclaw_version(version: str) -> str | None: +def _format_omega_version(version: str) -> str | None: version = version.strip() if not version: return None - if version.startswith("OmegaClaw version="): + if version.startswith("Omega version="): return version - if version.startswith("OmegaClaw "): - version = version[len("OmegaClaw "):] - return f"OmegaClaw version={version}" + if version.startswith("Omega "): + version = version[len("Omega "):] + return f"Omega version={version}" -def omegaclaw_version(repo_root: str | os.PathLike | None = None) -> str: +def omega_version(repo_root: str | os.PathLike | None = None) -> str: """Return the checkout version, falling back to the baked version file.""" root = Path(repo_root) if repo_root is not None else Path(projectRootDirectory()) @@ -235,14 +235,14 @@ def omegaclaw_version(repo_root: str | os.PathLike | None = None) -> str: timeout=3, ) if result.returncode == 0: - version = _format_omegaclaw_version(result.stdout) + version = _format_omega_version(result.stdout) if version is not None: return version except (OSError, subprocess.TimeoutExpired): pass try: - version = _format_omegaclaw_version( + version = _format_omega_version( (root / "version").read_text(encoding="utf-8") ) if version is not None: @@ -250,19 +250,19 @@ def omegaclaw_version(repo_root: str | os.PathLike | None = None) -> str: except OSError: pass - return "OmegaClaw unknown" + return "Omega unknown" -def test_omegaclaw_version(): +def test_omega_version(): with TemporaryDirectory() as directory: root = Path(directory) - assert omegaclaw_version(root) == "OmegaClaw unknown" + assert omega_version(root) == "Omega unknown" (root / "version").write_text("v1.2.3-4-g1234567\n", encoding="utf-8") - assert omegaclaw_version(root) == "OmegaClaw version=v1.2.3-4-g1234567" + assert omega_version(root) == "Omega version=v1.2.3-4-g1234567" - (root / "version").write_text("OmegaClaw v1.2.3\n", encoding="utf-8") - assert omegaclaw_version(root) == "OmegaClaw version=v1.2.3" + (root / "version").write_text("Omega v1.2.3\n", encoding="utf-8") + assert omega_version(root) == "Omega version=v1.2.3" def test_balance_parenthesis(): @@ -307,5 +307,5 @@ def test_balance_parenthesis(): '((Error UNKNOWN_SKILL_CALL "workflow-load-instructions test-workflow"))' if __name__ == "__main__": - test_omegaclaw_version() + test_omega_version() test_balance_parenthesis() diff --git a/src/loop.metta b/src/loop.metta index 2b7b7e95..9e9e6360 100644 --- a/src/loop.metta +++ b/src/loop.metta @@ -55,9 +55,9 @@ (progn (change-state! &error $new) (ALERT_FAILED $a $b)))) ($else $sexpr)))) -(= (omegaclaw) - (omegaclaw 1)) -(= (omegaclaw $k) +(= (omega) + (omega 1)) +(= (omega $k) (progn (if (== $k 1) (progn (initConfig) (initLoop) (initLogger) @@ -106,4 +106,4 @@ (sleep (sleepInterval)) (cut) (gc) - (omegaclaw (+ 1 $k)))))) + (omega (+ 1 $k)))))) diff --git a/src/memory.metta b/src/memory.metta index 39795f29..3f5fae36 100644 --- a/src/memory.metta +++ b/src/memory.metta @@ -17,18 +17,18 @@ (= (getPrompt $provider) (let $model_prompt - (library OmegaClaw-Core (py-str ("./memory/prompt_" $provider ".txt"))) + (library Omega (py-str ("./memory/prompt_" $provider ".txt"))) (if (exists-file $model_prompt) (read-file $model_prompt) (let $default_prompt ;Safely read the default prompt. Return an empty string if the file does not exist. - (library OmegaClaw-Core ./memory/prompt.txt) + (library Omega ./memory/prompt.txt) (if (exists-file $default_prompt) (read-file $default_prompt) ""))))) (= (getHistory) (let $history_file - (library OmegaClaw-Core ./memory/history.metta) + (library Omega ./memory/history.metta) (if (exists-file $history_file) ;Safely read the history. Return an empty string if the file does not exist. (read_file_tail $history_file (maxHistory)) ""))) @@ -48,7 +48,7 @@ (py-call (rag.openai_embed (string-safe $str))))) (= (appendToHistory $addition) - (append-file-raw (library OmegaClaw-Core ./memory/history.metta) (swrite $addition))) + (append-file-raw (library Omega ./memory/history.metta) (swrite $addition))) (= (remember $str) (progn (py-call (lib_chromadb.remember $str (embed $str) (get_time_as_string))) diff --git a/src/plugin.metta b/src/plugin.metta index e0b92473..0f3f8a36 100644 --- a/src/plugin.metta +++ b/src/plugin.metta @@ -28,8 +28,8 @@ (if (== () (collapse (import! $space $path))) (Error (_loadMettaPlugin $name $location) (strings-concat ("Cannot import " $name " plugin from " $path))) (progn - (let $rcs (collapse (eval (loadOmegaClawPlugin))) ()) - (match $space (= (loadOmegaClawPlugin) $body) (remove-atom $space (= (loadOmegaClawPlugin) $body))) + (let $rcs (collapse (eval (loadOmegaPlugin))) ()) + (match $space (= (loadOmegaPlugin) $body) (remove-atom $space (= (loadOmegaPlugin) $body))) (let $agg (|-> ($acc $next) (if (== $acc ()) (if (== Error (car-atom $next)) $next ()) ())) (let $rc (foldl-atom $rcs () $agg) ())) $rc)))) diff --git a/src/plugin.py b/src/plugin.py index 047175cc..b3fdeed3 100644 --- a/src/plugin.py +++ b/src/plugin.py @@ -1,5 +1,5 @@ """ -This is OmegaClaw internal API which is built on the top of the plugins API. +This is Omega internal API which is built on the top of the plugins API. Most of the functions here calls corresponding functions of the registered plugins. """ @@ -75,7 +75,7 @@ def addLocationToPath(location): def loadPythonPlugin(name, location): """Python plugin loader implementation. If location of the plugin is specified it imports "/.py" file. Imports Python - module otherwise. Calls "loadOmegaClawPlugin" function from the imported + module otherwise. Calls "loadOmegaPlugin" function from the imported module. This is the point where plugin's code gets control and should register appropriate callbacks.""" global _plugins, _REPO @@ -100,7 +100,7 @@ def loadPythonPlugin(name, location): else: _error("_initPythonPlugin", f"Couldn't find Python module {name}") - if not hasattr(mod, "loadOmegaClawPlugin"): - _error("_initPythonPlugin", f"No loadOmegaClawPlugin() function is implemented by plugin {name}") - plugin_loader = getattr(mod, "loadOmegaClawPlugin") + if not hasattr(mod, "loadOmegaPlugin"): + _error("_initPythonPlugin", f"No loadOmegaPlugin() function is implemented by plugin {name}") + plugin_loader = getattr(mod, "loadOmegaPlugin") plugin_loader() diff --git a/src/skills.metta b/src/skills.metta index aa50bfa1..bca8c9ad 100644 --- a/src/skills.metta +++ b/src/skills.metta @@ -21,7 +21,7 @@ ;COMMUNICATION CHANNELS: "- Send message to user: send string" "- Search the web: websearch string" - "- To get the OmegaClaw version number: version" + "- To get the Omega version number: version" ;CODE EXECUTION: "- Execute MeTTa expression: metta sexpression" ;ADDITIONAL RULES AND CLARIFICATIONS FOR SKILLS @@ -137,7 +137,7 @@ (= (get-io-policy) (py-call (policy.get_allowed_policy_paths (securityPolicyPath)))) -!(import_prolog_functions_from_file (library OmegaClaw-Core ./src/skills.pl) (shell first_char gc read_file_tail)) +!(import_prolog_functions_from_file (library Omega ./src/skills.pl) (shell first_char gc read_file_tail)) (= (metta $str) (let $code (sread $str) @@ -147,4 +147,4 @@ PIN-SUCCESS) (= (version) - (py-call (helper.omegaclaw_version))) + (py-call (helper.omega_version))) diff --git a/tests/res/test_plugin.metta b/tests/res/test_plugin.metta index 9a416888..4d3358d7 100644 --- a/tests/res/test_plugin.metta +++ b/tests/res/test_plugin.metta @@ -1,2 +1,2 @@ -(= (loadOmegaClawPlugin) +(= (loadOmegaPlugin) (change-state! &test_plugin_loaded True)) diff --git a/tests/res/test_plugin_error.metta b/tests/res/test_plugin_error.metta index 8712f56f..aa213a27 100644 --- a/tests/res/test_plugin_error.metta +++ b/tests/res/test_plugin_error.metta @@ -1,2 +1,2 @@ -(= (loadOmegaClawPlugin) - (Error (_loadOmegaClawPlugin) "Plugin internal error")) +(= (loadOmegaPlugin) + (Error (_loadOmegaPlugin) "Plugin internal error")) diff --git a/tests/src_config.metta b/tests/src_config.metta index 61c647cc..3ba0dc5e 100644 --- a/tests/src_config.metta +++ b/tests/src_config.metta @@ -12,7 +12,7 @@ (= (command-line) ("config=./tests/res/src_config_empty.yaml" "arg_cmdline=val_cmdline")) -!(py-call (utils.setenv OMEGACLAW_arg_env val_env)) +!(py-call (utils.setenv OMEGA_arg_env val_env)) !(initConfig) !(test (configGetByKey arg_config val_default) val_default) @@ -27,7 +27,7 @@ (= (command-line) ("config=./tests/res/src_config_filled.yaml" "arg_cmdline=val_cmdline")) -!(py-call (utils.setenv OMEGACLAW_arg_env val_env)) +!(py-call (utils.setenv OMEGA_arg_env val_env)) !(initConfig) !(test (configGetByKey arg_config val_default) val_config) @@ -52,8 +52,8 @@ (= (command-line) ("config=./tests/res/src_config_priorities.yaml" "arg_cmdline=val_cmdline")) -!(py-call (utils.setenv OMEGACLAW_arg_cmdline val_env)) -!(py-call (utils.setenv OMEGACLAW_arg_env val_env)) +!(py-call (utils.setenv OMEGA_arg_cmdline val_env)) +!(py-call (utils.setenv OMEGA_arg_env val_env)) !(initConfig) !(test (configGetByKey arg_cmdline val_default) val_cmdline) diff --git a/tests/src_plugin.metta b/tests/src_plugin.metta index ae16da76..d00f8dbe 100644 --- a/tests/src_plugin.metta +++ b/tests/src_plugin.metta @@ -18,4 +18,4 @@ True) !(test (loadPlugin (metta "test_plugin_error" "./tests/res")) - (Error (_loadOmegaClawPlugin) "Plugin internal error")) + (Error (_loadOmegaPlugin) "Plugin internal error")) diff --git a/tests/test_auth_standalone.py b/tests/test_auth_standalone.py index 1cc00ffa..ac594d66 100644 --- a/tests/test_auth_standalone.py +++ b/tests/test_auth_standalone.py @@ -25,7 +25,7 @@ def load_auth_module(monkeypatch, gateway_url=""): def test_standalone_auth_rejects_wrong_secret(monkeypatch): - monkeypatch.setenv("OMEGACLAW_AUTH_SECRET", "1234") + monkeypatch.setenv("OMEGA_AUTH_SECRET", "1234") auth = load_auth_module(monkeypatch) assert auth.is_auth_enabled() is True @@ -34,7 +34,7 @@ def test_standalone_auth_rejects_wrong_secret(monkeypatch): def test_standalone_auth_without_secret_is_disabled_and_denies(monkeypatch): - monkeypatch.delenv("OMEGACLAW_AUTH_SECRET", raising=False) + monkeypatch.delenv("OMEGA_AUTH_SECRET", raising=False) auth = load_auth_module(monkeypatch) assert auth.is_auth_enabled() is False @@ -42,7 +42,7 @@ def test_standalone_auth_without_secret_is_disabled_and_denies(monkeypatch): def test_standalone_auth_accepts_unicode_secret(monkeypatch): - monkeypatch.setenv("OMEGACLAW_AUTH_SECRET", "пароль🔒") + monkeypatch.setenv("OMEGA_AUTH_SECRET", "пароль🔒") auth = load_auth_module(monkeypatch) assert auth.verify_token("пароль🔒") is True @@ -68,7 +68,7 @@ def test_corrupt_saved_user_file_is_wrapped(monkeypatch, tmp_path): def test_saved_owner_blocks_auth_secret_reuse_after_restart(monkeypatch, tmp_path): - monkeypatch.setenv("OMEGACLAW_AUTH_SECRET", "one-time-secret") + monkeypatch.setenv("OMEGA_AUTH_SECRET", "one-time-secret") first_process = load_auth_module(monkeypatch) monkeypatch.setattr(first_process, "_MEMORY_DIRECTORY", str(tmp_path))