triflux 10.3.3 → 10.4.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.
Files changed (130) hide show
  1. package/CLAUDE.md +193 -0
  2. package/LICENSE +21 -21
  3. package/hooks/hook-registry.json +256 -256
  4. package/hub/adaptive-inject.mjs +1 -1
  5. package/hub/assign-callbacks.mjs +120 -120
  6. package/hub/delegator/index.mjs +14 -14
  7. package/hub/delegator/tool-definitions.mjs +35 -35
  8. package/hub/hitl.mjs +143 -143
  9. package/hub/lib/path-utils.mjs +167 -0
  10. package/hub/router.mjs +791 -791
  11. package/hub/session-fingerprint.mjs +1 -1
  12. package/hub/team/cli/commands/attach.mjs +37 -37
  13. package/hub/team/cli/commands/debug.mjs +74 -74
  14. package/hub/team/cli/commands/focus.mjs +53 -53
  15. package/hub/team/cli/commands/list.mjs +24 -24
  16. package/hub/team/cli/commands/start/start-in-process.mjs +40 -40
  17. package/hub/team/cli/commands/start/start-mux.mjs +73 -73
  18. package/hub/team/cli/commands/start/start-wt.mjs +69 -69
  19. package/hub/team/cli/commands/tasks.mjs +13 -13
  20. package/hub/team/cli/render.mjs +30 -30
  21. package/hub/team/cli/services/attach-fallback.mjs +54 -54
  22. package/hub/team/cli/services/member-selector.mjs +30 -30
  23. package/hub/team/cli/services/native-control.mjs +116 -116
  24. package/hub/team/cli/services/task-model.mjs +30 -30
  25. package/hub/team/notify.mjs +1 -1
  26. package/hub/team/orchestrator.mjs +161 -161
  27. package/hub/team/runtime-strategy.mjs +74 -0
  28. package/hub/team/session.mjs +611 -611
  29. package/hub/team/shared.mjs +13 -13
  30. package/hub/team/worktree-lifecycle.mjs +61 -2
  31. package/hub/tray.mjs +368 -368
  32. package/hub/workers/codex-mcp.mjs +507 -507
  33. package/hub/workers/factory.mjs +21 -21
  34. package/hud/hud-qos-status.mjs +17 -3
  35. package/hud/mission-board.mjs +53 -0
  36. package/hud/providers/claude.mjs +95 -22
  37. package/hud/renderers.mjs +39 -5
  38. package/package.json +21 -55
  39. package/references/hosts.json +33 -0
  40. package/scripts/completions/tfx.bash +47 -47
  41. package/scripts/completions/tfx.fish +44 -44
  42. package/scripts/completions/tfx.zsh +83 -83
  43. package/scripts/demo.mjs +169 -0
  44. package/scripts/headless-guard.mjs +16 -4
  45. package/scripts/hub-ensure.mjs +120 -120
  46. package/scripts/keyword-detector.mjs +272 -272
  47. package/scripts/keyword-rules-expander.mjs +521 -521
  48. package/scripts/lib/mcp-server-catalog.mjs +118 -118
  49. package/scripts/lib/skill-state.mjs +220 -0
  50. package/scripts/notion-read.mjs +553 -553
  51. package/scripts/test-tfx-route-no-claude-native.mjs +57 -57
  52. package/scripts/tfx-batch-stats.mjs +96 -96
  53. package/skills/.omc/state/agent-replay-8f0e10a9-9693-4410-96f5-a6b07e8ed995.jsonl +1 -0
  54. package/skills/.omc/state/idle-notif-cooldown.json +3 -0
  55. package/skills/.omc/state/last-tool-error.json +7 -0
  56. package/skills/.omc/state/subagent-tracking.json +7 -0
  57. package/skills/tfx-remote-spawn/references/hosts.json +16 -0
  58. package/skills/tfx-workspace/async-tests/run-tests.sh +203 -0
  59. package/skills/tfx-workspace/evals/evals.json +79 -0
  60. package/skills/tfx-workspace/iteration-1/benchmark.json +162 -0
  61. package/skills/tfx-workspace/iteration-1/codex-gemini-remap/eval_metadata.json +11 -0
  62. package/skills/tfx-workspace/iteration-1/codex-gemini-remap/old_skill/grading.json +9 -0
  63. package/skills/tfx-workspace/iteration-1/codex-gemini-remap/old_skill/outputs/analysis.md +154 -0
  64. package/skills/tfx-workspace/iteration-1/codex-gemini-remap/old_skill/timing.json +5 -0
  65. package/skills/tfx-workspace/iteration-1/codex-gemini-remap/with_skill/grading.json +9 -0
  66. package/skills/tfx-workspace/iteration-1/codex-gemini-remap/with_skill/outputs/analysis.md +126 -0
  67. package/skills/tfx-workspace/iteration-1/codex-gemini-remap/with_skill/timing.json +5 -0
  68. package/skills/tfx-workspace/iteration-1/doctor-diagnosis/eval_metadata.json +11 -0
  69. package/skills/tfx-workspace/iteration-1/doctor-diagnosis/old_skill/grading.json +9 -0
  70. package/skills/tfx-workspace/iteration-1/doctor-diagnosis/old_skill/outputs/analysis.md +119 -0
  71. package/skills/tfx-workspace/iteration-1/doctor-diagnosis/old_skill/timing.json +5 -0
  72. package/skills/tfx-workspace/iteration-1/doctor-diagnosis/with_skill/grading.json +9 -0
  73. package/skills/tfx-workspace/iteration-1/doctor-diagnosis/with_skill/outputs/analysis.md +115 -0
  74. package/skills/tfx-workspace/iteration-1/doctor-diagnosis/with_skill/timing.json +5 -0
  75. package/skills/tfx-workspace/iteration-1/hub-start-sequence/eval_metadata.json +10 -0
  76. package/skills/tfx-workspace/iteration-1/hub-start-sequence/old_skill/grading.json +8 -0
  77. package/skills/tfx-workspace/iteration-1/hub-start-sequence/old_skill/outputs/analysis.md +86 -0
  78. package/skills/tfx-workspace/iteration-1/hub-start-sequence/old_skill/timing.json +5 -0
  79. package/skills/tfx-workspace/iteration-1/hub-start-sequence/with_skill/grading.json +8 -0
  80. package/skills/tfx-workspace/iteration-1/hub-start-sequence/with_skill/outputs/analysis.md +81 -0
  81. package/skills/tfx-workspace/iteration-1/hub-start-sequence/with_skill/timing.json +5 -0
  82. package/skills/tfx-workspace/iteration-1/multi-team-creation/eval_metadata.json +12 -0
  83. package/skills/tfx-workspace/iteration-1/multi-team-creation/old_skill/grading.json +10 -0
  84. package/skills/tfx-workspace/iteration-1/multi-team-creation/old_skill/outputs/analysis.md +316 -0
  85. package/skills/tfx-workspace/iteration-1/multi-team-creation/old_skill/timing.json +5 -0
  86. package/skills/tfx-workspace/iteration-1/multi-team-creation/with_skill/grading.json +10 -0
  87. package/skills/tfx-workspace/iteration-1/multi-team-creation/with_skill/outputs/analysis.md +352 -0
  88. package/skills/tfx-workspace/iteration-1/multi-team-creation/with_skill/timing.json +5 -0
  89. package/skills/tfx-workspace/iteration-1/review.html +1325 -0
  90. package/skills/tfx-workspace/iteration-1/routing-implement-shortcut/eval_metadata.json +12 -0
  91. package/skills/tfx-workspace/iteration-1/routing-implement-shortcut/old_skill/grading.json +10 -0
  92. package/skills/tfx-workspace/iteration-1/routing-implement-shortcut/old_skill/outputs/analysis.md +97 -0
  93. package/skills/tfx-workspace/iteration-1/routing-implement-shortcut/old_skill/timing.json +5 -0
  94. package/skills/tfx-workspace/iteration-1/routing-implement-shortcut/with_skill/grading.json +10 -0
  95. package/skills/tfx-workspace/iteration-1/routing-implement-shortcut/with_skill/outputs/analysis.md +94 -0
  96. package/skills/tfx-workspace/iteration-1/routing-implement-shortcut/with_skill/timing.json +5 -0
  97. package/skills/tfx-workspace/iteration-1/routing-multi-task-triage/eval_metadata.json +12 -0
  98. package/skills/tfx-workspace/iteration-1/routing-multi-task-triage/old_skill/grading.json +10 -0
  99. package/skills/tfx-workspace/iteration-1/routing-multi-task-triage/old_skill/outputs/analysis.md +209 -0
  100. package/skills/tfx-workspace/iteration-1/routing-multi-task-triage/old_skill/timing.json +5 -0
  101. package/skills/tfx-workspace/iteration-1/routing-multi-task-triage/with_skill/grading.json +10 -0
  102. package/skills/tfx-workspace/iteration-1/routing-multi-task-triage/with_skill/outputs/analysis.md +193 -0
  103. package/skills/tfx-workspace/iteration-1/routing-multi-task-triage/with_skill/timing.json +5 -0
  104. package/skills/tfx-workspace/iteration-2/benchmark.json +62 -0
  105. package/skills/tfx-workspace/iteration-2/multi-team-creation-refactored/eval_metadata.json +13 -0
  106. package/skills/tfx-workspace/iteration-2/multi-team-creation-refactored/old_skill/grading.json +11 -0
  107. package/skills/tfx-workspace/iteration-2/multi-team-creation-refactored/old_skill/outputs/analysis.md +382 -0
  108. package/skills/tfx-workspace/iteration-2/multi-team-creation-refactored/old_skill/timing.json +5 -0
  109. package/skills/tfx-workspace/iteration-2/multi-team-creation-refactored/with_skill/grading.json +11 -0
  110. package/skills/tfx-workspace/iteration-2/multi-team-creation-refactored/with_skill/outputs/analysis.md +333 -0
  111. package/skills/tfx-workspace/iteration-2/multi-team-creation-refactored/with_skill/timing.json +5 -0
  112. package/skills/tfx-workspace/iteration-2/review.html +1325 -0
  113. package/skills/tfx-workspace/skill-snapshot/tfx-auto/SKILL.md +217 -0
  114. package/skills/tfx-workspace/skill-snapshot/tfx-auto-codex/SKILL.md +77 -0
  115. package/skills/tfx-workspace/skill-snapshot/tfx-codex/SKILL.md +65 -0
  116. package/skills/tfx-workspace/skill-snapshot/tfx-doctor/SKILL.md +94 -0
  117. package/skills/tfx-workspace/skill-snapshot/tfx-gemini/SKILL.md +82 -0
  118. package/skills/tfx-workspace/skill-snapshot/tfx-hub/SKILL.md +133 -0
  119. package/skills/tfx-workspace/skill-snapshot/tfx-multi/SKILL.md +426 -0
  120. package/skills/tfx-workspace/skill-snapshot/tfx-setup/SKILL.md +101 -0
  121. package/.claude-plugin/marketplace.json +0 -34
  122. package/.claude-plugin/plugin.json +0 -22
  123. package/config/mcp-registry.json +0 -29
  124. package/tui/codex-profile.mjs +0 -402
  125. package/tui/core.mjs +0 -236
  126. package/tui/doctor.mjs +0 -328
  127. package/tui/gemini-profile.mjs +0 -254
  128. package/tui/monitor-data.mjs +0 -148
  129. package/tui/monitor.mjs +0 -295
  130. package/tui/setup.mjs +0 -442
