feat(isolation): implement Phase 1-3 session isolation with stop purge and resume safety

This commit is contained in:
2026-07-10 12:24:35 +09:00
parent 35068f7a9e
commit 768cfe5c6d
6 changed files with 451 additions and 62 deletions
@@ -13,18 +13,22 @@ source "$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)/lib.sh"
usage() {
cat <<EOF
Usage: $0 --workspace <path> --agent <claude|agy>
Usage: $0 --workspace <path> --agent <claude|agy|hermes|cline> [--session <name>]
Outputs the resolved UUID on stdout (empty if not found).
--session scopes resolution to that registry row — required for sessions
created with --isolate (their conversation lives only in the row's isolation root).
EOF
}
WORKSPACE=""
AGENT=""
SESSION_NAME=""
while [ $# -gt 0 ]; do
case "$1" in
--workspace) WORKSPACE="$2"; shift 2 ;;
--agent) AGENT="$2"; shift 2 ;;
--session) SESSION_NAME="$2"; shift 2 ;;
-h|--help) usage; exit 0 ;;
*) echo "ERROR: unknown arg: $1" >&2; exit 2 ;;
esac
@@ -37,4 +41,4 @@ case "$AGENT" in
*) echo "ERROR: --agent must be claude or agy or hermes or cline" >&2; exit 2 ;;
esac
find_workspace_uuid "$WORKSPACE" "$AGENT"
find_workspace_uuid "$WORKSPACE" "$AGENT" "$SESSION_NAME"