triflux 8.12.1 → 8.12.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.
Files changed (112) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.ko.md +1 -1
  3. package/README.md +1 -1
  4. package/bin/triflux.mjs +64 -0
  5. package/hooks/hooks.json +56 -51
  6. package/hub/pipeline/index.mjs +318 -318
  7. package/hub/routing/q-learning.mjs +2 -1
  8. package/hub/schema.sql +146 -146
  9. package/hub/team/backend.mjs +2 -1
  10. package/hub/team/cli/commands/kill.mjs +37 -37
  11. package/hub/team/cli/commands/start/index.mjs +3 -2
  12. package/hub/team/cli/commands/start/parse-args.mjs +15 -0
  13. package/hub/team/cli/commands/start/start-headless.mjs +2 -1
  14. package/hub/team/cli/commands/stop.mjs +31 -31
  15. package/hub/team/cli/commands/task.mjs +30 -30
  16. package/hub/team/cli/help.mjs +41 -40
  17. package/hub/team/cli/services/hub-client.mjs +208 -208
  18. package/hub/team/cli/services/native-control.mjs +118 -118
  19. package/hub/team/cli/services/runtime-mode.mjs +62 -62
  20. package/hub/team/cli/services/state-store.mjs +48 -48
  21. package/hub/team/dashboard-anchor.mjs +14 -0
  22. package/hub/team/dashboard.mjs +274 -274
  23. package/hub/team/headless.mjs +44 -19
  24. package/hub/team/native.mjs +649 -649
  25. package/hub/tools.mjs +554 -554
  26. package/hub/workers/delegator-mcp.mjs +17 -0
  27. package/package.json +1 -1
  28. package/scripts/__tests__/remote-spawn-transfer.test.mjs +117 -0
  29. package/scripts/__tests__/remote-spawn.test.mjs +78 -0
  30. package/scripts/cache-buildup.mjs +30 -0
  31. package/scripts/cache-doctor.mjs +149 -0
  32. package/scripts/cache-warmup.mjs +514 -0
  33. package/scripts/headless-guard.mjs +48 -3
  34. package/scripts/hub-ensure.mjs +120 -120
  35. package/scripts/lib/env-probe.mjs +130 -0
  36. package/scripts/lib/mcp-filter.mjs +11 -1
  37. package/scripts/lib/mcp-manifest.mjs +79 -0
  38. package/scripts/lib/remote-spawn-transfer.mjs +196 -0
  39. package/scripts/mcp-check.mjs +237 -127
  40. package/scripts/mcp-gateway-config.mjs +104 -7
  41. package/scripts/mcp-gateway-integration-test.mjs +228 -0
  42. package/scripts/mcp-gateway-start.mjs +7 -0
  43. package/scripts/mcp-gateway-start.ps1 +17 -14
  44. package/scripts/mcp-gateway-verify.mjs +15 -1
  45. package/scripts/preflight-cache.mjs +2 -71
  46. package/scripts/remote-spawn.mjs +404 -40
  47. package/scripts/setup.mjs +17 -0
  48. package/scripts/tfx-route-worker.mjs +223 -165
  49. package/scripts/tfx-route.sh +85 -16
  50. package/scripts/token-snapshot.mjs +575 -575
  51. package/skills/tfx-analysis/SKILL.md +101 -101
  52. package/skills/tfx-auto/SKILL.md +1 -0
  53. package/skills/tfx-autopilot/SKILL.md +112 -112
  54. package/skills/tfx-autoresearch/SKILL.md +1 -0
  55. package/skills/tfx-autoroute/SKILL.md +184 -184
  56. package/skills/tfx-codex/SKILL.md +1 -0
  57. package/skills/tfx-codex-swarm/SKILL.md +456 -0
  58. package/skills/tfx-codex-swarm/evals/evals.json +26 -0
  59. package/skills/tfx-codex-swarm-workspace/iteration-1/benchmark.json +33 -0
  60. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/eval_metadata.json +42 -0
  61. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/with_skill/grading.json +11 -0
  62. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/with_skill/outputs/analysis.md +87 -0
  63. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/with_skill/outputs/classification.md +35 -0
  64. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/with_skill/outputs/commands.sh +275 -0
  65. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/with_skill/outputs/routing.md +56 -0
  66. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/with_skill/timing.json +5 -0
  67. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/without_skill/grading.json +11 -0
  68. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/without_skill/outputs/analysis.md +92 -0
  69. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/without_skill/outputs/classification.md +71 -0
  70. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/without_skill/outputs/commands.sh +264 -0
  71. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/without_skill/outputs/routing.md +113 -0
  72. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/without_skill/timing.json +5 -0
  73. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/eval_metadata.json +32 -0
  74. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/with_skill/grading.json +9 -0
  75. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/with_skill/outputs/analysis.md +96 -0
  76. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/with_skill/outputs/classification.md +38 -0
  77. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/with_skill/outputs/commands.sh +151 -0
  78. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/with_skill/outputs/routing.md +51 -0
  79. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/with_skill/timing.json +5 -0
  80. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/without_skill/grading.json +9 -0
  81. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/without_skill/outputs/analysis.md +127 -0
  82. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/without_skill/outputs/classification.md +57 -0
  83. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/without_skill/outputs/commands.sh +129 -0
  84. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/without_skill/outputs/routing.md +84 -0
  85. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/without_skill/timing.json +5 -0
  86. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/eval_metadata.json +27 -0
  87. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/with_skill/grading.json +8 -0
  88. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/with_skill/outputs/analysis.md +98 -0
  89. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/with_skill/outputs/classification.md +65 -0
  90. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/with_skill/outputs/commands.sh +123 -0
  91. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/with_skill/outputs/routing.md +66 -0
  92. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/with_skill/timing.json +5 -0
  93. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/without_skill/grading.json +8 -0
  94. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/without_skill/outputs/analysis.md +88 -0
  95. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/without_skill/outputs/classification.md +40 -0
  96. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/without_skill/outputs/commands.sh +130 -0
  97. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/without_skill/outputs/routing.md +61 -0
  98. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/without_skill/timing.json +5 -0
  99. package/skills/tfx-doctor/SKILL.md +5 -0
  100. package/skills/tfx-profile/SKILL.md +141 -51
  101. package/skills/tfx-qa/SKILL.md +117 -117
  102. package/skills/tfx-remote-spawn/references/hosts.json +16 -16
  103. package/skills/tfx-review/SKILL.md +52 -51
  104. package/skills/tfx-setup/SKILL.md +202 -7
  105. package/tui/gemini-profile.mjs +254 -0
  106. package/tui/setup.mjs +36 -1
  107. package/scripts/claude-logged.ps1 +0 -54
  108. package/scripts/demo-tui.mjs +0 -59
  109. package/skills/.omc/state/agent-replay-8f0e10a9-9693-4410-96f5-a6b07e8ed995.jsonl +0 -1
  110. package/skills/.omc/state/idle-notif-cooldown.json +0 -3
  111. package/skills/.omc/state/last-tool-error.json +0 -7
  112. package/skills/.omc/state/subagent-tracking.json +0 -7
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triflux",
3
- "version": "8.3.0",
3
+ "version": "8.11.2",
4
4
  "description": "CLI-first multi-model orchestrator for Claude Code — route tasks to Codex, Gemini, and Claude",
