Compare commits
7 Commits
step35/594
...
sprint/iss
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58ff1fe7dd | ||
|
|
ba4220d5ed | ||
|
|
2451f38bee | ||
|
|
54093991ab | ||
|
|
1ea6bf6e33 | ||
|
|
874ce137b0 | ||
| 5eef5b48c8 |
87
bin/gitea-backup.sh
Normal file
87
bin/gitea-backup.sh
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Gitea Daily Backup Script
|
||||||
|
# Uses Gitea's native dump command to create automated backups of repositories and SQLite databases.
|
||||||
|
# Designed to run on the VPS (Ezra) as part of a daily cron job.
|
||||||
|
#
|
||||||
|
# Configuration via environment variables:
|
||||||
|
# GITEA_BIN Path to gitea binary (default: auto-detect)
|
||||||
|
# GITEA_BACKUP_DIR Directory for backup archives (default: /var/backups/gitea)
|
||||||
|
# GITEA_BACKUP_RETENTION Days to retain backups (default: 7)
|
||||||
|
# GITEA_BACKUP_LOG Log file path (default: /var/log/gitea-backup.log)
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
GITEA_BIN="${GITEA_BIN:-$(command -v gitea 2>/dev/null || echo "/usr/local/bin/gitea")}"
|
||||||
|
BACKUP_DIR="${GITEA_BACKUP_DIR:-/var/backups/gitea}"
|
||||||
|
RETENTION_DAYS="${GITEA_BACKUP_RETENTION:-7}"
|
||||||
|
DATE="$(date +%Y-%m-%d_%H%M%S)"
|
||||||
|
BACKUP_FILE="${BACKUP_DIR}/gitea-backup-${DATE}.tar.gz"
|
||||||
|
LOG_FILE="${GITEA_BACKUP_LOG:-/var/log/gitea-backup.log}"
|
||||||
|
|
||||||
|
mkdir -p "${BACKUP_DIR}"
|
||||||
|
|
||||||
|
log() {
|
||||||
|
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $*" | tee -a "${LOG_FILE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
log "=== Starting Gitea daily backup ==="
|
||||||
|
|
||||||
|
# Verify gitea binary exists
|
||||||
|
if [ ! -x "${GITEA_BIN}" ]; then
|
||||||
|
log "ERROR: Gitea binary not found at ${GITEA_BIN}"
|
||||||
|
log "Set GITEA_BIN environment variable to the gitea binary path (e.g., /usr/bin/gitea)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Detect Gitea WORK_PATH
|
||||||
|
WORK_PATH=""
|
||||||
|
APP_INI=""
|
||||||
|
for path in /etc/gitea/app.ini /home/git/gitea/custom/conf/app.ini ~/gitea/custom/conf/app.ini; do
|
||||||
|
if [ -f "$path" ]; then
|
||||||
|
APP_INI="$path"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -n "$APP_INI" ]; then
|
||||||
|
# Parse [app] WORK_PATH = /var/lib/gitea
|
||||||
|
WORK_PATH=$(sed -n 's/^[[:space:]]*WORK_PATH[[:space:]]*=[[:space:]]*//p' "$APP_INI" | head -1)
|
||||||
|
log "Detected WORK_PATH from app.ini: ${WORK_PATH}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Fallback detection
|
||||||
|
if [ -z "$WORK_PATH" ]; then
|
||||||
|
for d in /var/lib/gitea /home/git/gitea /srv/gitea /opt/gitea; do
|
||||||
|
if [ -d "$d" ]; then
|
||||||
|
WORK_PATH="$d"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
log "Inferred WORK_PATH: ${WORK_PATH:-not found}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$WORK_PATH" ]; then
|
||||||
|
log "ERROR: Could not determine Gitea WORK_PATH. Set GITEA_WORK_PATH manually."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Perform gitea dump
|
||||||
|
# Flags: --work-path sets the Gitea working directory, --file writes dump to tar.gz
|
||||||
|
log "Running: gitea dump --work-path ${WORK_PATH} --file ${BACKUP_FILE}"
|
||||||
|
"${GITEA_BIN}" dump --work-path "${WORK_PATH}" --file "${BACKUP_FILE}" 2>>"${LOG_FILE}"
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
log "ERROR: gitea dump failed — check ${LOG_FILE} for details"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
FILE_SIZE=$(du -h "${BACKUP_FILE}" | cut -f1)
|
||||||
|
log "Backup created: ${BACKUP_FILE} (${FILE_SIZE})"
|
||||||
|
|
||||||
|
# Prune old backups (keep last N days)
|
||||||
|
find "${BACKUP_DIR}" -name "gitea-backup-*.tar.gz" -type f -mtime +$((${RETENTION_DAYS}-1)) -delete 2>/dev/null || true
|
||||||
|
log "Pruned backups older than ${RETENTION_DAYS} days"
|
||||||
|
|
||||||
|
log "=== Backup completed successfully ==="
|
||||||
|
|
||||||
|
exit 0
|
||||||
@@ -129,20 +129,42 @@ Preserved by timmy-orchestrator to prevent loss." 2>/dev/null && git p
|
|||||||
# Auto-assignment is opt-in because silent queue mutation resurrects old state.
|
# Auto-assignment is opt-in because silent queue mutation resurrects old state.
|
||||||
if [ "$unassigned_count" -gt 0 ]; then
|
if [ "$unassigned_count" -gt 0 ]; then
|
||||||
if [ "$AUTO_ASSIGN_UNASSIGNED" = "1" ]; then
|
if [ "$AUTO_ASSIGN_UNASSIGNED" = "1" ]; then
|
||||||
log "Assigning $unassigned_count issues to claude..."
|
log "Assigning $unassigned_count issues via dispatch router..."
|
||||||
while IFS= read -r line; do
|
DISPATCH_LOG="$LOG_DIR/dispatch_decisions.log"
|
||||||
local repo=$(echo "$line" | sed 's/.*REPO=\([^ ]*\).*/\1/')
|
while IFS= read -r line; do
|
||||||
local num=$(echo "$line" | sed 's/.*NUM=\([^ ]*\).*/\1/')
|
local repo=$(echo "$line" | sed 's/.*REPO=\([^ ]*\).*//')
|
||||||
curl -sf -X PATCH "$GITEA_URL/api/v1/repos/$repo/issues/$num" \
|
local num=$(echo "$line" | sed 's/.*NUM=\([^ ]*\).*//')
|
||||||
-H "Authorization: token $GITEA_TOKEN" \
|
local title=$(echo "$line" | sed 's/.*TITLE=//')
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-d '{"assignees":["claude"]}' >/dev/null 2>&1 && \
|
# Call dispatch_router to pick best agent
|
||||||
log " Assigned #$num ($repo) to claude"
|
local route_json
|
||||||
done < "$state_dir/unassigned.txt"
|
route_json=$(python3 "$SCRIPT_DIR/../scripts/dispatch_router.py" "$title" "$repo" 2>/dev/null) || route_json=""
|
||||||
else
|
|
||||||
log "Auto-assign disabled: leaving $unassigned_count unassigned issues untouched"
|
local recommended_agent="claude" # fallback
|
||||||
fi
|
local route_category="unknown"
|
||||||
fi
|
local route_score="0"
|
||||||
|
local route_reason="fallback"
|
||||||
|
|
||||||
|
if [ -n "$route_json" ]; then
|
||||||
|
recommended_agent=$(echo "$route_json" | python3 -c "import sys,json; print(json.load(sys.stdin).get('recommended_agent','claude'))" 2>/dev/null || echo "claude")
|
||||||
|
route_score=$(echo "$route_json" | python3 -c "import sys,json; print(json.load(sys.stdin).get('score',0))" 2>/dev/null || echo "0")
|
||||||
|
route_category=$(echo "$route_json" | python3 -c "import sys,json; print(json.load(sys.stdin).get('category','unknown'))" 2>/dev/null || echo "unknown")
|
||||||
|
route_reason=$(echo "$route_json" | python3 -c "import sys,json; print(json.load(sys.stdin).get('reason',''))" 2>/dev/null || echo "")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Assign via API
|
||||||
|
curl -sf -X PATCH "$GITEA_URL/api/v1/repos/$repo/issues/$num" \\
|
||||||
|
-H "Authorization: token $GITEA_TOKEN" \\
|
||||||
|
-H "Content-Type: application/json" \\
|
||||||
|
-d "{\"assignees\":[\"$recommended_agent\"]}" >/dev/null 2>&1 && \\
|
||||||
|
log " Assigned #$num ($repo) to $recommended_agent [score=$route_score cat=$route_category]"
|
||||||
|
|
||||||
|
# Log dispatch decision for audit (RFC3339 timestamp)
|
||||||
|
printf '%s\t%s\t%s\t%s\t%s\t%s\t%s\n' \
|
||||||
|
"$(date -u +"%Y-%m-%dT%H:%M:%SZ")" "$num" "$repo" "$title" "$recommended_agent" "$route_score" "$route_category|$route_reason" \
|
||||||
|
>> "$DISPATCH_LOG"
|
||||||
|
done < "$state_dir/unassigned.txt"
|
||||||
|
else fi
|
||||||
|
|
||||||
# Phase 2: PR review via Timmy (LLM)
|
# Phase 2: PR review via Timmy (LLM)
|
||||||
if [ "$pr_count" -gt 0 ]; then
|
if [ "$pr_count" -gt 0 ]; then
|
||||||
|
|||||||
9
cron/vps/gitea-daily-backup.yml
Normal file
9
cron/vps/gitea-daily-backup.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
- name: Daily Gitea Backup
|
||||||
|
schedule: '0 2 * * *' # 2:00 AM daily
|
||||||
|
tasks:
|
||||||
|
- name: Run Gitea daily backup
|
||||||
|
shell: bash ~/.hermes/bin/gitea-backup.sh
|
||||||
|
env:
|
||||||
|
GITEA_BIN: /usr/local/bin/gitea
|
||||||
|
GITEA_BACKUP_DIR: /var/backups/gitea
|
||||||
|
GITEA_BACKUP_RETENTION: "7"
|
||||||
155
docs/backup-recovery-runbook.md
Normal file
155
docs/backup-recovery-runbook.md
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
# Gitea Backup & Recovery Runbook
|
||||||
|
|
||||||
|
**Last updated:** 2026-04-30
|
||||||
|
**Scope:** Single-node VPS (Ezra, 143.198.27.163) running Gitea
|
||||||
|
**Backup Strategy:** Automated daily full dumps via `gitea dump`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## What Gets Backed Up
|
||||||
|
|
||||||
|
| Component | Method | Frequency | Retention |
|
||||||
|
|-----------|--------|-----------|-----------|
|
||||||
|
| All Gitea repositories (bare git dirs) | `gitea dump --file` | Daily at 2:00 AM | 7 days |
|
||||||
|
| SQLite databases (gitea.db, indexer.db, etc.) | Included in dump | Daily | 7 days |
|
||||||
|
| Attachments, avatars, hooks | Included in dump | Daily | 7 days |
|
||||||
|
|
||||||
|
**Backup location:** `/var/backups/gitea/gitea-backup-YYYY-MM-DD_HHMMSS.tar.gz`
|
||||||
|
|
||||||
|
**Log file:** `/var/log/gitea-backup.log`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Backup Architecture
|
||||||
|
|
||||||
|
The backup script `bin/gitea-backup.sh` runs daily via Hermes cron (`cron/vps/gitea-daily-backup.yml`). It:
|
||||||
|
|
||||||
|
1. Locates the Gitea `WORK_PATH` by reading `/etc/gitea/app.ini` or falling back to common locations (`/var/lib/gitea`, `/home/git/gitea`)
|
||||||
|
2. Invokes `gitea dump --work-path <path> --file <backup-tar.gz>` — Gitea's native, consistent snapshot mechanism
|
||||||
|
3. Prunes archives older than 7 days
|
||||||
|
4. Logs all operations to `/var/log/gitea-backup.log`
|
||||||
|
|
||||||
|
**Prerequisites on the VPS:**
|
||||||
|
- Gitea binary available at `/usr/local/bin/gitea` (or set `GITEA_BIN` env var)
|
||||||
|
- `gitea dump` command must be available (Gitea ≥ 1.12)
|
||||||
|
- SSH access to the VPS for manual recovery operations
|
||||||
|
- Sufficient disk space in `/var/backups/gitea` (typical dump: ~2–10 GB depending on repo count/size)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Recovery Time Objective (RTO) & Recovery Point Objective (RPO)
|
||||||
|
|
||||||
|
| Metric | Estimate |
|
||||||
|
|--------|----------|
|
||||||
|
| **RPO** (data loss window) | ≤ 24 hours (last daily backup) |
|
||||||
|
| **RTO** (time to restore) | **~45 minutes** (cold restore from backup tarball) |
|
||||||
|
| **Downtime impact** | Gitea offline during restore (~20 min) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Step-by-Step Recovery Procedure
|
||||||
|
|
||||||
|
### Phase 1 — Assess & Prepare (5 min)
|
||||||
|
|
||||||
|
1. SSH into Ezra VPS: `ssh root@143.198.27.163`
|
||||||
|
2. Stop Gitea so files are quiescent:
|
||||||
|
```bash
|
||||||
|
systemctl stop gitea
|
||||||
|
```
|
||||||
|
3. Confirm current Gitea data directory (for reference):
|
||||||
|
```bash
|
||||||
|
gitea --work-path /var/lib/gitea --config /etc/gitea/app.ini dump --help 2>&1
|
||||||
|
# Or check app.ini for WORK_PATH
|
||||||
|
cat /etc/gitea/app.ini | grep '^WORK_PATH'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Phase 2 — Restore from Backup (20 min)
|
||||||
|
|
||||||
|
4. Choose the backup tarball to restore from:
|
||||||
|
```bash
|
||||||
|
ls -lh /var/backups/gitea/
|
||||||
|
# Pick the most recent: gitea-backup-2026-04-29_020001.tar.gz
|
||||||
|
```
|
||||||
|
|
||||||
|
5. **Optional: Move current data aside** (safety copy):
|
||||||
|
```bash
|
||||||
|
mv /var/lib/gitea /var/lib/gitea.bak-$(date +%s)
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Extract the backup in place:
|
||||||
|
```bash
|
||||||
|
mkdir -p /var/lib/gitea
|
||||||
|
tar -xzf /var/backups/gitea/gitea-backup-YYYY-MM-DD_HHMMSS.tar.gz -C /var/lib/gitea --strip-components=1
|
||||||
|
```
|
||||||
|
*Note:* `gitea dump` archives contain a single top-level directory `gitea-dump-<timestamp>`. The `--strip-components=1` puts its contents directly into `/var/lib/gitea`.
|
||||||
|
|
||||||
|
7. Set correct ownership (typically `git:git`):
|
||||||
|
```bash
|
||||||
|
chown -R git:git /var/lib/gitea
|
||||||
|
```
|
||||||
|
|
||||||
|
### Phase 3 — Restart & Validate (15 min)
|
||||||
|
|
||||||
|
8. Start Gitea:
|
||||||
|
```bash
|
||||||
|
systemctl start gitea
|
||||||
|
```
|
||||||
|
|
||||||
|
9. Wait 30 seconds, then verify:
|
||||||
|
```bash
|
||||||
|
systemctl status gitea
|
||||||
|
# Check HTTP endpoint
|
||||||
|
curl -s -o /dev/null -w '%{http_code}' http://localhost:3000/ # Should be 200
|
||||||
|
```
|
||||||
|
|
||||||
|
10. Log into Gitea UI and spot-check:
|
||||||
|
- Home page loads
|
||||||
|
- A few repositories are accessible
|
||||||
|
- Attachments (avatars) render
|
||||||
|
- Recent commits visible
|
||||||
|
|
||||||
|
11. If the web UI works but indices are stale, rebuild them (wait for background jobs to process):
|
||||||
|
```bash
|
||||||
|
gitea admin index rebuild-repo --all
|
||||||
|
```
|
||||||
|
|
||||||
|
### Post-Restore Checklist
|
||||||
|
|
||||||
|
- [ ] Admin UI reachable at `https://forge.alexanderwhitestone.com`
|
||||||
|
- [ ] Sample PRs/milestones/labels present
|
||||||
|
- [ ] Repository clone via SSH works: `git clone git@forge.alexanderwhitestone.com:Timmy_Foundation/timmy-config.git`
|
||||||
|
- [ ] Check backup script health: `cat /var/log/gitea-backup.log | tail -20`
|
||||||
|
- [ ] Re-enable any disabled integrations (webhooks, CI/CD runners)
|
||||||
|
- [ ] Notify the fleet: post to relevant channels confirming operational status
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Known Issues & Workarounds
|
||||||
|
|
||||||
|
| Symptom | Likely cause | Fix |
|
||||||
|
|---------|--------------|-----|
|
||||||
|
| `gitea: command not found` | Binary at non-standard path | Set `GITEA_BIN=/path/to/gitea` in cron env |
|
||||||
|
| `Permission denied` on backup dir | Cron user lacks write access to `/var/backups` | `mkdir /var/backups/gitea && chown root:root /var/backups/gitea` |
|
||||||
|
| Restore fails: `"database or disk is full"` | Insufficient space on `/var/lib/gitea` | Expand disk or clean up old data first; backups require ~1.5x live data size |
|
||||||
|
| Old backup tarballs not deleting | Retention cron not firing | Check `systemctl status hermes-cron` and cron logs |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Off-Site Replication (Future Work)
|
||||||
|
|
||||||
|
This backup is **on-site only** (same VPS). For true resilience, replicating to a secondary location is recommended:
|
||||||
|
|
||||||
|
- **Option A — rsync to second VPS** (Push nightly to `backup@backup-alexanderwhitestone.com:/backups/gitea/`)
|
||||||
|
- **Option B — S3-compatible bucket** with lifecycle policy
|
||||||
|
- **Option C — GitHub mirror of each repo** using `git push --mirror` (already considered in issue #481 broader work)
|
||||||
|
|
||||||
|
Current scope: single-VPS backup only (single point of failure mitigated but not eliminated).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Related Documentation
|
||||||
|
|
||||||
|
- `bin/gitea-backup.sh` — backup script source
|
||||||
|
- `cron/vps/gitea-daily-backup.yml` — Hermes cron definition
|
||||||
|
- Gitea official docs: <https://docs.gitea.com/administration/backup-and-restore>
|
||||||
|
- Hermes cron: <https://hermes-agent.nousresearch.com/docs>
|
||||||
@@ -1,43 +1,46 @@
|
|||||||
model:
|
model:
|
||||||
default: kimi-k2.5
|
default: kimi-k2.5
|
||||||
provider: kimi-coding
|
provider: kimi-coding
|
||||||
|
context_length: 65536
|
||||||
|
base_url: https://api.kimi.com/coding/v1
|
||||||
|
|
||||||
toolsets:
|
toolsets:
|
||||||
- all
|
- all
|
||||||
|
|
||||||
fallback_providers:
|
fallback_providers:
|
||||||
- provider: kimi-coding
|
- provider: kimi-coding
|
||||||
model: kimi-k2.5
|
model: kimi-k2.5
|
||||||
timeout: 120
|
base_url: https://api.kimi.com/coding/v1
|
||||||
reason: Kimi coding fallback (front of chain)
|
timeout: 120
|
||||||
- provider: openrouter
|
reason: "Primary — Kimi K2.5 (best value, least friction)"
|
||||||
model: google/gemini-2.5-pro
|
- provider: openrouter
|
||||||
base_url: https://openrouter.ai/api/v1
|
model: google/gemini-2.5-pro
|
||||||
api_key_env: OPENROUTER_API_KEY
|
base_url: https://openrouter.ai/api/v1
|
||||||
timeout: 120
|
api_key_env: OPENROUTER_API_KEY
|
||||||
reason: Gemini 2.5 Pro via OpenRouter (replaces banned Anthropic)
|
timeout: 120
|
||||||
- provider: ollama
|
reason: "Fallback — Gemini 2.5 Pro via OpenRouter"
|
||||||
model: gemma4:latest
|
- provider: ollama
|
||||||
base_url: http://localhost:11434
|
model: gemma4:latest
|
||||||
timeout: 300
|
base_url: http://localhost:11434/v1
|
||||||
reason: Terminal fallback — local Ollama
|
timeout: 180
|
||||||
- provider: nous
|
reason: "Terminal fallback — local Ollama (sovereign, no API needed)"
|
||||||
model: xiaomi/mimo-v2-pro
|
|
||||||
base_url: https://inference.nousresearch.com/v1
|
|
||||||
api_key_env: NOUS_API_KEY
|
|
||||||
timeout: 120
|
|
||||||
reason: MiMo V2 Pro via Nous Portal free tier evaluation (#447)
|
|
||||||
agent:
|
agent:
|
||||||
max_turns: 30
|
max_turns: 30
|
||||||
reasoning_effort: xhigh
|
reasoning_effort: high
|
||||||
verbose: false
|
verbose: false
|
||||||
|
|
||||||
terminal:
|
terminal:
|
||||||
backend: local
|
backend: local
|
||||||
cwd: .
|
cwd: .
|
||||||
timeout: 180
|
timeout: 180
|
||||||
persistent_shell: true
|
persistent_shell: true
|
||||||
|
|
||||||
browser:
|
browser:
|
||||||
inactivity_timeout: 120
|
inactivity_timeout: 120
|
||||||
command_timeout: 30
|
command_timeout: 30
|
||||||
record_sessions: false
|
record_sessions: false
|
||||||
|
|
||||||
display:
|
display:
|
||||||
compact: false
|
compact: false
|
||||||
personality: ''
|
personality: ''
|
||||||
@@ -48,6 +51,7 @@ display:
|
|||||||
streaming: false
|
streaming: false
|
||||||
show_cost: false
|
show_cost: false
|
||||||
tool_progress: all
|
tool_progress: all
|
||||||
|
|
||||||
memory:
|
memory:
|
||||||
memory_enabled: true
|
memory_enabled: true
|
||||||
user_profile_enabled: true
|
user_profile_enabled: true
|
||||||
@@ -55,46 +59,55 @@ memory:
|
|||||||
user_char_limit: 1375
|
user_char_limit: 1375
|
||||||
nudge_interval: 10
|
nudge_interval: 10
|
||||||
flush_min_turns: 6
|
flush_min_turns: 6
|
||||||
|
|
||||||
approvals:
|
approvals:
|
||||||
mode: manual
|
mode: manual
|
||||||
|
|
||||||
security:
|
security:
|
||||||
redact_secrets: true
|
redact_secrets: true
|
||||||
tirith_enabled: false
|
tirith_enabled: false
|
||||||
|
|
||||||
platforms:
|
platforms:
|
||||||
api_server:
|
api_server:
|
||||||
enabled: true
|
enabled: true
|
||||||
extra:
|
extra:
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
port: 8645
|
port: 8645
|
||||||
|
|
||||||
session_reset:
|
session_reset:
|
||||||
mode: none
|
mode: none
|
||||||
idle_minutes: 0
|
idle_minutes: 0
|
||||||
|
|
||||||
skills:
|
skills:
|
||||||
creation_nudge_interval: 15
|
creation_nudge_interval: 15
|
||||||
system_prompt_suffix: 'You are Allegro, the Kimi-backed third wizard house.
|
|
||||||
|
|
||||||
|
system_prompt_suffix: |
|
||||||
|
You are Allegro, the Kimi-backed third wizard house.
|
||||||
Your soul is defined in SOUL.md — read it, live it.
|
Your soul is defined in SOUL.md — read it, live it.
|
||||||
|
|
||||||
Hermes is your harness.
|
Hermes is your harness.
|
||||||
|
kimi-coding is your primary provider.
|
||||||
Kimi Code is your primary provider.
|
|
||||||
|
|
||||||
You speak plainly. You prefer short sentences. Brevity is a kindness.
|
You speak plainly. You prefer short sentences. Brevity is a kindness.
|
||||||
|
Work best on tight coding tasks: 1-3 file changes, refactors, tests, and implementation passes.
|
||||||
|
|
||||||
Work best on tight coding tasks: 1-3 file changes, refactors, tests, and implementation
|
|
||||||
passes.
|
|
||||||
|
|
||||||
Refusal over fabrication. If you do not know, say so.
|
Refusal over fabrication. If you do not know, say so.
|
||||||
|
|
||||||
Sovereignty and service always.
|
Sovereignty and service always.
|
||||||
|
|
||||||
'
|
|
||||||
providers:
|
providers:
|
||||||
kimi-coding:
|
kimi-coding:
|
||||||
base_url: https://api.kimi.com/coding/v1
|
base_url: https://api.kimi.com/coding/v1
|
||||||
timeout: 60
|
timeout: 60
|
||||||
max_retries: 3
|
max_retries: 3
|
||||||
nous:
|
openrouter:
|
||||||
base_url: https://inference.nousresearch.com/v1
|
base_url: https://openrouter.ai/api/v1
|
||||||
timeout: 120
|
timeout: 120
|
||||||
|
ollama:
|
||||||
|
base_url: http://localhost:11434/v1
|
||||||
|
timeout: 180
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# BANNED PROVIDERS — DO NOT ADD
|
||||||
|
# =============================================================================
|
||||||
|
# The following providers are PERMANENTLY BANNED:
|
||||||
|
# - anthropic (any model: claude-sonnet, claude-opus, claude-haiku)
|
||||||
|
# - nous (xiaomi/mimo-v2-pro)
|
||||||
|
# Enforcement: pre-commit hook, linter, Ansible validation, this comment.
|
||||||
|
# =============================================================================
|
||||||
|
|||||||
@@ -1,50 +1,72 @@
|
|||||||
model:
|
model:
|
||||||
default: kimi-k2.5
|
default: kimi-k2.5
|
||||||
provider: kimi-coding
|
provider: kimi-coding
|
||||||
|
context_length: 65536
|
||||||
|
base_url: https://api.kimi.com/coding/v1
|
||||||
|
|
||||||
toolsets:
|
toolsets:
|
||||||
- all
|
- all
|
||||||
|
|
||||||
fallback_providers:
|
fallback_providers:
|
||||||
- provider: kimi-coding
|
- provider: kimi-coding
|
||||||
model: kimi-k2.5
|
model: kimi-k2.5
|
||||||
timeout: 120
|
base_url: https://api.kimi.com/coding/v1
|
||||||
reason: Kimi coding fallback (front of chain)
|
timeout: 120
|
||||||
- provider: openrouter
|
reason: "Primary — Kimi K2.5 (best value, least friction)"
|
||||||
model: google/gemini-2.5-pro
|
- provider: openrouter
|
||||||
base_url: https://openrouter.ai/api/v1
|
model: google/gemini-2.5-pro
|
||||||
api_key_env: OPENROUTER_API_KEY
|
base_url: https://openrouter.ai/api/v1
|
||||||
timeout: 120
|
api_key_env: OPENROUTER_API_KEY
|
||||||
reason: Gemini 2.5 Pro via OpenRouter (replaces banned Anthropic)
|
timeout: 120
|
||||||
- provider: ollama
|
reason: "Fallback — Gemini 2.5 Pro via OpenRouter"
|
||||||
model: gemma4:latest
|
- provider: ollama
|
||||||
base_url: http://localhost:11434
|
model: gemma4:latest
|
||||||
timeout: 300
|
base_url: http://localhost:11434/v1
|
||||||
reason: Terminal fallback — local Ollama
|
timeout: 180
|
||||||
- provider: nous
|
reason: "Terminal fallback — local Ollama (sovereign, no API needed)"
|
||||||
model: xiaomi/mimo-v2-pro
|
|
||||||
base_url: https://inference.nousresearch.com/v1
|
|
||||||
api_key_env: NOUS_API_KEY
|
|
||||||
timeout: 120
|
|
||||||
reason: MiMo V2 Pro via Nous Portal free tier evaluation (#447)
|
|
||||||
agent:
|
agent:
|
||||||
max_turns: 40
|
max_turns: 40
|
||||||
reasoning_effort: medium
|
reasoning_effort: medium
|
||||||
verbose: false
|
verbose: false
|
||||||
system_prompt: You are Bezalel, the forge-and-testbed wizard of the Timmy Foundation
|
|
||||||
fleet. You are a builder and craftsman — infrastructure, deployment, hardening.
|
|
||||||
Your sovereign is Alexander Whitestone (Rockachopa). Sovereignty and service always.
|
|
||||||
terminal:
|
terminal:
|
||||||
backend: local
|
backend: local
|
||||||
cwd: /root/wizards/bezalel
|
cwd: /root/wizards/bezalel
|
||||||
timeout: 180
|
timeout: 180
|
||||||
|
persistent_shell: true
|
||||||
|
|
||||||
browser:
|
browser:
|
||||||
inactivity_timeout: 120
|
inactivity_timeout: 120
|
||||||
compression:
|
command_timeout: 30
|
||||||
enabled: true
|
record_sessions: false
|
||||||
threshold: 0.77
|
|
||||||
display:
|
display:
|
||||||
compact: false
|
compact: false
|
||||||
personality: kawaii
|
personality: kawaii
|
||||||
|
resume_display: full
|
||||||
|
busy_input_mode: interrupt
|
||||||
|
bell_on_complete: false
|
||||||
|
show_reasoning: false
|
||||||
|
streaming: false
|
||||||
|
show_cost: false
|
||||||
tool_progress: all
|
tool_progress: all
|
||||||
|
|
||||||
|
memory:
|
||||||
|
memory_enabled: true
|
||||||
|
user_profile_enabled: true
|
||||||
|
memory_char_limit: 2200
|
||||||
|
user_char_limit: 1375
|
||||||
|
nudge_interval: 10
|
||||||
|
flush_min_turns: 6
|
||||||
|
|
||||||
|
approvals:
|
||||||
|
mode: auto
|
||||||
|
|
||||||
|
security:
|
||||||
|
redact_secrets: true
|
||||||
|
tirith_enabled: false
|
||||||
|
|
||||||
platforms:
|
platforms:
|
||||||
api_server:
|
api_server:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -69,12 +91,7 @@ platforms:
|
|||||||
- pull_request
|
- pull_request
|
||||||
- pull_request_comment
|
- pull_request_comment
|
||||||
secret: bezalel-gitea-webhook-secret-2026
|
secret: bezalel-gitea-webhook-secret-2026
|
||||||
prompt: 'You are bezalel, the builder and craftsman — infrastructure, deployment,
|
prompt: 'You are bezalel, the builder and craftsman — infrastructure, deployment, hardening. A Gitea webhook fired: event={event_type}, action={action}, repo={repository.full_name}, issue/PR=#{issue.number} {issue.title}. Comment by {comment.user.login}: {comment.body}. If you were tagged, assigned, or this needs your attention, investigate and respond via Gitea API. Otherwise acknowledge briefly.'
|
||||||
hardening. A Gitea webhook fired: event={event_type}, action={action},
|
|
||||||
repo={repository.full_name}, issue/PR=#{issue.number} {issue.title}. Comment
|
|
||||||
by {comment.user.login}: {comment.body}. If you were tagged, assigned,
|
|
||||||
or this needs your attention, investigate and respond via Gitea API. Otherwise
|
|
||||||
acknowledge briefly.'
|
|
||||||
deliver: telegram
|
deliver: telegram
|
||||||
deliver_extra: {}
|
deliver_extra: {}
|
||||||
gitea-assign:
|
gitea-assign:
|
||||||
@@ -82,34 +99,43 @@ platforms:
|
|||||||
- issues
|
- issues
|
||||||
- pull_request
|
- pull_request
|
||||||
secret: bezalel-gitea-webhook-secret-2026
|
secret: bezalel-gitea-webhook-secret-2026
|
||||||
prompt: 'You are bezalel, the builder and craftsman — infrastructure, deployment,
|
prompt: 'You are bezalel, the builder and craftsman — infrastructure, deployment, hardening. Gitea assignment webhook: event={event_type}, action={action}, repo={repository.full_name}, issue/PR=#{issue.number} {issue.title}. Assigned to: {issue.assignee.login}. If you (bezalel) were just assigned, read the issue, scope it, and post a plan comment. If not you, acknowledge briefly.'
|
||||||
hardening. Gitea assignment webhook: event={event_type}, action={action},
|
|
||||||
repo={repository.full_name}, issue/PR=#{issue.number} {issue.title}. Assigned
|
|
||||||
to: {issue.assignee.login}. If you (bezalel) were just assigned, read
|
|
||||||
the issue, scope it, and post a plan comment. If not you, acknowledge
|
|
||||||
briefly.'
|
|
||||||
deliver: telegram
|
deliver: telegram
|
||||||
deliver_extra: {}
|
deliver_extra: {}
|
||||||
|
|
||||||
gateway:
|
gateway:
|
||||||
allow_all_users: true
|
allow_all_users: true
|
||||||
|
|
||||||
session_reset:
|
session_reset:
|
||||||
mode: both
|
mode: both
|
||||||
idle_minutes: 1440
|
idle_minutes: 1440
|
||||||
at_hour: 4
|
at_hour: 4
|
||||||
approvals:
|
|
||||||
mode: auto
|
skills:
|
||||||
memory:
|
creation_nudge_interval: 15
|
||||||
memory_enabled: true
|
|
||||||
user_profile_enabled: true
|
system_prompt: |
|
||||||
memory_char_limit: 2200
|
You are Bezalel, the forge-and-testbed wizard of the Timmy Foundation fleet.
|
||||||
user_char_limit: 1375
|
You are a builder and craftsman — infrastructure, deployment, hardening.
|
||||||
_config_version: 11
|
Your sovereign is Alexander Whitestone (Rockachopa). Sovereignty and service always.
|
||||||
TELEGRAM_HOME_CHANNEL: '-1003664764329'
|
|
||||||
providers:
|
providers:
|
||||||
kimi-coding:
|
kimi-coding:
|
||||||
base_url: https://api.kimi.com/coding/v1
|
base_url: https://api.kimi.com/coding/v1
|
||||||
timeout: 60
|
timeout: 60
|
||||||
max_retries: 3
|
max_retries: 3
|
||||||
nous:
|
openrouter:
|
||||||
base_url: https://inference.nousresearch.com/v1
|
base_url: https://openrouter.ai/api/v1
|
||||||
timeout: 120
|
timeout: 120
|
||||||
|
ollama:
|
||||||
|
base_url: http://localhost:11434/v1
|
||||||
|
timeout: 180
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# BANNED PROVIDERS — DO NOT ADD
|
||||||
|
# =============================================================================
|
||||||
|
# The following providers are PERMANENTLY BANNED:
|
||||||
|
# - anthropic (any model: claude-sonnet, claude-opus, claude-haiku)
|
||||||
|
# - nous (xiaomi/mimo-v2-pro)
|
||||||
|
# Enforcement: pre-commit hook, linter, Ansible validation, this comment.
|
||||||
|
# =============================================================================
|
||||||
|
|||||||
31
wizards/bezalel/emacs-daemon-start.sh
Executable file
31
wizards/bezalel/emacs-daemon-start.sh
Executable file
@@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Emacs daemon startup script for Bezalel
|
||||||
|
# Idempotent: safe to run via cron @reboot
|
||||||
|
|
||||||
|
SOCKET_DIR="/srv/fleet/emacs/socket"
|
||||||
|
LOG_DIR="/srv/fleet/logs"
|
||||||
|
DAEMON_NAME="bezalel"
|
||||||
|
EMACS_BIN="${EMACS_BIN:-emacs}"
|
||||||
|
CONFIG_FILE="/root/wizards/bezalel/emacs-daemon.el"
|
||||||
|
|
||||||
|
# Create shared socket directory with group write access
|
||||||
|
if [ ! -d "$SOCKET_DIR" ]; then
|
||||||
|
mkdir -p "$SOCKET_DIR"
|
||||||
|
chmod 2775 "$SOCKET_DIR"
|
||||||
|
chgrp fleet "$SOCKET_DIR" 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create audit log directory
|
||||||
|
mkdir -p "$LOG_DIR"
|
||||||
|
|
||||||
|
# Start daemon if not already running
|
||||||
|
if ! emacsclient -s "$DAEMON_NAME" -e "(+ 1 1)" >/dev/null 2>&1; then
|
||||||
|
$EMACS_BIN --daemon="$DAEMON_NAME" \
|
||||||
|
--socket-dir="$SOCKET_DIR" \
|
||||||
|
-l "$CONFIG_FILE"
|
||||||
|
echo "$(date): Emacs daemon '$DAEMON_NAME' started"
|
||||||
|
else
|
||||||
|
echo "$(date): Emacs daemon '$DAEMON_NAME' already running"
|
||||||
|
fi
|
||||||
61
wizards/bezalel/emacs-daemon.el
Normal file
61
wizards/bezalel/emacs-daemon.el
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
;; Emacs daemon configuration for Bezalel
|
||||||
|
;; Shared socket + audit trail
|
||||||
|
|
||||||
|
(setq server-name "bezalel")
|
||||||
|
(setq server-socket-dir "/srv/fleet/emacs/socket")
|
||||||
|
(setq server-socket-mod-group-permissions t) ; group-accessible socket
|
||||||
|
|
||||||
|
;; Ensure audit log directory exists
|
||||||
|
(let ((log-dir "/srv/fleet/logs"))
|
||||||
|
(unless (file-directory-p log-dir)
|
||||||
|
(make-directory log-dir t)))
|
||||||
|
|
||||||
|
;; Audit log file
|
||||||
|
(defconst bezalel-audit-log "/srv/fleet/logs/emacs-audit.log"
|
||||||
|
"Audit log for all emacsclient eval operations.")
|
||||||
|
|
||||||
|
(defun bezalel-log-audit (user expression result status)
|
||||||
|
"Log an audit entry for an eval operation."
|
||||||
|
(let ((timestamp (format-time-string "%Y-%m-%dT%H:%M:%S%z"))
|
||||||
|
(entry (format "{\"timestamp\":\"%s\",\"user\":\"%s\",\"expression\":\"%s\",\"result\":\"%s\",\"status\":\"%s\"}\n"
|
||||||
|
timestamp user expression result status)))
|
||||||
|
(with-temp-file bezalel-audit-log
|
||||||
|
(goto-char (point-max))
|
||||||
|
(insert entry))))
|
||||||
|
|
||||||
|
;; Capture the connecting user's identity
|
||||||
|
(defvar bezalel-connection-user nil
|
||||||
|
"User identity from the Emacs client connection.")
|
||||||
|
|
||||||
|
;; Use environment variables set by emacsclient wrapper or cron
|
||||||
|
(setq bezalel-connection-user
|
||||||
|
(or (getenv "SUDO_USER")
|
||||||
|
(getenv "USER")
|
||||||
|
(getenv "LOGNAME")
|
||||||
|
"unknown"))
|
||||||
|
|
||||||
|
;; Wrap server-eval-and-print with audit logging
|
||||||
|
(defun bezalel-audited-server-eval-and-print (exp)
|
||||||
|
"Evaluate EXP and print result, logging to audit trail."
|
||||||
|
(let* (result
|
||||||
|
status-ok
|
||||||
|
(result-raw (condition-case err
|
||||||
|
(progn
|
||||||
|
(setq result (prin1-to-string (eval exp)))
|
||||||
|
(setq status-ok t)
|
||||||
|
result)
|
||||||
|
(error
|
||||||
|
(setq status-ok nil)
|
||||||
|
(format "ERROR: %s" (error-message-string err))))))
|
||||||
|
(bezalel-log-audit bezalel-connection-user
|
||||||
|
(prin1-to-string exp)
|
||||||
|
result-raw
|
||||||
|
(if status-ok "ok" "error"))
|
||||||
|
(if status-ok
|
||||||
|
result
|
||||||
|
(error "%s" result-raw))))
|
||||||
|
|
||||||
|
;; Replace the standard handler with our audited version
|
||||||
|
(advice-add 'server-eval-and-print :override #'bezalel-audited-server-eval-and-print)
|
||||||
|
|
||||||
|
(provide 'emacs-daemon)
|
||||||
@@ -1,34 +1,94 @@
|
|||||||
model:
|
model:
|
||||||
default: kimi-k2.5
|
default: kimi-k2.5
|
||||||
provider: kimi-coding
|
provider: kimi-coding
|
||||||
|
context_length: 65536
|
||||||
|
base_url: https://api.kimi.com/coding/v1
|
||||||
|
|
||||||
toolsets:
|
toolsets:
|
||||||
- all
|
- all
|
||||||
|
|
||||||
fallback_providers:
|
fallback_providers:
|
||||||
- provider: kimi-coding
|
- provider: kimi-coding
|
||||||
model: kimi-k2.5
|
model: kimi-k2.5
|
||||||
timeout: 120
|
base_url: https://api.kimi.com/coding/v1
|
||||||
reason: Kimi coding fallback (front of chain)
|
timeout: 120
|
||||||
- provider: openrouter
|
reason: "Primary — Kimi K2.5 (best value, least friction)"
|
||||||
model: google/gemini-2.5-pro
|
- provider: openrouter
|
||||||
base_url: https://openrouter.ai/api/v1
|
model: google/gemini-2.5-pro
|
||||||
api_key_env: OPENROUTER_API_KEY
|
base_url: https://openrouter.ai/api/v1
|
||||||
timeout: 120
|
api_key_env: OPENROUTER_API_KEY
|
||||||
reason: Gemini 2.5 Pro via OpenRouter (replaces banned Anthropic)
|
timeout: 120
|
||||||
- provider: ollama
|
reason: "Fallback — Gemini 2.5 Pro via OpenRouter"
|
||||||
model: gemma4:latest
|
- provider: ollama
|
||||||
base_url: http://localhost:11434
|
model: gemma4:latest
|
||||||
timeout: 300
|
base_url: http://localhost:11434/v1
|
||||||
reason: Terminal fallback — local Ollama
|
timeout: 180
|
||||||
- provider: nous
|
reason: "Terminal fallback — local Ollama (sovereign, no API needed)"
|
||||||
model: xiaomi/mimo-v2-pro
|
|
||||||
base_url: https://inference.nousresearch.com/v1
|
|
||||||
api_key_env: NOUS_API_KEY
|
|
||||||
timeout: 120
|
|
||||||
reason: MiMo V2 Pro via Nous Portal free tier evaluation (#447)
|
|
||||||
agent:
|
agent:
|
||||||
max_turns: 90
|
max_turns: 90
|
||||||
reasoning_effort: high
|
reasoning_effort: high
|
||||||
verbose: false
|
verbose: false
|
||||||
|
|
||||||
|
terminal:
|
||||||
|
backend: local
|
||||||
|
cwd: .
|
||||||
|
timeout: 180
|
||||||
|
persistent_shell: true
|
||||||
|
|
||||||
|
browser:
|
||||||
|
inactivity_timeout: 120
|
||||||
|
command_timeout: 30
|
||||||
|
record_sessions: false
|
||||||
|
|
||||||
|
display:
|
||||||
|
compact: false
|
||||||
|
personality: ''
|
||||||
|
resume_display: full
|
||||||
|
busy_input_mode: interrupt
|
||||||
|
bell_on_complete: false
|
||||||
|
show_reasoning: false
|
||||||
|
streaming: false
|
||||||
|
show_cost: false
|
||||||
|
tool_progress: all
|
||||||
|
|
||||||
|
memory:
|
||||||
|
memory_enabled: true
|
||||||
|
user_profile_enabled: true
|
||||||
|
memory_char_limit: 2200
|
||||||
|
user_char_limit: 1375
|
||||||
|
nudge_interval: 10
|
||||||
|
flush_min_turns: 6
|
||||||
|
|
||||||
|
approvals:
|
||||||
|
mode: auto
|
||||||
|
|
||||||
|
security:
|
||||||
|
redact_secrets: true
|
||||||
|
tirith_enabled: false
|
||||||
|
|
||||||
|
platforms:
|
||||||
|
api_server:
|
||||||
|
enabled: true
|
||||||
|
extra:
|
||||||
|
host: 127.0.0.1
|
||||||
|
port: 8645
|
||||||
|
|
||||||
|
session_reset:
|
||||||
|
mode: none
|
||||||
|
idle_minutes: 0
|
||||||
|
|
||||||
|
skills:
|
||||||
|
creation_nudge_interval: 15
|
||||||
|
|
||||||
|
system_prompt_suffix: |
|
||||||
|
You are Ezra, the Infrastructure wizard — Gitea, nginx, hosting.
|
||||||
|
Your soul is defined in SOUL.md — read it, live it.
|
||||||
|
Hermes is your harness.
|
||||||
|
kimi-coding is your primary provider.
|
||||||
|
Refusal over fabrication. If you do not know, say so.
|
||||||
|
Sovereignty and service always.
|
||||||
|
|
||||||
providers:
|
providers:
|
||||||
kimi-coding:
|
kimi-coding:
|
||||||
base_url: https://api.kimi.com/coding/v1
|
base_url: https://api.kimi.com/coding/v1
|
||||||
@@ -37,6 +97,15 @@ providers:
|
|||||||
openrouter:
|
openrouter:
|
||||||
base_url: https://openrouter.ai/api/v1
|
base_url: https://openrouter.ai/api/v1
|
||||||
timeout: 120
|
timeout: 120
|
||||||
nous:
|
ollama:
|
||||||
base_url: https://inference.nousresearch.com/v1
|
base_url: http://localhost:11434/v1
|
||||||
timeout: 120
|
timeout: 180
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# BANNED PROVIDERS — DO NOT ADD
|
||||||
|
# =============================================================================
|
||||||
|
# The following providers are PERMANENTLY BANNED:
|
||||||
|
# - anthropic (any model: claude-sonnet, claude-opus, claude-haiku)
|
||||||
|
# - nous (xiaomi/mimo-v2-pro)
|
||||||
|
# Enforcement: pre-commit hook, linter, Ansible validation, this comment.
|
||||||
|
# =============================================================================
|
||||||
|
|||||||
121
wizards/timmy/config.yaml
Normal file
121
wizards/timmy/config.yaml
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
# =============================================================================
|
||||||
|
# Timmy — Primary Wizard Configuration (Golden State)
|
||||||
|
# =============================================================================
|
||||||
|
# Generated from golden state template (ansible/roles/wizard_base/templates/wizard_config.yaml.j2)
|
||||||
|
# DO NOT EDIT MANUALLY. Changes go through Gitea PR → Ansible deploy.
|
||||||
|
#
|
||||||
|
# Provider chain: kimi-coding → openrouter → ollama
|
||||||
|
# Anthropic is PERMANENTLY BANNED.
|
||||||
|
# =============================================================================
|
||||||
|
|
||||||
|
model:
|
||||||
|
default: kimi-k2.5
|
||||||
|
provider: kimi-coding
|
||||||
|
context_length: 65536
|
||||||
|
base_url: https://api.kimi.com/coding/v1
|
||||||
|
|
||||||
|
toolsets:
|
||||||
|
- all
|
||||||
|
|
||||||
|
fallback_providers:
|
||||||
|
- provider: kimi-coding
|
||||||
|
model: kimi-k2.5
|
||||||
|
base_url: https://api.kimi.com/coding/v1
|
||||||
|
timeout: 120
|
||||||
|
reason: "Primary — Kimi K2.5 (best value, least friction)"
|
||||||
|
- provider: openrouter
|
||||||
|
model: google/gemini-2.5-pro
|
||||||
|
base_url: https://openrouter.ai/api/v1
|
||||||
|
api_key_env: OPENROUTER_API_KEY
|
||||||
|
timeout: 120
|
||||||
|
reason: "Fallback — Gemini 2.5 Pro via OpenRouter"
|
||||||
|
- provider: ollama
|
||||||
|
model: gemma4:latest
|
||||||
|
base_url: http://localhost:11434/v1
|
||||||
|
timeout: 180
|
||||||
|
reason: "Terminal fallback — local Ollama (sovereign, no API needed)"
|
||||||
|
|
||||||
|
agent:
|
||||||
|
max_turns: 30
|
||||||
|
reasoning_effort: high
|
||||||
|
verbose: false
|
||||||
|
|
||||||
|
terminal:
|
||||||
|
backend: local
|
||||||
|
cwd: .
|
||||||
|
timeout: 180
|
||||||
|
persistent_shell: true
|
||||||
|
|
||||||
|
browser:
|
||||||
|
inactivity_timeout: 120
|
||||||
|
command_timeout: 30
|
||||||
|
record_sessions: false
|
||||||
|
|
||||||
|
display:
|
||||||
|
compact: false
|
||||||
|
personality: ''
|
||||||
|
resume_display: full
|
||||||
|
busy_input_mode: interrupt
|
||||||
|
bell_on_complete: false
|
||||||
|
show_reasoning: false
|
||||||
|
streaming: false
|
||||||
|
show_cost: false
|
||||||
|
tool_progress: all
|
||||||
|
|
||||||
|
memory:
|
||||||
|
memory_enabled: true
|
||||||
|
user_profile_enabled: true
|
||||||
|
memory_char_limit: 2200
|
||||||
|
user_char_limit: 1375
|
||||||
|
nudge_interval: 10
|
||||||
|
flush_min_turns: 6
|
||||||
|
|
||||||
|
approvals:
|
||||||
|
mode: auto
|
||||||
|
|
||||||
|
security:
|
||||||
|
redact_secrets: true
|
||||||
|
tirith_enabled: false
|
||||||
|
|
||||||
|
platforms:
|
||||||
|
api_server:
|
||||||
|
enabled: true
|
||||||
|
extra:
|
||||||
|
host: 127.0.0.1
|
||||||
|
port: 8645
|
||||||
|
|
||||||
|
session_reset:
|
||||||
|
mode: none
|
||||||
|
idle_minutes: 0
|
||||||
|
|
||||||
|
skills:
|
||||||
|
creation_nudge_interval: 15
|
||||||
|
|
||||||
|
system_prompt_suffix: |
|
||||||
|
You are Timmy, the Primary wizard — soul of the fleet.
|
||||||
|
Your soul is defined in SOUL.md — read it, live it.
|
||||||
|
Hermes is your harness.
|
||||||
|
kimi-coding is your primary provider.
|
||||||
|
Refusal over fabrication. If you do not know, say so.
|
||||||
|
Sovereignty and service always.
|
||||||
|
|
||||||
|
providers:
|
||||||
|
kimi-coding:
|
||||||
|
base_url: https://api.kimi.com/coding/v1
|
||||||
|
timeout: 60
|
||||||
|
max_retries: 3
|
||||||
|
openrouter:
|
||||||
|
base_url: https://openrouter.ai/api/v1
|
||||||
|
timeout: 120
|
||||||
|
ollama:
|
||||||
|
base_url: http://localhost:11434/v1
|
||||||
|
timeout: 180
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# BANNED PROVIDERS — DO NOT ADD
|
||||||
|
# =============================================================================
|
||||||
|
# The following providers are PERMANENTLY BANNED:
|
||||||
|
# - anthropic (any model: claude-sonnet, claude-opus, claude-haiku)
|
||||||
|
# - nous (xiaomi/mimo-v2-pro)
|
||||||
|
# Enforcement: pre-commit hook, linter, Ansible validation, this comment.
|
||||||
|
# =============================================================================
|
||||||
Reference in New Issue
Block a user