moa_tower_register
Completes tower spawn by registering the real agent ID to the pending entry, validating identity via parent-child checks, and updating the guard file.
Instructions
Two-stage spawn completion (tower-only): fills the real engine agent id into the pending roster entry created by moa_tower_spawn, runs the B2 identity cross-validation (① fold entry exists; ② dual-channel parent-child: wire parentAgentId == towerAgentId OR the tower fold entry lists this agent as a subagent; ③ soft session-workDir check), and rebuilds the guard mirror file (/.tower-guard.json — name-keyed agents map with {name, worktree, agentId} + worktrees array). Missing fold data degrades to verified:false (never blocked); a hard mismatch increments failed_count (3 consecutive → blocked). Re-running register is allowed and re-verifies (B2-9). Required combo: {name, agent_id} — the roster name from moa_tower_spawn plus the engine agent id your Agent tool returned (mission_id/review_target/worktree/branch are optional backfills).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The tower name registered by moa_tower_spawn | |
| branch | No | Optional: branch if it was not recorded at spawn | |
| agent_id | Yes | The engine agent id returned by your Agent tool | |
| worktree | No | Optional: worktree slot if it was not recorded at spawn | |
| workspace | Yes | The absolute repo root (main checkout) this tower namespace anchors to. Required on every tower tool — the server cwd is never used as a fallback. | |
| mission_id | No | Optional: mission id if it was not recorded at spawn | |
| review_target | No | Optional: review target if it was not recorded at spawn | |
| caller_agent_id | Yes | Your engine agent id. The tower tools resolve it against the boot-registered roster (the booted tower, or a spawned worker/reviewer). |