Compare commits
14 Commits
d78d462999
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 800e1485ee | |||
| 64347b661c | |||
| 8f55e94d7b | |||
| cfdfbca508 | |||
| 49b77246c6 | |||
| 48d1f066ce | |||
| e50ae8920f | |||
| 7f7ae11ff3 | |||
| 5fd92a4e2f | |||
| 2b189c06b6 | |||
| 424e0fe7d4 | |||
| cdbc52110c | |||
| bb191c9cb8 | |||
| 68e570a114 |
@@ -0,0 +1,93 @@
|
|||||||
|
# Agent Onboarding — Obsidian Shared Vault
|
||||||
|
|
||||||
|
## The 4-Layer Memory System
|
||||||
|
|
||||||
|
```
|
||||||
|
LAYER 1: Built-in Memory (~2,200 chars)
|
||||||
|
→ Injected every prompt. Tiny facts + pointers.
|
||||||
|
|
||||||
|
LAYER 2: AGENTS.md + SOUL.md
|
||||||
|
→ Operating instructions + personality. Always present.
|
||||||
|
|
||||||
|
LAYER 3: Obsidian Vault (THIS)
|
||||||
|
→ NOT auto-injected. Read at session start + during work.
|
||||||
|
|
||||||
|
LAYER 4: Session Search
|
||||||
|
→ Automatic. Last resort recall.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Startup Routine (MANDATORY)
|
||||||
|
|
||||||
|
Every new session, agent MUST read:
|
||||||
|
|
||||||
|
```
|
||||||
|
1. agent-shared/mistakes.md ← Team mistakes to avoid
|
||||||
|
2. agent-shared/daily/YYYY-MM-DD.md ← Today's team activity
|
||||||
|
3. agent-shared/project-state.md ← Current projects
|
||||||
|
4. agent-[name]/working-context.md ← My active tasks
|
||||||
|
```
|
||||||
|
|
||||||
|
## Vault Paths (per VPS)
|
||||||
|
|
||||||
|
| VPS | Agent | Vault Path |
|
||||||
|
|-----|-------|-----------|
|
||||||
|
| horus | OpenClaw | /root/.openclaw/workspace/obsidian-vault |
|
||||||
|
| horus | Hermes | Same vault (shared) |
|
||||||
|
| amun | OpenClaw | /root/.openclaw/workspace/obsidian-vault |
|
||||||
|
| amun | Hermes | Same vault (shared) |
|
||||||
|
| cleopatra | OpenClaw | /root/obsidian-vault |
|
||||||
|
| cleopatra | Hermes | Same vault (shared) |
|
||||||
|
|
||||||
|
**Find your vault:** find /root -name obsidian-vault -type d
|
||||||
|
|
||||||
|
## When to Write to Vault
|
||||||
|
|
||||||
|
| Event | What to write |
|
||||||
|
|-------|---------------|
|
||||||
|
| Task starts | Update working-context.md |
|
||||||
|
| Every 3-5 tool calls | Checkpoint progress |
|
||||||
|
| Task completes | Append to daily log |
|
||||||
|
| Mistake made | Write to agent-shared/mistakes.md |
|
||||||
|
| Decision made | Write to agent-shared/decisions-log.md |
|
||||||
|
|
||||||
|
## New Agent Setup (On VPS)
|
||||||
|
|
||||||
|
### Step 1: Clone vault
|
||||||
|
```bash
|
||||||
|
cd /root/.openclaw/workspace
|
||||||
|
git clone https://github.com/HaithamEKhalifa/Obsidian-shared-valut.git obsidian-vault
|
||||||
|
cd obsidian-vault
|
||||||
|
git config user.name "agent-name"
|
||||||
|
git config user.email "agent@openclaw"
|
||||||
|
mkdir -p agent-[name]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 2: Create sync script (sync-NAME.sh)
|
||||||
|
```bash
|
||||||
|
cat > sync-NAME.sh << 'SYNCEOF'
|
||||||
|
#!/bin/bash
|
||||||
|
cd YOUR_VAULT_PATH
|
||||||
|
git pull origin main >/dev/null 2>&1
|
||||||
|
if [ -n "$(git status --porcelain)" ]; then
|
||||||
|
git add -A
|
||||||
|
git commit -m "sync-NAME $(date)" >/dev/null 2>&1
|
||||||
|
git push origin main >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
SYNCEOF
|
||||||
|
chmod +x sync-NAME.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 3: Add cron (every 5 min)
|
||||||
|
```bash
|
||||||
|
(crontab -l 2>/dev/null | grep -v sync-NAME; echo "*/5 * * * * /path/to/sync-NAME.sh") | crontab -
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 4: First sync
|
||||||
|
```bash
|
||||||
|
./sync-NAME.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## GitHub Repo
|
||||||
|
https://github.com/HaithamEKhalifa/Obsidian-shared-valut
|
||||||
|
|
||||||
|
*Last updated: 2026-04-10*
|
||||||
@@ -1,12 +1,21 @@
|
|||||||
{
|
{
|
||||||
"vault_version": "1.0",
|
"vault_version": "1.0",
|
||||||
"initialized": "2026-04-10T22:42:00Z",
|
"initialized": "2026-04-10T22:42:00Z",
|
||||||
"last_sync": null,
|
"last_sync": "2026-04-30T22:38:18.131035Z",
|
||||||
"sync_interval_minutes": 5,
|
"sync_interval_minutes": 5,
|
||||||
"agents": {
|
"agents": {
|
||||||
"horus": { "last_commit": null, "dirty": true },
|
"horus": {
|
||||||
"amun": { "last_commit": null, "dirty": false },
|
"last_commit": "cfdfbca508a48e41d01b0d142f9e6e6f3964e629",
|
||||||
"cleo": { "last_commit": null, "dirty": false }
|
"dirty": false
|
||||||
},
|
},
|
||||||
"git_remote": null
|
"amun": {
|
||||||
|
"last_commit": null,
|
||||||
|
"dirty": false
|
||||||
|
},
|
||||||
|
"cleo": {
|
||||||
|
"last_commit": null,
|
||||||
|
"dirty": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"git_remote": "gitea"
|
||||||
}
|
}
|
||||||
@@ -1,21 +1,93 @@
|
|||||||
# OpenClaw Working Context
|
# OpenClaw Working Context
|
||||||
|
|
||||||
**Agent:** Horus (OpenClaw orchestrator)
|
**Agent:** Horus (OpenClaw orchestrator)
|
||||||
**Last updated:** 2026-04-10
|
**Last updated:** 2026-05-03
|
||||||
|
|
||||||
## Current Session Focus
|
## Current Session Focus
|
||||||
|
Execute week 1 plan (May 3-9) — Revenue is #1 priority
|
||||||
|
|
||||||
## Today's Tasks
|
---
|
||||||
- [ ] Claw3D flip — move to Amun
|
|
||||||
- [ ] Build Obsidian vault system
|
|
||||||
- [ ] Set up git sync for vault
|
|
||||||
- [ ] Test Tailscale connectivity Amun→Horus
|
|
||||||
|
|
||||||
## Vault Sync Status
|
## 🚨 ALL TASKS — Full List
|
||||||
- Vault initialized: ✅
|
|
||||||
- Git remote: needs creation
|
|
||||||
- Amun sync: pending
|
|
||||||
- Cleo sync: pending
|
|
||||||
|
|
||||||
## Notes
|
### Priority 1 — Revenue (week 1)
|
||||||
Building team memory system. All 3 agents share mistakes, decisions, context.
|
| # | Task | Status | When |
|
||||||
|
|---|------|--------|------|
|
||||||
|
| 2 | Casa Alberto's owner — partnership pitch | 🔲 | Monday |
|
||||||
|
| 3 | Gio's friend (Malaga restaurant) — warm lead | 🔲 | Monday |
|
||||||
|
| 4 | Old man + festival guy — networkers | 🔲 | Tue-Wed |
|
||||||
|
| 5 | Find + contact more demo leads | 🔲 | All week |
|
||||||
|
| 6 | Fiverr account + post services | 🔲 | This week |
|
||||||
|
|
||||||
|
### Priority 2 — Infrastructure (this week)
|
||||||
|
| # | Task | Status | When |
|
||||||
|
|---|------|--------|------|
|
||||||
|
| 1 | Fix Hermes + OpenClaw Desktop | 🔲 | Fri, 1-2 hrs |
|
||||||
|
| 1b | Fix OpenClaw Desktop on primary machine | 🔲 | TBD |
|
||||||
|
|
||||||
|
### Priority 3 — SiteMente (after revenue)
|
||||||
|
| # | Task | Status | When |
|
||||||
|
|---|------|--------|------|
|
||||||
|
| 7 | Fix layout, luxury feel, perfect deals | 🔲 | After revenue tasks |
|
||||||
|
|
||||||
|
### Research/TBD
|
||||||
|
| # | Task | Status | Notes |
|
||||||
|
|---|------|--------|-------|
|
||||||
|
| 8 | Blocket.se ads (Danish marketplace) | 🔲 | Michelle connection |
|
||||||
|
| 9 | Mini AI chat account (reseller model) | 🔲 | Resell Vapi/Bland/MiniMax |
|
||||||
|
|
||||||
|
### Time-blocked
|
||||||
|
| Day | Task | Notes |
|
||||||
|
|-----|------|-------|
|
||||||
|
| Tue AM | Residency application | Blocking — must do, unblocks company in 2-3 weeks |
|
||||||
|
| Tue AM | Job applications Spain | Income proof for residency renewal |
|
||||||
|
|
||||||
|
### Other Active
|
||||||
|
| # | Task | Status | Notes |
|
||||||
|
|---|------|--------|-------|
|
||||||
|
| 10 | Test Khalid's HostSailor bot | 🔲 | QA feedback |
|
||||||
|
| 11 | Hany's Egypt app — chat/voice agents | 🔲 | AI services resale opportunity |
|
||||||
|
| 12 | Michelle Denmark — real estate scraping | 🔲 | Scrapling tool for Danish portals |
|
||||||
|
| 13 | SiteMente redesign (dark hero + purple) | 🔲 | Backup: /var/www/sitemente.bak.20260501/ |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Week 1 Plan
|
||||||
|
|
||||||
|
**Monday:**
|
||||||
|
- Casa Alberto's owner — partnership pitch
|
||||||
|
- Gio's friend (Malaga restaurant)
|
||||||
|
|
||||||
|
**Tuesday AM:** Residency application + job applications
|
||||||
|
|
||||||
|
**Tuesday PM:** Old man + festival guy (networkers)
|
||||||
|
|
||||||
|
**Wednesday-Thursday:** Lead gen + Fiverr setup
|
||||||
|
|
||||||
|
**Friday:** Fix Hermes/OpenClaw Desktop + follow-ups
|
||||||
|
|
||||||
|
**Ongoing:** Find + contact more demo leads (all week)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Key Relationships
|
||||||
|
- **Casa Alberto** — Restaurant owner, partnership pitch (free site = introductions + €X/month)
|
||||||
|
- **Gio** — Friend in Malaga, restaurant connection
|
||||||
|
- **Old man + festival guy** — Networkers who know local restaurants
|
||||||
|
- **Michelle** — Denmark connection, real estate scraping, Blocket.se
|
||||||
|
- **Hany** — Egypt app, needs chat/voice agents
|
||||||
|
- **Khalid** — HostSailor, has new bot needs QA
|
||||||
|
- **Khalid/HostSailor** — New chat bot to test
|
||||||
|
|
||||||
|
## Tools & Tech Notes
|
||||||
|
- **Scrapling** — github.com/D4Vinci/Scrapling — bypasses Cloudflare + bot detection, open source
|
||||||
|
- **Reseller model** — Vapi/Bland/MiniMax for Mini AI chat account
|
||||||
|
|
||||||
|
## Residency Path
|
||||||
|
1. Apply Tue AM → 2-3 weeks: work permit approved
|
||||||
|
2. Job apps = income proof for renewal
|
||||||
|
3. Digital nomad visa at €4k+/month = 3 years stable
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
*All tasks from May 3 conversation logged. Execute starts now.*
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
## SWE-1.6 Reminder Set
|
||||||
|
|
||||||
|
- Haitham asked to be reminded tomorrow about SWE-1.6
|
||||||
|
- Topic: What it is + how to deploy + which agent
|
||||||
|
- Notes: Top open-source coding agent from Scale AI, can run on Amun (more RAM)
|
||||||
|
- Stored in: memory/2026-04-11.md
|
||||||
|
|
||||||
|
## Claw3D Flip Status
|
||||||
|
|
||||||
|
**Done:**
|
||||||
|
- Amun: Claw3D installed + running on port 4001
|
||||||
|
- Cleopatra: Claw3D installed + running on port 4001
|
||||||
|
- Horus: Gateway on 0.0.0.0:18789 ✅
|
||||||
|
- Horus nginx: updated to proxy to Cleopatra
|
||||||
|
|
||||||
|
**Problem:** Port 443 blocked externally on Horus VPS
|
||||||
|
- council.sitemente.com not accessible from outside
|
||||||
|
- Need Cloudflare tunnel or firewall rule
|
||||||
|
|
||||||
|
**Tomorrow:** Fix council.sitemente.com → get Claw3D office working
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# Daily Log — 2026-04-27
|
||||||
|
|
||||||
|
## Morning Brief ✅
|
||||||
|
|
||||||
|
**Weather:** Benalmádena — 15°C, sunny, clear
|
||||||
|
**Markets:** BTC $78,882 (+1.47%), ETH $2,381 (+2.71%), SOL $87.47 (+1.29%)
|
||||||
|
|
||||||
|
## Active Blockers
|
||||||
|
- SiteMente API down since Apr 18
|
||||||
|
- Deepseek €0 balance
|
||||||
|
- 3DOffice .se/.dk DNS pending
|
||||||
|
|
||||||
|
## Yesterday's Work
|
||||||
|
- Built VibeScrape (web scraping tool)
|
||||||
|
- SiteMente: Added LICENSE, README, Docs tab to sidebar
|
||||||
|
- Mission Control: Daily Feedback system + develop/main branch workflow
|
||||||
|
- Gareth Soloway: 110 videos, 5,970 frames extracted
|
||||||
|
|
||||||
|
## Today
|
||||||
|
1. SiteMente revenue (first paying client)
|
||||||
|
2. Fix SiteMente API
|
||||||
|
3. HostPioneers outreach
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
- Cron triggering correctly (5am CET)
|
||||||
|
- SiteMente API returning 503 — still down
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# 2026-05-01
|
||||||
|
|
||||||
|
## Done
|
||||||
|
- Fixed `/ai-services/contact.php` — wrong Telegram token (858919…→864441…)
|
||||||
|
- AI Services contact form now sends to Haitham via @HP_Site_Bot ✅
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
- HostPioneers AI Services page: contact form + Telegram relay working
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# 2026-05-03
|
||||||
|
|
||||||
|
## Session Start — Week 1 Plan Loaded
|
||||||
|
|
||||||
|
Haitham confirmed the week 1 plan from last night. Today's focus:
|
||||||
|
- Revenue tasks prioritized
|
||||||
|
- No research — execute
|
||||||
|
|
||||||
|
## Tasks Confirmed
|
||||||
|
|
||||||
|
### Priority 1 — Revenue (week 1)
|
||||||
|
- Casa Alberto's owner — partnership pitch (Mon)
|
||||||
|
- Gio's friend Malaga restaurant (Mon)
|
||||||
|
- Old man + festival guy networkers (Tue-Wed)
|
||||||
|
- More demo leads (all week)
|
||||||
|
- Fiverr account + post services (this week)
|
||||||
|
- Mini AI chat reseller model (TBD)
|
||||||
|
|
||||||
|
### Priority 2 — Infrastructure
|
||||||
|
- Fix Hermes + OpenClaw Desktop (Fri, 1-2 hrs)
|
||||||
|
|
||||||
|
### Priority 3 — SiteMente
|
||||||
|
- Fix layout/luxury feel (after revenue tasks)
|
||||||
|
|
||||||
|
### Time-blocked
|
||||||
|
- Tue AM: Residency application
|
||||||
|
|
||||||
|
### TBD
|
||||||
|
- Blocket ads — need clarification
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
- Mini AI chat = reseller model (Vapi/Bland/MiniMax) for when we have paying clients
|
||||||
|
- No new projects until first revenue
|
||||||
@@ -26,3 +26,12 @@
|
|||||||
| Cleo + Horus share vault | 2026-04-10 | Same machine (185.45.195.201), different OpenClaw installs |
|
| Cleo + Horus share vault | 2026-04-10 | Same machine (185.45.195.201), different OpenClaw installs |
|
||||||
| Token auth for git | 2026-04-10 | PAT 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 on Amun |
|
| Token auth for git | 2026-04-10 | PAT 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 on Amun |
|
||||||
|
|
||||||
|
|
||||||
|
## 2026-04-10 (standard established)
|
||||||
|
|
||||||
|
| Decision | Details |
|
||||||
|
|----------|---------|
|
||||||
|
| Vault startup routine | All agents read vault at session start |
|
||||||
|
| New agent onboarding | Must clone vault + join sync cron |
|
||||||
|
| Shared mistakes = team learning | All read/write agent-shared/mistakes.md |
|
||||||
|
| Startup reads: | mistakes.md, today's daily log, working-context.md |
|
||||||
|
|||||||
@@ -46,3 +46,10 @@ All agents (Horus, Amun, Cleo) write here. All agents read here.
|
|||||||
**What I learned:** Check before creating duplicate setup. Cleo and Horus share vault natively.
|
**What I learned:** Check before creating duplicate setup. Cleo and Horus share vault natively.
|
||||||
**Fix applied:** Single vault instance, two sync scripts with different commit names.
|
**Fix applied:** Single vault instance, two sync scripts with different commit names.
|
||||||
|
|
||||||
|
|
||||||
|
### [Horus] — 2026-04-10
|
||||||
|
**Mistake:** Onboarding 3 agents without establishing vault sync standard first.
|
||||||
|
**What happened:** Each agent had slightly different vault setup, had to re-sync.
|
||||||
|
**What I learned:** Document the standard BEFORE deploying to multiple agents.
|
||||||
|
**Fix applied:** Established startup routine + onboarding procedure in vault.
|
||||||
|
|
||||||
|
|||||||
@@ -26,3 +26,66 @@
|
|||||||
- Tailscale VPN active: Horus `100.70.177.5`, Amun `100.120.217.121`
|
- Tailscale VPN active: Horus `100.70.177.5`, Amun `100.120.217.121`
|
||||||
|
|
||||||
## Updated: 2026-04-10
|
## Updated: 2026-04-10
|
||||||
|
|
||||||
|
## Claw3D Office (2026-04-21)
|
||||||
|
|
||||||
|
**Status:** Fix in progress
|
||||||
|
|
||||||
|
**Domains purchased:**
|
||||||
|
- 3doffice.eu (pending — free first year)
|
||||||
|
- 3doffice.se (pending — 6.30 kr/yr)
|
||||||
|
- 3doffice.dk (60 kr/yr)
|
||||||
|
|
||||||
|
**Architecture:**
|
||||||
|
- Amun VPS (212.8.251.47) — Claw3D server running on :4001
|
||||||
|
- Horus — cloudflared tunnel gateway
|
||||||
|
- Cleopatra — joins as agent via browser
|
||||||
|
|
||||||
|
**Next steps:**
|
||||||
|
1. Purchase domains
|
||||||
|
2. Start Claw3D on Amun: `pm2 start ecosystem.config.js`
|
||||||
|
3. Update cloudflared config to route council.hostpioneers.com → 212.8.251.47:4001
|
||||||
|
4. Test with all agents
|
||||||
|
5. Document setup process
|
||||||
|
6. Package as paid service for businesses
|
||||||
|
|
||||||
|
**Note:** Test internally before offering as a service (Haitham — today 2026-04-21)
|
||||||
|
|
||||||
|
## 3DOffice.eu — LIVE (2026-04-21)
|
||||||
|
|
||||||
|
**Domains:** 3doffice.eu (✅ live) | 3doffice.se ⏳ | 3doffice.dk ⏳
|
||||||
|
|
||||||
|
**Site Structure:**
|
||||||
|
- `/en/` — English (default)
|
||||||
|
- `/es/` — Spanish
|
||||||
|
- `/sv/` — Swedish
|
||||||
|
- `/da/` — Danish
|
||||||
|
- Auto-redirects to browser language on first visit
|
||||||
|
- Navbar dropdown to switch languages manually
|
||||||
|
|
||||||
|
**SEO + AI Agent Optimization:**
|
||||||
|
- robots.txt (all AI crawlers allowed)
|
||||||
|
- sitemap.xml (hreflang + language alternatives)
|
||||||
|
- JSON-LD: Organization, Service, FAQPage, Product schemas
|
||||||
|
- Open Graph + Twitter Card
|
||||||
|
- hreflang tags for all 4 languages
|
||||||
|
- Canonical URLs
|
||||||
|
- `.well-known/agent-profile.json` — AI agent discovery endpoint
|
||||||
|
- `.well-known/ai-plugin.json` — AI plugin manifest
|
||||||
|
- `openapi.yaml` — API spec for agents
|
||||||
|
|
||||||
|
**Pricing:**
|
||||||
|
- 1 AI Employee: €1,199/mo
|
||||||
|
- 2 AI Employees: €2,222/mo
|
||||||
|
- 3 AI Employees: €2,999/mo
|
||||||
|
- 3yr min contract · 10% off 4yr · 20% off 5yr
|
||||||
|
|
||||||
|
**Brand:** 100% 3DOffice — no Claw3D/OpenClaw branding
|
||||||
|
**Office Link:** https://council.hostpioneers.com/office
|
||||||
|
**Contact:** @Horus_Da_Bot (Telegram)
|
||||||
|
|
||||||
|
**Pending:**
|
||||||
|
- .se DNS (add A record → 45.95.42.114)
|
||||||
|
- .dk DNS (add A record → 45.95.42.114)
|
||||||
|
- OG image (PNG format for social sharing)
|
||||||
|
- OpenAPI endpoint actual implementation
|
||||||
|
|||||||
Executable
+8
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
cd /root/.openclaw/workspace/obsidian-vault
|
||||||
|
git pull origin main >/dev/null 2>&1
|
||||||
|
if [ -n "$(git status --porcelain)" ]; then
|
||||||
|
git add -A
|
||||||
|
git commit -m "sync-cleo $(date '+%Y-%m-%d %H:%M')" >/dev/null 2>&1
|
||||||
|
git push origin main >/dev/null 2>&1
|
||||||
|
fi
|
||||||
+12
-25
@@ -1,8 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#===============================================
|
|
||||||
# obsidian-vault sync script
|
|
||||||
# All 3 agents run this every 5 minutes
|
|
||||||
#===============================================
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
AGENT="${1:-horus}"
|
AGENT="${1:-horus}"
|
||||||
@@ -12,49 +8,40 @@ LOG_FILE="$VAULT_DIR/agent-shared/daily/$(date +%Y-%m-%d).md"
|
|||||||
|
|
||||||
cd "$VAULT_DIR"
|
cd "$VAULT_DIR"
|
||||||
|
|
||||||
# Update daily log
|
|
||||||
mkdir -p "$VAULT_DIR/agent-shared/daily"
|
mkdir -p "$VAULT_DIR/agent-shared/daily"
|
||||||
if [ ! -f "$LOG_FILE" ]; then
|
if [ ! -f "$LOG_FILE" ]; then
|
||||||
cat > "$LOG_FILE" << EOF
|
cat > "$LOG_FILE" << EOF
|
||||||
# Daily Log — $(date +%Y-%m-%d)
|
# Daily Log — $(date +%Y-%m-%d)
|
||||||
|
|
||||||
## Agents Active Today
|
|
||||||
- Horus
|
|
||||||
- Amun
|
|
||||||
- Cleo
|
|
||||||
|
|
||||||
## Session Activity
|
## Session Activity
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if dirty
|
|
||||||
if [ -n "$(git status --porcelain)" ]; then
|
if [ -n "$(git status --porcelain)" ]; then
|
||||||
echo "[$AGENT] Vault has changes — committing..."
|
echo "[$AGENT] Committing changes..."
|
||||||
git add -A
|
git add -A
|
||||||
git commit -m "chore: $AGENT sync $(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
git commit -m "chore: $AGENT sync $(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
||||||
|
|
||||||
# Push if remote exists
|
# Push to local Gitea first (always works)
|
||||||
if git remote get-url origin &>/dev/null; then
|
git push gitea main 2>/dev/null && echo "[$AGENT] Pushed to Gitea" || echo "[$AGENT] Gitea push failed"
|
||||||
git pull --rebase origin master 2>/dev/null || true
|
|
||||||
git push origin master 2>/dev/null || echo "[$AGENT] Push failed (offline?)"
|
# Push to GitHub (if account not suspended)
|
||||||
fi
|
git push origin main 2>/dev/null && echo "[$AGENT] Pushed to GitHub" || echo "[$AGENT] GitHub push failed (account suspended?)"
|
||||||
|
|
||||||
# Update vault state
|
|
||||||
python3 -c "
|
python3 -c "
|
||||||
import json
|
import json
|
||||||
|
from datetime import datetime
|
||||||
with open('$STATE_FILE', 'r') as f:
|
with open('$STATE_FILE', 'r') as f:
|
||||||
s = json.load(f)
|
s = json.load(f)
|
||||||
s['agents']['$AGENT']['last_commit'] = '$(git rev-parse HEAD)'
|
s['agents']['$AGENT']['last_commit'] = '$(git rev-parse HEAD)'
|
||||||
s['agents']['$AGENT']['dirty'] = False
|
s['agents']['$AGENT']['dirty'] = False
|
||||||
s['last_sync'] = '$(date -u +%Y-%m-%dT%H:%M:%SZ)'
|
s['last_sync'] = datetime.utcnow().isoformat() + 'Z'
|
||||||
|
s['git_remote'] = 'gitea'
|
||||||
with open('$STATE_FILE', 'w') as f:
|
with open('$STATE_FILE', 'w') as f:
|
||||||
json.dump(s, f, indent=2)
|
json.dump(s, f, indent=2)
|
||||||
"
|
"
|
||||||
echo "[$AGENT] Sync complete"
|
echo "[$AGENT] Sync complete"
|
||||||
else
|
else
|
||||||
# Pull latest from others
|
# Pull latest
|
||||||
if git remote get-url origin &>/dev/null; then
|
git pull gitea main 2>/dev/null && echo "[$AGENT] Pulled from Gitea" || echo "[$AGENT] Pull from Gitea failed"
|
||||||
git pull origin master 2>/dev/null && echo "[$AGENT] Pulled latest" || echo "[$AGENT] Pull failed or no remote"
|
git pull origin main 2>/dev/null && echo "[$AGENT] Pulled from GitHub" || true
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user