Commit graph

6 commits

Author SHA1 Message Date
c633fdcc49 Remove legacy agent IDs + tighten task API
- Canonicalize controlplane agent IDs/roles to: sysadmin, db-admin, git-admin (drop *_agent variants).

- Add DB migration to rewrite existing *_agent rows and references to canonical IDs.

- Tighten POST /api/controlplane/tasks contract: require assigned_to (remove agent_id alias).

- Update tests and docs to match canonical IDs.

---

Build: pass (just typecheck)

Tests: pass — 1536 passed (92 files) (just test)
2026-04-19 06:54:28 +00:00
a6582f2506 fix: task double-execution race, dead code cleanup, doc updates
Correctness:
- controlplane-db.ts: add claimTask() — atomically updates task status
  from 'pending' to 'in_progress' via conditional UPDATE. Returns false
  if already claimed, preventing double-execution between onTaskCreated
  callback and heartbeat loop.
- controlplane-heartbeat.ts: claim task before running agent in both
  the on-demand task loop and the per-agent heartbeat task pickup.
  Skip with 'task_already_claimed' if race lost.

Dead code removed:
- config.ts: remove ENCRYPTED_DIR, ENCRYPTED_SCREENSHOTS_DIR,
  TMP_SKILLS_DIR, SCREENSHOTS_DIR, AGENT_LOG_FILE, AGENT_ERROR_LOG
  (never imported outside config.ts)
- controlplane-db.ts: remove getAgentById (never imported)

Docs:
- GIT-JAIL-FORGEJO-HANDOFF.md: note SSH automation in setup/git.ts,
  GIT_LOCAL_URL injection, local-first skills update
- MULTI-PROVIDER-ARCHITECTURE.md: note current default zai/glm-5-turbo
  and just pi-config for runtime changes

Build: pass | Tests: not run (Linux) (Sam & Claude)
2026-04-19 00:48:25 +02:00
2b1b46a89f docs: prune stale docs + update 4 live reference docs
Delete 11 stale files:
- 2 self-labeled ARCHIVED (Dashboard API mapping, feasibility)
- 3 dated session/deployment summaries (Apr 12 implementation, live deploy, rsync decision)
- 3 draft specs that were superseded by Phase 7 (agentic harness pivot/spec/runbook)
- 2 planning docs whose work is now in code (controlplane impl plan, aider+pi design)
- 1 historical validation run (agent CLI validation Apr 8)

Update 4 active docs:
- CONTROLPLANE-ARCHITECTURE: add Phase 7 jail isolation section, remove dead reference
- CONTROLPLANE-AGENT-ROLES: add agent IDs (coordinator/sysadmin/db-admin/git-admin),
  identity file paths, and jail assignments per AGENT_JAIL_MAP
- MULTI-PROVIDER-ARCHITECTURE: mark as not yet implemented (provider-router.ts missing)
- THREE-BIRD-ARCHITECTURE: fix Astro project path (bootstrap/cms/clawdie-site, not /home/clawdie/astro-docs)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---
Build: pass | Tests: pass — Tests  1162 passed (1162)
2026-04-14 18:55:30 +00:00
f14f8556ff refactor(controlplane): rename subagent ids 2026-04-08 19:32:10 +00:00
6cfccd4efb docs: finish ceo→orchestrator / Paperclip→Control Plane rename sweep
Catches the doc tail of commit 061a25f. Renames in CONTROLPLANE-*.md,
MULTI-PROVIDER-ARCHITECTURE, SYSADMIN/DBA/GIT_ADMIN identity files,
and the public controlplane page. Adds CHANGELOG entry.

Remaining NAMING-HANDOFF items (CLAWDIE.md creation, wiring
resolveIdentityFile) tracked for Pass B.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---
Build: pass | Tests: FAIL — Tests  1 failed | 846 passed (847)
2026-04-08 09:45:49 +00:00
db8dadb682 docs: multi-provider architecture — install-time + runtime routing design (Sam & Claude) 2026-04-07 18:59:47 +02:00