Add token self-recovery to survive auth failures without SSH access
- GrpcMeshTransport: on handshake rejection, calls /api/v1/agent/token-sync
  using stable secret_key to fetch fresh invite_token and retries handshake.
  Persists recovered token to all known config file locations.
- agent_update.py: new /token-sync endpoint (auth: hub SECRET_KEY header).
- node.py: wire hub_http_url + secret_key into GrpcMeshTransport constructor.
- reinstall_windows_agent.ps1: idempotent all-in-one reinstall script —
  kills competing python processes, disables ghost startup bat, syncs config,
  optionally updates token, re-registers task with RestartCount=3.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent abb3bfd commit 3f03f297ca162976eaccc4a4ef96bd6696cf8155
@yangyang xie yangyang xie authored 14 days ago
Showing 4 changed files
View
agent-node/src/agent_node/node.py
View
ai-hub/app/api/routes/agent_update.py
View
mesh-sdk/mesh_core/transport/grpc.py
View
reinstall_windows_agent.ps1