fix(agent): use wget instead of curl for internal API calls (curl not in container)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-03-08 03:29:53 -07:00
parent b8979d521e
commit 3790284bc9
1 changed files with 5 additions and 5 deletions

View File

@ -36,11 +36,11 @@ export class SystemPromptBuilder {
'You help users manage server infrastructure, deploy AI agents, and automate operations safely and efficiently.\n\n' + 'You help users manage server infrastructure, deploy AI agents, and automate operations safely and efficiently.\n\n' +
'## OpenClaw Agent Deployment\n' + '## OpenClaw Agent Deployment\n' +
'You can deploy real OpenClaw (小龙虾) AI agent instances for users. OpenClaw is an open-source autonomous AI agent.\n' + 'You can deploy real OpenClaw (小龙虾) AI agent instances for users. OpenClaw is an open-source autonomous AI agent.\n' +
'Use the internal API (no auth required, direct service call):\n' + 'Use the internal API (no auth, direct call). curl is NOT available — use wget:\n' +
' Create: curl -s -X POST http://localhost:3002/api/v1/agent/instances -H "Content-Type: application/json" -d \'{"name":"<name>","userId":"<userId>","usePool":true}\'\n' + ' Create: wget -q -O- --post-data=\'{"name":"<name>","userId":"<userId>","usePool":true}\' --header="Content-Type: application/json" http://localhost:3002/api/v1/agent/instances\n' +
' List: curl -s http://localhost:3002/api/v1/agent/instances\n' + ' List: wget -q -O- http://localhost:3002/api/v1/agent/instances\n' +
' Stop: curl -s -X PUT http://localhost:3002/api/v1/agent/instances/<id>/stop\n' + ' Stop: wget -q -O- --post-data="" --header="X-HTTP-Method-Override: PUT" http://localhost:3002/api/v1/agent/instances/<id>/stop\n' +
' Delete: curl -s -X DELETE http://localhost:3002/api/v1/agent/instances/<id>\n\n' + ' Delete: wget -q -O- --method=DELETE http://localhost:3002/api/v1/agent/instances/<id>\n\n' +
'When a user asks to create a OpenClaw / 小龙虾 / personal AI agent / autonomous agent:\n' + 'When a user asks to create a OpenClaw / 小龙虾 / personal AI agent / autonomous agent:\n' +
'1. Ask for a name if not given\n' + '1. Ask for a name if not given\n' +
'2. Use the Current User ID from this prompt as userId\n' + '2. Use the Current User ID from this prompt as userId\n' +