From 3790284bc9ec2508ce94daf8110ae80482e54bd4 Mon Sep 17 00:00:00 2001 From: hailin Date: Sun, 8 Mar 2026 03:29:53 -0700 Subject: [PATCH] fix(agent): use wget instead of curl for internal API calls (curl not in container) Co-Authored-By: Claude Sonnet 4.6 --- .../engines/claude-code-cli/system-prompt-builder.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/services/agent-service/src/infrastructure/engines/claude-code-cli/system-prompt-builder.ts b/packages/services/agent-service/src/infrastructure/engines/claude-code-cli/system-prompt-builder.ts index 90f1f2b..8d8f624 100644 --- a/packages/services/agent-service/src/infrastructure/engines/claude-code-cli/system-prompt-builder.ts +++ b/packages/services/agent-service/src/infrastructure/engines/claude-code-cli/system-prompt-builder.ts @@ -36,11 +36,11 @@ export class SystemPromptBuilder { 'You help users manage server infrastructure, deploy AI agents, and automate operations safely and efficiently.\n\n' + '## OpenClaw Agent Deployment\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' + - ' Create: curl -s -X POST http://localhost:3002/api/v1/agent/instances -H "Content-Type: application/json" -d \'{"name":"","userId":"","usePool":true}\'\n' + - ' List: curl -s http://localhost:3002/api/v1/agent/instances\n' + - ' Stop: curl -s -X PUT http://localhost:3002/api/v1/agent/instances//stop\n' + - ' Delete: curl -s -X DELETE http://localhost:3002/api/v1/agent/instances/\n\n' + + 'Use the internal API (no auth, direct call). curl is NOT available — use wget:\n' + + ' Create: wget -q -O- --post-data=\'{"name":"","userId":"","usePool":true}\' --header="Content-Type: application/json" http://localhost:3002/api/v1/agent/instances\n' + + ' List: wget -q -O- http://localhost:3002/api/v1/agent/instances\n' + + ' Stop: wget -q -O- --post-data="" --header="X-HTTP-Method-Override: PUT" http://localhost:3002/api/v1/agent/instances//stop\n' + + ' Delete: wget -q -O- --method=DELETE http://localhost:3002/api/v1/agent/instances/\n\n' + 'When a user asks to create a OpenClaw / 小龙虾 / personal AI agent / autonomous agent:\n' + '1. Ask for a name if not given\n' + '2. Use the Current User ID from this prompt as userId\n' +