5
5
  "author": {
6
6
  "name": "tellang"
package/README.ko.md CHANGED
@@ -313,7 +313,7 @@ tfx setup
313
313
  # Team — Multi-CLI 병렬 오케스트레이션
314
314
  /tfx-multi "refactor auth + update UI + add tests"
315
315
  ```
316
- n> **참고**: Deep 스킬(`/tfx-deep-*`, `/tfx-persist`, `/tfx-ralph`)은 완전한 Tri-CLI 합의(Tier 1)를 위해 **psmux**(또는 tmux), **triflux Hub**, **Codex CLI**, **Gemini CLI**가 필요합니다. 전제조건이 충족되지 않으면 Tier 3(Claude 단독, single-model) 모드로 자동 전환됩니다. `tfx doctor`로 환경을 확인하세요.
316
+ > **참고**: Deep 스킬(`/tfx-deep-*`, `/tfx-persist`, `/tfx-ralph`)은 완전한 Tri-CLI 합의(Tier 1)를 위해 **psmux**(또는 tmux), **triflux Hub**, **Codex CLI**, **Gemini CLI**가 필요합니다. 전제조건이 충족되지 않으면 Tier 3(Claude 단독, single-model) 모드로 자동 전환됩니다. `tfx doctor`로 환경을 확인하세요.
317
317
 
318
318
  ---
319
319
 
package/README.md CHANGED
@@ -313,7 +313,7 @@ tfx setup
313
313
  # Team — Multi-CLI parallel orchestration
314
314
  /tfx-multi "refactor auth + update UI + add tests"
315
315
  ```
316
- n> **Note**: Deep skills (`/tfx-deep-*`, `/tfx-persist`, `/tfx-ralph`) require **psmux** (or tmux), **triflux Hub**, **Codex CLI**, and **Gemini CLI** for full Tri-CLI consensus (Tier 1). Without these prerequisites, skills automatically degrade to Tier 3 (Claude-only, single-model) mode. Run `tfx doctor` to check your environment.
316
+ > **Note**: Deep skills (`/tfx-deep-*`, `/tfx-persist`, `/tfx-ralph`) require **psmux** (or tmux), **triflux Hub**, **Codex CLI**, and **Gemini CLI** for full Tri-CLI consensus (Tier 1). Without these prerequisites, skills automatically degrade to Tier 3 (Claude-only, single-model) mode. Run `tfx doctor` to check your environment.
317
317
 
318
318
  ---
319
319
 
package/bin/triflux.mjs CHANGED
@@ -1030,6 +1030,20 @@ async function cmdDoctor(options = {}) {
1030
1030
  warn("Gemini 쿼터 캐시 재생성 실패");
1031
1031
  }
1032
1032
  }
