feat(create/monitor): implement automatic UUID materialization, auto-pinning, and drift-C2 resolution (13/13 PASS)
This commit is contained in:
+11
-2
@@ -248,7 +248,16 @@ elif cmd1 == "agent":
|
||||
}
|
||||
|
||||
# Generate session/conversation UUID and files to simulate agent startup
|
||||
session_uuid = str(uuid.uuid4())
|
||||
session_uuid = ""
|
||||
cmd_str = " ".join(agent_cmd)
|
||||
if "--session-id" in cmd_str:
|
||||
parts = cmd_str.split()
|
||||
if "--session-id" in parts:
|
||||
_i = parts.index("--session-id")
|
||||
if _i + 1 < len(parts):
|
||||
session_uuid = parts[_i + 1]
|
||||
if not session_uuid:
|
||||
session_uuid = str(uuid.uuid4())
|
||||
own_key_map = {
|
||||
"claude": "claude_session_id_own",
|
||||
"agy": "agy_conversation_id_own",
|
||||
@@ -261,7 +270,7 @@ elif cmd1 == "agent":
|
||||
|
||||
# Find isolation directory (e.g. if HOME has agent_homes/<uuid>)
|
||||
home_dir = os.environ.get("HOME", "TMP_PATH_PLACEHOLDER")
|
||||
ws_abs = os.path.abspath(cwd or "TMP_PATH_PLACEHOLDER")
|
||||
ws_abs = os.path.realpath(cwd or "TMP_PATH_PLACEHOLDER")
|
||||
ws_key = ws_abs.replace('/', '-').replace('_', '-')
|
||||
|
||||
if agent_type == "claude":
|
||||
|
||||
Reference in New Issue
Block a user