refactor(skills): convert absolute paths to workspace-relative + relocate agent-sessions.yaml to .hermes/
Changes: - skills/lib.sh: AGENT_SESSIONS_YAML default moved from ~/PuKi/lab/.../agent-sessions.yaml to <workspace_root>/.hermes/agent-sessions.yaml (relative via BASH_SOURCE) - 6 SKILL.md: descriptions + 'Single source of truth' lines updated to .hermes/agent-sessions.yaml - 6 SKILL.md: bash examples (~/PuKi/lab/agent_sessions/skills/...) → relative paths - SKILL.md file:// links converted from absolute to relative (resolves workspace tool warnings) - tmux-agent-orchestrate-create/SKILL.md: removed outdated wrapper template reference - lib.sh internal comments: removed /home/godopu16/PuKi/lab example - All scripts: internal source/path references use relative resolution Verified on isolated server -L agy-relative-path-test (kill-server after): - syntax check PASS - E2E: create_session.sh auto-creates .hermes/agent-sessions.yaml at new location - status.sh reads new location correctly - 0 leftover absolute path references - Global skill non-interference verified - Main isolated server -L multi-agent-canary untouched
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: tmux-agent-orchestrate-resume
|
||||
description: "Resume an existing agent (claude, antigravity/agy) conversation by UUID into a tmux session. Reads ~/PuKi/lab/agent_sessions/agent-sessions.yaml for the saved session/conversation id, spawns (or reuses) a tmux session of the matching name, and runs `claude -r <id>` or `agy --conversation <id>` inside. Use when you want to reattach to a previous session's context, or revive a session whose tmux died but the agent's conversation is still on disk."
|
||||
description: "Resume an existing agent (claude, antigravity/agy) conversation by UUID into a tmux session. Reads .hermes/agent-sessions.yaml for the saved session/conversation id, spawns (or reuses) a tmux session of the matching name, and runs `claude -r <id>` or `agy --conversation <id>` inside. Use when you want to reattach to a previous session's context, or revive a session whose tmux died but the agent's conversation is still on disk."
|
||||
version: 1.0.0
|
||||
author: godopu
|
||||
license: MIT
|
||||
@@ -16,8 +16,8 @@ metadata:
|
||||
# Multi-Agent Resume — Reattach to a Saved Conversation
|
||||
|
||||
> **Companion skills**: `tmux-agent-orchestrate-create` (start a fresh agent), `tmux-agent-orchestrate-delete` (terminate), `tmux-agent-orchestrate-monitor` (live status).
|
||||
> **Tmux Isolation**: `TMUX_SERVER_NAME` env var를 create에서 설정한 경우, 동일 서버에서 동작합니다. 자세한 격리 패턴은 [tmux-agent-orchestrate-create/SKILL.md](file:///home/godopu16/PuKi/laa/canary_projects/advanced_multi_agent/skills/tmux-agent-orchestrate-create/SKILL.md) 참조.
|
||||
> **Single source of truth**: `~/PuKi/lab/agent_sessions/agent-sessions.yaml`.
|
||||
> **Tmux Isolation**: `TMUX_SERVER_NAME` env var를 create에서 설정한 경우, 동일 서버에서 동작합니다. 자세한 격리 패턴은 [tmux-agent-orchestrate-create/SKILL.md](../tmux-agent-orchestrate-create/SKILL.md) 참조.
|
||||
> **Single source of truth**: `./.hermes/agent-sessions.yaml`.
|
||||
|
||||
## What this skill does
|
||||
|
||||
@@ -49,7 +49,7 @@ AGENT=claude # or agy
|
||||
SESSION_NAME=<workspace>-creator-<agent> # same convention as tmux-agent-orchestrate-create
|
||||
|
||||
# 1. Resolve the session id
|
||||
UUID=$(bash ~/PuKi/lab/agent_sessions/skills/tmux-agent-orchestrate-resume/scripts/resolve_session_id.sh \
|
||||
UUID=$(bash skills/tmux-agent-orchestrate-resume/scripts/resolve_session_id.sh \
|
||||
--workspace "$WORKSPACE" --agent "$AGENT")
|
||||
|
||||
if [ -z "$UUID" ]; then
|
||||
@@ -58,7 +58,7 @@ if [ -z "$UUID" ]; then
|
||||
fi
|
||||
|
||||
# Resolve the isolated tmux server name
|
||||
source ~/PuKi/lab/agent_sessions/skills/lib.sh
|
||||
source skills/lib.sh
|
||||
export TMUX_SERVER_NAME="$(resolve_tmux_server "$SESSION_NAME")"
|
||||
|
||||
# 2. If tmux is alive, attach. Done.
|
||||
@@ -88,7 +88,7 @@ esac
|
||||
|
||||
# 4. Update agent-sessions.yaml: status running, last_visible_status
|
||||
# (Also automatically publishes a `progress --detail "resumed"` event to the tmux-agent-orchestrate-delegate-job registry if a delegate_job_id exists)
|
||||
bash ~/PuKi/lab/agent_sessions/skills/tmux-agent-orchestrate-resume/scripts/update_yaml_resumed.sh \
|
||||
bash skills/tmux-agent-orchestrate-resume/scripts/update_yaml_resumed.sh \
|
||||
--session "$SESSION_NAME" --uuid "$UUID"
|
||||
|
||||
# 5. Attach
|
||||
@@ -112,7 +112,7 @@ tmux list-panes -t "$SESSION_NAME" -F 'cmd=#{pane_current_command} cwd=#{pane_cu
|
||||
# 2. agent-sessions.yaml updated
|
||||
python3 -c "
|
||||
import yaml
|
||||
d = yaml.safe_load(open('$HOME/PuKi/lab/agent_sessions/agent-sessions.yaml'))
|
||||
d = yaml.safe_load(open('.hermes/agent-sessions.yaml'))
|
||||
s = [s for s in d['tmux_sessions'] if s['name'] == '$SESSION_NAME'][0]
|
||||
print(f' status: {s[\"status\"]}')
|
||||
print(f' pane.cmd_full: {s[\"pane\"][\"cmd_full\"]}')
|
||||
|
||||
Reference in New Issue
Block a user