1033
+ try {
1034
+ const { buildAll } = await import("../scripts/cache-warmup.mjs");
1035
+ const warmupSummary = buildAll({ cwd: process.cwd(), force: true });
1036
+ if (warmupSummary.ok) {
1037
+ report.actions.push({ type: "rebuild", name: "warmup-caches", status: "ok", built: warmupSummary.built });
1038
+ ok("Phase 1 웜업 캐시 재생성됨");
1039
+ } else {
1040
+ report.actions.push({ type: "rebuild", name: "warmup-caches", status: "failed" });
1041
+ warn("Phase 1 웜업 캐시 재생성 실패");
1042
+ }
1043
+ } catch {
1044
+ report.actions.push({ type: "rebuild", name: "warmup-caches", status: "failed" });
1045
+ warn("Phase 1 웜업 캐시 재생성 실패");
1046
+ }
1033
1047
  console.log(`\n ${LINE}`);
1034
1048
  console.log(` ${GREEN_BRIGHT}${BOLD}✓ 캐시 초기화 + 재생성 완료${RESET}\n`);
1035
1049
  report.status = report.actions.some((action) => action.status === "failed") ? "issues" : "ok";
@@ -1083,6 +1097,19 @@ async function cmdDoctor(options = {}) {
1083
1097
  } catch { try { unlinkSync(fp); cleaned++; ok(`손상된 캐시 정리: ${name}`); } catch {} }
1084
1098
  }
1085
1099
  if (cleaned === 0) info("에러 캐시 없음");
1100
+ try {
1101
+ const { fixCaches } = await import("../scripts/cache-doctor.mjs");
1102
+ const cacheRepair = await fixCaches({ cwd: process.cwd() });
1103
+ if (cacheRepair.fixed.length > 0 && cacheRepair.ok) {
1104
+ ok(`웜업 캐시 자동 복구: ${cacheRepair.fixed.join(", ")}`);
1105
+ } else if (cacheRepair.fixed.length > 0) {
1106
+ warn(`웜업 캐시 자동 복구 실패: ${cacheRepair.fixed.join(", ")}`);
1107
+ } else {
1108
+ info("웜업 캐시: 이미 정상 상태");
1109
+ }
1110
+ } catch {
1111
+ warn("웜업 캐시 자동 복구 실패");
1112
+ }
1086
1113
  console.log(`\n ${LINE}`);
1087
1114
  info("수정 완료 — 아래 진단 결과를 확인하세요");
1088
1115
  console.log("");
@@ -1257,6 +1284,43 @@ async function cmdDoctor(options = {}) {
1257
1284
  info(`수동: node ${join(PKG_ROOT, "scripts", "mcp-check.mjs")}`);
1258
1285
  }
1259
1286
 