@@ -0,0 +1,167 @@
1
+ // hub/lib/path-utils.mjs — Windows/POSIX 경로 변환 유틸리티
2
+
3
+ import { platform } from 'node:os';
4
+
5
+ /**
6
+ * Windows 경로를 Git Bash 스타일 POSIX 경로로 변환한다.
7
+ * C:\foo\bar → /c/foo/bar
8
+ * 이미 POSIX 경로면 그대로 반환.
9
+ * null/undefined → 빈 문자열
10
+ * @param {string|null|undefined} windowsPath
11
+ * @returns {string}
12
+ */
13
+ export function toPosixPath(windowsPath) {
14
+ if (windowsPath == null) return '';
15
+ const p = String(windowsPath);
16
+ if (!p) return '';
17
+
18
+ // 이미 POSIX 경로 (/ 로 시작하거나 드라이브 레터 없음)
19
+ const winDriveMatch = p.match(/^([A-Za-z]):[/\\](.*)/);
20
+ if (!winDriveMatch) {
21
+ // 백슬래시만 있는 상대 경로도 forward slash로 변환
22
+ return p.replace(/\\/g, '/');
23
+ }
24
+
25
+ const drive = winDriveMatch[1].toLowerCase();
26
+ const rest = winDriveMatch[2].replace(/\\/g, '/');
27
+ return `/${drive}/${rest}`;
28
+ }
29
+
30
+ /**
31
+ * POSIX 경로(Git Bash 스타일)를 Windows 경로로 변환한다.
32
+ * /c/foo/bar → C:\foo\bar
33
+ * 이미 Windows 경로면 그대로 반환.
34
+ * null/undefined → 빈 문자열
35
+ * @param {string|null|undefined} posixPath
36
+ * @returns {string}
37
+ */
38
+ export function toWindowsPath(posixPath) {
39
+ if (posixPath == null) return '';
40
+ const p = String(posixPath);
41
+ if (!p) return '';
42
+
43
+ // 이미 Windows 경로
44
+ if (/^[A-Za-z]:/.test(p)) {
45
+ return p.replace(/\//g, '\\');
46
+ }
47
+
48
+ // Git Bash 스타일: /c/foo/bar
49
+ const gitBashMatch = p.match(/^\/([a-zA-Z])(\/.*)?$/);
50
+ if (gitBashMatch) {
51
+ const drive = gitBashMatch[1].toUpperCase();
52
+ const rest = gitBashMatch[2] ? gitBashMatch[2].replace(/\//g, '\\') : '\\';
53
+ return `${drive}:${rest}`;
54
+ }
55
+
56
+ return p;
57
+ }
58
+
59
+ /**
60
+ * 현재 OS에 맞게 경로를 정규화한다.
61
+ * win32: backslash, 그 외: forward slash
62
+ * @param {string|null|undefined} p
63
+ * @returns {string}
64
+ */
65
+ export function normalizePath(p) {
66
+ if (p == null) return '';
67
+ const str = String(p);
68
+ if (process.platform === 'win32') {
69
+ return str.replace(/\//g, '\\');
70
+ }
71
+ return str.replace(/\\/g, '/');
72
+ }
73
+
74
+ /**
75
+ * 쉘 타입에 맞는 경로로 변환한다.
76
+ * @param {string|null|undefined} path
77
+ * @param {'git-bash'|'wsl'|'cmd'|'powershell'} shellType
78
+ * @returns {string}
79
+ */
80
+ export function resolveShellPath(path, shellType) {
81
+ if (path == null) return '';
82
+ const p = String(path);
83
+
84
+ switch (shellType) {
85
+ case 'git-bash':
86
+ return toPosixPath(p);
87
+
88
+ case 'wsl': {
89
+ // Git Bash 경로를 먼저 Windows로 변환 후 WSL 형식으로
90
+ let winPath = /^[A-Za-z]:/.test(p) ? p : toWindowsPath(p);
91
+ const wslDriveMatch = winPath.match(/^([A-Za-z]):[/\\](.*)/);
92
+ if (wslDriveMatch) {
93
+ const drive = wslDriveMatch[1].toLowerCase();
94
+ const rest = wslDriveMatch[2].replace(/\\/g, '/');
95
+ return rest ? `/mnt/${drive}/${rest}` : `/mnt/${drive}`;
96
+ }
97
+ // 이미 /mnt/ 형식이면 그대로
98
+ if (p.startsWith('/mnt/')) return p;
99
+ return p.replace(/\\/g, '/');
100
+ }
101
+
102
+ case 'cmd':
103
+ case 'powershell':
104
+ return toWindowsPath(p);
105
+
106
+ default:
107
+ return p;
108
+ }
109
+ }
110
+
111
+ /**
112
+ * 환경 변수와 플랫폼 정보로 현재 쉘 타입을 추론한다.
113
+ * @returns {'git-bash'|'wsl'|'cmd'|'powershell'|'unix'}
114
+ */
115
+ export function detectShellType() {
116
+ // WSL 감지: WSL_DISTRO_NAME 또는 WSLENV
117
+ if (process.env.WSL_DISTRO_NAME || process.env.WSLENV) {
118
+ return 'wsl';
119
+ }
120
+
121
+ // Windows 플랫폼
122
+ if (process.platform === 'win32') {
123
+ const shell = process.env.SHELL || '';
124
+ const term = process.env.TERM || '';
125
+ const msystem = process.env.MSYSTEM || '';
126
+
127
+ // Git Bash 감지: SHELL=/usr/bin/bash + MSYSTEM=MINGW64 등
128
+ if (
129
+ shell.includes('bash') ||
130
+ msystem.startsWith('MINGW') ||
131
+ msystem.startsWith('MSYS') ||
132
+ term === 'xterm'
133
+ ) {
134
+ return 'git-bash';
135
+ }
136
+
137
+ // PowerShell 감지
138
+ if (process.env.PSModulePath || process.env.PSHOME) {
139
+ return 'powershell';
140
+ }
141
+
142
+ return 'cmd';
143
+ }
144
+
145
+ // 비-Windows
146
+ return 'unix';
147
+ }
148
+
149
+ /**
150
+ * WSL 경로 여부를 확인한다 (/mnt/ 시작).
151
+ * @param {string|null|undefined} p
152
+ * @returns {boolean}
153
+ */
154
+ export function isWslPath(p) {
155
+ if (p == null) return false;
156
+ return String(p).startsWith('/mnt/');
157
+ }
158
+
159
+ /**
160
+ * Git Bash 경로 여부를 확인한다 (/c/ 또는 /d/ 등 단일 소문자 드라이브 레터).
161
+ * @param {string|null|undefined} p
162
+ * @returns {boolean}
163
+ */
164
+ export function isGitBashPath(p) {
165
+ if (p == null) return false;
166
+ return /^\/[a-zA-Z](\/|$)/.test(String(p));
167
+ }