π€― LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
π fix(sandbox): tell the Agent to link exported files, not sandbox paths (#23648)
Arvin Xua1bc31b61fd5
diff --git a/packages/builtin-tool-cloud-sandbox/src/systemRole.ts b/packages/builtin-tool-cloud-sandbox/src/systemRole.tsindex 064ed80fdf6..e321a308844 100644--- a/packages/builtin-tool-cloud-sandbox/src/systemRole.ts+++ b/packages/builtin-tool-cloud-sandbox/src/systemRole.ts@@ -147,9 +147,16 @@ When the user requests a file deliverable or download, export the finalized file**Execution Pattern:**1. Execute the requested operation2. When the requested file deliverable is finalized β **call exportFile**-3. Present download links prominently in the response+3. Present download links prominently in the response, using the Download URL that \`exportFile\` returned4. Confirm what was created and exported+**Never Show Sandbox Paths as Links or Images:**+Sandbox paths (e.g. \`/work/output/chart.png\`, \`./result.zip\`) only exist inside the sandbox; the user cannot open them, and a Markdown image or link pointing at one renders broken. In your reply:+- To show a file, export it first, then use its Download URL: \`\` or \`[result.zip](<Download URL>)\`+- Never write \`\` or \`[...](/sandbox/path)\`+- If an export failed, say so plainly and name the file in plain text or inline code; do not link its sandbox path+- Mentioning a path in inline code to explain where a file lives is fine+**Example Response Format:**β Successfully created [filename]π₯ Download link: [export URL]@@ -173,7 +180,7 @@ When the user requests a file deliverable or download, export the finalized file- For running shell commands: Use 'runCommand' to execute shell commands like \`pip install package\` or complex shell operations.- For background tasks: Set background: true in runCommand, then use getCommandOutput to check progress.- For searching files: Use 'searchFiles' for filename search, 'grepContent' for content search, 'globFiles' for pattern matching.-- For exporting files: Use 'exportFile' with the file path to generate a download URL for the user. **Export finalized file deliverables, not intermediate files or Artifact previews.**+- For exporting files: Use 'exportFile' with the file path to generate a download URL for the user. **Export finalized file deliverables, not intermediate files or Artifact previews.** Link or embed files in your reply only by that URL, never by their sandbox path.</tool_usage_guidelines>diff --git a/packages/builtin-tool-skills/src/systemRole.ts b/packages/builtin-tool-skills/src/systemRole.tsindex 26d494bb16a..82bc4fe3b46 100644--- a/packages/builtin-tool-skills/src/systemRole.ts+++ b/packages/builtin-tool-skills/src/systemRole.ts@@ -10,7 +10,7 @@ ${sharedSkillGuidelines}- **runCommand vs execScript**:- **runCommand (default)**: Execute general CLI and shell commands (e.g., \`lh\` CLI, \`npm\`, system commands) in the cloud sandbox. If \`lobe-local-system\` \`runCommand\` is also available, default shell execution to \`lobe-local-system\` and use this sandbox \`runCommand\` only when the task needs LobeHub-managed credentials, isolation, or a tool missing on the local device.- **execScript**: Use only when a command requires skill-bundled resources (ZIP packages, scripts, or config files) from the activated skill.-- **exportFile**: Export files generated in the cloud sandbox to return a permanent download URL for the user.+- **exportFile**: Export files generated in the cloud sandbox to return a permanent download URL for the user. Sandbox paths are not reachable by the user: to show or link a sandbox file in your reply (including a Markdown image), export it and use the returned Download URL, never the sandbox path.</guidelines><sandbox_environment>