diff --git a/.agents/skills/lib.sh b/.agents/skills/lib.sh index 67ff805..06d9a7b 100644 --- a/.agents/skills/lib.sh +++ b/.agents/skills/lib.sh @@ -2023,22 +2023,6 @@ find_workspace_uuid_main() PYEOF } -# --------------------------------------------------------------------------- -# capture_conversation_id [session_name] -# -# Thin wrapper over find_workspace_uuid: resolves THIS workspace's conversation -# id (claude jsonl sessionId / agy db uuid) and prints it on stdout (empty line -# if none). find_workspace_uuid is already a workspace-scoped, 2-tier, race-free -# resolver (per-row own id -> workspace-scoped disk scan), -# so recording its result into the row before kill guarantees tier-1 on the next -# resume. Pass session_name to prefer that specific row's recorded id. Always exits 0. -# Note (Issue #63): stop_session.sh no longer calls this directly (it uses mam_session_ids). -# --------------------------------------------------------------------------- -capture_conversation_id() { - local agent="$1" workdir="$2" session_name="${3:-}" - find_workspace_uuid "$workdir" "$agent" "$session_name" -} - # --------------------------------------------------------------------------- # mam_session_ids [args...] # Issue #63: stop/purge/resume conversation-id decision (lib_py.agents.session_ids). diff --git a/.agents/skills/lib_py/workspace_uuid.py b/.agents/skills/lib_py/workspace_uuid.py index b5665d5..26bdc30 100644 --- a/.agents/skills/lib_py/workspace_uuid.py +++ b/.agents/skills/lib_py/workspace_uuid.py @@ -1,7 +1,7 @@ # workspace_uuid.py — workspace UUID discovery logic # Extracted from lib.sh find_workspace_uuid PYEOF block -import os, sys, json +import os, json from lib_py.verify_session import verify_session_uuid, mam_orchestrator_uuids, mam_row_own_uuid OWN_KEY = { diff --git a/.agents/skills/multi-agent-mux-resume/SKILL.md b/.agents/skills/multi-agent-mux-resume/SKILL.md index 637d157..8707f99 100644 --- a/.agents/skills/multi-agent-mux-resume/SKILL.md +++ b/.agents/skills/multi-agent-mux-resume/SKILL.md @@ -60,7 +60,7 @@ If the resolved id is empty → for Class A agents (`agy`, `hermes`, `opencode`, bash .agents/skills/multi-agent-mux-resume/scripts/resume_session.sh --workspace --agent --session ``` -`resume_session.sh` does the whole flow: original-cwd check, control-plane binding, session-id resolution (`resolve_session_id.sh`), the herdr-alive check, the agent command (adapter `resume-spec`, or `spawn-spec` for a Class A fresh spawn), spawn (just before it, the session's own empty shell left by a server restart is closed: same session id, no agent, nothing running; `lib_py/herdr_restore.py`), start-up dialogs, and the YAML update (`update_yaml_resumed.sh`, which also publishes a `progress "resumed"` event when the row has a `delegate_job_id`). It never attaches; attaching is a separate step that names the server, because the server the script exports does not reach the calling shell and the native `herdr` binary does not route on environment variables: `herdr --session agent attach ` (`` = the `--herdr-session` you passed, or the row's `herdr_session`). +`resume_session.sh` does the whole flow: original-cwd check, control-plane binding, the session-id decision (`lib_py/agents/session_ids.py`), the herdr-alive check, the agent command (adapter `resume-spec`, or `spawn-spec` for a Class A fresh spawn), spawn (just before it, the session's own empty shell left by a server restart is closed: same session id, no agent, nothing running; `lib_py/herdr_restore.py`), start-up dialogs, and the YAML update (`update_yaml_resumed.sh`, which also publishes a `progress "resumed"` event when the row has a `delegate_job_id`). It never attaches; attaching is a separate step that names the server, because the server the script exports does not reach the calling shell and the native `herdr` binary does not route on environment variables: `herdr --session agent attach ` (`` = the `--herdr-session` you passed, or the row's `herdr_session`). | Option | Meaning | |---|---| diff --git a/.agents/skills/multi-agent-mux-stop/scripts/stop_session.sh b/.agents/skills/multi-agent-mux-stop/scripts/stop_session.sh index 67aec7a..c46583d 100755 --- a/.agents/skills/multi-agent-mux-stop/scripts/stop_session.sh +++ b/.agents/skills/multi-agent-mux-stop/scripts/stop_session.sh @@ -67,7 +67,6 @@ HERDR_SERVER_OPT="" HERDR_WORKSPACE_OPT="" PURGE=0 YES=0 -CAPTURE_ID=1 GRACEFUL=1 REASON="manual_stop" STOP_MODE=1 @@ -224,10 +223,6 @@ if [ -n "$TARGET_CWD" ]; then else echo "WARN: no conversation id recorded before stop${STOP_ID_NOTE:+ - $STOP_ID_NOTE}"; fi fi - - -# (end of pre-kill id decision) - delegate_publish_event "$DELEGATE_JOB_ID" progress "terminating" "$DELEGATE_JOB_TOKEN" "$DELEGATE_JOB_ATTEMPT" # graceful 종료: send-keys 로 정상 종료 유도 → 폴백 체인 (SIGTERM → SIGKILL). diff --git a/tests/data/skill_code_blocks.json b/tests/data/skill_code_blocks.json index 10cb1c3..9a4bd68 100644 --- a/tests/data/skill_code_blocks.json +++ b/tests/data/skill_code_blocks.json @@ -433,7 +433,7 @@ "class": "c", "kind": "diagram", "evidence": [ - "multi-agent-mux-stop/scripts/stop_session.sh:184-198" + "multi-agent-mux-stop/scripts/stop_session.sh:183-197" ], "mismatch": null, "note": "state machine" @@ -503,9 +503,9 @@ "base_sha": "a7ed3e902cae", "class": "a", "evidence": [ - "multi-agent-mux-stop/scripts/stop_session.sh:99", - "multi-agent-mux-stop/scripts/stop_session.sh:140-143", - "multi-agent-mux-stop/scripts/stop_session.sh:184-188" + "multi-agent-mux-stop/scripts/stop_session.sh:98", + "multi-agent-mux-stop/scripts/stop_session.sh:139-142", + "multi-agent-mux-stop/scripts/stop_session.sh:183-187" ], "mismatch": [ "T1: the doc offered --force-no-yaml, which no script accepts" @@ -599,7 +599,7 @@ "other" ], "passthrough": { - "1": "multi-agent-mux-stop/scripts/stop_session.sh:327" + "1": "multi-agent-mux-stop/scripts/stop_session.sh:322" } }, "multi-agent-mux-create/scripts/create_session.sh": {