- Restored Phase C gateway code (handlers, main.go, docker client, db)
- Added routes: GET /api/agents/running, POST /api/agents (CRUD),
POST /api/agents/{id}/deploy, POST /api/agents/{id}/stop,
POST /api/agents/{id}/restart, POST /api/agents/{id}/scale
- Fixed StopAgent: always try to stop by canonical name goclaw-agent-{id}
even when serviceName is empty in DB
- Fixed DeployAgent: handle 409 conflict by removing existing container
and retrying once (idempotent deploy)
- Added swarm_manager.go: background SwarmManager for dead-letter recovery
- Added AGENT_NETWORK and AGENT_DB_URL config options
- Updated .gitignore to exclude gateway binaries
- All agents use standalone docker run (not Swarm) on bridge network
Verified on prod: deploy/stop/restart cycle works correctly,
/api/agents/running returns live running agents with containerStatus
18 lines
360 B
Modula-2
18 lines
360 B
Modula-2
module git.softuniq.eu/UniqAI/GoClaw/gateway
|
|
|
|
go 1.23.4
|
|
|
|
require (
|
|
github.com/go-chi/chi/v5 v5.2.1
|
|
github.com/go-chi/cors v1.2.1
|
|
github.com/go-sql-driver/mysql v1.8.1
|
|
github.com/google/uuid v1.6.0
|
|
github.com/joho/godotenv v1.5.1
|
|
golang.org/x/crypto v0.37.0
|
|
)
|
|
|
|
require (
|
|
filippo.io/edwards25519 v1.1.0 // indirect
|
|
golang.org/x/sys v0.32.0 // indirect
|
|
)
|