u-foo 2.3.4 → 2.3.5

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": "u-foo",
3
- "version": "2.3.4",
3
+ "version": "2.3.5",
4
4
  "description": "Multi-Agent Workspace Protocol. Just add u. claude → uclaude, codex → ucodex.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://ufoo.dev",
package/src/daemon/ops.js CHANGED
@@ -628,17 +628,18 @@ async function spawnInternalAgent(projectRoot, agent, count = 1, nickname = "",
628
628
  bus.loadBusData();
629
629
  process.env.UFOO_PARENT_PID = String(originalPid);
630
630
 
631
- // For ucode/ufoo agents, default nickname to "ucode" if not specified
632
- const defaultNickname = agentType === "ufoo-code" ? "ucode" : agent;
633
- const finalNickname = count > 1 ? `${nickname || defaultNickname}-${i + 1}` : (nickname || defaultNickname);
631
+ const requestedNickname = nickname
632
+ ? (count > 1 ? `${nickname}-${i + 1}` : nickname)
633
+ : "";
634
634
  const usePty = process.env.UFOO_INTERNAL_PTY !== "0";
635
635
  const launchMode = usePty ? "internal-pty" : "internal";
636
636
 
637
637
  // 传递 launch_mode 和 parent PID 到 join
638
- await bus.subscriberManager.join(sessionId, agentType, finalNickname, {
638
+ const joinResult = await bus.subscriberManager.join(sessionId, agentType, requestedNickname, {
639
639
  launchMode,
640
640
  parentPid: originalPid,
641
641
  });
642
+ const finalNickname = joinResult.nickname || requestedNickname || "";
642
643
  bus.saveBusData();
643
644
 
644
645
  const runnerCmd = usePty ? "agent-pty-runner" : "agent-runner";