Migrate primary to labeled path, remove all flat-path fallback logic

This commit is contained in:
daniel
2026-05-09 14:20:24 -05:00
parent aaecbcfa02
commit c317d948b1
2 changed files with 2 additions and 17 deletions

View File

@@ -98,14 +98,8 @@ def _load_all_creds(actor_id: str) -> dict[str, Credentials]:
except Exception as e:
print(f'[google] list_secrets failed: {e}')
# Always include flat secret as 'primary' if not already in result
if 'primary' not in result:
flat = f'agent-claw/google-credentials/{safe}'
try:
result['primary'] = _load_creds_from_secret(flat)
print(f'[google] loaded creds from flat path actor={actor_id}')
except Exception:
pass
# Note: all accounts now stored at agent-claw/google-credentials/{actor_id}/{label}
# flat path (no label) is legacy and no longer needed
_creds_cache[actor_id] = (now, result)
return result