@triflux/remote 10.77.0 → 10.78.0

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.
@@ -56,7 +56,7 @@ export async function sendCodexPeer({ client, threadId, message }) {
56
56
  } while (!loaded && cursor);
57
57
  if (!loaded)
58
58
  throw new Error(
59
- "Codex target is not loaded in this app-server; start TUI with --remote unix://...",
59
+ "Codex target is not loaded in this app-server. 이 Codex 는 공유 데몬에 붙어 있지 않다. tfx-live start --cli codex (또는 --resume)로 다시 띄워라",
60
60
  );
61
61
  const read = await client.request("thread/read", {
62
62
  threadId,
@@ -117,10 +117,9 @@ export function assertPrivateFile(
117
117
  return meta;
118
118
  }
119
119
 
120
- export function resolveCodexSocket(home = os.homedir()) {
120
+ export function resolveCodexSocket(home = os.homedir(), env = process.env) {
121
121
  const link = path.join(
122
- home,
123
- ".codex",
122
+ env.CODEX_HOME ?? path.join(home, ".codex"),
124
123
  "app-server-control",
125
124
  "app-server-control.sock",
126
125
  );
@@ -133,9 +132,10 @@ export async function deliverCodex({
133
132
  threadId,
134
133
  message,
135
134
  home = os.homedir(),
135
+ env = process.env,
136
136
  clientFactory = (socketPath) => new JsonRpcWsUdsClient({ socketPath }),
137
137
  }) {
138
- const client = clientFactory(resolveCodexSocket(home));
138
+ const client = clientFactory(resolveCodexSocket(home, env));
139
139
  try {
140
140
  await client.connect();
141
141
  await client.request("initialize", {
@@ -232,7 +232,7 @@ export function resolveClaudeRegistryTarget(
232
232
  try {
233
233
  assertPrivateFile(file, "Claude session", { privateMode: false });
234
234
  const record = JSON.parse(fs.readFileSync(file, "utf8"));
235
- if (`${record.pid}.json` === name && record.sessionId && record.name)
235
+ if (`${record.pid}.json` === name && record.sessionId)
236
236
  records.push(record);
237
237
  } catch {}
238
238
  }
@@ -241,7 +241,7 @@ export function resolveClaudeRegistryTarget(
241
241
  );
242
242
  const named = exactId.length
243
243
  ? exactId
244
- : records.filter((x) => x.name.toLowerCase() === query.toLowerCase());
244
+ : records.filter((x) => x.name?.toLowerCase() === query.toLowerCase());
245
245
  if (!named.length)
246
246
  throw new Error("Claude target not found in local session registry");
247
247
  if (exactId.length && exactId[0].parkedJobId)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triflux/remote",
3
- "version": "10.77.0",
3
+ "version": "10.78.0",
4
4
  "description": "triflux remote — team mode, psmux, MCP workers.",
5
5
  "type": "module",
6
6
  "main": "hub/index.mjs",
@@ -112,12 +112,12 @@ function trustedPackageTree(packageRoot, nodePath, tmuxPath) {
112
112
  !existing(resolvedNode)?.isFile()
113
113
  )
114
114
  return false;
115
+ // Homebrew prefix는 git 저장소일 수 있으므로 node_modules까지만 검사한다.
115
116
  let ancestor = packageRoot;
116
117
  while (true) {
117
118
  if (existing(path.join(ancestor, ".git"))) return false;
118
- const parent = path.dirname(ancestor);
119
- if (parent === ancestor) break;
120
- ancestor = parent;
119
+ if (ancestor === path.dirname(packageRoot)) break;
120
+ ancestor = path.dirname(ancestor);
121
121
  }
122
122
  const stack = [packageRoot];
123
123
  while (stack.length) {