openteam 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openteam",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Agent-centric team collaboration framework",
5
5
  "type": "module",
6
6
  "bin": {
@@ -266,7 +266,9 @@ function writeSystemPromptFile(agent, teamPrompt) {
266
266
  }
267
267
 
268
268
  const combined = [agentContent, '', '---', '', '# Team Context', '', teamPrompt].join('\n');
269
- const tmpPath = path.join(os.tmpdir(), `openteam-prompt-${agent}.md`);
269
+ // 进程独占的临时目录,避免多用户/多实例文件冲突
270
+ const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'openteam-'));
271
+ const tmpPath = path.join(tmpDir, `${agent}.md`);
270
272
  fs.writeFileSync(tmpPath, combined, 'utf-8');
271
273
  return tmpPath;
272
274
  }
@@ -274,6 +276,9 @@ function writeSystemPromptFile(agent, teamPrompt) {
274
276
  function cleanupTempFile(filePath) {
275
277
  try {
276
278
  if (fs.existsSync(filePath)) fs.unlinkSync(filePath);
279
+ // 清理临时目录(mkdtemp 创建的)
280
+ const dir = path.dirname(filePath);
281
+ if (dir !== os.tmpdir()) fs.rmdirSync(dir);
277
282
  } catch {
278
283
  // 忽略清理失败
279
284
  }