triflux 8.9.0 → 8.9.1

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": "triflux",
3
- "version": "8.9.0",
3
+ "version": "8.9.1",
4
4
  "description": "CLI-first multi-model orchestrator for Claude Code — route tasks to Codex, Gemini, and Claude",
5
5
  "type": "module",
6
6
  "bin": {
@@ -66,13 +66,25 @@ function startHubDetached(port) {
66
66
  if (!existsSync(serverPath)) return false;
67
67
 
68
68
  try {
69
- const child = spawn(process.execPath, [serverPath], {
70
- env: { ...process.env, TFX_HUB_PORT: String(port) },
71
- detached: true,
72
- stdio: "ignore",
73
- windowsHide: true,
74
- });
75
- child.unref();
69
+ const env = { ...process.env, TFX_HUB_PORT: String(port) };
70
+ if (process.platform === "win32") {
71
+ // Windows: cmd.exe /c start /b → 완전 독립 프로세스 트리 생성
72
+ // hook timeout 시 프로세스 트리 킬에서 살아남음
73
+ const child = spawn("cmd.exe", ["/c", "start", "/b", "", process.execPath, serverPath], {
74
+ env,
75
+ detached: true,
76
+ stdio: "ignore",
77
+ windowsHide: true,
78
+ });
79
+ child.unref();
80
+ } else {
81
+ const child = spawn(process.execPath, [serverPath], {
82
+ env,
83
+ detached: true,
84
+ stdio: "ignore",
85
+ });
86
+ child.unref();
87
+ }
76
88
  return true;
77
89
  } catch {
78
90
  return false;
@@ -94,9 +106,16 @@ const { host, port } = resolveHubTarget();
94
106
  if (!(await isHubHealthy(host, port))) {
95
107
  const started = startHubDetached(port);
96
108
  if (started) {
97
- const ready = await waitForHubReady(host, port);
98
- if (!ready) {
99
- console.error("[tfx-hub-ensure] Hub 시작했으나 ready 대기 초과 — MCP 연결 실패 가능");
109
+ const ready = await waitForHubReady(host, port, 3000);
110
+ if (ready) {
111
+ process.stdout.write("hub: ok");
112
+ } else {
113
+ // fire-and-forget: hub이 아직 기동 중일 수 있음 — 에러가 아닌 경고
114
+ process.stdout.write("hub: starting");
100
115
  }
116
+ } else {
117
+ process.stderr.write("[hub-ensure] hub 시작 실패");
101
118
  }
119
+ } else {
120
+ process.stdout.write("hub: ok");
102
121
  }