chore(stop,resume): drop what Issue #63 left unused (Issue #63)

- workspace_uuid.py: the unused sys import.
- stop_session.sh: the orphan CAPTURE_ID and the blank padding that kept
  later line numbers; the inventory pins follow the move instead.
- lib.sh: capture_conversation_id, which nothing calls any more.
- resume SKILL.md: the flow names the session-id decision (session_ids.py),
  not resolve_session_id.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
GodopuandClaude Opus 5.5 committed 2026-10-21 23:53:10 +00:00
1 parent d115bf7156
commit a907cc5294
5 files changed
+7 -28

No files matched your search

-16
View File
@@ -2023,22 +2023,6 @@ find_workspace_uuid_main()
PYEOF PYEOF
} }
# ---------------------------------------------------------------------------
# capture_conversation_id <agent> <workdir> [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 <stop|resume> [args...] # mam_session_ids <stop|resume> [args...]
# Issue #63: stop/purge/resume conversation-id decision (lib_py.agents.session_ids). # Issue #63: stop/purge/resume conversation-id decision (lib_py.agents.session_ids).
+1 -1
View File
@@ -1,7 +1,7 @@
# workspace_uuid.py — workspace UUID discovery logic # workspace_uuid.py — workspace UUID discovery logic
# Extracted from lib.sh find_workspace_uuid PYEOF block # 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 from lib_py.verify_session import verify_session_uuid, mam_orchestrator_uuids, mam_row_own_uuid
OWN_KEY = { OWN_KEY = {
@@ -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 <path> --agent <agent> --session <name> bash .agents/skills/multi-agent-mux-resume/scripts/resume_session.sh --workspace <path> --agent <agent> --session <name>
``` ```
`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 <server> agent attach <name>` (`<server>` = 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 <server> agent attach <name>` (`<server>` = the `--herdr-session` you passed, or the row's `herdr_session`).
| Option | Meaning | | Option | Meaning |
|---|---| |---|---|
@@ -67,7 +67,6 @@ HERDR_SERVER_OPT=""
HERDR_WORKSPACE_OPT="" HERDR_WORKSPACE_OPT=""
PURGE=0 PURGE=0
YES=0 YES=0
CAPTURE_ID=1
GRACEFUL=1 GRACEFUL=1
REASON="manual_stop" REASON="manual_stop"
STOP_MODE=1 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 else echo "WARN: no conversation id recorded before stop${STOP_ID_NOTE:+ - $STOP_ID_NOTE}"; fi
fi fi
# (end of pre-kill id decision)
delegate_publish_event "$DELEGATE_JOB_ID" progress "terminating" "$DELEGATE_JOB_TOKEN" "$DELEGATE_JOB_ATTEMPT" delegate_publish_event "$DELEGATE_JOB_ID" progress "terminating" "$DELEGATE_JOB_TOKEN" "$DELEGATE_JOB_ATTEMPT"
# graceful 종료: send-keys 로 정상 종료 유도 → 폴백 체인 (SIGTERM → SIGKILL). # graceful 종료: send-keys 로 정상 종료 유도 → 폴백 체인 (SIGTERM → SIGKILL).
+5 -5
View File
@@ -433,7 +433,7 @@
"class": "c", "class": "c",
"kind": "diagram", "kind": "diagram",
"evidence": [ "evidence": [
"multi-agent-mux-stop/scripts/stop_session.sh:184-198" "multi-agent-mux-stop/scripts/stop_session.sh:183-197"
], ],
"mismatch": null, "mismatch": null,
"note": "state machine" "note": "state machine"
@@ -503,9 +503,9 @@
"base_sha": "a7ed3e902cae", "base_sha": "a7ed3e902cae",
"class": "a", "class": "a",
"evidence": [ "evidence": [
"multi-agent-mux-stop/scripts/stop_session.sh:99", "multi-agent-mux-stop/scripts/stop_session.sh:98",
"multi-agent-mux-stop/scripts/stop_session.sh:140-143", "multi-agent-mux-stop/scripts/stop_session.sh:139-142",
"multi-agent-mux-stop/scripts/stop_session.sh:184-188" "multi-agent-mux-stop/scripts/stop_session.sh:183-187"
], ],
"mismatch": [ "mismatch": [
"T1: the doc offered --force-no-yaml, which no script accepts" "T1: the doc offered --force-no-yaml, which no script accepts"
@@ -599,7 +599,7 @@
"other" "other"
], ],
"passthrough": { "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": { "multi-agent-mux-create/scripts/create_session.sh": {