triflux 10.3.2 → 10.3.4
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/.claude-plugin/plugin.json +22 -22
- package/LICENSE +21 -21
- package/README.ko.md +16 -0
- package/README.md +8 -0
- package/hooks/hook-registry.json +256 -256
- package/hub/adaptive-inject.mjs +1 -1
- package/hub/assign-callbacks.mjs +120 -120
- package/hub/delegator/index.mjs +14 -14
- package/hub/delegator/tool-definitions.mjs +35 -35
- package/hub/hitl.mjs +143 -143
- package/hub/lib/path-utils.mjs +167 -0
- package/hub/router.mjs +791 -791
- package/hub/session-fingerprint.mjs +1 -1
- package/hub/team/cli/commands/attach.mjs +37 -37
- package/hub/team/cli/commands/debug.mjs +74 -74
- package/hub/team/cli/commands/focus.mjs +53 -53
- package/hub/team/cli/commands/list.mjs +24 -24
- package/hub/team/cli/commands/start/start-in-process.mjs +40 -40
- package/hub/team/cli/commands/start/start-mux.mjs +73 -73
- package/hub/team/cli/commands/start/start-wt.mjs +69 -69
- package/hub/team/cli/commands/tasks.mjs +13 -13
- package/hub/team/cli/render.mjs +30 -30
- package/hub/team/cli/services/attach-fallback.mjs +54 -54
- package/hub/team/cli/services/member-selector.mjs +30 -30
- package/hub/team/cli/services/native-control.mjs +116 -116
- package/hub/team/cli/services/task-model.mjs +30 -30
- package/hub/team/notify.mjs +1 -1
- package/hub/team/orchestrator.mjs +161 -161
- package/hub/team/runtime-strategy.mjs +74 -0
- package/hub/team/session.mjs +611 -611
- package/hub/team/shared.mjs +13 -13
- package/hub/team/worktree-lifecycle.mjs +61 -2
- package/hub/tray.mjs +368 -368
- package/hub/workers/codex-mcp.mjs +507 -507
- package/hub/workers/factory.mjs +21 -21
- package/hud/hud-qos-status.mjs +17 -3
- package/hud/mission-board.mjs +53 -0
- package/hud/providers/claude.mjs +95 -22
- package/hud/renderers.mjs +39 -5
- package/mesh/index.mjs +63 -0
- package/mesh/mesh-budget.mjs +128 -0
- package/mesh/mesh-heartbeat.mjs +100 -0
- package/mesh/mesh-protocol.mjs +96 -0
- package/mesh/mesh-queue.mjs +165 -0
- package/mesh/mesh-registry.mjs +78 -0
- package/mesh/mesh-router.mjs +76 -0
- package/package.json +2 -1
- package/scripts/completions/tfx.bash +47 -47
- package/scripts/completions/tfx.fish +44 -44
- package/scripts/completions/tfx.zsh +83 -83
- package/scripts/demo.mjs +169 -0
- package/scripts/headless-guard.mjs +16 -4
- package/scripts/hub-ensure.mjs +120 -120
- package/scripts/keyword-detector.mjs +272 -272
- package/scripts/keyword-rules-expander.mjs +521 -521
- package/scripts/lib/mcp-server-catalog.mjs +118 -118
- package/scripts/lib/skill-state.mjs +220 -0
- package/scripts/notion-read.mjs +553 -553
- package/scripts/test-tfx-route-no-claude-native.mjs +57 -57
- package/scripts/tfx-batch-stats.mjs +96 -96
- package/skills/.omc/state/agent-replay-8f0e10a9-9693-4410-96f5-a6b07e8ed995.jsonl +0 -1
- package/skills/.omc/state/idle-notif-cooldown.json +0 -3
- package/skills/.omc/state/last-tool-error.json +0 -7
- package/skills/.omc/state/subagent-tracking.json +0 -7
- package/skills/tfx-remote-spawn/references/hosts.json +0 -16
package/hub/team/shared.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
// hub/team/shared.mjs — 팀 모듈 공유 유틸리티
|
|
2
|
-
// cli.mjs, dashboard.mjs 등에서 중복되던 상수/함수를 통합
|
|
3
|
-
|
|
4
|
-
// ── ANSI 색상 상수 ──
|
|
5
|
-
export const AMBER = "\x1b[38;5;214m";
|
|
6
|
-
export const GREEN = "\x1b[38;5;82m";
|
|
7
|
-
export const RED = "\x1b[38;5;196m";
|
|
8
|
-
export const GRAY = "\x1b[38;5;245m";
|
|
9
|
-
export const DIM = "\x1b[2m";
|
|
10
|
-
export const BOLD = "\x1b[1m";
|
|
11
|
-
export const RESET = "\x1b[0m";
|
|
12
|
-
export const WHITE = "\x1b[97m";
|
|
13
|
-
export const YELLOW = "\x1b[33m";
|
|
1
|
+
// hub/team/shared.mjs — 팀 모듈 공유 유틸리티
|
|
2
|
+
// cli.mjs, dashboard.mjs 등에서 중복되던 상수/함수를 통합
|
|
3
|
+
|
|
4
|
+
// ── ANSI 색상 상수 ──
|
|
5
|
+
export const AMBER = "\x1b[38;5;214m";
|
|
6
|
+
export const GREEN = "\x1b[38;5;82m";
|
|
7
|
+
export const RED = "\x1b[38;5;196m";
|
|
8
|
+
export const GRAY = "\x1b[38;5;245m";
|
|
9
|
+
export const DIM = "\x1b[2m";
|
|
10
|
+
export const BOLD = "\x1b[1m";
|
|
11
|
+
export const RESET = "\x1b[0m";
|
|
12
|
+
export const WHITE = "\x1b[97m";
|
|
13
|
+
export const YELLOW = "\x1b[33m";
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
// Remote support: host option → SSH-based git operations via remote-session.mjs.
|
|
5
5
|
|
|
6
6
|
import { execFile } from 'node:child_process';
|
|
7
|
-
import { resolve, normalize } from 'node:path';
|
|
8
|
-
import { mkdir, rm, access } from 'node:fs/promises';
|
|
7
|
+
import { resolve, normalize, join } from 'node:path';
|
|
8
|
+
import { mkdir, rm, access, readdir } from 'node:fs/promises';
|
|
9
9
|
import { remoteGit, validateHost } from './remote-session.mjs';
|
|
10
10
|
|
|
11
11
|
const SWARM_ROOT = '.codex-swarm';
|
|
@@ -92,6 +92,10 @@ export async function ensureWorktree({ slug, runId, rootDir = process.cwd(), bas
|
|
|
92
92
|
await git(['worktree', 'add', wtDir, branchName], rootDir);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
// #34 L2: worktree에 복사된 .claude-plugin 제거 (하네스가 PLUGIN_ROOT를 오인하는 것 방지)
|
|
96
|
+
const pluginDir = join(wtDir, '.claude-plugin');
|
|
97
|
+
try { await rm(pluginDir, { recursive: true, force: true }); } catch { /* absent → ok */ }
|
|
98
|
+
|
|
95
99
|
return { worktreePath: normPath(wtDir), branchName, remote: false };
|
|
96
100
|
}
|
|
97
101
|
|
|
@@ -192,6 +196,61 @@ export async function pruneWorktree({ worktreePath, branchName, rootDir = proces
|
|
|
192
196
|
}
|
|
193
197
|
}
|
|
194
198
|
|
|
199
|
+
/**
|
|
200
|
+
* #34 L3: Detect and remove orphan worktree directories.
|
|
201
|
+
* Compares .codex-swarm/wt-* directories against `git worktree list`.
|
|
202
|
+
* Directories not registered as worktrees are removed.
|
|
203
|
+
*
|
|
204
|
+
* @param {object} [opts]
|
|
205
|
+
* @param {string} [opts.rootDir=process.cwd()]
|
|
206
|
+
* @returns {Promise<string[]>} removed directory names
|
|
207
|
+
*/
|
|
208
|
+
export async function pruneOrphanWorktrees({ rootDir = process.cwd() } = {}) {
|
|
209
|
+
const swarmDir = resolve(rootDir, SWARM_ROOT);
|
|
210
|
+
const removed = [];
|
|
211
|
+
|
|
212
|
+
let entries;
|
|
213
|
+
try {
|
|
214
|
+
entries = await readdir(swarmDir);
|
|
215
|
+
} catch {
|
|
216
|
+
return removed; // .codex-swarm/ doesn't exist → nothing to clean
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
const wtDirs = entries.filter(e => e.startsWith('wt-'));
|
|
220
|
+
if (wtDirs.length === 0) return removed;
|
|
221
|
+
|
|
222
|
+
// Get registered worktree paths from git
|
|
223
|
+
let registeredPaths;
|
|
224
|
+
try {
|
|
225
|
+
const raw = await git(['worktree', 'list', '--porcelain'], rootDir);
|
|
226
|
+
registeredPaths = new Set(
|
|
227
|
+
raw.split('\n')
|
|
228
|
+
.filter(l => l.startsWith('worktree '))
|
|
229
|
+
.map(l => normPath(l.slice('worktree '.length))),
|
|
230
|
+
);
|
|
231
|
+
} catch {
|
|
232
|
+
return removed; // git worktree list failed → don't remove anything
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
for (const dir of wtDirs) {
|
|
236
|
+
const fullPath = resolve(swarmDir, dir);
|
|
237
|
+
const normalized = normPath(fullPath);
|
|
238
|
+
if (!registeredPaths.has(normalized)) {
|
|
239
|
+
try {
|
|
240
|
+
await rm(fullPath, { recursive: true, force: true });
|
|
241
|
+
removed.push(dir);
|
|
242
|
+
} catch { /* best-effort */ }
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// Prune stale git references
|
|
247
|
+
if (removed.length > 0) {
|
|
248
|
+
try { await git(['worktree', 'prune'], rootDir); } catch { /* best-effort */ }
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
return removed;
|
|
252
|
+
}
|
|
253
|
+
|
|
195
254
|
/**
|
|
196
255
|
* Fetch a remote shard's branch to the local repo via SSH.
|
|
197
256
|
* Workaround for hosts that cannot push to GitHub (e.g. Ultra4).
|