1287
+ // 9.5. Phase 1 웜업 캐시
1288
+ section("Warmup Cache");
1289
+ try {
1290
+ const { verifyCaches } = await import("../scripts/cache-doctor.mjs");
1291
+ const cacheVerification = verifyCaches({ cwd: process.cwd() });
1292
+ const brokenCaches = cacheVerification.results.filter((result) => result.status !== "ok");
1293
+
1294
+ addDoctorCheck(report, {
1295
+ name: "warmup-cache",
1296
+ status: cacheVerification.ok ? "ok" : "issues",
1297
+ files: cacheVerification.results.map((result) => ({
1298
+ target: result.target,
1299
+ status: result.status,
1300
+ path: result.file,
1301
+ })),
1302
+ ...(cacheVerification.ok ? {} : { fix: "tfx doctor --fix" }),
1303
+ });
1304
+
1305
+ if (brokenCaches.length === 0) {
1306
+ ok("4개 웜업 캐시 정상");
1307
+ } else {
1308
+ warn(`${brokenCaches.length}개 웜업 캐시 이슈 발견`);
1309
+ for (const entry of brokenCaches) {
1310
+ info(`${entry.target}: ${entry.status}`);
1311
+ }
1312
+ if (!fix) issues += brokenCaches.length;
1313
+ }
1314
+ } catch (error) {
1315
+ addDoctorCheck(report, {
1316
+ name: "warmup-cache",
1317
+ status: "invalid",
1318
+ fix: "node scripts/cache-doctor.mjs --fix",
1319
+ });
1320
+ warn(`웜업 캐시 검사 실패: ${error.message}`);
1321
+ issues++;
1322
+ }
1323
+
1260
1324
  // 10. CLI 이슈 트래커
1261
1325
  section("CLI Issues");
1262
1326
  const issuesFile = join(CLAUDE_DIR, "cache", "cli-issues.jsonl");
package/hooks/hooks.json CHANGED
@@ -1,51 +1,56 @@
1
- {
2
- "description": "triflux lifecycle hooks — CLI routing setup and HUD integration",
3
- "hooks": {
4
- "SessionStart": [
5
- {
6
- "matcher": "*",
7
- "hooks": [
8
- {
9
- "type": "command",
10
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/setup.mjs\"",
11
- "timeout": 10
12
- },
13
- {
14
- "type": "command",
15
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hub-ensure.mjs\"",
16
- "timeout": 8
17
- },
18
- {
19
- "type": "command",
20
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/preflight-cache.mjs\"",
21
- "timeout": 5
22
- }
23
- ]
24
- }
25
- ],
26
- "UserPromptSubmit": [
27
- {
28
- "matcher": "*",
29
- "hooks": [
30
- {
31
- "type": "command",
32
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/run.cjs\" \"${CLAUDE_PLUGIN_ROOT}/scripts/keyword-detector.mjs\"",
33
- "timeout": 5
34
- }
35
- ]
36
- }
37
- ],
38
- "Stop": [
39
- {
40
- "matcher": "*",
41
- "hooks": [
42
- {
43
- "type": "command",
44
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/pipeline-stop.mjs\"",
45
- "timeout": 5
46
- }
47
- ]
48
- }
49
- ]
50
- }
51
- }
1
+ {
2
+ "description": "triflux lifecycle hooks — CLI routing setup and HUD integration",
3
+ "hooks": {
4
+ "SessionStart": [
5
+ {
6
+ "matcher": "*",
7
+ "hooks": [
8
+ {
9
+ "type": "command",
10
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/setup.mjs\"",
11
+ "timeout": 10
12
+ },
13
+ {
14
+ "type": "command",
15
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hub-ensure.mjs\"",
16
+ "timeout": 8
17
+ },
18
+ {
19
+ "type": "command",
20
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/mcp-gateway-ensure.mjs\"",
21
+ "timeout": 8
22
+ },
23
+ {
24
+ "type": "command",
25
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/preflight-cache.mjs\"",
26
+ "timeout": 5
27
+ }
28
+ ]
29
+ }
30
+ ],
31
+ "UserPromptSubmit": [
32
+ {
33
+ "matcher": "*",
34
+ "hooks": [
35
+ {
36
+ "type": "command",
37
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/run.cjs\" \"${CLAUDE_PLUGIN_ROOT}/scripts/keyword-detector.mjs\"",
38
+ "timeout": 5
39
+ }
40
+ ]
41
+ }
42
+ ],
43
+ "Stop": [
44
+ {
45
+ "matcher": "*",
46
+ "hooks": [
47
+ {
48
+ "type": "command",
49
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/pipeline-stop.mjs\"",
50
+ "timeout": 5
51
+ }
52
+ ]
53
+ }
54
+ ]
55
+ }
56
+ }