replica-omnisciente/.aurelio/mirrors/sync-mirrors.yaml
Raphael Cautus (Maestro) 749432fefc feat(brain): garden, mirrors, vault-sync, provider registry consolidation
- .aurelio/garden/: model + agent garden (Google Cloud entries)
- .aurelio/mirrors/: sync-mirrors.yaml + state tracking
- .aurelio/skills/gcp/: Google Cloud skill
- Consolidation audit + execution plan (2026-07-30)
- vault-sync.py: Obsidian → GBrain MCP ingestion daemon
- brain-to-gbrain.py: brain → GBrain migration tool
- Provider registry + dist mirrors updated
- .gitignore: exclude .runner, .mimocode/.cron-lock, drift/target

Co-authored-by: Álvaro de Campos <campos@portugalfuturista.org>
2026-07-31 14:57:24 +01:00

159 lines
6.8 KiB
YAML

# Mirror Pipeline — single source of truth
#
# Declares how upstream sources (GitHub, Jira, Confluence) replicate into the
# self-hosted mirrors (Forgejo, Plane, Outline). All downstream surfaces derive
# from this file via scripts/sync-mirrors.py.
#
# ONE place to edit. mirrors/dist/*.json are GENERATED (do not edit).
#
# Direction: upstream → mirror (read-only by default; write-back is a future
# toggle per-target). The agent fleet operates on the mirrors; the originals
# stay authoritative.
#
# Regenerate after editing:
# python3 scripts/sync-mirrors.py --write-in-place # regenerate dist/
# python3 scripts/sync-mirrors.py --check # CI guard: exit 1 if stale
# python3 scripts/sync-mirrors.py --sync # run all mirror syncs
# python3 scripts/sync-mirrors.py --sync forgejo # one target
#
# Auth: tokens are NEVER in this file. They live in the environment (.env or
# shell env), referenced by the `token_env` key. Fetch from Vaultwarden.
version: 1
# ── Global defaults ────────────────────────────────────────────────────────
defaults:
# Sync cadence (minutes). Overridden by cron job schedule.
interval_minutes: 15
# Fail the whole run if any single source errors? false = log + continue.
fail_fast: false
# User-agent for upstream API calls.
user_agent: "replica-omnisciente-mirror/1.0"
# ── Mirror targets ─────────────────────────────────────────────────────────
# Each target is a self-hosted service that RECEIVES data from one or more
# upstream sources. A target may have multiple sources (e.g. Forgejo mirrors
# both GitHub orgs and individual repos).
targets:
# ── Forgejo: code mirror (GitHub → Forgejo) ────────────────────────────
forgejo:
kind: git-mirror
label: "Forgejo (code mirror)"
endpoint: https://code.portugalfuturista.org
# Forgejo API token (admin or org-owner scope). ENV var name only.
token_env: FORGEJO_MIRROR_TOKEN
# Default owner/org for mirrored repos if the upstream org doesn't exist.
default_owner: SavearthTech
# Mirror interval in Forgejo's own scheduler (for native push mirrors).
native_interval: 8h
sources:
- id: savearthtech-github
label: "SavearthTech GitHub org"
type: github-org
# GitHub org name to mirror ALL public+private repos from.
org: SavearthTech
# GitHub PAT (classic, read scope on repo + org). ENV var name only.
token_env: GITHUB_MIRROR_TOKEN
# Clone over SSH for private repos (key must be in agent).
clone_transport: https
# Include forked repos? false = skip forks.
include_forks: false
# Map GitHub topics → Forgejo labels (optional).
topic_labels: true
status: declared
- id: savearth-personal-github
label: "Personal Savearth repos (fabiorafaelcoutada)"
type: github-user
user: fabiorafaelcoutada
token_env: GITHUB_MIRROR_TOKEN
# Only mirror repos matching these patterns (glob).
include_patterns:
- "savearth*"
- "aws-iot-core*"
- "hardware-devices*"
- "agent-firmware*"
exclude_patterns:
- "*.github.io"
clone_transport: https
status: declared
# ── Plane: issue tracker mirror (Jira → Plane) ─────────────────────────
plane:
kind: issue-mirror
label: "Plane (issue tracker mirror)"
endpoint: https://plane.portugalfuturista.org
token_env: PLANE_API_TOKEN
# Plane workspace slug (in the URL). Create if it doesn't exist.
workspace_slug: savearth
sources:
- id: savearth-jira
label: "Savearth Jira Cloud"
type: jira-cloud
# Jira Cloud base URL (e.g. https://savearth.atlassian.net).
# Leave null if Savearth doesn't use Jira Cloud — the pipeline will
# skip this source and report it.
endpoint: null
token_env: JIRA_API_TOKEN
# Jira user email (for API token auth). ENV var name only.
email_env: JIRA_USER_EMAIL
# Jira projects to mirror (keys, e.g. SAVE, IOT, HW). null = all.
projects: null
# Map Jira → Plane fields. Plane uses: name, description_html,
# state (group), priority (urgency), assignee, labels, cycle.
field_map:
summary: name
description: description_html
status: state
priority: priority
assignee: assignee
labels: labels
issuetype: type
status: declared
# ── Outline: documentation mirror (Confluence → Outline) ───────────────
outline:
kind: doc-mirror
label: "Outline (documentation mirror)"
endpoint: https://docs.portugalfuturista.org
token_env: OUTLINE_API_TOKEN
# Outline collection to mirror into (created if absent).
collection_name: Savearth Mirror
sources:
- id: savearth-confluence
label: "Savearth Confluence Cloud"
type: confluence-cloud
# Confluence Cloud base URL (e.g. https://savearth.atlassian.net/wiki).
endpoint: null
token_env: CONFLUENCE_API_TOKEN
email_env: CONFLUENCE_USER_EMAIL
# Space keys to mirror (e.g. SAVE, ENG, HW). null = all.
spaces: null
# Convert Confluence storage format → Markdown for Outline.
format: markdown
# Include attachments? (binary download + re-upload to Outline).
include_attachments: true
status: declared
# ── RL feedback loop ──────────────────────────────────────────────────────
# Mirror sync outcomes feed into the RL trajectory pipeline as reward signals.
# When an agent operates on a mirror and the sync detects drift (upstream
# changed but mirror lagged, or an agent's change diverged from upstream),
# that becomes a negative reward signal for the agent's trajectory.
#
# See scripts/sync-mirrors.py --emit-trajectory-rewards and the
# rl-agent-trajectory-training skill for the consumption side.
rl_feedback:
enabled: true
# Where to write reward signals (trajectory.jsonl format, appended).
output: .aurelio/brain/trajectory-rewards/mirror-sync.jsonl
# Reward shaping: how much each signal type contributes.
signals:
# Agent worked on a mirror that was in sync with upstream (positive).
sync_hit: 0.1
# Agent worked on a mirror that had drifted from upstream (negative).
sync_miss: -0.2
# Agent's mirror change was overwritten by an upstream sync (negative).
upstream_overwrite: -0.5