3.4 KiB
3.4 KiB
Prime Bootstrap v0
1) Environment
source /srv/prime-core/scripts/prime-env.sh
export PRIME_VAULT_KEY='set-a-strong-random-value'
2) Validate
prime status
prime dispatch planning "design backup policy"
prime dispatch coding "implement hello endpoint"
3) Backup/Restore
prime backup-now
prime restore <commit-id>
4) OAuth broker stubs
Current prime_core/oauth.py is a stub interface (start/callback) and encrypted token vault.
Replace auth.example URLs and token exchange with provider-specific OAuth implementations.
5) Queue worker + approvals
prime queue add planning "design X"
prime queue run-once
prime queue list
prime queue approve <task-id>
prime queue deny <task-id> --reason "optional reason"
Worker service:
sudo systemctl status prime-worker.service
6) Telegram notifications
Set in local runtime secrets (.secrets/runtime.env):
TELEGRAM_BOT_TOKENTELEGRAM_CHAT_ID
Worker sends alerts for:
- blocked approval tasks
- failed tasks
7) Telegram control plane (beyond request/response)
Prime now includes:
prime-telegram-control.service(inbound command channel)prime-autonomy-loop.service(goal-driven autonomous queue seeding)
Telegram commands:
statusqueue listqueue add <task_type> <task>queue approve <id>queue deny <id> [reason]run oncemode autonomous on|offgoals showgoals add <text>
8) Stability Sprint v1
Added:
- Risk classification tiers (
prime_core/risk.py) - Audit trail (
logs/audit.jsonl) - Safer restore:
prime restore --dry-run <commit>- preflight + rollback on failure
- Telegram control guardrails for high-risk direct commands
9) Backup classes + verification (Stability Sprint v2)
Prime now separates backups into classes:
scripts/backup/code-backup.sh-> git code/config backupscripts/backup/state-backup.sh-> encrypted state snapshot (task-queue.json,tokens.enc)scripts/backup/secrets-backup.sh-> encrypted secret escrow (optional, requiresPRIME_SECRET_BACKUP_PASSPHRASE)
Timers:
prime-state-backup.timer(15m)prime-restore-test.timer(nightly dry-run restore)prime-audit-watch.timer(15m anomaly check)
11) Telegram allowlist controls
Prime responds only to allowlisted Telegram users.
Owner (configured TELEGRAM_CHAT_ID) can manage list:
allowlist showallowlist add <telegram_user_id>allowlist remove <telegram_user_id>
Owner cannot be removed from allowlist.
12) Prime proactive check-in loop
Service: prime-checkin-loop.service
Behavior:
- Sends proactive check-ins every ~3 hours
- Asks for goal/task direction when queue is clear
- Quiet hours enforced: 11:00 PM–6:00 AM America/New_York
- Personality: calm, strategic, concise (
prime_core/personality.py)
13) Chat Mode v1 (conversational control)
Prime can now interpret natural-language messages and not just strict commands.
New controls:
mode chat on|offmode strict on|off
Behavior:
- Interprets intent via OpenAI/Codex (
prime_core/chat_mode.py) - For action requests: proposes plan and asks for explicit approval (
approve) when strict/confirm needed - Keeps pending user action context in
state/pending-actions.json
14) Chat Mode v1.2 (assistant-first behavior)
- Owner fast-lane for conversational planning/research requests
- Hard blocks only for tier4 destructive/external asks
- Softer plan/confirm messaging for normal requests