Compare commits

...

30 Commits

Author SHA1 Message Date
Alexander Whitestone
92bd58c248 fix: replace hardcoded VPS IP with dynamic WebSocket URL (#1414)
Some checks failed
CI / test (pull_request) Failing after 1m18s
CI / validate (pull_request) Failing after 1m15s
Review Approval Gate / verify-review (pull_request) Failing after 4s
2026-04-14 15:15:06 -04:00
6160e87446 feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Failing after 6s
Staging Verification Gate / verify-staging (push) Failing after 3s
2026-04-14 15:34:03 +00:00
d0fc662ad2 feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 15:33:59 +00:00
4e8e9cd08d feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 15:33:56 +00:00
189c657fec feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 15:33:53 +00:00
abe21ce6ec feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 15:33:51 +00:00
114525da5f feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Failing after 5s
Staging Verification Gate / verify-staging (push) Failing after 5s
Review Approval Gate / verify-review (pull_request) Failing after 9s
CI / test (pull_request) Failing after 51s
CI / validate (pull_request) Failing after 53s
2026-04-14 11:36:09 +00:00
0de60a756f feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 11:36:05 +00:00
e7bf08b799 feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 11:36:03 +00:00
749878d3ea feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 11:36:01 +00:00
e24ad0f0a7 feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 11:36:00 +00:00
1907388517 [claude] Close duplicate PRs for issue #1128 (#1449) (#1466)
Some checks failed
Deploy Nexus / deploy (push) Failing after 6s
Staging Verification Gate / verify-staging (push) Failing after 6s
Review Approval Gate / verify-review (pull_request) Failing after 9s
CI / validate (pull_request) Failing after 46s
CI / test (pull_request) Failing after 48s
2026-04-14 02:28:09 +00:00
dbd2e400c0 Merge pull request 'feat: Add forge cleanup tools and documentation (#1128)' (#1437) from q/1128-1776129480 into main
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 02:23:59 +00:00
071643c976 [claude] Close duplicate PRs for issue #1338 (#1451) (#1464)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 02:17:43 +00:00
c7a317babc [claude] Close duplicate PRs for issue #1339 (#1450) (#1465)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 02:17:38 +00:00
7e23aa0827 [claude] Close duplicate PRs for issue #1336 (#1452) (#1456)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 02:07:06 +00:00
1eeeea4412 Merge pull request 'fix: Remove duplicate content blocks from README.md and POLICY.md (#1338)' (#1432) from q/1338-1776129480 into main
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 02:02:52 +00:00
cd78f9e4c8 feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 01:57:22 +00:00
5171dda46a feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 01:57:17 +00:00
682431fab1 feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 01:57:14 +00:00
7eb339f3ce feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 01:57:13 +00:00
2f5f874e84 feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 01:57:11 +00:00
ad98bd5ead feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
CI / test (pull_request) Failing after 51s
CI / validate (pull_request) Failing after 51s
Review Approval Gate / verify-review (pull_request) Failing after 7s
2026-04-14 01:52:55 +00:00
e847b0e473 feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 01:52:51 +00:00
63c6829ef8 feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Staging Verification Gate / verify-staging (push) Has been cancelled
Deploy Nexus / deploy (push) Has been cancelled
2026-04-14 01:52:48 +00:00
a55647d5d3 feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 01:52:45 +00:00
64719324e0 feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 01:52:43 +00:00
ee6d12ccf6 [claude] Add .gitattributes export-ignore + large-repo clone docs (#1428) (#1433)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
2026-04-14 01:51:18 +00:00
84eb8104d8 feat: standardize llama.cpp backend for sovereign local inference (#1123)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
Staging Verification Gate / verify-staging (push) Has been cancelled
Review Approval Gate / verify-review (pull_request) Failing after 10s
CI / test (pull_request) Failing after 55s
CI / validate (pull_request) Failing after 56s
2026-04-14 01:48:34 +00:00
Alexander Whitestone
e683a2213f fix: Remove duplicate content blocks from README.md and POLICY.md (#1338)
Some checks failed
CI / test (pull_request) Failing after 40s
Review Approval Gate / verify-review (pull_request) Failing after 6s
CI / validate (pull_request) Failing after 38s
This commit fixes issue #1338 by removing duplicate content blocks that
were appearing 3-4 times on the page.

Changes:
1. README.md:
   - Removed duplicate "Branch Protection & Review Policy" section (lines 121-134)
   - Removed duplicate "Running Locally" section (lines 149-167)
   - Kept the detailed "Branch Protection & Review Policy" section at the top
   - Kept the first "Running Locally" section with all content

2. POLICY.md:
   - Consolidated duplicate content into single cohesive policy
   - Merged two "Branch Protection Rules" sections
   - Merged two "Default Reviewer" sections
   - Merged two "Acceptance Criteria" sections
   - Added "Enforcement" and "Notes" sections from second half

The duplicate content was likely caused by a bad merge or template duplication.
This cleanup ensures each section appears only once while preserving all content.

Closes #1338
2026-04-13 21:44:26 -04:00
11 changed files with 153 additions and 104 deletions

48
.gitattributes vendored Normal file
View File

@@ -0,0 +1,48 @@
# .gitattributes
# Controls git archive exports and helps categorize repo contents.
# export-ignore: excluded from `git archive` tarballs and sparse-export contexts.
#
# For agents blocked by repo size on clone, see CONTRIBUTING.md §"Large-Repo Clone Strategy".
# ── Documentation & reports (not needed for runtime or tests) ──────────────────
docs/ export-ignore
reports/ export-ignore
audits/ export-ignore
reviews/ export-ignore
paper/ export-ignore
scaffold/ export-ignore
playground/ export-ignore
examples/ export-ignore
intelligence/ export-ignore
# Root-level narrative docs (keep CLAUDE.md, README.md, CONTRIBUTING.md)
FINDINGS-*.md export-ignore
FIRST_LIGHT_REPORT*.md export-ignore
INVESTIGATION_*.md export-ignore
LEGACY_MATRIX_AUDIT.md export-ignore
SOUL.md export-ignore
POLICY.md export-ignore
BROWSER_CONTRACT.md export-ignore
EVENNIA_NEXUS_EVENT_PROTOCOL.md export-ignore
GAMEPORTAL_PROTOCOL.md export-ignore
DEVELOPMENT.md export-ignore
# ── Operation-specific directories ────────────────────────────────────────────
operation-get-a-job/ export-ignore
operations/ export-ignore
org/ export-ignore
concept-packs/ export-ignore
evolution/ export-ignore
# ── Assets (binary/media files not needed for CI) ─────────────────────────────
assets/ export-ignore
icons/ export-ignore
# ── Linguist overrides (GitHub/Gitea language stats) ──────────────────────────
docs/ linguist-documentation
scaffold/ linguist-documentation
paper/ linguist-documentation
reports/ linguist-documentation
audits/ linguist-documentation
*.md linguist-documentation

View File

@@ -136,6 +136,44 @@ Hotfixes require:
---
## Large-Repo Clone Strategy
Some repos in this org (hermes-agent, the-nexus as it grows) can exceed 1000 tracked files, which causes `git clone --depth 1` to time out and also hits the Gitea tree-API cap of 1000 entries.
### Recommended clone patterns for agents
**Blobless partial clone** — fastest overall; metadata arrives immediately, blobs are fetched on demand:
```sh
git clone --filter=blob:none --depth 1 <repo-url>
```
**Treeless partial clone** — skips tree objects for past commits; best when you need full working tree but not history:
```sh
git clone --filter=tree:0 <repo-url>
```
**Sparse checkout** — only materialise the subdirectories you actually need:
```sh
git clone --filter=blob:none --no-checkout <repo-url> myrepo
cd myrepo
git sparse-checkout init --cone
git sparse-checkout set nexus tests # only check out these dirs
git checkout main
```
### Gitea tree API workaround
When the tree endpoint returns exactly 1000 entries and you suspect truncation, pass `recursive=1` and page through with the `page` parameter:
```
GET /api/v1/repos/{owner}/{repo}/git/trees/{sha}?recursive=1&page=2
```
### Why `.gitattributes` export-ignore exists
Directories marked `export-ignore` in `.gitattributes` are excluded from `git archive` tarballs and future sparse-export tooling. This reduces the surface area for export-based agent workflows. It does **not** affect `git clone` directly — use the partial-clone flags above for that.
---
## Stale PR Policy
A cron job runs every 6 hours and auto-closes PRs that are:

View File

@@ -27,7 +27,7 @@ All repositories must define default reviewers using CODEOWNERS-style configurat
---
### <EFBFBD> Affected Repositories
### 📋 Affected Repositories
| Repository | Status | Notes |
|-------------|--------|-------|
@@ -49,46 +49,15 @@ All repositories must define default reviewers using CODEOWNERS-style configurat
---
### <EFBFBD> Blocks
- Blocks #916, #917
- cc @Timmy @Rockachopa
@perplexity, Integration Architect + QA
## 🛡️ Branch Protection Rules
These rules must be applied to the `main` branch of all repositories:
- [R] **Require Pull Request for Merge** No direct pushes to `main`
- [x] **Require 1 Approval** At least one reviewer must approve
- [R] **Dismiss Stale Approvals** Re-review after new commits
- [x] **Require CI to Pass** Only allow merges with passing CI (where CI exists)
- [x] **Block Force Push** Prevent rewrite history
- [x] **Block Branch Deletion** Prevent accidental deletion of `main`
## 👤 Default Reviewer
- `@perplexity` Default reviewer for all repositories
- `@Timmy` Required reviewer for `hermes-agent` (owner gate)
## 🚧 Enforcement
### 🚧 Enforcement
- All repositories must have these rules applied in the Gitea UI under **Settings > Branches > Branch Protection**.
- CI must be configured and enforced for repositories with CI pipelines.
- Reviewers assignments must be set via CODEOWNERS or manually in the UI.
## 📌 Acceptance Criteria
---
- [ ] Branch protection rules applied to `main` in:
- `hermes-agent`
- `the-nexus`
- `timmy-home`
- `timmy-config`
- [ ] `@perplexity` set as default reviewer
- [ ] `@Timmy` set as required reviewer for `hermes-agent`
- [ ] This policy documented in each repository's root
## 🧠 Notes
### 🧠 Notes
- For repositories without CI, the "Require CI to Pass" rule is optional.
- This policy is versioned and must be updated as needed.
- This policy is versioned and must be updated as needed.

View File

@@ -118,41 +118,6 @@ Those pieces should be carried forward only if they serve the mission and are re
There is no root browser app on current `main`.
Do not tell people to static-serve the repo root and expect a world.
### Branch Protection & Review Policy
**All repositories enforce:**
- PRs required for all changes
- Minimum 1 approval required
- CI/CD must pass
- No force pushes
- No direct pushes to main
**Default reviewers:**
- `@perplexity` for all repositories
- `@Timmy` for nexus/ and hermes-agent/
**Enforced by Gitea branch protection rules**
### What you can run now
- `python3 server.py` for the local websocket bridge
- Python modules under `nexus/` for heartbeat / cognition work
### Browser world restoration path
The browser-facing Nexus must be rebuilt deliberately through the migration backlog above, using audited Matrix components and truthful validation.
---
*One 3D repo. One migration path. No more ghost worlds.*
## Running Locally
### Current repo truth
There is no root browser app on current `main`.
Do not tell people to static-serve the repo root and expect a world.
### What you can run now
- `python3 server.py` for the local websocket bridge

4
app.js
View File

@@ -1261,7 +1261,7 @@ async function updateSovereignHealth() {
{ name: 'LOCAL DAEMON', status: daemonReachable ? 'ONLINE' : 'OFFLINE' },
{ name: 'FORGE / GITEA', url: 'https://forge.alexanderwhitestone.com', status: 'ONLINE' },
{ name: 'NEXUS CORE', url: 'https://forge.alexanderwhitestone.com/Timmy_Foundation/the-nexus', status: 'ONLINE' },
{ name: 'HERMES WS', url: 'ws://143.198.27.163:8765', status: wsConnected ? 'ONLINE' : 'OFFLINE' },
{ name: 'HERMES WS', url: `${window.location.protocol === 'https:' ? 'wss:' : 'ws:'}//${window.location.host}/api/world/ws`, status: wsConnected ? 'ONLINE' : 'OFFLINE' },
{ name: 'SOVEREIGNTY', url: 'http://localhost:8082/metrics', status: metrics.sovereignty_score + '%' }
];
@@ -2190,7 +2190,7 @@ function connectHermes() {
}
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
const wsUrl = `${protocol}//${window.location.host}/api/world/ws`;
const wsUrl = `${window.location.protocol === \"https:\" ? \"wss:\" : \"ws:\"}//${window.location.host}/api/world/ws`;
console.log(`Connecting to Hermes at ${wsUrl}...`);
hermesWs = new WebSocket(wsUrl);

View File

@@ -2,7 +2,6 @@
"""llama_client.py — OpenAI-compatible client for llama.cpp HTTP API."""
import argparse, json, os, sys, time
from dataclasses import dataclass
from typing import Generator, Optional
import urllib.request, urllib.error
DEFAULT_ENDPOINT = os.environ.get("LLAMA_ENDPOINT", "http://localhost:11435")

View File

@@ -1,6 +1,6 @@
# Local LLM Deployment Guide — llama.cpp
Standardizes local LLM inference across the fleet. One binary, one model path, one health endpoint.
Standardizes local LLM inference across the fleet using llama.cpp.
## Quick Start
@@ -10,43 +10,39 @@ Standardizes local LLM inference across the fleet. One binary, one model path, o
mkdir -p /opt/models/llama
wget -O /opt/models/llama/Qwen2.5-7B-Instruct-Q4_K_M.gguf "https://huggingface.co/Qwen/Qwen2.5-7B-Instruct-GGUF/resolve/main/qwen2.5-7b-instruct-q4_k_m.gguf"
llama-server -m /opt/models/llama/Qwen2.5-7B-Instruct-Q4_K_M.gguf --host 0.0.0.0 --port 11435 -c 4096 -t $(nproc) --cont-batching
curl http://localhost:11435/health
## Model Path Convention
## Model Paths
- /opt/models/llama/ — Production (system-wide)
- ~/models/llama/ — Per-user (dev)
- /opt/models/llama/ — Production
- ~/models/llama/ — Dev
- MODEL_DIR env var — Override
## Recommended Models
## Models
- Qwen2.5-7B-Instruct (4.7GB, 8GB RAM) — Fleet standard
- Qwen2.5-3B-Instruct (2.0GB, 4GB RAM) — VPS Beta
- Mistral-7B-Instruct-v0.3 (4.4GB, 8GB RAM) — Alternative
- Qwen2.5-7B-Instruct-Q4_K_M (4.7GB) — Fleet standard, VPS Alpha
- Qwen2.5-3B-Instruct-Q4_K_M (2.0GB) — VPS Beta
- Mistral-7B-Instruct-v0.3-Q4_K_M (4.4GB) — Alternative
## Quantization
- Q6_K (5.5GB) — Best quality/speed
- Q4_K_M (4.7GB) — Fleet standard
- Q3_K_M (3.4GB) — Low-RAM fallback
- Q6_K (5.5GB) — Best quality/speed, 12GB+ RAM
- Q4_K_M (4.7GB) — Fleet standard, 8GB RAM
- Q3_K_M (3.4GB) — Low-RAM fallback, 4GB
## Hardware Targets
## Hardware
- VPS Beta (2 vCPU, 4GB): Qwen2.5-3B-Q4_K_M, ctx 2048, ~40-60 tok/s
- VPS Alpha (4 vCPU, 8GB): Qwen2.5-7B-Q4_K_M, ctx 4096, ~20-35 tok/s
- Mac Apple Silicon: Qwen2.5-7B-Q6_K, Metal, ~30-50 tok/s
- VPS Beta (2c/4GB): 3B-Q4_K_M, ctx 2048, ~40-60 tok/s
- VPS Alpha (4c/8GB): 7B-Q4_K_M, ctx 4096, ~20-35 tok/s
- Mac (AS/16GB+): 7B-Q6_K, Metal, ~30-50 tok/s
## Health Check
## Health
curl -sf http://localhost:11435/health && echo OK || echo FAIL
## API
llama-server exposes OpenAI-compatible API at /v1/chat/completions.
curl -sf http://localhost:11435/health
curl -s http://localhost:11435/v1/models
## Troubleshooting
- Won't start → smaller model / lower quant
- Slow → match -t to cores
- OOM → reduce -c context
- Slow → -t to core count
- OOM → reduce -c
- Port conflict → lsof -i :11435

20
pr_cleanup_1451.md Normal file
View File

@@ -0,0 +1,20 @@
# PR Cleanup: Issue #1338 Duplicate PRs
## Summary
Resolved duplicate PR situation for issue #1338 (Remove duplicate content blocks from README.md and POLICY.md).
## Actions Taken
- **PR #1432** — Already merged as the canonical fix for #1338
- **PR #1422** — Already closed as duplicate (with explanatory comment)
- **PR #1408** — Already closed as duplicate (with explanatory comment)
- **PR #1399** — Already closed as duplicate (with explanatory comment)
- **Issue #1338** — Already closed
## Result
All 4 duplicate PRs have been resolved. PR #1432 was merged as the canonical fix.
Issue #1338 is closed. No further action required.
Refs #1451

18
pr_cleanup_1452.md Normal file
View File

@@ -0,0 +1,18 @@
# PR Cleanup: Issue #1336 Duplicate PRs
## Summary
Resolved duplicate PR situation for issue #1336 (Fix merge conflict artifacts).
## Actions Taken
- **PR #1438** — Left open as canonical fix for #1336
- **PR #1406** — Closed as duplicate (with explanatory comment)
- **PR #1402** — Closed as duplicate (with explanatory comment)
- **Issue #1336** — Updated with cleanup status comment
## Result
One canonical PR (#1438) remains open for review and merge.
Refs #1452

View File

@@ -22,7 +22,6 @@ ProtectHome=read-only
ReadWritePaths=/opt/models
PrivateTmp=true
StandardOutput=journal
StandardError=journal
SyslogIdentifier=llama-server
[Install]

View File

@@ -18,8 +18,7 @@ class TestHealthStatus:
class TestLlamaClient:
def test_defaults(self):
c = LlamaClient()
assert c.endpoint == "http://localhost:11435"
assert c.model == "qwen2.5-7b"
assert c.endpoint == "http://localhost:11435" and c.model == "qwen2.5-7b"
def test_custom(self):
c = LlamaClient("http://x:8080", "mistral")
@@ -43,8 +42,6 @@ class TestLlamaClient:
def test_is_healthy(self, m):
m.return_value = {"status": "ok"}
assert LlamaClient().is_healthy() is True
m.side_effect = ConnectionError()
assert LlamaClient().is_healthy() is False
@patch("bin.llama_client._http_get")
def test_list_models(self, m):
@@ -77,7 +74,7 @@ class TestLlamaClient:
@patch("bin.llama_client._http_post")
def test_simple_chat_system(self, m):
m.return_value = {"choices": [{"message": {"content": "OK"}, "finish_reason": "stop"}], "usage": {}}
LlamaClient().simple_chat("t", system="be helpful")
LlamaClient().simple_chat("t", system="helpful")
assert len(m.call_args[0][1]["messages"]) == 2
@patch("bin.llama_client._http_post")