Files
multi-agent-mux/.agents/skills/multi-agent-mux-orc-onboard/SKILL.md
T
Godopu ec61511699 fix(issue-6): fail-closed registry timeout and TUI turn handshake
- Introduce finalize_unfinished in multi-agent-mux-delegate-job for fail-closed atomic transitions
- Enforce CAS dispatch_token and attempt_id pinning across engine, CLI, and lifecycle scripts
- Integrate Herdr wait_for_agent_idle turn handshake to prevent prompt loss and race conditions
- Resolve bash 3.2 set -u empty array expansion compatibility in lib.sh
- Preserve Issue #5 R2 contract in CAS transition engine (engine.py, publish_event.py, service.py)
- Add comprehensive regression suites (test_issue6_fail_closed.py, test_issue6_turn_handshake.py)
- Bump lockstep framework and skills to v4.4.1 across lib.sh, eager.py, VERSIONS.md, 8 SKILL.md
- Synchronize documentation (IMPROVEMENTS.md, MESSAGING.md, state-transitions.md, task.md, phase5-e2e.md)
- Unanimous PASS achieved across 4 reviewer team leaders (Claude, Codex, OpenCode, Grok)

Closes #6
2026-09-09 14:02:47 +09:00

56 lines
2.4 KiB
Markdown

---
name: multi-agent-mux-orc-onboard
description: "Register current or specified orchestrator session UUID into agent-sessions.yaml orchestrator_uuids list to prevent sub-agent discovery capture."
version: 4.4.1
author: godopu
license: MIT
platforms: [linux, macos]
environments: [terminal, herdr]
metadata:
hermes:
tags: [agent, herdr, claude, antigravity, agy, hermes, grok, opencode, codex, orchestrator, onboard, isolation]
related_skills: [multi-agent-mux-create, multi-agent-mux-resume, multi-agent-mux-monitor]
prereq_skills: [multi-agent-mux-create]
---
# multi-agent-mux-orc-onboard
Registers an orchestrator session UUID into the `orchestrator_uuids` list of `.mam/agent-sessions.yaml` (and underlying state DB). This ensures that `find_workspace_uuid` and `verify_session_uuid` in `lib.sh` exclude orchestrator conversations when discovering unassigned sub-agent session UUIDs.
## Usage
```bash
.agents/skills/multi-agent-mux-orc-onboard/scripts/orc_onboard.sh [OPTIONS]
```
### Options
- `--uuid <uuid>`: Explicitly register the specified orchestrator session UUID.
- `--remove <uuid>`: Remove the specified UUID from the `orchestrator_uuids` list.
- `--list`: Display all currently registered orchestrator UUIDs.
- `--no-autodetect`: Disable process ancestry auto-detection when `--uuid` is not provided.
- `--dry-run`: Output proposed changes without mutating the state registry.
## Auto-Detection Hierarchy (Rev.2)
When `--uuid` is omitted, `orc_onboard.sh` inspects the process ancestry tree of the nearest agent ancestor (`claude`, `agy`, `hermes`, `grok`, `opencode`, `codex`) in the following order:
1. **CLI `argv`**:
- `claude -r <uuid>` / `claude --session-id <uuid>`
- `agy --conversation <uuid>`
- `grok --session-id <uuid>` / `grok --resume <uuid>`
- `opencode --session <uuid>`
- `codex resume <uuid>`
2. **Family-Matched Environment Variables**:
- `claude` → `CLAUDE_CODE_SESSION_ID`
- `agy` → `ANTIGRAVITY_CONVERSATION_ID`
- `hermes` → `HERMES_SESSION_ID`
- `grok` → `GROK_SESSION_ID`
3. **Fallback**:
- If no valid ID matching the nearest agent family is found, exits with status 3 (`Could not detect orchestrator ID`).
## Exit Statuses
- `0`: Success (registered, removed, listed, or already present).
- `1`: Conflict — the ID is currently owned by a `running` sub-agent session row.
- `2`: Invalid arguments or malformed ID format.
- `3`: Detection failed — ID could not be determined.