@@ -43,6 +43,7 @@ type CreateAgentSandboxParams = {
4343 teamId : string ;
4444 tmbId : string ;
4545 sessionId : string ; // chat 模式 = chatId,debug 模式 = 构造的 key,决定 MinIO 数据路径
46+ entrypoint ?: string ; // override default entrypoint for this request
4647 onProgress ?: ( status : SandboxStatusItemType ) => void ; // lifecycle progress callback
4748} ;
4849
@@ -96,10 +97,10 @@ function mergeSkillWithVersion(
9697
9798/** Dynamically discover all deployed skill directories in the sandbox by locating SKILL.md files.
9899 * Example:
99- * $ find /workspace/projects -name "SKILL.md" -maxdepth 5 2>/dev/null
100- * /workspace/projects/skill-creator/SKILL.md
101- * /workspace/projects/deep-research/SKILL.md
102- * /workspace/projects/science/SKILL.md
100+ * $ find ${FASTGPT_WORKDIR} -name "SKILL.md" -maxdepth 5 2>/dev/null
101+ * /home/sandbox/ workspace/projects/skill-creator/SKILL.md
102+ * /home/sandbox/ workspace/projects/deep-research/SKILL.md
103+ * /home/sandbox/ workspace/projects/science/SKILL.md
103104 *
104105 * Runs `find` inside the sandbox to locate SKILL.md files up to maxdepth 2,
105106 * then reads each file and parses the frontmatter for name/description.
@@ -186,7 +187,7 @@ async function deploySkillsToSandbox(
186187export async function createAgentSandbox (
187188 params : CreateAgentSandboxParams
188189) : Promise < AgentSandboxContext > {
189- const { skillIds, teamId, tmbId, sessionId, onProgress } = params ;
190+ const { skillIds, teamId, tmbId, sessionId, entrypoint , onProgress } = params ;
190191
191192 const providerConfig = getSandboxProviderConfig ( ) ;
192193 const defaults = getSandboxDefaults ( ) ;
@@ -275,7 +276,7 @@ export async function createAgentSandbox(
275276 await sandbox . create ( {
276277 image : defaults . defaultImage ,
277278 timeout : defaults . timeout ,
278- entrypoint : [ '/opt/sync-agent/docker- entrypoint.sh' ] ,
279+ entrypoint : [ entrypoint ?? defaults . entrypoint . sessionKubernetes ] ,
279280 env : buildDockerSyncEnv ( sessionId , defaults . workDirectory , false ) ,
280281 metadata : {
281282 teamId,
@@ -290,7 +291,7 @@ export async function createAgentSandbox(
290291 await sandbox . create ( {
291292 image : { repository : 'fastgpt-agent-sandbox' , tag : 'docker' } ,
292293 timeout : defaults . timeout ,
293- entrypoint : [ '/opt/sync-agent/docker- entrypoint.sh' ] ,
294+ entrypoint : [ entrypoint ?? defaults . entrypoint . docker ] ,
294295 env : buildDockerSyncEnv ( sessionId , defaults . workDirectory , false ) ,
295296 metadata : {
296297 teamId,
0 commit comments